@augment-vir/core 31.70.0 → 31.71.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.
@@ -6,14 +6,23 @@
6
6
  * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
7
7
  * @see https://developer.mozilla.org/docs/Web/HTTP/Methods
8
8
  */
9
- export declare enum HttpMethod {
10
- Get = "GET",
11
- Head = "HEAD",
12
- Options = "OPTIONS",
13
- Trace = "TRACE",
14
- Put = "PUT",
15
- Delete = "DELETE",
16
- Post = "POST",
17
- Patch = "PATCH",
18
- Connect = "CONNECT"
19
- }
9
+ export declare const HttpMethod: {
10
+ readonly Get: "GET";
11
+ readonly Head: "HEAD";
12
+ readonly Options: "OPTIONS";
13
+ readonly Trace: "TRACE";
14
+ readonly Put: "PUT";
15
+ readonly Delete: "DELETE";
16
+ readonly Post: "POST";
17
+ readonly Patch: "PATCH";
18
+ readonly Connect: "CONNECT";
19
+ };
20
+ /**
21
+ * All standardized HTTP methods.
22
+ *
23
+ * @category HTTP
24
+ * @category Package : @augment-vir/common
25
+ * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
26
+ * @see https://developer.mozilla.org/docs/Web/HTTP/Methods
27
+ */
28
+ export type HttpMethod = (typeof HttpMethod)[keyof typeof HttpMethod];
@@ -6,15 +6,14 @@
6
6
  * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
7
7
  * @see https://developer.mozilla.org/docs/Web/HTTP/Methods
8
8
  */
9
- export var HttpMethod;
10
- (function (HttpMethod) {
11
- HttpMethod["Get"] = "GET";
12
- HttpMethod["Head"] = "HEAD";
13
- HttpMethod["Options"] = "OPTIONS";
14
- HttpMethod["Trace"] = "TRACE";
15
- HttpMethod["Put"] = "PUT";
16
- HttpMethod["Delete"] = "DELETE";
17
- HttpMethod["Post"] = "POST";
18
- HttpMethod["Patch"] = "PATCH";
19
- HttpMethod["Connect"] = "CONNECT";
20
- })(HttpMethod || (HttpMethod = {}));
9
+ export const HttpMethod = {
10
+ Get: 'GET',
11
+ Head: 'HEAD',
12
+ Options: 'OPTIONS',
13
+ Trace: 'TRACE',
14
+ Put: 'PUT',
15
+ Delete: 'DELETE',
16
+ Post: 'POST',
17
+ Patch: 'PATCH',
18
+ Connect: 'CONNECT',
19
+ };
@@ -10,7 +10,7 @@ import { type ExtractKeysWithMatchingValues } from '../object/object-keys.js';
10
10
  * @category Package : @augment-vir/common
11
11
  * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
12
12
  */
