/
v1.d.ts
240 lines (239 loc) · 6.49 KB
/
v1.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
/**
* This file was auto-generated by openapi-typescript.
* Do not make direct changes to the file.
*/
export interface paths {
'/v1/submit/{endpointSlug}': {
parameters: {
query?: never
header?: never
path?: never
cookie?: never
}
get?: never
put?: never
/**
* Submit your data to an endpoint
* @description Submit JSON and get notified in real-time
*/
post: operations['submit']
delete?: never
options?: never
head?: never
patch?: never
trace?: never
}
}
export type webhooks = Record<string, never>
export interface components {
schemas: {
SubmissionInput: {
/**
* @description The data to submit, must be a valid JSON object
* @example {
* "name": "Yo Yoerson",
* "email": "yo@yoerson.com",
* "message": "Yo",
* "powerLevel": 9001
* }
*/
data: {
[key: string]: unknown
}
/** @description Configure submission options, overriding the endpoint's settings. */
options?: {
/**
* @description Send an email notification
* @example false
*/
emailNotification?: boolean
/**
* @description The "To" recipient of the email notification
* @example yo@yoerson.com
*/
emailTo?: string
/**
* @description Set a ReplyTo for the email notification
* @example yo@yoerson.com
*/
emailReplyTo?: string
/**
* @description Change the default email notification subject. Available on paid plans.
* @example My custom email subject
*/
emailSubject?: string
/**
* @description Remove Submit JSON branding from the email notification. Available on paid plans.
* @example true
*/
emailBranding?: boolean
/**
* @description Set the format of the submission to raw JSON or pretty
* @example raw
* @enum {string}
*/
submissionFormat?: 'raw' | 'pretty'
/**
* @description Play a sound on submitjson.com upon submission
* @example ping
* @enum {string}
*/
submissionSound?: 'none' | 'beep' | 'blip' | 'block' | 'coin' | 'ding' | 'dink' | 'honk' | 'jump' | 'ping' | 'pong' | 'snare'
/**
* @description Pass a reCAPTCHA response token along with the submission
* @example xxxxxxxxxxxxx
*/
recaptchaToken?: string
/**
* @description Pass a Cloudflare Turnstile response token along with the submission
* @example xxxxxxxxxxxxx
*/
turnstileToken?: string
/**
* @description Pass a hCaptcha response token along with the submission
* @example xxxxxxxxxxxxx
*/
hcaptchaToken?: string
}
}
Submission: {
/** Format: date-time */
createdAt?: string
/**
* @example {
* "name": "Yo Yoerson",
* "email": "yo@yoerson.com",
* "message": "Yo",
* "powerLevel": 9001
* }
*/
data?: Record<string, never>
/** @example true */
emailBranding?: boolean
/** @example false */
emailNotification?: boolean
/** @example yo@yoerson.com */
emailTo?: string | null
/** @example yo@yoerson.com */
emailReplyTo?: string | null
emailStatus?: string | null
/** @example Endpoint name {xxxyyzz} */
emailSubject?: string
/** @example xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx */
endpointId?: string
/** @example Test Contact Form */
endpointName?: string
/** @example XxJqpisK8 */
endpointSlug?: string
/** Format: date-time */
seenAt?: string | null
/**
* @example true
* @enum {string|null}
*/
securityCaptcha?: 'hcaptcha' | 'recaptcha' | 'turnstile'
/** @example true */
securityCors?: boolean
/** @example false */
securityHoneypot?: boolean
/** @enum {string} */
submissionFormat?: 'raw' | 'pretty'
/** @example xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx */
submissionId?: string
/** @example ping */
submissionSound?: string
/** @example xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx */
userId?: string
/** @enum {string|null} */
webhookStatus?: 'success' | 'partial-success' | 'error'
/** @enum {string|null} */
zapierStatus?: 'pending' | 'success' | 'error'
}
ErrorResponse: {
/** @example 🙈 */
message?: string
/** @example 400 */
statusCode?: unknown
}
}
responses: never
parameters: never
requestBodies: never
headers: never
pathItems: never
}
export type $defs = Record<string, never>
export interface operations {
submit: {
parameters: {
query?: never
header?: never
path: {
/** @description The slug of the endpoint */
endpointSlug: string
}
cookie?: never
}
requestBody: {
content: {
'application/json': components['schemas']['SubmissionInput']
}
}
responses: {
/** @description Returns the new submission */
201: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['Submission']
}
}
/** @description Endpoint is disabled */
400: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponse']
}
}
/** @description Unauthorized */
401: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponse']
}
}
/** @description Submission limit reached */
403: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponse']
}
}
/** @description Endpoint not found */
404: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponse']
}
}
/** @description Invalid request body */
422: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['ErrorResponse']
}
}
}
}
}