{
  "openapi": "3.1.0",
  "info": {
    "title": "Western Zodiac Provider — Sandbox",
    "version": "0.1.0",
    "description": "Sandbox implementation only. HMAC details: 接入指南.md. HTTP 202 indicates durable acceptance, not debit success. All times are UTC epoch milliseconds except X-Timestamp (seconds)."
  },
  "servers": [
    {
      "url": "http://127.0.0.1:3400"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "summary": "Process liveness; not wallet or source readiness",
        "operationId": "GET__health",
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/admin/merchants": {
      "get": {
        "summary": "Merchant company, contact, callback, limits and source IP profiles",
        "operationId": "GET__admin_merchants",
        "security": [
          {
            "AdminToken": []
          },
          {
            "PortalCookie": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create merchant and generate API credentials",
        "operationId": "POST__admin_merchants",
        "security": [
          {
            "AdminToken": []
          },
          {
            "PortalCookie": []
          }
        ],
        "parameters": [
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Required for cookie authentication. Not used for server-side administrator bearer-token bootstrap."
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MerchantRequest"
              }
            }
          }
        }
      }
    },
    "/admin/merchants/{id}": {
      "post": {
        "summary": "Edit merchant contact, wallet endpoint, limits and IP rules",
        "operationId": "POST__admin_merchants_id_",
        "security": [
          {
            "AdminToken": []
          },
          {
            "PortalCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Required for cookie authentication. Not used for server-side administrator bearer-token bootstrap."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/admin/merchants/{id}/integration": {
      "get": {
        "summary": "Export private merchant API credentials and integration parameters",
        "operationId": "GET__admin_merchants_id_integration",
        "security": [
          {
            "AdminToken": []
          },
          {
            "PortalCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/admin/game-settings": {
      "get": {
        "summary": "Common playback, result API source and next-round odds",
        "operationId": "GET__admin_game_settings",
        "security": [
          {
            "AdminToken": []
          },
          {
            "PortalCookie": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Update common live source and next-round odds",
        "operationId": "POST__admin_game_settings",
        "security": [
          {
            "AdminToken": []
          },
          {
            "PortalCookie": []
          }
        ],
        "parameters": [
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Required for cookie authentication. Not used for server-side administrator bearer-token bootstrap."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "playbackUrl": {
                    "type": "string"
                  },
                  "liveSourceUrl": {
                    "type": "string"
                  },
                  "oddsBps": {
                    "type": "integer",
                    "minimum": 10000,
                    "maximum": 1000000
                  },
                  "reason": {
                    "type": "string"
                  }
                },
                "required": [
                  "playbackUrl",
                  "liveSourceUrl",
                  "oddsBps",
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/onboarding/applications": {
      "post": {
        "summary": "Submit sandbox operator application",
        "operationId": "POST__onboarding_applications",
        "security": [],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "companyName": {
                    "type": "string"
                  },
                  "contactName": {
                    "type": "string"
                  },
                  "contactEmail": {
                    "type": "string",
                    "format": "email"
                  },
                  "website": {
                    "type": "string",
                    "format": "uri"
                  },
                  "walletUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "decimals": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 6
                  },
                  "requestedIps": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "notes": {
                    "type": "string"
                  }
                },
                "required": [
                  "companyName",
                  "contactName",
                  "contactEmail",
                  "website",
                  "walletUrl",
                  "currency",
                  "decimals",
                  "requestedIps"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/onboarding/applications/{id}": {
      "get": {
        "summary": "Read application status with private tracking credential",
        "operationId": "GET__onboarding_applications_id_",
        "security": [
          {
            "TrackingToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/admin/applications": {
      "get": {
        "summary": "List latest 100 applications",
        "operationId": "GET__admin_applications",
        "security": [
          {
            "AdminToken": []
          },
          {
            "PortalCookie": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/admin/applications/{id}/review": {
      "post": {
        "summary": "Approve or reject a pending application, idempotent for identical content",
        "operationId": "POST__admin_applications_id_review",
        "security": [
          {
            "AdminToken": []
          },
          {
            "PortalCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Required for cookie authentication. Not used for server-side administrator bearer-token bootstrap."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "decision": {
                    "enum": [
                      "approve",
                      "reject"
                    ]
                  },
                  "reason": {
                    "type": "string"
                  },
                  "operatorId": {
                    "type": "string"
                  },
                  "minBet": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991,
                    "description": "Integer minor currency units; decimals are agreed per operator."
                  },
                  "maxBet": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991,
                    "description": "Integer minor currency units; decimals are agreed per operator."
                  },
                  "maxRoundBet": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991,
                    "description": "Integer minor currency units; decimals are agreed per operator."
                  },
                  "allowedIps": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "decision",
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/admin/operators/{id}/allowed-ips": {
      "post": {
        "summary": "Replace operator IP/CIDR allowlist with an audited reason",
        "operationId": "POST__admin_operators_id_allowed_ips",
        "security": [
          {
            "AdminToken": []
          },
          {
            "PortalCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Required for cookie authentication. Not used for server-side administrator bearer-token bootstrap."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "allowedIps": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "reason": {
                    "type": "string"
                  }
                },
                "required": [
                  "allowedIps",
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/v1/games": {
      "get": {
        "summary": "Game catalog",
        "operationId": "GET__v1_games",
        "security": [
          {
            "OperatorId": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/game": {
      "get": {
        "summary": "Merchant feed with playback URL, current issue, server time, odds and limits",
        "operationId": "GET__v1_game",
        "security": [
          {
            "OperatorId": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/issues/current": {
      "get": {
        "summary": "Current authoritative issue and betting status",
        "operationId": "GET__v1_issues_current",
        "security": [
          {
            "OperatorId": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/odds": {
      "get": {
        "summary": "Current round zodiac odds snapshot, inclusive of stake",
        "operationId": "GET__v1_odds",
        "security": [
          {
            "OperatorId": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/balance": {
      "post": {
        "summary": "Merchant player wallet balance",
        "operationId": "POST__v1_balance",
        "security": [
          {
            "OperatorId": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "playerId": {
                    "type": "string"
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  }
                },
                "required": [
                  "playerId",
                  "currency"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/v1/bets": {
      "post": {
        "summary": "Merchant server bet, authenticated with HMAC and source IP",
        "operationId": "POST__v1_bets",
        "security": [
          {
            "OperatorId": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "parameters": [],
        "responses": {
          "202": {
            "description": "Durably accepted; query order for final wallet state.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Bet"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MerchantBetRequest"
              }
            }
          }
        }
      },
      "get": {
        "summary": "List tenant orders, newest first, maximum 100 per page",
        "operationId": "GET__v1_bets",
        "security": [
          {
            "OperatorId": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BetPage"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/results": {
      "get": {
        "summary": "Formal results and cancelled rounds",
        "operationId": "GET__v1_results",
        "security": [
          {
            "OperatorId": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "parameters": [
          {
            "name": "issueNo",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/launches": {
      "post": {
        "summary": "Create or replay unconsumed game launch",
        "operationId": "POST__v1_launches",
        "security": [
          {
            "OperatorId": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Launch"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LaunchRequest"
              }
            }
          }
        }
      }
    },
    "/v1/bets/{id}": {
      "get": {
        "summary": "Tenant order details",
        "operationId": "GET__v1_bets_id_",
        "security": [
          {
            "OperatorId": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Bet"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/transactions/{id}": {
      "get": {
        "summary": "Tenant wallet transaction",
        "operationId": "GET__v1_transactions_id_",
        "security": [
          {
            "OperatorId": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reconciliation": {
      "get": {
        "summary": "Local confirmed and unresolved totals; not external reconciliation",
        "operationId": "GET__v1_reconciliation",
        "security": [
          {
            "OperatorId": [],
            "Timestamp": [],
            "Nonce": [],
            "Signature": []
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/player/session": {
      "post": {
        "summary": "Consume a one-time launch token",
        "operationId": "POST__player_session",
        "security": [],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Session"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string"
                  }
                },
                "required": [
                  "token"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/player/game": {
      "get": {
        "summary": "Current game, issue, limits, rules and freshness",
        "operationId": "GET__player_game",
        "security": [
          {
            "PlayerToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/player/balance": {
      "get": {
        "summary": "Signed balance from the operator wallet",
        "operationId": "GET__player_balance",
        "security": [
          {
            "PlayerToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/player/bets": {
      "post": {
        "summary": "Durably accept an atomic batch and debit intent",
        "operationId": "POST__player_bets",
        "security": [
          {
            "PlayerToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "202": {
            "description": "Durably accepted; query order for final wallet state.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Bet"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BetRequest"
              }
            }
          }
        }
      },
      "get": {
        "summary": "List own orders, maximum 100 per page",
        "operationId": "GET__player_bets",
        "security": [
          {
            "PlayerToken": []
          }
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BetPage"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/player/bets/{id}": {
      "get": {
        "summary": "Own order details",
        "operationId": "GET__player_bets_id_",
        "security": [
          {
            "PlayerToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Bet"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/player/history": {
      "get": {
        "summary": "Latest 50 formal results",
        "operationId": "GET__player_history",
        "security": [
          {
            "PlayerToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/admin/operators": {
      "post": {
        "summary": "Create sandbox operator",
        "operationId": "POST__admin_operators",
        "security": [
          {
            "AdminToken": []
          },
          {
            "PortalCookie": []
          }
        ],
        "parameters": [
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Required for cookie authentication. Not used for server-side administrator bearer-token bootstrap."
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OperatorRequest"
              }
            }
          }
        }
      },
      "get": {
        "summary": "List operators without secrets",
        "operationId": "GET__admin_operators",
        "security": [
          {
            "AdminToken": []
          },
          {
            "PortalCookie": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/admin/operators/{id}/enabled": {
      "post": {
        "summary": "Enable or disable new business; historical recovery continues",
        "operationId": "POST__admin_operators_id_enabled",
        "security": [
          {
            "AdminToken": []
          },
          {
            "PortalCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Required for cookie authentication. Not used for server-side administrator bearer-token bootstrap."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "enabled"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/admin/issues": {
      "get": {
        "summary": "Latest 100 issue projections",
        "operationId": "GET__admin_issues",
        "security": [
          {
            "AdminToken": []
          },
          {
            "PortalCookie": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/admin/transactions": {
      "get": {
        "summary": "Latest 100 wallet transactions",
        "operationId": "GET__admin_transactions",
        "security": [
          {
            "AdminToken": []
          },
          {
            "PortalCookie": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/admin/transactions/{id}/recheck": {
      "post": {
        "summary": "Schedule same-ID recheck of pending or unknown transaction",
        "operationId": "POST__admin_transactions_id_recheck",
        "security": [
          {
            "AdminToken": []
          },
          {
            "PortalCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Required for cookie authentication. Not used for server-side administrator bearer-token bootstrap."
          }
        ],
        "responses": {
          "202": {
            "description": "Durably accepted; query order for final wallet state.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "maxLength": 500
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/admin/bets": {
      "get": {
        "summary": "Tenant order lookup for administrators",
        "operationId": "GET__admin_bets",
        "security": [
          {
            "AdminToken": []
          },
          {
            "PortalCookie": []
          }
        ],
        "parameters": [
          {
            "name": "operatorId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BetPage"
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/admin/reconciliation": {
      "get": {
        "summary": "Local wallet transaction totals",
        "operationId": "GET__admin_reconciliation",
        "security": [
          {
            "AdminToken": []
          },
          {
            "PortalCookie": []
          }
        ],
        "parameters": [
          {
            "name": "operatorId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "until",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/admin/audit": {
      "get": {
        "summary": "Latest 100 audit events",
        "operationId": "GET__admin_audit",
        "security": [
          {
            "AdminToken": []
          },
          {
            "PortalCookie": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/admin/status": {
      "get": {
        "summary": "Source status and transaction backlog",
        "operationId": "GET__admin_status",
        "security": [
          {
            "AdminToken": []
          },
          {
            "PortalCookie": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/admin/sandbox/issues": {
      "post": {
        "summary": "Insert sandbox-only issue fixture",
        "operationId": "POST__admin_sandbox_issues",
        "security": [
          {
            "AdminToken": []
          },
          {
            "PortalCookie": []
          }
        ],
        "parameters": [
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Required for cookie authentication. Not used for server-side administrator bearer-token bootstrap."
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IssueRequest"
              }
            }
          }
        }
      }
    },
    "/admin/sandbox/issues/{id}/result": {
      "post": {
        "summary": "Record sandbox formal result after close; irreversible",
        "operationId": "POST__admin_sandbox_issues_id_result",
        "security": [
          {
            "AdminToken": []
          },
          {
            "PortalCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Required for cookie authentication. Not used for server-side administrator bearer-token bootstrap."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "number": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 24
                  }
                },
                "required": [
                  "number"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/admin/sandbox/issues/{id}/cancel": {
      "post": {
        "summary": "Cancel sandbox issue before any formal result",
        "operationId": "POST__admin_sandbox_issues_id_cancel",
        "security": [
          {
            "AdminToken": []
          },
          {
            "PortalCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Required for cookie authentication. Not used for server-side administrator bearer-token bootstrap."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "maxLength": 500
                  }
                },
                "required": [
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/auth/admin/login": {
      "post": {
        "summary": "Independent account login; administrator source IP restricted",
        "operationId": "POST__auth_admin_login",
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "username": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string",
                    "writeOnly": true
                  }
                },
                "required": [
                  "username",
                  "password"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/auth/merchant/login": {
      "post": {
        "summary": "Independent account login; administrator source IP restricted",
        "operationId": "POST__auth_merchant_login",
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "username": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string",
                    "writeOnly": true
                  }
                },
                "required": [
                  "username",
                  "password"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/auth/me": {
      "get": {
        "summary": "Current account and CSRF token",
        "operationId": "GET__auth_me",
        "security": [
          {
            "PortalCookie": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/auth/password": {
      "post": {
        "summary": "Change password and revoke all sessions",
        "operationId": "POST__auth_password",
        "security": [
          {
            "PortalCookie": []
          }
        ],
        "parameters": [
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Required for cookie authentication. Not used for server-side administrator bearer-token bootstrap."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "currentPassword": {
                    "type": "string",
                    "writeOnly": true
                  },
                  "newPassword": {
                    "type": "string",
                    "minLength": 12,
                    "maxLength": 128,
                    "writeOnly": true
                  }
                },
                "required": [
                  "currentPassword",
                  "newPassword"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/auth/logout": {
      "post": {
        "summary": "Revoke current session",
        "operationId": "POST__auth_logout",
        "security": [
          {
            "PortalCookie": []
          }
        ],
        "parameters": [
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Required for cookie authentication. Not used for server-side administrator bearer-token bootstrap."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/merchant-api/merchants": {
      "get": {
        "summary": "Own merchant and descendants only",
        "operationId": "GET__merchant_api_merchants",
        "security": [
          {
            "PortalCookie": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create independent child account, disabled pending platform approval",
        "operationId": "POST__merchant_api_merchants",
        "security": [
          {
            "PortalCookie": []
          }
        ],
        "parameters": [
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Required for cookie authentication. Not used for server-side administrator bearer-token bootstrap."
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MerchantRequest"
              }
            }
          }
        }
      }
    },
    "/merchant-api/requests": {
      "get": {
        "summary": "Own organization requests",
        "operationId": "GET__merchant_api_requests",
        "security": [
          {
            "PortalCookie": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/merchant-api/merchants/{id}/integration": {
      "get": {
        "summary": "Read authorized merchant or descendant data only",
        "operationId": "GET__merchant_api_merchants_id_integration",
        "security": [
          {
            "PortalCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/merchant-api/merchants/{id}/bets": {
      "get": {
        "summary": "Read authorized merchant or descendant data only",
        "operationId": "GET__merchant_api_merchants_id_bets",
        "security": [
          {
            "PortalCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/merchant-api/merchants/{id}/transactions": {
      "get": {
        "summary": "Read authorized merchant or descendant data only",
        "operationId": "GET__merchant_api_merchants_id_transactions",
        "security": [
          {
            "PortalCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/merchant-api/merchants/{id}/reconciliation": {
      "get": {
        "summary": "Read authorized merchant or descendant data only",
        "operationId": "GET__merchant_api_merchants_id_reconciliation",
        "security": [
          {
            "PortalCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/merchant-api/merchants/{id}/requests": {
      "post": {
        "summary": "Request activation or whitelist change",
        "operationId": "POST__merchant_api_merchants_id_requests",
        "security": [
          {
            "PortalCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Required for cookie authentication. Not used for server-side administrator bearer-token bootstrap."
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "kind": {
                    "enum": [
                      "activation",
                      "whitelist"
                    ]
                  },
                  "reason": {
                    "type": "string"
                  },
                  "allowedIps": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "kind",
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/merchant-api/merchants/{id}/reset-password": {
      "post": {
        "summary": "Reset descendant account and revoke all its sessions",
        "operationId": "POST__merchant_api_merchants_id_reset_password",
        "security": [
          {
            "PortalCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Required for cookie authentication. Not used for server-side administrator bearer-token bootstrap."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/merchant-api/merchants/{id}/disable": {
      "post": {
        "summary": "Stop new betting for merchant and descendants; existing money recovery continues",
        "operationId": "POST__merchant_api_merchants_id_disable",
        "security": [
          {
            "PortalCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Required for cookie authentication. Not used for server-side administrator bearer-token bootstrap."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    },
    "/admin/portal-requests": {
      "get": {
        "summary": "All merchant change requests",
        "operationId": "GET__admin_portal_requests",
        "security": [
          {
            "AdminToken": []
          },
          {
            "PortalCookie": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/admin/portal-requests/{id}/review": {
      "post": {
        "summary": "Immutable platform approval or rejection",
        "operationId": "POST__admin_portal_requests_id_review",
        "security": [
          {
            "AdminToken": []
          },
          {
            "PortalCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Required for cookie authentication. Not used for server-side administrator bearer-token bootstrap."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "decision": {
                    "enum": [
                      "approve",
                      "reject"
                    ]
                  },
                  "reason": {
                    "type": "string"
                  }
                },
                "required": [
                  "decision",
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/admin/portal-accounts": {
      "get": {
        "summary": "Account list without password hashes",
        "operationId": "GET__admin_portal_accounts",
        "security": [
          {
            "AdminToken": []
          },
          {
            "PortalCookie": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Provision account for an existing merchant or administrator",
        "operationId": "POST__admin_portal_accounts",
        "security": [
          {
            "AdminToken": []
          },
          {
            "PortalCookie": []
          }
        ],
        "parameters": [
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Required for cookie authentication. Not used for server-side administrator bearer-token bootstrap."
          }
        ],
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "username": {
                    "type": "string"
                  },
                  "role": {
                    "enum": [
                      "admin",
                      "merchant"
                    ]
                  },
                  "operatorId": {
                    "type": "string"
                  }
                },
                "required": [
                  "username",
                  "role"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/admin/merchants/{id}/reset-password": {
      "post": {
        "summary": "Reset merchant login and revoke sessions",
        "operationId": "POST__admin_merchants_id_reset_password",
        "security": [
          {
            "AdminToken": []
          },
          {
            "PortalCookie": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-CSRF-Token",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Required for cookie authentication. Not used for server-side administrator bearer-token bootstrap."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "requestId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "data",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Failure. Wallet timeouts remain unresolved; do not invent a new transaction ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "AdminToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "ADMIN_TOKEN; management network only."
      },
      "PlayerToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "One-hour player session, obtained using a one-time launch token."
      },
      "OperatorId": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Operator-Id"
      },
      "Timestamp": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Timestamp"
      },
      "Nonce": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Nonce"
      },
      "Signature": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Signature"
      },
      "TrackingToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "Application-specific tracking credential returned on submission."
      },
      "PortalCookie": {
        "type": "apiKey",
        "in": "cookie",
        "name": "zodiac_portal",
        "description": "HttpOnly Secure SameSite=Strict session. Every POST additionally requires X-CSRF-Token returned at login or /auth/me. Temporary-password accounts must change password first."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          },
          "requestId": {
            "type": "string"
          }
        },
        "required": [
          "error",
          "requestId"
        ],
        "additionalProperties": false
      },
      "BetItem": {
        "type": "object",
        "properties": {
          "signCode": {
            "type": "string",
            "enum": [
              "aries",
              "taurus",
              "gemini",
              "cancer",
              "leo",
              "virgo",
              "libra",
              "scorpio",
              "sagittarius",
              "capricorn",
              "aquarius",
              "pisces"
            ]
          },
          "amount": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991,
            "description": "Integer minor currency units; decimals are agreed per operator."
          }
        },
        "required": [
          "signCode",
          "amount"
        ],
        "additionalProperties": false
      },
      "BetRequest": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "issueNo": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BetItem"
            },
            "minItems": 1,
            "maxItems": 12
          }
        },
        "required": [
          "requestId",
          "issueNo",
          "currency",
          "items"
        ],
        "additionalProperties": false
      },
      "MerchantBetRequest": {
        "type": "object",
        "properties": {
          "playerId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "requestId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "issueNo": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BetItem"
            },
            "minItems": 1,
            "maxItems": 12
          }
        },
        "required": [
          "playerId",
          "requestId",
          "issueNo",
          "currency",
          "items"
        ],
        "additionalProperties": false
      },
      "MerchantRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,80}$"
          },
          "name": {
            "type": "string"
          },
          "contactName": {
            "type": "string"
          },
          "contactEmail": {
            "type": "string",
            "format": "email"
          },
          "website": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "walletUrl": {
            "type": "string",
            "format": "uri"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "decimals": {
            "type": "integer",
            "minimum": 0,
            "maximum": 6
          },
          "minBet": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991,
            "description": "Integer minor currency units; decimals are agreed per operator."
          },
          "maxBet": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991,
            "description": "Integer minor currency units; decimals are agreed per operator."
          },
          "maxRoundBet": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991,
            "description": "Integer minor currency units; decimals are agreed per operator."
          },
          "allowedIps": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "contactName",
          "contactEmail",
          "walletUrl",
          "currency",
          "decimals",
          "minBet",
          "maxBet",
          "maxRoundBet",
          "allowedIps"
        ],
        "additionalProperties": false
      },
      "LaunchRequest": {
        "type": "object",
        "properties": {
          "gameCode": {
            "const": "western_zodiac_live"
          },
          "playerId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "requestId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          }
        },
        "required": [
          "gameCode",
          "playerId",
          "currency",
          "requestId"
        ],
        "additionalProperties": false
      },
      "Launch": {
        "type": "object",
        "properties": {
          "launchUrl": {
            "type": "string",
            "format": "uri"
          },
          "expiresAt": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "launchUrl",
          "expiresAt"
        ],
        "additionalProperties": false
      },
      "Session": {
        "type": "object",
        "properties": {
          "sessionToken": {
            "type": "string"
          },
          "expiresAt": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "decimals": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "playerId": {
            "type": "string"
          }
        },
        "required": [
          "sessionToken",
          "expiresAt",
          "currency",
          "decimals",
          "playerId"
        ],
        "additionalProperties": false
      },
      "OperatorRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,80}$"
          },
          "name": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "decimals": {
            "type": "integer",
            "minimum": 0,
            "maximum": 6
          },
          "minBet": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991,
            "description": "Integer minor currency units; decimals are agreed per operator."
          },
          "maxBet": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991,
            "description": "Integer minor currency units; decimals are agreed per operator."
          },
          "maxRoundBet": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991,
            "description": "Integer minor currency units; decimals are agreed per operator."
          },
          "walletUrl": {
            "type": "string",
            "format": "uri"
          },
          "secret": {
            "type": "string",
            "minLength": 32,
            "maxLength": 256,
            "writeOnly": true
          },
          "allowedIps": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "name",
          "currency",
          "decimals",
          "minBet",
          "maxBet",
          "maxRoundBet",
          "walletUrl",
          "secret"
        ],
        "additionalProperties": false
      },
      "IssueRequest": {
        "type": "object",
        "properties": {
          "issueNo": {
            "type": "string"
          },
          "opensAt": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "closesAt": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "status": {
            "enum": [
              "betting",
              "closed"
            ]
          },
          "playbackUrl": {
            "type": "string"
          }
        },
        "required": [
          "issueNo",
          "opensAt",
          "closesAt",
          "status"
        ],
        "additionalProperties": false
      },
      "Transaction": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "debit",
              "credit",
              "refund"
            ]
          },
          "original_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "amount": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991,
            "description": "Integer minor currency units; decimals are agreed per operator."
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "status": {
            "enum": [
              "pending",
              "processing",
              "unknown",
              "succeeded",
              "declined"
            ]
          },
          "attempts": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "last_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "original_id",
          "amount",
          "currency",
          "status",
          "attempts",
          "last_error",
          "completed_at"
        ],
        "additionalProperties": false
      },
      "Bet": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "operatorId": {
            "type": "string"
          },
          "playerId": {
            "type": "string"
          },
          "issueNo": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "amount": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991,
            "description": "Integer minor currency units; decimals are agreed per operator."
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "status": {
            "enum": [
              "debit_pending",
              "active",
              "rejected",
              "settlement_pending",
              "settled",
              "refund_pending",
              "refunded",
              "manual"
            ]
          },
          "payout": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "mappingVersion": {
            "type": "string"
          },
          "ruleVersion": {
            "type": "string"
          },
          "createdAt": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "updatedAt": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "transactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Transaction"
            }
          },
          "idempotentReplay": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "operatorId",
          "playerId",
          "issueNo",
          "currency",
          "amount",
          "items",
          "status",
          "payout",
          "mappingVersion",
          "ruleVersion",
          "createdAt",
          "updatedAt",
          "transactions"
        ],
        "additionalProperties": false
      },
      "BetPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Bet"
            }
          },
          "nextCursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "items",
          "nextCursor"
        ],
        "additionalProperties": false
      }
    }
  }
}
