@nyig/models 0.2.13 → 0.2.15

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