@astrojs/db 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -103,7 +103,7 @@ declare const numberFieldSchema: z.ZodObject<{
103
103
  optional?: false | undefined;
104
104
  default?: undefined;
105
105
  })) & {
106
- references?: (() => NumberFieldInput) | undefined;
106
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
107
107
  }>;
108
108
  }, "strip", z.ZodTypeAny, {
109
109
  type: "number";
@@ -184,7 +184,7 @@ declare const numberFieldSchema: z.ZodObject<{
184
184
  optional?: boolean | undefined;
185
185
  default?: number | SQL<any> | undefined;
186
186
  } & {
187
- references?: (() => NumberFieldInput) | undefined;
187
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
188
188
  }) | ({
189
189
  name?: string | undefined;
190
190
  label?: string | undefined;
@@ -195,7 +195,7 @@ declare const numberFieldSchema: z.ZodObject<{
195
195
  optional?: false | undefined;
196
196
  default?: undefined;
197
197
  } & {
198
- references?: (() => NumberFieldInput) | undefined;
198
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
199
199
  });
200
200
  }>;
201
201
  declare const textFieldSchema: z.ZodObject<{
@@ -252,7 +252,7 @@ declare const textFieldSchema: z.ZodObject<{
252
252
  primaryKey: true;
253
253
  optional?: false | undefined;
254
254
  })) & {
255
- references?: (() => TextFieldInput) | undefined;
255
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
256
256
  }>;
257
257
  }, "strip", z.ZodTypeAny, {
258
258
  type: "text";
@@ -340,7 +340,7 @@ declare const textFieldSchema: z.ZodObject<{
340
340
  primaryKey?: false | undefined;
341
341
  optional?: boolean | undefined;
342
342
  } & {
343
- references?: (() => TextFieldInput) | undefined;
343
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
344
344
  }) | ({
345
345
  name?: string | undefined;
346
346
  label?: string | undefined;
@@ -352,7 +352,7 @@ declare const textFieldSchema: z.ZodObject<{
352
352
  primaryKey: true;
353
353
  optional?: false | undefined;
354
354
  } & {
355
- references?: (() => TextFieldInput) | undefined;
355
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
356
356
  });
357
357
  }>;
358
358
  declare const dateFieldSchema: z.ZodObject<{
@@ -541,7 +541,7 @@ declare const fieldSchema: z.ZodUnion<[z.ZodObject<{
541
541
  optional?: false | undefined;
542
542
  default?: undefined;
543
543
  })) & {
544
- references?: (() => NumberFieldInput) | undefined;
544
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
545
545
  }>;
546
546
  }, "strip", z.ZodTypeAny, {
547
547
  type: "number";
@@ -622,7 +622,7 @@ declare const fieldSchema: z.ZodUnion<[z.ZodObject<{
622
622
  optional?: boolean | undefined;
623
623
  default?: number | SQL<any> | undefined;
624
624
  } & {
625
- references?: (() => NumberFieldInput) | undefined;
625
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
626
626
  }) | ({
627
627
  name?: string | undefined;
628
628
  label?: string | undefined;
@@ -633,7 +633,7 @@ declare const fieldSchema: z.ZodUnion<[z.ZodObject<{
633
633
  optional?: false | undefined;
634
634
  default?: undefined;
635
635
  } & {
636
- references?: (() => NumberFieldInput) | undefined;
636
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
637
637
  });
638
638
  }>, z.ZodObject<{
639
639
  type: z.ZodLiteral<"text">;
@@ -689,7 +689,7 @@ declare const fieldSchema: z.ZodUnion<[z.ZodObject<{
689
689
  primaryKey: true;
690
690
  optional?: false | undefined;
691
691
  })) & {
692
- references?: (() => TextFieldInput) | undefined;
692
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
693
693
  }>;
694
694
  }, "strip", z.ZodTypeAny, {
695
695
  type: "text";
@@ -777,7 +777,7 @@ declare const fieldSchema: z.ZodUnion<[z.ZodObject<{
777
777
  primaryKey?: false | undefined;
778
778
  optional?: boolean | undefined;
779
779
  } & {
780
- references?: (() => TextFieldInput) | undefined;
780
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
781
781
  }) | ({
782
782
  name?: string | undefined;
783
783
  label?: string | undefined;
@@ -789,7 +789,7 @@ declare const fieldSchema: z.ZodUnion<[z.ZodObject<{
789
789
  primaryKey: true;
790
790
  optional?: false | undefined;
791
791
  } & {
792
- references?: (() => TextFieldInput) | undefined;
792
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
793
793
  });
794
794
  }>, z.ZodObject<{
795
795
  type: z.ZodLiteral<"date">;
@@ -934,7 +934,7 @@ export declare const referenceableFieldSchema: z.ZodUnion<[z.ZodObject<{
934
934
  primaryKey: true;
935
935
  optional?: false | undefined;
936
936
  })) & {
937
- references?: (() => TextFieldInput) | undefined;
937
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
938
938
  }>;
939
939
  }, "strip", z.ZodTypeAny, {
940
940
  type: "text";
@@ -1022,7 +1022,7 @@ export declare const referenceableFieldSchema: z.ZodUnion<[z.ZodObject<{
1022
1022
  primaryKey?: false | undefined;
1023
1023
  optional?: boolean | undefined;
1024
1024
  } & {
1025
- references?: (() => TextFieldInput) | undefined;
1025
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
1026
1026
  }) | ({
1027
1027
  name?: string | undefined;
1028
1028
  label?: string | undefined;
@@ -1034,7 +1034,7 @@ export declare const referenceableFieldSchema: z.ZodUnion<[z.ZodObject<{
1034
1034
  primaryKey: true;
1035
1035
  optional?: false | undefined;
1036
1036
  } & {
1037
- references?: (() => TextFieldInput) | undefined;
1037
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
1038
1038
  });
1039
1039
  }>, z.ZodObject<{
1040
1040
  type: z.ZodLiteral<"number">;
@@ -1088,7 +1088,7 @@ export declare const referenceableFieldSchema: z.ZodUnion<[z.ZodObject<{
1088
1088
  optional?: false | undefined;
1089
1089
  default?: undefined;
1090
1090
  })) & {
1091
- references?: (() => NumberFieldInput) | undefined;
1091
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
1092
1092
  }>;
1093
1093
  }, "strip", z.ZodTypeAny, {
1094
1094
  type: "number";
@@ -1169,7 +1169,7 @@ export declare const referenceableFieldSchema: z.ZodUnion<[z.ZodObject<{
1169
1169
  optional?: boolean | undefined;
1170
1170
  default?: number | SQL<any> | undefined;
1171
1171
  } & {
1172
- references?: (() => NumberFieldInput) | undefined;
1172
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
1173
1173
  }) | ({
1174
1174
  name?: string | undefined;
1175
1175
  label?: string | undefined;
@@ -1180,7 +1180,7 @@ export declare const referenceableFieldSchema: z.ZodUnion<[z.ZodObject<{
1180
1180
  optional?: false | undefined;
1181
1181
  default?: undefined;
1182
1182
  } & {
1183
- references?: (() => NumberFieldInput) | undefined;
1183
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
1184
1184
  });
1185
1185
  }>]>;
1186
1186
  declare const fieldsSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
@@ -1279,7 +1279,7 @@ declare const fieldsSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
1279
1279
  optional?: false | undefined;
1280
1280
  default?: undefined;
1281
1281
  })) & {
1282
- references?: (() => NumberFieldInput) | undefined;
1282
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
1283
1283
  }>;
1284
1284
  }, "strip", z.ZodTypeAny, {
1285
1285
  type: "number";
@@ -1360,7 +1360,7 @@ declare const fieldsSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
1360
1360
  optional?: boolean | undefined;
1361
1361
  default?: number | SQL<any> | undefined;
1362
1362
  } & {
1363
- references?: (() => NumberFieldInput) | undefined;
1363
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
1364
1364
  }) | ({
1365
1365
  name?: string | undefined;
1366
1366
  label?: string | undefined;
@@ -1371,7 +1371,7 @@ declare const fieldsSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
1371
1371
  optional?: false | undefined;
1372
1372
  default?: undefined;
1373
1373
  } & {
1374
- references?: (() => NumberFieldInput) | undefined;
1374
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
1375
1375
  });
