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.
@@ -9,7 +9,7 @@ export declare const userSchema: {
9
9
  };
10
10
  zodSqlSchema: z.ZodNumber;
11
11
  zodNewSchema: z.ZodNumber;
12
- initialValue: undefined;
12
+ initialValue: number;
13
13
  zodClientSchema: z.ZodNumber;
14
14
  zodValidationSchema: z.ZodNumber;
15
15
  };
@@ -25,7 +25,7 @@ export declare const userSchema: {
25
25
  };
26
26
  zodSqlSchema: z.ZodNumber;
27
27
  zodNewSchema: z.ZodNumber;
28
- initialValue: undefined;
28
+ initialValue: number;
29
29
  zodClientSchema: z.ZodNumber;
30
30
  zodValidationSchema: TValidationNext;
31
31
  };
@@ -40,7 +40,7 @@ export declare const userSchema: {
40
40
  };
41
41
  zodSqlSchema: z.ZodNumber;
42
42
  zodNewSchema: z.ZodNumber;
43
- initialValue: undefined;
43
+ initialValue: number;
44
44
  zodClientSchema: z.ZodNumber;
45
45
  zodValidationSchema: TValidationNext;
46
46
  } & {
@@ -62,7 +62,7 @@ export declare const userSchema: {
62
62
  };
63
63
  zodSqlSchema: z.ZodNumber;
64
64
  zodNewSchema: z.ZodNumber;
65
- initialValue: undefined;
65
+ initialValue: number;
66
66
  zodClientSchema: TClientNext;
67
67
  zodValidationSchema: TClientNext;
68
68
  };
@@ -78,7 +78,7 @@ export declare const userSchema: {
78
78
  };
79
79
  zodSqlSchema: z.ZodNumber;
80
80
  zodNewSchema: z.ZodNumber;
81
- initialValue: undefined;
81
+ initialValue: number;
82
82
  zodClientSchema: TClientNext;
83
83
  zodValidationSchema: TValidationNext;
84
84
  };
@@ -93,7 +93,7 @@ export declare const userSchema: {
93
93
  };
94
94
  zodSqlSchema: z.ZodNumber;
95
95
  zodNewSchema: z.ZodNumber;
96
- initialValue: undefined;
96
+ initialValue: number;
97
97
  zodClientSchema: TClientNext;
98
98
  zodValidationSchema: TValidationNext;
99
99
  } & {
@@ -115,7 +115,7 @@ export declare const userSchema: {
115
115
  };
116
116
  zodSqlSchema: z.ZodNumber;
117
117
  zodNewSchema: z.ZodNumber;
118
- initialValue: undefined;
118
+ initialValue: number;
119
119
  zodClientSchema: TClientNext;
120
120
  zodValidationSchema: TClientNext;
121
121
  } & {
@@ -137,7 +137,7 @@ export declare const userSchema: {
137
137
  };
138
138
  zodSqlSchema: z.ZodNumber;
139
139
  zodNewSchema: z.ZodNumber;
140
- initialValue: undefined;
140
+ initialValue: number;
141
141
  zodClientSchema: z.ZodNumber;
142
142
  zodValidationSchema: z.ZodNumber;
143
143
  } & {
@@ -305,7 +305,7 @@ export declare const userSchema: {
305
305
  };
306
306
  zodSqlSchema: z.ZodString;
307
307
  zodNewSchema: z.ZodString;
308
- initialValue: undefined;
308
+ initialValue: string;
309
309
  zodClientSchema: z.ZodString;
310
310
  zodValidationSchema: z.ZodString;
311
311
  };
@@ -320,7 +320,7 @@ export declare const userSchema: {
320
320
  };
321
321
  zodSqlSchema: z.ZodString;
322
322
  zodNewSchema: z.ZodString;
323
- initialValue: undefined;
323
+ initialValue: string;
324
324
  zodClientSchema: z.ZodString;
325
325
  zodValidationSchema: z.ZodString;
326
326
  } & {
@@ -339,7 +339,7 @@ export declare const userSchema: {
339
339
  };
340
340
  zodSqlSchema: z.ZodString;
341
341
  zodNewSchema: z.ZodString;
342
- initialValue: undefined;
342
+ initialValue: string;
343
343
  zodClientSchema: z.ZodString;
344
344
  zodValidationSchema: z.ZodString;
345
345
  };
@@ -354,7 +354,7 @@ export declare const userSchema: {
354
354
  };
355
355
  zodSqlSchema: z.ZodString;
356
356
  zodNewSchema: z.ZodString;
357
- initialValue: undefined;
357
+ initialValue: string;
358
358
  zodClientSchema: z.ZodString;
359
359
  zodValidationSchema: z.ZodString;
360
360
  } & {
@@ -373,7 +373,7 @@ export declare const userSchema: {
373
373
  };
374
374
  zodSqlSchema: z.ZodString;
375
375
  zodNewSchema: z.ZodString;
376
- initialValue: undefined;
376
+ initialValue: string;
377
377
  zodClientSchema: z.ZodString;
378
378
  zodValidationSchema: z.ZodString;
379
379
  };
@@ -388,7 +388,7 @@ export declare const userSchema: {
388
388
  };
389
389
  zodSqlSchema: z.ZodString;
390
390
  zodNewSchema: z.ZodString;
391
- initialValue: undefined;
391
+ initialValue: string;
392
392
  zodClientSchema: z.ZodString;
393
393
  zodValidationSchema: z.ZodString;
394
394
  } & {
@@ -427,7 +427,7 @@ export declare const userSchema: {
427
427
  };
428
428
  zodSqlSchema: z.ZodString;
429
429
  zodNewSchema: z.ZodString;
430
- initialValue: undefined;
430
+ initialValue: string;
431
431
  zodClientSchema: z.ZodString;
432
432
  zodValidationSchema: z.ZodString;
433
433
  };
@@ -443,7 +443,7 @@ export declare const userSchema: {
443
443
  };
444
444
  zodSqlSchema: z.ZodString;
445
445
  zodNewSchema: z.ZodString;
446
- initialValue: undefined;
446
+ initialValue: string;
447
447
  zodClientSchema: z.ZodString;
448
448
  zodValidationSchema: TValidationNext;
449
449
  };
@@ -458,7 +458,7 @@ export declare const userSchema: {
458
458
  };
459
459
  zodSqlSchema: z.ZodString;
460
460
  zodNewSchema: z.ZodString;
461
- initialValue: undefined;
461
+ initialValue: string;
462
462
  zodClientSchema: z.ZodString;
463
463
  zodValidationSchema: TValidationNext;
464
464
  } & {
@@ -480,7 +480,7 @@ export declare const userSchema: {
480
480
  };
481
481
  zodSqlSchema: z.ZodString;
482
482
  zodNewSchema: z.ZodString;
483
- initialValue: undefined;
483
+ initialValue: string;
484
484
  zodClientSchema: TClientNext;
485
485
  zodValidationSchema: TClientNext;
486
486
  };
@@ -496,7 +496,7 @@ export declare const userSchema: {
496
496
  };
497
497
  zodSqlSchema: z.ZodString;
498
498
  zodNewSchema: z.ZodString;
499
- initialValue: undefined;
499
+ initialValue: string;
500
500
  zodClientSchema: TClientNext;
501
501
  zodValidationSchema: TValidationNext;
502
502
  };
@@ -511,7 +511,7 @@ export declare const userSchema: {
511
511
  };
512
512
  zodSqlSchema: z.ZodString;
513
513
  zodNewSchema: z.ZodString;
514
- initialValue: undefined;
514
+ initialValue: string;
515
515
  zodClientSchema: TClientNext;
516
516
  zodValidationSchema: TValidationNext;
517
517
  } & {
@@ -533,7 +533,7 @@ export declare const userSchema: {
533
533
  };
534
534
  zodSqlSchema: z.ZodString;
535
535
  zodNewSchema: z.ZodString;
536
- initialValue: undefined;
536
+ initialValue: string;
537
537
  zodClientSchema: TClientNext;
538
538
  zodValidationSchema: TClientNext;
539
539
  } & {
@@ -555,7 +555,7 @@ export declare const userSchema: {
555
555
  };
556
556
  zodSqlSchema: z.ZodString;
557
557
  zodNewSchema: z.ZodString;
558
- initialValue: undefined;
558
+ initialValue: string;
559
559
  zodClientSchema: z.ZodString;
560
560
  zodValidationSchema: z.ZodString;
561
561
  } & {
@@ -715,503 +715,967 @@ export declare const userSchema: {
715
715
  };
716
716
  };
