cogsbox-shape 0.5.29 → 0.5.30

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.
package/dist/schema.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { z } from "zod";
2
- import { type JsonSchema7Type } from "zod-to-json-schema";
3
2
  type CurrentTimestampConfig = {
4
3
  default: "CURRENT_TIMESTAMP";
5
4
  defaultValue: Date;
@@ -67,7 +66,7 @@ export declare const shape: {
67
66
  };
68
67
  zodSqlSchema: z.ZodNumber;
69
68
  zodNewSchema: z.ZodNumber;
70
- initialValue: undefined;
69
+ initialValue: number;
71
70
  zodClientSchema: z.ZodNumber;
72
71
  zodValidationSchema: z.ZodNumber;
73
72
  };
@@ -86,7 +85,7 @@ export declare const shape: {
86
85
  };
87
86
  zodSqlSchema: z.ZodNumber;
88
87
  zodNewSchema: z.ZodNumber;
89
- initialValue: undefined;
88
+ initialValue: number;
90
89
  zodClientSchema: z.ZodNumber;
91
90
  zodValidationSchema: TValidationNext;
92
91
  };
@@ -104,7 +103,7 @@ export declare const shape: {
104
103
  };
105
104
  zodSqlSchema: z.ZodNumber;
106
105
  zodNewSchema: z.ZodNumber;
107
- initialValue: undefined;
106
+ initialValue: number;
108
107
  zodClientSchema: z.ZodNumber;
109
108
  zodValidationSchema: TValidationNext;
110
109
  } & {
@@ -129,7 +128,7 @@ export declare const shape: {
129
128
  };
130
129
  zodSqlSchema: z.ZodNumber;
131
130
  zodNewSchema: z.ZodNumber;
132
- initialValue: undefined;
131
+ initialValue: number;
133
132
  zodClientSchema: TClientNext;
134
133
  zodValidationSchema: TClientNext;
135
134
  };
@@ -148,7 +147,7 @@ export declare const shape: {
148
147
  };
149
148
  zodSqlSchema: z.ZodNumber;
150
149
  zodNewSchema: z.ZodNumber;
151
- initialValue: undefined;
150
+ initialValue: number;
152
151
  zodClientSchema: TClientNext;
153
152
  zodValidationSchema: TValidationNext;
154
153
  };
@@ -166,7 +165,7 @@ export declare const shape: {
166
165
  };
167
166
  zodSqlSchema: z.ZodNumber;
168
167
  zodNewSchema: z.ZodNumber;
169
- initialValue: undefined;
168
+ initialValue: number;
170
169
  zodClientSchema: TClientNext;
171
170
  zodValidationSchema: TValidationNext;
172
171
  } & {
@@ -191,7 +190,7 @@ export declare const shape: {
191
190
  };
192
191
  zodSqlSchema: z.ZodNumber;
193
192
  zodNewSchema: z.ZodNumber;
194
- initialValue: undefined;
193
+ initialValue: number;
195
194
  zodClientSchema: TClientNext;
196
195
  zodValidationSchema: TClientNext;
197
196
  } & {
@@ -216,7 +215,7 @@ export declare const shape: {
216
215
  };
217
216
  zodSqlSchema: z.ZodNumber;
218
217
  zodNewSchema: z.ZodNumber;
219
- initialValue: undefined;
218
+ initialValue: number;
220
219
  zodClientSchema: z.ZodNumber;
221
220
  zodValidationSchema: z.ZodNumber;
222
221
  } & {
@@ -412,7 +411,7 @@ export declare const shape: {
412
411
  };
413
412
  zodSqlSchema: z.ZodString;
414
413
  zodNewSchema: z.ZodString;
415
- initialValue: undefined;
414
+ initialValue: string;
416
415
  zodClientSchema: z.ZodString;
417
416
  zodValidationSchema: z.ZodString;
418
417
  };
@@ -432,7 +431,7 @@ export declare const shape: {
432
431
  };
433
432
  zodSqlSchema: z.ZodString;
434
433
  zodNewSchema: z.ZodString;
435
- initialValue: undefined;
434
+ initialValue: string;
436
435
  zodClientSchema: z.ZodString;
437
436
  zodValidationSchema: TValidationNext;
438
437
  };
