Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KYC task verification scenarios. #229

Merged
merged 7 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ kyc/face:
concurrentUsers: 1
kyc/linking:
tenant: sunwaves
# If urls does not match <cmd/*->hostname>/$tenant/ schema.
#tenantURLs:
# callfluent: https://localhost:1444/
# doctorx: https://localhost:1445/
wintr/connectors/storage/v2:
runDDL: true
primaryURL: postgresql://root:pass@localhost:5438/eskimo-global?pool_max_conn_idle_time=1000ms&pool_health_check_period=500ms&pool_max_conns=40
Expand All @@ -86,7 +82,18 @@ kyc/linking:
password: pass
replicaURLs:
- postgresql://root:pass@localhost:5438/eskimo-global?pool_max_conn_idle_time=1000ms&pool_health_check_period=500ms&pool_max_conns=20

# If urls does not match <cmd/*->hostname>/$tenant/ schema.
#tenantURLs:
# callfluent: https://localhost:1444/
# doctorx: https://localhost:1445/
kyc/coinDistributionEligibility:
tenant: sunwaves
configJsonUrl1: https://somewhere.com/something/somebogus.json
# If urls does not match <cmd/*->hostname>/$tenant/ schema.
# tenantURLs:
# sunwaves: https://localhost:7443/
# callfluent: https://localhost:7444/
# doctorx: https://localhost:7445/
kyc/quiz:
environment: local
enable-alerts: false
Expand Down
225 changes: 225 additions & 0 deletions cmd/eskimo-hut/api/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,91 @@ const docTemplate = `{
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/v1r/kyc/verifyCoinDistributionEligibility/users/{userId}": {
"get": {
"description": "Returns the non-completed kyc verification scenarios",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"KYC"
],
"parameters": [
{
"type": "string",
"default": "Bearer \u003cAdd access token here\u003e",
"description": "Insert your access token",
"name": "Authorization",
"in": "header",
"required": true
},
{
"type": "string",
"default": "\u003cAdd metadata token here\u003e",
"description": "Insert your metadata token",
"name": "X-Account-Metadata",
"in": "header"
},
{
"type": "string",
"description": "ID of the user",
"name": "userId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/verificationscenarios.Scenario"
}
}
},
"400": {
"description": "if validations fail",
"schema": {
"$ref": "#/definitions/server.ErrorResponse"
}
},
"401": {
"description": "if not authorized",
"schema": {
"$ref": "#/definitions/server.ErrorResponse"
}
},
"403": {
"description": "if not allowed",
"schema": {
"$ref": "#/definitions/server.ErrorResponse"
}
},
"422": {
"description": "if syntax fails",
"schema": {
"$ref": "#/definitions/server.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/server.ErrorResponse"
}
},
"504": {
"description": "if request times out",
"schema": {
"$ref": "#/definitions/server.ErrorResponse"
}
}
}
}
},
"/v1r/user-statistics/top-countries": {
"get": {
"description": "Returns the paginated view of users per country.",
Expand Down Expand Up @@ -1600,6 +1685,101 @@ const docTemplate = `{
}
}
},
"/v1w/kyc/verifyCoinDistributionEligibility/users/{userId}/scenarios/{scenarioEnum}": {
"post": {
"description": "Verifies if a user is eligible for coin verificationscenarios.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"KYC"
],
"parameters": [
{
"type": "string",
"default": "Bearer \u003cAdd access token here\u003e",
"description": "Insert your access token",
"name": "Authorization",
"in": "header",
"required": true
},
{
"type": "string",
"default": "\u003cAdd metadata token here\u003e",
"description": "Insert your metadata token",
"name": "X-Account-Metadata",
"in": "header"
},
{
"type": "string",
"description": "ID of the user",
"name": "userId",
"in": "path",
"required": true
},
{
"enum": [
"join_cmc",
"join_twitter",
"join_telegram",
"signup_tenants"
],
"type": "string",
"description": "the scenario",
"name": "scenarioEnum",
"in": "path",
"required": true
},
{
"description": "Request params",
"name": "request",
"in": "body",
"schema": {
"$ref": "#/definitions/verificationscenarios.VerificationMetadata"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {}
},
"400": {
"description": "if validations fail",
"schema": {
"$ref": "#/definitions/server.ErrorResponse"
}
},
"401": {
"description": "if not authorized",
"schema": {
"$ref": "#/definitions/server.ErrorResponse"
}
},
"403": {
"description": "not allowed due to various reasons",
"schema": {
"$ref": "#/definitions/server.ErrorResponse"
}
},
"422": {
"description": "if syntax fails",
"schema": {
"$ref": "#/definitions/server.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/server.ErrorResponse"
}
}
}
}
},
"/v1w/kyc/verifySocialKYCStep/users/{userId}": {
"post": {
"description": "Verifies if the user has posted the expected verification post on their social media account.",
Expand Down Expand Up @@ -3550,6 +3730,51 @@ const docTemplate = `{
"example": 11
}
}
},
"verificationscenarios.Scenario": {
"type": "string",
"enum": [
"join_cmc",
"join_twitter",
"join_telegram",
"signup_tenants"
],
"x-enum-varnames": [
"CoinDistributionScenarioCmc",
"CoinDistributionScenarioTwitter",
"CoinDistributionScenarioTelegram",
"CoinDistributionScenarioSignUpTenants"
]
},
"verificationscenarios.VerificationMetadata": {
"type": "object",
"properties": {
"cmcProfileLink": {
"type": "string",
"example": "some profile"
},
"telegramUsername": {
"type": "string",
"example": "some telegram username"
},
"tenantTokens": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"example": {
"signup_callfluent": "sometoken",
"signup_doctorx": "sometoken",
"signup_sauces": "sometoken",
"signup_sealsend": "sometoken",
"signup_sunwaves": "sometoken"
}
},
"tweetUrl": {
"type": "string",
"example": "some tweet"
}
}
}
}
}`
Expand Down
Loading
Loading