{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gifsnap-com/json-schema/gifsnap-com-for-you-batch-schema.json",
  "title": "ForYouBatch",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gifsnap-com-openapi.json#/components/schemas/ForYouBatch",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "contract_version": {
      "const": 1
    },
    "events": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ForYouEvent"
      },
      "maxItems": 50
    }
  },
  "required": [
    "contract_version",
    "events"
  ],
  "$defs": {
    "ForYouContext": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "session_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "request_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "model_version": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100
        },
        "feedback_token": {
          "type": "string",
          "minLength": 1,
          "maxLength": 4096
        },
        "recommendation_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "content_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "position": {
          "type": "integer",
          "minimum": 0,
          "maximum": 499
        },
        "impression_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        }
      },
      "required": [
        "session_id",
        "request_id",
        "model_version",
        "feedback_token",
        "recommendation_id",
        "content_id",
        "position",
        "impression_id"
      ]
    },
    "ForYouEvent": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "context": {
          "$ref": "#/$defs/ForYouContext"
        },
        "kind": {
          "enum": [
            "impression",
            "save",
            "unsave",
            "confirmedSend",
            "shareCompleted",
            "quickSkip",
            "notInterested"
          ]
        },
        "occurred_at": {
          "type": "string",
          "format": "date-time"
        },
        "visible_playback_ms": {
          "type": "integer",
          "minimum": 0,
          "maximum": 60000
        }
      },
      "required": [
        "id",
        "context",
        "kind",
        "occurred_at"
      ]
    }
  }
}