@@ -451,7 +450,7 @@ export declare const shape: {
451
450
  };
452
451
  zodSqlSchema: z.ZodString;
453
452
  zodNewSchema: z.ZodString;
454
- initialValue: undefined;
453
+ initialValue: string;
455
454
  zodClientSchema: z.ZodString;
456
455
  zodValidationSchema: TValidationNext;
457
456
  } & {
@@ -477,7 +476,7 @@ export declare const shape: {
477
476
  };
478
477
  zodSqlSchema: z.ZodString;
479
478
  zodNewSchema: z.ZodString;
480
- initialValue: undefined;
479
+ initialValue: string;
481
480
  zodClientSchema: TClientNext;
482
481
  zodValidationSchema: TClientNext;
483
482
  };
@@ -497,7 +496,7 @@ export declare const shape: {
497
496
  };
498
497
  zodSqlSchema: z.ZodString;
499
498
  zodNewSchema: z.ZodString;
500
- initialValue: undefined;
499
+ initialValue: string;
501
500
  zodClientSchema: TClientNext;
502
501
  zodValidationSchema: TValidationNext;
503
502
  };
@@ -516,7 +515,7 @@ export declare const shape: {
516
515
  };
517
516
  zodSqlSchema: z.ZodString;
518
517
  zodNewSchema: z.ZodString;
519
- initialValue: undefined;
518
+ initialValue: string;
520
519
  zodClientSchema: TClientNext;
521
520
  zodValidationSchema: TValidationNext;
522
521
  } & {
@@ -542,7 +541,7 @@ export declare const shape: {
542
541
  };
543
542
  zodSqlSchema: z.ZodString;
544
543
  zodNewSchema: z.ZodString;
545
- initialValue: undefined;
544
+ initialValue: string;
546
545
  zodClientSchema: TClientNext;
547
546
  zodValidationSchema: TClientNext;
548
547
  } & {
@@ -568,7 +567,7 @@ export declare const shape: {
568
567
  };
569
568
  zodSqlSchema: z.ZodString;
570
569
  zodNewSchema: z.ZodString;
571
- initialValue: undefined;
570
+ initialValue: string;
572
571
  zodClientSchema: z.ZodString;
573
572
  zodValidationSchema: z.ZodString;
574
573
  } & {
@@ -772,7 +771,7 @@ export declare const shape: {
772
771
  };
773
772
  zodSqlSchema: z.ZodString;
774
773
  zodNewSchema: z.ZodString;
775
- initialValue: undefined;
774
+ initialValue: string;
776
775
  zodClientSchema: z.ZodString;
777
776
  zodValidationSchema: z.ZodString;
778
777
  };
@@ -792,7 +791,7 @@ export declare const shape: {
792
791
  };
793
792
  zodSqlSchema: z.ZodString;
794
793
  zodNewSchema: z.ZodString;
795
- initialValue: undefined;
794
+ initialValue: string;
796
795
  zodClientSchema: z.ZodString;
797
796
  zodValidationSchema: TValidationNext;
798
797
  };
@@ -811,7 +810,7 @@ export declare const shape: {
811
810
  };
812
811
  zodSqlSchema: z.ZodString;
813
812
  zodNewSchema: z.ZodString;
814
- initialValue: undefined;
813
+ initialValue: string;
815
814
  zodClientSchema: z.ZodString;
816
815
  zodValidationSchema: TValidationNext;
817
816
  } & {
@@ -837,7 +836,7 @@ export declare const shape: {
837
836
  };
838
837
  zodSqlSchema: z.ZodString;
839
838
  zodNewSchema: z.ZodString;
840
- initialValue: undefined;
839
+ initialValue: string;
841
840
  zodClientSchema: TClientNext;
842
841
  zodValidationSchema: TClientNext;
843
842
  };
@@ -857,7 +856,7 @@ export declare const shape: {
857
856
  };
858
857
  zodSqlSchema: z.ZodString;
859
858
  zodNewSchema: z.ZodString;
860
- initialValue: undefined;
859
+ initialValue: string;
861
860
  zodClientSchema: TClientNext;
862
861
  zodValidationSchema: TValidationNext;
863
862
  };
@@ -876,7 +875,7 @@ export declare const shape: {
876
875
  };