1376
1376
  }>, z.ZodObject<{
1377
1377
  type: z.ZodLiteral<"text">;
@@ -1427,7 +1427,7 @@ declare const fieldsSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
1427
1427
  primaryKey: true;
1428
1428
  optional?: false | undefined;
1429
1429
  })) & {
1430
- references?: (() => TextFieldInput) | undefined;
1430
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
1431
1431
  }>;
1432
1432
  }, "strip", z.ZodTypeAny, {
1433
1433
  type: "text";
@@ -1515,7 +1515,7 @@ declare const fieldsSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
1515
1515
  primaryKey?: false | undefined;
1516
1516
  optional?: boolean | undefined;
1517
1517
  } & {
1518
- references?: (() => TextFieldInput) | undefined;
1518
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
1519
1519
  }) | ({
1520
1520
  name?: string | undefined;
1521
1521
  label?: string | undefined;
@@ -1527,7 +1527,7 @@ declare const fieldsSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
1527
1527
  primaryKey: true;
1528
1528
  optional?: false | undefined;
1529
1529
  } & {
1530
- references?: (() => TextFieldInput) | undefined;
1530
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
1531
1531
  });
1532
1532
  }>, z.ZodObject<{
1533
1533
  type: z.ZodLiteral<"date">;
@@ -1733,7 +1733,7 @@ export declare const readableCollectionSchema: z.ZodObject<{
1733
1733
  optional?: false | undefined;
1734
1734
  default?: undefined;
1735
1735
  })) & {
1736
- references?: (() => NumberFieldInput) | undefined;
1736
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
1737
1737
  }>;
1738
1738
  }, "strip", z.ZodTypeAny, {
1739
1739
  type: "number";
@@ -1768,7 +1768,7 @@ export declare const readableCollectionSchema: z.ZodObject<{
1768
1768
  optional?: boolean | undefined;
1769
1769
  default?: number | SQL<any> | undefined;
1770
1770
  } & {
1771
- references?: (() => NumberFieldInput) | undefined;
1771
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
1772
1772
  }) | ({
1773
1773
  name?: string | undefined;
1774
1774
  label?: string | undefined;
@@ -1779,7 +1779,7 @@ export declare const readableCollectionSchema: z.ZodObject<{
1779
1779
  optional?: false | undefined;
1780
1780
  default?: undefined;
1781
1781
  } & {
1782
- references?: (() => NumberFieldInput) | undefined;
1782
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
1783
1783
  });
1784
1784
  }>, z.ZodObject<{
1785
1785
  type: z.ZodLiteral<"text">;
@@ -1835,7 +1835,7 @@ export declare const readableCollectionSchema: z.ZodObject<{
1835
1835
  primaryKey: true;
1836
1836
  optional?: false | undefined;
1837
1837
  })) & {
1838
- references?: (() => TextFieldInput) | undefined;
1838
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
1839
1839
  }>;
1840
1840
  }, "strip", z.ZodTypeAny, {
1841
1841
  type: "text";
@@ -1873,7 +1873,7 @@ export declare const readableCollectionSchema: z.ZodObject<{
1873
1873
  primaryKey?: false | undefined;
1874
1874
  optional?: boolean | undefined;
1875
1875
  } & {
1876
- references?: (() => TextFieldInput) | undefined;
1876
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
1877
1877
  }) | ({
1878
1878
  name?: string | undefined;
1879
1879
  label?: string | undefined;
@@ -1885,7 +1885,7 @@ export declare const readableCollectionSchema: z.ZodObject<{
1885
1885
  primaryKey: true;
1886
1886
  optional?: false | undefined;
1887
1887
  } & {
1888
- references?: (() => TextFieldInput) | undefined;
1888
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
1889
1889
  });
1890
1890
  }>, z.ZodObject<{
1891
1891
  type: z.ZodLiteral<"date">;
@@ -2093,7 +2093,7 @@ export declare const readableCollectionSchema: z.ZodObject<{
2093
2093
  optional?: boolean | undefined;
2094
2094
  default?: number | SQL<any> | undefined;
2095
2095
  } & {
2096
- references?: (() => NumberFieldInput) | undefined;
2096
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
2097
2097
  }) | ({
2098
2098
  name?: string | undefined;
2099
2099
  label?: string | undefined;
@@ -2104,7 +2104,7 @@ export declare const readableCollectionSchema: z.ZodObject<{
2104
2104
  optional?: false | undefined;
2105
2105
  default?: undefined;
2106
2106
  } & {
2107
- references?: (() => NumberFieldInput) | undefined;
2107
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
2108
2108
  });
2109
2109
  } | {
2110
2110
  type: "text";
@@ -2119,7 +2119,7 @@ export declare const readableCollectionSchema: z.ZodObject<{
2119
2119
  primaryKey?: false | undefined;
2120
2120
  optional?: boolean | undefined;
2121
2121
  } & {
2122
- references?: (() => TextFieldInput) | undefined;
2122
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
2123
2123
  }) | ({
2124
2124
  name?: string | undefined;
2125
2125
  label?: string | undefined;
@@ -2131,7 +2131,7 @@ export declare const readableCollectionSchema: z.ZodObject<{
2131
2131
  primaryKey: true;
2132
2132
  optional?: false | undefined;
2133
2133
  } & {
2134
- references?: (() => TextFieldInput) | undefined;
2134
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
2135
2135
  });
2136
2136
  } | {
2137
2137
  type: "date";
@@ -2258,7 +2258,7 @@ export declare const writableCollectionSchema: z.ZodObject<{
2258
2258
  optional?: false | undefined;
2259
2259
  default?: undefined;
2260
2260
  })) & {
2261
- references?: (() => NumberFieldInput) | undefined;
2261
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
2262
2262
  }>;
