@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.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,162 @@ 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 = z10.object({
279
+ teacher: zTeacher,
280
+ rows: z10.array(zTeacherPaymentRow),
281
+ paid: z10.boolean().optional()
282
+ });
168
283
 
169
284
  // 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()),
285
+ var zBClassTracker = z11.object({
286
+ course: z11.string(),
287
+ teacher: z11.string(),
288
+ student: z11.string(),
289
+ classTimes: z11.array(z11.coerce.date()),
290
+ completedList: z11.array(z11.boolean()),
176
291
  /**
177
292
  * Virtual mongoose field when all values in completedList is true
178
293
  */
179
- completed: z9.boolean().optional(),
294
+ completed: z11.boolean().optional(),
180
295
  tuition: zTuition.optional(),
181
- paid: z9.boolean().optional(),
182
- paused: z9.boolean().optional(),
183
- notes: z9.string().optional()
296
+ paid: z11.boolean().optional(),
297
+ paused: z11.boolean().optional(),
298
+ notes: z11.string().optional()
184
299
  });
185
300
  var zClassTracker = addAutoProps(zBClassTracker);
186
301
 
187
302
  // src/interface/tracking/groupTracker.ts
188
- import { z as z12 } from "zod";
303
+ import { z as z14 } from "zod";
189
304
 
190
305
  // src/interface/tracking/scheduleData.ts
