Skip to content

Commit 138417e

Browse files
committed
Update schema file with new objects
1 parent e1a628b commit 138417e

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

SCHEMA.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ In this document:
66
- [Form structure](#form-structure)
77
- [Form features](#form-features)
88
- [Form question](#form-question)
9+
- [Form response structure](#form-response-structure)
910

1011
## Form structure
1112

@@ -120,3 +121,28 @@ Textareas require no additional configuration.
120121
"text": "This section will quiz you on A, B and C"
121122
}
122123
```
124+
125+
## Form response
126+
127+
| Field | Type | Description |
128+
| ---------- | ---------------------------------------------------- | --------------------------------------------------------------------------- |
129+
| `_id`/`id` | MongoDB ObjectID | Random identifier used for the response |
130+
| `user` | Optional [user details object](#user-details-object) | An object describing the user that submitted if the form is not anonymous |
131+
| `antispam` | Optional [anti spam object](#anti-spam-object) | An object containing information about the anti-spam on the form submission |
132+
| `response` | Object | Object containing question IDs mapping to the users answer |
133+
| `form_id` | String | ID of the form that the user is submitting to |
134+
135+
### User details object
136+
137+
The user details contains the information returned by Discord alongside an `admin` boolean key representing that the user has admin privileges. The information returned from Discord can be found in the [Discord Developer portal](https://discord.com/developers/docs/resources/user#user-object).
138+
139+
### Anti-spam object
140+
141+
The anti-spam object contains information about the source of the form submission.
142+
143+
| Field | Type | Description |
144+
| ----------------- | ------- | ----------------------------------------------- |
145+
| `ip_hash` | String | hash of the submitting users IP address |
146+
| `user_agent_hash` | String | hash of the submitting users user agent |
147+
| `captcha_pass` | Boolean | Whether the user passsed the hCaptcha |
148+
| `dns_blacklisted` | Boolean | Whether the submitting IP is on a DNS blacklist |

0 commit comments

Comments
 (0)