2203 lines
53 KiB
YAML
2203 lines
53 KiB
YAML
definitions:
|
|
domain.BetOutcome:
|
|
properties:
|
|
betID:
|
|
type: integer
|
|
eventID:
|
|
type: integer
|
|
id:
|
|
type: integer
|
|
oddID:
|
|
type: integer
|
|
type: object
|
|
domain.BetStatus:
|
|
enum:
|
|
- 0
|
|
- 1
|
|
- 2
|
|
- 3
|
|
type: integer
|
|
x-enum-varnames:
|
|
- BET_STATUS_PENDING
|
|
- BET_STATUS_WIN
|
|
- BET_STATUS_LOSS
|
|
- BET_STATUS_ERROR
|
|
domain.PaymentOption:
|
|
enum:
|
|
- 0
|
|
- 1
|
|
- 2
|
|
- 3
|
|
type: integer
|
|
x-enum-varnames:
|
|
- CASH_TRANSACTION
|
|
- TELEBIRR_TRANSACTION
|
|
- ARIFPAY_TRANSACTION
|
|
- BANK
|
|
domain.Role:
|
|
enum:
|
|
- super_admin
|
|
- admin
|
|
- branch_manager
|
|
- customer
|
|
- cashier
|
|
type: string
|
|
x-enum-varnames:
|
|
- RoleSuperAdmin
|
|
- RoleAdmin
|
|
- RoleBranchManager
|
|
- RoleCustomer
|
|
- RoleCashier
|
|
domain.TicketOutcome:
|
|
properties:
|
|
eventID:
|
|
type: integer
|
|
id:
|
|
type: integer
|
|
oddID:
|
|
type: integer
|
|
ticketID:
|
|
type: integer
|
|
type: object
|
|
handlers.BetOutcome:
|
|
properties:
|
|
event_id:
|
|
example: 1
|
|
type: integer
|
|
odd_id:
|
|
example: 1
|
|
type: integer
|
|
type: object
|
|
handlers.BetRes:
|
|
properties:
|
|
amount:
|
|
example: 100
|
|
type: number
|
|
branch_id:
|
|
example: 2
|
|
type: integer
|
|
full_name:
|
|
example: John
|
|
type: string
|
|
id:
|
|
example: 1
|
|
type: integer
|
|
is_shop_bet:
|
|
example: false
|
|
type: boolean
|
|
outcomes:
|
|
items:
|
|
$ref: '#/definitions/domain.BetOutcome'
|
|
type: array
|
|
phone_number:
|
|
example: "1234567890"
|
|
type: string
|
|
status:
|
|
allOf:
|
|
- $ref: '#/definitions/domain.BetStatus'
|
|
example: 1
|
|
total_odds:
|
|
example: 4.22
|
|
type: number
|
|
user_id:
|
|
example: 2
|
|
type: integer
|
|
type: object
|
|
handlers.BranchDetailRes:
|
|
properties:
|
|
branch_manager_id:
|
|
example: 1
|
|
type: integer
|
|
company_id:
|
|
example: 1
|
|
type: integer
|
|
id:
|
|
example: 1
|
|
type: integer
|
|
is_self_owned:
|
|
example: false
|
|
type: boolean
|
|
location:
|
|
example: Addis Ababa
|
|
type: string
|
|
manager_name:
|
|
example: John Smith
|
|
type: string
|
|
manager_phone_number:
|
|
example: "0911111111"
|
|
type: string
|
|
name:
|
|
example: 4-kilo Branch
|
|
type: string
|
|
wallet_id:
|
|
example: 1
|
|
type: integer
|
|
type: object
|
|
handlers.BranchOperationRes:
|
|
properties:
|
|
description:
|
|
example: Betting on sport events
|
|
type: string
|
|
name:
|
|
example: SportsBook
|
|
type: string
|
|
type: object
|
|
handlers.BranchRes:
|
|
properties:
|
|
branch_manager_id:
|
|
example: 1
|
|
type: integer
|
|
company_id:
|
|
example: 1
|
|
type: integer
|
|
id:
|
|
example: 1
|
|
type: integer
|
|
is_self_owned:
|
|
example: false
|
|
type: boolean
|
|
location:
|
|
example: Addis Ababa
|
|
type: string
|
|
name:
|
|
example: 4-kilo Branch
|
|
type: string
|
|
wallet_id:
|
|
example: 1
|
|
type: integer
|
|
type: object
|
|
handlers.CheckPhoneEmailExistReq:
|
|
properties:
|
|
email:
|
|
example: john.doe@example.com
|
|
type: string
|
|
phone_number:
|
|
example: "1234567890"
|
|
type: string
|
|
type: object
|
|
handlers.CheckPhoneEmailExistRes:
|
|
properties:
|
|
email_exist:
|
|
type: boolean
|
|
phone_number_exist:
|
|
type: boolean
|
|
type: object
|
|
handlers.CreateBetReq:
|
|
type: object
|
|
handlers.CreateBranchOperationReq:
|
|
properties:
|
|
branch_id:
|
|
example: 1
|
|
type: integer
|
|
operation_id:
|
|
example: 1
|
|
type: integer
|
|
type: object
|
|
handlers.CreateBranchReq:
|
|
properties:
|
|
branch_manager_id:
|
|
example: 1
|
|
type: integer
|
|
company_id:
|
|
example: 1
|
|
type: integer
|
|
is_self_owned:
|
|
example: false
|
|
type: boolean
|
|
location:
|
|
example: Addis Ababa
|
|
type: string
|
|
name:
|
|
example: 4-kilo Branch
|
|
type: string
|
|
operations:
|
|
items:
|
|
type: integer
|
|
type: array
|
|
type: object
|
|
handlers.CreateCashierReq:
|
|
properties:
|
|
branch_id:
|
|
example: 1
|
|
type: integer
|
|
email:
|
|
example: john.doe@example.com
|
|
type: string
|
|
first_name:
|
|
example: John
|
|
type: string
|
|
last_name:
|
|
example: Doe
|
|
type: string
|
|
password:
|
|
example: password123
|
|
type: string
|
|
phone_number:
|
|
example: "1234567890"
|
|
type: string
|
|
type: object
|
|
handlers.CreateManagerReq:
|
|
properties:
|
|
email:
|
|
example: john.doe@example.com
|
|
type: string
|
|
first_name:
|
|
example: John
|
|
type: string
|
|
last_name:
|
|
example: Doe
|
|
type: string
|
|
password:
|
|
example: password123
|
|
type: string
|
|
phone_number:
|
|
example: "1234567890"
|
|
type: string
|
|
type: object
|
|
handlers.CreateSupportedOperationReq:
|
|
properties:
|
|
description:
|
|
example: Betting on sport events
|
|
type: string
|
|
name:
|
|
example: SportsBook
|
|
type: string
|
|
type: object
|
|
handlers.CreateTicketReq:
|
|
properties:
|
|
amount:
|
|
example: 100
|
|
type: number
|
|
outcomes:
|
|
items:
|
|
$ref: '#/definitions/handlers.TicketOutcome'
|
|
type: array
|
|
total_odds:
|
|
example: 4.22
|
|
type: number
|
|
type: object
|
|
handlers.CreateTicketRes:
|
|
properties:
|
|
created_number:
|
|
example: 3
|
|
type: integer
|
|
fast_code:
|
|
example: 1234
|
|
type: integer
|
|
type: object
|
|
handlers.CreateTransactionReq:
|
|
properties:
|
|
account_name:
|
|
type: string
|
|
account_number:
|
|
type: string
|
|
amount:
|
|
example: 100
|
|
type: number
|
|
bank_code:
|
|
description: Payment Details for bank
|
|
type: string
|
|
beneficiary_name:
|
|
type: string
|
|
bet_id:
|
|
example: 1
|
|
type: integer
|
|
branch_id:
|
|
example: 1
|
|
type: integer
|
|
cashier_id:
|
|
example: 1
|
|
type: integer
|
|
full_name:
|
|
example: John Smith
|
|
type: string
|
|
payment_option:
|
|
allOf:
|
|
- $ref: '#/definitions/domain.PaymentOption'
|
|
example: 1
|
|
phone_number:
|
|
example: "0911111111"
|
|
type: string
|
|
reference_number:
|
|
type: string
|
|
type:
|
|
example: 1
|
|
type: integer
|
|
type: object
|
|
handlers.CreateTransferReq:
|
|
properties:
|
|
amount:
|
|
example: 100
|
|
type: number
|
|
payment_method:
|
|
example: cash
|
|
type: string
|
|
type: object
|
|
handlers.CustomerWalletRes:
|
|
properties:
|
|
company_id:
|
|
example: 1
|
|
type: integer
|
|
created_at:
|
|
type: string
|
|
customer_id:
|
|
example: 1
|
|
type: integer
|
|
id:
|
|
example: 1
|
|
type: integer
|
|
regular_balance:
|
|
example: 100
|
|
type: number
|
|
regular_id:
|
|
example: 1
|
|
type: integer
|
|
regular_updated_at:
|
|
type: string
|
|
static_balance:
|
|
example: 100
|
|
type: number
|
|
static_id:
|
|
example: 1
|
|
type: integer
|
|
static_updated_at:
|
|
type: string
|
|
type: object
|
|
handlers.NullableInt64:
|
|
properties:
|
|
valid:
|
|
type: boolean
|
|
value:
|
|
type: integer
|
|
type: object
|
|
handlers.RegisterCodeReq:
|
|
properties:
|
|
email:
|
|
example: john.doe@example.com
|
|
type: string
|
|
phone_number:
|
|
example: "1234567890"
|
|
type: string
|
|
type: object
|
|
handlers.RegisterUserReq:
|
|
properties:
|
|
email:
|
|
example: john.doe@example.com
|
|
type: string
|
|
first_name:
|
|
example: John
|
|
type: string
|
|
last_name:
|
|
example: Doe
|
|
type: string
|
|
otp:
|
|
description: Role string
|
|
example: "123456"
|
|
type: string
|
|
password:
|
|
example: password123
|
|
type: string
|
|
phone_number:
|
|
example: "1234567890"
|
|
type: string
|
|
referal_code:
|
|
example: ABC123
|
|
type: string
|
|
type: object
|
|
handlers.ResetCodeReq:
|
|
properties:
|
|
email:
|
|
example: john.doe@example.com
|
|
type: string
|
|
phone_number:
|
|
example: "1234567890"
|
|
type: string
|
|
type: object
|
|
handlers.ResetPasswordReq:
|
|
properties:
|
|
email:
|
|
type: string
|
|
otp:
|
|
type: string
|
|
password:
|
|
type: string
|
|
phoneNumber:
|
|
type: string
|
|
type: object
|
|
handlers.SearchUserByNameOrPhoneReq:
|
|
properties:
|
|
searchString:
|
|
type: string
|
|
type: object
|
|
handlers.SupportedOperationRes:
|
|
properties:
|
|
description:
|
|
example: Betting on sport events
|
|
type: string
|
|
id:
|
|
example: 1
|
|
type: integer
|
|
name:
|
|
example: SportsBook
|
|
type: string
|
|
type: object
|
|
handlers.TicketOutcome:
|
|
properties:
|
|
event_id:
|
|
example: 1
|
|
type: integer
|
|
odd_id:
|
|
example: 1
|
|
type: integer
|
|
type: object
|
|
handlers.TicketRes:
|
|
properties:
|
|
amount:
|
|
example: 100
|
|
type: number
|
|
id:
|
|
example: 1
|
|
type: integer
|
|
outcomes:
|
|
items:
|
|
$ref: '#/definitions/domain.TicketOutcome'
|
|
type: array
|
|
total_odds:
|
|
example: 4.22
|
|
type: number
|
|
type: object
|
|
handlers.TransactionRes:
|
|
properties:
|
|
account_name:
|
|
type: string
|
|
account_number:
|
|
type: string
|
|
amount:
|
|
example: 100
|
|
type: number
|
|
bank_code:
|
|
type: string
|
|
beneficiary_name:
|
|
type: string
|
|
bet_id:
|
|
example: 1
|
|
type: integer
|
|
branch_id:
|
|
example: 1
|
|
type: integer
|
|
cashier_id:
|
|
example: 1
|
|
type: integer
|
|
full_name:
|
|
example: John Smith
|
|
type: string
|
|
id:
|
|
example: 1
|
|
type: integer
|
|
payment_option:
|
|
allOf:
|
|
- $ref: '#/definitions/domain.PaymentOption'
|
|
example: 1
|
|
phone_number:
|
|
example: "0911111111"
|
|
type: string
|
|
reference_number:
|
|
type: string
|
|
type:
|
|
example: 1
|
|
type: integer
|
|
verified:
|
|
example: true
|
|
type: boolean
|
|
type: object
|
|
handlers.TransferWalletRes:
|
|
properties:
|
|
amount:
|
|
example: 100
|
|
type: number
|
|
cashier_id:
|
|
example: 789
|
|
type: integer
|
|
created_at:
|
|
example: "2025-04-08T12:00:00Z"
|
|
type: string
|
|
id:
|
|
example: 1
|
|
type: integer
|
|
payment_method:
|
|
example: bank
|
|
type: string
|
|
receiver_wallet_id:
|
|
example: 1
|
|
type: integer
|
|
sender_wallet_id:
|
|
example: 1
|
|
type: integer
|
|
type:
|
|
example: transfer
|
|
type: string
|
|
updated_at:
|
|
example: "2025-04-08T12:30:00Z"
|
|
type: string
|
|
verified:
|
|
example: true
|
|
type: boolean
|
|
type: object
|
|
handlers.UpdateCashOutReq:
|
|
properties:
|
|
cashedOut:
|
|
type: boolean
|
|
type: object
|
|
handlers.UpdateTransactionVerifiedReq:
|
|
properties:
|
|
verified:
|
|
type: boolean
|
|
type: object
|
|
handlers.UpdateWalletActiveReq:
|
|
properties:
|
|
isActive:
|
|
type: boolean
|
|
type: object
|
|
handlers.UserProfileRes:
|
|
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
|
|
type: object
|
|
handlers.WalletRes:
|
|
properties:
|
|
amount:
|
|
example: 100
|
|
type: number
|
|
created_at:
|
|
type: string
|
|
id:
|
|
example: 1
|
|
type: integer
|
|
is_active:
|
|
example: true
|
|
type: boolean
|
|
is_bettable:
|
|
example: true
|
|
type: boolean
|
|
is_transferable:
|
|
example: true
|
|
type: boolean
|
|
is_withdraw:
|
|
example: true
|
|
type: boolean
|
|
updated_at:
|
|
type: string
|
|
user_id:
|
|
example: 1
|
|
type: integer
|
|
type: object
|
|
handlers.loginCustomerReq:
|
|
properties:
|
|
email:
|
|
example: john.doe@example.com
|
|
type: string
|
|
password:
|
|
example: password123
|
|
type: string
|
|
phone_number:
|
|
example: "1234567890"
|
|
type: string
|
|
type: object
|
|
handlers.loginCustomerRes:
|
|
properties:
|
|
access_token:
|
|
type: string
|
|
refresh_token:
|
|
type: string
|
|
role:
|
|
type: string
|
|
type: object
|
|
handlers.logoutReq:
|
|
properties:
|
|
refresh_token:
|
|
type: string
|
|
type: object
|
|
handlers.refreshToken:
|
|
properties:
|
|
access_token:
|
|
type: string
|
|
refresh_token:
|
|
type: string
|
|
type: object
|
|
handlers.updateUserReq:
|
|
properties:
|
|
first_name:
|
|
example: John
|
|
type: string
|
|
last_name:
|
|
example: Doe
|
|
type: string
|
|
suspended:
|
|
example: false
|
|
type: boolean
|
|
type: object
|
|
response.APIResponse:
|
|
properties:
|
|
data: {}
|
|
message:
|
|
type: string
|
|
metadata: {}
|
|
status:
|
|
$ref: '#/definitions/response.Status'
|
|
timestamp:
|
|
type: string
|
|
type: object
|
|
response.Status:
|
|
enum:
|
|
- error
|
|
- success
|
|
type: string
|
|
x-enum-varnames:
|
|
- Error
|
|
- Success
|
|
info:
|
|
contact:
|
|
email: support@swagger.io
|
|
name: API Support
|
|
url: http://www.swagger.io/support
|
|
description: This is server for FortuneBet.
|
|
license:
|
|
name: Apache 2.0
|
|
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
|
termsOfService: http://swagger.io/terms/
|
|
title: FortuneBet API
|
|
version: "1.0"
|
|
paths:
|
|
/auth/login:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Login customer
|
|
parameters:
|
|
- description: Login customer
|
|
in: body
|
|
name: login
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.loginCustomerReq'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Login customer
|
|
tags:
|
|
- auth
|
|
/auth/logout:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Logout customer
|
|
parameters:
|
|
- description: Logout customer
|
|
in: body
|
|
name: logout
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.logoutReq'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Logout customer
|
|
tags:
|
|
- auth
|
|
/auth/refresh:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Refresh token
|
|
parameters:
|
|
- description: tokens
|
|
in: body
|
|
name: refresh
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.refreshToken'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Refresh token
|
|
tags:
|
|
- auth
|
|
/bet:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Gets all the bets
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/handlers.BetRes'
|
|
type: array
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
summary: Gets all bets
|
|
tags:
|
|
- bet
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Creates a bet
|
|
parameters:
|
|
- description: Creates bet
|
|
in: body
|
|
name: createBet
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.CreateBetReq'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Create a bet
|
|
tags:
|
|
- bet
|
|
/bet/{id}:
|
|
delete:
|
|
consumes:
|
|
- application/json
|
|
description: Deletes bet by id
|
|
parameters:
|
|
- description: Bet ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Deletes bet by id
|
|
tags:
|
|
- bet
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Gets a single bet by id
|
|
parameters:
|
|
- description: Bet ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Gets bet by id
|
|
tags:
|
|
- bet
|
|
patch:
|
|
consumes:
|
|
- application/json
|
|
description: Updates the cashed out field
|
|
parameters:
|
|
- description: Bet ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: integer
|
|
- description: Updates Cashed Out
|
|
in: body
|
|
name: updateCashOut
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.UpdateCashOutReq'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Updates the cashed out field
|
|
tags:
|
|
- bet
|
|
/branch:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Gets all branches
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/handlers.BranchDetailRes'
|
|
type: array
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
summary: Gets all branches
|
|
tags:
|
|
- branch
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Creates a branch
|
|
parameters:
|
|
- description: Creates branch
|
|
in: body
|
|
name: createBranch
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.CreateBranchReq'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/handlers.BranchRes'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
summary: Create a branch
|
|
tags:
|
|
- branch
|
|
/branch/{id}:
|
|
delete:
|
|
consumes:
|
|
- application/json
|
|
description: Delete the branch
|
|
parameters:
|
|
- description: Branch ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Delete the branch
|
|
tags:
|
|
- branch
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Gets a single branch by id
|
|
parameters:
|
|
- description: Branch ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/handlers.BranchDetailRes'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
summary: Gets branch by id
|
|
tags:
|
|
- branch
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
description: Updates a branch
|
|
parameters:
|
|
- description: Branch ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: integer
|
|
- description: Update Branch
|
|
in: body
|
|
name: updateBranch
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.CreateBranchReq'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/handlers.BranchRes'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
summary: Updates a branch
|
|
tags:
|
|
- branch
|
|
/branch/{id}/bets:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Gets bets by its branch id
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/handlers.BetRes'
|
|
type: array
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
summary: Gets bets by its branch id
|
|
tags:
|
|
- branch
|
|
/branch/{id}/operation:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Gets branch operations
|
|
parameters:
|
|
- description: Branch ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/handlers.BranchOperationRes'
|
|
type: array
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
summary: Gets branch operations
|
|
tags:
|
|
- branch
|
|
/branch/{id}/operation/{opID}:
|
|
delete:
|
|
consumes:
|
|
- application/json
|
|
description: Delete the branch operation
|
|
parameters:
|
|
- description: Branch ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: integer
|
|
- description: Branch Operation ID
|
|
in: path
|
|
name: opID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Delete the branch operation
|
|
tags:
|
|
- branch
|
|
/branchWallet:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve all branch wallets
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/handlers.WalletRes'
|
|
type: array
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
summary: Get all branch wallets
|
|
tags:
|
|
- wallet
|
|
/cashiers:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Get all cashiers
|
|
parameters:
|
|
- description: Page number
|
|
in: query
|
|
name: page
|
|
type: integer
|
|
- description: Page size
|
|
in: query
|
|
name: page_size
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Get all cashiers
|
|
tags:
|
|
- cashier
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Create cashier
|
|
parameters:
|
|
- description: Create cashier
|
|
in: body
|
|
name: cashier
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.CreateCashierReq'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Create cashier
|
|
tags:
|
|
- cashier
|
|
/cashiers/{id}:
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
description: Update cashier
|
|
parameters:
|
|
- description: Update cashier
|
|
in: body
|
|
name: cashier
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.updateUserReq'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Update cashier
|
|
tags:
|
|
- cashier
|
|
/company/{id}/branch:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Gets branches by company id
|
|
parameters:
|
|
- description: Company ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/handlers.BranchDetailRes'
|
|
type: array
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
summary: Gets branches by company id
|
|
tags:
|
|
- branch
|
|
/manager/{id}/branch:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Gets a branches by manager id
|
|
parameters:
|
|
- description: User ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/handlers.BranchDetailRes'
|
|
type: array
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
summary: Gets branches by manager id
|
|
tags:
|
|
- branch
|
|
/managers:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Get all Managers
|
|
parameters:
|
|
- description: Page number
|
|
in: query
|
|
name: page
|
|
type: integer
|
|
- description: Page size
|
|
in: query
|
|
name: page_size
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Get all Managers
|
|
tags:
|
|
- manager
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Create Managers
|
|
parameters:
|
|
- description: Create manager
|
|
in: body
|
|
name: manger
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.CreateManagerReq'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Create Managers
|
|
tags:
|
|
- manager
|
|
/managers/{id}:
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
description: Update Managers
|
|
parameters:
|
|
- description: Update Managers
|
|
in: body
|
|
name: Managers
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.updateUserReq'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Update Managers
|
|
tags:
|
|
- Managers
|
|
/operation:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Creates a operation
|
|
parameters:
|
|
- description: Creates operation
|
|
in: body
|
|
name: createBranchOperation
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.CreateBranchOperationReq'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/handlers.BranchOperationRes'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
summary: Create a operation
|
|
tags:
|
|
- branch
|
|
/search/branch:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Search branches by name or location
|
|
parameters:
|
|
- description: Search query
|
|
in: query
|
|
name: q
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/handlers.BranchDetailRes'
|
|
type: array
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
summary: Search branches
|
|
tags:
|
|
- branch
|
|
/supportedOperation:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Gets all supported operations
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/handlers.BranchDetailRes'
|
|
type: array
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
summary: Gets all supported operations
|
|
tags:
|
|
- branch
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Creates a supported operation
|
|
parameters:
|
|
- description: Creates supported operation
|
|
in: body
|
|
name: createSupportedOperation
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.CreateSupportedOperationReq'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Create a supported operation
|
|
tags:
|
|
- branch
|
|
/ticket:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve all tickets
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/handlers.TicketRes'
|
|
type: array
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
summary: Get all tickets
|
|
tags:
|
|
- ticket
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Creates a temporary ticket
|
|
parameters:
|
|
- description: Creates ticket
|
|
in: body
|
|
name: createTicket
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.CreateTicketReq'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Create a temporary ticket
|
|
tags:
|
|
- ticket
|
|
/ticket/{id}:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve ticket details by ticket ID
|
|
parameters:
|
|
- description: Ticket ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Get ticket by ID
|
|
tags:
|
|
- ticket
|
|
/transaction:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Gets all the transactions
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/handlers.TransactionRes'
|
|
type: array
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
summary: Gets all transactions
|
|
tags:
|
|
- transaction
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Creates a transaction
|
|
parameters:
|
|
- description: Creates transaction
|
|
in: body
|
|
name: createBet
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.CreateTransactionReq'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/handlers.TransactionRes'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
summary: Create a transaction
|
|
tags:
|
|
- transaction
|
|
/transaction/{id}:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Gets a single transaction by id
|
|
parameters:
|
|
- description: Transaction ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/handlers.TransactionRes'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
summary: Gets transaction by id
|
|
tags:
|
|
- transaction
|
|
patch:
|
|
consumes:
|
|
- application/json
|
|
description: Updates the cashed out field
|
|
parameters:
|
|
- description: Transaction ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: integer
|
|
- description: Updates Transaction Verification
|
|
in: body
|
|
name: updateCashOut
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.UpdateTransactionVerifiedReq'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Updates the cashed out field
|
|
tags:
|
|
- transaction
|
|
/transfer/refill/:id:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Super Admin route to refill a wallet
|
|
parameters:
|
|
- description: Create Transfer
|
|
in: body
|
|
name: refillWallet
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.CreateTransferReq'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Refill wallet
|
|
tags:
|
|
- transfer
|
|
/transfer/wallet/:id:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Create a transfer to wallet
|
|
parameters:
|
|
- description: Create Transfer
|
|
in: body
|
|
name: transferToWallet
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.CreateTransferReq'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Create a transfer to wallet
|
|
tags:
|
|
- transfer
|
|
/transfer/wallet/{id}:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Get transfer by wallet
|
|
parameters:
|
|
- description: Create Transfer
|
|
in: body
|
|
name: transferToWallet
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.CreateTransferReq'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Get transfer by wallet
|
|
tags:
|
|
- transfer
|
|
/user/checkPhoneEmailExist:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Check if phone number or email exist
|
|
parameters:
|
|
- description: Check phone number or email exist
|
|
in: body
|
|
name: checkPhoneEmailExist
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.CheckPhoneEmailExistReq'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Check if phone number or email exist
|
|
tags:
|
|
- user
|
|
/user/profile:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Get user profile
|
|
produces:
|
|
- application/json
|
|
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'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get user profile
|
|
tags:
|
|
- user
|
|
/user/register:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Register user
|
|
parameters:
|
|
- description: Register user
|
|
in: body
|
|
name: registerUser
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.RegisterUserReq'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Register user
|
|
tags:
|
|
- user
|
|
/user/resetPassword:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Reset password
|
|
parameters:
|
|
- description: Reset password
|
|
in: body
|
|
name: resetPassword
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.ResetPasswordReq'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Reset password
|
|
tags:
|
|
- user
|
|
/user/search:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Search for user using name or phone
|
|
parameters:
|
|
- description: Search for using his name or phone
|
|
in: body
|
|
name: searchUserByNameOrPhone
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.SearchUserByNameOrPhoneReq'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Search for user using name or phone
|
|
tags:
|
|
- user
|
|
/user/sendRegisterCode:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Send register code
|
|
parameters:
|
|
- description: Send register code
|
|
in: body
|
|
name: registerCode
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.RegisterCodeReq'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Send register code
|
|
tags:
|
|
- user
|
|
/user/sendResetCode:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Send reset code
|
|
parameters:
|
|
- description: Send reset code
|
|
in: body
|
|
name: resetCode
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.ResetCodeReq'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Send reset code
|
|
tags:
|
|
- user
|
|
/user/wallet:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve customer wallet details
|
|
parameters:
|
|
- description: Company ID
|
|
in: header
|
|
name: company_id
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
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'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get customer wallet
|
|
tags:
|
|
- wallet
|
|
/wallet:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve all wallets
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/handlers.WalletRes'
|
|
type: array
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
summary: Get all wallets
|
|
tags:
|
|
- wallet
|
|
/wallet/{id}:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve wallet details by wallet ID
|
|
parameters:
|
|
- description: Wallet ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Get wallet by ID
|
|
tags:
|
|
- wallet
|
|
patch:
|
|
consumes:
|
|
- application/json
|
|
description: Can activate and deactivate wallet
|
|
parameters:
|
|
- description: Wallet ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: integer
|
|
- description: Update Wallet Active
|
|
in: body
|
|
name: updateCashOut
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.UpdateWalletActiveReq'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Activate and Deactivate Wallet
|
|
tags:
|
|
- wallet
|
|
securityDefinitions:
|
|
Bearer:
|
|
in: header
|
|
name: Authorization
|
|
type: apiKey
|
|
swagger: "2.0"
|