cogsbox-shape 0.5.27 → 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/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: BuilderConfig<{
61
- nullable?: boolean;
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
- }, z.ZodNumber, z.ZodNumber, undefined, z.ZodNumber, TValidationNext>;
79
- transform: (transforms: {
80
- toClient: (dbValue: number) => number;
81
- toDb: (clientValue: number) => number;
82
- }) => {
83
- config: BuilderConfig<{
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
- }, z.ZodNumber, z.ZodNumber, undefined, z.ZodNumber, TValidationNext> & {
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: BuilderConfig<{
102
- nullable?: boolean;
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
- }, z.ZodNumber, z.ZodNumber, undefined, TClientNext, TValidationNext>;
120
- transform: (transforms: {
121
- toClient: (dbValue: number) => z.TypeOf<TClientNext>;
122
- toDb: (clientValue: z.TypeOf<TClientNext>) => number;
123
- }) => {
124
- config: BuilderConfig<{
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
- }, z.ZodNumber, z.ZodNumber, undefined, TClientNext, TValidationNext> & {
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: BuilderConfig<{
143
- nullable?: boolean;
144
- pk?: true;
145
- field?: string;
146
- default?: number;
147
- type: "int";
148
- }, z.ZodNumber, z.ZodNumber, undefined, TClientNext, TClientNext> & {
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: BuilderConfig<{
161
- nullable?: boolean;
162
- pk?: true;
163
- field?: string;
164
- default?: number;
165
- type: "int";
166
- }, z.ZodNumber, z.ZodNumber, undefined, z.ZodNumber, z.ZodNumber> & {
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: BuilderConfig<{
177
- nullable?: boolean;
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
- }, z.ZodNumber, TNewNext, TDefaultNext, z.ZodNumber, TValidationNext>;
195
- transform: (transforms: {
196
- toClient: (dbValue: number) => number;
197
- toDb: (clientValue: number) => number;
198
- }) => {
199
- config: BuilderConfig<{
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
- }, z.ZodNumber, TNewNext, TDefaultNext, z.ZodNumber, TValidationNext> & {
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) => number;
208
- toDb: (clientValue: number) => number;
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: BuilderConfig<{
218
- nullable?: boolean;
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
- }, z.ZodNumber, TNewNext, TDefaultNext, TClientNext, TValidationNext>;
236
- transform: (transforms: {
237
- toClient: (dbValue: number) => z.TypeOf<TClientNext>;
238
- toDb: (clientValue: z.TypeOf<TClientNext>) => number;
239
- }) => {
240
- config: BuilderConfig<{
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
- }, z.ZodNumber, TNewNext, TDefaultNext, TClientNext, TValidationNext> & {
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: BuilderConfig<{
259
- nullable?: boolean;
260
- pk?: true;
261
- field?: string;
262
- default?: number;
263
- type: "int";
264
- }, z.ZodNumber, TNewNext, TDefaultNext, TClientNext, TClientNext> & {
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) => number;
274
- toDb: (clientValue: number) => number;
378
+ toClient: (dbValue: number) => z.TypeOf<InferSmartClientType<z.ZodNumber, TNewNext>>;
379
+ toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodNumber, TNewNext>>) => number;
275
380
  }) => {
276
- config: BuilderConfig<{
277
- nullable?: boolean;
278
- pk?: true;
279
- field?: string;
280
- default?: number;
281
- type: "int";
282
- }, z.ZodNumber, TNewNext, TDefaultNext, z.ZodNumber, z.ZodNumber> & {
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) => number;
285
- toDb: (clientValue: number) => number;
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: BuilderConfig<{
293
- pk?: true;
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
- }, z.ZodString, z.ZodString, undefined, z.ZodString, TValidationNext>;
313
- transform: (transforms: {
314
- toClient: (dbValue: string) => string;
315
- toDb: (clientValue: string) => string;
316
- }) => {
317
- config: BuilderConfig<{
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
- }, z.ZodString, z.ZodString, undefined, z.ZodString, TValidationNext> & {
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: BuilderConfig<{
337
- pk?: true;
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
- }, z.ZodString, z.ZodString, undefined, TClientNext, TValidationNext>;
357
- transform: (transforms: {
358
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
359
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
360
- }) => {
361
- config: BuilderConfig<{
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
- }, z.ZodString, z.ZodString, undefined, TClientNext, TValidationNext> & {
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: BuilderConfig<{
381
- pk?: true;
382
- nullable?: boolean;
383
- default?: string;
384
- length?: number;
385
- field?: string;
386
- type: "varchar";
387
- }, z.ZodString, z.ZodString, undefined, TClientNext, TClientNext> & {
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: BuilderConfig<{
400
- pk?: true;
401
- nullable?: boolean;
402
- default?: string;
403
- length?: number;
404
- field?: string;
405
- type: "varchar";
406
- }, z.ZodString, z.ZodString, undefined, z.ZodString, z.ZodString> & {
407
- transforms: {
408
- toClient: (dbValue: string) => string;
409
- toDb: (clientValue: string) => string;
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: BuilderConfig<{
417
- pk?: true;
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
- }, z.ZodString, TNewNext, TDefaultNext, z.ZodString, TValidationNext>;
437
- transform: (transforms: {
438
- toClient: (dbValue: string) => string;
439
- toDb: (clientValue: string) => string;
440
- }) => {
441
- config: BuilderConfig<{
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
- }, z.ZodString, TNewNext, TDefaultNext, z.ZodString, TValidationNext> & {
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) => string;
451
- toDb: (clientValue: string) => string;
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: BuilderConfig<{
461
- pk?: true;
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
- }, z.ZodString, TNewNext, TDefaultNext, TClientNext, TValidationNext>;
481
- transform: (transforms: {
482
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
483
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
484
- }) => {
485
- config: BuilderConfig<{
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
- }, z.ZodString, TNewNext, TDefaultNext, TClientNext, TValidationNext> & {
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: BuilderConfig<{
505
- pk?: true;
506
- nullable?: boolean;
507
- default?: string;
508
- length?: number;
509
- field?: string;
510
- type: "varchar";
511
- }, z.ZodString, TNewNext, TDefaultNext, TClientNext, TClientNext> & {
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) => string;
521
- toDb: (clientValue: string) => string;
737
+ toClient: (dbValue: string) => z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>;
738
+ toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>) => string;
522
739
  }) => {
523
- config: BuilderConfig<{
524
- pk?: true;
525
- nullable?: boolean;
526
- default?: string;
527
- length?: number;
528
- field?: string;
529
- type: "varchar";
530
- }, z.ZodString, TNewNext, TDefaultNext, z.ZodString, z.ZodString> & {
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) => string;
533
- toDb: (clientValue: string) => string;
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: BuilderConfig<{
541
- pk?: true;
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
- }, z.ZodString, z.ZodString, undefined, z.ZodString, TValidationNext>;
561
- transform: (transforms: {
562
- toClient: (dbValue: string) => string;
563
- toDb: (clientValue: string) => string;
564
- }) => {
565
- config: BuilderConfig<{
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
- }, z.ZodString, z.ZodString, undefined, z.ZodString, TValidationNext> & {
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: BuilderConfig<{
585
- pk?: true;
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
- }, z.ZodString, z.ZodString, undefined, TClientNext, TValidationNext>;
605
- transform: (transforms: {
606
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
607
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
608
- }) => {
609
- config: BuilderConfig<{
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
- }, z.ZodString, z.ZodString, undefined, TClientNext, TValidationNext> & {
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: BuilderConfig<{
629
- pk?: true;
630
- nullable?: boolean;
631
- default?: string;
632
- length?: number;
633
- field?: string;
634
- type: "char";
635
- }, z.ZodString, z.ZodString, undefined, TClientNext, TClientNext> & {
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: BuilderConfig<{
648
- pk?: true;
649
- nullable?: boolean;
650
- default?: string;
651
- length?: number;
652
- field?: string;
653
- type: "char";
654
- }, z.ZodString, z.ZodString, undefined, z.ZodString, z.ZodString> & {
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: BuilderConfig<{
665
- pk?: true;
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
- }, z.ZodString, TNewNext, TDefaultNext, z.ZodString, TValidationNext>;
685
- transform: (transforms: {
686
- toClient: (dbValue: string) => string;
687
- toDb: (clientValue: string) => string;
688
- }) => {
689
- config: BuilderConfig<{
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
- }, z.ZodString, TNewNext, TDefaultNext, z.ZodString, TValidationNext> & {
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) => string;
699
- toDb: (clientValue: string) => string;
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: BuilderConfig<{
709
- pk?: true;
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
- }, z.ZodString, TNewNext, TDefaultNext, TClientNext, TValidationNext>;
729
- transform: (transforms: {
730
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
731
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
732
- }) => {
733
- config: BuilderConfig<{
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
- }, z.ZodString, TNewNext, TDefaultNext, TClientNext, TValidationNext> & {
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: BuilderConfig<{
753
- pk?: true;
754
- nullable?: boolean;
755
- default?: string;
756
- length?: number;
757
- field?: string;
758
- type: "char";
759
- }, z.ZodString, TNewNext, TDefaultNext, TClientNext, TClientNext> & {
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) => string;
769
- toDb: (clientValue: string) => string;
1097
+ toClient: (dbValue: string) => z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>;
1098
+ toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>) => string;
770
1099
  }) => {
771
- config: BuilderConfig<{
772
- pk?: true;
773
- nullable?: boolean;
774
- default?: string;
775
- length?: number;
776
- field?: string;
777
- type: "char";
778
- }, z.ZodString, TNewNext, TDefaultNext, z.ZodString, z.ZodString> & {
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) => string;
781
- toDb: (clientValue: string) => string;
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: BuilderConfig<{
789
- pk?: true;
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
- }, z.ZodString, z.ZodString, undefined, z.ZodString, TValidationNext>;
807
- transform: (transforms: {
808
- toClient: (dbValue: string) => string;
809
- toDb: (clientValue: string) => string;
810
- }) => {
811
- config: BuilderConfig<{
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
- }, z.ZodString, z.ZodString, undefined, z.ZodString, TValidationNext> & {
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: BuilderConfig<{
830
- pk?: true;
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
- }, z.ZodString, z.ZodString, undefined, TClientNext, TValidationNext>;
848
- transform: (transforms: {
849
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
850
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
851
- }) => {
852
- config: BuilderConfig<{
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
- }, z.ZodString, z.ZodString, undefined, TClientNext, TValidationNext> & {
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: BuilderConfig<{
871
- pk?: true;
872
- nullable?: boolean;
873
- default?: string;
874
- field?: string;
875
- type: "text";
876
- }, z.ZodString, z.ZodString, undefined, TClientNext, TClientNext> & {
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,13 +1270,20 @@ export declare const shape: {
885
1270
  toClient: (dbValue: string) => string;
886
1271
  toDb: (clientValue: string) => string;
887
1272
  }) => {
888
- config: BuilderConfig<{
889
- pk?: true;
890
- nullable?: boolean;
891
- default?: string;
892
- field?: string;
893
- type: "text";
894
- }, z.ZodString, z.ZodString, undefined, z.ZodString, z.ZodString> & {
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;
@@ -901,39 +1293,60 @@ export declare const shape: {
901
1293
  initialState: <TNewNext extends z.ZodTypeAny, TDefaultNext>(schema: TNewNext | ((tools: {
902
1294
  sql: z.ZodString;
903
1295
  }) => TNewNext), defaultValue: () => TDefaultNext) => {
904
- config: BuilderConfig<{
905
- pk?: true;
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<{
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
- }, z.ZodString, TNewNext, TDefaultNext, z.ZodString, TValidationNext>;
923
- transform: (transforms: {
924
- toClient: (dbValue: string) => string;
925
- toDb: (clientValue: string) => string;
926
- }) => {
927
- config: BuilderConfig<{
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
- }, z.ZodString, TNewNext, TDefaultNext, z.ZodString, TValidationNext> & {
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) => string;
936
- toDb: (clientValue: string) => string;
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: BuilderConfig<{
946
- pk?: true;
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
- }, z.ZodString, TNewNext, TDefaultNext, TClientNext, TValidationNext>;
964
- transform: (transforms: {
965
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
966
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
967
- }) => {
968
- config: BuilderConfig<{
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
- }, z.ZodString, TNewNext, TDefaultNext, TClientNext, TValidationNext> & {
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: BuilderConfig<{
987
- pk?: true;
988
- nullable?: boolean;
989
- default?: string;
990
- field?: string;
991
- type: "text";
992
- }, z.ZodString, TNewNext, TDefaultNext, TClientNext, TClientNext> & {
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) => string;
1002
- toDb: (clientValue: string) => string;
1442
+ toClient: (dbValue: string) => z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>;
1443
+ toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>) => string;
1003
1444
  }) => {
1004
- config: BuilderConfig<{
1005
- pk?: true;
1006
- nullable?: boolean;
1007
- default?: string;
1008
- field?: string;
1009
- type: "text";
1010
- }, z.ZodString, TNewNext, TDefaultNext, z.ZodString, z.ZodString> & {
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) => string;
1013
- toDb: (clientValue: string) => string;
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: BuilderConfig<{
1021
- pk?: true;
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
- }, z.ZodString, z.ZodString, undefined, z.ZodString, TValidationNext>;
1039
- transform: (transforms: {
1040
- toClient: (dbValue: string) => string;
1041
- toDb: (clientValue: string) => string;
1042
- }) => {
1043
- config: BuilderConfig<{
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
- }, z.ZodString, z.ZodString, undefined, z.ZodString, TValidationNext> & {
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: BuilderConfig<{
1062
- pk?: true;
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
- }, z.ZodString, z.ZodString, undefined, TClientNext, TValidationNext>;
1080
- transform: (transforms: {
1081
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
1082
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
1083
- }) => {
1084
- config: BuilderConfig<{
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
- }, z.ZodString, z.ZodString, undefined, TClientNext, TValidationNext> & {
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: BuilderConfig<{
1103
- pk?: true;
1104
- nullable?: boolean;
1105
- default?: string;
1106
- field?: string;
1107
- type: "longtext";
1108
- }, z.ZodString, z.ZodString, undefined, TClientNext, TClientNext> & {
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: BuilderConfig<{
1121
- pk?: true;
1122
- nullable?: boolean;
1123
- default?: string;
1124
- field?: string;
1125
- type: "longtext";
1126
- }, z.ZodString, z.ZodString, undefined, z.ZodString, z.ZodString> & {
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: BuilderConfig<{
1137
- pk?: true;
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
- }, z.ZodString, TNewNext, TDefaultNext, z.ZodString, TValidationNext>;
1155
- transform: (transforms: {
1156
- toClient: (dbValue: string) => string;
1157
- toDb: (clientValue: string) => string;
1158
- }) => {
1159
- config: BuilderConfig<{
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
- }, z.ZodString, TNewNext, TDefaultNext, z.ZodString, TValidationNext> & {
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) => string;
1168
- toDb: (clientValue: string) => string;
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: BuilderConfig<{
1178
- pk?: true;
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
- }, z.ZodString, TNewNext, TDefaultNext, TClientNext, TValidationNext>;
1196
- transform: (transforms: {
1197
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
1198
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
1199
- }) => {
1200
- config: BuilderConfig<{
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
- }, z.ZodString, TNewNext, TDefaultNext, TClientNext, TValidationNext> & {
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: BuilderConfig<{
1219
- pk?: true;
1220
- nullable?: boolean;
1221
- default?: string;
1222
- field?: string;
1223
- type: "longtext";
1224
- }, z.ZodString, TNewNext, TDefaultNext, TClientNext, TClientNext> & {
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) => string;
1234
- toDb: (clientValue: string) => string;
1786
+ toClient: (dbValue: string) => z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>;
1787
+ toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodString, TNewNext>>) => string;
1235
1788
  }) => {
1236
- config: BuilderConfig<{
1237
- pk?: true;
1238
- nullable?: boolean;
1239
- default?: string;
1240
- field?: string;
1241
- type: "longtext";
1242
- }, z.ZodString, TNewNext, TDefaultNext, z.ZodString, z.ZodString> & {
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) => string;
1245
- toDb: (clientValue: string) => string;
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
- };
1251
- boolean: (config?: BooleanConfig) => {
1252
- config: BuilderConfig<{
1253
- nullable?: boolean;
1254
- pk?: true;
1255
- field?: string;
1256
- default?: boolean;
1257
- type: "boolean";
1258
- }, z.ZodBoolean, z.ZodBoolean, undefined, z.ZodBoolean, z.ZodBoolean>;
1810
+ };
1811
+ boolean: (config?: BooleanConfig) => {
1812
+ config: {
1813
+ sql: {
1814
+ nullable?: boolean;
1815
+ pk?: true;
1816
+ field?: string;
1817
+ default?: boolean;
1818
+ type: "boolean";
1819
+ };
1820
+ zodSqlSchema: z.ZodBoolean;
1821
+ zodNewSchema: z.ZodBoolean;
1822
+ initialValue: undefined;
1823
+ zodClientSchema: z.ZodBoolean;
1824
+ zodValidationSchema: z.ZodBoolean;
1825
+ };
1259
1826
  validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
1260
1827
  sql: z.ZodBoolean;
1261
1828
  initialState: z.ZodBoolean;
1262
1829
  client: z.ZodBoolean;
1263
1830
  }) => TValidationNext)) => {
1264
- config: BuilderConfig<{
1265
- nullable?: boolean;
1266
- pk?: true;
1267
- field?: string;
1268
- default?: boolean;
1269
- type: "boolean";
1270
- }, z.ZodBoolean, z.ZodBoolean, undefined, z.ZodBoolean, TValidationNext>;
1271
- transform: (transforms: {
1272
- toClient: (dbValue: boolean) => boolean;
1273
- toDb: (clientValue: boolean) => boolean;
1274
- }) => {
1275
- config: BuilderConfig<{
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
- }, z.ZodBoolean, z.ZodBoolean, undefined, z.ZodBoolean, TValidationNext> & {
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: BuilderConfig<{
1294
- nullable?: boolean;
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
- }, z.ZodBoolean, z.ZodBoolean, undefined, TClientNext, TValidationNext>;
1312
- transform: (transforms: {
1313
- toClient: (dbValue: boolean) => z.TypeOf<TClientNext>;
1314
- toDb: (clientValue: z.TypeOf<TClientNext>) => boolean;
1315
- }) => {
1316
- config: BuilderConfig<{
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
- }, z.ZodBoolean, z.ZodBoolean, undefined, TClientNext, TValidationNext> & {
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: BuilderConfig<{
1335
- nullable?: boolean;
1336
- pk?: true;
1337
- field?: string;
1338
- default?: boolean;
1339
- type: "boolean";
1340
- }, z.ZodBoolean, z.ZodBoolean, undefined, TClientNext, TClientNext> & {
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: BuilderConfig<{
1353
- nullable?: boolean;
1354
- pk?: true;
1355
- field?: string;
1356
- default?: boolean;
1357
- type: "boolean";
1358
- }, z.ZodBoolean, z.ZodBoolean, undefined, z.ZodBoolean, z.ZodBoolean> & {
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: BuilderConfig<{
1369
- nullable?: boolean;
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
- }, z.ZodBoolean, TNewNext, TDefaultNext, z.ZodBoolean, TValidationNext>;
1387
- transform: (transforms: {
1388
- toClient: (dbValue: boolean) => boolean;
1389
- toDb: (clientValue: boolean) => boolean;
1390
- }) => {
1391
- config: BuilderConfig<{
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
- }, z.ZodBoolean, TNewNext, TDefaultNext, z.ZodBoolean, TValidationNext> & {
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) => boolean;
1400
- toDb: (clientValue: boolean) => boolean;
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: BuilderConfig<{
1410
- nullable?: boolean;
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
- }, z.ZodBoolean, TNewNext, TDefaultNext, TClientNext, TValidationNext>;
1428
- transform: (transforms: {
1429
- toClient: (dbValue: boolean) => z.TypeOf<TClientNext>;
1430
- toDb: (clientValue: z.TypeOf<TClientNext>) => boolean;
1431
- }) => {
1432
- config: BuilderConfig<{
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
- }, z.ZodBoolean, TNewNext, TDefaultNext, TClientNext, TValidationNext> & {
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: BuilderConfig<{
1451
- nullable?: boolean;
1452
- pk?: true;
1453
- field?: string;
1454
- default?: boolean;
1455
- type: "boolean";
1456
- }, z.ZodBoolean, TNewNext, TDefaultNext, TClientNext, TClientNext> & {
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) => boolean;
1466
- toDb: (clientValue: boolean) => boolean;
2130
+ toClient: (dbValue: boolean) => z.TypeOf<InferSmartClientType<z.ZodBoolean, TNewNext>>;
2131
+ toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodBoolean, TNewNext>>) => boolean;
1467
2132
  }) => {
1468
- config: BuilderConfig<{
1469
- nullable?: boolean;
1470
- pk?: true;
1471
- field?: string;
1472
- default?: boolean;
1473
- type: "boolean";
1474
- }, z.ZodBoolean, TNewNext, TDefaultNext, z.ZodBoolean, z.ZodBoolean> & {
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) => boolean;
1477
- toDb: (clientValue: boolean) => boolean;
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: BuilderConfig<{
1485
- pk?: true;
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
- }, z.ZodDate, z.ZodDate, undefined, z.ZodDate, TValidationNext>;
1503
- transform: (transforms: {
1504
- toClient: (dbValue: Date) => Date;
1505
- toDb: (clientValue: Date) => Date;
1506
- }) => {
1507
- config: BuilderConfig<{
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
- }, z.ZodDate, z.ZodDate, undefined, z.ZodDate, TValidationNext> & {
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: BuilderConfig<{
1526
- pk?: true;
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
- }, z.ZodDate, z.ZodDate, undefined, TClientNext, TValidationNext>;
1544
- transform: (transforms: {
1545
- toClient: (dbValue: Date) => z.TypeOf<TClientNext>;
1546
- toDb: (clientValue: z.TypeOf<TClientNext>) => Date;
1547
- }) => {
1548
- config: BuilderConfig<{
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
- }, z.ZodDate, z.ZodDate, undefined, TClientNext, TValidationNext> & {
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: BuilderConfig<{
1567
- pk?: true;
1568
- nullable?: boolean;
1569
- default?: Date;
1570
- field?: string;
1571
- type: "date";
1572
- }, z.ZodDate, z.ZodDate, undefined, TClientNext, TClientNext> & {
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: BuilderConfig<{
1585
- pk?: true;
1586
- nullable?: boolean;
1587
- default?: Date;
1588
- field?: string;
1589
- type: "date";
1590
- }, z.ZodDate, z.ZodDate, undefined, z.ZodDate, z.ZodDate> & {
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: BuilderConfig<{
1601
- pk?: true;
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
- }, z.ZodDate, TNewNext, TDefaultNext, z.ZodDate, TValidationNext>;
1619
- transform: (transforms: {
1620
- toClient: (dbValue: Date) => Date;
1621
- toDb: (clientValue: Date) => Date;
1622
- }) => {
1623
- config: BuilderConfig<{
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
- }, z.ZodDate, TNewNext, TDefaultNext, z.ZodDate, TValidationNext> & {
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) => Date;
1632
- toDb: (clientValue: Date) => Date;
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: BuilderConfig<{
1642
- pk?: true;
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
- }, z.ZodDate, TNewNext, TDefaultNext, TClientNext, TValidationNext>;
1660
- transform: (transforms: {
1661
- toClient: (dbValue: Date) => z.TypeOf<TClientNext>;
1662
- toDb: (clientValue: z.TypeOf<TClientNext>) => Date;
1663
- }) => {
1664
- config: BuilderConfig<{
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
- }, z.ZodDate, TNewNext, TDefaultNext, TClientNext, TValidationNext> & {
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: BuilderConfig<{
1683
- pk?: true;
1684
- nullable?: boolean;
1685
- default?: Date;
1686
- field?: string;
1687
- type: "date";
1688
- }, z.ZodDate, TNewNext, TDefaultNext, TClientNext, TClientNext> & {
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) => Date;
1698
- toDb: (clientValue: Date) => Date;
2474
+ toClient: (dbValue: Date) => z.TypeOf<InferSmartClientType<z.ZodDate, TNewNext>>;
2475
+ toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodDate, TNewNext>>) => Date;
1699
2476
  }) => {
1700
- config: BuilderConfig<{
1701
- pk?: true;
1702
- nullable?: boolean;
1703
- default?: Date;
1704
- field?: string;
1705
- type: "date";
1706
- }, z.ZodDate, TNewNext, TDefaultNext, z.ZodDate, z.ZodDate> & {
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) => Date;
1709
- toDb: (clientValue: Date) => Date;
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: BuilderConfig<{
1717
- pk?: true;
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
- }, z.ZodDate, z.ZodDate, undefined, z.ZodDate, TValidationNext>;
1735
- transform: (transforms: {
1736
- toClient: (dbValue: Date) => Date;
1737
- toDb: (clientValue: Date) => Date;
1738
- }) => {
1739
- config: BuilderConfig<{
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
- }, z.ZodDate, z.ZodDate, undefined, z.ZodDate, TValidationNext> & {
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: BuilderConfig<{
1758
- pk?: true;
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
- }, z.ZodDate, z.ZodDate, undefined, TClientNext, TValidationNext>;
1776
- transform: (transforms: {
1777
- toClient: (dbValue: Date) => z.TypeOf<TClientNext>;
1778
- toDb: (clientValue: z.TypeOf<TClientNext>) => Date;
1779
- }) => {
1780
- config: BuilderConfig<{
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
- }, z.ZodDate, z.ZodDate, undefined, TClientNext, TValidationNext> & {
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: BuilderConfig<{
1799
- pk?: true;
1800
- nullable?: boolean;
1801
- default?: Date;
1802
- field?: string;
1803
- type: "datetime";
1804
- }, z.ZodDate, z.ZodDate, undefined, TClientNext, TClientNext> & {
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: BuilderConfig<{
1817
- pk?: true;
1818
- nullable?: boolean;
1819
- default?: Date;
1820
- field?: string;
1821
- type: "datetime";
1822
- }, z.ZodDate, z.ZodDate, undefined, z.ZodDate, z.ZodDate> & {
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: BuilderConfig<{
1833
- pk?: true;
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
- }, z.ZodDate, TNewNext, TDefaultNext, z.ZodDate, TValidationNext>;
1851
- transform: (transforms: {
1852
- toClient: (dbValue: Date) => Date;
1853
- toDb: (clientValue: Date) => Date;
1854
- }) => {
1855
- config: BuilderConfig<{
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
- }, z.ZodDate, TNewNext, TDefaultNext, z.ZodDate, TValidationNext> & {
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) => Date;
1864
- toDb: (clientValue: Date) => Date;
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: BuilderConfig<{
1874
- pk?: true;
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
- }, z.ZodDate, TNewNext, TDefaultNext, TClientNext, TValidationNext>;
1892
- transform: (transforms: {
1893
- toClient: (dbValue: Date) => z.TypeOf<TClientNext>;
1894
- toDb: (clientValue: z.TypeOf<TClientNext>) => Date;
1895
- }) => {
1896
- config: BuilderConfig<{
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
- }, z.ZodDate, TNewNext, TDefaultNext, TClientNext, TValidationNext> & {
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: BuilderConfig<{
1915
- pk?: true;
1916
- nullable?: boolean;
1917
- default?: Date;
1918
- field?: string;
1919
- type: "datetime";
1920
- }, z.ZodDate, TNewNext, TDefaultNext, TClientNext, TClientNext> & {
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) => Date;
1930
- toDb: (clientValue: Date) => Date;
2818
+ toClient: (dbValue: Date) => z.TypeOf<InferSmartClientType<z.ZodDate, TNewNext>>;
2819
+ toDb: (clientValue: z.TypeOf<InferSmartClientType<z.ZodDate, TNewNext>>) => Date;
1931
2820
  }) => {
1932
- config: BuilderConfig<{
1933
- pk?: true;
1934
- nullable?: boolean;
1935
- default?: Date;
1936
- field?: string;
1937
- type: "datetime";
1938
- }, z.ZodDate, TNewNext, TDefaultNext, z.ZodDate, z.ZodDate> & {
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) => Date;
1941
- toDb: (clientValue: Date) => Date;
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: BuilderConfig<T, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, undefined, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
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: BuilderConfig<T, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, undefined, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, TValidationNext>;
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: BuilderConfig<T, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, undefined, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, TValidationNext> & {
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: BuilderConfig<T, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, undefined, TClientNext, TClientNext>;
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: BuilderConfig<T, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, undefined, TClientNext, TValidationNext>;
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: BuilderConfig<T, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, undefined, TClientNext, TValidationNext> & {
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: BuilderConfig<T, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, undefined, TClientNext, TClientNext> & {
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: BuilderConfig<T, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, undefined, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never> & {
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: BuilderConfig<T, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, TNewNext, TDefaultNext, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
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: BuilderConfig<T, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, TNewNext, TDefaultNext, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, TValidationNext>;
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>) => 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: BuilderConfig<T, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, TNewNext, TDefaultNext, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, TValidationNext> & {
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>) => 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: BuilderConfig<T, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, TNewNext, TDefaultNext, TClientNext, TClientNext>;
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: BuilderConfig<T, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, TNewNext, TDefaultNext, TClientNext, TValidationNext>;
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: BuilderConfig<T, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, TNewNext, TDefaultNext, TClientNext, TValidationNext> & {
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: BuilderConfig<T, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, TNewNext, TDefaultNext, TClientNext, TClientNext> & {
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>) => 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: BuilderConfig<T, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, TNewNext, TDefaultNext, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never, SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never> & {
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>) => 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;