feat: add kyc service http handler and docs
This commit is contained in:
@@ -171,6 +171,58 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/auth/verify-kyc": {
|
||||
"post": {
|
||||
"description": "Verify user KYC with national ID and birth date",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"auth"
|
||||
],
|
||||
"summary": "Verify user KYC",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "KYC Verify Request",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.KYCVerifyRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.KYCVerifyResponse"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/auth/verify-otp": {
|
||||
"post": {
|
||||
"description": "Verify the provided OTP code for the phone number",
|
||||
@@ -279,6 +331,33 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.KYCVerifyRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"birthDate",
|
||||
"nationalId",
|
||||
"userId"
|
||||
],
|
||||
"properties": {
|
||||
"birthDate": {
|
||||
"type": "string"
|
||||
},
|
||||
"nationalId": {
|
||||
"type": "string"
|
||||
},
|
||||
"userId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.KYCVerifyResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.OTPProviderReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@@ -160,6 +160,58 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/auth/verify-kyc": {
|
||||
"post": {
|
||||
"description": "Verify user KYC with national ID and birth date",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"auth"
|
||||
],
|
||||
"summary": "Verify user KYC",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "KYC Verify Request",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.KYCVerifyRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.KYCVerifyResponse"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/auth/verify-otp": {
|
||||
"post": {
|
||||
"description": "Verify the provided OTP code for the phone number",
|
||||
@@ -268,6 +320,33 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.KYCVerifyRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"birthDate",
|
||||
"nationalId",
|
||||
"userId"
|
||||
],
|
||||
"properties": {
|
||||
"birthDate": {
|
||||
"type": "string"
|
||||
},
|
||||
"nationalId": {
|
||||
"type": "string"
|
||||
},
|
||||
"userId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.KYCVerifyResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.OTPProviderReq": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@@ -34,6 +34,24 @@ definitions:
|
||||
timeStamp:
|
||||
type: string
|
||||
type: object
|
||||
dto.KYCVerifyRequest:
|
||||
properties:
|
||||
birthDate:
|
||||
type: string
|
||||
nationalId:
|
||||
type: string
|
||||
userId:
|
||||
type: string
|
||||
required:
|
||||
- birthDate
|
||||
- nationalId
|
||||
- userId
|
||||
type: object
|
||||
dto.KYCVerifyResponse:
|
||||
properties:
|
||||
message:
|
||||
type: string
|
||||
type: object
|
||||
dto.OTPProviderReq:
|
||||
properties:
|
||||
receptor:
|
||||
@@ -164,6 +182,40 @@ paths:
|
||||
summary: Send OTP code
|
||||
tags:
|
||||
- auth
|
||||
/auth/verify-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.KYCVerifyResponse'
|
||||
"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/verify-otp:
|
||||
post:
|
||||
consumes:
|
||||
|
||||
Reference in New Issue
Block a user