@nyig/models 0.2.35 → 0.2.36

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 +395 -261
  2. package/index.d.ts +395 -261
  3. package/index.js +257 -248
  4. package/index.mjs +256 -248
  5. package/package.json +1 -1
package/index.js CHANGED
@@ -78,6 +78,7 @@ __export(src_exports, {
78
78
  zTeacher: () => zTeacher,
79
79
  zTeacherDisplay: () => zTeacherDisplay,
80
80
  zTeacherPayment: () => zTeacherPayment,
81
+ zTeacherPaymentResponse: () => zTeacherPaymentResponse,
81
82
  zTeacherPaymentRow: () => zTeacherPaymentRow,
82
83
  zTuition: () => zTuition,
83
84
  zUser: () => zUser,
@@ -127,7 +128,7 @@ var BookingType = /* @__PURE__ */ ((BookingType2) => {
127
128
  })(BookingType || {});
128
129
 
129
130
  // src/interface/booking/campBooking.ts
130
- var import_zod13 = require("zod");
131
+ var import_zod15 = require("zod");
131
132
 
132
133
  // src/interface/tracking/attendState.ts
133
134
  var AttendState = /* @__PURE__ */ ((AttendState2) => {
@@ -197,7 +198,7 @@ var zBCampTracker = import_zod6.z.object({
197
198
  var zCampTracker = addAutoProps(zBCampTracker);
198
199
 
199
200
  // src/interface/tracking/classTracker.ts
200
- var import_zod9 = require("zod");
201
+ var import_zod11 = require("zod");
201
202
 
202
203
  // src/interface/payment/invoice.ts
203
204
  var import_zod7 = require("zod");
@@ -239,47 +240,162 @@ var zBInvoice = import_zod7.z.object({
239
240
  var zInvoice = addAutoProps(zBInvoice);
240
241
 
241
242
  // src/interface/payment/teacherPayment.ts
243
+ var import_zod10 = require("zod");
244
+
245
+ // src/interface/user/goRank.ts
246
+ var GoRank = /* @__PURE__ */ ((GoRank2) => {
247
+ GoRank2["KYU1"] = "1k";
248
+ GoRank2["KYU2"] = "2k";
249
+ GoRank2["KYU3"] = "3k";
250
+ GoRank2["KYU4"] = "4k";
251
+ GoRank2["KYU5"] = "5k";
252
+ GoRank2["KYU6"] = "6k";
253
+ GoRank2["KYU7"] = "7k";
254
+ GoRank2["KYU8"] = "8k";
255
+ GoRank2["KYU9"] = "9k";
256
+ GoRank2["KYU10"] = "10k";
257
+ GoRank2["KYU11"] = "11k";
258
+ GoRank2["KYU12"] = "12k";
259
+ GoRank2["KYU13"] = "13k";
260
+ GoRank2["KYU14"] = "14k";
261
+ GoRank2["KYU15"] = "15k";
262
+ GoRank2["KYU16"] = "16k";
263
+ GoRank2["KYU17"] = "17k";
264
+ GoRank2["KYU18"] = "18k";
265
+ GoRank2["KYU19"] = "19k";
266
+ GoRank2["KYU20"] = "20k";
267
+ GoRank2["KYU21"] = "21k";
268
+ GoRank2["KYU22"] = "22k";
269
+ GoRank2["KYU23"] = "23k";
270
+ GoRank2["KYU24"] = "24k";
271
+ GoRank2["KYU25"] = "25k";
272
+ GoRank2["DAN1"] = "1d";
273
+ GoRank2["DAN2"] = "2d";
274
+ GoRank2["DAN3"] = "3d";
275
+ GoRank2["DAN4"] = "4d";
276
+ GoRank2["DAN5"] = "5d";
277
+ GoRank2["DAN6"] = "6d";
278
+ GoRank2["DAN7"] = "7d";
279
+ GoRank2["PRO1"] = "1p";
280
+ GoRank2["PRO2"] = "2p";
281
+ GoRank2["PRO3"] = "3p";
282
+ GoRank2["PRO4"] = "4p";
283
+ GoRank2["PRO5"] = "5p";
284
+ GoRank2["PRO6"] = "6p";
285
+ GoRank2["PRO7"] = "7p";
286
+ GoRank2["PRO8"] = "8p";
287
+ GoRank2["PRO9"] = "9p";
288
+ return GoRank2;
289
+ })(GoRank || {});
290
+
291
+ // src/interface/user/user.ts
242
292
  var import_zod8 = require("zod");
243
- var zTeacherPaymentRow = import_zod8.z.object({
244
- course: import_zod8.z.string().min(1, "select or enter a course"),
245
- length: import_zod8.z.coerce.number().gt(0, "must be > 0"),
246
- count: import_zod8.z.coerce.number().int().gt(0, "must be > 0"),
247
- wage: import_zod8.z.coerce.number().gt(0, "wage must be > 0")
293
+ var zBUser = import_zod8.z.object({
294
+ name: import_zod8.z.string().min(2).max(100),
295
+ username: import_zod8.z.string().optional(),
296
+ password: import_zod8.z.string().optional(),
297
+ roles: import_zod8.z.array(import_zod8.z.number().int()).optional(),
298
+ email: import_zod8.z.string().max(100).email().or(import_zod8.z.literal("")).optional(),
299
+ address: import_zod8.z.string().or(import_zod8.z.literal("")).optional(),
300
+ country: import_zod8.z.string().length(2, {
301
+ message: "Enter the 2-letter country code"
302
+ }).or(import_zod8.z.literal("")).optional(),
303
+ phoneNumber: import_zod8.z.string().regex(/^\d{10}/, {
304
+ message: `Please enter a valid 10-digit US phone number with numbers only`
305
+ }).or(import_zod8.z.literal("")).optional(),
306
+ birthDate: import_zod8.z.string().regex(/^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/, {
307
+ message: "Enter a valid date in yyyy-mm-dd format"
308
+ }).or(import_zod8.z.literal("")).optional()
248
309
  });
249
- var zBTeacherPayment = import_zod8.z.object({
250
- teacher: import_zod8.z.string().min(1, "select or enter a teacher"),
251
- rows: import_zod8.z.array(zTeacherPaymentRow),
252
- paid: import_zod8.z.boolean().optional()
310
+ var zUser = addAutoProps(zBUser);
311
+ var zStudent = zUser.extend({
312
+ rank: import_zod8.z.nativeEnum(GoRank),
313
+ guardian: import_zod8.z.string().optional()
314
+ });
315
+ var zTeacher = zUser.extend({
316
+ rank: import_zod8.z.nativeEnum(GoRank),
317
+ /**
318
+ * Inactive teachers are not shown on public endpoints
319
+ */
320
+ isInactive: import_zod8.z.boolean().optional(),
321
+ /**
322
+ * Teacher's position, e.g., instructor, president
323
+ */
324
+ title: import_zod8.z.string().optional(),
325
+ /**
326
+ * Teacher's bio text describing experience
327
+ * new lines will be rendered as paragraphs
328
+ */
329
+ bio: import_zod8.z.string().optional(),
330
+ /** Format is illustrated below, where teacher is available
331
+ * Mon 9-12am 3-6pm & Tue 10-12am 6-10pm
332
+ * [
333
+ * [[9, 12], [15, 18]],
334
+ * [[10, 12], [18, 20]],
335
+ * [],
336
+ * [],
337
+ * [],
338
+ * [],
339
+ * [],
340
+ * ]
341
+ */
342
+ available: import_zod8.z.array(import_zod8.z.array(import_zod8.z.array(import_zod8.z.number()))).optional()
343
+ });
344
+
345
+ // src/interface/user/userRoles.ts
346
+ var import_zod9 = require("zod");
347
+ var zUserRoles = import_zod9.z.object({
348
+ user: import_zod9.z.number().int(),
349
+ admin: import_zod9.z.number().int(),
350
+ superadmin: import_zod9.z.number().int()
351
+ });
352
+
353
+ // src/interface/payment/teacherPayment.ts
354
+ var zTeacherPaymentRow = import_zod10.z.object({
355
+ course: import_zod10.z.string().min(1, "select or enter a course"),
356
+ length: import_zod10.z.coerce.number().gt(0, "must be > 0"),
357
+ count: import_zod10.z.coerce.number().int().gt(0, "must be > 0"),
358
+ wage: import_zod10.z.coerce.number().gt(0, "wage must be > 0")
359
+ });
360
+ var zBTeacherPayment = import_zod10.z.object({
361
+ teacher: import_zod10.z.string().min(1, "select or enter a teacher"),
362
+ rows: import_zod10.z.array(zTeacherPaymentRow),
363
+ paid: import_zod10.z.boolean().optional()
253
364
  });
254
365
  var zTeacherPayment = addAutoProps(zBTeacherPayment);
366
+ var zTeacherPaymentResponse = import_zod10.z.object({
367
+ teacher: zTeacher,
368
+ rows: import_zod10.z.array(zTeacherPaymentRow),
369
+ paid: import_zod10.z.boolean().optional()
370
+ });
255
371
 
256
372
  // src/interface/tracking/classTracker.ts
257
- var zBClassTracker = import_zod9.z.object({
258
- course: import_zod9.z.string(),
259
- teacher: import_zod9.z.string(),
260
- student: import_zod9.z.string(),
261
- classTimes: import_zod9.z.array(import_zod9.z.coerce.date()),
262
- completedList: import_zod9.z.array(import_zod9.z.boolean()),
373
+ var zBClassTracker = import_zod11.z.object({
374
+ course: import_zod11.z.string(),
375
+ teacher: import_zod11.z.string(),
376
+ student: import_zod11.z.string(),
377
+ classTimes: import_zod11.z.array(import_zod11.z.coerce.date()),
378
+ completedList: import_zod11.z.array(import_zod11.z.boolean()),
263
379
  /**
264
380
  * Virtual mongoose field when all values in completedList is true
265
381
  */
266
- completed: import_zod9.z.boolean().optional(),
382
+ completed: import_zod11.z.boolean().optional(),
267
383
  tuition: zTuition.optional(),
268
- paid: import_zod9.z.boolean().optional(),
269
- paused: import_zod9.z.boolean().optional(),
270
- notes: import_zod9.z.string().optional()
384
+ paid: import_zod11.z.boolean().optional(),
385
+ paused: import_zod11.z.boolean().optional(),
386
+ notes: import_zod11.z.string().optional()
271
387
  });
272
388
  var zClassTracker = addAutoProps(zBClassTracker);
273
389
 
274
390
  // src/interface/tracking/groupTracker.ts
275
- var import_zod12 = require("zod");
391
+ var import_zod14 = require("zod");
276
392
 
277
393
  // src/interface/tracking/scheduleData.ts
278
- var import_zod10 = require("zod");
279
- var zScheduleData = import_zod10.z.object({
280
- startTime: import_zod10.z.string(),
394
+ var import_zod12 = require("zod");
395
+ var zScheduleData = import_zod12.z.object({
396
+ startTime: import_zod12.z.string(),
281
397
  // String in 24 hour "HH:mm" format
282
- dayOfWeek: import_zod10.z.number().int().min(0).max(6)
398
+ dayOfWeek: import_zod12.z.number().int().min(0).max(6)
283
399
  // integeters in 0 - 6
284
400
  });
285
401
 
@@ -308,126 +424,126 @@ var NYIGSchool = /* @__PURE__ */ ((NYIGSchool2) => {
308
424
  })(NYIGSchool || {});
309
425
 
310
426
  // src/interface/course/course.ts
311
- var import_zod11 = require("zod");
312
- var zBCourse = import_zod11.z.object({
313
- name: import_zod11.z.string(),
314
- category: import_zod11.z.nativeEnum(CourseCategory),
427
+ var import_zod13 = require("zod");
428
+ var zBCourse = import_zod13.z.object({
429
+ name: import_zod13.z.string(),
430
+ category: import_zod13.z.nativeEnum(CourseCategory),
315
431
  /**
316
432
  * @unit SECONDS - Duration of the course in seconds
317
433
  */
318
- duration: import_zod11.z.coerce.number().int("Duration in seconds must be a whole number").min(1, "Duration in seconds must not be less than or equal to 0"),
434
+ duration: import_zod13.z.coerce.number().int("Duration in seconds must be a whole number").min(1, "Duration in seconds must not be less than or equal to 0"),
319
435
  /**
320
436
  * @unit CENTS - Price of the course in cents
321
437
  */
322
- price: import_zod11.z.coerce.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0"),
323
- description: import_zod11.z.string().or(import_zod11.z.literal("")).optional(),
438
+ price: import_zod13.z.coerce.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0"),
439
+ description: import_zod13.z.string().or(import_zod13.z.literal("")).optional(),
324
440
  /**
325
441
  * NYIG School locations
326
442
  */
327
- nyigSchool: import_zod11.z.nativeEnum(NYIGSchool),
443
+ nyigSchool: import_zod13.z.nativeEnum(NYIGSchool),
328
444
  /**
329
445
  * Recommended level before taking this course
330
446
  */
331
- recLevel: import_zod11.z.string().or(import_zod11.z.literal("")).optional(),
447
+ recLevel: import_zod13.z.string().or(import_zod13.z.literal("")).optional(),
332
448
  /**
333
449
  * Camp tuition for half-day option
334
450
  */
335
- halfCampTuition: import_zod11.z.coerce.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0").optional(),
451
+ halfCampTuition: import_zod13.z.coerce.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0").optional(),
336
452
  /**
337
453
  * Camp tuition for full-day option
338
454
  */
339
- fullCampTuition: import_zod11.z.coerce.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0").optional()
455
+ fullCampTuition: import_zod13.z.coerce.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0").optional()
340
456
  });
341
457
  var zCourse = addAutoProps(zBCourse);
342
458
 
343
459
  // src/interface/tracking/groupTracker.ts
344
- var zBGroupTracker = import_zod12.z.object({
345
- course: import_zod12.z.string(),
346
- teacher: import_zod12.z.string(),
347
- semester: import_zod12.z.string(),
460
+ var zBGroupTracker = import_zod14.z.object({
461
+ course: import_zod14.z.string(),
462
+ teacher: import_zod14.z.string(),
463
+ semester: import_zod14.z.string(),
348
464
  scheduleData: zScheduleData,
349
465
  /**
350
466
  * occurrences are tracked by week for Groups
351
467
  */
352
- occurrences: import_zod12.z.array(import_zod12.z.coerce.date()),
468
+ occurrences: import_zod14.z.array(import_zod14.z.coerce.date()),
353
469
  /**
354
470
  * attendances are tracked by week for Groups
355
471
  */
356
- attendances: import_zod12.z.array(import_zod12.z.string()),
472
+ attendances: import_zod14.z.array(import_zod14.z.string()),
357
473
  /**
358
474
  * public-facing ID of the course instance, e.g., 101
359
475
  */
360
- courseId: import_zod12.z.string().optional(),
476
+ courseId: import_zod14.z.string().optional(),
361
477
  /**
362
478
  * Age group of the class instance, e.g. "adult", "youth"
363
479
  */
364
- ageGroup: import_zod12.z.nativeEnum(AgeGroup).optional(),
480
+ ageGroup: import_zod14.z.nativeEnum(AgeGroup).optional(),
365
481
  /**
366
482
  * If true, the course is hidden from public view
367
483
  */
368
- isNonPublic: import_zod12.z.boolean().optional(),
369
- notes: import_zod12.z.string().optional()
484
+ isNonPublic: import_zod14.z.boolean().optional(),
485
+ notes: import_zod14.z.string().optional()
370
486
  });
371
487
  var zGroupTracker = addAutoProps(zBGroupTracker);
372
488
 
373
489
  // src/interface/booking/campBooking.ts
374
- var zBCampBooking = import_zod13.z.object({
375
- ctId: import_zod13.z.string().optional(),
376
- isOnline: import_zod13.z.boolean(),
377
- classDates: import_zod13.z.string(),
378
- campOption: import_zod13.z.nativeEnum(CampOption),
379
- shipping: import_zod13.z.boolean().optional()
490
+ var zBCampBooking = import_zod15.z.object({
491
+ ctId: import_zod15.z.string().optional(),
492
+ isOnline: import_zod15.z.boolean(),
493
+ classDates: import_zod15.z.string(),
494
+ campOption: import_zod15.z.nativeEnum(CampOption),
495
+ shipping: import_zod15.z.boolean().optional()
380
496
  }).merge(zBUserInfo).merge(zBPaymentInfo);
381
497
  var zCampBooking = addAutoProps(zBCampBooking);
382
498
 
383
499
  // src/interface/booking/groupBooking.ts
384
- var import_zod14 = require("zod");
385
- var zBGroupBooking = import_zod14.z.object({
386
- gtId: import_zod14.z.string().optional(),
387
- isTrial: import_zod14.z.boolean().optional(),
388
- isOnline: import_zod14.z.boolean(),
389
- classDate: import_zod14.z.string().optional(),
390
- shipping: import_zod14.z.boolean().optional()
500
+ var import_zod16 = require("zod");
501
+ var zBGroupBooking = import_zod16.z.object({
502
+ gtId: import_zod16.z.string().optional(),
503
+ isTrial: import_zod16.z.boolean().optional(),
504
+ isOnline: import_zod16.z.boolean(),
505
+ classDate: import_zod16.z.string().optional(),
506
+ shipping: import_zod16.z.boolean().optional()
391
507
  }).merge(zBUserInfo).merge(zBPaymentInfo);
392
508
  var zGroupBooking = addAutoProps(zBGroupBooking);
393
509
 
394
510
  // src/interface/booking/privateBooking.ts
395
- var import_zod15 = require("zod");
396
- var zBPrivateBooking = import_zod15.z.object({
397
- courseId: import_zod15.z.string(),
398
- teacherId: import_zod15.z.string(),
399
- classDate: import_zod15.z.string().optional()
511
+ var import_zod17 = require("zod");
512
+ var zBPrivateBooking = import_zod17.z.object({
513
+ courseId: import_zod17.z.string(),
514
+ teacherId: import_zod17.z.string(),
515
+ classDate: import_zod17.z.string().optional()
400
516
  }).merge(zBUserInfo).merge(zBPaymentInfo);
401
517
  var zPrivateBooking = addAutoProps(zBPrivateBooking);
402
518
 
403
519
  // src/interface/public/aurora.ts
404
- var import_zod16 = require("zod");
405
- var zTeacherDisplay = import_zod16.z.object({
406
- name: import_zod16.z.string(),
407
- email: import_zod16.z.string().email(),
408
- title: import_zod16.z.string(),
409
- imageUrl: import_zod16.z.string(),
410
- bio: import_zod16.z.string()
411
- });
412
- var zCourseTable = import_zod16.z.object({
413
- id: import_zod16.z.string(),
414
- name: import_zod16.z.string(),
415
- duration: import_zod16.z.number(),
416
- dateAndTime: import_zod16.z.string(),
417
- recommendedLevel: import_zod16.z.string(),
418
- tuition: import_zod16.z.string()
520
+ var import_zod18 = require("zod");
521
+ var zTeacherDisplay = import_zod18.z.object({
522
+ name: import_zod18.z.string(),
523
+ email: import_zod18.z.string().email(),
524
+ title: import_zod18.z.string(),
525
+ imageUrl: import_zod18.z.string(),
526
+ bio: import_zod18.z.string()
527
+ });
528
+ var zCourseTable = import_zod18.z.object({
529
+ id: import_zod18.z.string(),
530
+ name: import_zod18.z.string(),
531
+ duration: import_zod18.z.number(),
532
+ dateAndTime: import_zod18.z.string(),
533
+ recommendedLevel: import_zod18.z.string(),
534
+ tuition: import_zod18.z.string()
419
535
  });
420
536
 
421
537
  // src/interface/public/imageDef.ts
422
- var import_zod17 = require("zod");
423
- var zImageDef = import_zod17.z.object({
424
- url: import_zod17.z.string(),
425
- height: import_zod17.z.number(),
426
- width: import_zod17.z.number()
538
+ var import_zod19 = require("zod");
539
+ var zImageDef = import_zod19.z.object({
540
+ url: import_zod19.z.string(),
541
+ height: import_zod19.z.number(),
542
+ width: import_zod19.z.number()
427
543
  });
428
544
 
429
545
  // src/interface/reporting/reportTicket.ts
430
- var import_zod18 = require("zod");
546
+ var import_zod20 = require("zod");
431
547
 
432
548
  // src/interface/reporting/ticketStatus.ts
433
549
  var TicketStatus = /* @__PURE__ */ ((TicketStatus2) => {
@@ -439,12 +555,12 @@ var TicketStatus = /* @__PURE__ */ ((TicketStatus2) => {
439
555
  })(TicketStatus || {});
440
556
 
441
557
  // src/interface/reporting/reportTicket.ts
442
- var zBReportTicket = import_zod18.z.object({
443
- requester: import_zod18.z.string(),
444
- resolver: import_zod18.z.string().optional(),
445
- status: import_zod18.z.nativeEnum(TicketStatus),
446
- title: import_zod18.z.string(),
447
- description: import_zod18.z.string()
558
+ var zBReportTicket = import_zod20.z.object({
559
+ requester: import_zod20.z.string(),
560
+ resolver: import_zod20.z.string().optional(),
561
+ status: import_zod20.z.nativeEnum(TicketStatus),
562
+ title: import_zod20.z.string(),
563
+ description: import_zod20.z.string()
448
564
  });
449
565
  var zReportTicket = addAutoProps(zBReportTicket);
450
566
 
@@ -457,96 +573,96 @@ var Season = /* @__PURE__ */ ((Season2) => {
457
573
  })(Season || {});
458
574
 
459
575
  // src/interface/semester/semester.ts
460
- var import_zod19 = require("zod");
461
- var zBSemester = import_zod19.z.object({
462
- season: import_zod19.z.nativeEnum(Season),
463
- year: import_zod19.z.number().min(2022).max(2999),
464
- startDate: import_zod19.z.coerce.date(),
465
- endDate: import_zod19.z.coerce.date(),
576
+ var import_zod21 = require("zod");
577
+ var zBSemester = import_zod21.z.object({
578
+ season: import_zod21.z.nativeEnum(Season),
579
+ year: import_zod21.z.number().min(2022).max(2999),
580
+ startDate: import_zod21.z.coerce.date(),
581
+ endDate: import_zod21.z.coerce.date(),
466
582
  /**
467
583
  * Format: start, end, start, end, ...
468
584
  */
469
- blackoutDates: import_zod19.z.array(import_zod19.z.coerce.date()),
585
+ blackoutDates: import_zod21.z.array(import_zod21.z.coerce.date()),
470
586
  /**
471
587
  * List of names of some break: date range
472
588
  */
473
- importantDates: import_zod19.z.array(import_zod19.z.string())
589
+ importantDates: import_zod21.z.array(import_zod21.z.string())
474
590
  });
475
591
  var zSemester = addAutoProps(zBSemester);
476
592
 
477
593
  // src/interface/event/eConfig.ts
478
- var import_zod22 = require("zod");
594
+ var import_zod24 = require("zod");
479
595
 
480
596
  // src/interface/event/eTicket.ts
481
- var import_zod20 = require("zod");
482
- var zBEventTicket = import_zod20.z.object({
483
- name: import_zod20.z.string().min(5, "Name must be at least 5 characters"),
597
+ var import_zod22 = require("zod");
598
+ var zBEventTicket = import_zod22.z.object({
599
+ name: import_zod22.z.string().min(5, "Name must be at least 5 characters"),
484
600
  /**
485
601
  * Price in cents
486
602
  */
487
- price: import_zod20.z.number().min(1, "Price must be at least $1"),
603
+ price: import_zod22.z.number().min(1, "Price must be at least $1"),
488
604
  /**
489
605
  * @optional description of the ticket
490
606
  */
491
- description: import_zod20.z.string().optional(),
607
+ description: import_zod22.z.string().optional(),
492
608
  /**
493
609
  * @optional The ticket cannot be purchased if true
494
610
  */
495
- isNotBuyable: import_zod20.z.boolean().optional(),
611
+ isNotBuyable: import_zod22.z.boolean().optional(),
496
612
  /**
497
613
  * @optional If date is provided and in the past, ticket cannot be purchased
498
614
  */
499
- lastBuyableDate: import_zod20.z.coerce.date().optional()
615
+ lastBuyableDate: import_zod22.z.coerce.date().optional()
500
616
  });
501
617
  var zEventTicket = addAutoProps(zBEventTicket);
502
618
 
503
619
  // src/interface/event/table.ts
504
- var import_zod21 = require("zod");
505
- var zTable = import_zod21.z.array(import_zod21.z.record(import_zod21.z.string(), import_zod21.z.string()));
506
- var zDetailsTable = import_zod21.z.object({
507
- fields: import_zod21.z.array(import_zod21.z.string()).length(2),
620
+ var import_zod23 = require("zod");
621
+ var zTable = import_zod23.z.array(import_zod23.z.record(import_zod23.z.string(), import_zod23.z.string()));
622
+ var zDetailsTable = import_zod23.z.object({
623
+ fields: import_zod23.z.array(import_zod23.z.string()).length(2),
508
624
  data: zTable
509
625
  });
510
- var zScheduleTable = import_zod21.z.object({
511
- fields: import_zod21.z.array(import_zod21.z.string()).length(2),
512
- data: import_zod21.z.record(import_zod21.z.string(), zTable)
626
+ var zScheduleTable = import_zod23.z.object({
627
+ fields: import_zod23.z.array(import_zod23.z.string()).length(2),
628
+ data: import_zod23.z.record(import_zod23.z.string(), zTable)
513
629
  });
514
630
 
515
631
  // src/interface/event/eConfig.ts
516
- var zBEventConfig = import_zod22.z.object({
632
+ var zBEventConfig = import_zod24.z.object({
517
633
  /**
518
634
  * Location of the event
519
635
  */
520
- location: import_zod22.z.string().optional(),
636
+ location: import_zod24.z.string().optional(),
521
637
  /**
522
638
  * URL of the tournament on the official website
523
639
  * Must be a valid URL link
524
640
  */
525
- url: import_zod22.z.string(),
641
+ url: import_zod24.z.string(),
526
642
  /**
527
643
  * Full name of the tournament
528
644
  */
529
- title: import_zod22.z.string(),
645
+ title: import_zod24.z.string(),
530
646
  /**
531
647
  * Abbreviated title of the tournament
532
648
  */
533
- shortTitle: import_zod22.z.string(),
649
+ shortTitle: import_zod24.z.string(),
534
650
  /**
535
651
  * Tournament start date and time
536
652
  */
537
- tStart: import_zod22.z.coerce.date(),
653
+ tStart: import_zod24.z.coerce.date(),
538
654
  /**
539
655
  * Tournament end date and time
540
656
  */
541
- tEnd: import_zod22.z.coerce.date(),
657
+ tEnd: import_zod24.z.coerce.date(),
542
658
  /**
543
659
  * Short description for tournament card
544
660
  */
545
- shortDescription: import_zod22.z.string(),
661
+ shortDescription: import_zod24.z.string(),
546
662
  /**
547
663
  * Full description
548
664
  */
549
- description: import_zod22.z.string(),
665
+ description: import_zod24.z.string(),
550
666
  /**
551
667
  * Defines the tournament details table with 2 columns
552
668
  * typically Time and Event
@@ -560,15 +676,15 @@ var zBEventConfig = import_zod22.z.object({
560
676
  /**
561
677
  * List of ticket object IDs for this tournament
562
678
  */
563
- tickets: import_zod22.z.array(import_zod22.z.string()),
679
+ tickets: import_zod24.z.array(import_zod24.z.string()),
564
680
  /**
565
681
  * If false, the tournament registration is closed
566
682
  */
567
- canRegister: import_zod22.z.boolean(),
683
+ canRegister: import_zod24.z.boolean(),
568
684
  /**
569
685
  * If true, free form donation amounts are disabled.
570
686
  */
571
- donationsDisabled: import_zod22.z.boolean().optional(),
687
+ donationsDisabled: import_zod24.z.boolean().optional(),
572
688
  /**
573
689
  * Defines URL, height, width of the image
574
690
  */
@@ -576,150 +692,42 @@ var zBEventConfig = import_zod22.z.object({
576
692
  });
577
693
  var zEventConfig = addAutoProps(zBEventConfig);
578
694
  var zEventConfigResponse = zEventConfig.extend({
579
- tickets: import_zod22.z.array(zEventTicket)
695
+ tickets: import_zod24.z.array(zEventTicket)
580
696
  });
581
697
 
582
698
  // src/interface/event/eReg.ts
583
- var import_zod24 = require("zod");
699
+ var import_zod26 = require("zod");
584
700
 
585
701
  // src/interface/event/eTicketReg.ts
586
- var import_zod23 = require("zod");
587
- var zEventTicketReg = import_zod23.z.object({
588
- ticket: import_zod23.z.string(),
702
+ var import_zod25 = require("zod");
703
+ var zEventTicketReg = import_zod25.z.object({
704
+ ticket: import_zod25.z.string(),
589
705
  /**
590
706
  * integer minimum 1, otherwise no ticket is being bought
591
707
  */
592
- amount: import_zod23.z.number().int().min(1)
708
+ amount: import_zod25.z.number().int().min(1)
593
709
  });
594
710
  var zEventTicketRegResponse = zEventTicketReg.extend({
595
711
  ticket: zEventTicket
596
712
  });
597
713
 
598
714
  // src/interface/event/eReg.ts
599
- var zBEventReg = import_zod24.z.object({
600
- agaId: import_zod24.z.string(),
601
- tournamentId: import_zod24.z.string(),
602
- tickets: import_zod24.z.array(zEventTicketReg),
715
+ var zBEventReg = import_zod26.z.object({
716
+ agaId: import_zod26.z.string(),
717
+ tournamentId: import_zod26.z.string(),
718
+ tickets: import_zod26.z.array(zEventTicketReg),
603
719
  /**
604
720
  * @units CENTS - Donation in cents
605
721
  */
606
- donation: import_zod24.z.coerce.number().optional(),
722
+ donation: import_zod26.z.coerce.number().optional(),
607
723
  /**
608
724
  * How the registration was created, through public endpoint or admin
609
725
  */
610
- createMethod: import_zod24.z.string().optional()
726
+ createMethod: import_zod26.z.string().optional()
611
727
  }).merge(zBUserInfo).merge(zBPaymentInfo);
612
728
  var zEventReg = addAutoProps(zBEventReg);
613
729
  var zEventRegResponse = zEventReg.extend({
614
- tickets: import_zod24.z.array(zEventTicketRegResponse)
615
- });
616
-
617
- // src/interface/user/goRank.ts
618
- var GoRank = /* @__PURE__ */ ((GoRank2) => {
619
- GoRank2["KYU1"] = "1k";
620
- GoRank2["KYU2"] = "2k";
621
- GoRank2["KYU3"] = "3k";
622
- GoRank2["KYU4"] = "4k";
623
- GoRank2["KYU5"] = "5k";
624
- GoRank2["KYU6"] = "6k";
625
- GoRank2["KYU7"] = "7k";
626
- GoRank2["KYU8"] = "8k";
627
- GoRank2["KYU9"] = "9k";
628
- GoRank2["KYU10"] = "10k";
629
- GoRank2["KYU11"] = "11k";
630
- GoRank2["KYU12"] = "12k";
631
- GoRank2["KYU13"] = "13k";
632
- GoRank2["KYU14"] = "14k";
633
- GoRank2["KYU15"] = "15k";
634
- GoRank2["KYU16"] = "16k";
635
- GoRank2["KYU17"] = "17k";
636
- GoRank2["KYU18"] = "18k";
637
- GoRank2["KYU19"] = "19k";
638
- GoRank2["KYU20"] = "20k";
639
- GoRank2["KYU21"] = "21k";
640
- GoRank2["KYU22"] = "22k";
641
- GoRank2["KYU23"] = "23k";
642
- GoRank2["KYU24"] = "24k";
643
- GoRank2["KYU25"] = "25k";
644
- GoRank2["DAN1"] = "1d";
645
- GoRank2["DAN2"] = "2d";
646
- GoRank2["DAN3"] = "3d";
647
- GoRank2["DAN4"] = "4d";
648
- GoRank2["DAN5"] = "5d";
649
- GoRank2["DAN6"] = "6d";
650
- GoRank2["DAN7"] = "7d";
651
- GoRank2["PRO1"] = "1p";
652
- GoRank2["PRO2"] = "2p";
653
- GoRank2["PRO3"] = "3p";
654
- GoRank2["PRO4"] = "4p";
655
- GoRank2["PRO5"] = "5p";
656
- GoRank2["PRO6"] = "6p";
657
- GoRank2["PRO7"] = "7p";
658
- GoRank2["PRO8"] = "8p";
659
- GoRank2["PRO9"] = "9p";
660
- return GoRank2;
661
- })(GoRank || {});
662
-
663
- // src/interface/user/user.ts
664
- var import_zod25 = require("zod");
665
- var zBUser = import_zod25.z.object({
666
- name: import_zod25.z.string().min(2).max(100),
667
- username: import_zod25.z.string().optional(),
668
- password: import_zod25.z.string().optional(),
669
- roles: import_zod25.z.array(import_zod25.z.number().int()).optional(),
670
- email: import_zod25.z.string().max(100).email().or(import_zod25.z.literal("")).optional(),
671
- address: import_zod25.z.string().or(import_zod25.z.literal("")).optional(),
672
- country: import_zod25.z.string().length(2, {
673
- message: "Enter the 2-letter country code"
674
- }).or(import_zod25.z.literal("")).optional(),
675
- phoneNumber: import_zod25.z.string().regex(/^\d{10}/, {
676
- message: `Please enter a valid 10-digit US phone number with numbers only`
677
- }).or(import_zod25.z.literal("")).optional(),
678
- birthDate: import_zod25.z.string().regex(/^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/, {
679
- message: "Enter a valid date in yyyy-mm-dd format"
680
- }).or(import_zod25.z.literal("")).optional()
681
- });
682
- var zUser = addAutoProps(zBUser);
683
- var zStudent = zUser.extend({
684
- rank: import_zod25.z.nativeEnum(GoRank),
685
- guardian: import_zod25.z.string().optional()
686
- });
687
- var zTeacher = zUser.extend({
688
- rank: import_zod25.z.nativeEnum(GoRank),
689
- /**
690
- * Inactive teachers are not shown on public endpoints
691
- */
692
- isInactive: import_zod25.z.boolean().optional(),
693
- /**
694
- * Teacher's position, e.g., instructor, president
695
- */
696
- title: import_zod25.z.string().optional(),
697
- /**
698
- * Teacher's bio text describing experience
699
- * new lines will be rendered as paragraphs
700
- */
701
- bio: import_zod25.z.string().optional(),
702
- /** Format is illustrated below, where teacher is available
703
- * Mon 9-12am 3-6pm & Tue 10-12am 6-10pm
704
- * [
705
- * [[9, 12], [15, 18]],
706
- * [[10, 12], [18, 20]],
707
- * [],
708
- * [],
709
- * [],
710
- * [],
711
- * [],
712
- * ]
713
- */
714
- available: import_zod25.z.array(import_zod25.z.array(import_zod25.z.array(import_zod25.z.number()))).optional()
715
- });
716
-
717
- // src/interface/user/userRoles.ts
718
- var import_zod26 = require("zod");
719
- var zUserRoles = import_zod26.z.object({
720
- user: import_zod26.z.number().int(),
721
- admin: import_zod26.z.number().int(),
722
- superadmin: import_zod26.z.number().int()
730
+ tickets: import_zod26.z.array(zEventTicketRegResponse)
723
731
  });
724
732
  // Annotate the CommonJS export names for ESM import in node:
725
733
  0 && (module.exports = {
@@ -781,6 +789,7 @@ var zUserRoles = import_zod26.z.object({
781
789
  zTeacher,
782
790
  zTeacherDisplay,
783
791
  zTeacherPayment,
792
+ zTeacherPaymentResponse,
784
793
  zTeacherPaymentRow,
785
794
  zTuition,
786
795
  zUser,