@stigg/typescript 0.1.0-beta.55 → 0.1.0-beta.56
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 +8 -0
- package/package.json +1 -1
- package/resources/v1/addons/addons.d.mts +30 -13
- package/resources/v1/addons/addons.d.mts.map +1 -1
- package/resources/v1/addons/addons.d.ts +30 -13
- package/resources/v1/addons/addons.d.ts.map +1 -1
- package/resources/v1/addons/addons.js +5 -1
- package/resources/v1/addons/addons.js.map +1 -1
- package/resources/v1/addons/addons.mjs +5 -1
- package/resources/v1/addons/addons.mjs.map +1 -1
- package/resources/v1/contracts.d.mts +35 -4
- package/resources/v1/contracts.d.mts.map +1 -1
- package/resources/v1/contracts.d.ts +35 -4
- package/resources/v1/contracts.d.ts.map +1 -1
- package/resources/v1/coupons.d.mts +18 -9
- package/resources/v1/coupons.d.mts.map +1 -1
- package/resources/v1/coupons.d.ts +18 -9
- package/resources/v1/coupons.d.ts.map +1 -1
- package/resources/v1/credits/grants.d.mts +51 -14
- package/resources/v1/credits/grants.d.mts.map +1 -1
- package/resources/v1/credits/grants.d.ts +51 -14
- package/resources/v1/credits/grants.d.ts.map +1 -1
- package/resources/v1/customers/customers.d.mts +119 -49
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +119 -49
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +12 -12
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +12 -12
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/integrations.d.mts +17 -8
- package/resources/v1/customers/integrations.d.mts.map +1 -1
- package/resources/v1/customers/integrations.d.ts +17 -8
- package/resources/v1/customers/integrations.d.ts.map +1 -1
- package/resources/v1/customers/payment-method.d.mts +7 -3
- package/resources/v1/customers/payment-method.d.mts.map +1 -1
- package/resources/v1/customers/payment-method.d.ts +7 -3
- package/resources/v1/customers/payment-method.d.ts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.mts +23 -5
- package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.ts +23 -5
- package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -1
- package/resources/v1/events/events.d.mts +13 -5
- package/resources/v1/events/events.d.mts.map +1 -1
- package/resources/v1/events/events.d.ts +13 -5
- package/resources/v1/events/events.d.ts.map +1 -1
- package/resources/v1/events/events.js +2 -2
- package/resources/v1/events/events.js.map +1 -1
- package/resources/v1/events/events.mjs +2 -2
- package/resources/v1/events/events.mjs.map +1 -1
- package/resources/v1/features.d.mts +222 -7
- package/resources/v1/features.d.mts.map +1 -1
- package/resources/v1/features.d.ts +222 -7
- package/resources/v1/features.d.ts.map +1 -1
- package/resources/v1/plans/plans.d.mts +62 -22
- package/resources/v1/plans/plans.d.mts.map +1 -1
- package/resources/v1/plans/plans.d.ts +62 -22
- package/resources/v1/plans/plans.d.ts.map +1 -1
- package/resources/v1/plans/plans.js +5 -1
- package/resources/v1/plans/plans.js.map +1 -1
- package/resources/v1/plans/plans.mjs +5 -1
- package/resources/v1/plans/plans.mjs.map +1 -1
- package/resources/v1/products.d.mts +15 -7
- package/resources/v1/products.d.mts.map +1 -1
- package/resources/v1/products.d.ts +15 -7
- package/resources/v1/products.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.mts +66 -22
- package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.ts +66 -22
- package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.js +11 -3
- package/resources/v1/subscriptions/subscriptions.js.map +1 -1
- package/resources/v1/subscriptions/subscriptions.mjs +11 -3
- package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
- package/resources/v1/usage.d.mts +32 -9
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts +32 -9
- package/resources/v1/usage.d.ts.map +1 -1
- package/src/resources/v1/addons/addons.ts +30 -13
- package/src/resources/v1/contracts.ts +41 -4
- package/src/resources/v1/coupons.ts +18 -9
- package/src/resources/v1/credits/grants.ts +51 -14
- package/src/resources/v1/customers/customers.ts +120 -49
- package/src/resources/v1/customers/integrations.ts +17 -8
- package/src/resources/v1/customers/payment-method.ts +7 -3
- package/src/resources/v1/customers/promotional-entitlements.ts +23 -5
- package/src/resources/v1/events/events.ts +13 -5
- package/src/resources/v1/features.ts +288 -7
- package/src/resources/v1/plans/plans.ts +62 -22
- package/src/resources/v1/products.ts +15 -7
- package/src/resources/v1/subscriptions/subscriptions.ts +68 -22
- package/src/resources/v1/usage.ts +32 -9
- 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
|
@@ -185,7 +185,8 @@ export namespace Feature {
|
|
|
185
185
|
featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE';
|
|
186
186
|
|
|
187
187
|
/**
|
|
188
|
-
* The type of the feature
|
|
188
|
+
* The type of the feature: BOOLEAN (on/off access), NUMBER (a numeric limit or
|
|
189
|
+
* quantity), or ENUM (one of a fixed set of values).
|
|
189
190
|
*/
|
|
190
191
|
featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM';
|
|
191
192
|
|
|
@@ -205,7 +206,16 @@ export namespace Feature {
|
|
|
205
206
|
metadata: { [key: string]: string };
|
|
206
207
|
|
|
207
208
|
/**
|
|
208
|
-
*
|
|
209
|
+
* Event meter that turns reported events into usage for a metered feature
|
|
210
|
+
*/
|
|
211
|
+
meter: Data.Meter | null;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* How usage accumulates for this feature. `Incremental` and `Fluctuating` features
|
|
215
|
+
* track usage from reported events; `None` means the feature's value isn't
|
|
216
|
+
* usage-tracked — it's just a numeric or enum value carried by the plan (for
|
|
217
|
+
* example, a seat count or a tier setting) rather than something customers
|
|
218
|
+
* consume.
|
|
209
219
|
*/
|
|
210
220
|
meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL';
|
|
211
221
|
|
|
@@ -233,6 +243,84 @@ export namespace Feature {
|
|
|
233
243
|
value: string;
|
|
234
244
|
}
|
|
235
245
|
|
|
246
|
+
/**
|
|
247
|
+
* Event meter that turns reported events into usage for a metered feature
|
|
248
|
+
*/
|
|
249
|
+
export interface Meter {
|
|
250
|
+
/**
|
|
251
|
+
* How the matching events are aggregated into a usage value
|
|
252
|
+
*/
|
|
253
|
+
aggregation: Meter.Aggregation;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Event filters. Conditions within a filter are ANDed, and filters are ORed
|
|
257
|
+
*/
|
|
258
|
+
filters: Array<Meter.Filter>;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export namespace Meter {
|
|
262
|
+
/**
|
|
263
|
+
* How the matching events are aggregated into a usage value
|
|
264
|
+
*/
|
|
265
|
+
export interface Aggregation {
|
|
266
|
+
/**
|
|
267
|
+
* Aggregation function applied to the matching events
|
|
268
|
+
*/
|
|
269
|
+
function: 'SUM' | 'MAX' | 'MIN' | 'AVG' | 'COUNT' | 'UNIQUE';
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Aggregation field name
|
|
273
|
+
*/
|
|
274
|
+
field?: string | null;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* A set of conditions an event must all match
|
|
279
|
+
*/
|
|
280
|
+
export interface Filter {
|
|
281
|
+
/**
|
|
282
|
+
* Conditions the event must match
|
|
283
|
+
*/
|
|
284
|
+
conditions: Array<Filter.Condition>;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export namespace Filter {
|
|
288
|
+
/**
|
|
289
|
+
* Meter filter condition
|
|
290
|
+
*/
|
|
291
|
+
export interface Condition {
|
|
292
|
+
/**
|
|
293
|
+
* Condition field name
|
|
294
|
+
*/
|
|
295
|
+
field: string;
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Comparison applied to the condition field
|
|
299
|
+
*/
|
|
300
|
+
operation:
|
|
301
|
+
| 'EQUALS'
|
|
302
|
+
| 'NOT_EQUALS'
|
|
303
|
+
| 'GREATER_THAN'
|
|
304
|
+
| 'GREATER_THAN_OR_EQUAL'
|
|
305
|
+
| 'LESS_THAN'
|
|
306
|
+
| 'LESS_THAN_OR_EQUAL'
|
|
307
|
+
| 'IS_NULL'
|
|
308
|
+
| 'IS_NOT_NULL'
|
|
309
|
+
| 'CONTAINS'
|
|
310
|
+
| 'STARTS_WITH'
|
|
311
|
+
| 'ENDS_WITH'
|
|
312
|
+
| 'IN';
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Condition value
|
|
316
|
+
*/
|
|
317
|
+
value?: string | null;
|
|
318
|
+
|
|
319
|
+
values?: Array<string> | null;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
236
324
|
/**
|
|
237
325
|
* Unit transformation to be applied to the reported usage
|
|
238
326
|
*/
|
|
@@ -295,7 +383,8 @@ export interface FeatureListFeaturesResponse {
|
|
|
295
383
|
featureStatus: 'NEW' | 'SUSPENDED' | 'ACTIVE';
|
|
296
384
|
|
|
297
385
|
/**
|
|
298
|
-
* The type of the feature
|
|
386
|
+
* The type of the feature: BOOLEAN (on/off access), NUMBER (a numeric limit or
|
|
387
|
+
* quantity), or ENUM (one of a fixed set of values).
|
|
299
388
|
*/
|
|
300
389
|
featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM';
|
|
301
390
|
|
|
@@ -315,7 +404,16 @@ export interface FeatureListFeaturesResponse {
|
|
|
315
404
|
metadata: { [key: string]: string };
|
|
316
405
|
|
|
317
406
|
/**
|
|
318
|
-
*
|
|
407
|
+
* Event meter that turns reported events into usage for a metered feature
|
|
408
|
+
*/
|
|
409
|
+
meter: FeatureListFeaturesResponse.Meter | null;
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* How usage accumulates for this feature. `Incremental` and `Fluctuating` features
|
|
413
|
+
* track usage from reported events; `None` means the feature's value isn't
|
|
414
|
+
* usage-tracked — it's just a numeric or enum value carried by the plan (for
|
|
415
|
+
* example, a seat count or a tier setting) rather than something customers
|
|
416
|
+
* consume.
|
|
319
417
|
*/
|
|
320
418
|
meterType: 'None' | 'FLUCTUATING' | 'INCREMENTAL';
|
|
321
419
|
|
|
@@ -343,6 +441,84 @@ export namespace FeatureListFeaturesResponse {
|
|
|
343
441
|
value: string;
|
|
344
442
|
}
|
|
345
443
|
|
|
444
|
+
/**
|
|
445
|
+
* Event meter that turns reported events into usage for a metered feature
|
|
446
|
+
*/
|
|
447
|
+
export interface Meter {
|
|
448
|
+
/**
|
|
449
|
+
* How the matching events are aggregated into a usage value
|
|
450
|
+
*/
|
|
451
|
+
aggregation: Meter.Aggregation;
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Event filters. Conditions within a filter are ANDed, and filters are ORed
|
|
455
|
+
*/
|
|
456
|
+
filters: Array<Meter.Filter>;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
export namespace Meter {
|
|
460
|
+
/**
|
|
461
|
+
* How the matching events are aggregated into a usage value
|
|
462
|
+
*/
|
|
463
|
+
export interface Aggregation {
|
|
464
|
+
/**
|
|
465
|
+
* Aggregation function applied to the matching events
|
|
466
|
+
*/
|
|
467
|
+
function: 'SUM' | 'MAX' | 'MIN' | 'AVG' | 'COUNT' | 'UNIQUE';
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* Aggregation field name
|
|
471
|
+
*/
|
|
472
|
+
field?: string | null;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* A set of conditions an event must all match
|
|
477
|
+
*/
|
|
478
|
+
export interface Filter {
|
|
479
|
+
/**
|
|
480
|
+
* Conditions the event must match
|
|
481
|
+
*/
|
|
482
|
+
conditions: Array<Filter.Condition>;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
export namespace Filter {
|
|
486
|
+
/**
|
|
487
|
+
* Meter filter condition
|
|
488
|
+
*/
|
|
489
|
+
export interface Condition {
|
|
490
|
+
/**
|
|
491
|
+
* Condition field name
|
|
492
|
+
*/
|
|
493
|
+
field: string;
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* Comparison applied to the condition field
|
|
497
|
+
*/
|
|
498
|
+
operation:
|
|
499
|
+
| 'EQUALS'
|
|
500
|
+
| 'NOT_EQUALS'
|
|
501
|
+
| 'GREATER_THAN'
|
|
502
|
+
| 'GREATER_THAN_OR_EQUAL'
|
|
503
|
+
| 'LESS_THAN'
|
|
504
|
+
| 'LESS_THAN_OR_EQUAL'
|
|
505
|
+
| 'IS_NULL'
|
|
506
|
+
| 'IS_NOT_NULL'
|
|
507
|
+
| 'CONTAINS'
|
|
508
|
+
| 'STARTS_WITH'
|
|
509
|
+
| 'ENDS_WITH'
|
|
510
|
+
| 'IN';
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Condition value
|
|
514
|
+
*/
|
|
515
|
+
value?: string | null;
|
|
516
|
+
|
|
517
|
+
values?: Array<string> | null;
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
|
|
346
522
|
/**
|
|
347
523
|
* Unit transformation to be applied to the reported usage
|
|
348
524
|
*/
|
|
@@ -396,7 +572,8 @@ export interface FeatureCreateFeatureParams {
|
|
|
396
572
|
displayName: string;
|
|
397
573
|
|
|
398
574
|
/**
|
|
399
|
-
* Body param: The type of the feature
|
|
575
|
+
* Body param: The type of the feature: BOOLEAN (on/off access), NUMBER (a numeric
|
|
576
|
+
* limit or quantity), or ENUM (one of a fixed set of values).
|
|
400
577
|
*/
|
|
401
578
|
featureType: 'BOOLEAN' | 'NUMBER' | 'ENUM';
|
|
402
579
|
|
|
@@ -431,7 +608,17 @@ export interface FeatureCreateFeatureParams {
|
|
|
431
608
|
metadata?: { [key: string]: string };
|
|
432
609
|
|
|
433
610
|
/**
|
|
434
|
-
* Body param:
|
|
611
|
+
* Body param: Event meter that turns reported events into usage for a metered
|
|
612
|
+
* feature
|
|
613
|
+
*/
|
|
614
|
+
meter?: FeatureCreateFeatureParams.Meter;
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* Body param: How usage accumulates for this feature. `Incremental` and
|
|
618
|
+
* `Fluctuating` features track usage from reported events; `None` means the
|
|
619
|
+
* feature's value isn't usage-tracked — it's just a numeric or enum value carried
|
|
620
|
+
* by the plan (for example, a seat count or a tier setting) rather than something
|
|
621
|
+
* customers consume.
|
|
435
622
|
*/
|
|
436
623
|
meterType?: 'None' | 'FLUCTUATING' | 'INCREMENTAL';
|
|
437
624
|
|
|
@@ -467,6 +654,78 @@ export namespace FeatureCreateFeatureParams {
|
|
|
467
654
|
value: string;
|
|
468
655
|
}
|
|
469
656
|
|
|
657
|
+
/**
|
|
658
|
+
* Event meter that turns reported events into usage for a metered feature
|
|
659
|
+
*/
|
|
660
|
+
export interface Meter {
|
|
661
|
+
/**
|
|
662
|
+
* How the matching events are aggregated into a usage value
|
|
663
|
+
*/
|
|
664
|
+
aggregation: Meter.Aggregation;
|
|
665
|
+
|
|
666
|
+
/**
|
|
667
|
+
* Event filters. Conditions within a filter are ANDed, and filters are ORed
|
|
668
|
+
*/
|
|
669
|
+
filters: Array<Meter.Filter>;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
export namespace Meter {
|
|
673
|
+
/**
|
|
674
|
+
* How the matching events are aggregated into a usage value
|
|
675
|
+
*/
|
|
676
|
+
export interface Aggregation {
|
|
677
|
+
/**
|
|
678
|
+
* Aggregation function applied to the matching events
|
|
679
|
+
*/
|
|
680
|
+
function: 'SUM' | 'MAX' | 'MIN' | 'AVG' | 'COUNT' | 'UNIQUE';
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* Aggregation field name
|
|
684
|
+
*/
|
|
685
|
+
field?: string;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
export interface Filter {
|
|
689
|
+
/**
|
|
690
|
+
* Conditions the event must match
|
|
691
|
+
*/
|
|
692
|
+
conditions: Array<Filter.Condition>;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
export namespace Filter {
|
|
696
|
+
export interface Condition {
|
|
697
|
+
/**
|
|
698
|
+
* Condition field name
|
|
699
|
+
*/
|
|
700
|
+
field: string;
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* Comparison applied to the condition field
|
|
704
|
+
*/
|
|
705
|
+
operation:
|
|
706
|
+
| 'EQUALS'
|
|
707
|
+
| 'NOT_EQUALS'
|
|
708
|
+
| 'GREATER_THAN'
|
|
709
|
+
| 'GREATER_THAN_OR_EQUAL'
|
|
710
|
+
| 'LESS_THAN'
|
|
711
|
+
| 'LESS_THAN_OR_EQUAL'
|
|
712
|
+
| 'IS_NULL'
|
|
713
|
+
| 'IS_NOT_NULL'
|
|
714
|
+
| 'CONTAINS'
|
|
715
|
+
| 'STARTS_WITH'
|
|
716
|
+
| 'ENDS_WITH'
|
|
717
|
+
| 'IN';
|
|
718
|
+
|
|
719
|
+
/**
|
|
720
|
+
* Condition value
|
|
721
|
+
*/
|
|
722
|
+
value?: string;
|
|
723
|
+
|
|
724
|
+
values?: Array<string>;
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
|
|
470
729
|
/**
|
|
471
730
|
* Unit transformation to be applied to the reported usage
|
|
472
731
|
*/
|
|
@@ -625,7 +884,8 @@ export interface FeatureUpdateFeatureParams {
|
|
|
625
884
|
metadata?: { [key: string]: string };
|
|
626
885
|
|
|
627
886
|
/**
|
|
628
|
-
* Body param
|
|
887
|
+
* Body param: Event meter that turns reported events into usage for a metered
|
|
888
|
+
* feature
|
|
629
889
|
*/
|
|
630
890
|
meter?: FeatureUpdateFeatureParams.Meter;
|
|
631
891
|
|
|
@@ -661,14 +921,29 @@ export namespace FeatureUpdateFeatureParams {
|
|
|
661
921
|
value: string;
|
|
662
922
|
}
|
|
663
923
|
|
|
924
|
+
/**
|
|
925
|
+
* Event meter that turns reported events into usage for a metered feature
|
|
926
|
+
*/
|
|
664
927
|
export interface Meter {
|
|
928
|
+
/**
|
|
929
|
+
* How the matching events are aggregated into a usage value
|
|
930
|
+
*/
|
|
665
931
|
aggregation: Meter.Aggregation;
|
|
666
932
|
|
|
933
|
+
/**
|
|
934
|
+
* Event filters. Conditions within a filter are ANDed, and filters are ORed
|
|
935
|
+
*/
|
|
667
936
|
filters: Array<Meter.Filter>;
|
|
668
937
|
}
|
|
669
938
|
|
|
670
939
|
export namespace Meter {
|
|
940
|
+
/**
|
|
941
|
+
* How the matching events are aggregated into a usage value
|
|
942
|
+
*/
|
|
671
943
|
export interface Aggregation {
|
|
944
|
+
/**
|
|
945
|
+
* Aggregation function applied to the matching events
|
|
946
|
+
*/
|
|
672
947
|
function: 'SUM' | 'MAX' | 'MIN' | 'AVG' | 'COUNT' | 'UNIQUE';
|
|
673
948
|
|
|
674
949
|
/**
|
|
@@ -678,6 +953,9 @@ export namespace FeatureUpdateFeatureParams {
|
|
|
678
953
|
}
|
|
679
954
|
|
|
680
955
|
export interface Filter {
|
|
956
|
+
/**
|
|
957
|
+
* Conditions the event must match
|
|
958
|
+
*/
|
|
681
959
|
conditions: Array<Filter.Condition>;
|
|
682
960
|
}
|
|
683
961
|
|
|
@@ -688,6 +966,9 @@ export namespace FeatureUpdateFeatureParams {
|
|
|
688
966
|
*/
|
|
689
967
|
field: string;
|
|
690
968
|
|
|
969
|
+
/**
|
|
970
|
+
* Comparison applied to the condition field
|
|
971
|
+
*/
|
|
691
972
|
operation:
|
|
692
973
|
| 'EQUALS'
|
|
693
974
|
| 'NOT_EQUALS'
|
|
@@ -199,7 +199,11 @@ export class Plans extends APIResource {
|
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
/**
|
|
202
|
-
* Publishes a draft plan, making it available for use in subscriptions.
|
|
202
|
+
* Publishes a draft plan, making it available for use in subscriptions. The
|
|
203
|
+
* required `migrationType` field controls whether existing subscribers are moved
|
|
204
|
+
* onto the new version immediately (`ALL_CUSTOMERS`) or stay on the version they
|
|
205
|
+
* subscribed to — grandfathered — until you explicitly migrate them, e.g. via the
|
|
206
|
+
* migrate subscription endpoint (`NEW_CUSTOMERS`).
|
|
203
207
|
*/
|
|
204
208
|
publish(id: string, params: PlanPublishParams, options?: RequestOptions): APIPromise<PlanPublishResponse> {
|
|
205
209
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
@@ -277,7 +281,9 @@ export namespace Plan {
|
|
|
277
281
|
createdAt: string;
|
|
278
282
|
|
|
279
283
|
/**
|
|
280
|
-
* Default trial configuration for the plan
|
|
284
|
+
* Default trial configuration for the plan. When set, subscriptions provisioned on
|
|
285
|
+
* this plan without explicit trial settings automatically start in trial for the
|
|
286
|
+
* configured duration; leave unset for no automatic trial.
|
|
281
287
|
*/
|
|
282
288
|
defaultTrialConfig: Data.DefaultTrialConfig | null;
|
|
283
289
|
|
|
@@ -307,7 +313,9 @@ export namespace Plan {
|
|
|
307
313
|
metadata: { [key: string]: string };
|
|
308
314
|
|
|
309
315
|
/**
|
|
310
|
-
* The ID of the parent plan, if
|
|
316
|
+
* The ID of the parent plan, if this plan should inherit entitlements from another
|
|
317
|
+
* plan. Optional — omit to create a standalone plan with no inherited
|
|
318
|
+
* entitlements.
|
|
311
319
|
*/
|
|
312
320
|
parentPlanId: string | null;
|
|
313
321
|
|
|
@@ -339,7 +347,9 @@ export namespace Plan {
|
|
|
339
347
|
|
|
340
348
|
export namespace Data {
|
|
341
349
|
/**
|
|
342
|
-
* Default trial configuration for the plan
|
|
350
|
+
* Default trial configuration for the plan. When set, subscriptions provisioned on
|
|
351
|
+
* this plan without explicit trial settings automatically start in trial for the
|
|
352
|
+
* configured duration; leave unset for no automatic trial.
|
|
343
353
|
*/
|
|
344
354
|
export interface DefaultTrialConfig {
|
|
345
355
|
/**
|
|
@@ -416,7 +426,9 @@ export interface PlanListResponse {
|
|
|
416
426
|
createdAt: string;
|
|
417
427
|
|
|
418
428
|
/**
|
|
419
|
-
* Default trial configuration for the plan
|
|
429
|
+
* Default trial configuration for the plan. When set, subscriptions provisioned on
|
|
430
|
+
* this plan without explicit trial settings automatically start in trial for the
|
|
431
|
+
* configured duration; leave unset for no automatic trial.
|
|
420
432
|
*/
|
|
421
433
|
defaultTrialConfig: PlanListResponse.DefaultTrialConfig | null;
|
|
422
434
|
|
|
@@ -446,7 +458,9 @@ export interface PlanListResponse {
|
|
|
446
458
|
metadata: { [key: string]: string };
|
|
447
459
|
|
|
448
460
|
/**
|
|
449
|
-
* The ID of the parent plan, if
|
|
461
|
+
* The ID of the parent plan, if this plan should inherit entitlements from another
|
|
462
|
+
* plan. Optional — omit to create a standalone plan with no inherited
|
|
463
|
+
* entitlements.
|
|
450
464
|
*/
|
|
451
465
|
parentPlanId: string | null;
|
|
452
466
|
|
|
@@ -478,7 +492,9 @@ export interface PlanListResponse {
|
|
|
478
492
|
|
|
479
493
|
export namespace PlanListResponse {
|
|
480
494
|
/**
|
|
481
|
-
* Default trial configuration for the plan
|
|
495
|
+
* Default trial configuration for the plan. When set, subscriptions provisioned on
|
|
496
|
+
* this plan without explicit trial settings automatically start in trial for the
|
|
497
|
+
* configured duration; leave unset for no automatic trial.
|
|
482
498
|
*/
|
|
483
499
|
export interface DefaultTrialConfig {
|
|
484
500
|
/**
|
|
@@ -564,7 +580,8 @@ export interface PlanListChargesResponse {
|
|
|
564
580
|
createdAt: string;
|
|
565
581
|
|
|
566
582
|
/**
|
|
567
|
-
* ISO country code for localized pricing,
|
|
583
|
+
* ISO country code for localized pricing, or "eu" for the European Union group you
|
|
584
|
+
* map countries into, if any
|
|
568
585
|
*/
|
|
569
586
|
billingCountryCode?: string | null;
|
|
570
587
|
|
|
@@ -1108,7 +1125,8 @@ export interface PlanListOverageChargesResponse {
|
|
|
1108
1125
|
createdAt: string;
|
|
1109
1126
|
|
|
1110
1127
|
/**
|
|
1111
|
-
* ISO country code for localized pricing,
|
|
1128
|
+
* ISO country code for localized pricing, or "eu" for the European Union group you
|
|
1129
|
+
* map countries into, if any
|
|
1112
1130
|
*/
|
|
1113
1131
|
billingCountryCode?: string | null;
|
|
1114
1132
|
|
|
@@ -1674,7 +1692,9 @@ export interface PlanCreateParams {
|
|
|
1674
1692
|
billingId?: string | null;
|
|
1675
1693
|
|
|
1676
1694
|
/**
|
|
1677
|
-
* Body param: Default trial configuration for the plan
|
|
1695
|
+
* Body param: Default trial configuration for the plan. When set, subscriptions
|
|
1696
|
+
* provisioned on this plan without explicit trial settings automatically start in
|
|
1697
|
+
* trial for the configured duration; leave unset for no automatic trial.
|
|
1678
1698
|
*/
|
|
1679
1699
|
defaultTrialConfig?: PlanCreateParams.DefaultTrialConfig | null;
|
|
1680
1700
|
|
|
@@ -1689,7 +1709,9 @@ export interface PlanCreateParams {
|
|
|
1689
1709
|
metadata?: { [key: string]: string };
|
|
1690
1710
|
|
|
1691
1711
|
/**
|
|
1692
|
-
* Body param: The ID of the parent plan, if
|
|
1712
|
+
* Body param: The ID of the parent plan, if this plan should inherit entitlements
|
|
1713
|
+
* from another plan. Optional — omit to create a standalone plan with no inherited
|
|
1714
|
+
* entitlements.
|
|
1693
1715
|
*/
|
|
1694
1716
|
parentPlanId?: string | null;
|
|
1695
1717
|
|
|
@@ -1719,7 +1741,9 @@ export interface PlanCreateParams {
|
|
|
1719
1741
|
|
|
1720
1742
|
export namespace PlanCreateParams {
|
|
1721
1743
|
/**
|
|
1722
|
-
* Default trial configuration for the plan
|
|
1744
|
+
* Default trial configuration for the plan. When set, subscriptions provisioned on
|
|
1745
|
+
* this plan without explicit trial settings automatically start in trial for the
|
|
1746
|
+
* configured duration; leave unset for no automatic trial.
|
|
1723
1747
|
*/
|
|
1724
1748
|
export interface DefaultTrialConfig {
|
|
1725
1749
|
/**
|
|
@@ -1783,7 +1807,9 @@ export interface PlanUpdateParams {
|
|
|
1783
1807
|
billingId?: string | null;
|
|
1784
1808
|
|
|
1785
1809
|
/**
|
|
1786
|
-
* Body param: Pricing configuration to set on the plan draft
|
|
1810
|
+
* Body param: Pricing configuration to set on the plan draft. Unlike the rest of
|
|
1811
|
+
* this request, this is a full replace of the pricing configuration, not a merge —
|
|
1812
|
+
* see SetPackagePricingRequest.
|
|
1787
1813
|
*/
|
|
1788
1814
|
charges?: PlanUpdateParams.Charges;
|
|
1789
1815
|
|
|
@@ -1793,7 +1819,9 @@ export interface PlanUpdateParams {
|
|
|
1793
1819
|
compatibleAddonIds?: Array<string> | null;
|
|
1794
1820
|
|
|
1795
1821
|
/**
|
|
1796
|
-
* Body param: Default trial configuration for the plan
|
|
1822
|
+
* Body param: Default trial configuration for the plan. When set, subscriptions
|
|
1823
|
+
* provisioned on this plan without explicit trial settings automatically start in
|
|
1824
|
+
* trial for the configured duration; leave unset for no automatic trial.
|
|
1797
1825
|
*/
|
|
1798
1826
|
defaultTrialConfig?: PlanUpdateParams.DefaultTrialConfig | null;
|
|
1799
1827
|
|
|
@@ -1813,7 +1841,9 @@ export interface PlanUpdateParams {
|
|
|
1813
1841
|
metadata?: { [key: string]: string };
|
|
1814
1842
|
|
|
1815
1843
|
/**
|
|
1816
|
-
* Body param: The ID of the parent plan, if
|
|
1844
|
+
* Body param: The ID of the parent plan, if this plan should inherit entitlements
|
|
1845
|
+
* from another plan. Optional — omit to create a standalone plan with no inherited
|
|
1846
|
+
* entitlements.
|
|
1817
1847
|
*/
|
|
1818
1848
|
parentPlanId?: string | null;
|
|
1819
1849
|
|
|
@@ -1833,7 +1863,9 @@ export interface PlanUpdateParams {
|
|
|
1833
1863
|
|
|
1834
1864
|
export namespace PlanUpdateParams {
|
|
1835
1865
|
/**
|
|
1836
|
-
* Pricing configuration to set on the plan draft
|
|
1866
|
+
* Pricing configuration to set on the plan draft. Unlike the rest of this request,
|
|
1867
|
+
* this is a full replace of the pricing configuration, not a merge — see
|
|
1868
|
+
* SetPackagePricingRequest.
|
|
1837
1869
|
*/
|
|
1838
1870
|
export interface Charges {
|
|
1839
1871
|
/**
|
|
@@ -1857,12 +1889,14 @@ export namespace PlanUpdateParams {
|
|
|
1857
1889
|
overageBillingPeriod?: 'ON_SUBSCRIPTION_RENEWAL' | 'MONTHLY';
|
|
1858
1890
|
|
|
1859
1891
|
/**
|
|
1860
|
-
* Array of overage pricing model configurations
|
|
1892
|
+
* Array of overage pricing model configurations. Replaces all existing overage
|
|
1893
|
+
* pricing models on the draft — omit this to end up with no overage pricing.
|
|
1861
1894
|
*/
|
|
1862
1895
|
overagePricingModels?: Array<Charges.OveragePricingModel>;
|
|
1863
1896
|
|
|
1864
1897
|
/**
|
|
1865
|
-
* Array of pricing model configurations
|
|
1898
|
+
* Array of pricing model configurations. Replaces all existing base pricing models
|
|
1899
|
+
* on the draft — omit this to end up with no base pricing.
|
|
1866
1900
|
*/
|
|
1867
1901
|
pricingModels?: Array<Charges.PricingModel>;
|
|
1868
1902
|
}
|
|
@@ -2058,7 +2092,8 @@ export namespace PlanUpdateParams {
|
|
|
2058
2092
|
billingPeriod: 'MONTHLY' | 'ANNUALLY';
|
|
2059
2093
|
|
|
2060
2094
|
/**
|
|
2061
|
-
* ISO country code for localized pricing
|
|
2095
|
+
* ISO country code for localized pricing, or "eu" for the European Union group you
|
|
2096
|
+
* map countries into
|
|
2062
2097
|
*/
|
|
2063
2098
|
billingCountryCode?: string;
|
|
2064
2099
|
|
|
@@ -2708,7 +2743,8 @@ export namespace PlanUpdateParams {
|
|
|
2708
2743
|
billingPeriod: 'MONTHLY' | 'ANNUALLY';
|
|
2709
2744
|
|
|
2710
2745
|
/**
|
|
2711
|
-
* ISO country code for localized pricing
|
|
2746
|
+
* ISO country code for localized pricing, or "eu" for the European Union group you
|
|
2747
|
+
* map countries into
|
|
2712
2748
|
*/
|
|
2713
2749
|
billingCountryCode?: string;
|
|
2714
2750
|
|
|
@@ -3216,7 +3252,9 @@ export namespace PlanUpdateParams {
|
|
|
3216
3252
|
}
|
|
3217
3253
|
|
|
3218
3254
|
/**
|
|
3219
|
-
* Default trial configuration for the plan
|
|
3255
|
+
* Default trial configuration for the plan. When set, subscriptions provisioned on
|
|
3256
|
+
* this plan without explicit trial settings automatically start in trial for the
|
|
3257
|
+
* configured duration; leave unset for no automatic trial.
|
|
3220
3258
|
*/
|
|
3221
3259
|
export interface DefaultTrialConfig {
|
|
3222
3260
|
/**
|
|
@@ -3378,7 +3416,9 @@ export interface PlanListOverageChargesParams extends MyCursorIDPageParams {
|
|
|
3378
3416
|
|
|
3379
3417
|
export interface PlanPublishParams {
|
|
3380
3418
|
/**
|
|
3381
|
-
* Body param:
|
|
3419
|
+
* Body param: Who the published version applies to: NEW_CUSTOMERS (default) leaves
|
|
3420
|
+
* existing subscribers on their current version, ALL_CUSTOMERS moves them onto the
|
|
3421
|
+
* new version immediately.
|
|
3382
3422
|
*/
|
|
3383
3423
|
migrationType: 'NEW_CUSTOMERS' | 'ALL_CUSTOMERS';
|
|
3384
3424
|
|
|
@@ -223,7 +223,8 @@ export namespace Product {
|
|
|
223
223
|
subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN';
|
|
224
224
|
|
|
225
225
|
/**
|
|
226
|
-
* ID of the plan to downgrade to at the end of the billing period
|
|
226
|
+
* ID of the plan to downgrade to at the end of the billing period. Only relevant
|
|
227
|
+
* when subscriptionEndSetup is DOWNGRADE_TO_FREE — ignored otherwise.
|
|
227
228
|
*/
|
|
228
229
|
downgradePlanId?: string | null;
|
|
229
230
|
|
|
@@ -234,7 +235,8 @@ export namespace Product {
|
|
|
234
235
|
prorateAtEndOfBillingPeriod?: boolean | null;
|
|
235
236
|
|
|
236
237
|
/**
|
|
237
|
-
* ID of the plan to start the subscription with
|
|
238
|
+
* ID of the plan to start the subscription with. Only relevant when
|
|
239
|
+
* subscriptionStartSetup is PLAN_SELECTION — ignored otherwise.
|
|
238
240
|
*/
|
|
239
241
|
subscriptionStartPlanId?: string | null;
|
|
240
242
|
}
|
|
@@ -312,7 +314,8 @@ export namespace ProductListProductsResponse {
|
|
|
312
314
|
subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN';
|
|
313
315
|
|
|
314
316
|
/**
|
|
315
|
-
* ID of the plan to downgrade to at the end of the billing period
|
|
317
|
+
* ID of the plan to downgrade to at the end of the billing period. Only relevant
|
|
318
|
+
* when subscriptionEndSetup is DOWNGRADE_TO_FREE — ignored otherwise.
|
|
316
319
|
*/
|
|
317
320
|
downgradePlanId?: string | null;
|
|
318
321
|
|
|
@@ -323,7 +326,8 @@ export namespace ProductListProductsResponse {
|
|
|
323
326
|
prorateAtEndOfBillingPeriod?: boolean | null;
|
|
324
327
|
|
|
325
328
|
/**
|
|
326
|
-
* ID of the plan to start the subscription with
|
|
329
|
+
* ID of the plan to start the subscription with. Only relevant when
|
|
330
|
+
* subscriptionStartSetup is PLAN_SELECTION — ignored otherwise.
|
|
327
331
|
*/
|
|
328
332
|
subscriptionStartPlanId?: string | null;
|
|
329
333
|
}
|
|
@@ -499,7 +503,9 @@ export interface ProductUpdateProductParams {
|
|
|
499
503
|
displayName?: string;
|
|
500
504
|
|
|
501
505
|
/**
|
|
502
|
-
* Body param: Additional metadata for the product
|
|
506
|
+
* Body param: Additional metadata for the product. When included, this replaces
|
|
507
|
+
* the product's entire metadata object rather than merging with the existing keys
|
|
508
|
+
* — omit the field to leave existing metadata untouched.
|
|
503
509
|
*/
|
|
504
510
|
metadata?: { [key: string]: string } | null;
|
|
505
511
|
|
|
@@ -550,7 +556,8 @@ export namespace ProductUpdateProductParams {
|
|
|
550
556
|
subscriptionStartSetup: 'PLAN_SELECTION' | 'TRIAL_PERIOD' | 'FREE_PLAN';
|
|
551
557
|
|
|
552
558
|
/**
|
|
553
|
-
* ID of the plan to downgrade to at the end of the billing period
|
|
559
|
+
* ID of the plan to downgrade to at the end of the billing period. Only relevant
|
|
560
|
+
* when subscriptionEndSetup is DOWNGRADE_TO_FREE — ignored otherwise.
|
|
554
561
|
*/
|
|
555
562
|
downgradePlanId?: string | null;
|
|
556
563
|
|
|
@@ -561,7 +568,8 @@ export namespace ProductUpdateProductParams {
|
|
|
561
568
|
prorateAtEndOfBillingPeriod?: boolean | null;
|
|
562
569
|
|
|
563
570
|
/**
|
|
564
|
-
* ID of the plan to start the subscription with
|
|
571
|
+
* ID of the plan to start the subscription with. Only relevant when
|
|
572
|
+
* subscriptionStartSetup is PLAN_SELECTION — ignored otherwise.
|
|
565
573
|
*/
|
|
566
574
|
subscriptionStartPlanId?: string | null;
|
|
567
575
|
}
|