717
717
  } | {
718
- config: {
719
- sql: {
720
- type: "int";
721
- };
722
- zodSqlSchema: z.ZodNumber;
723
- zodNewSchema: z.ZodNumber;
724
- initialValue: undefined;
725
- zodClientSchema: z.ZodString;
726
- zodValidationSchema: z.ZodString;
727
- };
728
- validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
729
- sql: z.ZodNumber;
730
- initialState: z.ZodNumber;
731
- client: z.ZodString;
732
- }) => TValidationNext)) => {
718
+ field: z.ZodNumber;
719
+ type: "reference";
720
+ to: () => () => {
733
721
  config: {
734
722
  sql: {
735
723
  type: "int";
724
+ pk: true;
736
725
  };
737
726
  zodSqlSchema: z.ZodNumber;
738
727
  zodNewSchema: z.ZodNumber;
739
- initialValue: undefined;
740
- zodClientSchema: z.ZodString;
741
- zodValidationSchema: TValidationNext;
728
+ initialValue: number;
729
+ zodClientSchema: z.ZodNumber;
730
+ zodValidationSchema: z.ZodNumber;
742
731
  };
743
- transform: (transforms: {
744
- toClient: (dbValue: number) => string;
745
- toDb: (clientValue: string) => number;
746
- }) => {
732
+ validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
733
+ sql: z.ZodNumber;
734
+ initialState: z.ZodNumber;
735
+ client: z.ZodNumber;
736
+ }) => TValidationNext)) => {
747
737
  config: {
748
738
  sql: {
749
739
  type: "int";
740
+ pk: true;
750
741
  };
751
742
  zodSqlSchema: z.ZodNumber;
752
743
  zodNewSchema: z.ZodNumber;
753
- initialValue: undefined;
754
- zodClientSchema: z.ZodString;
755
- zodValidationSchema: TValidationNext;
756
- } & {
757
- transforms: {
758
- toClient: (dbValue: number) => string;
759
- toDb: (clientValue: string) => number;
760
- };
761
- };
762
- };
763
- };
764
- transform: (transforms: {
765
- toClient: (dbValue: number) => string;
766
- toDb: (clientValue: string) => number;
767
- }) => {
768
- config: {
769
- sql: {
770
- type: "int";
771
- };
772
- zodSqlSchema: z.ZodNumber;
773
- zodNewSchema: z.ZodNumber;
774
- initialValue: undefined;
775
- zodClientSchema: z.ZodString;
776
- zodValidationSchema: z.ZodString;
777
- } & {
778
- transforms: {
779
- toClient: (dbValue: number) => string;
780
- toDb: (clientValue: string) => number;
781
- };
782
- };
783
- };
784
- } | {
785
- config: {
786
- sql: {
787
- type: "text";
788
- };
789
- zodSqlSchema: z.ZodString;
790
- zodNewSchema: z.ZodString;
791
- initialValue: undefined;
792
- zodClientSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
793
- zodValidationSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
794
- } & {
795
- transforms: {
796
- toClient: (dbValue: string) => ("bald" | "fuzzy" | "fluffy" | "poof")[];
797
- toDb: (clientValue: ("bald" | "fuzzy" | "fluffy" | "poof")[]) => string;
798
- };
799
- };
800
- } | {
801
- config: {
802
- sql: {
803
- type: "int";
804
- };
805
- zodSqlSchema: z.ZodNumber;
806
- zodNewSchema: z.ZodNumber;
807
- initialValue: undefined;
808
- zodClientSchema: z.ZodBoolean;
809
- zodValidationSchema: z.ZodBoolean;
810
- } & {
811
- transforms: {
812
- toClient: (dbValue: number) => boolean;
813
- toDb: (clientValue: boolean) => number;
814
- };
815
- };
816
- };
817
- schema: {
818
- _tableName: string;
819
- id: {
820
- config: {
821
- sql: {
822
- type: "int";
823
- pk: true;
824
- };
825
- zodSqlSchema: z.ZodNumber;
826
- zodNewSchema: z.ZodString;
827
- initialValue: string;
828
- zodClientSchema: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
829
- zodValidationSchema: z.ZodString;
830
- } & {
831
- transforms: {
832
- toClient: (dbValue: number) => string | number;
833
- toDb: (clientValue: string | number) => number;
834
- };
835
- };
836
- };
837
- name: {
838
- config: {
839
- sql: {
840
- type: "varchar";
841
- length: number;
842
- };
843
- zodSqlSchema: z.ZodString;
844
- zodNewSchema: z.ZodString;
845
- initialValue: undefined;
846
- zodClientSchema: z.ZodString;
847
- zodValidationSchema: z.ZodString;
848
- };
849
- validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
850
- sql: z.ZodString;
851
- initialState: z.ZodString;
852
- client: z.ZodString;
853
- }) => TValidationNext)) => {
854
- config: {
855
- sql: {
856
- type: "varchar";
857
- length: number;
858
- };
859
- zodSqlSchema: z.ZodString;
860
- zodNewSchema: z.ZodString;
861
- initialValue: undefined;
862
- zodClientSchema: z.ZodString;
744
+ initialValue: number;
745
+ zodClientSchema: z.ZodNumber;
863
746
  zodValidationSchema: TValidationNext;
864
747
  };
865
748
  transform: (transforms: {
866
- toClient: (dbValue: string) => string;
867
- toDb: (clientValue: string) => string;
749
+ toClient: (dbValue: number) => number;
750
+ toDb: (clientValue: number) => number;
868
751
  }) => {
869
752
  config: {
870
753
  sql: {
871
- type: "varchar";
872
- length: number;
754
+ type: "int";
755
+ pk: true;
873
756
  };
874
- zodSqlSchema: z.ZodString;
875
- zodNewSchema: z.ZodString;
876
- initialValue: undefined;
877
- zodClientSchema: z.ZodString;
757
+ zodSqlSchema: z.ZodNumber;
758
+ zodNewSchema: z.ZodNumber;
759
+ initialValue: number;
760
+ zodClientSchema: z.ZodNumber;
878
761
  zodValidationSchema: TValidationNext;
879
762
  } & {
880
763
  transforms: {
881
- toClient: (dbValue: string) => string;
882
- toDb: (clientValue: string) => string;
764
+ toClient: (dbValue: number) => number;
765
+ toDb: (clientValue: number) => number;
883
766
  };
884
767
  };
885
768
  };
886
769
  };
887
770
  client: <TClientNext extends z.ZodTypeAny>(schema: TClientNext | ((tools: {
888
- sql: z.ZodString;
889
- initialState: z.ZodString;
771
+ sql: z.ZodNumber;
772
+ initialState: z.ZodNumber;
890
773
  }) => TClientNext)) => {
891
774
  config: {
892
775
  sql: {
893
- type: "varchar";
894
- length: number;
776
+ type: "int";
777
+ pk: true;
895
778
  };
896
- zodSqlSchema: z.ZodString;
897
- zodNewSchema: z.ZodString;
898
- initialValue: undefined;
779
+ zodSqlSchema: z.ZodNumber;
780
+ zodNewSchema: z.ZodNumber;
781
+ initialValue: number;
899
782
  zodClientSchema: TClientNext;
900
783
  zodValidationSchema: TClientNext;
901
784
  };
902
785
  validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
903
- sql: z.ZodString;
904
- initialState: z.ZodString;
786
+ sql: z.ZodNumber;
787
+ initialState: z.ZodNumber;
905
788
  client: TClientNext;
906
789
  }) => TValidationNext)) => {
907
790
  config: {
908
791
  sql: {
909
- type: "varchar";
910
- length: number;
792
+ type: "int";
793
+ pk: true;
911
794
  };
912
- zodSqlSchema: z.ZodString;
913
- zodNewSchema: z.ZodString;
914
- initialValue: undefined;
795
+ zodSqlSchema: z.ZodNumber;
796
+ zodNewSchema: z.ZodNumber;
797
+ initialValue: number;
915
798
  zodClientSchema: TClientNext;
916
799
  zodValidationSchema: TValidationNext;
917
800
  };
918
801
  transform: (transforms: {
919
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
920
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
802
+ toClient: (dbValue: number) => z.TypeOf<TClientNext>;
803
+ toDb: (clientValue: z.TypeOf<TClientNext>) => number;
921
804
  }) => {
922
805
  config: {
923
806
  sql: {
924
- type: "varchar";
925
- length: number;
807
+ type: "int";
808
+ pk: true;
926
809
  };
927
- zodSqlSchema: z.ZodString;
928
- zodNewSchema: z.ZodString;
929
- initialValue: undefined;
810
+ zodSqlSchema: z.ZodNumber;
811
+ zodNewSchema: z.ZodNumber;
812
+ initialValue: number;
930
813
  zodClientSchema: TClientNext;
931
814
  zodValidationSchema: TValidationNext;
932
815
  } & {
933
816
  transforms: {
934
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
935
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
817
+ toClient: (dbValue: number) => z.TypeOf<TClientNext>;
818
+ toDb: (clientValue: z.TypeOf<TClientNext>) => number;
936
819
  };
937
820
  };
938
821
  };
939
822
  };
940
823
  transform: (transforms: {
941
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
942
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
824
+ toClient: (dbValue: number) => z.TypeOf<TClientNext>;
825
+ toDb: (clientValue: z.TypeOf<TClientNext>) => number;
943
826
  }) => {
944
827
  config: {
945
828
  sql: {
946
- type: "varchar";
947
- length: number;
829
+ type: "int";
830
+ pk: true;
948
831
  };
949
- zodSqlSchema: z.ZodString;
950
- zodNewSchema: z.ZodString;
951
- initialValue: undefined;
832
+ zodSqlSchema: z.ZodNumber;
833
+ zodNewSchema: z.ZodNumber;
834
+ initialValue: number;
952
835
  zodClientSchema: TClientNext;
953
836
  zodValidationSchema: TClientNext;
954
837
  } & {
955
838
  transforms: {
956
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
957
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
839
+ toClient: (dbValue: number) => z.TypeOf<TClientNext>;
840
+ toDb: (clientValue: z.TypeOf<TClientNext>) => number;
958
841
  };
959
842
  };
960
843
  };
961
844
  };
962
845
  transform: (transforms: {
963
- toClient: (dbValue: string) => string;
964
- toDb: (clientValue: string) => string;
846
+ toClient: (dbValue: number) => number;
847
+ toDb: (clientValue: number) => number;
965
848
  }) => {
966
849
  config: {
967
850
  sql: {
968
- type: "varchar";
969
- length: number;
851
+ type: "int";
852
+ pk: true;
970
853
  };
971
- zodSqlSchema: z.ZodString;
972
- zodNewSchema: z.ZodString;
973
- initialValue: undefined;
974
- zodClientSchema: z.ZodString;
975
- zodValidationSchema: z.ZodString;
854
+ zodSqlSchema: z.ZodNumber;
855
+ zodNewSchema: z.ZodNumber;
856
+ initialValue: number;
857
+ zodClientSchema: z.ZodNumber;
858
+ zodValidationSchema: z.ZodNumber;
976
859
  } & {
977
860
  transforms: {
978
- toClient: (dbValue: string) => string;
979
- toDb: (clientValue: string) => string;
861
+ toClient: (dbValue: number) => number;
862
+ toDb: (clientValue: number) => number;
980
863
  };
981
864
  };
982
865
  };
