{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "audio",
  "description": "Ses / podcast / sesli mesaj. `waveform` 0–100 genlikler; çalma durumu istemcide.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "type",
    "version",
    "source",
    "title",
    "duration_seconds"
  ],
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "audio"
      ]
    },
    "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"
      ]
    },
    "source": {
      "type": "string",
      "pattern": "^(https://[^\\s\\x00-\\x1f\\x7f]{1,2040}|[A-Za-z0-9_.:-]{8,256})$",
      "x-inki-medya": "audio",
      "description": "Telegram sözleşmesi: file_id ya da https URL (sunucu egress ile indirip yeniden barındırır)"
    },
    "title": {
      "type": "string",
      "maxLength": 120,
      "minLength": 1
    },
    "duration_seconds": {
      "type": "integer",
      "minimum": 0,
      "maximum": 86400
    },
    "position_seconds": {
      "type": "integer",
      "minimum": 0,
      "maximum": 86400
    },
    "waveform": {
      "type": "array",
      "minItems": 1,
      "maxItems": 128,
      "items": {
        "type": "integer",
        "minimum": 0,
        "maximum": 100
      }
    },
    "kind": {
      "type": "string",
      "enum": [
        "music",
        "podcast",
        "voice"
      ]
    }
  }
}
