{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "upload",
  "description": "Fotoğraf / dosya yükleme. Yüklenen dosyalar bota file_id olarak gider; ilerleme istemcidedir.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "type",
    "version",
    "title",
    "accept",
    "max_files"
  ],
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "upload"
      ]
    },
    "version": {
      "type": "integer",
      "enum": [
        1
      ]
    },
    "tone": {
      "type": "string",
      "enum": [
        "neutral",
        "success",
        "warning",
        "danger",
        "brand"
      ]
    },
    "brand_color": {
      "type": "string",
      "enum": [
        "mavi",
        "turuncu",
        "mor",
        "pembe",
        "altin",
        "yesil",
        "turkuaz"
      ]
    },
    "title": {
      "type": "string",
      "maxLength": 80,
      "minLength": 1
    },
    "accept": {
      "type": "array",
      "minItems": 1,
      "maxItems": 3,
      "items": {
        "type": "string",
        "enum": [
          "photo",
          "file",
          "video"
        ]
      }
    },
    "max_files": {
      "type": "integer",
      "minimum": 1,
      "maximum": 10
    },
    "max_size_bytes": {
      "type": "integer",
      "minimum": 1,
      "maximum": 52428800
    },
    "hint": {
      "type": "string",
      "maxLength": 120
    },
    "files": {
      "type": "array",
      "minItems": 0,
      "maxItems": 10,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "value": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
            "description": "seçenek/öğe değeri; istemci bunu `inki_component_action.values` içinde geri gönderir"
          },
          "name": {
            "type": "string",
            "maxLength": 120
          },
          "progress": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "preview": {
            "type": "string",
            "pattern": "^(https://[^\\s\\x00-\\x1f\\x7f]{1,2040}|[A-Za-z0-9_.:-]{8,256})$",
            "x-inki-medya": "photo",
            "description": "Telegram sözleşmesi: file_id ya da https URL (sunucu egress ile indirip yeniden barındırır)"
          }
        },
        "required": [
          "value"
        ]
      }
    }
  },
  "x-inki-eylem": [
    {
      "action": "submit",
      "values": {
        "files": "yüklenen file_id dizisi"
      }
    }
  ]
}