983
866
  initialState: <TNewNext extends z.ZodTypeAny, TDefaultNext>(schema: TNewNext | ((tools: {
984
- sql: z.ZodString;
867
+ sql: z.ZodNumber;
985
868
  }) => TNewNext), defaultValue: () => TDefaultNext) => {
986
869
  config: {
987
870
  sql: {
988
- type: "varchar";
989
- length: number;
871
+ type: "int";
872
+ pk: true;
990
873
  };
991
- zodSqlSchema: z.ZodString;
874
+ zodSqlSchema: z.ZodNumber;
992
875
  zodNewSchema: TNewNext;
993
876
  initialValue: z.TypeOf<TNewNext>;
994
- zodClientSchema: z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>;
995
- zodValidationSchema: z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>;
877
+ zodClientSchema: z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>;
878
+ zodValidationSchema: z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>;
996
879
  };
997
880
  validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
998
- sql: z.ZodString;
881
+ sql: z.ZodNumber;
999
882
  initialState: TNewNext;
1000
- client: z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>;
883
+ client: z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>;
1001
884
  }) => TValidationNext)) => {
1002
885
  config: {
1003
886
  sql: {
1004
- type: "varchar";
1005
- length: number;
887
+ type: "int";
888
+ pk: true;
1006
889
  };
1007
- zodSqlSchema: z.ZodString;
890
+ zodSqlSchema: z.ZodNumber;
1008
891
  zodNewSchema: TNewNext;
1009
892
  initialValue: z.TypeOf<TNewNext>;
1010
- zodClientSchema: z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>;
893
+ zodClientSchema: z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>;
1011
894
  zodValidationSchema: TValidationNext;
1012
895
  };
1013
896
  transform: (transforms: {
1014
- toClient: (dbValue: string) => z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>;
1015
- toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>) => string;
897
+ toClient: (dbValue: number) => z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>;
898
+ toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>) => number;
1016
899
  }) => {
1017
900
  config: {
1018
901
  sql: {
1019
- type: "varchar";
1020
- length: number;
902
+ type: "int";
903
+ pk: true;
1021
904
  };
1022
- zodSqlSchema: z.ZodString;
905
+ zodSqlSchema: z.ZodNumber;
1023
906
  zodNewSchema: TNewNext;
1024
907
  initialValue: z.TypeOf<TNewNext>;
1025
- zodClientSchema: z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>;
908
+ zodClientSchema: z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>;
1026
909
  zodValidationSchema: TValidationNext;
1027
910
  } & {
1028
911
  transforms: {
1029
- toClient: (dbValue: string) => z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>;
1030
- toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>) => string;
912
+ toClient: (dbValue: number) => z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>;
913
+ toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>) => number;
1031
914
  };
1032
915
  };
1033
916
  };
1034
917
  };
1035
918
  client: <TClientNext extends z.ZodTypeAny>(schema: TClientNext | ((tools: {
1036
- sql: z.ZodString;
919
+ sql: z.ZodNumber;
1037
920
  initialState: TNewNext;
1038
921
  }) => TClientNext)) => {
1039
922
  config: {
1040
923
  sql: {
1041
- type: "varchar";
1042
- length: number;
924
+ type: "int";
925
+ pk: true;
1043
926
  };
1044
- zodSqlSchema: z.ZodString;
927
+ zodSqlSchema: z.ZodNumber;
1045
928
  zodNewSchema: TNewNext;
1046
929
  initialValue: z.TypeOf<TNewNext>;
1047
930
  zodClientSchema: TClientNext;
1048
931
  zodValidationSchema: TClientNext;
1049
932
  };
1050
933
  validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
1051
- sql: z.ZodString;
934
+ sql: z.ZodNumber;
1052
935
  initialState: TNewNext;
1053
936
  client: TClientNext;
1054
937
  }) => TValidationNext)) => {
1055
938
  config: {
1056
939
  sql: {
1057
- type: "varchar";
1058
- length: number;
940
+ type: "int";
941
+ pk: true;
1059
942
  };
1060
- zodSqlSchema: z.ZodString;
943
+ zodSqlSchema: z.ZodNumber;
1061
944
  zodNewSchema: TNewNext;
1062
945
  initialValue: z.TypeOf<TNewNext>;
1063
946
  zodClientSchema: TClientNext;
1064
947
  zodValidationSchema: TValidationNext;
1065
948
  };
1066
949
  transform: (transforms: {
1067
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
1068
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
1069
- }) => {
950
+ toClient: (dbValue: number) => z.TypeOf<TClientNext>;
951
+ toDb: (clientValue: z.TypeOf<TClientNext>) => number;
952
+ }) => {
1070
953
  config: {
1071
954
  sql: {
1072
- type: "varchar";
1073
- length: number;
955
+ type: "int";
956
+ pk: true;
1074
957
  };
1075
- zodSqlSchema: z.ZodString;
958
+ zodSqlSchema: z.ZodNumber;
1076
959
  zodNewSchema: TNewNext;
1077
960
  initialValue: z.TypeOf<TNewNext>;
1078
961
  zodClientSchema: TClientNext;
1079
962
  zodValidationSchema: TValidationNext;
1080
963
  } & {
1081
964
  transforms: {
1082
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
1083
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
965
+ toClient: (dbValue: number) => z.TypeOf<TClientNext>;
966
+ toDb: (clientValue: z.TypeOf<TClientNext>) => number;
1084
967
  };
1085
968
  };
1086
969
  };
1087
970
  };
1088
971
  transform: (transforms: {
1089
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
1090
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
972
+ toClient: (dbValue: number) => z.TypeOf<TClientNext>;
973
+ toDb: (clientValue: z.TypeOf<TClientNext>) => number;
1091
974
  }) => {
1092
975
  config: {
1093
976
  sql: {
1094
- type: "varchar";
1095
- length: number;
977
+ type: "int";
978
+ pk: true;
1096
979
  };
1097
- zodSqlSchema: z.ZodString;
980
+ zodSqlSchema: z.ZodNumber;
1098
981
  zodNewSchema: TNewNext;
1099
982
  initialValue: z.TypeOf<TNewNext>;
1100
983
  zodClientSchema: TClientNext;
1101
984
  zodValidationSchema: TClientNext;
1102
985
  } & {
1103
986
  transforms: {
1104
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
1105
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
987
+ toClient: (dbValue: number) => z.TypeOf<TClientNext>;
988
+ toDb: (clientValue: z.TypeOf<TClientNext>) => number;
1106
989
  };
1107
990
  };
1108
991
  };
1109
992
  };
1110
993
  transform: (transforms: {
1111
- toClient: (dbValue: string) => z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>;
1112
- toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>) => string;
994
+ toClient: (dbValue: number) => z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>;
995
+ toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>) => number;
1113
996
  }) => {
1114
997
  config: {
1115
998
  sql: {
1116
- type: "varchar";
1117
- length: number;
999
+ type: "int";
1000
+ pk: true;
1118
1001
  };
1119
- zodSqlSchema: z.ZodString;
1002
+ zodSqlSchema: z.ZodNumber;
1120
1003
  zodNewSchema: TNewNext;
1121
1004
  initialValue: z.TypeOf<TNewNext>;
1122
- zodClientSchema: z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>;
1123
- zodValidationSchema: z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>;
1005
+ zodClientSchema: z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>;
1006
+ zodValidationSchema: z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>;
1124
1007
  } & {
1125
1008
  transforms: {
1126
- toClient: (dbValue: string) => z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>;
1127
- toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>) => string;
1009
+ toClient: (dbValue: number) => z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>;
1010
+ toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>) => number;
1128
1011
  };
1129
1012
  };
1130
1013
  };
1131
1014
  };
1132
1015
  };
