@stigg/typescript 0.1.0-beta.55 → 0.1.0-beta.57

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.
Files changed (124) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/package.json +1 -1
  3. package/resources/v1/addons/addons.d.mts +30 -13
  4. package/resources/v1/addons/addons.d.mts.map +1 -1
  5. package/resources/v1/addons/addons.d.ts +30 -13
  6. package/resources/v1/addons/addons.d.ts.map +1 -1
  7. package/resources/v1/addons/addons.js +5 -1
  8. package/resources/v1/addons/addons.js.map +1 -1
  9. package/resources/v1/addons/addons.mjs +5 -1
  10. package/resources/v1/addons/addons.mjs.map +1 -1
  11. package/resources/v1/contracts.d.mts +53 -14
  12. package/resources/v1/contracts.d.mts.map +1 -1
  13. package/resources/v1/contracts.d.ts +53 -14
  14. package/resources/v1/contracts.d.ts.map +1 -1
  15. package/resources/v1/contracts.js +3 -4
  16. package/resources/v1/contracts.js.map +1 -1
  17. package/resources/v1/contracts.mjs +3 -4
  18. package/resources/v1/contracts.mjs.map +1 -1
  19. package/resources/v1/coupons.d.mts +22 -9
  20. package/resources/v1/coupons.d.mts.map +1 -1
  21. package/resources/v1/coupons.d.ts +22 -9
  22. package/resources/v1/coupons.d.ts.map +1 -1
  23. package/resources/v1/credits/grants.d.mts +51 -14
  24. package/resources/v1/credits/grants.d.mts.map +1 -1
  25. package/resources/v1/credits/grants.d.ts +51 -14
  26. package/resources/v1/credits/grants.d.ts.map +1 -1
  27. package/resources/v1/customers/customers.d.mts +126 -57
  28. package/resources/v1/customers/customers.d.mts.map +1 -1
  29. package/resources/v1/customers/customers.d.ts +126 -57
  30. package/resources/v1/customers/customers.d.ts.map +1 -1
  31. package/resources/v1/customers/customers.js +15 -16
  32. package/resources/v1/customers/customers.js.map +1 -1
  33. package/resources/v1/customers/customers.mjs +15 -16
  34. package/resources/v1/customers/customers.mjs.map +1 -1
  35. package/resources/v1/customers/integrations.d.mts +19 -11
  36. package/resources/v1/customers/integrations.d.mts.map +1 -1
  37. package/resources/v1/customers/integrations.d.ts +19 -11
  38. package/resources/v1/customers/integrations.d.ts.map +1 -1
  39. package/resources/v1/customers/payment-method.d.mts +7 -3
  40. package/resources/v1/customers/payment-method.d.mts.map +1 -1
  41. package/resources/v1/customers/payment-method.d.ts +7 -3
  42. package/resources/v1/customers/payment-method.d.ts.map +1 -1
  43. package/resources/v1/customers/promotional-entitlements.d.mts +23 -5
  44. package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -1
  45. package/resources/v1/customers/promotional-entitlements.d.ts +23 -5
  46. package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -1
  47. package/resources/v1/events/data-export/data-export.d.mts +1 -61
  48. package/resources/v1/events/data-export/data-export.d.mts.map +1 -1
  49. package/resources/v1/events/data-export/data-export.d.ts +1 -61
  50. package/resources/v1/events/data-export/data-export.d.ts.map +1 -1
  51. package/resources/v1/events/data-export/data-export.js +0 -18
  52. package/resources/v1/events/data-export/data-export.js.map +1 -1
  53. package/resources/v1/events/data-export/data-export.mjs +0 -18
  54. package/resources/v1/events/data-export/data-export.mjs.map +1 -1
  55. package/resources/v1/events/data-export/index.d.mts +1 -1
  56. package/resources/v1/events/data-export/index.d.mts.map +1 -1
  57. package/resources/v1/events/data-export/index.d.ts +1 -1
  58. package/resources/v1/events/data-export/index.d.ts.map +1 -1
  59. package/resources/v1/events/data-export/index.js.map +1 -1
  60. package/resources/v1/events/data-export/index.mjs.map +1 -1
  61. package/resources/v1/events/events.d.mts +15 -7
  62. package/resources/v1/events/events.d.mts.map +1 -1
  63. package/resources/v1/events/events.d.ts +15 -7
  64. package/resources/v1/events/events.d.ts.map +1 -1
  65. package/resources/v1/events/events.js +2 -2
  66. package/resources/v1/events/events.js.map +1 -1
  67. package/resources/v1/events/events.mjs +2 -2
  68. package/resources/v1/events/events.mjs.map +1 -1
  69. package/resources/v1/events/index.d.mts +1 -1
  70. package/resources/v1/events/index.d.mts.map +1 -1
  71. package/resources/v1/events/index.d.ts +1 -1
  72. package/resources/v1/events/index.d.ts.map +1 -1
  73. package/resources/v1/events/index.js.map +1 -1
  74. package/resources/v1/events/index.mjs.map +1 -1
  75. package/resources/v1/features.d.mts +222 -7
  76. package/resources/v1/features.d.mts.map +1 -1
  77. package/resources/v1/features.d.ts +222 -7
  78. package/resources/v1/features.d.ts.map +1 -1
  79. package/resources/v1/plans/plans.d.mts +62 -22
  80. package/resources/v1/plans/plans.d.mts.map +1 -1
  81. package/resources/v1/plans/plans.d.ts +62 -22
  82. package/resources/v1/plans/plans.d.ts.map +1 -1
  83. package/resources/v1/plans/plans.js +5 -1
  84. package/resources/v1/plans/plans.js.map +1 -1
  85. package/resources/v1/plans/plans.mjs +5 -1
  86. package/resources/v1/plans/plans.mjs.map +1 -1
  87. package/resources/v1/products.d.mts +15 -7
  88. package/resources/v1/products.d.mts.map +1 -1
  89. package/resources/v1/products.d.ts +15 -7
  90. package/resources/v1/products.d.ts.map +1 -1
  91. package/resources/v1/subscriptions/subscriptions.d.mts +66 -22
  92. package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
  93. package/resources/v1/subscriptions/subscriptions.d.ts +66 -22
  94. package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
  95. package/resources/v1/subscriptions/subscriptions.js +11 -3
  96. package/resources/v1/subscriptions/subscriptions.js.map +1 -1
  97. package/resources/v1/subscriptions/subscriptions.mjs +11 -3
  98. package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
  99. package/resources/v1/usage.d.mts +32 -9
  100. package/resources/v1/usage.d.mts.map +1 -1
  101. package/resources/v1/usage.d.ts +32 -9
  102. package/resources/v1/usage.d.ts.map +1 -1
  103. package/src/resources/v1/addons/addons.ts +30 -13
  104. package/src/resources/v1/contracts.ts +61 -15
  105. package/src/resources/v1/coupons.ts +22 -9
  106. package/src/resources/v1/credits/grants.ts +51 -14
  107. package/src/resources/v1/customers/customers.ts +127 -71
  108. package/src/resources/v1/customers/integrations.ts +19 -54
  109. package/src/resources/v1/customers/payment-method.ts +7 -3
  110. package/src/resources/v1/customers/promotional-entitlements.ts +23 -5
  111. package/src/resources/v1/events/data-export/data-export.ts +0 -86
  112. package/src/resources/v1/events/data-export/index.ts +0 -2
  113. package/src/resources/v1/events/events.ts +13 -9
  114. package/src/resources/v1/events/index.ts +0 -2
  115. package/src/resources/v1/features.ts +288 -7
  116. package/src/resources/v1/plans/plans.ts +62 -22
  117. package/src/resources/v1/products.ts +15 -7
  118. package/src/resources/v1/subscriptions/subscriptions.ts +68 -22
  119. package/src/resources/v1/usage.ts +32 -9
  120. package/src/version.ts +1 -1
  121. package/version.d.mts +1 -1
  122. package/version.d.ts +1 -1
  123. package/version.js +1 -1
  124. package/version.mjs +1 -1
