cogsbox-shape 0.5.26 → 0.5.28
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/example/schema.d.ts +60 -60
- package/dist/example/user.d.ts +60 -60
- package/dist/schema.d.ts +2020 -968
- package/dist/schema.js +8 -85
- package/package.json +1 -1
package/dist/schema.d.ts
CHANGED
|
@@ -57,36 +57,57 @@ type SQLToZodType<T extends SQLType, TDefault extends boolean> = T["pk"] extends
|
|
|
57
57
|
} ? TDefault extends true ? never : z.ZodDate : z.ZodDate : never;
|
|
58
58
|
export declare const shape: {
|
|
59
59
|
int: (config?: IntConfig) => {
|
|
60
|
-
config:
|
|
61
|
-
|
|
62
|
-
pk?: true;
|
|
63
|
-
field?: string;
|
|
64
|
-
default?: number;
|
|
65
|
-
type: "int";
|
|
66
|
-
}, z.ZodNumber, z.ZodNumber, undefined, z.ZodNumber, z.ZodNumber>;
|
|
67
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
68
|
-
sql: z.ZodNumber;
|
|
69
|
-
initialState: z.ZodNumber;
|
|
70
|
-
client: z.ZodNumber;
|
|
71
|
-
}) => TValidationNext)) => {
|
|
72
|
-
config: BuilderConfig<{
|
|
60
|
+
config: {
|
|
61
|
+
sql: {
|
|
73
62
|
nullable?: boolean;
|
|
74
63
|
pk?: true;
|
|
75
64
|
field?: string;
|
|
76
65
|
default?: number;
|
|
77
66
|
type: "int";
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
67
|
+
};
|
|
68
|
+
zodSqlSchema: z.ZodNumber;
|
|
69
|
+
zodNewSchema: z.ZodNumber;
|
|
70
|
+
initialValue: undefined;
|
|
71
|
+
zodClientSchema: z.ZodNumber;
|
|
72
|
+
zodValidationSchema: z.ZodNumber;
|
|
73
|
+
};
|
|
74
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
75
|
+
sql: z.ZodNumber;
|
|
76
|
+
initialState: z.ZodNumber;
|
|
77
|
+
client: z.ZodNumber;
|
|
78
|
+
}) => TValidationNext)) => {
|
|
79
|
+
config: {
|
|
80
|
+
sql: {
|
|
84
81
|
nullable?: boolean;
|
|
85
82
|
pk?: true;
|
|
86
83
|
field?: string;
|
|
87
84
|
default?: number;
|
|
88
85
|
type: "int";
|
|
89
|
-
}
|
|
86
|
+
};
|
|
87
|
+
zodSqlSchema: z.ZodNumber;
|
|
88
|
+
zodNewSchema: z.ZodNumber;
|
|
89
|
+
initialValue: undefined;
|
|
90
|
+
zodClientSchema: z.ZodNumber;
|
|
91
|
+
zodValidationSchema: TValidationNext;
|
|
92
|
+
};
|
|
93
|
+
transform: (transforms: {
|
|
94
|
+
toClient: (dbValue: number) => number;
|
|
95
|
+
toDb: (clientValue: number) => number;
|
|
96
|
+
}) => {
|
|
97
|
+
config: {
|
|
98
|
+
sql: {
|
|
99
|
+
nullable?: boolean;
|
|
100
|
+
pk?: true;
|
|
101
|
+
field?: string;
|
|
102
|
+
default?: number;
|
|
103
|
+
type: "int";
|
|
104
|
+
};
|
|
105
|
+
zodSqlSchema: z.ZodNumber;
|
|
106
|
+
zodNewSchema: z.ZodNumber;
|
|
107
|
+
initialValue: undefined;
|
|
108
|
+
zodClientSchema: z.ZodNumber;
|
|
109
|
+
zodValidationSchema: TValidationNext;
|
|
110
|
+
} & {
|
|
90
111
|
transforms: {
|
|
91
112
|
toClient: (dbValue: number) => number;
|
|
92
113
|
toDb: (clientValue: number) => number;
|
|
@@ -98,36 +119,57 @@ export declare const shape: {
|
|
|
98
119
|
sql: z.ZodNumber;
|
|
99
120
|
initialState: z.ZodNumber;
|
|
100
121
|
}) => TClientNext)) => {
|
|
101
|
-
config:
|
|
102
|
-
|
|
103
|
-
pk?: true;
|
|
104
|
-
field?: string;
|
|
105
|
-
default?: number;
|
|
106
|
-
type: "int";
|
|
107
|
-
}, z.ZodNumber, z.ZodNumber, undefined, TClientNext, TClientNext>;
|
|
108
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
109
|
-
sql: z.ZodNumber;
|
|
110
|
-
initialState: z.ZodNumber;
|
|
111
|
-
client: TClientNext;
|
|
112
|
-
}) => TValidationNext)) => {
|
|
113
|
-
config: BuilderConfig<{
|
|
122
|
+
config: {
|
|
123
|
+
sql: {
|
|
114
124
|
nullable?: boolean;
|
|
115
125
|
pk?: true;
|
|
116
126
|
field?: string;
|
|
117
127
|
default?: number;
|
|
118
128
|
type: "int";
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
129
|
+
};
|
|
130
|
+
zodSqlSchema: z.ZodNumber;
|
|
131
|
+
zodNewSchema: z.ZodNumber;
|
|
132
|
+
initialValue: undefined;
|
|
133
|
+
zodClientSchema: TClientNext;
|
|
134
|
+
zodValidationSchema: TClientNext;
|
|
135
|
+
};
|
|
136
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
137
|
+
sql: z.ZodNumber;
|
|
138
|
+
initialState: z.ZodNumber;
|
|
139
|
+
client: TClientNext;
|
|
140
|
+
}) => TValidationNext)) => {
|
|
141
|
+
config: {
|
|
142
|
+
sql: {
|
|
125
143
|
nullable?: boolean;
|
|
126
144
|
pk?: true;
|
|
127
145
|
field?: string;
|
|
128
146
|
default?: number;
|
|
129
147
|
type: "int";
|
|
130
|
-
}
|
|
148
|
+
};
|
|
149
|
+
zodSqlSchema: z.ZodNumber;
|
|
150
|
+
zodNewSchema: z.ZodNumber;
|
|
151
|
+
initialValue: undefined;
|
|
152
|
+
zodClientSchema: TClientNext;
|
|
153
|
+
zodValidationSchema: TValidationNext;
|
|
154
|
+
};
|
|
155
|
+
transform: (transforms: {
|
|
156
|
+
toClient: (dbValue: number) => z.TypeOf<TClientNext>;
|
|
157
|
+
toDb: (clientValue: z.TypeOf<TClientNext>) => number;
|
|
158
|
+
}) => {
|
|
159
|
+
config: {
|
|
160
|
+
sql: {
|
|
161
|
+
nullable?: boolean;
|
|
162
|
+
pk?: true;
|
|
163
|
+
field?: string;
|
|
164
|
+
default?: number;
|
|
165
|
+
type: "int";
|
|
166
|
+
};
|
|
167
|
+
zodSqlSchema: z.ZodNumber;
|
|
168
|
+
zodNewSchema: z.ZodNumber;
|
|
169
|
+
initialValue: undefined;
|
|
170
|
+
zodClientSchema: TClientNext;
|
|
171
|
+
zodValidationSchema: TValidationNext;
|
|
172
|
+
} & {
|
|
131
173
|
transforms: {
|
|
132
174
|
toClient: (dbValue: number) => z.TypeOf<TClientNext>;
|
|
133
175
|
toDb: (clientValue: z.TypeOf<TClientNext>) => number;
|
|
@@ -139,13 +181,20 @@ export declare const shape: {
|
|
|
139
181
|
toClient: (dbValue: number) => z.TypeOf<TClientNext>;
|
|
140
182
|
toDb: (clientValue: z.TypeOf<TClientNext>) => number;
|
|
141
183
|
}) => {
|
|
142
|
-
config:
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
184
|
+
config: {
|
|
185
|
+
sql: {
|
|
186
|
+
nullable?: boolean;
|
|
187
|
+
pk?: true;
|
|
188
|
+
field?: string;
|
|
189
|
+
default?: number;
|
|
190
|
+
type: "int";
|
|
191
|
+
};
|
|
192
|
+
zodSqlSchema: z.ZodNumber;
|
|
193
|
+
zodNewSchema: z.ZodNumber;
|
|
194
|
+
initialValue: undefined;
|
|
195
|
+
zodClientSchema: TClientNext;
|
|
196
|
+
zodValidationSchema: TClientNext;
|
|
197
|
+
} & {
|
|
149
198
|
transforms: {
|
|
150
199
|
toClient: (dbValue: number) => z.TypeOf<TClientNext>;
|
|
151
200
|
toDb: (clientValue: z.TypeOf<TClientNext>) => number;
|
|
@@ -157,13 +206,20 @@ export declare const shape: {
|
|
|
157
206
|
toClient: (dbValue: number) => number;
|
|
158
207
|
toDb: (clientValue: number) => number;
|
|
159
208
|
}) => {
|
|
160
|
-
config:
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
209
|
+
config: {
|
|
210
|
+
sql: {
|
|
211
|
+
nullable?: boolean;
|
|
212
|
+
pk?: true;
|
|
213
|
+
field?: string;
|
|
214
|
+
default?: number;
|
|
215
|
+
type: "int";
|
|
216
|
+
};
|
|
217
|
+
zodSqlSchema: z.ZodNumber;
|
|
218
|
+
zodNewSchema: z.ZodNumber;
|
|
219
|
+
initialValue: undefined;
|
|
220
|
+
zodClientSchema: z.ZodNumber;
|
|
221
|
+
zodValidationSchema: z.ZodNumber;
|
|
222
|
+
} & {
|
|
167
223
|
transforms: {
|
|
168
224
|
toClient: (dbValue: number) => number;
|
|
169
225
|
toDb: (clientValue: number) => number;
|
|
@@ -173,39 +229,60 @@ export declare const shape: {
|
|
|
173
229
|
initialState: <TNewNext extends z.ZodTypeAny, TDefaultNext>(schema: TNewNext | ((tools: {
|
|
174
230
|
sql: z.ZodNumber;
|
|
175
231
|
}) => TNewNext), defaultValue: () => TDefaultNext) => {
|
|
176
|
-
config:
|
|
177
|
-
|
|
178
|
-
pk?: true;
|
|
179
|
-
field?: string;
|
|
180
|
-
default?: number;
|
|
181
|
-
type: "int";
|
|
182
|
-
}, z.ZodNumber, TNewNext, TDefaultNext, z.ZodNumber, z.ZodNumber>;
|
|
183
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
184
|
-
sql: z.ZodNumber;
|
|
185
|
-
initialState: TNewNext;
|
|
186
|
-
client: z.ZodNumber;
|
|
187
|
-
}) => TValidationNext)) => {
|
|
188
|
-
config: BuilderConfig<{
|
|
232
|
+
config: {
|
|
233
|
+
sql: {
|
|
189
234
|
nullable?: boolean;
|
|
190
235
|
pk?: true;
|
|
191
236
|
field?: string;
|
|
192
237
|
default?: number;
|
|
193
238
|
type: "int";
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
239
|
+
};
|
|
240
|
+
zodSqlSchema: z.ZodNumber;
|
|
241
|
+
zodNewSchema: TNewNext;
|
|
242
|
+
initialValue: TDefaultNext;
|
|
243
|
+
zodClientSchema: InferSmartClientType<z.ZodNumber, TNewNext>;
|
|
244
|
+
zodValidationSchema: InferSmartClientType<z.ZodNumber, TNewNext>;
|
|
245
|
+
};
|
|
246
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
247
|
+
sql: z.ZodNumber;
|
|
248
|
+
initialState: TNewNext;
|
|
249
|
+
client: InferSmartClientType<z.ZodNumber, TNewNext>;
|
|
250
|
+
}) => TValidationNext)) => {
|
|
251
|
+
config: {
|
|
252
|
+
sql: {
|
|
200
253
|
nullable?: boolean;
|
|
201
254
|
pk?: true;
|
|
202
255
|
field?: string;
|
|
203
256
|
default?: number;
|
|
204
257
|
type: "int";
|
|
205
|
-
}
|
|
258
|
+
};
|
|
259
|
+
zodSqlSchema: z.ZodNumber;
|
|
260
|
+
zodNewSchema: TNewNext;
|
|
261
|
+
initialValue: TDefaultNext;
|
|
262
|
+
zodClientSchema: InferSmartClientType<z.ZodNumber, TNewNext>;
|
|
263
|
+
zodValidationSchema: TValidationNext;
|
|
264
|
+
};
|
|
265
|
+
transform: (transforms: {
|
|
266
|
+
toClient: (dbValue: number) => z.TypeOf<InferSmartClientType<z.ZodNumber, TNewNext>>;
|
|
267
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodNumber, TNewNext>>) => number;
|
|
268
|
+
}) => {
|
|
269
|
+
config: {
|
|
270
|
+
sql: {
|
|
271
|
+
nullable?: boolean;
|
|
272
|
+
pk?: true;
|
|
273
|
+
field?: string;
|
|
274
|
+
default?: number;
|
|
275
|
+
type: "int";
|
|
276
|
+
};
|
|
277
|
+
zodSqlSchema: z.ZodNumber;
|
|
278
|
+
zodNewSchema: TNewNext;
|
|
279
|
+
initialValue: TDefaultNext;
|
|
280
|
+
zodClientSchema: InferSmartClientType<z.ZodNumber, TNewNext>;
|
|
281
|
+
zodValidationSchema: TValidationNext;
|
|
282
|
+
} & {
|
|
206
283
|
transforms: {
|
|
207
|
-
toClient: (dbValue: number) =>
|
|
208
|
-
toDb: (clientValue:
|
|
284
|
+
toClient: (dbValue: number) => z.TypeOf<InferSmartClientType<z.ZodNumber, TNewNext>>;
|
|
285
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodNumber, TNewNext>>) => number;
|
|
209
286
|
};
|
|
210
287
|
};
|
|
211
288
|
};
|
|
@@ -214,36 +291,57 @@ export declare const shape: {
|
|
|
214
291
|
sql: z.ZodNumber;
|
|
215
292
|
initialState: TNewNext;
|
|
216
293
|
}) => TClientNext)) => {
|
|
217
|
-
config:
|
|
218
|
-
|
|
219
|
-
pk?: true;
|
|
220
|
-
field?: string;
|
|
221
|
-
default?: number;
|
|
222
|
-
type: "int";
|
|
223
|
-
}, z.ZodNumber, TNewNext, TDefaultNext, TClientNext, TClientNext>;
|
|
224
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
225
|
-
sql: z.ZodNumber;
|
|
226
|
-
initialState: TNewNext;
|
|
227
|
-
client: TClientNext;
|
|
228
|
-
}) => TValidationNext)) => {
|
|
229
|
-
config: BuilderConfig<{
|
|
294
|
+
config: {
|
|
295
|
+
sql: {
|
|
230
296
|
nullable?: boolean;
|
|
231
297
|
pk?: true;
|
|
232
298
|
field?: string;
|
|
233
299
|
default?: number;
|
|
234
300
|
type: "int";
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
301
|
+
};
|
|
302
|
+
zodSqlSchema: z.ZodNumber;
|
|
303
|
+
zodNewSchema: TNewNext;
|
|
304
|
+
initialValue: TDefaultNext;
|
|
305
|
+
zodClientSchema: TClientNext;
|
|
306
|
+
zodValidationSchema: TClientNext;
|
|
307
|
+
};
|
|
308
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
309
|
+
sql: z.ZodNumber;
|
|
310
|
+
initialState: TNewNext;
|
|
311
|
+
client: TClientNext;
|
|
312
|
+
}) => TValidationNext)) => {
|
|
313
|
+
config: {
|
|
314
|
+
sql: {
|
|
241
315
|
nullable?: boolean;
|
|
242
316
|
pk?: true;
|
|
243
317
|
field?: string;
|
|
244
318
|
default?: number;
|
|
245
319
|
type: "int";
|
|
246
|
-
}
|
|
320
|
+
};
|
|
321
|
+
zodSqlSchema: z.ZodNumber;
|
|
322
|
+
zodNewSchema: TNewNext;
|
|
323
|
+
initialValue: TDefaultNext;
|
|
324
|
+
zodClientSchema: TClientNext;
|
|
325
|
+
zodValidationSchema: TValidationNext;
|
|
326
|
+
};
|
|
327
|
+
transform: (transforms: {
|
|
328
|
+
toClient: (dbValue: number) => z.TypeOf<TClientNext>;
|
|
329
|
+
toDb: (clientValue: z.TypeOf<TClientNext>) => number;
|
|
330
|
+
}) => {
|
|
331
|
+
config: {
|
|
332
|
+
sql: {
|
|
333
|
+
nullable?: boolean;
|
|
334
|
+
pk?: true;
|
|
335
|
+
field?: string;
|
|
336
|
+
default?: number;
|
|
337
|
+
type: "int";
|
|
338
|
+
};
|
|
339
|
+
zodSqlSchema: z.ZodNumber;
|
|
340
|
+
zodNewSchema: TNewNext;
|
|
341
|
+
initialValue: TDefaultNext;
|
|
342
|
+
zodClientSchema: TClientNext;
|
|
343
|
+
zodValidationSchema: TValidationNext;
|
|
344
|
+
} & {
|
|
247
345
|
transforms: {
|
|
248
346
|
toClient: (dbValue: number) => z.TypeOf<TClientNext>;
|
|
249
347
|
toDb: (clientValue: z.TypeOf<TClientNext>) => number;
|
|
@@ -255,13 +353,20 @@ export declare const shape: {
|
|
|
255
353
|
toClient: (dbValue: number) => z.TypeOf<TClientNext>;
|
|
256
354
|
toDb: (clientValue: z.TypeOf<TClientNext>) => number;
|
|
257
355
|
}) => {
|
|
258
|
-
config:
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
356
|
+
config: {
|
|
357
|
+
sql: {
|
|
358
|
+
nullable?: boolean;
|
|
359
|
+
pk?: true;
|
|
360
|
+
field?: string;
|
|
361
|
+
default?: number;
|
|
362
|
+
type: "int";
|
|
363
|
+
};
|
|
364
|
+
zodSqlSchema: z.ZodNumber;
|
|
365
|
+
zodNewSchema: TNewNext;
|
|
366
|
+
initialValue: TDefaultNext;
|
|
367
|
+
zodClientSchema: TClientNext;
|
|
368
|
+
zodValidationSchema: TClientNext;
|
|
369
|
+
} & {
|
|
265
370
|
transforms: {
|
|
266
371
|
toClient: (dbValue: number) => z.TypeOf<TClientNext>;
|
|
267
372
|
toDb: (clientValue: z.TypeOf<TClientNext>) => number;
|
|
@@ -270,58 +375,86 @@ export declare const shape: {
|
|
|
270
375
|
};
|
|
271
376
|
};
|
|
272
377
|
transform: (transforms: {
|
|
273
|
-
toClient: (dbValue: number) =>
|
|
274
|
-
toDb: (clientValue:
|
|
378
|
+
toClient: (dbValue: number) => z.TypeOf<InferSmartClientType<z.ZodNumber, TNewNext>>;
|
|
379
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodNumber, TNewNext>>) => number;
|
|
275
380
|
}) => {
|
|
276
|
-
config:
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
381
|
+
config: {
|
|
382
|
+
sql: {
|
|
383
|
+
nullable?: boolean;
|
|
384
|
+
pk?: true;
|
|
385
|
+
field?: string;
|
|
386
|
+
default?: number;
|
|
387
|
+
type: "int";
|
|
388
|
+
};
|
|
389
|
+
zodSqlSchema: z.ZodNumber;
|
|
390
|
+
zodNewSchema: TNewNext;
|
|
391
|
+
initialValue: TDefaultNext;
|
|
392
|
+
zodClientSchema: InferSmartClientType<z.ZodNumber, TNewNext>;
|
|
393
|
+
zodValidationSchema: InferSmartClientType<z.ZodNumber, TNewNext>;
|
|
394
|
+
} & {
|
|
283
395
|
transforms: {
|
|
284
|
-
toClient: (dbValue: number) =>
|
|
285
|
-
toDb: (clientValue:
|
|
396
|
+
toClient: (dbValue: number) => z.TypeOf<InferSmartClientType<z.ZodNumber, TNewNext>>;
|
|
397
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodNumber, TNewNext>>) => number;
|
|
286
398
|
};
|
|
287
399
|
};
|
|
288
400
|
};
|
|
289
401
|
};
|
|
290
402
|
};
|
|
291
403
|
varchar: (config?: Omit<StringConfig, "type">) => {
|
|
292
|
-
config:
|
|
293
|
-
|
|
294
|
-
nullable?: boolean;
|
|
295
|
-
default?: string;
|
|
296
|
-
length?: number;
|
|
297
|
-
field?: string;
|
|
298
|
-
type: "varchar";
|
|
299
|
-
}, z.ZodString, z.ZodString, undefined, z.ZodString, z.ZodString>;
|
|
300
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
301
|
-
sql: z.ZodString;
|
|
302
|
-
initialState: z.ZodString;
|
|
303
|
-
client: z.ZodString;
|
|
304
|
-
}) => TValidationNext)) => {
|
|
305
|
-
config: BuilderConfig<{
|
|
404
|
+
config: {
|
|
405
|
+
sql: {
|
|
306
406
|
pk?: true;
|
|
307
407
|
nullable?: boolean;
|
|
308
408
|
default?: string;
|
|
309
409
|
length?: number;
|
|
310
410
|
field?: string;
|
|
311
411
|
type: "varchar";
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
412
|
+
};
|
|
413
|
+
zodSqlSchema: z.ZodString;
|
|
414
|
+
zodNewSchema: z.ZodString;
|
|
415
|
+
initialValue: undefined;
|
|
416
|
+
zodClientSchema: z.ZodString;
|
|
417
|
+
zodValidationSchema: z.ZodString;
|
|
418
|
+
};
|
|
419
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
420
|
+
sql: z.ZodString;
|
|
421
|
+
initialState: z.ZodString;
|
|
422
|
+
client: z.ZodString;
|
|
423
|
+
}) => TValidationNext)) => {
|
|
424
|
+
config: {
|
|
425
|
+
sql: {
|
|
318
426
|
pk?: true;
|
|
319
427
|
nullable?: boolean;
|
|
320
428
|
default?: string;
|
|
321
429
|
length?: number;
|
|
322
430
|
field?: string;
|
|
323
431
|
type: "varchar";
|
|
324
|
-
}
|
|
432
|
+
};
|
|
433
|
+
zodSqlSchema: z.ZodString;
|
|
434
|
+
zodNewSchema: z.ZodString;
|
|
435
|
+
initialValue: undefined;
|
|
436
|
+
zodClientSchema: z.ZodString;
|
|
437
|
+
zodValidationSchema: TValidationNext;
|
|
438
|
+
};
|
|
439
|
+
transform: (transforms: {
|
|
440
|
+
toClient: (dbValue: string) => string;
|
|
441
|
+
toDb: (clientValue: string) => string;
|
|
442
|
+
}) => {
|
|
443
|
+
config: {
|
|
444
|
+
sql: {
|
|
445
|
+
pk?: true;
|
|
446
|
+
nullable?: boolean;
|
|
447
|
+
default?: string;
|
|
448
|
+
length?: number;
|
|
449
|
+
field?: string;
|
|
450
|
+
type: "varchar";
|
|
451
|
+
};
|
|
452
|
+
zodSqlSchema: z.ZodString;
|
|
453
|
+
zodNewSchema: z.ZodString;
|
|
454
|
+
initialValue: undefined;
|
|
455
|
+
zodClientSchema: z.ZodString;
|
|
456
|
+
zodValidationSchema: TValidationNext;
|
|
457
|
+
} & {
|
|
325
458
|
transforms: {
|
|
326
459
|
toClient: (dbValue: string) => string;
|
|
327
460
|
toDb: (clientValue: string) => string;
|
|
@@ -333,39 +466,60 @@ export declare const shape: {
|
|
|
333
466
|
sql: z.ZodString;
|
|
334
467
|
initialState: z.ZodString;
|
|
335
468
|
}) => TClientNext)) => {
|
|
336
|
-
config:
|
|
337
|
-
|
|
338
|
-
nullable?: boolean;
|
|
339
|
-
default?: string;
|
|
340
|
-
length?: number;
|
|
341
|
-
field?: string;
|
|
342
|
-
type: "varchar";
|
|
343
|
-
}, z.ZodString, z.ZodString, undefined, TClientNext, TClientNext>;
|
|
344
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
345
|
-
sql: z.ZodString;
|
|
346
|
-
initialState: z.ZodString;
|
|
347
|
-
client: TClientNext;
|
|
348
|
-
}) => TValidationNext)) => {
|
|
349
|
-
config: BuilderConfig<{
|
|
469
|
+
config: {
|
|
470
|
+
sql: {
|
|
350
471
|
pk?: true;
|
|
351
472
|
nullable?: boolean;
|
|
352
473
|
default?: string;
|
|
353
474
|
length?: number;
|
|
354
475
|
field?: string;
|
|
355
476
|
type: "varchar";
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
477
|
+
};
|
|
478
|
+
zodSqlSchema: z.ZodString;
|
|
479
|
+
zodNewSchema: z.ZodString;
|
|
480
|
+
initialValue: undefined;
|
|
481
|
+
zodClientSchema: TClientNext;
|
|
482
|
+
zodValidationSchema: TClientNext;
|
|
483
|
+
};
|
|
484
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
485
|
+
sql: z.ZodString;
|
|
486
|
+
initialState: z.ZodString;
|
|
487
|
+
client: TClientNext;
|
|
488
|
+
}) => TValidationNext)) => {
|
|
489
|
+
config: {
|
|
490
|
+
sql: {
|
|
362
491
|
pk?: true;
|
|
363
492
|
nullable?: boolean;
|
|
364
493
|
default?: string;
|
|
365
494
|
length?: number;
|
|
366
495
|
field?: string;
|
|
367
496
|
type: "varchar";
|
|
368
|
-
}
|
|
497
|
+
};
|
|
498
|
+
zodSqlSchema: z.ZodString;
|
|
499
|
+
zodNewSchema: z.ZodString;
|
|
500
|
+
initialValue: undefined;
|
|
501
|
+
zodClientSchema: TClientNext;
|
|
502
|
+
zodValidationSchema: TValidationNext;
|
|
503
|
+
};
|
|
504
|
+
transform: (transforms: {
|
|
505
|
+
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
506
|
+
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
507
|
+
}) => {
|
|
508
|
+
config: {
|
|
509
|
+
sql: {
|
|
510
|
+
pk?: true;
|
|
511
|
+
nullable?: boolean;
|
|
512
|
+
default?: string;
|
|
513
|
+
length?: number;
|
|
514
|
+
field?: string;
|
|
515
|
+
type: "varchar";
|
|
516
|
+
};
|
|
517
|
+
zodSqlSchema: z.ZodString;
|
|
518
|
+
zodNewSchema: z.ZodString;
|
|
519
|
+
initialValue: undefined;
|
|
520
|
+
zodClientSchema: TClientNext;
|
|
521
|
+
zodValidationSchema: TValidationNext;
|
|
522
|
+
} & {
|
|
369
523
|
transforms: {
|
|
370
524
|
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
371
525
|
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
@@ -377,14 +531,21 @@ export declare const shape: {
|
|
|
377
531
|
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
378
532
|
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
379
533
|
}) => {
|
|
380
|
-
config:
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
534
|
+
config: {
|
|
535
|
+
sql: {
|
|
536
|
+
pk?: true;
|
|
537
|
+
nullable?: boolean;
|
|
538
|
+
default?: string;
|
|
539
|
+
length?: number;
|
|
540
|
+
field?: string;
|
|
541
|
+
type: "varchar";
|
|
542
|
+
};
|
|
543
|
+
zodSqlSchema: z.ZodString;
|
|
544
|
+
zodNewSchema: z.ZodString;
|
|
545
|
+
initialValue: undefined;
|
|
546
|
+
zodClientSchema: TClientNext;
|
|
547
|
+
zodValidationSchema: TClientNext;
|
|
548
|
+
} & {
|
|
388
549
|
transforms: {
|
|
389
550
|
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
390
551
|
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
@@ -396,59 +557,87 @@ export declare const shape: {
|
|
|
396
557
|
toClient: (dbValue: string) => string;
|
|
397
558
|
toDb: (clientValue: string) => string;
|
|
398
559
|
}) => {
|
|
399
|
-
config:
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
560
|
+
config: {
|
|
561
|
+
sql: {
|
|
562
|
+
pk?: true;
|
|
563
|
+
nullable?: boolean;
|
|
564
|
+
default?: string;
|
|
565
|
+
length?: number;
|
|
566
|
+
field?: string;
|
|
567
|
+
type: "varchar";
|
|
568
|
+
};
|
|
569
|
+
zodSqlSchema: z.ZodString;
|
|
570
|
+
zodNewSchema: z.ZodString;
|
|
571
|
+
initialValue: undefined;
|
|
572
|
+
zodClientSchema: z.ZodString;
|
|
573
|
+
zodValidationSchema: z.ZodString;
|
|
574
|
+
} & {
|
|
575
|
+
transforms: {
|
|
576
|
+
toClient: (dbValue: string) => string;
|
|
577
|
+
toDb: (clientValue: string) => string;
|
|
578
|
+
};
|
|
579
|
+
};
|
|
412
580
|
};
|
|
413
581
|
initialState: <TNewNext extends z.ZodTypeAny, TDefaultNext>(schema: TNewNext | ((tools: {
|
|
414
582
|
sql: z.ZodString;
|
|
415
583
|
}) => TNewNext), defaultValue: () => TDefaultNext) => {
|
|
416
|
-
config:
|
|
417
|
-
|
|
418
|
-
nullable?: boolean;
|
|
419
|
-
default?: string;
|
|
420
|
-
length?: number;
|
|
421
|
-
field?: string;
|
|
422
|
-
type: "varchar";
|
|
423
|
-
}, z.ZodString, TNewNext, TDefaultNext, z.ZodString, z.ZodString>;
|
|
424
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
425
|
-
sql: z.ZodString;
|
|
426
|
-
initialState: TNewNext;
|
|
427
|
-
client: z.ZodString;
|
|
428
|
-
}) => TValidationNext)) => {
|
|
429
|
-
config: BuilderConfig<{
|
|
584
|
+
config: {
|
|
585
|
+
sql: {
|
|
430
586
|
pk?: true;
|
|
431
587
|
nullable?: boolean;
|
|
432
588
|
default?: string;
|
|
433
589
|
length?: number;
|
|
434
590
|
field?: string;
|
|
435
591
|
type: "varchar";
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
592
|
+
};
|
|
593
|
+
zodSqlSchema: z.ZodString;
|
|
594
|
+
zodNewSchema: TNewNext;
|
|
595
|
+
initialValue: TDefaultNext;
|
|
596
|
+
zodClientSchema: InferSmartClientType<z.ZodString, TNewNext>;
|
|
597
|
+
zodValidationSchema: InferSmartClientType<z.ZodString, TNewNext>;
|
|
598
|
+
};
|
|
599
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
600
|
+
sql: z.ZodString;
|
|
601
|
+
initialState: TNewNext;
|
|
602
|
+
client: InferSmartClientType<z.ZodString, TNewNext>;
|
|
603
|
+
}) => TValidationNext)) => {
|
|
604
|
+
config: {
|
|
605
|
+
sql: {
|
|
442
606
|
pk?: true;
|
|
443
607
|
nullable?: boolean;
|
|
444
608
|
default?: string;
|
|
445
609
|
length?: number;
|
|
446
610
|
field?: string;
|
|
447
611
|
type: "varchar";
|
|
448
|
-
}
|
|
612
|
+
};
|
|
613
|
+
zodSqlSchema: z.ZodString;
|
|
614
|
+
zodNewSchema: TNewNext;
|
|
615
|
+
initialValue: TDefaultNext;
|
|
616
|
+
zodClientSchema: InferSmartClientType<z.ZodString, TNewNext>;
|
|
617
|
+
zodValidationSchema: TValidationNext;
|
|
618
|
+
};
|
|
619
|
+
transform: (transforms: {
|
|
620
|
+
toClient: (dbValue: string) => z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>;
|
|
621
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>) => string;
|
|
622
|
+
}) => {
|
|
623
|
+
config: {
|
|
624
|
+
sql: {
|
|
625
|
+
pk?: true;
|
|
626
|
+
nullable?: boolean;
|
|
627
|
+
default?: string;
|
|
628
|
+
length?: number;
|
|
629
|
+
field?: string;
|
|
630
|
+
type: "varchar";
|
|
631
|
+
};
|
|
632
|
+
zodSqlSchema: z.ZodString;
|
|
633
|
+
zodNewSchema: TNewNext;
|
|
634
|
+
initialValue: TDefaultNext;
|
|
635
|
+
zodClientSchema: InferSmartClientType<z.ZodString, TNewNext>;
|
|
636
|
+
zodValidationSchema: TValidationNext;
|
|
637
|
+
} & {
|
|
449
638
|
transforms: {
|
|
450
|
-
toClient: (dbValue: string) =>
|
|
451
|
-
toDb: (clientValue:
|
|
639
|
+
toClient: (dbValue: string) => z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>;
|
|
640
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>) => string;
|
|
452
641
|
};
|
|
453
642
|
};
|
|
454
643
|
};
|
|
@@ -457,39 +646,60 @@ export declare const shape: {
|
|
|
457
646
|
sql: z.ZodString;
|
|
458
647
|
initialState: TNewNext;
|
|
459
648
|
}) => TClientNext)) => {
|
|
460
|
-
config:
|
|
461
|
-
|
|
462
|
-
nullable?: boolean;
|
|
463
|
-
default?: string;
|
|
464
|
-
length?: number;
|
|
465
|
-
field?: string;
|
|
466
|
-
type: "varchar";
|
|
467
|
-
}, z.ZodString, TNewNext, TDefaultNext, TClientNext, TClientNext>;
|
|
468
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
469
|
-
sql: z.ZodString;
|
|
470
|
-
initialState: TNewNext;
|
|
471
|
-
client: TClientNext;
|
|
472
|
-
}) => TValidationNext)) => {
|
|
473
|
-
config: BuilderConfig<{
|
|
649
|
+
config: {
|
|
650
|
+
sql: {
|
|
474
651
|
pk?: true;
|
|
475
652
|
nullable?: boolean;
|
|
476
653
|
default?: string;
|
|
477
654
|
length?: number;
|
|
478
655
|
field?: string;
|
|
479
656
|
type: "varchar";
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
657
|
+
};
|
|
658
|
+
zodSqlSchema: z.ZodString;
|
|
659
|
+
zodNewSchema: TNewNext;
|
|
660
|
+
initialValue: TDefaultNext;
|
|
661
|
+
zodClientSchema: TClientNext;
|
|
662
|
+
zodValidationSchema: TClientNext;
|
|
663
|
+
};
|
|
664
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
665
|
+
sql: z.ZodString;
|
|
666
|
+
initialState: TNewNext;
|
|
667
|
+
client: TClientNext;
|
|
668
|
+
}) => TValidationNext)) => {
|
|
669
|
+
config: {
|
|
670
|
+
sql: {
|
|
486
671
|
pk?: true;
|
|
487
672
|
nullable?: boolean;
|
|
488
673
|
default?: string;
|
|
489
674
|
length?: number;
|
|
490
675
|
field?: string;
|
|
491
676
|
type: "varchar";
|
|
492
|
-
}
|
|
677
|
+
};
|
|
678
|
+
zodSqlSchema: z.ZodString;
|
|
679
|
+
zodNewSchema: TNewNext;
|
|
680
|
+
initialValue: TDefaultNext;
|
|
681
|
+
zodClientSchema: TClientNext;
|
|
682
|
+
zodValidationSchema: TValidationNext;
|
|
683
|
+
};
|
|
684
|
+
transform: (transforms: {
|
|
685
|
+
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
686
|
+
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
687
|
+
}) => {
|
|
688
|
+
config: {
|
|
689
|
+
sql: {
|
|
690
|
+
pk?: true;
|
|
691
|
+
nullable?: boolean;
|
|
692
|
+
default?: string;
|
|
693
|
+
length?: number;
|
|
694
|
+
field?: string;
|
|
695
|
+
type: "varchar";
|
|
696
|
+
};
|
|
697
|
+
zodSqlSchema: z.ZodString;
|
|
698
|
+
zodNewSchema: TNewNext;
|
|
699
|
+
initialValue: TDefaultNext;
|
|
700
|
+
zodClientSchema: TClientNext;
|
|
701
|
+
zodValidationSchema: TValidationNext;
|
|
702
|
+
} & {
|
|
493
703
|
transforms: {
|
|
494
704
|
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
495
705
|
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
@@ -501,14 +711,21 @@ export declare const shape: {
|
|
|
501
711
|
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
502
712
|
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
503
713
|
}) => {
|
|
504
|
-
config:
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
714
|
+
config: {
|
|
715
|
+
sql: {
|
|
716
|
+
pk?: true;
|
|
717
|
+
nullable?: boolean;
|
|
718
|
+
default?: string;
|
|
719
|
+
length?: number;
|
|
720
|
+
field?: string;
|
|
721
|
+
type: "varchar";
|
|
722
|
+
};
|
|
723
|
+
zodSqlSchema: z.ZodString;
|
|
724
|
+
zodNewSchema: TNewNext;
|
|
725
|
+
initialValue: TDefaultNext;
|
|
726
|
+
zodClientSchema: TClientNext;
|
|
727
|
+
zodValidationSchema: TClientNext;
|
|
728
|
+
} & {
|
|
512
729
|
transforms: {
|
|
513
730
|
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
514
731
|
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
@@ -517,59 +734,87 @@ export declare const shape: {
|
|
|
517
734
|
};
|
|
518
735
|
};
|
|
519
736
|
transform: (transforms: {
|
|
520
|
-
toClient: (dbValue: string) =>
|
|
521
|
-
toDb: (clientValue:
|
|
737
|
+
toClient: (dbValue: string) => z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>;
|
|
738
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>) => string;
|
|
522
739
|
}) => {
|
|
523
|
-
config:
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
740
|
+
config: {
|
|
741
|
+
sql: {
|
|
742
|
+
pk?: true;
|
|
743
|
+
nullable?: boolean;
|
|
744
|
+
default?: string;
|
|
745
|
+
length?: number;
|
|
746
|
+
field?: string;
|
|
747
|
+
type: "varchar";
|
|
748
|
+
};
|
|
749
|
+
zodSqlSchema: z.ZodString;
|
|
750
|
+
zodNewSchema: TNewNext;
|
|
751
|
+
initialValue: TDefaultNext;
|
|
752
|
+
zodClientSchema: InferSmartClientType<z.ZodString, TNewNext>;
|
|
753
|
+
zodValidationSchema: InferSmartClientType<z.ZodString, TNewNext>;
|
|
754
|
+
} & {
|
|
531
755
|
transforms: {
|
|
532
|
-
toClient: (dbValue: string) =>
|
|
533
|
-
toDb: (clientValue:
|
|
756
|
+
toClient: (dbValue: string) => z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>;
|
|
757
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>) => string;
|
|
534
758
|
};
|
|
535
759
|
};
|
|
536
760
|
};
|
|
537
761
|
};
|
|
538
762
|
};
|
|
539
763
|
char: (config?: Omit<StringConfig, "type">) => {
|
|
540
|
-
config:
|
|
541
|
-
|
|
542
|
-
nullable?: boolean;
|
|
543
|
-
default?: string;
|
|
544
|
-
length?: number;
|
|
545
|
-
field?: string;
|
|
546
|
-
type: "char";
|
|
547
|
-
}, z.ZodString, z.ZodString, undefined, z.ZodString, z.ZodString>;
|
|
548
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
549
|
-
sql: z.ZodString;
|
|
550
|
-
initialState: z.ZodString;
|
|
551
|
-
client: z.ZodString;
|
|
552
|
-
}) => TValidationNext)) => {
|
|
553
|
-
config: BuilderConfig<{
|
|
764
|
+
config: {
|
|
765
|
+
sql: {
|
|
554
766
|
pk?: true;
|
|
555
767
|
nullable?: boolean;
|
|
556
768
|
default?: string;
|
|
557
769
|
length?: number;
|
|
558
770
|
field?: string;
|
|
559
771
|
type: "char";
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
772
|
+
};
|
|
773
|
+
zodSqlSchema: z.ZodString;
|
|
774
|
+
zodNewSchema: z.ZodString;
|
|
775
|
+
initialValue: undefined;
|
|
776
|
+
zodClientSchema: z.ZodString;
|
|
777
|
+
zodValidationSchema: z.ZodString;
|
|
778
|
+
};
|
|
779
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
780
|
+
sql: z.ZodString;
|
|
781
|
+
initialState: z.ZodString;
|
|
782
|
+
client: z.ZodString;
|
|
783
|
+
}) => TValidationNext)) => {
|
|
784
|
+
config: {
|
|
785
|
+
sql: {
|
|
566
786
|
pk?: true;
|
|
567
787
|
nullable?: boolean;
|
|
568
788
|
default?: string;
|
|
569
789
|
length?: number;
|
|
570
790
|
field?: string;
|
|
571
791
|
type: "char";
|
|
572
|
-
}
|
|
792
|
+
};
|
|
793
|
+
zodSqlSchema: z.ZodString;
|
|
794
|
+
zodNewSchema: z.ZodString;
|
|
795
|
+
initialValue: undefined;
|
|
796
|
+
zodClientSchema: z.ZodString;
|
|
797
|
+
zodValidationSchema: TValidationNext;
|
|
798
|
+
};
|
|
799
|
+
transform: (transforms: {
|
|
800
|
+
toClient: (dbValue: string) => string;
|
|
801
|
+
toDb: (clientValue: string) => string;
|
|
802
|
+
}) => {
|
|
803
|
+
config: {
|
|
804
|
+
sql: {
|
|
805
|
+
pk?: true;
|
|
806
|
+
nullable?: boolean;
|
|
807
|
+
default?: string;
|
|
808
|
+
length?: number;
|
|
809
|
+
field?: string;
|
|
810
|
+
type: "char";
|
|
811
|
+
};
|
|
812
|
+
zodSqlSchema: z.ZodString;
|
|
813
|
+
zodNewSchema: z.ZodString;
|
|
814
|
+
initialValue: undefined;
|
|
815
|
+
zodClientSchema: z.ZodString;
|
|
816
|
+
zodValidationSchema: TValidationNext;
|
|
817
|
+
} & {
|
|
573
818
|
transforms: {
|
|
574
819
|
toClient: (dbValue: string) => string;
|
|
575
820
|
toDb: (clientValue: string) => string;
|
|
@@ -581,39 +826,60 @@ export declare const shape: {
|
|
|
581
826
|
sql: z.ZodString;
|
|
582
827
|
initialState: z.ZodString;
|
|
583
828
|
}) => TClientNext)) => {
|
|
584
|
-
config:
|
|
585
|
-
|
|
586
|
-
nullable?: boolean;
|
|
587
|
-
default?: string;
|
|
588
|
-
length?: number;
|
|
589
|
-
field?: string;
|
|
590
|
-
type: "char";
|
|
591
|
-
}, z.ZodString, z.ZodString, undefined, TClientNext, TClientNext>;
|
|
592
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
593
|
-
sql: z.ZodString;
|
|
594
|
-
initialState: z.ZodString;
|
|
595
|
-
client: TClientNext;
|
|
596
|
-
}) => TValidationNext)) => {
|
|
597
|
-
config: BuilderConfig<{
|
|
829
|
+
config: {
|
|
830
|
+
sql: {
|
|
598
831
|
pk?: true;
|
|
599
832
|
nullable?: boolean;
|
|
600
833
|
default?: string;
|
|
601
834
|
length?: number;
|
|
602
835
|
field?: string;
|
|
603
836
|
type: "char";
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
837
|
+
};
|
|
838
|
+
zodSqlSchema: z.ZodString;
|
|
839
|
+
zodNewSchema: z.ZodString;
|
|
840
|
+
initialValue: undefined;
|
|
841
|
+
zodClientSchema: TClientNext;
|
|
842
|
+
zodValidationSchema: TClientNext;
|
|
843
|
+
};
|
|
844
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
845
|
+
sql: z.ZodString;
|
|
846
|
+
initialState: z.ZodString;
|
|
847
|
+
client: TClientNext;
|
|
848
|
+
}) => TValidationNext)) => {
|
|
849
|
+
config: {
|
|
850
|
+
sql: {
|
|
610
851
|
pk?: true;
|
|
611
852
|
nullable?: boolean;
|
|
612
853
|
default?: string;
|
|
613
854
|
length?: number;
|
|
614
855
|
field?: string;
|
|
615
856
|
type: "char";
|
|
616
|
-
}
|
|
857
|
+
};
|
|
858
|
+
zodSqlSchema: z.ZodString;
|
|
859
|
+
zodNewSchema: z.ZodString;
|
|
860
|
+
initialValue: undefined;
|
|
861
|
+
zodClientSchema: TClientNext;
|
|
862
|
+
zodValidationSchema: TValidationNext;
|
|
863
|
+
};
|
|
864
|
+
transform: (transforms: {
|
|
865
|
+
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
866
|
+
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
867
|
+
}) => {
|
|
868
|
+
config: {
|
|
869
|
+
sql: {
|
|
870
|
+
pk?: true;
|
|
871
|
+
nullable?: boolean;
|
|
872
|
+
default?: string;
|
|
873
|
+
length?: number;
|
|
874
|
+
field?: string;
|
|
875
|
+
type: "char";
|
|
876
|
+
};
|
|
877
|
+
zodSqlSchema: z.ZodString;
|
|
878
|
+
zodNewSchema: z.ZodString;
|
|
879
|
+
initialValue: undefined;
|
|
880
|
+
zodClientSchema: TClientNext;
|
|
881
|
+
zodValidationSchema: TValidationNext;
|
|
882
|
+
} & {
|
|
617
883
|
transforms: {
|
|
618
884
|
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
619
885
|
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
@@ -625,14 +891,21 @@ export declare const shape: {
|
|
|
625
891
|
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
626
892
|
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
627
893
|
}) => {
|
|
628
|
-
config:
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
894
|
+
config: {
|
|
895
|
+
sql: {
|
|
896
|
+
pk?: true;
|
|
897
|
+
nullable?: boolean;
|
|
898
|
+
default?: string;
|
|
899
|
+
length?: number;
|
|
900
|
+
field?: string;
|
|
901
|
+
type: "char";
|
|
902
|
+
};
|
|
903
|
+
zodSqlSchema: z.ZodString;
|
|
904
|
+
zodNewSchema: z.ZodString;
|
|
905
|
+
initialValue: undefined;
|
|
906
|
+
zodClientSchema: TClientNext;
|
|
907
|
+
zodValidationSchema: TClientNext;
|
|
908
|
+
} & {
|
|
636
909
|
transforms: {
|
|
637
910
|
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
638
911
|
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
@@ -644,14 +917,21 @@ export declare const shape: {
|
|
|
644
917
|
toClient: (dbValue: string) => string;
|
|
645
918
|
toDb: (clientValue: string) => string;
|
|
646
919
|
}) => {
|
|
647
|
-
config:
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
920
|
+
config: {
|
|
921
|
+
sql: {
|
|
922
|
+
pk?: true;
|
|
923
|
+
nullable?: boolean;
|
|
924
|
+
default?: string;
|
|
925
|
+
length?: number;
|
|
926
|
+
field?: string;
|
|
927
|
+
type: "char";
|
|
928
|
+
};
|
|
929
|
+
zodSqlSchema: z.ZodString;
|
|
930
|
+
zodNewSchema: z.ZodString;
|
|
931
|
+
initialValue: undefined;
|
|
932
|
+
zodClientSchema: z.ZodString;
|
|
933
|
+
zodValidationSchema: z.ZodString;
|
|
934
|
+
} & {
|
|
655
935
|
transforms: {
|
|
656
936
|
toClient: (dbValue: string) => string;
|
|
657
937
|
toDb: (clientValue: string) => string;
|
|
@@ -661,42 +941,63 @@ export declare const shape: {
|
|
|
661
941
|
initialState: <TNewNext extends z.ZodTypeAny, TDefaultNext>(schema: TNewNext | ((tools: {
|
|
662
942
|
sql: z.ZodString;
|
|
663
943
|
}) => TNewNext), defaultValue: () => TDefaultNext) => {
|
|
664
|
-
config:
|
|
665
|
-
|
|
666
|
-
nullable?: boolean;
|
|
667
|
-
default?: string;
|
|
668
|
-
length?: number;
|
|
669
|
-
field?: string;
|
|
670
|
-
type: "char";
|
|
671
|
-
}, z.ZodString, TNewNext, TDefaultNext, z.ZodString, z.ZodString>;
|
|
672
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
673
|
-
sql: z.ZodString;
|
|
674
|
-
initialState: TNewNext;
|
|
675
|
-
client: z.ZodString;
|
|
676
|
-
}) => TValidationNext)) => {
|
|
677
|
-
config: BuilderConfig<{
|
|
944
|
+
config: {
|
|
945
|
+
sql: {
|
|
678
946
|
pk?: true;
|
|
679
947
|
nullable?: boolean;
|
|
680
948
|
default?: string;
|
|
681
949
|
length?: number;
|
|
682
950
|
field?: string;
|
|
683
951
|
type: "char";
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
952
|
+
};
|
|
953
|
+
zodSqlSchema: z.ZodString;
|
|
954
|
+
zodNewSchema: TNewNext;
|
|
955
|
+
initialValue: TDefaultNext;
|
|
956
|
+
zodClientSchema: InferSmartClientType<z.ZodString, TNewNext>;
|
|
957
|
+
zodValidationSchema: InferSmartClientType<z.ZodString, TNewNext>;
|
|
958
|
+
};
|
|
959
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
960
|
+
sql: z.ZodString;
|
|
961
|
+
initialState: TNewNext;
|
|
962
|
+
client: InferSmartClientType<z.ZodString, TNewNext>;
|
|
963
|
+
}) => TValidationNext)) => {
|
|
964
|
+
config: {
|
|
965
|
+
sql: {
|
|
690
966
|
pk?: true;
|
|
691
967
|
nullable?: boolean;
|
|
692
968
|
default?: string;
|
|
693
969
|
length?: number;
|
|
694
970
|
field?: string;
|
|
695
971
|
type: "char";
|
|
696
|
-
}
|
|
972
|
+
};
|
|
973
|
+
zodSqlSchema: z.ZodString;
|
|
974
|
+
zodNewSchema: TNewNext;
|
|
975
|
+
initialValue: TDefaultNext;
|
|
976
|
+
zodClientSchema: InferSmartClientType<z.ZodString, TNewNext>;
|
|
977
|
+
zodValidationSchema: TValidationNext;
|
|
978
|
+
};
|
|
979
|
+
transform: (transforms: {
|
|
980
|
+
toClient: (dbValue: string) => z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>;
|
|
981
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>) => string;
|
|
982
|
+
}) => {
|
|
983
|
+
config: {
|
|
984
|
+
sql: {
|
|
985
|
+
pk?: true;
|
|
986
|
+
nullable?: boolean;
|
|
987
|
+
default?: string;
|
|
988
|
+
length?: number;
|
|
989
|
+
field?: string;
|
|
990
|
+
type: "char";
|
|
991
|
+
};
|
|
992
|
+
zodSqlSchema: z.ZodString;
|
|
993
|
+
zodNewSchema: TNewNext;
|
|
994
|
+
initialValue: TDefaultNext;
|
|
995
|
+
zodClientSchema: InferSmartClientType<z.ZodString, TNewNext>;
|
|
996
|
+
zodValidationSchema: TValidationNext;
|
|
997
|
+
} & {
|
|
697
998
|
transforms: {
|
|
698
|
-
toClient: (dbValue: string) =>
|
|
699
|
-
toDb: (clientValue:
|
|
999
|
+
toClient: (dbValue: string) => z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>;
|
|
1000
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>) => string;
|
|
700
1001
|
};
|
|
701
1002
|
};
|
|
702
1003
|
};
|
|
@@ -705,39 +1006,60 @@ export declare const shape: {
|
|
|
705
1006
|
sql: z.ZodString;
|
|
706
1007
|
initialState: TNewNext;
|
|
707
1008
|
}) => TClientNext)) => {
|
|
708
|
-
config:
|
|
709
|
-
|
|
710
|
-
nullable?: boolean;
|
|
711
|
-
default?: string;
|
|
712
|
-
length?: number;
|
|
713
|
-
field?: string;
|
|
714
|
-
type: "char";
|
|
715
|
-
}, z.ZodString, TNewNext, TDefaultNext, TClientNext, TClientNext>;
|
|
716
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
717
|
-
sql: z.ZodString;
|
|
718
|
-
initialState: TNewNext;
|
|
719
|
-
client: TClientNext;
|
|
720
|
-
}) => TValidationNext)) => {
|
|
721
|
-
config: BuilderConfig<{
|
|
1009
|
+
config: {
|
|
1010
|
+
sql: {
|
|
722
1011
|
pk?: true;
|
|
723
1012
|
nullable?: boolean;
|
|
724
1013
|
default?: string;
|
|
725
1014
|
length?: number;
|
|
726
1015
|
field?: string;
|
|
727
1016
|
type: "char";
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
1017
|
+
};
|
|
1018
|
+
zodSqlSchema: z.ZodString;
|
|
1019
|
+
zodNewSchema: TNewNext;
|
|
1020
|
+
initialValue: TDefaultNext;
|
|
1021
|
+
zodClientSchema: TClientNext;
|
|
1022
|
+
zodValidationSchema: TClientNext;
|
|
1023
|
+
};
|
|
1024
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1025
|
+
sql: z.ZodString;
|
|
1026
|
+
initialState: TNewNext;
|
|
1027
|
+
client: TClientNext;
|
|
1028
|
+
}) => TValidationNext)) => {
|
|
1029
|
+
config: {
|
|
1030
|
+
sql: {
|
|
734
1031
|
pk?: true;
|
|
735
1032
|
nullable?: boolean;
|
|
736
1033
|
default?: string;
|
|
737
1034
|
length?: number;
|
|
738
1035
|
field?: string;
|
|
739
1036
|
type: "char";
|
|
740
|
-
}
|
|
1037
|
+
};
|
|
1038
|
+
zodSqlSchema: z.ZodString;
|
|
1039
|
+
zodNewSchema: TNewNext;
|
|
1040
|
+
initialValue: TDefaultNext;
|
|
1041
|
+
zodClientSchema: TClientNext;
|
|
1042
|
+
zodValidationSchema: TValidationNext;
|
|
1043
|
+
};
|
|
1044
|
+
transform: (transforms: {
|
|
1045
|
+
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
1046
|
+
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
1047
|
+
}) => {
|
|
1048
|
+
config: {
|
|
1049
|
+
sql: {
|
|
1050
|
+
pk?: true;
|
|
1051
|
+
nullable?: boolean;
|
|
1052
|
+
default?: string;
|
|
1053
|
+
length?: number;
|
|
1054
|
+
field?: string;
|
|
1055
|
+
type: "char";
|
|
1056
|
+
};
|
|
1057
|
+
zodSqlSchema: z.ZodString;
|
|
1058
|
+
zodNewSchema: TNewNext;
|
|
1059
|
+
initialValue: TDefaultNext;
|
|
1060
|
+
zodClientSchema: TClientNext;
|
|
1061
|
+
zodValidationSchema: TValidationNext;
|
|
1062
|
+
} & {
|
|
741
1063
|
transforms: {
|
|
742
1064
|
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
743
1065
|
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
@@ -749,14 +1071,21 @@ export declare const shape: {
|
|
|
749
1071
|
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
750
1072
|
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
751
1073
|
}) => {
|
|
752
|
-
config:
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
1074
|
+
config: {
|
|
1075
|
+
sql: {
|
|
1076
|
+
pk?: true;
|
|
1077
|
+
nullable?: boolean;
|
|
1078
|
+
default?: string;
|
|
1079
|
+
length?: number;
|
|
1080
|
+
field?: string;
|
|
1081
|
+
type: "char";
|
|
1082
|
+
};
|
|
1083
|
+
zodSqlSchema: z.ZodString;
|
|
1084
|
+
zodNewSchema: TNewNext;
|
|
1085
|
+
initialValue: TDefaultNext;
|
|
1086
|
+
zodClientSchema: TClientNext;
|
|
1087
|
+
zodValidationSchema: TClientNext;
|
|
1088
|
+
} & {
|
|
760
1089
|
transforms: {
|
|
761
1090
|
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
762
1091
|
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
@@ -765,56 +1094,84 @@ export declare const shape: {
|
|
|
765
1094
|
};
|
|
766
1095
|
};
|
|
767
1096
|
transform: (transforms: {
|
|
768
|
-
toClient: (dbValue: string) =>
|
|
769
|
-
toDb: (clientValue:
|
|
1097
|
+
toClient: (dbValue: string) => z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>;
|
|
1098
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>) => string;
|
|
770
1099
|
}) => {
|
|
771
|
-
config:
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
1100
|
+
config: {
|
|
1101
|
+
sql: {
|
|
1102
|
+
pk?: true;
|
|
1103
|
+
nullable?: boolean;
|
|
1104
|
+
default?: string;
|
|
1105
|
+
length?: number;
|
|
1106
|
+
field?: string;
|
|
1107
|
+
type: "char";
|
|
1108
|
+
};
|
|
1109
|
+
zodSqlSchema: z.ZodString;
|
|
1110
|
+
zodNewSchema: TNewNext;
|
|
1111
|
+
initialValue: TDefaultNext;
|
|
1112
|
+
zodClientSchema: InferSmartClientType<z.ZodString, TNewNext>;
|
|
1113
|
+
zodValidationSchema: InferSmartClientType<z.ZodString, TNewNext>;
|
|
1114
|
+
} & {
|
|
779
1115
|
transforms: {
|
|
780
|
-
toClient: (dbValue: string) =>
|
|
781
|
-
toDb: (clientValue:
|
|
1116
|
+
toClient: (dbValue: string) => z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>;
|
|
1117
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>) => string;
|
|
782
1118
|
};
|
|
783
1119
|
};
|
|
784
1120
|
};
|
|
785
1121
|
};
|
|
786
1122
|
};
|
|
787
1123
|
text: (config?: Omit<StringConfig, "type" | "length">) => {
|
|
788
|
-
config:
|
|
789
|
-
|
|
790
|
-
nullable?: boolean;
|
|
791
|
-
default?: string;
|
|
792
|
-
field?: string;
|
|
793
|
-
type: "text";
|
|
794
|
-
}, z.ZodString, z.ZodString, undefined, z.ZodString, z.ZodString>;
|
|
795
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
796
|
-
sql: z.ZodString;
|
|
797
|
-
initialState: z.ZodString;
|
|
798
|
-
client: z.ZodString;
|
|
799
|
-
}) => TValidationNext)) => {
|
|
800
|
-
config: BuilderConfig<{
|
|
1124
|
+
config: {
|
|
1125
|
+
sql: {
|
|
801
1126
|
pk?: true;
|
|
802
1127
|
nullable?: boolean;
|
|
803
1128
|
default?: string;
|
|
804
1129
|
field?: string;
|
|
805
1130
|
type: "text";
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
1131
|
+
};
|
|
1132
|
+
zodSqlSchema: z.ZodString;
|
|
1133
|
+
zodNewSchema: z.ZodString;
|
|
1134
|
+
initialValue: undefined;
|
|
1135
|
+
zodClientSchema: z.ZodString;
|
|
1136
|
+
zodValidationSchema: z.ZodString;
|
|
1137
|
+
};
|
|
1138
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1139
|
+
sql: z.ZodString;
|
|
1140
|
+
initialState: z.ZodString;
|
|
1141
|
+
client: z.ZodString;
|
|
1142
|
+
}) => TValidationNext)) => {
|
|
1143
|
+
config: {
|
|
1144
|
+
sql: {
|
|
812
1145
|
pk?: true;
|
|
813
1146
|
nullable?: boolean;
|
|
814
1147
|
default?: string;
|
|
815
1148
|
field?: string;
|
|
816
1149
|
type: "text";
|
|
817
|
-
}
|
|
1150
|
+
};
|
|
1151
|
+
zodSqlSchema: z.ZodString;
|
|
1152
|
+
zodNewSchema: z.ZodString;
|
|
1153
|
+
initialValue: undefined;
|
|
1154
|
+
zodClientSchema: z.ZodString;
|
|
1155
|
+
zodValidationSchema: TValidationNext;
|
|
1156
|
+
};
|
|
1157
|
+
transform: (transforms: {
|
|
1158
|
+
toClient: (dbValue: string) => string;
|
|
1159
|
+
toDb: (clientValue: string) => string;
|
|
1160
|
+
}) => {
|
|
1161
|
+
config: {
|
|
1162
|
+
sql: {
|
|
1163
|
+
pk?: true;
|
|
1164
|
+
nullable?: boolean;
|
|
1165
|
+
default?: string;
|
|
1166
|
+
field?: string;
|
|
1167
|
+
type: "text";
|
|
1168
|
+
};
|
|
1169
|
+
zodSqlSchema: z.ZodString;
|
|
1170
|
+
zodNewSchema: z.ZodString;
|
|
1171
|
+
initialValue: undefined;
|
|
1172
|
+
zodClientSchema: z.ZodString;
|
|
1173
|
+
zodValidationSchema: TValidationNext;
|
|
1174
|
+
} & {
|
|
818
1175
|
transforms: {
|
|
819
1176
|
toClient: (dbValue: string) => string;
|
|
820
1177
|
toDb: (clientValue: string) => string;
|
|
@@ -826,36 +1183,57 @@ export declare const shape: {
|
|
|
826
1183
|
sql: z.ZodString;
|
|
827
1184
|
initialState: z.ZodString;
|
|
828
1185
|
}) => TClientNext)) => {
|
|
829
|
-
config:
|
|
830
|
-
|
|
831
|
-
nullable?: boolean;
|
|
832
|
-
default?: string;
|
|
833
|
-
field?: string;
|
|
834
|
-
type: "text";
|
|
835
|
-
}, z.ZodString, z.ZodString, undefined, TClientNext, TClientNext>;
|
|
836
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
837
|
-
sql: z.ZodString;
|
|
838
|
-
initialState: z.ZodString;
|
|
839
|
-
client: TClientNext;
|
|
840
|
-
}) => TValidationNext)) => {
|
|
841
|
-
config: BuilderConfig<{
|
|
1186
|
+
config: {
|
|
1187
|
+
sql: {
|
|
842
1188
|
pk?: true;
|
|
843
1189
|
nullable?: boolean;
|
|
844
1190
|
default?: string;
|
|
845
1191
|
field?: string;
|
|
846
1192
|
type: "text";
|
|
847
|
-
}
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
1193
|
+
};
|
|
1194
|
+
zodSqlSchema: z.ZodString;
|
|
1195
|
+
zodNewSchema: z.ZodString;
|
|
1196
|
+
initialValue: undefined;
|
|
1197
|
+
zodClientSchema: TClientNext;
|
|
1198
|
+
zodValidationSchema: TClientNext;
|
|
1199
|
+
};
|
|
1200
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1201
|
+
sql: z.ZodString;
|
|
1202
|
+
initialState: z.ZodString;
|
|
1203
|
+
client: TClientNext;
|
|
1204
|
+
}) => TValidationNext)) => {
|
|
1205
|
+
config: {
|
|
1206
|
+
sql: {
|
|
853
1207
|
pk?: true;
|
|
854
1208
|
nullable?: boolean;
|
|
855
1209
|
default?: string;
|
|
856
1210
|
field?: string;
|
|
857
1211
|
type: "text";
|
|
858
|
-
}
|
|
1212
|
+
};
|
|
1213
|
+
zodSqlSchema: z.ZodString;
|
|
1214
|
+
zodNewSchema: z.ZodString;
|
|
1215
|
+
initialValue: undefined;
|
|
1216
|
+
zodClientSchema: TClientNext;
|
|
1217
|
+
zodValidationSchema: TValidationNext;
|
|
1218
|
+
};
|
|
1219
|
+
transform: (transforms: {
|
|
1220
|
+
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
1221
|
+
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
1222
|
+
}) => {
|
|
1223
|
+
config: {
|
|
1224
|
+
sql: {
|
|
1225
|
+
pk?: true;
|
|
1226
|
+
nullable?: boolean;
|
|
1227
|
+
default?: string;
|
|
1228
|
+
field?: string;
|
|
1229
|
+
type: "text";
|
|
1230
|
+
};
|
|
1231
|
+
zodSqlSchema: z.ZodString;
|
|
1232
|
+
zodNewSchema: z.ZodString;
|
|
1233
|
+
initialValue: undefined;
|
|
1234
|
+
zodClientSchema: TClientNext;
|
|
1235
|
+
zodValidationSchema: TValidationNext;
|
|
1236
|
+
} & {
|
|
859
1237
|
transforms: {
|
|
860
1238
|
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
861
1239
|
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
@@ -867,13 +1245,20 @@ export declare const shape: {
|
|
|
867
1245
|
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
868
1246
|
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
869
1247
|
}) => {
|
|
870
|
-
config:
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
1248
|
+
config: {
|
|
1249
|
+
sql: {
|
|
1250
|
+
pk?: true;
|
|
1251
|
+
nullable?: boolean;
|
|
1252
|
+
default?: string;
|
|
1253
|
+
field?: string;
|
|
1254
|
+
type: "text";
|
|
1255
|
+
};
|
|
1256
|
+
zodSqlSchema: z.ZodString;
|
|
1257
|
+
zodNewSchema: z.ZodString;
|
|
1258
|
+
initialValue: undefined;
|
|
1259
|
+
zodClientSchema: TClientNext;
|
|
1260
|
+
zodValidationSchema: TClientNext;
|
|
1261
|
+
} & {
|
|
877
1262
|
transforms: {
|
|
878
1263
|
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
879
1264
|
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
@@ -885,55 +1270,83 @@ export declare const shape: {
|
|
|
885
1270
|
toClient: (dbValue: string) => string;
|
|
886
1271
|
toDb: (clientValue: string) => string;
|
|
887
1272
|
}) => {
|
|
888
|
-
config:
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
1273
|
+
config: {
|
|
1274
|
+
sql: {
|
|
1275
|
+
pk?: true;
|
|
1276
|
+
nullable?: boolean;
|
|
1277
|
+
default?: string;
|
|
1278
|
+
field?: string;
|
|
1279
|
+
type: "text";
|
|
1280
|
+
};
|
|
1281
|
+
zodSqlSchema: z.ZodString;
|
|
1282
|
+
zodNewSchema: z.ZodString;
|
|
1283
|
+
initialValue: undefined;
|
|
1284
|
+
zodClientSchema: z.ZodString;
|
|
1285
|
+
zodValidationSchema: z.ZodString;
|
|
1286
|
+
} & {
|
|
895
1287
|
transforms: {
|
|
896
1288
|
toClient: (dbValue: string) => string;
|
|
897
1289
|
toDb: (clientValue: string) => string;
|
|
898
1290
|
};
|
|
899
1291
|
};
|
|
900
1292
|
};
|
|
901
|
-
initialState: <TNewNext extends z.ZodTypeAny, TDefaultNext>(schema: TNewNext | ((tools: {
|
|
902
|
-
sql: z.ZodString;
|
|
903
|
-
}) => TNewNext), defaultValue: () => TDefaultNext) => {
|
|
904
|
-
config:
|
|
905
|
-
|
|
906
|
-
nullable?: boolean;
|
|
907
|
-
default?: string;
|
|
908
|
-
field?: string;
|
|
909
|
-
type: "text";
|
|
910
|
-
}, z.ZodString, TNewNext, TDefaultNext, z.ZodString, z.ZodString>;
|
|
911
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
912
|
-
sql: z.ZodString;
|
|
913
|
-
initialState: TNewNext;
|
|
914
|
-
client: z.ZodString;
|
|
915
|
-
}) => TValidationNext)) => {
|
|
916
|
-
config: BuilderConfig<{
|
|
1293
|
+
initialState: <TNewNext extends z.ZodTypeAny, TDefaultNext>(schema: TNewNext | ((tools: {
|
|
1294
|
+
sql: z.ZodString;
|
|
1295
|
+
}) => TNewNext), defaultValue: () => TDefaultNext) => {
|
|
1296
|
+
config: {
|
|
1297
|
+
sql: {
|
|
917
1298
|
pk?: true;
|
|
918
1299
|
nullable?: boolean;
|
|
919
1300
|
default?: string;
|
|
920
1301
|
field?: string;
|
|
921
1302
|
type: "text";
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
1303
|
+
};
|
|
1304
|
+
zodSqlSchema: z.ZodString;
|
|
1305
|
+
zodNewSchema: TNewNext;
|
|
1306
|
+
initialValue: TDefaultNext;
|
|
1307
|
+
zodClientSchema: InferSmartClientType<z.ZodString, TNewNext>;
|
|
1308
|
+
zodValidationSchema: InferSmartClientType<z.ZodString, TNewNext>;
|
|
1309
|
+
};
|
|
1310
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1311
|
+
sql: z.ZodString;
|
|
1312
|
+
initialState: TNewNext;
|
|
1313
|
+
client: InferSmartClientType<z.ZodString, TNewNext>;
|
|
1314
|
+
}) => TValidationNext)) => {
|
|
1315
|
+
config: {
|
|
1316
|
+
sql: {
|
|
928
1317
|
pk?: true;
|
|
929
1318
|
nullable?: boolean;
|
|
930
1319
|
default?: string;
|
|
931
1320
|
field?: string;
|
|
932
1321
|
type: "text";
|
|
933
|
-
}
|
|
1322
|
+
};
|
|
1323
|
+
zodSqlSchema: z.ZodString;
|
|
1324
|
+
zodNewSchema: TNewNext;
|
|
1325
|
+
initialValue: TDefaultNext;
|
|
1326
|
+
zodClientSchema: InferSmartClientType<z.ZodString, TNewNext>;
|
|
1327
|
+
zodValidationSchema: TValidationNext;
|
|
1328
|
+
};
|
|
1329
|
+
transform: (transforms: {
|
|
1330
|
+
toClient: (dbValue: string) => z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>;
|
|
1331
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>) => string;
|
|
1332
|
+
}) => {
|
|
1333
|
+
config: {
|
|
1334
|
+
sql: {
|
|
1335
|
+
pk?: true;
|
|
1336
|
+
nullable?: boolean;
|
|
1337
|
+
default?: string;
|
|
1338
|
+
field?: string;
|
|
1339
|
+
type: "text";
|
|
1340
|
+
};
|
|
1341
|
+
zodSqlSchema: z.ZodString;
|
|
1342
|
+
zodNewSchema: TNewNext;
|
|
1343
|
+
initialValue: TDefaultNext;
|
|
1344
|
+
zodClientSchema: InferSmartClientType<z.ZodString, TNewNext>;
|
|
1345
|
+
zodValidationSchema: TValidationNext;
|
|
1346
|
+
} & {
|
|
934
1347
|
transforms: {
|
|
935
|
-
toClient: (dbValue: string) =>
|
|
936
|
-
toDb: (clientValue:
|
|
1348
|
+
toClient: (dbValue: string) => z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>;
|
|
1349
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>) => string;
|
|
937
1350
|
};
|
|
938
1351
|
};
|
|
939
1352
|
};
|
|
@@ -942,36 +1355,57 @@ export declare const shape: {
|
|
|
942
1355
|
sql: z.ZodString;
|
|
943
1356
|
initialState: TNewNext;
|
|
944
1357
|
}) => TClientNext)) => {
|
|
945
|
-
config:
|
|
946
|
-
|
|
947
|
-
nullable?: boolean;
|
|
948
|
-
default?: string;
|
|
949
|
-
field?: string;
|
|
950
|
-
type: "text";
|
|
951
|
-
}, z.ZodString, TNewNext, TDefaultNext, TClientNext, TClientNext>;
|
|
952
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
953
|
-
sql: z.ZodString;
|
|
954
|
-
initialState: TNewNext;
|
|
955
|
-
client: TClientNext;
|
|
956
|
-
}) => TValidationNext)) => {
|
|
957
|
-
config: BuilderConfig<{
|
|
1358
|
+
config: {
|
|
1359
|
+
sql: {
|
|
958
1360
|
pk?: true;
|
|
959
1361
|
nullable?: boolean;
|
|
960
1362
|
default?: string;
|
|
961
1363
|
field?: string;
|
|
962
1364
|
type: "text";
|
|
963
|
-
}
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
1365
|
+
};
|
|
1366
|
+
zodSqlSchema: z.ZodString;
|
|
1367
|
+
zodNewSchema: TNewNext;
|
|
1368
|
+
initialValue: TDefaultNext;
|
|
1369
|
+
zodClientSchema: TClientNext;
|
|
1370
|
+
zodValidationSchema: TClientNext;
|
|
1371
|
+
};
|
|
1372
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1373
|
+
sql: z.ZodString;
|
|
1374
|
+
initialState: TNewNext;
|
|
1375
|
+
client: TClientNext;
|
|
1376
|
+
}) => TValidationNext)) => {
|
|
1377
|
+
config: {
|
|
1378
|
+
sql: {
|
|
969
1379
|
pk?: true;
|
|
970
1380
|
nullable?: boolean;
|
|
971
1381
|
default?: string;
|
|
972
1382
|
field?: string;
|
|
973
1383
|
type: "text";
|
|
974
|
-
}
|
|
1384
|
+
};
|
|
1385
|
+
zodSqlSchema: z.ZodString;
|
|
1386
|
+
zodNewSchema: TNewNext;
|
|
1387
|
+
initialValue: TDefaultNext;
|
|
1388
|
+
zodClientSchema: TClientNext;
|
|
1389
|
+
zodValidationSchema: TValidationNext;
|
|
1390
|
+
};
|
|
1391
|
+
transform: (transforms: {
|
|
1392
|
+
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
1393
|
+
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
1394
|
+
}) => {
|
|
1395
|
+
config: {
|
|
1396
|
+
sql: {
|
|
1397
|
+
pk?: true;
|
|
1398
|
+
nullable?: boolean;
|
|
1399
|
+
default?: string;
|
|
1400
|
+
field?: string;
|
|
1401
|
+
type: "text";
|
|
1402
|
+
};
|
|
1403
|
+
zodSqlSchema: z.ZodString;
|
|
1404
|
+
zodNewSchema: TNewNext;
|
|
1405
|
+
initialValue: TDefaultNext;
|
|
1406
|
+
zodClientSchema: TClientNext;
|
|
1407
|
+
zodValidationSchema: TValidationNext;
|
|
1408
|
+
} & {
|
|
975
1409
|
transforms: {
|
|
976
1410
|
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
977
1411
|
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
@@ -983,13 +1417,20 @@ export declare const shape: {
|
|
|
983
1417
|
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
984
1418
|
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
985
1419
|
}) => {
|
|
986
|
-
config:
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
1420
|
+
config: {
|
|
1421
|
+
sql: {
|
|
1422
|
+
pk?: true;
|
|
1423
|
+
nullable?: boolean;
|
|
1424
|
+
default?: string;
|
|
1425
|
+
field?: string;
|
|
1426
|
+
type: "text";
|
|
1427
|
+
};
|
|
1428
|
+
zodSqlSchema: z.ZodString;
|
|
1429
|
+
zodNewSchema: TNewNext;
|
|
1430
|
+
initialValue: TDefaultNext;
|
|
1431
|
+
zodClientSchema: TClientNext;
|
|
1432
|
+
zodValidationSchema: TClientNext;
|
|
1433
|
+
} & {
|
|
993
1434
|
transforms: {
|
|
994
1435
|
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
995
1436
|
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
@@ -998,55 +1439,83 @@ export declare const shape: {
|
|
|
998
1439
|
};
|
|
999
1440
|
};
|
|
1000
1441
|
transform: (transforms: {
|
|
1001
|
-
toClient: (dbValue: string) =>
|
|
1002
|
-
toDb: (clientValue:
|
|
1442
|
+
toClient: (dbValue: string) => z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>;
|
|
1443
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>) => string;
|
|
1003
1444
|
}) => {
|
|
1004
|
-
config:
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1445
|
+
config: {
|
|
1446
|
+
sql: {
|
|
1447
|
+
pk?: true;
|
|
1448
|
+
nullable?: boolean;
|
|
1449
|
+
default?: string;
|
|
1450
|
+
field?: string;
|
|
1451
|
+
type: "text";
|
|
1452
|
+
};
|
|
1453
|
+
zodSqlSchema: z.ZodString;
|
|
1454
|
+
zodNewSchema: TNewNext;
|
|
1455
|
+
initialValue: TDefaultNext;
|
|
1456
|
+
zodClientSchema: InferSmartClientType<z.ZodString, TNewNext>;
|
|
1457
|
+
zodValidationSchema: InferSmartClientType<z.ZodString, TNewNext>;
|
|
1458
|
+
} & {
|
|
1011
1459
|
transforms: {
|
|
1012
|
-
toClient: (dbValue: string) =>
|
|
1013
|
-
toDb: (clientValue:
|
|
1460
|
+
toClient: (dbValue: string) => z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>;
|
|
1461
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>) => string;
|
|
1014
1462
|
};
|
|
1015
1463
|
};
|
|
1016
1464
|
};
|
|
1017
1465
|
};
|
|
1018
1466
|
};
|
|
1019
1467
|
longtext: (config?: Omit<StringConfig, "type" | "length">) => {
|
|
1020
|
-
config:
|
|
1021
|
-
|
|
1022
|
-
nullable?: boolean;
|
|
1023
|
-
default?: string;
|
|
1024
|
-
field?: string;
|
|
1025
|
-
type: "longtext";
|
|
1026
|
-
}, z.ZodString, z.ZodString, undefined, z.ZodString, z.ZodString>;
|
|
1027
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1028
|
-
sql: z.ZodString;
|
|
1029
|
-
initialState: z.ZodString;
|
|
1030
|
-
client: z.ZodString;
|
|
1031
|
-
}) => TValidationNext)) => {
|
|
1032
|
-
config: BuilderConfig<{
|
|
1468
|
+
config: {
|
|
1469
|
+
sql: {
|
|
1033
1470
|
pk?: true;
|
|
1034
1471
|
nullable?: boolean;
|
|
1035
1472
|
default?: string;
|
|
1036
1473
|
field?: string;
|
|
1037
1474
|
type: "longtext";
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1475
|
+
};
|
|
1476
|
+
zodSqlSchema: z.ZodString;
|
|
1477
|
+
zodNewSchema: z.ZodString;
|
|
1478
|
+
initialValue: undefined;
|
|
1479
|
+
zodClientSchema: z.ZodString;
|
|
1480
|
+
zodValidationSchema: z.ZodString;
|
|
1481
|
+
};
|
|
1482
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1483
|
+
sql: z.ZodString;
|
|
1484
|
+
initialState: z.ZodString;
|
|
1485
|
+
client: z.ZodString;
|
|
1486
|
+
}) => TValidationNext)) => {
|
|
1487
|
+
config: {
|
|
1488
|
+
sql: {
|
|
1044
1489
|
pk?: true;
|
|
1045
1490
|
nullable?: boolean;
|
|
1046
1491
|
default?: string;
|
|
1047
1492
|
field?: string;
|
|
1048
1493
|
type: "longtext";
|
|
1049
|
-
}
|
|
1494
|
+
};
|
|
1495
|
+
zodSqlSchema: z.ZodString;
|
|
1496
|
+
zodNewSchema: z.ZodString;
|
|
1497
|
+
initialValue: undefined;
|
|
1498
|
+
zodClientSchema: z.ZodString;
|
|
1499
|
+
zodValidationSchema: TValidationNext;
|
|
1500
|
+
};
|
|
1501
|
+
transform: (transforms: {
|
|
1502
|
+
toClient: (dbValue: string) => string;
|
|
1503
|
+
toDb: (clientValue: string) => string;
|
|
1504
|
+
}) => {
|
|
1505
|
+
config: {
|
|
1506
|
+
sql: {
|
|
1507
|
+
pk?: true;
|
|
1508
|
+
nullable?: boolean;
|
|
1509
|
+
default?: string;
|
|
1510
|
+
field?: string;
|
|
1511
|
+
type: "longtext";
|
|
1512
|
+
};
|
|
1513
|
+
zodSqlSchema: z.ZodString;
|
|
1514
|
+
zodNewSchema: z.ZodString;
|
|
1515
|
+
initialValue: undefined;
|
|
1516
|
+
zodClientSchema: z.ZodString;
|
|
1517
|
+
zodValidationSchema: TValidationNext;
|
|
1518
|
+
} & {
|
|
1050
1519
|
transforms: {
|
|
1051
1520
|
toClient: (dbValue: string) => string;
|
|
1052
1521
|
toDb: (clientValue: string) => string;
|
|
@@ -1058,36 +1527,57 @@ export declare const shape: {
|
|
|
1058
1527
|
sql: z.ZodString;
|
|
1059
1528
|
initialState: z.ZodString;
|
|
1060
1529
|
}) => TClientNext)) => {
|
|
1061
|
-
config:
|
|
1062
|
-
|
|
1063
|
-
nullable?: boolean;
|
|
1064
|
-
default?: string;
|
|
1065
|
-
field?: string;
|
|
1066
|
-
type: "longtext";
|
|
1067
|
-
}, z.ZodString, z.ZodString, undefined, TClientNext, TClientNext>;
|
|
1068
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1069
|
-
sql: z.ZodString;
|
|
1070
|
-
initialState: z.ZodString;
|
|
1071
|
-
client: TClientNext;
|
|
1072
|
-
}) => TValidationNext)) => {
|
|
1073
|
-
config: BuilderConfig<{
|
|
1530
|
+
config: {
|
|
1531
|
+
sql: {
|
|
1074
1532
|
pk?: true;
|
|
1075
1533
|
nullable?: boolean;
|
|
1076
1534
|
default?: string;
|
|
1077
1535
|
field?: string;
|
|
1078
1536
|
type: "longtext";
|
|
1079
|
-
}
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1537
|
+
};
|
|
1538
|
+
zodSqlSchema: z.ZodString;
|
|
1539
|
+
zodNewSchema: z.ZodString;
|
|
1540
|
+
initialValue: undefined;
|
|
1541
|
+
zodClientSchema: TClientNext;
|
|
1542
|
+
zodValidationSchema: TClientNext;
|
|
1543
|
+
};
|
|
1544
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1545
|
+
sql: z.ZodString;
|
|
1546
|
+
initialState: z.ZodString;
|
|
1547
|
+
client: TClientNext;
|
|
1548
|
+
}) => TValidationNext)) => {
|
|
1549
|
+
config: {
|
|
1550
|
+
sql: {
|
|
1085
1551
|
pk?: true;
|
|
1086
1552
|
nullable?: boolean;
|
|
1087
1553
|
default?: string;
|
|
1088
1554
|
field?: string;
|
|
1089
1555
|
type: "longtext";
|
|
1090
|
-
}
|
|
1556
|
+
};
|
|
1557
|
+
zodSqlSchema: z.ZodString;
|
|
1558
|
+
zodNewSchema: z.ZodString;
|
|
1559
|
+
initialValue: undefined;
|
|
1560
|
+
zodClientSchema: TClientNext;
|
|
1561
|
+
zodValidationSchema: TValidationNext;
|
|
1562
|
+
};
|
|
1563
|
+
transform: (transforms: {
|
|
1564
|
+
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
1565
|
+
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
1566
|
+
}) => {
|
|
1567
|
+
config: {
|
|
1568
|
+
sql: {
|
|
1569
|
+
pk?: true;
|
|
1570
|
+
nullable?: boolean;
|
|
1571
|
+
default?: string;
|
|
1572
|
+
field?: string;
|
|
1573
|
+
type: "longtext";
|
|
1574
|
+
};
|
|
1575
|
+
zodSqlSchema: z.ZodString;
|
|
1576
|
+
zodNewSchema: z.ZodString;
|
|
1577
|
+
initialValue: undefined;
|
|
1578
|
+
zodClientSchema: TClientNext;
|
|
1579
|
+
zodValidationSchema: TValidationNext;
|
|
1580
|
+
} & {
|
|
1091
1581
|
transforms: {
|
|
1092
1582
|
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
1093
1583
|
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
@@ -1099,13 +1589,20 @@ export declare const shape: {
|
|
|
1099
1589
|
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
1100
1590
|
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
1101
1591
|
}) => {
|
|
1102
|
-
config:
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1592
|
+
config: {
|
|
1593
|
+
sql: {
|
|
1594
|
+
pk?: true;
|
|
1595
|
+
nullable?: boolean;
|
|
1596
|
+
default?: string;
|
|
1597
|
+
field?: string;
|
|
1598
|
+
type: "longtext";
|
|
1599
|
+
};
|
|
1600
|
+
zodSqlSchema: z.ZodString;
|
|
1601
|
+
zodNewSchema: z.ZodString;
|
|
1602
|
+
initialValue: undefined;
|
|
1603
|
+
zodClientSchema: TClientNext;
|
|
1604
|
+
zodValidationSchema: TClientNext;
|
|
1605
|
+
} & {
|
|
1109
1606
|
transforms: {
|
|
1110
1607
|
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
1111
1608
|
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
@@ -1117,13 +1614,20 @@ export declare const shape: {
|
|
|
1117
1614
|
toClient: (dbValue: string) => string;
|
|
1118
1615
|
toDb: (clientValue: string) => string;
|
|
1119
1616
|
}) => {
|
|
1120
|
-
config:
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1617
|
+
config: {
|
|
1618
|
+
sql: {
|
|
1619
|
+
pk?: true;
|
|
1620
|
+
nullable?: boolean;
|
|
1621
|
+
default?: string;
|
|
1622
|
+
field?: string;
|
|
1623
|
+
type: "longtext";
|
|
1624
|
+
};
|
|
1625
|
+
zodSqlSchema: z.ZodString;
|
|
1626
|
+
zodNewSchema: z.ZodString;
|
|
1627
|
+
initialValue: undefined;
|
|
1628
|
+
zodClientSchema: z.ZodString;
|
|
1629
|
+
zodValidationSchema: z.ZodString;
|
|
1630
|
+
} & {
|
|
1127
1631
|
transforms: {
|
|
1128
1632
|
toClient: (dbValue: string) => string;
|
|
1129
1633
|
toDb: (clientValue: string) => string;
|
|
@@ -1133,39 +1637,60 @@ export declare const shape: {
|
|
|
1133
1637
|
initialState: <TNewNext extends z.ZodTypeAny, TDefaultNext>(schema: TNewNext | ((tools: {
|
|
1134
1638
|
sql: z.ZodString;
|
|
1135
1639
|
}) => TNewNext), defaultValue: () => TDefaultNext) => {
|
|
1136
|
-
config:
|
|
1137
|
-
|
|
1138
|
-
nullable?: boolean;
|
|
1139
|
-
default?: string;
|
|
1140
|
-
field?: string;
|
|
1141
|
-
type: "longtext";
|
|
1142
|
-
}, z.ZodString, TNewNext, TDefaultNext, z.ZodString, z.ZodString>;
|
|
1143
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1144
|
-
sql: z.ZodString;
|
|
1145
|
-
initialState: TNewNext;
|
|
1146
|
-
client: z.ZodString;
|
|
1147
|
-
}) => TValidationNext)) => {
|
|
1148
|
-
config: BuilderConfig<{
|
|
1640
|
+
config: {
|
|
1641
|
+
sql: {
|
|
1149
1642
|
pk?: true;
|
|
1150
1643
|
nullable?: boolean;
|
|
1151
1644
|
default?: string;
|
|
1152
1645
|
field?: string;
|
|
1153
1646
|
type: "longtext";
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1647
|
+
};
|
|
1648
|
+
zodSqlSchema: z.ZodString;
|
|
1649
|
+
zodNewSchema: TNewNext;
|
|
1650
|
+
initialValue: TDefaultNext;
|
|
1651
|
+
zodClientSchema: InferSmartClientType<z.ZodString, TNewNext>;
|
|
1652
|
+
zodValidationSchema: InferSmartClientType<z.ZodString, TNewNext>;
|
|
1653
|
+
};
|
|
1654
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1655
|
+
sql: z.ZodString;
|
|
1656
|
+
initialState: TNewNext;
|
|
1657
|
+
client: InferSmartClientType<z.ZodString, TNewNext>;
|
|
1658
|
+
}) => TValidationNext)) => {
|
|
1659
|
+
config: {
|
|
1660
|
+
sql: {
|
|
1160
1661
|
pk?: true;
|
|
1161
1662
|
nullable?: boolean;
|
|
1162
1663
|
default?: string;
|
|
1163
1664
|
field?: string;
|
|
1164
1665
|
type: "longtext";
|
|
1165
|
-
}
|
|
1666
|
+
};
|
|
1667
|
+
zodSqlSchema: z.ZodString;
|
|
1668
|
+
zodNewSchema: TNewNext;
|
|
1669
|
+
initialValue: TDefaultNext;
|
|
1670
|
+
zodClientSchema: InferSmartClientType<z.ZodString, TNewNext>;
|
|
1671
|
+
zodValidationSchema: TValidationNext;
|
|
1672
|
+
};
|
|
1673
|
+
transform: (transforms: {
|
|
1674
|
+
toClient: (dbValue: string) => z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>;
|
|
1675
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>) => string;
|
|
1676
|
+
}) => {
|
|
1677
|
+
config: {
|
|
1678
|
+
sql: {
|
|
1679
|
+
pk?: true;
|
|
1680
|
+
nullable?: boolean;
|
|
1681
|
+
default?: string;
|
|
1682
|
+
field?: string;
|
|
1683
|
+
type: "longtext";
|
|
1684
|
+
};
|
|
1685
|
+
zodSqlSchema: z.ZodString;
|
|
1686
|
+
zodNewSchema: TNewNext;
|
|
1687
|
+
initialValue: TDefaultNext;
|
|
1688
|
+
zodClientSchema: InferSmartClientType<z.ZodString, TNewNext>;
|
|
1689
|
+
zodValidationSchema: TValidationNext;
|
|
1690
|
+
} & {
|
|
1166
1691
|
transforms: {
|
|
1167
|
-
toClient: (dbValue: string) =>
|
|
1168
|
-
toDb: (clientValue:
|
|
1692
|
+
toClient: (dbValue: string) => z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>;
|
|
1693
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>) => string;
|
|
1169
1694
|
};
|
|
1170
1695
|
};
|
|
1171
1696
|
};
|
|
@@ -1174,36 +1699,57 @@ export declare const shape: {
|
|
|
1174
1699
|
sql: z.ZodString;
|
|
1175
1700
|
initialState: TNewNext;
|
|
1176
1701
|
}) => TClientNext)) => {
|
|
1177
|
-
config:
|
|
1178
|
-
|
|
1179
|
-
nullable?: boolean;
|
|
1180
|
-
default?: string;
|
|
1181
|
-
field?: string;
|
|
1182
|
-
type: "longtext";
|
|
1183
|
-
}, z.ZodString, TNewNext, TDefaultNext, TClientNext, TClientNext>;
|
|
1184
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1185
|
-
sql: z.ZodString;
|
|
1186
|
-
initialState: TNewNext;
|
|
1187
|
-
client: TClientNext;
|
|
1188
|
-
}) => TValidationNext)) => {
|
|
1189
|
-
config: BuilderConfig<{
|
|
1702
|
+
config: {
|
|
1703
|
+
sql: {
|
|
1190
1704
|
pk?: true;
|
|
1191
1705
|
nullable?: boolean;
|
|
1192
1706
|
default?: string;
|
|
1193
1707
|
field?: string;
|
|
1194
1708
|
type: "longtext";
|
|
1195
|
-
}
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1709
|
+
};
|
|
1710
|
+
zodSqlSchema: z.ZodString;
|
|
1711
|
+
zodNewSchema: TNewNext;
|
|
1712
|
+
initialValue: TDefaultNext;
|
|
1713
|
+
zodClientSchema: TClientNext;
|
|
1714
|
+
zodValidationSchema: TClientNext;
|
|
1715
|
+
};
|
|
1716
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1717
|
+
sql: z.ZodString;
|
|
1718
|
+
initialState: TNewNext;
|
|
1719
|
+
client: TClientNext;
|
|
1720
|
+
}) => TValidationNext)) => {
|
|
1721
|
+
config: {
|
|
1722
|
+
sql: {
|
|
1201
1723
|
pk?: true;
|
|
1202
1724
|
nullable?: boolean;
|
|
1203
1725
|
default?: string;
|
|
1204
1726
|
field?: string;
|
|
1205
1727
|
type: "longtext";
|
|
1206
|
-
}
|
|
1728
|
+
};
|
|
1729
|
+
zodSqlSchema: z.ZodString;
|
|
1730
|
+
zodNewSchema: TNewNext;
|
|
1731
|
+
initialValue: TDefaultNext;
|
|
1732
|
+
zodClientSchema: TClientNext;
|
|
1733
|
+
zodValidationSchema: TValidationNext;
|
|
1734
|
+
};
|
|
1735
|
+
transform: (transforms: {
|
|
1736
|
+
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
1737
|
+
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
1738
|
+
}) => {
|
|
1739
|
+
config: {
|
|
1740
|
+
sql: {
|
|
1741
|
+
pk?: true;
|
|
1742
|
+
nullable?: boolean;
|
|
1743
|
+
default?: string;
|
|
1744
|
+
field?: string;
|
|
1745
|
+
type: "longtext";
|
|
1746
|
+
};
|
|
1747
|
+
zodSqlSchema: z.ZodString;
|
|
1748
|
+
zodNewSchema: TNewNext;
|
|
1749
|
+
initialValue: TDefaultNext;
|
|
1750
|
+
zodClientSchema: TClientNext;
|
|
1751
|
+
zodValidationSchema: TValidationNext;
|
|
1752
|
+
} & {
|
|
1207
1753
|
transforms: {
|
|
1208
1754
|
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
1209
1755
|
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
@@ -1215,13 +1761,20 @@ export declare const shape: {
|
|
|
1215
1761
|
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
1216
1762
|
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
1217
1763
|
}) => {
|
|
1218
|
-
config:
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1764
|
+
config: {
|
|
1765
|
+
sql: {
|
|
1766
|
+
pk?: true;
|
|
1767
|
+
nullable?: boolean;
|
|
1768
|
+
default?: string;
|
|
1769
|
+
field?: string;
|
|
1770
|
+
type: "longtext";
|
|
1771
|
+
};
|
|
1772
|
+
zodSqlSchema: z.ZodString;
|
|
1773
|
+
zodNewSchema: TNewNext;
|
|
1774
|
+
initialValue: TDefaultNext;
|
|
1775
|
+
zodClientSchema: TClientNext;
|
|
1776
|
+
zodValidationSchema: TClientNext;
|
|
1777
|
+
} & {
|
|
1225
1778
|
transforms: {
|
|
1226
1779
|
toClient: (dbValue: string) => z.TypeOf<TClientNext>;
|
|
1227
1780
|
toDb: (clientValue: z.TypeOf<TClientNext>) => string;
|
|
@@ -1230,55 +1783,83 @@ export declare const shape: {
|
|
|
1230
1783
|
};
|
|
1231
1784
|
};
|
|
1232
1785
|
transform: (transforms: {
|
|
1233
|
-
toClient: (dbValue: string) =>
|
|
1234
|
-
toDb: (clientValue:
|
|
1786
|
+
toClient: (dbValue: string) => z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>;
|
|
1787
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>) => string;
|
|
1235
1788
|
}) => {
|
|
1236
|
-
config:
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1789
|
+
config: {
|
|
1790
|
+
sql: {
|
|
1791
|
+
pk?: true;
|
|
1792
|
+
nullable?: boolean;
|
|
1793
|
+
default?: string;
|
|
1794
|
+
field?: string;
|
|
1795
|
+
type: "longtext";
|
|
1796
|
+
};
|
|
1797
|
+
zodSqlSchema: z.ZodString;
|
|
1798
|
+
zodNewSchema: TNewNext;
|
|
1799
|
+
initialValue: TDefaultNext;
|
|
1800
|
+
zodClientSchema: InferSmartClientType<z.ZodString, TNewNext>;
|
|
1801
|
+
zodValidationSchema: InferSmartClientType<z.ZodString, TNewNext>;
|
|
1802
|
+
} & {
|
|
1243
1803
|
transforms: {
|
|
1244
|
-
toClient: (dbValue: string) =>
|
|
1245
|
-
toDb: (clientValue:
|
|
1804
|
+
toClient: (dbValue: string) => z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>;
|
|
1805
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>) => string;
|
|
1246
1806
|
};
|
|
1247
1807
|
};
|
|
1248
1808
|
};
|
|
1249
1809
|
};
|
|
1250
1810
|
};
|
|
1251
1811
|
boolean: (config?: BooleanConfig) => {
|
|
1252
|
-
config:
|
|
1253
|
-
|
|
1254
|
-
pk?: true;
|
|
1255
|
-
field?: string;
|
|
1256
|
-
default?: boolean;
|
|
1257
|
-
type: "boolean";
|
|
1258
|
-
}, z.ZodBoolean, z.ZodBoolean, undefined, z.ZodBoolean, z.ZodBoolean>;
|
|
1259
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1260
|
-
sql: z.ZodBoolean;
|
|
1261
|
-
initialState: z.ZodBoolean;
|
|
1262
|
-
client: z.ZodBoolean;
|
|
1263
|
-
}) => TValidationNext)) => {
|
|
1264
|
-
config: BuilderConfig<{
|
|
1812
|
+
config: {
|
|
1813
|
+
sql: {
|
|
1265
1814
|
nullable?: boolean;
|
|
1266
1815
|
pk?: true;
|
|
1267
1816
|
field?: string;
|
|
1268
1817
|
default?: boolean;
|
|
1269
1818
|
type: "boolean";
|
|
1270
|
-
}
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1819
|
+
};
|
|
1820
|
+
zodSqlSchema: z.ZodBoolean;
|
|
1821
|
+
zodNewSchema: z.ZodBoolean;
|
|
1822
|
+
initialValue: undefined;
|
|
1823
|
+
zodClientSchema: z.ZodBoolean;
|
|
1824
|
+
zodValidationSchema: z.ZodBoolean;
|
|
1825
|
+
};
|
|
1826
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1827
|
+
sql: z.ZodBoolean;
|
|
1828
|
+
initialState: z.ZodBoolean;
|
|
1829
|
+
client: z.ZodBoolean;
|
|
1830
|
+
}) => TValidationNext)) => {
|
|
1831
|
+
config: {
|
|
1832
|
+
sql: {
|
|
1276
1833
|
nullable?: boolean;
|
|
1277
1834
|
pk?: true;
|
|
1278
1835
|
field?: string;
|
|
1279
1836
|
default?: boolean;
|
|
1280
1837
|
type: "boolean";
|
|
1281
|
-
}
|
|
1838
|
+
};
|
|
1839
|
+
zodSqlSchema: z.ZodBoolean;
|
|
1840
|
+
zodNewSchema: z.ZodBoolean;
|
|
1841
|
+
initialValue: undefined;
|
|
1842
|
+
zodClientSchema: z.ZodBoolean;
|
|
1843
|
+
zodValidationSchema: TValidationNext;
|
|
1844
|
+
};
|
|
1845
|
+
transform: (transforms: {
|
|
1846
|
+
toClient: (dbValue: boolean) => boolean;
|
|
1847
|
+
toDb: (clientValue: boolean) => boolean;
|
|
1848
|
+
}) => {
|
|
1849
|
+
config: {
|
|
1850
|
+
sql: {
|
|
1851
|
+
nullable?: boolean;
|
|
1852
|
+
pk?: true;
|
|
1853
|
+
field?: string;
|
|
1854
|
+
default?: boolean;
|
|
1855
|
+
type: "boolean";
|
|
1856
|
+
};
|
|
1857
|
+
zodSqlSchema: z.ZodBoolean;
|
|
1858
|
+
zodNewSchema: z.ZodBoolean;
|
|
1859
|
+
initialValue: undefined;
|
|
1860
|
+
zodClientSchema: z.ZodBoolean;
|
|
1861
|
+
zodValidationSchema: TValidationNext;
|
|
1862
|
+
} & {
|
|
1282
1863
|
transforms: {
|
|
1283
1864
|
toClient: (dbValue: boolean) => boolean;
|
|
1284
1865
|
toDb: (clientValue: boolean) => boolean;
|
|
@@ -1290,36 +1871,57 @@ export declare const shape: {
|
|
|
1290
1871
|
sql: z.ZodBoolean;
|
|
1291
1872
|
initialState: z.ZodBoolean;
|
|
1292
1873
|
}) => TClientNext)) => {
|
|
1293
|
-
config:
|
|
1294
|
-
|
|
1295
|
-
pk?: true;
|
|
1296
|
-
field?: string;
|
|
1297
|
-
default?: boolean;
|
|
1298
|
-
type: "boolean";
|
|
1299
|
-
}, z.ZodBoolean, z.ZodBoolean, undefined, TClientNext, TClientNext>;
|
|
1300
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1301
|
-
sql: z.ZodBoolean;
|
|
1302
|
-
initialState: z.ZodBoolean;
|
|
1303
|
-
client: TClientNext;
|
|
1304
|
-
}) => TValidationNext)) => {
|
|
1305
|
-
config: BuilderConfig<{
|
|
1874
|
+
config: {
|
|
1875
|
+
sql: {
|
|
1306
1876
|
nullable?: boolean;
|
|
1307
1877
|
pk?: true;
|
|
1308
1878
|
field?: string;
|
|
1309
1879
|
default?: boolean;
|
|
1310
1880
|
type: "boolean";
|
|
1311
|
-
}
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1881
|
+
};
|
|
1882
|
+
zodSqlSchema: z.ZodBoolean;
|
|
1883
|
+
zodNewSchema: z.ZodBoolean;
|
|
1884
|
+
initialValue: undefined;
|
|
1885
|
+
zodClientSchema: TClientNext;
|
|
1886
|
+
zodValidationSchema: TClientNext;
|
|
1887
|
+
};
|
|
1888
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1889
|
+
sql: z.ZodBoolean;
|
|
1890
|
+
initialState: z.ZodBoolean;
|
|
1891
|
+
client: TClientNext;
|
|
1892
|
+
}) => TValidationNext)) => {
|
|
1893
|
+
config: {
|
|
1894
|
+
sql: {
|
|
1317
1895
|
nullable?: boolean;
|
|
1318
1896
|
pk?: true;
|
|
1319
1897
|
field?: string;
|
|
1320
1898
|
default?: boolean;
|
|
1321
1899
|
type: "boolean";
|
|
1322
|
-
}
|
|
1900
|
+
};
|
|
1901
|
+
zodSqlSchema: z.ZodBoolean;
|
|
1902
|
+
zodNewSchema: z.ZodBoolean;
|
|
1903
|
+
initialValue: undefined;
|
|
1904
|
+
zodClientSchema: TClientNext;
|
|
1905
|
+
zodValidationSchema: TValidationNext;
|
|
1906
|
+
};
|
|
1907
|
+
transform: (transforms: {
|
|
1908
|
+
toClient: (dbValue: boolean) => z.TypeOf<TClientNext>;
|
|
1909
|
+
toDb: (clientValue: z.TypeOf<TClientNext>) => boolean;
|
|
1910
|
+
}) => {
|
|
1911
|
+
config: {
|
|
1912
|
+
sql: {
|
|
1913
|
+
nullable?: boolean;
|
|
1914
|
+
pk?: true;
|
|
1915
|
+
field?: string;
|
|
1916
|
+
default?: boolean;
|
|
1917
|
+
type: "boolean";
|
|
1918
|
+
};
|
|
1919
|
+
zodSqlSchema: z.ZodBoolean;
|
|
1920
|
+
zodNewSchema: z.ZodBoolean;
|
|
1921
|
+
initialValue: undefined;
|
|
1922
|
+
zodClientSchema: TClientNext;
|
|
1923
|
+
zodValidationSchema: TValidationNext;
|
|
1924
|
+
} & {
|
|
1323
1925
|
transforms: {
|
|
1324
1926
|
toClient: (dbValue: boolean) => z.TypeOf<TClientNext>;
|
|
1325
1927
|
toDb: (clientValue: z.TypeOf<TClientNext>) => boolean;
|
|
@@ -1331,13 +1933,20 @@ export declare const shape: {
|
|
|
1331
1933
|
toClient: (dbValue: boolean) => z.TypeOf<TClientNext>;
|
|
1332
1934
|
toDb: (clientValue: z.TypeOf<TClientNext>) => boolean;
|
|
1333
1935
|
}) => {
|
|
1334
|
-
config:
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1936
|
+
config: {
|
|
1937
|
+
sql: {
|
|
1938
|
+
nullable?: boolean;
|
|
1939
|
+
pk?: true;
|
|
1940
|
+
field?: string;
|
|
1941
|
+
default?: boolean;
|
|
1942
|
+
type: "boolean";
|
|
1943
|
+
};
|
|
1944
|
+
zodSqlSchema: z.ZodBoolean;
|
|
1945
|
+
zodNewSchema: z.ZodBoolean;
|
|
1946
|
+
initialValue: undefined;
|
|
1947
|
+
zodClientSchema: TClientNext;
|
|
1948
|
+
zodValidationSchema: TClientNext;
|
|
1949
|
+
} & {
|
|
1341
1950
|
transforms: {
|
|
1342
1951
|
toClient: (dbValue: boolean) => z.TypeOf<TClientNext>;
|
|
1343
1952
|
toDb: (clientValue: z.TypeOf<TClientNext>) => boolean;
|
|
@@ -1349,13 +1958,20 @@ export declare const shape: {
|
|
|
1349
1958
|
toClient: (dbValue: boolean) => boolean;
|
|
1350
1959
|
toDb: (clientValue: boolean) => boolean;
|
|
1351
1960
|
}) => {
|
|
1352
|
-
config:
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1961
|
+
config: {
|
|
1962
|
+
sql: {
|
|
1963
|
+
nullable?: boolean;
|
|
1964
|
+
pk?: true;
|
|
1965
|
+
field?: string;
|
|
1966
|
+
default?: boolean;
|
|
1967
|
+
type: "boolean";
|
|
1968
|
+
};
|
|
1969
|
+
zodSqlSchema: z.ZodBoolean;
|
|
1970
|
+
zodNewSchema: z.ZodBoolean;
|
|
1971
|
+
initialValue: undefined;
|
|
1972
|
+
zodClientSchema: z.ZodBoolean;
|
|
1973
|
+
zodValidationSchema: z.ZodBoolean;
|
|
1974
|
+
} & {
|
|
1359
1975
|
transforms: {
|
|
1360
1976
|
toClient: (dbValue: boolean) => boolean;
|
|
1361
1977
|
toDb: (clientValue: boolean) => boolean;
|
|
@@ -1365,39 +1981,60 @@ export declare const shape: {
|
|
|
1365
1981
|
initialState: <TNewNext extends z.ZodTypeAny, TDefaultNext>(schema: TNewNext | ((tools: {
|
|
1366
1982
|
sql: z.ZodBoolean;
|
|
1367
1983
|
}) => TNewNext), defaultValue: () => TDefaultNext) => {
|
|
1368
|
-
config:
|
|
1369
|
-
|
|
1370
|
-
pk?: true;
|
|
1371
|
-
field?: string;
|
|
1372
|
-
default?: boolean;
|
|
1373
|
-
type: "boolean";
|
|
1374
|
-
}, z.ZodBoolean, TNewNext, TDefaultNext, z.ZodBoolean, z.ZodBoolean>;
|
|
1375
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1376
|
-
sql: z.ZodBoolean;
|
|
1377
|
-
initialState: TNewNext;
|
|
1378
|
-
client: z.ZodBoolean;
|
|
1379
|
-
}) => TValidationNext)) => {
|
|
1380
|
-
config: BuilderConfig<{
|
|
1984
|
+
config: {
|
|
1985
|
+
sql: {
|
|
1381
1986
|
nullable?: boolean;
|
|
1382
1987
|
pk?: true;
|
|
1383
1988
|
field?: string;
|
|
1384
1989
|
default?: boolean;
|
|
1385
1990
|
type: "boolean";
|
|
1386
|
-
}
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1991
|
+
};
|
|
1992
|
+
zodSqlSchema: z.ZodBoolean;
|
|
1993
|
+
zodNewSchema: TNewNext;
|
|
1994
|
+
initialValue: TDefaultNext;
|
|
1995
|
+
zodClientSchema: InferSmartClientType<z.ZodBoolean, TNewNext>;
|
|
1996
|
+
zodValidationSchema: InferSmartClientType<z.ZodBoolean, TNewNext>;
|
|
1997
|
+
};
|
|
1998
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1999
|
+
sql: z.ZodBoolean;
|
|
2000
|
+
initialState: TNewNext;
|
|
2001
|
+
client: InferSmartClientType<z.ZodBoolean, TNewNext>;
|
|
2002
|
+
}) => TValidationNext)) => {
|
|
2003
|
+
config: {
|
|
2004
|
+
sql: {
|
|
1392
2005
|
nullable?: boolean;
|
|
1393
2006
|
pk?: true;
|
|
1394
2007
|
field?: string;
|
|
1395
2008
|
default?: boolean;
|
|
1396
2009
|
type: "boolean";
|
|
1397
|
-
}
|
|
2010
|
+
};
|
|
2011
|
+
zodSqlSchema: z.ZodBoolean;
|
|
2012
|
+
zodNewSchema: TNewNext;
|
|
2013
|
+
initialValue: TDefaultNext;
|
|
2014
|
+
zodClientSchema: InferSmartClientType<z.ZodBoolean, TNewNext>;
|
|
2015
|
+
zodValidationSchema: TValidationNext;
|
|
2016
|
+
};
|
|
2017
|
+
transform: (transforms: {
|
|
2018
|
+
toClient: (dbValue: boolean) => z.TypeOf<InferSmartClientType<z.ZodBoolean, TNewNext>>;
|
|
2019
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodBoolean, TNewNext>>) => boolean;
|
|
2020
|
+
}) => {
|
|
2021
|
+
config: {
|
|
2022
|
+
sql: {
|
|
2023
|
+
nullable?: boolean;
|
|
2024
|
+
pk?: true;
|
|
2025
|
+
field?: string;
|
|
2026
|
+
default?: boolean;
|
|
2027
|
+
type: "boolean";
|
|
2028
|
+
};
|
|
2029
|
+
zodSqlSchema: z.ZodBoolean;
|
|
2030
|
+
zodNewSchema: TNewNext;
|
|
2031
|
+
initialValue: TDefaultNext;
|
|
2032
|
+
zodClientSchema: InferSmartClientType<z.ZodBoolean, TNewNext>;
|
|
2033
|
+
zodValidationSchema: TValidationNext;
|
|
2034
|
+
} & {
|
|
1398
2035
|
transforms: {
|
|
1399
|
-
toClient: (dbValue: boolean) =>
|
|
1400
|
-
toDb: (clientValue:
|
|
2036
|
+
toClient: (dbValue: boolean) => z.TypeOf<InferSmartClientType<z.ZodBoolean, TNewNext>>;
|
|
2037
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodBoolean, TNewNext>>) => boolean;
|
|
1401
2038
|
};
|
|
1402
2039
|
};
|
|
1403
2040
|
};
|
|
@@ -1406,36 +2043,57 @@ export declare const shape: {
|
|
|
1406
2043
|
sql: z.ZodBoolean;
|
|
1407
2044
|
initialState: TNewNext;
|
|
1408
2045
|
}) => TClientNext)) => {
|
|
1409
|
-
config:
|
|
1410
|
-
|
|
1411
|
-
pk?: true;
|
|
1412
|
-
field?: string;
|
|
1413
|
-
default?: boolean;
|
|
1414
|
-
type: "boolean";
|
|
1415
|
-
}, z.ZodBoolean, TNewNext, TDefaultNext, TClientNext, TClientNext>;
|
|
1416
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1417
|
-
sql: z.ZodBoolean;
|
|
1418
|
-
initialState: TNewNext;
|
|
1419
|
-
client: TClientNext;
|
|
1420
|
-
}) => TValidationNext)) => {
|
|
1421
|
-
config: BuilderConfig<{
|
|
2046
|
+
config: {
|
|
2047
|
+
sql: {
|
|
1422
2048
|
nullable?: boolean;
|
|
1423
2049
|
pk?: true;
|
|
1424
2050
|
field?: string;
|
|
1425
2051
|
default?: boolean;
|
|
1426
2052
|
type: "boolean";
|
|
1427
|
-
}
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
2053
|
+
};
|
|
2054
|
+
zodSqlSchema: z.ZodBoolean;
|
|
2055
|
+
zodNewSchema: TNewNext;
|
|
2056
|
+
initialValue: TDefaultNext;
|
|
2057
|
+
zodClientSchema: TClientNext;
|
|
2058
|
+
zodValidationSchema: TClientNext;
|
|
2059
|
+
};
|
|
2060
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
2061
|
+
sql: z.ZodBoolean;
|
|
2062
|
+
initialState: TNewNext;
|
|
2063
|
+
client: TClientNext;
|
|
2064
|
+
}) => TValidationNext)) => {
|
|
2065
|
+
config: {
|
|
2066
|
+
sql: {
|
|
1433
2067
|
nullable?: boolean;
|
|
1434
2068
|
pk?: true;
|
|
1435
2069
|
field?: string;
|
|
1436
2070
|
default?: boolean;
|
|
1437
2071
|
type: "boolean";
|
|
1438
|
-
}
|
|
2072
|
+
};
|
|
2073
|
+
zodSqlSchema: z.ZodBoolean;
|
|
2074
|
+
zodNewSchema: TNewNext;
|
|
2075
|
+
initialValue: TDefaultNext;
|
|
2076
|
+
zodClientSchema: TClientNext;
|
|
2077
|
+
zodValidationSchema: TValidationNext;
|
|
2078
|
+
};
|
|
2079
|
+
transform: (transforms: {
|
|
2080
|
+
toClient: (dbValue: boolean) => z.TypeOf<TClientNext>;
|
|
2081
|
+
toDb: (clientValue: z.TypeOf<TClientNext>) => boolean;
|
|
2082
|
+
}) => {
|
|
2083
|
+
config: {
|
|
2084
|
+
sql: {
|
|
2085
|
+
nullable?: boolean;
|
|
2086
|
+
pk?: true;
|
|
2087
|
+
field?: string;
|
|
2088
|
+
default?: boolean;
|
|
2089
|
+
type: "boolean";
|
|
2090
|
+
};
|
|
2091
|
+
zodSqlSchema: z.ZodBoolean;
|
|
2092
|
+
zodNewSchema: TNewNext;
|
|
2093
|
+
initialValue: TDefaultNext;
|
|
2094
|
+
zodClientSchema: TClientNext;
|
|
2095
|
+
zodValidationSchema: TValidationNext;
|
|
2096
|
+
} & {
|
|
1439
2097
|
transforms: {
|
|
1440
2098
|
toClient: (dbValue: boolean) => z.TypeOf<TClientNext>;
|
|
1441
2099
|
toDb: (clientValue: z.TypeOf<TClientNext>) => boolean;
|
|
@@ -1447,13 +2105,20 @@ export declare const shape: {
|
|
|
1447
2105
|
toClient: (dbValue: boolean) => z.TypeOf<TClientNext>;
|
|
1448
2106
|
toDb: (clientValue: z.TypeOf<TClientNext>) => boolean;
|
|
1449
2107
|
}) => {
|
|
1450
|
-
config:
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
2108
|
+
config: {
|
|
2109
|
+
sql: {
|
|
2110
|
+
nullable?: boolean;
|
|
2111
|
+
pk?: true;
|
|
2112
|
+
field?: string;
|
|
2113
|
+
default?: boolean;
|
|
2114
|
+
type: "boolean";
|
|
2115
|
+
};
|
|
2116
|
+
zodSqlSchema: z.ZodBoolean;
|
|
2117
|
+
zodNewSchema: TNewNext;
|
|
2118
|
+
initialValue: TDefaultNext;
|
|
2119
|
+
zodClientSchema: TClientNext;
|
|
2120
|
+
zodValidationSchema: TClientNext;
|
|
2121
|
+
} & {
|
|
1457
2122
|
transforms: {
|
|
1458
2123
|
toClient: (dbValue: boolean) => z.TypeOf<TClientNext>;
|
|
1459
2124
|
toDb: (clientValue: z.TypeOf<TClientNext>) => boolean;
|
|
@@ -1462,55 +2127,83 @@ export declare const shape: {
|
|
|
1462
2127
|
};
|
|
1463
2128
|
};
|
|
1464
2129
|
transform: (transforms: {
|
|
1465
|
-
toClient: (dbValue: boolean) =>
|
|
1466
|
-
toDb: (clientValue:
|
|
2130
|
+
toClient: (dbValue: boolean) => z.TypeOf<InferSmartClientType<z.ZodBoolean, TNewNext>>;
|
|
2131
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodBoolean, TNewNext>>) => boolean;
|
|
1467
2132
|
}) => {
|
|
1468
|
-
config:
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
2133
|
+
config: {
|
|
2134
|
+
sql: {
|
|
2135
|
+
nullable?: boolean;
|
|
2136
|
+
pk?: true;
|
|
2137
|
+
field?: string;
|
|
2138
|
+
default?: boolean;
|
|
2139
|
+
type: "boolean";
|
|
2140
|
+
};
|
|
2141
|
+
zodSqlSchema: z.ZodBoolean;
|
|
2142
|
+
zodNewSchema: TNewNext;
|
|
2143
|
+
initialValue: TDefaultNext;
|
|
2144
|
+
zodClientSchema: InferSmartClientType<z.ZodBoolean, TNewNext>;
|
|
2145
|
+
zodValidationSchema: InferSmartClientType<z.ZodBoolean, TNewNext>;
|
|
2146
|
+
} & {
|
|
1475
2147
|
transforms: {
|
|
1476
|
-
toClient: (dbValue: boolean) =>
|
|
1477
|
-
toDb: (clientValue:
|
|
2148
|
+
toClient: (dbValue: boolean) => z.TypeOf<InferSmartClientType<z.ZodBoolean, TNewNext>>;
|
|
2149
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodBoolean, TNewNext>>) => boolean;
|
|
1478
2150
|
};
|
|
1479
2151
|
};
|
|
1480
2152
|
};
|
|
1481
2153
|
};
|
|
1482
2154
|
};
|
|
1483
2155
|
date: (config?: Omit<DateConfig, "type">) => {
|
|
1484
|
-
config:
|
|
1485
|
-
|
|
1486
|
-
nullable?: boolean;
|
|
1487
|
-
default?: Date;
|
|
1488
|
-
field?: string;
|
|
1489
|
-
type: "date";
|
|
1490
|
-
}, z.ZodDate, z.ZodDate, undefined, z.ZodDate, z.ZodDate>;
|
|
1491
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1492
|
-
sql: z.ZodDate;
|
|
1493
|
-
initialState: z.ZodDate;
|
|
1494
|
-
client: z.ZodDate;
|
|
1495
|
-
}) => TValidationNext)) => {
|
|
1496
|
-
config: BuilderConfig<{
|
|
2156
|
+
config: {
|
|
2157
|
+
sql: {
|
|
1497
2158
|
pk?: true;
|
|
1498
2159
|
nullable?: boolean;
|
|
1499
2160
|
default?: Date;
|
|
1500
2161
|
field?: string;
|
|
1501
2162
|
type: "date";
|
|
1502
|
-
}
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
2163
|
+
};
|
|
2164
|
+
zodSqlSchema: z.ZodDate;
|
|
2165
|
+
zodNewSchema: z.ZodDate;
|
|
2166
|
+
initialValue: undefined;
|
|
2167
|
+
zodClientSchema: z.ZodDate;
|
|
2168
|
+
zodValidationSchema: z.ZodDate;
|
|
2169
|
+
};
|
|
2170
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
2171
|
+
sql: z.ZodDate;
|
|
2172
|
+
initialState: z.ZodDate;
|
|
2173
|
+
client: z.ZodDate;
|
|
2174
|
+
}) => TValidationNext)) => {
|
|
2175
|
+
config: {
|
|
2176
|
+
sql: {
|
|
1508
2177
|
pk?: true;
|
|
1509
2178
|
nullable?: boolean;
|
|
1510
2179
|
default?: Date;
|
|
1511
2180
|
field?: string;
|
|
1512
2181
|
type: "date";
|
|
1513
|
-
}
|
|
2182
|
+
};
|
|
2183
|
+
zodSqlSchema: z.ZodDate;
|
|
2184
|
+
zodNewSchema: z.ZodDate;
|
|
2185
|
+
initialValue: undefined;
|
|
2186
|
+
zodClientSchema: z.ZodDate;
|
|
2187
|
+
zodValidationSchema: TValidationNext;
|
|
2188
|
+
};
|
|
2189
|
+
transform: (transforms: {
|
|
2190
|
+
toClient: (dbValue: Date) => Date;
|
|
2191
|
+
toDb: (clientValue: Date) => Date;
|
|
2192
|
+
}) => {
|
|
2193
|
+
config: {
|
|
2194
|
+
sql: {
|
|
2195
|
+
pk?: true;
|
|
2196
|
+
nullable?: boolean;
|
|
2197
|
+
default?: Date;
|
|
2198
|
+
field?: string;
|
|
2199
|
+
type: "date";
|
|
2200
|
+
};
|
|
2201
|
+
zodSqlSchema: z.ZodDate;
|
|
2202
|
+
zodNewSchema: z.ZodDate;
|
|
2203
|
+
initialValue: undefined;
|
|
2204
|
+
zodClientSchema: z.ZodDate;
|
|
2205
|
+
zodValidationSchema: TValidationNext;
|
|
2206
|
+
} & {
|
|
1514
2207
|
transforms: {
|
|
1515
2208
|
toClient: (dbValue: Date) => Date;
|
|
1516
2209
|
toDb: (clientValue: Date) => Date;
|
|
@@ -1522,36 +2215,57 @@ export declare const shape: {
|
|
|
1522
2215
|
sql: z.ZodDate;
|
|
1523
2216
|
initialState: z.ZodDate;
|
|
1524
2217
|
}) => TClientNext)) => {
|
|
1525
|
-
config:
|
|
1526
|
-
|
|
1527
|
-
nullable?: boolean;
|
|
1528
|
-
default?: Date;
|
|
1529
|
-
field?: string;
|
|
1530
|
-
type: "date";
|
|
1531
|
-
}, z.ZodDate, z.ZodDate, undefined, TClientNext, TClientNext>;
|
|
1532
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1533
|
-
sql: z.ZodDate;
|
|
1534
|
-
initialState: z.ZodDate;
|
|
1535
|
-
client: TClientNext;
|
|
1536
|
-
}) => TValidationNext)) => {
|
|
1537
|
-
config: BuilderConfig<{
|
|
2218
|
+
config: {
|
|
2219
|
+
sql: {
|
|
1538
2220
|
pk?: true;
|
|
1539
2221
|
nullable?: boolean;
|
|
1540
2222
|
default?: Date;
|
|
1541
2223
|
field?: string;
|
|
1542
2224
|
type: "date";
|
|
1543
|
-
}
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
2225
|
+
};
|
|
2226
|
+
zodSqlSchema: z.ZodDate;
|
|
2227
|
+
zodNewSchema: z.ZodDate;
|
|
2228
|
+
initialValue: undefined;
|
|
2229
|
+
zodClientSchema: TClientNext;
|
|
2230
|
+
zodValidationSchema: TClientNext;
|
|
2231
|
+
};
|
|
2232
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
2233
|
+
sql: z.ZodDate;
|
|
2234
|
+
initialState: z.ZodDate;
|
|
2235
|
+
client: TClientNext;
|
|
2236
|
+
}) => TValidationNext)) => {
|
|
2237
|
+
config: {
|
|
2238
|
+
sql: {
|
|
1549
2239
|
pk?: true;
|
|
1550
2240
|
nullable?: boolean;
|
|
1551
2241
|
default?: Date;
|
|
1552
2242
|
field?: string;
|
|
1553
2243
|
type: "date";
|
|
1554
|
-
}
|
|
2244
|
+
};
|
|
2245
|
+
zodSqlSchema: z.ZodDate;
|
|
2246
|
+
zodNewSchema: z.ZodDate;
|
|
2247
|
+
initialValue: undefined;
|
|
2248
|
+
zodClientSchema: TClientNext;
|
|
2249
|
+
zodValidationSchema: TValidationNext;
|
|
2250
|
+
};
|
|
2251
|
+
transform: (transforms: {
|
|
2252
|
+
toClient: (dbValue: Date) => z.TypeOf<TClientNext>;
|
|
2253
|
+
toDb: (clientValue: z.TypeOf<TClientNext>) => Date;
|
|
2254
|
+
}) => {
|
|
2255
|
+
config: {
|
|
2256
|
+
sql: {
|
|
2257
|
+
pk?: true;
|
|
2258
|
+
nullable?: boolean;
|
|
2259
|
+
default?: Date;
|
|
2260
|
+
field?: string;
|
|
2261
|
+
type: "date";
|
|
2262
|
+
};
|
|
2263
|
+
zodSqlSchema: z.ZodDate;
|
|
2264
|
+
zodNewSchema: z.ZodDate;
|
|
2265
|
+
initialValue: undefined;
|
|
2266
|
+
zodClientSchema: TClientNext;
|
|
2267
|
+
zodValidationSchema: TValidationNext;
|
|
2268
|
+
} & {
|
|
1555
2269
|
transforms: {
|
|
1556
2270
|
toClient: (dbValue: Date) => z.TypeOf<TClientNext>;
|
|
1557
2271
|
toDb: (clientValue: z.TypeOf<TClientNext>) => Date;
|
|
@@ -1563,13 +2277,20 @@ export declare const shape: {
|
|
|
1563
2277
|
toClient: (dbValue: Date) => z.TypeOf<TClientNext>;
|
|
1564
2278
|
toDb: (clientValue: z.TypeOf<TClientNext>) => Date;
|
|
1565
2279
|
}) => {
|
|
1566
|
-
config:
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
2280
|
+
config: {
|
|
2281
|
+
sql: {
|
|
2282
|
+
pk?: true;
|
|
2283
|
+
nullable?: boolean;
|
|
2284
|
+
default?: Date;
|
|
2285
|
+
field?: string;
|
|
2286
|
+
type: "date";
|
|
2287
|
+
};
|
|
2288
|
+
zodSqlSchema: z.ZodDate;
|
|
2289
|
+
zodNewSchema: z.ZodDate;
|
|
2290
|
+
initialValue: undefined;
|
|
2291
|
+
zodClientSchema: TClientNext;
|
|
2292
|
+
zodValidationSchema: TClientNext;
|
|
2293
|
+
} & {
|
|
1573
2294
|
transforms: {
|
|
1574
2295
|
toClient: (dbValue: Date) => z.TypeOf<TClientNext>;
|
|
1575
2296
|
toDb: (clientValue: z.TypeOf<TClientNext>) => Date;
|
|
@@ -1581,13 +2302,20 @@ export declare const shape: {
|
|
|
1581
2302
|
toClient: (dbValue: Date) => Date;
|
|
1582
2303
|
toDb: (clientValue: Date) => Date;
|
|
1583
2304
|
}) => {
|
|
1584
|
-
config:
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
2305
|
+
config: {
|
|
2306
|
+
sql: {
|
|
2307
|
+
pk?: true;
|
|
2308
|
+
nullable?: boolean;
|
|
2309
|
+
default?: Date;
|
|
2310
|
+
field?: string;
|
|
2311
|
+
type: "date";
|
|
2312
|
+
};
|
|
2313
|
+
zodSqlSchema: z.ZodDate;
|
|
2314
|
+
zodNewSchema: z.ZodDate;
|
|
2315
|
+
initialValue: undefined;
|
|
2316
|
+
zodClientSchema: z.ZodDate;
|
|
2317
|
+
zodValidationSchema: z.ZodDate;
|
|
2318
|
+
} & {
|
|
1591
2319
|
transforms: {
|
|
1592
2320
|
toClient: (dbValue: Date) => Date;
|
|
1593
2321
|
toDb: (clientValue: Date) => Date;
|
|
@@ -1597,39 +2325,60 @@ export declare const shape: {
|
|
|
1597
2325
|
initialState: <TNewNext extends z.ZodTypeAny, TDefaultNext>(schema: TNewNext | ((tools: {
|
|
1598
2326
|
sql: z.ZodDate;
|
|
1599
2327
|
}) => TNewNext), defaultValue: () => TDefaultNext) => {
|
|
1600
|
-
config:
|
|
1601
|
-
|
|
1602
|
-
nullable?: boolean;
|
|
1603
|
-
default?: Date;
|
|
1604
|
-
field?: string;
|
|
1605
|
-
type: "date";
|
|
1606
|
-
}, z.ZodDate, TNewNext, TDefaultNext, z.ZodDate, z.ZodDate>;
|
|
1607
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1608
|
-
sql: z.ZodDate;
|
|
1609
|
-
initialState: TNewNext;
|
|
1610
|
-
client: z.ZodDate;
|
|
1611
|
-
}) => TValidationNext)) => {
|
|
1612
|
-
config: BuilderConfig<{
|
|
2328
|
+
config: {
|
|
2329
|
+
sql: {
|
|
1613
2330
|
pk?: true;
|
|
1614
2331
|
nullable?: boolean;
|
|
1615
2332
|
default?: Date;
|
|
1616
2333
|
field?: string;
|
|
1617
2334
|
type: "date";
|
|
1618
|
-
}
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
2335
|
+
};
|
|
2336
|
+
zodSqlSchema: z.ZodDate;
|
|
2337
|
+
zodNewSchema: TNewNext;
|
|
2338
|
+
initialValue: TDefaultNext;
|
|
2339
|
+
zodClientSchema: InferSmartClientType<z.ZodDate, TNewNext>;
|
|
2340
|
+
zodValidationSchema: InferSmartClientType<z.ZodDate, TNewNext>;
|
|
2341
|
+
};
|
|
2342
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
2343
|
+
sql: z.ZodDate;
|
|
2344
|
+
initialState: TNewNext;
|
|
2345
|
+
client: InferSmartClientType<z.ZodDate, TNewNext>;
|
|
2346
|
+
}) => TValidationNext)) => {
|
|
2347
|
+
config: {
|
|
2348
|
+
sql: {
|
|
1624
2349
|
pk?: true;
|
|
1625
2350
|
nullable?: boolean;
|
|
1626
2351
|
default?: Date;
|
|
1627
2352
|
field?: string;
|
|
1628
2353
|
type: "date";
|
|
1629
|
-
}
|
|
2354
|
+
};
|
|
2355
|
+
zodSqlSchema: z.ZodDate;
|
|
2356
|
+
zodNewSchema: TNewNext;
|
|
2357
|
+
initialValue: TDefaultNext;
|
|
2358
|
+
zodClientSchema: InferSmartClientType<z.ZodDate, TNewNext>;
|
|
2359
|
+
zodValidationSchema: TValidationNext;
|
|
2360
|
+
};
|
|
2361
|
+
transform: (transforms: {
|
|
2362
|
+
toClient: (dbValue: Date) => z.TypeOf<InferSmartClientType<z.ZodDate, TNewNext>>;
|
|
2363
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodDate, TNewNext>>) => Date;
|
|
2364
|
+
}) => {
|
|
2365
|
+
config: {
|
|
2366
|
+
sql: {
|
|
2367
|
+
pk?: true;
|
|
2368
|
+
nullable?: boolean;
|
|
2369
|
+
default?: Date;
|
|
2370
|
+
field?: string;
|
|
2371
|
+
type: "date";
|
|
2372
|
+
};
|
|
2373
|
+
zodSqlSchema: z.ZodDate;
|
|
2374
|
+
zodNewSchema: TNewNext;
|
|
2375
|
+
initialValue: TDefaultNext;
|
|
2376
|
+
zodClientSchema: InferSmartClientType<z.ZodDate, TNewNext>;
|
|
2377
|
+
zodValidationSchema: TValidationNext;
|
|
2378
|
+
} & {
|
|
1630
2379
|
transforms: {
|
|
1631
|
-
toClient: (dbValue: Date) =>
|
|
1632
|
-
toDb: (clientValue:
|
|
2380
|
+
toClient: (dbValue: Date) => z.TypeOf<InferSmartClientType<z.ZodDate, TNewNext>>;
|
|
2381
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodDate, TNewNext>>) => Date;
|
|
1633
2382
|
};
|
|
1634
2383
|
};
|
|
1635
2384
|
};
|
|
@@ -1638,36 +2387,57 @@ export declare const shape: {
|
|
|
1638
2387
|
sql: z.ZodDate;
|
|
1639
2388
|
initialState: TNewNext;
|
|
1640
2389
|
}) => TClientNext)) => {
|
|
1641
|
-
config:
|
|
1642
|
-
|
|
1643
|
-
nullable?: boolean;
|
|
1644
|
-
default?: Date;
|
|
1645
|
-
field?: string;
|
|
1646
|
-
type: "date";
|
|
1647
|
-
}, z.ZodDate, TNewNext, TDefaultNext, TClientNext, TClientNext>;
|
|
1648
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1649
|
-
sql: z.ZodDate;
|
|
1650
|
-
initialState: TNewNext;
|
|
1651
|
-
client: TClientNext;
|
|
1652
|
-
}) => TValidationNext)) => {
|
|
1653
|
-
config: BuilderConfig<{
|
|
2390
|
+
config: {
|
|
2391
|
+
sql: {
|
|
1654
2392
|
pk?: true;
|
|
1655
2393
|
nullable?: boolean;
|
|
1656
2394
|
default?: Date;
|
|
1657
2395
|
field?: string;
|
|
1658
2396
|
type: "date";
|
|
1659
|
-
}
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
2397
|
+
};
|
|
2398
|
+
zodSqlSchema: z.ZodDate;
|
|
2399
|
+
zodNewSchema: TNewNext;
|
|
2400
|
+
initialValue: TDefaultNext;
|
|
2401
|
+
zodClientSchema: TClientNext;
|
|
2402
|
+
zodValidationSchema: TClientNext;
|
|
2403
|
+
};
|
|
2404
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
2405
|
+
sql: z.ZodDate;
|
|
2406
|
+
initialState: TNewNext;
|
|
2407
|
+
client: TClientNext;
|
|
2408
|
+
}) => TValidationNext)) => {
|
|
2409
|
+
config: {
|
|
2410
|
+
sql: {
|
|
1665
2411
|
pk?: true;
|
|
1666
2412
|
nullable?: boolean;
|
|
1667
2413
|
default?: Date;
|
|
1668
2414
|
field?: string;
|
|
1669
2415
|
type: "date";
|
|
1670
|
-
}
|
|
2416
|
+
};
|
|
2417
|
+
zodSqlSchema: z.ZodDate;
|
|
2418
|
+
zodNewSchema: TNewNext;
|
|
2419
|
+
initialValue: TDefaultNext;
|
|
2420
|
+
zodClientSchema: TClientNext;
|
|
2421
|
+
zodValidationSchema: TValidationNext;
|
|
2422
|
+
};
|
|
2423
|
+
transform: (transforms: {
|
|
2424
|
+
toClient: (dbValue: Date) => z.TypeOf<TClientNext>;
|
|
2425
|
+
toDb: (clientValue: z.TypeOf<TClientNext>) => Date;
|
|
2426
|
+
}) => {
|
|
2427
|
+
config: {
|
|
2428
|
+
sql: {
|
|
2429
|
+
pk?: true;
|
|
2430
|
+
nullable?: boolean;
|
|
2431
|
+
default?: Date;
|
|
2432
|
+
field?: string;
|
|
2433
|
+
type: "date";
|
|
2434
|
+
};
|
|
2435
|
+
zodSqlSchema: z.ZodDate;
|
|
2436
|
+
zodNewSchema: TNewNext;
|
|
2437
|
+
initialValue: TDefaultNext;
|
|
2438
|
+
zodClientSchema: TClientNext;
|
|
2439
|
+
zodValidationSchema: TValidationNext;
|
|
2440
|
+
} & {
|
|
1671
2441
|
transforms: {
|
|
1672
2442
|
toClient: (dbValue: Date) => z.TypeOf<TClientNext>;
|
|
1673
2443
|
toDb: (clientValue: z.TypeOf<TClientNext>) => Date;
|
|
@@ -1679,13 +2449,20 @@ export declare const shape: {
|
|
|
1679
2449
|
toClient: (dbValue: Date) => z.TypeOf<TClientNext>;
|
|
1680
2450
|
toDb: (clientValue: z.TypeOf<TClientNext>) => Date;
|
|
1681
2451
|
}) => {
|
|
1682
|
-
config:
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
2452
|
+
config: {
|
|
2453
|
+
sql: {
|
|
2454
|
+
pk?: true;
|
|
2455
|
+
nullable?: boolean;
|
|
2456
|
+
default?: Date;
|
|
2457
|
+
field?: string;
|
|
2458
|
+
type: "date";
|
|
2459
|
+
};
|
|
2460
|
+
zodSqlSchema: z.ZodDate;
|
|
2461
|
+
zodNewSchema: TNewNext;
|
|
2462
|
+
initialValue: TDefaultNext;
|
|
2463
|
+
zodClientSchema: TClientNext;
|
|
2464
|
+
zodValidationSchema: TClientNext;
|
|
2465
|
+
} & {
|
|
1689
2466
|
transforms: {
|
|
1690
2467
|
toClient: (dbValue: Date) => z.TypeOf<TClientNext>;
|
|
1691
2468
|
toDb: (clientValue: z.TypeOf<TClientNext>) => Date;
|
|
@@ -1694,55 +2471,83 @@ export declare const shape: {
|
|
|
1694
2471
|
};
|
|
1695
2472
|
};
|
|
1696
2473
|
transform: (transforms: {
|
|
1697
|
-
toClient: (dbValue: Date) =>
|
|
1698
|
-
toDb: (clientValue:
|
|
2474
|
+
toClient: (dbValue: Date) => z.TypeOf<InferSmartClientType<z.ZodDate, TNewNext>>;
|
|
2475
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodDate, TNewNext>>) => Date;
|
|
1699
2476
|
}) => {
|
|
1700
|
-
config:
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
2477
|
+
config: {
|
|
2478
|
+
sql: {
|
|
2479
|
+
pk?: true;
|
|
2480
|
+
nullable?: boolean;
|
|
2481
|
+
default?: Date;
|
|
2482
|
+
field?: string;
|
|
2483
|
+
type: "date";
|
|
2484
|
+
};
|
|
2485
|
+
zodSqlSchema: z.ZodDate;
|
|
2486
|
+
zodNewSchema: TNewNext;
|
|
2487
|
+
initialValue: TDefaultNext;
|
|
2488
|
+
zodClientSchema: InferSmartClientType<z.ZodDate, TNewNext>;
|
|
2489
|
+
zodValidationSchema: InferSmartClientType<z.ZodDate, TNewNext>;
|
|
2490
|
+
} & {
|
|
1707
2491
|
transforms: {
|
|
1708
|
-
toClient: (dbValue: Date) =>
|
|
1709
|
-
toDb: (clientValue:
|
|
2492
|
+
toClient: (dbValue: Date) => z.TypeOf<InferSmartClientType<z.ZodDate, TNewNext>>;
|
|
2493
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodDate, TNewNext>>) => Date;
|
|
1710
2494
|
};
|
|
1711
2495
|
};
|
|
1712
2496
|
};
|
|
1713
2497
|
};
|
|
1714
2498
|
};
|
|
1715
2499
|
datetime: (config?: Omit<DateConfig, "type">) => {
|
|
1716
|
-
config:
|
|
1717
|
-
|
|
1718
|
-
nullable?: boolean;
|
|
1719
|
-
default?: Date;
|
|
1720
|
-
field?: string;
|
|
1721
|
-
type: "datetime";
|
|
1722
|
-
}, z.ZodDate, z.ZodDate, undefined, z.ZodDate, z.ZodDate>;
|
|
1723
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1724
|
-
sql: z.ZodDate;
|
|
1725
|
-
initialState: z.ZodDate;
|
|
1726
|
-
client: z.ZodDate;
|
|
1727
|
-
}) => TValidationNext)) => {
|
|
1728
|
-
config: BuilderConfig<{
|
|
2500
|
+
config: {
|
|
2501
|
+
sql: {
|
|
1729
2502
|
pk?: true;
|
|
1730
2503
|
nullable?: boolean;
|
|
1731
2504
|
default?: Date;
|
|
1732
2505
|
field?: string;
|
|
1733
2506
|
type: "datetime";
|
|
1734
|
-
}
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
2507
|
+
};
|
|
2508
|
+
zodSqlSchema: z.ZodDate;
|
|
2509
|
+
zodNewSchema: z.ZodDate;
|
|
2510
|
+
initialValue: undefined;
|
|
2511
|
+
zodClientSchema: z.ZodDate;
|
|
2512
|
+
zodValidationSchema: z.ZodDate;
|
|
2513
|
+
};
|
|
2514
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
2515
|
+
sql: z.ZodDate;
|
|
2516
|
+
initialState: z.ZodDate;
|
|
2517
|
+
client: z.ZodDate;
|
|
2518
|
+
}) => TValidationNext)) => {
|
|
2519
|
+
config: {
|
|
2520
|
+
sql: {
|
|
1740
2521
|
pk?: true;
|
|
1741
2522
|
nullable?: boolean;
|
|
1742
2523
|
default?: Date;
|
|
1743
2524
|
field?: string;
|
|
1744
2525
|
type: "datetime";
|
|
1745
|
-
}
|
|
2526
|
+
};
|
|
2527
|
+
zodSqlSchema: z.ZodDate;
|
|
2528
|
+
zodNewSchema: z.ZodDate;
|
|
2529
|
+
initialValue: undefined;
|
|
2530
|
+
zodClientSchema: z.ZodDate;
|
|
2531
|
+
zodValidationSchema: TValidationNext;
|
|
2532
|
+
};
|
|
2533
|
+
transform: (transforms: {
|
|
2534
|
+
toClient: (dbValue: Date) => Date;
|
|
2535
|
+
toDb: (clientValue: Date) => Date;
|
|
2536
|
+
}) => {
|
|
2537
|
+
config: {
|
|
2538
|
+
sql: {
|
|
2539
|
+
pk?: true;
|
|
2540
|
+
nullable?: boolean;
|
|
2541
|
+
default?: Date;
|
|
2542
|
+
field?: string;
|
|
2543
|
+
type: "datetime";
|
|
2544
|
+
};
|
|
2545
|
+
zodSqlSchema: z.ZodDate;
|
|
2546
|
+
zodNewSchema: z.ZodDate;
|
|
2547
|
+
initialValue: undefined;
|
|
2548
|
+
zodClientSchema: z.ZodDate;
|
|
2549
|
+
zodValidationSchema: TValidationNext;
|
|
2550
|
+
} & {
|
|
1746
2551
|
transforms: {
|
|
1747
2552
|
toClient: (dbValue: Date) => Date;
|
|
1748
2553
|
toDb: (clientValue: Date) => Date;
|
|
@@ -1754,36 +2559,57 @@ export declare const shape: {
|
|
|
1754
2559
|
sql: z.ZodDate;
|
|
1755
2560
|
initialState: z.ZodDate;
|
|
1756
2561
|
}) => TClientNext)) => {
|
|
1757
|
-
config:
|
|
1758
|
-
|
|
1759
|
-
nullable?: boolean;
|
|
1760
|
-
default?: Date;
|
|
1761
|
-
field?: string;
|
|
1762
|
-
type: "datetime";
|
|
1763
|
-
}, z.ZodDate, z.ZodDate, undefined, TClientNext, TClientNext>;
|
|
1764
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1765
|
-
sql: z.ZodDate;
|
|
1766
|
-
initialState: z.ZodDate;
|
|
1767
|
-
client: TClientNext;
|
|
1768
|
-
}) => TValidationNext)) => {
|
|
1769
|
-
config: BuilderConfig<{
|
|
2562
|
+
config: {
|
|
2563
|
+
sql: {
|
|
1770
2564
|
pk?: true;
|
|
1771
2565
|
nullable?: boolean;
|
|
1772
2566
|
default?: Date;
|
|
1773
2567
|
field?: string;
|
|
1774
2568
|
type: "datetime";
|
|
1775
|
-
}
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
2569
|
+
};
|
|
2570
|
+
zodSqlSchema: z.ZodDate;
|
|
2571
|
+
zodNewSchema: z.ZodDate;
|
|
2572
|
+
initialValue: undefined;
|
|
2573
|
+
zodClientSchema: TClientNext;
|
|
2574
|
+
zodValidationSchema: TClientNext;
|
|
2575
|
+
};
|
|
2576
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
2577
|
+
sql: z.ZodDate;
|
|
2578
|
+
initialState: z.ZodDate;
|
|
2579
|
+
client: TClientNext;
|
|
2580
|
+
}) => TValidationNext)) => {
|
|
2581
|
+
config: {
|
|
2582
|
+
sql: {
|
|
1781
2583
|
pk?: true;
|
|
1782
2584
|
nullable?: boolean;
|
|
1783
2585
|
default?: Date;
|
|
1784
2586
|
field?: string;
|
|
1785
2587
|
type: "datetime";
|
|
1786
|
-
}
|
|
2588
|
+
};
|
|
2589
|
+
zodSqlSchema: z.ZodDate;
|
|
2590
|
+
zodNewSchema: z.ZodDate;
|
|
2591
|
+
initialValue: undefined;
|
|
2592
|
+
zodClientSchema: TClientNext;
|
|
2593
|
+
zodValidationSchema: TValidationNext;
|
|
2594
|
+
};
|
|
2595
|
+
transform: (transforms: {
|
|
2596
|
+
toClient: (dbValue: Date) => z.TypeOf<TClientNext>;
|
|
2597
|
+
toDb: (clientValue: z.TypeOf<TClientNext>) => Date;
|
|
2598
|
+
}) => {
|
|
2599
|
+
config: {
|
|
2600
|
+
sql: {
|
|
2601
|
+
pk?: true;
|
|
2602
|
+
nullable?: boolean;
|
|
2603
|
+
default?: Date;
|
|
2604
|
+
field?: string;
|
|
2605
|
+
type: "datetime";
|
|
2606
|
+
};
|
|
2607
|
+
zodSqlSchema: z.ZodDate;
|
|
2608
|
+
zodNewSchema: z.ZodDate;
|
|
2609
|
+
initialValue: undefined;
|
|
2610
|
+
zodClientSchema: TClientNext;
|
|
2611
|
+
zodValidationSchema: TValidationNext;
|
|
2612
|
+
} & {
|
|
1787
2613
|
transforms: {
|
|
1788
2614
|
toClient: (dbValue: Date) => z.TypeOf<TClientNext>;
|
|
1789
2615
|
toDb: (clientValue: z.TypeOf<TClientNext>) => Date;
|
|
@@ -1795,13 +2621,20 @@ export declare const shape: {
|
|
|
1795
2621
|
toClient: (dbValue: Date) => z.TypeOf<TClientNext>;
|
|
1796
2622
|
toDb: (clientValue: z.TypeOf<TClientNext>) => Date;
|
|
1797
2623
|
}) => {
|
|
1798
|
-
config:
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
2624
|
+
config: {
|
|
2625
|
+
sql: {
|
|
2626
|
+
pk?: true;
|
|
2627
|
+
nullable?: boolean;
|
|
2628
|
+
default?: Date;
|
|
2629
|
+
field?: string;
|
|
2630
|
+
type: "datetime";
|
|
2631
|
+
};
|
|
2632
|
+
zodSqlSchema: z.ZodDate;
|
|
2633
|
+
zodNewSchema: z.ZodDate;
|
|
2634
|
+
initialValue: undefined;
|
|
2635
|
+
zodClientSchema: TClientNext;
|
|
2636
|
+
zodValidationSchema: TClientNext;
|
|
2637
|
+
} & {
|
|
1805
2638
|
transforms: {
|
|
1806
2639
|
toClient: (dbValue: Date) => z.TypeOf<TClientNext>;
|
|
1807
2640
|
toDb: (clientValue: z.TypeOf<TClientNext>) => Date;
|
|
@@ -1813,13 +2646,20 @@ export declare const shape: {
|
|
|
1813
2646
|
toClient: (dbValue: Date) => Date;
|
|
1814
2647
|
toDb: (clientValue: Date) => Date;
|
|
1815
2648
|
}) => {
|
|
1816
|
-
config:
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
2649
|
+
config: {
|
|
2650
|
+
sql: {
|
|
2651
|
+
pk?: true;
|
|
2652
|
+
nullable?: boolean;
|
|
2653
|
+
default?: Date;
|
|
2654
|
+
field?: string;
|
|
2655
|
+
type: "datetime";
|
|
2656
|
+
};
|
|
2657
|
+
zodSqlSchema: z.ZodDate;
|
|
2658
|
+
zodNewSchema: z.ZodDate;
|
|
2659
|
+
initialValue: undefined;
|
|
2660
|
+
zodClientSchema: z.ZodDate;
|
|
2661
|
+
zodValidationSchema: z.ZodDate;
|
|
2662
|
+
} & {
|
|
1823
2663
|
transforms: {
|
|
1824
2664
|
toClient: (dbValue: Date) => Date;
|
|
1825
2665
|
toDb: (clientValue: Date) => Date;
|
|
@@ -1829,39 +2669,60 @@ export declare const shape: {
|
|
|
1829
2669
|
initialState: <TNewNext extends z.ZodTypeAny, TDefaultNext>(schema: TNewNext | ((tools: {
|
|
1830
2670
|
sql: z.ZodDate;
|
|
1831
2671
|
}) => TNewNext), defaultValue: () => TDefaultNext) => {
|
|
1832
|
-
config:
|
|
1833
|
-
|
|
1834
|
-
nullable?: boolean;
|
|
1835
|
-
default?: Date;
|
|
1836
|
-
field?: string;
|
|
1837
|
-
type: "datetime";
|
|
1838
|
-
}, z.ZodDate, TNewNext, TDefaultNext, z.ZodDate, z.ZodDate>;
|
|
1839
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1840
|
-
sql: z.ZodDate;
|
|
1841
|
-
initialState: TNewNext;
|
|
1842
|
-
client: z.ZodDate;
|
|
1843
|
-
}) => TValidationNext)) => {
|
|
1844
|
-
config: BuilderConfig<{
|
|
2672
|
+
config: {
|
|
2673
|
+
sql: {
|
|
1845
2674
|
pk?: true;
|
|
1846
2675
|
nullable?: boolean;
|
|
1847
2676
|
default?: Date;
|
|
1848
2677
|
field?: string;
|
|
1849
2678
|
type: "datetime";
|
|
1850
|
-
}
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
2679
|
+
};
|
|
2680
|
+
zodSqlSchema: z.ZodDate;
|
|
2681
|
+
zodNewSchema: TNewNext;
|
|
2682
|
+
initialValue: TDefaultNext;
|
|
2683
|
+
zodClientSchema: InferSmartClientType<z.ZodDate, TNewNext>;
|
|
2684
|
+
zodValidationSchema: InferSmartClientType<z.ZodDate, TNewNext>;
|
|
2685
|
+
};
|
|
2686
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
2687
|
+
sql: z.ZodDate;
|
|
2688
|
+
initialState: TNewNext;
|
|
2689
|
+
client: InferSmartClientType<z.ZodDate, TNewNext>;
|
|
2690
|
+
}) => TValidationNext)) => {
|
|
2691
|
+
config: {
|
|
2692
|
+
sql: {
|
|
1856
2693
|
pk?: true;
|
|
1857
2694
|
nullable?: boolean;
|
|
1858
2695
|
default?: Date;
|
|
1859
2696
|
field?: string;
|
|
1860
2697
|
type: "datetime";
|
|
1861
|
-
}
|
|
2698
|
+
};
|
|
2699
|
+
zodSqlSchema: z.ZodDate;
|
|
2700
|
+
zodNewSchema: TNewNext;
|
|
2701
|
+
initialValue: TDefaultNext;
|
|
2702
|
+
zodClientSchema: InferSmartClientType<z.ZodDate, TNewNext>;
|
|
2703
|
+
zodValidationSchema: TValidationNext;
|
|
2704
|
+
};
|
|
2705
|
+
transform: (transforms: {
|
|
2706
|
+
toClient: (dbValue: Date) => z.TypeOf<InferSmartClientType<z.ZodDate, TNewNext>>;
|
|
2707
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodDate, TNewNext>>) => Date;
|
|
2708
|
+
}) => {
|
|
2709
|
+
config: {
|
|
2710
|
+
sql: {
|
|
2711
|
+
pk?: true;
|
|
2712
|
+
nullable?: boolean;
|
|
2713
|
+
default?: Date;
|
|
2714
|
+
field?: string;
|
|
2715
|
+
type: "datetime";
|
|
2716
|
+
};
|
|
2717
|
+
zodSqlSchema: z.ZodDate;
|
|
2718
|
+
zodNewSchema: TNewNext;
|
|
2719
|
+
initialValue: TDefaultNext;
|
|
2720
|
+
zodClientSchema: InferSmartClientType<z.ZodDate, TNewNext>;
|
|
2721
|
+
zodValidationSchema: TValidationNext;
|
|
2722
|
+
} & {
|
|
1862
2723
|
transforms: {
|
|
1863
|
-
toClient: (dbValue: Date) =>
|
|
1864
|
-
toDb: (clientValue:
|
|
2724
|
+
toClient: (dbValue: Date) => z.TypeOf<InferSmartClientType<z.ZodDate, TNewNext>>;
|
|
2725
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodDate, TNewNext>>) => Date;
|
|
1865
2726
|
};
|
|
1866
2727
|
};
|
|
1867
2728
|
};
|
|
@@ -1870,36 +2731,57 @@ export declare const shape: {
|
|
|
1870
2731
|
sql: z.ZodDate;
|
|
1871
2732
|
initialState: TNewNext;
|
|
1872
2733
|
}) => TClientNext)) => {
|
|
1873
|
-
config:
|
|
1874
|
-
|
|
1875
|
-
nullable?: boolean;
|
|
1876
|
-
default?: Date;
|
|
1877
|
-
field?: string;
|
|
1878
|
-
type: "datetime";
|
|
1879
|
-
}, z.ZodDate, TNewNext, TDefaultNext, TClientNext, TClientNext>;
|
|
1880
|
-
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1881
|
-
sql: z.ZodDate;
|
|
1882
|
-
initialState: TNewNext;
|
|
1883
|
-
client: TClientNext;
|
|
1884
|
-
}) => TValidationNext)) => {
|
|
1885
|
-
config: BuilderConfig<{
|
|
2734
|
+
config: {
|
|
2735
|
+
sql: {
|
|
1886
2736
|
pk?: true;
|
|
1887
2737
|
nullable?: boolean;
|
|
1888
2738
|
default?: Date;
|
|
1889
2739
|
field?: string;
|
|
1890
2740
|
type: "datetime";
|
|
1891
|
-
}
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
2741
|
+
};
|
|
2742
|
+
zodSqlSchema: z.ZodDate;
|
|
2743
|
+
zodNewSchema: TNewNext;
|
|
2744
|
+
initialValue: TDefaultNext;
|
|
2745
|
+
zodClientSchema: TClientNext;
|
|
2746
|
+
zodValidationSchema: TClientNext;
|
|
2747
|
+
};
|
|
2748
|
+
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
2749
|
+
sql: z.ZodDate;
|
|
2750
|
+
initialState: TNewNext;
|
|
2751
|
+
client: TClientNext;
|
|
2752
|
+
}) => TValidationNext)) => {
|
|
2753
|
+
config: {
|
|
2754
|
+
sql: {
|
|
1897
2755
|
pk?: true;
|
|
1898
2756
|
nullable?: boolean;
|
|
1899
2757
|
default?: Date;
|
|
1900
2758
|
field?: string;
|
|
1901
2759
|
type: "datetime";
|
|
1902
|
-
}
|
|
2760
|
+
};
|
|
2761
|
+
zodSqlSchema: z.ZodDate;
|
|
2762
|
+
zodNewSchema: TNewNext;
|
|
2763
|
+
initialValue: TDefaultNext;
|
|
2764
|
+
zodClientSchema: TClientNext;
|
|
2765
|
+
zodValidationSchema: TValidationNext;
|
|
2766
|
+
};
|
|
2767
|
+
transform: (transforms: {
|
|
2768
|
+
toClient: (dbValue: Date) => z.TypeOf<TClientNext>;
|
|
2769
|
+
toDb: (clientValue: z.TypeOf<TClientNext>) => Date;
|
|
2770
|
+
}) => {
|
|
2771
|
+
config: {
|
|
2772
|
+
sql: {
|
|
2773
|
+
pk?: true;
|
|
2774
|
+
nullable?: boolean;
|
|
2775
|
+
default?: Date;
|
|
2776
|
+
field?: string;
|
|
2777
|
+
type: "datetime";
|
|
2778
|
+
};
|
|
2779
|
+
zodSqlSchema: z.ZodDate;
|
|
2780
|
+
zodNewSchema: TNewNext;
|
|
2781
|
+
initialValue: TDefaultNext;
|
|
2782
|
+
zodClientSchema: TClientNext;
|
|
2783
|
+
zodValidationSchema: TValidationNext;
|
|
2784
|
+
} & {
|
|
1903
2785
|
transforms: {
|
|
1904
2786
|
toClient: (dbValue: Date) => z.TypeOf<TClientNext>;
|
|
1905
2787
|
toDb: (clientValue: z.TypeOf<TClientNext>) => Date;
|
|
@@ -1911,13 +2793,20 @@ export declare const shape: {
|
|
|
1911
2793
|
toClient: (dbValue: Date) => z.TypeOf<TClientNext>;
|
|
1912
2794
|
toDb: (clientValue: z.TypeOf<TClientNext>) => Date;
|
|
1913
2795
|
}) => {
|
|
1914
|
-
config:
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
2796
|
+
config: {
|
|
2797
|
+
sql: {
|
|
2798
|
+
pk?: true;
|
|
2799
|
+
nullable?: boolean;
|
|
2800
|
+
default?: Date;
|
|
2801
|
+
field?: string;
|
|
2802
|
+
type: "datetime";
|
|
2803
|
+
};
|
|
2804
|
+
zodSqlSchema: z.ZodDate;
|
|
2805
|
+
zodNewSchema: TNewNext;
|
|
2806
|
+
initialValue: TDefaultNext;
|
|
2807
|
+
zodClientSchema: TClientNext;
|
|
2808
|
+
zodValidationSchema: TClientNext;
|
|
2809
|
+
} & {
|
|
1921
2810
|
transforms: {
|
|
1922
2811
|
toClient: (dbValue: Date) => z.TypeOf<TClientNext>;
|
|
1923
2812
|
toDb: (clientValue: z.TypeOf<TClientNext>) => Date;
|
|
@@ -1926,37 +2815,65 @@ export declare const shape: {
|
|
|
1926
2815
|
};
|
|
1927
2816
|
};
|
|
1928
2817
|
transform: (transforms: {
|
|
1929
|
-
toClient: (dbValue: Date) =>
|
|
1930
|
-
toDb: (clientValue:
|
|
2818
|
+
toClient: (dbValue: Date) => z.TypeOf<InferSmartClientType<z.ZodDate, TNewNext>>;
|
|
2819
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodDate, TNewNext>>) => Date;
|
|
1931
2820
|
}) => {
|
|
1932
|
-
config:
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
2821
|
+
config: {
|
|
2822
|
+
sql: {
|
|
2823
|
+
pk?: true;
|
|
2824
|
+
nullable?: boolean;
|
|
2825
|
+
default?: Date;
|
|
2826
|
+
field?: string;
|
|
2827
|
+
type: "datetime";
|
|
2828
|
+
};
|
|
2829
|
+
zodSqlSchema: z.ZodDate;
|
|
2830
|
+
zodNewSchema: TNewNext;
|
|
2831
|
+
initialValue: TDefaultNext;
|
|
2832
|
+
zodClientSchema: InferSmartClientType<z.ZodDate, TNewNext>;
|
|
2833
|
+
zodValidationSchema: InferSmartClientType<z.ZodDate, TNewNext>;
|
|
2834
|
+
} & {
|
|
1939
2835
|
transforms: {
|
|
1940
|
-
toClient: (dbValue: Date) =>
|
|
1941
|
-
toDb: (clientValue:
|
|
2836
|
+
toClient: (dbValue: Date) => z.TypeOf<InferSmartClientType<z.ZodDate, TNewNext>>;
|
|
2837
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodDate, TNewNext>>) => Date;
|
|
1942
2838
|
};
|
|
1943
2839
|
};
|
|
1944
2840
|
};
|
|
1945
2841
|
};
|
|
1946
2842
|
};
|
|
1947
2843
|
sql: <T extends SQLType>(sqlConfig: T) => {
|
|
1948
|
-
config:
|
|
2844
|
+
config: {
|
|
2845
|
+
sql: T;
|
|
2846
|
+
zodSqlSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2847
|
+
zodNewSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2848
|
+
initialValue: undefined;
|
|
2849
|
+
zodClientSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2850
|
+
zodValidationSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2851
|
+
};
|
|
1949
2852
|
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1950
2853
|
sql: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
1951
2854
|
initialState: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
1952
2855
|
client: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
1953
2856
|
}) => TValidationNext)) => {
|
|
1954
|
-
config:
|
|
2857
|
+
config: {
|
|
2858
|
+
sql: T;
|
|
2859
|
+
zodSqlSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2860
|
+
zodNewSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2861
|
+
initialValue: undefined;
|
|
2862
|
+
zodClientSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2863
|
+
zodValidationSchema: TValidationNext;
|
|
2864
|
+
};
|
|
1955
2865
|
transform: (transforms: {
|
|
1956
2866
|
toClient: (dbValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>) => z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
|
|
1957
2867
|
toDb: (clientValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>) => z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
|
|
1958
2868
|
}) => {
|
|
1959
|
-
config:
|
|
2869
|
+
config: {
|
|
2870
|
+
sql: T;
|
|
2871
|
+
zodSqlSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2872
|
+
zodNewSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2873
|
+
initialValue: undefined;
|
|
2874
|
+
zodClientSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2875
|
+
zodValidationSchema: TValidationNext;
|
|
2876
|
+
} & {
|
|
1960
2877
|
transforms: {
|
|
1961
2878
|
toClient: (dbValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>) => z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
|
|
1962
2879
|
toDb: (clientValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>) => z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
|
|
@@ -1968,18 +2885,39 @@ export declare const shape: {
|
|
|
1968
2885
|
sql: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
1969
2886
|
initialState: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
1970
2887
|
}) => TClientNext)) => {
|
|
1971
|
-
config:
|
|
2888
|
+
config: {
|
|
2889
|
+
sql: T;
|
|
2890
|
+
zodSqlSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2891
|
+
zodNewSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2892
|
+
initialValue: undefined;
|
|
2893
|
+
zodClientSchema: TClientNext;
|
|
2894
|
+
zodValidationSchema: TClientNext;
|
|
2895
|
+
};
|
|
1972
2896
|
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
1973
2897
|
sql: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
1974
2898
|
initialState: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
1975
2899
|
client: TClientNext;
|
|
1976
2900
|
}) => TValidationNext)) => {
|
|
1977
|
-
config:
|
|
2901
|
+
config: {
|
|
2902
|
+
sql: T;
|
|
2903
|
+
zodSqlSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2904
|
+
zodNewSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2905
|
+
initialValue: undefined;
|
|
2906
|
+
zodClientSchema: TClientNext;
|
|
2907
|
+
zodValidationSchema: TValidationNext;
|
|
2908
|
+
};
|
|
1978
2909
|
transform: (transforms: {
|
|
1979
2910
|
toClient: (dbValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>) => z.TypeOf<TClientNext>;
|
|
1980
2911
|
toDb: (clientValue: z.TypeOf<TClientNext>) => z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
|
|
1981
2912
|
}) => {
|
|
1982
|
-
config:
|
|
2913
|
+
config: {
|
|
2914
|
+
sql: T;
|
|
2915
|
+
zodSqlSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2916
|
+
zodNewSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2917
|
+
initialValue: undefined;
|
|
2918
|
+
zodClientSchema: TClientNext;
|
|
2919
|
+
zodValidationSchema: TValidationNext;
|
|
2920
|
+
} & {
|
|
1983
2921
|
transforms: {
|
|
1984
2922
|
toClient: (dbValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>) => z.TypeOf<TClientNext>;
|
|
1985
2923
|
toDb: (clientValue: z.TypeOf<TClientNext>) => z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
|
|
@@ -1991,7 +2929,14 @@ export declare const shape: {
|
|
|
1991
2929
|
toClient: (dbValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>) => z.TypeOf<TClientNext>;
|
|
1992
2930
|
toDb: (clientValue: z.TypeOf<TClientNext>) => z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
|
|
1993
2931
|
}) => {
|
|
1994
|
-
config:
|
|
2932
|
+
config: {
|
|
2933
|
+
sql: T;
|
|
2934
|
+
zodSqlSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2935
|
+
zodNewSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2936
|
+
initialValue: undefined;
|
|
2937
|
+
zodClientSchema: TClientNext;
|
|
2938
|
+
zodValidationSchema: TClientNext;
|
|
2939
|
+
} & {
|
|
1995
2940
|
transforms: {
|
|
1996
2941
|
toClient: (dbValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>) => z.TypeOf<TClientNext>;
|
|
1997
2942
|
toDb: (clientValue: z.TypeOf<TClientNext>) => z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
|
|
@@ -2003,7 +2948,14 @@ export declare const shape: {
|
|
|
2003
2948
|
toClient: (dbValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>) => z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
|
|
2004
2949
|
toDb: (clientValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>) => z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
|
|
2005
2950
|
}) => {
|
|
2006
|
-
config:
|
|
2951
|
+
config: {
|
|
2952
|
+
sql: T;
|
|
2953
|
+
zodSqlSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2954
|
+
zodNewSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2955
|
+
initialValue: undefined;
|
|
2956
|
+
zodClientSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2957
|
+
zodValidationSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2958
|
+
} & {
|
|
2007
2959
|
transforms: {
|
|
2008
2960
|
toClient: (dbValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>) => z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
|
|
2009
2961
|
toDb: (clientValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>) => z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
|
|
@@ -2013,21 +2965,42 @@ export declare const shape: {
|
|
|
2013
2965
|
initialState: <TNewNext extends z.ZodTypeAny, TDefaultNext>(schema: TNewNext | ((tools: {
|
|
2014
2966
|
sql: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2015
2967
|
}) => TNewNext), defaultValue: () => TDefaultNext) => {
|
|
2016
|
-
config:
|
|
2968
|
+
config: {
|
|
2969
|
+
sql: T;
|
|
2970
|
+
zodSqlSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2971
|
+
zodNewSchema: TNewNext;
|
|
2972
|
+
initialValue: TDefaultNext;
|
|
2973
|
+
zodClientSchema: InferSmartClientType<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, TNewNext>;
|
|
2974
|
+
zodValidationSchema: InferSmartClientType<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, TNewNext>;
|
|
2975
|
+
};
|
|
2017
2976
|
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
2018
2977
|
sql: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2019
2978
|
initialState: TNewNext;
|
|
2020
|
-
client: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never
|
|
2979
|
+
client: InferSmartClientType<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, TNewNext>;
|
|
2021
2980
|
}) => TValidationNext)) => {
|
|
2022
|
-
config:
|
|
2981
|
+
config: {
|
|
2982
|
+
sql: T;
|
|
2983
|
+
zodSqlSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2984
|
+
zodNewSchema: TNewNext;
|
|
2985
|
+
initialValue: TDefaultNext;
|
|
2986
|
+
zodClientSchema: InferSmartClientType<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, TNewNext>;
|
|
2987
|
+
zodValidationSchema: TValidationNext;
|
|
2988
|
+
};
|
|
2023
2989
|
transform: (transforms: {
|
|
2024
|
-
toClient: (dbValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>) => z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never
|
|
2025
|
-
toDb: (clientValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never
|
|
2990
|
+
toClient: (dbValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>) => z.TypeOf<InferSmartClientType<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, TNewNext>>;
|
|
2991
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, TNewNext>>) => z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
|
|
2026
2992
|
}) => {
|
|
2027
|
-
config:
|
|
2993
|
+
config: {
|
|
2994
|
+
sql: T;
|
|
2995
|
+
zodSqlSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2996
|
+
zodNewSchema: TNewNext;
|
|
2997
|
+
initialValue: TDefaultNext;
|
|
2998
|
+
zodClientSchema: InferSmartClientType<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, TNewNext>;
|
|
2999
|
+
zodValidationSchema: TValidationNext;
|
|
3000
|
+
} & {
|
|
2028
3001
|
transforms: {
|
|
2029
|
-
toClient: (dbValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>) => z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never
|
|
2030
|
-
toDb: (clientValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never
|
|
3002
|
+
toClient: (dbValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>) => z.TypeOf<InferSmartClientType<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, TNewNext>>;
|
|
3003
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, TNewNext>>) => z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
|
|
2031
3004
|
};
|
|
2032
3005
|
};
|
|
2033
3006
|
};
|
|
@@ -2036,18 +3009,39 @@ export declare const shape: {
|
|
|
2036
3009
|
sql: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2037
3010
|
initialState: TNewNext;
|
|
2038
3011
|
}) => TClientNext)) => {
|
|
2039
|
-
config:
|
|
3012
|
+
config: {
|
|
3013
|
+
sql: T;
|
|
3014
|
+
zodSqlSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
3015
|
+
zodNewSchema: TNewNext;
|
|
3016
|
+
initialValue: TDefaultNext;
|
|
3017
|
+
zodClientSchema: TClientNext;
|
|
3018
|
+
zodValidationSchema: TClientNext;
|
|
3019
|
+
};
|
|
2040
3020
|
validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
|
|
2041
3021
|
sql: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
2042
3022
|
initialState: TNewNext;
|
|
2043
3023
|
client: TClientNext;
|
|
2044
3024
|
}) => TValidationNext)) => {
|
|
2045
|
-
config:
|
|
3025
|
+
config: {
|
|
3026
|
+
sql: T;
|
|
3027
|
+
zodSqlSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
3028
|
+
zodNewSchema: TNewNext;
|
|
3029
|
+
initialValue: TDefaultNext;
|
|
3030
|
+
zodClientSchema: TClientNext;
|
|
3031
|
+
zodValidationSchema: TValidationNext;
|
|
3032
|
+
};
|
|
2046
3033
|
transform: (transforms: {
|
|
2047
3034
|
toClient: (dbValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>) => z.TypeOf<TClientNext>;
|
|
2048
3035
|
toDb: (clientValue: z.TypeOf<TClientNext>) => z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
|
|
2049
3036
|
}) => {
|
|
2050
|
-
config:
|
|
3037
|
+
config: {
|
|
3038
|
+
sql: T;
|
|
3039
|
+
zodSqlSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
3040
|
+
zodNewSchema: TNewNext;
|
|
3041
|
+
initialValue: TDefaultNext;
|
|
3042
|
+
zodClientSchema: TClientNext;
|
|
3043
|
+
zodValidationSchema: TValidationNext;
|
|
3044
|
+
} & {
|
|
2051
3045
|
transforms: {
|
|
2052
3046
|
toClient: (dbValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>) => z.TypeOf<TClientNext>;
|
|
2053
3047
|
toDb: (clientValue: z.TypeOf<TClientNext>) => z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
|
|
@@ -2059,7 +3053,14 @@ export declare const shape: {
|
|
|
2059
3053
|
toClient: (dbValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>) => z.TypeOf<TClientNext>;
|
|
2060
3054
|
toDb: (clientValue: z.TypeOf<TClientNext>) => z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
|
|
2061
3055
|
}) => {
|
|
2062
|
-
config:
|
|
3056
|
+
config: {
|
|
3057
|
+
sql: T;
|
|
3058
|
+
zodSqlSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
3059
|
+
zodNewSchema: TNewNext;
|
|
3060
|
+
initialValue: TDefaultNext;
|
|
3061
|
+
zodClientSchema: TClientNext;
|
|
3062
|
+
zodValidationSchema: TClientNext;
|
|
3063
|
+
} & {
|
|
2063
3064
|
transforms: {
|
|
2064
3065
|
toClient: (dbValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>) => z.TypeOf<TClientNext>;
|
|
2065
3066
|
toDb: (clientValue: z.TypeOf<TClientNext>) => z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
|
|
@@ -2068,13 +3069,20 @@ export declare const shape: {
|
|
|
2068
3069
|
};
|
|
2069
3070
|
};
|
|
2070
3071
|
transform: (transforms: {
|
|
2071
|
-
toClient: (dbValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>) => z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never
|
|
2072
|
-
toDb: (clientValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never
|
|
3072
|
+
toClient: (dbValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>) => z.TypeOf<InferSmartClientType<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, TNewNext>>;
|
|
3073
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, TNewNext>>) => z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
|
|
2073
3074
|
}) => {
|
|
2074
|
-
config:
|
|
3075
|
+
config: {
|
|
3076
|
+
sql: T;
|
|
3077
|
+
zodSqlSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
|
|
3078
|
+
zodNewSchema: TNewNext;
|
|
3079
|
+
initialValue: TDefaultNext;
|
|
3080
|
+
zodClientSchema: InferSmartClientType<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, TNewNext>;
|
|
3081
|
+
zodValidationSchema: InferSmartClientType<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, TNewNext>;
|
|
3082
|
+
} & {
|
|
2075
3083
|
transforms: {
|
|
2076
|
-
toClient: (dbValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>) => z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never
|
|
2077
|
-
toDb: (clientValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never
|
|
3084
|
+
toClient: (dbValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>) => z.TypeOf<InferSmartClientType<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, TNewNext>>;
|
|
3085
|
+
toDb: (clientValue: z.TypeOf<InferSmartClientType<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, TNewNext>>) => z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
|
|
2078
3086
|
};
|
|
2079
3087
|
};
|
|
2080
3088
|
};
|
|
@@ -2088,7 +3096,7 @@ interface IBuilderMethods<T extends SQLType, TSql extends z.ZodTypeAny, TNew ext
|
|
|
2088
3096
|
*/
|
|
2089
3097
|
initialState: <TNewNext extends z.ZodTypeAny, TDefaultNext>(schema: ((tools: {
|
|
2090
3098
|
sql: TSql;
|
|
2091
|
-
}) => TNewNext) | TNewNext, defaultValue: () => TDefaultNext) => Builder<"new", T, TSql, TNewNext, TDefaultNext, TSql, TSql
|
|
3099
|
+
}) => TNewNext) | TNewNext, defaultValue: () => TDefaultNext) => Builder<"new", T, TSql, TNewNext, TDefaultNext, InferSmartClientType<TSql, TNewNext>, InferSmartClientType<TSql, TNewNext>>;
|
|
2092
3100
|
/**
|
|
2093
3101
|
* Defines the schema for data sent to the client.
|
|
2094
3102
|
* Moves the builder to the 'client' stage.
|
|
@@ -2114,7 +3122,7 @@ interface IBuilderMethods<T extends SQLType, TSql extends z.ZodTypeAny, TNew ext
|
|
|
2114
3122
|
toClient: (dbValue: z.infer<TSql>) => z.infer<TClient>;
|
|
2115
3123
|
toDb: (clientValue: z.infer<TClient>) => z.infer<TSql>;
|
|
2116
3124
|
}) => {
|
|
2117
|
-
config: BuilderConfig<T, TSql, TNew, TInitialValue, TClient, TValidation
|
|
3125
|
+
config: Prettify<BuilderConfig<T, TSql, TNew, TInitialValue, TClient, TValidation>> & {
|
|
2118
3126
|
transforms: typeof transforms;
|
|
2119
3127
|
};
|
|
2120
3128
|
};
|
|
@@ -2127,6 +3135,7 @@ type StageMethods = {
|
|
|
2127
3135
|
validation: "transform";
|
|
2128
3136
|
done: never;
|
|
2129
3137
|
};
|
|
3138
|
+
type InferSmartClientType<TSql extends z.ZodTypeAny, TNew extends z.ZodTypeAny> = z.infer<TNew> extends z.infer<TSql> ? TNew : z.ZodUnion<[TSql, TNew]>;
|
|
2130
3139
|
type BuilderConfig<T extends SQLType, TSql extends z.ZodTypeAny, TNew extends z.ZodTypeAny, TInitialValue, TClient extends z.ZodTypeAny, TValidation extends z.ZodTypeAny> = {
|
|
2131
3140
|
sql: T;
|
|
2132
3141
|
zodSqlSchema: TSql;
|
|
@@ -2137,7 +3146,7 @@ type BuilderConfig<T extends SQLType, TSql extends z.ZodTypeAny, TNew extends z.
|
|
|
2137
3146
|
};
|
|
2138
3147
|
export type Builder<TStage extends Stage, T extends SQLType, TSql extends z.ZodTypeAny, TNew extends z.ZodTypeAny, TInitialValue, TClient extends z.ZodTypeAny, TValidation extends z.ZodTypeAny> = Prettify<{
|
|
2139
3148
|
/** The configuration object, available at every stage. */
|
|
2140
|
-
config: BuilderConfig<T, TSql, TNew, TInitialValue, TClient, TValidation
|
|
3149
|
+
config: Prettify<BuilderConfig<T, TSql, TNew, TInitialValue, TClient, TValidation>>;
|
|
2141
3150
|
} & Pick<IBuilderMethods<T, TSql, TNew, TInitialValue, TClient, TValidation>, StageMethods[TStage]>>;
|
|
2142
3151
|
export declare function hasMany<T extends Schema<any>>(config: {
|
|
2143
3152
|
fromKey: string;
|
|
@@ -2276,33 +3285,62 @@ export declare function reference<TTargetField extends SchemaField, TField exten
|
|
|
2276
3285
|
to: () => TTargetField;
|
|
2277
3286
|
};
|
|
2278
3287
|
export declare function createMixedValidationSchema<T extends Schema<any>>(schema: T, clientSchema?: z.ZodObject<any>, dbSchema?: z.ZodObject<any>): z.ZodObject<any>;
|
|
3288
|
+
type SchemaDefinition = {
|
|
3289
|
+
_tableName: string;
|
|
3290
|
+
[key: string]: any;
|
|
3291
|
+
};
|
|
2279
3292
|
type InferSqlSchema<T> = {
|
|
2280
3293
|
[K in keyof T as K extends "_tableName" ? never : K]: T[K] extends {
|
|
2281
3294
|
config: {
|
|
2282
3295
|
zodSqlSchema: infer S extends z.ZodTypeAny;
|
|
2283
3296
|
};
|
|
2284
|
-
} ? S :
|
|
3297
|
+
} ? S : T[K] extends () => {
|
|
3298
|
+
type: "hasMany" | "manyToMany";
|
|
3299
|
+
schema: infer S extends SchemaDefinition;
|
|
3300
|
+
} ? z.ZodArray<z.ZodObject<Prettify<InferSqlSchema<S>>>> : T[K] extends () => {
|
|
3301
|
+
type: "hasOne" | "belongsTo";
|
|
3302
|
+
schema: infer S extends SchemaDefinition;
|
|
3303
|
+
} ? z.ZodObject<Prettify<InferSqlSchema<S>>> : never;
|
|
2285
3304
|
};
|
|
2286
3305
|
type InferClientSchema<T> = {
|
|
2287
3306
|
[K in keyof T as K extends "_tableName" ? never : K]: T[K] extends {
|
|
2288
3307
|
config: {
|
|
2289
3308
|
zodClientSchema: infer C extends z.ZodTypeAny;
|
|
2290
3309
|
};
|
|
2291
|
-
} ? C :
|
|
3310
|
+
} ? C : T[K] extends () => {
|
|
3311
|
+
type: "hasMany" | "manyToMany";
|
|
3312
|
+
schema: infer S extends SchemaDefinition;
|
|
3313
|
+
} ? z.ZodArray<z.ZodObject<Prettify<InferClientSchema<S>>>> : T[K] extends () => {
|
|
3314
|
+
type: "hasOne" | "belongsTo";
|
|
3315
|
+
schema: infer S extends SchemaDefinition;
|
|
3316
|
+
} ? z.ZodObject<Prettify<InferClientSchema<S>>> : never;
|
|
2292
3317
|
};
|
|
2293
3318
|
type InferValidationSchema<T> = {
|
|
2294
3319
|
[K in keyof T as K extends "_tableName" ? never : K]: T[K] extends {
|
|
2295
3320
|
config: {
|
|
2296
3321
|
zodValidationSchema: infer V extends z.ZodTypeAny;
|
|
2297
3322
|
};
|
|
2298
|
-
} ? V :
|
|
3323
|
+
} ? V : T[K] extends () => {
|
|
3324
|
+
type: "hasMany" | "manyToMany";
|
|
3325
|
+
schema: infer S extends SchemaDefinition;
|
|
3326
|
+
} ? z.ZodArray<z.ZodObject<Prettify<InferValidationSchema<S>>>> : T[K] extends () => {
|
|
3327
|
+
type: "hasOne" | "belongsTo";
|
|
3328
|
+
schema: infer S extends SchemaDefinition;
|
|
3329
|
+
} ? z.ZodObject<Prettify<InferValidationSchema<S>>> : never;
|
|
2299
3330
|
};
|
|
2300
3331
|
type InferDefaultValues2<T> = {
|
|
2301
3332
|
[K in keyof T as K extends "_tableName" ? never : K]: T[K] extends {
|
|
2302
3333
|
config: {
|
|
2303
3334
|
initialValue: infer D;
|
|
2304
3335
|
};
|
|
2305
|
-
} ? D :
|
|
3336
|
+
} ? D : T[K] extends () => {
|
|
3337
|
+
type: "hasMany" | "manyToMany";
|
|
3338
|
+
schema: infer S extends SchemaDefinition;
|
|
3339
|
+
defaultCount?: number;
|
|
3340
|
+
} ? Array<Prettify<InferDefaultValues2<S>>> : T[K] extends () => {
|
|
3341
|
+
type: "hasOne" | "belongsTo";
|
|
3342
|
+
schema: infer S extends SchemaDefinition;
|
|
3343
|
+
} ? Prettify<InferDefaultValues2<S>> : never;
|
|
2306
3344
|
};
|
|
2307
3345
|
export declare function createSchema<T extends {
|
|
2308
3346
|
_tableName: string;
|
|
@@ -2314,4 +3352,18 @@ export declare function createSchema<T extends {
|
|
|
2314
3352
|
validationSchema: z.ZodObject<Prettify<InferValidationSchema<T>>>;
|
|
2315
3353
|
defaultValues: Prettify<InferDefaultValues2<T>>;
|
|
2316
3354
|
};
|
|
3355
|
+
export type InferSchemaTypes<T extends {
|
|
3356
|
+
_tableName: string;
|
|
3357
|
+
} & {
|
|
3358
|
+
[key: string]: any;
|
|
3359
|
+
}> = Prettify<{
|
|
3360
|
+
/** The TypeScript type for data as it exists in the database. */
|
|
3361
|
+
sql: z.infer<ReturnType<typeof createSchema<T>>["sqlSchema"]>;
|
|
3362
|
+
/** The TypeScript type for data as it is represented on the client. */
|
|
3363
|
+
client: z.infer<ReturnType<typeof createSchema<T>>["clientSchema"]>;
|
|
3364
|
+
/** The TypeScript type for data during validation, often the most flexible shape. */
|
|
3365
|
+
validation: z.infer<ReturnType<typeof createSchema<T>>["validationSchema"]>;
|
|
3366
|
+
/** The TypeScript type for the default values object. */
|
|
3367
|
+
defaults: ReturnType<typeof createSchema<T>>["defaultValues"];
|
|
3368
|
+
}>;
|
|
2317
3369
|
export {};
|