13
- export declare enum HttpStatus {
13
+ export declare const HttpStatus: {
14
14
  /** 100 level codes (information) */
15
15
  /**
16
16
  * This interim response indicates that the client should continue the request or ignore the
@@ -18,21 +18,21 @@ export declare enum HttpStatus {
18
18
  *
19
19
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/100
20
20
  */
21
- Continue = 100,
21
+ readonly Continue: 100;
22
22
  /**
23
23
  * This code is sent in response to an Upgrade request header from the client and indicates the
24
24
  * protocol the server is switching to.
25
25
  *
26
26
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/101
27
27
  */
28
- SwitchingProtocols = 101,
28
+ readonly SwitchingProtocols: 101;
29
29
  /**
30
30
  * This code indicates that the server has received and is processing the request, but no
31
31
  * response is available yet.
32
32
  *
33
33
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/102
34
34
  */
35
- Processing = 102,
35
+ readonly Processing: 102;
36
36
  /**
37
37
  * This status code is primarily intended to be used with the Link header, letting the user
38
38
  * agent start preloading resources while the server prepares a response or preconnect to an
@@ -40,7 +40,7 @@ export declare enum HttpStatus {
40
40
  *
41
41
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/103
42
42
  */
43
- EarlyHints = 103,
43
+ readonly EarlyHints: 103;
44
44
  /** 200 level codes (success) */
45
45
  /**
46
46
  * The request succeeded. The result meaning of "success" depends on the HTTP method:
@@ -53,14 +53,14 @@ export declare enum HttpStatus {
53
53
  *
54
54
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/200
55
55
  */
56
- Ok = 200,
56
+ readonly Ok: 200;
57
57
  /**
58
58
  * The request succeeded, and a new resource was created as a result. This is typically the
59
59
  * response sent after POST requests, or some PUT requests.
60
60
  *
61
61
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/201
62
62
  */
63
- Created = 201,
63
+ readonly Created: 201;
64
64
  /**
65
65
  * The request has been received but not yet acted upon. It is noncommittal, since there is no
66
66
  * way in HTTP to later send an asynchronous response indicating the outcome of the request. It
@@ -69,7 +69,7 @@ export declare enum HttpStatus {
69
69
  *
70
70
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/202
71
71
  */
72
- Accepted = 202,
72
+ readonly Accepted: 202;
73
73
  /**
74
74
  * This response code means the returned metadata is not exactly the same as is available from
75
75
  * the origin server, but is collected from a local or a third-party copy. This is mostly used
@@ -78,48 +78,48 @@ export declare enum HttpStatus {
78
78
  *
79
79
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/203
80
80
  */
81
- NonAuthoritativeInformation = 203,
81
+ readonly NonAuthoritativeInformation: 203;
82
82
  /**
83
83
  * There is no content to send for this request, but the headers may be useful. The user agent
84
84
  * may update its cached headers for this resource with the new ones.
85
85
  *
86
86
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/204
87
87
  */
88
- NoContent = 204,
88
+ readonly NoContent: 204;
89
89
  /**
90
90
  * Tells the user agent to reset the document which sent this request.
91
91
  *
92
92
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/205
93
93
  */
94
- ResetContent = 205,
94
+ readonly ResetContent: 205;
95
95
  /**
96
96
  * This response code is used when the Range header is sent from the client to request only part
97
97
  * of a resource.
98
98
  *
99
99
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/206
100
100
  */
101
- PartialContent = 206,
101
+ readonly PartialContent: 206;
102
102
  /**
103
103
  * Conveys information about multiple resources, for situations where multiple status codes
104
104
  * might be appropriate.
105
105
  *
106
106
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/207
107
107
  */
108
- MultiStatus = 207,
108
+ readonly MultiStatus: 207;
109
109
  /**
110
110
  * Used inside a [dav:propstat](dav:propstat) response element to avoid repeatedly enumerating
111
111
  * the internal members of multiple bindings to the same collection.
112
112
  *
113
113
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/208
114
114
  */
115
- AlreadyReported = 208,
115
+ readonly AlreadyReported: 208;
116
116
  /**
117
117
  * The server has fulfilled a GET request for the resource, and the response is a representation
118
118
  * of the result of one or more instance-manipulations applied to the current instance.
119
119
  *
120
120
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/226
121
121
  */
122
- ImUsed = 226,
122
+ readonly ImUsed: 226;
123
123
  /** 300 level codes (redirect) */
124
124
  /**
125
125
  * The request has more than one possible response. The user agent or user should choose one of
@@ -128,14 +128,14 @@ export declare enum HttpStatus {
128
128
  *
129
129
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/300
130
130
  */
131
- MultipleChoices = 300,
131
+ readonly MultipleChoices: 300;
132
132
  /**
133
133
  * The URL of the requested resource has been changed permanently. The new URL is given in the
134
134
  * response.
135
135
  *
136
136
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/301
137
137
  */
138
- MovedPermanently = 301,
138
+ readonly MovedPermanently: 301;
139
139
  /**
140
140
  * This response code means that the URI of requested resource has been changed temporarily.
141
141
  * Further changes in the URI might be made in the future. Therefore, this same URI should be
@@ -143,21 +143,21 @@ export declare enum HttpStatus {
143
143
  *
144
144
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/302
145
145
  */
146
- Found = 302,
146
+ readonly Found: 302;
147
147
  /**
148
148
  * The server sent this response to direct the client to get the requested resource at another
149
149
  * URI with a GET request.
150
150
  *
151
151
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/303
152
152
  */
153
- SeeOther = 303,
153
+ readonly SeeOther: 303;
154
154
  /**
155
155
  * This is used for caching purposes. It tells the client that the response has not been
156
156
  * modified, so the client can continue to use the same cached version of the response.
157
157
  *
158
158
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/304
159
159
  */
160
- NotModified = 304,
160
+ readonly NotModified: 304;
161
161
  /**
162
162
  * Defined in a previous version of the HTTP specification to indicate that a requested response
163
163
  * must be accessed by a proxy. It has been deprecated due to security concerns regarding
@@ -165,14 +165,14 @@ export declare enum HttpStatus {
165
165
  *
166
166
  * See https://developer.mozilla.org/about:blank#305_use_proxy
167
167
  */
168
- UseProxy = 305,
168
+ readonly UseProxy: 305;
169
169
  /**
170
170
  * This response code is no longer used; it is just reserved. It was used in a previous version
171
171
  * of the HTTP/1.1 specification.
172
172
  *
173
173
  * See https://developer.mozilla.org/about:blank#306_unused
174
174
  */
175
- Unused = 306,
175
+ readonly Unused: 306;
176
176
  /**
177
177
  * The server sends this response to direct the client to get the requested resource at another
178
178
  * URI with the same method that was used in the prior request. This has the same semantics as
@@ -182,7 +182,7 @@ export declare enum HttpStatus {
182
182
  *
183
183
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/307
184
184
  */
185
- TemporaryRedirect = 307,
185
+ readonly TemporaryRedirect: 307;
186
186
  /**
187
187
  * This means that the resource is now permanently located at another URI, specified by the
188
188
  * Location: HTTP Response header. This has the same semantics as the 301 Moved Permanently HTTP
@@ -191,7 +191,7 @@ export declare enum HttpStatus {
191
191
  *
192
192
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/308
193
193
  */
194
- PermanentRedirect = 308,
194
+ readonly PermanentRedirect: 308;
195
195
  /** 400 level codes (clientError) */
196
196
  /**
197
197
  * The server cannot or will not process the request due to something that is perceived to be a
@@ -200,7 +200,7 @@ export declare enum HttpStatus {
200
200
  *
201
201
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/400
202
202
  */
203
- BadRequest = 400,
203
+ readonly BadRequest: 400;
204
204
  /**
205
205
  * Although the HTTP standard specifies "unauthorized", semantically this response means
206
206
  * "unauthenticated". That is, the client must authenticate itself to get the requested
@@ -208,7 +208,7 @@ export declare enum HttpStatus {
208
208
  *
209
209
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/401
210
210
  */
211
- Unauthorized = 401,
211
+ readonly Unauthorized: 401;
212
212
  /**
213
213
  * This response code is reserved for future use. The initial aim for creating this code was
214
214
  * using it for digital payment systems, however this status code is used very rarely and no
@@ -216,7 +216,7 @@ export declare enum HttpStatus {
216
216
  *
217
217
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/402
218
218
  */
219
- PaymentRequired = 402,
219
+ readonly PaymentRequired: 402;
220
220
  /**
221
221
  * The client does not have access rights to the content; that is, it is unauthorized, so the
222
222
  * server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's
@@ -224,7 +224,7 @@ export declare enum HttpStatus {
224
224
  *
225
225
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/403
226
226
  */
227
- Forbidden = 403,
227
+ readonly Forbidden: 403;
228
228
  /**
229
229
  * The server cannot find the requested resource. In the browser, this means the URL is not
230
230
  * recognized. In an API, this can also mean that the endpoint is valid but the resource itself
@@ -234,27 +234,27 @@ export declare enum HttpStatus {
234
234
  *
235
235
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/404
236
236
  */
237
- NotFound = 404,
237
+ readonly NotFound: 404;
238
238
  /**
239
239
  * The request method is known by the server but is not supported by the target resource. For
240
240
  * example, an API may not allow calling DELETE to remove a resource.
241
241
  *
242
242
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/405
243
243
  */
244
- MethodNotAllowed = 405,
244
+ readonly MethodNotAllowed: 405;
245
245
  /**
246
246
  * This response is sent when the web server, after performing server-driven content
247
247
  * negotiation, doesn't find any content that conforms to the criteria given by the user agent.
248
248
  *
249
249
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/406
250
250
  */
251
- NotAcceptable = 406,
251
+ readonly NotAcceptable: 406;
252
252
  /**
253
253
  * This is similar to 401 Unauthorized but authentication is needed to be done by a proxy.
254
254
  *
255
255
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/407
256
256
  */
257
- ProxyAuthenticationRequired = 407,
257
+ readonly ProxyAuthenticationRequired: 407;
258
258
  /**
259
259
  * This response is sent on an idle connection by some servers, even without any previous
260
260
  * request by the client. It means that the server would like to shut down this unused
@@ -264,13 +264,13 @@ export declare enum HttpStatus {
264
264
  *
265
265
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/408
266
266
  */
267
- RequestTimeout = 408,
267
+ readonly RequestTimeout: 408;
268
268
  /**
269
269
  * This response is sent when a request conflicts with the current state of the server.
270
270
  *
271
271
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/409
272
272
  */
273
- Conflict = 409,
273
+ readonly Conflict: 409;
274
274
  /**
275
275
  * This response is sent when the requested content has been permanently deleted from server,
276
276
  * with no forwarding address. Clients are expected to remove their caches and links to the
@@ -280,60 +280,60 @@ export declare enum HttpStatus {
280
280
  *
281
281
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/410
282
282
  */
283
- Gone = 410,
283
+ readonly Gone: 410;
284
284
  /**
285
285
  * Server rejected the request because the Content-Length header field is not defined and the
286
286
  * server requires it.
287
287
  *
288
288
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/411
289
289
  */
290
- LengthRequired = 411,
290
+ readonly LengthRequired: 411;
291
291
  /**
292
292
  * The client has indicated preconditions in its headers which the server does not meet.
293
293
  *
294
294
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/412
295
295
  */
296
- PreconditionFailed = 412,
296
+ readonly PreconditionFailed: 412;
297
297
  /**
298
298
  * Request entity is larger than limits defined by server. The server might close the connection
299
299
  * or return an Retry-After header field.
300
300
  *
301
301
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/413
302
302
  */
303
- PayloadTooLarge = 413,
303
+ readonly PayloadTooLarge: 413;
304
304
  /**
305
305
  * The URI requested by the client is longer than the server is willing to interpret.
306
306
  *
307
307
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/414
308
308
  */
309
- UriTooLong = 414,
309
+ readonly UriTooLong: 414;
310
310
  /**
311
311
  * The media format of the requested data is not supported by the server, so the server is
312
312
  * rejecting the request.
313
313
  *
314
314
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/415
315
315
  */
316
- UnsupportedMediaType = 415,
316
+ readonly UnsupportedMediaType: 415;
317
317
  /**
318
318
  * The range specified by the Range header field in the request cannot be fulfilled. It's
319
319
  * possible that the range is outside the size of the target URI's data.
320
320
  *
321
321
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/416
322
322
  */
323
- RangeNotSatisfiable = 416,
323
+ readonly RangeNotSatisfiable: 416;
324
324
  /**
325
325
  * This response code means the expectation indicated by the Expect request header field cannot
326
326
  * be met by the server.
327
327
  *
328
328
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/417
329
329
  */
330
- ExpectationFailed = 417,
330
+ readonly ExpectationFailed: 417;
331
331
  /**
332
332
  * The server refuses the attempt to brew coffee with a teapot.
333
333
  *
334
334
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/418
335
335
  */
336
- ImATeapot = 418,
336
+ readonly ImATeapot: 418;
337
337
  /**
338
338
  * The request was directed at a server that is not able to produce a response. This can be sent
339
339
  * by a server that is not configured to produce responses for the combination of scheme and
@@ -341,31 +341,31 @@ export declare enum HttpStatus {
341
341
  *
342
342
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/421
343
343
  */
344
- MisdirectedRequest = 421,
344
+ readonly MisdirectedRequest: 421;
345
345
  /**
346
346
  * The request was well-formed but was unable to be followed due to semantic errors.
347
347
  *
348
348
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/422
349
349
  */
350
- UnprocessableContent = 422,
350
+ readonly UnprocessableContent: 422;
351
351
  /**
352
352
  * The resource that is being accessed is locked.
353
353
  *
354
354
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/423
355
355
  */
356
- Locked = 423,
356
+ readonly Locked: 423;
357
357
  /**
358
358
  * The request failed due to failure of a previous request.
359
359
  *
360
360
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/424
361
361
  */
362
- FailedDependency = 424,
362
+ readonly FailedDependency: 424;
363
363
  /**
364
364
  * Indicates that the server is unwilling to risk processing a request that might be replayed.
365
365
  *
366
366
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/425
367
367
  */
368
- TooEarly = 425,
368
+ readonly TooEarly: 425;
369
369
  /**
370
370
  * The server refuses to perform the request using the current protocol but might be willing to
371
371
  * do so after the client upgrades to a different protocol. The server sends an Upgrade header
@@ -373,7 +373,7 @@ export declare enum HttpStatus {
373
373
  *
374
374
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/426
375
375
  */
376
- UpgradeRequired = 426,
376
+ readonly UpgradeRequired: 426;
377
377
  /**
378
378
  * The origin server requires the request to be conditional. This response is intended to
379
379
  * prevent the 'lost update' problem, where a client GETs a resource's state, modifies it and
@@ -382,34 +382,34 @@ export declare enum HttpStatus {
382
382
  *
383
383
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/428
384
384
  */
385
- PreconditionRequired = 428,
385
+ readonly PreconditionRequired: 428;
386
386
  /**
387
387
  * The user has sent too many requests in a given amount of time ("rate limiting").
388
388
  *
389
389
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/429
390
390
  */
391
- TooManyRequests = 429,
391
+ readonly TooManyRequests: 429;
392
392
  /**
393
393
  * The server is unwilling to process the request because its header fields are too large. The
394
394
  * request may be resubmitted after reducing the size of the request header fields.
395
395
  *
396
396
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/431
397
397
  */
398
- RequestHeaderFieldsTooLarge = 431,
398
+ readonly RequestHeaderFieldsTooLarge: 431;
399
399
  /**
400
400
  * The user agent requested a resource that cannot legally be provided, such as a web page
401
401
  * censored by a government.
402
402
  *
403
403
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/451
404
404
  */
405
- UnavailableForLegalReasons = 451,
405
+ readonly UnavailableForLegalReasons: 451;
406
406
  /** 500 level codes (serverError) */
407
407
  /**
408
408
  * The server has encountered a situation it does not know how to handle.
409
409
  *
410
410
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/500
411
411
  */
412
- InternalServerError = 500,
412
+ readonly InternalServerError: 500;
413
413
  /**
414
414
  * The request method is not supported by the server and cannot be handled. The only methods
415
415
  * that servers are required to support (and therefore that must not return this code) are GET
@@ -417,14 +417,14 @@ export declare enum HttpStatus {
417
417
  *
418
418
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/501
419
419
  */
420
- NotImplemented = 501,
420
+ readonly NotImplemented: 501;
421
421
  /**
422
422
  * This error response means that the server, while working as a gateway to get a response
423
423
  * needed to handle the request, got an invalid response.
424
424
  *
425
425
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/502
426
426
  */
427
- BadGateway = 502,
427
+ readonly BadGateway: 502;
428
428
  /**
429
429
  * The server is not ready to handle the request. Common causes are a server that is down for
430
430
  * maintenance or that is overloaded. Note that together with this response, a user-friendly
@@ -436,20 +436,20 @@ export declare enum HttpStatus {
436
436
  *
437
437
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/503
438
438
  */
439
- ServiceUnavailable = 503,
439
+ readonly ServiceUnavailable: 503;
440
440
  /**
441
441
  * This error response is given when the server is acting as a gateway and cannot get a response
442
442
  * in time.
443
443
  *
444
444
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/504
445
445
  */
446
- GatewayTimeout = 504,
446
+ readonly GatewayTimeout: 504;
447
447
  /**
448
448
  * The HTTP version used in the request is not supported by the server.
449
449
  *
450
450
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/505
451
451
  */
452
- HttpVersionNotSupported = 505,
452
+ readonly HttpVersionNotSupported: 505;
453
453
  /**
454
454
  * The server has an internal configuration error: the chosen variant resource is configured to
455
455
  * engage in transparent content negotiation itself, and is therefore not a proper end point in
@@ -457,33 +457,44 @@ export declare enum HttpStatus {
457
457
  *
458
458
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/506
459
459
  */
460
- VariantAlsoNegotiates = 506,
460
+ readonly VariantAlsoNegotiates: 506;
461
461
  /**
462
462
  * The method could not be performed on the resource because the server is unable to store the
463
463
  * representation needed to successfully complete the request.
464
464
  *
465
465
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/507
466
466
  */
467
- InsufficientStorage = 507,
467
+ readonly InsufficientStorage: 507;
468
468
  /**
469
469
  * The server detected an infinite loop while processing the request.
470
470
  *
471
471
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/508
472
472
  */
473
- LoopDetected = 508,
473
+ readonly LoopDetected: 508;
474
474
  /**
475
475
  * Further extensions to the request are required for the server to fulfill it.
476
476
  *
477
477
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/510
478
478
  */
479
- NotExtended = 510,
479
+ readonly NotExtended: 510;
480
480
  /**
481
481
  * Indicates that the client needs to authenticate to gain network access.
482
482
  *
483
483
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/511
484
484
  */
485
- NetworkAuthenticationRequired = 511
486
- }
485
+ readonly NetworkAuthenticationRequired: 511;
486
+ };
487
+ /**
488
+ * All standardized HTTP status codes.
489
+ *
490
+ * These values are automatically parsed from https://developer.mozilla.org/docs/Web/HTTP/Status via
491
+ * https://github.com/electrovir/augment-vir/blob/dev/packages/scripts/src/scripts/generate-http-status.script.ts
492
+ *
493
+ * @category HTTP
494
+ * @category Package : @augment-vir/common
495
+ * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
496
+ */
497
+ export type HttpStatus = (typeof HttpStatus)[keyof typeof HttpStatus];
487
498
  /**
488
499
  * All standardized HTTP status code categories. These are determined by the first number in the
489
500
  * HTTP status code.
@@ -637,11 +648,11 @@ export declare const httpStatusToCategory: {
637
648
  * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
638
649
  */
