autumn-js 0.1.10 → 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 +54 -228
- package/dist/libraries/backend/better-auth.d.ts +54 -228
- 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-DpLmOy8-.d.mts → referralTypes-C1eZ8cjO.d.mts} +79 -458
- package/dist/libraries/backend/{referralTypes-nXl36Opw.d.ts → referralTypes-FlI0fYwz.d.ts} +79 -458
- 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-BozBPLWS.d.ts → ReactAutumnClient-CfDtucnL.d.ts} +21 -21
- package/dist/libraries/react/{ReactAutumnClient-CDp4DLo0.d.mts → ReactAutumnClient-IFdMWiu5.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 +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-4EPRIJNB.mjs → chunk-JHFJKAXG.mjs} +453 -455
- 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 +20 -20
- 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 +20 -20
- 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 +20 -20
- 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/cusTypes-CBapqjzm.d.mts +111 -0
- package/dist/libraries/react/cusTypes-D13MXEN7.d.ts +111 -0
- package/dist/libraries/react/{entTypes-ItJ8BoHV.d.mts → entTypes-C1bM1Zpv.d.mts} +1 -1
- package/dist/libraries/react/{entTypes-Byz3wYbQ.d.ts → entTypes-DbIrfEpl.d.ts} +1 -1
- package/dist/libraries/react/{genTypes-EyxQImzh.d.ts → genTypes-C_ilxndU.d.mts} +4 -24
- package/dist/libraries/react/{genTypes-DSvR32on.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 +9 -9
- package/dist/libraries/react/hooks/helpers/useAutumnBase.d.ts +9 -9
- 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 +44 -396
- package/dist/libraries/react/index.d.ts +44 -396
- package/dist/libraries/react/index.js +146 -146
- package/dist/libraries/react/index.mjs +13 -13
- package/dist/libraries/react/{prodTypes-Bmoibf-M.d.ts → prodTypes-B8NdKyKo.d.mts} +8 -91
- package/dist/libraries/react/{prodTypes-Bmoibf-M.d.mts → prodTypes-B8NdKyKo.d.ts} +8 -91
- 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 +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-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 +98 -530
- package/dist/sdk/index.d.ts +98 -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-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/sdk/index.d.mts
CHANGED
|
@@ -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
|
|
|
3
4
|
interface ErrorResponse {
|
|
4
5
|
message: string;
|
|
@@ -45,9 +46,8 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
45
46
|
customer_id: z.ZodString;
|
|
46
47
|
entity_id: z.ZodOptional<z.ZodString>;
|
|
47
48
|
required_balance: z.ZodNumber;
|
|
48
|
-
} & {
|
|
49
49
|
unlimited: z.ZodOptional<z.ZodBoolean>;
|
|
50
|
-
interval: z.ZodOptional<z.
|
|
50
|
+
interval: z.ZodOptional<z.ZodEnum<typeof ProductItemInterval>>;
|
|
51
51
|
balance: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
52
52
|
usage: z.ZodOptional<z.ZodNumber>;
|
|
53
53
|
included_usage: z.ZodOptional<z.ZodNumber>;
|
|
@@ -57,101 +57,19 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
57
57
|
rollovers: z.ZodOptional<z.ZodObject<{
|
|
58
58
|
balance: z.ZodNumber;
|
|
59
59
|
expires_at: z.ZodNumber;
|
|
60
|
-
},
|
|
61
|
-
balance: number;
|
|
62
|
-
expires_at: number;
|
|
63
|
-
}, {
|
|
64
|
-
balance: number;
|
|
65
|
-
expires_at: number;
|
|
66
|
-
}>>;
|
|
60
|
+
}, z.core.$strip>>;
|
|
67
61
|
breakdown: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
68
|
-
interval: z.
|
|
62
|
+
interval: z.ZodEnum<typeof ProductItemInterval>;
|
|
69
63
|
balance: z.ZodOptional<z.ZodNumber>;
|
|
70
64
|
usage: z.ZodOptional<z.ZodNumber>;
|
|
71
65
|
included_usage: z.ZodOptional<z.ZodNumber>;
|
|
72
66
|
next_reset_at: z.ZodOptional<z.ZodNumber>;
|
|
73
|
-
},
|
|
74
|
-
interval: ProductItemInterval;
|
|
75
|
-
balance?: number | undefined;
|
|
76
|
-
usage?: number | undefined;
|
|
77
|
-
included_usage?: number | undefined;
|
|
78
|
-
next_reset_at?: number | undefined;
|
|
79
|
-
}, {
|
|
80
|
-
interval: ProductItemInterval;
|
|
81
|
-
balance?: number | undefined;
|
|
82
|
-
usage?: number | undefined;
|
|
83
|
-
included_usage?: number | undefined;
|
|
84
|
-
next_reset_at?: number | undefined;
|
|
85
|
-
}>, "many">>;
|
|
67
|
+
}, z.core.$strip>>>;
|
|
86
68
|
credit_schema: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
87
69
|
feature_id: z.ZodString;
|
|
88
70
|
credit_amount: z.ZodNumber;
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
credit_amount: number;
|
|
92
|
-
}, {
|
|
93
|
-
feature_id: string;
|
|
94
|
-
credit_amount: number;
|
|
95
|
-
}>, "many">>;
|
|
96
|
-
}, "strip", z.ZodTypeAny, {
|
|
97
|
-
allowed: boolean;
|
|
98
|
-
feature_id: string;
|
|
99
|
-
customer_id: string;
|
|
100
|
-
required_balance: number;
|
|
101
|
-
usage_limit?: number | undefined;
|
|
102
|
-
entity_id?: string | undefined;
|
|
103
|
-
unlimited?: boolean | undefined;
|
|
104
|
-
interval?: ProductItemInterval | undefined;
|
|
105
|
-
balance?: number | null | undefined;
|
|
106
|
-
usage?: number | undefined;
|
|
107
|
-
included_usage?: number | undefined;
|
|
108
|
-
next_reset_at?: number | null | undefined;
|
|
109
|
-
overage_allowed?: boolean | undefined;
|
|
110
|
-
rollovers?: {
|
|
111
|
-
balance: number;
|
|
112
|
-
expires_at: number;
|
|
113
|
-
} | undefined;
|
|
114
|
-
breakdown?: {
|
|
115
|
-
interval: ProductItemInterval;
|
|
116
|
-
balance?: number | undefined;
|
|
117
|
-
usage?: number | undefined;
|
|
118
|
-
included_usage?: number | undefined;
|
|
119
|
-
next_reset_at?: number | undefined;
|
|
120
|
-
}[] | undefined;
|
|
121
|
-
credit_schema?: {
|
|
122
|
-
feature_id: string;
|
|
123
|
-
credit_amount: number;
|
|
124
|
-
}[] | undefined;
|
|
125
|
-
}, {
|
|
126
|
-
allowed: boolean;
|
|
127
|
-
feature_id: string;
|
|
128
|
-
customer_id: string;
|
|
129
|
-
required_balance: number;
|
|
130
|
-
usage_limit?: number | undefined;
|
|
131
|
-
entity_id?: string | undefined;
|
|
132
|
-
unlimited?: boolean | undefined;
|
|
133
|
-
interval?: ProductItemInterval | undefined;
|
|
134
|
-
balance?: number | null | undefined;
|
|
135
|
-
usage?: number | undefined;
|
|
136
|
-
included_usage?: number | undefined;
|
|
137
|
-
next_reset_at?: number | null | undefined;
|
|
138
|
-
overage_allowed?: boolean | undefined;
|
|
139
|
-
rollovers?: {
|
|
140
|
-
balance: number;
|
|
141
|
-
expires_at: number;
|
|
142
|
-
} | undefined;
|
|
143
|
-
breakdown?: {
|
|
144
|
-
interval: ProductItemInterval;
|
|
145
|
-
balance?: number | undefined;
|
|
146
|
-
usage?: number | undefined;
|
|
147
|
-
included_usage?: number | undefined;
|
|
148
|
-
next_reset_at?: number | undefined;
|
|
149
|
-
}[] | undefined;
|
|
150
|
-
credit_schema?: {
|
|
151
|
-
feature_id: string;
|
|
152
|
-
credit_amount: number;
|
|
153
|
-
}[] | undefined;
|
|
154
|
-
}>;
|
|
71
|
+
}, z.core.$strip>>>;
|
|
72
|
+
}, z.core.$strip>;
|
|
155
73
|
type CheckFeatureResult = z.infer<typeof CheckFeatureResultSchema>;
|
|
156
74
|
interface CheckFeaturePreview {
|
|
157
75
|
scenario: CheckFeatureScenario;
|
|
@@ -289,12 +207,19 @@ declare enum ProductStatus {
|
|
|
289
207
|
Scheduled = "scheduled",
|
|
290
208
|
PastDue = "past_due"
|
|
291
209
|
}
|
|
292
|
-
declare const CustomerExpandEnum: z.ZodEnum<
|
|
210
|
+
declare const CustomerExpandEnum: z.ZodEnum<{
|
|
211
|
+
invoices: "invoices";
|
|
212
|
+
rewards: "rewards";
|
|
213
|
+
trials_used: "trials_used";
|
|
214
|
+
entities: "entities";
|
|
215
|
+
referrals: "referrals";
|
|
216
|
+
payment_method: "payment_method";
|
|
217
|
+
}>;
|
|
293
218
|
type CustomerExpandOption = "invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method";
|
|
294
219
|
|
|
295
220
|
declare const CoreCusFeatureSchema: z.ZodObject<{
|
|
296
221
|
unlimited: z.ZodOptional<z.ZodBoolean>;
|
|
297
|
-
interval: z.ZodOptional<z.
|
|
222
|
+
interval: z.ZodOptional<z.ZodEnum<typeof ProductItemInterval>>;
|
|
298
223
|
balance: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
299
224
|
usage: z.ZodOptional<z.ZodNumber>;
|
|
300
225
|
included_usage: z.ZodOptional<z.ZodNumber>;
|
|
@@ -304,91 +229,19 @@ declare const CoreCusFeatureSchema: z.ZodObject<{
|
|
|
304
229
|
rollovers: z.ZodOptional<z.ZodObject<{
|
|
305
230
|
balance: z.ZodNumber;
|
|
306
231
|
expires_at: z.ZodNumber;
|
|
307
|
-
},
|
|
308
|
-
balance: number;
|
|
309
|
-
expires_at: number;
|
|
310
|
-
}, {
|
|
311
|
-
balance: number;
|
|
312
|
-
expires_at: number;
|
|
313
|
-
}>>;
|
|
232
|
+
}, z.core.$strip>>;
|
|
314
233
|
breakdown: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
315
|
-
interval: z.
|
|
234
|
+
interval: z.ZodEnum<typeof ProductItemInterval>;
|
|
316
235
|
balance: z.ZodOptional<z.ZodNumber>;
|
|
317
236
|
usage: z.ZodOptional<z.ZodNumber>;
|
|
318
237
|
included_usage: z.ZodOptional<z.ZodNumber>;
|
|
319
238
|
next_reset_at: z.ZodOptional<z.ZodNumber>;
|
|
320
|
-
},
|
|
321
|
-
interval: ProductItemInterval;
|
|
322
|
-
balance?: number | undefined;
|
|
323
|
-
usage?: number | undefined;
|
|
324
|
-
included_usage?: number | undefined;
|
|
325
|
-
next_reset_at?: number | undefined;
|
|
326
|
-
}, {
|
|
327
|
-
interval: ProductItemInterval;
|
|
328
|
-
balance?: number | undefined;
|
|
329
|
-
usage?: number | undefined;
|
|
330
|
-
included_usage?: number | undefined;
|
|
331
|
-
next_reset_at?: number | undefined;
|
|
332
|
-
}>, "many">>;
|
|
239
|
+
}, z.core.$strip>>>;
|
|
333
240
|
credit_schema: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
334
241
|
feature_id: z.ZodString;
|
|
335
242
|
credit_amount: z.ZodNumber;
|
|
336
|
-
},
|
|
337
|
-
|
|
338
|
-
credit_amount: number;
|
|
339
|
-
}, {
|
|
340
|
-
feature_id: string;
|
|
341
|
-
credit_amount: number;
|
|
342
|
-
}>, "many">>;
|
|
343
|
-
}, "strip", z.ZodTypeAny, {
|
|
344
|
-
usage_limit?: number | undefined;
|
|
345
|
-
unlimited?: boolean | undefined;
|
|
346
|
-
interval?: ProductItemInterval | undefined;
|
|
347
|
-
balance?: number | null | undefined;
|
|
348
|
-
usage?: number | undefined;
|
|
349
|
-
included_usage?: number | undefined;
|
|
350
|
-
next_reset_at?: number | null | undefined;
|
|
351
|
-
overage_allowed?: boolean | undefined;
|
|
352
|
-
rollovers?: {
|
|
353
|
-
balance: number;
|
|
354
|
-
expires_at: number;
|
|
355
|
-
} | undefined;
|
|
356
|
-
breakdown?: {
|
|
357
|
-
interval: ProductItemInterval;
|
|
358
|
-
balance?: number | undefined;
|
|
359
|
-
usage?: number | undefined;
|
|
360
|
-
included_usage?: number | undefined;
|
|
361
|
-
next_reset_at?: number | undefined;
|
|
362
|
-
}[] | undefined;
|
|
363
|
-
credit_schema?: {
|
|
364
|
-
feature_id: string;
|
|
365
|
-
credit_amount: number;
|
|
366
|
-
}[] | undefined;
|
|
367
|
-
}, {
|
|
368
|
-
usage_limit?: number | undefined;
|
|
369
|
-
unlimited?: boolean | undefined;
|
|
370
|
-
interval?: ProductItemInterval | undefined;
|
|
371
|
-
balance?: number | null | undefined;
|
|
372
|
-
usage?: number | undefined;
|
|
373
|
-
included_usage?: number | undefined;
|
|
374
|
-
next_reset_at?: number | null | undefined;
|
|
375
|
-
overage_allowed?: boolean | undefined;
|
|
376
|
-
rollovers?: {
|
|
377
|
-
balance: number;
|
|
378
|
-
expires_at: number;
|
|
379
|
-
} | undefined;
|
|
380
|
-
breakdown?: {
|
|
381
|
-
interval: ProductItemInterval;
|
|
382
|
-
balance?: number | undefined;
|
|
383
|
-
usage?: number | undefined;
|
|
384
|
-
included_usage?: number | undefined;
|
|
385
|
-
next_reset_at?: number | undefined;
|
|
386
|
-
}[] | undefined;
|
|
387
|
-
credit_schema?: {
|
|
388
|
-
feature_id: string;
|
|
389
|
-
credit_amount: number;
|
|
390
|
-
}[] | undefined;
|
|
391
|
-
}>;
|
|
243
|
+
}, z.core.$strip>>>;
|
|
244
|
+
}, z.core.$strip>;
|
|
392
245
|
type CoreCustomerFeature = z.infer<typeof CoreCusFeatureSchema>;
|
|
393
246
|
interface CustomerFeature extends CoreCustomerFeature {
|
|
394
247
|
id: string;
|
|
@@ -430,15 +283,7 @@ declare const CustomerDataSchema: z.ZodObject<{
|
|
|
430
283
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
431
284
|
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
432
285
|
fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
433
|
-
},
|
|
434
|
-
name?: string | null | undefined;
|
|
435
|
-
email?: string | null | undefined;
|
|
436
|
-
fingerprint?: string | null | undefined;
|
|
437
|
-
}, {
|
|
438
|
-
name?: string | null | undefined;
|
|
439
|
-
email?: string | null | undefined;
|
|
440
|
-
fingerprint?: string | null | undefined;
|
|
441
|
-
}>;
|
|
286
|
+
}, z.core.$strip>;
|
|
442
287
|
type CustomerData = z.infer<typeof CustomerDataSchema>;
|
|
443
288
|
interface GetCustomerParams {
|
|
444
289
|
expand?: CustomerExpandOption[];
|
|
@@ -449,22 +294,15 @@ declare const CreateCustomerParamsSchema: z.ZodObject<{
|
|
|
449
294
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
450
295
|
fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
451
296
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
452
|
-
expand: z.ZodOptional<z.ZodArray<z.ZodEnum<
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
},
|
|
461
|
-
id?: string | null | undefined;
|
|
462
|
-
name?: string | null | undefined;
|
|
463
|
-
email?: string | null | undefined;
|
|
464
|
-
fingerprint?: string | null | undefined;
|
|
465
|
-
metadata?: Record<string, any> | undefined;
|
|
466
|
-
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
467
|
-
}>;
|
|
297
|
+
expand: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
298
|
+
invoices: "invoices";
|
|
299
|
+
rewards: "rewards";
|
|
300
|
+
trials_used: "trials_used";
|
|
301
|
+
entities: "entities";
|
|
302
|
+
referrals: "referrals";
|
|
303
|
+
payment_method: "payment_method";
|
|
304
|
+
}>>>;
|
|
305
|
+
}, z.core.$strip>;
|
|
468
306
|
type CreateCustomerParams = z.infer<typeof CreateCustomerParamsSchema>;
|
|
469
307
|
interface UpdateCustomerParams {
|
|
470
308
|
id?: string | null;
|
|
@@ -474,11 +312,7 @@ interface UpdateCustomerParams {
|
|
|
474
312
|
}
|
|
475
313
|
declare const BillingPortalParamsSchema: z.ZodObject<{
|
|
476
314
|
return_url: z.ZodOptional<z.ZodString>;
|
|
477
|
-
},
|
|
478
|
-
return_url?: string | undefined;
|
|
479
|
-
}, {
|
|
480
|
-
return_url?: string | undefined;
|
|
481
|
-
}>;
|
|
315
|
+
}, z.core.$strip>;
|
|
482
316
|
type BillingPortalParams = z.infer<typeof BillingPortalParamsSchema>;
|
|
483
317
|
interface BillingPortalResult {
|
|
484
318
|
customer_id: string;
|
|
@@ -496,22 +330,10 @@ interface CustomerInvoice {
|
|
|
496
330
|
declare const UpdateBalancesParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
497
331
|
feature_id: z.ZodString;
|
|
498
332
|
balance: z.ZodNumber;
|
|
499
|
-
},
|
|
500
|
-
feature_id: string;
|
|
501
|
-
balance: number;
|
|
502
|
-
}, {
|
|
503
|
-
feature_id: string;
|
|
504
|
-
balance: number;
|
|
505
|
-
}>, z.ZodArray<z.ZodObject<{
|
|
333
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
506
334
|
feature_id: z.ZodString;
|
|
507
335
|
balance: z.ZodNumber;
|
|
508
|
-
},
|
|
509
|
-
feature_id: string;
|
|
510
|
-
balance: number;
|
|
511
|
-
}, {
|
|
512
|
-
feature_id: string;
|
|
513
|
-
balance: number;
|
|
514
|
-
}>, "many">]>;
|
|
336
|
+
}, z.core.$strip>>]>;
|
|
515
337
|
type UpdateBalancesParams = z.infer<typeof UpdateBalancesParamsSchema>;
|
|
516
338
|
type UpdateBalancesResult = {
|
|
517
339
|
success: boolean;
|
|
@@ -522,31 +344,13 @@ declare const CancelParamsSchema: z.ZodObject<{
|
|
|
522
344
|
product_id: z.ZodString;
|
|
523
345
|
entity_id: z.ZodOptional<z.ZodString>;
|
|
524
346
|
cancel_immediately: z.ZodOptional<z.ZodBoolean>;
|
|
525
|
-
},
|
|
526
|
-
customer_id: string;
|
|
527
|
-
product_id: string;
|
|
528
|
-
entity_id?: string | undefined;
|
|
529
|
-
cancel_immediately?: boolean | undefined;
|
|
530
|
-
}, {
|
|
531
|
-
customer_id: string;
|
|
532
|
-
product_id: string;
|
|
533
|
-
entity_id?: string | undefined;
|
|
534
|
-
cancel_immediately?: boolean | undefined;
|
|
535
|
-
}>;
|
|
347
|
+
}, z.core.$strip>;
|
|
536
348
|
type CancelParams = z.infer<typeof CancelParamsSchema>;
|
|
537
349
|
declare const CancelResultSchema: z.ZodObject<{
|
|
538
350
|
success: z.ZodBoolean;
|
|
539
351
|
customer_id: z.ZodString;
|
|
540
352
|
product_id: z.ZodString;
|
|
541
|
-
},
|
|
542
|
-
customer_id: string;
|
|
543
|
-
product_id: string;
|
|
544
|
-
success: boolean;
|
|
545
|
-
}, {
|
|
546
|
-
customer_id: string;
|
|
547
|
-
product_id: string;
|
|
548
|
-
success: boolean;
|
|
549
|
-
}>;
|
|
353
|
+
}, z.core.$strip>;
|
|
550
354
|
type CancelResult = z.infer<typeof CancelResultSchema>;
|
|
551
355
|
declare const TrackParamsSchema: z.ZodObject<{
|
|
552
356
|
customer_id: z.ZodString;
|
|
@@ -557,25 +361,7 @@ declare const TrackParamsSchema: z.ZodObject<{
|
|
|
557
361
|
customer_data: z.ZodOptional<z.ZodAny>;
|
|
558
362
|
idempotency_key: z.ZodOptional<z.ZodString>;
|
|
559
363
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
560
|
-
},
|
|
561
|
-
customer_id: string;
|
|
562
|
-
feature_id?: string | undefined;
|
|
563
|
-
entity_id?: string | undefined;
|
|
564
|
-
value?: number | undefined;
|
|
565
|
-
customer_data?: any;
|
|
566
|
-
entity_data?: any;
|
|
567
|
-
event_name?: string | undefined;
|
|
568
|
-
idempotency_key?: string | undefined;
|
|
569
|
-
}, {
|
|
570
|
-
customer_id: string;
|
|
571
|
-
feature_id?: string | undefined;
|
|
572
|
-
entity_id?: string | undefined;
|
|
573
|
-
value?: number | undefined;
|
|
574
|
-
customer_data?: any;
|
|
575
|
-
entity_data?: any;
|
|
576
|
-
event_name?: string | undefined;
|
|
577
|
-
idempotency_key?: string | undefined;
|
|
578
|
-
}>;
|
|
364
|
+
}, z.core.$strip>;
|
|
579
365
|
type TrackParams = z.infer<typeof TrackParamsSchema>;
|
|
580
366
|
declare const TrackResultSchema: z.ZodObject<{
|
|
581
367
|
id: z.ZodString;
|
|
@@ -583,19 +369,7 @@ declare const TrackResultSchema: z.ZodObject<{
|
|
|
583
369
|
customer_id: z.ZodString;
|
|
584
370
|
feature_id: z.ZodOptional<z.ZodString>;
|
|
585
371
|
event_name: z.ZodOptional<z.ZodString>;
|
|
586
|
-
},
|
|
587
|
-
customer_id: string;
|
|
588
|
-
code: string;
|
|
589
|
-
id: string;
|
|
590
|
-
feature_id?: string | undefined;
|
|
591
|
-
event_name?: string | undefined;
|
|
592
|
-
}, {
|
|
593
|
-
customer_id: string;
|
|
594
|
-
code: string;
|
|
595
|
-
id: string;
|
|
596
|
-
feature_id?: string | undefined;
|
|
597
|
-
event_name?: string | undefined;
|
|
598
|
-
}>;
|
|
372
|
+
}, z.core.$strip>;
|
|
599
373
|
type TrackResult = z.infer<typeof TrackResultSchema>;
|
|
600
374
|
declare const CheckParamsSchema: z.ZodObject<{
|
|
601
375
|
customer_id: z.ZodString;
|
|
@@ -609,40 +383,8 @@ declare const CheckParamsSchema: z.ZodObject<{
|
|
|
609
383
|
entity_data: z.ZodOptional<z.ZodObject<{
|
|
610
384
|
name: z.ZodOptional<z.ZodString>;
|
|
611
385
|
feature_id: z.ZodString;
|
|
612
|
-
},
|
|
613
|
-
|
|
614
|
-
name?: string | undefined;
|
|
615
|
-
}, {
|
|
616
|
-
feature_id: string;
|
|
617
|
-
name?: string | undefined;
|
|
618
|
-
}>>;
|
|
619
|
-
}, "strip", z.ZodTypeAny, {
|
|
620
|
-
customer_id: string;
|
|
621
|
-
feature_id?: string | undefined;
|
|
622
|
-
entity_id?: string | undefined;
|
|
623
|
-
required_balance?: number | undefined;
|
|
624
|
-
product_id?: string | undefined;
|
|
625
|
-
customer_data?: any;
|
|
626
|
-
entity_data?: {
|
|
627
|
-
feature_id: string;
|
|
628
|
-
name?: string | undefined;
|
|
629
|
-
} | undefined;
|
|
630
|
-
send_event?: boolean | undefined;
|
|
631
|
-
with_preview?: boolean | undefined;
|
|
632
|
-
}, {
|
|
633
|
-
customer_id: string;
|
|
634
|
-
feature_id?: string | undefined;
|
|
635
|
-
entity_id?: string | undefined;
|
|
636
|
-
required_balance?: number | undefined;
|
|
637
|
-
product_id?: string | undefined;
|
|
638
|
-
customer_data?: any;
|
|
639
|
-
entity_data?: {
|
|
640
|
-
feature_id: string;
|
|
641
|
-
name?: string | undefined;
|
|
642
|
-
} | undefined;
|
|
643
|
-
send_event?: boolean | undefined;
|
|
644
|
-
with_preview?: boolean | undefined;
|
|
645
|
-
}>;
|
|
386
|
+
}, z.core.$strip>>;
|
|
387
|
+
}, z.core.$strip>;
|
|
646
388
|
type CheckParams = z.infer<typeof CheckParamsSchema>;
|
|
647
389
|
type CheckResult = CheckFeatureResult & CheckProductResult;
|
|
648
390
|
interface UsageParams {
|
|
@@ -665,20 +407,24 @@ interface SetupPaymentResult {
|
|
|
665
407
|
customer_id: string;
|
|
666
408
|
url: string;
|
|
667
409
|
}
|
|
668
|
-
declare const QueryRangeEnum: z.ZodEnum<
|
|
410
|
+
declare const QueryRangeEnum: z.ZodEnum<{
|
|
411
|
+
"24h": "24h";
|
|
412
|
+
"7d": "7d";
|
|
413
|
+
"30d": "30d";
|
|
414
|
+
"90d": "90d";
|
|
415
|
+
last_cycle: "last_cycle";
|
|
416
|
+
}>;
|
|
669
417
|
declare const QueryParamsSchema: z.ZodObject<{
|
|
670
418
|
customer_id: z.ZodString;
|
|
671
|
-
feature_id: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString
|
|
672
|
-
range: z.ZodOptional<z.ZodEnum<
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | undefined;
|
|
681
|
-
}>;
|
|
419
|
+
feature_id: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
420
|
+
range: z.ZodOptional<z.ZodEnum<{
|
|
421
|
+
"24h": "24h";
|
|
422
|
+
"7d": "7d";
|
|
423
|
+
"30d": "30d";
|
|
424
|
+
"90d": "90d";
|
|
425
|
+
last_cycle: "last_cycle";
|
|
426
|
+
}>>;
|
|
427
|
+
}, z.core.$strip>;
|
|
682
428
|
type QueryParams = z.infer<typeof QueryParamsSchema>;
|
|
683
429
|
type QueryResult = {
|
|
684
430
|
list: Array<{
|
|
@@ -691,13 +437,7 @@ type QueryResult = {
|
|
|
691
437
|
declare const AttachFeatureOptionsSchema: z.ZodObject<{
|
|
692
438
|
feature_id: z.ZodString;
|
|
693
439
|
quantity: z.ZodNumber;
|
|
694
|
-
},
|
|
695
|
-
feature_id: string;
|
|
696
|
-
quantity: number;
|
|
697
|
-
}, {
|
|
698
|
-
feature_id: string;
|
|
699
|
-
quantity: number;
|
|
700
|
-
}>;
|
|
440
|
+
}, z.core.$strip>;
|
|
701
441
|
type AttachFeatureOptions = z.infer<typeof AttachFeatureOptionsSchema>;
|
|
702
442
|
declare const AttachParamsSchema: z.ZodObject<{
|
|
703
443
|
customer_id: z.ZodString;
|
|
@@ -706,14 +446,8 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
706
446
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
707
447
|
feature_id: z.ZodString;
|
|
708
448
|
quantity: z.ZodNumber;
|
|
709
|
-
},
|
|
710
|
-
|
|
711
|
-
quantity: number;
|
|
712
|
-
}, {
|
|
713
|
-
feature_id: string;
|
|
714
|
-
quantity: number;
|
|
715
|
-
}>, "many">>;
|
|
716
|
-
product_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
449
|
+
}, z.core.$strip>>>;
|
|
450
|
+
product_ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
717
451
|
free_trial: z.ZodOptional<z.ZodBoolean>;
|
|
718
452
|
success_url: z.ZodOptional<z.ZodString>;
|
|
719
453
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -722,69 +456,17 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
722
456
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
723
457
|
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
724
458
|
fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
725
|
-
},
|
|
726
|
-
name?: string | null | undefined;
|
|
727
|
-
email?: string | null | undefined;
|
|
728
|
-
fingerprint?: string | null | undefined;
|
|
729
|
-
}, {
|
|
730
|
-
name?: string | null | undefined;
|
|
731
|
-
email?: string | null | undefined;
|
|
732
|
-
fingerprint?: string | null | undefined;
|
|
733
|
-
}>>;
|
|
459
|
+
}, z.core.$strip>>;
|
|
734
460
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
735
461
|
checkout_session_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
736
462
|
reward: z.ZodOptional<z.ZodString>;
|
|
737
463
|
invoice: z.ZodOptional<z.ZodBoolean>;
|
|
738
|
-
},
|
|
739
|
-
customer_id: string;
|
|
740
|
-
entity_id?: string | undefined;
|
|
741
|
-
options?: {
|
|
742
|
-
feature_id: string;
|
|
743
|
-
quantity: number;
|
|
744
|
-
}[] | undefined;
|
|
745
|
-
metadata?: Record<string, string> | undefined;
|
|
746
|
-
product_id?: string | undefined;
|
|
747
|
-
product_ids?: string[] | undefined;
|
|
748
|
-
free_trial?: boolean | undefined;
|
|
749
|
-
success_url?: string | undefined;
|
|
750
|
-
force_checkout?: boolean | undefined;
|
|
751
|
-
customer_data?: {
|
|
752
|
-
name?: string | null | undefined;
|
|
753
|
-
email?: string | null | undefined;
|
|
754
|
-
fingerprint?: string | null | undefined;
|
|
755
|
-
} | undefined;
|
|
756
|
-
entity_data?: any;
|
|
757
|
-
checkout_session_params?: Record<string, any> | undefined;
|
|
758
|
-
reward?: string | undefined;
|
|
759
|
-
invoice?: boolean | undefined;
|
|
760
|
-
}, {
|
|
761
|
-
customer_id: string;
|
|
762
|
-
entity_id?: string | undefined;
|
|
763
|
-
options?: {
|
|
764
|
-
feature_id: string;
|
|
765
|
-
quantity: number;
|
|
766
|
-
}[] | undefined;
|
|
767
|
-
metadata?: Record<string, string> | undefined;
|
|
768
|
-
product_id?: string | undefined;
|
|
769
|
-
product_ids?: string[] | undefined;
|
|
770
|
-
free_trial?: boolean | undefined;
|
|
771
|
-
success_url?: string | undefined;
|
|
772
|
-
force_checkout?: boolean | undefined;
|
|
773
|
-
customer_data?: {
|
|
774
|
-
name?: string | null | undefined;
|
|
775
|
-
email?: string | null | undefined;
|
|
776
|
-
fingerprint?: string | null | undefined;
|
|
777
|
-
} | undefined;
|
|
778
|
-
entity_data?: any;
|
|
779
|
-
checkout_session_params?: Record<string, any> | undefined;
|
|
780
|
-
reward?: string | undefined;
|
|
781
|
-
invoice?: boolean | undefined;
|
|
782
|
-
}>;
|
|
464
|
+
}, z.core.$strip>;
|
|
783
465
|
type AttachParams = z.infer<typeof AttachParamsSchema>;
|
|
784
466
|
declare const AttachResultSchema: z.ZodObject<{
|
|
785
467
|
checkout_url: z.ZodOptional<z.ZodString>;
|
|
786
468
|
customer_id: z.ZodString;
|
|
787
|
-
product_ids: z.ZodArray<z.ZodString
|
|
469
|
+
product_ids: z.ZodArray<z.ZodString>;
|
|
788
470
|
code: z.ZodString;
|
|
789
471
|
message: z.ZodString;
|
|
790
472
|
customer_data: z.ZodOptional<z.ZodAny>;
|
|
@@ -794,48 +476,8 @@ declare const AttachResultSchema: z.ZodObject<{
|
|
|
794
476
|
hosted_invoice_url: z.ZodNullable<z.ZodString>;
|
|
795
477
|
total: z.ZodNumber;
|
|
796
478
|
currency: z.ZodString;
|
|
797
|
-
},
|
|
798
|
-
|
|
799
|
-
stripe_id: string;
|
|
800
|
-
hosted_invoice_url: string | null;
|
|
801
|
-
total: number;
|
|
802
|
-
currency: string;
|
|
803
|
-
}, {
|
|
804
|
-
status: string;
|
|
805
|
-
stripe_id: string;
|
|
806
|
-
hosted_invoice_url: string | null;
|
|
807
|
-
total: number;
|
|
808
|
-
currency: string;
|
|
809
|
-
}>>;
|
|
810
|
-
}, "strip", z.ZodTypeAny, {
|
|
811
|
-
customer_id: string;
|
|
812
|
-
code: string;
|
|
813
|
-
message: string;
|
|
814
|
-
product_ids: string[];
|
|
815
|
-
customer_data?: any;
|
|
816
|
-
invoice?: {
|
|
817
|
-
status: string;
|
|
818
|
-
stripe_id: string;
|
|
819
|
-
hosted_invoice_url: string | null;
|
|
820
|
-
total: number;
|
|
821
|
-
currency: string;
|
|
822
|
-
} | undefined;
|
|
823
|
-
checkout_url?: string | undefined;
|
|
824
|
-
}, {
|
|
825
|
-
customer_id: string;
|
|
826
|
-
code: string;
|
|
827
|
-
message: string;
|
|
828
|
-
product_ids: string[];
|
|
829
|
-
customer_data?: any;
|
|
830
|
-
invoice?: {
|
|
831
|
-
status: string;
|
|
832
|
-
stripe_id: string;
|
|
833
|
-
hosted_invoice_url: string | null;
|
|
834
|
-
total: number;
|
|
835
|
-
currency: string;
|
|
836
|
-
} | undefined;
|
|
837
|
-
checkout_url?: string | undefined;
|
|
838
|
-
}>;
|
|
479
|
+
}, z.core.$strip>>;
|
|
480
|
+
}, z.core.$strip>;
|
|
839
481
|
type AttachResult = z.infer<typeof AttachResultSchema>;
|
|
840
482
|
declare const CheckoutParamsSchema: z.ZodObject<{
|
|
841
483
|
customer_id: z.ZodString;
|
|
@@ -844,65 +486,17 @@ declare const CheckoutParamsSchema: z.ZodObject<{
|
|
|
844
486
|
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
845
487
|
feature_id: z.ZodString;
|
|
846
488
|
quantity: z.ZodNumber;
|
|
847
|
-
},
|
|
848
|
-
feature_id: string;
|
|
849
|
-
quantity: number;
|
|
850
|
-
}, {
|
|
851
|
-
feature_id: string;
|
|
852
|
-
quantity: number;
|
|
853
|
-
}>, "many">>;
|
|
489
|
+
}, z.core.$strip>>>;
|
|
854
490
|
success_url: z.ZodOptional<z.ZodString>;
|
|
855
491
|
customer_data: z.ZodOptional<z.ZodObject<{
|
|
856
492
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
857
493
|
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
858
494
|
fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
859
|
-
},
|
|
860
|
-
name?: string | null | undefined;
|
|
861
|
-
email?: string | null | undefined;
|
|
862
|
-
fingerprint?: string | null | undefined;
|
|
863
|
-
}, {
|
|
864
|
-
name?: string | null | undefined;
|
|
865
|
-
email?: string | null | undefined;
|
|
866
|
-
fingerprint?: string | null | undefined;
|
|
867
|
-
}>>;
|
|
495
|
+
}, z.core.$strip>>;
|
|
868
496
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
869
497
|
checkout_session_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
870
498
|
reward: z.ZodOptional<z.ZodString>;
|
|
871
|
-
},
|
|
872
|
-
customer_id: string;
|
|
873
|
-
product_id: string;
|
|
874
|
-
entity_id?: string | undefined;
|
|
875
|
-
options?: {
|
|
876
|
-
feature_id: string;
|
|
877
|
-
quantity: number;
|
|
878
|
-
}[] | undefined;
|
|
879
|
-
success_url?: string | undefined;
|
|
880
|
-
customer_data?: {
|
|
881
|
-
name?: string | null | undefined;
|
|
882
|
-
email?: string | null | undefined;
|
|
883
|
-
fingerprint?: string | null | undefined;
|
|
884
|
-
} | undefined;
|
|
885
|
-
entity_data?: any;
|
|
886
|
-
checkout_session_params?: Record<string, any> | undefined;
|
|
887
|
-
reward?: string | undefined;
|
|
888
|
-
}, {
|
|
889
|
-
customer_id: string;
|
|
890
|
-
product_id: string;
|
|
891
|
-
entity_id?: string | undefined;
|
|
892
|
-
options?: {
|
|
893
|
-
feature_id: string;
|
|
894
|
-
quantity: number;
|
|
895
|
-
}[] | undefined;
|
|
896
|
-
success_url?: string | undefined;
|
|
897
|
-
customer_data?: {
|
|
898
|
-
name?: string | null | undefined;
|
|
899
|
-
email?: string | null | undefined;
|
|
900
|
-
fingerprint?: string | null | undefined;
|
|
901
|
-
} | undefined;
|
|
902
|
-
entity_data?: any;
|
|
903
|
-
checkout_session_params?: Record<string, any> | undefined;
|
|
904
|
-
reward?: string | undefined;
|
|
905
|
-
}>;
|
|
499
|
+
}, z.core.$strip>;
|
|
906
500
|
type CheckoutParams = z.infer<typeof CheckoutParamsSchema>;
|
|
907
501
|
type CheckoutResult = {
|
|
908
502
|
url?: string;
|
|
@@ -930,33 +524,33 @@ declare enum FeatureType {
|
|
|
930
524
|
ContinuousUse = "continuous_use",
|
|
931
525
|
CreditSystem = "credit_system"
|
|
932
526
|
}
|
|
933
|
-
declare const FeatureSchema: z.ZodObject<{
|
|
934
|
-
id: z.ZodString;
|
|
935
|
-
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
936
|
-
type: z.ZodNativeEnum<typeof FeatureType>;
|
|
937
|
-
display: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
938
|
-
singular: z.ZodString;
|
|
939
|
-
plural: z.ZodString;
|
|
940
|
-
}, "strip", z.ZodTypeAny, {
|
|
527
|
+
declare const FeatureSchema: z$1.ZodObject<{
|
|
528
|
+
id: z$1.ZodString;
|
|
529
|
+
name: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodString>>;
|
|
530
|
+
type: z$1.ZodNativeEnum<typeof FeatureType>;
|
|
531
|
+
display: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodObject<{
|
|
532
|
+
singular: z$1.ZodString;
|
|
533
|
+
plural: z$1.ZodString;
|
|
534
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
941
535
|
singular: string;
|
|
942
536
|
plural: string;
|
|
943
537
|
}, {
|
|
944
538
|
singular: string;
|
|
945
539
|
plural: string;
|
|
946
540
|
}>>>;
|
|
947
|
-
credit_schema: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
948
|
-
metered_feature_id: z.ZodString;
|
|
949
|
-
credit_cost: z.ZodNumber;
|
|
950
|
-
}, "strip", z.ZodTypeAny, {
|
|
541
|
+
credit_schema: z$1.ZodOptional<z$1.ZodNullable<z$1.ZodArray<z$1.ZodObject<{
|
|
542
|
+
metered_feature_id: z$1.ZodString;
|
|
543
|
+
credit_cost: z$1.ZodNumber;
|
|
544
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
951
545
|
metered_feature_id: string;
|
|
952
546
|
credit_cost: number;
|
|
953
547
|
}, {
|
|
954
548
|
metered_feature_id: string;
|
|
955
549
|
credit_cost: number;
|
|
956
550
|
}>, "many">>>;
|
|
957
|
-
}, "strip", z.ZodTypeAny, {
|
|
958
|
-
type: FeatureType;
|
|
551
|
+
}, "strip", z$1.ZodTypeAny, {
|
|
959
552
|
id: string;
|
|
553
|
+
type: FeatureType;
|
|
960
554
|
credit_schema?: {
|
|
961
555
|
metered_feature_id: string;
|
|
962
556
|
credit_cost: number;
|
|
@@ -967,8 +561,8 @@ declare const FeatureSchema: z.ZodObject<{
|
|
|
967
561
|
plural: string;
|
|
968
562
|
} | null | undefined;
|
|
969
563
|
}, {
|
|
970
|
-
type: FeatureType;
|
|
971
564
|
id: string;
|
|
565
|
+
type: FeatureType;
|
|
972
566
|
credit_schema?: {
|
|
973
567
|
metered_feature_id: string;
|
|
974
568
|
credit_cost: number;
|
|
@@ -979,7 +573,7 @@ declare const FeatureSchema: z.ZodObject<{
|
|
|
979
573
|
plural: string;
|
|
980
574
|
} | null | undefined;
|
|
981
575
|
}>;
|
|
982
|
-
type Feature = z.infer<typeof FeatureSchema>;
|
|
576
|
+
type Feature = z$1.infer<typeof FeatureSchema>;
|
|
983
577
|
|
|
984
578
|
type Success<T> = {
|
|
985
579
|
data: T;
|
|
@@ -1080,9 +674,10 @@ declare class Autumn {
|
|
|
1080
674
|
checkout(params: CheckoutParams): Promise<Result<CheckoutResult, AutumnError>>;
|
|
1081
675
|
static attach: (params: AttachParams) => Promise<Result<{
|
|
1082
676
|
customer_id: string;
|
|
677
|
+
product_ids: string[];
|
|
1083
678
|
code: string;
|
|
1084
679
|
message: string;
|
|
1085
|
-
|
|
680
|
+
checkout_url?: string | undefined;
|
|
1086
681
|
customer_data?: any;
|
|
1087
682
|
invoice?: {
|
|
1088
683
|
status: string;
|
|
@@ -1091,14 +686,14 @@ declare class Autumn {
|
|
|
1091
686
|
total: number;
|
|
1092
687
|
currency: string;
|
|
1093
688
|
} | undefined;
|
|
1094
|
-
checkout_url?: string | undefined;
|
|
1095
689
|
}, AutumnError>>;
|
|
1096
690
|
static usage: (params: UsageParams) => Promise<Result<UsageResult, AutumnError>>;
|
|
1097
691
|
attach(params: AttachParams): Promise<Result<{
|
|
1098
692
|
customer_id: string;
|
|
693
|
+
product_ids: string[];
|
|
1099
694
|
code: string;
|
|
1100
695
|
message: string;
|
|
1101
|
-
|
|
696
|
+
checkout_url?: string | undefined;
|
|
1102
697
|
customer_data?: any;
|
|
1103
698
|
invoice?: {
|
|
1104
699
|
status: string;
|
|
@@ -1107,33 +702,32 @@ declare class Autumn {
|
|
|
1107
702
|
total: number;
|
|
1108
703
|
currency: string;
|
|
1109
704
|
} | undefined;
|
|
1110
|
-
checkout_url?: string | undefined;
|
|
1111
705
|
}, AutumnError>>;
|
|
1112
706
|
static setupPayment: (params: SetupPaymentParams) => Promise<Result<SetupPaymentResult, AutumnError>>;
|
|
1113
707
|
setupPayment(params: SetupPaymentParams): Promise<Result<SetupPaymentResult, AutumnError>>;
|
|
1114
708
|
static cancel: (params: CancelParams) => Promise<Result<{
|
|
709
|
+
success: boolean;
|
|
1115
710
|
customer_id: string;
|
|
1116
711
|
product_id: string;
|
|
1117
|
-
success: boolean;
|
|
1118
712
|
}, AutumnError>>;
|
|
1119
713
|
cancel(params: CancelParams): Promise<Result<{
|
|
714
|
+
success: boolean;
|
|
1120
715
|
customer_id: string;
|
|
1121
716
|
product_id: string;
|
|
1122
|
-
success: boolean;
|
|
1123
717
|
}, AutumnError>>;
|
|
1124
718
|
static check: (params: CheckParams) => Promise<Result<CheckResult, AutumnError>>;
|
|
1125
719
|
check(params: CheckParams): Promise<Result<CheckResult, AutumnError>>;
|
|
1126
720
|
static track: (params: TrackParams) => Promise<Result<{
|
|
1127
|
-
customer_id: string;
|
|
1128
|
-
code: string;
|
|
1129
721
|
id: string;
|
|
722
|
+
code: string;
|
|
723
|
+
customer_id: string;
|
|
1130
724
|
feature_id?: string | undefined;
|
|
1131
725
|
event_name?: string | undefined;
|
|
1132
726
|
}, AutumnError>>;
|
|
1133
727
|
track(params: TrackParams): Promise<Result<{
|
|
1134
|
-
customer_id: string;
|
|
1135
|
-
code: string;
|
|
1136
728
|
id: string;
|
|
729
|
+
code: string;
|
|
730
|
+
customer_id: string;
|
|
1137
731
|
feature_id?: string | undefined;
|
|
1138
732
|
event_name?: string | undefined;
|
|
1139
733
|
}, AutumnError>>;
|
|
@@ -1198,27 +792,13 @@ interface Entity {
|
|
|
1198
792
|
declare const EntityDataSchema: z.ZodObject<{
|
|
1199
793
|
name: z.ZodOptional<z.ZodString>;
|
|
1200
794
|
feature_id: z.ZodString;
|
|
1201
|
-
},
|
|
1202
|
-
feature_id: string;
|
|
1203
|
-
name?: string | undefined;
|
|
1204
|
-
}, {
|
|
1205
|
-
feature_id: string;
|
|
1206
|
-
name?: string | undefined;
|
|
1207
|
-
}>;
|
|
795
|
+
}, z.core.$strip>;
|
|
1208
796
|
type EntityData = z.infer<typeof EntityDataSchema>;
|
|
1209
797
|
declare const TransferProductParamsSchema: z.ZodObject<{
|
|
1210
798
|
from_entity_id: z.ZodString;
|
|
1211
799
|
to_entity_id: z.ZodString;
|
|
1212
800
|
product_id: z.ZodString;
|
|
1213
|
-
},
|
|
1214
|
-
product_id: string;
|
|
1215
|
-
from_entity_id: string;
|
|
1216
|
-
to_entity_id: string;
|
|
1217
|
-
}, {
|
|
1218
|
-
product_id: string;
|
|
1219
|
-
from_entity_id: string;
|
|
1220
|
-
to_entity_id: string;
|
|
1221
|
-
}>;
|
|
801
|
+
}, z.core.$strip>;
|
|
1222
802
|
type TransferProductParams = z.infer<typeof TransferProductParamsSchema>;
|
|
1223
803
|
type TransferProductResult = {
|
|
1224
804
|
success: boolean;
|
|
@@ -1227,13 +807,7 @@ type TransferProductResult = {
|
|
|
1227
807
|
declare const CreateReferralCodeParamsSchema: z.ZodObject<{
|
|
1228
808
|
customer_id: z.ZodString;
|
|
1229
809
|
program_id: z.ZodString;
|
|
1230
|
-
},
|
|
1231
|
-
customer_id: string;
|
|
1232
|
-
program_id: string;
|
|
1233
|
-
}, {
|
|
1234
|
-
customer_id: string;
|
|
1235
|
-
program_id: string;
|
|
1236
|
-
}>;
|
|
810
|
+
}, z.core.$strip>;
|
|
1237
811
|
type CreateReferralCodeParams = z.infer<typeof CreateReferralCodeParamsSchema>;
|
|
1238
812
|
interface CreateReferralCodeResult {
|
|
1239
813
|
code: string;
|
|
@@ -1243,13 +817,7 @@ interface CreateReferralCodeResult {
|
|
|
1243
817
|
declare const RedeemReferralCodeParamsSchema: z.ZodObject<{
|
|
1244
818
|
code: z.ZodString;
|
|
1245
819
|
customer_id: z.ZodString;
|
|
1246
|
-
},
|
|
1247
|
-
customer_id: string;
|
|
1248
|
-
code: string;
|
|
1249
|
-
}, {
|
|
1250
|
-
customer_id: string;
|
|
1251
|
-
code: string;
|
|
1252
|
-
}>;
|
|
820
|
+
}, z.core.$strip>;
|
|
1253
821
|
type RedeemReferralCodeParams = z.infer<typeof RedeemReferralCodeParamsSchema>;
|
|
1254
822
|
interface RedeemReferralCodeResult {
|
|
1255
823
|
id: string;
|