877
876
  zodSqlSchema: z.ZodString;
878
877
  zodNewSchema: z.ZodString;
879
- initialValue: undefined;
878
+ initialValue: string;
880
879
  zodClientSchema: TClientNext;
881
880
  zodValidationSchema: TValidationNext;
882
881
  } & {
@@ -902,7 +901,7 @@ export declare const shape: {
902
901
  };
903
902
  zodSqlSchema: z.ZodString;
904
903
  zodNewSchema: z.ZodString;
905
- initialValue: undefined;
904
+ initialValue: string;
906
905
  zodClientSchema: TClientNext;
907
906
  zodValidationSchema: TClientNext;
908
907
  } & {
@@ -928,7 +927,7 @@ export declare const shape: {
928
927
  };
929
928
  zodSqlSchema: z.ZodString;
930
929
  zodNewSchema: z.ZodString;
931
- initialValue: undefined;
930
+ initialValue: string;
932
931
  zodClientSchema: z.ZodString;
933
932
  zodValidationSchema: z.ZodString;
934
933
  } & {
@@ -1131,7 +1130,7 @@ export declare const shape: {
1131
1130
  };
1132
1131
  zodSqlSchema: z.ZodString;
1133
1132
  zodNewSchema: z.ZodString;
1134
- initialValue: undefined;
1133
+ initialValue: string;
1135
1134
  zodClientSchema: z.ZodString;
1136
1135
  zodValidationSchema: z.ZodString;
1137
1136
  };
@@ -1150,7 +1149,7 @@ export declare const shape: {
1150
1149
  };
1151
1150
  zodSqlSchema: z.ZodString;
1152
1151
  zodNewSchema: z.ZodString;
1153
- initialValue: undefined;
1152
+ initialValue: string;
1154
1153
  zodClientSchema: z.ZodString;
1155
1154
  zodValidationSchema: TValidationNext;
1156
1155
  };
@@ -1168,7 +1167,7 @@ export declare const shape: {
1168
1167
  };
1169
1168
  zodSqlSchema: z.ZodString;
1170
1169
  zodNewSchema: z.ZodString;
1171
- initialValue: undefined;
1170
+ initialValue: string;
1172
1171
  zodClientSchema: z.ZodString;
1173
1172
  zodValidationSchema: TValidationNext;
1174
1173
  } & {
@@ -1193,7 +1192,7 @@ export declare const shape: {
1193
1192
  };
1194
1193
  zodSqlSchema: z.ZodString;
1195
1194
  zodNewSchema: z.ZodString;
1196
- initialValue: undefined;
1195
+ initialValue: string;
1197
1196
  zodClientSchema: TClientNext;
1198
1197
  zodValidationSchema: TClientNext;
1199
1198
  };
@@ -1212,7 +1211,7 @@ export declare const shape: {
1212
1211
  };
1213
1212
  zodSqlSchema: z.ZodString;
1214
1213
  zodNewSchema: z.ZodString;
1215
- initialValue: undefined;
1214
+ initialValue: string;
1216
1215
  zodClientSchema: TClientNext;
1217
1216
  zodValidationSchema: TValidationNext;
1218
1217
  };
@@ -1230,7 +1229,7 @@ export declare const shape: {
1230
1229
  };
1231
1230
  zodSqlSchema: z.ZodString;
1232
1231
  zodNewSchema: z.ZodString;
1233
- initialValue: undefined;
1232
+ initialValue: string;
1234
1233
  zodClientSchema: TClientNext;
1235
1234
  zodValidationSchema: TValidationNext;
1236
1235
  } & {
@@ -1255,7 +1254,7 @@ export declare const shape: {
1255
1254
  };
1256
1255
  zodSqlSchema: z.ZodString;
1257
1256
  zodNewSchema: z.ZodString;
1258
- initialValue: undefined;
1257
+ initialValue: string;
1259
1258
  zodClientSchema: TClientNext;
1260
1259
  zodValidationSchema: TClientNext;
1261
1260
  } & {
@@ -1280,7 +1279,7 @@ export declare const shape: {
1280
1279
  };
1281
1280
  zodSqlSchema: z.ZodString;
1282
1281
  zodNewSchema: z.ZodString;
1283
- initialValue: undefined;
1282
+ initialValue: string;
1284
1283
  zodClientSchema: z.ZodString;
1285
1284
  zodValidationSchema: z.ZodString;
1286
1285
  } & {
@@ -1475,7 +1474,7 @@ export declare const shape: {
1475
1474
  };
1476
1475
  zodSqlSchema: z.ZodString;
1477
1476
  zodNewSchema: z.ZodString;
1478
- initialValue: undefined;
1477
+ initialValue: string;
1479
1478
  zodClientSchema: z.ZodString;
1480
1479
  zodValidationSchema: z.ZodString;
1481
1480
  };
