|
1 | 1 | // TODO: Enforce consistency at the type level |
2 | 2 |
|
3 | 3 | export const HttpToKeyStatus = { |
| 4 | + 100: 'continue', |
| 5 | + 101: 'switchingProtocols', |
| 6 | + 102: 'processing', |
4 | 7 | 200: 'ok', |
| 8 | + 201: 'created', |
| 9 | + 202: 'accepted', |
| 10 | + 203: 'nonAuthoritativeInformation', |
| 11 | + 204: 'noContent', |
| 12 | + 205: 'resetContent', |
| 13 | + 206: 'partialContent', |
| 14 | + 207: 'multiStatus', |
| 15 | + 208: 'alreadyReported', |
| 16 | + 226: 'imUsed', |
| 17 | + 300: 'multipleChoices', |
| 18 | + 301: 'movedPermanently', |
| 19 | + 302: 'found', |
| 20 | + 303: 'seeOther', |
| 21 | + 304: 'notModified', |
| 22 | + 307: 'temporaryRedirect', |
| 23 | + 308: 'permanentRedirect', |
5 | 24 | 400: 'invalidRequest', |
6 | 25 | 401: 'unauthenticated', |
| 26 | + 402: 'paymentRequired', |
7 | 27 | 403: 'permissionDenied', |
8 | 28 | 404: 'notFound', |
| 29 | + 405: 'methodNotAllowed', |
| 30 | + 406: 'notAcceptable', |
| 31 | + 407: 'proxyAuthenticationRequired', |
| 32 | + 408: 'requestTimeout', |
9 | 33 | 409: 'conflict', |
| 34 | + 410: 'gone', |
| 35 | + 411: 'lengthRequired', |
| 36 | + 412: 'preconditionFailed', |
| 37 | + 413: 'contentTooLarge', |
| 38 | + 414: 'uriTooLong', |
| 39 | + 415: 'unsupportedMediaType', |
| 40 | + 416: 'rangeNotSatisfiable', |
| 41 | + 417: 'exceptionFailed', |
| 42 | + 418: 'imATeapot', |
| 43 | + 421: 'misdirectedRequest', |
| 44 | + 422: 'unprocessableContent', |
| 45 | + 423: 'locked', |
| 46 | + 424: 'failedDependency', |
| 47 | + 425: 'tooEarly', |
| 48 | + 426: 'upgradeRequired', |
| 49 | + 428: 'preconditionRequired', |
10 | 50 | 429: 'rateLimitExceeded', |
| 51 | + 431: 'requestHeaderFieldsTooLarge', |
| 52 | + 451: 'unavailableForLegalReasons', |
11 | 53 | 500: 'internalError', |
| 54 | + 501: 'notImplemented', |
| 55 | + 502: 'badGateway', |
12 | 56 | 503: 'serviceUnavailable', |
| 57 | + 504: 'gatewayTimeout', |
| 58 | + 505: 'httpVersionNotSupported', |
| 59 | + 506: 'variantAlsoNegotiates', |
| 60 | + 507: 'insufficientStorage', |
| 61 | + 508: 'loopDetected', |
| 62 | + 510: 'notExtended', |
| 63 | + 511: 'networkAuthenticationRequired', |
13 | 64 | } as const; |
14 | 65 |
|
15 | 66 | export type HttpToKeyStatus = typeof HttpToKeyStatus; |
16 | 67 |
|
17 | 68 | export const KeyToHttpStatus = { |
| 69 | + continue: 100, |
| 70 | + switchingProtocols: 101, |
| 71 | + processing: 102, |
18 | 72 | ok: 200, |
| 73 | + created: 201, |
| 74 | + accepted: 202, |
| 75 | + nonAuthoritativeInformation: 203, |
| 76 | + noContent: 204, |
| 77 | + resetContent: 205, |
| 78 | + partialContent: 206, |
| 79 | + multiStatus: 207, |
| 80 | + alreadyReported: 208, |
| 81 | + imUsed: 226, |
| 82 | + multipleChoices: 300, |
| 83 | + movedPermanently: 301, |
| 84 | + found: 302, |
| 85 | + seeOther: 303, |
| 86 | + notModified: 304, |
| 87 | + temporaryRedirect: 307, |
| 88 | + permanentRedirect: 308, |
19 | 89 | invalidRequest: 400, |
20 | 90 | unauthenticated: 401, |
| 91 | + paymentRequired: 402, |
21 | 92 | permissionDenied: 403, |
22 | 93 | notFound: 404, |
| 94 | + methodNotAllowed: 405, |
| 95 | + notAcceptable: 406, |
| 96 | + proxyAuthenticationRequired: 407, |
| 97 | + requestTimeout: 408, |
23 | 98 | conflict: 409, |
| 99 | + gone: 410, |
| 100 | + lengthRequired: 411, |
| 101 | + preconditionFailed: 412, |
| 102 | + contentTooLarge: 413, |
| 103 | + uriTooLong: 414, |
| 104 | + unsupportedMediaType: 415, |
| 105 | + rangeNotSatisfiable: 416, |
| 106 | + exceptionFailed: 417, |
| 107 | + imATeapot: 418, |
| 108 | + misdirectedRequest: 421, |
| 109 | + unprocessableContent: 422, |
| 110 | + locked: 423, |
| 111 | + failedDependency: 424, |
| 112 | + tooEarly: 425, |
| 113 | + upgradeRequired: 426, |
| 114 | + preconditionRequired: 428, |
24 | 115 | rateLimitExceeded: 429, |
| 116 | + requestHeaderFieldsTooLarge: 431, |
| 117 | + unavailableForLegalReasons: 451, |
25 | 118 | internalError: 500, |
| 119 | + notImplemented: 501, |
| 120 | + badGateway: 502, |
26 | 121 | serviceUnavailable: 503, |
| 122 | + gatewayTimeout: 504, |
| 123 | + httpVersionNotSupported: 505, |
| 124 | + variantAlsoNegotiates: 506, |
| 125 | + insufficientStorage: 507, |
| 126 | + loopDetected: 508, |
| 127 | + notExtended: 510, |
| 128 | + networkAuthenticationRequired: 511, |
27 | 129 | } as const; |
28 | 130 |
|
29 | 131 | export type KeyToHttpStatus = typeof KeyToHttpStatus; |
0 commit comments