@little-nebulae/http 0.2.0 → 0.3.1

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.
Files changed (3) hide show
  1. package/dist/index.d.ts +356 -336
  2. package/dist/index.js +143 -123
  3. package/package.json +4 -4
package/dist/index.d.ts CHANGED
@@ -1,9 +1,29 @@
1
1
  import { ValueOf } from "type-fest";
2
2
  export declare const HTTP_HEADER_ENUM: {
3
3
  readonly AUTHORIZATION: "authorization";
4
+ readonly CACHE_CONTROL: "cache-control";
5
+ readonly CONNECTION: "connection";
6
+ readonly CONTENT_ENCODING: "content-encoding";
7
+ readonly CONTENT_SECURITY_POLICY: "content-security-policy";
4
8
  readonly CONTENT_TYPE: "content-type";
5
9
  readonly COOKIE: "cookie";
10
+ readonly CROSS_ORIGIN_RESOURCE_POLICY: "cross-origin-resource-policy";
11
+ readonly DATE: "date";
12
+ readonly ETAG: "etag";
13
+ readonly EXPIRES: "expires";
14
+ readonly FORWARDED: "forwarded";
15
+ readonly HOST: "host";
16
+ readonly KEEP_ALIVE: "keep-alive";
17
+ readonly LAST_MODIFIED: "last-modified";
18
+ readonly LOCATION: "location";
19
+ readonly ORIGIN: "origin";
20
+ readonly REFERER: "referer";
21
+ readonly REFERRER_POLICY: "referrer-policy";
6
22
  readonly RETRY_AFTER: "retry-after";
23
+ readonly SET_COOKIE: "set-cookie";
24
+ readonly TRANSFER_ENCODING: "transfer-encoding";
25
+ readonly UPGRADE: "upgrade";
26
+ readonly USER_AGENT: "user-agent";
7
27
  };
8
28
  export type HttpHeader = ValueOf<typeof HTTP_HEADER_ENUM>;
