cogsbox-shape 0.5.32 → 0.5.34

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