@zuplo/runtime 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/internal.d.ts CHANGED
@@ -1,38 +1,38 @@
1
- import type { OpenAPIV3_1 } from "openapi-types";
1
+ import type { OpenAPIV3_1 } from 'openapi-types';
2
2
 
3
3
  /* Excluded from this release type: BuildEnvironment */
4
4
 
5
5
  declare interface BuildRouteConfiguration {
6
- path: string;
7
- methods: HttpMethod[];
8
- /**
6
+ path: string;
7
+ methods: HttpMethod[];
8
+ /**
9
9
  /* @deprecated This property is not used and will be removed in future versions
10
10
  */
11
- label?: string;
12
- /**
11
+ label?: string;
12
+ /**
13
13
  /* @deprecated This property is not used and will be removed in future versions
14
14
  */
15
- key?: string;
16
- handler: HandlerDefinition;
17
- corsPolicy?: CorsPolicy;
18
- /**
15
+ key?: string;
16
+ handler: HandlerDefinition;
17
+ corsPolicy?: CorsPolicy;
18
+ /**
19
19
  /* @deprecated This property is deprecated. Use route.raw() instead.
20
20
  */
21
- custom?: any;
22
- /**
21
+ custom?: any;
22
+ /**
23
23
  /* @deprecated This property is not used and will be removed in future versions
24
24
  */
25
- version: string;
26
- policies?: {
27
- inbound?: string[];
28
- outbound?: string[];
29
- };
30
- /**
25
+ version: string;
26
+ policies?: {
27
+ inbound?: string[];
28
+ outbound?: string[];
29
+ };
30
+ /**
31
31
  /* @deprecated This property is deprecated. Use route.raw() instead.
32
32
  */
33
- excludeFromOpenApi?: boolean;
34
- pathPattern?: string;
35
- /* Excluded from this release type: raw */
33
+ excludeFromOpenApi?: boolean;
34
+ pathPattern?: string;
35
+ /* Excluded from this release type: raw */
36
36
  }
37
37
 
38
38
  /**
@@ -41,514 +41,465 @@ declare interface BuildRouteConfiguration {
41
41
  declare type CompatibilityDate = "2023-03-14" | "2024-01-15";
42
42
 
43
43
  declare interface CompatibilityFlags {
44
- /**
45
- * Whether or not outbound policies should run if the response from the
46
- * handlers is not `response.ok`
47
- *
48
- * @compatibilityDate 2024-01-15
49
- */
50
- runOutboundPoliciesOnHandlerOnAllStatuses: boolean;
51
- /**
52
- * Whether or not hooks run on system routes
53
- *
54
- * @compatibilityDate 2024-01-15
55
- */
56
- doNotRunHooksOnSystemRoutes: boolean;
57
- /**
58
- * Remove all vendor (cf-, zp-) headers except for the specific
59
- * list of allowed headers
60
- *
61
- * @compatibilityDate 2024-01-15
62
- */
63
- removeAllVendorHeadersExceptListed: boolean;
44
+ /**
45
+ * Whether or not outbound policies should run if the response from the
46
+ * handlers is not `response.ok`
47
+ *
48
+ * @compatibilityDate 2024-01-15
49
+ */
50
+ runOutboundPoliciesOnHandlerOnAllStatuses: boolean;
51
+ /**
52
+ * Whether or not hooks run on system routes
53
+ *
54
+ * @compatibilityDate 2024-01-15
55
+ */
56
+ doNotRunHooksOnSystemRoutes: boolean;
57
+ /**
58
+ * Remove all vendor (cf-, zp-) headers except for the specific
59
+ * list of allowed headers
60
+ *
61
+ * @compatibilityDate 2024-01-15
62
+ */
63
+ removeAllVendorHeadersExceptListed: boolean;
64
64
  }
65
65
 
66
66
  declare type CorsPolicy = string | "anything-goes" | "none";
67
67
 
68
68
  declare interface CorsPolicyConfiguration {
69
- name: string;
70
- allowCredentials?: boolean;
71
- maxAge?: number;
72
- allowedOrigins: string[] | string;
73
- allowedMethods?: HttpMethod[] | string;
74
- allowedHeaders?: string[] | string;
75
- exposeHeaders?: string[] | string;
69
+ name: string;
70
+ allowCredentials?: boolean;
71
+ maxAge?: number;
72
+ allowedOrigins: string[] | string;
73
+ allowedMethods?: HttpMethod[] | string;
74
+ allowedHeaders?: string[] | string;
75
+ exposeHeaders?: string[] | string;
76
76
  }
77
77
 
78
- export declare function getIdForParameterSchema(
79
- path: string,
80
- operation: string,
81
- type: string,
82
- name: string
83
- ): string;
78
+ export declare function getIdForParameterSchema(path: string, operation: string, type: string, name: string): string;
84
79
 
85
- export declare function getIdForRefSchema(
86
- oasFileName: string,
87
- ref: string
88
- ): string;
80
+ export declare function getIdForRefSchema(oasFileName: string, ref: string): string;
89
81
 
90
- export declare function getIdForRequestBodySchema(
91
- path: string,
92
- operation: string,
93
- contentType: string
94
- ): string;
82
+ export declare function getIdForRequestBodySchema(path: string, operation: string, contentType: string): string;
95
83
 
