autumn-js 0.0.111 → 0.0.113
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/libraries/backend/better-auth.js +2 -2
- package/dist/libraries/backend/better-auth.mjs +7 -7
- package/dist/libraries/backend/{chunk-DMHG3POG.mjs → chunk-74THWZUU.mjs} +6 -6
- package/dist/libraries/backend/{chunk-BV3SY6BB.mjs → chunk-B5EK655Y.mjs} +1 -1
- package/dist/libraries/backend/{chunk-26E2Z26Q.mjs → chunk-BNRLG2NJ.mjs} +2 -2
- package/dist/libraries/backend/{chunk-YTCNYNTM.mjs → chunk-C342MVRJ.mjs} +1 -1
- package/dist/libraries/backend/{chunk-XEHT6LRT.mjs → chunk-EUAZMSHG.mjs} +1 -1
- package/dist/libraries/backend/{chunk-TWERY4S2.mjs → chunk-NBQSYUOH.mjs} +1 -1
- package/dist/libraries/backend/{chunk-CLW3UTC5.mjs → chunk-ZHA3DHVC.mjs} +1 -1
- package/dist/libraries/backend/convex.js +2 -2
- package/dist/libraries/backend/convex.mjs +7 -7
- package/dist/libraries/backend/elysia.js +2 -2
- package/dist/libraries/backend/elysia.mjs +7 -7
- package/dist/libraries/backend/express.d.mts +1 -1
- package/dist/libraries/backend/express.d.ts +1 -1
- package/dist/libraries/backend/express.js +2 -2
- package/dist/libraries/backend/express.mjs +7 -7
- package/dist/libraries/backend/fastify.js +2 -2
- package/dist/libraries/backend/fastify.mjs +7 -7
- package/dist/libraries/backend/hono.js +2 -2
- package/dist/libraries/backend/hono.mjs +7 -7
- package/dist/libraries/backend/next.d.mts +3 -3
- package/dist/libraries/backend/next.d.ts +3 -3
- package/dist/libraries/backend/next.js +30 -8
- package/dist/libraries/backend/next.mjs +35 -13
- package/dist/libraries/backend/react-router.js +2 -2
- package/dist/libraries/backend/react-router.mjs +7 -7
- package/dist/libraries/backend/{referralTypes-C9zChWVP.d.mts → referralTypes-COVVwj-1.d.mts} +12 -12
- package/dist/libraries/backend/{referralTypes-DuBjp_OL.d.ts → referralTypes-qMay-K9l.d.ts} +12 -12
- package/dist/libraries/backend/remix_dep.js +2 -2
- package/dist/libraries/backend/remix_dep.mjs +7 -7
- package/dist/libraries/backend/routes/backendRouter.js +2 -2
- package/dist/libraries/backend/routes/backendRouter.mjs +7 -7
- package/dist/libraries/backend/routes/entityRoutes.js +2 -2
- package/dist/libraries/backend/routes/entityRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/genRoutes.js +2 -2
- package/dist/libraries/backend/routes/genRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/productRoutes.js +2 -2
- package/dist/libraries/backend/routes/productRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/referralRoutes.js +2 -2
- package/dist/libraries/backend/routes/referralRoutes.mjs +3 -3
- package/dist/libraries/backend/supabase.js +2 -2
- package/dist/libraries/backend/supabase.mjs +7 -7
- package/dist/libraries/backend/tanstack.js +2 -2
- package/dist/libraries/backend/tanstack.mjs +7 -7
- package/dist/libraries/backend/utils/backendRes.js +2 -2
- package/dist/libraries/backend/utils/backendRes.mjs +1 -1
- package/dist/libraries/backend/utils/withAuth.d.mts +1 -1
- package/dist/libraries/backend/utils/withAuth.d.ts +1 -1
- package/dist/libraries/backend/utils/withAuth.js +2 -2
- package/dist/libraries/backend/utils/withAuth.mjs +2 -2
- package/dist/libraries/react/AutumnContext.d.mts +6 -6
- package/dist/libraries/react/AutumnContext.d.ts +6 -6
- package/dist/libraries/react/AutumnContext.js +2 -2
- package/dist/libraries/react/AutumnContext.mjs +8 -8
- package/dist/libraries/react/BaseAutumnProvider.d.mts +6 -6
- package/dist/libraries/react/BaseAutumnProvider.d.ts +6 -6
- package/dist/libraries/react/BaseAutumnProvider.js +7 -3
- package/dist/libraries/react/BaseAutumnProvider.mjs +13 -13
- package/dist/libraries/react/{ReactAutumnClient-BW-6a3gM.d.ts → ReactAutumnClient-BNcDsxYe.d.ts} +8 -8
- package/dist/libraries/react/{ReactAutumnClient-Cs9voLwk.d.mts → ReactAutumnClient-Bm0Y_zzP.d.mts} +8 -8
- package/dist/libraries/react/ReactAutumnProvider.d.mts +2 -2
- package/dist/libraries/react/ReactAutumnProvider.d.ts +2 -2
- package/dist/libraries/react/ReactAutumnProvider.js +7 -3
- package/dist/libraries/react/ReactAutumnProvider.mjs +14 -14
- package/dist/{next/client/attachTypes-Pf0NPwsI.d.mts → libraries/react/attachTypes-BQzswBtK.d.mts} +7 -7
- package/dist/{next/client/attachTypes-DM5XWLRr.d.ts → libraries/react/attachTypes-DIsESO5Y.d.ts} +7 -7
- package/dist/libraries/react/{chunk-THV76QT6.mjs → chunk-3C7OO2N3.mjs} +1 -1
- package/dist/libraries/react/{chunk-AGQVYTPY.mjs → chunk-4NIALZY6.mjs} +28 -28
- package/dist/libraries/react/{chunk-673LDIYO.mjs → chunk-4X4TKILZ.mjs} +3 -3
- package/dist/libraries/react/{chunk-WR2HU2B2.mjs → chunk-CYFC6BOH.mjs} +3 -3
- package/dist/libraries/react/{chunk-UJHH6JP6.mjs → chunk-DDYSMKLY.mjs} +1 -1
- package/dist/libraries/react/{chunk-7BVXQ3DF.mjs → chunk-DGBYTZLQ.mjs} +2 -2
- package/dist/libraries/react/{chunk-YN4HCDGX.mjs → chunk-EGPEAPRK.mjs} +2 -2
- package/dist/libraries/react/{chunk-EEEUDTTP.mjs → chunk-F324RNGU.mjs} +17 -17
- package/dist/libraries/react/{chunk-D3GL2QV3.mjs → chunk-GUZH4TKK.mjs} +2 -2
- package/dist/libraries/react/{chunk-CQD37NSX.mjs → chunk-HDMOJP3E.mjs} +1 -1
- package/dist/libraries/react/{chunk-6ZY2HQCJ.mjs → chunk-JP6WLDHX.mjs} +2 -2
- package/dist/libraries/react/{chunk-S7DJFJ6P.mjs → chunk-PLGLCII4.mjs} +2 -2
- package/dist/libraries/react/{chunk-J7CZEH52.mjs → chunk-PRFT4OKG.mjs} +1 -1
- package/dist/libraries/react/{chunk-TL2F3PPG.mjs → chunk-QEKHWOGC.mjs} +1 -1
- package/dist/libraries/react/{chunk-CK7IHYXM.mjs → chunk-QMOLXJIH.mjs} +3 -3
- package/dist/libraries/react/{chunk-KX42ZLE6.mjs → chunk-RL47UQK4.mjs} +6 -2
- package/dist/libraries/react/client/ReactAutumnClient.d.mts +6 -6
- package/dist/libraries/react/client/ReactAutumnClient.d.ts +6 -6
- package/dist/libraries/react/client/ReactAutumnClient.js +2 -2
- package/dist/libraries/react/client/ReactAutumnClient.mjs +7 -7
- package/dist/libraries/react/client/clientCompMethods.d.mts +6 -6
- package/dist/libraries/react/client/clientCompMethods.d.ts +6 -6
- package/dist/libraries/react/client/clientCusMethods.d.mts +6 -6
- package/dist/libraries/react/client/clientCusMethods.d.ts +6 -6
- package/dist/libraries/react/client/clientEntityMethods.d.mts +6 -6
- package/dist/libraries/react/client/clientEntityMethods.d.ts +6 -6
- package/dist/libraries/react/client/clientGenMethods.d.mts +6 -6
- package/dist/libraries/react/client/clientGenMethods.d.ts +6 -6
- package/dist/libraries/react/client/clientProdMethods.d.mts +6 -6
- package/dist/libraries/react/client/clientProdMethods.d.ts +6 -6
- package/dist/libraries/react/client/clientReferralMethods.d.mts +6 -6
- package/dist/libraries/react/client/clientReferralMethods.d.ts +6 -6
- package/dist/libraries/react/client/types/clientGenTypes.js +2 -2
- package/dist/libraries/react/client/types/clientGenTypes.mjs +1 -1
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.mts +2 -2
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.ts +2 -2
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.js +7 -3
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.mjs +29 -29
- package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.mts +2 -2
- package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.ts +2 -2
- package/dist/libraries/react/components/check-dialog/check-dialog-synced.js +2 -2
- package/dist/libraries/react/components/check-dialog/check-dialog-synced.mjs +29 -29
- package/dist/libraries/react/components/check-dialog/lib/check-content.d.mts +1 -1
- package/dist/libraries/react/components/check-dialog/lib/check-content.d.ts +1 -1
- package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.d.mts +1 -1
- package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.d.ts +1 -1
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.mts +1 -1
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.ts +1 -1
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.js +7 -3
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +29 -29
- package/dist/libraries/react/components/ui/button.d.mts +1 -1
- package/dist/libraries/react/components/ui/button.d.ts +1 -1
- package/dist/libraries/react/components/ui/dialog.mjs +2 -2
- package/dist/libraries/react/{cusTypes-BnKb-vxP.d.mts → cusTypes-CI8GNjww.d.mts} +11 -11
- package/dist/libraries/react/{cusTypes-CWMup6bJ.d.ts → cusTypes-CwLJs1D1.d.ts} +11 -11
- package/dist/libraries/react/{entTypes-B0UaW3Jh.d.ts → entTypes-ByG7ZqG-.d.ts} +1 -1
- package/dist/libraries/react/{entTypes-BqZEH0S_.d.mts → entTypes-Kh8o7OKO.d.mts} +1 -1
- package/dist/libraries/react/{genTypes-DufheKvo.d.mts → genTypes-BjDGPkYi.d.mts} +5 -5
- package/dist/libraries/react/{genTypes-CNkoakWD.d.ts → genTypes-CtkYtnSx.d.ts} +5 -5
- package/dist/libraries/react/hooks/helpers/handleCheck.d.mts +6 -6
- package/dist/libraries/react/hooks/helpers/handleCheck.d.ts +6 -6
- package/dist/libraries/react/hooks/helpers/handleCheck.js +7 -3
- package/dist/libraries/react/hooks/helpers/handleCheck.mjs +2 -2
- package/dist/libraries/react/hooks/helpers/useAutumnBase.d.mts +6 -6
- package/dist/libraries/react/hooks/helpers/useAutumnBase.d.ts +6 -6
- package/dist/libraries/react/hooks/helpers/useAutumnBase.js +2 -2
- package/dist/libraries/react/hooks/helpers/useAutumnBase.mjs +3 -3
- package/dist/libraries/react/hooks/useAnalytics.d.mts +2 -2
- package/dist/libraries/react/hooks/useAnalytics.d.ts +2 -2
- package/dist/libraries/react/hooks/useAnalytics.js +2 -2
- package/dist/libraries/react/hooks/useAnalytics.mjs +9 -9
- package/dist/libraries/react/hooks/useCustomer.d.mts +6 -6
- package/dist/libraries/react/hooks/useCustomer.d.ts +6 -6
- package/dist/libraries/react/hooks/useCustomer.js +7 -3
- package/dist/libraries/react/hooks/useCustomer.mjs +13 -13
- package/dist/libraries/react/hooks/useCustomerBase.d.mts +6 -6
- package/dist/libraries/react/hooks/useCustomerBase.d.ts +6 -6
- package/dist/libraries/react/hooks/useCustomerBase.js +7 -3
- package/dist/libraries/react/hooks/useCustomerBase.mjs +12 -12
- package/dist/libraries/react/hooks/useEntity.d.mts +4 -4
- package/dist/libraries/react/hooks/useEntity.d.ts +4 -4
- package/dist/libraries/react/hooks/useEntity.js +7 -3
- package/dist/libraries/react/hooks/useEntity.mjs +13 -13
- package/dist/libraries/react/hooks/useEntityBase.d.mts +6 -6
- package/dist/libraries/react/hooks/useEntityBase.d.ts +6 -6
- package/dist/libraries/react/hooks/useEntityBase.js +7 -3
- package/dist/libraries/react/hooks/useEntityBase.mjs +12 -12
- package/dist/libraries/react/hooks/usePaywall.d.mts +1 -1
- package/dist/libraries/react/hooks/usePaywall.d.ts +1 -1
- package/dist/libraries/react/hooks/usePaywall.js +2 -2
- package/dist/libraries/react/hooks/usePaywall.mjs +9 -9
- package/dist/libraries/react/hooks/usePricingTable.d.mts +1 -1
- package/dist/libraries/react/hooks/usePricingTable.d.ts +1 -1
- package/dist/libraries/react/hooks/usePricingTable.js +2 -2
- package/dist/libraries/react/hooks/usePricingTable.mjs +10 -10
- package/dist/libraries/react/hooks/usePricingTableBase.d.mts +6 -6
- package/dist/libraries/react/hooks/usePricingTableBase.d.ts +6 -6
- package/dist/libraries/react/hooks/usePricingTableBase.js +2 -2
- package/dist/libraries/react/hooks/usePricingTableBase.mjs +2 -2
- package/dist/libraries/react/hooks/useProductsBase.d.mts +6 -6
- package/dist/libraries/react/hooks/useProductsBase.d.ts +6 -6
- package/dist/libraries/react/index.d.mts +12 -12
- package/dist/libraries/react/index.d.ts +12 -12
- package/dist/libraries/react/index.js +7 -3
- package/dist/libraries/react/index.mjs +7 -3
- package/dist/libraries/react/{prodTypes-BlLYTHoR.d.mts → prodTypes-Y1CLtmfa.d.mts} +9 -9
- package/dist/libraries/react/{prodTypes-BlLYTHoR.d.ts → prodTypes-Y1CLtmfa.d.ts} +9 -9
- package/dist/next/AutumnProvider.d.mts +37 -3
- package/dist/next/AutumnProvider.d.ts +37 -3
- package/dist/next/client/NextAutumnClient.d.mts +5 -5
- package/dist/next/client/NextAutumnClient.d.ts +5 -5
- package/dist/next/client/NextAutumnProvider.d.mts +2 -2
- package/dist/next/client/NextAutumnProvider.d.ts +2 -2
- package/dist/{libraries/react/attachTypes-DWeMSBmL.d.ts → next/client/attachTypes-CACw68CG.d.ts} +5 -5
- package/dist/{libraries/react/attachTypes-4AuOXG1E.d.mts → next/client/attachTypes-DFz8xggN.d.mts} +5 -5
- package/dist/next/client/{clientAttachTypes-BeoVoLvx.d.ts → clientAttachTypes-Chgx4uq1.d.ts} +1 -1
- package/dist/next/client/{clientAttachTypes-CWF6N5NJ.d.mts → clientAttachTypes-CsHcLMla.d.mts} +1 -1
- package/dist/next/client/clientUtils.d.mts +3 -3
- package/dist/next/client/clientUtils.d.ts +3 -3
- package/dist/next/client/{cusTypes-Dv_i9zPh.d.mts → cusTypes-C9G9xqQj.d.ts} +7 -7
- package/dist/next/client/{cusTypes-QmO8mj7R.d.ts → cusTypes-CfOlwucH.d.mts} +7 -7
- package/dist/next/client/{entTypes-CKUB-m_4.d.mts → entTypes-BF3ut9It.d.mts} +1 -1
- package/dist/next/client/{entTypes-DTHm0Be2.d.ts → entTypes-_335WLpv.d.ts} +1 -1
- package/dist/next/client/hooks/useAutumn.d.mts +4 -4
- package/dist/next/client/hooks/useAutumn.d.ts +4 -4
- package/dist/next/client/hooks/useCustomer.d.mts +5 -5
- package/dist/next/client/hooks/useCustomer.d.ts +5 -5
- package/dist/next/client/hooks/useEntity.d.mts +4 -4
- package/dist/next/client/hooks/useEntity.d.ts +4 -4
- package/dist/next/client/hooks/usePricingTable.d.mts +1 -1
- package/dist/next/client/hooks/usePricingTable.d.ts +1 -1
- package/dist/next/client/{prodTypes-CCk7TL_t.d.mts → prodTypes-CYd9Q1Rw.d.mts} +6 -6
- package/dist/next/client/{prodTypes-CCk7TL_t.d.ts → prodTypes-CYd9Q1Rw.d.ts} +6 -6
- package/dist/next/client/types.d.mts +3 -3
- package/dist/next/client/types.d.ts +3 -3
- package/dist/next/index.d.mts +4 -660
- package/dist/next/index.d.ts +4 -660
- package/dist/next/index.js +0 -21
- package/dist/next/index.mjs +0 -10
- package/dist/next/server/auth/withNextAuth.d.mts +1 -1
- package/dist/next/server/auth/withNextAuth.d.ts +1 -1
- package/dist/next/server/componentActions.d.mts +1 -1
- package/dist/next/server/componentActions.d.ts +1 -1
- package/dist/next/server/cusActions.d.mts +1 -1
- package/dist/next/server/cusActions.d.ts +1 -1
- package/dist/next/server/{cusTypes-d13IMtrx.d.mts → cusTypes-PcPWkSme.d.mts} +12 -12
- package/dist/next/server/{cusTypes-d13IMtrx.d.ts → cusTypes-PcPWkSme.d.ts} +12 -12
- package/dist/next/server/genActions.d.mts +1 -1
- package/dist/next/server/genActions.d.ts +1 -1
- package/dist/sdk/index.d.mts +12 -12
- package/dist/sdk/index.d.ts +12 -12
- package/dist/sdk/index.js +2 -2
- package/dist/sdk/index.mjs +2 -2
- package/dist/utils/encryptUtils.js +2 -2
- package/dist/utils/encryptUtils.mjs +2 -2
- package/package.json +1 -1
- package/dist/next/AutumnProvider-BGyIGvAS.d.mts +0 -421
- package/dist/next/AutumnProvider-BGyIGvAS.d.ts +0 -421
- package/dist/libraries/react/{chunk-W5N4PVQU.mjs → chunk-TX3X2LDE.mjs} +3 -3
|
@@ -4,7 +4,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
4
4
|
|
|
5
5
|
declare const buttonVariants: (props?: ({
|
|
6
6
|
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
7
|
-
size?: "
|
|
7
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
10
10
|
asChild?: boolean;
|
|
@@ -4,7 +4,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
4
4
|
|
|
5
5
|
declare const buttonVariants: (props?: ({
|
|
6
6
|
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
7
|
-
size?: "
|
|
7
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
10
10
|
asChild?: boolean;
|
|
@@ -12,9 +12,9 @@ import {
|
|
|
12
12
|
DialogPortal,
|
|
13
13
|
DialogTitle,
|
|
14
14
|
DialogTrigger
|
|
15
|
-
} from "../../chunk-
|
|
16
|
-
import "../../chunk-KWNH6C27.mjs";
|
|
15
|
+
} from "../../chunk-TX3X2LDE.mjs";
|
|
17
16
|
import "../../chunk-QJPZFEVW.mjs";
|
|
17
|
+
import "../../chunk-KWNH6C27.mjs";
|
|
18
18
|
import "../../chunk-RPEGNKJH.mjs";
|
|
19
19
|
import "../../chunk-4J6OC4ZQ.mjs";
|
|
20
20
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AppEnv,
|
|
1
|
+
import { A as AppEnv, c as ProductItem, d as ProductItemInterval } from './prodTypes-Y1CLtmfa.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
declare enum ProductStatus {
|
|
@@ -13,10 +13,10 @@ type CustomerExpandOption = "invoices" | "rewards" | "trials_used" | "entities"
|
|
|
13
13
|
declare const CoreCusFeatureSchema: z.ZodObject<{
|
|
14
14
|
unlimited: z.ZodOptional<z.ZodBoolean>;
|
|
15
15
|
interval: z.ZodOptional<z.ZodNativeEnum<typeof ProductItemInterval>>;
|
|
16
|
-
balance: z.ZodOptional<z.ZodNumber
|
|
16
|
+
balance: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
17
17
|
usage: z.ZodOptional<z.ZodNumber>;
|
|
18
18
|
included_usage: z.ZodOptional<z.ZodNumber>;
|
|
19
|
-
next_reset_at: z.ZodOptional<z.ZodNumber
|
|
19
|
+
next_reset_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
20
20
|
overage_allowed: z.ZodOptional<z.ZodBoolean>;
|
|
21
21
|
usage_limit: z.ZodOptional<z.ZodNumber>;
|
|
22
22
|
breakdown: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -52,10 +52,10 @@ declare const CoreCusFeatureSchema: z.ZodObject<{
|
|
|
52
52
|
usage_limit?: number | undefined;
|
|
53
53
|
unlimited?: boolean | undefined;
|
|
54
54
|
interval?: ProductItemInterval | undefined;
|
|
55
|
-
balance?: number | undefined;
|
|
55
|
+
balance?: number | null | undefined;
|
|
56
56
|
usage?: number | undefined;
|
|
57
57
|
included_usage?: number | undefined;
|
|
58
|
-
next_reset_at?: number | undefined;
|
|
58
|
+
next_reset_at?: number | null | undefined;
|
|
59
59
|
overage_allowed?: boolean | undefined;
|
|
60
60
|
breakdown?: {
|
|
61
61
|
interval: ProductItemInterval;
|
|
@@ -72,10 +72,10 @@ declare const CoreCusFeatureSchema: z.ZodObject<{
|
|
|
72
72
|
usage_limit?: number | undefined;
|
|
73
73
|
unlimited?: boolean | undefined;
|
|
74
74
|
interval?: ProductItemInterval | undefined;
|
|
75
|
-
balance?: number | undefined;
|
|
75
|
+
balance?: number | null | undefined;
|
|
76
76
|
usage?: number | undefined;
|
|
77
77
|
included_usage?: number | undefined;
|
|
78
|
-
next_reset_at?: number | undefined;
|
|
78
|
+
next_reset_at?: number | null | undefined;
|
|
79
79
|
overage_allowed?: boolean | undefined;
|
|
80
80
|
breakdown?: {
|
|
81
81
|
interval: ProductItemInterval;
|
|
@@ -130,12 +130,12 @@ declare const CustomerDataSchema: z.ZodObject<{
|
|
|
130
130
|
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
131
131
|
fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
132
132
|
}, "strip", z.ZodTypeAny, {
|
|
133
|
-
name?: string | null | undefined;
|
|
134
133
|
email?: string | null | undefined;
|
|
134
|
+
name?: string | null | undefined;
|
|
135
135
|
fingerprint?: string | null | undefined;
|
|
136
136
|
}, {
|
|
137
|
-
name?: string | null | undefined;
|
|
138
137
|
email?: string | null | undefined;
|
|
138
|
+
name?: string | null | undefined;
|
|
139
139
|
fingerprint?: string | null | undefined;
|
|
140
140
|
}>;
|
|
141
141
|
type CustomerData = z.infer<typeof CustomerDataSchema>;
|
|
@@ -147,16 +147,16 @@ declare const CreateCustomerParamsSchema: z.ZodObject<{
|
|
|
147
147
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
148
148
|
expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
|
|
149
149
|
}, "strip", z.ZodTypeAny, {
|
|
150
|
-
name?: string | null | undefined;
|
|
151
150
|
id?: string | null | undefined;
|
|
152
151
|
email?: string | null | undefined;
|
|
152
|
+
name?: string | null | undefined;
|
|
153
153
|
fingerprint?: string | null | undefined;
|
|
154
154
|
metadata?: Record<string, any> | undefined;
|
|
155
155
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
156
156
|
}, {
|
|
157
|
-
name?: string | null | undefined;
|
|
158
157
|
id?: string | null | undefined;
|
|
159
158
|
email?: string | null | undefined;
|
|
159
|
+
name?: string | null | undefined;
|
|
160
160
|
fingerprint?: string | null | undefined;
|
|
161
161
|
metadata?: Record<string, any> | undefined;
|
|
162
162
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AppEnv,
|
|
1
|
+
import { A as AppEnv, c as ProductItem, d as ProductItemInterval } from './prodTypes-Y1CLtmfa.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
declare enum ProductStatus {
|
|
@@ -13,10 +13,10 @@ type CustomerExpandOption = "invoices" | "rewards" | "trials_used" | "entities"
|
|
|
13
13
|
declare const CoreCusFeatureSchema: z.ZodObject<{
|
|
14
14
|
unlimited: z.ZodOptional<z.ZodBoolean>;
|
|
15
15
|
interval: z.ZodOptional<z.ZodNativeEnum<typeof ProductItemInterval>>;
|
|
16
|
-
balance: z.ZodOptional<z.ZodNumber
|
|
16
|
+
balance: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
17
17
|
usage: z.ZodOptional<z.ZodNumber>;
|
|
18
18
|
included_usage: z.ZodOptional<z.ZodNumber>;
|
|
19
|
-
next_reset_at: z.ZodOptional<z.ZodNumber
|
|
19
|
+
next_reset_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
20
20
|
overage_allowed: z.ZodOptional<z.ZodBoolean>;
|
|
21
21
|
usage_limit: z.ZodOptional<z.ZodNumber>;
|
|
22
22
|
breakdown: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -52,10 +52,10 @@ declare const CoreCusFeatureSchema: z.ZodObject<{
|
|
|
52
52
|
usage_limit?: number | undefined;
|
|
53
53
|
unlimited?: boolean | undefined;
|
|
54
54
|
interval?: ProductItemInterval | undefined;
|
|
55
|
-
balance?: number | undefined;
|
|
55
|
+
balance?: number | null | undefined;
|
|
56
56
|
usage?: number | undefined;
|
|
57
57
|
included_usage?: number | undefined;
|
|
58
|
-
next_reset_at?: number | undefined;
|
|
58
|
+
next_reset_at?: number | null | undefined;
|
|
59
59
|
overage_allowed?: boolean | undefined;
|
|
60
60
|
breakdown?: {
|
|
61
61
|
interval: ProductItemInterval;
|
|
@@ -72,10 +72,10 @@ declare const CoreCusFeatureSchema: z.ZodObject<{
|
|
|
72
72
|
usage_limit?: number | undefined;
|
|
73
73
|
unlimited?: boolean | undefined;
|
|
74
74
|
interval?: ProductItemInterval | undefined;
|
|
75
|
-
balance?: number | undefined;
|
|
75
|
+
balance?: number | null | undefined;
|
|
76
76
|
usage?: number | undefined;
|
|
77
77
|
included_usage?: number | undefined;
|
|
78
|
-
next_reset_at?: number | undefined;
|
|
78
|
+
next_reset_at?: number | null | undefined;
|
|
79
79
|
overage_allowed?: boolean | undefined;
|
|
80
80
|
breakdown?: {
|
|
81
81
|
interval: ProductItemInterval;
|
|
@@ -130,12 +130,12 @@ declare const CustomerDataSchema: z.ZodObject<{
|
|
|
130
130
|
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
131
131
|
fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
132
132
|
}, "strip", z.ZodTypeAny, {
|
|
133
|
-
name?: string | null | undefined;
|
|
134
133
|
email?: string | null | undefined;
|
|
134
|
+
name?: string | null | undefined;
|
|
135
135
|
fingerprint?: string | null | undefined;
|
|
136
136
|
}, {
|
|
137
|
-
name?: string | null | undefined;
|
|
138
137
|
email?: string | null | undefined;
|
|
138
|
+
name?: string | null | undefined;
|
|
139
139
|
fingerprint?: string | null | undefined;
|
|
140
140
|
}>;
|
|
141
141
|
type CustomerData = z.infer<typeof CustomerDataSchema>;
|
|
@@ -147,16 +147,16 @@ declare const CreateCustomerParamsSchema: z.ZodObject<{
|
|
|
147
147
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
148
148
|
expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
|
|
149
149
|
}, "strip", z.ZodTypeAny, {
|
|
150
|
-
name?: string | null | undefined;
|
|
151
150
|
id?: string | null | undefined;
|
|
152
151
|
email?: string | null | undefined;
|
|
152
|
+
name?: string | null | undefined;
|
|
153
153
|
fingerprint?: string | null | undefined;
|
|
154
154
|
metadata?: Record<string, any> | undefined;
|
|
155
155
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
156
156
|
}, {
|
|
157
|
-
name?: string | null | undefined;
|
|
158
157
|
id?: string | null | undefined;
|
|
159
158
|
email?: string | null | undefined;
|
|
159
|
+
name?: string | null | undefined;
|
|
160
160
|
fingerprint?: string | null | undefined;
|
|
161
161
|
metadata?: Record<string, any> | undefined;
|
|
162
162
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as AutumnError } from './error-DHbclCVh.js';
|
|
2
|
-
import { d as CustomerProduct, e as CustomerFeature, f as CustomerInvoice } from './cusTypes-
|
|
2
|
+
import { d as CustomerProduct, e as CustomerFeature, f as CustomerInvoice } from './cusTypes-CwLJs1D1.js';
|
|
3
3
|
|
|
4
4
|
type Success<T> = {
|
|
5
5
|
data: T;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as AutumnError } from './error-DHbclCVh.mjs';
|
|
2
|
-
import { d as CustomerProduct, e as CustomerFeature, f as CustomerInvoice } from './cusTypes-
|
|
2
|
+
import { d as CustomerProduct, e as CustomerFeature, f as CustomerInvoice } from './cusTypes-CI8GNjww.mjs';
|
|
3
3
|
|
|
4
4
|
type Success<T> = {
|
|
5
5
|
data: T;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as CheckFeatureResult, b as CheckProductResult } from './prodTypes-Y1CLtmfa.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
declare const CancelResultSchema: z.ZodObject<{
|
|
@@ -22,15 +22,15 @@ declare const TrackResultSchema: z.ZodObject<{
|
|
|
22
22
|
feature_id: z.ZodOptional<z.ZodString>;
|
|
23
23
|
event_name: z.ZodOptional<z.ZodString>;
|
|
24
24
|
}, "strip", z.ZodTypeAny, {
|
|
25
|
-
customer_id: string;
|
|
26
|
-
code: string;
|
|
27
25
|
id: string;
|
|
26
|
+
code: string;
|
|
27
|
+
customer_id: string;
|
|
28
28
|
feature_id?: string | undefined;
|
|
29
29
|
event_name?: string | undefined;
|
|
30
30
|
}, {
|
|
31
|
-
customer_id: string;
|
|
32
|
-
code: string;
|
|
33
31
|
id: string;
|
|
32
|
+
code: string;
|
|
33
|
+
customer_id: string;
|
|
34
34
|
feature_id?: string | undefined;
|
|
35
35
|
event_name?: string | undefined;
|
|
36
36
|
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as CheckFeatureResult, b as CheckProductResult } from './prodTypes-Y1CLtmfa.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
declare const CancelResultSchema: z.ZodObject<{
|
|
@@ -22,15 +22,15 @@ declare const TrackResultSchema: z.ZodObject<{
|
|
|
22
22
|
feature_id: z.ZodOptional<z.ZodString>;
|
|
23
23
|
event_name: z.ZodOptional<z.ZodString>;
|
|
24
24
|
}, "strip", z.ZodTypeAny, {
|
|
25
|
-
customer_id: string;
|
|
26
|
-
code: string;
|
|
27
25
|
id: string;
|
|
26
|
+
code: string;
|
|
27
|
+
customer_id: string;
|
|
28
28
|
feature_id?: string | undefined;
|
|
29
29
|
event_name?: string | undefined;
|
|
30
30
|
}, {
|
|
31
|
-
customer_id: string;
|
|
32
|
-
code: string;
|
|
33
31
|
id: string;
|
|
32
|
+
code: string;
|
|
33
|
+
customer_id: string;
|
|
34
34
|
feature_id?: string | undefined;
|
|
35
35
|
event_name?: string | undefined;
|
|
36
36
|
}>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { AutumnContextParams } from '../../AutumnContext.mjs';
|
|
2
2
|
import { CheckParams } from '../../client/types/clientGenTypes.mjs';
|
|
3
|
-
import { a as CheckResult } from '../../genTypes-
|
|
4
|
-
import { b as Customer } from '../../cusTypes-
|
|
5
|
-
import { E as Entity } from '../../entTypes-
|
|
3
|
+
import { a as CheckResult } from '../../genTypes-BjDGPkYi.mjs';
|
|
4
|
+
import { b as Customer } from '../../cusTypes-CI8GNjww.mjs';
|
|
5
|
+
import { E as Entity } from '../../entTypes-Kh8o7OKO.mjs';
|
|
6
6
|
import 'react';
|
|
7
|
-
import '../../ReactAutumnClient-
|
|
7
|
+
import '../../ReactAutumnClient-Bm0Y_zzP.mjs';
|
|
8
8
|
import '../../client/types/clientEntTypes.mjs';
|
|
9
9
|
import '../../error-DHbclCVh.mjs';
|
|
10
|
-
import '../../attachTypes-
|
|
11
|
-
import '../../prodTypes-
|
|
10
|
+
import '../../attachTypes-BQzswBtK.mjs';
|
|
11
|
+
import '../../prodTypes-Y1CLtmfa.mjs';
|
|
12
12
|
import 'zod';
|
|
13
13
|
|
|
14
14
|
interface AllowedParams {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { AutumnContextParams } from '../../AutumnContext.js';
|
|
2
2
|
import { CheckParams } from '../../client/types/clientGenTypes.js';
|
|
3
|
-
import { a as CheckResult } from '../../genTypes-
|
|
4
|
-
import { b as Customer } from '../../cusTypes-
|
|
5
|
-
import { E as Entity } from '../../entTypes-
|
|
3
|
+
import { a as CheckResult } from '../../genTypes-CtkYtnSx.js';
|
|
4
|
+
import { b as Customer } from '../../cusTypes-CwLJs1D1.js';
|
|
5
|
+
import { E as Entity } from '../../entTypes-ByG7ZqG-.js';
|
|
6
6
|
import 'react';
|
|
7
|
-
import '../../ReactAutumnClient-
|
|
7
|
+
import '../../ReactAutumnClient-BNcDsxYe.js';
|
|
8
8
|
import '../../client/types/clientEntTypes.js';
|
|
9
9
|
import '../../error-DHbclCVh.js';
|
|
10
|
-
import '../../attachTypes-
|
|
11
|
-
import '../../prodTypes-
|
|
10
|
+
import '../../attachTypes-DIsESO5Y.js';
|
|
11
|
+
import '../../prodTypes-Y1CLtmfa.js';
|
|
12
12
|
import 'zod';
|
|
13
13
|
|
|
14
14
|
interface AllowedParams {
|
|
@@ -528,10 +528,10 @@ var import_zod2 = require("zod");
|
|
|
528
528
|
var CoreCusFeatureSchema = import_zod2.z.object({
|
|
529
529
|
unlimited: import_zod2.z.boolean().optional(),
|
|
530
530
|
interval: import_zod2.z.nativeEnum(ProductItemInterval).optional(),
|
|
531
|
-
balance: import_zod2.z.number().
|
|
531
|
+
balance: import_zod2.z.number().nullish(),
|
|
532
532
|
usage: import_zod2.z.number().optional(),
|
|
533
533
|
included_usage: import_zod2.z.number().optional(),
|
|
534
|
-
next_reset_at: import_zod2.z.number().
|
|
534
|
+
next_reset_at: import_zod2.z.number().nullish(),
|
|
535
535
|
overage_allowed: import_zod2.z.boolean().optional(),
|
|
536
536
|
usage_limit: import_zod2.z.number().optional(),
|
|
537
537
|
breakdown: import_zod2.z.array(
|
|
@@ -737,7 +737,11 @@ var handleFeatureCheck = ({
|
|
|
737
737
|
if (isEntity) {
|
|
738
738
|
result.entity_id = customer.id;
|
|
739
739
|
}
|
|
740
|
-
|
|
740
|
+
try {
|
|
741
|
+
return CheckFeatureResultSchema.parse(result);
|
|
742
|
+
} catch (error) {
|
|
743
|
+
return result;
|
|
744
|
+
}
|
|
741
745
|
};
|
|
742
746
|
var handleProductCheck = ({
|
|
743
747
|
customer,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { R as Result, A as AutumnPromise } from '../../entTypes-
|
|
1
|
+
import { R as Result, A as AutumnPromise } from '../../entTypes-Kh8o7OKO.mjs';
|
|
2
2
|
import { A as AutumnError } from '../../error-DHbclCVh.mjs';
|
|
3
|
-
import { a as CheckResult, T as TrackResult, C as CancelResult, S as SetupPaymentResult } from '../../genTypes-
|
|
4
|
-
import { C as CheckoutResult } from '../../attachTypes-
|
|
5
|
-
import { B as BillingPortalResult } from '../../cusTypes-
|
|
3
|
+
import { a as CheckResult, T as TrackResult, C as CancelResult, S as SetupPaymentResult } from '../../genTypes-BjDGPkYi.mjs';
|
|
4
|
+
import { C as CheckoutResult } from '../../attachTypes-BQzswBtK.mjs';
|
|
5
|
+
import { B as BillingPortalResult } from '../../cusTypes-CI8GNjww.mjs';
|
|
6
6
|
import { AutumnContextParams } from '../../AutumnContext.mjs';
|
|
7
7
|
import { TrackParams, CancelParams, OpenBillingPortalParams, SetupPaymentParams } from '../../client/types/clientGenTypes.mjs';
|
|
8
8
|
import { AttachParams, CheckoutParams } from '../../client/types/clientAttachTypes.mjs';
|
|
9
|
-
import { A as AutumnClient } from '../../ReactAutumnClient-
|
|
10
|
-
import '../../prodTypes-
|
|
9
|
+
import { A as AutumnClient } from '../../ReactAutumnClient-Bm0Y_zzP.mjs';
|
|
10
|
+
import '../../prodTypes-Y1CLtmfa.mjs';
|
|
11
11
|
import 'zod';
|
|
12
12
|
import 'react';
|
|
13
13
|
import '../../client/types/clientEntTypes.mjs';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { R as Result, A as AutumnPromise } from '../../entTypes-
|
|
1
|
+
import { R as Result, A as AutumnPromise } from '../../entTypes-ByG7ZqG-.js';
|
|
2
2
|
import { A as AutumnError } from '../../error-DHbclCVh.js';
|
|
3
|
-
import { a as CheckResult, T as TrackResult, C as CancelResult, S as SetupPaymentResult } from '../../genTypes-
|
|
4
|
-
import { C as CheckoutResult } from '../../attachTypes-
|
|
5
|
-
import { B as BillingPortalResult } from '../../cusTypes-
|
|
3
|
+
import { a as CheckResult, T as TrackResult, C as CancelResult, S as SetupPaymentResult } from '../../genTypes-CtkYtnSx.js';
|
|
4
|
+
import { C as CheckoutResult } from '../../attachTypes-DIsESO5Y.js';
|
|
5
|
+
import { B as BillingPortalResult } from '../../cusTypes-CwLJs1D1.js';
|
|
6
6
|
import { AutumnContextParams } from '../../AutumnContext.js';
|
|
7
7
|
import { TrackParams, CancelParams, OpenBillingPortalParams, SetupPaymentParams } from '../../client/types/clientGenTypes.js';
|
|
8
8
|
import { AttachParams, CheckoutParams } from '../../client/types/clientAttachTypes.js';
|
|
9
|
-
import { A as AutumnClient } from '../../ReactAutumnClient-
|
|
10
|
-
import '../../prodTypes-
|
|
9
|
+
import { A as AutumnClient } from '../../ReactAutumnClient-BNcDsxYe.js';
|
|
10
|
+
import '../../prodTypes-Y1CLtmfa.js';
|
|
11
11
|
import 'zod';
|
|
12
12
|
import 'react';
|
|
13
13
|
import '../../client/types/clientEntTypes.js';
|
|
@@ -530,10 +530,10 @@ var import_zod2 = require("zod");
|
|
|
530
530
|
var CoreCusFeatureSchema = import_zod2.z.object({
|
|
531
531
|
unlimited: import_zod2.z.boolean().optional(),
|
|
532
532
|
interval: import_zod2.z.nativeEnum(ProductItemInterval).optional(),
|
|
533
|
-
balance: import_zod2.z.number().
|
|
533
|
+
balance: import_zod2.z.number().nullish(),
|
|
534
534
|
usage: import_zod2.z.number().optional(),
|
|
535
535
|
included_usage: import_zod2.z.number().optional(),
|
|
536
|
-
next_reset_at: import_zod2.z.number().
|
|
536
|
+
next_reset_at: import_zod2.z.number().nullish(),
|
|
537
537
|
overage_allowed: import_zod2.z.boolean().optional(),
|
|
538
538
|
usage_limit: import_zod2.z.number().optional(),
|
|
539
539
|
breakdown: import_zod2.z.array(
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
useAutumnBase
|
|
5
|
-
} from "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
5
|
+
} from "../../chunk-HDMOJP3E.mjs";
|
|
6
|
+
import "../../chunk-QEKHWOGC.mjs";
|
|
7
|
+
import "../../chunk-GUZH4TKK.mjs";
|
|
8
8
|
export {
|
|
9
9
|
useAutumnBase
|
|
10
10
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as swr from 'swr';
|
|
2
2
|
import { QueryParams } from '../client/types/clientGenTypes.mjs';
|
|
3
3
|
import { A as AutumnError } from '../error-DHbclCVh.mjs';
|
|
4
|
-
import { Q as QueryResult } from '../genTypes-
|
|
4
|
+
import { Q as QueryResult } from '../genTypes-BjDGPkYi.mjs';
|
|
5
5
|
import 'zod';
|
|
6
|
-
import '../prodTypes-
|
|
6
|
+
import '../prodTypes-Y1CLtmfa.mjs';
|
|
7
7
|
|
|
8
8
|
declare const useAnalytics: (params: QueryParams) => {
|
|
9
9
|
data: ({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as swr from 'swr';
|
|
2
2
|
import { QueryParams } from '../client/types/clientGenTypes.js';
|
|
3
3
|
import { A as AutumnError } from '../error-DHbclCVh.js';
|
|
4
|
-
import { Q as QueryResult } from '../genTypes-
|
|
4
|
+
import { Q as QueryResult } from '../genTypes-CtkYtnSx.js';
|
|
5
5
|
import 'zod';
|
|
6
|
-
import '../prodTypes-
|
|
6
|
+
import '../prodTypes-Y1CLtmfa.js';
|
|
7
7
|
|
|
8
8
|
declare const useAnalytics: (params: QueryParams) => {
|
|
9
9
|
data: ({
|
|
@@ -543,10 +543,10 @@ var import_zod2 = require("zod");
|
|
|
543
543
|
var CoreCusFeatureSchema = import_zod2.z.object({
|
|
544
544
|
unlimited: import_zod2.z.boolean().optional(),
|
|
545
545
|
interval: import_zod2.z.nativeEnum(ProductItemInterval).optional(),
|
|
546
|
-
balance: import_zod2.z.number().
|
|
546
|
+
balance: import_zod2.z.number().nullish(),
|
|
547
547
|
usage: import_zod2.z.number().optional(),
|
|
548
548
|
included_usage: import_zod2.z.number().optional(),
|
|
549
|
-
next_reset_at: import_zod2.z.number().
|
|
549
|
+
next_reset_at: import_zod2.z.number().nullish(),
|
|
550
550
|
overage_allowed: import_zod2.z.boolean().optional(),
|
|
551
551
|
usage_limit: import_zod2.z.number().optional(),
|
|
552
552
|
breakdown: import_zod2.z.array(
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
useAnalytics
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-PLGLCII4.mjs";
|
|
6
|
+
import "../chunk-PRFT4OKG.mjs";
|
|
7
|
+
import "../chunk-F324RNGU.mjs";
|
|
8
|
+
import "../chunk-GUZH4TKK.mjs";
|
|
9
|
+
import "../chunk-JVCOY7ZL.mjs";
|
|
10
|
+
import "../chunk-CIBQ4BJU.mjs";
|
|
11
|
+
import "../chunk-V575SGOW.mjs";
|
|
12
|
+
import "../chunk-ZV4RPZTM.mjs";
|
|
13
|
+
import "../chunk-VTGR7VVK.mjs";
|
|
9
14
|
import "../chunk-WFFVOEUG.mjs";
|
|
10
15
|
import "../chunk-ZF2HUCN6.mjs";
|
|
11
16
|
import "../chunk-BCLKTVUX.mjs";
|
|
12
|
-
import "../chunk-V575SGOW.mjs";
|
|
13
|
-
import "../chunk-ZV4RPZTM.mjs";
|
|
14
17
|
import "../chunk-KQT5G3HT.mjs";
|
|
15
|
-
import "../chunk-JVCOY7ZL.mjs";
|
|
16
|
-
import "../chunk-CIBQ4BJU.mjs";
|
|
17
|
-
import "../chunk-VTGR7VVK.mjs";
|
|
18
18
|
export {
|
|
19
19
|
useAnalytics
|
|
20
20
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { UseCustomerParams, UseCustomerResult } from './useCustomerBase.mjs';
|
|
2
2
|
import '../error-DHbclCVh.mjs';
|
|
3
|
-
import '../genTypes-
|
|
4
|
-
import '../prodTypes-
|
|
3
|
+
import '../genTypes-BjDGPkYi.mjs';
|
|
4
|
+
import '../prodTypes-Y1CLtmfa.mjs';
|
|
5
5
|
import 'zod';
|
|
6
|
-
import '../attachTypes-
|
|
7
|
-
import '../entTypes-
|
|
8
|
-
import '../cusTypes-
|
|
9
|
-
import '../ReactAutumnClient-
|
|
6
|
+
import '../attachTypes-BQzswBtK.mjs';
|
|
7
|
+
import '../entTypes-Kh8o7OKO.mjs';
|
|
8
|
+
import '../cusTypes-CI8GNjww.mjs';
|
|
9
|
+
import '../ReactAutumnClient-Bm0Y_zzP.mjs';
|
|
10
10
|
import '../client/types/clientEntTypes.mjs';
|
|
11
11
|
import '../client/types/clientGenTypes.mjs';
|
|
12
12
|
import '../client/types/clientReferralTypes.mjs';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { UseCustomerParams, UseCustomerResult } from './useCustomerBase.js';
|
|
2
2
|
import '../error-DHbclCVh.js';
|
|
3
|
-
import '../genTypes-
|
|
4
|
-
import '../prodTypes-
|
|
3
|
+
import '../genTypes-CtkYtnSx.js';
|
|
4
|
+
import '../prodTypes-Y1CLtmfa.js';
|
|
5
5
|
import 'zod';
|
|
6
|
-
import '../attachTypes-
|
|
7
|
-
import '../entTypes-
|
|
8
|
-
import '../cusTypes-
|
|
9
|
-
import '../ReactAutumnClient-
|
|
6
|
+
import '../attachTypes-DIsESO5Y.js';
|
|
7
|
+
import '../entTypes-ByG7ZqG-.js';
|
|
8
|
+
import '../cusTypes-CwLJs1D1.js';
|
|
9
|
+
import '../ReactAutumnClient-BNcDsxYe.js';
|
|
10
10
|
import '../client/types/clientEntTypes.js';
|
|
11
11
|
import '../client/types/clientGenTypes.js';
|
|
12
12
|
import '../client/types/clientReferralTypes.js';
|
|
@@ -543,10 +543,10 @@ var import_zod2 = require("zod");
|
|
|
543
543
|
var CoreCusFeatureSchema = import_zod2.z.object({
|
|
544
544
|
unlimited: import_zod2.z.boolean().optional(),
|
|
545
545
|
interval: import_zod2.z.nativeEnum(ProductItemInterval).optional(),
|
|
546
|
-
balance: import_zod2.z.number().
|
|
546
|
+
balance: import_zod2.z.number().nullish(),
|
|
547
547
|
usage: import_zod2.z.number().optional(),
|
|
548
548
|
included_usage: import_zod2.z.number().optional(),
|
|
549
|
-
next_reset_at: import_zod2.z.number().
|
|
549
|
+
next_reset_at: import_zod2.z.number().nullish(),
|
|
550
550
|
overage_allowed: import_zod2.z.boolean().optional(),
|
|
551
551
|
usage_limit: import_zod2.z.number().optional(),
|
|
552
552
|
breakdown: import_zod2.z.array(
|
|
@@ -1447,7 +1447,11 @@ var handleFeatureCheck = ({
|
|
|
1447
1447
|
if (isEntity) {
|
|
1448
1448
|
result.entity_id = customer.id;
|
|
1449
1449
|
}
|
|
1450
|
-
|
|
1450
|
+
try {
|
|
1451
|
+
return CheckFeatureResultSchema.parse(result);
|
|
1452
|
+
} catch (error) {
|
|
1453
|
+
return result;
|
|
1454
|
+
}
|
|
1451
1455
|
};
|
|
1452
1456
|
var handleProductCheck = ({
|
|
1453
1457
|
customer,
|
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
useCustomer
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-JP6WLDHX.mjs";
|
|
6
|
+
import "../chunk-QMOLXJIH.mjs";
|
|
7
|
+
import "../chunk-RL47UQK4.mjs";
|
|
8
|
+
import "../chunk-HDMOJP3E.mjs";
|
|
9
|
+
import "../chunk-QEKHWOGC.mjs";
|
|
10
|
+
import "../chunk-PRFT4OKG.mjs";
|
|
11
|
+
import "../chunk-F324RNGU.mjs";
|
|
12
|
+
import "../chunk-GUZH4TKK.mjs";
|
|
13
|
+
import "../chunk-JVCOY7ZL.mjs";
|
|
14
|
+
import "../chunk-CIBQ4BJU.mjs";
|
|
15
|
+
import "../chunk-V575SGOW.mjs";
|
|
16
|
+
import "../chunk-ZV4RPZTM.mjs";
|
|
17
|
+
import "../chunk-VTGR7VVK.mjs";
|
|
13
18
|
import "../chunk-WFFVOEUG.mjs";
|
|
14
19
|
import "../chunk-ZF2HUCN6.mjs";
|
|
15
20
|
import "../chunk-BCLKTVUX.mjs";
|
|
16
|
-
import "../chunk-V575SGOW.mjs";
|
|
17
|
-
import "../chunk-ZV4RPZTM.mjs";
|
|
18
21
|
import "../chunk-KQT5G3HT.mjs";
|
|
19
|
-
import "../chunk-JVCOY7ZL.mjs";
|
|
20
|
-
import "../chunk-CIBQ4BJU.mjs";
|
|
21
|
-
import "../chunk-VTGR7VVK.mjs";
|
|
22
22
|
export {
|
|
23
23
|
useCustomer
|
|
24
24
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { A as AutumnError } from '../error-DHbclCVh.mjs';
|
|
2
|
-
import { a as CheckResult, T as TrackResult, C as CancelResult, S as SetupPaymentResult } from '../genTypes-
|
|
3
|
-
import { A as AttachResult, C as CheckoutResult } from '../attachTypes-
|
|
4
|
-
import { A as AutumnPromise, E as Entity, S as Success } from '../entTypes-
|
|
5
|
-
import { c as CustomerExpandOption, b as Customer, B as BillingPortalResult } from '../cusTypes-
|
|
6
|
-
import { C as CreateReferralCodeResult, R as RedeemReferralCodeResult, A as AutumnClient } from '../ReactAutumnClient-
|
|
2
|
+
import { a as CheckResult, T as TrackResult, C as CancelResult, S as SetupPaymentResult } from '../genTypes-BjDGPkYi.mjs';
|
|
3
|
+
import { A as AttachResult, C as CheckoutResult } from '../attachTypes-BQzswBtK.mjs';
|
|
4
|
+
import { A as AutumnPromise, E as Entity, S as Success } from '../entTypes-Kh8o7OKO.mjs';
|
|
5
|
+
import { c as CustomerExpandOption, b as Customer, B as BillingPortalResult } from '../cusTypes-CI8GNjww.mjs';
|
|
6
|
+
import { C as CreateReferralCodeResult, R as RedeemReferralCodeResult, A as AutumnClient } from '../ReactAutumnClient-Bm0Y_zzP.mjs';
|
|
7
7
|
import { CreateEntityParams } from '../client/types/clientEntTypes.mjs';
|
|
8
8
|
import { CreateReferralCodeParams, RedeemReferralCodeParams } from '../client/types/clientReferralTypes.mjs';
|
|
9
9
|
import { SWRConfiguration } from 'swr';
|
|
@@ -11,7 +11,7 @@ import React__default from 'react';
|
|
|
11
11
|
import { TrackParams, CancelParams, SetupPaymentParams, OpenBillingPortalParams, CheckParams } from '../client/types/clientGenTypes.mjs';
|
|
12
12
|
import { AllowedParams } from './helpers/handleCheck.mjs';
|
|
13
13
|
import { AttachParams, CheckoutParams } from '../client/types/clientAttachTypes.mjs';
|
|
14
|
-
import '../prodTypes-
|
|
14
|
+
import '../prodTypes-Y1CLtmfa.mjs';
|
|
15
15
|
import 'zod';
|
|
16
16
|
import '../AutumnContext.mjs';
|
|
17
17
|
|