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.
Files changed (144) hide show
  1. package/dist/backend/adapters/express.js +2481 -1919
  2. package/dist/backend/adapters/express.mjs +9 -9
  3. package/dist/backend/adapters/fetch.js +2481 -1919
  4. package/dist/backend/adapters/fetch.mjs +9 -9
  5. package/dist/backend/adapters/hono.js +2481 -1919
  6. package/dist/backend/adapters/hono.mjs +9 -9
  7. package/dist/backend/adapters/index.js +2481 -1919
  8. package/dist/backend/adapters/index.mjs +12 -12
  9. package/dist/backend/adapters/next.js +2481 -1919
  10. package/dist/backend/adapters/next.mjs +9 -9
  11. package/dist/backend/{chunk-VZ5YXSHU.mjs → chunk-5JNYI5HM.mjs} +1 -1
  12. package/dist/backend/{chunk-USOCI4FE.mjs → chunk-73KXFYFC.mjs} +5 -5
  13. package/dist/backend/{chunk-T5RLLZJB.mjs → chunk-GKYVE5XN.mjs} +2424 -1881
  14. package/dist/backend/{chunk-ATDRCSQT.mjs → chunk-H6KJYTJY.mjs} +7 -7
  15. package/dist/backend/{chunk-3TCAUBKX.mjs → chunk-K2JSUNJX.mjs} +1 -1
  16. package/dist/backend/{chunk-JAP7IT2U.mjs → chunk-NNIHXZQM.mjs} +1 -1
  17. package/dist/backend/{chunk-IJ2K62QI.mjs → chunk-NSHGFU5H.mjs} +59 -40
  18. package/dist/backend/{chunk-XBCWZIUH.mjs → chunk-TGR2RWLO.mjs} +1 -1
  19. package/dist/backend/core/handlers/coreHandler.d.mts +1 -1
  20. package/dist/backend/core/handlers/coreHandler.d.ts +1 -1
  21. package/dist/backend/core/handlers/coreHandler.js +2481 -1919
  22. package/dist/backend/core/handlers/coreHandler.mjs +7 -7
  23. package/dist/backend/core/handlers/executeRoute.d.mts +1 -1
  24. package/dist/backend/core/handlers/executeRoute.d.ts +1 -1
  25. package/dist/backend/core/handlers/executeRoute.mjs +4 -4
  26. package/dist/backend/core/handlers/handleRouteByName.js +2481 -1919
  27. package/dist/backend/core/handlers/handleRouteByName.mjs +7 -7
  28. package/dist/backend/core/handlers/index.d.mts +1 -1
  29. package/dist/backend/core/handlers/index.d.ts +1 -1
  30. package/dist/backend/core/handlers/index.js +2481 -1919
  31. package/dist/backend/core/handlers/index.mjs +10 -10
  32. package/dist/backend/core/index.d.mts +1 -1
  33. package/dist/backend/core/index.d.ts +1 -1
  34. package/dist/backend/core/index.js +2481 -1919
  35. package/dist/backend/core/index.mjs +10 -10
  36. package/dist/backend/core/routes/index.d.mts +1 -1
  37. package/dist/backend/core/routes/index.d.ts +1 -1
  38. package/dist/backend/core/routes/index.js +59 -40
  39. package/dist/backend/core/routes/index.mjs +2 -2
  40. package/dist/backend/core/routes/routeBuilder.d.mts +1 -1
  41. package/dist/backend/core/routes/routeBuilder.d.ts +1 -1
  42. package/dist/backend/core/routes/routeConfigs.d.mts +1 -1
  43. package/dist/backend/core/routes/routeConfigs.d.ts +1 -1
  44. package/dist/backend/core/routes/routeConfigs.js +59 -40
  45. package/dist/backend/core/routes/routeConfigs.mjs +2 -2
  46. package/dist/backend/core/types/handlerTypes.d.mts +1 -1
  47. package/dist/backend/core/types/handlerTypes.d.ts +1 -1
  48. package/dist/backend/core/types/index.d.mts +1 -1
  49. package/dist/backend/core/types/index.d.ts +1 -1
  50. package/dist/backend/core/types/routeTypes.d.mts +1 -1
  51. package/dist/backend/core/types/routeTypes.d.ts +1 -1
  52. package/dist/backend/core/utils/index.mjs +3 -3
  53. package/dist/backend/index.d.mts +2 -2
  54. package/dist/backend/index.d.ts +2 -2
  55. package/dist/backend/index.js +2481 -1919
  56. package/dist/backend/index.mjs +10 -10
  57. package/dist/backend/{routeTypes-gNxrwRsV.d.ts → routeTypes-B-Bkse9m.d.ts} +628 -7
  58. package/dist/backend/{routeTypes-BCnBLtb9.d.mts → routeTypes-DZFxBYSb.d.mts} +628 -7
  59. package/dist/better-auth/{chunk-VAQYB57J.mjs → chunk-4OLXYKUC.mjs} +2425 -1882
  60. package/dist/better-auth/{chunk-4QQUN4SQ.mjs → chunk-R35KMMJZ.mjs} +1 -1
  61. package/dist/better-auth/{chunk-XXPUYN7Z.mjs → chunk-X6KOCWP3.mjs} +59 -40
  62. package/dist/better-auth/index.js +2476 -1914
  63. package/dist/better-auth/index.mjs +3 -3
  64. package/dist/better-auth/utils/createAutumnEndpoint.js +59 -40
  65. package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
  66. package/dist/better-auth/utils/handleBetterAuthRoute.js +2481 -1919
  67. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
  68. package/dist/better-auth/utils/index.js +2476 -1914
  69. package/dist/better-auth/utils/index.mjs +3 -3
  70. package/dist/react/AutumnContext.d.mts +2 -2
  71. package/dist/react/AutumnContext.d.ts +2 -2
  72. package/dist/react/AutumnProvider.js +15 -15
  73. package/dist/react/AutumnProvider.mjs +2 -2
  74. package/dist/react/{chunk-7IDH4OMG.mjs → chunk-26CKSAPZ.mjs} +1 -1
  75. package/dist/react/{chunk-NSFHAUTD.mjs → chunk-CHU7CIWP.mjs} +1 -1
  76. package/dist/react/{chunk-YQFYWH7J.mjs → chunk-G7FTQLT7.mjs} +1 -1
  77. package/dist/react/{chunk-BDG6JHEW.mjs → chunk-HSQUB3BZ.mjs} +1 -1
  78. package/dist/react/{chunk-DEZBJQEG.mjs → chunk-KB72KQKN.mjs} +1 -1
  79. package/dist/react/{chunk-J6SLKTKE.mjs → chunk-MC2YYATT.mjs} +1 -1
  80. package/dist/react/{chunk-FWWIAOPU.mjs → chunk-OXQG65ZT.mjs} +1 -1
  81. package/dist/react/{chunk-E5ZHOMZ4.mjs → chunk-XJZH5NMZ.mjs} +23 -23
  82. package/dist/react/{chunk-HVBDZARN.mjs → chunk-ZGPE4R6H.mjs} +2 -2
  83. package/dist/react/client/AutumnClient.d.mts +2 -2
  84. package/dist/react/client/AutumnClient.d.ts +2 -2
  85. package/dist/react/client/IAutumnClient.d.mts +2 -2
  86. package/dist/react/client/IAutumnClient.d.ts +2 -2
  87. package/dist/react/client/index.d.mts +2 -2
  88. package/dist/react/client/index.d.ts +2 -2
  89. package/dist/react/{customer-SSq4WO45.d.ts → customer-CzMuZp8W.d.ts} +1 -0
  90. package/dist/react/{customer-BgMiezZt.d.mts → customer-DjlCjlmM.d.mts} +1 -0
  91. package/dist/react/hooks/index.d.mts +2 -2
  92. package/dist/react/hooks/index.d.ts +2 -2
  93. package/dist/react/hooks/index.js +16 -16
  94. package/dist/react/hooks/index.mjs +8 -8
  95. package/dist/react/hooks/internal/check/balanceToAllowed.d.mts +1 -1
  96. package/dist/react/hooks/internal/check/balanceToAllowed.d.ts +1 -1
  97. package/dist/react/hooks/internal/check/customerToFeatures.d.mts +1 -1
  98. package/dist/react/hooks/internal/check/customerToFeatures.d.ts +1 -1
  99. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.mts +1 -1
  100. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.ts +1 -1
  101. package/dist/react/hooks/internal/check/getCreditCost.d.mts +1 -1
  102. package/dist/react/hooks/internal/check/getCreditCost.d.ts +1 -1
  103. package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +2 -2
  104. package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +2 -2
  105. package/dist/react/hooks/internal/useCustomerActions.d.mts +2 -2
  106. package/dist/react/hooks/internal/useCustomerActions.d.ts +2 -2
  107. package/dist/react/hooks/internal/useCustomerActions.js +1 -1
  108. package/dist/react/hooks/internal/useCustomerActions.mjs +2 -2
  109. package/dist/react/hooks/useAggregateEvents.d.mts +1 -1
  110. package/dist/react/hooks/useAggregateEvents.d.ts +1 -1
  111. package/dist/react/hooks/useAggregateEvents.js +16 -16
  112. package/dist/react/hooks/useAggregateEvents.mjs +2 -2
  113. package/dist/react/hooks/useCustomer.d.mts +2 -2
  114. package/dist/react/hooks/useCustomer.d.ts +2 -2
  115. package/dist/react/hooks/useCustomer.js +16 -16
  116. package/dist/react/hooks/useCustomer.mjs +3 -3
  117. package/dist/react/hooks/useEntity.d.mts +1 -1
  118. package/dist/react/hooks/useEntity.d.ts +1 -1
  119. package/dist/react/hooks/useEntity.js +16 -16
  120. package/dist/react/hooks/useEntity.mjs +2 -2
  121. package/dist/react/hooks/useListEvents.d.mts +1 -1
  122. package/dist/react/hooks/useListEvents.d.ts +1 -1
  123. package/dist/react/hooks/useListEvents.js +16 -16
  124. package/dist/react/hooks/useListEvents.mjs +2 -2
  125. package/dist/react/hooks/useListPlans.d.mts +1 -1
  126. package/dist/react/hooks/useListPlans.d.ts +1 -1
  127. package/dist/react/hooks/useListPlans.js +16 -16
  128. package/dist/react/hooks/useListPlans.mjs +2 -2
  129. package/dist/react/hooks/useReferrals.d.mts +1 -1
  130. package/dist/react/hooks/useReferrals.d.ts +1 -1
  131. package/dist/react/hooks/useReferrals.js +16 -16
  132. package/dist/react/hooks/useReferrals.mjs +2 -2
  133. package/dist/react/index.d.mts +2 -2
  134. package/dist/react/index.d.ts +2 -2
  135. package/dist/react/index.js +22 -22
  136. package/dist/react/index.mjs +9 -9
  137. package/dist/react/{params--mMxYT5w.d.mts → params-BUQLwLrI.d.mts} +52 -0
  138. package/dist/react/{params-DVrQcAu7.d.ts → params-dYykqsvL.d.ts} +52 -0
  139. package/dist/sdk/index.d.mts +850 -106
  140. package/dist/sdk/index.d.ts +850 -106
  141. package/dist/sdk/index.js +4314 -3545
  142. package/dist/sdk/index.mjs +4240 -3539
  143. package/package.json +1 -1
  144. 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
  }