96
- export declare function getRawOperationDataIdentifierName(
97
- oasFileName: string,
98
- path: string,
99
- operation: string
100
- ): string;
84
+ export declare function getRawOperationDataIdentifierName(oasFileName: string, path: string, operation: string): string;
101
85
 
102
86
  declare interface HandlerDefinition {
103
- module: any;
104
- export: string;
105
- options?: unknown;
87
+ module: any;
88
+ export: string;
89
+ options?: unknown;
106
90
  }
107
91
 
108
- export declare type HttpMethod =
109
- | "GET"
110
- | "HEAD"
111
- | "POST"
112
- | "PUT"
113
- | "DELETE"
114
- | "CONNECT"
115
- | "OPTIONS"
116
- | "TRACE"
117
- | "PATCH";
92
+ export declare type HttpMethod = "GET" | "HEAD" | "POST" | "PUT" | "DELETE" | "CONNECT" | "OPTIONS" | "TRACE" | "PATCH";
118
93
 
119
94
  /**
120
95
  * @beta
121
96
  */
122
97
  declare enum HttpStatusCode {
123
- /**
124
- * The server has received the request headers and the client should proceed to send the request body
125
- * (in the case of a request for which a body needs to be sent; for example, a POST request).
126
- * Sending a large request body to a server after a request has been rejected for inappropriate headers would be inefficient.
127
- * To have a server check the request's headers, a client must send Expect: 100-continue as a header in its initial request
128
- * 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.
129
- */
130
- CONTINUE = 100,
131
- /**
132
- * The requester has asked the server to switch protocols and the server has agreed to do so.
133
- */
134
- SWITCHING_PROTOCOLS = 101,
135
- /**
136
- * A WebDAV request may contain many sub-requests involving file operations, requiring a long time to complete the request.
137
- * This code indicates that the server has received and is processing the request, but no response is available yet.
138
- * This prevents the client from timing out and assuming the request was lost.
139
- * @deprecated This status code is deprecated and shouldn't be sent any more. Clients may still accept it, but simply ignore them.
140
- */
141
- PROCESSING = 102,
142
- /**
143
- * This response may be sent by a server while it is still preparing a
144
- * response, with hints about the resources that the server is expecting
145
- * the final response will link. This allows a browser to start preloading
146
- * resources even before the server has prepared and sent that final response.
147
- */
148
- EARLY_HINTS = 103,
149
- /**
150
- * Standard response for successful HTTP requests.
151
- * The actual response will depend on the request method used.
152
- * In a GET request, the response will contain an entity corresponding to the requested resource.
153
- * In a POST request, the response will contain an entity describing or containing the result of the action.
154
- */
155
- OK = 200,
156
- /**
157
- * The request has been fulfilled, resulting in the creation of a new resource.
158
- */
159
- CREATED = 201,
160
- /**
161
- * The request has been accepted for processing, but the processing has not been completed.
162
- * The request might or might not be eventually acted upon, and may be disallowed when processing occurs.
163
- */
164
- ACCEPTED = 202,
165
- /**
166
- * SINCE HTTP/1.1
167
- * The server is a transforming proxy that received a 200 OK from its origin,
168
- * but is returning a modified version of the origin's response.
169
- */
170
- NON_AUTHORITATIVE_INFORMATION = 203,
171
- /**
172
- * The server successfully processed the request and is not returning any content.
173
- */
174
- NO_CONTENT = 204,
175
- /**
176
- * The server successfully processed the request, but is not returning any content.
177
- * Unlike a 204 response, this response requires that the requester reset the document view.
178
- */
179
- RESET_CONTENT = 205,
180
- /**
181
- * The server is delivering only part of the resource (byte serving) due to a range header sent by the client.
182
- * The range header is used by HTTP clients to enable resuming of interrupted downloads,
183
- * or split a download into multiple simultaneous streams.
184
- */
185
- PARTIAL_CONTENT = 206,
186
- /**
187
- * The message body that follows is an XML message and can contain a number of separate response codes,
188
- * depending on how many sub-requests were made.
189
- */
190
- MULTI_STATUS = 207,
191
- /**
192
- * The members of a DAV binding have already been enumerated in a preceding part of the (multistatus) response,
193
- * and are not being included again.
194
- */
195
- ALREADY_REPORTED = 208,
196
- /**
197
- * The server has fulfilled a request for the resource,
198
- * and the response is a representation of the result of one or more instance-manipulations applied to the current instance.
199
- */
200
- IM_USED = 226,
201
- /**
202
- * Indicates multiple options for the resource from which the client may choose (via agent-driven content negotiation).
203
- * For example, this code could be used to present multiple video format options,
204
- * to list files with different filename extensions, or to suggest word-sense disambiguation.
205
- */
206
- MULTIPLE_CHOICES = 300,
207
- /**
208
- * This and all future requests should be directed to the given URI.
209
- */
210
- MOVED_PERMANENTLY = 301,
211
- /**
212
- * This is an example of industry practice contradicting the standard.
213
- * The HTTP/1.0 specification (RFC 1945) required the client to perform a temporary redirect
214
- * (the original describing phrase was "Moved Temporarily"), but popular browsers implemented 302
215
- * with the functionality of a 303 See Other. Therefore, HTTP/1.1 added status codes 303 and 307
216
- * to distinguish between the two behaviours. However, some Web applications and frameworks
217
- * use the 302 status code as if it were the 303.
218
- */
219
- FOUND = 302,
220
- /**
221
- * SINCE HTTP/1.1
222
- * The response to the request can be found under another URI using a GET method.
223
- * When received in response to a POST (or PUT/DELETE), the client should presume that
224
- * the server has received the data and should issue a redirect with a separate GET message.
225
- */
226
- SEE_OTHER = 303,
227
- /**
228
- * Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match.
229
- * In such case, there is no need to retransmit the resource since the client still has a previously-downloaded copy.
230
- */
231
- NOT_MODIFIED = 304,
232
- /**
233
- * SINCE HTTP/1.1
234
- * The requested resource is available only through a proxy, the address for which is provided in the response.
235
- * Many HTTP clients (such as Mozilla and Internet Explorer) do not correctly handle responses with this status code, primarily for security reasons.
236
- */
237
- USE_PROXY = 305,
238
- /**
239
- * No longer used. Originally meant "Subsequent requests should use the specified proxy."
240
- * @deprecated No longer used
241
- */
242
- SWITCH_PROXY = 306,
243
- /**
244
- * SINCE HTTP/1.1
245
- * In this case, the request should be repeated with another URI; however, future requests should still use the original URI.
246
- * In contrast to how 302 was historically implemented, the request method is not allowed to be changed when reissuing the original request.
247
- * For example, a POST request should be repeated using another POST request.
248
- */
249
- TEMPORARY_REDIRECT = 307,
250
- /**
251
- * The request and all future requests should be repeated using another URI.
252
- * 307 and 308 parallel the behaviors of 302 and 301, but do not allow the HTTP method to change.
253
- * So, for example, submitting a form to a permanently redirected resource may continue smoothly.
254
- */
255
- PERMANENT_REDIRECT = 308,
256
- /**
257
- * The server cannot or will not process the request due to an apparent client error
258
- * (e.g., malformed request syntax, too large size, invalid request message framing, or deceptive request routing).
259
- */
260
- BAD_REQUEST = 400,
261
- /**
262
- * Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet
263
- * been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the
264
- * requested resource. See Basic access authentication and Digest access authentication. 401 semantically means
265
- * "unauthenticated",i.e. the user does not have the necessary credentials.
266
- */
267
- UNAUTHORIZED = 401,
268
- /**
269
- * Reserved for future use. The original intention was that this code might be used as part of some form of digital
270
- * cash or micro payment scheme, but that has not happened, and this code is not usually used.
271
- * Google Developers API uses this status if a particular developer has exceeded the daily limit on requests.
272
- */
273
- PAYMENT_REQUIRED = 402,
274
- /**
275
- * The request was valid, but the server is refusing action.
276
- * The user might not have the necessary permissions for a resource.
277
- */
278
- FORBIDDEN = 403,
279
- /**
280
- * The requested resource could not be found but may be available in the future.
281
- * Subsequent requests by the client are permissible.
282
- */
283
- NOT_FOUND = 404,
284
- /**
285
- * A request method is not supported for the requested resource;
286
- * 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.
287
- */
288
- METHOD_NOT_ALLOWED = 405,
289
- /**
290
- * The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.
291
- */
292
- NOT_ACCEPTABLE = 406,
293
- /**
294
- * The client must first authenticate itself with the proxy.
295
- */
296
- PROXY_AUTHENTICATION_REQUIRED = 407,
297
- /**
298
- * The server timed out waiting for the request.
299
- * According to HTTP specifications:
300
- * "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."
301
- */
302
- REQUEST_TIMEOUT = 408,
303
- /**
304
- * Indicates that the request could not be processed because of conflict in the request,
305
- * such as an edit conflict between multiple simultaneous updates.
306
- */
307
- CONFLICT = 409,
308
- /**
309
- * Indicates that the resource requested is no longer available and will not be available again.
310
- * This should be used when a resource has been intentionally removed and the resource should be purged.
311
- * Upon receiving a 410 status code, the client should not request the resource in the future.
312
- * Clients such as search engines should remove the resource from their indices.
313
- * Most use cases do not require clients and search engines to purge the resource, and a "404 Not Found" may be used instead.
314
- */
315
- GONE = 410,
316
- /**
317
- * The request did not specify the length of its content, which is required by the requested resource.
318
- */
319
- LENGTH_REQUIRED = 411,
320
- /**
321
- * The server does not meet one of the preconditions that the requester put on the request.
322
- */
323
- PRECONDITION_FAILED = 412,
324
- /**
325
- * The request is larger than the server is willing or able to process. Previously called "Request Entity Too Large".
326
- */
327
- CONTENT_TOO_LARGE = 413,
328
- /* Excluded from this release type: PAYLOAD_TOO_LARGE */
329
- /**
330
- * 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,
331
- * in which case it should be converted to a POST request.
332
- * Called "Request-URI Too Long" previously.
333
- */
334
- URI_TOO_LONG = 414,
335
- /**
336
- * The request entity has a media type which the server or resource does not support.
337
- * For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format.
338
- */
339
- UNSUPPORTED_MEDIA_TYPE = 415,
340
- /**
341
- * The client has asked for a portion of the file (byte serving), but the server cannot supply that portion.
342
- * For example, if the client asked for a part of the file that lies beyond the end of the file.
343
- * Called "Requested Range Not Satisfiable" previously.
344
- */
345
- RANGE_NOT_SATISFIABLE = 416,
346
- /**
347
- * The server cannot meet the requirements of the Expect request-header field.
348
- */
349
- EXPECTATION_FAILED = 417,
350
- /**
351
- * This code was defined in 1998 as one of the traditional IETF April Fools' jokes, in RFC 2324, Hyper Text Coffee Pot Control Protocol,
352
- * and is not expected to be implemented by actual HTTP servers. The RFC specifies this code should be returned by
353
- * teapots requested to brew coffee. This HTTP status is used as an Easter egg in some websites, including Google.com.
354
- */
355
- I_AM_A_TEAPOT = 418,
356
- /**
357
- * The request was directed at a server that is not able to produce a response (for example because a connection reuse).
358
- */
359
- MISDIRECTED_REQUEST = 421,
360
- /* Excluded from this release type: UNPROCESSABLE_ENTITY */
361
- /**
362
- * The request was well-formed but was unable to be followed due to semantic errors.
363
- */
364
- UNPROCESSABLE_CONTENT = 422,
365
- /**
366
- * The resource that is being accessed is locked.
367
- */
368
- LOCKED = 423,
369
- /**
370
- * The request failed due to failure of a previous request (e.g., a PROPPATCH).
371
- */
372
- FAILED_DEPENDENCY = 424,
373
- /**
374
- * The server is unwilling to risk processing a request that might be
375
- * replayed, which creates the potential for a replay attack.
376
- */
377
- TOO_EARLY = 425,
378
- /**
379
- * The client should switch to a different protocol such as TLS/1.0, given in the Upgrade header field.
380
- */
381
- UPGRADE_REQUIRED = 426,
382
- /**
383
- * The origin server requires the request to be conditional.
384
- * Intended to prevent "the 'lost update' problem, where a client
385
- * GETs a resource's state, modifies it, and PUTs it back to the server,
386
- * when meanwhile a third party has modified the state on the server, leading to a conflict."
387
- */
388
- PRECONDITION_REQUIRED = 428,
389
- /**
390
- * The user has sent too many requests in a given amount of time. Intended for use with rate-limiting schemes.
391
- */
392
- TOO_MANY_REQUESTS = 429,
393
- /**
394
- * The server is unwilling to process the request because either an individual header field,
395
- * or all the header fields collectively, are too large.
396
- */
397
- REQUEST_HEADER_FIELDS_TOO_LARGE = 431,
398
- /**
399
- * A server operator has received a legal demand to deny access to a resource or to a set of resources
400
- * that includes the requested resource. The code 451 was chosen as a reference to the novel Fahrenheit 451.
401
- */
402
- UNAVAILABLE_FOR_LEGAL_REASONS = 451,
403
- /**
404
- * A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.
405
- */
406
- INTERNAL_SERVER_ERROR = 500,
407
- /**
408
- * The server either does not recognize the request method, or it lacks the ability to fulfill the request.
409
- * Usually this implies future availability (e.g., a new feature of a web-service API).
410
- */
411
- NOT_IMPLEMENTED = 501,
412
- /**
413
- * The server was acting as a gateway or proxy and received an invalid response from the upstream server.
414
- */
415
- BAD_GATEWAY = 502,
416
- /**
417
- * The server is currently unavailable (because it is overloaded or down for maintenance).
418
- * Generally, this is a temporary state.
419
- */
420
- SERVICE_UNAVAILABLE = 503,
421
- /**
422
- * The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
423
- */
424
- GATEWAY_TIMEOUT = 504,
425
- /**
426
- * The server does not support the HTTP protocol version used in the request
427
- */
428
- HTTP_VERSION_NOT_SUPPORTED = 505,
429
- /**
430
- * Transparent content negotiation for the request results in a circular reference.
431
- */
432
- VARIANT_ALSO_NEGOTIATES = 506,
433
- /**
434
- * The server is unable to store the representation needed to complete the request.
435
- */
436
- INSUFFICIENT_STORAGE = 507,
437
- /**
438
- * The server detected an infinite loop while processing the request.
439
- */
440
- LOOP_DETECTED = 508,
441
- /**
442
- * Further extensions to the request are required for the server to fulfill it.
443
- */
444
- NOT_EXTENDED = 510,
445
- /**
446
- * The client needs to authenticate to gain network access.
447
- * Intended for use by intercepting proxies used to control access to the network (e.g., "captive portals" used
448
- * to require agreement to Terms of Service before granting full Internet access via a Wi-Fi hotspot).
449
- */
450
- NETWORK_AUTHENTICATION_REQUIRED = 511,
98
+ /**
99
+ * The server has received the request headers and the client should proceed to send the request body
100
+ * (in the case of a request for which a body needs to be sent; for example, a POST request).
101
+ * Sending a large request body to a server after a request has been rejected for inappropriate headers would be inefficient.
102
+ * To have a server check the request's headers, a client must send Expect: 100-continue as a header in its initial request
103
+ * 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.
104
+ */
105
+ CONTINUE = 100,
106
+ /**
107
+ * The requester has asked the server to switch protocols and the server has agreed to do so.
108
+ */
109
+ SWITCHING_PROTOCOLS = 101,
110
+ /**
111
+ * A WebDAV request may contain many sub-requests involving file operations, requiring a long time to complete the request.
112
+ * This code indicates that the server has received and is processing the request, but no response is available yet.
113
+ * This prevents the client from timing out and assuming the request was lost.
114
+ * @deprecated This status code is deprecated and shouldn't be sent any more. Clients may still accept it, but simply ignore them.
115
+ */
116
+ PROCESSING = 102,
117
+ /**
118
+ * This response may be sent by a server while it is still preparing a
119
+ * response, with hints about the resources that the server is expecting
120
+ * the final response will link. This allows a browser to start preloading
121
+ * resources even before the server has prepared and sent that final response.
122
+ */
123
+ EARLY_HINTS = 103,
124
+ /**
125
+ * Standard response for successful HTTP requests.
126
+ * The actual response will depend on the request method used.
127
+ * In a GET request, the response will contain an entity corresponding to the requested resource.
128
+ * In a POST request, the response will contain an entity describing or containing the result of the action.
129
+ */
130
+ OK = 200,
131
+ /**
132
+ * The request has been fulfilled, resulting in the creation of a new resource.
133
+ */
134
+ CREATED = 201,
135
+ /**
136
+ * The request has been accepted for processing, but the processing has not been completed.
137
+ * The request might or might not be eventually acted upon, and may be disallowed when processing occurs.
138
+ */
139
+ ACCEPTED = 202,
140
+ /**
141
+ * SINCE HTTP/1.1
142
+ * The server is a transforming proxy that received a 200 OK from its origin,
143
+ * but is returning a modified version of the origin's response.
144
+ */
145
+ NON_AUTHORITATIVE_INFORMATION = 203,
146
+ /**
147
+ * The server successfully processed the request and is not returning any content.
148
+ */
149
+ NO_CONTENT = 204,
150
+ /**
151
+ * The server successfully processed the request, but is not returning any content.
152
+ * Unlike a 204 response, this response requires that the requester reset the document view.
153
+ */
154
+ RESET_CONTENT = 205,
155
+ /**
156
+ * The server is delivering only part of the resource (byte serving) due to a range header sent by the client.
157
+ * The range header is used by HTTP clients to enable resuming of interrupted downloads,
158
+ * or split a download into multiple simultaneous streams.
159
+ */
160
+ PARTIAL_CONTENT = 206,
161
+ /**
162
+ * The message body that follows is an XML message and can contain a number of separate response codes,
163
+ * depending on how many sub-requests were made.
164
+ */
165
+ MULTI_STATUS = 207,
166
+ /**
167
+ * The members of a DAV binding have already been enumerated in a preceding part of the (multistatus) response,
168
+ * and are not being included again.
169
+ */
170
+ ALREADY_REPORTED = 208,
171
+ /**
172
+ * The server has fulfilled a request for the resource,
173
+ * and the response is a representation of the result of one or more instance-manipulations applied to the current instance.
174
+ */
175
+ IM_USED = 226,
176
+ /**
177
+ * Indicates multiple options for the resource from which the client may choose (via agent-driven content negotiation).
178
+ * For example, this code could be used to present multiple video format options,
179
+ * to list files with different filename extensions, or to suggest word-sense disambiguation.
180
+ */
181
+ MULTIPLE_CHOICES = 300,
182
+ /**
183
+ * This and all future requests should be directed to the given URI.
184
+ */
185
+ MOVED_PERMANENTLY = 301,
186
+ /**
187
+ * This is an example of industry practice contradicting the standard.
188
+ * The HTTP/1.0 specification (RFC 1945) required the client to perform a temporary redirect
189
+ * (the original describing phrase was "Moved Temporarily"), but popular browsers implemented 302
190
+ * with the functionality of a 303 See Other. Therefore, HTTP/1.1 added status codes 303 and 307
191
+ * to distinguish between the two behaviours. However, some Web applications and frameworks
192
+ * use the 302 status code as if it were the 303.
193
+ */
194
+ FOUND = 302,
195
+ /**
196
+ * SINCE HTTP/1.1
197
+ * The response to the request can be found under another URI using a GET method.
198
+ * When received in response to a POST (or PUT/DELETE), the client should presume that
199
+ * the server has received the data and should issue a redirect with a separate GET message.
200
+ */
201
+ SEE_OTHER = 303,
202
+ /**
203
+ * Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match.
204
+ * In such case, there is no need to retransmit the resource since the client still has a previously-downloaded copy.
205
+ */
206
+ NOT_MODIFIED = 304,
207
+ /**
208
+ * SINCE HTTP/1.1
209
+ * The requested resource is available only through a proxy, the address for which is provided in the response.
210
+ * Many HTTP clients (such as Mozilla and Internet Explorer) do not correctly handle responses with this status code, primarily for security reasons.
211
+ */
212
+ USE_PROXY = 305,
213
+ /**
214
+ * No longer used. Originally meant "Subsequent requests should use the specified proxy."
215
+ * @deprecated No longer used
216
+ */
217
+ SWITCH_PROXY = 306,
218
+ /**
219
+ * SINCE HTTP/1.1
220
+ * In this case, the request should be repeated with another URI; however, future requests should still use the original URI.
221
+ * In contrast to how 302 was historically implemented, the request method is not allowed to be changed when reissuing the original request.
222
+ * For example, a POST request should be repeated using another POST request.
223
+ */
224
+ TEMPORARY_REDIRECT = 307,
225
+ /**
226
+ * The request and all future requests should be repeated using another URI.
227
+ * 307 and 308 parallel the behaviors of 302 and 301, but do not allow the HTTP method to change.
228
+ * So, for example, submitting a form to a permanently redirected resource may continue smoothly.
229
+ */
230
+ PERMANENT_REDIRECT = 308,
231
+ /**
232
+ * The server cannot or will not process the request due to an apparent client error
233
+ * (e.g., malformed request syntax, too large size, invalid request message framing, or deceptive request routing).
234
+ */
235
+ BAD_REQUEST = 400,
236
+ /**
237
+ * Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet
238
+ * been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the
239
+ * requested resource. See Basic access authentication and Digest access authentication. 401 semantically means
240
+ * "unauthenticated",i.e. the user does not have the necessary credentials.
241
+ */
242
+ UNAUTHORIZED = 401,
243
+ /**
244
+ * Reserved for future use. The original intention was that this code might be used as part of some form of digital
245
+ * cash or micro payment scheme, but that has not happened, and this code is not usually used.
246
+ * Google Developers API uses this status if a particular developer has exceeded the daily limit on requests.
247
+ */
248
+ PAYMENT_REQUIRED = 402,
249
+ /**
250
+ * The request was valid, but the server is refusing action.
251
+ * The user might not have the necessary permissions for a resource.
252
+ */
253
+ FORBIDDEN = 403,
254
+ /**
255
+ * The requested resource could not be found but may be available in the future.
256
+ * Subsequent requests by the client are permissible.
257
+ */
258
+ NOT_FOUND = 404,
259
+ /**
260
+ * A request method is not supported for the requested resource;
261
+ * 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.
262
+ */
263
+ METHOD_NOT_ALLOWED = 405,
264
+ /**
265
+ * The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.
266
+ */
267
+ NOT_ACCEPTABLE = 406,
268
+ /**
269
+ * The client must first authenticate itself with the proxy.
270
+ */
271
+ PROXY_AUTHENTICATION_REQUIRED = 407,
272
+ /**
273
+ * The server timed out waiting for the request.
274
+ * According to HTTP specifications:
275
+ * "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."
276
+ */
277
+ REQUEST_TIMEOUT = 408,
278
+ /**
279
+ * Indicates that the request could not be processed because of conflict in the request,
280
+ * such as an edit conflict between multiple simultaneous updates.
281
+ */
282
+ CONFLICT = 409,
283
+ /**
284
+ * Indicates that the resource requested is no longer available and will not be available again.
285
+ * This should be used when a resource has been intentionally removed and the resource should be purged.
286
+ * Upon receiving a 410 status code, the client should not request the resource in the future.
287
+ * Clients such as search engines should remove the resource from their indices.
288
+ * Most use cases do not require clients and search engines to purge the resource, and a "404 Not Found" may be used instead.
289
+ */
290
+ GONE = 410,
291
+ /**
292
+ * The request did not specify the length of its content, which is required by the requested resource.
293
+ */
294
+ LENGTH_REQUIRED = 411,
295
+ /**
296
+ * The server does not meet one of the preconditions that the requester put on the request.
297
+ */
298
+ PRECONDITION_FAILED = 412,
299
+ /**
300
+ * The request is larger than the server is willing or able to process. Previously called "Request Entity Too Large".
301
+ */
302
+ CONTENT_TOO_LARGE = 413,
303
+ /* Excluded from this release type: PAYLOAD_TOO_LARGE */
304
+ /**
305
+ * 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,
306
+ * in which case it should be converted to a POST request.
307
+ * Called "Request-URI Too Long" previously.
308
+ */
309
+ URI_TOO_LONG = 414,
310
+ /**
311
+ * The request entity has a media type which the server or resource does not support.
312
+ * For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format.
313
+ */
314
+ UNSUPPORTED_MEDIA_TYPE = 415,
315
+ /**
316
+ * The client has asked for a portion of the file (byte serving), but the server cannot supply that portion.
317
+ * For example, if the client asked for a part of the file that lies beyond the end of the file.
318
+ * Called "Requested Range Not Satisfiable" previously.
319
+ */
320
+ RANGE_NOT_SATISFIABLE = 416,
321
+ /**
322
+ * The server cannot meet the requirements of the Expect request-header field.
323
+ */
324
+ EXPECTATION_FAILED = 417,
325
+ /**
326
+ * This code was defined in 1998 as one of the traditional IETF April Fools' jokes, in RFC 2324, Hyper Text Coffee Pot Control Protocol,
327
+ * and is not expected to be implemented by actual HTTP servers. The RFC specifies this code should be returned by
328
+ * teapots requested to brew coffee. This HTTP status is used as an Easter egg in some websites, including Google.com.
329
+ */
330
+ I_AM_A_TEAPOT = 418,
331
+ /**
332
+ * The request was directed at a server that is not able to produce a response (for example because a connection reuse).
333
+ */
334
+ MISDIRECTED_REQUEST = 421,
335
+ /* Excluded from this release type: UNPROCESSABLE_ENTITY */
336
+ /**
337
+ * The request was well-formed but was unable to be followed due to semantic errors.
338
+ */
339
+ UNPROCESSABLE_CONTENT = 422,
340
+ /**
341
+ * The resource that is being accessed is locked.
342
+ */
343
+ LOCKED = 423,
344
+ /**
345
+ * The request failed due to failure of a previous request (e.g., a PROPPATCH).
346
+ */
347
+ FAILED_DEPENDENCY = 424,
348
+ /**
349
+ * The server is unwilling to risk processing a request that might be
350
+ * replayed, which creates the potential for a replay attack.
351
+ */
352
+ TOO_EARLY = 425,
353
+ /**
354
+ * The client should switch to a different protocol such as TLS/1.0, given in the Upgrade header field.
355
+ */
356
+ UPGRADE_REQUIRED = 426,
357
+ /**
358
+ * The origin server requires the request to be conditional.
359
+ * Intended to prevent "the 'lost update' problem, where a client
360
+ * GETs a resource's state, modifies it, and PUTs it back to the server,
361
+ * when meanwhile a third party has modified the state on the server, leading to a conflict."
362
+ */
363
+ PRECONDITION_REQUIRED = 428,
364
+ /**
365
+ * The user has sent too many requests in a given amount of time. Intended for use with rate-limiting schemes.
366
+ */
367
+ TOO_MANY_REQUESTS = 429,
368
+ /**
369
+ * The server is unwilling to process the request because either an individual header field,
370
+ * or all the header fields collectively, are too large.
371
+ */
372
+ REQUEST_HEADER_FIELDS_TOO_LARGE = 431,
373
+ /**
374
+ * A server operator has received a legal demand to deny access to a resource or to a set of resources
375
+ * that includes the requested resource. The code 451 was chosen as a reference to the novel Fahrenheit 451.
376
+ */
377
+ UNAVAILABLE_FOR_LEGAL_REASONS = 451,
378
+ /**
379
+ * A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.
380
+ */
381
+ INTERNAL_SERVER_ERROR = 500,
382
+ /**
383
+ * The server either does not recognize the request method, or it lacks the ability to fulfill the request.
384
+ * Usually this implies future availability (e.g., a new feature of a web-service API).
385
+ */
386
+ NOT_IMPLEMENTED = 501,
387
+ /**
388
+ * The server was acting as a gateway or proxy and received an invalid response from the upstream server.
389
+ */
390
+ BAD_GATEWAY = 502,
391
+ /**
392
+ * The server is currently unavailable (because it is overloaded or down for maintenance).
393
+ * Generally, this is a temporary state.
394
+ */
395
+ SERVICE_UNAVAILABLE = 503,
396
+ /**
397
+ * The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
398
+ */
399
+ GATEWAY_TIMEOUT = 504,
400
+ /**
401
+ * The server does not support the HTTP protocol version used in the request
402
+ */
403
+ HTTP_VERSION_NOT_SUPPORTED = 505,
404
+ /**
405
+ * Transparent content negotiation for the request results in a circular reference.
406
+ */
407
+ VARIANT_ALSO_NEGOTIATES = 506,
408
+ /**
409
+ * The server is unable to store the representation needed to complete the request.
410
+ */
411
+ INSUFFICIENT_STORAGE = 507,
412
+ /**
413
+ * The server detected an infinite loop while processing the request.
414
+ */
415
+ LOOP_DETECTED = 508,
416
+ /**
417
+ * Further extensions to the request are required for the server to fulfill it.
418
+ */
419
+ NOT_EXTENDED = 510,
420
+ /**
421
+ * The client needs to authenticate to gain network access.
422
+ * Intended for use by intercepting proxies used to control access to the network (e.g., "captive portals" used
423
+ * to require agreement to Terms of Service before granting full Internet access via a Wi-Fi hotspot).
424
+ */
425
+ NETWORK_AUTHENTICATION_REQUIRED = 511
451
426
  }
