autumn-js 1.2.53 → 1.2.55
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 +4928 -1731
- package/dist/backend/adapters/express.mjs +6 -6
- package/dist/backend/adapters/fetch.js +4928 -1731
- package/dist/backend/adapters/fetch.mjs +6 -6
- package/dist/backend/adapters/hono.js +4928 -1731
- package/dist/backend/adapters/hono.mjs +6 -6
- package/dist/backend/adapters/index.js +4928 -1731
- package/dist/backend/adapters/index.mjs +9 -9
- package/dist/backend/adapters/next.js +4928 -1731
- package/dist/backend/adapters/next.mjs +6 -6
- package/dist/backend/{chunk-QZGNWKGU.mjs → chunk-4SLVJJQ3.mjs} +415 -149
- package/dist/backend/{chunk-UO2U5YHG.mjs → chunk-6O2BRQQG.mjs} +1 -1
- package/dist/backend/{chunk-BZJMZLRO.mjs → chunk-CTDUPQOB.mjs} +2 -2
- package/dist/backend/{chunk-DUWBM6AP.mjs → chunk-HBCBE5EZ.mjs} +2 -2
- package/dist/backend/{chunk-G5BNVBAL.mjs → chunk-QP3VSL4U.mjs} +1 -1
- package/dist/backend/{chunk-6HGIR6SI.mjs → chunk-V6O5INQW.mjs} +1 -1
- package/dist/backend/{chunk-QEMMOYX7.mjs → chunk-W4YHYDGM.mjs} +1 -1
- package/dist/backend/{chunk-AKZ3LI43.mjs → chunk-Z3CFUICE.mjs} +4513 -1582
- 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 +4928 -1731
- package/dist/backend/core/handlers/coreHandler.mjs +4 -4
- 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 +1 -1
- package/dist/backend/core/handlers/handleRouteByName.js +4928 -1731
- package/dist/backend/core/handlers/handleRouteByName.mjs +4 -4
- 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 +4928 -1731
- package/dist/backend/core/handlers/index.mjs +5 -5
- package/dist/backend/core/index.d.mts +1 -1
- package/dist/backend/core/index.d.ts +1 -1
- package/dist/backend/core/index.js +4928 -1731
- package/dist/backend/core/index.mjs +7 -7
- package/dist/backend/core/routes/index.d.mts +1 -1
- package/dist/backend/core/routes/index.d.ts +1 -1
- package/dist/backend/core/routes/index.js +415 -149
- package/dist/backend/core/routes/index.mjs +2 -2
- package/dist/backend/core/routes/routeBuilder.d.mts +1 -1
- package/dist/backend/core/routes/routeBuilder.d.ts +1 -1
- package/dist/backend/core/routes/routeConfigs.d.mts +1 -1
- package/dist/backend/core/routes/routeConfigs.d.ts +1 -1
- package/dist/backend/core/routes/routeConfigs.js +415 -149
- package/dist/backend/core/routes/routeConfigs.mjs +2 -2
- package/dist/backend/core/types/handlerTypes.d.mts +1 -1
- package/dist/backend/core/types/handlerTypes.d.ts +1 -1
- package/dist/backend/core/types/index.d.mts +1 -1
- package/dist/backend/core/types/index.d.ts +1 -1
- package/dist/backend/core/types/routeTypes.d.mts +1 -1
- package/dist/backend/core/types/routeTypes.d.ts +1 -1
- package/dist/backend/core/utils/index.mjs +3 -3
- package/dist/backend/index.d.mts +2 -2
- package/dist/backend/index.d.ts +2 -2
- package/dist/backend/index.js +4928 -1731
- package/dist/backend/index.mjs +7 -7
- package/dist/backend/{routeTypes-jEkjrH2F.d.mts → routeTypes-BDnJulPJ.d.mts} +4748 -1657
- package/dist/backend/{routeTypes-C9oAOQtZ.d.ts → routeTypes-Cx-p8x5O.d.ts} +4748 -1657
- package/dist/better-auth/{chunk-56PNBTLH.mjs → chunk-EVKS2OKA.mjs} +1 -1
- package/dist/better-auth/{chunk-AI73OSOF.mjs → chunk-JQU4W6BA.mjs} +4514 -1583
- package/dist/better-auth/{chunk-IIOL3QPN.mjs → chunk-ODDA4I3O.mjs} +415 -149
- package/dist/better-auth/index.js +4928 -1731
- package/dist/better-auth/index.mjs +3 -3
- package/dist/better-auth/utils/createAutumnEndpoint.js +415 -149
- package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
- package/dist/better-auth/utils/handleBetterAuthRoute.js +4928 -1731
- package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
- package/dist/better-auth/utils/index.js +4928 -1731
- package/dist/better-auth/utils/index.mjs +3 -3
- package/dist/react/AutumnContext.d.mts +4 -4
- package/dist/react/AutumnContext.d.ts +4 -4
- package/dist/react/{chunk-CQF3ER2L.mjs → chunk-JV4GHJ4W.mjs} +1 -1
- package/dist/react/{chunk-D6DFRS3U.mjs → chunk-NDHIXCZM.mjs} +2 -1
- package/dist/react/{chunk-BWKG32GC.mjs → chunk-Q7HVHWDK.mjs} +1 -1
- package/dist/react/{chunk-LUBYNTYC.mjs → chunk-VKY4SZNZ.mjs} +1 -1
- package/dist/react/client/AutumnClient.d.mts +4 -4
- package/dist/react/client/AutumnClient.d.ts +4 -4
- package/dist/react/client/IAutumnClient.d.mts +4 -4
- package/dist/react/client/IAutumnClient.d.ts +4 -4
- package/dist/react/client/index.d.mts +4 -4
- package/dist/react/client/index.d.ts +4 -4
- package/dist/react/{customer-4XLHVIIG.d.mts → customer-DyNLAM-_.d.ts} +74 -9
- package/dist/react/{customer-CPv9i8iR.d.ts → customer-Dz1Fr6nJ.d.mts} +74 -9
- package/dist/react/hooks/index.d.mts +4 -4
- package/dist/react/hooks/index.d.ts +4 -4
- package/dist/react/hooks/index.js +2 -1
- package/dist/react/hooks/index.mjs +4 -4
- 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/check/getCreditCost.js +2 -1
- package/dist/react/hooks/internal/check/getCreditCost.mjs +1 -1
- 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/getLocalCheckResponse.js +2 -1
- package/dist/react/hooks/internal/getLocalCheckResponse.mjs +2 -2
- package/dist/react/hooks/internal/useCustomerActions.d.mts +4 -4
- package/dist/react/hooks/internal/useCustomerActions.d.ts +4 -4
- package/dist/react/hooks/internal/useCustomerActions.js +2 -1
- package/dist/react/hooks/internal/useCustomerActions.mjs +3 -3
- package/dist/react/hooks/useAggregateEvents.d.mts +2 -2
- package/dist/react/hooks/useAggregateEvents.d.ts +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 +2 -1
- package/dist/react/hooks/useCustomer.mjs +4 -4
- package/dist/react/hooks/useEntity.d.mts +2 -2
- package/dist/react/hooks/useEntity.d.ts +2 -2
- package/dist/react/hooks/useListEvents.d.mts +2 -2
- package/dist/react/hooks/useListEvents.d.ts +2 -2
- package/dist/react/hooks/useListPlans.d.mts +3 -3
- package/dist/react/hooks/useListPlans.d.ts +3 -3
- package/dist/react/hooks/useReferrals.d.mts +2 -2
- package/dist/react/hooks/useReferrals.d.ts +2 -2
- package/dist/react/index.d.mts +4 -4
- package/dist/react/index.d.ts +4 -4
- package/dist/react/index.js +2 -1
- package/dist/react/index.mjs +4 -4
- package/dist/react/{list-plans-op-Dsryi9lT.d.mts → list-plans-op-DTkteoH6.d.ts} +656 -468
- package/dist/react/{list-plans-op-jsAtkFHJ.d.ts → list-plans-op-ZRs2lBAB.d.mts} +656 -468
- package/dist/react/{params-BGfGRnue.d.ts → params-BiUwODRL.d.mts} +628 -86
- package/dist/react/{params-DPSGMHHa.d.mts → params-DIglFpGj.d.ts} +628 -86
- package/dist/react/{plan-DEGPMYmh.d.mts → plan-C96AilzT.d.mts} +798 -374
- package/dist/react/{plan-DEGPMYmh.d.ts → plan-C96AilzT.d.ts} +798 -374
- package/dist/sdk/index.d.mts +6891 -2819
- package/dist/sdk/index.d.ts +6891 -2819
- package/dist/sdk/index.js +6582 -1771
- package/dist/sdk/index.mjs +5949 -1670
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ClosedEnum, O as OpenEnum, a as Balance, P as Plan } from './plan-
|
|
1
|
+
import { C as ClosedEnum, O as OpenEnum, a as Balance, P as Plan } from './plan-C96AilzT.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Time range to aggregate events for. Either range or custom_range must be provided
|
|
@@ -60,7 +60,7 @@ type EventsAggregateParams = {
|
|
|
60
60
|
*/
|
|
61
61
|
featureId: string | Array<string>;
|
|
62
62
|
/**
|
|
63
|
-
* Property to group events by (e.g. "properties.region"), or "$customer_id" / "$entity_id" / "$plan_id" to group by those columns
|
|
63
|
+
* Property to group events by (e.g. "properties.region"), or "$customer_id" / "$entity_id" / "$plan_id" to group by those columns. When aggregate_on is "deducted", "$feature_id" groups deductions by the tracked feature that consumed each balance.
|
|
64
64
|
*/
|
|
65
65
|
groupBy?: string | undefined;
|
|
66
66
|
/**
|
|
@@ -229,6 +229,50 @@ type AttachFeatureQuantity = {
|
|
|
229
229
|
*/
|
|
230
230
|
adjustable?: boolean | undefined;
|
|
231
231
|
};
|
|
232
|
+
/**
|
|
233
|
+
* Unit of time for the trial ('day', 'month', 'year').
|
|
234
|
+
*/
|
|
235
|
+
declare const AttachDurationType: {
|
|
236
|
+
readonly Day: "day";
|
|
237
|
+
readonly Month: "month";
|
|
238
|
+
readonly Year: "year";
|
|
239
|
+
};
|
|
240
|
+
/**
|
|
241
|
+
* Unit of time for the trial ('day', 'month', 'year').
|
|
242
|
+
*/
|
|
243
|
+
type AttachDurationType = ClosedEnum<typeof AttachDurationType>;
|
|
244
|
+
/**
|
|
245
|
+
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
246
|
+
*/
|
|
247
|
+
declare const AttachOnEnd: {
|
|
248
|
+
readonly Bill: "bill";
|
|
249
|
+
readonly Revert: "revert";
|
|
250
|
+
};
|
|
251
|
+
/**
|
|
252
|
+
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
253
|
+
*/
|
|
254
|
+
type AttachOnEnd = ClosedEnum<typeof AttachOnEnd>;
|
|
255
|
+
/**
|
|
256
|
+
* Free trial configuration for a plan.
|
|
257
|
+
*/
|
|
258
|
+
type AttachFreeTrialParams = {
|
|
259
|
+
/**
|
|
260
|
+
* Number of duration_type periods the trial lasts.
|
|
261
|
+
*/
|
|
262
|
+
durationLength: number;
|
|
263
|
+
/**
|
|
264
|
+
* Unit of time for the trial ('day', 'month', 'year').
|
|
265
|
+
*/
|
|
266
|
+
durationType?: AttachDurationType | undefined;
|
|
267
|
+
/**
|
|
268
|
+
* If true, a payment method is required to start the trial and the customer is charged when it ends. Defaults to false.
|
|
269
|
+
*/
|
|
270
|
+
cardRequired?: boolean | undefined;
|
|
271
|
+
/**
|
|
272
|
+
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
273
|
+
*/
|
|
274
|
+
onEnd?: AttachOnEnd | undefined;
|
|
275
|
+
};
|
|
232
276
|
/**
|
|
233
277
|
* Billing interval (e.g. 'month', 'year').
|
|
234
278
|
*/
|
|
@@ -259,7 +303,7 @@ type AttachAdditionalCurrency = {
|
|
|
259
303
|
*/
|
|
260
304
|
type AttachBasePrice = {
|
|
261
305
|
/**
|
|
262
|
-
* Base price amount for the plan.
|
|
306
|
+
* Base price amount for the plan, in major currency units (e.g. dollars).
|
|
263
307
|
*/
|
|
264
308
|
amount: number;
|
|
265
309
|
/**
|
|
@@ -811,11 +855,15 @@ type AttachPlanItemFilter = {
|
|
|
811
855
|
* Match items with this interval_count. Disambiguates between items that share an interval but differ in count.
|
|
812
856
|
*/
|
|
813
857
|
intervalCount?: number | undefined;
|
|
858
|
+
/**
|
|
859
|
+
* Match items whose grant equals this included usage. Omitted is a wildcard.
|
|
860
|
+
*/
|
|
861
|
+
included?: number | undefined;
|
|
814
862
|
};
|
|
815
863
|
/**
|
|
816
864
|
* Unit of time for the trial ('day', 'month', 'year').
|
|
817
865
|
*/
|
|
818
|
-
declare const
|
|
866
|
+
declare const AttachCustomizeDurationType: {
|
|
819
867
|
readonly Day: "day";
|
|
820
868
|
readonly Month: "month";
|
|
821
869
|
readonly Year: "year";
|
|
@@ -823,22 +871,22 @@ declare const AttachDurationType: {
|
|
|
823
871
|
/**
|
|
824
872
|
* Unit of time for the trial ('day', 'month', 'year').
|
|
825
873
|
*/
|
|
826
|
-
type
|
|
874
|
+
type AttachCustomizeDurationType = ClosedEnum<typeof AttachCustomizeDurationType>;
|
|
827
875
|
/**
|
|
828
876
|
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
829
877
|
*/
|
|
830
|
-
declare const
|
|
878
|
+
declare const AttachCustomizeOnEnd: {
|
|
831
879
|
readonly Bill: "bill";
|
|
832
880
|
readonly Revert: "revert";
|
|
833
881
|
};
|
|
834
882
|
/**
|
|
835
883
|
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
836
884
|
*/
|
|
837
|
-
type
|
|
885
|
+
type AttachCustomizeOnEnd = ClosedEnum<typeof AttachCustomizeOnEnd>;
|
|
838
886
|
/**
|
|
839
887
|
* Free trial configuration for a plan.
|
|
840
888
|
*/
|
|
841
|
-
type
|
|
889
|
+
type AttachCustomizeFreeTrialParams = {
|
|
842
890
|
/**
|
|
843
891
|
* Number of duration_type periods the trial lasts.
|
|
844
892
|
*/
|
|
@@ -846,15 +894,15 @@ type AttachFreeTrialParams = {
|
|
|
846
894
|
/**
|
|
847
895
|
* Unit of time for the trial ('day', 'month', 'year').
|
|
848
896
|
*/
|
|
849
|
-
durationType?:
|
|
897
|
+
durationType?: AttachCustomizeDurationType | undefined;
|
|
850
898
|
/**
|
|
851
|
-
* If true, payment method required to start trial
|
|
899
|
+
* If true, a payment method is required to start the trial and the customer is charged when it ends. Defaults to false.
|
|
852
900
|
*/
|
|
853
901
|
cardRequired?: boolean | undefined;
|
|
854
902
|
/**
|
|
855
903
|
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
856
904
|
*/
|
|
857
|
-
onEnd?:
|
|
905
|
+
onEnd?: AttachCustomizeOnEnd | undefined;
|
|
858
906
|
};
|
|
859
907
|
/**
|
|
860
908
|
* The time interval for the purchase limit window.
|
|
@@ -1107,7 +1155,7 @@ type AttachUpsertLicenseAdditionalCurrency = {
|
|
|
1107
1155
|
*/
|
|
1108
1156
|
type AttachUpsertLicenseBasePrice = {
|
|
1109
1157
|
/**
|
|
1110
|
-
* Base price amount for the plan.
|
|
1158
|
+
* Base price amount for the plan, in major currency units (e.g. dollars).
|
|
1111
1159
|
*/
|
|
1112
1160
|
amount: number;
|
|
1113
1161
|
/**
|
|
@@ -1403,6 +1451,10 @@ type AttachUpsertLicensePlanItemFilter = {
|
|
|
1403
1451
|
* Match items with this interval_count. Disambiguates between items that share an interval but differ in count.
|
|
1404
1452
|
*/
|
|
1405
1453
|
intervalCount?: number | undefined;
|
|
1454
|
+
/**
|
|
1455
|
+
* Match items whose grant equals this included usage. Omitted is a wildcard.
|
|
1456
|
+
*/
|
|
1457
|
+
included?: number | undefined;
|
|
1406
1458
|
};
|
|
1407
1459
|
type AttachUpsertLicenseCustomize = {
|
|
1408
1460
|
price?: AttachUpsertLicenseBasePrice | null | undefined;
|
|
@@ -1418,6 +1470,9 @@ type AttachUpsertLicense = {
|
|
|
1418
1470
|
[k: string]: any;
|
|
1419
1471
|
} | undefined;
|
|
1420
1472
|
};
|
|
1473
|
+
type AttachRemoveLicense = {
|
|
1474
|
+
licensePlanId: string;
|
|
1475
|
+
};
|
|
1421
1476
|
/**
|
|
1422
1477
|
* Customize the plan to attach. Can override the price, items, licenses, free trial, or a combination.
|
|
1423
1478
|
*/
|
|
@@ -1441,7 +1496,7 @@ type AttachCustomize = {
|
|
|
1441
1496
|
/**
|
|
1442
1497
|
* Override the plan's default free trial. Pass an object to set a custom trial, or null to remove the trial entirely.
|
|
1443
1498
|
*/
|
|
1444
|
-
freeTrial?:
|
|
1499
|
+
freeTrial?: AttachCustomizeFreeTrialParams | null | undefined;
|
|
1445
1500
|
/**
|
|
1446
1501
|
* Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
|
|
1447
1502
|
*/
|
|
@@ -1450,6 +1505,10 @@ type AttachCustomize = {
|
|
|
1450
1505
|
* License links to add or override for this customer, keyed by license_plan_id. Omitted fields inherit the plan catalog link (included defaults to 1 when the license is not in the catalog). A bare entry restores the license to pure catalog inheritance.
|
|
1451
1506
|
*/
|
|
1452
1507
|
upsertLicenses?: Array<AttachUpsertLicense> | undefined;
|
|
1508
|
+
/**
|
|
1509
|
+
* License links to drop, keyed by license_plan_id. Parallel to remove_items.
|
|
1510
|
+
*/
|
|
1511
|
+
removeLicenses?: Array<AttachRemoveLicense> | undefined;
|
|
1453
1512
|
};
|
|
1454
1513
|
/**
|
|
1455
1514
|
* Invoice mode creates a draft or open invoice and sends it to the customer, instead of charging their card immediately. This uses Stripe's send_invoice collection method.
|
|
@@ -1590,6 +1649,10 @@ type AttachParams = {
|
|
|
1590
1649
|
* The version of the plan to attach.
|
|
1591
1650
|
*/
|
|
1592
1651
|
version?: number | undefined;
|
|
1652
|
+
/**
|
|
1653
|
+
* Free trial for this plan. A shorthand for customize.free_trial, which takes precedence when both are given.
|
|
1654
|
+
*/
|
|
1655
|
+
freeTrial?: AttachFreeTrialParams | null | undefined;
|
|
1593
1656
|
/**
|
|
1594
1657
|
* Customize the plan to attach. Can override the price, items, licenses, free trial, or a combination.
|
|
1595
1658
|
*/
|
|
@@ -1623,9 +1686,9 @@ type AttachParams = {
|
|
|
1623
1686
|
*/
|
|
1624
1687
|
newBillingSubscription?: boolean | undefined;
|
|
1625
1688
|
/**
|
|
1626
|
-
* Reset the billing cycle
|
|
1689
|
+
* Reset the billing cycle immediately with 'now', or schedule a reset at a future Unix timestamp in milliseconds.
|
|
1627
1690
|
*/
|
|
1628
|
-
billingCycleAnchor?:
|
|
1691
|
+
billingCycleAnchor?: string | number | undefined;
|
|
1629
1692
|
/**
|
|
1630
1693
|
* When the plan change should take effect. 'immediate' applies now, 'end_of_cycle' schedules for the end of the current billing cycle. By default, upgrades are immediate and downgrades are scheduled.
|
|
1631
1694
|
*/
|
|
@@ -1679,7 +1742,7 @@ type AttachParams = {
|
|
|
1679
1742
|
*/
|
|
1680
1743
|
noBillingChanges?: boolean | undefined;
|
|
1681
1744
|
/**
|
|
1682
|
-
* If true, the customer's plan is activated immediately even when payment is deferred (invoice mode) or pending (Stripe checkout). For Stripe checkout, the customer_product is inserted before the customer completes the hosted form.
|
|
1745
|
+
* If true, the customer's plan is activated immediately even when payment is deferred (invoice mode) or pending (Stripe checkout). For Stripe checkout, the customer_product is inserted before the customer completes the hosted form. Set it here rather than on `invoice_mode`, which only covers the invoice-unpaid case.
|
|
1683
1746
|
*/
|
|
1684
1747
|
enablePlanImmediately?: boolean | undefined;
|
|
1685
1748
|
/**
|
|
@@ -1789,6 +1852,50 @@ type BillingUpdateFeatureQuantity = {
|
|
|
1789
1852
|
*/
|
|
1790
1853
|
adjustable?: boolean | undefined;
|
|
1791
1854
|
};
|
|
1855
|
+
/**
|
|
1856
|
+
* Unit of time for the trial ('day', 'month', 'year').
|
|
1857
|
+
*/
|
|
1858
|
+
declare const BillingUpdateDurationType: {
|
|
1859
|
+
readonly Day: "day";
|
|
1860
|
+
readonly Month: "month";
|
|
1861
|
+
readonly Year: "year";
|
|
1862
|
+
};
|
|
1863
|
+
/**
|
|
1864
|
+
* Unit of time for the trial ('day', 'month', 'year').
|
|
1865
|
+
*/
|
|
1866
|
+
type BillingUpdateDurationType = ClosedEnum<typeof BillingUpdateDurationType>;
|
|
1867
|
+
/**
|
|
1868
|
+
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
1869
|
+
*/
|
|
1870
|
+
declare const BillingUpdateOnEnd: {
|
|
1871
|
+
readonly Bill: "bill";
|
|
1872
|
+
readonly Revert: "revert";
|
|
1873
|
+
};
|
|
1874
|
+
/**
|
|
1875
|
+
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
1876
|
+
*/
|
|
1877
|
+
type BillingUpdateOnEnd = ClosedEnum<typeof BillingUpdateOnEnd>;
|
|
1878
|
+
/**
|
|
1879
|
+
* Free trial configuration for a plan.
|
|
1880
|
+
*/
|
|
1881
|
+
type BillingUpdateFreeTrialParams = {
|
|
1882
|
+
/**
|
|
1883
|
+
* Number of duration_type periods the trial lasts.
|
|
1884
|
+
*/
|
|
1885
|
+
durationLength: number;
|
|
1886
|
+
/**
|
|
1887
|
+
* Unit of time for the trial ('day', 'month', 'year').
|
|
1888
|
+
*/
|
|
1889
|
+
durationType?: BillingUpdateDurationType | undefined;
|
|
1890
|
+
/**
|
|
1891
|
+
* If true, a payment method is required to start the trial and the customer is charged when it ends. Defaults to false.
|
|
1892
|
+
*/
|
|
1893
|
+
cardRequired?: boolean | undefined;
|
|
1894
|
+
/**
|
|
1895
|
+
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
1896
|
+
*/
|
|
1897
|
+
onEnd?: BillingUpdateOnEnd | undefined;
|
|
1898
|
+
};
|
|
1792
1899
|
/**
|
|
1793
1900
|
* Billing interval (e.g. 'month', 'year').
|
|
1794
1901
|
*/
|
|
@@ -1819,7 +1926,7 @@ type BillingUpdateAdditionalCurrency = {
|
|
|
1819
1926
|
*/
|
|
1820
1927
|
type BillingUpdateBasePrice = {
|
|
1821
1928
|
/**
|
|
1822
|
-
* Base price amount for the plan.
|
|
1929
|
+
* Base price amount for the plan, in major currency units (e.g. dollars).
|
|
1823
1930
|
*/
|
|
1824
1931
|
amount: number;
|
|
1825
1932
|
/**
|
|
@@ -2371,11 +2478,15 @@ type BillingUpdatePlanItemFilter = {
|
|
|
2371
2478
|
* Match items with this interval_count. Disambiguates between items that share an interval but differ in count.
|
|
2372
2479
|
*/
|
|
2373
2480
|
intervalCount?: number | undefined;
|
|
2481
|
+
/**
|
|
2482
|
+
* Match items whose grant equals this included usage. Omitted is a wildcard.
|
|
2483
|
+
*/
|
|
2484
|
+
included?: number | undefined;
|
|
2374
2485
|
};
|
|
2375
2486
|
/**
|
|
2376
2487
|
* Unit of time for the trial ('day', 'month', 'year').
|
|
2377
2488
|
*/
|
|
2378
|
-
declare const
|
|
2489
|
+
declare const BillingUpdateCustomizeDurationType: {
|
|
2379
2490
|
readonly Day: "day";
|
|
2380
2491
|
readonly Month: "month";
|
|
2381
2492
|
readonly Year: "year";
|
|
@@ -2383,22 +2494,22 @@ declare const BillingUpdateDurationType: {
|
|
|
2383
2494
|
/**
|
|
2384
2495
|
* Unit of time for the trial ('day', 'month', 'year').
|
|
2385
2496
|
*/
|
|
2386
|
-
type
|
|
2497
|
+
type BillingUpdateCustomizeDurationType = ClosedEnum<typeof BillingUpdateCustomizeDurationType>;
|
|
2387
2498
|
/**
|
|
2388
2499
|
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
2389
2500
|
*/
|
|
2390
|
-
declare const
|
|
2501
|
+
declare const BillingUpdateCustomizeOnEnd: {
|
|
2391
2502
|
readonly Bill: "bill";
|
|
2392
2503
|
readonly Revert: "revert";
|
|
2393
2504
|
};
|
|
2394
2505
|
/**
|
|
2395
2506
|
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
2396
2507
|
*/
|
|
2397
|
-
type
|
|
2508
|
+
type BillingUpdateCustomizeOnEnd = ClosedEnum<typeof BillingUpdateCustomizeOnEnd>;
|
|
2398
2509
|
/**
|
|
2399
2510
|
* Free trial configuration for a plan.
|
|
2400
2511
|
*/
|
|
2401
|
-
type
|
|
2512
|
+
type BillingUpdateCustomizeFreeTrialParams = {
|
|
2402
2513
|
/**
|
|
2403
2514
|
* Number of duration_type periods the trial lasts.
|
|
2404
2515
|
*/
|
|
@@ -2406,15 +2517,15 @@ type BillingUpdateFreeTrialParams = {
|
|
|
2406
2517
|
/**
|
|
2407
2518
|
* Unit of time for the trial ('day', 'month', 'year').
|
|
2408
2519
|
*/
|
|
2409
|
-
durationType?:
|
|
2520
|
+
durationType?: BillingUpdateCustomizeDurationType | undefined;
|
|
2410
2521
|
/**
|
|
2411
|
-
* If true, payment method required to start trial
|
|
2522
|
+
* If true, a payment method is required to start the trial and the customer is charged when it ends. Defaults to false.
|
|
2412
2523
|
*/
|
|
2413
2524
|
cardRequired?: boolean | undefined;
|
|
2414
2525
|
/**
|
|
2415
2526
|
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
2416
2527
|
*/
|
|
2417
|
-
onEnd?:
|
|
2528
|
+
onEnd?: BillingUpdateCustomizeOnEnd | undefined;
|
|
2418
2529
|
};
|
|
2419
2530
|
/**
|
|
2420
2531
|
* The time interval for the purchase limit window.
|
|
@@ -2667,7 +2778,7 @@ type BillingUpdateUpsertLicenseAdditionalCurrency = {
|
|
|
2667
2778
|
*/
|
|
2668
2779
|
type BillingUpdateUpsertLicenseBasePrice = {
|
|
2669
2780
|
/**
|
|
2670
|
-
* Base price amount for the plan.
|
|
2781
|
+
* Base price amount for the plan, in major currency units (e.g. dollars).
|
|
2671
2782
|
*/
|
|
2672
2783
|
amount: number;
|
|
2673
2784
|
/**
|
|
@@ -2963,6 +3074,10 @@ type BillingUpdateUpsertLicensePlanItemFilter = {
|
|
|
2963
3074
|
* Match items with this interval_count. Disambiguates between items that share an interval but differ in count.
|
|
2964
3075
|
*/
|
|
2965
3076
|
intervalCount?: number | undefined;
|
|
3077
|
+
/**
|
|
3078
|
+
* Match items whose grant equals this included usage. Omitted is a wildcard.
|
|
3079
|
+
*/
|
|
3080
|
+
included?: number | undefined;
|
|
2966
3081
|
};
|
|
2967
3082
|
type BillingUpdateUpsertLicenseCustomize = {
|
|
2968
3083
|
price?: BillingUpdateUpsertLicenseBasePrice | null | undefined;
|
|
@@ -2978,6 +3093,9 @@ type BillingUpdateUpsertLicense = {
|
|
|
2978
3093
|
[k: string]: any;
|
|
2979
3094
|
} | undefined;
|
|
2980
3095
|
};
|
|
3096
|
+
type BillingUpdateRemoveLicense = {
|
|
3097
|
+
licensePlanId: string;
|
|
3098
|
+
};
|
|
2981
3099
|
/**
|
|
2982
3100
|
* Customize the plan to attach. Can override the price, items, licenses, free trial, or a combination.
|
|
2983
3101
|
*/
|
|
@@ -3001,7 +3119,7 @@ type BillingUpdateCustomize = {
|
|
|
3001
3119
|
/**
|
|
3002
3120
|
* Override the plan's default free trial. Pass an object to set a custom trial, or null to remove the trial entirely.
|
|
3003
3121
|
*/
|
|
3004
|
-
freeTrial?:
|
|
3122
|
+
freeTrial?: BillingUpdateCustomizeFreeTrialParams | null | undefined;
|
|
3005
3123
|
/**
|
|
3006
3124
|
* Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
|
|
3007
3125
|
*/
|
|
@@ -3010,6 +3128,10 @@ type BillingUpdateCustomize = {
|
|
|
3010
3128
|
* License links to add or override for this customer, keyed by license_plan_id. Omitted fields inherit the plan catalog link (included defaults to 1 when the license is not in the catalog). A bare entry restores the license to pure catalog inheritance.
|
|
3011
3129
|
*/
|
|
3012
3130
|
upsertLicenses?: Array<BillingUpdateUpsertLicense> | undefined;
|
|
3131
|
+
/**
|
|
3132
|
+
* License links to drop, keyed by license_plan_id. Parallel to remove_items.
|
|
3133
|
+
*/
|
|
3134
|
+
removeLicenses?: Array<BillingUpdateRemoveLicense> | undefined;
|
|
3013
3135
|
};
|
|
3014
3136
|
/**
|
|
3015
3137
|
* Invoice mode creates a draft or open invoice and sends it to the customer, instead of charging their card immediately. This uses Stripe's send_invoice collection method.
|
|
@@ -3148,6 +3270,10 @@ type UpdateSubscriptionParams = {
|
|
|
3148
3270
|
* The version of the plan to attach.
|
|
3149
3271
|
*/
|
|
3150
3272
|
version?: number | undefined;
|
|
3273
|
+
/**
|
|
3274
|
+
* Free trial for this plan. A shorthand for customize.free_trial, which takes precedence when both are given.
|
|
3275
|
+
*/
|
|
3276
|
+
freeTrial?: BillingUpdateFreeTrialParams | null | undefined;
|
|
3151
3277
|
/**
|
|
3152
3278
|
* Customize the plan to attach. Can override the price, items, licenses, free trial, or a combination.
|
|
3153
3279
|
*/
|
|
@@ -3177,9 +3303,9 @@ type UpdateSubscriptionParams = {
|
|
|
3177
3303
|
*/
|
|
3178
3304
|
cancelAction?: BillingUpdateCancelAction | undefined;
|
|
3179
3305
|
/**
|
|
3180
|
-
* Reset the billing cycle
|
|
3306
|
+
* Reset the billing cycle immediately with 'now', or schedule a reset at a future Unix timestamp in milliseconds.
|
|
3181
3307
|
*/
|
|
3182
|
-
billingCycleAnchor?:
|
|
3308
|
+
billingCycleAnchor?: string | number | undefined;
|
|
3183
3309
|
/**
|
|
3184
3310
|
* If true, the subscription is updated internally without applying billing changes in Stripe.
|
|
3185
3311
|
*/
|
|
@@ -3188,6 +3314,12 @@ type UpdateSubscriptionParams = {
|
|
|
3188
3314
|
* Controls how the last payment is refunded on immediate cancellation. 'prorated' refunds the unused portion, 'full' refunds the entire last payment.
|
|
3189
3315
|
*/
|
|
3190
3316
|
refundLastPayment?: BillingUpdateRefundLastPayment | undefined;
|
|
3317
|
+
/**
|
|
3318
|
+
* Additional parameters to pass into the Stripe subscription update or cancel call.
|
|
3319
|
+
*/
|
|
3320
|
+
subscriptionParams?: {
|
|
3321
|
+
[k: string]: any;
|
|
3322
|
+
} | undefined;
|
|
3191
3323
|
/**
|
|
3192
3324
|
* Controls whether balances should be recalculated during the subscription update.
|
|
3193
3325
|
*/
|
|
@@ -3344,16 +3476,57 @@ declare const FlagType2: {
|
|
|
3344
3476
|
* Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools, 'ai_credit_system' for model-based token pricing.
|
|
3345
3477
|
*/
|
|
3346
3478
|
type FlagType2 = OpenEnum<typeof FlagType2>;
|
|
3347
|
-
type
|
|
3479
|
+
type CheckCreditSchema6 = {
|
|
3480
|
+
meteredFeatureId: "";
|
|
3481
|
+
/**
|
|
3482
|
+
* Number of metered-feature units priced together. Defaults to one when omitted.
|
|
3483
|
+
*/
|
|
3484
|
+
billingUnits?: number | undefined;
|
|
3485
|
+
/**
|
|
3486
|
+
* Credits consumed per billing-unit group.
|
|
3487
|
+
*/
|
|
3488
|
+
creditCost: number;
|
|
3489
|
+
};
|
|
3490
|
+
type CheckCreditSchema5 = {
|
|
3348
3491
|
/**
|
|
3349
3492
|
* ID of the metered feature that draws from this credit system.
|
|
3350
3493
|
*/
|
|
3351
3494
|
meteredFeatureId: string;
|
|
3352
3495
|
/**
|
|
3353
|
-
*
|
|
3496
|
+
* Number of metered-feature units priced together. Defaults to one when omitted.
|
|
3497
|
+
*/
|
|
3498
|
+
billingUnits?: number | undefined;
|
|
3499
|
+
/**
|
|
3500
|
+
* Credits consumed per billing-unit group.
|
|
3501
|
+
*/
|
|
3502
|
+
creditCost: number;
|
|
3503
|
+
};
|
|
3504
|
+
declare const CheckToEnum2: {
|
|
3505
|
+
readonly Inf: "inf";
|
|
3506
|
+
};
|
|
3507
|
+
type CheckToEnum2 = ClosedEnum<typeof CheckToEnum2>;
|
|
3508
|
+
type CheckTier2 = {
|
|
3509
|
+
/**
|
|
3510
|
+
* Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
|
|
3511
|
+
*/
|
|
3512
|
+
to: number | CheckToEnum2;
|
|
3513
|
+
/**
|
|
3514
|
+
* Credits consumed per billing-unit group within this tier.
|
|
3354
3515
|
*/
|
|
3355
3516
|
creditCost: number;
|
|
3356
3517
|
};
|
|
3518
|
+
type CheckCreditSchema4 = {
|
|
3519
|
+
/**
|
|
3520
|
+
* ID of the metered feature that draws from this credit system.
|
|
3521
|
+
*/
|
|
3522
|
+
meteredFeatureId: string;
|
|
3523
|
+
/**
|
|
3524
|
+
* Number of metered-feature units priced together. Defaults to one when omitted.
|
|
3525
|
+
*/
|
|
3526
|
+
billingUnits?: number | undefined;
|
|
3527
|
+
tierBehavior: "graduated";
|
|
3528
|
+
tiers: Array<CheckTier2>;
|
|
3529
|
+
};
|
|
3357
3530
|
type CheckModelMarkups2 = {
|
|
3358
3531
|
markup?: number | undefined;
|
|
3359
3532
|
inputCost?: number | undefined;
|
|
@@ -3375,6 +3548,22 @@ type FlagDisplay2 = {
|
|
|
3375
3548
|
*/
|
|
3376
3549
|
plural?: string | null | undefined;
|
|
3377
3550
|
};
|
|
3551
|
+
type CheckStripe2 = {
|
|
3552
|
+
/**
|
|
3553
|
+
* Stripe product ID this feature's usage prices bill under.
|
|
3554
|
+
*/
|
|
3555
|
+
productId?: string | undefined;
|
|
3556
|
+
/**
|
|
3557
|
+
* Stripe meter ID used to create this feature's metered price.
|
|
3558
|
+
*/
|
|
3559
|
+
meterId?: string | undefined;
|
|
3560
|
+
};
|
|
3561
|
+
/**
|
|
3562
|
+
* Processor mappings for this feature. Present when a Stripe product or meter is set.
|
|
3563
|
+
*/
|
|
3564
|
+
type CheckProcessors2 = {
|
|
3565
|
+
stripe?: CheckStripe2 | undefined;
|
|
3566
|
+
};
|
|
3378
3567
|
/**
|
|
3379
3568
|
* The full feature object if expanded.
|
|
3380
3569
|
*/
|
|
@@ -3400,9 +3589,13 @@ type CheckFeature2 = {
|
|
|
3400
3589
|
*/
|
|
3401
3590
|
eventNames?: Array<string> | undefined;
|
|
3402
3591
|
/**
|
|
3403
|
-
* For
|
|
3592
|
+
* For classic credit systems: maps metered features to flat or graduated credit costs.
|
|
3593
|
+
*/
|
|
3594
|
+
creditSchema?: Array<CheckCreditSchema4 | CheckCreditSchema5 | CheckCreditSchema6> | undefined;
|
|
3595
|
+
/**
|
|
3596
|
+
* Whether usage of this classic credit system should be itemized as invoice credits.
|
|
3404
3597
|
*/
|
|
3405
|
-
|
|
3598
|
+
invoiceCredit?: boolean | undefined;
|
|
3406
3599
|
/**
|
|
3407
3600
|
* Per-model markup overrides for AI credit systems.
|
|
3408
3601
|
*/
|
|
@@ -3427,6 +3620,10 @@ type CheckFeature2 = {
|
|
|
3427
3620
|
* Whether the feature is archived and hidden from the dashboard.
|
|
3428
3621
|
*/
|
|
3429
3622
|
archived: boolean;
|
|
3623
|
+
/**
|
|
3624
|
+
* Processor mappings for this feature. Present when a Stripe product or meter is set.
|
|
3625
|
+
*/
|
|
3626
|
+
processors?: CheckProcessors2 | undefined;
|
|
3430
3627
|
};
|
|
3431
3628
|
type Flag2 = {
|
|
3432
3629
|
/**
|
|
@@ -4055,16 +4252,57 @@ declare const FlagType1: {
|
|
|
4055
4252
|
* Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools, 'ai_credit_system' for model-based token pricing.
|
|
4056
4253
|
*/
|
|
4057
4254
|
type FlagType1 = OpenEnum<typeof FlagType1>;
|
|
4058
|
-
type
|
|
4255
|
+
type CheckCreditSchema3 = {
|
|
4256
|
+
meteredFeatureId: "";
|
|
4257
|
+
/**
|
|
4258
|
+
* Number of metered-feature units priced together. Defaults to one when omitted.
|
|
4259
|
+
*/
|
|
4260
|
+
billingUnits?: number | undefined;
|
|
4261
|
+
/**
|
|
4262
|
+
* Credits consumed per billing-unit group.
|
|
4263
|
+
*/
|
|
4264
|
+
creditCost: number;
|
|
4265
|
+
};
|
|
4266
|
+
type CheckCreditSchema2 = {
|
|
4059
4267
|
/**
|
|
4060
4268
|
* ID of the metered feature that draws from this credit system.
|
|
4061
4269
|
*/
|
|
4062
4270
|
meteredFeatureId: string;
|
|
4063
4271
|
/**
|
|
4064
|
-
*
|
|
4272
|
+
* Number of metered-feature units priced together. Defaults to one when omitted.
|
|
4273
|
+
*/
|
|
4274
|
+
billingUnits?: number | undefined;
|
|
4275
|
+
/**
|
|
4276
|
+
* Credits consumed per billing-unit group.
|
|
4065
4277
|
*/
|
|
4066
4278
|
creditCost: number;
|
|
4067
4279
|
};
|
|
4280
|
+
declare const CheckToEnum1: {
|
|
4281
|
+
readonly Inf: "inf";
|
|
4282
|
+
};
|
|
4283
|
+
type CheckToEnum1 = ClosedEnum<typeof CheckToEnum1>;
|
|
4284
|
+
type CheckTier1 = {
|
|
4285
|
+
/**
|
|
4286
|
+
* Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
|
|
4287
|
+
*/
|
|
4288
|
+
to: number | CheckToEnum1;
|
|
4289
|
+
/**
|
|
4290
|
+
* Credits consumed per billing-unit group within this tier.
|
|
4291
|
+
*/
|
|
4292
|
+
creditCost: number;
|
|
4293
|
+
};
|
|
4294
|
+
type CheckCreditSchema1 = {
|
|
4295
|
+
/**
|
|
4296
|
+
* ID of the metered feature that draws from this credit system.
|
|
4297
|
+
*/
|
|
4298
|
+
meteredFeatureId: string;
|
|
4299
|
+
/**
|
|
4300
|
+
* Number of metered-feature units priced together. Defaults to one when omitted.
|
|
4301
|
+
*/
|
|
4302
|
+
billingUnits?: number | undefined;
|
|
4303
|
+
tierBehavior: "graduated";
|
|
4304
|
+
tiers: Array<CheckTier1>;
|
|
4305
|
+
};
|
|
4068
4306
|
type CheckModelMarkups1 = {
|
|
4069
4307
|
markup?: number | undefined;
|
|
4070
4308
|
inputCost?: number | undefined;
|
|
@@ -4086,6 +4324,22 @@ type FlagDisplay1 = {
|
|
|
4086
4324
|
*/
|
|
4087
4325
|
plural?: string | null | undefined;
|
|
4088
4326
|
};
|
|
4327
|
+
type CheckStripe1 = {
|
|
4328
|
+
/**
|
|
4329
|
+
* Stripe product ID this feature's usage prices bill under.
|
|
4330
|
+
*/
|
|
4331
|
+
productId?: string | undefined;
|
|
4332
|
+
/**
|
|
4333
|
+
* Stripe meter ID used to create this feature's metered price.
|
|
4334
|
+
*/
|
|
4335
|
+
meterId?: string | undefined;
|
|
4336
|
+
};
|
|
4337
|
+
/**
|
|
4338
|
+
* Processor mappings for this feature. Present when a Stripe product or meter is set.
|
|
4339
|
+
*/
|
|
4340
|
+
type CheckProcessors1 = {
|
|
4341
|
+
stripe?: CheckStripe1 | undefined;
|
|
4342
|
+
};
|
|
4089
4343
|
/**
|
|
4090
4344
|
* The full feature object if expanded.
|
|
4091
4345
|
*/
|
|
@@ -4111,9 +4365,13 @@ type CheckFeature1 = {
|
|
|
4111
4365
|
*/
|
|
4112
4366
|
eventNames?: Array<string> | undefined;
|
|
4113
4367
|
/**
|
|
4114
|
-
* For
|
|
4368
|
+
* For classic credit systems: maps metered features to flat or graduated credit costs.
|
|
4369
|
+
*/
|
|
4370
|
+
creditSchema?: Array<CheckCreditSchema1 | CheckCreditSchema2 | CheckCreditSchema3> | undefined;
|
|
4371
|
+
/**
|
|
4372
|
+
* Whether usage of this classic credit system should be itemized as invoice credits.
|
|
4115
4373
|
*/
|
|
4116
|
-
|
|
4374
|
+
invoiceCredit?: boolean | undefined;
|
|
4117
4375
|
/**
|
|
4118
4376
|
* Per-model markup overrides for AI credit systems.
|
|
4119
4377
|
*/
|
|
@@ -4138,6 +4396,10 @@ type CheckFeature1 = {
|
|
|
4138
4396
|
* Whether the feature is archived and hidden from the dashboard.
|
|
4139
4397
|
*/
|
|
4140
4398
|
archived: boolean;
|
|
4399
|
+
/**
|
|
4400
|
+
* Processor mappings for this feature. Present when a Stripe product or meter is set.
|
|
4401
|
+
*/
|
|
4402
|
+
processors?: CheckProcessors1 | undefined;
|
|
4141
4403
|
};
|
|
4142
4404
|
type Flag1 = {
|
|
4143
4405
|
/**
|
|
@@ -5218,16 +5480,57 @@ declare const GetEntityType: {
|
|
|
5218
5480
|
* Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools, 'ai_credit_system' for model-based token pricing.
|
|
5219
5481
|
*/
|
|
5220
5482
|
type GetEntityType = OpenEnum<typeof GetEntityType>;
|
|
5221
|
-
type
|
|
5483
|
+
type GetEntityCreditSchema3 = {
|
|
5484
|
+
meteredFeatureId: "";
|
|
5485
|
+
/**
|
|
5486
|
+
* Number of metered-feature units priced together. Defaults to one when omitted.
|
|
5487
|
+
*/
|
|
5488
|
+
billingUnits?: number | undefined;
|
|
5489
|
+
/**
|
|
5490
|
+
* Credits consumed per billing-unit group.
|
|
5491
|
+
*/
|
|
5492
|
+
creditCost: number;
|
|
5493
|
+
};
|
|
5494
|
+
type GetEntityCreditSchema2 = {
|
|
5222
5495
|
/**
|
|
5223
5496
|
* ID of the metered feature that draws from this credit system.
|
|
5224
5497
|
*/
|
|
5225
5498
|
meteredFeatureId: string;
|
|
5226
5499
|
/**
|
|
5227
|
-
*
|
|
5500
|
+
* Number of metered-feature units priced together. Defaults to one when omitted.
|
|
5501
|
+
*/
|
|
5502
|
+
billingUnits?: number | undefined;
|
|
5503
|
+
/**
|
|
5504
|
+
* Credits consumed per billing-unit group.
|
|
5505
|
+
*/
|
|
5506
|
+
creditCost: number;
|
|
5507
|
+
};
|
|
5508
|
+
declare const GetEntityToEnum: {
|
|
5509
|
+
readonly Inf: "inf";
|
|
5510
|
+
};
|
|
5511
|
+
type GetEntityToEnum = ClosedEnum<typeof GetEntityToEnum>;
|
|
5512
|
+
type GetEntityTier = {
|
|
5513
|
+
/**
|
|
5514
|
+
* Inclusive upper usage boundary for this graduated tier. The final tier must be 'inf'.
|
|
5515
|
+
*/
|
|
5516
|
+
to: number | GetEntityToEnum;
|
|
5517
|
+
/**
|
|
5518
|
+
* Credits consumed per billing-unit group within this tier.
|
|
5228
5519
|
*/
|
|
5229
5520
|
creditCost: number;
|
|
5230
5521
|
};
|
|
5522
|
+
type GetEntityCreditSchema1 = {
|
|
5523
|
+
/**
|
|
5524
|
+
* ID of the metered feature that draws from this credit system.
|
|
5525
|
+
*/
|
|
5526
|
+
meteredFeatureId: string;
|
|
5527
|
+
/**
|
|
5528
|
+
* Number of metered-feature units priced together. Defaults to one when omitted.
|
|
5529
|
+
*/
|
|
5530
|
+
billingUnits?: number | undefined;
|
|
5531
|
+
tierBehavior: "graduated";
|
|
5532
|
+
tiers: Array<GetEntityTier>;
|
|
5533
|
+
};
|
|
5231
5534
|
type GetEntityModelMarkups = {
|
|
5232
5535
|
markup?: number | undefined;
|
|
5233
5536
|
inputCost?: number | undefined;
|
|
@@ -5249,6 +5552,22 @@ type GetEntityDisplay = {
|
|
|
5249
5552
|
*/
|
|
5250
5553
|
plural?: string | null | undefined;
|
|
5251
5554
|
};
|
|
5555
|
+
type GetEntityStripe = {
|
|
5556
|
+
/**
|
|
5557
|
+
* Stripe product ID this feature's usage prices bill under.
|
|
5558
|
+
*/
|
|
5559
|
+
productId?: string | undefined;
|
|
5560
|
+
/**
|
|
5561
|
+
* Stripe meter ID used to create this feature's metered price.
|
|
5562
|
+
*/
|
|
5563
|
+
meterId?: string | undefined;
|
|
5564
|
+
};
|
|
5565
|
+
/**
|
|
5566
|
+
* Processor mappings for this feature. Present when a Stripe product or meter is set.
|
|
5567
|
+
*/
|
|
5568
|
+
type GetEntityProcessors = {
|
|
5569
|
+
stripe?: GetEntityStripe | undefined;
|
|
5570
|
+
};
|
|
5252
5571
|
/**
|
|
5253
5572
|
* The full feature object if expanded.
|
|
5254
5573
|
*/
|
|
@@ -5274,9 +5593,13 @@ type GetEntityFeature = {
|
|
|
5274
5593
|
*/
|
|
5275
5594
|
eventNames?: Array<string> | undefined;
|
|
5276
5595
|
/**
|
|
5277
|
-
* For
|
|
5596
|
+
* For classic credit systems: maps metered features to flat or graduated credit costs.
|
|
5278
5597
|
*/
|
|
5279
|
-
creditSchema?: Array<
|
|
5598
|
+
creditSchema?: Array<GetEntityCreditSchema1 | GetEntityCreditSchema2 | GetEntityCreditSchema3> | undefined;
|
|
5599
|
+
/**
|
|
5600
|
+
* Whether usage of this classic credit system should be itemized as invoice credits.
|
|
5601
|
+
*/
|
|
5602
|
+
invoiceCredit?: boolean | undefined;
|
|
5280
5603
|
/**
|
|
5281
5604
|
* Per-model markup overrides for AI credit systems.
|
|
5282
5605
|
*/
|
|
@@ -5301,6 +5624,10 @@ type GetEntityFeature = {
|
|
|
5301
5624
|
* Whether the feature is archived and hidden from the dashboard.
|
|
5302
5625
|
*/
|
|
5303
5626
|
archived: boolean;
|
|
5627
|
+
/**
|
|
5628
|
+
* Processor mappings for this feature. Present when a Stripe product or meter is set.
|
|
5629
|
+
*/
|
|
5630
|
+
processors?: GetEntityProcessors | undefined;
|
|
5304
5631
|
};
|
|
5305
5632
|
type GetEntityFlags = {
|
|
5306
5633
|
/**
|
|
@@ -5799,7 +6126,7 @@ type MultiAttachAdditionalCurrency = {
|
|
|
5799
6126
|
*/
|
|
5800
6127
|
type MultiAttachBasePrice = {
|
|
5801
6128
|
/**
|
|
5802
|
-
* Base price amount for the plan.
|
|
6129
|
+
* Base price amount for the plan, in major currency units (e.g. dollars).
|
|
5803
6130
|
*/
|
|
5804
6131
|
amount: number;
|
|
5805
6132
|
/**
|
|
@@ -6140,7 +6467,7 @@ type MultiAttachFreeTrialParams = {
|
|
|
6140
6467
|
*/
|
|
6141
6468
|
durationType?: MultiAttachDurationType | undefined;
|
|
6142
6469
|
/**
|
|
6143
|
-
* If true, payment method required to start trial
|
|
6470
|
+
* If true, a payment method is required to start the trial and the customer is charged when it ends. Defaults to false.
|
|
6144
6471
|
*/
|
|
6145
6472
|
cardRequired?: boolean | undefined;
|
|
6146
6473
|
/**
|
|
@@ -6417,6 +6744,10 @@ type MultiAttachParams = {
|
|
|
6417
6744
|
* How to handle billing. 'prorate_immediately' charges/credits prorated amounts now, 'none' does not charge/credit anything.
|
|
6418
6745
|
*/
|
|
6419
6746
|
billingBehavior?: MultiAttachBillingBehavior | undefined;
|
|
6747
|
+
/**
|
|
6748
|
+
* Pass 'now' to reset the billing cycle of every plan on the subscription to the time of this request.
|
|
6749
|
+
*/
|
|
6750
|
+
billingCycleAnchor?: "now" | undefined;
|
|
6420
6751
|
/**
|
|
6421
6752
|
* URL to redirect to after successful checkout.
|
|
6422
6753
|
*/
|
|
@@ -6567,6 +6898,50 @@ type PreviewAttachFeatureQuantityRequest = {
|
|
|
6567
6898
|
*/
|
|
6568
6899
|
adjustable?: boolean | undefined;
|
|
6569
6900
|
};
|
|
6901
|
+
/**
|
|
6902
|
+
* Unit of time for the trial ('day', 'month', 'year').
|
|
6903
|
+
*/
|
|
6904
|
+
declare const PreviewAttachDurationType: {
|
|
6905
|
+
readonly Day: "day";
|
|
6906
|
+
readonly Month: "month";
|
|
6907
|
+
readonly Year: "year";
|
|
6908
|
+
};
|
|
6909
|
+
/**
|
|
6910
|
+
* Unit of time for the trial ('day', 'month', 'year').
|
|
6911
|
+
*/
|
|
6912
|
+
type PreviewAttachDurationType = ClosedEnum<typeof PreviewAttachDurationType>;
|
|
6913
|
+
/**
|
|
6914
|
+
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
6915
|
+
*/
|
|
6916
|
+
declare const PreviewAttachOnEnd: {
|
|
6917
|
+
readonly Bill: "bill";
|
|
6918
|
+
readonly Revert: "revert";
|
|
6919
|
+
};
|
|
6920
|
+
/**
|
|
6921
|
+
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
6922
|
+
*/
|
|
6923
|
+
type PreviewAttachOnEnd = ClosedEnum<typeof PreviewAttachOnEnd>;
|
|
6924
|
+
/**
|
|
6925
|
+
* Free trial configuration for a plan.
|
|
6926
|
+
*/
|
|
6927
|
+
type PreviewAttachFreeTrialParams = {
|
|
6928
|
+
/**
|
|
6929
|
+
* Number of duration_type periods the trial lasts.
|
|
6930
|
+
*/
|
|
6931
|
+
durationLength: number;
|
|
6932
|
+
/**
|
|
6933
|
+
* Unit of time for the trial ('day', 'month', 'year').
|
|
6934
|
+
*/
|
|
6935
|
+
durationType?: PreviewAttachDurationType | undefined;
|
|
6936
|
+
/**
|
|
6937
|
+
* If true, a payment method is required to start the trial and the customer is charged when it ends. Defaults to false.
|
|
6938
|
+
*/
|
|
6939
|
+
cardRequired?: boolean | undefined;
|
|
6940
|
+
/**
|
|
6941
|
+
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
6942
|
+
*/
|
|
6943
|
+
onEnd?: PreviewAttachOnEnd | undefined;
|
|
6944
|
+
};
|
|
6570
6945
|
/**
|
|
6571
6946
|
* Billing interval (e.g. 'month', 'year').
|
|
6572
6947
|
*/
|
|
@@ -6597,7 +6972,7 @@ type PreviewAttachAdditionalCurrency = {
|
|
|
6597
6972
|
*/
|
|
6598
6973
|
type PreviewAttachBasePrice = {
|
|
6599
6974
|
/**
|
|
6600
|
-
* Base price amount for the plan.
|
|
6975
|
+
* Base price amount for the plan, in major currency units (e.g. dollars).
|
|
6601
6976
|
*/
|
|
6602
6977
|
amount: number;
|
|
6603
6978
|
/**
|
|
@@ -7149,11 +7524,15 @@ type PreviewAttachPlanItemFilter = {
|
|
|
7149
7524
|
* Match items with this interval_count. Disambiguates between items that share an interval but differ in count.
|
|
7150
7525
|
*/
|
|
7151
7526
|
intervalCount?: number | undefined;
|
|
7527
|
+
/**
|
|
7528
|
+
* Match items whose grant equals this included usage. Omitted is a wildcard.
|
|
7529
|
+
*/
|
|
7530
|
+
included?: number | undefined;
|
|
7152
7531
|
};
|
|
7153
7532
|
/**
|
|
7154
7533
|
* Unit of time for the trial ('day', 'month', 'year').
|
|
7155
7534
|
*/
|
|
7156
|
-
declare const
|
|
7535
|
+
declare const PreviewAttachCustomizeDurationType: {
|
|
7157
7536
|
readonly Day: "day";
|
|
7158
7537
|
readonly Month: "month";
|
|
7159
7538
|
readonly Year: "year";
|
|
@@ -7161,22 +7540,22 @@ declare const PreviewAttachDurationType: {
|
|
|
7161
7540
|
/**
|
|
7162
7541
|
* Unit of time for the trial ('day', 'month', 'year').
|
|
7163
7542
|
*/
|
|
7164
|
-
type
|
|
7543
|
+
type PreviewAttachCustomizeDurationType = ClosedEnum<typeof PreviewAttachCustomizeDurationType>;
|
|
7165
7544
|
/**
|
|
7166
7545
|
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
7167
7546
|
*/
|
|
7168
|
-
declare const
|
|
7547
|
+
declare const PreviewAttachCustomizeOnEnd: {
|
|
7169
7548
|
readonly Bill: "bill";
|
|
7170
7549
|
readonly Revert: "revert";
|
|
7171
7550
|
};
|
|
7172
7551
|
/**
|
|
7173
7552
|
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
7174
7553
|
*/
|
|
7175
|
-
type
|
|
7554
|
+
type PreviewAttachCustomizeOnEnd = ClosedEnum<typeof PreviewAttachCustomizeOnEnd>;
|
|
7176
7555
|
/**
|
|
7177
7556
|
* Free trial configuration for a plan.
|
|
7178
7557
|
*/
|
|
7179
|
-
type
|
|
7558
|
+
type PreviewAttachCustomizeFreeTrialParams = {
|
|
7180
7559
|
/**
|
|
7181
7560
|
* Number of duration_type periods the trial lasts.
|
|
7182
7561
|
*/
|
|
@@ -7184,15 +7563,15 @@ type PreviewAttachFreeTrialParams = {
|
|
|
7184
7563
|
/**
|
|
7185
7564
|
* Unit of time for the trial ('day', 'month', 'year').
|
|
7186
7565
|
*/
|
|
7187
|
-
durationType?:
|
|
7566
|
+
durationType?: PreviewAttachCustomizeDurationType | undefined;
|
|
7188
7567
|
/**
|
|
7189
|
-
* If true, payment method required to start trial
|
|
7568
|
+
* If true, a payment method is required to start the trial and the customer is charged when it ends. Defaults to false.
|
|
7190
7569
|
*/
|
|
7191
7570
|
cardRequired?: boolean | undefined;
|
|
7192
7571
|
/**
|
|
7193
7572
|
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
7194
7573
|
*/
|
|
7195
|
-
onEnd?:
|
|
7574
|
+
onEnd?: PreviewAttachCustomizeOnEnd | undefined;
|
|
7196
7575
|
};
|
|
7197
7576
|
/**
|
|
7198
7577
|
* The time interval for the purchase limit window.
|
|
@@ -7445,7 +7824,7 @@ type PreviewAttachUpsertLicenseAdditionalCurrency = {
|
|
|
7445
7824
|
*/
|
|
7446
7825
|
type PreviewAttachUpsertLicenseBasePrice = {
|
|
7447
7826
|
/**
|
|
7448
|
-
* Base price amount for the plan.
|
|
7827
|
+
* Base price amount for the plan, in major currency units (e.g. dollars).
|
|
7449
7828
|
*/
|
|
7450
7829
|
amount: number;
|
|
7451
7830
|
/**
|
|
@@ -7741,6 +8120,10 @@ type PreviewAttachUpsertLicensePlanItemFilter = {
|
|
|
7741
8120
|
* Match items with this interval_count. Disambiguates between items that share an interval but differ in count.
|
|
7742
8121
|
*/
|
|
7743
8122
|
intervalCount?: number | undefined;
|
|
8123
|
+
/**
|
|
8124
|
+
* Match items whose grant equals this included usage. Omitted is a wildcard.
|
|
8125
|
+
*/
|
|
8126
|
+
included?: number | undefined;
|
|
7744
8127
|
};
|
|
7745
8128
|
type PreviewAttachUpsertLicenseCustomize = {
|
|
7746
8129
|
price?: PreviewAttachUpsertLicenseBasePrice | null | undefined;
|
|
@@ -7756,6 +8139,9 @@ type PreviewAttachUpsertLicense = {
|
|
|
7756
8139
|
[k: string]: any;
|
|
7757
8140
|
} | undefined;
|
|
7758
8141
|
};
|
|
8142
|
+
type PreviewAttachRemoveLicense = {
|
|
8143
|
+
licensePlanId: string;
|
|
8144
|
+
};
|
|
7759
8145
|
/**
|
|
7760
8146
|
* Customize the plan to attach. Can override the price, items, licenses, free trial, or a combination.
|
|
7761
8147
|
*/
|
|
@@ -7779,7 +8165,7 @@ type PreviewAttachCustomize = {
|
|
|
7779
8165
|
/**
|
|
7780
8166
|
* Override the plan's default free trial. Pass an object to set a custom trial, or null to remove the trial entirely.
|
|
7781
8167
|
*/
|
|
7782
|
-
freeTrial?:
|
|
8168
|
+
freeTrial?: PreviewAttachCustomizeFreeTrialParams | null | undefined;
|
|
7783
8169
|
/**
|
|
7784
8170
|
* Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
|
|
7785
8171
|
*/
|
|
@@ -7788,6 +8174,10 @@ type PreviewAttachCustomize = {
|
|
|
7788
8174
|
* License links to add or override for this customer, keyed by license_plan_id. Omitted fields inherit the plan catalog link (included defaults to 1 when the license is not in the catalog). A bare entry restores the license to pure catalog inheritance.
|
|
7789
8175
|
*/
|
|
7790
8176
|
upsertLicenses?: Array<PreviewAttachUpsertLicense> | undefined;
|
|
8177
|
+
/**
|
|
8178
|
+
* License links to drop, keyed by license_plan_id. Parallel to remove_items.
|
|
8179
|
+
*/
|
|
8180
|
+
removeLicenses?: Array<PreviewAttachRemoveLicense> | undefined;
|
|
7791
8181
|
};
|
|
7792
8182
|
/**
|
|
7793
8183
|
* Invoice mode creates a draft or open invoice and sends it to the customer, instead of charging their card immediately. This uses Stripe's send_invoice collection method.
|
|
@@ -7928,6 +8318,10 @@ type PreviewAttachParams = {
|
|
|
7928
8318
|
* The version of the plan to attach.
|
|
7929
8319
|
*/
|
|
7930
8320
|
version?: number | undefined;
|
|
8321
|
+
/**
|
|
8322
|
+
* Free trial for this plan. A shorthand for customize.free_trial, which takes precedence when both are given.
|
|
8323
|
+
*/
|
|
8324
|
+
freeTrial?: PreviewAttachFreeTrialParams | null | undefined;
|
|
7931
8325
|
/**
|
|
7932
8326
|
* Customize the plan to attach. Can override the price, items, licenses, free trial, or a combination.
|
|
7933
8327
|
*/
|
|
@@ -7961,9 +8355,9 @@ type PreviewAttachParams = {
|
|
|
7961
8355
|
*/
|
|
7962
8356
|
newBillingSubscription?: boolean | undefined;
|
|
7963
8357
|
/**
|
|
7964
|
-
* Reset the billing cycle
|
|
8358
|
+
* Reset the billing cycle immediately with 'now', or schedule a reset at a future Unix timestamp in milliseconds.
|
|
7965
8359
|
*/
|
|
7966
|
-
billingCycleAnchor?:
|
|
8360
|
+
billingCycleAnchor?: string | number | undefined;
|
|
7967
8361
|
/**
|
|
7968
8362
|
* When the plan change should take effect. 'immediate' applies now, 'end_of_cycle' schedules for the end of the current billing cycle. By default, upgrades are immediate and downgrades are scheduled.
|
|
7969
8363
|
*/
|
|
@@ -8017,7 +8411,7 @@ type PreviewAttachParams = {
|
|
|
8017
8411
|
*/
|
|
8018
8412
|
noBillingChanges?: boolean | undefined;
|
|
8019
8413
|
/**
|
|
8020
|
-
* If true, the customer's plan is activated immediately even when payment is deferred (invoice mode) or pending (Stripe checkout). For Stripe checkout, the customer_product is inserted before the customer completes the hosted form.
|
|
8414
|
+
* If true, the customer's plan is activated immediately even when payment is deferred (invoice mode) or pending (Stripe checkout). For Stripe checkout, the customer_product is inserted before the customer completes the hosted form. Set it here rather than on `invoice_mode`, which only covers the invoice-unpaid case.
|
|
8021
8415
|
*/
|
|
8022
8416
|
enablePlanImmediately?: boolean | undefined;
|
|
8023
8417
|
/**
|
|
@@ -8344,6 +8738,10 @@ type PreviewAttachResponse = {
|
|
|
8344
8738
|
* The three-letter ISO currency code. All amounts are in the currency's major unit (e.g., dollars for USD).
|
|
8345
8739
|
*/
|
|
8346
8740
|
currency: string;
|
|
8741
|
+
/**
|
|
8742
|
+
* True when this change clears the customer's usage balances, so the approver can see usage will reset.
|
|
8743
|
+
*/
|
|
8744
|
+
resetsUsage?: boolean | undefined;
|
|
8347
8745
|
/**
|
|
8348
8746
|
* Preview of the next billing cycle, if applicable. This shows what the customer will be charged in subsequent cycles.
|
|
8349
8747
|
*/
|
|
@@ -8408,7 +8806,7 @@ type PreviewMultiAttachAdditionalCurrency = {
|
|
|
8408
8806
|
*/
|
|
8409
8807
|
type PreviewMultiAttachBasePrice = {
|
|
8410
8808
|
/**
|
|
8411
|
-
* Base price amount for the plan.
|
|
8809
|
+
* Base price amount for the plan, in major currency units (e.g. dollars).
|
|
8412
8810
|
*/
|
|
8413
8811
|
amount: number;
|
|
8414
8812
|
/**
|
|
@@ -8749,7 +9147,7 @@ type PreviewMultiAttachFreeTrialParams = {
|
|
|
8749
9147
|
*/
|
|
8750
9148
|
durationType?: PreviewMultiAttachDurationType | undefined;
|
|
8751
9149
|
/**
|
|
8752
|
-
* If true, payment method required to start trial
|
|
9150
|
+
* If true, a payment method is required to start the trial and the customer is charged when it ends. Defaults to false.
|
|
8753
9151
|
*/
|
|
8754
9152
|
cardRequired?: boolean | undefined;
|
|
8755
9153
|
/**
|
|
@@ -9026,6 +9424,10 @@ type PreviewMultiAttachParams = {
|
|
|
9026
9424
|
* How to handle billing. 'prorate_immediately' charges/credits prorated amounts now, 'none' does not charge/credit anything.
|
|
9027
9425
|
*/
|
|
9028
9426
|
billingBehavior?: PreviewMultiAttachBillingBehavior | undefined;
|
|
9427
|
+
/**
|
|
9428
|
+
* Pass 'now' to reset the billing cycle of every plan on the subscription to the time of this request.
|
|
9429
|
+
*/
|
|
9430
|
+
billingCycleAnchor?: "now" | undefined;
|
|
9029
9431
|
/**
|
|
9030
9432
|
* URL to redirect to after successful checkout.
|
|
9031
9433
|
*/
|
|
@@ -9365,6 +9767,10 @@ type PreviewMultiAttachResponse = {
|
|
|
9365
9767
|
* The three-letter ISO currency code. All amounts are in the currency's major unit (e.g., dollars for USD).
|
|
9366
9768
|
*/
|
|
9367
9769
|
currency: string;
|
|
9770
|
+
/**
|
|
9771
|
+
* True when this change clears the customer's usage balances, so the approver can see usage will reset.
|
|
9772
|
+
*/
|
|
9773
|
+
resetsUsage?: boolean | undefined;
|
|
9368
9774
|
/**
|
|
9369
9775
|
* Preview of the next billing cycle, if applicable. This shows what the customer will be charged in subsequent cycles.
|
|
9370
9776
|
*/
|
|
@@ -9416,6 +9822,50 @@ type PreviewUpdateFeatureQuantityRequest = {
|
|
|
9416
9822
|
*/
|
|
9417
9823
|
adjustable?: boolean | undefined;
|
|
9418
9824
|
};
|
|
9825
|
+
/**
|
|
9826
|
+
* Unit of time for the trial ('day', 'month', 'year').
|
|
9827
|
+
*/
|
|
9828
|
+
declare const PreviewUpdateDurationType: {
|
|
9829
|
+
readonly Day: "day";
|
|
9830
|
+
readonly Month: "month";
|
|
9831
|
+
readonly Year: "year";
|
|
9832
|
+
};
|
|
9833
|
+
/**
|
|
9834
|
+
* Unit of time for the trial ('day', 'month', 'year').
|
|
9835
|
+
*/
|
|
9836
|
+
type PreviewUpdateDurationType = ClosedEnum<typeof PreviewUpdateDurationType>;
|
|
9837
|
+
/**
|
|
9838
|
+
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
9839
|
+
*/
|
|
9840
|
+
declare const PreviewUpdateOnEnd: {
|
|
9841
|
+
readonly Bill: "bill";
|
|
9842
|
+
readonly Revert: "revert";
|
|
9843
|
+
};
|
|
9844
|
+
/**
|
|
9845
|
+
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
9846
|
+
*/
|
|
9847
|
+
type PreviewUpdateOnEnd = ClosedEnum<typeof PreviewUpdateOnEnd>;
|
|
9848
|
+
/**
|
|
9849
|
+
* Free trial configuration for a plan.
|
|
9850
|
+
*/
|
|
9851
|
+
type PreviewUpdateFreeTrialParams = {
|
|
9852
|
+
/**
|
|
9853
|
+
* Number of duration_type periods the trial lasts.
|
|
9854
|
+
*/
|
|
9855
|
+
durationLength: number;
|
|
9856
|
+
/**
|
|
9857
|
+
* Unit of time for the trial ('day', 'month', 'year').
|
|
9858
|
+
*/
|
|
9859
|
+
durationType?: PreviewUpdateDurationType | undefined;
|
|
9860
|
+
/**
|
|
9861
|
+
* If true, a payment method is required to start the trial and the customer is charged when it ends. Defaults to false.
|
|
9862
|
+
*/
|
|
9863
|
+
cardRequired?: boolean | undefined;
|
|
9864
|
+
/**
|
|
9865
|
+
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
9866
|
+
*/
|
|
9867
|
+
onEnd?: PreviewUpdateOnEnd | undefined;
|
|
9868
|
+
};
|
|
9419
9869
|
/**
|
|
9420
9870
|
* Billing interval (e.g. 'month', 'year').
|
|
9421
9871
|
*/
|
|
@@ -9446,7 +9896,7 @@ type PreviewUpdateAdditionalCurrency = {
|
|
|
9446
9896
|
*/
|
|
9447
9897
|
type PreviewUpdateBasePrice = {
|
|
9448
9898
|
/**
|
|
9449
|
-
* Base price amount for the plan.
|
|
9899
|
+
* Base price amount for the plan, in major currency units (e.g. dollars).
|
|
9450
9900
|
*/
|
|
9451
9901
|
amount: number;
|
|
9452
9902
|
/**
|
|
@@ -9998,11 +10448,15 @@ type PreviewUpdatePlanItemFilter = {
|
|
|
9998
10448
|
* Match items with this interval_count. Disambiguates between items that share an interval but differ in count.
|
|
9999
10449
|
*/
|
|
10000
10450
|
intervalCount?: number | undefined;
|
|
10451
|
+
/**
|
|
10452
|
+
* Match items whose grant equals this included usage. Omitted is a wildcard.
|
|
10453
|
+
*/
|
|
10454
|
+
included?: number | undefined;
|
|
10001
10455
|
};
|
|
10002
10456
|
/**
|
|
10003
10457
|
* Unit of time for the trial ('day', 'month', 'year').
|
|
10004
10458
|
*/
|
|
10005
|
-
declare const
|
|
10459
|
+
declare const PreviewUpdateCustomizeDurationType: {
|
|
10006
10460
|
readonly Day: "day";
|
|
10007
10461
|
readonly Month: "month";
|
|
10008
10462
|
readonly Year: "year";
|
|
@@ -10010,22 +10464,22 @@ declare const PreviewUpdateDurationType: {
|
|
|
10010
10464
|
/**
|
|
10011
10465
|
* Unit of time for the trial ('day', 'month', 'year').
|
|
10012
10466
|
*/
|
|
10013
|
-
type
|
|
10467
|
+
type PreviewUpdateCustomizeDurationType = ClosedEnum<typeof PreviewUpdateCustomizeDurationType>;
|
|
10014
10468
|
/**
|
|
10015
10469
|
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
10016
10470
|
*/
|
|
10017
|
-
declare const
|
|
10471
|
+
declare const PreviewUpdateCustomizeOnEnd: {
|
|
10018
10472
|
readonly Bill: "bill";
|
|
10019
10473
|
readonly Revert: "revert";
|
|
10020
10474
|
};
|
|
10021
10475
|
/**
|
|
10022
10476
|
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
10023
10477
|
*/
|
|
10024
|
-
type
|
|
10478
|
+
type PreviewUpdateCustomizeOnEnd = ClosedEnum<typeof PreviewUpdateCustomizeOnEnd>;
|
|
10025
10479
|
/**
|
|
10026
10480
|
* Free trial configuration for a plan.
|
|
10027
10481
|
*/
|
|
10028
|
-
type
|
|
10482
|
+
type PreviewUpdateCustomizeFreeTrialParams = {
|
|
10029
10483
|
/**
|
|
10030
10484
|
* Number of duration_type periods the trial lasts.
|
|
10031
10485
|
*/
|
|
@@ -10033,15 +10487,15 @@ type PreviewUpdateFreeTrialParams = {
|
|
|
10033
10487
|
/**
|
|
10034
10488
|
* Unit of time for the trial ('day', 'month', 'year').
|
|
10035
10489
|
*/
|
|
10036
|
-
durationType?:
|
|
10490
|
+
durationType?: PreviewUpdateCustomizeDurationType | undefined;
|
|
10037
10491
|
/**
|
|
10038
|
-
* If true, payment method required to start trial
|
|
10492
|
+
* If true, a payment method is required to start the trial and the customer is charged when it ends. Defaults to false.
|
|
10039
10493
|
*/
|
|
10040
10494
|
cardRequired?: boolean | undefined;
|
|
10041
10495
|
/**
|
|
10042
10496
|
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
10043
10497
|
*/
|
|
10044
|
-
onEnd?:
|
|
10498
|
+
onEnd?: PreviewUpdateCustomizeOnEnd | undefined;
|
|
10045
10499
|
};
|
|
10046
10500
|
/**
|
|
10047
10501
|
* The time interval for the purchase limit window.
|
|
@@ -10294,7 +10748,7 @@ type PreviewUpdateUpsertLicenseAdditionalCurrency = {
|
|
|
10294
10748
|
*/
|
|
10295
10749
|
type PreviewUpdateUpsertLicenseBasePrice = {
|
|
10296
10750
|
/**
|
|
10297
|
-
* Base price amount for the plan.
|
|
10751
|
+
* Base price amount for the plan, in major currency units (e.g. dollars).
|
|
10298
10752
|
*/
|
|
10299
10753
|
amount: number;
|
|
10300
10754
|
/**
|
|
@@ -10590,6 +11044,10 @@ type PreviewUpdateUpsertLicensePlanItemFilter = {
|
|
|
10590
11044
|
* Match items with this interval_count. Disambiguates between items that share an interval but differ in count.
|
|
10591
11045
|
*/
|
|
10592
11046
|
intervalCount?: number | undefined;
|
|
11047
|
+
/**
|
|
11048
|
+
* Match items whose grant equals this included usage. Omitted is a wildcard.
|
|
11049
|
+
*/
|
|
11050
|
+
included?: number | undefined;
|
|
10593
11051
|
};
|
|
10594
11052
|
type PreviewUpdateUpsertLicenseCustomize = {
|
|
10595
11053
|
price?: PreviewUpdateUpsertLicenseBasePrice | null | undefined;
|
|
@@ -10605,6 +11063,9 @@ type PreviewUpdateUpsertLicense = {
|
|
|
10605
11063
|
[k: string]: any;
|
|
10606
11064
|
} | undefined;
|
|
10607
11065
|
};
|
|
11066
|
+
type PreviewUpdateRemoveLicense = {
|
|
11067
|
+
licensePlanId: string;
|
|
11068
|
+
};
|
|
10608
11069
|
/**
|
|
10609
11070
|
* Customize the plan to attach. Can override the price, items, licenses, free trial, or a combination.
|
|
10610
11071
|
*/
|
|
@@ -10628,7 +11089,7 @@ type PreviewUpdateCustomize = {
|
|
|
10628
11089
|
/**
|
|
10629
11090
|
* Override the plan's default free trial. Pass an object to set a custom trial, or null to remove the trial entirely.
|
|
10630
11091
|
*/
|
|
10631
|
-
freeTrial?:
|
|
11092
|
+
freeTrial?: PreviewUpdateCustomizeFreeTrialParams | null | undefined;
|
|
10632
11093
|
/**
|
|
10633
11094
|
* Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
|
|
10634
11095
|
*/
|
|
@@ -10637,6 +11098,10 @@ type PreviewUpdateCustomize = {
|
|
|
10637
11098
|
* License links to add or override for this customer, keyed by license_plan_id. Omitted fields inherit the plan catalog link (included defaults to 1 when the license is not in the catalog). A bare entry restores the license to pure catalog inheritance.
|
|
10638
11099
|
*/
|
|
10639
11100
|
upsertLicenses?: Array<PreviewUpdateUpsertLicense> | undefined;
|
|
11101
|
+
/**
|
|
11102
|
+
* License links to drop, keyed by license_plan_id. Parallel to remove_items.
|
|
11103
|
+
*/
|
|
11104
|
+
removeLicenses?: Array<PreviewUpdateRemoveLicense> | undefined;
|
|
10640
11105
|
};
|
|
10641
11106
|
/**
|
|
10642
11107
|
* Invoice mode creates a draft or open invoice and sends it to the customer, instead of charging their card immediately. This uses Stripe's send_invoice collection method.
|
|
@@ -10775,6 +11240,10 @@ type PreviewUpdateParams = {
|
|
|
10775
11240
|
* The version of the plan to attach.
|
|
10776
11241
|
*/
|
|
10777
11242
|
version?: number | undefined;
|
|
11243
|
+
/**
|
|
11244
|
+
* Free trial for this plan. A shorthand for customize.free_trial, which takes precedence when both are given.
|
|
11245
|
+
*/
|
|
11246
|
+
freeTrial?: PreviewUpdateFreeTrialParams | null | undefined;
|
|
10778
11247
|
/**
|
|
10779
11248
|
* Customize the plan to attach. Can override the price, items, licenses, free trial, or a combination.
|
|
10780
11249
|
*/
|
|
@@ -10804,9 +11273,9 @@ type PreviewUpdateParams = {
|
|
|
10804
11273
|
*/
|
|
10805
11274
|
cancelAction?: PreviewUpdateCancelAction | undefined;
|
|
10806
11275
|
/**
|
|
10807
|
-
* Reset the billing cycle
|
|
11276
|
+
* Reset the billing cycle immediately with 'now', or schedule a reset at a future Unix timestamp in milliseconds.
|
|
10808
11277
|
*/
|
|
10809
|
-
billingCycleAnchor?:
|
|
11278
|
+
billingCycleAnchor?: string | number | undefined;
|
|
10810
11279
|
/**
|
|
10811
11280
|
* If true, the subscription is updated internally without applying billing changes in Stripe.
|
|
10812
11281
|
*/
|
|
@@ -10815,6 +11284,12 @@ type PreviewUpdateParams = {
|
|
|
10815
11284
|
* Controls how the last payment is refunded on immediate cancellation. 'prorated' refunds the unused portion, 'full' refunds the entire last payment.
|
|
10816
11285
|
*/
|
|
10817
11286
|
refundLastPayment?: PreviewUpdateRefundLastPayment | undefined;
|
|
11287
|
+
/**
|
|
11288
|
+
* Additional parameters to pass into the Stripe subscription update or cancel call.
|
|
11289
|
+
*/
|
|
11290
|
+
subscriptionParams?: {
|
|
11291
|
+
[k: string]: any;
|
|
11292
|
+
} | undefined;
|
|
10818
11293
|
/**
|
|
10819
11294
|
* Controls whether balances should be recalculated during the subscription update.
|
|
10820
11295
|
*/
|
|
@@ -11146,6 +11621,10 @@ type PreviewUpdateResponse = {
|
|
|
11146
11621
|
* The three-letter ISO currency code. All amounts are in the currency's major unit (e.g., dollars for USD).
|
|
11147
11622
|
*/
|
|
11148
11623
|
currency: string;
|
|
11624
|
+
/**
|
|
11625
|
+
* True when this change clears the customer's usage balances, so the approver can see usage will reset.
|
|
11626
|
+
*/
|
|
11627
|
+
resetsUsage?: boolean | undefined;
|
|
11149
11628
|
/**
|
|
11150
11629
|
* Preview of the next billing cycle, if applicable. This shows what the customer will be charged in subsequent cycles.
|
|
11151
11630
|
*/
|
|
@@ -11218,6 +11697,50 @@ type SetupPaymentFeatureQuantity = {
|
|
|
11218
11697
|
*/
|
|
11219
11698
|
adjustable?: boolean | undefined;
|
|
11220
11699
|
};
|
|
11700
|
+
/**
|
|
11701
|
+
* Unit of time for the trial ('day', 'month', 'year').
|
|
11702
|
+
*/
|
|
11703
|
+
declare const SetupPaymentDurationType: {
|
|
11704
|
+
readonly Day: "day";
|
|
11705
|
+
readonly Month: "month";
|
|
11706
|
+
readonly Year: "year";
|
|
11707
|
+
};
|
|
11708
|
+
/**
|
|
11709
|
+
* Unit of time for the trial ('day', 'month', 'year').
|
|
11710
|
+
*/
|
|
11711
|
+
type SetupPaymentDurationType = ClosedEnum<typeof SetupPaymentDurationType>;
|
|
11712
|
+
/**
|
|
11713
|
+
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
11714
|
+
*/
|
|
11715
|
+
declare const SetupPaymentOnEnd: {
|
|
11716
|
+
readonly Bill: "bill";
|
|
11717
|
+
readonly Revert: "revert";
|
|
11718
|
+
};
|
|
11719
|
+
/**
|
|
11720
|
+
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
11721
|
+
*/
|
|
11722
|
+
type SetupPaymentOnEnd = ClosedEnum<typeof SetupPaymentOnEnd>;
|
|
11723
|
+
/**
|
|
11724
|
+
* Free trial configuration for a plan.
|
|
11725
|
+
*/
|
|
11726
|
+
type SetupPaymentFreeTrialParams = {
|
|
11727
|
+
/**
|
|
11728
|
+
* Number of duration_type periods the trial lasts.
|
|
11729
|
+
*/
|
|
11730
|
+
durationLength: number;
|
|
11731
|
+
/**
|
|
11732
|
+
* Unit of time for the trial ('day', 'month', 'year').
|
|
11733
|
+
*/
|
|
11734
|
+
durationType?: SetupPaymentDurationType | undefined;
|
|
11735
|
+
/**
|
|
11736
|
+
* If true, a payment method is required to start the trial and the customer is charged when it ends. Defaults to false.
|
|
11737
|
+
*/
|
|
11738
|
+
cardRequired?: boolean | undefined;
|
|
11739
|
+
/**
|
|
11740
|
+
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
11741
|
+
*/
|
|
11742
|
+
onEnd?: SetupPaymentOnEnd | undefined;
|
|
11743
|
+
};
|
|
11221
11744
|
/**
|
|
11222
11745
|
* Billing interval (e.g. 'month', 'year').
|
|
11223
11746
|
*/
|
|
@@ -11248,7 +11771,7 @@ type SetupPaymentAdditionalCurrency = {
|
|
|
11248
11771
|
*/
|
|
11249
11772
|
type SetupPaymentBasePrice = {
|
|
11250
11773
|
/**
|
|
11251
|
-
* Base price amount for the plan.
|
|
11774
|
+
* Base price amount for the plan, in major currency units (e.g. dollars).
|
|
11252
11775
|
*/
|
|
11253
11776
|
amount: number;
|
|
11254
11777
|
/**
|
|
@@ -11800,11 +12323,15 @@ type SetupPaymentPlanItemFilter = {
|
|
|
11800
12323
|
* Match items with this interval_count. Disambiguates between items that share an interval but differ in count.
|
|
11801
12324
|
*/
|
|
11802
12325
|
intervalCount?: number | undefined;
|
|
12326
|
+
/**
|
|
12327
|
+
* Match items whose grant equals this included usage. Omitted is a wildcard.
|
|
12328
|
+
*/
|
|
12329
|
+
included?: number | undefined;
|
|
11803
12330
|
};
|
|
11804
12331
|
/**
|
|
11805
12332
|
* Unit of time for the trial ('day', 'month', 'year').
|
|
11806
12333
|
*/
|
|
11807
|
-
declare const
|
|
12334
|
+
declare const SetupPaymentCustomizeDurationType: {
|
|
11808
12335
|
readonly Day: "day";
|
|
11809
12336
|
readonly Month: "month";
|
|
11810
12337
|
readonly Year: "year";
|
|
@@ -11812,22 +12339,22 @@ declare const SetupPaymentDurationType: {
|
|
|
11812
12339
|
/**
|
|
11813
12340
|
* Unit of time for the trial ('day', 'month', 'year').
|
|
11814
12341
|
*/
|
|
11815
|
-
type
|
|
12342
|
+
type SetupPaymentCustomizeDurationType = ClosedEnum<typeof SetupPaymentCustomizeDurationType>;
|
|
11816
12343
|
/**
|
|
11817
12344
|
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
11818
12345
|
*/
|
|
11819
|
-
declare const
|
|
12346
|
+
declare const SetupPaymentCustomizeOnEnd: {
|
|
11820
12347
|
readonly Bill: "bill";
|
|
11821
12348
|
readonly Revert: "revert";
|
|
11822
12349
|
};
|
|
11823
12350
|
/**
|
|
11824
12351
|
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
11825
12352
|
*/
|
|
11826
|
-
type
|
|
12353
|
+
type SetupPaymentCustomizeOnEnd = ClosedEnum<typeof SetupPaymentCustomizeOnEnd>;
|
|
11827
12354
|
/**
|
|
11828
12355
|
* Free trial configuration for a plan.
|
|
11829
12356
|
*/
|
|
11830
|
-
type
|
|
12357
|
+
type SetupPaymentCustomizeFreeTrialParams = {
|
|
11831
12358
|
/**
|
|
11832
12359
|
* Number of duration_type periods the trial lasts.
|
|
11833
12360
|
*/
|
|
@@ -11835,15 +12362,15 @@ type SetupPaymentFreeTrialParams = {
|
|
|
11835
12362
|
/**
|
|
11836
12363
|
* Unit of time for the trial ('day', 'month', 'year').
|
|
11837
12364
|
*/
|
|
11838
|
-
durationType?:
|
|
12365
|
+
durationType?: SetupPaymentCustomizeDurationType | undefined;
|
|
11839
12366
|
/**
|
|
11840
|
-
* If true, payment method required to start trial
|
|
12367
|
+
* If true, a payment method is required to start the trial and the customer is charged when it ends. Defaults to false.
|
|
11841
12368
|
*/
|
|
11842
12369
|
cardRequired?: boolean | undefined;
|
|
11843
12370
|
/**
|
|
11844
12371
|
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
11845
12372
|
*/
|
|
11846
|
-
onEnd?:
|
|
12373
|
+
onEnd?: SetupPaymentCustomizeOnEnd | undefined;
|
|
11847
12374
|
};
|
|
11848
12375
|
/**
|
|
11849
12376
|
* The time interval for the purchase limit window.
|
|
@@ -12096,7 +12623,7 @@ type SetupPaymentUpsertLicenseAdditionalCurrency = {
|
|
|
12096
12623
|
*/
|
|
12097
12624
|
type SetupPaymentUpsertLicenseBasePrice = {
|
|
12098
12625
|
/**
|
|
12099
|
-
* Base price amount for the plan.
|
|
12626
|
+
* Base price amount for the plan, in major currency units (e.g. dollars).
|
|
12100
12627
|
*/
|
|
12101
12628
|
amount: number;
|
|
12102
12629
|
/**
|
|
@@ -12392,6 +12919,10 @@ type SetupPaymentUpsertLicensePlanItemFilter = {
|
|
|
12392
12919
|
* Match items with this interval_count. Disambiguates between items that share an interval but differ in count.
|
|
12393
12920
|
*/
|
|
12394
12921
|
intervalCount?: number | undefined;
|
|
12922
|
+
/**
|
|
12923
|
+
* Match items whose grant equals this included usage. Omitted is a wildcard.
|
|
12924
|
+
*/
|
|
12925
|
+
included?: number | undefined;
|
|
12395
12926
|
};
|
|
12396
12927
|
type SetupPaymentUpsertLicenseCustomize = {
|
|
12397
12928
|
price?: SetupPaymentUpsertLicenseBasePrice | null | undefined;
|
|
@@ -12407,6 +12938,9 @@ type SetupPaymentUpsertLicense = {
|
|
|
12407
12938
|
[k: string]: any;
|
|
12408
12939
|
} | undefined;
|
|
12409
12940
|
};
|
|
12941
|
+
type SetupPaymentRemoveLicense = {
|
|
12942
|
+
licensePlanId: string;
|
|
12943
|
+
};
|
|
12410
12944
|
/**
|
|
12411
12945
|
* Customize the plan to attach. Can override the price, items, licenses, free trial, or a combination.
|
|
12412
12946
|
*/
|
|
@@ -12430,7 +12964,7 @@ type SetupPaymentCustomize = {
|
|
|
12430
12964
|
/**
|
|
12431
12965
|
* Override the plan's default free trial. Pass an object to set a custom trial, or null to remove the trial entirely.
|
|
12432
12966
|
*/
|
|
12433
|
-
freeTrial?:
|
|
12967
|
+
freeTrial?: SetupPaymentCustomizeFreeTrialParams | null | undefined;
|
|
12434
12968
|
/**
|
|
12435
12969
|
* Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
|
|
12436
12970
|
*/
|
|
@@ -12439,6 +12973,10 @@ type SetupPaymentCustomize = {
|
|
|
12439
12973
|
* License links to add or override for this customer, keyed by license_plan_id. Omitted fields inherit the plan catalog link (included defaults to 1 when the license is not in the catalog). A bare entry restores the license to pure catalog inheritance.
|
|
12440
12974
|
*/
|
|
12441
12975
|
upsertLicenses?: Array<SetupPaymentUpsertLicense> | undefined;
|
|
12976
|
+
/**
|
|
12977
|
+
* License links to drop, keyed by license_plan_id. Parallel to remove_items.
|
|
12978
|
+
*/
|
|
12979
|
+
removeLicenses?: Array<SetupPaymentRemoveLicense> | undefined;
|
|
12442
12980
|
};
|
|
12443
12981
|
/**
|
|
12444
12982
|
* How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
|
|
@@ -12531,6 +13069,10 @@ type SetupPaymentParams = {
|
|
|
12531
13069
|
* The version of the plan to attach.
|
|
12532
13070
|
*/
|
|
12533
13071
|
version?: number | undefined;
|
|
13072
|
+
/**
|
|
13073
|
+
* Free trial for this plan. A shorthand for customize.free_trial, which takes precedence when both are given.
|
|
13074
|
+
*/
|
|
13075
|
+
freeTrial?: SetupPaymentFreeTrialParams | null | undefined;
|
|
12534
13076
|
/**
|
|
12535
13077
|
* Customize the plan to attach. Can override the price, items, licenses, free trial, or a combination.
|
|
12536
13078
|
*/
|
|
@@ -12552,9 +13094,9 @@ type SetupPaymentParams = {
|
|
|
12552
13094
|
*/
|
|
12553
13095
|
successUrl?: string | undefined;
|
|
12554
13096
|
/**
|
|
12555
|
-
* Reset the billing cycle
|
|
13097
|
+
* Reset the billing cycle immediately with 'now', or schedule a reset at a future Unix timestamp in milliseconds.
|
|
12556
13098
|
*/
|
|
12557
|
-
billingCycleAnchor?:
|
|
13099
|
+
billingCycleAnchor?: string | number | undefined;
|
|
12558
13100
|
/**
|
|
12559
13101
|
* Unix timestamp in milliseconds for when the attached plan should start. Future dates create a scheduled subscription.
|
|
12560
13102
|
*/
|
|
@@ -12600,7 +13142,7 @@ type SetupPaymentParams = {
|
|
|
12600
13142
|
*/
|
|
12601
13143
|
noBillingChanges?: boolean | undefined;
|
|
12602
13144
|
/**
|
|
12603
|
-
* If true, the customer's plan is activated immediately even when payment is deferred (invoice mode) or pending (Stripe checkout). For Stripe checkout, the customer_product is inserted before the customer completes the hosted form.
|
|
13145
|
+
* If true, the customer's plan is activated immediately even when payment is deferred (invoice mode) or pending (Stripe checkout). For Stripe checkout, the customer_product is inserted before the customer completes the hosted form. Set it here rather than on `invoice_mode`, which only covers the invoice-unpaid case.
|
|
12604
13146
|
*/
|
|
12605
13147
|
enablePlanImmediately?: boolean | undefined;
|
|
12606
13148
|
/**
|