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
|
@@ -179,6 +179,7 @@ var entityMethods = (instance) => {
|
|
|
179
179
|
params
|
|
180
180
|
}),
|
|
181
181
|
create: (customer_id, params) => staticWrapper(createEntity, instance, { customer_id, params }),
|
|
182
|
+
transfer: (customer_id, params) => staticWrapper(transferProduct, instance, { customer_id, params }),
|
|
182
183
|
delete: (customer_id, entity_id) => staticWrapper(deleteEntity, instance, { customer_id, entity_id })
|
|
183
184
|
};
|
|
184
185
|
};
|
|
@@ -214,6 +215,13 @@ var deleteEntity = async ({
|
|
|
214
215
|
}) => {
|
|
215
216
|
return instance.delete(`/customers/${customer_id}/entities/${entity_id}`);
|
|
216
217
|
};
|
|
218
|
+
var transferProduct = async ({
|
|
219
|
+
instance,
|
|
220
|
+
customer_id,
|
|
221
|
+
params
|
|
222
|
+
}) => {
|
|
223
|
+
return instance.post(`/customers/${customer_id}/transfer`, params);
|
|
224
|
+
};
|
|
217
225
|
|
|
218
226
|
// src/sdk/products/prodMethods.ts
|
|
219
227
|
var productMethods = (instance) => {
|
|
@@ -520,6 +528,10 @@ var CoreCusFeatureSchema = import_zod2.z.object({
|
|
|
520
528
|
next_reset_at: import_zod2.z.number().nullish(),
|
|
521
529
|
overage_allowed: import_zod2.z.boolean().optional(),
|
|
522
530
|
usage_limit: import_zod2.z.number().optional(),
|
|
531
|
+
rollovers: import_zod2.z.object({
|
|
532
|
+
balance: import_zod2.z.number(),
|
|
533
|
+
expires_at: import_zod2.z.number()
|
|
534
|
+
}).optional(),
|
|
523
535
|
breakdown: import_zod2.z.array(
|
|
524
536
|
import_zod2.z.object({
|
|
525
537
|
interval: import_zod2.z.nativeEnum(ProductItemInterval),
|
|
@@ -569,6 +581,11 @@ var EntityDataSchema = import_zod4.z.object({
|
|
|
569
581
|
name: import_zod4.z.string().optional(),
|
|
570
582
|
feature_id: import_zod4.z.string()
|
|
571
583
|
});
|
|
584
|
+
var TransferProductParamsSchema = import_zod4.z.object({
|
|
585
|
+
from_entity_id: import_zod4.z.string(),
|
|
586
|
+
to_entity_id: import_zod4.z.string(),
|
|
587
|
+
product_id: import_zod4.z.string()
|
|
588
|
+
});
|
|
572
589
|
|
|
573
590
|
// src/sdk/general/genTypes.ts
|
|
574
591
|
var import_zod5 = require("zod");
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import { A as AutumnClient } from './ReactAutumnClient-
|
|
2
|
+
import { A as AutumnClient } from './ReactAutumnClient-BK3wjb-u.mjs';
|
|
3
3
|
import './client/types/clientEntTypes.mjs';
|
|
4
4
|
import './client/types/clientGenTypes.mjs';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import './error-DHbclCVh.mjs';
|
|
7
|
-
import './genTypes-
|
|
8
|
-
import './prodTypes-
|
|
9
|
-
import './attachTypes-
|
|
10
|
-
import './entTypes-
|
|
11
|
-
import './cusTypes-
|
|
7
|
+
import './genTypes-BIPS92_Q.mjs';
|
|
8
|
+
import './prodTypes-DuLXGCiA.mjs';
|
|
9
|
+
import './attachTypes-DKmoXHQO.mjs';
|
|
10
|
+
import './entTypes-BDZUfZE_.mjs';
|
|
11
|
+
import './cusTypes-Dlt0fQmq.mjs';
|
|
12
12
|
|
|
13
13
|
interface AutumnDialogContext {
|
|
14
14
|
props: any;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import { A as AutumnClient } from './ReactAutumnClient-
|
|
2
|
+
import { A as AutumnClient } from './ReactAutumnClient-Bh0Sgw6f.js';
|
|
3
3
|
import './client/types/clientEntTypes.js';
|
|
4
4
|
import './client/types/clientGenTypes.js';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import './error-DHbclCVh.js';
|
|
7
|
-
import './genTypes-
|
|
8
|
-
import './prodTypes-
|
|
9
|
-
import './attachTypes-
|
|
10
|
-
import './entTypes-
|
|
11
|
-
import './cusTypes-
|
|
7
|
+
import './genTypes-Rn-oq2sc.js';
|
|
8
|
+
import './prodTypes-DuLXGCiA.js';
|
|
9
|
+
import './attachTypes-Cy6WgUas.js';
|
|
10
|
+
import './entTypes-B_DvaeRL.js';
|
|
11
|
+
import './cusTypes-eNmWJ2rC.js';
|
|
12
12
|
|
|
13
13
|
interface AutumnDialogContext {
|
|
14
14
|
props: any;
|
|
@@ -198,6 +198,7 @@ var entityMethods = (instance) => {
|
|
|
198
198
|
params
|
|
199
199
|
}),
|
|
200
200
|
create: (customer_id, params) => staticWrapper(createEntity, instance, { customer_id, params }),
|
|
201
|
+
transfer: (customer_id, params) => staticWrapper(transferProduct, instance, { customer_id, params }),
|
|
201
202
|
delete: (customer_id, entity_id) => staticWrapper(deleteEntity, instance, { customer_id, entity_id })
|
|
202
203
|
};
|
|
203
204
|
};
|
|
@@ -233,6 +234,13 @@ var deleteEntity = async ({
|
|
|
233
234
|
}) => {
|
|
234
235
|
return instance.delete(`/customers/${customer_id}/entities/${entity_id}`);
|
|
235
236
|
};
|
|
237
|
+
var transferProduct = async ({
|
|
238
|
+
instance,
|
|
239
|
+
customer_id,
|
|
240
|
+
params
|
|
241
|
+
}) => {
|
|
242
|
+
return instance.post(`/customers/${customer_id}/transfer`, params);
|
|
243
|
+
};
|
|
236
244
|
|
|
237
245
|
// src/sdk/products/prodMethods.ts
|
|
238
246
|
var productMethods = (instance) => {
|
|
@@ -539,6 +547,10 @@ var CoreCusFeatureSchema = import_zod2.z.object({
|
|
|
539
547
|
next_reset_at: import_zod2.z.number().nullish(),
|
|
540
548
|
overage_allowed: import_zod2.z.boolean().optional(),
|
|
541
549
|
usage_limit: import_zod2.z.number().optional(),
|
|
550
|
+
rollovers: import_zod2.z.object({
|
|
551
|
+
balance: import_zod2.z.number(),
|
|
552
|
+
expires_at: import_zod2.z.number()
|
|
553
|
+
}).optional(),
|
|
542
554
|
breakdown: import_zod2.z.array(
|
|
543
555
|
import_zod2.z.object({
|
|
544
556
|
interval: import_zod2.z.nativeEnum(ProductItemInterval),
|
|
@@ -588,6 +600,11 @@ var EntityDataSchema = import_zod4.z.object({
|
|
|
588
600
|
name: import_zod4.z.string().optional(),
|
|
589
601
|
feature_id: import_zod4.z.string()
|
|
590
602
|
});
|
|
603
|
+
var TransferProductParamsSchema = import_zod4.z.object({
|
|
604
|
+
from_entity_id: import_zod4.z.string(),
|
|
605
|
+
to_entity_id: import_zod4.z.string(),
|
|
606
|
+
product_id: import_zod4.z.string()
|
|
607
|
+
});
|
|
591
608
|
|
|
592
609
|
// src/sdk/general/genTypes.ts
|
|
593
610
|
var import_zod5 = require("zod");
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
import {
|
|
4
4
|
AutumnContext,
|
|
5
5
|
useAutumnContext
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-HRD7CMV2.mjs";
|
|
10
|
-
import "./chunk-JVCOY7ZL.mjs";
|
|
6
|
+
} from "./chunk-H4J73SMR.mjs";
|
|
7
|
+
import "./chunk-LMQMA7VL.mjs";
|
|
8
|
+
import "./chunk-CZBWEEWD.mjs";
|
|
11
9
|
import "./chunk-V575SGOW.mjs";
|
|
12
10
|
import "./chunk-ZV4RPZTM.mjs";
|
|
11
|
+
import "./chunk-JVCOY7ZL.mjs";
|
|
12
|
+
import "./chunk-CIBQ4BJU.mjs";
|
|
13
13
|
import "./chunk-VTGR7VVK.mjs";
|
|
14
14
|
import "./chunk-WFFVOEUG.mjs";
|
|
15
15
|
import "./chunk-ZF2HUCN6.mjs";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { A as AutumnClient } from './ReactAutumnClient-
|
|
3
|
+
import { A as AutumnClient } from './ReactAutumnClient-BK3wjb-u.mjs';
|
|
4
4
|
import './client/types/clientEntTypes.mjs';
|
|
5
5
|
import './client/types/clientGenTypes.mjs';
|
|
6
6
|
import 'zod';
|
|
7
7
|
import './error-DHbclCVh.mjs';
|
|
8
|
-
import './genTypes-
|
|
9
|
-
import './prodTypes-
|
|
10
|
-
import './attachTypes-
|
|
11
|
-
import './entTypes-
|
|
12
|
-
import './cusTypes-
|
|
8
|
+
import './genTypes-BIPS92_Q.mjs';
|
|
9
|
+
import './prodTypes-DuLXGCiA.mjs';
|
|
10
|
+
import './attachTypes-DKmoXHQO.mjs';
|
|
11
|
+
import './entTypes-BDZUfZE_.mjs';
|
|
12
|
+
import './cusTypes-Dlt0fQmq.mjs';
|
|
13
13
|
|
|
14
14
|
declare function BaseAutumnProvider({ client, children, AutumnContext, }: {
|
|
15
15
|
client: AutumnClient;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { A as AutumnClient } from './ReactAutumnClient-
|
|
3
|
+
import { A as AutumnClient } from './ReactAutumnClient-Bh0Sgw6f.js';
|
|
4
4
|
import './client/types/clientEntTypes.js';
|
|
5
5
|
import './client/types/clientGenTypes.js';
|
|
6
6
|
import 'zod';
|
|
7
7
|
import './error-DHbclCVh.js';
|
|
8
|
-
import './genTypes-
|
|
9
|
-
import './prodTypes-
|
|
10
|
-
import './attachTypes-
|
|
11
|
-
import './entTypes-
|
|
12
|
-
import './cusTypes-
|
|
8
|
+
import './genTypes-Rn-oq2sc.js';
|
|
9
|
+
import './prodTypes-DuLXGCiA.js';
|
|
10
|
+
import './attachTypes-Cy6WgUas.js';
|
|
11
|
+
import './entTypes-B_DvaeRL.js';
|
|
12
|
+
import './cusTypes-eNmWJ2rC.js';
|
|
13
13
|
|
|
14
14
|
declare function BaseAutumnProvider({ client, children, AutumnContext, }: {
|
|
15
15
|
client: AutumnClient;
|
|
@@ -229,6 +229,7 @@ var entityMethods = (instance) => {
|
|
|
229
229
|
params
|
|
230
230
|
}),
|
|
231
231
|
create: (customer_id, params) => staticWrapper(createEntity, instance, { customer_id, params }),
|
|
232
|
+
transfer: (customer_id, params) => staticWrapper(transferProduct, instance, { customer_id, params }),
|
|
232
233
|
delete: (customer_id, entity_id) => staticWrapper(deleteEntity, instance, { customer_id, entity_id })
|
|
233
234
|
};
|
|
234
235
|
};
|
|
@@ -264,6 +265,13 @@ var deleteEntity = async ({
|
|
|
264
265
|
}) => {
|
|
265
266
|
return instance.delete(`/customers/${customer_id}/entities/${entity_id}`);
|
|
266
267
|
};
|
|
268
|
+
var transferProduct = async ({
|
|
269
|
+
instance,
|
|
270
|
+
customer_id,
|
|
271
|
+
params
|
|
272
|
+
}) => {
|
|
273
|
+
return instance.post(`/customers/${customer_id}/transfer`, params);
|
|
274
|
+
};
|
|
267
275
|
|
|
268
276
|
// src/sdk/products/prodMethods.ts
|
|
269
277
|
var productMethods = (instance) => {
|
|
@@ -570,6 +578,10 @@ var CoreCusFeatureSchema = import_zod2.z.object({
|
|
|
570
578
|
next_reset_at: import_zod2.z.number().nullish(),
|
|
571
579
|
overage_allowed: import_zod2.z.boolean().optional(),
|
|
572
580
|
usage_limit: import_zod2.z.number().optional(),
|
|
581
|
+
rollovers: import_zod2.z.object({
|
|
582
|
+
balance: import_zod2.z.number(),
|
|
583
|
+
expires_at: import_zod2.z.number()
|
|
584
|
+
}).optional(),
|
|
573
585
|
breakdown: import_zod2.z.array(
|
|
574
586
|
import_zod2.z.object({
|
|
575
587
|
interval: import_zod2.z.nativeEnum(ProductItemInterval),
|
|
@@ -619,6 +631,11 @@ var EntityDataSchema = import_zod4.z.object({
|
|
|
619
631
|
name: import_zod4.z.string().optional(),
|
|
620
632
|
feature_id: import_zod4.z.string()
|
|
621
633
|
});
|
|
634
|
+
var TransferProductParamsSchema = import_zod4.z.object({
|
|
635
|
+
from_entity_id: import_zod4.z.string(),
|
|
636
|
+
to_entity_id: import_zod4.z.string(),
|
|
637
|
+
product_id: import_zod4.z.string()
|
|
638
|
+
});
|
|
622
639
|
|
|
623
640
|
// src/sdk/general/genTypes.ts
|
|
624
641
|
var import_zod5 = require("zod");
|
|
@@ -1585,7 +1602,8 @@ var useCustomerBase = ({
|
|
|
1585
1602
|
mutate
|
|
1586
1603
|
} = (0, import_swr2.default)(queryKey, fetchCustomer, {
|
|
1587
1604
|
fallbackData: null,
|
|
1588
|
-
|
|
1605
|
+
// Default to 5 minutes
|
|
1606
|
+
swrConfig: { refreshInterval: 1e3 * 60 * 5, ...params?.swrConfig }
|
|
1589
1607
|
});
|
|
1590
1608
|
const autumnFunctions = useAutumnBase({
|
|
1591
1609
|
context,
|
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
import {
|
|
5
5
|
BaseAutumnProvider
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TM3NBNVM.mjs";
|
|
7
7
|
import "./chunk-RFSQBGLO.mjs";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-HRD7CMV2.mjs";
|
|
16
|
-
import "./chunk-JVCOY7ZL.mjs";
|
|
8
|
+
import "./chunk-53HYUF2F.mjs";
|
|
9
|
+
import "./chunk-LFLX6NJU.mjs";
|
|
10
|
+
import "./chunk-UAK4XMNC.mjs";
|
|
11
|
+
import "./chunk-UCUAGLCJ.mjs";
|
|
12
|
+
import "./chunk-H4J73SMR.mjs";
|
|
13
|
+
import "./chunk-LMQMA7VL.mjs";
|
|
14
|
+
import "./chunk-CZBWEEWD.mjs";
|
|
17
15
|
import "./chunk-V575SGOW.mjs";
|
|
18
16
|
import "./chunk-ZV4RPZTM.mjs";
|
|
17
|
+
import "./chunk-JVCOY7ZL.mjs";
|
|
18
|
+
import "./chunk-CIBQ4BJU.mjs";
|
|
19
19
|
import "./chunk-VTGR7VVK.mjs";
|
|
20
20
|
import "./chunk-WFFVOEUG.mjs";
|
|
21
21
|
import "./chunk-ZF2HUCN6.mjs";
|
package/dist/libraries/react/{ReactAutumnClient-Deg9KIoK.d.mts → ReactAutumnClient-BK3wjb-u.d.mts}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { CreateEntityParams, GetEntityParams } from './client/types/clientEntTypes.mjs';
|
|
2
2
|
import { OpenBillingPortalParams, SetupPaymentParams } from './client/types/clientGenTypes.mjs';
|
|
3
3
|
import { A as AutumnError } from './error-DHbclCVh.mjs';
|
|
4
|
-
import { a as CheckResult, S as SetupPaymentResult, Q as QueryResult } from './genTypes-
|
|
5
|
-
import { C as CheckoutResult } from './attachTypes-
|
|
6
|
-
import { R as Result, A as AutumnPromise, E as Entity, D as DeleteEntityResult } from './entTypes-
|
|
7
|
-
import {
|
|
8
|
-
import { C as CustomerData, a as CreateCustomerParams, b as Customer, B as BillingPortalResult } from './cusTypes-
|
|
4
|
+
import { a as CheckResult, S as SetupPaymentResult, Q as QueryResult } from './genTypes-BIPS92_Q.mjs';
|
|
5
|
+
import { C as CheckoutResult } from './attachTypes-DKmoXHQO.mjs';
|
|
6
|
+
import { R as Result, A as AutumnPromise, E as Entity, D as DeleteEntityResult } from './entTypes-BDZUfZE_.mjs';
|
|
7
|
+
import { a as ProductItem, e as ProductScenario, P as Product } from './prodTypes-DuLXGCiA.mjs';
|
|
8
|
+
import { C as CustomerData, a as CreateCustomerParams, b as Customer, B as BillingPortalResult } from './cusTypes-Dlt0fQmq.mjs';
|
|
9
9
|
|
|
10
10
|
interface PricingTableProduct {
|
|
11
11
|
id: string;
|
|
@@ -81,41 +81,41 @@ declare class AutumnClient {
|
|
|
81
81
|
}, AutumnError>>;
|
|
82
82
|
attach: (params: {
|
|
83
83
|
options?: {
|
|
84
|
-
quantity: number;
|
|
85
84
|
featureId: string;
|
|
85
|
+
quantity: number;
|
|
86
86
|
}[] | undefined;
|
|
87
87
|
metadata?: Record<string, string> | undefined;
|
|
88
|
-
reward?: string | undefined;
|
|
89
88
|
productId?: string | undefined;
|
|
90
89
|
entityId?: string | undefined;
|
|
91
|
-
dialog?: any;
|
|
92
|
-
entityData?: any;
|
|
93
90
|
productIds?: string[] | undefined;
|
|
94
91
|
freeTrial?: boolean | undefined;
|
|
95
92
|
successUrl?: string | undefined;
|
|
96
93
|
forceCheckout?: boolean | undefined;
|
|
94
|
+
dialog?: any;
|
|
95
|
+
entityData?: any;
|
|
97
96
|
openInNewTab?: boolean | undefined;
|
|
97
|
+
reward?: string | undefined;
|
|
98
98
|
checkoutSessionParams?: Record<string, any> | undefined;
|
|
99
99
|
}) => AutumnPromise<{
|
|
100
100
|
customer_id: string;
|
|
101
101
|
code: string;
|
|
102
102
|
message: string;
|
|
103
103
|
product_ids: string[];
|
|
104
|
-
customer_data?: any;
|
|
105
104
|
checkout_url?: string | undefined;
|
|
105
|
+
customer_data?: any;
|
|
106
106
|
}>;
|
|
107
107
|
checkout: (params: {
|
|
108
108
|
productId: string;
|
|
109
109
|
options?: {
|
|
110
|
-
quantity: number;
|
|
111
110
|
featureId: string;
|
|
111
|
+
quantity: number;
|
|
112
112
|
}[] | undefined;
|
|
113
|
-
reward?: string | undefined;
|
|
114
113
|
entityId?: string | undefined;
|
|
114
|
+
successUrl?: string | undefined;
|
|
115
115
|
dialog?: any;
|
|
116
116
|
entityData?: any;
|
|
117
|
-
successUrl?: string | undefined;
|
|
118
117
|
openInNewTab?: boolean | undefined;
|
|
118
|
+
reward?: string | undefined;
|
|
119
119
|
checkoutSessionParams?: Record<string, any> | undefined;
|
|
120
120
|
}) => AutumnPromise<CheckoutResult>;
|
|
121
121
|
cancel: (params: {
|
|
@@ -124,18 +124,18 @@ declare class AutumnClient {
|
|
|
124
124
|
cancelImmediately?: boolean | undefined;
|
|
125
125
|
}) => AutumnPromise<{
|
|
126
126
|
customer_id: string;
|
|
127
|
-
product_id: string;
|
|
128
127
|
success: boolean;
|
|
128
|
+
product_id: string;
|
|
129
129
|
}>;
|
|
130
130
|
check: (params: {
|
|
131
131
|
productId?: string | undefined;
|
|
132
132
|
entityId?: string | undefined;
|
|
133
133
|
featureId?: string | undefined;
|
|
134
|
+
dialog?: any;
|
|
135
|
+
entityData?: any;
|
|
134
136
|
requiredBalance?: number | undefined;
|
|
135
137
|
sendEvent?: boolean | undefined;
|
|
136
138
|
withPreview?: boolean | undefined;
|
|
137
|
-
dialog?: any;
|
|
138
|
-
entityData?: any;
|
|
139
139
|
}) => AutumnPromise<CheckResult>;
|
|
140
140
|
track: (params: {
|
|
141
141
|
value?: number | undefined;
|
|
@@ -145,9 +145,9 @@ declare class AutumnClient {
|
|
|
145
145
|
eventName?: string | undefined;
|
|
146
146
|
idempotencyKey?: string | undefined;
|
|
147
147
|
}) => AutumnPromise<{
|
|
148
|
+
id: string;
|
|
148
149
|
customer_id: string;
|
|
149
150
|
code: string;
|
|
150
|
-
id: string;
|
|
151
151
|
feature_id?: string | undefined;
|
|
152
152
|
event_name?: string | undefined;
|
|
153
153
|
}>;
|
package/dist/libraries/react/{ReactAutumnClient-DWq3CtTo.d.ts → ReactAutumnClient-Bh0Sgw6f.d.ts}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { CreateEntityParams, GetEntityParams } from './client/types/clientEntTypes.js';
|
|
2
2
|
import { OpenBillingPortalParams, SetupPaymentParams } from './client/types/clientGenTypes.js';
|
|
3
3
|
import { A as AutumnError } from './error-DHbclCVh.js';
|
|
4
|
-
import { a as CheckResult, S as SetupPaymentResult, Q as QueryResult } from './genTypes-
|
|
5
|
-
import { C as CheckoutResult } from './attachTypes-
|
|
6
|
-
import { R as Result, A as AutumnPromise, E as Entity, D as DeleteEntityResult } from './entTypes-
|
|
7
|
-
import {
|
|
8
|
-
import { C as CustomerData, a as CreateCustomerParams, b as Customer, B as BillingPortalResult } from './cusTypes-
|
|
4
|
+
import { a as CheckResult, S as SetupPaymentResult, Q as QueryResult } from './genTypes-Rn-oq2sc.js';
|
|
5
|
+
import { C as CheckoutResult } from './attachTypes-Cy6WgUas.js';
|
|
6
|
+
import { R as Result, A as AutumnPromise, E as Entity, D as DeleteEntityResult } from './entTypes-B_DvaeRL.js';
|
|
7
|
+
import { a as ProductItem, e as ProductScenario, P as Product } from './prodTypes-DuLXGCiA.js';
|
|
8
|
+
import { C as CustomerData, a as CreateCustomerParams, b as Customer, B as BillingPortalResult } from './cusTypes-eNmWJ2rC.js';
|
|
9
9
|
|
|
10
10
|
interface PricingTableProduct {
|
|
11
11
|
id: string;
|
|
@@ -81,41 +81,41 @@ declare class AutumnClient {
|
|
|
81
81
|
}, AutumnError>>;
|
|
82
82
|
attach: (params: {
|
|
83
83
|
options?: {
|
|
84
|
-
quantity: number;
|
|
85
84
|
featureId: string;
|
|
85
|
+
quantity: number;
|
|
86
86
|
}[] | undefined;
|
|
87
87
|
metadata?: Record<string, string> | undefined;
|
|
88
|
-
reward?: string | undefined;
|
|
89
88
|
productId?: string | undefined;
|
|
90
89
|
entityId?: string | undefined;
|
|
91
|
-
dialog?: any;
|
|
92
|
-
entityData?: any;
|
|
93
90
|
productIds?: string[] | undefined;
|
|
94
91
|
freeTrial?: boolean | undefined;
|
|
95
92
|
successUrl?: string | undefined;
|
|
96
93
|
forceCheckout?: boolean | undefined;
|
|
94
|
+
dialog?: any;
|
|
95
|
+
entityData?: any;
|
|
97
96
|
openInNewTab?: boolean | undefined;
|
|
97
|
+
reward?: string | undefined;
|
|
98
98
|
checkoutSessionParams?: Record<string, any> | undefined;
|
|
99
99
|
}) => AutumnPromise<{
|
|
100
100
|
customer_id: string;
|
|
101
101
|
code: string;
|
|
102
102
|
message: string;
|
|
103
103
|
product_ids: string[];
|
|
104
|
-
customer_data?: any;
|
|
105
104
|
checkout_url?: string | undefined;
|
|
105
|
+
customer_data?: any;
|
|
106
106
|
}>;
|
|
107
107
|
checkout: (params: {
|
|
108
108
|
productId: string;
|
|
109
109
|
options?: {
|
|
110
|
-
quantity: number;
|
|
111
110
|
featureId: string;
|
|
111
|
+
quantity: number;
|
|
112
112
|
}[] | undefined;
|
|
113
|
-
reward?: string | undefined;
|
|
114
113
|
entityId?: string | undefined;
|
|
114
|
+
successUrl?: string | undefined;
|
|
115
115
|
dialog?: any;
|
|
116
116
|
entityData?: any;
|
|
117
|
-
successUrl?: string | undefined;
|
|
118
117
|
openInNewTab?: boolean | undefined;
|
|
118
|
+
reward?: string | undefined;
|
|
119
119
|
checkoutSessionParams?: Record<string, any> | undefined;
|
|
120
120
|
}) => AutumnPromise<CheckoutResult>;
|
|
121
121
|
cancel: (params: {
|
|
@@ -124,18 +124,18 @@ declare class AutumnClient {
|
|
|
124
124
|
cancelImmediately?: boolean | undefined;
|
|
125
125
|
}) => AutumnPromise<{
|
|
126
126
|
customer_id: string;
|
|
127
|
-
product_id: string;
|
|
128
127
|
success: boolean;
|
|
128
|
+
product_id: string;
|
|
129
129
|
}>;
|
|
130
130
|
check: (params: {
|
|
131
131
|
productId?: string | undefined;
|
|
132
132
|
entityId?: string | undefined;
|
|
133
133
|
featureId?: string | undefined;
|
|
134
|
+
dialog?: any;
|
|
135
|
+
entityData?: any;
|
|
134
136
|
requiredBalance?: number | undefined;
|
|
135
137
|
sendEvent?: boolean | undefined;
|
|
136
138
|
withPreview?: boolean | undefined;
|
|
137
|
-
dialog?: any;
|
|
138
|
-
entityData?: any;
|
|
139
139
|
}) => AutumnPromise<CheckResult>;
|
|
140
140
|
track: (params: {
|
|
141
141
|
value?: number | undefined;
|
|
@@ -145,9 +145,9 @@ declare class AutumnClient {
|
|
|
145
145
|
eventName?: string | undefined;
|
|
146
146
|
idempotencyKey?: string | undefined;
|
|
147
147
|
}) => AutumnPromise<{
|
|
148
|
+
id: string;
|
|
148
149
|
customer_id: string;
|
|
149
150
|
code: string;
|
|
150
|
-
id: string;
|
|
151
151
|
feature_id?: string | undefined;
|
|
152
152
|
event_name?: string | undefined;
|
|
153
153
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { C as CustomerData } from './cusTypes-
|
|
3
|
-
import './prodTypes-
|
|
2
|
+
import { C as CustomerData } from './cusTypes-Dlt0fQmq.mjs';
|
|
3
|
+
import './prodTypes-DuLXGCiA.mjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
6
6
|
declare const ReactAutumnProvider: ({ children, getBearerToken, backendUrl, customerData, includeCredentials, betterAuthUrl, }: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { C as CustomerData } from './cusTypes-
|
|
3
|
-
import './prodTypes-
|
|
2
|
+
import { C as CustomerData } from './cusTypes-eNmWJ2rC.js';
|
|
3
|
+
import './prodTypes-DuLXGCiA.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
6
6
|
declare const ReactAutumnProvider: ({ children, getBearerToken, backendUrl, customerData, includeCredentials, betterAuthUrl, }: {
|
|
@@ -230,6 +230,7 @@ var entityMethods = (instance) => {
|
|
|
230
230
|
params
|
|
231
231
|
}),
|
|
232
232
|
create: (customer_id, params) => staticWrapper(createEntity, instance, { customer_id, params }),
|
|
233
|
+
transfer: (customer_id, params) => staticWrapper(transferProduct, instance, { customer_id, params }),
|
|
233
234
|
delete: (customer_id, entity_id) => staticWrapper(deleteEntity, instance, { customer_id, entity_id })
|
|
234
235
|
};
|
|
235
236
|
};
|
|
@@ -265,6 +266,13 @@ var deleteEntity = async ({
|
|
|
265
266
|
}) => {
|
|
266
267
|
return instance.delete(`/customers/${customer_id}/entities/${entity_id}`);
|
|
267
268
|
};
|
|
269
|
+
var transferProduct = async ({
|
|
270
|
+
instance,
|
|
271
|
+
customer_id,
|
|
272
|
+
params
|
|
273
|
+
}) => {
|
|
274
|
+
return instance.post(`/customers/${customer_id}/transfer`, params);
|
|
275
|
+
};
|
|
268
276
|
|
|
269
277
|
// src/sdk/products/prodMethods.ts
|
|
270
278
|
var productMethods = (instance) => {
|
|
@@ -571,6 +579,10 @@ var CoreCusFeatureSchema = import_zod2.z.object({
|
|
|
571
579
|
next_reset_at: import_zod2.z.number().nullish(),
|
|
572
580
|
overage_allowed: import_zod2.z.boolean().optional(),
|
|
573
581
|
usage_limit: import_zod2.z.number().optional(),
|
|
582
|
+
rollovers: import_zod2.z.object({
|
|
583
|
+
balance: import_zod2.z.number(),
|
|
584
|
+
expires_at: import_zod2.z.number()
|
|
585
|
+
}).optional(),
|
|
574
586
|
breakdown: import_zod2.z.array(
|
|
575
587
|
import_zod2.z.object({
|
|
576
588
|
interval: import_zod2.z.nativeEnum(ProductItemInterval),
|
|
@@ -620,6 +632,11 @@ var EntityDataSchema = import_zod4.z.object({
|
|
|
620
632
|
name: import_zod4.z.string().optional(),
|
|
621
633
|
feature_id: import_zod4.z.string()
|
|
622
634
|
});
|
|
635
|
+
var TransferProductParamsSchema = import_zod4.z.object({
|
|
636
|
+
from_entity_id: import_zod4.z.string(),
|
|
637
|
+
to_entity_id: import_zod4.z.string(),
|
|
638
|
+
product_id: import_zod4.z.string()
|
|
639
|
+
});
|
|
623
640
|
|
|
624
641
|
// src/sdk/general/genTypes.ts
|
|
625
642
|
var import_zod5 = require("zod");
|
|
@@ -1586,7 +1603,8 @@ var useCustomerBase = ({
|
|
|
1586
1603
|
mutate
|
|
1587
1604
|
} = (0, import_swr2.default)(queryKey, fetchCustomer, {
|
|
1588
1605
|
fallbackData: null,
|
|
1589
|
-
|
|
1606
|
+
// Default to 5 minutes
|
|
1607
|
+
swrConfig: { refreshInterval: 1e3 * 60 * 5, ...params?.swrConfig }
|
|
1590
1608
|
});
|
|
1591
1609
|
const autumnFunctions = useAutumnBase({
|
|
1592
1610
|
context,
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
ReactAutumnProvider
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-4NCB2TMQ.mjs";
|
|
6
|
+
import "./chunk-TM3NBNVM.mjs";
|
|
7
7
|
import "./chunk-RFSQBGLO.mjs";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-HRD7CMV2.mjs";
|
|
16
|
-
import "./chunk-JVCOY7ZL.mjs";
|
|
8
|
+
import "./chunk-53HYUF2F.mjs";
|
|
9
|
+
import "./chunk-LFLX6NJU.mjs";
|
|
10
|
+
import "./chunk-UAK4XMNC.mjs";
|
|
11
|
+
import "./chunk-UCUAGLCJ.mjs";
|
|
12
|
+
import "./chunk-H4J73SMR.mjs";
|
|
13
|
+
import "./chunk-LMQMA7VL.mjs";
|
|
14
|
+
import "./chunk-CZBWEEWD.mjs";
|
|
17
15
|
import "./chunk-V575SGOW.mjs";
|
|
18
16
|
import "./chunk-ZV4RPZTM.mjs";
|
|
17
|
+
import "./chunk-JVCOY7ZL.mjs";
|
|
18
|
+
import "./chunk-CIBQ4BJU.mjs";
|
|
19
19
|
import "./chunk-VTGR7VVK.mjs";
|
|
20
20
|
import "./chunk-WFFVOEUG.mjs";
|
|
21
21
|
import "./chunk-ZF2HUCN6.mjs";
|
package/dist/{next/client/attachTypes-D1J8GKaX.d.ts → libraries/react/attachTypes-Cy6WgUas.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as ProductItem, P as Product } from './prodTypes-DuLXGCiA.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
declare const AttachFeatureOptionsSchema: z.ZodObject<{
|
|
@@ -20,16 +20,16 @@ declare const AttachResultSchema: z.ZodObject<{
|
|
|
20
20
|
message: z.ZodString;
|
|
21
21
|
customer_data: z.ZodOptional<z.ZodAny>;
|
|
22
22
|
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
customer_id: string;
|
|
23
24
|
code: string;
|
|
24
25
|
message: string;
|
|
25
|
-
customer_id: string;
|
|
26
26
|
product_ids: string[];
|
|
27
27
|
checkout_url?: string | undefined;
|
|
28
28
|
customer_data?: any;
|
|
29
29
|
}, {
|
|
30
|
+
customer_id: string;
|
|
30
31
|
code: string;
|
|
31
32
|
message: string;
|
|
32
|
-
customer_id: string;
|
|
33
33
|
product_ids: string[];
|
|
34
34
|
checkout_url?: string | undefined;
|
|
35
35
|
customer_data?: any;
|