@postxl/schema 1.1.1 → 1.2.0
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/enum/enum.brands.d.ts +6 -6
- package/dist/enum/enum.brands.js +6 -3
- package/dist/enum/enum.d.ts +10 -34
- package/dist/enum/enum.defaults.d.ts +9 -9
- package/dist/enum/enum.json-decoder.d.ts +8 -44
- package/dist/enum/enum.json-decoder.js +9 -6
- package/dist/enum/enum.transformer.d.ts +4 -4
- package/dist/field/defaults.d.ts +5 -5
- package/dist/field/discriminated-union.d.ts +13 -49
- package/dist/field/enum.d.ts +9 -27
- package/dist/field/field.d.ts +80 -300
- package/dist/field/id.d.ts +22 -62
- package/dist/field/relation.d.ts +10 -32
- package/dist/field/relation.js +4 -2
- package/dist/field/scalar.d.ts +13 -77
- package/dist/field/shared/brands.d.ts +24 -24
- package/dist/field/shared/brands.js +28 -10
- package/dist/field/shared/decoders.d.ts +4 -4
- package/dist/field/shared/decoders.js +8 -6
- package/dist/field/shared/seed.d.ts +2 -8
- package/dist/model/model.brands.d.ts +4 -4
- package/dist/model/model.defaults.d.ts +10 -10
- package/dist/model/model.json-decoder.d.ts +10 -80
- package/dist/model/model.json-decoder.js +13 -10
- package/dist/model/model.transformer.d.ts +32 -30
- package/dist/project-schema/project-schema.brands.d.ts +6 -6
- package/dist/project-schema/project-schema.brands.js +6 -1
- package/dist/project-schema/project-schema.defaults.d.ts +2 -2
- package/dist/project-schema/project-schema.json-decoder.d.ts +19 -222
- package/dist/project-schema/project-schema.json-decoder.js +10 -8
- package/dist/project-schema/project-schema.transformer.d.ts +30 -189
- package/package.json +2 -2
package/dist/field/field.d.ts
CHANGED
|
@@ -13,43 +13,23 @@ import { FieldScalar, FieldScalarEnriched } from './scalar';
|
|
|
13
13
|
export declare const createFieldJSONDecoder: (params: {
|
|
14
14
|
modelNames: Model.ModelName[];
|
|
15
15
|
enumNames: Enum.EnumName[];
|
|
16
|
-
}) => z.ZodUnion<[z.
|
|
16
|
+
}) => z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
|
|
17
17
|
name: z.ZodLiteral<"id">;
|
|
18
|
-
type: z.ZodUnion<[z.ZodLiteral<"String">, z.ZodLiteral<"Int">]>;
|
|
18
|
+
type: z.ZodUnion<readonly [z.ZodLiteral<"String">, z.ZodLiteral<"Int">]>;
|
|
19
19
|
databaseName: z.ZodOptional<z.ZodString>;
|
|
20
|
-
excelName: z.
|
|
20
|
+
excelName: z.ZodOptional<z.ZodString>;
|
|
21
21
|
label: z.ZodOptional<z.ZodString>;
|
|
22
22
|
description: z.ZodOptional<z.ZodString>;
|
|
23
23
|
isReadonly: z.ZodOptional<z.ZodBoolean>;
|
|
24
24
|
faker: z.ZodOptional<z.ZodString>;
|
|
25
|
-
seed: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodDate]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodDate]
|
|
26
|
-
},
|
|
27
|
-
type: "String" | "Int";
|
|
28
|
-
name: "id";
|
|
29
|
-
description?: string | undefined;
|
|
30
|
-
databaseName?: string | undefined;
|
|
31
|
-
excelName?: string | undefined;
|
|
32
|
-
label?: string | undefined;
|
|
33
|
-
isReadonly?: boolean | undefined;
|
|
34
|
-
faker?: string | undefined;
|
|
35
|
-
seed?: string | number | boolean | Date | (string | number | boolean | Date)[] | undefined;
|
|
36
|
-
}, {
|
|
37
|
-
type: "String" | "Int";
|
|
38
|
-
name: "id";
|
|
39
|
-
description?: string | undefined;
|
|
40
|
-
databaseName?: string | undefined;
|
|
41
|
-
excelName?: string | undefined;
|
|
42
|
-
label?: string | undefined;
|
|
43
|
-
isReadonly?: boolean | undefined;
|
|
44
|
-
faker?: string | undefined;
|
|
45
|
-
seed?: string | number | boolean | Date | (string | number | boolean | Date)[] | undefined;
|
|
46
|
-
}>, {
|
|
25
|
+
seed: z.ZodOptional<z.ZodUnion<[z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodDate]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodDate]>>]>>;
|
|
26
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
47
27
|
kind: "id";
|
|
48
|
-
name: "id" & z.
|
|
49
|
-
unbrandedTypeName: (
|
|
50
|
-
databaseType: ("BigInt" | "String" | "Boolean" | "DateTime" | "Decimal" | "Float" | "Int" | "Json" | "Bytes"
|
|
51
|
-
databaseName: string & z.
|
|
52
|
-
excelName: string & z.
|
|
28
|
+
name: "id" & z.core.$brand<"PXL.FieldName"> & z.core.$brand<"PXL.FieldName.Id">;
|
|
29
|
+
unbrandedTypeName: ("string" & z.core.$brand<"PXL.ScalarIdType"> & z.core.$brand<"PXL.ScalarType"> & z.core.$brand<"PXL.Type">) | ("number" & z.core.$brand<"PXL.ScalarIdType"> & z.core.$brand<"PXL.ScalarType"> & z.core.$brand<"PXL.Type">);
|
|
30
|
+
databaseType: ("BigInt" & z.core.$brand<"PXL.DatabaseFieldType">) | ("String" & z.core.$brand<"PXL.DatabaseFieldType">) | ("Boolean" & z.core.$brand<"PXL.DatabaseFieldType">) | ("DateTime" & z.core.$brand<"PXL.DatabaseFieldType">) | ("Decimal" & z.core.$brand<"PXL.DatabaseFieldType">) | ("Float" & z.core.$brand<"PXL.DatabaseFieldType">) | ("Int" & z.core.$brand<"PXL.DatabaseFieldType">) | ("Json" & z.core.$brand<"PXL.DatabaseFieldType">) | ("Bytes" & z.core.$brand<"PXL.DatabaseFieldType">);
|
|
31
|
+
databaseName: string & z.core.$brand<"PXL.DatabaseFieldName">;
|
|
32
|
+
excelName: string & z.core.$brand<"PXL.ExcelColumnName">;
|
|
53
33
|
description: string;
|
|
54
34
|
label: string;
|
|
55
35
|
hasIndex: true;
|
|
@@ -60,20 +40,20 @@ export declare const createFieldJSONDecoder: (params: {
|
|
|
60
40
|
isUpdatedAt: false;
|
|
61
41
|
seed: import(".").FieldSeedConfig;
|
|
62
42
|
}, {
|
|
63
|
-
type: "String" | "Int";
|
|
64
43
|
name: "id";
|
|
65
|
-
|
|
44
|
+
type: "String" | "Int";
|
|
66
45
|
databaseName?: string | undefined;
|
|
67
46
|
excelName?: string | undefined;
|
|
68
47
|
label?: string | undefined;
|
|
48
|
+
description?: string | undefined;
|
|
69
49
|
isReadonly?: boolean | undefined;
|
|
70
50
|
faker?: string | undefined;
|
|
71
51
|
seed?: string | number | boolean | Date | (string | number | boolean | Date)[] | undefined;
|
|
72
|
-
}
|
|
73
|
-
name: z.
|
|
74
|
-
type: z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"String">, z.ZodLiteral<"String?">]>, z.ZodUnion<[z.ZodLiteral<"Boolean">, z.ZodLiteral<"Boolean?">]>, z.ZodUnion<[z.ZodLiteral<"DateTime">, z.ZodLiteral<"DateTime?">]>, z.ZodUnion<[z.ZodLiteral<"Decimal">, z.ZodLiteral<"Decimal?">]>, z.ZodUnion<[z.ZodLiteral<"Float">, z.ZodLiteral<"Float?">]>, z.ZodUnion<[z.ZodLiteral<"Int">, z.ZodLiteral<"Int?">]>, z.ZodUnion<[z.ZodLiteral<"Json">, z.ZodLiteral<"Json?">]>, z.ZodUnion<[z.ZodLiteral<"Bytes">, z.ZodLiteral<"Bytes?">]>, z.ZodUnion<[z.ZodLiteral<"BigInt">, z.ZodLiteral<"BigInt?">]>]>;
|
|
52
|
+
}>>, z.ZodPipe<z.ZodObject<{
|
|
53
|
+
name: z.ZodString;
|
|
54
|
+
type: z.ZodUnion<readonly [z.ZodUnion<[z.ZodLiteral<"String">, z.ZodLiteral<"String?">]>, z.ZodUnion<[z.ZodLiteral<"Boolean">, z.ZodLiteral<"Boolean?">]>, z.ZodUnion<[z.ZodLiteral<"DateTime">, z.ZodLiteral<"DateTime?">]>, z.ZodUnion<[z.ZodLiteral<"Decimal">, z.ZodLiteral<"Decimal?">]>, z.ZodUnion<[z.ZodLiteral<"Float">, z.ZodLiteral<"Float?">]>, z.ZodUnion<[z.ZodLiteral<"Int">, z.ZodLiteral<"Int?">]>, z.ZodUnion<[z.ZodLiteral<"Json">, z.ZodLiteral<"Json?">]>, z.ZodUnion<[z.ZodLiteral<"Bytes">, z.ZodLiteral<"Bytes?">]>, z.ZodUnion<[z.ZodLiteral<"BigInt">, z.ZodLiteral<"BigInt?">]>]>;
|
|
75
55
|
databaseName: z.ZodOptional<z.ZodString>;
|
|
76
|
-
excelName: z.
|
|
56
|
+
excelName: z.ZodOptional<z.ZodString>;
|
|
77
57
|
label: z.ZodOptional<z.ZodString>;
|
|
78
58
|
description: z.ZodOptional<z.ZodString>;
|
|
79
59
|
isReadonly: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -83,113 +63,45 @@ export declare const createFieldJSONDecoder: (params: {
|
|
|
83
63
|
isUpdatedAt: z.ZodOptional<z.ZodBoolean>;
|
|
84
64
|
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
85
65
|
faker: z.ZodOptional<z.ZodString>;
|
|
86
|
-
seed: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodDate]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodDate]
|
|
66
|
+
seed: z.ZodOptional<z.ZodUnion<[z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodDate]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodDate]>>]>>;
|
|
87
67
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
88
|
-
},
|
|
89
|
-
type: "BigInt" | "String" | "Boolean" | "DateTime" | "Decimal" | "Float" | "Int" | "Json" | "Bytes" | "String?" | "Boolean?" | "DateTime?" | "Decimal?" | "Float?" | "Int?" | "Json?" | "Bytes?" | "BigInt?";
|
|
68
|
+
}, z.core.$strict>, z.ZodTransform<FieldScalarEnriched, {
|
|
90
69
|
name: string;
|
|
91
|
-
description?: string | undefined;
|
|
92
|
-
databaseName?: string | undefined;
|
|
93
|
-
excelName?: string | undefined;
|
|
94
|
-
label?: string | undefined;
|
|
95
|
-
isReadonly?: boolean | undefined;
|
|
96
|
-
faker?: string | undefined;
|
|
97
|
-
seed?: string | number | boolean | Date | (string | number | boolean | Date)[] | undefined;
|
|
98
|
-
isUnique?: boolean | undefined;
|
|
99
|
-
hasIndex?: boolean | undefined;
|
|
100
|
-
isCreatedAt?: boolean | undefined;
|
|
101
|
-
isUpdatedAt?: boolean | undefined;
|
|
102
|
-
maxLength?: number | undefined;
|
|
103
|
-
placeholder?: string | undefined;
|
|
104
|
-
}, {
|
|
105
70
|
type: "BigInt" | "String" | "Boolean" | "DateTime" | "Decimal" | "Float" | "Int" | "Json" | "Bytes" | "String?" | "Boolean?" | "DateTime?" | "Decimal?" | "Float?" | "Int?" | "Json?" | "Bytes?" | "BigInt?";
|
|
106
|
-
name: string;
|
|
107
|
-
description?: string | undefined;
|
|
108
71
|
databaseName?: string | undefined;
|
|
109
72
|
excelName?: string | undefined;
|
|
110
73
|
label?: string | undefined;
|
|
74
|
+
description?: string | undefined;
|
|
111
75
|
isReadonly?: boolean | undefined;
|
|
112
|
-
faker?: string | undefined;
|
|
113
|
-
seed?: string | number | boolean | Date | (string | number | boolean | Date)[] | undefined;
|
|
114
76
|
isUnique?: boolean | undefined;
|
|
115
77
|
hasIndex?: boolean | undefined;
|
|
116
78
|
isCreatedAt?: boolean | undefined;
|
|
117
79
|
isUpdatedAt?: boolean | undefined;
|
|
118
80
|
maxLength?: number | undefined;
|
|
119
|
-
placeholder?: string | undefined;
|
|
120
|
-
}>, FieldScalarEnriched, {
|
|
121
|
-
type: "BigInt" | "String" | "Boolean" | "DateTime" | "Decimal" | "Float" | "Int" | "Json" | "Bytes" | "String?" | "Boolean?" | "DateTime?" | "Decimal?" | "Float?" | "Int?" | "Json?" | "Bytes?" | "BigInt?";
|
|
122
|
-
name: string;
|
|
123
|
-
description?: string | undefined;
|
|
124
|
-
databaseName?: string | undefined;
|
|
125
|
-
excelName?: string | undefined;
|
|
126
|
-
label?: string | undefined;
|
|
127
|
-
isReadonly?: boolean | undefined;
|
|
128
81
|
faker?: string | undefined;
|
|
129
82
|
seed?: string | number | boolean | Date | (string | number | boolean | Date)[] | undefined;
|
|
130
|
-
isUnique?: boolean | undefined;
|
|
131
|
-
hasIndex?: boolean | undefined;
|
|
132
|
-
isCreatedAt?: boolean | undefined;
|
|
133
|
-
isUpdatedAt?: boolean | undefined;
|
|
134
|
-
maxLength?: number | undefined;
|
|
135
83
|
placeholder?: string | undefined;
|
|
136
|
-
}
|
|
137
|
-
name: z.
|
|
84
|
+
}>>, z.ZodPipe<z.ZodObject<{
|
|
85
|
+
name: z.ZodString;
|
|
138
86
|
type: z.ZodUnion<[z.ZodLiteral<"DiscriminatedUnion">, z.ZodLiteral<"DiscriminatedUnion?">]>;
|
|
139
87
|
label: z.ZodOptional<z.ZodString>;
|
|
140
88
|
description: z.ZodOptional<z.ZodString>;
|
|
141
89
|
databaseName: z.ZodOptional<z.ZodString>;
|
|
142
|
-
excelName: z.
|
|
90
|
+
excelName: z.ZodOptional<z.ZodString>;
|
|
143
91
|
members: z.ZodArray<z.ZodObject<{
|
|
144
|
-
type: z.
|
|
92
|
+
type: z.ZodString;
|
|
145
93
|
label: z.ZodOptional<z.ZodString>;
|
|
146
|
-
fields: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
label?: string | undefined;
|
|
150
|
-
fields?: Record<string, any>[] | undefined;
|
|
151
|
-
}, {
|
|
152
|
-
type: string;
|
|
153
|
-
label?: string | undefined;
|
|
154
|
-
fields?: Record<string, any>[] | undefined;
|
|
155
|
-
}>, "many">;
|
|
156
|
-
commonFields: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">>;
|
|
94
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
95
|
+
}, z.core.$strip>>;
|
|
96
|
+
commonFields: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
157
97
|
isReadonly: z.ZodOptional<z.ZodBoolean>;
|
|
158
|
-
},
|
|
159
|
-
type: "DiscriminatedUnion" | "DiscriminatedUnion?";
|
|
160
|
-
name: string;
|
|
161
|
-
members: {
|
|
162
|
-
type: string;
|
|
163
|
-
label?: string | undefined;
|
|
164
|
-
fields?: Record<string, any>[] | undefined;
|
|
165
|
-
}[];
|
|
166
|
-
description?: string | undefined;
|
|
167
|
-
databaseName?: string | undefined;
|
|
168
|
-
excelName?: string | undefined;
|
|
169
|
-
label?: string | undefined;
|
|
170
|
-
isReadonly?: boolean | undefined;
|
|
171
|
-
commonFields?: Record<string, any>[] | undefined;
|
|
172
|
-
}, {
|
|
173
|
-
type: "DiscriminatedUnion" | "DiscriminatedUnion?";
|
|
174
|
-
name: string;
|
|
175
|
-
members: {
|
|
176
|
-
type: string;
|
|
177
|
-
label?: string | undefined;
|
|
178
|
-
fields?: Record<string, any>[] | undefined;
|
|
179
|
-
}[];
|
|
180
|
-
description?: string | undefined;
|
|
181
|
-
databaseName?: string | undefined;
|
|
182
|
-
excelName?: string | undefined;
|
|
183
|
-
label?: string | undefined;
|
|
184
|
-
isReadonly?: boolean | undefined;
|
|
185
|
-
commonFields?: Record<string, any>[] | undefined;
|
|
186
|
-
}>, {
|
|
98
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
187
99
|
kind: "discriminatedUnion";
|
|
188
|
-
name: string & z.
|
|
189
|
-
discriminatorFieldName: string & z.
|
|
100
|
+
name: string & z.core.$brand<"PXL.FieldName">;
|
|
101
|
+
discriminatorFieldName: string & z.core.$brand<"PXL.FieldName">;
|
|
190
102
|
label: string;
|
|
191
|
-
databaseName: string & z.
|
|
192
|
-
excelName: string & z.
|
|
103
|
+
databaseName: string & z.core.$brand<"PXL.DatabaseFieldName">;
|
|
104
|
+
excelName: string & z.core.$brand<"PXL.ExcelColumnName">;
|
|
193
105
|
description: string | undefined;
|
|
194
106
|
members: {
|
|
195
107
|
type: string;
|
|
@@ -200,61 +112,39 @@ export declare const createFieldJSONDecoder: (params: {
|
|
|
200
112
|
isReadonly: boolean;
|
|
201
113
|
isRequired: boolean;
|
|
202
114
|
}, {
|
|
203
|
-
type: "DiscriminatedUnion" | "DiscriminatedUnion?";
|
|
204
115
|
name: string;
|
|
116
|
+
type: "DiscriminatedUnion" | "DiscriminatedUnion?";
|
|
205
117
|
members: {
|
|
206
118
|
type: string;
|
|
207
119
|
label?: string | undefined;
|
|
208
120
|
fields?: Record<string, any>[] | undefined;
|
|
209
121
|
}[];
|
|
122
|
+
label?: string | undefined;
|
|
210
123
|
description?: string | undefined;
|
|
211
124
|
databaseName?: string | undefined;
|
|
212
125
|
excelName?: string | undefined;
|
|
213
|
-
label?: string | undefined;
|
|
214
|
-
isReadonly?: boolean | undefined;
|
|
215
126
|
commonFields?: Record<string, any>[] | undefined;
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
127
|
+
isReadonly?: boolean | undefined;
|
|
128
|
+
}>>, z.ZodPipe<z.ZodObject<{
|
|
129
|
+
name: z.ZodString;
|
|
130
|
+
type: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
219
131
|
databaseName: z.ZodOptional<z.ZodString>;
|
|
220
|
-
excelName: z.
|
|
132
|
+
excelName: z.ZodOptional<z.ZodString>;
|
|
221
133
|
prismaRelationFieldName: z.ZodOptional<z.ZodString>;
|
|
222
134
|
deepClone: z.ZodOptional<z.ZodBoolean>;
|
|
223
135
|
label: z.ZodOptional<z.ZodString>;
|
|
224
136
|
description: z.ZodOptional<z.ZodString>;
|
|
225
137
|
isReadonly: z.ZodOptional<z.ZodBoolean>;
|
|
226
138
|
isUnique: z.ZodOptional<z.ZodBoolean>;
|
|
227
|
-
},
|
|
228
|
-
type: string;
|
|
229
|
-
name: string;
|
|
230
|
-
description?: string | undefined;
|
|
231
|
-
databaseName?: string | undefined;
|
|
232
|
-
excelName?: string | undefined;
|
|
233
|
-
label?: string | undefined;
|
|
234
|
-
isReadonly?: boolean | undefined;
|
|
235
|
-
isUnique?: boolean | undefined;
|
|
236
|
-
prismaRelationFieldName?: string | undefined;
|
|
237
|
-
deepClone?: boolean | undefined;
|
|
238
|
-
}, {
|
|
239
|
-
type: string;
|
|
240
|
-
name: string;
|
|
241
|
-
description?: string | undefined;
|
|
242
|
-
databaseName?: string | undefined;
|
|
243
|
-
excelName?: string | undefined;
|
|
244
|
-
label?: string | undefined;
|
|
245
|
-
isReadonly?: boolean | undefined;
|
|
246
|
-
isUnique?: boolean | undefined;
|
|
247
|
-
prismaRelationFieldName?: string | undefined;
|
|
248
|
-
deepClone?: boolean | undefined;
|
|
249
|
-
}>, {
|
|
139
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
250
140
|
kind: "relation";
|
|
251
|
-
type: string & z.
|
|
252
|
-
name: string & z.
|
|
253
|
-
referencedModelName: string & z.
|
|
141
|
+
type: string & z.core.$brand<"PXL.IdType"> & z.core.$brand<"PXL.Type">;
|
|
142
|
+
name: string & z.core.$brand<"PXL.FieldName">;
|
|
143
|
+
referencedModelName: string & z.core.$brand<"PXL.ModelName">;
|
|
254
144
|
label: string;
|
|
255
|
-
databaseName: string & z.
|
|
256
|
-
prismaRelationFieldName: (string & z.
|
|
257
|
-
excelName: string & z.
|
|
145
|
+
databaseName: string & z.core.$brand<"PXL.DatabaseFieldName">;
|
|
146
|
+
prismaRelationFieldName: (string & z.core.$brand<"PXL.DatabaseFieldName">) | undefined;
|
|
147
|
+
excelName: string & z.core.$brand<"PXL.ExcelColumnName">;
|
|
258
148
|
deepClone: boolean;
|
|
259
149
|
description: string | undefined;
|
|
260
150
|
isReadonly: boolean;
|
|
@@ -263,105 +153,67 @@ export declare const createFieldJSONDecoder: (params: {
|
|
|
263
153
|
validations: never[];
|
|
264
154
|
generation: string;
|
|
265
155
|
}, {
|
|
266
|
-
type: string;
|
|
267
156
|
name: string;
|
|
268
|
-
|
|
157
|
+
type: string;
|
|
269
158
|
databaseName?: string | undefined;
|
|
270
159
|
excelName?: string | undefined;
|
|
160
|
+
prismaRelationFieldName?: string | undefined;
|
|
161
|
+
deepClone?: boolean | undefined;
|
|
271
162
|
label?: string | undefined;
|
|
163
|
+
description?: string | undefined;
|
|
272
164
|
isReadonly?: boolean | undefined;
|
|
273
165
|
isUnique?: boolean | undefined;
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
name: z.ZodEffects<z.ZodString, string, string>;
|
|
278
|
-
type: z.ZodEffects<z.ZodString, string, string>;
|
|
166
|
+
}>>, z.ZodPipe<z.ZodObject<{
|
|
167
|
+
name: z.ZodString;
|
|
168
|
+
type: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
279
169
|
databaseName: z.ZodOptional<z.ZodString>;
|
|
280
|
-
excelName: z.
|
|
170
|
+
excelName: z.ZodOptional<z.ZodString>;
|
|
281
171
|
label: z.ZodOptional<z.ZodString>;
|
|
282
172
|
description: z.ZodOptional<z.ZodString>;
|
|
283
173
|
isReadonly: z.ZodOptional<z.ZodBoolean>;
|
|
284
174
|
isUnique: z.ZodOptional<z.ZodBoolean>;
|
|
285
|
-
},
|
|
286
|
-
type: string;
|
|
287
|
-
name: string;
|
|
288
|
-
description?: string | undefined;
|
|
289
|
-
databaseName?: string | undefined;
|
|
290
|
-
excelName?: string | undefined;
|
|
291
|
-
label?: string | undefined;
|
|
292
|
-
isReadonly?: boolean | undefined;
|
|
293
|
-
isUnique?: boolean | undefined;
|
|
294
|
-
}, {
|
|
295
|
-
type: string;
|
|
296
|
-
name: string;
|
|
297
|
-
description?: string | undefined;
|
|
298
|
-
databaseName?: string | undefined;
|
|
299
|
-
excelName?: string | undefined;
|
|
300
|
-
label?: string | undefined;
|
|
301
|
-
isReadonly?: boolean | undefined;
|
|
302
|
-
isUnique?: boolean | undefined;
|
|
303
|
-
}>, {
|
|
175
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
304
176
|
kind: "enum";
|
|
305
|
-
type: string & z.
|
|
306
|
-
name: string & z.
|
|
307
|
-
referencedEnumName: string & z.
|
|
177
|
+
type: string & z.core.$brand<"PXL.EnumType"> & z.core.$brand<"PXL.Type">;
|
|
178
|
+
name: string & z.core.$brand<"PXL.FieldName">;
|
|
179
|
+
referencedEnumName: string & z.core.$brand<"PXL.EnumName">;
|
|
308
180
|
label: string;
|
|
309
|
-
databaseName: string & z.
|
|
310
|
-
excelName: string & z.
|
|
181
|
+
databaseName: string & z.core.$brand<"PXL.DatabaseFieldName">;
|
|
182
|
+
excelName: string & z.core.$brand<"PXL.ExcelColumnName">;
|
|
311
183
|
description: string | undefined;
|
|
312
184
|
isRequired: boolean;
|
|
313
185
|
isReadonly: boolean;
|
|
314
186
|
isUnique: boolean;
|
|
315
187
|
}, {
|
|
316
|
-
type: string;
|
|
317
188
|
name: string;
|
|
318
|
-
|
|
189
|
+
type: string;
|
|
319
190
|
databaseName?: string | undefined;
|
|
320
191
|
excelName?: string | undefined;
|
|
321
192
|
label?: string | undefined;
|
|
193
|
+
description?: string | undefined;
|
|
322
194
|
isReadonly?: boolean | undefined;
|
|
323
195
|
isUnique?: boolean | undefined;
|
|
324
|
-
}
|
|
196
|
+
}>>]>;
|
|
325
197
|
export type FieldEnriched = FieldIdEnriched | FieldScalarEnriched | FieldRelationEnriched | FieldEnumEnriched | FieldDiscriminatedUnionEnriched;
|
|
326
198
|
export type FieldEnrichedNativeDatabase = FieldIdEnriched | FieldScalarEnriched | FieldRelationEnriched | FieldEnumEnriched;
|
|
327
199
|
export declare const zFieldJSONInput: (params: {
|
|
328
200
|
modelNames: Model.ModelName[];
|
|
329
201
|
enumNames: Enum.EnumName[];
|
|
330
|
-
}) => z.ZodUnion<[z.ZodObject<{
|
|
202
|
+
}) => z.ZodUnion<readonly [z.ZodObject<{
|
|
331
203
|
name: z.ZodLiteral<"id">;
|
|
332
|
-
type: z.ZodUnion<[z.ZodLiteral<"String">, z.ZodLiteral<"Int">]>;
|
|
204
|
+
type: z.ZodUnion<readonly [z.ZodLiteral<"String">, z.ZodLiteral<"Int">]>;
|
|
333
205
|
databaseName: z.ZodOptional<z.ZodString>;
|
|
334
|
-
excelName: z.
|
|
206
|
+
excelName: z.ZodOptional<z.ZodString>;
|
|
335
207
|
label: z.ZodOptional<z.ZodString>;
|
|
336
208
|
description: z.ZodOptional<z.ZodString>;
|
|
337
209
|
isReadonly: z.ZodOptional<z.ZodBoolean>;
|
|
338
210
|
faker: z.ZodOptional<z.ZodString>;
|
|
339
|
-
seed: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodDate]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodDate]
|
|
340
|
-
},
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
description?: string | undefined;
|
|
344
|
-
databaseName?: string | undefined;
|
|
345
|
-
excelName?: string | undefined;
|
|
346
|
-
label?: string | undefined;
|
|
347
|
-
isReadonly?: boolean | undefined;
|
|
348
|
-
faker?: string | undefined;
|
|
349
|
-
seed?: string | number | boolean | Date | (string | number | boolean | Date)[] | undefined;
|
|
350
|
-
}, {
|
|
351
|
-
type: "String" | "Int";
|
|
352
|
-
name: "id";
|
|
353
|
-
description?: string | undefined;
|
|
354
|
-
databaseName?: string | undefined;
|
|
355
|
-
excelName?: string | undefined;
|
|
356
|
-
label?: string | undefined;
|
|
357
|
-
isReadonly?: boolean | undefined;
|
|
358
|
-
faker?: string | undefined;
|
|
359
|
-
seed?: string | number | boolean | Date | (string | number | boolean | Date)[] | undefined;
|
|
360
|
-
}>, z.ZodObject<{
|
|
361
|
-
name: z.ZodEffects<z.ZodString, string, string>;
|
|
362
|
-
type: z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"String">, z.ZodLiteral<"String?">]>, z.ZodUnion<[z.ZodLiteral<"Boolean">, z.ZodLiteral<"Boolean?">]>, z.ZodUnion<[z.ZodLiteral<"DateTime">, z.ZodLiteral<"DateTime?">]>, z.ZodUnion<[z.ZodLiteral<"Decimal">, z.ZodLiteral<"Decimal?">]>, z.ZodUnion<[z.ZodLiteral<"Float">, z.ZodLiteral<"Float?">]>, z.ZodUnion<[z.ZodLiteral<"Int">, z.ZodLiteral<"Int?">]>, z.ZodUnion<[z.ZodLiteral<"Json">, z.ZodLiteral<"Json?">]>, z.ZodUnion<[z.ZodLiteral<"Bytes">, z.ZodLiteral<"Bytes?">]>, z.ZodUnion<[z.ZodLiteral<"BigInt">, z.ZodLiteral<"BigInt?">]>]>;
|
|
211
|
+
seed: z.ZodOptional<z.ZodUnion<[z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodDate]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodDate]>>]>>;
|
|
212
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
213
|
+
name: z.ZodString;
|
|
214
|
+
type: z.ZodUnion<readonly [z.ZodUnion<[z.ZodLiteral<"String">, z.ZodLiteral<"String?">]>, z.ZodUnion<[z.ZodLiteral<"Boolean">, z.ZodLiteral<"Boolean?">]>, z.ZodUnion<[z.ZodLiteral<"DateTime">, z.ZodLiteral<"DateTime?">]>, z.ZodUnion<[z.ZodLiteral<"Decimal">, z.ZodLiteral<"Decimal?">]>, z.ZodUnion<[z.ZodLiteral<"Float">, z.ZodLiteral<"Float?">]>, z.ZodUnion<[z.ZodLiteral<"Int">, z.ZodLiteral<"Int?">]>, z.ZodUnion<[z.ZodLiteral<"Json">, z.ZodLiteral<"Json?">]>, z.ZodUnion<[z.ZodLiteral<"Bytes">, z.ZodLiteral<"Bytes?">]>, z.ZodUnion<[z.ZodLiteral<"BigInt">, z.ZodLiteral<"BigInt?">]>]>;
|
|
363
215
|
databaseName: z.ZodOptional<z.ZodString>;
|
|
364
|
-
excelName: z.
|
|
216
|
+
excelName: z.ZodOptional<z.ZodString>;
|
|
365
217
|
label: z.ZodOptional<z.ZodString>;
|
|
366
218
|
description: z.ZodOptional<z.ZodString>;
|
|
367
219
|
isReadonly: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -371,101 +223,29 @@ export declare const zFieldJSONInput: (params: {
|
|
|
371
223
|
isUpdatedAt: z.ZodOptional<z.ZodBoolean>;
|
|
372
224
|
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
373
225
|
faker: z.ZodOptional<z.ZodString>;
|
|
374
|
-
seed: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodDate]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodDate]
|
|
226
|
+
seed: z.ZodOptional<z.ZodUnion<[z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodDate]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodDate]>>]>>;
|
|
375
227
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
376
|
-
},
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
description?: string | undefined;
|
|
380
|
-
databaseName?: string | undefined;
|
|
381
|
-
excelName?: string | undefined;
|
|
382
|
-
label?: string | undefined;
|
|
383
|
-
isReadonly?: boolean | undefined;
|
|
384
|
-
faker?: string | undefined;
|
|
385
|
-
seed?: string | number | boolean | Date | (string | number | boolean | Date)[] | undefined;
|
|
386
|
-
isUnique?: boolean | undefined;
|
|
387
|
-
hasIndex?: boolean | undefined;
|
|
388
|
-
isCreatedAt?: boolean | undefined;
|
|
389
|
-
isUpdatedAt?: boolean | undefined;
|
|
390
|
-
maxLength?: number | undefined;
|
|
391
|
-
placeholder?: string | undefined;
|
|
392
|
-
}, {
|
|
393
|
-
type: "BigInt" | "String" | "Boolean" | "DateTime" | "Decimal" | "Float" | "Int" | "Json" | "Bytes" | "String?" | "Boolean?" | "DateTime?" | "Decimal?" | "Float?" | "Int?" | "Json?" | "Bytes?" | "BigInt?";
|
|
394
|
-
name: string;
|
|
395
|
-
description?: string | undefined;
|
|
396
|
-
databaseName?: string | undefined;
|
|
397
|
-
excelName?: string | undefined;
|
|
398
|
-
label?: string | undefined;
|
|
399
|
-
isReadonly?: boolean | undefined;
|
|
400
|
-
faker?: string | undefined;
|
|
401
|
-
seed?: string | number | boolean | Date | (string | number | boolean | Date)[] | undefined;
|
|
402
|
-
isUnique?: boolean | undefined;
|
|
403
|
-
hasIndex?: boolean | undefined;
|
|
404
|
-
isCreatedAt?: boolean | undefined;
|
|
405
|
-
isUpdatedAt?: boolean | undefined;
|
|
406
|
-
maxLength?: number | undefined;
|
|
407
|
-
placeholder?: string | undefined;
|
|
408
|
-
}>, z.ZodObject<{
|
|
409
|
-
name: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
410
|
-
type: z.ZodEffects<z.ZodString, string, string>;
|
|
228
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
229
|
+
name: z.ZodString;
|
|
230
|
+
type: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
411
231
|
databaseName: z.ZodOptional<z.ZodString>;
|
|
412
|
-
excelName: z.
|
|
232
|
+
excelName: z.ZodOptional<z.ZodString>;
|
|
413
233
|
prismaRelationFieldName: z.ZodOptional<z.ZodString>;
|
|
414
234
|
deepClone: z.ZodOptional<z.ZodBoolean>;
|
|
415
235
|
label: z.ZodOptional<z.ZodString>;
|
|
416
236
|
description: z.ZodOptional<z.ZodString>;
|
|
417
237
|
isReadonly: z.ZodOptional<z.ZodBoolean>;
|
|
418
238
|
isUnique: z.ZodOptional<z.ZodBoolean>;
|
|
419
|
-
},
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
description?: string | undefined;
|
|
423
|
-
databaseName?: string | undefined;
|
|
424
|
-
excelName?: string | undefined;
|
|
425
|
-
label?: string | undefined;
|
|
426
|
-
isReadonly?: boolean | undefined;
|
|
427
|
-
isUnique?: boolean | undefined;
|
|
428
|
-
prismaRelationFieldName?: string | undefined;
|
|
429
|
-
deepClone?: boolean | undefined;
|
|
430
|
-
}, {
|
|
431
|
-
type: string;
|
|
432
|
-
name: string;
|
|
433
|
-
description?: string | undefined;
|
|
434
|
-
databaseName?: string | undefined;
|
|
435
|
-
excelName?: string | undefined;
|
|
436
|
-
label?: string | undefined;
|
|
437
|
-
isReadonly?: boolean | undefined;
|
|
438
|
-
isUnique?: boolean | undefined;
|
|
439
|
-
prismaRelationFieldName?: string | undefined;
|
|
440
|
-
deepClone?: boolean | undefined;
|
|
441
|
-
}>, z.ZodObject<{
|
|
442
|
-
name: z.ZodEffects<z.ZodString, string, string>;
|
|
443
|
-
type: z.ZodEffects<z.ZodString, string, string>;
|
|
239
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
240
|
+
name: z.ZodString;
|
|
241
|
+
type: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
444
242
|
databaseName: z.ZodOptional<z.ZodString>;
|
|
445
|
-
excelName: z.
|
|
243
|
+
excelName: z.ZodOptional<z.ZodString>;
|
|
446
244
|
label: z.ZodOptional<z.ZodString>;
|
|
447
245
|
description: z.ZodOptional<z.ZodString>;
|
|
448
246
|
isReadonly: z.ZodOptional<z.ZodBoolean>;
|
|
449
247
|
isUnique: z.ZodOptional<z.ZodBoolean>;
|
|
450
|
-
},
|
|
451
|
-
type: string;
|
|
452
|
-
name: string;
|
|
453
|
-
description?: string | undefined;
|
|
454
|
-
databaseName?: string | undefined;
|
|
455
|
-
excelName?: string | undefined;
|
|
456
|
-
label?: string | undefined;
|
|
457
|
-
isReadonly?: boolean | undefined;
|
|
458
|
-
isUnique?: boolean | undefined;
|
|
459
|
-
}, {
|
|
460
|
-
type: string;
|
|
461
|
-
name: string;
|
|
462
|
-
description?: string | undefined;
|
|
463
|
-
databaseName?: string | undefined;
|
|
464
|
-
excelName?: string | undefined;
|
|
465
|
-
label?: string | undefined;
|
|
466
|
-
isReadonly?: boolean | undefined;
|
|
467
|
-
isUnique?: boolean | undefined;
|
|
468
|
-
}>]>;
|
|
248
|
+
}, z.core.$strip>]>;
|
|
469
249
|
export type FieldJSONInput = z.infer<ReturnType<typeof zFieldJSONInput>>;
|
|
470
250
|
export declare const fieldTransformer: (fieldInput: FieldEnriched, model: {
|
|
471
251
|
name: Model.ModelName;
|