autumn-js 0.1.0 → 0.1.1
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 +18 -18
- package/dist/libraries/backend/better-auth.d.ts +18 -18
- package/dist/libraries/backend/better-auth.js +22 -1
- package/dist/libraries/backend/better-auth.mjs +7 -7
- package/dist/libraries/backend/{chunk-QGX7ZACH.mjs → chunk-DXWCLQ3N.mjs} +22 -1
- package/dist/libraries/backend/{chunk-O6KXYXQN.mjs → chunk-J2VSPYGM.mjs} +1 -1
- package/dist/libraries/backend/{chunk-BX2LACTF.mjs → chunk-K4QNWERT.mjs} +1 -1
- package/dist/libraries/backend/{chunk-N4PGGU3D.mjs → chunk-KTOGBCW7.mjs} +1 -1
- package/dist/libraries/backend/{chunk-WTKY2U3S.mjs → chunk-M74V7TUF.mjs} +6 -6
- package/dist/libraries/backend/{chunk-BDMGQV75.mjs → chunk-TMPFQRFY.mjs} +1 -1
- package/dist/libraries/backend/{chunk-EIP7LDKF.mjs → chunk-XB7LGW7G.mjs} +1 -1
- package/dist/libraries/backend/convex.js +22 -1
- package/dist/libraries/backend/convex.mjs +7 -7
- package/dist/libraries/backend/elysia.js +22 -1
- package/dist/libraries/backend/elysia.mjs +7 -7
- package/dist/libraries/backend/express.d.mts +2 -2
- package/dist/libraries/backend/express.d.ts +2 -2
- package/dist/libraries/backend/express.js +23 -2
- package/dist/libraries/backend/express.mjs +8 -8
- package/dist/libraries/backend/fastify.js +22 -1
- package/dist/libraries/backend/fastify.mjs +7 -7
- package/dist/libraries/backend/hono.js +22 -1
- 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 +22 -1
- package/dist/libraries/backend/index.mjs +7 -7
- package/dist/libraries/backend/next.js +22 -1
- package/dist/libraries/backend/next.mjs +7 -7
- package/dist/libraries/backend/react-router.d.mts +3 -12
- package/dist/libraries/backend/react-router.d.ts +3 -12
- package/dist/libraries/backend/react-router.js +34 -19
- package/dist/libraries/backend/react-router.mjs +19 -25
- package/dist/libraries/backend/{referralTypes-DRsv8not.d.mts → referralTypes-Bxe9iJlv.d.mts} +60 -35
- package/dist/libraries/backend/{referralTypes-DHs1hY4_.d.ts → referralTypes-CQf4mX3z.d.ts} +60 -35
- package/dist/libraries/backend/remix_dep.js +22 -1
- package/dist/libraries/backend/remix_dep.mjs +7 -7
- package/dist/libraries/backend/routes/backendRouter.js +22 -1
- package/dist/libraries/backend/routes/backendRouter.mjs +7 -7
- package/dist/libraries/backend/routes/entityRoutes.js +22 -1
- package/dist/libraries/backend/routes/entityRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/genRoutes.js +22 -1
- package/dist/libraries/backend/routes/genRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/productRoutes.js +22 -1
- package/dist/libraries/backend/routes/productRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/referralRoutes.js +22 -1
- package/dist/libraries/backend/routes/referralRoutes.mjs +3 -3
- package/dist/libraries/backend/supabase.js +22 -1
- package/dist/libraries/backend/supabase.mjs +7 -7
- package/dist/libraries/backend/tanstack.js +22 -1
- package/dist/libraries/backend/tanstack.mjs +7 -7
- package/dist/libraries/backend/utils/backendRes.js +22 -1
- 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 +22 -1
- 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 +22 -1
- package/dist/libraries/react/AutumnContext.mjs +3 -3
- package/dist/libraries/react/BaseAutumnProvider.d.mts +6 -6
- package/dist/libraries/react/BaseAutumnProvider.d.ts +6 -6
- package/dist/libraries/react/BaseAutumnProvider.js +28 -2
- package/dist/libraries/react/BaseAutumnProvider.mjs +8 -8
- package/dist/libraries/react/{ReactAutumnClient-BK3wjb-u.d.mts → ReactAutumnClient-BHjd9Tw5.d.mts} +17 -17
- package/dist/libraries/react/{ReactAutumnClient-Bh0Sgw6f.d.ts → ReactAutumnClient-DM5ZRTfX.d.ts} +17 -17
- package/dist/libraries/react/ReactAutumnProvider.d.mts +2 -2
- package/dist/libraries/react/ReactAutumnProvider.d.ts +2 -2
- package/dist/libraries/react/ReactAutumnProvider.js +28 -2
- package/dist/libraries/react/ReactAutumnProvider.mjs +9 -9
- package/dist/{next/client/attachTypes-BCt7D8ym.d.ts → libraries/react/attachTypes-Bz1_JTvk.d.ts} +5 -5
- package/dist/{next/client/attachTypes-BThbMcvF.d.mts → libraries/react/attachTypes-C9FJTCo6.d.mts} +5 -5
- package/dist/libraries/react/{chunk-WZG3QTZI.mjs → chunk-4V7CDINI.mjs} +3 -3
- package/dist/libraries/react/{chunk-PFN52PHR.mjs → chunk-6D7DZEP5.mjs} +2 -2
- package/dist/libraries/react/{chunk-H4J73SMR.mjs → chunk-B7RO2OAP.mjs} +1 -1
- package/dist/libraries/react/{chunk-UCUAGLCJ.mjs → chunk-C5OYITSR.mjs} +1 -1
- package/dist/libraries/react/{chunk-IFZCH7DR.mjs → chunk-F52BIZ4N.mjs} +2 -2
- package/dist/libraries/react/{chunk-4NCB2TMQ.mjs → chunk-G2GXS74H.mjs} +3 -3
- package/dist/libraries/react/{chunk-JLJPPCQJ.mjs → chunk-GKHVCED5.mjs} +2 -2
- package/dist/libraries/react/{chunk-BGLWB5O2.mjs → chunk-HJI7QUTD.mjs} +14 -13
- package/dist/libraries/react/{chunk-LFLX6NJU.mjs → chunk-JOAOLY2Z.mjs} +1 -1
- package/dist/libraries/react/{chunk-53HYUF2F.mjs → chunk-JZQQJNF6.mjs} +9 -4
- package/dist/libraries/react/{chunk-TM3NBNVM.mjs → chunk-KVTXABQL.mjs} +1 -1
- package/dist/libraries/react/{chunk-7RICWVXV.mjs → chunk-NOUNCJRC.mjs} +2 -2
- package/dist/libraries/react/{chunk-UAK4XMNC.mjs → chunk-O2GKDKV5.mjs} +1 -1
- package/dist/libraries/react/{chunk-LMQMA7VL.mjs → chunk-S75NZSTG.mjs} +1 -1
- package/dist/libraries/react/{chunk-CZBWEEWD.mjs → chunk-SRYI4NMF.mjs} +22 -1
- package/dist/libraries/react/{chunk-MRZA4JWN.mjs → chunk-YI6OTBFN.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 +22 -1
- package/dist/libraries/react/client/ReactAutumnClient.mjs +2 -2
- 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 +22 -1
- 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 +30 -3
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.mjs +19 -19
- 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 +22 -1
- package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.mjs +19 -19
- 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 +30 -3
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +19 -19
- package/dist/libraries/react/{cusTypes-Dlt0fQmq.d.mts → cusTypes-DT-gAUL9.d.mts} +5 -5
- package/dist/libraries/react/{cusTypes-eNmWJ2rC.d.ts → cusTypes-yJ0fSxbq.d.ts} +5 -5
- package/dist/libraries/react/{entTypes-B_DvaeRL.d.ts → entTypes-BPdjCunj.d.ts} +1 -1
- package/dist/libraries/react/{entTypes-BDZUfZE_.d.mts → entTypes-D79XPrxo.d.mts} +1 -1
- package/dist/libraries/react/{genTypes-BIPS92_Q.d.mts → genTypes-BV-Jc6Q1.d.mts} +5 -5
- package/dist/libraries/react/{genTypes-Rn-oq2sc.d.ts → genTypes-DJUAkD36.d.ts} +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 +22 -1
- package/dist/libraries/react/hooks/helpers/handleCheck.mjs +2 -2
- package/dist/libraries/react/hooks/helpers/useAutumnBase.d.mts +6 -6
- package/dist/libraries/react/hooks/helpers/useAutumnBase.d.ts +6 -6
- package/dist/libraries/react/hooks/helpers/useAutumnBase.js +22 -1
- 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 +22 -1
- package/dist/libraries/react/hooks/useAnalytics.mjs +4 -4
- 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 +28 -2
- package/dist/libraries/react/hooks/useCustomer.mjs +8 -8
- 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 +28 -2
- package/dist/libraries/react/hooks/useCustomerBase.mjs +7 -7
- package/dist/libraries/react/hooks/useEntity.d.mts +4 -4
- package/dist/libraries/react/hooks/useEntity.d.ts +4 -4
- package/dist/libraries/react/hooks/useEntity.js +22 -1
- package/dist/libraries/react/hooks/useEntity.mjs +8 -8
- package/dist/libraries/react/hooks/useEntityBase.d.mts +6 -6
- package/dist/libraries/react/hooks/useEntityBase.d.ts +6 -6
- package/dist/libraries/react/hooks/useEntityBase.js +22 -1
- package/dist/libraries/react/hooks/useEntityBase.mjs +7 -7
- 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 +22 -1
- package/dist/libraries/react/hooks/usePaywall.mjs +4 -4
- 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 +22 -1
- package/dist/libraries/react/hooks/usePricingTable.mjs +5 -5
- 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 +22 -1
- 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.js +30 -3
- package/dist/libraries/react/index.mjs +30 -3
- package/dist/libraries/react/{prodTypes-DuLXGCiA.d.mts → prodTypes-2tlu9Pyz.d.mts} +5 -5
- package/dist/libraries/react/{prodTypes-DuLXGCiA.d.ts → prodTypes-2tlu9Pyz.d.ts} +5 -5
- package/dist/next/client/NextAutumnClient.d.mts +5 -5
- package/dist/next/client/NextAutumnClient.d.ts +5 -5
- package/dist/next/client/NextAutumnProvider.d.mts +2 -2
- package/dist/next/client/NextAutumnProvider.d.ts +2 -2
- package/dist/{libraries/react/attachTypes-Cy6WgUas.d.ts → next/client/attachTypes-92MRramY.d.ts} +3 -3
- package/dist/{libraries/react/attachTypes-DKmoXHQO.d.mts → next/client/attachTypes-B1E-U8us.d.mts} +3 -3
- package/dist/next/client/{clientAttachTypes-whHUVrE3.d.mts → clientAttachTypes-CBBghfgO.d.mts} +1 -1
- package/dist/next/client/{clientAttachTypes-Df5FVGkw.d.ts → clientAttachTypes-D6mgEcpb.d.ts} +1 -1
- package/dist/next/client/clientUtils.d.mts +3 -3
- package/dist/next/client/clientUtils.d.ts +3 -3
- package/dist/next/client/{cusTypes-CqAsUZEp.d.ts → cusTypes-BVKU6cVB.d.ts} +1 -1
- package/dist/next/client/{cusTypes-BuLw67IH.d.mts → cusTypes-BZtsQdTQ.d.mts} +1 -1
- package/dist/next/client/{entTypes-BLLymqnn.d.ts → entTypes-BRilmNmx.d.ts} +1 -1
- package/dist/next/client/{entTypes-DTRFxh07.d.mts → entTypes-DC0vr4aU.d.mts} +1 -1
- package/dist/next/client/hooks/useAutumn.d.mts +4 -4
- package/dist/next/client/hooks/useAutumn.d.ts +4 -4
- 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 +4 -4
- package/dist/next/client/hooks/useEntity.d.ts +4 -4
- 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 +25 -23
- package/dist/next/server/cusActions.d.ts +25 -23
- package/dist/next/server/{cusTypes-B0zde-Pl.d.ts → cusTypes-Cy5gmwaq.d.mts} +30 -7
- package/dist/next/server/{cusTypes-B0zde-Pl.d.mts → cusTypes-Cy5gmwaq.d.ts} +30 -7
- package/dist/next/server/genActions.d.mts +1 -1
- package/dist/next/server/genActions.d.ts +1 -1
- package/dist/sdk/index.d.mts +26 -1
- package/dist/sdk/index.d.ts +26 -1
- package/dist/sdk/index.js +23 -1
- package/dist/sdk/index.mjs +23 -2
- package/dist/utils/encryptUtils.js +22 -1
- package/dist/utils/encryptUtils.mjs +22 -1
- package/package.json +2 -1
- package/dist/next/client/{prodTypes-UFM-PYm-.d.mts → prodTypes-CER0agHK.d.mts} +2 -2
- package/dist/next/client/{prodTypes-UFM-PYm-.d.ts → prodTypes-CER0agHK.d.ts} +2 -2
|
@@ -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 CreateProductParams, L as ListProductsParams,
|
|
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-Cy5gmwaq.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;
|
|
@@ -338,6 +338,7 @@ declare class Autumn {
|
|
|
338
338
|
update: (id: string, params: UpdateCustomerParams) => Promise<Result<Customer, AutumnError>>;
|
|
339
339
|
delete: (id: string) => Promise<Result<Customer, AutumnError>>;
|
|
340
340
|
billingPortal: (id: string, params?: BillingPortalParams) => Promise<Result<BillingPortalResult, AutumnError>>;
|
|
341
|
+
updateBalances: (id: string, params: UpdateBalancesParams) => Promise<Result<UpdateBalancesResult, AutumnError>>;
|
|
341
342
|
};
|
|
342
343
|
static products: {
|
|
343
344
|
get: (id: string) => Promise<Result<Product, AutumnError>>;
|
|
@@ -362,6 +363,7 @@ declare class Autumn {
|
|
|
362
363
|
update: (id: string, params: UpdateCustomerParams) => Promise<Result<Customer, AutumnError>>;
|
|
363
364
|
delete: (id: string) => Promise<Result<Customer, AutumnError>>;
|
|
364
365
|
billingPortal: (id: string, params?: BillingPortalParams) => Promise<Result<BillingPortalResult, AutumnError>>;
|
|
366
|
+
updateBalances: (id: string, params: UpdateBalancesParams) => Promise<Result<UpdateBalancesResult, AutumnError>>;
|
|
365
367
|
};
|
|
366
368
|
products: {
|
|
367
369
|
get: (id: string) => Promise<Result<Product, AutumnError>>;
|
|
@@ -383,18 +385,18 @@ declare class Autumn {
|
|
|
383
385
|
static checkout: (params: CheckoutParams) => Promise<Result<CheckoutResult, AutumnError>>;
|
|
384
386
|
checkout(params: CheckoutParams): Promise<Result<CheckoutResult, AutumnError>>;
|
|
385
387
|
static attach: (params: AttachParams) => Promise<Result<{
|
|
386
|
-
customer_id: string;
|
|
387
388
|
code: string;
|
|
388
389
|
message: string;
|
|
390
|
+
customer_id: string;
|
|
389
391
|
product_ids: string[];
|
|
390
392
|
customer_data?: any;
|
|
391
393
|
checkout_url?: string | undefined;
|
|
392
394
|
}, AutumnError>>;
|
|
393
395
|
static usage: (params: UsageParams) => Promise<Result<UsageResult, AutumnError>>;
|
|
394
396
|
attach(params: AttachParams): Promise<Result<{
|
|
395
|
-
customer_id: string;
|
|
396
397
|
code: string;
|
|
397
398
|
message: string;
|
|
399
|
+
customer_id: string;
|
|
398
400
|
product_ids: string[];
|
|
399
401
|
customer_data?: any;
|
|
400
402
|
checkout_url?: string | undefined;
|
|
@@ -402,28 +404,28 @@ declare class Autumn {
|
|
|
402
404
|
static setupPayment: (params: SetupPaymentParams) => Promise<Result<SetupPaymentResult, AutumnError>>;
|
|
403
405
|
setupPayment(params: SetupPaymentParams): Promise<Result<SetupPaymentResult, AutumnError>>;
|
|
404
406
|
static cancel: (params: CancelParams) => Promise<Result<{
|
|
405
|
-
customer_id: string;
|
|
406
407
|
product_id: string;
|
|
408
|
+
customer_id: string;
|
|
407
409
|
success: boolean;
|
|
408
410
|
}, AutumnError>>;
|
|
409
411
|
cancel(params: CancelParams): Promise<Result<{
|
|
410
|
-
customer_id: string;
|
|
411
412
|
product_id: string;
|
|
413
|
+
customer_id: string;
|
|
412
414
|
success: boolean;
|
|
413
415
|
}, AutumnError>>;
|
|
414
416
|
static check: (params: CheckParams) => Promise<Result<CheckResult, AutumnError>>;
|
|
415
417
|
check(params: CheckParams): Promise<Result<CheckResult, AutumnError>>;
|
|
416
418
|
static track: (params: TrackParams) => Promise<Result<{
|
|
417
|
-
customer_id: string;
|
|
418
419
|
code: string;
|
|
419
420
|
id: string;
|
|
421
|
+
customer_id: string;
|
|
420
422
|
feature_id?: string | undefined;
|
|
421
423
|
event_name?: string | undefined;
|
|
422
424
|
}, AutumnError>>;
|
|
423
425
|
track(params: TrackParams): Promise<Result<{
|
|
424
|
-
customer_id: string;
|
|
425
426
|
code: string;
|
|
426
427
|
id: string;
|
|
428
|
+
customer_id: string;
|
|
427
429
|
feature_id?: string | undefined;
|
|
428
430
|
event_name?: string | undefined;
|
|
429
431
|
}, AutumnError>>;
|
|
@@ -464,13 +466,13 @@ declare const TransferProductParamsSchema: z.ZodObject<{
|
|
|
464
466
|
to_entity_id: z.ZodString;
|
|
465
467
|
product_id: z.ZodString;
|
|
466
468
|
}, "strip", z.ZodTypeAny, {
|
|
467
|
-
product_id: string;
|
|
468
469
|
from_entity_id: string;
|
|
469
470
|
to_entity_id: string;
|
|
470
|
-
}, {
|
|
471
471
|
product_id: string;
|
|
472
|
+
}, {
|
|
472
473
|
from_entity_id: string;
|
|
473
474
|
to_entity_id: string;
|
|
475
|
+
product_id: string;
|
|
474
476
|
}>;
|
|
475
477
|
type TransferProductParams = z.infer<typeof TransferProductParamsSchema>;
|
|
476
478
|
type TransferProductResult = {
|
|
@@ -492,11 +494,11 @@ declare const RedeemReferralCodeParamsSchema: z.ZodObject<{
|
|
|
492
494
|
code: z.ZodString;
|
|
493
495
|
customer_id: z.ZodString;
|
|
494
496
|
}, "strip", z.ZodTypeAny, {
|
|
495
|
-
customer_id: string;
|
|
496
497
|
code: string;
|
|
497
|
-
}, {
|
|
498
498
|
customer_id: string;
|
|
499
|
+
}, {
|
|
499
500
|
code: string;
|
|
501
|
+
customer_id: string;
|
|
500
502
|
}>;
|
|
501
503
|
type RedeemReferralCodeParams = z.infer<typeof RedeemReferralCodeParamsSchema>;
|
|
502
504
|
|
|
@@ -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 CreateProductParams, L as ListProductsParams,
|
|
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-Cy5gmwaq.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;
|
|
@@ -338,6 +338,7 @@ declare class Autumn {
|
|
|
338
338
|
update: (id: string, params: UpdateCustomerParams) => Promise<Result<Customer, AutumnError>>;
|
|
339
339
|
delete: (id: string) => Promise<Result<Customer, AutumnError>>;
|
|
340
340
|
billingPortal: (id: string, params?: BillingPortalParams) => Promise<Result<BillingPortalResult, AutumnError>>;
|
|
341
|
+
updateBalances: (id: string, params: UpdateBalancesParams) => Promise<Result<UpdateBalancesResult, AutumnError>>;
|
|
341
342
|
};
|
|
342
343
|
static products: {
|
|
343
344
|
get: (id: string) => Promise<Result<Product, AutumnError>>;
|
|
@@ -362,6 +363,7 @@ declare class Autumn {
|
|
|
362
363
|
update: (id: string, params: UpdateCustomerParams) => Promise<Result<Customer, AutumnError>>;
|
|
363
364
|
delete: (id: string) => Promise<Result<Customer, AutumnError>>;
|
|
364
365
|
billingPortal: (id: string, params?: BillingPortalParams) => Promise<Result<BillingPortalResult, AutumnError>>;
|
|
366
|
+
updateBalances: (id: string, params: UpdateBalancesParams) => Promise<Result<UpdateBalancesResult, AutumnError>>;
|
|
365
367
|
};
|
|
366
368
|
products: {
|
|
367
369
|
get: (id: string) => Promise<Result<Product, AutumnError>>;
|
|
@@ -383,18 +385,18 @@ declare class Autumn {
|
|
|
383
385
|
static checkout: (params: CheckoutParams) => Promise<Result<CheckoutResult, AutumnError>>;
|
|
384
386
|
checkout(params: CheckoutParams): Promise<Result<CheckoutResult, AutumnError>>;
|
|
385
387
|
static attach: (params: AttachParams) => Promise<Result<{
|
|
386
|
-
customer_id: string;
|
|
387
388
|
code: string;
|
|
388
389
|
message: string;
|
|
390
|
+
customer_id: string;
|
|
389
391
|
product_ids: string[];
|
|
390
392
|
customer_data?: any;
|
|
391
393
|
checkout_url?: string | undefined;
|
|
392
394
|
}, AutumnError>>;
|
|
393
395
|
static usage: (params: UsageParams) => Promise<Result<UsageResult, AutumnError>>;
|
|
394
396
|
attach(params: AttachParams): Promise<Result<{
|
|
395
|
-
customer_id: string;
|
|
396
397
|
code: string;
|
|
397
398
|
message: string;
|
|
399
|
+
customer_id: string;
|
|
398
400
|
product_ids: string[];
|
|
399
401
|
customer_data?: any;
|
|
400
402
|
checkout_url?: string | undefined;
|
|
@@ -402,28 +404,28 @@ declare class Autumn {
|
|
|
402
404
|
static setupPayment: (params: SetupPaymentParams) => Promise<Result<SetupPaymentResult, AutumnError>>;
|
|
403
405
|
setupPayment(params: SetupPaymentParams): Promise<Result<SetupPaymentResult, AutumnError>>;
|
|
404
406
|
static cancel: (params: CancelParams) => Promise<Result<{
|
|
405
|
-
customer_id: string;
|
|
406
407
|
product_id: string;
|
|
408
|
+
customer_id: string;
|
|
407
409
|
success: boolean;
|
|
408
410
|
}, AutumnError>>;
|
|
409
411
|
cancel(params: CancelParams): Promise<Result<{
|
|
410
|
-
customer_id: string;
|
|
411
412
|
product_id: string;
|
|
413
|
+
customer_id: string;
|
|
412
414
|
success: boolean;
|
|
413
415
|
}, AutumnError>>;
|
|
414
416
|
static check: (params: CheckParams) => Promise<Result<CheckResult, AutumnError>>;
|
|
415
417
|
check(params: CheckParams): Promise<Result<CheckResult, AutumnError>>;
|
|
416
418
|
static track: (params: TrackParams) => Promise<Result<{
|
|
417
|
-
customer_id: string;
|
|
418
419
|
code: string;
|
|
419
420
|
id: string;
|
|
421
|
+
customer_id: string;
|
|
420
422
|
feature_id?: string | undefined;
|
|
421
423
|
event_name?: string | undefined;
|
|
422
424
|
}, AutumnError>>;
|
|
423
425
|
track(params: TrackParams): Promise<Result<{
|
|
424
|
-
customer_id: string;
|
|
425
426
|
code: string;
|
|
426
427
|
id: string;
|
|
428
|
+
customer_id: string;
|
|
427
429
|
feature_id?: string | undefined;
|
|
428
430
|
event_name?: string | undefined;
|
|
429
431
|
}, AutumnError>>;
|
|
@@ -464,13 +466,13 @@ declare const TransferProductParamsSchema: z.ZodObject<{
|
|
|
464
466
|
to_entity_id: z.ZodString;
|
|
465
467
|
product_id: z.ZodString;
|
|
466
468
|
}, "strip", z.ZodTypeAny, {
|
|
467
|
-
product_id: string;
|
|
468
469
|
from_entity_id: string;
|
|
469
470
|
to_entity_id: string;
|
|
470
|
-
}, {
|
|
471
471
|
product_id: string;
|
|
472
|
+
}, {
|
|
472
473
|
from_entity_id: string;
|
|
473
474
|
to_entity_id: string;
|
|
475
|
+
product_id: string;
|
|
474
476
|
}>;
|
|
475
477
|
type TransferProductParams = z.infer<typeof TransferProductParamsSchema>;
|
|
476
478
|
type TransferProductResult = {
|
|
@@ -492,11 +494,11 @@ declare const RedeemReferralCodeParamsSchema: z.ZodObject<{
|
|
|
492
494
|
code: z.ZodString;
|
|
493
495
|
customer_id: z.ZodString;
|
|
494
496
|
}, "strip", z.ZodTypeAny, {
|
|
495
|
-
customer_id: string;
|
|
496
497
|
code: string;
|
|
497
|
-
}, {
|
|
498
498
|
customer_id: string;
|
|
499
|
+
}, {
|
|
499
500
|
code: string;
|
|
501
|
+
customer_id: string;
|
|
500
502
|
}>;
|
|
501
503
|
type RedeemReferralCodeParams = z.infer<typeof RedeemReferralCodeParamsSchema>;
|
|
502
504
|
|
|
@@ -77,12 +77,12 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
77
77
|
credit_amount: number;
|
|
78
78
|
}>, "many">>;
|
|
79
79
|
}, "strip", z.ZodTypeAny, {
|
|
80
|
-
allowed: boolean;
|
|
81
80
|
feature_id: string;
|
|
82
81
|
customer_id: string;
|
|
82
|
+
allowed: boolean;
|
|
83
83
|
required_balance: number;
|
|
84
|
-
usage_limit?: number | undefined;
|
|
85
84
|
entity_id?: string | undefined;
|
|
85
|
+
usage_limit?: number | undefined;
|
|
86
86
|
unlimited?: boolean | undefined;
|
|
87
87
|
interval?: ProductItemInterval | undefined;
|
|
88
88
|
balance?: number | null | undefined;
|
|
@@ -106,12 +106,12 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
106
106
|
credit_amount: number;
|
|
107
107
|
}[] | undefined;
|
|
108
108
|
}, {
|
|
109
|
-
allowed: boolean;
|
|
110
109
|
feature_id: string;
|
|
111
110
|
customer_id: string;
|
|
111
|
+
allowed: boolean;
|
|
112
112
|
required_balance: number;
|
|
113
|
-
usage_limit?: number | undefined;
|
|
114
113
|
entity_id?: string | undefined;
|
|
114
|
+
usage_limit?: number | undefined;
|
|
115
115
|
unlimited?: boolean | undefined;
|
|
116
116
|
interval?: ProductItemInterval | undefined;
|
|
117
117
|
balance?: number | null | undefined;
|
|
@@ -420,17 +420,17 @@ declare const CreateCustomerParamsSchema: z.ZodObject<{
|
|
|
420
420
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
421
421
|
expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
|
|
422
422
|
}, "strip", z.ZodTypeAny, {
|
|
423
|
-
id?: string | null | undefined;
|
|
424
423
|
name?: string | null | undefined;
|
|
425
424
|
email?: string | null | undefined;
|
|
426
425
|
fingerprint?: string | null | undefined;
|
|
426
|
+
id?: string | null | undefined;
|
|
427
427
|
metadata?: Record<string, any> | undefined;
|
|
428
428
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
429
429
|
}, {
|
|
430
|
-
id?: string | null | undefined;
|
|
431
430
|
name?: string | null | undefined;
|
|
432
431
|
email?: string | null | undefined;
|
|
433
432
|
fingerprint?: string | null | undefined;
|
|
433
|
+
id?: string | null | undefined;
|
|
434
434
|
metadata?: Record<string, any> | undefined;
|
|
435
435
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
436
436
|
}>;
|
|
@@ -462,5 +462,28 @@ interface CustomerInvoice {
|
|
|
462
462
|
created_at: number;
|
|
463
463
|
hosted_invoice_url: string;
|
|
464
464
|
}
|
|
465
|
+
declare const UpdateBalancesParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
466
|
+
feature_id: z.ZodString;
|
|
467
|
+
value: z.ZodNumber;
|
|
468
|
+
}, "strip", z.ZodTypeAny, {
|
|
469
|
+
value: number;
|
|
470
|
+
feature_id: string;
|
|
471
|
+
}, {
|
|
472
|
+
value: number;
|
|
473
|
+
feature_id: string;
|
|
474
|
+
}>, z.ZodArray<z.ZodObject<{
|
|
475
|
+
feature_id: z.ZodString;
|
|
476
|
+
value: z.ZodNumber;
|
|
477
|
+
}, "strip", z.ZodTypeAny, {
|
|
478
|
+
value: number;
|
|
479
|
+
feature_id: string;
|
|
480
|
+
}, {
|
|
481
|
+
value: number;
|
|
482
|
+
feature_id: string;
|
|
483
|
+
}>, "many">]>;
|
|
484
|
+
type UpdateBalancesParams = z.infer<typeof UpdateBalancesParamsSchema>;
|
|
485
|
+
type UpdateBalancesResult = {
|
|
486
|
+
success: boolean;
|
|
487
|
+
};
|
|
465
488
|
|
|
466
|
-
export type { BillingPortalParams as B, CustomerData as C, GetCustomerParams as G, ListProductsParams as L, ProductItem as P, UpdateCustomerParams as U, CheckFeatureResult as a, CheckProductResult as b, Product as c, Customer as d, CreateCustomerParams as e, BillingPortalResult as f,
|
|
489
|
+
export type { BillingPortalParams as B, CustomerData as C, GetCustomerParams as G, ListProductsParams as L, ProductItem as P, UpdateCustomerParams as U, CheckFeatureResult as a, CheckProductResult as b, Product as c, Customer as d, CreateCustomerParams as e, BillingPortalResult as f, UpdateBalancesParams as g, UpdateBalancesResult as h, CreateProductParams as i, CustomerProduct as j, CustomerFeature as k, CustomerInvoice as l };
|
|
@@ -77,12 +77,12 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
77
77
|
credit_amount: number;
|
|
78
78
|
}>, "many">>;
|
|
79
79
|
}, "strip", z.ZodTypeAny, {
|
|
80
|
-
allowed: boolean;
|
|
81
80
|
feature_id: string;
|
|
82
81
|
customer_id: string;
|
|
82
|
+
allowed: boolean;
|
|
83
83
|
required_balance: number;
|
|
84
|
-
usage_limit?: number | undefined;
|
|
85
84
|
entity_id?: string | undefined;
|
|
85
|
+
usage_limit?: number | undefined;
|
|
86
86
|
unlimited?: boolean | undefined;
|
|
87
87
|
interval?: ProductItemInterval | undefined;
|
|
88
88
|
balance?: number | null | undefined;
|
|
@@ -106,12 +106,12 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
106
106
|
credit_amount: number;
|
|
107
107
|
}[] | undefined;
|
|
108
108
|
}, {
|
|
109
|
-
allowed: boolean;
|
|
110
109
|
feature_id: string;
|
|
111
110
|
customer_id: string;
|
|
111
|
+
allowed: boolean;
|
|
112
112
|
required_balance: number;
|
|
113
|
-
usage_limit?: number | undefined;
|
|
114
113
|
entity_id?: string | undefined;
|
|
114
|
+
usage_limit?: number | undefined;
|
|
115
115
|
unlimited?: boolean | undefined;
|
|
116
116
|
interval?: ProductItemInterval | undefined;
|
|
117
117
|
balance?: number | null | undefined;
|
|
@@ -420,17 +420,17 @@ declare const CreateCustomerParamsSchema: z.ZodObject<{
|
|
|
420
420
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
421
421
|
expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
|
|
422
422
|
}, "strip", z.ZodTypeAny, {
|
|
423
|
-
id?: string | null | undefined;
|
|
424
423
|
name?: string | null | undefined;
|
|
425
424
|
email?: string | null | undefined;
|
|
426
425
|
fingerprint?: string | null | undefined;
|
|
426
|
+
id?: string | null | undefined;
|
|
427
427
|
metadata?: Record<string, any> | undefined;
|
|
428
428
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
429
429
|
}, {
|
|
430
|
-
id?: string | null | undefined;
|
|
431
430
|
name?: string | null | undefined;
|
|
432
431
|
email?: string | null | undefined;
|
|
433
432
|
fingerprint?: string | null | undefined;
|
|
433
|
+
id?: string | null | undefined;
|
|
434
434
|
metadata?: Record<string, any> | undefined;
|
|
435
435
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
436
436
|
}>;
|
|
@@ -462,5 +462,28 @@ interface CustomerInvoice {
|
|
|
462
462
|
created_at: number;
|
|
463
463
|
hosted_invoice_url: string;
|
|
464
464
|
}
|
|
465
|
+
declare const UpdateBalancesParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
466
|
+
feature_id: z.ZodString;
|
|
467
|
+
value: z.ZodNumber;
|
|
468
|
+
}, "strip", z.ZodTypeAny, {
|
|
469
|
+
value: number;
|
|
470
|
+
feature_id: string;
|
|
471
|
+
}, {
|
|
472
|
+
value: number;
|
|
473
|
+
feature_id: string;
|
|
474
|
+
}>, z.ZodArray<z.ZodObject<{
|
|
475
|
+
feature_id: z.ZodString;
|
|
476
|
+
value: z.ZodNumber;
|
|
477
|
+
}, "strip", z.ZodTypeAny, {
|
|
478
|
+
value: number;
|
|
479
|
+
feature_id: string;
|
|
480
|
+
}, {
|
|
481
|
+
value: number;
|
|
482
|
+
feature_id: string;
|
|
483
|
+
}>, "many">]>;
|
|
484
|
+
type UpdateBalancesParams = z.infer<typeof UpdateBalancesParamsSchema>;
|
|
485
|
+
type UpdateBalancesResult = {
|
|
486
|
+
success: boolean;
|
|
487
|
+
};
|
|
465
488
|
|
|
466
|
-
export type { BillingPortalParams as B, CustomerData as C, GetCustomerParams as G, ListProductsParams as L, ProductItem as P, UpdateCustomerParams as U, CheckFeatureResult as a, CheckProductResult as b, Product as c, Customer as d, CreateCustomerParams as e, BillingPortalResult as f,
|
|
489
|
+
export type { BillingPortalParams as B, CustomerData as C, GetCustomerParams as G, ListProductsParams as L, ProductItem as P, UpdateCustomerParams as U, CheckFeatureResult as a, CheckProductResult as b, Product as c, Customer as d, CreateCustomerParams as e, BillingPortalResult as f, UpdateBalancesParams as g, UpdateBalancesResult as h, CreateProductParams as i, CustomerProduct as j, CustomerFeature as k, CustomerInvoice as l };
|
package/dist/sdk/index.d.mts
CHANGED
|
@@ -492,6 +492,29 @@ interface CustomerInvoice {
|
|
|
492
492
|
created_at: number;
|
|
493
493
|
hosted_invoice_url: string;
|
|
494
494
|
}
|
|
495
|
+
declare const UpdateBalancesParamsSchema: z.ZodUnion<[z.ZodObject<{
|
|
496
|
+
feature_id: z.ZodString;
|
|
497
|
+
value: z.ZodNumber;
|
|
498
|
+
}, "strip", z.ZodTypeAny, {
|
|
499
|
+
feature_id: string;
|
|
500
|
+
value: number;
|
|
501
|
+
}, {
|
|
502
|
+
feature_id: string;
|
|
503
|
+
value: number;
|
|
504
|
+
}>, z.ZodArray<z.ZodObject<{
|
|
505
|
+
feature_id: z.ZodString;
|
|
506
|
+
value: z.ZodNumber;
|
|
507
|
+
}, "strip", z.ZodTypeAny, {
|
|
508
|
+
feature_id: string;
|
|
509
|
+
value: number;
|
|
510
|
+
}, {
|
|
511
|
+
feature_id: string;
|
|
512
|
+
value: number;
|
|
513
|
+
}>, "many">]>;
|
|
514
|
+
type UpdateBalancesParams = z.infer<typeof UpdateBalancesParamsSchema>;
|
|
515
|
+
type UpdateBalancesResult = {
|
|
516
|
+
success: boolean;
|
|
517
|
+
};
|
|
495
518
|
|
|
496
519
|
declare const CancelParamsSchema: z.ZodObject<{
|
|
497
520
|
customer_id: z.ZodString;
|
|
@@ -905,6 +928,7 @@ declare class Autumn {
|
|
|
905
928
|
update: (id: string, params: UpdateCustomerParams) => Promise<Result<Customer, AutumnError>>;
|
|
906
929
|
delete: (id: string) => Promise<Result<Customer, AutumnError>>;
|
|
907
930
|
billingPortal: (id: string, params?: BillingPortalParams) => Promise<Result<BillingPortalResult, AutumnError>>;
|
|
931
|
+
updateBalances: (id: string, params: UpdateBalancesParams) => Promise<Result<UpdateBalancesResult, AutumnError>>;
|
|
908
932
|
};
|
|
909
933
|
static products: {
|
|
910
934
|
get: (id: string) => Promise<Result<Product, AutumnError>>;
|
|
@@ -929,6 +953,7 @@ declare class Autumn {
|
|
|
929
953
|
update: (id: string, params: UpdateCustomerParams) => Promise<Result<Customer, AutumnError>>;
|
|
930
954
|
delete: (id: string) => Promise<Result<Customer, AutumnError>>;
|
|
931
955
|
billingPortal: (id: string, params?: BillingPortalParams) => Promise<Result<BillingPortalResult, AutumnError>>;
|
|
956
|
+
updateBalances: (id: string, params: UpdateBalancesParams) => Promise<Result<UpdateBalancesResult, AutumnError>>;
|
|
932
957
|
};
|
|
933
958
|
products: {
|
|
934
959
|
get: (id: string) => Promise<Result<Product, AutumnError>>;
|
|
@@ -1115,4 +1140,4 @@ interface RedeemReferralCodeResult {
|
|
|
1115
1140
|
applied: boolean;
|
|
1116
1141
|
}
|
|
1117
1142
|
|
|
1118
|
-
export { AppEnv, type AttachFeatureOptions, AttachFeatureOptionsSchema, type AttachParams, AttachParamsSchema, type AttachResult, AttachResultSchema, Autumn, AutumnError, type AutumnPromise, type BillingPortalParams, BillingPortalParamsSchema, type BillingPortalResult, type CancelParams, CancelParamsSchema, type CancelResult, CancelResultSchema, type CheckFeaturePreview, type CheckFeatureResult, CheckFeatureResultSchema, type CheckFeatureScenario, type CheckParams, CheckParamsSchema, type CheckProductPreview, type CheckProductResult, type CheckResult, type CheckoutParams, CheckoutParamsSchema, type CheckoutResult, CoreCusFeatureSchema, type CoreCustomerFeature, type CreateCustomerParams, CreateCustomerParamsSchema, type CreateEntityParams, type CreateEntityResult, type CreateProductParams, type CreateReferralCodeParams, CreateReferralCodeParamsSchema, type CreateReferralCodeResult, type Customer, type CustomerData, CustomerDataSchema, CustomerExpandEnum, type CustomerExpandOption, type CustomerFeature, type CustomerInvoice, type CustomerProduct, type DeleteEntityResult, type Entity, type EntityData, EntityDataSchema, type EntityExpandOption, type ErrorResponse, type Feature, type FreeTrial, FreeTrialDuration, type GetCustomerParams, type GetEntityParams, type GetPricingTableParams, Infinite, type ListProductsParams, type PriceTier, type PricingTableProduct, type Product, type ProductItem, ProductItemInterval, type ProductItemIntervalType, type ProductScenario, ProductStatus, type QueryParams, QueryParamsSchema, QueryRangeEnum, type QueryResult, type RedeemReferralCodeParams, RedeemReferralCodeParamsSchema, type RedeemReferralCodeResult, type SetupPaymentParams, type SetupPaymentResult, type TrackParams, TrackParamsSchema, type TrackResult, TrackResultSchema, type TransferProductParams, TransferProductParamsSchema, type TransferProductResult, type UpdateCustomerParams, UsageModel, type UsageModelType, type UsageParams, type UsageResult, fetchPricingTable, toContainerResult };
|
|
1143
|
+
export { AppEnv, type AttachFeatureOptions, AttachFeatureOptionsSchema, type AttachParams, AttachParamsSchema, type AttachResult, AttachResultSchema, Autumn, AutumnError, type AutumnPromise, type BillingPortalParams, BillingPortalParamsSchema, type BillingPortalResult, type CancelParams, CancelParamsSchema, type CancelResult, CancelResultSchema, type CheckFeaturePreview, type CheckFeatureResult, CheckFeatureResultSchema, type CheckFeatureScenario, type CheckParams, CheckParamsSchema, type CheckProductPreview, type CheckProductResult, type CheckResult, type CheckoutParams, CheckoutParamsSchema, type CheckoutResult, CoreCusFeatureSchema, type CoreCustomerFeature, type CreateCustomerParams, CreateCustomerParamsSchema, type CreateEntityParams, type CreateEntityResult, type CreateProductParams, type CreateReferralCodeParams, CreateReferralCodeParamsSchema, type CreateReferralCodeResult, type Customer, type CustomerData, CustomerDataSchema, CustomerExpandEnum, type CustomerExpandOption, type CustomerFeature, type CustomerInvoice, type CustomerProduct, type DeleteEntityResult, type Entity, type EntityData, EntityDataSchema, type EntityExpandOption, type ErrorResponse, type Feature, type FreeTrial, FreeTrialDuration, type GetCustomerParams, type GetEntityParams, type GetPricingTableParams, Infinite, type ListProductsParams, type PriceTier, type PricingTableProduct, type Product, type ProductItem, ProductItemInterval, type ProductItemIntervalType, type ProductScenario, ProductStatus, type QueryParams, QueryParamsSchema, QueryRangeEnum, type QueryResult, type RedeemReferralCodeParams, RedeemReferralCodeParamsSchema, type RedeemReferralCodeResult, type SetupPaymentParams, type SetupPaymentResult, type TrackParams, TrackParamsSchema, type TrackResult, TrackResultSchema, type TransferProductParams, TransferProductParamsSchema, type TransferProductResult, type UpdateBalancesParams, UpdateBalancesParamsSchema, type UpdateBalancesResult, type UpdateCustomerParams, UsageModel, type UsageModelType, type UsageParams, type UsageResult, fetchPricingTable, toContainerResult };
|