{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "contact_card",
  "description": "Kişi kartı. Ara/Rehbere ekle düğmeleri `phone` varlığından istemcide türetilir (rehbere ekleme izin ister).",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "type",
    "version",
    "name"
  ],
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "contact_card"
      ]
    },
    "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"
      ]
    },
    "name": {
      "type": "string",
      "maxLength": 80,
      "minLength": 1
    },
    "subtitle": {
      "type": "string",
      "maxLength": 120
    },
    "avatar": {
      "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)"
    },
    "phone": {
      "type": "string",
      "pattern": "^\\+?[0-9 ()-]{5,20}$"
    },
    "email": {
      "type": "string",
      "pattern": "^[^@\\s]{1,64}@[^@\\s]{1,190}\\.[^@\\s]{2,63}$"
    }
  }
}
