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.
- package/dist/backend/adapters/express.js +319 -101
- package/dist/backend/adapters/express.mjs +8 -8
- package/dist/backend/adapters/fetch.js +319 -101
- package/dist/backend/adapters/fetch.mjs +8 -8
- package/dist/backend/adapters/hono.js +319 -101
- package/dist/backend/adapters/hono.mjs +8 -8
- package/dist/backend/adapters/index.js +319 -101
- package/dist/backend/adapters/index.mjs +11 -11
- package/dist/backend/adapters/next.js +319 -101
- package/dist/backend/adapters/next.mjs +8 -8
- package/dist/backend/{chunk-CEUAUTNB.mjs → chunk-5IUIFE55.mjs} +1 -1
- package/dist/backend/{chunk-ZR5K6VMA.mjs → chunk-GL2SBEQ5.mjs} +1 -1
- package/dist/backend/{chunk-Y3AJLHVL.mjs → chunk-KJP3DHPM.mjs} +1 -1
- package/dist/backend/{chunk-N52JKSJ7.mjs → chunk-KM5AXZWJ.mjs} +4 -4
- package/dist/backend/{chunk-5C7KP2BU.mjs → chunk-MSMJS42G.mjs} +319 -101
- package/dist/backend/{chunk-TIFFBW34.mjs → chunk-UMTASWZL.mjs} +1 -1
- package/dist/backend/{chunk-PKM7CEE3.mjs → chunk-V32P22RC.mjs} +6 -6
- 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 +319 -101
- package/dist/backend/core/handlers/coreHandler.mjs +6 -6
- 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 +319 -101
- package/dist/backend/core/handlers/handleRouteByName.mjs +6 -6
- 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 +319 -101
- 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 +319 -101
- package/dist/backend/core/index.mjs +9 -9
- 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.mjs +1 -1
- 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.mjs +1 -1
- 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 +319 -101
- package/dist/backend/index.mjs +9 -9
- package/dist/backend/{routeTypes-gWhxv6xo.d.mts → routeTypes-CIqS7yVo.d.mts} +641 -97
- package/dist/backend/{routeTypes-C8YKwtFL.d.ts → routeTypes-uWaE8YYa.d.ts} +641 -97
- package/dist/better-auth/{chunk-A3ZOJU54.mjs → chunk-LLBM6UQN.mjs} +319 -101
- package/dist/better-auth/index.js +319 -101
- package/dist/better-auth/index.mjs +1 -1
- package/dist/better-auth/utils/handleBetterAuthRoute.js +319 -101
- package/dist/better-auth/utils/handleBetterAuthRoute.mjs +1 -1
- package/dist/better-auth/utils/index.js +319 -101
- package/dist/better-auth/utils/index.mjs +1 -1
- package/dist/react/AutumnContext.d.mts +2 -2
- package/dist/react/AutumnContext.d.ts +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-D811_jP2.d.ts → customer-CrxRrY4o.d.ts} +99 -24
- package/dist/react/{customer-CkuydPCd.d.mts → customer-DM044m1a.d.mts} +99 -24
- package/dist/react/hooks/index.d.mts +2 -2
- package/dist/react/hooks/index.d.ts +2 -2
- 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/useAggregateEvents.d.mts +1 -1
- package/dist/react/hooks/useAggregateEvents.d.ts +1 -1
- package/dist/react/hooks/useCustomer.d.mts +2 -2
- package/dist/react/hooks/useCustomer.d.ts +2 -2
- package/dist/react/hooks/useEntity.d.mts +1 -1
- package/dist/react/hooks/useEntity.d.ts +1 -1
- package/dist/react/hooks/useListEvents.d.mts +1 -1
- package/dist/react/hooks/useListEvents.d.ts +1 -1
- package/dist/react/hooks/useListPlans.d.mts +1 -1
- package/dist/react/hooks/useListPlans.d.ts +1 -1
- package/dist/react/hooks/useReferrals.d.mts +1 -1
- package/dist/react/hooks/useReferrals.d.ts +1 -1
- package/dist/react/index.d.mts +2 -2
- package/dist/react/index.d.ts +2 -2
- package/dist/react/{params-CaUBdt-x.d.ts → params-B-1vi9za.d.ts} +60 -0
- package/dist/react/{params-C0cH2cYK.d.mts → params-Bf18ATYi.d.mts} +60 -0
- package/dist/sdk/index.d.mts +723 -106
- package/dist/sdk/index.d.ts +723 -106
- package/dist/sdk/index.js +391 -101
- package/dist/sdk/index.mjs +320 -102
- package/package.json +1 -1
- package/dist/backend/{chunk-MOHYGUMA.mjs → chunk-IXUCY7AU.mjs} +3 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { IAutumnClient } from './client/IAutumnClient.mjs';
|
|
3
|
-
import './params-
|
|
3
|
+
import './params-Bf18ATYi.mjs';
|
|
4
4
|
import './plan-CUExbmy9.mjs';
|
|
5
|
-
import './customer-
|
|
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-
|
|
3
|
+
import './params-B-1vi9za.js';
|
|
4
4
|
import './plan-CUExbmy9.js';
|
|
5
|
-
import './customer-
|
|
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-
|
|
2
|
+
import '../params-Bf18ATYi.mjs';
|
|
3
3
|
import '../plan-CUExbmy9.mjs';
|
|
4
|
-
import '../customer-
|
|
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-
|
|
2
|
+
import '../params-B-1vi9za.js';
|
|
3
3
|
import '../plan-CUExbmy9.js';
|
|
4
|
-
import '../customer-
|
|
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-
|
|
2
|
-
import { C as Customer } from '../customer-
|
|
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-
|
|
2
|
-
import { C as Customer } from '../customer-
|
|
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-
|
|
4
|
+
import '../params-Bf18ATYi.mjs';
|
|
5
5
|
import '../plan-CUExbmy9.mjs';
|
|
6
|
-
import '../customer-
|
|
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-
|
|
4
|
+
import '../params-B-1vi9za.js';
|
|
5
5
|
import '../plan-CUExbmy9.js';
|
|
6
|
-
import '../customer-
|
|
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:
|
|
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
|
-
*
|
|
71
|
+
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
45
72
|
*/
|
|
46
|
-
declare const
|
|
47
|
-
readonly
|
|
48
|
-
readonly
|
|
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
|
-
*
|
|
78
|
+
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
54
79
|
*/
|
|
55
|
-
type
|
|
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?:
|
|
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:
|
|
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
|
-
*
|
|
71
|
+
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
45
72
|
*/
|
|
46
|
-
declare const
|
|
47
|
-
readonly
|
|
48
|
-
readonly
|
|
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
|
-
*
|
|
78
|
+
* Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
|
|
54
79
|
*/
|
|
55
|
-
type
|
|
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?:
|
|
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-
|
|
10
|
+
import '../params-Bf18ATYi.mjs';
|
|
11
11
|
import '../plan-CUExbmy9.mjs';
|
|
12
|
-
import '../customer-
|
|
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-
|
|
10
|
+
import '../params-B-1vi9za.js';
|
|
11
11
|
import '../plan-CUExbmy9.js';
|
|
12
|
-
import '../customer-
|
|
12
|
+
import '../customer-CrxRrY4o.js';
|
|
13
13
|
import '../list-plans-op-Cwb5iIdA.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { B as BalanceFeature } from '../../../plan-CUExbmy9.mjs';
|
|
2
|
-
import { C as Customer } from '../../../customer-
|
|
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-
|
|
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,5 +1,5 @@
|
|
|
1
|
-
import { n as ClientCheckParams, o as CheckResponse } from '../../params-
|
|
2
|
-
import { C as Customer } from '../../customer-
|
|
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-
|
|
2
|
-
import { C as Customer } from '../../customer-
|
|
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-
|
|
2
|
-
import { C as Customer } from '../../customer-
|
|
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-
|
|
2
|
-
import { C as Customer } from '../../customer-
|
|
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-
|
|
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';
|