2263
2263
  }, "strip", z.ZodTypeAny, {
2264
2264
  type: "number";
@@ -2293,7 +2293,7 @@ export declare const writableCollectionSchema: z.ZodObject<{
2293
2293
  optional?: boolean | undefined;
2294
2294
  default?: number | SQL<any> | undefined;
2295
2295
  } & {
2296
- references?: (() => NumberFieldInput) | undefined;
2296
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
2297
2297
  }) | ({
2298
2298
  name?: string | undefined;
2299
2299
  label?: string | undefined;
@@ -2304,7 +2304,7 @@ export declare const writableCollectionSchema: z.ZodObject<{
2304
2304
  optional?: false | undefined;
2305
2305
  default?: undefined;
2306
2306
  } & {
2307
- references?: (() => NumberFieldInput) | undefined;
2307
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
2308
2308
  });
2309
2309
  }>, z.ZodObject<{
2310
2310
  type: z.ZodLiteral<"text">;
@@ -2360,7 +2360,7 @@ export declare const writableCollectionSchema: z.ZodObject<{
2360
2360
  primaryKey: true;
2361
2361
  optional?: false | undefined;
2362
2362
  })) & {
2363
- references?: (() => TextFieldInput) | undefined;
2363
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
2364
2364
  }>;
2365
2365
  }, "strip", z.ZodTypeAny, {
2366
2366
  type: "text";
@@ -2398,7 +2398,7 @@ export declare const writableCollectionSchema: z.ZodObject<{
2398
2398
  primaryKey?: false | undefined;
2399
2399
  optional?: boolean | undefined;
2400
2400
  } & {
2401
- references?: (() => TextFieldInput) | undefined;
2401
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
2402
2402
  }) | ({
2403
2403
  name?: string | undefined;
2404
2404
  label?: string | undefined;
@@ -2410,7 +2410,7 @@ export declare const writableCollectionSchema: z.ZodObject<{
2410
2410
  primaryKey: true;
2411
2411
  optional?: false | undefined;
2412
2412
  } & {
2413
- references?: (() => TextFieldInput) | undefined;
2413
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
2414
2414
  });
2415
2415
  }>, z.ZodObject<{
2416
2416
  type: z.ZodLiteral<"date">;
@@ -2618,7 +2618,7 @@ export declare const writableCollectionSchema: z.ZodObject<{
2618
2618
  optional?: boolean | undefined;
2619
2619
  default?: number | SQL<any> | undefined;
2620
2620
  } & {
2621
- references?: (() => NumberFieldInput) | undefined;
2621
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
2622
2622
  }) | ({
2623
2623
  name?: string | undefined;
2624
2624
  label?: string | undefined;
@@ -2629,7 +2629,7 @@ export declare const writableCollectionSchema: z.ZodObject<{
2629
2629
  optional?: false | undefined;
2630
2630
  default?: undefined;
2631
2631
  } & {
2632
- references?: (() => NumberFieldInput) | undefined;
2632
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
2633
2633
  });
2634
2634
  } | {
2635
2635
  type: "text";
@@ -2644,7 +2644,7 @@ export declare const writableCollectionSchema: z.ZodObject<{
2644
2644
  primaryKey?: false | undefined;
2645
2645
  optional?: boolean | undefined;
2646
2646
  } & {
2647
- references?: (() => TextFieldInput) | undefined;
2647
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
2648
2648
  }) | ({
2649
2649
  name?: string | undefined;
2650
2650
  label?: string | undefined;
@@ -2656,7 +2656,7 @@ export declare const writableCollectionSchema: z.ZodObject<{
2656
2656
  primaryKey: true;
2657
2657
  optional?: false | undefined;
2658
2658
  } & {
2659
- references?: (() => TextFieldInput) | undefined;
2659
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
2660
2660
  });
2661
2661
  } | {
2662
2662
  type: "date";
@@ -2783,7 +2783,7 @@ export declare const collectionSchema: z.ZodUnion<[z.ZodObject<{
2783
2783
  optional?: false | undefined;
2784
2784
  default?: undefined;
2785
2785
  })) & {
2786
- references?: (() => NumberFieldInput) | undefined;
2786
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
2787
2787
  }>;