639
650
  export declare const httpStatusByCategory: {
640
- readonly information: [HttpStatus.Continue, HttpStatus.SwitchingProtocols, HttpStatus.Processing, HttpStatus.EarlyHints];
641
- readonly success: [HttpStatus.Ok, HttpStatus.Created, HttpStatus.Accepted, HttpStatus.NonAuthoritativeInformation, HttpStatus.NoContent, HttpStatus.ResetContent, HttpStatus.PartialContent, HttpStatus.MultiStatus, HttpStatus.AlreadyReported, HttpStatus.ImUsed];
642
- readonly redirect: [HttpStatus.MultipleChoices, HttpStatus.MovedPermanently, HttpStatus.Found, HttpStatus.SeeOther, HttpStatus.NotModified, HttpStatus.UseProxy, HttpStatus.Unused, HttpStatus.TemporaryRedirect, HttpStatus.PermanentRedirect];
643
- readonly clientError: [HttpStatus.BadRequest, HttpStatus.Unauthorized, HttpStatus.PaymentRequired, HttpStatus.Forbidden, HttpStatus.NotFound, HttpStatus.MethodNotAllowed, HttpStatus.NotAcceptable, HttpStatus.ProxyAuthenticationRequired, HttpStatus.RequestTimeout, HttpStatus.Conflict, HttpStatus.Gone, HttpStatus.LengthRequired, HttpStatus.PreconditionFailed, HttpStatus.PayloadTooLarge, HttpStatus.UriTooLong, HttpStatus.UnsupportedMediaType, HttpStatus.RangeNotSatisfiable, HttpStatus.ExpectationFailed, HttpStatus.ImATeapot, HttpStatus.MisdirectedRequest, HttpStatus.UnprocessableContent, HttpStatus.Locked, HttpStatus.FailedDependency, HttpStatus.TooEarly, HttpStatus.UpgradeRequired, HttpStatus.PreconditionRequired, HttpStatus.TooManyRequests, HttpStatus.RequestHeaderFieldsTooLarge, HttpStatus.UnavailableForLegalReasons];
644
- readonly serverError: [HttpStatus.InternalServerError, HttpStatus.NotImplemented, HttpStatus.BadGateway, HttpStatus.ServiceUnavailable, HttpStatus.GatewayTimeout, HttpStatus.HttpVersionNotSupported, HttpStatus.VariantAlsoNegotiates, HttpStatus.InsufficientStorage, HttpStatus.LoopDetected, HttpStatus.NotExtended, HttpStatus.NetworkAuthenticationRequired];
651
+ readonly information: [100, 101, 102, 103];
652
+ readonly success: [200, 201, 202, 203, 204, 205, 206, 207, 208, 226];
653
+ readonly redirect: [300, 301, 302, 303, 304, 305, 306, 307, 308];
654
+ readonly clientError: [400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 421, 422, 423, 424, 425, 426, 428, 429, 431, 451];
655
+ readonly serverError: [500, 501, 502, 503, 504, 505, 506, 507, 508, 510, 511];
645
656
  };