@@ -2,8 +2,8 @@
2
2
  "use client";
3
3
  import {
4
4
  useReferrals
5
- } from "../chunk-YQFYWH7J.mjs";
6
- import "../chunk-E5ZHOMZ4.mjs";
5
+ } from "../chunk-G7FTQLT7.mjs";
6
+ import "../chunk-XJZH5NMZ.mjs";
7
7
  import "../chunk-SOA7GEAN.mjs";
8
8
  export {
9
9
  useReferrals
@@ -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--mMxYT5w.mjs';
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-BgMiezZt.mjs';
16
+ import './customer-DjlCjlmM.mjs';
17
17
  import '@tanstack/react-query';
18
18
  import './hooks/types.mjs';
@@ -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-DVrQcAu7.js';
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-SSq4WO45.js';
16
+ import './customer-CzMuZp8W.js';
17
17
  import '@tanstack/react-query';
18
18
  import './hooks/types.js';
@@ -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
  }
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  AutumnProvider
4
- } from "./chunk-7IDH4OMG.mjs";
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-NSFHAUTD.mjs";
15
+ } from "./chunk-CHU7CIWP.mjs";
16
16
  import {
17
17
  useCustomer
18
- } from "./chunk-HVBDZARN.mjs";
19
- import "./chunk-DEZBJQEG.mjs";
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-FWWIAOPU.mjs";
27
+ } from "./chunk-OXQG65ZT.mjs";
28
28
  import {
29
29
  useListEvents
30
- } from "./chunk-J6SLKTKE.mjs";
30
+ } from "./chunk-MC2YYATT.mjs";
31
31
  import {
32
32
  useListPlans
33
- } from "./chunk-BDG6JHEW.mjs";
33
+ } from "./chunk-HSQUB3BZ.mjs";
34
34
  import {
35
35
  useReferrals
36
- } from "./chunk-YQFYWH7J.mjs";
37
- import "./chunk-E5ZHOMZ4.mjs";
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