cogsbox-shape 0.5.57 → 0.5.59

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.
@@ -19,7 +19,59 @@ export declare const petSchema: {
19
19
  };
20
20
  };
21
21
  };
22
- name: {
22
+ name: import("../schema.js").Builder<"sql", {
23
+ type: "varchar";
24
+ length: number;
25
+ }, z.ZodString, z.ZodString, string, z.ZodString, z.ZodString>;
26
+ userId: {
27
+ type: "reference";
28
+ to: () => import("../schema.js").Builder<"sql", {
29
+ type: "int";
30
+ pk: true;
31
+ }, z.ZodNumber, z.ZodNumber, number, z.ZodNumber, z.ZodNumber>;
32
+ };
33
+ fluffynessScale: {
34
+ config: {
35
+ sql: {
36
+ type: "text";
37
+ };
38
+ zodSqlSchema: z.ZodString;
39
+ zodNewSchema: z.ZodString;
40
+ initialValue: string;
41
+ zodClientSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
42
+ zodValidationSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
43
+ } & {
44
+ transforms: {
45
+ toClient: (dbValue: string) => ("bald" | "fuzzy" | "fluffy" | "poof")[];
46
+ toDb: (clientValue: ("bald" | "fuzzy" | "fluffy" | "poof")[]) => string;
47
+ };
48
+ };
49
+ };
50
+ favourite: {
51
+ config: {
52
+ sql: {
53
+ type: "int";
54
+ };
55
+ zodSqlSchema: z.ZodNumber;
56
+ zodNewSchema: z.ZodNumber;
57
+ initialValue: number;
58
+ zodClientSchema: z.ZodBoolean;
59
+ zodValidationSchema: z.ZodBoolean;
60
+ } & {
61
+ transforms: {
62
+ toClient: (dbValue: number) => boolean;
63
+ toDb: (clientValue: boolean) => number;
64
+ };
65
+ };
66
+ };
67
+ };
68
+ export declare const userSchema: {
69
+ _tableName: string;
70
+ id: import("../schema.js").Builder<"sql", {
71
+ type: "int";
72
+ pk: true;
73
+ }, z.ZodNumber, z.ZodNumber, number, z.ZodNumber, z.ZodNumber>;
74
+ firstname: {
23
75
  config: {
24
76
  sql: {
25
77
  type: "varchar";
@@ -31,11 +83,10 @@ export declare const petSchema: {
31
83
  zodClientSchema: z.ZodString;
32
84
  zodValidationSchema: z.ZodString;
33
85
  };
34
- validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
35
- sql: z.ZodString;
36
- initialState: z.ZodString;
37
- client: z.ZodString;
38
- }) => TValidationNext)) => {
86
+ transform: (transforms: {
87
+ toClient: (dbValue: string) => string;
88
+ toDb: (clientValue: string) => string;
89
+ }) => {
39
90
  config: {
40
91
  sql: {
41
92
  type: "varchar";
@@ -45,34 +96,31 @@ export declare const petSchema: {
45
96
  zodNewSchema: z.ZodString;
46
97
  initialValue: string;
47
98
  zodClientSchema: z.ZodString;
48
- zodValidationSchema: TValidationNext;
49
- };
50
- transform: (transforms: {
51
- toClient: (dbValue: string) => string;
52
- toDb: (clientValue: string) => string;
53
- }) => {
54
- config: {
55
- sql: {
56
- type: "varchar";
57
- length: number;
58
- };
59
- zodSqlSchema: z.ZodString;
60
- zodNewSchema: z.ZodString;
61
- initialValue: string;
62
- zodClientSchema: z.ZodString;
63
- zodValidationSchema: TValidationNext;
64
- } & {
65
- transforms: {
66
- toClient: (dbValue: string) => string;
67
- toDb: (clientValue: string) => string;
68
- };
99
+ zodValidationSchema: z.ZodString;
100
+ } & {
101
+ transforms: {
102
+ toClient: (dbValue: string) => string;
103
+ toDb: (clientValue: string) => string;
69
104
  };
70
105
  };
71
106
  };
72
- client: <TClientNext extends z.ZodTypeAny>(schema: TClientNext | ((tools: {
73
- sql: z.ZodString;
74
- initialState: z.ZodString;
75
- }) => TClientNext)) => {
107
+ };
108
+ surname: {
109
+ config: {
110
+ sql: {
111
+ type: "varchar";
112
+ length: number;
113
+ };
114
+ zodSqlSchema: z.ZodString;
115
+ zodNewSchema: z.ZodString;
116
+ initialValue: string;
117
+ zodClientSchema: z.ZodString;
118
+ zodValidationSchema: z.ZodString;
119
+ };
120
+ transform: (transforms: {
121
+ toClient: (dbValue: string) => string;
122
+ toDb: (clientValue: string) => string;
123
+ }) => {
76
124
  config: {
77
125
  sql: {
78
126
  type: "varchar";
@@ -81,68 +129,27 @@ export declare const petSchema: {
81
129
  zodSqlSchema: z.ZodString;
82
130
  zodNewSchema: z.ZodString;
83
131
  initialValue: string;
84
- zodClientSchema: TClientNext;
85
- zodValidationSchema: TClientNext;
86
- };
87
- validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
88
- sql: z.ZodString;
89
- initialState: z.ZodString;
90
- client: TClientNext;
91
- }) => TValidationNext)) => {
92
- config: {
93
- sql: {
94
- type: "varchar";
95
- length: number;
96
- };
97
- zodSqlSchema: z.ZodString;
98
- zodNewSchema: z.ZodString;
99
- initialValue: string;
100
- zodClientSchema: TClientNext;
101
- zodValidationSchema: TValidationNext;
102
- };
103
- transform: (transforms: {
104
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
105
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
106
- }) => {
107
- config: {
108
- sql: {
109
- type: "varchar";
110
- length: number;
111
- };
112
- zodSqlSchema: z.ZodString;
113
- zodNewSchema: z.ZodString;
114
- initialValue: string;
115
- zodClientSchema: TClientNext;
116
- zodValidationSchema: TValidationNext;
117
- } & {
118
- transforms: {
119
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
120
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
121
- };
122
- };
132
+ zodClientSchema: z.ZodString;
133
+ zodValidationSchema: z.ZodString;
134
+ } & {
135
+ transforms: {
136
+ toClient: (dbValue: string) => string;
137
+ toDb: (clientValue: string) => string;
123
138
  };
124
139
  };
125
- transform: (transforms: {
126
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
127
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
128
- }) => {
129
- config: {
130
- sql: {
131
- type: "varchar";
132
- length: number;
133
- };
134
- zodSqlSchema: z.ZodString;
135
- zodNewSchema: z.ZodString;
136
- initialValue: string;
137
- zodClientSchema: TClientNext;
138
- zodValidationSchema: TClientNext;
139
- } & {
140
- transforms: {
141
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
142
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
143
- };
144
- };
140
+ };
141
+ };
142
+ email: {
143
+ config: {
144
+ sql: {
145
+ type: "varchar";
146
+ length: number;
145
147
  };
148
+ zodSqlSchema: z.ZodString;
149
+ zodNewSchema: z.ZodString;
150
+ initialValue: string;
151
+ zodClientSchema: z.ZodString;
152
+ zodValidationSchema: z.ZodString;
146
153
  };
147
154
  transform: (transforms: {
148
155
  toClient: (dbValue: string) => string;
@@ -165,471 +172,159 @@ export declare const petSchema: {
165
172
  };
166
173
  };
167
174
  };
168
- initialState: {
169
- <TDefaultNext>(defaultValue: () => TDefaultNext): {
170
- config: {
171
- sql: {
172
- type: "varchar";
173
- length: number;
174
- };
175
- zodSqlSchema: z.ZodString;
176
- zodNewSchema: z.ZodString;
177
- initialValue: TDefaultNext;
178
- zodClientSchema: z.ZodString;
179
- zodValidationSchema: z.ZodString;
180
- };
181
- validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
182
- sql: z.ZodString;
183
- initialState: z.ZodString;
184
- client: z.ZodString;
185
- }) => TValidationNext)) => {
186
- config: {
187
- sql: {
188
- type: "varchar";
189
- length: number;
190
- };
191
- zodSqlSchema: z.ZodString;
192
- zodNewSchema: z.ZodString;
193
- initialValue: TDefaultNext;
194
- zodClientSchema: z.ZodString;
195
- zodValidationSchema: TValidationNext;
196
- };
197
- transform: (transforms: {
198
- toClient: (dbValue: string) => string;
199
- toDb: (clientValue: string) => string;
200
- }) => {
175
+ };
176
+ pets: {
177
+ config: {
178
+ sql: ({
179
+ fromKey: string;
180
+ toKey: () => any;
181
+ schema: () => {
182
+ _tableName: string;
183
+ id: {
201
184
  config: {
202
185
  sql: {
203
- type: "varchar";
204
- length: number;
186
+ type: "int";
187
+ pk: true;
205
188
  };
206
- zodSqlSchema: z.ZodString;
207
- zodNewSchema: z.ZodString;
208
- initialValue: TDefaultNext;
209
- zodClientSchema: z.ZodString;
210
- zodValidationSchema: TValidationNext;
189
+ zodSqlSchema: z.ZodNumber;
190
+ zodNewSchema: z.ZodNumber;
191
+ initialValue: string;
192
+ zodClientSchema: z.ZodUnion<[z.ZodNumber, z.ZodNumber]>;
193
+ zodValidationSchema: z.ZodString;
211
194
  } & {
212
195
  transforms: {
213
- toClient: (dbValue: string) => string;
214
- toDb: (clientValue: string) => string;
196
+ toClient: (dbValue: number) => number;
197
+ toDb: (clientValue: number) => number;
215
198
  };
216
199
  };
217
200
  };
218
- };
219
- client: <TClientNext extends z.ZodTypeAny>(schema: TClientNext | ((tools: {
220
- sql: z.ZodString;
221
- initialState: z.ZodString;
222
- }) => TClientNext)) => {
223
- config: {
224
- sql: {
225
- type: "varchar";
226
- length: number;
227
- };
228
- zodSqlSchema: z.ZodString;
229
- zodNewSchema: z.ZodString;
230
- initialValue: TDefaultNext;
231
- zodClientSchema: TClientNext;
232
- zodValidationSchema: TClientNext;
201
+ name: import("../schema.js").Builder<"sql", {
202
+ type: "varchar";
203
+ length: number;
204
+ }, z.ZodString, z.ZodString, string, z.ZodString, z.ZodString>;
205
+ userId: {
206
+ type: "reference";
207
+ to: () => import("../schema.js").Builder<"sql", {
208
+ type: "int";
209
+ pk: true;
210
+ }, z.ZodNumber, z.ZodNumber, number, z.ZodNumber, z.ZodNumber>;
233
211
  };
234
- validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
235
- sql: z.ZodString;
236
- initialState: z.ZodString;
237
- client: TClientNext;
238
- }) => TValidationNext)) => {
212
+ fluffynessScale: {
239
213
  config: {
240
214
  sql: {
241
- type: "varchar";
242
- length: number;
215
+ type: "text";
243
216
  };
244
217
  zodSqlSchema: z.ZodString;
245
218
  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
- };
219
+ initialValue: string;
220
+ zodClientSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
221
+ zodValidationSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
222
+ } & {
223
+ transforms: {
224
+ toClient: (dbValue: string) => ("bald" | "fuzzy" | "fluffy" | "poof")[];
225
+ toDb: (clientValue: ("bald" | "fuzzy" | "fluffy" | "poof")[]) => string;
269
226
  };
270
227
  };
271
228
  };
272
- transform: (transforms: {
273
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
274
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
275
- }) => {
229
+ favourite: {
276
230
  config: {
277
231
  sql: {
278
- type: "varchar";
279
- length: number;
232
+ type: "int";
280
233
  };
281
- zodSqlSchema: z.ZodString;
282
- zodNewSchema: z.ZodString;
283
- initialValue: TDefaultNext;
284
- zodClientSchema: TClientNext;
285
- zodValidationSchema: TClientNext;
234
+ zodSqlSchema: z.ZodNumber;
235
+ zodNewSchema: z.ZodNumber;
236
+ initialValue: number;
237
+ zodClientSchema: z.ZodBoolean;
238
+ zodValidationSchema: z.ZodBoolean;
286
239
  } & {
287
240
  transforms: {
288
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
289
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
241
+ toClient: (dbValue: number) => boolean;
242
+ toDb: (clientValue: boolean) => number;
290
243
  };
291
244
  };
292
245
  };
293
246
  };
294
- transform: (transforms: {
295
- toClient: (dbValue: string) => string;
296
- toDb: (clientValue: string) => string;
297
- }) => {
298
- config: {
299
- sql: {
300
- type: "varchar";
301
- length: number;
302
- };
303
- zodSqlSchema: z.ZodString;
304
- zodNewSchema: z.ZodString;
305
- initialValue: TDefaultNext;
306
- zodClientSchema: z.ZodString;
307
- zodValidationSchema: z.ZodString;
308
- } & {
309
- transforms: {
310
- toClient: (dbValue: string) => string;
311
- toDb: (clientValue: string) => string;
312
- };
313
- };
314
- };
315
- };
316
- <TNewNext extends z.ZodTypeAny, TDefaultNext>(schema: TNewNext | ((tools: {
317
- sql: z.ZodString;
318
- }) => TNewNext), defaultValue: () => TDefaultNext): {
319
- config: {
320
- sql: {
321
- type: "varchar";
322
- length: number;
323
- };
324
- zodSqlSchema: z.ZodString;
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]>;
329
- };
330
- validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
331
- sql: z.ZodString;
332
- initialState: TNewNext;
333
- client: z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>;
334
- }) => TValidationNext)) => {
335
- config: {
336
- sql: {
337
- type: "varchar";
338
- length: number;
339
- };
340
- zodSqlSchema: z.ZodString;
341
- zodNewSchema: TNewNext;
342
- initialValue: z.TypeOf<TNewNext>;
343
- zodClientSchema: z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>;
344
- zodValidationSchema: TValidationNext;
345
- };
346
- transform: (transforms: {
347
- toClient: (dbValue: string) => z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>;
348
- toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>) => string;
349
- }) => {
247
+ defaultCount?: number;
248
+ } & {
249
+ type: "hasMany";
250
+ }) | ({
251
+ fromKey: string;
252
+ toKey: () => any;
253
+ schema: () => {
254
+ _tableName: string;
255
+ id: {
350
256
  config: {
351
257
  sql: {
352
- type: "varchar";
353
- length: number;
258
+ type: "int";
259
+ pk: true;
354
260
  };
355
- zodSqlSchema: z.ZodString;
356
- zodNewSchema: TNewNext;
357
- initialValue: z.TypeOf<TNewNext>;
358
- zodClientSchema: z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>;
359
- zodValidationSchema: TValidationNext;
261
+ zodSqlSchema: z.ZodNumber;
262
+ zodNewSchema: z.ZodNumber;
263
+ initialValue: string;
264
+ zodClientSchema: z.ZodUnion<[z.ZodNumber, z.ZodNumber]>;
265
+ zodValidationSchema: z.ZodString;
360
266
  } & {
361
267
  transforms: {
362
- toClient: (dbValue: string) => z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>;
363
- toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>) => string;
268
+ toClient: (dbValue: number) => number;
269
+ toDb: (clientValue: number) => number;
364
270
  };
365
271
  };
366
272
  };
367
- };
368
- client: <TClientNext extends z.ZodTypeAny>(schema: TClientNext | ((tools: {
369
- sql: z.ZodString;
370
- initialState: TNewNext;
371
- }) => TClientNext)) => {
372
- config: {
373
- sql: {
374
- type: "varchar";
375
- length: number;
376
- };
377
- zodSqlSchema: z.ZodString;
378
- zodNewSchema: TNewNext;
379
- initialValue: z.TypeOf<TNewNext>;
380
- zodClientSchema: TClientNext;
381
- zodValidationSchema: TClientNext;
382
- };
383
- validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
384
- sql: z.ZodString;
385
- initialState: TNewNext;
386
- client: TClientNext;
387
- }) => TValidationNext)) => {
388
- config: {
389
- sql: {
390
- type: "varchar";
391
- length: number;
392
- };
393
- zodSqlSchema: z.ZodString;
394
- zodNewSchema: TNewNext;
395
- initialValue: z.TypeOf<TNewNext>;
396
- zodClientSchema: TClientNext;
397
- zodValidationSchema: TValidationNext;
398
- };
399
- transform: (transforms: {
400
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
401
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
402
- }) => {
403
- config: {
404
- sql: {
405
- type: "varchar";
406
- length: number;
407
- };
408
- zodSqlSchema: z.ZodString;
409
- zodNewSchema: TNewNext;
410
- initialValue: z.TypeOf<TNewNext>;
411
- zodClientSchema: TClientNext;
412
- zodValidationSchema: TValidationNext;
413
- } & {
414
- transforms: {
415
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
416
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
417
- };
418
- };
419
- };
273
+ name: import("../schema.js").Builder<"sql", {
274
+ type: "varchar";
275
+ length: number;
276
+ }, z.ZodString, z.ZodString, string, z.ZodString, z.ZodString>;
277
+ userId: {
278
+ type: "reference";
279
+ to: () => import("../schema.js").Builder<"sql", {
280
+ type: "int";
281
+ pk: true;
282
+ }, z.ZodNumber, z.ZodNumber, number, z.ZodNumber, z.ZodNumber>;
420
283
  };
421
- transform: (transforms: {
422
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
423
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
424
- }) => {
284
+ fluffynessScale: {
425
285
  config: {
426
286
  sql: {
427
- type: "varchar";
428
- length: number;
287
+ type: "text";
429
288
  };
430
289
  zodSqlSchema: z.ZodString;
431
- zodNewSchema: TNewNext;
432
- initialValue: z.TypeOf<TNewNext>;
433
- zodClientSchema: TClientNext;
434
- zodValidationSchema: TClientNext;
290
+ zodNewSchema: z.ZodString;
291
+ initialValue: string;
292
+ zodClientSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
293
+ zodValidationSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
435
294
  } & {
436
295
  transforms: {
437
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
438
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
296
+ toClient: (dbValue: string) => ("bald" | "fuzzy" | "fluffy" | "poof")[];
297
+ toDb: (clientValue: ("bald" | "fuzzy" | "fluffy" | "poof")[]) => string;
439
298
  };
440
299
  };
441
300
  };
442
- };
443
- transform: (transforms: {
444
- toClient: (dbValue: string) => z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>;
445
- toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>) => string;
446
- }) => {
447
- config: {
448
- sql: {
449
- type: "varchar";
450
- length: number;
451
- };
452
- zodSqlSchema: z.ZodString;
453
- zodNewSchema: TNewNext;
454
- initialValue: z.TypeOf<TNewNext>;
455
- zodClientSchema: z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>;
456
- zodValidationSchema: z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>;
457
- } & {
458
- transforms: {
459
- toClient: (dbValue: string) => z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>;
460
- toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>) => string;
461
- };
462
- };
463
- };
464
- };
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)) => {
486
- config: {
487
- sql: {
488
- type: "int";
489
- pk: true;
490
- };
491
- zodSqlSchema: z.ZodNumber;
492
- zodNewSchema: z.ZodNumber;
493
- initialValue: number;
494
- zodClientSchema: 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;
533
- };
534
- validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
535
- sql: z.ZodNumber;
536
- initialState: z.ZodNumber;
537
- client: TClientNext;
538
- }) => TValidationNext)) => {
539
- config: {
540
- sql: {
541
- type: "int";
542
- pk: true;
543
- };
544
- zodSqlSchema: z.ZodNumber;
545
- zodNewSchema: z.ZodNumber;
546
- initialValue: number;
547
- zodClientSchema: TClientNext;
548
- zodValidationSchema: TValidationNext;
549
- };
550
- transform: (transforms: {
551
- toClient: (dbValue: number) => z.TypeOf<TClientNext>;
552
- toDb: (clientValue: z.TypeOf<TClientNext>) => number;
553
- }) => {
301
+ favourite: {
554
302
  config: {
555
303
  sql: {
556
304
  type: "int";
557
- pk: true;
558
305
  };
559
306
  zodSqlSchema: z.ZodNumber;
560
307
  zodNewSchema: z.ZodNumber;
561
308
  initialValue: number;
562
- zodClientSchema: TClientNext;
563
- zodValidationSchema: TValidationNext;
309
+ zodClientSchema: z.ZodBoolean;
310
+ zodValidationSchema: z.ZodBoolean;
564
311
  } & {
565
312
  transforms: {
566
- toClient: (dbValue: number) => z.TypeOf<TClientNext>;
567
- toDb: (clientValue: z.TypeOf<TClientNext>) => number;
313
+ toClient: (dbValue: number) => boolean;
314
+ toDb: (clientValue: boolean) => number;
568
315
  };
569
316
  };
570
317
  };
571
318
  };
572
- transform: (transforms: {
573
- toClient: (dbValue: number) => z.TypeOf<TClientNext>;
574
- toDb: (clientValue: z.TypeOf<TClientNext>) => number;
575
- }) => {
576
- config: {
577
- sql: {
578
- type: "int";
579
- pk: true;
580
- };
581
- zodSqlSchema: z.ZodNumber;
582
- zodNewSchema: z.ZodNumber;
583
- initialValue: number;
584
- zodClientSchema: TClientNext;
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;
627
- };
628
- validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
629
- sql: z.ZodNumber;
630
- initialState: z.ZodNumber;
631
- client: z.ZodNumber;
632
- }) => TValidationNext)) => {
319
+ defaultCount?: number;
320
+ } & {
321
+ type: "hasOne";
322
+ }) | ({
323
+ fromKey: string;
324
+ toKey: () => any;
325
+ schema: () => {
326
+ _tableName: string;
327
+ id: {
633
328
  config: {
634
329
  sql: {
635
330
  type: "int";
@@ -637,2308 +332,299 @@ export declare const petSchema: {
637
332
  };
638
333
  zodSqlSchema: z.ZodNumber;
639
334
  zodNewSchema: z.ZodNumber;
640
- initialValue: TDefaultNext;
641
- zodClientSchema: z.ZodNumber;
642
- zodValidationSchema: TValidationNext;
643
- };
644
- transform: (transforms: {
645
- toClient: (dbValue: number) => number;
646
- toDb: (clientValue: number) => number;
647
- }) => {
648
- config: {
649
- sql: {
650
- type: "int";
651
- pk: true;
652
- };
653
- zodSqlSchema: z.ZodNumber;
654
- zodNewSchema: z.ZodNumber;
655
- initialValue: TDefaultNext;
656
- zodClientSchema: z.ZodNumber;
657
- zodValidationSchema: TValidationNext;
658
- } & {
659
- transforms: {
660
- toClient: (dbValue: number) => number;
661
- toDb: (clientValue: number) => number;
662
- };
663
- };
664
- };
665
- };
666
- client: <TClientNext extends z.ZodTypeAny>(schema: TClientNext | ((tools: {
667
- sql: z.ZodNumber;
668
- initialState: z.ZodNumber;
669
- }) => TClientNext)) => {
670
- config: {
671
- sql: {
672
- type: "int";
673
- pk: true;
674
- };
675
- zodSqlSchema: z.ZodNumber;
676
- zodNewSchema: z.ZodNumber;
677
- initialValue: TDefaultNext;
678
- zodClientSchema: TClientNext;
679
- zodValidationSchema: TClientNext;
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: {
698
- toClient: (dbValue: number) => z.TypeOf<TClientNext>;
699
- toDb: (clientValue: z.TypeOf<TClientNext>) => number;
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
- };
718
- };
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
- };
760
- };
761
- };
762
- };
763
- <TNewNext extends z.ZodTypeAny, TDefaultNext>(schema: TNewNext | ((tools: {
764
- sql: z.ZodNumber;
765
- }) => TNewNext), defaultValue: () => TDefaultNext): {
766
- config: {
767
- sql: {
768
- type: "int";
769
- pk: true;
770
- };
771
- zodSqlSchema: z.ZodNumber;
772
- zodNewSchema: TNewNext;
773
- initialValue: z.TypeOf<TNewNext>;
774
- zodClientSchema: z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>;
775
- zodValidationSchema: z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>;
776
- };
777
- validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
778
- sql: z.ZodNumber;
779
- initialState: TNewNext;
780
- client: z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>;
781
- }) => TValidationNext)) => {
782
- config: {
783
- sql: {
784
- type: "int";
785
- pk: true;
786
- };
787
- zodSqlSchema: z.ZodNumber;
788
- zodNewSchema: TNewNext;
789
- initialValue: z.TypeOf<TNewNext>;
790
- zodClientSchema: z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>;
791
- zodValidationSchema: TValidationNext;
792
- };
793
- transform: (transforms: {
794
- toClient: (dbValue: number) => z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>;
795
- toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>) => number;
796
- }) => {
797
- config: {
798
- sql: {
799
- type: "int";
800
- pk: true;
801
- };
802
- zodSqlSchema: z.ZodNumber;
803
- zodNewSchema: TNewNext;
804
- initialValue: z.TypeOf<TNewNext>;
805
- zodClientSchema: z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>;
806
- zodValidationSchema: TValidationNext;
807
- } & {
808
- transforms: {
809
- toClient: (dbValue: number) => z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>;
810
- toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>) => number;
811
- };
812
- };
813
- };
814
- };
815
- client: <TClientNext extends z.ZodTypeAny>(schema: TClientNext | ((tools: {
816
- sql: z.ZodNumber;
817
- initialState: TNewNext;
818
- }) => TClientNext)) => {
819
- config: {
820
- sql: {
821
- type: "int";
822
- pk: true;
823
- };
824
- zodSqlSchema: z.ZodNumber;
825
- zodNewSchema: TNewNext;
826
- initialValue: z.TypeOf<TNewNext>;
827
- zodClientSchema: TClientNext;
828
- zodValidationSchema: TClientNext;
829
- };
830
- validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
831
- sql: z.ZodNumber;
832
- initialState: TNewNext;
833
- client: TClientNext;
834
- }) => TValidationNext)) => {
835
- config: {
836
- sql: {
837
- type: "int";
838
- pk: true;
839
- };
840
- zodSqlSchema: z.ZodNumber;
841
- zodNewSchema: TNewNext;
842
- initialValue: z.TypeOf<TNewNext>;
843
- zodClientSchema: TClientNext;
844
- zodValidationSchema: TValidationNext;
845
- };
846
- transform: (transforms: {
847
- toClient: (dbValue: number) => z.TypeOf<TClientNext>;
848
- toDb: (clientValue: z.TypeOf<TClientNext>) => number;
849
- }) => {
850
- config: {
851
- sql: {
852
- type: "int";
853
- pk: true;
854
- };
855
- zodSqlSchema: z.ZodNumber;
856
- zodNewSchema: TNewNext;
857
- initialValue: z.TypeOf<TNewNext>;
858
- zodClientSchema: TClientNext;
859
- zodValidationSchema: TValidationNext;
860
- } & {
861
- transforms: {
862
- toClient: (dbValue: number) => z.TypeOf<TClientNext>;
863
- toDb: (clientValue: z.TypeOf<TClientNext>) => number;
864
- };
865
- };
866
- };
867
- };
868
- transform: (transforms: {
869
- toClient: (dbValue: number) => z.TypeOf<TClientNext>;
870
- toDb: (clientValue: z.TypeOf<TClientNext>) => number;
871
- }) => {
872
- config: {
873
- sql: {
874
- type: "int";
875
- pk: true;
876
- };
877
- zodSqlSchema: z.ZodNumber;
878
- zodNewSchema: TNewNext;
879
- initialValue: z.TypeOf<TNewNext>;
880
- zodClientSchema: TClientNext;
881
- zodValidationSchema: TClientNext;
882
- } & {
883
- transforms: {
884
- toClient: (dbValue: number) => z.TypeOf<TClientNext>;
885
- toDb: (clientValue: z.TypeOf<TClientNext>) => number;
886
- };
887
- };
888
- };
889
- };
890
- transform: (transforms: {
891
- toClient: (dbValue: number) => z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>;
892
- toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>) => number;
893
- }) => {
894
- config: {
895
- sql: {
896
- type: "int";
897
- pk: true;
898
- };
899
- zodSqlSchema: z.ZodNumber;
900
- zodNewSchema: TNewNext;
901
- initialValue: z.TypeOf<TNewNext>;
902
- zodClientSchema: z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>;
903
- zodValidationSchema: z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>;
904
- } & {
905
- transforms: {
906
- toClient: (dbValue: number) => z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>;
907
- toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>) => number;
908
- };
909
- };
910
- };
911
- };
912
- };
913
- };
914
- };
915
- fluffynessScale: {
916
- config: {
917
- sql: {
918
- type: "text";
919
- };
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)) => {
969
- config: {
970
- sql: {
971
- type: "int";
972
- pk: true;
973
- };
974
- zodSqlSchema: z.ZodNumber;
975
- zodNewSchema: z.ZodNumber;
976
- initialValue: number;
977
- zodClientSchema: z.ZodNumber;
978
- zodValidationSchema: TValidationNext;
979
- };
980
- transform: (transforms: {
981
- toClient: (dbValue: number) => number;
982
- toDb: (clientValue: number) => number;
983
- }) => {
984
- config: {
985
- sql: {
986
- type: "int";
987
- pk: true;
988
- };
989
- zodSqlSchema: z.ZodNumber;
990
- zodNewSchema: z.ZodNumber;
991
- initialValue: number;
992
- zodClientSchema: z.ZodNumber;
993
- zodValidationSchema: TValidationNext;
994
- } & {
995
- transforms: {
996
- toClient: (dbValue: number) => number;
997
- toDb: (clientValue: number) => number;
998
- };
999
- };
1000
- };
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)) => {
1022
- config: {
1023
- sql: {
1024
- type: "int";
1025
- pk: true;
1026
- };
1027
- zodSqlSchema: z.ZodNumber;
1028
- zodNewSchema: z.ZodNumber;
1029
- initialValue: number;
1030
- zodClientSchema: TClientNext;
1031
- zodValidationSchema: TValidationNext;
1032
- };
1033
- transform: (transforms: {
1034
- toClient: (dbValue: number) => z.TypeOf<TClientNext>;
1035
- toDb: (clientValue: z.TypeOf<TClientNext>) => number;
1036
- }) => {
1037
- config: {
1038
- sql: {
1039
- type: "int";
1040
- pk: true;
1041
- };
1042
- zodSqlSchema: z.ZodNumber;
1043
- zodNewSchema: z.ZodNumber;
1044
- initialValue: number;
1045
- zodClientSchema: TClientNext;
1046
- zodValidationSchema: TValidationNext;
1047
- } & {
1048
- transforms: {
1049
- toClient: (dbValue: number) => z.TypeOf<TClientNext>;
1050
- toDb: (clientValue: z.TypeOf<TClientNext>) => number;
1051
- };
1052
- };
1053
- };
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;
1152
- }) => TClientNext)) => {
1153
- config: {
1154
- sql: {
1155
- type: "int";
1156
- pk: true;
1157
- };
1158
- zodSqlSchema: z.ZodNumber;
1159
- zodNewSchema: z.ZodNumber;
1160
- initialValue: TDefaultNext;
1161
- zodClientSchema: TClientNext;
1162
- zodValidationSchema: TClientNext;
1163
- };
1164
- validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
1165
- sql: z.ZodNumber;
1166
- initialState: z.ZodNumber;
1167
- client: TClientNext;
1168
- }) => TValidationNext)) => {
1169
- config: {
1170
- sql: {
1171
- type: "int";
1172
- pk: true;
1173
- };
1174
- zodSqlSchema: z.ZodNumber;
1175
- zodNewSchema: z.ZodNumber;
1176
- initialValue: TDefaultNext;
1177
- zodClientSchema: TClientNext;
1178
- zodValidationSchema: TValidationNext;
1179
- };
1180
- transform: (transforms: {
1181
- toClient: (dbValue: number) => z.TypeOf<TClientNext>;
1182
- toDb: (clientValue: z.TypeOf<TClientNext>) => number;
1183
- }) => {
1184
- config: {
1185
- sql: {
1186
- type: "int";
1187
- pk: true;
1188
- };
1189
- zodSqlSchema: z.ZodNumber;
1190
- zodNewSchema: z.ZodNumber;
1191
- initialValue: TDefaultNext;
1192
- zodClientSchema: TClientNext;
1193
- zodValidationSchema: TValidationNext;
1194
- } & {
1195
- transforms: {
1196
- toClient: (dbValue: number) => z.TypeOf<TClientNext>;
1197
- toDb: (clientValue: z.TypeOf<TClientNext>) => number;
1198
- };
1199
- };
1200
- };
1201
- };
1202
- transform: (transforms: {
1203
- toClient: (dbValue: number) => z.TypeOf<TClientNext>;
1204
- toDb: (clientValue: z.TypeOf<TClientNext>) => number;
1205
- }) => {
1206
- config: {
1207
- sql: {
1208
- type: "int";
1209
- pk: true;
1210
- };
1211
- zodSqlSchema: z.ZodNumber;
1212
- zodNewSchema: z.ZodNumber;
1213
- initialValue: TDefaultNext;
1214
- zodClientSchema: TClientNext;
1215
- zodValidationSchema: TClientNext;
1216
- } & {
1217
- transforms: {
1218
- toClient: (dbValue: number) => z.TypeOf<TClientNext>;
1219
- toDb: (clientValue: z.TypeOf<TClientNext>) => number;
1220
- };
1221
- };
1222
- };
1223
- };
1224
- transform: (transforms: {
1225
- toClient: (dbValue: number) => number;
1226
- toDb: (clientValue: number) => number;
1227
- }) => {
1228
- config: {
1229
- sql: {
1230
- type: "int";
1231
- pk: true;
1232
- };
1233
- zodSqlSchema: z.ZodNumber;
1234
- zodNewSchema: z.ZodNumber;
1235
- initialValue: TDefaultNext;
1236
- zodClientSchema: z.ZodNumber;
1237
- zodValidationSchema: z.ZodNumber;
1238
- } & {
1239
- transforms: {
1240
- toClient: (dbValue: number) => number;
1241
- toDb: (clientValue: number) => number;
1242
- };
1243
- };
1244
- };
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)) => {
1265
- config: {
1266
- sql: {
1267
- type: "int";
1268
- pk: true;
1269
- };
1270
- zodSqlSchema: z.ZodNumber;
1271
- zodNewSchema: TNewNext;
1272
- initialValue: z.TypeOf<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;
1312
- };
1313
- validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
1314
- sql: z.ZodNumber;
1315
- initialState: TNewNext;
1316
- client: TClientNext;
1317
- }) => TValidationNext)) => {
1318
- config: {
1319
- sql: {
1320
- type: "int";
1321
- pk: true;
1322
- };
1323
- zodSqlSchema: z.ZodNumber;
1324
- zodNewSchema: TNewNext;
1325
- initialValue: z.TypeOf<TNewNext>;
1326
- zodClientSchema: TClientNext;
1327
- zodValidationSchema: TValidationNext;
1328
- };
1329
- transform: (transforms: {
1330
- toClient: (dbValue: number) => z.TypeOf<TClientNext>;
1331
- toDb: (clientValue: z.TypeOf<TClientNext>) => number;
1332
- }) => {
1333
- config: {
1334
- sql: {
1335
- type: "int";
1336
- pk: true;
1337
- };
1338
- zodSqlSchema: z.ZodNumber;
1339
- zodNewSchema: TNewNext;
1340
- initialValue: z.TypeOf<TNewNext>;
1341
- zodClientSchema: TClientNext;
1342
- zodValidationSchema: TValidationNext;
1343
- } & {
1344
- transforms: {
1345
- toClient: (dbValue: number) => z.TypeOf<TClientNext>;
1346
- toDb: (clientValue: z.TypeOf<TClientNext>) => number;
1347
- };
1348
- };
1349
- };
1350
- };
1351
- transform: (transforms: {
1352
- toClient: (dbValue: number) => z.TypeOf<TClientNext>;
1353
- toDb: (clientValue: z.TypeOf<TClientNext>) => number;
1354
- }) => {
1355
- config: {
1356
- sql: {
1357
- type: "int";
1358
- pk: true;
1359
- };
1360
- zodSqlSchema: z.ZodNumber;
1361
- zodNewSchema: TNewNext;
1362
- initialValue: z.TypeOf<TNewNext>;
1363
- zodClientSchema: TClientNext;
1364
- zodValidationSchema: TClientNext;
1365
- } & {
1366
- transforms: {
1367
- toClient: (dbValue: number) => z.TypeOf<TClientNext>;
1368
- toDb: (clientValue: z.TypeOf<TClientNext>) => number;
1369
- };
1370
- };
1371
- };
1372
- };
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
- }) => {
1377
- config: {
1378
- sql: {
1379
- type: "int";
1380
- pk: true;
1381
- };
1382
- zodSqlSchema: z.ZodNumber;
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;
1391
- };
1392
- };
1393
- };
1394
- };
1395
- };
1396
- };
1397
- firstname: {
1398
- config: {
1399
- sql: {
1400
- type: "varchar";
1401
- length: number;
1402
- };
1403
- zodSqlSchema: z.ZodString;
1404
- zodNewSchema: z.ZodString;
1405
- initialValue: string;
1406
- zodClientSchema: z.ZodString;
1407
- zodValidationSchema: z.ZodString;
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
- };
1428
- };
1429
- };
1430
- };
1431
- surname: {
1432
- config: {
1433
- sql: {
1434
- type: "varchar";
1435
- length: number;
1436
- };
1437
- zodSqlSchema: z.ZodString;
1438
- zodNewSchema: z.ZodString;
1439
- initialValue: string;
1440
- zodClientSchema: z.ZodString;
1441
- zodValidationSchema: z.ZodString;
1442
- };
1443
- transform: (transforms: {
1444
- toClient: (dbValue: string) => string;
1445
- toDb: (clientValue: string) => string;
1446
- }) => {
1447
- config: {
1448
- sql: {
1449
- type: "varchar";
1450
- length: number;
1451
- };
1452
- zodSqlSchema: z.ZodString;
1453
- zodNewSchema: z.ZodString;
1454
- initialValue: string;
1455
- zodClientSchema: z.ZodString;
1456
- zodValidationSchema: z.ZodString;
1457
- } & {
1458
- transforms: {
1459
- toClient: (dbValue: string) => string;
1460
- toDb: (clientValue: string) => string;
1461
- };
1462
- };
1463
- };
1464
- };
1465
- email: {
1466
- config: {
1467
- sql: {
1468
- type: "varchar";
1469
- length: number;
1470
- };
1471
- zodSqlSchema: z.ZodString;
1472
- zodNewSchema: z.ZodString;
1473
- initialValue: string;
1474
- zodClientSchema: z.ZodString;
1475
- zodValidationSchema: z.ZodString;
1476
- };
1477
- transform: (transforms: {
1478
- toClient: (dbValue: string) => string;
1479
- toDb: (clientValue: string) => string;
1480
- }) => {
1481
- config: {
1482
- sql: {
1483
- type: "varchar";
1484
- length: number;
1485
- };
1486
- zodSqlSchema: z.ZodString;
1487
- zodNewSchema: z.ZodString;
1488
- initialValue: string;
1489
- zodClientSchema: z.ZodString;
1490
- zodValidationSchema: z.ZodString;
1491
- } & {
1492
- transforms: {
1493
- toClient: (dbValue: string) => string;
1494
- toDb: (clientValue: string) => string;
1495
- };
1496
- };
1497
- };
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
- } | {
1520
- config: {
1521
- sql: {
1522
- type: "varchar";
1523
- length: number;
1524
- };
1525
- zodSqlSchema: z.ZodString;
1526
- zodNewSchema: z.ZodString;
1527
- initialValue: string;
1528
- zodClientSchema: z.ZodString;
1529
- zodValidationSchema: z.ZodString;
1530
- };
1531
- validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
1532
- sql: z.ZodString;
1533
- initialState: z.ZodString;
1534
- client: z.ZodString;
1535
- }) => TValidationNext)) => {
1536
- config: {
1537
- sql: {
1538
- type: "varchar";
1539
- length: number;
1540
- };
1541
- zodSqlSchema: z.ZodString;
1542
- zodNewSchema: z.ZodString;
1543
- initialValue: string;
1544
- zodClientSchema: z.ZodString;
1545
- zodValidationSchema: TValidationNext;
1546
- };
1547
- transform: (transforms: {
1548
- toClient: (dbValue: string) => string;
1549
- toDb: (clientValue: string) => string;
1550
- }) => {
1551
- config: {
1552
- sql: {
1553
- type: "varchar";
1554
- length: number;
1555
- };
1556
- zodSqlSchema: z.ZodString;
1557
- zodNewSchema: z.ZodString;
1558
- initialValue: string;
1559
- zodClientSchema: z.ZodString;
1560
- zodValidationSchema: TValidationNext;
1561
- } & {
1562
- transforms: {
1563
- toClient: (dbValue: string) => string;
1564
- toDb: (clientValue: string) => string;
1565
- };
1566
- };
1567
- };
1568
- };
1569
- client: <TClientNext extends z.ZodTypeAny>(schema: TClientNext | ((tools: {
1570
- sql: z.ZodString;
1571
- initialState: z.ZodString;
1572
- }) => TClientNext)) => {
1573
- config: {
1574
- sql: {
1575
- type: "varchar";
1576
- length: number;
1577
- };
1578
- zodSqlSchema: z.ZodString;
1579
- zodNewSchema: z.ZodString;
1580
- initialValue: string;
1581
- zodClientSchema: TClientNext;
1582
- zodValidationSchema: TClientNext;
1583
- };
1584
- validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
1585
- sql: z.ZodString;
1586
- initialState: z.ZodString;
1587
- client: TClientNext;
1588
- }) => TValidationNext)) => {
1589
- config: {
1590
- sql: {
1591
- type: "varchar";
1592
- length: number;
1593
- };
1594
- zodSqlSchema: z.ZodString;
1595
- zodNewSchema: z.ZodString;
1596
- initialValue: string;
1597
- zodClientSchema: TClientNext;
1598
- zodValidationSchema: TValidationNext;
1599
- };
1600
- transform: (transforms: {
1601
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
1602
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
1603
- }) => {
1604
- config: {
1605
- sql: {
1606
- type: "varchar";
1607
- length: number;
1608
- };
1609
- zodSqlSchema: z.ZodString;
1610
- zodNewSchema: z.ZodString;
1611
- initialValue: string;
1612
- zodClientSchema: TClientNext;
1613
- zodValidationSchema: TValidationNext;
1614
- } & {
1615
- transforms: {
1616
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
1617
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
1618
- };
1619
- };
1620
- };
1621
- };
1622
- transform: (transforms: {
1623
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
1624
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
1625
- }) => {
1626
- config: {
1627
- sql: {
1628
- type: "varchar";
1629
- length: number;
1630
- };
1631
- zodSqlSchema: z.ZodString;
1632
- zodNewSchema: z.ZodString;
1633
- initialValue: string;
1634
- zodClientSchema: TClientNext;
1635
- zodValidationSchema: TClientNext;
1636
- } & {
1637
- transforms: {
1638
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
1639
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
1640
- };
1641
- };
1642
- };
1643
- };
1644
- transform: (transforms: {
1645
- toClient: (dbValue: string) => string;
1646
- toDb: (clientValue: string) => string;
1647
- }) => {
1648
- config: {
1649
- sql: {
1650
- type: "varchar";
1651
- length: number;
1652
- };
1653
- zodSqlSchema: z.ZodString;
1654
- zodNewSchema: z.ZodString;
1655
- initialValue: string;
1656
- zodClientSchema: z.ZodString;
1657
- zodValidationSchema: z.ZodString;
1658
- } & {
1659
- transforms: {
1660
- toClient: (dbValue: string) => string;
1661
- toDb: (clientValue: string) => string;
1662
- };
1663
- };
1664
- };
1665
- initialState: {
1666
- <TDefaultNext>(defaultValue: () => TDefaultNext): {
1667
- config: {
1668
- sql: {
1669
- type: "varchar";
1670
- length: number;
1671
- };
1672
- zodSqlSchema: z.ZodString;
1673
- zodNewSchema: z.ZodString;
1674
- initialValue: TDefaultNext;
1675
- zodClientSchema: z.ZodString;
1676
- zodValidationSchema: z.ZodString;
1677
- };
1678
- validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
1679
- sql: z.ZodString;
1680
- initialState: z.ZodString;
1681
- client: z.ZodString;
1682
- }) => TValidationNext)) => {
1683
- config: {
1684
- sql: {
1685
- type: "varchar";
1686
- length: number;
1687
- };
1688
- zodSqlSchema: z.ZodString;
1689
- zodNewSchema: z.ZodString;
1690
- initialValue: TDefaultNext;
1691
- zodClientSchema: z.ZodString;
1692
- zodValidationSchema: TValidationNext;
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
- };
1713
- };
1714
- };
1715
- };
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;
1730
- };
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
- };
1768
- };
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
- };
1789
- };
1790
- };
1791
- transform: (transforms: {
1792
- toClient: (dbValue: string) => string;
1793
- toDb: (clientValue: string) => string;
1794
- }) => {
1795
- config: {
1796
- sql: {
1797
- type: "varchar";
1798
- length: number;
1799
- };
1800
- zodSqlSchema: z.ZodString;
1801
- zodNewSchema: z.ZodString;
1802
- initialValue: TDefaultNext;
1803
- zodClientSchema: z.ZodString;
1804
- zodValidationSchema: z.ZodString;
1805
- } & {
1806
- transforms: {
1807
- toClient: (dbValue: string) => string;
1808
- toDb: (clientValue: string) => string;
1809
- };
1810
- };
1811
- };
1812
- };
1813
- <TNewNext extends z.ZodTypeAny, TDefaultNext>(schema: TNewNext | ((tools: {
1814
- sql: z.ZodString;
1815
- }) => TNewNext), defaultValue: () => TDefaultNext): {
1816
- config: {
1817
- sql: {
1818
- type: "varchar";
1819
- length: number;
1820
- };
1821
- zodSqlSchema: z.ZodString;
1822
- zodNewSchema: TNewNext;
1823
- initialValue: z.TypeOf<TNewNext>;
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]>;
1826
- };
1827
- validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
1828
- sql: z.ZodString;
1829
- initialState: TNewNext;
1830
- client: z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>;
1831
- }) => TValidationNext)) => {
1832
- config: {
1833
- sql: {
1834
- type: "varchar";
1835
- length: number;
1836
- };
1837
- zodSqlSchema: z.ZodString;
1838
- zodNewSchema: TNewNext;
1839
- initialValue: z.TypeOf<TNewNext>;
1840
- zodClientSchema: z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>;
1841
- zodValidationSchema: TValidationNext;
1842
- };
1843
- transform: (transforms: {
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;
1846
- }) => {
1847
- config: {
1848
- sql: {
1849
- type: "varchar";
1850
- length: number;
1851
- };
1852
- zodSqlSchema: z.ZodString;
1853
- zodNewSchema: TNewNext;
1854
- initialValue: z.TypeOf<TNewNext>;
1855
- zodClientSchema: z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>;
1856
- zodValidationSchema: TValidationNext;
1857
- } & {
1858
- transforms: {
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;
1861
- };
1862
- };
1863
- };
1864
- };
1865
- client: <TClientNext extends z.ZodTypeAny>(schema: TClientNext | ((tools: {
1866
- sql: z.ZodString;
1867
- initialState: TNewNext;
1868
- }) => TClientNext)) => {
1869
- config: {
1870
- sql: {
1871
- type: "varchar";
1872
- length: number;
1873
- };
1874
- zodSqlSchema: z.ZodString;
1875
- zodNewSchema: TNewNext;
1876
- initialValue: z.TypeOf<TNewNext>;
1877
- zodClientSchema: TClientNext;
1878
- zodValidationSchema: TClientNext;
1879
- };
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;
2104
- } & {
2105
- transforms: {
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;
335
+ initialValue: string;
336
+ zodClientSchema: z.ZodUnion<[z.ZodNumber, z.ZodNumber]>;
337
+ zodValidationSchema: z.ZodString;
338
+ } & {
339
+ transforms: {
340
+ toClient: (dbValue: number) => number;
341
+ toDb: (clientValue: number) => number;
342
+ };
343
+ };
2460
344
  };
