cogsbox-shape 0.5.64 → 0.5.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,1034 +0,0 @@
1
- import { z } from "zod";
2
- export declare const petSchema: {
3
- _tableName: string;
4
- id: {
5
- config: {
6
- sql: {
7
- type: "int";
8
- pk: true;
9
- };
10
- zodSqlSchema: z.ZodNumber;
11
- zodNewSchema: z.ZodNumber;
12
- initialValue: string;
13
- zodClientSchema: z.ZodUnion<[z.ZodNumber, z.ZodNumber]>;
14
- zodValidationSchema: z.ZodString;
15
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
16
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
17
- } & {
18
- transforms: {
19
- toClient: (dbValue: number) => number;
20
- toDb: (clientValue: number) => number;
21
- };
22
- };
23
- };
24
- name: import("../schema.js").Builder<"sql", {
25
- type: "varchar";
26
- length: number;
27
- }, z.ZodString, z.ZodString, string, z.ZodString, z.ZodString>;
28
- userId: {
29
- type: "reference";
30
- to: () => import("../schema.js").Builder<"sql", {
31
- type: "int";
32
- pk: true;
33
- }, z.ZodNumber, z.ZodNumber, number, z.ZodNumber, z.ZodNumber>;
34
- };
35
- fluffynessScale: {
36
- config: {
37
- sql: {
38
- type: "text";
39
- };
40
- zodSqlSchema: z.ZodString;
41
- zodNewSchema: z.ZodString;
42
- initialValue: string;
43
- zodClientSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
44
- zodValidationSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
45
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
46
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
47
- } & {
48
- transforms: {
49
- toClient: (dbValue: string) => ("bald" | "fuzzy" | "fluffy" | "poof")[];
50
- toDb: (clientValue: ("bald" | "fuzzy" | "fluffy" | "poof")[]) => string;
51
- };
52
- };
53
- };
54
- favourite: {
55
- config: {
56
- sql: {
57
- type: "int";
58
- };
59
- zodSqlSchema: z.ZodNumber;
60
- zodNewSchema: z.ZodNumber;
61
- initialValue: number;
62
- zodClientSchema: z.ZodBoolean;
63
- zodValidationSchema: z.ZodBoolean;
64
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
65
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
66
- } & {
67
- transforms: {
68
- toClient: (dbValue: number) => boolean;
69
- toDb: (clientValue: boolean) => number;
70
- };
71
- };
72
- };
73
- };
74
- export declare const userSchema: {
75
- _tableName: string;
76
- id: import("../schema.js").Builder<"sql", {
77
- type: "int";
78
- pk: true;
79
- }, z.ZodNumber, z.ZodNumber, number, z.ZodNumber, z.ZodNumber>;
80
- firstname: {
81
- config: {
82
- sql: {
83
- type: "varchar";
84
- length: number;
85
- };
86
- zodSqlSchema: z.ZodString;
87
- zodNewSchema: z.ZodString;
88
- initialValue: string;
89
- zodClientSchema: z.ZodString;
90
- zodValidationSchema: z.ZodString;
91
- };
92
- transform: (transforms: {
93
- toClient: (dbValue: string) => string;
94
- toDb: (clientValue: string) => string;
95
- }) => {
96
- config: {
97
- sql: {
98
- type: "varchar";
99
- length: number;
100
- };
101
- zodSqlSchema: z.ZodString;
102
- zodNewSchema: z.ZodString;
103
- initialValue: string;
104
- zodClientSchema: z.ZodString;
105
- zodValidationSchema: z.ZodString;
106
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
107
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
108
- } & {
109
- transforms: {
110
- toClient: (dbValue: string) => string;
111
- toDb: (clientValue: string) => string;
112
- };
113
- };
114
- };
115
- };
116
- surname: {
117
- config: {
118
- sql: {
119
- type: "varchar";
120
- length: number;
121
- };
122
- zodSqlSchema: z.ZodString;
123
- zodNewSchema: z.ZodString;
124
- initialValue: string;
125
- zodClientSchema: z.ZodString;
126
- zodValidationSchema: z.ZodString;
127
- };
128
- transform: (transforms: {
129
- toClient: (dbValue: string) => string;
130
- toDb: (clientValue: string) => string;
131
- }) => {
132
- config: {
133
- sql: {
134
- type: "varchar";
135
- length: number;
136
- };
137
- zodSqlSchema: z.ZodString;
138
- zodNewSchema: z.ZodString;
139
- initialValue: string;
140
- zodClientSchema: z.ZodString;
141
- zodValidationSchema: z.ZodString;
142
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
143
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
144
- } & {
145
- transforms: {
146
- toClient: (dbValue: string) => string;
147
- toDb: (clientValue: string) => string;
148
- };
149
- };
150
- };
151
- };
152
- email: {
153
- config: {
154
- sql: {
155
- type: "varchar";
156
- length: number;
157
- };
158
- zodSqlSchema: z.ZodString;
159
- zodNewSchema: z.ZodString;
160
- initialValue: string;
161
- zodClientSchema: z.ZodString;
162
- zodValidationSchema: z.ZodString;
163
- };
164
- transform: (transforms: {
165
- toClient: (dbValue: string) => string;
166
- toDb: (clientValue: string) => string;
167
- }) => {
168
- config: {
169
- sql: {
170
- type: "varchar";
171
- length: number;
172
- };
173
- zodSqlSchema: z.ZodString;
174
- zodNewSchema: z.ZodString;
175
- initialValue: string;
176
- zodClientSchema: z.ZodString;
177
- zodValidationSchema: z.ZodString;
178
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
179
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
180
- } & {
181
- transforms: {
182
- toClient: (dbValue: string) => string;
183
- toDb: (clientValue: string) => string;
184
- };
185
- };
186
- };
187
- };
188
- pets: {
189
- config: {
190
- sql: ({
191
- fromKey: string;
192
- toKey: () => any;
193
- schema: () => {
194
- _tableName: string;
195
- id: {
196
- config: {
197
- sql: {
198
- type: "int";
199
- pk: true;
200
- };
201
- zodSqlSchema: z.ZodNumber;
202
- zodNewSchema: z.ZodNumber;
203
- initialValue: string;
204
- zodClientSchema: z.ZodUnion<[z.ZodNumber, z.ZodNumber]>;
205
- zodValidationSchema: z.ZodString;
206
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
207
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
208
- } & {
209
- transforms: {
210
- toClient: (dbValue: number) => number;
211
- toDb: (clientValue: number) => number;
212
- };
213
- };
214
- };
215
- name: import("../schema.js").Builder<"sql", {
216
- type: "varchar";
217
- length: number;
218
- }, z.ZodString, z.ZodString, string, z.ZodString, z.ZodString>;
219
- userId: {
220
- type: "reference";
221
- to: () => import("../schema.js").Builder<"sql", {
222
- type: "int";
223
- pk: true;
224
- }, z.ZodNumber, z.ZodNumber, number, z.ZodNumber, z.ZodNumber>;
225
- };
226
- fluffynessScale: {
227
- config: {
228
- sql: {
229
- type: "text";
230
- };
231
- zodSqlSchema: z.ZodString;
232
- zodNewSchema: z.ZodString;
233
- initialValue: string;
234
- zodClientSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
235
- zodValidationSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
236
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
237
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
238
- } & {
239
- transforms: {
240
- toClient: (dbValue: string) => ("bald" | "fuzzy" | "fluffy" | "poof")[];
241
- toDb: (clientValue: ("bald" | "fuzzy" | "fluffy" | "poof")[]) => string;
242
- };
243
- };
244
- };
245
- favourite: {
246
- config: {
247
- sql: {
248
- type: "int";
249
- };
250
- zodSqlSchema: z.ZodNumber;
251
- zodNewSchema: z.ZodNumber;
252
- initialValue: number;
253
- zodClientSchema: z.ZodBoolean;
254
- zodValidationSchema: z.ZodBoolean;
255
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
256
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
257
- } & {
258
- transforms: {
259
- toClient: (dbValue: number) => boolean;
260
- toDb: (clientValue: boolean) => number;
261
- };
262
- };
263
- };
264
- };
265
- defaultCount?: number;
266
- } & {
267
- type: "hasMany";
268
- }) | ({
269
- fromKey: string;
270
- toKey: () => any;
271
- schema: () => {
272
- _tableName: string;
273
- id: {
274
- config: {
275
- sql: {
276
- type: "int";
277
- pk: true;
278
- };
279
- zodSqlSchema: z.ZodNumber;
280
- zodNewSchema: z.ZodNumber;
281
- initialValue: string;
282
- zodClientSchema: z.ZodUnion<[z.ZodNumber, z.ZodNumber]>;
283
- zodValidationSchema: z.ZodString;
284
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
285
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
286
- } & {
287
- transforms: {
288
- toClient: (dbValue: number) => number;
289
- toDb: (clientValue: number) => number;
290
- };
291
- };
292
- };
293
- name: import("../schema.js").Builder<"sql", {
294
- type: "varchar";
295
- length: number;
296
- }, z.ZodString, z.ZodString, string, z.ZodString, z.ZodString>;
297
- userId: {
298
- type: "reference";
299
- to: () => import("../schema.js").Builder<"sql", {
300
- type: "int";
301
- pk: true;
302
- }, z.ZodNumber, z.ZodNumber, number, z.ZodNumber, z.ZodNumber>;
303
- };
304
- fluffynessScale: {
305
- config: {
306
- sql: {
307
- type: "text";
308
- };
309
- zodSqlSchema: z.ZodString;
310
- zodNewSchema: z.ZodString;
311
- initialValue: string;
312
- zodClientSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
313
- zodValidationSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
314
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
315
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
316
- } & {
317
- transforms: {
318
- toClient: (dbValue: string) => ("bald" | "fuzzy" | "fluffy" | "poof")[];
319
- toDb: (clientValue: ("bald" | "fuzzy" | "fluffy" | "poof")[]) => string;
320
- };
321
- };
322
- };
323
- favourite: {
324
- config: {
325
- sql: {
326
- type: "int";
327
- };
328
- zodSqlSchema: z.ZodNumber;
329
- zodNewSchema: z.ZodNumber;
330
- initialValue: number;
331
- zodClientSchema: z.ZodBoolean;
332
- zodValidationSchema: z.ZodBoolean;
333
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
334
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
335
- } & {
336
- transforms: {
337
- toClient: (dbValue: number) => boolean;
338
- toDb: (clientValue: boolean) => number;
339
- };
340
- };
341
- };
342
- };
343
- defaultCount?: number;
344
- } & {
345
- type: "hasOne";
346
- }) | ({
347
- fromKey: string;
348
- toKey: () => any;
349
- schema: () => {
350
- _tableName: string;
351
- id: {
352
- config: {
353
- sql: {
354
- type: "int";
355
- pk: true;
356
- };
357
- zodSqlSchema: z.ZodNumber;
358
- zodNewSchema: z.ZodNumber;
359
- initialValue: string;
360
- zodClientSchema: z.ZodUnion<[z.ZodNumber, z.ZodNumber]>;
361
- zodValidationSchema: z.ZodString;
362
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
363
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
364
- } & {
365
- transforms: {
366
- toClient: (dbValue: number) => number;
367
- toDb: (clientValue: number) => number;
368
- };
369
- };
370
- };
371
- name: import("../schema.js").Builder<"sql", {
372
- type: "varchar";
373
- length: number;
374
- }, z.ZodString, z.ZodString, string, z.ZodString, z.ZodString>;
375
- userId: {
376
- type: "reference";
377
- to: () => import("../schema.js").Builder<"sql", {
378
- type: "int";
379
- pk: true;
380
- }, z.ZodNumber, z.ZodNumber, number, z.ZodNumber, z.ZodNumber>;
381
- };
382
- fluffynessScale: {
383
- config: {
384
- sql: {
385
- type: "text";
386
- };
387
- zodSqlSchema: z.ZodString;
388
- zodNewSchema: z.ZodString;
389
- initialValue: string;
390
- zodClientSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
391
- zodValidationSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
392
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
393
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
394
- } & {
395
- transforms: {
396
- toClient: (dbValue: string) => ("bald" | "fuzzy" | "fluffy" | "poof")[];
397
- toDb: (clientValue: ("bald" | "fuzzy" | "fluffy" | "poof")[]) => string;
398
- };
399
- };
400
- };
401
- favourite: {
402
- config: {
403
- sql: {
404
- type: "int";
405
- };
406
- zodSqlSchema: z.ZodNumber;
407
- zodNewSchema: z.ZodNumber;
408
- initialValue: number;
409
- zodClientSchema: z.ZodBoolean;
410
- zodValidationSchema: z.ZodBoolean;
411
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
412
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
413
- } & {
414
- transforms: {
415
- toClient: (dbValue: number) => boolean;
416
- toDb: (clientValue: boolean) => number;
417
- };
418
- };
419
- };
420
- };
421
- defaultCount?: number;
422
- } & {
423
- type: "belongsTo";
424
- }) | ({
425
- fromKey: string;
426
- toKey: () => any;
427
- schema: () => {
428
- _tableName: string;
429
- id: {
430
- config: {
431
- sql: {
432
- type: "int";
433
- pk: true;
434
- };
435
- zodSqlSchema: z.ZodNumber;
436
- zodNewSchema: z.ZodNumber;
437
- initialValue: string;
438
- zodClientSchema: z.ZodUnion<[z.ZodNumber, z.ZodNumber]>;
439
- zodValidationSchema: z.ZodString;
440
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
441
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
442
- } & {
443
- transforms: {
444
- toClient: (dbValue: number) => number;
445
- toDb: (clientValue: number) => number;
446
- };
447
- };
448
- };
449
- name: import("../schema.js").Builder<"sql", {
450
- type: "varchar";
451
- length: number;
452
- }, z.ZodString, z.ZodString, string, z.ZodString, z.ZodString>;
453
- userId: {
454
- type: "reference";
455
- to: () => import("../schema.js").Builder<"sql", {
456
- type: "int";
457
- pk: true;
458
- }, z.ZodNumber, z.ZodNumber, number, z.ZodNumber, z.ZodNumber>;
459
- };
460
- fluffynessScale: {
461
- config: {
462
- sql: {
463
- type: "text";
464
- };
465
- zodSqlSchema: z.ZodString;
466
- zodNewSchema: z.ZodString;
467
- initialValue: string;
468
- zodClientSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
469
- zodValidationSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
470
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
471
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
472
- } & {
473
- transforms: {
474
- toClient: (dbValue: string) => ("bald" | "fuzzy" | "fluffy" | "poof")[];
475
- toDb: (clientValue: ("bald" | "fuzzy" | "fluffy" | "poof")[]) => string;
476
- };
477
- };
478
- };
479
- favourite: {
480
- config: {
481
- sql: {
482
- type: "int";
483
- };
484
- zodSqlSchema: z.ZodNumber;
485
- zodNewSchema: z.ZodNumber;
486
- initialValue: number;
487
- zodClientSchema: z.ZodBoolean;
488
- zodValidationSchema: z.ZodBoolean;
489
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
490
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
491
- } & {
492
- transforms: {
493
- toClient: (dbValue: number) => boolean;
494
- toDb: (clientValue: boolean) => number;
495
- };
496
- };
497
- };
498
- };
499
- defaultCount?: number;
500
- } & {
501
- type: "manyToMany";
502
- });
503
- zodSqlSchema: z.ZodArray<z.ZodObject<{
504
- id: z.ZodNumber;
505
- name: z.ZodString;
506
- userId: z.ZodAny;
507
- fluffynessScale: z.ZodString;
508
- favourite: z.ZodNumber;
509
- }, z.UnknownKeysParam, z.ZodTypeAny, {
510
- name: string;
511
- id: number;
512
- fluffynessScale: string;
513
- favourite: number;
514
- userId?: any;
515
- }, {
516
- name: string;
517
- id: number;
518
- fluffynessScale: string;
519
- favourite: number;
520
- userId?: any;
521
- }>, "many">;
522
- zodNewSchema: z.ZodArray<z.ZodObject<{
523
- id: z.ZodUnion<[z.ZodNumber, z.ZodNumber]>;
524
- name: z.ZodString;
525
- userId: z.ZodAny;
526
- fluffynessScale: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
527
- favourite: z.ZodBoolean;
528
- }, z.UnknownKeysParam, z.ZodTypeAny, {
529
- name: string;
530
- id: number;
531
- fluffynessScale: ("bald" | "fuzzy" | "fluffy" | "poof")[];
532
- favourite: boolean;
533
- userId?: any;
534
- }, {
535
- name: string;
536
- id: number;
537
- fluffynessScale: ("bald" | "fuzzy" | "fluffy" | "poof")[];
538
- favourite: boolean;
539
- userId?: any;
540
- }>, "many">;
541
- initialValue: any[];
542
- zodClientSchema: z.ZodArray<z.ZodObject<{
543
- id: z.ZodUnion<[z.ZodNumber, z.ZodNumber]>;
544
- name: z.ZodString;
545
- userId: z.ZodAny;
546
- fluffynessScale: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
547
- favourite: z.ZodBoolean;
548
- }, z.UnknownKeysParam, z.ZodTypeAny, {
549
- name: string;
550
- id: number;
551
- fluffynessScale: ("bald" | "fuzzy" | "fluffy" | "poof")[];
552
- favourite: boolean;
553
- userId?: any;
554
- }, {
555
- name: string;
556
- id: number;
557
- fluffynessScale: ("bald" | "fuzzy" | "fluffy" | "poof")[];
558
- favourite: boolean;
559
- userId?: any;
560
- }>, "many">;
561
- zodValidationSchema: z.ZodArray<z.ZodObject<{
562
- id: z.ZodNumber;
563
- name: z.ZodString;
564
- userId: z.ZodAny;
565
- fluffynessScale: z.ZodString;
566
- favourite: z.ZodNumber;
567
- }, z.UnknownKeysParam, z.ZodTypeAny, {
568
- name: string;
569
- id: number;
570
- fluffynessScale: string;
571
- favourite: number;
572
- userId?: any;
573
- }, {
574
- name: string;
575
- id: number;
576
- fluffynessScale: string;
577
- favourite: number;
578
- userId?: any;
579
- }>, "many">;
580
- };
581
- transform: (transforms: {
582
- toClient: (dbValue: {
583
- name: string;
584
- id: number;
585
- fluffynessScale: string;
586
- favourite: number;
587
- userId?: any;
588
- }[]) => {
589
- name: string;
590
- id: number;
591
- fluffynessScale: ("bald" | "fuzzy" | "fluffy" | "poof")[];
592
- favourite: boolean;
593
- userId?: any;
594
- }[];
595
- toDb: (clientValue: {
596
- name: string;
597
- id: number;
598
- fluffynessScale: ("bald" | "fuzzy" | "fluffy" | "poof")[];
599
- favourite: boolean;
600
- userId?: any;
601
- }[]) => {
602
- name: string;
603
- id: number;
604
- fluffynessScale: string;
605
- favourite: number;
606
- userId?: any;
607
- }[];
608
- }) => {
609
- config: {
610
- sql: ({
611
- fromKey: string;
612
- toKey: () => any;
613
- schema: () => {
614
- _tableName: string;
615
- id: {
616
- config: {
617
- sql: {
618
- type: "int";
619
- pk: true;
620
- };
621
- zodSqlSchema: z.ZodNumber;
622
- zodNewSchema: z.ZodNumber;
623
- initialValue: string;
624
- zodClientSchema: z.ZodUnion<[z.ZodNumber, z.ZodNumber]>;
625
- zodValidationSchema: z.ZodString;
626
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
627
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
628
- } & {
629
- transforms: {
630
- toClient: (dbValue: number) => number;
631
- toDb: (clientValue: number) => number;
632
- };
633
- };
634
- };
635
- name: import("../schema.js").Builder<"sql", {
636
- type: "varchar";
637
- length: number;
638
- }, z.ZodString, z.ZodString, string, z.ZodString, z.ZodString>;
639
- userId: {
640
- type: "reference";
641
- to: () => import("../schema.js").Builder<"sql", {
642
- type: "int";
643
- pk: true;
644
- }, z.ZodNumber, z.ZodNumber, number, z.ZodNumber, z.ZodNumber>;
645
- };
646
- fluffynessScale: {
647
- config: {
648
- sql: {
649
- type: "text";
650
- };
651
- zodSqlSchema: z.ZodString;
652
- zodNewSchema: z.ZodString;
653
- initialValue: string;
654
- zodClientSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
655
- zodValidationSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
656
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
657
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
658
- } & {
659
- transforms: {
660
- toClient: (dbValue: string) => ("bald" | "fuzzy" | "fluffy" | "poof")[];
661
- toDb: (clientValue: ("bald" | "fuzzy" | "fluffy" | "poof")[]) => string;
662
- };
663
- };
664
- };
665
- favourite: {
666
- config: {
667
- sql: {
668
- type: "int";
669
- };
670
- zodSqlSchema: z.ZodNumber;
671
- zodNewSchema: z.ZodNumber;
672
- initialValue: number;
673
- zodClientSchema: z.ZodBoolean;
674
- zodValidationSchema: z.ZodBoolean;
675
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
676
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
677
- } & {
678
- transforms: {
679
- toClient: (dbValue: number) => boolean;
680
- toDb: (clientValue: boolean) => number;
681
- };
682
- };
683
- };
684
- };
685
- defaultCount?: number;
686
- } & {
687
- type: "hasMany";
688
- }) | ({
689
- fromKey: string;
690
- toKey: () => any;
691
- schema: () => {
692
- _tableName: string;
693
- id: {
694
- config: {
695
- sql: {
696
- type: "int";
697
- pk: true;
698
- };
699
- zodSqlSchema: z.ZodNumber;
700
- zodNewSchema: z.ZodNumber;
701
- initialValue: string;
702
- zodClientSchema: z.ZodUnion<[z.ZodNumber, z.ZodNumber]>;
703
- zodValidationSchema: z.ZodString;
704
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
705
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
706
- } & {
707
- transforms: {
708
- toClient: (dbValue: number) => number;
709
- toDb: (clientValue: number) => number;
710
- };
711
- };
712
- };
713
- name: import("../schema.js").Builder<"sql", {
714
- type: "varchar";
715
- length: number;
716
- }, z.ZodString, z.ZodString, string, z.ZodString, z.ZodString>;
717
- userId: {
718
- type: "reference";
719
- to: () => import("../schema.js").Builder<"sql", {
720
- type: "int";
721
- pk: true;
722
- }, z.ZodNumber, z.ZodNumber, number, z.ZodNumber, z.ZodNumber>;
723
- };
724
- fluffynessScale: {
725
- config: {
726
- sql: {
727
- type: "text";
728
- };
729
- zodSqlSchema: z.ZodString;
730
- zodNewSchema: z.ZodString;
731
- initialValue: string;
732
- zodClientSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
733
- zodValidationSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
734
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
735
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
736
- } & {
737
- transforms: {
738
- toClient: (dbValue: string) => ("bald" | "fuzzy" | "fluffy" | "poof")[];
739
- toDb: (clientValue: ("bald" | "fuzzy" | "fluffy" | "poof")[]) => string;
740
- };
741
- };
742
- };
743
- favourite: {
744
- config: {
745
- sql: {
746
- type: "int";
747
- };
748
- zodSqlSchema: z.ZodNumber;
749
- zodNewSchema: z.ZodNumber;
750
- initialValue: number;
751
- zodClientSchema: z.ZodBoolean;
752
- zodValidationSchema: z.ZodBoolean;
753
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
754
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
755
- } & {
756
- transforms: {
757
- toClient: (dbValue: number) => boolean;
758
- toDb: (clientValue: boolean) => number;
759
- };
760
- };
761
- };
762
- };
763
- defaultCount?: number;
764
- } & {
765
- type: "hasOne";
766
- }) | ({
767
- fromKey: string;
768
- toKey: () => any;
769
- schema: () => {
770
- _tableName: string;
771
- id: {
772
- config: {
773
- sql: {
774
- type: "int";
775
- pk: true;
776
- };
777
- zodSqlSchema: z.ZodNumber;
778
- zodNewSchema: z.ZodNumber;
779
- initialValue: string;
780
- zodClientSchema: z.ZodUnion<[z.ZodNumber, z.ZodNumber]>;
781
- zodValidationSchema: z.ZodString;
782
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
783
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
784
- } & {
785
- transforms: {
786
- toClient: (dbValue: number) => number;
787
- toDb: (clientValue: number) => number;
788
- };
789
- };
790
- };
791
- name: import("../schema.js").Builder<"sql", {
792
- type: "varchar";
793
- length: number;
794
- }, z.ZodString, z.ZodString, string, z.ZodString, z.ZodString>;
795
- userId: {
796
- type: "reference";
797
- to: () => import("../schema.js").Builder<"sql", {
798
- type: "int";
799
- pk: true;
800
- }, z.ZodNumber, z.ZodNumber, number, z.ZodNumber, z.ZodNumber>;
801
- };
802
- fluffynessScale: {
803
- config: {
804
- sql: {
805
- type: "text";
806
- };
807
- zodSqlSchema: z.ZodString;
808
- zodNewSchema: z.ZodString;
809
- initialValue: string;
810
- zodClientSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
811
- zodValidationSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
812
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
813
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
814
- } & {
815
- transforms: {
816
- toClient: (dbValue: string) => ("bald" | "fuzzy" | "fluffy" | "poof")[];
817
- toDb: (clientValue: ("bald" | "fuzzy" | "fluffy" | "poof")[]) => string;
818
- };
819
- };
820
- };
821
- favourite: {
822
- config: {
823
- sql: {
824
- type: "int";
825
- };
826
- zodSqlSchema: z.ZodNumber;
827
- zodNewSchema: z.ZodNumber;
828
- initialValue: number;
829
- zodClientSchema: z.ZodBoolean;
830
- zodValidationSchema: z.ZodBoolean;
831
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
832
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
833
- } & {
834
- transforms: {
835
- toClient: (dbValue: number) => boolean;
836
- toDb: (clientValue: boolean) => number;
837
- };
838
- };
839
- };
840
- };
841
- defaultCount?: number;
842
- } & {
843
- type: "belongsTo";
844
- }) | ({
845
- fromKey: string;
846
- toKey: () => any;
847
- schema: () => {
848
- _tableName: string;
849
- id: {
850
- config: {
851
- sql: {
852
- type: "int";
853
- pk: true;
854
- };
855
- zodSqlSchema: z.ZodNumber;
856
- zodNewSchema: z.ZodNumber;
857
- initialValue: string;
858
- zodClientSchema: z.ZodUnion<[z.ZodNumber, z.ZodNumber]>;
859
- zodValidationSchema: z.ZodString;
860
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
861
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
862
- } & {
863
- transforms: {
864
- toClient: (dbValue: number) => number;
865
- toDb: (clientValue: number) => number;
866
- };
867
- };
868
- };
869
- name: import("../schema.js").Builder<"sql", {
870
- type: "varchar";
871
- length: number;
872
- }, z.ZodString, z.ZodString, string, z.ZodString, z.ZodString>;
873
- userId: {
874
- type: "reference";
875
- to: () => import("../schema.js").Builder<"sql", {
876
- type: "int";
877
- pk: true;
878
- }, z.ZodNumber, z.ZodNumber, number, z.ZodNumber, z.ZodNumber>;
879
- };
880
- fluffynessScale: {
881
- config: {
882
- sql: {
883
- type: "text";
884
- };
885
- zodSqlSchema: z.ZodString;
886
- zodNewSchema: z.ZodString;
887
- initialValue: string;
888
- zodClientSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
889
- zodValidationSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
890
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
891
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
892
- } & {
893
- transforms: {
894
- toClient: (dbValue: string) => ("bald" | "fuzzy" | "fluffy" | "poof")[];
895
- toDb: (clientValue: ("bald" | "fuzzy" | "fluffy" | "poof")[]) => string;
896
- };
897
- };
898
- };
899
- favourite: {
900
- config: {
901
- sql: {
902
- type: "int";
903
- };
904
- zodSqlSchema: z.ZodNumber;
905
- zodNewSchema: z.ZodNumber;
906
- initialValue: number;
907
- zodClientSchema: z.ZodBoolean;
908
- zodValidationSchema: z.ZodBoolean;
909
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
910
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
911
- } & {
912
- transforms: {
913
- toClient: (dbValue: number) => boolean;
914
- toDb: (clientValue: boolean) => number;
915
- };
916
- };
917
- };
918
- };
919
- defaultCount?: number;
920
- } & {
921
- type: "manyToMany";
922
- });
923
- zodSqlSchema: z.ZodArray<z.ZodObject<{
924
- id: z.ZodNumber;
925
- name: z.ZodString;
926
- userId: z.ZodAny;
927
- fluffynessScale: z.ZodString;
928
- favourite: z.ZodNumber;
929
- }, z.UnknownKeysParam, z.ZodTypeAny, {
930
- name: string;
931
- id: number;
932
- fluffynessScale: string;
933
- favourite: number;
934
- userId?: any;
935
- }, {
936
- name: string;
937
- id: number;
938
- fluffynessScale: string;
939
- favourite: number;
940
- userId?: any;
941
- }>, "many">;
942
- zodNewSchema: z.ZodArray<z.ZodObject<{
943
- id: z.ZodUnion<[z.ZodNumber, z.ZodNumber]>;
944
- name: z.ZodString;
945
- userId: z.ZodAny;
946
- fluffynessScale: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
947
- favourite: z.ZodBoolean;
948
- }, z.UnknownKeysParam, z.ZodTypeAny, {
949
- name: string;
950
- id: number;
951
- fluffynessScale: ("bald" | "fuzzy" | "fluffy" | "poof")[];
952
- favourite: boolean;
953
- userId?: any;
954
- }, {
955
- name: string;
956
- id: number;
957
- fluffynessScale: ("bald" | "fuzzy" | "fluffy" | "poof")[];
958
- favourite: boolean;
959
- userId?: any;
960
- }>, "many">;
961
- initialValue: any[];
962
- zodClientSchema: z.ZodArray<z.ZodObject<{
963
- id: z.ZodUnion<[z.ZodNumber, z.ZodNumber]>;
964
- name: z.ZodString;
965
- userId: z.ZodAny;
966
- fluffynessScale: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
967
- favourite: z.ZodBoolean;
968
- }, z.UnknownKeysParam, z.ZodTypeAny, {
969
- name: string;
970
- id: number;
971
- fluffynessScale: ("bald" | "fuzzy" | "fluffy" | "poof")[];
972
- favourite: boolean;
973
- userId?: any;
974
- }, {
975
- name: string;
976
- id: number;
977
- fluffynessScale: ("bald" | "fuzzy" | "fluffy" | "poof")[];
978
- favourite: boolean;
979
- userId?: any;
980
- }>, "many">;
981
- zodValidationSchema: z.ZodArray<z.ZodObject<{
982
- id: z.ZodNumber;
983
- name: z.ZodString;
984
- userId: z.ZodAny;
985
- fluffynessScale: z.ZodString;
986
- favourite: z.ZodNumber;
987
- }, z.UnknownKeysParam, z.ZodTypeAny, {
988
- name: string;
989
- id: number;
990
- fluffynessScale: string;
991
- favourite: number;
992
- userId?: any;
993
- }, {
994
- name: string;
995
- id: number;
996
- fluffynessScale: string;
997
- favourite: number;
998
- userId?: any;
999
- }>, "many">;
1000
- clientTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
1001
- validationTransform?: (schema: z.ZodTypeAny) => z.ZodTypeAny;
1002
- } & {
1003
- transforms: {
1004
- toClient: (dbValue: {
1005
- name: string;
1006
- id: number;
1007
- fluffynessScale: string;
1008
- favourite: number;
1009
- userId?: any;
1010
- }[]) => {
1011
- name: string;
1012
- id: number;
1013
- fluffynessScale: ("bald" | "fuzzy" | "fluffy" | "poof")[];
1014
- favourite: boolean;
1015
- userId?: any;
1016
- }[];
1017
- toDb: (clientValue: {
1018
- name: string;
1019
- id: number;
1020
- fluffynessScale: ("bald" | "fuzzy" | "fluffy" | "poof")[];
1021
- favourite: boolean;
1022
- userId?: any;
1023
- }[]) => {
1024
- name: string;
1025
- id: number;
1026
- fluffynessScale: string;
1027
- favourite: number;
1028
- userId?: any;
1029
- }[];
1030
- };
1031
- };
1032
- };
1033
- };
1034
- };