@prefecthq/prefect-ui-library
Version:
This library is the Vue and Typescript component library for [Prefect 2](https://github.com/PrefectHQ/prefect) and [Prefect Cloud 2](https://www.prefect.io/cloud/). _The components and utilities in this project are not meant to be used independently_.
75 lines (74 loc) • 2.26 kB
TypeScript
export type HttpStatusName = keyof typeof httpStatusCode;
export type HttpStatus = typeof httpStatusCode[HttpStatusName];
export type HttpStatusRange = keyof typeof httpStatusCodeRange;
type HttpStatusResponse = {
is: (status: HttpStatusName) => boolean;
isInRange: (statusRange: HttpStatusRange) => boolean;
};
export declare function httpStatus(value: unknown): HttpStatusResponse;
export declare const httpStatusCode: {
Continue: number;
SwitchingProtocols: number;
Processing: number;
OK: number;
Created: number;
Accepted: number;
NonAuthoritativeInformation: number;
NoContent: number;
ResetContent: number;
PartialContent: number;
MultiStatus: number;
MultipleChoices: number;
MovedPermanently: number;
MovedTemporarily: number;
SeeOther: number;
NotModified: number;
UseProxy: number;
TemporaryRedirect: number;
PermanentRedirect: number;
BadRequest: number;
Unauthorized: number;
PaymentRequired: number;
Forbidden: number;
NotFound: number;
MethodNotAllowed: number;
NotAcceptable: number;
ProxyAuthenticationRequired: number;
RequestTimeout: number;
Conflict: number;
Gone: number;
LengthRequired: number;
PreconditionFailed: number;
RequestEntityTooLarge: number;
RequestURITooLong: number;
UnsupportedMediaType: number;
RequestedRangeNotSatisfiable: number;
ExpectationFailed: number;
ImATeapot: number;
InsufficientSpaceOnResource: number;
MethodFailure: number;
MisdirectedRequest: number;
UnprocessableEntity: number;
Locked: number;
FailedDependency: number;
PreconditionRequired: number;
TooManyRequests: number;
RequestHeaderFieldsTooLarge: number;
UnavailableForLegalReasons: number;
InternalServerError: number;
NotImplemented: number;
BadGateway: number;
ServiceUnavailable: number;
GatewayTimeout: number;
HTTPVersionNotSupported: number;
InsufficientStorage: number;
NetworkAuthenticationRequired: number;
};
export declare const httpStatusCodeRange: {
informational: number[];
successful: number[];
redirection: number[];
clientError: number[];
serverError: number[];
};
export {};