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