@nyig/models 0.2.46 → 0.3.0
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.
- package/index.d.mts +74 -20
- package/index.d.ts +74 -20
- package/index.js +211 -194
- package/index.mjs +210 -194
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -28,6 +28,7 @@ __export(src_exports, {
|
|
|
28
28
|
GoRank: () => GoRank,
|
|
29
29
|
NYIGSchool: () => NYIGSchool,
|
|
30
30
|
PaymentMethod: () => PaymentMethod,
|
|
31
|
+
Role: () => Role,
|
|
31
32
|
Season: () => Season,
|
|
32
33
|
TicketStatus: () => TicketStatus,
|
|
33
34
|
zAttendance: () => zAttendance,
|
|
@@ -134,7 +135,7 @@ var BookingType = /* @__PURE__ */ ((BookingType2) => {
|
|
|
134
135
|
})(BookingType || {});
|
|
135
136
|
|
|
136
137
|
// src/interface/booking/campBooking.ts
|
|
137
|
-
var
|
|
138
|
+
var import_zod17 = require("zod");
|
|
138
139
|
|
|
139
140
|
// src/interface/tracking/attendState.ts
|
|
140
141
|
var AttendState = /* @__PURE__ */ ((AttendState2) => {
|
|
@@ -145,7 +146,7 @@ var AttendState = /* @__PURE__ */ ((AttendState2) => {
|
|
|
145
146
|
})(AttendState || {});
|
|
146
147
|
|
|
147
148
|
// src/interface/tracking/attendance.ts
|
|
148
|
-
var
|
|
149
|
+
var import_zod9 = require("zod");
|
|
149
150
|
|
|
150
151
|
// src/interface/payment/tuition.ts
|
|
151
152
|
var import_zod3 = require("zod");
|
|
@@ -240,26 +241,46 @@ var zBUser = import_zod5.z.object({
|
|
|
240
241
|
}).or(import_zod5.z.literal("")).optional()
|
|
241
242
|
});
|
|
242
243
|
var zUser = addAutoProps(zBUser);
|
|
244
|
+
|
|
245
|
+
// src/interface/user/roles.ts
|
|
246
|
+
var import_zod6 = require("zod");
|
|
247
|
+
var Role = /* @__PURE__ */ ((Role2) => {
|
|
248
|
+
Role2[Role2["SUPERADMIN"] = 7926] = "SUPERADMIN";
|
|
249
|
+
Role2[Role2["ADMIN"] = 2023] = "ADMIN";
|
|
250
|
+
Role2[Role2["USER"] = 2014] = "USER";
|
|
251
|
+
return Role2;
|
|
252
|
+
})(Role || {});
|
|
253
|
+
var zUserRoles = import_zod6.z.object({
|
|
254
|
+
user: import_zod6.z.number().int(),
|
|
255
|
+
admin: import_zod6.z.number().int(),
|
|
256
|
+
superadmin: import_zod6.z.number().int()
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
// src/interface/user/student.ts
|
|
260
|
+
var import_zod7 = require("zod");
|
|
243
261
|
var zBStudent = zBUser.extend({
|
|
244
|
-
rank:
|
|
245
|
-
guardian:
|
|
262
|
+
rank: import_zod7.z.nativeEnum(GoRank),
|
|
263
|
+
guardian: import_zod7.z.string().optional()
|
|
246
264
|
});
|
|
247
265
|
var zStudent = addAutoProps(zBStudent);
|
|
266
|
+
|
|
267
|
+
// src/interface/user/teacher.ts
|
|
268
|
+
var import_zod8 = require("zod");
|
|
248
269
|
var zBTeacher = zBUser.extend({
|
|
249
|
-
rank:
|
|
270
|
+
rank: import_zod8.z.nativeEnum(GoRank),
|
|
250
271
|
/**
|
|
251
272
|
* Inactive teachers are not shown on public endpoints
|
|
252
273
|
*/
|
|
253
|
-
isInactive:
|
|
274
|
+
isInactive: import_zod8.z.boolean().optional(),
|
|
254
275
|
/**
|
|
255
276
|
* Teacher's position, e.g., instructor, president
|
|
256
277
|
*/
|
|
257
|
-
title:
|
|
278
|
+
title: import_zod8.z.string().optional(),
|
|
258
279
|
/**
|
|
259
280
|
* Teacher's bio text describing experience
|
|
260
281
|
* new lines will be rendered as paragraphs
|
|
261
282
|
*/
|
|
262
|
-
bio:
|
|
283
|
+
bio: import_zod8.z.string().optional(),
|
|
263
284
|
/** Format is illustrated below, where teacher is available
|
|
264
285
|
* Mon 9-12am 3-6pm & Tue 10-12am 6-10pm
|
|
265
286
|
* [
|
|
@@ -272,25 +293,20 @@ var zBTeacher = zBUser.extend({
|
|
|
272
293
|
* [],
|
|
273
294
|
* ]
|
|
274
295
|
*/
|
|
275
|
-
available:
|
|
296
|
+
available: import_zod8.z.array(import_zod8.z.array(import_zod8.z.array(import_zod8.z.number()))).optional()
|
|
276
297
|
});
|
|
277
298
|
var zTeacher = addAutoProps(zBTeacher);
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
var import_zod6 = require("zod");
|
|
281
|
-
var zUserRoles = import_zod6.z.object({
|
|
282
|
-
user: import_zod6.z.number().int(),
|
|
283
|
-
admin: import_zod6.z.number().int(),
|
|
284
|
-
superadmin: import_zod6.z.number().int()
|
|
299
|
+
var zTeacherResponse = zTeacher.omit({ password: true, roles: true, editedBy: true, updatedAt: true, createdAt: true }).extend({
|
|
300
|
+
role: import_zod8.z.string()
|
|
285
301
|
});
|
|
286
302
|
|
|
287
303
|
// src/interface/tracking/attendance.ts
|
|
288
|
-
var zBAttendance =
|
|
289
|
-
student:
|
|
290
|
-
states:
|
|
304
|
+
var zBAttendance = import_zod9.z.object({
|
|
305
|
+
student: import_zod9.z.string(),
|
|
306
|
+
states: import_zod9.z.array(import_zod9.z.nativeEnum(AttendState)),
|
|
291
307
|
tuition: zTuition,
|
|
292
|
-
paid:
|
|
293
|
-
campOption:
|
|
308
|
+
paid: import_zod9.z.boolean().optional(),
|
|
309
|
+
campOption: import_zod9.z.nativeEnum(CampOption).optional()
|
|
294
310
|
});
|
|
295
311
|
var zAttendance = addAutoProps(zBAttendance);
|
|
296
312
|
var zAttendanceResponse = zAttendance.extend({
|
|
@@ -298,30 +314,30 @@ var zAttendanceResponse = zAttendance.extend({
|
|
|
298
314
|
});
|
|
299
315
|
|
|
300
316
|
// src/interface/tracking/campTracker.ts
|
|
301
|
-
var
|
|
302
|
-
var zBCampTracker =
|
|
303
|
-
course:
|
|
304
|
-
teacher:
|
|
305
|
-
semester:
|
|
317
|
+
var import_zod10 = require("zod");
|
|
318
|
+
var zBCampTracker = import_zod10.z.object({
|
|
319
|
+
course: import_zod10.z.string(),
|
|
320
|
+
teacher: import_zod10.z.string(),
|
|
321
|
+
semester: import_zod10.z.string(),
|
|
306
322
|
/**
|
|
307
323
|
* occurrences are tracked by week for camps
|
|
308
324
|
*/
|
|
309
|
-
occurrences:
|
|
325
|
+
occurrences: import_zod10.z.array(import_zod10.z.string()),
|
|
310
326
|
/**
|
|
311
327
|
* attendances are tracked by week for camps
|
|
312
328
|
*/
|
|
313
|
-
attendances:
|
|
314
|
-
publicDescription:
|
|
315
|
-
isNonPublic:
|
|
316
|
-
notes:
|
|
329
|
+
attendances: import_zod10.z.array(import_zod10.z.string()),
|
|
330
|
+
publicDescription: import_zod10.z.string().optional(),
|
|
331
|
+
isNonPublic: import_zod10.z.boolean().optional(),
|
|
332
|
+
notes: import_zod10.z.string().optional()
|
|
317
333
|
});
|
|
318
334
|
var zCampTracker = addAutoProps(zBCampTracker);
|
|
319
335
|
|
|
320
336
|
// src/interface/tracking/classTracker.ts
|
|
321
|
-
var
|
|
337
|
+
var import_zod13 = require("zod");
|
|
322
338
|
|
|
323
339
|
// src/interface/payment/invoice.ts
|
|
324
|
-
var
|
|
340
|
+
var import_zod11 = require("zod");
|
|
325
341
|
|
|
326
342
|
// src/interface/payment/paymentMethod.ts
|
|
327
343
|
var PaymentMethod = /* @__PURE__ */ ((PaymentMethod2) => {
|
|
@@ -333,53 +349,53 @@ var PaymentMethod = /* @__PURE__ */ ((PaymentMethod2) => {
|
|
|
333
349
|
})(PaymentMethod || {});
|
|
334
350
|
|
|
335
351
|
// src/interface/payment/invoice.ts
|
|
336
|
-
var zDiscount =
|
|
337
|
-
desc:
|
|
338
|
-
amount:
|
|
352
|
+
var zDiscount = import_zod11.z.object({
|
|
353
|
+
desc: import_zod11.z.string().min(1, "Discount description cannot be empty"),
|
|
354
|
+
amount: import_zod11.z.coerce.number()
|
|
339
355
|
});
|
|
340
|
-
var zInvoiceItem =
|
|
341
|
-
course:
|
|
342
|
-
price:
|
|
343
|
-
units:
|
|
356
|
+
var zInvoiceItem = import_zod11.z.object({
|
|
357
|
+
course: import_zod11.z.string().min(1, "Course description cannot be empty"),
|
|
358
|
+
price: import_zod11.z.coerce.number(),
|
|
359
|
+
units: import_zod11.z.coerce.number()
|
|
344
360
|
});
|
|
345
|
-
var zInvoicePackage =
|
|
346
|
-
student:
|
|
347
|
-
items:
|
|
361
|
+
var zInvoicePackage = import_zod11.z.object({
|
|
362
|
+
student: import_zod11.z.string(),
|
|
363
|
+
items: import_zod11.z.array(zInvoiceItem).min(1, "Package must contain at least one item")
|
|
348
364
|
});
|
|
349
365
|
var zInvoicePackageResponse = zInvoicePackage.extend({
|
|
350
366
|
student: zStudent
|
|
351
367
|
});
|
|
352
|
-
var zBInvoice =
|
|
353
|
-
billTo:
|
|
354
|
-
packages:
|
|
355
|
-
discounts:
|
|
356
|
-
textbook:
|
|
357
|
-
shipping:
|
|
358
|
-
paid:
|
|
359
|
-
showEin:
|
|
360
|
-
notes:
|
|
361
|
-
createdBy:
|
|
362
|
-
lastEditBy:
|
|
368
|
+
var zBInvoice = import_zod11.z.object({
|
|
369
|
+
billTo: import_zod11.z.string().min(1, "The 'Bill To' field must not be empty"),
|
|
370
|
+
packages: import_zod11.z.array(zInvoicePackage).min(1, "Invoice must include at least one package"),
|
|
371
|
+
discounts: import_zod11.z.array(zDiscount),
|
|
372
|
+
textbook: import_zod11.z.coerce.number().int().min(0).optional(),
|
|
373
|
+
shipping: import_zod11.z.coerce.number().int().min(0).optional(),
|
|
374
|
+
paid: import_zod11.z.nativeEnum(PaymentMethod).optional(),
|
|
375
|
+
showEin: import_zod11.z.boolean().optional(),
|
|
376
|
+
notes: import_zod11.z.string().or(import_zod11.z.literal("")).optional(),
|
|
377
|
+
createdBy: import_zod11.z.string(),
|
|
378
|
+
lastEditBy: import_zod11.z.string().optional()
|
|
363
379
|
});
|
|
364
380
|
var zInvoice = addAutoProps(zBInvoice);
|
|
365
381
|
var zInvoiceResponse = zInvoice.extend({
|
|
366
382
|
createdBy: zTeacher,
|
|
367
383
|
lastEditBy: zTeacher.optional(),
|
|
368
|
-
packages:
|
|
384
|
+
packages: import_zod11.z.array(zInvoicePackageResponse)
|
|
369
385
|
});
|
|
370
386
|
|
|
371
387
|
// src/interface/payment/teacherPayment.ts
|
|
372
|
-
var
|
|
373
|
-
var zTeacherPaymentRow =
|
|
374
|
-
course:
|
|
375
|
-
length:
|
|
376
|
-
count:
|
|
377
|
-
wage:
|
|
388
|
+
var import_zod12 = require("zod");
|
|
389
|
+
var zTeacherPaymentRow = import_zod12.z.object({
|
|
390
|
+
course: import_zod12.z.string().min(1, "select or enter a course"),
|
|
391
|
+
length: import_zod12.z.coerce.number().gt(0, "must be > 0"),
|
|
392
|
+
count: import_zod12.z.coerce.number().int().gt(0, "must be > 0"),
|
|
393
|
+
wage: import_zod12.z.coerce.number().gt(0, "wage must be > 0")
|
|
378
394
|
});
|
|
379
|
-
var zBTeacherPayment =
|
|
380
|
-
teacher:
|
|
381
|
-
rows:
|
|
382
|
-
paid:
|
|
395
|
+
var zBTeacherPayment = import_zod12.z.object({
|
|
396
|
+
teacher: import_zod12.z.string().min(1, "select or enter a teacher"),
|
|
397
|
+
rows: import_zod12.z.array(zTeacherPaymentRow),
|
|
398
|
+
paid: import_zod12.z.boolean().optional()
|
|
383
399
|
});
|
|
384
400
|
var zTeacherPayment = addAutoProps(zBTeacherPayment);
|
|
385
401
|
var zTeacherPaymentResponse = zTeacherPayment.extend({
|
|
@@ -387,32 +403,32 @@ var zTeacherPaymentResponse = zTeacherPayment.extend({
|
|
|
387
403
|
});
|
|
388
404
|
|
|
389
405
|
// src/interface/tracking/classTracker.ts
|
|
390
|
-
var zBClassTracker =
|
|
391
|
-
course:
|
|
392
|
-
teacher:
|
|
393
|
-
student:
|
|
394
|
-
classTimes:
|
|
395
|
-
completedList:
|
|
406
|
+
var zBClassTracker = import_zod13.z.object({
|
|
407
|
+
course: import_zod13.z.string(),
|
|
408
|
+
teacher: import_zod13.z.string(),
|
|
409
|
+
student: import_zod13.z.string(),
|
|
410
|
+
classTimes: import_zod13.z.array(import_zod13.z.coerce.date()),
|
|
411
|
+
completedList: import_zod13.z.array(import_zod13.z.boolean()),
|
|
396
412
|
/**
|
|
397
413
|
* Virtual mongoose field when all values in completedList is true
|
|
398
414
|
*/
|
|
399
|
-
completed:
|
|
415
|
+
completed: import_zod13.z.boolean().optional(),
|
|
400
416
|
tuition: zTuition.optional(),
|
|
401
|
-
paid:
|
|
402
|
-
paused:
|
|
403
|
-
notes:
|
|
417
|
+
paid: import_zod13.z.boolean().optional(),
|
|
418
|
+
paused: import_zod13.z.boolean().optional(),
|
|
419
|
+
notes: import_zod13.z.string().optional()
|
|
404
420
|
});
|
|
405
421
|
var zClassTracker = addAutoProps(zBClassTracker);
|
|
406
422
|
|
|
407
423
|
// src/interface/tracking/groupTracker.ts
|
|
408
|
-
var
|
|
424
|
+
var import_zod16 = require("zod");
|
|
409
425
|
|
|
410
426
|
// src/interface/tracking/scheduleData.ts
|
|
411
|
-
var
|
|
412
|
-
var zScheduleData =
|
|
413
|
-
startTime:
|
|
427
|
+
var import_zod14 = require("zod");
|
|
428
|
+
var zScheduleData = import_zod14.z.object({
|
|
429
|
+
startTime: import_zod14.z.string(),
|
|
414
430
|
// String in 24 hour "HH:mm" format
|
|
415
|
-
dayOfWeek:
|
|
431
|
+
dayOfWeek: import_zod14.z.number().int().min(0).max(6)
|
|
416
432
|
// integeters in 0 - 6
|
|
417
433
|
});
|
|
418
434
|
|
|
@@ -441,126 +457,126 @@ var NYIGSchool = /* @__PURE__ */ ((NYIGSchool2) => {
|
|
|
441
457
|
})(NYIGSchool || {});
|
|
442
458
|
|
|
443
459
|
// src/interface/course/course.ts
|
|
444
|
-
var
|
|
445
|
-
var zBCourse =
|
|
446
|
-
name:
|
|
447
|
-
category:
|
|
460
|
+
var import_zod15 = require("zod");
|
|
461
|
+
var zBCourse = import_zod15.z.object({
|
|
462
|
+
name: import_zod15.z.string(),
|
|
463
|
+
category: import_zod15.z.nativeEnum(CourseCategory),
|
|
448
464
|
/**
|
|
449
465
|
* @unit SECONDS - Duration of the course in seconds
|
|
450
466
|
*/
|
|
451
|
-
duration:
|
|
467
|
+
duration: import_zod15.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"),
|
|
452
468
|
/**
|
|
453
469
|
* @unit CENTS - Price of the course in cents
|
|
454
470
|
*/
|
|
455
|
-
price:
|
|
456
|
-
description:
|
|
471
|
+
price: import_zod15.z.coerce.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0"),
|
|
472
|
+
description: import_zod15.z.string().or(import_zod15.z.literal("")).optional(),
|
|
457
473
|
/**
|
|
458
474
|
* NYIG School locations
|
|
459
475
|
*/
|
|
460
|
-
nyigSchool:
|
|
476
|
+
nyigSchool: import_zod15.z.nativeEnum(NYIGSchool),
|
|
461
477
|
/**
|
|
462
478
|
* Recommended level before taking this course
|
|
463
479
|
*/
|
|
464
|
-
recLevel:
|
|
480
|
+
recLevel: import_zod15.z.string().or(import_zod15.z.literal("")).optional(),
|
|
465
481
|
/**
|
|
466
482
|
* Camp tuition for half-day option
|
|
467
483
|
*/
|
|
468
|
-
halfCampTuition:
|
|
484
|
+
halfCampTuition: import_zod15.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(),
|
|
469
485
|
/**
|
|
470
486
|
* Camp tuition for full-day option
|
|
471
487
|
*/
|
|
472
|
-
fullCampTuition:
|
|
488
|
+
fullCampTuition: import_zod15.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()
|
|
473
489
|
});
|
|
474
490
|
var zCourse = addAutoProps(zBCourse);
|
|
475
491
|
|
|
476
492
|
// src/interface/tracking/groupTracker.ts
|
|
477
|
-
var zBGroupTracker =
|
|
478
|
-
course:
|
|
479
|
-
teacher:
|
|
480
|
-
semester:
|
|
493
|
+
var zBGroupTracker = import_zod16.z.object({
|
|
494
|
+
course: import_zod16.z.string(),
|
|
495
|
+
teacher: import_zod16.z.string(),
|
|
496
|
+
semester: import_zod16.z.string(),
|
|
481
497
|
scheduleData: zScheduleData,
|
|
482
498
|
/**
|
|
483
499
|
* occurrences are tracked by week for Groups
|
|
484
500
|
*/
|
|
485
|
-
occurrences:
|
|
501
|
+
occurrences: import_zod16.z.array(import_zod16.z.coerce.date()),
|
|
486
502
|
/**
|
|
487
503
|
* attendances are tracked by week for Groups
|
|
488
504
|
*/
|
|
489
|
-
attendances:
|
|
505
|
+
attendances: import_zod16.z.array(import_zod16.z.string()),
|
|
490
506
|
/**
|
|
491
507
|
* public-facing ID of the course instance, e.g., 101
|
|
492
508
|
*/
|
|
493
|
-
courseId:
|
|
509
|
+
courseId: import_zod16.z.string().optional(),
|
|
494
510
|
/**
|
|
495
511
|
* Age group of the class instance, e.g. "adult", "youth"
|
|
496
512
|
*/
|
|
497
|
-
ageGroup:
|
|
513
|
+
ageGroup: import_zod16.z.nativeEnum(AgeGroup).optional(),
|
|
498
514
|
/**
|
|
499
515
|
* If true, the course is hidden from public view
|
|
500
516
|
*/
|
|
501
|
-
isNonPublic:
|
|
502
|
-
notes:
|
|
517
|
+
isNonPublic: import_zod16.z.boolean().optional(),
|
|
518
|
+
notes: import_zod16.z.string().optional()
|
|
503
519
|
});
|
|
504
520
|
var zGroupTracker = addAutoProps(zBGroupTracker);
|
|
505
521
|
|
|
506
522
|
// src/interface/booking/campBooking.ts
|
|
507
|
-
var zBCampBooking =
|
|
508
|
-
ctId:
|
|
509
|
-
isOnline:
|
|
510
|
-
classDates:
|
|
511
|
-
campOption:
|
|
512
|
-
shipping:
|
|
523
|
+
var zBCampBooking = import_zod17.z.object({
|
|
524
|
+
ctId: import_zod17.z.string().optional(),
|
|
525
|
+
isOnline: import_zod17.z.boolean(),
|
|
526
|
+
classDates: import_zod17.z.string(),
|
|
527
|
+
campOption: import_zod17.z.nativeEnum(CampOption),
|
|
528
|
+
shipping: import_zod17.z.boolean().optional()
|
|
513
529
|
}).merge(zBUserInfo).merge(zBPaymentInfo);
|
|
514
530
|
var zCampBooking = addAutoProps(zBCampBooking);
|
|
515
531
|
|
|
516
532
|
// src/interface/booking/groupBooking.ts
|
|
517
|
-
var
|
|
518
|
-
var zBGroupBooking =
|
|
519
|
-
gtId:
|
|
520
|
-
isTrial:
|
|
521
|
-
isOnline:
|
|
522
|
-
classDate:
|
|
523
|
-
shipping:
|
|
533
|
+
var import_zod18 = require("zod");
|
|
534
|
+
var zBGroupBooking = import_zod18.z.object({
|
|
535
|
+
gtId: import_zod18.z.string().optional(),
|
|
536
|
+
isTrial: import_zod18.z.boolean().optional(),
|
|
537
|
+
isOnline: import_zod18.z.boolean(),
|
|
538
|
+
classDate: import_zod18.z.string().optional(),
|
|
539
|
+
shipping: import_zod18.z.boolean().optional()
|
|
524
540
|
}).merge(zBUserInfo).merge(zBPaymentInfo);
|
|
525
541
|
var zGroupBooking = addAutoProps(zBGroupBooking);
|
|
526
542
|
|
|
527
543
|
// src/interface/booking/privateBooking.ts
|
|
528
|
-
var
|
|
529
|
-
var zBPrivateBooking =
|
|
530
|
-
courseId:
|
|
531
|
-
teacherId:
|
|
532
|
-
classDate:
|
|
544
|
+
var import_zod19 = require("zod");
|
|
545
|
+
var zBPrivateBooking = import_zod19.z.object({
|
|
546
|
+
courseId: import_zod19.z.string(),
|
|
547
|
+
teacherId: import_zod19.z.string(),
|
|
548
|
+
classDate: import_zod19.z.string().optional()
|
|
533
549
|
}).merge(zBUserInfo).merge(zBPaymentInfo);
|
|
534
550
|
var zPrivateBooking = addAutoProps(zBPrivateBooking);
|
|
535
551
|
|
|
536
552
|
// src/interface/public/aurora.ts
|
|
537
|
-
var
|
|
538
|
-
var zTeacherDisplay =
|
|
539
|
-
name:
|
|
540
|
-
email:
|
|
541
|
-
title:
|
|
542
|
-
imageUrl:
|
|
543
|
-
bio:
|
|
544
|
-
});
|
|
545
|
-
var zCourseTable =
|
|
546
|
-
id:
|
|
547
|
-
name:
|
|
548
|
-
duration:
|
|
549
|
-
dateAndTime:
|
|
550
|
-
recommendedLevel:
|
|
551
|
-
tuition:
|
|
553
|
+
var import_zod20 = require("zod");
|
|
554
|
+
var zTeacherDisplay = import_zod20.z.object({
|
|
555
|
+
name: import_zod20.z.string(),
|
|
556
|
+
email: import_zod20.z.string().email(),
|
|
557
|
+
title: import_zod20.z.string(),
|
|
558
|
+
imageUrl: import_zod20.z.string(),
|
|
559
|
+
bio: import_zod20.z.string()
|
|
560
|
+
});
|
|
561
|
+
var zCourseTable = import_zod20.z.object({
|
|
562
|
+
id: import_zod20.z.string(),
|
|
563
|
+
name: import_zod20.z.string(),
|
|
564
|
+
duration: import_zod20.z.number(),
|
|
565
|
+
dateAndTime: import_zod20.z.string(),
|
|
566
|
+
recommendedLevel: import_zod20.z.string(),
|
|
567
|
+
tuition: import_zod20.z.string()
|
|
552
568
|
});
|
|
553
569
|
|
|
554
570
|
// src/interface/public/imageDef.ts
|
|
555
|
-
var
|
|
556
|
-
var zImageDef =
|
|
557
|
-
url:
|
|
558
|
-
height:
|
|
559
|
-
width:
|
|
571
|
+
var import_zod21 = require("zod");
|
|
572
|
+
var zImageDef = import_zod21.z.object({
|
|
573
|
+
url: import_zod21.z.string(),
|
|
574
|
+
height: import_zod21.z.number(),
|
|
575
|
+
width: import_zod21.z.number()
|
|
560
576
|
});
|
|
561
577
|
|
|
562
578
|
// src/interface/reporting/reportTicket.ts
|
|
563
|
-
var
|
|
579
|
+
var import_zod22 = require("zod");
|
|
564
580
|
|
|
565
581
|
// src/interface/reporting/ticketStatus.ts
|
|
566
582
|
var TicketStatus = /* @__PURE__ */ ((TicketStatus2) => {
|
|
@@ -572,12 +588,12 @@ var TicketStatus = /* @__PURE__ */ ((TicketStatus2) => {
|
|
|
572
588
|
})(TicketStatus || {});
|
|
573
589
|
|
|
574
590
|
// src/interface/reporting/reportTicket.ts
|
|
575
|
-
var zBReportTicket =
|
|
576
|
-
requester:
|
|
577
|
-
resolver:
|
|
578
|
-
status:
|
|
579
|
-
title:
|
|
580
|
-
description:
|
|
591
|
+
var zBReportTicket = import_zod22.z.object({
|
|
592
|
+
requester: import_zod22.z.string(),
|
|
593
|
+
resolver: import_zod22.z.string().optional(),
|
|
594
|
+
status: import_zod22.z.nativeEnum(TicketStatus),
|
|
595
|
+
title: import_zod22.z.string(),
|
|
596
|
+
description: import_zod22.z.string()
|
|
581
597
|
});
|
|
582
598
|
var zReportTicket = addAutoProps(zBReportTicket);
|
|
583
599
|
var zReportTicketResponse = zReportTicket.extend({
|
|
@@ -594,96 +610,96 @@ var Season = /* @__PURE__ */ ((Season2) => {
|
|
|
594
610
|
})(Season || {});
|
|
595
611
|
|
|
596
612
|
// src/interface/semester/semester.ts
|
|
597
|
-
var
|
|
598
|
-
var zBSemester =
|
|
599
|
-
season:
|
|
600
|
-
year:
|
|
601
|
-
startDate:
|
|
602
|
-
endDate:
|
|
613
|
+
var import_zod23 = require("zod");
|
|
614
|
+
var zBSemester = import_zod23.z.object({
|
|
615
|
+
season: import_zod23.z.nativeEnum(Season),
|
|
616
|
+
year: import_zod23.z.number().min(2022).max(2999),
|
|
617
|
+
startDate: import_zod23.z.coerce.date(),
|
|
618
|
+
endDate: import_zod23.z.coerce.date(),
|
|
603
619
|
/**
|
|
604
620
|
* Format: start, end, start, end, ...
|
|
605
621
|
*/
|
|
606
|
-
blackoutDates:
|
|
622
|
+
blackoutDates: import_zod23.z.array(import_zod23.z.coerce.date()),
|
|
607
623
|
/**
|
|
608
624
|
* List of names of some break: date range
|
|
609
625
|
*/
|
|
610
|
-
importantDates:
|
|
626
|
+
importantDates: import_zod23.z.array(import_zod23.z.string())
|
|
611
627
|
});
|
|
612
628
|
var zSemester = addAutoProps(zBSemester);
|
|
613
629
|
|
|
614
630
|
// src/interface/event/eConfig.ts
|
|
615
|
-
var
|
|
631
|
+
var import_zod26 = require("zod");
|
|
616
632
|
|
|
617
633
|
// src/interface/event/eTicket.ts
|
|
618
|
-
var
|
|
619
|
-
var zBEventTicket =
|
|
620
|
-
name:
|
|
634
|
+
var import_zod24 = require("zod");
|
|
635
|
+
var zBEventTicket = import_zod24.z.object({
|
|
636
|
+
name: import_zod24.z.string().min(5, "Name must be at least 5 characters"),
|
|
621
637
|
/**
|
|
622
638
|
* Price in cents
|
|
623
639
|
*/
|
|
624
|
-
price:
|
|
640
|
+
price: import_zod24.z.number().min(1, "Price must be at least $1"),
|
|
625
641
|
/**
|
|
626
642
|
* @optional description of the ticket
|
|
627
643
|
*/
|
|
628
|
-
description:
|
|
644
|
+
description: import_zod24.z.string().optional(),
|
|
629
645
|
/**
|
|
630
646
|
* @optional The ticket cannot be purchased if true
|
|
631
647
|
*/
|
|
632
|
-
isNotBuyable:
|
|
648
|
+
isNotBuyable: import_zod24.z.boolean().optional(),
|
|
633
649
|
/**
|
|
634
650
|
* @optional If date is provided and in the past, ticket cannot be purchased
|
|
635
651
|
*/
|
|
636
|
-
lastBuyableDate:
|
|
652
|
+
lastBuyableDate: import_zod24.z.coerce.date().optional()
|
|
637
653
|
});
|
|
638
654
|
var zEventTicket = addAutoProps(zBEventTicket);
|
|
639
655
|
|
|
640
656
|
// src/interface/event/table.ts
|
|
641
|
-
var
|
|
642
|
-
var zTable =
|
|
643
|
-
var zDetailsTable =
|
|
644
|
-
fields:
|
|
657
|
+
var import_zod25 = require("zod");
|
|
658
|
+
var zTable = import_zod25.z.array(import_zod25.z.record(import_zod25.z.string(), import_zod25.z.string()));
|
|
659
|
+
var zDetailsTable = import_zod25.z.object({
|
|
660
|
+
fields: import_zod25.z.array(import_zod25.z.string()).length(2),
|
|
645
661
|
data: zTable
|
|
646
662
|
});
|
|
647
|
-
var zScheduleTable =
|
|
648
|
-
fields:
|
|
649
|
-
data:
|
|
663
|
+
var zScheduleTable = import_zod25.z.object({
|
|
664
|
+
fields: import_zod25.z.array(import_zod25.z.string()).length(2),
|
|
665
|
+
data: import_zod25.z.record(import_zod25.z.string(), zTable)
|
|
650
666
|
});
|
|
651
667
|
|
|
652
668
|
// src/interface/event/eConfig.ts
|
|
653
|
-
var zBEventConfig =
|
|
669
|
+
var zBEventConfig = import_zod26.z.object({
|
|
654
670
|
/**
|
|
655
671
|
* Location of the event
|
|
656
672
|
*/
|
|
657
|
-
location:
|
|
673
|
+
location: import_zod26.z.string().optional(),
|
|
658
674
|
/**
|
|
659
675
|
* URL of the tournament on the official website
|
|
660
676
|
* Must be a valid URL link
|
|
661
677
|
*/
|
|
662
|
-
url:
|
|
678
|
+
url: import_zod26.z.string(),
|
|
663
679
|
/**
|
|
664
680
|
* Full name of the tournament
|
|
665
681
|
*/
|
|
666
|
-
title:
|
|
682
|
+
title: import_zod26.z.string(),
|
|
667
683
|
/**
|
|
668
684
|
* Abbreviated title of the tournament
|
|
669
685
|
*/
|
|
670
|
-
shortTitle:
|
|
686
|
+
shortTitle: import_zod26.z.string(),
|
|
671
687
|
/**
|
|
672
688
|
* Tournament start date and time
|
|
673
689
|
*/
|
|
674
|
-
tStart:
|
|
690
|
+
tStart: import_zod26.z.coerce.date(),
|
|
675
691
|
/**
|
|
676
692
|
* Tournament end date and time
|
|
677
693
|
*/
|
|
678
|
-
tEnd:
|
|
694
|
+
tEnd: import_zod26.z.coerce.date(),
|
|
679
695
|
/**
|
|
680
696
|
* Short description for tournament card
|
|
681
697
|
*/
|
|
682
|
-
shortDescription:
|
|
698
|
+
shortDescription: import_zod26.z.string(),
|
|
683
699
|
/**
|
|
684
700
|
* Full description
|
|
685
701
|
*/
|
|
686
|
-
description:
|
|
702
|
+
description: import_zod26.z.string(),
|
|
687
703
|
/**
|
|
688
704
|
* Defines the tournament details table with 2 columns
|
|
689
705
|
* typically Time and Event
|
|
@@ -697,15 +713,15 @@ var zBEventConfig = import_zod24.z.object({
|
|
|
697
713
|
/**
|
|
698
714
|
* List of ticket object IDs for this tournament
|
|
699
715
|
*/
|
|
700
|
-
tickets:
|
|
716
|
+
tickets: import_zod26.z.array(import_zod26.z.string()),
|
|
701
717
|
/**
|
|
702
718
|
* If false, the tournament registration is closed
|
|
703
719
|
*/
|
|
704
|
-
canRegister:
|
|
720
|
+
canRegister: import_zod26.z.boolean(),
|
|
705
721
|
/**
|
|
706
722
|
* If true, free form donation amounts are disabled.
|
|
707
723
|
*/
|
|
708
|
-
donationsDisabled:
|
|
724
|
+
donationsDisabled: import_zod26.z.boolean().optional(),
|
|
709
725
|
/**
|
|
710
726
|
* Defines URL, height, width of the image
|
|
711
727
|
*/
|
|
@@ -713,42 +729,42 @@ var zBEventConfig = import_zod24.z.object({
|
|
|
713
729
|
});
|
|
714
730
|
var zEventConfig = addAutoProps(zBEventConfig);
|
|
715
731
|
var zEventConfigResponse = zEventConfig.extend({
|
|
716
|
-
tickets:
|
|
732
|
+
tickets: import_zod26.z.array(zEventTicket)
|
|
717
733
|
});
|
|
718
734
|
|
|
719
735
|
// src/interface/event/eReg.ts
|
|
720
|
-
var
|
|
736
|
+
var import_zod28 = require("zod");
|
|
721
737
|
|
|
722
738
|
// src/interface/event/eTicketReg.ts
|
|
723
|
-
var
|
|
724
|
-
var zEventTicketReg =
|
|
725
|
-
ticket:
|
|
739
|
+
var import_zod27 = require("zod");
|
|
740
|
+
var zEventTicketReg = import_zod27.z.object({
|
|
741
|
+
ticket: import_zod27.z.string(),
|
|
726
742
|
/**
|
|
727
743
|
* integer minimum 1, otherwise no ticket is being bought
|
|
728
744
|
*/
|
|
729
|
-
amount:
|
|
745
|
+
amount: import_zod27.z.number().int().min(1)
|
|
730
746
|
});
|
|
731
747
|
var zEventTicketRegResponse = zEventTicketReg.extend({
|
|
732
748
|
ticket: zEventTicket
|
|
733
749
|
});
|
|
734
750
|
|
|
735
751
|
// src/interface/event/eReg.ts
|
|
736
|
-
var zBEventReg =
|
|
737
|
-
agaId:
|
|
738
|
-
tournamentId:
|
|
739
|
-
tickets:
|
|
752
|
+
var zBEventReg = import_zod28.z.object({
|
|
753
|
+
agaId: import_zod28.z.string(),
|
|
754
|
+
tournamentId: import_zod28.z.string(),
|
|
755
|
+
tickets: import_zod28.z.array(zEventTicketReg),
|
|
740
756
|
/**
|
|
741
757
|
* @units CENTS - Donation in cents
|
|
742
758
|
*/
|
|
743
|
-
donation:
|
|
759
|
+
donation: import_zod28.z.coerce.number().optional(),
|
|
744
760
|
/**
|
|
745
761
|
* How the registration was created, through public endpoint or admin
|
|
746
762
|
*/
|
|
747
|
-
createMethod:
|
|
763
|
+
createMethod: import_zod28.z.string().optional()
|
|
748
764
|
}).merge(zBUserInfo).merge(zBPaymentInfo);
|
|
749
765
|
var zEventReg = addAutoProps(zBEventReg);
|
|
750
766
|
var zEventRegResponse = zEventReg.extend({
|
|
751
|
-
tickets:
|
|
767
|
+
tickets: import_zod28.z.array(zEventTicketRegResponse)
|
|
752
768
|
});
|
|
753
769
|
// Annotate the CommonJS export names for ESM import in node:
|
|
754
770
|
0 && (module.exports = {
|
|
@@ -760,6 +776,7 @@ var zEventRegResponse = zEventReg.extend({
|
|
|
760
776
|
GoRank,
|
|
761
777
|
NYIGSchool,
|
|
762
778
|
PaymentMethod,
|
|
779
|
+
Role,
|
|
763
780
|
Season,
|
|
764
781
|
TicketStatus,
|
|
765
782
|
zAttendance,
|