2788
2788
  }, "strip", z.ZodTypeAny, {
2789
2789
  type: "number";
@@ -2818,7 +2818,7 @@ export declare const collectionSchema: z.ZodUnion<[z.ZodObject<{
2818
2818
  optional?: boolean | undefined;
2819
2819
  default?: number | SQL<any> | undefined;
2820
2820
  } & {
2821
- references?: (() => NumberFieldInput) | undefined;
2821
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
2822
2822
  }) | ({
2823
2823
  name?: string | undefined;
2824
2824
  label?: string | undefined;
@@ -2829,7 +2829,7 @@ export declare const collectionSchema: z.ZodUnion<[z.ZodObject<{
2829
2829
  optional?: false | undefined;
2830
2830
  default?: undefined;
2831
2831
  } & {
2832
- references?: (() => NumberFieldInput) | undefined;
2832
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
2833
2833
  });
2834
2834
  }>, z.ZodObject<{
2835
2835
  type: z.ZodLiteral<"text">;
@@ -2885,7 +2885,7 @@ export declare const collectionSchema: z.ZodUnion<[z.ZodObject<{
2885
2885
  primaryKey: true;
2886
2886
  optional?: false | undefined;
2887
2887
  })) & {
2888
- references?: (() => TextFieldInput) | undefined;
2888
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
2889
2889
  }>;
2890
2890
  }, "strip", z.ZodTypeAny, {
2891
2891
  type: "text";
@@ -2923,7 +2923,7 @@ export declare const collectionSchema: z.ZodUnion<[z.ZodObject<{
2923
2923
  primaryKey?: false | undefined;
2924
2924
  optional?: boolean | undefined;
2925
2925
  } & {
2926
- references?: (() => TextFieldInput) | undefined;
2926
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
2927
2927
  }) | ({
2928
2928
  name?: string | undefined;
2929
2929
  label?: string | undefined;
@@ -2935,7 +2935,7 @@ export declare const collectionSchema: z.ZodUnion<[z.ZodObject<{
2935
2935
  primaryKey: true;
2936
2936
  optional?: false | undefined;
2937
2937
  } & {
2938
- references?: (() => TextFieldInput) | undefined;
2938
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
2939
2939
  });
2940
2940
  }>, z.ZodObject<{
2941
2941
  type: z.ZodLiteral<"date">;
@@ -3143,7 +3143,7 @@ export declare const collectionSchema: z.ZodUnion<[z.ZodObject<{
3143
3143
  optional?: boolean | undefined;
3144
3144
  default?: number | SQL<any> | undefined;
3145
3145
  } & {
3146
- references?: (() => NumberFieldInput) | undefined;
3146
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
3147
3147
  }) | ({
3148
3148
  name?: string | undefined;
3149
3149
  label?: string | undefined;
@@ -3154,7 +3154,7 @@ export declare const collectionSchema: z.ZodUnion<[z.ZodObject<{
3154
3154
  optional?: false | undefined;
3155
3155
  default?: undefined;
3156
3156
  } & {
3157
- references?: (() => NumberFieldInput) | undefined;
3157
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
3158
3158
  });
3159
3159
  } | {
3160
3160
  type: "text";
@@ -3169,7 +3169,7 @@ export declare const collectionSchema: z.ZodUnion<[z.ZodObject<{
3169
3169
  primaryKey?: false | undefined;
3170
3170
  optional?: boolean | undefined;
3171
3171
  } & {
3172
- references?: (() => TextFieldInput) | undefined;
3172
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
3173
3173
  }) | ({
3174
3174
  name?: string | undefined;
3175
3175
  label?: string | undefined;
@@ -3181,7 +3181,7 @@ export declare const collectionSchema: z.ZodUnion<[z.ZodObject<{
3181
3181
  primaryKey: true;
3182
3182
  optional?: false | undefined;
3183
3183
  } & {
3184
- references?: (() => TextFieldInput) | undefined;
3184
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
3185
3185
  });
3186
3186
  } | {
3187
3187
  type: "date";
@@ -3307,7 +3307,7 @@ export declare const collectionSchema: z.ZodUnion<[z.ZodObject<{
3307
3307
  optional?: false | undefined;
3308
3308
  default?: undefined;
3309
3309
  })) & {
3310
- references?: (() => NumberFieldInput) | undefined;
3310
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
3311
3311
  }>;
3312
3312
  }, "strip", z.ZodTypeAny, {
3313
3313
  type: "number";
@@ -3342,7 +3342,7 @@ export declare const collectionSchema: z.ZodUnion<[z.ZodObject<{
3342
3342
  optional?: boolean | undefined;
3343
3343
  default?: number | SQL<any> | undefined;
3344
3344
  } & {
3345
- references?: (() => NumberFieldInput) | undefined;
3345
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
3346
3346
  }) | ({
3347
3347
  name?: string | undefined;
3348
3348
  label?: string | undefined;
@@ -3353,7 +3353,7 @@ export declare const collectionSchema: z.ZodUnion<[z.ZodObject<{
3353
3353
  optional?: false | undefined;
3354
3354
  default?: undefined;
3355
3355
  } & {
3356
- references?: (() => NumberFieldInput) | undefined;
3356
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
3357
3357
  });
3358
3358
  }>, z.ZodObject<{
3359
3359
  type: z.ZodLiteral<"text">;
@@ -3409,7 +3409,7 @@ export declare const collectionSchema: z.ZodUnion<[z.ZodObject<{
3409
3409
  primaryKey: true;
3410
3410
  optional?: false | undefined;
3411
3411
  })) & {
3412
- references?: (() => TextFieldInput) | undefined;
3412
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
3413
3413
  }>;
3414
3414
  }, "strip", z.ZodTypeAny, {
3415
3415
  type: "text";
@@ -3447,7 +3447,7 @@ export declare const collectionSchema: z.ZodUnion<[z.ZodObject<{
3447
3447
  primaryKey?: false | undefined;
3448
3448
  optional?: boolean | undefined;
3449
3449
  } & {
3450
- references?: (() => TextFieldInput) | undefined;
3450
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
3451
3451
  }) | ({
3452
3452
  name?: string | undefined;
3453
3453
  label?: string | undefined;
@@ -3459,7 +3459,7 @@ export declare const collectionSchema: z.ZodUnion<[z.ZodObject<{
3459
3459
  primaryKey: true;
3460
3460
  optional?: false | undefined;
3461
3461
  } & {
3462
- references?: (() => TextFieldInput) | undefined;
3462
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
3463
3463
  });
3464
3464
  }>, z.ZodObject<{
3465
3465
  type: z.ZodLiteral<"date">;
@@ -3667,7 +3667,7 @@ export declare const collectionSchema: z.ZodUnion<[z.ZodObject<{
3667
3667
  optional?: boolean | undefined;
3668
3668
  default?: number | SQL<any> | undefined;
3669
3669
  } & {
3670
- references?: (() => NumberFieldInput) | undefined;
3670
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
3671
3671
  }) | ({
3672
3672
  name?: string | undefined;
3673
3673
  label?: string | undefined;
@@ -3678,7 +3678,7 @@ export declare const collectionSchema: z.ZodUnion<[z.ZodObject<{
3678
3678
  optional?: false | undefined;
3679
3679
  default?: undefined;
3680
3680
  } & {
3681
- references?: (() => NumberFieldInput) | undefined;
3681
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
3682
3682
  });
3683
3683
  } | {
3684
3684
  type: "text";
@@ -3693,7 +3693,7 @@ export declare const collectionSchema: z.ZodUnion<[z.ZodObject<{
3693
3693
  primaryKey?: false | undefined;
3694
3694
  optional?: boolean | undefined;
3695
3695
  } & {
3696
- references?: (() => TextFieldInput) | undefined;
3696
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
3697
3697
  }) | ({
3698
3698
  name?: string | undefined;
3699
3699
  label?: string | undefined;
@@ -3705,7 +3705,7 @@ export declare const collectionSchema: z.ZodUnion<[z.ZodObject<{
3705
3705
  primaryKey: true;
3706
3706
  optional?: false | undefined;
3707
3707
  } & {
3708
- references?: (() => TextFieldInput) | undefined;
3708
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
3709
3709
  });
3710
3710
  } | {
3711
3711
  type: "date";
@@ -3832,7 +3832,7 @@ export declare const collectionsSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.
3832
3832
  optional?: false | undefined;
3833
3833
  default?: undefined;
3834
3834
  })) & {
3835
- references?: (() => NumberFieldInput) | undefined;
3835
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
3836
3836
  }>;
3837
3837
  }, "strip", z.ZodTypeAny, {
3838
3838
  type: "number";
@@ -3867,7 +3867,7 @@ export declare const collectionsSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.
3867
3867
  optional?: boolean | undefined;
3868
3868
  default?: number | SQL<any> | undefined;
3869
3869
  } & {
3870
- references?: (() => NumberFieldInput) | undefined;
3870
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
3871
3871
  }) | ({
3872
3872
  name?: string | undefined;
3873
3873
  label?: string | undefined;
@@ -3878,7 +3878,7 @@ export declare const collectionsSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.
3878
3878
  optional?: false | undefined;
3879
3879
  default?: undefined;
3880
3880
  } & {
3881
- references?: (() => NumberFieldInput) | undefined;
3881
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
3882
3882
  });
3883
3883
  }>, z.ZodObject<{
3884
3884
  type: z.ZodLiteral<"text">;
@@ -3934,7 +3934,7 @@ export declare const collectionsSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.
3934
3934
  primaryKey: true;
3935
3935
  optional?: false | undefined;
3936
3936
  })) & {
3937
- references?: (() => TextFieldInput) | undefined;
3937
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
3938
3938
  }>;
3939
3939
  }, "strip", z.ZodTypeAny, {
3940
3940
  type: "text";
@@ -3972,7 +3972,7 @@ export declare const collectionsSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.
3972
3972
  primaryKey?: false | undefined;
3973
3973
  optional?: boolean | undefined;
3974
3974
  } & {
3975
- references?: (() => TextFieldInput) | undefined;
3975
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
3976
3976
  }) | ({
3977
3977
  name?: string | undefined;
3978
3978
  label?: string | undefined;
@@ -3984,7 +3984,7 @@ export declare const collectionsSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.
3984
3984
  primaryKey: true;
3985
3985
  optional?: false | undefined;
3986
3986
  } & {
3987
- references?: (() => TextFieldInput) | undefined;
3987
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
3988
3988
  });
3989
3989
  }>, z.ZodObject<{
3990
3990
  type: z.ZodLiteral<"date">;
@@ -4192,7 +4192,7 @@ export declare const collectionsSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.
4192
4192
  optional?: boolean | undefined;
4193
4193
  default?: number | SQL<any> | undefined;
4194
4194
  } & {
4195
- references?: (() => NumberFieldInput) | undefined;
4195
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
4196
4196
  }) | ({
4197
4197
  name?: string | undefined;
4198
4198
  label?: string | undefined;
@@ -4203,7 +4203,7 @@ export declare const collectionsSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.
4203
4203
  optional?: false | undefined;
4204
4204
  default?: undefined;
4205
4205
  } & {
4206
- references?: (() => NumberFieldInput) | undefined;
4206
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
4207
4207
  });
4208
4208
  } | {
4209
4209
  type: "text";
@@ -4218,7 +4218,7 @@ export declare const collectionsSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.
4218
4218
  primaryKey?: false | undefined;
4219
4219
  optional?: boolean | undefined;
4220
4220
  } & {
4221
- references?: (() => TextFieldInput) | undefined;
4221
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
4222
4222
  }) | ({
4223
4223
  name?: string | undefined;
4224
4224
  label?: string | undefined;
@@ -4230,7 +4230,7 @@ export declare const collectionsSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.
4230
4230
  primaryKey: true;
4231
4231
  optional?: false | undefined;
4232
4232
  } & {
4233
- references?: (() => TextFieldInput) | undefined;
4233
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
4234
4234
  });
