@nyig/models 0.2.45 → 0.2.46
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 +692 -554
- package/index.d.ts +692 -554
- package/index.js +76 -70
- package/index.mjs +75 -70
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -31,6 +31,7 @@ __export(src_exports, {
|
|
|
31
31
|
Season: () => Season,
|
|
32
32
|
TicketStatus: () => TicketStatus,
|
|
33
33
|
zAttendance: () => zAttendance,
|
|
34
|
+
zAttendanceResponse: () => zAttendanceResponse,
|
|
34
35
|
zBAttendance: () => zBAttendance,
|
|
35
36
|
zBCampBooking: () => zBCampBooking,
|
|
36
37
|
zBCampTracker: () => zBCampTracker,
|
|
@@ -144,7 +145,7 @@ var AttendState = /* @__PURE__ */ ((AttendState2) => {
|
|
|
144
145
|
})(AttendState || {});
|
|
145
146
|
|
|
146
147
|
// src/interface/tracking/attendance.ts
|
|
147
|
-
var
|
|
148
|
+
var import_zod7 = require("zod");
|
|
148
149
|
|
|
149
150
|
// src/interface/payment/tuition.ts
|
|
150
151
|
var import_zod3 = require("zod");
|
|
@@ -173,50 +174,6 @@ function addAutoProps(original) {
|
|
|
173
174
|
});
|
|
174
175
|
}
|
|
175
176
|
|
|
176
|
-
// src/interface/tracking/attendance.ts
|
|
177
|
-
var zBAttendance = import_zod5.z.object({
|
|
178
|
-
student: import_zod5.z.string(),
|
|
179
|
-
states: import_zod5.z.array(import_zod5.z.nativeEnum(AttendState)),
|
|
180
|
-
tuition: zTuition,
|
|
181
|
-
paid: import_zod5.z.boolean().optional(),
|
|
182
|
-
campOption: import_zod5.z.nativeEnum(CampOption)
|
|
183
|
-
});
|
|
184
|
-
var zAttendance = addAutoProps(zBAttendance);
|
|
185
|
-
|
|
186
|
-
// src/interface/tracking/campTracker.ts
|
|
187
|
-
var import_zod6 = require("zod");
|
|
188
|
-
var zBCampTracker = import_zod6.z.object({
|
|
189
|
-
course: import_zod6.z.string(),
|
|
190
|
-
teacher: import_zod6.z.string(),
|
|
191
|
-
semester: import_zod6.z.string(),
|
|
192
|
-
/**
|
|
193
|
-
* occurrences are tracked by week for camps
|
|
194
|
-
*/
|
|
195
|
-
occurrences: import_zod6.z.array(import_zod6.z.string()),
|
|
196
|
-
/**
|
|
197
|
-
* attendances are tracked by week for camps
|
|
198
|
-
*/
|
|
199
|
-
attendances: import_zod6.z.array(import_zod6.z.string()),
|
|
200
|
-
isNonPublic: import_zod6.z.boolean().optional(),
|
|
201
|
-
notes: import_zod6.z.string().optional()
|
|
202
|
-
});
|
|
203
|
-
var zCampTracker = addAutoProps(zBCampTracker);
|
|
204
|
-
|
|
205
|
-
// src/interface/tracking/classTracker.ts
|
|
206
|
-
var import_zod11 = require("zod");
|
|
207
|
-
|
|
208
|
-
// src/interface/payment/invoice.ts
|
|
209
|
-
var import_zod9 = require("zod");
|
|
210
|
-
|
|
211
|
-
// src/interface/payment/paymentMethod.ts
|
|
212
|
-
var PaymentMethod = /* @__PURE__ */ ((PaymentMethod2) => {
|
|
213
|
-
PaymentMethod2["CASH"] = "Cash";
|
|
214
|
-
PaymentMethod2["CHECK"] = "Check";
|
|
215
|
-
PaymentMethod2["VENMO"] = "Venmo";
|
|
216
|
-
PaymentMethod2["ZELLE"] = "Zelle Transfer";
|
|
217
|
-
return PaymentMethod2;
|
|
218
|
-
})(PaymentMethod || {});
|
|
219
|
-
|
|
220
177
|
// src/interface/user/goRank.ts
|
|
221
178
|
var GoRank = /* @__PURE__ */ ((GoRank2) => {
|
|
222
179
|
GoRank2["KYU1"] = "1k";
|
|
@@ -264,45 +221,45 @@ var GoRank = /* @__PURE__ */ ((GoRank2) => {
|
|
|
264
221
|
})(GoRank || {});
|
|
265
222
|
|
|
266
223
|
// src/interface/user/user.ts
|
|
267
|
-
var
|
|
268
|
-
var zBUser =
|
|
269
|
-
name:
|
|
270
|
-
username:
|
|
271
|
-
password:
|
|
272
|
-
roles:
|
|
273
|
-
email:
|
|
274
|
-
address:
|
|
275
|
-
country:
|
|
224
|
+
var import_zod5 = require("zod");
|
|
225
|
+
var zBUser = import_zod5.z.object({
|
|
226
|
+
name: import_zod5.z.string().min(2).max(100),
|
|
227
|
+
username: import_zod5.z.string().optional(),
|
|
228
|
+
password: import_zod5.z.string().optional(),
|
|
229
|
+
roles: import_zod5.z.array(import_zod5.z.number().int()).optional(),
|
|
230
|
+
email: import_zod5.z.string().max(100).email().or(import_zod5.z.literal("")).optional(),
|
|
231
|
+
address: import_zod5.z.string().or(import_zod5.z.literal("")).optional(),
|
|
232
|
+
country: import_zod5.z.string().length(2, {
|
|
276
233
|
message: "Enter the 2-letter country code"
|
|
277
|
-
}).or(
|
|
278
|
-
phoneNumber:
|
|
234
|
+
}).or(import_zod5.z.literal("")).optional(),
|
|
235
|
+
phoneNumber: import_zod5.z.string().regex(/^\d{10}/, {
|
|
279
236
|
message: `Please enter a valid 10-digit US phone number with numbers only`
|
|
280
|
-
}).or(
|
|
281
|
-
birthDate:
|
|
237
|
+
}).or(import_zod5.z.literal("")).optional(),
|
|
238
|
+
birthDate: import_zod5.z.string().regex(/^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/, {
|
|
282
239
|
message: "Enter a valid date in yyyy-mm-dd format"
|
|
283
|
-
}).or(
|
|
240
|
+
}).or(import_zod5.z.literal("")).optional()
|
|
284
241
|
});
|
|
285
242
|
var zUser = addAutoProps(zBUser);
|
|
286
243
|
var zBStudent = zBUser.extend({
|
|
287
|
-
rank:
|
|
288
|
-
guardian:
|
|
244
|
+
rank: import_zod5.z.nativeEnum(GoRank),
|
|
245
|
+
guardian: import_zod5.z.string().optional()
|
|
289
246
|
});
|
|
290
247
|
var zStudent = addAutoProps(zBStudent);
|
|
291
248
|
var zBTeacher = zBUser.extend({
|
|
292
|
-
rank:
|
|
249
|
+
rank: import_zod5.z.nativeEnum(GoRank),
|
|
293
250
|
/**
|
|
294
251
|
* Inactive teachers are not shown on public endpoints
|
|
295
252
|
*/
|
|
296
|
-
isInactive:
|
|
253
|
+
isInactive: import_zod5.z.boolean().optional(),
|
|
297
254
|
/**
|
|
298
255
|
* Teacher's position, e.g., instructor, president
|
|
299
256
|
*/
|
|
300
|
-
title:
|
|
257
|
+
title: import_zod5.z.string().optional(),
|
|
301
258
|
/**
|
|
302
259
|
* Teacher's bio text describing experience
|
|
303
260
|
* new lines will be rendered as paragraphs
|
|
304
261
|
*/
|
|
305
|
-
bio:
|
|
262
|
+
bio: import_zod5.z.string().optional(),
|
|
306
263
|
/** Format is illustrated below, where teacher is available
|
|
307
264
|
* Mon 9-12am 3-6pm & Tue 10-12am 6-10pm
|
|
308
265
|
* [
|
|
@@ -315,17 +272,65 @@ var zBTeacher = zBUser.extend({
|
|
|
315
272
|
* [],
|
|
316
273
|
* ]
|
|
317
274
|
*/
|
|
318
|
-
available:
|
|
275
|
+
available: import_zod5.z.array(import_zod5.z.array(import_zod5.z.array(import_zod5.z.number()))).optional()
|
|
319
276
|
});
|
|
320
277
|
var zTeacher = addAutoProps(zBTeacher);
|
|
321
278
|
|
|
322
279
|
// src/interface/user/userRoles.ts
|
|
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()
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
// src/interface/tracking/attendance.ts
|
|
288
|
+
var zBAttendance = import_zod7.z.object({
|
|
289
|
+
student: import_zod7.z.string(),
|
|
290
|
+
states: import_zod7.z.array(import_zod7.z.nativeEnum(AttendState)),
|
|
291
|
+
tuition: zTuition,
|
|
292
|
+
paid: import_zod7.z.boolean().optional(),
|
|
293
|
+
campOption: import_zod7.z.nativeEnum(CampOption).optional()
|
|
294
|
+
});
|
|
295
|
+
var zAttendance = addAutoProps(zBAttendance);
|
|
296
|
+
var zAttendanceResponse = zAttendance.extend({
|
|
297
|
+
student: zStudent
|
|
298
|
+
});
|
|
299
|
+
|
|
300
|
+
// src/interface/tracking/campTracker.ts
|
|
323
301
|
var import_zod8 = require("zod");
|
|
324
|
-
var
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
302
|
+
var zBCampTracker = import_zod8.z.object({
|
|
303
|
+
course: import_zod8.z.string(),
|
|
304
|
+
teacher: import_zod8.z.string(),
|
|
305
|
+
semester: import_zod8.z.string(),
|
|
306
|
+
/**
|
|
307
|
+
* occurrences are tracked by week for camps
|
|
308
|
+
*/
|
|
309
|
+
occurrences: import_zod8.z.array(import_zod8.z.string()),
|
|
310
|
+
/**
|
|
311
|
+
* attendances are tracked by week for camps
|
|
312
|
+
*/
|
|
313
|
+
attendances: import_zod8.z.array(import_zod8.z.string()),
|
|
314
|
+
publicDescription: import_zod8.z.string().optional(),
|
|
315
|
+
isNonPublic: import_zod8.z.boolean().optional(),
|
|
316
|
+
notes: import_zod8.z.string().optional()
|
|
328
317
|
});
|
|
318
|
+
var zCampTracker = addAutoProps(zBCampTracker);
|
|
319
|
+
|
|
320
|
+
// src/interface/tracking/classTracker.ts
|
|
321
|
+
var import_zod11 = require("zod");
|
|
322
|
+
|
|
323
|
+
// src/interface/payment/invoice.ts
|
|
324
|
+
var import_zod9 = require("zod");
|
|
325
|
+
|
|
326
|
+
// src/interface/payment/paymentMethod.ts
|
|
327
|
+
var PaymentMethod = /* @__PURE__ */ ((PaymentMethod2) => {
|
|
328
|
+
PaymentMethod2["CASH"] = "Cash";
|
|
329
|
+
PaymentMethod2["CHECK"] = "Check";
|
|
330
|
+
PaymentMethod2["VENMO"] = "Venmo";
|
|
331
|
+
PaymentMethod2["ZELLE"] = "Zelle Transfer";
|
|
332
|
+
return PaymentMethod2;
|
|
333
|
+
})(PaymentMethod || {});
|
|
329
334
|
|
|
330
335
|
// src/interface/payment/invoice.ts
|
|
331
336
|
var zDiscount = import_zod9.z.object({
|
|
@@ -758,6 +763,7 @@ var zEventRegResponse = zEventReg.extend({
|
|
|
758
763
|
Season,
|
|
759
764
|
TicketStatus,
|
|
760
765
|
zAttendance,
|
|
766
|
+
zAttendanceResponse,
|
|
761
767
|
zBAttendance,
|
|
762
768
|
zBCampBooking,
|
|
763
769
|
zBCampTracker,
|
package/index.mjs
CHANGED
|
@@ -51,7 +51,7 @@ var AttendState = /* @__PURE__ */ ((AttendState2) => {
|
|
|
51
51
|
})(AttendState || {});
|
|
52
52
|
|
|
53
53
|
// src/interface/tracking/attendance.ts
|
|
54
|
-
import { z as
|
|
54
|
+
import { z as z7 } from "zod";
|
|
55
55
|
|
|
56
56
|
// src/interface/payment/tuition.ts
|
|
57
57
|
import { z as z3 } from "zod";
|
|
@@ -80,50 +80,6 @@ function addAutoProps(original) {
|
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
// src/interface/tracking/attendance.ts
|
|
84
|
-
var zBAttendance = z5.object({
|
|
85
|
-
student: z5.string(),
|
|
86
|
-
states: z5.array(z5.nativeEnum(AttendState)),
|
|
87
|
-
tuition: zTuition,
|
|
88
|
-
paid: z5.boolean().optional(),
|
|
89
|
-
campOption: z5.nativeEnum(CampOption)
|
|
90
|
-
});
|
|
91
|
-
var zAttendance = addAutoProps(zBAttendance);
|
|
92
|
-
|
|
93
|
-
// src/interface/tracking/campTracker.ts
|
|
94
|
-
import { z as z6 } from "zod";
|
|
95
|
-
var zBCampTracker = z6.object({
|
|
96
|
-
course: z6.string(),
|
|
97
|
-
teacher: z6.string(),
|
|
98
|
-
semester: z6.string(),
|
|
99
|
-
/**
|
|
100
|
-
* occurrences are tracked by week for camps
|
|
101
|
-
*/
|
|
102
|
-
occurrences: z6.array(z6.string()),
|
|
103
|
-
/**
|
|
104
|
-
* attendances are tracked by week for camps
|
|
105
|
-
*/
|
|
106
|
-
attendances: z6.array(z6.string()),
|
|
107
|
-
isNonPublic: z6.boolean().optional(),
|
|
108
|
-
notes: z6.string().optional()
|
|
109
|
-
});
|
|
110
|
-
var zCampTracker = addAutoProps(zBCampTracker);
|
|
111
|
-
|
|
112
|
-
// src/interface/tracking/classTracker.ts
|
|
113
|
-
import { z as z11 } from "zod";
|
|
114
|
-
|
|
115
|
-
// src/interface/payment/invoice.ts
|
|
116
|
-
import { z as z9 } from "zod";
|
|
117
|
-
|
|
118
|
-
// src/interface/payment/paymentMethod.ts
|
|
119
|
-
var PaymentMethod = /* @__PURE__ */ ((PaymentMethod2) => {
|
|
120
|
-
PaymentMethod2["CASH"] = "Cash";
|
|
121
|
-
PaymentMethod2["CHECK"] = "Check";
|
|
122
|
-
PaymentMethod2["VENMO"] = "Venmo";
|
|
123
|
-
PaymentMethod2["ZELLE"] = "Zelle Transfer";
|
|
124
|
-
return PaymentMethod2;
|
|
125
|
-
})(PaymentMethod || {});
|
|
126
|
-
|
|
127
83
|
// src/interface/user/goRank.ts
|
|
128
84
|
var GoRank = /* @__PURE__ */ ((GoRank2) => {
|
|
129
85
|
GoRank2["KYU1"] = "1k";
|
|
@@ -171,45 +127,45 @@ var GoRank = /* @__PURE__ */ ((GoRank2) => {
|
|
|
171
127
|
})(GoRank || {});
|
|
172
128
|
|
|
173
129
|
// src/interface/user/user.ts
|
|
174
|
-
import { z as
|
|
175
|
-
var zBUser =
|
|
176
|
-
name:
|
|
177
|
-
username:
|
|
178
|
-
password:
|
|
179
|
-
roles:
|
|
180
|
-
email:
|
|
181
|
-
address:
|
|
182
|
-
country:
|
|
130
|
+
import { z as z5 } from "zod";
|
|
131
|
+
var zBUser = z5.object({
|
|
132
|
+
name: z5.string().min(2).max(100),
|
|
133
|
+
username: z5.string().optional(),
|
|
134
|
+
password: z5.string().optional(),
|
|
135
|
+
roles: z5.array(z5.number().int()).optional(),
|
|
136
|
+
email: z5.string().max(100).email().or(z5.literal("")).optional(),
|
|
137
|
+
address: z5.string().or(z5.literal("")).optional(),
|
|
138
|
+
country: z5.string().length(2, {
|
|
183
139
|
message: "Enter the 2-letter country code"
|
|
184
|
-
}).or(
|
|
185
|
-
phoneNumber:
|
|
140
|
+
}).or(z5.literal("")).optional(),
|
|
141
|
+
phoneNumber: z5.string().regex(/^\d{10}/, {
|
|
186
142
|
message: `Please enter a valid 10-digit US phone number with numbers only`
|
|
187
|
-
}).or(
|
|
188
|
-
birthDate:
|
|
143
|
+
}).or(z5.literal("")).optional(),
|
|
144
|
+
birthDate: z5.string().regex(/^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/, {
|
|
189
145
|
message: "Enter a valid date in yyyy-mm-dd format"
|
|
190
|
-
}).or(
|
|
146
|
+
}).or(z5.literal("")).optional()
|
|
191
147
|
});
|
|
192
148
|
var zUser = addAutoProps(zBUser);
|
|
193
149
|
var zBStudent = zBUser.extend({
|
|
194
|
-
rank:
|
|
195
|
-
guardian:
|
|
150
|
+
rank: z5.nativeEnum(GoRank),
|
|
151
|
+
guardian: z5.string().optional()
|
|
196
152
|
});
|
|
197
153
|
var zStudent = addAutoProps(zBStudent);
|
|
198
154
|
var zBTeacher = zBUser.extend({
|
|
199
|
-
rank:
|
|
155
|
+
rank: z5.nativeEnum(GoRank),
|
|
200
156
|
/**
|
|
201
157
|
* Inactive teachers are not shown on public endpoints
|
|
202
158
|
*/
|
|
203
|
-
isInactive:
|
|
159
|
+
isInactive: z5.boolean().optional(),
|
|
204
160
|
/**
|
|
205
161
|
* Teacher's position, e.g., instructor, president
|
|
206
162
|
*/
|
|
207
|
-
title:
|
|
163
|
+
title: z5.string().optional(),
|
|
208
164
|
/**
|
|
209
165
|
* Teacher's bio text describing experience
|
|
210
166
|
* new lines will be rendered as paragraphs
|
|
211
167
|
*/
|
|
212
|
-
bio:
|
|
168
|
+
bio: z5.string().optional(),
|
|
213
169
|
/** Format is illustrated below, where teacher is available
|
|
214
170
|
* Mon 9-12am 3-6pm & Tue 10-12am 6-10pm
|
|
215
171
|
* [
|
|
@@ -222,17 +178,65 @@ var zBTeacher = zBUser.extend({
|
|
|
222
178
|
* [],
|
|
223
179
|
* ]
|
|
224
180
|
*/
|
|
225
|
-
available:
|
|
181
|
+
available: z5.array(z5.array(z5.array(z5.number()))).optional()
|
|
226
182
|
});
|
|
227
183
|
var zTeacher = addAutoProps(zBTeacher);
|
|
228
184
|
|
|
229
185
|
// src/interface/user/userRoles.ts
|
|
186
|
+
import { z as z6 } from "zod";
|
|
187
|
+
var zUserRoles = z6.object({
|
|
188
|
+
user: z6.number().int(),
|
|
189
|
+
admin: z6.number().int(),
|
|
190
|
+
superadmin: z6.number().int()
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
// src/interface/tracking/attendance.ts
|
|
194
|
+
var zBAttendance = z7.object({
|
|
195
|
+
student: z7.string(),
|
|
196
|
+
states: z7.array(z7.nativeEnum(AttendState)),
|
|
197
|
+
tuition: zTuition,
|
|
198
|
+
paid: z7.boolean().optional(),
|
|
199
|
+
campOption: z7.nativeEnum(CampOption).optional()
|
|
200
|
+
});
|
|
201
|
+
var zAttendance = addAutoProps(zBAttendance);
|
|
202
|
+
var zAttendanceResponse = zAttendance.extend({
|
|
203
|
+
student: zStudent
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
// src/interface/tracking/campTracker.ts
|
|
230
207
|
import { z as z8 } from "zod";
|
|
231
|
-
var
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
208
|
+
var zBCampTracker = z8.object({
|
|
209
|
+
course: z8.string(),
|
|
210
|
+
teacher: z8.string(),
|
|
211
|
+
semester: z8.string(),
|
|
212
|
+
/**
|
|
213
|
+
* occurrences are tracked by week for camps
|
|
214
|
+
*/
|
|
215
|
+
occurrences: z8.array(z8.string()),
|
|
216
|
+
/**
|
|
217
|
+
* attendances are tracked by week for camps
|
|
218
|
+
*/
|
|
219
|
+
attendances: z8.array(z8.string()),
|
|
220
|
+
publicDescription: z8.string().optional(),
|
|
221
|
+
isNonPublic: z8.boolean().optional(),
|
|
222
|
+
notes: z8.string().optional()
|
|
235
223
|
});
|
|
224
|
+
var zCampTracker = addAutoProps(zBCampTracker);
|
|
225
|
+
|
|
226
|
+
// src/interface/tracking/classTracker.ts
|
|
227
|
+
import { z as z11 } from "zod";
|
|
228
|
+
|
|
229
|
+
// src/interface/payment/invoice.ts
|
|
230
|
+
import { z as z9 } from "zod";
|
|
231
|
+
|
|
232
|
+
// src/interface/payment/paymentMethod.ts
|
|
233
|
+
var PaymentMethod = /* @__PURE__ */ ((PaymentMethod2) => {
|
|
234
|
+
PaymentMethod2["CASH"] = "Cash";
|
|
235
|
+
PaymentMethod2["CHECK"] = "Check";
|
|
236
|
+
PaymentMethod2["VENMO"] = "Venmo";
|
|
237
|
+
PaymentMethod2["ZELLE"] = "Zelle Transfer";
|
|
238
|
+
return PaymentMethod2;
|
|
239
|
+
})(PaymentMethod || {});
|
|
236
240
|
|
|
237
241
|
// src/interface/payment/invoice.ts
|
|
238
242
|
var zDiscount = z9.object({
|
|
@@ -664,6 +668,7 @@ export {
|
|
|
664
668
|
Season,
|
|
665
669
|
TicketStatus,
|
|
666
670
|
zAttendance,
|
|
671
|
+
zAttendanceResponse,
|
|
667
672
|
zBAttendance,
|
|
668
673
|
zBCampBooking,
|
|
669
674
|
zBCampTracker,
|