2461
- };
2462
- };
2463
- name: {
2464
- config: {
2465
- sql: {
345
+ name: import("../schema.js").Builder<"sql", {
2466
346
  type: "varchar";
2467
347
  length: number;
348
+ }, z.ZodString, z.ZodString, string, z.ZodString, z.ZodString>;
349
+ userId: {
350
+ type: "reference";
351
+ to: () => import("../schema.js").Builder<"sql", {
352
+ type: "int";
353
+ pk: true;
354
+ }, z.ZodNumber, z.ZodNumber, number, z.ZodNumber, z.ZodNumber>;
2468
355
  };
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
- }) => {
356
+ fluffynessScale: {
2495
357
  config: {
2496
358
  sql: {
2497
- type: "varchar";
2498
- length: number;
359
+ type: "text";
2499
360
  };
2500
361
  zodSqlSchema: z.ZodString;
2501
362
  zodNewSchema: z.ZodString;
2502
363
  initialValue: string;
2503
- zodClientSchema: z.ZodString;
2504
- zodValidationSchema: TValidationNext;
364
+ zodClientSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
365
+ zodValidationSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
2505
366
  } & {
2506
367
  transforms: {
2507
- toClient: (dbValue: string) => string;
2508
- toDb: (clientValue: string) => string;
368
+ toClient: (dbValue: string) => ("bald" | "fuzzy" | "fluffy" | "poof")[];
369
+ toDb: (clientValue: ("bald" | "fuzzy" | "fluffy" | "poof")[]) => string;
2509
370
  };
2510
371
  };
2511
372
  };
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;
373
+ favourite: {
374
+ config: {
375
+ sql: {
376
+ type: "int";
377
+ };
378
+ zodSqlSchema: z.ZodNumber;
379
+ zodNewSchema: z.ZodNumber;
380
+ initialValue: number;
381
+ zodClientSchema: z.ZodBoolean;
382
+ zodValidationSchema: z.ZodBoolean;
383
+ } & {
384
+ transforms: {
385
+ toClient: (dbValue: number) => boolean;
386
+ toDb: (clientValue: boolean) => number;
387
+ };
2521
388
  };
2522
- zodSqlSchema: z.ZodString;
2523
- zodNewSchema: z.ZodString;
2524
- initialValue: string;
2525
- zodClientSchema: TClientNext;
2526
- zodValidationSchema: TClientNext;
2527
389
  };
2528
- validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
2529
- sql: z.ZodString;
2530
- initialState: z.ZodString;
2531
- client: TClientNext;
2532
- }) => TValidationNext)) => {
390
+ };
391
+ defaultCount?: number;
392
+ } & {
393
+ type: "belongsTo";
394
+ }) | ({
395
+ fromKey: string;
396
+ toKey: () => any;
397
+ schema: () => {
398
+ _tableName: string;
399
+ id: {
2533
400
  config: {
2534
401
  sql: {
2535
- type: "varchar";
2536
- length: number;
402
+ type: "int";
403
+ pk: true;
2537
404
  };
2538
- zodSqlSchema: z.ZodString;
2539
- zodNewSchema: z.ZodString;
405
+ zodSqlSchema: z.ZodNumber;
406
+ zodNewSchema: z.ZodNumber;
2540
407
  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
- };
408
+ zodClientSchema: z.ZodUnion<[z.ZodNumber, z.ZodNumber]>;
409
+ zodValidationSchema: z.ZodString;
410
+ } & {
411
+ transforms: {
412
+ toClient: (dbValue: number) => number;
413
+ toDb: (clientValue: number) => number;
2563
414
  };
2564
415
  };
2565
416
  };
2566
- transform: (transforms: {
2567
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
2568
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
2569
- }) => {
417
+ name: import("../schema.js").Builder<"sql", {
418
+ type: "varchar";
419
+ length: number;
420
+ }, z.ZodString, z.ZodString, string, z.ZodString, z.ZodString>;
421
+ userId: {
422
+ type: "reference";
423
+ to: () => import("../schema.js").Builder<"sql", {
424
+ type: "int";
425
+ pk: true;
426
+ }, z.ZodNumber, z.ZodNumber, number, z.ZodNumber, z.ZodNumber>;
427
+ };
428
+ fluffynessScale: {
2570
429
  config: {
2571
430
  sql: {
2572
- type: "varchar";
2573
- length: number;
431
+ type: "text";
2574
432
  };
2575
433
  zodSqlSchema: z.ZodString;
2576
434
  zodNewSchema: z.ZodString;
2577
435
  initialValue: string;
2578
- zodClientSchema: TClientNext;
2579
- zodValidationSchema: TClientNext;
436
+ zodClientSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
437
+ zodValidationSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
2580
438
  } & {
2581
439
  transforms: {
2582
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
2583
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
440
+ toClient: (dbValue: string) => ("bald" | "fuzzy" | "fluffy" | "poof")[];
441
+ toDb: (clientValue: ("bald" | "fuzzy" | "fluffy" | "poof")[]) => string;
2584
442
  };
2585
443
  };
2586
444
  };
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): {
445
+ favourite: {
2611
446
  config: {
2612
447
  sql: {
2613
- type: "varchar";
2614
- length: number;
448
+ type: "int";
449
+ };
450
+ zodSqlSchema: z.ZodNumber;
451
+ zodNewSchema: z.ZodNumber;
452
+ initialValue: number;
453
+ zodClientSchema: z.ZodBoolean;
454
+ zodValidationSchema: z.ZodBoolean;
455
+ } & {
456
+ transforms: {
457
+ toClient: (dbValue: number) => boolean;
458
+ toDb: (clientValue: boolean) => number;
2615
459
  };
2616
- zodSqlSchema: z.ZodString;
2617
- zodNewSchema: z.ZodString;
2618
- initialValue: TDefaultNext;
2619
- zodClientSchema: z.ZodString;
2620
- zodValidationSchema: z.ZodString;
2621
460
  };
2622
- validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
2623
- sql: z.ZodString;
2624
- initialState: z.ZodString;
2625
- client: z.ZodString;
2626
- }) => TValidationNext)) => {
461
+ };
462
+ };
463
+ defaultCount?: number;
464
+ } & {
465
+ type: "manyToMany";
466
+ });
467
+ zodSqlSchema: z.ZodArray<z.ZodAny, "many">;
468
+ zodNewSchema: z.ZodArray<z.ZodAny, "many">;
469
+ initialValue: any[];
470
+ zodClientSchema: z.ZodArray<z.ZodAny, "many">;
471
+ zodValidationSchema: z.ZodArray<z.ZodAny, "many">;
472
+ };
473
+ transform: (transforms: {
474
+ toClient: (dbValue: any[]) => any[];
475
+ toDb: (clientValue: any[]) => any[];
476
+ }) => {
477
+ config: {
478
+ sql: ({
479
+ fromKey: string;
480
+ toKey: () => any;
481
+ schema: () => {
482
+ _tableName: string;
483
+ id: {
2627
484
  config: {
2628
485
  sql: {
2629
- type: "varchar";
2630
- length: number;
486
+ type: "int";
487
+ pk: true;
2631
488
  };
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
- };
489
+ zodSqlSchema: z.ZodNumber;
490
+ zodNewSchema: z.ZodNumber;
491
+ initialValue: string;
492
+ zodClientSchema: z.ZodUnion<[z.ZodNumber, z.ZodNumber]>;
493
+ zodValidationSchema: z.ZodString;
494
+ } & {
495
+ transforms: {
496
+ toClient: (dbValue: number) => number;
497
+ toDb: (clientValue: number) => number;
2657
498
  };
2658
499
  };
2659
500
  };
2660
- client: <TClientNext extends z.ZodTypeAny>(schema: TClientNext | ((tools: {
2661
- sql: z.ZodString;
2662
- initialState: z.ZodString;
2663
- }) => TClientNext)) => {
501
+ name: import("../schema.js").Builder<"sql", {
502
+ type: "varchar";
503
+ length: number;
504
+ }, z.ZodString, z.ZodString, string, z.ZodString, z.ZodString>;
505
+ userId: {
506
+ type: "reference";
507
+ to: () => import("../schema.js").Builder<"sql", {
508
+ type: "int";
509
+ pk: true;
510
+ }, z.ZodNumber, z.ZodNumber, number, z.ZodNumber, z.ZodNumber>;
511
+ };
512
+ fluffynessScale: {
2664
513
  config: {
2665
514
  sql: {
2666
- type: "varchar";
2667
- length: number;
515
+ type: "text";
2668
516
  };
2669
517
  zodSqlSchema: z.ZodString;
2670
518
  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
- };
519
+ initialValue: string;
520
+ zodClientSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
521
+ zodValidationSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
522
+ } & {
523
+ transforms: {
524
+ toClient: (dbValue: string) => ("bald" | "fuzzy" | "fluffy" | "poof")[];
525
+ toDb: (clientValue: ("bald" | "fuzzy" | "fluffy" | "poof")[]) => string;
2732
526
  };
2733
527
  };
2734
528
  };
2735
- transform: (transforms: {
2736
- toClient: (dbValue: string) => string;
2737
- toDb: (clientValue: string) => string;
2738
- }) => {
529
+ favourite: {
2739
530
  config: {
2740
531
  sql: {
2741
- type: "varchar";
2742
- length: number;
532
+ type: "int";
2743
533
  };
2744
- zodSqlSchema: z.ZodString;
2745
- zodNewSchema: z.ZodString;
2746
- initialValue: TDefaultNext;
2747
- zodClientSchema: z.ZodString;
2748
- zodValidationSchema: z.ZodString;
534
+ zodSqlSchema: z.ZodNumber;
535
+ zodNewSchema: z.ZodNumber;
536
+ initialValue: number;
537
+ zodClientSchema: z.ZodBoolean;
538
+ zodValidationSchema: z.ZodBoolean;
2749
539
  } & {
2750
540
  transforms: {
2751
- toClient: (dbValue: string) => string;
2752
- toDb: (clientValue: string) => string;
541
+ toClient: (dbValue: number) => boolean;
542
+ toDb: (clientValue: boolean) => number;
2753
543
  };
2754
544
  };
2755
545
  };
2756
546
  };
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)) => {
547
+ defaultCount?: number;
548
+ } & {
549
+ type: "hasMany";
550
+ }) | ({
551
+ fromKey: string;
552
+ toKey: () => any;
553
+ schema: () => {
554
+ _tableName: string;
555
+ id: {
2776
556
  config: {
2777
557
  sql: {
2778
- type: "varchar";
2779
- length: number;
558
+ type: "int";
559
+ pk: true;
2780
560
  };
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
- };
561
+ zodSqlSchema: z.ZodNumber;
562
+ zodNewSchema: z.ZodNumber;
563
+ initialValue: string;
564
+ zodClientSchema: z.ZodUnion<[z.ZodNumber, z.ZodNumber]>;
565
+ zodValidationSchema: z.ZodString;
566
+ } & {
567
+ transforms: {
568
+ toClient: (dbValue: number) => number;
569
+ toDb: (clientValue: number) => number;
2806
570
  };
2807
571
  };
2808
572
  };
2809
- client: <TClientNext extends z.ZodTypeAny>(schema: TClientNext | ((tools: {
2810
- sql: z.ZodString;
2811
- initialState: TNewNext;
2812
- }) => TClientNext)) => {
573
+ name: import("../schema.js").Builder<"sql", {
574
+ type: "varchar";
575
+ length: number;
576
+ }, z.ZodString, z.ZodString, string, z.ZodString, z.ZodString>;
577
+ userId: {
578
+ type: "reference";
579
+ to: () => import("../schema.js").Builder<"sql", {
580
+ type: "int";
581
+ pk: true;
582
+ }, z.ZodNumber, z.ZodNumber, number, z.ZodNumber, z.ZodNumber>;
583
+ };
584
+ fluffynessScale: {
2813
585
  config: {
2814
586
  sql: {
2815
- type: "varchar";
2816
- length: number;
587
+ type: "text";
2817
588
  };
2818
589
  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
- };
590
+ zodNewSchema: z.ZodString;
591
+ initialValue: string;
592
+ zodClientSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
593
+ zodValidationSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
594
+ } & {
595
+ transforms: {
596
+ toClient: (dbValue: string) => ("bald" | "fuzzy" | "fluffy" | "poof")[];
597
+ toDb: (clientValue: ("bald" | "fuzzy" | "fluffy" | "poof")[]) => string;
2881
598
  };
2882
599
  };
2883
600
  };
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
- }) => {
601
+ favourite: {
2888
602
  config: {
2889
603
  sql: {
2890
- type: "varchar";
2891
- length: number;
604
+ type: "int";
2892
605
  };
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]>;
606
+ zodSqlSchema: z.ZodNumber;
607
+ zodNewSchema: z.ZodNumber;
608
+ initialValue: number;
609
+ zodClientSchema: z.ZodBoolean;
610
+ zodValidationSchema: z.ZodBoolean;
2898
611
  } & {
2899
612
  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;
613
+ toClient: (dbValue: number) => boolean;
614
+ toDb: (clientValue: boolean) => number;
2902
615
  };
2903
616
  };
2904
617
  };
