@klerick/json-api-nestjs 10.0.0-beta.1 → 10.0.0-beta.11
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 +217 -0
- package/README.md +614 -0
- package/package.json +38 -34
- package/src/index.d.ts +6 -6
- package/src/index.js +6 -1
- package/src/index.js.map +1 -1
- package/src/lib/constants/constants.d.ts +4 -0
- package/src/lib/constants/constants.js +12 -1
- package/src/lib/constants/constants.js.map +1 -1
- package/src/lib/constants/reflection.d.ts +2 -0
- package/src/lib/constants/reflection.js +3 -1
- package/src/lib/constants/reflection.js.map +1 -1
- package/src/lib/json-api.module.js +3 -2
- package/src/lib/json-api.module.js.map +1 -1
- package/src/lib/modules/atomic-operation/atomic-operation.module.d.ts +1 -2
- package/src/lib/modules/atomic-operation/atomic-operation.module.js +12 -5
- package/src/lib/modules/atomic-operation/atomic-operation.module.js.map +1 -1
- package/src/lib/modules/atomic-operation/factory/map-controller-entity.d.ts +1 -2
- package/src/lib/modules/atomic-operation/factory/map-controller-entity.js +8 -7
- package/src/lib/modules/atomic-operation/factory/map-controller-entity.js.map +1 -1
- package/src/lib/modules/atomic-operation/pipes/input-operation.pipe.js +1 -4
- package/src/lib/modules/atomic-operation/pipes/input-operation.pipe.js.map +1 -1
- package/src/lib/modules/atomic-operation/service/execute.service.d.ts +6 -0
- package/src/lib/modules/atomic-operation/service/execute.service.js +46 -2
- package/src/lib/modules/atomic-operation/service/execute.service.js.map +1 -1
- package/src/lib/modules/atomic-operation/service/explorer.service.js +1 -1
- package/src/lib/modules/atomic-operation/service/explorer.service.js.map +1 -1
- package/src/lib/modules/atomic-operation/service/swagger.service.js +2 -2
- package/src/lib/modules/atomic-operation/service/swagger.service.js.map +1 -1
- package/src/lib/modules/atomic-operation/utils/zod/zod-helper.d.ts +35 -680
- package/src/lib/modules/atomic-operation/utils/zod/zod-helper.js +6 -7
- package/src/lib/modules/atomic-operation/utils/zod/zod-helper.js.map +1 -1
- package/src/lib/modules/mixin/config/bindings.js +9 -9
- package/src/lib/modules/mixin/config/bindings.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-read-only/json-api-read-only.decorator.d.ts +48 -0
- package/src/lib/modules/mixin/decorators/json-api-read-only/json-api-read-only.decorator.js +83 -0
- package/src/lib/modules/mixin/decorators/json-api-read-only/json-api-read-only.decorator.js.map +1 -0
- package/src/lib/modules/mixin/factory/zod-validate.factory.js +11 -6
- package/src/lib/modules/mixin/factory/zod-validate.factory.js.map +1 -1
- package/src/lib/modules/mixin/helpers/bind-controller.js +10 -3
- package/src/lib/modules/mixin/helpers/bind-controller.js.map +1 -1
- package/src/lib/modules/mixin/helpers/create-controller.js +3 -0
- package/src/lib/modules/mixin/helpers/create-controller.js.map +1 -1
- package/src/lib/modules/mixin/helpers/utils.d.ts +2 -0
- package/src/lib/modules/mixin/helpers/utils.js +10 -0
- package/src/lib/modules/mixin/helpers/utils.js.map +1 -1
- package/src/lib/modules/mixin/mixin.module.js +1 -0
- package/src/lib/modules/mixin/mixin.module.js.map +1 -1
- package/src/lib/modules/mixin/pipe/patch-input/patch-input.pipe.js +1 -4
- package/src/lib/modules/mixin/pipe/patch-input/patch-input.pipe.js.map +1 -1
- package/src/lib/modules/mixin/pipe/patch-relationship/patch-relationship.pipe.js +1 -4
- package/src/lib/modules/mixin/pipe/patch-relationship/patch-relationship.pipe.js.map +1 -1
- package/src/lib/modules/mixin/pipe/post-input/post-input.pipe.d.ts +1 -0
- package/src/lib/modules/mixin/pipe/post-input/post-input.pipe.js +10 -4
- package/src/lib/modules/mixin/pipe/post-input/post-input.pipe.js.map +1 -1
- package/src/lib/modules/mixin/pipe/post-relationship/post-relationship.pipe.js +1 -4
- package/src/lib/modules/mixin/pipe/post-relationship/post-relationship.pipe.js.map +1 -1
- package/src/lib/modules/mixin/pipe/query-filed-on-include/query-filed-in-include.pipe.js +2 -4
- package/src/lib/modules/mixin/pipe/query-filed-on-include/query-filed-in-include.pipe.js.map +1 -1
- package/src/lib/modules/mixin/pipe/query-input/query-input.pipe.js +1 -4
- package/src/lib/modules/mixin/pipe/query-input/query-input.pipe.js.map +1 -1
- package/src/lib/modules/mixin/service/json-api-transformer.service.js +27 -4
- package/src/lib/modules/mixin/service/json-api-transformer.service.js.map +1 -1
- package/src/lib/modules/mixin/swagger/method/delete-relationship.js +3 -3
- package/src/lib/modules/mixin/swagger/method/delete-relationship.js.map +1 -1
- package/src/lib/modules/mixin/swagger/method/index.d.ts +0 -4
- package/src/lib/modules/mixin/swagger/method/index.js.map +1 -1
- package/src/lib/modules/mixin/swagger/method/patch-one.js +6 -3
- package/src/lib/modules/mixin/swagger/method/patch-one.js.map +1 -1
- package/src/lib/modules/mixin/swagger/method/patch-relationship.js +3 -3
- package/src/lib/modules/mixin/swagger/method/patch-relationship.js.map +1 -1
- package/src/lib/modules/mixin/swagger/method/post-one.js +6 -3
- package/src/lib/modules/mixin/swagger/method/post-one.js.map +1 -1
- package/src/lib/modules/mixin/swagger/method/post-relationship.js +3 -3
- package/src/lib/modules/mixin/swagger/method/post-relationship.js.map +1 -1
- package/src/lib/modules/mixin/swagger/utils.d.ts +2 -0
- package/src/lib/modules/mixin/swagger/utils.js +16 -1
- package/src/lib/modules/mixin/swagger/utils.js.map +1 -1
- package/src/lib/modules/mixin/types/decorator-options.type.d.ts +1 -0
- package/src/lib/modules/mixin/types/orm-service.type.d.ts +8 -0
- package/src/lib/modules/mixin/zod/index.d.ts +1 -0
- package/src/lib/modules/mixin/zod/index.js +6 -0
- package/src/lib/modules/mixin/zod/index.js.map +1 -1
- package/src/lib/modules/mixin/zod/map-transform-to-json-shema.d.ts +6 -0
- package/src/lib/modules/mixin/zod/map-transform-to-json-shema.js +27 -0
- package/src/lib/modules/mixin/zod/map-transform-to-json-shema.js.map +1 -0
- package/src/lib/modules/mixin/zod/zod-input-patch-relationship-schema/index.d.ts +4 -44
- package/src/lib/modules/mixin/zod/zod-input-patch-relationship-schema/index.js +2 -3
- package/src/lib/modules/mixin/zod/zod-input-patch-relationship-schema/index.js.map +1 -1
- package/src/lib/modules/mixin/zod/zod-input-patch-schema/index.d.ts +16 -5
- package/src/lib/modules/mixin/zod/zod-input-patch-schema/index.js +7 -9
- package/src/lib/modules/mixin/zod/zod-input-patch-schema/index.js.map +1 -1
- package/src/lib/modules/mixin/zod/zod-input-post-relationship-schema/index.d.ts +4 -50
- package/src/lib/modules/mixin/zod/zod-input-post-relationship-schema/index.js +2 -3
- package/src/lib/modules/mixin/zod/zod-input-post-relationship-schema/index.js.map +1 -1
- package/src/lib/modules/mixin/zod/zod-input-post-schema/index.d.ts +16 -6
- package/src/lib/modules/mixin/zod/zod-input-post-schema/index.js +7 -13
- package/src/lib/modules/mixin/zod/zod-input-post-schema/index.js.map +1 -1
- package/src/lib/modules/mixin/zod/zod-input-query-schema/fields.d.ts +13 -27
- package/src/lib/modules/mixin/zod/zod-input-query-schema/fields.js +20 -13
- package/src/lib/modules/mixin/zod/zod-input-query-schema/fields.js.map +1 -1
- package/src/lib/modules/mixin/zod/zod-input-query-schema/filter.d.ts +72 -987
- package/src/lib/modules/mixin/zod/zod-input-query-schema/filter.js +11 -7
- package/src/lib/modules/mixin/zod/zod-input-query-schema/filter.js.map +1 -1
- package/src/lib/modules/mixin/zod/zod-input-query-schema/include.d.ts +1 -1
- package/src/lib/modules/mixin/zod/zod-input-query-schema/index.d.ts +73 -4933
- package/src/lib/modules/mixin/zod/zod-input-query-schema/index.js +6 -3
- package/src/lib/modules/mixin/zod/zod-input-query-schema/index.js.map +1 -1
- package/src/lib/modules/mixin/zod/zod-input-query-schema/sort.d.ts +1 -1
- package/src/lib/modules/mixin/zod/zod-query-schema/fields.d.ts +3 -3
- package/src/lib/modules/mixin/zod/zod-query-schema/fields.js +6 -2
- package/src/lib/modules/mixin/zod/zod-query-schema/fields.js.map +1 -1
- package/src/lib/modules/mixin/zod/zod-query-schema/filter.d.ts +24 -104
- package/src/lib/modules/mixin/zod/zod-query-schema/filter.js +32 -10
- package/src/lib/modules/mixin/zod/zod-query-schema/filter.js.map +1 -1
- package/src/lib/modules/mixin/zod/zod-query-schema/include.d.ts +1 -1
- package/src/lib/modules/mixin/zod/zod-query-schema/include.js +1 -1
- package/src/lib/modules/mixin/zod/zod-query-schema/include.js.map +1 -1
- package/src/lib/modules/mixin/zod/zod-query-schema/index.d.ts +4 -4
- package/src/lib/modules/mixin/zod/zod-query-schema/index.js +3 -4
- package/src/lib/modules/mixin/zod/zod-query-schema/index.js.map +1 -1
- package/src/lib/modules/mixin/zod/zod-query-schema/sort.d.ts +11 -3
- package/src/lib/modules/mixin/zod/zod-query-schema/sort.js +1 -1
- package/src/lib/modules/mixin/zod/zod-query-schema/sort.js.map +1 -1
- package/src/lib/modules/mixin/zod/zod-share/attributes.d.ts +15 -14
- package/src/lib/modules/mixin/zod/zod-share/attributes.js +26 -20
- package/src/lib/modules/mixin/zod/zod-share/attributes.js.map +1 -1
- package/src/lib/modules/mixin/zod/zod-share/page.d.ts +3 -9
- package/src/lib/modules/mixin/zod/zod-share/rel-data.d.ts +4 -40
- package/src/lib/modules/mixin/zod/zod-share/rel-data.js +2 -2
- package/src/lib/modules/mixin/zod/zod-share/rel-data.js.map +1 -1
- package/src/lib/modules/mixin/zod/zod-share/relationships.d.ts +8 -304
- package/src/lib/modules/mixin/zod/zod-share/relationships.js +1 -1
- package/src/lib/modules/mixin/zod/zod-share/relationships.js.map +1 -1
- package/src/lib/modules/mixin/zod/zod-utils.d.ts +2 -1
- package/src/lib/modules/mixin/zod/zod-utils.js +12 -0
- package/src/lib/modules/mixin/zod/zod-utils.js.map +1 -1
- package/src/lib/types/entity-param.type.d.ts +6 -4
- package/src/lib/types/entity-param.type.js +13 -0
- package/src/lib/types/entity-param.type.js.map +1 -1
- package/src/lib/types/error.types.d.ts +3 -3
- package/src/lib/types/index.d.ts +1 -0
- package/src/lib/types/index.js +1 -0
- package/src/lib/types/index.js.map +1 -1
- package/src/lib/types/json-api-read-only.d.ts +51 -0
- package/src/lib/types/json-api-read-only.js +3 -0
- package/src/lib/types/json-api-read-only.js.map +1 -0
- package/src/lib/types/module-options.types.d.ts +6 -1
- package/src/lib/utils/module-helper.js +5 -0
- package/src/lib/utils/module-helper.js.map +1 -1
|
@@ -1,53 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const zodPatchRelationship: z.ZodObject<{
|
|
3
|
-
data: z.ZodUnion<[z.ZodNullable<z.
|
|
3
|
+
data: z.ZodUnion<readonly [z.ZodNullable<z.ZodObject<{
|
|
4
4
|
type: z.ZodString;
|
|
5
5
|
id: z.ZodString;
|
|
6
|
-
},
|
|
7
|
-
id: string;
|
|
8
|
-
type: string;
|
|
9
|
-
}, {
|
|
10
|
-
id: string;
|
|
11
|
-
type: string;
|
|
12
|
-
}>, {
|
|
13
|
-
id: string;
|
|
14
|
-
type: string;
|
|
15
|
-
}, {
|
|
16
|
-
id: string;
|
|
17
|
-
type: string;
|
|
18
|
-
}>>, z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
6
|
+
}, z.core.$strict>>, z.ZodArray<z.ZodObject<{
|
|
19
7
|
type: z.ZodString;
|
|
20
8
|
id: z.ZodString;
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
type: string;
|
|
24
|
-
}, {
|
|
25
|
-
id: string;
|
|
26
|
-
type: string;
|
|
27
|
-
}>, {
|
|
28
|
-
id: string;
|
|
29
|
-
type: string;
|
|
30
|
-
}, {
|
|
31
|
-
id: string;
|
|
32
|
-
type: string;
|
|
33
|
-
}>, "many">]>;
|
|
34
|
-
}, "strict", z.ZodTypeAny, {
|
|
35
|
-
data: {
|
|
36
|
-
id: string;
|
|
37
|
-
type: string;
|
|
38
|
-
} | {
|
|
39
|
-
id: string;
|
|
40
|
-
type: string;
|
|
41
|
-
}[] | null;
|
|
42
|
-
}, {
|
|
43
|
-
data: {
|
|
44
|
-
id: string;
|
|
45
|
-
type: string;
|
|
46
|
-
} | {
|
|
47
|
-
id: string;
|
|
48
|
-
type: string;
|
|
49
|
-
}[] | null;
|
|
50
|
-
}>;
|
|
9
|
+
}, z.core.$strict>>]>;
|
|
10
|
+
}, z.core.$strict>;
|
|
51
11
|
export type ZodPatchRelationship = typeof zodPatchRelationship;
|
|
52
12
|
export type PatchRelationship = z.infer<ZodPatchRelationship>;
|
|
53
13
|
export type PatchRelationshipData = PatchRelationship['data'];
|
|
@@ -4,8 +4,7 @@ exports.zodPatchRelationship = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const zod_share_1 = require("../zod-share");
|
|
6
6
|
exports.zodPatchRelationship = zod_1.z
|
|
7
|
-
.
|
|
7
|
+
.strictObject({
|
|
8
8
|
data: zod_1.z.union([(0, zod_share_1.zodData)().nullable(), (0, zod_share_1.zodData)().array()]),
|
|
9
|
-
})
|
|
10
|
-
.strict();
|
|
9
|
+
});
|
|
11
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../../libs/json-api/json-api-nestjs/src/lib/modules/mixin/zod/zod-input-patch-relationship-schema/index.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,4CAAuC;AAE1B,QAAA,oBAAoB,GAAG,OAAC;KAClC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../../libs/json-api/json-api-nestjs/src/lib/modules/mixin/zod/zod-input-patch-relationship-schema/index.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,4CAAuC;AAE1B,QAAA,oBAAoB,GAAG,OAAC;KAClC,YAAY,CAAC;IACZ,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,IAAA,mBAAO,GAAE,CAAC,QAAQ,EAAE,EAAE,IAAA,mBAAO,GAAE,CAAC,KAAK,EAAE,CAAC,CAAC;CACzD,CAAC,CAAC"}
|
|
@@ -1,17 +1,28 @@
|
|
|
1
1
|
import { z, ZodObject, ZodOptional } from 'zod';
|
|
2
|
-
import { ZodAttributes, ZodId, ZodRelationships, ZodType } from '../zod-share';
|
|
2
|
+
import { ZodAttributes, ZodId, ZodRelationships, ZodType, Id, Attributes, Relationships } from '../zod-share';
|
|
3
3
|
import { EntityParamMapService } from '../../service';
|
|
4
|
+
import { ExtractJsonApiReadOnlyKeys, ExtractJsonApiImmutableKeys } from '../../../../types';
|
|
4
5
|
type ZodPatchPatchShape<E extends object, IdKey extends string> = {
|
|
5
6
|
id: ZodId;
|
|
6
7
|
type: ZodType<string>;
|
|
7
8
|
attributes: ZodOptional<ZodAttributes<E, IdKey, true>>;
|
|
8
9
|
relationships: ZodOptional<ZodRelationships<E, IdKey, true>>;
|
|
9
10
|
};
|
|
10
|
-
type ZodInputPatchSchema<E extends object, IdKey extends string> = ZodObject<ZodPatchPatchShape<E, IdKey>,
|
|
11
|
+
type ZodInputPatchSchema<E extends object, IdKey extends string> = ZodObject<ZodPatchPatchShape<E, IdKey>, z.core.$strict>;
|
|
11
12
|
type ZodInputPatchDataShape<E extends object, IdKey extends string> = {
|
|
12
13
|
data: ZodInputPatchSchema<E, IdKey>;
|
|
13
14
|
};
|
|
14
|
-
export declare function zodPatch<E extends object, IdKey extends string>(entityParamMapService: EntityParamMapService<E, IdKey>): ZodPatch<E, IdKey>;
|
|
15
|
-
export type ZodPatch<E extends object, IdKey extends string> = ZodObject<ZodInputPatchDataShape<E, IdKey>,
|
|
16
|
-
export type
|
|
15
|
+
export declare function zodPatch<E extends object, IdKey extends string>(entityParamMapService: EntityParamMapService<E, IdKey>, readOnlyProps?: ExtractJsonApiReadOnlyKeys<E>[], immutableProps?: ExtractJsonApiImmutableKeys<E>[]): ZodPatch<E, IdKey>;
|
|
16
|
+
export type ZodPatch<E extends object, IdKey extends string> = ZodObject<ZodInputPatchDataShape<E, IdKey>, z.core.$strict>;
|
|
17
|
+
export type PatchDataRaw<E extends object, IdKey extends string> = z.infer<ZodPatch<E, IdKey>>['data'];
|
|
18
|
+
type PatchAttributesType<E extends object, IdKey extends string> = Partial<Omit<Attributes<E, IdKey>, ExtractJsonApiReadOnlyKeys<E> | ExtractJsonApiImmutableKeys<E>>>;
|
|
19
|
+
export type PatchData<E extends object, IdKey extends string> = {
|
|
20
|
+
id: Id;
|
|
21
|
+
type: string;
|
|
22
|
+
attributes?: PatchAttributesType<E, IdKey>;
|
|
23
|
+
relationships?: Relationships<E, IdKey, true>;
|
|
24
|
+
};
|
|
25
|
+
export type Patch<E extends object, IdKey extends string> = {
|
|
26
|
+
data: PatchData<E, IdKey>;
|
|
27
|
+
};
|
|
17
28
|
export {};
|
|
@@ -3,21 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.zodPatch = zodPatch;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const zod_share_1 = require("../zod-share");
|
|
6
|
-
function getShape(entityParamMapService) {
|
|
6
|
+
function getShape(entityParamMapService, readOnlyProps = [], immutableProps = []) {
|
|
7
7
|
const shape = {
|
|
8
8
|
id: (0, zod_share_1.zodId)(entityParamMapService.entityParaMap.primaryColumnType),
|
|
9
9
|
type: (0, zod_share_1.zodType)(entityParamMapService.entityParaMap.typeName),
|
|
10
|
-
attributes: (0, zod_share_1.zodAttributes)(entityParamMapService, true).optional(),
|
|
10
|
+
attributes: (0, zod_share_1.zodAttributes)(entityParamMapService, true, readOnlyProps, immutableProps).optional(),
|
|
11
11
|
relationships: (0, zod_share_1.zodRelationships)(entityParamMapService, true).optional(),
|
|
12
12
|
};
|
|
13
|
-
return zod_1.z.
|
|
13
|
+
return zod_1.z.strictObject(shape);
|
|
14
14
|
}
|
|
15
|
-
function zodPatch(entityParamMapService) {
|
|
16
|
-
const shape = getShape(entityParamMapService);
|
|
17
|
-
return zod_1.z
|
|
18
|
-
.object({
|
|
15
|
+
function zodPatch(entityParamMapService, readOnlyProps = [], immutableProps = []) {
|
|
16
|
+
const shape = getShape(entityParamMapService, readOnlyProps, immutableProps);
|
|
17
|
+
return zod_1.z.strictObject({
|
|
19
18
|
data: shape,
|
|
20
|
-
})
|
|
21
|
-
.strict();
|
|
19
|
+
});
|
|
22
20
|
}
|
|
23
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../../libs/json-api/json-api-nestjs/src/lib/modules/mixin/zod/zod-input-patch-schema/index.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../../libs/json-api/json-api-nestjs/src/lib/modules/mixin/zod/zod-input-patch-schema/index.ts"],"names":[],"mappings":";;AAmDA,4BAUC;AA7DD,6BAAgD;AAChD,4CAYsB;AAqBtB,SAAS,QAAQ,CACf,qBAAsD,EACtD,gBAAiD,EAAE,EACnD,iBAAmD,EAAE;IAErD,MAAM,KAAK,GAAG;QACZ,EAAE,EAAE,IAAA,iBAAK,EACP,qBAAqB,CAAC,aAAa,CAAC,iBAA8B,CACnE;QACD,IAAI,EAAE,IAAA,mBAAO,EAAC,qBAAqB,CAAC,aAAa,CAAC,QAAQ,CAAC;QAC3D,UAAU,EAAE,IAAA,yBAAa,EAAC,qBAAqB,EAAE,IAAI,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC,QAAQ,EAAE;QAChG,aAAa,EAAE,IAAA,4BAAgB,EAAC,qBAAqB,EAAE,IAAI,CAAC,CAAC,QAAQ,EAAE;KACxE,CAAC;IAEF,OAAO,OAAC,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC;AAED,SAAgB,QAAQ,CACtB,qBAAsD,EACtD,gBAAiD,EAAE,EACnD,iBAAmD,EAAE;IAErD,MAAM,KAAK,GAAG,QAAQ,CAAC,qBAAqB,EAAE,aAAa,EAAE,cAAc,CAAC,CAAC;IAE7E,OAAO,OAAC,CAAC,YAAY,CAAC;QACpB,IAAI,EAAE,KAAK;KACZ,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,59 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const zodPostRelationship: z.ZodObject<{
|
|
3
|
-
data: z.ZodUnion<[z.
|
|
3
|
+
data: z.ZodUnion<readonly [z.ZodObject<{
|
|
4
4
|
type: z.ZodString;
|
|
5
5
|
id: z.ZodString;
|
|
6
|
-
},
|
|
7
|
-
id: string;
|
|
8
|
-
type: string;
|
|
9
|
-
}, {
|
|
10
|
-
id: string;
|
|
11
|
-
type: string;
|
|
12
|
-
}>, {
|
|
13
|
-
id: string;
|
|
14
|
-
type: string;
|
|
15
|
-
}, {
|
|
16
|
-
id: string;
|
|
17
|
-
type: string;
|
|
18
|
-
}>, z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
6
|
+
}, z.core.$strict>, z.ZodArray<z.ZodObject<{
|
|
19
7
|
type: z.ZodString;
|
|
20
8
|
id: z.ZodString;
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
type: string;
|
|
24
|
-
}, {
|
|
25
|
-
id: string;
|
|
26
|
-
type: string;
|
|
27
|
-
}>, {
|
|
28
|
-
id: string;
|
|
29
|
-
type: string;
|
|
30
|
-
}, {
|
|
31
|
-
id: string;
|
|
32
|
-
type: string;
|
|
33
|
-
}>, "atleastone">]>;
|
|
34
|
-
}, "strict", z.ZodTypeAny, {
|
|
35
|
-
data: {
|
|
36
|
-
id: string;
|
|
37
|
-
type: string;
|
|
38
|
-
} | [{
|
|
39
|
-
id: string;
|
|
40
|
-
type: string;
|
|
41
|
-
}, ...{
|
|
42
|
-
id: string;
|
|
43
|
-
type: string;
|
|
44
|
-
}[]];
|
|
45
|
-
}, {
|
|
46
|
-
data: {
|
|
47
|
-
id: string;
|
|
48
|
-
type: string;
|
|
49
|
-
} | [{
|
|
50
|
-
id: string;
|
|
51
|
-
type: string;
|
|
52
|
-
}, ...{
|
|
53
|
-
id: string;
|
|
54
|
-
type: string;
|
|
55
|
-
}[]];
|
|
56
|
-
}>;
|
|
9
|
+
}, z.core.$strict>>]>;
|
|
10
|
+
}, z.core.$strict>;
|
|
57
11
|
export type ZodPostRelationship = typeof zodPostRelationship;
|
|
58
12
|
export type PostRelationship = z.infer<ZodPostRelationship>;
|
|
59
13
|
export type PostRelationshipData = PostRelationship['data'];
|
|
@@ -4,8 +4,7 @@ exports.zodPostRelationship = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const zod_share_1 = require("../zod-share");
|
|
6
6
|
exports.zodPostRelationship = zod_1.z
|
|
7
|
-
.
|
|
7
|
+
.strictObject({
|
|
8
8
|
data: zod_1.z.union([(0, zod_share_1.zodData)(), (0, zod_share_1.zodData)().array().nonempty()]),
|
|
9
|
-
})
|
|
10
|
-
.strict();
|
|
9
|
+
});
|
|
11
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../../libs/json-api/json-api-nestjs/src/lib/modules/mixin/zod/zod-input-post-relationship-schema/index.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,4CAAuC;AAE1B,QAAA,mBAAmB,GAAG,OAAC;KACjC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../../libs/json-api/json-api-nestjs/src/lib/modules/mixin/zod/zod-input-post-relationship-schema/index.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,4CAAuC;AAE1B,QAAA,mBAAmB,GAAG,OAAC;KACjC,YAAY,CAAC;IACZ,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,IAAA,mBAAO,GAAE,EAAE,IAAA,mBAAO,GAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;CACzD,CAAC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z, ZodObject, ZodOptional } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { ExtractJsonApiReadOnlyKeys, ExtractJsonApiImmutableKeys } from '../../../../types';
|
|
3
|
+
import { ZodId, ZodType, ZodAttributes, ZodRelationships, Id, Attributes, Relationships } from '../zod-share';
|
|
3
4
|
import { EntityParamMapService } from '../../service';
|
|
4
5
|
type ZodInputPostShape<E extends object, IdKey extends string> = {
|
|
5
6
|
id: ZodOptional<ZodId>;
|
|
@@ -7,12 +8,21 @@ type ZodInputPostShape<E extends object, IdKey extends string> = {
|
|
|
7
8
|
attributes: ZodAttributes<E, IdKey>;
|
|
8
9
|
relationships: ZodOptional<ZodRelationships<E, IdKey>>;
|
|
9
10
|
};
|
|
10
|
-
type ZodInputPostSchema<E extends object, IdKey extends string> = ZodObject<ZodInputPostShape<E, IdKey>,
|
|
11
|
+
type ZodInputPostSchema<E extends object, IdKey extends string> = ZodObject<ZodInputPostShape<E, IdKey>, z.core.$strict>;
|
|
11
12
|
type ZodInputPostDataShape<E extends object, IdKey extends string> = {
|
|
12
13
|
data: ZodInputPostSchema<E, IdKey>;
|
|
13
14
|
};
|
|
14
|
-
export declare function zodPost<E extends object, IdKey extends string>(entityParamMapService: EntityParamMapService<E, IdKey>): ZodPost<E, IdKey>;
|
|
15
|
-
export type ZodPost<E extends object, IdKey extends string> = ZodObject<ZodInputPostDataShape<E, IdKey>,
|
|
16
|
-
export type
|
|
17
|
-
|
|
15
|
+
export declare function zodPost<E extends object, IdKey extends string>(entityParamMapService: EntityParamMapService<E, IdKey>, readOnlyProps?: ExtractJsonApiReadOnlyKeys<E>[], immutableProps?: ExtractJsonApiImmutableKeys<E>[]): ZodPost<E, IdKey>;
|
|
16
|
+
export type ZodPost<E extends object, IdKey extends string> = ZodObject<ZodInputPostDataShape<E, IdKey>, z.core.$strict>;
|
|
17
|
+
export type PostDataRaw<E extends object, IdKey extends string> = Post<E, IdKey>['data'];
|
|
18
|
+
type PostAttributesType<E extends object, IdKey extends string> = Omit<Attributes<E, IdKey, false>, ExtractJsonApiReadOnlyKeys<E> | ExtractJsonApiImmutableKeys<E>> & Partial<Pick<Attributes<E, IdKey, false>, Extract<ExtractJsonApiImmutableKeys<E>, keyof Attributes<E, IdKey, false>>>>;
|
|
19
|
+
export type PostData<E extends object, IdKey extends string> = {
|
|
20
|
+
id?: Id;
|
|
21
|
+
type: string;
|
|
22
|
+
attributes: PostAttributesType<E, IdKey>;
|
|
23
|
+
relationships?: Relationships<E, IdKey, false>;
|
|
24
|
+
};
|
|
25
|
+
export type Post<E extends object, IdKey extends string> = {
|
|
26
|
+
data: PostData<E, IdKey>;
|
|
27
|
+
};
|
|
18
28
|
export {};
|
|
@@ -3,24 +3,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.zodPost = zodPost;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const zod_share_1 = require("../zod-share");
|
|
6
|
-
function getShape(entityParamMapService) {
|
|
6
|
+
function getShape(entityParamMapService, readOnlyProps = [], immutableProps = []) {
|
|
7
7
|
const shape = {
|
|
8
8
|
id: (0, zod_share_1.zodId)(entityParamMapService.entityParaMap.primaryColumnType).optional(),
|
|
9
9
|
type: (0, zod_share_1.zodType)(entityParamMapService.entityParaMap.typeName),
|
|
10
|
-
attributes: (0, zod_share_1.zodAttributes)(entityParamMapService, false),
|
|
10
|
+
attributes: (0, zod_share_1.zodAttributes)(entityParamMapService, false, readOnlyProps, immutableProps),
|
|
11
11
|
relationships: (0, zod_share_1.zodRelationships)(entityParamMapService, false).optional(),
|
|
12
12
|
};
|
|
13
|
-
return zod_1.z.
|
|
13
|
+
return zod_1.z.strictObject(shape);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
return zod_1.z
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
})
|
|
20
|
-
.strict();
|
|
21
|
-
}
|
|
22
|
-
function zodPost(entityParamMapService) {
|
|
23
|
-
const shape = getShape(entityParamMapService);
|
|
24
|
-
return zodDataShape(shape);
|
|
15
|
+
function zodPost(entityParamMapService, readOnlyProps = [], immutableProps = []) {
|
|
16
|
+
return zod_1.z.strictObject({
|
|
17
|
+
data: getShape(entityParamMapService, readOnlyProps, immutableProps),
|
|
18
|
+
});
|
|
25
19
|
}
|
|
26
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../../libs/json-api/json-api-nestjs/src/lib/modules/mixin/zod/zod-input-post-schema/index.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../../libs/json-api/json-api-nestjs/src/lib/modules/mixin/zod/zod-input-post-schema/index.ts"],"names":[],"mappings":";;AA6DA,0BAQC;AArED,6BAAgD;AAOhD,4CAYsB;AAoBtB,SAAS,QAAQ,CACf,qBAAsD,EACtD,gBAAiD,EAAE,EACnD,iBAAmD,EAAE;IAErD,MAAM,KAAK,GAAG;QACZ,EAAE,EAAE,IAAA,iBAAK,EACP,qBAAqB,CAAC,aAAa,CAAC,iBAA8B,CACnE,CAAC,QAAQ,EAAE;QACZ,IAAI,EAAE,IAAA,mBAAO,EAAC,qBAAqB,CAAC,aAAa,CAAC,QAAQ,CAAC;QAC3D,UAAU,EAAE,IAAA,yBAAa,EACvB,qBAAqB,EACrB,KAAK,EACL,aAAa,EACb,cAAc,CACf;QACD,aAAa,EAAE,IAAA,4BAAgB,EAAC,qBAAqB,EAAE,KAAK,CAAC,CAAC,QAAQ,EAAE;KACzE,CAAC;IAEF,OAAO,OAAC,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC;AAED,SAAgB,OAAO,CACrB,qBAAsD,EACtD,gBAAiD,EAAE,EACnD,iBAAmD,EAAE;IAErD,OAAO,OAAC,CAAC,YAAY,CAAC;QACpB,IAAI,EAAE,QAAQ,CAAC,qBAAqB,EAAE,aAAa,EAAE,cAAc,CAAC;KACrE,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,30 +1,16 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { EntityParam } from '../../../../types';
|
|
2
3
|
import { EntityParamMapService } from '../../service';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
target: z.
|
|
9
|
-
}
|
|
10
|
-
target: z.
|
|
11
|
-
}
|
|
12
|
-
target: z.
|
|
13
|
-
}
|
|
14
|
-
target: z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>;
|
|
15
|
-
}, { [K 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] & PropertyKey]: z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>; }>>, any> extends infer T_2 ? { [k in keyof T_2]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<z.objectUtil.extendShape<{
|
|
16
|
-
target: z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>;
|
|
17
|
-
}, { [K 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] & PropertyKey]: z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>; }>>, any>[k]; } : never, z.baseObjectInputType<z.objectUtil.extendShape<{
|
|
18
|
-
target: z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>;
|
|
19
|
-
}, { [K 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] & PropertyKey]: z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>; }>> extends infer T_3 ? { [k_1 in keyof T_3]: z.baseObjectInputType<z.objectUtil.extendShape<{
|
|
20
|
-
target: z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>;
|
|
21
|
-
}, { [K 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] & PropertyKey]: z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>; }>>[k_1]; } : never>>, (z.objectUtil.addQuestionMarks<z.baseObjectOutputType<z.objectUtil.extendShape<{
|
|
22
|
-
target: z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>;
|
|
23
|
-
}, { [K 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] & PropertyKey]: z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>; }>>, any> extends infer T_4 ? { [k in keyof T_4]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<z.objectUtil.extendShape<{
|
|
24
|
-
target: z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>;
|
|
25
|
-
}, { [K 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] & PropertyKey]: z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>; }>>, any>[k]; } : never) | null, (z.baseObjectInputType<z.objectUtil.extendShape<{
|
|
26
|
-
target: z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>;
|
|
27
|
-
}, { [K 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] & PropertyKey]: z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>; }>> extends infer T_5 ? { [k_1 in keyof T_5]: z.baseObjectInputType<z.objectUtil.extendShape<{
|
|
28
|
-
target: z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>;
|
|
29
|
-
}, { [K 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] & PropertyKey]: z.ZodEffects<z.ZodOptional<z.ZodString>, string[] | undefined, string | undefined>; }>>[k_1]; } : never) | undefined>;
|
|
4
|
+
declare function getZodRules(): z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string[] | undefined, string | undefined>>;
|
|
5
|
+
type ZodRule = ReturnType<typeof getZodRules>;
|
|
6
|
+
type CastPropertyKey<T> = T extends PropertyKey ? T : never;
|
|
7
|
+
type ZorRelationType<E extends object, IdKey extends string> = Record<CastPropertyKey<EntityParam<E, IdKey>['relations'][number]>, ZodRule>;
|
|
8
|
+
export declare function zodFieldsInputQuery<E extends object, IdKey extends string>(entityParamMapService: EntityParamMapService<E, IdKey>): z.ZodPipe<z.ZodOptional<z.ZodObject<{
|
|
9
|
+
target: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string[] | undefined, string | undefined>>;
|
|
10
|
+
} & ZorRelationType<E, IdKey>, z.core.$strict>>, z.ZodTransform<Awaited<z.core.$InferObjectOutput<{
|
|
11
|
+
target: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string[] | undefined, string | undefined>>;
|
|
12
|
+
} & ZorRelationType<E, IdKey>, {}>> | null, z.core.$InferObjectOutput<{
|
|
13
|
+
target: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string[] | undefined, string | undefined>>;
|
|
14
|
+
} & ZorRelationType<E, IdKey>, {}> | undefined>>;
|
|
30
15
|
export type ZodFieldsInputQuery<E extends object, IdKey extends string> = z.infer<ReturnType<typeof zodFieldsInputQuery<E, IdKey>>>;
|
|
16
|
+
export {};
|
|
@@ -4,26 +4,32 @@ exports.zodFieldsInputQuery = zodFieldsInputQuery;
|
|
|
4
4
|
const json_api_nestjs_shared_1 = require("@klerick/json-api-nestjs-shared");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
const zod_utils_1 = require("../zod-utils");
|
|
7
|
+
const map_transform_to_json_shema_1 = require("../map-transform-to-json-shema");
|
|
7
8
|
function getZodRules() {
|
|
8
9
|
return zod_1.z
|
|
9
10
|
.string()
|
|
10
11
|
.optional()
|
|
11
|
-
.transform(
|
|
12
|
+
.transform(map_transform_to_json_shema_1.transformStringToArray);
|
|
12
13
|
}
|
|
13
14
|
function zodFieldsInputQuery(entityParamMapService) {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
});
|
|
17
|
-
const relation = entityParamMapService.entityParaMap.relations.reduce((acum, item) => ({
|
|
15
|
+
const { relations } = entityParamMapService.entityParaMap;
|
|
16
|
+
const relation = relations.reduce((acum, item) => ({
|
|
18
17
|
...acum,
|
|
19
18
|
[item]: getZodRules(),
|
|
20
19
|
}), {});
|
|
21
|
-
return
|
|
22
|
-
.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
return (zod_1.z
|
|
21
|
+
.strictObject({
|
|
22
|
+
target: getZodRules(),
|
|
23
|
+
...relation,
|
|
24
|
+
}, {
|
|
25
|
+
error: (err) => err.code === 'unrecognized_keys'
|
|
26
|
+
? (0, zod_utils_1.getValidationErrorForStrict)([
|
|
27
|
+
'target',
|
|
28
|
+
...entityParamMapService.entityParaMap
|
|
29
|
+
.relations,
|
|
30
|
+
], 'Fields')
|
|
31
|
+
: err.message,
|
|
32
|
+
})
|
|
27
33
|
.refine((0, zod_utils_1.nonEmptyObject)(), {
|
|
28
34
|
message: 'Validation error: Need select field for target or relation',
|
|
29
35
|
})
|
|
@@ -31,7 +37,8 @@ function zodFieldsInputQuery(entityParamMapService) {
|
|
|
31
37
|
.transform((input) => {
|
|
32
38
|
if (!input)
|
|
33
39
|
return null;
|
|
34
|
-
const result = json_api_nestjs_shared_1.ObjectTyped.entries(input).reduce((acum,
|
|
40
|
+
const result = json_api_nestjs_shared_1.ObjectTyped.entries(input).reduce((acum, entries) => {
|
|
41
|
+
const [key, value] = entries;
|
|
35
42
|
if (!value || value.length === 0)
|
|
36
43
|
return acum;
|
|
37
44
|
return {
|
|
@@ -40,6 +47,6 @@ function zodFieldsInputQuery(entityParamMapService) {
|
|
|
40
47
|
};
|
|
41
48
|
}, {});
|
|
42
49
|
return Object.keys(result).length > 0 ? result : null;
|
|
43
|
-
});
|
|
50
|
+
}));
|
|
44
51
|
}
|
|
45
52
|
//# sourceMappingURL=fields.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../../../../libs/json-api/json-api-nestjs/src/lib/modules/mixin/zod/zod-input-query-schema/fields.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../../../../../libs/json-api/json-api-nestjs/src/lib/modules/mixin/zod/zod-input-query-schema/fields.ts"],"names":[],"mappings":";;AAmBA,kDA0DC;AA7ED,4EAA8D;AAC9D,6BAAwB;AAGxB,4CAA2E;AAE3E,gFAAwE;AAExE,SAAS,WAAW;IAClB,OAAO,OAAC;SACL,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,SAAS,CAAC,oDAAsB,CAAC,CAAC;AACvC,CAAC;AAMD,SAAgB,mBAAmB,CACjC,qBAAsD;IAEtD,MAAM,EAAC,SAAS,EAAC,GAAG,qBAAqB,CAAC,aAAa,CAAC;IAExD,MAAM,QAAQ,GAAG,SAAS,CAAC,MAAM,CAC/B,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QACf,GAAG,IAAI;QACP,CAAC,IAAmB,CAAC,EAAE,WAAW,EAAE;KACrC,CAAC,EACF,EAA+B,CAChC,CAAC;IAEF,OAAO,CACL,OAAC;SACE,YAAY,CACX;QACE,MAAM,EAAE,WAAW,EAAE;QACrB,GAAG,QAAQ;KACZ,EACD;QACE,KAAK,EAAE,CAAC,GAAG,EAAE,EAAE,CACb,GAAG,CAAC,IAAI,KAAK,mBAAmB;YAC9B,CAAC,CAAC,IAAA,uCAA2B,EAC3B;gBACE,QAAQ;gBACR,GAAI,qBAAqB,CAAC,aAAa;qBACpC,SAAsB;aAC1B,EACD,QAAQ,CACT;YACD,CAAC,CAAC,GAAG,CAAC,OAAO;KAClB,CACF;SACA,MAAM,CAAC,IAAA,0BAAc,GAAE,EAAE;QACxB,OAAO,EAAE,4DAA4D;KACtE,CAAC;SACD,QAAQ,EAAE;SACV,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE;QACnB,IAAI,CAAC,KAAK;YAAE,OAAO,IAAI,CAAC;QAExB,MAAM,MAAM,GAAG,oCAAW,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAC9C,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;YAChB,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,OAAiE,CAAC;YAEvF,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;gBAAE,OAAO,IAAI,CAAC;YAE9C,OAAO;gBACL,GAAG,IAAI;gBACP,CAAC,GAAG,CAAC,EAAE,KAAK;aACb,CAAC;QACJ,CAAC,EACD,EAAkB,CACnB,CAAC;QAEF,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IACxD,CAAC,CAAC,CACL,CAAC;AACJ,CAAC"}
|