UNPKG

@dazejs/framework

Version:

Daze.js - A powerful web framework for Node.js

391 lines 11 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Statusable = void 0; class Statusable { Continue(data) { return this.success(data || 'Continue', 100); } continue(data) { return this.Continue(data); } SwitchingProtocols(data) { return this.success(data || 'Switching Protocols', 101); } switchingProtocols(data) { return this.SwitchingProtocols(data); } Processing(data) { return this.success(data || 'Processing', 102); } processing(data) { return this.Processing(data); } EarlyHints(data) { return this.success(data || 'Early Hints', 103); } earlyHints(data) { return this.EarlyHints(data); } OK(data) { return this.success(data || 'OK', 200); } ok(data) { return this.OK(data); } Created(data) { return this.success(data || 'Created', 201); } created(data) { return this.Created(data); } Accepted(data) { return this.success(data || 'Accepted', 202); } accepted(data) { return this.Accepted(data); } NonAuthoritativeInformation(data) { return this.success(data || 'Non Authoritative Information', 203); } nonAuthoritativeInformation(data) { return this.NonAuthoritativeInformation(data); } NoContent() { return this.success(null, 204); } noContent() { return this.NoContent(); } ResetContent(data) { return this.success(data || 'Reset Content', 205); } resetContent(data) { return this.ResetContent(data); } PartialContent(data) { return this.success(data || 'Partial Content', 206); } partialContent(data) { return this.PartialContent(data); } MultiStatus(data) { return this.success(data || 'Multi Status', 207); } multiStatus(data) { return this.MultiStatus(data); } AlreadyReported(data) { return this.success(data || 'Already Reported', 208); } alreadyReported(data) { return this.AlreadyReported(data); } IMUsed(data) { return this.success(data || 'IM Used', 226); } imUsed(data) { return this.IMUsed(data); } MultipleChoices(data) { return this.success(data || 'Multiple Choices', 300); } multipleChoices(data) { return this.MultipleChoices(data); } MovedPermanently(data) { return this.success(data || 'Moved Permanently', 301); } movedPermanently(data) { return this.MovedPermanently(data); } Found(data) { return this.success(data || 'Found', 302); } found(data) { return this.Found(data); } SeeOther(data) { return this.success(data || 'See Other', 303); } seeOther(data) { return this.SeeOther(data); } NotModified(data) { return this.success(data || 'Not Modified', 304); } notModified(data) { return this.NotModified(data); } UseProxy(data) { return this.success(data || 'Use Proxy', 305); } useProxy(data) { return this.UseProxy(data); } Unused(data) { return this.success(data || 'Unused', 306); } unused(data) { return this.Unused(data); } TemporaryRedirect(data) { return this.success(data || 'Temporary Redirect', 307); } temporaryRedirect(data) { return this.TemporaryRedirect(data); } PermanentRedirect(data) { return this.success(data || 'Permanent Redirect', 308); } permanentRedirect(data) { return this.PermanentRedirect(data); } BadRequest(data) { return this.error(data || 'Bad Request', 400); } badRequest(data) { return this.BadRequest(data); } Unauthorized(data) { return this.error(data || 'Unauthorized', 401); } unauthorized(data) { return this.Unauthorized(data); } PaymentRequired(data) { return this.error(data || 'Payment Required', 402); } paymentRequired(data) { return this.PaymentRequired(data); } Forbidden(data) { return this.error(data || 'Forbidden', 403); } forbidden(data) { return this.Forbidden(data); } NotFound(data) { return this.error(data || 'Not Found', 404); } notFound(data) { return this.NotFound(data); } MethodNotAllowed(data) { return this.error(data || 'Method Not Allowed', 405); } methodNotAllowed(data) { return this.MethodNotAllowed(data); } NotAcceptable(data) { return this.error(data || 'Not Acceptable', 406); } notAcceptable(data) { return this.NotAcceptable(data); } ProxyAuthenticationRequired(data) { return this.error(data || 'Proxy Authentication Required', 407); } proxyAuthenticationRequired(data) { return this.ProxyAuthenticationRequired(data); } RequestTimeout(data) { return this.error(data || 'Request Timeout', 408); } requestTimeout(data) { return this.RequestTimeout(data); } Conflict(data) { return this.error(data || 'Conflict', 409); } conflict(data) { return this.Conflict(data); } Gone(data) { return this.error(data || 'Gone', 410); } gone(data) { return this.Gone(data); } LengthRequired(data) { return this.error(data || 'Length Required', 411); } lengthRequired(data) { return this.LengthRequired(data); } PreconditionFailed(data) { return this.error(data || 'Precondition Failed', 412); } preconditionFailed(data) { return this.PreconditionFailed(data); } PayloadTooLarge(data) { return this.error(data || 'Payload TooLarge', 413); } payloadTooLarge(data) { return this.PayloadTooLarge(data); } URITooLong(data) { return this.error(data || 'URI Too Long', 414); } uriTooLong(data) { return this.URITooLong(data); } UnsupportedMediaType(data) { return this.error(data || 'Unsupported Media Type', 415); } unsupportedMediaType(data) { return this.UnsupportedMediaType(data); } RangeNotSatisfiable(data) { return this.error(data || 'Range Not Satisfiable', 416); } rangeNotSatisfiable(data) { return this.RangeNotSatisfiable(data); } ExpectationFailed(data) { return this.error(data || 'Expectation Failed', 417); } expectationFailed(data) { return this.ExpectationFailed(data); } ImATeapot(data) { return this.error(data || 'Im A Teapot', 418); } imATeapot(data) { return this.ImATeapot(data); } MisdirectedRequest(data) { return this.error(data || 'Misdirected Request', 421); } misdirectedRequest(data) { return this.MisdirectedRequest(data); } UnprocessableEntity(data) { return this.error(data || 'Unprocessable Entity', 422); } unprocessableEntity(data) { return this.UnprocessableEntity(data); } Locked(data) { return this.error(data || 'Locked', 423); } locked(data) { return this.Locked(data); } FailedDependency(data) { return this.error(data || 'Failed Dependency', 424); } failedDependency(data) { return this.FailedDependency(data); } UnorderedCollection(data) { return this.error(data || 'Unordered Collection', 425); } unorderedCollection(data) { return this.UnorderedCollection(data); } UpgradeRequired(data) { return this.error(data || 'Upgrade Required', 426); } upgradeRequired(data) { return this.UpgradeRequired(data); } PreconditionRequired(data) { return this.error(data || 'Precondition Required', 428); } preconditionRequired(data) { return this.PreconditionRequired(data); } TooManyRequests(data) { return this.error(data || 'Too Many Requests', 429); } tooManyRequests(data) { return this.TooManyRequests(data); } RequestHeaderFieldsTooLarge(data) { return this.error(data || 'Request Header Fields Too Large', 431); } requestHeaderFieldsTooLarge(data) { return this.RequestHeaderFieldsTooLarge(data); } UnavailableForLegalReasons(data) { return this.error(data || 'Unavailable For Legal Reasons', 451); } unavailableForLegalReasons(data) { return this.UnavailableForLegalReasons(data); } InternalServerError(data) { return this.error(data || 'Internal Server Error', 500); } internalServerError(data) { return this.InternalServerError(data); } NotImplemented(data) { return this.error(data || 'Not Implemented', 501); } notImplemented(data) { return this.NotImplemented(data); } BadGateway(data) { return this.error(data || 'Bad Gateway', 502); } badGateway(data) { return this.BadGateway(data); } ServiceUnavailable(data) { return this.error(data || 'Service Unavailable', 503); } serviceUnavailable(data) { return this.ServiceUnavailable(data); } GatewayTimeout(data) { return this.error(data || 'Gateway Timeout', 504); } gatewayTimeout(data) { return this.GatewayTimeout(data); } HTTPVersionNotSupported(data) { return this.error(data || 'HTTP Version Not Supported', 505); } httpVersionNotSupported(data) { return this.HTTPVersionNotSupported(data); } VariantAlsoNegotiates(data) { return this.error(data || 'Variant Also Negotiates', 506); } variantAlsoNegotiates(data) { return this.VariantAlsoNegotiates(data); } InsufficientStorage(data) { return this.error(data || 'Insufficient Storage', 507); } insufficientStorage(data) { return this.InsufficientStorage(data); } LoopDetected(data) { return this.error(data || 'Loop Detected', 508); } loopDetected(data) { return this.LoopDetected(data); } BandwidthLimitExceeded(data) { return this.error(data || 'Bandwidth Limit Exceeded', 509); } bandwidthLimitExceeded(data) { return this.BandwidthLimitExceeded(data); } NotExtended(data) { return this.error(data || 'Not Extended', 510); } notExtended(data) { return this.NotExtended(data); } NetworkAuthenticationRequired(data) { return this.error(data || 'Network Authentication Required', 511); } networkAuthenticationRequired(data) { return this.NetworkAuthenticationRequired(data); } } exports.Statusable = Statusable; //# sourceMappingURL=statusable.js.map