646
657
  /**
647
658
  * All possible HTTP status codes for the given {@link HttpStatusCategory}.
@@ -8,8 +8,7 @@
8
8
  * @category Package : @augment-vir/common
9
9
  * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
10
10
  */
11
- export var HttpStatus;
12
- (function (HttpStatus) {
11
+ export const HttpStatus = {
13
12
  /** 100 level codes (information) */
14
13
  /**
15
14
  * This interim response indicates that the client should continue the request or ignore the
@@ -17,21 +16,21 @@ export var HttpStatus;
17
16
  *
18
17
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/100
19
18
  */
20
- HttpStatus[HttpStatus["Continue"] = 100] = "Continue";
19
+ Continue: 100,
21
20
  /**
22
21
  * This code is sent in response to an Upgrade request header from the client and indicates the
23
22
  * protocol the server is switching to.
24
23
  *
25
24
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/101
26
25
  */
27
- HttpStatus[HttpStatus["SwitchingProtocols"] = 101] = "SwitchingProtocols";
26
+ SwitchingProtocols: 101,
28
27
  /**
29
28
  * This code indicates that the server has received and is processing the request, but no
30
29
  * response is available yet.
31
30
  *
32
31
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/102
33
32
  */
34
- HttpStatus[HttpStatus["Processing"] = 102] = "Processing";
33
+ Processing: 102,
35
34
  /**
36
35
  * This status code is primarily intended to be used with the Link header, letting the user
37
36
  * agent start preloading resources while the server prepares a response or preconnect to an
@@ -39,7 +38,7 @@ export var HttpStatus;
39
38
  *
40
39
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/103
41
40
  */
42
- HttpStatus[HttpStatus["EarlyHints"] = 103] = "EarlyHints";
41
+ EarlyHints: 103,
43
42
  /** 200 level codes (success) */
44
43
  /**
45
44
  * The request succeeded. The result meaning of "success" depends on the HTTP method:
@@ -52,14 +51,14 @@ export var HttpStatus;
52
51
  *
53
52
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/200
54
53
  */
55
- HttpStatus[HttpStatus["Ok"] = 200] = "Ok";
54
+ Ok: 200,
56
55
  /**
57
56
  * The request succeeded, and a new resource was created as a result. This is typically the
58
57
  * response sent after POST requests, or some PUT requests.
59
58
  *
60
59
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/201
61
60
  */
62
- HttpStatus[HttpStatus["Created"] = 201] = "Created";
61
+ Created: 201,
63
62
  /**
64
63
  * The request has been received but not yet acted upon. It is noncommittal, since there is no
65
64
  * way in HTTP to later send an asynchronous response indicating the outcome of the request. It
@@ -68,7 +67,7 @@ export var HttpStatus;
68
67
  *
69
68
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/202
70
69
  */
71
- HttpStatus[HttpStatus["Accepted"] = 202] = "Accepted";
70
+ Accepted: 202,
72
71
  /**
73
72
  * This response code means the returned metadata is not exactly the same as is available from
74
73
  * the origin server, but is collected from a local or a third-party copy. This is mostly used
@@ -77,48 +76,48 @@ export var HttpStatus;
77
76
  *
78
77
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/203
79
78
  */
80
- HttpStatus[HttpStatus["NonAuthoritativeInformation"] = 203] = "NonAuthoritativeInformation";
79
+ NonAuthoritativeInformation: 203,
81
80
  /**
82
81
  * There is no content to send for this request, but the headers may be useful. The user agent
83
82
  * may update its cached headers for this resource with the new ones.
84
83
  *
85
84
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/204
86
85
  */
87
- HttpStatus[HttpStatus["NoContent"] = 204] = "NoContent";
86
+ NoContent: 204,
88
87
  /**
89
88
  * Tells the user agent to reset the document which sent this request.
90
89
  *
91
90
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/205
92
91
  */
93
- HttpStatus[HttpStatus["ResetContent"] = 205] = "ResetContent";
92
+ ResetContent: 205,
94
93
  /**
95
94
  * This response code is used when the Range header is sent from the client to request only part
96
95
  * of a resource.
97
96
  *
98
97
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/206
99
98
  */
100
- HttpStatus[HttpStatus["PartialContent"] = 206] = "PartialContent";
99
+ PartialContent: 206,
101
100
  /**
102
101
  * Conveys information about multiple resources, for situations where multiple status codes
103
102
  * might be appropriate.
104
103
  *
105
104
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/207
106
105
  */
107
- HttpStatus[HttpStatus["MultiStatus"] = 207] = "MultiStatus";
106
+ MultiStatus: 207,
108
107
  /**
109
108
  * Used inside a [dav:propstat](dav:propstat) response element to avoid repeatedly enumerating
110
109
  * the internal members of multiple bindings to the same collection.
111
110
  *
112
111
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/208
113
112
  */
114
- HttpStatus[HttpStatus["AlreadyReported"] = 208] = "AlreadyReported";
113
+ AlreadyReported: 208,
115
114
  /**
116
115
  * The server has fulfilled a GET request for the resource, and the response is a representation
117
116
  * of the result of one or more instance-manipulations applied to the current instance.
118
117
  *
119
118
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/226
120
119
  */
121
- HttpStatus[HttpStatus["ImUsed"] = 226] = "ImUsed";
120
+ ImUsed: 226,
122
121
  /** 300 level codes (redirect) */
123
122
  /**
124
123
  * The request has more than one possible response. The user agent or user should choose one of
@@ -127,14 +126,14 @@ export var HttpStatus;
127
126
  *
128
127
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/300
129
128
  */
130
- HttpStatus[HttpStatus["MultipleChoices"] = 300] = "MultipleChoices";
129
+ MultipleChoices: 300,
131
130
  /**
132
131
  * The URL of the requested resource has been changed permanently. The new URL is given in the
133
132
  * response.
134
133
  *
135
134
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/301
136
135
  */
137
- HttpStatus[HttpStatus["MovedPermanently"] = 301] = "MovedPermanently";
136
+ MovedPermanently: 301,
138
137
  /**
139
138
  * This response code means that the URI of requested resource has been changed temporarily.
140
139
  * Further changes in the URI might be made in the future. Therefore, this same URI should be
@@ -142,21 +141,21 @@ export var HttpStatus;
142
141
  *
143
142
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/302
144
143
  */
145
- HttpStatus[HttpStatus["Found"] = 302] = "Found";
144
+ Found: 302,
146
145
  /**
147
146
  * The server sent this response to direct the client to get the requested resource at another
148
147
  * URI with a GET request.
149
148
  *
150
149
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/303
151
150
  */
152
- HttpStatus[HttpStatus["SeeOther"] = 303] = "SeeOther";
151
+ SeeOther: 303,
153
152
  /**
154
153
  * This is used for caching purposes. It tells the client that the response has not been
155
154
  * modified, so the client can continue to use the same cached version of the response.
156
155
  *
157
156
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/304
158
157
  */
159
- HttpStatus[HttpStatus["NotModified"] = 304] = "NotModified";
158
+ NotModified: 304,
160
159
  /**
161
160
  * Defined in a previous version of the HTTP specification to indicate that a requested response
162
161
  * must be accessed by a proxy. It has been deprecated due to security concerns regarding
@@ -164,14 +163,14 @@ export var HttpStatus;
164
163
  *
165
164
  * See https://developer.mozilla.org/about:blank#305_use_proxy
166
165
  */
167
- HttpStatus[HttpStatus["UseProxy"] = 305] = "UseProxy";
166
+ UseProxy: 305,
168
167
  /**
169
168
  * This response code is no longer used; it is just reserved. It was used in a previous version
170
169
  * of the HTTP/1.1 specification.
171
170
  *
172
171
  * See https://developer.mozilla.org/about:blank#306_unused
173
172
  */
174
- HttpStatus[HttpStatus["Unused"] = 306] = "Unused";
173
+ Unused: 306,
175
174
  /**
176
175
  * The server sends this response to direct the client to get the requested resource at another
177
176
  * URI with the same method that was used in the prior request. This has the same semantics as
@@ -181,7 +180,7 @@ export var HttpStatus;
181
180
  *
182
181
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/307
183
182
  */
184
- HttpStatus[HttpStatus["TemporaryRedirect"] = 307] = "TemporaryRedirect";
183
+ TemporaryRedirect: 307,
185
184
  /**
186
185
  * This means that the resource is now permanently located at another URI, specified by the
187
186
  * Location: HTTP Response header. This has the same semantics as the 301 Moved Permanently HTTP
@@ -190,7 +189,7 @@ export var HttpStatus;
190
189
  *
191
190
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/308
192
191
  */
193
- HttpStatus[HttpStatus["PermanentRedirect"] = 308] = "PermanentRedirect";
192
+ PermanentRedirect: 308,
194
193
  /** 400 level codes (clientError) */
195
194
  /**
196
195
  * The server cannot or will not process the request due to something that is perceived to be a
@@ -199,7 +198,7 @@ export var HttpStatus;
199
198
  *
200
199
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/400
201
200
  */
202
- HttpStatus[HttpStatus["BadRequest"] = 400] = "BadRequest";
201
+ BadRequest: 400,
203
202
  /**
204
203
  * Although the HTTP standard specifies "unauthorized", semantically this response means
205
204
  * "unauthenticated". That is, the client must authenticate itself to get the requested
@@ -207,7 +206,7 @@ export var HttpStatus;
207
206
  *
208
207
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/401
209
208
  */
210
- HttpStatus[HttpStatus["Unauthorized"] = 401] = "Unauthorized";
209
+ Unauthorized: 401,
211
210
  /**
212
211
  * This response code is reserved for future use. The initial aim for creating this code was
213
212
  * using it for digital payment systems, however this status code is used very rarely and no
@@ -215,7 +214,7 @@ export var HttpStatus;
215
214
  *
216
215
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/402
217
216
  */
218
- HttpStatus[HttpStatus["PaymentRequired"] = 402] = "PaymentRequired";
217
+ PaymentRequired: 402,
219
218
  /**
220
219
  * The client does not have access rights to the content; that is, it is unauthorized, so the
221
220
  * server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's
@@ -223,7 +222,7 @@ export var HttpStatus;
223
222
  *
224
223
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/403
225
224
  */
226
- HttpStatus[HttpStatus["Forbidden"] = 403] = "Forbidden";
225
+ Forbidden: 403,
227
226
  /**
228
227
  * The server cannot find the requested resource. In the browser, this means the URL is not
229
228
  * recognized. In an API, this can also mean that the endpoint is valid but the resource itself
@@ -233,27 +232,27 @@ export var HttpStatus;
233
232
  *
234
233
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/404
235
234
  */
236
- HttpStatus[HttpStatus["NotFound"] = 404] = "NotFound";
235
+ NotFound: 404,
237
236
  /**
238
237
  * The request method is known by the server but is not supported by the target resource. For
239
238
  * example, an API may not allow calling DELETE to remove a resource.
240
239
  *
241
240
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/405
242
241
  */
243
- HttpStatus[HttpStatus["MethodNotAllowed"] = 405] = "MethodNotAllowed";
242
+ MethodNotAllowed: 405,
244
243
  /**
245
244
  * This response is sent when the web server, after performing server-driven content
246
245
  * negotiation, doesn't find any content that conforms to the criteria given by the user agent.
247
246
  *
248
247
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/406
249
248
  */
250
- HttpStatus[HttpStatus["NotAcceptable"] = 406] = "NotAcceptable";
249
+ NotAcceptable: 406,
251
250
  /**
252
251
  * This is similar to 401 Unauthorized but authentication is needed to be done by a proxy.
253
252
  *
254
253
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/407
255
254
  */
256
- HttpStatus[HttpStatus["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired";
255
+ ProxyAuthenticationRequired: 407,
257
256
  /**
258
257
  * This response is sent on an idle connection by some servers, even without any previous
259
258
  * request by the client. It means that the server would like to shut down this unused
@@ -263,13 +262,13 @@ export var HttpStatus;
263
262
  *
264
263
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/408
265
264
  */
266
- HttpStatus[HttpStatus["RequestTimeout"] = 408] = "RequestTimeout";
265
+ RequestTimeout: 408,
267
266
  /**
268
267
  * This response is sent when a request conflicts with the current state of the server.
269
268
  *
270
269
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/409
271
270
  */
272
- HttpStatus[HttpStatus["Conflict"] = 409] = "Conflict";
271
+ Conflict: 409,
273
272
  /**
274
273
  * This response is sent when the requested content has been permanently deleted from server,
275
274
  * with no forwarding address. Clients are expected to remove their caches and links to the
@@ -279,60 +278,60 @@ export var HttpStatus;
279
278
  *
280
279
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/410
281
280
  */
282
- HttpStatus[HttpStatus["Gone"] = 410] = "Gone";
281
+ Gone: 410,
283
282
  /**
284
283
  * Server rejected the request because the Content-Length header field is not defined and the
285
284
  * server requires it.
286
285
  *
287
286
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/411
288
287
  */
289
- HttpStatus[HttpStatus["LengthRequired"] = 411] = "LengthRequired";
288
+ LengthRequired: 411,
290
289
  /**
291
290
  * The client has indicated preconditions in its headers which the server does not meet.
292
291
  *
293
292
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/412
294
293
  */
295
- HttpStatus[HttpStatus["PreconditionFailed"] = 412] = "PreconditionFailed";
294
+ PreconditionFailed: 412,
296
295
  /**
297
296
  * Request entity is larger than limits defined by server. The server might close the connection
298
297
  * or return an Retry-After header field.
299
298
  *
300
299
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/413
301
300
  */
302
- HttpStatus[HttpStatus["PayloadTooLarge"] = 413] = "PayloadTooLarge";
301
+ PayloadTooLarge: 413,
303
302
  /**
304
303
  * The URI requested by the client is longer than the server is willing to interpret.
305
304
  *
306
305
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/414
307
306
  */
308
- HttpStatus[HttpStatus["UriTooLong"] = 414] = "UriTooLong";
307
+ UriTooLong: 414,
309
308
  /**
310
309
  * The media format of the requested data is not supported by the server, so the server is
311
310
  * rejecting the request.
312
311
  *
313
312
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/415
314
313
  */
315
- HttpStatus[HttpStatus["UnsupportedMediaType"] = 415] = "UnsupportedMediaType";
314
+ UnsupportedMediaType: 415,
316
315
  /**
317
316
  * The range specified by the Range header field in the request cannot be fulfilled. It's
318
317
  * possible that the range is outside the size of the target URI's data.
319
318
  *
320
319
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/416
321
320
  */
322
- HttpStatus[HttpStatus["RangeNotSatisfiable"] = 416] = "RangeNotSatisfiable";
321
+ RangeNotSatisfiable: 416,
323
322
  /**
324
323
  * This response code means the expectation indicated by the Expect request header field cannot
325
324
  * be met by the server.
326
325
  *
327
326
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/417
328
327
  */
329
- HttpStatus[HttpStatus["ExpectationFailed"] = 417] = "ExpectationFailed";
328
+ ExpectationFailed: 417,
330
329
  /**
331
330
  * The server refuses the attempt to brew coffee with a teapot.
332
331
  *
333
332
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/418
334
333
  */
335
- HttpStatus[HttpStatus["ImATeapot"] = 418] = "ImATeapot";
334
+ ImATeapot: 418,
336
335
  /**
337
336
  * The request was directed at a server that is not able to produce a response. This can be sent
338
337
  * by a server that is not configured to produce responses for the combination of scheme and
@@ -340,31 +339,31 @@ export var HttpStatus;
340
339
  *
341
340
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/421
342
341
  */
343
- HttpStatus[HttpStatus["MisdirectedRequest"] = 421] = "MisdirectedRequest";
342
+ MisdirectedRequest: 421,
344
343
  /**
345
344
  * The request was well-formed but was unable to be followed due to semantic errors.
346
345
  *
347
346
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/422
348
347
  */
349
- HttpStatus[HttpStatus["UnprocessableContent"] = 422] = "UnprocessableContent";
348
+ UnprocessableContent: 422,
350
349
  /**
351
350
  * The resource that is being accessed is locked.
352
351
  *
353
352
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/423
354
353
  */
355
- HttpStatus[HttpStatus["Locked"] = 423] = "Locked";
354
+ Locked: 423,
356
355
  /**
357
356
  * The request failed due to failure of a previous request.
358
357
  *
359
358
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/424
360
359
  */
361
- HttpStatus[HttpStatus["FailedDependency"] = 424] = "FailedDependency";
360
+ FailedDependency: 424,
362
361
  /**
363
362
  * Indicates that the server is unwilling to risk processing a request that might be replayed.
364
363
  *
365
364
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/425
366
365
  */
367
- HttpStatus[HttpStatus["TooEarly"] = 425] = "TooEarly";
366
+ TooEarly: 425,
368
367
  /**
369
368
  * The server refuses to perform the request using the current protocol but might be willing to
370
369
  * do so after the client upgrades to a different protocol. The server sends an Upgrade header
@@ -372,7 +371,7 @@ export var HttpStatus;
372
371
  *
373
372
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/426
374
373
  */
375
- HttpStatus[HttpStatus["UpgradeRequired"] = 426] = "UpgradeRequired";
374
+ UpgradeRequired: 426,
376
375
  /**
377
376
  * The origin server requires the request to be conditional. This response is intended to
378
377
  * prevent the 'lost update' problem, where a client GETs a resource's state, modifies it and
@@ -381,34 +380,34 @@ export var HttpStatus;
381
380
  *
382
381
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/428
383
382
  */
384
- HttpStatus[HttpStatus["PreconditionRequired"] = 428] = "PreconditionRequired";
383
+ PreconditionRequired: 428,
385
384
  /**
386
385
  * The user has sent too many requests in a given amount of time ("rate limiting").
387
386
  *
388
387
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/429
389
388
  */
390
- HttpStatus[HttpStatus["TooManyRequests"] = 429] = "TooManyRequests";
389
+ TooManyRequests: 429,
391
390
  /**
392
391
  * The server is unwilling to process the request because its header fields are too large. The
393
392
  * request may be resubmitted after reducing the size of the request header fields.
394
393
  *
395
394
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/431
396
395
  */
397
- HttpStatus[HttpStatus["RequestHeaderFieldsTooLarge"] = 431] = "RequestHeaderFieldsTooLarge";
396
+ RequestHeaderFieldsTooLarge: 431,
398
397
  /**
399
398
  * The user agent requested a resource that cannot legally be provided, such as a web page
400
399
  * censored by a government.
401
400
  *
402
401
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/451
403
402
  */
404
- HttpStatus[HttpStatus["UnavailableForLegalReasons"] = 451] = "UnavailableForLegalReasons";
403
+ UnavailableForLegalReasons: 451,
405
404
  /** 500 level codes (serverError) */
406
405
  /**
407
406
  * The server has encountered a situation it does not know how to handle.
408
407
  *
409
408
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/500
410
409
  */
411
- HttpStatus[HttpStatus["InternalServerError"] = 500] = "InternalServerError";
410
+ InternalServerError: 500,
412
411
  /**
413
412
  * The request method is not supported by the server and cannot be handled. The only methods
414
413
  * that servers are required to support (and therefore that must not return this code) are GET
@@ -416,14 +415,14 @@ export var HttpStatus;
416
415
  *
417
416
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/501
418
417
  */
419
- HttpStatus[HttpStatus["NotImplemented"] = 501] = "NotImplemented";
418
+ NotImplemented: 501,
420
419
  /**
421
420
  * This error response means that the server, while working as a gateway to get a response
422
421
  * needed to handle the request, got an invalid response.
423
422
  *
424
423
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/502
425
424
  */
426
- HttpStatus[HttpStatus["BadGateway"] = 502] = "BadGateway";
425
+ BadGateway: 502,
427
426
  /**
428
427
  * The server is not ready to handle the request. Common causes are a server that is down for
429
428
  * maintenance or that is overloaded. Note that together with this response, a user-friendly
@@ -435,20 +434,20 @@ export var HttpStatus;
435
434
  *
436
435
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/503
437
436
  */
438
- HttpStatus[HttpStatus["ServiceUnavailable"] = 503] = "ServiceUnavailable";
437
+ ServiceUnavailable: 503,
439
438
  /**
440
439
  * This error response is given when the server is acting as a gateway and cannot get a response
441
440
  * in time.
442
441
  *
443
442
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/504
444
443
  */
445
- HttpStatus[HttpStatus["GatewayTimeout"] = 504] = "GatewayTimeout";
444
+ GatewayTimeout: 504,
446
445
  /**
447
446
  * The HTTP version used in the request is not supported by the server.
448
447
  *
449
448
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/505
450
449
  */
451
- HttpStatus[HttpStatus["HttpVersionNotSupported"] = 505] = "HttpVersionNotSupported";
450
+ HttpVersionNotSupported: 505,
452
451
  /**
453
452
  * The server has an internal configuration error: the chosen variant resource is configured to
454
453
  * engage in transparent content negotiation itself, and is therefore not a proper end point in
@@ -456,33 +455,33 @@ export var HttpStatus;
456
455
  *
457
456
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/506
458
457
  */
459
- HttpStatus[HttpStatus["VariantAlsoNegotiates"] = 506] = "VariantAlsoNegotiates";
458
+ VariantAlsoNegotiates: 506,
460
459
  /**
461
460
  * The method could not be performed on the resource because the server is unable to store the
462
461
  * representation needed to successfully complete the request.
463
462
  *
464
463
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/507
465
464
  */
466
- HttpStatus[HttpStatus["InsufficientStorage"] = 507] = "InsufficientStorage";
465
+ InsufficientStorage: 507,
467
466
  /**
468
467
  * The server detected an infinite loop while processing the request.
469
468
  *
470
469
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/508
471
470
  */
472
- HttpStatus[HttpStatus["LoopDetected"] = 508] = "LoopDetected";
471
+ LoopDetected: 508,
473
472
  /**
474
473
  * Further extensions to the request are required for the server to fulfill it.
475
474
  *
476
475
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/510
477
476
  */
478
- HttpStatus[HttpStatus["NotExtended"] = 510] = "NotExtended";
477
+ NotExtended: 510,
479
478
  /**
480
479
  * Indicates that the client needs to authenticate to gain network access.
481
480
  *
482
481
  * See https://developer.mozilla.org/docs/Web/HTTP/Status/511
483
482
  */
484
- HttpStatus[HttpStatus["NetworkAuthenticationRequired"] = 511] = "NetworkAuthenticationRequired";
485
- })(HttpStatus || (HttpStatus = {}));
483
+ NetworkAuthenticationRequired: 511,
484
+ };
486
485
  /**
487
486
  * All standardized HTTP status code categories. These are determined by the first number in the
488
487
  * HTTP status code.
@@ -54,7 +54,7 @@ export type RemoveAllBranding<T> = T extends Brand<any> ? {
54
54
  *
55
55
  * @category Type
56
56
  */
57
- export declare function applyBrand<const NewBrand extends Branded<any, any> = never>(value: string): NewBrand;
58
- export declare function applyBrand<const NewBrand extends Branded<any, any> = never>(value: string | undefined): NewBrand | undefined;
59
- export declare function applyBrand<const NewBrand extends Branded<any, any> = never>(value: string | null): NewBrand | null;
60
- export declare function applyBrand<const NewBrand extends Branded<any, any> = never>(value: string | undefined | null): NewBrand | undefined | null;
57
+ export declare function applyBrand<const NewBrand extends Branded<any, any> = Branded<'__type_param_required__', '__type_param_required__'>>(value: UnwrapBrand<NewBrand>): NoInfer<NewBrand>;
58
+ export declare function applyBrand<const NewBrand extends Branded<any, any> = Branded<'__type_param_required__', '__type_param_required__'>>(value: UnwrapBrand<NewBrand> | undefined): NoInfer<NewBrand> | undefined;
59
+ export declare function applyBrand<const NewBrand extends Branded<any, any> = Branded<'__type_param_required__', '__type_param_required__'>>(value: UnwrapBrand<NewBrand> | null): NoInfer<NewBrand> | null;
60
+ export declare function applyBrand<const NewBrand extends Branded<any, any> = Branded<'__type_param_required__', '__type_param_required__'>>(value: UnwrapBrand<NewBrand> | undefined | null): NoInfer<NewBrand> | undefined | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@augment-vir/core",
3
- "version": "31.70.0",
3
+ "version": "31.71.0",
4
4
  "description": "Core augment-vir augments. Use @augment-vir/common instead.",
5
5
  "homepage": "https://github.com/electrovir/augment-vir",
6
6
  "bugs": {