@@ -1494,7 +1493,7 @@ export declare const shape: {
1494
1493
  };
1495
1494
  zodSqlSchema: z.ZodString;
1496
1495
  zodNewSchema: z.ZodString;
1497
- initialValue: undefined;
1496
+ initialValue: string;
1498
1497
  zodClientSchema: z.ZodString;
1499
1498
  zodValidationSchema: TValidationNext;
1500
1499
  };
@@ -1512,7 +1511,7 @@ export declare const shape: {
1512
1511
  };
1513
1512
  zodSqlSchema: z.ZodString;
1514
1513
  zodNewSchema: z.ZodString;
1515
- initialValue: undefined;
1514
+ initialValue: string;
1516
1515
  zodClientSchema: z.ZodString;
1517
1516
  zodValidationSchema: TValidationNext;
1518
1517
  } & {
@@ -1537,7 +1536,7 @@ export declare const shape: {
1537
1536
  };
1538
1537
  zodSqlSchema: z.ZodString;
1539
1538
  zodNewSchema: z.ZodString;
1540
- initialValue: undefined;
1539
+ initialValue: string;
1541
1540
  zodClientSchema: TClientNext;
1542
1541
  zodValidationSchema: TClientNext;
1543
1542
  };
@@ -1556,7 +1555,7 @@ export declare const shape: {
1556
1555
  };
1557
1556
  zodSqlSchema: z.ZodString;
1558
1557
  zodNewSchema: z.ZodString;
1559
- initialValue: undefined;
1558
+ initialValue: string;
1560
1559
  zodClientSchema: TClientNext;
1561
1560
  zodValidationSchema: TValidationNext;
1562
1561
  };
@@ -1574,7 +1573,7 @@ export declare const shape: {
1574
1573
  };
1575
1574
  zodSqlSchema: z.ZodString;
1576
1575
  zodNewSchema: z.ZodString;
1577
- initialValue: undefined;
1576
+ initialValue: string;
1578
1577
  zodClientSchema: TClientNext;
1579
1578
  zodValidationSchema: TValidationNext;
1580
1579
  } & {
@@ -1599,7 +1598,7 @@ export declare const shape: {
1599
1598
  };
1600
1599
  zodSqlSchema: z.ZodString;
1601
1600
  zodNewSchema: z.ZodString;
1602
- initialValue: undefined;
1601
+ initialValue: string;
1603
1602
  zodClientSchema: TClientNext;
1604
1603
  zodValidationSchema: TClientNext;
1605
1604
  } & {
@@ -1624,7 +1623,7 @@ export declare const shape: {
1624
1623
  };
1625
1624
  zodSqlSchema: z.ZodString;
1626
1625
  zodNewSchema: z.ZodString;
1627
- initialValue: undefined;
1626
+ initialValue: string;
1628
1627
  zodClientSchema: z.ZodString;
1629
1628
  zodValidationSchema: z.ZodString;
1630
1629
  } & {
@@ -1819,7 +1818,7 @@ export declare const shape: {
1819
1818
  };
1820
1819
  zodSqlSchema: z.ZodBoolean;
1821
1820
  zodNewSchema: z.ZodBoolean;
1822
- initialValue: undefined;
1821
+ initialValue: boolean;
1823
1822
  zodClientSchema: z.ZodBoolean;
1824
1823
  zodValidationSchema: z.ZodBoolean;
1825
1824
  };
@@ -1838,7 +1837,7 @@ export declare const shape: {
1838
1837
  };
1839
1838
  zodSqlSchema: z.ZodBoolean;
1840
1839
  zodNewSchema: z.ZodBoolean;
