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