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

Commit 9816ade

Browse files
author
nobody
committed
JSON Schema Update
1 parent 5c22be8 commit 9816ade

File tree

4 files changed

+87
-0
lines changed

4 files changed

+87
-0
lines changed

_data/v3.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ groups:
3535
title: Cancel a Contract
3636
- name: cashier
3737
title: Cashier Information
38+
- name: confirm_email
39+
title: Confirm Email Through Verification Code
3840
- name: contract_update
3941
title: Update Contract
4042
- name: contract_update_history
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"confirm_email": 1,
3+
"email_consent": 1,
4+
"verification_code": "ExampleVerificationCode"
5+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"title": "Confirm Email Through Verification Code (response)",
4+
"description": "Confirm Email Response",
5+
"type": "object",
6+
"required": [
7+
"echo_req",
8+
"msg_type"
9+
],
10+
"properties": {
11+
"confirm_email": {
12+
"title": "confirm_email",
13+
"description": "1 for success (The verification code has been successfully verified)",
14+
"type": "integer",
15+
"enum": [
16+
0,
17+
1
18+
]
19+
},
20+
"echo_req": {
21+
"description": "Echo of the request made.",
22+
"type": "object"
23+
},
24+
"msg_type": {
25+
"description": "Action name of the request made.",
26+
"type": "string",
27+
"enum": [
28+
"confirm_email"
29+
]
30+
},
31+
"req_id": {
32+
"description": "Optional field sent in request to map to response, present only when request contains `req_id`.",
33+
"type": "integer"
34+
}
35+
}
36+
}

config/v3/confirm_email/send.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"title": "Confirm Email Through Verification Code (request)",
4+
"description": "Verifies the email for the user using verification code passed in the request object",
5+
"type": "object",
6+
"auth_required": 0,
7+
"additionalProperties": false,
8+
"required": [
9+
"confirm_email",
10+
"email_consent",
11+
"verification_code"
12+
],
13+
"properties": {
14+
"confirm_email": {
15+
"description": "Must be `1`",
16+
"type": "integer",
17+
"enum": [
18+
1
19+
]
20+
},
21+
"email_consent": {
22+
"description": "Boolean value: 1 or 0, indicating whether the client has given consent for marketing emails.",
23+
"type": "integer",
24+
"enum": [
25+
1,
26+
0
27+
]
28+
},
29+
"verification_code": {
30+
"description": "Email verification code (received from a `verify_email` call, which must be done first).",
31+
"type": "string",
32+
"pattern": "^\\w{8,128}$",
33+
"sensitive": 1
34+
},
35+
"passthrough": {
36+
"description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.",
37+
"type": "object"
38+
},
39+
"req_id": {
40+
"description": "[Optional] Used to map request to response.",
41+
"type": "integer"
42+
}
43+
}
44+
}

0 commit comments

Comments
 (0)