@nyig/models 0.2.5 → 0.2.7

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