Igris/docs/swagger.yaml

220 lines
4.8 KiB
YAML

definitions:
dto.APIResponse:
properties:
data: {}
message:
type: string
success:
type: boolean
type: object
dto.AuthenticateRequest:
properties:
pubKey:
type: string
signature:
type: string
required:
- pubKey
- signature
type: object
dto.AuthenticateResponse:
properties:
authorizationToken:
type: string
expiresAt:
type: integer
refreshToken:
type: string
type: object
dto.ChallengeRequest:
properties:
pubKey:
type: string
required:
- pubKey
type: object
dto.ChallengeResponse:
properties:
expiresAt:
type: string
message:
type: string
timeStamp:
type: string
type: object
dto.KYCVerifyRequest:
properties:
birthDate:
type: string
nationalId:
type: string
required:
- birthDate
- nationalId
type: object
dto.OTPProviderReq:
properties:
receptor:
type: string
type: object
dto.OTPProviderResponse:
properties:
message:
type: string
type: object
dto.OTPVerifyRequest:
properties:
code:
type: string
phone:
type: string
required:
- code
- phone
type: object
dto.OTPVerifyResponse:
properties:
message:
type: string
type: object
info:
contact: {}
paths:
/auth/authenticate:
post:
consumes:
- application/json
description: Authenticate user with wallet signature
parameters:
- description: Authentication Request
in: body
name: request
required: true
schema:
$ref: '#/definitions/dto.AuthenticateRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.AuthenticateResponse'
"400":
description: Bad Request
schema:
additionalProperties:
type: string
type: object
"401":
description: Unauthorized
schema:
additionalProperties:
type: string
type: object
summary: Authenticate user
tags:
- auth
/auth/challenge:
post:
consumes:
- application/json
description: Generate a challenge message for wallet authentication
parameters:
- description: Challenge Request
in: body
name: request
required: true
schema:
$ref: '#/definitions/dto.ChallengeRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.ChallengeResponse'
"400":
description: Bad Request
schema:
additionalProperties:
type: string
type: object
"500":
description: Internal Server Error
schema:
additionalProperties:
type: string
type: object
summary: Generate authentication challenge
tags:
- auth
/auth/kyc:
post:
consumes:
- application/json
description: Verify user KYC with national ID and birth date
parameters:
- description: KYC Verify Request
in: body
name: request
required: true
schema:
$ref: '#/definitions/dto.KYCVerifyRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.APIResponse'
"400":
description: Bad Request
schema:
additionalProperties:
type: string
type: object
"500":
description: Internal Server Error
schema:
additionalProperties:
type: string
type: object
summary: Verify user KYC
tags:
- auth
/auth/otp:
post:
consumes:
- application/json
description: Verify the provided OTP code for the phone number
parameters:
- description: OTP Verify Request
in: body
name: request
required: true
schema:
$ref: '#/definitions/dto.OTPVerifyRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/dto.OTPVerifyResponse'
"400":
description: Bad Request
schema:
additionalProperties:
type: string
type: object
"401":
description: Unauthorized
schema:
additionalProperties:
type: string
type: object
summary: Verify OTP code
tags:
- auth
swagger: "2.0"