1841
- initialValue: undefined;
1840
+ initialValue: boolean;
1842
1841
  zodClientSchema: z.ZodBoolean;
1843
1842
  zodValidationSchema: TValidationNext;
1844
1843
  };
@@ -1856,7 +1855,7 @@ export declare const shape: {
1856
1855
  };
1857
1856
  zodSqlSchema: z.ZodBoolean;
1858
1857
  zodNewSchema: z.ZodBoolean;
1859
- initialValue: undefined;
1858
+ initialValue: boolean;
1860
1859
  zodClientSchema: z.ZodBoolean;
1861
1860
  zodValidationSchema: TValidationNext;
1862
1861
  } & {
@@ -1881,7 +1880,7 @@ export declare const shape: {
1881
1880
  };
1882
1881
  zodSqlSchema: z.ZodBoolean;
1883
1882
  zodNewSchema: z.ZodBoolean;
1884
- initialValue: undefined;
1883
+ initialValue: boolean;
1885
1884
  zodClientSchema: TClientNext;
1886
1885
  zodValidationSchema: TClientNext;
1887
1886
  };
@@ -1900,7 +1899,7 @@ export declare const shape: {
1900
1899
  };
1901
1900
  zodSqlSchema: z.ZodBoolean;
1902
1901
  zodNewSchema: z.ZodBoolean;
1903
- initialValue: undefined;
1902
+ initialValue: boolean;
1904
1903
  zodClientSchema: TClientNext;
1905
1904
  zodValidationSchema: TValidationNext;
1906
1905
  };
@@ -1918,7 +1917,7 @@ export declare const shape: {
1918
1917
  };
1919
1918
  zodSqlSchema: z.ZodBoolean;
1920
1919
  zodNewSchema: z.ZodBoolean;
1921
- initialValue: undefined;
1920
+ initialValue: boolean;
1922
1921
  zodClientSchema: TClientNext;
1923
1922
  zodValidationSchema: TValidationNext;
1924
1923
  } & {
@@ -1943,7 +1942,7 @@ export declare const shape: {
1943
1942
  };
1944
1943
  zodSqlSchema: z.ZodBoolean;
1945
1944
  zodNewSchema: z.ZodBoolean;
1946
- initialValue: undefined;
1945
+ initialValue: boolean;
1947
1946
  zodClientSchema: TClientNext;
1948
1947
  zodValidationSchema: TClientNext;
1949
1948
  } & {
@@ -1968,7 +1967,7 @@ export declare const shape: {
1968
1967
  };
1969
1968
  zodSqlSchema: z.ZodBoolean;
1970
1969
  zodNewSchema: z.ZodBoolean;
1971
- initialValue: undefined;
1970
+ initialValue: boolean;
1972
1971
  zodClientSchema: z.ZodBoolean;
1973
1972
  zodValidationSchema: z.ZodBoolean;
1974
1973
  } & {
@@ -2163,7 +2162,7 @@ export declare const shape: {
2163
2162
  };
2164
2163
  zodSqlSchema: z.ZodDate;
2165
2164
  zodNewSchema: z.ZodDate;
2166
- initialValue: undefined;
2165
+ initialValue: Date;
2167
2166
  zodClientSchema: z.ZodDate;
2168
2167
  zodValidationSchema: z.ZodDate;
2169
2168
  };
@@ -2182,7 +2181,7 @@ export declare const shape: {
2182
2181
  };
2183
2182
  zodSqlSchema: z.ZodDate;
2184
2183
  zodNewSchema: z.ZodDate;
2185
- initialValue: undefined;
2184
+ initialValue: Date;
2186
2185
  zodClientSchema: z.ZodDate;
2187
2186
  zodValidationSchema: TValidationNext;
2188
2187
  };
@@ -2200,7 +2199,7 @@ export declare const shape: {
2200
2199
  };
2201
2200
  zodSqlSchema: z.ZodDate;
2202
2201
  zodNewSchema: z.ZodDate;
2203
- initialValue: undefined;
2202
+ initialValue: Date;
2204
2203
  zodClientSchema: z.ZodDate;
2205
2204
  zodValidationSchema: TValidationNext;