1133
- userId: {
1016
+ } | {
1017
+ config: {
1018
+ sql: {
1019
+ type: "text";
1020
+ };
1021
+ zodSqlSchema: z.ZodString;
1022
+ zodNewSchema: z.ZodString;
1023
+ initialValue: string;
1024
+ zodClientSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
1025
+ zodValidationSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
1026
+ } & {
1027
+ transforms: {
1028
+ toClient: (dbValue: string) => ("bald" | "fuzzy" | "fluffy" | "poof")[];
1029
+ toDb: (clientValue: ("bald" | "fuzzy" | "fluffy" | "poof")[]) => string;
1030
+ };
1031
+ };
1032
+ } | {
1033
+ config: {
1034
+ sql: {
1035
+ type: "int";
1036
+ };
1037
+ zodSqlSchema: z.ZodNumber;
1038
+ zodNewSchema: z.ZodNumber;
1039
+ initialValue: number;
1040
+ zodClientSchema: z.ZodBoolean;
1041
+ zodValidationSchema: z.ZodBoolean;
1042
+ } & {
1043
+ transforms: {
1044
+ toClient: (dbValue: number) => boolean;
1045
+ toDb: (clientValue: boolean) => number;
1046
+ };
1047
+ };
1048
+ };
1049
+ schema: {
1050
+ _tableName: string;
1051
+ id: {
1134
1052
  config: {
1135
1053
  sql: {
1136
1054
  type: "int";
1055
+ pk: true;
1137
1056
  };
1138
1057
  zodSqlSchema: z.ZodNumber;
1139
- zodNewSchema: z.ZodNumber;
1140
- initialValue: undefined;
1058
+ zodNewSchema: z.ZodString;
1059
+ initialValue: string;
1060
+ zodClientSchema: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
1061
+ zodValidationSchema: z.ZodString;
1062
+ } & {
1063
+ transforms: {
1064
+ toClient: (dbValue: number) => string | number;
1065
+ toDb: (clientValue: string | number) => number;
1066
+ };
1067
+ };
1068
+ };
1069
+ name: {
1070
+ config: {
1071
+ sql: {
1072
+ type: "varchar";
1073
+ length: number;
1074
+ };
1075
+ zodSqlSchema: z.ZodString;
1076
+ zodNewSchema: z.ZodString;
1077
+ initialValue: string;
1141
1078
  zodClientSchema: z.ZodString;
1142
1079
  zodValidationSchema: z.ZodString;
1143
1080
  };
1144
1081
  validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
1145
- sql: z.ZodNumber;
1146
- initialState: z.ZodNumber;
1082
+ sql: z.ZodString;
1083
+ initialState: z.ZodString;
1147
1084
  client: z.ZodString;
1148
1085
  }) => TValidationNext)) => {
1149
1086
  config: {
1150
1087
  sql: {
1151
- type: "int";
1088
+ type: "varchar";
1089
+ length: number;
1152
1090
  };
1153
- zodSqlSchema: z.ZodNumber;
1154
- zodNewSchema: z.ZodNumber;
1155
- initialValue: undefined;
1091
+ zodSqlSchema: z.ZodString;
1092
+ zodNewSchema: z.ZodString;
1093
+ initialValue: string;
1156
1094
  zodClientSchema: z.ZodString;
1157
1095
  zodValidationSchema: TValidationNext;
1158
1096
  };
1159
1097
  transform: (transforms: {
1160
- toClient: (dbValue: number) => string;
1161
- toDb: (clientValue: string) => number;
1098
+ toClient: (dbValue: string) => string;
1099
+ toDb: (clientValue: string) => string;
1162
1100
  }) => {
1163
1101
  config: {
1164
1102
  sql: {
1165
- type: "int";
1103
+ type: "varchar";
1104
+ length: number;
1166
1105
  };
1167
- zodSqlSchema: z.ZodNumber;
1168
- zodNewSchema: z.ZodNumber;
1169
- initialValue: undefined;
1106
+ zodSqlSchema: z.ZodString;
1107
+ zodNewSchema: z.ZodString;
1108
+ initialValue: string;
1170
1109
  zodClientSchema: z.ZodString;
1171
1110
  zodValidationSchema: TValidationNext;
1172
1111
  } & {
1173
1112
  transforms: {
1174
- toClient: (dbValue: number) => string;
1175
- toDb: (clientValue: string) => number;
1113
+ toClient: (dbValue: string) => string;
1114
+ toDb: (clientValue: string) => string;
1115
+ };
1116
+ };
1117
+ };
1118
+ };
1119
+ client: <TClientNext extends z.ZodTypeAny>(schema: TClientNext | ((tools: {
1120
+ sql: z.ZodString;
1121
+ initialState: z.ZodString;
1122
+ }) => TClientNext)) => {
1123
+ config: {
1124
+ sql: {
1125
+ type: "varchar";
1126
+ length: number;
1127
+ };
1128
+ zodSqlSchema: z.ZodString;
1129
+ zodNewSchema: z.ZodString;
1130
+ initialValue: string;
1131
+ zodClientSchema: TClientNext;
1132
+ zodValidationSchema: TClientNext;
1133
+ };
1134
+ validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
1135
+ sql: z.ZodString;
1136
+ initialState: z.ZodString;
1137
+ client: TClientNext;
1138
+ }) => TValidationNext)) => {
1139
+ config: {
1140
+ sql: {
1141
+ type: "varchar";
1142
+ length: number;
1143
+ };
1144
+ zodSqlSchema: z.ZodString;
1145
+ zodNewSchema: z.ZodString;
1146
+ initialValue: string;
1147
+ zodClientSchema: TClientNext;
1148
+ zodValidationSchema: TValidationNext;
1149
+ };
1150
+ transform: (transforms: {
1151
+ toClient: (dbValue: string) => z.TypeOf<TClientNext>;
1152
+ toDb: (clientValue: z.TypeOf<TClientNext>) => string;
1153
+ }) => {
1154
+ config: {
1155
+ sql: {
1156
+ type: "varchar";
1157
+ length: number;
1158
+ };
1159
+ zodSqlSchema: z.ZodString;
1160
+ zodNewSchema: z.ZodString;
1161
+ initialValue: string;
1162
+ zodClientSchema: TClientNext;
1163
+ zodValidationSchema: TValidationNext;
1164
+ } & {
1165
+ transforms: {
1166
+ toClient: (dbValue: string) => z.TypeOf<TClientNext>;
1167
+ toDb: (clientValue: z.TypeOf<TClientNext>) => string;
1168
+ };
1169
+ };
1170
+ };
1171
+ };
1172
+ transform: (transforms: {
1173
+ toClient: (dbValue: string) => z.TypeOf<TClientNext>;
1174
+ toDb: (clientValue: z.TypeOf<TClientNext>) => string;
1175
+ }) => {
1176
+ config: {
1177
+ sql: {
1178
+ type: "varchar";
1179
+ length: number;
1180
+ };
1181
+ zodSqlSchema: z.ZodString;
1182
+ zodNewSchema: z.ZodString;
1183
+ initialValue: string;
1184
+ zodClientSchema: TClientNext;
1185
+ zodValidationSchema: TClientNext;
1186
+ } & {
1187
+ transforms: {
1188
+ toClient: (dbValue: string) => z.TypeOf<TClientNext>;
1189
+ toDb: (clientValue: z.TypeOf<TClientNext>) => string;
1176
1190
  };
1177
1191
  };
1178
1192
  };
1179
1193
  };
1180
1194
  transform: (transforms: {
1181
- toClient: (dbValue: number) => string;
1182
- toDb: (clientValue: string) => number;
1195
+ toClient: (dbValue: string) => string;
1196
+ toDb: (clientValue: string) => string;
1183
1197
  }) => {
1184
1198
  config: {
1185
1199
  sql: {
1186
- type: "int";
1200
+ type: "varchar";
1201
+ length: number;
1187
1202
  };
1188
- zodSqlSchema: z.ZodNumber;
1189
- zodNewSchema: z.ZodNumber;
1190
- initialValue: undefined;
1203
+ zodSqlSchema: z.ZodString;
1204
+ zodNewSchema: z.ZodString;
1205
+ initialValue: string;
1191
1206
  zodClientSchema: z.ZodString;
1192
1207
  zodValidationSchema: z.ZodString;
1193
1208
  } & {
1194
1209
  transforms: {
1195
- toClient: (dbValue: number) => string;
1196
- toDb: (clientValue: string) => number;
1210
+ toClient: (dbValue: string) => string;
1211
+ toDb: (clientValue: string) => string;
1197
1212
  };
1198
1213
  };
1199
1214
  };
