@klerick/json-api-nestjs 10.0.0-beta.11 → 10.0.0-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/package.json +3 -2
- package/src/index.d.ts +1 -1
- package/src/index.js +2 -1
- package/src/index.js.map +1 -1
- package/src/lib/modules/mixin/decorators/index.d.ts +1 -0
- package/src/lib/modules/mixin/decorators/index.js +1 -0
- package/src/lib/modules/mixin/decorators/index.js.map +1 -1
- package/src/lib/modules/mixin/decorators/json-api-response-from/json-api-response-from.decorator.d.ts +19 -0
- package/src/lib/modules/mixin/decorators/json-api-response-from/json-api-response-from.decorator.js +35 -0
- package/src/lib/modules/mixin/decorators/json-api-response-from/json-api-response-from.decorator.js.map +1 -0
- package/src/lib/modules/mixin/service/json-api-transformer.service.d.ts +2 -2
- package/src/lib/modules/mixin/service/json-api-transformer.service.js.map +1 -1
- package/src/lib/modules/mixin/swagger/error-response-model.d.ts +49 -0
- package/src/lib/modules/mixin/swagger/error-response-model.js +125 -0
- package/src/lib/modules/mixin/swagger/error-response-model.js.map +1 -0
- package/src/lib/modules/mixin/swagger/method/delete-one.js +3 -3
- package/src/lib/modules/mixin/swagger/method/delete-one.js.map +1 -1
- package/src/lib/modules/mixin/swagger/method/delete-relationship.js +4 -4
- package/src/lib/modules/mixin/swagger/method/delete-relationship.js.map +1 -1
- package/src/lib/modules/mixin/swagger/method/get-all.js +2 -1
- package/src/lib/modules/mixin/swagger/method/get-all.js.map +1 -1
- package/src/lib/modules/mixin/swagger/method/get-one.js +3 -2
- package/src/lib/modules/mixin/swagger/method/get-one.js.map +1 -1
- package/src/lib/modules/mixin/swagger/method/get-relationship.js +4 -3
- package/src/lib/modules/mixin/swagger/method/get-relationship.js.map +1 -1
- package/src/lib/modules/mixin/swagger/method/patch-one.js +3 -2
- package/src/lib/modules/mixin/swagger/method/patch-one.js.map +1 -1
- package/src/lib/modules/mixin/swagger/method/patch-relationship.js +4 -3
- package/src/lib/modules/mixin/swagger/method/patch-relationship.js.map +1 -1
- package/src/lib/modules/mixin/swagger/method/post-one.js +3 -2
- package/src/lib/modules/mixin/swagger/method/post-one.js.map +1 -1
- package/src/lib/modules/mixin/swagger/method/post-relationship.js +4 -3
- package/src/lib/modules/mixin/swagger/method/post-relationship.js.map +1 -1
- package/src/lib/modules/mixin/swagger/swagger-bind.service.d.ts +1 -0
- package/src/lib/modules/mixin/swagger/swagger-bind.service.js +38 -0
- package/src/lib/modules/mixin/swagger/swagger-bind.service.js.map +1 -1
- package/src/lib/modules/mixin/swagger/utils.d.ts +2 -40
- package/src/lib/modules/mixin/swagger/utils.js +1 -39
- package/src/lib/modules/mixin/swagger/utils.js.map +1 -1
- package/src/lib/modules/mixin/zod/zod-input-query-schema/filter.d.ts +4 -4
- package/src/lib/modules/mixin/zod/zod-input-query-schema/index.d.ts +4 -4
- package/src/lib/modules/mixin/zod/zod-query-schema/include.d.ts +9 -2
- package/src/lib/modules/mixin/zod/zod-query-schema/include.js +2 -1
- package/src/lib/modules/mixin/zod/zod-query-schema/include.js.map +1 -1
- package/src/lib/types/entity-param.type.d.ts +7 -7
|
@@ -7,6 +7,7 @@ const types_1 = require("../../../../types");
|
|
|
7
7
|
const utils_1 = require("../utils");
|
|
8
8
|
const zod_2 = require("../../zod");
|
|
9
9
|
const decorators_1 = require("../../decorators");
|
|
10
|
+
const error_response_model_1 = require("../error-response-model");
|
|
10
11
|
function patchOne(controller, descriptor, entity, mapEntity, methodName) {
|
|
11
12
|
const entityName = entity.name;
|
|
12
13
|
const primaryColumnType = mapEntity.entityParaMap.primaryColumnType;
|
|
@@ -35,12 +36,12 @@ function patchOne(controller, descriptor, entity, mapEntity, methodName) {
|
|
|
35
36
|
(0, swagger_1.ApiResponse)({
|
|
36
37
|
status: 400,
|
|
37
38
|
description: 'Wrong body parameters',
|
|
38
|
-
schema:
|
|
39
|
+
schema: { $ref: (0, swagger_1.getSchemaPath)(error_response_model_1.JsonApiErrorResponseModel) },
|
|
39
40
|
})(controller, methodName, descriptor);
|
|
40
41
|
(0, swagger_1.ApiResponse)({
|
|
41
42
|
status: 422,
|
|
42
43
|
description: 'Unprocessable data',
|
|
43
|
-
schema:
|
|
44
|
+
schema: { $ref: (0, swagger_1.getSchemaPath)(error_response_model_1.JsonApiErrorResponseModel) },
|
|
44
45
|
})(controller, methodName, descriptor);
|
|
45
46
|
}
|
|
46
47
|
//# sourceMappingURL=patch-one.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patch-one.js","sourceRoot":"","sources":["../../../../../../../../../../libs/json-api/json-api-nestjs/src/lib/modules/mixin/swagger/method/patch-one.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"patch-one.js","sourceRoot":"","sources":["../../../../../../../../../../libs/json-api/json-api-nestjs/src/lib/modules/mixin/swagger/method/patch-one.ts"],"names":[],"mappings":";;AAiCA,4BAuDC;AAvFD,6BAAwB;AAKxB,6CAMyB;AAGzB,6CAI2B;AAE3B,oCAGkB;AAClB,mCAAqC;AAErC,iDAG0B;AAC1B,kEAAoE;AAEpE,SAAgB,QAAQ,CACtB,UAAqB,EACrB,UAA8B,EAC9B,MAAsB,EACtB,SAA0C,EAC1C,UAAkB;IAElB,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC;IAE/B,MAAM,iBAAiB,GAAG,SAAS,CAAC,aAAa,CAAC,iBAAiB,CAAC;IACpE,MAAM,aAAa,GAAG,IAAA,qCAAwB,EAC5C,MAAM,CAC4B,CAAC;IACrC,MAAM,cAAc,GAAG,IAAA,sCAAyB,EAC9C,MAAM,CAC6B,CAAC;IAEtC,IAAA,sBAAY,EAAC;QACX,OAAO,EAAE,4BAA4B,UAAU,GAAG;QAClD,WAAW,EAAE,GAAG,UAAU,CAAC,WAAW,CAAC,IAAI,IAAI,UAAU,EAAE;KAC5D,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;IAE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
|
6
6
|
const types_1 = require("../../../../types");
|
|
7
7
|
const utils_1 = require("../utils");
|
|
8
8
|
const zod_2 = require("../../zod");
|
|
9
|
+
const error_response_model_1 = require("../error-response-model");
|
|
9
10
|
function patchRelationship(controller, descriptor, entity, mapEntity, methodName) {
|
|
10
11
|
const entityName = entity.name;
|
|
11
12
|
const { relations, primaryColumnType } = mapEntity.getParamMap(entity);
|
|
@@ -39,17 +40,17 @@ function patchRelationship(controller, descriptor, entity, mapEntity, methodName
|
|
|
39
40
|
(0, swagger_1.ApiResponse)({
|
|
40
41
|
status: 400,
|
|
41
42
|
description: 'Wrong url parameters',
|
|
42
|
-
schema:
|
|
43
|
+
schema: { $ref: (0, swagger_1.getSchemaPath)(error_response_model_1.JsonApiErrorResponseModel) },
|
|
43
44
|
})(controller.prototype, methodName, descriptor);
|
|
44
45
|
(0, swagger_1.ApiResponse)({
|
|
45
46
|
status: 422,
|
|
46
47
|
description: 'Incorrect type for relation',
|
|
47
|
-
schema:
|
|
48
|
+
schema: { $ref: (0, swagger_1.getSchemaPath)(error_response_model_1.JsonApiErrorResponseModel) },
|
|
48
49
|
})(controller.prototype, methodName, descriptor);
|
|
49
50
|
(0, swagger_1.ApiResponse)({
|
|
50
51
|
status: 404,
|
|
51
52
|
description: 'Resource not found ',
|
|
52
|
-
schema:
|
|
53
|
+
schema: { $ref: (0, swagger_1.getSchemaPath)(error_response_model_1.JsonApiErrorResponseModel) },
|
|
53
54
|
})(controller.prototype, methodName, descriptor);
|
|
54
55
|
}
|
|
55
56
|
//# sourceMappingURL=patch-relationship.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patch-relationship.js","sourceRoot":"","sources":["../../../../../../../../../../libs/json-api/json-api-nestjs/src/lib/modules/mixin/swagger/method/patch-relationship.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"patch-relationship.js","sourceRoot":"","sources":["../../../../../../../../../../libs/json-api/json-api-nestjs/src/lib/modules/mixin/swagger/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,IAAI;KACf,CAAC,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;IAEjD,IAAA,qBAAW,EAAC;QACV,MAAM,EAAE,GAAG;QACX,MAAM,EAAE,6BAAqB;QAC7B,WAAW,EAAE,2BAA2B,UAAU,oBAAoB;KACvE,CAAC,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;IAEjD,IAAA,qBAAW,EAAC;QACV,MAAM,EAAE,GAAG;QACX,WAAW,EAAE,sBAAsB;QACnC,MAAM,EAAE,EAAE,IAAI,EAAE,IAAA,uBAAa,EAAC,gDAAyB,CAAC,EAAE;KAC3D,CAAC,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;IAEjD,IAAA,qBAAW,EAAC;QACV,MAAM,EAAE,GAAG;QACX,WAAW,EAAE,6BAA6B;QAC1C,MAAM,EAAE,EAAE,IAAI,EAAE,IAAA,uBAAa,EAAC,gDAAyB,CAAC,EAAE;KAC3D,CAAC,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;IAEjD,IAAA,qBAAW,EAAC;QACV,MAAM,EAAE,GAAG;QACX,WAAW,EAAE,qBAAqB;QAClC,MAAM,EAAE,EAAE,IAAI,EAAE,IAAA,uBAAa,EAAC,gDAAyB,CAAC,EAAE;KAC3D,CAAC,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -6,6 +6,7 @@ const zod_1 = require("zod");
|
|
|
6
6
|
const utils_1 = require("../utils");
|
|
7
7
|
const zod_2 = require("../../zod");
|
|
8
8
|
const decorators_1 = require("../../decorators");
|
|
9
|
+
const error_response_model_1 = require("../error-response-model");
|
|
9
10
|
function postOne(controller, descriptor, entity, mapEntity, methodName) {
|
|
10
11
|
const entityName = entity.name;
|
|
11
12
|
const readOnlyProps = (0, decorators_1.getJsonApiReadOnlyFields)(entity);
|
|
@@ -27,12 +28,12 @@ function postOne(controller, descriptor, entity, mapEntity, methodName) {
|
|
|
27
28
|
(0, swagger_1.ApiResponse)({
|
|
28
29
|
status: 400,
|
|
29
30
|
description: 'Wrong body parameters',
|
|
30
|
-
schema:
|
|
31
|
+
schema: { $ref: (0, swagger_1.getSchemaPath)(error_response_model_1.JsonApiErrorResponseModel) },
|
|
31
32
|
})(controller, methodName, descriptor);
|
|
32
33
|
(0, swagger_1.ApiResponse)({
|
|
33
34
|
status: 422,
|
|
34
35
|
description: 'Unprocessable data',
|
|
35
|
-
schema:
|
|
36
|
+
schema: { $ref: (0, swagger_1.getSchemaPath)(error_response_model_1.JsonApiErrorResponseModel) },
|
|
36
37
|
})(controller, methodName, descriptor);
|
|
37
38
|
}
|
|
38
39
|
//# sourceMappingURL=post-one.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-one.js","sourceRoot":"","sources":["../../../../../../../../../../libs/json-api/json-api-nestjs/src/lib/modules/mixin/swagger/method/post-one.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"post-one.js","sourceRoot":"","sources":["../../../../../../../../../../libs/json-api/json-api-nestjs/src/lib/modules/mixin/swagger/method/post-one.ts"],"names":[],"mappings":";;AAwBA,0BA+CC;AAvED,6CAKyB;AACzB,6BAAwB;AAQxB,oCAGkB;AAClB,mCAAoC;AAEpC,iDAAuF;AAEvF,kEAAoE;AAEpE,SAAgB,OAAO,CACrB,UAAqB,EACrB,UAA8B,EAC9B,MAAsB,EACtB,SAA0C,EAC1C,UAAkB;IAElB,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC;IAE/B,MAAM,aAAa,GAAG,IAAA,qCAAwB,EAC5C,MAAM,CAC4B,CAAC;IACrC,MAAM,cAAc,GAAG,IAAA,sCAAyB,EAC9C,MAAM,CAC6B,CAAC;IAEtC,IAAA,sBAAY,EAAC;QACX,OAAO,EAAE,4BAA4B,UAAU,GAAG;QAClD,WAAW,EAAE,GAAG,UAAU,CAAC,WAAW,CAAC,IAAI,IAAI,UAAU,EAAE;KAC5D,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;IAEvC,IAAA,iBAAO,EAAC;QACN,WAAW,EAAE,4BAA4B,UAAU,QAAQ;QAC3D,MAAM,EAAE,OAAC,CAAC,YAAY,CACpB,IAAA,aAAO,EAAC,SAAS,EAAE,aAAa,EAAE,cAAc,CAAC,EACjD,6BAAqB,CACY;QACnC,QAAQ,EAAE,IAAI;KACf,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;IAEvC,IAAA,qBAAW,EAAC;QACV,MAAM,EAAE,GAAG;QACX,WAAW,EAAE,qBAAqB,UAAU,oBAAoB;QAChE,MAAM,EAAE,IAAA,0BAAkB,EAAC,MAAM,EAAE,SAAS,CAAC;KAC9C,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;IAEvC,IAAA,qBAAW,EAAC;QACV,MAAM,EAAE,GAAG;QACX,WAAW,EAAE,uBAAuB;QACpC,MAAM,EAAE,EAAE,IAAI,EAAE,IAAA,uBAAa,EAAC,gDAAyB,CAAC,EAAE;KAC3D,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;IAEvC,IAAA,qBAAW,EAAC;QACV,MAAM,EAAE,GAAG;QACX,WAAW,EAAE,oBAAoB;QACjC,MAAM,EAAE,EAAE,IAAI,EAAE,IAAA,uBAAa,EAAC,gDAAyB,CAAC,EAAE;KAC3D,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;AACzC,CAAC"}
|
|
@@ -6,6 +6,7 @@ const swagger_1 = require("@nestjs/swagger");
|
|
|
6
6
|
const utils_1 = require("../utils");
|
|
7
7
|
const zod_2 = require("../../zod");
|
|
8
8
|
const types_1 = require("../../../../types");
|
|
9
|
+
const error_response_model_1 = require("../error-response-model");
|
|
9
10
|
function postRelationship(controller, descriptor, entity, mapEntity, methodName) {
|
|
10
11
|
const entityName = entity.name;
|
|
11
12
|
const { relations, primaryColumnType } = mapEntity.getParamMap(entity);
|
|
@@ -39,17 +40,17 @@ function postRelationship(controller, descriptor, entity, mapEntity, methodName)
|
|
|
39
40
|
(0, swagger_1.ApiResponse)({
|
|
40
41
|
status: 400,
|
|
41
42
|
description: 'Wrong url parameters',
|
|
42
|
-
schema:
|
|
43
|
+
schema: { $ref: (0, swagger_1.getSchemaPath)(error_response_model_1.JsonApiErrorResponseModel) },
|
|
43
44
|
})(controller, methodName, descriptor);
|
|
44
45
|
(0, swagger_1.ApiResponse)({
|
|
45
46
|
status: 422,
|
|
46
47
|
description: 'Incorrect type for relation',
|
|
47
|
-
schema:
|
|
48
|
+
schema: { $ref: (0, swagger_1.getSchemaPath)(error_response_model_1.JsonApiErrorResponseModel) },
|
|
48
49
|
})(controller, methodName, descriptor);
|
|
49
50
|
(0, swagger_1.ApiResponse)({
|
|
50
51
|
status: 404,
|
|
51
52
|
description: 'Resource not found ',
|
|
52
|
-
schema:
|
|
53
|
+
schema: { $ref: (0, swagger_1.getSchemaPath)(error_response_model_1.JsonApiErrorResponseModel) },
|
|
53
54
|
})(controller, methodName, descriptor);
|
|
54
55
|
}
|
|
55
56
|
//# sourceMappingURL=post-relationship.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-relationship.js","sourceRoot":"","sources":["../../../../../../../../../../libs/json-api/json-api-nestjs/src/lib/modules/mixin/swagger/method/post-relationship.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"post-relationship.js","sourceRoot":"","sources":["../../../../../../../../../../libs/json-api/json-api-nestjs/src/lib/modules/mixin/swagger/method/post-relationship.ts"],"names":[],"mappings":";;AAqBA,4CA8DC;AAlFD,6BAAwB;AAKxB,6CAMyB;AAGzB,oCAAiD;AACjD,mCAAiD;AACjD,6CAA8C;AAE9C,kEAAoE;AAEpE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UAAU,oBAAoB;KACvE,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;IAEvC,IAAA,qBAAW,EAAC;QACV,MAAM,EAAE,GAAG;QACX,WAAW,EAAE,sBAAsB;QACnC,MAAM,EAAE,EAAE,IAAI,EAAE,IAAA,uBAAa,EAAC,gDAAyB,CAAC,EAAE;KAC3D,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;IAEvC,IAAA,qBAAW,EAAC;QACV,MAAM,EAAE,GAAG;QACX,WAAW,EAAE,6BAA6B;QAC1C,MAAM,EAAE,EAAE,IAAI,EAAE,IAAA,uBAAa,EAAC,gDAAyB,CAAC,EAAE;KAC3D,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;IAEvC,IAAA,qBAAW,EAAC;QACV,MAAM,EAAE,GAAG;QACX,WAAW,EAAE,qBAAqB;QAClC,MAAM,EAAE,EAAE,IAAI,EAAE,IAAA,uBAAa,EAAC,gDAAyB,CAAC,EAAE;KAC3D,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;AACzC,CAAC"}
|
|
@@ -16,6 +16,8 @@ const utils_1 = require("./utils");
|
|
|
16
16
|
const bindings_1 = require("../config/bindings");
|
|
17
17
|
const method_1 = require("./method");
|
|
18
18
|
const service_1 = require("../service");
|
|
19
|
+
const error_response_model_1 = require("./error-response-model");
|
|
20
|
+
const decorators_1 = require("../decorators");
|
|
19
21
|
let SwaggerBindService = class SwaggerBindService {
|
|
20
22
|
entity;
|
|
21
23
|
discoveryService;
|
|
@@ -43,6 +45,7 @@ let SwaggerBindService = class SwaggerBindService {
|
|
|
43
45
|
}
|
|
44
46
|
(0, swagger_1.ApiTags)(this.entity.name)(controller);
|
|
45
47
|
(0, swagger_1.ApiExtraModels)(filter_operand_model_1.FilterOperand)(controller);
|
|
48
|
+
(0, swagger_1.ApiExtraModels)(error_response_model_1.JsonApiErrorResponseModel)(controller);
|
|
46
49
|
(0, swagger_1.ApiExtraModels)((0, utils_1.createApiModels)(this.entity, mapProps))(controller);
|
|
47
50
|
const { allowMethod = json_api_nestjs_shared_1.ObjectTyped.keys(bindings_1.Bindings) } = this.config;
|
|
48
51
|
for (const method of json_api_nestjs_shared_1.ObjectTyped.keys(bindings_1.Bindings)) {
|
|
@@ -56,6 +59,41 @@ let SwaggerBindService = class SwaggerBindService {
|
|
|
56
59
|
method_1.swaggerMethod[method](controller.prototype, descriptor, this.entity, this.mapEntity, method);
|
|
57
60
|
Reflect.defineMetadata(constants_2.PARAMTYPES_METADATA, [Object], controller.prototype, method);
|
|
58
61
|
}
|
|
62
|
+
// Process JsonApiResponseFrom decorators on custom methods
|
|
63
|
+
this.processJsonApiResponseFrom(controller);
|
|
64
|
+
}
|
|
65
|
+
processJsonApiResponseFrom(controller) {
|
|
66
|
+
const responseMeta = Reflect.getMetadata(decorators_1.JSON_API_RESPONSE_FROM, controller);
|
|
67
|
+
if (!responseMeta)
|
|
68
|
+
return;
|
|
69
|
+
const prototype = controller.prototype;
|
|
70
|
+
for (const [targetMethod, sourceMapping] of Object.entries(responseMeta)) {
|
|
71
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(prototype, targetMethod);
|
|
72
|
+
if (!descriptor)
|
|
73
|
+
continue;
|
|
74
|
+
const targetResponses = Reflect.getMetadata(constants_1.DECORATORS.API_RESPONSE, descriptor.value);
|
|
75
|
+
if (!targetResponses)
|
|
76
|
+
continue;
|
|
77
|
+
for (const [sourceMethod, mappings] of Object.entries(sourceMapping)) {
|
|
78
|
+
const sourceDescriptor = Reflect.getOwnPropertyDescriptor(prototype, sourceMethod);
|
|
79
|
+
if (!sourceDescriptor)
|
|
80
|
+
continue;
|
|
81
|
+
const sourceResponses = Reflect.getMetadata(constants_1.DECORATORS.API_RESPONSE, sourceDescriptor.value);
|
|
82
|
+
if (!sourceResponses || !mappings)
|
|
83
|
+
continue;
|
|
84
|
+
for (const { fromStatus, toStatus } of [...mappings]) {
|
|
85
|
+
const sourceResponse = sourceResponses[fromStatus];
|
|
86
|
+
if (!sourceResponse?.schema)
|
|
87
|
+
continue;
|
|
88
|
+
const existingTarget = targetResponses[toStatus] || {};
|
|
89
|
+
(0, swagger_1.ApiResponse)({
|
|
90
|
+
status: toStatus,
|
|
91
|
+
...existingTarget,
|
|
92
|
+
schema: sourceResponse.schema,
|
|
93
|
+
})(prototype, targetMethod, descriptor);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
59
97
|
}
|
|
60
98
|
};
|
|
61
99
|
exports.SwaggerBindService = SwaggerBindService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swagger-bind.service.js","sourceRoot":"","sources":["../../../../../../../../../libs/json-api/json-api-nestjs/src/lib/modules/mixin/swagger/swagger-bind.service.ts"],"names":[],"mappings":";;;;AAAA,2CAAkE;AAClE,8DAA4D;AAC5D,
|
|
1
|
+
{"version":3,"file":"swagger-bind.service.js","sourceRoot":"","sources":["../../../../../../../../../libs/json-api/json-api-nestjs/src/lib/modules/mixin/swagger/swagger-bind.service.ts"],"names":[],"mappings":";;;;AAAA,2CAAkE;AAClE,8DAA4D;AAC5D,6CAAuE;AACvE,uCAAgD;AAChD,4EAA2E;AAC3E,wDAA+D;AAE/D,kDAK4B;AAC5B,wCAAqD;AACrD,gDAAoD;AAEpD,iEAAuD;AACvD,mCAA0C;AAC1C,iDAA8C;AAE9C,qCAAyC;AACzC,wCAAmD;AACnD,iEAAmE;AACnE,8CAGuB;AAGhB,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAGG,MAAM,CAAkB;IACtB,gBAAgB,CAAoB;IAC5B,MAAM,CAAoB;IAE7B,SAAS,CAG9C;IAEF,YAAY;QACV,IAAI,CAAC,WAAW,EAAE,CAAC;IACrB,CAAC;IAEM,WAAW;QAChB,MAAM,cAAc,GAAG,IAAA,gBAAM,EAC3B,IAAA,yBAAe,EAAC,IAAI,CAAC,MAAM,E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CAAC;sCAA4B,uBAAgB;4DAAC;AAC5B;IAAzC,IAAA,eAAM,EAAC,oCAAwB,CAAC;;kDAAmC;AAE7B;IAAtC,IAAA,eAAM,EAAC,+BAAqB,CAAC;sCAAqB,+BAAqB;qDAGtE;6BAVS,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;GACA,kBAAkB,CAqI9B"}
|
|
@@ -1,49 +1,11 @@
|
|
|
1
1
|
import { SchemaObject } from '@nestjs/swagger/dist/interfaces/open-api-spec.interface';
|
|
2
|
-
import { AnyEntity, EntityClass,
|
|
2
|
+
import { AnyEntity, EntityClass, AttrKeys } from '@klerick/json-api-nestjs-shared';
|
|
3
3
|
import { EntityParam } from '../../../types';
|
|
4
4
|
import { EntityParamMap } from '../types';
|
|
5
5
|
import { EntityParamMapService } from '../service';
|
|
6
6
|
import { toJSONSchema } from 'zod';
|
|
7
7
|
export declare function assertIsKeysOfObject<E extends object>(object: EntityClass<E>, element: any): asserts element is readonly [keyof E];
|
|
8
|
-
export declare function assertIsKeyOfObject<E extends object>(object: EntityClass<E>, element: unknown): asserts element is
|
|
9
|
-
export declare const errorSchema: {
|
|
10
|
-
type: string;
|
|
11
|
-
properties: {
|
|
12
|
-
statusCode: {
|
|
13
|
-
type: string;
|
|
14
|
-
};
|
|
15
|
-
error: {
|
|
16
|
-
type: string;
|
|
17
|
-
};
|
|
18
|
-
message: {
|
|
19
|
-
type: string;
|
|
20
|
-
items: {
|
|
21
|
-
type: string;
|
|
22
|
-
properties: {
|
|
23
|
-
code: {
|
|
24
|
-
type: string;
|
|
25
|
-
};
|
|
26
|
-
message: {
|
|
27
|
-
type: string;
|
|
28
|
-
};
|
|
29
|
-
path: {
|
|
30
|
-
type: string;
|
|
31
|
-
items: {
|
|
32
|
-
type: string;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
keys: {
|
|
36
|
-
type: string;
|
|
37
|
-
items: {
|
|
38
|
-
type: string;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
required: string[];
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
};
|
|
8
|
+
export declare function assertIsKeyOfObject<E extends object>(object: EntityClass<E>, element: unknown): asserts element is AttrKeys<E>;
|
|
47
9
|
export declare function jsonSchemaResponse<E extends object, IdKey extends string = 'id'>(entity: EntityClass<E>, mapEntity: EntityParamMapService<E, IdKey>, array?: boolean): {
|
|
48
10
|
type: string;
|
|
49
11
|
properties: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.zodToJSONSchemaParams = exports.schemaTypeForRelation =
|
|
3
|
+
exports.zodToJSONSchemaParams = exports.schemaTypeForRelation = void 0;
|
|
4
4
|
exports.assertIsKeysOfObject = assertIsKeysOfObject;
|
|
5
5
|
exports.assertIsKeyOfObject = assertIsKeyOfObject;
|
|
6
6
|
exports.jsonSchemaResponse = jsonSchemaResponse;
|
|
@@ -22,44 +22,6 @@ function assertIsKeyOfObject(object, element) {
|
|
|
22
22
|
if (false)
|
|
23
23
|
throw new Error(element + 'not exist in ' + object.name);
|
|
24
24
|
}
|
|
25
|
-
exports.errorSchema = {
|
|
26
|
-
type: 'object',
|
|
27
|
-
properties: {
|
|
28
|
-
statusCode: {
|
|
29
|
-
type: 'number',
|
|
30
|
-
},
|
|
31
|
-
error: {
|
|
32
|
-
type: 'string',
|
|
33
|
-
},
|
|
34
|
-
message: {
|
|
35
|
-
type: 'array',
|
|
36
|
-
items: {
|
|
37
|
-
type: 'object',
|
|
38
|
-
properties: {
|
|
39
|
-
code: {
|
|
40
|
-
type: 'string',
|
|
41
|
-
},
|
|
42
|
-
message: {
|
|
43
|
-
type: 'string',
|
|
44
|
-
},
|
|
45
|
-
path: {
|
|
46
|
-
type: 'array',
|
|
47
|
-
items: {
|
|
48
|
-
type: 'string',
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
keys: {
|
|
52
|
-
type: 'array',
|
|
53
|
-
items: {
|
|
54
|
-
type: 'string',
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
required: ['code', 'message', 'path'],
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
};
|
|
63
25
|
function jsonSchemaResponse(entity, mapEntity, array = false) {
|
|
64
26
|
const { propsType, relations, relationProperty, primaryColumnName } = mapEntity.getParamMap(entity);
|
|
65
27
|
assertIsKeysOfObject(entity, relations);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../../../../libs/json-api/json-api-nestjs/src/lib/modules/mixin/swagger/utils.ts"],"names":[],"mappings":";;;AAiBA,oDAQC;AAED,kDAKC;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../../../../libs/json-api/json-api-nestjs/src/lib/modules/mixin/swagger/utils.ts"],"names":[],"mappings":";;;AAiBA,oDAQC;AAED,kDAKC;AAED,gDAiLC;AAED,0CAwDC;AA6BD,8CAOC;AAjTD,6CAA8C;AAE9C,4EAKyC;AACzC,+DAAiD;AAEjD,0CAA0E;AAK1E,gCAAyD;AAEzD,SAAgB,oBAAoB,CAClC,MAAsB,EACtB,OAAY;IAEZ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,OAAO,GAAG,kBAAkB,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAC9D,CAAC;IACD,IAAI,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,OAAO,GAAG,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;AACvE,CAAC;AAED,SAAgB,mBAAmB,CACjC,MAAsB,EACtB,OAAgB;IAEhB,IAAI,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,OAAO,GAAG,eAAe,GAAG,MAAM,CAAC,I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AI,EAAE,OAAO;oBACb,KAAK,EAAE,QAAQ;iBAChB;aACF;SACF;KACF;CACF,CAAC;AAEF,SAAgB,iBAAiB,CAC/B,SAAiD,EACjD,MAAsB;IAEtB,MAAM,SAAS,GAAG,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACxC,IAAI,CAAC,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC3D,OAAO,SAAS,CAAC;AACnB,CAAC;AAGY,QAAA,qBAAqB,GAAuC;IACvE,eAAe,EAAE,KAAK;IACtB,QAAQ,CAAC,GAAG;QACV,MAAM,GAAG,GAAG,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAA;QAElC,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,IAAI;YAAE,OAAM;QAC9B,IAAI,GAAG,CAAC,IAAI,KAAK,WAAW,EAAC,CAAC;YAC5B,MAAM,KAAK,GAAG,qCAA+B,CAAC,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA;YACrE,IAAI,CAAC,KAAK;gBAAE,OAAO;YACnB,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,KAAK,CAAC,CAAA;QACtC,CAAC;IACH,CAAC;CACF,CAAA"}
|
|
@@ -29,7 +29,7 @@ export type ConcatRelationField<E extends object, IdKey extends string> = UnionT
|
|
|
29
29
|
}[keyof EntityRelationProps<E, IdKey>]>;
|
|
30
30
|
export type ShapeArrayInput<E extends object, IdKey extends string> = EntityParam<E, IdKey>['props'] | EntityParam<E, IdKey>['relations'] | ConcatRelationField<E, IdKey>;
|
|
31
31
|
export declare function shapeForArray<E extends object, Z extends ZodType, IdKey extends string, PropsList extends ShapeArrayInput<E, IdKey>>(fields: PropsList, zodSchema: Z): Record<CastPropertyKey<PropsList[number]>, Z>;
|
|
32
|
-
export declare function zodFilterInputQuery<E extends object, IdKey extends string>(entityParamMapService: EntityParamMapService<E, IdKey>): z.ZodPipe<z.ZodOptional<z.ZodObject<Record<CastPropertyKey<UnionToTuple<Exclude<keyof E, import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey
|
|
32
|
+
export declare function zodFilterInputQuery<E extends object, IdKey extends string>(entityParamMapService: EntityParamMapService<E, IdKey>): z.ZodPipe<z.ZodOptional<z.ZodObject<Record<CastPropertyKey<UnionToTuple<Exclude<Exclude<Extract<keyof E, string>, import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey> | { [K in Extract<keyof E, string>]: E[K] extends Function ? K : never; }[Extract<keyof E, string>]>, IdKey>, import("ts-toolbelt/out/Union/Last").Last<Exclude<Exclude<Extract<keyof E, string>, import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey> | { [K in Extract<keyof E, string>]: E[K] extends Function ? K : never; }[Extract<keyof E, string>]>, IdKey>>, [Exclude<Exclude<Extract<keyof E, string>, import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey> | { [K in Extract<keyof E, string>]: E[K] extends Function ? K : never; }[Extract<keyof E, string>]>, IdKey>] extends [never] ? true : false>[number]>, z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>, z.ZodObject<{
|
|
33
33
|
some: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>>;
|
|
34
34
|
in: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>>;
|
|
35
35
|
eq: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>>;
|
|
@@ -45,7 +45,7 @@ export declare function zodFilterInputQuery<E extends object, IdKey extends stri
|
|
|
45
45
|
eq: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"null">, z.ZodNull]>, z.ZodTransform<null, "null" | null>>;
|
|
46
46
|
}, z.core.$strict>, z.ZodObject<{
|
|
47
47
|
ne: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"null">, z.ZodNull]>, z.ZodTransform<null, "null" | null>>;
|
|
48
|
-
}, z.core.$strict>]>>> & Record<CastPropertyKey<UnionToTuple<{ [
|
|
48
|
+
}, z.core.$strict>]>>> & Record<CastPropertyKey<UnionToTuple<{ [K_1 in keyof EntityRelationProps<E, IdKey>]: `${K_1}.${EntityRelationProps<E, IdKey>[K_1][number] & string}`; }[import("@klerick/json-api-nestjs-shared").RelationKeys<E, "id">], import("ts-toolbelt/out/Union/Last").Last<{ [K_1 in keyof EntityRelationProps<E, IdKey>]: `${K_1}.${EntityRelationProps<E, IdKey>[K_1][number] & string}`; }[import("@klerick/json-api-nestjs-shared").RelationKeys<E, "id">]>, [{ [K_1 in keyof EntityRelationProps<E, IdKey>]: `${K_1}.${EntityRelationProps<E, IdKey>[K_1][number] & string}`; }[import("@klerick/json-api-nestjs-shared").RelationKeys<E, "id">]] extends [never] ? true : false>[number]>, z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>, z.ZodObject<{
|
|
49
49
|
some: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>>;
|
|
50
50
|
in: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>>;
|
|
51
51
|
eq: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>>;
|
|
@@ -57,7 +57,7 @@ export declare function zodFilterInputQuery<E extends object, IdKey extends stri
|
|
|
57
57
|
ne: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>>;
|
|
58
58
|
regexp: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>>;
|
|
59
59
|
nin: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>>;
|
|
60
|
-
}, z.core.$strict>]>>> extends infer T ? { -readonly [P in keyof T]: T[P]; } : never, z.core.$strip>>, z.ZodTransform<OutPutFilter, z.core.$InferObjectOutput<Record<CastPropertyKey<UnionToTuple<Exclude<keyof E, import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey
|
|
60
|
+
}, z.core.$strict>]>>> extends infer T ? { -readonly [P in keyof T]: T[P]; } : never, z.core.$strip>>, z.ZodTransform<OutPutFilter, z.core.$InferObjectOutput<Record<CastPropertyKey<UnionToTuple<Exclude<Exclude<Extract<keyof E, string>, import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey> | { [K in Extract<keyof E, string>]: E[K] extends Function ? K : never; }[Extract<keyof E, string>]>, IdKey>, import("ts-toolbelt/out/Union/Last").Last<Exclude<Exclude<Extract<keyof E, string>, import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey> | { [K in Extract<keyof E, string>]: E[K] extends Function ? K : never; }[Extract<keyof E, string>]>, IdKey>>, [Exclude<Exclude<Extract<keyof E, string>, import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey> | { [K in Extract<keyof E, string>]: E[K] extends Function ? K : never; }[Extract<keyof E, string>]>, IdKey>] extends [never] ? true : false>[number]>, z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>, z.ZodObject<{
|
|
61
61
|
some: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>>;
|
|
62
62
|
in: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>>;
|
|
63
63
|
eq: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>>;
|
|
@@ -73,7 +73,7 @@ export declare function zodFilterInputQuery<E extends object, IdKey extends stri
|
|
|
73
73
|
eq: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"null">, z.ZodNull]>, z.ZodTransform<null, "null" | null>>;
|
|
74
74
|
}, z.core.$strict>, z.ZodObject<{
|
|
75
75
|
ne: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"null">, z.ZodNull]>, z.ZodTransform<null, "null" | null>>;
|
|
76
|
-
}, z.core.$strict>]>>> & Record<CastPropertyKey<UnionToTuple<{ [
|
|
76
|
+
}, z.core.$strict>]>>> & Record<CastPropertyKey<UnionToTuple<{ [K_1 in keyof EntityRelationProps<E, IdKey>]: `${K_1}.${EntityRelationProps<E, IdKey>[K_1][number] & string}`; }[import("@klerick/json-api-nestjs-shared").RelationKeys<E, "id">], import("ts-toolbelt/out/Union/Last").Last<{ [K_1 in keyof EntityRelationProps<E, IdKey>]: `${K_1}.${EntityRelationProps<E, IdKey>[K_1][number] & string}`; }[import("@klerick/json-api-nestjs-shared").RelationKeys<E, "id">]>, [{ [K_1 in keyof EntityRelationProps<E, IdKey>]: `${K_1}.${EntityRelationProps<E, IdKey>[K_1][number] & string}`; }[import("@klerick/json-api-nestjs-shared").RelationKeys<E, "id">]] extends [never] ? true : false>[number]>, z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>, z.ZodObject<{
|
|
77
77
|
some: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>>;
|
|
78
78
|
in: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>>;
|
|
79
79
|
eq: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>>;
|
|
@@ -10,7 +10,7 @@ export declare function zodInputQuery<E extends object, IdKey extends string>(en
|
|
|
10
10
|
} & { [P in import("../../../../types").UnionToTuple<import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey>, import("ts-toolbelt/out/Union/Last").Last<import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey>>, [import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey>] extends [never] ? true : false>[number] extends infer T_1 ? T_1 extends import("../../../../types").UnionToTuple<import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey>, import("ts-toolbelt/out/Union/Last").Last<import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey>>, [import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey>] extends [never] ? true : false>[number] ? T_1 extends PropertyKey ? T_1 : never : never : never]: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string[] | undefined, string | undefined>>; }, {}>> | null, z.core.$InferObjectOutput<{
|
|
11
11
|
target: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string[] | undefined, string | undefined>>;
|
|
12
12
|
} & { [P in import("../../../../types").UnionToTuple<import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey>, import("ts-toolbelt/out/Union/Last").Last<import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey>>, [import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey>] extends [never] ? true : false>[number] extends infer T_2 ? T_2 extends import("../../../../types").UnionToTuple<import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey>, import("ts-toolbelt/out/Union/Last").Last<import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey>>, [import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey>] extends [never] ? true : false>[number] ? T_2 extends PropertyKey ? T_2 : never : never : never]: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string[] | undefined, string | undefined>>; }, {}> | undefined>>;
|
|
13
|
-
filter: z.ZodPipe<z.ZodOptional<z.ZodObject<Record<import("../../../../types").UnionToTuple<Exclude<keyof E, import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey
|
|
13
|
+
filter: z.ZodPipe<z.ZodOptional<z.ZodObject<Record<import("../../../../types").UnionToTuple<Exclude<Exclude<Extract<keyof E, string>, import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey> | { [K in Extract<keyof E, string>]: E[K] extends Function ? K : never; }[Extract<keyof E, string>]>, IdKey>, import("ts-toolbelt/out/Union/Last").Last<Exclude<Exclude<Extract<keyof E, string>, import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey> | { [K in Extract<keyof E, string>]: E[K] extends Function ? K : never; }[Extract<keyof E, string>]>, IdKey>>, [Exclude<Exclude<Extract<keyof E, string>, import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey> | { [K in Extract<keyof E, string>]: E[K] extends Function ? K : never; }[Extract<keyof E, string>]>, IdKey>] extends [never] ? true : false>[number] extends infer T_4 ? T_4 extends import("../../../../types").UnionToTuple<Exclude<Exclude<Extract<keyof E, string>, import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey> | { [K in Extract<keyof E, string>]: E[K] extends Function ? K : never; }[Extract<keyof E, string>]>, IdKey>, import("ts-toolbelt/out/Union/Last").Last<Exclude<Exclude<Extract<keyof E, string>, import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey> | { [K in Extract<keyof E, string>]: E[K] extends Function ? K : never; }[Extract<keyof E, string>]>, IdKey>>, [Exclude<Exclude<Extract<keyof E, string>, import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey> | { [K in Extract<keyof E, string>]: E[K] extends Function ? K : never; }[Extract<keyof E, string>]>, IdKey>] extends [never] ? true : false>[number] ? T_4 extends PropertyKey ? T_4 : never : never : never, z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>, z.ZodObject<{
|
|
14
14
|
some: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>>;
|
|
15
15
|
in: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>>;
|
|
16
16
|
eq: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>>;
|
|
@@ -26,7 +26,7 @@ export declare function zodInputQuery<E extends object, IdKey extends string>(en
|
|
|
26
26
|
eq: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"null">, z.ZodNull]>, z.ZodTransform<null, "null" | null>>;
|
|
27
27
|
}, z.core.$strict>, z.ZodObject<{
|
|
28
28
|
ne: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"null">, z.ZodNull]>, z.ZodTransform<null, "null" | null>>;
|
|
29
|
-
}, z.core.$strict>]>>> & Record<import("../../../../types").UnionToTuple<{ [
|
|
29
|
+
}, z.core.$strict>]>>> & Record<import("../../../../types").UnionToTuple<{ [K_1 in keyof import("../../../../types").EntityRelationProps<E, IdKey>]: `${K_1}.${import("../../../../types").EntityRelationProps<E, IdKey>[K_1][number] & string}`; }[import("@klerick/json-api-nestjs-shared").RelationKeys<E, "id">], import("ts-toolbelt/out/Union/Last").Last<{ [K_1 in keyof import("../../../../types").EntityRelationProps<E, IdKey>]: `${K_1}.${import("../../../../types").EntityRelationProps<E, IdKey>[K_1][number] & string}`; }[import("@klerick/json-api-nestjs-shared").RelationKeys<E, "id">]>, [{ [K_1 in keyof import("../../../../types").EntityRelationProps<E, IdKey>]: `${K_1}.${import("../../../../types").EntityRelationProps<E, IdKey>[K_1][number] & string}`; }[import("@klerick/json-api-nestjs-shared").RelationKeys<E, "id">]] extends [never] ? true : false>[number] extends infer T_6 ? T_6 extends import("../../../../types").UnionToTuple<{ [K_1 in keyof import("../../../../types").EntityRelationProps<E, IdKey>]: `${K_1}.${import("../../../../types").EntityRelationProps<E, IdKey>[K_1][number] & string}`; }[import("@klerick/json-api-nestjs-shared").RelationKeys<E, "id">], import("ts-toolbelt/out/Union/Last").Last<{ [K_1 in keyof import("../../../../types").EntityRelationProps<E, IdKey>]: `${K_1}.${import("../../../../types").EntityRelationProps<E, IdKey>[K_1][number] & string}`; }[import("@klerick/json-api-nestjs-shared").RelationKeys<E, "id">]>, [{ [K_1 in keyof import("../../../../types").EntityRelationProps<E, IdKey>]: `${K_1}.${import("../../../../types").EntityRelationProps<E, IdKey>[K_1][number] & string}`; }[import("@klerick/json-api-nestjs-shared").RelationKeys<E, "id">]] extends [never] ? true : false>[number] ? T_6 extends PropertyKey ? T_6 : never : never : never, z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>, z.ZodObject<{
|
|
30
30
|
some: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>>;
|
|
31
31
|
in: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>>;
|
|
32
32
|
eq: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>>;
|
|
@@ -65,7 +65,7 @@ export declare function zodInputQuery<E extends object, IdKey extends string>(en
|
|
|
65
65
|
nin: string | string[];
|
|
66
66
|
some: string | string[];
|
|
67
67
|
}>>;
|
|
68
|
-
}, z.core.$InferObjectOutput<Record<import("../../../../types").UnionToTuple<Exclude<keyof E, import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey
|
|
68
|
+
}, z.core.$InferObjectOutput<Record<import("../../../../types").UnionToTuple<Exclude<Exclude<Extract<keyof E, string>, import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey> | { [K in Extract<keyof E, string>]: E[K] extends Function ? K : never; }[Extract<keyof E, string>]>, IdKey>, import("ts-toolbelt/out/Union/Last").Last<Exclude<Exclude<Extract<keyof E, string>, import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey> | { [K in Extract<keyof E, string>]: E[K] extends Function ? K : never; }[Extract<keyof E, string>]>, IdKey>>, [Exclude<Exclude<Extract<keyof E, string>, import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey> | { [K in Extract<keyof E, string>]: E[K] extends Function ? K : never; }[Extract<keyof E, string>]>, IdKey>] extends [never] ? true : false>[number] extends infer T_8 ? T_8 extends import("../../../../types").UnionToTuple<Exclude<Exclude<Extract<keyof E, string>, import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey> | { [K in Extract<keyof E, string>]: E[K] extends Function ? K : never; }[Extract<keyof E, string>]>, IdKey>, import("ts-toolbelt/out/Union/Last").Last<Exclude<Exclude<Extract<keyof E, string>, import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey> | { [K in Extract<keyof E, string>]: E[K] extends Function ? K : never; }[Extract<keyof E, string>]>, IdKey>>, [Exclude<Exclude<Extract<keyof E, string>, import("@klerick/json-api-nestjs-shared").RelationKeys<E, IdKey> | { [K in Extract<keyof E, string>]: E[K] extends Function ? K : never; }[Extract<keyof E, string>]>, IdKey>] extends [never] ? true : false>[number] ? T_8 extends PropertyKey ? T_8 : never : never : never, z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>, z.ZodObject<{
|
|
69
69
|
some: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>>;
|
|
70
70
|
in: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>>;
|
|
71
71
|
eq: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>>;
|
|
@@ -81,7 +81,7 @@ export declare function zodInputQuery<E extends object, IdKey extends string>(en
|
|
|
81
81
|
eq: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"null">, z.ZodNull]>, z.ZodTransform<null, "null" | null>>;
|
|
82
82
|
}, z.core.$strict>, z.ZodObject<{
|
|
83
83
|
ne: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<"null">, z.ZodNull]>, z.ZodTransform<null, "null" | null>>;
|
|
84
|
-
}, z.core.$strict>]>>> & Record<import("../../../../types").UnionToTuple<{ [
|
|
84
|
+
}, z.core.$strict>]>>> & Record<import("../../../../types").UnionToTuple<{ [K_1 in keyof import("../../../../types").EntityRelationProps<E, IdKey>]: `${K_1}.${import("../../../../types").EntityRelationProps<E, IdKey>[K_1][number] & string}`; }[import("@klerick/json-api-nestjs-shared").RelationKeys<E, "id">], import("ts-toolbelt/out/Union/Last").Last<{ [K_1 in keyof import("../../../../types").EntityRelationProps<E, IdKey>]: `${K_1}.${import("../../../../types").EntityRelationProps<E, IdKey>[K_1][number] & string}`; }[import("@klerick/json-api-nestjs-shared").RelationKeys<E, "id">]>, [{ [K_1 in keyof import("../../../../types").EntityRelationProps<E, IdKey>]: `${K_1}.${import("../../../../types").EntityRelationProps<E, IdKey>[K_1][number] & string}`; }[import("@klerick/json-api-nestjs-shared").RelationKeys<E, "id">]] extends [never] ? true : false>[number] extends infer T_10 ? T_10 extends import("../../../../types").UnionToTuple<{ [K_1 in keyof import("../../../../types").EntityRelationProps<E, IdKey>]: `${K_1}.${import("../../../../types").EntityRelationProps<E, IdKey>[K_1][number] & string}`; }[import("@klerick/json-api-nestjs-shared").RelationKeys<E, "id">], import("ts-toolbelt/out/Union/Last").Last<{ [K_1 in keyof import("../../../../types").EntityRelationProps<E, IdKey>]: `${K_1}.${import("../../../../types").EntityRelationProps<E, IdKey>[K_1][number] & string}`; }[import("@klerick/json-api-nestjs-shared").RelationKeys<E, "id">]>, [{ [K_1 in keyof import("../../../../types").EntityRelationProps<E, IdKey>]: `${K_1}.${import("../../../../types").EntityRelationProps<E, IdKey>[K_1][number] & string}`; }[import("@klerick/json-api-nestjs-shared").RelationKeys<E, "id">]] extends [never] ? true : false>[number] ? T_10 extends PropertyKey ? T_10 : never : never : never, z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>, z.ZodObject<{
|
|
85
85
|
some: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>>;
|
|
86
86
|
in: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>>;
|
|
87
87
|
eq: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNull, z.ZodNumber]>, z.ZodTransform<string, string | number | null>>>;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import type { ZodNullable, ZodArray, ZodEnum } from 'zod';
|
|
2
3
|
import { EntityParamMapService } from '../../service';
|
|
3
4
|
import { NonEmptyStringTuple } from '../../../../types';
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
type Relations<E extends object, IdKey extends string> = EntityParamMapService<E, IdKey>['entityParaMap']['relations'];
|
|
6
|
+
type RelationsTuple<E extends object, IdKey extends string> = NonEmptyStringTuple<Relations<E, IdKey>>;
|
|
7
|
+
type EnumLike<T extends readonly string[]> = {
|
|
8
|
+
[K in T[number]]: K;
|
|
9
|
+
};
|
|
10
|
+
export type ZodIncludeQuery<E extends object, IdKey extends string> = ZodNullable<ZodArray<ZodEnum<EnumLike<RelationsTuple<E, IdKey>>>>>;
|
|
11
|
+
export declare function zodIncludeQuery<E extends object, IdKey extends string>(entityParamMapService: EntityParamMapService<E, IdKey>): ZodIncludeQuery<E, IdKey>;
|
|
6
12
|
export type IncludeQuery<E extends object, IdKey extends string> = z.infer<ZodIncludeQuery<E, IdKey>>;
|
|
13
|
+
export {};
|
|
@@ -4,7 +4,8 @@ exports.zodIncludeQuery = zodIncludeQuery;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const zod_utils_1 = require("../zod-utils");
|
|
6
6
|
function zodIncludeQuery(entityParamMapService) {
|
|
7
|
-
const relationProps = entityParamMapService
|
|
7
|
+
const relationProps = entityParamMapService
|
|
8
|
+
.entityParaMap.relations;
|
|
8
9
|
return zod_1.z
|
|
9
10
|
.enum(relationProps)
|
|
10
11
|
.array()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"include.js","sourceRoot":"","sources":["../../../../../../../../../../libs/json-api/json-api-nestjs/src/lib/modules/mixin/zod/zod-query-schema/include.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"include.js","sourceRoot":"","sources":["../../../../../../../../../../libs/json-api/json-api-nestjs/src/lib/modules/mixin/zod/zod-query-schema/include.ts"],"names":[],"mappings":";;AAwBA,0CAcC;AAtCD,6BAAwB;AAGxB,4CAA2C;AAqB3C,SAAgB,eAAe,CAC7B,qBAAsD;IAEtD,MAAM,aAAa,GAA6B,qBAAqB;SAClE,aAAa,CAAC,SAAqC,CAAC;IAEvD,OAAO,OAAC;SACL,IAAI,CAAC,aAAa,CAAC;SACnB,KAAK,EAAE;SACP,QAAQ,EAAE;SACV,MAAM,CAAC,IAAA,uBAAW,GAAE,EAAE;QACrB,KAAK,EAAE,qCAAqC;KAC7C,CAAC;SACD,QAAQ,EAAE,CAAC;AAChB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Union, Object } from 'ts-toolbelt';
|
|
2
|
-
import {
|
|
2
|
+
import { AttrKeys, RelationKeys, IsIterator, Constructor } from '@klerick/json-api-nestjs-shared';
|
|
3
3
|
import { CastIteratorType, UnionToTuple, IsArray, CastArrayType } from './utils-type';
|
|
4
4
|
type ExtractBaseType<T> = T extends Date ? Date : T extends boolean ? boolean : T extends number ? number : T extends string ? string : T extends null ? null : T extends undefined ? undefined : T extends (infer U)[] ? U[] : object;
|
|
5
5
|
export declare enum TypeField {
|
|
@@ -14,15 +14,15 @@ export declare enum TypeField {
|
|
|
14
14
|
export type TypeForId = Extract<TypeField, TypeField.number | TypeField.string>;
|
|
15
15
|
type TypeProps<T> = T extends Date ? TypeField.date : T extends any[] ? TypeField.array : T extends object ? TypeField.object : T extends boolean ? TypeField.boolean : T extends number ? TypeField.number : T extends string ? TypeField.string : T extends undefined ? never : TypeField.object;
|
|
16
16
|
export type PropertyWithType<E extends object, IdKey extends string = 'id'> = {
|
|
17
|
-
[K in
|
|
17
|
+
[K in AttrKeys<E, IdKey>]: Exclude<E[K], null | undefined> extends never ? TypeField.null : TypeProps<ExtractBaseType<Exclude<E[K], null | undefined>>>;
|
|
18
18
|
};
|
|
19
19
|
export type ArrayProperty<E extends object, IdKey extends string = 'id'> = {
|
|
20
|
-
[K in
|
|
21
|
-
}[
|
|
20
|
+
[K in AttrKeys<E, IdKey>]: Exclude<E[K], null | undefined> extends never ? never : IsArray<Exclude<E[K], null | undefined>> extends 1 ? K : never;
|
|
21
|
+
}[AttrKeys<E, IdKey>];
|
|
22
22
|
export type ArrayPropertyType<E extends object, IdKey extends string = 'id'> = {
|
|
23
23
|
[K in ArrayProperty<E, IdKey>]: TypeProps<CastArrayType<Exclude<E[K], null | undefined>>>;
|
|
24
24
|
};
|
|
25
|
-
export type NullableProperty<E extends object, IdKey extends string = 'id'> = Union.Intersect<Object.NullableKeys<E>,
|
|
25
|
+
export type NullableProperty<E extends object, IdKey extends string = 'id'> = Union.Intersect<Object.NullableKeys<E>, AttrKeys<E, IdKey>>;
|
|
26
26
|
export type RelationProperty<E extends object, IdKey extends string = 'id'> = {
|
|
27
27
|
[K in RelationKeys<E, IdKey>]: {
|
|
28
28
|
entityClass: Constructor<CastIteratorType<E[K]>>;
|
|
@@ -32,7 +32,7 @@ export type RelationProperty<E extends object, IdKey extends string = 'id'> = {
|
|
|
32
32
|
};
|
|
33
33
|
type PrimaryType<E extends object, IdKey extends string = 'id'> = IdKey extends keyof E ? TypeProps<E[IdKey]> extends TypeField ? TypeProps<E[IdKey]> : TypeField.string : TypeField.string;
|
|
34
34
|
export type EntityParam<E extends object, IdKey extends string = 'id'> = {
|
|
35
|
-
props: UnionToTuple<
|
|
35
|
+
props: UnionToTuple<AttrKeys<E, IdKey>>;
|
|
36
36
|
propsType: PropertyWithType<E, IdKey>;
|
|
37
37
|
propsArrayType: ArrayPropertyType<E, IdKey>;
|
|
38
38
|
propsNullable: UnionToTuple<NullableProperty<E, IdKey>>;
|
|
@@ -46,6 +46,6 @@ export type EntityParam<E extends object, IdKey extends string = 'id'> = {
|
|
|
46
46
|
};
|
|
47
47
|
type RelationType<E extends object, IdKey extends string, K extends keyof EntityParam<E, IdKey>['relationProperty']> = EntityParam<E, IdKey>['relationProperty'][K]['entityClass'] extends Constructor<infer T> ? Exclude<T, null> : never;
|
|
48
48
|
export type EntityRelationProps<E extends object, IdKey extends string = 'id'> = {
|
|
49
|
-
[K in keyof EntityParam<E, IdKey>['relationProperty']]: UnionToTuple<
|
|
49
|
+
[K in keyof EntityParam<E, IdKey>['relationProperty']]: UnionToTuple<AttrKeys<RelationType<E, IdKey, K>>>;
|
|
50
50
|
};
|
|
51
51
|
export {};
|