4235
4235
  } | {
4236
4236
  type: "date";
@@ -4356,7 +4356,7 @@ export declare const collectionsSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.
4356
4356
  optional?: false | undefined;
4357
4357
  default?: undefined;
4358
4358
  })) & {
4359
- references?: (() => NumberFieldInput) | undefined;
4359
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
4360
4360
  }>;
4361
4361
  }, "strip", z.ZodTypeAny, {
4362
4362
  type: "number";
@@ -4391,7 +4391,7 @@ export declare const collectionsSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.
4391
4391
  optional?: boolean | undefined;
4392
4392
  default?: number | SQL<any> | undefined;
4393
4393
  } & {
4394
- references?: (() => NumberFieldInput) | undefined;
4394
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
4395
4395
  }) | ({
4396
4396
  name?: string | undefined;
4397
4397
  label?: string | undefined;
@@ -4402,7 +4402,7 @@ export declare const collectionsSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.
4402
4402
  optional?: false | undefined;
4403
4403
  default?: undefined;
4404
4404
  } & {
4405
- references?: (() => NumberFieldInput) | undefined;
4405
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
4406
4406
  });
4407
4407
  }>, z.ZodObject<{
4408
4408
  type: z.ZodLiteral<"text">;
@@ -4458,7 +4458,7 @@ export declare const collectionsSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.
4458
4458
  primaryKey: true;
4459
4459
  optional?: false | undefined;
4460
4460
  })) & {
4461
- references?: (() => TextFieldInput) | undefined;
4461
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
4462
4462
  }>;
4463
4463
  }, "strip", z.ZodTypeAny, {
4464
4464
  type: "text";
@@ -4496,7 +4496,7 @@ export declare const collectionsSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.
4496
4496
  primaryKey?: false | undefined;
4497
4497
  optional?: boolean | undefined;
4498
4498
  } & {
4499
- references?: (() => TextFieldInput) | undefined;
4499
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
4500
4500
  }) | ({
4501
4501
  name?: string | undefined;
4502
4502
  label?: string | undefined;
@@ -4508,7 +4508,7 @@ export declare const collectionsSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.
4508
4508
  primaryKey: true;
4509
4509
  optional?: false | undefined;
4510
4510
  } & {
4511
- references?: (() => TextFieldInput) | undefined;
4511
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
4512
4512
  });
4513
4513
  }>, z.ZodObject<{
4514
4514
  type: z.ZodLiteral<"date">;
@@ -4716,7 +4716,7 @@ export declare const collectionsSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.
4716
4716
  optional?: boolean | undefined;
4717
4717
  default?: number | SQL<any> | undefined;
4718
4718
  } & {
4719
- references?: (() => NumberFieldInput) | undefined;
4719
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
4720
4720
  }) | ({
4721
4721
  name?: string | undefined;
4722
4722
  label?: string | undefined;
@@ -4727,7 +4727,7 @@ export declare const collectionsSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.
4727
4727
  optional?: false | undefined;
4728
4728
  default?: undefined;
4729
4729
  } & {
4730
- references?: (() => NumberFieldInput) | undefined;
4730
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
4731
4731
  });
4732
4732
  } | {
4733
4733
  type: "text";
@@ -4742,7 +4742,7 @@ export declare const collectionsSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.
4742
4742
  primaryKey?: false | undefined;
4743
4743
  optional?: boolean | undefined;
4744
4744
  } & {
4745
- references?: (() => TextFieldInput) | undefined;
4745
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
4746
4746
  }) | ({
4747
4747
  name?: string | undefined;
4748
4748
  label?: string | undefined;
@@ -4754,7 +4754,7 @@ export declare const collectionsSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.
4754
4754
  primaryKey: true;
4755
4755
  optional?: false | undefined;
4756
4756
  } & {
4757
- references?: (() => TextFieldInput) | undefined;
4757
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
4758
4758
  });
4759
4759
  } | {
4760
4760
  type: "date";
@@ -4949,15 +4949,15 @@ export declare const collectionsSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.
4949
4949
  foreignKeys?: ForeignKeysOutput[] | undefined;
4950
4950
  }>, unknown>;
4951
4951
  export type BooleanField = z.infer<typeof booleanFieldSchema>;
4952
- export type BooleanFieldInput = z.input<typeof booleanFieldSchema>;
4952
+ export type BooleanFieldInput = z.input<typeof booleanFieldSchema>['schema'];
4953
4953
  export type NumberField = z.infer<typeof numberFieldSchema>;
4954
- export type NumberFieldInput = z.input<typeof numberFieldSchema>;
4954
+ export type NumberFieldInput = z.input<typeof numberFieldSchema>['schema'];
4955
4955
  export type TextField = z.infer<typeof textFieldSchema>;
4956
- export type TextFieldInput = z.input<typeof textFieldSchema>;
4956
+ export type TextFieldInput = z.input<typeof textFieldSchema>['schema'];
4957
4957
  export type DateField = z.infer<typeof dateFieldSchema>;
4958
- export type DateFieldInput = z.input<typeof dateFieldSchema>;
4958
+ export type DateFieldInput = z.input<typeof dateFieldSchema>['schema'];
4959
4959
  export type JsonField = z.infer<typeof jsonFieldSchema>;
4960
- export type JsonFieldInput = z.input<typeof jsonFieldSchema>;
4960
+ export type JsonFieldInput = z.input<typeof jsonFieldSchema>['schema'];
4961
4961
  export type FieldType = BooleanField['type'] | NumberField['type'] | TextField['type'] | DateField['type'] | JsonField['type'];
4962
4962
  export type DBField = z.infer<typeof fieldSchema>;
4963
4963
  export type DBFieldInput = DateFieldInput | BooleanFieldInput | NumberFieldInput | TextFieldInput | JsonFieldInput;
