diff --git a/package-lock.json b/package-lock.json index 0ad464e..da6ae2e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,7 @@ "peerDependencies": { "luxon": "^3.5.0", "typescript": "^5.7.3", - "zod": "3.25.76" + "zod": "4.0.14" } }, "node_modules/@babel/helper-string-parser": { @@ -5837,9 +5837,9 @@ } }, "node_modules/zod": { - "version": "3.25.76", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", - "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.0.14.tgz", + "integrity": "sha512-nGFJTnJN6cM2v9kXL+SOBq3AtjQby3Mv5ySGFof5UGRHrRioSJ5iG680cYNjE/yWk671nROcpPj4hAS8nyLhSw==", "license": "MIT", "peer": true, "funding": { diff --git a/package.json b/package.json index f440f21..6720946 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "peerDependencies": { "luxon": "^3.5.0", "typescript": "^5.7.3", - "zod": "3.25.76" + "zod": "4.0.14" }, "dependencies": { "radashi": "^12.6.0" diff --git a/src/schemas/pricing.ts b/src/schemas/pricing.ts index 38753f8..a8ec4cf 100644 --- a/src/schemas/pricing.ts +++ b/src/schemas/pricing.ts @@ -20,12 +20,12 @@ export const tierMapSchema = z.object({ better: tierDetailsRawSchema, best: tierDetailsRawSchema }); -export const tierIds = Object.keys(tierMapSchema.shape) as Array>; +export const tierIds = Object.keys(tierMapSchema.shape) as ReadonlyArray>; export const topupMapSchema = z.object({ single: productRawSchema }); -export const topupIds = Object.keys(topupMapSchema.shape) as Array>; +export const topupIds = Object.keys(topupMapSchema.shape) as ReadonlyArray>; export const customerPortalFlowTypeSchema = z.enum([ 'subscription_cancel', diff --git a/src/types/pricing.ts b/src/types/pricing.ts index fa5f16c..a50d7e3 100644 --- a/src/types/pricing.ts +++ b/src/types/pricing.ts @@ -7,13 +7,13 @@ import type { } from '@schemas'; import type z from 'zod'; -export type TierId = keyof z.input; +export type TierId = keyof z.infer; export type Tier = z.infer; export type TierMap = { [K in TierId]: Tier; }; -export type TopupId = keyof z.input; +export type TopupId = keyof z.infer; export type Topup = z.infer; export type TopupMap = { [K in TopupId]: Topup;