autumn-js 0.1.9 → 0.1.11
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.d.mts +46 -220
- package/dist/libraries/backend/better-auth.d.ts +46 -220
- package/dist/libraries/backend/better-auth.js +150 -150
- package/dist/libraries/backend/better-auth.mjs +8 -8
- package/dist/libraries/backend/{chunk-274BIVOC.mjs → chunk-5DDCZMDB.mjs} +1 -1
- package/dist/libraries/backend/{chunk-EJBD5GH7.mjs → chunk-7K3RATTK.mjs} +1 -1
- package/dist/libraries/backend/{chunk-I43OU64D.mjs → chunk-EW2R7722.mjs} +1 -1
- package/dist/libraries/backend/{chunk-KY3RLTE7.mjs → chunk-NAP2URIW.mjs} +13 -13
- package/dist/libraries/backend/{chunk-YN334O74.mjs → chunk-P3ARLB2M.mjs} +1 -1
- package/dist/libraries/backend/{chunk-7WWKVE4J.mjs → chunk-RAHKKJED.mjs} +6 -6
- package/dist/libraries/backend/{chunk-JN4ULI5R.mjs → chunk-VNJ3MFJE.mjs} +1 -1
- package/dist/libraries/backend/convex.js +146 -146
- package/dist/libraries/backend/convex.mjs +7 -7
- package/dist/libraries/backend/elysia.js +146 -146
- package/dist/libraries/backend/elysia.mjs +7 -7
- package/dist/libraries/backend/express.d.mts +2 -1
- package/dist/libraries/backend/express.d.ts +2 -1
- package/dist/libraries/backend/express.js +146 -146
- package/dist/libraries/backend/express.mjs +7 -7
- package/dist/libraries/backend/fastify.js +146 -146
- package/dist/libraries/backend/fastify.mjs +7 -7
- package/dist/libraries/backend/hono.js +146 -146
- package/dist/libraries/backend/hono.mjs +7 -7
- package/dist/libraries/backend/index.d.mts +2 -1
- package/dist/libraries/backend/index.d.ts +2 -1
- package/dist/libraries/backend/index.js +146 -146
- package/dist/libraries/backend/index.mjs +7 -7
- package/dist/libraries/backend/next.js +146 -146
- package/dist/libraries/backend/next.mjs +7 -7
- package/dist/libraries/backend/react-router.js +146 -146
- package/dist/libraries/backend/react-router.mjs +7 -7
- package/dist/libraries/backend/{referralTypes-BEcapeWf.d.mts → referralTypes-C1eZ8cjO.d.mts} +78 -456
- package/dist/libraries/backend/{referralTypes-DuAlUwev.d.ts → referralTypes-FlI0fYwz.d.ts} +78 -456
- package/dist/libraries/backend/remix_dep.js +146 -146
- package/dist/libraries/backend/remix_dep.mjs +7 -7
- package/dist/libraries/backend/routes/backendRouter.js +146 -146
- package/dist/libraries/backend/routes/backendRouter.mjs +7 -7
- package/dist/libraries/backend/routes/entityRoutes.js +146 -146
- package/dist/libraries/backend/routes/entityRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/genRoutes.js +146 -146
- package/dist/libraries/backend/routes/genRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/productRoutes.js +146 -146
- package/dist/libraries/backend/routes/productRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/referralRoutes.js +146 -146
- package/dist/libraries/backend/routes/referralRoutes.mjs +3 -3
- package/dist/libraries/backend/schemas/zod.d.mts +15 -153
- package/dist/libraries/backend/schemas/zod.d.ts +15 -153
- package/dist/libraries/backend/schemas/zod.js +43 -43
- package/dist/libraries/backend/schemas/zod.mjs +3 -3
- package/dist/libraries/backend/supabase.js +146 -146
- package/dist/libraries/backend/supabase.mjs +7 -7
- package/dist/libraries/backend/tanstack.js +146 -146
- package/dist/libraries/backend/tanstack.mjs +7 -7
- package/dist/libraries/backend/utils/backendRes.js +146 -146
- package/dist/libraries/backend/utils/backendRes.mjs +1 -1
- package/dist/libraries/backend/utils/withAuth.d.mts +2 -1
- package/dist/libraries/backend/utils/withAuth.d.ts +2 -1
- package/dist/libraries/backend/utils/withAuth.js +146 -146
- package/dist/libraries/backend/utils/withAuth.mjs +2 -2
- package/dist/libraries/react/AutumnContext.d.mts +7 -7
- package/dist/libraries/react/AutumnContext.d.ts +7 -7
- package/dist/libraries/react/AutumnContext.js +146 -146
- package/dist/libraries/react/AutumnContext.mjs +4 -4
- package/dist/libraries/react/BaseAutumnProvider.d.mts +7 -7
- package/dist/libraries/react/BaseAutumnProvider.d.ts +7 -7
- package/dist/libraries/react/BaseAutumnProvider.js +146 -146
- package/dist/libraries/react/BaseAutumnProvider.mjs +9 -9
- package/dist/libraries/react/{ReactAutumnClient-DCMQEadM.d.ts → ReactAutumnClient-CfDtucnL.d.ts} +26 -26
- package/dist/libraries/react/{ReactAutumnClient-Dm14G99_.d.mts → ReactAutumnClient-IFdMWiu5.d.mts} +26 -26
- package/dist/libraries/react/ReactAutumnProvider.d.mts +3 -3
- package/dist/libraries/react/ReactAutumnProvider.d.ts +3 -3
- package/dist/libraries/react/ReactAutumnProvider.js +146 -146
- package/dist/libraries/react/ReactAutumnProvider.mjs +10 -10
- package/dist/libraries/react/attachTypes-C5gcbNrS.d.mts +45 -0
- package/dist/libraries/react/attachTypes-CLK4jfuj.d.ts +45 -0
- package/dist/libraries/react/{chunk-UQ5HI732.mjs → chunk-2ENHPIYQ.mjs} +3 -3
- package/dist/libraries/react/{chunk-JJVQIA5V.mjs → chunk-3MF54MDU.mjs} +1 -1
- package/dist/libraries/react/{chunk-CPN2LD2I.mjs → chunk-4NZ7ML7V.mjs} +2 -2
- package/dist/libraries/react/{chunk-QZPMYB2V.mjs → chunk-67RWFVWN.mjs} +2 -2
- package/dist/libraries/react/{chunk-URFTKUL2.mjs → chunk-6D6TYTTO.mjs} +1 -1
- package/dist/libraries/react/{chunk-E2BEY4ZP.mjs → chunk-FDNQ6GRK.mjs} +1 -1
- package/dist/libraries/react/{chunk-4UPD6W4L.mjs → chunk-JHFJKAXG.mjs} +23 -23
- package/dist/libraries/react/{chunk-XTONWQ65.mjs → chunk-KMYL54B4.mjs} +1 -1
- package/dist/libraries/react/{chunk-IRTAGYDD.mjs → chunk-KP2Q65Y3.mjs} +2 -2
- package/dist/libraries/react/{chunk-3YIV3N5Y.mjs → chunk-OMJJLT2Q.mjs} +1 -1
- package/dist/libraries/react/{chunk-DRUVAAUW.mjs → chunk-TTLL63A4.mjs} +3 -3
- package/dist/libraries/react/{chunk-KG2NPWAE.mjs → chunk-U3OQJXCW.mjs} +4 -4
- package/dist/libraries/react/{chunk-7LOW3KZ3.mjs → chunk-VZY225C6.mjs} +2 -2
- package/dist/libraries/react/{chunk-JIWMNR2E.mjs → chunk-WYQMHQUE.mjs} +13 -13
- package/dist/libraries/react/{chunk-TBRYCVBL.mjs → chunk-XK3AXQED.mjs} +3 -3
- package/dist/libraries/react/{chunk-MKP43WD6.mjs → chunk-YHT2JUXO.mjs} +1 -1
- package/dist/libraries/react/client/ReactAutumnClient.d.mts +7 -7
- package/dist/libraries/react/client/ReactAutumnClient.d.ts +7 -7
- package/dist/libraries/react/client/ReactAutumnClient.js +146 -146
- package/dist/libraries/react/client/ReactAutumnClient.mjs +3 -3
- package/dist/libraries/react/client/clientCompMethods.d.mts +7 -7
- package/dist/libraries/react/client/clientCompMethods.d.ts +7 -7
- package/dist/libraries/react/client/clientCusMethods.d.mts +7 -7
- package/dist/libraries/react/client/clientCusMethods.d.ts +7 -7
- package/dist/libraries/react/client/clientEntityMethods.d.mts +7 -7
- package/dist/libraries/react/client/clientEntityMethods.d.ts +7 -7
- package/dist/libraries/react/client/clientGenMethods.d.mts +7 -7
- package/dist/libraries/react/client/clientGenMethods.d.ts +7 -7
- package/dist/libraries/react/client/clientProdMethods.d.mts +7 -7
- package/dist/libraries/react/client/clientProdMethods.d.ts +7 -7
- package/dist/libraries/react/client/clientReferralMethods.d.mts +7 -7
- package/dist/libraries/react/client/clientReferralMethods.d.ts +7 -7
- package/dist/libraries/react/client/types/clientAttachTypes.d.mts +7 -88
- package/dist/libraries/react/client/types/clientAttachTypes.d.ts +7 -88
- package/dist/libraries/react/client/types/clientAttachTypes.js +28 -28
- package/dist/libraries/react/client/types/clientAttachTypes.mjs +4 -4
- package/dist/libraries/react/client/types/clientGenTypes.d.mts +13 -53
- package/dist/libraries/react/client/types/clientGenTypes.d.ts +13 -53
- package/dist/libraries/react/client/types/clientGenTypes.js +169 -169
- package/dist/libraries/react/client/types/clientGenTypes.mjs +2 -2
- package/dist/libraries/react/client/types/clientReferralTypes.d.mts +3 -11
- package/dist/libraries/react/client/types/clientReferralTypes.d.ts +3 -11
- package/dist/libraries/react/client/types/clientReferralTypes.js +5 -5
- package/dist/libraries/react/client/types/clientReferralTypes.mjs +1 -1
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.d.mts +3 -3
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.d.ts +3 -3
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.js +146 -146
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.mjs +26 -26
- package/dist/libraries/react/components/checkout-dialog/lib/checkout-content.d.mts +3 -3
- package/dist/libraries/react/components/checkout-dialog/lib/checkout-content.d.ts +3 -3
- package/dist/libraries/react/components/paywall-dialog/lib/paywall-content.d.mts +2 -2
- package/dist/libraries/react/components/paywall-dialog/lib/paywall-content.d.ts +2 -2
- package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.js +146 -146
- package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.mjs +26 -26
- package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.d.mts +2 -2
- package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.d.ts +2 -2
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.mts +2 -2
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.ts +2 -2
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.js +146 -146
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +26 -26
- 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/components/ui/popover.mjs +2 -2
- package/dist/libraries/react/cusTypes-CBapqjzm.d.mts +111 -0
- package/dist/libraries/react/cusTypes-D13MXEN7.d.ts +111 -0
- package/dist/libraries/react/{entTypes-kVUQcah5.d.mts → entTypes-C1bM1Zpv.d.mts} +1 -1
- package/dist/libraries/react/{entTypes-0CBBecul.d.ts → entTypes-DbIrfEpl.d.ts} +1 -1
- package/dist/libraries/react/{genTypes-DsiuvyWS.d.ts → genTypes-C_ilxndU.d.mts} +4 -24
- package/dist/libraries/react/{genTypes-fEH_nqSm.d.mts → genTypes-DjcQWIOM.d.ts} +4 -24
- package/dist/libraries/react/hooks/helpers/handleCheck.d.mts +7 -7
- package/dist/libraries/react/hooks/helpers/handleCheck.d.ts +7 -7
- package/dist/libraries/react/hooks/helpers/handleCheck.js +146 -146
- package/dist/libraries/react/hooks/helpers/handleCheck.mjs +2 -2
- package/dist/libraries/react/hooks/helpers/useAutumnBase.d.mts +10 -10
- package/dist/libraries/react/hooks/helpers/useAutumnBase.d.ts +10 -10
- package/dist/libraries/react/hooks/helpers/useAutumnBase.js +146 -146
- package/dist/libraries/react/hooks/helpers/useAutumnBase.mjs +3 -3
- package/dist/libraries/react/hooks/useAnalytics.d.mts +3 -3
- package/dist/libraries/react/hooks/useAnalytics.d.ts +3 -3
- package/dist/libraries/react/hooks/useAnalytics.js +146 -146
- package/dist/libraries/react/hooks/useAnalytics.mjs +5 -5
- package/dist/libraries/react/hooks/useCustomer.d.mts +7 -7
- package/dist/libraries/react/hooks/useCustomer.d.ts +7 -7
- package/dist/libraries/react/hooks/useCustomer.js +146 -146
- package/dist/libraries/react/hooks/useCustomer.mjs +9 -9
- package/dist/libraries/react/hooks/useCustomerBase.d.mts +7 -7
- package/dist/libraries/react/hooks/useCustomerBase.d.ts +7 -7
- package/dist/libraries/react/hooks/useCustomerBase.js +146 -146
- package/dist/libraries/react/hooks/useCustomerBase.mjs +8 -8
- package/dist/libraries/react/hooks/useEntity.d.mts +10 -10
- package/dist/libraries/react/hooks/useEntity.d.ts +10 -10
- package/dist/libraries/react/hooks/useEntity.js +146 -146
- package/dist/libraries/react/hooks/useEntity.mjs +9 -9
- package/dist/libraries/react/hooks/useEntityBase.d.mts +12 -12
- package/dist/libraries/react/hooks/useEntityBase.d.ts +12 -12
- package/dist/libraries/react/hooks/useEntityBase.js +146 -146
- package/dist/libraries/react/hooks/useEntityBase.mjs +8 -8
- package/dist/libraries/react/hooks/usePaywall.d.mts +2 -2
- package/dist/libraries/react/hooks/usePaywall.d.ts +2 -2
- package/dist/libraries/react/hooks/usePaywall.js +146 -146
- package/dist/libraries/react/hooks/usePaywall.mjs +5 -5
- package/dist/libraries/react/hooks/usePricingTable.d.mts +2 -2
- package/dist/libraries/react/hooks/usePricingTable.d.ts +2 -2
- package/dist/libraries/react/hooks/usePricingTable.js +146 -146
- package/dist/libraries/react/hooks/usePricingTable.mjs +6 -6
- package/dist/libraries/react/hooks/usePricingTableBase.d.mts +7 -7
- package/dist/libraries/react/hooks/usePricingTableBase.d.ts +7 -7
- package/dist/libraries/react/hooks/usePricingTableBase.js +146 -146
- package/dist/libraries/react/hooks/usePricingTableBase.mjs +2 -2
- package/dist/libraries/react/hooks/useProductsBase.d.mts +7 -7
- package/dist/libraries/react/hooks/useProductsBase.d.ts +7 -7
- package/dist/libraries/react/index.d.mts +45 -396
- package/dist/libraries/react/index.d.ts +45 -396
- package/dist/libraries/react/index.js +146 -146
- package/dist/libraries/react/index.mjs +13 -13
- package/dist/libraries/react/{prodTypes--VvnyGlN.d.ts → prodTypes-B8NdKyKo.d.mts} +7 -90
- package/dist/libraries/react/{prodTypes--VvnyGlN.d.mts → prodTypes-B8NdKyKo.d.ts} +7 -90
- package/dist/next/AutumnProvider.d.mts +2 -10
- package/dist/next/AutumnProvider.d.ts +2 -10
- package/dist/next/client/NextAutumnClient.d.mts +23 -23
- package/dist/next/client/NextAutumnClient.d.ts +23 -23
- package/dist/next/client/NextAutumnProvider.d.mts +3 -3
- package/dist/next/client/NextAutumnProvider.d.ts +3 -3
- package/dist/next/client/attachTypes-DRO-C_G5.d.mts +45 -0
- package/dist/next/client/attachTypes-gOerywTE.d.ts +45 -0
- package/dist/next/client/clientAttachTypes-DWFk8mOR.d.ts +116 -0
- package/dist/next/client/clientAttachTypes-traKz9UZ.d.mts +116 -0
- package/dist/next/client/clientUtils.d.mts +4 -4
- package/dist/next/client/clientUtils.d.ts +4 -4
- package/dist/next/client/cusTypes-CNOLnLMs.d.ts +111 -0
- package/dist/next/client/cusTypes-dkOgZJbj.d.mts +111 -0
- package/dist/next/client/{entTypes-mOI7WnPZ.d.mts → entTypes-CXZqtZX3.d.mts} +1 -1
- package/dist/next/client/{entTypes-BAD1NMvb.d.ts → entTypes-D0T20Mxt.d.ts} +1 -1
- package/dist/next/client/hooks/useAutumn.d.mts +8 -8
- package/dist/next/client/hooks/useAutumn.d.ts +8 -8
- package/dist/next/client/hooks/useCustomer.d.mts +8 -16
- package/dist/next/client/hooks/useCustomer.d.ts +8 -16
- package/dist/next/client/hooks/useEntity.d.mts +10 -10
- package/dist/next/client/hooks/useEntity.d.ts +10 -10
- package/dist/next/client/hooks/usePricingTable.d.mts +2 -2
- package/dist/next/client/hooks/usePricingTable.d.ts +2 -2
- package/dist/next/client/{prodTypes-CxvB1YY3.d.mts → prodTypes-DwM7QuGf.d.mts} +7 -90
- package/dist/next/client/{prodTypes-CxvB1YY3.d.ts → prodTypes-DwM7QuGf.d.ts} +7 -90
- package/dist/next/client/types.d.mts +4 -4
- package/dist/next/client/types.d.ts +4 -4
- package/dist/next/server/auth/withNextAuth.d.mts +2 -2
- package/dist/next/server/auth/withNextAuth.d.ts +2 -2
- package/dist/next/server/componentActions.d.mts +2 -2
- package/dist/next/server/componentActions.d.ts +2 -2
- package/dist/next/server/cusActions.d.mts +57 -250
- package/dist/next/server/cusActions.d.ts +57 -250
- package/dist/next/server/{cusTypes-CwopPHB0.d.mts → cusTypes-CTuY9T7g.d.mts} +27 -212
- package/dist/next/server/{cusTypes-CwopPHB0.d.ts → cusTypes-CTuY9T7g.d.ts} +27 -212
- package/dist/next/server/genActions.d.mts +13 -13
- package/dist/next/server/genActions.d.ts +13 -13
- package/dist/sdk/index.d.mts +99 -530
- package/dist/sdk/index.d.ts +99 -530
- package/dist/sdk/index.js +147 -147
- package/dist/sdk/index.mjs +14 -14
- package/dist/utils/encryptUtils.js +146 -146
- package/dist/utils/encryptUtils.mjs +13 -13
- package/package.json +2 -2
- package/dist/libraries/react/attachTypes-QTf_JXj7.d.ts +0 -91
- package/dist/libraries/react/attachTypes-Sv_paJZ2.d.mts +0 -91
- package/dist/libraries/react/cusTypes-BeSXIQ6P.d.ts +0 -197
- package/dist/libraries/react/cusTypes-DbCQV8Sj.d.mts +0 -197
- package/dist/next/client/attachTypes-CReq8zJ_.d.ts +0 -91
- package/dist/next/client/attachTypes-DUUIHTBt.d.mts +0 -91
- package/dist/next/client/clientAttachTypes-BzsPgggN.d.mts +0 -251
- package/dist/next/client/clientAttachTypes-umadXlvp.d.ts +0 -251
- package/dist/next/client/cusTypes-CIGvysWL.d.mts +0 -197
- package/dist/next/client/cusTypes-CYojUJSJ.d.ts +0 -197
- package/dist/libraries/react/{chunk-FJWZPMWU.mjs → chunk-7JNU5ABT.mjs} +3 -3
- package/dist/libraries/react/{chunk-OTZ65PCT.mjs → chunk-LCWL3TIT.mjs} +3 -3
package/dist/libraries/backend/{referralTypes-BEcapeWf.d.mts → referralTypes-C1eZ8cjO.d.mts}
RENAMED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
import { z as z$1 } from 'zod';
|
|
2
3
|
import { R as Result, A as AutumnError } from './response-CV6KGWH5.mjs';
|
|
3
4
|
|
|
4
5
|
declare const Infinite = "inf";
|
|
@@ -29,9 +30,8 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
29
30
|
customer_id: z.ZodString;
|
|
30
31
|
entity_id: z.ZodOptional<z.ZodString>;
|
|
31
32
|
required_balance: z.ZodNumber;
|
|
32
|
-
} & {
|
|
33
33
|
unlimited: z.ZodOptional<z.ZodBoolean>;
|
|
34
|
-
interval: z.ZodOptional<z.
|
|
34
|
+
interval: z.ZodOptional<z.ZodEnum<typeof ProductItemInterval>>;
|
|
35
35
|
balance: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
36
36
|
usage: z.ZodOptional<z.ZodNumber>;
|
|
37
37
|
included_usage: z.ZodOptional<z.ZodNumber>;
|
|
@@ -41,101 +41,19 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
41
41
|
rollovers: z.ZodOptional<z.ZodObject<{
|
|
42
42
|
balance: z.ZodNumber;
|
|
43
43
|
expires_at: z.ZodNumber;
|
|
44
|
-
},
|
|
45
|
-
balance: number;
|
|
46
|
-
expires_at: number;
|
|
47
|
-
}, {
|
|
48
|
-
balance: number;
|
|
49
|
-
expires_at: number;
|
|
50
|
-
}>>;
|
|
44
|
+
}, z.core.$strip>>;
|
|
51
45
|
breakdown: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
52
|
-
interval: z.
|
|
46
|
+
interval: z.ZodEnum<typeof ProductItemInterval>;
|
|
53
47
|
balance: z.ZodOptional<z.ZodNumber>;
|
|
54
48
|
usage: z.ZodOptional<z.ZodNumber>;
|
|
55
49
|
included_usage: z.ZodOptional<z.ZodNumber>;
|
|
56
50
|
next_reset_at: z.ZodOptional<z.ZodNumber>;
|
|
57
|
-
},
|
|
58
|
-
interval: ProductItemInterval;
|
|
59
|
-
balance?: number | undefined;
|
|
60
|
-
usage?: number | undefined;
|
|
61
|
-
included_usage?: number | undefined;
|
|
62
|
-
next_reset_at?: number | undefined;
|
|
63
|
-
}, {
|
|
64
|
-
interval: ProductItemInterval;
|
|
65
|
-
balance?: number | undefined;
|
|
66
|
-
usage?: number | undefined;
|
|
67
|
-
included_usage?: number | undefined;
|
|
68
|
-
next_reset_at?: number | undefined;
|
|
69
|
-
}>, "many">>;
|
|
51
|
+
}, z.core.$strip>>>;
|
|
70
52
|
credit_schema: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
71
53
|
feature_id: z.ZodString;
|
|
72
54
|
credit_amount: z.ZodNumber;
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
credit_amount: number;
|
|
76
|
-
}, {
|
|
77
|
-
feature_id: string;
|
|
78
|
-
credit_amount: number;
|
|
79
|
-
}>, "many">>;
|
|
80
|
-
}, "strip", z.ZodTypeAny, {
|
|
81
|
-
allowed: boolean;
|
|
82
|
-
feature_id: string;
|
|
83
|
-
customer_id: string;
|
|
84
|
-
required_balance: number;
|
|
85
|
-
usage_limit?: number | undefined;
|
|
86
|
-
entity_id?: string | undefined;
|
|
87
|
-
unlimited?: boolean | undefined;
|
|
88
|
-
interval?: ProductItemInterval | undefined;
|
|
89
|
-
balance?: number | null | undefined;
|
|
90
|
-
usage?: number | undefined;
|
|
91
|
-
included_usage?: number | undefined;
|
|
92
|
-
next_reset_at?: number | null | undefined;
|
|
93
|
-
overage_allowed?: boolean | undefined;
|
|
94
|
-
rollovers?: {
|
|
95
|
-
balance: number;
|
|
96
|
-
expires_at: number;
|
|
97
|
-
} | undefined;
|
|
98
|
-
breakdown?: {
|
|
99
|
-
interval: ProductItemInterval;
|
|
100
|
-
balance?: number | undefined;
|
|
101
|
-
usage?: number | undefined;
|
|
102
|
-
included_usage?: number | undefined;
|
|
103
|
-
next_reset_at?: number | undefined;
|
|
104
|
-
}[] | undefined;
|
|
105
|
-
credit_schema?: {
|
|
106
|
-
feature_id: string;
|
|
107
|
-
credit_amount: number;
|
|
108
|
-
}[] | undefined;
|
|
109
|
-
}, {
|
|
110
|
-
allowed: boolean;
|
|
111
|
-
feature_id: string;
|
|
112
|
-
customer_id: string;
|
|
113
|
-
required_balance: number;
|
|
114
|
-
usage_limit?: number | undefined;
|
|
115
|
-
entity_id?: string | undefined;
|
|
116
|
-
unlimited?: boolean | undefined;
|
|
117
|
-
interval?: ProductItemInterval | undefined;
|
|
118
|
-
balance?: number | null | undefined;
|
|
119
|
-
usage?: number | undefined;
|
|
120
|
-
included_usage?: number | undefined;
|
|
121
|
-
next_reset_at?: number | null | undefined;
|
|
122
|
-
overage_allowed?: boolean | undefined;
|
|
123
|
-
rollovers?: {
|
|
124
|
-
balance: number;
|
|
125
|
-
expires_at: number;
|
|
126
|
-
} | undefined;
|
|
127
|
-
breakdown?: {
|
|
128
|
-
interval: ProductItemInterval;
|
|
129
|
-
balance?: number | undefined;
|
|
130
|
-
usage?: number | undefined;
|
|
131
|
-
included_usage?: number | undefined;
|
|
132
|
-
next_reset_at?: number | undefined;
|
|
133
|
-
}[] | undefined;
|
|
134
|
-
credit_schema?: {
|
|
135
|
-
feature_id: string;
|
|
136
|
-
credit_amount: number;
|
|
137
|
-
}[] | undefined;
|
|
138
|
-
}>;
|
|
55
|
+
}, z.core.$strip>>>;
|
|
56
|
+
}, z.core.$strip>;
|
|
139
57
|
type CheckFeatureResult = z.infer<typeof CheckFeatureResultSchema>;
|
|
140
58
|
type ProductScenario = "scheduled" | "active" | "new" | "renew" | "upgrade" | "downgrade" | "cancel";
|
|
141
59
|
interface CheckProductResult {
|
|
@@ -265,7 +183,7 @@ type CustomerExpandOption = "invoices" | "rewards" | "trials_used" | "entities"
|
|
|
265
183
|
|
|
266
184
|
declare const CoreCusFeatureSchema: z.ZodObject<{
|
|
267
185
|
unlimited: z.ZodOptional<z.ZodBoolean>;
|
|
268
|
-
interval: z.ZodOptional<z.
|
|
186
|
+
interval: z.ZodOptional<z.ZodEnum<typeof ProductItemInterval>>;
|
|
269
187
|
balance: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
270
188
|
usage: z.ZodOptional<z.ZodNumber>;
|
|
271
189
|
included_usage: z.ZodOptional<z.ZodNumber>;
|
|
@@ -275,91 +193,19 @@ declare const CoreCusFeatureSchema: z.ZodObject<{
|
|
|
275
193
|
rollovers: z.ZodOptional<z.ZodObject<{
|
|
276
194
|
balance: z.ZodNumber;
|
|
277
195
|
expires_at: z.ZodNumber;
|
|
278
|
-
},
|
|
279
|
-
balance: number;
|
|
280
|
-
expires_at: number;
|
|
281
|
-
}, {
|
|
282
|
-
balance: number;
|
|
283
|
-
expires_at: number;
|
|
284
|
-
}>>;
|
|
196
|
+
}, z.core.$strip>>;
|
|
285
197
|
breakdown: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
286
|
-
interval: z.
|
|
198
|
+
interval: z.ZodEnum<typeof ProductItemInterval>;
|
|
287
199
|
balance: z.ZodOptional<z.ZodNumber>;
|
|
288
200
|
usage: z.ZodOptional<z.ZodNumber>;
|
|
289
201
|
included_usage: z.ZodOptional<z.ZodNumber>;
|
|
290
202
|
next_reset_at: z.ZodOptional<z.ZodNumber>;
|
|
291
|
-
},
|
|
292
|
-
interval: ProductItemInterval;
|
|
293
|
-
balance?: number | undefined;
|
|
294
|
-
usage?: number | undefined;
|
|
295
|
-
included_usage?: number | undefined;
|
|
296
|
-
next_reset_at?: number | undefined;
|
|
297
|
-
}, {
|
|
298
|
-
interval: ProductItemInterval;
|
|
299
|
-
balance?: number | undefined;
|
|
300
|
-
usage?: number | undefined;
|
|
301
|
-
included_usage?: number | undefined;
|
|
302
|
-
next_reset_at?: number | undefined;
|
|
303
|
-
}>, "many">>;
|
|
203
|
+
}, z.core.$strip>>>;
|
|
304
204
|
credit_schema: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
305
205
|
feature_id: z.ZodString;
|
|
306
206
|
credit_amount: z.ZodNumber;
|
|
307
|
-
},
|
|
308
|
-
|
|
309
|
-
credit_amount: number;
|
|
310
|
-
}, {
|
|
311
|
-
feature_id: string;
|
|
312
|
-
credit_amount: number;
|
|
313
|
-
}>, "many">>;
|
|
314
|
-
}, "strip", z.ZodTypeAny, {
|
|
315
|
-
usage_limit?: number | undefined;
|
|
316
|
-
unlimited?: boolean | undefined;
|
|
317
|
-
interval?: ProductItemInterval | undefined;
|
|
318
|
-
balance?: number | null | undefined;
|
|
319
|
-
usage?: number | undefined;
|
|
320
|
-
included_usage?: number | undefined;
|
|
321
|
-
next_reset_at?: number | null | undefined;
|
|
322
|
-
overage_allowed?: boolean | undefined;
|
|
323
|
-
rollovers?: {
|
|
324
|
-
balance: number;
|
|
325
|
-
expires_at: number;
|
|
326
|
-
} | undefined;
|
|
327
|
-
breakdown?: {
|
|
328
|
-
interval: ProductItemInterval;
|
|
329
|
-
balance?: number | undefined;
|
|
330
|
-
usage?: number | undefined;
|
|
331
|
-
included_usage?: number | undefined;
|
|
332
|
-
next_reset_at?: number | undefined;
|
|
333
|
-
}[] | undefined;
|
|
334
|
-
credit_schema?: {
|
|
335
|
-
feature_id: string;
|
|
336
|
-
credit_amount: number;
|
|
337
|
-
}[] | undefined;
|
|
338
|
-
}, {
|
|
339
|
-
usage_limit?: number | undefined;
|
|
340
|
-
unlimited?: boolean | undefined;
|
|
341
|
-
interval?: ProductItemInterval | undefined;
|
|
342
|
-
balance?: number | null | undefined;
|
|
343
|
-
usage?: number | undefined;
|
|
344
|
-
included_usage?: number | undefined;
|
|
345
|
-
next_reset_at?: number | null | undefined;
|
|
346
|
-
overage_allowed?: boolean | undefined;
|
|
347
|
-
rollovers?: {
|
|
348
|
-
balance: number;
|
|
349
|
-
expires_at: number;
|
|
350
|
-
} | undefined;
|
|
351
|
-
breakdown?: {
|
|
352
|
-
interval: ProductItemInterval;
|
|
353
|
-
balance?: number | undefined;
|
|
354
|
-
usage?: number | undefined;
|
|
355
|
-
included_usage?: number | undefined;
|
|
356
|
-
next_reset_at?: number | undefined;
|
|
357
|
-
}[] | undefined;
|
|
358
|
-
credit_schema?: {
|
|
359
|
-
feature_id: string;
|
|
360
|
-
credit_amount: number;
|
|
361
|
-
}[] | undefined;
|
|
362
|
-
}>;
|
|
207
|
+
}, z.core.$strip>>>;
|
|
208
|
+
}, z.core.$strip>;
|
|
363
209
|
type CoreCustomerFeature = z.infer<typeof CoreCusFeatureSchema>;
|
|
364
210
|
interface CustomerFeature extends CoreCustomerFeature {
|
|
365
211
|
id: string;
|
|
@@ -395,20 +241,13 @@ interface Customer {
|
|
|
395
241
|
products: CustomerProduct[];
|
|
396
242
|
features: Record<string, CustomerFeature>;
|
|
397
243
|
invoices?: CustomerInvoice[];
|
|
244
|
+
payment_method?: any;
|
|
398
245
|
}
|
|
399
246
|
declare const CustomerDataSchema: z.ZodObject<{
|
|
400
247
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
401
248
|
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
402
249
|
fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
403
|
-
},
|
|
404
|
-
name?: string | null | undefined;
|
|
405
|
-
email?: string | null | undefined;
|
|
406
|
-
fingerprint?: string | null | undefined;
|
|
407
|
-
}, {
|
|
408
|
-
name?: string | null | undefined;
|
|
409
|
-
email?: string | null | undefined;
|
|
410
|
-
fingerprint?: string | null | undefined;
|
|
411
|
-
}>;
|
|
250
|
+
}, z.core.$strip>;
|
|
412
251
|
type CustomerData = z.infer<typeof CustomerDataSchema>;
|
|
413
252
|
interface GetCustomerParams {
|
|
414
253
|
expand?: CustomerExpandOption[];
|
|
@@ -419,22 +258,15 @@ declare const CreateCustomerParamsSchema: z.ZodObject<{
|
|
|
419
258
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
420
259
|
fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
421
260
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
422
|
-
expand: z.ZodOptional<z.ZodArray<z.ZodEnum<
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
},
|
|
431
|
-
id?: string | null | undefined;
|
|
432
|
-
name?: string | null | undefined;
|
|
433
|
-
email?: string | null | undefined;
|
|
434
|
-
fingerprint?: string | null | undefined;
|
|
435
|
-
metadata?: Record<string, any> | undefined;
|
|
436
|
-
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
437
|
-
}>;
|
|
261
|
+
expand: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
262
|
+
invoices: "invoices";
|
|
263
|
+
rewards: "rewards";
|
|
264
|
+
trials_used: "trials_used";
|
|
265
|
+
entities: "entities";
|
|
266
|
+
referrals: "referrals";
|
|
267
|
+
payment_method: "payment_method";
|
|
268
|
+
}>>>;
|
|
269
|
+
}, z.core.$strip>;
|
|
438
270
|
type CreateCustomerParams = z.infer<typeof CreateCustomerParamsSchema>;
|
|
439
271
|
interface UpdateCustomerParams {
|
|
440
272
|
id?: string | null;
|
|
@@ -444,11 +276,7 @@ interface UpdateCustomerParams {
|
|
|
444
276
|
}
|
|
445
277
|
declare const BillingPortalParamsSchema: z.ZodObject<{
|
|
446
278
|
return_url: z.ZodOptional<z.ZodString>;
|
|
447
|
-
},
|
|
448
|
-
return_url?: string | undefined;
|
|
449
|
-
}, {
|
|
450
|
-
return_url?: string | undefined;
|
|
451
|
-
}>;
|
|
279
|
+
}, z.core.$strip>;
|
|
452
280
|
type BillingPortalParams = z.infer<typeof BillingPortalParamsSchema>;
|
|
453
281
|
interface BillingPortalResult {
|
|
454
282
|
customer_id: string;
|
|
@@ -466,22 +294,10 @@ interface CustomerInvoice {
|
|
|
466
294
|
declare const UpdateBalancesParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
467
295
|
feature_id: z.ZodString;
|
|
468
296
|
balance: z.ZodNumber;
|
|
469
|
-
},
|
|
470
|
-
feature_id: string;
|
|
471
|
-
balance: number;
|
|
472
|
-
}, {
|
|
473
|
-
feature_id: string;
|
|
474
|
-
balance: number;
|
|
475
|
-
}>, z.ZodArray<z.ZodObject<{
|
|
297
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
476
298
|
feature_id: z.ZodString;
|
|
477
299
|
balance: z.ZodNumber;
|
|
478
|
-
},
|
|
479
|
-
feature_id: string;
|
|
480
|
-
balance: number;
|
|
481
|
-
}, {
|
|
482
|
-
feature_id: string;
|
|
483
|
-
balance: number;
|
|
484
|
-
}>, "many">]>;
|
|
300
|
+
}, z.core.$strip>>]>;
|
|
485
301
|
type UpdateBalancesParams = z.infer<typeof UpdateBalancesParamsSchema>;
|
|
486
302
|
type UpdateBalancesResult = {
|
|
487
303
|
success: boolean;
|
|
@@ -492,17 +308,7 @@ declare const CancelParamsSchema: z.ZodObject<{
|
|
|
492
308
|
product_id: z.ZodString;
|
|
493
309
|
entity_id: z.ZodOptional<z.ZodString>;
|
|
494
310
|
cancel_immediately: z.ZodOptional<z.ZodBoolean>;
|
|
495
|
-
},
|
|
496
|
-
customer_id: string;
|
|
497
|
-
product_id: string;
|
|
498
|
-
entity_id?: string | undefined;
|
|
499
|
-
cancel_immediately?: boolean | undefined;
|
|
500
|
-
}, {
|
|
501
|
-
customer_id: string;
|
|
502
|
-
product_id: string;
|
|
503
|
-
entity_id?: string | undefined;
|
|
504
|
-
cancel_immediately?: boolean | undefined;
|
|
505
|
-
}>;
|
|
311
|
+
}, z.core.$strip>;
|
|
506
312
|
type CancelParams = z.infer<typeof CancelParamsSchema>;
|
|
507
313
|
declare const TrackParamsSchema: z.ZodObject<{
|
|
508
314
|
customer_id: z.ZodString;
|
|
@@ -513,25 +319,7 @@ declare const TrackParamsSchema: z.ZodObject<{
|
|
|
513
319
|
customer_data: z.ZodOptional<z.ZodAny>;
|
|
514
320
|
idempotency_key: z.ZodOptional<z.ZodString>;
|
|
515
321
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
516
|
-
},
|
|
517
|
-
customer_id: string;
|
|
518
|
-
feature_id?: string | undefined;
|
|
519
|
-
entity_id?: string | undefined;
|
|
520
|
-
value?: number | undefined;
|
|
521
|
-
customer_data?: any;
|
|
522
|
-
entity_data?: any;
|
|
523
|
-
event_name?: string | undefined;
|
|
524
|
-
idempotency_key?: string | undefined;
|
|
525
|
-
}, {
|
|
526
|
-
customer_id: string;
|
|
527
|
-
feature_id?: string | undefined;
|
|
528
|
-
entity_id?: string | undefined;
|
|
529
|
-
value?: number | undefined;
|
|
530
|
-
customer_data?: any;
|
|
531
|
-
entity_data?: any;
|
|
532
|
-
event_name?: string | undefined;
|
|
533
|
-
idempotency_key?: string | undefined;
|
|
534
|
-
}>;
|
|
322
|
+
}, z.core.$strip>;
|
|
535
323
|
type TrackParams = z.infer<typeof TrackParamsSchema>;
|
|
536
324
|
declare const CheckParamsSchema: z.ZodObject<{
|
|
537
325
|
customer_id: z.ZodString;
|
|
@@ -545,40 +333,8 @@ declare const CheckParamsSchema: z.ZodObject<{
|
|
|
545
333
|
entity_data: z.ZodOptional<z.ZodObject<{
|
|
546
334
|
name: z.ZodOptional<z.ZodString>;
|
|
547
335
|
feature_id: z.ZodString;
|
|
548
|
-
},
|
|
549
|
-
|
|
550
|
-
name?: string | undefined;
|
|
551
|
-
}, {
|
|
552
|
-
feature_id: string;
|
|
553
|
-
name?: string | undefined;
|
|
554
|
-
}>>;
|
|
555
|
-
}, "strip", z.ZodTypeAny, {
|
|
556
|
-
customer_id: string;
|
|
557
|
-
feature_id?: string | undefined;
|
|
558
|
-
entity_id?: string | undefined;
|
|
559
|
-
required_balance?: number | undefined;
|
|
560
|
-
product_id?: string | undefined;
|
|
561
|
-
customer_data?: any;
|
|
562
|
-
entity_data?: {
|
|
563
|
-
feature_id: string;
|
|
564
|
-
name?: string | undefined;
|
|
565
|
-
} | undefined;
|
|
566
|
-
send_event?: boolean | undefined;
|
|
567
|
-
with_preview?: boolean | undefined;
|
|
568
|
-
}, {
|
|
569
|
-
customer_id: string;
|
|
570
|
-
feature_id?: string | undefined;
|
|
571
|
-
entity_id?: string | undefined;
|
|
572
|
-
required_balance?: number | undefined;
|
|
573
|
-
product_id?: string | undefined;
|
|
574
|
-
customer_data?: any;
|
|
575
|
-
entity_data?: {
|
|
576
|
-
feature_id: string;
|
|
577
|
-
name?: string | undefined;
|
|
578
|
-
} | undefined;
|
|
579
|
-
send_event?: boolean | undefined;
|
|
580
|
-
with_preview?: boolean | undefined;
|
|
581
|
-
}>;
|
|
336
|
+
}, z.core.$strip>>;
|
|
337
|
+
}, z.core.$strip>;
|
|
582
338
|
type CheckParams = z.infer<typeof CheckParamsSchema>;
|
|
583
339
|
type CheckResult = CheckFeatureResult & CheckProductResult;
|
|
584
340
|
interface UsageParams {
|
|
@@ -603,17 +359,15 @@ interface SetupPaymentResult {
|
|
|
603
359
|
}
|
|
604
360
|
declare const QueryParamsSchema: z.ZodObject<{
|
|
605
361
|
customer_id: z.ZodString;
|
|
606
|
-
feature_id: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString
|
|
607
|
-
range: z.ZodOptional<z.ZodEnum<
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | undefined;
|
|
616
|
-
}>;
|
|
362
|
+
feature_id: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
363
|
+
range: z.ZodOptional<z.ZodEnum<{
|
|
364
|
+
"24h": "24h";
|
|
365
|
+
"7d": "7d";
|
|
366
|
+
"30d": "30d";
|
|
367
|
+
"90d": "90d";
|
|
368
|
+
last_cycle: "last_cycle";
|
|
369
|
+
}>>;
|
|
370
|
+
}, z.core.$strip>;
|
|
617
371
|
type QueryParams = z.infer<typeof QueryParamsSchema>;
|
|
618
372
|
type QueryResult = {
|
|
619
373
|
list: Array<{
|
|
@@ -626,13 +380,7 @@ type QueryResult = {
|
|
|
626
380
|
declare const AttachFeatureOptionsSchema: z.ZodObject<{
|
|
627
381
|
feature_id: z.ZodString;
|
|
628
382
|
quantity: z.ZodNumber;
|
|
629
|
-
},
|
|
630
|
-
feature_id: string;
|
|
631
|
-
quantity: number;
|
|
632
|
-
}, {
|
|
633
|
-
feature_id: string;
|
|
634
|
-
quantity: number;
|
|
635
|
-
}>;
|
|
383
|
+
}, z.core.$strip>;
|
|
636
384
|
type AttachFeatureOptions = z.infer<typeof AttachFeatureOptionsSchema>;
|
|
637
385
|
declare const AttachParamsSchema: z.ZodObject<{
|
|
638
386
|
customer_id: z.ZodString;
|
|
@@ -641,14 +389,8 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
641
389
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
642
390
|
feature_id: z.ZodString;
|
|
643
391
|
quantity: z.ZodNumber;
|
|
644
|
-
},
|
|
645
|
-
|
|
646
|
-
quantity: number;
|
|
647
|
-
}, {
|
|
648
|
-
feature_id: string;
|
|
649
|
-
quantity: number;
|
|
650
|
-
}>, "many">>;
|
|
651
|
-
product_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
392
|
+
}, z.core.$strip>>>;
|
|
393
|
+
product_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
652
394
|
free_trial: z.ZodOptional<z.ZodBoolean>;
|
|
653
395
|
success_url: z.ZodOptional<z.ZodString>;
|
|
654
396
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -657,64 +399,12 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
657
399
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
658
400
|
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
659
401
|
fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
660
|
-
},
|
|
661
|
-
name?: string | null | undefined;
|
|
662
|
-
email?: string | null | undefined;
|
|
663
|
-
fingerprint?: string | null | undefined;
|
|
664
|
-
}, {
|
|
665
|
-
name?: string | null | undefined;
|
|
666
|
-
email?: string | null | undefined;
|
|
667
|
-
fingerprint?: string | null | undefined;
|
|
668
|
-
}>>;
|
|
402
|
+
}, z.core.$strip>>;
|
|
669
403
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
670
404
|
checkout_session_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
671
405
|
reward: z.ZodOptional<z.ZodString>;
|
|
672
406
|
invoice: z.ZodOptional<z.ZodBoolean>;
|
|
673
|
-
},
|
|
674
|
-
customer_id: string;
|
|
675
|
-
entity_id?: string | undefined;
|
|
676
|
-
options?: {
|
|
677
|
-
feature_id: string;
|
|
678
|
-
quantity: number;
|
|
679
|
-
}[] | undefined;
|
|
680
|
-
metadata?: Record<string, string> | undefined;
|
|
681
|
-
product_id?: string | undefined;
|
|
682
|
-
product_ids?: string[] | undefined;
|
|
683
|
-
free_trial?: boolean | undefined;
|
|
684
|
-
success_url?: string | undefined;
|
|
685
|
-
force_checkout?: boolean | undefined;
|
|
686
|
-
customer_data?: {
|
|
687
|
-
name?: string | null | undefined;
|
|
688
|
-
email?: string | null | undefined;
|
|
689
|
-
fingerprint?: string | null | undefined;
|
|
690
|
-
} | undefined;
|
|
691
|
-
entity_data?: any;
|
|
692
|
-
checkout_session_params?: Record<string, any> | undefined;
|
|
693
|
-
reward?: string | undefined;
|
|
694
|
-
invoice?: boolean | undefined;
|
|
695
|
-
}, {
|
|
696
|
-
customer_id: string;
|
|
697
|
-
entity_id?: string | undefined;
|
|
698
|
-
options?: {
|
|
699
|
-
feature_id: string;
|
|
700
|
-
quantity: number;
|
|
701
|
-
}[] | undefined;
|
|
702
|
-
metadata?: Record<string, string> | undefined;
|
|
703
|
-
product_id?: string | undefined;
|
|
704
|
-
product_ids?: string[] | undefined;
|
|
705
|
-
free_trial?: boolean | undefined;
|
|
706
|
-
success_url?: string | undefined;
|
|
707
|
-
force_checkout?: boolean | undefined;
|
|
708
|
-
customer_data?: {
|
|
709
|
-
name?: string | null | undefined;
|
|
710
|
-
email?: string | null | undefined;
|
|
711
|
-
fingerprint?: string | null | undefined;
|
|
712
|
-
} | undefined;
|
|
713
|
-
entity_data?: any;
|
|
714
|
-
checkout_session_params?: Record<string, any> | undefined;
|
|
715
|
-
reward?: string | undefined;
|
|
716
|
-
invoice?: boolean | undefined;
|
|
717
|
-
}>;
|
|
407
|
+
}, z.core.$strip>;
|
|
718
408
|
type AttachParams = z.infer<typeof AttachParamsSchema>;
|
|
719
409
|
declare const CheckoutParamsSchema: z.ZodObject<{
|
|
720
410
|
customer_id: z.ZodString;
|
|
@@ -723,65 +413,17 @@ declare const CheckoutParamsSchema: z.ZodObject<{
|
|
|
723
413
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
724
414
|
feature_id: z.ZodString;
|
|
725
415
|
quantity: z.ZodNumber;
|
|
726
|
-
},
|
|
727
|
-
feature_id: string;
|
|
728
|
-
quantity: number;
|
|
729
|
-
}, {
|
|
730
|
-
feature_id: string;
|
|
731
|
-
quantity: number;
|
|
732
|
-
}>, "many">>;
|
|
416
|
+
}, z.core.$strip>>>;
|
|
733
417
|
success_url: z.ZodOptional<z.ZodString>;
|
|
734
418
|
customer_data: z.ZodOptional<z.ZodObject<{
|
|
735
419
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
736
420
|
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
737
421
|
fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
738
|
-
},
|
|
739
|
-
name?: string | null | undefined;
|
|
740
|
-
email?: string | null | undefined;
|
|
741
|
-
fingerprint?: string | null | undefined;
|
|
742
|
-
}, {
|
|
743
|
-
name?: string | null | undefined;
|
|
744
|
-
email?: string | null | undefined;
|
|
745
|
-
fingerprint?: string | null | undefined;
|
|
746
|
-
}>>;
|
|
422
|
+
}, z.core.$strip>>;
|
|
747
423
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
748
424
|
checkout_session_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
749
425
|
reward: z.ZodOptional<z.ZodString>;
|
|
750
|
-
},
|
|
751
|
-
customer_id: string;
|
|
752
|
-
product_id: string;
|
|
753
|
-
entity_id?: string | undefined;
|
|
754
|
-
options?: {
|
|
755
|
-
feature_id: string;
|
|
756
|
-
quantity: number;
|
|
757
|
-
}[] | undefined;
|
|
758
|
-
success_url?: string | undefined;
|
|
759
|
-
customer_data?: {
|
|
760
|
-
name?: string | null | undefined;
|
|
761
|
-
email?: string | null | undefined;
|
|
762
|
-
fingerprint?: string | null | undefined;
|
|
763
|
-
} | undefined;
|
|
764
|
-
entity_data?: any;
|
|
765
|
-
checkout_session_params?: Record<string, any> | undefined;
|
|
766
|
-
reward?: string | undefined;
|
|
767
|
-
}, {
|
|
768
|
-
customer_id: string;
|
|
769
|
-
product_id: string;
|
|
770
|
-
entity_id?: string | undefined;
|
|
771
|
-
options?: {
|
|
772
|
-
feature_id: string;
|
|
773
|
-
quantity: number;
|
|
774
|
-
}[] | undefined;
|
|
775
|
-
success_url?: string | undefined;
|
|
776
|
-
customer_data?: {
|
|
777
|
-
name?: string | null | undefined;
|
|
778
|
-
email?: string | null | undefined;
|
|
779
|
-
fingerprint?: string | null | undefined;
|
|
780
|
-
} | undefined;
|
|
781
|
-
entity_data?: any;
|
|
782
|
-
checkout_session_params?: Record<string, any> | undefined;
|
|
783
|
-
reward?: string | undefined;
|
|
784
|
-
}>;
|
|
426
|
+
}, z.core.$strip>;
|
|
785
427
|
type CheckoutParams = z.infer<typeof CheckoutParamsSchema>;
|
|
786
428
|
type CheckoutResult = {
|
|
787
429
|
url?: string;
|
|
@@ -809,33 +451,33 @@ declare enum FeatureType {
|
|
|
809
451
|
ContinuousUse = "continuous_use",
|
|
810
452
|
CreditSystem = "credit_system"
|
|
811
453
|
}
|
|
812
|
-
declare const FeatureSchema: z.ZodObject<{
|
|
813
|
-
id: z.ZodString;
|
|
814
|
-
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
815
|
-
type: z.ZodNativeEnum<typeof FeatureType>;
|
|
816
|
-
display: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
817
|
-
singular: z.ZodString;
|
|
818
|
-
plural: z.ZodString;
|
|
819
|
-
}, "strip", z.ZodTypeAny, {
|
|
454
|
+
declare const FeatureSchema: z$1.ZodObject<{
|
|
455
|
+
id: z$1.ZodString;
|
|
456
|
+
name: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
457
|
+
type: z$1.ZodNativeEnum<typeof FeatureType>;
|
|
458
|
+
display: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodObject<{
|
|
459
|
+
singular: z$1.ZodString;
|
|
460
|
+
plural: z$1.ZodString;
|
|
461
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
820
462
|
singular: string;
|
|
821
463
|
plural: string;
|
|
822
464
|
}, {
|
|
823
465
|
singular: string;
|
|
824
466
|
plural: string;
|
|
825
467
|
}>>>;
|
|
826
|
-
credit_schema: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
827
|
-
metered_feature_id: z.ZodString;
|
|
828
|
-
credit_cost: z.ZodNumber;
|
|
829
|
-
}, "strip", z.ZodTypeAny, {
|
|
468
|
+
credit_schema: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodObject<{
|
|
469
|
+
metered_feature_id: z$1.ZodString;
|
|
470
|
+
credit_cost: z$1.ZodNumber;
|
|
471
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
830
472
|
metered_feature_id: string;
|
|
831
473
|
credit_cost: number;
|
|
832
474
|
}, {
|
|
833
475
|
metered_feature_id: string;
|
|
834
476
|
credit_cost: number;
|
|
835
477
|
}>, "many">>>;
|
|
836
|
-
}, "strip", z.ZodTypeAny, {
|
|
837
|
-
type: FeatureType;
|
|
478
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
838
479
|
id: string;
|
|
480
|
+
type: FeatureType;
|
|
839
481
|
credit_schema?: {
|
|
840
482
|
metered_feature_id: string;
|
|
841
483
|
credit_cost: number;
|
|
@@ -846,8 +488,8 @@ declare const FeatureSchema: z.ZodObject<{
|
|
|
846
488
|
plural: string;
|
|
847
489
|
} | null | undefined;
|
|
848
490
|
}, {
|
|
849
|
-
type: FeatureType;
|
|
850
491
|
id: string;
|
|
492
|
+
type: FeatureType;
|
|
851
493
|
credit_schema?: {
|
|
852
494
|
metered_feature_id: string;
|
|
853
495
|
credit_cost: number;
|
|
@@ -858,7 +500,7 @@ declare const FeatureSchema: z.ZodObject<{
|
|
|
858
500
|
plural: string;
|
|
859
501
|
} | null | undefined;
|
|
860
502
|
}>;
|
|
861
|
-
type Feature = z.infer<typeof FeatureSchema>;
|
|
503
|
+
type Feature = z$1.infer<typeof FeatureSchema>;
|
|
862
504
|
|
|
863
505
|
declare class Autumn {
|
|
864
506
|
private readonly secretKey;
|
|
@@ -941,9 +583,10 @@ declare class Autumn {
|
|
|
941
583
|
checkout(params: CheckoutParams): Promise<Result<CheckoutResult, AutumnError>>;
|
|
942
584
|
static attach: (params: AttachParams) => Promise<Result<{
|
|
943
585
|
customer_id: string;
|
|
586
|
+
product_ids: string[];
|
|
944
587
|
code: string;
|
|
945
588
|
message: string;
|
|
946
|
-
|
|
589
|
+
checkout_url?: string | undefined;
|
|
947
590
|
customer_data?: any;
|
|
948
591
|
invoice?: {
|
|
949
592
|
status: string;
|
|
@@ -952,14 +595,14 @@ declare class Autumn {
|
|
|
952
595
|
total: number;
|
|
953
596
|
currency: string;
|
|
954
597
|
} | undefined;
|
|
955
|
-
checkout_url?: string | undefined;
|
|
956
598
|
}, AutumnError>>;
|
|
957
599
|
static usage: (params: UsageParams) => Promise<Result<UsageResult, AutumnError>>;
|
|
958
600
|
attach(params: AttachParams): Promise<Result<{
|
|
959
601
|
customer_id: string;
|
|
602
|
+
product_ids: string[];
|
|
960
603
|
code: string;
|
|
961
604
|
message: string;
|
|
962
|
-
|
|
605
|
+
checkout_url?: string | undefined;
|
|
963
606
|
customer_data?: any;
|
|
964
607
|
invoice?: {
|
|
965
608
|
status: string;
|
|
@@ -968,33 +611,32 @@ declare class Autumn {
|
|
|
968
611
|
total: number;
|
|
969
612
|
currency: string;
|
|
970
613
|
} | undefined;
|
|
971
|
-
checkout_url?: string | undefined;
|
|
972
614
|
}, AutumnError>>;
|
|
973
615
|
static setupPayment: (params: SetupPaymentParams) => Promise<Result<SetupPaymentResult, AutumnError>>;
|
|
974
616
|
setupPayment(params: SetupPaymentParams): Promise<Result<SetupPaymentResult, AutumnError>>;
|
|
975
617
|
static cancel: (params: CancelParams) => Promise<Result<{
|
|
618
|
+
success: boolean;
|
|
976
619
|
customer_id: string;
|
|
977
620
|
product_id: string;
|
|
978
|
-
success: boolean;
|
|
979
621
|
}, AutumnError>>;
|
|
980
622
|
cancel(params: CancelParams): Promise<Result<{
|
|
623
|
+
success: boolean;
|
|
981
624
|
customer_id: string;
|
|
982
625
|
product_id: string;
|
|
983
|
-
success: boolean;
|
|
984
626
|
}, AutumnError>>;
|
|
985
627
|
static check: (params: CheckParams) => Promise<Result<CheckResult, AutumnError>>;
|
|
986
628
|
check(params: CheckParams): Promise<Result<CheckResult, AutumnError>>;
|
|
987
629
|
static track: (params: TrackParams) => Promise<Result<{
|
|
988
|
-
customer_id: string;
|
|
989
|
-
code: string;
|
|
990
630
|
id: string;
|
|
631
|
+
code: string;
|
|
632
|
+
customer_id: string;
|
|
991
633
|
feature_id?: string | undefined;
|
|
992
634
|
event_name?: string | undefined;
|
|
993
635
|
}, AutumnError>>;
|
|
994
636
|
track(params: TrackParams): Promise<Result<{
|
|
995
|
-
customer_id: string;
|
|
996
|
-
code: string;
|
|
997
637
|
id: string;
|
|
638
|
+
code: string;
|
|
639
|
+
customer_id: string;
|
|
998
640
|
feature_id?: string | undefined;
|
|
999
641
|
event_name?: string | undefined;
|
|
1000
642
|
}, AutumnError>>;
|
|
@@ -1034,15 +676,7 @@ declare const TransferProductParamsSchema: z.ZodObject<{
|
|
|
1034
676
|
from_entity_id: z.ZodString;
|
|
1035
677
|
to_entity_id: z.ZodString;
|
|
1036
678
|
product_id: z.ZodString;
|
|
1037
|
-
},
|
|
1038
|
-
product_id: string;
|
|
1039
|
-
from_entity_id: string;
|
|
1040
|
-
to_entity_id: string;
|
|
1041
|
-
}, {
|
|
1042
|
-
product_id: string;
|
|
1043
|
-
from_entity_id: string;
|
|
1044
|
-
to_entity_id: string;
|
|
1045
|
-
}>;
|
|
679
|
+
}, z.core.$strip>;
|
|
1046
680
|
type TransferProductParams = z.infer<typeof TransferProductParamsSchema>;
|
|
1047
681
|
type TransferProductResult = {
|
|
1048
682
|
success: boolean;
|
|
@@ -1051,24 +685,12 @@ type TransferProductResult = {
|
|
|
1051
685
|
declare const CreateReferralCodeParamsSchema: z.ZodObject<{
|
|
1052
686
|
customer_id: z.ZodString;
|
|
1053
687
|
program_id: z.ZodString;
|
|
1054
|
-
},
|
|
1055
|
-
customer_id: string;
|
|
1056
|
-
program_id: string;
|
|
1057
|
-
}, {
|
|
1058
|
-
customer_id: string;
|
|
1059
|
-
program_id: string;
|
|
1060
|
-
}>;
|
|
688
|
+
}, z.core.$strip>;
|
|
1061
689
|
type CreateReferralCodeParams = z.infer<typeof CreateReferralCodeParamsSchema>;
|
|
1062
690
|
declare const RedeemReferralCodeParamsSchema: z.ZodObject<{
|
|
1063
691
|
code: z.ZodString;
|
|
1064
692
|
customer_id: z.ZodString;
|
|
1065
|
-
},
|
|
1066
|
-
customer_id: string;
|
|
1067
|
-
code: string;
|
|
1068
|
-
}, {
|
|
1069
|
-
customer_id: string;
|
|
1070
|
-
code: string;
|
|
1071
|
-
}>;
|
|
693
|
+
}, z.core.$strip>;
|
|
1072
694
|
type RedeemReferralCodeParams = z.infer<typeof RedeemReferralCodeParamsSchema>;
|
|
1073
695
|
|
|
1074
696
|
export { Autumn as A, type CustomerData as C };
|