@@ -5079,7 +5079,7 @@ export declare const dbConfigSchema: z.ZodObject<{
5079
5079
  optional?: false | undefined;
5080
5080
  default?: undefined;
5081
5081
  })) & {
5082
- references?: (() => NumberFieldInput) | undefined;
5082
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
5083
5083
  }>;
5084
5084
  }, "strip", z.ZodTypeAny, {
5085
5085
  type: "number";
@@ -5114,7 +5114,7 @@ export declare const dbConfigSchema: z.ZodObject<{
5114
5114
  optional?: boolean | undefined;
5115
5115
  default?: number | SQL<any> | undefined;
5116
5116
  } & {
5117
- references?: (() => NumberFieldInput) | undefined;
5117
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
5118
5118
  }) | ({
5119
5119
  name?: string | undefined;
5120
5120
  label?: string | undefined;
@@ -5125,7 +5125,7 @@ export declare const dbConfigSchema: z.ZodObject<{
5125
5125
  optional?: false | undefined;
5126
5126
  default?: undefined;
5127
5127
  } & {
5128
- references?: (() => NumberFieldInput) | undefined;
5128
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
5129
5129
  });
5130
5130
  }>, z.ZodObject<{
5131
5131
  type: z.ZodLiteral<"text">;
@@ -5181,7 +5181,7 @@ export declare const dbConfigSchema: z.ZodObject<{
5181
5181
  primaryKey: true;
5182
5182
  optional?: false | undefined;
5183
5183
  })) & {
5184
- references?: (() => TextFieldInput) | undefined;
5184
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
5185
5185
  }>;
5186
5186
  }, "strip", z.ZodTypeAny, {
5187
5187
  type: "text";
@@ -5219,7 +5219,7 @@ export declare const dbConfigSchema: z.ZodObject<{
5219
5219
  primaryKey?: false | undefined;
5220
5220
  optional?: boolean | undefined;
5221
5221
  } & {
5222
- references?: (() => TextFieldInput) | undefined;
5222
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
5223
5223
  }) | ({
5224
5224
  name?: string | undefined;
5225
5225
  label?: string | undefined;
@@ -5231,7 +5231,7 @@ export declare const dbConfigSchema: z.ZodObject<{
5231
5231
  primaryKey: true;
5232
5232
  optional?: false | undefined;
5233
5233
  } & {
5234
- references?: (() => TextFieldInput) | undefined;
5234
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
5235
5235
  });
5236
5236
  }>, z.ZodObject<{
5237
5237
  type: z.ZodLiteral<"date">;
@@ -5439,7 +5439,7 @@ export declare const dbConfigSchema: z.ZodObject<{
5439
5439
  optional?: boolean | undefined;
5440
5440
  default?: number | SQL<any> | undefined;
5441
5441
  } & {
5442
- references?: (() => NumberFieldInput) | undefined;
5442
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
5443
5443
  }) | ({
5444
5444
  name?: string | undefined;
5445
5445
  label?: string | undefined;
@@ -5450,7 +5450,7 @@ export declare const dbConfigSchema: z.ZodObject<{
5450
5450
  optional?: false | undefined;
5451
5451
  default?: undefined;
5452
5452
  } & {
5453
- references?: (() => NumberFieldInput) | undefined;
5453
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
5454
5454
  });
5455
5455
  } | {
5456
5456
  type: "text";
@@ -5465,7 +5465,7 @@ export declare const dbConfigSchema: z.ZodObject<{
5465
5465
  primaryKey?: false | undefined;
5466
5466
  optional?: boolean | undefined;
5467
5467
  } & {
5468
- references?: (() => TextFieldInput) | undefined;
5468
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
5469
5469
  }) | ({
5470
5470
  name?: string | undefined;
5471
5471
  label?: string | undefined;
@@ -5477,7 +5477,7 @@ export declare const dbConfigSchema: z.ZodObject<{
5477
5477
  primaryKey: true;
5478
5478
  optional?: false | undefined;
5479
5479
  } & {
5480
- references?: (() => TextFieldInput) | undefined;
5480
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
5481
5481
  });
5482
5482
  } | {
5483
5483
  type: "date";
@@ -5603,7 +5603,7 @@ export declare const dbConfigSchema: z.ZodObject<{
5603
5603
  optional?: false | undefined;
5604
5604
  default?: undefined;
5605
5605
  })) & {
5606
- references?: (() => NumberFieldInput) | undefined;
5606
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
5607
5607
  }>;
5608
5608
  }, "strip", z.ZodTypeAny, {
5609
5609
  type: "number";
@@ -5638,7 +5638,7 @@ export declare const dbConfigSchema: z.ZodObject<{
5638
5638
  optional?: boolean | undefined;
5639
5639
  default?: number | SQL<any> | undefined;
5640
5640
  } & {
5641
- references?: (() => NumberFieldInput) | undefined;
5641
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
5642
5642
  }) | ({
5643
5643
  name?: string | undefined;
5644
5644
  label?: string | undefined;
@@ -5649,7 +5649,7 @@ export declare const dbConfigSchema: z.ZodObject<{
5649
5649
  optional?: false | undefined;
5650
5650
  default?: undefined;
5651
5651
  } & {
5652
- references?: (() => NumberFieldInput) | undefined;
5652
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
5653
5653
  });
5654
5654
  }>, z.ZodObject<{
5655
5655
  type: z.ZodLiteral<"text">;
@@ -5705,7 +5705,7 @@ export declare const dbConfigSchema: z.ZodObject<{
5705
5705
  primaryKey: true;
5706
5706
  optional?: false | undefined;
5707
5707
  })) & {
5708
- references?: (() => TextFieldInput) | undefined;
5708
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
5709
5709
  }>;
5710
5710
  }, "strip", z.ZodTypeAny, {
5711
5711
  type: "text";
@@ -5743,7 +5743,7 @@ export declare const dbConfigSchema: z.ZodObject<{
5743
5743
  primaryKey?: false | undefined;
5744
5744
  optional?: boolean | undefined;
5745
5745
  } & {
5746
- references?: (() => TextFieldInput) | undefined;
5746
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
5747
5747
  }) | ({
5748
5748
  name?: string | undefined;
5749
5749
  label?: string | undefined;
@@ -5755,7 +5755,7 @@ export declare const dbConfigSchema: z.ZodObject<{
5755
5755
  primaryKey: true;
5756
5756
  optional?: false | undefined;
5757
5757
  } & {
5758
- references?: (() => TextFieldInput) | undefined;
5758
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
5759
5759
  });
5760
5760
  }>, z.ZodObject<{
5761
5761
  type: z.ZodLiteral<"date">;
@@ -5963,7 +5963,7 @@ export declare const dbConfigSchema: z.ZodObject<{
5963
5963
  optional?: boolean | undefined;
5964
5964
  default?: number | SQL<any> | undefined;
5965
5965
  } & {
5966
- references?: (() => NumberFieldInput) | undefined;
5966
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
5967
5967
  }) | ({
5968
5968
  name?: string | undefined;
5969
5969
  label?: string | undefined;
@@ -5974,7 +5974,7 @@ export declare const dbConfigSchema: z.ZodObject<{
5974
5974
  optional?: false | undefined;
5975
5975
  default?: undefined;
5976
5976
  } & {
5977
- references?: (() => NumberFieldInput) | undefined;
5977
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
5978
5978
  });
5979
5979
  } | {
5980
5980
  type: "text";
@@ -5989,7 +5989,7 @@ export declare const dbConfigSchema: z.ZodObject<{
5989
5989
  primaryKey?: false | undefined;
5990
5990
  optional?: boolean | undefined;
5991
5991
  } & {
5992
- references?: (() => TextFieldInput) | undefined;
5992
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
5993
5993
  }) | ({
5994
5994
  name?: string | undefined;
5995
5995
  label?: string | undefined;
@@ -6001,7 +6001,7 @@ export declare const dbConfigSchema: z.ZodObject<{
6001
6001
  primaryKey: true;
6002
6002
  optional?: false | undefined;
6003
6003
  } & {
6004
- references?: (() => TextFieldInput) | undefined;
6004
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
6005
6005
  });
6006
6006
  } | {
6007
6007
  type: "date";
@@ -6472,7 +6472,7 @@ export declare const astroConfigWithDbSchema: z.ZodObject<{
6472
6472
  optional?: false | undefined;
6473
6473
  default?: undefined;
6474
6474
  })) & {
6475
- references?: (() => NumberFieldInput) | undefined;
6475
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
6476
6476
  }>;
