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