@nyig/models 0.2.33 → 0.2.35
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 +8 -8
- package/index.d.ts +8 -8
- package/index.js +11 -11
- package/index.mjs +11 -11
- package/package.json +1 -1
package/index.d.mts
CHANGED
|
@@ -394,7 +394,7 @@ declare const zBCourse: z.ZodObject<{
|
|
|
394
394
|
* @unit CENTS - Price of the course in cents
|
|
395
395
|
*/
|
|
396
396
|
price: z.ZodNumber;
|
|
397
|
-
description: z.ZodOptional<z.ZodString
|
|
397
|
+
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>;
|
|
398
398
|
/**
|
|
399
399
|
* NYIG School locations
|
|
400
400
|
*/
|
|
@@ -402,7 +402,7 @@ declare const zBCourse: z.ZodObject<{
|
|
|
402
402
|
/**
|
|
403
403
|
* Recommended level before taking this course
|
|
404
404
|
*/
|
|
405
|
-
recLevel: z.ZodString
|
|
405
|
+
recLevel: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>;
|
|
406
406
|
/**
|
|
407
407
|
* Camp tuition for half-day option
|
|
408
408
|
*/
|
|
@@ -417,8 +417,8 @@ declare const zBCourse: z.ZodObject<{
|
|
|
417
417
|
category: CourseCategory;
|
|
418
418
|
duration: number;
|
|
419
419
|
nyigSchool: NYIGSchool;
|
|
420
|
-
recLevel: string;
|
|
421
420
|
description?: string | undefined;
|
|
421
|
+
recLevel?: string | undefined;
|
|
422
422
|
halfCampTuition?: number | undefined;
|
|
423
423
|
fullCampTuition?: number | undefined;
|
|
424
424
|
}, {
|
|
@@ -427,8 +427,8 @@ declare const zBCourse: z.ZodObject<{
|
|
|
427
427
|
category: CourseCategory;
|
|
428
428
|
duration: number;
|
|
429
429
|
nyigSchool: NYIGSchool;
|
|
430
|
-
recLevel: string;
|
|
431
430
|
description?: string | undefined;
|
|
431
|
+
recLevel?: string | undefined;
|
|
432
432
|
halfCampTuition?: number | undefined;
|
|
433
433
|
fullCampTuition?: number | undefined;
|
|
434
434
|
}>;
|
|
@@ -437,9 +437,9 @@ declare const zCourse: z.ZodObject<{
|
|
|
437
437
|
name: z.ZodString;
|
|
438
438
|
category: z.ZodNativeEnum<typeof CourseCategory>;
|
|
439
439
|
duration: z.ZodNumber;
|
|
440
|
-
description: z.ZodOptional<z.ZodString
|
|
440
|
+
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>;
|
|
441
441
|
nyigSchool: z.ZodNativeEnum<typeof NYIGSchool>;
|
|
442
|
-
recLevel: z.ZodString
|
|
442
|
+
recLevel: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>;
|
|
443
443
|
halfCampTuition: z.ZodOptional<z.ZodNumber>;
|
|
444
444
|
fullCampTuition: z.ZodOptional<z.ZodNumber>;
|
|
445
445
|
_id: z.ZodString;
|
|
@@ -453,8 +453,8 @@ declare const zCourse: z.ZodObject<{
|
|
|
453
453
|
category: CourseCategory;
|
|
454
454
|
duration: number;
|
|
455
455
|
nyigSchool: NYIGSchool;
|
|
456
|
-
recLevel: string;
|
|
457
456
|
description?: string | undefined;
|
|
457
|
+
recLevel?: string | undefined;
|
|
458
458
|
halfCampTuition?: number | undefined;
|
|
459
459
|
fullCampTuition?: number | undefined;
|
|
460
460
|
editedBy?: string | undefined;
|
|
@@ -467,8 +467,8 @@ declare const zCourse: z.ZodObject<{
|
|
|
467
467
|
category: CourseCategory;
|
|
468
468
|
duration: number;
|
|
469
469
|
nyigSchool: NYIGSchool;
|
|
470
|
-
recLevel: string;
|
|
471
470
|
description?: string | undefined;
|
|
471
|
+
recLevel?: string | undefined;
|
|
472
472
|
halfCampTuition?: number | undefined;
|
|
473
473
|
fullCampTuition?: number | undefined;
|
|
474
474
|
editedBy?: string | undefined;
|
package/index.d.ts
CHANGED
|
@@ -394,7 +394,7 @@ declare const zBCourse: z.ZodObject<{
|
|
|
394
394
|
* @unit CENTS - Price of the course in cents
|
|
395
395
|
*/
|
|
396
396
|
price: z.ZodNumber;
|
|
397
|
-
description: z.ZodOptional<z.ZodString
|
|
397
|
+
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>;
|
|
398
398
|
/**
|
|
399
399
|
* NYIG School locations
|
|
400
400
|
*/
|
|
@@ -402,7 +402,7 @@ declare const zBCourse: z.ZodObject<{
|
|
|
402
402
|
/**
|
|
403
403
|
* Recommended level before taking this course
|
|
404
404
|
*/
|
|
405
|
-
recLevel: z.ZodString
|
|
405
|
+
recLevel: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>;
|
|
406
406
|
/**
|
|
407
407
|
* Camp tuition for half-day option
|
|
408
408
|
*/
|
|
@@ -417,8 +417,8 @@ declare const zBCourse: z.ZodObject<{
|
|
|
417
417
|
category: CourseCategory;
|
|
418
418
|
duration: number;
|
|
419
419
|
nyigSchool: NYIGSchool;
|
|
420
|
-
recLevel: string;
|
|
421
420
|
description?: string | undefined;
|
|
421
|
+
recLevel?: string | undefined;
|
|
422
422
|
halfCampTuition?: number | undefined;
|
|
423
423
|
fullCampTuition?: number | undefined;
|
|
424
424
|
}, {
|
|
@@ -427,8 +427,8 @@ declare const zBCourse: z.ZodObject<{
|
|
|
427
427
|
category: CourseCategory;
|
|
428
428
|
duration: number;
|
|
429
429
|
nyigSchool: NYIGSchool;
|
|
430
|
-
recLevel: string;
|
|
431
430
|
description?: string | undefined;
|
|
431
|
+
recLevel?: string | undefined;
|
|
432
432
|
halfCampTuition?: number | undefined;
|
|
433
433
|
fullCampTuition?: number | undefined;
|
|
434
434
|
}>;
|
|
@@ -437,9 +437,9 @@ declare const zCourse: z.ZodObject<{
|
|
|
437
437
|
name: z.ZodString;
|
|
438
438
|
category: z.ZodNativeEnum<typeof CourseCategory>;
|
|
439
439
|
duration: z.ZodNumber;
|
|
440
|
-
description: z.ZodOptional<z.ZodString
|
|
440
|
+
description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>;
|
|
441
441
|
nyigSchool: z.ZodNativeEnum<typeof NYIGSchool>;
|
|
442
|
-
recLevel: z.ZodString
|
|
442
|
+
recLevel: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>;
|
|
443
443
|
halfCampTuition: z.ZodOptional<z.ZodNumber>;
|
|
444
444
|
fullCampTuition: z.ZodOptional<z.ZodNumber>;
|
|
445
445
|
_id: z.ZodString;
|
|
@@ -453,8 +453,8 @@ declare const zCourse: z.ZodObject<{
|
|
|
453
453
|
category: CourseCategory;
|
|
454
454
|
duration: number;
|
|
455
455
|
nyigSchool: NYIGSchool;
|
|
456
|
-
recLevel: string;
|
|
457
456
|
description?: string | undefined;
|
|
457
|
+
recLevel?: string | undefined;
|
|
458
458
|
halfCampTuition?: number | undefined;
|
|
459
459
|
fullCampTuition?: number | undefined;
|
|
460
460
|
editedBy?: string | undefined;
|
|
@@ -467,8 +467,8 @@ declare const zCourse: z.ZodObject<{
|
|
|
467
467
|
category: CourseCategory;
|
|
468
468
|
duration: number;
|
|
469
469
|
nyigSchool: NYIGSchool;
|
|
470
|
-
recLevel: string;
|
|
471
470
|
description?: string | undefined;
|
|
471
|
+
recLevel?: string | undefined;
|
|
472
472
|
halfCampTuition?: number | undefined;
|
|
473
473
|
fullCampTuition?: number | undefined;
|
|
474
474
|
editedBy?: string | undefined;
|
package/index.js
CHANGED
|
@@ -241,13 +241,13 @@ var zInvoice = addAutoProps(zBInvoice);
|
|
|
241
241
|
// src/interface/payment/teacherPayment.ts
|
|
242
242
|
var import_zod8 = require("zod");
|
|
243
243
|
var zTeacherPaymentRow = import_zod8.z.object({
|
|
244
|
-
course: import_zod8.z.string(),
|
|
245
|
-
length: import_zod8.z.number(),
|
|
246
|
-
count: import_zod8.z.number(),
|
|
247
|
-
wage: import_zod8.z.number()
|
|
244
|
+
course: import_zod8.z.string().min(1, "select or enter a course"),
|
|
245
|
+
length: import_zod8.z.coerce.number().gt(0, "must be > 0"),
|
|
246
|
+
count: import_zod8.z.coerce.number().int().gt(0, "must be > 0"),
|
|
247
|
+
wage: import_zod8.z.coerce.number().gt(0, "wage must be > 0")
|
|
248
248
|
});
|
|
249
249
|
var zBTeacherPayment = import_zod8.z.object({
|
|
250
|
-
teacher: import_zod8.z.string(),
|
|
250
|
+
teacher: import_zod8.z.string().min(1, "select or enter a teacher"),
|
|
251
251
|
rows: import_zod8.z.array(zTeacherPaymentRow),
|
|
252
252
|
paid: import_zod8.z.boolean().optional()
|
|
253
253
|
});
|
|
@@ -315,12 +315,12 @@ var zBCourse = import_zod11.z.object({
|
|
|
315
315
|
/**
|
|
316
316
|
* @unit SECONDS - Duration of the course in seconds
|
|
317
317
|
*/
|
|
318
|
-
duration: import_zod11.z.number().int("Duration in seconds must be a whole number").min(1, "Duration in seconds must not be less than or equal to 0"),
|
|
318
|
+
duration: import_zod11.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"),
|
|
319
319
|
/**
|
|
320
320
|
* @unit CENTS - Price of the course in cents
|
|
321
321
|
*/
|
|
322
|
-
price: import_zod11.z.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0"),
|
|
323
|
-
description: import_zod11.z.string().optional(),
|
|
322
|
+
price: import_zod11.z.coerce.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0"),
|
|
323
|
+
description: import_zod11.z.string().or(import_zod11.z.literal("")).optional(),
|
|
324
324
|
/**
|
|
325
325
|
* NYIG School locations
|
|
326
326
|
*/
|
|
@@ -328,15 +328,15 @@ var zBCourse = import_zod11.z.object({
|
|
|
328
328
|
/**
|
|
329
329
|
* Recommended level before taking this course
|
|
330
330
|
*/
|
|
331
|
-
recLevel: import_zod11.z.string(),
|
|
331
|
+
recLevel: import_zod11.z.string().or(import_zod11.z.literal("")).optional(),
|
|
332
332
|
/**
|
|
333
333
|
* Camp tuition for half-day option
|
|
334
334
|
*/
|
|
335
|
-
halfCampTuition: import_zod11.z.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0").optional(),
|
|
335
|
+
halfCampTuition: import_zod11.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(),
|
|
336
336
|
/**
|
|
337
337
|
* Camp tuition for full-day option
|
|
338
338
|
*/
|
|
339
|
-
fullCampTuition: import_zod11.z.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0").optional()
|
|
339
|
+
fullCampTuition: import_zod11.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()
|
|
340
340
|
});
|
|
341
341
|
var zCourse = addAutoProps(zBCourse);
|
|
342
342
|
|
package/index.mjs
CHANGED
|
@@ -154,13 +154,13 @@ var zInvoice = addAutoProps(zBInvoice);
|
|
|
154
154
|
// src/interface/payment/teacherPayment.ts
|
|
155
155
|
import { z as z8 } from "zod";
|
|
156
156
|
var zTeacherPaymentRow = z8.object({
|
|
157
|
-
course: z8.string(),
|
|
158
|
-
length: z8.number(),
|
|
159
|
-
count: z8.number(),
|
|
160
|
-
wage: z8.number()
|
|
157
|
+
course: z8.string().min(1, "select or enter a course"),
|
|
158
|
+
length: z8.coerce.number().gt(0, "must be > 0"),
|
|
159
|
+
count: z8.coerce.number().int().gt(0, "must be > 0"),
|
|
160
|
+
wage: z8.coerce.number().gt(0, "wage must be > 0")
|
|
161
161
|
});
|
|
162
162
|
var zBTeacherPayment = z8.object({
|
|
163
|
-
teacher: z8.string(),
|
|
163
|
+
teacher: z8.string().min(1, "select or enter a teacher"),
|
|
164
164
|
rows: z8.array(zTeacherPaymentRow),
|
|
165
165
|
paid: z8.boolean().optional()
|
|
166
166
|
});
|
|
@@ -228,12 +228,12 @@ var zBCourse = z11.object({
|
|
|
228
228
|
/**
|
|
229
229
|
* @unit SECONDS - Duration of the course in seconds
|
|
230
230
|
*/
|
|
231
|
-
duration: z11.number().int("Duration in seconds must be a whole number").min(1, "Duration in seconds must not be less than or equal to 0"),
|
|
231
|
+
duration: z11.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"),
|
|
232
232
|
/**
|
|
233
233
|
* @unit CENTS - Price of the course in cents
|
|
234
234
|
*/
|
|
235
|
-
price: z11.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0"),
|
|
236
|
-
description: z11.string().optional(),
|
|
235
|
+
price: z11.coerce.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0"),
|
|
236
|
+
description: z11.string().or(z11.literal("")).optional(),
|
|
237
237
|
/**
|
|
238
238
|
* NYIG School locations
|
|
239
239
|
*/
|
|
@@ -241,15 +241,15 @@ var zBCourse = z11.object({
|
|
|
241
241
|
/**
|
|
242
242
|
* Recommended level before taking this course
|
|
243
243
|
*/
|
|
244
|
-
recLevel: z11.string(),
|
|
244
|
+
recLevel: z11.string().or(z11.literal("")).optional(),
|
|
245
245
|
/**
|
|
246
246
|
* Camp tuition for half-day option
|
|
247
247
|
*/
|
|
248
|
-
halfCampTuition: z11.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0").optional(),
|
|
248
|
+
halfCampTuition: z11.coerce.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0").optional(),
|
|
249
249
|
/**
|
|
250
250
|
* Camp tuition for full-day option
|
|
251
251
|
*/
|
|
252
|
-
fullCampTuition: z11.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0").optional()
|
|
252
|
+
fullCampTuition: z11.coerce.number().int("Tuition must be a whole number in cents").min(1, "Tuition must not be less than or equal to 0").optional()
|
|
253
253
|
});
|
|
254
254
|
var zCourse = addAutoProps(zBCourse);
|
|
255
255
|
|