@nyig/models 0.2.35 → 0.2.37

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 +407 -261
  2. package/index.d.ts +407 -261
  3. package/index.js +255 -248
  4. package/index.mjs +254 -248
  5. package/package.json +1 -1
package/index.mjs CHANGED
@@ -40,7 +40,7 @@ var BookingType = /* @__PURE__ */ ((BookingType2) => {
40
40
  })(BookingType || {});
41
41
 
42
42
  // src/interface/booking/campBooking.ts
43
- import { z as z13 } from "zod";
43
+ import { z as z15 } from "zod";
44
44
 
45
45
  // src/interface/tracking/attendState.ts
46
46
  var AttendState = /* @__PURE__ */ ((AttendState2) => {
@@ -110,7 +110,7 @@ var zBCampTracker = z6.object({
110
110
  var zCampTracker = addAutoProps(zBCampTracker);
111
111
 
112
112
  // src/interface/tracking/classTracker.ts
113
- import { z as z9 } from "zod";
113
+ import { z as z11 } from "zod";
114
114
 
115
115
  // src/interface/payment/invoice.ts
116
116
  import { z as z7 } from "zod";
@@ -152,47 +152,160 @@ var zBInvoice = z7.object({
152
152
  var zInvoice = addAutoProps(zBInvoice);
153
153
 
154
154
  // src/interface/payment/teacherPayment.ts
155
+ import { z as z10 } from "zod";
156
+
157
+ // src/interface/user/goRank.ts
158
+ var GoRank = /* @__PURE__ */ ((GoRank2) => {
159
+ GoRank2["KYU1"] = "1k";
160
+ GoRank2["KYU2"] = "2k";
161
+ GoRank2["KYU3"] = "3k";
162
+ GoRank2["KYU4"] = "4k";
163
+ GoRank2["KYU5"] = "5k";
164
+ GoRank2["KYU6"] = "6k";
165
+ GoRank2["KYU7"] = "7k";
166
+ GoRank2["KYU8"] = "8k";
167
+ GoRank2["KYU9"] = "9k";
168
+ GoRank2["KYU10"] = "10k";
169
+ GoRank2["KYU11"] = "11k";
170
+ GoRank2["KYU12"] = "12k";
171
+ GoRank2["KYU13"] = "13k";
172
+ GoRank2["KYU14"] = "14k";
173
+ GoRank2["KYU15"] = "15k";
174
+ GoRank2["KYU16"] = "16k";
175
+ GoRank2["KYU17"] = "17k";
176
+ GoRank2["KYU18"] = "18k";
177
+ GoRank2["KYU19"] = "19k";
178
+ GoRank2["KYU20"] = "20k";
179
+ GoRank2["KYU21"] = "21k";
180
+ GoRank2["KYU22"] = "22k";
181
+ GoRank2["KYU23"] = "23k";
182
+ GoRank2["KYU24"] = "24k";
183
+ GoRank2["KYU25"] = "25k";
184
+ GoRank2["DAN1"] = "1d";
185
+ GoRank2["DAN2"] = "2d";
186
+ GoRank2["DAN3"] = "3d";
187
+ GoRank2["DAN4"] = "4d";
188
+ GoRank2["DAN5"] = "5d";
189
+ GoRank2["DAN6"] = "6d";
190
+ GoRank2["DAN7"] = "7d";
191
+ GoRank2["PRO1"] = "1p";
192
+ GoRank2["PRO2"] = "2p";
193
+ GoRank2["PRO3"] = "3p";
194
+ GoRank2["PRO4"] = "4p";
195
+ GoRank2["PRO5"] = "5p";
196
+ GoRank2["PRO6"] = "6p";
197
+ GoRank2["PRO7"] = "7p";
198
+ GoRank2["PRO8"] = "8p";
199
+ GoRank2["PRO9"] = "9p";
200
+ return GoRank2;
201
+ })(GoRank || {});
202
+
203
+ // src/interface/user/user.ts
155
204
  import { z as z8 } from "zod";
156
- var zTeacherPaymentRow = z8.object({
157
- course: z8.string().min(1, "select or enter a course"),
158
- length: z8.coerce.number().gt(0, "must be > 0"),
159
- count: z8.coerce.number().int().gt(0, "must be > 0"),
160
- wage: z8.coerce.number().gt(0, "wage must be > 0")
205
+ var zBUser = z8.object({
206
+ name: z8.string().min(2).max(100),
207
+ username: z8.string().optional(),
208
+ password: z8.string().optional(),
209
+ roles: z8.array(z8.number().int()).optional(),
210
+ email: z8.string().max(100).email().or(z8.literal("")).optional(),
211
+ address: z8.string().or(z8.literal("")).optional(),
212
+ country: z8.string().length(2, {
213
+ message: "Enter the 2-letter country code"
214
+ }).or(z8.literal("")).optional(),
215
+ phoneNumber: z8.string().regex(/^\d{10}/, {
216
+ message: `Please enter a valid 10-digit US phone number with numbers only`
217
+ }).or(z8.literal("")).optional(),
218
+ birthDate: z8.string().regex(/^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/, {
219
+ message: "Enter a valid date in yyyy-mm-dd format"
220
+ }).or(z8.literal("")).optional()
161
221
  });
162
- var zBTeacherPayment = z8.object({
163
- teacher: z8.string().min(1, "select or enter a teacher"),
164
- rows: z8.array(zTeacherPaymentRow),
165
- paid: z8.boolean().optional()
222
+ var zUser = addAutoProps(zBUser);
223
+ var zStudent = zUser.extend({
224
+ rank: z8.nativeEnum(GoRank),
225
+ guardian: z8.string().optional()
226
+ });
227
+ var zTeacher = zUser.extend({
228
+ rank: z8.nativeEnum(GoRank),
229
+ /**
230
+ * Inactive teachers are not shown on public endpoints
231
+ */
232
+ isInactive: z8.boolean().optional(),
233
+ /**
234
+ * Teacher's position, e.g., instructor, president
235
+ */
236
+ title: z8.string().optional(),
237
+ /**
238
+ * Teacher's bio text describing experience
239
+ * new lines will be rendered as paragraphs
240
+ */
241
+ bio: z8.string().optional(),
242
+ /** Format is illustrated below, where teacher is available
243
+ * Mon 9-12am 3-6pm & Tue 10-12am 6-10pm
244
+ * [
245
+ * [[9, 12], [15, 18]],
246
+ * [[10, 12], [18, 20]],
247
+ * [],
248
+ * [],
249
+ * [],
250
+ * [],
251
+ * [],
252
+ * ]
253
+ */
254
+ available: z8.array(z8.array(z8.array(z8.number()))).optional()
255
+ });
256
+
257
+ // src/interface/user/userRoles.ts
258
+ import { z as z9 } from "zod";
259
+ var zUserRoles = z9.object({
260
+ user: z9.number().int(),
261
+ admin: z9.number().int(),
262
+ superadmin: z9.number().int()
263
+ });
264
+
265
+ // src/interface/payment/teacherPayment.ts
266
+ var zTeacherPaymentRow = z10.object({
267
+ course: z10.string().min(1, "select or enter a course"),
268
+ length: z10.coerce.number().gt(0, "must be > 0"),
269
+ count: z10.coerce.number().int().gt(0, "must be > 0"),
270
+ wage: z10.coerce.number().gt(0, "wage must be > 0")
271
+ });
272
+ var zBTeacherPayment = z10.object({
273
+ teacher: z10.string().min(1, "select or enter a teacher"),
274
+ rows: z10.array(zTeacherPaymentRow),
275
+ paid: z10.boolean().optional()
166
276
  });
167
277
  var zTeacherPayment = addAutoProps(zBTeacherPayment);
278
+ var zTeacherPaymentResponse = zTeacherPayment.extend({
279
+ teacher: zTeacher
280
+ });
168
281
 
169
282
  // src/interface/tracking/classTracker.ts
170
- var zBClassTracker = z9.object({
171
- course: z9.string(),
172
- teacher: z9.string(),
173
- student: z9.string(),
174
- classTimes: z9.array(z9.coerce.date()),
175
- completedList: z9.array(z9.boolean()),
283
+ var zBClassTracker = z11.object({
284
+ course: z11.string(),
285
+ teacher: z11.string(),
286
+ student: z11.string(),
287
+ classTimes: z11.array(z11.coerce.date()),
288
+ completedList: z11.array(z11.boolean()),
176
289
  /**
177
290
  * Virtual mongoose field when all values in completedList is true
178
291
  */
179
- completed: z9.boolean().optional(),
292
+ completed: z11.boolean().optional(),
180
293
  tuition: zTuition.optional(),
181
- paid: z9.boolean().optional(),
182
- paused: z9.boolean().optional(),
183
- notes: z9.string().optional()
294
+ paid: z11.boolean().optional(),
295
+ paused: z11.boolean().optional(),
296
+ notes: z11.string().optional()
184
297
  });
185
298
  var zClassTracker = addAutoProps(zBClassTracker);
186
299
 
187
300
  // src/interface/tracking/groupTracker.ts
188
- import { z as z12 } from "zod";
301
+ import { z as z14 } from "zod";
189
302
 
190
303
  // src/interface/tracking/scheduleData.ts
191
- import { z as z10 } from "zod";
192
- var zScheduleData = z10.object({
193
- startTime: z10.string(),
304
+ import { z as z12 } from "zod";
305
+ var zScheduleData = z12.object({
306
+ startTime: z12.string(),
194
307
  // String in 24 hour "HH:mm" format
195
- dayOfWeek: z10.number().int().min(0).max(6)
308
+ dayOfWeek: z12.number().int().min(0).max(6)
196
309
  // integeters in 0 - 6
197
310
  });
198
311
 
@@ -221,126 +334,126 @@ var NYIGSchool = /* @__PURE__ */ ((NYIGSchool2) => {
221
334
  })(NYIGSchool || {});
222
335
 
223
336
  // src/interface/course/course.ts
224
- import { z as z11 } from "zod";
225
- var zBCourse = z11.object({
226
- name: z11.string(),
227
- category: z11.nativeEnum(CourseCategory),
337
+ import { z as z13 } from "zod";
338
+ var zBCourse = z13.object({
339
+ name: z13.string(),
340
+ category: z13.nativeEnum(CourseCategory),
228
341
  /**
229
342
  * @unit SECONDS - Duration of the course in seconds
230
343
  */
231
- duration: z11.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"),
344
+ duration: z13.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"),
232
345
  /**
233
346
  * @unit CENTS - Price of the course in cents
234
347
  */
235
- price: z11.coerce.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0"),
236
- description: z11.string().or(z11.literal("")).optional(),
348
+ price: z13.coerce.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0"),
349
+ description: z13.string().or(z13.literal("")).optional(),
237
350
  /**
238
351
  * NYIG School locations
239
352
  */
240
- nyigSchool: z11.nativeEnum(NYIGSchool),
353
+ nyigSchool: z13.nativeEnum(NYIGSchool),
241
354
  /**
242
355
  * Recommended level before taking this course
243
356
  */
244
- recLevel: z11.string().or(z11.literal("")).optional(),
357
+ recLevel: z13.string().or(z13.literal("")).optional(),
245
358
  /**
246
359
  * Camp tuition for half-day option
247
360
  */
248
- halfCampTuition: z11.coerce.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0").optional(),
361
+ halfCampTuition: z13.coerce.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0").optional(),
249
362
  /**
250
363
  * Camp tuition for full-day option
251
364
  */
252
- fullCampTuition: z11.coerce.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0").optional()
365
+ fullCampTuition: z13.coerce.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0").optional()
253
366
  });
254
367
  var zCourse = addAutoProps(zBCourse);
255
368
 
256
369
  // src/interface/tracking/groupTracker.ts
257
- var zBGroupTracker = z12.object({
258
- course: z12.string(),
259
- teacher: z12.string(),
260
- semester: z12.string(),
370
+ var zBGroupTracker = z14.object({
371
+ course: z14.string(),
372
+ teacher: z14.string(),
373
+ semester: z14.string(),
261
374
  scheduleData: zScheduleData,
262
375
  /**
263
376
  * occurrences are tracked by week for Groups
264
377
  */
265
- occurrences: z12.array(z12.coerce.date()),
378
+ occurrences: z14.array(z14.coerce.date()),
266
379
  /**
267
380
  * attendances are tracked by week for Groups
268
381
  */
269
- attendances: z12.array(z12.string()),
382
+ attendances: z14.array(z14.string()),
270
383
  /**
271
384
  * public-facing ID of the course instance, e.g., 101
272
385
  */
273
- courseId: z12.string().optional(),
386
+ courseId: z14.string().optional(),
274
387
  /**
275
388
  * Age group of the class instance, e.g. "adult", "youth"
276
389
  */
277
- ageGroup: z12.nativeEnum(AgeGroup).optional(),
390
+ ageGroup: z14.nativeEnum(AgeGroup).optional(),
278
391
  /**
279
392
  * If true, the course is hidden from public view
280
393
  */
281
- isNonPublic: z12.boolean().optional(),
282
- notes: z12.string().optional()
394
+ isNonPublic: z14.boolean().optional(),
395
+ notes: z14.string().optional()
283
396
  });
284
397
  var zGroupTracker = addAutoProps(zBGroupTracker);
285
398
 
286
399
  // src/interface/booking/campBooking.ts
287
- var zBCampBooking = z13.object({
288
- ctId: z13.string().optional(),
289
- isOnline: z13.boolean(),
290
- classDates: z13.string(),
291
- campOption: z13.nativeEnum(CampOption),
292
- shipping: z13.boolean().optional()
400
+ var zBCampBooking = z15.object({
401
+ ctId: z15.string().optional(),
402
+ isOnline: z15.boolean(),
403
+ classDates: z15.string(),
404
+ campOption: z15.nativeEnum(CampOption),
405
+ shipping: z15.boolean().optional()
293
406
  }).merge(zBUserInfo).merge(zBPaymentInfo);
294
407
  var zCampBooking = addAutoProps(zBCampBooking);
295
408
 
296
409
  // src/interface/booking/groupBooking.ts
297
- import { z as z14 } from "zod";
298
- var zBGroupBooking = z14.object({
299
- gtId: z14.string().optional(),
300
- isTrial: z14.boolean().optional(),
301
- isOnline: z14.boolean(),
302
- classDate: z14.string().optional(),
303
- shipping: z14.boolean().optional()
410
+ import { z as z16 } from "zod";
411
+ var zBGroupBooking = z16.object({
412
+ gtId: z16.string().optional(),
413
+ isTrial: z16.boolean().optional(),
414
+ isOnline: z16.boolean(),
415
+ classDate: z16.string().optional(),
416
+ shipping: z16.boolean().optional()
304
417
  }).merge(zBUserInfo).merge(zBPaymentInfo);
305
418
  var zGroupBooking = addAutoProps(zBGroupBooking);
306
419
 
307
420
  // src/interface/booking/privateBooking.ts
308
- import { z as z15 } from "zod";
309
- var zBPrivateBooking = z15.object({
310
- courseId: z15.string(),
311
- teacherId: z15.string(),
312
- classDate: z15.string().optional()
421
+ import { z as z17 } from "zod";
422
+ var zBPrivateBooking = z17.object({
423
+ courseId: z17.string(),
424
+ teacherId: z17.string(),
425
+ classDate: z17.string().optional()
313
426
  }).merge(zBUserInfo).merge(zBPaymentInfo);
314
427
  var zPrivateBooking = addAutoProps(zBPrivateBooking);
315
428
 
316
429
  // src/interface/public/aurora.ts
317
- import { z as z16 } from "zod";
318
- var zTeacherDisplay = z16.object({
319
- name: z16.string(),
320
- email: z16.string().email(),
321
- title: z16.string(),
322
- imageUrl: z16.string(),
323
- bio: z16.string()
324
- });
325
- var zCourseTable = z16.object({
326
- id: z16.string(),
327
- name: z16.string(),
328
- duration: z16.number(),
329
- dateAndTime: z16.string(),
330
- recommendedLevel: z16.string(),
331
- tuition: z16.string()
430
+ import { z as z18 } from "zod";
431
+ var zTeacherDisplay = z18.object({
432
+ name: z18.string(),
433
+ email: z18.string().email(),
434
+ title: z18.string(),
435
+ imageUrl: z18.string(),
436
+ bio: z18.string()
437
+ });
438
+ var zCourseTable = z18.object({
439
+ id: z18.string(),
440
+ name: z18.string(),
441
+ duration: z18.number(),
442
+ dateAndTime: z18.string(),
443
+ recommendedLevel: z18.string(),
444
+ tuition: z18.string()
332
445
  });
333
446
 
334
447
  // src/interface/public/imageDef.ts
335
- import { z as z17 } from "zod";
336
- var zImageDef = z17.object({
337
- url: z17.string(),
338
- height: z17.number(),
339
- width: z17.number()
448
+ import { z as z19 } from "zod";
449
+ var zImageDef = z19.object({
450
+ url: z19.string(),
451
+ height: z19.number(),
452
+ width: z19.number()
340
453
  });
341
454
 
342
455
  // src/interface/reporting/reportTicket.ts
343
- import { z as z18 } from "zod";
456
+ import { z as z20 } from "zod";
344
457
 
345
458
  // src/interface/reporting/ticketStatus.ts
346
459
  var TicketStatus = /* @__PURE__ */ ((TicketStatus2) => {
@@ -352,12 +465,12 @@ var TicketStatus = /* @__PURE__ */ ((TicketStatus2) => {
352
465
  })(TicketStatus || {});
353
466
 
354
467
  // src/interface/reporting/reportTicket.ts
355
- var zBReportTicket = z18.object({
356
- requester: z18.string(),
357
- resolver: z18.string().optional(),
358
- status: z18.nativeEnum(TicketStatus),
359
- title: z18.string(),
360
- description: z18.string()
468
+ var zBReportTicket = z20.object({
469
+ requester: z20.string(),
470
+ resolver: z20.string().optional(),
471
+ status: z20.nativeEnum(TicketStatus),
472
+ title: z20.string(),
473
+ description: z20.string()
361
474
  });
362
475
  var zReportTicket = addAutoProps(zBReportTicket);
363
476
 
@@ -370,96 +483,96 @@ var Season = /* @__PURE__ */ ((Season2) => {
370
483
  })(Season || {});
371
484
 
372
485
  // src/interface/semester/semester.ts
373
- import { z as z19 } from "zod";
374
- var zBSemester = z19.object({
375
- season: z19.nativeEnum(Season),
376
- year: z19.number().min(2022).max(2999),
377
- startDate: z19.coerce.date(),
378
- endDate: z19.coerce.date(),
486
+ import { z as z21 } from "zod";
487
+ var zBSemester = z21.object({
488
+ season: z21.nativeEnum(Season),
489
+ year: z21.number().min(2022).max(2999),
490
+ startDate: z21.coerce.date(),
491
+ endDate: z21.coerce.date(),
379
492
  /**
380
493
  * Format: start, end, start, end, ...
381
494
  */
382
- blackoutDates: z19.array(z19.coerce.date()),
495
+ blackoutDates: z21.array(z21.coerce.date()),
383
496
  /**
384
497
  * List of names of some break: date range
385
498
  */
386
- importantDates: z19.array(z19.string())
499
+ importantDates: z21.array(z21.string())
387
500
  });
388
501
  var zSemester = addAutoProps(zBSemester);
389
502
 
390
503
  // src/interface/event/eConfig.ts
391
- import { z as z22 } from "zod";
504
+ import { z as z24 } from "zod";
392
505
 
393
506
  // src/interface/event/eTicket.ts
394
- import { z as z20 } from "zod";
395
- var zBEventTicket = z20.object({
396
- name: z20.string().min(5, "Name must be at least 5 characters"),
507
+ import { z as z22 } from "zod";
508
+ var zBEventTicket = z22.object({
509
+ name: z22.string().min(5, "Name must be at least 5 characters"),
397
510
  /**
398
511
  * Price in cents
399
512
  */
400
- price: z20.number().min(1, "Price must be at least $1"),
513
+ price: z22.number().min(1, "Price must be at least $1"),
401
514
  /**
402
515
  * @optional description of the ticket
403
516
  */
404
- description: z20.string().optional(),
517
+ description: z22.string().optional(),
405
518
  /**
406
519
  * @optional The ticket cannot be purchased if true
407
520
  */
408
- isNotBuyable: z20.boolean().optional(),
521
+ isNotBuyable: z22.boolean().optional(),
409
522
  /**
410
523
  * @optional If date is provided and in the past, ticket cannot be purchased
411
524
  */
412
- lastBuyableDate: z20.coerce.date().optional()
525
+ lastBuyableDate: z22.coerce.date().optional()
413
526
  });
414
527
  var zEventTicket = addAutoProps(zBEventTicket);
415
528
 
416
529
  // src/interface/event/table.ts
417
- import { z as z21 } from "zod";
418
- var zTable = z21.array(z21.record(z21.string(), z21.string()));
419
- var zDetailsTable = z21.object({
420
- fields: z21.array(z21.string()).length(2),
530
+ import { z as z23 } from "zod";
531
+ var zTable = z23.array(z23.record(z23.string(), z23.string()));
532
+ var zDetailsTable = z23.object({
533
+ fields: z23.array(z23.string()).length(2),
421
534
  data: zTable
422
535
  });
423
- var zScheduleTable = z21.object({
424
- fields: z21.array(z21.string()).length(2),
425
- data: z21.record(z21.string(), zTable)
536
+ var zScheduleTable = z23.object({
537
+ fields: z23.array(z23.string()).length(2),
538
+ data: z23.record(z23.string(), zTable)
426
539
  });
427
540
 
428
541
  // src/interface/event/eConfig.ts
429
- var zBEventConfig = z22.object({
542
+ var zBEventConfig = z24.object({
430
543
  /**
431
544
  * Location of the event
432
545
  */
433
- location: z22.string().optional(),
546
+ location: z24.string().optional(),
434
547
  /**
435
548
  * URL of the tournament on the official website
436
549
  * Must be a valid URL link
437
550
  */
438
- url: z22.string(),
551
+ url: z24.string(),
439
552
  /**
440
553
  * Full name of the tournament
441
554
  */
442
- title: z22.string(),
555
+ title: z24.string(),
443
556
  /**
444
557
  * Abbreviated title of the tournament
445
558
  */
446
- shortTitle: z22.string(),
559
+ shortTitle: z24.string(),
447
560
  /**
448
561
  * Tournament start date and time
449
562
  */
450
- tStart: z22.coerce.date(),
563
+ tStart: z24.coerce.date(),
451
564
  /**
452
565
  * Tournament end date and time
453
566
  */
454
- tEnd: z22.coerce.date(),
567
+ tEnd: z24.coerce.date(),
455
568
  /**
456
569
  * Short description for tournament card
457
570
  */
458
- shortDescription: z22.string(),
571
+ shortDescription: z24.string(),
459
572
  /**
460
573
  * Full description
461
574
  */
462
- description: z22.string(),
575
+ description: z24.string(),
463
576
  /**
464
577
  * Defines the tournament details table with 2 columns
465
578
  * typically Time and Event
@@ -473,15 +586,15 @@ var zBEventConfig = z22.object({
473
586
  /**
474
587
  * List of ticket object IDs for this tournament
475
588
  */
476
- tickets: z22.array(z22.string()),
589
+ tickets: z24.array(z24.string()),
477
590
  /**
478
591
  * If false, the tournament registration is closed
479
592
  */
480
- canRegister: z22.boolean(),
593
+ canRegister: z24.boolean(),
481
594
  /**
482
595
  * If true, free form donation amounts are disabled.
483
596
  */
484
- donationsDisabled: z22.boolean().optional(),
597
+ donationsDisabled: z24.boolean().optional(),
485
598
  /**
486
599
  * Defines URL, height, width of the image
487
600
  */
@@ -489,150 +602,42 @@ var zBEventConfig = z22.object({
489
602
  });
490
603
  var zEventConfig = addAutoProps(zBEventConfig);
491
604
  var zEventConfigResponse = zEventConfig.extend({
492
- tickets: z22.array(zEventTicket)
605
+ tickets: z24.array(zEventTicket)
493
606
  });
494
607
 
495
608
  // src/interface/event/eReg.ts
496
- import { z as z24 } from "zod";
609
+ import { z as z26 } from "zod";
497
610
 
498
611
  // src/interface/event/eTicketReg.ts
499
- import { z as z23 } from "zod";
500
- var zEventTicketReg = z23.object({
501
- ticket: z23.string(),
612
+ import { z as z25 } from "zod";
613
+ var zEventTicketReg = z25.object({
614
+ ticket: z25.string(),
502
615
  /**
503
616
  * integer minimum 1, otherwise no ticket is being bought
504
617
  */
505
- amount: z23.number().int().min(1)
618
+ amount: z25.number().int().min(1)
506
619
  });
507
620
  var zEventTicketRegResponse = zEventTicketReg.extend({
508
621
  ticket: zEventTicket
509
622
  });
510
623
 
511
624
  // src/interface/event/eReg.ts
512
- var zBEventReg = z24.object({
513
- agaId: z24.string(),
514
- tournamentId: z24.string(),
515
- tickets: z24.array(zEventTicketReg),
625
+ var zBEventReg = z26.object({
626
+ agaId: z26.string(),
627
+ tournamentId: z26.string(),
628
+ tickets: z26.array(zEventTicketReg),
516
629
  /**
517
630
  * @units CENTS - Donation in cents
518
631
  */
519
- donation: z24.coerce.number().optional(),
632
+ donation: z26.coerce.number().optional(),
520
633
  /**
521
634
  * How the registration was created, through public endpoint or admin
522
635
  */
523
- createMethod: z24.string().optional()
636
+ createMethod: z26.string().optional()
524
637
  }).merge(zBUserInfo).merge(zBPaymentInfo);
525
638
  var zEventReg = addAutoProps(zBEventReg);
526
639
  var zEventRegResponse = zEventReg.extend({
527
- tickets: z24.array(zEventTicketRegResponse)
528
- });
529
-
530
- // src/interface/user/goRank.ts
531
- var GoRank = /* @__PURE__ */ ((GoRank2) => {
532
- GoRank2["KYU1"] = "1k";
533
- GoRank2["KYU2"] = "2k";
534
- GoRank2["KYU3"] = "3k";
535
- GoRank2["KYU4"] = "4k";
536
- GoRank2["KYU5"] = "5k";
537
- GoRank2["KYU6"] = "6k";
538
- GoRank2["KYU7"] = "7k";
539
- GoRank2["KYU8"] = "8k";
540
- GoRank2["KYU9"] = "9k";
541
- GoRank2["KYU10"] = "10k";
542
- GoRank2["KYU11"] = "11k";
543
- GoRank2["KYU12"] = "12k";
544
- GoRank2["KYU13"] = "13k";
545
- GoRank2["KYU14"] = "14k";
546
- GoRank2["KYU15"] = "15k";
547
- GoRank2["KYU16"] = "16k";
548
- GoRank2["KYU17"] = "17k";
549
- GoRank2["KYU18"] = "18k";
550
- GoRank2["KYU19"] = "19k";
551
- GoRank2["KYU20"] = "20k";
552
- GoRank2["KYU21"] = "21k";
553
- GoRank2["KYU22"] = "22k";
554
- GoRank2["KYU23"] = "23k";
555
- GoRank2["KYU24"] = "24k";
556
- GoRank2["KYU25"] = "25k";
557
- GoRank2["DAN1"] = "1d";
558
- GoRank2["DAN2"] = "2d";
559
- GoRank2["DAN3"] = "3d";
560
- GoRank2["DAN4"] = "4d";
561
- GoRank2["DAN5"] = "5d";
562
- GoRank2["DAN6"] = "6d";
563
- GoRank2["DAN7"] = "7d";
564
- GoRank2["PRO1"] = "1p";
565
- GoRank2["PRO2"] = "2p";
566
- GoRank2["PRO3"] = "3p";
567
- GoRank2["PRO4"] = "4p";
568
- GoRank2["PRO5"] = "5p";
569
- GoRank2["PRO6"] = "6p";
570
- GoRank2["PRO7"] = "7p";
571
- GoRank2["PRO8"] = "8p";
572
- GoRank2["PRO9"] = "9p";
573
- return GoRank2;
574
- })(GoRank || {});
575
-
576
- // src/interface/user/user.ts
577
- import { z as z25 } from "zod";
578
- var zBUser = z25.object({
579
- name: z25.string().min(2).max(100),
580
- username: z25.string().optional(),
581
- password: z25.string().optional(),
582
- roles: z25.array(z25.number().int()).optional(),
583
- email: z25.string().max(100).email().or(z25.literal("")).optional(),
584
- address: z25.string().or(z25.literal("")).optional(),
585
- country: z25.string().length(2, {
586
- message: "Enter the 2-letter country code"
587
- }).or(z25.literal("")).optional(),
588
- phoneNumber: z25.string().regex(/^\d{10}/, {
589
- message: `Please enter a valid 10-digit US phone number with numbers only`
590
- }).or(z25.literal("")).optional(),
591
- birthDate: z25.string().regex(/^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/, {
592
- message: "Enter a valid date in yyyy-mm-dd format"
593
- }).or(z25.literal("")).optional()
594
- });
595
- var zUser = addAutoProps(zBUser);
596
- var zStudent = zUser.extend({
597
- rank: z25.nativeEnum(GoRank),
598
- guardian: z25.string().optional()
599
- });
600
- var zTeacher = zUser.extend({
601
- rank: z25.nativeEnum(GoRank),
602
- /**
603
- * Inactive teachers are not shown on public endpoints
604
- */
605
- isInactive: z25.boolean().optional(),
606
- /**
607
- * Teacher's position, e.g., instructor, president
608
- */
609
- title: z25.string().optional(),
610
- /**
611
- * Teacher's bio text describing experience
612
- * new lines will be rendered as paragraphs
613
- */
614
- bio: z25.string().optional(),
615
- /** Format is illustrated below, where teacher is available
616
- * Mon 9-12am 3-6pm & Tue 10-12am 6-10pm
617
- * [
618
- * [[9, 12], [15, 18]],
619
- * [[10, 12], [18, 20]],
620
- * [],
621
- * [],
622
- * [],
623
- * [],
624
- * [],
625
- * ]
626
- */
627
- available: z25.array(z25.array(z25.array(z25.number()))).optional()
628
- });
629
-
630
- // src/interface/user/userRoles.ts
631
- import { z as z26 } from "zod";
632
- var zUserRoles = z26.object({
633
- user: z26.number().int(),
634
- admin: z26.number().int(),
635
- superadmin: z26.number().int()
640
+ tickets: z26.array(zEventTicketRegResponse)
636
641
  });
637
642
  export {
638
643
  AgeGroup,
@@ -693,6 +698,7 @@ export {
693
698
  zTeacher,
694
699
  zTeacherDisplay,
695
700
  zTeacherPayment,
701
+ zTeacherPaymentResponse,
696
702
  zTeacherPaymentRow,
697
703
  zTuition,
698
704
  zUser,