@nyig/models 0.2.44 → 0.2.45

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 +495 -618
  2. package/index.d.ts +495 -618
  3. package/index.js +71 -75
  4. package/index.mjs +71 -74
  5. package/package.json +1 -1
package/index.js CHANGED
@@ -31,7 +31,6 @@ __export(src_exports, {
31
31
  Season: () => Season,
32
32
  TicketStatus: () => TicketStatus,
33
33
  zAttendance: () => zAttendance,
34
- zAttendanceResponse: () => zAttendanceResponse,
35
34
  zBAttendance: () => zBAttendance,
36
35
  zBCampBooking: () => zBCampBooking,
37
36
  zBCampTracker: () => zBCampTracker,
@@ -145,7 +144,7 @@ var AttendState = /* @__PURE__ */ ((AttendState2) => {
145
144
  })(AttendState || {});
146
145
 
147
146
  // src/interface/tracking/attendance.ts
148
- var import_zod7 = require("zod");
147
+ var import_zod5 = require("zod");
149
148
 
150
149
  // src/interface/payment/tuition.ts
151
150
  var import_zod3 = require("zod");
@@ -174,6 +173,50 @@ function addAutoProps(original) {
174
173
  });
175
174
  }
176
175
 
176
+ // src/interface/tracking/attendance.ts
177
+ var zBAttendance = import_zod5.z.object({
178
+ student: import_zod5.z.string(),
179
+ states: import_zod5.z.array(import_zod5.z.nativeEnum(AttendState)),
180
+ tuition: zTuition,
181
+ paid: import_zod5.z.boolean().optional(),
182
+ campOption: import_zod5.z.nativeEnum(CampOption)
183
+ });
184
+ var zAttendance = addAutoProps(zBAttendance);
185
+
186
+ // src/interface/tracking/campTracker.ts
187
+ var import_zod6 = require("zod");
188
+ var zBCampTracker = import_zod6.z.object({
189
+ course: import_zod6.z.string(),
190
+ teacher: import_zod6.z.string(),
191
+ semester: import_zod6.z.string(),
192
+ /**
193
+ * occurrences are tracked by week for camps
194
+ */
195
+ occurrences: import_zod6.z.array(import_zod6.z.string()),
196
+ /**
197
+ * attendances are tracked by week for camps
198
+ */
199
+ attendances: import_zod6.z.array(import_zod6.z.string()),
200
+ isNonPublic: import_zod6.z.boolean().optional(),
201
+ notes: import_zod6.z.string().optional()
202
+ });
203
+ var zCampTracker = addAutoProps(zBCampTracker);
204
+
205
+ // src/interface/tracking/classTracker.ts
206
+ var import_zod11 = require("zod");
207
+
208
+ // src/interface/payment/invoice.ts
209
+ var import_zod9 = require("zod");
210
+
211
+ // src/interface/payment/paymentMethod.ts
212
+ var PaymentMethod = /* @__PURE__ */ ((PaymentMethod2) => {
213
+ PaymentMethod2["CASH"] = "Cash";
214
+ PaymentMethod2["CHECK"] = "Check";
215
+ PaymentMethod2["VENMO"] = "Venmo";
216
+ PaymentMethod2["ZELLE"] = "Zelle Transfer";
217
+ return PaymentMethod2;
218
+ })(PaymentMethod || {});
219
+
177
220
  // src/interface/user/goRank.ts