2206
2205
  } & {
@@ -2225,7 +2224,7 @@ export declare const shape: {
2225
2224
  };
2226
2225
  zodSqlSchema: z.ZodDate;
2227
2226
  zodNewSchema: z.ZodDate;
2228
- initialValue: undefined;
2227
+ initialValue: Date;
2229
2228
  zodClientSchema: TClientNext;
2230
2229
  zodValidationSchema: TClientNext;
2231
2230
  };
@@ -2244,7 +2243,7 @@ export declare const shape: {
2244
2243
  };
2245
2244
  zodSqlSchema: z.ZodDate;
2246
2245
  zodNewSchema: z.ZodDate;
2247
- initialValue: undefined;
2246
+ initialValue: Date;
2248
2247
  zodClientSchema: TClientNext;
2249
2248
  zodValidationSchema: TValidationNext;
2250
2249
  };
@@ -2262,7 +2261,7 @@ export declare const shape: {
2262
2261
  };
2263
2262
  zodSqlSchema: z.ZodDate;
2264
2263
  zodNewSchema: z.ZodDate;
2265
- initialValue: undefined;
2264
+ initialValue: Date;
2266
2265
  zodClientSchema: TClientNext;
2267
2266
  zodValidationSchema: TValidationNext;
2268
2267
  } & {
@@ -2287,7 +2286,7 @@ export declare const shape: {
2287
2286
  };
2288
2287
  zodSqlSchema: z.ZodDate;
2289
2288
  zodNewSchema: z.ZodDate;
2290
- initialValue: undefined;
2289
+ initialValue: Date;
2291
2290
  zodClientSchema: TClientNext;
2292
2291
  zodValidationSchema: TClientNext;
2293
2292
  } & {
@@ -2312,7 +2311,7 @@ export declare const shape: {
2312
2311
  };
2313
2312
  zodSqlSchema: z.ZodDate;
2314
2313
  zodNewSchema: z.ZodDate;
2315
- initialValue: undefined;
2314
+ initialValue: Date;
2316
2315
  zodClientSchema: z.ZodDate;
2317
2316
  zodValidationSchema: z.ZodDate;
2318
2317
  } & {
@@ -2507,7 +2506,7 @@ export declare const shape: {
2507
2506
  };
2508
2507
  zodSqlSchema: z.ZodDate;
2509
2508
  zodNewSchema: z.ZodDate;
2510
- initialValue: undefined;
2509
+ initialValue: Date;
2511
2510
  zodClientSchema: z.ZodDate;
2512
2511
  zodValidationSchema: z.ZodDate;
2513
2512
  };
@@ -2526,7 +2525,7 @@ export declare const shape: {
2526
2525
  };
2527
2526
  zodSqlSchema: z.ZodDate;
2528
2527
  zodNewSchema: z.ZodDate;
2529
- initialValue: undefined;
2528
+ initialValue: Date;
2530
2529
  zodClientSchema: z.ZodDate;
2531
2530
  zodValidationSchema: TValidationNext;
2532
2531
  };
@@ -2544,7 +2543,7 @@ export declare const shape: {
2544
2543
  };
2545
2544
  zodSqlSchema: z.ZodDate;
2546
2545
  zodNewSchema: z.ZodDate;
2547
- initialValue: undefined;
2546
+ initialValue: Date;
2548
2547
  zodClientSchema: z.ZodDate;
2549
2548
  zodValidationSchema: TValidationNext;
2550
2549
  } & {
@@ -2569,7 +2568,7 @@ export declare const shape: {
2569
2568
  };
2570
2569
  zodSqlSchema: z.ZodDate;
2571
2570
  zodNewSchema: z.ZodDate;
2572
- initialValue: undefined;
2571
+ initialValue: Date;
2573
2572
  zodClientSchema: TClientNext;
2574
2573
  zodValidationSchema: TClientNext;
2575
2574
  };
@@ -2588,7 +2587,7 @@ export declare const shape: {
2588
2587
  };
2589
2588
  zodSqlSchema: z.ZodDate;
2590
2589
  zodNewSchema: z.ZodDate;
2591
- initialValue: undefined;
2590
+ initialValue: Date;
2592
2591
  zodClientSchema: TClientNext;
2593
2592
  zodValidationSchema: TValidationNext;
2594
2593
  };
@@ -2606,7 +2605,7 @@ export declare const shape: {
2606
2605
  };
