{
    "swagger": "2.0",
    "info": {
        "title": "Slot Backend Operator API",
        "contact": {},
        "version": "1.0"
    },
    "basePath": "/api/v1/operator",
    "paths": {
        "/operator/game-launch": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "operator-launch"
                ],
                "summary": "Create game launch token",
                "parameters": [
                    {
                        "description": "Launch request",
                        "name": "body",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/launch.createRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/launch.CreateResponse"
                        }
                    }
                }
            }
        },
        "/operator/games": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "operator-games"
                ],
                "summary": "List available games for operator integration",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/games.listGamesResponse"
                        }
                    }
                }
            }
        },
        "/operator/games/runtime-manifest": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "operator-games"
                ],
                "summary": "List active runtime identity manifest per game",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/games.runtimeManifestResponse"
                        }
                    }
                }
            }
        },
        "/operator/iframe/demo/{launchToken}": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "operator-launch"
                ],
                "summary": "Resolve operator iframe launch token",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Launch token",
                        "name": "launchToken",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Operator ID",
                        "name": "operatorId",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Game ID",
                        "name": "gameId",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Player ID",
                        "name": "playerId",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/launch.ResolveResponse"
                        }
                    }
                }
            }
        },
        "/operator/iframe/real/{launchToken}": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "operator-launch"
                ],
                "summary": "Resolve operator iframe launch token",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Launch token",
                        "name": "launchToken",
                        "in": "path",
                        "required": true
                    },
                    {
                        "type": "string",
                        "description": "Operator ID",
                        "name": "operatorId",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Game ID",
                        "name": "gameId",
                        "in": "query"
                    },
                    {
                        "type": "string",
                        "description": "Player ID",
                        "name": "playerId",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/launch.ResolveResponse"
                        }
                    }
                }
            }
        },
        "/operator/user/info": {
            "post": {
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "operator-wallet"
                ],
                "summary": "Get user profile info",
                "parameters": [
                    {
                        "description": "User info request",
                        "name": "request",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/wallet.userInfoRequest"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/wallet.userInfoResponse"
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "schema": {
                            "$ref": "#/definitions/httputil.ProblemDetail"
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "schema": {
                            "$ref": "#/definitions/httputil.ProblemDetail"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
        "games.gameInfo": {
            "type": "object",
            "properties": {
                "badges": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "bonusMessage": {
                    "type": "string"
                },
                "coefficients": {
                    "type": "array",
                    "items": {
                        "type": "number"
                    }
                },
                "cols": {
                    "type": "integer"
                },
                "configChecksum": {
                    "type": "string"
                },
                "configVersion": {
                    "type": "string"
                },
                "defaultBet": {
                    "type": "number"
                },
                "description": {
                    "type": "string"
                },
                "gameId": {
                    "type": "string"
                },
                "helpText": {
                    "type": "string"
                },
                "iframeDemoUrl": {
                    "type": "string"
                },
                "iframeRealUrl": {
                    "type": "string"
                },
                "launchReady": {
                    "type": "boolean"
                },
                "mathVersion": {
                    "type": "string"
                },
                "maxBet": {
                    "type": "number"
                },
                "minBet": {
                    "type": "number"
                },
                "name": {
                    "type": "string"
                },
                "paytableTitle": {
                    "type": "string"
                },
                "provider": {
                    "type": "string"
                },
                "rows": {
                    "type": "integer"
                },
                "rtp": {
                    "type": "number"
                },
                "rtpProfile": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                },
                "supportedCurrencies": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "supportedModes": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "type": {
                    "type": "string"
                },
                "volatilityProfile": {
                    "type": "string"
                }
            }
        },
        "games.listGamesResponse": {
            "type": "object",
            "properties": {
                "fallback": {
                    "type": "boolean"
                },
                "games": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/games.gameInfo"
                    }
                },
                "locale": {
                    "type": "string"
                }
            }
        },
        "games.runtimeManifestItem": {
            "type": "object",
            "properties": {
                "canonicalizerVersion": {
                    "type": "string"
                },
                "configChecksum": {
                    "type": "string"
                },
                "configVersion": {
                    "type": "string"
                },
                "effectiveFromUtc": {
                    "type": "string"
                },
                "gameId": {
                    "type": "string"
                },
                "mathVersion": {
                    "type": "string"
                }
            }
        },
        "games.runtimeManifestResponse": {
            "type": "object",
            "properties": {
                "items": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/games.runtimeManifestItem"
                    }
                }
            }
        },
        "httputil.ProblemDetail": {
            "type": "object",
            "properties": {
                "code": {
                    "type": "string"
                },
                "detail": {
                    "type": "string"
                },
                "status": {
                    "type": "integer"
                },
                "title": {
                    "type": "string"
                },
                "type": {
                    "type": "string"
                }
            }
        },
        "launch.CreateResponse": {
            "type": "object",
            "required": [
                "backendUrl",
                "expiresAt",
                "gameId",
                "launchToken",
                "token"
            ],
            "properties": {
                "backendUrl": {
                    "type": "string"
                },
                "expiresAt": {
                    "type": "string"
                },
                "gameId": {
                    "type": "string"
                },
                "launchToken": {
                    "type": "string"
                },
                "token": {
                    "type": "string"
                }
            }
        },
        "launch.ResolveResponse": {
            "type": "object",
            "required": [
                "allowedParentOrigins",
                "apiPrefix",
                "backendGameId",
                "backendUrl",
                "currency",
                "expiresAt",
                "gameId",
                "operatorGameId",
                "operatorId",
                "playerId",
                "runtimeContractVersion",
                "sessionId",
                "token"
            ],
            "properties": {
                "allowedParentOrigins": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "apiPrefix": {
                    "type": "string"
                },
                "assetPack": {
                    "type": "string"
                },
                "backendGameId": {
                    "type": "string"
                },
                "backendUrl": {
                    "type": "string"
                },
                "currency": {
                    "type": "string"
                },
                "expiresAt": {
                    "type": "string"
                },
                "gameId": {
                    "type": "string"
                },
                "operatorGameId": {
                    "type": "string"
                },
                "operatorId": {
                    "type": "string"
                },
                "playerId": {
                    "type": "string"
                },
                "qualityTierHint": {
                    "type": "string"
                },
                "runtimeContractVersion": {
                    "type": "string"
                },
                "runtimeProfileHint": {
                    "type": "string"
                },
                "sessionId": {
                    "type": "string"
                },
                "slotInstanceId": {
                    "type": "string"
                },
                "token": {
                    "type": "string"
                }
            }
        },
        "launch.createRequest": {
            "type": "object",
            "required": [
                "gameId"
            ],
            "properties": {
                "currency": {
                    "type": "string"
                },
                "gameId": {
                    "type": "string"
                },
                "operatorId": {
                    "type": "string"
                },
                "playerId": {
                    "type": "string"
                },
                "slotInstanceId": {
                    "type": "string"
                }
            }
        },
        "wallet.userInfoRequest": {
            "type": "object",
            "required": [
                "request_uuid",
                "user"
            ],
            "properties": {
                "request_uuid": {
                    "type": "string"
                },
                "user": {
                    "type": "string",
                    "minLength": 4
                }
            }
        },
        "wallet.userInfoResponse": {
            "type": "object",
            "properties": {
                "affiliate_id": {
                    "type": "string"
                },
                "birth_date": {
                    "type": "string"
                },
                "country": {
                    "type": "string"
                },
                "jurisdiction": {
                    "type": "string"
                },
                "registration_date": {
                    "type": "string"
                },
                "request_uuid": {
                    "type": "string"
                },
                "sex": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                },
                "sub_partner_id": {
                    "type": "string"
                },
                "tags": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "user": {
                    "type": "string"
                }
            }
        }
    }
}