@ethalium/nestjs-openapi 0.0.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/constants/metadata.constants.d.ts +65 -0
- package/constants/metadata.constants.js +19 -0
- package/constants/metadata.constants.js.map +1 -0
- package/decorators/body.decorator.d.ts +4 -0
- package/decorators/body.decorator.js +15 -0
- package/decorators/body.decorator.js.map +1 -0
- package/decorators/controller.decorator.d.ts +4 -0
- package/decorators/controller.decorator.js +23 -0
- package/decorators/controller.decorator.js.map +1 -0
- package/decorators/error.decorator.d.ts +6 -0
- package/decorators/error.decorator.js +15 -0
- package/decorators/error.decorator.js.map +1 -0
- package/decorators/errors/bad-gateway.decorator.d.ts +4 -0
- package/decorators/errors/bad-gateway.decorator.js +9 -0
- package/decorators/errors/bad-gateway.decorator.js.map +1 -0
- package/decorators/errors/bad-request.decorator.d.ts +4 -0
- package/decorators/errors/bad-request.decorator.js +9 -0
- package/decorators/errors/bad-request.decorator.js.map +1 -0
- package/decorators/errors/forbidden.decorator.d.ts +4 -0
- package/decorators/errors/forbidden.decorator.js +9 -0
- package/decorators/errors/forbidden.decorator.js.map +1 -0
- package/decorators/errors/gateway-timeout.decorator.d.ts +4 -0
- package/decorators/errors/gateway-timeout.decorator.js +9 -0
- package/decorators/errors/gateway-timeout.decorator.js.map +1 -0
- package/decorators/errors/gone.decorator.d.ts +4 -0
- package/decorators/errors/gone.decorator.js +9 -0
- package/decorators/errors/gone.decorator.js.map +1 -0
- package/decorators/errors/internal-server-error.decorator.d.ts +4 -0
- package/decorators/errors/internal-server-error.decorator.js +9 -0
- package/decorators/errors/internal-server-error.decorator.js.map +1 -0
- package/decorators/errors/method-not-allowed.decorator.d.ts +4 -0
- package/decorators/errors/method-not-allowed.decorator.js +9 -0
- package/decorators/errors/method-not-allowed.decorator.js.map +1 -0
- package/decorators/errors/not-acceptable.decorator.d.ts +4 -0
- package/decorators/errors/not-acceptable.decorator.js +9 -0
- package/decorators/errors/not-acceptable.decorator.js.map +1 -0
- package/decorators/errors/not-found.decorator.d.ts +4 -0
- package/decorators/errors/not-found.decorator.js +9 -0
- package/decorators/errors/not-found.decorator.js.map +1 -0
- package/decorators/errors/not-implemented.decorator.d.ts +4 -0
- package/decorators/errors/not-implemented.decorator.js +9 -0
- package/decorators/errors/not-implemented.decorator.js.map +1 -0
- package/decorators/errors/payload-too-large.decorator.d.ts +4 -0
- package/decorators/errors/payload-too-large.decorator.js +9 -0
- package/decorators/errors/payload-too-large.decorator.js.map +1 -0
- package/decorators/errors/payment-required.decorator.d.ts +4 -0
- package/decorators/errors/payment-required.decorator.js +9 -0
- package/decorators/errors/payment-required.decorator.js.map +1 -0
- package/decorators/errors/precondition-failed.decorator.d.ts +4 -0
- package/decorators/errors/precondition-failed.decorator.js +9 -0
- package/decorators/errors/precondition-failed.decorator.js.map +1 -0
- package/decorators/errors/request-timeout.decorator.d.ts +4 -0
- package/decorators/errors/request-timeout.decorator.js +9 -0
- package/decorators/errors/request-timeout.decorator.js.map +1 -0
- package/decorators/errors/service-unavailable.decorator.d.ts +4 -0
- package/decorators/errors/service-unavailable.decorator.js +9 -0
- package/decorators/errors/service-unavailable.decorator.js.map +1 -0
- package/decorators/errors/too-many-requests.decorator.d.ts +4 -0
- package/decorators/errors/too-many-requests.decorator.js +9 -0
- package/decorators/errors/too-many-requests.decorator.js.map +1 -0
- package/decorators/errors/unauthorized.decorator.d.ts +4 -0
- package/decorators/errors/unauthorized.decorator.js +9 -0
- package/decorators/errors/unauthorized.decorator.js.map +1 -0
- package/decorators/errors/unprocessable-entity.decorator.d.ts +4 -0
- package/decorators/errors/unprocessable-entity.decorator.js +9 -0
- package/decorators/errors/unprocessable-entity.decorator.js.map +1 -0
- package/decorators/errors/unsupported-media-type.decorator.d.ts +4 -0
- package/decorators/errors/unsupported-media-type.decorator.js +9 -0
- package/decorators/errors/unsupported-media-type.decorator.js.map +1 -0
- package/decorators/header.decorator.d.ts +5 -0
- package/decorators/header.decorator.js +22 -0
- package/decorators/header.decorator.js.map +1 -0
- package/decorators/param.decorator.d.ts +5 -0
- package/decorators/param.decorator.js +22 -0
- package/decorators/param.decorator.js.map +1 -0
- package/decorators/properties/all-of.decorator.d.ts +8 -0
- package/decorators/properties/all-of.decorator.js +28 -0
- package/decorators/properties/all-of.decorator.js.map +1 -0
- package/decorators/properties/any-of.decorator.d.ts +8 -0
- package/decorators/properties/any-of.decorator.js +28 -0
- package/decorators/properties/any-of.decorator.js.map +1 -0
- package/decorators/properties/boolean.decorator.d.ts +5 -0
- package/decorators/properties/boolean.decorator.js +23 -0
- package/decorators/properties/boolean.decorator.js.map +1 -0
- package/decorators/properties/enum.decorator.d.ts +6 -0
- package/decorators/properties/enum.decorator.js +24 -0
- package/decorators/properties/enum.decorator.js.map +1 -0
- package/decorators/properties/number.decorator.d.ts +5 -0
- package/decorators/properties/number.decorator.js +23 -0
- package/decorators/properties/number.decorator.js.map +1 -0
- package/decorators/properties/object.decorator.d.ts +6 -0
- package/decorators/properties/object.decorator.js +28 -0
- package/decorators/properties/object.decorator.js.map +1 -0
- package/decorators/properties/one-of.decorator.d.ts +8 -0
- package/decorators/properties/one-of.decorator.js +28 -0
- package/decorators/properties/one-of.decorator.js.map +1 -0
- package/decorators/properties/string.decorator.d.ts +5 -0
- package/decorators/properties/string.decorator.js +23 -0
- package/decorators/properties/string.decorator.js.map +1 -0
- package/decorators/properties/type.decorator.d.ts +6 -0
- package/decorators/properties/type.decorator.js +26 -0
- package/decorators/properties/type.decorator.js.map +1 -0
- package/decorators/property.decorator.d.ts +6 -0
- package/decorators/property.decorator.js +20 -0
- package/decorators/property.decorator.js.map +1 -0
- package/decorators/query.decorator.d.ts +5 -0
- package/decorators/query.decorator.js +22 -0
- package/decorators/query.decorator.js.map +1 -0
- package/decorators/request.decorator.d.ts +2 -0
- package/decorators/request.decorator.js +39 -0
- package/decorators/request.decorator.js.map +1 -0
- package/decorators/response.decorator.d.ts +7 -0
- package/decorators/response.decorator.js +34 -0
- package/decorators/response.decorator.js.map +1 -0
- package/decorators/route.decorator.d.ts +5 -0
- package/decorators/route.decorator.js +45 -0
- package/decorators/route.decorator.js.map +1 -0
- package/decorators/routes/delete.decorator.d.ts +4 -0
- package/decorators/routes/delete.decorator.js +9 -0
- package/decorators/routes/delete.decorator.js.map +1 -0
- package/decorators/routes/get.decorator.d.ts +4 -0
- package/decorators/routes/get.decorator.js +9 -0
- package/decorators/routes/get.decorator.js.map +1 -0
- package/decorators/routes/patch.decorator.d.ts +4 -0
- package/decorators/routes/patch.decorator.js +9 -0
- package/decorators/routes/patch.decorator.js.map +1 -0
- package/decorators/routes/post.decorator.d.ts +4 -0
- package/decorators/routes/post.decorator.js +9 -0
- package/decorators/routes/post.decorator.js.map +1 -0
- package/decorators/routes/put.decorator.d.ts +4 -0
- package/decorators/routes/put.decorator.js +9 -0
- package/decorators/routes/put.decorator.js.map +1 -0
- package/decorators/tag-group.decorator.d.ts +4 -0
- package/decorators/tag-group.decorator.js +15 -0
- package/decorators/tag-group.decorator.js.map +1 -0
- package/decorators/tag.decorator.d.ts +5 -0
- package/decorators/tag.decorator.js +26 -0
- package/decorators/tag.decorator.js.map +1 -0
- package/index.d.ts +66 -0
- package/index.js +83 -0
- package/index.js.map +1 -0
- package/interfaces/body.interface.d.ts +5 -0
- package/interfaces/body.interface.js +3 -0
- package/interfaces/body.interface.js.map +1 -0
- package/interfaces/common.interface.d.ts +36 -0
- package/interfaces/common.interface.js +3 -0
- package/interfaces/common.interface.js.map +1 -0
- package/interfaces/controller.interface.d.ts +4 -0
- package/interfaces/controller.interface.js +3 -0
- package/interfaces/controller.interface.js.map +1 -0
- package/interfaces/document.interface.d.ts +31 -0
- package/interfaces/document.interface.js +3 -0
- package/interfaces/document.interface.js.map +1 -0
- package/interfaces/header.interface.d.ts +7 -0
- package/interfaces/header.interface.js +3 -0
- package/interfaces/header.interface.js.map +1 -0
- package/interfaces/param.interface.d.ts +13 -0
- package/interfaces/param.interface.js +3 -0
- package/interfaces/param.interface.js.map +1 -0
- package/interfaces/property.interface.d.ts +2 -0
- package/interfaces/property.interface.js +3 -0
- package/interfaces/property.interface.js.map +1 -0
- package/interfaces/query.interface.d.ts +14 -0
- package/interfaces/query.interface.js +3 -0
- package/interfaces/query.interface.js.map +1 -0
- package/interfaces/request.interface.d.ts +12 -0
- package/interfaces/request.interface.js +3 -0
- package/interfaces/request.interface.js.map +1 -0
- package/interfaces/route.interface.d.ts +14 -0
- package/interfaces/route.interface.js +3 -0
- package/interfaces/route.interface.js.map +1 -0
- package/openapi.builder.d.ts +30 -0
- package/openapi.builder.js +346 -0
- package/openapi.builder.js.map +1 -0
- package/openapi.module.d.ts +8 -0
- package/openapi.module.js +29 -0
- package/openapi.module.js.map +1 -0
- package/openapi.scanner.d.ts +30 -0
- package/openapi.scanner.js +61 -0
- package/openapi.scanner.js.map +1 -0
- package/package.json +75 -0
- package/tsconfig.lib.tsbuildinfo +1 -0
- package/utils/class.utils.d.ts +13 -0
- package/utils/class.utils.js +55 -0
- package/utils/class.utils.js.map +1 -0
- package/utils/common.utils.d.ts +3 -0
- package/utils/common.utils.js +48 -0
- package/utils/common.utils.js.map +1 -0
- package/utils/decorator.utils.d.ts +37 -0
- package/utils/decorator.utils.js +85 -0
- package/utils/decorator.utils.js.map +1 -0
- package/utils/document-builder.utils.d.ts +70 -0
- package/utils/document-builder.utils.js +36 -0
- package/utils/document-builder.utils.js.map +1 -0
- package/utils/metadata.utils.d.ts +28 -0
- package/utils/metadata.utils.js +100 -0
- package/utils/metadata.utils.js.map +1 -0
- package/utils/schema.utils.d.ts +9 -0
- package/utils/schema.utils.js +58 -0
- package/utils/schema.utils.js.map +1 -0
- package/utils/type.utils.d.ts +20 -0
- package/utils/type.utils.js +79 -0
- package/utils/type.utils.js.map +1 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { IOpenApiTagGroupMetadata, IOpenApiTagMetadata } from "../interfaces/common.interface";
|
|
2
|
+
import { Type } from "@nestjs/common";
|
|
3
|
+
import { ApiResponseOptions } from "@nestjs/swagger/dist/decorators/api-response.decorator";
|
|
4
|
+
import { ApiPropertyOptions } from "@nestjs/swagger";
|
|
5
|
+
export declare const DECORATORS: {
|
|
6
|
+
OPENAPI: {
|
|
7
|
+
TAGS: {
|
|
8
|
+
readonly key: string | symbol;
|
|
9
|
+
get(target: any, propertyKey?: string | symbol): IOpenApiTagMetadata[];
|
|
10
|
+
set(items: IOpenApiTagMetadata, target: any, propertyKey?: string | symbol): IOpenApiTagMetadata;
|
|
11
|
+
set(items: IOpenApiTagMetadata[], target: any, propertyKey?: string | symbol): IOpenApiTagMetadata[];
|
|
12
|
+
add(items: IOpenApiTagMetadata, target: any, propertyKey?: string | symbol): IOpenApiTagMetadata;
|
|
13
|
+
add(items: IOpenApiTagMetadata[], target: any, propertyKey?: string | symbol): IOpenApiTagMetadata[];
|
|
14
|
+
};
|
|
15
|
+
TAG_GROUPS: {
|
|
16
|
+
readonly key: string | symbol;
|
|
17
|
+
get(target: any, propertyKey?: string | symbol): IOpenApiTagGroupMetadata | null;
|
|
18
|
+
set(value: IOpenApiTagGroupMetadata, target: any, propertyKey?: string | symbol): IOpenApiTagGroupMetadata;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
SWAGGER: {
|
|
22
|
+
TAGS: {
|
|
23
|
+
readonly key: string | symbol;
|
|
24
|
+
get(target: any, propertyKey?: string | symbol): string[];
|
|
25
|
+
set(items: string, target: any, propertyKey?: string | symbol): string;
|
|
26
|
+
set(items: string[], target: any, propertyKey?: string | symbol): string[];
|
|
27
|
+
add(items: string, target: any, propertyKey?: string | symbol): string;
|
|
28
|
+
add(items: string[], target: any, propertyKey?: string | symbol): string[];
|
|
29
|
+
};
|
|
30
|
+
RESPONSES: {
|
|
31
|
+
readonly key: string | symbol;
|
|
32
|
+
getAll(target: any, propertyKey?: string | symbol): {
|
|
33
|
+
[key: string]: ApiResponseOptions;
|
|
34
|
+
[key: number]: ApiResponseOptions;
|
|
35
|
+
} | null;
|
|
36
|
+
setAll(value: any, target: any, propertyKey?: string | symbol): {
|
|
37
|
+
[key: string]: ApiResponseOptions;
|
|
38
|
+
[key: number]: ApiResponseOptions;
|
|
39
|
+
};
|
|
40
|
+
get(name: string | number, target: any, propertyKey?: string | symbol): ApiResponseOptions | null;
|
|
41
|
+
set(name: string | number, value: ApiResponseOptions, target: any, propertyKey?: string | symbol): ApiResponseOptions;
|
|
42
|
+
};
|
|
43
|
+
EXTRA_MODELS: {
|
|
44
|
+
readonly key: string | symbol;
|
|
45
|
+
get(target: any, propertyKey?: string | symbol): Type<unknown>[];
|
|
46
|
+
set(items: Type<unknown>, target: any, propertyKey?: string | symbol): Type<unknown>;
|
|
47
|
+
set(items: Type<unknown>[], target: any, propertyKey?: string | symbol): Type<unknown>[];
|
|
48
|
+
add(items: Type<unknown>, target: any, propertyKey?: string | symbol): Type<unknown>;
|
|
49
|
+
add(items: Type<unknown>[], target: any, propertyKey?: string | symbol): Type<unknown>[];
|
|
50
|
+
};
|
|
51
|
+
MODEL_PROPERTIES: {
|
|
52
|
+
readonly key: string | symbol;
|
|
53
|
+
get(target: any, propertyKey?: string | symbol): ApiPropertyOptions | null;
|
|
54
|
+
set(value: ApiPropertyOptions, target: any, propertyKey?: string | symbol): ApiPropertyOptions;
|
|
55
|
+
};
|
|
56
|
+
MODEL_PROPERTIES_ARRAY: {
|
|
57
|
+
readonly key: string | symbol;
|
|
58
|
+
get(target: any, propertyKey?: string | symbol): `:${string}`[];
|
|
59
|
+
set(items: `:${string}`, target: any, propertyKey?: string | symbol): `:${string}`;
|
|
60
|
+
set(items: `:${string}`[], target: any, propertyKey?: string | symbol): `:${string}`[];
|
|
61
|
+
add(items: `:${string}`, target: any, propertyKey?: string | symbol): `:${string}`;
|
|
62
|
+
add(items: `:${string}`[], target: any, propertyKey?: string | symbol): `:${string}`[];
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DECORATORS = void 0;
|
|
4
|
+
const metadata_utils_1 = require("../utils/metadata.utils");
|
|
5
|
+
const constants_1 = require("@nestjs/swagger/dist/constants");
|
|
6
|
+
exports.DECORATORS = {
|
|
7
|
+
OPENAPI: {
|
|
8
|
+
TAGS: (0, metadata_utils_1.MetadataListAccessor)('openapi/tags', 'name'),
|
|
9
|
+
TAG_GROUPS: (0, metadata_utils_1.MetadataAccessor)('openapi/tagGroups'),
|
|
10
|
+
},
|
|
11
|
+
SWAGGER: {
|
|
12
|
+
TAGS: (0, metadata_utils_1.MetadataListAccessor)(constants_1.DECORATORS.API_TAGS),
|
|
13
|
+
RESPONSES: (0, metadata_utils_1.MetadataMapAccessor)(constants_1.DECORATORS.API_RESPONSE),
|
|
14
|
+
EXTRA_MODELS: (0, metadata_utils_1.MetadataListAccessor)(constants_1.DECORATORS.API_EXTRA_MODELS),
|
|
15
|
+
MODEL_PROPERTIES: (0, metadata_utils_1.MetadataAccessor)(constants_1.DECORATORS.API_MODEL_PROPERTIES),
|
|
16
|
+
MODEL_PROPERTIES_ARRAY: (0, metadata_utils_1.MetadataListAccessor)(constants_1.DECORATORS.API_MODEL_PROPERTIES_ARRAY),
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=metadata.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata.constants.js","sourceRoot":"","sources":["../../../lib/constants/metadata.constants.ts"],"names":[],"mappings":";;;AAAA,4DAAoG;AAEpG,8DAAgF;AAKnE,QAAA,UAAU,GAAG;IAGxB,OAAO,EAAE;QACP,IAAI,EAAE,IAAA,qCAAoB,EAAsB,cAAc,EAAE,MAAM,CAAC;QACvE,UAAU,EAAE,IAAA,iCAAgB,EAA2B,mBAAmB,CAAC;KAC5E;IAGD,OAAO,EAAE;QACP,IAAI,EAAE,IAAA,qCAAoB,EAAS,sBAAkB,CAAC,QAAQ,CAAC;QAC/D,SAAS,EAAE,IAAA,oCAAmB,EAA+C,sBAAkB,CAAC,YAAY,CAAC;QAC7G,YAAY,EAAE,IAAA,qCAAoB,EAAgB,sBAAkB,CAAC,gBAAgB,CAAC;QACtF,gBAAgB,EAAE,IAAA,iCAAgB,EAAqB,sBAAkB,CAAC,oBAAoB,CAAC;QAC/F,sBAAsB,EAAE,IAAA,qCAAoB,EAAe,sBAAkB,CAAC,0BAA0B,CAAC;KAC1G;CAEF,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IOpenApiType } from "../interfaces/common.interface";
|
|
2
|
+
import { IOpenApiBodyOptions } from "../interfaces/body.interface";
|
|
3
|
+
export declare function OABody(options: IOpenApiBodyOptions): ClassDecorator & MethodDecorator;
|
|
4
|
+
export declare function OABody(type: IOpenApiType, options?: Omit<IOpenApiBodyOptions, 'type'>): ClassDecorator & MethodDecorator;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OABody = OABody;
|
|
4
|
+
const decorator_utils_1 = require("../utils/decorator.utils");
|
|
5
|
+
const type_utils_1 = require("../utils/type.utils");
|
|
6
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
7
|
+
function OABody(...args) {
|
|
8
|
+
return (0, decorator_utils_1.createDecorator)({
|
|
9
|
+
transform: (opts) => Object.assign({ type: (0, type_utils_1.extractAndResolveClassRef)(opts.data) }, (0, type_utils_1.extractObject)(opts.data) || {}),
|
|
10
|
+
decorators: (opts, store) => {
|
|
11
|
+
store.push((0, swagger_1.ApiBody)(opts.data));
|
|
12
|
+
},
|
|
13
|
+
})(args);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=body.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"body.decorator.js","sourceRoot":"","sources":["../../../lib/decorators/body.decorator.ts"],"names":[],"mappings":";;AAQA,wBAUC;AAlBD,8DAAyD;AAEzD,oDAA6E;AAC7E,6CAAwC;AAKxC,SAAgB,MAAM,CAAC,GAAG,IAAW;IACnC,OAAO,IAAA,iCAAe,EAA6B;QACjD,SAAS,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAChC,EAAE,IAAI,EAAE,IAAA,sCAAyB,EAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAC9C,IAAA,0BAAa,EAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAC/B;QACD,UAAU,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;YAC1B,KAAK,CAAC,IAAI,CAAC,IAAA,iBAAO,EAAC,IAAI,CAAC,IAAW,CAAC,CAAC,CAAC;QACxC,CAAC;KACF,CAAC,CAAC,IAAI,CAAqC,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IOpenApiControllerOptions } from "../interfaces/controller.interface";
|
|
2
|
+
import { IOpenApiRouteLike } from "../interfaces/common.interface";
|
|
3
|
+
export declare function OAController(path: IOpenApiRouteLike, options?: Omit<IOpenApiControllerOptions, 'path'> | false): ClassDecorator;
|
|
4
|
+
export declare function OAController(options?: IOpenApiControllerOptions): ClassDecorator;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OAController = OAController;
|
|
4
|
+
const decorator_utils_1 = require("../utils/decorator.utils");
|
|
5
|
+
const type_utils_1 = require("../utils/type.utils");
|
|
6
|
+
const common_1 = require("@nestjs/common");
|
|
7
|
+
const request_decorator_1 = require("./request.decorator");
|
|
8
|
+
function OAController(...args) {
|
|
9
|
+
return (0, decorator_utils_1.createDecorator)({
|
|
10
|
+
transform: (opts) => Object.assign({ path: (0, type_utils_1.extractRoute)(opts.data) || '' }, (0, type_utils_1.extractObject)(opts.data) || {}, (0, type_utils_1.extractFalse)(opts.data) ? { exclude: true } : {}),
|
|
11
|
+
decorators: (options, store) => {
|
|
12
|
+
store.push((0, common_1.Controller)({
|
|
13
|
+
path: options.data.path,
|
|
14
|
+
host: options.data.host,
|
|
15
|
+
scope: options.data.scope,
|
|
16
|
+
durable: options.data.durable,
|
|
17
|
+
version: options.data.version,
|
|
18
|
+
}));
|
|
19
|
+
store.push((0, request_decorator_1.OARequest)('controller', options.data));
|
|
20
|
+
},
|
|
21
|
+
})(args);
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=controller.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controller.decorator.js","sourceRoot":"","sources":["../../../lib/decorators/controller.decorator.ts"],"names":[],"mappings":";;AASA,oCAuBC;AAhCD,8DAAyD;AAGzD,oDAA8E;AAC9E,2CAA0C;AAC1C,2DAA8C;AAI9C,SAAgB,YAAY,CAAC,GAAG,IAAW;IACzC,OAAO,IAAA,iCAAe,EAAmC;QACvD,SAAS,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAChC,EAAE,IAAI,EAAE,IAAA,yBAAY,EAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EACvC,IAAA,0BAAa,EAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,EAC9B,IAAA,yBAAY,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CACjD;QACD,UAAU,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE;YAG7B,KAAK,CAAC,IAAI,CAAC,IAAA,mBAAU,EAAC;gBACpB,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI;gBACvB,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI;gBACvB,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK;gBACzB,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,OAAO;gBAC7B,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,OAAO;aAC9B,CAAC,CAAC,CAAC;YAGJ,KAAK,CAAC,IAAI,CAAC,IAAA,6BAAS,EAAC,YAAY,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QAEpD,CAAC;KACF,CAAC,CAAC,IAAI,CAAmB,CAAC;AAC7B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { HttpStatus } from "@nestjs/common";
|
|
2
|
+
import { IOpenApiErrorOptions, IOpenApiErrorType } from "../interfaces/common.interface";
|
|
3
|
+
export declare function OAError(status: HttpStatus | number, options?: Omit<IOpenApiErrorOptions, 'status'>): ClassDecorator & MethodDecorator;
|
|
4
|
+
export declare function OAError(status: HttpStatus | number, description?: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'description'>): ClassDecorator & MethodDecorator;
|
|
5
|
+
export declare function OAError(status: HttpStatus | number, type?: IOpenApiErrorType, options?: Omit<IOpenApiErrorOptions, 'status' | 'type'>): ClassDecorator & MethodDecorator;
|
|
6
|
+
export declare function OAError(status: HttpStatus | number, type?: IOpenApiErrorType, description?: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'type' | 'description'>): ClassDecorator & MethodDecorator;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OAError = OAError;
|
|
4
|
+
const decorator_utils_1 = require("../utils/decorator.utils");
|
|
5
|
+
const type_utils_1 = require("../utils/type.utils");
|
|
6
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
7
|
+
function OAError(status, ...args) {
|
|
8
|
+
return (0, decorator_utils_1.createDecorator)({
|
|
9
|
+
transform: (ctx) => Object.assign({ status: status }, { description: (0, type_utils_1.extractString)(ctx.data) }, { type: (0, type_utils_1.extractAndResolveClassRef)(ctx.data) }, (0, type_utils_1.extractObject)(ctx.data) || {}),
|
|
10
|
+
decorators: (ctx, store) => {
|
|
11
|
+
store.push((0, swagger_1.ApiResponse)(ctx.data));
|
|
12
|
+
}
|
|
13
|
+
})(args);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=error.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.decorator.js","sourceRoot":"","sources":["../../../lib/decorators/error.decorator.ts"],"names":[],"mappings":";;AAUA,0BAYC;AApBD,8DAAyD;AACzD,oDAA4F;AAC5F,6CAA4C;AAM5C,SAAgB,OAAO,CAAC,MAAyB,EAAE,GAAG,IAAW;IAC/D,OAAO,IAAA,iCAAe,EAA8B;QAClD,SAAS,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAC/B,EAAE,MAAM,EAAE,MAAM,EAAE,EAClB,EAAE,WAAW,EAAE,IAAA,0BAAa,EAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EACxC,EAAE,IAAI,EAAE,IAAA,sCAAyB,EAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAC7C,IAAA,0BAAa,EAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAC9B;QACD,UAAU,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;YACzB,KAAK,CAAC,IAAI,CAAC,IAAA,qBAAW,EAAC,GAAG,CAAC,IAAW,CAAC,CAAC,CAAC;QAC3C,CAAC;KACF,CAAC,CAAC,IAAI,CAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IOpenApiErrorOptions, IOpenApiErrorType } from "../../interfaces/common.interface";
|
|
2
|
+
export declare function OABadGateway(options?: Omit<IOpenApiErrorOptions, 'status'>): ClassDecorator & MethodDecorator;
|
|
3
|
+
export declare function OABadGateway(description: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'description'>): ClassDecorator & MethodDecorator;
|
|
4
|
+
export declare function OABadGateway(error: IOpenApiErrorType, description?: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'type' | 'description'>): ClassDecorator & MethodDecorator;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OABadGateway = OABadGateway;
|
|
4
|
+
const common_1 = require("@nestjs/common");
|
|
5
|
+
const error_decorator_1 = require("../error.decorator");
|
|
6
|
+
function OABadGateway(...args) {
|
|
7
|
+
return (0, error_decorator_1.OAError)(common_1.HttpStatus.BAD_GATEWAY, ...args);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=bad-gateway.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bad-gateway.decorator.js","sourceRoot":"","sources":["../../../../lib/decorators/errors/bad-gateway.decorator.ts"],"names":[],"mappings":";;AAOA,oCAEC;AATD,2CAA0C;AAC1C,wDAA2C;AAM3C,SAAgB,YAAY,CAAC,GAAG,IAAW;IACzC,OAAO,IAAA,yBAAO,EAAC,mBAAU,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IOpenApiErrorOptions, IOpenApiErrorType } from "../../interfaces/common.interface";
|
|
2
|
+
export declare function OABadRequest(options?: Omit<IOpenApiErrorOptions, 'status'>): ClassDecorator & MethodDecorator;
|
|
3
|
+
export declare function OABadRequest(description: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'description'>): ClassDecorator & MethodDecorator;
|
|
4
|
+
export declare function OABadRequest(error: IOpenApiErrorType, description?: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'type' | 'description'>): ClassDecorator & MethodDecorator;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OABadRequest = OABadRequest;
|
|
4
|
+
const error_decorator_1 = require("../error.decorator");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
function OABadRequest(...args) {
|
|
7
|
+
return (0, error_decorator_1.OAError)(common_1.HttpStatus.BAD_REQUEST, ...args);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=bad-request.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bad-request.decorator.js","sourceRoot":"","sources":["../../../../lib/decorators/errors/bad-request.decorator.ts"],"names":[],"mappings":";;AAQA,oCAEC;AATD,wDAA2C;AAC3C,2CAA0C;AAM1C,SAAgB,YAAY,CAAC,GAAG,IAAW;IACzC,OAAO,IAAA,yBAAO,EAAC,mBAAU,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IOpenApiErrorOptions, IOpenApiErrorType } from "../../interfaces/common.interface";
|
|
2
|
+
export declare function OAForbidden(options?: Omit<IOpenApiErrorOptions, 'status'>): ClassDecorator & MethodDecorator;
|
|
3
|
+
export declare function OAForbidden(description: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'description'>): ClassDecorator & MethodDecorator;
|
|
4
|
+
export declare function OAForbidden(error: IOpenApiErrorType, description?: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'type' | 'description'>): ClassDecorator & MethodDecorator;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OAForbidden = OAForbidden;
|
|
4
|
+
const common_1 = require("@nestjs/common");
|
|
5
|
+
const error_decorator_1 = require("../error.decorator");
|
|
6
|
+
function OAForbidden(...args) {
|
|
7
|
+
return (0, error_decorator_1.OAError)(common_1.HttpStatus.FORBIDDEN, ...args);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=forbidden.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forbidden.decorator.js","sourceRoot":"","sources":["../../../../lib/decorators/errors/forbidden.decorator.ts"],"names":[],"mappings":";;AAQA,kCAEC;AATD,2CAA0C;AAC1C,wDAA2C;AAM3C,SAAgB,WAAW,CAAC,GAAG,IAAW;IACxC,OAAO,IAAA,yBAAO,EAAC,mBAAU,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IOpenApiErrorOptions, IOpenApiErrorType } from "../../interfaces/common.interface";
|
|
2
|
+
export declare function OAGatewayTimeout(options?: Omit<IOpenApiErrorOptions, 'status'>): ClassDecorator & MethodDecorator;
|
|
3
|
+
export declare function OAGatewayTimeout(description: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'description'>): ClassDecorator & MethodDecorator;
|
|
4
|
+
export declare function OAGatewayTimeout(error: IOpenApiErrorType, description?: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'type' | 'description'>): ClassDecorator & MethodDecorator;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OAGatewayTimeout = OAGatewayTimeout;
|
|
4
|
+
const error_decorator_1 = require("../error.decorator");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
function OAGatewayTimeout(...args) {
|
|
7
|
+
return (0, error_decorator_1.OAError)(common_1.HttpStatus.GATEWAY_TIMEOUT, ...args);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=gateway-timeout.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gateway-timeout.decorator.js","sourceRoot":"","sources":["../../../../lib/decorators/errors/gateway-timeout.decorator.ts"],"names":[],"mappings":";;AAOA,4CAEC;AARD,wDAA2C;AAC3C,2CAA0C;AAK1C,SAAgB,gBAAgB,CAAC,GAAG,IAAW;IAC7C,OAAO,IAAA,yBAAO,EAAC,mBAAU,CAAC,eAAe,EAAE,GAAG,IAAI,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IOpenApiErrorOptions, IOpenApiErrorType } from "../../interfaces/common.interface";
|
|
2
|
+
export declare function OAGone(options?: Omit<IOpenApiErrorOptions, 'status'>): ClassDecorator & MethodDecorator;
|
|
3
|
+
export declare function OAGone(description: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'description'>): ClassDecorator & MethodDecorator;
|
|
4
|
+
export declare function OAGone(error: IOpenApiErrorType, description?: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'type' | 'description'>): ClassDecorator & MethodDecorator;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OAGone = OAGone;
|
|
4
|
+
const error_decorator_1 = require("../error.decorator");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
function OAGone(...args) {
|
|
7
|
+
return (0, error_decorator_1.OAError)(common_1.HttpStatus.GONE, ...args);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=gone.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gone.decorator.js","sourceRoot":"","sources":["../../../../lib/decorators/errors/gone.decorator.ts"],"names":[],"mappings":";;AAOA,wBAEC;AARD,wDAA2C;AAC3C,2CAA0C;AAK1C,SAAgB,MAAM,CAAC,GAAG,IAAW;IACnC,OAAO,IAAA,yBAAO,EAAC,mBAAU,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IOpenApiErrorOptions, IOpenApiErrorType } from "../../interfaces/common.interface";
|
|
2
|
+
export declare function OAInternalServerError(options?: Omit<IOpenApiErrorOptions, 'status'>): ClassDecorator & MethodDecorator;
|
|
3
|
+
export declare function OAInternalServerError(description: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'description'>): ClassDecorator & MethodDecorator;
|
|
4
|
+
export declare function OAInternalServerError(error: IOpenApiErrorType, description?: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'type' | 'description'>): ClassDecorator & MethodDecorator;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OAInternalServerError = OAInternalServerError;
|
|
4
|
+
const error_decorator_1 = require("../error.decorator");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
function OAInternalServerError(...args) {
|
|
7
|
+
return (0, error_decorator_1.OAError)(common_1.HttpStatus.INTERNAL_SERVER_ERROR, ...args);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=internal-server-error.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal-server-error.decorator.js","sourceRoot":"","sources":["../../../../lib/decorators/errors/internal-server-error.decorator.ts"],"names":[],"mappings":";;AAOA,sDAEC;AARD,wDAA2C;AAC3C,2CAA0C;AAK1C,SAAgB,qBAAqB,CAAC,GAAG,IAAW;IAClD,OAAO,IAAA,yBAAO,EAAC,mBAAU,CAAC,qBAAqB,EAAE,GAAG,IAAI,CAAC,CAAC;AAC5D,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IOpenApiErrorOptions, IOpenApiErrorType } from "../../interfaces/common.interface";
|
|
2
|
+
export declare function OAMethodNotAllowed(options?: Omit<IOpenApiErrorOptions, 'status'>): ClassDecorator & MethodDecorator;
|
|
3
|
+
export declare function OAMethodNotAllowed(description: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'description'>): ClassDecorator & MethodDecorator;
|
|
4
|
+
export declare function OAMethodNotAllowed(error: IOpenApiErrorType, description?: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'type' | 'description'>): ClassDecorator & MethodDecorator;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OAMethodNotAllowed = OAMethodNotAllowed;
|
|
4
|
+
const error_decorator_1 = require("../error.decorator");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
function OAMethodNotAllowed(...args) {
|
|
7
|
+
return (0, error_decorator_1.OAError)(common_1.HttpStatus.METHOD_NOT_ALLOWED, ...args);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=method-not-allowed.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"method-not-allowed.decorator.js","sourceRoot":"","sources":["../../../../lib/decorators/errors/method-not-allowed.decorator.ts"],"names":[],"mappings":";;AAOA,gDAEC;AARD,wDAA2C;AAC3C,2CAA0C;AAK1C,SAAgB,kBAAkB,CAAC,GAAG,IAAW;IAC/C,OAAO,IAAA,yBAAO,EAAC,mBAAU,CAAC,kBAAkB,EAAE,GAAG,IAAI,CAAC,CAAC;AACzD,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IOpenApiErrorOptions, IOpenApiErrorType } from "../../interfaces/common.interface";
|
|
2
|
+
export declare function OANotAcceptable(options?: Omit<IOpenApiErrorOptions, 'status'>): ClassDecorator & MethodDecorator;
|
|
3
|
+
export declare function OANotAcceptable(description: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'description'>): ClassDecorator & MethodDecorator;
|
|
4
|
+
export declare function OANotAcceptable(error: IOpenApiErrorType, description?: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'type' | 'description'>): ClassDecorator & MethodDecorator;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OANotAcceptable = OANotAcceptable;
|
|
4
|
+
const error_decorator_1 = require("../error.decorator");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
function OANotAcceptable(...args) {
|
|
7
|
+
return (0, error_decorator_1.OAError)(common_1.HttpStatus.NOT_ACCEPTABLE, ...args);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=not-acceptable.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"not-acceptable.decorator.js","sourceRoot":"","sources":["../../../../lib/decorators/errors/not-acceptable.decorator.ts"],"names":[],"mappings":";;AAOA,0CAEC;AARD,wDAA2C;AAC3C,2CAA0C;AAK1C,SAAgB,eAAe,CAAC,GAAG,IAAW;IAC5C,OAAO,IAAA,yBAAO,EAAC,mBAAU,CAAC,cAAc,EAAE,GAAG,IAAI,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IOpenApiErrorOptions, IOpenApiErrorType } from "../../interfaces/common.interface";
|
|
2
|
+
export declare function OANotFound(options?: Omit<IOpenApiErrorOptions, 'status'>): ClassDecorator & MethodDecorator;
|
|
3
|
+
export declare function OANotFound(description: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'description'>): ClassDecorator & MethodDecorator;
|
|
4
|
+
export declare function OANotFound(error: IOpenApiErrorType, description?: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'type' | 'description'>): ClassDecorator & MethodDecorator;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OANotFound = OANotFound;
|
|
4
|
+
const error_decorator_1 = require("../error.decorator");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
function OANotFound(...args) {
|
|
7
|
+
return (0, error_decorator_1.OAError)(common_1.HttpStatus.NOT_FOUND, ...args);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=not-found.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"not-found.decorator.js","sourceRoot":"","sources":["../../../../lib/decorators/errors/not-found.decorator.ts"],"names":[],"mappings":";;AAQA,gCAEC;AATD,wDAA2C;AAE3C,2CAA0C;AAK1C,SAAgB,UAAU,CAAC,GAAG,IAAW;IACvC,OAAO,IAAA,yBAAO,EAAC,mBAAU,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IOpenApiErrorOptions, IOpenApiErrorType } from "../../interfaces/common.interface";
|
|
2
|
+
export declare function OANotImplemented(options?: Omit<IOpenApiErrorOptions, 'status'>): ClassDecorator & MethodDecorator;
|
|
3
|
+
export declare function OANotImplemented(description: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'description'>): ClassDecorator & MethodDecorator;
|
|
4
|
+
export declare function OANotImplemented(error: IOpenApiErrorType, description?: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'type' | 'description'>): ClassDecorator & MethodDecorator;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OANotImplemented = OANotImplemented;
|
|
4
|
+
const error_decorator_1 = require("../error.decorator");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
function OANotImplemented(...args) {
|
|
7
|
+
return (0, error_decorator_1.OAError)(common_1.HttpStatus.NOT_IMPLEMENTED, ...args);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=not-implemented.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"not-implemented.decorator.js","sourceRoot":"","sources":["../../../../lib/decorators/errors/not-implemented.decorator.ts"],"names":[],"mappings":";;AAOA,4CAEC;AARD,wDAA2C;AAC3C,2CAA0C;AAK1C,SAAgB,gBAAgB,CAAC,GAAG,IAAW;IAC7C,OAAO,IAAA,yBAAO,EAAC,mBAAU,CAAC,eAAe,EAAE,GAAG,IAAI,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IOpenApiErrorOptions, IOpenApiErrorType } from "../../interfaces/common.interface";
|
|
2
|
+
export declare function OAPayloadTooLarge(options?: Omit<IOpenApiErrorOptions, 'status'>): ClassDecorator & MethodDecorator;
|
|
3
|
+
export declare function OAPayloadTooLarge(description: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'description'>): ClassDecorator & MethodDecorator;
|
|
4
|
+
export declare function OAPayloadTooLarge(error: IOpenApiErrorType, description?: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'type' | 'description'>): ClassDecorator & MethodDecorator;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OAPayloadTooLarge = OAPayloadTooLarge;
|
|
4
|
+
const error_decorator_1 = require("../error.decorator");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
function OAPayloadTooLarge(...args) {
|
|
7
|
+
return (0, error_decorator_1.OAError)(common_1.HttpStatus.PAYLOAD_TOO_LARGE, ...args);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=payload-too-large.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload-too-large.decorator.js","sourceRoot":"","sources":["../../../../lib/decorators/errors/payload-too-large.decorator.ts"],"names":[],"mappings":";;AAOA,8CAEC;AARD,wDAA2C;AAC3C,2CAA0C;AAK1C,SAAgB,iBAAiB,CAAC,GAAG,IAAW;IAC9C,OAAO,IAAA,yBAAO,EAAC,mBAAU,CAAC,iBAAiB,EAAE,GAAG,IAAI,CAAC,CAAC;AACxD,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IOpenApiErrorOptions, IOpenApiErrorType } from "../../interfaces/common.interface";
|
|
2
|
+
export declare function OAPaymentRequired(options?: Omit<IOpenApiErrorOptions, 'status'>): ClassDecorator & MethodDecorator;
|
|
3
|
+
export declare function OAPaymentRequired(description: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'description'>): ClassDecorator & MethodDecorator;
|
|
4
|
+
export declare function OAPaymentRequired(error: IOpenApiErrorType, description?: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'type' | 'description'>): ClassDecorator & MethodDecorator;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OAPaymentRequired = OAPaymentRequired;
|
|
4
|
+
const error_decorator_1 = require("../error.decorator");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
function OAPaymentRequired(...args) {
|
|
7
|
+
return (0, error_decorator_1.OAError)(common_1.HttpStatus.PAYMENT_REQUIRED, ...args);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=payment-required.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-required.decorator.js","sourceRoot":"","sources":["../../../../lib/decorators/errors/payment-required.decorator.ts"],"names":[],"mappings":";;AAOA,8CAEC;AARD,wDAA2C;AAC3C,2CAA0C;AAK1C,SAAgB,iBAAiB,CAAC,GAAG,IAAW;IAC9C,OAAO,IAAA,yBAAO,EAAC,mBAAU,CAAC,gBAAgB,EAAE,GAAG,IAAI,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IOpenApiErrorOptions, IOpenApiErrorType } from "../../interfaces/common.interface";
|
|
2
|
+
export declare function OAPreconditionFailed(options?: Omit<IOpenApiErrorOptions, 'status'>): ClassDecorator & MethodDecorator;
|
|
3
|
+
export declare function OAPreconditionFailed(description: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'description'>): ClassDecorator & MethodDecorator;
|
|
4
|
+
export declare function OAPreconditionFailed(error: IOpenApiErrorType, description?: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'type' | 'description'>): ClassDecorator & MethodDecorator;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OAPreconditionFailed = OAPreconditionFailed;
|
|
4
|
+
const error_decorator_1 = require("../error.decorator");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
function OAPreconditionFailed(...args) {
|
|
7
|
+
return (0, error_decorator_1.OAError)(common_1.HttpStatus.PRECONDITION_FAILED, ...args);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=precondition-failed.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"precondition-failed.decorator.js","sourceRoot":"","sources":["../../../../lib/decorators/errors/precondition-failed.decorator.ts"],"names":[],"mappings":";;AAOA,oDAEC;AARD,wDAA2C;AAC3C,2CAA0C;AAK1C,SAAgB,oBAAoB,CAAC,GAAG,IAAW;IACjD,OAAO,IAAA,yBAAO,EAAC,mBAAU,CAAC,mBAAmB,EAAE,GAAG,IAAI,CAAC,CAAC;AAC1D,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IOpenApiErrorOptions, IOpenApiErrorType } from "../../interfaces/common.interface";
|
|
2
|
+
export declare function OARequestTimeout(options?: Omit<IOpenApiErrorOptions, 'status'>): ClassDecorator & MethodDecorator;
|
|
3
|
+
export declare function OARequestTimeout(description: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'description'>): ClassDecorator & MethodDecorator;
|
|
4
|
+
export declare function OARequestTimeout(error: IOpenApiErrorType, description?: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'type' | 'description'>): ClassDecorator & MethodDecorator;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OARequestTimeout = OARequestTimeout;
|
|
4
|
+
const error_decorator_1 = require("../error.decorator");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
function OARequestTimeout(...args) {
|
|
7
|
+
return (0, error_decorator_1.OAError)(common_1.HttpStatus.REQUEST_TIMEOUT, ...args);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=request-timeout.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request-timeout.decorator.js","sourceRoot":"","sources":["../../../../lib/decorators/errors/request-timeout.decorator.ts"],"names":[],"mappings":";;AAOA,4CAEC;AARD,wDAA2C;AAC3C,2CAA0C;AAK1C,SAAgB,gBAAgB,CAAC,GAAG,IAAW;IAC7C,OAAO,IAAA,yBAAO,EAAC,mBAAU,CAAC,eAAe,EAAE,GAAG,IAAI,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IOpenApiErrorOptions, IOpenApiErrorType } from "../../interfaces/common.interface";
|
|
2
|
+
export declare function OAServiceUnavailable(options?: Omit<IOpenApiErrorOptions, 'status'>): ClassDecorator & MethodDecorator;
|
|
3
|
+
export declare function OAServiceUnavailable(description: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'description'>): ClassDecorator & MethodDecorator;
|
|
4
|
+
export declare function OAServiceUnavailable(error: IOpenApiErrorType, description?: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'type' | 'description'>): ClassDecorator & MethodDecorator;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OAServiceUnavailable = OAServiceUnavailable;
|
|
4
|
+
const error_decorator_1 = require("../error.decorator");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
function OAServiceUnavailable(...args) {
|
|
7
|
+
return (0, error_decorator_1.OAError)(common_1.HttpStatus.SERVICE_UNAVAILABLE, ...args);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=service-unavailable.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-unavailable.decorator.js","sourceRoot":"","sources":["../../../../lib/decorators/errors/service-unavailable.decorator.ts"],"names":[],"mappings":";;AAOA,oDAEC;AARD,wDAA2C;AAC3C,2CAA0C;AAK1C,SAAgB,oBAAoB,CAAC,GAAG,IAAW;IACjD,OAAO,IAAA,yBAAO,EAAC,mBAAU,CAAC,mBAAmB,EAAE,GAAG,IAAI,CAAC,CAAC;AAC1D,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IOpenApiErrorOptions, IOpenApiErrorType } from "../../interfaces/common.interface";
|
|
2
|
+
export declare function OATooManyRequests(options?: Omit<IOpenApiErrorOptions, 'status'>): ClassDecorator & MethodDecorator;
|
|
3
|
+
export declare function OATooManyRequests(description: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'description'>): ClassDecorator & MethodDecorator;
|
|
4
|
+
export declare function OATooManyRequests(error: IOpenApiErrorType, description?: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'type' | 'description'>): ClassDecorator & MethodDecorator;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OATooManyRequests = OATooManyRequests;
|
|
4
|
+
const error_decorator_1 = require("../error.decorator");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
function OATooManyRequests(...args) {
|
|
7
|
+
return (0, error_decorator_1.OAError)(common_1.HttpStatus.TOO_MANY_REQUESTS, ...args);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=too-many-requests.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"too-many-requests.decorator.js","sourceRoot":"","sources":["../../../../lib/decorators/errors/too-many-requests.decorator.ts"],"names":[],"mappings":";;AAOA,8CAEC;AARD,wDAA2C;AAC3C,2CAA0C;AAK1C,SAAgB,iBAAiB,CAAC,GAAG,IAAW;IAC9C,OAAO,IAAA,yBAAO,EAAC,mBAAU,CAAC,iBAAiB,EAAE,GAAG,IAAI,CAAC,CAAC;AACxD,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IOpenApiErrorOptions, IOpenApiErrorType } from "../../interfaces/common.interface";
|
|
2
|
+
export declare function OAUnauthorized(options?: Omit<IOpenApiErrorOptions, 'status'>): ClassDecorator & MethodDecorator;
|
|
3
|
+
export declare function OAUnauthorized(description: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'description'>): ClassDecorator & MethodDecorator;
|
|
4
|
+
export declare function OAUnauthorized(error: IOpenApiErrorType, description?: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'type' | 'description'>): ClassDecorator & MethodDecorator;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OAUnauthorized = OAUnauthorized;
|
|
4
|
+
const error_decorator_1 = require("../error.decorator");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
function OAUnauthorized(...args) {
|
|
7
|
+
return (0, error_decorator_1.OAError)(common_1.HttpStatus.UNAUTHORIZED, ...args);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=unauthorized.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unauthorized.decorator.js","sourceRoot":"","sources":["../../../../lib/decorators/errors/unauthorized.decorator.ts"],"names":[],"mappings":";;AAOA,wCAEC;AARD,wDAA2C;AAC3C,2CAA0C;AAK1C,SAAgB,cAAc,CAAC,GAAG,IAAW;IAC3C,OAAO,IAAA,yBAAO,EAAC,mBAAU,CAAC,YAAY,EAAE,GAAG,IAAI,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IOpenApiErrorOptions, IOpenApiErrorType } from "../../interfaces/common.interface";
|
|
2
|
+
export declare function OAUnprocessableEntity(options?: Omit<IOpenApiErrorOptions, 'status'>): ClassDecorator & MethodDecorator;
|
|
3
|
+
export declare function OAUnprocessableEntity(description: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'description'>): ClassDecorator & MethodDecorator;
|
|
4
|
+
export declare function OAUnprocessableEntity(error: IOpenApiErrorType, description?: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'type' | 'description'>): ClassDecorator & MethodDecorator;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OAUnprocessableEntity = OAUnprocessableEntity;
|
|
4
|
+
const error_decorator_1 = require("../error.decorator");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
function OAUnprocessableEntity(...args) {
|
|
7
|
+
return (0, error_decorator_1.OAError)(common_1.HttpStatus.UNPROCESSABLE_ENTITY, ...args);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=unprocessable-entity.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unprocessable-entity.decorator.js","sourceRoot":"","sources":["../../../../lib/decorators/errors/unprocessable-entity.decorator.ts"],"names":[],"mappings":";;AAOA,sDAEC;AARD,wDAA2C;AAC3C,2CAA0C;AAK1C,SAAgB,qBAAqB,CAAC,GAAG,IAAW;IAClD,OAAO,IAAA,yBAAO,EAAC,mBAAU,CAAC,oBAAoB,EAAE,GAAG,IAAI,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IOpenApiErrorOptions, IOpenApiErrorType } from "../../interfaces/common.interface";
|
|
2
|
+
export declare function OAUnsupportedMediaType(options?: Omit<IOpenApiErrorOptions, 'status'>): ClassDecorator & MethodDecorator;
|
|
3
|
+
export declare function OAUnsupportedMediaType(description: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'description'>): ClassDecorator & MethodDecorator;
|
|
4
|
+
export declare function OAUnsupportedMediaType(error: IOpenApiErrorType, description?: string, options?: Omit<IOpenApiErrorOptions, 'status' | 'type' | 'description'>): ClassDecorator & MethodDecorator;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OAUnsupportedMediaType = OAUnsupportedMediaType;
|
|
4
|
+
const error_decorator_1 = require("../error.decorator");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
function OAUnsupportedMediaType(...args) {
|
|
7
|
+
return (0, error_decorator_1.OAError)(common_1.HttpStatus.UNSUPPORTED_MEDIA_TYPE, ...args);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=unsupported-media-type.decorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unsupported-media-type.decorator.js","sourceRoot":"","sources":["../../../../lib/decorators/errors/unsupported-media-type.decorator.ts"],"names":[],"mappings":";;AAOA,wDAEC;AARD,wDAA2C;AAC3C,2CAA0C;AAK1C,SAAgB,sBAAsB,CAAC,GAAG,IAAW;IACnD,OAAO,IAAA,yBAAO,EAAC,mBAAU,CAAC,sBAAsB,EAAE,GAAG,IAAI,CAAC,CAAC;AAC7D,CAAC"}
|