1200 lines
38 KiB
JSON
1200 lines
38 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"
|
|
},
|
|
"paths": {
|
|
"/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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/bet": {
|
|
"get": {
|
|
"description": "Gets all the bets",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"bet"
|
|
],
|
|
"summary": "Gets all bets",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/handlers.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",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"bet"
|
|
],
|
|
"summary": "Create a bet",
|
|
"parameters": [
|
|
{
|
|
"description": "Creates bet",
|
|
"name": "createBet",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.CreateBetReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.BetRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/bet/{id}": {
|
|
"get": {
|
|
"description": "Gets a single bet by id",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"bet"
|
|
],
|
|
"summary": "Gets bet by id",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Bet ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.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"
|
|
],
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/ticket": {
|
|
"get": {
|
|
"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/handlers.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/handlers.CreateTicketReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.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"
|
|
],
|
|
"summary": "Get ticket by ID",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Ticket ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/handlers.TicketRes"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"$ref": "#/definitions/response.APIResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"domain.BetStatus": {
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1,
|
|
2,
|
|
3
|
|
],
|
|
"x-enum-varnames": [
|
|
"BET_STATUS_PENDING",
|
|
"BET_STATUS_WIN",
|
|
"BET_STATUS_LOSS",
|
|
"BET_STATUS_ERROR"
|
|
]
|
|
},
|
|
"domain.Outcome": {
|
|
"type": "object"
|
|
},
|
|
"domain.Role": {
|
|
"type": "string",
|
|
"enum": [
|
|
"admin",
|
|
"customer",
|
|
"super_admin",
|
|
"branch_manager",
|
|
"cashier"
|
|
],
|
|
"x-enum-varnames": [
|
|
"RoleAdmin",
|
|
"RoleCustomer",
|
|
"RoleSuperAdmin",
|
|
"RoleBranchManager",
|
|
"RoleCashier"
|
|
]
|
|
},
|
|
"handlers.BetRes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"amount": {
|
|
"type": "number",
|
|
"example": 100
|
|
},
|
|
"branch_id": {
|
|
"type": "integer",
|
|
"example": 2
|
|
},
|
|
"full_name": {
|
|
"type": "string",
|
|
"example": "John"
|
|
},
|
|
"id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"is_shop_bet": {
|
|
"type": "boolean",
|
|
"example": false
|
|
},
|
|
"outcomes": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.Outcome"
|
|
}
|
|
},
|
|
"phone_number": {
|
|
"type": "string",
|
|
"example": "1234567890"
|
|
},
|
|
"status": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.BetStatus"
|
|
}
|
|
],
|
|
"example": 1
|
|
},
|
|
"total_odds": {
|
|
"type": "number",
|
|
"example": 4.22
|
|
},
|
|
"user_id": {
|
|
"type": "integer",
|
|
"example": 2
|
|
}
|
|
}
|
|
},
|
|
"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.CreateBetReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"amount": {
|
|
"type": "number",
|
|
"example": 100
|
|
},
|
|
"full_name": {
|
|
"type": "string",
|
|
"example": "John"
|
|
},
|
|
"is_shop_bet": {
|
|
"type": "boolean",
|
|
"example": false
|
|
},
|
|
"outcomes": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"phone_number": {
|
|
"type": "string",
|
|
"example": "1234567890"
|
|
},
|
|
"status": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.BetStatus"
|
|
}
|
|
],
|
|
"example": 1
|
|
},
|
|
"total_odds": {
|
|
"type": "number",
|
|
"example": 4.22
|
|
}
|
|
}
|
|
},
|
|
"handlers.CreateTicketReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"amount": {
|
|
"type": "number",
|
|
"example": 100
|
|
},
|
|
"outcomes": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"total_odds": {
|
|
"type": "number",
|
|
"example": 4.22
|
|
}
|
|
}
|
|
},
|
|
"handlers.CreateTicketRes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"fast_code": {
|
|
"type": "integer",
|
|
"example": 1234
|
|
}
|
|
}
|
|
},
|
|
"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": {
|
|
"description": "Role string",
|
|
"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",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"otp": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"phoneNumber": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"handlers.TicketRes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"amount": {
|
|
"type": "number",
|
|
"example": 100
|
|
},
|
|
"id": {
|
|
"type": "integer",
|
|
"example": 1
|
|
},
|
|
"outcomes": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.Outcome"
|
|
}
|
|
},
|
|
"total_odds": {
|
|
"type": "number",
|
|
"example": 4.22
|
|
}
|
|
}
|
|
},
|
|
"handlers.UpdateCashOutReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"cashedOut": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"handlers.UserProfileRes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"email_verified": {
|
|
"type": "boolean"
|
|
},
|
|
"first_name": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"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.loginCustomerReq": {
|
|
"type": "object",
|
|
"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"
|
|
}
|
|
}
|
|
},
|
|
"handlers.logoutReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"refresh_token": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"handlers.refreshToken": {
|
|
"type": "object",
|
|
"properties": {
|
|
"access_token": {
|
|
"type": "string"
|
|
},
|
|
"refresh_token": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"response.APIResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"metadata": {},
|
|
"status": {
|
|
"$ref": "#/definitions/response.Status"
|
|
},
|
|
"timestamp": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"response.Status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"error",
|
|
"success"
|
|
],
|
|
"x-enum-varnames": [
|
|
"Error",
|
|
"Success"
|
|
]
|
|
}
|
|
},
|
|
"securityDefinitions": {
|
|
"Bearer": {
|
|
"type": "apiKey",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
}
|
|
}
|
|
} |