191
- import { z as z10 } from "zod";
192
- var zScheduleData = z10.object({
193
- startTime: z10.string(),
306
+ import { z as z12 } from "zod";
307
+ var zScheduleData = z12.object({
308
+ startTime: z12.string(),
194
309
  // String in 24 hour "HH:mm" format
195
- dayOfWeek: z10.number().int().min(0).max(6)
310
+ dayOfWeek: z12.number().int().min(0).max(6)
196
311
  // integeters in 0 - 6
197
312
  });
198
313
 
@@ -221,126 +336,126 @@ var NYIGSchool = /* @__PURE__ */ ((NYIGSchool2) => {
221
336
  })(NYIGSchool || {});
222
337
 
223
338
  // 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),
339
+ import { z as z13 } from "zod";
340
+ var zBCourse = z13.object({
341
+ name: z13.string(),
342
+ category: z13.nativeEnum(CourseCategory),
228
343
  /**
229
344
  * @unit SECONDS - Duration of the course in seconds
230
345
  */
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"),
346
+ 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
347
  /**
233
348
  * @unit CENTS - Price of the course in cents
234
349
  */
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(),
350
+ 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"),
351
+ description: z13.string().or(z13.literal("")).optional(),
237
352
  /**
238
353
  * NYIG School locations
239
354
  */
240
- nyigSchool: z11.nativeEnum(NYIGSchool),
355
+ nyigSchool: z13.nativeEnum(NYIGSchool),
241
356
  /**
242
357
  * Recommended level before taking this course
243
358
  */
244
- recLevel: z11.string().or(z11.literal("")).optional(),
359
+ recLevel: z13.string().or(z13.literal("")).optional(),
245
360
  /**
246
361
  * Camp tuition for half-day option
247
362
  */
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(),
363
+ 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
364
  /**
250
365
  * Camp tuition for full-day option
251
366
  */
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()
367
+ 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
368
  });
254
369
  var zCourse = addAutoProps(zBCourse);
255
370
 
256
371
  // src/interface/tracking/groupTracker.ts
257
- var zBGroupTracker = z12.object({
258
- course: z12.string(),
259
- teacher: z12.string(),
260
- semester: z12.string(),
372
+ var zBGroupTracker = z14.object({
373
+ course: z14.string(),
374
+ teacher: z14.string(),
375
+ semester: z14.string(),
261
376
  scheduleData: zScheduleData,
262
377
  /**
263
378
  * occurrences are tracked by week for Groups
264
379
  */
265
- occurrences: z12.array(z12.coerce.date()),
380
+ occurrences: z14.array(z14.coerce.date()),
266
381
  /**
267
382
  * attendances are tracked by week for Groups
268
383
  */
269
- attendances: z12.array(z12.string()),
384
+ attendances: z14.array(z14.string()),
270
385
  /**
271
386
  * public-facing ID of the course instance, e.g., 101
272
387
  */
273
- courseId: z12.string().optional(),
388
+ courseId: z14.string().optional(),
274
389
  /**
275
390
  * Age group of the class instance, e.g. "adult", "youth"
276
391
  */
277
- ageGroup: z12.nativeEnum(AgeGroup).optional(),
392
+ ageGroup: z14.nativeEnum(AgeGroup).optional(),
278
393
  /**
279
394
  * If true, the course is hidden from public view
280
395
  */
281
- isNonPublic: z12.boolean().optional(),
282
- notes: z12.string().optional()
396
+ isNonPublic: z14.boolean().optional(),
397
+ notes: z14.string().optional()
283
398
  });
284
399
  var zGroupTracker = addAutoProps(zBGroupTracker);
285
400
 
286
401
  // 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()
402
+ var zBCampBooking = z15.object({
403
+ ctId: z15.string().optional(),
404
+ isOnline: z15.boolean(),
405
+ classDates: z15.string(),
406
+ campOption: z15.nativeEnum(CampOption),
407
+ shipping: z15.boolean().optional()
293
408
  }).merge(zBUserInfo).merge(zBPaymentInfo);
294
409
  var zCampBooking = addAutoProps(zBCampBooking);
295
410
 
296
411
  // 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()
412
+ import { z as z16 } from "zod";
413
+ var zBGroupBooking = z16.object({
414
+ gtId: z16.string().optional(),
415
+ isTrial: z16.boolean().optional(),
416
+ isOnline: z16.boolean(),
417
+ classDate: z16.string().optional(),
418
+ shipping: z16.boolean().optional()
304
419
  }).merge(zBUserInfo).merge(zBPaymentInfo);
305
420
  var zGroupBooking = addAutoProps(zBGroupBooking);
306
421
 
307
422
  // 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()
423
+ import { z as z17 } from "zod";
424
+ var zBPrivateBooking = z17.object({
425
+ courseId: z17.string(),
426
+ teacherId: z17.string(),
427
+ classDate: z17.string().optional()
313
428
  }).merge(zBUserInfo).merge(zBPaymentInfo);
314
429
  var zPrivateBooking = addAutoProps(zBPrivateBooking);
315
430
 
316
431
  // 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()
432
+ import { z as z18 } from "zod";
433
+ var zTeacherDisplay = z18.object({
434
+ name: z18.string(),
435
+ email: z18.string().email(),
436
+ title: z18.string(),
437
+ imageUrl: z18.string(),
438
+ bio: z18.string()
439
+ });
440
+ var zCourseTable = z18.object({
441
+ id: z18.string(),
442
+ name: z18.string(),
443
+ duration: z18.number(),
444
+ dateAndTime: z18.string(),
445
+ recommendedLevel: z18.string(),
446
+ tuition: z18.string()
332
447
  });
333
448
 
334
449
  // 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()
450
+ import { z as z19 } from "zod";
451
+ var zImageDef = z19.object({
452
+ url: z19.string(),
453
+ height: z19.number(),
454
+ width: z19.number()
340
455
  });
341
456
 
342
457
  // src/interface/reporting/reportTicket.ts
343
- import { z as z18 } from "zod";
458
+ import { z as z20 } from "zod";
344
459
 
345
460
  // src/interface/reporting/ticketStatus.ts
346
461
  var TicketStatus = /* @__PURE__ */ ((TicketStatus2) => {
@@ -352,12 +467,12 @@ var TicketStatus = /* @__PURE__ */ ((TicketStatus2) => {
352
467
  })(TicketStatus || {});
353
468
 
354
469
  // 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()
470
+ var zBReportTicket = z20.object({
471
+ requester: z20.string(),
472
+ resolver: z20.string().optional(),
473
+ status: z20.nativeEnum(TicketStatus),
474
+ title: z20.string(),
475
+ description: z20.string()
361
476
  });
362
477
  var zReportTicket = addAutoProps(zBReportTicket);
363
478
 
@@ -370,96 +485,96 @@ var Season = /* @__PURE__ */ ((Season2) => {
370
485
  })(Season || {});
371
486
 
372
487
  // 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(),
488
+ import { z as z21 } from "zod";
489
+ var zBSemester = z21.object({
490
+ season: z21.nativeEnum(Season),
491
+ year: z21.number().min(2022).max(2999),
492
+ startDate: z21.coerce.date(),
493
+ endDate: z21.coerce.date(),
379
494
  /**
380
495
  * Format: start, end, start, end, ...
381
496
  */
382
- blackoutDates: z19.array(z19.coerce.date()),
497
+ blackoutDates: z21.array(z21.coerce.date()),
383
498
  /**
384
499
  * List of names of some break: date range
385
500
  */
386
- importantDates: z19.array(z19.string())
501
+ importantDates: z21.array(z21.string())
387
502
  });
388
503
  var zSemester = addAutoProps(zBSemester);
389
504
 
390
505
  // src/interface/event/eConfig.ts
391
- import { z as z22 } from "zod";
506
+ import { z as z24 } from "zod";
392
507
 
393
508
  // 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"),
509
+ import { z as z22 } from "zod";
510
+ var zBEventTicket = z22.object({
511
+ name: z22.string().min(5, "Name must be at least 5 characters"),
397
512
  /**
398
513
  * Price in cents
399
514
  */
400
- price: z20.number().min(1, "Price must be at least $1"),
515
+ price: z22.number().min(1, "Price must be at least $1"),
401
516
  /**
402
517
  * @optional description of the ticket
403
518
  */
404
- description: z20.string().optional(),
519
+ description: z22.string().optional(),
405
520
  /**
406
521
  * @optional The ticket cannot be purchased if true
407
522
  */
408
- isNotBuyable: z20.boolean().optional(),
523
+ isNotBuyable: z22.boolean().optional(),
409
524
  /**
410
525
  * @optional If date is provided and in the past, ticket cannot be purchased
411
526
  */
412
- lastBuyableDate: z20.coerce.date().optional()
527
+ lastBuyableDate: z22.coerce.date().optional()
413
528
  });
414
529
  var zEventTicket = addAutoProps(zBEventTicket);
415
530
 
416
531
  // 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),
532
+ import { z as z23 } from "zod";
533
+ var zTable = z23.array(z23.record(z23.string(), z23.string()));
534
+ var zDetailsTable = z23.object({
535
+ fields: z23.array(z23.string()).length(2),
421
536
  data: zTable
422
537
  });
423
- var zScheduleTable = z21.object({
424
- fields: z21.array(z21.string()).length(2),
425
- data: z21.record(z21.string(), zTable)
538
+ var zScheduleTable = z23.object({
539
+ fields: z23.array(z23.string()).length(2),
540
+ data: z23.record(z23.string(), zTable)
426
541
  });
427
542
 
428
543
  // src/interface/event/eConfig.ts
429
- var zBEventConfig = z22.object({
544
+ var zBEventConfig = z24.object({
430
545
  /**
431
546
  * Location of the event
432
547
  */
433
- location: z22.string().optional(),
548
+ location: z24.string().optional(),
434
549
  /**
435
550
  * URL of the tournament on the official website
436
551
  * Must be a valid URL link
437
552
  */
438
- url: z22.string(),
553
+ url: z24.string(),
439
554
  /**
440
555
  * Full name of the tournament
441
556
  */
442
- title: z22.string(),
557
+ title: z24.string(),
443
558
  /**
444
559
  * Abbreviated title of the tournament
445
560
  */
446
- shortTitle: z22.string(),
561
+ shortTitle: z24.string(),
447
562
  /**
448
563
  * Tournament start date and time
449
564
  */
450
- tStart: z22.coerce.date(),
565
+ tStart: z24.coerce.date(),
451
566
  /**
452
567
  * Tournament end date and time
453
568
  */
454
- tEnd: z22.coerce.date(),
569
+ tEnd: z24.coerce.date(),
455
570
  /**
456
571
  * Short description for tournament card
457
572
  */
458
- shortDescription: z22.string(),
573
+ shortDescription: z24.string(),
459
574
  /**
460
575
  * Full description
461
576
  */
462
- description: z22.string(),
577
+ description: z24.string(),
463
578
  /**
464
579
  * Defines the tournament details table with 2 columns
465
580
  * typically Time and Event
@@ -473,15 +588,15 @@ var zBEventConfig = z22.object({
473
588
  /**
474
589
  * List of ticket object IDs for this tournament
475
590
  */
476
- tickets: z22.array(z22.string()),
591
+ tickets: z24.array(z24.string()),
477
592
  /**
478
593
  * If false, the tournament registration is closed
479
594
  */
480
- canRegister: z22.boolean(),
595
+ canRegister: z24.boolean(),
481
596
  /**
482
597
  * If true, free form donation amounts are disabled.
483
598
  */
484
- donationsDisabled: z22.boolean().optional(),
599
+ donationsDisabled: z24.boolean().optional(),
485
600
  /**
486
601
  * Defines URL, height, width of the image
487
602
  */
@@ -489,150 +604,42 @@ var zBEventConfig = z22.object({
489
604
  });
490
605
  var zEventConfig = addAutoProps(zBEventConfig);
491
606
  var zEventConfigResponse = zEventConfig.extend({
492
- tickets: z22.array(zEventTicket)
607
+ tickets: z24.array(zEventTicket)
493
608
  });
494
609
 
495
610
  // src/interface/event/eReg.ts
496
- import { z as z24 } from "zod";
611
+ import { z as z26 } from "zod";
497
612
 
498
613
  // src/interface/event/eTicketReg.ts
499
- import { z as z23 } from "zod";
500
- var zEventTicketReg = z23.object({
501
- ticket: z23.string(),
614
+ import { z as z25 } from "zod";
615
+ var zEventTicketReg = z25.object({
616
+ ticket: z25.string(),
502
617
  /**
503
618
  * integer minimum 1, otherwise no ticket is being bought
504
619
  */
505
- amount: z23.number().int().min(1)
620
+ amount: z25.number().int().min(1)
506
621
  });
507
622
  var zEventTicketRegResponse = zEventTicketReg.extend({
508
623
  ticket: zEventTicket
509
624
  });
510
625
 
511
626
  // src/interface/event/eReg.ts
512
- var zBEventReg = z24.object({
513
- agaId: z24.string(),
514
- tournamentId: z24.string(),
515
- tickets: z24.array(zEventTicketReg),
627
+ var zBEventReg = z26.object({
628
+ agaId: z26.string(),
629
+ tournamentId: z26.string(),
630
+ tickets: z26.array(zEventTicketReg),
516
631
  /**
517
632
  * @units CENTS - Donation in cents
518
633
  */
519
- donation: z24.coerce.number().optional(),
634
+ donation: z26.coerce.number().optional(),
520
635
  /**
521
636
  * How the registration was created, through public endpoint or admin
522
637
  */
523
- createMethod: z24.string().optional()
638
+ createMethod: z26.string().optional()
524
639
  }).merge(zBUserInfo).merge(zBPaymentInfo);
525
640
  var zEventReg = addAutoProps(zBEventReg);
526
641
  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()
642
+ tickets: z26.array(zEventTicketRegResponse)
636
643
  });
637
644
  export {
638
645
  AgeGroup,
@@ -693,6 +700,7 @@ export {
693
700
  zTeacher,
694
701
  zTeacherDisplay,
695
702
  zTeacherPayment,
703
+ zTeacherPaymentResponse,
696
704
  zTeacherPaymentRow,
697
705
  zTuition,
698
706
  zUser,