6477
6477
  }, "strip", z.ZodTypeAny, {
6478
6478
  type: "number";
@@ -6507,7 +6507,7 @@ export declare const astroConfigWithDbSchema: z.ZodObject<{
6507
6507
  optional?: boolean | undefined;
6508
6508
  default?: number | SQL<any> | undefined;
6509
6509
  } & {
6510
- references?: (() => NumberFieldInput) | undefined;
6510
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
6511
6511
  }) | ({
6512
6512
  name?: string | undefined;
6513
6513
  label?: string | undefined;
@@ -6518,7 +6518,7 @@ export declare const astroConfigWithDbSchema: z.ZodObject<{
6518
6518
  optional?: false | undefined;
6519
6519
  default?: undefined;
6520
6520
  } & {
6521
- references?: (() => NumberFieldInput) | undefined;
6521
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
6522
6522
  });
6523
6523
  }>, z.ZodObject<{
6524
6524
  type: z.ZodLiteral<"text">;
@@ -6574,7 +6574,7 @@ export declare const astroConfigWithDbSchema: z.ZodObject<{
6574
6574
  primaryKey: true;
6575
6575
  optional?: false | undefined;
6576
6576
  })) & {
6577
- references?: (() => TextFieldInput) | undefined;
6577
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
6578
6578
  }>;
6579
6579
  }, "strip", z.ZodTypeAny, {
6580
6580
  type: "text";
@@ -6612,7 +6612,7 @@ export declare const astroConfigWithDbSchema: z.ZodObject<{
6612
6612
  primaryKey?: false | undefined;
6613
6613
  optional?: boolean | undefined;
6614
6614
  } & {
6615
- references?: (() => TextFieldInput) | undefined;
6615
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
6616
6616
  }) | ({
6617
6617
  name?: string | undefined;
6618
6618
  label?: string | undefined;
@@ -6624,7 +6624,7 @@ export declare const astroConfigWithDbSchema: z.ZodObject<{
6624
6624
  primaryKey: true;
6625
6625
  optional?: false | undefined;
6626
6626
  } & {
6627
- references?: (() => TextFieldInput) | undefined;
6627
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
6628
6628
  });
6629
6629
  }>, z.ZodObject<{
6630
6630
  type: z.ZodLiteral<"date">;
@@ -6832,7 +6832,7 @@ export declare const astroConfigWithDbSchema: z.ZodObject<{
6832
6832
  optional?: boolean | undefined;
6833
6833
  default?: number | SQL<any> | undefined;
6834
6834
  } & {
6835
- references?: (() => NumberFieldInput) | undefined;
6835
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
6836
6836
  }) | ({
6837
6837
  name?: string | undefined;
6838
6838
  label?: string | undefined;
@@ -6843,7 +6843,7 @@ export declare const astroConfigWithDbSchema: z.ZodObject<{
6843
6843
  optional?: false | undefined;
6844
6844
  default?: undefined;
6845
6845
  } & {
6846
- references?: (() => NumberFieldInput) | undefined;
6846
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
6847
6847
  });
6848
6848
  } | {
6849
6849
  type: "text";
@@ -6858,7 +6858,7 @@ export declare const astroConfigWithDbSchema: z.ZodObject<{
6858
6858
  primaryKey?: false | undefined;
6859
6859
  optional?: boolean | undefined;
6860
6860
  } & {
6861
- references?: (() => TextFieldInput) | undefined;
6861
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
6862
6862
  }) | ({
6863
6863
  name?: string | undefined;
6864
6864
  label?: string | undefined;
@@ -6870,7 +6870,7 @@ export declare const astroConfigWithDbSchema: z.ZodObject<{
6870
6870
  primaryKey: true;
6871
6871
  optional?: false | undefined;
6872
6872
  } & {
6873
- references?: (() => TextFieldInput) | undefined;
6873
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
6874
6874
  });
6875
6875
  } | {
6876
6876
  type: "date";
@@ -6996,7 +6996,7 @@ export declare const astroConfigWithDbSchema: z.ZodObject<{
6996
6996
  optional?: false | undefined;
6997
6997
  default?: undefined;
6998
6998
  })) & {
6999
- references?: (() => NumberFieldInput) | undefined;
6999
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
7000
7000
  }>;
7001
7001
  }, "strip", z.ZodTypeAny, {
7002
7002
  type: "number";
@@ -7031,7 +7031,7 @@ export declare const astroConfigWithDbSchema: z.ZodObject<{
7031
7031
  optional?: boolean | undefined;
7032
7032
  default?: number | SQL<any> | undefined;
7033
7033
  } & {
7034
- references?: (() => NumberFieldInput) | undefined;
7034
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
7035
7035
  }) | ({
7036
7036
  name?: string | undefined;
7037
7037
  label?: string | undefined;
@@ -7042,7 +7042,7 @@ export declare const astroConfigWithDbSchema: z.ZodObject<{
7042
7042
  optional?: false | undefined;
7043
7043
  default?: undefined;
7044
7044
  } & {
7045
- references?: (() => NumberFieldInput) | undefined;
7045
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
7046
7046
  });
7047
7047
  }>, z.ZodObject<{
7048
7048
  type: z.ZodLiteral<"text">;
@@ -7098,7 +7098,7 @@ export declare const astroConfigWithDbSchema: z.ZodObject<{
7098
7098
  primaryKey: true;
7099
7099
  optional?: false | undefined;
7100
7100
  })) & {
7101
- references?: (() => TextFieldInput) | undefined;
7101
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
7102
7102
  }>;
