@nyig/models 0.4.4 → 0.4.6

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 +1524 -806
  2. package/index.d.ts +1524 -806
  3. package/index.js +26 -2
  4. package/index.mjs +25 -2
  5. package/package.json +4 -4
package/index.js CHANGED
@@ -27,6 +27,7 @@ __export(src_exports, {
27
27
  CourseCategory: () => CourseCategory,
28
28
  DayOfWeek: () => DayOfWeek,
29
29
  GoRank: () => GoRank,
30
+ HearAboutUs: () => HearAboutUs,
30
31
  NYIGSchool: () => NYIGSchool,
31
32
  PaymentMethod: () => PaymentMethod,
32
33
  Role: () => Role,
@@ -125,6 +126,18 @@ var zBPaymentInfo = import_zod.z.object({
125
126
 
126
127
  // src/interface/booking/bUserInfo.ts
127
128
  var import_zod2 = require("zod");
129
+
130
+ // src/interface/booking/hearAboutUs.ts
131
+ var HearAboutUs = /* @__PURE__ */ ((HearAboutUs2) => {
132
+ HearAboutUs2["SEARCH_ENGINE"] = "Search engine";
133
+ HearAboutUs2["FRIENDS_FAMILY"] = "Friends or family";
134
+ HearAboutUs2["WECHAT"] = "Wechat";
135
+ HearAboutUs2["POSTER"] = "Poster ad";
136
+ HearAboutUs2["EMAIL"] = "Email";
137
+ return HearAboutUs2;
138
+ })(HearAboutUs || {});
139
+
140
+ // src/interface/booking/bUserInfo.ts
128
141
  var zBUserInfo = import_zod2.z.object({
129
142
  userId: import_zod2.z.string().optional(),
130
143
  firstName: import_zod2.z.string(),
@@ -133,7 +146,13 @@ var zBUserInfo = import_zod2.z.object({
133
146
  email: import_zod2.z.string(),
134
147
  phone: import_zod2.z.string().optional(),
135
148
  address: import_zod2.z.string().optional(),
136
- notes: import_zod2.z.string().optional()
149
+ notes: import_zod2.z.string().optional(),
150
+ // Optional for backwards compatibility, required field on UI
151
+ hearAboutUs: import_zod2.z.nativeEnum(HearAboutUs).optional(),
152
+ // Additional info such as friend/family referer
153
+ hearAboutUsDetails: import_zod2.z.string().optional(),
154
+ // show/hide on Aurora event page "who is coming" list
155
+ showOnWhoIsComing: import_zod2.z.boolean().optional()
137
156
  });
138
157
 
139
158
  // src/interface/booking/bookingType.ts
@@ -747,7 +766,11 @@ var zBEventTicket = import_zod27.z.object({
747
766
  /**
748
767
  * @optional If date is provided and in the past, ticket cannot be purchased
749
768
  */
750
- lastBuyableDate: import_zod27.z.coerce.date().optional()
769
+ lastBuyableDate: import_zod27.z.coerce.date().optional(),
770
+ /**
771
+ * @optional limit is 1 unless maxPerOrder is specified
772
+ */
773
+ maxPerOrder: import_zod27.z.number().int().min(2).optional()
751
774
  });
752
775
  var zEventTicket = addAutoProps(zBEventTicket);
753
776
 
@@ -873,6 +896,7 @@ var zEventRegResponse = zEventReg.extend({
873
896
  CourseCategory,
874
897
  DayOfWeek,
875
898
  GoRank,
899
+ HearAboutUs,
876
900
  NYIGSchool,
877
901
  PaymentMethod,
878
902
  Role,
package/index.mjs CHANGED
@@ -19,6 +19,18 @@ var zBPaymentInfo = z.object({
19
19
 
20
20
  // src/interface/booking/bUserInfo.ts
21
21
  import { z as z2 } from "zod";
22
+
23
+ // src/interface/booking/hearAboutUs.ts
24
+ var HearAboutUs = /* @__PURE__ */ ((HearAboutUs2) => {
25
+ HearAboutUs2["SEARCH_ENGINE"] = "Search engine";
26
+ HearAboutUs2["FRIENDS_FAMILY"] = "Friends or family";
27
+ HearAboutUs2["WECHAT"] = "Wechat";
28
+ HearAboutUs2["POSTER"] = "Poster ad";
29
+ HearAboutUs2["EMAIL"] = "Email";
30
+ return HearAboutUs2;
31
+ })(HearAboutUs || {});
32
+
33
+ // src/interface/booking/bUserInfo.ts
22
34
  var zBUserInfo = z2.object({
23
35
  userId: z2.string().optional(),
24
36
  firstName: z2.string(),
@@ -27,7 +39,13 @@ var zBUserInfo = z2.object({
27
39
  email: z2.string(),
28
40
  phone: z2.string().optional(),
29
41
  address: z2.string().optional(),
30
- notes: z2.string().optional()
42
+ notes: z2.string().optional(),
43
+ // Optional for backwards compatibility, required field on UI
44
+ hearAboutUs: z2.nativeEnum(HearAboutUs).optional(),
45
+ // Additional info such as friend/family referer
46
+ hearAboutUsDetails: z2.string().optional(),
47
+ // show/hide on Aurora event page "who is coming" list
48
+ showOnWhoIsComing: z2.boolean().optional()
31
49
  });
32
50
 
33
51
  // src/interface/booking/bookingType.ts
@@ -641,7 +659,11 @@ var zBEventTicket = z27.object({
641
659
  /**
642
660
  * @optional If date is provided and in the past, ticket cannot be purchased
643
661
  */
644
- lastBuyableDate: z27.coerce.date().optional()
662
+ lastBuyableDate: z27.coerce.date().optional(),
663
+ /**
664
+ * @optional limit is 1 unless maxPerOrder is specified
665
+ */
666
+ maxPerOrder: z27.number().int().min(2).optional()
645
667
  });
646
668
  var zEventTicket = addAutoProps(zBEventTicket);
647
669
 
@@ -766,6 +788,7 @@ export {
766
788
  CourseCategory,
767
789
  DayOfWeek,
768
790
  GoRank,
791
+ HearAboutUs,
769
792
  NYIGSchool,
770
793
  PaymentMethod,
771
794
  Role,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nyig/models",
3
- "version": "0.4.4",
3
+ "version": "0.4.6",
4
4
  "license": "MIT",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",
@@ -10,10 +10,10 @@
10
10
  },
11
11
  "devDependencies": {
12
12
  "@changesets/cli": "^2.27.7",
13
- "husky": "^9.1.4",
14
- "lint-staged": "^15.2.7",
13
+ "husky": "^9.1.5",
14
+ "lint-staged": "^15.2.9",
15
15
  "prettier": "^3.3.3",
16
- "tsup": "^8.2.3",
16
+ "tsup": "^8.2.4",
17
17
  "typescript": "^5.5.4"
18
18
  },
19
19
  "lint-staged": {