2905
618
  };
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
- }) => {
619
+ defaultCount?: number;
620
+ } & {
621
+ type: "hasOne";
622
+ }) | ({
623
+ fromKey: string;
624
+ toKey: () => any;
625
+ schema: () => {
626
+ _tableName: string;
627
+ id: {
2942
628
  config: {
2943
629
  sql: {
2944
630
  type: "int";
@@ -2946,9 +632,9 @@ export declare const userSchema: {
2946
632
  };
2947
633
  zodSqlSchema: z.ZodNumber;
2948
634
  zodNewSchema: z.ZodNumber;
2949
- initialValue: number;
2950
- zodClientSchema: z.ZodNumber;
2951
- zodValidationSchema: TValidationNext;
635
+ initialValue: string;
636
+ zodClientSchema: z.ZodUnion<[z.ZodNumber, z.ZodNumber]>;
637
+ zodValidationSchema: z.ZodString;
2952
638
  } & {
2953
639
  transforms: {
2954
640
  toClient: (dbValue: number) => number;
@@ -2956,105 +642,61 @@ export declare const userSchema: {
2956
642
  };
2957
643
  };
2958
644
  };
2959
- };
2960
- client: <TClientNext extends z.ZodTypeAny>(schema: TClientNext | ((tools: {
2961
- sql: z.ZodNumber;
2962
- initialState: z.ZodNumber;
2963
- }) => TClientNext)) => {
2964
- config: {
2965
- sql: {
645
+ name: import("../schema.js").Builder<"sql", {
646
+ type: "varchar";
647
+ length: number;
648
+ }, z.ZodString, z.ZodString, string, z.ZodString, z.ZodString>;
649
+ userId: {
650
+ type: "reference";
651
+ to: () => import("../schema.js").Builder<"sql", {
2966
652
  type: "int";
2967
653
  pk: true;
2968
- };
2969
- zodSqlSchema: z.ZodNumber;
2970
- zodNewSchema: z.ZodNumber;
2971
- initialValue: number;
2972
- zodClientSchema: TClientNext;
2973
- zodValidationSchema: TClientNext;
654
+ }, z.ZodNumber, z.ZodNumber, number, z.ZodNumber, z.ZodNumber>;
2974
655
  };
2975
- validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
2976
- sql: z.ZodNumber;
2977
- initialState: z.ZodNumber;
2978
- client: TClientNext;
2979
- }) => TValidationNext)) => {
656
+ fluffynessScale: {
2980
657
  config: {
2981
658
  sql: {
2982
- type: "int";
2983
- pk: true;
659
+ type: "text";
2984
660
  };
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
- };
661
+ zodSqlSchema: z.ZodString;
662
+ zodNewSchema: z.ZodString;
663
+ initialValue: string;
664
+ zodClientSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
665
+ zodValidationSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
666
+ } & {
667
+ transforms: {
668
+ toClient: (dbValue: string) => ("bald" | "fuzzy" | "fluffy" | "poof")[];
669
+ toDb: (clientValue: ("bald" | "fuzzy" | "fluffy" | "poof")[]) => string;
3010
670
  };
3011
671
  };
3012
672
  };
3013
- transform: (transforms: {
3014
- toClient: (dbValue: number) => z.TypeOf<TClientNext>;
3015
- toDb: (clientValue: z.TypeOf<TClientNext>) => number;
3016
- }) => {
673
+ favourite: {
3017
674
  config: {
3018
675
  sql: {
3019
676
  type: "int";
3020
- pk: true;
3021
677
  };
3022
678
  zodSqlSchema: z.ZodNumber;
3023
679
  zodNewSchema: z.ZodNumber;
3024
680
  initialValue: number;
3025
- zodClientSchema: TClientNext;
3026
- zodValidationSchema: TClientNext;
681
+ zodClientSchema: z.ZodBoolean;
682
+ zodValidationSchema: z.ZodBoolean;
3027
683
  } & {
3028
684
  transforms: {
3029
- toClient: (dbValue: number) => z.TypeOf<TClientNext>;
3030
- toDb: (clientValue: z.TypeOf<TClientNext>) => number;
685
+ toClient: (dbValue: number) => boolean;
686
+ toDb: (clientValue: boolean) => number;
3031
687
  };
3032
688
  };
3033
689
  };
3034
690
  };
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): {
691
+ defaultCount?: number;
692
+ } & {
693
+ type: "belongsTo";
694
+ }) | ({
695
+ fromKey: string;
696
+ toKey: () => any;
697
+ schema: () => {
698
+ _tableName: string;
699
+ id: {
3058
700
  config: {
3059
701
  sql: {
3060
702
  type: "int";
@@ -3062,332 +704,77 @@ export declare const userSchema: {
3062
704
  };
3063
705
  zodSqlSchema: z.ZodNumber;
3064
706
  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: {
707
+ initialValue: string;
708
+ zodClientSchema: z.ZodUnion<[z.ZodNumber, z.ZodNumber]>;
709
+ zodValidationSchema: z.ZodString;
710
+ } & {
711
+ transforms: {
3086
712
  toClient: (dbValue: number) => number;
3087
713
  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
714
  };
3106
715
  };
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
- };
716
+ };
717
+ name: import("../schema.js").Builder<"sql", {
718
+ type: "varchar";
719
+ length: number;
720
+ }, z.ZodString, z.ZodString, string, z.ZodString, z.ZodString>;
721
+ userId: {
722
+ type: "reference";
723
+ to: () => import("../schema.js").Builder<"sql", {
724
+ type: "int";
725
+ pk: true;
726
+ }, z.ZodNumber, z.ZodNumber, number, z.ZodNumber, z.ZodNumber>;
727
+ };
728
+ fluffynessScale: {
729
+ config: {
730
+ sql: {
731
+ type: "text";
3180
732
  };
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
- };
733
+ zodSqlSchema: z.ZodString;
734
+ zodNewSchema: z.ZodString;
735
+ initialValue: string;
736
+ zodClientSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
737
+ zodValidationSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
738
+ } & {
739
+ transforms: {
740
+ toClient: (dbValue: string) => ("bald" | "fuzzy" | "fluffy" | "poof")[];
741
+ toDb: (clientValue: ("bald" | "fuzzy" | "fluffy" | "poof")[]) => string;
3201
742
  };
3202
743
  };
3203
744
  };
3204
- <TNewNext extends z.ZodTypeAny, TDefaultNext>(schema: TNewNext | ((tools: {
3205
- sql: z.ZodNumber;
3206
- }) => TNewNext), defaultValue: () => TDefaultNext): {
745
+ favourite: {
3207
746
  config: {
3208
747
  sql: {
3209
748
  type: "int";
3210
- pk: true;
3211
749
  };
3212
750
  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
- };
751
+ zodNewSchema: z.ZodNumber;
752
+ initialValue: number;
753
+ zodClientSchema: z.ZodBoolean;
754
+ zodValidationSchema: z.ZodBoolean;
755
+ } & {
756
+ transforms: {
757
+ toClient: (dbValue: number) => boolean;
758
+ toDb: (clientValue: boolean) => number;
3350
759
  };
3351
760
  };
3352
761
  };
3353
762
  };
3354
- };
3355
- };
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">;
763
+ defaultCount?: number;
3366
764
  } & {
3367
- transforms: {
3368
- toClient: (dbValue: string) => ("bald" | "fuzzy" | "fluffy" | "poof")[];
3369
- toDb: (clientValue: ("bald" | "fuzzy" | "fluffy" | "poof")[]) => string;
3370
- };
3371
- };
3372
- };
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
- };
765
+ type: "manyToMany";
766
+ });
767
+ zodSqlSchema: z.ZodArray<z.ZodAny, "many">;
768
+ zodNewSchema: z.ZodArray<z.ZodAny, "many">;
769
+ initialValue: any[];
770
+ zodClientSchema: z.ZodArray<z.ZodAny, "many">;
771
+ zodValidationSchema: z.ZodArray<z.ZodAny, "many">;
772
+ } & {
773
+ transforms: {
774
+ toClient: (dbValue: any[]) => any[];
775
+ toDb: (clientValue: any[]) => any[];
3388
776
  };
3389
777
  };
3390
778
  };
3391
- defaultCount: number | undefined;
3392
779
  };
3393
780
  };