@nyig/models 0.2.4 → 0.2.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.
package/index.js CHANGED
@@ -20,17 +20,790 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var src_exports = {};
22
22
  __export(src_exports, {
23
- zStudent: () => zStudent
23
+ AgeGroup: () => AgeGroup,
24
+ AttendState: () => AttendState,
25
+ CampOption: () => CampOption,
26
+ CourseCategory: () => CourseCategory,
27
+ GoRank: () => GoRank,
28
+ NYIGSchool: () => NYIGSchool,
29
+ PaymentMethod: () => PaymentMethod,
30
+ Season: () => Season,
31
+ zAttendance: () => zAttendance,
32
+ zBPaymentInfo: () => zBPaymentInfo,
33
+ zBUserInfo: () => zBUserInfo,
34
+ zCampBooking: () => zCampBooking,
35
+ zCampTracker: () => zCampTracker,
36
+ zClassTracker: () => zClassTracker,
37
+ zCourse: () => zCourse,
38
+ zCourseTable: () => zCourseTable,
39
+ zDetailsTable: () => zDetailsTable,
40
+ zDiscount: () => zDiscount,
41
+ zGroupBooking: () => zGroupBooking,
42
+ zGroupTracker: () => zGroupTracker,
43
+ zImageDef: () => zImageDef,
44
+ zInvoice: () => zInvoice,
45
+ zInvoiceItem: () => zInvoiceItem,
46
+ zInvoicePackage: () => zInvoicePackage,
47
+ zMAttendance: () => zMAttendance,
48
+ zMCampBooking: () => zMCampBooking,
49
+ zMCampTracker: () => zMCampTracker,
50
+ zMClassTracker: () => zMClassTracker,
51
+ zMCourse: () => zMCourse,
52
+ zMGroupBooking: () => zMGroupBooking,
53
+ zMGroupTracker: () => zMGroupTracker,
54
+ zMInvoice: () => zMInvoice,
55
+ zMPrivateBooking: () => zMPrivateBooking,
56
+ zMReportTicket: () => zMReportTicket,
57
+ zMSemester: () => zMSemester,
58
+ zMStudent: () => zMStudent,
59
+ zMTConfig: () => zMTConfig,
60
+ zMTReg: () => zMTReg,
61
+ zMTTicket: () => zMTTicket,
62
+ zMTeacher: () => zMTeacher,
63
+ zMTeacherPayment: () => zMTeacherPayment,
64
+ zMUser: () => zMUser,
65
+ zPrivateBooking: () => zPrivateBooking,
66
+ zReportTicket: () => zReportTicket,
67
+ zScheduleData: () => zScheduleData,
68
+ zScheduleTable: () => zScheduleTable,
69
+ zSemester: () => zSemester,
70
+ zStudent: () => zStudent,
71
+ zTConfig: () => zTConfig,
72
+ zTReg: () => zTReg,
73
+ zTTicket: () => zTTicket,
74
+ zTTicketReg: () => zTTicketReg,
75
+ zTeacher: () => zTeacher,
76
+ zTeacherDisplay: () => zTeacherDisplay,
77
+ zTeacherPayment: () => zTeacherPayment,
78
+ zTeacherPaymentRow: () => zTeacherPaymentRow,
79
+ zTuition: () => zTuition,
80
+ zUser: () => zUser,
81
+ zUserRoles: () => zUserRoles
24
82
  });
25
83
  module.exports = __toCommonJS(src_exports);
26
84
 
27
- // src/z/student.ts
85
+ // src/interface/booking/bUserInfo.ts
28
86
  var import_zod = require("zod");