452
427
 
453
- declare type HttpStatusCodeRangeDefinition =
454
- | "1XX"
455
- | "2XX"
456
- | "3XX"
457
- | "4XX"
458
- | "5XX";
428
+ declare type HttpStatusCodeRangeDefinition = "1XX" | "2XX" | "3XX" | "4XX" | "5XX";
459
429
 
460
430
  declare type Modify<T, R> = Omit<T, keyof R> & R;
461
431
 
462
432
  /**
463
433
  * @beta
464
434
  */
465
- declare type ParameterBaseObject = Modify<
466
- Omit<
467
- OpenAPIV3_1.ParameterBaseObject,
468
- | "content"
469
- | "allowEmptyValue"
470
- | "style"
471
- | "allowReserved"
472
- | "explode"
473
- | "example"
474
- | "examples"
475
- >,
476
- {
435
+ declare type ParameterBaseObject = Modify<Omit<OpenAPIV3_1.ParameterBaseObject, "content" | "allowEmptyValue" | "style" | "allowReserved" | "explode" | "example" | "examples">, {
477
436
  schema: OpenAPIV3_1.SchemaObject;
478
- }
479
- >;
437
+ }>;
480
438
 
481
439
  /**
482
440
  * @beta
483
441
  */
484
442
  declare interface ParameterDefinition extends ParameterBaseObject {
485
- name: string;
486
- in: string;
443
+ name: string;
444
+ in: string;
487
445
  }
