autumn-js 1.2.49 → 1.2.51
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 +15401 -13523
- 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 +15401 -13523
- 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 +15401 -13523
- 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 +15401 -13523
- 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 +15401 -13523
- package/dist/backend/adapters/next.mjs +5 -5
- package/dist/backend/{authTypes-COW88tnI.d.mts → authTypes-BPv82hMB.d.mts} +1 -0
- package/dist/backend/{authTypes-COW88tnI.d.ts → authTypes-BPv82hMB.d.ts} +1 -0
- package/dist/backend/{chunk-WIIJIELJ.mjs → chunk-3IERCYTR.mjs} +2 -2
- package/dist/backend/{chunk-25GD3WCE.mjs → chunk-6GOQC5SD.mjs} +1 -1
- package/dist/backend/{chunk-EIR56X56.mjs → chunk-GOHDQNPO.mjs} +1 -1
- package/dist/backend/{chunk-QEJJM4BY.mjs → chunk-IVZOKPTN.mjs} +15413 -13535
- package/dist/backend/{chunk-FZQWS6KN.mjs → chunk-NND4W5ST.mjs} +1 -1
- package/dist/backend/{chunk-2OM5IYSI.mjs → chunk-OATOSP4P.mjs} +14 -14
- package/dist/backend/{chunk-K7BBOM2C.mjs → chunk-PAX4VKN2.mjs} +2 -2
- package/dist/backend/{chunk-TW3CT5JS.mjs → chunk-QEVYQVND.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 +15401 -13523
- 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 +15401 -13523
- 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 +15401 -13523
- 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 +15401 -13523
- 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 +14 -14
- 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 +14 -14
- 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 +15401 -13523
- package/dist/backend/index.mjs +4 -4
- package/dist/backend/{routeTypes-6-0oSlbI.d.mts → routeTypes-BgnbgxGz.d.mts} +1862 -163
- package/dist/backend/{routeTypes-NNlpTwza.d.ts → routeTypes-CY41TUL_.d.ts} +1862 -163
- package/dist/better-auth/{chunk-KTJ7KXKK.mjs → chunk-65UT5FYZ.mjs} +1 -1
- package/dist/better-auth/{chunk-4E2XIHMW.mjs → chunk-O4JXKGQB.mjs} +14 -14
- package/dist/better-auth/{chunk-JB7C63BT.mjs → chunk-PWIGXWBN.mjs} +15388 -13510
- package/dist/better-auth/index.js +6764 -4886
- package/dist/better-auth/index.mjs +3 -3
- package/dist/better-auth/types.d.mts +1 -0
- package/dist/better-auth/types.d.ts +1 -0
- package/dist/better-auth/utils/createAutumnEndpoint.js +14 -14
- package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
- package/dist/better-auth/utils/handleBetterAuthRoute.js +15401 -13523
- package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
- package/dist/better-auth/utils/index.js +6764 -4886
- 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/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-VD6pkmpz.d.mts → customer-BE_75FdJ.d.mts} +90 -3
- package/dist/react/{customer-CNfSCDv_.d.ts → customer-BLdL9HLU.d.ts} +90 -3
- package/dist/react/hooks/index.d.mts +4 -4
- package/dist/react/hooks/index.d.ts +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/getLocalCheckResponse.d.mts +3 -3
- package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +3 -3
- package/dist/react/hooks/internal/useCustomerActions.d.mts +4 -4
- package/dist/react/hooks/internal/useCustomerActions.d.ts +4 -4
- 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/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/{list-plans-op-CvGXtKAO.d.mts → list-plans-op-BN1Ppvqj.d.mts} +1 -1
- package/dist/react/{list-plans-op-B87IUSZR.d.ts → list-plans-op-CoNYZPKn.d.ts} +1 -1
- package/dist/react/{params-BrFcJdeO.d.mts → params-CkhNY_jQ.d.mts} +1 -1
- package/dist/react/{params-BwHZca3H.d.ts → params-Cth9VJzj.d.ts} +1 -1
- package/dist/react/{plan-DBswUtWr.d.mts → plan-B1xvige-.d.mts} +6 -2
- package/dist/react/{plan-DBswUtWr.d.ts → plan-B1xvige-.d.ts} +6 -2
- package/dist/sdk/index.d.mts +2664 -344
- package/dist/sdk/index.d.ts +2664 -344
- package/dist/sdk/index.js +10260 -7737
- package/dist/sdk/index.mjs +17279 -14982
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as ClosedEnum, O as OpenEnum, c as CustomerExpand, G as GetOrCreateCustomerParams, R as ResolvedIdentity } from './authTypes-
|
|
1
|
+
import { b as ClosedEnum, O as OpenEnum, c as CustomerExpand, G as GetOrCreateCustomerParams, R as ResolvedIdentity } from './authTypes-BPv82hMB.mjs';
|
|
2
2
|
import { z } from 'zod/v4';
|
|
3
3
|
import { ProtectedBodyField } from './core/utils/sanitizeBody.mjs';
|
|
4
4
|
import { BackendResult } from './core/types/responseTypes.mjs';
|
|
@@ -2032,6 +2032,10 @@ type Breakdown = {
|
|
|
2032
2032
|
expiresAt: number | null;
|
|
2033
2033
|
};
|
|
2034
2034
|
type BalanceRollover = {
|
|
2035
|
+
/**
|
|
2036
|
+
* Amount originally rolled over from a previous period, before any of it was consumed.
|
|
2037
|
+
*/
|
|
2038
|
+
granted: number;
|
|
2035
2039
|
/**
|
|
2036
2040
|
* Amount of balance rolled over from a previous period.
|
|
2037
2041
|
*/
|
|
@@ -6435,7 +6439,7 @@ type PlanVariantDetailsBillingControls = {
|
|
|
6435
6439
|
/**
|
|
6436
6440
|
* The customization that transforms the base plan into this variant.
|
|
6437
6441
|
*/
|
|
6438
|
-
type
|
|
6442
|
+
type Customize1 = {
|
|
6439
6443
|
/**
|
|
6440
6444
|
* Override the base price of the plan. Pass null to remove the base price.
|
|
6441
6445
|
*/
|
|
@@ -6468,7 +6472,7 @@ type VariantDetails = {
|
|
|
6468
6472
|
/**
|
|
6469
6473
|
* The customization that transforms the base plan into this variant.
|
|
6470
6474
|
*/
|
|
6471
|
-
customize?:
|
|
6475
|
+
customize?: Customize1 | undefined;
|
|
6472
6476
|
};
|
|
6473
6477
|
/**
|
|
6474
6478
|
* Miscellaneous plan-level configuration flags.
|
|
@@ -10015,36 +10019,36 @@ type CreateReferralCodeResponse = {
|
|
|
10015
10019
|
/**
|
|
10016
10020
|
* When the reward is granted: on redemption, or when the redeemer checks out.
|
|
10017
10021
|
*/
|
|
10018
|
-
declare const
|
|
10022
|
+
declare const CreateReferralProgramRedeemOnRequest: {
|
|
10019
10023
|
readonly CustomerCreation: "customer_creation";
|
|
10020
10024
|
readonly Checkout: "checkout";
|
|
10021
10025
|
};
|
|
10022
10026
|
/**
|
|
10023
10027
|
* When the reward is granted: on redemption, or when the redeemer checks out.
|
|
10024
10028
|
*/
|
|
10025
|
-
type
|
|
10029
|
+
type CreateReferralProgramRedeemOnRequest = ClosedEnum<typeof CreateReferralProgramRedeemOnRequest>;
|
|
10026
10030
|
/**
|
|
10027
10031
|
* Who receives the reward: the referrer only, or both parties.
|
|
10028
10032
|
*/
|
|
10029
|
-
declare const
|
|
10033
|
+
declare const CreateReferralProgramReceivedByRequest: {
|
|
10030
10034
|
readonly Referrer: "referrer";
|
|
10031
10035
|
readonly All: "all";
|
|
10032
10036
|
};
|
|
10033
10037
|
/**
|
|
10034
10038
|
* Who receives the reward: the referrer only, or both parties.
|
|
10035
10039
|
*/
|
|
10036
|
-
type
|
|
10040
|
+
type CreateReferralProgramReceivedByRequest = ClosedEnum<typeof CreateReferralProgramReceivedByRequest>;
|
|
10037
10041
|
type CreateReferralProgramParams = {
|
|
10038
10042
|
id: string;
|
|
10039
10043
|
rewardId: string;
|
|
10040
10044
|
/**
|
|
10041
10045
|
* When the reward is granted: on redemption, or when the redeemer checks out.
|
|
10042
10046
|
*/
|
|
10043
|
-
redeemOn:
|
|
10047
|
+
redeemOn: CreateReferralProgramRedeemOnRequest;
|
|
10044
10048
|
/**
|
|
10045
10049
|
* Who receives the reward: the referrer only, or both parties.
|
|
10046
10050
|
*/
|
|
10047
|
-
receivedBy:
|
|
10051
|
+
receivedBy: CreateReferralProgramReceivedByRequest;
|
|
10048
10052
|
/**
|
|
10049
10053
|
* A positive redemption limit, or null for unlimited redemptions.
|
|
10050
10054
|
*/
|
|
@@ -10061,25 +10065,25 @@ type CreateReferralProgramParams = {
|
|
|
10061
10065
|
/**
|
|
10062
10066
|
* When the reward is granted: on redemption, or when the redeemer checks out.
|
|
10063
10067
|
*/
|
|
10064
|
-
declare const
|
|
10068
|
+
declare const CreateReferralProgramRedeemOnResponse: {
|
|
10065
10069
|
readonly CustomerCreation: "customer_creation";
|
|
10066
10070
|
readonly Checkout: "checkout";
|
|
10067
10071
|
};
|
|
10068
10072
|
/**
|
|
10069
10073
|
* When the reward is granted: on redemption, or when the redeemer checks out.
|
|
10070
10074
|
*/
|
|
10071
|
-
type
|
|
10075
|
+
type CreateReferralProgramRedeemOnResponse = OpenEnum<typeof CreateReferralProgramRedeemOnResponse>;
|
|
10072
10076
|
/**
|
|
10073
10077
|
* Who receives the reward: the referrer only, or both parties.
|
|
10074
10078
|
*/
|
|
10075
|
-
declare const
|
|
10079
|
+
declare const CreateReferralProgramReceivedByResponse: {
|
|
10076
10080
|
readonly Referrer: "referrer";
|
|
10077
10081
|
readonly All: "all";
|
|
10078
10082
|
};
|
|
10079
10083
|
/**
|
|
10080
10084
|
* Who receives the reward: the referrer only, or both parties.
|
|
10081
10085
|
*/
|
|
10082
|
-
type
|
|
10086
|
+
type CreateReferralProgramReceivedByResponse = OpenEnum<typeof CreateReferralProgramReceivedByResponse>;
|
|
10083
10087
|
/**
|
|
10084
10088
|
* OK
|
|
10085
10089
|
*/
|
|
@@ -10095,11 +10099,11 @@ type CreateReferralProgramResponse = {
|
|
|
10095
10099
|
/**
|
|
10096
10100
|
* When the reward is granted: on redemption, or when the redeemer checks out.
|
|
10097
10101
|
*/
|
|
10098
|
-
redeemOn:
|
|
10102
|
+
redeemOn: CreateReferralProgramRedeemOnResponse;
|
|
10099
10103
|
/**
|
|
10100
10104
|
* Who receives the reward: the referrer only, or both parties.
|
|
10101
10105
|
*/
|
|
10102
|
-
receivedBy:
|
|
10106
|
+
receivedBy: CreateReferralProgramReceivedByResponse;
|
|
10103
10107
|
/**
|
|
10104
10108
|
* The maximum number of times a referral code can be redeemed.
|
|
10105
10109
|
*/
|
|
@@ -10168,7 +10172,7 @@ type CreateRewardCouponRequest = {
|
|
|
10168
10172
|
/**
|
|
10169
10173
|
* The unit of time the grant lasts.
|
|
10170
10174
|
*/
|
|
10171
|
-
declare const
|
|
10175
|
+
declare const CreateRewardExpiryTypeRequestBody: {
|
|
10172
10176
|
readonly Day: "day";
|
|
10173
10177
|
readonly Week: "week";
|
|
10174
10178
|
readonly Month: "month";
|
|
@@ -10177,12 +10181,12 @@ declare const ExpiryTypeRequestBody: {
|
|
|
10177
10181
|
/**
|
|
10178
10182
|
* The unit of time the grant lasts.
|
|
10179
10183
|
*/
|
|
10180
|
-
type
|
|
10181
|
-
type
|
|
10184
|
+
type CreateRewardExpiryTypeRequestBody = ClosedEnum<typeof CreateRewardExpiryTypeRequestBody>;
|
|
10185
|
+
type CreateRewardExpiryRequest = {
|
|
10182
10186
|
/**
|
|
10183
10187
|
* The unit of time the grant lasts.
|
|
10184
10188
|
*/
|
|
10185
|
-
type:
|
|
10189
|
+
type: CreateRewardExpiryTypeRequestBody;
|
|
10186
10190
|
/**
|
|
10187
10191
|
* The positive integer count of periods before the grant expires.
|
|
10188
10192
|
*/
|
|
@@ -10191,10 +10195,10 @@ type ExpiryRequest = {
|
|
|
10191
10195
|
type CreateRewardGrant = {
|
|
10192
10196
|
featureId: string;
|
|
10193
10197
|
/**
|
|
10194
|
-
* A
|
|
10198
|
+
* A non-negative amount to grant, or null for boolean features.
|
|
10195
10199
|
*/
|
|
10196
10200
|
included: number | null;
|
|
10197
|
-
expiry:
|
|
10201
|
+
expiry: CreateRewardExpiryRequest | null;
|
|
10198
10202
|
};
|
|
10199
10203
|
type CreateRewardFeatureGrantPromoCode = {
|
|
10200
10204
|
code: string;
|
|
@@ -10486,6 +10490,845 @@ declare const CreateScheduleBillingBehavior: {
|
|
|
10486
10490
|
* Whether to prorate the immediate phase. 'none' skips proration charges and credits.
|
|
10487
10491
|
*/
|
|
10488
10492
|
type CreateScheduleBillingBehavior = ClosedEnum<typeof CreateScheduleBillingBehavior>;
|
|
10493
|
+
/**
|
|
10494
|
+
* Quantity configuration for a prepaid feature.
|
|
10495
|
+
*/
|
|
10496
|
+
type UnscheduledPlanFeatureQuantity = {
|
|
10497
|
+
/**
|
|
10498
|
+
* The ID of the feature to set quantity for.
|
|
10499
|
+
*/
|
|
10500
|
+
featureId: string;
|
|
10501
|
+
/**
|
|
10502
|
+
* The quantity of the feature.
|
|
10503
|
+
*/
|
|
10504
|
+
quantity?: number | undefined;
|
|
10505
|
+
/**
|
|
10506
|
+
* Whether the customer can adjust the quantity.
|
|
10507
|
+
*/
|
|
10508
|
+
adjustable?: boolean | undefined;
|
|
10509
|
+
};
|
|
10510
|
+
/**
|
|
10511
|
+
* Billing interval (e.g. 'month', 'year').
|
|
10512
|
+
*/
|
|
10513
|
+
declare const PriceUnscheduledPlanInterval: {
|
|
10514
|
+
readonly OneOff: "one_off";
|
|
10515
|
+
readonly Week: "week";
|
|
10516
|
+
readonly Month: "month";
|
|
10517
|
+
readonly Quarter: "quarter";
|
|
10518
|
+
readonly SemiAnnual: "semi_annual";
|
|
10519
|
+
readonly Year: "year";
|
|
10520
|
+
};
|
|
10521
|
+
/**
|
|
10522
|
+
* Billing interval (e.g. 'month', 'year').
|
|
10523
|
+
*/
|
|
10524
|
+
type PriceUnscheduledPlanInterval = ClosedEnum<typeof PriceUnscheduledPlanInterval>;
|
|
10525
|
+
type UnscheduledPlanAdditionalCurrency = {
|
|
10526
|
+
/**
|
|
10527
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
10528
|
+
*/
|
|
10529
|
+
currency: string;
|
|
10530
|
+
/**
|
|
10531
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
10532
|
+
*/
|
|
10533
|
+
amount: number;
|
|
10534
|
+
};
|
|
10535
|
+
/**
|
|
10536
|
+
* Base price configuration for a plan.
|
|
10537
|
+
*/
|
|
10538
|
+
type UnscheduledPlanBasePrice = {
|
|
10539
|
+
/**
|
|
10540
|
+
* Base price amount for the plan.
|
|
10541
|
+
*/
|
|
10542
|
+
amount: number;
|
|
10543
|
+
/**
|
|
10544
|
+
* Billing interval (e.g. 'month', 'year').
|
|
10545
|
+
*/
|
|
10546
|
+
interval: PriceUnscheduledPlanInterval;
|
|
10547
|
+
/**
|
|
10548
|
+
* Number of intervals per billing cycle. Defaults to 1.
|
|
10549
|
+
*/
|
|
10550
|
+
intervalCount?: number | undefined;
|
|
10551
|
+
/**
|
|
10552
|
+
* Base price amounts in additional currencies. The base 'amount' is in the org's default currency.
|
|
10553
|
+
*/
|
|
10554
|
+
additionalCurrencies?: Array<UnscheduledPlanAdditionalCurrency> | undefined;
|
|
10555
|
+
};
|
|
10556
|
+
/**
|
|
10557
|
+
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
10558
|
+
*/
|
|
10559
|
+
declare const UnscheduledPlanItemResetInterval: {
|
|
10560
|
+
readonly OneOff: "one_off";
|
|
10561
|
+
readonly Minute: "minute";
|
|
10562
|
+
readonly Hour: "hour";
|
|
10563
|
+
readonly Day: "day";
|
|
10564
|
+
readonly Week: "week";
|
|
10565
|
+
readonly Month: "month";
|
|
10566
|
+
readonly Quarter: "quarter";
|
|
10567
|
+
readonly SemiAnnual: "semi_annual";
|
|
10568
|
+
readonly Year: "year";
|
|
10569
|
+
};
|
|
10570
|
+
/**
|
|
10571
|
+
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
10572
|
+
*/
|
|
10573
|
+
type UnscheduledPlanItemResetInterval = ClosedEnum<typeof UnscheduledPlanItemResetInterval>;
|
|
10574
|
+
/**
|
|
10575
|
+
* Reset configuration for consumable features. Omit for non-consumable features like seats.
|
|
10576
|
+
*/
|
|
10577
|
+
type UnscheduledPlanItemReset = {
|
|
10578
|
+
/**
|
|
10579
|
+
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
10580
|
+
*/
|
|
10581
|
+
interval: UnscheduledPlanItemResetInterval;
|
|
10582
|
+
/**
|
|
10583
|
+
* Number of intervals between resets. Defaults to 1.
|
|
10584
|
+
*/
|
|
10585
|
+
intervalCount?: number | undefined;
|
|
10586
|
+
};
|
|
10587
|
+
type UnscheduledPlanItemAdditionalCurrency = {
|
|
10588
|
+
/**
|
|
10589
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
10590
|
+
*/
|
|
10591
|
+
currency: string;
|
|
10592
|
+
/**
|
|
10593
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
10594
|
+
*/
|
|
10595
|
+
amount: number;
|
|
10596
|
+
};
|
|
10597
|
+
type UnscheduledPlanItemTierAdditionalCurrency = {
|
|
10598
|
+
currency?: any | undefined;
|
|
10599
|
+
amount?: any | undefined;
|
|
10600
|
+
flatAmount?: any | undefined;
|
|
10601
|
+
};
|
|
10602
|
+
type UnscheduledPlanItemTier = {
|
|
10603
|
+
to: number | string;
|
|
10604
|
+
amount?: number | undefined;
|
|
10605
|
+
flatAmount?: number | undefined;
|
|
10606
|
+
/**
|
|
10607
|
+
* Per-currency amounts for this tier. Tier boundaries ('to') are shared across all currencies.
|
|
10608
|
+
*/
|
|
10609
|
+
additionalCurrencies?: Array<UnscheduledPlanItemTierAdditionalCurrency> | undefined;
|
|
10610
|
+
};
|
|
10611
|
+
declare const UnscheduledPlanItemTierBehavior: {
|
|
10612
|
+
readonly Graduated: "graduated";
|
|
10613
|
+
readonly Volume: "volume";
|
|
10614
|
+
};
|
|
10615
|
+
type UnscheduledPlanItemTierBehavior = ClosedEnum<typeof UnscheduledPlanItemTierBehavior>;
|
|
10616
|
+
/**
|
|
10617
|
+
* Billing interval. For consumable features, should match reset.interval.
|
|
10618
|
+
*/
|
|
10619
|
+
declare const UnscheduledPlanItemPriceInterval: {
|
|
10620
|
+
readonly OneOff: "one_off";
|
|
10621
|
+
readonly Week: "week";
|
|
10622
|
+
readonly Month: "month";
|
|
10623
|
+
readonly Quarter: "quarter";
|
|
10624
|
+
readonly SemiAnnual: "semi_annual";
|
|
10625
|
+
readonly Year: "year";
|
|
10626
|
+
};
|
|
10627
|
+
/**
|
|
10628
|
+
* Billing interval. For consumable features, should match reset.interval.
|
|
10629
|
+
*/
|
|
10630
|
+
type UnscheduledPlanItemPriceInterval = ClosedEnum<typeof UnscheduledPlanItemPriceInterval>;
|
|
10631
|
+
/**
|
|
10632
|
+
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
10633
|
+
*/
|
|
10634
|
+
declare const UnscheduledPlanItemBillingMethod: {
|
|
10635
|
+
readonly Prepaid: "prepaid";
|
|
10636
|
+
readonly UsageBased: "usage_based";
|
|
10637
|
+
};
|
|
10638
|
+
/**
|
|
10639
|
+
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
10640
|
+
*/
|
|
10641
|
+
type UnscheduledPlanItemBillingMethod = ClosedEnum<typeof UnscheduledPlanItemBillingMethod>;
|
|
10642
|
+
/**
|
|
10643
|
+
* Pricing for usage beyond included units. Omit for free features.
|
|
10644
|
+
*/
|
|
10645
|
+
type UnscheduledPlanItemPrice = {
|
|
10646
|
+
/**
|
|
10647
|
+
* Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
|
|
10648
|
+
*/
|
|
10649
|
+
amount?: number | undefined;
|
|
10650
|
+
/**
|
|
10651
|
+
* Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.
|
|
10652
|
+
*/
|
|
10653
|
+
additionalCurrencies?: Array<UnscheduledPlanItemAdditionalCurrency> | undefined;
|
|
10654
|
+
/**
|
|
10655
|
+
* Tiered pricing. Either 'amount' or 'tiers' is required.
|
|
10656
|
+
*/
|
|
10657
|
+
tiers?: Array<UnscheduledPlanItemTier> | undefined;
|
|
10658
|
+
tierBehavior?: UnscheduledPlanItemTierBehavior | undefined;
|
|
10659
|
+
/**
|
|
10660
|
+
* Billing interval. For consumable features, should match reset.interval.
|
|
10661
|
+
*/
|
|
10662
|
+
interval: UnscheduledPlanItemPriceInterval;
|
|
10663
|
+
/**
|
|
10664
|
+
* Number of intervals per billing cycle. Defaults to 1.
|
|
10665
|
+
*/
|
|
10666
|
+
intervalCount?: number | undefined;
|
|
10667
|
+
/**
|
|
10668
|
+
* Units per price increment. Usage is rounded UP when billed (e.g. billing_units=100 means 101 rounds to 200).
|
|
10669
|
+
*/
|
|
10670
|
+
billingUnits?: number | undefined;
|
|
10671
|
+
/**
|
|
10672
|
+
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
10673
|
+
*/
|
|
10674
|
+
billingMethod: UnscheduledPlanItemBillingMethod;
|
|
10675
|
+
/**
|
|
10676
|
+
* Max units purchasable beyond included. E.g. included=100, max_purchase=300 allows 400 total. Null for no limit.
|
|
10677
|
+
*/
|
|
10678
|
+
maxPurchase?: number | null | undefined;
|
|
10679
|
+
};
|
|
10680
|
+
/**
|
|
10681
|
+
* Billing behavior when quantity increases mid-cycle.
|
|
10682
|
+
*/
|
|
10683
|
+
declare const UnscheduledPlanItemOnIncrease: {
|
|
10684
|
+
readonly BillImmediately: "bill_immediately";
|
|
10685
|
+
readonly ProrateImmediately: "prorate_immediately";
|
|
10686
|
+
readonly ProrateNextCycle: "prorate_next_cycle";
|
|
10687
|
+
readonly BillNextCycle: "bill_next_cycle";
|
|
10688
|
+
};
|
|
10689
|
+
/**
|
|
10690
|
+
* Billing behavior when quantity increases mid-cycle.
|
|
10691
|
+
*/
|
|
10692
|
+
type UnscheduledPlanItemOnIncrease = ClosedEnum<typeof UnscheduledPlanItemOnIncrease>;
|
|
10693
|
+
/**
|
|
10694
|
+
* Credit behavior when quantity decreases mid-cycle.
|
|
10695
|
+
*/
|
|
10696
|
+
declare const UnscheduledPlanItemOnDecrease: {
|
|
10697
|
+
readonly Prorate: "prorate";
|
|
10698
|
+
readonly ProrateImmediately: "prorate_immediately";
|
|
10699
|
+
readonly ProrateNextCycle: "prorate_next_cycle";
|
|
10700
|
+
readonly None: "none";
|
|
10701
|
+
readonly NoProrations: "no_prorations";
|
|
10702
|
+
};
|
|
10703
|
+
/**
|
|
10704
|
+
* Credit behavior when quantity decreases mid-cycle.
|
|
10705
|
+
*/
|
|
10706
|
+
type UnscheduledPlanItemOnDecrease = ClosedEnum<typeof UnscheduledPlanItemOnDecrease>;
|
|
10707
|
+
/**
|
|
10708
|
+
* Proration settings for prepaid features. Controls mid-cycle quantity change billing.
|
|
10709
|
+
*/
|
|
10710
|
+
type UnscheduledPlanItemProration = {
|
|
10711
|
+
/**
|
|
10712
|
+
* Billing behavior when quantity increases mid-cycle.
|
|
10713
|
+
*/
|
|
10714
|
+
onIncrease: UnscheduledPlanItemOnIncrease;
|
|
10715
|
+
/**
|
|
10716
|
+
* Credit behavior when quantity decreases mid-cycle.
|
|
10717
|
+
*/
|
|
10718
|
+
onDecrease: UnscheduledPlanItemOnDecrease;
|
|
10719
|
+
};
|
|
10720
|
+
/**
|
|
10721
|
+
* When rolled over units expire.
|
|
10722
|
+
*/
|
|
10723
|
+
declare const UnscheduledPlanItemExpiryDurationType: {
|
|
10724
|
+
readonly Month: "month";
|
|
10725
|
+
readonly Forever: "forever";
|
|
10726
|
+
};
|
|
10727
|
+
/**
|
|
10728
|
+
* When rolled over units expire.
|
|
10729
|
+
*/
|
|
10730
|
+
type UnscheduledPlanItemExpiryDurationType = ClosedEnum<typeof UnscheduledPlanItemExpiryDurationType>;
|
|
10731
|
+
/**
|
|
10732
|
+
* Rollover config for unused units. If set, unused included units carry over.
|
|
10733
|
+
*/
|
|
10734
|
+
type UnscheduledPlanItemRollover = {
|
|
10735
|
+
/**
|
|
10736
|
+
* Max rollover units. Omit for unlimited rollover.
|
|
10737
|
+
*/
|
|
10738
|
+
max?: number | undefined;
|
|
10739
|
+
/**
|
|
10740
|
+
* Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
|
|
10741
|
+
*/
|
|
10742
|
+
maxPercentage?: number | undefined;
|
|
10743
|
+
/**
|
|
10744
|
+
* When rolled over units expire.
|
|
10745
|
+
*/
|
|
10746
|
+
expiryDurationType: UnscheduledPlanItemExpiryDurationType;
|
|
10747
|
+
/**
|
|
10748
|
+
* Number of periods before expiry.
|
|
10749
|
+
*/
|
|
10750
|
+
expiryDurationLength?: number | undefined;
|
|
10751
|
+
};
|
|
10752
|
+
/**
|
|
10753
|
+
* Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
|
|
10754
|
+
*/
|
|
10755
|
+
type UnscheduledPlanItemPlanItem = {
|
|
10756
|
+
/**
|
|
10757
|
+
* The ID of the feature to configure.
|
|
10758
|
+
*/
|
|
10759
|
+
featureId: string;
|
|
10760
|
+
/**
|
|
10761
|
+
* Number of free units included. Balance resets to this each interval for consumable features.
|
|
10762
|
+
*/
|
|
10763
|
+
included?: number | undefined;
|
|
10764
|
+
/**
|
|
10765
|
+
* If true, customer has unlimited access to this feature.
|
|
10766
|
+
*/
|
|
10767
|
+
unlimited?: boolean | undefined;
|
|
10768
|
+
/**
|
|
10769
|
+
* Whether entity-level grants contribute to a shared customer balance.
|
|
10770
|
+
*/
|
|
10771
|
+
pooled?: boolean | undefined;
|
|
10772
|
+
/**
|
|
10773
|
+
* Reset configuration for consumable features. Omit for non-consumable features like seats.
|
|
10774
|
+
*/
|
|
10775
|
+
reset?: UnscheduledPlanItemReset | undefined;
|
|
10776
|
+
/**
|
|
10777
|
+
* Pricing for usage beyond included units. Omit for free features.
|
|
10778
|
+
*/
|
|
10779
|
+
price?: UnscheduledPlanItemPrice | undefined;
|
|
10780
|
+
/**
|
|
10781
|
+
* Proration settings for prepaid features. Controls mid-cycle quantity change billing.
|
|
10782
|
+
*/
|
|
10783
|
+
proration?: UnscheduledPlanItemProration | undefined;
|
|
10784
|
+
/**
|
|
10785
|
+
* Rollover config for unused units. If set, unused included units carry over.
|
|
10786
|
+
*/
|
|
10787
|
+
rollover?: UnscheduledPlanItemRollover | undefined;
|
|
10788
|
+
};
|
|
10789
|
+
/**
|
|
10790
|
+
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
10791
|
+
*/
|
|
10792
|
+
declare const UnscheduledPlanAddItemResetInterval: {
|
|
10793
|
+
readonly OneOff: "one_off";
|
|
10794
|
+
readonly Minute: "minute";
|
|
10795
|
+
readonly Hour: "hour";
|
|
10796
|
+
readonly Day: "day";
|
|
10797
|
+
readonly Week: "week";
|
|
10798
|
+
readonly Month: "month";
|
|
10799
|
+
readonly Quarter: "quarter";
|
|
10800
|
+
readonly SemiAnnual: "semi_annual";
|
|
10801
|
+
readonly Year: "year";
|
|
10802
|
+
};
|
|
10803
|
+
/**
|
|
10804
|
+
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
10805
|
+
*/
|
|
10806
|
+
type UnscheduledPlanAddItemResetInterval = ClosedEnum<typeof UnscheduledPlanAddItemResetInterval>;
|
|
10807
|
+
/**
|
|
10808
|
+
* Reset configuration for consumable features. Omit for non-consumable features like seats.
|
|
10809
|
+
*/
|
|
10810
|
+
type UnscheduledPlanAddItemReset = {
|
|
10811
|
+
/**
|
|
10812
|
+
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
10813
|
+
*/
|
|
10814
|
+
interval: UnscheduledPlanAddItemResetInterval;
|
|
10815
|
+
/**
|
|
10816
|
+
* Number of intervals between resets. Defaults to 1.
|
|
10817
|
+
*/
|
|
10818
|
+
intervalCount?: number | undefined;
|
|
10819
|
+
};
|
|
10820
|
+
type UnscheduledPlanAddItemAdditionalCurrency = {
|
|
10821
|
+
/**
|
|
10822
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
10823
|
+
*/
|
|
10824
|
+
currency: string;
|
|
10825
|
+
/**
|
|
10826
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
10827
|
+
*/
|
|
10828
|
+
amount: number;
|
|
10829
|
+
};
|
|
10830
|
+
type UnscheduledPlanAddItemTierAdditionalCurrency = {
|
|
10831
|
+
currency?: any | undefined;
|
|
10832
|
+
amount?: any | undefined;
|
|
10833
|
+
flatAmount?: any | undefined;
|
|
10834
|
+
};
|
|
10835
|
+
type UnscheduledPlanAddItemTier = {
|
|
10836
|
+
to: number | string;
|
|
10837
|
+
amount?: number | undefined;
|
|
10838
|
+
flatAmount?: number | undefined;
|
|
10839
|
+
/**
|
|
10840
|
+
* Per-currency amounts for this tier. Tier boundaries ('to') are shared across all currencies.
|
|
10841
|
+
*/
|
|
10842
|
+
additionalCurrencies?: Array<UnscheduledPlanAddItemTierAdditionalCurrency> | undefined;
|
|
10843
|
+
};
|
|
10844
|
+
declare const UnscheduledPlanAddItemTierBehavior: {
|
|
10845
|
+
readonly Graduated: "graduated";
|
|
10846
|
+
readonly Volume: "volume";
|
|
10847
|
+
};
|
|
10848
|
+
type UnscheduledPlanAddItemTierBehavior = ClosedEnum<typeof UnscheduledPlanAddItemTierBehavior>;
|
|
10849
|
+
/**
|
|
10850
|
+
* Billing interval. For consumable features, should match reset.interval.
|
|
10851
|
+
*/
|
|
10852
|
+
declare const UnscheduledPlanAddItemPriceInterval: {
|
|
10853
|
+
readonly OneOff: "one_off";
|
|
10854
|
+
readonly Week: "week";
|
|
10855
|
+
readonly Month: "month";
|
|
10856
|
+
readonly Quarter: "quarter";
|
|
10857
|
+
readonly SemiAnnual: "semi_annual";
|
|
10858
|
+
readonly Year: "year";
|
|
10859
|
+
};
|
|
10860
|
+
/**
|
|
10861
|
+
* Billing interval. For consumable features, should match reset.interval.
|
|
10862
|
+
*/
|
|
10863
|
+
type UnscheduledPlanAddItemPriceInterval = ClosedEnum<typeof UnscheduledPlanAddItemPriceInterval>;
|
|
10864
|
+
/**
|
|
10865
|
+
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
10866
|
+
*/
|
|
10867
|
+
declare const UnscheduledPlanAddItemBillingMethod: {
|
|
10868
|
+
readonly Prepaid: "prepaid";
|
|
10869
|
+
readonly UsageBased: "usage_based";
|
|
10870
|
+
};
|
|
10871
|
+
/**
|
|
10872
|
+
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
10873
|
+
*/
|
|
10874
|
+
type UnscheduledPlanAddItemBillingMethod = ClosedEnum<typeof UnscheduledPlanAddItemBillingMethod>;
|
|
10875
|
+
/**
|
|
10876
|
+
* Pricing for usage beyond included units. Omit for free features.
|
|
10877
|
+
*/
|
|
10878
|
+
type UnscheduledPlanAddItemPrice = {
|
|
10879
|
+
/**
|
|
10880
|
+
* Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
|
|
10881
|
+
*/
|
|
10882
|
+
amount?: number | undefined;
|
|
10883
|
+
/**
|
|
10884
|
+
* Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.
|
|
10885
|
+
*/
|
|
10886
|
+
additionalCurrencies?: Array<UnscheduledPlanAddItemAdditionalCurrency> | undefined;
|
|
10887
|
+
/**
|
|
10888
|
+
* Tiered pricing. Either 'amount' or 'tiers' is required.
|
|
10889
|
+
*/
|
|
10890
|
+
tiers?: Array<UnscheduledPlanAddItemTier> | undefined;
|
|
10891
|
+
tierBehavior?: UnscheduledPlanAddItemTierBehavior | undefined;
|
|
10892
|
+
/**
|
|
10893
|
+
* Billing interval. For consumable features, should match reset.interval.
|
|
10894
|
+
*/
|
|
10895
|
+
interval: UnscheduledPlanAddItemPriceInterval;
|
|
10896
|
+
/**
|
|
10897
|
+
* Number of intervals per billing cycle. Defaults to 1.
|
|
10898
|
+
*/
|
|
10899
|
+
intervalCount?: number | undefined;
|
|
10900
|
+
/**
|
|
10901
|
+
* Units per price increment. Usage is rounded UP when billed (e.g. billing_units=100 means 101 rounds to 200).
|
|
10902
|
+
*/
|
|
10903
|
+
billingUnits?: number | undefined;
|
|
10904
|
+
/**
|
|
10905
|
+
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
10906
|
+
*/
|
|
10907
|
+
billingMethod: UnscheduledPlanAddItemBillingMethod;
|
|
10908
|
+
/**
|
|
10909
|
+
* Max units purchasable beyond included. E.g. included=100, max_purchase=300 allows 400 total. Null for no limit.
|
|
10910
|
+
*/
|
|
10911
|
+
maxPurchase?: number | null | undefined;
|
|
10912
|
+
};
|
|
10913
|
+
/**
|
|
10914
|
+
* Billing behavior when quantity increases mid-cycle.
|
|
10915
|
+
*/
|
|
10916
|
+
declare const UnscheduledPlanAddItemOnIncrease: {
|
|
10917
|
+
readonly BillImmediately: "bill_immediately";
|
|
10918
|
+
readonly ProrateImmediately: "prorate_immediately";
|
|
10919
|
+
readonly ProrateNextCycle: "prorate_next_cycle";
|
|
10920
|
+
readonly BillNextCycle: "bill_next_cycle";
|
|
10921
|
+
};
|
|
10922
|
+
/**
|
|
10923
|
+
* Billing behavior when quantity increases mid-cycle.
|
|
10924
|
+
*/
|
|
10925
|
+
type UnscheduledPlanAddItemOnIncrease = ClosedEnum<typeof UnscheduledPlanAddItemOnIncrease>;
|
|
10926
|
+
/**
|
|
10927
|
+
* Credit behavior when quantity decreases mid-cycle.
|
|
10928
|
+
*/
|
|
10929
|
+
declare const UnscheduledPlanAddItemOnDecrease: {
|
|
10930
|
+
readonly Prorate: "prorate";
|
|
10931
|
+
readonly ProrateImmediately: "prorate_immediately";
|
|
10932
|
+
readonly ProrateNextCycle: "prorate_next_cycle";
|
|
10933
|
+
readonly None: "none";
|
|
10934
|
+
readonly NoProrations: "no_prorations";
|
|
10935
|
+
};
|
|
10936
|
+
/**
|
|
10937
|
+
* Credit behavior when quantity decreases mid-cycle.
|
|
10938
|
+
*/
|
|
10939
|
+
type UnscheduledPlanAddItemOnDecrease = ClosedEnum<typeof UnscheduledPlanAddItemOnDecrease>;
|
|
10940
|
+
/**
|
|
10941
|
+
* Proration settings for prepaid features. Controls mid-cycle quantity change billing.
|
|
10942
|
+
*/
|
|
10943
|
+
type UnscheduledPlanAddItemProration = {
|
|
10944
|
+
/**
|
|
10945
|
+
* Billing behavior when quantity increases mid-cycle.
|
|
10946
|
+
*/
|
|
10947
|
+
onIncrease: UnscheduledPlanAddItemOnIncrease;
|
|
10948
|
+
/**
|
|
10949
|
+
* Credit behavior when quantity decreases mid-cycle.
|
|
10950
|
+
*/
|
|
10951
|
+
onDecrease: UnscheduledPlanAddItemOnDecrease;
|
|
10952
|
+
};
|
|
10953
|
+
/**
|
|
10954
|
+
* When rolled over units expire.
|
|
10955
|
+
*/
|
|
10956
|
+
declare const UnscheduledPlanAddItemExpiryDurationType: {
|
|
10957
|
+
readonly Month: "month";
|
|
10958
|
+
readonly Forever: "forever";
|
|
10959
|
+
};
|
|
10960
|
+
/**
|
|
10961
|
+
* When rolled over units expire.
|
|
10962
|
+
*/
|
|
10963
|
+
type UnscheduledPlanAddItemExpiryDurationType = ClosedEnum<typeof UnscheduledPlanAddItemExpiryDurationType>;
|
|
10964
|
+
/**
|
|
10965
|
+
* Rollover config for unused units. If set, unused included units carry over.
|
|
10966
|
+
*/
|
|
10967
|
+
type UnscheduledPlanAddItemRollover = {
|
|
10968
|
+
/**
|
|
10969
|
+
* Max rollover units. Omit for unlimited rollover.
|
|
10970
|
+
*/
|
|
10971
|
+
max?: number | undefined;
|
|
10972
|
+
/**
|
|
10973
|
+
* Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
|
|
10974
|
+
*/
|
|
10975
|
+
maxPercentage?: number | undefined;
|
|
10976
|
+
/**
|
|
10977
|
+
* When rolled over units expire.
|
|
10978
|
+
*/
|
|
10979
|
+
expiryDurationType: UnscheduledPlanAddItemExpiryDurationType;
|
|
10980
|
+
/**
|
|
10981
|
+
* Number of periods before expiry.
|
|
10982
|
+
*/
|
|
10983
|
+
expiryDurationLength?: number | undefined;
|
|
10984
|
+
};
|
|
10985
|
+
/**
|
|
10986
|
+
* Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
|
|
10987
|
+
*/
|
|
10988
|
+
type UnscheduledPlanAddItemPlanItem = {
|
|
10989
|
+
/**
|
|
10990
|
+
* The ID of the feature to configure.
|
|
10991
|
+
*/
|
|
10992
|
+
featureId: string;
|
|
10993
|
+
/**
|
|
10994
|
+
* Number of free units included. Balance resets to this each interval for consumable features.
|
|
10995
|
+
*/
|
|
10996
|
+
included?: number | undefined;
|
|
10997
|
+
/**
|
|
10998
|
+
* If true, customer has unlimited access to this feature.
|
|
10999
|
+
*/
|
|
11000
|
+
unlimited?: boolean | undefined;
|
|
11001
|
+
/**
|
|
11002
|
+
* Whether entity-level grants contribute to a shared customer balance.
|
|
11003
|
+
*/
|
|
11004
|
+
pooled?: boolean | undefined;
|
|
11005
|
+
/**
|
|
11006
|
+
* Reset configuration for consumable features. Omit for non-consumable features like seats.
|
|
11007
|
+
*/
|
|
11008
|
+
reset?: UnscheduledPlanAddItemReset | undefined;
|
|
11009
|
+
/**
|
|
11010
|
+
* Pricing for usage beyond included units. Omit for free features.
|
|
11011
|
+
*/
|
|
11012
|
+
price?: UnscheduledPlanAddItemPrice | undefined;
|
|
11013
|
+
/**
|
|
11014
|
+
* Proration settings for prepaid features. Controls mid-cycle quantity change billing.
|
|
11015
|
+
*/
|
|
11016
|
+
proration?: UnscheduledPlanAddItemProration | undefined;
|
|
11017
|
+
/**
|
|
11018
|
+
* Rollover config for unused units. If set, unused included units carry over.
|
|
11019
|
+
*/
|
|
11020
|
+
rollover?: UnscheduledPlanAddItemRollover | undefined;
|
|
11021
|
+
};
|
|
11022
|
+
/**
|
|
11023
|
+
* Match items with this billing method (prepaid or usage_based).
|
|
11024
|
+
*/
|
|
11025
|
+
declare const UnscheduledPlanRemoveItemBillingMethod: {
|
|
11026
|
+
readonly Prepaid: "prepaid";
|
|
11027
|
+
readonly UsageBased: "usage_based";
|
|
11028
|
+
};
|
|
11029
|
+
/**
|
|
11030
|
+
* Match items with this billing method (prepaid or usage_based).
|
|
11031
|
+
*/
|
|
11032
|
+
type UnscheduledPlanRemoveItemBillingMethod = ClosedEnum<typeof UnscheduledPlanRemoveItemBillingMethod>;
|
|
11033
|
+
declare const IntervalUnscheduledPlanRemoveItemEnum2: {
|
|
11034
|
+
readonly OneOff: "one_off";
|
|
11035
|
+
readonly Minute: "minute";
|
|
11036
|
+
readonly Hour: "hour";
|
|
11037
|
+
readonly Day: "day";
|
|
11038
|
+
readonly Week: "week";
|
|
11039
|
+
readonly Month: "month";
|
|
11040
|
+
readonly Quarter: "quarter";
|
|
11041
|
+
readonly SemiAnnual: "semi_annual";
|
|
11042
|
+
readonly Year: "year";
|
|
11043
|
+
};
|
|
11044
|
+
type IntervalUnscheduledPlanRemoveItemEnum2 = ClosedEnum<typeof IntervalUnscheduledPlanRemoveItemEnum2>;
|
|
11045
|
+
declare const IntervalUnscheduledPlanRemoveItemEnum1: {
|
|
11046
|
+
readonly OneOff: "one_off";
|
|
11047
|
+
readonly Week: "week";
|
|
11048
|
+
readonly Month: "month";
|
|
11049
|
+
readonly Quarter: "quarter";
|
|
11050
|
+
readonly SemiAnnual: "semi_annual";
|
|
11051
|
+
readonly Year: "year";
|
|
11052
|
+
};
|
|
11053
|
+
type IntervalUnscheduledPlanRemoveItemEnum1 = ClosedEnum<typeof IntervalUnscheduledPlanRemoveItemEnum1>;
|
|
11054
|
+
/**
|
|
11055
|
+
* Filter for matching plan items. All provided fields must match (AND).
|
|
11056
|
+
*/
|
|
11057
|
+
type UnscheduledPlanPlanItemFilter = {
|
|
11058
|
+
/**
|
|
11059
|
+
* Match items linked to this feature.
|
|
11060
|
+
*/
|
|
11061
|
+
featureId?: string | undefined;
|
|
11062
|
+
/**
|
|
11063
|
+
* Match items with this billing method (prepaid or usage_based).
|
|
11064
|
+
*/
|
|
11065
|
+
billingMethod?: UnscheduledPlanRemoveItemBillingMethod | undefined;
|
|
11066
|
+
/**
|
|
11067
|
+
* Match items with this interval. Accepts either a BillingInterval (price-side) or a ResetInterval (reset-side, includes day/hour/minute) so price-less items keyed by reset.interval can be disambiguated.
|
|
11068
|
+
*/
|
|
11069
|
+
interval?: IntervalUnscheduledPlanRemoveItemEnum1 | IntervalUnscheduledPlanRemoveItemEnum2 | undefined;
|
|
11070
|
+
/**
|
|
11071
|
+
* Match items with this interval_count. Disambiguates between items that share an interval but differ in count.
|
|
11072
|
+
*/
|
|
11073
|
+
intervalCount?: number | undefined;
|
|
11074
|
+
};
|
|
11075
|
+
/**
|
|
11076
|
+
* The time interval for the purchase limit window.
|
|
11077
|
+
*/
|
|
11078
|
+
declare const UnscheduledPlanPurchaseLimitInterval: {
|
|
11079
|
+
readonly Hour: "hour";
|
|
11080
|
+
readonly Day: "day";
|
|
11081
|
+
readonly Week: "week";
|
|
11082
|
+
readonly Month: "month";
|
|
11083
|
+
};
|
|
11084
|
+
/**
|
|
11085
|
+
* The time interval for the purchase limit window.
|
|
11086
|
+
*/
|
|
11087
|
+
type UnscheduledPlanPurchaseLimitInterval = ClosedEnum<typeof UnscheduledPlanPurchaseLimitInterval>;
|
|
11088
|
+
/**
|
|
11089
|
+
* Optional rate limit to cap how often auto top-ups occur. Pass count to set the current window's consumed top-ups.
|
|
11090
|
+
*/
|
|
11091
|
+
type UnscheduledPlanPurchaseLimit = {
|
|
11092
|
+
/**
|
|
11093
|
+
* The time interval for the purchase limit window.
|
|
11094
|
+
*/
|
|
11095
|
+
interval: UnscheduledPlanPurchaseLimitInterval;
|
|
11096
|
+
/**
|
|
11097
|
+
* Number of intervals in the purchase limit window.
|
|
11098
|
+
*/
|
|
11099
|
+
intervalCount?: number | undefined;
|
|
11100
|
+
/**
|
|
11101
|
+
* Maximum number of auto top-ups allowed within the interval.
|
|
11102
|
+
*/
|
|
11103
|
+
limit: number;
|
|
11104
|
+
/**
|
|
11105
|
+
* Set the current window's consumed auto top-up count. Omit to leave runtime state unchanged.
|
|
11106
|
+
*/
|
|
11107
|
+
count?: number | undefined;
|
|
11108
|
+
};
|
|
11109
|
+
type UnscheduledPlanAutoTopup = {
|
|
11110
|
+
/**
|
|
11111
|
+
* The ID of the feature (credit balance) to auto top-up.
|
|
11112
|
+
*/
|
|
11113
|
+
featureId: string;
|
|
11114
|
+
/**
|
|
11115
|
+
* Whether auto top-up is enabled.
|
|
11116
|
+
*/
|
|
11117
|
+
enabled?: boolean | undefined;
|
|
11118
|
+
/**
|
|
11119
|
+
* When the balance drops below this threshold, an auto top-up will be purchased.
|
|
11120
|
+
*/
|
|
11121
|
+
threshold: number;
|
|
11122
|
+
/**
|
|
11123
|
+
* Amount of credits to add per auto top-up.
|
|
11124
|
+
*/
|
|
11125
|
+
quantity: number;
|
|
11126
|
+
/**
|
|
11127
|
+
* Optional rate limit to cap how often auto top-ups occur. Pass count to set the current window's consumed top-ups.
|
|
11128
|
+
*/
|
|
11129
|
+
purchaseLimit?: UnscheduledPlanPurchaseLimit | undefined;
|
|
11130
|
+
/**
|
|
11131
|
+
* When true, auto top-up creates a send_invoice invoice instead of auto-charging.
|
|
11132
|
+
*/
|
|
11133
|
+
invoiceMode?: boolean | undefined;
|
|
11134
|
+
};
|
|
11135
|
+
/**
|
|
11136
|
+
* How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
|
|
11137
|
+
*/
|
|
11138
|
+
declare const UnscheduledPlanLimitType: {
|
|
11139
|
+
readonly Absolute: "absolute";
|
|
11140
|
+
readonly UsagePercentage: "usage_percentage";
|
|
11141
|
+
};
|
|
11142
|
+
/**
|
|
11143
|
+
* How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
|
|
11144
|
+
*/
|
|
11145
|
+
type UnscheduledPlanLimitType = ClosedEnum<typeof UnscheduledPlanLimitType>;
|
|
11146
|
+
type UnscheduledPlanSpendLimit = {
|
|
11147
|
+
/**
|
|
11148
|
+
* Optional feature ID this spend limit applies to.
|
|
11149
|
+
*/
|
|
11150
|
+
featureId?: string | undefined;
|
|
11151
|
+
/**
|
|
11152
|
+
* Whether the overage spend limit is enabled.
|
|
11153
|
+
*/
|
|
11154
|
+
enabled?: boolean | undefined;
|
|
11155
|
+
/**
|
|
11156
|
+
* How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
|
|
11157
|
+
*/
|
|
11158
|
+
limitType?: UnscheduledPlanLimitType | undefined;
|
|
11159
|
+
/**
|
|
11160
|
+
* Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit_type is usage_percentage.
|
|
11161
|
+
*/
|
|
11162
|
+
overageLimit?: number | undefined;
|
|
11163
|
+
/**
|
|
11164
|
+
* When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
|
|
11165
|
+
*/
|
|
11166
|
+
skipOverageBilling?: boolean | undefined;
|
|
11167
|
+
};
|
|
11168
|
+
/**
|
|
11169
|
+
* Interval for the cap, aligned to the customer's billing cycle.
|
|
11170
|
+
*/
|
|
11171
|
+
declare const UnscheduledPlanUsageLimitInterval: {
|
|
11172
|
+
readonly Day: "day";
|
|
11173
|
+
readonly Week: "week";
|
|
11174
|
+
readonly Month: "month";
|
|
11175
|
+
readonly Year: "year";
|
|
11176
|
+
};
|
|
11177
|
+
/**
|
|
11178
|
+
* Interval for the cap, aligned to the customer's billing cycle.
|
|
11179
|
+
*/
|
|
11180
|
+
type UnscheduledPlanUsageLimitInterval = ClosedEnum<typeof UnscheduledPlanUsageLimitInterval>;
|
|
11181
|
+
/**
|
|
11182
|
+
* When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
|
|
11183
|
+
*/
|
|
11184
|
+
type UnscheduledPlanFilter = {
|
|
11185
|
+
properties: {
|
|
11186
|
+
[k: string]: string | number | boolean;
|
|
11187
|
+
};
|
|
11188
|
+
};
|
|
11189
|
+
type UnscheduledPlanUsageLimit = {
|
|
11190
|
+
/**
|
|
11191
|
+
* The feature this usage limit applies to.
|
|
11192
|
+
*/
|
|
11193
|
+
featureId: string;
|
|
11194
|
+
/**
|
|
11195
|
+
* Whether this usage limit is enabled.
|
|
11196
|
+
*/
|
|
11197
|
+
enabled?: boolean | undefined;
|
|
11198
|
+
/**
|
|
11199
|
+
* Maximum units allowed per interval.
|
|
11200
|
+
*/
|
|
11201
|
+
limit: number;
|
|
11202
|
+
/**
|
|
11203
|
+
* Interval for the cap, aligned to the customer's billing cycle.
|
|
11204
|
+
*/
|
|
11205
|
+
interval: UnscheduledPlanUsageLimitInterval;
|
|
11206
|
+
/**
|
|
11207
|
+
* When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
|
|
11208
|
+
*/
|
|
11209
|
+
filter?: UnscheduledPlanFilter | undefined;
|
|
11210
|
+
};
|
|
11211
|
+
/**
|
|
11212
|
+
* Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
|
|
11213
|
+
*/
|
|
11214
|
+
declare const UnscheduledPlanThresholdType: {
|
|
11215
|
+
readonly Usage: "usage";
|
|
11216
|
+
readonly UsagePercentage: "usage_percentage";
|
|
11217
|
+
readonly Remaining: "remaining";
|
|
11218
|
+
readonly RemainingPercentage: "remaining_percentage";
|
|
11219
|
+
};
|
|
11220
|
+
/**
|
|
11221
|
+
* Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
|
|
11222
|
+
*/
|
|
11223
|
+
type UnscheduledPlanThresholdType = ClosedEnum<typeof UnscheduledPlanThresholdType>;
|
|
11224
|
+
type UnscheduledPlanUsageAlert = {
|
|
11225
|
+
/**
|
|
11226
|
+
* The feature ID this alert applies to.
|
|
11227
|
+
*/
|
|
11228
|
+
featureId?: string | undefined;
|
|
11229
|
+
/**
|
|
11230
|
+
* Whether this usage alert is enabled.
|
|
11231
|
+
*/
|
|
11232
|
+
enabled?: boolean | undefined;
|
|
11233
|
+
/**
|
|
11234
|
+
* The threshold value that triggers the alert. For usage or remaining, this is an absolute count. For usage_percentage or remaining_percentage, this is a percentage (0-100).
|
|
11235
|
+
*/
|
|
11236
|
+
threshold: number;
|
|
11237
|
+
/**
|
|
11238
|
+
* Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
|
|
11239
|
+
*/
|
|
11240
|
+
thresholdType: UnscheduledPlanThresholdType;
|
|
11241
|
+
/**
|
|
11242
|
+
* Optional user-defined label to distinguish multiple alerts on the same feature.
|
|
11243
|
+
*/
|
|
11244
|
+
name?: string | undefined;
|
|
11245
|
+
};
|
|
11246
|
+
type UnscheduledPlanOverageAllowed = {
|
|
11247
|
+
/**
|
|
11248
|
+
* The feature ID this overage allowed control applies to.
|
|
11249
|
+
*/
|
|
11250
|
+
featureId: string;
|
|
11251
|
+
/**
|
|
11252
|
+
* Whether overage is allowed for this feature.
|
|
11253
|
+
*/
|
|
11254
|
+
enabled?: boolean | undefined;
|
|
11255
|
+
};
|
|
11256
|
+
/**
|
|
11257
|
+
* Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
|
|
11258
|
+
*/
|
|
11259
|
+
type UnscheduledPlanBillingControls = {
|
|
11260
|
+
/**
|
|
11261
|
+
* List of auto top-up configurations per feature.
|
|
11262
|
+
*/
|
|
11263
|
+
autoTopups?: Array<UnscheduledPlanAutoTopup> | undefined;
|
|
11264
|
+
/**
|
|
11265
|
+
* List of overage spend limits per feature (caps overage spend).
|
|
11266
|
+
*/
|
|
11267
|
+
spendLimits?: Array<UnscheduledPlanSpendLimit> | undefined;
|
|
11268
|
+
/**
|
|
11269
|
+
* List of hard usage caps per feature (max units per interval).
|
|
11270
|
+
*/
|
|
11271
|
+
usageLimits?: Array<UnscheduledPlanUsageLimit> | undefined;
|
|
11272
|
+
/**
|
|
11273
|
+
* List of usage alert configurations per feature.
|
|
11274
|
+
*/
|
|
11275
|
+
usageAlerts?: Array<UnscheduledPlanUsageAlert> | undefined;
|
|
11276
|
+
/**
|
|
11277
|
+
* List of overage allowed controls per feature. When enabled, usage can exceed balance.
|
|
11278
|
+
*/
|
|
11279
|
+
overageAllowed?: Array<UnscheduledPlanOverageAllowed> | undefined;
|
|
11280
|
+
};
|
|
11281
|
+
/**
|
|
11282
|
+
* Customize the plan to schedule. Can override price, replace items, or patch items with add_items and remove_items.
|
|
11283
|
+
*/
|
|
11284
|
+
type UnscheduledPlanCustomize = {
|
|
11285
|
+
/**
|
|
11286
|
+
* Override the base price of the plan. Pass null to remove the base price.
|
|
11287
|
+
*/
|
|
11288
|
+
price?: UnscheduledPlanBasePrice | null | undefined;
|
|
11289
|
+
/**
|
|
11290
|
+
* Override the items in the plan (PUT-style — replaces all existing items). Mutually exclusive with add_items / remove_items / deprecated update_items.
|
|
11291
|
+
*/
|
|
11292
|
+
items?: Array<UnscheduledPlanItemPlanItem> | undefined;
|
|
11293
|
+
/**
|
|
11294
|
+
* Items to add to the plan.
|
|
11295
|
+
*/
|
|
11296
|
+
addItems?: Array<UnscheduledPlanAddItemPlanItem> | undefined;
|
|
11297
|
+
/**
|
|
11298
|
+
* Filters selecting items to remove from the plan.
|
|
11299
|
+
*/
|
|
11300
|
+
removeItems?: Array<UnscheduledPlanPlanItemFilter> | undefined;
|
|
11301
|
+
/**
|
|
11302
|
+
* Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
|
|
11303
|
+
*/
|
|
11304
|
+
billingControls?: UnscheduledPlanBillingControls | undefined;
|
|
11305
|
+
};
|
|
11306
|
+
type UnscheduledPlan = {
|
|
11307
|
+
/**
|
|
11308
|
+
* The ID of the plan to schedule in this phase.
|
|
11309
|
+
*/
|
|
11310
|
+
planId: string;
|
|
11311
|
+
/**
|
|
11312
|
+
* The immediate plan scope. Omit to inherit the request entity, pass null for customer-level, or pass an entity ID.
|
|
11313
|
+
*/
|
|
11314
|
+
entityId?: string | null | undefined;
|
|
11315
|
+
/**
|
|
11316
|
+
* Optional prepaid feature quantities for this phase's plan.
|
|
11317
|
+
*/
|
|
11318
|
+
featureQuantities?: Array<UnscheduledPlanFeatureQuantity> | undefined;
|
|
11319
|
+
/**
|
|
11320
|
+
* Optional explicit plan version to schedule.
|
|
11321
|
+
*/
|
|
11322
|
+
version?: number | undefined;
|
|
11323
|
+
/**
|
|
11324
|
+
* Customize the plan to schedule. Can override price, replace items, or patch items with add_items and remove_items.
|
|
11325
|
+
*/
|
|
11326
|
+
customize?: UnscheduledPlanCustomize | undefined;
|
|
11327
|
+
/**
|
|
11328
|
+
* A unique ID to identify this subscription. Useful when scheduling the same plan multiple times.
|
|
11329
|
+
*/
|
|
11330
|
+
subscriptionId?: string | undefined;
|
|
11331
|
+
};
|
|
10489
11332
|
/**
|
|
10490
11333
|
* The duration unit to offset this phase from the prior phase.
|
|
10491
11334
|
*/
|
|
@@ -10513,7 +11356,7 @@ type StartingAfter2 = {
|
|
|
10513
11356
|
/**
|
|
10514
11357
|
* Quantity configuration for a prepaid feature.
|
|
10515
11358
|
*/
|
|
10516
|
-
type
|
|
11359
|
+
type PhaseStartFeatureQuantity = {
|
|
10517
11360
|
/**
|
|
10518
11361
|
* The ID of the feature to set quantity for.
|
|
10519
11362
|
*/
|
|
@@ -10530,7 +11373,7 @@ type CreateScheduleFeatureQuantity2 = {
|
|
|
10530
11373
|
/**
|
|
10531
11374
|
* Billing interval (e.g. 'month', 'year').
|
|
10532
11375
|
*/
|
|
10533
|
-
declare const
|
|
11376
|
+
declare const PhaseStartPriceInterval: {
|
|
10534
11377
|
readonly OneOff: "one_off";
|
|
10535
11378
|
readonly Week: "week";
|
|
10536
11379
|
readonly Month: "month";
|
|
@@ -10541,8 +11384,8 @@ declare const CreateSchedulePriceInterval2: {
|
|
|
10541
11384
|
/**
|
|
10542
11385
|
* Billing interval (e.g. 'month', 'year').
|
|
10543
11386
|
*/
|
|
10544
|
-
type
|
|
10545
|
-
type
|
|
11387
|
+
type PhaseStartPriceInterval = ClosedEnum<typeof PhaseStartPriceInterval>;
|
|
11388
|
+
type PhaseStartAdditionalCurrency = {
|
|
10546
11389
|
/**
|
|
10547
11390
|
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
10548
11391
|
*/
|
|
@@ -10555,7 +11398,7 @@ type CreateScheduleAdditionalCurrency2 = {
|
|
|
10555
11398
|
/**
|
|
10556
11399
|
* Base price configuration for a plan.
|
|
10557
11400
|
*/
|
|
10558
|
-
type
|
|
11401
|
+
type PhaseStartBasePrice = {
|
|
10559
11402
|
/**
|
|
10560
11403
|
* Base price amount for the plan.
|
|
10561
11404
|
*/
|
|
@@ -10563,7 +11406,7 @@ type CreateScheduleBasePrice2 = {
|
|
|
10563
11406
|
/**
|
|
10564
11407
|
* Billing interval (e.g. 'month', 'year').
|
|
10565
11408
|
*/
|
|
10566
|
-
interval:
|
|
11409
|
+
interval: PhaseStartPriceInterval;
|
|
10567
11410
|
/**
|
|
10568
11411
|
* Number of intervals per billing cycle. Defaults to 1.
|
|
10569
11412
|
*/
|
|
@@ -10571,12 +11414,12 @@ type CreateScheduleBasePrice2 = {
|
|
|
10571
11414
|
/**
|
|
10572
11415
|
* Base price amounts in additional currencies. The base 'amount' is in the org's default currency.
|
|
10573
11416
|
*/
|
|
10574
|
-
additionalCurrencies?: Array<
|
|
11417
|
+
additionalCurrencies?: Array<PhaseStartAdditionalCurrency> | undefined;
|
|
10575
11418
|
};
|
|
10576
11419
|
/**
|
|
10577
11420
|
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
10578
11421
|
*/
|
|
10579
|
-
declare const
|
|
11422
|
+
declare const PhaseStartItemResetInterval: {
|
|
10580
11423
|
readonly OneOff: "one_off";
|
|
10581
11424
|
readonly Minute: "minute";
|
|
10582
11425
|
readonly Hour: "hour";
|
|
@@ -10590,39 +11433,39 @@ declare const CreateScheduleItemResetInterval2: {
|
|
|
10590
11433
|
/**
|
|
10591
11434
|
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
10592
11435
|
*/
|
|
10593
|
-
type
|
|
11436
|
+
type PhaseStartItemResetInterval = ClosedEnum<typeof PhaseStartItemResetInterval>;
|
|
10594
11437
|
/**
|
|
10595
11438
|
* Reset configuration for consumable features. Omit for non-consumable features like seats.
|
|
10596
11439
|
*/
|
|
10597
|
-
type
|
|
11440
|
+
type PhaseStartItemReset = {
|
|
10598
11441
|
/**
|
|
10599
11442
|
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
10600
11443
|
*/
|
|
10601
|
-
interval:
|
|
11444
|
+
interval: PhaseStartItemResetInterval;
|
|
10602
11445
|
/**
|
|
10603
11446
|
* Number of intervals between resets. Defaults to 1.
|
|
10604
11447
|
*/
|
|
10605
11448
|
intervalCount?: number | undefined;
|
|
10606
11449
|
};
|
|
10607
|
-
type
|
|
11450
|
+
type PhaseStartItemAdditionalCurrency = {
|
|
10608
11451
|
currency?: any | undefined;
|
|
10609
11452
|
amount?: any | undefined;
|
|
10610
11453
|
};
|
|
10611
|
-
type
|
|
11454
|
+
type PhaseStartItemTier = {
|
|
10612
11455
|
to?: any | undefined;
|
|
10613
11456
|
amount?: any | undefined;
|
|
10614
11457
|
flatAmount?: any | undefined;
|
|
10615
11458
|
additionalCurrencies?: any | undefined;
|
|
10616
11459
|
};
|
|
10617
|
-
declare const
|
|
11460
|
+
declare const PhaseStartItemTierBehavior: {
|
|
10618
11461
|
readonly Graduated: "graduated";
|
|
10619
11462
|
readonly Volume: "volume";
|
|
10620
11463
|
};
|
|
10621
|
-
type
|
|
11464
|
+
type PhaseStartItemTierBehavior = ClosedEnum<typeof PhaseStartItemTierBehavior>;
|
|
10622
11465
|
/**
|
|
10623
11466
|
* Billing interval. For consumable features, should match reset.interval.
|
|
10624
11467
|
*/
|
|
10625
|
-
declare const
|
|
11468
|
+
declare const PhaseStartItemPriceInterval: {
|
|
10626
11469
|
readonly OneOff: "one_off";
|
|
10627
11470
|
readonly Week: "week";
|
|
10628
11471
|
readonly Month: "month";
|
|
@@ -10633,22 +11476,22 @@ declare const CreateScheduleItemPriceInterval2: {
|
|
|
10633
11476
|
/**
|
|
10634
11477
|
* Billing interval. For consumable features, should match reset.interval.
|
|
10635
11478
|
*/
|
|
10636
|
-
type
|
|
11479
|
+
type PhaseStartItemPriceInterval = ClosedEnum<typeof PhaseStartItemPriceInterval>;
|
|
10637
11480
|
/**
|
|
10638
11481
|
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
10639
11482
|
*/
|
|
10640
|
-
declare const
|
|
11483
|
+
declare const PhaseStartItemBillingMethod: {
|
|
10641
11484
|
readonly Prepaid: "prepaid";
|
|
10642
11485
|
readonly UsageBased: "usage_based";
|
|
10643
11486
|
};
|
|
10644
11487
|
/**
|
|
10645
11488
|
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
10646
11489
|
*/
|
|
10647
|
-
type
|
|
11490
|
+
type PhaseStartItemBillingMethod = ClosedEnum<typeof PhaseStartItemBillingMethod>;
|
|
10648
11491
|
/**
|
|
10649
11492
|
* Pricing for usage beyond included units. Omit for free features.
|
|
10650
11493
|
*/
|
|
10651
|
-
type
|
|
11494
|
+
type PhaseStartItemPrice = {
|
|
10652
11495
|
/**
|
|
10653
11496
|
* Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
|
|
10654
11497
|
*/
|
|
@@ -10656,16 +11499,16 @@ type CreateScheduleItemPrice2 = {
|
|
|
10656
11499
|
/**
|
|
10657
11500
|
* Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.
|
|
10658
11501
|
*/
|
|
10659
|
-
additionalCurrencies?: Array<
|
|
11502
|
+
additionalCurrencies?: Array<PhaseStartItemAdditionalCurrency> | undefined;
|
|
10660
11503
|
/**
|
|
10661
11504
|
* Tiered pricing. Either 'amount' or 'tiers' is required.
|
|
10662
11505
|
*/
|
|
10663
|
-
tiers?: Array<
|
|
10664
|
-
tierBehavior?:
|
|
11506
|
+
tiers?: Array<PhaseStartItemTier> | undefined;
|
|
11507
|
+
tierBehavior?: PhaseStartItemTierBehavior | undefined;
|
|
10665
11508
|
/**
|
|
10666
11509
|
* Billing interval. For consumable features, should match reset.interval.
|
|
10667
11510
|
*/
|
|
10668
|
-
interval:
|
|
11511
|
+
interval: PhaseStartItemPriceInterval;
|
|
10669
11512
|
/**
|
|
10670
11513
|
* Number of intervals per billing cycle. Defaults to 1.
|
|
10671
11514
|
*/
|
|
@@ -10677,7 +11520,7 @@ type CreateScheduleItemPrice2 = {
|
|
|
10677
11520
|
/**
|
|
10678
11521
|
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
10679
11522
|
*/
|
|
10680
|
-
billingMethod:
|
|
11523
|
+
billingMethod: PhaseStartItemBillingMethod;
|
|
10681
11524
|
/**
|
|
10682
11525
|
* Max units purchasable beyond included. E.g. included=100, max_purchase=300 allows 400 total. Null for no limit.
|
|
10683
11526
|
*/
|
|
@@ -10686,7 +11529,7 @@ type CreateScheduleItemPrice2 = {
|
|
|
10686
11529
|
/**
|
|
10687
11530
|
* Billing behavior when quantity increases mid-cycle.
|
|
10688
11531
|
*/
|
|
10689
|
-
declare const
|
|
11532
|
+
declare const PhaseStartItemOnIncrease: {
|
|
10690
11533
|
readonly BillImmediately: "bill_immediately";
|
|
10691
11534
|
readonly ProrateImmediately: "prorate_immediately";
|
|
10692
11535
|
readonly ProrateNextCycle: "prorate_next_cycle";
|
|
@@ -10695,11 +11538,11 @@ declare const CreateScheduleItemOnIncrease2: {
|
|
|
10695
11538
|
/**
|
|
10696
11539
|
* Billing behavior when quantity increases mid-cycle.
|
|
10697
11540
|
*/
|
|
10698
|
-
type
|
|
11541
|
+
type PhaseStartItemOnIncrease = ClosedEnum<typeof PhaseStartItemOnIncrease>;
|
|
10699
11542
|
/**
|
|
10700
11543
|
* Credit behavior when quantity decreases mid-cycle.
|
|
10701
11544
|
*/
|
|
10702
|
-
declare const
|
|
11545
|
+
declare const PhaseStartItemOnDecrease: {
|
|
10703
11546
|
readonly Prorate: "prorate";
|
|
10704
11547
|
readonly ProrateImmediately: "prorate_immediately";
|
|
10705
11548
|
readonly ProrateNextCycle: "prorate_next_cycle";
|
|
@@ -10709,35 +11552,35 @@ declare const CreateScheduleItemOnDecrease2: {
|
|
|
10709
11552
|
/**
|
|
10710
11553
|
* Credit behavior when quantity decreases mid-cycle.
|
|
10711
11554
|
*/
|
|
10712
|
-
type
|
|
11555
|
+
type PhaseStartItemOnDecrease = ClosedEnum<typeof PhaseStartItemOnDecrease>;
|
|
10713
11556
|
/**
|
|
10714
11557
|
* Proration settings for prepaid features. Controls mid-cycle quantity change billing.
|
|
10715
11558
|
*/
|
|
10716
|
-
type
|
|
11559
|
+
type PhaseStartItemProration = {
|
|
10717
11560
|
/**
|
|
10718
11561
|
* Billing behavior when quantity increases mid-cycle.
|
|
10719
11562
|
*/
|
|
10720
|
-
onIncrease:
|
|
11563
|
+
onIncrease: PhaseStartItemOnIncrease;
|
|
10721
11564
|
/**
|
|
10722
11565
|
* Credit behavior when quantity decreases mid-cycle.
|
|
10723
11566
|
*/
|
|
10724
|
-
onDecrease:
|
|
11567
|
+
onDecrease: PhaseStartItemOnDecrease;
|
|
10725
11568
|
};
|
|
10726
11569
|
/**
|
|
10727
11570
|
* When rolled over units expire.
|
|
10728
11571
|
*/
|
|
10729
|
-
declare const
|
|
11572
|
+
declare const PhaseStartItemExpiryDurationType: {
|
|
10730
11573
|
readonly Month: "month";
|
|
10731
11574
|
readonly Forever: "forever";
|
|
10732
11575
|
};
|
|
10733
11576
|
/**
|
|
10734
11577
|
* When rolled over units expire.
|
|
10735
11578
|
*/
|
|
10736
|
-
type
|
|
11579
|
+
type PhaseStartItemExpiryDurationType = ClosedEnum<typeof PhaseStartItemExpiryDurationType>;
|
|
10737
11580
|
/**
|
|
10738
11581
|
* Rollover config for unused units. If set, unused included units carry over.
|
|
10739
11582
|
*/
|
|
10740
|
-
type
|
|
11583
|
+
type PhaseStartItemRollover = {
|
|
10741
11584
|
/**
|
|
10742
11585
|
* Max rollover units. Omit for unlimited rollover.
|
|
10743
11586
|
*/
|
|
@@ -10749,7 +11592,7 @@ type CreateScheduleItemRollover2 = {
|
|
|
10749
11592
|
/**
|
|
10750
11593
|
* When rolled over units expire.
|
|
10751
11594
|
*/
|
|
10752
|
-
expiryDurationType:
|
|
11595
|
+
expiryDurationType: PhaseStartItemExpiryDurationType;
|
|
10753
11596
|
/**
|
|
10754
11597
|
* Number of periods before expiry.
|
|
10755
11598
|
*/
|
|
@@ -10758,7 +11601,7 @@ type CreateScheduleItemRollover2 = {
|
|
|
10758
11601
|
/**
|
|
10759
11602
|
* Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
|
|
10760
11603
|
*/
|
|
10761
|
-
type
|
|
11604
|
+
type PhaseStartItemPlanItem = {
|
|
10762
11605
|
/**
|
|
10763
11606
|
* The ID of the feature to configure.
|
|
10764
11607
|
*/
|
|
@@ -10778,24 +11621,24 @@ type CreateScheduleItemPlanItem2 = {
|
|
|
10778
11621
|
/**
|
|
10779
11622
|
* Reset configuration for consumable features. Omit for non-consumable features like seats.
|
|
10780
11623
|
*/
|
|
10781
|
-
reset?:
|
|
11624
|
+
reset?: PhaseStartItemReset | undefined;
|
|
10782
11625
|
/**
|
|
10783
11626
|
* Pricing for usage beyond included units. Omit for free features.
|
|
10784
11627
|
*/
|
|
10785
|
-
price?:
|
|
11628
|
+
price?: PhaseStartItemPrice | undefined;
|
|
10786
11629
|
/**
|
|
10787
11630
|
* Proration settings for prepaid features. Controls mid-cycle quantity change billing.
|
|
10788
11631
|
*/
|
|
10789
|
-
proration?:
|
|
11632
|
+
proration?: PhaseStartItemProration | undefined;
|
|
10790
11633
|
/**
|
|
10791
11634
|
* Rollover config for unused units. If set, unused included units carry over.
|
|
10792
11635
|
*/
|
|
10793
|
-
rollover?:
|
|
11636
|
+
rollover?: PhaseStartItemRollover | undefined;
|
|
10794
11637
|
};
|
|
10795
11638
|
/**
|
|
10796
11639
|
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
10797
11640
|
*/
|
|
10798
|
-
declare const
|
|
11641
|
+
declare const PhaseStartAddItemResetInterval: {
|
|
10799
11642
|
readonly OneOff: "one_off";
|
|
10800
11643
|
readonly Minute: "minute";
|
|
10801
11644
|
readonly Hour: "hour";
|
|
@@ -10809,39 +11652,39 @@ declare const CreateScheduleAddItemResetInterval2: {
|
|
|
10809
11652
|
/**
|
|
10810
11653
|
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
10811
11654
|
*/
|
|
10812
|
-
type
|
|
11655
|
+
type PhaseStartAddItemResetInterval = ClosedEnum<typeof PhaseStartAddItemResetInterval>;
|
|
10813
11656
|
/**
|
|
10814
11657
|
* Reset configuration for consumable features. Omit for non-consumable features like seats.
|
|
10815
11658
|
*/
|
|
10816
|
-
type
|
|
11659
|
+
type PhaseStartAddItemReset = {
|
|
10817
11660
|
/**
|
|
10818
11661
|
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
10819
11662
|
*/
|
|
10820
|
-
interval:
|
|
11663
|
+
interval: PhaseStartAddItemResetInterval;
|
|
10821
11664
|
/**
|
|
10822
11665
|
* Number of intervals between resets. Defaults to 1.
|
|
10823
11666
|
*/
|
|
10824
11667
|
intervalCount?: number | undefined;
|
|
10825
11668
|
};
|
|
10826
|
-
type
|
|
11669
|
+
type PhaseStartAddItemAdditionalCurrency = {
|
|
10827
11670
|
currency?: any | undefined;
|
|
10828
11671
|
amount?: any | undefined;
|
|
10829
11672
|
};
|
|
10830
|
-
type
|
|
11673
|
+
type PhaseStartAddItemTier = {
|
|
10831
11674
|
to?: any | undefined;
|
|
10832
11675
|
amount?: any | undefined;
|
|
10833
11676
|
flatAmount?: any | undefined;
|
|
10834
11677
|
additionalCurrencies?: any | undefined;
|
|
10835
11678
|
};
|
|
10836
|
-
declare const
|
|
11679
|
+
declare const PhaseStartAddItemTierBehavior: {
|
|
10837
11680
|
readonly Graduated: "graduated";
|
|
10838
11681
|
readonly Volume: "volume";
|
|
10839
11682
|
};
|
|
10840
|
-
type
|
|
11683
|
+
type PhaseStartAddItemTierBehavior = ClosedEnum<typeof PhaseStartAddItemTierBehavior>;
|
|
10841
11684
|
/**
|
|
10842
11685
|
* Billing interval. For consumable features, should match reset.interval.
|
|
10843
11686
|
*/
|
|
10844
|
-
declare const
|
|
11687
|
+
declare const PhaseStartAddItemPriceInterval: {
|
|
10845
11688
|
readonly OneOff: "one_off";
|
|
10846
11689
|
readonly Week: "week";
|
|
10847
11690
|
readonly Month: "month";
|
|
@@ -10852,22 +11695,22 @@ declare const CreateScheduleAddItemPriceInterval2: {
|
|
|
10852
11695
|
/**
|
|
10853
11696
|
* Billing interval. For consumable features, should match reset.interval.
|
|
10854
11697
|
*/
|
|
10855
|
-
type
|
|
11698
|
+
type PhaseStartAddItemPriceInterval = ClosedEnum<typeof PhaseStartAddItemPriceInterval>;
|
|
10856
11699
|
/**
|
|
10857
11700
|
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
10858
11701
|
*/
|
|
10859
|
-
declare const
|
|
11702
|
+
declare const PhaseStartAddItemBillingMethod: {
|
|
10860
11703
|
readonly Prepaid: "prepaid";
|
|
10861
11704
|
readonly UsageBased: "usage_based";
|
|
10862
11705
|
};
|
|
10863
11706
|
/**
|
|
10864
11707
|
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
10865
11708
|
*/
|
|
10866
|
-
type
|
|
11709
|
+
type PhaseStartAddItemBillingMethod = ClosedEnum<typeof PhaseStartAddItemBillingMethod>;
|
|
10867
11710
|
/**
|
|
10868
11711
|
* Pricing for usage beyond included units. Omit for free features.
|
|
10869
11712
|
*/
|
|
10870
|
-
type
|
|
11713
|
+
type PhaseStartAddItemPrice = {
|
|
10871
11714
|
/**
|
|
10872
11715
|
* Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
|
|
10873
11716
|
*/
|
|
@@ -10875,16 +11718,16 @@ type CreateScheduleAddItemPrice2 = {
|
|
|
10875
11718
|
/**
|
|
10876
11719
|
* Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.
|
|
10877
11720
|
*/
|
|
10878
|
-
additionalCurrencies?: Array<
|
|
11721
|
+
additionalCurrencies?: Array<PhaseStartAddItemAdditionalCurrency> | undefined;
|
|
10879
11722
|
/**
|
|
10880
11723
|
* Tiered pricing. Either 'amount' or 'tiers' is required.
|
|
10881
11724
|
*/
|
|
10882
|
-
tiers?: Array<
|
|
10883
|
-
tierBehavior?:
|
|
11725
|
+
tiers?: Array<PhaseStartAddItemTier> | undefined;
|
|
11726
|
+
tierBehavior?: PhaseStartAddItemTierBehavior | undefined;
|
|
10884
11727
|
/**
|
|
10885
11728
|
* Billing interval. For consumable features, should match reset.interval.
|
|
10886
11729
|
*/
|
|
10887
|
-
interval:
|
|
11730
|
+
interval: PhaseStartAddItemPriceInterval;
|
|
10888
11731
|
/**
|
|
10889
11732
|
* Number of intervals per billing cycle. Defaults to 1.
|
|
10890
11733
|
*/
|
|
@@ -10896,7 +11739,7 @@ type CreateScheduleAddItemPrice2 = {
|
|
|
10896
11739
|
/**
|
|
10897
11740
|
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
10898
11741
|
*/
|
|
10899
|
-
billingMethod:
|
|
11742
|
+
billingMethod: PhaseStartAddItemBillingMethod;
|
|
10900
11743
|
/**
|
|
10901
11744
|
* Max units purchasable beyond included. E.g. included=100, max_purchase=300 allows 400 total. Null for no limit.
|
|
10902
11745
|
*/
|
|
@@ -10905,7 +11748,7 @@ type CreateScheduleAddItemPrice2 = {
|
|
|
10905
11748
|
/**
|
|
10906
11749
|
* Billing behavior when quantity increases mid-cycle.
|
|
10907
11750
|
*/
|
|
10908
|
-
declare const
|
|
11751
|
+
declare const PhaseStartAddItemOnIncrease: {
|
|
10909
11752
|
readonly BillImmediately: "bill_immediately";
|
|
10910
11753
|
readonly ProrateImmediately: "prorate_immediately";
|
|
10911
11754
|
readonly ProrateNextCycle: "prorate_next_cycle";
|
|
@@ -10914,11 +11757,11 @@ declare const CreateScheduleAddItemOnIncrease2: {
|
|
|
10914
11757
|
/**
|
|
10915
11758
|
* Billing behavior when quantity increases mid-cycle.
|
|
10916
11759
|
*/
|
|
10917
|
-
type
|
|
11760
|
+
type PhaseStartAddItemOnIncrease = ClosedEnum<typeof PhaseStartAddItemOnIncrease>;
|
|
10918
11761
|
/**
|
|
10919
11762
|
* Credit behavior when quantity decreases mid-cycle.
|
|
10920
11763
|
*/
|
|
10921
|
-
declare const
|
|
11764
|
+
declare const PhaseStartAddItemOnDecrease: {
|
|
10922
11765
|
readonly Prorate: "prorate";
|
|
10923
11766
|
readonly ProrateImmediately: "prorate_immediately";
|
|
10924
11767
|
readonly ProrateNextCycle: "prorate_next_cycle";
|
|
@@ -10928,35 +11771,35 @@ declare const CreateScheduleAddItemOnDecrease2: {
|
|
|
10928
11771
|
/**
|
|
10929
11772
|
* Credit behavior when quantity decreases mid-cycle.
|
|
10930
11773
|
*/
|
|
10931
|
-
type
|
|
11774
|
+
type PhaseStartAddItemOnDecrease = ClosedEnum<typeof PhaseStartAddItemOnDecrease>;
|
|
10932
11775
|
/**
|
|
10933
11776
|
* Proration settings for prepaid features. Controls mid-cycle quantity change billing.
|
|
10934
11777
|
*/
|
|
10935
|
-
type
|
|
11778
|
+
type PhaseStartAddItemProration = {
|
|
10936
11779
|
/**
|
|
10937
11780
|
* Billing behavior when quantity increases mid-cycle.
|
|
10938
11781
|
*/
|
|
10939
|
-
onIncrease:
|
|
11782
|
+
onIncrease: PhaseStartAddItemOnIncrease;
|
|
10940
11783
|
/**
|
|
10941
11784
|
* Credit behavior when quantity decreases mid-cycle.
|
|
10942
11785
|
*/
|
|
10943
|
-
onDecrease:
|
|
11786
|
+
onDecrease: PhaseStartAddItemOnDecrease;
|
|
10944
11787
|
};
|
|
10945
11788
|
/**
|
|
10946
11789
|
* When rolled over units expire.
|
|
10947
11790
|
*/
|
|
10948
|
-
declare const
|
|
11791
|
+
declare const PhaseStartAddItemExpiryDurationType: {
|
|
10949
11792
|
readonly Month: "month";
|
|
10950
11793
|
readonly Forever: "forever";
|
|
10951
11794
|
};
|
|
10952
11795
|
/**
|
|
10953
11796
|
* When rolled over units expire.
|
|
10954
11797
|
*/
|
|
10955
|
-
type
|
|
11798
|
+
type PhaseStartAddItemExpiryDurationType = ClosedEnum<typeof PhaseStartAddItemExpiryDurationType>;
|
|
10956
11799
|
/**
|
|
10957
11800
|
* Rollover config for unused units. If set, unused included units carry over.
|
|
10958
11801
|
*/
|
|
10959
|
-
type
|
|
11802
|
+
type PhaseStartAddItemRollover = {
|
|
10960
11803
|
/**
|
|
10961
11804
|
* Max rollover units. Omit for unlimited rollover.
|
|
10962
11805
|
*/
|
|
@@ -10968,7 +11811,7 @@ type CreateScheduleAddItemRollover2 = {
|
|
|
10968
11811
|
/**
|
|
10969
11812
|
* When rolled over units expire.
|
|
10970
11813
|
*/
|
|
10971
|
-
expiryDurationType:
|
|
11814
|
+
expiryDurationType: PhaseStartAddItemExpiryDurationType;
|
|
10972
11815
|
/**
|
|
10973
11816
|
* Number of periods before expiry.
|
|
10974
11817
|
*/
|
|
@@ -10977,7 +11820,7 @@ type CreateScheduleAddItemRollover2 = {
|
|
|
10977
11820
|
/**
|
|
10978
11821
|
* Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
|
|
10979
11822
|
*/
|
|
10980
|
-
type
|
|
11823
|
+
type PhaseStartAddItemPlanItem = {
|
|
10981
11824
|
/**
|
|
10982
11825
|
* The ID of the feature to configure.
|
|
10983
11826
|
*/
|
|
@@ -10997,32 +11840,32 @@ type CreateScheduleAddItemPlanItem2 = {
|
|
|
10997
11840
|
/**
|
|
10998
11841
|
* Reset configuration for consumable features. Omit for non-consumable features like seats.
|
|
10999
11842
|
*/
|
|
11000
|
-
reset?:
|
|
11843
|
+
reset?: PhaseStartAddItemReset | undefined;
|
|
11001
11844
|
/**
|
|
11002
11845
|
* Pricing for usage beyond included units. Omit for free features.
|
|
11003
11846
|
*/
|
|
11004
|
-
price?:
|
|
11847
|
+
price?: PhaseStartAddItemPrice | undefined;
|
|
11005
11848
|
/**
|
|
11006
11849
|
* Proration settings for prepaid features. Controls mid-cycle quantity change billing.
|
|
11007
11850
|
*/
|
|
11008
|
-
proration?:
|
|
11851
|
+
proration?: PhaseStartAddItemProration | undefined;
|
|
11009
11852
|
/**
|
|
11010
11853
|
* Rollover config for unused units. If set, unused included units carry over.
|
|
11011
11854
|
*/
|
|
11012
|
-
rollover?:
|
|
11855
|
+
rollover?: PhaseStartAddItemRollover | undefined;
|
|
11013
11856
|
};
|
|
11014
11857
|
/**
|
|
11015
11858
|
* Match items with this billing method (prepaid or usage_based).
|
|
11016
11859
|
*/
|
|
11017
|
-
declare const
|
|
11860
|
+
declare const PhaseStartRemoveItemBillingMethod: {
|
|
11018
11861
|
readonly Prepaid: "prepaid";
|
|
11019
11862
|
readonly UsageBased: "usage_based";
|
|
11020
11863
|
};
|
|
11021
11864
|
/**
|
|
11022
11865
|
* Match items with this billing method (prepaid or usage_based).
|
|
11023
11866
|
*/
|
|
11024
|
-
type
|
|
11025
|
-
declare const
|
|
11867
|
+
type PhaseStartRemoveItemBillingMethod = ClosedEnum<typeof PhaseStartRemoveItemBillingMethod>;
|
|
11868
|
+
declare const PhaseStartIntervalRemoveItemEnum2: {
|
|
11026
11869
|
readonly OneOff: "one_off";
|
|
11027
11870
|
readonly Minute: "minute";
|
|
11028
11871
|
readonly Hour: "hour";
|
|
@@ -11033,8 +11876,8 @@ declare const CreateScheduleIntervalRemoveItemEnum4: {
|
|
|
11033
11876
|
readonly SemiAnnual: "semi_annual";
|
|
11034
11877
|
readonly Year: "year";
|
|
11035
11878
|
};
|
|
11036
|
-
type
|
|
11037
|
-
declare const
|
|
11879
|
+
type PhaseStartIntervalRemoveItemEnum2 = ClosedEnum<typeof PhaseStartIntervalRemoveItemEnum2>;
|
|
11880
|
+
declare const PhaseStartIntervalRemoveItemEnum1: {
|
|
11038
11881
|
readonly OneOff: "one_off";
|
|
11039
11882
|
readonly Week: "week";
|
|
11040
11883
|
readonly Month: "month";
|
|
@@ -11042,11 +11885,11 @@ declare const CreateScheduleIntervalRemoveItemEnum3: {
|
|
|
11042
11885
|
readonly SemiAnnual: "semi_annual";
|
|
11043
11886
|
readonly Year: "year";
|
|
11044
11887
|
};
|
|
11045
|
-
type
|
|
11888
|
+
type PhaseStartIntervalRemoveItemEnum1 = ClosedEnum<typeof PhaseStartIntervalRemoveItemEnum1>;
|
|
11046
11889
|
/**
|
|
11047
11890
|
* Filter for matching plan items. All provided fields must match (AND).
|
|
11048
11891
|
*/
|
|
11049
|
-
type
|
|
11892
|
+
type PhaseStartPlanItemFilter = {
|
|
11050
11893
|
/**
|
|
11051
11894
|
* Match items linked to this feature.
|
|
11052
11895
|
*/
|
|
@@ -11054,11 +11897,11 @@ type CreateSchedulePlanItemFilter2 = {
|
|
|
11054
11897
|
/**
|
|
11055
11898
|
* Match items with this billing method (prepaid or usage_based).
|
|
11056
11899
|
*/
|
|
11057
|
-
billingMethod?:
|
|
11900
|
+
billingMethod?: PhaseStartRemoveItemBillingMethod | undefined;
|
|
11058
11901
|
/**
|
|
11059
11902
|
* Match items with this interval. Accepts either a BillingInterval (price-side) or a ResetInterval (reset-side, includes day/hour/minute) so price-less items keyed by reset.interval can be disambiguated.
|
|
11060
11903
|
*/
|
|
11061
|
-
interval?:
|
|
11904
|
+
interval?: PhaseStartIntervalRemoveItemEnum1 | PhaseStartIntervalRemoveItemEnum2 | undefined;
|
|
11062
11905
|
/**
|
|
11063
11906
|
* Match items with this interval_count. Disambiguates between items that share an interval but differ in count.
|
|
11064
11907
|
*/
|
|
@@ -11067,7 +11910,7 @@ type CreateSchedulePlanItemFilter2 = {
|
|
|
11067
11910
|
/**
|
|
11068
11911
|
* The time interval for the purchase limit window.
|
|
11069
11912
|
*/
|
|
11070
|
-
declare const
|
|
11913
|
+
declare const PhaseStartPurchaseLimitInterval: {
|
|
11071
11914
|
readonly Hour: "hour";
|
|
11072
11915
|
readonly Day: "day";
|
|
11073
11916
|
readonly Week: "week";
|
|
@@ -11076,15 +11919,15 @@ declare const CreateSchedulePurchaseLimitInterval2: {
|
|
|
11076
11919
|
/**
|
|
11077
11920
|
* The time interval for the purchase limit window.
|
|
11078
11921
|
*/
|
|
11079
|
-
type
|
|
11922
|
+
type PhaseStartPurchaseLimitInterval = ClosedEnum<typeof PhaseStartPurchaseLimitInterval>;
|
|
11080
11923
|
/**
|
|
11081
11924
|
* Optional rate limit to cap how often auto top-ups occur. Pass count to set the current window's consumed top-ups.
|
|
11082
11925
|
*/
|
|
11083
|
-
type
|
|
11926
|
+
type PhaseStartPurchaseLimit = {
|
|
11084
11927
|
/**
|
|
11085
11928
|
* The time interval for the purchase limit window.
|
|
11086
11929
|
*/
|
|
11087
|
-
interval:
|
|
11930
|
+
interval: PhaseStartPurchaseLimitInterval;
|
|
11088
11931
|
/**
|
|
11089
11932
|
* Number of intervals in the purchase limit window.
|
|
11090
11933
|
*/
|
|
@@ -11098,7 +11941,7 @@ type CreateSchedulePurchaseLimit2 = {
|
|
|
11098
11941
|
*/
|
|
11099
11942
|
count?: number | undefined;
|
|
11100
11943
|
};
|
|
11101
|
-
type
|
|
11944
|
+
type PhaseStartAutoTopup = {
|
|
11102
11945
|
/**
|
|
11103
11946
|
* The ID of the feature (credit balance) to auto top-up.
|
|
11104
11947
|
*/
|
|
@@ -11118,7 +11961,7 @@ type CreateScheduleAutoTopup2 = {
|
|
|
11118
11961
|
/**
|
|
11119
11962
|
* Optional rate limit to cap how often auto top-ups occur. Pass count to set the current window's consumed top-ups.
|
|
11120
11963
|
*/
|
|
11121
|
-
purchaseLimit?:
|
|
11964
|
+
purchaseLimit?: PhaseStartPurchaseLimit | undefined;
|
|
11122
11965
|
/**
|
|
11123
11966
|
* When true, auto top-up creates a send_invoice invoice instead of auto-charging.
|
|
11124
11967
|
*/
|
|
@@ -11127,15 +11970,15 @@ type CreateScheduleAutoTopup2 = {
|
|
|
11127
11970
|
/**
|
|
11128
11971
|
* How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
|
|
11129
11972
|
*/
|
|
11130
|
-
declare const
|
|
11973
|
+
declare const PhaseStartLimitType: {
|
|
11131
11974
|
readonly Absolute: "absolute";
|
|
11132
11975
|
readonly UsagePercentage: "usage_percentage";
|
|
11133
11976
|
};
|
|
11134
11977
|
/**
|
|
11135
11978
|
* How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
|
|
11136
11979
|
*/
|
|
11137
|
-
type
|
|
11138
|
-
type
|
|
11980
|
+
type PhaseStartLimitType = ClosedEnum<typeof PhaseStartLimitType>;
|
|
11981
|
+
type PhaseStartSpendLimit = {
|
|
11139
11982
|
/**
|
|
11140
11983
|
* Optional feature ID this spend limit applies to.
|
|
11141
11984
|
*/
|
|
@@ -11147,7 +11990,7 @@ type CreateScheduleSpendLimit2 = {
|
|
|
11147
11990
|
/**
|
|
11148
11991
|
* How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
|
|
11149
11992
|
*/
|
|
11150
|
-
limitType?:
|
|
11993
|
+
limitType?: PhaseStartLimitType | undefined;
|
|
11151
11994
|
/**
|
|
11152
11995
|
* Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit_type is usage_percentage.
|
|
11153
11996
|
*/
|
|
@@ -11160,7 +12003,7 @@ type CreateScheduleSpendLimit2 = {
|
|
|
11160
12003
|
/**
|
|
11161
12004
|
* Interval for the cap, aligned to the customer's billing cycle.
|
|
11162
12005
|
*/
|
|
11163
|
-
declare const
|
|
12006
|
+
declare const PhaseStartUsageLimitInterval: {
|
|
11164
12007
|
readonly Day: "day";
|
|
11165
12008
|
readonly Week: "week";
|
|
11166
12009
|
readonly Month: "month";
|
|
@@ -11169,16 +12012,16 @@ declare const CreateScheduleUsageLimitInterval2: {
|
|
|
11169
12012
|
/**
|
|
11170
12013
|
* Interval for the cap, aligned to the customer's billing cycle.
|
|
11171
12014
|
*/
|
|
11172
|
-
type
|
|
12015
|
+
type PhaseStartUsageLimitInterval = ClosedEnum<typeof PhaseStartUsageLimitInterval>;
|
|
11173
12016
|
/**
|
|
11174
12017
|
* When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
|
|
11175
12018
|
*/
|
|
11176
|
-
type
|
|
12019
|
+
type PhaseStartFilter = {
|
|
11177
12020
|
properties: {
|
|
11178
12021
|
[k: string]: any;
|
|
11179
12022
|
};
|
|
11180
12023
|
};
|
|
11181
|
-
type
|
|
12024
|
+
type PhaseStartUsageLimit = {
|
|
11182
12025
|
/**
|
|
11183
12026
|
* The feature this usage limit applies to.
|
|
11184
12027
|
*/
|
|
@@ -11194,16 +12037,16 @@ type CreateScheduleUsageLimit2 = {
|
|
|
11194
12037
|
/**
|
|
11195
12038
|
* Interval for the cap, aligned to the customer's billing cycle.
|
|
11196
12039
|
*/
|
|
11197
|
-
interval:
|
|
12040
|
+
interval: PhaseStartUsageLimitInterval;
|
|
11198
12041
|
/**
|
|
11199
12042
|
* When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
|
|
11200
12043
|
*/
|
|
11201
|
-
filter?:
|
|
12044
|
+
filter?: PhaseStartFilter | undefined;
|
|
11202
12045
|
};
|
|
11203
12046
|
/**
|
|
11204
12047
|
* Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
|
|
11205
12048
|
*/
|
|
11206
|
-
declare const
|
|
12049
|
+
declare const PhaseStartThresholdType: {
|
|
11207
12050
|
readonly Usage: "usage";
|
|
11208
12051
|
readonly UsagePercentage: "usage_percentage";
|
|
11209
12052
|
readonly Remaining: "remaining";
|
|
@@ -11212,8 +12055,8 @@ declare const CreateScheduleThresholdType2: {
|
|
|
11212
12055
|
/**
|
|
11213
12056
|
* Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
|
|
11214
12057
|
*/
|
|
11215
|
-
type
|
|
11216
|
-
type
|
|
12058
|
+
type PhaseStartThresholdType = ClosedEnum<typeof PhaseStartThresholdType>;
|
|
12059
|
+
type PhaseStartUsageAlert = {
|
|
11217
12060
|
/**
|
|
11218
12061
|
* The feature ID this alert applies to.
|
|
11219
12062
|
*/
|
|
@@ -11229,13 +12072,13 @@ type CreateScheduleUsageAlert2 = {
|
|
|
11229
12072
|
/**
|
|
11230
12073
|
* Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
|
|
11231
12074
|
*/
|
|
11232
|
-
thresholdType:
|
|
12075
|
+
thresholdType: PhaseStartThresholdType;
|
|
11233
12076
|
/**
|
|
11234
12077
|
* Optional user-defined label to distinguish multiple alerts on the same feature.
|
|
11235
12078
|
*/
|
|
11236
12079
|
name?: string | undefined;
|
|
11237
12080
|
};
|
|
11238
|
-
type
|
|
12081
|
+
type PhaseStartOverageAllowed = {
|
|
11239
12082
|
/**
|
|
11240
12083
|
* The feature ID this overage allowed control applies to.
|
|
11241
12084
|
*/
|
|
@@ -11248,52 +12091,52 @@ type CreateScheduleOverageAllowed2 = {
|
|
|
11248
12091
|
/**
|
|
11249
12092
|
* Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
|
|
11250
12093
|
*/
|
|
11251
|
-
type
|
|
12094
|
+
type PhaseStartBillingControls = {
|
|
11252
12095
|
/**
|
|
11253
12096
|
* List of auto top-up configurations per feature.
|
|
11254
12097
|
*/
|
|
11255
|
-
autoTopups?: Array<
|
|
12098
|
+
autoTopups?: Array<PhaseStartAutoTopup> | undefined;
|
|
11256
12099
|
/**
|
|
11257
12100
|
* List of overage spend limits per feature (caps overage spend).
|
|
11258
12101
|
*/
|
|
11259
|
-
spendLimits?: Array<
|
|
12102
|
+
spendLimits?: Array<PhaseStartSpendLimit> | undefined;
|
|
11260
12103
|
/**
|
|
11261
12104
|
* List of hard usage caps per feature (max units per interval).
|
|
11262
12105
|
*/
|
|
11263
|
-
usageLimits?: Array<
|
|
12106
|
+
usageLimits?: Array<PhaseStartUsageLimit> | undefined;
|
|
11264
12107
|
/**
|
|
11265
12108
|
* List of usage alert configurations per feature.
|
|
11266
12109
|
*/
|
|
11267
|
-
usageAlerts?: Array<
|
|
12110
|
+
usageAlerts?: Array<PhaseStartUsageAlert> | undefined;
|
|
11268
12111
|
/**
|
|
11269
12112
|
* List of overage allowed controls per feature. When enabled, usage can exceed balance.
|
|
11270
12113
|
*/
|
|
11271
|
-
overageAllowed?: Array<
|
|
12114
|
+
overageAllowed?: Array<PhaseStartOverageAllowed> | undefined;
|
|
11272
12115
|
};
|
|
11273
12116
|
/**
|
|
11274
12117
|
* Customize the plan to schedule. Can override price, replace items, or patch items with add_items and remove_items.
|
|
11275
12118
|
*/
|
|
11276
|
-
type
|
|
12119
|
+
type PhaseStartCustomize = {
|
|
11277
12120
|
/**
|
|
11278
12121
|
* Override the base price of the plan. Pass null to remove the base price.
|
|
11279
12122
|
*/
|
|
11280
|
-
price?:
|
|
12123
|
+
price?: PhaseStartBasePrice | null | undefined;
|
|
11281
12124
|
/**
|
|
11282
12125
|
* Override the items in the plan (PUT-style — replaces all existing items). Mutually exclusive with add_items / remove_items / deprecated update_items.
|
|
11283
12126
|
*/
|
|
11284
|
-
items?: Array<
|
|
12127
|
+
items?: Array<PhaseStartItemPlanItem> | undefined;
|
|
11285
12128
|
/**
|
|
11286
12129
|
* Items to add to the plan.
|
|
11287
12130
|
*/
|
|
11288
|
-
addItems?: Array<
|
|
12131
|
+
addItems?: Array<PhaseStartAddItemPlanItem> | undefined;
|
|
11289
12132
|
/**
|
|
11290
12133
|
* Filters selecting items to remove from the plan.
|
|
11291
12134
|
*/
|
|
11292
|
-
removeItems?: Array<
|
|
12135
|
+
removeItems?: Array<PhaseStartPlanItemFilter> | undefined;
|
|
11293
12136
|
/**
|
|
11294
12137
|
* Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
|
|
11295
12138
|
*/
|
|
11296
|
-
billingControls?:
|
|
12139
|
+
billingControls?: PhaseStartBillingControls | undefined;
|
|
11297
12140
|
};
|
|
11298
12141
|
type CreateSchedulePlan2 = {
|
|
11299
12142
|
/**
|
|
@@ -11307,7 +12150,7 @@ type CreateSchedulePlan2 = {
|
|
|
11307
12150
|
/**
|
|
11308
12151
|
* Optional prepaid feature quantities for this phase's plan.
|
|
11309
12152
|
*/
|
|
11310
|
-
featureQuantities?: Array<
|
|
12153
|
+
featureQuantities?: Array<PhaseStartFeatureQuantity> | undefined;
|
|
11311
12154
|
/**
|
|
11312
12155
|
* Optional explicit plan version to schedule.
|
|
11313
12156
|
*/
|
|
@@ -11315,7 +12158,7 @@ type CreateSchedulePlan2 = {
|
|
|
11315
12158
|
/**
|
|
11316
12159
|
* Customize the plan to schedule. Can override price, replace items, or patch items with add_items and remove_items.
|
|
11317
12160
|
*/
|
|
11318
|
-
customize?:
|
|
12161
|
+
customize?: PhaseStartCustomize | undefined;
|
|
11319
12162
|
/**
|
|
11320
12163
|
* A unique ID to identify this subscription. Useful when scheduling the same plan multiple times.
|
|
11321
12164
|
*/
|
|
@@ -11401,9 +12244,13 @@ type CreateScheduleParams = {
|
|
|
11401
12244
|
*/
|
|
11402
12245
|
enablePlanImmediately?: boolean | undefined;
|
|
11403
12246
|
/**
|
|
11404
|
-
*
|
|
12247
|
+
* Deprecated and ignored. Active plans the schedule does not declare are always retained.
|
|
11405
12248
|
*/
|
|
11406
12249
|
preserveAddOns?: boolean | undefined;
|
|
12250
|
+
/**
|
|
12251
|
+
* Plans billed with the immediate phase that the schedule never expires or replaces. No phase may declare a plan in the same group and scope.
|
|
12252
|
+
*/
|
|
12253
|
+
unscheduledPlans?: Array<UnscheduledPlan> | undefined;
|
|
11407
12254
|
/**
|
|
11408
12255
|
* Ordered phase definitions for the schedule.
|
|
11409
12256
|
*/
|
|
@@ -12205,6 +13052,89 @@ type Invoice = {
|
|
|
12205
13052
|
*/
|
|
12206
13053
|
hostedInvoiceUrl?: string | null | undefined;
|
|
12207
13054
|
};
|
|
13055
|
+
type InvoicePreviewDiscount = {
|
|
13056
|
+
amountOff: number;
|
|
13057
|
+
percentOff?: number | undefined;
|
|
13058
|
+
rewardId?: string | undefined;
|
|
13059
|
+
rewardName?: string | undefined;
|
|
13060
|
+
};
|
|
13061
|
+
/**
|
|
13062
|
+
* The period of time that this line item is being charged for.
|
|
13063
|
+
*/
|
|
13064
|
+
type Period = {
|
|
13065
|
+
/**
|
|
13066
|
+
* The start of the period in milliseconds since the Unix epoch.
|
|
13067
|
+
*/
|
|
13068
|
+
start: number;
|
|
13069
|
+
/**
|
|
13070
|
+
* The end of the period in milliseconds since the Unix epoch.
|
|
13071
|
+
*/
|
|
13072
|
+
end: number;
|
|
13073
|
+
};
|
|
13074
|
+
type LineItem = {
|
|
13075
|
+
/**
|
|
13076
|
+
* The name of the line item to display to the customer if you're building a UI. It will either be the plan name or the feature name.
|
|
13077
|
+
*/
|
|
13078
|
+
displayName: string;
|
|
13079
|
+
/**
|
|
13080
|
+
* A detailed description of the line item.
|
|
13081
|
+
*/
|
|
13082
|
+
description: string;
|
|
13083
|
+
/**
|
|
13084
|
+
* The amount in cents before discounts and tax for this line item.
|
|
13085
|
+
*/
|
|
13086
|
+
subtotal: number;
|
|
13087
|
+
/**
|
|
13088
|
+
* The final amount in cents after discounts and tax for this line item.
|
|
13089
|
+
*/
|
|
13090
|
+
total: number;
|
|
13091
|
+
/**
|
|
13092
|
+
* List of discounts applied to this line item.
|
|
13093
|
+
*/
|
|
13094
|
+
discounts?: Array<InvoicePreviewDiscount> | undefined;
|
|
13095
|
+
/**
|
|
13096
|
+
* The ID of the plan that this line item belongs to.
|
|
13097
|
+
*/
|
|
13098
|
+
planId: string;
|
|
13099
|
+
/**
|
|
13100
|
+
* The ID of the feature that this line item belongs to.
|
|
13101
|
+
*/
|
|
13102
|
+
featureId: string | null;
|
|
13103
|
+
/**
|
|
13104
|
+
* The period of time that this line item is being charged for.
|
|
13105
|
+
*/
|
|
13106
|
+
period?: Period | undefined;
|
|
13107
|
+
/**
|
|
13108
|
+
* The quantity of the line item.
|
|
13109
|
+
*/
|
|
13110
|
+
quantity: number;
|
|
13111
|
+
};
|
|
13112
|
+
type InvoicePreview = {
|
|
13113
|
+
/**
|
|
13114
|
+
* Plan IDs contributing line items to this invoice.
|
|
13115
|
+
*/
|
|
13116
|
+
planIds: Array<string>;
|
|
13117
|
+
/**
|
|
13118
|
+
* Unix timestamp (milliseconds) when this invoice will be created.
|
|
13119
|
+
*/
|
|
13120
|
+
invoiceAt: number;
|
|
13121
|
+
/**
|
|
13122
|
+
* The three-letter ISO currency code (e.g., 'usd').
|
|
13123
|
+
*/
|
|
13124
|
+
currency: string;
|
|
13125
|
+
/**
|
|
13126
|
+
* The total before discounts, in major currency units.
|
|
13127
|
+
*/
|
|
13128
|
+
subtotal: number;
|
|
13129
|
+
/**
|
|
13130
|
+
* The total after discounts, in major currency units.
|
|
13131
|
+
*/
|
|
13132
|
+
total: number;
|
|
13133
|
+
/**
|
|
13134
|
+
* The line items this invoice will contain: usage accrued in the closing cycle, plus recurring charges for the opening cycle.
|
|
13135
|
+
*/
|
|
13136
|
+
lineItems: Array<LineItem>;
|
|
13137
|
+
};
|
|
12208
13138
|
/**
|
|
12209
13139
|
* The environment (sandbox/live)
|
|
12210
13140
|
*/
|
|
@@ -12273,7 +13203,7 @@ declare const CustomerDurationType: {
|
|
|
12273
13203
|
* How long the discount lasts
|
|
12274
13204
|
*/
|
|
12275
13205
|
type CustomerDurationType = OpenEnum<typeof CustomerDurationType>;
|
|
12276
|
-
type
|
|
13206
|
+
type RewardsDiscount = {
|
|
12277
13207
|
/**
|
|
12278
13208
|
* The unique identifier for this discount
|
|
12279
13209
|
*/
|
|
@@ -12323,7 +13253,7 @@ type Rewards$1 = {
|
|
|
12323
13253
|
/**
|
|
12324
13254
|
* Array of active discounts applied to the customer
|
|
12325
13255
|
*/
|
|
12326
|
-
discounts: Array<
|
|
13256
|
+
discounts: Array<RewardsDiscount>;
|
|
12327
13257
|
};
|
|
12328
13258
|
type ReferralCustomer = {
|
|
12329
13259
|
id: string;
|
|
@@ -12415,6 +13345,10 @@ type Customer = {
|
|
|
12415
13345
|
* Invoices for this customer.
|
|
12416
13346
|
*/
|
|
12417
13347
|
invoices?: Array<Invoice> | undefined;
|
|
13348
|
+
/**
|
|
13349
|
+
* Upcoming invoice for each of this customer's Stripe subscriptions.
|
|
13350
|
+
*/
|
|
13351
|
+
invoicePreviews?: Array<InvoicePreview> | undefined;
|
|
12418
13352
|
/**
|
|
12419
13353
|
* Entities associated with this customer.
|
|
12420
13354
|
*/
|
|
@@ -12552,6 +13486,32 @@ type DeletePlanResponse = {
|
|
|
12552
13486
|
success: boolean;
|
|
12553
13487
|
};
|
|
12554
13488
|
|
|
13489
|
+
type DeleteReferralProgramParams = {
|
|
13490
|
+
/**
|
|
13491
|
+
* The ID of the referral program.
|
|
13492
|
+
*/
|
|
13493
|
+
referralProgramId: string;
|
|
13494
|
+
};
|
|
13495
|
+
/**
|
|
13496
|
+
* OK
|
|
13497
|
+
*/
|
|
13498
|
+
type DeleteReferralProgramResponse = {
|
|
13499
|
+
success: boolean;
|
|
13500
|
+
};
|
|
13501
|
+
|
|
13502
|
+
type DeleteRewardParams = {
|
|
13503
|
+
/**
|
|
13504
|
+
* The ID of the coupon or feature grant.
|
|
13505
|
+
*/
|
|
13506
|
+
rewardId: string;
|
|
13507
|
+
};
|
|
13508
|
+
/**
|
|
13509
|
+
* OK
|
|
13510
|
+
*/
|
|
13511
|
+
type DeleteRewardResponse = {
|
|
13512
|
+
success: boolean;
|
|
13513
|
+
};
|
|
13514
|
+
|
|
12555
13515
|
/**
|
|
12556
13516
|
* Use 'confirm' to commit the deduction, or 'release' to return the held balance.
|
|
12557
13517
|
*/
|
|
@@ -13295,6 +14255,89 @@ type GetCustomerInvoice = {
|
|
|
13295
14255
|
*/
|
|
13296
14256
|
hostedInvoiceUrl?: string | null | undefined;
|
|
13297
14257
|
};
|
|
14258
|
+
type GetCustomerInvoicePreviewDiscount = {
|
|
14259
|
+
amountOff: number;
|
|
14260
|
+
percentOff?: number | undefined;
|
|
14261
|
+
rewardId?: string | undefined;
|
|
14262
|
+
rewardName?: string | undefined;
|
|
14263
|
+
};
|
|
14264
|
+
/**
|
|
14265
|
+
* The period of time that this line item is being charged for.
|
|
14266
|
+
*/
|
|
14267
|
+
type GetCustomerPeriod = {
|
|
14268
|
+
/**
|
|
14269
|
+
* The start of the period in milliseconds since the Unix epoch.
|
|
14270
|
+
*/
|
|
14271
|
+
start: number;
|
|
14272
|
+
/**
|
|
14273
|
+
* The end of the period in milliseconds since the Unix epoch.
|
|
14274
|
+
*/
|
|
14275
|
+
end: number;
|
|
14276
|
+
};
|
|
14277
|
+
type GetCustomerLineItem = {
|
|
14278
|
+
/**
|
|
14279
|
+
* The name of the line item to display to the customer if you're building a UI. It will either be the plan name or the feature name.
|
|
14280
|
+
*/
|
|
14281
|
+
displayName: string;
|
|
14282
|
+
/**
|
|
14283
|
+
* A detailed description of the line item.
|
|
14284
|
+
*/
|
|
14285
|
+
description: string;
|
|
14286
|
+
/**
|
|
14287
|
+
* The amount in cents before discounts and tax for this line item.
|
|
14288
|
+
*/
|
|
14289
|
+
subtotal: number;
|
|
14290
|
+
/**
|
|
14291
|
+
* The final amount in cents after discounts and tax for this line item.
|
|
14292
|
+
*/
|
|
14293
|
+
total: number;
|
|
14294
|
+
/**
|
|
14295
|
+
* List of discounts applied to this line item.
|
|
14296
|
+
*/
|
|
14297
|
+
discounts?: Array<GetCustomerInvoicePreviewDiscount> | undefined;
|
|
14298
|
+
/**
|
|
14299
|
+
* The ID of the plan that this line item belongs to.
|
|
14300
|
+
*/
|
|
14301
|
+
planId: string;
|
|
14302
|
+
/**
|
|
14303
|
+
* The ID of the feature that this line item belongs to.
|
|
14304
|
+
*/
|
|
14305
|
+
featureId: string | null;
|
|
14306
|
+
/**
|
|
14307
|
+
* The period of time that this line item is being charged for.
|
|
14308
|
+
*/
|
|
14309
|
+
period?: GetCustomerPeriod | undefined;
|
|
14310
|
+
/**
|
|
14311
|
+
* The quantity of the line item.
|
|
14312
|
+
*/
|
|
14313
|
+
quantity: number;
|
|
14314
|
+
};
|
|
14315
|
+
type GetCustomerInvoicePreview = {
|
|
14316
|
+
/**
|
|
14317
|
+
* Plan IDs contributing line items to this invoice.
|
|
14318
|
+
*/
|
|
14319
|
+
planIds: Array<string>;
|
|
14320
|
+
/**
|
|
14321
|
+
* Unix timestamp (milliseconds) when this invoice will be created.
|
|
14322
|
+
*/
|
|
14323
|
+
invoiceAt: number;
|
|
14324
|
+
/**
|
|
14325
|
+
* The three-letter ISO currency code (e.g., 'usd').
|
|
14326
|
+
*/
|
|
14327
|
+
currency: string;
|
|
14328
|
+
/**
|
|
14329
|
+
* The total before discounts, in major currency units.
|
|
14330
|
+
*/
|
|
14331
|
+
subtotal: number;
|
|
14332
|
+
/**
|
|
14333
|
+
* The total after discounts, in major currency units.
|
|
14334
|
+
*/
|
|
14335
|
+
total: number;
|
|
14336
|
+
/**
|
|
14337
|
+
* The line items this invoice will contain: usage accrued in the closing cycle, plus recurring charges for the opening cycle.
|
|
14338
|
+
*/
|
|
14339
|
+
lineItems: Array<GetCustomerLineItem>;
|
|
14340
|
+
};
|
|
13298
14341
|
/**
|
|
13299
14342
|
* The environment (sandbox/live)
|
|
13300
14343
|
*/
|
|
@@ -13363,7 +14406,7 @@ declare const GetCustomerDurationType: {
|
|
|
13363
14406
|
* How long the discount lasts
|
|
13364
14407
|
*/
|
|
13365
14408
|
type GetCustomerDurationType = OpenEnum<typeof GetCustomerDurationType>;
|
|
13366
|
-
type
|
|
14409
|
+
type GetCustomerRewardsDiscount = {
|
|
13367
14410
|
/**
|
|
13368
14411
|
* The unique identifier for this discount
|
|
13369
14412
|
*/
|
|
@@ -13413,7 +14456,7 @@ type GetCustomerRewards = {
|
|
|
13413
14456
|
/**
|
|
13414
14457
|
* Array of active discounts applied to the customer
|
|
13415
14458
|
*/
|
|
13416
|
-
discounts: Array<
|
|
14459
|
+
discounts: Array<GetCustomerRewardsDiscount>;
|
|
13417
14460
|
};
|
|
13418
14461
|
type GetCustomerCustomer = {
|
|
13419
14462
|
id: string;
|
|
@@ -13508,6 +14551,10 @@ type GetCustomerResponse = {
|
|
|
13508
14551
|
* Invoices for this customer.
|
|
13509
14552
|
*/
|
|
13510
14553
|
invoices?: Array<GetCustomerInvoice> | undefined;
|
|
14554
|
+
/**
|
|
14555
|
+
* Upcoming invoice for each of this customer's Stripe subscriptions.
|
|
14556
|
+
*/
|
|
14557
|
+
invoicePreviews?: Array<GetCustomerInvoicePreview> | undefined;
|
|
13511
14558
|
/**
|
|
13512
14559
|
* Entities associated with this customer.
|
|
13513
14560
|
*/
|
|
@@ -15541,6 +16588,72 @@ type GetPlanResponse = {
|
|
|
15541
16588
|
customerEligibility?: GetPlanCustomerEligibility | undefined;
|
|
15542
16589
|
};
|
|
15543
16590
|
|
|
16591
|
+
type GetReferralProgramParams = {
|
|
16592
|
+
/**
|
|
16593
|
+
* The ID of the referral program.
|
|
16594
|
+
*/
|
|
16595
|
+
referralProgramId: string;
|
|
16596
|
+
};
|
|
16597
|
+
/**
|
|
16598
|
+
* When the reward is granted: on redemption, or when the redeemer checks out.
|
|
16599
|
+
*/
|
|
16600
|
+
declare const GetReferralProgramRedeemOn: {
|
|
16601
|
+
readonly CustomerCreation: "customer_creation";
|
|
16602
|
+
readonly Checkout: "checkout";
|
|
16603
|
+
};
|
|
16604
|
+
/**
|
|
16605
|
+
* When the reward is granted: on redemption, or when the redeemer checks out.
|
|
16606
|
+
*/
|
|
16607
|
+
type GetReferralProgramRedeemOn = OpenEnum<typeof GetReferralProgramRedeemOn>;
|
|
16608
|
+
/**
|
|
16609
|
+
* Who receives the reward: the referrer only, or both parties.
|
|
16610
|
+
*/
|
|
16611
|
+
declare const GetReferralProgramReceivedBy: {
|
|
16612
|
+
readonly Referrer: "referrer";
|
|
16613
|
+
readonly All: "all";
|
|
16614
|
+
};
|
|
16615
|
+
/**
|
|
16616
|
+
* Who receives the reward: the referrer only, or both parties.
|
|
16617
|
+
*/
|
|
16618
|
+
type GetReferralProgramReceivedBy = OpenEnum<typeof GetReferralProgramReceivedBy>;
|
|
16619
|
+
/**
|
|
16620
|
+
* OK
|
|
16621
|
+
*/
|
|
16622
|
+
type GetReferralProgramResponse = {
|
|
16623
|
+
/**
|
|
16624
|
+
* The unique identifier for the referral program.
|
|
16625
|
+
*/
|
|
16626
|
+
id: string;
|
|
16627
|
+
/**
|
|
16628
|
+
* The ID of the reward granted when a code is redeemed.
|
|
16629
|
+
*/
|
|
16630
|
+
rewardId: string;
|
|
16631
|
+
/**
|
|
16632
|
+
* When the reward is granted: on redemption, or when the redeemer checks out.
|
|
16633
|
+
*/
|
|
16634
|
+
redeemOn: GetReferralProgramRedeemOn;
|
|
16635
|
+
/**
|
|
16636
|
+
* Who receives the reward: the referrer only, or both parties.
|
|
16637
|
+
*/
|
|
16638
|
+
receivedBy: GetReferralProgramReceivedBy;
|
|
16639
|
+
/**
|
|
16640
|
+
* The maximum number of times a referral code can be redeemed.
|
|
16641
|
+
*/
|
|
16642
|
+
maxRedemptions?: number | null | undefined;
|
|
16643
|
+
/**
|
|
16644
|
+
* The plans whose checkout triggers the reward. Only used when redeem_on is checkout.
|
|
16645
|
+
*/
|
|
16646
|
+
planIds?: Array<string> | null | undefined;
|
|
16647
|
+
/**
|
|
16648
|
+
* Whether checkouts that start a trial should skip granting the reward.
|
|
16649
|
+
*/
|
|
16650
|
+
excludeTrial?: boolean | null | undefined;
|
|
16651
|
+
/**
|
|
16652
|
+
* The Unix timestamp (in milliseconds) when the referral program was created.
|
|
16653
|
+
*/
|
|
16654
|
+
createdAt: number;
|
|
16655
|
+
};
|
|
16656
|
+
|
|
15544
16657
|
/**
|
|
15545
16658
|
* "test" and "sandbox" both target the sandbox environment
|
|
15546
16659
|
*/
|
|
@@ -15594,6 +16707,174 @@ type GetRevenueCatKeysResponse = {
|
|
|
15594
16707
|
oauthAccessToken: string | null;
|
|
15595
16708
|
};
|
|
15596
16709
|
|
|
16710
|
+
type GetRewardParams = {
|
|
16711
|
+
/**
|
|
16712
|
+
* The ID of the coupon or feature grant.
|
|
16713
|
+
*/
|
|
16714
|
+
rewardId: string;
|
|
16715
|
+
};
|
|
16716
|
+
/**
|
|
16717
|
+
* The type of discount: percentage_discount, fixed_discount, or invoice_credits.
|
|
16718
|
+
*/
|
|
16719
|
+
declare const GetRewardCouponType: {
|
|
16720
|
+
readonly PercentageDiscount: "percentage_discount";
|
|
16721
|
+
readonly FixedDiscount: "fixed_discount";
|
|
16722
|
+
readonly InvoiceCredits: "invoice_credits";
|
|
16723
|
+
};
|
|
16724
|
+
/**
|
|
16725
|
+
* The type of discount: percentage_discount, fixed_discount, or invoice_credits.
|
|
16726
|
+
*/
|
|
16727
|
+
type GetRewardCouponType = OpenEnum<typeof GetRewardCouponType>;
|
|
16728
|
+
/**
|
|
16729
|
+
* The unit of time the duration is measured in.
|
|
16730
|
+
*/
|
|
16731
|
+
declare const GetRewardDurationType: {
|
|
16732
|
+
readonly OneOff: "one_off";
|
|
16733
|
+
readonly Months: "months";
|
|
16734
|
+
readonly Forever: "forever";
|
|
16735
|
+
};
|
|
16736
|
+
/**
|
|
16737
|
+
* The unit of time the duration is measured in.
|
|
16738
|
+
*/
|
|
16739
|
+
type GetRewardDurationType = OpenEnum<typeof GetRewardDurationType>;
|
|
16740
|
+
/**
|
|
16741
|
+
* How long the coupon applies once redeemed.
|
|
16742
|
+
*/
|
|
16743
|
+
type GetRewardDuration = {
|
|
16744
|
+
/**
|
|
16745
|
+
* The unit of time the duration is measured in.
|
|
16746
|
+
*/
|
|
16747
|
+
type: GetRewardDurationType;
|
|
16748
|
+
/**
|
|
16749
|
+
* The number of `type` periods the duration lasts, or null when the type has no length (e.g. one_off, forever).
|
|
16750
|
+
*/
|
|
16751
|
+
length: number | null;
|
|
16752
|
+
};
|
|
16753
|
+
type GetRewardCouponPromoCode = {
|
|
16754
|
+
/**
|
|
16755
|
+
* The promo code customers enter to redeem the coupon.
|
|
16756
|
+
*/
|
|
16757
|
+
code: string;
|
|
16758
|
+
/**
|
|
16759
|
+
* Maximum number of times this promo code can be redeemed across all customers, or null for unlimited.
|
|
16760
|
+
*/
|
|
16761
|
+
globalMaxRedemption?: number | null | undefined;
|
|
16762
|
+
/**
|
|
16763
|
+
* Whether this promo code can only be applied to a customer's first transaction.
|
|
16764
|
+
*/
|
|
16765
|
+
firstTimeTransaction?: boolean | null | undefined;
|
|
16766
|
+
};
|
|
16767
|
+
type GetRewardCoupon = {
|
|
16768
|
+
/**
|
|
16769
|
+
* The unique identifier for the coupon.
|
|
16770
|
+
*/
|
|
16771
|
+
id: string;
|
|
16772
|
+
/**
|
|
16773
|
+
* A human-readable name for the coupon.
|
|
16774
|
+
*/
|
|
16775
|
+
name?: string | null | undefined;
|
|
16776
|
+
/**
|
|
16777
|
+
* The type of discount: percentage_discount, fixed_discount, or invoice_credits.
|
|
16778
|
+
*/
|
|
16779
|
+
type: GetRewardCouponType;
|
|
16780
|
+
/**
|
|
16781
|
+
* The discount value. A percentage for percentage_discount, or an amount for fixed_discount / invoice_credits.
|
|
16782
|
+
*/
|
|
16783
|
+
value: number;
|
|
16784
|
+
/**
|
|
16785
|
+
* How long the coupon applies once redeemed.
|
|
16786
|
+
*/
|
|
16787
|
+
duration: GetRewardDuration;
|
|
16788
|
+
/**
|
|
16789
|
+
* The plan IDs the coupon applies to, or null when it applies to all plans.
|
|
16790
|
+
*/
|
|
16791
|
+
planIds: Array<string> | null;
|
|
16792
|
+
/**
|
|
16793
|
+
* The promo codes customers can use to redeem the coupon.
|
|
16794
|
+
*/
|
|
16795
|
+
promoCodes: Array<GetRewardCouponPromoCode>;
|
|
16796
|
+
/**
|
|
16797
|
+
* The Unix timestamp (in milliseconds) when the coupon was created.
|
|
16798
|
+
*/
|
|
16799
|
+
createdAt: number;
|
|
16800
|
+
};
|
|
16801
|
+
/**
|
|
16802
|
+
* The unit of time the grant lasts.
|
|
16803
|
+
*/
|
|
16804
|
+
declare const GetRewardExpiryType: {
|
|
16805
|
+
readonly Day: "day";
|
|
16806
|
+
readonly Week: "week";
|
|
16807
|
+
readonly Month: "month";
|
|
16808
|
+
readonly Year: "year";
|
|
16809
|
+
};
|
|
16810
|
+
/**
|
|
16811
|
+
* The unit of time the grant lasts.
|
|
16812
|
+
*/
|
|
16813
|
+
type GetRewardExpiryType = OpenEnum<typeof GetRewardExpiryType>;
|
|
16814
|
+
type GetRewardExpiry = {
|
|
16815
|
+
/**
|
|
16816
|
+
* The unit of time the grant lasts.
|
|
16817
|
+
*/
|
|
16818
|
+
type: GetRewardExpiryType;
|
|
16819
|
+
/**
|
|
16820
|
+
* The positive integer count of periods before the grant expires.
|
|
16821
|
+
*/
|
|
16822
|
+
length: number;
|
|
16823
|
+
};
|
|
16824
|
+
type GetRewardGrant = {
|
|
16825
|
+
/**
|
|
16826
|
+
* The feature ID this grant applies to.
|
|
16827
|
+
*/
|
|
16828
|
+
featureId: string;
|
|
16829
|
+
/**
|
|
16830
|
+
* The amount of the feature granted, or null for boolean features.
|
|
16831
|
+
*/
|
|
16832
|
+
included: number | null;
|
|
16833
|
+
/**
|
|
16834
|
+
* How long the granted amount lasts before expiring, or null for a permanent grant.
|
|
16835
|
+
*/
|
|
16836
|
+
expiry: GetRewardExpiry | null;
|
|
16837
|
+
};
|
|
16838
|
+
type GetRewardFeatureGrantPromoCode = {
|
|
16839
|
+
/**
|
|
16840
|
+
* The promo code customers enter to redeem the feature grant.
|
|
16841
|
+
*/
|
|
16842
|
+
code: string;
|
|
16843
|
+
/**
|
|
16844
|
+
* Maximum number of times this promo code can be redeemed, or null for unlimited.
|
|
16845
|
+
*/
|
|
16846
|
+
maxUses: number | null;
|
|
16847
|
+
};
|
|
16848
|
+
type GetRewardFeatureGrant = {
|
|
16849
|
+
/**
|
|
16850
|
+
* The unique identifier for the feature grant.
|
|
16851
|
+
*/
|
|
16852
|
+
id: string;
|
|
16853
|
+
/**
|
|
16854
|
+
* A human-readable name for the feature grant.
|
|
16855
|
+
*/
|
|
16856
|
+
name?: string | null | undefined;
|
|
16857
|
+
/**
|
|
16858
|
+
* The feature grants awarded when the grant is redeemed.
|
|
16859
|
+
*/
|
|
16860
|
+
grants: Array<GetRewardGrant>;
|
|
16861
|
+
/**
|
|
16862
|
+
* The promo codes customers can use to redeem the feature grant.
|
|
16863
|
+
*/
|
|
16864
|
+
promoCodes: Array<GetRewardFeatureGrantPromoCode>;
|
|
16865
|
+
/**
|
|
16866
|
+
* The Unix timestamp (in milliseconds) when the feature grant was created.
|
|
16867
|
+
*/
|
|
16868
|
+
createdAt: number;
|
|
16869
|
+
};
|
|
16870
|
+
/**
|
|
16871
|
+
* OK
|
|
16872
|
+
*/
|
|
16873
|
+
type GetRewardResponse = {
|
|
16874
|
+
coupon?: GetRewardCoupon | undefined;
|
|
16875
|
+
featureGrant?: GetRewardFeatureGrant | undefined;
|
|
16876
|
+
};
|
|
16877
|
+
|
|
15597
16878
|
/**
|
|
15598
16879
|
* Base class for all HTTP errors.
|
|
15599
16880
|
*/
|
|
@@ -19165,6 +20446,70 @@ type ListPlansResponse = {
|
|
|
19165
20446
|
list: Array<ListPlansList>;
|
|
19166
20447
|
};
|
|
19167
20448
|
|
|
20449
|
+
type ListReferralProgramsParams = {};
|
|
20450
|
+
/**
|
|
20451
|
+
* When the reward is granted: on redemption, or when the redeemer checks out.
|
|
20452
|
+
*/
|
|
20453
|
+
declare const ListReferralProgramsRedeemOn: {
|
|
20454
|
+
readonly CustomerCreation: "customer_creation";
|
|
20455
|
+
readonly Checkout: "checkout";
|
|
20456
|
+
};
|
|
20457
|
+
/**
|
|
20458
|
+
* When the reward is granted: on redemption, or when the redeemer checks out.
|
|
20459
|
+
*/
|
|
20460
|
+
type ListReferralProgramsRedeemOn = OpenEnum<typeof ListReferralProgramsRedeemOn>;
|
|
20461
|
+
/**
|
|
20462
|
+
* Who receives the reward: the referrer only, or both parties.
|
|
20463
|
+
*/
|
|
20464
|
+
declare const ListReferralProgramsReceivedBy: {
|
|
20465
|
+
readonly Referrer: "referrer";
|
|
20466
|
+
readonly All: "all";
|
|
20467
|
+
};
|
|
20468
|
+
/**
|
|
20469
|
+
* Who receives the reward: the referrer only, or both parties.
|
|
20470
|
+
*/
|
|
20471
|
+
type ListReferralProgramsReceivedBy = OpenEnum<typeof ListReferralProgramsReceivedBy>;
|
|
20472
|
+
type ListReferralProgramsList = {
|
|
20473
|
+
/**
|
|
20474
|
+
* The unique identifier for the referral program.
|
|
20475
|
+
*/
|
|
20476
|
+
id: string;
|
|
20477
|
+
/**
|
|
20478
|
+
* The ID of the reward granted when a code is redeemed.
|
|
20479
|
+
*/
|
|
20480
|
+
rewardId: string;
|
|
20481
|
+
/**
|
|
20482
|
+
* When the reward is granted: on redemption, or when the redeemer checks out.
|
|
20483
|
+
*/
|
|
20484
|
+
redeemOn: ListReferralProgramsRedeemOn;
|
|
20485
|
+
/**
|
|
20486
|
+
* Who receives the reward: the referrer only, or both parties.
|
|
20487
|
+
*/
|
|
20488
|
+
receivedBy: ListReferralProgramsReceivedBy;
|
|
20489
|
+
/**
|
|
20490
|
+
* The maximum number of times a referral code can be redeemed.
|
|
20491
|
+
*/
|
|
20492
|
+
maxRedemptions?: number | null | undefined;
|
|
20493
|
+
/**
|
|
20494
|
+
* The plans whose checkout triggers the reward. Only used when redeem_on is checkout.
|
|
20495
|
+
*/
|
|
20496
|
+
planIds?: Array<string> | null | undefined;
|
|
20497
|
+
/**
|
|
20498
|
+
* Whether checkouts that start a trial should skip granting the reward.
|
|
20499
|
+
*/
|
|
20500
|
+
excludeTrial?: boolean | null | undefined;
|
|
20501
|
+
/**
|
|
20502
|
+
* The Unix timestamp (in milliseconds) when the referral program was created.
|
|
20503
|
+
*/
|
|
20504
|
+
createdAt: number;
|
|
20505
|
+
};
|
|
20506
|
+
/**
|
|
20507
|
+
* OK
|
|
20508
|
+
*/
|
|
20509
|
+
type ListReferralProgramsResponse = {
|
|
20510
|
+
list: Array<ListReferralProgramsList>;
|
|
20511
|
+
};
|
|
20512
|
+
|
|
19168
20513
|
type RewardsListParams = {};
|
|
19169
20514
|
/**
|
|
19170
20515
|
* The type of discount: percentage_discount, fixed_discount, or invoice_credits.
|
|
@@ -19217,7 +20562,7 @@ type ListRewardsCouponPromoCode = {
|
|
|
19217
20562
|
*/
|
|
19218
20563
|
firstTimeTransaction?: boolean | null | undefined;
|
|
19219
20564
|
};
|
|
19220
|
-
type
|
|
20565
|
+
type ListRewardsCoupon = {
|
|
19221
20566
|
/**
|
|
19222
20567
|
* The unique identifier for the coupon.
|
|
19223
20568
|
*/
|
|
@@ -19298,7 +20643,7 @@ type ListRewardsFeatureGrantPromoCode = {
|
|
|
19298
20643
|
*/
|
|
19299
20644
|
maxUses: number | null;
|
|
19300
20645
|
};
|
|
19301
|
-
type
|
|
20646
|
+
type ListRewardsFeatureGrant = {
|
|
19302
20647
|
/**
|
|
19303
20648
|
* The unique identifier for the feature grant.
|
|
19304
20649
|
*/
|
|
@@ -19327,11 +20672,11 @@ type ListRewardsResponse = {
|
|
|
19327
20672
|
/**
|
|
19328
20673
|
* The list of coupons configured for the organization.
|
|
19329
20674
|
*/
|
|
19330
|
-
coupons: Array<
|
|
20675
|
+
coupons: Array<ListRewardsCoupon>;
|
|
19331
20676
|
/**
|
|
19332
20677
|
* The list of feature grants configured for the organization.
|
|
19333
20678
|
*/
|
|
19334
|
-
featureGrants: Array<
|
|
20679
|
+
featureGrants: Array<ListRewardsFeatureGrant>;
|
|
19335
20680
|
};
|
|
19336
20681
|
|
|
19337
20682
|
type MintKeyParams = {
|
|
@@ -30118,6 +31463,7 @@ type UpdateLicenseParent = {
|
|
|
30118
31463
|
planId: string;
|
|
30119
31464
|
version: number;
|
|
30120
31465
|
};
|
|
31466
|
+
type CustomizeVariant2 = {};
|
|
30121
31467
|
/**
|
|
30122
31468
|
* Billing interval (e.g. 'month', 'year').
|
|
30123
31469
|
*/
|
|
@@ -30205,19 +31551,14 @@ type VariantAddItemAdditionalCurrency = {
|
|
|
30205
31551
|
*/
|
|
30206
31552
|
amount: number;
|
|
30207
31553
|
};
|
|
30208
|
-
type VariantTierAdditionalCurrency = {
|
|
30209
|
-
currency?: any | undefined;
|
|
30210
|
-
amount?: any | undefined;
|
|
30211
|
-
flatAmount?: any | undefined;
|
|
30212
|
-
};
|
|
30213
31554
|
type VariantTier = {
|
|
30214
|
-
to
|
|
31555
|
+
to?: any | undefined;
|
|
30215
31556
|
amount?: number | undefined;
|
|
30216
31557
|
flatAmount?: number | undefined;
|
|
30217
31558
|
/**
|
|
30218
31559
|
* Per-currency amounts for this tier. Tier boundaries ('to') are shared across all currencies.
|
|
30219
31560
|
*/
|
|
30220
|
-
additionalCurrencies?: Array<
|
|
31561
|
+
additionalCurrencies?: Array<any> | undefined;
|
|
30221
31562
|
};
|
|
30222
31563
|
declare const VariantTierBehavior: {
|
|
30223
31564
|
readonly Graduated: "graduated";
|
|
@@ -30605,7 +31946,7 @@ type VariantUsageLimitInterval = ClosedEnum<typeof VariantUsageLimitInterval>;
|
|
|
30605
31946
|
*/
|
|
30606
31947
|
type VariantFilter = {
|
|
30607
31948
|
properties: {
|
|
30608
|
-
[k: string]:
|
|
31949
|
+
[k: string]: any;
|
|
30609
31950
|
};
|
|
30610
31951
|
};
|
|
30611
31952
|
type VariantUsageLimit = {
|
|
@@ -30700,10 +32041,7 @@ type VariantBillingControls = {
|
|
|
30700
32041
|
*/
|
|
30701
32042
|
overageAllowed?: Array<VariantOverageAllowed> | undefined;
|
|
30702
32043
|
};
|
|
30703
|
-
|
|
30704
|
-
* The exact customize patch to apply to this variant.
|
|
30705
|
-
*/
|
|
30706
|
-
type VariantCustomize = {
|
|
32044
|
+
type CustomizeVariant1 = {
|
|
30707
32045
|
/**
|
|
30708
32046
|
* Override the base price of the plan. Pass null to remove the base price.
|
|
30709
32047
|
*/
|
|
@@ -30744,7 +32082,7 @@ type Variant = {
|
|
|
30744
32082
|
/**
|
|
30745
32083
|
* The exact customize patch to apply to this variant.
|
|
30746
32084
|
*/
|
|
30747
|
-
customize:
|
|
32085
|
+
customize: CustomizeVariant1 | CustomizeVariant2;
|
|
30748
32086
|
/**
|
|
30749
32087
|
* Edit this variant in place instead of versioning it for this update.
|
|
30750
32088
|
*/
|
|
@@ -32190,6 +33528,338 @@ type UpdatePlanResponse = {
|
|
|
32190
33528
|
customerEligibility?: UpdatePlanCustomerEligibility | undefined;
|
|
32191
33529
|
};
|
|
32192
33530
|
|
|
33531
|
+
/**
|
|
33532
|
+
* When the reward is granted: on redemption, or when the redeemer checks out.
|
|
33533
|
+
*/
|
|
33534
|
+
declare const UpdateReferralProgramRedeemOnRequest: {
|
|
33535
|
+
readonly CustomerCreation: "customer_creation";
|
|
33536
|
+
readonly Checkout: "checkout";
|
|
33537
|
+
};
|
|
33538
|
+
/**
|
|
33539
|
+
* When the reward is granted: on redemption, or when the redeemer checks out.
|
|
33540
|
+
*/
|
|
33541
|
+
type UpdateReferralProgramRedeemOnRequest = ClosedEnum<typeof UpdateReferralProgramRedeemOnRequest>;
|
|
33542
|
+
/**
|
|
33543
|
+
* Who receives the reward: the referrer only, or both parties.
|
|
33544
|
+
*/
|
|
33545
|
+
declare const UpdateReferralProgramReceivedByRequest: {
|
|
33546
|
+
readonly Referrer: "referrer";
|
|
33547
|
+
readonly All: "all";
|
|
33548
|
+
};
|
|
33549
|
+
/**
|
|
33550
|
+
* Who receives the reward: the referrer only, or both parties.
|
|
33551
|
+
*/
|
|
33552
|
+
type UpdateReferralProgramReceivedByRequest = ClosedEnum<typeof UpdateReferralProgramReceivedByRequest>;
|
|
33553
|
+
type UpdateReferralProgramParams = {
|
|
33554
|
+
/**
|
|
33555
|
+
* The ID of the referral program.
|
|
33556
|
+
*/
|
|
33557
|
+
referralProgramId: string;
|
|
33558
|
+
/**
|
|
33559
|
+
* The ID of the reward granted when a code is redeemed.
|
|
33560
|
+
*/
|
|
33561
|
+
rewardId?: string | undefined;
|
|
33562
|
+
/**
|
|
33563
|
+
* When the reward is granted: on redemption, or when the redeemer checks out.
|
|
33564
|
+
*/
|
|
33565
|
+
redeemOn?: UpdateReferralProgramRedeemOnRequest | undefined;
|
|
33566
|
+
/**
|
|
33567
|
+
* Who receives the reward: the referrer only, or both parties.
|
|
33568
|
+
*/
|
|
33569
|
+
receivedBy?: UpdateReferralProgramReceivedByRequest | undefined;
|
|
33570
|
+
/**
|
|
33571
|
+
* A positive redemption limit.
|
|
33572
|
+
*/
|
|
33573
|
+
maxRedemptions?: number | undefined;
|
|
33574
|
+
/**
|
|
33575
|
+
* Required when redeem_on is checkout. Plan IDs must be unique.
|
|
33576
|
+
*/
|
|
33577
|
+
planIds?: Array<string> | undefined;
|
|
33578
|
+
excludeTrial?: boolean | undefined;
|
|
33579
|
+
};
|
|
33580
|
+
/**
|
|
33581
|
+
* When the reward is granted: on redemption, or when the redeemer checks out.
|
|
33582
|
+
*/
|
|
33583
|
+
declare const UpdateReferralProgramRedeemOnResponse: {
|
|
33584
|
+
readonly CustomerCreation: "customer_creation";
|
|
33585
|
+
readonly Checkout: "checkout";
|
|
33586
|
+
};
|
|
33587
|
+
/**
|
|
33588
|
+
* When the reward is granted: on redemption, or when the redeemer checks out.
|
|
33589
|
+
*/
|
|
33590
|
+
type UpdateReferralProgramRedeemOnResponse = OpenEnum<typeof UpdateReferralProgramRedeemOnResponse>;
|
|
33591
|
+
/**
|
|
33592
|
+
* Who receives the reward: the referrer only, or both parties.
|
|
33593
|
+
*/
|
|
33594
|
+
declare const UpdateReferralProgramReceivedByResponse: {
|
|
33595
|
+
readonly Referrer: "referrer";
|
|
33596
|
+
readonly All: "all";
|
|
33597
|
+
};
|
|
33598
|
+
/**
|
|
33599
|
+
* Who receives the reward: the referrer only, or both parties.
|
|
33600
|
+
*/
|
|
33601
|
+
type UpdateReferralProgramReceivedByResponse = OpenEnum<typeof UpdateReferralProgramReceivedByResponse>;
|
|
33602
|
+
/**
|
|
33603
|
+
* OK
|
|
33604
|
+
*/
|
|
33605
|
+
type UpdateReferralProgramResponse = {
|
|
33606
|
+
/**
|
|
33607
|
+
* The unique identifier for the referral program.
|
|
33608
|
+
*/
|
|
33609
|
+
id: string;
|
|
33610
|
+
/**
|
|
33611
|
+
* The ID of the reward granted when a code is redeemed.
|
|
33612
|
+
*/
|
|
33613
|
+
rewardId: string;
|
|
33614
|
+
/**
|
|
33615
|
+
* When the reward is granted: on redemption, or when the redeemer checks out.
|
|
33616
|
+
*/
|
|
33617
|
+
redeemOn: UpdateReferralProgramRedeemOnResponse;
|
|
33618
|
+
/**
|
|
33619
|
+
* Who receives the reward: the referrer only, or both parties.
|
|
33620
|
+
*/
|
|
33621
|
+
receivedBy: UpdateReferralProgramReceivedByResponse;
|
|
33622
|
+
/**
|
|
33623
|
+
* The maximum number of times a referral code can be redeemed.
|
|
33624
|
+
*/
|
|
33625
|
+
maxRedemptions?: number | null | undefined;
|
|
33626
|
+
/**
|
|
33627
|
+
* The plans whose checkout triggers the reward. Only used when redeem_on is checkout.
|
|
33628
|
+
*/
|
|
33629
|
+
planIds?: Array<string> | null | undefined;
|
|
33630
|
+
/**
|
|
33631
|
+
* Whether checkouts that start a trial should skip granting the reward.
|
|
33632
|
+
*/
|
|
33633
|
+
excludeTrial?: boolean | null | undefined;
|
|
33634
|
+
/**
|
|
33635
|
+
* The Unix timestamp (in milliseconds) when the referral program was created.
|
|
33636
|
+
*/
|
|
33637
|
+
createdAt: number;
|
|
33638
|
+
};
|
|
33639
|
+
|
|
33640
|
+
type UpdateRewardCouponPromoCodeRequest = {
|
|
33641
|
+
code: string;
|
|
33642
|
+
globalMaxRedemption?: number | null | undefined;
|
|
33643
|
+
firstTimeTransaction?: boolean | null | undefined;
|
|
33644
|
+
};
|
|
33645
|
+
type UpdateRewardCouponRequest = {
|
|
33646
|
+
name?: string | undefined;
|
|
33647
|
+
/**
|
|
33648
|
+
* Plan IDs must be unique. Null applies the coupon to all plans.
|
|
33649
|
+
*/
|
|
33650
|
+
planIds?: Array<string> | null | undefined;
|
|
33651
|
+
/**
|
|
33652
|
+
* Replaces the existing promo codes when provided.
|
|
33653
|
+
*/
|
|
33654
|
+
promoCodes?: Array<UpdateRewardCouponPromoCodeRequest> | undefined;
|
|
33655
|
+
};
|
|
33656
|
+
/**
|
|
33657
|
+
* The unit of time the grant lasts.
|
|
33658
|
+
*/
|
|
33659
|
+
declare const UpdateRewardTypeRequestBody: {
|
|
33660
|
+
readonly Day: "day";
|
|
33661
|
+
readonly Week: "week";
|
|
33662
|
+
readonly Month: "month";
|
|
33663
|
+
readonly Year: "year";
|
|
33664
|
+
};
|
|
33665
|
+
/**
|
|
33666
|
+
* The unit of time the grant lasts.
|
|
33667
|
+
*/
|
|
33668
|
+
type UpdateRewardTypeRequestBody = ClosedEnum<typeof UpdateRewardTypeRequestBody>;
|
|
33669
|
+
type UpdateRewardExpiryRequest = {
|
|
33670
|
+
/**
|
|
33671
|
+
* The unit of time the grant lasts.
|
|
33672
|
+
*/
|
|
33673
|
+
type: UpdateRewardTypeRequestBody;
|
|
33674
|
+
/**
|
|
33675
|
+
* The positive integer count of periods before the grant expires.
|
|
33676
|
+
*/
|
|
33677
|
+
length: number;
|
|
33678
|
+
};
|
|
33679
|
+
type UpdateRewardGrantRequest = {
|
|
33680
|
+
featureId: string;
|
|
33681
|
+
included: number | null;
|
|
33682
|
+
/**
|
|
33683
|
+
* How long the granted amount lasts before expiring, or null for a permanent grant.
|
|
33684
|
+
*/
|
|
33685
|
+
expiry: UpdateRewardExpiryRequest | null;
|
|
33686
|
+
};
|
|
33687
|
+
type UpdateRewardFeatureGrantPromoCodeRequest = {
|
|
33688
|
+
code: string;
|
|
33689
|
+
maxUses: number | null;
|
|
33690
|
+
};
|
|
33691
|
+
type UpdateRewardFeatureGrantRequest = {
|
|
33692
|
+
name?: string | undefined;
|
|
33693
|
+
/**
|
|
33694
|
+
* Replaces the existing grants when provided.
|
|
33695
|
+
*/
|
|
33696
|
+
grants?: Array<UpdateRewardGrantRequest> | undefined;
|
|
33697
|
+
/**
|
|
33698
|
+
* Replaces the existing promo codes when provided.
|
|
33699
|
+
*/
|
|
33700
|
+
promoCodes?: Array<UpdateRewardFeatureGrantPromoCodeRequest> | undefined;
|
|
33701
|
+
};
|
|
33702
|
+
type UpdateRewardParams = {
|
|
33703
|
+
/**
|
|
33704
|
+
* The ID of the coupon or feature grant.
|
|
33705
|
+
*/
|
|
33706
|
+
rewardId: string;
|
|
33707
|
+
coupon?: UpdateRewardCouponRequest | undefined;
|
|
33708
|
+
featureGrant?: UpdateRewardFeatureGrantRequest | undefined;
|
|
33709
|
+
};
|
|
33710
|
+
/**
|
|
33711
|
+
* The type of discount: percentage_discount, fixed_discount, or invoice_credits.
|
|
33712
|
+
*/
|
|
33713
|
+
declare const UpdateRewardCouponType: {
|
|
33714
|
+
readonly PercentageDiscount: "percentage_discount";
|
|
33715
|
+
readonly FixedDiscount: "fixed_discount";
|
|
33716
|
+
readonly InvoiceCredits: "invoice_credits";
|
|
33717
|
+
};
|
|
33718
|
+
/**
|
|
33719
|
+
* The type of discount: percentage_discount, fixed_discount, or invoice_credits.
|
|
33720
|
+
*/
|
|
33721
|
+
type UpdateRewardCouponType = OpenEnum<typeof UpdateRewardCouponType>;
|
|
33722
|
+
/**
|
|
33723
|
+
* The unit of time the duration is measured in.
|
|
33724
|
+
*/
|
|
33725
|
+
declare const UpdateRewardDurationType: {
|
|
33726
|
+
readonly OneOff: "one_off";
|
|
33727
|
+
readonly Months: "months";
|
|
33728
|
+
readonly Forever: "forever";
|
|
33729
|
+
};
|
|
33730
|
+
/**
|
|
33731
|
+
* The unit of time the duration is measured in.
|
|
33732
|
+
*/
|
|
33733
|
+
type UpdateRewardDurationType = OpenEnum<typeof UpdateRewardDurationType>;
|
|
33734
|
+
/**
|
|
33735
|
+
* How long the coupon applies once redeemed.
|
|
33736
|
+
*/
|
|
33737
|
+
type UpdateRewardDuration = {
|
|
33738
|
+
/**
|
|
33739
|
+
* The unit of time the duration is measured in.
|
|
33740
|
+
*/
|
|
33741
|
+
type: UpdateRewardDurationType;
|
|
33742
|
+
/**
|
|
33743
|
+
* The number of `type` periods the duration lasts, or null when the type has no length (e.g. one_off, forever).
|
|
33744
|
+
*/
|
|
33745
|
+
length: number | null;
|
|
33746
|
+
};
|
|
33747
|
+
type UpdateRewardCouponPromoCodeResponse = {
|
|
33748
|
+
/**
|
|
33749
|
+
* The promo code customers enter to redeem the coupon.
|
|
33750
|
+
*/
|
|
33751
|
+
code: string;
|
|
33752
|
+
/**
|
|
33753
|
+
* Maximum number of times this promo code can be redeemed across all customers, or null for unlimited.
|
|
33754
|
+
*/
|
|
33755
|
+
globalMaxRedemption?: number | null | undefined;
|
|
33756
|
+
/**
|
|
33757
|
+
* Whether this promo code can only be applied to a customer's first transaction.
|
|
33758
|
+
*/
|
|
33759
|
+
firstTimeTransaction?: boolean | null | undefined;
|
|
33760
|
+
};
|
|
33761
|
+
type UpdateRewardCoupon = {
|
|
33762
|
+
/**
|
|
33763
|
+
* The unique identifier for the coupon.
|
|
33764
|
+
*/
|
|
33765
|
+
id: string;
|
|
33766
|
+
/**
|
|
33767
|
+
* A human-readable name for the coupon.
|
|
33768
|
+
*/
|
|
33769
|
+
name?: string | null | undefined;
|
|
33770
|
+
/**
|
|
33771
|
+
* The type of discount: percentage_discount, fixed_discount, or invoice_credits.
|
|
33772
|
+
*/
|
|
33773
|
+
type: UpdateRewardCouponType;
|
|
33774
|
+
/**
|
|
33775
|
+
* The discount value. A percentage for percentage_discount, or an amount for fixed_discount / invoice_credits.
|
|
33776
|
+
*/
|
|
33777
|
+
value: number;
|
|
33778
|
+
/**
|
|
33779
|
+
* How long the coupon applies once redeemed.
|
|
33780
|
+
*/
|
|
33781
|
+
duration: UpdateRewardDuration;
|
|
33782
|
+
/**
|
|
33783
|
+
* The plan IDs the coupon applies to, or null when it applies to all plans.
|
|
33784
|
+
*/
|
|
33785
|
+
planIds: Array<string> | null;
|
|
33786
|
+
promoCodes: Array<UpdateRewardCouponPromoCodeResponse>;
|
|
33787
|
+
/**
|
|
33788
|
+
* The Unix timestamp (in milliseconds) when the coupon was created.
|
|
33789
|
+
*/
|
|
33790
|
+
createdAt: number;
|
|
33791
|
+
};
|
|
33792
|
+
/**
|
|
33793
|
+
* The unit of time the grant lasts.
|
|
33794
|
+
*/
|
|
33795
|
+
declare const UpdateRewardExpiryTypeResponse: {
|
|
33796
|
+
readonly Day: "day";
|
|
33797
|
+
readonly Week: "week";
|
|
33798
|
+
readonly Month: "month";
|
|
33799
|
+
readonly Year: "year";
|
|
33800
|
+
};
|
|
33801
|
+
/**
|
|
33802
|
+
* The unit of time the grant lasts.
|
|
33803
|
+
*/
|
|
33804
|
+
type UpdateRewardExpiryTypeResponse = OpenEnum<typeof UpdateRewardExpiryTypeResponse>;
|
|
33805
|
+
type UpdateRewardExpiryResponse = {
|
|
33806
|
+
/**
|
|
33807
|
+
* The unit of time the grant lasts.
|
|
33808
|
+
*/
|
|
33809
|
+
type: UpdateRewardExpiryTypeResponse;
|
|
33810
|
+
/**
|
|
33811
|
+
* The positive integer count of periods before the grant expires.
|
|
33812
|
+
*/
|
|
33813
|
+
length: number;
|
|
33814
|
+
};
|
|
33815
|
+
type UpdateRewardGrantResponse = {
|
|
33816
|
+
/**
|
|
33817
|
+
* The feature ID this grant applies to.
|
|
33818
|
+
*/
|
|
33819
|
+
featureId: string;
|
|
33820
|
+
/**
|
|
33821
|
+
* The amount of the feature granted, or null for boolean features.
|
|
33822
|
+
*/
|
|
33823
|
+
included: number | null;
|
|
33824
|
+
/**
|
|
33825
|
+
* How long the granted amount lasts before expiring, or null for a permanent grant.
|
|
33826
|
+
*/
|
|
33827
|
+
expiry: UpdateRewardExpiryResponse | null;
|
|
33828
|
+
};
|
|
33829
|
+
type UpdateRewardFeatureGrantPromoCodeResponse = {
|
|
33830
|
+
/**
|
|
33831
|
+
* The promo code customers enter to redeem the feature grant.
|
|
33832
|
+
*/
|
|
33833
|
+
code: string;
|
|
33834
|
+
/**
|
|
33835
|
+
* Maximum number of times this promo code can be redeemed, or null for unlimited.
|
|
33836
|
+
*/
|
|
33837
|
+
maxUses: number | null;
|
|
33838
|
+
};
|
|
33839
|
+
type UpdateRewardFeatureGrant = {
|
|
33840
|
+
/**
|
|
33841
|
+
* The unique identifier for the feature grant.
|
|
33842
|
+
*/
|
|
33843
|
+
id: string;
|
|
33844
|
+
/**
|
|
33845
|
+
* A human-readable name for the feature grant.
|
|
33846
|
+
*/
|
|
33847
|
+
name?: string | null | undefined;
|
|
33848
|
+
grants: Array<UpdateRewardGrantResponse>;
|
|
33849
|
+
promoCodes: Array<UpdateRewardFeatureGrantPromoCodeResponse>;
|
|
33850
|
+
/**
|
|
33851
|
+
* The Unix timestamp (in milliseconds) when the feature grant was created.
|
|
33852
|
+
*/
|
|
33853
|
+
createdAt: number;
|
|
33854
|
+
};
|
|
33855
|
+
/**
|
|
33856
|
+
* OK
|
|
33857
|
+
*/
|
|
33858
|
+
type UpdateRewardResponse = {
|
|
33859
|
+
coupon?: UpdateRewardCoupon | undefined;
|
|
33860
|
+
featureGrant?: UpdateRewardFeatureGrant | undefined;
|
|
33861
|
+
};
|
|
33862
|
+
|
|
32193
33863
|
type OAuth2PasswordFlow = {
|
|
32194
33864
|
username: string;
|
|
32195
33865
|
password: string;
|
|
@@ -32459,7 +34129,8 @@ declare class Billing extends ClientSDK {
|
|
|
32459
34129
|
* @param billingBehavior - Whether to prorate the immediate phase. 'none' skips proration charges and credits. (optional)
|
|
32460
34130
|
* @param billingCycleAnchor - Pass 'now' to reset the billing cycle anchor of the immediate phase to the current time. (optional)
|
|
32461
34131
|
* @param enablePlanImmediately - If true, the immediate-phase cusProducts are activated immediately (and scheduled-phase cusProducts pre-inserted) even when payment is pending via Stripe checkout. The Autumn schedule rows are persisted on checkout.session.completed. (optional)
|
|
32462
|
-
* @param preserveAddOns -
|
|
34132
|
+
* @param preserveAddOns - Deprecated and ignored. Active plans the schedule does not declare are always retained. (optional)
|
|
34133
|
+
* @param unscheduledPlans - Plans billed with the immediate phase that the schedule never expires or replaces. No phase may declare a plan in the same group and scope. (optional)
|
|
32463
34134
|
* @param phases - Ordered phase definitions for the schedule.
|
|
32464
34135
|
*
|
|
32465
34136
|
* @returns A create-schedule response with the schedule ID, persisted phases, and any required payment or checkout URL.
|
|
@@ -33292,6 +34963,22 @@ declare class Referrals extends ClientSDK {
|
|
|
33292
34963
|
* Create a referral program linked to an existing reward.
|
|
33293
34964
|
*/
|
|
33294
34965
|
createProgram(request: CreateReferralProgramParams, options?: RequestOptions): Promise<CreateReferralProgramResponse>;
|
|
34966
|
+
/**
|
|
34967
|
+
* List the referral programs configured for the org.
|
|
34968
|
+
*/
|
|
34969
|
+
listPrograms(request?: ListReferralProgramsParams | undefined, options?: RequestOptions): Promise<ListReferralProgramsResponse>;
|
|
34970
|
+
/**
|
|
34971
|
+
* Fetch a referral program by ID.
|
|
34972
|
+
*/
|
|
34973
|
+
getProgram(request: GetReferralProgramParams, options?: RequestOptions): Promise<GetReferralProgramResponse>;
|
|
34974
|
+
/**
|
|
34975
|
+
* Update a referral program. Omitted fields keep their current value.
|
|
34976
|
+
*/
|
|
34977
|
+
updateProgram(request: UpdateReferralProgramParams, options?: RequestOptions): Promise<UpdateReferralProgramResponse>;
|
|
34978
|
+
/**
|
|
34979
|
+
* Delete a referral program.
|
|
34980
|
+
*/
|
|
34981
|
+
deleteProgram(request: DeleteReferralProgramParams, options?: RequestOptions): Promise<DeleteReferralProgramResponse>;
|
|
33295
34982
|
}
|
|
33296
34983
|
|
|
33297
34984
|
declare class Rewards extends ClientSDK {
|
|
@@ -33303,6 +34990,18 @@ declare class Rewards extends ClientSDK {
|
|
|
33303
34990
|
* List the coupons and feature grants configured for the org.
|
|
33304
34991
|
*/
|
|
33305
34992
|
list(request?: RewardsListParams | undefined, options?: RequestOptions): Promise<ListRewardsResponse>;
|
|
34993
|
+
/**
|
|
34994
|
+
* Fetch a coupon or feature grant by ID.
|
|
34995
|
+
*/
|
|
34996
|
+
get(request: GetRewardParams, options?: RequestOptions): Promise<GetRewardResponse>;
|
|
34997
|
+
/**
|
|
34998
|
+
* Update a coupon or feature grant. Omitted fields keep their current value.
|
|
34999
|
+
*/
|
|
35000
|
+
update(request: UpdateRewardParams, options?: RequestOptions): Promise<UpdateRewardResponse>;
|
|
35001
|
+
/**
|
|
35002
|
+
* Delete a coupon or feature grant.
|
|
35003
|
+
*/
|
|
35004
|
+
delete(request: DeleteRewardParams, options?: RequestOptions): Promise<DeleteRewardResponse>;
|
|
33306
35005
|
/**
|
|
33307
35006
|
* Redeem a reward promo code for a customer.
|
|
33308
35007
|
*/
|