@nyig/models 0.2.30 → 0.2.32
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 +119 -113
- package/index.d.ts +119 -113
- package/index.js +6 -5
- package/index.mjs +6 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -161,7 +161,7 @@ var import_zod4 = require("zod");
|
|
|
161
161
|
function addAutoProps(original) {
|
|
162
162
|
return original.extend({
|
|
163
163
|
_id: import_zod4.z.string(),
|
|
164
|
-
editedBy: import_zod4.z.string(),
|
|
164
|
+
editedBy: import_zod4.z.string().optional(),
|
|
165
165
|
createdAt: import_zod4.z.coerce.date().optional(),
|
|
166
166
|
updatedAt: import_zod4.z.coerce.date().optional()
|
|
167
167
|
});
|
|
@@ -233,7 +233,8 @@ var zBInvoice = import_zod7.z.object({
|
|
|
233
233
|
shipping: import_zod7.z.number().int().min(0).optional(),
|
|
234
234
|
paid: import_zod7.z.nativeEnum(PaymentMethod).optional(),
|
|
235
235
|
notes: import_zod7.z.string().optional(),
|
|
236
|
-
createdBy: import_zod7.z.string()
|
|
236
|
+
createdBy: import_zod7.z.string(),
|
|
237
|
+
lastEditBy: import_zod7.z.string().optional()
|
|
237
238
|
});
|
|
238
239
|
var zInvoice = addAutoProps(zBInvoice);
|
|
239
240
|
|
|
@@ -501,7 +502,7 @@ var zEventTicket = addAutoProps(zBEventTicket);
|
|
|
501
502
|
|
|
502
503
|
// src/interface/event/table.ts
|
|
503
504
|
var import_zod21 = require("zod");
|
|
504
|
-
var zTable = import_zod21.z.array(import_zod21.z.
|
|
505
|
+
var zTable = import_zod21.z.array(import_zod21.z.record(import_zod21.z.string(), import_zod21.z.string()));
|
|
505
506
|
var zDetailsTable = import_zod21.z.object({
|
|
506
507
|
fields: import_zod21.z.array(import_zod21.z.string()).length(2),
|
|
507
508
|
data: zTable
|
|
@@ -602,9 +603,9 @@ var zBEventReg = import_zod24.z.object({
|
|
|
602
603
|
/**
|
|
603
604
|
* @units CENTS - Donation in cents
|
|
604
605
|
*/
|
|
605
|
-
donation: import_zod24.z.number().optional(),
|
|
606
|
+
donation: import_zod24.z.coerce.number().optional(),
|
|
606
607
|
/**
|
|
607
|
-
* How the registration was created,
|
|
608
|
+
* How the registration was created, through public endpoint or admin
|
|
608
609
|
*/
|
|
609
610
|
createMethod: import_zod24.z.string().optional()
|
|
610
611
|
}).merge(zBUserInfo).merge(zBPaymentInfo);
|
package/index.mjs
CHANGED
|
@@ -74,7 +74,7 @@ import { z as z4 } from "zod";
|
|
|
74
74
|
function addAutoProps(original) {
|
|
75
75
|
return original.extend({
|
|
76
76
|
_id: z4.string(),
|
|
77
|
-
editedBy: z4.string(),
|
|
77
|
+
editedBy: z4.string().optional(),
|
|
78
78
|
createdAt: z4.coerce.date().optional(),
|
|
79
79
|
updatedAt: z4.coerce.date().optional()
|
|
80
80
|
});
|
|
@@ -146,7 +146,8 @@ var zBInvoice = z7.object({
|
|
|
146
146
|
shipping: z7.number().int().min(0).optional(),
|
|
147
147
|
paid: z7.nativeEnum(PaymentMethod).optional(),
|
|
148
148
|
notes: z7.string().optional(),
|
|
149
|
-
createdBy: z7.string()
|
|
149
|
+
createdBy: z7.string(),
|
|
150
|
+
lastEditBy: z7.string().optional()
|
|
150
151
|
});
|
|
151
152
|
var zInvoice = addAutoProps(zBInvoice);
|
|
152
153
|
|
|
@@ -414,7 +415,7 @@ var zEventTicket = addAutoProps(zBEventTicket);
|
|
|
414
415
|
|
|
415
416
|
// src/interface/event/table.ts
|
|
416
417
|
import { z as z21 } from "zod";
|
|
417
|
-
var zTable = z21.array(z21.
|
|
418
|
+
var zTable = z21.array(z21.record(z21.string(), z21.string()));
|
|
418
419
|
var zDetailsTable = z21.object({
|
|
419
420
|
fields: z21.array(z21.string()).length(2),
|
|
420
421
|
data: zTable
|
|
@@ -515,9 +516,9 @@ var zBEventReg = z24.object({
|
|
|
515
516
|
/**
|
|
516
517
|
* @units CENTS - Donation in cents
|
|
517
518
|
*/
|
|
518
|
-
donation: z24.number().optional(),
|
|
519
|
+
donation: z24.coerce.number().optional(),
|
|
519
520
|
/**
|
|
520
|
-
* How the registration was created,
|
|
521
|
+
* How the registration was created, through public endpoint or admin
|
|
521
522
|
*/
|
|
522
523
|
createMethod: z24.string().optional()
|
|
523
524
|
}).merge(zBUserInfo).merge(zBPaymentInfo);
|