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 { A as AppEnv, P as ProductItem, b as ProductItemInterval } from './prodTypes-
|
|
1
|
+
import { A as AppEnv, P as ProductItem, b as ProductItemInterval } from './prodTypes-UFM-PYm-.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
declare enum ProductStatus {
|
|
@@ -19,6 +19,16 @@ declare const CoreCusFeatureSchema: z.ZodObject<{
|
|
|
19
19
|
next_reset_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
20
20
|
overage_allowed: z.ZodOptional<z.ZodBoolean>;
|
|
21
21
|
usage_limit: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
rollovers: z.ZodOptional<z.ZodObject<{
|
|
23
|
+
balance: z.ZodNumber;
|
|
24
|
+
expires_at: z.ZodNumber;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
balance: number;
|
|
27
|
+
expires_at: number;
|
|
28
|
+
}, {
|
|
29
|
+
balance: number;
|
|
30
|
+
expires_at: number;
|
|
31
|
+
}>>;
|
|
22
32
|
breakdown: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
23
33
|
interval: z.ZodNativeEnum<typeof ProductItemInterval>;
|
|
24
34
|
balance: z.ZodOptional<z.ZodNumber>;
|
|
@@ -57,6 +67,10 @@ declare const CoreCusFeatureSchema: z.ZodObject<{
|
|
|
57
67
|
next_reset_at?: number | null | undefined;
|
|
58
68
|
overage_allowed?: boolean | undefined;
|
|
59
69
|
usage_limit?: number | undefined;
|
|
70
|
+
rollovers?: {
|
|
71
|
+
balance: number;
|
|
72
|
+
expires_at: number;
|
|
73
|
+
} | undefined;
|
|
60
74
|
breakdown?: {
|
|
61
75
|
interval: ProductItemInterval;
|
|
62
76
|
balance?: number | undefined;
|
|
@@ -77,6 +91,10 @@ declare const CoreCusFeatureSchema: z.ZodObject<{
|
|
|
77
91
|
next_reset_at?: number | null | undefined;
|
|
78
92
|
overage_allowed?: boolean | undefined;
|
|
79
93
|
usage_limit?: number | undefined;
|
|
94
|
+
rollovers?: {
|
|
95
|
+
balance: number;
|
|
96
|
+
expires_at: number;
|
|
97
|
+
} | undefined;
|
|
80
98
|
breakdown?: {
|
|
81
99
|
interval: ProductItemInterval;
|
|
82
100
|
balance?: number | undefined;
|
|
@@ -147,17 +165,17 @@ declare const CreateCustomerParamsSchema: z.ZodObject<{
|
|
|
147
165
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
148
166
|
expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
|
|
149
167
|
}, "strip", z.ZodTypeAny, {
|
|
168
|
+
id?: string | null | undefined;
|
|
150
169
|
name?: string | null | undefined;
|
|
151
170
|
email?: string | null | undefined;
|
|
152
171
|
fingerprint?: string | null | undefined;
|
|
153
|
-
id?: string | null | undefined;
|
|
154
172
|
metadata?: Record<string, any> | undefined;
|
|
155
173
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
156
174
|
}, {
|
|
175
|
+
id?: string | null | undefined;
|
|
157
176
|
name?: string | null | undefined;
|
|
158
177
|
email?: string | null | undefined;
|
|
159
178
|
fingerprint?: string | null | undefined;
|
|
160
|
-
id?: string | null | undefined;
|
|
161
179
|
metadata?: Record<string, any> | undefined;
|
|
162
180
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
163
181
|
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AppEnv, P as ProductItem, b as ProductItemInterval } from './prodTypes-
|
|
1
|
+
import { A as AppEnv, P as ProductItem, b as ProductItemInterval } from './prodTypes-UFM-PYm-.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
declare enum ProductStatus {
|
|
@@ -19,6 +19,16 @@ declare const CoreCusFeatureSchema: z.ZodObject<{
|
|
|
19
19
|
next_reset_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
20
20
|
overage_allowed: z.ZodOptional<z.ZodBoolean>;
|
|
21
21
|
usage_limit: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
rollovers: z.ZodOptional<z.ZodObject<{
|
|
23
|
+
balance: z.ZodNumber;
|
|
24
|
+
expires_at: z.ZodNumber;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
balance: number;
|
|
27
|
+
expires_at: number;
|
|
28
|
+
}, {
|
|
29
|
+
balance: number;
|
|
30
|
+
expires_at: number;
|
|
31
|
+
}>>;
|
|
22
32
|
breakdown: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
23
33
|
interval: z.ZodNativeEnum<typeof ProductItemInterval>;
|
|
24
34
|
balance: z.ZodOptional<z.ZodNumber>;
|
|
@@ -57,6 +67,10 @@ declare const CoreCusFeatureSchema: z.ZodObject<{
|
|
|
57
67
|
next_reset_at?: number | null | undefined;
|
|
58
68
|
overage_allowed?: boolean | undefined;
|
|
59
69
|
usage_limit?: number | undefined;
|
|
70
|
+
rollovers?: {
|
|
71
|
+
balance: number;
|
|
72
|
+
expires_at: number;
|
|
73
|
+
} | undefined;
|
|
60
74
|
breakdown?: {
|
|
61
75
|
interval: ProductItemInterval;
|
|
62
76
|
balance?: number | undefined;
|
|
@@ -77,6 +91,10 @@ declare const CoreCusFeatureSchema: z.ZodObject<{
|
|
|
77
91
|
next_reset_at?: number | null | undefined;
|
|
78
92
|
overage_allowed?: boolean | undefined;
|
|
79
93
|
usage_limit?: number | undefined;
|
|
94
|
+
rollovers?: {
|
|
95
|
+
balance: number;
|
|
96
|
+
expires_at: number;
|
|
97
|
+
} | undefined;
|
|
80
98
|
breakdown?: {
|
|
81
99
|
interval: ProductItemInterval;
|
|
82
100
|
balance?: number | undefined;
|
|
@@ -147,17 +165,17 @@ declare const CreateCustomerParamsSchema: z.ZodObject<{
|
|
|
147
165
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
148
166
|
expand: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoices", "rewards", "trials_used", "entities", "referrals", "payment_method"]>, "many">>;
|
|
149
167
|
}, "strip", z.ZodTypeAny, {
|
|
168
|
+
id?: string | null | undefined;
|
|
150
169
|
name?: string | null | undefined;
|
|
151
170
|
email?: string | null | undefined;
|
|
152
171
|
fingerprint?: string | null | undefined;
|
|
153
|
-
id?: string | null | undefined;
|
|
154
172
|
metadata?: Record<string, any> | undefined;
|
|
155
173
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
156
174
|
}, {
|
|
175
|
+
id?: string | null | undefined;
|
|
157
176
|
name?: string | null | undefined;
|
|
158
177
|
email?: string | null | undefined;
|
|
159
178
|
fingerprint?: string | null | undefined;
|
|
160
|
-
id?: string | null | undefined;
|
|
161
179
|
metadata?: Record<string, any> | undefined;
|
|
162
180
|
expand?: ("invoices" | "rewards" | "trials_used" | "entities" | "referrals" | "payment_method")[] | undefined;
|
|
163
181
|
}>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as AttachParams, R as Result, C as CheckResult, T as TrackParams, a as AutumnPromise, b as TrackResult, c as CancelParams, d as CancelResult, O as OpenBillingPortalParams, S as SetupPaymentParams, e as SetupPaymentResult, f as CheckoutParams } from '../clientAttachTypes-
|
|
1
|
+
import { A as AttachParams, R as Result, C as CheckResult, T as TrackParams, a as AutumnPromise, b as TrackResult, c as CancelParams, d as CancelResult, O as OpenBillingPortalParams, S as SetupPaymentParams, e as SetupPaymentResult, f as CheckoutParams } from '../clientAttachTypes-whHUVrE3.mjs';
|
|
2
2
|
import { A as AutumnError } from '../error-DHbclCVh.mjs';
|
|
3
|
-
import { C as CheckoutResult } from '../attachTypes-
|
|
4
|
-
import { B as BillingPortalResult } from '../cusTypes-
|
|
5
|
-
import '../prodTypes-
|
|
3
|
+
import { C as CheckoutResult } from '../attachTypes-BThbMcvF.mjs';
|
|
4
|
+
import { B as BillingPortalResult } from '../cusTypes-BuLw67IH.mjs';
|
|
5
|
+
import '../prodTypes-UFM-PYm-.mjs';
|
|
6
6
|
import 'zod';
|
|
7
7
|
|
|
8
8
|
declare const useAutumn: () => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as AttachParams, R as Result, C as CheckResult, T as TrackParams, a as AutumnPromise, b as TrackResult, c as CancelParams, d as CancelResult, O as OpenBillingPortalParams, S as SetupPaymentParams, e as SetupPaymentResult, f as CheckoutParams } from '../clientAttachTypes-
|
|
1
|
+
import { A as AttachParams, R as Result, C as CheckResult, T as TrackParams, a as AutumnPromise, b as TrackResult, c as CancelParams, d as CancelResult, O as OpenBillingPortalParams, S as SetupPaymentParams, e as SetupPaymentResult, f as CheckoutParams } from '../clientAttachTypes-Df5FVGkw.js';
|
|
2
2
|
import { A as AutumnError } from '../error-DHbclCVh.js';
|
|
3
|
-
import { C as CheckoutResult } from '../attachTypes-
|
|
4
|
-
import { B as BillingPortalResult } from '../cusTypes-
|
|
5
|
-
import '../prodTypes-
|
|
3
|
+
import { C as CheckoutResult } from '../attachTypes-BCt7D8ym.js';
|
|
4
|
+
import { B as BillingPortalResult } from '../cusTypes-CqAsUZEp.js';
|
|
5
|
+
import '../prodTypes-UFM-PYm-.js';
|
|
6
6
|
import 'zod';
|
|
7
7
|
|
|
8
8
|
declare const useAutumn: () => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { A as AutumnError } from '../error-DHbclCVh.mjs';
|
|
2
|
-
import { A as AttachParams, a as AutumnPromise, C as CheckResult, T as TrackParams, b as TrackResult, c as CancelParams, d as CancelResult, S as SetupPaymentParams, e as SetupPaymentResult, O as OpenBillingPortalParams, f as CheckoutParams, g as CheckParams, h as Success } from '../clientAttachTypes-
|
|
3
|
-
import { A as AttachResult, C as CheckoutResult } from '../attachTypes-
|
|
4
|
-
import { f as CustomerExpandOption, a as Customer, B as BillingPortalResult } from '../cusTypes-
|
|
5
|
-
import { E as Entity } from '../entTypes-
|
|
2
|
+
import { A as AttachParams, a as AutumnPromise, C as CheckResult, T as TrackParams, b as TrackResult, c as CancelParams, d as CancelResult, S as SetupPaymentParams, e as SetupPaymentResult, O as OpenBillingPortalParams, f as CheckoutParams, g as CheckParams, h as Success } from '../clientAttachTypes-whHUVrE3.mjs';
|
|
3
|
+
import { A as AttachResult, C as CheckoutResult } from '../attachTypes-BThbMcvF.mjs';
|
|
4
|
+
import { f as CustomerExpandOption, a as Customer, B as BillingPortalResult } from '../cusTypes-BuLw67IH.mjs';
|
|
5
|
+
import { E as Entity } from '../entTypes-DTRFxh07.mjs';
|
|
6
6
|
import { C as CreateEntityParams, a as CreateReferralCodeResult, R as RedeemReferralCodeResult } from '../clientEntTypes-BFkleT6a.mjs';
|
|
7
7
|
import { z } from 'zod';
|
|
8
8
|
import { SWRConfiguration } from 'swr';
|
|
9
|
-
import '../prodTypes-
|
|
9
|
+
import '../prodTypes-UFM-PYm-.mjs';
|
|
10
10
|
|
|
11
11
|
declare const CreateReferralCodeParamsSchema: z.ZodObject<{
|
|
12
12
|
programId: z.ZodString;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { A as AutumnError } from '../error-DHbclCVh.js';
|
|
2
|
-
import { A as AttachParams, a as AutumnPromise, C as CheckResult, T as TrackParams, b as TrackResult, c as CancelParams, d as CancelResult, S as SetupPaymentParams, e as SetupPaymentResult, O as OpenBillingPortalParams, f as CheckoutParams, g as CheckParams, h as Success } from '../clientAttachTypes-
|
|
3
|
-
import { A as AttachResult, C as CheckoutResult } from '../attachTypes-
|
|
4
|
-
import { f as CustomerExpandOption, a as Customer, B as BillingPortalResult } from '../cusTypes-
|
|
5
|
-
import { E as Entity } from '../entTypes-
|
|
2
|
+
import { A as AttachParams, a as AutumnPromise, C as CheckResult, T as TrackParams, b as TrackResult, c as CancelParams, d as CancelResult, S as SetupPaymentParams, e as SetupPaymentResult, O as OpenBillingPortalParams, f as CheckoutParams, g as CheckParams, h as Success } from '../clientAttachTypes-Df5FVGkw.js';
|
|
3
|
+
import { A as AttachResult, C as CheckoutResult } from '../attachTypes-BCt7D8ym.js';
|
|
4
|
+
import { f as CustomerExpandOption, a as Customer, B as BillingPortalResult } from '../cusTypes-CqAsUZEp.js';
|
|
5
|
+
import { E as Entity } from '../entTypes-BLLymqnn.js';
|
|
6
6
|
import { C as CreateEntityParams, a as CreateReferralCodeResult, R as RedeemReferralCodeResult } from '../clientEntTypes-BFkleT6a.js';
|
|
7
7
|
import { z } from 'zod';
|
|
8
8
|
import { SWRConfiguration } from 'swr';
|
|
9
|
-
import '../prodTypes-
|
|
9
|
+
import '../prodTypes-UFM-PYm-.js';
|
|
10
10
|
|
|
11
11
|
declare const CreateReferralCodeParamsSchema: z.ZodObject<{
|
|
12
12
|
programId: z.ZodString;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { g as CheckParams, C as CheckResult, A as AttachParams, R as Result, c as CancelParams, a as AutumnPromise, T as TrackParams } from '../clientAttachTypes-
|
|
1
|
+
import { g as CheckParams, C as CheckResult, A as AttachParams, R as Result, c as CancelParams, a as AutumnPromise, T as TrackParams } from '../clientAttachTypes-whHUVrE3.mjs';
|
|
2
2
|
import { A as AutumnError } from '../error-DHbclCVh.mjs';
|
|
3
|
-
import { G as GetEntityParams, E as Entity } from '../entTypes-
|
|
3
|
+
import { G as GetEntityParams, E as Entity } from '../entTypes-DTRFxh07.mjs';
|
|
4
4
|
import * as swr from 'swr';
|
|
5
|
-
import '../prodTypes-
|
|
5
|
+
import '../prodTypes-UFM-PYm-.mjs';
|
|
6
6
|
import 'zod';
|
|
7
|
-
import '../cusTypes-
|
|
7
|
+
import '../cusTypes-BuLw67IH.mjs';
|
|
8
8
|
|
|
9
9
|
declare const useEntity: (entityId: string | null, params?: GetEntityParams) => {
|
|
10
10
|
entity: Entity | null;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { g as CheckParams, C as CheckResult, A as AttachParams, R as Result, c as CancelParams, a as AutumnPromise, T as TrackParams } from '../clientAttachTypes-
|
|
1
|
+
import { g as CheckParams, C as CheckResult, A as AttachParams, R as Result, c as CancelParams, a as AutumnPromise, T as TrackParams } from '../clientAttachTypes-Df5FVGkw.js';
|
|
2
2
|
import { A as AutumnError } from '../error-DHbclCVh.js';
|
|
3
|
-
import { G as GetEntityParams, E as Entity } from '../entTypes-
|
|
3
|
+
import { G as GetEntityParams, E as Entity } from '../entTypes-BLLymqnn.js';
|
|
4
4
|
import * as swr from 'swr';
|
|
5
|
-
import '../prodTypes-
|
|
5
|
+
import '../prodTypes-UFM-PYm-.js';
|
|
6
6
|
import 'zod';
|
|
7
|
-
import '../cusTypes-
|
|
7
|
+
import '../cusTypes-CqAsUZEp.js';
|
|
8
8
|
|
|
9
9
|
declare const useEntity: (entityId: string | null, params?: GetEntityParams) => {
|
|
10
10
|
entity: Entity | null;
|
|
@@ -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>;
|
|
@@ -80,6 +90,10 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
80
90
|
next_reset_at?: number | null | undefined;
|
|
81
91
|
overage_allowed?: boolean | undefined;
|
|
82
92
|
usage_limit?: number | undefined;
|
|
93
|
+
rollovers?: {
|
|
94
|
+
balance: number;
|
|
95
|
+
expires_at: number;
|
|
96
|
+
} | undefined;
|
|
83
97
|
breakdown?: {
|
|
84
98
|
interval: ProductItemInterval;
|
|
85
99
|
balance?: number | undefined;
|
|
@@ -105,6 +119,10 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
105
119
|
next_reset_at?: number | null | undefined;
|
|
106
120
|
overage_allowed?: boolean | undefined;
|
|
107
121
|
usage_limit?: number | undefined;
|
|
122
|
+
rollovers?: {
|
|
123
|
+
balance: number;
|
|
124
|
+
expires_at: number;
|
|
125
|
+
} | undefined;
|
|
108
126
|
breakdown?: {
|
|
109
127
|
interval: ProductItemInterval;
|
|
110
128
|
balance?: number | undefined;
|
|
@@ -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>;
|
|
@@ -80,6 +90,10 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
80
90
|
next_reset_at?: number | null | undefined;
|
|
81
91
|
overage_allowed?: boolean | undefined;
|
|
82
92
|
usage_limit?: number | undefined;
|
|
93
|
+
rollovers?: {
|
|
94
|
+
balance: number;
|
|
95
|
+
expires_at: number;
|
|
96
|
+
} | undefined;
|
|
83
97
|
breakdown?: {
|
|
84
98
|
interval: ProductItemInterval;
|
|
85
99
|
balance?: number | undefined;
|
|
@@ -105,6 +119,10 @@ declare const CheckFeatureResultSchema: z.ZodObject<{
|
|
|
105
119
|
next_reset_at?: number | null | undefined;
|
|
106
120
|
overage_allowed?: boolean | undefined;
|
|
107
121
|
usage_limit?: number | undefined;
|
|
122
|
+
rollovers?: {
|
|
123
|
+
balance: number;
|
|
124
|
+
expires_at: number;
|
|
125
|
+
} | undefined;
|
|
108
126
|
breakdown?: {
|
|
109
127
|
interval: ProductItemInterval;
|
|
110
128
|
balance?: number | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as CustomerData, a as Customer } from './cusTypes-
|
|
2
|
-
import { E as Entity } from './entTypes-
|
|
3
|
-
import './prodTypes-
|
|
1
|
+
import { C as CustomerData, a as Customer } from './cusTypes-BuLw67IH.mjs';
|
|
2
|
+
import { E as Entity } from './entTypes-DTRFxh07.mjs';
|
|
3
|
+
import './prodTypes-UFM-PYm-.mjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
6
6
|
interface ProductDetails {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as CustomerData, a as Customer } from './cusTypes-
|
|
2
|
-
import { E as Entity } from './entTypes-
|
|
3
|
-
import './prodTypes-
|
|
1
|
+
import { C as CustomerData, a as Customer } from './cusTypes-CqAsUZEp.js';
|
|
2
|
+
import { E as Entity } from './entTypes-BLLymqnn.js';
|
|
3
|
+
import './prodTypes-UFM-PYm-.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
6
6
|
interface ProductDetails {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CustomerData, a as CheckFeatureResult, b as CheckProductResult, P as ProductItem, c as Product, G as GetCustomerParams, d as Customer, e as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, f as BillingPortalResult, g as 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.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { R as Result, A as AutumnError } from './response-eH4S4sg0.mjs';
|
|
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
|
|