1200
- };
1201
- fluffynessScale: {
1202
- config: {
1203
- sql: {
1204
- type: "text";
1215
+ initialState: <TNewNext extends z.ZodTypeAny, TDefaultNext>(schema: TNewNext | ((tools: {
1216
+ sql: z.ZodString;
1217
+ }) => TNewNext), defaultValue: () => TDefaultNext) => {
1218
+ config: {
1219
+ sql: {
1220
+ type: "varchar";
1221
+ length: number;
1222
+ };
1223
+ zodSqlSchema: z.ZodString;
1224
+ zodNewSchema: TNewNext;
1225
+ initialValue: z.TypeOf<TNewNext>;
1226
+ zodClientSchema: z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>;
1227
+ zodValidationSchema: z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>;
1205
1228
  };
1206
- zodSqlSchema: z.ZodString;
1207
- zodNewSchema: z.ZodString;
1208
- initialValue: undefined;
1209
- zodClientSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
1210
- zodValidationSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
1211
- } & {
1212
- transforms: {
1213
- toClient: (dbValue: string) => ("bald" | "fuzzy" | "fluffy" | "poof")[];
1214
- toDb: (clientValue: ("bald" | "fuzzy" | "fluffy" | "poof")[]) => string;
1229
+ validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
1230
+ sql: z.ZodString;
1231
+ initialState: TNewNext;
1232
+ client: z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>;
1233
+ }) => TValidationNext)) => {
1234
+ config: {
1235
+ sql: {
1236
+ type: "varchar";
1237
+ length: number;
1238
+ };
1239
+ zodSqlSchema: z.ZodString;
1240
+ zodNewSchema: TNewNext;
1241
+ initialValue: z.TypeOf<TNewNext>;
1242
+ zodClientSchema: z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>;
1243
+ zodValidationSchema: TValidationNext;
1244
+ };
1245
+ transform: (transforms: {
1246
+ toClient: (dbValue: string) => z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>;
1247
+ toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>) => string;
1248
+ }) => {
1249
+ config: {
1250
+ sql: {
1251
+ type: "varchar";
1252
+ length: number;
1253
+ };
1254
+ zodSqlSchema: z.ZodString;
1255
+ zodNewSchema: TNewNext;
1256
+ initialValue: z.TypeOf<TNewNext>;
1257
+ zodClientSchema: z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>;
1258
+ zodValidationSchema: TValidationNext;
1259
+ } & {
1260
+ transforms: {
1261
+ toClient: (dbValue: string) => z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>;
1262
+ toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>) => string;
1263
+ };
1264
+ };
1265
+ };
1266
+ };
1267
+ client: <TClientNext extends z.ZodTypeAny>(schema: TClientNext | ((tools: {
1268
+ sql: z.ZodString;
1269
+ initialState: TNewNext;
1270
+ }) => TClientNext)) => {
1271
+ config: {
1272
+ sql: {
1273
+ type: "varchar";
1274
+ length: number;
1275
+ };
1276
+ zodSqlSchema: z.ZodString;
1277
+ zodNewSchema: TNewNext;
1278
+ initialValue: z.TypeOf<TNewNext>;
1279
+ zodClientSchema: TClientNext;
1280
+ zodValidationSchema: TClientNext;
1281
+ };
1282
+ validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
1283
+ sql: z.ZodString;
1284
+ initialState: TNewNext;
1285
+ client: TClientNext;
1286
+ }) => TValidationNext)) => {
1287
+ config: {
1288
+ sql: {
1289
+ type: "varchar";
1290
+ length: number;
1291
+ };
1292
+ zodSqlSchema: z.ZodString;
1293
+ zodNewSchema: TNewNext;
1294
+ initialValue: z.TypeOf<TNewNext>;
1295
+ zodClientSchema: TClientNext;
1296
+ zodValidationSchema: TValidationNext;
1297
+ };
1298
+ transform: (transforms: {
1299
+ toClient: (dbValue: string) => z.TypeOf<TClientNext>;
1300
+ toDb: (clientValue: z.TypeOf<TClientNext>) => string;
1301
+ }) => {
1302
+ config: {
1303
+ sql: {
1304
+ type: "varchar";
1305
+ length: number;
1306
+ };
1307
+ zodSqlSchema: z.ZodString;
1308
+ zodNewSchema: TNewNext;
1309
+ initialValue: z.TypeOf<TNewNext>;
1310
+ zodClientSchema: TClientNext;
1311
+ zodValidationSchema: TValidationNext;
1312
+ } & {
1313
+ transforms: {
1314
+ toClient: (dbValue: string) => z.TypeOf<TClientNext>;
1315
+ toDb: (clientValue: z.TypeOf<TClientNext>) => string;
1316
+ };
1317
+ };
1318
+ };
1319
+ };
1320
+ transform: (transforms: {
1321
+ toClient: (dbValue: string) => z.TypeOf<TClientNext>;
1322
+ toDb: (clientValue: z.TypeOf<TClientNext>) => string;
1323
+ }) => {
1324
+ config: {
1325
+ sql: {
1326
+ type: "varchar";
1327
+ length: number;
1328
+ };
1329
+ zodSqlSchema: z.ZodString;
1330
+ zodNewSchema: TNewNext;
1331
+ initialValue: z.TypeOf<TNewNext>;
1332
+ zodClientSchema: TClientNext;
1333
+ zodValidationSchema: TClientNext;
1334
+ } & {
1335
+ transforms: {
1336
+ toClient: (dbValue: string) => z.TypeOf<TClientNext>;
1337
+ toDb: (clientValue: z.TypeOf<TClientNext>) => string;
1338
+ };
1339
+ };
1340
+ };
1341
+ };
1342
+ transform: (transforms: {
1343
+ toClient: (dbValue: string) => z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>;
1344
+ toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>) => string;
1345
+ }) => {
1346
+ config: {
1347
+ sql: {
1348
+ type: "varchar";
1349
+ length: number;
1350
+ };
1351
+ zodSqlSchema: z.ZodString;
1352
+ zodNewSchema: TNewNext;
1353
+ initialValue: z.TypeOf<TNewNext>;
1354
+ zodClientSchema: z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>;
1355
+ zodValidationSchema: z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>;
1356
+ } & {
1357
+ transforms: {
1358
+ toClient: (dbValue: string) => z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>;
1359
+ toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>) => string;
1360
+ };
1361
+ };
1362
+ };
1363
+ };
1364
+ };
1365
+ userId: {
1366
+ field: z.ZodNumber;
1367
+ type: "reference";
1368
+ to: () => () => {
1369
+ config: {
1370
+ sql: {
1371
+ type: "int";
1372
+ pk: true;
1373
+ };
1374
+ zodSqlSchema: z.ZodNumber;
1375
+ zodNewSchema: z.ZodNumber;
1376
+ initialValue: number;
1377
+ zodClientSchema: z.ZodNumber;
1378
+ zodValidationSchema: z.ZodNumber;
1379
+ };
1380
+ validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
1381
+ sql: z.ZodNumber;
1382
+ initialState: z.ZodNumber;
1383
+ client: z.ZodNumber;
1384
+ }) => TValidationNext)) => {
1385
+ config: {
1386
+ sql: {
1387
+ type: "int";
1388
+ pk: true;
1389
+ };
1390
+ zodSqlSchema: z.ZodNumber;
1391
+ zodNewSchema: z.ZodNumber;
1392
+ initialValue: number;
1393
+ zodClientSchema: z.ZodNumber;
1394
+ zodValidationSchema: TValidationNext;
1395
+ };
1396
+ transform: (transforms: {
1397
+ toClient: (dbValue: number) => number;
1398
+ toDb: (clientValue: number) => number;
1399
+ }) => {
1400
+ config: {
1401
+ sql: {
1402
+ type: "int";
1403
+ pk: true;
1404
+ };
1405
+ zodSqlSchema: z.ZodNumber;
1406
+ zodNewSchema: z.ZodNumber;
1407
+ initialValue: number;
1408
+ zodClientSchema: z.ZodNumber;
1409
+ zodValidationSchema: TValidationNext;
1410
+ } & {
1411
+ transforms: {
1412
+ toClient: (dbValue: number) => number;
1413
+ toDb: (clientValue: number) => number;
1414
+ };
1415
+ };
1416
+ };
1417
+ };
1418
+ client: <TClientNext extends z.ZodTypeAny>(schema: TClientNext | ((tools: {
1419
+ sql: z.ZodNumber;
1420
+ initialState: z.ZodNumber;
1421
+ }) => TClientNext)) => {
1422
+ config: {
1423
+ sql: {
1424
+ type: "int";
1425
+ pk: true;
1426
+ };
1427
+ zodSqlSchema: z.ZodNumber;
1428
+ zodNewSchema: z.ZodNumber;
1429
+ initialValue: number;
1430
+ zodClientSchema: TClientNext;
1431
+ zodValidationSchema: TClientNext;
1432
+ };
1433
+ validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
1434
+ sql: z.ZodNumber;
1435
+ initialState: z.ZodNumber;
1436
+ client: TClientNext;
1437
+ }) => TValidationNext)) => {
1438
+ config: {
1439
+ sql: {
1440
+ type: "int";
1441
+ pk: true;
1442
+ };
1443
+ zodSqlSchema: z.ZodNumber;
1444
+ zodNewSchema: z.ZodNumber;
1445
+ initialValue: number;
1446
+ zodClientSchema: TClientNext;
1447
+ zodValidationSchema: TValidationNext;
1448
+ };
1449
+ transform: (transforms: {
1450
+ toClient: (dbValue: number) => z.TypeOf<TClientNext>;
1451
+ toDb: (clientValue: z.TypeOf<TClientNext>) => number;
1452
+ }) => {
1453
+ config: {
1454
+ sql: {
1455
+ type: "int";
1456
+ pk: true;
1457
+ };
1458
+ zodSqlSchema: z.ZodNumber;
1459
+ zodNewSchema: z.ZodNumber;
1460
+ initialValue: number;
1461
+ zodClientSchema: TClientNext;
1462
+ zodValidationSchema: TValidationNext;
1463
+ } & {
1464
+ transforms: {
1465
+ toClient: (dbValue: number) => z.TypeOf<TClientNext>;
1466
+ toDb: (clientValue: z.TypeOf<TClientNext>) => number;
1467
+ };
1468
+ };
1469
+ };
1470
+ };
1471
+ transform: (transforms: {
1472
+ toClient: (dbValue: number) => z.TypeOf<TClientNext>;
1473
+ toDb: (clientValue: z.TypeOf<TClientNext>) => number;
1474
+ }) => {
1475
+ config: {
1476
+ sql: {
1477
+ type: "int";
1478
+ pk: true;
1479
+ };
1480
+ zodSqlSchema: z.ZodNumber;
1481
+ zodNewSchema: z.ZodNumber;
1482
+ initialValue: number;
1483
+ zodClientSchema: TClientNext;
1484
+ zodValidationSchema: TClientNext;
1485
+ } & {
1486
+ transforms: {
1487
+ toClient: (dbValue: number) => z.TypeOf<TClientNext>;
1488
+ toDb: (clientValue: z.TypeOf<TClientNext>) => number;
1489
+ };
1490
+ };
1491
+ };
1492
+ };
1493
+ transform: (transforms: {
1494
+ toClient: (dbValue: number) => number;
1495
+ toDb: (clientValue: number) => number;
1496
+ }) => {
1497
+ config: {
1498
+ sql: {
1499
+ type: "int";
1500
+ pk: true;
1501
+ };
1502
+ zodSqlSchema: z.ZodNumber;
1503
+ zodNewSchema: z.ZodNumber;
1504
+ initialValue: number;
1505
+ zodClientSchema: z.ZodNumber;
1506
+ zodValidationSchema: z.ZodNumber;
1507
+ } & {
1508
+ transforms: {
1509
+ toClient: (dbValue: number) => number;
1510
+ toDb: (clientValue: number) => number;
1511
+ };
1512
+ };
1513
+ };
1514
+ initialState: <TNewNext extends z.ZodTypeAny, TDefaultNext>(schema: TNewNext | ((tools: {
1515
+ sql: z.ZodNumber;
1516
+ }) => TNewNext), defaultValue: () => TDefaultNext) => {
1517
+ config: {
1518
+ sql: {
1519
+ type: "int";
1520
+ pk: true;
1521
+ };
1522
+ zodSqlSchema: z.ZodNumber;
1523
+ zodNewSchema: TNewNext;
1524
+ initialValue: z.TypeOf<TNewNext>;
1525
+ zodClientSchema: z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>;
1526
+ zodValidationSchema: z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>;
1527
+ };
1528
+ validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
1529
+ sql: z.ZodNumber;
1530
+ initialState: TNewNext;
1531
+ client: z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>;
1532
+ }) => TValidationNext)) => {
1533
+ config: {
1534
+ sql: {
1535
+ type: "int";
1536
+ pk: true;
1537
+ };
1538
+ zodSqlSchema: z.ZodNumber;
1539
+ zodNewSchema: TNewNext;
1540
+ initialValue: z.TypeOf<TNewNext>;
1541
+ zodClientSchema: z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>;
1542
+ zodValidationSchema: TValidationNext;
1543
+ };
1544
+ transform: (transforms: {
1545
+ toClient: (dbValue: number) => z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>;
1546
+ toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>) => number;
1547
+ }) => {
1548
+ config: {
1549
+ sql: {
1550
+ type: "int";
1551
+ pk: true;
1552
+ };
1553
+ zodSqlSchema: z.ZodNumber;
1554
+ zodNewSchema: TNewNext;
1555
+ initialValue: z.TypeOf<TNewNext>;
1556
+ zodClientSchema: z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>;
1557
+ zodValidationSchema: TValidationNext;
1558
+ } & {
1559
+ transforms: {
1560
+ toClient: (dbValue: number) => z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>;
1561
+ toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>) => number;
1562
+ };
1563
+ };
1564
+ };
1565
+ };
1566
+ client: <TClientNext extends z.ZodTypeAny>(schema: TClientNext | ((tools: {
1567
+ sql: z.ZodNumber;
1568
+ initialState: TNewNext;
1569
+ }) => TClientNext)) => {
1570
+ config: {
1571
+ sql: {
1572
+ type: "int";
1573
+ pk: true;
1574
+ };
1575
+ zodSqlSchema: z.ZodNumber;
1576
+ zodNewSchema: TNewNext;
1577
+ initialValue: z.TypeOf<TNewNext>;
1578
+ zodClientSchema: TClientNext;
1579
+ zodValidationSchema: TClientNext;
1580
+ };
1581
+ validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
1582
+ sql: z.ZodNumber;
1583
+ initialState: TNewNext;
1584
+ client: TClientNext;
1585
+ }) => TValidationNext)) => {
1586
+ config: {
1587
+ sql: {
1588
+ type: "int";
1589
+ pk: true;
1590
+ };
1591
+ zodSqlSchema: z.ZodNumber;
1592
+ zodNewSchema: TNewNext;
1593
+ initialValue: z.TypeOf<TNewNext>;
1594
+ zodClientSchema: TClientNext;
1595
+ zodValidationSchema: TValidationNext;
1596
+ };
1597
+ transform: (transforms: {
1598
+ toClient: (dbValue: number) => z.TypeOf<TClientNext>;
1599
+ toDb: (clientValue: z.TypeOf<TClientNext>) => number;
1600
+ }) => {
1601
+ config: {
1602
+ sql: {
1603
+ type: "int";
1604
+ pk: true;
1605
+ };
1606
+ zodSqlSchema: z.ZodNumber;
1607
+ zodNewSchema: TNewNext;
1608
+ initialValue: z.TypeOf<TNewNext>;
1609
+ zodClientSchema: TClientNext;
1610
+ zodValidationSchema: TValidationNext;
1611
+ } & {
1612
+ transforms: {
1613
+ toClient: (dbValue: number) => z.TypeOf<TClientNext>;
1614
+ toDb: (clientValue: z.TypeOf<TClientNext>) => number;
1615
+ };
1616
+ };
1617
+ };
1618
+ };
1619
+ transform: (transforms: {
1620
+ toClient: (dbValue: number) => z.TypeOf<TClientNext>;
1621
+ toDb: (clientValue: z.TypeOf<TClientNext>) => number;
1622
+ }) => {
1623
+ config: {
1624
+ sql: {
1625
+ type: "int";
1626
+ pk: true;
1627
+ };
1628
+ zodSqlSchema: z.ZodNumber;
1629
+ zodNewSchema: TNewNext;
1630
+ initialValue: z.TypeOf<TNewNext>;
1631
+ zodClientSchema: TClientNext;
1632
+ zodValidationSchema: TClientNext;
1633
+ } & {
1634
+ transforms: {
1635
+ toClient: (dbValue: number) => z.TypeOf<TClientNext>;
1636
+ toDb: (clientValue: z.TypeOf<TClientNext>) => number;
1637
+ };
1638
+ };
1639
+ };
1640
+ };
1641
+ transform: (transforms: {
1642
+ toClient: (dbValue: number) => z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>;
1643
+ toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>) => number;
1644
+ }) => {
1645
+ config: {
1646
+ sql: {
1647
+ type: "int";
1648
+ pk: true;
1649
+ };
1650
+ zodSqlSchema: z.ZodNumber;
1651
+ zodNewSchema: TNewNext;
1652
+ initialValue: z.TypeOf<TNewNext>;
1653
+ zodClientSchema: z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>;
1654
+ zodValidationSchema: z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>;
1655
+ } & {
1656
+ transforms: {
1657
+ toClient: (dbValue: number) => z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>;
1658
+ toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>) => number;
1659
+ };
1660
+ };
1661
+ };
1662
+ };
1663
+ };
1664
+ };
1665
+ fluffynessScale: {
1666
+ config: {
1667
+ sql: {
1668
+ type: "text";
1669
+ };
1670
+ zodSqlSchema: z.ZodString;
1671
+ zodNewSchema: z.ZodString;
1672
+ initialValue: string;
1673
+ zodClientSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
1674
+ zodValidationSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
1675
+ } & {
1676
+ transforms: {
1677
+ toClient: (dbValue: string) => ("bald" | "fuzzy" | "fluffy" | "poof")[];
1678
+ toDb: (clientValue: ("bald" | "fuzzy" | "fluffy" | "poof")[]) => string;
1215
1679
  };
1216
1680
  };
1217
1681
  };
