UNPKG

@thisisagile/easy

Version:

Straightforward library for building domain-driven microservice architectures

75 lines (74 loc) 2.88 kB
import { Enum } from '../types/Enum'; import { TypeGuard } from '../types/TypeGuard'; import { Code } from '../types/Id'; export declare class HttpStatus extends Enum { static Continue: HttpStatus; static SwitchingProtocols: HttpStatus; static Processing: HttpStatus; static EarlyHints: HttpStatus; static Ok: HttpStatus; static Created: HttpStatus; static Accepted: HttpStatus; static NonAuthoritativeInformation: HttpStatus; static NoContent: HttpStatus; static ResetContent: HttpStatus; static PartialContent: HttpStatus; static MultiStatus: HttpStatus; static AlreadyReported: HttpStatus; static ImUsed: HttpStatus; static MultipleChoices: HttpStatus; static MovedPermanently: HttpStatus; static Found: HttpStatus; static SeeOther: HttpStatus; static NotModified: HttpStatus; static UseProxy: HttpStatus; static SwitchProxy: HttpStatus; static TemporaryRedirect: HttpStatus; static PermanentRedirect: HttpStatus; static BadRequest: HttpStatus; static NotAuthorized: HttpStatus; static PaymentRequired: HttpStatus; static Forbidden: HttpStatus; static NotFound: HttpStatus; static MethodNotAllowed: HttpStatus; static NotAcceptable: HttpStatus; static ProxyAuthenticationRequired: HttpStatus; static RequestTimeout: HttpStatus; static Conflict: HttpStatus; static Gone: HttpStatus; static LengthRequired: HttpStatus; static PreconditionFailed: HttpStatus; static PayloadTooLarge: HttpStatus; static UriTooLong: HttpStatus; static UnsupportedMediaType: HttpStatus; static RangeNotSatisfiable: HttpStatus; static ExpectationFailed: HttpStatus; static ImATeapot: HttpStatus; static MisdirectedRequest: HttpStatus; static UnprocessableEntity: HttpStatus; static Locked: HttpStatus; static FailedDependency: HttpStatus; static TooEarly: HttpStatus; static UpgradeRequired: HttpStatus; static PreconditionRequired: HttpStatus; static TooManyRequests: HttpStatus; static RequestHeaderFieldsTooLarge: HttpStatus; static UnavailableForLegalReasons: HttpStatus; static InternalServerError: HttpStatus; static NotImplemented: HttpStatus; static BadGateway: HttpStatus; static ServiceUnavailable: HttpStatus; static GatewayTimeout: HttpStatus; static HTTPVersionNotSupported: HttpStatus; static VariantAlsoNegotiates: HttpStatus; static InsufficientStorage: HttpStatus; static LoopDetected: HttpStatus; static NotExtended: HttpStatus; static NetworkAuthenticationRequired: HttpStatus; get isError(): boolean; get isClientError(): boolean; get isServerError(): boolean; get status(): number; } export declare const isHttpStatus: TypeGuard<HttpStatus>; export declare const toHttpStatus: (s: HttpStatus | Code) => HttpStatus;