@stigg/typescript 0.1.0-alpha.21 → 0.1.0-alpha.23
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/CHANGELOG.md +37 -0
- package/package.json +1 -1
- package/resources/v1/addons/addons.d.mts +493 -970
- package/resources/v1/addons/addons.d.mts.map +1 -1
- package/resources/v1/addons/addons.d.ts +493 -970
- package/resources/v1/addons/addons.d.ts.map +1 -1
- package/resources/v1/addons/addons.js +0 -6
- package/resources/v1/addons/addons.js.map +1 -1
- package/resources/v1/addons/addons.mjs +0 -6
- package/resources/v1/addons/addons.mjs.map +1 -1
- package/resources/v1/addons/entitlements.d.mts +28 -0
- package/resources/v1/addons/entitlements.d.mts.map +1 -1
- package/resources/v1/addons/entitlements.d.ts +28 -0
- package/resources/v1/addons/entitlements.d.ts.map +1 -1
- package/resources/v1/addons/index.d.mts +1 -1
- package/resources/v1/addons/index.d.mts.map +1 -1
- package/resources/v1/addons/index.d.ts +1 -1
- package/resources/v1/addons/index.d.ts.map +1 -1
- package/resources/v1/addons/index.js.map +1 -1
- package/resources/v1/addons/index.mjs.map +1 -1
- package/resources/v1/coupons.d.mts +3 -3
- package/resources/v1/coupons.d.ts +3 -3
- package/resources/v1/customers/customers.d.mts +935 -5
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +935 -5
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +7 -0
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +7 -0
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/index.d.mts +1 -1
- package/resources/v1/customers/index.d.mts.map +1 -1
- package/resources/v1/customers/index.d.ts +1 -1
- package/resources/v1/customers/index.d.ts.map +1 -1
- package/resources/v1/customers/index.js.map +1 -1
- package/resources/v1/customers/index.mjs.map +1 -1
- package/resources/v1/events/credits/credits.d.mts +1 -1
- package/resources/v1/events/credits/credits.d.mts.map +1 -1
- package/resources/v1/events/credits/credits.d.ts +1 -1
- package/resources/v1/events/credits/credits.d.ts.map +1 -1
- package/resources/v1/events/credits/credits.js.map +1 -1
- package/resources/v1/events/credits/credits.mjs.map +1 -1
- package/resources/v1/events/credits/grants.d.mts +1 -1
- package/resources/v1/events/credits/grants.d.ts +1 -1
- package/resources/v1/features.d.mts +9 -0
- package/resources/v1/features.d.mts.map +1 -1
- package/resources/v1/features.d.ts +9 -0
- package/resources/v1/features.d.ts.map +1 -1
- package/resources/v1/index.d.mts +3 -3
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +3 -3
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/plans/entitlements.d.mts +28 -0
- package/resources/v1/plans/entitlements.d.mts.map +1 -1
- package/resources/v1/plans/entitlements.d.ts +28 -0
- package/resources/v1/plans/entitlements.d.ts.map +1 -1
- package/resources/v1/plans/index.d.mts +1 -1
- package/resources/v1/plans/index.d.mts.map +1 -1
- package/resources/v1/plans/index.d.ts +1 -1
- package/resources/v1/plans/index.d.ts.map +1 -1
- package/resources/v1/plans/index.js.map +1 -1
- package/resources/v1/plans/index.mjs.map +1 -1
- package/resources/v1/plans/plans.d.mts +392 -391
- package/resources/v1/plans/plans.d.mts.map +1 -1
- package/resources/v1/plans/plans.d.ts +392 -391
- package/resources/v1/plans/plans.d.ts.map +1 -1
- package/resources/v1/plans/plans.js +0 -7
- package/resources/v1/plans/plans.js.map +1 -1
- package/resources/v1/plans/plans.mjs +0 -7
- package/resources/v1/plans/plans.mjs.map +1 -1
- package/resources/v1/products.d.mts +9 -5
- package/resources/v1/products.d.mts.map +1 -1
- package/resources/v1/products.d.ts +9 -5
- package/resources/v1/products.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.mts +31 -21
- package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.ts +31 -21
- package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.js.map +1 -1
- package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
- package/resources/v1/usage.d.mts +1 -1
- package/resources/v1/usage.d.ts +1 -1
- package/resources/v1/v1.d.mts +6 -6
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +6 -6
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs.map +1 -1
- package/src/resources/v1/addons/addons.ts +1111 -2508
- package/src/resources/v1/addons/entitlements.ts +33 -0
- package/src/resources/v1/addons/index.ts +0 -3
- package/src/resources/v1/coupons.ts +3 -3
- package/src/resources/v1/customers/customers.ts +2064 -4
- package/src/resources/v1/customers/index.ts +2 -0
- package/src/resources/v1/events/credits/credits.ts +3 -1
- package/src/resources/v1/events/credits/grants.ts +1 -1
- package/src/resources/v1/features.ts +9 -0
- package/src/resources/v1/index.ts +2 -4
- package/src/resources/v1/plans/entitlements.ts +33 -0
- package/src/resources/v1/plans/index.ts +0 -1
- package/src/resources/v1/plans/plans.ts +924 -930
- package/src/resources/v1/products.ts +9 -5
- package/src/resources/v1/subscriptions/subscriptions.ts +28 -22
- package/src/resources/v1/usage.ts +1 -1
- package/src/resources/v1/v1.ts +4 -8
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { APIResource } from "../../../core/resource.js";
|
|
2
|
-
import * as AddonsAPI from "../addons/addons.js";
|
|
3
2
|
import * as EntitlementsAPI from "./entitlements.js";
|
|
4
3
|
import { EntitlementCreateParams, EntitlementCreateResponse, EntitlementDeleteParams, EntitlementListResponse, EntitlementUpdateParams, Entitlements, PlanEntitlement } from "./entitlements.js";
|
|
5
4
|
import { APIPromise } from "../../../core/api-promise.js";
|
|
@@ -44,11 +43,6 @@ export declare class Plans extends APIResource {
|
|
|
44
43
|
* Removes a draft version of a plan.
|
|
45
44
|
*/
|
|
46
45
|
removeDraft(id: string, options?: RequestOptions): APIPromise<PlanRemoveDraftResponse>;
|
|
47
|
-
/**
|
|
48
|
-
* Sets the pricing configuration for a plan, including pricing models, overage
|
|
49
|
-
* pricing, and minimum spend.
|
|
50
|
-
*/
|
|
51
|
-
setPricing(id: string, body: PlanSetPricingParams, options?: RequestOptions): APIPromise<AddonsAPI.SetPackagePricingResponse>;
|
|
52
46
|
}
|
|
53
47
|
export type PlanListResponsesMyCursorIDPage = MyCursorIDPage<PlanListResponse>;
|
|
54
48
|
/**
|
|
@@ -409,6 +403,10 @@ export interface PlanUpdateParams {
|
|
|
409
403
|
* The unique identifier for the entity in the billing provider
|
|
410
404
|
*/
|
|
411
405
|
billingId?: string | null;
|
|
406
|
+
/**
|
|
407
|
+
* Pricing configuration to set on the plan draft
|
|
408
|
+
*/
|
|
409
|
+
charges?: PlanUpdateParams.Charges;
|
|
412
410
|
compatibleAddonIds?: Array<string> | null;
|
|
413
411
|
/**
|
|
414
412
|
* Default trial configuration for the plan
|
|
@@ -435,269 +433,148 @@ export interface PlanUpdateParams {
|
|
|
435
433
|
}
|
|
436
434
|
export declare namespace PlanUpdateParams {
|
|
437
435
|
/**
|
|
438
|
-
*
|
|
436
|
+
* Pricing configuration to set on the plan draft
|
|
439
437
|
*/
|
|
440
|
-
interface
|
|
438
|
+
interface Charges {
|
|
441
439
|
/**
|
|
442
|
-
* The
|
|
440
|
+
* The pricing type (FREE, PAID, or CUSTOM)
|
|
443
441
|
*/
|
|
444
|
-
|
|
442
|
+
pricingType: 'FREE' | 'PAID' | 'CUSTOM';
|
|
445
443
|
/**
|
|
446
|
-
*
|
|
444
|
+
* Deprecated: billing integration ID
|
|
447
445
|
*/
|
|
448
|
-
|
|
446
|
+
billingId?: string;
|
|
449
447
|
/**
|
|
450
|
-
*
|
|
448
|
+
* Minimum spend configuration per billing period
|
|
451
449
|
*/
|
|
452
|
-
|
|
450
|
+
minimumSpend?: Array<Charges.MinimumSpend> | null;
|
|
453
451
|
/**
|
|
454
|
-
*
|
|
452
|
+
* When overage charges are billed
|
|
455
453
|
*/
|
|
456
|
-
|
|
457
|
-
}
|
|
458
|
-
namespace DefaultTrialConfig {
|
|
454
|
+
overageBillingPeriod?: 'ON_SUBSCRIPTION_RENEWAL' | 'MONTHLY';
|
|
459
455
|
/**
|
|
460
|
-
*
|
|
456
|
+
* Array of overage pricing model configurations
|
|
461
457
|
*/
|
|
462
|
-
|
|
463
|
-
/**
|
|
464
|
-
* Whether the budget limit is a soft limit (allows overage) or hard limit
|
|
465
|
-
*/
|
|
466
|
-
hasSoftLimit: boolean;
|
|
467
|
-
/**
|
|
468
|
-
* The budget limit amount
|
|
469
|
-
*/
|
|
470
|
-
limit: number;
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
export interface PlanListParams extends MyCursorIDPageParams {
|
|
475
|
-
/**
|
|
476
|
-
* Filter by creation date using range operators: gt, gte, lt, lte
|
|
477
|
-
*/
|
|
478
|
-
createdAt?: PlanListParams.CreatedAt;
|
|
479
|
-
/**
|
|
480
|
-
* Filter by product ID
|
|
481
|
-
*/
|
|
482
|
-
productId?: string;
|
|
483
|
-
/**
|
|
484
|
-
* Filter by status. Supports comma-separated values for multiple statuses
|
|
485
|
-
*/
|
|
486
|
-
status?: string;
|
|
487
|
-
}
|
|
488
|
-
export declare namespace PlanListParams {
|
|
489
|
-
/**
|
|
490
|
-
* Filter by creation date using range operators: gt, gte, lt, lte
|
|
491
|
-
*/
|
|
492
|
-
interface CreatedAt {
|
|
458
|
+
overagePricingModels?: Array<Charges.OveragePricingModel>;
|
|
493
459
|
/**
|
|
494
|
-
*
|
|
460
|
+
* Array of pricing model configurations
|
|
495
461
|
*/
|
|
496
|
-
|
|
497
|
-
/**
|
|
498
|
-
* Greater than or equal to the specified createdAt value
|
|
499
|
-
*/
|
|
500
|
-
gte?: string;
|
|
501
|
-
/**
|
|
502
|
-
* Less than the specified createdAt value
|
|
503
|
-
*/
|
|
504
|
-
lt?: string;
|
|
505
|
-
/**
|
|
506
|
-
* Less than or equal to the specified createdAt value
|
|
507
|
-
*/
|
|
508
|
-
lte?: string;
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
export interface PlanPublishParams {
|
|
512
|
-
/**
|
|
513
|
-
* The migration type of the package
|
|
514
|
-
*/
|
|
515
|
-
migrationType: 'NEW_CUSTOMERS' | 'ALL_CUSTOMERS';
|
|
516
|
-
}
|
|
517
|
-
export interface PlanSetPricingParams {
|
|
518
|
-
/**
|
|
519
|
-
* The pricing type (FREE, PAID, or CUSTOM)
|
|
520
|
-
*/
|
|
521
|
-
pricingType: 'FREE' | 'PAID' | 'CUSTOM';
|
|
522
|
-
/**
|
|
523
|
-
* Deprecated: billing integration ID
|
|
524
|
-
*/
|
|
525
|
-
billingId?: string;
|
|
526
|
-
/**
|
|
527
|
-
* Minimum spend configuration per billing period
|
|
528
|
-
*/
|
|
529
|
-
minimumSpend?: Array<PlanSetPricingParams.MinimumSpend> | null;
|
|
530
|
-
/**
|
|
531
|
-
* When overage charges are billed
|
|
532
|
-
*/
|
|
533
|
-
overageBillingPeriod?: 'ON_SUBSCRIPTION_RENEWAL' | 'MONTHLY';
|
|
534
|
-
/**
|
|
535
|
-
* Array of overage pricing model configurations
|
|
536
|
-
*/
|
|
537
|
-
overagePricingModels?: Array<PlanSetPricingParams.OveragePricingModel>;
|
|
538
|
-
/**
|
|
539
|
-
* Array of pricing model configurations
|
|
540
|
-
*/
|
|
541
|
-
pricingModels?: Array<PlanSetPricingParams.PricingModel>;
|
|
542
|
-
}
|
|
543
|
-
export declare namespace PlanSetPricingParams {
|
|
544
|
-
/**
|
|
545
|
-
* Minimum spend configuration for a billing period.
|
|
546
|
-
*/
|
|
547
|
-
interface MinimumSpend {
|
|
548
|
-
/**
|
|
549
|
-
* The billing period
|
|
550
|
-
*/
|
|
551
|
-
billingPeriod: 'MONTHLY' | 'ANNUALLY';
|
|
552
|
-
/**
|
|
553
|
-
* The minimum spend amount
|
|
554
|
-
*/
|
|
555
|
-
minimum: MinimumSpend.Minimum;
|
|
462
|
+
pricingModels?: Array<Charges.PricingModel>;
|
|
556
463
|
}
|
|
557
|
-
namespace
|
|
464
|
+
namespace Charges {
|
|
558
465
|
/**
|
|
559
|
-
*
|
|
466
|
+
* Minimum spend configuration for a billing period.
|
|
560
467
|
*/
|
|
561
|
-
interface
|
|
468
|
+
interface MinimumSpend {
|
|
562
469
|
/**
|
|
563
|
-
* The
|
|
470
|
+
* The billing period
|
|
564
471
|
*/
|
|
565
|
-
|
|
472
|
+
billingPeriod: 'MONTHLY' | 'ANNUALLY';
|
|
566
473
|
/**
|
|
567
|
-
* The
|
|
474
|
+
* The minimum spend amount
|
|
568
475
|
*/
|
|
569
|
-
|
|
476
|
+
minimum: MinimumSpend.Minimum;
|
|
570
477
|
}
|
|
571
|
-
|
|
572
|
-
/**
|
|
573
|
-
* Overage pricing model configuration.
|
|
574
|
-
*/
|
|
575
|
-
interface OveragePricingModel {
|
|
576
|
-
/**
|
|
577
|
-
* The billing model for overages
|
|
578
|
-
*/
|
|
579
|
-
billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED';
|
|
580
|
-
/**
|
|
581
|
-
* Price periods for overage pricing
|
|
582
|
-
*/
|
|
583
|
-
pricePeriods: Array<OveragePricingModel.PricePeriod>;
|
|
584
|
-
/**
|
|
585
|
-
* The billing cadence for overages
|
|
586
|
-
*/
|
|
587
|
-
billingCadence?: 'RECURRING' | 'ONE_OFF';
|
|
588
|
-
/**
|
|
589
|
-
* Entitlement configuration for the overage feature
|
|
590
|
-
*/
|
|
591
|
-
entitlement?: OveragePricingModel.Entitlement;
|
|
592
|
-
/**
|
|
593
|
-
* The feature ID for overage pricing
|
|
594
|
-
*/
|
|
595
|
-
featureId?: string;
|
|
596
|
-
/**
|
|
597
|
-
* Custom currency ID for overage top-up
|
|
598
|
-
*/
|
|
599
|
-
topUpCustomCurrencyId?: string;
|
|
600
|
-
}
|
|
601
|
-
namespace OveragePricingModel {
|
|
602
|
-
/**
|
|
603
|
-
* Price configuration for a specific billing period.
|
|
604
|
-
*/
|
|
605
|
-
interface PricePeriod {
|
|
478
|
+
namespace MinimumSpend {
|
|
606
479
|
/**
|
|
607
|
-
* The
|
|
480
|
+
* The minimum spend amount
|
|
608
481
|
*/
|
|
609
|
-
|
|
482
|
+
interface Minimum {
|
|
483
|
+
/**
|
|
484
|
+
* The price amount
|
|
485
|
+
*/
|
|
486
|
+
amount: number;
|
|
487
|
+
/**
|
|
488
|
+
* The price currency
|
|
489
|
+
*/
|
|
490
|
+
currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* Overage pricing model configuration.
|
|
495
|
+
*/
|
|
496
|
+
interface OveragePricingModel {
|
|
610
497
|
/**
|
|
611
|
-
*
|
|
498
|
+
* The billing model for overages
|
|
612
499
|
*/
|
|
613
|
-
|
|
500
|
+
billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED';
|
|
614
501
|
/**
|
|
615
|
-
*
|
|
502
|
+
* Price periods for overage pricing
|
|
616
503
|
*/
|
|
617
|
-
|
|
504
|
+
pricePeriods: Array<OveragePricingModel.PricePeriod>;
|
|
618
505
|
/**
|
|
619
|
-
*
|
|
506
|
+
* The billing cadence for overages
|
|
620
507
|
*/
|
|
621
|
-
|
|
508
|
+
billingCadence?: 'RECURRING' | 'ONE_OFF';
|
|
622
509
|
/**
|
|
623
|
-
*
|
|
510
|
+
* Entitlement configuration for the overage feature
|
|
624
511
|
*/
|
|
625
|
-
|
|
512
|
+
entitlement?: OveragePricingModel.Entitlement;
|
|
626
513
|
/**
|
|
627
|
-
* The
|
|
514
|
+
* The feature ID for overage pricing
|
|
628
515
|
*/
|
|
629
|
-
|
|
516
|
+
featureId?: string;
|
|
630
517
|
/**
|
|
631
|
-
*
|
|
518
|
+
* Custom currency ID for overage top-up
|
|
632
519
|
*/
|
|
633
|
-
|
|
520
|
+
topUpCustomCurrencyId?: string;
|
|
634
521
|
}
|
|
635
|
-
namespace
|
|
522
|
+
namespace OveragePricingModel {
|
|
636
523
|
/**
|
|
637
|
-
*
|
|
524
|
+
* Price configuration for a specific billing period.
|
|
638
525
|
*/
|
|
639
|
-
interface
|
|
526
|
+
interface PricePeriod {
|
|
640
527
|
/**
|
|
641
|
-
* The
|
|
528
|
+
* The billing period (MONTHLY or ANNUALLY)
|
|
642
529
|
*/
|
|
643
|
-
|
|
530
|
+
billingPeriod: 'MONTHLY' | 'ANNUALLY';
|
|
644
531
|
/**
|
|
645
|
-
*
|
|
532
|
+
* ISO country code for localized pricing
|
|
646
533
|
*/
|
|
647
|
-
|
|
534
|
+
billingCountryCode?: string;
|
|
648
535
|
/**
|
|
649
|
-
*
|
|
536
|
+
* Block size for usage-based pricing
|
|
650
537
|
*/
|
|
651
|
-
|
|
652
|
-
}
|
|
653
|
-
/**
|
|
654
|
-
* The price amount and currency
|
|
655
|
-
*/
|
|
656
|
-
interface Price {
|
|
657
|
-
/**
|
|
658
|
-
* The price amount
|
|
659
|
-
*/
|
|
660
|
-
amount: number;
|
|
538
|
+
blockSize?: number;
|
|
661
539
|
/**
|
|
662
|
-
*
|
|
540
|
+
* When credits are granted
|
|
663
541
|
*/
|
|
664
|
-
|
|
665
|
-
}
|
|
666
|
-
/**
|
|
667
|
-
* A tier in tiered pricing.
|
|
668
|
-
*/
|
|
669
|
-
interface Tier {
|
|
542
|
+
creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY';
|
|
670
543
|
/**
|
|
671
|
-
*
|
|
544
|
+
* Credit rate configuration for credit-based pricing
|
|
672
545
|
*/
|
|
673
|
-
|
|
546
|
+
creditRate?: PricePeriod.CreditRate;
|
|
674
547
|
/**
|
|
675
|
-
*
|
|
548
|
+
* The price amount and currency
|
|
676
549
|
*/
|
|
677
|
-
|
|
550
|
+
price?: PricePeriod.Price;
|
|
678
551
|
/**
|
|
679
|
-
*
|
|
552
|
+
* Tiered pricing configuration
|
|
680
553
|
*/
|
|
681
|
-
|
|
554
|
+
tiers?: Array<PricePeriod.Tier>;
|
|
682
555
|
}
|
|
683
|
-
namespace
|
|
556
|
+
namespace PricePeriod {
|
|
684
557
|
/**
|
|
685
|
-
*
|
|
558
|
+
* Credit rate configuration for credit-based pricing
|
|
686
559
|
*/
|
|
687
|
-
interface
|
|
560
|
+
interface CreditRate {
|
|
688
561
|
/**
|
|
689
|
-
* The
|
|
562
|
+
* The credit rate amount
|
|
690
563
|
*/
|
|
691
564
|
amount: number;
|
|
692
565
|
/**
|
|
693
|
-
* The
|
|
566
|
+
* The custom currency ID
|
|
694
567
|
*/
|
|
695
|
-
|
|
568
|
+
currencyId: string;
|
|
569
|
+
/**
|
|
570
|
+
* Optional cost formula expression
|
|
571
|
+
*/
|
|
572
|
+
costFormula?: string;
|
|
696
573
|
}
|
|
697
574
|
/**
|
|
698
|
-
*
|
|
575
|
+
* The price amount and currency
|
|
699
576
|
*/
|
|
700
|
-
interface
|
|
577
|
+
interface Price {
|
|
701
578
|
/**
|
|
702
579
|
* The price amount
|
|
703
580
|
*/
|
|
@@ -707,228 +584,228 @@ export declare namespace PlanSetPricingParams {
|
|
|
707
584
|
*/
|
|
708
585
|
currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
709
586
|
}
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
/**
|
|
713
|
-
* Entitlement configuration for the overage feature
|
|
714
|
-
*/
|
|
715
|
-
interface Entitlement {
|
|
716
|
-
/**
|
|
717
|
-
* The feature ID for the entitlement
|
|
718
|
-
*/
|
|
719
|
-
featureId: string;
|
|
720
|
-
/**
|
|
721
|
-
* Whether the limit is soft (allows overage)
|
|
722
|
-
*/
|
|
723
|
-
hasSoftLimit?: boolean;
|
|
724
|
-
/**
|
|
725
|
-
* Whether usage is unlimited
|
|
726
|
-
*/
|
|
727
|
-
hasUnlimitedUsage?: boolean;
|
|
728
|
-
/**
|
|
729
|
-
* Monthly reset configuration
|
|
730
|
-
*/
|
|
731
|
-
monthlyResetPeriodConfiguration?: Entitlement.MonthlyResetPeriodConfiguration;
|
|
732
|
-
/**
|
|
733
|
-
* The usage reset period
|
|
734
|
-
*/
|
|
735
|
-
resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR';
|
|
736
|
-
/**
|
|
737
|
-
* The usage limit before overage kicks in
|
|
738
|
-
*/
|
|
739
|
-
usageLimit?: number;
|
|
740
|
-
/**
|
|
741
|
-
* Weekly reset configuration
|
|
742
|
-
*/
|
|
743
|
-
weeklyResetPeriodConfiguration?: Entitlement.WeeklyResetPeriodConfiguration;
|
|
744
|
-
/**
|
|
745
|
-
* Yearly reset configuration
|
|
746
|
-
*/
|
|
747
|
-
yearlyResetPeriodConfiguration?: Entitlement.YearlyResetPeriodConfiguration;
|
|
748
|
-
}
|
|
749
|
-
namespace Entitlement {
|
|
750
|
-
/**
|
|
751
|
-
* Monthly reset configuration
|
|
752
|
-
*/
|
|
753
|
-
interface MonthlyResetPeriodConfiguration {
|
|
754
587
|
/**
|
|
755
|
-
*
|
|
588
|
+
* A tier in tiered pricing.
|
|
756
589
|
*/
|
|
757
|
-
|
|
590
|
+
interface Tier {
|
|
591
|
+
/**
|
|
592
|
+
* Flat price for this tier
|
|
593
|
+
*/
|
|
594
|
+
flatPrice?: Tier.FlatPrice;
|
|
595
|
+
/**
|
|
596
|
+
* Per-unit price in this tier
|
|
597
|
+
*/
|
|
598
|
+
unitPrice?: Tier.UnitPrice;
|
|
599
|
+
/**
|
|
600
|
+
* Upper bound of this tier (null for unlimited)
|
|
601
|
+
*/
|
|
602
|
+
upTo?: number;
|
|
603
|
+
}
|
|
604
|
+
namespace Tier {
|
|
605
|
+
/**
|
|
606
|
+
* Flat price for this tier
|
|
607
|
+
*/
|
|
608
|
+
interface FlatPrice {
|
|
609
|
+
/**
|
|
610
|
+
* The price amount
|
|
611
|
+
*/
|
|
612
|
+
amount: number;
|
|
613
|
+
/**
|
|
614
|
+
* The price currency
|
|
615
|
+
*/
|
|
616
|
+
currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
617
|
+
}
|
|
618
|
+
/**
|
|
619
|
+
* Per-unit price in this tier
|
|
620
|
+
*/
|
|
621
|
+
interface UnitPrice {
|
|
622
|
+
/**
|
|
623
|
+
* The price amount
|
|
624
|
+
*/
|
|
625
|
+
amount: number;
|
|
626
|
+
/**
|
|
627
|
+
* The price currency
|
|
628
|
+
*/
|
|
629
|
+
currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
630
|
+
}
|
|
631
|
+
}
|
|
758
632
|
}
|
|
759
633
|
/**
|
|
760
|
-
*
|
|
634
|
+
* Entitlement configuration for the overage feature
|
|
761
635
|
*/
|
|
762
|
-
interface
|
|
636
|
+
interface Entitlement {
|
|
763
637
|
/**
|
|
764
|
-
*
|
|
638
|
+
* The feature ID for the entitlement
|
|
765
639
|
*/
|
|
766
|
-
|
|
640
|
+
featureId: string;
|
|
641
|
+
/**
|
|
642
|
+
* Whether the limit is soft (allows overage)
|
|
643
|
+
*/
|
|
644
|
+
hasSoftLimit?: boolean;
|
|
645
|
+
/**
|
|
646
|
+
* Whether usage is unlimited
|
|
647
|
+
*/
|
|
648
|
+
hasUnlimitedUsage?: boolean;
|
|
649
|
+
/**
|
|
650
|
+
* Monthly reset configuration
|
|
651
|
+
*/
|
|
652
|
+
monthlyResetPeriodConfiguration?: Entitlement.MonthlyResetPeriodConfiguration;
|
|
653
|
+
/**
|
|
654
|
+
* The usage reset period
|
|
655
|
+
*/
|
|
656
|
+
resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR';
|
|
657
|
+
/**
|
|
658
|
+
* The usage limit before overage kicks in
|
|
659
|
+
*/
|
|
660
|
+
usageLimit?: number;
|
|
661
|
+
/**
|
|
662
|
+
* Weekly reset configuration
|
|
663
|
+
*/
|
|
664
|
+
weeklyResetPeriodConfiguration?: Entitlement.WeeklyResetPeriodConfiguration;
|
|
665
|
+
/**
|
|
666
|
+
* Yearly reset configuration
|
|
667
|
+
*/
|
|
668
|
+
yearlyResetPeriodConfiguration?: Entitlement.YearlyResetPeriodConfiguration;
|
|
767
669
|
}
|
|
768
|
-
|
|
769
|
-
* Yearly reset configuration
|
|
770
|
-
*/
|
|
771
|
-
interface YearlyResetPeriodConfiguration {
|
|
670
|
+
namespace Entitlement {
|
|
772
671
|
/**
|
|
773
|
-
*
|
|
672
|
+
* Monthly reset configuration
|
|
774
673
|
*/
|
|
775
|
-
|
|
674
|
+
interface MonthlyResetPeriodConfiguration {
|
|
675
|
+
/**
|
|
676
|
+
* Reset anchor (SubscriptionStart or StartOfTheMonth)
|
|
677
|
+
*/
|
|
678
|
+
accordingTo: 'SubscriptionStart' | 'StartOfTheMonth';
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* Weekly reset configuration
|
|
682
|
+
*/
|
|
683
|
+
interface WeeklyResetPeriodConfiguration {
|
|
684
|
+
/**
|
|
685
|
+
* Reset anchor (SubscriptionStart or specific day)
|
|
686
|
+
*/
|
|
687
|
+
accordingTo: 'SubscriptionStart' | 'EverySunday' | 'EveryMonday' | 'EveryTuesday' | 'EveryWednesday' | 'EveryThursday' | 'EveryFriday' | 'EverySaturday';
|
|
688
|
+
}
|
|
689
|
+
/**
|
|
690
|
+
* Yearly reset configuration
|
|
691
|
+
*/
|
|
692
|
+
interface YearlyResetPeriodConfiguration {
|
|
693
|
+
/**
|
|
694
|
+
* Reset anchor (SubscriptionStart)
|
|
695
|
+
*/
|
|
696
|
+
accordingTo: 'SubscriptionStart';
|
|
697
|
+
}
|
|
776
698
|
}
|
|
777
699
|
}
|
|
778
|
-
}
|
|
779
|
-
/**
|
|
780
|
-
* A pricing model configuration with billing details and price periods.
|
|
781
|
-
*/
|
|
782
|
-
interface PricingModel {
|
|
783
|
-
/**
|
|
784
|
-
* The billing model (FLAT_FEE, PER_UNIT, USAGE_BASED, CREDIT_BASED)
|
|
785
|
-
*/
|
|
786
|
-
billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED';
|
|
787
|
-
/**
|
|
788
|
-
* Array of price period configurations (at least one required)
|
|
789
|
-
*/
|
|
790
|
-
pricePeriods: Array<PricingModel.PricePeriod>;
|
|
791
|
-
/**
|
|
792
|
-
* The billing cadence (RECURRING or ONE_OFF)
|
|
793
|
-
*/
|
|
794
|
-
billingCadence?: 'RECURRING' | 'ONE_OFF';
|
|
795
|
-
/**
|
|
796
|
-
* The feature ID this pricing model is associated with
|
|
797
|
-
*/
|
|
798
|
-
featureId?: string;
|
|
799
|
-
/**
|
|
800
|
-
* Maximum number of units (max 999999)
|
|
801
|
-
*/
|
|
802
|
-
maxUnitQuantity?: number;
|
|
803
|
-
/**
|
|
804
|
-
* Minimum number of units
|
|
805
|
-
*/
|
|
806
|
-
minUnitQuantity?: number;
|
|
807
|
-
/**
|
|
808
|
-
* Monthly reset period configuration
|
|
809
|
-
*/
|
|
810
|
-
monthlyResetPeriodConfiguration?: PricingModel.MonthlyResetPeriodConfiguration;
|
|
811
|
-
/**
|
|
812
|
-
* The usage reset period
|
|
813
|
-
*/
|
|
814
|
-
resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR';
|
|
815
|
-
/**
|
|
816
|
-
* The tiered pricing mode (VOLUME or GRADUATED)
|
|
817
|
-
*/
|
|
818
|
-
tiersMode?: 'VOLUME' | 'GRADUATED';
|
|
819
|
-
/**
|
|
820
|
-
* The custom currency ID for top-up pricing
|
|
821
|
-
*/
|
|
822
|
-
topUpCustomCurrencyId?: string;
|
|
823
|
-
/**
|
|
824
|
-
* Weekly reset period configuration
|
|
825
|
-
*/
|
|
826
|
-
weeklyResetPeriodConfiguration?: PricingModel.WeeklyResetPeriodConfiguration;
|
|
827
|
-
/**
|
|
828
|
-
* Yearly reset period configuration
|
|
829
|
-
*/
|
|
830
|
-
yearlyResetPeriodConfiguration?: PricingModel.YearlyResetPeriodConfiguration;
|
|
831
|
-
}
|
|
832
|
-
namespace PricingModel {
|
|
833
700
|
/**
|
|
834
|
-
*
|
|
701
|
+
* A pricing model configuration with billing details and price periods.
|
|
835
702
|
*/
|
|
836
|
-
interface
|
|
703
|
+
interface PricingModel {
|
|
837
704
|
/**
|
|
838
|
-
* The billing
|
|
705
|
+
* The billing model (FLAT_FEE, PER_UNIT, USAGE_BASED, CREDIT_BASED)
|
|
839
706
|
*/
|
|
840
|
-
|
|
707
|
+
billingModel: 'FLAT_FEE' | 'MINIMUM_SPEND' | 'PER_UNIT' | 'USAGE_BASED' | 'CREDIT_BASED';
|
|
708
|
+
/**
|
|
709
|
+
* Array of price period configurations (at least one required)
|
|
710
|
+
*/
|
|
711
|
+
pricePeriods: Array<PricingModel.PricePeriod>;
|
|
712
|
+
/**
|
|
713
|
+
* The billing cadence (RECURRING or ONE_OFF)
|
|
714
|
+
*/
|
|
715
|
+
billingCadence?: 'RECURRING' | 'ONE_OFF';
|
|
716
|
+
/**
|
|
717
|
+
* The feature ID this pricing model is associated with
|
|
718
|
+
*/
|
|
719
|
+
featureId?: string;
|
|
720
|
+
/**
|
|
721
|
+
* Maximum number of units (max 999999)
|
|
722
|
+
*/
|
|
723
|
+
maxUnitQuantity?: number;
|
|
841
724
|
/**
|
|
842
|
-
*
|
|
725
|
+
* Minimum number of units
|
|
843
726
|
*/
|
|
844
|
-
|
|
727
|
+
minUnitQuantity?: number;
|
|
845
728
|
/**
|
|
846
|
-
*
|
|
729
|
+
* Monthly reset period configuration
|
|
730
|
+
*/
|
|
731
|
+
monthlyResetPeriodConfiguration?: PricingModel.MonthlyResetPeriodConfiguration;
|
|
732
|
+
/**
|
|
733
|
+
* The usage reset period
|
|
847
734
|
*/
|
|
848
|
-
|
|
735
|
+
resetPeriod?: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR';
|
|
849
736
|
/**
|
|
850
|
-
*
|
|
737
|
+
* The tiered pricing mode (VOLUME or GRADUATED)
|
|
851
738
|
*/
|
|
852
|
-
|
|
739
|
+
tiersMode?: 'VOLUME' | 'GRADUATED';
|
|
853
740
|
/**
|
|
854
|
-
*
|
|
741
|
+
* The custom currency ID for top-up pricing
|
|
855
742
|
*/
|
|
856
|
-
|
|
743
|
+
topUpCustomCurrencyId?: string;
|
|
857
744
|
/**
|
|
858
|
-
*
|
|
745
|
+
* Weekly reset period configuration
|
|
859
746
|
*/
|
|
860
|
-
|
|
747
|
+
weeklyResetPeriodConfiguration?: PricingModel.WeeklyResetPeriodConfiguration;
|
|
861
748
|
/**
|
|
862
|
-
*
|
|
749
|
+
* Yearly reset period configuration
|
|
863
750
|
*/
|
|
864
|
-
|
|
751
|
+
yearlyResetPeriodConfiguration?: PricingModel.YearlyResetPeriodConfiguration;
|
|
865
752
|
}
|
|
866
|
-
namespace
|
|
753
|
+
namespace PricingModel {
|
|
867
754
|
/**
|
|
868
|
-
*
|
|
755
|
+
* Price configuration for a specific billing period.
|
|
869
756
|
*/
|
|
870
|
-
interface
|
|
871
|
-
/**
|
|
872
|
-
* The credit rate amount
|
|
873
|
-
*/
|
|
874
|
-
amount: number;
|
|
757
|
+
interface PricePeriod {
|
|
875
758
|
/**
|
|
876
|
-
* The
|
|
759
|
+
* The billing period (MONTHLY or ANNUALLY)
|
|
877
760
|
*/
|
|
878
|
-
|
|
761
|
+
billingPeriod: 'MONTHLY' | 'ANNUALLY';
|
|
879
762
|
/**
|
|
880
|
-
*
|
|
763
|
+
* ISO country code for localized pricing
|
|
881
764
|
*/
|
|
882
|
-
|
|
883
|
-
}
|
|
884
|
-
/**
|
|
885
|
-
* The price amount and currency
|
|
886
|
-
*/
|
|
887
|
-
interface Price {
|
|
765
|
+
billingCountryCode?: string;
|
|
888
766
|
/**
|
|
889
|
-
*
|
|
767
|
+
* Block size for usage-based pricing
|
|
890
768
|
*/
|
|
891
|
-
|
|
769
|
+
blockSize?: number;
|
|
892
770
|
/**
|
|
893
|
-
*
|
|
771
|
+
* When credits are granted
|
|
894
772
|
*/
|
|
895
|
-
|
|
896
|
-
}
|
|
897
|
-
/**
|
|
898
|
-
* A tier in tiered pricing.
|
|
899
|
-
*/
|
|
900
|
-
interface Tier {
|
|
773
|
+
creditGrantCadence?: 'BEGINNING_OF_BILLING_PERIOD' | 'MONTHLY';
|
|
901
774
|
/**
|
|
902
|
-
*
|
|
775
|
+
* Credit rate configuration for credit-based pricing
|
|
903
776
|
*/
|
|
904
|
-
|
|
777
|
+
creditRate?: PricePeriod.CreditRate;
|
|
905
778
|
/**
|
|
906
|
-
*
|
|
779
|
+
* The price amount and currency
|
|
907
780
|
*/
|
|
908
|
-
|
|
781
|
+
price?: PricePeriod.Price;
|
|
909
782
|
/**
|
|
910
|
-
*
|
|
783
|
+
* Tiered pricing configuration
|
|
911
784
|
*/
|
|
912
|
-
|
|
785
|
+
tiers?: Array<PricePeriod.Tier>;
|
|
913
786
|
}
|
|
914
|
-
namespace
|
|
787
|
+
namespace PricePeriod {
|
|
915
788
|
/**
|
|
916
|
-
*
|
|
789
|
+
* Credit rate configuration for credit-based pricing
|
|
917
790
|
*/
|
|
918
|
-
interface
|
|
791
|
+
interface CreditRate {
|
|
919
792
|
/**
|
|
920
|
-
* The
|
|
793
|
+
* The credit rate amount
|
|
921
794
|
*/
|
|
922
795
|
amount: number;
|
|
923
796
|
/**
|
|
924
|
-
* The
|
|
797
|
+
* The custom currency ID
|
|
925
798
|
*/
|
|
926
|
-
|
|
799
|
+
currencyId: string;
|
|
800
|
+
/**
|
|
801
|
+
* Optional cost formula expression
|
|
802
|
+
*/
|
|
803
|
+
costFormula?: string;
|
|
927
804
|
}
|
|
928
805
|
/**
|
|
929
|
-
*
|
|
806
|
+
* The price amount and currency
|
|
930
807
|
*/
|
|
931
|
-
interface
|
|
808
|
+
interface Price {
|
|
932
809
|
/**
|
|
933
810
|
* The price amount
|
|
934
811
|
*/
|
|
@@ -938,39 +815,163 @@ export declare namespace PlanSetPricingParams {
|
|
|
938
815
|
*/
|
|
939
816
|
currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
940
817
|
}
|
|
818
|
+
/**
|
|
819
|
+
* A tier in tiered pricing.
|
|
820
|
+
*/
|
|
821
|
+
interface Tier {
|
|
822
|
+
/**
|
|
823
|
+
* Flat price for this tier
|
|
824
|
+
*/
|
|
825
|
+
flatPrice?: Tier.FlatPrice;
|
|
826
|
+
/**
|
|
827
|
+
* Per-unit price in this tier
|
|
828
|
+
*/
|
|
829
|
+
unitPrice?: Tier.UnitPrice;
|
|
830
|
+
/**
|
|
831
|
+
* Upper bound of this tier (null for unlimited)
|
|
832
|
+
*/
|
|
833
|
+
upTo?: number;
|
|
834
|
+
}
|
|
835
|
+
namespace Tier {
|
|
836
|
+
/**
|
|
837
|
+
* Flat price for this tier
|
|
838
|
+
*/
|
|
839
|
+
interface FlatPrice {
|
|
840
|
+
/**
|
|
841
|
+
* The price amount
|
|
842
|
+
*/
|
|
843
|
+
amount: number;
|
|
844
|
+
/**
|
|
845
|
+
* The price currency
|
|
846
|
+
*/
|
|
847
|
+
currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
848
|
+
}
|
|
849
|
+
/**
|
|
850
|
+
* Per-unit price in this tier
|
|
851
|
+
*/
|
|
852
|
+
interface UnitPrice {
|
|
853
|
+
/**
|
|
854
|
+
* The price amount
|
|
855
|
+
*/
|
|
856
|
+
amount: number;
|
|
857
|
+
/**
|
|
858
|
+
* The price currency
|
|
859
|
+
*/
|
|
860
|
+
currency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf';
|
|
861
|
+
}
|
|
862
|
+
}
|
|
941
863
|
}
|
|
942
|
-
}
|
|
943
|
-
/**
|
|
944
|
-
* Monthly reset period configuration
|
|
945
|
-
*/
|
|
946
|
-
interface MonthlyResetPeriodConfiguration {
|
|
947
864
|
/**
|
|
948
|
-
*
|
|
865
|
+
* Monthly reset period configuration
|
|
949
866
|
*/
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
867
|
+
interface MonthlyResetPeriodConfiguration {
|
|
868
|
+
/**
|
|
869
|
+
* Reset anchor (SubscriptionStart or StartOfTheMonth)
|
|
870
|
+
*/
|
|
871
|
+
accordingTo: 'SubscriptionStart' | 'StartOfTheMonth';
|
|
872
|
+
}
|
|
956
873
|
/**
|
|
957
|
-
*
|
|
874
|
+
* Weekly reset period configuration
|
|
958
875
|
*/
|
|
959
|
-
|
|
876
|
+
interface WeeklyResetPeriodConfiguration {
|
|
877
|
+
/**
|
|
878
|
+
* Reset anchor (SubscriptionStart or specific day)
|
|
879
|
+
*/
|
|
880
|
+
accordingTo: 'SubscriptionStart' | 'EverySunday' | 'EveryMonday' | 'EveryTuesday' | 'EveryWednesday' | 'EveryThursday' | 'EveryFriday' | 'EverySaturday';
|
|
881
|
+
}
|
|
882
|
+
/**
|
|
883
|
+
* Yearly reset period configuration
|
|
884
|
+
*/
|
|
885
|
+
interface YearlyResetPeriodConfiguration {
|
|
886
|
+
/**
|
|
887
|
+
* Reset anchor (SubscriptionStart)
|
|
888
|
+
*/
|
|
889
|
+
accordingTo: 'SubscriptionStart';
|
|
890
|
+
}
|
|
960
891
|
}
|
|
892
|
+
}
|
|
893
|
+
/**
|
|
894
|
+
* Default trial configuration for the plan
|
|
895
|
+
*/
|
|
896
|
+
interface DefaultTrialConfig {
|
|
897
|
+
/**
|
|
898
|
+
* The duration of the trial in the specified units
|
|
899
|
+
*/
|
|
900
|
+
duration: number;
|
|
901
|
+
/**
|
|
902
|
+
* The time unit for the trial duration (DAY or MONTH)
|
|
903
|
+
*/
|
|
904
|
+
units: 'DAY' | 'MONTH';
|
|
905
|
+
/**
|
|
906
|
+
* Budget configuration for the trial
|
|
907
|
+
*/
|
|
908
|
+
budget?: DefaultTrialConfig.Budget | null;
|
|
909
|
+
/**
|
|
910
|
+
* Behavior when the trial ends (CONVERT_TO_PAID or CANCEL_SUBSCRIPTION)
|
|
911
|
+
*/
|
|
912
|
+
trialEndBehavior?: 'CONVERT_TO_PAID' | 'CANCEL_SUBSCRIPTION' | null;
|
|
913
|
+
}
|
|
914
|
+
namespace DefaultTrialConfig {
|
|
961
915
|
/**
|
|
962
|
-
*
|
|
916
|
+
* Budget configuration for the trial
|
|
963
917
|
*/
|
|
964
|
-
interface
|
|
918
|
+
interface Budget {
|
|
965
919
|
/**
|
|
966
|
-
*
|
|
920
|
+
* Whether the budget limit is a soft limit (allows overage) or hard limit
|
|
967
921
|
*/
|
|
968
|
-
|
|
922
|
+
hasSoftLimit: boolean;
|
|
923
|
+
/**
|
|
924
|
+
* The budget limit amount
|
|
925
|
+
*/
|
|
926
|
+
limit: number;
|
|
969
927
|
}
|
|
970
928
|
}
|
|
971
929
|
}
|
|
930
|
+
export interface PlanListParams extends MyCursorIDPageParams {
|
|
931
|
+
/**
|
|
932
|
+
* Filter by creation date using range operators: gt, gte, lt, lte
|
|
933
|
+
*/
|
|
934
|
+
createdAt?: PlanListParams.CreatedAt;
|
|
935
|
+
/**
|
|
936
|
+
* Filter by product ID
|
|
937
|
+
*/
|
|
938
|
+
productId?: string;
|
|
939
|
+
/**
|
|
940
|
+
* Filter by status. Supports comma-separated values for multiple statuses
|
|
941
|
+
*/
|
|
942
|
+
status?: string;
|
|
943
|
+
}
|
|
944
|
+
export declare namespace PlanListParams {
|
|
945
|
+
/**
|
|
946
|
+
* Filter by creation date using range operators: gt, gte, lt, lte
|
|
947
|
+
*/
|
|
948
|
+
interface CreatedAt {
|
|
949
|
+
/**
|
|
950
|
+
* Greater than the specified createdAt value
|
|
951
|
+
*/
|
|
952
|
+
gt?: string;
|
|
953
|
+
/**
|
|
954
|
+
* Greater than or equal to the specified createdAt value
|
|
955
|
+
*/
|
|
956
|
+
gte?: string;
|
|
957
|
+
/**
|
|
958
|
+
* Less than the specified createdAt value
|
|
959
|
+
*/
|
|
960
|
+
lt?: string;
|
|
961
|
+
/**
|
|
962
|
+
* Less than or equal to the specified createdAt value
|
|
963
|
+
*/
|
|
964
|
+
lte?: string;
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
export interface PlanPublishParams {
|
|
968
|
+
/**
|
|
969
|
+
* The migration type of the package
|
|
970
|
+
*/
|
|
971
|
+
migrationType: 'NEW_CUSTOMERS' | 'ALL_CUSTOMERS';
|
|
972
|
+
}
|
|
972
973
|
export declare namespace Plans {
|
|
973
|
-
export { type Plan as Plan, type PlanListResponse as PlanListResponse, type PlanPublishResponse as PlanPublishResponse, type PlanRemoveDraftResponse as PlanRemoveDraftResponse, type PlanListResponsesMyCursorIDPage as PlanListResponsesMyCursorIDPage, type PlanCreateParams as PlanCreateParams, type PlanUpdateParams as PlanUpdateParams, type PlanListParams as PlanListParams, type PlanPublishParams as PlanPublishParams,
|
|
974
|
+
export { type Plan as Plan, type PlanListResponse as PlanListResponse, type PlanPublishResponse as PlanPublishResponse, type PlanRemoveDraftResponse as PlanRemoveDraftResponse, type PlanListResponsesMyCursorIDPage as PlanListResponsesMyCursorIDPage, type PlanCreateParams as PlanCreateParams, type PlanUpdateParams as PlanUpdateParams, type PlanListParams as PlanListParams, type PlanPublishParams as PlanPublishParams, };
|
|
974
975
|
export { Entitlements as Entitlements, type PlanEntitlement as PlanEntitlement, type EntitlementCreateResponse as EntitlementCreateResponse, type EntitlementListResponse as EntitlementListResponse, type EntitlementCreateParams as EntitlementCreateParams, type EntitlementUpdateParams as EntitlementUpdateParams, type EntitlementDeleteParams as EntitlementDeleteParams, };
|
|
975
976
|
}
|
|
976
977
|
//# sourceMappingURL=plans.d.ts.map
|