@nyig/models 0.2.13 → 0.2.14

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 +130 -106
  2. package/index.d.ts +130 -106
  3. package/index.js +200 -197
  4. package/index.mjs +200 -197
  5. package/package.json +1 -1
package/index.mjs CHANGED
@@ -39,7 +39,7 @@ var BookingType = /* @__PURE__ */ ((BookingType2) => {
39
39
  })(BookingType || {});
40
40
 
41
41
  // src/interface/booking/campBooking.ts
42
- import { z as z14 } from "zod";
42
+ import { z as z13 } from "zod";
43
43
 
44
44
  // src/interface/mongoose/mongoose.ts
45
45
  import { z as z3 } from "zod";
@@ -91,37 +91,31 @@ var zAttendance = z5.object({
91
91
  var zMAttendance = extendZodObjectForMongoose(zAttendance);
92
92
 
93
93
  // src/interface/tracking/campTracker.ts
94
- import { z as z7 } from "zod";
95
-
96
- // src/interface/tracking/tracker.ts
97
94
  import { Types as Types3 } from "mongoose";
98
95
  import { z as z6 } from "zod";
99
- var zTracker = z6.object({
96
+ var zCampTracker = z6.object({
100
97
  course: z6.instanceof(Types3.ObjectId),
101
98
  teacher: z6.instanceof(Types3.ObjectId),
102
- semester: z6.instanceof(Types3.ObjectId)
103
- });
104
-
105
- // src/interface/tracking/campTracker.ts
106
- var zCampTracker = z7.object({
99
+ semester: z6.instanceof(Types3.ObjectId),
107
100
  /**
108
101
  * occurrences are tracked by week for camps
109
102
  */
110
- occurrences: z7.array(z7.string()),
103
+ occurrences: z6.array(z6.string()),
111
104
  /**
112
105
  * attendances are tracked by week for camps
113
106
  */
114
- attendances: z7.array(z7.string()),
115
- notes: z7.string().optional()
116
- }).merge(zTracker);
107
+ attendances: z6.array(z6.string()),
108
+ notes: z6.string().optional()
109
+ });
117
110
  var zMCampTracker = extendZodObjectForMongoose(zCampTracker);
118
111
 
119
112
  // src/interface/tracking/classTracker.ts
120
- import { z as z10 } from "zod";
113
+ import { Types as Types6 } from "mongoose";
114
+ import { z as z9 } from "zod";
121
115
 
122
116
  // src/interface/payment/invoice.ts
123
117
  import { Types as Types4 } from "mongoose";
124
- import { z as z8 } from "zod";
118
+ import { z as z7 } from "zod";
125
119
 
126
120
  // src/interface/payment/paymentMethod.ts
127
121
  var PaymentMethod = /* @__PURE__ */ ((PaymentMethod2) => {
@@ -133,70 +127,74 @@ var PaymentMethod = /* @__PURE__ */ ((PaymentMethod2) => {
133
127
  })(PaymentMethod || {});
134
128
 
135
129
  // src/interface/payment/invoice.ts
136
- var zDiscount = z8.object({
137
- desc: z8.string(),
138
- amount: z8.number()
130
+ var zDiscount = z7.object({
131
+ desc: z7.string(),
132
+ amount: z7.number()
139
133
  });
140
- var zInvoiceItem = z8.object({
141
- course: z8.instanceof(Types4.ObjectId),
142
- price: z8.number(),
143
- units: z8.number()
134
+ var zInvoiceItem = z7.object({
135
+ course: z7.instanceof(Types4.ObjectId),
136
+ price: z7.number(),
137
+ units: z7.number()
144
138
  });
145
- var zInvoicePackage = z8.object({
146
- student: z8.instanceof(Types4.ObjectId),
147
- items: z8.array(zInvoiceItem)
139
+ var zInvoicePackage = z7.object({
140
+ student: z7.instanceof(Types4.ObjectId),
141
+ items: z7.array(zInvoiceItem)
148
142
  });
149
- var zInvoice = z8.object({
150
- billTo: z8.string(),
151
- packages: z8.array(zInvoicePackage),
152
- discounts: z8.array(zDiscount),
153
- textbook: z8.number().int().min(1).optional(),
154
- shipping: z8.number().int().min(1).optional(),
155
- paid: z8.nativeEnum(PaymentMethod).optional(),
156
- notes: z8.string().optional(),
157
- createdBy: z8.instanceof(Types4.ObjectId),
158
- lastEditBy: z8.instanceof(Types4.ObjectId).optional()
143
+ var zInvoice = z7.object({
144
+ billTo: z7.string(),
145
+ packages: z7.array(zInvoicePackage),
146
+ discounts: z7.array(zDiscount),
147
+ textbook: z7.number().int().min(1).optional(),
148
+ shipping: z7.number().int().min(1).optional(),
149
+ paid: z7.nativeEnum(PaymentMethod).optional(),
150
+ notes: z7.string().optional(),
151
+ createdBy: z7.instanceof(Types4.ObjectId),
152
+ lastEditBy: z7.instanceof(Types4.ObjectId).optional()
159
153
  });
160
154
  var zMInvoice = extendZodObjectForMongoose(zInvoice);
161
155
 
162
156
  // src/interface/payment/teacherPayment.ts
163
- import { z as z9 } from "zod";
164
- var zTeacherPaymentRow = z9.object({
165
- course: z9.string(),
166
- length: z9.number(),
167
- count: z9.number(),
168
- wage: z9.number()
157
+ import { Types as Types5 } from "mongoose";
158
+ import { z as z8 } from "zod";
159
+ var zTeacherPaymentRow = z8.object({
160
+ course: z8.string(),
161
+ length: z8.number(),
162
+ count: z8.number(),
163
+ wage: z8.number()
169
164
  });
170
- var zTeacherPayment = z9.object({
171
- teacher: z9.string(),
172
- rows: z9.array(zTeacherPaymentRow),
173
- paid: z9.boolean().optional()
165
+ var zTeacherPayment = z8.object({
166
+ teacher: z8.instanceof(Types5.ObjectId),
167
+ rows: z8.array(zTeacherPaymentRow),
168
+ paid: z8.boolean().optional()
174
169
  });
175
170
  var zMTeacherPayment = extendZodObjectForMongoose(zTeacherPayment);
176
171
 
177
172
  // src/interface/tracking/classTracker.ts
178
- var zClassTracker = z10.object({
179
- classTimes: z10.array(z10.coerce.date()),
180
- completedList: z10.array(z10.boolean()),
173
+ var zClassTracker = z9.object({
174
+ course: z9.instanceof(Types6.ObjectId),
175
+ teacher: z9.instanceof(Types6.ObjectId),
176
+ student: z9.instanceof(Types6.ObjectId),
177
+ classTimes: z9.array(z9.coerce.date()),
178
+ completedList: z9.array(z9.boolean()),
181
179
  /**
182
180
  * Virtual mongoose field when all values in completedList is true
183
181
  */
184
- completed: z10.boolean().optional(),
182
+ completed: z9.boolean().optional(),
185
183
  tuition: zTuition.optional(),
186
- paid: z10.boolean().optional(),
187
- notes: z10.string().optional()
188
- }).merge(zTracker);
184
+ paid: z9.boolean().optional(),
185
+ notes: z9.string().optional()
186
+ });
189
187
  var zMClassTracker = extendZodObjectForMongoose(zClassTracker);
190
188
 
191
189
  // src/interface/tracking/groupTracker.ts
192
- import { z as z13 } from "zod";
190
+ import { z as z12 } from "zod";
193
191
 
194
192
  // src/interface/tracking/scheduleData.ts
195
- import { z as z11 } from "zod";
196
- var zScheduleData = z11.object({
197
- startTime: z11.string(),
193
+ import { z as z10 } from "zod";
194
+ var zScheduleData = z10.object({
195
+ startTime: z10.string(),
198
196
  // String in 24 hour "HH:mm" format
199
- dayOfWeek: z11.number().int().min(0).max(6)
197
+ dayOfWeek: z10.number().int().min(0).max(6)
200
198
  // integeters in 0 - 6
201
199
  });
202
200
 
@@ -225,126 +223,131 @@ var NYIGSchool = /* @__PURE__ */ ((NYIGSchool2) => {
225
223
  })(NYIGSchool || {});
226
224
 
227
225
  // src/interface/course/course.ts
228
- import { z as z12 } from "zod";
229
- var zCourse = z12.object({
230
- name: z12.string(),
231
- category: z12.nativeEnum(CourseCategory),
226
+ import { z as z11 } from "zod";
227
+ var zCourse = z11.object({
228
+ name: z11.string(),
229
+ category: z11.nativeEnum(CourseCategory),
232
230
  /**
233
231
  * @unit SECONDS - Duration of the course in seconds
234
232
  */
235
- duration: z12.number(),
233
+ duration: z11.number(),
236
234
  /**
237
235
  * @unit CENTS - Price of the course in cents
238
236
  */
239
- price: z12.number(),
240
- description: z12.string().optional(),
237
+ price: z11.number(),
238
+ description: z11.string().optional(),
241
239
  /**
242
240
  * NYIG School locations
243
241
  */
244
- nyigSchool: z12.nativeEnum(NYIGSchool),
242
+ nyigSchool: z11.nativeEnum(NYIGSchool),
245
243
  /**
246
244
  * Recommended level before taking this course
247
245
  */
248
- recLevel: z12.string(),
246
+ recLevel: z11.string(),
249
247
  /**
250
248
  * Camp tuition for half-day option
251
249
  */
252
- halfCampTuition: z12.number(),
250
+ halfCampTuition: z11.number(),
253
251
  /**
254
252
  * Camp tuition for full-day option
255
253
  */
256
- fullCampTuition: z12.number()
254
+ fullCampTuition: z11.number()
257
255
  });
258
256
  var zMCourse = extendZodObjectForMongoose(zCourse);
259
257
 
260
258
  // src/interface/tracking/groupTracker.ts
261
- var zGroupTracker = z13.object({
259
+ import { Types as Types7 } from "mongoose";
260
+ var zGroupTracker = z12.object({
261
+ course: z12.instanceof(Types7.ObjectId),
262
+ teacher: z12.instanceof(Types7.ObjectId),
263
+ semester: z12.instanceof(Types7.ObjectId),
262
264
  scheduleData: zScheduleData,
263
265
  /**
264
266
  * occurrences are tracked by week for Groups
265
267
  */
266
- occurrences: z13.array(z13.coerce.date()),
268
+ occurrences: z12.array(z12.coerce.date()),
267
269
  /**
268
270
  * attendances are tracked by week for Groups
269
271
  */
270
- attendances: z13.array(z13.string()),
272
+ attendances: z12.array(z12.instanceof(Types7.ObjectId)),
271
273
  /**
272
274
  * public-facing ID of the course instance, e.g., 101
273
275
  */
274
- courseId: z13.string().optional(),
276
+ courseId: z12.string().optional(),
275
277
  /**
276
278
  * Age group of the class instance, e.g. "adult", "youth"
277
279
  */
278
- ageGroup: z13.nativeEnum(AgeGroup).optional(),
280
+ ageGroup: z12.nativeEnum(AgeGroup).optional(),
279
281
  /**
280
282
  * If true, the course is hidden from public view
281
283
  */
282
- isNonPublic: z13.boolean().optional(),
283
- notes: z13.string().optional()
284
- }).merge(zTracker);
284
+ isNonPublic: z12.boolean().optional(),
285
+ notes: z12.string().optional()
286
+ });
285
287
  var zMGroupTracker = extendZodObjectForMongoose(zGroupTracker);
286
288
 
287
289
  // src/interface/booking/campBooking.ts
288
- var zCampBooking = z14.object({
289
- userId: z14.string().optional(),
290
- ctId: z14.string().optional(),
291
- isOnline: z14.boolean(),
292
- classDates: z14.string(),
293
- campOption: z14.nativeEnum(CampOption),
294
- shipping: z14.boolean().optional()
290
+ var zCampBooking = z13.object({
291
+ userId: z13.string().optional(),
292
+ ctId: z13.string().optional(),
293
+ isOnline: z13.boolean(),
294
+ classDates: z13.string(),
295
+ campOption: z13.nativeEnum(CampOption),
296
+ shipping: z13.boolean().optional()
295
297
  }).merge(zBUserInfo).merge(zBPaymentInfo);
296
298
  var zMCampBooking = extendZodObjectForMongoose(zCampBooking);
297
299
 
298
300
  // src/interface/booking/groupBooking.ts
299
- import { z as z15 } from "zod";
300
- var zGroupBooking = z15.object({
301
- userId: z15.string().optional(),
302
- gtId: z15.string().optional(),
303
- isTrial: z15.boolean().optional(),
304
- isOnline: z15.boolean(),
305
- classDate: z15.string().optional(),
306
- shipping: z15.boolean().optional()
301
+ import { z as z14 } from "zod";
302
+ var zGroupBooking = z14.object({
303
+ userId: z14.string().optional(),
304
+ gtId: z14.string().optional(),
305
+ isTrial: z14.boolean().optional(),
306
+ isOnline: z14.boolean(),
307
+ classDate: z14.string().optional(),
308
+ shipping: z14.boolean().optional()
307
309
  }).merge(zBUserInfo).merge(zBPaymentInfo);
308
310
  var zMGroupBooking = extendZodObjectForMongoose(zGroupBooking);
309
311
 
310
312
  // src/interface/booking/privateBooking.ts
311
- import { z as z16 } from "zod";
312
- var zPrivateBooking = z16.object({
313
- userId: z16.string().optional(),
314
- courseId: z16.string(),
315
- teacherId: z16.string(),
316
- classDate: z16.string().optional()
313
+ import { z as z15 } from "zod";
314
+ var zPrivateBooking = z15.object({
315
+ userId: z15.string().optional(),
316
+ courseId: z15.string(),
317
+ teacherId: z15.string(),
318
+ classDate: z15.string().optional()
317
319
  }).merge(zBUserInfo).merge(zBPaymentInfo);
318
320
  var zMPrivateBooking = extendZodObjectForMongoose(zPrivateBooking);
319
321
 
320
322
  // src/interface/public/aurora.ts
321
- import { z as z17 } from "zod";
322
- var zTeacherDisplay = z17.object({
323
- name: z17.string(),
324
- email: z17.string().email(),
325
- title: z17.string(),
326
- imageUrl: z17.string(),
327
- bio: z17.string()
323
+ import { z as z16 } from "zod";
324
+ var zTeacherDisplay = z16.object({
325
+ name: z16.string(),
326
+ email: z16.string().email(),
327
+ title: z16.string(),
328
+ imageUrl: z16.string(),
329
+ bio: z16.string()
328
330
  });
329
- var zCourseTable = z17.object({
330
- id: z17.string(),
331
- name: z17.string(),
332
- duration: z17.number(),
333
- dateAndTime: z17.string(),
334
- recommendedLevel: z17.string(),
335
- tuition: z17.string()
331
+ var zCourseTable = z16.object({
332
+ id: z16.string(),
333
+ name: z16.string(),
334
+ duration: z16.number(),
335
+ dateAndTime: z16.string(),
336
+ recommendedLevel: z16.string(),
337
+ tuition: z16.string()
336
338
  });
337
339
 
338
340
  // src/interface/public/imageDef.ts
339
- import { z as z18 } from "zod";
340
- var zImageDef = z18.object({
341
- url: z18.string(),
342
- height: z18.number(),
343
- width: z18.number()
341
+ import { z as z17 } from "zod";
342
+ var zImageDef = z17.object({
343
+ url: z17.string(),
344
+ height: z17.number(),
345
+ width: z17.number()
344
346
  });
345
347
 
346
348
  // src/interface/reporting/reportTicket.ts
347
- import { z as z19 } from "zod";
349
+ import { Types as Types8 } from "mongoose";
350
+ import { z as z18 } from "zod";
348
351
 
349
352
  // src/interface/reporting/ticketStatus.ts
350
353
  var TicketStatus = /* @__PURE__ */ ((TicketStatus2) => {
@@ -356,12 +359,12 @@ var TicketStatus = /* @__PURE__ */ ((TicketStatus2) => {
356
359
  })(TicketStatus || {});
357
360
 
358
361
  // src/interface/reporting/reportTicket.ts
359
- var zReportTicket = z19.object({
360
- requester: z19.string(),
361
- resolver: z19.string(),
362
- status: z19.nativeEnum(TicketStatus),
363
- title: z19.string(),
364
- description: z19.string()
362
+ var zReportTicket = z18.object({
363
+ requester: z18.instanceof(Types8.ObjectId),
364
+ resolver: z18.instanceof(Types8.ObjectId),
365
+ status: z18.nativeEnum(TicketStatus),
366
+ title: z18.string(),
367
+ description: z18.string()
365
368
  });
366
369
  var zMReportTicket = extendZodObjectForMongoose(zReportTicket);
367
370
 
@@ -374,74 +377,74 @@ var Season = /* @__PURE__ */ ((Season2) => {
374
377
  })(Season || {});
375
378
 
376
379
  // src/interface/semester/semester.ts
377
- import { z as z20 } from "zod";
378
- var zSemester = z20.object({
379
- season: z20.nativeEnum(Season),
380
- year: z20.number().min(2022).max(2999),
381
- startDate: z20.coerce.date(),
382
- endDate: z20.coerce.date(),
380
+ import { z as z19 } from "zod";
381
+ var zSemester = z19.object({
382
+ season: z19.nativeEnum(Season),
383
+ year: z19.number().min(2022).max(2999),
384
+ startDate: z19.coerce.date(),
385
+ endDate: z19.coerce.date(),
383
386
  /**
384
387
  * Format: start, end, start, end, ...
385
388
  */
386
- blackoutDates: z20.array(z20.coerce.date()),
389
+ blackoutDates: z19.array(z19.coerce.date()),
387
390
  /**
388
391
  * List of names of some break: date range
389
392
  */
390
- importantDates: z20.array(z20.string())
393
+ importantDates: z19.array(z19.string())
391
394
  });
392
395
  var zMSemester = extendZodObjectForMongoose(zSemester);
393
396
 
394
397
  // src/interface/tournament/tConfig.ts
395
- import { Types as Types5 } from "mongoose";
396
- import { z as z22 } from "zod";
398
+ import { Types as Types9 } from "mongoose";
399
+ import { z as z21 } from "zod";
397
400
 
398
401
  // src/interface/tournament/table.ts
399
- import { z as z21 } from "zod";
400
- var zTable = z21.array(z21.object({}));
401
- var zDetailsTable = z21.object({
402
- fields: z21.array(z21.string()).length(2),
402
+ import { z as z20 } from "zod";
403
+ var zTable = z20.array(z20.object({}));
404
+ var zDetailsTable = z20.object({
405
+ fields: z20.array(z20.string()).length(2),
403
406
  data: zTable
404
407
  });
405
- var zScheduleTable = z21.object({
406
- fields: z21.array(z21.string()).length(2),
407
- data: z21.map(z21.string(), zTable)
408
+ var zScheduleTable = z20.object({
409
+ fields: z20.array(z20.string()).length(2),
410
+ data: z20.map(z20.string(), zTable)
408
411
  });
409
412
 
410
413
  // src/interface/tournament/tConfig.ts
411
- var zTConfig = z22.object({
414
+ var zTConfig = z21.object({
412
415
  /**
413
416
  * Location of the event
414
417
  */
415
- location: z22.string().optional(),
418
+ location: z21.string().optional(),
416
419
  /**
417
420
  * URL of the tournament on the official website
418
421
  * Must be a valid URL link
419
422
  */
420
- url: z22.string(),
423
+ url: z21.string(),
421
424
  /**
422
425
  * Full name of the tournament
423
426
  */
424
- title: z22.string(),
427
+ title: z21.string(),
425
428
  /**
426
429
  * Abbreviated title of the tournament
427
430
  */
428
- shortTitle: z22.string(),
431
+ shortTitle: z21.string(),
429
432
  /**
430
433
  * Tournament start date and time
431
434
  */
432
- tStart: z22.coerce.date(),
435
+ tStart: z21.coerce.date(),
433
436
  /**
434
437
  * Tournament end date and time
435
438
  */
436
- tEnd: z22.coerce.date(),
439
+ tEnd: z21.coerce.date(),
437
440
  /**
438
441
  * Short description for tournament card
439
442
  */
440
- shortDescription: z22.string(),
443
+ shortDescription: z21.string(),
441
444
  /**
442
445
  * Full description
443
446
  */
444
- description: z22.string(),
447
+ description: z21.string(),
445
448
  /**
446
449
  * Defines the tournament details table with 2 columns
447
450
  * typically Time and Event
@@ -455,15 +458,15 @@ var zTConfig = z22.object({
455
458
  /**
456
459
  * List of ticket object IDs for this tournament
457
460
  */
458
- tickets: z22.array(z22.instanceof(Types5.ObjectId)),
461
+ tickets: z21.array(z21.instanceof(Types9.ObjectId)),
459
462
  /**
460
463
  * If false, the tournament registration is closed
461
464
  */
462
- canRegister: z22.boolean(),
465
+ canRegister: z21.boolean(),
463
466
  /**
464
467
  * If true, free form donation amounts are disabled.
465
468
  */
466
- donationsDisabled: z22.boolean().optional(),
469
+ donationsDisabled: z21.boolean().optional(),
467
470
  /**
468
471
  * Defines URL, height, width of the image
469
472
  */
@@ -472,60 +475,60 @@ var zTConfig = z22.object({
472
475
  var zMTConfig = extendZodObjectForMongoose(zTConfig);
473
476
 
474
477
  // src/interface/tournament/tReg.ts
475
- import { Types as Types7 } from "mongoose";
476
- import { z as z24 } from "zod";
478
+ import { Types as Types11 } from "mongoose";
479
+ import { z as z23 } from "zod";
477
480
 
478
481
  // src/interface/tournament/tTicketReg.ts
479
- import { z as z23 } from "zod";
480
- import { Types as Types6 } from "mongoose";
481
- var zTTicketReg = z23.object({
482
- ticket: z23.instanceof(Types6.ObjectId),
482
+ import { z as z22 } from "zod";
483
+ import { Types as Types10 } from "mongoose";
484
+ var zTTicketReg = z22.object({
485
+ ticket: z22.instanceof(Types10.ObjectId),
483
486
  /**
484
487
  * integer minimum 1, otherwise no ticket is being bought
485
488
  */
486
- amount: z23.number().int().min(1)
489
+ amount: z22.number().int().min(1)
487
490
  });
488
491
 
489
492
  // src/interface/tournament/tReg.ts
490
- var zTReg = z24.object({
491
- agaId: z24.string(),
492
- tournamentId: z24.instanceof(Types7.ObjectId),
493
- tickets: z24.array(zTTicketReg),
493
+ var zTReg = z23.object({
494
+ agaId: z23.string(),
495
+ tournamentId: z23.instanceof(Types11.ObjectId),
496
+ tickets: z23.array(zTTicketReg),
494
497
  /**
495
498
  * @units CENTS - Donation in cents
496
499
  */
497
- donation: z24.number().optional(),
500
+ donation: z23.number().optional(),
498
501
  /**
499
502
  * How the registration was created, namely through public endpoint or admin
500
503
  */
501
- createMethod: z24.string().optional(),
504
+ createMethod: z23.string().optional(),
502
505
  /**
503
506
  * Mongoose ID of the admin that edited the registration
504
507
  */
505
- edited: z24.instanceof(Types7.ObjectId).optional()
508
+ edited: z23.instanceof(Types11.ObjectId).optional()
506
509
  }).merge(zBUserInfo).merge(zBPaymentInfo);
507
510
  var zMTReg = extendZodObjectForMongoose(zTReg);
508
511
 
509
512
  // src/interface/tournament/tTicket.ts
510
- import { z as z25 } from "zod";
511
- var zTTicket = z25.object({
512
- name: z25.string(),
513
+ import { z as z24 } from "zod";
514
+ var zTTicket = z24.object({
515
+ name: z24.string(),
513
516
  /**
514
517
  * Price in cents
515
518
  */
516
- price: z25.number(),
519
+ price: z24.number(),
517
520
  /**
518
521
  * @optional description of the ticket
519
522
  */
520
- description: z25.string().optional(),
523
+ description: z24.string().optional(),
521
524
  /**
522
525
  * @optional The ticket cannot be purchased if true
523
526
  */
524
- isNotBuyable: z25.boolean().optional(),
527
+ isNotBuyable: z24.boolean().optional(),
525
528
  /**
526
529
  * @optional If date is provided and in the past, ticket cannot be purchased
527
530
  */
528
- lastBuyableDate: z25.coerce.date().optional()
531
+ lastBuyableDate: z24.coerce.date().optional()
529
532
  });
530
533
  var zMTTicket = extendZodObjectForMongoose(zTTicket);
531
534
 
@@ -576,50 +579,50 @@ var GoRank = /* @__PURE__ */ ((GoRank2) => {
576
579
  })(GoRank || {});
577
580
 
578
581
  // src/interface/user/user.ts
579
- import { z as z27 } from "zod";
582
+ import { z as z26 } from "zod";
580
583
 
581
584
  // src/interface/user/userRoles.ts
582
- import { z as z26 } from "zod";
583
- var zUserRoles = z26.object({
584
- user: z26.number().int(),
585
- admin: z26.number().int(),
586
- superadmin: z26.number().int()
585
+ import { z as z25 } from "zod";
586
+ var zUserRoles = z25.object({
587
+ user: z25.number().int(),
588
+ admin: z25.number().int(),
589
+ superadmin: z25.number().int()
587
590
  });
588
591
 
589
592
  // src/interface/user/user.ts
590
- import { Types as Types8 } from "mongoose";
591
- var zUser = z27.object({
592
- name: z27.string().min(2).max(100),
593
- username: z27.string().optional(),
594
- password: z27.string().optional(),
593
+ import { Types as Types12 } from "mongoose";
594
+ var zUser = z26.object({
595
+ name: z26.string().min(2).max(100),
596
+ username: z26.string().optional(),
597
+ password: z26.string().optional(),
595
598
  roles: zUserRoles.optional(),
596
- email: z27.string().email().max(100).optional(),
597
- address: z27.string().optional(),
598
- country: z27.string().optional(),
599
- phoneNumber: z27.string().optional(),
600
- birthDate: z27.string().optional()
599
+ email: z26.string().email().max(100).optional(),
600
+ address: z26.string().optional(),
601
+ country: z26.string().optional(),
602
+ phoneNumber: z26.string().optional(),
603
+ birthDate: z26.string().optional()
601
604
  });
602
605
  var zMUser = extendZodObjectForMongoose(zUser);
603
606
  var zStudent = zUser.extend({
604
- rank: z27.nativeEnum(GoRank),
605
- guardian: z27.instanceof(Types8.ObjectId).optional()
607
+ rank: z26.nativeEnum(GoRank),
608
+ guardian: z26.instanceof(Types12.ObjectId).optional()
606
609
  });
607
610
  var zMStudent = extendZodObjectForMongoose(zStudent);
608
611
  var zTeacher = zUser.extend({
609
- rank: z27.nativeEnum(GoRank),
612
+ rank: z26.nativeEnum(GoRank),
610
613
  /**
611
614
  * Inactive teachers are not shown on public endpoints
612
615
  */
613
- isInactive: z27.boolean().optional(),
616
+ isInactive: z26.boolean().optional(),
614
617
  /**
615
618
  * Teacher's position, e.g., instructor, president
616
619
  */
617
- title: z27.string().optional(),
620
+ title: z26.string().optional(),
618
621
  /**
619
622
  * Teacher's bio text describing experience
620
623
  * new lines will be rendered as paragraphs
621
624
  */
622
- bio: z27.string().optional(),
625
+ bio: z26.string().optional(),
623
626
  /** Format is illustrated below, where teacher is available
624
627
  * Mon 9-12am 3-6pm & Tue 10-12am 6-10pm
625
628
  * [
@@ -632,7 +635,7 @@ var zTeacher = zUser.extend({
632
635
  * [],
633
636
  * ]
634
637
  */
635
- available: z27.array(z27.array(z27.array(z27.number()))).optional()
638
+ available: z26.array(z26.array(z26.array(z26.number()))).optional()
636
639
  });
637
640
  var zMTeacher = extendZodObjectForMongoose(zTeacher);
638
641
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nyig/models",
3
- "version": "0.2.13",
3
+ "version": "0.2.14",
4
4
  "license": "MIT",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",