Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
JSON Schema Update
Browse files Browse the repository at this point in the history
  • Loading branch information
nobody committed Jan 31, 2024
1 parent 5c22be8 commit 9816ade
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _data/v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ groups:
title: Cancel a Contract
- name: cashier
title: Cashier Information
- name: confirm_email
title: Confirm Email Through Verification Code
- name: contract_update
title: Update Contract
- name: contract_update_history
Expand Down
5 changes: 5 additions & 0 deletions config/v3/confirm_email/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"confirm_email": 1,
"email_consent": 1,
"verification_code": "ExampleVerificationCode"
}
36 changes: 36 additions & 0 deletions config/v3/confirm_email/receive.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Confirm Email Through Verification Code (response)",
"description": "Confirm Email Response",
"type": "object",
"required": [
"echo_req",
"msg_type"
],
"properties": {
"confirm_email": {
"title": "confirm_email",
"description": "1 for success (The verification code has been successfully verified)",
"type": "integer",
"enum": [
0,
1
]
},
"echo_req": {
"description": "Echo of the request made.",
"type": "object"
},
"msg_type": {
"description": "Action name of the request made.",
"type": "string",
"enum": [
"confirm_email"
]
},
"req_id": {
"description": "Optional field sent in request to map to response, present only when request contains `req_id`.",
"type": "integer"
}
}
}
44 changes: 44 additions & 0 deletions config/v3/confirm_email/send.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Confirm Email Through Verification Code (request)",
"description": "Verifies the email for the user using verification code passed in the request object",
"type": "object",
"auth_required": 0,
"additionalProperties": false,
"required": [
"confirm_email",
"email_consent",
"verification_code"
],
"properties": {
"confirm_email": {
"description": "Must be `1`",
"type": "integer",
"enum": [
1
]
},
"email_consent": {
"description": "Boolean value: 1 or 0, indicating whether the client has given consent for marketing emails.",
"type": "integer",
"enum": [
1,
0
]
},
"verification_code": {
"description": "Email verification code (received from a `verify_email` call, which must be done first).",
"type": "string",
"pattern": "^\\w{8,128}$",
"sensitive": 1
},
"passthrough": {
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.",
"type": "object"
},
"req_id": {
"description": "[Optional] Used to map request to response.",
"type": "integer"
}
}
}

0 comments on commit 9816ade

Please sign in to comment.