autumn-js 0.0.115 → 0.1.0
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/README.md +1 -139
- package/dist/libraries/backend/better-auth.js +17 -0
- package/dist/libraries/backend/better-auth.mjs +7 -7
- package/dist/libraries/backend/{chunk-VJTYMTEE.mjs → chunk-BDMGQV75.mjs} +1 -1
- package/dist/libraries/backend/{chunk-CZIMXJXT.mjs → chunk-BX2LACTF.mjs} +1 -1
- package/dist/libraries/backend/{chunk-5OVGQBAX.mjs → chunk-EIP7LDKF.mjs} +1 -1
- package/dist/libraries/backend/{chunk-FV6S6G2B.mjs → chunk-N4PGGU3D.mjs} +1 -1
- package/dist/libraries/backend/{chunk-SLHP34YX.mjs → chunk-O6KXYXQN.mjs} +1 -1
- package/dist/libraries/backend/{chunk-BBXZMPWZ.mjs → chunk-QGX7ZACH.mjs} +17 -0
- package/dist/libraries/backend/{chunk-RZCIKER6.mjs → chunk-WTKY2U3S.mjs} +10 -10
- package/dist/libraries/backend/convex.d.mts +1 -0
- package/dist/libraries/backend/convex.d.ts +1 -0
- package/dist/libraries/backend/convex.js +24 -5
- package/dist/libraries/backend/convex.mjs +14 -12
- package/dist/libraries/backend/elysia.d.mts +3 -3
- package/dist/libraries/backend/elysia.d.ts +3 -3
- package/dist/libraries/backend/elysia.js +67 -9
- package/dist/libraries/backend/elysia.mjs +58 -15
- package/dist/libraries/backend/express.d.mts +1 -1
- package/dist/libraries/backend/express.d.ts +1 -1
- package/dist/libraries/backend/express.js +17 -0
- package/dist/libraries/backend/express.mjs +7 -7
- package/dist/libraries/backend/fastify.js +17 -0
- package/dist/libraries/backend/fastify.mjs +7 -7
- package/dist/libraries/backend/hono.js +17 -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 +17 -0
- package/dist/libraries/backend/index.mjs +7 -7
- package/dist/libraries/backend/next.js +17 -0
- package/dist/libraries/backend/next.mjs +7 -7
- package/dist/libraries/backend/react-router.js +17 -0
- package/dist/libraries/backend/react-router.mjs +7 -7
- package/dist/libraries/backend/{referralTypes-Tn4tzWbT.d.ts → referralTypes-DHs1hY4_.d.ts} +55 -0
- package/dist/libraries/backend/{referralTypes-CxBMvbW7.d.mts → referralTypes-DRsv8not.d.mts} +55 -0
- package/dist/libraries/backend/remix_dep.js +17 -0
- package/dist/libraries/backend/remix_dep.mjs +7 -7
- package/dist/libraries/backend/routes/backendRouter.js +17 -0
- package/dist/libraries/backend/routes/backendRouter.mjs +7 -7
- package/dist/libraries/backend/routes/entityRoutes.js +17 -0
- package/dist/libraries/backend/routes/entityRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/genRoutes.js +17 -0
- package/dist/libraries/backend/routes/genRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/productRoutes.js +17 -0
- package/dist/libraries/backend/routes/productRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/referralRoutes.js +17 -0
- package/dist/libraries/backend/routes/referralRoutes.mjs +3 -3
- package/dist/libraries/backend/supabase.js +17 -0
- package/dist/libraries/backend/supabase.mjs +7 -7
- package/dist/libraries/backend/tanstack.js +17 -0
- package/dist/libraries/backend/tanstack.mjs +7 -7
- package/dist/libraries/backend/utils/backendRes.js +17 -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 +17 -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 +17 -0
- 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 +19 -1
- package/dist/libraries/react/BaseAutumnProvider.mjs +10 -10
- package/dist/libraries/react/{ReactAutumnClient-Deg9KIoK.d.mts → ReactAutumnClient-BK3wjb-u.d.mts} +17 -17
- package/dist/libraries/react/{ReactAutumnClient-DWq3CtTo.d.ts → ReactAutumnClient-Bh0Sgw6f.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 +19 -1
- package/dist/libraries/react/ReactAutumnProvider.mjs +11 -11
- package/dist/{next/client/attachTypes-D1J8GKaX.d.ts → libraries/react/attachTypes-Cy6WgUas.d.ts} +3 -3
- package/dist/libraries/react/{attachTypes-BfITg8QI.d.mts → attachTypes-DKmoXHQO.d.mts} +5 -5
- package/dist/libraries/react/{chunk-2ZJIVJC3.mjs → chunk-4NCB2TMQ.mjs} +3 -3
- package/dist/libraries/react/{chunk-TTQ2JFWO.mjs → chunk-53HYUF2F.mjs} +5 -4
- package/dist/libraries/react/{chunk-WLMUN7LO.mjs → chunk-7RICWVXV.mjs} +2 -2
- package/dist/libraries/react/{chunk-JKCNFNPN.mjs → chunk-BGLWB5O2.mjs} +28 -30
- package/dist/libraries/react/{chunk-HRD7CMV2.mjs → chunk-CZBWEEWD.mjs} +17 -0
- package/dist/libraries/react/{chunk-UO4CQY4C.mjs → chunk-H4J73SMR.mjs} +1 -1
- package/dist/libraries/react/{chunk-SQETBIDZ.mjs → chunk-IFZCH7DR.mjs} +2 -2
- package/dist/libraries/react/{chunk-ID6R6YXN.mjs → chunk-JLJPPCQJ.mjs} +2 -2
- package/dist/libraries/react/{chunk-GB3FANSE.mjs → chunk-LFLX6NJU.mjs} +1 -1
- package/dist/libraries/react/{chunk-WEOR6KVG.mjs → chunk-LMQMA7VL.mjs} +7 -7
- package/dist/libraries/react/{chunk-MRJXFGYA.mjs → chunk-MRZA4JWN.mjs} +1 -1
- package/dist/libraries/react/{chunk-GUN6SIBL.mjs → chunk-PFN52PHR.mjs} +2 -2
- package/dist/libraries/react/{chunk-YOP5NTBJ.mjs → chunk-TM3NBNVM.mjs} +1 -1
- package/dist/libraries/react/{chunk-IJNOJKLD.mjs → chunk-UAK4XMNC.mjs} +1 -1
- package/dist/libraries/react/{chunk-6ZNJROK5.mjs → chunk-UCUAGLCJ.mjs} +1 -1
- package/dist/libraries/react/{chunk-3TWEC5VD.mjs → chunk-WZG3QTZI.mjs} +3 -3
- 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 +17 -0
- 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 +17 -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 +19 -1
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.mjs +27 -27
- 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 +17 -0
- package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.mjs +27 -27
- 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 +4 -4
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.ts +4 -4
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.js +20 -4
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +27 -27
- package/dist/libraries/react/components/ui/dialog.mjs +2 -2
- package/dist/libraries/react/components/ui/popover.mjs +2 -2
- package/dist/libraries/react/{cusTypes-CMj2sP-4.d.ts → cusTypes-Dlt0fQmq.d.mts} +23 -5
- package/dist/libraries/react/{cusTypes-Dj2tcwg7.d.mts → cusTypes-eNmWJ2rC.d.ts} +23 -5
- package/dist/libraries/react/{entTypes-Cltx_-C_.d.mts → entTypes-BDZUfZE_.d.mts} +1 -1
- package/dist/libraries/react/{entTypes-fYtiTl7W.d.ts → entTypes-B_DvaeRL.d.ts} +1 -1
- package/dist/libraries/react/{genTypes-CH9EbOfb.d.mts → genTypes-BIPS92_Q.d.mts} +5 -5
- package/dist/libraries/react/{genTypes-A2nf2M_h.d.ts → genTypes-Rn-oq2sc.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 +17 -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 +17 -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 +17 -0
- 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 +19 -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 +19 -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 +17 -0
- 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 +17 -0
- 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 +17 -0
- 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 +17 -0
- 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 +17 -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 +37 -1
- package/dist/libraries/react/index.d.ts +37 -1
- package/dist/libraries/react/index.js +20 -4
- package/dist/libraries/react/index.mjs +20 -4
- package/dist/libraries/react/{prodTypes-DZUJPsRN.d.mts → prodTypes-DuLXGCiA.d.mts} +23 -5
- package/dist/libraries/react/{prodTypes-DZUJPsRN.d.ts → prodTypes-DuLXGCiA.d.ts} +23 -5
- package/dist/next/client/NextAutumnClient.d.mts +7 -7
- package/dist/next/client/NextAutumnClient.d.ts +7 -7
- package/dist/next/client/NextAutumnProvider.d.mts +2 -2
- package/dist/next/client/NextAutumnProvider.d.ts +2 -2
- package/dist/{libraries/react/attachTypes-ZMWuxpzI.d.ts → next/client/attachTypes-BCt7D8ym.d.ts} +5 -5
- package/dist/next/client/{attachTypes-Ds4c3m_f.d.mts → attachTypes-BThbMcvF.d.mts} +3 -3
- package/dist/next/client/{clientAttachTypes-CTlrbiN0.d.ts → clientAttachTypes-Df5FVGkw.d.ts} +3 -3
- package/dist/next/client/{clientAttachTypes-BkPjc5Md.d.mts → clientAttachTypes-whHUVrE3.d.mts} +3 -3
- package/dist/next/client/clientUtils.d.mts +3 -3
- package/dist/next/client/clientUtils.d.ts +3 -3
- package/dist/next/client/{cusTypes-cin7tsQv.d.mts → cusTypes-BuLw67IH.d.mts} +21 -3
- package/dist/next/client/{cusTypes-7rPpQ98G.d.ts → cusTypes-CqAsUZEp.d.ts} +21 -3
- package/dist/next/client/{entTypes-Nr9DDaGQ.d.ts → entTypes-BLLymqnn.d.ts} +1 -1
- package/dist/next/client/{entTypes-DhVNxsHB.d.mts → entTypes-DTRFxh07.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/{prodTypes-CYd9Q1Rw.d.mts → prodTypes-UFM-PYm-.d.mts} +18 -0
- package/dist/next/client/{prodTypes-CYd9Q1Rw.d.ts → prodTypes-UFM-PYm-.d.ts} +18 -0
- 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 +34 -15
- package/dist/next/server/cusActions.d.ts +34 -15
- package/dist/next/server/{cusTypes-wfx--BDG.d.mts → cusTypes-B0zde-Pl.d.mts} +40 -4
- package/dist/next/server/{cusTypes-wfx--BDG.d.ts → cusTypes-B0zde-Pl.d.ts} +40 -4
- package/dist/next/server/genActions.d.mts +1 -1
- package/dist/next/server/genActions.d.ts +1 -1
- package/dist/sdk/index.d.mts +56 -1
- package/dist/sdk/index.d.ts +56 -1
- package/dist/sdk/index.js +18 -0
- package/dist/sdk/index.mjs +18 -1
- package/dist/utils/encryptUtils.js +17 -0
- package/dist/utils/encryptUtils.mjs +17 -0
- package/package.json +7 -4
- package/dist/libraries/react/{chunk-7JNU5ABT.mjs → chunk-FJWZPMWU.mjs} +3 -3
- package/dist/libraries/react/{chunk-LCWL3TIT.mjs → chunk-OTZ65PCT.mjs} +3 -3
|
@@ -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, h as CustomerProduct, i as CustomerFeature, j 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 CreateProductParams, L as ListProductsParams, h as CustomerProduct, i as CustomerFeature, j as CustomerInvoice } from './cusTypes-B0zde-Pl.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { R as Result, A as AutumnError } from './response-eH4S4sg0.js';
|
|
4
4
|
|
|
@@ -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;
|
|
34
33
|
feature_id?: string | undefined;
|
|
35
34
|
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;
|
|
43
42
|
feature_id?: string | undefined;
|
|
44
43
|
entity_id?: string | undefined;
|
|
44
|
+
value?: number | undefined;
|
|
45
45
|
customer_data?: any;
|
|
46
46
|
entity_data?: any;
|
|
47
47
|
event_name?: string | undefined;
|
|
@@ -121,12 +121,12 @@ declare const QueryParamsSchema: z.ZodObject<{
|
|
|
121
121
|
feature_id: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
122
122
|
range: z.ZodOptional<z.ZodEnum<["24h", "7d", "30d", "90d", "last_cycle"]>>;
|
|
123
123
|
}, "strip", z.ZodTypeAny, {
|
|
124
|
-
customer_id: string;
|
|
125
124
|
feature_id: string | string[];
|
|
125
|
+
customer_id: string;
|
|
126
126
|
range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | undefined;
|
|
127
127
|
}, {
|
|
128
|
-
customer_id: string;
|
|
129
128
|
feature_id: string | string[];
|
|
129
|
+
customer_id: string;
|
|
130
130
|
range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | undefined;
|
|
131
131
|
}>;
|
|
132
132
|
type QueryParams = z.infer<typeof QueryParamsSchema>;
|
|
@@ -186,11 +186,11 @@ 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;
|
|
189
190
|
options?: {
|
|
190
191
|
feature_id: string;
|
|
191
192
|
quantity: number;
|
|
192
193
|
}[] | undefined;
|
|
193
|
-
entity_id?: string | undefined;
|
|
194
194
|
metadata?: Record<string, string> | undefined;
|
|
195
195
|
product_id?: string | undefined;
|
|
196
196
|
product_ids?: string[] | undefined;
|
|
@@ -207,11 +207,11 @@ declare const AttachParamsSchema: z.ZodObject<{
|
|
|
207
207
|
reward?: string | undefined;
|
|
208
208
|
}, {
|
|
209
209
|
customer_id: string;
|
|
210
|
+
entity_id?: string | undefined;
|
|
210
211
|
options?: {
|
|
211
212
|
feature_id: string;
|
|
212
213
|
quantity: number;
|
|
213
214
|
}[] | undefined;
|
|
214
|
-
entity_id?: string | undefined;
|
|
215
215
|
metadata?: Record<string, string> | undefined;
|
|
216
216
|
product_id?: string | undefined;
|
|
217
217
|
product_ids?: string[] | undefined;
|
|
@@ -262,11 +262,11 @@ declare const CheckoutParamsSchema: z.ZodObject<{
|
|
|
262
262
|
}, "strip", z.ZodTypeAny, {
|
|
263
263
|
customer_id: string;
|
|
264
264
|
product_id: string;
|
|
265
|
+
entity_id?: string | undefined;
|
|
265
266
|
options?: {
|
|
266
267
|
feature_id: string;
|
|
267
268
|
quantity: number;
|
|
268
269
|
}[] | undefined;
|
|
269
|
-
entity_id?: string | undefined;
|
|
270
270
|
success_url?: string | undefined;
|
|
271
271
|
customer_data?: {
|
|
272
272
|
name?: string | null | undefined;
|
|
@@ -279,11 +279,11 @@ declare const CheckoutParamsSchema: z.ZodObject<{
|
|
|
279
279
|
}, {
|
|
280
280
|
customer_id: string;
|
|
281
281
|
product_id: string;
|
|
282
|
+
entity_id?: string | undefined;
|
|
282
283
|
options?: {
|
|
283
284
|
feature_id: string;
|
|
284
285
|
quantity: number;
|
|
285
286
|
}[] | undefined;
|
|
286
|
-
entity_id?: string | undefined;
|
|
287
287
|
success_url?: string | undefined;
|
|
288
288
|
customer_data?: {
|
|
289
289
|
name?: string | null | undefined;
|
|
@@ -349,6 +349,7 @@ declare class Autumn {
|
|
|
349
349
|
static entities: {
|
|
350
350
|
get: (customer_id: string, entity_id: string, params?: GetEntityParams$1) => Promise<Result<Entity, AutumnError>>;
|
|
351
351
|
create: (customer_id: string, params?: CreateEntityParams$1 | CreateEntityParams$1[]) => Promise<Result<CreateEntityResult, AutumnError>>;
|
|
352
|
+
transfer: (customer_id: string, params: TransferProductParams) => Promise<Result<TransferProductResult, AutumnError>>;
|
|
352
353
|
delete: (customer_id: string, entity_id: string) => Promise<Result<DeleteEntityResult, AutumnError>>;
|
|
353
354
|
};
|
|
354
355
|
static referrals: {
|
|
@@ -372,6 +373,7 @@ declare class Autumn {
|
|
|
372
373
|
entities: {
|
|
373
374
|
get: (customer_id: string, entity_id: string, params?: GetEntityParams$1) => Promise<Result<Entity, AutumnError>>;
|
|
374
375
|
create: (customer_id: string, params?: CreateEntityParams$1 | CreateEntityParams$1[]) => Promise<Result<CreateEntityResult, AutumnError>>;
|
|
376
|
+
transfer: (customer_id: string, params: TransferProductParams) => Promise<Result<TransferProductResult, AutumnError>>;
|
|
375
377
|
delete: (customer_id: string, entity_id: string) => Promise<Result<DeleteEntityResult, AutumnError>>;
|
|
376
378
|
};
|
|
377
379
|
referrals: {
|
|
@@ -381,18 +383,18 @@ declare class Autumn {
|
|
|
381
383
|
static checkout: (params: CheckoutParams) => Promise<Result<CheckoutResult, AutumnError>>;
|
|
382
384
|
checkout(params: CheckoutParams): Promise<Result<CheckoutResult, AutumnError>>;
|
|
383
385
|
static attach: (params: AttachParams) => Promise<Result<{
|
|
386
|
+
customer_id: string;
|
|
384
387
|
code: string;
|
|
385
388
|
message: string;
|
|
386
|
-
customer_id: string;
|
|
387
389
|
product_ids: string[];
|
|
388
390
|
customer_data?: any;
|
|
389
391
|
checkout_url?: string | undefined;
|
|
390
392
|
}, AutumnError>>;
|
|
391
393
|
static usage: (params: UsageParams) => Promise<Result<UsageResult, AutumnError>>;
|
|
392
394
|
attach(params: AttachParams): Promise<Result<{
|
|
395
|
+
customer_id: string;
|
|
393
396
|
code: string;
|
|
394
397
|
message: string;
|
|
395
|
-
customer_id: string;
|
|
396
398
|
product_ids: string[];
|
|
397
399
|
customer_data?: any;
|
|
398
400
|
checkout_url?: string | undefined;
|
|
@@ -412,15 +414,15 @@ declare class Autumn {
|
|
|
412
414
|
static check: (params: CheckParams) => Promise<Result<CheckResult, AutumnError>>;
|
|
413
415
|
check(params: CheckParams): Promise<Result<CheckResult, AutumnError>>;
|
|
414
416
|
static track: (params: TrackParams) => Promise<Result<{
|
|
415
|
-
code: string;
|
|
416
417
|
customer_id: string;
|
|
418
|
+
code: string;
|
|
417
419
|
id: string;
|
|
418
420
|
feature_id?: string | undefined;
|
|
419
421
|
event_name?: string | undefined;
|
|
420
422
|
}, AutumnError>>;
|
|
421
423
|
track(params: TrackParams): Promise<Result<{
|
|
422
|
-
code: string;
|
|
423
424
|
customer_id: string;
|
|
425
|
+
code: string;
|
|
424
426
|
id: string;
|
|
425
427
|
feature_id?: string | undefined;
|
|
426
428
|
event_name?: string | undefined;
|
|
@@ -457,6 +459,23 @@ interface Entity {
|
|
|
457
459
|
features: Record<string, CustomerFeature>;
|
|
458
460
|
invoices?: CustomerInvoice[];
|
|
459
461
|
}
|
|
462
|
+
declare const TransferProductParamsSchema: z.ZodObject<{
|
|
463
|
+
from_entity_id: z.ZodString;
|
|
464
|
+
to_entity_id: z.ZodString;
|
|
465
|
+
product_id: z.ZodString;
|
|
466
|
+
}, "strip", z.ZodTypeAny, {
|
|
467
|
+
product_id: string;
|
|
468
|
+
from_entity_id: string;
|
|
469
|
+
to_entity_id: string;
|
|
470
|
+
}, {
|
|
471
|
+
product_id: string;
|
|
472
|
+
from_entity_id: string;
|
|
473
|
+
to_entity_id: string;
|
|
474
|
+
}>;
|
|
475
|
+
type TransferProductParams = z.infer<typeof TransferProductParamsSchema>;
|
|
476
|
+
type TransferProductResult = {
|
|
477
|
+
success: boolean;
|
|
478
|
+
};
|
|
460
479
|
|
|
461
480
|
declare const CreateReferralCodeParamsSchema: z.ZodObject<{
|
|
462
481
|
customer_id: z.ZodString;
|
|
@@ -473,11 +492,11 @@ declare const RedeemReferralCodeParamsSchema: z.ZodObject<{
|
|
|
473
492
|
code: z.ZodString;
|
|
474
493
|
customer_id: z.ZodString;
|
|
475
494
|
}, "strip", z.ZodTypeAny, {
|
|
476
|
-
code: string;
|
|
477
495
|
customer_id: string;
|
|
478
|
-
}, {
|
|
479
496
|
code: string;
|
|
497
|
+
}, {
|
|
480
498
|
customer_id: string;
|
|
499
|
+
code: string;
|
|
481
500
|
}>;
|
|
482
501
|
type RedeemReferralCodeParams = z.infer<typeof RedeemReferralCodeParamsSchema>;
|
|
483
502
|
|
|
@@ -37,6 +37,16 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
37
37
|
next_reset_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
38
38
|
overage_allowed: z.ZodOptional<z.ZodBoolean>;
|
|
39
39
|
usage_limit: z.ZodOptional<z.ZodNumber>;
|
|
40
|
+
rollovers: z.ZodOptional<z.ZodObject<{
|
|
41
|
+
balance: z.ZodNumber;
|
|
42
|
+
expires_at: z.ZodNumber;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
balance: number;
|
|
45
|
+
expires_at: number;
|
|
46
|
+
}, {
|
|
47
|
+
balance: number;
|
|
48
|
+
expires_at: number;
|
|
49
|
+
}>>;
|
|
40
50
|
breakdown: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
41
51
|
interval: z.ZodNativeEnum<typeof ProductItemInterval>;
|
|
42
52
|
balance: z.ZodOptional<z.ZodNumber>;
|
|
@@ -67,9 +77,9 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
67
77
|
credit_amount: number;
|
|
68
78
|
}>, "many">>;
|
|
69
79
|
}, "strip", z.ZodTypeAny, {
|
|
70
|
-
customer_id: string;
|
|
71
80
|
allowed: boolean;
|
|
72
81
|
feature_id: string;
|
|
82
|
+
customer_id: string;
|
|
73
83
|
required_balance: number;
|
|
74
84
|
usage_limit?: number | undefined;
|
|
75
85
|
entity_id?: string | undefined;
|
|
@@ -80,6 +90,10 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
80
90
|
included_usage?: number | undefined;
|
|
81
91
|
next_reset_at?: number | null | undefined;
|
|
82
92
|
overage_allowed?: boolean | undefined;
|
|
93
|
+
rollovers?: {
|
|
94
|
+
balance: number;
|
|
95
|
+
expires_at: number;
|
|
96
|
+
} | undefined;
|
|
83
97
|
breakdown?: {
|
|
84
98
|
interval: ProductItemInterval;
|
|
85
99
|
balance?: number | undefined;
|
|
@@ -92,9 +106,9 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
92
106
|
credit_amount: number;
|
|
93
107
|
}[] | undefined;
|
|
94
108
|
}, {
|
|
95
|
-
customer_id: string;
|
|
96
109
|
allowed: boolean;
|
|
97
110
|
feature_id: string;
|
|
111
|
+
customer_id: string;
|
|
98
112
|
required_balance: number;
|
|
99
113
|
usage_limit?: number | undefined;
|
|
100
114
|
entity_id?: string | undefined;
|
|
@@ -105,6 +119,10 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
105
119
|
included_usage?: number | undefined;
|
|
106
120
|
next_reset_at?: number | null | undefined;
|
|
107
121
|
overage_allowed?: boolean | undefined;
|
|
122
|
+
rollovers?: {
|
|
123
|
+
balance: number;
|
|
124
|
+
expires_at: number;
|
|
125
|
+
} | undefined;
|
|
108
126
|
breakdown?: {
|
|
109
127
|
interval: ProductItemInterval;
|
|
110
128
|
balance?: number | undefined;
|
|
@@ -253,6 +271,16 @@ declare const CoreCusFeatureSchema: z.ZodObject<{
|
|
|
253
271
|
next_reset_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
254
272
|
overage_allowed: z.ZodOptional<z.ZodBoolean>;
|
|
255
273
|
usage_limit: z.ZodOptional<z.ZodNumber>;
|
|
274
|
+
rollovers: z.ZodOptional<z.ZodObject<{
|
|
275
|
+
balance: z.ZodNumber;
|
|
276
|
+
expires_at: z.ZodNumber;
|
|
277
|
+
}, "strip", z.ZodTypeAny, {
|
|
278
|
+
balance: number;
|
|
279
|
+
expires_at: number;
|
|
280
|
+
}, {
|
|
281
|
+
balance: number;
|
|
282
|
+
expires_at: number;
|
|
283
|
+
}>>;
|
|
256
284
|
breakdown: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
257
285
|
interval: z.ZodNativeEnum<typeof ProductItemInterval>;
|
|
258
286
|
balance: z.ZodOptional<z.ZodNumber>;
|
|
@@ -291,6 +319,10 @@ declare const CoreCusFeatureSchema: z.ZodObject<{
|
|
|
291
319
|
included_usage?: number | undefined;
|
|
292
320
|
next_reset_at?: number | null | undefined;
|
|
293
321
|
overage_allowed?: boolean | undefined;
|
|
322
|
+
rollovers?: {
|
|
323
|
+
balance: number;
|
|
324
|
+
expires_at: number;
|
|
325
|
+
} | undefined;
|
|
294
326
|
breakdown?: {
|
|
295
327
|
interval: ProductItemInterval;
|
|
296
328
|
balance?: number | undefined;
|
|
@@ -311,6 +343,10 @@ declare const CoreCusFeatureSchema: z.ZodObject<{
|
|
|
311
343
|
included_usage?: number | undefined;
|
|
312
344
|
next_reset_at?: number | null | undefined;
|
|
313
345
|
overage_allowed?: boolean | undefined;
|
|
346
|
+
rollovers?: {
|
|
347
|
+
balance: number;
|
|
348
|
+
expires_at: number;
|
|
349
|
+
} | undefined;
|
|
314
350
|
breakdown?: {
|
|
315
351
|
interval: ProductItemInterval;
|
|
316
352
|
balance?: number | undefined;
|
|
@@ -384,17 +420,17 @@ declare const CreateCustomerParamsSchema: z.ZodObject<{
|
|
|
384
420
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
385
421
|
expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
|
|
386
422
|
}, "strip", z.ZodTypeAny, {
|
|
423
|
+
id?: string | null | undefined;
|
|
387
424
|
name?: string | null | undefined;
|
|
388
425
|
email?: string | null | undefined;
|
|
389
426
|
fingerprint?: string | null | undefined;
|
|
390
|
-
id?: string | null | undefined;
|
|
391
427
|
metadata?: Record<string, any> | undefined;
|
|
392
428
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
393
429
|
}, {
|
|
430
|
+
id?: string | null | undefined;
|
|
394
431
|
name?: string | null | undefined;
|
|
395
432
|
email?: string | null | undefined;
|
|
396
433
|
fingerprint?: string | null | undefined;
|
|
397
|
-
id?: string | null | undefined;
|
|
398
434
|
metadata?: Record<string, any> | undefined;
|
|
399
435
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
400
436
|
}>;
|
|
@@ -37,6 +37,16 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
37
37
|
next_reset_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
38
38
|
overage_allowed: z.ZodOptional<z.ZodBoolean>;
|
|
39
39
|
usage_limit: z.ZodOptional<z.ZodNumber>;
|
|
40
|
+
rollovers: z.ZodOptional<z.ZodObject<{
|
|
41
|
+
balance: z.ZodNumber;
|
|
42
|
+
expires_at: z.ZodNumber;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
balance: number;
|
|
45
|
+
expires_at: number;
|
|
46
|
+
}, {
|
|
47
|
+
balance: number;
|
|
48
|
+
expires_at: number;
|
|
49
|
+
}>>;
|
|
40
50
|
breakdown: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
41
51
|
interval: z.ZodNativeEnum<typeof ProductItemInterval>;
|
|
42
52
|
balance: z.ZodOptional<z.ZodNumber>;
|
|
@@ -67,9 +77,9 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
67
77
|
credit_amount: number;
|
|
68
78
|
}>, "many">>;
|
|
69
79
|
}, "strip", z.ZodTypeAny, {
|
|
70
|
-
customer_id: string;
|
|
71
80
|
allowed: boolean;
|
|
72
81
|
feature_id: string;
|
|
82
|
+
customer_id: string;
|
|
73
83
|
required_balance: number;
|
|
74
84
|
usage_limit?: number | undefined;
|
|
75
85
|
entity_id?: string | undefined;
|
|
@@ -80,6 +90,10 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
80
90
|
included_usage?: number | undefined;
|
|
81
91
|
next_reset_at?: number | null | undefined;
|
|
82
92
|
overage_allowed?: boolean | undefined;
|
|
93
|
+
rollovers?: {
|
|
94
|
+
balance: number;
|
|
95
|
+
expires_at: number;
|
|
96
|
+
} | undefined;
|
|
83
97
|
breakdown?: {
|
|
84
98
|
interval: ProductItemInterval;
|
|
85
99
|
balance?: number | undefined;
|
|
@@ -92,9 +106,9 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
92
106
|
credit_amount: number;
|
|
93
107
|
}[] | undefined;
|
|
94
108
|
}, {
|
|
95
|
-
customer_id: string;
|
|
96
109
|
allowed: boolean;
|
|
97
110
|
feature_id: string;
|
|
111
|
+
customer_id: string;
|
|
98
112
|
required_balance: number;
|
|
99
113
|
usage_limit?: number | undefined;
|
|
100
114
|
entity_id?: string | undefined;
|
|
@@ -105,6 +119,10 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
105
119
|
included_usage?: number | undefined;
|
|
106
120
|
next_reset_at?: number | null | undefined;
|
|
107
121
|
overage_allowed?: boolean | undefined;
|
|
122
|
+
rollovers?: {
|
|
123
|
+
balance: number;
|
|
124
|
+
expires_at: number;
|
|
125
|
+
} | undefined;
|
|
108
126
|
breakdown?: {
|
|
109
127
|
interval: ProductItemInterval;
|
|
110
128
|
balance?: number | undefined;
|
|
@@ -253,6 +271,16 @@ declare const CoreCusFeatureSchema: z.ZodObject<{
|
|
|
253
271
|
next_reset_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
254
272
|
overage_allowed: z.ZodOptional<z.ZodBoolean>;
|
|
255
273
|
usage_limit: z.ZodOptional<z.ZodNumber>;
|
|
274
|
+
rollovers: z.ZodOptional<z.ZodObject<{
|
|
275
|
+
balance: z.ZodNumber;
|
|
276
|
+
expires_at: z.ZodNumber;
|
|
277
|
+
}, "strip", z.ZodTypeAny, {
|
|
278
|
+
balance: number;
|
|
279
|
+
expires_at: number;
|
|
280
|
+
}, {
|
|
281
|
+
balance: number;
|
|
282
|
+
expires_at: number;
|
|
283
|
+
}>>;
|
|
256
284
|
breakdown: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
257
285
|
interval: z.ZodNativeEnum<typeof ProductItemInterval>;
|
|
258
286
|
balance: z.ZodOptional<z.ZodNumber>;
|
|
@@ -291,6 +319,10 @@ declare const CoreCusFeatureSchema: z.ZodObject<{
|
|
|
291
319
|
included_usage?: number | undefined;
|
|
292
320
|
next_reset_at?: number | null | undefined;
|
|
293
321
|
overage_allowed?: boolean | undefined;
|
|
322
|
+
rollovers?: {
|
|
323
|
+
balance: number;
|
|
324
|
+
expires_at: number;
|
|
325
|
+
} | undefined;
|
|
294
326
|
breakdown?: {
|
|
295
327
|
interval: ProductItemInterval;
|
|
296
328
|
balance?: number | undefined;
|
|
@@ -311,6 +343,10 @@ declare const CoreCusFeatureSchema: z.ZodObject<{
|
|
|
311
343
|
included_usage?: number | undefined;
|
|
312
344
|
next_reset_at?: number | null | undefined;
|
|
313
345
|
overage_allowed?: boolean | undefined;
|
|
346
|
+
rollovers?: {
|
|
347
|
+
balance: number;
|
|
348
|
+
expires_at: number;
|
|
349
|
+
} | undefined;
|
|
314
350
|
breakdown?: {
|
|
315
351
|
interval: ProductItemInterval;
|
|
316
352
|
balance?: number | undefined;
|
|
@@ -384,17 +420,17 @@ declare const CreateCustomerParamsSchema: z.ZodObject<{
|
|
|
384
420
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
385
421
|
expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
|
|
386
422
|
}, "strip", z.ZodTypeAny, {
|
|
423
|
+
id?: string | null | undefined;
|
|
387
424
|
name?: string | null | undefined;
|
|
388
425
|
email?: string | null | undefined;
|
|
389
426
|
fingerprint?: string | null | undefined;
|
|
390
|
-
id?: string | null | undefined;
|
|
391
427
|
metadata?: Record<string, any> | undefined;
|
|
392
428
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
393
429
|
}, {
|
|
430
|
+
id?: string | null | undefined;
|
|
394
431
|
name?: string | null | undefined;
|
|
395
432
|
email?: string | null | undefined;
|
|
396
433
|
fingerprint?: string | null | undefined;
|
|
397
|
-
id?: string | null | undefined;
|
|
398
434
|
metadata?: Record<string, any> | undefined;
|
|
399
435
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
400
436
|
}>;
|
package/dist/sdk/index.d.mts
CHANGED
|
@@ -54,6 +54,16 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
54
54
|
next_reset_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
55
55
|
overage_allowed: z.ZodOptional<z.ZodBoolean>;
|
|
56
56
|
usage_limit: z.ZodOptional<z.ZodNumber>;
|
|
57
|
+
rollovers: z.ZodOptional<z.ZodObject<{
|
|
58
|
+
balance: z.ZodNumber;
|
|
59
|
+
expires_at: z.ZodNumber;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
balance: number;
|
|
62
|
+
expires_at: number;
|
|
63
|
+
}, {
|
|
64
|
+
balance: number;
|
|
65
|
+
expires_at: number;
|
|
66
|
+
}>>;
|
|
57
67
|
breakdown: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
58
68
|
interval: z.ZodNativeEnum<typeof ProductItemInterval>;
|
|
59
69
|
balance: z.ZodOptional<z.ZodNumber>;
|
|
@@ -97,6 +107,10 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
97
107
|
included_usage?: number | undefined;
|
|
98
108
|
next_reset_at?: number | null | undefined;
|
|
99
109
|
overage_allowed?: boolean | undefined;
|
|
110
|
+
rollovers?: {
|
|
111
|
+
balance: number;
|
|
112
|
+
expires_at: number;
|
|
113
|
+
} | undefined;
|
|
100
114
|
breakdown?: {
|
|
101
115
|
interval: ProductItemInterval;
|
|
102
116
|
balance?: number | undefined;
|
|
@@ -122,6 +136,10 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
122
136
|
included_usage?: number | undefined;
|
|
123
137
|
next_reset_at?: number | null | undefined;
|
|
124
138
|
overage_allowed?: boolean | undefined;
|
|
139
|
+
rollovers?: {
|
|
140
|
+
balance: number;
|
|
141
|
+
expires_at: number;
|
|
142
|
+
} | undefined;
|
|
125
143
|
breakdown?: {
|
|
126
144
|
interval: ProductItemInterval;
|
|
127
145
|
balance?: number | undefined;
|
|
@@ -283,6 +301,16 @@ declare const CoreCusFeatureSchema: z.ZodObject<{
|
|
|
283
301
|
next_reset_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
284
302
|
overage_allowed: z.ZodOptional<z.ZodBoolean>;
|
|
285
303
|
usage_limit: z.ZodOptional<z.ZodNumber>;
|
|
304
|
+
rollovers: z.ZodOptional<z.ZodObject<{
|
|
305
|
+
balance: z.ZodNumber;
|
|
306
|
+
expires_at: z.ZodNumber;
|
|
307
|
+
}, "strip", z.ZodTypeAny, {
|
|
308
|
+
balance: number;
|
|
309
|
+
expires_at: number;
|
|
310
|
+
}, {
|
|
311
|
+
balance: number;
|
|
312
|
+
expires_at: number;
|
|
313
|
+
}>>;
|
|
286
314
|
breakdown: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
287
315
|
interval: z.ZodNativeEnum<typeof ProductItemInterval>;
|
|
288
316
|
balance: z.ZodOptional<z.ZodNumber>;
|
|
@@ -321,6 +349,10 @@ declare const CoreCusFeatureSchema: z.ZodObject<{
|
|
|
321
349
|
included_usage?: number | undefined;
|
|
322
350
|
next_reset_at?: number | null | undefined;
|
|
323
351
|
overage_allowed?: boolean | undefined;
|
|
352
|
+
rollovers?: {
|
|
353
|
+
balance: number;
|
|
354
|
+
expires_at: number;
|
|
355
|
+
} | undefined;
|
|
324
356
|
breakdown?: {
|
|
325
357
|
interval: ProductItemInterval;
|
|
326
358
|
balance?: number | undefined;
|
|
@@ -341,6 +373,10 @@ declare const CoreCusFeatureSchema: z.ZodObject<{
|
|
|
341
373
|
included_usage?: number | undefined;
|
|
342
374
|
next_reset_at?: number | null | undefined;
|
|
343
375
|
overage_allowed?: boolean | undefined;
|
|
376
|
+
rollovers?: {
|
|
377
|
+
balance: number;
|
|
378
|
+
expires_at: number;
|
|
379
|
+
} | undefined;
|
|
344
380
|
breakdown?: {
|
|
345
381
|
interval: ProductItemInterval;
|
|
346
382
|
balance?: number | undefined;
|
|
@@ -880,6 +916,7 @@ declare class Autumn {
|
|
|
880
916
|
static entities: {
|
|
881
917
|
get: (customer_id: string, entity_id: string, params?: GetEntityParams) => Promise<Result<Entity, AutumnError>>;
|
|
882
918
|
create: (customer_id: string, params?: CreateEntityParams | CreateEntityParams[]) => Promise<Result<CreateEntityResult, AutumnError>>;
|
|
919
|
+
transfer: (customer_id: string, params: TransferProductParams) => Promise<Result<TransferProductResult, AutumnError>>;
|
|
883
920
|
delete: (customer_id: string, entity_id: string) => Promise<Result<DeleteEntityResult, AutumnError>>;
|
|
884
921
|
};
|
|
885
922
|
static referrals: {
|
|
@@ -903,6 +940,7 @@ declare class Autumn {
|
|
|
903
940
|
entities: {
|
|
904
941
|
get: (customer_id: string, entity_id: string, params?: GetEntityParams) => Promise<Result<Entity, AutumnError>>;
|
|
905
942
|
create: (customer_id: string, params?: CreateEntityParams | CreateEntityParams[]) => Promise<Result<CreateEntityResult, AutumnError>>;
|
|
943
|
+
transfer: (customer_id: string, params: TransferProductParams) => Promise<Result<TransferProductResult, AutumnError>>;
|
|
906
944
|
delete: (customer_id: string, entity_id: string) => Promise<Result<DeleteEntityResult, AutumnError>>;
|
|
907
945
|
};
|
|
908
946
|
referrals: {
|
|
@@ -1025,6 +1063,23 @@ declare const EntityDataSchema: z.ZodObject<{
|
|
|
1025
1063
|
name?: string | undefined;
|
|
1026
1064
|
}>;
|
|
1027
1065
|
type EntityData = z.infer<typeof EntityDataSchema>;
|
|
1066
|
+
declare const TransferProductParamsSchema: z.ZodObject<{
|
|
1067
|
+
from_entity_id: z.ZodString;
|
|
1068
|
+
to_entity_id: z.ZodString;
|
|
1069
|
+
product_id: z.ZodString;
|
|
1070
|
+
}, "strip", z.ZodTypeAny, {
|
|
1071
|
+
product_id: string;
|
|
1072
|
+
from_entity_id: string;
|
|
1073
|
+
to_entity_id: string;
|
|
1074
|
+
}, {
|
|
1075
|
+
product_id: string;
|
|
1076
|
+
from_entity_id: string;
|
|
1077
|
+
to_entity_id: string;
|
|
1078
|
+
}>;
|
|
1079
|
+
type TransferProductParams = z.infer<typeof TransferProductParamsSchema>;
|
|
1080
|
+
type TransferProductResult = {
|
|
1081
|
+
success: boolean;
|
|
1082
|
+
};
|
|
1028
1083
|
|
|
1029
1084
|
declare const CreateReferralCodeParamsSchema: z.ZodObject<{
|
|
1030
1085
|
customer_id: z.ZodString;
|
|
@@ -1060,4 +1115,4 @@ interface RedeemReferralCodeResult {
|
|
|
1060
1115
|
applied: boolean;
|
|
1061
1116
|
}
|
|
1062
1117
|
|
|
1063
|
-
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 UpdateCustomerParams, UsageModel, type UsageModelType, type UsageParams, type UsageResult, fetchPricingTable, toContainerResult };
|
|
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 };
|