autumn-js 0.0.92 → 0.0.95
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 +172 -207
- package/dist/libraries/backend/better-auth.d.ts +172 -207
- package/dist/libraries/backend/better-auth.js +150 -162
- package/dist/libraries/backend/better-auth.mjs +64 -134
- 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 +103 -37
- package/dist/libraries/backend/next.mjs +7 -7
- package/dist/libraries/backend/react-router.js +101 -35
- package/dist/libraries/backend/react-router.mjs +7 -7
- package/dist/libraries/backend/{referralTypes-C_LRkLGP.d.mts → referralTypes-Dg9pRvI7.d.mts} +186 -85
- package/dist/libraries/backend/{referralTypes-KJHGHDgD.d.ts → referralTypes-HAk2vTns.d.ts} +186 -85
- 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 +9 -9
- package/dist/libraries/react/BaseAutumnProvider.d.mts +4 -4
- package/dist/libraries/react/BaseAutumnProvider.d.ts +4 -4
- package/dist/libraries/react/BaseAutumnProvider.js +136 -62
- package/dist/libraries/react/BaseAutumnProvider.mjs +14 -14
- package/dist/libraries/react/{ReactAutumnClient-BmHGkNH1.d.mts → ReactAutumnClient-BuSRDMJN.d.mts} +23 -13
- package/dist/libraries/react/{ReactAutumnClient-PGnPqPkr.d.ts → ReactAutumnClient-k0qbHX8f.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 +139 -64
- package/dist/libraries/react/ReactAutumnProvider.mjs +15 -15
- package/dist/libraries/react/{chunk-LPJSRHPQ.mjs → chunk-5G3DYUNT.mjs} +1 -1
- package/dist/libraries/react/{chunk-VH4FTCAC.mjs → chunk-6CJ3FB74.mjs} +2 -2
- package/dist/libraries/react/{chunk-NCPXL3J2.mjs → chunk-ALFXUHDD.mjs} +133 -59
- package/dist/libraries/react/{chunk-L3IZ2O3T.mjs → chunk-AOJCMXVS.mjs} +6 -5
- package/dist/libraries/react/{chunk-OGFFPM5T.mjs → chunk-APDR7D6A.mjs} +2 -2
- package/dist/libraries/react/{chunk-PJK6OPCU.mjs → chunk-CAMHARUX.mjs} +2 -2
- package/dist/libraries/react/{chunk-Y6RO4AM2.mjs → chunk-CHXNYNH3.mjs} +273 -273
- package/dist/libraries/react/{chunk-DIJJCQ2N.mjs → chunk-DVMVIAZE.mjs} +3 -3
- package/dist/libraries/react/{chunk-HL4JNKWK.mjs → chunk-G3FBFZLU.mjs} +4 -1
- package/dist/libraries/react/{chunk-RZW3QO6B.mjs → chunk-LVDONEVF.mjs} +2 -2
- package/dist/libraries/react/{chunk-SDZ5NW6G.mjs → chunk-MZDRIPNS.mjs} +2 -2
- package/dist/libraries/react/{chunk-TCCWWPEC.mjs → chunk-R4BYOLST.mjs} +2 -2
- package/dist/libraries/react/{chunk-6SDVW33H.mjs → chunk-T5PIJ4HG.mjs} +9 -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/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 +8 -8
- 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 +136 -62
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.mjs +22 -22
- 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/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 +136 -62
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +22 -22
- package/dist/libraries/react/{cusTypes-WaPJKeAb.d.ts → cusTypes-Vw94kPR9.d.mts} +1 -1
- package/dist/libraries/react/{cusTypes-WaPJKeAb.d.mts → cusTypes-Vw94kPR9.d.ts} +1 -1
- package/dist/libraries/react/{entTypes-D01S8gFX.d.ts → entTypes-B7nuhHD7.d.ts} +1 -1
- package/dist/libraries/react/{entTypes-aIV0QUCW.d.mts → entTypes-Ho-VocKG.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 +12 -12
- 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 +11 -11
- 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 +136 -62
- package/dist/libraries/react/hooks/useCustomer.mjs +13 -13
- 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 +136 -62
- package/dist/libraries/react/hooks/useCustomerBase.mjs +12 -12
- 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 +13 -13
- 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 +12 -12
- 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 +11 -11
- 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 +10 -10
- package/dist/libraries/react/hooks/useProductsBase.js +129 -52
- package/dist/libraries/react/hooks/useProductsBase.mjs +9 -9
- package/dist/libraries/react/index.d.mts +57 -26
- package/dist/libraries/react/index.d.ts +57 -26
- package/dist/libraries/react/index.js +139 -64
- package/dist/libraries/react/index.mjs +139 -64
- package/dist/libraries/react/{response-CvPzWrT9.d.ts → response-CQf3mDB8.d.ts} +34 -12
- package/dist/libraries/react/{response-Bt5OMm4y.d.mts → response-CWluLfIs.d.mts} +34 -12
- 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-BPjTbeG-.d.mts → clientGenTypes-9ngy1q97.d.mts} +43 -21
- package/dist/next/client/{clientGenTypes-Bqecpl58.d.ts → clientGenTypes-CxB4go6q.d.ts} +43 -21
- 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 +1 -1
|
@@ -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-CxB4go6q.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,11 +63,10 @@ declare class AutumnClient {
|
|
|
63
63
|
}, AutumnError>>;
|
|
64
64
|
attach: (params: {
|
|
65
65
|
options?: {
|
|
66
|
-
quantity: number;
|
|
67
66
|
featureId: string;
|
|
67
|
+
quantity: number;
|
|
68
68
|
}[] | undefined;
|
|
69
69
|
metadata?: Record<string, string> | undefined;
|
|
70
|
-
reward?: string | undefined;
|
|
71
70
|
productId?: string | undefined;
|
|
72
71
|
entityId?: string | undefined;
|
|
73
72
|
productIds?: string[] | undefined;
|
|
@@ -77,24 +76,29 @@ declare class AutumnClient {
|
|
|
77
76
|
dialog?: ((args_0: any, ...args: unknown[]) => JSX.Element | react.ReactNode) | undefined;
|
|
78
77
|
entityData?: any;
|
|
79
78
|
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
|
-
customer_data?: any;
|
|
87
86
|
checkout_url?: string | undefined;
|
|
87
|
+
customer_data?: any;
|
|
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
|
+
success: boolean;
|
|
96
|
+
product_id: string;
|
|
97
|
+
}>;
|
|
94
98
|
check: (params: {
|
|
95
|
-
featureId?: string | undefined;
|
|
96
99
|
productId?: string | undefined;
|
|
97
100
|
entityId?: string | undefined;
|
|
101
|
+
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
|
-
featureId?: string | undefined;
|
|
107
110
|
entityId?: string | undefined;
|
|
111
|
+
featureId?: string | undefined;
|
|
108
112
|
entityData?: any;
|
|
109
113
|
eventName?: string | undefined;
|
|
110
114
|
idempotencyKey?: string | undefined;
|
|
111
|
-
}) => AutumnPromise<
|
|
115
|
+
}) => AutumnPromise<{
|
|
116
|
+
id: string;
|
|
117
|
+
customer_id: string;
|
|
118
|
+
code: 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
|
-
customer_data?: any;
|
|
24
18
|
checkout_url?: string | undefined;
|
|
19
|
+
customer_data?: any;
|
|
25
20
|
}, {
|
|
26
21
|
customer_id: string;
|
|
27
22
|
code: string;
|
|
28
23
|
message: string;
|
|
29
24
|
product_ids: string[];
|
|
30
|
-
customer_data?: any;
|
|
31
25
|
checkout_url?: string | undefined;
|
|
26
|
+
customer_data?: any;
|
|
32
27
|
}>;
|
|
33
28
|
type AttachResult = z.infer<typeof AttachResultSchema>;
|
|
34
|
-
|
|
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
|
+
success: boolean;
|
|
36
|
+
product_id: string;
|
|
37
|
+
}, {
|
|
38
|
+
customer_id: string;
|
|
39
|
+
success: boolean;
|
|
40
|
+
product_id: string;
|
|
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, {
|
|
35
50
|
id: string;
|
|
51
|
+
customer_id: string;
|
|
36
52
|
code: string;
|
|
53
|
+
feature_id?: string | undefined;
|
|
54
|
+
event_name?: string | undefined;
|
|
55
|
+
}, {
|
|
56
|
+
id: string;
|
|
37
57
|
customer_id: string;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
58
|
+
code: 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
|
-
quantity: number;
|
|
68
89
|
featureId: string;
|
|
69
|
-
}, {
|
|
70
90
|
quantity: number;
|
|
91
|
+
}, {
|
|
71
92
|
featureId: string;
|
|
93
|
+
quantity: number;
|
|
72
94
|
}>, "many">>;
|
|
73
95
|
productIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
74
96
|
freeTrial: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -82,11 +104,10 @@ 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
|
-
quantity: number;
|
|
86
107
|
featureId: string;
|
|
108
|
+
quantity: number;
|
|
87
109
|
}[] | undefined;
|
|
88
110
|
metadata?: Record<string, string> | undefined;
|
|
89
|
-
reward?: string | undefined;
|
|
90
111
|
productId?: string | undefined;
|
|
91
112
|
entityId?: string | undefined;
|
|
92
113
|
productIds?: string[] | undefined;
|
|
@@ -96,14 +117,14 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
96
117
|
dialog?: ((args_0: any, ...args: unknown[]) => JSX.Element | react.ReactNode) | undefined;
|
|
97
118
|
entityData?: any;
|
|
98
119
|
openInNewTab?: boolean | undefined;
|
|
120
|
+
reward?: string | undefined;
|
|
99
121
|
checkoutSessionParams?: Record<string, any> | undefined;
|
|
100
122
|
}, {
|
|
101
123
|
options?: {
|
|
102
|
-
quantity: number;
|
|
103
124
|
featureId: string;
|
|
125
|
+
quantity: number;
|
|
104
126
|
}[] | undefined;
|
|
105
127
|
metadata?: Record<string, string> | undefined;
|
|
106
|
-
reward?: string | undefined;
|
|
107
128
|
productId?: string | undefined;
|
|
108
129
|
entityId?: string | undefined;
|
|
109
130
|
productIds?: string[] | undefined;
|
|
@@ -113,6 +134,7 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
113
134
|
dialog?: ((args_0: any, ...args: unknown[]) => JSX.Element | react.ReactNode) | undefined;
|
|
114
135
|
entityData?: any;
|
|
115
136
|
openInNewTab?: boolean | undefined;
|
|
137
|
+
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, {
|
|
143
|
-
featureId?: string | undefined;
|
|
144
165
|
productId?: string | undefined;
|
|
145
166
|
entityId?: string | undefined;
|
|
167
|
+
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
|
}, {
|
|
152
|
-
featureId?: string | undefined;
|
|
153
174
|
productId?: string | undefined;
|
|
154
175
|
entityId?: string | undefined;
|
|
176
|
+
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
|
-
featureId?: string | undefined;
|
|
172
193
|
entityId?: string | undefined;
|
|
194
|
+
featureId?: string | undefined;
|
|
173
195
|
entityData?: any;
|
|
174
196
|
eventName?: string | undefined;
|
|
175
197
|
idempotencyKey?: string | undefined;
|
|
176
198
|
}, {
|
|
177
199
|
value?: number | undefined;
|
|
178
|
-
featureId?: string | undefined;
|
|
179
200
|
entityId?: string | undefined;
|
|
201
|
+
featureId?: 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
|
-
customer_data?: any;
|
|
24
18
|
checkout_url?: string | undefined;
|
|
19
|
+
customer_data?: any;
|
|
25
20
|
}, {
|
|
26
21
|
customer_id: string;
|
|
27
22
|
code: string;
|
|
28
23
|
message: string;
|
|
29
24
|
product_ids: string[];
|
|
30
|
-
customer_data?: any;
|
|
31
25
|
checkout_url?: string | undefined;
|
|
26
|
+
customer_data?: any;
|
|
32
27
|
}>;
|
|
33
28
|
type AttachResult = z.infer<typeof AttachResultSchema>;
|
|
34
|
-
|
|
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
|
+
success: boolean;
|
|
36
|
+
product_id: string;
|
|
37
|
+
}, {
|
|
38
|
+
customer_id: string;
|
|
39
|
+
success: boolean;
|
|
40
|
+
product_id: string;
|
|
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, {
|
|
35
50
|
id: string;
|
|
51
|
+
customer_id: string;
|
|
36
52
|
code: string;
|
|
53
|
+
feature_id?: string | undefined;
|
|
54
|
+
event_name?: string | undefined;
|
|
55
|
+
}, {
|
|
56
|
+
id: string;
|
|
37
57
|
customer_id: string;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
58
|
+
code: 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
|
-
quantity: number;
|
|
68
89
|
featureId: string;
|
|
69
|
-
}, {
|
|
70
90
|
quantity: number;
|
|
91
|
+
}, {
|
|
71
92
|
featureId: string;
|
|
93
|
+
quantity: number;
|
|
72
94
|
}>, "many">>;
|
|
73
95
|
productIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
74
96
|
freeTrial: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -82,11 +104,10 @@ 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
|
-
quantity: number;
|
|
86
107
|
featureId: string;
|
|
108
|
+
quantity: number;
|
|
87
109
|
}[] | undefined;
|
|
88
110
|
metadata?: Record<string, string> | undefined;
|
|
89
|
-
reward?: string | undefined;
|
|
90
111
|
productId?: string | undefined;
|
|
91
112
|
entityId?: string | undefined;
|
|
92
113
|
productIds?: string[] | undefined;
|
|
@@ -96,14 +117,14 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
96
117
|
dialog?: ((args_0: any, ...args: unknown[]) => JSX.Element | react.ReactNode) | undefined;
|
|
97
118
|
entityData?: any;
|
|
98
119
|
openInNewTab?: boolean | undefined;
|
|
120
|
+
reward?: string | undefined;
|
|
99
121
|
checkoutSessionParams?: Record<string, any> | undefined;
|
|
100
122
|
}, {
|
|
101
123
|
options?: {
|
|
102
|
-
quantity: number;
|
|
103
124
|
featureId: string;
|
|
125
|
+
quantity: number;
|
|
104
126
|
}[] | undefined;
|
|
105
127
|
metadata?: Record<string, string> | undefined;
|
|
106
|
-
reward?: string | undefined;
|
|
107
128
|
productId?: string | undefined;
|
|
108
129
|
entityId?: string | undefined;
|
|
109
130
|
productIds?: string[] | undefined;
|
|
@@ -113,6 +134,7 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
113
134
|
dialog?: ((args_0: any, ...args: unknown[]) => JSX.Element | react.ReactNode) | undefined;
|
|
114
135
|
entityData?: any;
|
|
115
136
|
openInNewTab?: boolean | undefined;
|
|
137
|
+
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, {
|
|
143
|
-
featureId?: string | undefined;
|
|
144
165
|
productId?: string | undefined;
|
|
145
166
|
entityId?: string | undefined;
|
|
167
|
+
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
|
}, {
|
|
152
|
-
featureId?: string | undefined;
|
|
153
174
|
productId?: string | undefined;
|
|
154
175
|
entityId?: string | undefined;
|
|
176
|
+
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
|
-
featureId?: string | undefined;
|
|
172
193
|
entityId?: string | undefined;
|
|
194
|
+
featureId?: string | undefined;
|
|
173
195
|
entityData?: any;
|
|
174
196
|
eventName?: string | undefined;
|
|
175
197
|
idempotencyKey?: string | undefined;
|
|
176
198
|
}, {
|
|
177
199
|
value?: number | undefined;
|
|
178
|
-
featureId?: string | undefined;
|
|
179
200
|
entityId?: string | undefined;
|
|
201
|
+
featureId?: string | undefined;
|
|
180
202
|
entityData?: any;
|
|
181
203
|
eventName?: string | undefined;
|
|
182
204
|
idempotencyKey?: string | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AttachParams, C as CheckParams, a as AutumnPromise, b as CheckResult, T as TrackParams, c as TrackResult, d as CancelParams, e as CancelResult, O as OpenBillingPortalParams, S as SetupPaymentParams, f as SetupPaymentResult } from '../clientGenTypes-
|
|
1
|
+
import { A as AttachParams, C as CheckParams, a as AutumnPromise, b as CheckResult, T as TrackParams, c as TrackResult, d as CancelParams, e as CancelResult, O as OpenBillingPortalParams, S as SetupPaymentParams, f as SetupPaymentResult } from '../clientGenTypes-9ngy1q97.mjs';
|
|
2
2
|
import { B as BillingPortalResult } from '../cusTypes-D8lhXGaX.mjs';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import '../error-DHbclCVh.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AttachParams, C as CheckParams, a as AutumnPromise, b as CheckResult, T as TrackParams, c as TrackResult, d as CancelParams, e as CancelResult, O as OpenBillingPortalParams, S as SetupPaymentParams, f as SetupPaymentResult } from '../clientGenTypes-
|
|
1
|
+
import { A as AttachParams, C as CheckParams, a as AutumnPromise, b as CheckResult, T as TrackParams, c as TrackResult, d as CancelParams, e as CancelResult, O as OpenBillingPortalParams, S as SetupPaymentParams, f as SetupPaymentResult } from '../clientGenTypes-CxB4go6q.js';
|
|
2
2
|
import { B as BillingPortalResult } from '../cusTypes-D8lhXGaX.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import '../error-DHbclCVh.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as AutumnError } from '../error-DHbclCVh.mjs';
|
|
2
|
-
import { A as AttachParams, a as AutumnPromise, g as AttachResult, C as CheckParams, b as CheckResult, T as TrackParams, c as TrackResult, d as CancelParams, e as CancelResult, S as SetupPaymentParams, f as SetupPaymentResult, O as OpenBillingPortalParams } from '../clientGenTypes-
|
|
2
|
+
import { A as AttachParams, a as AutumnPromise, g as AttachResult, C as CheckParams, b as CheckResult, T as TrackParams, c as TrackResult, d as CancelParams, e as CancelResult, S as SetupPaymentParams, f as SetupPaymentResult, O as OpenBillingPortalParams } from '../clientGenTypes-9ngy1q97.mjs';
|
|
3
3
|
import { h as CustomerExpandOption, a as Customer, B as BillingPortalResult } from '../cusTypes-D8lhXGaX.mjs';
|
|
4
4
|
import { E as Entity } from '../entTypes-B-2_9hzP.mjs';
|
|
5
5
|
import { C as CreateEntityParams, a as CreateReferralCodeResult, R as RedeemReferralCodeResult } from '../clientEntTypes-BFkleT6a.mjs';
|
|
@@ -45,7 +45,6 @@ interface UseCustomerParams {
|
|
|
45
45
|
errorOnNotFound?: boolean;
|
|
46
46
|
expand?: CustomerExpandOption[];
|
|
47
47
|
swrConfig?: SWRConfiguration;
|
|
48
|
-
authClient?: any;
|
|
49
48
|
}
|
|
50
49
|
|
|
51
50
|
declare const useCustomer: (params?: UseCustomerParams) => UseCustomerResult;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as AutumnError } from '../error-DHbclCVh.js';
|
|
2
|
-
import { A as AttachParams, a as AutumnPromise, g as AttachResult, C as CheckParams, b as CheckResult, T as TrackParams, c as TrackResult, d as CancelParams, e as CancelResult, S as SetupPaymentParams, f as SetupPaymentResult, O as OpenBillingPortalParams } from '../clientGenTypes-
|
|
2
|
+
import { A as AttachParams, a as AutumnPromise, g as AttachResult, C as CheckParams, b as CheckResult, T as TrackParams, c as TrackResult, d as CancelParams, e as CancelResult, S as SetupPaymentParams, f as SetupPaymentResult, O as OpenBillingPortalParams } from '../clientGenTypes-CxB4go6q.js';
|
|
3
3
|
import { h as CustomerExpandOption, a as Customer, B as BillingPortalResult } from '../cusTypes-D8lhXGaX.js';
|
|
4
4
|
import { E as Entity } from '../entTypes-Dq2mbehl.js';
|
|
5
5
|
import { C as CreateEntityParams, a as CreateReferralCodeResult, R as RedeemReferralCodeResult } from '../clientEntTypes-BFkleT6a.js';
|
|
@@ -45,7 +45,6 @@ interface UseCustomerParams {
|
|
|
45
45
|
errorOnNotFound?: boolean;
|
|
46
46
|
expand?: CustomerExpandOption[];
|
|
47
47
|
swrConfig?: SWRConfiguration;
|
|
48
|
-
authClient?: any;
|
|
49
48
|
}
|
|
50
49
|
|
|
51
50
|
declare const useCustomer: (params?: UseCustomerParams) => UseCustomerResult;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CheckParams, a as AutumnPromise, b as CheckResult, A as AttachParams, d as CancelParams,
|
|
1
|
+
import { C as CheckParams, a as AutumnPromise, b as CheckResult, A as AttachParams, d as CancelParams, T as TrackParams } from '../clientGenTypes-9ngy1q97.mjs';
|
|
2
2
|
import { G as GetEntityParams, E as Entity } from '../entTypes-B-2_9hzP.mjs';
|
|
3
3
|
import { A as AllowedParams } from '../handleAllowed-B8TBAzfI.mjs';
|
|
4
4
|
import * as swr from 'swr';
|
|
@@ -15,8 +15,18 @@ declare const useEntity: (entityId: string | null, params?: GetEntityParams) =>
|
|
|
15
15
|
allowed: (params: AllowedParams) => boolean;
|
|
16
16
|
check: (params: CheckParams) => AutumnPromise<CheckResult>;
|
|
17
17
|
attach: (params: AttachParams) => Promise<any>;
|
|
18
|
-
cancel: (params: CancelParams) => AutumnPromise<
|
|
19
|
-
|
|
18
|
+
cancel: (params: CancelParams) => AutumnPromise<{
|
|
19
|
+
customer_id: string;
|
|
20
|
+
success: boolean;
|
|
21
|
+
product_id: string;
|
|
22
|
+
}>;
|
|
23
|
+
track: (params: TrackParams) => AutumnPromise<{
|
|
24
|
+
code: string;
|
|
25
|
+
id: string;
|
|
26
|
+
customer_id: string;
|
|
27
|
+
feature_id?: string | undefined;
|
|
28
|
+
event_name?: string | undefined;
|
|
29
|
+
}>;
|
|
20
30
|
};
|
|
21
31
|
|
|
22
32
|
export { useEntity };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CheckParams, a as AutumnPromise, b as CheckResult, A as AttachParams, d as CancelParams,
|
|
1
|
+
import { C as CheckParams, a as AutumnPromise, b as CheckResult, A as AttachParams, d as CancelParams, T as TrackParams } from '../clientGenTypes-CxB4go6q.js';
|
|
2
2
|
import { G as GetEntityParams, E as Entity } from '../entTypes-Dq2mbehl.js';
|
|
3
3
|
import { A as AllowedParams } from '../handleAllowed-B8TBAzfI.js';
|
|
4
4
|
import * as swr from 'swr';
|
|
@@ -15,8 +15,18 @@ declare const useEntity: (entityId: string | null, params?: GetEntityParams) =>
|
|
|
15
15
|
allowed: (params: AllowedParams) => boolean;
|
|
16
16
|
check: (params: CheckParams) => AutumnPromise<CheckResult>;
|
|
17
17
|
attach: (params: AttachParams) => Promise<any>;
|
|
18
|
-
cancel: (params: CancelParams) => AutumnPromise<
|
|
19
|
-
|
|
18
|
+
cancel: (params: CancelParams) => AutumnPromise<{
|
|
19
|
+
customer_id: string;
|
|
20
|
+
success: boolean;
|
|
21
|
+
product_id: string;
|
|
22
|
+
}>;
|
|
23
|
+
track: (params: TrackParams) => AutumnPromise<{
|
|
24
|
+
code: string;
|
|
25
|
+
id: string;
|
|
26
|
+
customer_id: string;
|
|
27
|
+
feature_id?: string | undefined;
|
|
28
|
+
event_name?: string | undefined;
|
|
29
|
+
}>;
|
|
20
30
|
};
|
|
21
31
|
|
|
22
32
|
export { useEntity };
|