2607
2606
  zodSqlSchema: z.ZodDate;
2608
2607
  zodNewSchema: z.ZodDate;
2609
- initialValue: undefined;
2608
+ initialValue: Date;
2610
2609
  zodClientSchema: TClientNext;
2611
2610
  zodValidationSchema: TValidationNext;
2612
2611
  } & {
@@ -2631,7 +2630,7 @@ export declare const shape: {
2631
2630
  };
2632
2631
  zodSqlSchema: z.ZodDate;
2633
2632
  zodNewSchema: z.ZodDate;
2634
- initialValue: undefined;
2633
+ initialValue: Date;
2635
2634
  zodClientSchema: TClientNext;
2636
2635
  zodValidationSchema: TClientNext;
2637
2636
  } & {
@@ -2656,7 +2655,7 @@ export declare const shape: {
2656
2655
  };
2657
2656
  zodSqlSchema: z.ZodDate;
2658
2657
  zodNewSchema: z.ZodDate;
2659
- initialValue: undefined;
2658
+ initialValue: Date;
2660
2659
  zodClientSchema: z.ZodDate;
2661
2660
  zodValidationSchema: z.ZodDate;
2662
2661
  } & {
@@ -2845,7 +2844,7 @@ export declare const shape: {
2845
2844
  sql: T;
2846
2845
  zodSqlSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
2847
2846
  zodNewSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
2848
- initialValue: undefined;
2847
+ initialValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
2849
2848
  zodClientSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
2850
2849
  zodValidationSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
2851
2850
  };
@@ -2858,7 +2857,7 @@ export declare const shape: {
2858
2857
  sql: T;
2859
2858
  zodSqlSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
2860
2859
  zodNewSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
2861
- initialValue: undefined;
2860
+ initialValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
2862
2861
  zodClientSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
2863
2862
  zodValidationSchema: TValidationNext;
2864
2863
  };
@@ -2870,7 +2869,7 @@ export declare const shape: {
2870
2869
  sql: T;
2871
2870
  zodSqlSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
2872
2871
  zodNewSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
2873
- initialValue: undefined;
2872
+ initialValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
2874
2873
  zodClientSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
2875
2874
  zodValidationSchema: TValidationNext;
2876
2875
  } & {
@@ -2889,7 +2888,7 @@ export declare const shape: {
2889
2888
  sql: T;
2890
2889
  zodSqlSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
2891
2890
  zodNewSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
2892
- initialValue: undefined;
2891
+ initialValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
2893
2892
  zodClientSchema: TClientNext;
2894
2893
  zodValidationSchema: TClientNext;
2895
2894
  };
@@ -2902,7 +2901,7 @@ export declare const shape: {
2902
2901
  sql: T;
2903
2902
  zodSqlSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
2904
2903
  zodNewSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
2905
- initialValue: undefined;
2904
+ initialValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
2906
2905
  zodClientSchema: TClientNext;
2907
2906
  zodValidationSchema: TValidationNext;
2908
2907
  };
@@ -2914,7 +2913,7 @@ export declare const shape: {
2914
2913
  sql: T;
2915
2914
  zodSqlSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
2916
2915
  zodNewSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
2917
- initialValue: undefined;
2916
+ initialValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
2918
2917
  zodClientSchema: TClientNext;
2919
2918
  zodValidationSchema: TValidationNext;
2920
2919
  } & {
@@ -2933,7 +2932,7 @@ export declare const shape: {
2933
2932
  sql: T;
2934
2933
  zodSqlSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
2935
2934
  zodNewSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
2936
- initialValue: undefined;
2935
+ initialValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
2937
2936
  zodClientSchema: TClientNext;
2938
2937
  zodValidationSchema: TClientNext;
2939
2938
  } & {
@@ -2952,7 +2951,7 @@ export declare const shape: {
2952
2951
  sql: T;
2953
2952
  zodSqlSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
2954
2953
  zodNewSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
2955
- initialValue: undefined;
2954
+ initialValue: z.TypeOf<SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never>;
2956
2955
  zodClientSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
2957
2956
  zodValidationSchema: SQLToZodType<T, false> extends z.ZodTypeAny ? SQLToZodType<T, false> : never;
2958
2957
  } & {
@@ -3204,9 +3203,9 @@ type BaseSchemaField<T extends SQLType = SQLType> = {
3204
3203
  toDb?: (clientValue: any) => any;
3205
3204
  };
3206
3205
  type AnyFieldDefinition = ReturnType<typeof shape.sql>;
3207
- type ReferenceField<TField extends AnyFieldDefinition, TTo extends SchemaField> = TField & {
3206
+ type ReferenceField<TField extends AnyFieldDefinition, TTo extends SchemaField = any> = TField & {
3208
3207
  type: "reference";
3209
- to: () => TTo;
3208
+ to: () => any;
3210
3209
  };
3211
3210
  type SchemaField<T extends SQLType = SQLType> = BaseSchemaField<T> | ReferenceField<AnyFieldDefinition, any>;
3212
3211
  export type Schema<T extends Record<string, SchemaField | (() => Relation<any>)>> = {
@@ -3250,39 +3249,13 @@ export type InferDBSchema<T> = {
3250
3249
  } ? DbType : never;
3251
3250
  }> : never;
3252
3251
  };
3253
- export type SerializableField = {
3254
- sql: SQLType;
3255
- jsonSchema: JsonSchema7Type;
3256
- defaultValue?: any;
3257
- transforms?: {
3258
- toClient: string;
3259
- toDb: string;
3260
- };
3261
- };
3262
- export type SerializableRelation = {
3263
- type: "relation";
3264
- relationType: "hasMany" | "hasOne" | "belongsTo" | "manyToMany";
3265
- fromKey: string;
3266
- toKey: SerializableField;
3267
- defaultCount?: number;
3268
- };
3269
- export type SerializableSchema = {
3270
- _tableName: string;
3271
- __schemaId: string;
3272
- _syncKey?: {
3273
- toString: string;
3274
- };
3275
- } & {
3276
- [key: string]: SerializableField | (SerializableRelation & {
3277
- schema: SerializableSchema;
3278
- });
3279
- };
3280
- export declare function reference<TTargetField extends SchemaField, TField extends object>(config: {
3281
- to: () => TTargetField;
3282
- field: TField;
3283
- }): TField & {
3252
+ export declare function reference<TField extends object, Zod extends z.ZodTypeAny>(config: {
3253
+ to: TField;
3254
+ field: Zod;
3255
+ }): {
3256
+ field: Zod;
3284
3257
  type: "reference";
3285
- to: () => TTargetField;
3258
+ to: () => TField;
3286
3259
  };
3287
3260
  export declare function createMixedValidationSchema<T extends Schema<any>>(schema: T, clientSchema?: z.ZodObject<any>, dbSchema?: z.ZodObject<any>): z.ZodObject<any>;
3288
3261
  type SchemaDefinition = {
@@ -3366,4 +3339,25 @@ export type InferSchemaTypes<T extends {
3366
3339
  /** The TypeScript type for the default values object. */
3367
3340
  defaults: ReturnType<typeof createSchema<T>>["defaultValues"];
3368
3341
  }>;
3342
+ type SyncSchemaEntry<T extends {
3343
+ _tableName: string;
3344
+ }> = {
3345
+ schema: T;
3346
+ validation?: (schema: ReturnType<typeof createSchema<T>>["validationSchema"]) => z.ZodSchema;
3347
+ client?: (schema: ReturnType<typeof createSchema<T>>["clientSchema"]) => z.ZodSchema;
3348
+ };
3349
+ type SyncSchemaMap<T extends Record<string, {
3350
+ _tableName: string;
3351
+ }>> = {
3352
+ [K in keyof T]: SyncSchemaEntry<T[K]>;
3353
+ };
3354
+ export declare function createSyncSchema<T extends Record<string, {
3355
+ _tableName: string;
3356
+ }>>(config: {
3357
+ [K in keyof T]: {
3358
+ schema: T[K];
3359
+ validation?: (schema: ReturnType<typeof createSchema<T[K]>>["validationSchema"]) => z.ZodSchema;
3360
+ client?: (schema: ReturnType<typeof createSchema<T[K]>>["clientSchema"]) => z.ZodSchema;
3361
+ };
3362
+ }): SyncSchemaMap<T>;
3369
3363
  export {};