autumn-js 1.2.38 → 1.2.39

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 (108) hide show
  1. package/dist/backend/adapters/express.js +319 -101
  2. package/dist/backend/adapters/express.mjs +8 -8
  3. package/dist/backend/adapters/fetch.js +319 -101
  4. package/dist/backend/adapters/fetch.mjs +8 -8
  5. package/dist/backend/adapters/hono.js +319 -101
  6. package/dist/backend/adapters/hono.mjs +8 -8
  7. package/dist/backend/adapters/index.js +319 -101
  8. package/dist/backend/adapters/index.mjs +11 -11
  9. package/dist/backend/adapters/next.js +319 -101
  10. package/dist/backend/adapters/next.mjs +8 -8
  11. package/dist/backend/{chunk-CEUAUTNB.mjs → chunk-5IUIFE55.mjs} +1 -1
  12. package/dist/backend/{chunk-ZR5K6VMA.mjs → chunk-GL2SBEQ5.mjs} +1 -1
  13. package/dist/backend/{chunk-Y3AJLHVL.mjs → chunk-KJP3DHPM.mjs} +1 -1
  14. package/dist/backend/{chunk-N52JKSJ7.mjs → chunk-KM5AXZWJ.mjs} +4 -4
  15. package/dist/backend/{chunk-5C7KP2BU.mjs → chunk-MSMJS42G.mjs} +319 -101
  16. package/dist/backend/{chunk-TIFFBW34.mjs → chunk-UMTASWZL.mjs} +1 -1
  17. package/dist/backend/{chunk-PKM7CEE3.mjs → chunk-V32P22RC.mjs} +6 -6
  18. package/dist/backend/core/handlers/coreHandler.d.mts +1 -1
  19. package/dist/backend/core/handlers/coreHandler.d.ts +1 -1
  20. package/dist/backend/core/handlers/coreHandler.js +319 -101
  21. package/dist/backend/core/handlers/coreHandler.mjs +6 -6
  22. package/dist/backend/core/handlers/executeRoute.d.mts +1 -1
  23. package/dist/backend/core/handlers/executeRoute.d.ts +1 -1
  24. package/dist/backend/core/handlers/executeRoute.mjs +4 -4
  25. package/dist/backend/core/handlers/handleRouteByName.js +319 -101
  26. package/dist/backend/core/handlers/handleRouteByName.mjs +6 -6
  27. package/dist/backend/core/handlers/index.d.mts +1 -1
  28. package/dist/backend/core/handlers/index.d.ts +1 -1
  29. package/dist/backend/core/handlers/index.js +319 -101
  30. package/dist/backend/core/handlers/index.mjs +10 -10
  31. package/dist/backend/core/index.d.mts +1 -1
  32. package/dist/backend/core/index.d.ts +1 -1
  33. package/dist/backend/core/index.js +319 -101
  34. package/dist/backend/core/index.mjs +9 -9
  35. package/dist/backend/core/routes/index.d.mts +1 -1
  36. package/dist/backend/core/routes/index.d.ts +1 -1
  37. package/dist/backend/core/routes/index.mjs +1 -1
  38. package/dist/backend/core/routes/routeBuilder.d.mts +1 -1
  39. package/dist/backend/core/routes/routeBuilder.d.ts +1 -1
  40. package/dist/backend/core/routes/routeConfigs.d.mts +1 -1
  41. package/dist/backend/core/routes/routeConfigs.d.ts +1 -1
  42. package/dist/backend/core/routes/routeConfigs.mjs +1 -1
  43. package/dist/backend/core/types/handlerTypes.d.mts +1 -1
  44. package/dist/backend/core/types/handlerTypes.d.ts +1 -1
  45. package/dist/backend/core/types/index.d.mts +1 -1
  46. package/dist/backend/core/types/index.d.ts +1 -1
  47. package/dist/backend/core/types/routeTypes.d.mts +1 -1
  48. package/dist/backend/core/types/routeTypes.d.ts +1 -1
  49. package/dist/backend/core/utils/index.mjs +3 -3
  50. package/dist/backend/index.d.mts +2 -2
  51. package/dist/backend/index.d.ts +2 -2
  52. package/dist/backend/index.js +319 -101
  53. package/dist/backend/index.mjs +9 -9
  54. package/dist/backend/{routeTypes-gWhxv6xo.d.mts → routeTypes-CIqS7yVo.d.mts} +641 -97
  55. package/dist/backend/{routeTypes-C8YKwtFL.d.ts → routeTypes-uWaE8YYa.d.ts} +641 -97
  56. package/dist/better-auth/{chunk-A3ZOJU54.mjs → chunk-LLBM6UQN.mjs} +319 -101
  57. package/dist/better-auth/index.js +319 -101
  58. package/dist/better-auth/index.mjs +1 -1
  59. package/dist/better-auth/utils/handleBetterAuthRoute.js +319 -101
  60. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +1 -1
  61. package/dist/better-auth/utils/index.js +319 -101
  62. package/dist/better-auth/utils/index.mjs +1 -1
  63. package/dist/react/AutumnContext.d.mts +2 -2
  64. package/dist/react/AutumnContext.d.ts +2 -2
  65. package/dist/react/client/AutumnClient.d.mts +2 -2
  66. package/dist/react/client/AutumnClient.d.ts +2 -2
  67. package/dist/react/client/IAutumnClient.d.mts +2 -2
  68. package/dist/react/client/IAutumnClient.d.ts +2 -2
  69. package/dist/react/client/index.d.mts +2 -2
  70. package/dist/react/client/index.d.ts +2 -2
  71. package/dist/react/{customer-D811_jP2.d.ts → customer-CrxRrY4o.d.ts} +99 -24
  72. package/dist/react/{customer-CkuydPCd.d.mts → customer-DM044m1a.d.mts} +99 -24
  73. package/dist/react/hooks/index.d.mts +2 -2
  74. package/dist/react/hooks/index.d.ts +2 -2
  75. package/dist/react/hooks/internal/check/balanceToAllowed.d.mts +1 -1
  76. package/dist/react/hooks/internal/check/balanceToAllowed.d.ts +1 -1
  77. package/dist/react/hooks/internal/check/customerToFeatures.d.mts +1 -1
  78. package/dist/react/hooks/internal/check/customerToFeatures.d.ts +1 -1
  79. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.mts +1 -1
  80. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.ts +1 -1
  81. package/dist/react/hooks/internal/check/getCreditCost.d.mts +1 -1
  82. package/dist/react/hooks/internal/check/getCreditCost.d.ts +1 -1
  83. package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +2 -2
  84. package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +2 -2
  85. package/dist/react/hooks/internal/useCustomerActions.d.mts +2 -2
  86. package/dist/react/hooks/internal/useCustomerActions.d.ts +2 -2
  87. package/dist/react/hooks/useAggregateEvents.d.mts +1 -1
  88. package/dist/react/hooks/useAggregateEvents.d.ts +1 -1
  89. package/dist/react/hooks/useCustomer.d.mts +2 -2
  90. package/dist/react/hooks/useCustomer.d.ts +2 -2
  91. package/dist/react/hooks/useEntity.d.mts +1 -1
  92. package/dist/react/hooks/useEntity.d.ts +1 -1
  93. package/dist/react/hooks/useListEvents.d.mts +1 -1
  94. package/dist/react/hooks/useListEvents.d.ts +1 -1
  95. package/dist/react/hooks/useListPlans.d.mts +1 -1
  96. package/dist/react/hooks/useListPlans.d.ts +1 -1
  97. package/dist/react/hooks/useReferrals.d.mts +1 -1
  98. package/dist/react/hooks/useReferrals.d.ts +1 -1
  99. package/dist/react/index.d.mts +2 -2
  100. package/dist/react/index.d.ts +2 -2
  101. package/dist/react/{params-CaUBdt-x.d.ts → params-B-1vi9za.d.ts} +60 -0
  102. package/dist/react/{params-C0cH2cYK.d.mts → params-Bf18ATYi.d.mts} +60 -0
  103. package/dist/sdk/index.d.mts +723 -106
  104. package/dist/sdk/index.d.ts +723 -106
  105. package/dist/sdk/index.js +391 -101
  106. package/dist/sdk/index.mjs +320 -102
  107. package/package.json +1 -1
  108. package/dist/backend/{chunk-MOHYGUMA.mjs → chunk-IXUCY7AU.mjs} +3 -3
