@lyxa.ai/core 1.1.27 → 1.1.29
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/dist/libraries/mongo/models/review.model.d.ts +1 -0
- package/dist/libraries/mongo/models/review.model.js +7 -1
- package/dist/libraries/mongo/models/review.model.js.map +1 -1
- package/dist/libraries/mongo/models/user.model.d.ts +1 -1
- package/dist/libraries/socket/core/socket-event-registry.map.d.ts +3 -3
- package/dist/libraries/socket/events/chatroom-message-send.socket.event.d.ts +6 -6
- package/dist/libraries/socket/events/chatroom-message-send.socket.event.js +1 -1
- package/dist/libraries/socket/events/chatroom-message-send.socket.event.js.map +1 -1
- package/dist/libraries/trpc/middlewares/createSocketSubscriptionProcedure.d.ts +1 -1
- package/dist/types/README.md +1 -1
- package/dist/types/package.json +1 -1
- package/dist/types/utilities/validation/common-validation.d.ts +78 -2
- package/dist/types/utilities/validation/global-validation.d.ts +38 -14
- package/dist/utilities/validation/common-validation.d.ts +78 -2
- package/dist/utilities/validation/global-validation.d.ts +38 -14
- package/package.json +1 -1
|
@@ -23,6 +23,7 @@ let Review = class Review extends defaultClasses_1.TimeStamps {
|
|
|
23
23
|
tags;
|
|
24
24
|
isVisible;
|
|
25
25
|
deletedBy;
|
|
26
|
+
orderId;
|
|
26
27
|
};
|
|
27
28
|
exports.Review = Review;
|
|
28
29
|
__decorate([
|
|
@@ -53,10 +54,15 @@ __decorate([
|
|
|
53
54
|
(0, typegoose_1.prop)({ ref: () => admin_model_1.Admin }),
|
|
54
55
|
__metadata("design:type", Object)
|
|
55
56
|
], Review.prototype, "deletedBy", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], Review.prototype, "orderId", void 0);
|
|
56
61
|
exports.Review = Review = __decorate([
|
|
57
62
|
(0, typegoose_1.modelOptions)({
|
|
58
63
|
schemaOptions: { collection: 'reviews', discriminatorKey: 'reviewType' },
|
|
59
64
|
}),
|
|
60
|
-
(0, typegoose_1.index)({ order: 1, serviceOrder: 1, reviewType: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })
|
|
65
|
+
(0, typegoose_1.index)({ order: 1, serviceOrder: 1, reviewType: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } }),
|
|
66
|
+
(0, typegoose_1.index)({ orderId: 1 })
|
|
61
67
|
], Review);
|
|
62
68
|
//# sourceMappingURL=review.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"review.model.js","sourceRoot":"/","sources":["libraries/mongo/models/review.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AACrE,6CAAoC;AACpC,kDAAqD;AACrD,+CAAsC;
|
|
1
|
+
{"version":3,"file":"review.model.js","sourceRoot":"/","sources":["libraries/mongo/models/review.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AACrE,6CAAoC;AACpC,kDAAqD;AACrD,+CAAsC;AAU/B,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,2BAAU;IAE9B,UAAU,CAAc;IAGxB,IAAI,CAAa;IAGjB,MAAM,CAAU;IAGhB,WAAW,CAAU;IAGrB,IAAI,CAAY;IAGhB,SAAS,CAAW;IAGpB,SAAS,CAAc;IAGvB,OAAO,CAAU;CACxB,CAAA;AAxBY,wBAAM;AAEX;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAU,EAAE,CAAC;;0CAC1B;AAGxB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;oCAClB;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;;sCAChC;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;2CACK;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;oCACrB;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;yCACZ;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;yCACG;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uCACf;iBAvBZ,MAAM;IARlB,IAAA,wBAAY,EAAC;QACb,aAAa,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,gBAAgB,EAAE,YAAY,EAAE;KACxE,CAAC;IACD,IAAA,iBAAK,EACL,EAAE,KAAK,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,EAC5C,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAC9D;IACA,IAAA,iBAAK,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;GACT,MAAM,CAwBlB","sourcesContent":["import { index, modelOptions, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { User } from './user.model';\nimport { ReviewType } from '../../../utilities/enum';\nimport { Admin } from './admin.model';\n\n@modelOptions({\n\tschemaOptions: { collection: 'reviews', discriminatorKey: 'reviewType' },\n})\n@index(\n\t{ order: 1, serviceOrder: 1, reviewType: 1 },\n\t{ unique: true, partialFilterExpression: { deletedAt: null } }\n)\n@index({ orderId: 1 })\nexport class Review extends TimeStamps {\n\t@prop({ required: true, type: String, enum: ReviewType })\n\tpublic reviewType!: ReviewType;\n\n\t@prop({ required: true, ref: () => User })\n\tpublic user!: Ref<User>;\n\n\t@prop({ required: true, type: Number, min: 1, max: 5 })\n\tpublic rating!: number;\n\n\t@prop({ type: String })\n\tpublic description?: string;\n\n\t@prop({ type: () => [String], default: [] })\n\tpublic tags?: string[];\n\n\t@prop({ type: Boolean, default: true })\n\tpublic isVisible?: boolean;\n\n\t@prop({ ref: () => Admin })\n\tpublic deletedBy?: Ref<Admin>;\n\n\t@prop({ required: true, type: String }) // to store order and serviceOrder orderId for all type of reviews\n\tpublic orderId!: string;\n}\n"]}
|
|
@@ -31,7 +31,7 @@ export declare class User extends TimeStamps {
|
|
|
31
31
|
isPhoneVerified?: boolean;
|
|
32
32
|
onlineStatus?: OnlineStatus;
|
|
33
33
|
fcmTokens?: string[];
|
|
34
|
-
static updateWallet(this: ReturnModelType<typeof User>, userId: string, amount: number): Promise<(import("mongoose").Document<unknown, import("@typegoose/typegoose/lib/types").BeAnObject, User, import("@typegoose/typegoose/lib/types").BeAnyObject
|
|
34
|
+
static updateWallet(this: ReturnModelType<typeof User>, userId: string, amount: number): Promise<(import("mongoose").Document<unknown, import("@typegoose/typegoose/lib/types").BeAnObject, User, import("@typegoose/typegoose/lib/types").BeAnyObject> & Omit<User & {
|
|
35
35
|
_id: import("mongoose").Types.ObjectId;
|
|
36
36
|
} & {
|
|
37
37
|
__v: number;
|
|
@@ -8,11 +8,11 @@ export declare const REGISTRY: {
|
|
|
8
8
|
readonly ctor: typeof ChatroomMessageSendSocketEvent;
|
|
9
9
|
readonly schemas: {
|
|
10
10
|
input: import("zod").ZodObject<{
|
|
11
|
-
chatroomId: import("zod").
|
|
11
|
+
chatroomId: import("zod").ZodString | import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, string, string>;
|
|
12
12
|
}, "strip", import("zod").ZodTypeAny, {
|
|
13
|
-
chatroomId:
|
|
13
|
+
chatroomId: string;
|
|
14
14
|
}, {
|
|
15
|
-
chatroomId:
|
|
15
|
+
chatroomId: string;
|
|
16
16
|
}>;
|
|
17
17
|
output: import("zod").ZodObject<{
|
|
18
18
|
chatroomId: import("zod").ZodEffects<import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>;
|
|
@@ -3,11 +3,11 @@ import { DTO } from '../../../utilities/validation';
|
|
|
3
3
|
import { BaseSocketEvent } from '../BaseSocketEvent';
|
|
4
4
|
import { NotificationSocketEvent } from './notification.socket.event';
|
|
5
5
|
export declare const ChatroomMessageSendSocketInputSchema: z.ZodObject<{
|
|
6
|
-
chatroomId: z.ZodEffects<z.
|
|
6
|
+
chatroomId: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
7
7
|
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
chatroomId:
|
|
8
|
+
chatroomId: string;
|
|
9
9
|
}, {
|
|
10
|
-
chatroomId:
|
|
10
|
+
chatroomId: string;
|
|
11
11
|
}>;
|
|
12
12
|
export declare const ChatroomMessageSendOutputSchema: z.ZodObject<{
|
|
13
13
|
chatroomId: z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>;
|
|
@@ -30,11 +30,11 @@ export type ChatroomMessageSendSocketInputDTO = DTO<typeof ChatroomMessageSendSo
|
|
|
30
30
|
export declare class ChatroomMessageSendSocketEvent extends BaseSocketEvent<typeof ChatroomMessageSendSocketInputSchema, typeof ChatroomMessageSendOutputSchema> {
|
|
31
31
|
static readonly schemas: {
|
|
32
32
|
input: z.ZodObject<{
|
|
33
|
-
chatroomId: z.ZodEffects<z.
|
|
33
|
+
chatroomId: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
34
34
|
}, "strip", z.ZodTypeAny, {
|
|
35
|
-
chatroomId:
|
|
35
|
+
chatroomId: string;
|
|
36
36
|
}, {
|
|
37
|
-
chatroomId:
|
|
37
|
+
chatroomId: string;
|
|
38
38
|
}>;
|
|
39
39
|
output: z.ZodObject<{
|
|
40
40
|
chatroomId: z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>;
|
|
@@ -10,7 +10,7 @@ const validation_1 = require("../../../utilities/validation");
|
|
|
10
10
|
const BaseSocketEvent_1 = require("../BaseSocketEvent");
|
|
11
11
|
const notification_socket_event_1 = require("./notification.socket.event");
|
|
12
12
|
exports.ChatroomMessageSendSocketInputSchema = zod_1.default.object({
|
|
13
|
-
chatroomId: validation_1.ZodValidation.
|
|
13
|
+
chatroomId: validation_1.ZodValidation.string(),
|
|
14
14
|
});
|
|
15
15
|
exports.ChatroomMessageSendOutputSchema = zod_1.default.object({
|
|
16
16
|
chatroomId: validation_1.ZodValidation.coerce.objectId(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatroom-message-send.socket.event.js","sourceRoot":"/","sources":["libraries/socket/events/chatroom-message-send.socket.event.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAoB;AACpB,kDAAqF;AACrF,8DAAmE;AACnE,wDAAqD;AACrD,2EAAsE;AAEzD,QAAA,oCAAoC,GAAG,aAAC,CAAC,MAAM,CAAC;IAC5D,UAAU,EAAE,0BAAa,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"chatroom-message-send.socket.event.js","sourceRoot":"/","sources":["libraries/socket/events/chatroom-message-send.socket.event.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAoB;AACpB,kDAAqF;AACrF,8DAAmE;AACnE,wDAAqD;AACrD,2EAAsE;AAEzD,QAAA,oCAAoC,GAAG,aAAC,CAAC,MAAM,CAAC;IAC5D,UAAU,EAAE,0BAAa,CAAC,MAAM,EAAE;CAClC,CAAC,CAAC;AAEU,QAAA,+BAA+B,GAAG,aAAC,CAAC,MAAM,CAAC;IACvD,UAAU,EAAE,0BAAa,CAAC,MAAM,CAAC,QAAQ,EAAE;IAC3C,SAAS,EAAE,0BAAa,CAAC,MAAM,CAAC,QAAQ,EAAE;IAC1C,OAAO,EAAE,0BAAa,CAAC,MAAM,EAAE;IAC/B,SAAS,EAAE,0BAAa,CAAC,MAAM,CAAC,IAAI,EAAE;CACtC,CAAC,CAAC;AAKH,MAAa,8BAA+B,SAAQ,iCAGnD;IACA,MAAM,CAAU,OAAO,GAAG;QACzB,KAAK,EAAE,4CAAoC;QAC3C,MAAM,EAAE,uCAA+B;KACvC,CAAC;IAEK,YAAY;QAClB,OAAO,IAAI,mDAAuB,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,CAAC;IAChE,CAAC;IAEM,gBAAgB;QACtB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,YAAY,OAA2C;QACtD,KAAK,CAAC,sBAAe,CAAC,qBAAqB,EAAE,8BAA8B,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC/F,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,KAA2D;QAC5E,OAAO,KAAK,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;IACpC,CAAC;;AAvBF,wEAwBC","sourcesContent":["import z from 'zod';\nimport { PushNotificationEventType, SocketEventType } from '../../../utilities/enum';\nimport { DTO, ZodValidation } from '../../../utilities/validation';\nimport { BaseSocketEvent } from '../BaseSocketEvent';\nimport { NotificationSocketEvent } from './notification.socket.event';\n\nexport const ChatroomMessageSendSocketInputSchema = z.object({\n\tchatroomId: ZodValidation.string(),\n});\n\nexport const ChatroomMessageSendOutputSchema = z.object({\n\tchatroomId: ZodValidation.coerce.objectId(),\n\tmessageId: ZodValidation.coerce.objectId(),\n\tcontent: ZodValidation.string(),\n\tcreatedAt: ZodValidation.coerce.date(),\n});\n\nexport type ChatroomMessageSendSocketOutputDTO = DTO<typeof ChatroomMessageSendOutputSchema>;\nexport type ChatroomMessageSendSocketInputDTO = DTO<typeof ChatroomMessageSendSocketInputSchema>;\n\nexport class ChatroomMessageSendSocketEvent extends BaseSocketEvent<\n\ttypeof ChatroomMessageSendSocketInputSchema,\n\ttypeof ChatroomMessageSendOutputSchema\n> {\n\tstatic readonly schemas = {\n\t\tinput: ChatroomMessageSendSocketInputSchema,\n\t\toutput: ChatroomMessageSendOutputSchema,\n\t};\n\n\tpublic notification(): NotificationSocketEvent | null {\n\t\treturn new NotificationSocketEvent({ message: `New message` });\n\t}\n\n\tpublic pushNotification(): NotificationSocketEvent | null {\n\t\treturn null;\n\t}\n\n\tconstructor(payload: ChatroomMessageSendSocketOutputDTO) {\n\t\tsuper(SocketEventType.CHATROOM_MESSAGE_SEND, ChatroomMessageSendSocketEvent.schemas, payload);\n\t}\n\n\tstatic identifier(input: z.infer<typeof ChatroomMessageSendSocketInputSchema>): string {\n\t\treturn input.chatroomId.toString();\n\t}\n}\n"]}
|
|
@@ -7,6 +7,6 @@ export declare function createSocketSubscriptionProcedure<T extends SocketEventT
|
|
|
7
7
|
getId: (out: OutputFor<T>) => string;
|
|
8
8
|
}): import("@trpc/server").TRPCSubscriptionProcedure<{
|
|
9
9
|
input: unknown;
|
|
10
|
-
output: AsyncIterable<import("@trpc/server/dist/unstable-core-do-not-import.d-
|
|
10
|
+
output: AsyncIterable<import("@trpc/server/dist/unstable-core-do-not-import.d-C6mFWtNG.cjs").TrackedData<unknown>, void, unknown>;
|
|
11
11
|
meta: object;
|
|
12
12
|
}>;
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED
|
@@ -647,7 +647,7 @@ export declare const createResponseSchema: <T>(schema: z.ZodSchema<T>) => z.ZodO
|
|
|
647
647
|
totalPages: number;
|
|
648
648
|
} | undefined;
|
|
649
649
|
}>, z.ZodType<T, z.ZodTypeDef, T>]>>;
|
|
650
|
-
}>, any> extends infer T_1 ? { [k in keyof T_1]:
|
|
650
|
+
}>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
651
651
|
success: z.ZodBoolean;
|
|
652
652
|
message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
653
653
|
data: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
@@ -685,7 +685,83 @@ export declare const createResponseSchema: <T>(schema: z.ZodSchema<T>) => z.ZodO
|
|
|
685
685
|
totalPages: number;
|
|
686
686
|
} | undefined;
|
|
687
687
|
}>, z.ZodType<T, z.ZodTypeDef, T>]>>;
|
|
688
|
-
}>
|
|
688
|
+
}>, any>[k]; } : never, z.baseObjectInputType<{
|
|
689
|
+
success: z.ZodBoolean;
|
|
690
|
+
message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
691
|
+
data: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
692
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
693
|
+
page: z.ZodNumber;
|
|
694
|
+
size: z.ZodNumber;
|
|
695
|
+
totalElements: z.ZodNumber;
|
|
696
|
+
totalPages: z.ZodNumber;
|
|
697
|
+
}, "strip", z.ZodTypeAny, {
|
|
698
|
+
size: number;
|
|
699
|
+
page: number;
|
|
700
|
+
totalElements: number;
|
|
701
|
+
totalPages: number;
|
|
702
|
+
}, {
|
|
703
|
+
size: number;
|
|
704
|
+
page: number;
|
|
705
|
+
totalElements: number;
|
|
706
|
+
totalPages: number;
|
|
707
|
+
}>>;
|
|
708
|
+
documents: z.ZodArray<z.ZodType<T, z.ZodTypeDef, T>, "many">;
|
|
709
|
+
}, "strip", z.ZodTypeAny, {
|
|
710
|
+
documents: T[];
|
|
711
|
+
metadata?: {
|
|
712
|
+
size: number;
|
|
713
|
+
page: number;
|
|
714
|
+
totalElements: number;
|
|
715
|
+
totalPages: number;
|
|
716
|
+
} | undefined;
|
|
717
|
+
}, {
|
|
718
|
+
documents: T[];
|
|
719
|
+
metadata?: {
|
|
720
|
+
size: number;
|
|
721
|
+
page: number;
|
|
722
|
+
totalElements: number;
|
|
723
|
+
totalPages: number;
|
|
724
|
+
} | undefined;
|
|
725
|
+
}>, z.ZodType<T, z.ZodTypeDef, T>]>>;
|
|
726
|
+
}> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<{
|
|
727
|
+
success: z.ZodBoolean;
|
|
728
|
+
message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
729
|
+
data: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
730
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
731
|
+
page: z.ZodNumber;
|
|
732
|
+
size: z.ZodNumber;
|
|
733
|
+
totalElements: z.ZodNumber;
|
|
734
|
+
totalPages: z.ZodNumber;
|
|
735
|
+
}, "strip", z.ZodTypeAny, {
|
|
736
|
+
size: number;
|
|
737
|
+
page: number;
|
|
738
|
+
totalElements: number;
|
|
739
|
+
totalPages: number;
|
|
740
|
+
}, {
|
|
741
|
+
size: number;
|
|
742
|
+
page: number;
|
|
743
|
+
totalElements: number;
|
|
744
|
+
totalPages: number;
|
|
745
|
+
}>>;
|
|
746
|
+
documents: z.ZodArray<z.ZodType<T, z.ZodTypeDef, T>, "many">;
|
|
747
|
+
}, "strip", z.ZodTypeAny, {
|
|
748
|
+
documents: T[];
|
|
749
|
+
metadata?: {
|
|
750
|
+
size: number;
|
|
751
|
+
page: number;
|
|
752
|
+
totalElements: number;
|
|
753
|
+
totalPages: number;
|
|
754
|
+
} | undefined;
|
|
755
|
+
}, {
|
|
756
|
+
documents: T[];
|
|
757
|
+
metadata?: {
|
|
758
|
+
size: number;
|
|
759
|
+
page: number;
|
|
760
|
+
totalElements: number;
|
|
761
|
+
totalPages: number;
|
|
762
|
+
} | undefined;
|
|
763
|
+
}>, z.ZodType<T, z.ZodTypeDef, T>]>>;
|
|
764
|
+
}>[k_1]; } : never>;
|
|
689
765
|
export type PaginatedDTO<T> = {
|
|
690
766
|
metadata: DTO<typeof metadataSchema>;
|
|
691
767
|
documents: T[];
|
|
@@ -76,22 +76,34 @@ export declare class SchemaBuilder<T extends z.ZodRawShape> {
|
|
|
76
76
|
private baseSchema;
|
|
77
77
|
constructor(baseFields: T, includeTimestamps?: boolean, includeTracking?: boolean);
|
|
78
78
|
private createBaseSchema;
|
|
79
|
-
getBaseSchema(): z.ZodObject<T, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any> extends infer T_1 ? { [k in keyof T_1]:
|
|
79
|
+
getBaseSchema(): z.ZodObject<T, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any>[k]; } : never, z.baseObjectInputType<T> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<T>[k_1]; } : never>;
|
|
80
80
|
getEntitySchema(): z.ZodObject<z.objectUtil.extendShape<T, {
|
|
81
81
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
82
|
-
}> extends infer T_1 extends z.ZodRawShape ? { [k in keyof T_1]: z.ZodOptional<
|
|
82
|
+
}> extends infer T_1 extends z.ZodRawShape ? { [k in keyof T_1]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
83
83
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
84
|
-
}>
|
|
84
|
+
}>[k]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
|
|
85
85
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
86
|
-
}> extends infer
|
|
86
|
+
}> extends infer T_2 extends z.ZodRawShape ? { [k in keyof T_2]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
87
|
+
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
88
|
+
}>[k]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
|
|
89
|
+
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
90
|
+
}> extends infer T_3 extends z.ZodRawShape ? { [k in keyof T_3]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
91
|
+
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
92
|
+
}>[k]>; } : never, z.ZodTypeAny, "passthrough">>;
|
|
87
93
|
getIdSchema(): z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
88
94
|
getUpdateSchema(excludeFields?: ExcludeFromUpdate): z.ZodObject<z.objectUtil.extendShape<T, {
|
|
89
95
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
90
|
-
}> extends infer T_1 extends z.ZodRawShape ? { [k in keyof T_1]: z.ZodOptional<
|
|
96
|
+
}> extends infer T_1 extends z.ZodRawShape ? { [k in keyof T_1]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
97
|
+
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
98
|
+
}>[k]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
|
|
99
|
+
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
100
|
+
}> extends infer T_2 extends z.ZodRawShape ? { [k in keyof T_2]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
101
|
+
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
102
|
+
}>[k]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
|
|
91
103
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
92
|
-
}> extends infer
|
|
104
|
+
}> extends infer T_3 extends z.ZodRawShape ? { [k in keyof T_3]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
93
105
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
94
|
-
}>
|
|
106
|
+
}>[k]>; } : never, z.ZodTypeAny, "passthrough">> | z.ZodObject<{
|
|
95
107
|
[x: string]: z.ZodOptional<z.ZodTypeAny>;
|
|
96
108
|
}, "strict", z.ZodTypeAny, {
|
|
97
109
|
[x: string]: any;
|
|
@@ -114,22 +126,34 @@ export declare class SchemaBuilder<T extends z.ZodRawShape> {
|
|
|
114
126
|
[x: string]: any;
|
|
115
127
|
}>;
|
|
116
128
|
getAllSchemas(excludeFromUpdate?: ExcludeFromUpdate): {
|
|
117
|
-
BaseSchema: z.ZodObject<T, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any> extends infer T_1 ? { [k in keyof T_1]:
|
|
129
|
+
BaseSchema: z.ZodObject<T, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any>[k]; } : never, z.baseObjectInputType<T> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<T>[k_1]; } : never>;
|
|
118
130
|
EntitySchema: z.ZodObject<z.objectUtil.extendShape<T, {
|
|
119
131
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
120
|
-
}> extends infer T_3 extends z.ZodRawShape ? { [k_2 in keyof T_3]: z.ZodOptional<
|
|
132
|
+
}> extends infer T_3 extends z.ZodRawShape ? { [k_2 in keyof T_3]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
121
133
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
122
|
-
}>
|
|
134
|
+
}>[k_2]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
|
|
123
135
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
124
|
-
}> extends infer
|
|
136
|
+
}> extends infer T_4 extends z.ZodRawShape ? { [k_2 in keyof T_4]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
137
|
+
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
138
|
+
}>[k_2]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
|
|
139
|
+
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
140
|
+
}> extends infer T_5 extends z.ZodRawShape ? { [k_2 in keyof T_5]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
141
|
+
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
142
|
+
}>[k_2]>; } : never, z.ZodTypeAny, "passthrough">>;
|
|
125
143
|
IdSchema: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
126
144
|
UpdateSchema: z.ZodObject<z.objectUtil.extendShape<T, {
|
|
127
145
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
128
|
-
}> extends infer T_6 extends z.ZodRawShape ? { [k_2 in keyof T_6]: z.ZodOptional<
|
|
146
|
+
}> extends infer T_6 extends z.ZodRawShape ? { [k_2 in keyof T_6]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
147
|
+
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
148
|
+
}>[k_2]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
|
|
149
|
+
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
150
|
+
}> extends infer T_7 extends z.ZodRawShape ? { [k_2 in keyof T_7]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
151
|
+
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
152
|
+
}>[k_2]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
|
|
129
153
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
130
|
-
}> extends infer
|
|
154
|
+
}> extends infer T_8 extends z.ZodRawShape ? { [k_2 in keyof T_8]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
131
155
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
132
|
-
}>
|
|
156
|
+
}>[k_2]>; } : never, z.ZodTypeAny, "passthrough">> | z.ZodObject<{
|
|
133
157
|
[x: string]: z.ZodOptional<z.ZodTypeAny>;
|
|
134
158
|
}, "strict", z.ZodTypeAny, {
|
|
135
159
|
[x: string]: any;
|
|
@@ -647,7 +647,7 @@ export declare const createResponseSchema: <T>(schema: z.ZodSchema<T>) => z.ZodO
|
|
|
647
647
|
totalPages: number;
|
|
648
648
|
} | undefined;
|
|
649
649
|
}>, z.ZodType<T, z.ZodTypeDef, T>]>>;
|
|
650
|
-
}>, any> extends infer T_1 ? { [k in keyof T_1]:
|
|
650
|
+
}>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
651
651
|
success: z.ZodBoolean;
|
|
652
652
|
message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
653
653
|
data: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
@@ -685,7 +685,83 @@ export declare const createResponseSchema: <T>(schema: z.ZodSchema<T>) => z.ZodO
|
|
|
685
685
|
totalPages: number;
|
|
686
686
|
} | undefined;
|
|
687
687
|
}>, z.ZodType<T, z.ZodTypeDef, T>]>>;
|
|
688
|
-
}>
|
|
688
|
+
}>, any>[k]; } : never, z.baseObjectInputType<{
|
|
689
|
+
success: z.ZodBoolean;
|
|
690
|
+
message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
691
|
+
data: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
692
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
693
|
+
page: z.ZodNumber;
|
|
694
|
+
size: z.ZodNumber;
|
|
695
|
+
totalElements: z.ZodNumber;
|
|
696
|
+
totalPages: z.ZodNumber;
|
|
697
|
+
}, "strip", z.ZodTypeAny, {
|
|
698
|
+
page: number;
|
|
699
|
+
size: number;
|
|
700
|
+
totalElements: number;
|
|
701
|
+
totalPages: number;
|
|
702
|
+
}, {
|
|
703
|
+
page: number;
|
|
704
|
+
size: number;
|
|
705
|
+
totalElements: number;
|
|
706
|
+
totalPages: number;
|
|
707
|
+
}>>;
|
|
708
|
+
documents: z.ZodArray<z.ZodType<T, z.ZodTypeDef, T>, "many">;
|
|
709
|
+
}, "strip", z.ZodTypeAny, {
|
|
710
|
+
documents: T[];
|
|
711
|
+
metadata?: {
|
|
712
|
+
page: number;
|
|
713
|
+
size: number;
|
|
714
|
+
totalElements: number;
|
|
715
|
+
totalPages: number;
|
|
716
|
+
} | undefined;
|
|
717
|
+
}, {
|
|
718
|
+
documents: T[];
|
|
719
|
+
metadata?: {
|
|
720
|
+
page: number;
|
|
721
|
+
size: number;
|
|
722
|
+
totalElements: number;
|
|
723
|
+
totalPages: number;
|
|
724
|
+
} | undefined;
|
|
725
|
+
}>, z.ZodType<T, z.ZodTypeDef, T>]>>;
|
|
726
|
+
}> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<{
|
|
727
|
+
success: z.ZodBoolean;
|
|
728
|
+
message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
729
|
+
data: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
730
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
731
|
+
page: z.ZodNumber;
|
|
732
|
+
size: z.ZodNumber;
|
|
733
|
+
totalElements: z.ZodNumber;
|
|
734
|
+
totalPages: z.ZodNumber;
|
|
735
|
+
}, "strip", z.ZodTypeAny, {
|
|
736
|
+
page: number;
|
|
737
|
+
size: number;
|
|
738
|
+
totalElements: number;
|
|
739
|
+
totalPages: number;
|
|
740
|
+
}, {
|
|
741
|
+
page: number;
|
|
742
|
+
size: number;
|
|
743
|
+
totalElements: number;
|
|
744
|
+
totalPages: number;
|
|
745
|
+
}>>;
|
|
746
|
+
documents: z.ZodArray<z.ZodType<T, z.ZodTypeDef, T>, "many">;
|
|
747
|
+
}, "strip", z.ZodTypeAny, {
|
|
748
|
+
documents: T[];
|
|
749
|
+
metadata?: {
|
|
750
|
+
page: number;
|
|
751
|
+
size: number;
|
|
752
|
+
totalElements: number;
|
|
753
|
+
totalPages: number;
|
|
754
|
+
} | undefined;
|
|
755
|
+
}, {
|
|
756
|
+
documents: T[];
|
|
757
|
+
metadata?: {
|
|
758
|
+
page: number;
|
|
759
|
+
size: number;
|
|
760
|
+
totalElements: number;
|
|
761
|
+
totalPages: number;
|
|
762
|
+
} | undefined;
|
|
763
|
+
}>, z.ZodType<T, z.ZodTypeDef, T>]>>;
|
|
764
|
+
}>[k_1]; } : never>;
|
|
689
765
|
export type PaginatedDTO<T> = {
|
|
690
766
|
metadata: DTO<typeof metadataSchema>;
|
|
691
767
|
documents: T[];
|
|
@@ -76,22 +76,34 @@ export declare class SchemaBuilder<T extends z.ZodRawShape> {
|
|
|
76
76
|
private baseSchema;
|
|
77
77
|
constructor(baseFields: T, includeTimestamps?: boolean, includeTracking?: boolean);
|
|
78
78
|
private createBaseSchema;
|
|
79
|
-
getBaseSchema(): z.ZodObject<T, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any> extends infer T_1 ? { [k in keyof T_1]:
|
|
79
|
+
getBaseSchema(): z.ZodObject<T, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any>[k]; } : never, z.baseObjectInputType<T> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<T>[k_1]; } : never>;
|
|
80
80
|
getEntitySchema(): z.ZodObject<z.objectUtil.extendShape<T, {
|
|
81
81
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
82
|
-
}> extends infer T_1 extends z.ZodRawShape ? { [k in keyof T_1]: z.ZodOptional<
|
|
82
|
+
}> extends infer T_1 extends z.ZodRawShape ? { [k in keyof T_1]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
83
83
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
84
|
-
}>
|
|
84
|
+
}>[k]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
|
|
85
85
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
86
|
-
}> extends infer
|
|
86
|
+
}> extends infer T_2 extends z.ZodRawShape ? { [k in keyof T_2]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
87
|
+
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
88
|
+
}>[k]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
|
|
89
|
+
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
90
|
+
}> extends infer T_3 extends z.ZodRawShape ? { [k in keyof T_3]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
91
|
+
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
92
|
+
}>[k]>; } : never, z.ZodTypeAny, "passthrough">>;
|
|
87
93
|
getIdSchema(): z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
88
94
|
getUpdateSchema(excludeFields?: ExcludeFromUpdate): z.ZodObject<z.objectUtil.extendShape<T, {
|
|
89
95
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
90
|
-
}> extends infer T_1 extends z.ZodRawShape ? { [k in keyof T_1]: z.ZodOptional<
|
|
96
|
+
}> extends infer T_1 extends z.ZodRawShape ? { [k in keyof T_1]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
97
|
+
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
98
|
+
}>[k]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
|
|
99
|
+
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
100
|
+
}> extends infer T_2 extends z.ZodRawShape ? { [k in keyof T_2]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
101
|
+
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
102
|
+
}>[k]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
|
|
91
103
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
92
|
-
}> extends infer
|
|
104
|
+
}> extends infer T_3 extends z.ZodRawShape ? { [k in keyof T_3]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
93
105
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
94
|
-
}>
|
|
106
|
+
}>[k]>; } : never, z.ZodTypeAny, "passthrough">> | z.ZodObject<{
|
|
95
107
|
[x: string]: z.ZodOptional<z.ZodTypeAny>;
|
|
96
108
|
}, "strict", z.ZodTypeAny, {
|
|
97
109
|
[x: string]: any;
|
|
@@ -114,22 +126,34 @@ export declare class SchemaBuilder<T extends z.ZodRawShape> {
|
|
|
114
126
|
[x: string]: any;
|
|
115
127
|
}>;
|
|
116
128
|
getAllSchemas(excludeFromUpdate?: ExcludeFromUpdate): {
|
|
117
|
-
BaseSchema: z.ZodObject<T, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any> extends infer T_1 ? { [k in keyof T_1]:
|
|
129
|
+
BaseSchema: z.ZodObject<T, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any>[k]; } : never, z.baseObjectInputType<T> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<T>[k_1]; } : never>;
|
|
118
130
|
EntitySchema: z.ZodObject<z.objectUtil.extendShape<T, {
|
|
119
131
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
120
|
-
}> extends infer T_3 extends z.ZodRawShape ? { [k_2 in keyof T_3]: z.ZodOptional<
|
|
132
|
+
}> extends infer T_3 extends z.ZodRawShape ? { [k_2 in keyof T_3]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
121
133
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
122
|
-
}>
|
|
134
|
+
}>[k_2]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
|
|
123
135
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
124
|
-
}> extends infer
|
|
136
|
+
}> extends infer T_4 extends z.ZodRawShape ? { [k_2 in keyof T_4]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
137
|
+
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
138
|
+
}>[k_2]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
|
|
139
|
+
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
140
|
+
}> extends infer T_5 extends z.ZodRawShape ? { [k_2 in keyof T_5]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
141
|
+
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
142
|
+
}>[k_2]>; } : never, z.ZodTypeAny, "passthrough">>;
|
|
125
143
|
IdSchema: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
126
144
|
UpdateSchema: z.ZodObject<z.objectUtil.extendShape<T, {
|
|
127
145
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
128
|
-
}> extends infer T_6 extends z.ZodRawShape ? { [k_2 in keyof T_6]: z.ZodOptional<
|
|
146
|
+
}> extends infer T_6 extends z.ZodRawShape ? { [k_2 in keyof T_6]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
147
|
+
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
148
|
+
}>[k_2]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
|
|
149
|
+
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
150
|
+
}> extends infer T_7 extends z.ZodRawShape ? { [k_2 in keyof T_7]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
151
|
+
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
152
|
+
}>[k_2]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
|
|
129
153
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
130
|
-
}> extends infer
|
|
154
|
+
}> extends infer T_8 extends z.ZodRawShape ? { [k_2 in keyof T_8]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
131
155
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>;
|
|
132
|
-
}>
|
|
156
|
+
}>[k_2]>; } : never, z.ZodTypeAny, "passthrough">> | z.ZodObject<{
|
|
133
157
|
[x: string]: z.ZodOptional<z.ZodTypeAny>;
|
|
134
158
|
}, "strict", z.ZodTypeAny, {
|
|
135
159
|
[x: string]: any;
|