@nyig/models 0.6.5 → 0.6.7

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.js CHANGED
@@ -51,6 +51,7 @@ __export(index_exports, {
51
51
  zBInvoice: () => zBInvoice,
52
52
  zBPaymentInfo: () => zBPaymentInfo,
53
53
  zBPrivateBooking: () => zBPrivateBooking,
54
+ zBProduct: () => zBProduct,
54
55
  zBReportTicket: () => zBReportTicket,
55
56
  zBSemester: () => zBSemester,
56
57
  zBStudent: () => zBStudent,
@@ -157,7 +158,9 @@ var zBUserInfo = import_zod2.z.object({
157
158
  showOnWhoIsComing: import_zod2.z.boolean().optional(),
158
159
  participateAs: import_zod2.z.enum(["adult", "youth"]).optional(),
159
160
  // Required for youth tournaments
160
- dateOfBirth: import_zod2.z.string().optional()
161
+ dateOfBirth: import_zod2.z.string().optional(),
162
+ // Track the selected user profile
163
+ profileId: import_zod2.z.string().optional()
161
164
  });
162
165
 
163
166
  // src/interface/booking/bookingType.ts
@@ -442,7 +445,7 @@ var zBTeacher = zBUser.extend({
442
445
  * Schools the teacher is affiliated with
443
446
  * Required for showing on the aurora "about" page
444
447
  */
445
- schools: import_zod10.z.array(import_zod10.z.nativeEnum(NYIGSchool)).optional()
448
+ schools: import_zod10.z.array(import_zod10.z.nativeEnum(NYIGSchool)).min(1, "Teachers must be affiliated with at least one school")
446
449
  });
447
450
  var zTeacher = addAutoProps(zBTeacher);
448
451
  var zTeacherResponse = zTeacher.omit({ roles: true, editedBy: true, updatedAt: true, createdAt: true }).extend({
@@ -959,6 +962,15 @@ var zEventReg = addAutoProps(zBEventReg);
959
962
  var zEventRegResponse = zEventReg.extend({
960
963
  tickets: import_zod31.z.array(zEventTicketRegResponse)
961
964
  });
965
+
966
+ // src/interface/products.ts
967
+ var import_zod32 = require("zod");
968
+ var zBProduct = import_zod32.z.object({
969
+ name: import_zod32.z.string().min(1, "Name is required"),
970
+ price: import_zod32.z.number().min(0, "Price cannot be negative"),
971
+ editedBy: import_zod32.z.string().optional()
972
+ });
973
+ var zProduct = addAutoProps(zBProduct);
962
974
  // Annotate the CommonJS export names for ESM import in node:
963
975
  0 && (module.exports = {
964
976
  AgeGroup,
@@ -992,6 +1004,7 @@ var zEventRegResponse = zEventReg.extend({
992
1004
  zBInvoice,
993
1005
  zBPaymentInfo,
994
1006
  zBPrivateBooking,
1007
+ zBProduct,
995
1008
  zBReportTicket,
996
1009
  zBSemester,
997
1010
  zBStudent,
package/index.mjs CHANGED
@@ -48,7 +48,9 @@ var zBUserInfo = z2.object({
48
48
  showOnWhoIsComing: z2.boolean().optional(),
49
49
  participateAs: z2.enum(["adult", "youth"]).optional(),
50
50
  // Required for youth tournaments
51
- dateOfBirth: z2.string().optional()
51
+ dateOfBirth: z2.string().optional(),
52
+ // Track the selected user profile
53
+ profileId: z2.string().optional()
52
54
  });
53
55
 
54
56
  // src/interface/booking/bookingType.ts
@@ -333,7 +335,7 @@ var zBTeacher = zBUser.extend({
333
335
  * Schools the teacher is affiliated with
334
336
  * Required for showing on the aurora "about" page
335
337
  */
336
- schools: z10.array(z10.nativeEnum(NYIGSchool)).optional()
338
+ schools: z10.array(z10.nativeEnum(NYIGSchool)).min(1, "Teachers must be affiliated with at least one school")
337
339
  });
338
340
  var zTeacher = addAutoProps(zBTeacher);
339
341
  var zTeacherResponse = zTeacher.omit({ roles: true, editedBy: true, updatedAt: true, createdAt: true }).extend({
@@ -850,6 +852,15 @@ var zEventReg = addAutoProps(zBEventReg);
850
852
  var zEventRegResponse = zEventReg.extend({
851
853
  tickets: z31.array(zEventTicketRegResponse)
852
854
  });
855
+
856
+ // src/interface/products.ts
857
+ import { z as z32 } from "zod";
858
+ var zBProduct = z32.object({
859
+ name: z32.string().min(1, "Name is required"),
860
+ price: z32.number().min(0, "Price cannot be negative"),
861
+ editedBy: z32.string().optional()
862
+ });
863
+ var zProduct = addAutoProps(zBProduct);
853
864
  export {
854
865
  AgeGroup,
855
866
  AttendState,
@@ -882,6 +893,7 @@ export {
882
893
  zBInvoice,
883
894
  zBPaymentInfo,
884
895
  zBPrivateBooking,
896
+ zBProduct,
885
897
  zBReportTicket,
886
898
  zBSemester,
887
899
  zBStudent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nyig/models",
3
- "version": "0.6.5",
3
+ "version": "0.6.7",
4
4
  "license": "MIT",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",