autumn-js 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/libraries/backend/better-auth.d.mts +6 -46
- package/dist/libraries/backend/better-auth.d.ts +6 -46
- package/dist/libraries/backend/better-auth.js +43 -13
- package/dist/libraries/backend/better-auth.mjs +23 -21
- package/dist/libraries/backend/{chunk-NTPYEOME.mjs → chunk-33ET4N4V.mjs} +1 -1
- package/dist/libraries/backend/{chunk-2LSEWYPD.mjs → chunk-3OVRYTZX.mjs} +6 -6
- package/dist/libraries/backend/{chunk-TTNUEXHB.mjs → chunk-AREWK25J.mjs} +28 -0
- package/dist/libraries/backend/{chunk-WBYCMG34.mjs → chunk-GO7TVFSN.mjs} +1 -1
- package/dist/libraries/backend/{chunk-7Z2OYXN4.mjs → chunk-LL53FE2Z.mjs} +1 -1
- package/dist/libraries/backend/{chunk-Y63QWBQ6.mjs → chunk-TFYLV3GN.mjs} +1 -1
- package/dist/libraries/backend/{chunk-QVLMREDB.mjs → chunk-VBHBF3GP.mjs} +1 -1
- package/dist/libraries/backend/convex.js +28 -0
- package/dist/libraries/backend/convex.mjs +7 -7
- package/dist/libraries/backend/elysia.js +28 -0
- package/dist/libraries/backend/elysia.mjs +7 -7
- package/dist/libraries/backend/express.d.mts +1 -1
- package/dist/libraries/backend/express.d.ts +1 -1
- package/dist/libraries/backend/express.js +28 -0
- package/dist/libraries/backend/express.mjs +7 -7
- package/dist/libraries/backend/fastify.js +28 -0
- package/dist/libraries/backend/fastify.mjs +7 -7
- package/dist/libraries/backend/hono.js +28 -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 +28 -0
- package/dist/libraries/backend/index.mjs +7 -7
- package/dist/libraries/backend/next.js +28 -0
- package/dist/libraries/backend/next.mjs +7 -7
- package/dist/libraries/backend/react-router.js +28 -0
- package/dist/libraries/backend/react-router.mjs +7 -7
- package/dist/libraries/backend/{referralTypes-BfrNJ62q.d.mts → referralTypes-B50JL4PY.d.mts} +69 -2
- package/dist/libraries/backend/{referralTypes-Djyi4iGt.d.ts → referralTypes-dW2HaxKV.d.ts} +69 -2
- package/dist/libraries/backend/remix_dep.js +28 -0
- package/dist/libraries/backend/remix_dep.mjs +7 -7
- package/dist/libraries/backend/routes/backendRouter.js +28 -0
- package/dist/libraries/backend/routes/backendRouter.mjs +7 -7
- package/dist/libraries/backend/routes/entityRoutes.js +28 -0
- package/dist/libraries/backend/routes/entityRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/genRoutes.js +28 -0
- package/dist/libraries/backend/routes/genRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/productRoutes.js +28 -0
- package/dist/libraries/backend/routes/productRoutes.mjs +3 -3
- package/dist/libraries/backend/routes/referralRoutes.js +28 -0
- package/dist/libraries/backend/routes/referralRoutes.mjs +3 -3
- package/dist/libraries/backend/supabase.js +28 -0
- package/dist/libraries/backend/supabase.mjs +7 -7
- package/dist/libraries/backend/tanstack.js +28 -0
- package/dist/libraries/backend/tanstack.mjs +7 -7
- package/dist/libraries/backend/utils/backendRes.js +28 -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 +28 -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 +35 -1
- 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 +35 -1
- package/dist/libraries/react/BaseAutumnProvider.mjs +10 -10
- package/dist/libraries/react/{ReactAutumnClient-DM5ZRTfX.d.ts → ReactAutumnClient-BUq9E84_.d.ts} +8 -6
- package/dist/libraries/react/{ReactAutumnClient-BHjd9Tw5.d.mts → ReactAutumnClient-CpAGyyur.d.mts} +8 -6
- package/dist/libraries/react/ReactAutumnProvider.d.mts +4 -3
- package/dist/libraries/react/ReactAutumnProvider.d.ts +4 -3
- package/dist/libraries/react/ReactAutumnProvider.js +39 -3
- package/dist/libraries/react/ReactAutumnProvider.mjs +11 -11
- package/dist/libraries/react/{attachTypes-Bz1_JTvk.d.ts → attachTypes-CcB6xjSF.d.ts} +1 -1
- package/dist/{next/client/attachTypes-9VCTaz0m.d.mts → libraries/react/attachTypes-DqUN3q8s.d.mts} +5 -5
- package/dist/libraries/react/{chunk-KZVVSY52.mjs → chunk-56PEGK2Z.mjs} +2 -2
- package/dist/libraries/react/{chunk-ZT5TN67S.mjs → chunk-ECOBNPRU.mjs} +7 -5
- package/dist/libraries/react/{chunk-5K2M3CQZ.mjs → chunk-FEISQQNM.mjs} +1 -1
- package/dist/libraries/react/{chunk-BXMZYHE7.mjs → chunk-FJWZPMWU.mjs} +3 -3
- package/dist/libraries/react/{chunk-PGU4IXT7.mjs → chunk-FMRBH4CP.mjs} +1 -1
- package/dist/libraries/react/{chunk-KLSRAX2F.mjs → chunk-GWVZB5GK.mjs} +3 -3
- package/dist/libraries/react/{chunk-QV6Q2XXO.mjs → chunk-HIC6P67K.mjs} +14 -8
- package/dist/libraries/react/{chunk-33OTK7MB.mjs → chunk-HMZZIUCF.mjs} +1 -1
- package/dist/libraries/react/{chunk-WT5K3J2K.mjs → chunk-I2A7PK2L.mjs} +17 -17
- package/dist/libraries/react/{chunk-TJMYXANS.mjs → chunk-JFTZRU2U.mjs} +1 -1
- package/dist/libraries/react/{chunk-YCDNQZT5.mjs → chunk-JGDTNJTR.mjs} +2 -2
- package/dist/libraries/react/{chunk-7AJBRRXV.mjs → chunk-JNR7QAPG.mjs} +1 -1
- package/dist/libraries/react/{chunk-M7SUFZ42.mjs → chunk-KUS3X33V.mjs} +1 -1
- package/dist/libraries/react/{chunk-EXK6MS5M.mjs → chunk-KYZ3DYMI.mjs} +454 -456
- package/dist/libraries/react/{chunk-W5XUD2S6.mjs → chunk-MW2FSYG3.mjs} +1 -1
- package/dist/libraries/react/{chunk-2TQBFCWM.mjs → chunk-OTZ65PCT.mjs} +4 -4
- package/dist/libraries/react/{chunk-IM2FNHYV.mjs → chunk-QQKJE2ND.mjs} +2 -2
- package/dist/libraries/react/{chunk-GUDRYJ3O.mjs → chunk-SFGXTDMX.mjs} +2 -2
- package/dist/libraries/react/{chunk-QW2YS3JY.mjs → chunk-SZJOMZTC.mjs} +2 -2
- package/dist/libraries/react/{chunk-F5QUME7S.mjs → chunk-ULIUD6YP.mjs} +3 -3
- package/dist/libraries/react/{chunk-EK2RMWXP.mjs → chunk-WQXUZO6K.mjs} +28 -0
- package/dist/libraries/react/{chunk-NHDZWWMZ.mjs → chunk-YWQTQ72B.mjs} +2 -2
- package/dist/libraries/react/{chunk-SFDHYUHA.mjs → chunk-ZJBEC254.mjs} +1 -1
- package/dist/libraries/react/client/ReactAutumnClient.d.mts +6 -6
- package/dist/libraries/react/client/ReactAutumnClient.d.ts +6 -6
- package/dist/libraries/react/client/ReactAutumnClient.js +35 -1
- 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/clientGenTypes.js +28 -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 +35 -1
- package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.mjs +29 -29
- 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 +35 -1
- package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.mjs +29 -29
- 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 +35 -1
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +29 -29
- package/dist/libraries/react/components/ui/accordion.mjs +3 -3
- package/dist/libraries/react/components/ui/button.d.mts +1 -1
- package/dist/libraries/react/components/ui/button.d.ts +1 -1
- 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-DT-gAUL9.d.mts → cusTypes-CSmAk5io.d.mts} +1 -1
- package/dist/libraries/react/{cusTypes-yJ0fSxbq.d.ts → cusTypes-DHjT-9rV.d.ts} +1 -1
- package/dist/libraries/react/{entTypes-BPdjCunj.d.ts → entTypes-CoF9enrR.d.ts} +1 -1
- package/dist/libraries/react/{entTypes-D79XPrxo.d.mts → entTypes-S4hkh1RG.d.mts} +1 -1
- package/dist/libraries/react/{genTypes-DJUAkD36.d.ts → genTypes-DsiuvyWS.d.ts} +1 -1
- package/dist/libraries/react/{genTypes-BV-Jc6Q1.d.mts → genTypes-fEH_nqSm.d.mts} +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 +28 -0
- package/dist/libraries/react/hooks/helpers/handleCheck.mjs +2 -2
- package/dist/libraries/react/hooks/helpers/useAutumnBase.d.mts +6 -6
- package/dist/libraries/react/hooks/helpers/useAutumnBase.d.ts +6 -6
- package/dist/libraries/react/hooks/helpers/useAutumnBase.js +28 -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 +35 -1
- 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 +35 -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 +35 -1
- package/dist/libraries/react/hooks/useCustomerBase.mjs +9 -9
- package/dist/libraries/react/hooks/useEntity.d.mts +4 -4
- package/dist/libraries/react/hooks/useEntity.d.ts +4 -4
- package/dist/libraries/react/hooks/useEntity.js +35 -1
- package/dist/libraries/react/hooks/useEntity.mjs +10 -10
- package/dist/libraries/react/hooks/useEntityBase.d.mts +6 -6
- package/dist/libraries/react/hooks/useEntityBase.d.ts +6 -6
- package/dist/libraries/react/hooks/useEntityBase.js +35 -1
- 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 +35 -1
- 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 +35 -1
- 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 +28 -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 +2 -1
- package/dist/libraries/react/index.d.ts +2 -1
- package/dist/libraries/react/index.js +39 -3
- package/dist/libraries/react/index.mjs +39 -3
- package/dist/libraries/react/{prodTypes-2tlu9Pyz.d.mts → prodTypes--VvnyGlN.d.mts} +1 -1
- package/dist/libraries/react/{prodTypes-2tlu9Pyz.d.ts → prodTypes--VvnyGlN.d.ts} +1 -1
- package/dist/next/client/NextAutumnClient.d.mts +21 -19
- package/dist/next/client/NextAutumnClient.d.ts +21 -19
- package/dist/next/client/NextAutumnProvider.d.mts +2 -2
- package/dist/next/client/NextAutumnProvider.d.ts +2 -2
- package/dist/next/client/{attachTypes-DLxEa_Wj.d.ts → attachTypes-DKlQexnQ.d.ts} +5 -5
- package/dist/{libraries/react/attachTypes-C9FJTCo6.d.mts → next/client/attachTypes-EvdK0fPK.d.mts} +5 -5
- package/dist/next/client/{clientAttachTypes-umadXlvp.d.ts → clientAttachTypes-CGPjsdPk.d.ts} +27 -27
- package/dist/next/client/{clientAttachTypes-BzsPgggN.d.mts → clientAttachTypes-CZFjz8Rq.d.mts} +27 -27
- package/dist/next/client/clientUtils.d.mts +3 -3
- package/dist/next/client/clientUtils.d.ts +3 -3
- package/dist/next/client/{cusTypes-CYojUJSJ.d.ts → cusTypes-DEURYNg4.d.ts} +5 -5
- package/dist/next/client/{cusTypes-CIGvysWL.d.mts → cusTypes-y5wEmx07.d.mts} +5 -5
- package/dist/next/client/{entTypes-BAD1NMvb.d.ts → entTypes-CRFgWhOr.d.ts} +1 -1
- package/dist/next/client/{entTypes-mOI7WnPZ.d.mts → entTypes-KRxjcMFv.d.mts} +1 -1
- package/dist/next/client/hooks/useAutumn.d.mts +5 -5
- package/dist/next/client/hooks/useAutumn.d.ts +5 -5
- 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 +7 -7
- package/dist/next/client/hooks/useEntity.d.ts +7 -7
- package/dist/next/client/hooks/usePricingTable.d.mts +1 -1
- package/dist/next/client/hooks/usePricingTable.d.ts +1 -1
- package/dist/next/client/types.d.mts +3 -3
- package/dist/next/client/types.d.ts +3 -3
- package/dist/next/server/auth/withNextAuth.d.mts +1 -1
- package/dist/next/server/auth/withNextAuth.d.ts +1 -1
- package/dist/next/server/componentActions.d.mts +1 -1
- package/dist/next/server/componentActions.d.ts +1 -1
- package/dist/next/server/cusActions.d.mts +84 -17
- package/dist/next/server/cusActions.d.ts +84 -17
- package/dist/next/server/genActions.d.mts +1 -1
- package/dist/next/server/genActions.d.ts +1 -1
- package/dist/sdk/index.d.mts +70 -3
- package/dist/sdk/index.d.ts +70 -3
- package/dist/sdk/index.js +28 -0
- package/dist/sdk/index.mjs +28 -0
- package/dist/utils/encryptUtils.js +28 -0
- package/dist/utils/encryptUtils.mjs +28 -0
- package/package.json +1 -1
- package/dist/libraries/react/{chunk-KWNH6C27.mjs → chunk-7TYAAD2T.mjs} +11 -11
- package/dist/next/client/{prodTypes-CxvB1YY3.d.mts → prodTypes-DzTLP57C.d.mts} +8 -8
- package/dist/next/client/{prodTypes-CxvB1YY3.d.ts → prodTypes-DzTLP57C.d.ts} +8 -8
- package/dist/next/server/{cusTypes-DgoOZMIt.d.ts → cusTypes-CwopPHB0.d.mts} +8 -8
- package/dist/next/server/{cusTypes-DgoOZMIt.d.mts → cusTypes-CwopPHB0.d.ts} +8 -8
|
@@ -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-BUq9E84_.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-DsiuvyWS.js';
|
|
8
|
+
import './prodTypes--VvnyGlN.js';
|
|
9
|
+
import './attachTypes-CcB6xjSF.js';
|
|
10
|
+
import './entTypes-CoF9enrR.js';
|
|
11
|
+
import './cusTypes-DHjT-9rV.js';
|
|
12
12
|
|
|
13
13
|
interface AutumnDialogContext {
|
|
14
14
|
props: any;
|
|
@@ -402,6 +402,32 @@ var logger = {
|
|
|
402
402
|
}
|
|
403
403
|
};
|
|
404
404
|
|
|
405
|
+
// src/sdk/features/featureMethods.ts
|
|
406
|
+
var featureMethods = (instance) => {
|
|
407
|
+
return {
|
|
408
|
+
list: () => staticWrapper(listFeatures, instance, {})
|
|
409
|
+
};
|
|
410
|
+
};
|
|
411
|
+
var listFeatures = async ({
|
|
412
|
+
instance,
|
|
413
|
+
params
|
|
414
|
+
}) => {
|
|
415
|
+
let path = "/features";
|
|
416
|
+
if (params) {
|
|
417
|
+
const queryParams = new URLSearchParams();
|
|
418
|
+
for (const [key, value] of Object.entries(params)) {
|
|
419
|
+
if (value !== void 0) {
|
|
420
|
+
queryParams.append(key, String(value));
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
const queryString = queryParams.toString();
|
|
424
|
+
if (queryString) {
|
|
425
|
+
path += `?${queryString}`;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
return instance.get(path);
|
|
429
|
+
};
|
|
430
|
+
|
|
405
431
|
// src/sdk/client.ts
|
|
406
432
|
var LATEST_API_VERSION = "1.2";
|
|
407
433
|
var Autumn = class {
|
|
@@ -459,10 +485,12 @@ var Autumn = class {
|
|
|
459
485
|
static products = productMethods();
|
|
460
486
|
static entities = entityMethods();
|
|
461
487
|
static referrals = referralMethods();
|
|
488
|
+
static features = featureMethods();
|
|
462
489
|
customers = customerMethods(this);
|
|
463
490
|
products = productMethods(this);
|
|
464
491
|
entities = entityMethods(this);
|
|
465
492
|
referrals = referralMethods(this);
|
|
493
|
+
features = featureMethods(this);
|
|
466
494
|
static checkout = (params) => staticWrapper(handleCheckout, void 0, { params });
|
|
467
495
|
async checkout(params) {
|
|
468
496
|
return handleCheckout({
|
|
@@ -869,12 +897,14 @@ var AutumnClient = class {
|
|
|
869
897
|
customerData;
|
|
870
898
|
includeCredentials;
|
|
871
899
|
prefix;
|
|
900
|
+
headers;
|
|
872
901
|
constructor({
|
|
873
902
|
backendUrl,
|
|
874
903
|
getBearerToken,
|
|
875
904
|
customerData,
|
|
876
905
|
includeCredentials,
|
|
877
|
-
betterAuthUrl
|
|
906
|
+
betterAuthUrl,
|
|
907
|
+
headers
|
|
878
908
|
}) {
|
|
879
909
|
this.backendUrl = backendUrl;
|
|
880
910
|
this.getBearerToken = getBearerToken;
|
|
@@ -885,6 +915,7 @@ var AutumnClient = class {
|
|
|
885
915
|
this.prefix = "/api/auth/autumn";
|
|
886
916
|
this.backendUrl = betterAuthUrl;
|
|
887
917
|
}
|
|
918
|
+
this.headers = headers;
|
|
888
919
|
}
|
|
889
920
|
/**
|
|
890
921
|
* Detects if the backend supports CORS credentials by making an OPTIONS request
|
|
@@ -950,6 +981,9 @@ var AutumnClient = class {
|
|
|
950
981
|
console.error(`Failed to call getToken() in AutumnProvider`);
|
|
951
982
|
}
|
|
952
983
|
}
|
|
984
|
+
if (this.headers) {
|
|
985
|
+
headers = { ...headers, ...this.headers };
|
|
986
|
+
}
|
|
953
987
|
return headers;
|
|
954
988
|
}
|
|
955
989
|
async handleFetch({
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
import {
|
|
4
4
|
AutumnContext,
|
|
5
5
|
useAutumnContext
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-EK2RMWXP.mjs";
|
|
9
|
-
import "./chunk-V575SGOW.mjs";
|
|
10
|
-
import "./chunk-ZV4RPZTM.mjs";
|
|
6
|
+
} from "./chunk-JFTZRU2U.mjs";
|
|
7
|
+
import "./chunk-HIC6P67K.mjs";
|
|
11
8
|
import "./chunk-JVCOY7ZL.mjs";
|
|
12
9
|
import "./chunk-CIBQ4BJU.mjs";
|
|
10
|
+
import "./chunk-WQXUZO6K.mjs";
|
|
11
|
+
import "./chunk-V575SGOW.mjs";
|
|
12
|
+
import "./chunk-ZV4RPZTM.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-CpAGyyur.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-fEH_nqSm.mjs';
|
|
9
|
+
import './prodTypes--VvnyGlN.mjs';
|
|
10
|
+
import './attachTypes-DqUN3q8s.mjs';
|
|
11
|
+
import './entTypes-S4hkh1RG.mjs';
|
|
12
|
+
import './cusTypes-CSmAk5io.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-BUq9E84_.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-DsiuvyWS.js';
|
|
9
|
+
import './prodTypes--VvnyGlN.js';
|
|
10
|
+
import './attachTypes-CcB6xjSF.js';
|
|
11
|
+
import './entTypes-CoF9enrR.js';
|
|
12
|
+
import './cusTypes-DHjT-9rV.js';
|
|
13
13
|
|
|
14
14
|
declare function BaseAutumnProvider({ client, children, AutumnContext, }: {
|
|
15
15
|
client: AutumnClient;
|
|
@@ -433,6 +433,32 @@ var logger = {
|
|
|
433
433
|
}
|
|
434
434
|
};
|
|
435
435
|
|
|
436
|
+
// src/sdk/features/featureMethods.ts
|
|
437
|
+
var featureMethods = (instance) => {
|
|
438
|
+
return {
|
|
439
|
+
list: () => staticWrapper(listFeatures, instance, {})
|
|
440
|
+
};
|
|
441
|
+
};
|
|
442
|
+
var listFeatures = async ({
|
|
443
|
+
instance,
|
|
444
|
+
params
|
|
445
|
+
}) => {
|
|
446
|
+
let path = "/features";
|
|
447
|
+
if (params) {
|
|
448
|
+
const queryParams = new URLSearchParams();
|
|
449
|
+
for (const [key, value] of Object.entries(params)) {
|
|
450
|
+
if (value !== void 0) {
|
|
451
|
+
queryParams.append(key, String(value));
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
const queryString = queryParams.toString();
|
|
455
|
+
if (queryString) {
|
|
456
|
+
path += `?${queryString}`;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
return instance.get(path);
|
|
460
|
+
};
|
|
461
|
+
|
|
436
462
|
// src/sdk/client.ts
|
|
437
463
|
var LATEST_API_VERSION = "1.2";
|
|
438
464
|
var Autumn = class {
|
|
@@ -490,10 +516,12 @@ var Autumn = class {
|
|
|
490
516
|
static products = productMethods();
|
|
491
517
|
static entities = entityMethods();
|
|
492
518
|
static referrals = referralMethods();
|
|
519
|
+
static features = featureMethods();
|
|
493
520
|
customers = customerMethods(this);
|
|
494
521
|
products = productMethods(this);
|
|
495
522
|
entities = entityMethods(this);
|
|
496
523
|
referrals = referralMethods(this);
|
|
524
|
+
features = featureMethods(this);
|
|
497
525
|
static checkout = (params) => staticWrapper(handleCheckout, void 0, { params });
|
|
498
526
|
async checkout(params) {
|
|
499
527
|
return handleCheckout({
|
|
@@ -900,12 +928,14 @@ var AutumnClient = class {
|
|
|
900
928
|
customerData;
|
|
901
929
|
includeCredentials;
|
|
902
930
|
prefix;
|
|
931
|
+
headers;
|
|
903
932
|
constructor({
|
|
904
933
|
backendUrl,
|
|
905
934
|
getBearerToken,
|
|
906
935
|
customerData,
|
|
907
936
|
includeCredentials,
|
|
908
|
-
betterAuthUrl
|
|
937
|
+
betterAuthUrl,
|
|
938
|
+
headers
|
|
909
939
|
}) {
|
|
910
940
|
this.backendUrl = backendUrl;
|
|
911
941
|
this.getBearerToken = getBearerToken;
|
|
@@ -916,6 +946,7 @@ var AutumnClient = class {
|
|
|
916
946
|
this.prefix = "/api/auth/autumn";
|
|
917
947
|
this.backendUrl = betterAuthUrl;
|
|
918
948
|
}
|
|
949
|
+
this.headers = headers;
|
|
919
950
|
}
|
|
920
951
|
/**
|
|
921
952
|
* Detects if the backend supports CORS credentials by making an OPTIONS request
|
|
@@ -981,6 +1012,9 @@ var AutumnClient = class {
|
|
|
981
1012
|
console.error(`Failed to call getToken() in AutumnProvider`);
|
|
982
1013
|
}
|
|
983
1014
|
}
|
|
1015
|
+
if (this.headers) {
|
|
1016
|
+
headers = { ...headers, ...this.headers };
|
|
1017
|
+
}
|
|
984
1018
|
return headers;
|
|
985
1019
|
}
|
|
986
1020
|
async handleFetch({
|
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
import {
|
|
5
5
|
BaseAutumnProvider
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HMZZIUCF.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-EK2RMWXP.mjs";
|
|
15
|
-
import "./chunk-V575SGOW.mjs";
|
|
16
|
-
import "./chunk-ZV4RPZTM.mjs";
|
|
8
|
+
import "./chunk-GWVZB5GK.mjs";
|
|
9
|
+
import "./chunk-MW2FSYG3.mjs";
|
|
10
|
+
import "./chunk-ZJBEC254.mjs";
|
|
11
|
+
import "./chunk-JNR7QAPG.mjs";
|
|
12
|
+
import "./chunk-JFTZRU2U.mjs";
|
|
13
|
+
import "./chunk-HIC6P67K.mjs";
|
|
17
14
|
import "./chunk-JVCOY7ZL.mjs";
|
|
18
15
|
import "./chunk-CIBQ4BJU.mjs";
|
|
16
|
+
import "./chunk-WQXUZO6K.mjs";
|
|
17
|
+
import "./chunk-V575SGOW.mjs";
|
|
18
|
+
import "./chunk-ZV4RPZTM.mjs";
|
|
19
19
|
import "./chunk-VTGR7VVK.mjs";
|
|
20
20
|
import "./chunk-WFFVOEUG.mjs";
|
|
21
21
|
import "./chunk-ZF2HUCN6.mjs";
|
package/dist/libraries/react/{ReactAutumnClient-DM5ZRTfX.d.ts → ReactAutumnClient-BUq9E84_.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-DsiuvyWS.js';
|
|
5
|
+
import { C as CheckoutResult } from './attachTypes-CcB6xjSF.js';
|
|
6
|
+
import { R as Result, A as AutumnPromise, E as Entity, D as DeleteEntityResult } from './entTypes-CoF9enrR.js';
|
|
7
|
+
import { a as ProductItem, e as ProductScenario, P as Product } from './prodTypes--VvnyGlN.js';
|
|
8
|
+
import { C as CustomerData, a as CreateCustomerParams, b as Customer, B as BillingPortalResult } from './cusTypes-DHjT-9rV.js';
|
|
9
9
|
|
|
10
10
|
interface PricingTableProduct {
|
|
11
11
|
id: string;
|
|
@@ -48,6 +48,7 @@ interface AutumnClientConfig {
|
|
|
48
48
|
customerData?: CustomerData;
|
|
49
49
|
includeCredentials?: boolean;
|
|
50
50
|
betterAuthUrl?: string;
|
|
51
|
+
headers?: Record<string, string>;
|
|
51
52
|
}
|
|
52
53
|
declare class AutumnClient {
|
|
53
54
|
readonly backendUrl?: string;
|
|
@@ -55,7 +56,8 @@ declare class AutumnClient {
|
|
|
55
56
|
protected readonly customerData?: CustomerData;
|
|
56
57
|
protected includeCredentials?: boolean;
|
|
57
58
|
readonly prefix: string;
|
|
58
|
-
|
|
59
|
+
readonly headers?: Record<string, string>;
|
|
60
|
+
constructor({ backendUrl, getBearerToken, customerData, includeCredentials, betterAuthUrl, headers, }: AutumnClientConfig);
|
|
59
61
|
/**
|
|
60
62
|
* Detects if the backend supports CORS credentials by making an OPTIONS request
|
|
61
63
|
*/
|
package/dist/libraries/react/{ReactAutumnClient-BHjd9Tw5.d.mts → ReactAutumnClient-CpAGyyur.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-fEH_nqSm.mjs';
|
|
5
|
+
import { C as CheckoutResult } from './attachTypes-DqUN3q8s.mjs';
|
|
6
|
+
import { R as Result, A as AutumnPromise, E as Entity, D as DeleteEntityResult } from './entTypes-S4hkh1RG.mjs';
|
|
7
|
+
import { a as ProductItem, e as ProductScenario, P as Product } from './prodTypes--VvnyGlN.mjs';
|
|
8
|
+
import { C as CustomerData, a as CreateCustomerParams, b as Customer, B as BillingPortalResult } from './cusTypes-CSmAk5io.mjs';
|
|
9
9
|
|
|
10
10
|
interface PricingTableProduct {
|
|
11
11
|
id: string;
|
|
@@ -48,6 +48,7 @@ interface AutumnClientConfig {
|
|
|
48
48
|
customerData?: CustomerData;
|
|
49
49
|
includeCredentials?: boolean;
|
|
50
50
|
betterAuthUrl?: string;
|
|
51
|
+
headers?: Record<string, string>;
|
|
51
52
|
}
|
|
52
53
|
declare class AutumnClient {
|
|
53
54
|
readonly backendUrl?: string;
|
|
@@ -55,7 +56,8 @@ declare class AutumnClient {
|
|
|
55
56
|
protected readonly customerData?: CustomerData;
|
|
56
57
|
protected includeCredentials?: boolean;
|
|
57
58
|
readonly prefix: string;
|
|
58
|
-
|
|
59
|
+
readonly headers?: Record<string, string>;
|
|
60
|
+
constructor({ backendUrl, getBearerToken, customerData, includeCredentials, betterAuthUrl, headers, }: AutumnClientConfig);
|
|
59
61
|
/**
|
|
60
62
|
* Detects if the backend supports CORS credentials by making an OPTIONS request
|
|
61
63
|
*/
|
|
@@ -1,15 +1,16 @@
|
|
|
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-CSmAk5io.mjs';
|
|
3
|
+
import './prodTypes--VvnyGlN.mjs';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
6
|
-
declare const ReactAutumnProvider: ({ children, getBearerToken, backendUrl, customerData, includeCredentials, betterAuthUrl, }: {
|
|
6
|
+
declare const ReactAutumnProvider: ({ children, getBearerToken, backendUrl, customerData, includeCredentials, betterAuthUrl, headers, }: {
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
getBearerToken?: () => Promise<string | null | undefined>;
|
|
9
9
|
backendUrl?: string;
|
|
10
10
|
customerData?: CustomerData;
|
|
11
11
|
includeCredentials?: boolean;
|
|
12
12
|
betterAuthUrl?: string;
|
|
13
|
+
headers?: Record<string, string>;
|
|
13
14
|
}) => react_jsx_runtime.JSX.Element;
|
|
14
15
|
|
|
15
16
|
export { ReactAutumnProvider };
|
|
@@ -1,15 +1,16 @@
|
|
|
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-DHjT-9rV.js';
|
|
3
|
+
import './prodTypes--VvnyGlN.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
|
6
|
-
declare const ReactAutumnProvider: ({ children, getBearerToken, backendUrl, customerData, includeCredentials, betterAuthUrl, }: {
|
|
6
|
+
declare const ReactAutumnProvider: ({ children, getBearerToken, backendUrl, customerData, includeCredentials, betterAuthUrl, headers, }: {
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
getBearerToken?: () => Promise<string | null | undefined>;
|
|
9
9
|
backendUrl?: string;
|
|
10
10
|
customerData?: CustomerData;
|
|
11
11
|
includeCredentials?: boolean;
|
|
12
12
|
betterAuthUrl?: string;
|
|
13
|
+
headers?: Record<string, string>;
|
|
13
14
|
}) => react_jsx_runtime.JSX.Element;
|
|
14
15
|
|
|
15
16
|
export { ReactAutumnProvider };
|
|
@@ -434,6 +434,32 @@ var logger = {
|
|
|
434
434
|
}
|
|
435
435
|
};
|
|
436
436
|
|
|
437
|
+
// src/sdk/features/featureMethods.ts
|
|
438
|
+
var featureMethods = (instance) => {
|
|
439
|
+
return {
|
|
440
|
+
list: () => staticWrapper(listFeatures, instance, {})
|
|
441
|
+
};
|
|
442
|
+
};
|
|
443
|
+
var listFeatures = async ({
|
|
444
|
+
instance,
|
|
445
|
+
params
|
|
446
|
+
}) => {
|
|
447
|
+
let path = "/features";
|
|
448
|
+
if (params) {
|
|
449
|
+
const queryParams = new URLSearchParams();
|
|
450
|
+
for (const [key, value] of Object.entries(params)) {
|
|
451
|
+
if (value !== void 0) {
|
|
452
|
+
queryParams.append(key, String(value));
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
const queryString = queryParams.toString();
|
|
456
|
+
if (queryString) {
|
|
457
|
+
path += `?${queryString}`;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
return instance.get(path);
|
|
461
|
+
};
|
|
462
|
+
|
|
437
463
|
// src/sdk/client.ts
|
|
438
464
|
var LATEST_API_VERSION = "1.2";
|
|
439
465
|
var Autumn = class {
|
|
@@ -491,10 +517,12 @@ var Autumn = class {
|
|
|
491
517
|
static products = productMethods();
|
|
492
518
|
static entities = entityMethods();
|
|
493
519
|
static referrals = referralMethods();
|
|
520
|
+
static features = featureMethods();
|
|
494
521
|
customers = customerMethods(this);
|
|
495
522
|
products = productMethods(this);
|
|
496
523
|
entities = entityMethods(this);
|
|
497
524
|
referrals = referralMethods(this);
|
|
525
|
+
features = featureMethods(this);
|
|
498
526
|
static checkout = (params) => staticWrapper(handleCheckout, void 0, { params });
|
|
499
527
|
async checkout(params) {
|
|
500
528
|
return handleCheckout({
|
|
@@ -901,12 +929,14 @@ var AutumnClient = class {
|
|
|
901
929
|
customerData;
|
|
902
930
|
includeCredentials;
|
|
903
931
|
prefix;
|
|
932
|
+
headers;
|
|
904
933
|
constructor({
|
|
905
934
|
backendUrl,
|
|
906
935
|
getBearerToken,
|
|
907
936
|
customerData,
|
|
908
937
|
includeCredentials,
|
|
909
|
-
betterAuthUrl
|
|
938
|
+
betterAuthUrl,
|
|
939
|
+
headers
|
|
910
940
|
}) {
|
|
911
941
|
this.backendUrl = backendUrl;
|
|
912
942
|
this.getBearerToken = getBearerToken;
|
|
@@ -917,6 +947,7 @@ var AutumnClient = class {
|
|
|
917
947
|
this.prefix = "/api/auth/autumn";
|
|
918
948
|
this.backendUrl = betterAuthUrl;
|
|
919
949
|
}
|
|
950
|
+
this.headers = headers;
|
|
920
951
|
}
|
|
921
952
|
/**
|
|
922
953
|
* Detects if the backend supports CORS credentials by making an OPTIONS request
|
|
@@ -982,6 +1013,9 @@ var AutumnClient = class {
|
|
|
982
1013
|
console.error(`Failed to call getToken() in AutumnProvider`);
|
|
983
1014
|
}
|
|
984
1015
|
}
|
|
1016
|
+
if (this.headers) {
|
|
1017
|
+
headers = { ...headers, ...this.headers };
|
|
1018
|
+
}
|
|
985
1019
|
return headers;
|
|
986
1020
|
}
|
|
987
1021
|
async handleFetch({
|
|
@@ -1775,14 +1809,16 @@ var ReactAutumnProvider = ({
|
|
|
1775
1809
|
backendUrl,
|
|
1776
1810
|
customerData,
|
|
1777
1811
|
includeCredentials,
|
|
1778
|
-
betterAuthUrl
|
|
1812
|
+
betterAuthUrl,
|
|
1813
|
+
headers
|
|
1779
1814
|
}) => {
|
|
1780
1815
|
let client = new AutumnClient({
|
|
1781
1816
|
backendUrl: getBackendUrl(backendUrl),
|
|
1782
1817
|
getBearerToken,
|
|
1783
1818
|
customerData,
|
|
1784
1819
|
includeCredentials,
|
|
1785
|
-
betterAuthUrl
|
|
1820
|
+
betterAuthUrl,
|
|
1821
|
+
headers
|
|
1786
1822
|
});
|
|
1787
1823
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(BaseAutumnProvider, { client, AutumnContext, children });
|
|
1788
1824
|
};
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
ReactAutumnProvider
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-ECOBNPRU.mjs";
|
|
6
|
+
import "./chunk-HMZZIUCF.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-EK2RMWXP.mjs";
|
|
15
|
-
import "./chunk-V575SGOW.mjs";
|
|
16
|
-
import "./chunk-ZV4RPZTM.mjs";
|
|
8
|
+
import "./chunk-GWVZB5GK.mjs";
|
|
9
|
+
import "./chunk-MW2FSYG3.mjs";
|
|
10
|
+
import "./chunk-ZJBEC254.mjs";
|
|
11
|
+
import "./chunk-JNR7QAPG.mjs";
|
|
12
|
+
import "./chunk-JFTZRU2U.mjs";
|
|
13
|
+
import "./chunk-HIC6P67K.mjs";
|
|
17
14
|
import "./chunk-JVCOY7ZL.mjs";
|
|
18
15
|
import "./chunk-CIBQ4BJU.mjs";
|
|
16
|
+
import "./chunk-WQXUZO6K.mjs";
|
|
17
|
+
import "./chunk-V575SGOW.mjs";
|
|
18
|
+
import "./chunk-ZV4RPZTM.mjs";
|
|
19
19
|
import "./chunk-VTGR7VVK.mjs";
|
|
20
20
|
import "./chunk-WFFVOEUG.mjs";
|
|
21
21
|
import "./chunk-ZF2HUCN6.mjs";
|
package/dist/{next/client/attachTypes-9VCTaz0m.d.mts → libraries/react/attachTypes-DqUN3q8s.d.mts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as ProductItem, P as Product } from './prodTypes--VvnyGlN.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
declare const AttachFeatureOptionsSchema: z.ZodObject<{
|
|
@@ -20,19 +20,19 @@ 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
|
-
checkout_url?: string | undefined;
|
|
28
27
|
customer_data?: any;
|
|
28
|
+
checkout_url?: string | undefined;
|
|
29
29
|
}, {
|
|
30
|
+
customer_id: string;
|
|
30
31
|
code: string;
|
|
31
32
|
message: string;
|
|
32
|
-
customer_id: string;
|
|
33
33
|
product_ids: string[];
|
|
34
|
-
checkout_url?: string | undefined;
|
|
35
34
|
customer_data?: any;
|
|
35
|
+
checkout_url?: string | undefined;
|
|
36
36
|
}>;
|
|
37
37
|
type AttachResult = z.infer<typeof AttachResultSchema>;
|
|
38
38
|
type CheckoutResult = {
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import {
|
|
4
4
|
AutumnContext,
|
|
5
5
|
useAutumnContext
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JFTZRU2U.mjs";
|
|
7
7
|
import {
|
|
8
8
|
AutumnError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WQXUZO6K.mjs";
|
|
10
10
|
|
|
11
11
|
// src/libraries/react/hooks/useAnalytics.tsx
|
|
12
12
|
import useSWR from "swr";
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
BaseAutumnProvider
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HMZZIUCF.mjs";
|
|
6
6
|
import {
|
|
7
7
|
AutumnContext
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JFTZRU2U.mjs";
|
|
9
9
|
import {
|
|
10
10
|
AutumnClient
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HIC6P67K.mjs";
|
|
12
12
|
|
|
13
13
|
// src/libraries/react/ReactAutumnProvider.tsx
|
|
14
14
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -27,14 +27,16 @@ var ReactAutumnProvider = ({
|
|
|
27
27
|
backendUrl,
|
|
28
28
|
customerData,
|
|
29
29
|
includeCredentials,
|
|
30
|
-
betterAuthUrl
|
|
30
|
+
betterAuthUrl,
|
|
31
|
+
headers
|
|
31
32
|
}) => {
|
|
32
33
|
let client = new AutumnClient({
|
|
33
34
|
backendUrl: getBackendUrl(backendUrl),
|
|
34
35
|
getBearerToken,
|
|
35
36
|
customerData,
|
|
36
37
|
includeCredentials,
|
|
37
|
-
betterAuthUrl
|
|
38
|
+
betterAuthUrl,
|
|
39
|
+
headers
|
|
38
40
|
});
|
|
39
41
|
return /* @__PURE__ */ jsx(BaseAutumnProvider, { client, AutumnContext, children });
|
|
40
42
|
};
|
|
@@ -7,21 +7,21 @@ import {
|
|
|
7
7
|
Portal,
|
|
8
8
|
hideOthers,
|
|
9
9
|
useFocusGuards
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FEISQQNM.mjs";
|
|
11
11
|
import {
|
|
12
12
|
X
|
|
13
13
|
} from "./chunk-QJPZFEVW.mjs";
|
|
14
14
|
import {
|
|
15
15
|
Presence,
|
|
16
16
|
useId
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-I2A7PK2L.mjs";
|
|
18
18
|
import {
|
|
19
19
|
Primitive,
|
|
20
20
|
composeEventHandlers,
|
|
21
21
|
createContext2,
|
|
22
22
|
createContextScope,
|
|
23
23
|
useControllableState
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-7TYAAD2T.mjs";
|
|
25
25
|
import {
|
|
26
26
|
createSlot,
|
|
27
27
|
useComposedRefs
|