@@ -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 applicable
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 applicable
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, if any
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, if any
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 applicable
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 applicable
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: The migration type of the package
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
  }
@@ -53,7 +53,13 @@ export class Subscriptions extends APIResource {
53
53
 
54
54
  /**
55
55
  * Updates an active subscription's properties including billing period, add-ons,
56
- * unit quantities, and discounts.
56
+ * unit quantities, and discounts. This is a partial update — only the fields
57
+ * present in the request body change. Object fields such as `metadata` are
58
+ * replaced wholesale rather than merged, and list fields such as `addons` and
59
+ * `priceOverrides` must be sent in full: any existing item that isn't included in
60
+ * the array is removed from the subscription. Changes classified as a downgrade
61
+ * may be scheduled for the end of the current billing period instead of applying
62
+ * immediately, depending on your update scheduling configuration.
57
63
  */
58
64
  update(id: string, params: SubscriptionUpdateParams, options?: RequestOptions): APIPromise<Subscription> {
59
65
  const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
@@ -112,8 +118,10 @@ export class Subscriptions extends APIResource {
112
118
  }
113
119
 
114
120
  /**
115
- * Delegates the payment responsibility of a subscription to a different customer.
116
- * The delegated customer will be billed for this subscription.
121
+ * Delegates a subscription to a different customer, who becomes responsible for
122
+ * managing it. The original customer remains the paying customer for this
123
+ * subscription, unless payment was already delegated to the target customer, in
124
+ * which case the target customer becomes the paying customer as well.
117
125
  */
118
126
  delegate(
119
127
  id: string,
@@ -377,7 +385,8 @@ export namespace Subscription {
377
385
  latestInvoice?: Data.LatestInvoice | null;
378
386
 
379
387
  /**
380
- * Additional metadata for the subscription
388
+ * Additional metadata for the subscription, stored as an arbitrary flat key-value
389
+ * object.
381
390
  */
382
391
  metadata?: { [key: string]: string };
383
392
 
@@ -863,7 +872,10 @@ export namespace Subscription {
863
872
  baseCharge?: boolean;
864
873
 
865
874
  /**
866
- * The billing country code of the price
875
+ * ISO 3166-1 alpha-2 country code this price applies to, or "eu" for the European
876
+ * Union group you map countries into. Omit for the default price shown to all
877
+ * countries; set one or more country-specific price periods on the same currency
878
+ * to localize the amount by billing country.
867
879
  */
868
880
  billingCountryCode?: string;
869
881
 
@@ -1438,7 +1450,8 @@ export interface SubscriptionListResponse {
1438
1450
  latestInvoice?: SubscriptionListResponse.LatestInvoice | null;
1439
1451
 
1440
1452
  /**
1441
- * Additional metadata for the subscription
1453
+ * Additional metadata for the subscription, stored as an arbitrary flat key-value
1454
+ * object.
1442
1455
  */
1443
1456
  metadata?: { [key: string]: string };
1444
1457
 
@@ -1924,7 +1937,10 @@ export namespace SubscriptionListResponse {
1924
1937
  baseCharge?: boolean;
1925
1938
 
1926
1939
  /**
1927
- * The billing country code of the price
1940
+ * ISO 3166-1 alpha-2 country code this price applies to, or "eu" for the European
1941
+ * Union group you map countries into. Omit for the default price shown to all
1942
+ * countries; set one or more country-specific price periods on the same currency
1943
+ * to localize the amount by billing country.
1928
1944
  */
1929
1945
  billingCountryCode?: string;
1930
1946
 
@@ -2426,7 +2442,12 @@ export namespace SubscriptionPreviewResponse {
2426
2442
  hasScheduledUpdates?: boolean;
2427
2443
 
2428
2444
  /**
2429
- * Whether this is a downgrade
2445
+ * Whether this change is classified as a downgrade. Stigg determines this by
2446
+ * ranking the target plan against the customer's current plan — primarily by
2447
+ * calculated price (or by plan parent/child inheritance, when your catalog uses
2448
+ * it) — rather than by a manually assigned plan order. Downgrades can be scheduled
2449
+ * to take effect at the end of the current billing period instead of immediately,
2450
+ * depending on your update scheduling configuration.
2430
2451
  */
2431
2452
  isPlanDowngrade?: boolean;
2432
2453
 
@@ -3090,7 +3111,8 @@ export namespace SubscriptionProvisionResponse {
3090
3111
  latestInvoice?: Subscription.LatestInvoice | null;
3091
3112
 
3092
3113
  /**
3093
- * Additional metadata for the subscription
3114
+ * Additional metadata for the subscription, stored as an arbitrary flat key-value
3115
+ * object.
3094
3116
  */
3095
3117
  metadata?: { [key: string]: string };
3096
3118
 
@@ -3576,7 +3598,10 @@ export namespace SubscriptionProvisionResponse {
3576
3598
  baseCharge?: boolean;
3577
3599
 
3578
3600
  /**
3579
- * The billing country code of the price
3601
+ * ISO 3166-1 alpha-2 country code this price applies to, or "eu" for the European
3602
+ * Union group you map countries into. Omit for the default price shown to all
3603
+ * countries; set one or more country-specific price periods on the same currency
3604
+ * to localize the amount by billing country.
3580
3605
  */
3581
3606
  billingCountryCode?: string;
3582
3607
 
@@ -4095,7 +4120,8 @@ export interface SubscriptionUpdateParams {
4095
4120
  entitlements?: Array<SubscriptionUpdateParams.Feature | SubscriptionUpdateParams.Credit>;
4096
4121
 
4097
4122
  /**
4098
- * Body param: Additional metadata for the subscription
4123
+ * Body param: Additional metadata for the subscription, stored as an arbitrary
4124
+ * flat key-value object.
4099
4125
  */
4100
4126
  metadata?: { [key: string]: string };
4101
4127
 
@@ -4347,7 +4373,8 @@ export namespace SubscriptionUpdateParams {
4347
4373
  isInvoicePaid?: boolean;
4348
4374
 
4349
4375
  /**
4350
- * Additional metadata for the subscription
4376
+ * Additional metadata for the subscription, stored as an arbitrary flat key-value
4377
+ * object.
4351
4378
  */
4352
4379
  metadata?: { [key: string]: string };
4353
4380
 
@@ -4539,6 +4566,11 @@ export namespace SubscriptionUpdateParams {
4539
4566
  * SubscriptionCreditEntitlementRequest
4540
4567
  */
4541
4568
  type: 'CREDIT';
4569
+
4570
+ /**
4571
+ * Whether the credit balance is a soft limit
4572
+ */
4573
+ hasSoftLimit?: boolean;
4542
4574
  }
4543
4575
 
4544
4576
  /**
@@ -4933,10 +4965,10 @@ export interface SubscriptionCancelParams {
4933
4965
 
4934
4966
  export interface SubscriptionDelegateParams {
4935
4967
  /**
4936
- * Body param: The unique identifier of the customer who will assume payment
4937
- * responsibility for this subscription. This customer must already exist in your
4938
- * Stigg account and have a valid payment method if the subscription requires
4939
- * payment.
4968
+ * Body param: The unique identifier of the customer who will manage this
4969
+ * subscription going forward. This customer must already exist in your Stigg
4970
+ * account. The paying customer for the subscription does not change as a result of
4971
+ * this request.
4940
4972
  */
4941
4973
  targetCustomerId: string;
4942
4974
 
@@ -5016,7 +5048,8 @@ export namespace SubscriptionImportParams {
5016
5048
  endDate?: string | null;
5017
5049
 
5018
5050
  /**
5019
- * Additional metadata for the subscription
5051
+ * Additional metadata for the subscription, stored as an arbitrary flat key-value
5052
+ * object.
5020
5053
  */
5021
5054
  metadata?: { [key: string]: string };
5022
5055
 
@@ -5117,7 +5150,8 @@ export interface SubscriptionPreviewParams {
5117
5150
  billableFeatures?: Array<SubscriptionPreviewParams.BillableFeature>;
5118
5151
 
5119
5152
  /**
5120
- * Body param: ISO 3166-1 country code for localization
5153
+ * Body param: Country code selecting a localized price, or "eu" for the European
5154
+ * Union group you map countries into; the default price applies when none matches
5121
5155
  */
5122
5156
  billingCountryCode?: string;
5123
5157
 
@@ -5587,7 +5621,9 @@ export interface SubscriptionProvisionParams {
5587
5621
  awaitPaymentConfirmation?: boolean;
5588
5622
 
5589
5623
  /**
5590
- * Body param: The ISO 3166-1 alpha-2 country code for billing
5624
+ * Body param: The country code used to select a localized price, or "eu" for the
5625
+ * European Union group you map countries into, falling back to the default price
5626
+ * when none matches
5591
5627
  */
5592
5628
  billingCountryCode?: string | null;
5593
5629
 
@@ -5637,7 +5673,8 @@ export interface SubscriptionProvisionParams {
5637
5673
  entitlements?: Array<SubscriptionProvisionParams.Feature | SubscriptionProvisionParams.Credit>;
5638
5674
 
5639
5675
  /**
5640
- * Body param: Additional metadata for the subscription
5676
+ * Body param: Additional metadata for the subscription, stored as an arbitrary
5677
+ * flat key-value object.
5641
5678
  */
5642
5679
  metadata?: { [key: string]: string };
5643
5680
 
@@ -5955,7 +5992,8 @@ export namespace SubscriptionProvisionParams {
5955
5992
  isInvoicePaid?: boolean;
5956
5993
 
5957
5994
  /**
5958
- * Additional metadata for the subscription
5995
+ * Additional metadata for the subscription, stored as an arbitrary flat key-value
5996
+ * object.
5959
5997
  */
5960
5998
  metadata?: { [key: string]: string };
5961
5999
 
@@ -6200,6 +6238,11 @@ export namespace SubscriptionProvisionParams {
6200
6238
  * SubscriptionCreditEntitlementRequest
6201
6239
  */
6202
6240
  type: 'CREDIT';
6241
+
6242
+ /**
6243
+ * Whether the credit balance is a soft limit
6244
+ */
6245
+ hasSoftLimit?: boolean;
6203
6246
  }
6204
6247
 
6205
6248
  /**
@@ -6350,7 +6393,10 @@ export namespace SubscriptionProvisionParams {
6350
6393
  baseCharge?: boolean;
6351
6394
 
6352
6395
  /**
6353
- * The billing country code of the price
6396
+ * ISO 3166-1 alpha-2 country code this price applies to, or "eu" for the European
6397
+ * Union group you map countries into. Omit for the default price shown to all
6398
+ * countries; set one or more country-specific price periods on the same currency
6399
+ * to localize the amount by billing country.
6354
6400
  */
6355
6401
  billingCountryCode?: string;
6356
6402
 
@@ -310,7 +310,10 @@ export namespace UsageReportResponse {
310
310
  nextResetDate?: string | null;
311
311
 
312
312
  /**
313
- * Resource id
313
+ * The customer resource this usage applies to. Optional — only required if the
314
+ * customer has multiple resources (for example, one subscription per workspace or
315
+ * site) and usage needs to be tracked separately per resource; omit it to report
316
+ * usage at the customer level.
314
317
  */
315
318
  resourceId?: string | null;
316
319
 
@@ -385,7 +388,10 @@ export interface UsageEstimateParams {
385
388
  featureId: string;
386
389
 
387
390
  /**
388
- * Body param: The value to report for usage
391
+ * Body param: The value to report for usage. Must be a whole number — the REST API
392
+ * does not accept fractional (float) usage values; scale up (e.g. report cents
393
+ * instead of dollars, or milliseconds instead of seconds) if you need sub-unit
394
+ * precision.
389
395
  */
390
396
  value: number;
391
397
 
@@ -395,12 +401,17 @@ export interface UsageEstimateParams {
395
401
  dimensions?: { [key: string]: string | number | boolean };
396
402
 
397
403
  /**
398
- * Body param: Resource id
404
+ * Body param: The customer resource this usage applies to. Optional — only
405
+ * required if the customer has multiple resources (for example, one subscription
406
+ * per workspace or site) and usage needs to be tracked separately per resource;
407
+ * omit it to report usage at the customer level.
399
408
  */
400
409
  resourceId?: string | null;
401
410
 
402
411
  /**
403
- * Body param: The method by which the usage value should be updated
412
+ * Body param: How the reported value is applied: DELTA (default) adds it to the
413
+ * feature's current usage; SET treats it as the new absolute usage total, and
414
+ * Stigg computes the delta internally.
404
415
  */
405
416
  updateBehavior?: 'DELTA' | 'SET';
406
417
 
@@ -440,7 +451,10 @@ export interface UsageHistoryParams {
440
451
  groupBy?: string;
441
452
 
442
453
  /**
443
- * Query param: Resource id
454
+ * Query param: The customer resource this usage applies to. Optional — only
455
+ * required if the customer has multiple resources (for example, one subscription
456
+ * per workspace or site) and usage needs to be tracked separately per resource;
457
+ * omit it to report usage at the customer level.
444
458
  */
445
459
  resourceId?: string | null;
446
460
 
@@ -494,7 +508,9 @@ export namespace UsageReportParams {
494
508
  featureId: string;
495
509
 
496
510
  /**
497
- * The value to report for usage
511
+ * The value to report for usage. Must be a whole number — the REST API does not
512
+ * accept fractional (float) usage values; scale up (e.g. report cents instead of
513
+ * dollars, or milliseconds instead of seconds) if you need sub-unit precision.
498
514
  */
499
515
  value: number;
500
516
 
@@ -509,17 +525,24 @@ export namespace UsageReportParams {
509
525
  dimensions?: { [key: string]: string | number | boolean };
510
526
 
511
527
  /**
512
- * Idempotency key
528
+ * A key you provide to safely retry the same usage report without double-counting
529
+ * it. Reports with a previously-seen idempotency key are deduplicated for 7 days;
530
+ * after that window a retry is treated as new usage.
513
531
  */
514
532
  idempotencyKey?: string;
515
533
 
516
534
  /**
517
- * Resource id
535
+ * The customer resource this usage applies to. Optional — only required if the
536
+ * customer has multiple resources (for example, one subscription per workspace or
537
+ * site) and usage needs to be tracked separately per resource; omit it to report
538
+ * usage at the customer level.
518
539
  */
519
540
  resourceId?: string | null;
520
541
 
521
542
  /**
522
- * The method by which the usage value should be updated
543
+ * How the reported value is applied: DELTA (default) adds it to the feature's
544
+ * current usage; SET treats it as the new absolute usage total, and Stigg computes
545
+ * the delta internally.
523
546
  */
524
547
  updateBehavior?: 'DELTA' | 'SET';
525
548
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.1.0-beta.55'; // x-release-please-version
1
+ export const VERSION = '0.1.0-beta.57'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.0-beta.55";
1
+ export declare const VERSION = "0.1.0-beta.57";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.0-beta.55";
1
+ export declare const VERSION = "0.1.0-beta.57";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.1.0-beta.55'; // x-release-please-version
4
+ exports.VERSION = '0.1.0-beta.57'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.1.0-beta.55'; // x-release-please-version
1
+ export const VERSION = '0.1.0-beta.57'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map