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