autumn-js 1.2.19 → 1.2.21
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 +2481 -1919
- package/dist/backend/adapters/express.mjs +9 -9
- package/dist/backend/adapters/fetch.js +2481 -1919
- package/dist/backend/adapters/fetch.mjs +9 -9
- package/dist/backend/adapters/hono.js +2481 -1919
- package/dist/backend/adapters/hono.mjs +9 -9
- package/dist/backend/adapters/index.js +2481 -1919
- package/dist/backend/adapters/index.mjs +12 -12
- package/dist/backend/adapters/next.js +2481 -1919
- package/dist/backend/adapters/next.mjs +9 -9
- package/dist/backend/{chunk-VZ5YXSHU.mjs → chunk-5JNYI5HM.mjs} +1 -1
- package/dist/backend/{chunk-USOCI4FE.mjs → chunk-73KXFYFC.mjs} +5 -5
- package/dist/backend/{chunk-T5RLLZJB.mjs → chunk-GKYVE5XN.mjs} +2424 -1881
- package/dist/backend/{chunk-ATDRCSQT.mjs → chunk-H6KJYTJY.mjs} +7 -7
- package/dist/backend/{chunk-3TCAUBKX.mjs → chunk-K2JSUNJX.mjs} +1 -1
- package/dist/backend/{chunk-JAP7IT2U.mjs → chunk-NNIHXZQM.mjs} +1 -1
- package/dist/backend/{chunk-IJ2K62QI.mjs → chunk-NSHGFU5H.mjs} +59 -40
- package/dist/backend/{chunk-XBCWZIUH.mjs → chunk-TGR2RWLO.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 +2481 -1919
- 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 +2481 -1919
- 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 +2481 -1919
- 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 +2481 -1919
- 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 +59 -40
- 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 +59 -40
- 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 +2481 -1919
- package/dist/backend/index.mjs +10 -10
- package/dist/backend/{routeTypes-gNxrwRsV.d.ts → routeTypes-B-Bkse9m.d.ts} +628 -7
- package/dist/backend/{routeTypes-BCnBLtb9.d.mts → routeTypes-DZFxBYSb.d.mts} +628 -7
- package/dist/better-auth/{chunk-VAQYB57J.mjs → chunk-4OLXYKUC.mjs} +2425 -1882
- package/dist/better-auth/{chunk-4QQUN4SQ.mjs → chunk-R35KMMJZ.mjs} +1 -1
- package/dist/better-auth/{chunk-XXPUYN7Z.mjs → chunk-X6KOCWP3.mjs} +59 -40
- package/dist/better-auth/index.js +2476 -1914
- package/dist/better-auth/index.mjs +3 -3
- package/dist/better-auth/utils/createAutumnEndpoint.js +59 -40
- package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
- package/dist/better-auth/utils/handleBetterAuthRoute.js +2481 -1919
- package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
- package/dist/better-auth/utils/index.js +2476 -1914
- package/dist/better-auth/utils/index.mjs +3 -3
- package/dist/react/AutumnContext.d.mts +2 -2
- package/dist/react/AutumnContext.d.ts +2 -2
- package/dist/react/AutumnProvider.js +15 -15
- package/dist/react/AutumnProvider.mjs +2 -2
- package/dist/react/{chunk-7IDH4OMG.mjs → chunk-26CKSAPZ.mjs} +1 -1
- package/dist/react/{chunk-NSFHAUTD.mjs → chunk-CHU7CIWP.mjs} +1 -1
- package/dist/react/{chunk-YQFYWH7J.mjs → chunk-G7FTQLT7.mjs} +1 -1
- package/dist/react/{chunk-BDG6JHEW.mjs → chunk-HSQUB3BZ.mjs} +1 -1
- package/dist/react/{chunk-DEZBJQEG.mjs → chunk-KB72KQKN.mjs} +1 -1
- package/dist/react/{chunk-J6SLKTKE.mjs → chunk-MC2YYATT.mjs} +1 -1
- package/dist/react/{chunk-FWWIAOPU.mjs → chunk-OXQG65ZT.mjs} +1 -1
- package/dist/react/{chunk-E5ZHOMZ4.mjs → chunk-XJZH5NMZ.mjs} +23 -23
- package/dist/react/{chunk-HVBDZARN.mjs → chunk-ZGPE4R6H.mjs} +2 -2
- package/dist/react/client/AutumnClient.d.mts +2 -2
- package/dist/react/client/AutumnClient.d.ts +2 -2
- package/dist/react/client/IAutumnClient.d.mts +2 -2
- package/dist/react/client/IAutumnClient.d.ts +2 -2
- package/dist/react/client/index.d.mts +2 -2
- package/dist/react/client/index.d.ts +2 -2
- package/dist/react/{customer-SSq4WO45.d.ts → customer-CzMuZp8W.d.ts} +1 -0
- package/dist/react/{customer-BgMiezZt.d.mts → customer-DjlCjlmM.d.mts} +1 -0
- package/dist/react/hooks/index.d.mts +2 -2
- package/dist/react/hooks/index.d.ts +2 -2
- package/dist/react/hooks/index.js +16 -16
- package/dist/react/hooks/index.mjs +8 -8
- package/dist/react/hooks/internal/check/balanceToAllowed.d.mts +1 -1
- package/dist/react/hooks/internal/check/balanceToAllowed.d.ts +1 -1
- package/dist/react/hooks/internal/check/customerToFeatures.d.mts +1 -1
- package/dist/react/hooks/internal/check/customerToFeatures.d.ts +1 -1
- package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.mts +1 -1
- package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.ts +1 -1
- package/dist/react/hooks/internal/check/getCreditCost.d.mts +1 -1
- package/dist/react/hooks/internal/check/getCreditCost.d.ts +1 -1
- package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +2 -2
- package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +2 -2
- package/dist/react/hooks/internal/useCustomerActions.d.mts +2 -2
- package/dist/react/hooks/internal/useCustomerActions.d.ts +2 -2
- 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 +16 -16
- package/dist/react/hooks/useAggregateEvents.mjs +2 -2
- package/dist/react/hooks/useCustomer.d.mts +2 -2
- package/dist/react/hooks/useCustomer.d.ts +2 -2
- package/dist/react/hooks/useCustomer.js +16 -16
- 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 +16 -16
- 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 +16 -16
- 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 +16 -16
- 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 +16 -16
- package/dist/react/hooks/useReferrals.mjs +2 -2
- package/dist/react/index.d.mts +2 -2
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.js +22 -22
- package/dist/react/index.mjs +9 -9
- package/dist/react/{params--mMxYT5w.d.mts → params-BUQLwLrI.d.mts} +52 -0
- package/dist/react/{params-DVrQcAu7.d.ts → params-dYykqsvL.d.ts} +52 -0
- package/dist/sdk/index.d.mts +850 -106
- package/dist/sdk/index.d.ts +850 -106
- package/dist/sdk/index.js +4314 -3545
- package/dist/sdk/index.mjs +4240 -3539
- package/package.json +1 -1
- package/dist/backend/{chunk-55C2WWXQ.mjs → chunk-S5HPMJ4U.mjs} +3 -3
|
@@ -36,7 +36,7 @@ __export(useReferrals_exports, {
|
|
|
36
36
|
});
|
|
37
37
|
module.exports = __toCommonJS(useReferrals_exports);
|
|
38
38
|
|
|
39
|
-
// ../../node_modules/@tanstack/query-core/build/modern/subscribable.js
|
|
39
|
+
// ../../node_modules/.bun/@tanstack+query-core@5.85.6/node_modules/@tanstack/query-core/build/modern/subscribable.js
|
|
40
40
|
var Subscribable = class {
|
|
41
41
|
constructor() {
|
|
42
42
|
this.listeners = /* @__PURE__ */ new Set();
|
|
@@ -59,7 +59,7 @@ var Subscribable = class {
|
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
-
// ../../node_modules/@tanstack/query-core/build/modern/utils.js
|
|
62
|
+
// ../../node_modules/.bun/@tanstack+query-core@5.85.6/node_modules/@tanstack/query-core/build/modern/utils.js
|
|
63
63
|
var isServer = typeof window === "undefined" || "Deno" in globalThis;
|
|
64
64
|
function noop() {
|
|
65
65
|
}
|
|
@@ -167,7 +167,7 @@ function shouldThrowError(throwOnError, params) {
|
|
|
167
167
|
return !!throwOnError;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
-
// ../../node_modules/@tanstack/query-core/build/modern/focusManager.js
|
|
170
|
+
// ../../node_modules/.bun/@tanstack+query-core@5.85.6/node_modules/@tanstack/query-core/build/modern/focusManager.js
|
|
171
171
|
var FocusManager = class extends Subscribable {
|
|
172
172
|
#focused;
|
|
173
173
|
#cleanup;
|
|
@@ -229,7 +229,7 @@ var FocusManager = class extends Subscribable {
|
|
|
229
229
|
};
|
|
230
230
|
var focusManager = new FocusManager();
|
|
231
231
|
|
|
232
|
-
// ../../node_modules/@tanstack/query-core/build/modern/onlineManager.js
|
|
232
|
+
// ../../node_modules/.bun/@tanstack+query-core@5.85.6/node_modules/@tanstack/query-core/build/modern/onlineManager.js
|
|
233
233
|
var OnlineManager = class extends Subscribable {
|
|
234
234
|
#online = true;
|
|
235
235
|
#cleanup;
|
|
@@ -281,7 +281,7 @@ var OnlineManager = class extends Subscribable {
|
|
|
281
281
|
};
|
|
282
282
|
var onlineManager = new OnlineManager();
|
|
283
283
|
|
|
284
|
-
// ../../node_modules/@tanstack/query-core/build/modern/thenable.js
|
|
284
|
+
// ../../node_modules/.bun/@tanstack+query-core@5.85.6/node_modules/@tanstack/query-core/build/modern/thenable.js
|
|
285
285
|
function pendingThenable() {
|
|
286
286
|
let resolve;
|
|
287
287
|
let reject;
|
|
@@ -314,12 +314,12 @@ function pendingThenable() {
|
|
|
314
314
|
return thenable;
|
|
315
315
|
}
|
|
316
316
|
|
|
317
|
-
// ../../node_modules/@tanstack/query-core/build/modern/retryer.js
|
|
317
|
+
// ../../node_modules/.bun/@tanstack+query-core@5.85.6/node_modules/@tanstack/query-core/build/modern/retryer.js
|
|
318
318
|
function canFetch(networkMode) {
|
|
319
319
|
return (networkMode ?? "online") === "online" ? onlineManager.isOnline() : true;
|
|
320
320
|
}
|
|
321
321
|
|
|
322
|
-
// ../../node_modules/@tanstack/query-core/build/modern/notifyManager.js
|
|
322
|
+
// ../../node_modules/.bun/@tanstack+query-core@5.85.6/node_modules/@tanstack/query-core/build/modern/notifyManager.js
|
|
323
323
|
var defaultScheduler = (cb) => setTimeout(cb, 0);
|
|
324
324
|
function createNotifyManager() {
|
|
325
325
|
let queue = [];
|
|
@@ -399,7 +399,7 @@ function createNotifyManager() {
|
|
|
399
399
|
}
|
|
400
400
|
var notifyManager = createNotifyManager();
|
|
401
401
|
|
|
402
|
-
// ../../node_modules/@tanstack/query-core/build/modern/query.js
|
|
402
|
+
// ../../node_modules/.bun/@tanstack+query-core@5.85.6/node_modules/@tanstack/query-core/build/modern/query.js
|
|
403
403
|
function fetchState(data, options) {
|
|
404
404
|
return {
|
|
405
405
|
fetchFailureCount: 0,
|
|
@@ -412,7 +412,7 @@ function fetchState(data, options) {
|
|
|
412
412
|
};
|
|
413
413
|
}
|
|
414
414
|
|
|
415
|
-
// ../../node_modules/@tanstack/query-core/build/modern/queryObserver.js
|
|
415
|
+
// ../../node_modules/.bun/@tanstack+query-core@5.85.6/node_modules/@tanstack/query-core/build/modern/queryObserver.js
|
|
416
416
|
var QueryObserver = class extends Subscribable {
|
|
417
417
|
constructor(client, options) {
|
|
418
418
|
super();
|
|
@@ -860,7 +860,7 @@ function shouldAssignObserverCurrentProperties(observer, optimisticResult) {
|
|
|
860
860
|
return false;
|
|
861
861
|
}
|
|
862
862
|
|
|
863
|
-
// ../../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
|
|
863
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.85.6+f4eacebf2041cd4f/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
|
|
864
864
|
var React = __toESM(require("react"), 1);
|
|
865
865
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
866
866
|
var QueryClientContext = React.createContext(
|
|
@@ -877,13 +877,13 @@ var useQueryClient = (queryClient) => {
|
|
|
877
877
|
return client;
|
|
878
878
|
};
|
|
879
879
|
|
|
880
|
-
// ../../node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js
|
|
880
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.85.6+f4eacebf2041cd4f/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js
|
|
881
881
|
var React2 = __toESM(require("react"), 1);
|
|
882
882
|
var IsRestoringContext = React2.createContext(false);
|
|
883
883
|
var useIsRestoring = () => React2.useContext(IsRestoringContext);
|
|
884
884
|
var IsRestoringProvider = IsRestoringContext.Provider;
|
|
885
885
|
|
|
886
|
-
// ../../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
|
|
886
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.85.6+f4eacebf2041cd4f/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
|
|
887
887
|
var React3 = __toESM(require("react"), 1);
|
|
888
888
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
889
889
|
function createValue() {
|
|
@@ -903,7 +903,7 @@ function createValue() {
|
|
|
903
903
|
var QueryErrorResetBoundaryContext = React3.createContext(createValue());
|
|
904
904
|
var useQueryErrorResetBoundary = () => React3.useContext(QueryErrorResetBoundaryContext);
|
|
905
905
|
|
|
906
|
-
// ../../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js
|
|
906
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.85.6+f4eacebf2041cd4f/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js
|
|
907
907
|
var React4 = __toESM(require("react"), 1);
|
|
908
908
|
var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary) => {
|
|
909
909
|
if (options.suspense || options.throwOnError || options.experimental_prefetchInRender) {
|
|
@@ -927,7 +927,7 @@ var getHasError = ({
|
|
|
927
927
|
return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || shouldThrowError(throwOnError, [result.error, query]));
|
|
928
928
|
};
|
|
929
929
|
|
|
930
|
-
// ../../node_modules/@tanstack/react-query/build/modern/suspense.js
|
|
930
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.85.6+f4eacebf2041cd4f/node_modules/@tanstack/react-query/build/modern/suspense.js
|
|
931
931
|
var ensureSuspenseTimers = (defaultedOptions) => {
|
|
932
932
|
if (defaultedOptions.suspense) {
|
|
933
933
|
const clamp = (value) => value === "static" ? value : Math.max(value ?? 1e3, 1e3);
|
|
@@ -944,7 +944,7 @@ var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observ
|
|
|
944
944
|
errorResetBoundary.clearReset();
|
|
945
945
|
});
|
|
946
946
|
|
|
947
|
-
// ../../node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
|
|
947
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.85.6+f4eacebf2041cd4f/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
|
|
948
948
|
var React5 = __toESM(require("react"), 1);
|
|
949
949
|
function useBaseQuery(options, Observer, queryClient) {
|
|
950
950
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -1028,7 +1028,7 @@ function useBaseQuery(options, Observer, queryClient) {
|
|
|
1028
1028
|
return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;
|
|
1029
1029
|
}
|
|
1030
1030
|
|
|
1031
|
-
// ../../node_modules/@tanstack/react-query/build/modern/useQuery.js
|
|
1031
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.85.6+f4eacebf2041cd4f/node_modules/@tanstack/react-query/build/modern/useQuery.js
|
|
1032
1032
|
function useQuery(options, queryClient) {
|
|
1033
1033
|
return useBaseQuery(options, QueryObserver, queryClient);
|
|
1034
1034
|
}
|
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-BUQLwLrI.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';
|
|
@@ -13,6 +13,6 @@ export { UseReferralsParams, UseReferralsResult, useReferrals } from './hooks/us
|
|
|
13
13
|
import './plan-DSTBzzTY.mjs';
|
|
14
14
|
import 'react';
|
|
15
15
|
import 'react/jsx-runtime';
|
|
16
|
-
import './customer-
|
|
16
|
+
import './customer-DjlCjlmM.mjs';
|
|
17
17
|
import '@tanstack/react-query';
|
|
18
18
|
import './hooks/types.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-dYykqsvL.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';
|
|
@@ -13,6 +13,6 @@ export { UseReferralsParams, UseReferralsResult, useReferrals } from './hooks/us
|
|
|
13
13
|
import './plan-DSTBzzTY.js';
|
|
14
14
|
import 'react';
|
|
15
15
|
import 'react/jsx-runtime';
|
|
16
|
-
import './customer-
|
|
16
|
+
import './customer-CzMuZp8W.js';
|
|
17
17
|
import '@tanstack/react-query';
|
|
18
18
|
import './hooks/types.js';
|
package/dist/react/index.js
CHANGED
|
@@ -57,7 +57,7 @@ var useAutumnClient = ({
|
|
|
57
57
|
return context.client;
|
|
58
58
|
};
|
|
59
59
|
|
|
60
|
-
// ../../node_modules/@tanstack/query-core/build/modern/subscribable.js
|
|
60
|
+
// ../../node_modules/.bun/@tanstack+query-core@5.85.6/node_modules/@tanstack/query-core/build/modern/subscribable.js
|
|
61
61
|
var Subscribable = class {
|
|
62
62
|
constructor() {
|
|
63
63
|
this.listeners = /* @__PURE__ */ new Set();
|
|
@@ -80,7 +80,7 @@ var Subscribable = class {
|
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
-
// ../../node_modules/@tanstack/query-core/build/modern/utils.js
|
|
83
|
+
// ../../node_modules/.bun/@tanstack+query-core@5.85.6/node_modules/@tanstack/query-core/build/modern/utils.js
|
|
84
84
|
var isServer = typeof window === "undefined" || "Deno" in globalThis;
|
|
85
85
|
function noop() {
|
|
86
86
|
}
|
|
@@ -305,7 +305,7 @@ function shouldThrowError(throwOnError, params) {
|
|
|
305
305
|
return !!throwOnError;
|
|
306
306
|
}
|
|
307
307
|
|
|
308
|
-
// ../../node_modules/@tanstack/query-core/build/modern/focusManager.js
|
|
308
|
+
// ../../node_modules/.bun/@tanstack+query-core@5.85.6/node_modules/@tanstack/query-core/build/modern/focusManager.js
|
|
309
309
|
var FocusManager = class extends Subscribable {
|
|
310
310
|
#focused;
|
|
311
311
|
#cleanup;
|
|
@@ -367,7 +367,7 @@ var FocusManager = class extends Subscribable {
|
|
|
367
367
|
};
|
|
368
368
|
var focusManager = new FocusManager();
|
|
369
369
|
|
|
370
|
-
// ../../node_modules/@tanstack/query-core/build/modern/onlineManager.js
|
|
370
|
+
// ../../node_modules/.bun/@tanstack+query-core@5.85.6/node_modules/@tanstack/query-core/build/modern/onlineManager.js
|
|
371
371
|
var OnlineManager = class extends Subscribable {
|
|
372
372
|
#online = true;
|
|
373
373
|
#cleanup;
|
|
@@ -419,7 +419,7 @@ var OnlineManager = class extends Subscribable {
|
|
|
419
419
|
};
|
|
420
420
|
var onlineManager = new OnlineManager();
|
|
421
421
|
|
|
422
|
-
// ../../node_modules/@tanstack/query-core/build/modern/thenable.js
|
|
422
|
+
// ../../node_modules/.bun/@tanstack+query-core@5.85.6/node_modules/@tanstack/query-core/build/modern/thenable.js
|
|
423
423
|
function pendingThenable() {
|
|
424
424
|
let resolve;
|
|
425
425
|
let reject;
|
|
@@ -452,7 +452,7 @@ function pendingThenable() {
|
|
|
452
452
|
return thenable;
|
|
453
453
|
}
|
|
454
454
|
|
|
455
|
-
// ../../node_modules/@tanstack/query-core/build/modern/retryer.js
|
|
455
|
+
// ../../node_modules/.bun/@tanstack+query-core@5.85.6/node_modules/@tanstack/query-core/build/modern/retryer.js
|
|
456
456
|
function defaultRetryDelay(failureCount) {
|
|
457
457
|
return Math.min(1e3 * 2 ** failureCount, 3e4);
|
|
458
458
|
}
|
|
@@ -572,7 +572,7 @@ function createRetryer(config) {
|
|
|
572
572
|
};
|
|
573
573
|
}
|
|
574
574
|
|
|
575
|
-
// ../../node_modules/@tanstack/query-core/build/modern/notifyManager.js
|
|
575
|
+
// ../../node_modules/.bun/@tanstack+query-core@5.85.6/node_modules/@tanstack/query-core/build/modern/notifyManager.js
|
|
576
576
|
var defaultScheduler = (cb) => setTimeout(cb, 0);
|
|
577
577
|
function createNotifyManager() {
|
|
578
578
|
let queue = [];
|
|
@@ -652,7 +652,7 @@ function createNotifyManager() {
|
|
|
652
652
|
}
|
|
653
653
|
var notifyManager = createNotifyManager();
|
|
654
654
|
|
|
655
|
-
// ../../node_modules/@tanstack/query-core/build/modern/removable.js
|
|
655
|
+
// ../../node_modules/.bun/@tanstack+query-core@5.85.6/node_modules/@tanstack/query-core/build/modern/removable.js
|
|
656
656
|
var Removable = class {
|
|
657
657
|
#gcTimeout;
|
|
658
658
|
destroy() {
|
|
@@ -680,7 +680,7 @@ var Removable = class {
|
|
|
680
680
|
}
|
|
681
681
|
};
|
|
682
682
|
|
|
683
|
-
// ../../node_modules/@tanstack/query-core/build/modern/query.js
|
|
683
|
+
// ../../node_modules/.bun/@tanstack+query-core@5.85.6/node_modules/@tanstack/query-core/build/modern/query.js
|
|
684
684
|
var Query = class extends Removable {
|
|
685
685
|
#initialState;
|
|
686
686
|
#revertState;
|
|
@@ -1081,7 +1081,7 @@ function getDefaultState(options) {
|
|
|
1081
1081
|
};
|
|
1082
1082
|
}
|
|
1083
1083
|
|
|
1084
|
-
// ../../node_modules/@tanstack/query-core/build/modern/queryCache.js
|
|
1084
|
+
// ../../node_modules/.bun/@tanstack+query-core@5.85.6/node_modules/@tanstack/query-core/build/modern/queryCache.js
|
|
1085
1085
|
var QueryCache = class extends Subscribable {
|
|
1086
1086
|
constructor(config = {}) {
|
|
1087
1087
|
super();
|
|
@@ -1171,7 +1171,7 @@ var QueryCache = class extends Subscribable {
|
|
|
1171
1171
|
}
|
|
1172
1172
|
};
|
|
1173
1173
|
|
|
1174
|
-
// ../../node_modules/@tanstack/query-core/build/modern/mutation.js
|
|
1174
|
+
// ../../node_modules/.bun/@tanstack+query-core@5.85.6/node_modules/@tanstack/query-core/build/modern/mutation.js
|
|
1175
1175
|
var Mutation = class extends Removable {
|
|
1176
1176
|
#observers;
|
|
1177
1177
|
#mutationCache;
|
|
@@ -1402,7 +1402,7 @@ function getDefaultState2() {
|
|
|
1402
1402
|
};
|
|
1403
1403
|
}
|
|
1404
1404
|
|
|
1405
|
-
// ../../node_modules/@tanstack/query-core/build/modern/mutationCache.js
|
|
1405
|
+
// ../../node_modules/.bun/@tanstack+query-core@5.85.6/node_modules/@tanstack/query-core/build/modern/mutationCache.js
|
|
1406
1406
|
var MutationCache = class extends Subscribable {
|
|
1407
1407
|
constructor(config = {}) {
|
|
1408
1408
|
super();
|
|
@@ -1518,7 +1518,7 @@ function scopeFor(mutation) {
|
|
|
1518
1518
|
return mutation.options.scope?.id;
|
|
1519
1519
|
}
|
|
1520
1520
|
|
|
1521
|
-
// ../../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js
|
|
1521
|
+
// ../../node_modules/.bun/@tanstack+query-core@5.85.6/node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js
|
|
1522
1522
|
function infiniteQueryBehavior(pages) {
|
|
1523
1523
|
return {
|
|
1524
1524
|
onFetch: (context, query) => {
|
|
@@ -1627,7 +1627,7 @@ function getPreviousPageParam(options, { pages, pageParams }) {
|
|
|
1627
1627
|
return pages.length > 0 ? options.getPreviousPageParam?.(pages[0], pages, pageParams[0], pageParams) : void 0;
|
|
1628
1628
|
}
|
|
1629
1629
|
|
|
1630
|
-
// ../../node_modules/@tanstack/query-core/build/modern/queryClient.js
|
|
1630
|
+
// ../../node_modules/.bun/@tanstack+query-core@5.85.6/node_modules/@tanstack/query-core/build/modern/queryClient.js
|
|
1631
1631
|
var QueryClient = class {
|
|
1632
1632
|
#queryCache;
|
|
1633
1633
|
#mutationCache;
|
|
@@ -1914,7 +1914,7 @@ var QueryClient = class {
|
|
|
1914
1914
|
}
|
|
1915
1915
|
};
|
|
1916
1916
|
|
|
1917
|
-
// ../../node_modules/@tanstack/query-core/build/modern/queryObserver.js
|
|
1917
|
+
// ../../node_modules/.bun/@tanstack+query-core@5.85.6/node_modules/@tanstack/query-core/build/modern/queryObserver.js
|
|
1918
1918
|
var QueryObserver = class extends Subscribable {
|
|
1919
1919
|
constructor(client, options) {
|
|
1920
1920
|
super();
|
|
@@ -2362,7 +2362,7 @@ function shouldAssignObserverCurrentProperties(observer, optimisticResult) {
|
|
|
2362
2362
|
return false;
|
|
2363
2363
|
}
|
|
2364
2364
|
|
|
2365
|
-
// ../../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
|
|
2365
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.85.6+f4eacebf2041cd4f/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
|
|
2366
2366
|
var React = __toESM(require("react"), 1);
|
|
2367
2367
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
2368
2368
|
var QueryClientContext = React.createContext(
|
|
@@ -2391,13 +2391,13 @@ var QueryClientProvider = ({
|
|
|
2391
2391
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QueryClientContext.Provider, { value: client, children });
|
|
2392
2392
|
};
|
|
2393
2393
|
|
|
2394
|
-
// ../../node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js
|
|
2394
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.85.6+f4eacebf2041cd4f/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js
|
|
2395
2395
|
var React2 = __toESM(require("react"), 1);
|
|
2396
2396
|
var IsRestoringContext = React2.createContext(false);
|
|
2397
2397
|
var useIsRestoring = () => React2.useContext(IsRestoringContext);
|
|
2398
2398
|
var IsRestoringProvider = IsRestoringContext.Provider;
|
|
2399
2399
|
|
|
2400
|
-
// ../../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
|
|
2400
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.85.6+f4eacebf2041cd4f/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
|
|
2401
2401
|
var React3 = __toESM(require("react"), 1);
|
|
2402
2402
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
2403
2403
|
function createValue() {
|
|
@@ -2417,7 +2417,7 @@ function createValue() {
|
|
|
2417
2417
|
var QueryErrorResetBoundaryContext = React3.createContext(createValue());
|
|
2418
2418
|
var useQueryErrorResetBoundary = () => React3.useContext(QueryErrorResetBoundaryContext);
|
|
2419
2419
|
|
|
2420
|
-
// ../../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js
|
|
2420
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.85.6+f4eacebf2041cd4f/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js
|
|
2421
2421
|
var React4 = __toESM(require("react"), 1);
|
|
2422
2422
|
var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary) => {
|
|
2423
2423
|
if (options.suspense || options.throwOnError || options.experimental_prefetchInRender) {
|
|
@@ -2441,7 +2441,7 @@ var getHasError = ({
|
|
|
2441
2441
|
return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || shouldThrowError(throwOnError, [result.error, query]));
|
|
2442
2442
|
};
|
|
2443
2443
|
|
|
2444
|
-
// ../../node_modules/@tanstack/react-query/build/modern/suspense.js
|
|
2444
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.85.6+f4eacebf2041cd4f/node_modules/@tanstack/react-query/build/modern/suspense.js
|
|
2445
2445
|
var ensureSuspenseTimers = (defaultedOptions) => {
|
|
2446
2446
|
if (defaultedOptions.suspense) {
|
|
2447
2447
|
const clamp = (value) => value === "static" ? value : Math.max(value ?? 1e3, 1e3);
|
|
@@ -2458,7 +2458,7 @@ var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observ
|
|
|
2458
2458
|
errorResetBoundary.clearReset();
|
|
2459
2459
|
});
|
|
2460
2460
|
|
|
2461
|
-
// ../../node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
|
|
2461
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.85.6+f4eacebf2041cd4f/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
|
|
2462
2462
|
var React5 = __toESM(require("react"), 1);
|
|
2463
2463
|
function useBaseQuery(options, Observer, queryClient) {
|
|
2464
2464
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -2542,7 +2542,7 @@ function useBaseQuery(options, Observer, queryClient) {
|
|
|
2542
2542
|
return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;
|
|
2543
2543
|
}
|
|
2544
2544
|
|
|
2545
|
-
// ../../node_modules/@tanstack/react-query/build/modern/useQuery.js
|
|
2545
|
+
// ../../node_modules/.bun/@tanstack+react-query@5.85.6+f4eacebf2041cd4f/node_modules/@tanstack/react-query/build/modern/useQuery.js
|
|
2546
2546
|
function useQuery(options, queryClient) {
|
|
2547
2547
|
return useBaseQuery(options, QueryObserver, queryClient);
|
|
2548
2548
|
}
|
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-26CKSAPZ.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-CHU7CIWP.mjs";
|
|
16
16
|
import {
|
|
17
17
|
useCustomer
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-ZGPE4R6H.mjs";
|
|
19
|
+
import "./chunk-KB72KQKN.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-OXQG65ZT.mjs";
|
|
28
28
|
import {
|
|
29
29
|
useListEvents
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-MC2YYATT.mjs";
|
|
31
31
|
import {
|
|
32
32
|
useListPlans
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-HSQUB3BZ.mjs";
|
|
34
34
|
import {
|
|
35
35
|
useReferrals
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import "./chunk-
|
|
36
|
+
} from "./chunk-G7FTQLT7.mjs";
|
|
37
|
+
import "./chunk-XJZH5NMZ.mjs";
|
|
38
38
|
import {
|
|
39
39
|
useAutumnClient
|
|
40
40
|
} from "./chunk-SOA7GEAN.mjs";
|
|
@@ -3325,6 +3325,54 @@ type EventsListParams = {
|
|
|
3325
3325
|
*/
|
|
3326
3326
|
customRange?: ListEventsCustomRange | undefined;
|
|
3327
3327
|
};
|
|
3328
|
+
declare const ListEventsIntervalEnum: {
|
|
3329
|
+
readonly OneOff: "one_off";
|
|
3330
|
+
readonly Minute: "minute";
|
|
3331
|
+
readonly Hour: "hour";
|
|
3332
|
+
readonly Day: "day";
|
|
3333
|
+
readonly Week: "week";
|
|
3334
|
+
readonly Month: "month";
|
|
3335
|
+
readonly Quarter: "quarter";
|
|
3336
|
+
readonly SemiAnnual: "semi_annual";
|
|
3337
|
+
readonly Year: "year";
|
|
3338
|
+
};
|
|
3339
|
+
type ListEventsIntervalEnum = OpenEnum<typeof ListEventsIntervalEnum>;
|
|
3340
|
+
type ListEventsReset = {
|
|
3341
|
+
/**
|
|
3342
|
+
* The reset interval (hour, day, week, month, etc.) or 'multiple' if combined from different intervals.
|
|
3343
|
+
*/
|
|
3344
|
+
interval: ListEventsIntervalEnum | string;
|
|
3345
|
+
/**
|
|
3346
|
+
* Number of intervals between resets (eg. 2 for bi-monthly).
|
|
3347
|
+
*/
|
|
3348
|
+
intervalCount?: number | undefined;
|
|
3349
|
+
/**
|
|
3350
|
+
* Timestamp when the balance will next reset.
|
|
3351
|
+
*/
|
|
3352
|
+
resetsAt: number | null;
|
|
3353
|
+
};
|
|
3354
|
+
type Deductions = {
|
|
3355
|
+
/**
|
|
3356
|
+
* ID of the underlying balance row that was deducted from (customer_entitlement or rollover).
|
|
3357
|
+
*/
|
|
3358
|
+
balanceId: string;
|
|
3359
|
+
/**
|
|
3360
|
+
* The feature this balance belongs to.
|
|
3361
|
+
*/
|
|
3362
|
+
featureId: string;
|
|
3363
|
+
/**
|
|
3364
|
+
* ID of the plan/product this balance belongs to. Null when the balance can't be attributed to a single plan (e.g. it spans multiple).
|
|
3365
|
+
*/
|
|
3366
|
+
planId: string | null;
|
|
3367
|
+
/**
|
|
3368
|
+
* Reset configuration for the balance this deduction came from, or null if the balance doesn't reset.
|
|
3369
|
+
*/
|
|
3370
|
+
reset: ListEventsReset | null;
|
|
3371
|
+
/**
|
|
3372
|
+
* Amount deducted from this balance. Positive when usage was consumed, negative when credit was restored (e.g. a refund via negative track value).
|
|
3373
|
+
*/
|
|
3374
|
+
value: number;
|
|
3375
|
+
};
|
|
3328
3376
|
type ListEventsList = {
|
|
3329
3377
|
/**
|
|
3330
3378
|
* Event ID (KSUID)
|
|
@@ -3352,6 +3400,10 @@ type ListEventsList = {
|
|
|
3352
3400
|
properties: {
|
|
3353
3401
|
[k: string]: any;
|
|
3354
3402
|
};
|
|
3403
|
+
/**
|
|
3404
|
+
* Per-balance breakdown of what this event deducted. Null for events ingested before deductions were tracked; an empty array means the event was accepted but no balance moved.
|
|
3405
|
+
*/
|
|
3406
|
+
deductions: Array<Deductions> | null;
|
|
3355
3407
|
};
|
|
3356
3408
|
/**
|
|
3357
3409
|
* OK
|
|
@@ -3325,6 +3325,54 @@ type EventsListParams = {
|
|
|
3325
3325
|
*/
|
|
3326
3326
|
customRange?: ListEventsCustomRange | undefined;
|
|
3327
3327
|
};
|
|
3328
|
+
declare const ListEventsIntervalEnum: {
|
|
3329
|
+
readonly OneOff: "one_off";
|
|
3330
|
+
readonly Minute: "minute";
|
|
3331
|
+
readonly Hour: "hour";
|
|
3332
|
+
readonly Day: "day";
|
|
3333
|
+
readonly Week: "week";
|
|
3334
|
+
readonly Month: "month";
|
|
3335
|
+
readonly Quarter: "quarter";
|
|
3336
|
+
readonly SemiAnnual: "semi_annual";
|
|
3337
|
+
readonly Year: "year";
|
|
3338
|
+
};
|
|
3339
|
+
type ListEventsIntervalEnum = OpenEnum<typeof ListEventsIntervalEnum>;
|
|
3340
|
+
type ListEventsReset = {
|
|
3341
|
+
/**
|
|
3342
|
+
* The reset interval (hour, day, week, month, etc.) or 'multiple' if combined from different intervals.
|
|
3343
|
+
*/
|
|
3344
|
+
interval: ListEventsIntervalEnum | string;
|
|
3345
|
+
/**
|
|
3346
|
+
* Number of intervals between resets (eg. 2 for bi-monthly).
|
|
3347
|
+
*/
|
|
3348
|
+
intervalCount?: number | undefined;
|
|
3349
|
+
/**
|
|
3350
|
+
* Timestamp when the balance will next reset.
|
|
3351
|
+
*/
|
|
3352
|
+
resetsAt: number | null;
|
|
3353
|
+
};
|
|
3354
|
+
type Deductions = {
|
|
3355
|
+
/**
|
|
3356
|
+
* ID of the underlying balance row that was deducted from (customer_entitlement or rollover).
|
|
3357
|
+
*/
|
|
3358
|
+
balanceId: string;
|
|
3359
|
+
/**
|
|
3360
|
+
* The feature this balance belongs to.
|
|
3361
|
+
*/
|
|
3362
|
+
featureId: string;
|
|
3363
|
+
/**
|
|
3364
|
+
* ID of the plan/product this balance belongs to. Null when the balance can't be attributed to a single plan (e.g. it spans multiple).
|
|
3365
|
+
*/
|
|
3366
|
+
planId: string | null;
|
|
3367
|
+
/**
|
|
3368
|
+
* Reset configuration for the balance this deduction came from, or null if the balance doesn't reset.
|
|
3369
|
+
*/
|
|
3370
|
+
reset: ListEventsReset | null;
|
|
3371
|
+
/**
|
|
3372
|
+
* Amount deducted from this balance. Positive when usage was consumed, negative when credit was restored (e.g. a refund via negative track value).
|
|
3373
|
+
*/
|
|
3374
|
+
value: number;
|
|
3375
|
+
};
|
|
3328
3376
|
type ListEventsList = {
|
|
3329
3377
|
/**
|
|
3330
3378
|
* Event ID (KSUID)
|
|
@@ -3352,6 +3400,10 @@ type ListEventsList = {
|
|
|
3352
3400
|
properties: {
|
|
3353
3401
|
[k: string]: any;
|
|
3354
3402
|
};
|
|
3403
|
+
/**
|
|
3404
|
+
* Per-balance breakdown of what this event deducted. Null for events ingested before deductions were tracked; an empty array means the event was accepted but no balance moved.
|
|
3405
|
+
*/
|
|
3406
|
+
deductions: Array<Deductions> | null;
|
|
3355
3407
|
};
|
|
3356
3408
|
/**
|
|
3357
3409
|
* OK
|