@zuplo/graphql 5.1952.0 → 5.1956.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/types-beta.d.ts +581 -899
package/types-beta.d.ts
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import type { OpenAPIV3_1 } from
|
|
1
|
+
import type { OpenAPIV3_1 } from 'openapi-types';
|
|
2
2
|
|
|
3
3
|
declare interface BuildRouteConfiguration {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
path: string;
|
|
5
|
+
methods: HttpMethod[];
|
|
6
|
+
/**
|
|
7
7
|
/* @deprecated This property is not used and will be removed in future versions
|
|
8
8
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
label?: string;
|
|
10
|
+
/**
|
|
11
11
|
/* @deprecated This property is not used and will be removed in future versions
|
|
12
12
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
key?: string;
|
|
14
|
+
handler: HandlerDefinition;
|
|
15
|
+
corsPolicy?: CorsPolicy;
|
|
16
|
+
/**
|
|
17
17
|
/* @deprecated This property is deprecated. Use route.raw() instead.
|
|
18
18
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
custom?: any;
|
|
20
|
+
/**
|
|
21
21
|
/* @deprecated This property is not used and will be removed in future versions
|
|
22
22
|
*/
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
version: string;
|
|
24
|
+
policies?: {
|
|
25
|
+
inbound?: string[];
|
|
26
|
+
outbound?: string[];
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
29
|
/* @deprecated This property is deprecated. Use route.raw() instead.
|
|
30
30
|
*/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
excludeFromOpenApi?: boolean;
|
|
32
|
+
pathPattern?: string;
|
|
33
|
+
/* Excluded from this release type: raw */
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/** The 2-letter continent codes Cloudflare uses */
|
|
@@ -59,26 +59,26 @@ export declare const GraphQLComplexityLimitInboundPolicy: InboundPolicyHandler<G
|
|
|
59
59
|
* The options for this policy.
|
|
60
60
|
*/
|
|
61
61
|
export declare interface GraphQLComplexityLimitInboundPolicyOptions {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
62
|
+
useComplexityLimit: {
|
|
63
|
+
/**
|
|
64
|
+
* The maximum complexity a query is allowed to have.
|
|
65
|
+
*/
|
|
66
|
+
complexityLimit?: number;
|
|
67
|
+
/**
|
|
68
|
+
* The endpoint URL to use for the complexity calculation.
|
|
69
|
+
*/
|
|
70
|
+
endpointUrl?: string;
|
|
71
|
+
};
|
|
72
|
+
useDepthLimit: {
|
|
73
|
+
/**
|
|
74
|
+
* The maximum depth a query is allowed to have.
|
|
75
|
+
*/
|
|
76
|
+
depthLimit?: number;
|
|
77
|
+
/**
|
|
78
|
+
* The fields to ignore when calculating the depth of a query.
|
|
79
|
+
*/
|
|
80
|
+
ignore?: string[];
|
|
81
|
+
};
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
/**
|
|
@@ -101,365 +101,352 @@ export declare const GraphQLDisableIntrospectionInboundPolicy: InboundPolicyHand
|
|
|
101
101
|
/**
|
|
102
102
|
* The options for this policy.
|
|
103
103
|
*/
|
|
104
|
-
export declare interface GraphqlDisableIntrospectionInboundPolicyOptions {
|
|
104
|
+
export declare interface GraphqlDisableIntrospectionInboundPolicyOptions {
|
|
105
|
+
}
|
|
105
106
|
|
|
106
107
|
declare interface HandlerDefinition {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
module: any;
|
|
109
|
+
export: string;
|
|
110
|
+
options?: unknown;
|
|
110
111
|
}
|
|
111
112
|
|
|
112
|
-
declare type HttpMethod =
|
|
113
|
-
| "GET"
|
|
114
|
-
| "HEAD"
|
|
115
|
-
| "POST"
|
|
116
|
-
| "PUT"
|
|
117
|
-
| "DELETE"
|
|
118
|
-
| "CONNECT"
|
|
119
|
-
| "OPTIONS"
|
|
120
|
-
| "TRACE"
|
|
121
|
-
| "PATCH";
|
|
113
|
+
declare type HttpMethod = "GET" | "HEAD" | "POST" | "PUT" | "DELETE" | "CONNECT" | "OPTIONS" | "TRACE" | "PATCH";
|
|
122
114
|
|
|
123
115
|
/**
|
|
124
116
|
* @beta
|
|
125
117
|
*/
|
|
126
118
|
declare enum HttpStatusCode {
|
|
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
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
119
|
+
/**
|
|
120
|
+
* The server has received the request headers and the client should proceed to send the request body
|
|
121
|
+
* (in the case of a request for which a body needs to be sent; for example, a POST request).
|
|
122
|
+
* Sending a large request body to a server after a request has been rejected for inappropriate headers would be inefficient.
|
|
123
|
+
* To have a server check the request's headers, a client must send Expect: 100-continue as a header in its initial request
|
|
124
|
+
* and receive a 100 Continue status code in response before sending the body. The response 417 Expectation Failed indicates the request should not be continued.
|
|
125
|
+
*/
|
|
126
|
+
CONTINUE = 100,
|
|
127
|
+
/**
|
|
128
|
+
* The requester has asked the server to switch protocols and the server has agreed to do so.
|
|
129
|
+
*/
|
|
130
|
+
SWITCHING_PROTOCOLS = 101,
|
|
131
|
+
/**
|
|
132
|
+
* A WebDAV request may contain many sub-requests involving file operations, requiring a long time to complete the request.
|
|
133
|
+
* This code indicates that the server has received and is processing the request, but no response is available yet.
|
|
134
|
+
* This prevents the client from timing out and assuming the request was lost.
|
|
135
|
+
* @deprecated This status code is deprecated and shouldn't be sent any more. Clients may still accept it, but simply ignore them.
|
|
136
|
+
*/
|
|
137
|
+
PROCESSING = 102,
|
|
138
|
+
/**
|
|
139
|
+
* This response may be sent by a server while it is still preparing a
|
|
140
|
+
* response, with hints about the resources that the server is expecting
|
|
141
|
+
* the final response will link. This allows a browser to start preloading
|
|
142
|
+
* resources even before the server has prepared and sent that final response.
|
|
143
|
+
*/
|
|
144
|
+
EARLY_HINTS = 103,
|
|
145
|
+
/**
|
|
146
|
+
* Standard response for successful HTTP requests.
|
|
147
|
+
* The actual response will depend on the request method used.
|
|
148
|
+
* In a GET request, the response will contain an entity corresponding to the requested resource.
|
|
149
|
+
* In a POST request, the response will contain an entity describing or containing the result of the action.
|
|
150
|
+
*/
|
|
151
|
+
OK = 200,
|
|
152
|
+
/**
|
|
153
|
+
* The request has been fulfilled, resulting in the creation of a new resource.
|
|
154
|
+
*/
|
|
155
|
+
CREATED = 201,
|
|
156
|
+
/**
|
|
157
|
+
* The request has been accepted for processing, but the processing has not been completed.
|
|
158
|
+
* The request might or might not be eventually acted upon, and may be disallowed when processing occurs.
|
|
159
|
+
*/
|
|
160
|
+
ACCEPTED = 202,
|
|
161
|
+
/**
|
|
162
|
+
* SINCE HTTP/1.1
|
|
163
|
+
* The server is a transforming proxy that received a 200 OK from its origin,
|
|
164
|
+
* but is returning a modified version of the origin's response.
|
|
165
|
+
*/
|
|
166
|
+
NON_AUTHORITATIVE_INFORMATION = 203,
|
|
167
|
+
/**
|
|
168
|
+
* The server successfully processed the request and is not returning any content.
|
|
169
|
+
*/
|
|
170
|
+
NO_CONTENT = 204,
|
|
171
|
+
/**
|
|
172
|
+
* The server successfully processed the request, but is not returning any content.
|
|
173
|
+
* Unlike a 204 response, this response requires that the requester reset the document view.
|
|
174
|
+
*/
|
|
175
|
+
RESET_CONTENT = 205,
|
|
176
|
+
/**
|
|
177
|
+
* The server is delivering only part of the resource (byte serving) due to a range header sent by the client.
|
|
178
|
+
* The range header is used by HTTP clients to enable resuming of interrupted downloads,
|
|
179
|
+
* or split a download into multiple simultaneous streams.
|
|
180
|
+
*/
|
|
181
|
+
PARTIAL_CONTENT = 206,
|
|
182
|
+
/**
|
|
183
|
+
* The message body that follows is an XML message and can contain a number of separate response codes,
|
|
184
|
+
* depending on how many sub-requests were made.
|
|
185
|
+
*/
|
|
186
|
+
MULTI_STATUS = 207,
|
|
187
|
+
/**
|
|
188
|
+
* The members of a DAV binding have already been enumerated in a preceding part of the (multistatus) response,
|
|
189
|
+
* and are not being included again.
|
|
190
|
+
*/
|
|
191
|
+
ALREADY_REPORTED = 208,
|
|
192
|
+
/**
|
|
193
|
+
* The server has fulfilled a request for the resource,
|
|
194
|
+
* and the response is a representation of the result of one or more instance-manipulations applied to the current instance.
|
|
195
|
+
*/
|
|
196
|
+
IM_USED = 226,
|
|
197
|
+
/**
|
|
198
|
+
* Indicates multiple options for the resource from which the client may choose (via agent-driven content negotiation).
|
|
199
|
+
* For example, this code could be used to present multiple video format options,
|
|
200
|
+
* to list files with different filename extensions, or to suggest word-sense disambiguation.
|
|
201
|
+
*/
|
|
202
|
+
MULTIPLE_CHOICES = 300,
|
|
203
|
+
/**
|
|
204
|
+
* This and all future requests should be directed to the given URI.
|
|
205
|
+
*/
|
|
206
|
+
MOVED_PERMANENTLY = 301,
|
|
207
|
+
/**
|
|
208
|
+
* This is an example of industry practice contradicting the standard.
|
|
209
|
+
* The HTTP/1.0 specification (RFC 1945) required the client to perform a temporary redirect
|
|
210
|
+
* (the original describing phrase was "Moved Temporarily"), but popular browsers implemented 302
|
|
211
|
+
* with the functionality of a 303 See Other. Therefore, HTTP/1.1 added status codes 303 and 307
|
|
212
|
+
* to distinguish between the two behaviours. However, some Web applications and frameworks
|
|
213
|
+
* use the 302 status code as if it were the 303.
|
|
214
|
+
*/
|
|
215
|
+
FOUND = 302,
|
|
216
|
+
/**
|
|
217
|
+
* SINCE HTTP/1.1
|
|
218
|
+
* The response to the request can be found under another URI using a GET method.
|
|
219
|
+
* When received in response to a POST (or PUT/DELETE), the client should presume that
|
|
220
|
+
* the server has received the data and should issue a redirect with a separate GET message.
|
|
221
|
+
*/
|
|
222
|
+
SEE_OTHER = 303,
|
|
223
|
+
/**
|
|
224
|
+
* Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match.
|
|
225
|
+
* In such case, there is no need to retransmit the resource since the client still has a previously-downloaded copy.
|
|
226
|
+
*/
|
|
227
|
+
NOT_MODIFIED = 304,
|
|
228
|
+
/**
|
|
229
|
+
* SINCE HTTP/1.1
|
|
230
|
+
* The requested resource is available only through a proxy, the address for which is provided in the response.
|
|
231
|
+
* Many HTTP clients (such as Mozilla and Internet Explorer) do not correctly handle responses with this status code, primarily for security reasons.
|
|
232
|
+
*/
|
|
233
|
+
USE_PROXY = 305,
|
|
234
|
+
/**
|
|
235
|
+
* No longer used. Originally meant "Subsequent requests should use the specified proxy."
|
|
236
|
+
* @deprecated No longer used
|
|
237
|
+
*/
|
|
238
|
+
SWITCH_PROXY = 306,
|
|
239
|
+
/**
|
|
240
|
+
* SINCE HTTP/1.1
|
|
241
|
+
* In this case, the request should be repeated with another URI; however, future requests should still use the original URI.
|
|
242
|
+
* In contrast to how 302 was historically implemented, the request method is not allowed to be changed when reissuing the original request.
|
|
243
|
+
* For example, a POST request should be repeated using another POST request.
|
|
244
|
+
*/
|
|
245
|
+
TEMPORARY_REDIRECT = 307,
|
|
246
|
+
/**
|
|
247
|
+
* The request and all future requests should be repeated using another URI.
|
|
248
|
+
* 307 and 308 parallel the behaviors of 302 and 301, but do not allow the HTTP method to change.
|
|
249
|
+
* So, for example, submitting a form to a permanently redirected resource may continue smoothly.
|
|
250
|
+
*/
|
|
251
|
+
PERMANENT_REDIRECT = 308,
|
|
252
|
+
/**
|
|
253
|
+
* The server cannot or will not process the request due to an apparent client error
|
|
254
|
+
* (e.g., malformed request syntax, too large size, invalid request message framing, or deceptive request routing).
|
|
255
|
+
*/
|
|
256
|
+
BAD_REQUEST = 400,
|
|
257
|
+
/**
|
|
258
|
+
* Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet
|
|
259
|
+
* been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the
|
|
260
|
+
* requested resource. See Basic access authentication and Digest access authentication. 401 semantically means
|
|
261
|
+
* "unauthenticated",i.e. the user does not have the necessary credentials.
|
|
262
|
+
*/
|
|
263
|
+
UNAUTHORIZED = 401,
|
|
264
|
+
/**
|
|
265
|
+
* Reserved for future use. The original intention was that this code might be used as part of some form of digital
|
|
266
|
+
* cash or micro payment scheme, but that has not happened, and this code is not usually used.
|
|
267
|
+
* Google Developers API uses this status if a particular developer has exceeded the daily limit on requests.
|
|
268
|
+
*/
|
|
269
|
+
PAYMENT_REQUIRED = 402,
|
|
270
|
+
/**
|
|
271
|
+
* The request was valid, but the server is refusing action.
|
|
272
|
+
* The user might not have the necessary permissions for a resource.
|
|
273
|
+
*/
|
|
274
|
+
FORBIDDEN = 403,
|
|
275
|
+
/**
|
|
276
|
+
* The requested resource could not be found but may be available in the future.
|
|
277
|
+
* Subsequent requests by the client are permissible.
|
|
278
|
+
*/
|
|
279
|
+
NOT_FOUND = 404,
|
|
280
|
+
/**
|
|
281
|
+
* A request method is not supported for the requested resource;
|
|
282
|
+
* for example, a GET request on a form that requires data to be presented via POST, or a PUT request on a read-only resource.
|
|
283
|
+
*/
|
|
284
|
+
METHOD_NOT_ALLOWED = 405,
|
|
285
|
+
/**
|
|
286
|
+
* The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.
|
|
287
|
+
*/
|
|
288
|
+
NOT_ACCEPTABLE = 406,
|
|
289
|
+
/**
|
|
290
|
+
* The client must first authenticate itself with the proxy.
|
|
291
|
+
*/
|
|
292
|
+
PROXY_AUTHENTICATION_REQUIRED = 407,
|
|
293
|
+
/**
|
|
294
|
+
* The server timed out waiting for the request.
|
|
295
|
+
* According to HTTP specifications:
|
|
296
|
+
* "The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time."
|
|
297
|
+
*/
|
|
298
|
+
REQUEST_TIMEOUT = 408,
|
|
299
|
+
/**
|
|
300
|
+
* Indicates that the request could not be processed because of conflict in the request,
|
|
301
|
+
* such as an edit conflict between multiple simultaneous updates.
|
|
302
|
+
*/
|
|
303
|
+
CONFLICT = 409,
|
|
304
|
+
/**
|
|
305
|
+
* Indicates that the resource requested is no longer available and will not be available again.
|
|
306
|
+
* This should be used when a resource has been intentionally removed and the resource should be purged.
|
|
307
|
+
* Upon receiving a 410 status code, the client should not request the resource in the future.
|
|
308
|
+
* Clients such as search engines should remove the resource from their indices.
|
|
309
|
+
* Most use cases do not require clients and search engines to purge the resource, and a "404 Not Found" may be used instead.
|
|
310
|
+
*/
|
|
311
|
+
GONE = 410,
|
|
312
|
+
/**
|
|
313
|
+
* The request did not specify the length of its content, which is required by the requested resource.
|
|
314
|
+
*/
|
|
315
|
+
LENGTH_REQUIRED = 411,
|
|
316
|
+
/**
|
|
317
|
+
* The server does not meet one of the preconditions that the requester put on the request.
|
|
318
|
+
*/
|
|
319
|
+
PRECONDITION_FAILED = 412,
|
|
320
|
+
/**
|
|
321
|
+
* The request is larger than the server is willing or able to process. Previously called "Request Entity Too Large".
|
|
322
|
+
*/
|
|
323
|
+
CONTENT_TOO_LARGE = 413,
|
|
324
|
+
/* Excluded from this release type: PAYLOAD_TOO_LARGE */
|
|
325
|
+
/**
|
|
326
|
+
* The URI provided was too long for the server to process. Often the result of too much data being encoded as a query-string of a GET request,
|
|
327
|
+
* in which case it should be converted to a POST request.
|
|
328
|
+
* Called "Request-URI Too Long" previously.
|
|
329
|
+
*/
|
|
330
|
+
URI_TOO_LONG = 414,
|
|
331
|
+
/**
|
|
332
|
+
* The request entity has a media type which the server or resource does not support.
|
|
333
|
+
* For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format.
|
|
334
|
+
*/
|
|
335
|
+
UNSUPPORTED_MEDIA_TYPE = 415,
|
|
336
|
+
/**
|
|
337
|
+
* The client has asked for a portion of the file (byte serving), but the server cannot supply that portion.
|
|
338
|
+
* For example, if the client asked for a part of the file that lies beyond the end of the file.
|
|
339
|
+
* Called "Requested Range Not Satisfiable" previously.
|
|
340
|
+
*/
|
|
341
|
+
RANGE_NOT_SATISFIABLE = 416,
|
|
342
|
+
/**
|
|
343
|
+
* The server cannot meet the requirements of the Expect request-header field.
|
|
344
|
+
*/
|
|
345
|
+
EXPECTATION_FAILED = 417,
|
|
346
|
+
/**
|
|
347
|
+
* This code was defined in 1998 as one of the traditional IETF April Fools' jokes, in RFC 2324, Hyper Text Coffee Pot Control Protocol,
|
|
348
|
+
* and is not expected to be implemented by actual HTTP servers. The RFC specifies this code should be returned by
|
|
349
|
+
* teapots requested to brew coffee. This HTTP status is used as an Easter egg in some websites, including Google.com.
|
|
350
|
+
*/
|
|
351
|
+
I_AM_A_TEAPOT = 418,
|
|
352
|
+
/**
|
|
353
|
+
* The request was directed at a server that is not able to produce a response (for example because a connection reuse).
|
|
354
|
+
*/
|
|
355
|
+
MISDIRECTED_REQUEST = 421,
|
|
356
|
+
/* Excluded from this release type: UNPROCESSABLE_ENTITY */
|
|
357
|
+
/**
|
|
358
|
+
* The request was well-formed but was unable to be followed due to semantic errors.
|
|
359
|
+
*/
|
|
360
|
+
UNPROCESSABLE_CONTENT = 422,
|
|
361
|
+
/**
|
|
362
|
+
* The resource that is being accessed is locked.
|
|
363
|
+
*/
|
|
364
|
+
LOCKED = 423,
|
|
365
|
+
/**
|
|
366
|
+
* The request failed due to failure of a previous request (e.g., a PROPPATCH).
|
|
367
|
+
*/
|
|
368
|
+
FAILED_DEPENDENCY = 424,
|
|
369
|
+
/**
|
|
370
|
+
* The server is unwilling to risk processing a request that might be
|
|
371
|
+
* replayed, which creates the potential for a replay attack.
|
|
372
|
+
*/
|
|
373
|
+
TOO_EARLY = 425,
|
|
374
|
+
/**
|
|
375
|
+
* The client should switch to a different protocol such as TLS/1.0, given in the Upgrade header field.
|
|
376
|
+
*/
|
|
377
|
+
UPGRADE_REQUIRED = 426,
|
|
378
|
+
/**
|
|
379
|
+
* The origin server requires the request to be conditional.
|
|
380
|
+
* Intended to prevent "the 'lost update' problem, where a client
|
|
381
|
+
* GETs a resource's state, modifies it, and PUTs it back to the server,
|
|
382
|
+
* when meanwhile a third party has modified the state on the server, leading to a conflict."
|
|
383
|
+
*/
|
|
384
|
+
PRECONDITION_REQUIRED = 428,
|
|
385
|
+
/**
|
|
386
|
+
* The user has sent too many requests in a given amount of time. Intended for use with rate-limiting schemes.
|
|
387
|
+
*/
|
|
388
|
+
TOO_MANY_REQUESTS = 429,
|
|
389
|
+
/**
|
|
390
|
+
* The server is unwilling to process the request because either an individual header field,
|
|
391
|
+
* or all the header fields collectively, are too large.
|
|
392
|
+
*/
|
|
393
|
+
REQUEST_HEADER_FIELDS_TOO_LARGE = 431,
|
|
394
|
+
/**
|
|
395
|
+
* A server operator has received a legal demand to deny access to a resource or to a set of resources
|
|
396
|
+
* that includes the requested resource. The code 451 was chosen as a reference to the novel Fahrenheit 451.
|
|
397
|
+
*/
|
|
398
|
+
UNAVAILABLE_FOR_LEGAL_REASONS = 451,
|
|
399
|
+
/**
|
|
400
|
+
* A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.
|
|
401
|
+
*/
|
|
402
|
+
INTERNAL_SERVER_ERROR = 500,
|
|
403
|
+
/**
|
|
404
|
+
* The server either does not recognize the request method, or it lacks the ability to fulfill the request.
|
|
405
|
+
* Usually this implies future availability (e.g., a new feature of a web-service API).
|
|
406
|
+
*/
|
|
407
|
+
NOT_IMPLEMENTED = 501,
|
|
408
|
+
/**
|
|
409
|
+
* The server was acting as a gateway or proxy and received an invalid response from the upstream server.
|
|
410
|
+
*/
|
|
411
|
+
BAD_GATEWAY = 502,
|
|
412
|
+
/**
|
|
413
|
+
* The server is currently unavailable (because it is overloaded or down for maintenance).
|
|
414
|
+
* Generally, this is a temporary state.
|
|
415
|
+
*/
|
|
416
|
+
SERVICE_UNAVAILABLE = 503,
|
|
417
|
+
/**
|
|
418
|
+
* The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
|
|
419
|
+
*/
|
|
420
|
+
GATEWAY_TIMEOUT = 504,
|
|
421
|
+
/**
|
|
422
|
+
* The server does not support the HTTP protocol version used in the request
|
|
423
|
+
*/
|
|
424
|
+
HTTP_VERSION_NOT_SUPPORTED = 505,
|
|
425
|
+
/**
|
|
426
|
+
* Transparent content negotiation for the request results in a circular reference.
|
|
427
|
+
*/
|
|
428
|
+
VARIANT_ALSO_NEGOTIATES = 506,
|
|
429
|
+
/**
|
|
430
|
+
* The server is unable to store the representation needed to complete the request.
|
|
431
|
+
*/
|
|
432
|
+
INSUFFICIENT_STORAGE = 507,
|
|
433
|
+
/**
|
|
434
|
+
* The server detected an infinite loop while processing the request.
|
|
435
|
+
*/
|
|
436
|
+
LOOP_DETECTED = 508,
|
|
437
|
+
/**
|
|
438
|
+
* Further extensions to the request are required for the server to fulfill it.
|
|
439
|
+
*/
|
|
440
|
+
NOT_EXTENDED = 510,
|
|
441
|
+
/**
|
|
442
|
+
* The client needs to authenticate to gain network access.
|
|
443
|
+
* Intended for use by intercepting proxies used to control access to the network (e.g., "captive portals" used
|
|
444
|
+
* to require agreement to Terms of Service before granting full Internet access via a Wi-Fi hotspot).
|
|
445
|
+
*/
|
|
446
|
+
NETWORK_AUTHENTICATION_REQUIRED = 511
|
|
455
447
|
}
|
|
456
448
|
|
|
457
|
-
declare type HttpStatusCodeRangeDefinition =
|
|
458
|
-
| "1XX"
|
|
459
|
-
| "2XX"
|
|
460
|
-
| "3XX"
|
|
461
|
-
| "4XX"
|
|
462
|
-
| "5XX";
|
|
449
|
+
declare type HttpStatusCodeRangeDefinition = "1XX" | "2XX" | "3XX" | "4XX" | "5XX";
|
|
463
450
|
|
|
464
451
|
/**
|
|
465
452
|
* @public
|
|
@@ -475,338 +462,84 @@ declare type HttpStatusCodeRangeDefinition =
|
|
|
475
462
|
* @returns A Response or Request object
|
|
476
463
|
*/
|
|
477
464
|
declare interface InboundPolicyHandler<TOptions = any> {
|
|
478
|
-
|
|
479
|
-
request: ZuploRequest,
|
|
480
|
-
context: ZuploContext,
|
|
481
|
-
options: TOptions,
|
|
482
|
-
policyName: string
|
|
483
|
-
): Promise<ZuploRequest | Response>;
|
|
465
|
+
(request: ZuploRequest, context: ZuploContext, options: TOptions, policyName: string): Promise<ZuploRequest | Response>;
|
|
484
466
|
}
|
|
485
467
|
|
|
486
468
|
declare interface IncomingRequestProperties {
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
469
|
+
/**
|
|
470
|
+
* ASN of the incoming request, for example, 395747.
|
|
471
|
+
*/
|
|
472
|
+
readonly asn: number | undefined;
|
|
473
|
+
/**
|
|
474
|
+
* The organization which owns the ASN of the incoming request,
|
|
475
|
+
* for example, Google Cloud.
|
|
476
|
+
*/
|
|
477
|
+
readonly asOrganization: string | undefined;
|
|
478
|
+
/**
|
|
479
|
+
* City of the incoming request, for example, "Austin".
|
|
480
|
+
*/
|
|
481
|
+
readonly city: string | undefined;
|
|
482
|
+
/**
|
|
483
|
+
* Continent of the incoming request, for example, "NA".
|
|
484
|
+
*/
|
|
485
|
+
readonly continent: ContinentCode | undefined;
|
|
486
|
+
/**
|
|
487
|
+
* The two-letter country code in the request.
|
|
488
|
+
* @see {@link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2|ISO 3166-1 alpha-2}
|
|
489
|
+
*/
|
|
490
|
+
readonly country: Iso3166Alpha2Code | undefined;
|
|
491
|
+
/**
|
|
492
|
+
* Latitude of the incoming request, for example, "30.27130".
|
|
493
|
+
*/
|
|
494
|
+
readonly latitude: string | undefined;
|
|
495
|
+
/**
|
|
496
|
+
* Longitude of the incoming request, for example, "-97.74260".
|
|
497
|
+
*/
|
|
498
|
+
readonly longitude: string | undefined;
|
|
499
|
+
/**
|
|
500
|
+
* The three-letter IATA airport code of the data center that the request hit,
|
|
501
|
+
* for example, "DFW".
|
|
502
|
+
* @see {@link https://en.wikipedia.org/wiki/IATA_airport_code|IATA airport code}
|
|
503
|
+
*/
|
|
504
|
+
readonly colo: string | undefined;
|
|
505
|
+
/**
|
|
506
|
+
* Postal code of the incoming request, for example, "78701".
|
|
507
|
+
*/
|
|
508
|
+
readonly postalCode: string | undefined;
|
|
509
|
+
/**
|
|
510
|
+
* Metro code (DMA) of the incoming request, for example, "635".
|
|
511
|
+
*/
|
|
512
|
+
readonly metroCode: string | undefined;
|
|
513
|
+
/**
|
|
514
|
+
* If known, the ISO 3166-2 name for the first level region associated with
|
|
515
|
+
* the IP address of the incoming request, for example, "Texas".
|
|
516
|
+
* @see {@link https://en.wikipedia.org/wiki/ISO_3166-2|ISO 3166-2}
|
|
517
|
+
*/
|
|
518
|
+
readonly region: string | undefined;
|
|
519
|
+
/**
|
|
520
|
+
* If known, the ISO 3166-2 code for the first-level region associated with
|
|
521
|
+
* the IP address of the incoming request, for example, "TX".
|
|
522
|
+
* @see {@link https://en.wikipedia.org/wiki/ISO_3166-2|ISO 3166-2}
|
|
523
|
+
*/
|
|
524
|
+
readonly regionCode: string | undefined;
|
|
525
|
+
/**
|
|
526
|
+
* Timezone of the incoming request, for example, "America/Chicago".
|
|
527
|
+
*/
|
|
528
|
+
readonly timezone: string | undefined;
|
|
547
529
|
}
|
|
548
530
|
|
|
549
531
|
/** ISO 3166-1 Alpha-2 codes */
|
|
550
|
-
declare type Iso3166Alpha2Code =
|
|
551
|
-
| "AD"
|
|
552
|
-
| "AE"
|
|
553
|
-
| "AF"
|
|
554
|
-
| "AG"
|
|
555
|
-
| "AI"
|
|
556
|
-
| "AL"
|
|
557
|
-
| "AM"
|
|
558
|
-
| "AO"
|
|
559
|
-
| "AQ"
|
|
560
|
-
| "AR"
|
|
561
|
-
| "AS"
|
|
562
|
-
| "AT"
|
|
563
|
-
| "AU"
|
|
564
|
-
| "AW"
|
|
565
|
-
| "AX"
|
|
566
|
-
| "AZ"
|
|
567
|
-
| "BA"
|
|
568
|
-
| "BB"
|
|
569
|
-
| "BD"
|
|
570
|
-
| "BE"
|
|
571
|
-
| "BF"
|
|
572
|
-
| "BG"
|
|
573
|
-
| "BH"
|
|
574
|
-
| "BI"
|
|
575
|
-
| "BJ"
|
|
576
|
-
| "BL"
|
|
577
|
-
| "BM"
|
|
578
|
-
| "BN"
|
|
579
|
-
| "BO"
|
|
580
|
-
| "BQ"
|
|
581
|
-
| "BR"
|
|
582
|
-
| "BS"
|
|
583
|
-
| "BT"
|
|
584
|
-
| "BV"
|
|
585
|
-
| "BW"
|
|
586
|
-
| "BY"
|
|
587
|
-
| "BZ"
|
|
588
|
-
| "CA"
|
|
589
|
-
| "CC"
|
|
590
|
-
| "CD"
|
|
591
|
-
| "CF"
|
|
592
|
-
| "CG"
|
|
593
|
-
| "CH"
|
|
594
|
-
| "CI"
|
|
595
|
-
| "CK"
|
|
596
|
-
| "CL"
|
|
597
|
-
| "CM"
|
|
598
|
-
| "CN"
|
|
599
|
-
| "CO"
|
|
600
|
-
| "CR"
|
|
601
|
-
| "CU"
|
|
602
|
-
| "CV"
|
|
603
|
-
| "CW"
|
|
604
|
-
| "CX"
|
|
605
|
-
| "CY"
|
|
606
|
-
| "CZ"
|
|
607
|
-
| "DE"
|
|
608
|
-
| "DJ"
|
|
609
|
-
| "DK"
|
|
610
|
-
| "DM"
|
|
611
|
-
| "DO"
|
|
612
|
-
| "DZ"
|
|
613
|
-
| "EC"
|
|
614
|
-
| "EE"
|
|
615
|
-
| "EG"
|
|
616
|
-
| "EH"
|
|
617
|
-
| "ER"
|
|
618
|
-
| "ES"
|
|
619
|
-
| "ET"
|
|
620
|
-
| "FI"
|
|
621
|
-
| "FJ"
|
|
622
|
-
| "FK"
|
|
623
|
-
| "FM"
|
|
624
|
-
| "FO"
|
|
625
|
-
| "FR"
|
|
626
|
-
| "GA"
|
|
627
|
-
| "GB"
|
|
628
|
-
| "GD"
|
|
629
|
-
| "GE"
|
|
630
|
-
| "GF"
|
|
631
|
-
| "GG"
|
|
632
|
-
| "GH"
|
|
633
|
-
| "GI"
|
|
634
|
-
| "GL"
|
|
635
|
-
| "GM"
|
|
636
|
-
| "GN"
|
|
637
|
-
| "GP"
|
|
638
|
-
| "GQ"
|
|
639
|
-
| "GR"
|
|
640
|
-
| "GS"
|
|
641
|
-
| "GT"
|
|
642
|
-
| "GU"
|
|
643
|
-
| "GW"
|
|
644
|
-
| "GY"
|
|
645
|
-
| "HK"
|
|
646
|
-
| "HM"
|
|
647
|
-
| "HN"
|
|
648
|
-
| "HR"
|
|
649
|
-
| "HT"
|
|
650
|
-
| "HU"
|
|
651
|
-
| "ID"
|
|
652
|
-
| "IE"
|
|
653
|
-
| "IL"
|
|
654
|
-
| "IM"
|
|
655
|
-
| "IN"
|
|
656
|
-
| "IO"
|
|
657
|
-
| "IQ"
|
|
658
|
-
| "IR"
|
|
659
|
-
| "IS"
|
|
660
|
-
| "IT"
|
|
661
|
-
| "JE"
|
|
662
|
-
| "JM"
|
|
663
|
-
| "JO"
|
|
664
|
-
| "JP"
|
|
665
|
-
| "KE"
|
|
666
|
-
| "KG"
|
|
667
|
-
| "KH"
|
|
668
|
-
| "KI"
|
|
669
|
-
| "KM"
|
|
670
|
-
| "KN"
|
|
671
|
-
| "KP"
|
|
672
|
-
| "KR"
|
|
673
|
-
| "KW"
|
|
674
|
-
| "KY"
|
|
675
|
-
| "KZ"
|
|
676
|
-
| "LA"
|
|
677
|
-
| "LB"
|
|
678
|
-
| "LC"
|
|
679
|
-
| "LI"
|
|
680
|
-
| "LK"
|
|
681
|
-
| "LR"
|
|
682
|
-
| "LS"
|
|
683
|
-
| "LT"
|
|
684
|
-
| "LU"
|
|
685
|
-
| "LV"
|
|
686
|
-
| "LY"
|
|
687
|
-
| "MA"
|
|
688
|
-
| "MC"
|
|
689
|
-
| "MD"
|
|
690
|
-
| "ME"
|
|
691
|
-
| "MF"
|
|
692
|
-
| "MG"
|
|
693
|
-
| "MH"
|
|
694
|
-
| "MK"
|
|
695
|
-
| "ML"
|
|
696
|
-
| "MM"
|
|
697
|
-
| "MN"
|
|
698
|
-
| "MO"
|
|
699
|
-
| "MP"
|
|
700
|
-
| "MQ"
|
|
701
|
-
| "MR"
|
|
702
|
-
| "MS"
|
|
703
|
-
| "MT"
|
|
704
|
-
| "MU"
|
|
705
|
-
| "MV"
|
|
706
|
-
| "MW"
|
|
707
|
-
| "MX"
|
|
708
|
-
| "MY"
|
|
709
|
-
| "MZ"
|
|
710
|
-
| "NA"
|
|
711
|
-
| "NC"
|
|
712
|
-
| "NE"
|
|
713
|
-
| "NF"
|
|
714
|
-
| "NG"
|
|
715
|
-
| "NI"
|
|
716
|
-
| "NL"
|
|
717
|
-
| "NO"
|
|
718
|
-
| "NP"
|
|
719
|
-
| "NR"
|
|
720
|
-
| "NU"
|
|
721
|
-
| "NZ"
|
|
722
|
-
| "OM"
|
|
723
|
-
| "PA"
|
|
724
|
-
| "PE"
|
|
725
|
-
| "PF"
|
|
726
|
-
| "PG"
|
|
727
|
-
| "PH"
|
|
728
|
-
| "PK"
|
|
729
|
-
| "PL"
|
|
730
|
-
| "PM"
|
|
731
|
-
| "PN"
|
|
732
|
-
| "PR"
|
|
733
|
-
| "PS"
|
|
734
|
-
| "PT"
|
|
735
|
-
| "PW"
|
|
736
|
-
| "PY"
|
|
737
|
-
| "QA"
|
|
738
|
-
| "RE"
|
|
739
|
-
| "RO"
|
|
740
|
-
| "RS"
|
|
741
|
-
| "RU"
|
|
742
|
-
| "RW"
|
|
743
|
-
| "SA"
|
|
744
|
-
| "SB"
|
|
745
|
-
| "SC"
|
|
746
|
-
| "SD"
|
|
747
|
-
| "SE"
|
|
748
|
-
| "SG"
|
|
749
|
-
| "SH"
|
|
750
|
-
| "SI"
|
|
751
|
-
| "SJ"
|
|
752
|
-
| "SK"
|
|
753
|
-
| "SL"
|
|
754
|
-
| "SM"
|
|
755
|
-
| "SN"
|
|
756
|
-
| "SO"
|
|
757
|
-
| "SR"
|
|
758
|
-
| "SS"
|
|
759
|
-
| "ST"
|
|
760
|
-
| "SV"
|
|
761
|
-
| "SX"
|
|
762
|
-
| "SY"
|
|
763
|
-
| "SZ"
|
|
764
|
-
| "TC"
|
|
765
|
-
| "TD"
|
|
766
|
-
| "TF"
|
|
767
|
-
| "TG"
|
|
768
|
-
| "TH"
|
|
769
|
-
| "TJ"
|
|
770
|
-
| "TK"
|
|
771
|
-
| "TL"
|
|
772
|
-
| "TM"
|
|
773
|
-
| "TN"
|
|
774
|
-
| "TO"
|
|
775
|
-
| "TR"
|
|
776
|
-
| "TT"
|
|
777
|
-
| "TV"
|
|
778
|
-
| "TW"
|
|
779
|
-
| "TZ"
|
|
780
|
-
| "UA"
|
|
781
|
-
| "UG"
|
|
782
|
-
| "UM"
|
|
783
|
-
| "US"
|
|
784
|
-
| "UY"
|
|
785
|
-
| "UZ"
|
|
786
|
-
| "VA"
|
|
787
|
-
| "VC"
|
|
788
|
-
| "VE"
|
|
789
|
-
| "VG"
|
|
790
|
-
| "VI"
|
|
791
|
-
| "VN"
|
|
792
|
-
| "VU"
|
|
793
|
-
| "WF"
|
|
794
|
-
| "WS"
|
|
795
|
-
| "YE"
|
|
796
|
-
| "YT"
|
|
797
|
-
| "ZA"
|
|
798
|
-
| "ZM"
|
|
799
|
-
| "ZW";
|
|
532
|
+
declare type Iso3166Alpha2Code = "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
|
|
800
533
|
|
|
801
534
|
/**
|
|
802
535
|
* @beta
|
|
803
536
|
*/
|
|
804
537
|
declare interface Logger {
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
538
|
+
debug(...messages: unknown[]): void;
|
|
539
|
+
info(...messages: unknown[]): void;
|
|
540
|
+
log(...messages: unknown[]): void;
|
|
541
|
+
warn(...messages: unknown[]): void;
|
|
542
|
+
error(...messages: unknown[]): void;
|
|
810
543
|
}
|
|
811
544
|
|
|
812
545
|
declare type Modify<T, R> = Omit<T, keyof R> & R;
|
|
@@ -815,49 +548,29 @@ declare type Modify<T, R> = Omit<T, keyof R> & R;
|
|
|
815
548
|
* @public
|
|
816
549
|
*/
|
|
817
550
|
declare interface OnResponseSendingFinalHook {
|
|
818
|
-
|
|
819
|
-
response: Response,
|
|
820
|
-
request: ZuploRequest,
|
|
821
|
-
context: ZuploContext
|
|
822
|
-
): Promise<void> | void;
|
|
551
|
+
(response: Response, request: ZuploRequest, context: ZuploContext): Promise<void> | void;
|
|
823
552
|
}
|
|
824
553
|
|
|
825
554
|
/**
|
|
826
555
|
* @public
|
|
827
556
|
*/
|
|
828
557
|
declare interface OnResponseSendingHook {
|
|
829
|
-
|
|
830
|
-
response: Response,
|
|
831
|
-
request: ZuploRequest,
|
|
832
|
-
context: ZuploContext
|
|
833
|
-
): Promise<Response> | Response;
|
|
558
|
+
(response: Response, request: ZuploRequest, context: ZuploContext): Promise<Response> | Response;
|
|
834
559
|
}
|
|
835
560
|
|
|
836
561
|
/**
|
|
837
562
|
* @beta
|
|
838
563
|
*/
|
|
839
|
-
declare type ParameterBaseObject = Modify<
|
|
840
|
-
Omit<
|
|
841
|
-
OpenAPIV3_1.ParameterBaseObject,
|
|
842
|
-
| "content"
|
|
843
|
-
| "allowEmptyValue"
|
|
844
|
-
| "style"
|
|
845
|
-
| "allowReserved"
|
|
846
|
-
| "explode"
|
|
847
|
-
| "example"
|
|
848
|
-
| "examples"
|
|
849
|
-
>,
|
|
850
|
-
{
|
|
564
|
+
declare type ParameterBaseObject = Modify<Omit<OpenAPIV3_1.ParameterBaseObject, "content" | "allowEmptyValue" | "style" | "allowReserved" | "explode" | "example" | "examples">, {
|
|
851
565
|
schema: OpenAPIV3_1.SchemaObject;
|
|
852
|
-
|
|
853
|
-
>;
|
|
566
|
+
}>;
|
|
854
567
|
|
|
855
568
|
/**
|
|
856
569
|
* @beta
|
|
857
570
|
*/
|
|
858
571
|
declare interface ParameterDefinition extends ParameterBaseObject {
|
|
859
|
-
|
|
860
|
-
|
|
572
|
+
name: string;
|
|
573
|
+
in: string;
|
|
861
574
|
}
|
|
862
575
|
|
|
863
576
|
/**
|
|
@@ -865,7 +578,7 @@ declare interface ParameterDefinition extends ParameterBaseObject {
|
|
|
865
578
|
* @public
|
|
866
579
|
*/
|
|
867
580
|
declare interface RequestGeneric extends RequestInitGeneric {
|
|
868
|
-
|
|
581
|
+
Query?: RequestQueryDefault;
|
|
869
582
|
}
|
|
870
583
|
|
|
871
584
|
/**
|
|
@@ -873,8 +586,8 @@ declare interface RequestGeneric extends RequestInitGeneric {
|
|
|
873
586
|
* @public
|
|
874
587
|
*/
|
|
875
588
|
declare interface RequestInitGeneric {
|
|
876
|
-
|
|
877
|
-
|
|
589
|
+
UserData?: UserDataDefault;
|
|
590
|
+
Params?: RequestParamsDefault;
|
|
878
591
|
}
|
|
879
592
|
|
|
880
593
|
declare type RequestParamsDefault = Record<string, string>;
|
|
@@ -886,129 +599,102 @@ declare type RequestQueryDefault = Record<string, string>;
|
|
|
886
599
|
* @public
|
|
887
600
|
*/
|
|
888
601
|
declare interface RequestUser<TUserData> {
|
|
889
|
-
|
|
890
|
-
|
|
602
|
+
sub: string;
|
|
603
|
+
data: TUserData;
|
|
891
604
|
}
|
|
892
605
|
|
|
893
|
-
declare type ResolveRequestParams<
|
|
894
|
-
TParams extends RequestParamsDefault | undefined,
|
|
895
|
-
> = TParams extends RequestParamsDefault ? TParams : RequestParamsDefault;
|
|
606
|
+
declare type ResolveRequestParams<TParams extends RequestParamsDefault | undefined> = TParams extends RequestParamsDefault ? TParams : RequestParamsDefault;
|
|
896
607
|
|
|
897
|
-
declare type ResolveRequestQuery<
|
|
898
|
-
TQuery extends RequestQueryDefault | undefined,
|
|
899
|
-
> = TQuery extends RequestQueryDefault ? TQuery : RequestQueryDefault;
|
|
608
|
+
declare type ResolveRequestQuery<TQuery extends RequestQueryDefault | undefined> = TQuery extends RequestQueryDefault ? TQuery : RequestQueryDefault;
|
|
900
609
|
|
|
901
|
-
declare type ResolveUserData<TUserData extends UserDataDefault | undefined> =
|
|
902
|
-
TUserData extends UserDataDefault ? TUserData : UserDataDefault;
|
|
610
|
+
declare type ResolveUserData<TUserData extends UserDataDefault | undefined> = TUserData extends UserDataDefault ? TUserData : UserDataDefault;
|
|
903
611
|
|
|
904
612
|
/**
|
|
905
613
|
* @beta
|
|
906
614
|
*/
|
|
907
|
-
declare type ResponsesDefinition = Record<
|
|
908
|
-
|
|
909
|
-
Modify<
|
|
910
|
-
Omit<OpenAPIV3_1.ResponseObject, "links">,
|
|
911
|
-
{
|
|
912
|
-
headers?: {
|
|
615
|
+
declare type ResponsesDefinition = Record<HttpStatusCode | HttpStatusCodeRangeDefinition, Modify<Omit<OpenAPIV3_1.ResponseObject, "links">, {
|
|
616
|
+
headers?: {
|
|
913
617
|
[header: string]: ParameterBaseObject;
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
>
|
|
917
|
-
>;
|
|
618
|
+
};
|
|
619
|
+
}>>;
|
|
918
620
|
|
|
919
|
-
declare interface RouteConfiguration
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
raw<T>(): T;
|
|
621
|
+
declare interface RouteConfiguration extends Omit<BuildRouteConfiguration, "raw"> {
|
|
622
|
+
/**
|
|
623
|
+
* @deprecated Please switch to "raw().operationId"
|
|
624
|
+
*/
|
|
625
|
+
operationId?: string;
|
|
626
|
+
/**
|
|
627
|
+
* @deprecated Please switch to "raw().summary"
|
|
628
|
+
*/
|
|
629
|
+
summary?: string;
|
|
630
|
+
/**
|
|
631
|
+
* @deprecated Please switch to "raw().tags"
|
|
632
|
+
*/
|
|
633
|
+
tags?: string[];
|
|
634
|
+
/**
|
|
635
|
+
* @deprecated Please switch to "raw().parameters"
|
|
636
|
+
*/
|
|
637
|
+
parameters?: ParameterDefinition[];
|
|
638
|
+
/**
|
|
639
|
+
* @deprecated Please switch to "raw().responses"
|
|
640
|
+
*/
|
|
641
|
+
responses?: ResponsesDefinition;
|
|
642
|
+
raw<T>(): T;
|
|
942
643
|
}
|
|
943
644
|
|
|
944
645
|
declare type UserDataDefault = any;
|
|
945
646
|
|
|
946
|
-
|
|
947
|
-
(promise: Promise<any>): void;
|
|
948
|
-
}
|
|
647
|
+
/* Excluded from this release type: WaitUntilFunc */
|
|
949
648
|
|
|
950
649
|
/**
|
|
951
650
|
* @beta
|
|
952
651
|
*/
|
|
953
652
|
declare interface ZuploContext extends EventTarget {
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
addEventListener<Type extends keyof Record<string, Event>>(
|
|
1000
|
-
type: Type,
|
|
1001
|
-
handler: EventListenerOrEventListenerObject,
|
|
1002
|
-
options?: AddEventListenerOptions | boolean
|
|
1003
|
-
): void;
|
|
1004
|
-
/**
|
|
1005
|
-
* @deprecated This will be removed in the future. See {@link https://zuplo.com/docs/articles/runtime-extensions}
|
|
1006
|
-
*/
|
|
1007
|
-
removeEventListener<Type extends keyof Record<string, Event>>(
|
|
1008
|
-
type: Type,
|
|
1009
|
-
handler: EventListenerOrEventListenerObject,
|
|
1010
|
-
options?: AddEventListenerOptions | boolean
|
|
1011
|
-
): void;
|
|
653
|
+
/**
|
|
654
|
+
* The unique identifier of the incoming request
|
|
655
|
+
*/
|
|
656
|
+
readonly requestId: Readonly<string>;
|
|
657
|
+
/**
|
|
658
|
+
* Request based logger
|
|
659
|
+
*/
|
|
660
|
+
readonly log: Readonly<Logger>;
|
|
661
|
+
readonly route: Readonly<RouteConfiguration>;
|
|
662
|
+
/**
|
|
663
|
+
* Custom data stored on the ZuploContext
|
|
664
|
+
*/
|
|
665
|
+
readonly custom: Record<string, any>;
|
|
666
|
+
readonly incomingRequestProperties: IncomingRequestProperties;
|
|
667
|
+
readonly invokeInboundPolicy: (policyName: string, request: ZuploRequest) => Promise<Response | ZuploRequest>;
|
|
668
|
+
readonly waitUntil: WaitUntilFunc;
|
|
669
|
+
/**
|
|
670
|
+
* Fires just before the response is sent. Response can be modified.
|
|
671
|
+
*/
|
|
672
|
+
readonly addResponseSendingHook: (hook: OnResponseSendingHook) => void;
|
|
673
|
+
/**
|
|
674
|
+
* Fires immediately after the response is sent. Response cannot be modified.
|
|
675
|
+
*/
|
|
676
|
+
readonly addResponseSendingFinalHook: (hook: OnResponseSendingFinalHook) => void;
|
|
677
|
+
/**
|
|
678
|
+
* Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
|
|
679
|
+
*
|
|
680
|
+
* The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
|
|
681
|
+
*
|
|
682
|
+
* When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
|
|
683
|
+
*
|
|
684
|
+
* When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
|
|
685
|
+
*
|
|
686
|
+
* When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
|
|
687
|
+
*
|
|
688
|
+
* If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
|
|
689
|
+
*
|
|
690
|
+
* The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
|
|
691
|
+
* @deprecated This will be removed in the future. Use hooks instead. See {@link https://zuplo.com/docs/articles/runtime-extensions}
|
|
692
|
+
*/
|
|
693
|
+
addEventListener<Type extends keyof Record<string, Event>>(type: Type, handler: EventListenerOrEventListenerObject, options?: AddEventListenerOptions | boolean): void;
|
|
694
|
+
/**
|
|
695
|
+
* @deprecated This will be removed in the future. See {@link https://zuplo.com/docs/articles/runtime-extensions}
|
|
696
|
+
*/
|
|
697
|
+
removeEventListener<Type extends keyof Record<string, Event>>(type: Type, handler: EventListenerOrEventListenerObject, options?: AddEventListenerOptions | boolean): void;
|
|
1012
698
|
}
|
|
1013
699
|
|
|
1014
700
|
/**
|
|
@@ -1017,67 +703,63 @@ declare interface ZuploContext extends EventTarget {
|
|
|
1017
703
|
* standard {@link https://developer.mozilla.org/en-US/docs/Web/API/Request | Request}.
|
|
1018
704
|
* @public
|
|
1019
705
|
*/
|
|
1020
|
-
declare class ZuploRequest<
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
*/
|
|
1069
|
-
user?: RequestUser<ResolveUserData<TOptions["UserData"]>>;
|
|
706
|
+
declare class ZuploRequest<TOptions extends RequestGeneric = RequestGeneric> extends Request {
|
|
707
|
+
#private;
|
|
708
|
+
constructor(input: string | Request, init?: ZuploRequestInit<TOptions>);
|
|
709
|
+
/**
|
|
710
|
+
* A dictionary of query-string values
|
|
711
|
+
*
|
|
712
|
+
* @example
|
|
713
|
+
* The url `https://example.com?foo=bar` would return
|
|
714
|
+
* the following query object:
|
|
715
|
+
*
|
|
716
|
+
* ```
|
|
717
|
+
* const foo = request.query.foo;
|
|
718
|
+
* ```
|
|
719
|
+
*
|
|
720
|
+
* @readonly
|
|
721
|
+
*/
|
|
722
|
+
get query(): Readonly<ResolveRequestQuery<TOptions["Query"]>>;
|
|
723
|
+
/**
|
|
724
|
+
* If you use tokens in your route’s URL, they are
|
|
725
|
+
* automatically parsed into properties on the params
|
|
726
|
+
* property of your request.
|
|
727
|
+
*
|
|
728
|
+
* @example
|
|
729
|
+
* The route `/products/:productId/vendors/:vendorId`
|
|
730
|
+
* would include two params:
|
|
731
|
+
*
|
|
732
|
+
* ```
|
|
733
|
+
* const productId = request.params.productId;
|
|
734
|
+
* const vendorId = request.params.vendorId;
|
|
735
|
+
* ```
|
|
736
|
+
* @readonly
|
|
737
|
+
*/
|
|
738
|
+
get params(): Readonly<ResolveRequestParams<TOptions["Params"]>>;
|
|
739
|
+
/**
|
|
740
|
+
* An optional object identifying a ‘user’.
|
|
741
|
+
*
|
|
742
|
+
* @remarks
|
|
743
|
+
* If undefined this typically means the request is
|
|
744
|
+
* anonymous. If present, the user object will have
|
|
745
|
+
* a sub property that is a unique identifier for
|
|
746
|
+
* that user. There is also an optional data property
|
|
747
|
+
* that is of any type that typically contains other
|
|
748
|
+
* information about the user. When using JWT tokens
|
|
749
|
+
* you’ll usually find all the claims here.
|
|
750
|
+
*
|
|
751
|
+
* @readonly
|
|
752
|
+
*/
|
|
753
|
+
user?: RequestUser<ResolveUserData<TOptions["UserData"]>>;
|
|
1070
754
|
}
|
|
1071
755
|
|
|
1072
756
|
/**
|
|
1073
757
|
* The initialization values of a request
|
|
1074
758
|
* @public
|
|
1075
759
|
*/
|
|
1076
|
-
declare interface ZuploRequestInit<
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
params?: ResolveRequestParams<TOptions["Params"]>;
|
|
1080
|
-
user?: ResolveUserData<TOptions["UserData"]>;
|
|
760
|
+
declare interface ZuploRequestInit<TOptions extends RequestInitGeneric = RequestInitGeneric> extends RequestInit {
|
|
761
|
+
params?: ResolveRequestParams<TOptions["Params"]>;
|
|
762
|
+
user?: ResolveUserData<TOptions["UserData"]>;
|
|
1081
763
|
}
|
|
1082
764
|
|
|
1083
|
-
export {}
|
|
765
|
+
export { }
|