178
221
  var GoRank = /* @__PURE__ */ ((GoRank2) => {
179
222
  GoRank2["KYU1"] = "1k";
@@ -221,45 +264,45 @@ var GoRank = /* @__PURE__ */ ((GoRank2) => {
221
264
  })(GoRank || {});
222
265
 
223
266
  // src/interface/user/user.ts
224
- var import_zod5 = require("zod");
225
- var zBUser = import_zod5.z.object({
226
- name: import_zod5.z.string().min(2).max(100),
227
- username: import_zod5.z.string().optional(),
228
- password: import_zod5.z.string().optional(),
229
- roles: import_zod5.z.array(import_zod5.z.number().int()).optional(),
230
- email: import_zod5.z.string().max(100).email().or(import_zod5.z.literal("")).optional(),
231
- address: import_zod5.z.string().or(import_zod5.z.literal("")).optional(),
232
- country: import_zod5.z.string().length(2, {
267
+ var import_zod7 = require("zod");
268
+ var zBUser = import_zod7.z.object({
269
+ name: import_zod7.z.string().min(2).max(100),
270
+ username: import_zod7.z.string().optional(),
271
+ password: import_zod7.z.string().optional(),
272
+ roles: import_zod7.z.array(import_zod7.z.number().int()).optional(),
273
+ email: import_zod7.z.string().max(100).email().or(import_zod7.z.literal("")).optional(),
274
+ address: import_zod7.z.string().or(import_zod7.z.literal("")).optional(),
275
+ country: import_zod7.z.string().length(2, {
233
276
  message: "Enter the 2-letter country code"
234
- }).or(import_zod5.z.literal("")).optional(),
235
- phoneNumber: import_zod5.z.string().regex(/^\d{10}/, {
277
+ }).or(import_zod7.z.literal("")).optional(),
278
+ phoneNumber: import_zod7.z.string().regex(/^\d{10}/, {
236
279
  message: `Please enter a valid 10-digit US phone number with numbers only`
237
- }).or(import_zod5.z.literal("")).optional(),
238
- birthDate: import_zod5.z.string().regex(/^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/, {
280
+ }).or(import_zod7.z.literal("")).optional(),
281
+ birthDate: import_zod7.z.string().regex(/^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/, {
239
282
  message: "Enter a valid date in yyyy-mm-dd format"
240
- }).or(import_zod5.z.literal("")).optional()
283
+ }).or(import_zod7.z.literal("")).optional()
241
284
  });
242
285
  var zUser = addAutoProps(zBUser);
243
286
  var zBStudent = zBUser.extend({
244
- rank: import_zod5.z.nativeEnum(GoRank),
245
- guardian: import_zod5.z.string().optional()
287
+ rank: import_zod7.z.nativeEnum(GoRank),
288
+ guardian: import_zod7.z.string().optional()
246
289
  });
247
290
  var zStudent = addAutoProps(zBStudent);
248
291
  var zBTeacher = zBUser.extend({
249
- rank: import_zod5.z.nativeEnum(GoRank),
292
+ rank: import_zod7.z.nativeEnum(GoRank),
250
293
  /**
251
294
  * Inactive teachers are not shown on public endpoints
252
295
  */
253
- isInactive: import_zod5.z.boolean().optional(),
296
+ isInactive: import_zod7.z.boolean().optional(),
254
297
  /**
255
298
  * Teacher's position, e.g., instructor, president
256
299
  */
257
- title: import_zod5.z.string().optional(),
300
+ title: import_zod7.z.string().optional(),
258
301
  /**
259
302
  * Teacher's bio text describing experience
260
303
  * new lines will be rendered as paragraphs
261
304
  */
262
- bio: import_zod5.z.string().optional(),
305
+ bio: import_zod7.z.string().optional(),
263
306
  /** Format is illustrated below, where teacher is available
264
307
  * Mon 9-12am 3-6pm & Tue 10-12am 6-10pm
265
308
  * [
@@ -272,64 +315,17 @@ var zBTeacher = zBUser.extend({
272
315
  * [],
273
316
  * ]
274
317
  */
275
- available: import_zod5.z.array(import_zod5.z.array(import_zod5.z.array(import_zod5.z.number()))).optional()
318
+ available: import_zod7.z.array(import_zod7.z.array(import_zod7.z.array(import_zod7.z.number()))).optional()
276
319
  });
277
320
  var zTeacher = addAutoProps(zBTeacher);
278
321
 
279
322
  // src/interface/user/userRoles.ts
280
- var import_zod6 = require("zod");
281
- var zUserRoles = import_zod6.z.object({
282
- user: import_zod6.z.number().int(),
283
- admin: import_zod6.z.number().int(),
284
- superadmin: import_zod6.z.number().int()
285
- });
286
-
287
- // src/interface/tracking/attendance.ts
288
- var zBAttendance = import_zod7.z.object({
289
- student: import_zod7.z.string(),
290
- states: import_zod7.z.array(import_zod7.z.nativeEnum(AttendState)),
291
- tuition: zTuition,
292
- paid: import_zod7.z.boolean().optional(),
293
- campOption: import_zod7.z.nativeEnum(CampOption).optional()
294
- });
295
- var zAttendance = addAutoProps(zBAttendance);
296
- var zAttendanceResponse = zAttendance.extend({
297
- student: zStudent
298
- });
299
-
300
- // src/interface/tracking/campTracker.ts
301
323
  var import_zod8 = require("zod");
302
- var zBCampTracker = import_zod8.z.object({
303
- course: import_zod8.z.string(),
304
- teacher: import_zod8.z.string(),
305
- semester: import_zod8.z.string(),
306
- /**
307
- * occurrences are tracked by week for camps
308
- */
309
- occurrences: import_zod8.z.array(import_zod8.z.string()),
310
- /**
311
- * attendances are tracked by week for camps
312
- */
313
- attendances: import_zod8.z.array(import_zod8.z.string()),
314
- isNonPublic: import_zod8.z.boolean().optional(),
315
- notes: import_zod8.z.string().optional()
324
+ var zUserRoles = import_zod8.z.object({
325
+ user: import_zod8.z.number().int(),
326
+ admin: import_zod8.z.number().int(),
327
+ superadmin: import_zod8.z.number().int()
316
328
  });
317
- var zCampTracker = addAutoProps(zBCampTracker);
318
-
319
- // src/interface/tracking/classTracker.ts
320
- var import_zod11 = require("zod");
321
-
322
- // src/interface/payment/invoice.ts
323
- var import_zod9 = require("zod");
324
-
325
- // src/interface/payment/paymentMethod.ts
326
- var PaymentMethod = /* @__PURE__ */ ((PaymentMethod2) => {
327
- PaymentMethod2["CASH"] = "Cash";
328
- PaymentMethod2["CHECK"] = "Check";
329
- PaymentMethod2["VENMO"] = "Venmo";
330
- PaymentMethod2["ZELLE"] = "Zelle Transfer";
331
- return PaymentMethod2;
332
- })(PaymentMethod || {});
333
329
 
334
330
  // src/interface/payment/invoice.ts
335
331
  var zDiscount = import_zod9.z.object({
@@ -355,6 +351,7 @@ var zBInvoice = import_zod9.z.object({
355
351
  textbook: import_zod9.z.coerce.number().int().min(0).optional(),
356
352
  shipping: import_zod9.z.coerce.number().int().min(0).optional(),
357
353
  paid: import_zod9.z.nativeEnum(PaymentMethod).optional(),
354
+ showEin: import_zod9.z.boolean().optional(),
358
355
  notes: import_zod9.z.string().or(import_zod9.z.literal("")).optional(),
359
356
  createdBy: import_zod9.z.string(),
360
357
  lastEditBy: import_zod9.z.string().optional()
@@ -761,7 +758,6 @@ var zEventRegResponse = zEventReg.extend({
761
758
  Season,
762
759
  TicketStatus,
763
760
  zAttendance,
764
- zAttendanceResponse,
765
761
  zBAttendance,
766
762
  zBCampBooking,
767
763
  zBCampTracker,
package/index.mjs CHANGED
@@ -51,7 +51,7 @@ var AttendState = /* @__PURE__ */ ((AttendState2) => {
51
51
  })(AttendState || {});
52
52
 
53
53
  // src/interface/tracking/attendance.ts
54
- import { z as z7 } from "zod";
54
+ import { z as z5 } from "zod";
55
55
 
56
56
  // src/interface/payment/tuition.ts
57
57
  import { z as z3 } from "zod";
@@ -80,6 +80,50 @@ function addAutoProps(original) {
80
80
  });
81
81
  }
82
82
 
83
+ // src/interface/tracking/attendance.ts
84
+ var zBAttendance = z5.object({
85
+ student: z5.string(),
86
+ states: z5.array(z5.nativeEnum(AttendState)),
87
+ tuition: zTuition,
88
+ paid: z5.boolean().optional(),
89
+ campOption: z5.nativeEnum(CampOption)
90
+ });
91
+ var zAttendance = addAutoProps(zBAttendance);
92
+
93
+ // src/interface/tracking/campTracker.ts
94
+ import { z as z6 } from "zod";
95
+ var zBCampTracker = z6.object({
96
+ course: z6.string(),
97
+ teacher: z6.string(),
98
+ semester: z6.string(),
99
+ /**
100
+ * occurrences are tracked by week for camps
101
+ */
102
+ occurrences: z6.array(z6.string()),
103
+ /**
104
+ * attendances are tracked by week for camps
105
+ */
106
+ attendances: z6.array(z6.string()),
107
+ isNonPublic: z6.boolean().optional(),
108
+ notes: z6.string().optional()
109
+ });
110
+ var zCampTracker = addAutoProps(zBCampTracker);
111
+
112
+ // src/interface/tracking/classTracker.ts
113
+ import { z as z11 } from "zod";
114
+
115
+ // src/interface/payment/invoice.ts
116
+ import { z as z9 } from "zod";
117
+
118
+ // src/interface/payment/paymentMethod.ts
119
+ var PaymentMethod = /* @__PURE__ */ ((PaymentMethod2) => {
120
+ PaymentMethod2["CASH"] = "Cash";
121
+ PaymentMethod2["CHECK"] = "Check";
122
+ PaymentMethod2["VENMO"] = "Venmo";
123
+ PaymentMethod2["ZELLE"] = "Zelle Transfer";
124
+ return PaymentMethod2;
125
+ })(PaymentMethod || {});
126
+
83
127
  // src/interface/user/goRank.ts
84
128
  var GoRank = /* @__PURE__ */ ((GoRank2) => {
85
129
  GoRank2["KYU1"] = "1k";
@@ -127,45 +171,45 @@ var GoRank = /* @__PURE__ */ ((GoRank2) => {
127
171
  })(GoRank || {});
128
172
 
129
173
  // src/interface/user/user.ts
130
- import { z as z5 } from "zod";
131
- var zBUser = z5.object({
132
- name: z5.string().min(2).max(100),
133
- username: z5.string().optional(),
134
- password: z5.string().optional(),
135
- roles: z5.array(z5.number().int()).optional(),
136
- email: z5.string().max(100).email().or(z5.literal("")).optional(),
137
- address: z5.string().or(z5.literal("")).optional(),
138
- country: z5.string().length(2, {
174
+ import { z as z7 } from "zod";
175
+ var zBUser = z7.object({
176
+ name: z7.string().min(2).max(100),
177
+ username: z7.string().optional(),
178
+ password: z7.string().optional(),
179
+ roles: z7.array(z7.number().int()).optional(),
180
+ email: z7.string().max(100).email().or(z7.literal("")).optional(),
181
+ address: z7.string().or(z7.literal("")).optional(),
182
+ country: z7.string().length(2, {
139
183
  message: "Enter the 2-letter country code"
140
- }).or(z5.literal("")).optional(),
141
- phoneNumber: z5.string().regex(/^\d{10}/, {
184
+ }).or(z7.literal("")).optional(),
185
+ phoneNumber: z7.string().regex(/^\d{10}/, {
142
186
  message: `Please enter a valid 10-digit US phone number with numbers only`
143
- }).or(z5.literal("")).optional(),
144
- birthDate: z5.string().regex(/^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/, {
187
+ }).or(z7.literal("")).optional(),
188
+ birthDate: z7.string().regex(/^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/, {
145
189
  message: "Enter a valid date in yyyy-mm-dd format"
146
- }).or(z5.literal("")).optional()
190
+ }).or(z7.literal("")).optional()
147
191
  });
148
192
  var zUser = addAutoProps(zBUser);
149
193
  var zBStudent = zBUser.extend({
150
- rank: z5.nativeEnum(GoRank),
151
- guardian: z5.string().optional()
194
+ rank: z7.nativeEnum(GoRank),
195
+ guardian: z7.string().optional()
152
196
  });
153
197
  var zStudent = addAutoProps(zBStudent);
154
198
  var zBTeacher = zBUser.extend({
155
- rank: z5.nativeEnum(GoRank),
199
+ rank: z7.nativeEnum(GoRank),
156
200
  /**
157
201
  * Inactive teachers are not shown on public endpoints
158
202
  */
159
- isInactive: z5.boolean().optional(),
203
+ isInactive: z7.boolean().optional(),
160
204
  /**
161
205
  * Teacher's position, e.g., instructor, president
162
206
  */
163
- title: z5.string().optional(),
207
+ title: z7.string().optional(),
164
208
  /**
165
209
  * Teacher's bio text describing experience
166
210
  * new lines will be rendered as paragraphs
167
211
  */
168
- bio: z5.string().optional(),
212
+ bio: z7.string().optional(),
169
213
  /** Format is illustrated below, where teacher is available
170
214
  * Mon 9-12am 3-6pm & Tue 10-12am 6-10pm
171
215
  * [
@@ -178,64 +222,17 @@ var zBTeacher = zBUser.extend({
178
222
  * [],
179
223
  * ]
180
224
  */
181
- available: z5.array(z5.array(z5.array(z5.number()))).optional()
225
+ available: z7.array(z7.array(z7.array(z7.number()))).optional()
182
226
  });
183
227
  var zTeacher = addAutoProps(zBTeacher);
184
228
 
185
229
  // src/interface/user/userRoles.ts
186
- import { z as z6 } from "zod";
187
- var zUserRoles = z6.object({
188
- user: z6.number().int(),
189
- admin: z6.number().int(),
190
- superadmin: z6.number().int()
191
- });
192
-
193
- // src/interface/tracking/attendance.ts
194
- var zBAttendance = z7.object({
195
- student: z7.string(),
196
- states: z7.array(z7.nativeEnum(AttendState)),
197
- tuition: zTuition,
198
- paid: z7.boolean().optional(),
199
- campOption: z7.nativeEnum(CampOption).optional()
200
- });
201
- var zAttendance = addAutoProps(zBAttendance);
202
- var zAttendanceResponse = zAttendance.extend({
203
- student: zStudent
204
- });
205
-
206
- // src/interface/tracking/campTracker.ts
207
230
  import { z as z8 } from "zod";
208
- var zBCampTracker = z8.object({
209
- course: z8.string(),
210
- teacher: z8.string(),
211
- semester: z8.string(),
212
- /**
213
- * occurrences are tracked by week for camps
214
- */
215
- occurrences: z8.array(z8.string()),
216
- /**
217
- * attendances are tracked by week for camps
218
- */
219
- attendances: z8.array(z8.string()),
220
- isNonPublic: z8.boolean().optional(),
221
- notes: z8.string().optional()
231
+ var zUserRoles = z8.object({
232
+ user: z8.number().int(),
233
+ admin: z8.number().int(),
234
+ superadmin: z8.number().int()
222
235
  });
223
- var zCampTracker = addAutoProps(zBCampTracker);
224
-
225
- // src/interface/tracking/classTracker.ts
226
- import { z as z11 } from "zod";
227
-
228
- // src/interface/payment/invoice.ts
229
- import { z as z9 } from "zod";
230
-
231
- // src/interface/payment/paymentMethod.ts
232
- var PaymentMethod = /* @__PURE__ */ ((PaymentMethod2) => {
233
- PaymentMethod2["CASH"] = "Cash";
234
- PaymentMethod2["CHECK"] = "Check";
235
- PaymentMethod2["VENMO"] = "Venmo";
236
- PaymentMethod2["ZELLE"] = "Zelle Transfer";
237
- return PaymentMethod2;
238
- })(PaymentMethod || {});
239
236
 
240
237
  // src/interface/payment/invoice.ts
241
238
  var zDiscount = z9.object({
@@ -261,6 +258,7 @@ var zBInvoice = z9.object({
261
258
  textbook: z9.coerce.number().int().min(0).optional(),
262
259
  shipping: z9.coerce.number().int().min(0).optional(),
263
260
  paid: z9.nativeEnum(PaymentMethod).optional(),
261
+ showEin: z9.boolean().optional(),
264
262
  notes: z9.string().or(z9.literal("")).optional(),
265
263
  createdBy: z9.string(),
266
264
  lastEditBy: z9.string().optional()
@@ -666,7 +664,6 @@ export {
666
664
  Season,
667
665
  TicketStatus,
668
666
  zAttendance,
669
- zAttendanceResponse,
670
667
  zBAttendance,
671
668
  zBCampBooking,
672
669
  zBCampTracker,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nyig/models",
3
- "version": "0.2.44",
3
+ "version": "0.2.45",
4
4
  "license": "MIT",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",