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