@astrojs/db 0.7.2 → 0.8.0

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