@astrojs/db 0.21.1 → 0.21.2

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,1444 +0,0 @@
1
- import { SQL } from 'drizzle-orm';
2
- import * as z from 'zod/v4';
3
- import { type SerializedSQL } from '../runtime/types.js';
4
- import type { NumberColumn, TextColumn } from './types.js';
5
- export type MaybeArray<T> = T | T[];
6
- export declare const booleanColumnSchema: z.ZodObject<{
7
- type: z.ZodLiteral<"boolean">;
8
- schema: z.ZodObject<{
9
- label: z.ZodOptional<z.ZodString>;
10
- optional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
11
- unique: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
12
- deprecated: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
13
- name: z.ZodOptional<z.ZodString>;
14
- collection: z.ZodOptional<z.ZodString>;
15
- default: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodPipe<z.ZodCustom<SQL<any>, SQL<any>>, z.ZodTransform<SerializedSQL, SQL<any>>>]>>;
16
- }, z.core.$strip>;
17
- }, z.core.$strip>;
18
- declare const numberColumnBaseSchema: z.ZodIntersection<z.ZodObject<{
19
- name: z.ZodOptional<z.ZodString>;
20
- label: z.ZodOptional<z.ZodString>;
21
- unique: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
22
- deprecated: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
23
- collection: z.ZodOptional<z.ZodString>;
24
- }, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
25
- primaryKey: z.ZodDefault<z.ZodOptional<z.ZodLiteral<false>>>;
26
- optional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
27
- default: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodCustom<SQL<any>, SQL<any>>, z.ZodTransform<SerializedSQL, SQL<any>>>]>>;
28
- }, z.core.$strip>, z.ZodObject<{
29
- primaryKey: z.ZodLiteral<true>;
30
- optional: z.ZodOptional<z.ZodLiteral<false>>;
31
- default: z.ZodOptional<z.ZodLiteral<undefined>>;
32
- }, z.core.$strip>]>>;
33
- export declare const numberColumnOptsSchema: z.ZodType<z.infer<typeof numberColumnBaseSchema> & {
34
- references?: NumberColumn;
35
- }, z.input<typeof numberColumnBaseSchema> & {
36
- references?: () => z.input<typeof numberColumnSchema>;
37
- }>;
38
- export declare const numberColumnSchema: z.ZodObject<{
39
- type: z.ZodLiteral<"number">;
40
- schema: z.ZodType<({
41
- unique: boolean;
42
- deprecated: boolean;
43
- name?: string | undefined;
44
- label?: string | undefined;
45
- collection?: string | undefined;
46
- } & ({
47
- primaryKey: false;
48
- optional: boolean;
49
- default?: number | SerializedSQL | undefined;
50
- } | {
51
- primaryKey: true;
52
- optional?: false | undefined;
53
- default?: undefined;
54
- })) & {
55
- references?: NumberColumn;
56
- }, ({
57
- name?: string | undefined;
58
- label?: string | undefined;
59
- unique?: boolean | undefined;
60
- deprecated?: boolean | undefined;
61
- collection?: string | undefined;
62
- } & ({
63
- primaryKey?: false | undefined;
64
- optional?: boolean | undefined;
65
- default?: number | SQL<any> | undefined;
66
- } | {
67
- primaryKey: true;
68
- optional?: false | undefined;
69
- default?: undefined;
70
- })) & {
71
- references?: () => z.input<typeof numberColumnSchema>;
72
- }, z.core.$ZodTypeInternals<({
73
- unique: boolean;
74
- deprecated: boolean;
75
- name?: string | undefined;
76
- label?: string | undefined;
77
- collection?: string | undefined;
78
- } & ({
79
- primaryKey: false;
80
- optional: boolean;
81
- default?: number | SerializedSQL | undefined;
82
- } | {
83
- primaryKey: true;
84
- optional?: false | undefined;
85
- default?: undefined;
86
- })) & {
87
- references?: NumberColumn;
88
- }, ({
89
- name?: string | undefined;
90
- label?: string | undefined;
91
- unique?: boolean | undefined;
92
- deprecated?: boolean | undefined;
93
- collection?: string | undefined;
94
- } & ({
95
- primaryKey?: false | undefined;
96
- optional?: boolean | undefined;
97
- default?: number | SQL<any> | undefined;
98
- } | {
99
- primaryKey: true;
100
- optional?: false | undefined;
101
- default?: undefined;
102
- })) & {
103
- references?: () => z.input<typeof numberColumnSchema>;
104
- }>>;
105
- }, z.core.$strip>;
106
- declare const textColumnBaseSchema: z.ZodIntersection<z.ZodObject<{
107
- name: z.ZodOptional<z.ZodString>;
108
- label: z.ZodOptional<z.ZodString>;
109
- unique: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
110
- deprecated: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
111
- collection: z.ZodOptional<z.ZodString>;
112
- default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodCustom<SQL<any>, SQL<any>>, z.ZodTransform<SerializedSQL, SQL<any>>>]>>;
113
- multiline: z.ZodOptional<z.ZodBoolean>;
114
- enum: z.ZodOptional<z.ZodTuple<[z.ZodString], z.ZodString>>;
115
- }, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
116
- primaryKey: z.ZodDefault<z.ZodOptional<z.ZodLiteral<false>>>;
117
- optional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
118
- }, z.core.$strip>, z.ZodObject<{
119
- primaryKey: z.ZodLiteral<true>;
120
- optional: z.ZodOptional<z.ZodLiteral<false>>;
121
- }, z.core.$strip>]>>;
122
- export declare const textColumnOptsSchema: z.ZodType<z.infer<typeof textColumnBaseSchema> & {
123
- references?: TextColumn;
124
- }, z.input<typeof textColumnBaseSchema> & {
125
- references?: () => z.input<typeof textColumnSchema>;
126
- }>;
127
- export declare const textColumnSchema: z.ZodObject<{
128
- type: z.ZodLiteral<"text">;
129
- schema: z.ZodType<({
130
- unique: boolean;
131
- deprecated: boolean;
132
- name?: string | undefined;
133
- label?: string | undefined;
134
- collection?: string | undefined;
135
- default?: string | SerializedSQL | undefined;
136
- multiline?: boolean | undefined;
137
- enum?: [string, ...string[]] | undefined;
138
- } & ({
139
- primaryKey: false;
140
- optional: boolean;
141
- } | {
142
- primaryKey: true;
143
- optional?: false | undefined;
144
- })) & {
145
- references?: TextColumn;
146
- }, ({
147
- name?: string | undefined;
148
- label?: string | undefined;
149
- unique?: boolean | undefined;
150
- deprecated?: boolean | undefined;
151
- collection?: string | undefined;
152
- default?: string | SQL<any> | undefined;
153
- multiline?: boolean | undefined;
154
- enum?: [string, ...string[]] | undefined;
155
- } & ({
156
- primaryKey?: false | undefined;
157
- optional?: boolean | undefined;
158
- } | {
159
- primaryKey: true;
160
- optional?: false | undefined;
161
- })) & {
162
- references?: () => z.input<typeof textColumnSchema>;
163
- }, z.core.$ZodTypeInternals<({
164
- unique: boolean;
165
- deprecated: boolean;
166
- name?: string | undefined;
167
- label?: string | undefined;
168
- collection?: string | undefined;
169
- default?: string | SerializedSQL | undefined;
170
- multiline?: boolean | undefined;
171
- enum?: [string, ...string[]] | undefined;
172
- } & ({
173
- primaryKey: false;
174
- optional: boolean;
175
- } | {
176
- primaryKey: true;
177
- optional?: false | undefined;
178
- })) & {
179
- references?: TextColumn;
180
- }, ({
181
- name?: string | undefined;
182
- label?: string | undefined;
183
- unique?: boolean | undefined;
184
- deprecated?: boolean | undefined;
185
- collection?: string | undefined;
186
- default?: string | SQL<any> | undefined;
187
- multiline?: boolean | undefined;
188
- enum?: [string, ...string[]] | undefined;
189
- } & ({
190
- primaryKey?: false | undefined;
191
- optional?: boolean | undefined;
192
- } | {
193
- primaryKey: true;
194
- optional?: false | undefined;
195
- })) & {
196
- references?: () => z.input<typeof textColumnSchema>;
197
- }>>;
198
- }, z.core.$strip>;
199
- export declare const dateColumnSchema: z.ZodObject<{
200
- type: z.ZodLiteral<"date">;
201
- schema: z.ZodObject<{
202
- label: z.ZodOptional<z.ZodString>;
203
- optional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
204
- unique: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
205
- deprecated: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
206
- name: z.ZodOptional<z.ZodString>;
207
- collection: z.ZodOptional<z.ZodString>;
208
- default: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodCustom<SQL<any>, SQL<any>>, z.ZodTransform<SerializedSQL, SQL<any>>>, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
209
- }, z.core.$strip>;
210
- }, z.core.$strip>;
211
- export declare const jsonColumnSchema: z.ZodObject<{
212
- type: z.ZodLiteral<"json">;
213
- schema: z.ZodObject<{
214
- label: z.ZodOptional<z.ZodString>;
215
- optional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
216
- unique: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
217
- deprecated: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
218
- name: z.ZodOptional<z.ZodString>;
219
- collection: z.ZodOptional<z.ZodString>;
220
- default: z.ZodOptional<z.ZodUnknown>;
221
- }, z.core.$strip>;
222
- }, z.core.$strip>;
223
- export declare const columnSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
224
- type: z.ZodLiteral<"boolean">;
225
- schema: z.ZodObject<{
226
- label: z.ZodOptional<z.ZodString>;
227
- optional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
228
- unique: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
229
- deprecated: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
230
- name: z.ZodOptional<z.ZodString>;
231
- collection: z.ZodOptional<z.ZodString>;
232
- default: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodPipe<z.ZodCustom<SQL<any>, SQL<any>>, z.ZodTransform<SerializedSQL, SQL<any>>>]>>;
233
- }, z.core.$strip>;
234
- }, z.core.$strip>, z.ZodObject<{
235
- type: z.ZodLiteral<"number">;
236
- schema: z.ZodType<({
237
- unique: boolean;
238
- deprecated: boolean;
239
- name?: string | undefined;
240
- label?: string | undefined;
241
- collection?: string | undefined;
242
- } & ({
243
- primaryKey: false;
244
- optional: boolean;
245
- default?: number | SerializedSQL | undefined;
246
- } | {
247
- primaryKey: true;
248
- optional?: false | undefined;
249
- default?: undefined;
250
- })) & {
251
- references?: NumberColumn;
252
- }, ({
253
- name?: string | undefined;
254
- label?: string | undefined;
255
- unique?: boolean | undefined;
256
- deprecated?: boolean | undefined;
257
- collection?: string | undefined;
258
- } & ({
259
- primaryKey?: false | undefined;
260
- optional?: boolean | undefined;
261
- default?: number | SQL<any> | undefined;
262
- } | {
263
- primaryKey: true;
264
- optional?: false | undefined;
265
- default?: undefined;
266
- })) & {
267
- references?: () => z.input<typeof numberColumnSchema>;
268
- }, z.core.$ZodTypeInternals<({
269
- unique: boolean;
270
- deprecated: boolean;
271
- name?: string | undefined;
272
- label?: string | undefined;
273
- collection?: string | undefined;
274
- } & ({
275
- primaryKey: false;
276
- optional: boolean;
277
- default?: number | SerializedSQL | undefined;
278
- } | {
279
- primaryKey: true;
280
- optional?: false | undefined;
281
- default?: undefined;
282
- })) & {
283
- references?: NumberColumn;
284
- }, ({
285
- name?: string | undefined;
286
- label?: string | undefined;
287
- unique?: boolean | undefined;
288
- deprecated?: boolean | undefined;
289
- collection?: string | undefined;
290
- } & ({
291
- primaryKey?: false | undefined;
292
- optional?: boolean | undefined;
293
- default?: number | SQL<any> | undefined;
294
- } | {
295
- primaryKey: true;
296
- optional?: false | undefined;
297
- default?: undefined;
298
- })) & {
299
- references?: () => z.input<typeof numberColumnSchema>;
300
- }>>;
301
- }, z.core.$strip>, z.ZodObject<{
302
- type: z.ZodLiteral<"text">;
303
- schema: z.ZodType<({
304
- unique: boolean;
305
- deprecated: boolean;
306
- name?: string | undefined;
307
- label?: string | undefined;
308
- collection?: string | undefined;
309
- default?: string | SerializedSQL | undefined;
310
- multiline?: boolean | undefined;
311
- enum?: [string, ...string[]] | undefined;
312
- } & ({
313
- primaryKey: false;
314
- optional: boolean;
315
- } | {
316
- primaryKey: true;
317
- optional?: false | undefined;
318
- })) & {
319
- references?: TextColumn;
320
- }, ({
321
- name?: string | undefined;
322
- label?: string | undefined;
323
- unique?: boolean | undefined;
324
- deprecated?: boolean | undefined;
325
- collection?: string | undefined;
326
- default?: string | SQL<any> | undefined;
327
- multiline?: boolean | undefined;
328
- enum?: [string, ...string[]] | undefined;
329
- } & ({
330
- primaryKey?: false | undefined;
331
- optional?: boolean | undefined;
332
- } | {
333
- primaryKey: true;
334
- optional?: false | undefined;
335
- })) & {
336
- references?: () => z.input<typeof textColumnSchema>;
337
- }, z.core.$ZodTypeInternals<({
338
- unique: boolean;
339
- deprecated: boolean;
340
- name?: string | undefined;
341
- label?: string | undefined;
342
- collection?: string | undefined;
343
- default?: string | SerializedSQL | undefined;
344
- multiline?: boolean | undefined;
345
- enum?: [string, ...string[]] | undefined;
346
- } & ({
347
- primaryKey: false;
348
- optional: boolean;
349
- } | {
350
- primaryKey: true;
351
- optional?: false | undefined;
352
- })) & {
353
- references?: TextColumn;
354
- }, ({
355
- name?: string | undefined;
356
- label?: string | undefined;
357
- unique?: boolean | undefined;
358
- deprecated?: boolean | undefined;
359
- collection?: string | undefined;
360
- default?: string | SQL<any> | undefined;
361
- multiline?: boolean | undefined;
362
- enum?: [string, ...string[]] | undefined;
363
- } & ({
364
- primaryKey?: false | undefined;
365
- optional?: boolean | undefined;
366
- } | {
367
- primaryKey: true;
368
- optional?: false | undefined;
369
- })) & {
370
- references?: () => z.input<typeof textColumnSchema>;
371
- }>>;
372
- }, z.core.$strip>, z.ZodObject<{
373
- type: z.ZodLiteral<"date">;
374
- schema: z.ZodObject<{
375
- label: z.ZodOptional<z.ZodString>;
376
- optional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
377
- unique: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
378
- deprecated: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
379
- name: z.ZodOptional<z.ZodString>;
380
- collection: z.ZodOptional<z.ZodString>;
381
- default: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodCustom<SQL<any>, SQL<any>>, z.ZodTransform<SerializedSQL, SQL<any>>>, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
382
- }, z.core.$strip>;
383
- }, z.core.$strip>, z.ZodObject<{
384
- type: z.ZodLiteral<"json">;
385
- schema: z.ZodObject<{
386
- label: z.ZodOptional<z.ZodString>;
387
- optional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
388
- unique: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
389
- deprecated: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
390
- name: z.ZodOptional<z.ZodString>;
391
- collection: z.ZodOptional<z.ZodString>;
392
- default: z.ZodOptional<z.ZodUnknown>;
393
- }, z.core.$strip>;
394
- }, z.core.$strip>], "type">;
395
- export declare const referenceableColumnSchema: z.ZodUnion<readonly [z.ZodObject<{
396
- type: z.ZodLiteral<"text">;
397
- schema: z.ZodType<({
398
- unique: boolean;
399
- deprecated: boolean;
400
- name?: string | undefined;
401
- label?: string | undefined;
402
- collection?: string | undefined;
403
- default?: string | SerializedSQL | undefined;
404
- multiline?: boolean | undefined;
405
- enum?: [string, ...string[]] | undefined;
406
- } & ({
407
- primaryKey: false;
408
- optional: boolean;
409
- } | {
410
- primaryKey: true;
411
- optional?: false | undefined;
412
- })) & {
413
- references?: TextColumn;
414
- }, ({
415
- name?: string | undefined;
416
- label?: string | undefined;
417
- unique?: boolean | undefined;
418
- deprecated?: boolean | undefined;
419
- collection?: string | undefined;
420
- default?: string | SQL<any> | undefined;
421
- multiline?: boolean | undefined;
422
- enum?: [string, ...string[]] | undefined;
423
- } & ({
424
- primaryKey?: false | undefined;
425
- optional?: boolean | undefined;
426
- } | {
427
- primaryKey: true;
428
- optional?: false | undefined;
429
- })) & {
430
- references?: () => z.input<typeof textColumnSchema>;
431
- }, z.core.$ZodTypeInternals<({
432
- unique: boolean;
433
- deprecated: boolean;
434
- name?: string | undefined;
435
- label?: string | undefined;
436
- collection?: string | undefined;
437
- default?: string | SerializedSQL | undefined;
438
- multiline?: boolean | undefined;
439
- enum?: [string, ...string[]] | undefined;
440
- } & ({
441
- primaryKey: false;
442
- optional: boolean;
443
- } | {
444
- primaryKey: true;
445
- optional?: false | undefined;
446
- })) & {
447
- references?: TextColumn;
448
- }, ({
449
- name?: string | undefined;
450
- label?: string | undefined;
451
- unique?: boolean | undefined;
452
- deprecated?: boolean | undefined;
453
- collection?: string | undefined;
454
- default?: string | SQL<any> | undefined;
455
- multiline?: boolean | undefined;
456
- enum?: [string, ...string[]] | undefined;
457
- } & ({
458
- primaryKey?: false | undefined;
459
- optional?: boolean | undefined;
460
- } | {
461
- primaryKey: true;
462
- optional?: false | undefined;
463
- })) & {
464
- references?: () => z.input<typeof textColumnSchema>;
465
- }>>;
466
- }, z.core.$strip>, z.ZodObject<{
467
- type: z.ZodLiteral<"number">;
468
- schema: z.ZodType<({
469
- unique: boolean;
470
- deprecated: boolean;
471
- name?: string | undefined;
472
- label?: string | undefined;
473
- collection?: string | undefined;
474
- } & ({
475
- primaryKey: false;
476
- optional: boolean;
477
- default?: number | SerializedSQL | undefined;
478
- } | {
479
- primaryKey: true;
480
- optional?: false | undefined;
481
- default?: undefined;
482
- })) & {
483
- references?: NumberColumn;
484
- }, ({
485
- name?: string | undefined;
486
- label?: string | undefined;
487
- unique?: boolean | undefined;
488
- deprecated?: boolean | undefined;
489
- collection?: string | undefined;
490
- } & ({
491
- primaryKey?: false | undefined;
492
- optional?: boolean | undefined;
493
- default?: number | SQL<any> | undefined;
494
- } | {
495
- primaryKey: true;
496
- optional?: false | undefined;
497
- default?: undefined;
498
- })) & {
499
- references?: () => z.input<typeof numberColumnSchema>;
500
- }, z.core.$ZodTypeInternals<({
501
- unique: boolean;
502
- deprecated: boolean;
503
- name?: string | undefined;
504
- label?: string | undefined;
505
- collection?: string | undefined;
506
- } & ({
507
- primaryKey: false;
508
- optional: boolean;
509
- default?: number | SerializedSQL | undefined;
510
- } | {
511
- primaryKey: true;
512
- optional?: false | undefined;
513
- default?: undefined;
514
- })) & {
515
- references?: NumberColumn;
516
- }, ({
517
- name?: string | undefined;
518
- label?: string | undefined;
519
- unique?: boolean | undefined;
520
- deprecated?: boolean | undefined;
521
- collection?: string | undefined;
522
- } & ({
523
- primaryKey?: false | undefined;
524
- optional?: boolean | undefined;
525
- default?: number | SQL<any> | undefined;
526
- } | {
527
- primaryKey: true;
528
- optional?: false | undefined;
529
- default?: undefined;
530
- })) & {
531
- references?: () => z.input<typeof numberColumnSchema>;
532
- }>>;
533
- }, z.core.$strip>]>;
534
- export declare const columnsSchema: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
535
- type: z.ZodLiteral<"boolean">;
536
- schema: z.ZodObject<{
537
- label: z.ZodOptional<z.ZodString>;
538
- optional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
539
- unique: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
540
- deprecated: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
541
- name: z.ZodOptional<z.ZodString>;
542
- collection: z.ZodOptional<z.ZodString>;
543
- default: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodPipe<z.ZodCustom<SQL<any>, SQL<any>>, z.ZodTransform<SerializedSQL, SQL<any>>>]>>;
544
- }, z.core.$strip>;
545
- }, z.core.$strip>, z.ZodObject<{
546
- type: z.ZodLiteral<"number">;
547
- schema: z.ZodType<({
548
- unique: boolean;
549
- deprecated: boolean;
550
- name?: string | undefined;
551
- label?: string | undefined;
552
- collection?: string | undefined;
553
- } & ({
554
- primaryKey: false;
555
- optional: boolean;
556
- default?: number | SerializedSQL | undefined;
557
- } | {
558
- primaryKey: true;
559
- optional?: false | undefined;
560
- default?: undefined;
561
- })) & {
562
- references?: NumberColumn;
563
- }, ({
564
- name?: string | undefined;
565
- label?: string | undefined;
566
- unique?: boolean | undefined;
567
- deprecated?: boolean | undefined;
568
- collection?: string | undefined;
569
- } & ({
570
- primaryKey?: false | undefined;
571
- optional?: boolean | undefined;
572
- default?: number | SQL<any> | undefined;
573
- } | {
574
- primaryKey: true;
575
- optional?: false | undefined;
576
- default?: undefined;
577
- })) & {
578
- references?: () => z.input<typeof numberColumnSchema>;
579
- }, z.core.$ZodTypeInternals<({
580
- unique: boolean;
581
- deprecated: boolean;
582
- name?: string | undefined;
583
- label?: string | undefined;
584
- collection?: string | undefined;
585
- } & ({
586
- primaryKey: false;
587
- optional: boolean;
588
- default?: number | SerializedSQL | undefined;
589
- } | {
590
- primaryKey: true;
591
- optional?: false | undefined;
592
- default?: undefined;
593
- })) & {
594
- references?: NumberColumn;
595
- }, ({
596
- name?: string | undefined;
597
- label?: string | undefined;
598
- unique?: boolean | undefined;
599
- deprecated?: boolean | undefined;
600
- collection?: string | undefined;
601
- } & ({
602
- primaryKey?: false | undefined;
603
- optional?: boolean | undefined;
604
- default?: number | SQL<any> | undefined;
605
- } | {
606
- primaryKey: true;
607
- optional?: false | undefined;
608
- default?: undefined;
609
- })) & {
610
- references?: () => z.input<typeof numberColumnSchema>;
611
- }>>;
612
- }, z.core.$strip>, z.ZodObject<{
613
- type: z.ZodLiteral<"text">;
614
- schema: z.ZodType<({
615
- unique: boolean;
616
- deprecated: boolean;
617
- name?: string | undefined;
618
- label?: string | undefined;
619
- collection?: string | undefined;
620
- default?: string | SerializedSQL | undefined;
621
- multiline?: boolean | undefined;
622
- enum?: [string, ...string[]] | undefined;
623
- } & ({
624
- primaryKey: false;
625
- optional: boolean;
626
- } | {
627
- primaryKey: true;
628
- optional?: false | undefined;
629
- })) & {
630
- references?: TextColumn;
631
- }, ({
632
- name?: string | undefined;
633
- label?: string | undefined;
634
- unique?: boolean | undefined;
635
- deprecated?: boolean | undefined;
636
- collection?: string | undefined;
637
- default?: string | SQL<any> | undefined;
638
- multiline?: boolean | undefined;
639
- enum?: [string, ...string[]] | undefined;
640
- } & ({
641
- primaryKey?: false | undefined;
642
- optional?: boolean | undefined;
643
- } | {
644
- primaryKey: true;
645
- optional?: false | undefined;
646
- })) & {
647
- references?: () => z.input<typeof textColumnSchema>;
648
- }, z.core.$ZodTypeInternals<({
649
- unique: boolean;
650
- deprecated: boolean;
651
- name?: string | undefined;
652
- label?: string | undefined;
653
- collection?: string | undefined;
654
- default?: string | SerializedSQL | undefined;
655
- multiline?: boolean | undefined;
656
- enum?: [string, ...string[]] | undefined;
657
- } & ({
658
- primaryKey: false;
659
- optional: boolean;
660
- } | {
661
- primaryKey: true;
662
- optional?: false | undefined;
663
- })) & {
664
- references?: TextColumn;
665
- }, ({
666
- name?: string | undefined;
667
- label?: string | undefined;
668
- unique?: boolean | undefined;
669
- deprecated?: boolean | undefined;
670
- collection?: string | undefined;
671
- default?: string | SQL<any> | undefined;
672
- multiline?: boolean | undefined;
673
- enum?: [string, ...string[]] | undefined;
674
- } & ({
675
- primaryKey?: false | undefined;
676
- optional?: boolean | undefined;
677
- } | {
678
- primaryKey: true;
679
- optional?: false | undefined;
680
- })) & {
681
- references?: () => z.input<typeof textColumnSchema>;
682
- }>>;
683
- }, z.core.$strip>, z.ZodObject<{
684
- type: z.ZodLiteral<"date">;
685
- schema: z.ZodObject<{
686
- label: z.ZodOptional<z.ZodString>;
687
- optional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
688
- unique: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
689
- deprecated: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
690
- name: z.ZodOptional<z.ZodString>;
691
- collection: z.ZodOptional<z.ZodString>;
692
- default: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodCustom<SQL<any>, SQL<any>>, z.ZodTransform<SerializedSQL, SQL<any>>>, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
693
- }, z.core.$strip>;
694
- }, z.core.$strip>, z.ZodObject<{
695
- type: z.ZodLiteral<"json">;
696
- schema: z.ZodObject<{
697
- label: z.ZodOptional<z.ZodString>;
698
- optional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
699
- unique: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
700
- deprecated: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
701
- name: z.ZodOptional<z.ZodString>;
702
- collection: z.ZodOptional<z.ZodString>;
703
- default: z.ZodOptional<z.ZodUnknown>;
704
- }, z.core.$strip>;
705
- }, z.core.$strip>], "type">>;
706
- type ForeignKeysInput = {
707
- columns: MaybeArray<string>;
708
- references: () => MaybeArray<Omit<z.input<typeof referenceableColumnSchema>, 'references'>>;
709
- };
710
- type ForeignKeysOutput = Omit<ForeignKeysInput, 'references'> & {
711
- references: MaybeArray<Omit<z.output<typeof referenceableColumnSchema>, 'references'>>;
712
- };
713
- export declare const resolvedIndexSchema: z.ZodObject<{
714
- on: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>;
715
- unique: z.ZodOptional<z.ZodBoolean>;
716
- }, z.core.$strip>;
717
- export declare const indexSchema: z.ZodObject<{
718
- on: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>;
719
- unique: z.ZodOptional<z.ZodBoolean>;
720
- name: z.ZodOptional<z.ZodString>;
721
- }, z.core.$strip>;
722
- export declare const tableSchema: z.ZodObject<{
723
- columns: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
724
- type: z.ZodLiteral<"boolean">;
725
- schema: z.ZodObject<{
726
- label: z.ZodOptional<z.ZodString>;
727
- optional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
728
- unique: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
729
- deprecated: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
730
- name: z.ZodOptional<z.ZodString>;
731
- collection: z.ZodOptional<z.ZodString>;
732
- default: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodPipe<z.ZodCustom<SQL<any>, SQL<any>>, z.ZodTransform<SerializedSQL, SQL<any>>>]>>;
733
- }, z.core.$strip>;
734
- }, z.core.$strip>, z.ZodObject<{
735
- type: z.ZodLiteral<"number">;
736
- schema: z.ZodType<({
737
- unique: boolean;
738
- deprecated: boolean;
739
- name?: string | undefined;
740
- label?: string | undefined;
741
- collection?: string | undefined;
742
- } & ({
743
- primaryKey: false;
744
- optional: boolean;
745
- default?: number | SerializedSQL | undefined;
746
- } | {
747
- primaryKey: true;
748
- optional?: false | undefined;
749
- default?: undefined;
750
- })) & {
751
- references?: NumberColumn;
752
- }, ({
753
- name?: string | undefined;
754
- label?: string | undefined;
755
- unique?: boolean | undefined;
756
- deprecated?: boolean | undefined;
757
- collection?: string | undefined;
758
- } & ({
759
- primaryKey?: false | undefined;
760
- optional?: boolean | undefined;
761
- default?: number | SQL<any> | undefined;
762
- } | {
763
- primaryKey: true;
764
- optional?: false | undefined;
765
- default?: undefined;
766
- })) & {
767
- references?: () => z.input<typeof numberColumnSchema>;
768
- }, z.core.$ZodTypeInternals<({
769
- unique: boolean;
770
- deprecated: boolean;
771
- name?: string | undefined;
772
- label?: string | undefined;
773
- collection?: string | undefined;
774
- } & ({
775
- primaryKey: false;
776
- optional: boolean;
777
- default?: number | SerializedSQL | undefined;
778
- } | {
779
- primaryKey: true;
780
- optional?: false | undefined;
781
- default?: undefined;
782
- })) & {
783
- references?: NumberColumn;
784
- }, ({
785
- name?: string | undefined;
786
- label?: string | undefined;
787
- unique?: boolean | undefined;
788
- deprecated?: boolean | undefined;
789
- collection?: string | undefined;
790
- } & ({
791
- primaryKey?: false | undefined;
792
- optional?: boolean | undefined;
793
- default?: number | SQL<any> | undefined;
794
- } | {
795
- primaryKey: true;
796
- optional?: false | undefined;
797
- default?: undefined;
798
- })) & {
799
- references?: () => z.input<typeof numberColumnSchema>;
800
- }>>;
801
- }, z.core.$strip>, z.ZodObject<{
802
- type: z.ZodLiteral<"text">;
803
- schema: z.ZodType<({
804
- unique: boolean;
805
- deprecated: boolean;
806
- name?: string | undefined;
807
- label?: string | undefined;
808
- collection?: string | undefined;
809
- default?: string | SerializedSQL | undefined;
810
- multiline?: boolean | undefined;
811
- enum?: [string, ...string[]] | undefined;
812
- } & ({
813
- primaryKey: false;
814
- optional: boolean;
815
- } | {
816
- primaryKey: true;
817
- optional?: false | undefined;
818
- })) & {
819
- references?: TextColumn;
820
- }, ({
821
- name?: string | undefined;
822
- label?: string | undefined;
823
- unique?: boolean | undefined;
824
- deprecated?: boolean | undefined;
825
- collection?: string | undefined;
826
- default?: string | SQL<any> | undefined;
827
- multiline?: boolean | undefined;
828
- enum?: [string, ...string[]] | undefined;
829
- } & ({
830
- primaryKey?: false | undefined;
831
- optional?: boolean | undefined;
832
- } | {
833
- primaryKey: true;
834
- optional?: false | undefined;
835
- })) & {
836
- references?: () => z.input<typeof textColumnSchema>;
837
- }, z.core.$ZodTypeInternals<({
838
- unique: boolean;
839
- deprecated: boolean;
840
- name?: string | undefined;
841
- label?: string | undefined;
842
- collection?: string | undefined;
843
- default?: string | SerializedSQL | undefined;
844
- multiline?: boolean | undefined;
845
- enum?: [string, ...string[]] | undefined;
846
- } & ({
847
- primaryKey: false;
848
- optional: boolean;
849
- } | {
850
- primaryKey: true;
851
- optional?: false | undefined;
852
- })) & {
853
- references?: TextColumn;
854
- }, ({
855
- name?: string | undefined;
856
- label?: string | undefined;
857
- unique?: boolean | undefined;
858
- deprecated?: boolean | undefined;
859
- collection?: string | undefined;
860
- default?: string | SQL<any> | undefined;
861
- multiline?: boolean | undefined;
862
- enum?: [string, ...string[]] | undefined;
863
- } & ({
864
- primaryKey?: false | undefined;
865
- optional?: boolean | undefined;
866
- } | {
867
- primaryKey: true;
868
- optional?: false | undefined;
869
- })) & {
870
- references?: () => z.input<typeof textColumnSchema>;
871
- }>>;
872
- }, z.core.$strip>, z.ZodObject<{
873
- type: z.ZodLiteral<"date">;
874
- schema: z.ZodObject<{
875
- label: z.ZodOptional<z.ZodString>;
876
- optional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
877
- unique: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
878
- deprecated: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
879
- name: z.ZodOptional<z.ZodString>;
880
- collection: z.ZodOptional<z.ZodString>;
881
- default: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodCustom<SQL<any>, SQL<any>>, z.ZodTransform<SerializedSQL, SQL<any>>>, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
882
- }, z.core.$strip>;
883
- }, z.core.$strip>, z.ZodObject<{
884
- type: z.ZodLiteral<"json">;
885
- schema: z.ZodObject<{
886
- label: z.ZodOptional<z.ZodString>;
887
- optional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
888
- unique: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
889
- deprecated: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
890
- name: z.ZodOptional<z.ZodString>;
891
- collection: z.ZodOptional<z.ZodString>;
892
- default: z.ZodOptional<z.ZodUnknown>;
893
- }, z.core.$strip>;
894
- }, z.core.$strip>], "type">>;
895
- indexes: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodObject<{
896
- on: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>;
897
- unique: z.ZodOptional<z.ZodBoolean>;
898
- name: z.ZodOptional<z.ZodString>;
899
- }, z.core.$strip>>, z.ZodRecord<z.ZodString, z.ZodObject<{
900
- on: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>;
901
- unique: z.ZodOptional<z.ZodBoolean>;
902
- }, z.core.$strip>>]>>;
903
- foreignKeys: z.ZodOptional<z.ZodArray<z.ZodType<ForeignKeysOutput, ForeignKeysInput, z.core.$ZodTypeInternals<ForeignKeysOutput, ForeignKeysInput>>>>;
904
- deprecated: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
905
- }, z.core.$strip>;
906
- export declare const tablesSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodRecord<z.ZodString, z.ZodObject<{
907
- columns: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
908
- type: z.ZodLiteral<"boolean">;
909
- schema: z.ZodObject<{
910
- label: z.ZodOptional<z.ZodString>;
911
- optional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
912
- unique: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
913
- deprecated: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
914
- name: z.ZodOptional<z.ZodString>;
915
- collection: z.ZodOptional<z.ZodString>;
916
- default: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodPipe<z.ZodCustom<SQL<any>, SQL<any>>, z.ZodTransform<SerializedSQL, SQL<any>>>]>>;
917
- }, z.core.$strip>;
918
- }, z.core.$strip>, z.ZodObject<{
919
- type: z.ZodLiteral<"number">;
920
- schema: z.ZodType<({
921
- unique: boolean;
922
- deprecated: boolean;
923
- name?: string | undefined;
924
- label?: string | undefined;
925
- collection?: string | undefined;
926
- } & ({
927
- primaryKey: false;
928
- optional: boolean;
929
- default?: number | SerializedSQL | undefined;
930
- } | {
931
- primaryKey: true;
932
- optional?: false | undefined;
933
- default?: undefined;
934
- })) & {
935
- references?: NumberColumn;
936
- }, ({
937
- name?: string | undefined;
938
- label?: string | undefined;
939
- unique?: boolean | undefined;
940
- deprecated?: boolean | undefined;
941
- collection?: string | undefined;
942
- } & ({
943
- primaryKey?: false | undefined;
944
- optional?: boolean | undefined;
945
- default?: number | SQL<any> | undefined;
946
- } | {
947
- primaryKey: true;
948
- optional?: false | undefined;
949
- default?: undefined;
950
- })) & {
951
- references?: () => z.input<typeof numberColumnSchema>;
952
- }, z.core.$ZodTypeInternals<({
953
- unique: boolean;
954
- deprecated: boolean;
955
- name?: string | undefined;
956
- label?: string | undefined;
957
- collection?: string | undefined;
958
- } & ({
959
- primaryKey: false;
960
- optional: boolean;
961
- default?: number | SerializedSQL | undefined;
962
- } | {
963
- primaryKey: true;
964
- optional?: false | undefined;
965
- default?: undefined;
966
- })) & {
967
- references?: NumberColumn;
968
- }, ({
969
- name?: string | undefined;
970
- label?: string | undefined;
971
- unique?: boolean | undefined;
972
- deprecated?: boolean | undefined;
973
- collection?: string | undefined;
974
- } & ({
975
- primaryKey?: false | undefined;
976
- optional?: boolean | undefined;
977
- default?: number | SQL<any> | undefined;
978
- } | {
979
- primaryKey: true;
980
- optional?: false | undefined;
981
- default?: undefined;
982
- })) & {
983
- references?: () => z.input<typeof numberColumnSchema>;
984
- }>>;
985
- }, z.core.$strip>, z.ZodObject<{
986
- type: z.ZodLiteral<"text">;
987
- schema: z.ZodType<({
988
- unique: boolean;
989
- deprecated: boolean;
990
- name?: string | undefined;
991
- label?: string | undefined;
992
- collection?: string | undefined;
993
- default?: string | SerializedSQL | undefined;
994
- multiline?: boolean | undefined;
995
- enum?: [string, ...string[]] | undefined;
996
- } & ({
997
- primaryKey: false;
998
- optional: boolean;
999
- } | {
1000
- primaryKey: true;
1001
- optional?: false | undefined;
1002
- })) & {
1003
- references?: TextColumn;
1004
- }, ({
1005
- name?: string | undefined;
1006
- label?: string | undefined;
1007
- unique?: boolean | undefined;
1008
- deprecated?: boolean | undefined;
1009
- collection?: string | undefined;
1010
- default?: string | SQL<any> | undefined;
1011
- multiline?: boolean | undefined;
1012
- enum?: [string, ...string[]] | undefined;
1013
- } & ({
1014
- primaryKey?: false | undefined;
1015
- optional?: boolean | undefined;
1016
- } | {
1017
- primaryKey: true;
1018
- optional?: false | undefined;
1019
- })) & {
1020
- references?: () => z.input<typeof textColumnSchema>;
1021
- }, z.core.$ZodTypeInternals<({
1022
- unique: boolean;
1023
- deprecated: boolean;
1024
- name?: string | undefined;
1025
- label?: string | undefined;
1026
- collection?: string | undefined;
1027
- default?: string | SerializedSQL | undefined;
1028
- multiline?: boolean | undefined;
1029
- enum?: [string, ...string[]] | undefined;
1030
- } & ({
1031
- primaryKey: false;
1032
- optional: boolean;
1033
- } | {
1034
- primaryKey: true;
1035
- optional?: false | undefined;
1036
- })) & {
1037
- references?: TextColumn;
1038
- }, ({
1039
- name?: string | undefined;
1040
- label?: string | undefined;
1041
- unique?: boolean | undefined;
1042
- deprecated?: boolean | undefined;
1043
- collection?: string | undefined;
1044
- default?: string | SQL<any> | undefined;
1045
- multiline?: boolean | undefined;
1046
- enum?: [string, ...string[]] | undefined;
1047
- } & ({
1048
- primaryKey?: false | undefined;
1049
- optional?: boolean | undefined;
1050
- } | {
1051
- primaryKey: true;
1052
- optional?: false | undefined;
1053
- })) & {
1054
- references?: () => z.input<typeof textColumnSchema>;
1055
- }>>;
1056
- }, z.core.$strip>, z.ZodObject<{
1057
- type: z.ZodLiteral<"date">;
1058
- schema: z.ZodObject<{
1059
- label: z.ZodOptional<z.ZodString>;
1060
- optional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1061
- unique: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1062
- deprecated: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1063
- name: z.ZodOptional<z.ZodString>;
1064
- collection: z.ZodOptional<z.ZodString>;
1065
- default: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodCustom<SQL<any>, SQL<any>>, z.ZodTransform<SerializedSQL, SQL<any>>>, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
1066
- }, z.core.$strip>;
1067
- }, z.core.$strip>, z.ZodObject<{
1068
- type: z.ZodLiteral<"json">;
1069
- schema: z.ZodObject<{
1070
- label: z.ZodOptional<z.ZodString>;
1071
- optional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1072
- unique: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1073
- deprecated: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1074
- name: z.ZodOptional<z.ZodString>;
1075
- collection: z.ZodOptional<z.ZodString>;
1076
- default: z.ZodOptional<z.ZodUnknown>;
1077
- }, z.core.$strip>;
1078
- }, z.core.$strip>], "type">>;
1079
- indexes: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodObject<{
1080
- on: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>;
1081
- unique: z.ZodOptional<z.ZodBoolean>;
1082
- name: z.ZodOptional<z.ZodString>;
1083
- }, z.core.$strip>>, z.ZodRecord<z.ZodString, z.ZodObject<{
1084
- on: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>;
1085
- unique: z.ZodOptional<z.ZodBoolean>;
1086
- }, z.core.$strip>>]>>;
1087
- foreignKeys: z.ZodOptional<z.ZodArray<z.ZodType<ForeignKeysOutput, ForeignKeysInput, z.core.$ZodTypeInternals<ForeignKeysOutput, ForeignKeysInput>>>>;
1088
- deprecated: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1089
- }, z.core.$strip>>>;
1090
- export declare const dbConfigSchema: z.ZodPipe<z.ZodObject<{
1091
- tables: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodRecord<z.ZodString, z.ZodObject<{
1092
- columns: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
1093
- type: z.ZodLiteral<"boolean">;
1094
- schema: z.ZodObject<{
1095
- label: z.ZodOptional<z.ZodString>;
1096
- optional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1097
- unique: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1098
- deprecated: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1099
- name: z.ZodOptional<z.ZodString>;
1100
- collection: z.ZodOptional<z.ZodString>;
1101
- default: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodPipe<z.ZodCustom<SQL<any>, SQL<any>>, z.ZodTransform<SerializedSQL, SQL<any>>>]>>;
1102
- }, z.core.$strip>;
1103
- }, z.core.$strip>, z.ZodObject<{
1104
- type: z.ZodLiteral<"number">;
1105
- schema: z.ZodType<({
1106
- unique: boolean;
1107
- deprecated: boolean;
1108
- name?: string | undefined;
1109
- label?: string | undefined;
1110
- collection?: string | undefined;
1111
- } & ({
1112
- primaryKey: false;
1113
- optional: boolean;
1114
- default?: number | SerializedSQL | undefined;
1115
- } | {
1116
- primaryKey: true;
1117
- optional?: false | undefined;
1118
- default?: undefined;
1119
- })) & {
1120
- references?: NumberColumn;
1121
- }, ({
1122
- name?: string | undefined;
1123
- label?: string | undefined;
1124
- unique?: boolean | undefined;
1125
- deprecated?: boolean | undefined;
1126
- collection?: string | undefined;
1127
- } & ({
1128
- primaryKey?: false | undefined;
1129
- optional?: boolean | undefined;
1130
- default?: number | SQL<any> | undefined;
1131
- } | {
1132
- primaryKey: true;
1133
- optional?: false | undefined;
1134
- default?: undefined;
1135
- })) & {
1136
- references?: () => z.input<typeof numberColumnSchema>;
1137
- }, z.core.$ZodTypeInternals<({
1138
- unique: boolean;
1139
- deprecated: boolean;
1140
- name?: string | undefined;
1141
- label?: string | undefined;
1142
- collection?: string | undefined;
1143
- } & ({
1144
- primaryKey: false;
1145
- optional: boolean;
1146
- default?: number | SerializedSQL | undefined;
1147
- } | {
1148
- primaryKey: true;
1149
- optional?: false | undefined;
1150
- default?: undefined;
1151
- })) & {
1152
- references?: NumberColumn;
1153
- }, ({
1154
- name?: string | undefined;
1155
- label?: string | undefined;
1156
- unique?: boolean | undefined;
1157
- deprecated?: boolean | undefined;
1158
- collection?: string | undefined;
1159
- } & ({
1160
- primaryKey?: false | undefined;
1161
- optional?: boolean | undefined;
1162
- default?: number | SQL<any> | undefined;
1163
- } | {
1164
- primaryKey: true;
1165
- optional?: false | undefined;
1166
- default?: undefined;
1167
- })) & {
1168
- references?: () => z.input<typeof numberColumnSchema>;
1169
- }>>;
1170
- }, z.core.$strip>, z.ZodObject<{
1171
- type: z.ZodLiteral<"text">;
1172
- schema: z.ZodType<({
1173
- unique: boolean;
1174
- deprecated: boolean;
1175
- name?: string | undefined;
1176
- label?: string | undefined;
1177
- collection?: string | undefined;
1178
- default?: string | SerializedSQL | undefined;
1179
- multiline?: boolean | undefined;
1180
- enum?: [string, ...string[]] | undefined;
1181
- } & ({
1182
- primaryKey: false;
1183
- optional: boolean;
1184
- } | {
1185
- primaryKey: true;
1186
- optional?: false | undefined;
1187
- })) & {
1188
- references?: TextColumn;
1189
- }, ({
1190
- name?: string | undefined;
1191
- label?: string | undefined;
1192
- unique?: boolean | undefined;
1193
- deprecated?: boolean | undefined;
1194
- collection?: string | undefined;
1195
- default?: string | SQL<any> | undefined;
1196
- multiline?: boolean | undefined;
1197
- enum?: [string, ...string[]] | undefined;
1198
- } & ({
1199
- primaryKey?: false | undefined;
1200
- optional?: boolean | undefined;
1201
- } | {
1202
- primaryKey: true;
1203
- optional?: false | undefined;
1204
- })) & {
1205
- references?: () => z.input<typeof textColumnSchema>;
1206
- }, z.core.$ZodTypeInternals<({
1207
- unique: boolean;
1208
- deprecated: boolean;
1209
- name?: string | undefined;
1210
- label?: string | undefined;
1211
- collection?: string | undefined;
1212
- default?: string | SerializedSQL | undefined;
1213
- multiline?: boolean | undefined;
1214
- enum?: [string, ...string[]] | undefined;
1215
- } & ({
1216
- primaryKey: false;
1217
- optional: boolean;
1218
- } | {
1219
- primaryKey: true;
1220
- optional?: false | undefined;
1221
- })) & {
1222
- references?: TextColumn;
1223
- }, ({
1224
- name?: string | undefined;
1225
- label?: string | undefined;
1226
- unique?: boolean | undefined;
1227
- deprecated?: boolean | undefined;
1228
- collection?: string | undefined;
1229
- default?: string | SQL<any> | undefined;
1230
- multiline?: boolean | undefined;
1231
- enum?: [string, ...string[]] | undefined;
1232
- } & ({
1233
- primaryKey?: false | undefined;
1234
- optional?: boolean | undefined;
1235
- } | {
1236
- primaryKey: true;
1237
- optional?: false | undefined;
1238
- })) & {
1239
- references?: () => z.input<typeof textColumnSchema>;
1240
- }>>;
1241
- }, z.core.$strip>, z.ZodObject<{
1242
- type: z.ZodLiteral<"date">;
1243
- schema: z.ZodObject<{
1244
- label: z.ZodOptional<z.ZodString>;
1245
- optional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1246
- unique: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1247
- deprecated: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1248
- name: z.ZodOptional<z.ZodString>;
1249
- collection: z.ZodOptional<z.ZodString>;
1250
- default: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodCustom<SQL<any>, SQL<any>>, z.ZodTransform<SerializedSQL, SQL<any>>>, z.ZodPipe<z.ZodDate, z.ZodTransform<string, Date>>]>>;
1251
- }, z.core.$strip>;
1252
- }, z.core.$strip>, z.ZodObject<{
1253
- type: z.ZodLiteral<"json">;
1254
- schema: z.ZodObject<{
1255
- label: z.ZodOptional<z.ZodString>;
1256
- optional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1257
- unique: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1258
- deprecated: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1259
- name: z.ZodOptional<z.ZodString>;
1260
- collection: z.ZodOptional<z.ZodString>;
1261
- default: z.ZodOptional<z.ZodUnknown>;
1262
- }, z.core.$strip>;
1263
- }, z.core.$strip>], "type">>;
1264
- indexes: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodObject<{
1265
- on: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>;
1266
- unique: z.ZodOptional<z.ZodBoolean>;
1267
- name: z.ZodOptional<z.ZodString>;
1268
- }, z.core.$strip>>, z.ZodRecord<z.ZodString, z.ZodObject<{
1269
- on: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>;
1270
- unique: z.ZodOptional<z.ZodBoolean>;
1271
- }, z.core.$strip>>]>>;
1272
- foreignKeys: z.ZodOptional<z.ZodArray<z.ZodType<ForeignKeysOutput, ForeignKeysInput, z.core.$ZodTypeInternals<ForeignKeysOutput, ForeignKeysInput>>>>;
1273
- deprecated: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1274
- }, z.core.$strip>>>>;
1275
- }, z.core.$strip>, z.ZodTransform<{
1276
- tables: Record<string, {
1277
- indexes: Record<string, {
1278
- on: string | string[];
1279
- unique?: boolean | undefined;
1280
- }>;
1281
- columns: Record<string, {
1282
- type: "boolean";
1283
- schema: {
1284
- optional: boolean;
1285
- unique: boolean;
1286
- deprecated: boolean;
1287
- label?: string | undefined;
1288
- name?: string | undefined;
1289
- collection?: string | undefined;
1290
- default?: boolean | SerializedSQL | undefined;
1291
- };
1292
- } | {
1293
- type: "number";
1294
- schema: ({
1295
- unique: boolean;
1296
- deprecated: boolean;
1297
- name?: string | undefined;
1298
- label?: string | undefined;
1299
- collection?: string | undefined;
1300
- } & ({
1301
- primaryKey: false;
1302
- optional: boolean;
1303
- default?: number | SerializedSQL | undefined;
1304
- } | {
1305
- primaryKey: true;
1306
- optional?: false | undefined;
1307
- default?: undefined;
1308
- })) & {
1309
- references?: NumberColumn;
1310
- };
1311
- } | {
1312
- type: "text";
1313
- schema: ({
1314
- unique: boolean;
1315
- deprecated: boolean;
1316
- name?: string | undefined;
1317
- label?: string | undefined;
1318
- collection?: string | undefined;
1319
- default?: string | SerializedSQL | undefined;
1320
- multiline?: boolean | undefined;
1321
- enum?: [string, ...string[]] | undefined;
1322
- } & ({
1323
- primaryKey: false;
1324
- optional: boolean;
1325
- } | {
1326
- primaryKey: true;
1327
- optional?: false | undefined;
1328
- })) & {
1329
- references?: TextColumn;
1330
- };
1331
- } | {
1332
- type: "date";
1333
- schema: {
1334
- optional: boolean;
1335
- unique: boolean;
1336
- deprecated: boolean;
1337
- label?: string | undefined;
1338
- name?: string | undefined;
1339
- collection?: string | undefined;
1340
- default?: string | SerializedSQL | undefined;
1341
- };
1342
- } | {
1343
- type: "json";
1344
- schema: {
1345
- optional: boolean;
1346
- unique: boolean;
1347
- deprecated: boolean;
1348
- label?: string | undefined;
1349
- name?: string | undefined;
1350
- collection?: string | undefined;
1351
- default?: unknown;
1352
- };
1353
- }>;
1354
- deprecated: boolean;
1355
- foreignKeys?: ForeignKeysOutput[] | undefined;
1356
- }>;
1357
- }, {
1358
- tables?: Record<string, {
1359
- columns: Record<string, {
1360
- type: "boolean";
1361
- schema: {
1362
- optional: boolean;
1363
- unique: boolean;
1364
- deprecated: boolean;
1365
- label?: string | undefined;
1366
- name?: string | undefined;
1367
- collection?: string | undefined;
1368
- default?: boolean | SerializedSQL | undefined;
1369
- };
1370
- } | {
1371
- type: "number";
1372
- schema: ({
1373
- unique: boolean;
1374
- deprecated: boolean;
1375
- name?: string | undefined;
1376
- label?: string | undefined;
1377
- collection?: string | undefined;
1378
- } & ({
1379
- primaryKey: false;
1380
- optional: boolean;
1381
- default?: number | SerializedSQL | undefined;
1382
- } | {
1383
- primaryKey: true;
1384
- optional?: false | undefined;
1385
- default?: undefined;
1386
- })) & {
1387
- references?: NumberColumn;
1388
- };
1389
- } | {
1390
- type: "text";
1391
- schema: ({
1392
- unique: boolean;
1393
- deprecated: boolean;
1394
- name?: string | undefined;
1395
- label?: string | undefined;
1396
- collection?: string | undefined;
1397
- default?: string | SerializedSQL | undefined;
1398
- multiline?: boolean | undefined;
1399
- enum?: [string, ...string[]] | undefined;
1400
- } & ({
1401
- primaryKey: false;
1402
- optional: boolean;
1403
- } | {
1404
- primaryKey: true;
1405
- optional?: false | undefined;
1406
- })) & {
1407
- references?: TextColumn;
1408
- };
1409
- } | {
1410
- type: "date";
1411
- schema: {
1412
- optional: boolean;
1413
- unique: boolean;
1414
- deprecated: boolean;
1415
- label?: string | undefined;
1416
- name?: string | undefined;
1417
- collection?: string | undefined;
1418
- default?: string | SerializedSQL | undefined;
1419
- };
1420
- } | {
1421
- type: "json";
1422
- schema: {
1423
- optional: boolean;
1424
- unique: boolean;
1425
- deprecated: boolean;
1426
- label?: string | undefined;
1427
- name?: string | undefined;
1428
- collection?: string | undefined;
1429
- default?: unknown;
1430
- };
1431
- }>;
1432
- deprecated: boolean;
1433
- indexes?: Record<string, {
1434
- on: string | string[];
1435
- unique?: boolean | undefined;
1436
- }> | {
1437
- on: string | string[];
1438
- unique?: boolean | undefined;
1439
- name?: string | undefined;
1440
- }[] | undefined;
1441
- foreignKeys?: ForeignKeysOutput[] | undefined;
1442
- }> | undefined;
1443
- }>>;
1444
- export {};