@carlonicora/nextjs-jsonapi 3.2.0 → 3.3.1
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/dist/{AssistantMessageInterface-Dh0BpbP2.d.ts → AssistantMessageInterface-0zyVingf.d.ts} +1 -1
- package/dist/{AssistantMessageInterface-Ce8FcllX.d.mts → AssistantMessageInterface-ddyG114R.d.mts} +1 -1
- package/dist/{BlockNoteEditor-RGOOSDA2.mjs → BlockNoteEditor-G5A34EXN.mjs} +4 -4
- package/dist/{BlockNoteEditor-G2OSGAKK.js → BlockNoteEditor-JLMXCPGB.js} +19 -19
- package/dist/{BlockNoteEditor-G2OSGAKK.js.map → BlockNoteEditor-JLMXCPGB.js.map} +1 -1
- package/dist/{auth.interface-COmBjh89.d.ts → auth.interface-B6ZQLGjS.d.ts} +1 -1
- package/dist/{auth.interface-CkmZqat3.d.mts → auth.interface-jYD8Gc4P.d.mts} +1 -1
- package/dist/billing/index.js +420 -399
- package/dist/billing/index.js.map +1 -1
- package/dist/billing/index.mjs +25 -4
- package/dist/billing/index.mjs.map +1 -1
- package/dist/{chunk-B6WAWPN3.js → chunk-5AKDE5UW.js} +755 -755
- package/dist/{chunk-B6WAWPN3.js.map → chunk-5AKDE5UW.js.map} +1 -1
- package/dist/{chunk-ZMYZFQN3.mjs → chunk-LCMVARSP.mjs} +2 -2
- package/dist/{chunk-RFOZWANP.mjs → chunk-O4LTJAAM.mjs} +4 -4
- package/dist/{chunk-CGJW7ZZM.mjs → chunk-PGARO3JT.mjs} +7 -1
- package/dist/chunk-PGARO3JT.mjs.map +1 -0
- package/dist/{chunk-H7DOSB7W.js → chunk-UYENG3GT.js} +7 -7
- package/dist/{chunk-H7DOSB7W.js.map → chunk-UYENG3GT.js.map} +1 -1
- package/dist/{chunk-YUXCJ35V.js → chunk-YKFXQOQA.js} +7 -1
- package/dist/chunk-YKFXQOQA.js.map +1 -0
- package/dist/client/index.d.mts +2 -2
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.js +4 -4
- package/dist/client/index.mjs +3 -3
- package/dist/components/index.d.mts +3 -3
- package/dist/components/index.d.ts +3 -3
- package/dist/components/index.js +4 -4
- package/dist/components/index.mjs +3 -3
- package/dist/contexts/index.d.mts +3 -3
- package/dist/contexts/index.d.ts +3 -3
- package/dist/contexts/index.js +4 -4
- package/dist/contexts/index.mjs +3 -3
- package/dist/core/index.d.mts +9 -7
- package/dist/core/index.d.ts +9 -7
- package/dist/core/index.js +2 -2
- package/dist/core/index.mjs +1 -1
- package/dist/features/help/index.js +37 -37
- package/dist/features/help/index.mjs +3 -3
- package/dist/features/tokenusage/index.js +101 -101
- package/dist/features/tokenusage/index.mjs +3 -3
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -3
- package/dist/index.mjs +2 -2
- package/dist/{notification.interface-CG1vqoxg.d.mts → notification.interface-BWOCvKRP.d.mts} +6 -0
- package/dist/{notification.interface--27exGde.d.ts → notification.interface-DYF56CtE.d.ts} +6 -0
- package/dist/{s3.service-Dt6MfuHr.d.mts → s3.service-D_dswjgz.d.mts} +2 -2
- package/dist/{s3.service-CpwA3sl_.d.ts → s3.service-DserU9VK.d.ts} +2 -2
- package/dist/server/index.d.mts +3 -3
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +1 -1
- package/dist/{useSocket-M3YY0aTS.d.mts → useSocket-BZG9oX-L.d.mts} +1 -1
- package/dist/{useSocket-DgGAQW6h.d.ts → useSocket-CiyTtYFj.d.ts} +1 -1
- package/package.json +2 -2
- package/src/features/billing/stripe-price/components/forms/PriceEditor.tsx +25 -1
- package/src/features/company/data/company.interface.ts +7 -0
- package/src/features/company/data/company.test.ts +40 -0
- package/src/features/company/data/company.ts +7 -0
- package/dist/chunk-CGJW7ZZM.mjs.map +0 -1
- package/dist/chunk-YUXCJ35V.js.map +0 -1
- /package/dist/{BlockNoteEditor-RGOOSDA2.mjs.map → BlockNoteEditor-G5A34EXN.mjs.map} +0 -0
- /package/dist/{chunk-ZMYZFQN3.mjs.map → chunk-LCMVARSP.mjs.map} +0 -0
- /package/dist/{chunk-RFOZWANP.mjs.map → chunk-O4LTJAAM.mjs.map} +0 -0
package/dist/billing/index.mjs
CHANGED
|
@@ -62,12 +62,12 @@ import {
|
|
|
62
62
|
useCurrentUserContext,
|
|
63
63
|
useDataListRetriever,
|
|
64
64
|
usePageUrlGenerator
|
|
65
|
-
} from "../chunk-
|
|
65
|
+
} from "../chunk-O4LTJAAM.mjs";
|
|
66
66
|
import {
|
|
67
67
|
getRoleId,
|
|
68
68
|
getStripePublishableKey,
|
|
69
69
|
useI18nRouter
|
|
70
|
-
} from "../chunk-
|
|
70
|
+
} from "../chunk-LCMVARSP.mjs";
|
|
71
71
|
import {
|
|
72
72
|
FeatureService,
|
|
73
73
|
Modules,
|
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
StripeUsageService,
|
|
81
81
|
cn,
|
|
82
82
|
rehydrate
|
|
83
|
-
} from "../chunk-
|
|
83
|
+
} from "../chunk-PGARO3JT.mjs";
|
|
84
84
|
import "../chunk-AUXK7QSA.mjs";
|
|
85
85
|
import "../chunk-C7C7VY4F.mjs";
|
|
86
86
|
import "../chunk-CMGXH5SA.mjs";
|
|
@@ -3181,7 +3181,28 @@ function PriceEditorInternal({
|
|
|
3181
3181
|
isTrial: z2.boolean(),
|
|
3182
3182
|
description: z2.string().optional(),
|
|
3183
3183
|
features: z2.array(z2.string()),
|
|
3184
|
-
|
|
3184
|
+
// Normalised, not a bare `z.string()`: the field renders as
|
|
3185
|
+
// `<FormInput type="number">`, which hands back a number, so a plain
|
|
3186
|
+
// string schema rejects every value with "expected string, received
|
|
3187
|
+
// number".
|
|
3188
|
+
//
|
|
3189
|
+
// Normalised by hand rather than with `z.coerce.string()`, because
|
|
3190
|
+
// zod 4's coercion is `String(input)` — a cleared number input yields
|
|
3191
|
+
// NaN, which would become the TRUTHY string "NaN" and reach
|
|
3192
|
+
// `parseInt` as a NaN token.
|
|
3193
|
+
//
|
|
3194
|
+
// Deliberately NOT converted to the `z.preprocess(... z.number())`
|
|
3195
|
+
// idiom used by unitAmount/intervalCount above. The whole token
|
|
3196
|
+
// pipeline is string-based — seeded with `.toString()` and read back
|
|
3197
|
+
// with `values.token ? parseInt(...)` on both submit branches — and a
|
|
3198
|
+
// number pipeline would make `0` FALSY, silently dropping the token
|
|
3199
|
+
// from the payload. A price with no token is "tokens not configured"
|
|
3200
|
+
// (AI stays enabled), so that would make a zero-token / no-AI plan
|
|
3201
|
+
// impossible to create from this form.
|
|
3202
|
+
token: z2.preprocess(
|
|
3203
|
+
(value) => value === void 0 || value === null || value === "" || typeof value === "number" && Number.isNaN(value) ? "" : String(value),
|
|
3204
|
+
z2.string()
|
|
3205
|
+
),
|
|
3185
3206
|
featureIds: z2.array(z2.string())
|
|
3186
3207
|
}),
|
|
3187
3208
|
[t]
|