autumn-js 1.2.53 → 1.2.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/backend/adapters/express.js +4928 -1731
- package/dist/backend/adapters/express.mjs +6 -6
- package/dist/backend/adapters/fetch.js +4928 -1731
- package/dist/backend/adapters/fetch.mjs +6 -6
- package/dist/backend/adapters/hono.js +4928 -1731
- package/dist/backend/adapters/hono.mjs +6 -6
- package/dist/backend/adapters/index.js +4928 -1731
- package/dist/backend/adapters/index.mjs +9 -9
- package/dist/backend/adapters/next.js +4928 -1731
- package/dist/backend/adapters/next.mjs +6 -6
- package/dist/backend/{chunk-QZGNWKGU.mjs → chunk-4SLVJJQ3.mjs} +415 -149
- package/dist/backend/{chunk-UO2U5YHG.mjs → chunk-6O2BRQQG.mjs} +1 -1
- package/dist/backend/{chunk-BZJMZLRO.mjs → chunk-CTDUPQOB.mjs} +2 -2
- package/dist/backend/{chunk-DUWBM6AP.mjs → chunk-HBCBE5EZ.mjs} +2 -2
- package/dist/backend/{chunk-G5BNVBAL.mjs → chunk-QP3VSL4U.mjs} +1 -1
- package/dist/backend/{chunk-6HGIR6SI.mjs → chunk-V6O5INQW.mjs} +1 -1
- package/dist/backend/{chunk-QEMMOYX7.mjs → chunk-W4YHYDGM.mjs} +1 -1
- package/dist/backend/{chunk-AKZ3LI43.mjs → chunk-Z3CFUICE.mjs} +4513 -1582
- package/dist/backend/core/handlers/coreHandler.d.mts +1 -1
- package/dist/backend/core/handlers/coreHandler.d.ts +1 -1
- package/dist/backend/core/handlers/coreHandler.js +4928 -1731
- package/dist/backend/core/handlers/coreHandler.mjs +4 -4
- package/dist/backend/core/handlers/executeRoute.d.mts +1 -1
- package/dist/backend/core/handlers/executeRoute.d.ts +1 -1
- package/dist/backend/core/handlers/executeRoute.mjs +1 -1
- package/dist/backend/core/handlers/handleRouteByName.js +4928 -1731
- package/dist/backend/core/handlers/handleRouteByName.mjs +4 -4
- package/dist/backend/core/handlers/index.d.mts +1 -1
- package/dist/backend/core/handlers/index.d.ts +1 -1
- package/dist/backend/core/handlers/index.js +4928 -1731
- package/dist/backend/core/handlers/index.mjs +5 -5
- package/dist/backend/core/index.d.mts +1 -1
- package/dist/backend/core/index.d.ts +1 -1
- package/dist/backend/core/index.js +4928 -1731
- package/dist/backend/core/index.mjs +7 -7
- package/dist/backend/core/routes/index.d.mts +1 -1
- package/dist/backend/core/routes/index.d.ts +1 -1
- package/dist/backend/core/routes/index.js +415 -149
- package/dist/backend/core/routes/index.mjs +2 -2
- package/dist/backend/core/routes/routeBuilder.d.mts +1 -1
- package/dist/backend/core/routes/routeBuilder.d.ts +1 -1
- package/dist/backend/core/routes/routeConfigs.d.mts +1 -1
- package/dist/backend/core/routes/routeConfigs.d.ts +1 -1
- package/dist/backend/core/routes/routeConfigs.js +415 -149
- package/dist/backend/core/routes/routeConfigs.mjs +2 -2
- package/dist/backend/core/types/handlerTypes.d.mts +1 -1
- package/dist/backend/core/types/handlerTypes.d.ts +1 -1
- package/dist/backend/core/types/index.d.mts +1 -1
- package/dist/backend/core/types/index.d.ts +1 -1
- package/dist/backend/core/types/routeTypes.d.mts +1 -1
- package/dist/backend/core/types/routeTypes.d.ts +1 -1
- package/dist/backend/core/utils/index.mjs +3 -3
- package/dist/backend/index.d.mts +2 -2
- package/dist/backend/index.d.ts +2 -2
- package/dist/backend/index.js +4928 -1731
- package/dist/backend/index.mjs +7 -7
- package/dist/backend/{routeTypes-jEkjrH2F.d.mts → routeTypes-BDnJulPJ.d.mts} +4748 -1657
- package/dist/backend/{routeTypes-C9oAOQtZ.d.ts → routeTypes-Cx-p8x5O.d.ts} +4748 -1657
- package/dist/better-auth/{chunk-56PNBTLH.mjs → chunk-EVKS2OKA.mjs} +1 -1
- package/dist/better-auth/{chunk-AI73OSOF.mjs → chunk-JQU4W6BA.mjs} +4514 -1583
- package/dist/better-auth/{chunk-IIOL3QPN.mjs → chunk-ODDA4I3O.mjs} +415 -149
- package/dist/better-auth/index.js +4928 -1731
- package/dist/better-auth/index.mjs +3 -3
- package/dist/better-auth/utils/createAutumnEndpoint.js +415 -149
- package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
- package/dist/better-auth/utils/handleBetterAuthRoute.js +4928 -1731
- package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
- package/dist/better-auth/utils/index.js +4928 -1731
- package/dist/better-auth/utils/index.mjs +3 -3
- package/dist/react/AutumnContext.d.mts +4 -4
- package/dist/react/AutumnContext.d.ts +4 -4
- package/dist/react/{chunk-CQF3ER2L.mjs → chunk-JV4GHJ4W.mjs} +1 -1
- package/dist/react/{chunk-D6DFRS3U.mjs → chunk-NDHIXCZM.mjs} +2 -1
- package/dist/react/{chunk-BWKG32GC.mjs → chunk-Q7HVHWDK.mjs} +1 -1
- package/dist/react/{chunk-LUBYNTYC.mjs → chunk-VKY4SZNZ.mjs} +1 -1
- package/dist/react/client/AutumnClient.d.mts +4 -4
- package/dist/react/client/AutumnClient.d.ts +4 -4
- package/dist/react/client/IAutumnClient.d.mts +4 -4
- package/dist/react/client/IAutumnClient.d.ts +4 -4
- package/dist/react/client/index.d.mts +4 -4
- package/dist/react/client/index.d.ts +4 -4
- package/dist/react/{customer-4XLHVIIG.d.mts → customer-DyNLAM-_.d.ts} +74 -9
- package/dist/react/{customer-CPv9i8iR.d.ts → customer-Dz1Fr6nJ.d.mts} +74 -9
- package/dist/react/hooks/index.d.mts +4 -4
- package/dist/react/hooks/index.d.ts +4 -4
- package/dist/react/hooks/index.js +2 -1
- package/dist/react/hooks/index.mjs +4 -4
- package/dist/react/hooks/internal/check/balanceToAllowed.d.mts +2 -2
- package/dist/react/hooks/internal/check/balanceToAllowed.d.ts +2 -2
- package/dist/react/hooks/internal/check/customerToFeatures.d.mts +2 -2
- package/dist/react/hooks/internal/check/customerToFeatures.d.ts +2 -2
- package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.mts +2 -2
- package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.ts +2 -2
- package/dist/react/hooks/internal/check/getCreditCost.d.mts +2 -2
- package/dist/react/hooks/internal/check/getCreditCost.d.ts +2 -2
- package/dist/react/hooks/internal/check/getCreditCost.js +2 -1
- package/dist/react/hooks/internal/check/getCreditCost.mjs +1 -1
- package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +3 -3
- package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +3 -3
- package/dist/react/hooks/internal/getLocalCheckResponse.js +2 -1
- package/dist/react/hooks/internal/getLocalCheckResponse.mjs +2 -2
- package/dist/react/hooks/internal/useCustomerActions.d.mts +4 -4
- package/dist/react/hooks/internal/useCustomerActions.d.ts +4 -4
- package/dist/react/hooks/internal/useCustomerActions.js +2 -1
- package/dist/react/hooks/internal/useCustomerActions.mjs +3 -3
- package/dist/react/hooks/useAggregateEvents.d.mts +2 -2
- package/dist/react/hooks/useAggregateEvents.d.ts +2 -2
- package/dist/react/hooks/useCustomer.d.mts +3 -3
- package/dist/react/hooks/useCustomer.d.ts +3 -3
- package/dist/react/hooks/useCustomer.js +2 -1
- package/dist/react/hooks/useCustomer.mjs +4 -4
- package/dist/react/hooks/useEntity.d.mts +2 -2
- package/dist/react/hooks/useEntity.d.ts +2 -2
- package/dist/react/hooks/useListEvents.d.mts +2 -2
- package/dist/react/hooks/useListEvents.d.ts +2 -2
- package/dist/react/hooks/useListPlans.d.mts +3 -3
- package/dist/react/hooks/useListPlans.d.ts +3 -3
- package/dist/react/hooks/useReferrals.d.mts +2 -2
- package/dist/react/hooks/useReferrals.d.ts +2 -2
- package/dist/react/index.d.mts +4 -4
- package/dist/react/index.d.ts +4 -4
- package/dist/react/index.js +2 -1
- package/dist/react/index.mjs +4 -4
- package/dist/react/{list-plans-op-Dsryi9lT.d.mts → list-plans-op-DTkteoH6.d.ts} +656 -468
- package/dist/react/{list-plans-op-jsAtkFHJ.d.ts → list-plans-op-ZRs2lBAB.d.mts} +656 -468
- package/dist/react/{params-BGfGRnue.d.ts → params-BiUwODRL.d.mts} +628 -86
- package/dist/react/{params-DPSGMHHa.d.mts → params-DIglFpGj.d.ts} +628 -86
- package/dist/react/{plan-DEGPMYmh.d.mts → plan-C96AilzT.d.mts} +798 -374
- package/dist/react/{plan-DEGPMYmh.d.ts → plan-C96AilzT.d.ts} +798 -374
- package/dist/sdk/index.d.mts +6891 -2819
- package/dist/sdk/index.d.ts +6891 -2819
- package/dist/sdk/index.js +6582 -1771
- package/dist/sdk/index.mjs +5949 -1670
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as OpenEnum } from './plan-
|
|
1
|
+
import { O as OpenEnum } from './plan-C96AilzT.mjs';
|
|
2
2
|
|
|
3
3
|
type ListPlansAdditionalCurrency = {
|
|
4
4
|
/**
|
|
@@ -40,7 +40,7 @@ type ListPlansPriceDisplay = {
|
|
|
40
40
|
};
|
|
41
41
|
type ListPlansPrice = {
|
|
42
42
|
/**
|
|
43
|
-
* Base price amount for the plan.
|
|
43
|
+
* Base price amount for the plan, in major currency units (e.g. dollars).
|
|
44
44
|
*/
|
|
45
45
|
amount: number;
|
|
46
46
|
/**
|
|
@@ -381,645 +381,654 @@ declare const ListPlansEnv: {
|
|
|
381
381
|
*/
|
|
382
382
|
type ListPlansEnv = OpenEnum<typeof ListPlansEnv>;
|
|
383
383
|
/**
|
|
384
|
-
*
|
|
384
|
+
* Miscellaneous plan-level configuration flags.
|
|
385
385
|
*/
|
|
386
|
-
|
|
387
|
-
|
|
386
|
+
type ListPlansConfig = {
|
|
387
|
+
/**
|
|
388
|
+
* If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past_due state.
|
|
389
|
+
*/
|
|
390
|
+
ignorePastDue: boolean;
|
|
391
|
+
};
|
|
392
|
+
/**
|
|
393
|
+
* The time interval for the purchase limit window.
|
|
394
|
+
*/
|
|
395
|
+
declare const ListPlansPurchaseLimitInterval: {
|
|
396
|
+
readonly Hour: "hour";
|
|
397
|
+
readonly Day: "day";
|
|
388
398
|
readonly Week: "week";
|
|
389
399
|
readonly Month: "month";
|
|
390
|
-
readonly Quarter: "quarter";
|
|
391
|
-
readonly SemiAnnual: "semi_annual";
|
|
392
|
-
readonly Year: "year";
|
|
393
400
|
};
|
|
394
401
|
/**
|
|
395
|
-
*
|
|
402
|
+
* The time interval for the purchase limit window.
|
|
396
403
|
*/
|
|
397
|
-
type
|
|
398
|
-
|
|
404
|
+
type ListPlansPurchaseLimitInterval = OpenEnum<typeof ListPlansPurchaseLimitInterval>;
|
|
405
|
+
/**
|
|
406
|
+
* Optional rate limit to cap how often auto top-ups occur.
|
|
407
|
+
*/
|
|
408
|
+
type ListPlansPurchaseLimit = {
|
|
399
409
|
/**
|
|
400
|
-
*
|
|
410
|
+
* The time interval for the purchase limit window.
|
|
401
411
|
*/
|
|
402
|
-
|
|
412
|
+
interval: ListPlansPurchaseLimitInterval;
|
|
403
413
|
/**
|
|
404
|
-
*
|
|
414
|
+
* Number of intervals in the purchase limit window.
|
|
405
415
|
*/
|
|
406
|
-
|
|
416
|
+
intervalCount: number;
|
|
417
|
+
/**
|
|
418
|
+
* Maximum number of auto top-ups allowed within the interval.
|
|
419
|
+
*/
|
|
420
|
+
limit: number;
|
|
407
421
|
};
|
|
408
|
-
|
|
409
|
-
* Base price configuration for a plan.
|
|
410
|
-
*/
|
|
411
|
-
type ListPlansBasePrice = {
|
|
422
|
+
type ListPlansAutoTopup = {
|
|
412
423
|
/**
|
|
413
|
-
*
|
|
424
|
+
* The ID of the feature (credit balance) to auto top-up.
|
|
414
425
|
*/
|
|
415
|
-
|
|
426
|
+
featureId: string;
|
|
416
427
|
/**
|
|
417
|
-
*
|
|
428
|
+
* Whether auto top-up is enabled.
|
|
418
429
|
*/
|
|
419
|
-
|
|
430
|
+
enabled: boolean;
|
|
420
431
|
/**
|
|
421
|
-
*
|
|
432
|
+
* When the balance drops below this threshold, an auto top-up will be purchased.
|
|
422
433
|
*/
|
|
423
|
-
|
|
434
|
+
threshold: number;
|
|
424
435
|
/**
|
|
425
|
-
*
|
|
436
|
+
* Amount of credits to add per auto top-up.
|
|
426
437
|
*/
|
|
427
|
-
|
|
438
|
+
quantity: number;
|
|
439
|
+
/**
|
|
440
|
+
* Optional rate limit to cap how often auto top-ups occur.
|
|
441
|
+
*/
|
|
442
|
+
purchaseLimit?: ListPlansPurchaseLimit | undefined;
|
|
443
|
+
/**
|
|
444
|
+
* When true, auto top-up creates a send_invoice invoice instead of auto-charging.
|
|
445
|
+
*/
|
|
446
|
+
invoiceMode?: boolean | undefined;
|
|
428
447
|
};
|
|
429
448
|
/**
|
|
430
|
-
*
|
|
449
|
+
* How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
|
|
431
450
|
*/
|
|
432
|
-
declare const
|
|
433
|
-
readonly
|
|
434
|
-
readonly
|
|
435
|
-
readonly Hour: "hour";
|
|
436
|
-
readonly Day: "day";
|
|
437
|
-
readonly Week: "week";
|
|
438
|
-
readonly Month: "month";
|
|
439
|
-
readonly Quarter: "quarter";
|
|
440
|
-
readonly SemiAnnual: "semi_annual";
|
|
441
|
-
readonly Year: "year";
|
|
451
|
+
declare const ListPlansLimitType: {
|
|
452
|
+
readonly Absolute: "absolute";
|
|
453
|
+
readonly UsagePercentage: "usage_percentage";
|
|
442
454
|
};
|
|
443
455
|
/**
|
|
444
|
-
*
|
|
445
|
-
*/
|
|
446
|
-
type ListPlansAddItemResetInterval = OpenEnum<typeof ListPlansAddItemResetInterval>;
|
|
447
|
-
/**
|
|
448
|
-
* Reset configuration for consumable features. Omit for non-consumable features like seats.
|
|
456
|
+
* How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
|
|
449
457
|
*/
|
|
450
|
-
type
|
|
458
|
+
type ListPlansLimitType = OpenEnum<typeof ListPlansLimitType>;
|
|
459
|
+
type ListPlansSpendLimit = {
|
|
451
460
|
/**
|
|
452
|
-
*
|
|
461
|
+
* Optional feature ID this spend limit applies to.
|
|
453
462
|
*/
|
|
454
|
-
|
|
463
|
+
featureId?: string | undefined;
|
|
455
464
|
/**
|
|
456
|
-
*
|
|
465
|
+
* Whether the overage spend limit is enabled.
|
|
457
466
|
*/
|
|
458
|
-
|
|
459
|
-
};
|
|
460
|
-
type ListPlansAddItemAdditionalCurrency = {
|
|
467
|
+
enabled: boolean;
|
|
461
468
|
/**
|
|
462
|
-
*
|
|
469
|
+
* How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
|
|
463
470
|
*/
|
|
464
|
-
|
|
471
|
+
limitType?: ListPlansLimitType | undefined;
|
|
465
472
|
/**
|
|
466
|
-
*
|
|
473
|
+
* Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit_type is usage_percentage.
|
|
467
474
|
*/
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
flatAmount?: number | undefined;
|
|
474
|
-
additionalCurrencies?: Array<any | null> | undefined;
|
|
475
|
-
};
|
|
476
|
-
declare const ListPlansVariantDetailsTierBehavior: {
|
|
477
|
-
readonly Graduated: "graduated";
|
|
478
|
-
readonly Volume: "volume";
|
|
475
|
+
overageLimit?: number | undefined;
|
|
476
|
+
/**
|
|
477
|
+
* When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
|
|
478
|
+
*/
|
|
479
|
+
skipOverageBilling?: boolean | undefined;
|
|
479
480
|
};
|
|
480
|
-
type ListPlansVariantDetailsTierBehavior = OpenEnum<typeof ListPlansVariantDetailsTierBehavior>;
|
|
481
481
|
/**
|
|
482
|
-
*
|
|
482
|
+
* Interval for the cap, aligned to the customer's billing cycle.
|
|
483
483
|
*/
|
|
484
|
-
declare const
|
|
485
|
-
readonly
|
|
484
|
+
declare const ListPlansUsageLimitInterval: {
|
|
485
|
+
readonly Day: "day";
|
|
486
486
|
readonly Week: "week";
|
|
487
487
|
readonly Month: "month";
|
|
488
|
-
readonly Quarter: "quarter";
|
|
489
|
-
readonly SemiAnnual: "semi_annual";
|
|
490
488
|
readonly Year: "year";
|
|
491
489
|
};
|
|
492
490
|
/**
|
|
493
|
-
*
|
|
491
|
+
* Interval for the cap, aligned to the customer's billing cycle.
|
|
494
492
|
*/
|
|
495
|
-
type
|
|
493
|
+
type ListPlansUsageLimitInterval = OpenEnum<typeof ListPlansUsageLimitInterval>;
|
|
496
494
|
/**
|
|
497
|
-
* '
|
|
495
|
+
* Window alignment. 'billing_cycle' phases the interval to the customer's renewal time; 'utc' aligns to the UTC calendar.
|
|
498
496
|
*/
|
|
499
|
-
declare const
|
|
500
|
-
readonly
|
|
501
|
-
readonly
|
|
497
|
+
declare const ListPlansAnchor: {
|
|
498
|
+
readonly BillingCycle: "billing_cycle";
|
|
499
|
+
readonly Utc: "utc";
|
|
502
500
|
};
|
|
503
501
|
/**
|
|
504
|
-
* '
|
|
502
|
+
* Window alignment. 'billing_cycle' phases the interval to the customer's renewal time; 'utc' aligns to the UTC calendar.
|
|
505
503
|
*/
|
|
506
|
-
type
|
|
504
|
+
type ListPlansAnchor = OpenEnum<typeof ListPlansAnchor>;
|
|
507
505
|
/**
|
|
508
|
-
*
|
|
506
|
+
* When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
|
|
509
507
|
*/
|
|
510
|
-
type
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
* Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.
|
|
517
|
-
*/
|
|
518
|
-
additionalCurrencies?: Array<ListPlansAddItemAdditionalCurrency> | undefined;
|
|
508
|
+
type ListPlansFilter = {
|
|
509
|
+
properties: {
|
|
510
|
+
[k: string]: string;
|
|
511
|
+
};
|
|
512
|
+
};
|
|
513
|
+
type ListPlansUsageLimit = {
|
|
519
514
|
/**
|
|
520
|
-
*
|
|
515
|
+
* The feature this usage limit applies to.
|
|
521
516
|
*/
|
|
522
|
-
|
|
523
|
-
tierBehavior?: ListPlansVariantDetailsTierBehavior | undefined;
|
|
517
|
+
featureId: string;
|
|
524
518
|
/**
|
|
525
|
-
*
|
|
519
|
+
* Whether this usage limit is enabled.
|
|
526
520
|
*/
|
|
527
|
-
|
|
521
|
+
enabled: boolean;
|
|
528
522
|
/**
|
|
529
|
-
*
|
|
523
|
+
* Maximum units allowed per interval.
|
|
530
524
|
*/
|
|
531
|
-
|
|
525
|
+
limit: number;
|
|
532
526
|
/**
|
|
533
|
-
*
|
|
527
|
+
* Interval for the cap, aligned to the customer's billing cycle.
|
|
534
528
|
*/
|
|
535
|
-
|
|
529
|
+
interval: ListPlansUsageLimitInterval;
|
|
536
530
|
/**
|
|
537
|
-
* '
|
|
531
|
+
* Window alignment. 'billing_cycle' phases the interval to the customer's renewal time; 'utc' aligns to the UTC calendar.
|
|
538
532
|
*/
|
|
539
|
-
|
|
533
|
+
anchor?: ListPlansAnchor | undefined;
|
|
540
534
|
/**
|
|
541
|
-
*
|
|
535
|
+
* When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
|
|
542
536
|
*/
|
|
543
|
-
|
|
544
|
-
};
|
|
545
|
-
/**
|
|
546
|
-
* Billing behavior when quantity increases mid-cycle.
|
|
547
|
-
*/
|
|
548
|
-
declare const ListPlansOnIncrease: {
|
|
549
|
-
readonly BillImmediately: "bill_immediately";
|
|
550
|
-
readonly ProrateImmediately: "prorate_immediately";
|
|
551
|
-
readonly ProrateNextCycle: "prorate_next_cycle";
|
|
552
|
-
readonly BillNextCycle: "bill_next_cycle";
|
|
537
|
+
filter?: ListPlansFilter | undefined;
|
|
553
538
|
};
|
|
554
539
|
/**
|
|
555
|
-
*
|
|
556
|
-
*/
|
|
557
|
-
type ListPlansOnIncrease = OpenEnum<typeof ListPlansOnIncrease>;
|
|
558
|
-
/**
|
|
559
|
-
* Credit behavior when quantity decreases mid-cycle.
|
|
540
|
+
* Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
|
|
560
541
|
*/
|
|
561
|
-
declare const
|
|
562
|
-
readonly
|
|
563
|
-
readonly
|
|
564
|
-
readonly
|
|
565
|
-
readonly
|
|
566
|
-
readonly NoProrations: "no_prorations";
|
|
542
|
+
declare const ListPlansThresholdType: {
|
|
543
|
+
readonly Usage: "usage";
|
|
544
|
+
readonly UsagePercentage: "usage_percentage";
|
|
545
|
+
readonly Remaining: "remaining";
|
|
546
|
+
readonly RemainingPercentage: "remaining_percentage";
|
|
567
547
|
};
|
|
568
548
|
/**
|
|
569
|
-
*
|
|
570
|
-
*/
|
|
571
|
-
type ListPlansOnDecrease = OpenEnum<typeof ListPlansOnDecrease>;
|
|
572
|
-
/**
|
|
573
|
-
* Proration settings for prepaid features. Controls mid-cycle quantity change billing.
|
|
549
|
+
* Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
|
|
574
550
|
*/
|
|
575
|
-
type
|
|
576
|
-
|
|
577
|
-
* Billing behavior when quantity increases mid-cycle.
|
|
578
|
-
*/
|
|
579
|
-
onIncrease: ListPlansOnIncrease;
|
|
551
|
+
type ListPlansThresholdType = OpenEnum<typeof ListPlansThresholdType>;
|
|
552
|
+
type ListPlansUsageAlert = {
|
|
580
553
|
/**
|
|
581
|
-
*
|
|
554
|
+
* The feature ID this alert applies to.
|
|
582
555
|
*/
|
|
583
|
-
|
|
584
|
-
};
|
|
585
|
-
/**
|
|
586
|
-
* When rolled over units expire.
|
|
587
|
-
*/
|
|
588
|
-
declare const ListPlansVariantDetailsExpiryDurationType: {
|
|
589
|
-
readonly Month: "month";
|
|
590
|
-
readonly Forever: "forever";
|
|
591
|
-
};
|
|
592
|
-
/**
|
|
593
|
-
* When rolled over units expire.
|
|
594
|
-
*/
|
|
595
|
-
type ListPlansVariantDetailsExpiryDurationType = OpenEnum<typeof ListPlansVariantDetailsExpiryDurationType>;
|
|
596
|
-
/**
|
|
597
|
-
* Rollover config for unused units. If set, unused included units carry over.
|
|
598
|
-
*/
|
|
599
|
-
type ListPlansVariantDetailsRollover = {
|
|
556
|
+
featureId?: string | undefined;
|
|
600
557
|
/**
|
|
601
|
-
*
|
|
558
|
+
* Whether this usage alert is enabled.
|
|
602
559
|
*/
|
|
603
|
-
|
|
560
|
+
enabled: boolean;
|
|
604
561
|
/**
|
|
605
|
-
*
|
|
562
|
+
* 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).
|
|
606
563
|
*/
|
|
607
|
-
|
|
564
|
+
threshold: number;
|
|
608
565
|
/**
|
|
609
|
-
*
|
|
566
|
+
* Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
|
|
610
567
|
*/
|
|
611
|
-
|
|
568
|
+
thresholdType: ListPlansThresholdType;
|
|
612
569
|
/**
|
|
613
|
-
*
|
|
570
|
+
* Optional user-defined label to distinguish multiple alerts on the same feature.
|
|
614
571
|
*/
|
|
615
|
-
|
|
572
|
+
name?: string | undefined;
|
|
616
573
|
};
|
|
617
|
-
|
|
618
|
-
* Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
|
|
619
|
-
*/
|
|
620
|
-
type ListPlansPlanItem = {
|
|
574
|
+
type ListPlansOverageAllowed = {
|
|
621
575
|
/**
|
|
622
|
-
* The ID
|
|
576
|
+
* The feature ID this overage allowed control applies to.
|
|
623
577
|
*/
|
|
624
578
|
featureId: string;
|
|
625
579
|
/**
|
|
626
|
-
*
|
|
627
|
-
*/
|
|
628
|
-
included?: number | undefined;
|
|
629
|
-
/**
|
|
630
|
-
* If true, customer has unlimited access to this feature.
|
|
580
|
+
* Whether overage is allowed for this feature.
|
|
631
581
|
*/
|
|
632
|
-
|
|
582
|
+
enabled: boolean;
|
|
583
|
+
};
|
|
584
|
+
/**
|
|
585
|
+
* Plan-level billing controls used as customer defaults.
|
|
586
|
+
*/
|
|
587
|
+
type ListPlansBillingControls = {
|
|
633
588
|
/**
|
|
634
|
-
*
|
|
589
|
+
* List of auto top-up configurations per feature.
|
|
635
590
|
*/
|
|
636
|
-
|
|
591
|
+
autoTopups?: Array<ListPlansAutoTopup> | undefined;
|
|
637
592
|
/**
|
|
638
|
-
*
|
|
593
|
+
* List of overage spend limits per feature (caps overage spend).
|
|
639
594
|
*/
|
|
640
|
-
|
|
595
|
+
spendLimits?: Array<ListPlansSpendLimit> | undefined;
|
|
641
596
|
/**
|
|
642
|
-
*
|
|
597
|
+
* List of hard usage caps per feature (max units per interval).
|
|
643
598
|
*/
|
|
644
|
-
|
|
599
|
+
usageLimits?: Array<ListPlansUsageLimit> | undefined;
|
|
645
600
|
/**
|
|
646
|
-
*
|
|
601
|
+
* List of usage alert configurations per feature.
|
|
647
602
|
*/
|
|
648
|
-
|
|
603
|
+
usageAlerts?: Array<ListPlansUsageAlert> | undefined;
|
|
649
604
|
/**
|
|
650
|
-
*
|
|
605
|
+
* List of overage allowed controls per feature. When enabled, usage can exceed balance.
|
|
651
606
|
*/
|
|
652
|
-
|
|
607
|
+
overageAllowed?: Array<ListPlansOverageAllowed> | undefined;
|
|
653
608
|
};
|
|
654
609
|
/**
|
|
655
|
-
*
|
|
610
|
+
* The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
|
|
656
611
|
*/
|
|
657
|
-
declare const
|
|
658
|
-
readonly
|
|
659
|
-
readonly
|
|
612
|
+
declare const ListPlansStatus: {
|
|
613
|
+
readonly Active: "active";
|
|
614
|
+
readonly Scheduled: "scheduled";
|
|
660
615
|
};
|
|
661
616
|
/**
|
|
662
|
-
*
|
|
617
|
+
* The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
|
|
663
618
|
*/
|
|
664
|
-
type
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
readonly
|
|
670
|
-
readonly
|
|
671
|
-
readonly
|
|
672
|
-
readonly
|
|
673
|
-
readonly
|
|
674
|
-
readonly Year: "year";
|
|
675
|
-
};
|
|
676
|
-
type ListPlansIntervalRemoveItemEnum2 = OpenEnum<typeof ListPlansIntervalRemoveItemEnum2>;
|
|
677
|
-
declare const ListPlansIntervalRemoveItemEnum1: {
|
|
678
|
-
readonly OneOff: "one_off";
|
|
679
|
-
readonly Week: "week";
|
|
680
|
-
readonly Month: "month";
|
|
681
|
-
readonly Quarter: "quarter";
|
|
682
|
-
readonly SemiAnnual: "semi_annual";
|
|
683
|
-
readonly Year: "year";
|
|
619
|
+
type ListPlansStatus = OpenEnum<typeof ListPlansStatus>;
|
|
620
|
+
/**
|
|
621
|
+
* The action that would occur if this plan were attached to the customer.
|
|
622
|
+
*/
|
|
623
|
+
declare const ListPlansAttachAction: {
|
|
624
|
+
readonly Activate: "activate";
|
|
625
|
+
readonly Upgrade: "upgrade";
|
|
626
|
+
readonly Downgrade: "downgrade";
|
|
627
|
+
readonly None: "none";
|
|
628
|
+
readonly Purchase: "purchase";
|
|
684
629
|
};
|
|
685
|
-
type ListPlansIntervalRemoveItemEnum1 = OpenEnum<typeof ListPlansIntervalRemoveItemEnum1>;
|
|
686
630
|
/**
|
|
687
|
-
*
|
|
631
|
+
* The action that would occur if this plan were attached to the customer.
|
|
688
632
|
*/
|
|
689
|
-
type
|
|
633
|
+
type ListPlansAttachAction = OpenEnum<typeof ListPlansAttachAction>;
|
|
634
|
+
type ListPlansCustomerEligibility = {
|
|
690
635
|
/**
|
|
691
|
-
*
|
|
636
|
+
* Whether the trial on this plan is available to this customer. For example, if the customer used the trial in the past, this will be false.
|
|
692
637
|
*/
|
|
693
|
-
|
|
638
|
+
trialAvailable?: boolean | undefined;
|
|
694
639
|
/**
|
|
695
|
-
*
|
|
640
|
+
* The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
|
|
696
641
|
*/
|
|
697
|
-
|
|
642
|
+
status?: ListPlansStatus | undefined;
|
|
698
643
|
/**
|
|
699
|
-
*
|
|
644
|
+
* Whether the customer's active instance of this plan is set to cancel.
|
|
700
645
|
*/
|
|
701
|
-
|
|
646
|
+
canceling?: boolean | undefined;
|
|
702
647
|
/**
|
|
703
|
-
*
|
|
648
|
+
* Whether the customer is currently on a free trial of this plan.
|
|
704
649
|
*/
|
|
705
|
-
|
|
650
|
+
trialing?: boolean | undefined;
|
|
651
|
+
/**
|
|
652
|
+
* The action that would occur if this plan were attached to the customer.
|
|
653
|
+
*/
|
|
654
|
+
attachAction: ListPlansAttachAction;
|
|
706
655
|
};
|
|
707
656
|
/**
|
|
708
|
-
*
|
|
657
|
+
* Billing interval (e.g. 'month', 'year').
|
|
709
658
|
*/
|
|
710
|
-
declare const
|
|
711
|
-
readonly
|
|
659
|
+
declare const ListPlansPriceVariantDetailsInterval: {
|
|
660
|
+
readonly OneOff: "one_off";
|
|
661
|
+
readonly Week: "week";
|
|
712
662
|
readonly Month: "month";
|
|
663
|
+
readonly Quarter: "quarter";
|
|
664
|
+
readonly SemiAnnual: "semi_annual";
|
|
713
665
|
readonly Year: "year";
|
|
714
666
|
};
|
|
715
667
|
/**
|
|
716
|
-
*
|
|
717
|
-
*/
|
|
718
|
-
type ListPlansVariantDetailsDurationType = OpenEnum<typeof ListPlansVariantDetailsDurationType>;
|
|
719
|
-
/**
|
|
720
|
-
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
668
|
+
* Billing interval (e.g. 'month', 'year').
|
|
721
669
|
*/
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
670
|
+
type ListPlansPriceVariantDetailsInterval = OpenEnum<typeof ListPlansPriceVariantDetailsInterval>;
|
|
671
|
+
type ListPlansVariantDetailsAdditionalCurrency = {
|
|
672
|
+
/**
|
|
673
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
674
|
+
*/
|
|
675
|
+
currency: string;
|
|
676
|
+
/**
|
|
677
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
678
|
+
*/
|
|
679
|
+
amount: number;
|
|
725
680
|
};
|
|
726
681
|
/**
|
|
727
|
-
*
|
|
728
|
-
*/
|
|
729
|
-
type ListPlansVariantDetailsOnEnd = OpenEnum<typeof ListPlansVariantDetailsOnEnd>;
|
|
730
|
-
/**
|
|
731
|
-
* Free trial configuration for a plan.
|
|
682
|
+
* Base price configuration for a plan.
|
|
732
683
|
*/
|
|
733
|
-
type
|
|
684
|
+
type ListPlansBasePrice = {
|
|
734
685
|
/**
|
|
735
|
-
*
|
|
686
|
+
* Base price amount for the plan, in major currency units (e.g. dollars).
|
|
736
687
|
*/
|
|
737
|
-
|
|
688
|
+
amount: number;
|
|
738
689
|
/**
|
|
739
|
-
*
|
|
690
|
+
* Billing interval (e.g. 'month', 'year').
|
|
740
691
|
*/
|
|
741
|
-
|
|
692
|
+
interval: ListPlansPriceVariantDetailsInterval;
|
|
742
693
|
/**
|
|
743
|
-
*
|
|
694
|
+
* Number of intervals per billing cycle. Defaults to 1.
|
|
744
695
|
*/
|
|
745
|
-
|
|
696
|
+
intervalCount?: number | undefined;
|
|
746
697
|
/**
|
|
747
|
-
*
|
|
698
|
+
* Base price amounts in additional currencies. The base 'amount' is in the org's default currency.
|
|
748
699
|
*/
|
|
749
|
-
|
|
700
|
+
additionalCurrencies?: Array<ListPlansVariantDetailsAdditionalCurrency> | undefined;
|
|
750
701
|
};
|
|
751
702
|
/**
|
|
752
|
-
*
|
|
703
|
+
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
753
704
|
*/
|
|
754
|
-
declare const
|
|
705
|
+
declare const ListPlansAddItemResetInterval: {
|
|
706
|
+
readonly OneOff: "one_off";
|
|
707
|
+
readonly Minute: "minute";
|
|
755
708
|
readonly Hour: "hour";
|
|
756
709
|
readonly Day: "day";
|
|
757
710
|
readonly Week: "week";
|
|
758
711
|
readonly Month: "month";
|
|
712
|
+
readonly Quarter: "quarter";
|
|
713
|
+
readonly SemiAnnual: "semi_annual";
|
|
714
|
+
readonly Year: "year";
|
|
759
715
|
};
|
|
760
716
|
/**
|
|
761
|
-
*
|
|
717
|
+
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
762
718
|
*/
|
|
763
|
-
type
|
|
719
|
+
type ListPlansAddItemResetInterval = OpenEnum<typeof ListPlansAddItemResetInterval>;
|
|
764
720
|
/**
|
|
765
|
-
*
|
|
721
|
+
* Reset configuration for consumable features. Omit for non-consumable features like seats.
|
|
766
722
|
*/
|
|
767
|
-
type
|
|
768
|
-
/**
|
|
769
|
-
* The time interval for the purchase limit window.
|
|
770
|
-
*/
|
|
771
|
-
interval: ListPlansVariantDetailsPurchaseLimitInterval;
|
|
772
|
-
/**
|
|
773
|
-
* Number of intervals in the purchase limit window.
|
|
774
|
-
*/
|
|
775
|
-
intervalCount: number;
|
|
723
|
+
type ListPlansVariantDetailsReset = {
|
|
776
724
|
/**
|
|
777
|
-
*
|
|
725
|
+
* Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
|
|
778
726
|
*/
|
|
779
|
-
|
|
727
|
+
interval: ListPlansAddItemResetInterval;
|
|
780
728
|
/**
|
|
781
|
-
*
|
|
729
|
+
* Number of intervals between resets. Defaults to 1.
|
|
782
730
|
*/
|
|
783
|
-
|
|
731
|
+
intervalCount?: number | undefined;
|
|
784
732
|
};
|
|
785
|
-
type
|
|
786
|
-
/**
|
|
787
|
-
* The ID of the feature (credit balance) to auto top-up.
|
|
788
|
-
*/
|
|
789
|
-
featureId: string;
|
|
790
|
-
/**
|
|
791
|
-
* Whether auto top-up is enabled.
|
|
792
|
-
*/
|
|
793
|
-
enabled: boolean;
|
|
794
|
-
/**
|
|
795
|
-
* When the balance drops below this threshold, an auto top-up will be purchased.
|
|
796
|
-
*/
|
|
797
|
-
threshold: number;
|
|
798
|
-
/**
|
|
799
|
-
* Amount of credits to add per auto top-up.
|
|
800
|
-
*/
|
|
801
|
-
quantity: number;
|
|
733
|
+
type ListPlansAddItemAdditionalCurrency = {
|
|
802
734
|
/**
|
|
803
|
-
*
|
|
735
|
+
* Three-letter Stripe-supported currency code (e.g. 'eur', 'gbp').
|
|
804
736
|
*/
|
|
805
|
-
|
|
737
|
+
currency: string;
|
|
806
738
|
/**
|
|
807
|
-
*
|
|
739
|
+
* Price amount in this currency. Set explicitly per currency, not converted from the base amount.
|
|
808
740
|
*/
|
|
809
|
-
|
|
741
|
+
amount: number;
|
|
742
|
+
};
|
|
743
|
+
type ListPlansVariantDetailsTier = {
|
|
744
|
+
to?: any | undefined;
|
|
745
|
+
amount: number;
|
|
746
|
+
flatAmount?: number | undefined;
|
|
747
|
+
additionalCurrencies?: Array<any | null> | undefined;
|
|
748
|
+
};
|
|
749
|
+
declare const ListPlansVariantDetailsTierBehavior: {
|
|
750
|
+
readonly Graduated: "graduated";
|
|
751
|
+
readonly Volume: "volume";
|
|
810
752
|
};
|
|
753
|
+
type ListPlansVariantDetailsTierBehavior = OpenEnum<typeof ListPlansVariantDetailsTierBehavior>;
|
|
811
754
|
/**
|
|
812
|
-
*
|
|
755
|
+
* Billing interval. For consumable features, should match reset.interval.
|
|
813
756
|
*/
|
|
814
|
-
declare const
|
|
815
|
-
readonly
|
|
816
|
-
readonly
|
|
757
|
+
declare const ListPlansAddItemPriceInterval: {
|
|
758
|
+
readonly OneOff: "one_off";
|
|
759
|
+
readonly Week: "week";
|
|
760
|
+
readonly Month: "month";
|
|
761
|
+
readonly Quarter: "quarter";
|
|
762
|
+
readonly SemiAnnual: "semi_annual";
|
|
763
|
+
readonly Year: "year";
|
|
817
764
|
};
|
|
818
765
|
/**
|
|
819
|
-
*
|
|
766
|
+
* Billing interval. For consumable features, should match reset.interval.
|
|
820
767
|
*/
|
|
821
|
-
type
|
|
822
|
-
|
|
768
|
+
type ListPlansAddItemPriceInterval = OpenEnum<typeof ListPlansAddItemPriceInterval>;
|
|
769
|
+
/**
|
|
770
|
+
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
771
|
+
*/
|
|
772
|
+
declare const ListPlansAddItemBillingMethod: {
|
|
773
|
+
readonly Prepaid: "prepaid";
|
|
774
|
+
readonly UsageBased: "usage_based";
|
|
775
|
+
};
|
|
776
|
+
/**
|
|
777
|
+
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
778
|
+
*/
|
|
779
|
+
type ListPlansAddItemBillingMethod = OpenEnum<typeof ListPlansAddItemBillingMethod>;
|
|
780
|
+
/**
|
|
781
|
+
* Pricing for usage beyond included units. Omit for free features.
|
|
782
|
+
*/
|
|
783
|
+
type ListPlansVariantDetailsPrice = {
|
|
823
784
|
/**
|
|
824
|
-
*
|
|
785
|
+
* Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
|
|
825
786
|
*/
|
|
826
|
-
|
|
787
|
+
amount?: number | undefined;
|
|
788
|
+
/**
|
|
789
|
+
* Amounts in additional currencies for this flat price. The base 'amount' is in the org's default currency. Only valid with 'amount', not 'tiers'.
|
|
790
|
+
*/
|
|
791
|
+
additionalCurrencies?: Array<ListPlansAddItemAdditionalCurrency> | undefined;
|
|
792
|
+
/**
|
|
793
|
+
* Tiered pricing. Either 'amount' or 'tiers' is required.
|
|
794
|
+
*/
|
|
795
|
+
tiers?: Array<ListPlansVariantDetailsTier> | undefined;
|
|
796
|
+
tierBehavior?: ListPlansVariantDetailsTierBehavior | undefined;
|
|
797
|
+
/**
|
|
798
|
+
* Billing interval. For consumable features, should match reset.interval.
|
|
799
|
+
*/
|
|
800
|
+
interval: ListPlansAddItemPriceInterval;
|
|
827
801
|
/**
|
|
828
|
-
*
|
|
802
|
+
* Number of intervals per billing cycle. Defaults to 1.
|
|
829
803
|
*/
|
|
830
|
-
|
|
804
|
+
intervalCount: number;
|
|
831
805
|
/**
|
|
832
|
-
*
|
|
806
|
+
* Units per price increment. Usage is rounded UP when billed (e.g. billing_units=100 means 101 rounds to 200).
|
|
833
807
|
*/
|
|
834
|
-
|
|
808
|
+
billingUnits: number;
|
|
835
809
|
/**
|
|
836
|
-
*
|
|
810
|
+
* 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
|
|
837
811
|
*/
|
|
838
|
-
|
|
812
|
+
billingMethod: ListPlansAddItemBillingMethod;
|
|
839
813
|
/**
|
|
840
|
-
*
|
|
814
|
+
* Max units purchasable beyond included. E.g. included=100, max_purchase=300 allows 400 total. Null for no limit.
|
|
841
815
|
*/
|
|
842
|
-
|
|
816
|
+
maxPurchase?: number | null | undefined;
|
|
843
817
|
};
|
|
844
818
|
/**
|
|
845
|
-
*
|
|
819
|
+
* Billing behavior when quantity increases mid-cycle.
|
|
846
820
|
*/
|
|
847
|
-
declare const
|
|
848
|
-
readonly
|
|
849
|
-
readonly
|
|
850
|
-
readonly
|
|
851
|
-
readonly
|
|
821
|
+
declare const ListPlansOnIncrease: {
|
|
822
|
+
readonly BillImmediately: "bill_immediately";
|
|
823
|
+
readonly ProrateImmediately: "prorate_immediately";
|
|
824
|
+
readonly ProrateNextCycle: "prorate_next_cycle";
|
|
825
|
+
readonly BillNextCycle: "bill_next_cycle";
|
|
852
826
|
};
|
|
853
827
|
/**
|
|
854
|
-
*
|
|
828
|
+
* Billing behavior when quantity increases mid-cycle.
|
|
855
829
|
*/
|
|
856
|
-
type
|
|
830
|
+
type ListPlansOnIncrease = OpenEnum<typeof ListPlansOnIncrease>;
|
|
857
831
|
/**
|
|
858
|
-
*
|
|
832
|
+
* Credit behavior when quantity decreases mid-cycle.
|
|
859
833
|
*/
|
|
860
|
-
declare const
|
|
861
|
-
readonly
|
|
862
|
-
readonly
|
|
834
|
+
declare const ListPlansOnDecrease: {
|
|
835
|
+
readonly Prorate: "prorate";
|
|
836
|
+
readonly ProrateImmediately: "prorate_immediately";
|
|
837
|
+
readonly ProrateNextCycle: "prorate_next_cycle";
|
|
838
|
+
readonly None: "none";
|
|
839
|
+
readonly NoProrations: "no_prorations";
|
|
863
840
|
};
|
|
864
841
|
/**
|
|
865
|
-
*
|
|
842
|
+
* Credit behavior when quantity decreases mid-cycle.
|
|
866
843
|
*/
|
|
867
|
-
type
|
|
844
|
+
type ListPlansOnDecrease = OpenEnum<typeof ListPlansOnDecrease>;
|
|
868
845
|
/**
|
|
869
|
-
*
|
|
846
|
+
* Proration settings for prepaid features. Controls mid-cycle quantity change billing.
|
|
870
847
|
*/
|
|
871
|
-
type
|
|
872
|
-
properties: {
|
|
873
|
-
[k: string]: string;
|
|
874
|
-
};
|
|
875
|
-
};
|
|
876
|
-
type ListPlansVariantDetailsUsageLimit = {
|
|
877
|
-
/**
|
|
878
|
-
* The feature this usage limit applies to.
|
|
879
|
-
*/
|
|
880
|
-
featureId: string;
|
|
881
|
-
/**
|
|
882
|
-
* Whether this usage limit is enabled.
|
|
883
|
-
*/
|
|
884
|
-
enabled: boolean;
|
|
885
|
-
/**
|
|
886
|
-
* Maximum units allowed per interval.
|
|
887
|
-
*/
|
|
888
|
-
limit: number;
|
|
889
|
-
/**
|
|
890
|
-
* Interval for the cap, aligned to the customer's billing cycle.
|
|
891
|
-
*/
|
|
892
|
-
interval: ListPlansVariantDetailsUsageLimitInterval;
|
|
848
|
+
type ListPlansProration = {
|
|
893
849
|
/**
|
|
894
|
-
*
|
|
850
|
+
* Billing behavior when quantity increases mid-cycle.
|
|
895
851
|
*/
|
|
896
|
-
|
|
852
|
+
onIncrease: ListPlansOnIncrease;
|
|
897
853
|
/**
|
|
898
|
-
*
|
|
854
|
+
* Credit behavior when quantity decreases mid-cycle.
|
|
899
855
|
*/
|
|
900
|
-
|
|
856
|
+
onDecrease: ListPlansOnDecrease;
|
|
901
857
|
};
|
|
902
858
|
/**
|
|
903
|
-
*
|
|
859
|
+
* When rolled over units expire.
|
|
904
860
|
*/
|
|
905
|
-
declare const
|
|
906
|
-
readonly
|
|
907
|
-
readonly
|
|
908
|
-
readonly Remaining: "remaining";
|
|
909
|
-
readonly RemainingPercentage: "remaining_percentage";
|
|
861
|
+
declare const ListPlansVariantDetailsExpiryDurationType: {
|
|
862
|
+
readonly Month: "month";
|
|
863
|
+
readonly Forever: "forever";
|
|
910
864
|
};
|
|
911
865
|
/**
|
|
912
|
-
*
|
|
866
|
+
* When rolled over units expire.
|
|
913
867
|
*/
|
|
914
|
-
type
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
featureId?: string | undefined;
|
|
868
|
+
type ListPlansVariantDetailsExpiryDurationType = OpenEnum<typeof ListPlansVariantDetailsExpiryDurationType>;
|
|
869
|
+
/**
|
|
870
|
+
* Rollover config for unused units. If set, unused included units carry over.
|
|
871
|
+
*/
|
|
872
|
+
type ListPlansVariantDetailsRollover = {
|
|
920
873
|
/**
|
|
921
|
-
*
|
|
874
|
+
* Max rollover units. Omit for unlimited rollover.
|
|
922
875
|
*/
|
|
923
|
-
|
|
876
|
+
max?: number | undefined;
|
|
924
877
|
/**
|
|
925
|
-
*
|
|
878
|
+
* Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
|
|
926
879
|
*/
|
|
927
|
-
|
|
880
|
+
maxPercentage?: number | undefined;
|
|
928
881
|
/**
|
|
929
|
-
*
|
|
882
|
+
* When rolled over units expire.
|
|
930
883
|
*/
|
|
931
|
-
|
|
884
|
+
expiryDurationType: ListPlansVariantDetailsExpiryDurationType;
|
|
932
885
|
/**
|
|
933
|
-
*
|
|
886
|
+
* Number of periods before expiry.
|
|
934
887
|
*/
|
|
935
|
-
|
|
888
|
+
expiryDurationLength?: number | undefined;
|
|
936
889
|
};
|
|
937
|
-
|
|
890
|
+
/**
|
|
891
|
+
* Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
|
|
892
|
+
*/
|
|
893
|
+
type ListPlansPlanItem = {
|
|
938
894
|
/**
|
|
939
|
-
* The
|
|
895
|
+
* The ID of the feature to configure.
|
|
940
896
|
*/
|
|
941
897
|
featureId: string;
|
|
942
898
|
/**
|
|
943
|
-
*
|
|
899
|
+
* Number of free units included. Balance resets to this each interval for consumable features.
|
|
944
900
|
*/
|
|
945
|
-
|
|
946
|
-
};
|
|
947
|
-
/**
|
|
948
|
-
* Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
|
|
949
|
-
*/
|
|
950
|
-
type ListPlansVariantDetailsBillingControls = {
|
|
901
|
+
included?: number | undefined;
|
|
951
902
|
/**
|
|
952
|
-
*
|
|
903
|
+
* If true, customer has unlimited access to this feature.
|
|
953
904
|
*/
|
|
954
|
-
|
|
905
|
+
unlimited?: boolean | undefined;
|
|
955
906
|
/**
|
|
956
|
-
*
|
|
907
|
+
* Whether entity-level grants contribute to a shared customer balance.
|
|
957
908
|
*/
|
|
958
|
-
|
|
909
|
+
pooled: boolean;
|
|
959
910
|
/**
|
|
960
|
-
*
|
|
911
|
+
* Reset configuration for consumable features. Omit for non-consumable features like seats.
|
|
961
912
|
*/
|
|
962
|
-
|
|
913
|
+
reset?: ListPlansVariantDetailsReset | undefined;
|
|
963
914
|
/**
|
|
964
|
-
*
|
|
915
|
+
* Pricing for usage beyond included units. Omit for free features.
|
|
965
916
|
*/
|
|
966
|
-
|
|
917
|
+
price?: ListPlansVariantDetailsPrice | undefined;
|
|
967
918
|
/**
|
|
968
|
-
*
|
|
919
|
+
* Proration settings for prepaid features. Controls mid-cycle quantity change billing.
|
|
969
920
|
*/
|
|
970
|
-
|
|
921
|
+
proration?: ListPlansProration | undefined;
|
|
922
|
+
/**
|
|
923
|
+
* Rollover config for unused units. If set, unused included units carry over.
|
|
924
|
+
*/
|
|
925
|
+
rollover?: ListPlansVariantDetailsRollover | undefined;
|
|
971
926
|
};
|
|
972
927
|
/**
|
|
973
|
-
*
|
|
928
|
+
* Match items with this billing method (prepaid or usage_based).
|
|
974
929
|
*/
|
|
975
|
-
|
|
930
|
+
declare const ListPlansRemoveItemBillingMethod: {
|
|
931
|
+
readonly Prepaid: "prepaid";
|
|
932
|
+
readonly UsageBased: "usage_based";
|
|
933
|
+
};
|
|
934
|
+
/**
|
|
935
|
+
* Match items with this billing method (prepaid or usage_based).
|
|
936
|
+
*/
|
|
937
|
+
type ListPlansRemoveItemBillingMethod = OpenEnum<typeof ListPlansRemoveItemBillingMethod>;
|
|
938
|
+
declare const ListPlansIntervalRemoveItemEnum2: {
|
|
939
|
+
readonly OneOff: "one_off";
|
|
940
|
+
readonly Minute: "minute";
|
|
941
|
+
readonly Hour: "hour";
|
|
942
|
+
readonly Day: "day";
|
|
943
|
+
readonly Week: "week";
|
|
944
|
+
readonly Month: "month";
|
|
945
|
+
readonly Quarter: "quarter";
|
|
946
|
+
readonly SemiAnnual: "semi_annual";
|
|
947
|
+
readonly Year: "year";
|
|
948
|
+
};
|
|
949
|
+
type ListPlansIntervalRemoveItemEnum2 = OpenEnum<typeof ListPlansIntervalRemoveItemEnum2>;
|
|
950
|
+
declare const ListPlansIntervalRemoveItemEnum1: {
|
|
951
|
+
readonly OneOff: "one_off";
|
|
952
|
+
readonly Week: "week";
|
|
953
|
+
readonly Month: "month";
|
|
954
|
+
readonly Quarter: "quarter";
|
|
955
|
+
readonly SemiAnnual: "semi_annual";
|
|
956
|
+
readonly Year: "year";
|
|
957
|
+
};
|
|
958
|
+
type ListPlansIntervalRemoveItemEnum1 = OpenEnum<typeof ListPlansIntervalRemoveItemEnum1>;
|
|
959
|
+
/**
|
|
960
|
+
* Filter for matching plan items. All provided fields must match (AND).
|
|
961
|
+
*/
|
|
962
|
+
type ListPlansPlanItemFilter = {
|
|
976
963
|
/**
|
|
977
|
-
*
|
|
964
|
+
* Match items linked to this feature.
|
|
978
965
|
*/
|
|
979
|
-
|
|
966
|
+
featureId?: string | undefined;
|
|
980
967
|
/**
|
|
981
|
-
*
|
|
968
|
+
* Match items with this billing method (prepaid or usage_based).
|
|
982
969
|
*/
|
|
983
|
-
|
|
970
|
+
billingMethod?: ListPlansRemoveItemBillingMethod | undefined;
|
|
984
971
|
/**
|
|
985
|
-
*
|
|
972
|
+
* 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.
|
|
986
973
|
*/
|
|
987
|
-
|
|
974
|
+
interval?: ListPlansIntervalRemoveItemEnum1 | ListPlansIntervalRemoveItemEnum2 | undefined;
|
|
988
975
|
/**
|
|
989
|
-
*
|
|
976
|
+
* Match items with this interval_count. Disambiguates between items that share an interval but differ in count.
|
|
990
977
|
*/
|
|
991
|
-
|
|
978
|
+
intervalCount?: number | undefined;
|
|
992
979
|
/**
|
|
993
|
-
*
|
|
980
|
+
* Match items whose grant equals this included usage. Omitted is a wildcard.
|
|
994
981
|
*/
|
|
995
|
-
|
|
982
|
+
included?: number | undefined;
|
|
996
983
|
};
|
|
997
984
|
/**
|
|
998
|
-
*
|
|
985
|
+
* Unit of time for the trial ('day', 'month', 'year').
|
|
999
986
|
*/
|
|
1000
|
-
|
|
987
|
+
declare const ListPlansVariantDetailsDurationType: {
|
|
988
|
+
readonly Day: "day";
|
|
989
|
+
readonly Month: "month";
|
|
990
|
+
readonly Year: "year";
|
|
991
|
+
};
|
|
992
|
+
/**
|
|
993
|
+
* Unit of time for the trial ('day', 'month', 'year').
|
|
994
|
+
*/
|
|
995
|
+
type ListPlansVariantDetailsDurationType = OpenEnum<typeof ListPlansVariantDetailsDurationType>;
|
|
996
|
+
/**
|
|
997
|
+
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
998
|
+
*/
|
|
999
|
+
declare const ListPlansVariantDetailsOnEnd: {
|
|
1000
|
+
readonly Bill: "bill";
|
|
1001
|
+
readonly Revert: "revert";
|
|
1002
|
+
};
|
|
1003
|
+
/**
|
|
1004
|
+
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
1005
|
+
*/
|
|
1006
|
+
type ListPlansVariantDetailsOnEnd = OpenEnum<typeof ListPlansVariantDetailsOnEnd>;
|
|
1007
|
+
/**
|
|
1008
|
+
* Free trial configuration for a plan.
|
|
1009
|
+
*/
|
|
1010
|
+
type ListPlansFreeTrialParams = {
|
|
1001
1011
|
/**
|
|
1002
|
-
*
|
|
1012
|
+
* Number of duration_type periods the trial lasts.
|
|
1003
1013
|
*/
|
|
1004
|
-
|
|
1014
|
+
durationLength: number;
|
|
1005
1015
|
/**
|
|
1006
|
-
*
|
|
1016
|
+
* Unit of time for the trial ('day', 'month', 'year').
|
|
1007
1017
|
*/
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
type ListPlansConfig = {
|
|
1018
|
+
durationType: ListPlansVariantDetailsDurationType;
|
|
1019
|
+
/**
|
|
1020
|
+
* If true, a payment method is required to start the trial and the customer is charged when it ends. Defaults to false.
|
|
1021
|
+
*/
|
|
1022
|
+
cardRequired: boolean;
|
|
1014
1023
|
/**
|
|
1015
|
-
*
|
|
1024
|
+
* Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
|
|
1016
1025
|
*/
|
|
1017
|
-
|
|
1026
|
+
onEnd?: ListPlansVariantDetailsOnEnd | undefined;
|
|
1018
1027
|
};
|
|
1019
1028
|
/**
|
|
1020
1029
|
* The time interval for the purchase limit window.
|
|
1021
1030
|
*/
|
|
1022
|
-
declare const
|
|
1031
|
+
declare const ListPlansVariantDetailsPurchaseLimitInterval: {
|
|
1023
1032
|
readonly Hour: "hour";
|
|
1024
1033
|
readonly Day: "day";
|
|
1025
1034
|
readonly Week: "week";
|
|
@@ -1028,15 +1037,15 @@ declare const ListPlansPurchaseLimitInterval: {
|
|
|
1028
1037
|
/**
|
|
1029
1038
|
* The time interval for the purchase limit window.
|
|
1030
1039
|
*/
|
|
1031
|
-
type
|
|
1040
|
+
type ListPlansVariantDetailsPurchaseLimitInterval = OpenEnum<typeof ListPlansVariantDetailsPurchaseLimitInterval>;
|
|
1032
1041
|
/**
|
|
1033
|
-
* Optional rate limit to cap how often auto top-ups occur.
|
|
1042
|
+
* Optional rate limit to cap how often auto top-ups occur. Pass count to set the current window's consumed top-ups.
|
|
1034
1043
|
*/
|
|
1035
|
-
type
|
|
1044
|
+
type ListPlansVariantDetailsPurchaseLimit = {
|
|
1036
1045
|
/**
|
|
1037
1046
|
* The time interval for the purchase limit window.
|
|
1038
1047
|
*/
|
|
1039
|
-
interval:
|
|
1048
|
+
interval: ListPlansVariantDetailsPurchaseLimitInterval;
|
|
1040
1049
|
/**
|
|
1041
1050
|
* Number of intervals in the purchase limit window.
|
|
1042
1051
|
*/
|
|
@@ -1045,8 +1054,12 @@ type ListPlansPurchaseLimit = {
|
|
|
1045
1054
|
* Maximum number of auto top-ups allowed within the interval.
|
|
1046
1055
|
*/
|
|
1047
1056
|
limit: number;
|
|
1057
|
+
/**
|
|
1058
|
+
* Set the current window's consumed auto top-up count. Omit to leave runtime state unchanged.
|
|
1059
|
+
*/
|
|
1060
|
+
count?: number | undefined;
|
|
1048
1061
|
};
|
|
1049
|
-
type
|
|
1062
|
+
type ListPlansVariantDetailsAutoTopup = {
|
|
1050
1063
|
/**
|
|
1051
1064
|
* The ID of the feature (credit balance) to auto top-up.
|
|
1052
1065
|
*/
|
|
@@ -1064,9 +1077,9 @@ type ListPlansAutoTopup = {
|
|
|
1064
1077
|
*/
|
|
1065
1078
|
quantity: number;
|
|
1066
1079
|
/**
|
|
1067
|
-
* Optional rate limit to cap how often auto top-ups occur.
|
|
1080
|
+
* Optional rate limit to cap how often auto top-ups occur. Pass count to set the current window's consumed top-ups.
|
|
1068
1081
|
*/
|
|
1069
|
-
purchaseLimit?:
|
|
1082
|
+
purchaseLimit?: ListPlansVariantDetailsPurchaseLimit | undefined;
|
|
1070
1083
|
/**
|
|
1071
1084
|
* When true, auto top-up creates a send_invoice invoice instead of auto-charging.
|
|
1072
1085
|
*/
|
|
@@ -1075,15 +1088,15 @@ type ListPlansAutoTopup = {
|
|
|
1075
1088
|
/**
|
|
1076
1089
|
* How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
|
|
1077
1090
|
*/
|
|
1078
|
-
declare const
|
|
1091
|
+
declare const ListPlansVariantDetailsLimitType: {
|
|
1079
1092
|
readonly Absolute: "absolute";
|
|
1080
1093
|
readonly UsagePercentage: "usage_percentage";
|
|
1081
1094
|
};
|
|
1082
1095
|
/**
|
|
1083
1096
|
* How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
|
|
1084
1097
|
*/
|
|
1085
|
-
type
|
|
1086
|
-
type
|
|
1098
|
+
type ListPlansVariantDetailsLimitType = OpenEnum<typeof ListPlansVariantDetailsLimitType>;
|
|
1099
|
+
type ListPlansVariantDetailsSpendLimit = {
|
|
1087
1100
|
/**
|
|
1088
1101
|
* Optional feature ID this spend limit applies to.
|
|
1089
1102
|
*/
|
|
@@ -1095,7 +1108,7 @@ type ListPlansSpendLimit = {
|
|
|
1095
1108
|
/**
|
|
1096
1109
|
* How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
|
|
1097
1110
|
*/
|
|
1098
|
-
limitType?:
|
|
1111
|
+
limitType?: ListPlansVariantDetailsLimitType | undefined;
|
|
1099
1112
|
/**
|
|
1100
1113
|
* Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit_type is usage_percentage.
|
|
1101
1114
|
*/
|
|
@@ -1108,7 +1121,7 @@ type ListPlansSpendLimit = {
|
|
|
1108
1121
|
/**
|
|
1109
1122
|
* Interval for the cap, aligned to the customer's billing cycle.
|
|
1110
1123
|
*/
|
|
1111
|
-
declare const
|
|
1124
|
+
declare const ListPlansVariantDetailsUsageLimitInterval: {
|
|
1112
1125
|
readonly Day: "day";
|
|
1113
1126
|
readonly Week: "week";
|
|
1114
1127
|
readonly Month: "month";
|
|
@@ -1117,27 +1130,27 @@ declare const ListPlansUsageLimitInterval: {
|
|
|
1117
1130
|
/**
|
|
1118
1131
|
* Interval for the cap, aligned to the customer's billing cycle.
|
|
1119
1132
|
*/
|
|
1120
|
-
type
|
|
1133
|
+
type ListPlansVariantDetailsUsageLimitInterval = OpenEnum<typeof ListPlansVariantDetailsUsageLimitInterval>;
|
|
1121
1134
|
/**
|
|
1122
1135
|
* Window alignment. 'billing_cycle' phases the interval to the customer's renewal time; 'utc' aligns to the UTC calendar.
|
|
1123
1136
|
*/
|
|
1124
|
-
declare const
|
|
1137
|
+
declare const ListPlansVariantDetailsAnchor: {
|
|
1125
1138
|
readonly BillingCycle: "billing_cycle";
|
|
1126
1139
|
readonly Utc: "utc";
|
|
1127
1140
|
};
|
|
1128
1141
|
/**
|
|
1129
1142
|
* Window alignment. 'billing_cycle' phases the interval to the customer's renewal time; 'utc' aligns to the UTC calendar.
|
|
1130
1143
|
*/
|
|
1131
|
-
type
|
|
1144
|
+
type ListPlansVariantDetailsAnchor = OpenEnum<typeof ListPlansVariantDetailsAnchor>;
|
|
1132
1145
|
/**
|
|
1133
1146
|
* When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
|
|
1134
1147
|
*/
|
|
1135
|
-
type
|
|
1148
|
+
type ListPlansVariantDetailsFilter = {
|
|
1136
1149
|
properties: {
|
|
1137
1150
|
[k: string]: string;
|
|
1138
1151
|
};
|
|
1139
1152
|
};
|
|
1140
|
-
type
|
|
1153
|
+
type ListPlansVariantDetailsUsageLimit = {
|
|
1141
1154
|
/**
|
|
1142
1155
|
* The feature this usage limit applies to.
|
|
1143
1156
|
*/
|
|
@@ -1153,20 +1166,20 @@ type ListPlansUsageLimit = {
|
|
|
1153
1166
|
/**
|
|
1154
1167
|
* Interval for the cap, aligned to the customer's billing cycle.
|
|
1155
1168
|
*/
|
|
1156
|
-
interval:
|
|
1169
|
+
interval: ListPlansVariantDetailsUsageLimitInterval;
|
|
1157
1170
|
/**
|
|
1158
1171
|
* Window alignment. 'billing_cycle' phases the interval to the customer's renewal time; 'utc' aligns to the UTC calendar.
|
|
1159
1172
|
*/
|
|
1160
|
-
anchor?:
|
|
1173
|
+
anchor?: ListPlansVariantDetailsAnchor | undefined;
|
|
1161
1174
|
/**
|
|
1162
1175
|
* When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
|
|
1163
1176
|
*/
|
|
1164
|
-
filter?:
|
|
1177
|
+
filter?: ListPlansVariantDetailsFilter | undefined;
|
|
1165
1178
|
};
|
|
1166
1179
|
/**
|
|
1167
1180
|
* Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
|
|
1168
1181
|
*/
|
|
1169
|
-
declare const
|
|
1182
|
+
declare const ListPlansVariantDetailsThresholdType: {
|
|
1170
1183
|
readonly Usage: "usage";
|
|
1171
1184
|
readonly UsagePercentage: "usage_percentage";
|
|
1172
1185
|
readonly Remaining: "remaining";
|
|
@@ -1175,8 +1188,8 @@ declare const ListPlansThresholdType: {
|
|
|
1175
1188
|
/**
|
|
1176
1189
|
* Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
|
|
1177
1190
|
*/
|
|
1178
|
-
type
|
|
1179
|
-
type
|
|
1191
|
+
type ListPlansVariantDetailsThresholdType = OpenEnum<typeof ListPlansVariantDetailsThresholdType>;
|
|
1192
|
+
type ListPlansVariantDetailsUsageAlert = {
|
|
1180
1193
|
/**
|
|
1181
1194
|
* The feature ID this alert applies to.
|
|
1182
1195
|
*/
|
|
@@ -1192,13 +1205,13 @@ type ListPlansUsageAlert = {
|
|
|
1192
1205
|
/**
|
|
1193
1206
|
* Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
|
|
1194
1207
|
*/
|
|
1195
|
-
thresholdType:
|
|
1208
|
+
thresholdType: ListPlansVariantDetailsThresholdType;
|
|
1196
1209
|
/**
|
|
1197
1210
|
* Optional user-defined label to distinguish multiple alerts on the same feature.
|
|
1198
1211
|
*/
|
|
1199
1212
|
name?: string | undefined;
|
|
1200
1213
|
};
|
|
1201
|
-
type
|
|
1214
|
+
type ListPlansVariantDetailsOverageAllowed = {
|
|
1202
1215
|
/**
|
|
1203
1216
|
* The feature ID this overage allowed control applies to.
|
|
1204
1217
|
*/
|
|
@@ -1209,76 +1222,243 @@ type ListPlansOverageAllowed = {
|
|
|
1209
1222
|
enabled: boolean;
|
|
1210
1223
|
};
|
|
1211
1224
|
/**
|
|
1212
|
-
*
|
|
1225
|
+
* Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
|
|
1213
1226
|
*/
|
|
1214
|
-
type
|
|
1227
|
+
type ListPlansVariantDetailsBillingControls = {
|
|
1215
1228
|
/**
|
|
1216
1229
|
* List of auto top-up configurations per feature.
|
|
1217
1230
|
*/
|
|
1218
|
-
autoTopups?: Array<
|
|
1231
|
+
autoTopups?: Array<ListPlansVariantDetailsAutoTopup> | undefined;
|
|
1219
1232
|
/**
|
|
1220
1233
|
* List of overage spend limits per feature (caps overage spend).
|
|
1221
1234
|
*/
|
|
1222
|
-
spendLimits?: Array<
|
|
1235
|
+
spendLimits?: Array<ListPlansVariantDetailsSpendLimit> | undefined;
|
|
1223
1236
|
/**
|
|
1224
1237
|
* List of hard usage caps per feature (max units per interval).
|
|
1225
1238
|
*/
|
|
1226
|
-
usageLimits?: Array<
|
|
1239
|
+
usageLimits?: Array<ListPlansVariantDetailsUsageLimit> | undefined;
|
|
1227
1240
|
/**
|
|
1228
1241
|
* List of usage alert configurations per feature.
|
|
1229
1242
|
*/
|
|
1230
|
-
usageAlerts?: Array<
|
|
1243
|
+
usageAlerts?: Array<ListPlansVariantDetailsUsageAlert> | undefined;
|
|
1231
1244
|
/**
|
|
1232
1245
|
* List of overage allowed controls per feature. When enabled, usage can exceed balance.
|
|
1233
1246
|
*/
|
|
1234
|
-
overageAllowed?: Array<
|
|
1247
|
+
overageAllowed?: Array<ListPlansVariantDetailsOverageAllowed> | undefined;
|
|
1235
1248
|
};
|
|
1236
1249
|
/**
|
|
1237
|
-
*
|
|
1250
|
+
* Billing interval (e.g. 'month', 'year').
|
|
1238
1251
|
*/
|
|
1239
|
-
declare const
|
|
1240
|
-
readonly
|
|
1241
|
-
readonly
|
|
1252
|
+
declare const ListPlansUpsertLicenseInterval: {
|
|
1253
|
+
readonly OneOff: "one_off";
|
|
1254
|
+
readonly Week: "week";
|
|
1255
|
+
readonly Month: "month";
|
|
1256
|
+
readonly Quarter: "quarter";
|
|
1257
|
+
readonly SemiAnnual: "semi_annual";
|
|
1258
|
+
readonly Year: "year";
|
|
1242
1259
|
};
|
|
1243
1260
|
/**
|
|
1244
|
-
*
|
|
1261
|
+
* Billing interval (e.g. 'month', 'year').
|
|
1245
1262
|
*/
|
|
1246
|
-
type
|
|
1263
|
+
type ListPlansUpsertLicenseInterval = OpenEnum<typeof ListPlansUpsertLicenseInterval>;
|
|
1264
|
+
type ListPlansUpsertLicenseAdditionalCurrency = {
|
|
1265
|
+
currency?: any | undefined;
|
|
1266
|
+
amount?: any | undefined;
|
|
1267
|
+
};
|
|
1247
1268
|
/**
|
|
1248
|
-
*
|
|
1269
|
+
* Base price configuration for a plan.
|
|
1249
1270
|
*/
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1271
|
+
type ListPlansUpsertLicenseBasePrice = {
|
|
1272
|
+
/**
|
|
1273
|
+
* Base price amount for the plan, in major currency units (e.g. dollars).
|
|
1274
|
+
*/
|
|
1275
|
+
amount: number;
|
|
1276
|
+
/**
|
|
1277
|
+
* Billing interval (e.g. 'month', 'year').
|
|
1278
|
+
*/
|
|
1279
|
+
interval: ListPlansUpsertLicenseInterval;
|
|
1280
|
+
/**
|
|
1281
|
+
* Number of intervals per billing cycle. Defaults to 1.
|
|
1282
|
+
*/
|
|
1283
|
+
intervalCount?: number | undefined;
|
|
1284
|
+
/**
|
|
1285
|
+
* Base price amounts in additional currencies. The base 'amount' is in the org's default currency.
|
|
1286
|
+
*/
|
|
1287
|
+
additionalCurrencies?: Array<ListPlansUpsertLicenseAdditionalCurrency> | undefined;
|
|
1256
1288
|
};
|
|
1257
1289
|
/**
|
|
1258
|
-
*
|
|
1290
|
+
* Reset configuration for consumable features. Omit for non-consumable features like seats.
|
|
1259
1291
|
*/
|
|
1260
|
-
type
|
|
1261
|
-
|
|
1292
|
+
type ListPlansUpsertLicenseReset = {
|
|
1293
|
+
interval?: any | undefined;
|
|
1294
|
+
intervalCount?: any | undefined;
|
|
1295
|
+
};
|
|
1296
|
+
/**
|
|
1297
|
+
* Pricing for usage beyond included units. Omit for free features.
|
|
1298
|
+
*/
|
|
1299
|
+
type ListPlansUpsertLicensePrice = {
|
|
1300
|
+
stripePriceId?: any | undefined;
|
|
1301
|
+
amount?: any | undefined;
|
|
1302
|
+
additionalCurrencies?: any | undefined;
|
|
1303
|
+
tiers?: any | undefined;
|
|
1304
|
+
tierBehavior?: any | undefined;
|
|
1305
|
+
interval?: any | undefined;
|
|
1306
|
+
intervalCount?: any | undefined;
|
|
1307
|
+
billingUnits?: any | undefined;
|
|
1308
|
+
billingMethod?: any | undefined;
|
|
1309
|
+
maxPurchase?: any | undefined;
|
|
1310
|
+
};
|
|
1311
|
+
/**
|
|
1312
|
+
* Proration settings for prepaid features. Controls mid-cycle quantity change billing.
|
|
1313
|
+
*/
|
|
1314
|
+
type ListPlansUpsertLicenseProration = {
|
|
1315
|
+
onIncrease?: any | undefined;
|
|
1316
|
+
onDecrease?: any | undefined;
|
|
1317
|
+
};
|
|
1318
|
+
/**
|
|
1319
|
+
* Rollover config for unused units. If set, unused included units carry over.
|
|
1320
|
+
*/
|
|
1321
|
+
type ListPlansUpsertLicenseRollover = {
|
|
1322
|
+
max?: any | undefined;
|
|
1323
|
+
maxPercentage?: any | undefined;
|
|
1324
|
+
expiryDurationType?: any | undefined;
|
|
1325
|
+
expiryDurationLength?: any | undefined;
|
|
1326
|
+
};
|
|
1327
|
+
/**
|
|
1328
|
+
* Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
|
|
1329
|
+
*/
|
|
1330
|
+
type ListPlansUpsertLicensePlanItem = {
|
|
1262
1331
|
/**
|
|
1263
|
-
*
|
|
1332
|
+
* The ID of the feature to configure.
|
|
1264
1333
|
*/
|
|
1265
|
-
|
|
1334
|
+
featureId: string;
|
|
1266
1335
|
/**
|
|
1267
|
-
*
|
|
1336
|
+
* Number of free units included. Balance resets to this each interval for consumable features.
|
|
1268
1337
|
*/
|
|
1269
|
-
|
|
1338
|
+
included?: number | undefined;
|
|
1270
1339
|
/**
|
|
1271
|
-
*
|
|
1340
|
+
* If true, customer has unlimited access to this feature.
|
|
1272
1341
|
*/
|
|
1273
|
-
|
|
1342
|
+
unlimited?: boolean | undefined;
|
|
1274
1343
|
/**
|
|
1275
|
-
* Whether
|
|
1344
|
+
* Whether entity-level grants contribute to a shared customer balance.
|
|
1276
1345
|
*/
|
|
1277
|
-
|
|
1346
|
+
pooled: boolean;
|
|
1278
1347
|
/**
|
|
1279
|
-
*
|
|
1348
|
+
* Reset configuration for consumable features. Omit for non-consumable features like seats.
|
|
1280
1349
|
*/
|
|
1281
|
-
|
|
1350
|
+
reset?: ListPlansUpsertLicenseReset | undefined;
|
|
1351
|
+
/**
|
|
1352
|
+
* Pricing for usage beyond included units. Omit for free features.
|
|
1353
|
+
*/
|
|
1354
|
+
price?: ListPlansUpsertLicensePrice | undefined;
|
|
1355
|
+
/**
|
|
1356
|
+
* Proration settings for prepaid features. Controls mid-cycle quantity change billing.
|
|
1357
|
+
*/
|
|
1358
|
+
proration?: ListPlansUpsertLicenseProration | undefined;
|
|
1359
|
+
/**
|
|
1360
|
+
* Rollover config for unused units. If set, unused included units carry over.
|
|
1361
|
+
*/
|
|
1362
|
+
rollover?: ListPlansUpsertLicenseRollover | undefined;
|
|
1363
|
+
};
|
|
1364
|
+
/**
|
|
1365
|
+
* Match items with this billing method (prepaid or usage_based).
|
|
1366
|
+
*/
|
|
1367
|
+
declare const ListPlansUpsertLicenseBillingMethod: {
|
|
1368
|
+
readonly Prepaid: "prepaid";
|
|
1369
|
+
readonly UsageBased: "usage_based";
|
|
1370
|
+
};
|
|
1371
|
+
/**
|
|
1372
|
+
* Match items with this billing method (prepaid or usage_based).
|
|
1373
|
+
*/
|
|
1374
|
+
type ListPlansUpsertLicenseBillingMethod = OpenEnum<typeof ListPlansUpsertLicenseBillingMethod>;
|
|
1375
|
+
/**
|
|
1376
|
+
* Filter for matching plan items. All provided fields must match (AND).
|
|
1377
|
+
*/
|
|
1378
|
+
type ListPlansUpsertLicensePlanItemFilter = {
|
|
1379
|
+
/**
|
|
1380
|
+
* Match items linked to this feature.
|
|
1381
|
+
*/
|
|
1382
|
+
featureId?: string | undefined;
|
|
1383
|
+
/**
|
|
1384
|
+
* Match items with this billing method (prepaid or usage_based).
|
|
1385
|
+
*/
|
|
1386
|
+
billingMethod?: ListPlansUpsertLicenseBillingMethod | undefined;
|
|
1387
|
+
/**
|
|
1388
|
+
* 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.
|
|
1389
|
+
*/
|
|
1390
|
+
interval?: any | undefined;
|
|
1391
|
+
/**
|
|
1392
|
+
* Match items with this interval_count. Disambiguates between items that share an interval but differ in count.
|
|
1393
|
+
*/
|
|
1394
|
+
intervalCount?: number | undefined;
|
|
1395
|
+
/**
|
|
1396
|
+
* Match items whose grant equals this included usage. Omitted is a wildcard.
|
|
1397
|
+
*/
|
|
1398
|
+
included?: number | undefined;
|
|
1399
|
+
};
|
|
1400
|
+
type ListPlansUpsertLicenseCustomize = {
|
|
1401
|
+
price?: ListPlansUpsertLicenseBasePrice | null | undefined;
|
|
1402
|
+
addItems?: Array<ListPlansUpsertLicensePlanItem> | undefined;
|
|
1403
|
+
removeItems?: Array<ListPlansUpsertLicensePlanItemFilter> | undefined;
|
|
1404
|
+
};
|
|
1405
|
+
type ListPlansUpsertLicense = {
|
|
1406
|
+
licensePlanId: string;
|
|
1407
|
+
included?: number | undefined;
|
|
1408
|
+
prepaidOnly?: boolean | undefined;
|
|
1409
|
+
customize?: ListPlansUpsertLicenseCustomize | null | undefined;
|
|
1410
|
+
metadata?: {
|
|
1411
|
+
[k: string]: any;
|
|
1412
|
+
} | undefined;
|
|
1413
|
+
};
|
|
1414
|
+
type ListPlansRemoveLicense = {
|
|
1415
|
+
licensePlanId: string;
|
|
1416
|
+
};
|
|
1417
|
+
/**
|
|
1418
|
+
* The customization that transforms the base plan into this variant.
|
|
1419
|
+
*/
|
|
1420
|
+
type ListPlansCustomize = {
|
|
1421
|
+
/**
|
|
1422
|
+
* Override the base price of the plan. Pass null to remove the base price.
|
|
1423
|
+
*/
|
|
1424
|
+
price?: ListPlansBasePrice | null | undefined;
|
|
1425
|
+
/**
|
|
1426
|
+
* Items to add to the plan.
|
|
1427
|
+
*/
|
|
1428
|
+
addItems?: Array<ListPlansPlanItem> | undefined;
|
|
1429
|
+
/**
|
|
1430
|
+
* Filters selecting items to remove from the plan.
|
|
1431
|
+
*/
|
|
1432
|
+
removeItems?: Array<ListPlansPlanItemFilter> | undefined;
|
|
1433
|
+
/**
|
|
1434
|
+
* Override the plan's default free trial. Pass an object to set a custom trial, or null to remove the trial entirely.
|
|
1435
|
+
*/
|
|
1436
|
+
freeTrial?: ListPlansFreeTrialParams | null | undefined;
|
|
1437
|
+
/**
|
|
1438
|
+
* Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
|
|
1439
|
+
*/
|
|
1440
|
+
billingControls?: ListPlansVariantDetailsBillingControls | undefined;
|
|
1441
|
+
/**
|
|
1442
|
+
* License links to add or override for this customer, keyed by license_plan_id. Omitted fields inherit the plan catalog link (included defaults to 1 when the license is not in the catalog). A bare entry restores the license to pure catalog inheritance.
|
|
1443
|
+
*/
|
|
1444
|
+
upsertLicenses?: Array<ListPlansUpsertLicense> | undefined;
|
|
1445
|
+
/**
|
|
1446
|
+
* License links to drop, keyed by license_plan_id. Parallel to remove_items.
|
|
1447
|
+
*/
|
|
1448
|
+
removeLicenses?: Array<ListPlansRemoveLicense> | undefined;
|
|
1449
|
+
};
|
|
1450
|
+
/**
|
|
1451
|
+
* Details about how this variant relates to its latest base plan.
|
|
1452
|
+
*/
|
|
1453
|
+
type ListPlansVariantDetails = {
|
|
1454
|
+
/**
|
|
1455
|
+
* The ID of the base plan this variant was derived from.
|
|
1456
|
+
*/
|
|
1457
|
+
basePlanId: string;
|
|
1458
|
+
/**
|
|
1459
|
+
* The customization that transforms the base plan into this variant.
|
|
1460
|
+
*/
|
|
1461
|
+
customize?: ListPlansCustomize | undefined;
|
|
1282
1462
|
};
|
|
1283
1463
|
/**
|
|
1284
1464
|
* A plan defines a set of features, pricing, and entitlements that can be attached to customers.
|
|
@@ -1304,6 +1484,14 @@ type ListPlansList = {
|
|
|
1304
1484
|
* Version number of the plan. Incremented when plan configuration changes.
|
|
1305
1485
|
*/
|
|
1306
1486
|
version: number;
|
|
1487
|
+
/**
|
|
1488
|
+
* User-facing version identity. Defaults to v{n} when the version is minted.
|
|
1489
|
+
*/
|
|
1490
|
+
versionSlug?: string | null | undefined;
|
|
1491
|
+
/**
|
|
1492
|
+
* Whether this is the active version of the plan. At most one version is active.
|
|
1493
|
+
*/
|
|
1494
|
+
active?: boolean | undefined;
|
|
1307
1495
|
/**
|
|
1308
1496
|
* Whether this is an add-on plan that can be attached alongside a main plan.
|
|
1309
1497
|
*/
|
|
@@ -1336,14 +1524,6 @@ type ListPlansList = {
|
|
|
1336
1524
|
* Whether the plan is archived. Archived plans cannot be attached to new customers.
|
|
1337
1525
|
*/
|
|
1338
1526
|
archived: boolean;
|
|
1339
|
-
/**
|
|
1340
|
-
* Deprecated. Use variant_details.base_plan_id instead. If this is a variant, the ID of the base plan it was created from.
|
|
1341
|
-
*/
|
|
1342
|
-
baseVariantId: string | null;
|
|
1343
|
-
/**
|
|
1344
|
-
* Details about how this variant relates to its latest base plan.
|
|
1345
|
-
*/
|
|
1346
|
-
variantDetails?: ListPlansVariantDetails | undefined;
|
|
1347
1527
|
/**
|
|
1348
1528
|
* Miscellaneous plan-level configuration flags.
|
|
1349
1529
|
*/
|
|
@@ -1359,6 +1539,14 @@ type ListPlansList = {
|
|
|
1359
1539
|
[k: string]: any;
|
|
1360
1540
|
};
|
|
1361
1541
|
customerEligibility?: ListPlansCustomerEligibility | undefined;
|
|
1542
|
+
/**
|
|
1543
|
+
* Deprecated. Use variant_details.base_plan_id instead. If this is a variant, the ID of the base plan it was created from.
|
|
1544
|
+
*/
|
|
1545
|
+
baseVariantId: string | null;
|
|
1546
|
+
/**
|
|
1547
|
+
* Details about how this variant relates to its latest base plan.
|
|
1548
|
+
*/
|
|
1549
|
+
variantDetails?: ListPlansVariantDetails | undefined;
|
|
1362
1550
|
};
|
|
1363
1551
|
/**
|
|
1364
1552
|
* OK
|