7103
7103
  }, "strip", z.ZodTypeAny, {
7104
7104
  type: "text";
@@ -7136,7 +7136,7 @@ export declare const astroConfigWithDbSchema: z.ZodObject<{
7136
7136
  primaryKey?: false | undefined;
7137
7137
  optional?: boolean | undefined;
7138
7138
  } & {
7139
- references?: (() => TextFieldInput) | undefined;
7139
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
7140
7140
  }) | ({
7141
7141
  name?: string | undefined;
7142
7142
  label?: string | undefined;
@@ -7148,7 +7148,7 @@ export declare const astroConfigWithDbSchema: z.ZodObject<{
7148
7148
  primaryKey: true;
7149
7149
  optional?: false | undefined;
7150
7150
  } & {
7151
- references?: (() => TextFieldInput) | undefined;
7151
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
7152
7152
  });
7153
7153
  }>, z.ZodObject<{
7154
7154
  type: z.ZodLiteral<"date">;
@@ -7356,7 +7356,7 @@ export declare const astroConfigWithDbSchema: z.ZodObject<{
7356
7356
  optional?: boolean | undefined;
7357
7357
  default?: number | SQL<any> | undefined;
7358
7358
  } & {
7359
- references?: (() => NumberFieldInput) | undefined;
7359
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
7360
7360
  }) | ({
7361
7361
  name?: string | undefined;
7362
7362
  label?: string | undefined;
@@ -7367,7 +7367,7 @@ export declare const astroConfigWithDbSchema: z.ZodObject<{
7367
7367
  optional?: false | undefined;
7368
7368
  default?: undefined;
7369
7369
  } & {
7370
- references?: (() => NumberFieldInput) | undefined;
7370
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
7371
7371
  });
7372
7372
  } | {
7373
7373
  type: "text";
@@ -7382,7 +7382,7 @@ export declare const astroConfigWithDbSchema: z.ZodObject<{
7382
7382
  primaryKey?: false | undefined;
7383
7383
  optional?: boolean | undefined;
7384
7384
  } & {
7385
- references?: (() => TextFieldInput) | undefined;
7385
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
7386
7386
  }) | ({
7387
7387
  name?: string | undefined;
7388
7388
  label?: string | undefined;
@@ -7394,7 +7394,7 @@ export declare const astroConfigWithDbSchema: z.ZodObject<{
7394
7394
  primaryKey: true;
7395
7395
  optional?: false | undefined;
7396
7396
  } & {
7397
- references?: (() => TextFieldInput) | undefined;
7397
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
7398
7398
  });
7399
7399
  } | {
7400
7400
  type: "date";
@@ -7974,7 +7974,7 @@ export declare const field: {
7974
7974
  optional?: false | undefined;
7975
7975
  default?: undefined;
7976
7976
  })) & {
7977
- references?: (() => NumberFieldInput) | undefined;
7977
+ references?: (() => z.input<typeof numberFieldSchema>) | undefined;
7978
7978
  }>(opts?: T) => {
7979
7979
  type: "number";
7980
7980
  /**
@@ -7983,15 +7983,12 @@ export declare const field: {
7983
7983
  schema: T;
7984
7984
  };
7985
7985
  boolean: <T_1 extends FieldOpts<{
7986
- type: "boolean";
7987
- schema: {
7988
- name?: string | undefined;
7989
- label?: string | undefined;
7990
- optional?: boolean | undefined;
7991
- unique?: boolean | undefined;
7992
- collection?: string | undefined;
7993
- default?: boolean | SQL<any> | undefined;
7994
- };
7986
+ name?: string | undefined;
7987
+ label?: string | undefined;
7988
+ optional?: boolean | undefined;
7989
+ unique?: boolean | undefined;
7990
+ collection?: string | undefined;
7991
+ default?: boolean | SQL<any> | undefined;
7995
7992
  }>>(opts?: T_1) => {
7996
7993
  type: "boolean";
7997
7994
  /**
@@ -8013,7 +8010,7 @@ export declare const field: {
8013
8010
  primaryKey: true;
8014
8011
  optional?: false | undefined;
8015
8012
  })) & {
8016
- references?: (() => TextFieldInput) | undefined;
8013
+ references?: (() => z.input<typeof textFieldSchema>) | undefined;
8017
8014
  }>(opts?: T_2) => {
8018
8015
  type: "text";
8019
8016
  /**
@@ -8022,15 +8019,12 @@ export declare const field: {
8022
8019
  schema: T_2;
8023
8020
  };
8024
8021
  date<T_3 extends FieldOpts<{
8025
- type: "date";
8026
- schema: {
8027
- name?: string | undefined;
8028
- label?: string | undefined;
8029
- optional?: boolean | undefined;
8030
- unique?: boolean | undefined;
8031
- collection?: string | undefined;
8032
- default?: Date | SQL<any> | undefined;
8033
- };
8022
+ name?: string | undefined;
8023
+ label?: string | undefined;
8024
+ optional?: boolean | undefined;
8025
+ unique?: boolean | undefined;
8026
+ collection?: string | undefined;
8027
+ default?: Date | SQL<any> | undefined;
8034
8028
  }>>(opts?: T_3): {
8035
8029
  type: "date";
8036
8030
  /**
@@ -8039,15 +8033,12 @@ export declare const field: {
8039
8033
  schema: T_3;
8040
8034
  };
8041
8035
  json<T_4 extends FieldOpts<{
8042
- type: "json";
8043
- schema: {
8044
- name?: string | undefined;
8045
- label?: string | undefined;
8046
- optional?: boolean | undefined;
8047
- unique?: boolean | undefined;
8048
- collection?: string | undefined;
8049
- default?: unknown;
8050
- };
8036
+ name?: string | undefined;
8037
+ label?: string | undefined;
8038
+ optional?: boolean | undefined;
8039
+ unique?: boolean | undefined;
8040
+ collection?: string | undefined;
8041
+ default?: unknown;
8051
8042
  }>>(opts?: T_4): {
8052
8043
  type: "json";
8053
8044
  /**
@@ -5,11 +5,11 @@ function getAstroStudioEnv(envMode = "") {
5
5
  }
6
6
  function getRemoteDatabaseUrl() {
7
7
  const env = getAstroStudioEnv();
8
- return env.ASTRO_STUDIO_REMOTE_DB_URL;
8
+ return env.ASTRO_STUDIO_REMOTE_DB_URL || "https://studio-gateway.fly.dev";
9
9
  }
10
10
  function getAstroStudioUrl() {
11
11
  const env = getAstroStudioEnv();
12
- return env.ASTRO_STUDIO_URL;
12
+ return env.ASTRO_STUDIO_URL || "https://stardate.astro.build";
13
13
  }
14
14
  export {
15
15
  getAstroStudioEnv,
@@ -53,7 +53,7 @@ export type Table<TTableName extends string, TFields extends Record<string, Pick
53
53
  name: K;
54
54
  hasDefault: TFields[K] extends {
55
55
  default: NonNullable<unknown>;
56
- } ? true : TFields[K] extends {
56
+ } ? true : TFields[K]['schema'] extends {
57
57
  primaryKey: true;
58
58
  } ? true : false;
59
59
  notNull: TFields[K]['schema']['optional'] extends true ? false : true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrojs/db",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -70,8 +70,8 @@
70
70
  "mocha": "^10.2.0",
71
71
  "typescript": "^5.2.2",
72
72
  "vite": "^4.4.11",
73
- "astro": "4.2.4",
74
- "astro-scripts": "0.0.14"
73
+ "astro-scripts": "0.0.14",
74
+ "astro": "4.2.4"
75
75
  },
76
76
  "scripts": {
77
77
  "build": "astro-scripts build \"src/**/*.ts\" && tsc",