@nyig/models 0.2.19 → 0.2.20
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 +6 -6
- package/index.d.ts +6 -6
- package/index.js +28 -27
- package/index.mjs +28 -27
- package/package.json +1 -1
package/index.d.mts
CHANGED
|
@@ -1210,7 +1210,7 @@ declare const zTeacherPaymentRow: z.ZodObject<{
|
|
|
1210
1210
|
wage: number;
|
|
1211
1211
|
}>;
|
|
1212
1212
|
declare const zTeacherPayment: z.ZodObject<{
|
|
1213
|
-
teacher: z.ZodString
|
|
1213
|
+
teacher: z.ZodUnion<[z.ZodType<Types.ObjectId, z.ZodTypeDef, Types.ObjectId>, z.ZodString]>;
|
|
1214
1214
|
rows: z.ZodArray<z.ZodObject<{
|
|
1215
1215
|
course: z.ZodString;
|
|
1216
1216
|
length: z.ZodNumber;
|
|
@@ -1229,7 +1229,7 @@ declare const zTeacherPayment: z.ZodObject<{
|
|
|
1229
1229
|
}>, "many">;
|
|
1230
1230
|
paid: z.ZodOptional<z.ZodBoolean>;
|
|
1231
1231
|
}, "strip", z.ZodTypeAny, {
|
|
1232
|
-
teacher: string;
|
|
1232
|
+
teacher: (string | Types.ObjectId) & (string | Types.ObjectId | undefined);
|
|
1233
1233
|
rows: {
|
|
1234
1234
|
length: number;
|
|
1235
1235
|
course: string;
|
|
@@ -1238,7 +1238,7 @@ declare const zTeacherPayment: z.ZodObject<{
|
|
|
1238
1238
|
}[];
|
|
1239
1239
|
paid?: boolean | undefined;
|
|
1240
1240
|
}, {
|
|
1241
|
-
teacher: string;
|
|
1241
|
+
teacher: (string | Types.ObjectId) & (string | Types.ObjectId | undefined);
|
|
1242
1242
|
rows: {
|
|
1243
1243
|
length: number;
|
|
1244
1244
|
course: string;
|
|
@@ -1249,7 +1249,7 @@ declare const zTeacherPayment: z.ZodObject<{
|
|
|
1249
1249
|
}>;
|
|
1250
1250
|
declare const zMTeacherPayment: z.ZodObject<{
|
|
1251
1251
|
paid: z.ZodOptional<z.ZodBoolean>;
|
|
1252
|
-
teacher: z.ZodString
|
|
1252
|
+
teacher: z.ZodUnion<[z.ZodType<Types.ObjectId, z.ZodTypeDef, Types.ObjectId>, z.ZodString]>;
|
|
1253
1253
|
rows: z.ZodArray<z.ZodObject<{
|
|
1254
1254
|
course: z.ZodString;
|
|
1255
1255
|
length: z.ZodNumber;
|
|
@@ -1271,7 +1271,7 @@ declare const zMTeacherPayment: z.ZodObject<{
|
|
|
1271
1271
|
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
1272
1272
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
1273
1273
|
_id: Types.ObjectId;
|
|
1274
|
-
teacher: string;
|
|
1274
|
+
teacher: (string | Types.ObjectId) & (string | Types.ObjectId | undefined);
|
|
1275
1275
|
rows: {
|
|
1276
1276
|
length: number;
|
|
1277
1277
|
course: string;
|
|
@@ -1283,7 +1283,7 @@ declare const zMTeacherPayment: z.ZodObject<{
|
|
|
1283
1283
|
updatedAt?: Date | undefined;
|
|
1284
1284
|
}, {
|
|
1285
1285
|
_id: Types.ObjectId;
|
|
1286
|
-
teacher: string;
|
|
1286
|
+
teacher: (string | Types.ObjectId) & (string | Types.ObjectId | undefined);
|
|
1287
1287
|
rows: {
|
|
1288
1288
|
length: number;
|
|
1289
1289
|
course: string;
|
package/index.d.ts
CHANGED
|
@@ -1210,7 +1210,7 @@ declare const zTeacherPaymentRow: z.ZodObject<{
|
|
|
1210
1210
|
wage: number;
|
|
1211
1211
|
}>;
|
|
1212
1212
|
declare const zTeacherPayment: z.ZodObject<{
|
|
1213
|
-
teacher: z.ZodString
|
|
1213
|
+
teacher: z.ZodUnion<[z.ZodType<Types.ObjectId, z.ZodTypeDef, Types.ObjectId>, z.ZodString]>;
|
|
1214
1214
|
rows: z.ZodArray<z.ZodObject<{
|
|
1215
1215
|
course: z.ZodString;
|
|
1216
1216
|
length: z.ZodNumber;
|
|
@@ -1229,7 +1229,7 @@ declare const zTeacherPayment: z.ZodObject<{
|
|
|
1229
1229
|
}>, "many">;
|
|
1230
1230
|
paid: z.ZodOptional<z.ZodBoolean>;
|
|
1231
1231
|
}, "strip", z.ZodTypeAny, {
|
|
1232
|
-
teacher: string;
|
|
1232
|
+
teacher: (string | Types.ObjectId) & (string | Types.ObjectId | undefined);
|
|
1233
1233
|
rows: {
|
|
1234
1234
|
length: number;
|
|
1235
1235
|
course: string;
|
|
@@ -1238,7 +1238,7 @@ declare const zTeacherPayment: z.ZodObject<{
|
|
|
1238
1238
|
}[];
|
|
1239
1239
|
paid?: boolean | undefined;
|
|
1240
1240
|
}, {
|
|
1241
|
-
teacher: string;
|
|
1241
|
+
teacher: (string | Types.ObjectId) & (string | Types.ObjectId | undefined);
|
|
1242
1242
|
rows: {
|
|
1243
1243
|
length: number;
|
|
1244
1244
|
course: string;
|
|
@@ -1249,7 +1249,7 @@ declare const zTeacherPayment: z.ZodObject<{
|
|
|
1249
1249
|
}>;
|
|
1250
1250
|
declare const zMTeacherPayment: z.ZodObject<{
|
|
1251
1251
|
paid: z.ZodOptional<z.ZodBoolean>;
|
|
1252
|
-
teacher: z.ZodString
|
|
1252
|
+
teacher: z.ZodUnion<[z.ZodType<Types.ObjectId, z.ZodTypeDef, Types.ObjectId>, z.ZodString]>;
|
|
1253
1253
|
rows: z.ZodArray<z.ZodObject<{
|
|
1254
1254
|
course: z.ZodString;
|
|
1255
1255
|
length: z.ZodNumber;
|
|
@@ -1271,7 +1271,7 @@ declare const zMTeacherPayment: z.ZodObject<{
|
|
|
1271
1271
|
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
1272
1272
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
1273
1273
|
_id: Types.ObjectId;
|
|
1274
|
-
teacher: string;
|
|
1274
|
+
teacher: (string | Types.ObjectId) & (string | Types.ObjectId | undefined);
|
|
1275
1275
|
rows: {
|
|
1276
1276
|
length: number;
|
|
1277
1277
|
course: string;
|
|
@@ -1283,7 +1283,7 @@ declare const zMTeacherPayment: z.ZodObject<{
|
|
|
1283
1283
|
updatedAt?: Date | undefined;
|
|
1284
1284
|
}, {
|
|
1285
1285
|
_id: Types.ObjectId;
|
|
1286
|
-
teacher: string;
|
|
1286
|
+
teacher: (string | Types.ObjectId) & (string | Types.ObjectId | undefined);
|
|
1287
1287
|
rows: {
|
|
1288
1288
|
length: number;
|
|
1289
1289
|
course: string;
|
package/index.js
CHANGED
|
@@ -198,7 +198,7 @@ var zCampTracker = import_zod6.z.object({
|
|
|
198
198
|
var zMCampTracker = extendZodObjectForMongoose(zCampTracker);
|
|
199
199
|
|
|
200
200
|
// src/interface/tracking/classTracker.ts
|
|
201
|
-
var
|
|
201
|
+
var import_mongoose11 = require("mongoose");
|
|
202
202
|
var import_zod9 = require("zod");
|
|
203
203
|
|
|
204
204
|
// src/interface/payment/invoice.ts
|
|
@@ -242,6 +242,7 @@ var zInvoice = import_zod7.z.object({
|
|
|
242
242
|
var zMInvoice = extendZodObjectForMongoose(zInvoice);
|
|
243
243
|
|
|
244
244
|
// src/interface/payment/teacherPayment.ts
|
|
245
|
+
var import_mongoose9 = require("mongoose");
|
|
245
246
|
var import_zod8 = require("zod");
|
|
246
247
|
var zTeacherPaymentRow = import_zod8.z.object({
|
|
247
248
|
course: import_zod8.z.string(),
|
|
@@ -250,7 +251,7 @@ var zTeacherPaymentRow = import_zod8.z.object({
|
|
|
250
251
|
wage: import_zod8.z.number()
|
|
251
252
|
});
|
|
252
253
|
var zTeacherPayment = import_zod8.z.object({
|
|
253
|
-
teacher: import_zod8.z.string(),
|
|
254
|
+
teacher: import_zod8.z.instanceof(import_mongoose9.Types.ObjectId).or(import_zod8.z.string()),
|
|
254
255
|
rows: import_zod8.z.array(zTeacherPaymentRow),
|
|
255
256
|
paid: import_zod8.z.boolean().optional()
|
|
256
257
|
});
|
|
@@ -258,9 +259,9 @@ var zMTeacherPayment = extendZodObjectForMongoose(zTeacherPayment);
|
|
|
258
259
|
|
|
259
260
|
// src/interface/tracking/classTracker.ts
|
|
260
261
|
var zClassTracker = import_zod9.z.object({
|
|
261
|
-
course: import_zod9.z.instanceof(
|
|
262
|
-
teacher: import_zod9.z.instanceof(
|
|
263
|
-
student: import_zod9.z.instanceof(
|
|
262
|
+
course: import_zod9.z.instanceof(import_mongoose11.Types.ObjectId),
|
|
263
|
+
teacher: import_zod9.z.instanceof(import_mongoose11.Types.ObjectId),
|
|
264
|
+
student: import_zod9.z.instanceof(import_mongoose11.Types.ObjectId),
|
|
264
265
|
classTimes: import_zod9.z.array(import_zod9.z.coerce.date()),
|
|
265
266
|
completedList: import_zod9.z.array(import_zod9.z.boolean()),
|
|
266
267
|
/**
|
|
@@ -344,11 +345,11 @@ var zCourse = import_zod11.z.object({
|
|
|
344
345
|
var zMCourse = extendZodObjectForMongoose(zCourse);
|
|
345
346
|
|
|
346
347
|
// src/interface/tracking/groupTracker.ts
|
|
347
|
-
var
|
|
348
|
+
var import_mongoose15 = require("mongoose");
|
|
348
349
|
var zGroupTracker = import_zod12.z.object({
|
|
349
|
-
course: import_zod12.z.instanceof(
|
|
350
|
-
teacher: import_zod12.z.instanceof(
|
|
351
|
-
semester: import_zod12.z.instanceof(
|
|
350
|
+
course: import_zod12.z.instanceof(import_mongoose15.Types.ObjectId),
|
|
351
|
+
teacher: import_zod12.z.instanceof(import_mongoose15.Types.ObjectId),
|
|
352
|
+
semester: import_zod12.z.instanceof(import_mongoose15.Types.ObjectId),
|
|
352
353
|
scheduleData: zScheduleData,
|
|
353
354
|
/**
|
|
354
355
|
* occurrences are tracked by week for Groups
|
|
@@ -357,7 +358,7 @@ var zGroupTracker = import_zod12.z.object({
|
|
|
357
358
|
/**
|
|
358
359
|
* attendances are tracked by week for Groups
|
|
359
360
|
*/
|
|
360
|
-
attendances: import_zod12.z.array(import_zod12.z.instanceof(
|
|
361
|
+
attendances: import_zod12.z.array(import_zod12.z.instanceof(import_mongoose15.Types.ObjectId)),
|
|
361
362
|
/**
|
|
362
363
|
* public-facing ID of the course instance, e.g., 101
|
|
363
364
|
*/
|
|
@@ -385,10 +386,10 @@ var zCampBooking = import_zod13.z.object({
|
|
|
385
386
|
var zMCampBooking = extendZodObjectForMongoose(zCampBooking);
|
|
386
387
|
|
|
387
388
|
// src/interface/booking/groupBooking.ts
|
|
388
|
-
var
|
|
389
|
+
var import_mongoose17 = require("mongoose");
|
|
389
390
|
var import_zod14 = require("zod");
|
|
390
391
|
var zGroupBooking = import_zod14.z.object({
|
|
391
|
-
gtId: import_zod14.z.instanceof(
|
|
392
|
+
gtId: import_zod14.z.instanceof(import_mongoose17.Types.ObjectId).optional(),
|
|
392
393
|
isTrial: import_zod14.z.boolean().optional(),
|
|
393
394
|
isOnline: import_zod14.z.boolean(),
|
|
394
395
|
classDate: import_zod14.z.string().optional(),
|
|
@@ -397,11 +398,11 @@ var zGroupBooking = import_zod14.z.object({
|
|
|
397
398
|
var zMGroupBooking = extendZodObjectForMongoose(zGroupBooking);
|
|
398
399
|
|
|
399
400
|
// src/interface/booking/privateBooking.ts
|
|
400
|
-
var
|
|
401
|
+
var import_mongoose19 = require("mongoose");
|
|
401
402
|
var import_zod15 = require("zod");
|
|
402
403
|
var zPrivateBooking = import_zod15.z.object({
|
|
403
|
-
courseId: import_zod15.z.instanceof(
|
|
404
|
-
teacherId: import_zod15.z.instanceof(
|
|
404
|
+
courseId: import_zod15.z.instanceof(import_mongoose19.Types.ObjectId),
|
|
405
|
+
teacherId: import_zod15.z.instanceof(import_mongoose19.Types.ObjectId),
|
|
405
406
|
classDate: import_zod15.z.string().optional()
|
|
406
407
|
}).merge(zBUserInfo).merge(zBPaymentInfo);
|
|
407
408
|
var zMPrivateBooking = extendZodObjectForMongoose(zPrivateBooking);
|
|
@@ -433,7 +434,7 @@ var zImageDef = import_zod17.z.object({
|
|
|
433
434
|
});
|
|
434
435
|
|
|
435
436
|
// src/interface/reporting/reportTicket.ts
|
|
436
|
-
var
|
|
437
|
+
var import_mongoose21 = require("mongoose");
|
|
437
438
|
var import_zod18 = require("zod");
|
|
438
439
|
|
|
439
440
|
// src/interface/reporting/ticketStatus.ts
|
|
@@ -447,8 +448,8 @@ var TicketStatus = /* @__PURE__ */ ((TicketStatus2) => {
|
|
|
447
448
|
|
|
448
449
|
// src/interface/reporting/reportTicket.ts
|
|
449
450
|
var zReportTicket = import_zod18.z.object({
|
|
450
|
-
requester: import_zod18.z.instanceof(
|
|
451
|
-
resolver: import_zod18.z.instanceof(
|
|
451
|
+
requester: import_zod18.z.instanceof(import_mongoose21.Types.ObjectId),
|
|
452
|
+
resolver: import_zod18.z.instanceof(import_mongoose21.Types.ObjectId),
|
|
452
453
|
status: import_zod18.z.nativeEnum(TicketStatus),
|
|
453
454
|
title: import_zod18.z.string(),
|
|
454
455
|
description: import_zod18.z.string()
|
|
@@ -482,7 +483,7 @@ var zSemester = import_zod19.z.object({
|
|
|
482
483
|
var zMSemester = extendZodObjectForMongoose(zSemester);
|
|
483
484
|
|
|
484
485
|
// src/interface/tournament/tConfig.ts
|
|
485
|
-
var
|
|
486
|
+
var import_mongoose24 = require("mongoose");
|
|
486
487
|
var import_zod21 = require("zod");
|
|
487
488
|
|
|
488
489
|
// src/interface/tournament/table.ts
|
|
@@ -545,7 +546,7 @@ var zTConfig = import_zod21.z.object({
|
|
|
545
546
|
/**
|
|
546
547
|
* List of ticket object IDs for this tournament
|
|
547
548
|
*/
|
|
548
|
-
tickets: import_zod21.z.array(import_zod21.z.instanceof(
|
|
549
|
+
tickets: import_zod21.z.array(import_zod21.z.instanceof(import_mongoose24.Types.ObjectId)),
|
|
549
550
|
/**
|
|
550
551
|
* If false, the tournament registration is closed
|
|
551
552
|
*/
|
|
@@ -562,14 +563,14 @@ var zTConfig = import_zod21.z.object({
|
|
|
562
563
|
var zMTConfig = extendZodObjectForMongoose(zTConfig);
|
|
563
564
|
|
|
564
565
|
// src/interface/tournament/tReg.ts
|
|
565
|
-
var
|
|
566
|
+
var import_mongoose27 = require("mongoose");
|
|
566
567
|
var import_zod23 = require("zod");
|
|
567
568
|
|
|
568
569
|
// src/interface/tournament/tTicketReg.ts
|
|
569
570
|
var import_zod22 = require("zod");
|
|
570
|
-
var
|
|
571
|
+
var import_mongoose26 = require("mongoose");
|
|
571
572
|
var zTTicketReg = import_zod22.z.object({
|
|
572
|
-
ticket: import_zod22.z.instanceof(
|
|
573
|
+
ticket: import_zod22.z.instanceof(import_mongoose26.Types.ObjectId),
|
|
573
574
|
/**
|
|
574
575
|
* integer minimum 1, otherwise no ticket is being bought
|
|
575
576
|
*/
|
|
@@ -579,7 +580,7 @@ var zTTicketReg = import_zod22.z.object({
|
|
|
579
580
|
// src/interface/tournament/tReg.ts
|
|
580
581
|
var zTReg = import_zod23.z.object({
|
|
581
582
|
agaId: import_zod23.z.string(),
|
|
582
|
-
tournamentId: import_zod23.z.instanceof(
|
|
583
|
+
tournamentId: import_zod23.z.instanceof(import_mongoose27.Types.ObjectId),
|
|
583
584
|
tickets: import_zod23.z.array(zTTicketReg),
|
|
584
585
|
/**
|
|
585
586
|
* @units CENTS - Donation in cents
|
|
@@ -592,7 +593,7 @@ var zTReg = import_zod23.z.object({
|
|
|
592
593
|
/**
|
|
593
594
|
* Mongoose ID of the admin that edited the registration
|
|
594
595
|
*/
|
|
595
|
-
edited: import_zod23.z.instanceof(
|
|
596
|
+
edited: import_zod23.z.instanceof(import_mongoose27.Types.ObjectId).optional()
|
|
596
597
|
}).merge(zBUserInfo).merge(zBPaymentInfo);
|
|
597
598
|
var zMTReg = extendZodObjectForMongoose(zTReg);
|
|
598
599
|
|
|
@@ -667,7 +668,7 @@ var GoRank = /* @__PURE__ */ ((GoRank2) => {
|
|
|
667
668
|
|
|
668
669
|
// src/interface/user/user.ts
|
|
669
670
|
var import_zod25 = require("zod");
|
|
670
|
-
var
|
|
671
|
+
var import_mongoose31 = require("mongoose");
|
|
671
672
|
var zUser = import_zod25.z.object({
|
|
672
673
|
name: import_zod25.z.string().min(2).max(100),
|
|
673
674
|
username: import_zod25.z.string().optional(),
|
|
@@ -688,7 +689,7 @@ var zUser = import_zod25.z.object({
|
|
|
688
689
|
var zMUser = extendZodObjectForMongoose(zUser);
|
|
689
690
|
var zStudent = zUser.extend({
|
|
690
691
|
rank: import_zod25.z.nativeEnum(GoRank),
|
|
691
|
-
guardian: import_zod25.z.instanceof(
|
|
692
|
+
guardian: import_zod25.z.instanceof(import_mongoose31.Types.ObjectId).optional()
|
|
692
693
|
});
|
|
693
694
|
var zMStudent = extendZodObjectForMongoose(zStudent);
|
|
694
695
|
var zTeacher = zUser.extend({
|
package/index.mjs
CHANGED
|
@@ -112,7 +112,7 @@ var zCampTracker = z6.object({
|
|
|
112
112
|
var zMCampTracker = extendZodObjectForMongoose(zCampTracker);
|
|
113
113
|
|
|
114
114
|
// src/interface/tracking/classTracker.ts
|
|
115
|
-
import { Types as
|
|
115
|
+
import { Types as Types7 } from "mongoose";
|
|
116
116
|
import { z as z9 } from "zod";
|
|
117
117
|
|
|
118
118
|
// src/interface/payment/invoice.ts
|
|
@@ -156,6 +156,7 @@ var zInvoice = z7.object({
|
|
|
156
156
|
var zMInvoice = extendZodObjectForMongoose(zInvoice);
|
|
157
157
|
|
|
158
158
|
// src/interface/payment/teacherPayment.ts
|
|
159
|
+
import { Types as Types6 } from "mongoose";
|
|
159
160
|
import { z as z8 } from "zod";
|
|
160
161
|
var zTeacherPaymentRow = z8.object({
|
|
161
162
|
course: z8.string(),
|
|
@@ -164,7 +165,7 @@ var zTeacherPaymentRow = z8.object({
|
|
|
164
165
|
wage: z8.number()
|
|
165
166
|
});
|
|
166
167
|
var zTeacherPayment = z8.object({
|
|
167
|
-
teacher: z8.string(),
|
|
168
|
+
teacher: z8.instanceof(Types6.ObjectId).or(z8.string()),
|
|
168
169
|
rows: z8.array(zTeacherPaymentRow),
|
|
169
170
|
paid: z8.boolean().optional()
|
|
170
171
|
});
|
|
@@ -172,9 +173,9 @@ var zMTeacherPayment = extendZodObjectForMongoose(zTeacherPayment);
|
|
|
172
173
|
|
|
173
174
|
// src/interface/tracking/classTracker.ts
|
|
174
175
|
var zClassTracker = z9.object({
|
|
175
|
-
course: z9.instanceof(
|
|
176
|
-
teacher: z9.instanceof(
|
|
177
|
-
student: z9.instanceof(
|
|
176
|
+
course: z9.instanceof(Types7.ObjectId),
|
|
177
|
+
teacher: z9.instanceof(Types7.ObjectId),
|
|
178
|
+
student: z9.instanceof(Types7.ObjectId),
|
|
178
179
|
classTimes: z9.array(z9.coerce.date()),
|
|
179
180
|
completedList: z9.array(z9.boolean()),
|
|
180
181
|
/**
|
|
@@ -258,11 +259,11 @@ var zCourse = z11.object({
|
|
|
258
259
|
var zMCourse = extendZodObjectForMongoose(zCourse);
|
|
259
260
|
|
|
260
261
|
// src/interface/tracking/groupTracker.ts
|
|
261
|
-
import { Types as
|
|
262
|
+
import { Types as Types8 } from "mongoose";
|
|
262
263
|
var zGroupTracker = z12.object({
|
|
263
|
-
course: z12.instanceof(
|
|
264
|
-
teacher: z12.instanceof(
|
|
265
|
-
semester: z12.instanceof(
|
|
264
|
+
course: z12.instanceof(Types8.ObjectId),
|
|
265
|
+
teacher: z12.instanceof(Types8.ObjectId),
|
|
266
|
+
semester: z12.instanceof(Types8.ObjectId),
|
|
266
267
|
scheduleData: zScheduleData,
|
|
267
268
|
/**
|
|
268
269
|
* occurrences are tracked by week for Groups
|
|
@@ -271,7 +272,7 @@ var zGroupTracker = z12.object({
|
|
|
271
272
|
/**
|
|
272
273
|
* attendances are tracked by week for Groups
|
|
273
274
|
*/
|
|
274
|
-
attendances: z12.array(z12.instanceof(
|
|
275
|
+
attendances: z12.array(z12.instanceof(Types8.ObjectId)),
|
|
275
276
|
/**
|
|
276
277
|
* public-facing ID of the course instance, e.g., 101
|
|
277
278
|
*/
|
|
@@ -299,10 +300,10 @@ var zCampBooking = z13.object({
|
|
|
299
300
|
var zMCampBooking = extendZodObjectForMongoose(zCampBooking);
|
|
300
301
|
|
|
301
302
|
// src/interface/booking/groupBooking.ts
|
|
302
|
-
import { Types as
|
|
303
|
+
import { Types as Types9 } from "mongoose";
|
|
303
304
|
import { z as z14 } from "zod";
|
|
304
305
|
var zGroupBooking = z14.object({
|
|
305
|
-
gtId: z14.instanceof(
|
|
306
|
+
gtId: z14.instanceof(Types9.ObjectId).optional(),
|
|
306
307
|
isTrial: z14.boolean().optional(),
|
|
307
308
|
isOnline: z14.boolean(),
|
|
308
309
|
classDate: z14.string().optional(),
|
|
@@ -311,11 +312,11 @@ var zGroupBooking = z14.object({
|
|
|
311
312
|
var zMGroupBooking = extendZodObjectForMongoose(zGroupBooking);
|
|
312
313
|
|
|
313
314
|
// src/interface/booking/privateBooking.ts
|
|
314
|
-
import { Types as
|
|
315
|
+
import { Types as Types10 } from "mongoose";
|
|
315
316
|
import { z as z15 } from "zod";
|
|
316
317
|
var zPrivateBooking = z15.object({
|
|
317
|
-
courseId: z15.instanceof(
|
|
318
|
-
teacherId: z15.instanceof(
|
|
318
|
+
courseId: z15.instanceof(Types10.ObjectId),
|
|
319
|
+
teacherId: z15.instanceof(Types10.ObjectId),
|
|
319
320
|
classDate: z15.string().optional()
|
|
320
321
|
}).merge(zBUserInfo).merge(zBPaymentInfo);
|
|
321
322
|
var zMPrivateBooking = extendZodObjectForMongoose(zPrivateBooking);
|
|
@@ -347,7 +348,7 @@ var zImageDef = z17.object({
|
|
|
347
348
|
});
|
|
348
349
|
|
|
349
350
|
// src/interface/reporting/reportTicket.ts
|
|
350
|
-
import { Types as
|
|
351
|
+
import { Types as Types11 } from "mongoose";
|
|
351
352
|
import { z as z18 } from "zod";
|
|
352
353
|
|
|
353
354
|
// src/interface/reporting/ticketStatus.ts
|
|
@@ -361,8 +362,8 @@ var TicketStatus = /* @__PURE__ */ ((TicketStatus2) => {
|
|
|
361
362
|
|
|
362
363
|
// src/interface/reporting/reportTicket.ts
|
|
363
364
|
var zReportTicket = z18.object({
|
|
364
|
-
requester: z18.instanceof(
|
|
365
|
-
resolver: z18.instanceof(
|
|
365
|
+
requester: z18.instanceof(Types11.ObjectId),
|
|
366
|
+
resolver: z18.instanceof(Types11.ObjectId),
|
|
366
367
|
status: z18.nativeEnum(TicketStatus),
|
|
367
368
|
title: z18.string(),
|
|
368
369
|
description: z18.string()
|
|
@@ -396,7 +397,7 @@ var zSemester = z19.object({
|
|
|
396
397
|
var zMSemester = extendZodObjectForMongoose(zSemester);
|
|
397
398
|
|
|
398
399
|
// src/interface/tournament/tConfig.ts
|
|
399
|
-
import { Types as
|
|
400
|
+
import { Types as Types12 } from "mongoose";
|
|
400
401
|
import { z as z21 } from "zod";
|
|
401
402
|
|
|
402
403
|
// src/interface/tournament/table.ts
|
|
@@ -459,7 +460,7 @@ var zTConfig = z21.object({
|
|
|
459
460
|
/**
|
|
460
461
|
* List of ticket object IDs for this tournament
|
|
461
462
|
*/
|
|
462
|
-
tickets: z21.array(z21.instanceof(
|
|
463
|
+
tickets: z21.array(z21.instanceof(Types12.ObjectId)),
|
|
463
464
|
/**
|
|
464
465
|
* If false, the tournament registration is closed
|
|
465
466
|
*/
|
|
@@ -476,14 +477,14 @@ var zTConfig = z21.object({
|
|
|
476
477
|
var zMTConfig = extendZodObjectForMongoose(zTConfig);
|
|
477
478
|
|
|
478
479
|
// src/interface/tournament/tReg.ts
|
|
479
|
-
import { Types as
|
|
480
|
+
import { Types as Types14 } from "mongoose";
|
|
480
481
|
import { z as z23 } from "zod";
|
|
481
482
|
|
|
482
483
|
// src/interface/tournament/tTicketReg.ts
|
|
483
484
|
import { z as z22 } from "zod";
|
|
484
|
-
import { Types as
|
|
485
|
+
import { Types as Types13 } from "mongoose";
|
|
485
486
|
var zTTicketReg = z22.object({
|
|
486
|
-
ticket: z22.instanceof(
|
|
487
|
+
ticket: z22.instanceof(Types13.ObjectId),
|
|
487
488
|
/**
|
|
488
489
|
* integer minimum 1, otherwise no ticket is being bought
|
|
489
490
|
*/
|
|
@@ -493,7 +494,7 @@ var zTTicketReg = z22.object({
|
|
|
493
494
|
// src/interface/tournament/tReg.ts
|
|
494
495
|
var zTReg = z23.object({
|
|
495
496
|
agaId: z23.string(),
|
|
496
|
-
tournamentId: z23.instanceof(
|
|
497
|
+
tournamentId: z23.instanceof(Types14.ObjectId),
|
|
497
498
|
tickets: z23.array(zTTicketReg),
|
|
498
499
|
/**
|
|
499
500
|
* @units CENTS - Donation in cents
|
|
@@ -506,7 +507,7 @@ var zTReg = z23.object({
|
|
|
506
507
|
/**
|
|
507
508
|
* Mongoose ID of the admin that edited the registration
|
|
508
509
|
*/
|
|
509
|
-
edited: z23.instanceof(
|
|
510
|
+
edited: z23.instanceof(Types14.ObjectId).optional()
|
|
510
511
|
}).merge(zBUserInfo).merge(zBPaymentInfo);
|
|
511
512
|
var zMTReg = extendZodObjectForMongoose(zTReg);
|
|
512
513
|
|
|
@@ -581,7 +582,7 @@ var GoRank = /* @__PURE__ */ ((GoRank2) => {
|
|
|
581
582
|
|
|
582
583
|
// src/interface/user/user.ts
|
|
583
584
|
import { z as z25 } from "zod";
|
|
584
|
-
import { Types as
|
|
585
|
+
import { Types as Types15 } from "mongoose";
|
|
585
586
|
var zUser = z25.object({
|
|
586
587
|
name: z25.string().min(2).max(100),
|
|
587
588
|
username: z25.string().optional(),
|
|
@@ -602,7 +603,7 @@ var zUser = z25.object({
|
|
|
602
603
|
var zMUser = extendZodObjectForMongoose(zUser);
|
|
603
604
|
var zStudent = zUser.extend({
|
|
604
605
|
rank: z25.nativeEnum(GoRank),
|
|
605
|
-
guardian: z25.instanceof(
|
|
606
|
+
guardian: z25.instanceof(Types15.ObjectId).optional()
|
|
606
607
|
});
|
|
607
608
|
var zMStudent = extendZodObjectForMongoose(zStudent);
|
|
608
609
|
var zTeacher = zUser.extend({
|