autumn-js 1.2.32 → 1.2.34
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.d.mts +1 -1
- package/dist/backend/adapters/express.d.ts +1 -1
- package/dist/backend/adapters/express.js +13482 -7722
- package/dist/backend/adapters/express.mjs +5 -5
- package/dist/backend/adapters/fetch.d.mts +1 -1
- package/dist/backend/adapters/fetch.d.ts +1 -1
- package/dist/backend/adapters/fetch.js +13482 -7722
- package/dist/backend/adapters/fetch.mjs +5 -5
- package/dist/backend/adapters/hono.d.mts +1 -1
- package/dist/backend/adapters/hono.d.ts +1 -1
- package/dist/backend/adapters/hono.js +13482 -7722
- package/dist/backend/adapters/hono.mjs +5 -5
- package/dist/backend/adapters/index.d.mts +1 -1
- package/dist/backend/adapters/index.d.ts +1 -1
- package/dist/backend/adapters/index.js +13482 -7722
- package/dist/backend/adapters/index.mjs +8 -8
- package/dist/backend/adapters/next.d.mts +1 -1
- package/dist/backend/adapters/next.d.ts +1 -1
- package/dist/backend/adapters/next.js +13482 -7722
- package/dist/backend/adapters/next.mjs +5 -5
- package/dist/backend/{authTypes-Bx2brfr_.d.mts → authTypes-DEBvnrRj.d.mts} +20 -1
- package/dist/backend/{authTypes-Bx2brfr_.d.ts → authTypes-DEBvnrRj.d.ts} +20 -1
- package/dist/backend/{chunk-UYURZ75E.mjs → chunk-4LKEHLXR.mjs} +704 -41
- package/dist/backend/{chunk-W7MG3LB3.mjs → chunk-7MRAUIPE.mjs} +1 -1
- package/dist/backend/{chunk-7MPQ5TCH.mjs → chunk-DDRD5BKK.mjs} +2 -2
- package/dist/backend/{chunk-Z7WSDAEZ.mjs → chunk-EQJ5B7OA.mjs} +13165 -8068
- package/dist/backend/{chunk-AYS6GLVO.mjs → chunk-HMGGMVFC.mjs} +1 -1
- package/dist/backend/{chunk-5QIIBIZY.mjs → chunk-KXRDZE5L.mjs} +2 -2
- package/dist/backend/{chunk-MXD3NPQK.mjs → chunk-SA6MCT5X.mjs} +1 -1
- package/dist/backend/{chunk-NSAJNDTG.mjs → chunk-WCZLA72P.mjs} +1 -1
- package/dist/backend/core/handlers/coreHandler.d.mts +2 -2
- package/dist/backend/core/handlers/coreHandler.d.ts +2 -2
- package/dist/backend/core/handlers/coreHandler.js +13482 -7722
- package/dist/backend/core/handlers/coreHandler.mjs +3 -3
- package/dist/backend/core/handlers/executeRoute.d.mts +2 -2
- package/dist/backend/core/handlers/executeRoute.d.ts +2 -2
- package/dist/backend/core/handlers/handleRouteByName.d.mts +1 -1
- package/dist/backend/core/handlers/handleRouteByName.d.ts +1 -1
- package/dist/backend/core/handlers/handleRouteByName.js +13482 -7722
- package/dist/backend/core/handlers/handleRouteByName.mjs +3 -3
- package/dist/backend/core/handlers/index.d.mts +2 -2
- package/dist/backend/core/handlers/index.d.ts +2 -2
- package/dist/backend/core/handlers/index.js +13482 -7722
- package/dist/backend/core/handlers/index.mjs +4 -4
- package/dist/backend/core/handlers/resolveIdentity.d.mts +1 -1
- package/dist/backend/core/handlers/resolveIdentity.d.ts +1 -1
- package/dist/backend/core/index.d.mts +2 -2
- package/dist/backend/core/index.d.ts +2 -2
- package/dist/backend/core/index.js +13482 -7722
- package/dist/backend/core/index.mjs +4 -4
- package/dist/backend/core/routes/index.d.mts +2 -2
- package/dist/backend/core/routes/index.d.ts +2 -2
- package/dist/backend/core/routes/index.js +704 -41
- package/dist/backend/core/routes/index.mjs +1 -1
- package/dist/backend/core/routes/routeBuilder.d.mts +2 -2
- package/dist/backend/core/routes/routeBuilder.d.ts +2 -2
- package/dist/backend/core/routes/routeConfigs.d.mts +2 -2
- package/dist/backend/core/routes/routeConfigs.d.ts +2 -2
- package/dist/backend/core/routes/routeConfigs.js +704 -41
- package/dist/backend/core/routes/routeConfigs.mjs +1 -1
- package/dist/backend/core/types/authTypes.d.mts +1 -1
- package/dist/backend/core/types/authTypes.d.ts +1 -1
- package/dist/backend/core/types/handlerTypes.d.mts +2 -2
- package/dist/backend/core/types/handlerTypes.d.ts +2 -2
- package/dist/backend/core/types/index.d.mts +2 -2
- package/dist/backend/core/types/index.d.ts +2 -2
- package/dist/backend/core/types/routeTypes.d.mts +2 -2
- package/dist/backend/core/types/routeTypes.d.ts +2 -2
- package/dist/backend/index.d.mts +4 -4
- package/dist/backend/index.d.ts +4 -4
- package/dist/backend/index.js +13482 -7722
- package/dist/backend/index.mjs +4 -4
- package/dist/backend/{routeTypes-DmFnGvb2.d.mts → routeTypes-Bb3L3YJy.d.mts} +14646 -7926
- package/dist/backend/{routeTypes-ChCnBnee.d.ts → routeTypes-BhZ9UovL.d.ts} +14646 -7926
- package/dist/better-auth/{chunk-JBU3OM2O.mjs → chunk-4VW7A2HS.mjs} +13166 -8069
- package/dist/better-auth/{chunk-ZQA6B5RX.mjs → chunk-B2PHHBLY.mjs} +704 -41
- package/dist/better-auth/{chunk-56VTK4JS.mjs → chunk-D3DYQ36C.mjs} +1 -1
- package/dist/better-auth/index.js +13888 -8128
- package/dist/better-auth/index.mjs +3 -3
- package/dist/better-auth/types.d.mts +20 -1
- package/dist/better-auth/types.d.ts +20 -1
- package/dist/better-auth/utils/createAutumnEndpoint.js +704 -41
- package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
- package/dist/better-auth/utils/handleBetterAuthRoute.js +13482 -7722
- package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
- package/dist/better-auth/utils/index.js +13888 -8128
- package/dist/better-auth/utils/index.mjs +3 -3
- package/dist/react/AutumnContext.d.mts +4 -3
- package/dist/react/AutumnContext.d.ts +4 -3
- package/dist/react/AutumnProvider.js +678 -497
- package/dist/react/AutumnProvider.mjs +2 -2
- package/dist/react/{chunk-3CXPC6AS.mjs → chunk-6KIRT7EK.mjs} +1 -1
- package/dist/react/{chunk-PVCGOFQF.mjs → chunk-AAPQJY55.mjs} +1 -1
- package/dist/react/{chunk-N2L457YE.mjs → chunk-DDMHYLY3.mjs} +1 -1
- package/dist/react/{chunk-X7BHGQHX.mjs → chunk-ERN74FDW.mjs} +1 -1
- package/dist/react/{chunk-P23GII4V.mjs → chunk-FU6VEECB.mjs} +428 -235
- package/dist/react/{chunk-C4DMB2FQ.mjs → chunk-JH5BXBEU.mjs} +1 -1
- package/dist/react/{chunk-4TB3RHNC.mjs → chunk-M3L6EE7I.mjs} +1 -1
- package/dist/react/{chunk-Q3SFYOOM.mjs → chunk-VJDFB54U.mjs} +2 -2
- package/dist/react/{chunk-ZLGDHFMS.mjs → chunk-YZ23DM7M.mjs} +1 -1
- package/dist/react/client/AutumnClient.d.mts +4 -3
- package/dist/react/client/AutumnClient.d.ts +4 -3
- package/dist/react/client/IAutumnClient.d.mts +4 -471
- package/dist/react/client/IAutumnClient.d.ts +4 -471
- package/dist/react/client/index.d.mts +4 -3
- package/dist/react/client/index.d.ts +4 -3
- package/dist/react/{customer-B9DcViyn.d.mts → customer-Djhe48ql.d.ts} +24 -5
- package/dist/react/{customer-DbS31iZc.d.ts → customer-IVcJjz9u.d.mts} +24 -5
- package/dist/react/hooks/index.d.mts +4 -3
- package/dist/react/hooks/index.d.ts +4 -3
- package/dist/react/hooks/index.js +292 -193
- package/dist/react/hooks/index.mjs +8 -8
- package/dist/react/hooks/internal/check/balanceToAllowed.d.mts +2 -2
- package/dist/react/hooks/internal/check/balanceToAllowed.d.ts +2 -2
- package/dist/react/hooks/internal/check/customerToFeatures.d.mts +2 -2
- package/dist/react/hooks/internal/check/customerToFeatures.d.ts +2 -2
- package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.mts +2 -2
- package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.ts +2 -2
- package/dist/react/hooks/internal/check/getCreditCost.d.mts +2 -2
- package/dist/react/hooks/internal/check/getCreditCost.d.ts +2 -2
- package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +3 -3
- package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +3 -3
- package/dist/react/hooks/internal/useCustomerActions.d.mts +4 -3
- package/dist/react/hooks/internal/useCustomerActions.d.ts +4 -3
- package/dist/react/hooks/internal/useCustomerActions.js +1 -1
- package/dist/react/hooks/internal/useCustomerActions.mjs +2 -2
- package/dist/react/hooks/useAggregateEvents.d.mts +17 -17
- package/dist/react/hooks/useAggregateEvents.d.ts +17 -17
- package/dist/react/hooks/useAggregateEvents.js +292 -193
- package/dist/react/hooks/useAggregateEvents.mjs +2 -2
- package/dist/react/hooks/useCustomer.d.mts +3 -3
- package/dist/react/hooks/useCustomer.d.ts +3 -3
- package/dist/react/hooks/useCustomer.js +292 -193
- package/dist/react/hooks/useCustomer.mjs +3 -3
- package/dist/react/hooks/useEntity.d.mts +2 -2
- package/dist/react/hooks/useEntity.d.ts +2 -2
- package/dist/react/hooks/useEntity.js +292 -193
- package/dist/react/hooks/useEntity.mjs +2 -2
- package/dist/react/hooks/useListEvents.d.mts +17 -17
- package/dist/react/hooks/useListEvents.d.ts +17 -17
- package/dist/react/hooks/useListEvents.js +292 -193
- package/dist/react/hooks/useListEvents.mjs +2 -2
- package/dist/react/hooks/useListPlans.d.mts +5 -4
- package/dist/react/hooks/useListPlans.d.ts +5 -4
- package/dist/react/hooks/useListPlans.js +292 -193
- package/dist/react/hooks/useListPlans.mjs +2 -2
- package/dist/react/hooks/useReferrals.d.mts +2 -2
- package/dist/react/hooks/useReferrals.d.ts +2 -2
- package/dist/react/hooks/useReferrals.js +292 -193
- package/dist/react/hooks/useReferrals.mjs +2 -2
- package/dist/react/index.d.mts +4 -3
- package/dist/react/index.d.ts +4 -3
- package/dist/react/index.js +1586 -1393
- package/dist/react/index.mjs +9 -9
- package/dist/react/list-plans-op-ByqRxdNR.d.mts +1224 -0
- package/dist/react/list-plans-op-D-K2LRZV.d.ts +1224 -0
- package/dist/react/{params-B8-s4Q1n.d.ts → params-CFhvUVCf.d.ts} +1605 -199
- package/dist/react/{params-BquS51Ut.d.mts → params-D3ra6In7.d.mts} +1605 -199
- package/dist/react/plan-DOxbvjQY.d.mts +1496 -0
- package/dist/react/plan-DOxbvjQY.d.ts +1496 -0
- package/dist/sdk/index.d.mts +19588 -11175
- package/dist/sdk/index.d.ts +19588 -11175
- package/dist/sdk/index.js +19103 -11652
- package/dist/sdk/index.mjs +18149 -11528
- package/package.json +1 -1
- package/dist/react/plan-BKltGb1S.d.mts +0 -743
- package/dist/react/plan-BKltGb1S.d.ts +0 -743
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
useCustomerActions
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-JH5BXBEU.mjs";
|
|
5
5
|
import {
|
|
6
6
|
useQuery
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-FU6VEECB.mjs";
|
|
8
8
|
import {
|
|
9
9
|
useAutumnClient
|
|
10
10
|
} from "./chunk-SOA7GEAN.mjs";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { IAutumnClient } from './IAutumnClient.mjs';
|
|
2
|
-
import '../params-
|
|
3
|
-
import '../plan-
|
|
4
|
-
import '../customer-
|
|
2
|
+
import '../params-D3ra6In7.mjs';
|
|
3
|
+
import '../plan-DOxbvjQY.mjs';
|
|
4
|
+
import '../customer-IVcJjz9u.mjs';
|
|
5
|
+
import '../list-plans-op-ByqRxdNR.mjs';
|
|
5
6
|
|
|
6
7
|
/** Configuration for Autumn client */
|
|
7
8
|
type AutumnClientConfig = {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { IAutumnClient } from './IAutumnClient.js';
|
|
2
|
-
import '../params-
|
|
3
|
-
import '../plan-
|
|
4
|
-
import '../customer-
|
|
2
|
+
import '../params-CFhvUVCf.js';
|
|
3
|
+
import '../plan-DOxbvjQY.js';
|
|
4
|
+
import '../customer-Djhe48ql.js';
|
|
5
|
+
import '../list-plans-op-D-K2LRZV.js';
|
|
5
6
|
|
|
6
7
|
/** Configuration for Autumn client */
|
|
7
8
|
type AutumnClientConfig = {
|
|
@@ -1,474 +1,7 @@
|
|
|
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,
|
|
2
|
-
import { C as Customer } from '../customer-
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Billing interval (e.g. 'month', 'year').
|
|
7
|
-
*/
|
|
8
|
-
declare const ListPlansPriceInterval: {
|
|
9
|
-
readonly OneOff: "one_off";
|
|
10
|
-
readonly Week: "week";
|
|
11
|
-
readonly Month: "month";
|
|
12
|
-
readonly Quarter: "quarter";
|
|
13
|
-
readonly SemiAnnual: "semi_annual";
|
|
14
|
-
readonly Year: "year";
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* Billing interval (e.g. 'month', 'year').
|
|
18
|
-
*/
|
|
19
|
-
type ListPlansPriceInterval = OpenEnum<typeof ListPlansPriceInterval>;
|
|
20
|
-
/**
|
|
21
|
-
* Display text for showing this price in pricing pages.
|
|
22
|
-
*/
|
|
23
|
-
type ListPlansPriceDisplay = {
|
|
24
|
-
/**
|
|
25
|
-
* Main display text (e.g. '$10' or '100 messages').
|
|
26
|
-
*/
|
|
27
|
-
primaryText: string;
|
|
28
|
-
/**
|
|
29
|
-
* Secondary display text (e.g. 'per month' or 'then $0.5 per 100').
|
|
30
|
-
*/
|
|
31
|
-
secondaryText?: string | undefined;
|
|
32
|
-
};
|
|
33
|
-
type ListPlansPrice = {
|
|
34
|
-
/**
|
|
35
|
-
* Base price amount for the plan.
|
|
36
|
-
*/
|
|
37
|
-
amount: number;
|
|
38
|
-
/**
|
|
39
|
-
* Billing interval (e.g. 'month', 'year').
|
|
40
|
-
*/
|
|
41
|
-
interval: ListPlansPriceInterval;
|
|
42
|
-
/**
|
|
43
|
-
* Number of intervals per billing cycle. Defaults to 1.
|
|
44
|
-
*/
|
|
45
|
-
intervalCount?: number | undefined;
|
|
46
|
-
/**
|
|
47
|
-
* Display text for showing this price in pricing pages.
|
|
48
|
-
*/
|
|
49
|
-
display?: ListPlansPriceDisplay | undefined;
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
* The type of the feature
|
|
53
|
-
*/
|
|
54
|
-
declare const ListPlansType: {
|
|
55
|
-
readonly Static: "static";
|
|
56
|
-
readonly Boolean: "boolean";
|
|
57
|
-
readonly SingleUse: "single_use";
|
|
58
|
-
readonly ContinuousUse: "continuous_use";
|
|
59
|
-
readonly CreditSystem: "credit_system";
|
|
60
|
-
readonly AiCreditSystem: "ai_credit_system";
|
|
61
|
-
};
|
|
62
|
-
/**
|
|
63
|
-
* The type of the feature
|
|
64
|
-
*/
|
|
65
|
-
type ListPlansType = OpenEnum<typeof ListPlansType>;
|
|
66
|
-
type ListPlansFeatureDisplay = {
|
|
67
|
-
/**
|
|
68
|
-
* The singular display name for the feature.
|
|
69
|
-
*/
|
|
70
|
-
singular: string;
|
|
71
|
-
/**
|
|
72
|
-
* The plural display name for the feature.
|
|
73
|
-
*/
|
|
74
|
-
plural: string;
|
|
75
|
-
};
|
|
76
|
-
type ListPlansCreditSchema = {
|
|
77
|
-
/**
|
|
78
|
-
* The ID of the metered feature (should be a single_use feature).
|
|
79
|
-
*/
|
|
80
|
-
meteredFeatureId: string;
|
|
81
|
-
/**
|
|
82
|
-
* The credit cost of the metered feature.
|
|
83
|
-
*/
|
|
84
|
-
creditCost: number;
|
|
85
|
-
};
|
|
86
|
-
/**
|
|
87
|
-
* The full feature object if expanded.
|
|
88
|
-
*/
|
|
89
|
-
type ListPlansFeature = {
|
|
90
|
-
/**
|
|
91
|
-
* The ID of the feature, used to refer to it in other API calls like /track or /check.
|
|
92
|
-
*/
|
|
93
|
-
id: string;
|
|
94
|
-
/**
|
|
95
|
-
* The name of the feature.
|
|
96
|
-
*/
|
|
97
|
-
name?: string | null | undefined;
|
|
98
|
-
/**
|
|
99
|
-
* The type of the feature
|
|
100
|
-
*/
|
|
101
|
-
type: ListPlansType;
|
|
102
|
-
/**
|
|
103
|
-
* Singular and plural display names for the feature.
|
|
104
|
-
*/
|
|
105
|
-
display?: ListPlansFeatureDisplay | null | undefined;
|
|
106
|
-
/**
|
|
107
|
-
* Credit cost schema for credit system features.
|
|
108
|
-
*/
|
|
109
|
-
creditSchema?: Array<ListPlansCreditSchema> | null | undefined;
|
|
110
|
-
/**
|
|
111
|
-
* Whether or not the feature is archived.
|
|
112
|
-
*/
|
|
113
|
-
archived?: boolean | null | undefined;
|
|
114
|
-
};
|
|
115
|
-
/**
|
|
116
|
-
* The interval at which the feature balance resets (e.g. 'month', 'year'). For consumable features, usage resets to 0 and included units are restored.
|
|
117
|
-
*/
|
|
118
|
-
declare const ListPlansResetInterval: {
|
|
119
|
-
readonly OneOff: "one_off";
|
|
120
|
-
readonly Minute: "minute";
|
|
121
|
-
readonly Hour: "hour";
|
|
122
|
-
readonly Day: "day";
|
|
123
|
-
readonly Week: "week";
|
|
124
|
-
readonly Month: "month";
|
|
125
|
-
readonly Quarter: "quarter";
|
|
126
|
-
readonly SemiAnnual: "semi_annual";
|
|
127
|
-
readonly Year: "year";
|
|
128
|
-
};
|
|
129
|
-
/**
|
|
130
|
-
* The interval at which the feature balance resets (e.g. 'month', 'year'). For consumable features, usage resets to 0 and included units are restored.
|
|
131
|
-
*/
|
|
132
|
-
type ListPlansResetInterval = OpenEnum<typeof ListPlansResetInterval>;
|
|
133
|
-
type ListPlansReset = {
|
|
134
|
-
/**
|
|
135
|
-
* The interval at which the feature balance resets (e.g. 'month', 'year'). For consumable features, usage resets to 0 and included units are restored.
|
|
136
|
-
*/
|
|
137
|
-
interval: ListPlansResetInterval;
|
|
138
|
-
/**
|
|
139
|
-
* Number of intervals between resets. Defaults to 1.
|
|
140
|
-
*/
|
|
141
|
-
intervalCount?: number | undefined;
|
|
142
|
-
};
|
|
143
|
-
type ListPlansTier = {
|
|
144
|
-
to: number | string;
|
|
145
|
-
amount: number;
|
|
146
|
-
flatAmount?: number | undefined;
|
|
147
|
-
};
|
|
148
|
-
declare const ListPlansTierBehavior: {
|
|
149
|
-
readonly Graduated: "graduated";
|
|
150
|
-
readonly Volume: "volume";
|
|
151
|
-
};
|
|
152
|
-
type ListPlansTierBehavior = OpenEnum<typeof ListPlansTierBehavior>;
|
|
153
|
-
/**
|
|
154
|
-
* Billing interval for this price. For consumable features, should match reset.interval.
|
|
155
|
-
*/
|
|
156
|
-
declare const ListPlansPriceItemInterval: {
|
|
157
|
-
readonly OneOff: "one_off";
|
|
158
|
-
readonly Week: "week";
|
|
159
|
-
readonly Month: "month";
|
|
160
|
-
readonly Quarter: "quarter";
|
|
161
|
-
readonly SemiAnnual: "semi_annual";
|
|
162
|
-
readonly Year: "year";
|
|
163
|
-
};
|
|
164
|
-
/**
|
|
165
|
-
* Billing interval for this price. For consumable features, should match reset.interval.
|
|
166
|
-
*/
|
|
167
|
-
type ListPlansPriceItemInterval = OpenEnum<typeof ListPlansPriceItemInterval>;
|
|
168
|
-
/**
|
|
169
|
-
* 'prepaid' for features like seats where customers pay upfront, 'usage_based' for pay-as-you-go after included usage.
|
|
170
|
-
*/
|
|
171
|
-
declare const ListPlansBillingMethod: {
|
|
172
|
-
readonly Prepaid: "prepaid";
|
|
173
|
-
readonly UsageBased: "usage_based";
|
|
174
|
-
};
|
|
175
|
-
/**
|
|
176
|
-
* 'prepaid' for features like seats where customers pay upfront, 'usage_based' for pay-as-you-go after included usage.
|
|
177
|
-
*/
|
|
178
|
-
type ListPlansBillingMethod = OpenEnum<typeof ListPlansBillingMethod>;
|
|
179
|
-
type ListPlansItemPrice = {
|
|
180
|
-
/**
|
|
181
|
-
* Price per billing_units after included usage is consumed. Mutually exclusive with tiers.
|
|
182
|
-
*/
|
|
183
|
-
amount?: number | undefined;
|
|
184
|
-
/**
|
|
185
|
-
* Tiered pricing configuration. Each tier's 'to' INCLUDES the included amount. Either 'tiers' or 'amount' is required.
|
|
186
|
-
*/
|
|
187
|
-
tiers?: Array<ListPlansTier> | undefined;
|
|
188
|
-
tierBehavior?: ListPlansTierBehavior | undefined;
|
|
189
|
-
/**
|
|
190
|
-
* Billing interval for this price. For consumable features, should match reset.interval.
|
|
191
|
-
*/
|
|
192
|
-
interval: ListPlansPriceItemInterval;
|
|
193
|
-
/**
|
|
194
|
-
* Number of intervals per billing cycle. Defaults to 1.
|
|
195
|
-
*/
|
|
196
|
-
intervalCount?: number | undefined;
|
|
197
|
-
/**
|
|
198
|
-
* Number of units per price increment. Usage is rounded UP to the nearest billing_units when billed (e.g. billing_units=100 means 101 usage rounds to 200).
|
|
199
|
-
*/
|
|
200
|
-
billingUnits: number;
|
|
201
|
-
/**
|
|
202
|
-
* 'prepaid' for features like seats where customers pay upfront, 'usage_based' for pay-as-you-go after included usage.
|
|
203
|
-
*/
|
|
204
|
-
billingMethod: ListPlansBillingMethod;
|
|
205
|
-
/**
|
|
206
|
-
* Maximum units a customer can purchase beyond included. E.g. if included=100 and max_purchase=300, customer can use up to 400 total before usage is capped. Null for no limit.
|
|
207
|
-
*/
|
|
208
|
-
maxPurchase: number | null;
|
|
209
|
-
};
|
|
210
|
-
/**
|
|
211
|
-
* Display text for showing this item in pricing pages.
|
|
212
|
-
*/
|
|
213
|
-
type ListPlansItemDisplay = {
|
|
214
|
-
/**
|
|
215
|
-
* Main display text (e.g. '$10' or '100 messages').
|
|
216
|
-
*/
|
|
217
|
-
primaryText: string;
|
|
218
|
-
/**
|
|
219
|
-
* Secondary display text (e.g. 'per month' or 'then $0.5 per 100').
|
|
220
|
-
*/
|
|
221
|
-
secondaryText?: string | undefined;
|
|
222
|
-
};
|
|
223
|
-
/**
|
|
224
|
-
* When rolled over units expire.
|
|
225
|
-
*/
|
|
226
|
-
declare const ListPlansExpiryDurationType: {
|
|
227
|
-
readonly Month: "month";
|
|
228
|
-
readonly Forever: "forever";
|
|
229
|
-
};
|
|
230
|
-
/**
|
|
231
|
-
* When rolled over units expire.
|
|
232
|
-
*/
|
|
233
|
-
type ListPlansExpiryDurationType = OpenEnum<typeof ListPlansExpiryDurationType>;
|
|
234
|
-
/**
|
|
235
|
-
* Rollover configuration for unused units. If set, unused included units roll over to the next period.
|
|
236
|
-
*/
|
|
237
|
-
type ListPlansRollover = {
|
|
238
|
-
/**
|
|
239
|
-
* Maximum rollover units. Null for unlimited rollover.
|
|
240
|
-
*/
|
|
241
|
-
max: number | null;
|
|
242
|
-
/**
|
|
243
|
-
* Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
|
|
244
|
-
*/
|
|
245
|
-
maxPercentage?: number | null | undefined;
|
|
246
|
-
/**
|
|
247
|
-
* When rolled over units expire.
|
|
248
|
-
*/
|
|
249
|
-
expiryDurationType: ListPlansExpiryDurationType;
|
|
250
|
-
/**
|
|
251
|
-
* Number of periods before expiry.
|
|
252
|
-
*/
|
|
253
|
-
expiryDurationLength?: number | undefined;
|
|
254
|
-
};
|
|
255
|
-
type ListPlansItem = {
|
|
256
|
-
/**
|
|
257
|
-
* The ID of the feature this item configures.
|
|
258
|
-
*/
|
|
259
|
-
featureId: string;
|
|
260
|
-
/**
|
|
261
|
-
* The full feature object if expanded.
|
|
262
|
-
*/
|
|
263
|
-
feature?: ListPlansFeature | undefined;
|
|
264
|
-
/**
|
|
265
|
-
* Number of free units included. For consumable features, balance resets to this number each interval.
|
|
266
|
-
*/
|
|
267
|
-
included: number;
|
|
268
|
-
/**
|
|
269
|
-
* Whether the customer has unlimited access to this feature.
|
|
270
|
-
*/
|
|
271
|
-
unlimited: boolean;
|
|
272
|
-
/**
|
|
273
|
-
* Reset configuration for consumable features. Null for non-consumable features like seats where usage persists across billing cycles.
|
|
274
|
-
*/
|
|
275
|
-
reset: ListPlansReset | null;
|
|
276
|
-
/**
|
|
277
|
-
* Pricing configuration for usage beyond included units. Null if feature is entirely free.
|
|
278
|
-
*/
|
|
279
|
-
price: ListPlansItemPrice | null;
|
|
280
|
-
/**
|
|
281
|
-
* Display text for showing this item in pricing pages.
|
|
282
|
-
*/
|
|
283
|
-
display?: ListPlansItemDisplay | undefined;
|
|
284
|
-
/**
|
|
285
|
-
* Rollover configuration for unused units. If set, unused included units roll over to the next period.
|
|
286
|
-
*/
|
|
287
|
-
rollover?: ListPlansRollover | undefined;
|
|
288
|
-
};
|
|
289
|
-
/**
|
|
290
|
-
* Unit of time for the trial duration ('day', 'month', 'year').
|
|
291
|
-
*/
|
|
292
|
-
declare const ListPlansDurationType: {
|
|
293
|
-
readonly Day: "day";
|
|
294
|
-
readonly Month: "month";
|
|
295
|
-
readonly Year: "year";
|
|
296
|
-
};
|
|
297
|
-
/**
|
|
298
|
-
* Unit of time for the trial duration ('day', 'month', 'year').
|
|
299
|
-
*/
|
|
300
|
-
type ListPlansDurationType = OpenEnum<typeof ListPlansDurationType>;
|
|
301
|
-
declare const ListPlansOnEnd: {
|
|
302
|
-
readonly Bill: "bill";
|
|
303
|
-
readonly Revert: "revert";
|
|
304
|
-
};
|
|
305
|
-
type ListPlansOnEnd = OpenEnum<typeof ListPlansOnEnd>;
|
|
306
|
-
/**
|
|
307
|
-
* Free trial configuration. If set, new customers can try this plan before being charged.
|
|
308
|
-
*/
|
|
309
|
-
type ListPlansFreeTrial = {
|
|
310
|
-
/**
|
|
311
|
-
* Number of duration_type periods the trial lasts.
|
|
312
|
-
*/
|
|
313
|
-
durationLength: number;
|
|
314
|
-
/**
|
|
315
|
-
* Unit of time for the trial duration ('day', 'month', 'year').
|
|
316
|
-
*/
|
|
317
|
-
durationType: ListPlansDurationType;
|
|
318
|
-
/**
|
|
319
|
-
* Whether a payment method is required to start the trial. If true, customer will be charged after trial ends.
|
|
320
|
-
*/
|
|
321
|
-
cardRequired: boolean;
|
|
322
|
-
/**
|
|
323
|
-
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
324
|
-
*/
|
|
325
|
-
onEnd?: ListPlansOnEnd | null | undefined;
|
|
326
|
-
};
|
|
327
|
-
/**
|
|
328
|
-
* Environment this plan belongs to ('sandbox' or 'live').
|
|
329
|
-
*/
|
|
330
|
-
declare const ListPlansEnv: {
|
|
331
|
-
readonly Sandbox: "sandbox";
|
|
332
|
-
readonly Live: "live";
|
|
333
|
-
};
|
|
334
|
-
/**
|
|
335
|
-
* Environment this plan belongs to ('sandbox' or 'live').
|
|
336
|
-
*/
|
|
337
|
-
type ListPlansEnv = OpenEnum<typeof ListPlansEnv>;
|
|
338
|
-
/**
|
|
339
|
-
* Miscellaneous plan-level configuration flags.
|
|
340
|
-
*/
|
|
341
|
-
type ListPlansConfig = {
|
|
342
|
-
/**
|
|
343
|
-
* If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past_due state.
|
|
344
|
-
*/
|
|
345
|
-
ignorePastDue: boolean;
|
|
346
|
-
};
|
|
347
|
-
/**
|
|
348
|
-
* The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
|
|
349
|
-
*/
|
|
350
|
-
declare const ListPlansStatus: {
|
|
351
|
-
readonly Active: "active";
|
|
352
|
-
readonly Scheduled: "scheduled";
|
|
353
|
-
};
|
|
354
|
-
/**
|
|
355
|
-
* The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
|
|
356
|
-
*/
|
|
357
|
-
type ListPlansStatus = OpenEnum<typeof ListPlansStatus>;
|
|
358
|
-
/**
|
|
359
|
-
* The action that would occur if this plan were attached to the customer.
|
|
360
|
-
*/
|
|
361
|
-
declare const ListPlansAttachAction: {
|
|
362
|
-
readonly Activate: "activate";
|
|
363
|
-
readonly Upgrade: "upgrade";
|
|
364
|
-
readonly Downgrade: "downgrade";
|
|
365
|
-
readonly None: "none";
|
|
366
|
-
readonly Purchase: "purchase";
|
|
367
|
-
};
|
|
368
|
-
/**
|
|
369
|
-
* The action that would occur if this plan were attached to the customer.
|
|
370
|
-
*/
|
|
371
|
-
type ListPlansAttachAction = OpenEnum<typeof ListPlansAttachAction>;
|
|
372
|
-
type ListPlansCustomerEligibility = {
|
|
373
|
-
/**
|
|
374
|
-
* Whether the trial on this plan is available to this customer. For example, if the customer used the trial in the past, this will be false.
|
|
375
|
-
*/
|
|
376
|
-
trialAvailable?: boolean | undefined;
|
|
377
|
-
/**
|
|
378
|
-
* The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
|
|
379
|
-
*/
|
|
380
|
-
status?: ListPlansStatus | undefined;
|
|
381
|
-
/**
|
|
382
|
-
* Whether the customer's active instance of this plan is set to cancel.
|
|
383
|
-
*/
|
|
384
|
-
canceling?: boolean | undefined;
|
|
385
|
-
/**
|
|
386
|
-
* Whether the customer is currently on a free trial of this plan.
|
|
387
|
-
*/
|
|
388
|
-
trialing?: boolean | undefined;
|
|
389
|
-
/**
|
|
390
|
-
* The action that would occur if this plan were attached to the customer.
|
|
391
|
-
*/
|
|
392
|
-
attachAction: ListPlansAttachAction;
|
|
393
|
-
};
|
|
394
|
-
/**
|
|
395
|
-
* A plan defines a set of features, pricing, and entitlements that can be attached to customers.
|
|
396
|
-
*/
|
|
397
|
-
type ListPlansList = {
|
|
398
|
-
/**
|
|
399
|
-
* Unique identifier for the plan.
|
|
400
|
-
*/
|
|
401
|
-
id: string;
|
|
402
|
-
/**
|
|
403
|
-
* Display name of the plan.
|
|
404
|
-
*/
|
|
405
|
-
name: string;
|
|
406
|
-
/**
|
|
407
|
-
* Optional description of the plan.
|
|
408
|
-
*/
|
|
409
|
-
description: string | null;
|
|
410
|
-
/**
|
|
411
|
-
* Group identifier for organizing related plans. Plans in the same group are mutually exclusive.
|
|
412
|
-
*/
|
|
413
|
-
group: string | null;
|
|
414
|
-
/**
|
|
415
|
-
* Version number of the plan. Incremented when plan configuration changes.
|
|
416
|
-
*/
|
|
417
|
-
version: number;
|
|
418
|
-
/**
|
|
419
|
-
* Whether this is an add-on plan that can be attached alongside a main plan.
|
|
420
|
-
*/
|
|
421
|
-
addOn: boolean;
|
|
422
|
-
/**
|
|
423
|
-
* If true, this plan is automatically attached when a customer is created. Used for free plans.
|
|
424
|
-
*/
|
|
425
|
-
autoEnable: boolean;
|
|
426
|
-
/**
|
|
427
|
-
* Base recurring price for the plan. Null for free plans or usage-only plans.
|
|
428
|
-
*/
|
|
429
|
-
price: ListPlansPrice | null;
|
|
430
|
-
/**
|
|
431
|
-
* Feature configurations included in this plan. Each item defines included units, pricing, and reset behavior for a feature.
|
|
432
|
-
*/
|
|
433
|
-
items: Array<ListPlansItem>;
|
|
434
|
-
/**
|
|
435
|
-
* Free trial configuration. If set, new customers can try this plan before being charged.
|
|
436
|
-
*/
|
|
437
|
-
freeTrial?: ListPlansFreeTrial | undefined;
|
|
438
|
-
/**
|
|
439
|
-
* Unix timestamp (ms) when the plan was created.
|
|
440
|
-
*/
|
|
441
|
-
createdAt: number;
|
|
442
|
-
/**
|
|
443
|
-
* Environment this plan belongs to ('sandbox' or 'live').
|
|
444
|
-
*/
|
|
445
|
-
env: ListPlansEnv;
|
|
446
|
-
/**
|
|
447
|
-
* Whether the plan is archived. Archived plans cannot be attached to new customers.
|
|
448
|
-
*/
|
|
449
|
-
archived: boolean;
|
|
450
|
-
/**
|
|
451
|
-
* If this is a variant, the ID of the base plan it was created from.
|
|
452
|
-
*/
|
|
453
|
-
baseVariantId: string | null;
|
|
454
|
-
/**
|
|
455
|
-
* Miscellaneous plan-level configuration flags.
|
|
456
|
-
*/
|
|
457
|
-
config: ListPlansConfig;
|
|
458
|
-
/**
|
|
459
|
-
* Arbitrary key-value metadata defined by you for your own use. Shared across all versions of the plan.
|
|
460
|
-
*/
|
|
461
|
-
metadata: {
|
|
462
|
-
[k: string]: any;
|
|
463
|
-
};
|
|
464
|
-
customerEligibility?: ListPlansCustomerEligibility | undefined;
|
|
465
|
-
};
|
|
466
|
-
/**
|
|
467
|
-
* OK
|
|
468
|
-
*/
|
|
469
|
-
type ListPlansResponse = {
|
|
470
|
-
list: Array<ListPlansList>;
|
|
471
|
-
};
|
|
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-D3ra6In7.mjs';
|
|
2
|
+
import { C as Customer } from '../customer-IVcJjz9u.mjs';
|
|
3
|
+
import { L as ListPlansResponse } from '../list-plans-op-ByqRxdNR.mjs';
|
|
4
|
+
import '../plan-DOxbvjQY.mjs';
|
|
472
5
|
|
|
473
6
|
/** Client interface matching backend RPC routes */
|
|
474
7
|
interface IAutumnClient {
|