@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
@@ -225,7 +225,10 @@ export declare namespace UsageReportResponse {
225
225
  */
226
226
  nextResetDate?: string | null;
227
227
  /**
228
- * Resource id
228
+ * The customer resource this usage applies to. Optional — only required if the
229
+ * customer has multiple resources (for example, one subscription per workspace or
230
+ * site) and usage needs to be tracked separately per resource; omit it to report
231
+ * usage at the customer level.
229
232
  */
230
233
  resourceId?: string | null;
231
234
  /**
@@ -289,7 +292,10 @@ export interface UsageEstimateParams {
289
292
  */
290
293
  featureId: string;
291
294
  /**
292
- * Body param: The value to report for usage
295
+ * Body param: The value to report for usage. Must be a whole number — the REST API
296
+ * does not accept fractional (float) usage values; scale up (e.g. report cents
297
+ * instead of dollars, or milliseconds instead of seconds) if you need sub-unit
298
+ * precision.
293
299
  */
294
300
  value: number;
295
301
  /**
@@ -299,11 +305,16 @@ export interface UsageEstimateParams {
299
305
  [key: string]: string | number | boolean;
300
306
  };
301
307
  /**
302
- * Body param: Resource id
308
+ * Body param: The customer resource this usage applies to. Optional — only
309
+ * required if the customer has multiple resources (for example, one subscription
310
+ * per workspace or site) and usage needs to be tracked separately per resource;
311
+ * omit it to report usage at the customer level.
303
312
  */
304
313
  resourceId?: string | null;
305
314
  /**
306
- * Body param: The method by which the usage value should be updated
315
+ * Body param: How the reported value is applied: DELTA (default) adds it to the
316
+ * feature's current usage; SET treats it as the new absolute usage total, and
317
+ * Stigg computes the delta internally.
307
318
  */
308
319
  updateBehavior?: 'DELTA' | 'SET';
309
320
  /**
@@ -336,7 +347,10 @@ export interface UsageHistoryParams {
336
347
  */
337
348
  groupBy?: string;
338
349
  /**
339
- * Query param: Resource id
350
+ * Query param: The customer resource this usage applies to. Optional — only
351
+ * required if the customer has multiple resources (for example, one subscription
352
+ * per workspace or site) and usage needs to be tracked separately per resource;
353
+ * omit it to report usage at the customer level.
340
354
  */
341
355
  resourceId?: string | null;
342
356
  /**
@@ -382,7 +396,9 @@ export declare namespace UsageReportParams {
382
396
  */
383
397
  featureId: string;
384
398
  /**
385
- * The value to report for usage
399
+ * The value to report for usage. Must be a whole number — the REST API does not
400
+ * accept fractional (float) usage values; scale up (e.g. report cents instead of
401
+ * dollars, or milliseconds instead of seconds) if you need sub-unit precision.
386
402
  */
387
403
  value: number;
388
404
  /**
@@ -396,15 +412,22 @@ export declare namespace UsageReportParams {
396
412
  [key: string]: string | number | boolean;
397
413
  };
398
414
  /**
399
- * Idempotency key
415
+ * A key you provide to safely retry the same usage report without double-counting
416
+ * it. Reports with a previously-seen idempotency key are deduplicated for 7 days;
417
+ * after that window a retry is treated as new usage.
400
418
  */
401
419
  idempotencyKey?: string;
402
420
  /**
403
- * Resource id
421
+ * The customer resource this usage applies to. Optional — only required if the
422
+ * customer has multiple resources (for example, one subscription per workspace or
423
+ * site) and usage needs to be tracked separately per resource; omit it to report
424
+ * usage at the customer level.
404
425
  */
405
426
  resourceId?: string | null;
406
427
  /**
407
- * The method by which the usage value should be updated
428
+ * How the reported value is applied: DELTA (default) adds it to the feature's
429
+ * current usage; SET treats it as the new absolute usage total, and Stigg computes
430
+ * the delta internally.
408
431
  */
409
432
  updateBehavior?: 'DELTA' | 'SET';
410
433
  }
