autumn-js 0.1.6 → 0.1.7
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 +33 -33
- package/dist/libraries/backend/better-auth.d.ts +33 -33
- package/dist/libraries/backend/better-auth.js +28 -0
- package/dist/libraries/backend/better-auth.mjs +7 -7
- package/dist/libraries/backend/{chunk-NTPYEOME.mjs → chunk-33ET4N4V.mjs} +1 -1
- package/dist/libraries/backend/{chunk-2LSEWYPD.mjs → chunk-3OVRYTZX.mjs} +6 -6
- package/dist/libraries/backend/{chunk-TTNUEXHB.mjs → chunk-AREWK25J.mjs} +28 -0
- package/dist/libraries/backend/{chunk-WBYCMG34.mjs → chunk-GO7TVFSN.mjs} +1 -1
- package/dist/libraries/backend/{chunk-7Z2OYXN4.mjs → chunk-LL53FE2Z.mjs} +1 -1
- package/dist/libraries/backend/{chunk-Y63QWBQ6.mjs → chunk-TFYLV3GN.mjs} +1 -1
- package/dist/libraries/backend/{chunk-QVLMREDB.mjs → chunk-VBHBF3GP.mjs} +1 -1
- package/dist/libraries/backend/convex.js +28 -0
- package/dist/libraries/backend/convex.mjs +7 -7
- package/dist/libraries/backend/elysia.js +28 -0
- package/dist/libraries/backend/elysia.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 +28 -0
- package/dist/libraries/backend/express.mjs +7 -7
- package/dist/libraries/backend/fastify.js +28 -0
- package/dist/libraries/backend/fastify.mjs +7 -7
- package/dist/libraries/backend/hono.js +28 -0
- package/dist/libraries/backend/hono.mjs +7 -7
- package/dist/libraries/backend/index.d.mts +1 -1
- package/dist/libraries/backend/index.d.ts +1 -1
- package/dist/libraries/backend/index.js +28 -0
- package/dist/libraries/backend/index.mjs +7 -7
- package/dist/libraries/backend/next.js +28 -0
- package/dist/libraries/backend/next.mjs +7 -7
- package/dist/libraries/backend/react-router.js +28 -0
- package/dist/libraries/backend/react-router.mjs +7 -7
- package/dist/libraries/backend/{referralTypes-CYvuZZeF.d.mts → referralTypes-B50JL4PY.d.mts} +110 -43
- package/dist/libraries/backend/{referralTypes-B0_fYSI3.d.ts → referralTypes-dW2HaxKV.d.ts} +110 -43
- package/dist/libraries/backend/remix_dep.js +28 -0
- package/dist/libraries/backend/remix_dep.mjs +7 -7
- package/dist/libraries/backend/routes/backendRouter.js +28 -0
- package/dist/libraries/backend/routes/backendRouter.mjs +7 -7
- package/dist/libraries/backend/routes/entityRoutes.js +28 -0
- package/dist/libraries/backend/routes/entityRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/genRoutes.js +28 -0
- package/dist/libraries/backend/routes/genRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/productRoutes.js +28 -0
- package/dist/libraries/backend/routes/productRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/referralRoutes.js +28 -0
- package/dist/libraries/backend/routes/referralRoutes.mjs +3 -3
- package/dist/libraries/backend/supabase.js +28 -0
- package/dist/libraries/backend/supabase.mjs +7 -7
- package/dist/libraries/backend/tanstack.js +28 -0
- package/dist/libraries/backend/tanstack.mjs +7 -7
- package/dist/libraries/backend/utils/backendRes.js +28 -0
- 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 +28 -0
- package/dist/libraries/backend/utils/withAuth.mjs +2 -2
- package/dist/libraries/react/AutumnContext.d.mts +6 -6
- package/dist/libraries/react/AutumnContext.d.ts +6 -6
- package/dist/libraries/react/AutumnContext.js +35 -1
- package/dist/libraries/react/AutumnContext.mjs +5 -5
- package/dist/libraries/react/BaseAutumnProvider.d.mts +6 -6
- package/dist/libraries/react/BaseAutumnProvider.d.ts +6 -6
- package/dist/libraries/react/BaseAutumnProvider.js +35 -1
- package/dist/libraries/react/BaseAutumnProvider.mjs +10 -10
- package/dist/libraries/react/{ReactAutumnClient-CK8k8OA5.d.ts → ReactAutumnClient-BUq9E84_.d.ts} +20 -18
- package/dist/libraries/react/{ReactAutumnClient-CjaZ_g4X.d.mts → ReactAutumnClient-CpAGyyur.d.mts} +20 -18
- package/dist/libraries/react/ReactAutumnProvider.d.mts +4 -3
- package/dist/libraries/react/ReactAutumnProvider.d.ts +4 -3
- package/dist/libraries/react/ReactAutumnProvider.js +39 -3
- package/dist/libraries/react/ReactAutumnProvider.mjs +11 -11
- package/dist/libraries/react/{attachTypes-BetWkt95.d.ts → attachTypes-CcB6xjSF.d.ts} +5 -5
- package/dist/{next/client/attachTypes-DZFtFEmv.d.mts → libraries/react/attachTypes-DqUN3q8s.d.mts} +3 -3
- package/dist/libraries/react/{chunk-KZVVSY52.mjs → chunk-56PEGK2Z.mjs} +2 -2
- package/dist/libraries/react/{chunk-ZT5TN67S.mjs → chunk-ECOBNPRU.mjs} +7 -5
- package/dist/libraries/react/{chunk-PGU4IXT7.mjs → chunk-FMRBH4CP.mjs} +1 -1
- package/dist/libraries/react/{chunk-KLSRAX2F.mjs → chunk-GWVZB5GK.mjs} +3 -3
- package/dist/libraries/react/{chunk-QV6Q2XXO.mjs → chunk-HIC6P67K.mjs} +14 -8
- package/dist/libraries/react/{chunk-33OTK7MB.mjs → chunk-HMZZIUCF.mjs} +1 -1
- package/dist/libraries/react/{chunk-TJMYXANS.mjs → chunk-JFTZRU2U.mjs} +1 -1
- package/dist/libraries/react/{chunk-7AJBRRXV.mjs → chunk-JNR7QAPG.mjs} +1 -1
- package/dist/libraries/react/{chunk-7PFOXY3Y.mjs → chunk-KYZ3DYMI.mjs} +13 -13
- package/dist/libraries/react/{chunk-W5XUD2S6.mjs → chunk-MW2FSYG3.mjs} +1 -1
- package/dist/libraries/react/{chunk-IM2FNHYV.mjs → chunk-QQKJE2ND.mjs} +2 -2
- package/dist/libraries/react/{chunk-GUDRYJ3O.mjs → chunk-SFGXTDMX.mjs} +2 -2
- package/dist/libraries/react/{chunk-QW2YS3JY.mjs → chunk-SZJOMZTC.mjs} +2 -2
- package/dist/libraries/react/{chunk-F5QUME7S.mjs → chunk-ULIUD6YP.mjs} +3 -3
- package/dist/libraries/react/{chunk-EK2RMWXP.mjs → chunk-WQXUZO6K.mjs} +28 -0
- package/dist/libraries/react/{chunk-SFDHYUHA.mjs → chunk-ZJBEC254.mjs} +1 -1
- package/dist/libraries/react/client/ReactAutumnClient.d.mts +6 -6
- package/dist/libraries/react/client/ReactAutumnClient.d.ts +6 -6
- package/dist/libraries/react/client/ReactAutumnClient.js +35 -1
- package/dist/libraries/react/client/ReactAutumnClient.mjs +4 -4
- package/dist/libraries/react/client/clientCompMethods.d.mts +6 -6
- package/dist/libraries/react/client/clientCompMethods.d.ts +6 -6
- package/dist/libraries/react/client/clientCusMethods.d.mts +6 -6
- package/dist/libraries/react/client/clientCusMethods.d.ts +6 -6
- package/dist/libraries/react/client/clientEntityMethods.d.mts +6 -6
- package/dist/libraries/react/client/clientEntityMethods.d.ts +6 -6
- package/dist/libraries/react/client/clientGenMethods.d.mts +6 -6
- package/dist/libraries/react/client/clientGenMethods.d.ts +6 -6
- package/dist/libraries/react/client/clientProdMethods.d.mts +6 -6
- package/dist/libraries/react/client/clientProdMethods.d.ts +6 -6
- package/dist/libraries/react/client/clientReferralMethods.d.mts +6 -6
- package/dist/libraries/react/client/clientReferralMethods.d.ts +6 -6
- package/dist/libraries/react/client/types/clientAttachTypes.d.mts +20 -20
- package/dist/libraries/react/client/types/clientAttachTypes.d.ts +20 -20
- package/dist/libraries/react/client/types/clientGenTypes.d.mts +4 -4
- package/dist/libraries/react/client/types/clientGenTypes.d.ts +4 -4
- package/dist/libraries/react/client/types/clientGenTypes.js +28 -0
- package/dist/libraries/react/client/types/clientGenTypes.mjs +1 -1
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.d.mts +2 -2
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.d.ts +2 -2
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.js +35 -1
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.mjs +21 -21
- package/dist/libraries/react/components/checkout-dialog/lib/checkout-content.d.mts +2 -2
- package/dist/libraries/react/components/checkout-dialog/lib/checkout-content.d.ts +2 -2
- package/dist/libraries/react/components/paywall-dialog/lib/paywall-content.d.mts +1 -1
- package/dist/libraries/react/components/paywall-dialog/lib/paywall-content.d.ts +1 -1
- package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.js +35 -1
- package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.mjs +21 -21
- package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.d.mts +1 -1
- package/dist/libraries/react/components/pricing-table/lib/pricing-table-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 +35 -1
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +21 -21
- package/dist/libraries/react/{cusTypes-DINgmPwV.d.mts → cusTypes-CSmAk5io.d.mts} +5 -5
- package/dist/libraries/react/{cusTypes-D5d_cu-K.d.ts → cusTypes-DHjT-9rV.d.ts} +5 -5
- package/dist/libraries/react/{entTypes-DNW_l3s0.d.ts → entTypes-CoF9enrR.d.ts} +1 -1
- package/dist/libraries/react/{entTypes-biskqmpT.d.mts → entTypes-S4hkh1RG.d.mts} +1 -1
- package/dist/libraries/react/{genTypes-EyxQImzh.d.ts → genTypes-DsiuvyWS.d.ts} +5 -5
- package/dist/libraries/react/{genTypes-DSvR32on.d.mts → genTypes-fEH_nqSm.d.mts} +5 -5
- package/dist/libraries/react/hooks/helpers/handleCheck.d.mts +6 -6
- package/dist/libraries/react/hooks/helpers/handleCheck.d.ts +6 -6
- package/dist/libraries/react/hooks/helpers/handleCheck.js +28 -0
- package/dist/libraries/react/hooks/helpers/handleCheck.mjs +2 -2
- package/dist/libraries/react/hooks/helpers/useAutumnBase.d.mts +7 -7
- package/dist/libraries/react/hooks/helpers/useAutumnBase.d.ts +7 -7
- package/dist/libraries/react/hooks/helpers/useAutumnBase.js +28 -0
- package/dist/libraries/react/hooks/helpers/useAutumnBase.mjs +3 -3
- package/dist/libraries/react/hooks/useAnalytics.d.mts +2 -2
- package/dist/libraries/react/hooks/useAnalytics.d.ts +2 -2
- package/dist/libraries/react/hooks/useAnalytics.js +35 -1
- package/dist/libraries/react/hooks/useAnalytics.mjs +6 -6
- package/dist/libraries/react/hooks/useCustomer.d.mts +6 -6
- package/dist/libraries/react/hooks/useCustomer.d.ts +6 -6
- package/dist/libraries/react/hooks/useCustomer.js +35 -1
- package/dist/libraries/react/hooks/useCustomer.mjs +10 -10
- package/dist/libraries/react/hooks/useCustomerBase.d.mts +6 -6
- package/dist/libraries/react/hooks/useCustomerBase.d.ts +6 -6
- package/dist/libraries/react/hooks/useCustomerBase.js +35 -1
- package/dist/libraries/react/hooks/useCustomerBase.mjs +9 -9
- package/dist/libraries/react/hooks/useEntity.d.mts +6 -6
- package/dist/libraries/react/hooks/useEntity.d.ts +6 -6
- package/dist/libraries/react/hooks/useEntity.js +35 -1
- package/dist/libraries/react/hooks/useEntity.mjs +10 -10
- package/dist/libraries/react/hooks/useEntityBase.d.mts +8 -8
- package/dist/libraries/react/hooks/useEntityBase.d.ts +8 -8
- package/dist/libraries/react/hooks/useEntityBase.js +35 -1
- package/dist/libraries/react/hooks/useEntityBase.mjs +9 -9
- package/dist/libraries/react/hooks/usePaywall.d.mts +1 -1
- package/dist/libraries/react/hooks/usePaywall.d.ts +1 -1
- package/dist/libraries/react/hooks/usePaywall.js +35 -1
- package/dist/libraries/react/hooks/usePaywall.mjs +6 -6
- 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 +35 -1
- package/dist/libraries/react/hooks/usePricingTable.mjs +7 -7
- package/dist/libraries/react/hooks/usePricingTableBase.d.mts +6 -6
- package/dist/libraries/react/hooks/usePricingTableBase.d.ts +6 -6
- package/dist/libraries/react/hooks/usePricingTableBase.js +28 -0
- package/dist/libraries/react/hooks/usePricingTableBase.mjs +2 -2
- package/dist/libraries/react/hooks/useProductsBase.d.mts +6 -6
- package/dist/libraries/react/hooks/useProductsBase.d.ts +6 -6
- package/dist/libraries/react/index.d.mts +2 -1
- package/dist/libraries/react/index.d.ts +2 -1
- package/dist/libraries/react/index.js +39 -3
- package/dist/libraries/react/index.mjs +39 -3
- package/dist/libraries/react/{prodTypes-Bmoibf-M.d.mts → prodTypes--VvnyGlN.d.mts} +5 -5
- package/dist/libraries/react/{prodTypes-Bmoibf-M.d.ts → prodTypes--VvnyGlN.d.ts} +5 -5
- package/dist/next/client/NextAutumnClient.d.mts +23 -21
- package/dist/next/client/NextAutumnClient.d.ts +23 -21
- package/dist/next/client/NextAutumnProvider.d.mts +2 -2
- package/dist/next/client/NextAutumnProvider.d.ts +2 -2
- package/dist/next/client/{attachTypes-DxJ0LCjT.d.ts → attachTypes-DKlQexnQ.d.ts} +7 -7
- package/dist/{libraries/react/attachTypes-DbI59BLC.d.mts → next/client/attachTypes-EvdK0fPK.d.mts} +9 -9
- package/dist/next/client/{clientAttachTypes-BXtfXB4v.d.ts → clientAttachTypes-CGPjsdPk.d.ts} +29 -29
- package/dist/next/client/{clientAttachTypes-qsdoMt_B.d.mts → clientAttachTypes-CZFjz8Rq.d.mts} +29 -29
- package/dist/next/client/clientUtils.d.mts +3 -3
- package/dist/next/client/clientUtils.d.ts +3 -3
- package/dist/next/client/{cusTypes-BHYpk8bK.d.ts → cusTypes-DEURYNg4.d.ts} +7 -7
- package/dist/next/client/{cusTypes-Q54uLNO5.d.mts → cusTypes-y5wEmx07.d.mts} +7 -7
- package/dist/next/client/{entTypes-vjIG3B1G.d.ts → entTypes-CRFgWhOr.d.ts} +1 -1
- package/dist/next/client/{entTypes-CHHBdhBK.d.mts → entTypes-KRxjcMFv.d.mts} +1 -1
- package/dist/next/client/hooks/useAutumn.d.mts +5 -5
- package/dist/next/client/hooks/useAutumn.d.ts +5 -5
- package/dist/next/client/hooks/useCustomer.d.mts +5 -5
- package/dist/next/client/hooks/useCustomer.d.ts +5 -5
- package/dist/next/client/hooks/useEntity.d.mts +7 -7
- package/dist/next/client/hooks/useEntity.d.ts +7 -7
- package/dist/next/client/hooks/usePricingTable.d.mts +1 -1
- package/dist/next/client/hooks/usePricingTable.d.ts +1 -1
- package/dist/next/client/types.d.mts +3 -3
- package/dist/next/client/types.d.ts +3 -3
- 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 +90 -23
- package/dist/next/server/cusActions.d.ts +90 -23
- package/dist/next/server/genActions.d.mts +1 -1
- package/dist/next/server/genActions.d.ts +1 -1
- package/dist/sdk/index.d.mts +70 -3
- package/dist/sdk/index.d.ts +70 -3
- package/dist/sdk/index.js +28 -0
- package/dist/sdk/index.mjs +28 -0
- package/dist/utils/encryptUtils.js +28 -0
- package/dist/utils/encryptUtils.mjs +28 -0
- package/package.json +1 -1
- package/dist/next/client/{prodTypes-CxvB1YY3.d.mts → prodTypes-DzTLP57C.d.mts} +8 -8
- package/dist/next/client/{prodTypes-CxvB1YY3.d.ts → prodTypes-DzTLP57C.d.ts} +8 -8
- package/dist/next/server/{cusTypes-D38IpLCT.d.ts → cusTypes-CwopPHB0.d.mts} +10 -10
- package/dist/next/server/{cusTypes-D38IpLCT.d.mts → cusTypes-CwopPHB0.d.ts} +10 -10
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as CustomerData, a as Customer } from './cusTypes-
|
|
2
|
-
import { E as Entity } from './entTypes-
|
|
3
|
-
import './prodTypes-
|
|
1
|
+
import { C as CustomerData, a as Customer } from './cusTypes-y5wEmx07.mjs';
|
|
2
|
+
import { E as Entity } from './entTypes-KRxjcMFv.mjs';
|
|
3
|
+
import './prodTypes-DzTLP57C.mjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
6
6
|
interface ProductDetails {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as CustomerData, a as Customer } from './cusTypes-
|
|
2
|
-
import { E as Entity } from './entTypes-
|
|
3
|
-
import './prodTypes-
|
|
1
|
+
import { C as CustomerData, a as Customer } from './cusTypes-DEURYNg4.js';
|
|
2
|
+
import { E as Entity } from './entTypes-CRFgWhOr.js';
|
|
3
|
+
import './prodTypes-DzTLP57C.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
6
6
|
interface ProductDetails {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CustomerData, a as CheckFeatureResult, b as CheckProductResult, P as ProductItem, c as Product, G as GetCustomerParams, d as Customer, e as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, f as BillingPortalResult, g as UpdateBalancesParams, h as UpdateBalancesResult, i as CreateProductParams, L as ListProductsParams, j as CustomerProduct, k as CustomerFeature, l as CustomerInvoice } from './cusTypes-
|
|
1
|
+
import { C as CustomerData, a as CheckFeatureResult, b as CheckProductResult, P as ProductItem, c as Product, G as GetCustomerParams, d as Customer, e as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, f as BillingPortalResult, g as UpdateBalancesParams, h as UpdateBalancesResult, i as CreateProductParams, L as ListProductsParams, j as CustomerProduct, k as CustomerFeature, l as CustomerInvoice } from './cusTypes-CwopPHB0.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { R as Result, A as AutumnError } from './response-eH4S4sg0.mjs';
|
|
4
4
|
|
|
@@ -8,13 +8,13 @@ declare const CancelParamsSchema: z.ZodObject<{
|
|
|
8
8
|
entity_id: z.ZodOptional<z.ZodString>;
|
|
9
9
|
cancel_immediately: z.ZodOptional<z.ZodBoolean>;
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
|
-
customer_id: string;
|
|
12
11
|
product_id: string;
|
|
12
|
+
customer_id: string;
|
|
13
13
|
entity_id?: string | undefined;
|
|
14
14
|
cancel_immediately?: boolean | undefined;
|
|
15
15
|
}, {
|
|
16
|
-
customer_id: string;
|
|
17
16
|
product_id: string;
|
|
17
|
+
customer_id: string;
|
|
18
18
|
entity_id?: string | undefined;
|
|
19
19
|
cancel_immediately?: boolean | undefined;
|
|
20
20
|
}>;
|
|
@@ -30,18 +30,18 @@ declare const TrackParamsSchema: z.ZodObject<{
|
|
|
30
30
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
31
31
|
}, "strip", z.ZodTypeAny, {
|
|
32
32
|
customer_id: string;
|
|
33
|
+
value?: number | undefined;
|
|
33
34
|
feature_id?: string | undefined;
|
|
34
35
|
entity_id?: string | undefined;
|
|
35
|
-
value?: number | undefined;
|
|
36
36
|
customer_data?: any;
|
|
37
37
|
entity_data?: any;
|
|
38
38
|
event_name?: string | undefined;
|
|
39
39
|
idempotency_key?: string | undefined;
|
|
40
40
|
}, {
|
|
41
41
|
customer_id: string;
|
|
42
|
+
value?: number | undefined;
|
|
42
43
|
feature_id?: string | undefined;
|
|
43
44
|
entity_id?: string | undefined;
|
|
44
|
-
value?: number | undefined;
|
|
45
45
|
customer_data?: any;
|
|
46
46
|
entity_data?: any;
|
|
47
47
|
event_name?: string | undefined;
|
|
@@ -70,9 +70,9 @@ declare const CheckParamsSchema: z.ZodObject<{
|
|
|
70
70
|
}, "strip", z.ZodTypeAny, {
|
|
71
71
|
customer_id: string;
|
|
72
72
|
feature_id?: string | undefined;
|
|
73
|
+
product_id?: string | undefined;
|
|
73
74
|
entity_id?: string | undefined;
|
|
74
75
|
required_balance?: number | undefined;
|
|
75
|
-
product_id?: string | undefined;
|
|
76
76
|
customer_data?: any;
|
|
77
77
|
entity_data?: {
|
|
78
78
|
feature_id: string;
|
|
@@ -83,9 +83,9 @@ declare const CheckParamsSchema: z.ZodObject<{
|
|
|
83
83
|
}, {
|
|
84
84
|
customer_id: string;
|
|
85
85
|
feature_id?: string | undefined;
|
|
86
|
+
product_id?: string | undefined;
|
|
86
87
|
entity_id?: string | undefined;
|
|
87
88
|
required_balance?: number | undefined;
|
|
88
|
-
product_id?: string | undefined;
|
|
89
89
|
customer_data?: any;
|
|
90
90
|
entity_data?: {
|
|
91
91
|
feature_id: string;
|
|
@@ -186,13 +186,13 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
186
186
|
reward: z.ZodOptional<z.ZodString>;
|
|
187
187
|
}, "strip", z.ZodTypeAny, {
|
|
188
188
|
customer_id: string;
|
|
189
|
-
entity_id?: string | undefined;
|
|
190
189
|
options?: {
|
|
191
190
|
feature_id: string;
|
|
192
191
|
quantity: number;
|
|
193
192
|
}[] | undefined;
|
|
194
193
|
metadata?: Record<string, string> | undefined;
|
|
195
194
|
product_id?: string | undefined;
|
|
195
|
+
entity_id?: string | undefined;
|
|
196
196
|
product_ids?: string[] | undefined;
|
|
197
197
|
free_trial?: boolean | undefined;
|
|
198
198
|
success_url?: string | undefined;
|
|
@@ -207,13 +207,13 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
207
207
|
reward?: string | undefined;
|
|
208
208
|
}, {
|
|
209
209
|
customer_id: string;
|
|
210
|
-
entity_id?: string | undefined;
|
|
211
210
|
options?: {
|
|
212
211
|
feature_id: string;
|
|
213
212
|
quantity: number;
|
|
214
213
|
}[] | undefined;
|
|
215
214
|
metadata?: Record<string, string> | undefined;
|
|
216
215
|
product_id?: string | undefined;
|
|
216
|
+
entity_id?: string | undefined;
|
|
217
217
|
product_ids?: string[] | undefined;
|
|
218
218
|
free_trial?: boolean | undefined;
|
|
219
219
|
success_url?: string | undefined;
|
|
@@ -260,13 +260,13 @@ declare const CheckoutParamsSchema: z.ZodObject<{
|
|
|
260
260
|
checkout_session_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
261
261
|
reward: z.ZodOptional<z.ZodString>;
|
|
262
262
|
}, "strip", z.ZodTypeAny, {
|
|
263
|
-
customer_id: string;
|
|
264
263
|
product_id: string;
|
|
265
|
-
|
|
264
|
+
customer_id: string;
|
|
266
265
|
options?: {
|
|
267
266
|
feature_id: string;
|
|
268
267
|
quantity: number;
|
|
269
268
|
}[] | undefined;
|
|
269
|
+
entity_id?: string | undefined;
|
|
270
270
|
success_url?: string | undefined;
|
|
271
271
|
customer_data?: {
|
|
272
272
|
name?: string | null | undefined;
|
|
@@ -277,13 +277,13 @@ declare const CheckoutParamsSchema: z.ZodObject<{
|
|
|
277
277
|
checkout_session_params?: Record<string, any> | undefined;
|
|
278
278
|
reward?: string | undefined;
|
|
279
279
|
}, {
|
|
280
|
-
customer_id: string;
|
|
281
280
|
product_id: string;
|
|
282
|
-
|
|
281
|
+
customer_id: string;
|
|
283
282
|
options?: {
|
|
284
283
|
feature_id: string;
|
|
285
284
|
quantity: number;
|
|
286
285
|
}[] | undefined;
|
|
286
|
+
entity_id?: string | undefined;
|
|
287
287
|
success_url?: string | undefined;
|
|
288
288
|
customer_data?: {
|
|
289
289
|
name?: string | null | undefined;
|
|
@@ -315,6 +315,63 @@ type CheckoutResult = {
|
|
|
315
315
|
};
|
|
316
316
|
};
|
|
317
317
|
|
|
318
|
+
declare enum FeatureType {
|
|
319
|
+
Boolean = "boolean",
|
|
320
|
+
SingleUse = "single_use",
|
|
321
|
+
ContinuousUse = "continuous_use",
|
|
322
|
+
CreditSystem = "credit_system"
|
|
323
|
+
}
|
|
324
|
+
declare const FeatureSchema: z.ZodObject<{
|
|
325
|
+
id: z.ZodString;
|
|
326
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
327
|
+
type: z.ZodNativeEnum<typeof FeatureType>;
|
|
328
|
+
display: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
329
|
+
singular: z.ZodString;
|
|
330
|
+
plural: z.ZodString;
|
|
331
|
+
}, "strip", z.ZodTypeAny, {
|
|
332
|
+
singular: string;
|
|
333
|
+
plural: string;
|
|
334
|
+
}, {
|
|
335
|
+
singular: string;
|
|
336
|
+
plural: string;
|
|
337
|
+
}>>>;
|
|
338
|
+
credit_schema: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
339
|
+
metered_feature_id: z.ZodString;
|
|
340
|
+
credit_cost: z.ZodNumber;
|
|
341
|
+
}, "strip", z.ZodTypeAny, {
|
|
342
|
+
metered_feature_id: string;
|
|
343
|
+
credit_cost: number;
|
|
344
|
+
}, {
|
|
345
|
+
metered_feature_id: string;
|
|
346
|
+
credit_cost: number;
|
|
347
|
+
}>, "many">>>;
|
|
348
|
+
}, "strip", z.ZodTypeAny, {
|
|
349
|
+
type: FeatureType;
|
|
350
|
+
id: string;
|
|
351
|
+
name?: string | null | undefined;
|
|
352
|
+
credit_schema?: {
|
|
353
|
+
metered_feature_id: string;
|
|
354
|
+
credit_cost: number;
|
|
355
|
+
}[] | null | undefined;
|
|
356
|
+
display?: {
|
|
357
|
+
singular: string;
|
|
358
|
+
plural: string;
|
|
359
|
+
} | null | undefined;
|
|
360
|
+
}, {
|
|
361
|
+
type: FeatureType;
|
|
362
|
+
id: string;
|
|
363
|
+
name?: string | null | undefined;
|
|
364
|
+
credit_schema?: {
|
|
365
|
+
metered_feature_id: string;
|
|
366
|
+
credit_cost: number;
|
|
367
|
+
}[] | null | undefined;
|
|
368
|
+
display?: {
|
|
369
|
+
singular: string;
|
|
370
|
+
plural: string;
|
|
371
|
+
} | null | undefined;
|
|
372
|
+
}>;
|
|
373
|
+
type Feature = z.infer<typeof FeatureSchema>;
|
|
374
|
+
|
|
318
375
|
declare class Autumn {
|
|
319
376
|
private readonly secretKey;
|
|
320
377
|
private readonly publishableKey;
|
|
@@ -357,6 +414,11 @@ declare class Autumn {
|
|
|
357
414
|
createCode: (params: CreateReferralCodeParams) => Promise<Result<any, AutumnError>>;
|
|
358
415
|
redeemCode: (params: RedeemReferralCodeParams) => Promise<Result<any, AutumnError>>;
|
|
359
416
|
};
|
|
417
|
+
static features: {
|
|
418
|
+
list: () => Promise<Result<{
|
|
419
|
+
list: Feature[];
|
|
420
|
+
}, AutumnError>>;
|
|
421
|
+
};
|
|
360
422
|
customers: {
|
|
361
423
|
get: (id: string, params?: GetCustomerParams) => Promise<Result<Customer, AutumnError>>;
|
|
362
424
|
create: (params?: CreateCustomerParams) => Promise<Result<Customer, AutumnError>>;
|
|
@@ -382,21 +444,26 @@ declare class Autumn {
|
|
|
382
444
|
createCode: (params: CreateReferralCodeParams) => Promise<Result<any, AutumnError>>;
|
|
383
445
|
redeemCode: (params: RedeemReferralCodeParams) => Promise<Result<any, AutumnError>>;
|
|
384
446
|
};
|
|
447
|
+
features: {
|
|
448
|
+
list: () => Promise<Result<{
|
|
449
|
+
list: Feature[];
|
|
450
|
+
}, AutumnError>>;
|
|
451
|
+
};
|
|
385
452
|
static checkout: (params: CheckoutParams) => Promise<Result<CheckoutResult, AutumnError>>;
|
|
386
453
|
checkout(params: CheckoutParams): Promise<Result<CheckoutResult, AutumnError>>;
|
|
387
454
|
static attach: (params: AttachParams) => Promise<Result<{
|
|
388
|
-
customer_id: string;
|
|
389
455
|
code: string;
|
|
390
456
|
message: string;
|
|
457
|
+
customer_id: string;
|
|
391
458
|
product_ids: string[];
|
|
392
459
|
customer_data?: any;
|
|
393
460
|
checkout_url?: string | undefined;
|
|
394
461
|
}, AutumnError>>;
|
|
395
462
|
static usage: (params: UsageParams) => Promise<Result<UsageResult, AutumnError>>;
|
|
396
463
|
attach(params: AttachParams): Promise<Result<{
|
|
397
|
-
customer_id: string;
|
|
398
464
|
code: string;
|
|
399
465
|
message: string;
|
|
466
|
+
customer_id: string;
|
|
400
467
|
product_ids: string[];
|
|
401
468
|
customer_data?: any;
|
|
402
469
|
checkout_url?: string | undefined;
|
|
@@ -404,28 +471,28 @@ declare class Autumn {
|
|
|
404
471
|
static setupPayment: (params: SetupPaymentParams) => Promise<Result<SetupPaymentResult, AutumnError>>;
|
|
405
472
|
setupPayment(params: SetupPaymentParams): Promise<Result<SetupPaymentResult, AutumnError>>;
|
|
406
473
|
static cancel: (params: CancelParams) => Promise<Result<{
|
|
407
|
-
customer_id: string;
|
|
408
474
|
product_id: string;
|
|
475
|
+
customer_id: string;
|
|
409
476
|
success: boolean;
|
|
410
477
|
}, AutumnError>>;
|
|
411
478
|
cancel(params: CancelParams): Promise<Result<{
|
|
412
|
-
customer_id: string;
|
|
413
479
|
product_id: string;
|
|
480
|
+
customer_id: string;
|
|
414
481
|
success: boolean;
|
|
415
482
|
}, AutumnError>>;
|
|
416
483
|
static check: (params: CheckParams) => Promise<Result<CheckResult, AutumnError>>;
|
|
417
484
|
check(params: CheckParams): Promise<Result<CheckResult, AutumnError>>;
|
|
418
485
|
static track: (params: TrackParams) => Promise<Result<{
|
|
419
|
-
customer_id: string;
|
|
420
486
|
code: string;
|
|
421
487
|
id: string;
|
|
488
|
+
customer_id: string;
|
|
422
489
|
feature_id?: string | undefined;
|
|
423
490
|
event_name?: string | undefined;
|
|
424
491
|
}, AutumnError>>;
|
|
425
492
|
track(params: TrackParams): Promise<Result<{
|
|
426
|
-
customer_id: string;
|
|
427
493
|
code: string;
|
|
428
494
|
id: string;
|
|
495
|
+
customer_id: string;
|
|
429
496
|
feature_id?: string | undefined;
|
|
430
497
|
event_name?: string | undefined;
|
|
431
498
|
}, AutumnError>>;
|
|
@@ -466,13 +533,13 @@ declare const TransferProductParamsSchema: z.ZodObject<{
|
|
|
466
533
|
to_entity_id: z.ZodString;
|
|
467
534
|
product_id: z.ZodString;
|
|
468
535
|
}, "strip", z.ZodTypeAny, {
|
|
469
|
-
product_id: string;
|
|
470
536
|
from_entity_id: string;
|
|
471
537
|
to_entity_id: string;
|
|
472
|
-
}, {
|
|
473
538
|
product_id: string;
|
|
539
|
+
}, {
|
|
474
540
|
from_entity_id: string;
|
|
475
541
|
to_entity_id: string;
|
|
542
|
+
product_id: string;
|
|
476
543
|
}>;
|
|
477
544
|
type TransferProductParams = z.infer<typeof TransferProductParamsSchema>;
|
|
478
545
|
type TransferProductResult = {
|
|
@@ -494,11 +561,11 @@ declare const RedeemReferralCodeParamsSchema: z.ZodObject<{
|
|
|
494
561
|
code: z.ZodString;
|
|
495
562
|
customer_id: z.ZodString;
|
|
496
563
|
}, "strip", z.ZodTypeAny, {
|
|
497
|
-
customer_id: string;
|
|
498
564
|
code: string;
|
|
499
|
-
}, {
|
|
500
565
|
customer_id: string;
|
|
566
|
+
}, {
|
|
501
567
|
code: string;
|
|
568
|
+
customer_id: string;
|
|
502
569
|
}>;
|
|
503
570
|
type RedeemReferralCodeParams = z.infer<typeof RedeemReferralCodeParamsSchema>;
|
|
504
571
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CustomerData, a as CheckFeatureResult, b as CheckProductResult, P as ProductItem, c as Product, G as GetCustomerParams, d as Customer, e as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, f as BillingPortalResult, g as UpdateBalancesParams, h as UpdateBalancesResult, i as CreateProductParams, L as ListProductsParams, j as CustomerProduct, k as CustomerFeature, l as CustomerInvoice } from './cusTypes-
|
|
1
|
+
import { C as CustomerData, a as CheckFeatureResult, b as CheckProductResult, P as ProductItem, c as Product, G as GetCustomerParams, d as Customer, e as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, f as BillingPortalResult, g as UpdateBalancesParams, h as UpdateBalancesResult, i as CreateProductParams, L as ListProductsParams, j as CustomerProduct, k as CustomerFeature, l as CustomerInvoice } from './cusTypes-CwopPHB0.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { R as Result, A as AutumnError } from './response-eH4S4sg0.js';
|
|
4
4
|
|
|
@@ -8,13 +8,13 @@ declare const CancelParamsSchema: z.ZodObject<{
|
|
|
8
8
|
entity_id: z.ZodOptional<z.ZodString>;
|
|
9
9
|
cancel_immediately: z.ZodOptional<z.ZodBoolean>;
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
|
-
customer_id: string;
|
|
12
11
|
product_id: string;
|
|
12
|
+
customer_id: string;
|
|
13
13
|
entity_id?: string | undefined;
|
|
14
14
|
cancel_immediately?: boolean | undefined;
|
|
15
15
|
}, {
|
|
16
|
-
customer_id: string;
|
|
17
16
|
product_id: string;
|
|
17
|
+
customer_id: string;
|
|
18
18
|
entity_id?: string | undefined;
|
|
19
19
|
cancel_immediately?: boolean | undefined;
|
|
20
20
|
}>;
|
|
@@ -30,18 +30,18 @@ declare const TrackParamsSchema: z.ZodObject<{
|
|
|
30
30
|
entity_data: z.ZodOptional<z.ZodAny>;
|
|
31
31
|
}, "strip", z.ZodTypeAny, {
|
|
32
32
|
customer_id: string;
|
|
33
|
+
value?: number | undefined;
|
|
33
34
|
feature_id?: string | undefined;
|
|
34
35
|
entity_id?: string | undefined;
|
|
35
|
-
value?: number | undefined;
|
|
36
36
|
customer_data?: any;
|
|
37
37
|
entity_data?: any;
|
|
38
38
|
event_name?: string | undefined;
|
|
39
39
|
idempotency_key?: string | undefined;
|
|
40
40
|
}, {
|
|
41
41
|
customer_id: string;
|
|
42
|
+
value?: number | undefined;
|
|
42
43
|
feature_id?: string | undefined;
|
|
43
44
|
entity_id?: string | undefined;
|
|
44
|
-
value?: number | undefined;
|
|
45
45
|
customer_data?: any;
|
|
46
46
|
entity_data?: any;
|
|
47
47
|
event_name?: string | undefined;
|
|
@@ -70,9 +70,9 @@ declare const CheckParamsSchema: z.ZodObject<{
|
|
|
70
70
|
}, "strip", z.ZodTypeAny, {
|
|
71
71
|
customer_id: string;
|
|
72
72
|
feature_id?: string | undefined;
|
|
73
|
+
product_id?: string | undefined;
|
|
73
74
|
entity_id?: string | undefined;
|
|
74
75
|
required_balance?: number | undefined;
|
|
75
|
-
product_id?: string | undefined;
|
|
76
76
|
customer_data?: any;
|
|
77
77
|
entity_data?: {
|
|
78
78
|
feature_id: string;
|
|
@@ -83,9 +83,9 @@ declare const CheckParamsSchema: z.ZodObject<{
|
|
|
83
83
|
}, {
|
|
84
84
|
customer_id: string;
|
|
85
85
|
feature_id?: string | undefined;
|
|
86
|
+
product_id?: string | undefined;
|
|
86
87
|
entity_id?: string | undefined;
|
|
87
88
|
required_balance?: number | undefined;
|
|
88
|
-
product_id?: string | undefined;
|
|
89
89
|
customer_data?: any;
|
|
90
90
|
entity_data?: {
|
|
91
91
|
feature_id: string;
|
|
@@ -186,13 +186,13 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
186
186
|
reward: z.ZodOptional<z.ZodString>;
|
|
187
187
|
}, "strip", z.ZodTypeAny, {
|
|
188
188
|
customer_id: string;
|
|
189
|
-
entity_id?: string | undefined;
|
|
190
189
|
options?: {
|
|
191
190
|
feature_id: string;
|
|
192
191
|
quantity: number;
|
|
193
192
|
}[] | undefined;
|
|
194
193
|
metadata?: Record<string, string> | undefined;
|
|
195
194
|
product_id?: string | undefined;
|
|
195
|
+
entity_id?: string | undefined;
|
|
196
196
|
product_ids?: string[] | undefined;
|
|
197
197
|
free_trial?: boolean | undefined;
|
|
198
198
|
success_url?: string | undefined;
|
|
@@ -207,13 +207,13 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
207
207
|
reward?: string | undefined;
|
|
208
208
|
}, {
|
|
209
209
|
customer_id: string;
|
|
210
|
-
entity_id?: string | undefined;
|
|
211
210
|
options?: {
|
|
212
211
|
feature_id: string;
|
|
213
212
|
quantity: number;
|
|
214
213
|
}[] | undefined;
|
|
215
214
|
metadata?: Record<string, string> | undefined;
|
|
216
215
|
product_id?: string | undefined;
|
|
216
|
+
entity_id?: string | undefined;
|
|
217
217
|
product_ids?: string[] | undefined;
|
|
218
218
|
free_trial?: boolean | undefined;
|
|
219
219
|
success_url?: string | undefined;
|
|
@@ -260,13 +260,13 @@ declare const CheckoutParamsSchema: z.ZodObject<{
|
|
|
260
260
|
checkout_session_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
261
261
|
reward: z.ZodOptional<z.ZodString>;
|
|
262
262
|
}, "strip", z.ZodTypeAny, {
|
|
263
|
-
customer_id: string;
|
|
264
263
|
product_id: string;
|
|
265
|
-
|
|
264
|
+
customer_id: string;
|
|
266
265
|
options?: {
|
|
267
266
|
feature_id: string;
|
|
268
267
|
quantity: number;
|
|
269
268
|
}[] | undefined;
|
|
269
|
+
entity_id?: string | undefined;
|
|
270
270
|
success_url?: string | undefined;
|
|
271
271
|
customer_data?: {
|
|
272
272
|
name?: string | null | undefined;
|
|
@@ -277,13 +277,13 @@ declare const CheckoutParamsSchema: z.ZodObject<{
|
|
|
277
277
|
checkout_session_params?: Record<string, any> | undefined;
|
|
278
278
|
reward?: string | undefined;
|
|
279
279
|
}, {
|
|
280
|
-
customer_id: string;
|
|
281
280
|
product_id: string;
|
|
282
|
-
|
|
281
|
+
customer_id: string;
|
|
283
282
|
options?: {
|
|
284
283
|
feature_id: string;
|
|
285
284
|
quantity: number;
|
|
286
285
|
}[] | undefined;
|
|
286
|
+
entity_id?: string | undefined;
|
|
287
287
|
success_url?: string | undefined;
|
|
288
288
|
customer_data?: {
|
|
289
289
|
name?: string | null | undefined;
|
|
@@ -315,6 +315,63 @@ type CheckoutResult = {
|
|
|
315
315
|
};
|
|
316
316
|
};
|
|
317
317
|
|
|
318
|
+
declare enum FeatureType {
|
|
319
|
+
Boolean = "boolean",
|
|
320
|
+
SingleUse = "single_use",
|
|
321
|
+
ContinuousUse = "continuous_use",
|
|
322
|
+
CreditSystem = "credit_system"
|
|
323
|
+
}
|
|
324
|
+
declare const FeatureSchema: z.ZodObject<{
|
|
325
|
+
id: z.ZodString;
|
|
326
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
327
|
+
type: z.ZodNativeEnum<typeof FeatureType>;
|
|
328
|
+
display: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
329
|
+
singular: z.ZodString;
|
|
330
|
+
plural: z.ZodString;
|
|
331
|
+
}, "strip", z.ZodTypeAny, {
|
|
332
|
+
singular: string;
|
|
333
|
+
plural: string;
|
|
334
|
+
}, {
|
|
335
|
+
singular: string;
|
|
336
|
+
plural: string;
|
|
337
|
+
}>>>;
|
|
338
|
+
credit_schema: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
339
|
+
metered_feature_id: z.ZodString;
|
|
340
|
+
credit_cost: z.ZodNumber;
|
|
341
|
+
}, "strip", z.ZodTypeAny, {
|
|
342
|
+
metered_feature_id: string;
|
|
343
|
+
credit_cost: number;
|
|
344
|
+
}, {
|
|
345
|
+
metered_feature_id: string;
|
|
346
|
+
credit_cost: number;
|
|
347
|
+
}>, "many">>>;
|
|
348
|
+
}, "strip", z.ZodTypeAny, {
|
|
349
|
+
type: FeatureType;
|
|
350
|
+
id: string;
|
|
351
|
+
name?: string | null | undefined;
|
|
352
|
+
credit_schema?: {
|
|
353
|
+
metered_feature_id: string;
|
|
354
|
+
credit_cost: number;
|
|
355
|
+
}[] | null | undefined;
|
|
356
|
+
display?: {
|
|
357
|
+
singular: string;
|
|
358
|
+
plural: string;
|
|
359
|
+
} | null | undefined;
|
|
360
|
+
}, {
|
|
361
|
+
type: FeatureType;
|
|
362
|
+
id: string;
|
|
363
|
+
name?: string | null | undefined;
|
|
364
|
+
credit_schema?: {
|
|
365
|
+
metered_feature_id: string;
|
|
366
|
+
credit_cost: number;
|
|
367
|
+
}[] | null | undefined;
|
|
368
|
+
display?: {
|
|
369
|
+
singular: string;
|
|
370
|
+
plural: string;
|
|
371
|
+
} | null | undefined;
|
|
372
|
+
}>;
|
|
373
|
+
type Feature = z.infer<typeof FeatureSchema>;
|
|
374
|
+
|
|
318
375
|
declare class Autumn {
|
|
319
376
|
private readonly secretKey;
|
|
320
377
|
private readonly publishableKey;
|
|
@@ -357,6 +414,11 @@ declare class Autumn {
|
|
|
357
414
|
createCode: (params: CreateReferralCodeParams) => Promise<Result<any, AutumnError>>;
|
|
358
415
|
redeemCode: (params: RedeemReferralCodeParams) => Promise<Result<any, AutumnError>>;
|
|
359
416
|
};
|
|
417
|
+
static features: {
|
|
418
|
+
list: () => Promise<Result<{
|
|
419
|
+
list: Feature[];
|
|
420
|
+
}, AutumnError>>;
|
|
421
|
+
};
|
|
360
422
|
customers: {
|
|
361
423
|
get: (id: string, params?: GetCustomerParams) => Promise<Result<Customer, AutumnError>>;
|
|
362
424
|
create: (params?: CreateCustomerParams) => Promise<Result<Customer, AutumnError>>;
|
|
@@ -382,21 +444,26 @@ declare class Autumn {
|
|
|
382
444
|
createCode: (params: CreateReferralCodeParams) => Promise<Result<any, AutumnError>>;
|
|
383
445
|
redeemCode: (params: RedeemReferralCodeParams) => Promise<Result<any, AutumnError>>;
|
|
384
446
|
};
|
|
447
|
+
features: {
|
|
448
|
+
list: () => Promise<Result<{
|
|
449
|
+
list: Feature[];
|
|
450
|
+
}, AutumnError>>;
|
|
451
|
+
};
|
|
385
452
|
static checkout: (params: CheckoutParams) => Promise<Result<CheckoutResult, AutumnError>>;
|
|
386
453
|
checkout(params: CheckoutParams): Promise<Result<CheckoutResult, AutumnError>>;
|
|
387
454
|
static attach: (params: AttachParams) => Promise<Result<{
|
|
388
|
-
customer_id: string;
|
|
389
455
|
code: string;
|
|
390
456
|
message: string;
|
|
457
|
+
customer_id: string;
|
|
391
458
|
product_ids: string[];
|
|
392
459
|
customer_data?: any;
|
|
393
460
|
checkout_url?: string | undefined;
|
|
394
461
|
}, AutumnError>>;
|
|
395
462
|
static usage: (params: UsageParams) => Promise<Result<UsageResult, AutumnError>>;
|
|
396
463
|
attach(params: AttachParams): Promise<Result<{
|
|
397
|
-
customer_id: string;
|
|
398
464
|
code: string;
|
|
399
465
|
message: string;
|
|
466
|
+
customer_id: string;
|
|
400
467
|
product_ids: string[];
|
|
401
468
|
customer_data?: any;
|
|
402
469
|
checkout_url?: string | undefined;
|
|
@@ -404,28 +471,28 @@ declare class Autumn {
|
|
|
404
471
|
static setupPayment: (params: SetupPaymentParams) => Promise<Result<SetupPaymentResult, AutumnError>>;
|
|
405
472
|
setupPayment(params: SetupPaymentParams): Promise<Result<SetupPaymentResult, AutumnError>>;
|
|
406
473
|
static cancel: (params: CancelParams) => Promise<Result<{
|
|
407
|
-
customer_id: string;
|
|
408
474
|
product_id: string;
|
|
475
|
+
customer_id: string;
|
|
409
476
|
success: boolean;
|
|
410
477
|
}, AutumnError>>;
|
|
411
478
|
cancel(params: CancelParams): Promise<Result<{
|
|
412
|
-
customer_id: string;
|
|
413
479
|
product_id: string;
|
|
480
|
+
customer_id: string;
|
|
414
481
|
success: boolean;
|
|
415
482
|
}, AutumnError>>;
|
|
416
483
|
static check: (params: CheckParams) => Promise<Result<CheckResult, AutumnError>>;
|
|
417
484
|
check(params: CheckParams): Promise<Result<CheckResult, AutumnError>>;
|
|
418
485
|
static track: (params: TrackParams) => Promise<Result<{
|
|
419
|
-
customer_id: string;
|
|
420
486
|
code: string;
|
|
421
487
|
id: string;
|
|
488
|
+
customer_id: string;
|
|
422
489
|
feature_id?: string | undefined;
|
|
423
490
|
event_name?: string | undefined;
|
|
424
491
|
}, AutumnError>>;
|
|
425
492
|
track(params: TrackParams): Promise<Result<{
|
|
426
|
-
customer_id: string;
|
|
427
493
|
code: string;
|
|
428
494
|
id: string;
|
|
495
|
+
customer_id: string;
|
|
429
496
|
feature_id?: string | undefined;
|
|
430
497
|
event_name?: string | undefined;
|
|
431
498
|
}, AutumnError>>;
|
|
@@ -466,13 +533,13 @@ declare const TransferProductParamsSchema: z.ZodObject<{
|
|
|
466
533
|
to_entity_id: z.ZodString;
|
|
467
534
|
product_id: z.ZodString;
|
|
468
535
|
}, "strip", z.ZodTypeAny, {
|
|
469
|
-
product_id: string;
|
|
470
536
|
from_entity_id: string;
|
|
471
537
|
to_entity_id: string;
|
|
472
|
-
}, {
|
|
473
538
|
product_id: string;
|
|
539
|
+
}, {
|
|
474
540
|
from_entity_id: string;
|
|
475
541
|
to_entity_id: string;
|
|
542
|
+
product_id: string;
|
|
476
543
|
}>;
|
|
477
544
|
type TransferProductParams = z.infer<typeof TransferProductParamsSchema>;
|
|
478
545
|
type TransferProductResult = {
|
|
@@ -494,11 +561,11 @@ declare const RedeemReferralCodeParamsSchema: z.ZodObject<{
|
|
|
494
561
|
code: z.ZodString;
|
|
495
562
|
customer_id: z.ZodString;
|
|
496
563
|
}, "strip", z.ZodTypeAny, {
|
|
497
|
-
customer_id: string;
|
|
498
564
|
code: string;
|
|
499
|
-
}, {
|
|
500
565
|
customer_id: string;
|
|
566
|
+
}, {
|
|
501
567
|
code: string;
|
|
568
|
+
customer_id: string;
|
|
502
569
|
}>;
|
|
503
570
|
type RedeemReferralCodeParams = z.infer<typeof RedeemReferralCodeParamsSchema>;
|
|
504
571
|
|