UNPKG

mutoid

Version:

Reactive library for data fetching, caching, state management

171 lines (170 loc) 5.95 kB
export declare const StatusInformational: { readonly 100: "Continue"; readonly 101: "SwitchingProtocols"; readonly 102: "Processing"; readonly 103: "EarlyHints"; }; export type StatusInformational = keyof typeof StatusInformational; export declare const StatusSuccess: { readonly 200: "OK"; readonly 201: "Created"; readonly 202: "Accepted"; readonly 203: "NonAuthoritativeInformation"; readonly 204: "NoContent"; readonly 205: "ResetContent"; readonly 206: "PartialContent"; readonly 207: "MultiStatus"; readonly 208: "AlreadyReported"; readonly 226: "IMUsed"; }; export type StatusSuccess = keyof typeof StatusSuccess; export declare const StatusRedirection: { readonly 300: "MultipleChoices"; readonly 301: "MovedPermanently"; readonly 302: "Found"; readonly 303: "SeeOther"; readonly 304: "NotModified"; readonly 305: "UseProxy"; readonly 306: "SwitchProxy"; readonly 307: "TemporaryRedirect"; readonly 308: "PermanentRedirect"; }; export type StatusRedirection = keyof typeof StatusRedirection; export declare const StatusSuccessWidden: { 300: "MultipleChoices"; 301: "MovedPermanently"; 302: "Found"; 303: "SeeOther"; 304: "NotModified"; 305: "UseProxy"; 306: "SwitchProxy"; 307: "TemporaryRedirect"; 308: "PermanentRedirect"; 200: "OK"; 201: "Created"; 202: "Accepted"; 203: "NonAuthoritativeInformation"; 204: "NoContent"; 205: "ResetContent"; 206: "PartialContent"; 207: "MultiStatus"; 208: "AlreadyReported"; 226: "IMUsed"; 100: "Continue"; 101: "SwitchingProtocols"; 102: "Processing"; 103: "EarlyHints"; }; export declare const StatusClientError: { readonly 400: "BadRequest"; readonly 401: "Unauthorized"; readonly 402: "PaymentRequired"; readonly 403: "Forbidden"; readonly 404: "NotFound"; readonly 405: "MethodNotAllowed"; readonly 406: "NotAcceptable"; readonly 407: "ProxyAuthenticationRequired"; readonly 408: "RequestTimeout"; readonly 409: "Conflict"; readonly 410: "Gone"; readonly 411: "LengthRequired"; readonly 412: "PreconditionFailed"; readonly 413: "PayloadTooLarge"; readonly 414: "URITooLong"; readonly 415: "UnsupportedMediaType"; readonly 416: "RangeNotSatisfiable"; readonly 417: "ExpectationFailed"; readonly 418: "Teapot"; readonly 421: "MisdirectedRequest"; readonly 422: "UnprocessableEntity"; readonly 423: "Locked"; readonly 424: "FailedDependency"; readonly 425: "TooEarly"; readonly 426: "UpgradeRequired"; readonly 428: "PreconditionRequired"; readonly 429: "TooManyRequests"; readonly 431: "RequestHeaderFieldsTooLarge"; readonly 451: "UnavailableForLegalReasons"; }; export type StatusClientError = keyof typeof StatusClientError; export declare const StatusServerError: { readonly 500: "InternalServerError"; readonly 501: "NotImplemented"; readonly 502: "BadGateway"; readonly 503: "ServiceUnavailable"; readonly 504: "GatewayTimeout"; readonly 505: "HTTPVersionNotSupported"; readonly 506: "VariantAlsoNegotiates"; readonly 507: "InsufficientStorage"; readonly 508: "LoopDetected"; readonly 510: "NotExtended"; readonly 511: "NetworkAuthenticationRequired"; }; export type StatusServerError = keyof typeof StatusServerError; export declare const StatusCodeMap: { readonly 500: "InternalServerError"; readonly 501: "NotImplemented"; readonly 502: "BadGateway"; readonly 503: "ServiceUnavailable"; readonly 504: "GatewayTimeout"; readonly 505: "HTTPVersionNotSupported"; readonly 506: "VariantAlsoNegotiates"; readonly 507: "InsufficientStorage"; readonly 508: "LoopDetected"; readonly 510: "NotExtended"; readonly 511: "NetworkAuthenticationRequired"; readonly 400: "BadRequest"; readonly 401: "Unauthorized"; readonly 402: "PaymentRequired"; readonly 403: "Forbidden"; readonly 404: "NotFound"; readonly 405: "MethodNotAllowed"; readonly 406: "NotAcceptable"; readonly 407: "ProxyAuthenticationRequired"; readonly 408: "RequestTimeout"; readonly 409: "Conflict"; readonly 410: "Gone"; readonly 411: "LengthRequired"; readonly 412: "PreconditionFailed"; readonly 413: "PayloadTooLarge"; readonly 414: "URITooLong"; readonly 415: "UnsupportedMediaType"; readonly 416: "RangeNotSatisfiable"; readonly 417: "ExpectationFailed"; readonly 418: "Teapot"; readonly 421: "MisdirectedRequest"; readonly 422: "UnprocessableEntity"; readonly 423: "Locked"; readonly 424: "FailedDependency"; readonly 425: "TooEarly"; readonly 426: "UpgradeRequired"; readonly 428: "PreconditionRequired"; readonly 429: "TooManyRequests"; readonly 431: "RequestHeaderFieldsTooLarge"; readonly 451: "UnavailableForLegalReasons"; readonly 300: "MultipleChoices"; readonly 301: "MovedPermanently"; readonly 302: "Found"; readonly 303: "SeeOther"; readonly 304: "NotModified"; readonly 305: "UseProxy"; readonly 306: "SwitchProxy"; readonly 307: "TemporaryRedirect"; readonly 308: "PermanentRedirect"; readonly 200: "OK"; readonly 201: "Created"; readonly 202: "Accepted"; readonly 203: "NonAuthoritativeInformation"; readonly 204: "NoContent"; readonly 205: "ResetContent"; readonly 206: "PartialContent"; readonly 207: "MultiStatus"; readonly 208: "AlreadyReported"; readonly 226: "IMUsed"; readonly 100: "Continue"; readonly 101: "SwitchingProtocols"; readonly 102: "Processing"; readonly 103: "EarlyHints"; }; export type StatusCode = StatusInformational | StatusSuccess | StatusRedirection | StatusClientError | StatusServerError; export declare const statusPredicate: <S extends Record<number, string>>(s: S) => (e: any) => e is keyof S;