@nyig/models 0.4.2 → 0.4.4

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.
Files changed (3) hide show
  1. package/index.js +4 -4
  2. package/index.mjs +4 -4
  3. package/package.json +7 -7
package/index.js CHANGED
@@ -110,7 +110,7 @@ var zBPaymentInfo = import_zod.z.object({
110
110
  /**
111
111
  * @units CENTS - Proposed payment amount in cents of the booking
112
112
  */
113
- paymentAmount: import_zod.z.number().int().min(1),
113
+ paymentAmount: import_zod.z.number().int().min(0),
114
114
  /**
115
115
  * True if the payment has been received. Populated by webhook.
116
116
  */
@@ -430,7 +430,7 @@ var Season = /* @__PURE__ */ ((Season2) => {
430
430
  var import_zod12 = require("zod");
431
431
  var zBSemester = import_zod12.z.object({
432
432
  season: import_zod12.z.nativeEnum(Season),
433
- year: import_zod12.z.number().min(2022).max(2999),
433
+ year: import_zod12.z.coerce.number().min(2022).max(2999),
434
434
  startDate: import_zod12.z.coerce.date(),
435
435
  endDate: import_zod12.z.coerce.date(),
436
436
  /**
@@ -731,11 +731,11 @@ var import_zod29 = require("zod");
731
731
  // src/interface/event/eTicket.ts
732
732
  var import_zod27 = require("zod");
733
733
  var zBEventTicket = import_zod27.z.object({
734
- name: import_zod27.z.string().min(5, "Name must be at least 5 characters"),
734
+ name: import_zod27.z.string().min(4, "Name must be at least 4 characters"),
735
735
  /**
736
736
  * Price in cents
737
737
  */
738
- price: import_zod27.z.number().min(1, "Price must be at least $1"),
738
+ price: import_zod27.z.coerce.number().min(0, "Price must not be negative"),
739
739
  /**
740
740
  * @optional description of the ticket
741
741
  */
package/index.mjs CHANGED
@@ -4,7 +4,7 @@ var zBPaymentInfo = z.object({
4
4
  /**
5
5
  * @units CENTS - Proposed payment amount in cents of the booking
6
6
  */
7
- paymentAmount: z.number().int().min(1),
7
+ paymentAmount: z.number().int().min(0),
8
8
  /**
9
9
  * True if the payment has been received. Populated by webhook.
10
10
  */
@@ -324,7 +324,7 @@ var Season = /* @__PURE__ */ ((Season2) => {
324
324
  import { z as z12 } from "zod";
325
325
  var zBSemester = z12.object({
326
326
  season: z12.nativeEnum(Season),
327
- year: z12.number().min(2022).max(2999),
327
+ year: z12.coerce.number().min(2022).max(2999),
328
328
  startDate: z12.coerce.date(),
329
329
  endDate: z12.coerce.date(),
330
330
  /**
@@ -625,11 +625,11 @@ import { z as z29 } from "zod";
625
625
  // src/interface/event/eTicket.ts
626
626
  import { z as z27 } from "zod";
627
627
  var zBEventTicket = z27.object({
628
- name: z27.string().min(5, "Name must be at least 5 characters"),
628
+ name: z27.string().min(4, "Name must be at least 4 characters"),
629
629
  /**
630
630
  * Price in cents
631
631
  */
632
- price: z27.number().min(1, "Price must be at least $1"),
632
+ price: z27.coerce.number().min(0, "Price must not be negative"),
633
633
  /**
634
634
  * @optional description of the ticket
635
635
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nyig/models",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "license": "MIT",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",
@@ -9,12 +9,12 @@
9
9
  "zod": ">=3.22.4"
10
10
  },
11
11
  "devDependencies": {
12
- "@changesets/cli": "^2.27.1",
13
- "husky": "^9.0.10",
14
- "lint-staged": "^15.2.2",
15
- "prettier": "^3.2.5",
16
- "tsup": "^8.0.2",
17
- "typescript": "^5.3.3"
12
+ "@changesets/cli": "^2.27.7",
13
+ "husky": "^9.1.4",
14
+ "lint-staged": "^15.2.7",
15
+ "prettier": "^3.3.3",
16
+ "tsup": "^8.2.3",
17
+ "typescript": "^5.5.4"
18
18
  },
19
19
  "lint-staged": {
20
20
  "*.{js,ts,md}": "prettier --write"