{
  "$comment": "Generado por integrations/woocommerce/contract/generate-vectors.ts desde el gateway. No editar a mano. Secreto sintético.",
  "schema_versions": {
    "request": "channel.validation.v1",
    "result": "channel.validation.result.v1",
    "error": "channel.error.v1"
  },
  "paths": {
    "validations": "/v1/channel/validations",
    "readback": "/v1/channel/validations/readback"
  },
  "signing": {
    "algorithm": "HMAC-SHA256(secret, timestamp + '.' + raw_body), hex en minúsculas",
    "headers": {
      "key_id": "X-Validata-Key-Id",
      "timestamp": "X-Validata-Timestamp",
      "signature": "X-Validata-Signature"
    },
    "signature_prefix": "v1=",
    "window_seconds": 300,
    "key_id_pattern": "^[a-z0-9]{16}$",
    "secret_pattern": "^[A-Za-z0-9_-]{43}$",
    "key_id": "vectorkey0000001",
    "secret": "WlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlo",
    "cases": [
      {
        "name": "cuerpo JSON simple",
        "timestamp": "1792444800",
        "body": "{\"schema_version\":\"channel.validation.v1\",\"channel\":\"woocommerce\"}",
        "signature": "v1=a7681555aadd594b463d182fff97d400ecb9ae2aa5c4a62f7216267bd846bc16"
      },
      {
        "name": "UTF-8 multibyte (ñ, tildes, emoji)",
        "timestamp": "1792444801",
        "body": "{\"city\":\"Bogotá\",\"address_line\":\"Calle Ñandú # 4-5 🏠\"}",
        "signature": "v1=56f35e16d9c7378fbfd0e96a95e67a4522ece0a8462f779f556a9bbed9a9dc30"
      },
      {
        "name": "barras y comillas escapadas",
        "timestamp": "1792444802",
        "body": "{\"address_line\":\"Cra 7 \\/ 45 \\\"B\\\"\"}",
        "signature": "v1=f5c6f5e2832a5d87c03fa3b77291a6449a832cf16bb4484a8ef91fbf5f0e36eb"
      },
      {
        "name": "cuerpo vacío (readback GET)",
        "timestamp": "1792444803",
        "body": "",
        "signature": "v1=088175cc8a3530bac99246b8b470239e6959ab087a532af7559cbb2db644e9e8"
      },
      {
        "name": "espacios y saltos de línea son parte del cuerpo",
        "timestamp": "1792444804",
        "body": "{ \"a\" : 1 }\n",
        "signature": "v1=18ff8461c17311d418e5bd80ab8b4426165aa396fa156777e48d6379e238fb3c"
      }
    ]
  },
  "deadline": {
    "header": "x-validata-deadline-ms",
    "woocommerce": {
      "default_ms": 3500,
      "min_ms": 1500,
      "max_ms": 5500
    }
  },
  "request": {
    "channel": "woocommerce",
    "delivery_modes": [
      "HOME_DELIVERY",
      "OFFICE_PICKUP"
    ],
    "payment_intents": [
      "cod",
      "prepaid",
      "partial"
    ],
    "active_currencies": [
      "ARS",
      "AUD",
      "BRL",
      "CAD",
      "CHF",
      "CLP",
      "COP",
      "EUR",
      "GBP",
      "JPY",
      "MXN",
      "PEN",
      "USD"
    ],
    "forbidden_keys": [
      "cedula",
      "channel_account_ref",
      "conversation",
      "conversation_text",
      "core_action",
      "decision",
      "document",
      "document_number",
      "email",
      "fingerprint_policy",
      "first_name",
      "full_name",
      "integrationId",
      "integration_id",
      "last_name",
      "merchant",
      "merchantId",
      "merchant_id",
      "merchant_policy_effect",
      "merchant_ref",
      "messages",
      "name",
      "national_id",
      "next_action",
      "partner_ref",
      "policy",
      "policy_version",
      "rules",
      "shop",
      "shopDomain",
      "shop_domain",
      "store",
      "storeId",
      "store_id",
      "tenant",
      "tenantId",
      "tenant_id",
      "tenant_ref",
      "thresholds",
      "transcript"
    ],
    "patterns": {
      "phone": "^[0-9+()\\s.-]{7,32}$",
      "external_ref": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$",
      "country": "^[A-Z]{2}$",
      "decimal": "^(?:0|[1-9][0-9]{0,11})(?:\\.[0-9]{1,4})?$",
      "timestamp": "^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:\\.[0-9]{1,6})?Z$",
      "idempotency_key": "^[A-Za-z0-9][A-Za-z0-9._~:-]{15,127}$"
    },
    "max_lengths": {
      "department": 80,
      "city": 80,
      "address_line": 200,
      "complement": 200,
      "phone": 32
    },
    "max_items": 50,
    "max_quantity": 999,
    "max_body_bytes": 16384
  },
  "result": {
    "statuses": [
      "DECIDED",
      "INVALID_PHONE"
    ],
    "next_actions": [
      "CONTINUE_COD",
      "CONFIRM_ADDRESS_VIA_CHAT",
      "OFFER_FREIGHT_ADVANCE",
      "REQUIRE_PREPAID",
      "EXTRA_CONFIRMATION",
      "HANDOFF_TO_HUMAN",
      "ASK_VALID_PHONE"
    ],
    "core_actions": [
      "ALLOW_COD",
      "REQUIRE_FREIGHT",
      "REQUIRE_PREPAID",
      "EXTRA_CONFIRMATION",
      "MANUAL_REVIEW",
      "WARN"
    ],
    "merchant_policy_effects": [
      "CONTINUE_COD_SUBJECT_TO_GATES",
      "REQUIRE_FREIGHT",
      "REQUIRE_PREPAID",
      "EXTRA_CONFIRMATION",
      "HUMAN_CONTROL"
    ],
    "consumption_states": [
      "CONSUMED",
      "ALREADY_COUNTED",
      "REPLAY_NOT_CHARGED",
      "NOT_CHARGED_INVALID_PHONE"
    ],
    "address_gates": [
      "NOT_VALIDATED",
      "HOME_PASS",
      "PICKUP_VALIDATED",
      "SKIPPED_BY_POLICY",
      "BLOCKED"
    ],
    "evidence_states": [
      "VALIDATED",
      "DEGRADED",
      "NO_SOURCES"
    ],
    "fingerprint_levels": [
      "nuevo",
      "bueno",
      "con_devoluciones",
      "alto_riesgo"
    ]
  },
  "errors": {
    "retry_classes": [
      "DO_NOT_RETRY",
      "RETRY_SAME_KEY",
      "RETRY_AFTER",
      "POLL_READBACK_ONLY"
    ],
    "table": {
      "INVALID_REQUEST": {
        "http": 400,
        "retry": "DO_NOT_RETRY"
      },
      "UNKNOWN_FIELD": {
        "http": 400,
        "retry": "DO_NOT_RETRY"
      },
      "FORBIDDEN_FIELD": {
        "http": 400,
        "retry": "DO_NOT_RETRY"
      },
      "IDEMPOTENCY_KEY_REQUIRED": {
        "http": 400,
        "retry": "DO_NOT_RETRY"
      },
      "MALFORMED_HEADER": {
        "http": 400,
        "retry": "DO_NOT_RETRY"
      },
      "INVALID_CREDENTIALS": {
        "http": 401,
        "retry": "DO_NOT_RETRY"
      },
      "SIGNATURE_INVALID": {
        "http": 401,
        "retry": "DO_NOT_RETRY"
      },
      "TIMESTAMP_OUT_OF_WINDOW": {
        "http": 401,
        "retry": "DO_NOT_RETRY"
      },
      "INTEGRATION_REVOKED": {
        "http": 403,
        "retry": "DO_NOT_RETRY"
      },
      "INSUFFICIENT_SCOPE": {
        "http": 403,
        "retry": "DO_NOT_RETRY"
      },
      "CHANNEL_NOT_ENABLED": {
        "http": 403,
        "retry": "DO_NOT_RETRY"
      },
      "RESOURCE_NOT_FOUND": {
        "http": 404,
        "retry": "DO_NOT_RETRY"
      },
      "METHOD_NOT_ALLOWED": {
        "http": 405,
        "retry": "DO_NOT_RETRY"
      },
      "IDEMPOTENCY_CONFLICT": {
        "http": 409,
        "retry": "DO_NOT_RETRY"
      },
      "OPERATION_PENDING": {
        "http": 409,
        "retry": "POLL_READBACK_ONLY"
      },
      "PAYLOAD_TOO_LARGE": {
        "http": 413,
        "retry": "DO_NOT_RETRY"
      },
      "UNSUPPORTED_MEDIA_TYPE": {
        "http": 415,
        "retry": "DO_NOT_RETRY"
      },
      "VALIDATIONS_EXHAUSTED": {
        "http": 423,
        "retry": "DO_NOT_RETRY"
      },
      "RATE_LIMITED": {
        "http": 429,
        "retry": "RETRY_AFTER"
      },
      "SERVICE_UNAVAILABLE": {
        "http": 503,
        "retry": "RETRY_SAME_KEY"
      }
    }
  }
}