@@ -1222,7 +1686,7 @@ export declare const userSchema: {
1222
1686
  };
1223
1687
  zodSqlSchema: z.ZodNumber;
1224
1688
  zodNewSchema: z.ZodNumber;
1225
- initialValue: undefined;
1689
+ initialValue: number;
1226
1690
  zodClientSchema: z.ZodBoolean;
1227
1691
  zodValidationSchema: z.ZodBoolean;
1228
1692
  } & {
@@ -1264,7 +1728,7 @@ export declare const petSchema: {
1264
1728
  };
1265
1729
  zodSqlSchema: z.ZodString;
1266
1730
  zodNewSchema: z.ZodString;
1267
- initialValue: undefined;
1731
+ initialValue: string;
1268
1732
  zodClientSchema: z.ZodString;
1269
1733
  zodValidationSchema: z.ZodString;
1270
1734
  };
@@ -1280,7 +1744,7 @@ export declare const petSchema: {
1280
1744
  };
1281
1745
  zodSqlSchema: z.ZodString;
1282
1746
  zodNewSchema: z.ZodString;
1283
- initialValue: undefined;
1747
+ initialValue: string;
1284
1748
  zodClientSchema: z.ZodString;
1285
1749
  zodValidationSchema: TValidationNext;
1286
1750
  };
@@ -1295,7 +1759,7 @@ export declare const petSchema: {
1295
1759
  };
1296
1760
  zodSqlSchema: z.ZodString;
1297
1761
  zodNewSchema: z.ZodString;
1298
- initialValue: undefined;
1762
+ initialValue: string;
1299
1763
  zodClientSchema: z.ZodString;
1300
1764
  zodValidationSchema: TValidationNext;
1301
1765
  } & {
@@ -1317,7 +1781,7 @@ export declare const petSchema: {
1317
1781
  };
1318
1782
  zodSqlSchema: z.ZodString;
1319
1783
  zodNewSchema: z.ZodString;
1320
- initialValue: undefined;
1784
+ initialValue: string;
1321
1785
  zodClientSchema: TClientNext;
1322
1786
  zodValidationSchema: TClientNext;
1323
1787
  };
@@ -1333,7 +1797,7 @@ export declare const petSchema: {
1333
1797
  };
1334
1798
  zodSqlSchema: z.ZodString;
1335
1799
  zodNewSchema: z.ZodString;
1336
- initialValue: undefined;
1800
+ initialValue: string;
1337
1801
  zodClientSchema: TClientNext;
1338
1802
  zodValidationSchema: TValidationNext;
1339
1803
  };
@@ -1348,7 +1812,7 @@ export declare const petSchema: {
1348
1812
  };
1349
1813
  zodSqlSchema: z.ZodString;
1350
1814
  zodNewSchema: z.ZodString;
1351
- initialValue: undefined;
1815
+ initialValue: string;
1352
1816
  zodClientSchema: TClientNext;
1353
1817
  zodValidationSchema: TValidationNext;
1354
1818
  } & {
@@ -1370,7 +1834,7 @@ export declare const petSchema: {
1370
1834
  };
1371
1835
  zodSqlSchema: z.ZodString;
1372
1836
  zodNewSchema: z.ZodString;
1373
- initialValue: undefined;
1837
+ initialValue: string;
1374
1838
  zodClientSchema: TClientNext;
1375
1839
  zodValidationSchema: TClientNext;
1376
1840
  } & {
@@ -1392,7 +1856,7 @@ export declare const petSchema: {
1392
1856
  };
1393
1857
  zodSqlSchema: z.ZodString;
1394
1858
  zodNewSchema: z.ZodString;
1395
- initialValue: undefined;
1859
+ initialValue: string;
1396
1860
  zodClientSchema: z.ZodString;
1397
1861
  zodValidationSchema: z.ZodString;
1398
1862
  } & {
@@ -1455,167 +1919,399 @@ export declare const petSchema: {
1455
1919
  };
1456
1920
  };
