api-machine 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -0
- package/LICENSE.md +20 -0
- package/README.md +383 -0
- package/authentication/authenticated-request.d.ts +4 -0
- package/authentication/authenticated-request.js +3 -0
- package/authentication/authenticated-request.js.map +1 -0
- package/authentication/authentication-scheme.d.ts +38 -0
- package/authentication/authentication-scheme.js +21 -0
- package/authentication/authentication-scheme.js.map +1 -0
- package/authentication/index.d.ts +4 -0
- package/authentication/index.js +9 -0
- package/authentication/index.js.map +1 -0
- package/authentication/middleware/bearer-authentication.d.ts +12 -0
- package/authentication/middleware/bearer-authentication.js +49 -0
- package/authentication/middleware/bearer-authentication.js.map +1 -0
- package/authentication/middleware/index.d.ts +1 -0
- package/authentication/middleware/index.js +6 -0
- package/authentication/middleware/index.js.map +1 -0
- package/authentication/schemes/bearer-authentication-scheme.d.ts +37 -0
- package/authentication/schemes/bearer-authentication-scheme.js +43 -0
- package/authentication/schemes/bearer-authentication-scheme.js.map +1 -0
- package/authentication/schemes/index.d.ts +1 -0
- package/authentication/schemes/index.js +6 -0
- package/authentication/schemes/index.js.map +1 -0
- package/error/error-options.d.ts +4 -0
- package/error/error-options.js +3 -0
- package/error/error-options.js.map +1 -0
- package/error/error-response.d.ts +7 -0
- package/error/error-response.js +3 -0
- package/error/error-response.js.map +1 -0
- package/error/http-errors/400-bad-request-error.d.ts +12 -0
- package/error/http-errors/400-bad-request-error.js +20 -0
- package/error/http-errors/400-bad-request-error.js.map +1 -0
- package/error/http-errors/401-unauthorized-error.d.ts +14 -0
- package/error/http-errors/401-unauthorized-error.js +24 -0
- package/error/http-errors/401-unauthorized-error.js.map +1 -0
- package/error/http-errors/402-payment-required-error.d.ts +10 -0
- package/error/http-errors/402-payment-required-error.js +18 -0
- package/error/http-errors/402-payment-required-error.js.map +1 -0
- package/error/http-errors/403-forbidden-error.d.ts +10 -0
- package/error/http-errors/403-forbidden-error.js +18 -0
- package/error/http-errors/403-forbidden-error.js.map +1 -0
- package/error/http-errors/404-not-found-error.d.ts +10 -0
- package/error/http-errors/404-not-found-error.js +18 -0
- package/error/http-errors/404-not-found-error.js.map +1 -0
- package/error/http-errors/405-method-not-allowed-error.d.ts +13 -0
- package/error/http-errors/405-method-not-allowed-error.js +27 -0
- package/error/http-errors/405-method-not-allowed-error.js.map +1 -0
- package/error/http-errors/406-not-acceptable-error.d.ts +11 -0
- package/error/http-errors/406-not-acceptable-error.js +19 -0
- package/error/http-errors/406-not-acceptable-error.js.map +1 -0
- package/error/http-errors/407-proxy-authentication-required-error.d.ts +13 -0
- package/error/http-errors/407-proxy-authentication-required-error.js +23 -0
- package/error/http-errors/407-proxy-authentication-required-error.js.map +1 -0
- package/error/http-errors/408-request-timeout-error.d.ts +10 -0
- package/error/http-errors/408-request-timeout-error.js +18 -0
- package/error/http-errors/408-request-timeout-error.js.map +1 -0
- package/error/http-errors/409-conflict-error.d.ts +10 -0
- package/error/http-errors/409-conflict-error.js +18 -0
- package/error/http-errors/409-conflict-error.js.map +1 -0
- package/error/http-errors/410-gone-error.d.ts +10 -0
- package/error/http-errors/410-gone-error.js +18 -0
- package/error/http-errors/410-gone-error.js.map +1 -0
- package/error/http-errors/411-length-required-error.d.ts +10 -0
- package/error/http-errors/411-length-required-error.js +18 -0
- package/error/http-errors/411-length-required-error.js.map +1 -0
- package/error/http-errors/412-precondition-failed-error.d.ts +10 -0
- package/error/http-errors/412-precondition-failed-error.js +18 -0
- package/error/http-errors/412-precondition-failed-error.js.map +1 -0
- package/error/http-errors/413-payload-too-large-error.d.ts +10 -0
- package/error/http-errors/413-payload-too-large-error.js +18 -0
- package/error/http-errors/413-payload-too-large-error.js.map +1 -0
- package/error/http-errors/414-uri-too-long-error.d.ts +10 -0
- package/error/http-errors/414-uri-too-long-error.js +18 -0
- package/error/http-errors/414-uri-too-long-error.js.map +1 -0
- package/error/http-errors/415-unsupported-media-type-error.d.ts +13 -0
- package/error/http-errors/415-unsupported-media-type-error.js +25 -0
- package/error/http-errors/415-unsupported-media-type-error.js.map +1 -0
- package/error/http-errors/416-range-not-satisfiable-error.d.ts +13 -0
- package/error/http-errors/416-range-not-satisfiable-error.js +25 -0
- package/error/http-errors/416-range-not-satisfiable-error.js.map +1 -0
- package/error/http-errors/417-expectation-failed-error.d.ts +10 -0
- package/error/http-errors/417-expectation-failed-error.js +18 -0
- package/error/http-errors/417-expectation-failed-error.js.map +1 -0
- package/error/http-errors/418-im-a-teapot-error.d.ts +10 -0
- package/error/http-errors/418-im-a-teapot-error.js +18 -0
- package/error/http-errors/418-im-a-teapot-error.js.map +1 -0
- package/error/http-errors/421-misdirected-request-error.d.ts +10 -0
- package/error/http-errors/421-misdirected-request-error.js +18 -0
- package/error/http-errors/421-misdirected-request-error.js.map +1 -0
- package/error/http-errors/422-unprocessable-entity-error.d.ts +10 -0
- package/error/http-errors/422-unprocessable-entity-error.js +18 -0
- package/error/http-errors/422-unprocessable-entity-error.js.map +1 -0
- package/error/http-errors/423-locked-error.d.ts +10 -0
- package/error/http-errors/423-locked-error.js +18 -0
- package/error/http-errors/423-locked-error.js.map +1 -0
- package/error/http-errors/424-failed-dependency-error.d.ts +10 -0
- package/error/http-errors/424-failed-dependency-error.js +18 -0
- package/error/http-errors/424-failed-dependency-error.js.map +1 -0
- package/error/http-errors/425-too-early-error.d.ts +10 -0
- package/error/http-errors/425-too-early-error.js +18 -0
- package/error/http-errors/425-too-early-error.js.map +1 -0
- package/error/http-errors/426-upgrade-required-error.d.ts +13 -0
- package/error/http-errors/426-upgrade-required-error.js +22 -0
- package/error/http-errors/426-upgrade-required-error.js.map +1 -0
- package/error/http-errors/428-precondition-required-error.d.ts +10 -0
- package/error/http-errors/428-precondition-required-error.js +18 -0
- package/error/http-errors/428-precondition-required-error.js.map +1 -0
- package/error/http-errors/429-too-many-requests-error.d.ts +13 -0
- package/error/http-errors/429-too-many-requests-error.js +25 -0
- package/error/http-errors/429-too-many-requests-error.js.map +1 -0
- package/error/http-errors/431-request-header-fields-too-large-error.d.ts +11 -0
- package/error/http-errors/431-request-header-fields-too-large-error.js +19 -0
- package/error/http-errors/431-request-header-fields-too-large-error.js.map +1 -0
- package/error/http-errors/451-unavailable-for-legal-reasons-error.d.ts +10 -0
- package/error/http-errors/451-unavailable-for-legal-reasons-error.js +18 -0
- package/error/http-errors/451-unavailable-for-legal-reasons-error.js.map +1 -0
- package/error/http-errors/http-error.d.ts +26 -0
- package/error/http-errors/http-error.js +37 -0
- package/error/http-errors/http-error.js.map +1 -0
- package/error/http-errors/index.d.ts +30 -0
- package/error/http-errors/index.js +67 -0
- package/error/http-errors/index.js.map +1 -0
- package/error/index.d.ts +3 -0
- package/error/index.js +5 -0
- package/error/index.js.map +1 -0
- package/index.d.ts +4 -0
- package/index.js +8 -0
- package/index.js.map +1 -0
- package/log/index.d.ts +1 -0
- package/log/index.js +3 -0
- package/log/index.js.map +1 -0
- package/log/log-interface.d.ts +7 -0
- package/log/log-interface.js +3 -0
- package/log/log-interface.js.map +1 -0
- package/oas/index.d.ts +2 -0
- package/oas/index.js +8 -0
- package/oas/index.js.map +1 -0
- package/oas/oas-endpoint-component-converter.d.ts +15 -0
- package/oas/oas-endpoint-component-converter.js +33 -0
- package/oas/oas-endpoint-component-converter.js.map +1 -0
- package/oas/oas-endpoint-converter.d.ts +17 -0
- package/oas/oas-endpoint-converter.js +89 -0
- package/oas/oas-endpoint-converter.js.map +1 -0
- package/oas/oas-rest-server-converter.d.ts +13 -0
- package/oas/oas-rest-server-converter.js +82 -0
- package/oas/oas-rest-server-converter.js.map +1 -0
- package/oas/routes.d.ts +8 -0
- package/oas/routes.js +24 -0
- package/oas/routes.js.map +1 -0
- package/package.json +34 -0
- package/router/base.d.ts +35 -0
- package/router/base.js +59 -0
- package/router/base.js.map +1 -0
- package/router/endpoint.d.ts +44 -0
- package/router/endpoint.js +76 -0
- package/router/endpoint.js.map +1 -0
- package/router/endpoints/delete-endpoint.d.ts +5 -0
- package/router/endpoints/delete-endpoint.js +10 -0
- package/router/endpoints/delete-endpoint.js.map +1 -0
- package/router/endpoints/get-endpoint.d.ts +5 -0
- package/router/endpoints/get-endpoint.js +10 -0
- package/router/endpoints/get-endpoint.js.map +1 -0
- package/router/endpoints/health-check-endpoint.d.ts +15 -0
- package/router/endpoints/health-check-endpoint.js +30 -0
- package/router/endpoints/health-check-endpoint.js.map +1 -0
- package/router/endpoints/index.d.ts +6 -0
- package/router/endpoints/index.js +16 -0
- package/router/endpoints/index.js.map +1 -0
- package/router/endpoints/patch-endpoint.d.ts +5 -0
- package/router/endpoints/patch-endpoint.js +10 -0
- package/router/endpoints/patch-endpoint.js.map +1 -0
- package/router/endpoints/post-endpoint.d.ts +5 -0
- package/router/endpoints/post-endpoint.js +10 -0
- package/router/endpoints/post-endpoint.js.map +1 -0
- package/router/endpoints/put-endpoint.d.ts +5 -0
- package/router/endpoints/put-endpoint.js +10 -0
- package/router/endpoints/put-endpoint.js.map +1 -0
- package/router/index.d.ts +3 -0
- package/router/index.js +15 -0
- package/router/index.js.map +1 -0
- package/router/router.d.ts +15 -0
- package/router/router.js +67 -0
- package/router/router.js.map +1 -0
- package/router/validation-middleware.d.ts +13 -0
- package/router/validation-middleware.js +45 -0
- package/router/validation-middleware.js.map +1 -0
- package/server/index.d.ts +2 -0
- package/server/index.js +8 -0
- package/server/index.js.map +1 -0
- package/server/server-options.d.ts +46 -0
- package/server/server-options.js +24 -0
- package/server/server-options.js.map +1 -0
- package/server/server.d.ts +38 -0
- package/server/server.js +178 -0
- package/server/server.js.map +1 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BearerAuthenticationScheme = void 0;
|
|
4
|
+
var bearer_authentication_scheme_1 = require("./bearer-authentication-scheme");
|
|
5
|
+
Object.defineProperty(exports, "BearerAuthenticationScheme", { enumerable: true, get: function () { return bearer_authentication_scheme_1.BearerAuthenticationScheme; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/authentication/schemes/index.ts"],"names":[],"mappings":";;;AAAA,+EAA4E;AAAnE,0IAAA,0BAA0B,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-options.js","sourceRoot":"","sources":["../../../src/error/error-options.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-response.js","sourceRoot":"","sources":["../../../src/error/error-response.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HTTPError } from './http-error';
|
|
2
|
+
import { HttpErrorOptions } from '../error-options';
|
|
3
|
+
/**
|
|
4
|
+
* 400 Bad Request
|
|
5
|
+
* The server cannot process the request due to client error
|
|
6
|
+
* (e.g., malformed request syntax, invalid request message framing,
|
|
7
|
+
* or deceptive request routing)
|
|
8
|
+
*/
|
|
9
|
+
export declare class BadRequestError extends HTTPError {
|
|
10
|
+
constructor(message?: string, options?: HttpErrorOptions);
|
|
11
|
+
getStatusCode(): number;
|
|
12
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BadRequestError = void 0;
|
|
4
|
+
const http_error_1 = require("./http-error");
|
|
5
|
+
/**
|
|
6
|
+
* 400 Bad Request
|
|
7
|
+
* The server cannot process the request due to client error
|
|
8
|
+
* (e.g., malformed request syntax, invalid request message framing,
|
|
9
|
+
* or deceptive request routing)
|
|
10
|
+
*/
|
|
11
|
+
class BadRequestError extends http_error_1.HTTPError {
|
|
12
|
+
constructor(message = 'Bad Request', options = {}) {
|
|
13
|
+
super(message, options);
|
|
14
|
+
}
|
|
15
|
+
getStatusCode() {
|
|
16
|
+
return 400;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.BadRequestError = BadRequestError;
|
|
20
|
+
//# sourceMappingURL=400-bad-request-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"400-bad-request-error.js","sourceRoot":"","sources":["../../../../src/error/http-errors/400-bad-request-error.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AAGzC;;;;;GAKG;AACH,MAAa,eAAgB,SAAQ,sBAAS;IAC7C,YAAY,OAAO,GAAG,aAAa,EAAE,UAA4B,EAAE;QAClE,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACzB,CAAC;IAEe,aAAa;QAC5B,OAAO,GAAG,CAAC;IACZ,CAAC;CACD;AARD,0CAQC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HTTPError } from './http-error';
|
|
2
|
+
import { HttpErrorOptions } from '../error-options';
|
|
3
|
+
export interface UnauthorizedErrorOptions extends HttpErrorOptions {
|
|
4
|
+
realm?: string;
|
|
5
|
+
scheme?: 'Bearer' | 'Basic' | 'Digest';
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* 401 Unauthorized
|
|
9
|
+
* Authentication is required and has failed or has not been provided
|
|
10
|
+
*/
|
|
11
|
+
export declare class UnauthorizedError extends HTTPError {
|
|
12
|
+
constructor(message?: string, options?: UnauthorizedErrorOptions);
|
|
13
|
+
getStatusCode(): number;
|
|
14
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UnauthorizedError = void 0;
|
|
4
|
+
const http_error_1 = require("./http-error");
|
|
5
|
+
/**
|
|
6
|
+
* 401 Unauthorized
|
|
7
|
+
* Authentication is required and has failed or has not been provided
|
|
8
|
+
*/
|
|
9
|
+
class UnauthorizedError extends http_error_1.HTTPError {
|
|
10
|
+
constructor(message = 'Unauthorized', options = {}) {
|
|
11
|
+
const realm = options.realm || 'Access to the resource';
|
|
12
|
+
const scheme = options.scheme || 'Bearer';
|
|
13
|
+
const headers = {
|
|
14
|
+
'WWW-Authenticate': `${scheme} realm="${realm}"`,
|
|
15
|
+
...options.headers,
|
|
16
|
+
};
|
|
17
|
+
super(message, { ...options, headers });
|
|
18
|
+
}
|
|
19
|
+
getStatusCode() {
|
|
20
|
+
return 401;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.UnauthorizedError = UnauthorizedError;
|
|
24
|
+
//# sourceMappingURL=401-unauthorized-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"401-unauthorized-error.js","sourceRoot":"","sources":["../../../../src/error/http-errors/401-unauthorized-error.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AAQzC;;;GAGG;AACH,MAAa,iBAAkB,SAAQ,sBAAS;IAC/C,YACC,OAAO,GAAG,cAAc,EACxB,UAAoC,EAAE;QAEtC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,wBAAwB,CAAC;QACxD,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,QAAQ,CAAC;QAC1C,MAAM,OAAO,GAAG;YACf,kBAAkB,EAAE,GAAG,MAAM,WAAW,KAAK,GAAG;YAChD,GAAG,OAAO,CAAC,OAAO;SAClB,CAAC;QAEF,KAAK,CAAC,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;IACzC,CAAC;IAEe,aAAa;QAC5B,OAAO,GAAG,CAAC;IACZ,CAAC;CACD;AAlBD,8CAkBC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTTPError } from './http-error';
|
|
2
|
+
import { HttpErrorOptions } from '../error-options';
|
|
3
|
+
/**
|
|
4
|
+
* 402 Payment Required
|
|
5
|
+
* Reserved for future use. Originally intended for digital payment systems
|
|
6
|
+
*/
|
|
7
|
+
export declare class PaymentRequiredError extends HTTPError {
|
|
8
|
+
constructor(message?: string, options?: HttpErrorOptions);
|
|
9
|
+
getStatusCode(): number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PaymentRequiredError = void 0;
|
|
4
|
+
const http_error_1 = require("./http-error");
|
|
5
|
+
/**
|
|
6
|
+
* 402 Payment Required
|
|
7
|
+
* Reserved for future use. Originally intended for digital payment systems
|
|
8
|
+
*/
|
|
9
|
+
class PaymentRequiredError extends http_error_1.HTTPError {
|
|
10
|
+
constructor(message = 'Payment Required', options = {}) {
|
|
11
|
+
super(message, options);
|
|
12
|
+
}
|
|
13
|
+
getStatusCode() {
|
|
14
|
+
return 402;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.PaymentRequiredError = PaymentRequiredError;
|
|
18
|
+
//# sourceMappingURL=402-payment-required-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"402-payment-required-error.js","sourceRoot":"","sources":["../../../../src/error/http-errors/402-payment-required-error.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AAGzC;;;GAGG;AACH,MAAa,oBAAqB,SAAQ,sBAAS;IAClD,YAAY,OAAO,GAAG,kBAAkB,EAAE,UAA4B,EAAE;QACvE,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACzB,CAAC;IAEe,aAAa;QAC5B,OAAO,GAAG,CAAC;IACZ,CAAC;CACD;AARD,oDAQC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTTPError } from './http-error';
|
|
2
|
+
import { HttpErrorOptions } from '../error-options';
|
|
3
|
+
/**
|
|
4
|
+
* 403 Forbidden
|
|
5
|
+
* The client does not have access rights to the content
|
|
6
|
+
*/
|
|
7
|
+
export declare class ForbiddenError extends HTTPError {
|
|
8
|
+
constructor(message?: string, options?: HttpErrorOptions);
|
|
9
|
+
getStatusCode(): number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ForbiddenError = void 0;
|
|
4
|
+
const http_error_1 = require("./http-error");
|
|
5
|
+
/**
|
|
6
|
+
* 403 Forbidden
|
|
7
|
+
* The client does not have access rights to the content
|
|
8
|
+
*/
|
|
9
|
+
class ForbiddenError extends http_error_1.HTTPError {
|
|
10
|
+
constructor(message = 'Forbidden', options = {}) {
|
|
11
|
+
super(message, options);
|
|
12
|
+
}
|
|
13
|
+
getStatusCode() {
|
|
14
|
+
return 403;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.ForbiddenError = ForbiddenError;
|
|
18
|
+
//# sourceMappingURL=403-forbidden-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"403-forbidden-error.js","sourceRoot":"","sources":["../../../../src/error/http-errors/403-forbidden-error.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AAGzC;;;GAGG;AACH,MAAa,cAAe,SAAQ,sBAAS;IAC5C,YAAY,OAAO,GAAG,WAAW,EAAE,UAA4B,EAAE;QAChE,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACzB,CAAC;IAEe,aAAa;QAC5B,OAAO,GAAG,CAAC;IACZ,CAAC;CACD;AARD,wCAQC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTTPError } from './http-error';
|
|
2
|
+
import { HttpErrorOptions } from '../error-options';
|
|
3
|
+
/**
|
|
4
|
+
* 404 Not Found
|
|
5
|
+
* The server cannot find the requested resource
|
|
6
|
+
*/
|
|
7
|
+
export declare class NotFoundError extends HTTPError {
|
|
8
|
+
constructor(message?: string, options?: HttpErrorOptions);
|
|
9
|
+
getStatusCode(): number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotFoundError = void 0;
|
|
4
|
+
const http_error_1 = require("./http-error");
|
|
5
|
+
/**
|
|
6
|
+
* 404 Not Found
|
|
7
|
+
* The server cannot find the requested resource
|
|
8
|
+
*/
|
|
9
|
+
class NotFoundError extends http_error_1.HTTPError {
|
|
10
|
+
constructor(message = 'Not Found', options = {}) {
|
|
11
|
+
super(message, options);
|
|
12
|
+
}
|
|
13
|
+
getStatusCode() {
|
|
14
|
+
return 404;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.NotFoundError = NotFoundError;
|
|
18
|
+
//# sourceMappingURL=404-not-found-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"404-not-found-error.js","sourceRoot":"","sources":["../../../../src/error/http-errors/404-not-found-error.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AAGzC;;;GAGG;AACH,MAAa,aAAc,SAAQ,sBAAS;IAC3C,YAAY,OAAO,GAAG,WAAW,EAAE,UAA4B,EAAE;QAChE,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACzB,CAAC;IAEe,aAAa;QAC5B,OAAO,GAAG,CAAC;IACZ,CAAC;CACD;AARD,sCAQC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { HTTPError } from './http-error';
|
|
2
|
+
import { HttpErrorOptions } from '../error-options';
|
|
3
|
+
export interface MethodNotAllowedErrorOptions extends HttpErrorOptions {
|
|
4
|
+
allowedMethods?: string[];
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* 405 Method Not Allowed
|
|
8
|
+
* The request method is not supported for the requested resource
|
|
9
|
+
*/
|
|
10
|
+
export declare class MethodNotAllowedError extends HTTPError {
|
|
11
|
+
constructor(message?: string, options?: MethodNotAllowedErrorOptions);
|
|
12
|
+
getStatusCode(): number;
|
|
13
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MethodNotAllowedError = void 0;
|
|
4
|
+
const http_error_1 = require("./http-error");
|
|
5
|
+
/**
|
|
6
|
+
* 405 Method Not Allowed
|
|
7
|
+
* The request method is not supported for the requested resource
|
|
8
|
+
*/
|
|
9
|
+
class MethodNotAllowedError extends http_error_1.HTTPError {
|
|
10
|
+
constructor(message = 'Method Not Allowed', options = {}) {
|
|
11
|
+
const headers = {};
|
|
12
|
+
if (!(options.headers ? options.headers['Allow'] : null) &&
|
|
13
|
+
options.allowedMethods &&
|
|
14
|
+
options.allowedMethods.length > 0) {
|
|
15
|
+
headers['Allow'] = options.allowedMethods.join(', ');
|
|
16
|
+
}
|
|
17
|
+
super(message, {
|
|
18
|
+
...options,
|
|
19
|
+
headers: { ...headers, ...options.headers },
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
getStatusCode() {
|
|
23
|
+
return 405;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.MethodNotAllowedError = MethodNotAllowedError;
|
|
27
|
+
//# sourceMappingURL=405-method-not-allowed-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"405-method-not-allowed-error.js","sourceRoot":"","sources":["../../../../src/error/http-errors/405-method-not-allowed-error.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AAOzC;;;GAGG;AACH,MAAa,qBAAsB,SAAQ,sBAAS;IACnD,YACC,OAAO,GAAG,oBAAoB,EAC9B,UAAwC,EAAE;QAE1C,MAAM,OAAO,GAA2B,EAAE,CAAC;QAE3C,IACC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;YACpD,OAAO,CAAC,cAAc;YACtB,OAAO,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,EAChC,CAAC;YACF,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtD,CAAC;QAED,KAAK,CAAC,OAAO,EAAE;YACd,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE;SAC3C,CAAC,CAAC;IACJ,CAAC;IAEe,aAAa;QAC5B,OAAO,GAAG,CAAC;IACZ,CAAC;CACD;AAxBD,sDAwBC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HTTPError } from './http-error';
|
|
2
|
+
import { HttpErrorOptions } from '../error-options';
|
|
3
|
+
/**
|
|
4
|
+
* 406 Not Acceptable
|
|
5
|
+
* The server cannot produce a response matching the list of acceptable
|
|
6
|
+
* values defined in the request's headers
|
|
7
|
+
*/
|
|
8
|
+
export declare class NotAcceptableError extends HTTPError {
|
|
9
|
+
constructor(message?: string, options?: HttpErrorOptions);
|
|
10
|
+
getStatusCode(): number;
|
|
11
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotAcceptableError = void 0;
|
|
4
|
+
const http_error_1 = require("./http-error");
|
|
5
|
+
/**
|
|
6
|
+
* 406 Not Acceptable
|
|
7
|
+
* The server cannot produce a response matching the list of acceptable
|
|
8
|
+
* values defined in the request's headers
|
|
9
|
+
*/
|
|
10
|
+
class NotAcceptableError extends http_error_1.HTTPError {
|
|
11
|
+
constructor(message = 'Not Acceptable', options = {}) {
|
|
12
|
+
super(message, options);
|
|
13
|
+
}
|
|
14
|
+
getStatusCode() {
|
|
15
|
+
return 406;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.NotAcceptableError = NotAcceptableError;
|
|
19
|
+
//# sourceMappingURL=406-not-acceptable-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"406-not-acceptable-error.js","sourceRoot":"","sources":["../../../../src/error/http-errors/406-not-acceptable-error.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AAGzC;;;;GAIG;AACH,MAAa,kBAAmB,SAAQ,sBAAS;IAChD,YAAY,OAAO,GAAG,gBAAgB,EAAE,UAA4B,EAAE;QACrE,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACzB,CAAC;IAEe,aAAa;QAC5B,OAAO,GAAG,CAAC;IACZ,CAAC;CACD;AARD,gDAQC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { HTTPError } from './http-error';
|
|
2
|
+
import { HttpErrorOptions } from '../error-options';
|
|
3
|
+
export interface ProxyAuthenticationRequiredErrorOptions extends HttpErrorOptions {
|
|
4
|
+
realm?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* 407 Proxy Authentication Required
|
|
8
|
+
* Authentication is required by a proxy server
|
|
9
|
+
*/
|
|
10
|
+
export declare class ProxyAuthenticationRequiredError extends HTTPError {
|
|
11
|
+
constructor(message?: string, options?: ProxyAuthenticationRequiredErrorOptions);
|
|
12
|
+
getStatusCode(): number;
|
|
13
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProxyAuthenticationRequiredError = void 0;
|
|
4
|
+
const http_error_1 = require("./http-error");
|
|
5
|
+
/**
|
|
6
|
+
* 407 Proxy Authentication Required
|
|
7
|
+
* Authentication is required by a proxy server
|
|
8
|
+
*/
|
|
9
|
+
class ProxyAuthenticationRequiredError extends http_error_1.HTTPError {
|
|
10
|
+
constructor(message = 'Proxy Authentication Required', options = {}) {
|
|
11
|
+
const realm = options.realm || 'Proxy';
|
|
12
|
+
const headers = {
|
|
13
|
+
'Proxy-Authenticate': `Basic realm="${realm}"`,
|
|
14
|
+
...options.headers,
|
|
15
|
+
};
|
|
16
|
+
super(message, { ...options, headers });
|
|
17
|
+
}
|
|
18
|
+
getStatusCode() {
|
|
19
|
+
return 407;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.ProxyAuthenticationRequiredError = ProxyAuthenticationRequiredError;
|
|
23
|
+
//# sourceMappingURL=407-proxy-authentication-required-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"407-proxy-authentication-required-error.js","sourceRoot":"","sources":["../../../../src/error/http-errors/407-proxy-authentication-required-error.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AAQzC;;;GAGG;AACH,MAAa,gCAAiC,SAAQ,sBAAS;IAC9D,YACC,OAAO,GAAG,+BAA+B,EACzC,UAAmD,EAAE;QAErD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC;QACvC,MAAM,OAAO,GAAG;YACf,oBAAoB,EAAE,gBAAgB,KAAK,GAAG;YAC9C,GAAG,OAAO,CAAC,OAAO;SAClB,CAAC;QACF,KAAK,CAAC,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;IACzC,CAAC;IAEe,aAAa;QAC5B,OAAO,GAAG,CAAC;IACZ,CAAC;CACD;AAhBD,4EAgBC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTTPError } from './http-error';
|
|
2
|
+
import { HttpErrorOptions } from '../error-options';
|
|
3
|
+
/**
|
|
4
|
+
* 408 Request Timeout
|
|
5
|
+
* The server timed out waiting for the request
|
|
6
|
+
*/
|
|
7
|
+
export declare class RequestTimeoutError extends HTTPError {
|
|
8
|
+
constructor(message?: string, options?: HttpErrorOptions);
|
|
9
|
+
getStatusCode(): number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RequestTimeoutError = void 0;
|
|
4
|
+
const http_error_1 = require("./http-error");
|
|
5
|
+
/**
|
|
6
|
+
* 408 Request Timeout
|
|
7
|
+
* The server timed out waiting for the request
|
|
8
|
+
*/
|
|
9
|
+
class RequestTimeoutError extends http_error_1.HTTPError {
|
|
10
|
+
constructor(message = 'Request Timeout', options = {}) {
|
|
11
|
+
super(message, options);
|
|
12
|
+
}
|
|
13
|
+
getStatusCode() {
|
|
14
|
+
return 408;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.RequestTimeoutError = RequestTimeoutError;
|
|
18
|
+
//# sourceMappingURL=408-request-timeout-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"408-request-timeout-error.js","sourceRoot":"","sources":["../../../../src/error/http-errors/408-request-timeout-error.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AAGzC;;;GAGG;AACH,MAAa,mBAAoB,SAAQ,sBAAS;IACjD,YAAY,OAAO,GAAG,iBAAiB,EAAE,UAA4B,EAAE;QACtE,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACzB,CAAC;IAEe,aAAa;QAC5B,OAAO,GAAG,CAAC;IACZ,CAAC;CACD;AARD,kDAQC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTTPError } from './http-error';
|
|
2
|
+
import { HttpErrorOptions } from '../error-options';
|
|
3
|
+
/**
|
|
4
|
+
* 409 Conflict
|
|
5
|
+
* The request conflicts with the current state of the server
|
|
6
|
+
*/
|
|
7
|
+
export declare class ConflictError extends HTTPError {
|
|
8
|
+
constructor(message?: string, options?: HttpErrorOptions);
|
|
9
|
+
getStatusCode(): number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConflictError = void 0;
|
|
4
|
+
const http_error_1 = require("./http-error");
|
|
5
|
+
/**
|
|
6
|
+
* 409 Conflict
|
|
7
|
+
* The request conflicts with the current state of the server
|
|
8
|
+
*/
|
|
9
|
+
class ConflictError extends http_error_1.HTTPError {
|
|
10
|
+
constructor(message = 'Conflict', options = {}) {
|
|
11
|
+
super(message, options);
|
|
12
|
+
}
|
|
13
|
+
getStatusCode() {
|
|
14
|
+
return 409;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.ConflictError = ConflictError;
|
|
18
|
+
//# sourceMappingURL=409-conflict-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"409-conflict-error.js","sourceRoot":"","sources":["../../../../src/error/http-errors/409-conflict-error.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AAGzC;;;GAGG;AACH,MAAa,aAAc,SAAQ,sBAAS;IAC3C,YAAY,OAAO,GAAG,UAAU,EAAE,UAA4B,EAAE;QAC/D,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACzB,CAAC;IAEe,aAAa;QAC5B,OAAO,GAAG,CAAC;IACZ,CAAC;CACD;AARD,sCAQC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTTPError } from './http-error';
|
|
2
|
+
import { HttpErrorOptions } from '../error-options';
|
|
3
|
+
/**
|
|
4
|
+
* 410 Gone
|
|
5
|
+
* The requested resource is no longer available and will not be available again
|
|
6
|
+
*/
|
|
7
|
+
export declare class GoneError extends HTTPError {
|
|
8
|
+
constructor(message?: string, options?: HttpErrorOptions);
|
|
9
|
+
getStatusCode(): number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GoneError = void 0;
|
|
4
|
+
const http_error_1 = require("./http-error");
|
|
5
|
+
/**
|
|
6
|
+
* 410 Gone
|
|
7
|
+
* The requested resource is no longer available and will not be available again
|
|
8
|
+
*/
|
|
9
|
+
class GoneError extends http_error_1.HTTPError {
|
|
10
|
+
constructor(message = 'Gone', options = {}) {
|
|
11
|
+
super(message, options);
|
|
12
|
+
}
|
|
13
|
+
getStatusCode() {
|
|
14
|
+
return 410;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.GoneError = GoneError;
|
|
18
|
+
//# sourceMappingURL=410-gone-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"410-gone-error.js","sourceRoot":"","sources":["../../../../src/error/http-errors/410-gone-error.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AAGzC;;;GAGG;AACH,MAAa,SAAU,SAAQ,sBAAS;IACvC,YAAY,OAAO,GAAG,MAAM,EAAE,UAA4B,EAAE;QAC3D,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACzB,CAAC;IAEe,aAAa;QAC5B,OAAO,GAAG,CAAC;IACZ,CAAC;CACD;AARD,8BAQC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTTPError } from './http-error';
|
|
2
|
+
import { HttpErrorOptions } from '../error-options';
|
|
3
|
+
/**
|
|
4
|
+
* 411 Length Required
|
|
5
|
+
* The request did not specify the length of its content
|
|
6
|
+
*/
|
|
7
|
+
export declare class LengthRequiredError extends HTTPError {
|
|
8
|
+
constructor(message?: string, options?: HttpErrorOptions);
|
|
9
|
+
getStatusCode(): number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LengthRequiredError = void 0;
|
|
4
|
+
const http_error_1 = require("./http-error");
|
|
5
|
+
/**
|
|
6
|
+
* 411 Length Required
|
|
7
|
+
* The request did not specify the length of its content
|
|
8
|
+
*/
|
|
9
|
+
class LengthRequiredError extends http_error_1.HTTPError {
|
|
10
|
+
constructor(message = 'Length Required', options = {}) {
|
|
11
|
+
super(message, options);
|
|
12
|
+
}
|
|
13
|
+
getStatusCode() {
|
|
14
|
+
return 411;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.LengthRequiredError = LengthRequiredError;
|
|
18
|
+
//# sourceMappingURL=411-length-required-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"411-length-required-error.js","sourceRoot":"","sources":["../../../../src/error/http-errors/411-length-required-error.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AAGzC;;;GAGG;AACH,MAAa,mBAAoB,SAAQ,sBAAS;IACjD,YAAY,OAAO,GAAG,iBAAiB,EAAE,UAA4B,EAAE;QACtE,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACzB,CAAC;IAEe,aAAa;QAC5B,OAAO,GAAG,CAAC;IACZ,CAAC;CACD;AARD,kDAQC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTTPError } from './http-error';
|
|
2
|
+
import { HttpErrorOptions } from '../error-options';
|
|
3
|
+
/**
|
|
4
|
+
* 412 Precondition Failed
|
|
5
|
+
* The server does not meet one of the preconditions specified by the client
|
|
6
|
+
*/
|
|
7
|
+
export declare class PreconditionFailedError extends HTTPError {
|
|
8
|
+
constructor(message?: string, options?: HttpErrorOptions);
|
|
9
|
+
getStatusCode(): number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PreconditionFailedError = void 0;
|
|
4
|
+
const http_error_1 = require("./http-error");
|
|
5
|
+
/**
|
|
6
|
+
* 412 Precondition Failed
|
|
7
|
+
* The server does not meet one of the preconditions specified by the client
|
|
8
|
+
*/
|
|
9
|
+
class PreconditionFailedError extends http_error_1.HTTPError {
|
|
10
|
+
constructor(message = 'Precondition Failed', options = {}) {
|
|
11
|
+
super(message, options);
|
|
12
|
+
}
|
|
13
|
+
getStatusCode() {
|
|
14
|
+
return 412;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.PreconditionFailedError = PreconditionFailedError;
|
|
18
|
+
//# sourceMappingURL=412-precondition-failed-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"412-precondition-failed-error.js","sourceRoot":"","sources":["../../../../src/error/http-errors/412-precondition-failed-error.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AAGzC;;;GAGG;AACH,MAAa,uBAAwB,SAAQ,sBAAS;IACrD,YACC,OAAO,GAAG,qBAAqB,EAC/B,UAA4B,EAAE;QAE9B,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACzB,CAAC;IAEe,aAAa;QAC5B,OAAO,GAAG,CAAC;IACZ,CAAC;CACD;AAXD,0DAWC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTTPError } from './http-error';
|
|
2
|
+
import { HttpErrorOptions } from '../error-options';
|
|
3
|
+
/**
|
|
4
|
+
* 413 Payload Too Large
|
|
5
|
+
* The request entity is larger than limits defined by server
|
|
6
|
+
*/
|
|
7
|
+
export declare class PayloadTooLargeError extends HTTPError {
|
|
8
|
+
constructor(message?: string, options?: HttpErrorOptions);
|
|
9
|
+
getStatusCode(): number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PayloadTooLargeError = void 0;
|
|
4
|
+
const http_error_1 = require("./http-error");
|
|
5
|
+
/**
|
|
6
|
+
* 413 Payload Too Large
|
|
7
|
+
* The request entity is larger than limits defined by server
|
|
8
|
+
*/
|
|
9
|
+
class PayloadTooLargeError extends http_error_1.HTTPError {
|
|
10
|
+
constructor(message = 'Payload Too Large', options = {}) {
|
|
11
|
+
super(message, options);
|
|
12
|
+
}
|
|
13
|
+
getStatusCode() {
|
|
14
|
+
return 413;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.PayloadTooLargeError = PayloadTooLargeError;
|
|
18
|
+
//# sourceMappingURL=413-payload-too-large-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"413-payload-too-large-error.js","sourceRoot":"","sources":["../../../../src/error/http-errors/413-payload-too-large-error.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AAGzC;;;GAGG;AACH,MAAa,oBAAqB,SAAQ,sBAAS;IAClD,YAAY,OAAO,GAAG,mBAAmB,EAAE,UAA4B,EAAE;QACxE,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACzB,CAAC;IAEe,aAAa;QAC5B,OAAO,GAAG,CAAC;IACZ,CAAC;CACD;AARD,oDAQC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTTPError } from './http-error';
|
|
2
|
+
import { HttpErrorOptions } from '../error-options';
|
|
3
|
+
/**
|
|
4
|
+
* 414 URI Too Long
|
|
5
|
+
* The URI provided was too long for the server to process
|
|
6
|
+
*/
|
|
7
|
+
export declare class URITooLongError extends HTTPError {
|
|
8
|
+
constructor(message?: string, options?: HttpErrorOptions);
|
|
9
|
+
getStatusCode(): number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.URITooLongError = void 0;
|
|
4
|
+
const http_error_1 = require("./http-error");
|
|
5
|
+
/**
|
|
6
|
+
* 414 URI Too Long
|
|
7
|
+
* The URI provided was too long for the server to process
|
|
8
|
+
*/
|
|
9
|
+
class URITooLongError extends http_error_1.HTTPError {
|
|
10
|
+
constructor(message = 'URI Too Long', options = {}) {
|
|
11
|
+
super(message, options);
|
|
12
|
+
}
|
|
13
|
+
getStatusCode() {
|
|
14
|
+
return 414;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.URITooLongError = URITooLongError;
|
|
18
|
+
//# sourceMappingURL=414-uri-too-long-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"414-uri-too-long-error.js","sourceRoot":"","sources":["../../../../src/error/http-errors/414-uri-too-long-error.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AAGzC;;;GAGG;AACH,MAAa,eAAgB,SAAQ,sBAAS;IAC7C,YAAY,OAAO,GAAG,cAAc,EAAE,UAA4B,EAAE;QACnE,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACzB,CAAC;IAEe,aAAa;QAC5B,OAAO,GAAG,CAAC;IACZ,CAAC;CACD;AARD,0CAQC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { HTTPError } from './http-error';
|
|
2
|
+
import { HttpErrorOptions } from '../error-options';
|
|
3
|
+
export interface UnsupportedMediaTypeErrorOptions extends HttpErrorOptions {
|
|
4
|
+
acceptedTypes?: string[];
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* 415 Unsupported Media Type
|
|
8
|
+
* The media format of the requested data is not supported by the server
|
|
9
|
+
*/
|
|
10
|
+
export declare class UnsupportedMediaTypeError extends HTTPError {
|
|
11
|
+
constructor(message?: string, options?: UnsupportedMediaTypeErrorOptions);
|
|
12
|
+
getStatusCode(): number;
|
|
13
|
+
}
|