autumn-js 1.2.45 → 1.2.46
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/backend/adapters/express.js +109 -23
- package/dist/backend/adapters/express.mjs +9 -9
- package/dist/backend/adapters/fetch.js +109 -23
- package/dist/backend/adapters/fetch.mjs +9 -9
- package/dist/backend/adapters/hono.js +109 -23
- package/dist/backend/adapters/hono.mjs +9 -9
- package/dist/backend/adapters/index.js +109 -23
- package/dist/backend/adapters/index.mjs +12 -12
- package/dist/backend/adapters/next.js +109 -23
- package/dist/backend/adapters/next.mjs +9 -9
- package/dist/backend/{chunk-L7N6FVEE.mjs → chunk-564D2O3W.mjs} +1 -1
- package/dist/backend/{chunk-DY6WMOCT.mjs → chunk-KW47VZ73.mjs} +5 -5
- package/dist/backend/{chunk-PVDDMLWT.mjs → chunk-RPUV2OZA.mjs} +91 -19
- package/dist/backend/{chunk-5DLBV5WP.mjs → chunk-SBZEXVB4.mjs} +7 -7
- package/dist/backend/{chunk-67LHAREL.mjs → chunk-TEDQUFQV.mjs} +1 -1
- package/dist/backend/{chunk-YKRFY5TK.mjs → chunk-UJS4Q7J4.mjs} +18 -4
- package/dist/backend/{chunk-P2TFPTAM.mjs → chunk-WR6ZPCQG.mjs} +1 -1
- package/dist/backend/{chunk-J2VZ3UZS.mjs → chunk-XOAX5KAL.mjs} +1 -1
- package/dist/backend/core/handlers/coreHandler.d.mts +1 -1
- package/dist/backend/core/handlers/coreHandler.d.ts +1 -1
- package/dist/backend/core/handlers/coreHandler.js +109 -23
- package/dist/backend/core/handlers/coreHandler.mjs +7 -7
- package/dist/backend/core/handlers/executeRoute.d.mts +1 -1
- package/dist/backend/core/handlers/executeRoute.d.ts +1 -1
- package/dist/backend/core/handlers/executeRoute.mjs +4 -4
- package/dist/backend/core/handlers/handleRouteByName.js +109 -23
- package/dist/backend/core/handlers/handleRouteByName.mjs +7 -7
- package/dist/backend/core/handlers/index.d.mts +1 -1
- package/dist/backend/core/handlers/index.d.ts +1 -1
- package/dist/backend/core/handlers/index.js +109 -23
- package/dist/backend/core/handlers/index.mjs +10 -10
- package/dist/backend/core/index.d.mts +1 -1
- package/dist/backend/core/index.d.ts +1 -1
- package/dist/backend/core/index.js +109 -23
- package/dist/backend/core/index.mjs +10 -10
- package/dist/backend/core/routes/index.d.mts +1 -1
- package/dist/backend/core/routes/index.d.ts +1 -1
- package/dist/backend/core/routes/index.js +18 -4
- package/dist/backend/core/routes/index.mjs +2 -2
- package/dist/backend/core/routes/routeBuilder.d.mts +1 -1
- package/dist/backend/core/routes/routeBuilder.d.ts +1 -1
- package/dist/backend/core/routes/routeConfigs.d.mts +1 -1
- package/dist/backend/core/routes/routeConfigs.d.ts +1 -1
- package/dist/backend/core/routes/routeConfigs.js +18 -4
- package/dist/backend/core/routes/routeConfigs.mjs +2 -2
- package/dist/backend/core/types/handlerTypes.d.mts +1 -1
- package/dist/backend/core/types/handlerTypes.d.ts +1 -1
- package/dist/backend/core/types/index.d.mts +1 -1
- package/dist/backend/core/types/index.d.ts +1 -1
- package/dist/backend/core/types/routeTypes.d.mts +1 -1
- package/dist/backend/core/types/routeTypes.d.ts +1 -1
- package/dist/backend/core/utils/index.mjs +3 -3
- package/dist/backend/index.d.mts +2 -2
- package/dist/backend/index.d.ts +2 -2
- package/dist/backend/index.js +109 -23
- package/dist/backend/index.mjs +10 -10
- package/dist/backend/{routeTypes-UN48tvoc.d.mts → routeTypes-DnUY8ksp.d.mts} +121 -8
- package/dist/backend/{routeTypes-COLvwrcx.d.ts → routeTypes-TbN5QHEp.d.ts} +121 -8
- package/dist/better-auth/{chunk-MOCG3CBD.mjs → chunk-SABPXZTZ.mjs} +92 -20
- package/dist/better-auth/{chunk-3LKXO3EE.mjs → chunk-TOQRV6D7.mjs} +1 -1
- package/dist/better-auth/{chunk-J3W4EO5H.mjs → chunk-YRHQ4VL7.mjs} +18 -4
- package/dist/better-auth/index.js +109 -23
- package/dist/better-auth/index.mjs +3 -3
- package/dist/better-auth/utils/createAutumnEndpoint.js +18 -4
- package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
- package/dist/better-auth/utils/handleBetterAuthRoute.js +109 -23
- package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
- package/dist/better-auth/utils/index.js +109 -23
- package/dist/better-auth/utils/index.mjs +3 -3
- package/dist/react/AutumnContext.d.mts +1 -1
- package/dist/react/AutumnContext.d.ts +1 -1
- package/dist/react/AutumnProvider.js +1 -1
- package/dist/react/AutumnProvider.mjs +2 -2
- package/dist/react/{chunk-EE3XPYSL.mjs → chunk-2C6RX3EW.mjs} +1 -1
- package/dist/react/{chunk-SBCI4L22.mjs → chunk-2X7HXG2W.mjs} +1 -1
- package/dist/react/{chunk-7SRCZYRC.mjs → chunk-3WU4ZFXU.mjs} +1 -1
- package/dist/react/{chunk-LUBYNTYC.mjs → chunk-4HU5BGSM.mjs} +1 -1
- package/dist/react/{chunk-RTZAB46K.mjs → chunk-7RF3IGDO.mjs} +1 -1
- package/dist/react/{chunk-KCOHZSS3.mjs → chunk-C6I2RW56.mjs} +8 -8
- package/dist/react/{chunk-CQF3ER2L.mjs → chunk-NWF7OFFQ.mjs} +2 -2
- package/dist/react/{chunk-CSJHU3F2.mjs → chunk-SRSYG5ZV.mjs} +1 -1
- package/dist/react/{chunk-QUGX6XRQ.mjs → chunk-UNQZV3K5.mjs} +1 -1
- package/dist/react/client/AutumnClient.d.mts +1 -1
- package/dist/react/client/AutumnClient.d.ts +1 -1
- package/dist/react/client/IAutumnClient.d.mts +1 -1
- package/dist/react/client/IAutumnClient.d.ts +1 -1
- package/dist/react/client/index.d.mts +1 -1
- package/dist/react/client/index.d.ts +1 -1
- package/dist/react/hooks/index.d.mts +1 -1
- package/dist/react/hooks/index.d.ts +1 -1
- package/dist/react/hooks/index.js +7 -7
- package/dist/react/hooks/index.mjs +8 -8
- package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +1 -1
- package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +1 -1
- package/dist/react/hooks/internal/useCustomerActions.d.mts +1 -1
- package/dist/react/hooks/internal/useCustomerActions.d.ts +1 -1
- package/dist/react/hooks/internal/useCustomerActions.js +1 -1
- package/dist/react/hooks/internal/useCustomerActions.mjs +2 -2
- package/dist/react/hooks/useAggregateEvents.d.mts +1 -1
- package/dist/react/hooks/useAggregateEvents.d.ts +1 -1
- package/dist/react/hooks/useAggregateEvents.js +7 -7
- package/dist/react/hooks/useAggregateEvents.mjs +2 -2
- package/dist/react/hooks/useCustomer.d.mts +1 -1
- package/dist/react/hooks/useCustomer.d.ts +1 -1
- package/dist/react/hooks/useCustomer.js +7 -7
- package/dist/react/hooks/useCustomer.mjs +3 -3
- package/dist/react/hooks/useEntity.d.mts +1 -1
- package/dist/react/hooks/useEntity.d.ts +1 -1
- package/dist/react/hooks/useEntity.js +7 -7
- package/dist/react/hooks/useEntity.mjs +2 -2
- package/dist/react/hooks/useListEvents.d.mts +1 -1
- package/dist/react/hooks/useListEvents.d.ts +1 -1
- package/dist/react/hooks/useListEvents.js +7 -7
- package/dist/react/hooks/useListEvents.mjs +2 -2
- package/dist/react/hooks/useListPlans.d.mts +1 -1
- package/dist/react/hooks/useListPlans.d.ts +1 -1
- package/dist/react/hooks/useListPlans.js +7 -7
- package/dist/react/hooks/useListPlans.mjs +2 -2
- package/dist/react/hooks/useReferrals.d.mts +1 -1
- package/dist/react/hooks/useReferrals.d.ts +1 -1
- package/dist/react/hooks/useReferrals.js +7 -7
- package/dist/react/hooks/useReferrals.mjs +2 -2
- package/dist/react/index.d.mts +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.js +7 -7
- package/dist/react/index.mjs +9 -9
- package/dist/react/{params-DlzWLPN2.d.mts → params-BrFcJdeO.d.mts} +50 -4
- package/dist/react/{params-ChMwkOJA.d.ts → params-BwHZca3H.d.ts} +50 -4
- package/dist/sdk/index.d.mts +151 -10
- package/dist/sdk/index.d.ts +151 -10
- package/dist/sdk/index.js +110 -21
- package/dist/sdk/index.mjs +99 -20
- package/package.json +1 -1
- package/dist/backend/{chunk-IXUCY7AU.mjs → chunk-MOHYGUMA.mjs} +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { a as ListPlansList } from '../list-plans-op-B87IUSZR.js';
|
|
3
|
-
import { t as ClientListPlansParams } from '../params-
|
|
3
|
+
import { t as ClientListPlansParams } from '../params-BwHZca3H.js';
|
|
4
4
|
import { AutumnClientError } from '../client/AutumnClientError.js';
|
|
5
5
|
import { HookParams } from './types.js';
|
|
6
6
|
import '../plan-DBswUtWr.js';
|
|
@@ -952,7 +952,7 @@ function shouldAssignObserverCurrentProperties(observer, optimisticResult) {
|
|
|
952
952
|
return false;
|
|
953
953
|
}
|
|
954
954
|
|
|
955
|
-
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+
|
|
955
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+0f58469d5b3bd39f/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
|
|
956
956
|
var React = __toESM(require("react"), 1);
|
|
957
957
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
958
958
|
var QueryClientContext = React.createContext(
|
|
@@ -969,13 +969,13 @@ var useQueryClient = (queryClient) => {
|
|
|
969
969
|
return client;
|
|
970
970
|
};
|
|
971
971
|
|
|
972
|
-
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+
|
|
972
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+0f58469d5b3bd39f/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js
|
|
973
973
|
var React2 = __toESM(require("react"), 1);
|
|
974
974
|
var IsRestoringContext = React2.createContext(false);
|
|
975
975
|
var useIsRestoring = () => React2.useContext(IsRestoringContext);
|
|
976
976
|
var IsRestoringProvider = IsRestoringContext.Provider;
|
|
977
977
|
|
|
978
|
-
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+
|
|
978
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+0f58469d5b3bd39f/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
|
|
979
979
|
var React3 = __toESM(require("react"), 1);
|
|
980
980
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
981
981
|
function createValue() {
|
|
@@ -995,7 +995,7 @@ function createValue() {
|
|
|
995
995
|
var QueryErrorResetBoundaryContext = React3.createContext(createValue());
|
|
996
996
|
var useQueryErrorResetBoundary = () => React3.useContext(QueryErrorResetBoundaryContext);
|
|
997
997
|
|
|
998
|
-
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+
|
|
998
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+0f58469d5b3bd39f/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js
|
|
999
999
|
var React4 = __toESM(require("react"), 1);
|
|
1000
1000
|
var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary, query) => {
|
|
1001
1001
|
const throwOnError = query?.state.error && typeof options.throwOnError === "function" ? shouldThrowError(options.throwOnError, [query.state.error, query]) : options.throwOnError;
|
|
@@ -1020,7 +1020,7 @@ var getHasError = ({
|
|
|
1020
1020
|
return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || shouldThrowError(throwOnError, [result.error, query]));
|
|
1021
1021
|
};
|
|
1022
1022
|
|
|
1023
|
-
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+
|
|
1023
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+0f58469d5b3bd39f/node_modules/@tanstack/react-query/build/modern/suspense.js
|
|
1024
1024
|
var ensureSuspenseTimers = (defaultedOptions) => {
|
|
1025
1025
|
if (defaultedOptions.suspense) {
|
|
1026
1026
|
const MIN_SUSPENSE_TIME_MS = 1e3;
|
|
@@ -1041,7 +1041,7 @@ var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observ
|
|
|
1041
1041
|
errorResetBoundary.clearReset();
|
|
1042
1042
|
});
|
|
1043
1043
|
|
|
1044
|
-
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+
|
|
1044
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+0f58469d5b3bd39f/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
|
|
1045
1045
|
var React5 = __toESM(require("react"), 1);
|
|
1046
1046
|
function useBaseQuery(options, Observer, queryClient) {
|
|
1047
1047
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -1127,7 +1127,7 @@ function useBaseQuery(options, Observer, queryClient) {
|
|
|
1127
1127
|
return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;
|
|
1128
1128
|
}
|
|
1129
1129
|
|
|
1130
|
-
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+
|
|
1130
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+0f58469d5b3bd39f/node_modules/@tanstack/react-query/build/modern/useQuery.js
|
|
1131
1131
|
function useQuery(options, queryClient) {
|
|
1132
1132
|
return useBaseQuery(options, QueryObserver, queryClient);
|
|
1133
1133
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as ClientCreateReferralCodeParams, s as CreateReferralCodeResponse, k as ClientRedeemReferralCodeParams, R as RedeemReferralCodeResponse } from '../params-
|
|
1
|
+
import { b as ClientCreateReferralCodeParams, s as CreateReferralCodeResponse, k as ClientRedeemReferralCodeParams, R as RedeemReferralCodeResponse } from '../params-BrFcJdeO.mjs';
|
|
2
2
|
import { HookParams, HookResultWithMethods } from './types.mjs';
|
|
3
3
|
import '../plan-DBswUtWr.mjs';
|
|
4
4
|
import '@tanstack/react-query';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as ClientCreateReferralCodeParams, s as CreateReferralCodeResponse, k as ClientRedeemReferralCodeParams, R as RedeemReferralCodeResponse } from '../params-
|
|
1
|
+
import { b as ClientCreateReferralCodeParams, s as CreateReferralCodeResponse, k as ClientRedeemReferralCodeParams, R as RedeemReferralCodeResponse } from '../params-BwHZca3H.js';
|
|
2
2
|
import { HookParams, HookResultWithMethods } from './types.js';
|
|
3
3
|
import '../plan-DBswUtWr.js';
|
|
4
4
|
import '@tanstack/react-query';
|
|
@@ -952,7 +952,7 @@ function shouldAssignObserverCurrentProperties(observer, optimisticResult) {
|
|
|
952
952
|
return false;
|
|
953
953
|
}
|
|
954
954
|
|
|
955
|
-
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+
|
|
955
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+0f58469d5b3bd39f/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
|
|
956
956
|
var React = __toESM(require("react"), 1);
|
|
957
957
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
958
958
|
var QueryClientContext = React.createContext(
|
|
@@ -969,13 +969,13 @@ var useQueryClient = (queryClient) => {
|
|
|
969
969
|
return client;
|
|
970
970
|
};
|
|
971
971
|
|
|
972
|
-
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+
|
|
972
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+0f58469d5b3bd39f/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js
|
|
973
973
|
var React2 = __toESM(require("react"), 1);
|
|
974
974
|
var IsRestoringContext = React2.createContext(false);
|
|
975
975
|
var useIsRestoring = () => React2.useContext(IsRestoringContext);
|
|
976
976
|
var IsRestoringProvider = IsRestoringContext.Provider;
|
|
977
977
|
|
|
978
|
-
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+
|
|
978
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+0f58469d5b3bd39f/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
|
|
979
979
|
var React3 = __toESM(require("react"), 1);
|
|
980
980
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
981
981
|
function createValue() {
|
|
@@ -995,7 +995,7 @@ function createValue() {
|
|
|
995
995
|
var QueryErrorResetBoundaryContext = React3.createContext(createValue());
|
|
996
996
|
var useQueryErrorResetBoundary = () => React3.useContext(QueryErrorResetBoundaryContext);
|
|
997
997
|
|
|
998
|
-
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+
|
|
998
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+0f58469d5b3bd39f/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js
|
|
999
999
|
var React4 = __toESM(require("react"), 1);
|
|
1000
1000
|
var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary, query) => {
|
|
1001
1001
|
const throwOnError = query?.state.error && typeof options.throwOnError === "function" ? shouldThrowError(options.throwOnError, [query.state.error, query]) : options.throwOnError;
|
|
@@ -1020,7 +1020,7 @@ var getHasError = ({
|
|
|
1020
1020
|
return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || shouldThrowError(throwOnError, [result.error, query]));
|
|
1021
1021
|
};
|
|
1022
1022
|
|
|
1023
|
-
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+
|
|
1023
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+0f58469d5b3bd39f/node_modules/@tanstack/react-query/build/modern/suspense.js
|
|
1024
1024
|
var ensureSuspenseTimers = (defaultedOptions) => {
|
|
1025
1025
|
if (defaultedOptions.suspense) {
|
|
1026
1026
|
const MIN_SUSPENSE_TIME_MS = 1e3;
|
|
@@ -1041,7 +1041,7 @@ var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observ
|
|
|
1041
1041
|
errorResetBoundary.clearReset();
|
|
1042
1042
|
});
|
|
1043
1043
|
|
|
1044
|
-
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+
|
|
1044
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+0f58469d5b3bd39f/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
|
|
1045
1045
|
var React5 = __toESM(require("react"), 1);
|
|
1046
1046
|
function useBaseQuery(options, Observer, queryClient) {
|
|
1047
1047
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -1127,7 +1127,7 @@ function useBaseQuery(options, Observer, queryClient) {
|
|
|
1127
1127
|
return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;
|
|
1128
1128
|
}
|
|
1129
1129
|
|
|
1130
|
-
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+
|
|
1130
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+0f58469d5b3bd39f/node_modules/@tanstack/react-query/build/modern/useQuery.js
|
|
1131
1131
|
function useQuery(options, queryClient) {
|
|
1132
1132
|
return useBaseQuery(options, QueryObserver, queryClient);
|
|
1133
1133
|
}
|
package/dist/react/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as ClientAggregateEventsParams, a as ClientAttachParams, b as ClientCreateReferralCodeParams, c as ClientGetEntityParams, d as ClientGetOrCreateCustomerParams, e as ClientListEventsParams, f as ClientMultiAttachParams, g as ClientOpenCustomerPortalParams, h as ClientPreviewAttachParams, i as ClientPreviewMultiAttachParams, j as ClientPreviewUpdateSubscriptionParams, k as ClientRedeemReferralCodeParams, l as ClientSetupPaymentParams, m as ClientUpdateSubscriptionParams, P as ProtectedFields } from './params-
|
|
1
|
+
export { C as ClientAggregateEventsParams, a as ClientAttachParams, b as ClientCreateReferralCodeParams, c as ClientGetEntityParams, d as ClientGetOrCreateCustomerParams, e as ClientListEventsParams, f as ClientMultiAttachParams, g as ClientOpenCustomerPortalParams, h as ClientPreviewAttachParams, i as ClientPreviewMultiAttachParams, j as ClientPreviewUpdateSubscriptionParams, k as ClientRedeemReferralCodeParams, l as ClientSetupPaymentParams, m as ClientUpdateSubscriptionParams, P as ProtectedFields } from './params-BrFcJdeO.mjs';
|
|
2
2
|
export { useAutumnClient } from './AutumnContext.mjs';
|
|
3
3
|
export { AutumnProvider, AutumnProviderProps } from './AutumnProvider.mjs';
|
|
4
4
|
export { AutumnClientConfig, createAutumnClient } from './client/AutumnClient.mjs';
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as ClientAggregateEventsParams, a as ClientAttachParams, b as ClientCreateReferralCodeParams, c as ClientGetEntityParams, d as ClientGetOrCreateCustomerParams, e as ClientListEventsParams, f as ClientMultiAttachParams, g as ClientOpenCustomerPortalParams, h as ClientPreviewAttachParams, i as ClientPreviewMultiAttachParams, j as ClientPreviewUpdateSubscriptionParams, k as ClientRedeemReferralCodeParams, l as ClientSetupPaymentParams, m as ClientUpdateSubscriptionParams, P as ProtectedFields } from './params-
|
|
1
|
+
export { C as ClientAggregateEventsParams, a as ClientAttachParams, b as ClientCreateReferralCodeParams, c as ClientGetEntityParams, d as ClientGetOrCreateCustomerParams, e as ClientListEventsParams, f as ClientMultiAttachParams, g as ClientOpenCustomerPortalParams, h as ClientPreviewAttachParams, i as ClientPreviewMultiAttachParams, j as ClientPreviewUpdateSubscriptionParams, k as ClientRedeemReferralCodeParams, l as ClientSetupPaymentParams, m as ClientUpdateSubscriptionParams, P as ProtectedFields } from './params-BwHZca3H.js';
|
|
2
2
|
export { useAutumnClient } from './AutumnContext.js';
|
|
3
3
|
export { AutumnProvider, AutumnProviderProps } from './AutumnProvider.js';
|
|
4
4
|
export { AutumnClientConfig, createAutumnClient } from './client/AutumnClient.js';
|
package/dist/react/index.js
CHANGED
|
@@ -2548,7 +2548,7 @@ var QueryClient = class {
|
|
|
2548
2548
|
}
|
|
2549
2549
|
};
|
|
2550
2550
|
|
|
2551
|
-
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+
|
|
2551
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+0f58469d5b3bd39f/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
|
|
2552
2552
|
var React = __toESM(require("react"), 1);
|
|
2553
2553
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
2554
2554
|
var QueryClientContext = React.createContext(
|
|
@@ -2577,13 +2577,13 @@ var QueryClientProvider = ({
|
|
|
2577
2577
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QueryClientContext.Provider, { value: client, children });
|
|
2578
2578
|
};
|
|
2579
2579
|
|
|
2580
|
-
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+
|
|
2580
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+0f58469d5b3bd39f/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js
|
|
2581
2581
|
var React2 = __toESM(require("react"), 1);
|
|
2582
2582
|
var IsRestoringContext = React2.createContext(false);
|
|
2583
2583
|
var useIsRestoring = () => React2.useContext(IsRestoringContext);
|
|
2584
2584
|
var IsRestoringProvider = IsRestoringContext.Provider;
|
|
2585
2585
|
|
|
2586
|
-
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+
|
|
2586
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+0f58469d5b3bd39f/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
|
|
2587
2587
|
var React3 = __toESM(require("react"), 1);
|
|
2588
2588
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
2589
2589
|
function createValue() {
|
|
@@ -2603,7 +2603,7 @@ function createValue() {
|
|
|
2603
2603
|
var QueryErrorResetBoundaryContext = React3.createContext(createValue());
|
|
2604
2604
|
var useQueryErrorResetBoundary = () => React3.useContext(QueryErrorResetBoundaryContext);
|
|
2605
2605
|
|
|
2606
|
-
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+
|
|
2606
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+0f58469d5b3bd39f/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js
|
|
2607
2607
|
var React4 = __toESM(require("react"), 1);
|
|
2608
2608
|
var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary, query) => {
|
|
2609
2609
|
const throwOnError = query?.state.error && typeof options.throwOnError === "function" ? shouldThrowError(options.throwOnError, [query.state.error, query]) : options.throwOnError;
|
|
@@ -2628,7 +2628,7 @@ var getHasError = ({
|
|
|
2628
2628
|
return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || shouldThrowError(throwOnError, [result.error, query]));
|
|
2629
2629
|
};
|
|
2630
2630
|
|
|
2631
|
-
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+
|
|
2631
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+0f58469d5b3bd39f/node_modules/@tanstack/react-query/build/modern/suspense.js
|
|
2632
2632
|
var ensureSuspenseTimers = (defaultedOptions) => {
|
|
2633
2633
|
if (defaultedOptions.suspense) {
|
|
2634
2634
|
const MIN_SUSPENSE_TIME_MS = 1e3;
|
|
@@ -2649,7 +2649,7 @@ var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observ
|
|
|
2649
2649
|
errorResetBoundary.clearReset();
|
|
2650
2650
|
});
|
|
2651
2651
|
|
|
2652
|
-
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+
|
|
2652
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+0f58469d5b3bd39f/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
|
|
2653
2653
|
var React5 = __toESM(require("react"), 1);
|
|
2654
2654
|
function useBaseQuery(options, Observer, queryClient) {
|
|
2655
2655
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -2735,7 +2735,7 @@ function useBaseQuery(options, Observer, queryClient) {
|
|
|
2735
2735
|
return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;
|
|
2736
2736
|
}
|
|
2737
2737
|
|
|
2738
|
-
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+
|
|
2738
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.101.1+0f58469d5b3bd39f/node_modules/@tanstack/react-query/build/modern/useQuery.js
|
|
2739
2739
|
function useQuery(options, queryClient) {
|
|
2740
2740
|
return useBaseQuery(options, QueryObserver, queryClient);
|
|
2741
2741
|
}
|
package/dist/react/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
AutumnProvider
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2C6RX3EW.mjs";
|
|
5
5
|
import "./chunk-7KBQVCNO.mjs";
|
|
6
6
|
import {
|
|
7
7
|
createAutumnClient
|
|
@@ -12,11 +12,11 @@ import {
|
|
|
12
12
|
} from "./chunk-IC3QHWR6.mjs";
|
|
13
13
|
import {
|
|
14
14
|
useAggregateEvents
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-7RF3IGDO.mjs";
|
|
16
16
|
import {
|
|
17
17
|
useCustomer
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-NWF7OFFQ.mjs";
|
|
19
|
+
import "./chunk-4HU5BGSM.mjs";
|
|
20
20
|
import "./chunk-BWKG32GC.mjs";
|
|
21
21
|
import "./chunk-GSJF6P3Q.mjs";
|
|
22
22
|
import "./chunk-SEQHNPTF.mjs";
|
|
@@ -24,17 +24,17 @@ import "./chunk-4TON573W.mjs";
|
|
|
24
24
|
import "./chunk-D6DFRS3U.mjs";
|
|
25
25
|
import {
|
|
26
26
|
useEntity
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-3WU4ZFXU.mjs";
|
|
28
28
|
import {
|
|
29
29
|
useListEvents
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-SRSYG5ZV.mjs";
|
|
31
31
|
import {
|
|
32
32
|
useListPlans
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-2X7HXG2W.mjs";
|
|
34
34
|
import {
|
|
35
35
|
useReferrals
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import "./chunk-
|
|
36
|
+
} from "./chunk-UNQZV3K5.mjs";
|
|
37
|
+
import "./chunk-C6I2RW56.mjs";
|
|
38
38
|
import {
|
|
39
39
|
useAutumnClient
|
|
40
40
|
} from "./chunk-SOA7GEAN.mjs";
|
|
@@ -5865,7 +5865,7 @@ type MultiAttachPlanItem = {
|
|
|
5865
5865
|
rollover?: MultiAttachRollover | undefined;
|
|
5866
5866
|
};
|
|
5867
5867
|
/**
|
|
5868
|
-
* Customize the plan to attach. Can override
|
|
5868
|
+
* Customize the plan to attach. Can override its price or items.
|
|
5869
5869
|
*/
|
|
5870
5870
|
type MultiAttachCustomize = {
|
|
5871
5871
|
/**
|
|
@@ -5900,7 +5900,7 @@ type MultiAttachPlan = {
|
|
|
5900
5900
|
*/
|
|
5901
5901
|
planId: string;
|
|
5902
5902
|
/**
|
|
5903
|
-
* Customize the plan to attach. Can override
|
|
5903
|
+
* Customize the plan to attach. Can override its price or items.
|
|
5904
5904
|
*/
|
|
5905
5905
|
customize?: MultiAttachCustomize | undefined;
|
|
5906
5906
|
/**
|
|
@@ -5915,6 +5915,10 @@ type MultiAttachPlan = {
|
|
|
5915
5915
|
* A unique ID to identify this subscription. Useful when attaching the same plan multiple times.
|
|
5916
5916
|
*/
|
|
5917
5917
|
subscriptionId?: string | undefined;
|
|
5918
|
+
/**
|
|
5919
|
+
* The entity scope for this plan. Omit to inherit the request scope, or pass null for customer-level.
|
|
5920
|
+
*/
|
|
5921
|
+
entityId?: string | null | undefined;
|
|
5918
5922
|
};
|
|
5919
5923
|
/**
|
|
5920
5924
|
* Unit of time for the trial ('day', 'month', 'year').
|
|
@@ -5998,6 +6002,17 @@ type MultiAttachAttachDiscount = {
|
|
|
5998
6002
|
*/
|
|
5999
6003
|
promotionCode?: string | undefined;
|
|
6000
6004
|
};
|
|
6005
|
+
/**
|
|
6006
|
+
* How to handle billing. 'prorate_immediately' charges/credits prorated amounts now, 'none' does not charge/credit anything.
|
|
6007
|
+
*/
|
|
6008
|
+
declare const MultiAttachBillingBehavior: {
|
|
6009
|
+
readonly ProrateImmediately: "prorate_immediately";
|
|
6010
|
+
readonly None: "none";
|
|
6011
|
+
};
|
|
6012
|
+
/**
|
|
6013
|
+
* How to handle billing. 'prorate_immediately' charges/credits prorated amounts now, 'none' does not charge/credit anything.
|
|
6014
|
+
*/
|
|
6015
|
+
type MultiAttachBillingBehavior = ClosedEnum<typeof MultiAttachBillingBehavior>;
|
|
6001
6016
|
/**
|
|
6002
6017
|
* Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
|
|
6003
6018
|
*/
|
|
@@ -6183,6 +6198,10 @@ type MultiAttachParams = {
|
|
|
6183
6198
|
* Free trial configuration applied to all plans. Pass an object to set a custom trial, or null to remove any trial.
|
|
6184
6199
|
*/
|
|
6185
6200
|
freeTrial?: MultiAttachFreeTrialParams | null | undefined;
|
|
6201
|
+
/**
|
|
6202
|
+
* Unix timestamp in milliseconds for backdating every plan in this multi-attach.
|
|
6203
|
+
*/
|
|
6204
|
+
startsAt?: number | undefined;
|
|
6186
6205
|
/**
|
|
6187
6206
|
* Currency to bill this multi-attach in (e.g. usd, eur). Must match the customer's currency if they are already locked to one, and every plan must offer a paid price in it. Defaults to the customer's currency, then the org default.
|
|
6188
6207
|
*/
|
|
@@ -6195,6 +6214,10 @@ type MultiAttachParams = {
|
|
|
6195
6214
|
* List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code.
|
|
6196
6215
|
*/
|
|
6197
6216
|
discounts?: Array<MultiAttachAttachDiscount> | undefined;
|
|
6217
|
+
/**
|
|
6218
|
+
* How to handle billing. 'prorate_immediately' charges/credits prorated amounts now, 'none' does not charge/credit anything.
|
|
6219
|
+
*/
|
|
6220
|
+
billingBehavior?: MultiAttachBillingBehavior | undefined;
|
|
6198
6221
|
/**
|
|
6199
6222
|
* URL to redirect to after successful checkout.
|
|
6200
6223
|
*/
|
|
@@ -8417,7 +8440,7 @@ type PreviewMultiAttachPlanItem = {
|
|
|
8417
8440
|
rollover?: PreviewMultiAttachRollover | undefined;
|
|
8418
8441
|
};
|
|
8419
8442
|
/**
|
|
8420
|
-
* Customize the plan to attach. Can override
|
|
8443
|
+
* Customize the plan to attach. Can override its price or items.
|
|
8421
8444
|
*/
|
|
8422
8445
|
type PreviewMultiAttachCustomize = {
|
|
8423
8446
|
/**
|
|
@@ -8452,7 +8475,7 @@ type PreviewMultiAttachPlan = {
|
|
|
8452
8475
|
*/
|
|
8453
8476
|
planId: string;
|
|
8454
8477
|
/**
|
|
8455
|
-
* Customize the plan to attach. Can override
|
|
8478
|
+
* Customize the plan to attach. Can override its price or items.
|
|
8456
8479
|
*/
|
|
8457
8480
|
customize?: PreviewMultiAttachCustomize | undefined;
|
|
8458
8481
|
/**
|
|
@@ -8467,6 +8490,10 @@ type PreviewMultiAttachPlan = {
|
|
|
8467
8490
|
* A unique ID to identify this subscription. Useful when attaching the same plan multiple times.
|
|
8468
8491
|
*/
|
|
8469
8492
|
subscriptionId?: string | undefined;
|
|
8493
|
+
/**
|
|
8494
|
+
* The entity scope for this plan. Omit to inherit the request scope, or pass null for customer-level.
|
|
8495
|
+
*/
|
|
8496
|
+
entityId?: string | null | undefined;
|
|
8470
8497
|
};
|
|
8471
8498
|
/**
|
|
8472
8499
|
* Unit of time for the trial ('day', 'month', 'year').
|
|
@@ -8550,6 +8577,17 @@ type PreviewMultiAttachAttachDiscount = {
|
|
|
8550
8577
|
*/
|
|
8551
8578
|
promotionCode?: string | undefined;
|
|
8552
8579
|
};
|
|
8580
|
+
/**
|
|
8581
|
+
* How to handle billing. 'prorate_immediately' charges/credits prorated amounts now, 'none' does not charge/credit anything.
|
|
8582
|
+
*/
|
|
8583
|
+
declare const PreviewMultiAttachBillingBehavior: {
|
|
8584
|
+
readonly ProrateImmediately: "prorate_immediately";
|
|
8585
|
+
readonly None: "none";
|
|
8586
|
+
};
|
|
8587
|
+
/**
|
|
8588
|
+
* How to handle billing. 'prorate_immediately' charges/credits prorated amounts now, 'none' does not charge/credit anything.
|
|
8589
|
+
*/
|
|
8590
|
+
type PreviewMultiAttachBillingBehavior = ClosedEnum<typeof PreviewMultiAttachBillingBehavior>;
|
|
8553
8591
|
/**
|
|
8554
8592
|
* Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
|
|
8555
8593
|
*/
|
|
@@ -8735,6 +8773,10 @@ type PreviewMultiAttachParams = {
|
|
|
8735
8773
|
* Free trial configuration applied to all plans. Pass an object to set a custom trial, or null to remove any trial.
|
|
8736
8774
|
*/
|
|
8737
8775
|
freeTrial?: PreviewMultiAttachFreeTrialParams | null | undefined;
|
|
8776
|
+
/**
|
|
8777
|
+
* Unix timestamp in milliseconds for backdating every plan in this multi-attach.
|
|
8778
|
+
*/
|
|
8779
|
+
startsAt?: number | undefined;
|
|
8738
8780
|
/**
|
|
8739
8781
|
* Currency to bill this multi-attach in (e.g. usd, eur). Must match the customer's currency if they are already locked to one, and every plan must offer a paid price in it. Defaults to the customer's currency, then the org default.
|
|
8740
8782
|
*/
|
|
@@ -8747,6 +8789,10 @@ type PreviewMultiAttachParams = {
|
|
|
8747
8789
|
* List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code.
|
|
8748
8790
|
*/
|
|
8749
8791
|
discounts?: Array<PreviewMultiAttachAttachDiscount> | undefined;
|
|
8792
|
+
/**
|
|
8793
|
+
* How to handle billing. 'prorate_immediately' charges/credits prorated amounts now, 'none' does not charge/credit anything.
|
|
8794
|
+
*/
|
|
8795
|
+
billingBehavior?: PreviewMultiAttachBillingBehavior | undefined;
|
|
8750
8796
|
/**
|
|
8751
8797
|
* URL to redirect to after successful checkout.
|
|
8752
8798
|
*/
|
|
@@ -5865,7 +5865,7 @@ type MultiAttachPlanItem = {
|
|
|
5865
5865
|
rollover?: MultiAttachRollover | undefined;
|
|
5866
5866
|
};
|
|
5867
5867
|
/**
|
|
5868
|
-
* Customize the plan to attach. Can override
|
|
5868
|
+
* Customize the plan to attach. Can override its price or items.
|
|
5869
5869
|
*/
|
|
5870
5870
|
type MultiAttachCustomize = {
|
|
5871
5871
|
/**
|
|
@@ -5900,7 +5900,7 @@ type MultiAttachPlan = {
|
|
|
5900
5900
|
*/
|
|
5901
5901
|
planId: string;
|
|
5902
5902
|
/**
|
|
5903
|
-
* Customize the plan to attach. Can override
|
|
5903
|
+
* Customize the plan to attach. Can override its price or items.
|
|
5904
5904
|
*/
|
|
5905
5905
|
customize?: MultiAttachCustomize | undefined;
|
|
5906
5906
|
/**
|
|
@@ -5915,6 +5915,10 @@ type MultiAttachPlan = {
|
|
|
5915
5915
|
* A unique ID to identify this subscription. Useful when attaching the same plan multiple times.
|
|
5916
5916
|
*/
|
|
5917
5917
|
subscriptionId?: string | undefined;
|
|
5918
|
+
/**
|
|
5919
|
+
* The entity scope for this plan. Omit to inherit the request scope, or pass null for customer-level.
|
|
5920
|
+
*/
|
|
5921
|
+
entityId?: string | null | undefined;
|
|
5918
5922
|
};
|
|
5919
5923
|
/**
|
|
5920
5924
|
* Unit of time for the trial ('day', 'month', 'year').
|
|
@@ -5998,6 +6002,17 @@ type MultiAttachAttachDiscount = {
|
|
|
5998
6002
|
*/
|
|
5999
6003
|
promotionCode?: string | undefined;
|
|
6000
6004
|
};
|
|
6005
|
+
/**
|
|
6006
|
+
* How to handle billing. 'prorate_immediately' charges/credits prorated amounts now, 'none' does not charge/credit anything.
|
|
6007
|
+
*/
|
|
6008
|
+
declare const MultiAttachBillingBehavior: {
|
|
6009
|
+
readonly ProrateImmediately: "prorate_immediately";
|
|
6010
|
+
readonly None: "none";
|
|
6011
|
+
};
|
|
6012
|
+
/**
|
|
6013
|
+
* How to handle billing. 'prorate_immediately' charges/credits prorated amounts now, 'none' does not charge/credit anything.
|
|
6014
|
+
*/
|
|
6015
|
+
type MultiAttachBillingBehavior = ClosedEnum<typeof MultiAttachBillingBehavior>;
|
|
6001
6016
|
/**
|
|
6002
6017
|
* Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
|
|
6003
6018
|
*/
|
|
@@ -6183,6 +6198,10 @@ type MultiAttachParams = {
|
|
|
6183
6198
|
* Free trial configuration applied to all plans. Pass an object to set a custom trial, or null to remove any trial.
|
|
6184
6199
|
*/
|
|
6185
6200
|
freeTrial?: MultiAttachFreeTrialParams | null | undefined;
|
|
6201
|
+
/**
|
|
6202
|
+
* Unix timestamp in milliseconds for backdating every plan in this multi-attach.
|
|
6203
|
+
*/
|
|
6204
|
+
startsAt?: number | undefined;
|
|
6186
6205
|
/**
|
|
6187
6206
|
* Currency to bill this multi-attach in (e.g. usd, eur). Must match the customer's currency if they are already locked to one, and every plan must offer a paid price in it. Defaults to the customer's currency, then the org default.
|
|
6188
6207
|
*/
|
|
@@ -6195,6 +6214,10 @@ type MultiAttachParams = {
|
|
|
6195
6214
|
* List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code.
|
|
6196
6215
|
*/
|
|
6197
6216
|
discounts?: Array<MultiAttachAttachDiscount> | undefined;
|
|
6217
|
+
/**
|
|
6218
|
+
* How to handle billing. 'prorate_immediately' charges/credits prorated amounts now, 'none' does not charge/credit anything.
|
|
6219
|
+
*/
|
|
6220
|
+
billingBehavior?: MultiAttachBillingBehavior | undefined;
|
|
6198
6221
|
/**
|
|
6199
6222
|
* URL to redirect to after successful checkout.
|
|
6200
6223
|
*/
|
|
@@ -8417,7 +8440,7 @@ type PreviewMultiAttachPlanItem = {
|
|
|
8417
8440
|
rollover?: PreviewMultiAttachRollover | undefined;
|
|
8418
8441
|
};
|
|
8419
8442
|
/**
|
|
8420
|
-
* Customize the plan to attach. Can override
|
|
8443
|
+
* Customize the plan to attach. Can override its price or items.
|
|
8421
8444
|
*/
|
|
8422
8445
|
type PreviewMultiAttachCustomize = {
|
|
8423
8446
|
/**
|
|
@@ -8452,7 +8475,7 @@ type PreviewMultiAttachPlan = {
|
|
|
8452
8475
|
*/
|
|
8453
8476
|
planId: string;
|
|
8454
8477
|
/**
|
|
8455
|
-
* Customize the plan to attach. Can override
|
|
8478
|
+
* Customize the plan to attach. Can override its price or items.
|
|
8456
8479
|
*/
|
|
8457
8480
|
customize?: PreviewMultiAttachCustomize | undefined;
|
|
8458
8481
|
/**
|
|
@@ -8467,6 +8490,10 @@ type PreviewMultiAttachPlan = {
|
|
|
8467
8490
|
* A unique ID to identify this subscription. Useful when attaching the same plan multiple times.
|
|
8468
8491
|
*/
|
|
8469
8492
|
subscriptionId?: string | undefined;
|
|
8493
|
+
/**
|
|
8494
|
+
* The entity scope for this plan. Omit to inherit the request scope, or pass null for customer-level.
|
|
8495
|
+
*/
|
|
8496
|
+
entityId?: string | null | undefined;
|
|
8470
8497
|
};
|
|
8471
8498
|
/**
|
|
8472
8499
|
* Unit of time for the trial ('day', 'month', 'year').
|
|
@@ -8550,6 +8577,17 @@ type PreviewMultiAttachAttachDiscount = {
|
|
|
8550
8577
|
*/
|
|
8551
8578
|
promotionCode?: string | undefined;
|
|
8552
8579
|
};
|
|
8580
|
+
/**
|
|
8581
|
+
* How to handle billing. 'prorate_immediately' charges/credits prorated amounts now, 'none' does not charge/credit anything.
|
|
8582
|
+
*/
|
|
8583
|
+
declare const PreviewMultiAttachBillingBehavior: {
|
|
8584
|
+
readonly ProrateImmediately: "prorate_immediately";
|
|
8585
|
+
readonly None: "none";
|
|
8586
|
+
};
|
|
8587
|
+
/**
|
|
8588
|
+
* How to handle billing. 'prorate_immediately' charges/credits prorated amounts now, 'none' does not charge/credit anything.
|
|
8589
|
+
*/
|
|
8590
|
+
type PreviewMultiAttachBillingBehavior = ClosedEnum<typeof PreviewMultiAttachBillingBehavior>;
|
|
8553
8591
|
/**
|
|
8554
8592
|
* Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
|
|
8555
8593
|
*/
|
|
@@ -8735,6 +8773,10 @@ type PreviewMultiAttachParams = {
|
|
|
8735
8773
|
* Free trial configuration applied to all plans. Pass an object to set a custom trial, or null to remove any trial.
|
|
8736
8774
|
*/
|
|
8737
8775
|
freeTrial?: PreviewMultiAttachFreeTrialParams | null | undefined;
|
|
8776
|
+
/**
|
|
8777
|
+
* Unix timestamp in milliseconds for backdating every plan in this multi-attach.
|
|
8778
|
+
*/
|
|
8779
|
+
startsAt?: number | undefined;
|
|
8738
8780
|
/**
|
|
8739
8781
|
* Currency to bill this multi-attach in (e.g. usd, eur). Must match the customer's currency if they are already locked to one, and every plan must offer a paid price in it. Defaults to the customer's currency, then the org default.
|
|
8740
8782
|
*/
|
|
@@ -8747,6 +8789,10 @@ type PreviewMultiAttachParams = {
|
|
|
8747
8789
|
* List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code.
|
|
8748
8790
|
*/
|
|
8749
8791
|
discounts?: Array<PreviewMultiAttachAttachDiscount> | undefined;
|
|
8792
|
+
/**
|
|
8793
|
+
* How to handle billing. 'prorate_immediately' charges/credits prorated amounts now, 'none' does not charge/credit anything.
|
|
8794
|
+
*/
|
|
8795
|
+
billingBehavior?: PreviewMultiAttachBillingBehavior | undefined;
|
|
8750
8796
|
/**
|
|
8751
8797
|
* URL to redirect to after successful checkout.
|
|
8752
8798
|
*/
|