1457
1921
  client: <TClientNext extends z.ZodTypeAny>(schema: TClientNext | ((tools: {
1458
- sql: z.ZodString;
1459
- initialState: TNewNext;
1922
+ sql: z.ZodString;
1923
+ initialState: TNewNext;
1924
+ }) => TClientNext)) => {
1925
+ config: {
1926
+ sql: {
1927
+ type: "varchar";
1928
+ length: number;
1929
+ };
1930
+ zodSqlSchema: z.ZodString;
1931
+ zodNewSchema: TNewNext;
1932
+ initialValue: z.TypeOf<TNewNext>;
1933
+ zodClientSchema: TClientNext;
1934
+ zodValidationSchema: TClientNext;
1935
+ };
1936
+ validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
1937
+ sql: z.ZodString;
1938
+ initialState: TNewNext;
1939
+ client: TClientNext;
1940
+ }) => TValidationNext)) => {
1941
+ config: {
1942
+ sql: {
1943
+ type: "varchar";
1944
+ length: number;
1945
+ };
1946
+ zodSqlSchema: z.ZodString;
1947
+ zodNewSchema: TNewNext;
1948
+ initialValue: z.TypeOf<TNewNext>;
1949
+ zodClientSchema: TClientNext;
1950
+ zodValidationSchema: TValidationNext;
1951
+ };
1952
+ transform: (transforms: {
1953
+ toClient: (dbValue: string) => z.TypeOf<TClientNext>;
1954
+ toDb: (clientValue: z.TypeOf<TClientNext>) => string;
1955
+ }) => {
1956
+ config: {
1957
+ sql: {
1958
+ type: "varchar";
1959
+ length: number;
1960
+ };
1961
+ zodSqlSchema: z.ZodString;
1962
+ zodNewSchema: TNewNext;
1963
+ initialValue: z.TypeOf<TNewNext>;
1964
+ zodClientSchema: TClientNext;
1965
+ zodValidationSchema: TValidationNext;
1966
+ } & {
1967
+ transforms: {
1968
+ toClient: (dbValue: string) => z.TypeOf<TClientNext>;
1969
+ toDb: (clientValue: z.TypeOf<TClientNext>) => string;
1970
+ };
1971
+ };
1972
+ };
1973
+ };
1974
+ transform: (transforms: {
1975
+ toClient: (dbValue: string) => z.TypeOf<TClientNext>;
1976
+ toDb: (clientValue: z.TypeOf<TClientNext>) => string;
1977
+ }) => {
1978
+ config: {
1979
+ sql: {
1980
+ type: "varchar";
1981
+ length: number;
1982
+ };
1983
+ zodSqlSchema: z.ZodString;
1984
+ zodNewSchema: TNewNext;
1985
+ initialValue: z.TypeOf<TNewNext>;
1986
+ zodClientSchema: TClientNext;
1987
+ zodValidationSchema: TClientNext;
1988
+ } & {
1989
+ transforms: {
1990
+ toClient: (dbValue: string) => z.TypeOf<TClientNext>;
1991
+ toDb: (clientValue: z.TypeOf<TClientNext>) => string;
1992
+ };
1993
+ };
1994
+ };
1995
+ };
1996
+ transform: (transforms: {
1997
+ toClient: (dbValue: string) => z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>;
1998
+ toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>) => string;
1999
+ }) => {
2000
+ config: {
2001
+ sql: {
2002
+ type: "varchar";
2003
+ length: number;
2004
+ };
2005
+ zodSqlSchema: z.ZodString;
2006
+ zodNewSchema: TNewNext;
2007
+ initialValue: z.TypeOf<TNewNext>;
2008
+ zodClientSchema: z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>;
2009
+ zodValidationSchema: z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>;
2010
+ } & {
2011
+ transforms: {
2012
+ toClient: (dbValue: string) => z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>;
2013
+ toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>) => string;
2014
+ };
2015
+ };
2016
+ };
2017
+ };
2018
+ };
2019
+ userId: {
2020
+ field: z.ZodNumber;
2021
+ type: "reference";
2022
+ to: () => () => {
2023
+ config: {
2024
+ sql: {
2025
+ type: "int";
2026
+ pk: true;
2027
+ };
2028
+ zodSqlSchema: z.ZodNumber;
2029
+ zodNewSchema: z.ZodNumber;
2030
+ initialValue: number;
2031
+ zodClientSchema: z.ZodNumber;
2032
+ zodValidationSchema: z.ZodNumber;
2033
+ };
2034
+ validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
2035
+ sql: z.ZodNumber;
2036
+ initialState: z.ZodNumber;
2037
+ client: z.ZodNumber;
2038
+ }) => TValidationNext)) => {
2039
+ config: {
2040
+ sql: {
2041
+ type: "int";
2042
+ pk: true;
2043
+ };
2044
+ zodSqlSchema: z.ZodNumber;
2045
+ zodNewSchema: z.ZodNumber;
2046
+ initialValue: number;
2047
+ zodClientSchema: z.ZodNumber;
2048
+ zodValidationSchema: TValidationNext;
2049
+ };
2050
+ transform: (transforms: {
2051
+ toClient: (dbValue: number) => number;
2052
+ toDb: (clientValue: number) => number;
2053
+ }) => {
2054
+ config: {
2055
+ sql: {
2056
+ type: "int";
2057
+ pk: true;
2058
+ };
2059
+ zodSqlSchema: z.ZodNumber;
2060
+ zodNewSchema: z.ZodNumber;
2061
+ initialValue: number;
2062
+ zodClientSchema: z.ZodNumber;
2063
+ zodValidationSchema: TValidationNext;
2064
+ } & {
2065
+ transforms: {
2066
+ toClient: (dbValue: number) => number;
2067
+ toDb: (clientValue: number) => number;
2068
+ };
2069
+ };
2070
+ };
2071
+ };
2072
+ client: <TClientNext extends z.ZodTypeAny>(schema: TClientNext | ((tools: {
2073
+ sql: z.ZodNumber;
2074
+ initialState: z.ZodNumber;
1460
2075
  }) => TClientNext)) => {
1461
2076
  config: {
1462
2077
  sql: {
1463
- type: "varchar";
1464
- length: number;
2078
+ type: "int";
2079
+ pk: true;
1465
2080
  };
1466
- zodSqlSchema: z.ZodString;
1467
- zodNewSchema: TNewNext;
1468
- initialValue: z.TypeOf<TNewNext>;
2081
+ zodSqlSchema: z.ZodNumber;
2082
+ zodNewSchema: z.ZodNumber;
2083
+ initialValue: number;
1469
2084
  zodClientSchema: TClientNext;
1470
2085
  zodValidationSchema: TClientNext;
1471
2086
  };
1472
2087
  validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
1473
- sql: z.ZodString;
1474
- initialState: TNewNext;
2088
+ sql: z.ZodNumber;
2089
+ initialState: z.ZodNumber;
1475
2090
  client: TClientNext;
1476
2091
  }) => TValidationNext)) => {
1477
2092
  config: {
1478
2093
  sql: {
1479
- type: "varchar";
1480
- length: number;
2094
+ type: "int";
2095
+ pk: true;
1481
2096
  };
1482
- zodSqlSchema: z.ZodString;
1483
- zodNewSchema: TNewNext;
1484
- initialValue: z.TypeOf<TNewNext>;
2097
+ zodSqlSchema: z.ZodNumber;
2098
+ zodNewSchema: z.ZodNumber;
2099
+ initialValue: number;
1485
2100
  zodClientSchema: TClientNext;
1486
2101
  zodValidationSchema: TValidationNext;
1487
2102
  };
1488
2103
  transform: (transforms: {
1489
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
1490
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
2104
+ toClient: (dbValue: number) => z.TypeOf<TClientNext>;
2105
+ toDb: (clientValue: z.TypeOf<TClientNext>) => number;
1491
2106
  }) => {
1492
2107
  config: {
1493
2108
  sql: {
1494
- type: "varchar";
1495
- length: number;
2109
+ type: "int";
2110
+ pk: true;
1496
2111
  };
1497
- zodSqlSchema: z.ZodString;
1498
- zodNewSchema: TNewNext;
1499
- initialValue: z.TypeOf<TNewNext>;
2112
+ zodSqlSchema: z.ZodNumber;
2113
+ zodNewSchema: z.ZodNumber;
2114
+ initialValue: number;
1500
2115
  zodClientSchema: TClientNext;
1501
2116
  zodValidationSchema: TValidationNext;
1502
2117
  } & {
1503
2118
  transforms: {
1504
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
1505
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
2119
+ toClient: (dbValue: number) => z.TypeOf<TClientNext>;
2120
+ toDb: (clientValue: z.TypeOf<TClientNext>) => number;
1506
2121
  };
1507
2122
  };
1508
2123
  };
1509
2124
  };
1510
2125
  transform: (transforms: {
1511
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
1512
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
2126
+ toClient: (dbValue: number) => z.TypeOf<TClientNext>;
2127
+ toDb: (clientValue: z.TypeOf<TClientNext>) => number;
1513
2128
  }) => {
1514
2129
  config: {
1515
2130
  sql: {
1516
- type: "varchar";
1517
- length: number;
2131
+ type: "int";
2132
+ pk: true;
1518
2133
  };
1519
- zodSqlSchema: z.ZodString;
1520
- zodNewSchema: TNewNext;
1521
- initialValue: z.TypeOf<TNewNext>;
2134
+ zodSqlSchema: z.ZodNumber;
2135
+ zodNewSchema: z.ZodNumber;
2136
+ initialValue: number;
1522
2137
  zodClientSchema: TClientNext;
1523
2138
  zodValidationSchema: TClientNext;
1524
2139
  } & {
1525
2140
  transforms: {
1526
- toClient: (dbValue: string) => z.TypeOf<TClientNext>;
1527
- toDb: (clientValue: z.TypeOf<TClientNext>) => string;
2141
+ toClient: (dbValue: number) => z.TypeOf<TClientNext>;
2142
+ toDb: (clientValue: z.TypeOf<TClientNext>) => number;
1528
2143
  };
1529
2144
  };
1530
2145
  };
1531
2146
  };
