{
  "openapi": "3.1.0",
  "info": {
    "title": "Anka Gaming · Operatör API",
    "version": "1.0.0",
    "summary": "Hürkuş K-VI ve sonraki Anka oyunları için seamless wallet entegrasyonu.",
    "description": "Anka Gaming oyunlarını **tek cüzdan** (seamless wallet) modeliyle sitenize bağlamak için operatör API'si. Oyuncunun parası her zaman sizde kalır: oyun her bahis, kazanç ve iade için cüzdan geri çağrı adresinize imzalı bir istek atar (`webhooks.cuzdan`). Oyun durumu, bakım ve duyurular olay bildirim adresinize gelir (`webhooks.olayBildirimi`).\n\nTüm tutarlar para biriminin en küçük biriminde **tam sayıdır** (1 ₺ = `100`). Gövdeler UTF-8 JSON'dur. Hata gövdesi her uçta `{tamam:false, hata, mesaj}` biçimindedir.\n\nİmza: `X-Zflow-Imza = hex(HMAC-SHA256(şifre, X-Zflow-Zaman + \".\" + hamGövde))`. Gövdesiz isteklerde hamGövde boş dizgidir. Zaman penceresi ±60 sn.",
    "contact": {
      "name": "Anka Gaming geliştirici portalı",
      "url": "https://docs.ormicast.store"
    }
  },
  "servers": [
    {
      "url": "https://api.ormicast.store",
      "description": "Operatör API'si (test ve canlı aynı adres; kip operatör kaydındadır)"
    }
  ],
  "externalDocs": {
    "description": "Geliştirici portalı",
    "url": "https://docs.ormicast.store"
  },
  "tags": [
    {
      "name": "Oyun açma",
      "description": "Oyuncuya özel açılış adresi ve demo oturumu."
    },
    {
      "name": "Katalog",
      "description": "Oyun listesi; lobi kartı için gereken her şey."
    },
    {
      "name": "Bağlantı",
      "description": "El sıkışma: kod, şifre, IP izni ve saat doğru mu."
    },
    {
      "name": "Adalet",
      "description": "Kanıtlanabilir adalet doğrulaması (açık, imzasız)."
    },
    {
      "name": "Yönetim",
      "description": "Operatörün kendi verisi: özet, ayar, turlar, raporlar, oyuncular, mutabakat, görünüm. Başarıda gövde doğrudan nesnedir (`tamam` alanı yoktur)."
    },
    {
      "name": "Cüzdan geri çağrısı",
      "description": "Oyun → operatör: bakiye, bahis, kazanç, iade. Operatör uygular."
    },
    {
      "name": "Olay bildirimi",
      "description": "Sağlayıcı → operatör: oyun durumu, bakım, duyuru. Operatör uygular."
    }
  ],
  "security": [
    {
      "ZflowOperator": [],
      "ZflowZaman": [],
      "ZflowImza": []
    }
  ],
  "paths": {
    "/api/ac": {
      "post": {
        "tags": [
          "Oyun açma"
        ],
        "operationId": "oyunAc",
        "summary": "Oyunu aç (gerçek para)",
        "description": "Oyuncu oyunu seçtiğinde **sunucunuz** çağırır; dönen `url` adresini iframe'de ya da tam ekran açın. Ayrı bir oyuncu kayıt ucu yoktur: oyuncu ilk açılışta oluşturulur. `risk` verilirse oyuncunun risk grubu güncellenir, verilmezse mevcut grup korunur (yeni oyuncu: `normal`).\n\nAçılış adresi `https://play.ormicast.store/o/<jeton>` biçimindedir (43 karakter jeton, 12 saat geçerli). İlk açılışta jeton o tarayıcıya bağlanır; aynı link başka cihazda açılırsa \"Oturum başka cihazda\" kartı çıkar. Her açılışta yeniden çağırın; adresi saklamayın, paylaşmayın. Eski `/oyna?j=` biçimi çalışmaya devam eder.\n\nOyun bakımdaysa `503 bakim` döner; oyunu lobide gizleyin ve `bitis` zamanını gösterin.",
        "x-dene": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcIstegi"
              },
              "example": {
                "oyuncu": "u12345",
                "paraBirimi": "TRY",
                "dil": "tr",
                "mobil": false,
                "donusUrl": "https://site.ornek/casino",
                "geriUrl": "https://api.site.ornek/zflow/cuzdan",
                "cerceveler": [
                  "https://site.ornek",
                  "https://m.site.ornek"
                ],
                "oyun": "hurkus"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Açılış adresi hazır.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcCevabi"
                },
                "example": {
                  "tamam": true,
                  "url": "https://play.ormicast.store/o/kX9vR2mQ7tL4pZ8wN1cY6hB3jF5sD0aE_uG-oIqWxVe",
                  "oturum": 18342,
                  "bitis": "2026-11-06T00:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Gecersiz"
          },
          "401": {
            "$ref": "#/components/responses/Imza"
          },
          "403": {
            "$ref": "#/components/responses/Yasak"
          },
          "415": {
            "$ref": "#/components/responses/GovdeTuru"
          },
          "500": {
            "$ref": "#/components/responses/Sunucu"
          },
          "503": {
            "$ref": "#/components/responses/Bakim"
          }
        }
      }
    },
    "/api/demo": {
      "post": {
        "tags": [
          "Oyun açma"
        ],
        "operationId": "demoAc",
        "summary": "Demo oturumu aç",
        "description": "Sanal **1.000 ₺** (`bakiye: 100000`) bakiyeli, oyuncusuz demo oturumu. Aynı turlar ve aynı çöküşler oynanır; cüzdan çağrısı yapılmaz, demo bahisleri listelerde ve raporlarda görünmez.\n\nAPI çağırmadan kullanılabilecek herkese açık demo linki de vardır: `https://play.ormicast.store/demo/hurkus?dil=tr` (IP başına dakikada 10 açılış). Lobi ve tanıtım sayfalarında bu linki kullanabilirsiniz.",
        "x-dene": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DemoIstegi"
              },
              "example": {
                "dil": "tr",
                "mobil": false,
                "donusUrl": "https://site.ornek/casino",
                "cerceveler": [
                  "https://site.ornek"
                ],
                "oyun": "hurkus"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Demo oturumu açıldı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DemoCevabi"
                },
                "example": {
                  "tamam": true,
                  "url": "https://play.ormicast.store/o/Dm3oT8eS1vK6nP0qR4wY7zA2bC5fH9jL_xU-gIiOtMr",
                  "oturum": 18343,
                  "bitis": "2026-11-06T00:00:00.000Z",
                  "bakiye": 100000
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Gecersiz"
          },
          "401": {
            "$ref": "#/components/responses/Imza"
          },
          "403": {
            "$ref": "#/components/responses/Yasak"
          },
          "415": {
            "$ref": "#/components/responses/GovdeTuru"
          },
          "500": {
            "$ref": "#/components/responses/Sunucu"
          },
          "503": {
            "$ref": "#/components/responses/Bakim"
          }
        }
      }
    },
    "/api/katalog": {
      "get": {
        "tags": [
          "Katalog"
        ],
        "operationId": "katalog",
        "summary": "Oyun kataloğu",
        "description": "Oyun listesi: lobi kartı için gereken her şey tek cevapta. RTP ve bahis sınırları **sizin** ayarınızdan hesaplanır. Katalog doğruluk kaynağıdır: her oyunda `durum` (`acik` | `bakim` | `kapali`), `surum` (oyun değiştikçe artar) ve `guncelleme` vardır.\n\nCevap `ETag` başlığı taşır; sonraki isteklerde `If-None-Match` gönderin, değişiklik yoksa `304` döner. Önerilen düzen: olay bildirimlerini dinleyin **ve** kataloğu 5 dakikada bir çekin (bir bildirim kaçsa da en geç 5 dakikada düzelir).",
        "x-dene": true,
        "parameters": [
          {
            "name": "If-None-Match",
            "in": "header",
            "required": false,
            "description": "Önceki cevabın `ETag` değeri. Değişiklik yoksa `304 Not Modified` döner.",
            "schema": {
              "type": "string"
            },
            "example": "\"k-7f3c19a2\""
          }
        ],
        "responses": {
          "200": {
            "description": "Katalog.",
            "headers": {
              "ETag": {
                "description": "Katalog içeriğinin özeti; `If-None-Match` ile geri gönderin.",
                "schema": {
                  "type": "string"
                },
                "example": "\"k-7f3c19a2\""
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KatalogCevabi"
                },
                "examples": {
                  "katalog": {
                    "$ref": "#/components/examples/KatalogCevabi"
                  }
                }
              }
            }
          },
          "304": {
            "description": "Katalog değişmedi (gövde yok). Elinizdeki kopyayı kullanmaya devam edin."
          },
          "401": {
            "$ref": "#/components/responses/Imza"
          },
          "403": {
            "$ref": "#/components/responses/Yasak"
          },
          "500": {
            "$ref": "#/components/responses/Sunucu"
          }
        }
      }
    },
    "/api/dene": {
      "get": {
        "tags": [
          "Bağlantı"
        ],
        "operationId": "dene",
        "summary": "Bağlantıyı dene (el sıkışma)",
        "description": "Kodunuz, şifreniz, IP izniniz ve saatiniz doğru mu? Para oynatmaz. `paraBirimi` kaydınızdaki para birimidir; `test` kaydınızın test kipinde olup olmadığını gösterir.",
        "x-dene": true,
        "responses": {
          "200": {
            "description": "Kimlik doğrulandı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeneCevabi"
                },
                "example": {
                  "tamam": true,
                  "mesaj": "Anka · Örnek Site (ornek-site) · TRY · test kipi",
                  "surum": "1.0.0+a1b2c3d",
                  "oyunlar": [
                    "hurkus"
                  ],
                  "paraBirimi": "TRY",
                  "test": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Imza"
          },
          "403": {
            "$ref": "#/components/responses/Yasak"
          },
          "500": {
            "$ref": "#/components/responses/Sunucu"
          }
        }
      },
      "post": {
        "tags": [
          "Bağlantı"
        ],
        "operationId": "denePost",
        "summary": "Bağlantı denemesi + adres eşitleme",
        "description": "GET ile aynı cevap; gövdede bildirimUrl / siteUrl verilirse kayıt eşitlenir (panel \"Bağlantıyı dene\").",
        "x-dene": true,
        "responses": {
          "200": {
            "description": "Kimlik doğrulandı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeneCevabi"
                },
                "example": {
                  "tamam": true,
                  "mesaj": "Anka · Örnek Site (ornek-site) · TRY · test kipi",
                  "surum": "1.0.0+a1b2c3d",
                  "oyunlar": [
                    "hurkus"
                  ],
                  "paraBirimi": "TRY",
                  "test": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Imza"
          },
          "403": {
            "$ref": "#/components/responses/Yasak"
          },
          "500": {
            "$ref": "#/components/responses/Sunucu"
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "bildirimUrl": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 500,
                    "description": "Olay bildirim adresiniz (oyun.durum, bakim.*, duyuru). Kayıttakinden farklıysa kaydınız güncellenir: ana alanınız değişince elle bir şey yapmazsınız."
                  },
                  "siteUrl": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 500,
                    "description": "Sitenizin şu anki adresi (kayıt bilgisi; farklıysa güncellenir)."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/dogrula": {
      "get": {
        "tags": [
          "Adalet"
        ],
        "operationId": "dogrula",
        "summary": "Adalet doğrulaması",
        "description": "Açık uç, imza gerekmez. İki biçimi vardır:\n\n1. **Biten turun kaydı:** `?tur=<no>&operator=<kod>` → tohumlar ve aynı hesapla çöküş. Tur sürüyorsa yalnız `tohumOzet` döner (`bitti:false`).\n2. **Saf hesap:** `?sunucuTohumu&istemciTohumu&kasaPayi[&tavan]` → çöküş.\n\n`tur` verilirse birinci biçim kullanılır. `cokus` tohumlardan yeniden hesaplanan, `kayitliCokus` turda kaydedilen değerdir; ikisi her zaman aynı olmalıdır.",
        "security": [],
        "x-dene": true,
        "parameters": [
          {
            "name": "tur",
            "in": "query",
            "required": false,
            "description": "Tur numarası (pozitif tam sayı). `operator` ile birlikte.",
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "example": 48213
          },
          {
            "name": "operator",
            "in": "query",
            "required": false,
            "description": "Operatör kodu (`tur` ile birlikte zorunlu).",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]{2,40}$"
            },
            "example": "ornek-site"
          },
          {
            "name": "sunucuTohumu",
            "in": "query",
            "required": false,
            "description": "Saf hesap: sunucu tohumu (8–128 karakter).",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          },
          {
            "name": "istemciTohumu",
            "in": "query",
            "required": false,
            "description": "Saf hesap: istemci tohumu (8–128 karakter).",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          },
          {
            "name": "kasaPayi",
            "in": "query",
            "required": false,
            "description": "Saf hesap: kasa payı (%), 0–15.",
            "schema": {
              "type": "number",
              "minimum": 0,
              "maximum": 15
            }
          },
          {
            "name": "tavan",
            "in": "query",
            "required": false,
            "description": "Saf hesap: çarpan tavanı, 1–10000.",
            "schema": {
              "type": "number",
              "minimum": 1,
              "maximum": 10000,
              "default": 10000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Doğrulama sonucu.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/DogrulaTurBitti"
                    },
                    {
                      "$ref": "#/components/schemas/DogrulaTurSuruyor"
                    },
                    {
                      "$ref": "#/components/schemas/DogrulaSaf"
                    }
                  ]
                },
                "examples": {
                  "turBitti": {
                    "summary": "Biten tur",
                    "value": {
                      "tamam": true,
                      "tur": 48213,
                      "bitti": true,
                      "tohumOzet": "c001faea70fc74477a2c7d8073a4d3a2444414c7cb6fdd32dfbae21abeb9b256",
                      "tohum": "7c2e0b5a9d41f3e8a6b1c0d9e2f3a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5",
                      "istemciTohum": "8b6ea82bb9129a7aa2797d4c3e1ae26dbea87dacf11425819cec8c3e271be04f",
                      "kasaPayi": 3,
                      "tavan": 500,
                      "cokus": 16.65,
                      "kayitliCokus": 16.65
                    }
                  },
                  "turSuruyor": {
                    "summary": "Tur sürüyor",
                    "value": {
                      "tamam": true,
                      "tur": 48214,
                      "bitti": false,
                      "tohumOzet": "5e0c2b6f1a9d3e7c4b8a0f2d6e1c9b3a7f5d0e2c8b4a6f1d3e9c7b5a0f2e4d6c"
                    }
                  },
                  "saf": {
                    "summary": "Saf hesap",
                    "value": {
                      "tamam": true,
                      "cokus": 16.65,
                      "kasaPayi": 3,
                      "tavan": 500
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Gecersiz"
          },
          "404": {
            "$ref": "#/components/responses/Bulunamadi"
          },
          "500": {
            "$ref": "#/components/responses/Sunucu"
          }
        }
      }
    },
    "/api/yonetim/ozet": {
      "get": {
        "tags": [
          "Yönetim"
        ],
        "operationId": "yonetimOzet",
        "summary": "Bugünün özeti",
        "description": "Bugünkü (İstanbul günü) bahis, kazanç, GGR, RTP; açık tur; operatör bilgisi; son 30 günde bekleyen ve vazgeçilen cüzdan çağrısı sayısı.",
        "x-dene": true,
        "responses": {
          "200": {
            "description": "Özet.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ozet"
                },
                "example": {
                  "bugun": {
                    "bahisAdet": 1240,
                    "bahisToplam": 3650000,
                    "kazancToplam": 3420000,
                    "ggr": 230000,
                    "rtp": 93.7
                  },
                  "acikTur": {
                    "no": 48214,
                    "faz": "UCUS"
                  },
                  "bekleyenCagri": 0,
                  "vazgecilenCagri": 0,
                  "operator": {
                    "kod": "ornek-site",
                    "ad": "Örnek Site",
                    "aktif": true,
                    "test": true,
                    "paraBirimi": "TRY"
                  },
                  "oyunAlani": "play.ormicast.store"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Imza"
          },
          "403": {
            "$ref": "#/components/responses/Yasak"
          },
          "500": {
            "$ref": "#/components/responses/Sunucu"
          }
        }
      }
    },
    "/api/yonetim/operator": {
      "get": {
        "tags": [
          "Yönetim"
        ],
        "operationId": "yonetimOperator",
        "summary": "Operatör kaydı",
        "description": "Operatör kaydınız (şifre hariç).",
        "x-dene": true,
        "responses": {
          "200": {
            "description": "Kayıt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operator"
                },
                "example": {
                  "id": 3,
                  "kod": "ornek-site",
                  "ad": "Örnek Site",
                  "geriUrl": "https://api.site.ornek/zflow/cuzdan",
                  "bildirimUrl": "https://api.site.ornek/anka/bildirim",
                  "paraBirimi": "TRY",
                  "ggrOrani": 10,
                  "aktif": true,
                  "test": true,
                  "izinliIpler": [
                    "203.0.113.10"
                  ],
                  "ayar": {},
                  "olusturma": "2026-11-05T09:12:44.120Z"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Imza"
          },
          "403": {
            "$ref": "#/components/responses/Yasak"
          },
          "500": {
            "$ref": "#/components/responses/Sunucu"
          }
        }
      }
    },
    "/api/yonetim/ayar": {
      "get": {
        "tags": [
          "Yönetim"
        ],
        "operationId": "ayarOku",
        "summary": "Oyun ayarını oku",
        "description": "Tam ayar (eksik alanlar varsayılanla doldurulmuş).",
        "x-dene": true,
        "responses": {
          "200": {
            "description": "Ayar.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ayar"
                  ],
                  "properties": {
                    "ayar": {
                      "$ref": "#/components/schemas/Ayar"
                    }
                  }
                },
                "examples": {
                  "varsayilan": {
                    "$ref": "#/components/examples/AyarCevabi"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Imza"
          },
          "403": {
            "$ref": "#/components/responses/Yasak"
          },
          "500": {
            "$ref": "#/components/responses/Sunucu"
          }
        }
      },
      "put": {
        "tags": [
          "Yönetim"
        ],
        "operationId": "ayarYaz",
        "summary": "Oyun ayarını yaz",
        "description": "**Tam ayar** gönderin: gönderilmeyen alanlar mevcut değere değil **varsayılana** döner. Önce `GET` ile okuyun, değiştirin, sonra `PUT` edin. `riskGruplari` gönderilirse dört grup da eksiksiz olmalıdır.\n\nRTP: sağlayıcının izin verdiği seçeneklerden biri seçilir (Hürkuş: %95 · %96 · %97, varsayılan %97); `kasaPayi = 100 − RTP`. Sınırlar (risk grupları, çarpan tavanı, tur ve pozisyon tavanı, günlük tavan) yalnız sağlayıcının koyduğu üst sınırın **altına** çekilebilir; aşan değer reddedilir. Değişiklik bir sonraki turdan geçerlidir, geçmişe yazılır ve bağlı oyunculara yayınlanır.",
        "x-dene": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AyarYazIstegi"
              },
              "examples": {
                "kapat": {
                  "summary": "Oyunu kapat (diğer alanlar varsayılan)",
                  "value": {
                    "ayar": {
                      "acik": false
                    },
                    "kim": "ayse@site.ornek"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Yazılan tam ayar.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ayar"
                  ],
                  "properties": {
                    "ayar": {
                      "$ref": "#/components/schemas/Ayar"
                    }
                  }
                },
                "examples": {
                  "varsayilan": {
                    "$ref": "#/components/examples/AyarCevabi"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Gecersiz"
          },
          "401": {
            "$ref": "#/components/responses/Imza"
          },
          "403": {
            "$ref": "#/components/responses/Yasak"
          },
          "415": {
            "$ref": "#/components/responses/GovdeTuru"
          },
          "500": {
            "$ref": "#/components/responses/Sunucu"
          }
        }
      }
    },
    "/api/yonetim/ayar-gecmisi": {
      "get": {
        "tags": [
          "Yönetim"
        ],
        "operationId": "ayarGecmisi",
        "summary": "Ayar geçmişi",
        "description": "Son ayar değişiklikleri, yeniden eskiye. `once` ilk yazımda `null`'dır.",
        "x-dene": true,
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit50_200"
          }
        ],
        "responses": {
          "200": {
            "description": "Geçmiş.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AyarGecmisiSatiri"
                  }
                },
                "example": [
                  {
                    "id": 41,
                    "kim": "ayse@site.ornek",
                    "zaman": "2026-11-05T10:02:11.000Z",
                    "once": null,
                    "sonra": {
                      "acik": true,
                      "kasaPayi": 3
                    }
                  }
                ]
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Imza"
          },
          "403": {
            "$ref": "#/components/responses/Yasak"
          },
          "500": {
            "$ref": "#/components/responses/Sunucu"
          }
        }
      }
    },
    "/api/yonetim/turlar": {
      "get": {
        "tags": [
          "Yönetim"
        ],
        "operationId": "turlar",
        "summary": "Tur listesi",
        "description": "Turlar, yeniden eskiye. Sayfalama: bir önceki sayfanın son `no` değerini `once` ile gönderin.",
        "x-dene": true,
        "parameters": [
          {
            "name": "once",
            "in": "query",
            "required": false,
            "description": "Bu numaradan küçük turlar.",
            "schema": {
              "type": "integer"
            },
            "example": 48214
          },
          {
            "$ref": "#/components/parameters/Limit50_200"
          }
        ],
        "responses": {
          "200": {
            "description": "Turlar.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TurSatiri"
                  }
                },
                "example": [
                  {
                    "no": 48213,
                    "durum": "COKUS",
                    "cokus": 16.65,
                    "bahisAdet": 37,
                    "bahisToplam": 184000,
                    "kazancToplam": 152300,
                    "baslangic": "2026-11-05T10:14:05.120Z",
                    "bitis": "2026-11-05T10:14:29.410Z",
                    "tohumOzet": "c001faea70fc74477a2c7d8073a4d3a2444414c7cb6fdd32dfbae21abeb9b256"
                  }
                ]
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Imza"
          },
          "403": {
            "$ref": "#/components/responses/Yasak"
          },
          "500": {
            "$ref": "#/components/responses/Sunucu"
          }
        }
      }
    },
    "/api/yonetim/tur/{no}": {
      "get": {
        "tags": [
          "Yönetim"
        ],
        "operationId": "turDetayi",
        "summary": "Tur ayrıntısı",
        "description": "Turun tohumları, zamanları ve turdaki bahisler (demo hariç). Tur bitmeden `cokus`, `tohum` ve `cokusZaman` `null` döner.",
        "x-dene": true,
        "parameters": [
          {
            "name": "no",
            "in": "path",
            "required": true,
            "description": "Tur numarası.",
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "example": 48213
          }
        ],
        "responses": {
          "200": {
            "description": "Tur ve bahisleri.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TurDetayi"
                },
                "example": {
                  "tur": {
                    "no": 48213,
                    "durum": "COKUS",
                    "cokus": 16.65,
                    "tohumOzet": "c001faea70fc74477a2c7d8073a4d3a2444414c7cb6fdd32dfbae21abeb9b256",
                    "tohum": "7c2e0b5a9d41f3e8a6b1c0d9e2f3a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5",
                    "istemciTohum": "8b6ea82bb9129a7aa2797d4c3e1ae26dbea87dacf11425819cec8c3e271be04f",
                    "kasaPayi": 3,
                    "k": 0.11552453009332421,
                    "tavan": 500,
                    "bahisBitis": "2026-11-05T10:14:05.000Z",
                    "baslangic": "2026-11-05T10:14:05.120Z",
                    "cokusZaman": "2026-11-05T10:14:29.410Z",
                    "bitis": "2026-11-05T10:14:29.410Z",
                    "bahisAdet": 37,
                    "bahisToplam": 184000,
                    "kazancToplam": 152300
                  },
                  "bahisler": [
                    {
                      "id": 905112,
                      "oyuncu": "u12345",
                      "risk": "normal",
                      "kutu": 1,
                      "tutar": 5000,
                      "oto": 2.5,
                      "durum": "birakti",
                      "carpan": 2.37,
                      "kazanc": 11850,
                      "birakmaKaynagi": "oto",
                      "olusturma": "2026-11-05T10:14:02.871Z"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Gecersiz"
          },
          "401": {
            "$ref": "#/components/responses/Imza"
          },
          "403": {
            "$ref": "#/components/responses/Yasak"
          },
          "404": {
            "$ref": "#/components/responses/Bulunamadi"
          },
          "500": {
            "$ref": "#/components/responses/Sunucu"
          }
        }
      }
    },
    "/api/yonetim/rapor": {
      "get": {
        "tags": [
          "Yönetim"
        ],
        "operationId": "rapor",
        "summary": "RTP / GGR raporu",
        "description": "Sonuçlanmış bahisler (bırakılan ya da kaybeden) üzerinden kırılımlı rapor. Tarihler İstanbul günüdür, `bit` dahildir; en çok 500 satır. `sapma`: en az 200 bahis ve |rtp − beklenen| > `rtpSapmaUyari`.",
        "x-dene": true,
        "parameters": [
          {
            "name": "bas",
            "in": "query",
            "required": true,
            "description": "Başlangıç günü.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "example": "2026-11-01"
          },
          {
            "name": "bit",
            "in": "query",
            "required": true,
            "description": "Bitiş günü (dahil).",
            "schema": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
            },
            "example": "2026-11-05"
          },
          {
            "name": "kirilim",
            "in": "query",
            "required": false,
            "description": "Kırılım.",
            "schema": {
              "type": "string",
              "enum": [
                "gun",
                "saat",
                "oyuncu",
                "risk"
              ],
              "default": "gun"
            },
            "example": "gun"
          }
        ],
        "responses": {
          "200": {
            "description": "Rapor.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Rapor"
                },
                "example": {
                  "beklenenRtp": 97,
                  "satirlar": [
                    {
                      "anahtar": "2026-11-05",
                      "bahisAdet": 1240,
                      "bahisToplam": 3650000,
                      "kazancToplam": 3420000,
                      "ggr": 230000,
                      "rtp": 93.7,
                      "sapma": false
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Gecersiz"
          },
          "401": {
            "$ref": "#/components/responses/Imza"
          },
          "403": {
            "$ref": "#/components/responses/Yasak"
          },
          "500": {
            "$ref": "#/components/responses/Sunucu"
          }
        }
      }
    },
    "/api/yonetim/oyuncular": {
      "get": {
        "tags": [
          "Yönetim"
        ],
        "operationId": "oyuncular",
        "summary": "Oyuncu listesi",
        "description": "Son görülme sırasıyla oyuncular ve son 7 günün toplamları.",
        "x-dene": true,
        "parameters": [
          {
            "name": "ara",
            "in": "query",
            "required": false,
            "description": "Oyuncu kodunda arama (en çok 64 karakter).",
            "schema": {
              "type": "string",
              "maxLength": 64,
              "default": ""
            },
            "example": "u123"
          },
          {
            "name": "risk",
            "in": "query",
            "required": false,
            "description": "Risk grubu süzgeci.",
            "schema": {
              "$ref": "#/components/schemas/RiskGrubu"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "En çok satır, 1–500.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 50
            },
            "example": 50
          }
        ],
        "responses": {
          "200": {
            "description": "Oyuncular.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OyuncuSatiri"
                  }
                },
                "example": [
                  {
                    "kod": "u12345",
                    "risk": "normal",
                    "sonGorulme": "2026-11-05T10:13:58.000Z",
                    "son7": {
                      "bahisToplam": 245000,
                      "kazancToplam": 231800
                    }
                  }
                ]
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Gecersiz"
          },
          "401": {
            "$ref": "#/components/responses/Imza"
          },
          "403": {
            "$ref": "#/components/responses/Yasak"
          },
          "500": {
            "$ref": "#/components/responses/Sunucu"
          }
        }
      }
    },
    "/api/yonetim/oyuncu/{kod}": {
      "get": {
        "tags": [
          "Yönetim"
        ],
        "operationId": "oyuncuKarti",
        "summary": "Oyuncu kartı",
        "description": "Risk grubu, son 24 saatin toplamları ve son 20 bahis.",
        "x-dene": true,
        "parameters": [
          {
            "$ref": "#/components/parameters/OyuncuKodu"
          }
        ],
        "responses": {
          "200": {
            "description": "Oyuncu kartı.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OyuncuKarti"
                },
                "example": {
                  "oyuncu": {
                    "kod": "u12345",
                    "risk": "normal",
                    "sonBakiye": 245000,
                    "sonGorulme": "2026-11-05T10:13:58.000Z",
                    "olusturma": "2026-11-01T18:40:12.000Z"
                  },
                  "son24": {
                    "bahisAdet": 42,
                    "bahisToplam": 210000,
                    "kazancToplam": 198400,
                    "rtp": 94.48
                  },
                  "sonBahisler": [
                    {
                      "turNo": 48213,
                      "kutu": 1,
                      "tutar": 5000,
                      "carpan": 2.37,
                      "kazanc": 11850,
                      "durum": "birakti",
                      "zaman": "2026-11-05T10:14:02.871Z"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Gecersiz"
          },
          "401": {
            "$ref": "#/components/responses/Imza"
          },
          "403": {
            "$ref": "#/components/responses/Yasak"
          },
          "404": {
            "$ref": "#/components/responses/Bulunamadi"
          },
          "500": {
            "$ref": "#/components/responses/Sunucu"
          }
        }
      }
    },
    "/api/yonetim/oyuncu/{kod}/risk": {
      "put": {
        "tags": [
          "Yönetim"
        ],
        "operationId": "riskAta",
        "summary": "Risk grubu ata",
        "description": "Oyuncunun risk grubunu değiştirir. Grupları bu uçtan yönetiyorsanız `/api/ac` isteğinde `risk` göndermeyin (her açılışta üzerine yazar). 'site' değeri elle verilen grubu kaldırır; sonraki açılışta sitenin gönderdiği grup geçerli olur.",
        "x-dene": true,
        "parameters": [
          {
            "$ref": "#/components/parameters/OyuncuKodu"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "risk"
                ],
                "properties": {
                  "risk": {
                    "type": "string",
                    "enum": [
                      "yeni",
                      "normal",
                      "vip",
                      "supheli",
                      "site"
                    ],
                    "description": "Grup; 'site' = elle verilen grubu kaldır, sitenin açılışta gönderdiği geçerli olsun (§3a)."
                  },
                  "kim": {
                    "$ref": "#/components/schemas/Kim"
                  }
                }
              },
              "example": {
                "risk": "vip",
                "kim": "ayse@site.ornek"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Atandı.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tamam",
                    "risk"
                  ],
                  "properties": {
                    "tamam": {
                      "const": true
                    },
                    "risk": {
                      "$ref": "#/components/schemas/RiskGrubu"
                    }
                  }
                },
                "example": {
                  "tamam": true,
                  "risk": "vip"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Gecersiz"
          },
          "401": {
            "$ref": "#/components/responses/Imza"
          },
          "403": {
            "$ref": "#/components/responses/Yasak"
          },
          "404": {
            "$ref": "#/components/responses/Bulunamadi"
          },
          "415": {
            "$ref": "#/components/responses/GovdeTuru"
          },
          "500": {
            "$ref": "#/components/responses/Sunucu"
          }
        }
      }
    },
    "/api/yonetim/mutabakat": {
      "get": {
        "tags": [
          "Yönetim"
        ],
        "operationId": "mutabakat",
        "summary": "Mutabakat listesi",
        "description": "Bekleyen ya da vazgeçilen cüzdan çağrıları ve reddettiğiniz kazanç/iade çağrıları. Liste boş olmalıdır; kayıtlar sağlayıcıyla birlikte kapatılır.",
        "x-dene": true,
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "En çok satır, 1–500.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            },
            "example": 100
          }
        ],
        "responses": {
          "200": {
            "description": "Kayıtlar.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MutabakatSatiri"
                  }
                },
                "example": [
                  {
                    "id": 77120,
                    "olay": "kazanc",
                    "seri": "h:905112:k",
                    "bahisId": 905112,
                    "tutar": 11850,
                    "deneme": 6,
                    "hata": "HTTP 502",
                    "olusturma": "2026-11-05T10:14:07.000Z",
                    "durum": "bekliyor"
                  }
                ]
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Imza"
          },
          "403": {
            "$ref": "#/components/responses/Yasak"
          },
          "500": {
            "$ref": "#/components/responses/Sunucu"
          }
        }
      }
    },
    "/api/yonetim/varliklar": {
      "get": {
        "tags": [
          "Yönetim"
        ],
        "operationId": "varliklar",
        "summary": "Ses ve görsel yuvaları",
        "description": "Tüm yuvalar: yüklenmiş dosya ya da varsayılan. `url` oyun alanına (`https://play.ormicast.store`) görelidir.",
        "x-dene": true,
        "responses": {
          "200": {
            "description": "Yuvalar.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Varlik"
                  }
                },
                "example": [
                  {
                    "yuva": "muzik",
                    "tur": "ses",
                    "url": "/varsayilan/muzik.mp3",
                    "varsayilan": true,
                    "acik": true,
                    "ses": 0.35,
                    "mime": null,
                    "boyut": null,
                    "guncelleme": null
                  },
                  {
                    "yuva": "logo",
                    "tur": "gorsel",
                    "url": "/varlik/ornek-site/logo-4b1e9c0d2a7f.png",
                    "varsayilan": false,
                    "acik": true,
                    "ses": 1,
                    "mime": "image/png",
                    "boyut": 18342,
                    "guncelleme": "2026-11-05T09:40:00.000Z"
                  }
                ]
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Imza"
          },
          "403": {
            "$ref": "#/components/responses/Yasak"
          },
          "500": {
            "$ref": "#/components/responses/Sunucu"
          }
        }
      }
    },
    "/api/yonetim/varlik/{yuva}": {
      "put": {
        "tags": [
          "Yönetim"
        ],
        "operationId": "varlikYukle",
        "summary": "Varlık yükle (ikili)",
        "description": "Gövde dosyanın kendisidir; `Content-Type` dosya türü (ör. `image/png`, `audio/mpeg`). Seçenekler `X-Zflow-Varlik-Meta` başlığında JSON olarak gider. Bu istekte imza **boş gövde** üzerinden hesaplanır (`\"<zaman>.\"`). Tür dosya başlığından denetlenir: sesler MP3/OGG, görseller PNG/WEBP (favicon ICO da). Boyut: `muzik` 6 MB, diğer sesler 3 MB, görseller 2 MB, `favicon` 512 KB.",
        "x-dene": false,
        "x-imza-bos-govde": true,
        "x-ikili-dosya": "ucak.png",
        "parameters": [
          {
            "$ref": "#/components/parameters/Yuva"
          },
          {
            "name": "X-Zflow-Varlik-Meta",
            "in": "header",
            "required": false,
            "description": "JSON: `{\"kim\":\"…\",\"acik\":true,\"ses\":0.8}` (hepsi isteğe bağlı).",
            "schema": {
              "type": "string"
            },
            "example": "{\"kim\":\"ayse@site.ornek\",\"acik\":true}"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "image/png": {
              "schema": {
                "type": "string",
                "contentMediaType": "image/png"
              }
            },
            "image/webp": {
              "schema": {
                "type": "string",
                "contentMediaType": "image/webp"
              }
            },
            "image/x-icon": {
              "schema": {
                "type": "string",
                "contentMediaType": "image/x-icon"
              }
            },
            "audio/mpeg": {
              "schema": {
                "type": "string",
                "contentMediaType": "audio/mpeg"
              }
            },
            "audio/ogg": {
              "schema": {
                "type": "string",
                "contentMediaType": "audio/ogg"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Yüklenen yuva.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Varlik"
                },
                "example": {
                  "yuva": "ucak",
                  "tur": "gorsel",
                  "url": "/varlik/ornek-site/ucak-9c2f4e1a7b30.png",
                  "varsayilan": false,
                  "acik": true,
                  "ses": 1,
                  "mime": "image/png",
                  "boyut": 412330,
                  "guncelleme": "2026-11-05T10:20:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Gecersiz"
          },
          "401": {
            "$ref": "#/components/responses/Imza"
          },
          "403": {
            "$ref": "#/components/responses/Yasak"
          },
          "415": {
            "$ref": "#/components/responses/GovdeTuru"
          },
          "500": {
            "$ref": "#/components/responses/Sunucu"
          }
        }
      },
      "patch": {
        "tags": [
          "Yönetim"
        ],
        "operationId": "varlikGuncelle",
        "summary": "Varlığı aç/kapat, ses düzeyi",
        "description": "Yalnız yüklenmiş bir varlıkta çalışır; yuva varsayılandaysa `404`.",
        "x-dene": true,
        "parameters": [
          {
            "$ref": "#/components/parameters/Yuva"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "acik": {
                    "type": "boolean"
                  },
                  "ses": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "kim": {
                    "$ref": "#/components/schemas/Kim"
                  }
                }
              },
              "example": {
                "acik": true,
                "ses": 0.6,
                "kim": "ayse@site.ornek"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Güncel yuva.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Varlik"
                },
                "example": {
                  "yuva": "muzik",
                  "tur": "ses",
                  "url": "/varlik/ornek-site/muzik-1a2b3c4d5e6f.mp3",
                  "varsayilan": false,
                  "acik": true,
                  "ses": 0.6,
                  "mime": "audio/mpeg",
                  "boyut": 2210043,
                  "guncelleme": "2026-11-05T09:40:00.000Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Gecersiz"
          },
          "401": {
            "$ref": "#/components/responses/Imza"
          },
          "403": {
            "$ref": "#/components/responses/Yasak"
          },
          "404": {
            "$ref": "#/components/responses/Bulunamadi"
          },
          "500": {
            "$ref": "#/components/responses/Sunucu"
          }
        }
      },
      "delete": {
        "tags": [
          "Yönetim"
        ],
        "operationId": "varlikSil",
        "summary": "Varsayılana dön",
        "description": "Yüklenen dosyayı siler; yuva varsayılana döner. Yuva zaten varsayılandaysa da `200` ile varsayılan satırı döner.",
        "x-dene": true,
        "parameters": [
          {
            "$ref": "#/components/parameters/Yuva"
          }
        ],
        "responses": {
          "200": {
            "description": "Varsayılan yuva.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Varlik"
                },
                "example": {
                  "yuva": "ucak",
                  "tur": "gorsel",
                  "url": "/varsayilan/ucak.png",
                  "varsayilan": true,
                  "acik": true,
                  "ses": 1,
                  "mime": null,
                  "boyut": null,
                  "guncelleme": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Gecersiz"
          },
          "401": {
            "$ref": "#/components/responses/Imza"
          },
          "403": {
            "$ref": "#/components/responses/Yasak"
          },
          "500": {
            "$ref": "#/components/responses/Sunucu"
          }
        }
      }
    },
    "/api/yonetim/tema": {
      "get": {
        "tags": [
          "Yönetim"
        ],
        "operationId": "temaOku",
        "summary": "Görünüm (tema, yazı tipi, ad, metinler)",
        "description": "Oyun ekranının renkleri, yazı tipi, gösterim adı ve arayüz metinleri.",
        "x-dene": true,
        "responses": {
          "200": {
            "description": "Görünüm.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gorunum"
                },
                "example": {
                  "tema": {
                    "zemin": "#3D113C",
                    "isin": "#4a1649",
                    "egri": "#FCCD43",
                    "ucak": "#FCCD43",
                    "carpan": "#ffffff",
                    "cokus": "#E5484D",
                    "dugmeBahis": "#28a909",
                    "dugmeBirak": "#FCCD43",
                    "panel": "#1f081f",
                    "cizgi": "#55255a"
                  },
                  "font": "Montserrat",
                  "ad": "Hürkuş K-VI",
                  "metinler": {}
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Imza"
          },
          "403": {
            "$ref": "#/components/responses/Yasak"
          },
          "500": {
            "$ref": "#/components/responses/Sunucu"
          }
        }
      },
      "put": {
        "tags": [
          "Yönetim"
        ],
        "operationId": "temaYaz",
        "summary": "Görünümü yaz",
        "description": "Gönderilen alanlar değişir. `tema` gönderilirse tema tamamen bununla değişir (geçersiz renk ya da bilinmeyen anahtar atılır, eksikler varsayılana döner); `metinler` için de aynı kural. Renk `#RRGGBB`; `font` ≤ 60, `ad` ≤ 40 karakter; metin anahtarı 2–40 harf, değer ≤ 200.",
        "x-dene": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tema": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "font": {
                    "type": "string"
                  },
                  "ad": {
                    "type": "string"
                  },
                  "metinler": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "kim": {
                    "$ref": "#/components/schemas/Kim"
                  }
                }
              },
              "example": {
                "tema": {
                  "dugmeBahis": "#E50539"
                },
                "metinler": {
                  "nakitCek": "Çek"
                },
                "kim": "ayse@site.ornek"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Güncel görünüm.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Gorunum"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Gecersiz"
          },
          "401": {
            "$ref": "#/components/responses/Imza"
          },
          "403": {
            "$ref": "#/components/responses/Yasak"
          },
          "415": {
            "$ref": "#/components/responses/GovdeTuru"
          },
          "500": {
            "$ref": "#/components/responses/Sunucu"
          }
        }
      }
    }
  },
  "webhooks": {
    "cuzdan": {
      "post": {
        "tags": [
          "Cüzdan geri çağrısı"
        ],
        "operationId": "cuzdanGeriCagrisi",
        "summary": "Cüzdan geri çağrısı (operatör uygular)",
        "description": "Oyun bu isteği **sizin** geri çağrı adresinize (`geriUrl`: oturumdaki, yoksa kaydınızdaki) gönderir. Kaynak IP `2.31.112.61`. İmza başlıkları sizin şifrenizle aynı kuralla hesaplanır; ham gövdeyi çözmeden doğrulayın, ardından `operator` alanının kendi kodunuz olduğunu denetleyin.\n\nCevap **her zaman HTTP 200** ve JSON olmalıdır. 200 dışı durum, JSON olmayan gövde, `tamam` alanı olmayan gövde, sayısal `bakiye` içermeyen başarı, ağ hatası ve zaman aşımı **geçici** sayılır. Tanınmayan `hata` kodu `red` sayılır; `mesaj` 200 karaktere kesilir.\n\nZaman aşımı: `bakiye` 4 sn (tek deneme), `bahis` 4 sn (**tek atış**; cevapsızsa bahis başarısız sayılır ve `iade` kuyruğa yazılır), `kazanc`/`iade` deneme başına 8 sn; 2, 5, 15, 60, 300 sn ve sonra her 300 sn yeniden; 24 saat sonra `vazgecildi` → mutabakat. `gecici` ve `imza` cevapları yeniden denenir, diğer kodlar kesin rettir.\n\n**Tekillik:** aynı `seri` ikinci kez gelirse para oynatmayın; ilk sonucu güncel bakiyeyle dönün. Gövdedeki `zaman` her denemede tazelenir.",
        "security": [
          {
            "ZflowOperator": [],
            "ZflowZaman": [],
            "ZflowImza": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CuzdanBakiye"
                  },
                  {
                    "$ref": "#/components/schemas/CuzdanBahis"
                  },
                  {
                    "$ref": "#/components/schemas/CuzdanKazanc"
                  },
                  {
                    "$ref": "#/components/schemas/CuzdanIade"
                  }
                ],
                "discriminator": {
                  "propertyName": "olay"
                }
              },
              "examples": {
                "bakiye": {
                  "summary": "bakiye · para oynatmaz",
                  "value": {
                    "olay": "bakiye",
                    "operator": "ornek-site",
                    "oyuncu": "u12345",
                    "oyun": "hurkus",
                    "zaman": 1793880000000,
                    "paraBirimi": "TRY"
                  }
                },
                "bahis": {
                  "summary": "bahis · tutarı düşün",
                  "value": {
                    "olay": "bahis",
                    "operator": "ornek-site",
                    "oyuncu": "u12345",
                    "oyun": "hurkus",
                    "zaman": 1793880000000,
                    "paraBirimi": "TRY",
                    "tur": "48213",
                    "seri": "h:905112:b",
                    "tutar": 5000
                  }
                },
                "kazanc": {
                  "summary": "kazanc · tutarı yatırın",
                  "value": {
                    "olay": "kazanc",
                    "operator": "ornek-site",
                    "oyuncu": "u12345",
                    "oyun": "hurkus",
                    "tur": "48213",
                    "seri": "h:905112:k",
                    "zaman": 1793880007000,
                    "paraBirimi": "TRY",
                    "tutar": 11850
                  }
                },
                "iade": {
                  "summary": "iade · bahsi geri verin",
                  "value": {
                    "olay": "iade",
                    "operator": "ornek-site",
                    "oyuncu": "u12345",
                    "oyun": "hurkus",
                    "tur": "48213",
                    "seri": "h:905112:i",
                    "zaman": 1793880002000,
                    "paraBirimi": "TRY",
                    "tutar": 5000,
                    "asilSeri": "h:905112:b"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Her durumda 200. Başarıda `bakiye` zorunludur.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CuzdanCevabi"
                },
                "examples": {
                  "basari": {
                    "summary": "Başarı",
                    "value": {
                      "tamam": true,
                      "bakiye": 245000
                    }
                  },
                  "yetersiz": {
                    "summary": "Bakiye yetersiz",
                    "value": {
                      "tamam": false,
                      "hata": "yetersiz",
                      "bakiye": 3000,
                      "mesaj": "Bakiye yetersiz"
                    }
                  },
                  "oyuncu": {
                    "summary": "Oyuncu kısıtlı",
                    "value": {
                      "tamam": false,
                      "hata": "oyuncu",
                      "bakiye": 245000,
                      "mesaj": "Hesabınız geçici olarak kısıtlı"
                    }
                  },
                  "gecici": {
                    "summary": "Geçici sorun (yeniden denenir)",
                    "value": {
                      "tamam": false,
                      "hata": "gecici",
                      "mesaj": "Geçici sorun"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "olayBildirimi": {
      "post": {
        "tags": [
          "Olay bildirimi"
        ],
        "operationId": "olayBildirimi",
        "summary": "Olay bildirimi (operatör uygular)",
        "description": "Sağlayıcı → site anında eşitleme. Kaydınızdaki `bildirimUrl` adresine gönderilir (iş ortağı panelinde Entegrasyon sayfasından girilir); boşsa aynı gövde cüzdan geri çağrı adresinize gider. Kaynak IP `2.31.112.61`, imza başlıkları cüzdan çağrısıyla aynıdır.\n\nCevap: `200 {\"tamam\":true}`. Başka her cevap (200 dışı, gövdesiz, `tamam:false`, zaman aşımı) yeniden denenir: 2, 5, 15, 60, 300 sn ve sonra her 300 sn; 24 saat sonra `vazgecildi`. Teslim günlüğü iş ortağı panelindedir.\n\n**Tekillik:** aynı olay yeniden denemede aynı `olay_id` ile gelir; `olay_id`'yi benzersiz anahtar olarak saklayın ve tekrar gelirse yalnız `{tamam:true}` dönün. Olaylar sırasız gelebilir; `oyun.*` olaylarında `oyun.surum` değeri elinizdekinden küçükse yok sayın.\n\nÖnerilen işleme: `oyun.durum` `bakim`/`kapali` → oyunu lobiden gizleyin; `acik` → gösterin. `oyun.eklendi`/`oyun.guncellendi` → kataloğu yenileyin. `bakim.*` ve `duyuru` → personel ekranınızda gösterin. Katalog yine doğruluk kaynağıdır: bildirime ek olarak kataloğu 5 dakikada bir çekin.",
        "security": [
          {
            "ZflowOperator": [],
            "ZflowZaman": [],
            "ZflowImza": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OlayBildirimi"
              },
              "examples": {
                "oyunDurum": {
                  "summary": "oyun.durum · bakım",
                  "value": {
                    "tur": "oyun.durum",
                    "olay_id": "ev_000184213",
                    "zaman": 1793880000000,
                    "operator": "ornek-site",
                    "veri": {
                      "disKod": "hurkus",
                      "durum": "bakim",
                      "bitis": "2026-11-06T03:00:00.000Z",
                      "mesaj": "Planlı bakım"
                    }
                  }
                },
                "oyunEklendi": {
                  "$ref": "#/components/examples/BildirimOyunEklendi"
                },
                "oyunGuncellendi": {
                  "$ref": "#/components/examples/BildirimOyunGuncellendi"
                },
                "bakimPlanlandi": {
                  "summary": "bakim.planlandi",
                  "value": {
                    "tur": "bakim.planlandi",
                    "olay_id": "ev_000184216",
                    "zaman": 1793880180000,
                    "operator": "ornek-site",
                    "veri": {
                      "id": 12,
                      "bas": "2026-11-06T02:00:00.000Z",
                      "bit": "2026-11-06T03:00:00.000Z",
                      "oyunlar": "hepsi",
                      "mesaj": "Sunucu bakımı"
                    }
                  }
                },
                "bakimBasladi": {
                  "summary": "bakim.basladi",
                  "value": {
                    "tur": "bakim.basladi",
                    "olay_id": "ev_000184217",
                    "zaman": 1793883600000,
                    "operator": "ornek-site",
                    "veri": {
                      "id": 12
                    }
                  }
                },
                "bakimBitti": {
                  "summary": "bakim.bitti",
                  "value": {
                    "tur": "bakim.bitti",
                    "olay_id": "ev_000184218",
                    "zaman": 1793887200000,
                    "operator": "ornek-site",
                    "veri": {
                      "id": 12
                    }
                  }
                },
                "duyuru": {
                  "summary": "duyuru",
                  "value": {
                    "tur": "duyuru",
                    "olay_id": "ev_000184219",
                    "zaman": 1793880240000,
                    "operator": "ornek-site",
                    "veri": {
                      "id": 7,
                      "seviye": "bilgi",
                      "baslik": "Yeni oyun yakında",
                      "metin": "Kaan temalı yeni crash oyunu Aralık'ta katalogda.",
                      "bitis": "2026-12-01T00:00:00.000Z"
                    }
                  }
                },
                "anahtarYenilendi": {
                  "summary": "anahtar.yenilendi",
                  "value": {
                    "tur": "anahtar.yenilendi",
                    "olay_id": "ev_000184220",
                    "zaman": 1793880300000,
                    "operator": "ornek-site",
                    "veri": {}
                  }
                },
                "deneme": {
                  "summary": "deneme",
                  "value": {
                    "tur": "deneme",
                    "olay_id": "ev_000184221",
                    "zaman": 1793880360000,
                    "operator": "ornek-site",
                    "veri": {}
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Alındı. Başka her cevap yeniden denenir.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "tamam"
                  ],
                  "properties": {
                    "tamam": {
                      "const": true
                    }
                  }
                },
                "example": {
                  "tamam": true
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ZflowOperator": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Zflow-Operator",
        "description": "Operatör kodunuz (küçük harf, rakam, tire; 2–40)."
      },
      "ZflowZaman": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Zflow-Zaman",
        "description": "İstek zamanı, Unix epoch **milisaniye** (ör. `1793880000000`). Pencere ±60 sn; sunucu saatinizi NTP ile eşleyin."
      },
      "ZflowImza": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Zflow-Imza",
        "description": "`hex(HMAC-SHA256(anahtar = şifre, ileti = X-Zflow-Zaman + \".\" + hamGövde))`, 64 karakter. hamGövde kabloda giden gövdenin bayt bayt kendisidir; gövdesiz istekte boş dizgi (`\"1793880000000.\"`). İmzadan sonra JSON'u yeniden serileştirmeyin. Test vektörü: şifre `ornek-sifre`, zaman `1793880000000`, boş gövde → `4dd0445651a23261f01f7230b32056bfb4e733a3f91e190d781f71adf03131a4`."
      }
    },
    "parameters": {
      "Limit50_200": {
        "name": "limit",
        "in": "query",
        "required": false,
        "description": "En çok satır, 1–200.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 200,
          "default": 50
        },
        "example": 50
      },
      "OyuncuKodu": {
        "name": "kod",
        "in": "path",
        "required": true,
        "description": "Oyuncu kodu (1–64).",
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        },
        "example": "u12345"
      },
      "Yuva": {
        "name": "yuva",
        "in": "path",
        "required": true,
        "description": "Varlık yuvası.",
        "schema": {
          "$ref": "#/components/schemas/YuvaAdi"
        },
        "example": "ucak"
      }
    },
    "responses": {
      "Gecersiz": {
        "description": "Alan doğrulaması başarısız (`gecersiz`, `mesaj` alanı ve kuralı söyler), gövde JSON değil (`govde_bozuk`) ya da para birimi kaydınızla aynı değil (`para_birimi`).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Hata"
            },
            "examples": {
              "gecersiz": {
                "summary": "gecersiz",
                "value": {
                  "tamam": false,
                  "hata": "gecersiz",
                  "mesaj": "oyuncu: invalid_type"
                }
              },
              "govdeBozuk": {
                "summary": "govde_bozuk",
                "value": {
                  "tamam": false,
                  "hata": "govde_bozuk",
                  "mesaj": "JSON çözülemedi"
                }
              },
              "paraBirimi": {
                "summary": "para_birimi",
                "value": {
                  "tamam": false,
                  "hata": "para_birimi",
                  "mesaj": "operatör TRY, istek EUR"
                }
              }
            }
          }
        }
      },
      "Imza": {
        "description": "Başlık yok, operatör tanınmadı ya da imza tutmadı. `mesaj`: `X-Zflow-Operator başlığı yok`, `operatör ya da imza tanınmadı`, `imza_yok`, `zaman_gecersiz`, `imza_tutmadi`, `eski_zaman`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Hata"
            },
            "examples": {
              "tutmadi": {
                "summary": "imza_tutmadi",
                "value": {
                  "tamam": false,
                  "hata": "imza",
                  "mesaj": "imza_tutmadi"
                }
              },
              "eski": {
                "summary": "eski_zaman",
                "value": {
                  "tamam": false,
                  "hata": "imza",
                  "mesaj": "eski_zaman"
                }
              }
            }
          }
        }
      },
      "Yasak": {
        "description": "Operatör kaydı kapalı (`kapali`) ya da istek izinli olmayan bir IP adresinden geldi (`ip`).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Hata"
            },
            "examples": {
              "kapali": {
                "summary": "kapali",
                "value": {
                  "tamam": false,
                  "hata": "kapali",
                  "mesaj": "operatör kapalı"
                }
              },
              "ip": {
                "summary": "ip",
                "value": {
                  "tamam": false,
                  "hata": "ip",
                  "mesaj": "izinli olmayan IP"
                }
              }
            }
          }
        }
      },
      "Bulunamadi": {
        "description": "Tur, oyuncu, yuva ya da uç bulunamadı.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Hata"
            },
            "example": {
              "tamam": false,
              "hata": "bulunamadi",
              "mesaj": "tur yok"
            }
          }
        }
      },
      "GovdeTuru": {
        "description": "Gövde `application/json` değil.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Hata"
            },
            "example": {
              "tamam": false,
              "hata": "gecersiz",
              "mesaj": "gövde application/json olmalı"
            }
          }
        }
      },
      "Sunucu": {
        "description": "Beklenmeyen sunucu hatası; yeniden deneyin, sürerse destekle iletişime geçin.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Hata"
            },
            "example": {
              "tamam": false,
              "hata": "kaynak_hatasi"
            }
          }
        }
      },
      "Bakim": {
        "description": "Oyun bakımda. Oyunu lobide gizleyin; `bitis` geldiğinde ya da `oyun.durum` `acik` bildirimi gelince yeniden gösterin.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BakimHatasi"
            },
            "example": {
              "tamam": false,
              "hata": "bakim",
              "mesaj": "Kısa süreli bakım",
              "bitis": "2026-11-06T03:00:00.000Z"
            }
          }
        }
      }
    },
    "examples": {
      "KatalogCevabi": {
        "summary": "Tek oyun",
        "value": {
          "tamam": true,
          "oyunlar": [
            {
              "disKod": "hurkus",
              "ad": "Hürkuş K-VI",
              "studyo": "Anka Gaming",
              "studyoLogo": "https://play.ormicast.store/anka/logo.png",
              "studyoIsaret": "https://play.ormicast.store/anka/isaret.png",
              "tur": "crash",
              "kategori": "Crash",
              "aciklama": "Uçak havalanır, çarpan yükselir; uçak gitmeden önce parayı çek. İki bahis, otomatik bahis ve otomatik bırakma, kanıtlanabilir adalet.",
              "gorsel": "https://play.ormicast.store/oyun-gorsel/hurkus-kare-3f9a1c0b7d2e.webp",
              "gorselDikey": "https://play.ormicast.store/oyun-gorsel/hurkus-dikey-8b41e07a9c13.webp",
              "gorselYatay": "https://play.ormicast.store/oyun-gorsel/hurkus-yatay-c27d5e90f4a8.webp",
              "gorselHareketli": null,
              "rtp": 97,
              "oynaklik": "yuksek",
              "enAzBahis": 100,
              "enCokBahis": 100000,
              "enCokCarpan": 500,
              "paraBirimleri": [
                "TRY"
              ],
              "diller": [
                "tr",
                "en"
              ],
              "demo": true,
              "mobil": true,
              "masaustu": true,
              "cikis": "2026-11-05",
              "etiketler": [
                "yeni"
              ],
              "ozellikler": [
                "iki_bahis",
                "otomatik_bahis",
                "otomatik_birakma",
                "kanitlanabilir_adalet",
                "canli_bahisler"
              ],
              "durum": "acik",
              "surum": 3,
              "guncelleme": "2026-11-05T09:00:00.000Z"
            }
          ]
        }
      },
      "BildirimOyunEklendi": {
        "summary": "oyun.eklendi",
        "value": {
          "tur": "oyun.eklendi",
          "olay_id": "ev_000184214",
          "zaman": 1793880060000,
          "operator": "ornek-site",
          "veri": {
            "oyun": {
              "disKod": "hurkus",
              "ad": "Hürkuş K-VI",
              "studyo": "Anka Gaming",
              "studyoLogo": "https://play.ormicast.store/anka/logo.png",
              "studyoIsaret": "https://play.ormicast.store/anka/isaret.png",
              "tur": "crash",
              "kategori": "Crash",
              "aciklama": "Uçak havalanır, çarpan yükselir; uçak gitmeden önce parayı çek. İki bahis, otomatik bahis ve otomatik bırakma, kanıtlanabilir adalet.",
              "gorsel": "https://play.ormicast.store/oyun-gorsel/hurkus-kare-3f9a1c0b7d2e.webp",
              "gorselDikey": null,
              "gorselYatay": null,
              "gorselHareketli": null,
              "rtp": 97,
              "oynaklik": "yuksek",
              "enAzBahis": 100,
              "enCokBahis": 100000,
              "enCokCarpan": 500,
              "paraBirimleri": [
                "TRY"
              ],
              "diller": [
                "tr",
                "en"
              ],
              "demo": true,
              "mobil": true,
              "masaustu": true,
              "cikis": "2026-11-05",
              "etiketler": [
                "yeni"
              ],
              "ozellikler": [
                "iki_bahis",
                "otomatik_bahis",
                "otomatik_birakma",
                "kanitlanabilir_adalet",
                "canli_bahisler"
              ],
              "durum": "acik",
              "surum": 1,
              "guncelleme": "2026-11-05T09:00:00.000Z"
            }
          }
        }
      },
      "BildirimOyunGuncellendi": {
        "summary": "oyun.guncellendi · RTP değişti",
        "value": {
          "tur": "oyun.guncellendi",
          "olay_id": "ev_000184215",
          "zaman": 1793880120000,
          "operator": "ornek-site",
          "veri": {
            "oyun": {
              "disKod": "hurkus",
              "ad": "Hürkuş K-VI",
              "studyo": "Anka Gaming",
              "studyoLogo": "https://play.ormicast.store/anka/logo.png",
              "studyoIsaret": "https://play.ormicast.store/anka/isaret.png",
              "tur": "crash",
              "kategori": "Crash",
              "aciklama": "Uçak havalanır, çarpan yükselir; uçak gitmeden önce parayı çek. İki bahis, otomatik bahis ve otomatik bırakma, kanıtlanabilir adalet.",
              "gorsel": "https://play.ormicast.store/oyun-gorsel/hurkus-kare-3f9a1c0b7d2e.webp",
              "gorselDikey": "https://play.ormicast.store/oyun-gorsel/hurkus-dikey-8b41e07a9c13.webp",
              "gorselYatay": "https://play.ormicast.store/oyun-gorsel/hurkus-yatay-c27d5e90f4a8.webp",
              "gorselHareketli": null,
              "rtp": 96,
              "oynaklik": "yuksek",
              "enAzBahis": 100,
              "enCokBahis": 100000,
              "enCokCarpan": 500,
              "paraBirimleri": [
                "TRY"
              ],
              "diller": [
                "tr",
                "en"
              ],
              "demo": true,
              "mobil": true,
              "masaustu": true,
              "cikis": "2026-11-05",
              "etiketler": [
                "yeni"
              ],
              "ozellikler": [
                "iki_bahis",
                "otomatik_bahis",
                "otomatik_birakma",
                "kanitlanabilir_adalet",
                "canli_bahisler"
              ],
              "durum": "acik",
              "surum": 4,
              "guncelleme": "2026-11-05T11:30:00.000Z"
            }
          }
        }
      },
      "AyarCevabi": {
        "summary": "Varsayılan ayar (temkinli)",
        "value": {
          "ayar": {
            "acik": true,
            "kasaPayi": 3,
            "kasaPayiSaatlik": null,
            "ikiKatSaniye": 6,
            "bahisSuresiSn": 5,
            "cokusBeklemeSn": 3,
            "carpanTavani": 500,
            "turEnCokBahisAdet": 1000,
            "turEnCokBahisTutar": 5000000,
            "pozisyonTavani": 20000000,
            "devralmaEsigiSn": 20,
            "hizliTutarlar": [
              1000,
              2000,
              5000,
              10000
            ],
            "riskGruplari": {
              "yeni": {
                "enAzBahis": 100,
                "enCokBahis": 20000,
                "enCokKazanc": 200000,
                "carpanTavani": 200,
                "otoTavani": 200,
                "gunlukKazancTavani": 1000000
              },
              "normal": {
                "enAzBahis": 100,
                "enCokBahis": 100000,
                "enCokKazanc": 1000000,
                "carpanTavani": 500,
                "otoTavani": 500,
                "gunlukKazancTavani": 5000000
              },
              "vip": {
                "enAzBahis": 100,
                "enCokBahis": 500000,
                "enCokKazanc": 5000000,
                "carpanTavani": 500,
                "otoTavani": 500,
                "gunlukKazancTavani": 20000000
              },
              "supheli": {
                "enAzBahis": 100,
                "enCokBahis": 5000,
                "enCokKazanc": 50000,
                "carpanTavani": 50,
                "otoTavani": 50,
                "gunlukKazancTavani": 200000
              }
            },
            "hiz": {
              "bahisDk": 60,
              "baglantiDk": 20
            },
            "rtpSapmaUyari": 8,
            "buyukKazanc": 500000,
            "metinler": {}
          }
        }
      }
    },
    "schemas": {
      "Hata": {
        "type": "object",
        "required": [
          "tamam",
          "hata"
        ],
        "properties": {
          "tamam": {
            "const": false
          },
          "hata": {
            "type": "string",
            "description": "Kısa hata kodu: `gecersiz`, `govde_bozuk`, `para_birimi`, `imza`, `kapali`, `ip`, `bulunamadi`, `bakim`, `kaynak_hatasi`."
          },
          "mesaj": {
            "type": "string",
            "description": "Ayrıntı (insan için; kodla karşılaştırmayın)."
          }
        }
      },
      "BakimHatasi": {
        "type": "object",
        "required": [
          "tamam",
          "hata",
          "mesaj"
        ],
        "properties": {
          "tamam": {
            "const": false
          },
          "hata": {
            "const": "bakim"
          },
          "mesaj": {
            "type": "string",
            "description": "Oyuncuya gösterilebilir kısa metin."
          },
          "bitis": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Planlanan bitiş (biliniyorsa)."
          }
        }
      },
      "RiskGrubu": {
        "type": "string",
        "enum": [
          "yeni",
          "normal",
          "vip",
          "supheli"
        ],
        "description": "Risk grubu: yeni (ilk kez oynayan: küçük tavanlar) · normal · vip (yüksek tavanlar) · supheli (en dar sınırlar). Sınırlar sağlayıcı konsolunda / iş ortağı panelinde grup başına ayarlanır (§6 riskGruplari); grubu siteniz açılışta gönderir ya da panelden elle verilir (elle verilen üstündür, {risk:'site'} ile siteye bırakılır)."
      },
      "Kim": {
        "type": "string",
        "minLength": 1,
        "maxLength": 80,
        "default": "panel",
        "description": "Değişikliği yapan kişi; geçmişe yazılır."
      },
      "Koken": {
        "type": "string",
        "pattern": "^https?://[a-z0-9.-]+(:\\d{1,5})?$",
        "description": "Köken: `https://alan` ya da `https://alan:kapı`; yol ve joker yok."
      },
      "AcIstegi": {
        "type": "object",
        "required": [
          "oyuncu",
          "paraBirimi"
        ],
        "properties": {
          "oyuncu": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Opak oyuncu kodu. Ad, e-posta, telefon kullanmayın; diğer oyunculara maskeli görünür (`u***45`)."
          },
          "paraBirimi": {
            "type": "string",
            "pattern": "^[A-Za-z]{3,4}$",
            "description": "Kaydınızdaki para birimiyle aynı olmalı (büyük harfe çevrilir); değilse `400 para_birimi`."
          },
          "dil": {
            "type": "string",
            "pattern": "^[A-Za-z]{2}$",
            "default": "tr",
            "description": "Arayüz dili (ISO 639-1)."
          },
          "mobil": {
            "type": "boolean",
            "default": false,
            "description": "Mobil açılış."
          },
          "donusUrl": {
            "type": "string",
            "format": "uri",
            "maxLength": 500,
            "description": "\"Siteye dön\" ve oturum bitti kartının adresi (http/https)."
          },
          "geriUrl": {
            "type": "string",
            "format": "uri",
            "maxLength": 500,
            "description": "Bu oturumun cüzdan geri çağrı adresi. Verilmezse kaydınızdaki adres kullanılır; ikisi de yoksa bahis alınamaz."
          },
          "risk": {
            "$ref": "#/components/schemas/RiskGrubu",
            "description": "Oyuncunun risk grubu (§3a eşleme). Her açılışta gönderin: sitenizdeki kulüp/sadakat seviyesi, risk profili, üye grubu ve yeni üye kuralını bu 4 gruba kendiniz eşlersiniz (öneri: şüpheli > VIP > yeni > normal). Sağlayıcı panelinde elle verilmiş grup varsa bu değer onu ezmez. Göndermezseniz oyuncunun eldeki grubu kalır (ilk açılışta normal)."
          },
          "cerceveler": {
            "type": "array",
            "maxItems": 10,
            "default": [],
            "items": {
              "$ref": "#/components/schemas/Koken"
            },
            "description": "Oyunu iframe'leyebilecek kökenler (CSP `frame-ancestors`). Boşsa oyun sitenize gömülemez."
          },
          "oyun": {
            "type": "string",
            "enum": [
              "hurkus"
            ],
            "default": "hurkus",
            "description": "Katalogdaki `disKod`."
          },
          "oyuncuAdi": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Oyuncunun sitenizdeki kullanıcı adı. Konsol, iş ortağı paneli ve oyun içi liste (maskeli) oyuncuyu bununla gösterir; verilmezse oyuncu kodu."
          },
          "oyuncuNo": {
            "type": "string",
            "minLength": 1,
            "maxLength": 32,
            "description": "Oyuncunun sitenizdeki üye numarası (panellerde kullanıcı adının yanında)."
          },
          "bildirimUrl": {
            "type": "string",
            "format": "uri",
            "maxLength": 500,
            "description": "Olay bildirim adresiniz (oyun.durum, bakim.*, duyuru). Kayıttakinden farklıysa kaydınız güncellenir: ana alanınız değişince elle bir şey yapmazsınız."
          },
          "siteUrl": {
            "type": "string",
            "format": "uri",
            "maxLength": 500,
            "description": "Sitenizin şu anki adresi (kayıt bilgisi; farklıysa güncellenir)."
          }
        }
      },
      "AcCevabi": {
        "type": "object",
        "required": [
          "tamam",
          "url",
          "oturum",
          "bitis"
        ],
        "properties": {
          "tamam": {
            "const": true
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Oyuncuya özel açılış adresi `https://play.ormicast.store/o/<jeton>`; ilk açılan cihaza bağlanır."
          },
          "oturum": {
            "type": "integer",
            "description": "Oturum numarası (destek ve kayıt için)."
          },
          "bitis": {
            "type": "string",
            "format": "date-time",
            "description": "Jetonun geçerlilik sonu: açılıştan 12 saat sonra."
          }
        }
      },
      "DemoIstegi": {
        "type": "object",
        "properties": {
          "dil": {
            "type": "string",
            "pattern": "^[A-Za-z]{2}$",
            "default": "tr"
          },
          "mobil": {
            "type": "boolean",
            "default": false
          },
          "donusUrl": {
            "type": "string",
            "format": "uri",
            "maxLength": 500
          },
          "cerceveler": {
            "type": "array",
            "maxItems": 10,
            "default": [],
            "items": {
              "$ref": "#/components/schemas/Koken"
            }
          },
          "oyun": {
            "type": "string",
            "enum": [
              "hurkus"
            ],
            "default": "hurkus"
          }
        }
      },
      "DemoCevabi": {
        "type": "object",
        "required": [
          "tamam",
          "url",
          "oturum",
          "bitis",
          "bakiye"
        ],
        "properties": {
          "tamam": {
            "const": true
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "oturum": {
            "type": "integer"
          },
          "bitis": {
            "type": "string",
            "format": "date-time"
          },
          "bakiye": {
            "type": "integer",
            "description": "Sanal bakiye (kuruş): 100000 = 1.000 ₺."
          }
        }
      },
      "KatalogOyunu": {
        "type": "object",
        "properties": {
          "disKod": {
            "type": "string",
            "description": "Oyun kodu; `/api/ac` ve `/api/demo` isteklerindeki `oyun`."
          },
          "ad": {
            "type": "string"
          },
          "studyo": {
            "type": "string",
            "description": "Stüdyo adı."
          },
          "studyoLogo": {
            "type": "string",
            "format": "uri"
          },
          "studyoIsaret": {
            "type": "string",
            "format": "uri",
            "description": "Kare işaret (küçük rozetler için)."
          },
          "tur": {
            "type": "string",
            "description": "Oyun türü (`crash`)."
          },
          "kategori": {
            "type": "string",
            "description": "Lobi kategorisi (`Crash`)."
          },
          "aciklama": {
            "type": "string"
          },
          "gorsel": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "Kare kart görseli (1:1)."
          },
          "gorselDikey": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "Dikey kart (3:4)."
          },
          "gorselYatay": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "Yatay afiş (16:9)."
          },
          "gorselHareketli": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "Animasyonlu WebP ya da GIF."
          },
          "rtp": {
            "type": "number",
            "description": "Sizin seçtiğiniz RTP (%): `100 − kasaPayi`."
          },
          "oynaklik": {
            "type": "string",
            "description": "Oynaklık (`yuksek`)."
          },
          "enAzBahis": {
            "type": "integer",
            "description": "`normal` grubun en az bahsi (kuruş)."
          },
          "enCokBahis": {
            "type": "integer",
            "description": "`normal` grubun en çok bahsi (kuruş)."
          },
          "enCokCarpan": {
            "type": "number",
            "description": "Genel çarpan tavanı ile `normal` grubun tavanından küçük olanı."
          },
          "paraBirimleri": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "diller": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "demo": {
            "type": "boolean"
          },
          "mobil": {
            "type": "boolean"
          },
          "masaustu": {
            "type": "boolean"
          },
          "cikis": {
            "type": "string",
            "format": "date",
            "description": "Çıkış tarihi (`YYYY-MM-DD`)."
          },
          "etiketler": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "ozellikler": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "`iki_bahis`, `otomatik_bahis`, `otomatik_birakma`, `kanitlanabilir_adalet`, `canli_bahisler`."
          },
          "durum": {
            "type": "string",
            "enum": [
              "acik",
              "bakim",
              "kapali"
            ],
            "description": "`bakim` ya da `kapali` iken oyunu lobide gizleyin."
          },
          "surum": {
            "type": "integer",
            "description": "Oyun kaydı her değiştiğinde artar."
          },
          "guncelleme": {
            "type": "string",
            "format": "date-time",
            "description": "Son değişiklik zamanı."
          }
        }
      },
      "KatalogCevabi": {
        "type": "object",
        "required": [
          "tamam",
          "oyunlar"
        ],
        "properties": {
          "tamam": {
            "const": true
          },
          "oyunlar": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KatalogOyunu"
            }
          }
        }
      },
      "DeneCevabi": {
        "type": "object",
        "required": [
          "tamam",
          "mesaj",
          "surum",
          "oyunlar",
          "paraBirimi",
          "test"
        ],
        "properties": {
          "tamam": {
            "const": true
          },
          "mesaj": {
            "type": "string",
            "description": "`<marka> · <ad> (<kod>) · <para birimi>[ · test kipi]`"
          },
          "surum": {
            "type": "string",
            "description": "Sunucu sürümü."
          },
          "oyunlar": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "paraBirimi": {
            "type": "string"
          },
          "test": {
            "type": "boolean",
            "description": "Kaydınız test kipinde mi."
          }
        }
      },
      "DogrulaTurBitti": {
        "type": "object",
        "required": [
          "tamam",
          "tur",
          "bitti",
          "tohumOzet",
          "tohum",
          "istemciTohum",
          "kasaPayi",
          "tavan",
          "cokus",
          "kayitliCokus"
        ],
        "properties": {
          "tamam": {
            "const": true
          },
          "tur": {
            "type": "integer"
          },
          "bitti": {
            "const": true
          },
          "tohumOzet": {
            "type": "string",
            "description": "sha256(tohum), tur açılırken yayınlanan."
          },
          "tohum": {
            "type": "string",
            "description": "Sunucu tohumu (tur bitince açıklanır)."
          },
          "istemciTohum": {
            "type": "string"
          },
          "kasaPayi": {
            "type": "number"
          },
          "tavan": {
            "type": "number"
          },
          "cokus": {
            "type": "number",
            "description": "Tohumlardan yeniden hesaplanan çöküş."
          },
          "kayitliCokus": {
            "type": [
              "number",
              "null"
            ],
            "description": "Turda kaydedilen çöküş."
          }
        }
      },
      "DogrulaTurSuruyor": {
        "type": "object",
        "required": [
          "tamam",
          "tur",
          "bitti",
          "tohumOzet"
        ],
        "properties": {
          "tamam": {
            "const": true
          },
          "tur": {
            "type": "integer"
          },
          "bitti": {
            "const": false
          },
          "tohumOzet": {
            "type": "string"
          }
        }
      },
      "DogrulaSaf": {
        "type": "object",
        "required": [
          "tamam",
          "cokus",
          "kasaPayi",
          "tavan"
        ],
        "properties": {
          "tamam": {
            "const": true
          },
          "cokus": {
            "type": "number"
          },
          "kasaPayi": {
            "type": "number"
          },
          "tavan": {
            "type": "number"
          }
        }
      },
      "Toplamlar": {
        "type": "object",
        "properties": {
          "bahisAdet": {
            "type": "integer"
          },
          "bahisToplam": {
            "type": "integer",
            "description": "kuruş"
          },
          "kazancToplam": {
            "type": "integer",
            "description": "kuruş"
          },
          "ggr": {
            "type": "integer",
            "description": "bahis − kazanç (kuruş)"
          },
          "rtp": {
            "type": [
              "number",
              "null"
            ],
            "description": "% (bahis yoksa null)"
          }
        }
      },
      "Ozet": {
        "type": "object",
        "required": [
          "bugun",
          "acikTur",
          "bekleyenCagri",
          "vazgecilenCagri",
          "operator",
          "oyunAlani"
        ],
        "properties": {
          "bugun": {
            "$ref": "#/components/schemas/Toplamlar"
          },
          "acikTur": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "no": {
                "type": "integer"
              },
              "faz": {
                "type": "string",
                "enum": [
                  "BAHIS",
                  "UCUS"
                ]
              }
            }
          },
          "bekleyenCagri": {
            "type": "integer",
            "description": "Son 30 günde bekleyen cüzdan çağrısı."
          },
          "vazgecilenCagri": {
            "type": "integer",
            "description": "Son 30 günde vazgeçilen cüzdan çağrısı."
          },
          "operator": {
            "type": "object",
            "properties": {
              "kod": {
                "type": "string"
              },
              "ad": {
                "type": "string"
              },
              "aktif": {
                "type": "boolean"
              },
              "test": {
                "type": "boolean"
              },
              "paraBirimi": {
                "type": "string"
              }
            }
          },
          "oyunAlani": {
            "type": "string",
            "description": "Oyun alanı (`play.ormicast.store`)."
          }
        }
      },
      "Operator": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "kod": {
            "type": "string"
          },
          "ad": {
            "type": "string"
          },
          "geriUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Cüzdan geri çağrı adresi."
          },
          "bildirimUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Olay bildirim adresi (boşsa bildirimler geri çağrı adresine gider)."
          },
          "paraBirimi": {
            "type": "string"
          },
          "ggrOrani": {
            "type": "number",
            "description": "Sağlayıcı payı (%)."
          },
          "aktif": {
            "type": "boolean"
          },
          "test": {
            "type": "boolean"
          },
          "izinliIpler": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Boşsa IP kısıtı yok; tam adres eşleşmesi (CIDR yok)."
          },
          "ayar": {
            "type": "object",
            "description": "Kayıttaki ham ayar (eksik alanlar varsayılandır; tam hali için `GET /api/yonetim/ayar`)."
          },
          "olusturma": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "RiskSiniri": {
        "type": "object",
        "required": [
          "enAzBahis",
          "enCokBahis",
          "enCokKazanc",
          "carpanTavani",
          "otoTavani",
          "gunlukKazancTavani"
        ],
        "properties": {
          "enAzBahis": {
            "type": "integer",
            "minimum": 1,
            "description": "kuruş; ≤ enCokBahis"
          },
          "enCokBahis": {
            "type": "integer",
            "minimum": 1,
            "description": "kuruş"
          },
          "enCokKazanc": {
            "type": "integer",
            "minimum": 1,
            "description": "Tek bahiste en çok kazanç (kuruş)."
          },
          "carpanTavani": {
            "type": "number",
            "minimum": 1.01,
            "maximum": 10000
          },
          "otoTavani": {
            "type": "number",
            "minimum": 1.01,
            "maximum": 10000
          },
          "gunlukKazancTavani": {
            "type": "integer",
            "minimum": 1,
            "description": "Günlük net kazanç tavanı (kuruş, İstanbul günü)."
          }
        }
      },
      "Ayar": {
        "type": "object",
        "description": "Operatör oyun ayarı. Tutarlar kuruş; çarpanlar sayı.",
        "properties": {
          "acik": {
            "type": "boolean",
            "default": true,
            "description": "Kapalıysa tur açılmaz."
          },
          "kasaPayi": {
            "type": "number",
            "minimum": 0.5,
            "maximum": 15,
            "default": 3,
            "description": "RTP = 100 − kasaPayi. Yalnız sağlayıcının izin verdiği RTP seçenekleri (Hürkuş: 95 · 96 · 97)."
          },
          "kasaPayiSaatlik": {
            "type": [
              "array",
              "null"
            ],
            "minItems": 24,
            "maxItems": 24,
            "items": {
              "type": "number",
              "minimum": 0.5,
              "maximum": 15
            },
            "default": null,
            "description": "İstanbul saatine göre saat başına kasa payı; turda sabit."
          },
          "ikiKatSaniye": {
            "type": "number",
            "minimum": 3,
            "maximum": 12,
            "default": 6
          },
          "bahisSuresiSn": {
            "type": "number",
            "minimum": 3,
            "maximum": 15,
            "default": 5
          },
          "cokusBeklemeSn": {
            "type": "number",
            "minimum": 2,
            "maximum": 6,
            "default": 3
          },
          "carpanTavani": {
            "type": "number",
            "minimum": 2,
            "maximum": 10000,
            "default": 500
          },
          "turEnCokBahisAdet": {
            "type": "integer",
            "minimum": 10,
            "maximum": 5000,
            "default": 1000
          },
          "turEnCokBahisTutar": {
            "type": "integer",
            "minimum": 1,
            "default": 5000000
          },
          "pozisyonTavani": {
            "type": "integer",
            "minimum": 1,
            "default": 20000000
          },
          "devralmaEsigiSn": {
            "type": "number",
            "minimum": 5,
            "maximum": 120,
            "default": 20
          },
          "hizliTutarlar": {
            "type": "array",
            "minItems": 4,
            "maxItems": 4,
            "items": {
              "type": "integer",
              "minimum": 1
            },
            "default": [
              1000,
              2000,
              5000,
              10000
            ]
          },
          "riskGruplari": {
            "type": "object",
            "required": [
              "yeni",
              "normal",
              "vip",
              "supheli"
            ],
            "properties": {
              "yeni": {
                "$ref": "#/components/schemas/RiskSiniri"
              },
              "normal": {
                "$ref": "#/components/schemas/RiskSiniri"
              },
              "vip": {
                "$ref": "#/components/schemas/RiskSiniri"
              },
              "supheli": {
                "$ref": "#/components/schemas/RiskSiniri"
              }
            }
          },
          "hiz": {
            "type": "object",
            "properties": {
              "bahisDk": {
                "type": "integer",
                "minimum": 5,
                "maximum": 600,
                "default": 60
              },
              "baglantiDk": {
                "type": "integer",
                "minimum": 5,
                "maximum": 600,
                "default": 20
              }
            }
          },
          "rtpSapmaUyari": {
            "type": "number",
            "minimum": 1,
            "maximum": 50,
            "default": 8
          },
          "buyukKazanc": {
            "type": "integer",
            "minimum": 1,
            "default": 500000
          },
          "metinler": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "maxLength": 200
            },
            "default": {}
          }
        }
      },
      "AyarYazIstegi": {
        "type": "object",
        "required": [
          "ayar"
        ],
        "properties": {
          "ayar": {
            "$ref": "#/components/schemas/Ayar"
          },
          "kim": {
            "$ref": "#/components/schemas/Kim"
          }
        }
      },
      "AyarGecmisiSatiri": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "kim": {
            "type": "string"
          },
          "zaman": {
            "type": "string",
            "format": "date-time"
          },
          "once": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Ayar"
              },
              {
                "type": "null"
              }
            ]
          },
          "sonra": {
            "$ref": "#/components/schemas/Ayar"
          }
        }
      },
      "TurDurumu": {
        "type": "string",
        "enum": [
          "BAHIS",
          "UCUS",
          "COKUS",
          "IPTAL"
        ]
      },
      "TurSatiri": {
        "type": "object",
        "properties": {
          "no": {
            "type": "integer"
          },
          "durum": {
            "$ref": "#/components/schemas/TurDurumu"
          },
          "cokus": {
            "type": [
              "number",
              "null"
            ]
          },
          "bahisAdet": {
            "type": "integer"
          },
          "bahisToplam": {
            "type": "integer"
          },
          "kazancToplam": {
            "type": "integer"
          },
          "baslangic": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "bitis": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "tohumOzet": {
            "type": "string"
          }
        }
      },
      "TurDetayi": {
        "type": "object",
        "properties": {
          "tur": {
            "type": "object",
            "properties": {
              "no": {
                "type": "integer"
              },
              "durum": {
                "$ref": "#/components/schemas/TurDurumu"
              },
              "cokus": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "tohumOzet": {
                "type": "string"
              },
              "tohum": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "istemciTohum": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "kasaPayi": {
                "type": "number"
              },
              "k": {
                "type": "number",
                "description": "ln 2 / ikiKatSaniye"
              },
              "tavan": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "bahisBitis": {
                "type": "string",
                "format": "date-time"
              },
              "baslangic": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "cokusZaman": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "bitis": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "bahisAdet": {
                "type": "integer"
              },
              "bahisToplam": {
                "type": "integer"
              },
              "kazancToplam": {
                "type": "integer"
              }
            }
          },
          "bahisler": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "oyuncu": {
                  "type": "string"
                },
                "risk": {
                  "$ref": "#/components/schemas/RiskGrubu"
                },
                "kutu": {
                  "type": "integer",
                  "enum": [
                    1,
                    2
                  ]
                },
                "tutar": {
                  "type": "integer"
                },
                "oto": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "durum": {
                  "type": "string"
                },
                "carpan": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "kazanc": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "birakmaKaynagi": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "olusturma": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "Rapor": {
        "type": "object",
        "properties": {
          "beklenenRtp": {
            "type": "number"
          },
          "satirlar": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "anahtar": {
                  "type": "string",
                  "description": "Gün (`YYYY-MM-DD`), saat (`YYYY-MM-DD HH`), oyuncu kodu ya da risk grubu."
                },
                "bahisAdet": {
                  "type": "integer"
                },
                "bahisToplam": {
                  "type": "integer"
                },
                "kazancToplam": {
                  "type": "integer"
                },
                "ggr": {
                  "type": "integer"
                },
                "rtp": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "sapma": {
                  "type": "boolean"
                }
              }
            }
          }
        }
      },
      "OyuncuSatiri": {
        "type": "object",
        "properties": {
          "kod": {
            "type": "string"
          },
          "risk": {
            "$ref": "#/components/schemas/RiskGrubu"
          },
          "sonGorulme": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "son7": {
            "type": "object",
            "properties": {
              "bahisToplam": {
                "type": "integer"
              },
              "kazancToplam": {
                "type": "integer"
              }
            }
          }
        }
      },
      "OyuncuKarti": {
        "type": "object",
        "properties": {
          "oyuncu": {
            "type": "object",
            "properties": {
              "kod": {
                "type": "string"
              },
              "risk": {
                "$ref": "#/components/schemas/RiskGrubu"
              },
              "sonBakiye": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "sonGorulme": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "olusturma": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "son24": {
            "$ref": "#/components/schemas/Toplamlar"
          },
          "sonBahisler": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "turNo": {
                  "type": "integer"
                },
                "kutu": {
                  "type": "integer"
                },
                "tutar": {
                  "type": "integer"
                },
                "carpan": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "kazanc": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "durum": {
                  "type": "string"
                },
                "zaman": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "MutabakatSatiri": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "olay": {
            "type": "string",
            "enum": [
              "bahis",
              "kazanc",
              "iade"
            ]
          },
          "seri": {
            "type": "string"
          },
          "bahisId": {
            "type": [
              "integer",
              "null"
            ]
          },
          "tutar": {
            "type": [
              "integer",
              "null"
            ]
          },
          "deneme": {
            "type": "integer"
          },
          "hata": {
            "type": [
              "string",
              "null"
            ]
          },
          "olusturma": {
            "type": "string",
            "format": "date-time"
          },
          "durum": {
            "type": "string",
            "enum": [
              "bekliyor",
              "vazgecildi",
              "red"
            ]
          }
        }
      },
      "YuvaAdi": {
        "type": "string",
        "enum": [
          "muzik",
          "motor",
          "kalkis",
          "cokus",
          "birakma",
          "bahis",
          "geriSayim",
          "buyukKazanc",
          "ucak",
          "logo",
          "arkaplan",
          "favicon",
          "kart"
        ]
      },
      "Varlik": {
        "type": "object",
        "properties": {
          "yuva": {
            "$ref": "#/components/schemas/YuvaAdi"
          },
          "tur": {
            "type": "string",
            "enum": [
              "ses",
              "gorsel"
            ]
          },
          "url": {
            "type": "string"
          },
          "varsayilan": {
            "type": "boolean"
          },
          "acik": {
            "type": "boolean"
          },
          "ses": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "mime": {
            "type": [
              "string",
              "null"
            ]
          },
          "boyut": {
            "type": [
              "integer",
              "null"
            ]
          },
          "guncelleme": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "Gorunum": {
        "type": "object",
        "properties": {
          "tema": {
            "type": "object",
            "properties": {
              "zemin": {
                "type": "string"
              },
              "isin": {
                "type": "string"
              },
              "egri": {
                "type": "string"
              },
              "ucak": {
                "type": "string"
              },
              "carpan": {
                "type": "string"
              },
              "cokus": {
                "type": "string"
              },
              "dugmeBahis": {
                "type": "string"
              },
              "dugmeBirak": {
                "type": "string"
              },
              "panel": {
                "type": "string"
              },
              "cizgi": {
                "type": "string"
              }
            }
          },
          "font": {
            "type": "string"
          },
          "ad": {
            "type": "string"
          },
          "metinler": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "CuzdanTemel": {
        "type": "object",
        "required": [
          "olay",
          "operator",
          "oyuncu",
          "oyun",
          "zaman",
          "paraBirimi"
        ],
        "properties": {
          "olay": {
            "type": "string",
            "enum": [
              "bakiye",
              "bahis",
              "kazanc",
              "iade"
            ]
          },
          "operator": {
            "type": "string",
            "description": "Operatör kodunuz; kendi kodunuzla karşılaştırın."
          },
          "oyuncu": {
            "type": "string",
            "description": "`/api/ac`'de verdiğiniz oyuncu kodu."
          },
          "oyun": {
            "type": "string",
            "enum": [
              "hurkus"
            ]
          },
          "zaman": {
            "type": "integer",
            "description": "ms; `X-Zflow-Zaman` ile aynı, her denemede tazelenir."
          },
          "paraBirimi": {
            "type": "string"
          }
        }
      },
      "CuzdanBakiye": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CuzdanTemel"
          },
          {
            "type": "object",
            "properties": {
              "olay": {
                "const": "bakiye"
              }
            }
          }
        ],
        "description": "Oyuncu bağlanınca ve bahis reddinden sonra güncel bakiye sorulur. `tur`, `seri`, `tutar` gelmez."
      },
      "CuzdanBahis": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CuzdanTemel"
          },
          {
            "type": "object",
            "required": [
              "tur",
              "seri",
              "tutar"
            ],
            "properties": {
              "olay": {
                "const": "bahis"
              },
              "tur": {
                "type": "string"
              },
              "seri": {
                "type": "string",
                "pattern": "^h:\\d{1,15}:b$"
              },
              "tutar": {
                "type": "integer",
                "minimum": 1
              }
            }
          }
        ],
        "description": "Bakiye yetiyorsa tutarı düşün; yetmiyorsa hiçbir şey düşmeden `yetersiz` dönün."
      },
      "CuzdanKazanc": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CuzdanTemel"
          },
          {
            "type": "object",
            "required": [
              "tur",
              "seri",
              "tutar"
            ],
            "properties": {
              "olay": {
                "const": "kazanc"
              },
              "tur": {
                "type": "string"
              },
              "seri": {
                "type": "string",
                "pattern": "^h:\\d{1,15}:k$"
              },
              "tutar": {
                "type": "integer",
                "minimum": 1
              }
            }
          }
        ],
        "description": "Oyuncu bıraktığında: `floor(bahis × çarpan)`, risk grubu sınırlarıyla kesilmiş olabilir. Reddetmeyin; sorun geçiciyse `gecici` dönün."
      },
      "CuzdanIade": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CuzdanTemel"
          },
          {
            "type": "object",
            "required": [
              "tur",
              "seri",
              "tutar",
              "asilSeri"
            ],
            "properties": {
              "olay": {
                "const": "iade"
              },
              "tur": {
                "type": "string"
              },
              "seri": {
                "type": "string",
                "pattern": "^h:\\d{1,15}:i$"
              },
              "tutar": {
                "type": "integer",
                "minimum": 1
              },
              "asilSeri": {
                "type": "string",
                "pattern": "^h:\\d{1,15}:b$",
                "description": "İade edilen bahsin serisi. Hiç gelmemişse para oynatmadan yer tutucu yazın ve `tamam:true` dönün."
              }
            }
          }
        ],
        "description": "Bahsin tamamını geri verir: iptal, cevapsız bahis, uçuşa geçiş ya da arıza sonrası tur iptali."
      },
      "CuzdanCevabi": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "tamam",
              "bakiye"
            ],
            "properties": {
              "tamam": {
                "const": true
              },
              "bakiye": {
                "type": "integer",
                "description": "İşlemden sonraki bakiye (kuruş)."
              }
            }
          },
          {
            "type": "object",
            "required": [
              "tamam",
              "hata"
            ],
            "properties": {
              "tamam": {
                "const": false
              },
              "hata": {
                "type": "string",
                "enum": [
                  "yetersiz",
                  "oyuncu",
                  "imza",
                  "gecici",
                  "para_birimi",
                  "red"
                ]
              },
              "bakiye": {
                "type": "integer"
              },
              "mesaj": {
                "type": "string",
                "maxLength": 200,
                "description": "Bahis retlerinde oyuncuya gösterilebilir."
              }
            }
          }
        ]
      },
      "OlayTuru": {
        "type": "string",
        "enum": [
          "oyun.eklendi",
          "oyun.guncellendi",
          "oyun.durum",
          "bakim.planlandi",
          "bakim.basladi",
          "bakim.bitti",
          "duyuru",
          "anahtar.yenilendi",
          "deneme"
        ]
      },
      "OlayBildirimi": {
        "type": "object",
        "required": [
          "tur",
          "olay_id",
          "zaman",
          "operator",
          "veri"
        ],
        "properties": {
          "tur": {
            "$ref": "#/components/schemas/OlayTuru"
          },
          "olay_id": {
            "type": "string",
            "description": "Tekil olay kimliği; yeniden denemede aynı kalır."
          },
          "zaman": {
            "type": "integer",
            "description": "Gönderim zamanı (ms)."
          },
          "operator": {
            "type": "string"
          },
          "veri": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/VeriOyun"
              },
              {
                "$ref": "#/components/schemas/VeriOyunDurum"
              },
              {
                "$ref": "#/components/schemas/VeriBakimPlan"
              },
              {
                "$ref": "#/components/schemas/VeriBakimId"
              },
              {
                "$ref": "#/components/schemas/VeriDuyuru"
              },
              {
                "type": "object",
                "description": "`anahtar.yenilendi` ve `deneme`: boş nesne."
              }
            ]
          }
        }
      },
      "VeriOyun": {
        "type": "object",
        "required": [
          "oyun"
        ],
        "description": "`oyun.eklendi`, `oyun.guncellendi` (ad, görsel, RTP, sınır değişti).",
        "properties": {
          "oyun": {
            "$ref": "#/components/schemas/KatalogOyunu"
          }
        }
      },
      "VeriOyunDurum": {
        "type": "object",
        "required": [
          "disKod",
          "durum"
        ],
        "description": "`oyun.durum`",
        "properties": {
          "disKod": {
            "type": "string"
          },
          "durum": {
            "type": "string",
            "enum": [
              "acik",
              "bakim",
              "kapali"
            ]
          },
          "bitis": {
            "type": "string",
            "format": "date-time"
          },
          "mesaj": {
            "type": "string"
          }
        }
      },
      "VeriBakimPlan": {
        "type": "object",
        "required": [
          "id",
          "bas",
          "bit",
          "oyunlar",
          "mesaj"
        ],
        "description": "`bakim.planlandi`",
        "properties": {
          "id": {
            "type": "integer"
          },
          "bas": {
            "type": "string",
            "format": "date-time"
          },
          "bit": {
            "type": "string",
            "format": "date-time"
          },
          "oyunlar": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "const": "hepsi"
              }
            ]
          },
          "mesaj": {
            "type": "string"
          }
        }
      },
      "VeriBakimId": {
        "type": "object",
        "required": [
          "id"
        ],
        "description": "`bakim.basladi`, `bakim.bitti`",
        "properties": {
          "id": {
            "type": "integer"
          }
        }
      },
      "VeriDuyuru": {
        "type": "object",
        "required": [
          "id",
          "seviye",
          "baslik",
          "metin"
        ],
        "description": "`duyuru`",
        "properties": {
          "id": {
            "type": "integer"
          },
          "seviye": {
            "type": "string",
            "enum": [
              "bilgi",
              "uyari",
              "kritik"
            ]
          },
          "baslik": {
            "type": "string"
          },
          "metin": {
            "type": "string"
          },
          "bitis": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    }
  }
}
