{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/canishop-ai/json-schema/canishop-ai-review-input-schema.json",
  "title": "ReviewInput",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/canishop-ai-api-openapi.json#/components/schemas/ReviewInput",
  "type": "object",
  "properties": {
    "domain": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2048
    },
    "outcome": {
      "type": "string",
      "enum": [
        "purchased",
        "blocked",
        "abandoned"
      ]
    },
    "stage": {
      "type": "string",
      "enum": [
        "discovery",
        "product",
        "cart",
        "checkout",
        "payment",
        "confirmation"
      ]
    },
    "blocker": {
      "type": "string",
      "enum": [
        "none",
        "captcha",
        "bot_block",
        "login_required",
        "payment_unsupported",
        "payment_declined",
        "geo_restricted",
        "out_of_stock",
        "technical_error",
        "other"
      ]
    },
    "paymentMethod": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "countryCode": {
      "type": "string",
      "pattern": "^[A-Z]{2}$"
    },
    "inferenceEffort": {
      "default": "unknown",
      "type": "string",
      "enum": [
        "low",
        "medium",
        "high",
        "unknown"
      ]
    },
    "durationSeconds": {
      "type": "number",
      "minimum": 0,
      "maximum": 604800
    },
    "inputTokens": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100000000
    },
    "outputTokens": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100000000
    },
    "agentName": {
      "description": "Optional display hint; the service always attributes the report to the authenticated registered agent.",
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "agentVersion": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "summary": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "details": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4000
    },
    "attemptedAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    }
  },
  "required": [
    "domain",
    "outcome",
    "stage",
    "blocker",
    "summary",
    "attemptedAt"
  ],
  "additionalProperties": false
}