autumn-js 0.0.93 → 0.0.96
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/compose/index.d.mts +201 -0
- package/dist/compose/index.d.ts +201 -0
- package/dist/compose/index.js +147 -0
- package/dist/compose/index.mjs +113 -0
- package/dist/libraries/backend/better-auth.d.mts +178 -212
- package/dist/libraries/backend/better-auth.d.ts +178 -212
- package/dist/libraries/backend/better-auth.js +165 -172
- package/dist/libraries/backend/better-auth.mjs +80 -145
- package/dist/libraries/backend/{chunk-VFTHGJ5N.mjs → chunk-33NT3WE5.mjs} +1 -1
- package/dist/libraries/backend/{chunk-V6M7KRGN.mjs → chunk-6VS7TU7O.mjs} +109 -35
- package/dist/libraries/backend/{chunk-JPNRDMMC.mjs → chunk-AKV5N4WO.mjs} +1 -1
- package/dist/libraries/backend/{chunk-7QSJB2C5.mjs → chunk-CEZHD5H6.mjs} +1 -1
- package/dist/libraries/backend/{chunk-NTFR7Z2G.mjs → chunk-DUDRVC7W.mjs} +6 -6
- package/dist/libraries/backend/{chunk-FCEB2GBS.mjs → chunk-J3L3OBSS.mjs} +1 -1
- package/dist/libraries/backend/{chunk-U7335VZS.mjs → chunk-RA4AC56B.mjs} +1 -1
- package/dist/libraries/backend/convex.js +101 -35
- package/dist/libraries/backend/convex.mjs +7 -7
- package/dist/libraries/backend/express.d.mts +1 -1
- package/dist/libraries/backend/express.d.ts +1 -1
- package/dist/libraries/backend/express.js +101 -35
- package/dist/libraries/backend/express.mjs +7 -7
- package/dist/libraries/backend/fastify.js +101 -35
- package/dist/libraries/backend/fastify.mjs +7 -7
- package/dist/libraries/backend/hono.js +101 -35
- package/dist/libraries/backend/hono.mjs +7 -7
- package/dist/libraries/backend/next.js +197 -131
- package/dist/libraries/backend/next.mjs +101 -101
- package/dist/libraries/backend/react-router.js +101 -35
- package/dist/libraries/backend/react-router.mjs +7 -7
- package/dist/libraries/backend/{referralTypes-ecz_wESO.d.mts → referralTypes-Dg9pRvI7.d.mts} +196 -95
- package/dist/libraries/backend/{referralTypes-BAYl5TR1.d.ts → referralTypes-HAk2vTns.d.ts} +196 -95
- package/dist/libraries/backend/remix_dep.js +101 -35
- package/dist/libraries/backend/remix_dep.mjs +7 -7
- package/dist/libraries/backend/routes/backendRouter.js +101 -35
- package/dist/libraries/backend/routes/backendRouter.mjs +7 -7
- package/dist/libraries/backend/routes/entityRoutes.js +101 -35
- package/dist/libraries/backend/routes/entityRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/genRoutes.js +101 -35
- package/dist/libraries/backend/routes/genRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/productRoutes.js +101 -35
- package/dist/libraries/backend/routes/productRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/referralRoutes.js +101 -35
- package/dist/libraries/backend/routes/referralRoutes.mjs +3 -3
- package/dist/libraries/backend/supabase.js +101 -35
- package/dist/libraries/backend/supabase.mjs +7 -7
- package/dist/libraries/backend/tanstack.js +101 -35
- package/dist/libraries/backend/tanstack.mjs +7 -7
- package/dist/libraries/backend/utils/backendRes.js +101 -35
- package/dist/libraries/backend/utils/backendRes.mjs +1 -1
- package/dist/libraries/backend/utils/withAuth.d.mts +1 -1
- package/dist/libraries/backend/utils/withAuth.d.ts +1 -1
- package/dist/libraries/backend/utils/withAuth.js +101 -35
- package/dist/libraries/backend/utils/withAuth.mjs +2 -2
- package/dist/libraries/react/AutumnContext.d.mts +4 -4
- package/dist/libraries/react/AutumnContext.d.ts +4 -4
- package/dist/libraries/react/AutumnContext.js +129 -52
- package/dist/libraries/react/AutumnContext.mjs +8 -8
- package/dist/libraries/react/BaseAutumnProvider.d.mts +4 -4
- package/dist/libraries/react/BaseAutumnProvider.d.ts +4 -4
- package/dist/libraries/react/BaseAutumnProvider.js +135 -62
- package/dist/libraries/react/BaseAutumnProvider.mjs +13 -13
- package/dist/libraries/react/{ReactAutumnClient-Z3DcfZ0x.d.mts → ReactAutumnClient-CXaaDdjS.d.mts} +23 -13
- package/dist/libraries/react/{ReactAutumnClient-GEzKNujl.d.ts → ReactAutumnClient-iUQGnJyH.d.ts} +23 -13
- package/dist/libraries/react/ReactAutumnProvider.d.mts +3 -3
- package/dist/libraries/react/ReactAutumnProvider.d.ts +3 -3
- package/dist/libraries/react/ReactAutumnProvider.js +138 -64
- package/dist/libraries/react/ReactAutumnProvider.mjs +14 -14
- package/dist/libraries/react/{chunk-TBKIB6DH.mjs → chunk-5G3DYUNT.mjs} +1 -1
- package/dist/libraries/react/{chunk-QTEFT7SA.mjs → chunk-6CJ3FB74.mjs} +2 -2
- package/dist/libraries/react/{chunk-27OTS3Q5.mjs → chunk-6MNYJ3YQ.mjs} +2 -2
- package/dist/libraries/react/{chunk-P2O4LZFD.mjs → chunk-AL3VJLFU.mjs} +1 -1
- package/dist/libraries/react/{chunk-QAHVMSK4.mjs → chunk-ALFXUHDD.mjs} +123 -49
- package/dist/libraries/react/{chunk-TD6CFKDQ.mjs → chunk-AOJCMXVS.mjs} +6 -5
- package/dist/libraries/react/{chunk-SJAAUTL2.mjs → chunk-APDR7D6A.mjs} +2 -2
- package/dist/libraries/react/{chunk-5FZ7IV6P.mjs → chunk-BSF3KB4R.mjs} +46 -46
- package/dist/libraries/react/{chunk-GK75OJJJ.mjs → chunk-CAMHARUX.mjs} +2 -2
- package/dist/libraries/react/{chunk-UHUADKEF.mjs → chunk-DVMVIAZE.mjs} +1 -1
- package/dist/libraries/react/{chunk-ITN754AD.mjs → chunk-G3FBFZLU.mjs} +4 -1
- package/dist/libraries/react/{chunk-CZAXPWHV.mjs → chunk-IN62REVO.mjs} +282 -282
- package/dist/libraries/react/{chunk-3WP2MI55.mjs → chunk-LVDONEVF.mjs} +2 -2
- package/dist/libraries/react/{chunk-6JOSRG5Z.mjs → chunk-MZDRIPNS.mjs} +2 -2
- package/dist/libraries/react/{chunk-FPI3PLEL.mjs → chunk-OAPUYXBO.mjs} +6 -6
- package/dist/libraries/react/{chunk-CMO5LYYU.mjs → chunk-OAWFFAKA.mjs} +6 -6
- package/dist/libraries/react/{chunk-CHQRTGXF.mjs → chunk-R4BYOLST.mjs} +2 -2
- package/dist/libraries/react/{chunk-CRIKYVUD.mjs → chunk-T5PIJ4HG.mjs} +8 -12
- package/dist/libraries/react/{chunk-YUV2Y2RW.mjs → chunk-V575SGOW.mjs} +1 -1
- package/dist/libraries/react/{chunk-NZ5PEXT2.mjs → chunk-VTGR7VVK.mjs} +1 -1
- package/dist/libraries/react/{chunk-JNM4BLTM.mjs → chunk-VUBJ6JM3.mjs} +6 -6
- package/dist/libraries/react/{chunk-TGX6UKKS.mjs → chunk-WFFVOEUG.mjs} +1 -1
- package/dist/libraries/react/{chunk-V5PKOA5A.mjs → chunk-ZF2HUCN6.mjs} +3 -3
- package/dist/libraries/react/{chunk-3EYF7OI5.mjs → chunk-ZV4RPZTM.mjs} +2 -2
- package/dist/libraries/react/{chunk-FEFGYFXQ.mjs → chunk-ZVQKDPUP.mjs} +3 -3
- package/dist/libraries/react/client/ReactAutumnClient.d.mts +4 -4
- package/dist/libraries/react/client/ReactAutumnClient.d.ts +4 -4
- package/dist/libraries/react/client/ReactAutumnClient.js +126 -52
- package/dist/libraries/react/client/ReactAutumnClient.mjs +7 -7
- package/dist/libraries/react/client/clientCompMethods.d.mts +4 -4
- package/dist/libraries/react/client/clientCompMethods.d.ts +4 -4
- package/dist/libraries/react/client/clientCompMethods.js +1 -1
- package/dist/libraries/react/client/clientCompMethods.mjs +1 -1
- package/dist/libraries/react/client/clientCusMethods.d.mts +4 -4
- package/dist/libraries/react/client/clientCusMethods.d.ts +4 -4
- package/dist/libraries/react/client/clientCusMethods.js +1 -1
- package/dist/libraries/react/client/clientCusMethods.mjs +1 -1
- package/dist/libraries/react/client/clientEntityMethods.d.mts +4 -4
- package/dist/libraries/react/client/clientEntityMethods.d.ts +4 -4
- package/dist/libraries/react/client/clientEntityMethods.js +3 -3
- package/dist/libraries/react/client/clientEntityMethods.mjs +1 -1
- package/dist/libraries/react/client/clientGenMethods.d.mts +4 -4
- package/dist/libraries/react/client/clientGenMethods.d.ts +4 -4
- package/dist/libraries/react/client/clientGenMethods.js +6 -6
- package/dist/libraries/react/client/clientGenMethods.mjs +1 -1
- package/dist/libraries/react/client/clientProdMethods.d.mts +4 -4
- package/dist/libraries/react/client/clientProdMethods.d.ts +4 -4
- package/dist/libraries/react/client/clientProdMethods.js +1 -1
- package/dist/libraries/react/client/clientProdMethods.mjs +1 -1
- package/dist/libraries/react/client/clientReferralMethods.d.mts +4 -4
- package/dist/libraries/react/client/clientReferralMethods.d.ts +4 -4
- package/dist/libraries/react/client/clientReferralMethods.js +2 -2
- package/dist/libraries/react/client/clientReferralMethods.mjs +1 -1
- package/dist/libraries/react/client/types/clientGenTypes.d.mts +12 -12
- package/dist/libraries/react/client/types/clientGenTypes.d.ts +12 -12
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.mts +1 -1
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.ts +1 -1
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.js +190 -117
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.mjs +28 -28
- package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.mts +1 -1
- package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.ts +1 -1
- package/dist/libraries/react/components/check-dialog/check-dialog-synced.d.mts +1 -1
- package/dist/libraries/react/components/check-dialog/check-dialog-synced.d.ts +1 -1
- package/dist/libraries/react/components/check-dialog/check-dialog-synced.js +50 -50
- package/dist/libraries/react/components/check-dialog/check-dialog-synced.mjs +5 -5
- package/dist/libraries/react/components/check-dialog/lib/check-content.d.mts +1 -1
- package/dist/libraries/react/components/check-dialog/lib/check-content.d.ts +1 -1
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.mts +1 -1
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.ts +1 -1
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.js +190 -117
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +28 -28
- 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/button.js +3 -3
- package/dist/libraries/react/components/ui/button.mjs +2 -2
- package/dist/libraries/react/components/ui/dialog.js +49 -49
- package/dist/libraries/react/components/ui/dialog.mjs +3 -3
- package/dist/libraries/react/components/ui/switch.js +12 -12
- package/dist/libraries/react/components/ui/switch.mjs +3 -3
- package/dist/libraries/react/{cusTypes-DUC0TrK5.d.ts → cusTypes-WaPJKeAb.d.mts} +1 -1
- package/dist/libraries/react/{cusTypes-DUC0TrK5.d.mts → cusTypes-WaPJKeAb.d.ts} +1 -1
- package/dist/libraries/react/{entTypes-Ddl0CGp9.d.ts → entTypes-D01S8gFX.d.ts} +1 -1
- package/dist/libraries/react/{entTypes-Mq0F4CAa.d.mts → entTypes-aIV0QUCW.d.mts} +1 -1
- package/dist/libraries/react/hooks/handleAllowed.d.mts +2 -2
- package/dist/libraries/react/hooks/handleAllowed.d.ts +2 -2
- package/dist/libraries/react/hooks/useAutumn.d.mts +2 -2
- package/dist/libraries/react/hooks/useAutumn.d.ts +2 -2
- package/dist/libraries/react/hooks/useAutumn.js +129 -52
- package/dist/libraries/react/hooks/useAutumn.mjs +11 -11
- package/dist/libraries/react/hooks/useAutumnBase.d.mts +4 -4
- package/dist/libraries/react/hooks/useAutumnBase.d.ts +4 -4
- package/dist/libraries/react/hooks/useAutumnBase.js +129 -52
- package/dist/libraries/react/hooks/useAutumnBase.mjs +10 -10
- package/dist/libraries/react/hooks/useCustomer.d.mts +4 -4
- package/dist/libraries/react/hooks/useCustomer.d.ts +4 -4
- package/dist/libraries/react/hooks/useCustomer.js +135 -62
- package/dist/libraries/react/hooks/useCustomer.mjs +12 -12
- package/dist/libraries/react/hooks/useCustomerBase.d.mts +4 -5
- package/dist/libraries/react/hooks/useCustomerBase.d.ts +4 -5
- package/dist/libraries/react/hooks/useCustomerBase.js +135 -62
- package/dist/libraries/react/hooks/useCustomerBase.mjs +11 -11
- package/dist/libraries/react/hooks/useEntity.d.mts +15 -5
- package/dist/libraries/react/hooks/useEntity.d.ts +15 -5
- package/dist/libraries/react/hooks/useEntity.js +129 -52
- package/dist/libraries/react/hooks/useEntity.mjs +12 -12
- package/dist/libraries/react/hooks/useEntityBase.d.mts +16 -6
- package/dist/libraries/react/hooks/useEntityBase.d.ts +16 -6
- package/dist/libraries/react/hooks/useEntityBase.js +129 -52
- package/dist/libraries/react/hooks/useEntityBase.mjs +11 -11
- package/dist/libraries/react/hooks/usePricingTable.d.mts +1 -1
- package/dist/libraries/react/hooks/usePricingTable.d.ts +1 -1
- package/dist/libraries/react/hooks/usePricingTable.js +129 -52
- package/dist/libraries/react/hooks/usePricingTable.mjs +10 -10
- package/dist/libraries/react/hooks/usePricingTableBase.d.mts +4 -4
- package/dist/libraries/react/hooks/usePricingTableBase.d.ts +4 -4
- package/dist/libraries/react/hooks/usePricingTableBase.js +129 -52
- package/dist/libraries/react/hooks/usePricingTableBase.mjs +9 -9
- package/dist/libraries/react/hooks/useProductsBase.js +129 -52
- package/dist/libraries/react/hooks/useProductsBase.mjs +8 -8
- package/dist/libraries/react/index.d.mts +57 -26
- package/dist/libraries/react/index.d.ts +57 -26
- package/dist/libraries/react/index.js +193 -119
- package/dist/libraries/react/index.mjs +193 -119
- package/dist/libraries/react/{response-B8Tq3x66.d.ts → response-C0MTZEqT.d.ts} +35 -13
- package/dist/libraries/react/{response-CMrRLv9c.d.mts → response-FC9NTmn2.d.mts} +35 -13
- package/dist/next/{AutumnProvider-DtLqoQp6.d.mts → AutumnProvider-CCYZC_bN.d.mts} +1 -1
- package/dist/next/{AutumnProvider-DtLqoQp6.d.ts → AutumnProvider-CCYZC_bN.d.ts} +1 -1
- package/dist/next/AutumnProvider.d.mts +1 -1
- package/dist/next/AutumnProvider.d.ts +1 -1
- package/dist/next/client/NextAutumnClient.d.mts +21 -11
- package/dist/next/client/NextAutumnClient.d.ts +21 -11
- package/dist/next/client/{clientGenTypes-DWrGEdrD.d.mts → clientGenTypes-BHk25QIO.d.mts} +44 -22
- package/dist/next/client/{clientGenTypes-D_Ea92Du.d.ts → clientGenTypes-CpX8Cvjm.d.ts} +44 -22
- package/dist/next/client/hooks/useAutumn.d.mts +1 -1
- package/dist/next/client/hooks/useAutumn.d.ts +1 -1
- package/dist/next/client/hooks/useCustomer.d.mts +1 -2
- package/dist/next/client/hooks/useCustomer.d.ts +1 -2
- package/dist/next/client/hooks/useEntity.d.mts +13 -3
- package/dist/next/client/hooks/useEntity.d.ts +13 -3
- package/dist/next/index.d.mts +80 -39
- package/dist/next/index.d.ts +80 -39
- package/dist/next/server/auth/withNextAuth.d.mts +1 -1
- package/dist/next/server/auth/withNextAuth.d.ts +1 -1
- package/dist/next/server/componentActions.d.mts +1 -1
- package/dist/next/server/componentActions.d.ts +1 -1
- package/dist/next/server/cusActions.d.mts +175 -79
- package/dist/next/server/cusActions.d.ts +175 -79
- package/dist/next/server/{cusTypes-C86FOl99.d.mts → cusTypes-Cy72qmFx.d.mts} +11 -6
- package/dist/next/server/{cusTypes-C86FOl99.d.ts → cusTypes-Cy72qmFx.d.ts} +11 -6
- package/dist/next/server/genActions.d.mts +1 -1
- package/dist/next/server/genActions.d.ts +1 -1
- package/dist/sdk/index.d.mts +234 -81
- package/dist/sdk/index.d.ts +234 -81
- package/dist/sdk/index.js +74 -4
- package/dist/sdk/index.mjs +65 -5
- package/dist/utils/encryptUtils.js +101 -35
- package/dist/utils/encryptUtils.mjs +101 -35
- package/package.json +19 -6
- package/tsup.config.ts +12 -3
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import { j as CheckFeatureResult, k as CheckProductResult } from './cusTypes-
|
|
1
|
+
import { j as CheckFeatureResult, k as CheckProductResult } from './cusTypes-WaPJKeAb.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { A as AutumnError } from './error-DHbclCVh.js';
|
|
4
4
|
|
|
5
|
-
interface CancelResult {
|
|
6
|
-
success: boolean;
|
|
7
|
-
customer_id: string;
|
|
8
|
-
product_id: string;
|
|
9
|
-
}
|
|
10
5
|
declare const AttachResultSchema: z.ZodObject<{
|
|
11
6
|
checkout_url: z.ZodOptional<z.ZodString>;
|
|
12
7
|
customer_id: z.ZodString;
|
|
@@ -19,24 +14,51 @@ declare const AttachResultSchema: z.ZodObject<{
|
|
|
19
14
|
code: string;
|
|
20
15
|
message: string;
|
|
21
16
|
product_ids: string[];
|
|
22
|
-
checkout_url?: string | undefined;
|
|
23
17
|
customer_data?: any;
|
|
18
|
+
checkout_url?: string | undefined;
|
|
24
19
|
}, {
|
|
25
20
|
customer_id: string;
|
|
26
21
|
code: string;
|
|
27
22
|
message: string;
|
|
28
23
|
product_ids: string[];
|
|
29
|
-
checkout_url?: string | undefined;
|
|
30
24
|
customer_data?: any;
|
|
25
|
+
checkout_url?: string | undefined;
|
|
31
26
|
}>;
|
|
32
27
|
type AttachResult = z.infer<typeof AttachResultSchema>;
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
declare const CancelResultSchema: z.ZodObject<{
|
|
29
|
+
success: z.ZodBoolean;
|
|
30
|
+
customer_id: z.ZodString;
|
|
31
|
+
product_id: z.ZodString;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
customer_id: string;
|
|
34
|
+
product_id: string;
|
|
35
|
+
success: boolean;
|
|
36
|
+
}, {
|
|
37
|
+
customer_id: string;
|
|
38
|
+
product_id: string;
|
|
39
|
+
success: boolean;
|
|
40
|
+
}>;
|
|
41
|
+
type CancelResult = z.infer<typeof CancelResultSchema>;
|
|
42
|
+
declare const TrackResultSchema: z.ZodObject<{
|
|
43
|
+
id: z.ZodString;
|
|
44
|
+
code: z.ZodString;
|
|
45
|
+
customer_id: z.ZodString;
|
|
46
|
+
feature_id: z.ZodOptional<z.ZodString>;
|
|
47
|
+
event_name: z.ZodOptional<z.ZodString>;
|
|
48
|
+
}, "strip", z.ZodTypeAny, {
|
|
49
|
+
customer_id: string;
|
|
35
50
|
code: string;
|
|
51
|
+
id: string;
|
|
52
|
+
feature_id?: string | undefined;
|
|
53
|
+
event_name?: string | undefined;
|
|
54
|
+
}, {
|
|
36
55
|
customer_id: string;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
56
|
+
code: string;
|
|
57
|
+
id: string;
|
|
58
|
+
feature_id?: string | undefined;
|
|
59
|
+
event_name?: string | undefined;
|
|
60
|
+
}>;
|
|
61
|
+
type TrackResult = z.infer<typeof TrackResultSchema>;
|
|
40
62
|
type CheckResult = CheckFeatureResult & CheckProductResult;
|
|
41
63
|
interface SetupPaymentResult {
|
|
42
64
|
customer_id: string;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import { j as CheckFeatureResult, k as CheckProductResult } from './cusTypes-
|
|
1
|
+
import { j as CheckFeatureResult, k as CheckProductResult } from './cusTypes-WaPJKeAb.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { A as AutumnError } from './error-DHbclCVh.mjs';
|
|
4
4
|
|
|
5
|
-
interface CancelResult {
|
|
6
|
-
success: boolean;
|
|
7
|
-
customer_id: string;
|
|
8
|
-
product_id: string;
|
|
9
|
-
}
|
|
10
5
|
declare const AttachResultSchema: z.ZodObject<{
|
|
11
6
|
checkout_url: z.ZodOptional<z.ZodString>;
|
|
12
7
|
customer_id: z.ZodString;
|
|
@@ -19,24 +14,51 @@ declare const AttachResultSchema: z.ZodObject<{
|
|
|
19
14
|
code: string;
|
|
20
15
|
message: string;
|
|
21
16
|
product_ids: string[];
|
|
22
|
-
checkout_url?: string | undefined;
|
|
23
17
|
customer_data?: any;
|
|
18
|
+
checkout_url?: string | undefined;
|
|
24
19
|
}, {
|
|
25
20
|
customer_id: string;
|
|
26
21
|
code: string;
|
|
27
22
|
message: string;
|
|
28
23
|
product_ids: string[];
|
|
29
|
-
checkout_url?: string | undefined;
|
|
30
24
|
customer_data?: any;
|
|
25
|
+
checkout_url?: string | undefined;
|
|
31
26
|
}>;
|
|
32
27
|
type AttachResult = z.infer<typeof AttachResultSchema>;
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
declare const CancelResultSchema: z.ZodObject<{
|
|
29
|
+
success: z.ZodBoolean;
|
|
30
|
+
customer_id: z.ZodString;
|
|
31
|
+
product_id: z.ZodString;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
customer_id: string;
|
|
34
|
+
product_id: string;
|
|
35
|
+
success: boolean;
|
|
36
|
+
}, {
|
|
37
|
+
customer_id: string;
|
|
38
|
+
product_id: string;
|
|
39
|
+
success: boolean;
|
|
40
|
+
}>;
|
|
41
|
+
type CancelResult = z.infer<typeof CancelResultSchema>;
|
|
42
|
+
declare const TrackResultSchema: z.ZodObject<{
|
|
43
|
+
id: z.ZodString;
|
|
44
|
+
code: z.ZodString;
|
|
45
|
+
customer_id: z.ZodString;
|
|
46
|
+
feature_id: z.ZodOptional<z.ZodString>;
|
|
47
|
+
event_name: z.ZodOptional<z.ZodString>;
|
|
48
|
+
}, "strip", z.ZodTypeAny, {
|
|
49
|
+
customer_id: string;
|
|
35
50
|
code: string;
|
|
51
|
+
id: string;
|
|
52
|
+
feature_id?: string | undefined;
|
|
53
|
+
event_name?: string | undefined;
|
|
54
|
+
}, {
|
|
36
55
|
customer_id: string;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
56
|
+
code: string;
|
|
57
|
+
id: string;
|
|
58
|
+
feature_id?: string | undefined;
|
|
59
|
+
event_name?: string | undefined;
|
|
60
|
+
}>;
|
|
61
|
+
type TrackResult = z.infer<typeof TrackResultSchema>;
|
|
40
62
|
type CheckResult = CheckFeatureResult & CheckProductResult;
|
|
41
63
|
interface SetupPaymentResult {
|
|
42
64
|
customer_id: string;
|
|
@@ -263,4 +263,4 @@ interface AutumnProviderProps {
|
|
|
263
263
|
}
|
|
264
264
|
declare const AutumnProvider: ({ customerId, customerData, authPlugin, children, }: AutumnProviderProps) => react_jsx_runtime.JSX.Element;
|
|
265
265
|
|
|
266
|
-
export { AutumnProvider as A, type BillingPortalResult as B, type
|
|
266
|
+
export { AutumnProvider as A, type BillingPortalResult as B, type CheckFeatureResult as C, type ProductItem as P, type CheckProductResult as a, type ProductScenario as b, type CustomerProduct as c, type CustomerFeature as d, type CustomerInvoice as e, type CustomerData as f, type CreateCustomerParams as g, type Customer as h, type Product as i, type CustomerExpandOption as j };
|
|
@@ -263,4 +263,4 @@ interface AutumnProviderProps {
|
|
|
263
263
|
}
|
|
264
264
|
declare const AutumnProvider: ({ customerId, customerData, authPlugin, children, }: AutumnProviderProps) => react_jsx_runtime.JSX.Element;
|
|
265
265
|
|
|
266
|
-
export { AutumnProvider as A, type BillingPortalResult as B, type
|
|
266
|
+
export { AutumnProvider as A, type BillingPortalResult as B, type CheckFeatureResult as C, type ProductItem as P, type CheckProductResult as a, type ProductScenario as b, type CustomerProduct as c, type CustomerFeature as d, type CustomerInvoice as e, type CustomerData as f, type CreateCustomerParams as g, type Customer as h, type Product as i, type CustomerExpandOption as j };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as Result, a as AutumnPromise,
|
|
1
|
+
import { R as Result, a as AutumnPromise, b as CheckResult, O as OpenBillingPortalParams, S as SetupPaymentParams, f as SetupPaymentResult, A as AttachParams, g as AttachResult, d as CancelParams, e as CancelResult, C as CheckParams, T as TrackParams, c as TrackResult } from './clientGenTypes-BHk25QIO.mjs';
|
|
2
2
|
import { e as ProductItem, f as ProductScenario, C as CustomerData, g as CreateCustomerParams, a as Customer, B as BillingPortalResult, P as Product } from './cusTypes-D8lhXGaX.mjs';
|
|
3
3
|
import { E as Entity, D as DeleteEntityResult } from './entTypes-B-2_9hzP.mjs';
|
|
4
4
|
import { C as CreateEntityParams, G as GetEntityParams, a as CreateReferralCodeResult, R as RedeemReferralCodeResult } from './clientEntTypes-BFkleT6a.mjs';
|
|
@@ -29,15 +29,15 @@ interface AutumnClientConfig {
|
|
|
29
29
|
getBearerToken?: () => Promise<string | null | undefined>;
|
|
30
30
|
customerData?: CustomerData;
|
|
31
31
|
includeCredentials?: boolean;
|
|
32
|
+
betterAuthUrl?: string;
|
|
32
33
|
}
|
|
33
34
|
declare class AutumnClient {
|
|
34
35
|
readonly backendUrl?: string;
|
|
35
36
|
protected readonly getBearerToken?: () => Promise<string | null | undefined>;
|
|
36
37
|
protected readonly customerData?: CustomerData;
|
|
37
38
|
protected includeCredentials?: boolean;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
constructor({ backendUrl, getBearerToken, customerData, includeCredentials, }: AutumnClientConfig);
|
|
39
|
+
readonly prefix: string;
|
|
40
|
+
constructor({ backendUrl, getBearerToken, customerData, includeCredentials, betterAuthUrl, }: AutumnClientConfig);
|
|
41
41
|
/**
|
|
42
42
|
* Detects if the backend supports CORS credentials by making an OPTIONS request
|
|
43
43
|
*/
|
|
@@ -63,10 +63,11 @@ declare class AutumnClient {
|
|
|
63
63
|
}, AutumnError>>;
|
|
64
64
|
attach: (params: {
|
|
65
65
|
options?: {
|
|
66
|
-
featureId: string;
|
|
67
66
|
quantity: number;
|
|
67
|
+
featureId: string;
|
|
68
68
|
}[] | undefined;
|
|
69
69
|
metadata?: Record<string, string> | undefined;
|
|
70
|
+
reward?: string | undefined;
|
|
70
71
|
productId?: string | undefined;
|
|
71
72
|
entityId?: string | undefined;
|
|
72
73
|
productIds?: string[] | undefined;
|
|
@@ -76,25 +77,28 @@ declare class AutumnClient {
|
|
|
76
77
|
dialog?: ((args_0: any, ...args: unknown[]) => JSX.Element | react.ReactNode) | undefined;
|
|
77
78
|
entityData?: any;
|
|
78
79
|
openInNewTab?: boolean | undefined;
|
|
79
|
-
reward?: string | undefined;
|
|
80
80
|
checkoutSessionParams?: Record<string, any> | undefined;
|
|
81
81
|
}) => AutumnPromise<{
|
|
82
82
|
customer_id: string;
|
|
83
83
|
code: string;
|
|
84
84
|
message: string;
|
|
85
85
|
product_ids: string[];
|
|
86
|
-
checkout_url?: string | undefined;
|
|
87
86
|
customer_data?: any;
|
|
87
|
+
checkout_url?: string | undefined;
|
|
88
88
|
}>;
|
|
89
89
|
cancel: (params: {
|
|
90
90
|
productId: string;
|
|
91
91
|
entityId?: string | undefined;
|
|
92
92
|
cancelImmediately?: boolean | undefined;
|
|
93
|
-
}) => AutumnPromise<
|
|
93
|
+
}) => AutumnPromise<{
|
|
94
|
+
customer_id: string;
|
|
95
|
+
product_id: string;
|
|
96
|
+
success: boolean;
|
|
97
|
+
}>;
|
|
94
98
|
check: (params: {
|
|
99
|
+
featureId?: string | undefined;
|
|
95
100
|
productId?: string | undefined;
|
|
96
101
|
entityId?: string | undefined;
|
|
97
|
-
featureId?: string | undefined;
|
|
98
102
|
dialog?: ((args_0: any, ...args: unknown[]) => JSX.Element | react.ReactNode) | undefined;
|
|
99
103
|
entityData?: any;
|
|
100
104
|
requiredBalance?: number | undefined;
|
|
@@ -103,12 +107,18 @@ declare class AutumnClient {
|
|
|
103
107
|
}) => AutumnPromise<CheckResult>;
|
|
104
108
|
track: (params: {
|
|
105
109
|
value?: number | undefined;
|
|
106
|
-
entityId?: string | undefined;
|
|
107
110
|
featureId?: string | undefined;
|
|
111
|
+
entityId?: string | undefined;
|
|
108
112
|
entityData?: any;
|
|
109
113
|
eventName?: string | undefined;
|
|
110
114
|
idempotencyKey?: string | undefined;
|
|
111
|
-
}) => AutumnPromise<
|
|
115
|
+
}) => AutumnPromise<{
|
|
116
|
+
customer_id: string;
|
|
117
|
+
code: string;
|
|
118
|
+
id: string;
|
|
119
|
+
feature_id?: string | undefined;
|
|
120
|
+
event_name?: string | undefined;
|
|
121
|
+
}>;
|
|
112
122
|
openBillingPortal: (params?: OpenBillingPortalParams | undefined) => AutumnPromise<BillingPortalResult>;
|
|
113
123
|
setupPayment: (params: SetupPaymentParams) => AutumnPromise<SetupPaymentResult>;
|
|
114
124
|
entities: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as Result, a as AutumnPromise,
|
|
1
|
+
import { R as Result, a as AutumnPromise, b as CheckResult, O as OpenBillingPortalParams, S as SetupPaymentParams, f as SetupPaymentResult, A as AttachParams, g as AttachResult, d as CancelParams, e as CancelResult, C as CheckParams, T as TrackParams, c as TrackResult } from './clientGenTypes-CpX8Cvjm.js';
|
|
2
2
|
import { e as ProductItem, f as ProductScenario, C as CustomerData, g as CreateCustomerParams, a as Customer, B as BillingPortalResult, P as Product } from './cusTypes-D8lhXGaX.js';
|
|
3
3
|
import { E as Entity, D as DeleteEntityResult } from './entTypes-Dq2mbehl.js';
|
|
4
4
|
import { C as CreateEntityParams, G as GetEntityParams, a as CreateReferralCodeResult, R as RedeemReferralCodeResult } from './clientEntTypes-BFkleT6a.js';
|
|
@@ -29,15 +29,15 @@ interface AutumnClientConfig {
|
|
|
29
29
|
getBearerToken?: () => Promise<string | null | undefined>;
|
|
30
30
|
customerData?: CustomerData;
|
|
31
31
|
includeCredentials?: boolean;
|
|
32
|
+
betterAuthUrl?: string;
|
|
32
33
|
}
|
|
33
34
|
declare class AutumnClient {
|
|
34
35
|
readonly backendUrl?: string;
|
|
35
36
|
protected readonly getBearerToken?: () => Promise<string | null | undefined>;
|
|
36
37
|
protected readonly customerData?: CustomerData;
|
|
37
38
|
protected includeCredentials?: boolean;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
constructor({ backendUrl, getBearerToken, customerData, includeCredentials, }: AutumnClientConfig);
|
|
39
|
+
readonly prefix: string;
|
|
40
|
+
constructor({ backendUrl, getBearerToken, customerData, includeCredentials, betterAuthUrl, }: AutumnClientConfig);
|
|
41
41
|
/**
|
|
42
42
|
* Detects if the backend supports CORS credentials by making an OPTIONS request
|
|
43
43
|
*/
|
|
@@ -63,10 +63,11 @@ declare class AutumnClient {
|
|
|
63
63
|
}, AutumnError>>;
|
|
64
64
|
attach: (params: {
|
|
65
65
|
options?: {
|
|
66
|
-
featureId: string;
|
|
67
66
|
quantity: number;
|
|
67
|
+
featureId: string;
|
|
68
68
|
}[] | undefined;
|
|
69
69
|
metadata?: Record<string, string> | undefined;
|
|
70
|
+
reward?: string | undefined;
|
|
70
71
|
productId?: string | undefined;
|
|
71
72
|
entityId?: string | undefined;
|
|
72
73
|
productIds?: string[] | undefined;
|
|
@@ -76,25 +77,28 @@ declare class AutumnClient {
|
|
|
76
77
|
dialog?: ((args_0: any, ...args: unknown[]) => JSX.Element | react.ReactNode) | undefined;
|
|
77
78
|
entityData?: any;
|
|
78
79
|
openInNewTab?: boolean | undefined;
|
|
79
|
-
reward?: string | undefined;
|
|
80
80
|
checkoutSessionParams?: Record<string, any> | undefined;
|
|
81
81
|
}) => AutumnPromise<{
|
|
82
82
|
customer_id: string;
|
|
83
83
|
code: string;
|
|
84
84
|
message: string;
|
|
85
85
|
product_ids: string[];
|
|
86
|
-
checkout_url?: string | undefined;
|
|
87
86
|
customer_data?: any;
|
|
87
|
+
checkout_url?: string | undefined;
|
|
88
88
|
}>;
|
|
89
89
|
cancel: (params: {
|
|
90
90
|
productId: string;
|
|
91
91
|
entityId?: string | undefined;
|
|
92
92
|
cancelImmediately?: boolean | undefined;
|
|
93
|
-
}) => AutumnPromise<
|
|
93
|
+
}) => AutumnPromise<{
|
|
94
|
+
customer_id: string;
|
|
95
|
+
product_id: string;
|
|
96
|
+
success: boolean;
|
|
97
|
+
}>;
|
|
94
98
|
check: (params: {
|
|
99
|
+
featureId?: string | undefined;
|
|
95
100
|
productId?: string | undefined;
|
|
96
101
|
entityId?: string | undefined;
|
|
97
|
-
featureId?: string | undefined;
|
|
98
102
|
dialog?: ((args_0: any, ...args: unknown[]) => JSX.Element | react.ReactNode) | undefined;
|
|
99
103
|
entityData?: any;
|
|
100
104
|
requiredBalance?: number | undefined;
|
|
@@ -103,12 +107,18 @@ declare class AutumnClient {
|
|
|
103
107
|
}) => AutumnPromise<CheckResult>;
|
|
104
108
|
track: (params: {
|
|
105
109
|
value?: number | undefined;
|
|
106
|
-
entityId?: string | undefined;
|
|
107
110
|
featureId?: string | undefined;
|
|
111
|
+
entityId?: string | undefined;
|
|
108
112
|
entityData?: any;
|
|
109
113
|
eventName?: string | undefined;
|
|
110
114
|
idempotencyKey?: string | undefined;
|
|
111
|
-
}) => AutumnPromise<
|
|
115
|
+
}) => AutumnPromise<{
|
|
116
|
+
customer_id: string;
|
|
117
|
+
code: string;
|
|
118
|
+
id: string;
|
|
119
|
+
feature_id?: string | undefined;
|
|
120
|
+
event_name?: string | undefined;
|
|
121
|
+
}>;
|
|
112
122
|
openBillingPortal: (params?: OpenBillingPortalParams | undefined) => AutumnPromise<BillingPortalResult>;
|
|
113
123
|
setupPayment: (params: SetupPaymentParams) => AutumnPromise<SetupPaymentResult>;
|
|
114
124
|
entities: {
|
|
@@ -3,11 +3,6 @@ import { z } from 'zod';
|
|
|
3
3
|
import { A as AutumnError } from './error-DHbclCVh.mjs';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
|
|
6
|
-
interface CancelResult {
|
|
7
|
-
success: boolean;
|
|
8
|
-
customer_id: string;
|
|
9
|
-
product_id: string;
|
|
10
|
-
}
|
|
11
6
|
declare const AttachResultSchema: z.ZodObject<{
|
|
12
7
|
checkout_url: z.ZodOptional<z.ZodString>;
|
|
13
8
|
customer_id: z.ZodString;
|
|
@@ -20,24 +15,51 @@ declare const AttachResultSchema: z.ZodObject<{
|
|
|
20
15
|
code: string;
|
|
21
16
|
message: string;
|
|
22
17
|
product_ids: string[];
|
|
23
|
-
checkout_url?: string | undefined;
|
|
24
18
|
customer_data?: any;
|
|
19
|
+
checkout_url?: string | undefined;
|
|
25
20
|
}, {
|
|
26
21
|
customer_id: string;
|
|
27
22
|
code: string;
|
|
28
23
|
message: string;
|
|
29
24
|
product_ids: string[];
|
|
30
|
-
checkout_url?: string | undefined;
|
|
31
25
|
customer_data?: any;
|
|
26
|
+
checkout_url?: string | undefined;
|
|
32
27
|
}>;
|
|
33
28
|
type AttachResult = z.infer<typeof AttachResultSchema>;
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
declare const CancelResultSchema: z.ZodObject<{
|
|
30
|
+
success: z.ZodBoolean;
|
|
31
|
+
customer_id: z.ZodString;
|
|
32
|
+
product_id: z.ZodString;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
customer_id: string;
|
|
35
|
+
product_id: string;
|
|
36
|
+
success: boolean;
|
|
37
|
+
}, {
|
|
38
|
+
customer_id: string;
|
|
39
|
+
product_id: string;
|
|
40
|
+
success: boolean;
|
|
41
|
+
}>;
|
|
42
|
+
type CancelResult = z.infer<typeof CancelResultSchema>;
|
|
43
|
+
declare const TrackResultSchema: z.ZodObject<{
|
|
44
|
+
id: z.ZodString;
|
|
45
|
+
code: z.ZodString;
|
|
46
|
+
customer_id: z.ZodString;
|
|
47
|
+
feature_id: z.ZodOptional<z.ZodString>;
|
|
48
|
+
event_name: z.ZodOptional<z.ZodString>;
|
|
49
|
+
}, "strip", z.ZodTypeAny, {
|
|
50
|
+
customer_id: string;
|
|
36
51
|
code: string;
|
|
52
|
+
id: string;
|
|
53
|
+
feature_id?: string | undefined;
|
|
54
|
+
event_name?: string | undefined;
|
|
55
|
+
}, {
|
|
37
56
|
customer_id: string;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
57
|
+
code: string;
|
|
58
|
+
id: string;
|
|
59
|
+
feature_id?: string | undefined;
|
|
60
|
+
event_name?: string | undefined;
|
|
61
|
+
}>;
|
|
62
|
+
type TrackResult = z.infer<typeof TrackResultSchema>;
|
|
41
63
|
type CheckResult = CheckFeatureResult & CheckProductResult;
|
|
42
64
|
interface SetupPaymentResult {
|
|
43
65
|
customer_id: string;
|
|
@@ -64,11 +86,11 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
64
86
|
featureId: z.ZodString;
|
|
65
87
|
quantity: z.ZodNumber;
|
|
66
88
|
}, "strip", z.ZodTypeAny, {
|
|
67
|
-
featureId: string;
|
|
68
89
|
quantity: number;
|
|
69
|
-
}, {
|
|
70
90
|
featureId: string;
|
|
91
|
+
}, {
|
|
71
92
|
quantity: number;
|
|
93
|
+
featureId: string;
|
|
72
94
|
}>, "many">>;
|
|
73
95
|
productIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
74
96
|
freeTrial: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -82,10 +104,11 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
82
104
|
checkoutSessionParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
83
105
|
}, "strip", z.ZodTypeAny, {
|
|
84
106
|
options?: {
|
|
85
|
-
featureId: string;
|
|
86
107
|
quantity: number;
|
|
108
|
+
featureId: string;
|
|
87
109
|
}[] | undefined;
|
|
88
110
|
metadata?: Record<string, string> | undefined;
|
|
111
|
+
reward?: string | undefined;
|
|
89
112
|
productId?: string | undefined;
|
|
90
113
|
entityId?: string | undefined;
|
|
91
114
|
productIds?: string[] | undefined;
|
|
@@ -95,14 +118,14 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
95
118
|
dialog?: ((args_0: any, ...args: unknown[]) => JSX.Element | react.ReactNode) | undefined;
|
|
96
119
|
entityData?: any;
|
|
97
120
|
openInNewTab?: boolean | undefined;
|
|
98
|
-
reward?: string | undefined;
|
|
99
121
|
checkoutSessionParams?: Record<string, any> | undefined;
|
|
100
122
|
}, {
|
|
101
123
|
options?: {
|
|
102
|
-
featureId: string;
|
|
103
124
|
quantity: number;
|
|
125
|
+
featureId: string;
|
|
104
126
|
}[] | undefined;
|
|
105
127
|
metadata?: Record<string, string> | undefined;
|
|
128
|
+
reward?: string | undefined;
|
|
106
129
|
productId?: string | undefined;
|
|
107
130
|
entityId?: string | undefined;
|
|
108
131
|
productIds?: string[] | undefined;
|
|
@@ -112,7 +135,6 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
112
135
|
dialog?: ((args_0: any, ...args: unknown[]) => JSX.Element | react.ReactNode) | undefined;
|
|
113
136
|
entityData?: any;
|
|
114
137
|
openInNewTab?: boolean | undefined;
|
|
115
|
-
reward?: string | undefined;
|
|
116
138
|
checkoutSessionParams?: Record<string, any> | undefined;
|
|
117
139
|
}>;
|
|
118
140
|
type AttachParams = z.infer<typeof AttachParamsSchema>;
|
|
@@ -140,18 +162,18 @@ declare const CheckParamsSchema: z.ZodObject<{
|
|
|
140
162
|
dialog: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodUnion<[z.ZodType<JSX.Element, z.ZodTypeDef, JSX.Element>, z.ZodType<react.ReactNode, z.ZodTypeDef, react.ReactNode>]>>>;
|
|
141
163
|
entityData: z.ZodOptional<z.ZodAny>;
|
|
142
164
|
}, "strip", z.ZodTypeAny, {
|
|
165
|
+
featureId?: string | undefined;
|
|
143
166
|
productId?: string | undefined;
|
|
144
167
|
entityId?: string | undefined;
|
|
145
|
-
featureId?: string | undefined;
|
|
146
168
|
dialog?: ((args_0: any, ...args: unknown[]) => JSX.Element | react.ReactNode) | undefined;
|
|
147
169
|
entityData?: any;
|
|
148
170
|
requiredBalance?: number | undefined;
|
|
149
171
|
sendEvent?: boolean | undefined;
|
|
150
172
|
withPreview?: boolean | undefined;
|
|
151
173
|
}, {
|
|
174
|
+
featureId?: string | undefined;
|
|
152
175
|
productId?: string | undefined;
|
|
153
176
|
entityId?: string | undefined;
|
|
154
|
-
featureId?: string | undefined;
|
|
155
177
|
dialog?: ((args_0: any, ...args: unknown[]) => JSX.Element | react.ReactNode) | undefined;
|
|
156
178
|
entityData?: any;
|
|
157
179
|
requiredBalance?: number | undefined;
|
|
@@ -168,15 +190,15 @@ declare const TrackParamsSchema: z.ZodObject<{
|
|
|
168
190
|
entityData: z.ZodOptional<z.ZodAny>;
|
|
169
191
|
}, "strip", z.ZodTypeAny, {
|
|
170
192
|
value?: number | undefined;
|
|
171
|
-
entityId?: string | undefined;
|
|
172
193
|
featureId?: string | undefined;
|
|
194
|
+
entityId?: string | undefined;
|
|
173
195
|
entityData?: any;
|
|
174
196
|
eventName?: string | undefined;
|
|
175
197
|
idempotencyKey?: string | undefined;
|
|
176
198
|
}, {
|
|
177
199
|
value?: number | undefined;
|
|
178
|
-
entityId?: string | undefined;
|
|
179
200
|
featureId?: string | undefined;
|
|
201
|
+
entityId?: string | undefined;
|
|
180
202
|
entityData?: any;
|
|
181
203
|
eventName?: string | undefined;
|
|
182
204
|
idempotencyKey?: string | undefined;
|
|
@@ -3,11 +3,6 @@ import { z } from 'zod';
|
|
|
3
3
|
import { A as AutumnError } from './error-DHbclCVh.js';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
|
|
6
|
-
interface CancelResult {
|
|
7
|
-
success: boolean;
|
|
8
|
-
customer_id: string;
|
|
9
|
-
product_id: string;
|
|
10
|
-
}
|
|
11
6
|
declare const AttachResultSchema: z.ZodObject<{
|
|
12
7
|
checkout_url: z.ZodOptional<z.ZodString>;
|
|
13
8
|
customer_id: z.ZodString;
|
|
@@ -20,24 +15,51 @@ declare const AttachResultSchema: z.ZodObject<{
|
|
|
20
15
|
code: string;
|
|
21
16
|
message: string;
|
|
22
17
|
product_ids: string[];
|
|
23
|
-
checkout_url?: string | undefined;
|
|
24
18
|
customer_data?: any;
|
|
19
|
+
checkout_url?: string | undefined;
|
|
25
20
|
}, {
|
|
26
21
|
customer_id: string;
|
|
27
22
|
code: string;
|
|
28
23
|
message: string;
|
|
29
24
|
product_ids: string[];
|
|
30
|
-
checkout_url?: string | undefined;
|
|
31
25
|
customer_data?: any;
|
|
26
|
+
checkout_url?: string | undefined;
|
|
32
27
|
}>;
|
|
33
28
|
type AttachResult = z.infer<typeof AttachResultSchema>;
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
declare const CancelResultSchema: z.ZodObject<{
|
|
30
|
+
success: z.ZodBoolean;
|
|
31
|
+
customer_id: z.ZodString;
|
|
32
|
+
product_id: z.ZodString;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
customer_id: string;
|
|
35
|
+
product_id: string;
|
|
36
|
+
success: boolean;
|
|
37
|
+
}, {
|
|
38
|
+
customer_id: string;
|
|
39
|
+
product_id: string;
|
|
40
|
+
success: boolean;
|
|
41
|
+
}>;
|
|
42
|
+
type CancelResult = z.infer<typeof CancelResultSchema>;
|
|
43
|
+
declare const TrackResultSchema: z.ZodObject<{
|
|
44
|
+
id: z.ZodString;
|
|
45
|
+
code: z.ZodString;
|
|
46
|
+
customer_id: z.ZodString;
|
|
47
|
+
feature_id: z.ZodOptional<z.ZodString>;
|
|
48
|
+
event_name: z.ZodOptional<z.ZodString>;
|
|
49
|
+
}, "strip", z.ZodTypeAny, {
|
|
50
|
+
customer_id: string;
|
|
36
51
|
code: string;
|
|
52
|
+
id: string;
|
|
53
|
+
feature_id?: string | undefined;
|
|
54
|
+
event_name?: string | undefined;
|
|
55
|
+
}, {
|
|
37
56
|
customer_id: string;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
57
|
+
code: string;
|
|
58
|
+
id: string;
|
|
59
|
+
feature_id?: string | undefined;
|
|
60
|
+
event_name?: string | undefined;
|
|
61
|
+
}>;
|
|
62
|
+
type TrackResult = z.infer<typeof TrackResultSchema>;
|
|
41
63
|
type CheckResult = CheckFeatureResult & CheckProductResult;
|
|
42
64
|
interface SetupPaymentResult {
|
|
43
65
|
customer_id: string;
|
|
@@ -64,11 +86,11 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
64
86
|
featureId: z.ZodString;
|
|
65
87
|
quantity: z.ZodNumber;
|
|
66
88
|
}, "strip", z.ZodTypeAny, {
|
|
67
|
-
featureId: string;
|
|
68
89
|
quantity: number;
|
|
69
|
-
}, {
|
|
70
90
|
featureId: string;
|
|
91
|
+
}, {
|
|
71
92
|
quantity: number;
|
|
93
|
+
featureId: string;
|
|
72
94
|
}>, "many">>;
|
|
73
95
|
productIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
74
96
|
freeTrial: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -82,10 +104,11 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
82
104
|
checkoutSessionParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
83
105
|
}, "strip", z.ZodTypeAny, {
|
|
84
106
|
options?: {
|
|
85
|
-
featureId: string;
|
|
86
107
|
quantity: number;
|
|
108
|
+
featureId: string;
|
|
87
109
|
}[] | undefined;
|
|
88
110
|
metadata?: Record<string, string> | undefined;
|
|
111
|
+
reward?: string | undefined;
|
|
89
112
|
productId?: string | undefined;
|
|
90
113
|
entityId?: string | undefined;
|
|
91
114
|
productIds?: string[] | undefined;
|
|
@@ -95,14 +118,14 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
95
118
|
dialog?: ((args_0: any, ...args: unknown[]) => JSX.Element | react.ReactNode) | undefined;
|
|
96
119
|
entityData?: any;
|
|
97
120
|
openInNewTab?: boolean | undefined;
|
|
98
|
-
reward?: string | undefined;
|
|
99
121
|
checkoutSessionParams?: Record<string, any> | undefined;
|
|
100
122
|
}, {
|
|
101
123
|
options?: {
|
|
102
|
-
featureId: string;
|
|
103
124
|
quantity: number;
|
|
125
|
+
featureId: string;
|
|
104
126
|
}[] | undefined;
|
|
105
127
|
metadata?: Record<string, string> | undefined;
|
|
128
|
+
reward?: string | undefined;
|
|
106
129
|
productId?: string | undefined;
|
|
107
130
|
entityId?: string | undefined;
|
|
108
131
|
productIds?: string[] | undefined;
|
|
@@ -112,7 +135,6 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
112
135
|
dialog?: ((args_0: any, ...args: unknown[]) => JSX.Element | react.ReactNode) | undefined;
|
|
113
136
|
entityData?: any;
|
|
114
137
|
openInNewTab?: boolean | undefined;
|
|
115
|
-
reward?: string | undefined;
|
|
116
138
|
checkoutSessionParams?: Record<string, any> | undefined;
|
|
117
139
|
}>;
|
|
118
140
|
type AttachParams = z.infer<typeof AttachParamsSchema>;
|
|
@@ -140,18 +162,18 @@ declare const CheckParamsSchema: z.ZodObject<{
|
|
|
140
162
|
dialog: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodUnion<[z.ZodType<JSX.Element, z.ZodTypeDef, JSX.Element>, z.ZodType<react.ReactNode, z.ZodTypeDef, react.ReactNode>]>>>;
|
|
141
163
|
entityData: z.ZodOptional<z.ZodAny>;
|
|
142
164
|
}, "strip", z.ZodTypeAny, {
|
|
165
|
+
featureId?: string | undefined;
|
|
143
166
|
productId?: string | undefined;
|
|
144
167
|
entityId?: string | undefined;
|
|
145
|
-
featureId?: string | undefined;
|
|
146
168
|
dialog?: ((args_0: any, ...args: unknown[]) => JSX.Element | react.ReactNode) | undefined;
|
|
147
169
|
entityData?: any;
|
|
148
170
|
requiredBalance?: number | undefined;
|
|
149
171
|
sendEvent?: boolean | undefined;
|
|
150
172
|
withPreview?: boolean | undefined;
|
|
151
173
|
}, {
|
|
174
|
+
featureId?: string | undefined;
|
|
152
175
|
productId?: string | undefined;
|
|
153
176
|
entityId?: string | undefined;
|
|
154
|
-
featureId?: string | undefined;
|
|
155
177
|
dialog?: ((args_0: any, ...args: unknown[]) => JSX.Element | react.ReactNode) | undefined;
|
|
156
178
|
entityData?: any;
|
|
157
179
|
requiredBalance?: number | undefined;
|
|
@@ -168,15 +190,15 @@ declare const TrackParamsSchema: z.ZodObject<{
|
|
|
168
190
|
entityData: z.ZodOptional<z.ZodAny>;
|
|
169
191
|
}, "strip", z.ZodTypeAny, {
|
|
170
192
|
value?: number | undefined;
|
|
171
|
-
entityId?: string | undefined;
|
|
172
193
|
featureId?: string | undefined;
|
|
194
|
+
entityId?: string | undefined;
|
|
173
195
|
entityData?: any;
|
|
174
196
|
eventName?: string | undefined;
|
|
175
197
|
idempotencyKey?: string | undefined;
|
|
176
198
|
}, {
|
|
177
199
|
value?: number | undefined;
|
|
178
|
-
entityId?: string | undefined;
|
|
179
200
|
featureId?: string | undefined;
|
|
201
|
+
entityId?: string | undefined;
|
|
180
202
|
entityData?: any;
|
|
181
203
|
eventName?: string | undefined;
|
|
182
204
|
idempotencyKey?: string | undefined;
|