9746 lines
326 KiB
JSON
9746 lines
326 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "This is server for FortuneBet.",
|
|
"title": "FortuneBet API",
|
|
"termsOfService": "http://swagger.io/terms/",
|
|
"contact": {
|
|
"name": "API Support",
|
|
"url": "http://www.swagger.io/support",
|
|
"email": "support@swagger.io"
|
|
},
|
|
"license": {
|
|
"name": "Apache 2.0",
|
|
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
|
},
|
|
"version": "1.0.1"
|
|
},
|
|
"paths": {
|
|
"/api/v1/admin": {
|
|
"get": {
|
|
"description": "Get all Admins",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"summary": "Get all Admins",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Page number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Page size",
|
|
"name": "page_size",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.AdminRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "Create Admin",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"summary": "Create Admin",
|
|
"parameters": [
|
|
{
|
|
"description": "Create admin",
|
|
"name": "manger",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.CreateAdminReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/admin-company": {
|
|
"get": {
|
|
"description": "Gets a single company by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"company"
|
|
],
|
|
"summary": "Gets company by id",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.CompanyRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/admin/{id}": {
|
|
"get": {
|
|
"description": "Get a single admin by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"summary": "Get admin by id",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "User ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.AdminRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"description": "Update Admin",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"summary": "Update Admin",
|
|
"parameters": [
|
|
{
|
|
"description": "Update Admin",
|
|
"name": "admin",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.updateAdminReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/alea-games/launch": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"description": "Generates an authenticated launch URL for Alea Play virtual games",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Alea Virtual Games"
|
|
],
|
|
"summary": "Launch an Alea Play virtual game",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Game identifier (e.g., 'aviator', 'plinko')",
|
|
"name": "game_id",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"enum": [
|
|
"USD",
|
|
"EUR",
|
|
"GBP"
|
|
],
|
|
"type": "string",
|
|
"default": "USD",
|
|
"description": "Currency code (ISO 4217)",
|
|
"name": "currency",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"enum": [
|
|
"real",
|
|
"demo"
|
|
],
|
|
"type": "string",
|
|
"default": "real",
|
|
"description": "Game mode",
|
|
"name": "mode",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Returns authenticated game launch URL",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"allOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"launch_url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/auth/login": {
|
|
"post": {
|
|
"description": "Login customer",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"auth"
|
|
],
|
|
"summary": "Login customer",
|
|
"parameters": [
|
|
{
|
|
"description": "Login customer",
|
|
"name": "login",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.loginCustomerReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.loginCustomerRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/auth/logout": {
|
|
"post": {
|
|
"description": "Logout customer",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"auth"
|
|
],
|
|
"summary": "Logout customer",
|
|
"parameters": [
|
|
{
|
|
"description": "Logout customer",
|
|
"name": "logout",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.logoutReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/auth/refresh": {
|
|
"post": {
|
|
"description": "Refresh token",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"auth"
|
|
],
|
|
"summary": "Refresh token",
|
|
"parameters": [
|
|
{
|
|
"description": "tokens",
|
|
"name": "refresh",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.refreshToken"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.loginCustomerRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/banks": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Institutions - Banks"
|
|
],
|
|
"summary": "List all banks with pagination and filtering",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Filter by country ID",
|
|
"name": "country_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "Filter by active status",
|
|
"name": "is_active",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Search term for bank name or code",
|
|
"name": "search",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "Page number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"maximum": 100,
|
|
"type": "integer",
|
|
"default": 50,
|
|
"description": "Items per page",
|
|
"name": "page_size",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.InstResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Institutions - Banks"
|
|
],
|
|
"summary": "Create a new bank",
|
|
"parameters": [
|
|
{
|
|
"description": "Bank Info",
|
|
"name": "bank",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Bank"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Created",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Bank"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/banks/{id}": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Institutions - Banks"
|
|
],
|
|
"summary": "Get a bank by ID",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Bank ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Bank"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Institutions - Banks"
|
|
],
|
|
"summary": "Update a bank",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Bank ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Bank Info",
|
|
"name": "bank",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Bank"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Bank"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Institutions - Banks"
|
|
],
|
|
"summary": "Delete a bank",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Bank ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "Deleted successfully",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Not Found",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/branch": {
|
|
"get": {
|
|
"description": "Gets all branches",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"branch"
|
|
],
|
|
"summary": "Gets all branches",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.BranchDetailRes"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "Creates a branch",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"branch"
|
|
],
|
|
"summary": "Create a branch",
|
|
"parameters": [
|
|
{
|
|
"description": "Creates branch",
|
|
"name": "createBranch",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.CreateBranchReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.BranchRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/branch/{id}": {
|
|
"get": {
|
|
"description": "Gets a single branch by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"branch"
|
|
],
|
|
"summary": "Gets branch by id",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Branch ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.BranchDetailRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"description": "Updates a branch",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"branch"
|
|
],
|
|
"summary": "Updates a branch",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Branch ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Update Branch",
|
|
"name": "updateBranch",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.CreateBranchReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.BranchRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Delete the branch",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"branch"
|
|
],
|
|
"summary": "Delete the branch",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Branch ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/branch/{id}/bets": {
|
|
"get": {
|
|
"description": "Gets bets by its branch id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"branch"
|
|
],
|
|
"summary": "Gets bets by its branch id",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.BetRes"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/branch/{id}/cashier": {
|
|
"get": {
|
|
"description": "Gets branch cashiers",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"branch"
|
|
],
|
|
"summary": "Gets branch cashiers",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Branch ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/handlers.GetCashierRes"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/branch/{id}/operation": {
|
|
"get": {
|
|
"description": "Gets branch operations",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"branch"
|
|
],
|
|
"summary": "Gets branch operations",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Branch ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.BranchOperationRes"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/branch/{id}/operation/{opID}": {
|
|
"delete": {
|
|
"description": "Delete the branch operation",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"branch"
|
|
],
|
|
"summary": "Delete the branch operation",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Branch ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Branch Operation ID",
|
|
"name": "opID",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/logs": {
|
|
"get": {
|
|
"description": "Fetches application logs from MongoDB with pagination, level filtering, and search",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Logs"
|
|
],
|
|
"summary": "Retrieve application logs with filtering and pagination",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Filter logs by level (debug, info, warn, error, dpanic, panic, fatal)",
|
|
"name": "level",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Search term to match against message or fields",
|
|
"name": "search",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "Page number for pagination (default: 1)",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 50,
|
|
"description": "Number of items per page (default: 50, max: 100)",
|
|
"name": "limit",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Paginated list of application logs",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.LogResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid request parameters",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/branchCashier": {
|
|
"get": {
|
|
"description": "Gets branch for cahier",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"branch"
|
|
],
|
|
"summary": "Gets branch for cahier",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Branch ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.BranchDetailRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/branchWallet": {
|
|
"get": {
|
|
"description": "Returns a paginated list of generated report CSV files with search capability",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"wallet"
|
|
],
|
|
"summary": "List available report CSV files",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Search term to filter filenames",
|
|
"name": "search",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "Page number (default: 1)",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 20,
|
|
"description": "Items per page (default: 20, max: 100)",
|
|
"name": "limit",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Paginated list of CSV report filenames",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.PaginatedFileResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid pagination parameters",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/cashier/{id}": {
|
|
"get": {
|
|
"description": "Get a single cashier by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"cashier"
|
|
],
|
|
"summary": "Get cashier by id",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "User ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.UserProfileRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/cashierWallet": {
|
|
"get": {
|
|
"description": "Get wallet for cashier",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"cashier"
|
|
],
|
|
"summary": "Get wallet for cashier",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "User ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.UserProfileRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/cashiers": {
|
|
"get": {
|
|
"description": "Get all cashiers",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"cashier"
|
|
],
|
|
"summary": "Get all cashiers",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Page number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Page size",
|
|
"name": "page_size",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/handlers.GetCashierRes"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "Create cashier",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"cashier"
|
|
],
|
|
"summary": "Create cashier",
|
|
"parameters": [
|
|
{
|
|
"description": "Create cashier",
|
|
"name": "cashier",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.CreateCashierReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/cashiers/{id}": {
|
|
"put": {
|
|
"description": "Update cashier",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"cashier"
|
|
],
|
|
"summary": "Update cashier",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Cashier ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Update cashier",
|
|
"name": "cashier",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.updateCashierReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/chapa/banks": {
|
|
"get": {
|
|
"description": "Get list of banks supported by Chapa",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Chapa"
|
|
],
|
|
"summary": "Get supported banks",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/chapa/payments/deposit": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Starts a new deposit process using Chapa payment gateway",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Chapa"
|
|
],
|
|
"summary": "Initiate a deposit",
|
|
"parameters": [
|
|
{
|
|
"description": "Deposit request",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ChapaDepositRequestPayload"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ChapaDepositResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/chapa/payments/manual/verify/{tx_ref}": {
|
|
"get": {
|
|
"description": "Manually verify a payment using Chapa's API",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Chapa"
|
|
],
|
|
"summary": "Verify a payment manually",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Transaction Reference",
|
|
"name": "tx_ref",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ChapaVerificationResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/chapa/payments/webhook/verify": {
|
|
"post": {
|
|
"description": "Handles payment notifications from Chapa",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Chapa"
|
|
],
|
|
"summary": "Chapa payment webhook callback (used by Chapa)",
|
|
"parameters": [
|
|
{
|
|
"description": "Webhook payload",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ChapaWebhookPayload"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"allOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"status": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/win": {
|
|
"post": {
|
|
"description": "Processes win callbacks from either Veli or PopOK providers by auto-detecting the format",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Wins"
|
|
],
|
|
"summary": "Handle win callback (Veli or PopOK)",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Win processing result",
|
|
"schema": {}
|
|
},
|
|
"400": {
|
|
"description": "Invalid request format",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Authentication failed",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"409": {
|
|
"description": "Duplicate transaction",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/auth/login": {
|
|
"post": {
|
|
"description": "Login customer",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"auth"
|
|
],
|
|
"summary": "Login customer",
|
|
"parameters": [
|
|
{
|
|
"description": "Login customer",
|
|
"name": "login",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.loginCustomerReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.loginCustomerRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/chapa/payments/withdraw": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Initiates a withdrawal request to transfer funds to a bank account via Chapa",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Chapa"
|
|
],
|
|
"summary": "Initiate a withdrawal",
|
|
"parameters": [
|
|
{
|
|
"description": "Withdrawal request details",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ChapaWithdrawalRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Chapa withdrawal process initiated successfully",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid request body",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Unprocessable entity",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/company": {
|
|
"get": {
|
|
"description": "Gets all companies",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"company"
|
|
],
|
|
"summary": "Gets all companies",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.GetCompanyRes"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "Creates a company",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"company"
|
|
],
|
|
"summary": "Create a company",
|
|
"parameters": [
|
|
{
|
|
"description": "Creates company",
|
|
"name": "createCompany",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.CreateCompanyReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.CompanyRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/company/{id}": {
|
|
"get": {
|
|
"description": "Gets a single company by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"company"
|
|
],
|
|
"summary": "Gets company by id",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Company ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GetCompanyRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"description": "Updates a company",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"company"
|
|
],
|
|
"summary": "Updates a company",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Company ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Update Company",
|
|
"name": "updateCompany",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.UpdateCompanyReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.CompanyRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Delete the company",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"company"
|
|
],
|
|
"summary": "Delete the company",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Company ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/company/{id}/branch": {
|
|
"get": {
|
|
"description": "Gets branches by company id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"branch"
|
|
],
|
|
"summary": "Gets branches by company id",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Company ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.BranchDetailRes"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/currencies": {
|
|
"get": {
|
|
"description": "Returns list of supported currencies",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Multi-Currency"
|
|
],
|
|
"summary": "Get supported currencies",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.Response"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/currencies/convert": {
|
|
"get": {
|
|
"description": "Converts amount from one currency to another",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Multi-Currency"
|
|
],
|
|
"summary": "Convert currency",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Source currency code (e.g., USD)",
|
|
"name": "from",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Target currency code (e.g., ETB)",
|
|
"name": "to",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "number",
|
|
"description": "Amount to convert",
|
|
"name": "amount",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.Response"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/customer": {
|
|
"get": {
|
|
"description": "Get all Customers",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"customer"
|
|
],
|
|
"summary": "Get all Customers",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Page number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Page size",
|
|
"name": "page_size",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.CustomersRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/customer/{id}": {
|
|
"get": {
|
|
"description": "Get a single customer by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"customer"
|
|
],
|
|
"summary": "Get customer by id",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "User ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.CustomersRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"description": "Update Customers",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"customer"
|
|
],
|
|
"summary": "Update Customers",
|
|
"parameters": [
|
|
{
|
|
"description": "Update Customers",
|
|
"name": "Customers",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.updateCustomerReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/customerWallet": {
|
|
"get": {
|
|
"description": "Retrieve all customer wallets",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"wallet"
|
|
],
|
|
"summary": "Get all customer wallets",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/handlers.CustomerWalletRes"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/events": {
|
|
"get": {
|
|
"description": "Retrieve all upcoming events from the database",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"prematch"
|
|
],
|
|
"summary": "Retrieve all upcoming events",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Page number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Page size",
|
|
"name": "page_size",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "League ID Filter",
|
|
"name": "league_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Sport ID Filter",
|
|
"name": "sport_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Country Code Filter",
|
|
"name": "cc",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Start Time",
|
|
"name": "first_start_time",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "End Time",
|
|
"name": "last_start_time",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.UpcomingEvent"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/events/{id}": {
|
|
"get": {
|
|
"description": "Retrieve an upcoming event by ID",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"prematch"
|
|
],
|
|
"summary": "Retrieve an upcoming by ID",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.UpcomingEvent"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Set the event status to removed",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"event"
|
|
],
|
|
"summary": "Set the event status to removed",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Event ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/events/{id}/flag": {
|
|
"put": {
|
|
"description": "Update the event flagged",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"event"
|
|
],
|
|
"summary": "update the event flagged",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Event ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/issues": {
|
|
"get": {
|
|
"description": "Admin endpoint to list all reported issues with pagination",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Issues"
|
|
],
|
|
"summary": "Get all reported issues",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Limit",
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Offset",
|
|
"name": "offset",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.ReportedIssue"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "Allows a customer to report a new issue related to the betting platform",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Issues"
|
|
],
|
|
"summary": "Report an issue",
|
|
"parameters": [
|
|
{
|
|
"description": "Issue to report",
|
|
"name": "issue",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ReportedIssue"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Created",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ReportedIssue"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/issues/user/{user_id}": {
|
|
"get": {
|
|
"description": "Returns all issues reported by a specific user",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Issues"
|
|
],
|
|
"summary": "Get reported issues by a user",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "User ID",
|
|
"name": "user_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Limit",
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Offset",
|
|
"name": "offset",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.ReportedIssue"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/issues/{issue_id}": {
|
|
"delete": {
|
|
"description": "Admin endpoint to delete a reported issue",
|
|
"tags": [
|
|
"Issues"
|
|
],
|
|
"summary": "Delete a reported issue",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Issue ID",
|
|
"name": "issue_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/customer": {
|
|
"get": {
|
|
"description": "Get all Customers",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"customer"
|
|
],
|
|
"summary": "Get all Customers",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Page number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Page size",
|
|
"name": "page_size",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.CustomersRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/customer/{id}": {
|
|
"get": {
|
|
"description": "Get a single customer by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"customer"
|
|
],
|
|
"summary": "Get customer by id",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "User ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.CustomersRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"description": "Update Customers",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"customer"
|
|
],
|
|
"summary": "Update Customers",
|
|
"parameters": [
|
|
{
|
|
"description": "Update Customers",
|
|
"name": "Customers",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.updateCustomerReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/customerWallet": {
|
|
"get": {
|
|
"description": "Retrieve all customer wallets",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"wallet"
|
|
],
|
|
"summary": "Get all customer wallets",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/handlers.CustomerWalletRes"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/events": {
|
|
"get": {
|
|
"description": "Retrieve all upcoming events from the database",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Issues"
|
|
],
|
|
"summary": "Update issue status",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Issue ID",
|
|
"name": "issue_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "New issue status (pending, in_progress, resolved, rejected)",
|
|
"name": "status",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"status": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/leagues": {
|
|
"get": {
|
|
"description": "Gets all leagues",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"leagues"
|
|
],
|
|
"summary": "Gets all leagues",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.League"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/leagues/{id}/set-active": {
|
|
"put": {
|
|
"description": "Set the league to active",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"leagues"
|
|
],
|
|
"summary": "Set the league to active",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "League ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "League Active Request",
|
|
"name": "active",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.SetLeagueActiveReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/logs": {
|
|
"get": {
|
|
"description": "Fetches the 100 most recent application logs from MongoDB",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Logs"
|
|
],
|
|
"summary": "Retrieve latest application logs",
|
|
"responses": {
|
|
"200": {
|
|
"description": "List of application logs",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.LogEntry"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/manager/{id}/branch": {
|
|
"get": {
|
|
"description": "Gets a branches by manager id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"branch"
|
|
],
|
|
"summary": "Gets branches by manager id",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "User ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.BranchDetailRes"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/managers": {
|
|
"get": {
|
|
"description": "Get all Managers",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"manager"
|
|
],
|
|
"summary": "Get all Managers",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Page number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Page size",
|
|
"name": "page_size",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.ManagersRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "Create Manager",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"manager"
|
|
],
|
|
"summary": "Create Manager",
|
|
"parameters": [
|
|
{
|
|
"description": "Create manager",
|
|
"name": "manger",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.CreateManagerReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/managers/{id}": {
|
|
"get": {
|
|
"description": "Get a single manager by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"manager"
|
|
],
|
|
"summary": "Get manager by id",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "User ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.ManagersRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"description": "Update Managers",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"manager"
|
|
],
|
|
"summary": "Update Managers",
|
|
"parameters": [
|
|
{
|
|
"description": "Update Managers",
|
|
"name": "Managers",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.updateManagerReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/odds": {
|
|
"get": {
|
|
"description": "Retrieve all prematch odds from the database",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"prematch"
|
|
],
|
|
"summary": "Retrieve all prematch odds",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.Odd"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/odds/upcoming/{upcoming_id}": {
|
|
"get": {
|
|
"description": "Retrieve prematch odds by upcoming event ID (FI from Bet365) with optional pagination",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"prematch"
|
|
],
|
|
"summary": "Retrieve prematch odds by upcoming ID (FI)",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Upcoming Event ID (FI)",
|
|
"name": "upcoming_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Number of results to return (default: 10)",
|
|
"name": "limit",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Number of results to skip (default: 0)",
|
|
"name": "offset",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.Odd"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/odds/upcoming/{upcoming_id}/market/{market_id}": {
|
|
"get": {
|
|
"description": "Retrieve raw odds records using a Market ID",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"prematch"
|
|
],
|
|
"summary": "Retrieve raw odds by Market ID",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Upcoming ID",
|
|
"name": "upcoming_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Market ID",
|
|
"name": "market_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.RawOddsByMarketID"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/operation": {
|
|
"post": {
|
|
"description": "Creates a operation",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"branch"
|
|
],
|
|
"summary": "Create a operation",
|
|
"parameters": [
|
|
{
|
|
"description": "Creates operation",
|
|
"name": "createBranchOperation",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.CreateBranchOperationReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.BranchOperationRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/popok/games": {
|
|
"get": {
|
|
"description": "Retrieves the list of available PopOK slot games",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Virtual Games - PopOK"
|
|
],
|
|
"summary": "Get PopOK Games List",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "USD",
|
|
"description": "Currency (e.g. USD, ETB)",
|
|
"name": "currency",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.PopOKGame"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/popok/games/recommend": {
|
|
"get": {
|
|
"description": "Recommends games based on user history or randomly",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Virtual Games - PopOK"
|
|
],
|
|
"summary": "Recommend virtual games",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "User ID",
|
|
"name": "user_id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.GameRecommendation"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/referral/settings": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "Retrieves current referral settings (admin only)",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"referral"
|
|
],
|
|
"summary": "Get referral settings",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ReferralSettings"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "Updates referral settings (admin only)",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"referral"
|
|
],
|
|
"summary": "Update referral settings",
|
|
"parameters": [
|
|
{
|
|
"description": "Referral settings",
|
|
"name": "settings",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ReferralSettings"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Forbidden",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/referral/stats": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "Retrieves referral statistics for the authenticated user",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"referral"
|
|
],
|
|
"summary": "Get referral statistics",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ReferralStats"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/report-files/download/{filename}": {
|
|
"get": {
|
|
"description": "Downloads a generated report CSV file from the server",
|
|
"produces": [
|
|
"text/csv"
|
|
],
|
|
"tags": [
|
|
"Reports"
|
|
],
|
|
"summary": "Download a CSV report file",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Name of the report file to download (e.g., report_daily_2025-06-21.csv)",
|
|
"name": "filename",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "CSV file will be downloaded",
|
|
"schema": {
|
|
"type": "file"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Missing or invalid filename",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Report file not found",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error while serving the file",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/report-files/list": {
|
|
"get": {
|
|
"description": "Returns a list of all generated report CSV files available for download",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Reports"
|
|
],
|
|
"summary": "List available report CSV files",
|
|
"responses": {
|
|
"200": {
|
|
"description": "List of CSV report filenames",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.Response"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Failed to read report directory",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/reports/dashboard": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"ApiKeyAuth": []
|
|
}
|
|
],
|
|
"description": "Returns a comprehensive dashboard report with key metrics",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Reports"
|
|
],
|
|
"summary": "Get dashboard report",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Company ID filter",
|
|
"name": "company_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Branch ID filter",
|
|
"name": "branch_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "User ID filter",
|
|
"name": "user_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Start time filter (RFC3339 format)",
|
|
"name": "start_time",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "End time filter (RFC3339 format)",
|
|
"name": "end_time",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Sport ID filter",
|
|
"name": "sport_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Status filter (0=Pending, 1=Win, 2=Loss, 3=Half, 4=Void, 5=Error)",
|
|
"name": "status",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.DashboardSummary"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/result/{id}": {
|
|
"get": {
|
|
"description": "Get results for an event",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"result"
|
|
],
|
|
"summary": "Get results for an event",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Event ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/handlers.ResultRes"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/search/branch": {
|
|
"get": {
|
|
"description": "Search branches by name or location",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"branch"
|
|
],
|
|
"summary": "Search branches",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Search query",
|
|
"name": "q",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.BranchDetailRes"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/search/company": {
|
|
"get": {
|
|
"description": "Gets all companies",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"company"
|
|
],
|
|
"summary": "Gets all companies",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.CompanyRes"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/shop/bet": {
|
|
"post": {
|
|
"description": "Create bet at branch",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"transaction"
|
|
],
|
|
"summary": "Create bet at branch",
|
|
"parameters": [
|
|
{
|
|
"description": "create bet",
|
|
"name": "createBet",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ShopBetReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ShopTransactionRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/shop/bet/{id}": {
|
|
"get": {
|
|
"description": "Cashout bet at branch",
|
|
"description": "Cashout bet at branch",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"transaction"
|
|
"transaction"
|
|
],
|
|
"summary": "Cashout bet at branch",
|
|
"parameters": [
|
|
{
|
|
"description": "cashout bet",
|
|
"name": "createBet",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.CashoutReq"
|
|
}
|
|
}
|
|
],
|
|
"summary": "Cashout bet at branch",
|
|
"parameters": [
|
|
{
|
|
"description": "cashout bet",
|
|
"name": "createBet",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.CashoutReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ShopTransactionRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/shop/bet/{id}/cashout": {
|
|
"post": {
|
|
"description": "Cashout bet at branch",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"transaction"
|
|
],
|
|
"summary": "Cashout bet at branch",
|
|
"parameters": [
|
|
{
|
|
"description": "cashout bet",
|
|
"name": "cashoutBet",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.CashoutReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ShopTransactionRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/shop/cashout": {
|
|
"post": {
|
|
"description": "Cashout bet by cashoutID",
|
|
"description": "Cashout bet by cashoutID",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"transaction"
|
|
"transaction"
|
|
],
|
|
"summary": "Cashout bet by cashoutID",
|
|
"summary": "Cashout bet by cashoutID",
|
|
"parameters": [
|
|
{
|
|
"description": "cashout bet",
|
|
"name": "cashoutBet",
|
|
"description": "cashout bet",
|
|
"name": "cashoutBet",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.CashoutReq"
|
|
"$ref": "#/definitions/domain.CashoutReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ShopTransactionRes"
|
|
"$ref": "#/definitions/domain.ShopTransactionRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/shop/cashout/{id}": {
|
|
"get": {
|
|
"description": "Cashout bet at branch",
|
|
"description": "Cashout bet at branch",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"transaction"
|
|
"transaction"
|
|
],
|
|
"summary": "Cashout bet at branch",
|
|
"summary": "Cashout bet at branch",
|
|
"parameters": [
|
|
{
|
|
"description": "cashout bet",
|
|
"name": "createBet",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.CashoutReq"
|
|
}
|
|
"description": "cashout bet",
|
|
"name": "createBet",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.CashoutReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ShopTransactionRes"
|
|
"$ref": "#/definitions/domain.ShopTransactionRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/shop/deposit": {
|
|
"post": {
|
|
"description": "Transfers money from branch wallet to customer wallet",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"transaction"
|
|
"transaction"
|
|
],
|
|
"summary": "Shop deposit into customer wallet",
|
|
"summary": "Shop deposit into customer wallet",
|
|
"parameters": [
|
|
{
|
|
"description": "ShopDepositReq",
|
|
"name": "transferToWallet",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ShopDepositReq"
|
|
}
|
|
"description": "ShopDepositReq",
|
|
"name": "transferToWallet",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ShopDepositReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.TransferWalletRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/shop/transaction": {
|
|
"get": {
|
|
"description": "Gets all the transactions",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"transaction"
|
|
"transaction"
|
|
],
|
|
"summary": "Gets all transactions",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.ShopTransactionRes"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/shop/transaction/{id}": {
|
|
"get": {
|
|
"description": "Gets a single transaction by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"transaction"
|
|
],
|
|
"summary": "Gets transaction by id",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Transaction ID",
|
|
"description": "Transaction ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ShopTransactionRes"
|
|
"$ref": "#/definitions/domain.ShopTransactionRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"description": "Updates the verified status of a transaction",
|
|
"put": {
|
|
"description": "Updates the verified status of a transaction",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"transaction"
|
|
"transaction"
|
|
],
|
|
"summary": "Updates the verified field of a transaction",
|
|
"summary": "Updates the verified field of a transaction",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Transaction ID",
|
|
"description": "Transaction ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Updates Transaction Verification",
|
|
"name": "updateVerified",
|
|
"description": "Updates Transaction Verification",
|
|
"name": "updateVerified",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.UpdateTransactionVerifiedReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/shop/transaction/{id}/bet": {
|
|
"get": {
|
|
"description": "Gets a single shop bet by transaction id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"transaction"
|
|
"transaction"
|
|
],
|
|
"summary": "Gets shop bet by transaction id",
|
|
"summary": "Gets shop bet by transaction id",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Transaction ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
"type": "integer",
|
|
"description": "Transaction ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ShopTransactionRes"
|
|
"$ref": "#/definitions/domain.ShopTransactionRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/sport/bet": {
|
|
"get": {
|
|
"description": "Gets all the bets",
|
|
"description": "Gets all the bets",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"bet"
|
|
"bet"
|
|
],
|
|
"summary": "Gets all bets",
|
|
"summary": "Gets all bets",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.BetRes"
|
|
"$ref": "#/definitions/domain.BetRes"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "Creates a bet",
|
|
"description": "Creates a bet",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"bet"
|
|
"bet"
|
|
],
|
|
"summary": "Create a bet",
|
|
"summary": "Create a bet",
|
|
"parameters": [
|
|
{
|
|
"description": "Creates bet",
|
|
"name": "createBet",
|
|
"description": "Creates bet",
|
|
"name": "createBet",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.CreateBetReq"
|
|
"$ref": "#/definitions/domain.CreateBetReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.BetRes"
|
|
"$ref": "#/definitions/domain.BetRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/sport/bet/cashout/{id}": {
|
|
"get": {
|
|
"description": "Gets a single bet by cashout id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"bet"
|
|
"bet"
|
|
],
|
|
"summary": "Gets bet by cashout id",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "cashout ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.BetRes"
|
|
"$ref": "#/definitions/domain.BetRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/sport/bet/fastcode": {
|
|
"post": {
|
|
"description": "Creates a bet with fast code",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"bet"
|
|
"bet"
|
|
],
|
|
"summary": "Create a bet with fast code",
|
|
"parameters": [
|
|
{
|
|
"description": "Creates bet",
|
|
"name": "createBetWithFastCode",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.CreateBetReq"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Deletes bet by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"bet"
|
|
],
|
|
"summary": "Deletes bet by id",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Bet ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.BetRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/sport/bet/{id}": {
|
|
"get": {
|
|
"description": "Gets a single bet by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"bet"
|
|
"bet"
|
|
],
|
|
"summary": "Gets bet by id",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Bet ID",
|
|
"description": "Bet ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Updates Cashed Out",
|
|
"name": "updateCashOut",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.UpdateCashOutReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.BetRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Deletes bet by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"bet"
|
|
],
|
|
"summary": "Deletes bet by id",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Bet ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"description": "Updates the cashed out field",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"bet"
|
|
"bet"
|
|
],
|
|
"summary": "Updates the cashed out field",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Bet ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Updates Cashed Out",
|
|
"name": "updateCashOut",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.UpdateCashOutReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/sport/random/bet": {
|
|
"post": {
|
|
"description": "Generate a random bet",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"bet"
|
|
],
|
|
"summary": "Generate a random bet",
|
|
"parameters": [
|
|
{
|
|
"description": "Create Random bet",
|
|
"name": "createBet",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.RandomBetReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.BetRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/supportedOperation": {
|
|
"get": {
|
|
"description": "Gets all supported operations",
|
|
"description": "Gets all supported operations",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"branch"
|
|
"branch"
|
|
],
|
|
"summary": "Gets all supported operations",
|
|
"summary": "Gets all supported operations",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/handlers.BranchDetailRes"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "Creates a supported operation",
|
|
"description": "Creates a supported operation",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"branch"
|
|
"branch"
|
|
],
|
|
"summary": "Create a supported operation",
|
|
"summary": "Create a supported operation",
|
|
"parameters": [
|
|
{
|
|
"description": "Creates supported operation",
|
|
"name": "createSupportedOperation",
|
|
"description": "Creates supported operation",
|
|
"name": "createSupportedOperation",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.CreateSupportedOperationReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.SupportedOperationRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/ticket": {
|
|
"get": {
|
|
"description": "Retrieve all tickets",
|
|
"description": "Retrieve all tickets",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ticket"
|
|
],
|
|
"summary": "Get all tickets",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.TicketRes"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "Creates a temporary ticket",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ticket"
|
|
],
|
|
"summary": "Create a temporary ticket",
|
|
"ticket"
|
|
],
|
|
"summary": "Get all tickets",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.TicketRes"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "Creates a temporary ticket",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ticket"
|
|
],
|
|
"summary": "Create a temporary ticket",
|
|
"parameters": [
|
|
{
|
|
"description": "Creates ticket",
|
|
"name": "createTicket",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.CreateTicketReq"
|
|
}
|
|
"description": "Creates ticket",
|
|
"name": "createTicket",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.CreateTicketReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.CreateTicketRes"
|
|
"$ref": "#/definitions/domain.CreateTicketRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/ticket/{id}": {
|
|
"get": {
|
|
"description": "Retrieve ticket details by ticket ID",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ticket"
|
|
"ticket"
|
|
],
|
|
"summary": "Get ticket by ID",
|
|
"summary": "Get ticket by ID",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Ticket ID",
|
|
"description": "Ticket ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.TicketRes"
|
|
"$ref": "#/definitions/domain.TicketRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/top-leagues": {
|
|
"get": {
|
|
"description": "Retrieve all top leagues",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"prematch"
|
|
],
|
|
"summary": "Retrieve all top leagues",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/handlers.TopLeague"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/transfer/refill/:id": {
|
|
"post": {
|
|
"description": "Super Admin route to refill a wallet",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"transfer"
|
|
],
|
|
"summary": "Refill wallet",
|
|
"parameters": [
|
|
{
|
|
"description": "Create Transfer",
|
|
"name": "refillWallet",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.CreateTransferReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.TransferWalletRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/transfer/wallet/:id": {
|
|
"post": {
|
|
"description": "Create a transfer to wallet",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"transfer"
|
|
],
|
|
"summary": "Create a transfer to wallet",
|
|
"parameters": [
|
|
{
|
|
"description": "Create Transfer",
|
|
"name": "transferToWallet",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.CreateTransferReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.TransferWalletRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/transfer/wallet/{id}": {
|
|
"get": {
|
|
"description": "Get transfer by wallet",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"transfer"
|
|
],
|
|
"summary": "Get transfer by wallet",
|
|
"parameters": [
|
|
{
|
|
"description": "Create Transfer",
|
|
"name": "transferToWallet",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.CreateTransferReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.TransferWalletRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/user/bets": {
|
|
"get": {
|
|
"description": "Gets user bets",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Gets user bets",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.BetRes"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/user/checkPhoneEmailExist": {
|
|
"post": {
|
|
"description": "Check if phone number or email exist",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Check if phone number or email exist",
|
|
"parameters": [
|
|
{
|
|
"description": "Check phone number or email exist",
|
|
"name": "checkPhoneEmailExist",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.CheckPhoneEmailExistReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.CheckPhoneEmailExistRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/user/delete/{id}": {
|
|
"delete": {
|
|
"description": "Delete a user by their ID",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Delete user by ID",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "User ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/user/profile": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "Get user profile",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Get user profile",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.UserProfileRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/user/register": {
|
|
"post": {
|
|
"description": "Register user",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Register user",
|
|
"parameters": [
|
|
{
|
|
"description": "Register user",
|
|
"name": "registerUser",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.RegisterUserReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/user/resetPassword": {
|
|
"post": {
|
|
"description": "Reset password",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Reset password",
|
|
"parameters": [
|
|
{
|
|
"description": "Reset password",
|
|
"name": "resetPassword",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.ResetPasswordReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/user/search": {
|
|
"post": {
|
|
"description": "Search for user using name or phone",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Search for user using name or phone",
|
|
"parameters": [
|
|
{
|
|
"description": "Search for using his name or phone",
|
|
"name": "searchUserByNameOrPhone",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.SearchUserByNameOrPhoneReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.UserProfileRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/user/sendRegisterCode": {
|
|
"post": {
|
|
"description": "Send register code",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Send register code",
|
|
"parameters": [
|
|
{
|
|
"description": "Send register code",
|
|
"name": "registerCode",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.RegisterCodeReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/user/sendResetCode": {
|
|
"post": {
|
|
"description": "Send reset code",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Send reset code",
|
|
"parameters": [
|
|
{
|
|
"description": "Send reset code",
|
|
"name": "resetCode",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.ResetCodeReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/user/single/{id}": {
|
|
"get": {
|
|
"description": "Get a single user by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Get user by id",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "User ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.UserProfileRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/user/suspend": {
|
|
"post": {
|
|
"description": "Suspend or unsuspend a user",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Suspend or unsuspend a user",
|
|
"parameters": [
|
|
{
|
|
"description": "Suspend or unsuspend a user",
|
|
"name": "updateUserSuspend",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.UpdateUserSuspendReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.UpdateUserSuspendRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/user/wallet": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "Retrieve customer wallet details",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"wallet"
|
|
],
|
|
"summary": "Get customer wallet",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Company ID",
|
|
"name": "company_id",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.CustomerWalletRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/veli/games-list": {
|
|
"post": {
|
|
"description": "Retrieves games for the specified provider",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Virtual Games - VeliGames"
|
|
],
|
|
"summary": "Get games by provider",
|
|
"parameters": [
|
|
{
|
|
"description": "Brand and Provider ID",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GameListRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"502": {
|
|
"description": "Bad Gateway",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/veli/gaming-activity": {
|
|
"post": {
|
|
"description": "Retrieves successfully processed gaming activity transactions (BET, WIN, CANCEL) from Veli Games",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Virtual Games - VeliGames"
|
|
],
|
|
"summary": "Get Veli Gaming Activity",
|
|
"parameters": [
|
|
{
|
|
"description": "Gaming Activity Request",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GamingActivityRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.Response"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/domain.GamingActivityResponse"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/veli/providers": {
|
|
"post": {
|
|
"description": "Retrieves the list of VeliGames providers",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Virtual Games - VeliGames"
|
|
],
|
|
"summary": "Get game providers",
|
|
"parameters": [
|
|
{
|
|
"description": "Brand ID and paging options",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ProviderRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.Response"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.ProviderResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/veli/start-demo-game": {
|
|
"post": {
|
|
"description": "Starts a demo session of the specified game (must support demo mode)",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Virtual Games - VeliGames"
|
|
],
|
|
"summary": "Start a demo game session",
|
|
"parameters": [
|
|
{
|
|
"description": "Start demo game input",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.DemoGameRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.Response"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/domain.GameStartResponse"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"502": {
|
|
"description": "Bad Gateway",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/veli/start-game": {
|
|
"post": {
|
|
"description": "Starts a real VeliGames session with the given player and game info",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Virtual Games - VeliGames"
|
|
],
|
|
"summary": "Start a real game session",
|
|
"parameters": [
|
|
{
|
|
"description": "Start game input",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GameStartRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.Response"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/domain.GameStartResponse"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"502": {
|
|
"description": "Bad Gateway",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/virtual-game/favorites": {
|
|
"get": {
|
|
"description": "Lists the games that the user marked as favorite",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"VirtualGames - Favourites"
|
|
],
|
|
"summary": "Get user's favorite games",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.GameRecommendation"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "Adds a game to the user's favorite games list",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"VirtualGames - Favourites"
|
|
],
|
|
"summary": "Add game to favorites",
|
|
"parameters": [
|
|
{
|
|
"description": "Game ID to add",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.FavoriteGameRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "created",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/virtual-game/favorites/{gameID}": {
|
|
"delete": {
|
|
"description": "Removes a game from the user's favorites",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"VirtualGames - Favourites"
|
|
],
|
|
"summary": "Remove game from favorites",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Game ID to remove",
|
|
"name": "gameID",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "removed",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/wallet": {
|
|
"get": {
|
|
"description": "Retrieve all wallets",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"wallet"
|
|
],
|
|
"summary": "Get all wallets",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/handlers.WalletRes"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/wallet/{id}": {
|
|
"get": {
|
|
"description": "Retrieve wallet details by wallet ID",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"wallet"
|
|
],
|
|
"summary": "Get wallet by ID",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Wallet ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.WalletRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"description": "Can activate and deactivate wallet",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"wallet"
|
|
],
|
|
"summary": "Activate and Deactivate Wallet",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Wallet ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Update Wallet Active",
|
|
"name": "updateCashOut",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.UpdateWalletActiveReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/webhooks/alea": {
|
|
"post": {
|
|
"description": "Handles webhook callbacks from Alea Play virtual games for bet settlement",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Alea Virtual Games"
|
|
],
|
|
"summary": "Process Alea Play game callback",
|
|
"parameters": [
|
|
{
|
|
"description": "Callback payload",
|
|
"name": "callback",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.AleaPlayCallback"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Callback processed successfully",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"allOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"status": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/popok/games": {
|
|
"get": {
|
|
"description": "Retrieves the list of available PopOK slot games",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Virtual Games - PopOK"
|
|
],
|
|
"summary": "Get PopOK Games List",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"default": "USD",
|
|
"description": "Currency (e.g. USD, ETB)",
|
|
"name": "currency",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.PopOKGame"
|
|
}
|
|
}
|
|
},
|
|
"502": {
|
|
"description": "Bad Gateway",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/popok/games/recommend": {
|
|
"get": {
|
|
"description": "Recommends games based on user history or randomly",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Virtual Games - PopOK"
|
|
],
|
|
"summary": "Recommend virtual games",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "User ID",
|
|
"name": "user_id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.GameRecommendation"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/virtual-game/callback": {
|
|
"post": {
|
|
"description": "Processes callbacks from PopOK for game events",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Virtual Games - PopOK"
|
|
],
|
|
"summary": "Handle PopOK game callback",
|
|
"parameters": [
|
|
{
|
|
"description": "Callback data",
|
|
"name": "callback",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.PopOKCallback"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/virtual-game/launch": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"Bearer": []
|
|
}
|
|
],
|
|
"description": "Generates a URL to launch a PopOK game",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Virtual Games - PopOK"
|
|
],
|
|
"summary": "Launch a PopOK virtual game",
|
|
"parameters": [
|
|
{
|
|
"description": "Game launch details",
|
|
"name": "launch",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.launchVirtualGameReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.launchVirtualGameRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"domain.AleaPlayCallback": {
|
|
"type": "object",
|
|
"properties": {
|
|
"amount": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"event_id": {
|
|
"type": "string"
|
|
},
|
|
"game_id": {
|
|
"type": "string"
|
|
},
|
|
"is_free_round": {
|
|
"type": "boolean"
|
|
},
|
|
"multiplier": {
|
|
"type": "number"
|
|
},
|
|
"operator_id": {
|
|
"type": "string"
|
|
},
|
|
"round_id": {
|
|
"type": "string"
|
|
},
|
|
"session_id": {
|
|
"type": "string"
|
|
},
|
|
"signature": {
|
|
"type": "string"
|
|
},
|
|
"timestamp": {
|
|
"type": "integer"
|
|
},
|
|
"transaction_id": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"description": "BET, WIN, CASHOUT, etc.",
|
|
"type": "string"
|
|
},
|
|
"user_id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.Bank": {
|
|
"type": "object",
|
|
"properties": {
|
|
"acct_length": {
|
|
"type": "integer"
|
|
},
|
|
"active": {
|
|
"type": "integer"
|
|
},
|
|
"bank_logo": {
|
|
"description": "URL or base64",
|
|
"type": "string"
|
|
},
|
|
"country_id": {
|
|
"type": "integer"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"is_24hrs": {
|
|
"description": "nullable",
|
|
"type": "integer"
|
|
},
|
|
"is_active": {
|
|
"type": "integer"
|
|
},
|
|
"is_mobilemoney": {
|
|
"description": "nullable",
|
|
"type": "integer"
|
|
},
|
|
"is_rtgs": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"slug": {
|
|
"type": "string"
|
|
},
|
|
"swift": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.BetOutcome": {
|
|
"type": "object",
|
|
"properties": {
|
|
"away_team_name": {
|
|
"type": "string",
|
|
"example": "Liverpool"
|
|
},
|
|
"bet_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"event_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"expires": {
|
|
"type": "string",
|
|
"example": "2025-04-08T12:00:00Z"
|
|
},
|
|
"home_team_name": {
|
|
"type": "string",
|
|
"example": "Manchester"
|
|
},
|
|
"id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"market_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"market_name": {
|
|
"type": "string",
|
|
"example": "Fulltime Result"
|
|
},
|
|
"odd": {
|
|
"type": "number",
|
|
"example": 1.5
|
|
},
|
|
"odd_handicap": {
|
|
"type": "string",
|
|
"example": "1"
|
|
},
|
|
"odd_header": {
|
|
"type": "string",
|
|
"example": "1"
|
|
},
|
|
"odd_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"odd_name": {
|
|
"type": "string",
|
|
"example": "1"
|
|
},
|
|
"sport_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"status": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.OutcomeStatus"
|
|
}
|
|
],
|
|
"example": 1
|
|
}
|
|
}
|
|
},
|
|
"domain.BetRes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"amount": {
|
|
"type": "number",
|
|
"example": 100
|
|
},
|
|
"cashed_out": {
|
|
"type": "boolean",
|
|
"example": false
|
|
},
|
|
"created_at": {
|
|
"type": "string",
|
|
"example": "2025-04-08T12:00:00Z"
|
|
},
|
|
"fast_code": {
|
|
"type": "string"
|
|
},
|
|
"full_name": {
|
|
"type": "string",
|
|
"example": "John Smith"
|
|
},
|
|
"id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"is_shop_bet": {
|
|
"type": "boolean",
|
|
"example": false
|
|
},
|
|
"outcomes": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.BetOutcome"
|
|
}
|
|
},
|
|
"status": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.OutcomeStatus"
|
|
}
|
|
],
|
|
"example": 1
|
|
},
|
|
"total_odds": {
|
|
"type": "number",
|
|
"example": 4.22
|
|
},
|
|
"user_id": {
|
|
"type": "integer",
|
|
"example": 2
|
|
}
|
|
}
|
|
},
|
|
"domain.CashoutReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"account_name": {
|
|
"type": "string"
|
|
},
|
|
"account_number": {
|
|
"type": "string"
|
|
},
|
|
"bank_code": {
|
|
"type": "string"
|
|
},
|
|
"beneficiary_name": {
|
|
"type": "string"
|
|
},
|
|
"branch_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"cashout_id": {
|
|
"type": "string",
|
|
"example": "1234"
|
|
},
|
|
"payment_option": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PaymentOption"
|
|
}
|
|
],
|
|
"example": 1
|
|
},
|
|
"reference_number": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.ChapaDepositRequestPayload": {
|
|
"type": "object",
|
|
"required": [
|
|
"amount"
|
|
],
|
|
"properties": {
|
|
"amount": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"domain.ChapaDepositResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"checkoutURL": {
|
|
"type": "string"
|
|
},
|
|
"reference": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.ChapaVerificationResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"amount": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"tx_ref": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.ChapaWebhookPayload": {
|
|
"type": "object",
|
|
"properties": {
|
|
"amount": {
|
|
"type": "integer"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/domain.PaymentStatus"
|
|
},
|
|
"tx_ref": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.ChapaWithdrawalRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"account_name": {
|
|
"type": "string"
|
|
},
|
|
"account_number": {
|
|
"type": "string"
|
|
},
|
|
"amount": {
|
|
"description": "string because Chapa API uses string for monetary values",
|
|
"type": "string"
|
|
},
|
|
"bank_code": {
|
|
"type": "integer"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"reference": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.CompanyRes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"admin_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"deducted_percentage": {
|
|
"type": "number",
|
|
"example": 0.1
|
|
},
|
|
"id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"is_active": {
|
|
"type": "boolean",
|
|
"example": true
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "CompanyName"
|
|
},
|
|
"wallet_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
}
|
|
}
|
|
},
|
|
"domain.CreateBetOutcomeReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"event_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"market_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"odd_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
}
|
|
}
|
|
},
|
|
"domain.CreateBetReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"amount": {
|
|
"type": "number",
|
|
"example": 100
|
|
},
|
|
"branch_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"outcomes": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.CreateBetOutcomeReq"
|
|
}
|
|
},
|
|
"phone_number": {
|
|
"type": "string",
|
|
"example": "1234567890"
|
|
}
|
|
}
|
|
},
|
|
"domain.CreateTicketOutcomeReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"event_id": {
|
|
"description": "TicketID int64 `json:\"ticket_id\" example:\"1\"`",
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"market_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"odd_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
}
|
|
}
|
|
},
|
|
"domain.CreateTicketReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"amount": {
|
|
"type": "number",
|
|
"example": 100
|
|
},
|
|
"outcomes": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.CreateTicketOutcomeReq"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"domain.CreateTicketRes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_number": {
|
|
"type": "integer",
|
|
"example": 3
|
|
},
|
|
"fast_code": {
|
|
"type": "integer",
|
|
"example": 1234
|
|
}
|
|
}
|
|
},
|
|
"domain.DashboardSummary": {
|
|
"type": "object",
|
|
"properties": {
|
|
"active_admins": {
|
|
"type": "integer"
|
|
},
|
|
"active_bets": {
|
|
"type": "integer"
|
|
},
|
|
"active_branches": {
|
|
"type": "integer"
|
|
},
|
|
"active_cashiers": {
|
|
"type": "integer"
|
|
},
|
|
"active_companies": {
|
|
"type": "integer"
|
|
},
|
|
"active_customers": {
|
|
"type": "integer"
|
|
},
|
|
"active_games": {
|
|
"type": "integer"
|
|
},
|
|
"active_managers": {
|
|
"type": "integer"
|
|
},
|
|
"average_stake": {
|
|
"type": "integer"
|
|
},
|
|
"branches_count": {
|
|
"type": "integer"
|
|
},
|
|
"customer_count": {
|
|
"type": "integer"
|
|
},
|
|
"inactive_admins": {
|
|
"type": "integer"
|
|
},
|
|
"inactive_branches": {
|
|
"type": "integer"
|
|
},
|
|
"inactive_cashiers": {
|
|
"type": "integer"
|
|
},
|
|
"inactive_companies": {
|
|
"type": "integer"
|
|
},
|
|
"inactive_customers": {
|
|
"type": "integer"
|
|
},
|
|
"inactive_games": {
|
|
"type": "integer"
|
|
},
|
|
"inactive_managers": {
|
|
"type": "integer"
|
|
},
|
|
"profit": {
|
|
"type": "integer"
|
|
},
|
|
"read_notifications": {
|
|
"type": "integer"
|
|
},
|
|
"total_admins": {
|
|
"type": "integer"
|
|
},
|
|
"total_bets": {
|
|
"type": "integer"
|
|
},
|
|
"total_cashiers": {
|
|
"type": "integer"
|
|
},
|
|
"total_companies": {
|
|
"type": "integer"
|
|
},
|
|
"total_deposits": {
|
|
"type": "integer"
|
|
},
|
|
"total_games": {
|
|
"type": "integer"
|
|
},
|
|
"total_losses": {
|
|
"type": "integer"
|
|
},
|
|
"total_managers": {
|
|
"type": "integer"
|
|
},
|
|
"total_notifications": {
|
|
"type": "integer"
|
|
},
|
|
"total_stakes": {
|
|
"type": "integer"
|
|
},
|
|
"total_wallets": {
|
|
"type": "integer"
|
|
},
|
|
"total_wins": {
|
|
"type": "integer"
|
|
},
|
|
"total_withdrawals": {
|
|
"type": "integer"
|
|
},
|
|
"unread_notifications": {
|
|
"type": "integer"
|
|
},
|
|
"win_balance": {
|
|
"type": "integer"
|
|
},
|
|
"win_rate": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"domain.DemoGameRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"brandId": {
|
|
"type": "string"
|
|
},
|
|
"country": {
|
|
"type": "string"
|
|
},
|
|
"deviceType": {
|
|
"type": "string"
|
|
},
|
|
"gameId": {
|
|
"type": "string"
|
|
},
|
|
"ip": {
|
|
"type": "string"
|
|
},
|
|
"language": {
|
|
"type": "string"
|
|
},
|
|
"playerId": {
|
|
"type": "string"
|
|
},
|
|
"providerId": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.ErrorResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.EventStatus": {
|
|
"type": "string",
|
|
"enum": [
|
|
"upcoming",
|
|
"in_play",
|
|
"to_be_fixed",
|
|
"ended",
|
|
"postponed",
|
|
"cancelled",
|
|
"walkover",
|
|
"interrupted",
|
|
"abandoned",
|
|
"retired",
|
|
"suspended",
|
|
"decided_by_fa",
|
|
"removed"
|
|
],
|
|
"x-enum-varnames": [
|
|
"STATUS_PENDING",
|
|
"STATUS_IN_PLAY",
|
|
"STATUS_TO_BE_FIXED",
|
|
"STATUS_ENDED",
|
|
"STATUS_POSTPONED",
|
|
"STATUS_CANCELLED",
|
|
"STATUS_WALKOVER",
|
|
"STATUS_INTERRUPTED",
|
|
"STATUS_ABANDONED",
|
|
"STATUS_RETIRED",
|
|
"STATUS_SUSPENDED",
|
|
"STATUS_DECIDED_BY_FA",
|
|
"STATUS_REMOVED"
|
|
]
|
|
},
|
|
"domain.FavoriteGameRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"game_id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"domain.GameListRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"brandId": {
|
|
"type": "string"
|
|
},
|
|
"page": {
|
|
"type": "integer"
|
|
},
|
|
"providerId": {
|
|
"type": "string"
|
|
},
|
|
"size": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"domain.GameRecommendation": {
|
|
"type": "object",
|
|
"properties": {
|
|
"bets": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
"game_id": {
|
|
"type": "integer"
|
|
},
|
|
"game_name": {
|
|
"type": "string"
|
|
},
|
|
"reason": {
|
|
"description": "e.g., \"Based on your activity\", \"Popular\", \"Random pick\"",
|
|
"type": "string"
|
|
},
|
|
"thumbnail": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.GameStartRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"brandId": {
|
|
"type": "string"
|
|
},
|
|
"cashierUrl": {
|
|
"type": "string"
|
|
},
|
|
"country": {
|
|
"type": "string"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"deviceType": {
|
|
"type": "string"
|
|
},
|
|
"gameId": {
|
|
"type": "string"
|
|
},
|
|
"ip": {
|
|
"type": "string"
|
|
},
|
|
"language": {
|
|
"type": "string"
|
|
},
|
|
"lobbyUrl": {
|
|
"type": "string"
|
|
},
|
|
"playerId": {
|
|
"type": "string"
|
|
},
|
|
"playerName": {
|
|
"type": "string"
|
|
},
|
|
"providerId": {
|
|
"type": "string"
|
|
},
|
|
"sessionId": {
|
|
"type": "string"
|
|
},
|
|
"userAgent": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.GameStartResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"startGameUrl": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.GamingActivityItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"actionType": {
|
|
"type": "string"
|
|
},
|
|
"amount": {
|
|
"type": "number"
|
|
},
|
|
"amountEur": {
|
|
"type": "number"
|
|
},
|
|
"amountUsd": {
|
|
"type": "number"
|
|
},
|
|
"brandId": {
|
|
"type": "string"
|
|
},
|
|
"correlationId": {
|
|
"type": "string"
|
|
},
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"gameId": {
|
|
"type": "string"
|
|
},
|
|
"playerId": {
|
|
"type": "string"
|
|
},
|
|
"providerId": {
|
|
"type": "string"
|
|
},
|
|
"refActionType": {
|
|
"type": "string"
|
|
},
|
|
"refRoundType": {
|
|
"type": "string"
|
|
},
|
|
"refTransactionId": {
|
|
"type": "string"
|
|
},
|
|
"roundId": {
|
|
"type": "string"
|
|
},
|
|
"roundType": {
|
|
"type": "string"
|
|
},
|
|
"sessionId": {
|
|
"type": "string"
|
|
},
|
|
"transactionId": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.GamingActivityRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"brandId": {
|
|
"description": "Required",
|
|
"type": "string"
|
|
},
|
|
"currencies": {
|
|
"description": "Optional",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"excludeFreeWin": {
|
|
"description": "Optional",
|
|
"type": "boolean"
|
|
},
|
|
"fromDate": {
|
|
"description": "YYYY-MM-DD",
|
|
"type": "string"
|
|
},
|
|
"gameIds": {
|
|
"description": "Optional",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"page": {
|
|
"description": "Optional, default 1",
|
|
"type": "integer"
|
|
},
|
|
"playerIds": {
|
|
"description": "Optional",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"providerId": {
|
|
"description": "Optional",
|
|
"type": "string"
|
|
},
|
|
"size": {
|
|
"description": "Optional, default 100",
|
|
"type": "integer"
|
|
},
|
|
"toDate": {
|
|
"description": "YYYY-MM-DD",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.GamingActivityResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.GamingActivityItem"
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/definitions/domain.PaginationMeta"
|
|
}
|
|
}
|
|
},
|
|
"domain.InstResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"description": "Changed to interface{} for flexibility"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"pagination": {
|
|
"description": "Made pointer and optional",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.Pagination"
|
|
}
|
|
]
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.League": {
|
|
"type": "object",
|
|
"properties": {
|
|
"bet365_id": {
|
|
"type": "integer",
|
|
"example": 1121
|
|
},
|
|
"cc": {
|
|
"type": "string",
|
|
"example": "uk"
|
|
},
|
|
"id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"is_active": {
|
|
"type": "boolean",
|
|
"example": false
|
|
},
|
|
"is_featured": {
|
|
"type": "boolean",
|
|
"example": false
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "BPL"
|
|
},
|
|
"sport_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
}
|
|
}
|
|
},
|
|
"domain.LogEntry": {
|
|
"type": "object",
|
|
"properties": {
|
|
"caller": {
|
|
"type": "string"
|
|
},
|
|
"env": {
|
|
"type": "string"
|
|
},
|
|
"fields": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
},
|
|
"level": {
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"service": {
|
|
"type": "string"
|
|
},
|
|
"stacktrace": {
|
|
"type": "string"
|
|
},
|
|
"timestamp": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.LogResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.LogEntry"
|
|
}
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"pagination": {
|
|
"$ref": "#/definitions/domain.Pagination"
|
|
}
|
|
}
|
|
},
|
|
"domain.Odd": {
|
|
"type": "object",
|
|
"properties": {
|
|
"category": {
|
|
"type": "string"
|
|
},
|
|
"event_id": {
|
|
"type": "string"
|
|
},
|
|
"fetched_at": {
|
|
"type": "string"
|
|
},
|
|
"fi": {
|
|
"type": "string"
|
|
},
|
|
"handicap": {
|
|
"type": "string"
|
|
},
|
|
"is_active": {
|
|
"type": "boolean"
|
|
},
|
|
"market_category": {
|
|
"type": "string"
|
|
},
|
|
"market_id": {
|
|
"type": "string"
|
|
},
|
|
"market_name": {
|
|
"type": "string"
|
|
},
|
|
"market_type": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"odds_value": {
|
|
"type": "number"
|
|
},
|
|
"raw_odds": {
|
|
"type": "array",
|
|
"items": {}
|
|
},
|
|
"section": {
|
|
"type": "string"
|
|
},
|
|
"source": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.OutcomeStatus": {
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1,
|
|
2,
|
|
3,
|
|
4,
|
|
5
|
|
],
|
|
"x-enum-comments": {
|
|
"OUTCOME_STATUS_ERROR": "Half Win and Half Given Back",
|
|
"OUTCOME_STATUS_HALF": "Half Win and Half Given Back",
|
|
"OUTCOME_STATUS_VOID": "Give Back"
|
|
},
|
|
"x-enum-varnames": [
|
|
"OUTCOME_STATUS_PENDING",
|
|
"OUTCOME_STATUS_WIN",
|
|
"OUTCOME_STATUS_LOSS",
|
|
"OUTCOME_STATUS_VOID",
|
|
"OUTCOME_STATUS_HALF",
|
|
"OUTCOME_STATUS_ERROR"
|
|
]
|
|
},
|
|
"domain.PaginatedFileResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"pagination": {
|
|
"$ref": "#/definitions/domain.Pagination"
|
|
},
|
|
"status_code": {
|
|
"type": "integer"
|
|
},
|
|
"success": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"domain.Pagination": {
|
|
"type": "object",
|
|
"properties": {
|
|
"current_page": {
|
|
"type": "integer"
|
|
},
|
|
"limit": {
|
|
"type": "integer"
|
|
},
|
|
"total": {
|
|
"type": "integer"
|
|
},
|
|
"total_pages": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"domain.PaginationMeta": {
|
|
"type": "object",
|
|
"properties": {
|
|
"currentPage": {
|
|
"type": "integer"
|
|
},
|
|
"itemCount": {
|
|
"type": "integer"
|
|
},
|
|
"itemsPerPage": {
|
|
"type": "integer"
|
|
},
|
|
"totalItems": {
|
|
"type": "integer"
|
|
},
|
|
"totalPages": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"domain.PaymentOption": {
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1,
|
|
2,
|
|
3
|
|
],
|
|
"x-enum-varnames": [
|
|
"CASH_TRANSACTION",
|
|
"TELEBIRR_TRANSACTION",
|
|
"ARIFPAY_TRANSACTION",
|
|
"BANK"
|
|
]
|
|
},
|
|
"domain.PaymentStatus": {
|
|
"type": "string",
|
|
"enum": [
|
|
"success",
|
|
"pending",
|
|
"completed",
|
|
"failed"
|
|
],
|
|
"x-enum-varnames": [
|
|
"PaymentStatusSuccessful",
|
|
"PaymentStatusPending",
|
|
"PaymentStatusCompleted",
|
|
"PaymentStatusFailed"
|
|
]
|
|
},
|
|
"domain.PopOKCallback": {
|
|
"type": "object",
|
|
"properties": {
|
|
"amount": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"session_id": {
|
|
"type": "string"
|
|
},
|
|
"signature": {
|
|
"description": "HMAC-SHA256 signature for verification",
|
|
"type": "string"
|
|
},
|
|
"timestamp": {
|
|
"type": "integer"
|
|
},
|
|
"transaction_id": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"description": "BET, WIN, REFUND, JACKPOT_WIN",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.PopOKGame": {
|
|
"type": "object",
|
|
"properties": {
|
|
"bets": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "number"
|
|
}
|
|
},
|
|
"gameName": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"status": {
|
|
"type": "integer"
|
|
},
|
|
"thumbnail": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.ProviderRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"brandId": {
|
|
"type": "string"
|
|
},
|
|
"extraData": {
|
|
"type": "boolean"
|
|
},
|
|
"page": {
|
|
"type": "integer"
|
|
},
|
|
"size": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"domain.ProviderResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"logoForDark": {
|
|
"type": "string"
|
|
},
|
|
"logoForLight": {
|
|
"type": "string"
|
|
},
|
|
"providerId": {
|
|
"type": "string"
|
|
},
|
|
"providerName": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"domain.RandomBetReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"branch_id",
|
|
"number_of_bets"
|
|
],
|
|
"properties": {
|
|
"branch_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"number_of_bets": {
|
|
"type": "integer",
|
|
"example": 1
|
|
}
|
|
}
|
|
},
|
|
"domain.RawOddsByMarketID": {
|
|
"type": "object",
|
|
"properties": {
|
|
"fetched_at": {
|
|
"type": "string"
|
|
},
|
|
"handicap": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"market_name": {
|
|
"type": "string"
|
|
},
|
|
"raw_odds": {
|
|
"type": "array",
|
|
"items": {}
|
|
}
|
|
}
|
|
},
|
|
"domain.ReferralSettings": {
|
|
"type": "object",
|
|
"properties": {
|
|
"betReferralBonusPercentage": {
|
|
"type": "number"
|
|
},
|
|
"cashbackPercentage": {
|
|
"type": "number"
|
|
},
|
|
"createdAt": {
|
|
"type": "string"
|
|
},
|
|
"expiresAfterDays": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"maxReferrals": {
|
|
"type": "integer"
|
|
},
|
|
"referralRewardAmount": {
|
|
"type": "number"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string"
|
|
},
|
|
"updatedBy": {
|
|
"type": "string"
|
|
},
|
|
"version": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"domain.ReferralStats": {
|
|
"type": "object",
|
|
"properties": {
|
|
"completedReferrals": {
|
|
"type": "integer"
|
|
},
|
|
"pendingRewards": {
|
|
"type": "number"
|
|
},
|
|
"totalReferrals": {
|
|
"type": "integer"
|
|
},
|
|
"totalRewardEarned": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"domain.ReportedIssue": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"issue_type": {
|
|
"type": "string"
|
|
},
|
|
"metadata": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"user_id": {
|
|
"type": "integer"
|
|
},
|
|
"user_role": {
|
|
"$ref": "#/definitions/domain.Role"
|
|
}
|
|
}
|
|
},
|
|
"domain.Response": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"status_code": {
|
|
"type": "integer"
|
|
},
|
|
"success": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"domain.Role": {
|
|
"type": "string",
|
|
"enum": [
|
|
"super_admin",
|
|
"admin",
|
|
"branch_manager",
|
|
"customer",
|
|
"cashier"
|
|
],
|
|
"x-enum-varnames": [
|
|
"RoleSuperAdmin",
|
|
"RoleAdmin",
|
|
"RoleBranchManager",
|
|
"RoleCustomer",
|
|
"RoleCashier"
|
|
]
|
|
},
|
|
"domain.ShopBetReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"account_name": {
|
|
"type": "string"
|
|
},
|
|
"account_number": {
|
|
"type": "string"
|
|
},
|
|
"amount": {
|
|
"type": "number",
|
|
"example": 100
|
|
},
|
|
"bank_code": {
|
|
"type": "string"
|
|
},
|
|
"beneficiary_name": {
|
|
"type": "string"
|
|
},
|
|
"bet_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"branch_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"full_name": {
|
|
"type": "string",
|
|
"example": "John Smith"
|
|
},
|
|
"outcomes": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.CreateBetOutcomeReq"
|
|
}
|
|
},
|
|
"payment_option": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PaymentOption"
|
|
}
|
|
],
|
|
"example": 1
|
|
},
|
|
"phone_number": {
|
|
"type": "string",
|
|
"example": "0911111111"
|
|
},
|
|
"reference_number": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.ShopDepositReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"account_name": {
|
|
"type": "string"
|
|
},
|
|
"account_number": {
|
|
"type": "string"
|
|
},
|
|
"amount": {
|
|
"type": "number",
|
|
"example": 100
|
|
},
|
|
"bank_code": {
|
|
"description": "FullName string `json:\"full_name\" example:\"John Smith\"`\nPhoneNumber string `json:\"phone_number\" example:\"0911111111\"`",
|
|
"type": "string"
|
|
},
|
|
"beneficiary_name": {
|
|
"type": "string"
|
|
},
|
|
"branch_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"customer_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"payment_option": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PaymentOption"
|
|
}
|
|
],
|
|
"example": 1
|
|
},
|
|
"reference_number": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.ShopTransactionRes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"account_name": {
|
|
"type": "string"
|
|
},
|
|
"account_number": {
|
|
"type": "string"
|
|
},
|
|
"amount": {
|
|
"type": "number",
|
|
"example": 100
|
|
},
|
|
"approved_by": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"approver_first_name": {
|
|
"type": "string",
|
|
"example": "John"
|
|
},
|
|
"approver_last_name": {
|
|
"type": "string",
|
|
"example": "Smith"
|
|
},
|
|
"approver_phone_number": {
|
|
"type": "string",
|
|
"example": "0911111111"
|
|
},
|
|
"bank_code": {
|
|
"type": "string"
|
|
},
|
|
"beneficiary_name": {
|
|
"type": "string"
|
|
},
|
|
"branch_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"branch_location": {
|
|
"type": "string",
|
|
"example": "Branch Location"
|
|
},
|
|
"branch_name": {
|
|
"type": "string",
|
|
"example": "Branch Name"
|
|
},
|
|
"cashier_name": {
|
|
"type": "string",
|
|
"example": "John Smith"
|
|
},
|
|
"company_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"creator_first_name": {
|
|
"type": "string",
|
|
"example": "John"
|
|
},
|
|
"creator_last_name": {
|
|
"type": "string",
|
|
"example": "Smith"
|
|
},
|
|
"creator_phone_number": {
|
|
"type": "string",
|
|
"example": "0911111111"
|
|
},
|
|
"full_name": {
|
|
"type": "string",
|
|
"example": "John Smith"
|
|
},
|
|
"id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"payment_option": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PaymentOption"
|
|
}
|
|
],
|
|
"example": 1
|
|
},
|
|
"phone_number": {
|
|
"type": "string",
|
|
"example": "0911111111"
|
|
},
|
|
"reference_number": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"user_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"verified": {
|
|
"type": "boolean",
|
|
"example": true
|
|
}
|
|
}
|
|
},
|
|
"domain.TicketOutcome": {
|
|
"type": "object",
|
|
"properties": {
|
|
"away_team_name": {
|
|
"type": "string",
|
|
"example": "Liverpool"
|
|
},
|
|
"event_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"expires": {
|
|
"type": "string",
|
|
"example": "2025-04-08T12:00:00Z"
|
|
},
|
|
"home_team_name": {
|
|
"type": "string",
|
|
"example": "Manchester"
|
|
},
|
|
"id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"market_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"market_name": {
|
|
"type": "string",
|
|
"example": "Fulltime Result"
|
|
},
|
|
"odd": {
|
|
"type": "number",
|
|
"example": 1.5
|
|
},
|
|
"odd_handicap": {
|
|
"type": "string",
|
|
"example": "1"
|
|
},
|
|
"odd_header": {
|
|
"type": "string",
|
|
"example": "1"
|
|
},
|
|
"odd_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"odd_name": {
|
|
"type": "string",
|
|
"example": "1"
|
|
},
|
|
"status": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.OutcomeStatus"
|
|
}
|
|
],
|
|
"example": 1
|
|
},
|
|
"ticket_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
}
|
|
}
|
|
},
|
|
"domain.TicketRes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"amount": {
|
|
"type": "number",
|
|
"example": 100
|
|
},
|
|
"id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"outcomes": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.TicketOutcome"
|
|
}
|
|
},
|
|
"total_odds": {
|
|
"type": "number",
|
|
"example": 4.22
|
|
}
|
|
}
|
|
},
|
|
"domain.UpcomingEvent": {
|
|
"type": "object",
|
|
"properties": {
|
|
"away_kit_image": {
|
|
"description": "Kit or image for away team (optional)",
|
|
"type": "string"
|
|
},
|
|
"away_team": {
|
|
"description": "Away team name (can be empty/null)",
|
|
"type": "string"
|
|
},
|
|
"away_team_id": {
|
|
"description": "Away team ID (can be empty/null)",
|
|
"type": "integer"
|
|
},
|
|
"flagged": {
|
|
"description": "Whether the event is flagged or not",
|
|
"type": "boolean"
|
|
},
|
|
"home_kit_image": {
|
|
"description": "Kit or image for home team (optional)",
|
|
"type": "string"
|
|
},
|
|
"home_team": {
|
|
"description": "Home team name (if available)",
|
|
"type": "string"
|
|
},
|
|
"home_team_id": {
|
|
"description": "Home team ID",
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"description": "Event ID",
|
|
"type": "string"
|
|
},
|
|
"league_cc": {
|
|
"description": "League country code",
|
|
"type": "string"
|
|
},
|
|
"league_id": {
|
|
"description": "League ID",
|
|
"type": "integer"
|
|
},
|
|
"league_name": {
|
|
"description": "League name",
|
|
"type": "string"
|
|
},
|
|
"match_name": {
|
|
"description": "Match or event name",
|
|
"type": "string"
|
|
},
|
|
"source": {
|
|
"description": "bet api provider (bet365, betfair)",
|
|
"type": "string"
|
|
},
|
|
"sport_id": {
|
|
"description": "Sport ID",
|
|
"type": "integer"
|
|
},
|
|
"start_time": {
|
|
"description": "Converted from \"time\" field in UNIX format",
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"description": "Match Status for event",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.EventStatus"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"domain.UpdateCompanyReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"admin_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"deducted_percentage": {
|
|
"type": "number",
|
|
"example": 0.1
|
|
},
|
|
"is_active": {
|
|
"type": "boolean",
|
|
"example": true
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "CompanyName"
|
|
}
|
|
}
|
|
},
|
|
"domain.UpdateTransactionVerifiedReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"verified": {
|
|
"type": "boolean",
|
|
"example": true
|
|
}
|
|
}
|
|
},
|
|
"handlers.AdminRes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"email_verified": {
|
|
"type": "boolean"
|
|
},
|
|
"first_name": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"last_login": {
|
|
"type": "string"
|
|
},
|
|
"last_name": {
|
|
"type": "string"
|
|
},
|
|
"phone_number": {
|
|
"type": "string"
|
|
},
|
|
"phone_verified": {
|
|
"type": "boolean"
|
|
},
|
|
"role": {
|
|
"$ref": "#/definitions/domain.Role"
|
|
},
|
|
"suspended": {
|
|
"type": "boolean"
|
|
},
|
|
"suspended_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"handlers.BranchDetailRes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"balance": {
|
|
"type": "number",
|
|
"example": 100.5
|
|
},
|
|
"branch_manager_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"company_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"is_active": {
|
|
"type": "boolean",
|
|
"example": false
|
|
},
|
|
"is_self_owned": {
|
|
"type": "boolean",
|
|
"example": false
|
|
},
|
|
"is_wallet_active": {
|
|
"type": "boolean",
|
|
"example": false
|
|
},
|
|
"location": {
|
|
"type": "string",
|
|
"example": "Addis Ababa"
|
|
},
|
|
"manager_name": {
|
|
"type": "string",
|
|
"example": "John Smith"
|
|
},
|
|
"manager_phone_number": {
|
|
"type": "string",
|
|
"example": "0911111111"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "4-kilo Branch"
|
|
},
|
|
"wallet_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
}
|
|
}
|
|
},
|
|
"handlers.BranchOperationRes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": {
|
|
"type": "string",
|
|
"example": "Betting on sport events"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "SportsBook"
|
|
}
|
|
}
|
|
},
|
|
"handlers.BranchRes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"branch_manager_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"company_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"is_active": {
|
|
"type": "boolean",
|
|
"example": false
|
|
},
|
|
"is_self_owned": {
|
|
"type": "boolean",
|
|
"example": false
|
|
},
|
|
"location": {
|
|
"type": "string",
|
|
"example": "Addis Ababa"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "4-kilo Branch"
|
|
},
|
|
"wallet_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
}
|
|
}
|
|
},
|
|
"handlers.CheckPhoneEmailExistReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"example": "john.doe@example.com"
|
|
},
|
|
"phone_number": {
|
|
"type": "string",
|
|
"example": "1234567890"
|
|
}
|
|
}
|
|
},
|
|
"handlers.CheckPhoneEmailExistRes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email_exist": {
|
|
"type": "boolean"
|
|
},
|
|
"phone_number_exist": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"handlers.CreateAdminReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"company_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"email": {
|
|
"type": "string",
|
|
"example": "john.doe@example.com"
|
|
},
|
|
"first_name": {
|
|
"type": "string",
|
|
"example": "John"
|
|
},
|
|
"last_name": {
|
|
"type": "string",
|
|
"example": "Doe"
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"example": "password123"
|
|
},
|
|
"phone_number": {
|
|
"type": "string",
|
|
"example": "1234567890"
|
|
}
|
|
}
|
|
},
|
|
"handlers.CreateCashierReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"branch_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"email": {
|
|
"type": "string",
|
|
"example": "john.doe@example.com"
|
|
},
|
|
"first_name": {
|
|
"type": "string",
|
|
"example": "John"
|
|
},
|
|
"last_name": {
|
|
"type": "string",
|
|
"example": "Doe"
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"example": "password123"
|
|
},
|
|
"phone_number": {
|
|
"type": "string",
|
|
"example": "1234567890"
|
|
},
|
|
"suspended": {
|
|
"type": "boolean",
|
|
"example": false
|
|
}
|
|
}
|
|
},
|
|
"handlers.CreateManagerReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"company_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"email": {
|
|
"type": "string",
|
|
"example": "john.doe@example.com"
|
|
},
|
|
"first_name": {
|
|
"type": "string",
|
|
"example": "John"
|
|
},
|
|
"last_name": {
|
|
"type": "string",
|
|
"example": "Doe"
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"example": "password123"
|
|
},
|
|
"phone_number": {
|
|
"type": "string",
|
|
"example": "1234567890"
|
|
}
|
|
}
|
|
},
|
|
"handlers.CreateSupportedOperationReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": {
|
|
"type": "string",
|
|
"example": "Betting on sport events"
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"example": "SportsBook"
|
|
}
|
|
}
|
|
},
|
|
"handlers.CreateTransferReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"amount": {
|
|
"type": "number",
|
|
"example": 100
|
|
},
|
|
"payment_method": {
|
|
"type": "string",
|
|
"example": "cash"
|
|
}
|
|
}
|
|
},
|
|
"handlers.CustomerWalletRes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"customer_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"first_name": {
|
|
"type": "string",
|
|
"example": "John"
|
|
},
|
|
"first_name": {
|
|
"type": "string",
|
|
"example": "John"
|
|
},
|
|
"id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"last_name": {
|
|
"type": "string",
|
|
"example": "Smith"
|
|
},
|
|
"phone_number": {
|
|
"type": "string",
|
|
"example": "0911111111"
|
|
},
|
|
"last_name": {
|
|
"type": "string",
|
|
"example": "Smith"
|
|
},
|
|
"phone_number": {
|
|
"type": "string",
|
|
"example": "0911111111"
|
|
},
|
|
"regular_balance": {
|
|
"type": "number",
|
|
"example": 100
|
|
},
|
|
"regular_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"regular_is_active": {
|
|
"type": "boolean",
|
|
"example": true
|
|
},
|
|
"regular_is_active": {
|
|
"type": "boolean",
|
|
"example": true
|
|
},
|
|
"regular_updated_at": {
|
|
"type": "string"
|
|
},
|
|
"static_balance": {
|
|
"type": "number",
|
|
"example": 100
|
|
},
|
|
"static_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"static_is_active": {
|
|
"type": "boolean",
|
|
"example": true
|
|
},
|
|
"static_is_active": {
|
|
"type": "boolean",
|
|
"example": true
|
|
},
|
|
"static_updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"handlers.CustomersRes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"email_verified": {
|
|
"type": "boolean"
|
|
},
|
|
"first_name": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"last_login": {
|
|
"type": "string"
|
|
},
|
|
"last_name": {
|
|
"type": "string"
|
|
},
|
|
"phone_number": {
|
|
"type": "string"
|
|
},
|
|
"phone_verified": {
|
|
"type": "boolean"
|
|
},
|
|
"role": {
|
|
"$ref": "#/definitions/domain.Role"
|
|
},
|
|
"suspended": {
|
|
"type": "boolean"
|
|
},
|
|
"suspended_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"handlers.CustomersRes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"email_verified": {
|
|
"type": "boolean"
|
|
},
|
|
"first_name": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"last_login": {
|
|
"type": "string"
|
|
},
|
|
"last_name": {
|
|
"type": "string"
|
|
},
|
|
"phone_number": {
|
|
"type": "string"
|
|
},
|
|
"phone_verified": {
|
|
"type": "boolean"
|
|
},
|
|
"role": {
|
|
"$ref": "#/definitions/domain.Role"
|
|
},
|
|
"suspended": {
|
|
"type": "boolean"
|
|
},
|
|
"suspended_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"handlers.GetCashierRes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"branch_id": {
|
|
"type": "integer"
|
|
},
|
|
"branch_location": {
|
|
"type": "string"
|
|
},
|
|
"branch_name": {
|
|
"type": "string"
|
|
},
|
|
"branch_wallet": {
|
|
"type": "integer"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"email_verified": {
|
|
"type": "boolean"
|
|
},
|
|
"first_name": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"last_login": {
|
|
"type": "string"
|
|
},
|
|
"last_name": {
|
|
"type": "string"
|
|
},
|
|
"phone_number": {
|
|
"type": "string"
|
|
},
|
|
"phone_verified": {
|
|
"type": "boolean"
|
|
},
|
|
"role": {
|
|
"$ref": "#/definitions/domain.Role"
|
|
},
|
|
"suspended": {
|
|
"type": "boolean"
|
|
},
|
|
"suspended_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"handlers.ManagersRes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"email_verified": {
|
|
"type": "boolean"
|
|
},
|
|
"first_name": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"last_login": {
|
|
"type": "string"
|
|
},
|
|
"last_name": {
|
|
"type": "string"
|
|
},
|
|
"phone_number": {
|
|
"type": "string"
|
|
},
|
|
"phone_verified": {
|
|
"type": "boolean"
|
|
},
|
|
"role": {
|
|
"$ref": "#/definitions/domain.Role"
|
|
},
|
|
"suspended": {
|
|
"type": "boolean"
|
|
},
|
|
"suspended_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"handlers.RegisterCodeReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"example": "john.doe@example.com"
|
|
},
|
|
"phone_number": {
|
|
"type": "string",
|
|
"example": "1234567890"
|
|
}
|
|
}
|
|
},
|
|
"handlers.RegisterUserReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"example": "john.doe@example.com"
|
|
},
|
|
"first_name": {
|
|
"type": "string",
|
|
"example": "John"
|
|
},
|
|
"last_name": {
|
|
"type": "string",
|
|
"example": "Doe"
|
|
},
|
|
"otp": {
|
|
"type": "string",
|
|
"example": "123456"
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"example": "password123"
|
|
},
|
|
"phone_number": {
|
|
"type": "string",
|
|
"example": "1234567890"
|
|
},
|
|
"referal_code": {
|
|
"type": "string",
|
|
"example": "ABC123"
|
|
}
|
|
}
|
|
},
|
|
"handlers.ResetCodeReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"example": "john.doe@example.com"
|
|
},
|
|
"phone_number": {
|
|
"type": "string",
|
|
"example": "1234567890"
|
|
}
|
|
}
|
|
},
|
|
"handlers.ResetPasswordReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"otp",
|
|
"password"
|
|
],
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"example": "john.doe@example.com"
|
|
},
|
|
"otp": {
|
|
"type": "string",
|
|
"example": "123456"
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"minLength": 8,
|
|
"example": "newpassword123"
|
|
},
|
|
"phone_number": {
|
|
"type": "string",
|
|
"example": "1234567890"
|
|
}
|
|
}
|
|
},
|
|
"handlers.ResultRes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"outcomes": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.BetOutcome"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"handlers.SearchUserByNameOrPhoneReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"query": {
|
|
"type": "string"
|
|
},
|
|
"role": {
|
|
"$ref": "#/definitions/domain.Role"
|
|
}
|
|
}
|
|
},
|
|
"handlers.SetLeagueActiveReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"is_active": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"handlers.TopLeague": {
|
|
"handlers.TopLeague": {
|
|
"type": "object",
|
|
"properties": {
|
|
"events": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.UpcomingEvent"
|
|
}
|
|
"events": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.UpcomingEvent"
|
|
}
|
|
},
|
|
"league_cc": {
|
|
"league_cc": {
|
|
"type": "string"
|
|
},
|
|
"league_id": {
|
|
"type": "integer"
|
|
"league_id": {
|
|
"type": "integer"
|
|
},
|
|
"league_name": {
|
|
"league_name": {
|
|
"type": "string"
|
|
},
|
|
"league_sport_id": {
|
|
"type": "integer"
|
|
"league_sport_id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"handlers.TransferWalletRes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"amount": {
|
|
"type": "number"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"depositor_first_name": {
|
|
"type": "string"
|
|
},
|
|
"depositor_id": {
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"depositor_first_name": {
|
|
"type": "string"
|
|
},
|
|
"depositor_id": {
|
|
"type": "integer"
|
|
},
|
|
"depositor_last_name": {
|
|
"type": "string"
|
|
},
|
|
"depositor_phone_number": {
|
|
"depositor_last_name": {
|
|
"type": "string"
|
|
},
|
|
"depositor_phone_number": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"payment_method": {
|
|
"type": "string"
|
|
},
|
|
"receiver_wallet_id": {
|
|
"type": "integer"
|
|
},
|
|
"reference_number": {
|
|
"description": "← Add this",
|
|
"type": "string"
|
|
},
|
|
"sender_wallet_id": {
|
|
"type": "integer"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"verified": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"handlers.UpdateCashOutReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"cashedOut": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"handlers.UpdateUserSuspendReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"user_id"
|
|
],
|
|
"properties": {
|
|
"suspended": {
|
|
"type": "boolean",
|
|
"example": true
|
|
},
|
|
"user_id": {
|
|
"type": "integer",
|
|
"example": 123
|
|
}
|
|
}
|
|
},
|
|
"handlers.UpdateUserSuspendRes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"suspended": {
|
|
"type": "boolean"
|
|
},
|
|
"user_id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"handlers.UpdateWalletActiveReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"is_active"
|
|
],
|
|
"properties": {
|
|
"is_active": {
|
|
"type": "boolean",
|
|
"example": true
|
|
}
|
|
}
|
|
},
|
|
"handlers.UserProfileRes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"email_verified": {
|
|
"type": "boolean"
|
|
},
|
|
"first_name": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"last_login": {
|
|
"type": "string"
|
|
},
|
|
"last_name": {
|
|
"type": "string"
|
|
},
|
|
"phone_number": {
|
|
"type": "string"
|
|
},
|
|
"phone_verified": {
|
|
"type": "boolean"
|
|
},
|
|
"role": {
|
|
"$ref": "#/definitions/domain.Role"
|
|
},
|
|
"suspended": {
|
|
"type": "boolean"
|
|
},
|
|
"suspended_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"handlers.WalletRes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"amount": {
|
|
"type": "number",
|
|
"example": 100
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"is_active": {
|
|
"type": "boolean",
|
|
"example": true
|
|
},
|
|
"is_bettable": {
|
|
"type": "boolean",
|
|
"example": true
|
|
},
|
|
"is_transferable": {
|
|
"type": "boolean",
|
|
"example": true
|
|
},
|
|
"is_withdraw": {
|
|
"type": "boolean",
|
|
"example": true
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"user_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
}
|
|
}
|
|
},
|
|
"handlers.launchVirtualGameReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"currency",
|
|
"game_id",
|
|
"mode"
|
|
],
|
|
"properties": {
|
|
"currency": {
|
|
"type": "string",
|
|
"example": "USD"
|
|
},
|
|
"game_id": {
|
|
"type": "string",
|
|
"example": "1"
|
|
"example": "1"
|
|
},
|
|
"mode": {
|
|
"type": "string",
|
|
"enum": [
|
|
"fun",
|
|
"real"
|
|
],
|
|
"example": "real"
|
|
}
|
|
}
|
|
},
|
|
"handlers.launchVirtualGameRes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"launch_url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"handlers.loginCustomerReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"password"
|
|
],
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"example": "john.doe@example.com"
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"example": "password123"
|
|
},
|
|
"phone_number": {
|
|
"type": "string",
|
|
"example": "1234567890"
|
|
}
|
|
}
|
|
},
|
|
"handlers.loginCustomerRes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"access_token": {
|
|
"type": "string"
|
|
},
|
|
"refresh_token": {
|
|
"type": "string"
|
|
},
|
|
"role": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"handlers.logoutReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"refresh_token"
|
|
],
|
|
"properties": {
|
|
"refresh_token": {
|
|
"type": "string",
|
|
"example": "\u003crefresh-token\u003e"
|
|
}
|
|
}
|
|
},
|
|
"handlers.refreshToken": {
|
|
"type": "object",
|
|
"required": [
|
|
"access_token",
|
|
"refresh_token"
|
|
],
|
|
"properties": {
|
|
"access_token": {
|
|
"type": "string",
|
|
"example": "\u003cjwt-token\u003e"
|
|
},
|
|
"refresh_token": {
|
|
"type": "string",
|
|
"example": "\u003crefresh-token\u003e"
|
|
}
|
|
}
|
|
},
|
|
"handlers.updateAdminReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"company_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"first_name": {
|
|
"type": "string",
|
|
"example": "John"
|
|
},
|
|
"last_name": {
|
|
"type": "string",
|
|
"example": "Doe"
|
|
},
|
|
"suspended": {
|
|
"type": "boolean",
|
|
"example": false
|
|
}
|
|
}
|
|
},
|
|
"handlers.updateCashierReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"first_name": {
|
|
"type": "string",
|
|
"example": "John"
|
|
},
|
|
"last_name": {
|
|
"type": "string",
|
|
"example": "Doe"
|
|
},
|
|
"suspended": {
|
|
"type": "boolean",
|
|
"example": false
|
|
}
|
|
}
|
|
},
|
|
"handlers.updateCustomerReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"company_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"first_name": {
|
|
"type": "string",
|
|
"example": "John"
|
|
},
|
|
"last_name": {
|
|
"type": "string",
|
|
"example": "Doe"
|
|
},
|
|
"suspended": {
|
|
"type": "boolean",
|
|
"example": false
|
|
}
|
|
}
|
|
},
|
|
"handlers.updateCustomerReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"company_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"first_name": {
|
|
"type": "string",
|
|
"example": "John"
|
|
},
|
|
"last_name": {
|
|
"type": "string",
|
|
"example": "Doe"
|
|
},
|
|
"suspended": {
|
|
"type": "boolean",
|
|
"example": false
|
|
}
|
|
}
|
|
},
|
|
"handlers.updateManagerReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"company_id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"first_name": {
|
|
"type": "string",
|
|
"example": "John"
|
|
},
|
|
"last_name": {
|
|
"type": "string",
|
|
"example": "Doe"
|
|
},
|
|
"suspended": {
|
|
"type": "boolean",
|
|
"example": false
|
|
}
|
|
}
|
|
},
|
|
"response.APIResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"metadata": {},
|
|
"page": {
|
|
"type": "integer"
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/response.Status"
|
|
},
|
|
"timestamp": {
|
|
"type": "string"
|
|
},
|
|
"total": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"response.Status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"error",
|
|
"success"
|
|
],
|
|
"x-enum-varnames": [
|
|
"Error",
|
|
"Success"
|
|
]
|
|
}
|
|
},
|
|
"securityDefinitions": {
|
|
"Bearer": {
|
|
"type": "apiKey",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
}
|
|
}
|
|
} |