@@ -1 +1 @@
1
- {"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../src/resources/v1/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/C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
@@ -173,7 +173,11 @@ export class Addons extends APIResource {
173
173
  }
174
174
 
175
175
  /**
176
- * Publishes a draft addon, making it available for use in subscriptions.
176
+ * Publishes a draft addon, making it available for use in subscriptions. The
177
+ * required `migrationType` field controls whether subscriptions already using this
178
+ * addon are moved onto the new version immediately (`ALL_CUSTOMERS`) or stay on
179
+ * the version they were using — grandfathered — until you explicitly migrate them
180
+ * (`NEW_CUSTOMERS`).
177
181
  */
178
182
  publish(
179
183
  id: string,
@@ -276,7 +280,8 @@ export namespace Addon {
276
280
  isLatest: boolean | null;
277
281
 
278
282
  /**
279
- * The maximum quantity of this addon that can be added to a subscription
283
+ * The maximum quantity of this addon that can be added to a subscription. Leave
284
+ * unset for no upper bound.
280
285
  */
281
286
  maxQuantity: number | null;
282
287
 
@@ -371,7 +376,8 @@ export interface AddonListResponse {
371
376
  isLatest: boolean | null;
372
377
 
373
378
  /**
374
- * The maximum quantity of this addon that can be added to a subscription
379
+ * The maximum quantity of this addon that can be added to a subscription. Leave
380
+ * unset for no upper bound.
375
381
  */
376
382
  maxQuantity: number | null;
377
383
 
@@ -452,7 +458,8 @@ export interface AddonListChargesResponse {
452
458
  createdAt: string;
453
459
 
454
460
  /**
455
- * ISO country code for localized pricing, if any
461
+ * ISO country code for localized pricing, or "eu" for the European Union group you
462
+ * map countries into, if any
456
463
  */
457
464
  billingCountryCode?: string | null;
458
465
 
@@ -1024,7 +1031,7 @@ export interface AddonCreateParams {
1024
1031
 
1025
1032
  /**
1026
1033
  * Body param: The maximum quantity of this addon that can be added to a
1027
- * subscription
1034
+ * subscription. Leave unset for no upper bound.
1028
1035
  */
1029
1036
  maxQuantity?: number | null;
1030
1037
 
@@ -1079,7 +1086,9 @@ export interface AddonUpdateParams {
1079
1086
  billingId?: string | null;
1080
1087
 
1081
1088
  /**
1082
- * Body param: Pricing configuration to set on the addon draft
1089
+ * Body param: Pricing configuration to set on the addon draft. Unlike the rest of
1090
+ * this request, this is a full replace of the pricing configuration, not a merge —
1091
+ * see SetPackagePricingRequest.
1083
1092
  */
1084
1093
  charges?: AddonUpdateParams.Charges;
1085
1094
 
@@ -1100,7 +1109,7 @@ export interface AddonUpdateParams {
1100
1109
 
1101
1110
  /**
1102
1111
  * Body param: The maximum quantity of this addon that can be added to a
1103
- * subscription
1112
+ * subscription. Leave unset for no upper bound.
1104
1113
  */
1105
1114
  maxQuantity?: number | null;
1106
1115
 
@@ -1130,7 +1139,9 @@ export interface AddonUpdateParams {
1130
1139
 
1131
1140
  export namespace AddonUpdateParams {
1132
1141
  /**
1133
- * Pricing configuration to set on the addon draft
1142
+ * Pricing configuration to set on the addon draft. Unlike the rest of this
1143
+ * request, this is a full replace of the pricing configuration, not a merge — see
1144
+ * SetPackagePricingRequest.
1134
1145
  */
1135
1146
  export interface Charges {
1136
1147
  /**
@@ -1154,12 +1165,14 @@ export namespace AddonUpdateParams {
1154
1165
  overageBillingPeriod?: 'ON_SUBSCRIPTION_RENEWAL' | 'MONTHLY';
1155
1166
 
1156
1167
  /**
1157
- * Array of overage pricing model configurations
1168
+ * Array of overage pricing model configurations. Replaces all existing overage
1169
+ * pricing models on the draft — omit this to end up with no overage pricing.
1158
1170
  */
1159
1171
  overagePricingModels?: Array<Charges.OveragePricingModel>;
1160
1172
 
1161
1173
  /**
1162
- * Array of pricing model configurations
1174
+ * Array of pricing model configurations. Replaces all existing base pricing models
1175
+ * on the draft — omit this to end up with no base pricing.
1163
1176
  */
1164
1177
  pricingModels?: Array<Charges.PricingModel>;
1165
1178
  }
@@ -1355,7 +1368,8 @@ export namespace AddonUpdateParams {
1355
1368
  billingPeriod: 'MONTHLY' | 'ANNUALLY';
1356
1369
 
1357
1370
  /**
1358
- * ISO country code for localized pricing
1371
+ * ISO country code for localized pricing, or "eu" for the European Union group you
1372
+ * map countries into
1359
1373
  */
1360
1374
  billingCountryCode?: string;
1361
1375
 
@@ -2005,7 +2019,8 @@ export namespace AddonUpdateParams {
2005
2019
  billingPeriod: 'MONTHLY' | 'ANNUALLY';
2006
2020
 
2007
2021
  /**
2008
- * ISO country code for localized pricing
2022
+ * ISO country code for localized pricing, or "eu" for the European Union group you
2023
+ * map countries into
2009
2024
  */
2010
2025
  billingCountryCode?: string;
2011
2026
 
@@ -2618,7 +2633,9 @@ export interface AddonListChargesParams extends MyCursorIDPageParams {
2618
2633
 
2619
2634
  export interface AddonPublishParams {
2620
2635
  /**
2621
- * Body param: The migration type of the package
2636
+ * Body param: Who the published version applies to: NEW_CUSTOMERS (default) leaves
2637
+ * existing subscribers on their current version, ALL_CUSTOMERS moves them onto the
2638
+ * new version immediately.
2622
2639
  */
2623
2640
  migrationType: 'NEW_CUSTOMERS' | 'ALL_CUSTOMERS';
2624
2641
 
@@ -78,10 +78,9 @@ export class Contracts extends APIResource {
78
78
  }
79
79
 
80
80
  /**
81
- * Retrieves a cursor-paginated list of contracts in the environment, fetched live
82
- * from the connected billing provider. Each contract is enriched with a preview of
83
- * its upcoming (next) invoice when one is available. Returns an empty list when no
84
- * billing provider is connected. Supports filtering by customer external ID,
81
+ * Retrieves a cursor-paginated list of contracts in the environment. Each contract
82
+ * that has a billing contract is enriched with a preview of its upcoming (next)
83
+ * invoice when one is available. Supports filtering by customer external ID,
85
84
  * state, and name.
86
85
  */
87
86
  list(
@@ -301,6 +300,11 @@ export namespace ContractCreateResponse {
301
300
  */
302
301
  dueDate: string | null;
303
302
 
303
+ /**
304
+ * The billing provider ID of the draft invoice this preview describes
305
+ */
306
+ invoiceId: string | null;
307
+
304
308
  /**
305
309
  * The end of the billing period the upcoming invoice covers
306
310
  */
@@ -641,6 +645,11 @@ export namespace ContractRetrieveResponse {
641
645
  */
642
646
  dueDate: string | null;
643
647
 
648
+ /**
649
+ * The billing provider ID of the draft invoice this preview describes
650
+ */
651
+ invoiceId: string | null;
652
+
644
653
  /**
645
654
  * The end of the billing period the upcoming invoice covers
646
655
  */
@@ -981,6 +990,11 @@ export namespace ContractUpdateResponse {
981
990
  */
982
991
  dueDate: string | null;
983
992
 
993
+ /**
994
+ * The billing provider ID of the draft invoice this preview describes
995
+ */
996
+ invoiceId: string | null;
997
+
984
998
  /**
985
999
  * The end of the billing period the upcoming invoice covers
986
1000
  */
@@ -1310,6 +1324,11 @@ export namespace ContractListResponse {
1310
1324
  */
1311
1325
  dueDate: string | null;
1312
1326
 
1327
+ /**
1328
+ * The billing provider ID of the draft invoice this preview describes
1329
+ */
1330
+ invoiceId: string | null;
1331
+
1313
1332
  /**
1314
1333
  * The end of the billing period the upcoming invoice covers
1315
1334
  */
@@ -1649,6 +1668,11 @@ export namespace ContractDeleteResponse {
1649
1668
  */
1650
1669
  dueDate: string | null;
1651
1670
 
1671
+ /**
1672
+ * The billing provider ID of the draft invoice this preview describes
1673
+ */
1674
+ invoiceId: string | null;
1675
+
1652
1676
  /**
1653
1677
  * The end of the billing period the upcoming invoice covers
1654
1678
  */
@@ -1821,13 +1845,6 @@ export interface ContractCreateParams {
1821
1845
  */
1822
1846
  customerId: string;
1823
1847
 
1824
- /**
1825
- * Body param: The subscriptions to attach to the contract (must be non-empty).
1826
- * Each entry is either a new subscription to create or a reference to an existing
1827
- * custom subscription.
1828
- */
1829
- subscriptions: Array<ContractCreateParams.Subscription>;
1830
-
1831
1848
  /**
1832
1849
  * Body param: Optional contract activation end date
1833
1850
  */
@@ -1838,6 +1855,15 @@ export interface ContractCreateParams {
1838
1855
  */
1839
1856
  activationStartDate?: string;
1840
1857
 
1858
+ /**
1859
+ * Body param: Your own ID for the contract, which makes this call idempotent:
1860
+ * sending the same one again returns the existing contract instead of creating a
1861
+ * second. Omit it and one is generated for you, but then a retry cannot be told
1862
+ * apart from a new contract — and contracts cannot be deleted. Recommended
1863
+ * whenever a retry is possible, e.g. building a contract from an order form.
1864
+ */
1865
+ contractId?: string;
1866
+
1841
1867
  /**
1842
1868
  * Body param: Optional contract name
1843
1869
  */
@@ -1856,6 +1882,14 @@ export interface ContractCreateParams {
1856
1882
  */
1857
1883
  setupBilling?: boolean;
1858
1884
 
1885
+ /**
1886
+ * Body param: The subscriptions to attach to the contract. Each entry is either a
1887
+ * new subscription to create or a reference to an existing custom subscription.
1888
+ * Optional — omit it (or pass an empty list) to create a contract with no
1889
+ * subscriptions and attach them later.
1890
+ */
1891
+ subscriptions?: Array<ContractCreateParams.Subscription>;
1892
+
1859
1893
  /**
1860
1894
  * Header param: Account ID — optional when authenticating with a user JWT (Bearer
1861
1895
  * token); falls back to the user's first membership. Ignored for API-key auth.
@@ -1922,7 +1956,9 @@ export namespace ContractCreateParams {
1922
1956
  awaitPaymentConfirmation?: boolean;
1923
1957
 
1924
1958
  /**
1925
- * The ISO 3166-1 alpha-2 country code for billing
1959
+ * The country code used to select a localized price, or "eu" for the European
1960
+ * Union group you map countries into, falling back to the default price when none
1961
+ * matches
1926
1962
  */
1927
1963
  billingCountryCode?: string | null;
1928
1964
 
@@ -1960,7 +1996,8 @@ export namespace ContractCreateParams {
1960
1996
  entitlements?: Array<NewSubscription.Feature | NewSubscription.Credit>;
1961
1997
 
1962
1998
  /**
1963
- * Additional metadata for the subscription
1999
+ * Additional metadata for the subscription, stored as an arbitrary flat key-value
2000
+ * object.
1964
2001
  */
1965
2002
  metadata?: { [key: string]: string };
1966
2003
 
@@ -2262,7 +2299,8 @@ export namespace ContractCreateParams {
2262
2299
  isInvoicePaid?: boolean;
2263
2300
 
2264
2301
  /**
2265
- * Additional metadata for the subscription
2302
+ * Additional metadata for the subscription, stored as an arbitrary flat key-value
2303
+ * object.
2266
2304
  */
2267
2305
  metadata?: { [key: string]: string };
2268
2306
 
@@ -2507,6 +2545,11 @@ export namespace ContractCreateParams {
2507
2545
  * SubscriptionCreditEntitlementRequest
2508
2546
  */
2509
2547
  type: 'CREDIT';
2548
+
2549
+ /**
2550
+ * Whether the credit balance is a soft limit
2551
+ */
2552
+ hasSoftLimit?: boolean;
2510
2553
  }
2511
2554
 
2512
2555
  /**
@@ -2657,7 +2700,10 @@ export namespace ContractCreateParams {
2657
2700
  baseCharge?: boolean;
2658
2701
 
2659
2702
  /**
2660
- * The billing country code of the price
2703
+ * ISO 3166-1 alpha-2 country code this price applies to, or "eu" for the European
2704
+ * Union group you map countries into. Omit for the default price shown to all
2705
+ * countries; set one or more country-specific price periods on the same currency
2706
+ * to localize the amount by billing country.
2661
2707
  */
2662
2708
  billingCountryCode?: string;
2663
2709
 
@@ -135,7 +135,8 @@ export namespace Coupon {
135
135
  id: string;
136
136
 
137
137
  /**
138
- * Fixed amount discounts in different currencies
138
+ * Fixed amount discounts in different currencies. Provide exactly one of
139
+ * percentOff or amountsOff — not both, not neither.
139
140
  */
140
141
  amountsOff: Array<Data.AmountsOff> | null;
141
142
 
@@ -160,7 +161,9 @@ export namespace Coupon {
160
161
  description: string | null;
161
162
 
162
163
  /**
163
- * Duration of the coupon validity in months
164
+ * How many calendar months the discount applies for once redeemed, counted from
165
+ * when the coupon is applied (not tied to the subscription's billing period).
166
+ * Leave unset for a discount that lasts for the lifetime of the subscription.
164
167
  */
165
168
  durationInMonths: number | null;
166
169
 
@@ -175,7 +178,8 @@ export namespace Coupon {
175
178
  name: string;
176
179
 
177
180
  /**
178
- * Percentage discount off the original price
181
+ * Percentage discount off the original price. Provide exactly one of percentOff or
182
+ * amountsOff — not both, not neither.
179
183
  */
180
184
  percentOff: number | null;
181
185
 
@@ -344,7 +348,8 @@ export interface CouponListResponse {
344
348
  id: string;
345
349
 
346
350
  /**
347
- * Fixed amount discounts in different currencies
351
+ * Fixed amount discounts in different currencies. Provide exactly one of
352
+ * percentOff or amountsOff — not both, not neither.
348
353
  */
349
354
  amountsOff: Array<CouponListResponse.AmountsOff> | null;
350
355
 
@@ -369,7 +374,9 @@ export interface CouponListResponse {
369
374
  description: string | null;
370
375
 
371
376
  /**
372
- * Duration of the coupon validity in months
377
+ * How many calendar months the discount applies for once redeemed, counted from
378
+ * when the coupon is applied (not tied to the subscription's billing period).
379
+ * Leave unset for a discount that lasts for the lifetime of the subscription.
373
380
  */
374
381
  durationInMonths: number | null;
375
382
 
@@ -384,7 +391,8 @@ export interface CouponListResponse {
384
391
  name: string;
385
392
 
386
393
  /**
387
- * Percentage discount off the original price
394
+ * Percentage discount off the original price. Provide exactly one of percentOff or
395
+ * amountsOff — not both, not neither.
388
396
  */
389
397
  percentOff: number | null;
390
398
 
@@ -549,7 +557,8 @@ export interface CouponCreateParams {
549
557
  id: string;
550
558
 
551
559
  /**
552
- * Body param: Fixed amount discounts in different currencies
560
+ * Body param: Fixed amount discounts in different currencies. Provide exactly one
561
+ * of percentOff or amountsOff — not both, not neither.
553
562
  */
554
563
  amountsOff: Array<CouponCreateParams.AmountsOff> | null;
555
564
 
@@ -559,7 +568,10 @@ export interface CouponCreateParams {
559
568
  description: string | null;
560
569
 
561
570
  /**
562
- * Body param: Duration of the coupon validity in months
571
+ * Body param: How many calendar months the discount applies for once redeemed,
572
+ * counted from when the coupon is applied (not tied to the subscription's billing
573
+ * period). Leave unset for a discount that lasts for the lifetime of the
574
+ * subscription.
563
575
  */
564
576
  durationInMonths: number | null;
565
577
 
@@ -574,7 +586,8 @@ export interface CouponCreateParams {
574
586
  name: string;
575
587
 
576
588
  /**
577
- * Body param: Percentage discount off the original price
589
+ * Body param: Percentage discount off the original price. Provide exactly one of
590
+ * percentOff or amountsOff — not both, not neither.
578
591
  */
579
592
  percentOff: number | null;
580
593
 
@@ -81,14 +81,20 @@ export type GrantListResponsesMyCursorIDPage = MyCursorIDPage<GrantListResponse>
81
81
  */
82
82
  export interface CreditGrantResponse {
83
83
  /**
84
- * Credit grant object representing allocated credits for a customer
84
+ * Credit grant object representing allocated credits for a customer. Credit grants
85
+ * cannot be edited after creation via this API — void the grant to stop further
86
+ * consumption from it, then create a new grant with the corrected amount,
87
+ * priority, or expiration.
85
88
  */
86
89
  data: CreditGrantResponse.Data;
87
90
  }
88
91
 
89
92
  export namespace CreditGrantResponse {
90
93
  /**
91
- * Credit grant object representing allocated credits for a customer
94
+ * Credit grant object representing allocated credits for a customer. Credit grants
95
+ * cannot be edited after creation via this API — void the grant to stop further
96
+ * consumption from it, then create a new grant with the corrected amount,
97
+ * priority, or expiration.
92
98
  */
93
99
  export interface Data {
94
100
  /**
@@ -187,7 +193,11 @@ export namespace CreditGrantResponse {
187
193
  sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT' | null;
188
194
 
189
195
  /**
190
- * The effective status of the credit grant
196
+ * The effective status of the credit grant. A grant with paymentCollectionMethod
197
+ * NONE or CHARGE becomes ACTIVE (and its credits become usable) as soon as it's
198
+ * created (or as soon as the charge succeeds). A grant with
199
+ * paymentCollectionMethod INVOICE stays PAYMENT_PENDING — its credits are not
200
+ * usable — until the invoice is paid.
191
201
  */
192
202
  status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED';
193
203
 
@@ -305,12 +315,14 @@ export namespace CreditGrantResponse {
305
315
  status: 'PENDING' | 'ERROR' | 'SUCCESS' | 'NO_SYNC_REQUIRED';
306
316
 
307
317
  /**
308
- * Synced entity id
318
+ * The external entity ID this record is linked to in the vendor system (e.g. the
319
+ * Stripe customer ID). Null until the link has synced; required when creating the
320
+ * link.
309
321
  */
310
322
  syncedEntityId: string | null;
311
323
 
312
324
  /**
313
- * The vendor identifier of integration
325
+ * The vendor identifier of the integration (e.g. STRIPE, SALESFORCE, SNOWFLAKE)
314
326
  */
315
327
  vendorIdentifier:
316
328
  | 'AUTH0'
@@ -332,7 +344,10 @@ export namespace CreditGrantResponse {
332
344
  }
333
345
 
334
346
  /**
335
- * Credit grant object representing allocated credits for a customer
347
+ * Credit grant object representing allocated credits for a customer. Credit grants
348
+ * cannot be edited after creation via this API — void the grant to stop further
349
+ * consumption from it, then create a new grant with the corrected amount,
350
+ * priority, or expiration.
336
351
  */
337
352
  export interface GrantListResponse {
338
353
  /**
@@ -431,7 +446,11 @@ export interface GrantListResponse {
431
446
  sourceType: 'PRICE' | 'PLAN_ENTITLEMENT' | 'ADDON_ENTITLEMENT' | null;
432
447
 
433
448
  /**
434
- * The effective status of the credit grant
449
+ * The effective status of the credit grant. A grant with paymentCollectionMethod
450
+ * NONE or CHARGE becomes ACTIVE (and its credits become usable) as soon as it's
451
+ * created (or as soon as the charge succeeds). A grant with
452
+ * paymentCollectionMethod INVOICE stays PAYMENT_PENDING — its credits are not
453
+ * usable — until the invoice is paid.
435
454
  */
436
455
  status: 'PAYMENT_PENDING' | 'ACTIVE' | 'EXPIRED' | 'VOIDED' | 'SCHEDULED';
437
456
 
@@ -549,12 +568,14 @@ export namespace GrantListResponse {
549
568
  status: 'PENDING' | 'ERROR' | 'SUCCESS' | 'NO_SYNC_REQUIRED';
550
569
 
551
570
  /**
552
- * Synced entity id
571
+ * The external entity ID this record is linked to in the vendor system (e.g. the
572
+ * Stripe customer ID). Null until the link has synced; required when creating the
573
+ * link.
553
574
  */
554
575
  syncedEntityId: string | null;
555
576
 
556
577
  /**
557
- * The vendor identifier of integration
578
+ * The vendor identifier of the integration (e.g. STRIPE, SALESFORCE, SNOWFLAKE)
558
579
  */
559
580
  vendorIdentifier:
560
581
  | 'AUTH0'
@@ -602,12 +623,16 @@ export interface GrantCreateParams {
602
623
 
603
624
  /**
604
625
  * Body param: Whether to wait for payment confirmation before returning (default:
605
- * true)
626
+ * true). When false, the request returns immediately while payment (if any) is
627
+ * collected asynchronously; check the returned status to see whether the credits
628
+ * are already usable.
606
629
  */
607
630
  awaitPaymentConfirmation?: boolean;
608
631
 
609
632
  /**
610
- * Body param: Billing information for the credit grant
633
+ * Body param: Billing information for the credit grant, used when the grant has a
634
+ * payment collection method that requires collecting payment (e.g. invoice due
635
+ * date, billing address).
611
636
  */
612
637
  billingInformation?: GrantCreateParams.BillingInformation;
613
638
 
@@ -637,12 +662,22 @@ export interface GrantCreateParams {
637
662
  metadata?: { [key: string]: string };
638
663
 
639
664
  /**
640
- * Body param: The payment collection method (CHARGE, INVOICE, NONE)
665
+ * Body param: The payment collection method (CHARGE, INVOICE, NONE). Optional if
666
+ * the grant has no `cost`, since there is nothing to collect payment for. With
667
+ * NONE or CHARGE, the grant is active and its credits are usable right away (or as
668
+ * soon as the charge succeeds). With INVOICE, the grant stays pending — its
669
+ * credits are not usable — until the generated invoice is paid.
641
670
  */
642
671
  paymentCollectionMethod?: 'CHARGE' | 'INVOICE' | 'NONE';
643
672
 
644
673
  /**
645
- * Body param: The priority of the credit grant (lower number = higher priority)
674
+ * Body param: Determines which grant is drawn down first when the customer has
675
+ * multiple active grants in the same currency (0-100). Lower numbers are consumed
676
+ * first. Defaults to 50 — the same default used for recurring credits granted by a
677
+ * plan or price — so without setting this explicitly, draw order against
678
+ * plan-included credits falls back to expiration date and grant type. To have this
679
+ * grant consumed before or after plan-included credits, set a lower or higher
680
+ * priority than the plan/price credit configuration.
646
681
  */
647
682
  priority?: number;
648
683
 
@@ -667,7 +702,9 @@ export interface GrantCreateParams {
667
702
 
668
703
  export namespace GrantCreateParams {
669
704
  /**
670
- * Billing information for the credit grant
705
+ * Billing information for the credit grant, used when the grant has a payment
706
+ * collection method that requires collecting payment (e.g. invoice due date,
707
+ * billing address).
671
708
  */
672
709
  export interface BillingInformation {
673
710
  /**