@voiceflow/exception 1.1.0 → 1.1.1
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/README.md +45 -0
- package/build/cjs/base-error.interface.d.ts +15 -0
- package/build/cjs/base-error.interface.js +3 -0
- package/build/cjs/base-error.interface.js.map +1 -0
- package/build/cjs/client.exception.d.ts +16 -0
- package/build/cjs/client.exception.js +42 -0
- package/build/cjs/client.exception.js.map +1 -0
- package/build/cjs/error-code.enum.d.ts +2 -0
- package/build/cjs/error-code.enum.js +7 -0
- package/build/cjs/error-code.enum.js.map +1 -0
- package/build/cjs/error-message.interface.d.ts +5 -0
- package/build/cjs/error-message.interface.js +3 -0
- package/build/cjs/error-message.interface.js.map +1 -0
- package/build/cjs/error-payload.interface.d.ts +15 -0
- package/build/cjs/error-payload.interface.js +3 -0
- package/build/cjs/error-payload.interface.js.map +1 -0
- package/build/cjs/http/http-4xx.exception.d.ts +29 -0
- package/build/cjs/http/http-4xx.exception.js +35 -0
- package/build/cjs/http/http-4xx.exception.js.map +1 -0
- package/build/cjs/http/http-5xx.exception.d.ts +11 -0
- package/build/cjs/http/http-5xx.exception.js +17 -0
- package/build/cjs/http/http-5xx.exception.js.map +1 -0
- package/build/cjs/http/http-status.enum.d.ts +42 -0
- package/build/cjs/http/http-status.enum.js +49 -0
- package/build/cjs/http/http-status.enum.js.map +1 -0
- package/build/cjs/http/http.exception.d.ts +11 -0
- package/build/cjs/http/http.exception.js +22 -0
- package/build/cjs/http/http.exception.js.map +1 -0
- package/build/cjs/http/utils.d.ts +7 -0
- package/build/cjs/http/utils.js +16 -0
- package/build/cjs/http/utils.js.map +1 -0
- package/build/cjs/internal.exception.d.ts +22 -0
- package/build/cjs/internal.exception.js +65 -0
- package/build/cjs/internal.exception.js.map +1 -0
- package/build/cjs/main.d.ts +10 -0
- package/build/cjs/main.js +27 -0
- package/build/cjs/main.js.map +1 -0
- package/build/esm/base-error.interface.d.ts +15 -0
- package/build/esm/base-error.interface.js +2 -0
- package/build/esm/base-error.interface.js.map +1 -0
- package/build/esm/client.exception.d.ts +16 -0
- package/build/esm/client.exception.js +38 -0
- package/build/esm/client.exception.js.map +1 -0
- package/build/esm/error-code.enum.d.ts +2 -0
- package/build/esm/error-code.enum.js +4 -0
- package/build/esm/error-code.enum.js.map +1 -0
- package/build/esm/error-message.interface.d.ts +5 -0
- package/build/esm/error-message.interface.js +2 -0
- package/build/esm/error-message.interface.js.map +1 -0
- package/build/esm/error-payload.interface.d.ts +15 -0
- package/build/esm/error-payload.interface.js +2 -0
- package/build/esm/error-payload.interface.js.map +1 -0
- package/build/esm/http/http-4xx.exception.d.ts +29 -0
- package/build/esm/http/http-4xx.exception.js +32 -0
- package/build/esm/http/http-4xx.exception.js.map +1 -0
- package/build/esm/http/http-5xx.exception.d.ts +11 -0
- package/build/esm/http/http-5xx.exception.js +14 -0
- package/build/esm/http/http-5xx.exception.js.map +1 -0
- package/build/esm/http/http-status.enum.d.ts +42 -0
- package/build/esm/http/http-status.enum.js +46 -0
- package/build/esm/http/http-status.enum.js.map +1 -0
- package/build/esm/http/http.exception.d.ts +11 -0
- package/build/esm/http/http.exception.js +18 -0
- package/build/esm/http/http.exception.js.map +1 -0
- package/build/esm/http/utils.d.ts +7 -0
- package/build/esm/http/utils.js +12 -0
- package/build/esm/http/utils.js.map +1 -0
- package/build/esm/internal.exception.d.ts +22 -0
- package/build/esm/internal.exception.js +61 -0
- package/build/esm/internal.exception.js.map +1 -0
- package/build/esm/main.d.ts +10 -0
- package/build/esm/main.js +11 -0
- package/build/esm/main.js.map +1 -0
- package/build/tsconfig.build.tsbuildinfo +1 -0
- package/build/tsconfig.esm.tsbuildinfo +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ErrorCode } from './error-code.enum';
|
|
2
|
+
export interface BaseError {
|
|
3
|
+
/**
|
|
4
|
+
* message describing this error
|
|
5
|
+
*/
|
|
6
|
+
message: string;
|
|
7
|
+
/**
|
|
8
|
+
* additional details attached to the error
|
|
9
|
+
*/
|
|
10
|
+
details?: object;
|
|
11
|
+
/**
|
|
12
|
+
* platform-internal error code
|
|
13
|
+
*/
|
|
14
|
+
errorCode?: ErrorCode;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-error.interface.js","sourceRoot":"","sources":["../../src/base-error.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ErrorCode } from './error-code.enum';
|
|
2
|
+
import { ErrorPayload } from './error-payload.interface';
|
|
3
|
+
export declare class ClientException extends Error implements ErrorPayload {
|
|
4
|
+
static instanceOf(err: any): err is ClientException;
|
|
5
|
+
response: Response;
|
|
6
|
+
statusCode: number;
|
|
7
|
+
statusText: string;
|
|
8
|
+
errorCode?: ErrorCode;
|
|
9
|
+
cause?: string;
|
|
10
|
+
details?: object;
|
|
11
|
+
constructor(response: Response);
|
|
12
|
+
private extractDetailedError;
|
|
13
|
+
private extractOpaqueError;
|
|
14
|
+
getCause(): string | undefined;
|
|
15
|
+
build(): Promise<this>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export class ClientException extends Error {
|
|
2
|
+
constructor(response) {
|
|
3
|
+
super();
|
|
4
|
+
this.name = this.constructor.name;
|
|
5
|
+
this.response = response.clone();
|
|
6
|
+
this.statusCode = response.status;
|
|
7
|
+
this.statusText = response.statusText;
|
|
8
|
+
}
|
|
9
|
+
static instanceOf(err) {
|
|
10
|
+
return err instanceof ClientException;
|
|
11
|
+
}
|
|
12
|
+
extractDetailedError(body) {
|
|
13
|
+
this.message = body.message || this.response.statusText;
|
|
14
|
+
if (body.cause)
|
|
15
|
+
this.cause = body.cause;
|
|
16
|
+
if (body.details)
|
|
17
|
+
this.details = body.details;
|
|
18
|
+
if (body.errorCode)
|
|
19
|
+
this.errorCode = body.errorCode;
|
|
20
|
+
}
|
|
21
|
+
extractOpaqueError(text) {
|
|
22
|
+
this.message = text || this.response.statusText;
|
|
23
|
+
}
|
|
24
|
+
getCause() {
|
|
25
|
+
return this.cause;
|
|
26
|
+
}
|
|
27
|
+
async build() {
|
|
28
|
+
const text = await this.response.text();
|
|
29
|
+
try {
|
|
30
|
+
this.extractDetailedError(JSON.parse(text));
|
|
31
|
+
}
|
|
32
|
+
catch (_a) {
|
|
33
|
+
this.extractOpaqueError(text);
|
|
34
|
+
}
|
|
35
|
+
return this;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=client.exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.exception.js","sourceRoot":"","sources":["../../src/client.exception.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAiBxC,YAAY,QAAkB;QAC5B,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;QAClC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAC;QACjC,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC;QAClC,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;IACxC,CAAC;IAtBM,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC/B,OAAO,GAAG,YAAY,eAAe,CAAC;IACxC,CAAC;IAsBO,oBAAoB,CAAC,IAA2B;QACtD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC;QACxD,IAAI,IAAI,CAAC,KAAK;YAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACxC,IAAI,IAAI,CAAC,OAAO;YAAE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC9C,IAAI,IAAI,CAAC,SAAS;YAAE,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;IACtD,CAAC;IAEO,kBAAkB,CAAC,IAAY;QACrC,IAAI,CAAC,OAAO,GAAG,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC;IAClD,CAAC;IAEM,QAAQ;QACb,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAEM,KAAK,CAAC,KAAK;QAChB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QAExC,IAAI;YACF,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;SAC7C;QAAC,WAAM;YACN,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;SAC/B;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-code.enum.js","sourceRoot":"","sources":["../../src/error-code.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,SAAY;AAAxB,WAAY,SAAS;AAAE,CAAC,EAAZ,SAAS,KAAT,SAAS,QAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-message.interface.js","sourceRoot":"","sources":["../../src/error-message.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseError } from './base-error.interface';
|
|
2
|
+
export interface ErrorPayload extends BaseError {
|
|
3
|
+
/**
|
|
4
|
+
* standard HTTP status code
|
|
5
|
+
*/
|
|
6
|
+
statusCode: number;
|
|
7
|
+
/**
|
|
8
|
+
* textual representation of HTTP status code
|
|
9
|
+
*/
|
|
10
|
+
statusText: string;
|
|
11
|
+
/**
|
|
12
|
+
* message from the internal error that caused the error response
|
|
13
|
+
*/
|
|
14
|
+
cause?: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-payload.interface.js","sourceRoot":"","sources":["../../src/error-payload.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const BadRequestException: import("./utils").HTTPExceptionClass;
|
|
2
|
+
export declare const UnauthorizedException: import("./utils").HTTPExceptionClass;
|
|
3
|
+
export declare const PaymentRequiredException: import("./utils").HTTPExceptionClass;
|
|
4
|
+
export declare const ForbiddenException: import("./utils").HTTPExceptionClass;
|
|
5
|
+
export declare const NotFoundException: import("./utils").HTTPExceptionClass;
|
|
6
|
+
export declare const MethodNotAllowedException: import("./utils").HTTPExceptionClass;
|
|
7
|
+
export declare const NotAcceptableException: import("./utils").HTTPExceptionClass;
|
|
8
|
+
export declare const ProxyAuthenticationRequiredException: import("./utils").HTTPExceptionClass;
|
|
9
|
+
export declare const RequestTimeoutException: import("./utils").HTTPExceptionClass;
|
|
10
|
+
export declare const ConflictException: import("./utils").HTTPExceptionClass;
|
|
11
|
+
export declare const GoneException: import("./utils").HTTPExceptionClass;
|
|
12
|
+
export declare const LengthRequiredException: import("./utils").HTTPExceptionClass;
|
|
13
|
+
export declare const PreconditionFailedException: import("./utils").HTTPExceptionClass;
|
|
14
|
+
export declare const PayloadTooLargeException: import("./utils").HTTPExceptionClass;
|
|
15
|
+
export declare const URITooLongException: import("./utils").HTTPExceptionClass;
|
|
16
|
+
export declare const UnsupportedMediaTypeException: import("./utils").HTTPExceptionClass;
|
|
17
|
+
export declare const RangeNotSatisfiableException: import("./utils").HTTPExceptionClass;
|
|
18
|
+
export declare const ExpectationFailedException: import("./utils").HTTPExceptionClass;
|
|
19
|
+
export declare const ImATeapotException: import("./utils").HTTPExceptionClass;
|
|
20
|
+
export declare const MisdirectedRequestException: import("./utils").HTTPExceptionClass;
|
|
21
|
+
export declare const UnprocessableEntityException: import("./utils").HTTPExceptionClass;
|
|
22
|
+
export declare const LockedException: import("./utils").HTTPExceptionClass;
|
|
23
|
+
export declare const FailedDependencyException: import("./utils").HTTPExceptionClass;
|
|
24
|
+
export declare const TooEarlyException: import("./utils").HTTPExceptionClass;
|
|
25
|
+
export declare const UpgradeRequiredException: import("./utils").HTTPExceptionClass;
|
|
26
|
+
export declare const PreconditionRequiredException: import("./utils").HTTPExceptionClass;
|
|
27
|
+
export declare const TooManyRequestsException: import("./utils").HTTPExceptionClass;
|
|
28
|
+
export declare const RequestHeaderFieldsTooLargeException: import("./utils").HTTPExceptionClass;
|
|
29
|
+
export declare const UnavailableForLegalReasonsException: import("./utils").HTTPExceptionClass;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { HTTPStatus } from './http-status.enum';
|
|
2
|
+
import { createHTTPException } from './utils';
|
|
3
|
+
export const BadRequestException = createHTTPException(HTTPStatus.BAD_REQUEST, 'Bad Request');
|
|
4
|
+
export const UnauthorizedException = createHTTPException(HTTPStatus.UNAUTHORIZED, 'Unauthorized');
|
|
5
|
+
export const PaymentRequiredException = createHTTPException(HTTPStatus.PAYMENT_REQUIRED, 'Payment Required');
|
|
6
|
+
export const ForbiddenException = createHTTPException(HTTPStatus.FORBIDDEN, 'Forbidden');
|
|
7
|
+
export const NotFoundException = createHTTPException(HTTPStatus.NOT_FOUND, 'Not Found');
|
|
8
|
+
export const MethodNotAllowedException = createHTTPException(HTTPStatus.METHOD_NOT_ALLOWED, 'Method Not Allowed');
|
|
9
|
+
export const NotAcceptableException = createHTTPException(HTTPStatus.NOT_ACCEPTABLE, 'Not Acceptable');
|
|
10
|
+
export const ProxyAuthenticationRequiredException = createHTTPException(HTTPStatus.PROXY_AUTHENTICATION_REQUIRED, 'Proxy Authentication Required');
|
|
11
|
+
export const RequestTimeoutException = createHTTPException(HTTPStatus.REQUEST_TIMEOUT, 'Request Timeout');
|
|
12
|
+
export const ConflictException = createHTTPException(HTTPStatus.CONFLICT, 'Conflict');
|
|
13
|
+
export const GoneException = createHTTPException(HTTPStatus.GONE, 'Gone');
|
|
14
|
+
export const LengthRequiredException = createHTTPException(HTTPStatus.LENGTH_REQUIRED, 'Length Required');
|
|
15
|
+
export const PreconditionFailedException = createHTTPException(HTTPStatus.PRECONDITION_FAILED, 'Precondition Failed');
|
|
16
|
+
export const PayloadTooLargeException = createHTTPException(HTTPStatus.PAYLOAD_TOO_LARGE, 'Payload Too Large');
|
|
17
|
+
export const URITooLongException = createHTTPException(HTTPStatus.URI_TOO_LONG, 'URI Too Long');
|
|
18
|
+
export const UnsupportedMediaTypeException = createHTTPException(HTTPStatus.UNSUPPORTED_MEDIA_TYPE, 'Unsupported Media Type');
|
|
19
|
+
export const RangeNotSatisfiableException = createHTTPException(HTTPStatus.RANGE_NOT_SATISFIABLE, 'Range Not Satisfiable');
|
|
20
|
+
export const ExpectationFailedException = createHTTPException(HTTPStatus.EXPECTATION_FAILED, 'Expectation Failed');
|
|
21
|
+
export const ImATeapotException = createHTTPException(HTTPStatus.I_AM_A_TEAPOT, "I'm a teapot");
|
|
22
|
+
export const MisdirectedRequestException = createHTTPException(HTTPStatus.MISDIRECTED_REQUEST, 'Misdirected Request');
|
|
23
|
+
export const UnprocessableEntityException = createHTTPException(HTTPStatus.UNPROCESSABLE_ENTITY, 'Unprocessable Entity');
|
|
24
|
+
export const LockedException = createHTTPException(HTTPStatus.LOCKED, 'Locked');
|
|
25
|
+
export const FailedDependencyException = createHTTPException(HTTPStatus.FAILED_DEPENDENCY, 'Failed Dependency');
|
|
26
|
+
export const TooEarlyException = createHTTPException(HTTPStatus.TOO_EARLY, 'Too Early');
|
|
27
|
+
export const UpgradeRequiredException = createHTTPException(HTTPStatus.UPGRADE_REQUIRED, 'Upgrade Required');
|
|
28
|
+
export const PreconditionRequiredException = createHTTPException(HTTPStatus.PRECONDITION_REQUIRED, 'Precondition Required');
|
|
29
|
+
export const TooManyRequestsException = createHTTPException(HTTPStatus.TOO_MANY_REQUESTS, 'Too Many Requests');
|
|
30
|
+
export const RequestHeaderFieldsTooLargeException = createHTTPException(HTTPStatus.REQUEST_HEADER_FIELDS_TOO_LARGE, 'Request Header Fields Too Large');
|
|
31
|
+
export const UnavailableForLegalReasonsException = createHTTPException(HTTPStatus.UNAVAILABLE_FOR_LEGAL_REASONS, 'Unavailable For Legal Reasons');
|
|
32
|
+
//# sourceMappingURL=http-4xx.exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-4xx.exception.js","sourceRoot":"","sources":["../../../src/http/http-4xx.exception.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,UAAU,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;AAC9F,MAAM,CAAC,MAAM,qBAAqB,GAAG,mBAAmB,CAAC,UAAU,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;AAClG,MAAM,CAAC,MAAM,wBAAwB,GAAG,mBAAmB,CAAC,UAAU,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAAC;AAC7G,MAAM,CAAC,MAAM,kBAAkB,GAAG,mBAAmB,CAAC,UAAU,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AACzF,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,UAAU,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AACxF,MAAM,CAAC,MAAM,yBAAyB,GAAG,mBAAmB,CAAC,UAAU,CAAC,kBAAkB,EAAE,oBAAoB,CAAC,CAAC;AAClH,MAAM,CAAC,MAAM,sBAAsB,GAAG,mBAAmB,CAAC,UAAU,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;AACvG,MAAM,CAAC,MAAM,oCAAoC,GAAG,mBAAmB,CAAC,UAAU,CAAC,6BAA6B,EAAE,+BAA+B,CAAC,CAAC;AACnJ,MAAM,CAAC,MAAM,uBAAuB,GAAG,mBAAmB,CAAC,UAAU,CAAC,eAAe,EAAE,iBAAiB,CAAC,CAAC;A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UAAU,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAChF,MAAM,CAAC,MAAM,yBAAyB,GAAG,mBAAmB,CAAC,UAAU,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAAC;AAChH,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,UAAU,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AACxF,MAAM,CAAC,MAAM,wBAAwB,GAAG,mBAAmB,CAAC,UAAU,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAAC;AAC7G,MAAM,CAAC,MAAM,6BAA6B,GAAG,mBAAmB,CAAC,UAAU,CAAC,qBAAqB,EAAE,uBAAuB,CAAC,CAAC;AAC5H,MAAM,CAAC,MAAM,wBAAwB,GAAG,mBAAmB,CAAC,UAAU,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAAC;AAC/G,MAAM,CAAC,MAAM,oCAAoC,GAAG,mBAAmB,CACrE,UAAU,CAAC,+BAA+B,EAC1C,iCAAiC,CAClC,CAAC;AACF,MAAM,CAAC,MAAM,mCAAmC,GAAG,mBAAmB,CAAC,UAAU,CAAC,6BAA6B,EAAE,+BAA+B,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const InternalServerErrorException: import("./utils").HTTPExceptionClass;
|
|
2
|
+
export declare const NotImplementedException: import("./utils").HTTPExceptionClass;
|
|
3
|
+
export declare const BadGatewayException: import("./utils").HTTPExceptionClass;
|
|
4
|
+
export declare const ServiceUnavailableException: import("./utils").HTTPExceptionClass;
|
|
5
|
+
export declare const GatewayTimeoutException: import("./utils").HTTPExceptionClass;
|
|
6
|
+
export declare const HTTPVersionNotSupportedException: import("./utils").HTTPExceptionClass;
|
|
7
|
+
export declare const VariantAlsoNegotiatesException: import("./utils").HTTPExceptionClass;
|
|
8
|
+
export declare const InsufficientStorageException: import("./utils").HTTPExceptionClass;
|
|
9
|
+
export declare const LoopDetectedException: import("./utils").HTTPExceptionClass;
|
|
10
|
+
export declare const NotExtendedException: import("./utils").HTTPExceptionClass;
|
|
11
|
+
export declare const NetworkAuthenticationRequiredException: import("./utils").HTTPExceptionClass;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HTTPStatus } from './http-status.enum';
|
|
2
|
+
import { createHTTPException } from './utils';
|
|
3
|
+
export const InternalServerErrorException = createHTTPException(HTTPStatus.INTERNAL_SERVER_ERROR, 'Internal Server Error');
|
|
4
|
+
export const NotImplementedException = createHTTPException(HTTPStatus.NOT_IMPLEMENTED, 'Not Implemented');
|
|
5
|
+
export const BadGatewayException = createHTTPException(HTTPStatus.BAD_GATEWAY, 'Bad Gateway');
|
|
6
|
+
export const ServiceUnavailableException = createHTTPException(HTTPStatus.SERVICE_UNAVAILABLE, 'Service Unavailable');
|
|
7
|
+
export const GatewayTimeoutException = createHTTPException(HTTPStatus.GATEWAY_TIMEOUT, 'Gateway Timeout');
|
|
8
|
+
export const HTTPVersionNotSupportedException = createHTTPException(HTTPStatus.HTTP_VERSION_NOT_SUPPORTED, 'HTTP Version Not Supported');
|
|
9
|
+
export const VariantAlsoNegotiatesException = createHTTPException(HTTPStatus.VARIANT_ALSO_NEGOTIATES, 'Variant Also Negotiates');
|
|
10
|
+
export const InsufficientStorageException = createHTTPException(HTTPStatus.INSUFFICIENT_STORAGE, 'Insufficient Storage');
|
|
11
|
+
export const LoopDetectedException = createHTTPException(HTTPStatus.LOOP_DETECTED, 'Loop Detected');
|
|
12
|
+
export const NotExtendedException = createHTTPException(HTTPStatus.NOT_EXTENDED, 'Not Extended');
|
|
13
|
+
export const NetworkAuthenticationRequiredException = createHTTPException(HTTPStatus.NETWORK_AUTHENTICATION_REQUIRED, 'Network Authentication Required');
|
|
14
|
+
//# sourceMappingURL=http-5xx.exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-5xx.exception.js","sourceRoot":"","sources":["../../../src/http/http-5xx.exception.ts"],"names":[],"mappings":"AAAA,OAA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us {
|
|
2
|
+
BAD_REQUEST = 400,
|
|
3
|
+
UNAUTHORIZED = 401,
|
|
4
|
+
PAYMENT_REQUIRED = 402,
|
|
5
|
+
FORBIDDEN = 403,
|
|
6
|
+
NOT_FOUND = 404,
|
|
7
|
+
METHOD_NOT_ALLOWED = 405,
|
|
8
|
+
NOT_ACCEPTABLE = 406,
|
|
9
|
+
PROXY_AUTHENTICATION_REQUIRED = 407,
|
|
10
|
+
REQUEST_TIMEOUT = 408,
|
|
11
|
+
CONFLICT = 409,
|
|
12
|
+
GONE = 410,
|
|
13
|
+
LENGTH_REQUIRED = 411,
|
|
14
|
+
PRECONDITION_FAILED = 412,
|
|
15
|
+
PAYLOAD_TOO_LARGE = 413,
|
|
16
|
+
URI_TOO_LONG = 414,
|
|
17
|
+
UNSUPPORTED_MEDIA_TYPE = 415,
|
|
18
|
+
RANGE_NOT_SATISFIABLE = 416,
|
|
19
|
+
EXPECTATION_FAILED = 417,
|
|
20
|
+
I_AM_A_TEAPOT = 418,
|
|
21
|
+
MISDIRECTED_REQUEST = 421,
|
|
22
|
+
UNPROCESSABLE_ENTITY = 422,
|
|
23
|
+
LOCKED = 423,
|
|
24
|
+
FAILED_DEPENDENCY = 424,
|
|
25
|
+
TOO_EARLY = 425,
|
|
26
|
+
UPGRADE_REQUIRED = 426,
|
|
27
|
+
PRECONDITION_REQUIRED = 428,
|
|
28
|
+
TOO_MANY_REQUESTS = 429,
|
|
29
|
+
REQUEST_HEADER_FIELDS_TOO_LARGE = 431,
|
|
30
|
+
UNAVAILABLE_FOR_LEGAL_REASONS = 451,
|
|
31
|
+
INTERNAL_SERVER_ERROR = 500,
|
|
32
|
+
NOT_IMPLEMENTED = 501,
|
|
33
|
+
BAD_GATEWAY = 502,
|
|
34
|
+
SERVICE_UNAVAILABLE = 503,
|
|
35
|
+
GATEWAY_TIMEOUT = 504,
|
|
36
|
+
HTTP_VERSION_NOT_SUPPORTED = 505,
|
|
37
|
+
VARIANT_ALSO_NEGOTIATES = 506,
|
|
38
|
+
INSUFFICIENT_STORAGE = 507,
|
|
39
|
+
LOOP_DETECTED = 508,
|
|
40
|
+
NOT_EXTENDED = 510,
|
|
41
|
+
NETWORK_AUTHENTICATION_REQUIRED = 511
|
|
42
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export var HTTPStatus;
|
|
2
|
+
(function (HTTPStatus) {
|
|
3
|
+
/* 4xx */
|
|
4
|
+
HTTPStatus[HTTPStatus["BAD_REQUEST"] = 400] = "BAD_REQUEST";
|
|
5
|
+
HTTPStatus[HTTPStatus["UNAUTHORIZED"] = 401] = "UNAUTHORIZED";
|
|
6
|
+
HTTPStatus[HTTPStatus["PAYMENT_REQUIRED"] = 402] = "PAYMENT_REQUIRED";
|
|
7
|
+
HTTPStatus[HTTPStatus["FORBIDDEN"] = 403] = "FORBIDDEN";
|
|
8
|
+
HTTPStatus[HTTPStatus["NOT_FOUND"] = 404] = "NOT_FOUND";
|
|
9
|
+
HTTPStatus[HTTPStatus["METHOD_NOT_ALLOWED"] = 405] = "METHOD_NOT_ALLOWED";
|
|
10
|
+
HTTPStatus[HTTPStatus["NOT_ACCEPTABLE"] = 406] = "NOT_ACCEPTABLE";
|
|
11
|
+
HTTPStatus[HTTPStatus["PROXY_AUTHENTICATION_REQUIRED"] = 407] = "PROXY_AUTHENTICATION_REQUIRED";
|
|
12
|
+
HTTPStatus[HTTPStatus["REQUEST_TIMEOUT"] = 408] = "REQUEST_TIMEOUT";
|
|
13
|
+
HTTPStatus[HTTPStatus["CONFLICT"] = 409] = "CONFLICT";
|
|
14
|
+
HTTPStatus[HTTPStatus["GONE"] = 410] = "GONE";
|
|
15
|
+
HTTPStatus[HTTPStatus["LENGTH_REQUIRED"] = 411] = "LENGTH_REQUIRED";
|
|
16
|
+
HTTPStatus[HTTPStatus["PRECONDITION_FAILED"] = 412] = "PRECONDITION_FAILED";
|
|
17
|
+
HTTPStatus[HTTPStatus["PAYLOAD_TOO_LARGE"] = 413] = "PAYLOAD_TOO_LARGE";
|
|
18
|
+
HTTPStatus[HTTPStatus["URI_TOO_LONG"] = 414] = "URI_TOO_LONG";
|
|
19
|
+
HTTPStatus[HTTPStatus["UNSUPPORTED_MEDIA_TYPE"] = 415] = "UNSUPPORTED_MEDIA_TYPE";
|
|
20
|
+
HTTPStatus[HTTPStatus["RANGE_NOT_SATISFIABLE"] = 416] = "RANGE_NOT_SATISFIABLE";
|
|
21
|
+
HTTPStatus[HTTPStatus["EXPECTATION_FAILED"] = 417] = "EXPECTATION_FAILED";
|
|
22
|
+
HTTPStatus[HTTPStatus["I_AM_A_TEAPOT"] = 418] = "I_AM_A_TEAPOT";
|
|
23
|
+
HTTPStatus[HTTPStatus["MISDIRECTED_REQUEST"] = 421] = "MISDIRECTED_REQUEST";
|
|
24
|
+
HTTPStatus[HTTPStatus["UNPROCESSABLE_ENTITY"] = 422] = "UNPROCESSABLE_ENTITY";
|
|
25
|
+
HTTPStatus[HTTPStatus["LOCKED"] = 423] = "LOCKED";
|
|
26
|
+
HTTPStatus[HTTPStatus["FAILED_DEPENDENCY"] = 424] = "FAILED_DEPENDENCY";
|
|
27
|
+
HTTPStatus[HTTPStatus["TOO_EARLY"] = 425] = "TOO_EARLY";
|
|
28
|
+
HTTPStatus[HTTPStatus["UPGRADE_REQUIRED"] = 426] = "UPGRADE_REQUIRED";
|
|
29
|
+
HTTPStatus[HTTPStatus["PRECONDITION_REQUIRED"] = 428] = "PRECONDITION_REQUIRED";
|
|
30
|
+
HTTPStatus[HTTPStatus["TOO_MANY_REQUESTS"] = 429] = "TOO_MANY_REQUESTS";
|
|
31
|
+
HTTPStatus[HTTPStatus["REQUEST_HEADER_FIELDS_TOO_LARGE"] = 431] = "REQUEST_HEADER_FIELDS_TOO_LARGE";
|
|
32
|
+
HTTPStatus[HTTPStatus["UNAVAILABLE_FOR_LEGAL_REASONS"] = 451] = "UNAVAILABLE_FOR_LEGAL_REASONS";
|
|
33
|
+
/* 5xx */
|
|
34
|
+
HTTPStatus[HTTPStatus["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR";
|
|
35
|
+
HTTPStatus[HTTPStatus["NOT_IMPLEMENTED"] = 501] = "NOT_IMPLEMENTED";
|
|
36
|
+
HTTPStatus[HTTPStatus["BAD_GATEWAY"] = 502] = "BAD_GATEWAY";
|
|
37
|
+
HTTPStatus[HTTPStatus["SERVICE_UNAVAILABLE"] = 503] = "SERVICE_UNAVAILABLE";
|
|
38
|
+
HTTPStatus[HTTPStatus["GATEWAY_TIMEOUT"] = 504] = "GATEWAY_TIMEOUT";
|
|
39
|
+
HTTPStatus[HTTPStatus["HTTP_VERSION_NOT_SUPPORTED"] = 505] = "HTTP_VERSION_NOT_SUPPORTED";
|
|
40
|
+
HTTPStatus[HTTPStatus["VARIANT_ALSO_NEGOTIATES"] = 506] = "VARIANT_ALSO_NEGOTIATES";
|
|
41
|
+
HTTPStatus[HTTPStatus["INSUFFICIENT_STORAGE"] = 507] = "INSUFFICIENT_STORAGE";
|
|
42
|
+
HTTPStatus[HTTPStatus["LOOP_DETECTED"] = 508] = "LOOP_DETECTED";
|
|
43
|
+
HTTPStatus[HTTPStatus["NOT_EXTENDED"] = 510] = "NOT_EXTENDED";
|
|
44
|
+
HTTPStatus[HTTPStatus["NETWORK_AUTHENTICATION_REQUIRED"] = 511] = "NETWORK_AUTHENTICATION_REQUIRED";
|
|
45
|
+
})(HTTPStatus || (HTTPStatus = {}));
|
|
46
|
+
//# sourceMappingURL=http-status.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-status.enum.js","sourceRoot":"","sources":["../../../src/http/http-status.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,UA4CX;AA5CD,WAAY,UAAU;IACpB,SAAS;IACT,2DAAiB,CAAA;IACjB,6DAAkB,CAAA;IAClB,qEAAsB,CAAA;IACtB,uDAAe,CAAA;IACf,uDAAe,CAAA;IACf,yEAAwB,CAAA;IACxB,iEAAoB,CAAA;IACpB,+FAAmC,CAAA;IACnC,mEAAqB,CAAA;IACrB,qDAAc,CAAA;IACd,6CAAU,CAAA;IACV,mEAAqB,CAAA;IACrB,2EAAyB,CAAA;IACzB,uEAAuB,CAAA;IACvB,6DAAkB,CAAA;IAClB,iFAA4B,CAAA;IAC5B,+EAA2B,CAAA;IAC3B,yEAAwB,CAAA;IACxB,+DAAmB,CAAA;IACnB,2EAAyB,CAAA;IACzB,6EAA0B,CAAA;IAC1B,iDAAY,CAAA;IACZ,uEAAuB,CAAA;IACvB,uDAAe,CAAA;IACf,qEAAsB,CAAA;IACtB,+EAA2B,CAAA;IAC3B,uEAAuB,CAAA;IACvB,mGAAqC,CAAA;IACrC,+FAAmC,CAAA;IAEnC,SAAS;IACT,+EAA2B,CAAA;IAC3B,mEAAqB,CAAA;IACrB,2DAAiB,CAAA;IACjB,2EAAyB,CAAA;IACzB,mEAAqB,CAAA;IACrB,yFAAgC,CAAA;IAChC,mFAA6B,CAAA;IAC7B,6EAA0B,CAAA;IAC1B,+DAAmB,CAAA;IACnB,6DAAkB,CAAA;IAClB,mGAAqC,CAAA;AACvC,CAAC,EA5CW,UAAU,KAAV,UAAU,QA4CrB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ErrorMessage } from "../error-message.interface";
|
|
2
|
+
import { ErrorPayload } from "../error-payload.interface";
|
|
3
|
+
import { InternalException } from "../internal.exception";
|
|
4
|
+
export declare class HTTPException extends InternalException {
|
|
5
|
+
static instanceOf(err: any): err is HTTPException;
|
|
6
|
+
statusCode: number;
|
|
7
|
+
statusText: string;
|
|
8
|
+
response: ErrorPayload;
|
|
9
|
+
constructor(statusCode: number, statusText: string, msg?: ErrorMessage);
|
|
10
|
+
createResponse(): ErrorPayload;
|
|
11
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { InternalException } from "../internal.exception";
|
|
2
|
+
export class HTTPException extends InternalException {
|
|
3
|
+
constructor(statusCode, statusText, msg = statusText) {
|
|
4
|
+
super(msg);
|
|
5
|
+
this.message || (this.message = statusText);
|
|
6
|
+
this.statusCode = statusCode;
|
|
7
|
+
this.statusText = statusText;
|
|
8
|
+
this.response = this.createResponse();
|
|
9
|
+
}
|
|
10
|
+
static instanceOf(err) {
|
|
11
|
+
return err instanceof HTTPException;
|
|
12
|
+
}
|
|
13
|
+
createResponse() {
|
|
14
|
+
const cause = this.getCause();
|
|
15
|
+
return Object.assign(Object.assign(Object.assign({ message: this.message, statusCode: this.statusCode, statusText: this.statusText }, (this.details && { details: this.details })), (this.errorCode && { errorCode: this.errorCode })), (cause && { cause }));
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=http.exception.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.exception.js","sourceRoot":"","sources":["../../../src/http/http.exception.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,8BAAsC;AAElE,MAAM,OAAO,aAAc,SAAQ,iBAAiB;IAWlD,YAAY,UAAkB,EAAE,UAAkB,EAAE,MAAoB,UAAU;QAChF,KAAK,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,OAAO,KAAZ,IAAI,CAAC,OAAO,GAAK,UAAU,EAAC;QAC5B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;IACxC,CAAC;IAhBM,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC/B,OAAO,GAAG,YAAY,aAAa,CAAC;IACtC,CAAC;IAgBM,cAAc;QACnB,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;QAE9B,mDACE,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,UAAU,EAAE,IAAI,CAAC,UAAU,IAExB,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,GAC3C,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,GACjD,CAAC,KAAK,IAAI,EAAE,KAAK,EAAE,CAAC,EACvB;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ErrorMessage } from "../error-message.interface";
|
|
2
|
+
import { HTTPException } from './http.exception';
|
|
3
|
+
import { HTTPStatus } from './http-status.enum';
|
|
4
|
+
export interface HTTPExceptionClass {
|
|
5
|
+
new (message?: ErrorMessage): HTTPException;
|
|
6
|
+
}
|
|
7
|
+
export declare const createHTTPException: (statusCode: HTTPStatus, statusText: string) => HTTPExceptionClass;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HTTPException } from './http.exception';
|
|
2
|
+
const WHITESPACE_PATTERN = /\s+/g;
|
|
3
|
+
export const createHTTPException = (statusCode, statusText) => {
|
|
4
|
+
class NamedHTTPException extends HTTPException {
|
|
5
|
+
constructor(message) {
|
|
6
|
+
super(statusCode, statusText, message);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(NamedHTTPException, 'name', { value: `${statusText.replace(WHITESPACE_PATTERN, '')}Exception` });
|
|
10
|
+
return NamedHTTPException;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/http/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAMlC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,UAAsB,EAAE,UAAkB,EAAsB,EAAE;IACpG,MAAM,kBAAmB,SAAQ,aAAa;QAC5C,YAAY,OAAsB;YAChC,KAAK,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;QACzC,CAAC;KACF;IAED,MAAM,CAAC,cAAc,CAAC,kBAAkB,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;IAEvH,OAAO,kBAAkB,CAAC;AAC5B,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BaseError } from './base-error.interface';
|
|
2
|
+
import { ErrorCode } from './error-code.enum';
|
|
3
|
+
import { ErrorMessage } from './error-message.interface';
|
|
4
|
+
declare type UndefinedPartial<T> = {
|
|
5
|
+
[K in keyof T]?: T[K] | undefined;
|
|
6
|
+
};
|
|
7
|
+
export declare class InternalException extends Error implements BaseError {
|
|
8
|
+
static instanceOf(err: any): err is InternalException;
|
|
9
|
+
static extractData(msg?: ErrorMessage): InternalException.ErrorData;
|
|
10
|
+
name: string;
|
|
11
|
+
cause?: string | Error;
|
|
12
|
+
errorCode?: ErrorCode;
|
|
13
|
+
details?: object;
|
|
14
|
+
constructor(msg?: ErrorMessage);
|
|
15
|
+
getCause(): string | undefined;
|
|
16
|
+
}
|
|
17
|
+
export declare namespace InternalException {
|
|
18
|
+
interface ErrorData extends UndefinedPartial<BaseError> {
|
|
19
|
+
cause?: string | Error | undefined;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { ClientException } from './client.exception';
|
|
2
|
+
const isObject = (value) => !!value && typeof value === 'object';
|
|
3
|
+
const hasProperty = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key);
|
|
4
|
+
const isErrorLike = (error) => isObject(error) && hasProperty(error, 'message') && typeof error.message === 'string';
|
|
5
|
+
export class InternalException extends Error {
|
|
6
|
+
constructor(msg) {
|
|
7
|
+
const data = InternalException.extractData(msg);
|
|
8
|
+
super(data.message);
|
|
9
|
+
this.name = this.constructor.name;
|
|
10
|
+
if (data.details)
|
|
11
|
+
this.details = data.details;
|
|
12
|
+
if (data.errorCode)
|
|
13
|
+
this.errorCode = data.errorCode;
|
|
14
|
+
if (data.cause)
|
|
15
|
+
this.cause = data.cause;
|
|
16
|
+
}
|
|
17
|
+
static instanceOf(err) {
|
|
18
|
+
return err instanceof InternalException;
|
|
19
|
+
}
|
|
20
|
+
static extractData(msg) {
|
|
21
|
+
let message;
|
|
22
|
+
let errorCode;
|
|
23
|
+
let details;
|
|
24
|
+
let cause;
|
|
25
|
+
if (typeof msg === 'string') {
|
|
26
|
+
message = msg;
|
|
27
|
+
}
|
|
28
|
+
else if (msg instanceof Error) {
|
|
29
|
+
cause = msg;
|
|
30
|
+
if (InternalException.instanceOf(msg) || ClientException.instanceOf(msg)) {
|
|
31
|
+
details = msg.details;
|
|
32
|
+
errorCode = msg.errorCode;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
else if (msg && typeof msg === 'object') {
|
|
36
|
+
message = msg.message;
|
|
37
|
+
details = msg.details;
|
|
38
|
+
errorCode = msg.errorCode;
|
|
39
|
+
if (msg.cause instanceof Error || typeof msg.cause === 'string') {
|
|
40
|
+
cause = msg.cause;
|
|
41
|
+
}
|
|
42
|
+
else if (isErrorLike(msg.cause)) {
|
|
43
|
+
cause = msg.cause.message;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
message,
|
|
48
|
+
details,
|
|
49
|
+
errorCode,
|
|
50
|
+
cause,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
getCause() {
|
|
54
|
+
if (typeof this.cause === 'string')
|
|
55
|
+
return this.cause;
|
|
56
|
+
if (this.cause instanceof Error)
|
|
57
|
+
return this.cause.message;
|
|
58
|
+
return undefined;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=internal.exception.js.map
|
|
@@ -0,0 +1 @@
|
|
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* from './client.exception';
|
|
3
|
+
export * from './error-code.enum';
|
|
4
|
+
export * from './error-message.interface';
|
|
5
|
+
export * from './error-payload.interface';
|
|
6
|
+
export * from './http/http.exception';
|
|
7
|
+
export * from './http/http-4xx.exception';
|
|
8
|
+
export * from './http/http-5xx.exception';
|
|
9
|
+
export * from './http/http-status.enum';
|
|
10
|
+
export * from './internal.exception';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './base-error.interface';
|
|
2
|
+
export * from './client.exception';
|
|
3
|
+
export * from './error-code.enum';
|
|
4
|
+
export * from './error-message.interface';
|
|
5
|
+
export * from './error-payload.interface';
|
|
6
|
+
export * from './http/http.exception';
|
|
7
|
+
export * from './http/http-4xx.exception';
|
|
8
|
+
export * from './http/http-5xx.exception';
|
|
9
|
+
export * from './http/http-status.enum';
|
|
10
|
+
export * from './internal.exception';
|
|
11
|
+
//# sourceMappingURL=main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../src/error-code.enum.ts","../src/base-error.interface.ts","../src/error-payload.interface.ts","../src/client.exception.ts","../src/error-message.interface.ts","../src/internal.exception.ts","../src/http/http.exception.ts","../src/http/http-status.enum.ts","../src/http/utils.ts","../src/http/http-4xx.exception.ts","../src/http/http-5xx.exception.ts","../src/main.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/globals.global.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@types/connect/index.d.ts","../../../node_modules/@types/body-parser/index.d.ts","../../../node_modules/@types/chai/index.d.ts","../../../node_modules/@types/chai-as-promised/index.d.ts","../../../node_modules/@types/crypto-js/index.d.ts","../../../node_modules/@types/range-parser/index.d.ts","../../../node_modules/@types/qs/index.d.ts","../../../node_modules/@types/express-serve-static-core/index.d.ts","../../../node_modules/@types/mime/index.d.ts","../../../node_modules/@types/serve-static/index.d.ts","../../../node_modules/@types/express/index.d.ts","../../../node_modules/@types/ioredis/index.d.ts","../../../node_modules/@types/json-schema/index.d.ts","../../../node_modules/@types/json5/index.d.ts","../../../node_modules/@types/jsonwebtoken/index.d.ts","../../../node_modules/@types/lodash/common/common.d.ts","../../../node_modules/@types/lodash/common/array.d.ts","../../../node_modules/@types/lodash/common/collection.d.ts","../../../node_modules/@types/lodash/common/date.d.ts","../../../node_modules/@types/lodash/common/function.d.ts","../../../node_modules/@types/lodash/common/lang.d.ts","../../../node_modules/@types/lodash/common/math.d.ts","../../../node_modules/@types/lodash/common/number.d.ts","../../../node_modules/@types/lodash/common/object.d.ts","../../../node_modules/@types/lodash/common/seq.d.ts","../../../node_modules/@types/lodash/common/string.d.ts","../../../node_modules/@types/lodash/common/util.d.ts","../../../node_modules/@types/lodash/index.d.ts","../../../node_modules/@types/minimatch/index.d.ts","../../../node_modules/@types/minimist/index.d.ts","../../../node_modules/@types/mocha/index.d.ts","../../../node_modules/@types/normalize-package-data/index.d.ts","../../../node_modules/@types/number-to-words/index.d.ts","../../../node_modules/@types/parse-json/index.d.ts","../../../node_modules/@types/shallowequal/index.d.ts","../../../node_modules/@sinonjs/fake-timers/types/fake-timers-src.d.ts","../../../node_modules/@types/sinon/index.d.ts","../../../node_modules/@types/webidl-conversions/index.d.ts","../../../node_modules/@types/whatwg-url/index.d.ts"],"fileInfos":[{"version":"f5c28122bee592cfaf5c72ed7bcc47f453b79778ffa6e301f45d21a0970719d4","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"3f149f903dd20dfeb7c80e228b659f0e436532de772469980dbd00702cc05cc1","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"cd483c056da900716879771893a3c9772b66c3c88f8943b4205aec738a94b1d0","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"c37f8a49593a0030eecb51bbfa270e709bec9d79a6cc3bb851ef348d4e6b26f8","affectsGlobalScope":true},{"version":"516b78158cf94228b6fd8549d890cc241f2e6180d96d20240b0988454fd5ced3","signature":"f853e563de2c619d217bb40868a04c0c52153beddef1afc178ad6d666152f96e"},{"version":"563afd7b1b25afacc4291e9cd5905374761e0dc8353737ec92b10f6fb0c4b44c","signature":"c752db562fa5ed587768ea35eb56551a08d88b4877ef2d6a4daae8a3f3267756"},{"version":"5f6b3cb8ee68ad95dbad63ae89ef2ac7a5b03bafe9b3c799d7c811d87a9c1370","signature":"55119d1ee3853bd5eb045bd8ef7acdfca802c0adddf62277b27757252bf8a874"},{"version":"9fd77758bf8a1c1463915ddb89917a97f449c633f53654f8d2cb2e1458ace8cc","signature":"de80c9881ce2a1db0fe0d72c9a432554af09a2f9320dd3c2097cb206541057c5"},{"version":"fc309f774bf060a937cba3aebe238a31db53951aa919ac558095e673d9cd54cf","signature":"e894e8917f9c6648bde6bcab721b6a057615719b0b3525e4098f7c8ef3e89419"},{"version":"fc0fc193f6f2fc8122e8101dca7ed54f09814e9e168fe15e7e9d32910977d43c","signature":"894a7a9b637dfa6fff80d33e9d403e38b52e655c421fd14d3d4c3e2e52aaf21e"},{"version":"0efcfb43f4f22bd3f2858ecb3fa13a233bd49e78450b7609b330f865100534ad","signature":"7b4081bca7861866c091f64497fac7941eb904af5643281947eb2851e363e881"},{"version":"1335138db80848f6141b853456a867b5352f286c3a5d726ca7a450b590763301","signature":"123e6dc03ac2b52def63a9be9f7bbd8d7ea3bd60bcebe8c252b71b04fed4b084"},{"version":"ec1d66251de2f4c7c4cc1e8c3f181a4e8824b2aa4977e17f6195ea02d8f278fb","signature":"08595f5fb6864cf242f74eba889071a3c865ffdef571af84f21956bc59c7842b"},{"version":"55f90ba909cb2189a00ba860c905442a5294d99fde7258d09192f907ab3349c5","signature":"7506e9f8faecbbcc378c9b4952e6ee366883b4d0e5012eeac39783ccd99a1c7a"},{"version":"64ba667d8c0b55f738afb4cba63f134e83a17833d0383b6b26e7e778fb9062f5","signature":"9ad71c94c43027ebda91d5db986823cbe275286689162519f2f2d1ba0342ed1a"},"15c8d6ce1e4899ae4fce7140139d8427bb3bccadffb6592a9391a57129b62e9d","0d5a2ee1fdfa82740e0103389b9efd6bfe145a20018a2da3c02b89666181f4d9","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"92d63add669d18ebc349efbacd88966d6f2ccdddfb1b880b2db98ae3aa7bf7c4","affectsGlobalScope":true},"ccc94049a9841fe47abe5baef6be9a38fc6228807974ae675fb15dc22531b4be",{"version":"9acfe4d1ff027015151ce81d60797b04b52bffe97ad8310bb0ec2e8fd61e1303","affectsGlobalScope":true},"95843d5cfafced8f3f8a5ce57d2335f0bcd361b9483587d12a25e4bd403b8216","afc6e96061af46bcff47246158caee7e056f5288783f2d83d6858cd25be1c565",{"version":"34f5bcac12b36d70304b73de5f5aab3bb91bd9919f984be80579ebcad03a624e","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","2f520601649a893e6a49a8851ebfcf4be8ce090dc1281c2a08a871cb04e8251f","f50c975ab7b50e25a69e3d8a3773894125b44e9698924105f23b812bf7488baf","2b8c764f856a1dd0a9a2bf23e5efddbff157de8138b0754010be561ae5fcaa90","76650408392bf49a8fbf3e2b6b302712a92d76af77b06e2da1cc8077359c4409","0af3121e68297b2247dd331c0d24dba599e50736a7517a5622d5591aae4a3122","6972fca26f6e9bd56197568d4379f99071a90766e06b4fcb5920a0130a9202be",{"version":"4a2628e95962c8ab756121faa3ac2ed348112ff7a87b5c286dd2cc3326546b4c","affectsGlobalScope":true},"80793b2277f31baa199234daed806fff0fb11491d1ebd3357e520c3558063f00","a049a59a02009fc023684fcfaf0ac526fe36c35dcc5d2b7d620c1750ba11b083","b9b963043551b034abd9e7c6d859f7a81d99479fde938d983114d167d0644a78","b287b810b5035d5685f1df6e1e418f1ca452a3ed4f59fd5cc081dbf2045f0d9b","4b9a003b5c556c96784132945bb41c655ea11273b1917f5c8d0c154dd5fd20dd","a458dc78104cc80048ac24fdc02fe6dce254838094c2f25641b3f954d9721241",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"902cd98bf46e95caf4118a0733fb801e9e90eec3edaed6abdad77124afec9ca2","abc1c425b2ad6720433f40f1877abfa4223f0f3dd486c9c28c492179ca183cb6","cd4854d38f4eb5592afd98ab95ca17389a7dfe38013d9079e802d739bdbcc939","94eed4cc2f5f658d5e229ff1ccd38860bddf4233e347bf78edd2154dee1f2b99",{"version":"bd1a08e30569b0fb2f0b21035eb9b039871f68faa9b98accf847e9c878c5e0a9","affectsGlobalScope":true},"9f1069b9e2c051737b1f9b4f1baf50e4a63385a6a89c32235549ae87fc3d5492","ee18f2da7a037c6ceeb112a084e485aead9ea166980bf433474559eac1b46553","29c2706fa0cc49a2bd90c83234da33d08bb9554ecec675e91c1f85087f5a5324","0acbf26bf958f9e80c1ffa587b74749d2697b75b484062d36e103c137c562bc3","d7838022c7dab596357a9604b9c6adffe37dc34085ce0779c958ce9545bd7139","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"a7971f9fb2a32ec7788ec6cda9d7a33c02023dfe9a62db2030ad1359649d8050","c33a6ea7147af60d8e98f1ac127047f4b0d4e2ce28b8f08ff3de07ca7cc00637",{"version":"b42b47e17b8ece2424ae8039feb944c2e3ba4b262986aebd582e51efbdca93dc","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","2408611d9b4146e35d1dbd1f443ccd8e187c74614a54b80300728277529dbf11","998a3de5237518c0b3ac00a11b3b4417affb008aa20aedee52f3fdae3cb86151","ad41008ffe077206e1811fc873f4d9005b5fd7f6ab52bb6118fef600815a5cb4","d88ecca73348e7c337541c4b8b60a50aca5e87384f6b8a422fc6603c637e4c21","badae0df9a8016ac36994b0a0e7b82ba6aaa3528e175a8c3cb161e4683eec03e","c3db860bcaaaeb3bbc23f353bbda1f8ab82756c8d5e973bebb3953cb09ea68f2","235a53595bd20b0b0eeb1a29cb2887c67c48375e92f03749b2488fbd46d0b1a0","bc09393cd4cd13f69cf1366d4236fbae5359bb550f0de4e15767e9a91d63dfb1","9c266243b01545e11d2733a55ad02b4c00ecdbda99c561cd1674f96e89cdc958","c71155c05fc76ff948a4759abc1cb9feec036509f500174bc18dad4c7827a60c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"1cdb8f094b969dcc183745dc88404e2d8fcf2a858c6e7cc2441011476573238e","6d829824ead8999f87b6df21200df3c6150391b894b4e80662caa462bd48d073","afc559c1b93df37c25aef6b3dfa2d64325b0e112e887ee18bf7e6f4ec383fc90",{"version":"c8747693e5872ad5ef3aa016731a06915e1c34dae987829d9aa5bd40c7a2c54b","affectsGlobalScope":true},{"version":"63e2182615c513e89bb8a3e749d08f7c379e86490fcdbf6d35f2c14b3507a6e8","affectsGlobalScope":true},{"version":"f170fd125ed7105ba874e0eb88e83c6b1fb4614bdeeeabef89df883612bd0b79","affectsGlobalScope":true},"16d51f964ec125ad2024cf03f0af444b3bc3ec3614d9345cc54d09bab45c9a4c","ba601641fac98c229ccd4a303f747de376d761babb33229bb7153bed9356c9cc",{"version":"d2f7baf43dfa349d4010cbd9d64d84cdf3ec26c65fa5f44c8f74f052bedd0b49","affectsGlobalScope":true},"84e3bbd6f80983d468260fdbfeeb431cc81f7ea98d284d836e4d168e36875e86","0b85cb069d0e427ba946e5eb2d86ef65ffd19867042810516d16919f6c1a5aec","15c88bfd1b8dc7231ff828ae8df5d955bae5ebca4cf2bcb417af5821e52299ae","be00321090ed100e3bd1e566c0408004137e73feb19d6380eba57d68519ff6c5","0359682c54e487c4cab2b53b2b4d35cc8dea4d9914bc6abcdb5701f8b8e745a4","96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","e5dd317ef2c7a2882b152337b03d592fafa8351b40351849a16a908b198bd3b5","675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","fe4a2042d087990ebfc7dc0142d5aaf5a152e4baea86b45f283f103ec1e871ea","d88a479cccf787b4aa82362150fbeba5211a32dbfafa7b92ba6995ecaf9a1a89","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","c24ad9be9adf28f0927e3d9d9e9cec1c677022356f241ccbbfb97bfe8fb3d1a1","0ec0998e2d085e8ea54266f547976ae152c9dd6cdb9ac4d8a520a230f5ebae84","9364c7566b0be2f7b70ff5285eb34686f83ccb01bda529b82d23b2a844653bfb","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","ae9930989ed57478eb03b9b80ad3efa7a3eacdfeff0f78ecf7894c4963a64f93","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3e59f00ab03c33717b3130066d4debb272da90eeded4935ff0604c2bc25a5cae","6ac6f24aff52e62c3950461aa17eab26e3a156927858e6b654baef0058b4cd1e",{"version":"0714e2046df66c0e93c3330d30dbc0565b3e8cd3ee302cf99e4ede6220e5fec8","affectsGlobalScope":true},"8841e2aa774b89bd23302dede20663306dc1b9902431ac64b24be8b8d0e3f649","209e814e8e71aec74f69686a9506dd7610b97ab59dcee9446266446f72a76d05",{"version":"5f186a758a616c107c70e8918db4630d063bd782f22e6e0b17573b125765b40b","affectsGlobalScope":true},"6fa0008bf91a4cc9c8963bace4bba0bd6865cbfa29c3e3ccc461155660fb113a","5e03940534e2cfe6d971abfdda33326663c1c0788eac583874fea43bcae165f4","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","a440a1b0129449cdc6fa715d1998bcd5e914fec1e68b076a4230d71524561d48","6b40029289530423f407a22755c85b81740f9acfd88d2b53564f8c1657c26660","24a09dc3e07d69b0a224dbd14b2994c40d1efd0954e759004b61b9e683dabe5f","95d085761c8e8d469a9066a9cc7bd4b5bc671098d2f8442ae657fb35b3215cf1","67483628398336d0f9368578a9514bd8cc823a4f3b3ab784f3942077e5047335"],"options":{"composite":true,"declaration":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"exactOptionalPropertyTypes":true,"experimentalDecorators":true,"module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./cjs","rootDir":"../src","skipLibCheck":false,"sourceMap":true,"strict":true,"target":4},"fileIdsList":[[97],[72,97,104,105],[97,107],[72,97,104],[69,72,97,104,110,111],[97,106,111,112,114],[69,86,93,97,104],[97,104],[97,120,122,123,124,125,126,127,128,129,130,131,132],[97,120,121,123,124,125,126,127,128,129,130,131,132],[97,121,122,123,124,125,126,127,128,129,130,131,132],[97,120,121,122,124,125,126,127,128,129,130,131,132],[97,120,121,122,123,125,126,127,128,129,130,131,132],[97,120,121,122,123,124,126,127,128,129,130,131,132],[97,120,121,122,123,124,125,127,128,129,130,131,132],[97,120,121,122,123,124,125,126,128,129,130,131,132],[97,120,121,122,123,124,125,126,127,129,130,131,132],[97,120,121,122,123,124,125,126,127,128,130,131,132],[97,120,121,122,123,124,125,126,127,128,129,131,132],[97,120,121,122,123,124,125,126,127,128,129,130,132],[97,120,121,122,123,124,125,126,127,128,129,130,131],[54,97],[57,97],[58,63,97],[59,69,70,77,86,96,97],[59,60,69,77,97],[61,97],[62,63,70,78,97],[63,86,93,97],[64,66,69,77,97],[65,97],[66,67,97],[68,69,97],[69,97],[69,70,71,86,96,97],[69,70,71,86,97],[72,77,86,96,97],[69,70,72,73,77,86,93,96,97],[72,74,86,93,96,97],[54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103],[69,75,97],[76,96,97],[66,69,77,86,97],[78,97],[79,97],[57,80,97],[81,95,97,101],[82,97],[83,97],[69,84,97],[84,85,97,99],[69,86,87,88,97],[86,88,97],[86,87,97],[89,97],[90,97],[69,91,92,97],[91,92,97],[63,77,93,97],[94,97],[77,95,97],[58,72,83,96,97],[63,97],[86,97,98],[97,99],[97,100],[58,63,69,71,80,86,96,97,99,101],[86,97,102],[72,97,104,113],[97,140],[42,97],[42,44,97],[43,97],[49,50,97],[44,46,47,97],[46,48,49,97],[42,43,45,46,97],[42,43,44,45,46,47,48,49,51,52,97],[42],[42,44],[43],[50],[44,46,47],[46,48,49],[42,43,46]],"referencedMap":[[140,1],[106,2],[108,3],[107,1],[105,4],[109,1],[112,5],[115,6],[116,7],[117,1],[118,1],[119,8],[121,9],[122,10],[120,11],[123,12],[124,13],[125,14],[126,15],[127,16],[128,17],[129,18],[130,19],[131,20],[132,21],[113,1],[133,1],[134,1],[135,1],[54,22],[55,22],[57,23],[58,24],[59,25],[60,26],[61,27],[62,28],[63,29],[64,30],[65,31],[66,32],[67,32],[68,33],[69,34],[70,35],[71,36],[56,1],[103,1],[72,37],[73,38],[74,39],[104,40],[75,41],[76,42],[77,43],[78,44],[79,45],[80,46],[81,47],[82,48],[83,49],[84,50],[85,51],[86,52],[88,53],[87,54],[89,55],[90,56],[91,57],[92,58],[93,59],[94,60],[95,61],[96,62],[97,63],[98,64],[99,65],[100,66],[101,67],[102,68],[136,1],[137,1],[138,1],[111,1],[110,1],[114,69],[139,1],[141,70],[142,1],[143,8],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[30,1],[31,1],[32,1],[33,1],[7,1],[34,1],[39,1],[40,1],[35,1],[36,1],[37,1],[38,1],[1,1],[41,1],[43,71],[45,72],[42,1],[46,73],[44,73],[51,74],[52,74],[49,1],[48,75],[50,76],[47,77],[53,78]],"exportedModulesMap":[[140,1],[106,2],[108,3],[107,1],[105,4],[109,1],[112,5],[115,6],[116,7],[117,1],[118,1],[119,8],[121,9],[122,10],[120,11],[123,12],[124,13],[125,14],[126,15],[127,16],[128,17],[129,18],[130,19],[131,20],[132,21],[113,1],[133,1],[134,1],[135,1],[54,22],[55,22],[57,23],[58,24],[59,25],[60,26],[61,27],[62,28],[63,29],[64,30],[65,31],[66,32],[67,32],[68,33],[69,34],[70,35],[71,36],[56,1],[103,1],[72,37],[73,38],[74,39],[104,40],[75,41],[76,42],[77,43],[78,44],[79,45],[80,46],[81,47],[82,48],[83,49],[84,50],[85,51],[86,52],[88,53],[87,54],[89,55],[90,56],[91,57],[92,58],[93,59],[94,60],[95,61],[96,62],[97,63],[98,64],[99,65],[100,66],[101,67],[102,68],[136,1],[137,1],[138,1],[111,1],[110,1],[114,69],[139,1],[141,70],[142,1],[143,8],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[30,1],[31,1],[32,1],[33,1],[7,1],[34,1],[39,1],[40,1],[35,1],[36,1],[37,1],[38,1],[1,1],[41,1],[43,79],[45,80],[46,81],[44,81],[51,82],[52,82],[48,83],[50,84],[47,85],[53,78]],"semanticDiagnosticsPerFile":[140,106,108,107,105,109,112,115,116,117,118,119,121,122,120,123,124,125,126,127,128,129,130,131,132,113,133,134,135,54,55,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,56,103,72,73,74,104,75,76,77,78,79,80,81,82,83,84,85,86,88,87,89,90,91,92,93,94,95,96,97,98,99,100,101,102,136,137,138,111,110,114,139,141,142,143,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,30,31,32,33,7,34,39,40,35,36,37,38,1,41,43,45,42,46,44,51,52,49,48,50,47,53]},"version":"4.7.4"}
|