488
446
 
489
447
  declare interface PolicyConfiguration {
490
- name: string;
491
- policyType: string;
492
- handler: HandlerDefinition;
493
- options?: unknown;
448
+ name: string;
449
+ policyType: string;
450
+ handler: HandlerDefinition;
451
+ options?: unknown;
494
452
  }
495
453
 
496
454
  /**
497
455
  * @beta
498
456
  */
499
- export declare type ResponsesDefinition = Record<
500
- HttpStatusCode | HttpStatusCodeRangeDefinition,
501
- Modify<
502
- Omit<OpenAPIV3_1.ResponseObject, "links">,
503
- {
504
- headers?: {
457
+ export declare type ResponsesDefinition = Record<HttpStatusCode | HttpStatusCodeRangeDefinition, Modify<Omit<OpenAPIV3_1.ResponseObject, "links">, {
458
+ headers?: {
505
459
  [header: string]: ParameterBaseObject;
506
- };
507
- }
508
- >
509
- >;
460
+ };
461
+ }>>;
510
462
 
511
- export declare interface RouteConfiguration
512
- extends Omit<BuildRouteConfiguration, "raw"> {
513
- /**
514
- * @deprecated Please switch to "raw().operationId"
515
- */
516
- operationId?: string;
517
- /**
518
- * @deprecated Please switch to "raw().summary"
519
- */
520
- summary?: string;
521
- /**
522
- * @deprecated Please switch to "raw().tags"
523
- */
524
- tags?: string[];
525
- /**
526
- * @deprecated Please switch to "raw().parameters"
527
- */
528
- parameters?: ParameterDefinition[];
529
- /**
530
- * @deprecated Please switch to "raw().responses"
531
- */
532
- responses?: ResponsesDefinition;
533
- raw<T>(): T;
463
+ export declare interface RouteConfiguration extends Omit<BuildRouteConfiguration, "raw"> {
464
+ /**
465
+ * @deprecated Please switch to "raw().operationId"
466
+ */
467
+ operationId?: string;
468
+ /**
469
+ * @deprecated Please switch to "raw().summary"
470
+ */
471
+ summary?: string;
472
+ /**
473
+ * @deprecated Please switch to "raw().tags"
474
+ */
475
+ tags?: string[];
476
+ /**
477
+ * @deprecated Please switch to "raw().parameters"
478
+ */
479
+ parameters?: ParameterDefinition[];
480
+ /**
481
+ * @deprecated Please switch to "raw().responses"
482
+ */
483
+ responses?: ResponsesDefinition;
484
+ raw<T>(): T;
534
485
  }
535
486
 
536
487
  export declare interface RouteData {
537
- /**
488
+ /**
538
489
  /* @deprecated This property is not used and will be removed in future versions
539
490
  */
540
- info?: OpenAPIV3_1.InfoObject;
541
- /**
491
+ info?: OpenAPIV3_1.InfoObject;
492
+ /**
542
493
  /* @deprecated This property is not used and will be removed in future versions
543
494
  */
544
- versions: VersionData[];
545
- /**
546
- * @minItems 0
547
- */
548
- routes: RouteConfiguration[];
549
- policies?: PolicyConfiguration[];
550
- corsPolicies?: CorsPolicyConfiguration[];
551
- requestErrorHandler?: HandlerDefinition;
495
+ versions: VersionData[];
496
+ /**
497
+ * @minItems 0
498
+ */
499
+ routes: RouteConfiguration[];
500
+ policies?: PolicyConfiguration[];
501
+ corsPolicies?: CorsPolicyConfiguration[];
502
+ requestErrorHandler?: HandlerDefinition;
552
503
  }
553
504
 
554
505
  export declare function sanitizedIdentifierName(name: string): string;
@@ -556,22 +507,22 @@ export declare function sanitizedIdentifierName(name: string): string;
556
507
  /* Excluded from this release type: StandardEnv */
557
508
 
558
509
  export declare interface VersionData {
559
- name: string;
560
- pathPrefix: string;
561
- info?: OpenAPIV3_1.InfoObject;
562
- /**
563
- * The project relative path to the OpenAPI spec.
564
- */
565
- openApiFile?: string;
566
- tags?: Omit<OpenAPIV3_1.TagObject, "externalDocs">[];
567
- /**
568
- * If false, OpenAPI documentation will not be generated for this version. If openApiFile is set this setting is ignored.
569
- */
570
- excludeFromOpenApi?: boolean;
571
- /**
572
- * If true, schema validation found in the OpenAPI spec will be enforced on requests/responses.
573
- */
574
- enforceOpenApi?: boolean;
510
+ name: string;
511
+ pathPrefix: string;
512
+ info?: OpenAPIV3_1.InfoObject;
513
+ /**
514
+ * The project relative path to the OpenAPI spec.
515
+ */
516
+ openApiFile?: string;
517
+ tags?: Omit<OpenAPIV3_1.TagObject, "externalDocs">[];
518
+ /**
519
+ * If false, OpenAPI documentation will not be generated for this version. If openApiFile is set this setting is ignored.
520
+ */
521
+ excludeFromOpenApi?: boolean;
522
+ /**
523
+ * If true, schema validation found in the OpenAPI spec will be enforced on requests/responses.
524
+ */
525
+ enforceOpenApi?: boolean;
575
526
  }
576
527
 
577
- export {};
528
+ export { }