29
- var zStudent = import_zod.z.object({
30
- name: import_zod.z.string(),
31
- email: import_zod.z.string().email()
87
+ var zBUserInfo = import_zod.z.object({
88
+ firstName: import_zod.z.string(),
89
+ lastName: import_zod.z.string(),
90
+ rank: import_zod.z.string(),
91
+ email: import_zod.z.string(),
92
+ phone: import_zod.z.string().optional(),
93
+ address: import_zod.z.string().optional(),
94
+ notes: import_zod.z.string().optional()
32
95
  });
96
+
97
+ // src/interface/booking/privateBooking.ts
98
+ var import_zod4 = require("zod");
99
+
100
+ // src/mongoose.ts
101
+ var import_zod2 = require("zod");
102
+ function extendZodObjectForMongoose(original) {
103
+ return original.extend({
104
+ _id: import_zod2.z.string(),
105
+ createdAt: import_zod2.z.coerce.date().optional(),
106
+ updatedAt: import_zod2.z.coerce.date().optional()
107
+ });
108
+ }
109
+
110
+ // src/interface/booking/bPaymentInfo.ts
111
+ var import_zod3 = require("zod");
112
+ var zBPaymentInfo = import_zod3.z.object({
113
+ /**
114
+ * @units CENTS - Proposed payment amount in cents of the booking
115
+ */
116
+ paymentAmount: import_zod3.z.number(),
117
+ /**
118
+ * True if the payment has been received. Populated by webhook.
119
+ */
120
+ paymentReceived: import_zod3.z.boolean().optional(),
121
+ /**
122
+ * When Date is reached, document is deleted by MongoDB sweeper.
123
+ * Creation typically marks one to two weeks.
124
+ * After payment, webhook should extend this date to essentially infinite.
125
+ */
126
+ expireAt: import_zod3.z.coerce.date().optional()
127
+ });
128
+
129
+ // src/interface/booking/privateBooking.ts
130
+ var zPrivateBooking = import_zod4.z.object({
131
+ userId: import_zod4.z.string().optional(),
132
+ courseId: import_zod4.z.string(),
133
+ teacherId: import_zod4.z.string(),
134
+ classDate: import_zod4.z.string().optional()
135
+ }).merge(zBUserInfo).merge(zBPaymentInfo);
136
+ var zMPrivateBooking = extendZodObjectForMongoose(zPrivateBooking);
137
+
138
+ // src/interface/booking/groupBooking.ts
139
+ var import_zod5 = require("zod");
140
+ var zGroupBooking = import_zod5.z.object({
141
+ userId: import_zod5.z.string().optional(),
142
+ gtId: import_zod5.z.string().optional(),
143
+ isTrial: import_zod5.z.boolean().optional(),
144
+ isOnline: import_zod5.z.boolean(),
145
+ classDate: import_zod5.z.string().optional(),
146
+ shipping: import_zod5.z.boolean().optional()
147
+ }).merge(zBUserInfo).merge(zBPaymentInfo);
148
+ var zMGroupBooking = extendZodObjectForMongoose(zGroupBooking);
149
+
150
+ // src/interface/booking/campBooking.ts
151
+ var import_zod15 = require("zod");
152
+
153
+ // src/interface/tracking/attendState.ts
154
+ var AttendState = /* @__PURE__ */ ((AttendState2) => {
155
+ AttendState2["ABSENT"] = "absent";
156
+ AttendState2["PRESENT"] = "present";
157
+ AttendState2["NONE"] = "none";
158
+ return AttendState2;
159
+ })(AttendState || {});
160
+
161
+ // src/interface/tracking/attendance.ts
162
+ var import_zod7 = require("zod");
163
+
164
+ // src/interface/payment/tuition.ts
165
+ var import_zod6 = require("zod");
166
+ var zTuition = import_zod6.z.object({
167
+ primary: import_zod6.z.number(),
168
+ textbook: import_zod6.z.boolean().optional(),
169
+ shipping: import_zod6.z.boolean().optional()
170
+ });
171
+
172
+ // src/interface/tracking/campOption.ts
173
+ var CampOption = /* @__PURE__ */ ((CampOption2) => {
174
+ CampOption2["AM"] = "am";
175
+ CampOption2["PM"] = "pm";
176
+ CampOption2["FULL"] = "full";
177
+ return CampOption2;
178
+ })(CampOption || {});
179
+
180
+ // src/interface/tracking/attendance.ts
181
+ var zAttendance = import_zod7.z.object({
182
+ student: import_zod7.z.string(),
183
+ states: import_zod7.z.array(import_zod7.z.nativeEnum(AttendState)),
184
+ tuition: zTuition,
185
+ paid: import_zod7.z.boolean().optional(),
186
+ campOption: import_zod7.z.nativeEnum(CampOption)
187
+ });
188
+ var zMAttendance = extendZodObjectForMongoose(zAttendance);
189
+
190
+ // src/interface/tracking/campTracker.ts
191
+ var import_zod8 = require("zod");
192
+ var zCampTracker = import_zod8.z.object({
193
+ /**
194
+ * Mongoose object ID
195
+ */
196
+ course: import_zod8.z.string(),
197
+ /**
198
+ * Mongoose object ID
199
+ */
200
+ teacher: import_zod8.z.string(),
201
+ /**
202
+ * Mongoose object ID
203
+ */
204
+ semester: import_zod8.z.string(),
205
+ /**
206
+ * occurrences are tracked by week for camps
207
+ */
208
+ occurrences: import_zod8.z.array(import_zod8.z.string()),
209
+ /**
210
+ * attendances are tracked by week for camps
211
+ */
212
+ attendances: import_zod8.z.array(import_zod8.z.string()),
213
+ notes: import_zod8.z.string().optional()
214
+ });
215
+ var zMCampTracker = extendZodObjectForMongoose(zCampTracker);
216
+
217
+ // src/interface/tracking/classTracker.ts
218
+ var import_zod11 = require("zod");
219
+
220
+ // src/interface/payment/invoice.ts
221
+ var import_zod9 = require("zod");
222
+
223
+ // src/interface/payment/paymentMethod.ts
224
+ var PaymentMethod = /* @__PURE__ */ ((PaymentMethod2) => {
225
+ PaymentMethod2["CASH"] = "Cash";
226
+ PaymentMethod2["CHECK"] = "Check";
227
+ PaymentMethod2["VENMO"] = "Venmo";
228
+ PaymentMethod2["ZELLE"] = "Zelle Transfer";
229
+ return PaymentMethod2;
230
+ })(PaymentMethod || {});
231
+
232
+ // src/interface/payment/invoice.ts
233
+ var zDiscount = import_zod9.z.object({
234
+ desc: import_zod9.z.string(),
235
+ amount: import_zod9.z.number()
236
+ });
237
+ var zInvoiceItem = import_zod9.z.object({
238
+ /**
239
+ * Mongoose object ID
240
+ */
241
+ course: import_zod9.z.string(),
242
+ price: import_zod9.z.number(),
243
+ units: import_zod9.z.number()
244
+ });
245
+ var zInvoicePackage = import_zod9.z.object({
246
+ /**
247
+ * Mongoose object ID
248
+ */
249
+ student: import_zod9.z.string(),
250
+ items: import_zod9.z.array(zInvoiceItem)
251
+ });
252
+ var zInvoice = import_zod9.z.object({
253
+ billTo: import_zod9.z.string(),
254
+ packages: import_zod9.z.array(zInvoicePackage),
255
+ discounts: import_zod9.z.array(zDiscount),
256
+ textbook: import_zod9.z.number().optional(),
257
+ shipping: import_zod9.z.number().optional(),
258
+ paid: import_zod9.z.nativeEnum(PaymentMethod).optional(),
259
+ notes: import_zod9.z.string().optional(),
260
+ /**
261
+ * Mongoose object ID
262
+ */
263
+ createdBy: import_zod9.z.string(),
264
+ /**
265
+ * Mongoose object ID
266
+ */
267
+ lastEditBy: import_zod9.z.string().optional()
268
+ });
269
+ var zMInvoice = extendZodObjectForMongoose(zInvoice);
270
+
271
+ // src/interface/payment/teacherPayment.ts
272
+ var import_zod10 = require("zod");
273
+ var zTeacherPaymentRow = import_zod10.z.object({
274
+ course: import_zod10.z.string(),
275
+ length: import_zod10.z.number(),
276
+ count: import_zod10.z.number(),
277
+ wage: import_zod10.z.number()
278
+ });
279
+ var zTeacherPayment = import_zod10.z.object({
280
+ teacher: import_zod10.z.string(),
281
+ rows: import_zod10.z.array(zTeacherPaymentRow),
282
+ paid: import_zod10.z.boolean().optional()
283
+ });
284
+ var zMTeacherPayment = extendZodObjectForMongoose(zTeacherPayment);
285
+
286
+ // src/interface/tracking/classTracker.ts
287
+ var zClassTracker = import_zod11.z.object({
288
+ /**
289
+ * Mongoose object ID
290
+ */
291
+ course: import_zod11.z.string(),
292
+ /**
293
+ * Mongoose object ID
294
+ */
295
+ teacher: import_zod11.z.string(),
296
+ /**
297
+ * Mongoose object ID
298
+ */
299
+ semester: import_zod11.z.string(),
300
+ classTimes: import_zod11.z.array(import_zod11.z.coerce.date()),
301
+ completedList: import_zod11.z.array(import_zod11.z.boolean()),
302
+ /**
303
+ * Virtual mongoose field when all values in completedList is true
304
+ */
305
+ completed: import_zod11.z.boolean().optional(),
306
+ tuition: zTuition.optional(),
307
+ paid: import_zod11.z.boolean().optional(),
308
+ notes: import_zod11.z.string().optional()
309
+ });
310
+ var zMClassTracker = extendZodObjectForMongoose(zClassTracker);
311
+
312
+ // src/interface/tracking/groupTracker.ts
313
+ var import_zod14 = require("zod");
314
+
315
+ // src/interface/tracking/scheduleData.ts
316
+ var import_zod12 = require("zod");
317
+ var zScheduleData = import_zod12.z.object({
318
+ startTime: import_zod12.z.string(),
319
+ // String in 24 hour "HH:mm" format
320
+ dayOfWeek: import_zod12.z.number().int().min(0).max(6)
321
+ // integeters in 0 - 6
322
+ });
323
+
324
+ // src/interface/course/ageGroup.ts
325
+ var AgeGroup = /* @__PURE__ */ ((AgeGroup2) => {
326
+ AgeGroup2["ADULT"] = "Adult";
327
+ AgeGroup2["YOUTH"] = "Youth";
328
+ return AgeGroup2;
329
+ })(AgeGroup || {});
330
+
331
+ // src/interface/course/category.ts
332
+ var CourseCategory = /* @__PURE__ */ ((CourseCategory2) => {
333
+ CourseCategory2["GROUP"] = "group";
334
+ CourseCategory2["PRIVATE"] = "private";
335
+ CourseCategory2["SEMIPRIVATE"] = "semiprivate";
336
+ CourseCategory2["CAMP"] = "camp";
337
+ return CourseCategory2;
338
+ })(CourseCategory || {});
339
+
340
+ // src/interface/course/school.ts
341
+ var NYIGSchool = /* @__PURE__ */ ((NYIGSchool2) => {
342
+ NYIGSchool2["MANHATTAN"] = "Manhattan";
343
+ NYIGSchool2["LITTLENECK"] = "Little Neck";
344
+ NYIGSchool2["ONLINE"] = "Online";
345
+ return NYIGSchool2;
346
+ })(NYIGSchool || {});
347
+
348
+ // src/interface/course/course.ts
349
+ var import_zod13 = require("zod");
350
+ var zCourse = import_zod13.z.object({
351
+ name: import_zod13.z.string(),
352
+ category: import_zod13.z.nativeEnum(CourseCategory),
353
+ /**
354
+ * @unit SECONDS - Duration of the course in seconds
355
+ */
356
+ duration: import_zod13.z.number(),
357
+ /**
358
+ * @unit CENTS - Price of the course in cents
359
+ */
360
+ price: import_zod13.z.number(),
361
+ description: import_zod13.z.string().optional(),
362
+ /**
363
+ * NYIG School locations
364
+ */
365
+ nyigSchool: import_zod13.z.nativeEnum(NYIGSchool),
366
+ /**
367
+ * Recommended level before taking this course
368
+ */
369
+ recLevel: import_zod13.z.string(),
370
+ /**
371
+ * Camp tuition for half-day option
372
+ */
373
+ halfCampTuition: import_zod13.z.number(),
374
+ /**
375
+ * Camp tuition for full-day option
376
+ */
377
+ fullCampTuition: import_zod13.z.number()
378
+ });
379
+ var zMCourse = extendZodObjectForMongoose(zCourse);
380
+
381
+ // src/interface/tracking/groupTracker.ts
382
+ var zGroupTracker = import_zod14.z.object({
383
+ /**
384
+ * Mongoose object ID
385
+ */
386
+ course: import_zod14.z.string(),
387
+ /**
388
+ * Mongoose object ID
389
+ */
390
+ teacher: import_zod14.z.string(),
391
+ /**
392
+ * Mongoose object ID
393
+ */
394
+ semester: import_zod14.z.string(),
395
+ scheduleData: zScheduleData,
396
+ /**
397
+ * occurrences are tracked by week for Groups
398
+ */
399
+ occurrences: import_zod14.z.array(import_zod14.z.coerce.date()),
400
+ /**
401
+ * attendances are tracked by week for Groups
402
+ */
403
+ attendances: import_zod14.z.array(import_zod14.z.string()),
404
+ /**
405
+ * ID of the course instance, e.g., 101
406
+ */
407
+ courseId: import_zod14.z.string().optional(),
408
+ /**
409
+ * Age group of the class instance, e.g. "adult", "youth"
410
+ */
411
+ ageGroup: import_zod14.z.nativeEnum(AgeGroup).optional(),
412
+ /**
413
+ * If true, the course is hidden from public view
414
+ */
415
+ isNonPublic: import_zod14.z.boolean().optional(),
416
+ notes: import_zod14.z.string().optional()
417
+ });
418
+ var zMGroupTracker = extendZodObjectForMongoose(zGroupTracker);
419
+
420
+ // src/interface/booking/campBooking.ts
421
+ var zCampBooking = import_zod15.z.object({
422
+ userId: import_zod15.z.string().optional(),
423
+ ctId: import_zod15.z.string().optional(),
424
+ isOnline: import_zod15.z.boolean(),
425
+ classDates: import_zod15.z.string(),
426
+ campOption: import_zod15.z.nativeEnum(CampOption),
427
+ shipping: import_zod15.z.boolean().optional()
428
+ }).merge(zBUserInfo).merge(zBPaymentInfo);
429
+ var zMCampBooking = extendZodObjectForMongoose(zCampBooking);
430
+
431
+ // src/interface/public/aurora.ts
432
+ var import_zod16 = require("zod");
433
+ var zTeacherDisplay = import_zod16.z.object({
434
+ name: import_zod16.z.string(),
435
+ email: import_zod16.z.string().email(),
436
+ title: import_zod16.z.string(),
437
+ imageUrl: import_zod16.z.string(),
438
+ bio: import_zod16.z.string()
439
+ });
440
+ var zCourseTable = import_zod16.z.object({
441
+ id: import_zod16.z.string(),
442
+ name: import_zod16.z.string(),
443
+ duration: import_zod16.z.number(),
444
+ dateAndTime: import_zod16.z.string(),
445
+ recommendedLevel: import_zod16.z.string(),
446
+ tuition: import_zod16.z.string()
447
+ });
448
+
449
+ // src/interface/public/imageDef.ts
450
+ var import_zod17 = require("zod");
451
+ var zImageDef = import_zod17.z.object({
452
+ url: import_zod17.z.string(),
453
+ height: import_zod17.z.number(),
454
+ width: import_zod17.z.number()
455
+ });
456
+
457
+ // src/interface/reporting/reportTicket.ts
458
+ var import_zod18 = require("zod");
459
+ var TicketStatus = /* @__PURE__ */ ((TicketStatus2) => {
460
+ TicketStatus2["REQUESTED"] = "Requested";
461
+ TicketStatus2["IN_PROGRESS"] = "In-progress";
462
+ TicketStatus2["SIGN_OFF"] = "Sign-off";
463
+ TicketStatus2["COMPLETED"] = "Completed";
464
+ return TicketStatus2;
465
+ })(TicketStatus || {});
466
+ var zReportTicket = import_zod18.z.object({
467
+ requester: import_zod18.z.string(),
468
+ resolver: import_zod18.z.string(),
469
+ status: import_zod18.z.nativeEnum(TicketStatus),
470
+ title: import_zod18.z.string(),
471
+ description: import_zod18.z.string()
472
+ });
473
+ var zMReportTicket = extendZodObjectForMongoose(zReportTicket);
474
+
475
+ // src/interface/semester/season.ts
476
+ var Season = /* @__PURE__ */ ((Season2) => {
477
+ Season2["FALL"] = "fall";
478
+ Season2["SPRING"] = "spring";
479
+ Season2["SUMMER"] = "summer";
480
+ return Season2;
481
+ })(Season || {});
482
+
483
+ // src/interface/semester/semester.ts
484
+ var import_zod19 = require("zod");
485
+ var zSemester = import_zod19.z.object({
486
+ season: import_zod19.z.nativeEnum(Season),
487
+ year: import_zod19.z.number().min(2022).max(2999),
488
+ startDate: import_zod19.z.coerce.date(),
489
+ endDate: import_zod19.z.coerce.date(),
490
+ /**
491
+ * Format: start, end, start, end, ...
492
+ */
493
+ blackoutDates: import_zod19.z.array(import_zod19.z.coerce.date()),
494
+ /**
495
+ * List of names of some break: date range
496
+ */
497
+ importantDates: import_zod19.z.array(import_zod19.z.string())
498
+ });
499
+ var zMSemester = extendZodObjectForMongoose(zSemester);
500
+
501
+ // src/interface/tournament/tConfig.ts
502
+ var import_zod21 = require("zod");
503
+
504
+ // src/interface/tournament/table.ts
505
+ var import_zod20 = require("zod");
506
+ var zTable = import_zod20.z.array(import_zod20.z.object({}));
507
+ var zDetailsTable = import_zod20.z.object({
508
+ fields: import_zod20.z.array(import_zod20.z.string()).length(2),
509
+ data: zTable
510
+ });
511
+ var zScheduleTable = import_zod20.z.object({
512
+ fields: import_zod20.z.array(import_zod20.z.string()).length(2),
513
+ data: import_zod20.z.map(import_zod20.z.string(), zTable)
514
+ });
515
+
516
+ // src/interface/tournament/tConfig.ts
517
+ var zTConfig = import_zod21.z.object({
518
+ /**
519
+ * Location of the event
520
+ */
521
+ location: import_zod21.z.string().optional(),
522
+ /**
523
+ * URL of the tournament on the official website
524
+ * Must be a valid URL link
525
+ */
526
+ url: import_zod21.z.string(),
527
+ /**
528
+ * Full name of the tournament
529
+ */
530
+ title: import_zod21.z.string(),
531
+ /**
532
+ * Abbreviated title of the tournament
533
+ */
534
+ shortTitle: import_zod21.z.string(),
535
+ /**
536
+ * Tournament start date and time
537
+ */
538
+ tStart: import_zod21.z.coerce.date(),
539
+ /**
540
+ * Tournament end date and time
541
+ */
542
+ tEnd: import_zod21.z.coerce.date(),
543
+ /**
544
+ * Short description for tournament card
545
+ */
546
+ shortDescription: import_zod21.z.string(),
547
+ /**
548
+ * Full description
549
+ */
550
+ description: import_zod21.z.string(),
551
+ /**
552
+ * Defines the tournament details table with 2 columns
553
+ * typically Time and Event
554
+ */
555
+ details: zDetailsTable,
556
+ /**
557
+ * Defines the tournament schedule.
558
+ * data is a map of tab title -> 2 column table rows.
559
+ */
560
+ schedule: zScheduleTable,
561
+ /**
562
+ * List of ticket object IDs for this tournament
563
+ */
564
+ tickets: import_zod21.z.array(import_zod21.z.string()),
565
+ /**
566
+ * If false, the tournament registration is closed
567
+ */
568
+ canRegister: import_zod21.z.boolean(),
569
+ /**
570
+ * If true, free form donation amounts are disabled.
571
+ */
572
+ donationsDisabled: import_zod21.z.boolean().optional(),
573
+ /**
574
+ * Defines URL, height, width of the image
575
+ */
576
+ image: zImageDef.optional()
577
+ });
578
+ var zMTConfig = extendZodObjectForMongoose(zTConfig);
579
+
580
+ // src/interface/tournament/tReg.ts
581
+ var import_zod23 = require("zod");
582
+
583
+ // src/interface/tournament/tTicketReg.ts
584
+ var import_zod22 = require("zod");
585
+ var zTTicketReg = import_zod22.z.object({
586
+ /**
587
+ * Mongoose ID of the ticket
588
+ */
589
+ ticket: import_zod22.z.string(),
590
+ /**
591
+ * integer minimum 1, otherwise no ticket is being bought
592
+ */
593
+ amount: import_zod22.z.number().int().min(1)
594
+ });
595
+
596
+ // src/interface/tournament/tReg.ts
597
+ var zTReg = import_zod23.z.object({
598
+ agaId: import_zod23.z.string(),
599
+ /**
600
+ * Mongoose ID of the tournament that the participant is registering for
601
+ */
602
+ tournamentId: import_zod23.z.string(),
603
+ tickets: import_zod23.z.array(zTTicketReg),
604
+ /**
605
+ * @units CENTS - Donation in cents
606
+ */
607
+ donation: import_zod23.z.number().optional(),
608
+ /**
609
+ * How the registration was created, namely through public endpoint or admin
610
+ */
611
+ createMethod: import_zod23.z.string().optional(),
612
+ /**
613
+ * Mongoose ID of the admin that edited the registration
614
+ */
615
+ edited: import_zod23.z.string().optional()
616
+ }).merge(zBUserInfo).merge(zBPaymentInfo);
617
+ var zMTReg = extendZodObjectForMongoose(zTReg);
618
+
619
+ // src/interface/tournament/tTicket.ts
620
+ var import_zod24 = require("zod");
621
+ var zTTicket = import_zod24.z.object({
622
+ name: import_zod24.z.string(),
623
+ /**
624
+ * Price in cents
625
+ */
626
+ price: import_zod24.z.number(),
627
+ /**
628
+ * @optional description of the ticket
629
+ */
630
+ description: import_zod24.z.string().optional(),
631
+ /**
632
+ * @optional The ticket cannot be purchased if true
633
+ */
634
+ isNotBuyable: import_zod24.z.boolean().optional(),
635
+ /**
636
+ * @optional If date is provided and in the past, ticket cannot be purchased
637
+ */
638
+ lastBuytableDate: import_zod24.z.coerce.date().optional()
639
+ });
640
+ var zMTTicket = extendZodObjectForMongoose(zTTicket);
641
+
642
+ // src/interface/user/goRank.ts
643
+ var GoRank = /* @__PURE__ */ ((GoRank2) => {
644
+ GoRank2["KYU1"] = "1k";
645
+ GoRank2["KYU2"] = "2k";
646
+ GoRank2["KYU3"] = "3k";
647
+ GoRank2["KYU4"] = "4k";
648
+ GoRank2["KYU5"] = "5k";
649
+ GoRank2["KYU6"] = "6k";
650
+ GoRank2["KYU7"] = "7k";
651
+ GoRank2["KYU8"] = "8k";
652
+ GoRank2["KYU9"] = "9k";
653
+ GoRank2["KYU10"] = "10k";
654
+ GoRank2["KYU11"] = "11k";
655
+ GoRank2["KYU12"] = "12k";
656
+ GoRank2["KYU13"] = "13k";
657
+ GoRank2["KYU14"] = "14k";
658
+ GoRank2["KYU15"] = "15k";
659
+ GoRank2["KYU16"] = "16k";
660
+ GoRank2["KYU17"] = "17k";
661
+ GoRank2["KYU18"] = "18k";
662
+ GoRank2["KYU19"] = "19k";
663
+ GoRank2["KYU20"] = "20k";
664
+ GoRank2["KYU21"] = "21k";
665
+ GoRank2["KYU22"] = "22k";
666
+ GoRank2["KYU23"] = "23k";
667
+ GoRank2["KYU24"] = "24k";
668
+ GoRank2["KYU25"] = "25k";
669
+ GoRank2["DAN1"] = "1d";
670
+ GoRank2["DAN2"] = "2d";
671
+ GoRank2["DAN3"] = "3d";
672
+ GoRank2["DAN4"] = "4d";
673
+ GoRank2["DAN5"] = "5d";
674
+ GoRank2["DAN6"] = "6d";
675
+ GoRank2["DAN7"] = "7d";
676
+ GoRank2["PRO1"] = "1p";
677
+ GoRank2["PRO2"] = "2p";
678
+ GoRank2["PRO3"] = "3p";
679
+ GoRank2["PRO4"] = "4p";
680
+ GoRank2["PRO5"] = "5p";
681
+ GoRank2["PRO6"] = "6p";
682
+ GoRank2["PRO7"] = "7p";
683
+ GoRank2["PRO8"] = "8p";
684
+ GoRank2["PRO9"] = "9p";
685
+ return GoRank2;
686
+ })(GoRank || {});
687
+
688
+ // src/interface/user/user.ts
689
+ var import_zod26 = require("zod");
690
+
691
+ // src/interface/user/userRoles.ts
692
+ var import_zod25 = require("zod");
693
+ var zUserRoles = import_zod25.z.object({
694
+ user: import_zod25.z.number().int(),
695
+ admin: import_zod25.z.number().int(),
696
+ superadmin: import_zod25.z.number().int()
697
+ });
698
+
699
+ // src/interface/user/user.ts
700
+ var zUser = import_zod26.z.object({
701
+ name: import_zod26.z.string().min(2).max(100),
702
+ username: import_zod26.z.string().optional(),
703
+ password: import_zod26.z.string().optional(),
704
+ roles: zUserRoles.optional(),
705
+ email: import_zod26.z.string().email().max(100).optional(),
706
+ address: import_zod26.z.string().optional(),
707
+ country: import_zod26.z.string().optional(),
708
+ phoneNumber: import_zod26.z.string().optional(),
709
+ birthDate: import_zod26.z.string().optional()
710
+ });
711
+ var zMUser = extendZodObjectForMongoose(zUser);
712
+ var zStudent = zUser.extend({
713
+ rank: import_zod26.z.nativeEnum(GoRank),
714
+ // Object ID in mongoose linked to a user
715
+ guardian: import_zod26.z.string().optional()
716
+ });
717
+ var zMStudent = extendZodObjectForMongoose(zStudent);
718
+ var zTeacher = zUser.extend({
719
+ rank: import_zod26.z.nativeEnum(GoRank),
720
+ /**
721
+ * Inactive teachers are not shown on public endpoints
722
+ */
723
+ isInactive: import_zod26.z.boolean().optional(),
724
+ /**
725
+ * Teacher's position, e.g., instructor, president
726
+ */
727
+ title: import_zod26.z.string().optional(),
728
+ /**
729
+ * Teacher's bio text describing experience
730
+ * new lines will be rendered as paragraphs
731
+ */
732
+ bio: import_zod26.z.string().optional(),
733
+ /** Format is illustrated below, where teacher is available
734
+ * Mon 9-12am 3-6pm & Tue 10-12am 6-10pm
735
+ * [
736
+ * [[9, 12], [15, 18]],
737
+ * [[10, 12], [18, 20]],
738
+ * [],
739
+ * [],
740
+ * [],
741
+ * [],
742
+ * [],
743
+ * ]
744
+ */
745
+ available: import_zod26.z.array(import_zod26.z.array(import_zod26.z.array(import_zod26.z.number()))).optional()
746
+ });
747
+ var zMTeacher = extendZodObjectForMongoose(zTeacher);
33
748
  // Annotate the CommonJS export names for ESM import in node:
34
749
  0 && (module.exports = {
35
- zStudent
750
+ AgeGroup,
751
+ AttendState,
752
+ CampOption,
753
+ CourseCategory,
754
+ GoRank,
755
+ NYIGSchool,
756
+ PaymentMethod,
757
+ Season,
758
+ zAttendance,
759
+ zBPaymentInfo,
760
+ zBUserInfo,
761
+ zCampBooking,
762
+ zCampTracker,
763
+ zClassTracker,
764
+ zCourse,
765
+ zCourseTable,
766
+ zDetailsTable,
767
+ zDiscount,
768
+ zGroupBooking,
769
+ zGroupTracker,
770
+ zImageDef,
771
+ zInvoice,
772
+ zInvoiceItem,
773
+ zInvoicePackage,
774
+ zMAttendance,
775
+ zMCampBooking,
776
+ zMCampTracker,
777
+ zMClassTracker,
778
+ zMCourse,
779
+ zMGroupBooking,
780
+ zMGroupTracker,
781
+ zMInvoice,
782
+ zMPrivateBooking,
783
+ zMReportTicket,
784
+ zMSemester,
785
+ zMStudent,
786
+ zMTConfig,
787
+ zMTReg,
788
+ zMTTicket,
789
+ zMTeacher,
790
+ zMTeacherPayment,
791
+ zMUser,
792
+ zPrivateBooking,
793
+ zReportTicket,
794
+ zScheduleData,
795
+ zScheduleTable,
796
+ zSemester,
797
+ zStudent,
798
+ zTConfig,
799
+ zTReg,
800
+ zTTicket,
801
+ zTTicketReg,
802
+ zTeacher,
803
+ zTeacherDisplay,
804
+ zTeacherPayment,
805
+ zTeacherPaymentRow,
806
+ zTuition,
807
+ zUser,
808
+ zUserRoles
36
809
  });