@nyig/models 0.2.12 → 0.2.13

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 +186 -260
  2. package/index.d.ts +186 -260
  3. package/index.js +204 -242
  4. package/index.mjs +204 -242
  5. package/package.json +1 -1
package/index.mjs CHANGED
@@ -39,7 +39,7 @@ var BookingType = /* @__PURE__ */ ((BookingType2) => {
39
39
  })(BookingType || {});
40
40
 
41
41
  // src/interface/booking/campBooking.ts
42
- import { z as z13 } from "zod";
42
+ import { z as z14 } from "zod";
43
43
 
44
44
  // src/interface/mongoose/mongoose.ts
45
45
  import { z as z3 } from "zod";
@@ -80,8 +80,9 @@ var CampOption = /* @__PURE__ */ ((CampOption2) => {
80
80
  })(CampOption || {});
81
81
 
82
82
  // src/interface/tracking/attendance.ts
83
+ import { Types as Types2 } from "mongoose";
83
84
  var zAttendance = z5.object({
84
- student: z5.string(),
85
+ student: z5.instanceof(Types2.ObjectId),
85
86
  states: z5.array(z5.nativeEnum(AttendState)),
86
87
  tuition: zTuition,
87
88
  paid: z5.boolean().optional(),
@@ -90,37 +91,37 @@ var zAttendance = z5.object({
90
91
  var zMAttendance = extendZodObjectForMongoose(zAttendance);
91
92
 
92
93
  // src/interface/tracking/campTracker.ts
94
+ import { z as z7 } from "zod";
95
+
96
+ // src/interface/tracking/tracker.ts
97
+ import { Types as Types3 } from "mongoose";
93
98
  import { z as z6 } from "zod";
94
- var zCampTracker = z6.object({
95
- /**
96
- * Mongoose object ID
97
- */
98
- course: z6.string(),
99
- /**
100
- * Mongoose object ID
101
- */
102
- teacher: z6.string(),
103
- /**
104
- * Mongoose object ID
105
- */
106
- semester: z6.string(),
99
+ var zTracker = z6.object({
100
+ course: z6.instanceof(Types3.ObjectId),
101
+ teacher: z6.instanceof(Types3.ObjectId),
102
+ semester: z6.instanceof(Types3.ObjectId)
103
+ });
104
+
105
+ // src/interface/tracking/campTracker.ts
106
+ var zCampTracker = z7.object({
107
107
  /**
108
108
  * occurrences are tracked by week for camps
109
109
  */
110
- occurrences: z6.array(z6.string()),
110
+ occurrences: z7.array(z7.string()),
111
111
  /**
112
112
  * attendances are tracked by week for camps
113
113
  */
114
- attendances: z6.array(z6.string()),
115
- notes: z6.string().optional()
116
- });
114
+ attendances: z7.array(z7.string()),
115
+ notes: z7.string().optional()
116
+ }).merge(zTracker);
117
117
  var zMCampTracker = extendZodObjectForMongoose(zCampTracker);
118
118
 
119
119
  // src/interface/tracking/classTracker.ts
120
- import { z as z9 } from "zod";
120
+ import { z as z10 } from "zod";
121
121
 
122
122
  // src/interface/payment/invoice.ts
123
- import { z as z7 } from "zod";
123
+ import { Types as Types4 } from "mongoose";
124
+ import { z as z8 } from "zod";
124
125
 
125
126
  // src/interface/payment/paymentMethod.ts
126
127
  var PaymentMethod = /* @__PURE__ */ ((PaymentMethod2) => {
@@ -132,94 +133,70 @@ var PaymentMethod = /* @__PURE__ */ ((PaymentMethod2) => {
132
133
  })(PaymentMethod || {});
133
134
 
134
135
  // src/interface/payment/invoice.ts
135
- var zDiscount = z7.object({
136
- desc: z7.string(),
137
- amount: z7.number()
136
+ var zDiscount = z8.object({
137
+ desc: z8.string(),
138
+ amount: z8.number()
138
139
  });
139
- var zInvoiceItem = z7.object({
140
- /**
141
- * Mongoose object ID
142
- */
143
- course: z7.string(),
144
- price: z7.number(),
145
- units: z7.number()
140
+ var zInvoiceItem = z8.object({
141
+ course: z8.instanceof(Types4.ObjectId),
142
+ price: z8.number(),
143
+ units: z8.number()
146
144
  });
147
- var zInvoicePackage = z7.object({
148
- /**
149
- * Mongoose object ID
150
- */
151
- student: z7.string(),
152
- items: z7.array(zInvoiceItem)
145
+ var zInvoicePackage = z8.object({
146
+ student: z8.instanceof(Types4.ObjectId),
147
+ items: z8.array(zInvoiceItem)
153
148
  });
154
- var zInvoice = z7.object({
155
- billTo: z7.string(),
156
- packages: z7.array(zInvoicePackage),
157
- discounts: z7.array(zDiscount),
158
- textbook: z7.number().int().min(1).optional(),
159
- shipping: z7.number().int().min(1).optional(),
160
- paid: z7.nativeEnum(PaymentMethod).optional(),
161
- notes: z7.string().optional(),
162
- /**
163
- * Mongoose object ID
164
- */
165
- createdBy: z7.string(),
166
- /**
167
- * Mongoose object ID
168
- */
169
- lastEditBy: z7.string().optional()
149
+ var zInvoice = z8.object({
150
+ billTo: z8.string(),
151
+ packages: z8.array(zInvoicePackage),
152
+ discounts: z8.array(zDiscount),
153
+ textbook: z8.number().int().min(1).optional(),
154
+ shipping: z8.number().int().min(1).optional(),
155
+ paid: z8.nativeEnum(PaymentMethod).optional(),
156
+ notes: z8.string().optional(),
157
+ createdBy: z8.instanceof(Types4.ObjectId),
158
+ lastEditBy: z8.instanceof(Types4.ObjectId).optional()
170
159
  });
171
160
  var zMInvoice = extendZodObjectForMongoose(zInvoice);
172
161
 
173
162
  // src/interface/payment/teacherPayment.ts
174
- import { z as z8 } from "zod";
175
- var zTeacherPaymentRow = z8.object({
176
- course: z8.string(),
177
- length: z8.number(),
178
- count: z8.number(),
179
- wage: z8.number()
163
+ import { z as z9 } from "zod";
164
+ var zTeacherPaymentRow = z9.object({
165
+ course: z9.string(),
166
+ length: z9.number(),
167
+ count: z9.number(),
168
+ wage: z9.number()
180
169
  });
181
- var zTeacherPayment = z8.object({
182
- teacher: z8.string(),
183
- rows: z8.array(zTeacherPaymentRow),
184
- paid: z8.boolean().optional()
170
+ var zTeacherPayment = z9.object({
171
+ teacher: z9.string(),
172
+ rows: z9.array(zTeacherPaymentRow),
173
+ paid: z9.boolean().optional()
185
174
  });
186
175
  var zMTeacherPayment = extendZodObjectForMongoose(zTeacherPayment);
187
176
 
188
177
  // src/interface/tracking/classTracker.ts
189
- var zClassTracker = z9.object({
190
- /**
191
- * Mongoose object ID
192
- */
193
- course: z9.string(),
194
- /**
195
- * Mongoose object ID
196
- */
197
- teacher: z9.string(),
198
- /**
199
- * Mongoose object ID
200
- */
201
- semester: z9.string(),
202
- classTimes: z9.array(z9.coerce.date()),
203
- completedList: z9.array(z9.boolean()),
178
+ var zClassTracker = z10.object({
179
+ classTimes: z10.array(z10.coerce.date()),
180
+ completedList: z10.array(z10.boolean()),
204
181
  /**
205
182
  * Virtual mongoose field when all values in completedList is true
206
183
  */
207
- completed: z9.boolean().optional(),
184
+ completed: z10.boolean().optional(),
208
185
  tuition: zTuition.optional(),
209
- paid: z9.boolean().optional(),
210
- notes: z9.string().optional()
211
- });
186
+ paid: z10.boolean().optional(),
187
+ notes: z10.string().optional()
188
+ }).merge(zTracker);
212
189
  var zMClassTracker = extendZodObjectForMongoose(zClassTracker);
213
190
 
214
191
  // src/interface/tracking/groupTracker.ts
215
- import { z as z12 } from "zod";
192
+ import { z as z13 } from "zod";
216
193
 
217
194
  // src/interface/tracking/scheduleData.ts
218
- import { z as z10 } from "zod";
219
- var zScheduleData = z10.object({
220
- startTime: z10.string(),
195
+ import { z as z11 } from "zod";
196
+ var zScheduleData = z11.object({
197
+ startTime: z11.string(),
221
198
  // String in 24 hour "HH:mm" format
222
- dayOfWeek: z10.number().int().min(0).max(6)
199
+ dayOfWeek: z11.number().int().min(0).max(6)
223
200
  // integeters in 0 - 6
224
201
  });
225
202
 
@@ -248,138 +225,126 @@ var NYIGSchool = /* @__PURE__ */ ((NYIGSchool2) => {
248
225
  })(NYIGSchool || {});
249
226
 
250
227
  // src/interface/course/course.ts
251
- import { z as z11 } from "zod";
252
- var zCourse = z11.object({
253
- name: z11.string(),
254
- category: z11.nativeEnum(CourseCategory),
228
+ import { z as z12 } from "zod";
229
+ var zCourse = z12.object({
230
+ name: z12.string(),
231
+ category: z12.nativeEnum(CourseCategory),
255
232
  /**
256
233
  * @unit SECONDS - Duration of the course in seconds
257
234
  */
258
- duration: z11.number(),
235
+ duration: z12.number(),
259
236
  /**
260
237
  * @unit CENTS - Price of the course in cents
261
238
  */
262
- price: z11.number(),
263
- description: z11.string().optional(),
239
+ price: z12.number(),
240
+ description: z12.string().optional(),
264
241
  /**
265
242
  * NYIG School locations
266
243
  */
267
- nyigSchool: z11.nativeEnum(NYIGSchool),
244
+ nyigSchool: z12.nativeEnum(NYIGSchool),
268
245
  /**
269
246
  * Recommended level before taking this course
270
247
  */
271
- recLevel: z11.string(),
248
+ recLevel: z12.string(),
272
249
  /**
273
250
  * Camp tuition for half-day option
274
251
  */
275
- halfCampTuition: z11.number(),
252
+ halfCampTuition: z12.number(),
276
253
  /**
277
254
  * Camp tuition for full-day option
278
255
  */
279
- fullCampTuition: z11.number()
256
+ fullCampTuition: z12.number()
280
257
  });
281
258
  var zMCourse = extendZodObjectForMongoose(zCourse);
282
259
 
283
260
  // src/interface/tracking/groupTracker.ts
284
- var zGroupTracker = z12.object({
285
- /**
286
- * Mongoose object ID
287
- */
288
- course: z12.string(),
289
- /**
290
- * Mongoose object ID
291
- */
292
- teacher: z12.string(),
293
- /**
294
- * Mongoose object ID
295
- */
296
- semester: z12.string(),
261
+ var zGroupTracker = z13.object({
297
262
  scheduleData: zScheduleData,
298
263
  /**
299
264
  * occurrences are tracked by week for Groups
300
265
  */
301
- occurrences: z12.array(z12.coerce.date()),
266
+ occurrences: z13.array(z13.coerce.date()),
302
267
  /**
303
268
  * attendances are tracked by week for Groups
304
269
  */
305
- attendances: z12.array(z12.string()),
270
+ attendances: z13.array(z13.string()),
306
271
  /**
307
- * ID of the course instance, e.g., 101
272
+ * public-facing ID of the course instance, e.g., 101
308
273
  */
309
- courseId: z12.string().optional(),
274
+ courseId: z13.string().optional(),
310
275
  /**
311
276
  * Age group of the class instance, e.g. "adult", "youth"
312
277
  */
313
- ageGroup: z12.nativeEnum(AgeGroup).optional(),
278
+ ageGroup: z13.nativeEnum(AgeGroup).optional(),
314
279
  /**
315
280
  * If true, the course is hidden from public view
316
281
  */
317
- isNonPublic: z12.boolean().optional(),
318
- notes: z12.string().optional()
319
- });
282
+ isNonPublic: z13.boolean().optional(),
283
+ notes: z13.string().optional()
284
+ }).merge(zTracker);
320
285
  var zMGroupTracker = extendZodObjectForMongoose(zGroupTracker);
321
286
 
322
287
  // src/interface/booking/campBooking.ts
323
- var zCampBooking = z13.object({
324
- userId: z13.string().optional(),
325
- ctId: z13.string().optional(),
326
- isOnline: z13.boolean(),
327
- classDates: z13.string(),
328
- campOption: z13.nativeEnum(CampOption),
329
- shipping: z13.boolean().optional()
288
+ var zCampBooking = z14.object({
289
+ userId: z14.string().optional(),
290
+ ctId: z14.string().optional(),
291
+ isOnline: z14.boolean(),
292
+ classDates: z14.string(),
293
+ campOption: z14.nativeEnum(CampOption),
294
+ shipping: z14.boolean().optional()
330
295
  }).merge(zBUserInfo).merge(zBPaymentInfo);
331
296
  var zMCampBooking = extendZodObjectForMongoose(zCampBooking);
332
297
 
333
298
  // src/interface/booking/groupBooking.ts
334
- import { z as z14 } from "zod";
335
- var zGroupBooking = z14.object({
336
- userId: z14.string().optional(),
337
- gtId: z14.string().optional(),
338
- isTrial: z14.boolean().optional(),
339
- isOnline: z14.boolean(),
340
- classDate: z14.string().optional(),
341
- shipping: z14.boolean().optional()
299
+ import { z as z15 } from "zod";
300
+ var zGroupBooking = z15.object({
301
+ userId: z15.string().optional(),
302
+ gtId: z15.string().optional(),
303
+ isTrial: z15.boolean().optional(),
304
+ isOnline: z15.boolean(),
305
+ classDate: z15.string().optional(),
306
+ shipping: z15.boolean().optional()
342
307
  }).merge(zBUserInfo).merge(zBPaymentInfo);
343
308
  var zMGroupBooking = extendZodObjectForMongoose(zGroupBooking);
344
309
 
345
310
  // src/interface/booking/privateBooking.ts
346
- import { z as z15 } from "zod";
347
- var zPrivateBooking = z15.object({
348
- userId: z15.string().optional(),
349
- courseId: z15.string(),
350
- teacherId: z15.string(),
351
- classDate: z15.string().optional()
311
+ import { z as z16 } from "zod";
312
+ var zPrivateBooking = z16.object({
313
+ userId: z16.string().optional(),
314
+ courseId: z16.string(),
315
+ teacherId: z16.string(),
316
+ classDate: z16.string().optional()
352
317
  }).merge(zBUserInfo).merge(zBPaymentInfo);
353
318
  var zMPrivateBooking = extendZodObjectForMongoose(zPrivateBooking);
354
319
 
355
320
  // src/interface/public/aurora.ts
356
- import { z as z16 } from "zod";
357
- var zTeacherDisplay = z16.object({
358
- name: z16.string(),
359
- email: z16.string().email(),
360
- title: z16.string(),
361
- imageUrl: z16.string(),
362
- bio: z16.string()
321
+ import { z as z17 } from "zod";
322
+ var zTeacherDisplay = z17.object({
323
+ name: z17.string(),
324
+ email: z17.string().email(),
325
+ title: z17.string(),
326
+ imageUrl: z17.string(),
327
+ bio: z17.string()
363
328
  });
364
- var zCourseTable = z16.object({
365
- id: z16.string(),
366
- name: z16.string(),
367
- duration: z16.number(),
368
- dateAndTime: z16.string(),
369
- recommendedLevel: z16.string(),
370
- tuition: z16.string()
329
+ var zCourseTable = z17.object({
330
+ id: z17.string(),
331
+ name: z17.string(),
332
+ duration: z17.number(),
333
+ dateAndTime: z17.string(),
334
+ recommendedLevel: z17.string(),
335
+ tuition: z17.string()
371
336
  });
372
337
 
373
338
  // src/interface/public/imageDef.ts
374
- import { z as z17 } from "zod";
375
- var zImageDef = z17.object({
376
- url: z17.string(),
377
- height: z17.number(),
378
- width: z17.number()
339
+ import { z as z18 } from "zod";
340
+ var zImageDef = z18.object({
341
+ url: z18.string(),
342
+ height: z18.number(),
343
+ width: z18.number()
379
344
  });
380
345
 
381
346
  // src/interface/reporting/reportTicket.ts
382
- import { z as z18 } from "zod";
347
+ import { z as z19 } from "zod";
383
348
 
384
349
  // src/interface/reporting/ticketStatus.ts
385
350
  var TicketStatus = /* @__PURE__ */ ((TicketStatus2) => {
@@ -391,12 +356,12 @@ var TicketStatus = /* @__PURE__ */ ((TicketStatus2) => {
391
356
  })(TicketStatus || {});
392
357
 
393
358
  // src/interface/reporting/reportTicket.ts
394
- var zReportTicket = z18.object({
395
- requester: z18.string(),
396
- resolver: z18.string(),
397
- status: z18.nativeEnum(TicketStatus),
398
- title: z18.string(),
399
- description: z18.string()
359
+ var zReportTicket = z19.object({
360
+ requester: z19.string(),
361
+ resolver: z19.string(),
362
+ status: z19.nativeEnum(TicketStatus),
363
+ title: z19.string(),
364
+ description: z19.string()
400
365
  });
401
366
  var zMReportTicket = extendZodObjectForMongoose(zReportTicket);
402
367
 
@@ -409,73 +374,74 @@ var Season = /* @__PURE__ */ ((Season2) => {
409
374
  })(Season || {});
410
375
 
411
376
  // src/interface/semester/semester.ts
412
- import { z as z19 } from "zod";
413
- var zSemester = z19.object({
414
- season: z19.nativeEnum(Season),
415
- year: z19.number().min(2022).max(2999),
416
- startDate: z19.coerce.date(),
417
- endDate: z19.coerce.date(),
377
+ import { z as z20 } from "zod";
378
+ var zSemester = z20.object({
379
+ season: z20.nativeEnum(Season),
380
+ year: z20.number().min(2022).max(2999),
381
+ startDate: z20.coerce.date(),
382
+ endDate: z20.coerce.date(),
418
383
  /**
419
384
  * Format: start, end, start, end, ...
420
385
  */
421
- blackoutDates: z19.array(z19.coerce.date()),
386
+ blackoutDates: z20.array(z20.coerce.date()),
422
387
  /**
423
388
  * List of names of some break: date range
424
389
  */
425
- importantDates: z19.array(z19.string())
390
+ importantDates: z20.array(z20.string())
426
391
  });
427
392
  var zMSemester = extendZodObjectForMongoose(zSemester);
428
393
 
429
394
  // src/interface/tournament/tConfig.ts
430
- import { z as z21 } from "zod";
395
+ import { Types as Types5 } from "mongoose";
396
+ import { z as z22 } from "zod";
431
397
 
432
398
  // src/interface/tournament/table.ts
433
- import { z as z20 } from "zod";
434
- var zTable = z20.array(z20.object({}));
435
- var zDetailsTable = z20.object({
436
- fields: z20.array(z20.string()).length(2),
399
+ import { z as z21 } from "zod";
400
+ var zTable = z21.array(z21.object({}));
401
+ var zDetailsTable = z21.object({
402
+ fields: z21.array(z21.string()).length(2),
437
403
  data: zTable
438
404
  });
439
- var zScheduleTable = z20.object({
440
- fields: z20.array(z20.string()).length(2),
441
- data: z20.map(z20.string(), zTable)
405
+ var zScheduleTable = z21.object({
406
+ fields: z21.array(z21.string()).length(2),
407
+ data: z21.map(z21.string(), zTable)
442
408
  });
443
409
 
444
410
  // src/interface/tournament/tConfig.ts
445
- var zTConfig = z21.object({
411
+ var zTConfig = z22.object({
446
412
  /**
447
413
  * Location of the event
448
414
  */
449
- location: z21.string().optional(),
415
+ location: z22.string().optional(),
450
416
  /**
451
417
  * URL of the tournament on the official website
452
418
  * Must be a valid URL link
453
419
  */
454
- url: z21.string(),
420
+ url: z22.string(),
455
421
  /**
456
422
  * Full name of the tournament
457
423
  */
458
- title: z21.string(),
424
+ title: z22.string(),
459
425
  /**
460
426
  * Abbreviated title of the tournament
461
427
  */
462
- shortTitle: z21.string(),
428
+ shortTitle: z22.string(),
463
429
  /**
464
430
  * Tournament start date and time
465
431
  */
466
- tStart: z21.coerce.date(),
432
+ tStart: z22.coerce.date(),
467
433
  /**
468
434
  * Tournament end date and time
469
435
  */
470
- tEnd: z21.coerce.date(),
436
+ tEnd: z22.coerce.date(),
471
437
  /**
472
438
  * Short description for tournament card
473
439
  */
474
- shortDescription: z21.string(),
440
+ shortDescription: z22.string(),
475
441
  /**
476
442
  * Full description
477
443
  */
478
- description: z21.string(),
444
+ description: z22.string(),
479
445
  /**
480
446
  * Defines the tournament details table with 2 columns
481
447
  * typically Time and Event
@@ -489,15 +455,15 @@ var zTConfig = z21.object({
489
455
  /**
490
456
  * List of ticket object IDs for this tournament
491
457
  */
492
- tickets: z21.array(z21.string()),
458
+ tickets: z22.array(z22.instanceof(Types5.ObjectId)),
493
459
  /**
494
460
  * If false, the tournament registration is closed
495
461
  */
496
- canRegister: z21.boolean(),
462
+ canRegister: z22.boolean(),
497
463
  /**
498
464
  * If true, free form donation amounts are disabled.
499
465
  */
500
- donationsDisabled: z21.boolean().optional(),
466
+ donationsDisabled: z22.boolean().optional(),
501
467
  /**
502
468
  * Defines URL, height, width of the image
503
469
  */
@@ -506,64 +472,60 @@ var zTConfig = z21.object({
506
472
  var zMTConfig = extendZodObjectForMongoose(zTConfig);
507
473
 
508
474
  // src/interface/tournament/tReg.ts
509
- import { z as z23 } from "zod";
475
+ import { Types as Types7 } from "mongoose";
476
+ import { z as z24 } from "zod";
510
477
 
511
478
  // src/interface/tournament/tTicketReg.ts
512
- import { z as z22 } from "zod";
513
- var zTTicketReg = z22.object({
514
- /**
515
- * Mongoose ID of the ticket
516
- */
517
- ticket: z22.string(),
479
+ import { z as z23 } from "zod";
480
+ import { Types as Types6 } from "mongoose";
481
+ var zTTicketReg = z23.object({
482
+ ticket: z23.instanceof(Types6.ObjectId),
518
483
  /**
519
484
  * integer minimum 1, otherwise no ticket is being bought
520
485
  */
521
- amount: z22.number().int().min(1)
486
+ amount: z23.number().int().min(1)
522
487
  });
523
488
 
524
489
  // src/interface/tournament/tReg.ts
525
- var zTReg = z23.object({
526
- agaId: z23.string(),
527
- /**
528
- * Mongoose ID of the tournament that the participant is registering for
529
- */
530
- tournamentId: z23.string(),
531
- tickets: z23.array(zTTicketReg),
490
+ var zTReg = z24.object({
491
+ agaId: z24.string(),
492
+ tournamentId: z24.instanceof(Types7.ObjectId),
493
+ tickets: z24.array(zTTicketReg),
532
494
  /**
533
495
  * @units CENTS - Donation in cents
534
496
  */
535
- donation: z23.number().optional(),
497
+ donation: z24.number().optional(),
536
498
  /**
537
499
  * How the registration was created, namely through public endpoint or admin
538
500
  */
539
- createMethod: z23.string().optional(),
501
+ createMethod: z24.string().optional(),
540
502
  /**
541
503
  * Mongoose ID of the admin that edited the registration
542
504
  */
543
- edited: z23.string().optional()
505
+ edited: z24.instanceof(Types7.ObjectId).optional()
544
506
  }).merge(zBUserInfo).merge(zBPaymentInfo);
545
507
  var zMTReg = extendZodObjectForMongoose(zTReg);
546
508
 
547
509
  // src/interface/tournament/tTicket.ts
548
- import { z as z24 } from "zod";
549
- var zTTicket = z24.object({
550
- name: z24.string(),
510
+ import { z as z25 } from "zod";
511
+ var zTTicket = z25.object({
512
+ name: z25.string(),
551
513
  /**
552
514
  * Price in cents
553
515
  */
554
- price: z24.number(),
516
+ price: z25.number(),
555
517
  /**
556
518
  * @optional description of the ticket
557
519
  */
558
- description: z24.string().optional(),
520
+ description: z25.string().optional(),
559
521
  /**
560
522
  * @optional The ticket cannot be purchased if true
561
523
  */
562
- isNotBuyable: z24.boolean().optional(),
524
+ isNotBuyable: z25.boolean().optional(),
563
525
  /**
564
526
  * @optional If date is provided and in the past, ticket cannot be purchased
565
527
  */
566
- lastBuyableDate: z24.coerce.date().optional()
528
+ lastBuyableDate: z25.coerce.date().optional()
567
529
  });
568
530
  var zMTTicket = extendZodObjectForMongoose(zTTicket);
569
531
 
@@ -614,50 +576,50 @@ var GoRank = /* @__PURE__ */ ((GoRank2) => {
614
576
  })(GoRank || {});
615
577
 
616
578
  // src/interface/user/user.ts
617
- import { z as z26 } from "zod";
579
+ import { z as z27 } from "zod";
618
580
 
619
581
  // src/interface/user/userRoles.ts
620
- import { z as z25 } from "zod";
621
- var zUserRoles = z25.object({
622
- user: z25.number().int(),
623
- admin: z25.number().int(),
624
- superadmin: z25.number().int()
582
+ import { z as z26 } from "zod";
583
+ var zUserRoles = z26.object({
584
+ user: z26.number().int(),
585
+ admin: z26.number().int(),
586
+ superadmin: z26.number().int()
625
587
  });
626
588
 
627
589
  // src/interface/user/user.ts
628
- var zUser = z26.object({
629
- name: z26.string().min(2).max(100),
630
- username: z26.string().optional(),
631
- password: z26.string().optional(),
590
+ import { Types as Types8 } from "mongoose";
591
+ var zUser = z27.object({
592
+ name: z27.string().min(2).max(100),
593
+ username: z27.string().optional(),
594
+ password: z27.string().optional(),
632
595
  roles: zUserRoles.optional(),
633
- email: z26.string().email().max(100).optional(),
634
- address: z26.string().optional(),
635
- country: z26.string().optional(),
636
- phoneNumber: z26.string().optional(),
637
- birthDate: z26.string().optional()
596
+ email: z27.string().email().max(100).optional(),
597
+ address: z27.string().optional(),
598
+ country: z27.string().optional(),
599
+ phoneNumber: z27.string().optional(),
600
+ birthDate: z27.string().optional()
638
601
  });
639
602
  var zMUser = extendZodObjectForMongoose(zUser);
640
603
  var zStudent = zUser.extend({
641
- rank: z26.nativeEnum(GoRank),
642
- // Object ID in mongoose linked to a user
643
- guardian: z26.string().optional()
604
+ rank: z27.nativeEnum(GoRank),
605
+ guardian: z27.instanceof(Types8.ObjectId).optional()
644
606
  });
645
607
  var zMStudent = extendZodObjectForMongoose(zStudent);
646
608
  var zTeacher = zUser.extend({
647
- rank: z26.nativeEnum(GoRank),
609
+ rank: z27.nativeEnum(GoRank),
648
610
  /**
649
611
  * Inactive teachers are not shown on public endpoints
650
612
  */
651
- isInactive: z26.boolean().optional(),
613
+ isInactive: z27.boolean().optional(),
652
614
  /**
653
615
  * Teacher's position, e.g., instructor, president
654
616
  */
655
- title: z26.string().optional(),
617
+ title: z27.string().optional(),
656
618
  /**
657
619
  * Teacher's bio text describing experience
658
620
  * new lines will be rendered as paragraphs
659
621
  */
660
- bio: z26.string().optional(),
622
+ bio: z27.string().optional(),
661
623
  /** Format is illustrated below, where teacher is available
662
624
  * Mon 9-12am 3-6pm & Tue 10-12am 6-10pm
663
625
  * [
@@ -670,7 +632,7 @@ var zTeacher = zUser.extend({
670
632
  * [],
671
633
  * ]
672
634
  */
673
- available: z26.array(z26.array(z26.array(z26.number()))).optional()
635
+ available: z27.array(z27.array(z27.array(z27.number()))).optional()
674
636
  });
675
637
  var zMTeacher = extendZodObjectForMongoose(zTeacher);
676
638
  export {