@nyig/models 0.6.1 → 0.6.3

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.
Files changed (5) hide show
  1. package/index.d.mts +623 -736
  2. package/index.d.ts +623 -736
  3. package/index.js +41 -57
  4. package/index.mjs +41 -55
  5. package/package.json +1 -1
package/index.js CHANGED
@@ -69,7 +69,6 @@ __export(index_exports, {
69
69
  zCourseTable: () => zCourseTable,
70
70
  zCreateAdminAccountRequest: () => zCreateAdminAccountRequest,
71
71
  zDayOfWeek: () => zDayOfWeek,
72
- zDetailsTable: () => zDetailsTable,
73
72
  zDiscount: () => zDiscount,
74
73
  zEventConfig: () => zEventConfig,
75
74
  zEventConfigResponse: () => zEventConfigResponse,
@@ -93,7 +92,6 @@ __export(index_exports, {
93
92
  zReportTicket: () => zReportTicket,
94
93
  zReportTicketResponse: () => zReportTicketResponse,
95
94
  zScheduleData: () => zScheduleData,
96
- zScheduleTable: () => zScheduleTable,
97
95
  zSemester: () => zSemester,
98
96
  zStudent: () => zStudent,
99
97
  zTeacher: () => zTeacher,
@@ -283,16 +281,16 @@ var zUserRoles = import_zod5.z.object({
283
281
  // src/interface/user/userProfile.ts
284
282
  var import_zod6 = require("zod");
285
283
  var zBUserProfile = import_zod6.z.object({
286
- firstName: import_zod6.z.string().min(2).max(50).or(import_zod6.z.literal("")).optional(),
287
- lastName: import_zod6.z.string().min(2).max(50).or(import_zod6.z.literal("")).optional(),
288
- address: import_zod6.z.string().or(import_zod6.z.literal("")).optional(),
284
+ firstName: import_zod6.z.string().min(2).max(50),
285
+ lastName: import_zod6.z.string().min(2).max(50),
289
286
  rank: import_zod6.z.nativeEnum(GoRank).optional(),
290
287
  agaId: import_zod6.z.string().regex(/^\d{4,5}$/, {
291
288
  message: `Please enter a valid AGA ID`
292
- }).or(import_zod6.z.literal("")).optional(),
293
- participateAs: import_zod6.z.enum(["adult", "youth"]).optional(),
289
+ }),
290
+ address: import_zod6.z.string().or(import_zod6.z.literal("")).optional(),
291
+ participateAs: import_zod6.z.enum(["adult", "youth"]).or(import_zod6.z.literal("")).optional(),
294
292
  showOnWhoIsComing: import_zod6.z.boolean().optional(),
295
- preferredEmail: import_zod6.z.string().email().optional(),
293
+ preferredEmail: import_zod6.z.string().email().or(import_zod6.z.literal("")).optional(),
296
294
  phoneNumber: import_zod6.z.string().regex(/^\d{10}/, {
297
295
  message: `Please enter a valid 10-digit US phone number with numbers only`
298
296
  }).or(import_zod6.z.literal("")).optional(),
@@ -798,7 +796,7 @@ var zReportTicketResponse = zReportTicket.extend({
798
796
  });
799
797
 
800
798
  // src/interface/event/eConfig.ts
801
- var import_zod30 = require("zod");
799
+ var import_zod29 = require("zod");
802
800
 
803
801
  // src/interface/event/eTicket.ts
804
802
  var import_zod28 = require("zod");
@@ -827,18 +825,6 @@ var zBEventTicket = import_zod28.z.object({
827
825
  });
828
826
  var zEventTicket = addAutoProps(zBEventTicket);
829
827
 
830
- // src/interface/event/table.ts
831
- var import_zod29 = require("zod");
832
- var zTable = import_zod29.z.array(import_zod29.z.record(import_zod29.z.string(), import_zod29.z.string()));
833
- var zDetailsTable = import_zod29.z.object({
834
- fields: import_zod29.z.array(import_zod29.z.string()).length(2),
835
- data: zTable
836
- });
837
- var zScheduleTable = import_zod29.z.object({
838
- fields: import_zod29.z.array(import_zod29.z.string()).length(2),
839
- data: import_zod29.z.record(import_zod29.z.string(), zTable)
840
- });
841
-
842
828
  // src/interface/event/youthOrAdult.ts
843
829
  var YouthOrAdult = /* @__PURE__ */ ((YouthOrAdult2) => {
844
830
  YouthOrAdult2["YOUTH_ONLY"] = "youth_only";
@@ -847,78 +833,78 @@ var YouthOrAdult = /* @__PURE__ */ ((YouthOrAdult2) => {
847
833
  })(YouthOrAdult || {});
848
834
 
849
835
  // src/interface/event/eConfig.ts
850
- var zBEventConfig = import_zod30.z.object({
836
+ var zBEventConfig = import_zod29.z.object({
851
837
  /**
852
838
  * Location of the event
853
839
  */
854
- location: import_zod30.z.string().optional(),
840
+ location: import_zod29.z.string().optional(),
855
841
  /**
856
842
  * URL of the tournament on the official website
857
843
  * Must be a valid URL link
858
844
  */
859
- url: import_zod30.z.string(),
845
+ url: import_zod29.z.string(),
860
846
  /**
861
847
  * Full name of the tournament
862
848
  */
863
- title: import_zod30.z.string().min(5),
849
+ title: import_zod29.z.string().min(5),
864
850
  /**
865
851
  * Abbreviated title of the tournament
866
852
  */
867
- shortTitle: import_zod30.z.string().min(2),
853
+ shortTitle: import_zod29.z.string().min(2),
868
854
  /**
869
855
  * Tournament start date and time
870
856
  */
871
- tStart: import_zod30.z.coerce.date(),
857
+ tStart: import_zod29.z.coerce.date(),
872
858
  /**
873
859
  * Tournament end date and time
874
860
  */
875
- tEnd: import_zod30.z.coerce.date(),
861
+ tEnd: import_zod29.z.coerce.date(),
876
862
  /**
877
863
  * Short description for tournament card
878
864
  */
879
- shortDescription: import_zod30.z.string().min(5),
865
+ shortDescription: import_zod29.z.string().min(5),
880
866
  /**
881
867
  * Full description
882
868
  */
883
- description: import_zod30.z.string().min(5),
869
+ description: import_zod29.z.string().min(5),
884
870
  /**
885
- * Defines the tournament details table with 2 columns
886
- * typically Time and Event
871
+ * @deprecated
872
+ * info in description field, kept for backwards compatibility
887
873
  */
888
- details: zDetailsTable,
874
+ details: import_zod29.z.any().optional(),
889
875
  /**
890
- * Defines the tournament schedule.
891
- * data is a map of tab title -> 2 column table rows.
876
+ * @deprecated
877
+ * info in description field, kept for backwards compatibility
892
878
  */
893
- schedule: zScheduleTable,
879
+ schedule: import_zod29.z.any().optional(),
894
880
  /**
895
881
  * @optional description of the tickets step, shown in service
896
882
  * when the customer is on step 1 of the booking page
897
883
  */
898
- ticketsStepDescription: import_zod30.z.string().optional(),
884
+ ticketsStepDescription: import_zod29.z.string().optional(),
899
885
  /**
900
886
  * @optional description of the participant step, shown in service
901
887
  * when the customer is on step 2 of the booking page
902
888
  */
903
- participantStepDescription: import_zod30.z.string().optional(),
889
+ participantStepDescription: import_zod29.z.string().optional(),
904
890
  /**
905
891
  * List of ticket object IDs for this tournament
906
892
  */
907
- tickets: import_zod30.z.array(import_zod30.z.string()),
893
+ tickets: import_zod29.z.array(import_zod29.z.string()),
908
894
  /**
909
895
  * If false, the tournament registration is closed
910
896
  */
911
- canRegister: import_zod30.z.boolean(),
897
+ canRegister: import_zod29.z.boolean(),
912
898
  /**
913
899
  * Defines the registration of youth and adults in the event
914
900
  * youth_only - only youth
915
901
  * both - both youth and adult
916
902
  */
917
- youthOrAdult: import_zod30.z.nativeEnum(YouthOrAdult).optional(),
903
+ youthOrAdult: import_zod29.z.nativeEnum(YouthOrAdult).optional(),
918
904
  /**
919
905
  * If true, free form donation amounts are disabled.
920
906
  */
921
- donationsDisabled: import_zod30.z.boolean().optional(),
907
+ donationsDisabled: import_zod29.z.boolean().optional(),
922
908
  /**
923
909
  * Defines URL, height, width of the image
924
910
  */
@@ -926,42 +912,42 @@ var zBEventConfig = import_zod30.z.object({
926
912
  });
927
913
  var zEventConfig = addAutoProps(zBEventConfig);
928
914
  var zEventConfigResponse = zEventConfig.extend({
929
- tickets: import_zod30.z.array(zEventTicket)
915
+ tickets: import_zod29.z.array(zEventTicket)
930
916
  });
931
917
 
932
918
  // src/interface/event/eReg.ts
933
- var import_zod32 = require("zod");
919
+ var import_zod31 = require("zod");
934
920
 
935
921
  // src/interface/event/eTicketReg.ts
936
- var import_zod31 = require("zod");
937
- var zEventTicketReg = import_zod31.z.object({
938
- ticket: import_zod31.z.string(),
922
+ var import_zod30 = require("zod");
923
+ var zEventTicketReg = import_zod30.z.object({
924
+ ticket: import_zod30.z.string(),
939
925
  /**
940
926
  * integer minimum 1, otherwise no ticket is being bought
941
927
  */
942
- amount: import_zod31.z.number().int().min(1)
928
+ amount: import_zod30.z.number().int().min(1)
943
929
  });
944
930
  var zEventTicketRegResponse = zEventTicketReg.extend({
945
931
  ticket: zEventTicket
946
932
  });
947
933
 
948
934
  // src/interface/event/eReg.ts
949
- var zBEventReg = import_zod32.z.object({
950
- agaId: import_zod32.z.string(),
951
- tournamentId: import_zod32.z.string(),
952
- tickets: import_zod32.z.array(zEventTicketReg),
935
+ var zBEventReg = import_zod31.z.object({
936
+ agaId: import_zod31.z.string(),
937
+ tournamentId: import_zod31.z.string(),
938
+ tickets: import_zod31.z.array(zEventTicketReg),
953
939
  /**
954
940
  * @units CENTS - Donation in cents
955
941
  */
956
- donation: import_zod32.z.coerce.number().optional(),
942
+ donation: import_zod31.z.coerce.number().optional(),
957
943
  /**
958
944
  * How the registration was created, through public endpoint or admin
959
945
  */
960
- createMethod: import_zod32.z.string().optional()
946
+ createMethod: import_zod31.z.string().optional()
961
947
  }).merge(zBUserInfo).merge(zBPaymentInfo);
962
948
  var zEventReg = addAutoProps(zBEventReg);
963
949
  var zEventRegResponse = zEventReg.extend({
964
- tickets: import_zod32.z.array(zEventTicketRegResponse)
950
+ tickets: import_zod31.z.array(zEventTicketRegResponse)
965
951
  });
966
952
  // Annotate the CommonJS export names for ESM import in node:
967
953
  0 && (module.exports = {
@@ -1014,7 +1000,6 @@ var zEventRegResponse = zEventReg.extend({
1014
1000
  zCourseTable,
1015
1001
  zCreateAdminAccountRequest,
1016
1002
  zDayOfWeek,
1017
- zDetailsTable,
1018
1003
  zDiscount,
1019
1004
  zEventConfig,
1020
1005
  zEventConfigResponse,
@@ -1038,7 +1023,6 @@ var zEventRegResponse = zEventReg.extend({
1038
1023
  zReportTicket,
1039
1024
  zReportTicketResponse,
1040
1025
  zScheduleData,
1041
- zScheduleTable,
1042
1026
  zSemester,
1043
1027
  zStudent,
1044
1028
  zTeacher,
package/index.mjs CHANGED
@@ -172,16 +172,16 @@ var zUserRoles = z5.object({
172
172
  // src/interface/user/userProfile.ts
173
173
  import { z as z6 } from "zod";
174
174
  var zBUserProfile = z6.object({
175
- firstName: z6.string().min(2).max(50).or(z6.literal("")).optional(),
176
- lastName: z6.string().min(2).max(50).or(z6.literal("")).optional(),
177
- address: z6.string().or(z6.literal("")).optional(),
175
+ firstName: z6.string().min(2).max(50),
176
+ lastName: z6.string().min(2).max(50),
178
177
  rank: z6.nativeEnum(GoRank).optional(),
179
178
  agaId: z6.string().regex(/^\d{4,5}$/, {
180
179
  message: `Please enter a valid AGA ID`
181
- }).or(z6.literal("")).optional(),
182
- participateAs: z6.enum(["adult", "youth"]).optional(),
180
+ }),
181
+ address: z6.string().or(z6.literal("")).optional(),
182
+ participateAs: z6.enum(["adult", "youth"]).or(z6.literal("")).optional(),
183
183
  showOnWhoIsComing: z6.boolean().optional(),
184
- preferredEmail: z6.string().email().optional(),
184
+ preferredEmail: z6.string().email().or(z6.literal("")).optional(),
185
185
  phoneNumber: z6.string().regex(/^\d{10}/, {
186
186
  message: `Please enter a valid 10-digit US phone number with numbers only`
187
187
  }).or(z6.literal("")).optional(),
@@ -687,7 +687,7 @@ var zReportTicketResponse = zReportTicket.extend({
687
687
  });
688
688
 
689
689
  // src/interface/event/eConfig.ts
690
- import { z as z30 } from "zod";
690
+ import { z as z29 } from "zod";
691
691
 
692
692
  // src/interface/event/eTicket.ts
693
693
  import { z as z28 } from "zod";
@@ -716,18 +716,6 @@ var zBEventTicket = z28.object({
716
716
  });
717
717
  var zEventTicket = addAutoProps(zBEventTicket);
718
718
 
719
- // src/interface/event/table.ts
720
- import { z as z29 } from "zod";
721
- var zTable = z29.array(z29.record(z29.string(), z29.string()));
722
- var zDetailsTable = z29.object({
723
- fields: z29.array(z29.string()).length(2),
724
- data: zTable
725
- });
726
- var zScheduleTable = z29.object({
727
- fields: z29.array(z29.string()).length(2),
728
- data: z29.record(z29.string(), zTable)
729
- });
730
-
731
719
  // src/interface/event/youthOrAdult.ts
732
720
  var YouthOrAdult = /* @__PURE__ */ ((YouthOrAdult2) => {
733
721
  YouthOrAdult2["YOUTH_ONLY"] = "youth_only";
@@ -736,78 +724,78 @@ var YouthOrAdult = /* @__PURE__ */ ((YouthOrAdult2) => {
736
724
  })(YouthOrAdult || {});
737
725
 
738
726
  // src/interface/event/eConfig.ts
739
- var zBEventConfig = z30.object({
727
+ var zBEventConfig = z29.object({
740
728
  /**
741
729
  * Location of the event
742
730
  */
743
- location: z30.string().optional(),
731
+ location: z29.string().optional(),
744
732
  /**
745
733
  * URL of the tournament on the official website
746
734
  * Must be a valid URL link
747
735
  */
748
- url: z30.string(),
736
+ url: z29.string(),
749
737
  /**
750
738
  * Full name of the tournament
751
739
  */
752
- title: z30.string().min(5),
740
+ title: z29.string().min(5),
753
741
  /**
754
742
  * Abbreviated title of the tournament
755
743
  */
756
- shortTitle: z30.string().min(2),
744
+ shortTitle: z29.string().min(2),
757
745
  /**
758
746
  * Tournament start date and time
759
747
  */
760
- tStart: z30.coerce.date(),
748
+ tStart: z29.coerce.date(),
761
749
  /**
762
750
  * Tournament end date and time
763
751
  */
764
- tEnd: z30.coerce.date(),
752
+ tEnd: z29.coerce.date(),
765
753
  /**
766
754
  * Short description for tournament card
767
755
  */
768
- shortDescription: z30.string().min(5),
756
+ shortDescription: z29.string().min(5),
769
757
  /**
770
758
  * Full description
771
759
  */
772
- description: z30.string().min(5),
760
+ description: z29.string().min(5),
773
761
  /**
774
- * Defines the tournament details table with 2 columns
775
- * typically Time and Event
762
+ * @deprecated
763
+ * info in description field, kept for backwards compatibility
776
764
  */
777
- details: zDetailsTable,
765
+ details: z29.any().optional(),
778
766
  /**
779
- * Defines the tournament schedule.
780
- * data is a map of tab title -> 2 column table rows.
767
+ * @deprecated
768
+ * info in description field, kept for backwards compatibility
781
769
  */
782
- schedule: zScheduleTable,
770
+ schedule: z29.any().optional(),
783
771
  /**
784
772
  * @optional description of the tickets step, shown in service
785
773
  * when the customer is on step 1 of the booking page
786
774
  */
787
- ticketsStepDescription: z30.string().optional(),
775
+ ticketsStepDescription: z29.string().optional(),
788
776
  /**
789
777
  * @optional description of the participant step, shown in service
790
778
  * when the customer is on step 2 of the booking page
791
779
  */
792
- participantStepDescription: z30.string().optional(),
780
+ participantStepDescription: z29.string().optional(),
793
781
  /**
794
782
  * List of ticket object IDs for this tournament
795
783
  */
796
- tickets: z30.array(z30.string()),
784
+ tickets: z29.array(z29.string()),
797
785
  /**
798
786
  * If false, the tournament registration is closed
799
787
  */
800
- canRegister: z30.boolean(),
788
+ canRegister: z29.boolean(),
801
789
  /**
802
790
  * Defines the registration of youth and adults in the event
803
791
  * youth_only - only youth
804
792
  * both - both youth and adult
805
793
  */
806
- youthOrAdult: z30.nativeEnum(YouthOrAdult).optional(),
794
+ youthOrAdult: z29.nativeEnum(YouthOrAdult).optional(),
807
795
  /**
808
796
  * If true, free form donation amounts are disabled.
809
797
  */
810
- donationsDisabled: z30.boolean().optional(),
798
+ donationsDisabled: z29.boolean().optional(),
811
799
  /**
812
800
  * Defines URL, height, width of the image
813
801
  */
@@ -815,42 +803,42 @@ var zBEventConfig = z30.object({
815
803
  });
816
804
  var zEventConfig = addAutoProps(zBEventConfig);
817
805
  var zEventConfigResponse = zEventConfig.extend({
818
- tickets: z30.array(zEventTicket)
806
+ tickets: z29.array(zEventTicket)
819
807
  });
820
808
 
821
809
  // src/interface/event/eReg.ts
822
- import { z as z32 } from "zod";
810
+ import { z as z31 } from "zod";
823
811
 
824
812
  // src/interface/event/eTicketReg.ts
825
- import { z as z31 } from "zod";
826
- var zEventTicketReg = z31.object({
827
- ticket: z31.string(),
813
+ import { z as z30 } from "zod";
814
+ var zEventTicketReg = z30.object({
815
+ ticket: z30.string(),
828
816
  /**
829
817
  * integer minimum 1, otherwise no ticket is being bought
830
818
  */
831
- amount: z31.number().int().min(1)
819
+ amount: z30.number().int().min(1)
832
820
  });
833
821
  var zEventTicketRegResponse = zEventTicketReg.extend({
834
822
  ticket: zEventTicket
835
823
  });
836
824
 
837
825
  // src/interface/event/eReg.ts
838
- var zBEventReg = z32.object({
839
- agaId: z32.string(),
840
- tournamentId: z32.string(),
841
- tickets: z32.array(zEventTicketReg),
826
+ var zBEventReg = z31.object({
827
+ agaId: z31.string(),
828
+ tournamentId: z31.string(),
829
+ tickets: z31.array(zEventTicketReg),
842
830
  /**
843
831
  * @units CENTS - Donation in cents
844
832
  */
845
- donation: z32.coerce.number().optional(),
833
+ donation: z31.coerce.number().optional(),
846
834
  /**
847
835
  * How the registration was created, through public endpoint or admin
848
836
  */
849
- createMethod: z32.string().optional()
837
+ createMethod: z31.string().optional()
850
838
  }).merge(zBUserInfo).merge(zBPaymentInfo);
851
839
  var zEventReg = addAutoProps(zBEventReg);
852
840
  var zEventRegResponse = zEventReg.extend({
853
- tickets: z32.array(zEventTicketRegResponse)
841
+ tickets: z31.array(zEventTicketRegResponse)
854
842
  });
855
843
  export {
856
844
  AgeGroup,
@@ -902,7 +890,6 @@ export {
902
890
  zCourseTable,
903
891
  zCreateAdminAccountRequest,
904
892
  zDayOfWeek,
905
- zDetailsTable,
906
893
  zDiscount,
907
894
  zEventConfig,
908
895
  zEventConfigResponse,
@@ -926,7 +913,6 @@ export {
926
913
  zReportTicket,
927
914
  zReportTicketResponse,
928
915
  zScheduleData,
929
- zScheduleTable,
930
916
  zSemester,
931
917
  zStudent,
932
918
  zTeacher,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nyig/models",
3
- "version": "0.6.1",
3
+ "version": "0.6.3",
4
4
  "license": "MIT",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",