autumn-js 0.1.10 → 0.1.12
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 +53 -223
- package/dist/libraries/backend/better-auth.d.ts +53 -223
- package/dist/libraries/backend/better-auth.js +322 -152
- package/dist/libraries/backend/better-auth.mjs +8 -8
- package/dist/libraries/backend/{chunk-I43OU64D.mjs → chunk-2DWGCQCF.mjs} +1 -1
- package/dist/libraries/backend/{chunk-JN4ULI5R.mjs → chunk-56RGUNOT.mjs} +1 -1
- package/dist/libraries/backend/{chunk-YN334O74.mjs → chunk-6JI6MF4S.mjs} +1 -1
- package/dist/libraries/backend/{chunk-274BIVOC.mjs → chunk-FA5Z2MOT.mjs} +1 -1
- package/dist/libraries/backend/{chunk-7WWKVE4J.mjs → chunk-NWPFUFXX.mjs} +6 -6
- package/dist/libraries/backend/{chunk-KY3RLTE7.mjs → chunk-Q7SD535L.mjs} +185 -15
- package/dist/libraries/backend/{chunk-EJBD5GH7.mjs → chunk-SDL7BFTH.mjs} +1 -1
- package/dist/libraries/backend/convex.js +318 -148
- package/dist/libraries/backend/convex.mjs +7 -7
- package/dist/libraries/backend/elysia.js +318 -148
- 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 +318 -148
- package/dist/libraries/backend/express.mjs +7 -7
- package/dist/libraries/backend/fastify.js +318 -148
- package/dist/libraries/backend/fastify.mjs +7 -7
- package/dist/libraries/backend/hono.js +318 -148
- 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 +318 -148
- package/dist/libraries/backend/index.mjs +7 -7
- package/dist/libraries/backend/next.js +318 -148
- package/dist/libraries/backend/next.mjs +7 -7
- package/dist/libraries/backend/react-router.js +318 -148
- package/dist/libraries/backend/react-router.mjs +7 -7
- package/dist/libraries/backend/{referralTypes-DpLmOy8-.d.mts → referralTypes-BOsjdpOb.d.mts} +251 -460
- package/dist/libraries/backend/{referralTypes-nXl36Opw.d.ts → referralTypes-DcfU8B6R.d.ts} +251 -460
- package/dist/libraries/backend/remix_dep.js +318 -148
- package/dist/libraries/backend/remix_dep.mjs +7 -7
- package/dist/libraries/backend/routes/backendRouter.js +318 -148
- package/dist/libraries/backend/routes/backendRouter.mjs +7 -7
- package/dist/libraries/backend/routes/entityRoutes.js +318 -148
- package/dist/libraries/backend/routes/entityRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/genRoutes.js +318 -148
- package/dist/libraries/backend/routes/genRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/productRoutes.js +318 -148
- package/dist/libraries/backend/routes/productRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/referralRoutes.js +318 -148
- 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 +318 -148
- package/dist/libraries/backend/supabase.mjs +7 -7
- package/dist/libraries/backend/tanstack.js +318 -148
- package/dist/libraries/backend/tanstack.mjs +7 -7
- package/dist/libraries/backend/utils/backendRes.js +318 -148
- 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 +318 -148
- 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 +318 -148
- package/dist/libraries/react/AutumnContext.mjs +3 -3
- package/dist/libraries/react/BaseAutumnProvider.d.mts +7 -7
- package/dist/libraries/react/BaseAutumnProvider.d.ts +7 -7
- package/dist/libraries/react/BaseAutumnProvider.js +318 -159
- package/dist/libraries/react/BaseAutumnProvider.mjs +8 -8
- package/dist/libraries/react/{ReactAutumnClient-BozBPLWS.d.ts → ReactAutumnClient-CIAkiqwV.d.ts} +21 -21
- package/dist/libraries/react/{ReactAutumnClient-CDp4DLo0.d.mts → ReactAutumnClient-zBxnpPLM.d.mts} +21 -21
- package/dist/libraries/react/ReactAutumnProvider.d.mts +3 -3
- package/dist/libraries/react/ReactAutumnProvider.d.ts +3 -3
- package/dist/libraries/react/ReactAutumnProvider.js +318 -159
- package/dist/libraries/react/ReactAutumnProvider.mjs +9 -9
- package/dist/libraries/react/attachTypes-BQaZHr5e.d.ts +45 -0
- package/dist/libraries/react/attachTypes-Cuxn1ThG.d.mts +45 -0
- package/dist/libraries/react/{chunk-CPN2LD2I.mjs → chunk-26K62U62.mjs} +2 -2
- package/dist/libraries/react/{chunk-JIWMNR2E.mjs → chunk-5O3IHYFF.mjs} +185 -15
- package/dist/libraries/react/{chunk-JJVQIA5V.mjs → chunk-5RTUQSYZ.mjs} +1 -1
- package/dist/libraries/react/{chunk-TBRYCVBL.mjs → chunk-6X76WFOV.mjs} +3 -13
- package/dist/libraries/react/{chunk-4EPRIJNB.mjs → chunk-7A2PZDUO.mjs} +448 -450
- package/dist/libraries/react/{chunk-MKP43WD6.mjs → chunk-7HRCOEUW.mjs} +1 -1
- package/dist/libraries/react/{chunk-IRTAGYDD.mjs → chunk-CMUWZZWV.mjs} +2 -2
- package/dist/libraries/react/{chunk-XTONWQ65.mjs → chunk-DKOF357C.mjs} +1 -1
- package/dist/libraries/react/{chunk-QZPMYB2V.mjs → chunk-HNIU2WNT.mjs} +2 -2
- package/dist/libraries/react/{chunk-KG2NPWAE.mjs → chunk-JTYEHM27.mjs} +1 -1
- package/dist/libraries/react/{chunk-URFTKUL2.mjs → chunk-P6CAHZVT.mjs} +1 -2
- package/dist/libraries/react/{chunk-DRUVAAUW.mjs → chunk-QNMB7QR6.mjs} +3 -3
- package/dist/libraries/react/{chunk-UQ5HI732.mjs → chunk-RK4NRHHQ.mjs} +3 -3
- package/dist/libraries/react/{chunk-7LOW3KZ3.mjs → chunk-ROKCGZ77.mjs} +2 -2
- package/dist/libraries/react/{chunk-E2BEY4ZP.mjs → chunk-TE2MOBO7.mjs} +1 -1
- package/dist/libraries/react/{chunk-3YIV3N5Y.mjs → chunk-VGNA76RG.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 +318 -148
- package/dist/libraries/react/client/ReactAutumnClient.mjs +2 -2
- 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 +341 -171
- 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 +318 -159
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.mjs +24 -24
- 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 +318 -148
- package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.mjs +24 -24
- 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 +318 -159
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +24 -24
- 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-B2m4-oz4.d.mts +111 -0
- package/dist/libraries/react/cusTypes-lMnznWYJ.d.ts +111 -0
- package/dist/libraries/react/{entTypes-ItJ8BoHV.d.mts → entTypes-D-gn1jj2.d.mts} +1 -1
- package/dist/libraries/react/{entTypes-Byz3wYbQ.d.ts → entTypes-WMQRyYAv.d.ts} +1 -1
- package/dist/libraries/react/{genTypes-EyxQImzh.d.ts → genTypes-DdYlVEah.d.mts} +4 -24
- package/dist/libraries/react/{genTypes-DSvR32on.d.mts → genTypes-aPPwPimh.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 +318 -148
- package/dist/libraries/react/hooks/helpers/handleCheck.mjs +2 -2
- package/dist/libraries/react/hooks/helpers/useAutumnBase.d.mts +9 -9
- package/dist/libraries/react/hooks/helpers/useAutumnBase.d.ts +9 -9
- package/dist/libraries/react/hooks/helpers/useAutumnBase.js +318 -149
- 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 +318 -148
- package/dist/libraries/react/hooks/useAnalytics.mjs +4 -4
- package/dist/libraries/react/hooks/useCustomer.d.mts +67 -9
- package/dist/libraries/react/hooks/useCustomer.d.ts +67 -9
- package/dist/libraries/react/hooks/useCustomer.js +318 -159
- package/dist/libraries/react/hooks/useCustomer.mjs +8 -8
- package/dist/libraries/react/hooks/useCustomerBase.d.mts +51 -10
- package/dist/libraries/react/hooks/useCustomerBase.d.ts +51 -10
- package/dist/libraries/react/hooks/useCustomerBase.js +318 -159
- package/dist/libraries/react/hooks/useCustomerBase.mjs +7 -7
- 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 +318 -149
- package/dist/libraries/react/hooks/useEntity.mjs +8 -8
- 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 +318 -149
- package/dist/libraries/react/hooks/useEntityBase.mjs +7 -7
- 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 +318 -148
- package/dist/libraries/react/hooks/usePaywall.mjs +4 -4
- 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 +318 -148
- package/dist/libraries/react/hooks/usePricingTable.mjs +5 -5
- 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 +318 -148
- 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 +148 -403
- package/dist/libraries/react/index.d.ts +148 -403
- package/dist/libraries/react/index.js +318 -159
- package/dist/libraries/react/index.mjs +185 -26
- package/dist/libraries/react/{prodTypes-Bmoibf-M.d.ts → prodTypes-C8xRoBP7.d.mts} +7 -90
- package/dist/libraries/react/{prodTypes-Bmoibf-M.d.mts → prodTypes-C8xRoBP7.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 +22 -22
- package/dist/next/client/NextAutumnClient.d.ts +22 -22
- 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-Bf0302Om.d.mts → entTypes-CXZqtZX3.d.mts} +1 -1
- package/dist/next/client/{entTypes-KSBxuyW-.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 +52 -23
- package/dist/next/client/hooks/useCustomer.d.ts +52 -23
- 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 +229 -252
- package/dist/next/server/cusActions.d.ts +229 -252
- package/dist/next/server/{cusTypes-Cu6SOTmn.d.mts → cusTypes-CTuY9T7g.d.mts} +26 -212
- package/dist/next/server/{cusTypes-Cu6SOTmn.d.ts → cusTypes-CTuY9T7g.d.ts} +26 -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 +272 -534
- package/dist/sdk/index.d.ts +272 -534
- package/dist/sdk/index.js +318 -148
- package/dist/sdk/index.mjs +185 -15
- package/dist/utils/encryptUtils.js +318 -148
- package/dist/utils/encryptUtils.mjs +185 -15
- package/package.json +2 -2
- package/dist/libraries/react/attachTypes-BqXH38Ft.d.mts +0 -91
- package/dist/libraries/react/attachTypes-DxfaWOQB.d.ts +0 -91
- package/dist/libraries/react/cusTypes-B2w8Kg9H.d.mts +0 -198
- package/dist/libraries/react/cusTypes-C8UH2xVw.d.ts +0 -198
- package/dist/next/client/attachTypes--97TsCMB.d.mts +0 -91
- package/dist/next/client/attachTypes-B1sM-0vf.d.ts +0 -91
- package/dist/next/client/clientAttachTypes-BXtfXB4v.d.ts +0 -251
- package/dist/next/client/clientAttachTypes-qsdoMt_B.d.mts +0 -251
- package/dist/next/client/cusTypes-DRJ574aU.d.ts +0 -198
- package/dist/next/client/cusTypes-c6-g1-Yy.d.mts +0 -198
- package/dist/libraries/react/{chunk-7JNU5ABT.mjs → chunk-FJWZPMWU.mjs} +3 -3
- package/dist/libraries/react/{chunk-LCWL3TIT.mjs → chunk-OTZ65PCT.mjs} +3 -3
package/dist/libraries/backend/{referralTypes-DpLmOy8-.d.mts → referralTypes-BOsjdpOb.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
|
-
customer_id: string;
|
|
82
|
-
feature_id: string;
|
|
83
|
-
required_balance: number;
|
|
84
|
-
allowed: boolean;
|
|
85
|
-
entity_id?: string | undefined;
|
|
86
|
-
usage_limit?: number | 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
|
-
customer_id: string;
|
|
111
|
-
feature_id: string;
|
|
112
|
-
required_balance: number;
|
|
113
|
-
allowed: boolean;
|
|
114
|
-
entity_id?: string | undefined;
|
|
115
|
-
usage_limit?: number | 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;
|
|
@@ -401,15 +247,7 @@ declare const CustomerDataSchema: z.ZodObject<{
|
|
|
401
247
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
402
248
|
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
403
249
|
fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
404
|
-
},
|
|
405
|
-
name?: string | null | undefined;
|
|
406
|
-
email?: string | null | undefined;
|
|
407
|
-
fingerprint?: string | null | undefined;
|
|
408
|
-
}, {
|
|
409
|
-
name?: string | null | undefined;
|
|
410
|
-
email?: string | null | undefined;
|
|
411
|
-
fingerprint?: string | null | undefined;
|
|
412
|
-
}>;
|
|
250
|
+
}, z.core.$strip>;
|
|
413
251
|
type CustomerData = z.infer<typeof CustomerDataSchema>;
|
|
414
252
|
interface GetCustomerParams {
|
|
415
253
|
expand?: CustomerExpandOption[];
|
|
@@ -420,22 +258,15 @@ declare const CreateCustomerParamsSchema: z.ZodObject<{
|
|
|
420
258
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
421
259
|
fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
422
260
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
423
|
-
expand: z.ZodOptional<z.ZodArray<z.ZodEnum<
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
},
|
|
432
|
-
metadata?: Record<string, any> | undefined;
|
|
433
|
-
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
434
|
-
name?: string | null | undefined;
|
|
435
|
-
email?: string | null | undefined;
|
|
436
|
-
fingerprint?: string | null | undefined;
|
|
437
|
-
id?: string | null | undefined;
|
|
438
|
-
}>;
|
|
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>;
|
|
439
270
|
type CreateCustomerParams = z.infer<typeof CreateCustomerParamsSchema>;
|
|
440
271
|
interface UpdateCustomerParams {
|
|
441
272
|
id?: string | null;
|
|
@@ -445,11 +276,7 @@ interface UpdateCustomerParams {
|
|
|
445
276
|
}
|
|
446
277
|
declare const BillingPortalParamsSchema: z.ZodObject<{
|
|
447
278
|
return_url: z.ZodOptional<z.ZodString>;
|
|
448
|
-
},
|
|
449
|
-
return_url?: string | undefined;
|
|
450
|
-
}, {
|
|
451
|
-
return_url?: string | undefined;
|
|
452
|
-
}>;
|
|
279
|
+
}, z.core.$strip>;
|
|
453
280
|
type BillingPortalParams = z.infer<typeof BillingPortalParamsSchema>;
|
|
454
281
|
interface BillingPortalResult {
|
|
455
282
|
customer_id: string;
|
|
@@ -467,22 +294,10 @@ interface CustomerInvoice {
|
|
|
467
294
|
declare const UpdateBalancesParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
468
295
|
feature_id: z.ZodString;
|
|
469
296
|
balance: z.ZodNumber;
|
|
470
|
-
},
|
|
471
|
-
feature_id: string;
|
|
472
|
-
balance: number;
|
|
473
|
-
}, {
|
|
474
|
-
feature_id: string;
|
|
475
|
-
balance: number;
|
|
476
|
-
}>, z.ZodArray<z.ZodObject<{
|
|
297
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
477
298
|
feature_id: z.ZodString;
|
|
478
299
|
balance: z.ZodNumber;
|
|
479
|
-
},
|
|
480
|
-
feature_id: string;
|
|
481
|
-
balance: number;
|
|
482
|
-
}, {
|
|
483
|
-
feature_id: string;
|
|
484
|
-
balance: number;
|
|
485
|
-
}>, "many">]>;
|
|
300
|
+
}, z.core.$strip>>]>;
|
|
486
301
|
type UpdateBalancesParams = z.infer<typeof UpdateBalancesParamsSchema>;
|
|
487
302
|
type UpdateBalancesResult = {
|
|
488
303
|
success: boolean;
|
|
@@ -493,17 +308,7 @@ declare const CancelParamsSchema: z.ZodObject<{
|
|
|
493
308
|
product_id: z.ZodString;
|
|
494
309
|
entity_id: z.ZodOptional<z.ZodString>;
|
|
495
310
|
cancel_immediately: z.ZodOptional<z.ZodBoolean>;
|
|
496
|
-
},
|
|
497
|
-
customer_id: string;
|
|
498
|
-
product_id: string;
|
|
499
|
-
entity_id?: string | undefined;
|
|
500
|
-
cancel_immediately?: boolean | undefined;
|
|
501
|
-
}, {
|
|
502
|
-
customer_id: string;
|
|
503
|
-
product_id: string;
|
|
504
|
-
entity_id?: string | undefined;
|
|
505
|
-
cancel_immediately?: boolean | undefined;
|
|
506
|
-
}>;
|
|
311
|
+
}, z.core.$strip>;
|
|
507
312
|
type CancelParams = z.infer<typeof CancelParamsSchema>;
|
|
508
313
|
declare const TrackParamsSchema: z.ZodObject<{
|
|
509
314
|
customer_id: z.ZodString;
|
|
@@ -514,25 +319,7 @@ declare const TrackParamsSchema: z.ZodObject<{
|
|
|
514
319
|
customer_data: z.ZodOptional<z.ZodAny>;
|
|
515
320
|
idempotency_key: z.ZodOptional<z.ZodString>;
|
|
516
321
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
517
|
-
},
|
|
518
|
-
customer_id: string;
|
|
519
|
-
value?: number | undefined;
|
|
520
|
-
entity_id?: string | undefined;
|
|
521
|
-
feature_id?: string | undefined;
|
|
522
|
-
customer_data?: any;
|
|
523
|
-
entity_data?: any;
|
|
524
|
-
event_name?: string | undefined;
|
|
525
|
-
idempotency_key?: string | undefined;
|
|
526
|
-
}, {
|
|
527
|
-
customer_id: string;
|
|
528
|
-
value?: number | undefined;
|
|
529
|
-
entity_id?: string | undefined;
|
|
530
|
-
feature_id?: string | undefined;
|
|
531
|
-
customer_data?: any;
|
|
532
|
-
entity_data?: any;
|
|
533
|
-
event_name?: string | undefined;
|
|
534
|
-
idempotency_key?: string | undefined;
|
|
535
|
-
}>;
|
|
322
|
+
}, z.core.$strip>;
|
|
536
323
|
type TrackParams = z.infer<typeof TrackParamsSchema>;
|
|
537
324
|
declare const CheckParamsSchema: z.ZodObject<{
|
|
538
325
|
customer_id: z.ZodString;
|
|
@@ -546,40 +333,8 @@ declare const CheckParamsSchema: z.ZodObject<{
|
|
|
546
333
|
entity_data: z.ZodOptional<z.ZodObject<{
|
|
547
334
|
name: z.ZodOptional<z.ZodString>;
|
|
548
335
|
feature_id: z.ZodString;
|
|
549
|
-
},
|
|
550
|
-
|
|
551
|
-
name?: string | undefined;
|
|
552
|
-
}, {
|
|
553
|
-
feature_id: string;
|
|
554
|
-
name?: string | undefined;
|
|
555
|
-
}>>;
|
|
556
|
-
}, "strip", z.ZodTypeAny, {
|
|
557
|
-
customer_id: string;
|
|
558
|
-
product_id?: string | undefined;
|
|
559
|
-
entity_id?: string | undefined;
|
|
560
|
-
feature_id?: string | undefined;
|
|
561
|
-
customer_data?: any;
|
|
562
|
-
entity_data?: {
|
|
563
|
-
feature_id: string;
|
|
564
|
-
name?: string | undefined;
|
|
565
|
-
} | undefined;
|
|
566
|
-
required_balance?: number | undefined;
|
|
567
|
-
send_event?: boolean | undefined;
|
|
568
|
-
with_preview?: boolean | undefined;
|
|
569
|
-
}, {
|
|
570
|
-
customer_id: string;
|
|
571
|
-
product_id?: string | undefined;
|
|
572
|
-
entity_id?: string | undefined;
|
|
573
|
-
feature_id?: string | undefined;
|
|
574
|
-
customer_data?: any;
|
|
575
|
-
entity_data?: {
|
|
576
|
-
feature_id: string;
|
|
577
|
-
name?: string | undefined;
|
|
578
|
-
} | undefined;
|
|
579
|
-
required_balance?: number | undefined;
|
|
580
|
-
send_event?: boolean | undefined;
|
|
581
|
-
with_preview?: boolean | undefined;
|
|
582
|
-
}>;
|
|
336
|
+
}, z.core.$strip>>;
|
|
337
|
+
}, z.core.$strip>;
|
|
583
338
|
type CheckParams = z.infer<typeof CheckParamsSchema>;
|
|
584
339
|
type CheckResult = CheckFeatureResult & CheckProductResult;
|
|
585
340
|
interface UsageParams {
|
|
@@ -604,17 +359,15 @@ interface SetupPaymentResult {
|
|
|
604
359
|
}
|
|
605
360
|
declare const QueryParamsSchema: z.ZodObject<{
|
|
606
361
|
customer_id: z.ZodString;
|
|
607
|
-
feature_id: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString
|
|
608
|
-
range: z.ZodOptional<z.ZodEnum<
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | undefined;
|
|
617
|
-
}>;
|
|
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>;
|
|
618
371
|
type QueryParams = z.infer<typeof QueryParamsSchema>;
|
|
619
372
|
type QueryResult = {
|
|
620
373
|
list: Array<{
|
|
@@ -627,13 +380,7 @@ type QueryResult = {
|
|
|
627
380
|
declare const AttachFeatureOptionsSchema: z.ZodObject<{
|
|
628
381
|
feature_id: z.ZodString;
|
|
629
382
|
quantity: z.ZodNumber;
|
|
630
|
-
},
|
|
631
|
-
feature_id: string;
|
|
632
|
-
quantity: number;
|
|
633
|
-
}, {
|
|
634
|
-
feature_id: string;
|
|
635
|
-
quantity: number;
|
|
636
|
-
}>;
|
|
383
|
+
}, z.core.$strip>;
|
|
637
384
|
type AttachFeatureOptions = z.infer<typeof AttachFeatureOptionsSchema>;
|
|
638
385
|
declare const AttachParamsSchema: z.ZodObject<{
|
|
639
386
|
customer_id: z.ZodString;
|
|
@@ -642,14 +389,8 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
642
389
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
643
390
|
feature_id: z.ZodString;
|
|
644
391
|
quantity: z.ZodNumber;
|
|
645
|
-
},
|
|
646
|
-
|
|
647
|
-
quantity: number;
|
|
648
|
-
}, {
|
|
649
|
-
feature_id: string;
|
|
650
|
-
quantity: number;
|
|
651
|
-
}>, "many">>;
|
|
652
|
-
product_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
392
|
+
}, z.core.$strip>>>;
|
|
393
|
+
product_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
653
394
|
free_trial: z.ZodOptional<z.ZodBoolean>;
|
|
654
395
|
success_url: z.ZodOptional<z.ZodString>;
|
|
655
396
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -658,64 +399,12 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
658
399
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
659
400
|
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
660
401
|
fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
661
|
-
},
|
|
662
|
-
name?: string | null | undefined;
|
|
663
|
-
email?: string | null | undefined;
|
|
664
|
-
fingerprint?: string | null | undefined;
|
|
665
|
-
}, {
|
|
666
|
-
name?: string | null | undefined;
|
|
667
|
-
email?: string | null | undefined;
|
|
668
|
-
fingerprint?: string | null | undefined;
|
|
669
|
-
}>>;
|
|
402
|
+
}, z.core.$strip>>;
|
|
670
403
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
671
404
|
checkout_session_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
672
405
|
reward: z.ZodOptional<z.ZodString>;
|
|
673
406
|
invoice: z.ZodOptional<z.ZodBoolean>;
|
|
674
|
-
},
|
|
675
|
-
customer_id: string;
|
|
676
|
-
options?: {
|
|
677
|
-
feature_id: string;
|
|
678
|
-
quantity: number;
|
|
679
|
-
}[] | undefined;
|
|
680
|
-
metadata?: Record<string, string> | undefined;
|
|
681
|
-
product_id?: string | undefined;
|
|
682
|
-
entity_id?: string | undefined;
|
|
683
|
-
success_url?: string | undefined;
|
|
684
|
-
customer_data?: {
|
|
685
|
-
name?: string | null | undefined;
|
|
686
|
-
email?: string | null | undefined;
|
|
687
|
-
fingerprint?: string | null | undefined;
|
|
688
|
-
} | undefined;
|
|
689
|
-
entity_data?: any;
|
|
690
|
-
checkout_session_params?: Record<string, any> | undefined;
|
|
691
|
-
reward?: string | undefined;
|
|
692
|
-
product_ids?: string[] | undefined;
|
|
693
|
-
free_trial?: boolean | undefined;
|
|
694
|
-
force_checkout?: boolean | undefined;
|
|
695
|
-
invoice?: boolean | undefined;
|
|
696
|
-
}, {
|
|
697
|
-
customer_id: string;
|
|
698
|
-
options?: {
|
|
699
|
-
feature_id: string;
|
|
700
|
-
quantity: number;
|
|
701
|
-
}[] | undefined;
|
|
702
|
-
metadata?: Record<string, string> | undefined;
|
|
703
|
-
product_id?: string | undefined;
|
|
704
|
-
entity_id?: string | undefined;
|
|
705
|
-
success_url?: string | undefined;
|
|
706
|
-
customer_data?: {
|
|
707
|
-
name?: string | null | undefined;
|
|
708
|
-
email?: string | null | undefined;
|
|
709
|
-
fingerprint?: string | null | undefined;
|
|
710
|
-
} | undefined;
|
|
711
|
-
entity_data?: any;
|
|
712
|
-
checkout_session_params?: Record<string, any> | undefined;
|
|
713
|
-
reward?: string | undefined;
|
|
714
|
-
product_ids?: string[] | undefined;
|
|
715
|
-
free_trial?: boolean | undefined;
|
|
716
|
-
force_checkout?: boolean | undefined;
|
|
717
|
-
invoice?: boolean | undefined;
|
|
718
|
-
}>;
|
|
407
|
+
}, z.core.$strip>;
|
|
719
408
|
type AttachParams = z.infer<typeof AttachParamsSchema>;
|
|
720
409
|
declare const CheckoutParamsSchema: z.ZodObject<{
|
|
721
410
|
customer_id: z.ZodString;
|
|
@@ -724,65 +413,19 @@ declare const CheckoutParamsSchema: z.ZodObject<{
|
|
|
724
413
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
725
414
|
feature_id: z.ZodString;
|
|
726
415
|
quantity: z.ZodNumber;
|
|
727
|
-
},
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
}, {
|
|
731
|
-
feature_id: string;
|
|
732
|
-
quantity: number;
|
|
733
|
-
}>, "many">>;
|
|
416
|
+
}, z.core.$strip>>>;
|
|
417
|
+
force_checkout: z.ZodOptional<z.ZodBoolean>;
|
|
418
|
+
invoice: z.ZodOptional<z.ZodBoolean>;
|
|
734
419
|
success_url: z.ZodOptional<z.ZodString>;
|
|
735
420
|
customer_data: z.ZodOptional<z.ZodObject<{
|
|
736
421
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
737
422
|
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
738
423
|
fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
739
|
-
},
|
|
740
|
-
name?: string | null | undefined;
|
|
741
|
-
email?: string | null | undefined;
|
|
742
|
-
fingerprint?: string | null | undefined;
|
|
743
|
-
}, {
|
|
744
|
-
name?: string | null | undefined;
|
|
745
|
-
email?: string | null | undefined;
|
|
746
|
-
fingerprint?: string | null | undefined;
|
|
747
|
-
}>>;
|
|
424
|
+
}, z.core.$strip>>;
|
|
748
425
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
749
426
|
checkout_session_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
750
427
|
reward: z.ZodOptional<z.ZodString>;
|
|
751
|
-
},
|
|
752
|
-
customer_id: string;
|
|
753
|
-
product_id: string;
|
|
754
|
-
options?: {
|
|
755
|
-
feature_id: string;
|
|
756
|
-
quantity: number;
|
|
757
|
-
}[] | undefined;
|
|
758
|
-
entity_id?: string | undefined;
|
|
759
|
-
success_url?: string | undefined;
|
|
760
|
-
customer_data?: {
|
|
761
|
-
name?: string | null | undefined;
|
|
762
|
-
email?: string | null | undefined;
|
|
763
|
-
fingerprint?: string | null | undefined;
|
|
764
|
-
} | undefined;
|
|
765
|
-
entity_data?: any;
|
|
766
|
-
checkout_session_params?: Record<string, any> | undefined;
|
|
767
|
-
reward?: string | undefined;
|
|
768
|
-
}, {
|
|
769
|
-
customer_id: string;
|
|
770
|
-
product_id: string;
|
|
771
|
-
options?: {
|
|
772
|
-
feature_id: string;
|
|
773
|
-
quantity: number;
|
|
774
|
-
}[] | undefined;
|
|
775
|
-
entity_id?: string | undefined;
|
|
776
|
-
success_url?: string | undefined;
|
|
777
|
-
customer_data?: {
|
|
778
|
-
name?: string | null | undefined;
|
|
779
|
-
email?: string | null | undefined;
|
|
780
|
-
fingerprint?: string | null | undefined;
|
|
781
|
-
} | undefined;
|
|
782
|
-
entity_data?: any;
|
|
783
|
-
checkout_session_params?: Record<string, any> | undefined;
|
|
784
|
-
reward?: string | undefined;
|
|
785
|
-
}>;
|
|
428
|
+
}, z.core.$strip>;
|
|
786
429
|
type CheckoutParams = z.infer<typeof CheckoutParamsSchema>;
|
|
787
430
|
type CheckoutResult = {
|
|
788
431
|
url?: string;
|
|
@@ -810,33 +453,33 @@ declare enum FeatureType {
|
|
|
810
453
|
ContinuousUse = "continuous_use",
|
|
811
454
|
CreditSystem = "credit_system"
|
|
812
455
|
}
|
|
813
|
-
declare const FeatureSchema: z.ZodObject<{
|
|
814
|
-
id: z.ZodString;
|
|
815
|
-
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
816
|
-
type: z.ZodNativeEnum<typeof FeatureType>;
|
|
817
|
-
display: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
818
|
-
singular: z.ZodString;
|
|
819
|
-
plural: z.ZodString;
|
|
820
|
-
}, "strip", z.ZodTypeAny, {
|
|
456
|
+
declare const FeatureSchema: z$1.ZodObject<{
|
|
457
|
+
id: z$1.ZodString;
|
|
458
|
+
name: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
459
|
+
type: z$1.ZodNativeEnum<typeof FeatureType>;
|
|
460
|
+
display: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodObject<{
|
|
461
|
+
singular: z$1.ZodString;
|
|
462
|
+
plural: z$1.ZodString;
|
|
463
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
821
464
|
singular: string;
|
|
822
465
|
plural: string;
|
|
823
466
|
}, {
|
|
824
467
|
singular: string;
|
|
825
468
|
plural: string;
|
|
826
469
|
}>>>;
|
|
827
|
-
credit_schema: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
828
|
-
metered_feature_id: z.ZodString;
|
|
829
|
-
credit_cost: z.ZodNumber;
|
|
830
|
-
}, "strip", z.ZodTypeAny, {
|
|
470
|
+
credit_schema: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodObject<{
|
|
471
|
+
metered_feature_id: z$1.ZodString;
|
|
472
|
+
credit_cost: z$1.ZodNumber;
|
|
473
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
831
474
|
metered_feature_id: string;
|
|
832
475
|
credit_cost: number;
|
|
833
476
|
}, {
|
|
834
477
|
metered_feature_id: string;
|
|
835
478
|
credit_cost: number;
|
|
836
479
|
}>, "many">>>;
|
|
837
|
-
}, "strip", z.ZodTypeAny, {
|
|
838
|
-
type: FeatureType;
|
|
480
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
839
481
|
id: string;
|
|
482
|
+
type: FeatureType;
|
|
840
483
|
name?: string | null | undefined;
|
|
841
484
|
credit_schema?: {
|
|
842
485
|
metered_feature_id: string;
|
|
@@ -847,8 +490,8 @@ declare const FeatureSchema: z.ZodObject<{
|
|
|
847
490
|
plural: string;
|
|
848
491
|
} | null | undefined;
|
|
849
492
|
}, {
|
|
850
|
-
type: FeatureType;
|
|
851
493
|
id: string;
|
|
494
|
+
type: FeatureType;
|
|
852
495
|
name?: string | null | undefined;
|
|
853
496
|
credit_schema?: {
|
|
854
497
|
metered_feature_id: string;
|
|
@@ -859,7 +502,7 @@ declare const FeatureSchema: z.ZodObject<{
|
|
|
859
502
|
plural: string;
|
|
860
503
|
} | null | undefined;
|
|
861
504
|
}>;
|
|
862
|
-
type Feature = z.infer<typeof FeatureSchema>;
|
|
505
|
+
type Feature = z$1.infer<typeof FeatureSchema>;
|
|
863
506
|
|
|
864
507
|
declare class Autumn {
|
|
865
508
|
private readonly secretKey;
|
|
@@ -938,13 +581,68 @@ declare class Autumn {
|
|
|
938
581
|
list: Feature[];
|
|
939
582
|
}, AutumnError>>;
|
|
940
583
|
};
|
|
941
|
-
|
|
584
|
+
/**
|
|
585
|
+
* Initiates a checkout flow for a product purchase.
|
|
586
|
+
*
|
|
587
|
+
* The checkout function handles the purchase process for products with pricing.
|
|
588
|
+
* It determines whether to show a dialog for user input or redirect directly
|
|
589
|
+
* to Stripe based on the customer's state and product requirements.
|
|
590
|
+
*
|
|
591
|
+
* @param params - Checkout parameters including product ID, customer data, and options
|
|
592
|
+
* @returns Promise resolving to checkout details including pricing, prorations, and URLs
|
|
593
|
+
*
|
|
594
|
+
* @example
|
|
595
|
+
* ```typescript
|
|
596
|
+
* const result = await autumn.checkout({
|
|
597
|
+
* customer_id: "user_123",
|
|
598
|
+
* product_id: "pro",
|
|
599
|
+
* success_url: "https://myapp.com/success"
|
|
600
|
+
* });
|
|
601
|
+
*
|
|
602
|
+
* if (result.url) {
|
|
603
|
+
* // Redirect to Stripe checkout
|
|
604
|
+
* window.location.href = result.url;
|
|
605
|
+
* }
|
|
606
|
+
* ```
|
|
607
|
+
*/
|
|
942
608
|
checkout(params: CheckoutParams): Promise<Result<CheckoutResult, AutumnError>>;
|
|
943
|
-
static
|
|
944
|
-
|
|
945
|
-
|
|
609
|
+
static checkout: (params: CheckoutParams) => Promise<Result<CheckoutResult, AutumnError>>;
|
|
610
|
+
static usage: (params: UsageParams) => Promise<Result<UsageResult, AutumnError>>;
|
|
611
|
+
/**
|
|
612
|
+
* Attaches a product to a customer, enabling access and handling billing.
|
|
613
|
+
*
|
|
614
|
+
* The attach function activates a product for a customer and applies all product items.
|
|
615
|
+
* When you attach a product:
|
|
616
|
+
* - The customer gains access to all features in the product
|
|
617
|
+
* - If the product has prices, the customer will be billed accordingly
|
|
618
|
+
* - If there's no existing payment method, a checkout URL will be generated
|
|
619
|
+
*
|
|
620
|
+
* @param params - Attach parameters including customer ID, product ID, and options
|
|
621
|
+
* @returns Promise resolving to attachment result with checkout URL if needed
|
|
622
|
+
*
|
|
623
|
+
* @example
|
|
624
|
+
* ```typescript
|
|
625
|
+
* const result = await autumn.attach({
|
|
626
|
+
* customer_id: "user_123",
|
|
627
|
+
* product_id: "pro",
|
|
628
|
+
* success_url: "https://myapp.com/success"
|
|
629
|
+
* });
|
|
630
|
+
*
|
|
631
|
+
* if (result.checkout_url) {
|
|
632
|
+
* // Payment required - redirect to checkout
|
|
633
|
+
* window.location.href = result.checkout_url;
|
|
634
|
+
* } else {
|
|
635
|
+
* // Product successfully attached
|
|
636
|
+
* console.log("Access granted:", result.message);
|
|
637
|
+
* }
|
|
638
|
+
* ```
|
|
639
|
+
*/
|
|
640
|
+
attach(params: AttachParams): Promise<Result<{
|
|
946
641
|
customer_id: string;
|
|
947
642
|
product_ids: string[];
|
|
643
|
+
code: string;
|
|
644
|
+
message: string;
|
|
645
|
+
checkout_url?: string | undefined;
|
|
948
646
|
customer_data?: any;
|
|
949
647
|
invoice?: {
|
|
950
648
|
status: string;
|
|
@@ -953,14 +651,13 @@ declare class Autumn {
|
|
|
953
651
|
total: number;
|
|
954
652
|
currency: string;
|
|
955
653
|
} | undefined;
|
|
956
|
-
checkout_url?: string | undefined;
|
|
957
654
|
}, AutumnError>>;
|
|
958
|
-
static
|
|
959
|
-
attach(params: AttachParams): Promise<Result<{
|
|
960
|
-
message: string;
|
|
961
|
-
code: string;
|
|
655
|
+
static attach: (params: AttachParams) => Promise<Result<{
|
|
962
656
|
customer_id: string;
|
|
963
657
|
product_ids: string[];
|
|
658
|
+
code: string;
|
|
659
|
+
message: string;
|
|
660
|
+
checkout_url?: string | undefined;
|
|
964
661
|
customer_data?: any;
|
|
965
662
|
invoice?: {
|
|
966
663
|
status: string;
|
|
@@ -969,38 +666,152 @@ declare class Autumn {
|
|
|
969
666
|
total: number;
|
|
970
667
|
currency: string;
|
|
971
668
|
} | undefined;
|
|
972
|
-
checkout_url?: string | undefined;
|
|
973
669
|
}, AutumnError>>;
|
|
974
670
|
static setupPayment: (params: SetupPaymentParams) => Promise<Result<SetupPaymentResult, AutumnError>>;
|
|
671
|
+
/**
|
|
672
|
+
* Sets up a payment method for a customer.
|
|
673
|
+
*
|
|
674
|
+
* This method allows you to set up payment methods for customers without
|
|
675
|
+
* immediately charging them. Useful for collecting payment information
|
|
676
|
+
* before product attachment or for updating existing payment methods.
|
|
677
|
+
*
|
|
678
|
+
* @param params - Setup payment parameters including customer information
|
|
679
|
+
* @returns Promise resolving to setup payment result
|
|
680
|
+
*
|
|
681
|
+
* @example
|
|
682
|
+
* ```typescript
|
|
683
|
+
* const result = await autumn.setupPayment({
|
|
684
|
+
* customer_id: "user_123"
|
|
685
|
+
* });
|
|
686
|
+
* ```
|
|
687
|
+
*/
|
|
975
688
|
setupPayment(params: SetupPaymentParams): Promise<Result<SetupPaymentResult, AutumnError>>;
|
|
976
689
|
static cancel: (params: CancelParams) => Promise<Result<{
|
|
690
|
+
success: boolean;
|
|
977
691
|
customer_id: string;
|
|
978
692
|
product_id: string;
|
|
979
|
-
success: boolean;
|
|
980
693
|
}, AutumnError>>;
|
|
694
|
+
/**
|
|
695
|
+
* Cancels a customer's subscription or product attachment.
|
|
696
|
+
*
|
|
697
|
+
* This method allows you to cancel a customer's subscription to a specific product.
|
|
698
|
+
* You can choose to cancel immediately or at the end of the billing cycle.
|
|
699
|
+
*
|
|
700
|
+
* @param params - Cancel parameters including customer ID and product ID
|
|
701
|
+
* @returns Promise resolving to cancellation result
|
|
702
|
+
*
|
|
703
|
+
* @example
|
|
704
|
+
* ```typescript
|
|
705
|
+
* const result = await autumn.cancel({
|
|
706
|
+
* customer_id: "user_123",
|
|
707
|
+
* product_id: "pro",
|
|
708
|
+
* cancel_immediately: false // Cancel at end of billing cycle
|
|
709
|
+
* });
|
|
710
|
+
* ```
|
|
711
|
+
*/
|
|
981
712
|
cancel(params: CancelParams): Promise<Result<{
|
|
713
|
+
success: boolean;
|
|
982
714
|
customer_id: string;
|
|
983
715
|
product_id: string;
|
|
984
|
-
success: boolean;
|
|
985
716
|
}, AutumnError>>;
|
|
986
717
|
static check: (params: CheckParams) => Promise<Result<CheckResult, AutumnError>>;
|
|
718
|
+
/**
|
|
719
|
+
* Checks if a customer has access to a specific feature.
|
|
720
|
+
*
|
|
721
|
+
* This method verifies whether a customer has permission to use a feature
|
|
722
|
+
* and checks their remaining balance/usage limits. It can be used to gate
|
|
723
|
+
* features and determine when to show upgrade prompts.
|
|
724
|
+
*
|
|
725
|
+
* @param params - Check parameters including customer ID and feature ID
|
|
726
|
+
* @returns Promise resolving to access check result with allowed status and balance info
|
|
727
|
+
*
|
|
728
|
+
* @example
|
|
729
|
+
* ```typescript
|
|
730
|
+
* const result = await autumn.check({
|
|
731
|
+
* customer_id: "user_123",
|
|
732
|
+
* feature_id: "messages",
|
|
733
|
+
* required_balance: 1
|
|
734
|
+
* });
|
|
735
|
+
*
|
|
736
|
+
* if (!result.allowed) {
|
|
737
|
+
* console.log("Feature access denied - upgrade required");
|
|
738
|
+
* }
|
|
739
|
+
* ```
|
|
740
|
+
*/
|
|
987
741
|
check(params: CheckParams): Promise<Result<CheckResult, AutumnError>>;
|
|
988
742
|
static track: (params: TrackParams) => Promise<Result<{
|
|
743
|
+
id: string;
|
|
989
744
|
code: string;
|
|
990
745
|
customer_id: string;
|
|
991
|
-
id: string;
|
|
992
746
|
feature_id?: string | undefined;
|
|
993
747
|
event_name?: string | undefined;
|
|
994
748
|
}, AutumnError>>;
|
|
749
|
+
/**
|
|
750
|
+
* Tracks usage events for features or analytics.
|
|
751
|
+
*
|
|
752
|
+
* This method records usage events for metered features, updating the customer's
|
|
753
|
+
* balance and usage statistics. It's typically used server-side to ensure
|
|
754
|
+
* accurate tracking that cannot be manipulated by users.
|
|
755
|
+
*
|
|
756
|
+
* @param params - Track parameters including customer ID, feature ID, and usage value
|
|
757
|
+
* @returns Promise resolving to tracking result
|
|
758
|
+
*
|
|
759
|
+
* @example
|
|
760
|
+
* ```typescript
|
|
761
|
+
* const result = await autumn.track({
|
|
762
|
+
* customer_id: "user_123",
|
|
763
|
+
* feature_id: "messages",
|
|
764
|
+
* value: 1 // Track 1 message sent
|
|
765
|
+
* });
|
|
766
|
+
* ```
|
|
767
|
+
*/
|
|
995
768
|
track(params: TrackParams): Promise<Result<{
|
|
769
|
+
id: string;
|
|
996
770
|
code: string;
|
|
997
771
|
customer_id: string;
|
|
998
|
-
id: string;
|
|
999
772
|
feature_id?: string | undefined;
|
|
1000
773
|
event_name?: string | undefined;
|
|
1001
774
|
}, AutumnError>>;
|
|
775
|
+
/**
|
|
776
|
+
* Retrieves usage statistics and analytics for a customer.
|
|
777
|
+
*
|
|
778
|
+
* This method fetches detailed usage information for a customer's features,
|
|
779
|
+
* including current balances, usage history, and analytics data. Useful
|
|
780
|
+
* for displaying usage dashboards or generating reports.
|
|
781
|
+
*
|
|
782
|
+
* @param params - Usage parameters including customer ID and optional filters
|
|
783
|
+
* @returns Promise resolving to usage statistics and analytics data
|
|
784
|
+
*
|
|
785
|
+
* @example
|
|
786
|
+
* ```typescript
|
|
787
|
+
* const result = await autumn.usage({
|
|
788
|
+
* customer_id: "user_123",
|
|
789
|
+
* feature_id: "messages"
|
|
790
|
+
* value: 20 // Usage value
|
|
791
|
+
* });
|
|
792
|
+
* ```
|
|
793
|
+
*/
|
|
1002
794
|
usage(params: UsageParams): Promise<Result<UsageResult, AutumnError>>;
|
|
1003
795
|
static query: (params: QueryParams) => Promise<Result<QueryResult, AutumnError>>;
|
|
796
|
+
/**
|
|
797
|
+
* Performs advanced queries on customer data and analytics.
|
|
798
|
+
*
|
|
799
|
+
* This method allows you to run complex queries against customer data,
|
|
800
|
+
* usage patterns, and billing information. Useful for generating reports,
|
|
801
|
+
* analytics, and custom data insights.
|
|
802
|
+
*
|
|
803
|
+
* @param params - Query parameters including customer ID and query specifications
|
|
804
|
+
* @returns Promise resolving to query results with requested data
|
|
805
|
+
*
|
|
806
|
+
* @example
|
|
807
|
+
* ```typescript
|
|
808
|
+
* const result = await autumn.query({
|
|
809
|
+
* customer_id: "user_123",
|
|
810
|
+
* feature_id: "messages" // feature id to fetch for query, can also be an array
|
|
811
|
+
* });
|
|
812
|
+
*
|
|
813
|
+
* ```
|
|
814
|
+
*/
|
|
1004
815
|
query(params: QueryParams): Promise<Result<QueryResult, AutumnError>>;
|
|
1005
816
|
}
|
|
1006
817
|
|
|
@@ -1035,15 +846,7 @@ declare const TransferProductParamsSchema: z.ZodObject<{
|
|
|
1035
846
|
from_entity_id: z.ZodString;
|
|
1036
847
|
to_entity_id: z.ZodString;
|
|
1037
848
|
product_id: z.ZodString;
|
|
1038
|
-
},
|
|
1039
|
-
product_id: string;
|
|
1040
|
-
from_entity_id: string;
|
|
1041
|
-
to_entity_id: string;
|
|
1042
|
-
}, {
|
|
1043
|
-
product_id: string;
|
|
1044
|
-
from_entity_id: string;
|
|
1045
|
-
to_entity_id: string;
|
|
1046
|
-
}>;
|
|
849
|
+
}, z.core.$strip>;
|
|
1047
850
|
type TransferProductParams = z.infer<typeof TransferProductParamsSchema>;
|
|
1048
851
|
type TransferProductResult = {
|
|
1049
852
|
success: boolean;
|
|
@@ -1052,24 +855,12 @@ type TransferProductResult = {
|
|
|
1052
855
|
declare const CreateReferralCodeParamsSchema: z.ZodObject<{
|
|
1053
856
|
customer_id: z.ZodString;
|
|
1054
857
|
program_id: z.ZodString;
|
|
1055
|
-
},
|
|
1056
|
-
customer_id: string;
|
|
1057
|
-
program_id: string;
|
|
1058
|
-
}, {
|
|
1059
|
-
customer_id: string;
|
|
1060
|
-
program_id: string;
|
|
1061
|
-
}>;
|
|
858
|
+
}, z.core.$strip>;
|
|
1062
859
|
type CreateReferralCodeParams = z.infer<typeof CreateReferralCodeParamsSchema>;
|
|
1063
860
|
declare const RedeemReferralCodeParamsSchema: z.ZodObject<{
|
|
1064
861
|
code: z.ZodString;
|
|
1065
862
|
customer_id: z.ZodString;
|
|
1066
|
-
},
|
|
1067
|
-
code: string;
|
|
1068
|
-
customer_id: string;
|
|
1069
|
-
}, {
|
|
1070
|
-
code: string;
|
|
1071
|
-
customer_id: string;
|
|
1072
|
-
}>;
|
|
863
|
+
}, z.core.$strip>;
|
|
1073
864
|
type RedeemReferralCodeParams = z.infer<typeof RedeemReferralCodeParamsSchema>;
|
|
1074
865
|
|
|
1075
866
|
export { Autumn as A, type CustomerData as C };
|