9
29
  export declare const HTTP_REQUEST_METHOD_ENUM: {
@@ -18,679 +38,679 @@ export declare const HTTP_REQUEST_METHOD_ENUM: {
18
38
  readonly CONNECT: "CONNECT";
19
39
  };
20
40
  export type HttpRequestMethod = ValueOf<typeof HTTP_REQUEST_METHOD_ENUM>;
21
- export declare const HTTP_RESPONSE_STATUS_RECORD: {
41
+ export declare const HTTP_RESPONSE_STATUS_ENUM: {
22
42
  readonly BAD_REQUEST: {
23
- readonly code: 400;
24
- readonly text: "Bad Request";
43
+ readonly CODE: 400;
44
+ readonly TEXT: "Bad Request";
25
45
  };
26
46
  readonly UNAUTHORIZED: {
27
- readonly code: 401;
28
- readonly text: "Unauthorized";
47
+ readonly CODE: 401;
48
+ readonly TEXT: "Unauthorized";
29
49
  };
30
50
  readonly PAYMENT_REQUIRED: {
31
- readonly code: 402;
32
- readonly text: "Payment Required";
51
+ readonly CODE: 402;
52
+ readonly TEXT: "Payment Required";
33
53
  };
34
54
  readonly FORBIDDEN: {
35
- readonly code: 403;
36
- readonly text: "Forbidden";
55
+ readonly CODE: 403;
56
+ readonly TEXT: "Forbidden";
37
57
  };
38
58
  readonly NOT_FOUND: {
39
- readonly code: 404;
40
- readonly text: "Not Found";
59
+ readonly CODE: 404;
60
+ readonly TEXT: "Not Found";
41
61
  };
42
62
  readonly METHOD_NOT_ALLOWED: {
43
- readonly code: 405;
44
- readonly text: "Method Not Allowed";
63
+ readonly CODE: 405;
64
+ readonly TEXT: "Method Not Allowed";
45
65
  };
46
66
  readonly NOT_ACCEPTABLE: {
47
- readonly code: 406;
48
- readonly text: "Not Acceptable";
67
+ readonly CODE: 406;
68
+ readonly TEXT: "Not Acceptable";
49
69
  };
50
70
  readonly PROXY_AUTHENTICATION_REQUIRED: {
51
- readonly code: 407;
52
- readonly text: "Proxy Authentication Required";
71
+ readonly CODE: 407;
72
+ readonly TEXT: "Proxy Authentication Required";
53
73
  };
54
74
  readonly REQUEST_TIMEOUT: {
55
- readonly code: 408;
56
- readonly text: "Request Timeout";
75
+ readonly CODE: 408;
76
+ readonly TEXT: "Request Timeout";
57
77
  };
58
78
  readonly CONFLICT: {
59
- readonly code: 409;
60
- readonly text: "Conflict";
79
+ readonly CODE: 409;
80
+ readonly TEXT: "Conflict";
61
81
  };
62
82
  readonly GONE: {
63
- readonly code: 410;
64
- readonly text: "Gone";
83
+ readonly CODE: 410;
84
+ readonly TEXT: "Gone";
65
85
  };
66
86
  readonly LENGTH_REQUIRED: {
67
- readonly code: 411;
68
- readonly text: "Length Required";
87
+ readonly CODE: 411;
88
+ readonly TEXT: "Length Required";
69
89
  };
70
90
  readonly PRECONDITION_FAILED: {
71
- readonly code: 412;
72
- readonly text: "Precondition Failed";
91
+ readonly CODE: 412;
92
+ readonly TEXT: "Precondition Failed";
73
93
  };
74
94
  readonly CONTENT_TOO_LARGE: {
75
- readonly code: 413;
76
- readonly text: "Content Too Large";
95
+ readonly CODE: 413;
96
+ readonly TEXT: "Content Too Large";
77
97
  };
78
98
  readonly URI_TOO_LONG: {
79
- readonly code: 414;
80
- readonly text: "URI Too Long";
99
+ readonly CODE: 414;
100
+ readonly TEXT: "URI Too Long";
81
101
  };
82
102
  readonly UNSUPPORTED_MEDIA_TYPE: {
83
- readonly code: 415;
84
- readonly text: "Unsupported Media Type";
103
+ readonly CODE: 415;
104
+ readonly TEXT: "Unsupported Media Type";
85
105
  };
86
106
  readonly RANGE_NOT_SATISFIABLE: {
87
- readonly code: 416;
88
- readonly text: "Range Not Satisfiable";
107
+ readonly CODE: 416;
108
+ readonly TEXT: "Range Not Satisfiable";
89
109
  };
90
110
  readonly EXPECTATION_FAILED: {
91
- readonly code: 417;
92
- readonly text: "Expectation Failed";
111
+ readonly CODE: 417;
112
+ readonly TEXT: "Expectation Failed";
93
113
  };
94
114
  readonly IM_A_TEAPOT: {
95
- readonly code: 418;
96
- readonly text: "I'm a teapot";
115
+ readonly CODE: 418;
116
+ readonly TEXT: "I'm a teapot";
97
117
  };
98
118
  readonly MISDIRECTED_REQUEST: {
99
- readonly code: 421;
100
- readonly text: "Misdirected Request";
119
+ readonly CODE: 421;
120
+ readonly TEXT: "Misdirected Request";
101
121
  };
102
122
  readonly UNPROCESSABLE_CONTENT: {
103
- readonly code: 422;
104
- readonly text: "Unprocessable Content";
123
+ readonly CODE: 422;
124
+ readonly TEXT: "Unprocessable Content";
105
125
  };
106
126
  readonly LOCKED: {
107
- readonly code: 423;
108
- readonly text: "Locked";
127
+ readonly CODE: 423;
128
+ readonly TEXT: "Locked";
109
129
  };
110
130
  readonly FAILED_DEPENDENCY: {
111
- readonly code: 424;
112
- readonly text: "Failed Dependency";
131
+ readonly CODE: 424;
132
+ readonly TEXT: "Failed Dependency";
113
133
  };
114
134
  readonly TOO_EARLY: {
115
- readonly code: 425;
116
- readonly text: "Too Early";
135
+ readonly CODE: 425;
136
+ readonly TEXT: "Too Early";
117
137
  };
118
138
  readonly UPGRADE_REQUIRED: {
119
- readonly code: 426;
120
- readonly text: "Upgrade Required";
139
+ readonly CODE: 426;
140
+ readonly TEXT: "Upgrade Required";
121
141
  };
122
142
  readonly PRECONDITION_REQUIRED: {
123
- readonly code: 428;
124
- readonly text: "Precondition Required";
143
+ readonly CODE: 428;
144
+ readonly TEXT: "Precondition Required";
125
145
  };
126
146
  readonly TOO_MANY_REQUESTS: {
127
- readonly code: 429;
128
- readonly text: "Too Many Requests";
147
+ readonly CODE: 429;
148
+ readonly TEXT: "Too Many Requests";
129
149
  };
130
150
  readonly REQUEST_HEADER_FIELDS_TOO_LARGE: {
131
- readonly code: 431;
132
- readonly text: "Request Header Fields Too Large";
151
+ readonly CODE: 431;
152
+ readonly TEXT: "Request Header Fields Too Large";
133
153
  };
134
154
  readonly UNAVAILABLE_FOR_LEGAL_REASONS: {
135
- readonly code: 451;
136
- readonly text: "Unavailable For Legal Reasons";
155
+ readonly CODE: 451;
156
+ readonly TEXT: "Unavailable For Legal Reasons";
137
157
  };
138
158
  readonly INTERNAL_SERVER_ERROR: {
139
- readonly code: 500;
140
- readonly text: "Internal Server Error";
159
+ readonly CODE: 500;
160
+ readonly TEXT: "Internal Server Error";
141
161
  };
142
162
  readonly NOT_IMPLEMENTED: {
143
- readonly code: 501;
144
- readonly text: "Not Implemented";
163
+ readonly CODE: 501;
164
+ readonly TEXT: "Not Implemented";
145
165
  };
146
166
  readonly BAD_GATEWAY: {
147
- readonly code: 502;
148
- readonly text: "Bad Gateway";
167
+ readonly CODE: 502;
168
+ readonly TEXT: "Bad Gateway";
149
169
  };
150
170
  readonly SERVICE_UNAVAILABLE: {
151
- readonly code: 503;
152
- readonly text: "Service Unavailable";
171
+ readonly CODE: 503;
172
+ readonly TEXT: "Service Unavailable";
153
173
  };
154
174
  readonly GATEWAY_TIMEOUT: {
155
- readonly code: 504;
156
- readonly text: "Gateway Timeout";
175
+ readonly CODE: 504;
176
+ readonly TEXT: "Gateway Timeout";
157
177
  };
158
178
  readonly HTTP_VERSION_NOT_SUPPORTED: {
159
- readonly code: 505;
160
- readonly text: "HTTP Version Not Supported";
179
+ readonly CODE: 505;
180
+ readonly TEXT: "HTTP Version Not Supported";
161
181
  };
162
182
  readonly VARIANT_ALSO_NEGOTIATES: {
163
- readonly code: 506;
164
- readonly text: "Variant Also Negotiates";
183
+ readonly CODE: 506;
184
+ readonly TEXT: "Variant Also Negotiates";
165
185
  };
166
186
  readonly INSUFFICIENT_STORAGE: {
167
- readonly code: 507;
168
- readonly text: "Insufficient Storage";
187
+ readonly CODE: 507;
188
+ readonly TEXT: "Insufficient Storage";
169
189
  };
170
190
  readonly LOOP_DETECTED: {
171
- readonly code: 508;
172
- readonly text: "Loop Detected";
191
+ readonly CODE: 508;
192
+ readonly TEXT: "Loop Detected";
173
193
  };
174
194
  readonly NOT_EXTENDED: {
175
- readonly code: 510;
176
- readonly text: "Not Extended";
195
+ readonly CODE: 510;
196
+ readonly TEXT: "Not Extended";
177
197
  };
178
198
  readonly NETWORK_AUTHENTICATION_REQUIRED: {
179
- readonly code: 511;
180
- readonly text: "Network Authentication Required";
199
+ readonly CODE: 511;
200
+ readonly TEXT: "Network Authentication Required";
181
201
  };
182
202
  readonly CONTINUE: {
183
- readonly code: 100;
184
- readonly text: "Continue";
203
+ readonly CODE: 100;
204
+ readonly TEXT: "Continue";
185
205
  };
186
206
  readonly SWITCHING_PROTOCOLS: {
187
- readonly code: 101;
188
- readonly text: "Switching Protocols";
207
+ readonly CODE: 101;
208
+ readonly TEXT: "Switching Protocols";
189
209
  };
190
210
  readonly EARLY_HINTS: {
191
- readonly code: 103;
192
- readonly text: "Early Hints";
211
+ readonly CODE: 103;
212
+ readonly TEXT: "Early Hints";
193
213
  };
194
214
  readonly MULTIPLE_CHOICES: {
195
- readonly code: 300;
196
- readonly text: "Multiple Choices";
215
+ readonly CODE: 300;
216
+ readonly TEXT: "Multiple Choices";
197
217
  };
198
218
  readonly MOVED_PERMANENTLY: {
199
- readonly code: 301;
200
- readonly text: "Moved Permanently";
219
+ readonly CODE: 301;
220
+ readonly TEXT: "Moved Permanently";
201
221
  };
202
222
  readonly FOUND: {
203
- readonly code: 302;
204
- readonly text: "Found";
223
+ readonly CODE: 302;
224
+ readonly TEXT: "Found";
205
225
  };
206
226
  readonly SEE_OTHER: {
207
- readonly code: 303;
208
- readonly text: "See Other";
227
+ readonly CODE: 303;
228
+ readonly TEXT: "See Other";
209
229
  };
210
230
  readonly NOT_MODIFIED: {
211
- readonly code: 304;
212
- readonly text: "Not Modified";
231
+ readonly CODE: 304;
232
+ readonly TEXT: "Not Modified";
213
233
  };
214
234
  readonly TEMPORARY_REDIRECT: {
215
- readonly code: 307;
216
- readonly text: "Temporary Redirect";
235
+ readonly CODE: 307;
236
+ readonly TEXT: "Temporary Redirect";
217
237
  };
218
238
  readonly PERMANENT_REDIRECT: {
219
- readonly code: 308;
220
- readonly text: "Permanent Redirect";
239
+ readonly CODE: 308;
240
+ readonly TEXT: "Permanent Redirect";
221
241
  };
222
242
  readonly OK: {
223
- readonly code: 200;
224
- readonly text: "OK";
243
+ readonly CODE: 200;
244
+ readonly TEXT: "OK";
225
245
  };
226
246
  readonly CREATED: {
227
- readonly code: 201;
228
- readonly text: "Created";
247
+ readonly CODE: 201;
248
+ readonly TEXT: "Created";
229
249
  };
230
250
  readonly ACCEPTED: {
231
- readonly code: 202;
232
- readonly text: "Accepted";
251
+ readonly CODE: 202;
252
+ readonly TEXT: "Accepted";
233
253
  };
234
254
  readonly NON_AUTHORITATIVE_INFORMATION: {
235
- readonly code: 203;
236
- readonly text: "Non-Authoritative Information";
255
+ readonly CODE: 203;
256
+ readonly TEXT: "Non-Authoritative Information";
237
257
  };
238
258
  readonly NO_CONTENT: {
239
- readonly code: 204;
240
- readonly text: "No Content";
259
+ readonly CODE: 204;
260
+ readonly TEXT: "No Content";
241
261
  };
242
262
  readonly RESET_CONTENT: {
243
- readonly code: 205;
244
- readonly text: "Reset Content";
263
+ readonly CODE: 205;
264
+ readonly TEXT: "Reset Content";
245
265
  };
246
266
  readonly PARTIAL_CONTENT: {
247
- readonly code: 206;
248
- readonly text: "Partial Content";
267
+ readonly CODE: 206;
268
+ readonly TEXT: "Partial Content";
249
269
  };
250
270
  readonly MULTI_STATUS: {
251
- readonly code: 207;
252
- readonly text: "Multi-Status";
271
+ readonly CODE: 207;
272
+ readonly TEXT: "Multi-Status";
253
273
  };
254
274
  readonly ALREADY_REPORTED: {
255
- readonly code: 208;
256
- readonly text: "Already Reported";
275
+ readonly CODE: 208;
276
+ readonly TEXT: "Already Reported";
257
277
  };
258
278
  readonly IM_USED: {
259
- readonly code: 226;
260
- readonly text: "IM Used";
279
+ readonly CODE: 226;
280
+ readonly TEXT: "IM Used";
261
281
  };
262
282
  };
263
- type HttpResponseStatus = ValueOf<typeof HTTP_RESPONSE_STATUS_RECORD>;
264
- export type HttpResponseStatusCode = HttpResponseStatus["code"];
265
- export type HttpResponseStatusText = HttpResponseStatus["text"];
283
+ type HttpResponseStatus = ValueOf<typeof HTTP_RESPONSE_STATUS_ENUM>;
284
+ export type HttpResponseStatusCode = HttpResponseStatus["CODE"];
285
+ export type HttpResponseStatusText = HttpResponseStatus["TEXT"];
266
286
  export declare const HTTP_INFORMATIONAL_RESPONSE_STATUS_ENUM: {
267
287
  readonly CONTINUE: {
268
- readonly code: 100;
269
- readonly text: "Continue";
288
+ readonly CODE: 100;
289
+ readonly TEXT: "Continue";
270
290
  };
271
291
  readonly SWITCHING_PROTOCOLS: {
272
- readonly code: 101;
273
- readonly text: "Switching Protocols";
292
+ readonly CODE: 101;
293
+ readonly TEXT: "Switching Protocols";
274
294
  };
275
295
  readonly EARLY_HINTS: {
276
- readonly code: 103;
277
- readonly text: "Early Hints";
296
+ readonly CODE: 103;
297
+ readonly TEXT: "Early Hints";
278
298
  };
279
299
  };
280
300
  type HttpInformationalResponseStatus = ValueOf<typeof HTTP_INFORMATIONAL_RESPONSE_STATUS_ENUM>;
281
- export type HttpInformationalResponseStatusCode = HttpInformationalResponseStatus["code"];
282
- export type HttpInformationalResponseStatusText = HttpInformationalResponseStatus["text"];
301
+ export type HttpInformationalResponseStatusCode = HttpInformationalResponseStatus["CODE"];
302
+ export type HttpInformationalResponseStatusText = HttpInformationalResponseStatus["TEXT"];
283
303
  export declare const HTTP_SUCCESSFUL_RESPONSE_STATUS_ENUM: {
284
304
  readonly OK: {
285
- readonly code: 200;
286
- readonly text: "OK";
305
+ readonly CODE: 200;
306
+ readonly TEXT: "OK";
287
307
  };
288
308
  readonly CREATED: {
289
- readonly code: 201;
290
- readonly text: "Created";
309
+ readonly CODE: 201;
310
+ readonly TEXT: "Created";
291
311
  };
292
312
  readonly ACCEPTED: {
293
- readonly code: 202;
294
- readonly text: "Accepted";
313
+ readonly CODE: 202;
314
+ readonly TEXT: "Accepted";
295
315
  };
296
316
  readonly NON_AUTHORITATIVE_INFORMATION: {
297
- readonly code: 203;
298
- readonly text: "Non-Authoritative Information";
317
+ readonly CODE: 203;
318
+ readonly TEXT: "Non-Authoritative Information";
299
319
  };
300
320
  readonly NO_CONTENT: {
301
- readonly code: 204;
302
- readonly text: "No Content";
321
+ readonly CODE: 204;
322
+ readonly TEXT: "No Content";
303
323
  };
304
324
  readonly RESET_CONTENT: {
305
- readonly code: 205;
306
- readonly text: "Reset Content";
325
+ readonly CODE: 205;
326
+ readonly TEXT: "Reset Content";
307
327
  };
308
328
  readonly PARTIAL_CONTENT: {
309
- readonly code: 206;
310
- readonly text: "Partial Content";
329
+ readonly CODE: 206;
330
+ readonly TEXT: "Partial Content";
311
331
  };
312
332
  readonly MULTI_STATUS: {
313
- readonly code: 207;
314
- readonly text: "Multi-Status";
333
+ readonly CODE: 207;
334
+ readonly TEXT: "Multi-Status";
315
335
  };
316
336
  readonly ALREADY_REPORTED: {
317
- readonly code: 208;
318
- readonly text: "Already Reported";
337
+ readonly CODE: 208;
338
+ readonly TEXT: "Already Reported";
319
339
  };
320
340
  readonly IM_USED: {
321
- readonly code: 226;
322
- readonly text: "IM Used";
341
+ readonly CODE: 226;
342
+ readonly TEXT: "IM Used";
323
343
  };
324
344
  };
325
345
  type HttpSuccessfulResponseStatus = ValueOf<typeof HTTP_SUCCESSFUL_RESPONSE_STATUS_ENUM>;
326
- export type HttpSuccessfulResponseStatusCode = HttpSuccessfulResponseStatus["code"];
327
- export type HttpSuccessfulResponseStatusText = HttpSuccessfulResponseStatus["text"];
346
+ export type HttpSuccessfulResponseStatusCode = HttpSuccessfulResponseStatus["CODE"];
347
+ export type HttpSuccessfulResponseStatusText = HttpSuccessfulResponseStatus["TEXT"];
328
348
  export declare const HTTP_REDIRECTION_RESPONSE_STATUS_ENUM: {
329
349
  readonly MULTIPLE_CHOICES: {
330
- readonly code: 300;
331
- readonly text: "Multiple Choices";
350
+ readonly CODE: 300;
351
+ readonly TEXT: "Multiple Choices";
332
352
  };
333
353
  readonly MOVED_PERMANENTLY: {
334
- readonly code: 301;
335
- readonly text: "Moved Permanently";
354
+ readonly CODE: 301;
355
+ readonly TEXT: "Moved Permanently";
336
356
  };
337
357
  readonly FOUND: {
338
- readonly code: 302;
339
- readonly text: "Found";
358
+ readonly CODE: 302;
359
+ readonly TEXT: "Found";
340
360
  };
341
361
  readonly SEE_OTHER: {
342
- readonly code: 303;
343
- readonly text: "See Other";
362
+ readonly CODE: 303;
363
+ readonly TEXT: "See Other";
344
364
  };
345
365
  readonly NOT_MODIFIED: {
346
- readonly code: 304;
347
- readonly text: "Not Modified";
366
+ readonly CODE: 304;
367
+ readonly TEXT: "Not Modified";
348
368
  };
349
369
  readonly TEMPORARY_REDIRECT: {
350
- readonly code: 307;
351
- readonly text: "Temporary Redirect";
370
+ readonly CODE: 307;
371
+ readonly TEXT: "Temporary Redirect";
352
372
  };
353
373
  readonly PERMANENT_REDIRECT: {
354
- readonly code: 308;
355
- readonly text: "Permanent Redirect";
374
+ readonly CODE: 308;
375
+ readonly TEXT: "Permanent Redirect";
356
376
  };
357
377
  };
358
378
  type HttpRedirectionResponseStatus = ValueOf<typeof HTTP_REDIRECTION_RESPONSE_STATUS_ENUM>;
359
- export type HttpRedirectionResponseStatusCode = HttpRedirectionResponseStatus["code"];
360
- export type HttpRedirectionResponseStatusText = HttpRedirectionResponseStatus["text"];
379
+ export type HttpRedirectionResponseStatusCode = HttpRedirectionResponseStatus["CODE"];
380
+ export type HttpRedirectionResponseStatusText = HttpRedirectionResponseStatus["TEXT"];
361
381
  export declare const HTTP_ERROR_RESPONSE_STATUS_ENUM: {
362
382
  readonly BAD_REQUEST: {
363
- readonly code: 400;
364
- readonly text: "Bad Request";
383
+ readonly CODE: 400;
384
+ readonly TEXT: "Bad Request";
365
385
  };
366
386
  readonly UNAUTHORIZED: {
367
- readonly code: 401;
368
- readonly text: "Unauthorized";
387
+ readonly CODE: 401;
388
+ readonly TEXT: "Unauthorized";
369
389
  };
370
390
  readonly PAYMENT_REQUIRED: {
371
- readonly code: 402;
372
- readonly text: "Payment Required";
391
+ readonly CODE: 402;
392
+ readonly TEXT: "Payment Required";
373
393
  };
374
394
  readonly FORBIDDEN: {
375
- readonly code: 403;
376
- readonly text: "Forbidden";
395
+ readonly CODE: 403;
396
+ readonly TEXT: "Forbidden";
377
397
  };
378
398
  readonly NOT_FOUND: {
379
- readonly code: 404;
380
- readonly text: "Not Found";
399
+ readonly CODE: 404;
400
+ readonly TEXT: "Not Found";
381
401
  };
382
402
  readonly METHOD_NOT_ALLOWED: {
383
- readonly code: 405;
384
- readonly text: "Method Not Allowed";
403
+ readonly CODE: 405;
404
+ readonly TEXT: "Method Not Allowed";
385
405
  };
386
406
  readonly NOT_ACCEPTABLE: {
387
- readonly code: 406;
388
- readonly text: "Not Acceptable";
407
+ readonly CODE: 406;
408
+ readonly TEXT: "Not Acceptable";
389
409
  };
390
410
  readonly PROXY_AUTHENTICATION_REQUIRED: {
391
- readonly code: 407;
392
- readonly text: "Proxy Authentication Required";
411
+ readonly CODE: 407;
412
+ readonly TEXT: "Proxy Authentication Required";
393
413
  };
394
414
  readonly REQUEST_TIMEOUT: {
395
- readonly code: 408;
396
- readonly text: "Request Timeout";
415
+ readonly CODE: 408;
416
+ readonly TEXT: "Request Timeout";
397
417
  };
398
418
  readonly CONFLICT: {
399
- readonly code: 409;
400
- readonly text: "Conflict";
419
+ readonly CODE: 409;
420
+ readonly TEXT: "Conflict";
401
421
  };
402
422
  readonly GONE: {
403
- readonly code: 410;
404
- readonly text: "Gone";
423
+ readonly CODE: 410;
424
+ readonly TEXT: "Gone";
405
425
  };
406
426
  readonly LENGTH_REQUIRED: {
407
- readonly code: 411;
408
- readonly text: "Length Required";
427
+ readonly CODE: 411;
428
+ readonly TEXT: "Length Required";
409
429
  };
410
430
  readonly PRECONDITION_FAILED: {
411
- readonly code: 412;
412
- readonly text: "Precondition Failed";
431
+ readonly CODE: 412;
432
+ readonly TEXT: "Precondition Failed";
413
433
  };
414
434
  readonly CONTENT_TOO_LARGE: {
415
- readonly code: 413;
416
- readonly text: "Content Too Large";
435
+ readonly CODE: 413;
436
+ readonly TEXT: "Content Too Large";
417
437
  };
418
438
  readonly URI_TOO_LONG: {
419
- readonly code: 414;
420
- readonly text: "URI Too Long";
439
+ readonly CODE: 414;
440
+ readonly TEXT: "URI Too Long";
421
441
  };
422
442
  readonly UNSUPPORTED_MEDIA_TYPE: {
423
- readonly code: 415;
424
- readonly text: "Unsupported Media Type";
443
+ readonly CODE: 415;
444
+ readonly TEXT: "Unsupported Media Type";
425
445
  };
426
446
  readonly RANGE_NOT_SATISFIABLE: {
427
- readonly code: 416;
428
- readonly text: "Range Not Satisfiable";
447
+ readonly CODE: 416;
448
+ readonly TEXT: "Range Not Satisfiable";
429
449
  };
430
450
  readonly EXPECTATION_FAILED: {
431
- readonly code: 417;
432
- readonly text: "Expectation Failed";
451
+ readonly CODE: 417;
452
+ readonly TEXT: "Expectation Failed";
433
453
  };
434
454
  readonly IM_A_TEAPOT: {
435
- readonly code: 418;
436
- readonly text: "I'm a teapot";
455
+ readonly CODE: 418;
456
+ readonly TEXT: "I'm a teapot";
437
457
  };
438
458
  readonly MISDIRECTED_REQUEST: {
439
- readonly code: 421;
440
- readonly text: "Misdirected Request";
459
+ readonly CODE: 421;
460
+ readonly TEXT: "Misdirected Request";
441
461
  };
442
462
  readonly UNPROCESSABLE_CONTENT: {
443
- readonly code: 422;
444
- readonly text: "Unprocessable Content";
463
+ readonly CODE: 422;
464
+ readonly TEXT: "Unprocessable Content";
445
465
  };
446
466
  readonly LOCKED: {
447
- readonly code: 423;
448
- readonly text: "Locked";
467
+ readonly CODE: 423;
468
+ readonly TEXT: "Locked";
449
469
  };
450
470
  readonly FAILED_DEPENDENCY: {
451
- readonly code: 424;
452
- readonly text: "Failed Dependency";
471
+ readonly CODE: 424;
472
+ readonly TEXT: "Failed Dependency";
453
473
  };
454
474
  readonly TOO_EARLY: {
455
- readonly code: 425;
456
- readonly text: "Too Early";
475
+ readonly CODE: 425;
476
+ readonly TEXT: "Too Early";
457
477
  };
458
478
  readonly UPGRADE_REQUIRED: {
459
- readonly code: 426;
460
- readonly text: "Upgrade Required";
479
+ readonly CODE: 426;
480
+ readonly TEXT: "Upgrade Required";
461
481
  };
462
482
  readonly PRECONDITION_REQUIRED: {
463
- readonly code: 428;
464
- readonly text: "Precondition Required";
483
+ readonly CODE: 428;
484
+ readonly TEXT: "Precondition Required";
465
485
  };
466
486
  readonly TOO_MANY_REQUESTS: {
467
- readonly code: 429;
468
- readonly text: "Too Many Requests";
487
+ readonly CODE: 429;
488
+ readonly TEXT: "Too Many Requests";
469
489
  };
470
490
  readonly REQUEST_HEADER_FIELDS_TOO_LARGE: {
471
- readonly code: 431;
472
- readonly text: "Request Header Fields Too Large";
491
+ readonly CODE: 431;
492
+ readonly TEXT: "Request Header Fields Too Large";
473
493
  };
474
494
  readonly UNAVAILABLE_FOR_LEGAL_REASONS: {
475
- readonly code: 451;
476
- readonly text: "Unavailable For Legal Reasons";
495
+ readonly CODE: 451;
496
+ readonly TEXT: "Unavailable For Legal Reasons";
477
497
  };
478
498
  readonly INTERNAL_SERVER_ERROR: {
479
- readonly code: 500;
480
- readonly text: "Internal Server Error";
499
+ readonly CODE: 500;
500
+ readonly TEXT: "Internal Server Error";
481
501
  };
482
502
  readonly NOT_IMPLEMENTED: {
483
- readonly code: 501;
484
- readonly text: "Not Implemented";
503
+ readonly CODE: 501;
504
+ readonly TEXT: "Not Implemented";
485
505
  };
486
506
  readonly BAD_GATEWAY: {
487
- readonly code: 502;
488
- readonly text: "Bad Gateway";
507
+ readonly CODE: 502;
508
+ readonly TEXT: "Bad Gateway";
489
509
  };
490
510
  readonly SERVICE_UNAVAILABLE: {
491
- readonly code: 503;
492
- readonly text: "Service Unavailable";
511
+ readonly CODE: 503;
512
+ readonly TEXT: "Service Unavailable";
493
513
  };
494
514
  readonly GATEWAY_TIMEOUT: {
495
- readonly code: 504;
496
- readonly text: "Gateway Timeout";
515
+ readonly CODE: 504;
516
+ readonly TEXT: "Gateway Timeout";
497
517
  };
498
518
  readonly HTTP_VERSION_NOT_SUPPORTED: {
499
- readonly code: 505;
500
- readonly text: "HTTP Version Not Supported";
519
+ readonly CODE: 505;
520
+ readonly TEXT: "HTTP Version Not Supported";
501
521
  };
502
522
  readonly VARIANT_ALSO_NEGOTIATES: {
503
- readonly code: 506;
504
- readonly text: "Variant Also Negotiates";
523
+ readonly CODE: 506;
524
+ readonly TEXT: "Variant Also Negotiates";
505
525
  };
506
526
  readonly INSUFFICIENT_STORAGE: {
507
- readonly code: 507;
508
- readonly text: "Insufficient Storage";
527
+ readonly CODE: 507;
528
+ readonly TEXT: "Insufficient Storage";
509
529
  };
510
530
  readonly LOOP_DETECTED: {
511
- readonly code: 508;
512
- readonly text: "Loop Detected";
531
+ readonly CODE: 508;
532
+ readonly TEXT: "Loop Detected";
513
533
  };
514
534
  readonly NOT_EXTENDED: {
515
- readonly code: 510;
516
- readonly text: "Not Extended";
535
+ readonly CODE: 510;
536
+ readonly TEXT: "Not Extended";
517
537
  };
518
538
  readonly NETWORK_AUTHENTICATION_REQUIRED: {
519
- readonly code: 511;
520
- readonly text: "Network Authentication Required";
539
+ readonly CODE: 511;
540
+ readonly TEXT: "Network Authentication Required";
521
541
  };
522
542
  };
523
543
  type HttpErrorResponseStatus = ValueOf<typeof HTTP_ERROR_RESPONSE_STATUS_ENUM>;
524
- export type HttpErrorResponseStatusCode = HttpErrorResponseStatus["code"];
525
- export type HttpErrorResponseStatusText = HttpErrorResponseStatus["text"];
544
+ export type HttpErrorResponseStatusCode = HttpErrorResponseStatus["CODE"];
545
+ export type HttpErrorResponseStatusText = HttpErrorResponseStatus["TEXT"];
526
546
  export declare const HTTP_CLIENT_ERROR_RESPONSE_STATUS_ENUM: {
527
547
  readonly BAD_REQUEST: {
528
- readonly code: 400;
529
- readonly text: "Bad Request";
548
+ readonly CODE: 400;
549
+ readonly TEXT: "Bad Request";
530
550
  };
531
551
  readonly UNAUTHORIZED: {
532
- readonly code: 401;
533
- readonly text: "Unauthorized";
552
+ readonly CODE: 401;
553
+ readonly TEXT: "Unauthorized";
534
554
  };
535
555
  readonly PAYMENT_REQUIRED: {
536
- readonly code: 402;
537
- readonly text: "Payment Required";
556
+ readonly CODE: 402;
557
+ readonly TEXT: "Payment Required";
538
558
  };
539
559
  readonly FORBIDDEN: {
540
- readonly code: 403;
541
- readonly text: "Forbidden";
560
+ readonly CODE: 403;
561
+ readonly TEXT: "Forbidden";
542
562
  };
543
563
  readonly NOT_FOUND: {
544
- readonly code: 404;
545
- readonly text: "Not Found";
564
+ readonly CODE: 404;
565
+ readonly TEXT: "Not Found";
546
566
  };
547
567
  readonly METHOD_NOT_ALLOWED: {
548
- readonly code: 405;
549
- readonly text: "Method Not Allowed";
568
+ readonly CODE: 405;
569
+ readonly TEXT: "Method Not Allowed";
550
570
  };
551
571
  readonly NOT_ACCEPTABLE: {
552
- readonly code: 406;
553
- readonly text: "Not Acceptable";
572
+ readonly CODE: 406;
573
+ readonly TEXT: "Not Acceptable";
554
574
  };
555
575
  readonly PROXY_AUTHENTICATION_REQUIRED: {
556
- readonly code: 407;
557
- readonly text: "Proxy Authentication Required";
576
+ readonly CODE: 407;
577
+ readonly TEXT: "Proxy Authentication Required";
558
578
  };
559
579
  readonly REQUEST_TIMEOUT: {
560
- readonly code: 408;
561
- readonly text: "Request Timeout";
580
+ readonly CODE: 408;
581
+ readonly TEXT: "Request Timeout";
562
582
  };
563
583
  readonly CONFLICT: {
564
- readonly code: 409;
565
- readonly text: "Conflict";
584
+ readonly CODE: 409;
585
+ readonly TEXT: "Conflict";
566
586
  };
567
587
  readonly GONE: {
568
- readonly code: 410;
569
- readonly text: "Gone";
588
+ readonly CODE: 410;
589
+ readonly TEXT: "Gone";
570
590
  };
571
591
  readonly LENGTH_REQUIRED: {
572
- readonly code: 411;
573
- readonly text: "Length Required";
592
+ readonly CODE: 411;
593
+ readonly TEXT: "Length Required";
574
594
  };
575
595
  readonly PRECONDITION_FAILED: {
576
- readonly code: 412;
577
- readonly text: "Precondition Failed";
596
+ readonly CODE: 412;
597
+ readonly TEXT: "Precondition Failed";
578
598
  };
579
599
  readonly CONTENT_TOO_LARGE: {
580
- readonly code: 413;
581
- readonly text: "Content Too Large";
600
+ readonly CODE: 413;
601
+ readonly TEXT: "Content Too Large";
582
602
  };
583
603
  readonly URI_TOO_LONG: {
584
- readonly code: 414;
585
- readonly text: "URI Too Long";
604
+ readonly CODE: 414;
605
+ readonly TEXT: "URI Too Long";
586
606
  };
587
607
  readonly UNSUPPORTED_MEDIA_TYPE: {
588
- readonly code: 415;
589
- readonly text: "Unsupported Media Type";
608
+ readonly CODE: 415;
609
+ readonly TEXT: "Unsupported Media Type";
590
610
  };
591
611
  readonly RANGE_NOT_SATISFIABLE: {
592
- readonly code: 416;
593
- readonly text: "Range Not Satisfiable";
612
+ readonly CODE: 416;
613
+ readonly TEXT: "Range Not Satisfiable";
594
614
  };
595
615
  readonly EXPECTATION_FAILED: {
596
- readonly code: 417;
597
- readonly text: "Expectation Failed";
616
+ readonly CODE: 417;
617
+ readonly TEXT: "Expectation Failed";
598
618
  };
599
619
  readonly IM_A_TEAPOT: {
600
- readonly code: 418;
601
- readonly text: "I'm a teapot";
620
+ readonly CODE: 418;
621
+ readonly TEXT: "I'm a teapot";
602
622
  };
603
623
  readonly MISDIRECTED_REQUEST: {
604
- readonly code: 421;
605
- readonly text: "Misdirected Request";
624
+ readonly CODE: 421;
625
+ readonly TEXT: "Misdirected Request";
606
626
  };
607
627
  readonly UNPROCESSABLE_CONTENT: {
608
- readonly code: 422;
609
- readonly text: "Unprocessable Content";
628
+ readonly CODE: 422;
629
+ readonly TEXT: "Unprocessable Content";
610
630
  };
611
631
  readonly LOCKED: {
612
- readonly code: 423;
613
- readonly text: "Locked";
632
+ readonly CODE: 423;
633
+ readonly TEXT: "Locked";
614
634
  };
615
635
  readonly FAILED_DEPENDENCY: {
616
- readonly code: 424;
617
- readonly text: "Failed Dependency";
636
+ readonly CODE: 424;
637
+ readonly TEXT: "Failed Dependency";
618
638
  };
619
639
  readonly TOO_EARLY: {
620
- readonly code: 425;
621
- readonly text: "Too Early";
640
+ readonly CODE: 425;
641
+ readonly TEXT: "Too Early";
622
642
  };
623
643
  readonly UPGRADE_REQUIRED: {
624
- readonly code: 426;
625
- readonly text: "Upgrade Required";
644
+ readonly CODE: 426;
645
+ readonly TEXT: "Upgrade Required";
626
646
  };
627
647
  readonly PRECONDITION_REQUIRED: {
628
- readonly code: 428;
629
- readonly text: "Precondition Required";
648
+ readonly CODE: 428;
649
+ readonly TEXT: "Precondition Required";
630
650
  };
631
651
  readonly TOO_MANY_REQUESTS: {
632
- readonly code: 429;
633
- readonly text: "Too Many Requests";
652
+ readonly CODE: 429;
653
+ readonly TEXT: "Too Many Requests";
634
654
  };
635
655
  readonly REQUEST_HEADER_FIELDS_TOO_LARGE: {
636
- readonly code: 431;
637
- readonly text: "Request Header Fields Too Large";
656
+ readonly CODE: 431;
657
+ readonly TEXT: "Request Header Fields Too Large";
638
658
  };
639
659
  readonly UNAVAILABLE_FOR_LEGAL_REASONS: {
640
- readonly code: 451;
641
- readonly text: "Unavailable For Legal Reasons";
660
+ readonly CODE: 451;
661
+ readonly TEXT: "Unavailable For Legal Reasons";
642
662
  };
643
663
  };
644
664
  type HttpClientErrorResponseStatus = ValueOf<typeof HTTP_CLIENT_ERROR_RESPONSE_STATUS_ENUM>;
645
- export type HttpClientErrorResponseStatusCode = HttpClientErrorResponseStatus["code"];
646
- export type HttpClientErrorResponseStatusText = HttpClientErrorResponseStatus["text"];
665
+ export type HttpClientErrorResponseStatusCode = HttpClientErrorResponseStatus["CODE"];
666
+ export type HttpClientErrorResponseStatusText = HttpClientErrorResponseStatus["TEXT"];
647
667
  export declare const HTTP_SERVER_ERROR_RESPONSE_STATUS_ENUM: {
648
668
  readonly INTERNAL_SERVER_ERROR: {
649
- readonly code: 500;
650
- readonly text: "Internal Server Error";
669
+ readonly CODE: 500;
670
+ readonly TEXT: "Internal Server Error";
651
671
  };
652
672
  readonly NOT_IMPLEMENTED: {
653
- readonly code: 501;
654
- readonly text: "Not Implemented";
673
+ readonly CODE: 501;
674
+ readonly TEXT: "Not Implemented";
655
675
  };
656
676
  readonly BAD_GATEWAY: {
657
- readonly code: 502;
658
- readonly text: "Bad Gateway";
677
+ readonly CODE: 502;
678
+ readonly TEXT: "Bad Gateway";
659
679
  };
660
680
  readonly SERVICE_UNAVAILABLE: {
661
- readonly code: 503;
662
- readonly text: "Service Unavailable";
681
+ readonly CODE: 503;
682
+ readonly TEXT: "Service Unavailable";
663
683
  };
664
684
  readonly GATEWAY_TIMEOUT: {
665
- readonly code: 504;
666
- readonly text: "Gateway Timeout";
685
+ readonly CODE: 504;
686
+ readonly TEXT: "Gateway Timeout";
667
687
  };
668
688
  readonly HTTP_VERSION_NOT_SUPPORTED: {
669
- readonly code: 505;
670
- readonly text: "HTTP Version Not Supported";
689
+ readonly CODE: 505;
690
+ readonly TEXT: "HTTP Version Not Supported";
671
691
  };
672
692
  readonly VARIANT_ALSO_NEGOTIATES: {
673
- readonly code: 506;
674
- readonly text: "Variant Also Negotiates";
693
+ readonly CODE: 506;
694
+ readonly TEXT: "Variant Also Negotiates";
675
695
  };
676
696
  readonly INSUFFICIENT_STORAGE: {
677
- readonly code: 507;
678
- readonly text: "Insufficient Storage";
697
+ readonly CODE: 507;
698
+ readonly TEXT: "Insufficient Storage";
679
699
  };
680
700
  readonly LOOP_DETECTED: {
681
- readonly code: 508;
682
- readonly text: "Loop Detected";
701
+ readonly CODE: 508;
702
+ readonly TEXT: "Loop Detected";
683
703
  };
684
704
  readonly NOT_EXTENDED: {
685
- readonly code: 510;
686
- readonly text: "Not Extended";
705
+ readonly CODE: 510;
706
+ readonly TEXT: "Not Extended";
687
707
  };
688
708
  readonly NETWORK_AUTHENTICATION_REQUIRED: {
689
- readonly code: 511;
690
- readonly text: "Network Authentication Required";
709
+ readonly CODE: 511;
710
+ readonly TEXT: "Network Authentication Required";
691
711
  };
692
712
  };
693
713
  type HttpServerErrorResponseStatus = ValueOf<typeof HTTP_SERVER_ERROR_RESPONSE_STATUS_ENUM>;
694
- export type HttpServerErrorResponseStatusCode = HttpServerErrorResponseStatus["code"];
695
- export type HttpServerErrorResponseStatusText = HttpServerErrorResponseStatus["text"];
714
+ export type HttpServerErrorResponseStatusCode = HttpServerErrorResponseStatus["CODE"];
715
+ export type HttpServerErrorResponseStatusText = HttpServerErrorResponseStatus["TEXT"];
696
716
  export {};