autumn-js 0.1.22 → 0.1.24
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.js +25 -0
- package/dist/libraries/backend/better-auth.mjs +7 -7
- package/dist/libraries/backend/{chunk-PN4KP454.mjs → chunk-4LVRQN5R.mjs} +25 -0
- package/dist/libraries/backend/{chunk-5VJICG7P.mjs → chunk-7DS7ICKQ.mjs} +6 -6
- package/dist/libraries/backend/{chunk-QSWG2M5T.mjs → chunk-7PLQK5LL.mjs} +1 -1
- package/dist/libraries/backend/{chunk-6QFLAHJ4.mjs → chunk-DMPRLFPO.mjs} +1 -1
- package/dist/libraries/backend/{chunk-XVPZOXA3.mjs → chunk-GB7SC4FJ.mjs} +1 -1
- package/dist/libraries/backend/{chunk-OW4LL3WD.mjs → chunk-J6DXZ2RF.mjs} +1 -1
- package/dist/libraries/backend/{chunk-5KV536NU.mjs → chunk-OEKZ2I55.mjs} +1 -1
- package/dist/libraries/backend/convex.d.mts +7 -1
- package/dist/libraries/backend/convex.d.ts +7 -1
- package/dist/libraries/backend/convex.js +111 -2
- package/dist/libraries/backend/convex.mjs +91 -8
- package/dist/libraries/backend/elysia.js +25 -0
- package/dist/libraries/backend/elysia.mjs +7 -7
- package/dist/libraries/backend/express.js +25 -0
- package/dist/libraries/backend/express.mjs +7 -7
- package/dist/libraries/backend/fastify.js +25 -0
- package/dist/libraries/backend/fastify.mjs +7 -7
- package/dist/libraries/backend/hono.js +25 -0
- package/dist/libraries/backend/hono.mjs +7 -7
- package/dist/libraries/backend/index.js +25 -0
- package/dist/libraries/backend/index.mjs +7 -7
- package/dist/libraries/backend/next.js +25 -0
- package/dist/libraries/backend/next.mjs +7 -7
- package/dist/libraries/backend/react-router.js +25 -0
- package/dist/libraries/backend/react-router.mjs +7 -7
- package/dist/libraries/backend/remix_dep.js +25 -0
- package/dist/libraries/backend/remix_dep.mjs +7 -7
- package/dist/libraries/backend/routes/backendRouter.js +25 -0
- package/dist/libraries/backend/routes/backendRouter.mjs +7 -7
- package/dist/libraries/backend/routes/entityRoutes.js +25 -0
- package/dist/libraries/backend/routes/entityRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/genRoutes.js +25 -0
- package/dist/libraries/backend/routes/genRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/productRoutes.js +25 -0
- package/dist/libraries/backend/routes/productRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/referralRoutes.js +25 -0
- package/dist/libraries/backend/routes/referralRoutes.mjs +3 -3
- package/dist/libraries/backend/supabase.js +25 -0
- package/dist/libraries/backend/supabase.mjs +7 -7
- package/dist/libraries/backend/tanstack.js +25 -0
- package/dist/libraries/backend/tanstack.mjs +7 -7
- package/dist/libraries/backend/utils/backendRes.js +25 -0
- package/dist/libraries/backend/utils/backendRes.mjs +1 -1
- package/dist/libraries/backend/utils/withAuth.js +25 -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 +28 -1
- package/dist/libraries/react/AutumnContext.mjs +6 -6
- package/dist/libraries/react/BaseAutumnProvider.d.mts +7 -7
- package/dist/libraries/react/BaseAutumnProvider.d.ts +7 -7
- package/dist/libraries/react/BaseAutumnProvider.js +33 -3
- package/dist/libraries/react/BaseAutumnProvider.mjs +11 -11
- package/dist/libraries/react/{ReactAutumnClient-_y4Ea48c.d.mts → ReactAutumnClient-BBQsSJYU.d.mts} +62 -10
- package/dist/libraries/react/{ReactAutumnClient-BqEB-TPz.d.ts → ReactAutumnClient-VD1rcIPC.d.ts} +62 -10
- package/dist/libraries/react/ReactAutumnProvider.d.mts +5 -4
- package/dist/libraries/react/ReactAutumnProvider.d.ts +5 -4
- package/dist/libraries/react/ReactAutumnProvider.js +359 -4
- package/dist/libraries/react/ReactAutumnProvider.mjs +13 -12
- package/dist/libraries/react/{attachTypes-gI6T0O95.d.mts → attachTypes-DJIr5ldB.d.mts} +1 -1
- package/dist/libraries/react/{attachTypes-DoCshKK6.d.ts → attachTypes-DVF4f7Hw.d.ts} +1 -1
- package/dist/libraries/react/{chunk-DKJJ2DGE.mjs → chunk-2CP6WKDX.mjs} +1 -1
- package/dist/libraries/react/{chunk-NFVAFRF6.mjs → chunk-2SFUXGFK.mjs} +1 -1
- package/dist/libraries/react/{chunk-HBJDIEEJ.mjs → chunk-4WAFPXBN.mjs} +1 -1
- package/dist/libraries/react/{chunk-4CO2JIMK.mjs → chunk-65UX5FJ5.mjs} +2 -2
- package/dist/libraries/react/{chunk-LJNV3I7J.mjs → chunk-7U6BZK2Q.mjs} +2 -2
- package/dist/libraries/react/{chunk-OLXLPM4L.mjs → chunk-DOC77WTB.mjs} +3 -3
- package/dist/libraries/react/{chunk-X6FMCHSB.mjs → chunk-F6DIQF5V.mjs} +6 -6
- package/dist/libraries/react/{chunk-65S4VY5K.mjs → chunk-GITYXFGP.mjs} +1 -1
- package/dist/libraries/react/{chunk-JFRVJJIG.mjs → chunk-IBGAE73H.mjs} +2 -2
- package/dist/libraries/react/{chunk-S5XNNFQO.mjs → chunk-JLAWCM26.mjs} +433 -431
- package/dist/libraries/react/{chunk-ABJEE3UK.mjs → chunk-KUFNEIRV.mjs} +25 -0
- package/dist/libraries/react/{chunk-WUEXMQIT.mjs → chunk-MLPVSH6P.mjs} +2 -2
- package/dist/libraries/react/{chunk-BD4NZOEZ.mjs → chunk-MUZHFEMO.mjs} +1 -1
- package/dist/libraries/react/{chunk-YE6KQQS7.mjs → chunk-MZ26ZDT3.mjs} +6 -6
- package/dist/libraries/react/{chunk-6VDZ3JMC.mjs → chunk-NBVPBAGX.mjs} +21 -19
- package/dist/libraries/react/{chunk-T6D3GYIH.mjs → chunk-O7IKBONA.mjs} +1 -1
- package/dist/libraries/react/{chunk-2PBWI3T6.mjs → chunk-PDLQNFRW.mjs} +17 -17
- package/dist/libraries/react/{chunk-E6XSQQPF.mjs → chunk-PE5RABEC.mjs} +14 -4
- package/dist/libraries/react/{chunk-SEFSA357.mjs → chunk-R7DEST3O.mjs} +6 -3
- package/dist/libraries/react/{chunk-L6LHSFXS.mjs → chunk-UGHMVXB7.mjs} +3 -3
- package/dist/libraries/react/{chunk-7PEELII6.mjs → chunk-UMG2RCCT.mjs} +2 -2
- package/dist/libraries/react/{chunk-VYBU4WHO.mjs → chunk-XR2XUVVC.mjs} +2 -2
- package/dist/libraries/react/{chunk-DAZBMK7R.mjs → chunk-YURNJN6P.mjs} +1 -1
- package/dist/libraries/react/chunk-ZUPU2EBK.mjs +327 -0
- package/dist/libraries/react/client/ConvexAutumnClient.d.mts +76 -0
- package/dist/libraries/react/client/ConvexAutumnClient.d.ts +76 -0
- package/dist/libraries/react/client/ConvexAutumnClient.js +1266 -0
- package/dist/libraries/react/client/ConvexAutumnClient.mjs +9 -0
- 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 +28 -1
- package/dist/libraries/react/client/ReactAutumnClient.mjs +5 -5
- 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/clientGenTypes.js +25 -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 +33 -3
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.mjs +32 -31
- 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 +28 -1
- package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.mjs +32 -31
- 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 +33 -3
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +32 -31
- package/dist/libraries/react/components/ui/accordion.mjs +3 -3
- package/dist/libraries/react/components/ui/dialog.mjs +4 -4
- package/dist/libraries/react/components/ui/popover.mjs +5 -5
- package/dist/libraries/react/components/ui/switch.mjs +3 -3
- package/dist/libraries/react/{cusTypes-DckkwpWg.d.ts → cusTypes-CEb_KwPo.d.ts} +1 -1
- package/dist/libraries/react/{cusTypes-UwHT30-L.d.mts → cusTypes-DynqPCZH.d.mts} +1 -1
- package/dist/libraries/react/{entTypes-BWsQfaNZ.d.ts → entTypes--Y-4T20Y.d.ts} +1 -1
- package/dist/libraries/react/{entTypes-DcRz1vjc.d.mts → entTypes-DjasDDYh.d.mts} +1 -1
- package/dist/libraries/react/{genTypes-C_ilxndU.d.mts → genTypes-DdYlVEah.d.mts} +1 -1
- package/dist/libraries/react/{genTypes-DjcQWIOM.d.ts → genTypes-aPPwPimh.d.ts} +1 -1
- 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 +30 -2
- package/dist/libraries/react/hooks/helpers/handleCheck.mjs +2 -2
- package/dist/libraries/react/hooks/helpers/useAutumnBase.d.mts +12 -28
- package/dist/libraries/react/hooks/helpers/useAutumnBase.d.ts +12 -28
- package/dist/libraries/react/hooks/helpers/useAutumnBase.js +25 -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 +28 -1
- package/dist/libraries/react/hooks/useAnalytics.mjs +7 -7
- package/dist/libraries/react/hooks/useCustomer.d.mts +7 -6
- package/dist/libraries/react/hooks/useCustomer.d.ts +7 -6
- package/dist/libraries/react/hooks/useCustomer.js +33 -3
- package/dist/libraries/react/hooks/useCustomer.mjs +11 -11
- package/dist/libraries/react/hooks/useCustomerBase.d.mts +8 -7
- package/dist/libraries/react/hooks/useCustomerBase.d.ts +8 -7
- package/dist/libraries/react/hooks/useCustomerBase.js +33 -3
- package/dist/libraries/react/hooks/useCustomerBase.mjs +10 -10
- package/dist/libraries/react/hooks/useEntity.d.mts +6 -20
- package/dist/libraries/react/hooks/useEntity.d.ts +6 -20
- package/dist/libraries/react/hooks/useEntity.js +33 -3
- package/dist/libraries/react/hooks/useEntity.mjs +11 -11
- package/dist/libraries/react/hooks/useEntityBase.d.mts +8 -22
- package/dist/libraries/react/hooks/useEntityBase.d.ts +8 -22
- package/dist/libraries/react/hooks/useEntityBase.js +33 -3
- package/dist/libraries/react/hooks/useEntityBase.mjs +10 -10
- 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 +28 -1
- package/dist/libraries/react/hooks/usePaywall.mjs +7 -7
- 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 +28 -1
- package/dist/libraries/react/hooks/usePricingTable.mjs +8 -8
- package/dist/libraries/react/hooks/usePricingTableBase.d.mts +8 -7
- package/dist/libraries/react/hooks/usePricingTableBase.d.ts +8 -7
- package/dist/libraries/react/hooks/usePricingTableBase.js +25 -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 +4 -17
- package/dist/libraries/react/index.d.ts +4 -17
- package/dist/libraries/react/index.js +359 -4
- package/dist/libraries/react/index.mjs +359 -4
- package/dist/libraries/react/{prodTypes-B8NdKyKo.d.ts → prodTypes-C8xRoBP7.d.mts} +1 -1
- package/dist/libraries/react/{prodTypes-B8NdKyKo.d.mts → prodTypes-C8xRoBP7.d.ts} +1 -1
- package/dist/next/client/NextAutumnClient.d.mts +61 -10
- package/dist/next/client/NextAutumnClient.d.ts +61 -10
- package/dist/next/client/NextAutumnProvider.d.mts +2 -2
- package/dist/next/client/NextAutumnProvider.d.ts +2 -2
- package/dist/next/client/{clientAttachTypes-DPbDkX9E.d.mts → clientAttachTypes-BgiG9o_O.d.mts} +2 -2
- package/dist/next/client/{clientAttachTypes-DWfLqjO3.d.ts → clientAttachTypes-VNZGVMx6.d.ts} +2 -2
- package/dist/next/client/{attachTypes-x-hgg6BY.d.ts → clientEntTypes-BNVsUSBp.d.mts} +22 -2
- package/dist/next/client/{attachTypes-BOh_Skwx.d.mts → clientEntTypes-DmhBcFyI.d.ts} +22 -2
- package/dist/next/client/clientUtils.d.mts +3 -3
- package/dist/next/client/clientUtils.d.ts +3 -3
- package/dist/next/client/{cusTypes-CcUOSzBw.d.ts → cusTypes-5W4JVk2C.d.ts} +1 -1
- package/dist/next/client/{cusTypes-dipsR4ST.d.mts → cusTypes-Cb9Peq72.d.mts} +1 -1
- package/dist/next/client/{entTypes-BwBtFwJP.d.ts → entTypes-B2gnYOgY.d.ts} +1 -1
- package/dist/next/client/{entTypes-BzKJAjff.d.mts → entTypes-R0fGEyG8.d.mts} +1 -1
- package/dist/next/client/hooks/useAutumn.d.mts +7 -25
- package/dist/next/client/hooks/useAutumn.d.ts +7 -25
- package/dist/next/client/hooks/useCustomer.d.mts +5 -6
- package/dist/next/client/hooks/useCustomer.d.ts +5 -6
- package/dist/next/client/hooks/useEntity.d.mts +6 -20
- package/dist/next/client/hooks/useEntity.d.ts +6 -20
- 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-DwM7QuGf.d.mts → prodTypes-BC--Np0p.d.mts} +1 -1
- package/dist/next/client/{prodTypes-DwM7QuGf.d.ts → prodTypes-BC--Np0p.d.ts} +1 -1
- package/dist/next/client/types.d.mts +3 -3
- package/dist/next/client/types.d.ts +3 -3
- package/dist/sdk/index.d.mts +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.js +24 -0
- package/dist/sdk/index.mjs +24 -1
- package/dist/utils/encryptUtils.js +25 -0
- package/dist/utils/encryptUtils.mjs +25 -0
- package/package.json +5 -4
- package/dist/next/client/clientEntTypes-DHKeY0pG.d.mts +0 -21
- package/dist/next/client/clientEntTypes-DHKeY0pG.d.ts +0 -21
- package/dist/libraries/react/{chunk-YN67J64M.mjs → chunk-D3PGSU2Q.mjs} +11 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as ProductItem,
|
|
1
|
+
import { P as ProductItem, b as Product } from './prodTypes-BC--Np0p.js';
|
|
2
2
|
import { z } from 'zod/v4';
|
|
3
3
|
|
|
4
4
|
declare const AttachFeatureOptionsSchema: z.ZodObject<{
|
|
@@ -43,4 +43,24 @@ type CheckoutResult = {
|
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
interface CreateReferralCodeResult {
|
|
47
|
+
code: string;
|
|
48
|
+
customer_id: string;
|
|
49
|
+
created_at: number;
|
|
50
|
+
}
|
|
51
|
+
interface RedeemReferralCodeResult {
|
|
52
|
+
id: string;
|
|
53
|
+
customer_id: string;
|
|
54
|
+
reward_id: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
interface CreateEntityParams {
|
|
58
|
+
id: string;
|
|
59
|
+
name?: string;
|
|
60
|
+
featureId: string;
|
|
61
|
+
}
|
|
62
|
+
interface GetEntityParams {
|
|
63
|
+
expand?: string[];
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type { AttachResult as A, CheckoutResult as C, GetEntityParams as G, RedeemReferralCodeResult as R, CreateEntityParams as a, CreateReferralCodeResult as b };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AutumnClientError, PricingTableProduct } from './types.mjs';
|
|
2
|
-
import './cusTypes-
|
|
3
|
-
import './prodTypes-
|
|
2
|
+
import './cusTypes-Cb9Peq72.mjs';
|
|
3
|
+
import './prodTypes-BC--Np0p.mjs';
|
|
4
4
|
import 'zod/v4';
|
|
5
|
-
import './entTypes-
|
|
5
|
+
import './entTypes-R0fGEyG8.mjs';
|
|
6
6
|
|
|
7
7
|
declare const toClientErrorResponse: (error: any) => {
|
|
8
8
|
data: null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AutumnClientError, PricingTableProduct } from './types.js';
|
|
2
|
-
import './cusTypes-
|
|
3
|
-
import './prodTypes-
|
|
2
|
+
import './cusTypes-5W4JVk2C.js';
|
|
3
|
+
import './prodTypes-BC--Np0p.js';
|
|
4
4
|
import 'zod/v4';
|
|
5
|
-
import './entTypes-
|
|
5
|
+
import './entTypes-B2gnYOgY.js';
|
|
6
6
|
|
|
7
7
|
declare const toClientErrorResponse: (error: any) => {
|
|
8
8
|
data: null;
|
|
@@ -1,36 +1,18 @@
|
|
|
1
|
-
import { A as AttachParams,
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { B as BillingPortalResult } from '../cusTypes-dipsR4ST.mjs';
|
|
5
|
-
import '../prodTypes-DwM7QuGf.mjs';
|
|
1
|
+
import { A as AttachParams, T as TrackParams, a as AutumnPromise, b as TrackResult, C as CancelParams, c as CancelResult, O as OpenBillingPortalParams, S as SetupPaymentParams, d as SetupPaymentResult, e as CheckoutParams } from '../clientAttachTypes-BgiG9o_O.mjs';
|
|
2
|
+
import { B as BillingPortalResult } from '../cusTypes-Cb9Peq72.mjs';
|
|
3
|
+
import '../prodTypes-BC--Np0p.mjs';
|
|
6
4
|
import 'zod/v4';
|
|
5
|
+
import '../error-DHbclCVh.mjs';
|
|
7
6
|
|
|
8
7
|
declare const useAutumn: () => {
|
|
9
|
-
attach: (params: AttachParams) => Promise<
|
|
10
|
-
customer_id: string;
|
|
11
|
-
product_ids: string[];
|
|
12
|
-
code: string;
|
|
13
|
-
message: string;
|
|
14
|
-
checkout_url?: string | undefined;
|
|
15
|
-
customer_data?: any;
|
|
16
|
-
invoice?: {
|
|
17
|
-
status: string;
|
|
18
|
-
stripe_id: string;
|
|
19
|
-
hosted_invoice_url: string | null;
|
|
20
|
-
total: number;
|
|
21
|
-
currency: string;
|
|
22
|
-
} | undefined;
|
|
23
|
-
} | CheckResult, AutumnError>>;
|
|
8
|
+
attach: (params: AttachParams) => Promise<any>;
|
|
24
9
|
track: (params: TrackParams) => AutumnPromise<TrackResult>;
|
|
25
10
|
cancel: (params: CancelParams) => AutumnPromise<CancelResult>;
|
|
26
11
|
openBillingPortal: (params?: OpenBillingPortalParams) => AutumnPromise<BillingPortalResult>;
|
|
27
12
|
setupPayment: (params?: SetupPaymentParams) => AutumnPromise<SetupPaymentResult>;
|
|
28
13
|
checkout: (params: CheckoutParams) => Promise<{
|
|
29
|
-
data:
|
|
30
|
-
error:
|
|
31
|
-
} | {
|
|
32
|
-
data: CheckoutResult;
|
|
33
|
-
error: null;
|
|
14
|
+
data: any;
|
|
15
|
+
error: any;
|
|
34
16
|
}>;
|
|
35
17
|
};
|
|
36
18
|
|
|
@@ -1,36 +1,18 @@
|
|
|
1
|
-
import { A as AttachParams,
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { B as BillingPortalResult } from '../cusTypes-CcUOSzBw.js';
|
|
5
|
-
import '../prodTypes-DwM7QuGf.js';
|
|
1
|
+
import { A as AttachParams, T as TrackParams, a as AutumnPromise, b as TrackResult, C as CancelParams, c as CancelResult, O as OpenBillingPortalParams, S as SetupPaymentParams, d as SetupPaymentResult, e as CheckoutParams } from '../clientAttachTypes-VNZGVMx6.js';
|
|
2
|
+
import { B as BillingPortalResult } from '../cusTypes-5W4JVk2C.js';
|
|
3
|
+
import '../prodTypes-BC--Np0p.js';
|
|
6
4
|
import 'zod/v4';
|
|
5
|
+
import '../error-DHbclCVh.js';
|
|
7
6
|
|
|
8
7
|
declare const useAutumn: () => {
|
|
9
|
-
attach: (params: AttachParams) => Promise<
|
|
10
|
-
customer_id: string;
|
|
11
|
-
product_ids: string[];
|
|
12
|
-
code: string;
|
|
13
|
-
message: string;
|
|
14
|
-
checkout_url?: string | undefined;
|
|
15
|
-
customer_data?: any;
|
|
16
|
-
invoice?: {
|
|
17
|
-
status: string;
|
|
18
|
-
stripe_id: string;
|
|
19
|
-
hosted_invoice_url: string | null;
|
|
20
|
-
total: number;
|
|
21
|
-
currency: string;
|
|
22
|
-
} | undefined;
|
|
23
|
-
} | CheckResult, AutumnError>>;
|
|
8
|
+
attach: (params: AttachParams) => Promise<any>;
|
|
24
9
|
track: (params: TrackParams) => AutumnPromise<TrackResult>;
|
|
25
10
|
cancel: (params: CancelParams) => AutumnPromise<CancelResult>;
|
|
26
11
|
openBillingPortal: (params?: OpenBillingPortalParams) => AutumnPromise<BillingPortalResult>;
|
|
27
12
|
setupPayment: (params?: SetupPaymentParams) => AutumnPromise<SetupPaymentResult>;
|
|
28
13
|
checkout: (params: CheckoutParams) => Promise<{
|
|
29
|
-
data:
|
|
30
|
-
error:
|
|
31
|
-
} | {
|
|
32
|
-
data: CheckoutResult;
|
|
33
|
-
error: null;
|
|
14
|
+
data: any;
|
|
15
|
+
error: any;
|
|
34
16
|
}>;
|
|
35
17
|
};
|
|
36
18
|
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { A as AutumnError } from '../error-DHbclCVh.mjs';
|
|
2
|
-
import { A as AttachParams, a as AutumnPromise,
|
|
3
|
-
import { A as AttachResult, C as CheckoutResult } from '../
|
|
4
|
-
import { f as CustomerExpandOption, a as Customer, B as BillingPortalResult } from '../cusTypes-
|
|
5
|
-
import { E as Entity } from '../entTypes-
|
|
6
|
-
import { C as CreateEntityParams, a as CreateReferralCodeResult, R as RedeemReferralCodeResult } from '../clientEntTypes-DHKeY0pG.mjs';
|
|
2
|
+
import { A as AttachParams, a as AutumnPromise, g as CheckResult, T as TrackParams, b as TrackResult, C as CancelParams, c as CancelResult, S as SetupPaymentParams, d as SetupPaymentResult, O as OpenBillingPortalParams, e as CheckoutParams, f as CheckParams, h as Success } from '../clientAttachTypes-BgiG9o_O.mjs';
|
|
3
|
+
import { A as AttachResult, C as CheckoutResult, a as CreateEntityParams, b as CreateReferralCodeResult, R as RedeemReferralCodeResult } from '../clientEntTypes-BNVsUSBp.mjs';
|
|
4
|
+
import { f as CustomerExpandOption, a as Customer, B as BillingPortalResult } from '../cusTypes-Cb9Peq72.mjs';
|
|
5
|
+
import { E as Entity } from '../entTypes-R0fGEyG8.mjs';
|
|
7
6
|
import { z } from 'zod/v4';
|
|
8
7
|
import { SWRConfiguration } from 'swr';
|
|
9
|
-
import '../prodTypes-
|
|
8
|
+
import '../prodTypes-BC--Np0p.mjs';
|
|
10
9
|
|
|
11
10
|
declare const CreateReferralCodeParamsSchema: z.ZodObject<{
|
|
12
11
|
programId: z.ZodString;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { A as AutumnError } from '../error-DHbclCVh.js';
|
|
2
|
-
import { A as AttachParams, a as AutumnPromise,
|
|
3
|
-
import { A as AttachResult, C as CheckoutResult } from '../
|
|
4
|
-
import { f as CustomerExpandOption, a as Customer, B as BillingPortalResult } from '../cusTypes-
|
|
5
|
-
import { E as Entity } from '../entTypes-
|
|
6
|
-
import { C as CreateEntityParams, a as CreateReferralCodeResult, R as RedeemReferralCodeResult } from '../clientEntTypes-DHKeY0pG.js';
|
|
2
|
+
import { A as AttachParams, a as AutumnPromise, g as CheckResult, T as TrackParams, b as TrackResult, C as CancelParams, c as CancelResult, S as SetupPaymentParams, d as SetupPaymentResult, O as OpenBillingPortalParams, e as CheckoutParams, f as CheckParams, h as Success } from '../clientAttachTypes-VNZGVMx6.js';
|
|
3
|
+
import { A as AttachResult, C as CheckoutResult, a as CreateEntityParams, b as CreateReferralCodeResult, R as RedeemReferralCodeResult } from '../clientEntTypes-DmhBcFyI.js';
|
|
4
|
+
import { f as CustomerExpandOption, a as Customer, B as BillingPortalResult } from '../cusTypes-5W4JVk2C.js';
|
|
5
|
+
import { E as Entity } from '../entTypes-B2gnYOgY.js';
|
|
7
6
|
import { z } from 'zod/v4';
|
|
8
7
|
import { SWRConfiguration } from 'swr';
|
|
9
|
-
import '../prodTypes-
|
|
8
|
+
import '../prodTypes-BC--Np0p.js';
|
|
10
9
|
|
|
11
10
|
declare const CreateReferralCodeParamsSchema: z.ZodObject<{
|
|
12
11
|
programId: z.ZodString;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { G as GetEntityParams, E as Entity } from '../entTypes-BzKJAjff.mjs';
|
|
1
|
+
import { f as CheckParams, g as CheckResult, A as AttachParams, C as CancelParams, a as AutumnPromise, T as TrackParams } from '../clientAttachTypes-BgiG9o_O.mjs';
|
|
2
|
+
import { G as GetEntityParams, E as Entity } from '../entTypes-R0fGEyG8.mjs';
|
|
4
3
|
import * as swr from 'swr';
|
|
5
|
-
import '../prodTypes-
|
|
4
|
+
import '../prodTypes-BC--Np0p.mjs';
|
|
6
5
|
import 'zod/v4';
|
|
7
|
-
import '../
|
|
6
|
+
import '../error-DHbclCVh.mjs';
|
|
7
|
+
import '../cusTypes-Cb9Peq72.mjs';
|
|
8
8
|
|
|
9
9
|
declare const useEntity: (entityId: string | null, params?: GetEntityParams) => {
|
|
10
10
|
entity: Entity | null;
|
|
@@ -15,21 +15,7 @@ declare const useEntity: (entityId: string | null, params?: GetEntityParams) =>
|
|
|
15
15
|
data: CheckResult;
|
|
16
16
|
error: null;
|
|
17
17
|
};
|
|
18
|
-
attach: (params: AttachParams) => Promise<
|
|
19
|
-
customer_id: string;
|
|
20
|
-
product_ids: string[];
|
|
21
|
-
code: string;
|
|
22
|
-
message: string;
|
|
23
|
-
checkout_url?: string | undefined;
|
|
24
|
-
customer_data?: any;
|
|
25
|
-
invoice?: {
|
|
26
|
-
status: string;
|
|
27
|
-
stripe_id: string;
|
|
28
|
-
hosted_invoice_url: string | null;
|
|
29
|
-
total: number;
|
|
30
|
-
currency: string;
|
|
31
|
-
} | undefined;
|
|
32
|
-
} | CheckResult, AutumnError>>;
|
|
18
|
+
attach: (params: AttachParams) => Promise<any>;
|
|
33
19
|
cancel: (params: CancelParams) => AutumnPromise<{
|
|
34
20
|
success: boolean;
|
|
35
21
|
customer_id: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { G as GetEntityParams, E as Entity } from '../entTypes-BwBtFwJP.js';
|
|
1
|
+
import { f as CheckParams, g as CheckResult, A as AttachParams, C as CancelParams, a as AutumnPromise, T as TrackParams } from '../clientAttachTypes-VNZGVMx6.js';
|
|
2
|
+
import { G as GetEntityParams, E as Entity } from '../entTypes-B2gnYOgY.js';
|
|
4
3
|
import * as swr from 'swr';
|
|
5
|
-
import '../prodTypes-
|
|
4
|
+
import '../prodTypes-BC--Np0p.js';
|
|
6
5
|
import 'zod/v4';
|
|
7
|
-
import '../
|
|
6
|
+
import '../error-DHbclCVh.js';
|
|
7
|
+
import '../cusTypes-5W4JVk2C.js';
|
|
8
8
|
|
|
9
9
|
declare const useEntity: (entityId: string | null, params?: GetEntityParams) => {
|
|
10
10
|
entity: Entity | null;
|
|
@@ -15,21 +15,7 @@ declare const useEntity: (entityId: string | null, params?: GetEntityParams) =>
|
|
|
15
15
|
data: CheckResult;
|
|
16
16
|
error: null;
|
|
17
17
|
};
|
|
18
|
-
attach: (params: AttachParams) => Promise<
|
|
19
|
-
customer_id: string;
|
|
20
|
-
product_ids: string[];
|
|
21
|
-
code: string;
|
|
22
|
-
message: string;
|
|
23
|
-
checkout_url?: string | undefined;
|
|
24
|
-
customer_data?: any;
|
|
25
|
-
invoice?: {
|
|
26
|
-
status: string;
|
|
27
|
-
stripe_id: string;
|
|
28
|
-
hosted_invoice_url: string | null;
|
|
29
|
-
total: number;
|
|
30
|
-
currency: string;
|
|
31
|
-
} | undefined;
|
|
32
|
-
} | CheckResult, AutumnError>>;
|
|
18
|
+
attach: (params: AttachParams) => Promise<any>;
|
|
33
19
|
cancel: (params: CancelParams) => AutumnPromise<{
|
|
34
20
|
success: boolean;
|
|
35
21
|
customer_id: string;
|
|
@@ -159,4 +159,4 @@ interface Product {
|
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
export { AppEnv as A, type CheckFeatureResult as C, type ProductItem as P,
|
|
162
|
+
export { AppEnv as A, type CheckFeatureResult as C, type ProductItem as P, ProductItemInterval as a, type Product as b, type ProductScenario as c, type CheckProductResult as d };
|
|
@@ -159,4 +159,4 @@ interface Product {
|
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
export { AppEnv as A, type CheckFeatureResult as C, type ProductItem as P,
|
|
162
|
+
export { AppEnv as A, type CheckFeatureResult as C, type ProductItem as P, ProductItemInterval as a, type Product as b, type ProductScenario as c, type CheckProductResult as d };
|
|
@@ -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-Cb9Peq72.mjs';
|
|
2
|
+
import { E as Entity } from './entTypes-R0fGEyG8.mjs';
|
|
3
|
+
import './prodTypes-BC--Np0p.mjs';
|
|
4
4
|
import 'zod/v4';
|
|
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-5W4JVk2C.js';
|
|
2
|
+
import { E as Entity } from './entTypes-B2gnYOgY.js';
|
|
3
|
+
import './prodTypes-BC--Np0p.js';
|
|
4
4
|
import 'zod/v4';
|
|
5
5
|
|
|
6
6
|
interface ProductDetails {
|
package/dist/sdk/index.d.mts
CHANGED
|
@@ -975,4 +975,4 @@ interface RedeemReferralCodeResult {
|
|
|
975
975
|
reward_id: string;
|
|
976
976
|
}
|
|
977
977
|
|
|
978
|
-
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 CustomerReferral, type DeleteEntityResult, type Entity, type EntityData, EntityDataSchema, type EntityExpandOption, type ErrorResponse, type Feature$1 as 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 };
|
|
978
|
+
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 CustomerReferral, type DeleteEntityResult, type Entity, type EntityData, EntityDataSchema, type EntityExpandOption, type ErrorResponse, type Feature$1 as Feature, FeatureSchema, 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 };
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -975,4 +975,4 @@ interface RedeemReferralCodeResult {
|
|
|
975
975
|
reward_id: string;
|
|
976
976
|
}
|
|
977
977
|
|
|
978
|
-
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 CustomerReferral, type DeleteEntityResult, type Entity, type EntityData, EntityDataSchema, type EntityExpandOption, type ErrorResponse, type Feature$1 as 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 };
|
|
978
|
+
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 CustomerReferral, type DeleteEntityResult, type Entity, type EntityData, EntityDataSchema, type EntityExpandOption, type ErrorResponse, type Feature$1 as Feature, FeatureSchema, 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 };
|
package/dist/sdk/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var v4 = require('zod/v4');
|
|
4
|
+
var zod = require('zod');
|
|
4
5
|
|
|
5
6
|
var __defProp = Object.defineProperty;
|
|
6
7
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -909,6 +910,28 @@ var CheckoutParamsSchema = v4.z.object({
|
|
|
909
910
|
checkout_session_params: v4.z.record(v4.z.string(), v4.z.any()).optional(),
|
|
910
911
|
reward: v4.z.string().optional()
|
|
911
912
|
});
|
|
913
|
+
var FeatureType = /* @__PURE__ */ ((FeatureType2) => {
|
|
914
|
+
FeatureType2["Boolean"] = "boolean";
|
|
915
|
+
FeatureType2["SingleUse"] = "single_use";
|
|
916
|
+
FeatureType2["ContinuousUse"] = "continuous_use";
|
|
917
|
+
FeatureType2["CreditSystem"] = "credit_system";
|
|
918
|
+
return FeatureType2;
|
|
919
|
+
})(FeatureType || {});
|
|
920
|
+
var FeatureSchema = zod.z.object({
|
|
921
|
+
id: zod.z.string(),
|
|
922
|
+
name: zod.z.string().nullish(),
|
|
923
|
+
type: zod.z.nativeEnum(FeatureType),
|
|
924
|
+
display: zod.z.object({
|
|
925
|
+
singular: zod.z.string(),
|
|
926
|
+
plural: zod.z.string()
|
|
927
|
+
}).nullish(),
|
|
928
|
+
credit_schema: zod.z.array(
|
|
929
|
+
zod.z.object({
|
|
930
|
+
metered_feature_id: zod.z.string(),
|
|
931
|
+
credit_cost: zod.z.number()
|
|
932
|
+
})
|
|
933
|
+
).nullish()
|
|
934
|
+
});
|
|
912
935
|
|
|
913
936
|
exports.AppEnv = AppEnv;
|
|
914
937
|
exports.AttachFeatureOptionsSchema = AttachFeatureOptionsSchema;
|
|
@@ -928,6 +951,7 @@ exports.CreateReferralCodeParamsSchema = CreateReferralCodeParamsSchema;
|
|
|
928
951
|
exports.CustomerDataSchema = CustomerDataSchema;
|
|
929
952
|
exports.CustomerExpandEnum = CustomerExpandEnum;
|
|
930
953
|
exports.EntityDataSchema = EntityDataSchema;
|
|
954
|
+
exports.FeatureSchema = FeatureSchema;
|
|
931
955
|
exports.FreeTrialDuration = FreeTrialDuration;
|
|
932
956
|
exports.Infinite = Infinite;
|
|
933
957
|
exports.ProductItemInterval = ProductItemInterval;
|
package/dist/sdk/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod/v4';
|
|
2
|
+
import { z as z$1 } from 'zod';
|
|
2
3
|
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -907,5 +908,27 @@ var CheckoutParamsSchema = z.object({
|
|
|
907
908
|
checkout_session_params: z.record(z.string(), z.any()).optional(),
|
|
908
909
|
reward: z.string().optional()
|
|
909
910
|
});
|
|
911
|
+
var FeatureType = /* @__PURE__ */ ((FeatureType2) => {
|
|
912
|
+
FeatureType2["Boolean"] = "boolean";
|
|
913
|
+
FeatureType2["SingleUse"] = "single_use";
|
|
914
|
+
FeatureType2["ContinuousUse"] = "continuous_use";
|
|
915
|
+
FeatureType2["CreditSystem"] = "credit_system";
|
|
916
|
+
return FeatureType2;
|
|
917
|
+
})(FeatureType || {});
|
|
918
|
+
var FeatureSchema = z$1.object({
|
|
919
|
+
id: z$1.string(),
|
|
920
|
+
name: z$1.string().nullish(),
|
|
921
|
+
type: z$1.nativeEnum(FeatureType),
|
|
922
|
+
display: z$1.object({
|
|
923
|
+
singular: z$1.string(),
|
|
924
|
+
plural: z$1.string()
|
|
925
|
+
}).nullish(),
|
|
926
|
+
credit_schema: z$1.array(
|
|
927
|
+
z$1.object({
|
|
928
|
+
metered_feature_id: z$1.string(),
|
|
929
|
+
credit_cost: z$1.number()
|
|
930
|
+
})
|
|
931
|
+
).nullish()
|
|
932
|
+
});
|
|
910
933
|
|
|
911
|
-
export { AppEnv, AttachFeatureOptionsSchema, AttachParamsSchema, AttachResultSchema, Autumn, AutumnError, BillingPortalParamsSchema, CancelParamsSchema, CancelResultSchema, CheckFeatureResultSchema, CheckParamsSchema, CheckoutParamsSchema, CoreCusFeatureSchema, CreateCustomerParamsSchema, CreateReferralCodeParamsSchema, CustomerDataSchema, CustomerExpandEnum, EntityDataSchema, FreeTrialDuration, Infinite, ProductItemInterval, ProductStatus, QueryParamsSchema, QueryRangeEnum, RedeemReferralCodeParamsSchema, TrackParamsSchema, TrackResultSchema, TransferProductParamsSchema, UpdateBalancesParamsSchema, UsageModel, fetchPricingTable, toContainerResult };
|
|
934
|
+
export { AppEnv, AttachFeatureOptionsSchema, AttachParamsSchema, AttachResultSchema, Autumn, AutumnError, BillingPortalParamsSchema, CancelParamsSchema, CancelResultSchema, CheckFeatureResultSchema, CheckParamsSchema, CheckoutParamsSchema, CoreCusFeatureSchema, CreateCustomerParamsSchema, CreateReferralCodeParamsSchema, CustomerDataSchema, CustomerExpandEnum, EntityDataSchema, FeatureSchema, FreeTrialDuration, Infinite, ProductItemInterval, ProductStatus, QueryParamsSchema, QueryRangeEnum, RedeemReferralCodeParamsSchema, TrackParamsSchema, TrackResultSchema, TransferProductParamsSchema, UpdateBalancesParamsSchema, UsageModel, fetchPricingTable, toContainerResult };
|
|
@@ -928,6 +928,31 @@ var CheckoutParamsSchema = import_v47.z.object({
|
|
|
928
928
|
reward: import_v47.z.string().optional()
|
|
929
929
|
});
|
|
930
930
|
|
|
931
|
+
// src/sdk/features/featureTypes.ts
|
|
932
|
+
var import_zod = require("zod");
|
|
933
|
+
var FeatureType = /* @__PURE__ */ ((FeatureType2) => {
|
|
934
|
+
FeatureType2["Boolean"] = "boolean";
|
|
935
|
+
FeatureType2["SingleUse"] = "single_use";
|
|
936
|
+
FeatureType2["ContinuousUse"] = "continuous_use";
|
|
937
|
+
FeatureType2["CreditSystem"] = "credit_system";
|
|
938
|
+
return FeatureType2;
|
|
939
|
+
})(FeatureType || {});
|
|
940
|
+
var FeatureSchema = import_zod.z.object({
|
|
941
|
+
id: import_zod.z.string(),
|
|
942
|
+
name: import_zod.z.string().nullish(),
|
|
943
|
+
type: import_zod.z.nativeEnum(FeatureType),
|
|
944
|
+
display: import_zod.z.object({
|
|
945
|
+
singular: import_zod.z.string(),
|
|
946
|
+
plural: import_zod.z.string()
|
|
947
|
+
}).nullish(),
|
|
948
|
+
credit_schema: import_zod.z.array(
|
|
949
|
+
import_zod.z.object({
|
|
950
|
+
metered_feature_id: import_zod.z.string(),
|
|
951
|
+
credit_cost: import_zod.z.number()
|
|
952
|
+
})
|
|
953
|
+
).nullish()
|
|
954
|
+
});
|
|
955
|
+
|
|
931
956
|
// src/utils/encryptUtils.tsx
|
|
932
957
|
var getKey = () => {
|
|
933
958
|
if (!process.env.AUTUMN_SECRET_KEY) {
|
|
@@ -860,6 +860,31 @@ var CheckoutParamsSchema = z7.object({
|
|
|
860
860
|
reward: z7.string().optional()
|
|
861
861
|
});
|
|
862
862
|
|
|
863
|
+
// src/sdk/features/featureTypes.ts
|
|
864
|
+
import { z as z8 } from "zod";
|
|
865
|
+
var FeatureType = /* @__PURE__ */ ((FeatureType2) => {
|
|
866
|
+
FeatureType2["Boolean"] = "boolean";
|
|
867
|
+
FeatureType2["SingleUse"] = "single_use";
|
|
868
|
+
FeatureType2["ContinuousUse"] = "continuous_use";
|
|
869
|
+
FeatureType2["CreditSystem"] = "credit_system";
|
|
870
|
+
return FeatureType2;
|
|
871
|
+
})(FeatureType || {});
|
|
872
|
+
var FeatureSchema = z8.object({
|
|
873
|
+
id: z8.string(),
|
|
874
|
+
name: z8.string().nullish(),
|
|
875
|
+
type: z8.nativeEnum(FeatureType),
|
|
876
|
+
display: z8.object({
|
|
877
|
+
singular: z8.string(),
|
|
878
|
+
plural: z8.string()
|
|
879
|
+
}).nullish(),
|
|
880
|
+
credit_schema: z8.array(
|
|
881
|
+
z8.object({
|
|
882
|
+
metered_feature_id: z8.string(),
|
|
883
|
+
credit_cost: z8.number()
|
|
884
|
+
})
|
|
885
|
+
).nullish()
|
|
886
|
+
});
|
|
887
|
+
|
|
863
888
|
// src/utils/encryptUtils.tsx
|
|
864
889
|
var getKey = () => {
|
|
865
890
|
if (!process.env.AUTUMN_SECRET_KEY) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autumn-js",
|
|
3
3
|
"description": "Autumn JS Library",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.24",
|
|
5
5
|
"main": "./dist/sdk/index.js",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"class-variance-authority": "^0.7.1",
|
|
116
116
|
"clsx": "^2.1.1",
|
|
117
117
|
"concurrently": "^9.2.0",
|
|
118
|
-
"convex": "^1.25.
|
|
118
|
+
"convex": "^1.25.4",
|
|
119
119
|
"elysia": "^1.3.5",
|
|
120
120
|
"esbuild-plugin-path-alias": "^1.0.7",
|
|
121
121
|
"esbuild-postcss": "^0.0.4",
|
|
@@ -141,8 +141,9 @@
|
|
|
141
141
|
"typescript": "^5.8.3"
|
|
142
142
|
},
|
|
143
143
|
"peerDependencies": {
|
|
144
|
-
"better-auth": "^1.
|
|
145
|
-
"better-call": "^1.0.12"
|
|
144
|
+
"better-auth": "^1.3.4",
|
|
145
|
+
"better-call": "^1.0.12",
|
|
146
|
+
"convex": "^1.25.4"
|
|
146
147
|
},
|
|
147
148
|
"peerDependenciesMeta": {
|
|
148
149
|
"react": {
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
interface CreateReferralCodeResult {
|
|
2
|
-
code: string;
|
|
3
|
-
customer_id: string;
|
|
4
|
-
created_at: number;
|
|
5
|
-
}
|
|
6
|
-
interface RedeemReferralCodeResult {
|
|
7
|
-
id: string;
|
|
8
|
-
customer_id: string;
|
|
9
|
-
reward_id: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
interface CreateEntityParams {
|
|
13
|
-
id: string;
|
|
14
|
-
name?: string;
|
|
15
|
-
featureId: string;
|
|
16
|
-
}
|
|
17
|
-
interface GetEntityParams {
|
|
18
|
-
expand?: string[];
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export type { CreateEntityParams as C, GetEntityParams as G, RedeemReferralCodeResult as R, CreateReferralCodeResult as a };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
interface CreateReferralCodeResult {
|
|
2
|
-
code: string;
|
|
3
|
-
customer_id: string;
|
|
4
|
-
created_at: number;
|
|
5
|
-
}
|
|
6
|
-
interface RedeemReferralCodeResult {
|
|
7
|
-
id: string;
|
|
8
|
-
customer_id: string;
|
|
9
|
-
reward_id: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
interface CreateEntityParams {
|
|
13
|
-
id: string;
|
|
14
|
-
name?: string;
|
|
15
|
-
featureId: string;
|
|
16
|
-
}
|
|
17
|
-
interface GetEntityParams {
|
|
18
|
-
expand?: string[];
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export type { CreateEntityParams as C, GetEntityParams as G, RedeemReferralCodeResult as R, CreateReferralCodeResult as a };
|