@lyxa.ai/types 1.0.369 → 1.0.370
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -587,7 +587,7 @@ export declare const createResponseSchema: <T>(schema: z.ZodSchema<T>) => z.ZodO
|
|
|
587
587
|
totalPages: number;
|
|
588
588
|
} | undefined;
|
|
589
589
|
}>, z.ZodType<T, z.ZodTypeDef, T>]>>;
|
|
590
|
-
}>, any> extends infer T_1 ? { [k in keyof T_1]:
|
|
590
|
+
}>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
591
591
|
success: z.ZodBoolean;
|
|
592
592
|
message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
593
593
|
data: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
@@ -625,7 +625,83 @@ export declare const createResponseSchema: <T>(schema: z.ZodSchema<T>) => z.ZodO
|
|
|
625
625
|
totalPages: number;
|
|
626
626
|
} | undefined;
|
|
627
627
|
}>, z.ZodType<T, z.ZodTypeDef, T>]>>;
|
|
628
|
-
}>
|
|
628
|
+
}>, any>[k]; } : never, z.baseObjectInputType<{
|
|
629
|
+
success: z.ZodBoolean;
|
|
630
|
+
message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
631
|
+
data: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
632
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
633
|
+
page: z.ZodNumber;
|
|
634
|
+
size: z.ZodNumber;
|
|
635
|
+
totalElements: z.ZodNumber;
|
|
636
|
+
totalPages: z.ZodNumber;
|
|
637
|
+
}, "strip", z.ZodTypeAny, {
|
|
638
|
+
size: number;
|
|
639
|
+
page: number;
|
|
640
|
+
totalElements: number;
|
|
641
|
+
totalPages: number;
|
|
642
|
+
}, {
|
|
643
|
+
size: number;
|
|
644
|
+
page: number;
|
|
645
|
+
totalElements: number;
|
|
646
|
+
totalPages: number;
|
|
647
|
+
}>>;
|
|
648
|
+
documents: z.ZodArray<z.ZodType<T, z.ZodTypeDef, T>, "many">;
|
|
649
|
+
}, "strip", z.ZodTypeAny, {
|
|
650
|
+
documents: T[];
|
|
651
|
+
metadata?: {
|
|
652
|
+
size: number;
|
|
653
|
+
page: number;
|
|
654
|
+
totalElements: number;
|
|
655
|
+
totalPages: number;
|
|
656
|
+
} | undefined;
|
|
657
|
+
}, {
|
|
658
|
+
documents: T[];
|
|
659
|
+
metadata?: {
|
|
660
|
+
size: number;
|
|
661
|
+
page: number;
|
|
662
|
+
totalElements: number;
|
|
663
|
+
totalPages: number;
|
|
664
|
+
} | undefined;
|
|
665
|
+
}>, z.ZodType<T, z.ZodTypeDef, T>]>>;
|
|
666
|
+
}> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<{
|
|
667
|
+
success: z.ZodBoolean;
|
|
668
|
+
message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
669
|
+
data: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
670
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
671
|
+
page: z.ZodNumber;
|
|
672
|
+
size: z.ZodNumber;
|
|
673
|
+
totalElements: z.ZodNumber;
|
|
674
|
+
totalPages: z.ZodNumber;
|
|
675
|
+
}, "strip", z.ZodTypeAny, {
|
|
676
|
+
size: number;
|
|
677
|
+
page: number;
|
|
678
|
+
totalElements: number;
|
|
679
|
+
totalPages: number;
|
|
680
|
+
}, {
|
|
681
|
+
size: number;
|
|
682
|
+
page: number;
|
|
683
|
+
totalElements: number;
|
|
684
|
+
totalPages: number;
|
|
685
|
+
}>>;
|
|
686
|
+
documents: z.ZodArray<z.ZodType<T, z.ZodTypeDef, T>, "many">;
|
|
687
|
+
}, "strip", z.ZodTypeAny, {
|
|
688
|
+
documents: T[];
|
|
689
|
+
metadata?: {
|
|
690
|
+
size: number;
|
|
691
|
+
page: number;
|
|
692
|
+
totalElements: number;
|
|
693
|
+
totalPages: number;
|
|
694
|
+
} | undefined;
|
|
695
|
+
}, {
|
|
696
|
+
documents: T[];
|
|
697
|
+
metadata?: {
|
|
698
|
+
size: number;
|
|
699
|
+
page: number;
|
|
700
|
+
totalElements: number;
|
|
701
|
+
totalPages: number;
|
|
702
|
+
} | undefined;
|
|
703
|
+
}>, z.ZodType<T, z.ZodTypeDef, T>]>>;
|
|
704
|
+
}>[k_1]; } : never>;
|
|
629
705
|
export type PaginatedDTO<T> = {
|
|
630
706
|
metadata: DTO<typeof metadataSchema>;
|
|
631
707
|
documents: T[];
|
|
@@ -62,22 +62,34 @@ export declare class SchemaBuilder<T extends z.ZodRawShape> {
|
|
|
62
62
|
private baseSchema;
|
|
63
63
|
constructor(baseFields: T, includeTimestamps?: boolean, includeTracking?: boolean);
|
|
64
64
|
private createBaseSchema;
|
|
65
|
-
getBaseSchema(): z.ZodObject<T, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any> extends infer T_1 ? { [k in keyof T_1]:
|
|
65
|
+
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>;
|
|
66
66
|
getEntitySchema(): z.ZodObject<z.objectUtil.extendShape<T, {
|
|
67
67
|
_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>]>;
|
|
68
|
-
}> extends infer T_1 extends z.ZodRawShape ? { [k in keyof T_1]: z.ZodOptional<
|
|
68
|
+
}> extends infer T_1 extends z.ZodRawShape ? { [k in keyof T_1]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
69
69
|
_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>]>;
|
|
70
|
-
}>
|
|
70
|
+
}>[k]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
|
|
71
71
|
_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>]>;
|
|
72
|
-
}> extends infer
|
|
72
|
+
}> extends infer T_2 extends z.ZodRawShape ? { [k in keyof T_2]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
73
|
+
_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>]>;
|
|
74
|
+
}>[k]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
|
|
75
|
+
_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>]>;
|
|
76
|
+
}> extends infer T_3 extends z.ZodRawShape ? { [k in keyof T_3]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
77
|
+
_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>]>;
|
|
78
|
+
}>[k]>; } : never, z.ZodTypeAny, "passthrough">>;
|
|
73
79
|
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>]>;
|
|
74
80
|
getUpdateSchema(excludeFields?: ExcludeFromUpdate): z.ZodObject<z.objectUtil.extendShape<T, {
|
|
75
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>]>;
|
|
76
|
-
}> 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
|
+
_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
|
+
}>[k]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
|
|
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 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, {
|
|
77
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>]>;
|
|
78
|
-
}> extends infer
|
|
90
|
+
}> extends infer T_3 extends z.ZodRawShape ? { [k in keyof T_3]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
79
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>]>;
|
|
80
|
-
}>
|
|
92
|
+
}>[k]>; } : never, z.ZodTypeAny, "passthrough">> | z.ZodObject<{
|
|
81
93
|
[x: string]: z.ZodOptional<z.ZodTypeAny>;
|
|
82
94
|
}, "strict", z.ZodTypeAny, {
|
|
83
95
|
[x: string]: any;
|
|
@@ -100,22 +112,34 @@ export declare class SchemaBuilder<T extends z.ZodRawShape> {
|
|
|
100
112
|
[x: string]: any;
|
|
101
113
|
}>;
|
|
102
114
|
getAllSchemas(excludeFromUpdate?: ExcludeFromUpdate): {
|
|
103
|
-
BaseSchema: z.ZodObject<T, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<T>, any> extends infer T_1 ? { [k in keyof T_1]:
|
|
115
|
+
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>;
|
|
104
116
|
EntitySchema: z.ZodObject<z.objectUtil.extendShape<T, {
|
|
105
117
|
_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>]>;
|
|
106
|
-
}> extends infer T_3 extends z.ZodRawShape ? { [k_2 in keyof T_3]: z.ZodOptional<
|
|
118
|
+
}> extends infer T_3 extends z.ZodRawShape ? { [k_2 in keyof T_3]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
107
119
|
_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>]>;
|
|
108
|
-
}>
|
|
120
|
+
}>[k_2]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
|
|
109
121
|
_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>]>;
|
|
110
|
-
}> extends infer
|
|
122
|
+
}> extends infer T_4 extends z.ZodRawShape ? { [k_2 in keyof T_4]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
123
|
+
_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
|
+
}>[k_2]>; } : never, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<T, {
|
|
125
|
+
_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>]>;
|
|
126
|
+
}> extends infer T_5 extends z.ZodRawShape ? { [k_2 in keyof T_5]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
127
|
+
_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
|
+
}>[k_2]>; } : never, z.ZodTypeAny, "passthrough">>;
|
|
111
129
|
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>]>;
|
|
112
130
|
UpdateSchema: z.ZodObject<z.objectUtil.extendShape<T, {
|
|
113
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>]>;
|
|
114
|
-
}> extends infer T_6 extends z.ZodRawShape ? { [k_2 in keyof T_6]: z.ZodOptional<
|
|
132
|
+
}> extends infer T_6 extends z.ZodRawShape ? { [k_2 in keyof T_6]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
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>]>;
|
|
134
|
+
}>[k_2]>; } : never, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<T, {
|
|
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>]>;
|
|
136
|
+
}> extends infer T_7 extends z.ZodRawShape ? { [k_2 in keyof T_7]: 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, {
|
|
115
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>]>;
|
|
116
|
-
}> extends infer
|
|
140
|
+
}> extends infer T_8 extends z.ZodRawShape ? { [k_2 in keyof T_8]: z.ZodOptional<z.objectUtil.extendShape<T, {
|
|
117
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>]>;
|
|
118
|
-
}>
|
|
142
|
+
}>[k_2]>; } : never, z.ZodTypeAny, "passthrough">> | z.ZodObject<{
|
|
119
143
|
[x: string]: z.ZodOptional<z.ZodTypeAny>;
|
|
120
144
|
}, "strict", z.ZodTypeAny, {
|
|
121
145
|
[x: string]: any;
|