1532
2147
  transform: (transforms: {
1533
- toClient: (dbValue: string) => z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>;
1534
- toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>) => string;
2148
+ toClient: (dbValue: number) => number;
2149
+ toDb: (clientValue: number) => number;
1535
2150
  }) => {
1536
2151
  config: {
1537
2152
  sql: {
1538
- type: "varchar";
1539
- length: number;
2153
+ type: "int";
2154
+ pk: true;
1540
2155
  };
1541
- zodSqlSchema: z.ZodString;
1542
- zodNewSchema: TNewNext;
1543
- initialValue: z.TypeOf<TNewNext>;
1544
- zodClientSchema: z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>;
1545
- zodValidationSchema: z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>;
2156
+ zodSqlSchema: z.ZodNumber;
2157
+ zodNewSchema: z.ZodNumber;
2158
+ initialValue: number;
2159
+ zodClientSchema: z.ZodNumber;
2160
+ zodValidationSchema: z.ZodNumber;
1546
2161
  } & {
1547
2162
  transforms: {
1548
- toClient: (dbValue: string) => z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>;
1549
- toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends string ? TNewNext : z.ZodUnion<[z.ZodString, TNewNext]>>) => string;
2163
+ toClient: (dbValue: number) => number;
2164
+ toDb: (clientValue: number) => number;
1550
2165
  };
1551
2166
  };
1552
2167
  };
1553
- };
1554
- };
1555
- userId: {
1556
- config: {
1557
- sql: {
1558
- type: "int";
1559
- };
1560
- zodSqlSchema: z.ZodNumber;
1561
- zodNewSchema: z.ZodNumber;
1562
- initialValue: undefined;
1563
- zodClientSchema: z.ZodString;
1564
- zodValidationSchema: z.ZodString;
1565
- };
1566
- validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
1567
- sql: z.ZodNumber;
1568
- initialState: z.ZodNumber;
1569
- client: z.ZodString;
1570
- }) => TValidationNext)) => {
1571
- config: {
1572
- sql: {
1573
- type: "int";
1574
- };
1575
- zodSqlSchema: z.ZodNumber;
1576
- zodNewSchema: z.ZodNumber;
1577
- initialValue: undefined;
1578
- zodClientSchema: z.ZodString;
1579
- zodValidationSchema: TValidationNext;
1580
- };
1581
- transform: (transforms: {
1582
- toClient: (dbValue: number) => string;
1583
- toDb: (clientValue: string) => number;
1584
- }) => {
2168
+ initialState: <TNewNext extends z.ZodTypeAny, TDefaultNext>(schema: TNewNext | ((tools: {
2169
+ sql: z.ZodNumber;
2170
+ }) => TNewNext), defaultValue: () => TDefaultNext) => {
1585
2171
  config: {
1586
2172
  sql: {
1587
2173
  type: "int";
2174
+ pk: true;
1588
2175
  };
1589
2176
  zodSqlSchema: z.ZodNumber;
1590
- zodNewSchema: z.ZodNumber;
1591
- initialValue: undefined;
1592
- zodClientSchema: z.ZodString;
1593
- zodValidationSchema: TValidationNext;
1594
- } & {
1595
- transforms: {
1596
- toClient: (dbValue: number) => string;
1597
- toDb: (clientValue: string) => number;
2177
+ zodNewSchema: TNewNext;
2178
+ initialValue: z.TypeOf<TNewNext>;
2179
+ zodClientSchema: z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>;
2180
+ zodValidationSchema: z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>;
2181
+ };
2182
+ validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
2183
+ sql: z.ZodNumber;
2184
+ initialState: TNewNext;
2185
+ client: z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>;
2186
+ }) => TValidationNext)) => {
2187
+ config: {
2188
+ sql: {
2189
+ type: "int";
2190
+ pk: true;
2191
+ };
2192
+ zodSqlSchema: z.ZodNumber;
2193
+ zodNewSchema: TNewNext;
2194
+ initialValue: z.TypeOf<TNewNext>;
2195
+ zodClientSchema: z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>;
2196
+ zodValidationSchema: TValidationNext;
2197
+ };
2198
+ transform: (transforms: {
2199
+ toClient: (dbValue: number) => z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>;
2200
+ toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>) => number;
2201
+ }) => {
2202
+ config: {
2203
+ sql: {
2204
+ type: "int";
2205
+ pk: true;
2206
+ };
2207
+ zodSqlSchema: z.ZodNumber;
2208
+ zodNewSchema: TNewNext;
2209
+ initialValue: z.TypeOf<TNewNext>;
2210
+ zodClientSchema: z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>;
2211
+ zodValidationSchema: TValidationNext;
2212
+ } & {
2213
+ transforms: {
2214
+ toClient: (dbValue: number) => z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>;
2215
+ toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>) => number;
2216
+ };
2217
+ };
1598
2218
  };
1599
2219
  };
1600
- };
1601
- };
1602
- transform: (transforms: {
1603
- toClient: (dbValue: number) => string;
1604
- toDb: (clientValue: string) => number;
1605
- }) => {
1606
- config: {
1607
- sql: {
1608
- type: "int";
2220
+ client: <TClientNext extends z.ZodTypeAny>(schema: TClientNext | ((tools: {
2221
+ sql: z.ZodNumber;
2222
+ initialState: TNewNext;
2223
+ }) => TClientNext)) => {
2224
+ config: {
2225
+ sql: {
2226
+ type: "int";
2227
+ pk: true;
2228
+ };
2229
+ zodSqlSchema: z.ZodNumber;
2230
+ zodNewSchema: TNewNext;
2231
+ initialValue: z.TypeOf<TNewNext>;
2232
+ zodClientSchema: TClientNext;
2233
+ zodValidationSchema: TClientNext;
2234
+ };
2235
+ validation: <TValidationNext extends z.ZodTypeAny>(schema: TValidationNext | ((tools: {
2236
+ sql: z.ZodNumber;
2237
+ initialState: TNewNext;
2238
+ client: TClientNext;
2239
+ }) => TValidationNext)) => {
2240
+ config: {
2241
+ sql: {
2242
+ type: "int";
2243
+ pk: true;
2244
+ };
2245
+ zodSqlSchema: z.ZodNumber;
2246
+ zodNewSchema: TNewNext;
2247
+ initialValue: z.TypeOf<TNewNext>;
2248
+ zodClientSchema: TClientNext;
2249
+ zodValidationSchema: TValidationNext;
2250
+ };
2251
+ transform: (transforms: {
2252
+ toClient: (dbValue: number) => z.TypeOf<TClientNext>;
2253
+ toDb: (clientValue: z.TypeOf<TClientNext>) => number;
2254
+ }) => {
2255
+ config: {
2256
+ sql: {
2257
+ type: "int";
2258
+ pk: true;
2259
+ };
2260
+ zodSqlSchema: z.ZodNumber;
2261
+ zodNewSchema: TNewNext;
2262
+ initialValue: z.TypeOf<TNewNext>;
2263
+ zodClientSchema: TClientNext;
2264
+ zodValidationSchema: TValidationNext;
2265
+ } & {
2266
+ transforms: {
2267
+ toClient: (dbValue: number) => z.TypeOf<TClientNext>;
2268
+ toDb: (clientValue: z.TypeOf<TClientNext>) => number;
2269
+ };
2270
+ };
2271
+ };
2272
+ };
2273
+ transform: (transforms: {
2274
+ toClient: (dbValue: number) => z.TypeOf<TClientNext>;
2275
+ toDb: (clientValue: z.TypeOf<TClientNext>) => number;
2276
+ }) => {
2277
+ config: {
2278
+ sql: {
2279
+ type: "int";
2280
+ pk: true;
2281
+ };
2282
+ zodSqlSchema: z.ZodNumber;
2283
+ zodNewSchema: TNewNext;
2284
+ initialValue: z.TypeOf<TNewNext>;
2285
+ zodClientSchema: TClientNext;
2286
+ zodValidationSchema: TClientNext;
2287
+ } & {
2288
+ transforms: {
2289
+ toClient: (dbValue: number) => z.TypeOf<TClientNext>;
2290
+ toDb: (clientValue: z.TypeOf<TClientNext>) => number;
2291
+ };
2292
+ };
2293
+ };
1609
2294
  };
1610
- zodSqlSchema: z.ZodNumber;
1611
- zodNewSchema: z.ZodNumber;
1612
- initialValue: undefined;
1613
- zodClientSchema: z.ZodString;
1614
- zodValidationSchema: z.ZodString;
1615
- } & {
1616
- transforms: {
1617
- toClient: (dbValue: number) => string;
1618
- toDb: (clientValue: string) => number;
2295
+ transform: (transforms: {
2296
+ toClient: (dbValue: number) => z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>;
2297
+ toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>) => number;
2298
+ }) => {
2299
+ config: {
2300
+ sql: {
2301
+ type: "int";
2302
+ pk: true;
2303
+ };
2304
+ zodSqlSchema: z.ZodNumber;
2305
+ zodNewSchema: TNewNext;
2306
+ initialValue: z.TypeOf<TNewNext>;
2307
+ zodClientSchema: z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>;
2308
+ zodValidationSchema: z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>;
2309
+ } & {
2310
+ transforms: {
2311
+ toClient: (dbValue: number) => z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>;
2312
+ toDb: (clientValue: z.TypeOf<z.TypeOf<TNewNext> extends number ? TNewNext : z.ZodUnion<[z.ZodNumber, TNewNext]>>) => number;
2313
+ };
2314
+ };
1619
2315
  };
1620
2316
  };
1621
2317
  };
@@ -1627,7 +2323,7 @@ export declare const petSchema: {
1627
2323
  };
1628
2324
  zodSqlSchema: z.ZodString;
1629
2325
  zodNewSchema: z.ZodString;
1630
- initialValue: undefined;
2326
+ initialValue: string;
1631
2327
  zodClientSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
1632
2328
  zodValidationSchema: z.ZodArray<z.ZodEnum<["bald", "fuzzy", "fluffy", "poof"]>, "many">;
1633
2329
  } & {
@@ -1644,7 +2340,7 @@ export declare const petSchema: {
1644
2340
  };
1645
2341
  zodSqlSchema: z.ZodNumber;
1646
2342
  zodNewSchema: z.ZodNumber;
1647
- initialValue: undefined;
2343
+ initialValue: number;
1648
2344
  zodClientSchema: z.ZodBoolean;
1649
2345
  zodValidationSchema: z.ZodBoolean;
1650
2346
  } & {