@@ -4,7 +4,7 @@ import {
4
4
  } from "../chunk-7NGK7FWC.mjs";
5
5
  import {
6
6
  createHandleBetterAuthRoute
7
- } from "../chunk-A3ZOJU54.mjs";
7
+ } from "../chunk-LLBM6UQN.mjs";
8
8
  import {
9
9
  resolveIdentityFromScope
10
10
  } from "../chunk-J2WYVGHS.mjs";
@@ -1,8 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { IAutumnClient } from './client/IAutumnClient.mjs';
3
- import './params-C0cH2cYK.mjs';
3
+ import './params-Bf18ATYi.mjs';
4
4
  import './plan-CUExbmy9.mjs';
5
- import './customer-CkuydPCd.mjs';
5
+ import './customer-DM044m1a.mjs';
6
6
  import './list-plans-op-DvXyRegM.mjs';
7
7
 
8
8
  type AutumnContextValue = {
@@ -1,8 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { IAutumnClient } from './client/IAutumnClient.js';
3
- import './params-CaUBdt-x.js';
3
+ import './params-B-1vi9za.js';
4
4
  import './plan-CUExbmy9.js';
5
- import './customer-D811_jP2.js';
5
+ import './customer-CrxRrY4o.js';
6
6
  import './list-plans-op-Cwb5iIdA.js';
7
7
 
8
8
  type AutumnContextValue = {
@@ -1,7 +1,7 @@
1
1
  import { IAutumnClient } from './IAutumnClient.mjs';
2
- import '../params-C0cH2cYK.mjs';
2
+ import '../params-Bf18ATYi.mjs';
3
3
  import '../plan-CUExbmy9.mjs';
4
- import '../customer-CkuydPCd.mjs';
4
+ import '../customer-DM044m1a.mjs';
5
5
  import '../list-plans-op-DvXyRegM.mjs';
6
6
 
7
7
  /** Configuration for Autumn client */
@@ -1,7 +1,7 @@
1
1
  import { IAutumnClient } from './IAutumnClient.js';
2
- import '../params-CaUBdt-x.js';
2
+ import '../params-B-1vi9za.js';
3
3
  import '../plan-CUExbmy9.js';
4
- import '../customer-D811_jP2.js';
4
+ import '../customer-CrxRrY4o.js';
5
5
  import '../list-plans-op-Cwb5iIdA.js';
6
6
 
7
7
  /** Configuration for Autumn client */
@@ -1,5 +1,5 @@
1
- import { d as ClientGetOrCreateCustomerParams, a as ClientAttachParams, A as AttachResponse, h as ClientPreviewAttachParams, p as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, q as PreviewUpdateResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, r as PreviewMultiAttachResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse, b as ClientCreateReferralCodeParams, s as CreateReferralCodeResponse, k as ClientRedeemReferralCodeParams, R as RedeemReferralCodeResponse, t as ClientListPlansParams, e as ClientListEventsParams, L as ListEventsResponse, C as ClientAggregateEventsParams, u as AggregateEventsResponse, c as ClientGetEntityParams, G as GetEntityResponse } from '../params-C0cH2cYK.mjs';
2
- import { C as Customer } from '../customer-CkuydPCd.mjs';
1
+ import { d as ClientGetOrCreateCustomerParams, a as ClientAttachParams, A as AttachResponse, h as ClientPreviewAttachParams, p as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, q as PreviewUpdateResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, r as PreviewMultiAttachResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse, b as ClientCreateReferralCodeParams, s as CreateReferralCodeResponse, k as ClientRedeemReferralCodeParams, R as RedeemReferralCodeResponse, t as ClientListPlansParams, e as ClientListEventsParams, L as ListEventsResponse, C as ClientAggregateEventsParams, u as AggregateEventsResponse, c as ClientGetEntityParams, G as GetEntityResponse } from '../params-Bf18ATYi.mjs';
2
+ import { C as Customer } from '../customer-DM044m1a.mjs';
3
3
  import { L as ListPlansResponse } from '../list-plans-op-DvXyRegM.mjs';
4
4
  import '../plan-CUExbmy9.mjs';
5
5
 
@@ -1,5 +1,5 @@
1
- import { d as ClientGetOrCreateCustomerParams, a as ClientAttachParams, A as AttachResponse, h as ClientPreviewAttachParams, p as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, q as PreviewUpdateResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, r as PreviewMultiAttachResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse, b as ClientCreateReferralCodeParams, s as CreateReferralCodeResponse, k as ClientRedeemReferralCodeParams, R as RedeemReferralCodeResponse, t as ClientListPlansParams, e as ClientListEventsParams, L as ListEventsResponse, C as ClientAggregateEventsParams, u as AggregateEventsResponse, c as ClientGetEntityParams, G as GetEntityResponse } from '../params-CaUBdt-x.js';
2
- import { C as Customer } from '../customer-D811_jP2.js';
1
+ import { d as ClientGetOrCreateCustomerParams, a as ClientAttachParams, A as AttachResponse, h as ClientPreviewAttachParams, p as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, q as PreviewUpdateResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, r as PreviewMultiAttachResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse, b as ClientCreateReferralCodeParams, s as CreateReferralCodeResponse, k as ClientRedeemReferralCodeParams, R as RedeemReferralCodeResponse, t as ClientListPlansParams, e as ClientListEventsParams, L as ListEventsResponse, C as ClientAggregateEventsParams, u as AggregateEventsResponse, c as ClientGetEntityParams, G as GetEntityResponse } from '../params-B-1vi9za.js';
2
+ import { C as Customer } from '../customer-CrxRrY4o.js';
3
3
  import { L as ListPlansResponse } from '../list-plans-op-Cwb5iIdA.js';
4
4
  import '../plan-CUExbmy9.js';
5
5
 
@@ -1,7 +1,7 @@
1
1
  export { AutumnClientConfig, createAutumnClient } from './AutumnClient.mjs';
2
2
  export { AutumnClientError } from './AutumnClientError.mjs';
3
3
  export { IAutumnClient } from './IAutumnClient.mjs';
4
- import '../params-C0cH2cYK.mjs';
4
+ import '../params-Bf18ATYi.mjs';
5
5
  import '../plan-CUExbmy9.mjs';
6
- import '../customer-CkuydPCd.mjs';
6
+ import '../customer-DM044m1a.mjs';
7
7
  import '../list-plans-op-DvXyRegM.mjs';
@@ -1,7 +1,7 @@
1
1
  export { AutumnClientConfig, createAutumnClient } from './AutumnClient.js';
2
2
  export { AutumnClientError } from './AutumnClientError.js';
3
3
  export { IAutumnClient } from './IAutumnClient.js';
4
- import '../params-CaUBdt-x.js';
4
+ import '../params-B-1vi9za.js';
5
5
  import '../plan-CUExbmy9.js';
6
- import '../customer-D811_jP2.js';
6
+ import '../customer-CrxRrY4o.js';
7
7
  import '../list-plans-op-Cwb5iIdA.js';
@@ -11,18 +11,45 @@ declare const CustomerEnv: {
11
11
  * The environment this customer was created in.
12
12
  */
13
13
  type CustomerEnv = OpenEnum<typeof CustomerEnv>;
14
+ /**
15
+ * The time interval for the purchase limit window.
16
+ */
14
17
  declare const CustomerPurchaseLimitInterval2: {
15
18
  readonly Hour: "hour";
16
19
  readonly Day: "day";
17
20
  readonly Week: "week";
18
21
  readonly Month: "month";
19
22
  };
23
+ /**
24
+ * The time interval for the purchase limit window.
25
+ */
20
26
  type CustomerPurchaseLimitInterval2 = OpenEnum<typeof CustomerPurchaseLimitInterval2>;
21
27
  type CustomerPurchaseLimit2 = {
28
+ /**
29
+ * The time interval for the purchase limit window.
30
+ */
31
+ interval: CustomerPurchaseLimitInterval2;
32
+ /**
33
+ * Number of intervals in the purchase limit window.
34
+ */
35
+ intervalCount: number;
36
+ /**
37
+ * Maximum number of auto top-ups allowed within the interval.
38
+ */
39
+ limit: number;
40
+ };
41
+ declare const CustomerPurchaseLimitInterval1: {
42
+ readonly Hour: "hour";
43
+ readonly Day: "day";
44
+ readonly Week: "week";
45
+ readonly Month: "month";
46
+ };
47
+ type CustomerPurchaseLimitInterval1 = OpenEnum<typeof CustomerPurchaseLimitInterval1>;
48
+ type CustomerPurchaseLimit1 = {
22
49
  /**
23
50
  * The time interval for the purchase limit window. Null when no purchase limit is configured.
24
51
  */
25
- interval: CustomerPurchaseLimitInterval2 | null;
52
+ interval: CustomerPurchaseLimitInterval1 | null;
26
53
  /**
27
54
  * Number of intervals in the purchase limit window. Null when no purchase limit is configured.
28
55
  */
@@ -41,32 +68,16 @@ type CustomerPurchaseLimit2 = {
41
68
  nextResetAt: number;
42
69
  };
43
70
  /**
44
- * The time interval for the purchase limit window.
71
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
45
72
  */
46
- declare const CustomerPurchaseLimitInterval1: {
47
- readonly Hour: "hour";
48
- readonly Day: "day";
49
- readonly Week: "week";
50
- readonly Month: "month";
73
+ declare const AutoTopupSource: {
74
+ readonly Customer: "customer";
75
+ readonly Plan: "plan";
51
76
  };
52
77
  /**
53
- * The time interval for the purchase limit window.
78
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
54
79
  */
55
- type CustomerPurchaseLimitInterval1 = OpenEnum<typeof CustomerPurchaseLimitInterval1>;
56
- type CustomerPurchaseLimit1 = {
57
- /**
58
- * The time interval for the purchase limit window.
59
- */
60
- interval: CustomerPurchaseLimitInterval1;
61
- /**
62
- * Number of intervals in the purchase limit window.
63
- */
64
- intervalCount: number;
65
- /**
66
- * Maximum number of auto top-ups allowed within the interval.
67
- */
68
- limit: number;
69
- };
80
+ type AutoTopupSource = OpenEnum<typeof AutoTopupSource>;
70
81
  type CustomerAutoTopup = {
71
82
  /**
72
83
  * The ID of the feature (credit balance) to auto top-up.
@@ -87,11 +98,15 @@ type CustomerAutoTopup = {
87
98
  /**
88
99
  * Optional rate limit to cap how often auto top-ups occur. Expand billing_controls.auto_topups.purchase_limit for a count of top ups and the next_reset_at.
89
100
  */
90
- purchaseLimit?: CustomerPurchaseLimit2 | CustomerPurchaseLimit1 | undefined;
101
+ purchaseLimit?: CustomerPurchaseLimit1 | CustomerPurchaseLimit2 | undefined;
91
102
  /**
92
103
  * When true, auto top-up creates a send_invoice invoice instead of auto-charging.
93
104
  */
94
105
  invoiceMode?: boolean | undefined;
106
+ /**
107
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
108
+ */
109
+ source?: AutoTopupSource | undefined;
95
110
  };
96
111
  /**
97
112
  * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
@@ -104,6 +119,17 @@ declare const CustomerLimitType: {
104
119
  * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
105
120
  */
106
121
  type CustomerLimitType = OpenEnum<typeof CustomerLimitType>;
122
+ /**
123
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
124
+ */
125
+ declare const SpendLimitSource: {
126
+ readonly Customer: "customer";
127
+ readonly Plan: "plan";
128
+ };
129
+ /**
130
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
131
+ */
132
+ type SpendLimitSource = OpenEnum<typeof SpendLimitSource>;
107
133
  type CustomerSpendLimit = {
108
134
  /**
109
135
  * Optional feature ID this spend limit applies to.
@@ -125,6 +151,10 @@ type CustomerSpendLimit = {
125
151
  * When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
126
152
  */
127
153
  skipOverageBilling?: boolean | undefined;
154
+ /**
155
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
156
+ */
157
+ source?: SpendLimitSource | undefined;
128
158
  };
129
159
  /**
130
160
  * Interval for the cap, aligned to the customer's billing cycle.
@@ -147,6 +177,17 @@ type CustomerFilter = {
147
177
  [k: string]: any;
148
178
  };
149
179
  };
180
+ /**
181
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
182
+ */
183
+ declare const UsageLimitSource: {
184
+ readonly Customer: "customer";
185
+ readonly Plan: "plan";
186
+ };
187
+ /**
188
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
189
+ */
190
+ type UsageLimitSource = OpenEnum<typeof UsageLimitSource>;
150
191
  type CustomerUsageLimit = {
151
192
  /**
152
193
  * The feature this usage limit applies to.
@@ -172,6 +213,10 @@ type CustomerUsageLimit = {
172
213
  * Current usage already consumed in the active interval. Response-only; not stored on billing controls.
173
214
  */
174
215
  usage?: number | undefined;
216
+ /**
217
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
218
+ */
219
+ source?: UsageLimitSource | undefined;
175
220
  };
176
221
  /**
177
222
  * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
@@ -186,6 +231,17 @@ declare const CustomerThresholdType: {
186
231
  * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
187
232
  */
188
233
  type CustomerThresholdType = OpenEnum<typeof CustomerThresholdType>;
234
+ /**
235
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
236
+ */
237
+ declare const UsageAlertSource: {
238
+ readonly Customer: "customer";
239
+ readonly Plan: "plan";
240
+ };
241
+ /**
242
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
243
+ */
244
+ type UsageAlertSource = OpenEnum<typeof UsageAlertSource>;
189
245
  type CustomerUsageAlert = {
190
246
  /**
191
247
  * The feature ID this alert applies to.
@@ -207,7 +263,22 @@ type CustomerUsageAlert = {
207
263
  * Optional user-defined label to distinguish multiple alerts on the same feature.
208
264
  */
209
265
  name?: string | undefined;
266
+ /**
267
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
268
+ */
269
+ source?: UsageAlertSource | undefined;
270
+ };
271
+ /**
272
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
273
+ */
274
+ declare const OverageAllowedSource: {
275
+ readonly Customer: "customer";
276
+ readonly Plan: "plan";
210
277
  };
278
+ /**
279
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
280
+ */
281
+ type OverageAllowedSource = OpenEnum<typeof OverageAllowedSource>;
211
282
  type CustomerOverageAllowed = {
212
283
  /**
213
284
  * The feature ID this overage allowed control applies to.
@@ -217,6 +288,10 @@ type CustomerOverageAllowed = {
217
288
  * Whether overage is allowed for this feature.
218
289
  */
219
290
  enabled: boolean;
291
+ /**
292
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
293
+ */
294
+ source?: OverageAllowedSource | undefined;
220
295
  };
221
296
  /**
222
297
  * Billing controls for the customer (auto top-ups, etc.)
@@ -11,18 +11,45 @@ declare const CustomerEnv: {
11
11
  * The environment this customer was created in.
12
12
  */
13
13
  type CustomerEnv = OpenEnum<typeof CustomerEnv>;
14
+ /**
15
+ * The time interval for the purchase limit window.
16
+ */
14
17
  declare const CustomerPurchaseLimitInterval2: {
15
18
  readonly Hour: "hour";
16
19
  readonly Day: "day";
17
20
  readonly Week: "week";
18
21
  readonly Month: "month";
19
22
  };
23
+ /**
24
+ * The time interval for the purchase limit window.
25
+ */
20
26
  type CustomerPurchaseLimitInterval2 = OpenEnum<typeof CustomerPurchaseLimitInterval2>;
21
27
  type CustomerPurchaseLimit2 = {
28
+ /**
29
+ * The time interval for the purchase limit window.
30
+ */
31
+ interval: CustomerPurchaseLimitInterval2;
32
+ /**
33
+ * Number of intervals in the purchase limit window.
34
+ */
35
+ intervalCount: number;
36
+ /**
37
+ * Maximum number of auto top-ups allowed within the interval.
38
+ */
39
+ limit: number;
40
+ };
41
+ declare const CustomerPurchaseLimitInterval1: {
42
+ readonly Hour: "hour";
43
+ readonly Day: "day";
44
+ readonly Week: "week";
45
+ readonly Month: "month";
46
+ };
47
+ type CustomerPurchaseLimitInterval1 = OpenEnum<typeof CustomerPurchaseLimitInterval1>;
48
+ type CustomerPurchaseLimit1 = {
22
49
  /**
23
50
  * The time interval for the purchase limit window. Null when no purchase limit is configured.
24
51
  */
25
- interval: CustomerPurchaseLimitInterval2 | null;
52
+ interval: CustomerPurchaseLimitInterval1 | null;
26
53
  /**
27
54
  * Number of intervals in the purchase limit window. Null when no purchase limit is configured.
28
55
  */
@@ -41,32 +68,16 @@ type CustomerPurchaseLimit2 = {
41
68
  nextResetAt: number;
42
69
  };
43
70
  /**
44
- * The time interval for the purchase limit window.
71
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
45
72
  */
46
- declare const CustomerPurchaseLimitInterval1: {
47
- readonly Hour: "hour";
48
- readonly Day: "day";
49
- readonly Week: "week";
50
- readonly Month: "month";
73
+ declare const AutoTopupSource: {
74
+ readonly Customer: "customer";
75
+ readonly Plan: "plan";
51
76
  };
52
77
  /**
53
- * The time interval for the purchase limit window.
78
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
54
79
  */
55
- type CustomerPurchaseLimitInterval1 = OpenEnum<typeof CustomerPurchaseLimitInterval1>;
56
- type CustomerPurchaseLimit1 = {
57
- /**
58
- * The time interval for the purchase limit window.
59
- */
60
- interval: CustomerPurchaseLimitInterval1;
61
- /**
62
- * Number of intervals in the purchase limit window.
63
- */
64
- intervalCount: number;
65
- /**
66
- * Maximum number of auto top-ups allowed within the interval.
67
- */
68
- limit: number;
69
- };
80
+ type AutoTopupSource = OpenEnum<typeof AutoTopupSource>;
70
81
  type CustomerAutoTopup = {
71
82
  /**
72
83
  * The ID of the feature (credit balance) to auto top-up.
@@ -87,11 +98,15 @@ type CustomerAutoTopup = {
87
98
  /**
88
99
  * Optional rate limit to cap how often auto top-ups occur. Expand billing_controls.auto_topups.purchase_limit for a count of top ups and the next_reset_at.
89
100
  */
90
- purchaseLimit?: CustomerPurchaseLimit2 | CustomerPurchaseLimit1 | undefined;
101
+ purchaseLimit?: CustomerPurchaseLimit1 | CustomerPurchaseLimit2 | undefined;
91
102
  /**
92
103
  * When true, auto top-up creates a send_invoice invoice instead of auto-charging.
93
104
  */
94
105
  invoiceMode?: boolean | undefined;
106
+ /**
107
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
108
+ */
109
+ source?: AutoTopupSource | undefined;
95
110
  };
96
111
  /**
97
112
  * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
@@ -104,6 +119,17 @@ declare const CustomerLimitType: {
104
119
  * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
105
120
  */
106
121
  type CustomerLimitType = OpenEnum<typeof CustomerLimitType>;
122
+ /**
123
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
124
+ */
125
+ declare const SpendLimitSource: {
126
+ readonly Customer: "customer";
127
+ readonly Plan: "plan";
128
+ };
129
+ /**
130
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
131
+ */
132
+ type SpendLimitSource = OpenEnum<typeof SpendLimitSource>;
107
133
  type CustomerSpendLimit = {
108
134
  /**
109
135
  * Optional feature ID this spend limit applies to.
@@ -125,6 +151,10 @@ type CustomerSpendLimit = {
125
151
  * When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
126
152
  */
127
153
  skipOverageBilling?: boolean | undefined;
154
+ /**
155
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
156
+ */
157
+ source?: SpendLimitSource | undefined;
128
158
  };
129
159
  /**
130
160
  * Interval for the cap, aligned to the customer's billing cycle.
@@ -147,6 +177,17 @@ type CustomerFilter = {
147
177
  [k: string]: any;
148
178
  };
149
179
  };
180
+ /**
181
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
182
+ */
183
+ declare const UsageLimitSource: {
184
+ readonly Customer: "customer";
185
+ readonly Plan: "plan";
186
+ };
187
+ /**
188
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
189
+ */
190
+ type UsageLimitSource = OpenEnum<typeof UsageLimitSource>;
150
191
  type CustomerUsageLimit = {
151
192
  /**
152
193
  * The feature this usage limit applies to.
@@ -172,6 +213,10 @@ type CustomerUsageLimit = {
172
213
  * Current usage already consumed in the active interval. Response-only; not stored on billing controls.
173
214
  */
174
215
  usage?: number | undefined;
216
+ /**
217
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
218
+ */
219
+ source?: UsageLimitSource | undefined;
175
220
  };
176
221
  /**
177
222
  * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
@@ -186,6 +231,17 @@ declare const CustomerThresholdType: {
186
231
  * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
187
232
  */
188
233
  type CustomerThresholdType = OpenEnum<typeof CustomerThresholdType>;
234
+ /**
235
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
236
+ */
237
+ declare const UsageAlertSource: {
238
+ readonly Customer: "customer";
239
+ readonly Plan: "plan";
240
+ };
241
+ /**
242
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
243
+ */
244
+ type UsageAlertSource = OpenEnum<typeof UsageAlertSource>;
189
245
  type CustomerUsageAlert = {
190
246
  /**
191
247
  * The feature ID this alert applies to.
@@ -207,7 +263,22 @@ type CustomerUsageAlert = {
207
263
  * Optional user-defined label to distinguish multiple alerts on the same feature.
208
264
  */
209
265
  name?: string | undefined;
266
+ /**
267
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
268
+ */
269
+ source?: UsageAlertSource | undefined;
270
+ };
271
+ /**
272
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
273
+ */
274
+ declare const OverageAllowedSource: {
275
+ readonly Customer: "customer";
276
+ readonly Plan: "plan";
210
277
  };
278
+ /**
279
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
280
+ */
281
+ type OverageAllowedSource = OpenEnum<typeof OverageAllowedSource>;
211
282
  type CustomerOverageAllowed = {
212
283
  /**
213
284
  * The feature ID this overage allowed control applies to.
@@ -217,6 +288,10 @@ type CustomerOverageAllowed = {
217
288
  * Whether overage is allowed for this feature.
218
289
  */
219
290
  enabled: boolean;
291
+ /**
292
+ * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
293
+ */
294
+ source?: OverageAllowedSource | undefined;
220
295
  };
221
296
  /**
222
297
  * Billing controls for the customer (auto top-ups, etc.)
@@ -7,7 +7,7 @@ export { UseListPlansParams, useListPlans } from './useListPlans.mjs';
7
7
  export { UseReferralsParams, UseReferralsResult, useReferrals } from './useReferrals.mjs';
8
8
  import '@tanstack/react-query';
9
9
  import '../client/AutumnClientError.mjs';
10
- import '../params-C0cH2cYK.mjs';
10
+ import '../params-Bf18ATYi.mjs';
11
11
  import '../plan-CUExbmy9.mjs';
12
- import '../customer-CkuydPCd.mjs';
12
+ import '../customer-DM044m1a.mjs';
13
13
  import '../list-plans-op-DvXyRegM.mjs';
@@ -7,7 +7,7 @@ export { UseListPlansParams, useListPlans } from './useListPlans.js';
7
7
  export { UseReferralsParams, UseReferralsResult, useReferrals } from './useReferrals.js';
8
8
  import '@tanstack/react-query';
9
9
  import '../client/AutumnClientError.js';
10
- import '../params-CaUBdt-x.js';
10
+ import '../params-B-1vi9za.js';
11
11
  import '../plan-CUExbmy9.js';
12
- import '../customer-D811_jP2.js';
12
+ import '../customer-CrxRrY4o.js';
13
13
  import '../list-plans-op-Cwb5iIdA.js';
@@ -1,4 +1,4 @@
1
- import { C as Customer } from '../../../customer-CkuydPCd.mjs';
1
+ import { C as Customer } from '../../../customer-DM044m1a.mjs';
2
2
  import '../../../plan-CUExbmy9.mjs';
3
3
 
4
4
  type CustomerBalance = Customer["balances"][string];
@@ -1,4 +1,4 @@
1
- import { C as Customer } from '../../../customer-D811_jP2.js';
1
+ import { C as Customer } from '../../../customer-CrxRrY4o.js';
2
2
  import '../../../plan-CUExbmy9.js';
3
3
 
4
4
  type CustomerBalance = Customer["balances"][string];
@@ -1,4 +1,4 @@
1
- import { C as Customer } from '../../../customer-CkuydPCd.mjs';
1
+ import { C as Customer } from '../../../customer-DM044m1a.mjs';
2
2
  import '../../../plan-CUExbmy9.mjs';
3
3
 
4
4
  type CustomerFeature = NonNullable<Customer["balances"][string]["feature"]>;
@@ -1,4 +1,4 @@
1
- import { C as Customer } from '../../../customer-D811_jP2.js';
1
+ import { C as Customer } from '../../../customer-CrxRrY4o.js';
2
2
  import '../../../plan-CUExbmy9.js';
3
3
 
4
4
  type CustomerFeature = NonNullable<Customer["balances"][string]["feature"]>;
@@ -1,5 +1,5 @@
1
1
  import { B as BalanceFeature } from '../../../plan-CUExbmy9.mjs';
2
- import { C as Customer } from '../../../customer-CkuydPCd.mjs';
2
+ import { C as Customer } from '../../../customer-DM044m1a.mjs';
3
3
 
4
4
  type CustomerFeature = NonNullable<Customer["balances"][string]["feature"]>;
5
5
  declare const findCreditSystemsByFeature: ({ featureId, features, }: {
@@ -1,5 +1,5 @@
1
1
  import { B as BalanceFeature } from '../../../plan-CUExbmy9.js';
2
- import { C as Customer } from '../../../customer-D811_jP2.js';
2
+ import { C as Customer } from '../../../customer-CrxRrY4o.js';
3
3
 
4
4
  type CustomerFeature = NonNullable<Customer["balances"][string]["feature"]>;
5
5
  declare const findCreditSystemsByFeature: ({ featureId, features, }: {
@@ -1,4 +1,4 @@
1
- import { C as Customer } from '../../../customer-CkuydPCd.mjs';
1
+ import { C as Customer } from '../../../customer-DM044m1a.mjs';
2
2
  import '../../../plan-CUExbmy9.mjs';
3
3
 
4
4
  type CustomerFeature = NonNullable<Customer["balances"][string]["feature"]>;
@@ -1,4 +1,4 @@
1
- import { C as Customer } from '../../../customer-D811_jP2.js';
1
+ import { C as Customer } from '../../../customer-CrxRrY4o.js';
2
2
  import '../../../plan-CUExbmy9.js';
3
3
 
4
4
  type CustomerFeature = NonNullable<Customer["balances"][string]["feature"]>;
@@ -1,5 +1,5 @@
1
- import { n as ClientCheckParams, o as CheckResponse } from '../../params-C0cH2cYK.mjs';
2
- import { C as Customer } from '../../customer-CkuydPCd.mjs';
1
+ import { n as ClientCheckParams, o as CheckResponse } from '../../params-Bf18ATYi.mjs';
2
+ import { C as Customer } from '../../customer-DM044m1a.mjs';
3
3
  import '../../plan-CUExbmy9.mjs';
4
4
 
5
5
  declare const getLocalCheckResponse: ({ customer, params, }: {
@@ -1,5 +1,5 @@
1
- import { n as ClientCheckParams, o as CheckResponse } from '../../params-CaUBdt-x.js';
2
- import { C as Customer } from '../../customer-D811_jP2.js';
1
+ import { n as ClientCheckParams, o as CheckResponse } from '../../params-B-1vi9za.js';
2
+ import { C as Customer } from '../../customer-CrxRrY4o.js';
3
3
  import '../../plan-CUExbmy9.js';
4
4
 
5
5
  declare const getLocalCheckResponse: ({ customer, params, }: {
@@ -1,5 +1,5 @@
1
- import { a as ClientAttachParams, A as AttachResponse, h as ClientPreviewAttachParams, p as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, q as PreviewUpdateResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, r as PreviewMultiAttachResponse, n as ClientCheckParams, o as CheckResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse } from '../../params-C0cH2cYK.mjs';
2
- import { C as Customer } from '../../customer-CkuydPCd.mjs';
1
+ import { a as ClientAttachParams, A as AttachResponse, h as ClientPreviewAttachParams, p as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, q as PreviewUpdateResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, r as PreviewMultiAttachResponse, n as ClientCheckParams, o as CheckResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse } from '../../params-Bf18ATYi.mjs';
2
+ import { C as Customer } from '../../customer-DM044m1a.mjs';
3
3
  import { IAutumnClient } from '../../client/IAutumnClient.mjs';
4
4
  import '../../plan-CUExbmy9.mjs';
5
5
  import '../../list-plans-op-DvXyRegM.mjs';
@@ -1,5 +1,5 @@
1
- import { a as ClientAttachParams, A as AttachResponse, h as ClientPreviewAttachParams, p as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, q as PreviewUpdateResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, r as PreviewMultiAttachResponse, n as ClientCheckParams, o as CheckResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse } from '../../params-CaUBdt-x.js';
2
- import { C as Customer } from '../../customer-D811_jP2.js';
1
+ import { a as ClientAttachParams, A as AttachResponse, h as ClientPreviewAttachParams, p as PreviewAttachResponse, m as ClientUpdateSubscriptionParams, B as BillingUpdateResponse, j as ClientPreviewUpdateSubscriptionParams, q as PreviewUpdateResponse, f as ClientMultiAttachParams, M as MultiAttachResponse, i as ClientPreviewMultiAttachParams, r as PreviewMultiAttachResponse, n as ClientCheckParams, o as CheckResponse, g as ClientOpenCustomerPortalParams, O as OpenCustomerPortalResponse, l as ClientSetupPaymentParams, S as SetupPaymentResponse } from '../../params-B-1vi9za.js';
2
+ import { C as Customer } from '../../customer-CrxRrY4o.js';
3
3
  import { IAutumnClient } from '../../client/IAutumnClient.js';
4
4
  import '../../plan-CUExbmy9.js';
5
5
  import '../../list-plans-op-Cwb5iIdA.js';
@@ -1,5 +1,5 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { C as ClientAggregateEventsParams, u as AggregateEventsResponse, v as AggregateEventsList, T as Total } from '../params-C0cH2cYK.mjs';
2
+ import { C as ClientAggregateEventsParams, u as AggregateEventsResponse, v as AggregateEventsList, T as Total } from '../params-Bf18ATYi.mjs';
3
3
  import { AutumnClientError } from '../client/AutumnClientError.mjs';
4
4
  import { HookParams } from './types.mjs';
5
5
  import '../plan-CUExbmy9.mjs';