@stigg/typescript 0.1.0-beta.54 → 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.
Files changed (97) hide show
  1. package/CHANGELOG.md +15 -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 +35 -4
  12. package/resources/v1/contracts.d.mts.map +1 -1
  13. package/resources/v1/contracts.d.ts +35 -4
  14. package/resources/v1/contracts.d.ts.map +1 -1
  15. package/resources/v1/coupons.d.mts +18 -9
  16. package/resources/v1/coupons.d.mts.map +1 -1
  17. package/resources/v1/coupons.d.ts +18 -9
  18. package/resources/v1/coupons.d.ts.map +1 -1
  19. package/resources/v1/credits/grants.d.mts +51 -14
  20. package/resources/v1/credits/grants.d.mts.map +1 -1
  21. package/resources/v1/credits/grants.d.ts +51 -14
  22. package/resources/v1/credits/grants.d.ts.map +1 -1
  23. package/resources/v1/customers/customers.d.mts +119 -49
  24. package/resources/v1/customers/customers.d.mts.map +1 -1
  25. package/resources/v1/customers/customers.d.ts +119 -49
  26. package/resources/v1/customers/customers.d.ts.map +1 -1
  27. package/resources/v1/customers/customers.js +12 -12
  28. package/resources/v1/customers/customers.js.map +1 -1
  29. package/resources/v1/customers/customers.mjs +12 -12
  30. package/resources/v1/customers/customers.mjs.map +1 -1
  31. package/resources/v1/customers/integrations.d.mts +17 -8
  32. package/resources/v1/customers/integrations.d.mts.map +1 -1
  33. package/resources/v1/customers/integrations.d.ts +17 -8
  34. package/resources/v1/customers/integrations.d.ts.map +1 -1
  35. package/resources/v1/customers/payment-method.d.mts +7 -3
  36. package/resources/v1/customers/payment-method.d.mts.map +1 -1
  37. package/resources/v1/customers/payment-method.d.ts +7 -3
  38. package/resources/v1/customers/payment-method.d.ts.map +1 -1
  39. package/resources/v1/customers/promotional-entitlements.d.mts +23 -5
  40. package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -1
  41. package/resources/v1/customers/promotional-entitlements.d.ts +23 -5
  42. package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -1
  43. package/resources/v1/events/events.d.mts +13 -5
  44. package/resources/v1/events/events.d.mts.map +1 -1
  45. package/resources/v1/events/events.d.ts +13 -5
  46. package/resources/v1/events/events.d.ts.map +1 -1
  47. package/resources/v1/events/events.js +2 -2
  48. package/resources/v1/events/events.js.map +1 -1
  49. package/resources/v1/events/events.mjs +2 -2
  50. package/resources/v1/events/events.mjs.map +1 -1
  51. package/resources/v1/features.d.mts +222 -7
  52. package/resources/v1/features.d.mts.map +1 -1
  53. package/resources/v1/features.d.ts +222 -7
  54. package/resources/v1/features.d.ts.map +1 -1
  55. package/resources/v1/plans/plans.d.mts +62 -22
  56. package/resources/v1/plans/plans.d.mts.map +1 -1
  57. package/resources/v1/plans/plans.d.ts +62 -22
  58. package/resources/v1/plans/plans.d.ts.map +1 -1
  59. package/resources/v1/plans/plans.js +5 -1
  60. package/resources/v1/plans/plans.js.map +1 -1
  61. package/resources/v1/plans/plans.mjs +5 -1
  62. package/resources/v1/plans/plans.mjs.map +1 -1
  63. package/resources/v1/products.d.mts +15 -7
  64. package/resources/v1/products.d.mts.map +1 -1
  65. package/resources/v1/products.d.ts +15 -7
  66. package/resources/v1/products.d.ts.map +1 -1
  67. package/resources/v1/subscriptions/subscriptions.d.mts +66 -22
  68. package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
  69. package/resources/v1/subscriptions/subscriptions.d.ts +66 -22
  70. package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
  71. package/resources/v1/subscriptions/subscriptions.js +11 -3
  72. package/resources/v1/subscriptions/subscriptions.js.map +1 -1
  73. package/resources/v1/subscriptions/subscriptions.mjs +11 -3
  74. package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
  75. package/resources/v1/usage.d.mts +32 -9
  76. package/resources/v1/usage.d.mts.map +1 -1
  77. package/resources/v1/usage.d.ts +32 -9
  78. package/resources/v1/usage.d.ts.map +1 -1
  79. package/src/resources/v1/addons/addons.ts +30 -13
  80. package/src/resources/v1/contracts.ts +41 -4
  81. package/src/resources/v1/coupons.ts +18 -9
  82. package/src/resources/v1/credits/grants.ts +51 -14
  83. package/src/resources/v1/customers/customers.ts +120 -49
  84. package/src/resources/v1/customers/integrations.ts +17 -8
  85. package/src/resources/v1/customers/payment-method.ts +7 -3
  86. package/src/resources/v1/customers/promotional-entitlements.ts +23 -5
  87. package/src/resources/v1/events/events.ts +13 -5
  88. package/src/resources/v1/features.ts +288 -7
  89. package/src/resources/v1/plans/plans.ts +62 -22
  90. package/src/resources/v1/products.ts +15 -7
  91. package/src/resources/v1/subscriptions/subscriptions.ts +68 -22
  92. package/src/resources/v1/usage.ts +32 -9
  93. package/src/version.ts +1 -1
  94. package/version.d.mts +1 -1
  95. package/version.d.ts +1 -1
  96. package/version.js +1 -1
  97. 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/usage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AAEpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE;;GAEG;AACH,qBAAa,KAAM,SAAQ,WAAW;IACpC;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAelG;;OAEG;IACH,OAAO,CACL,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,kBAAkB,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,oBAAoB,CAAC;IAenC;;;OAGG;IACH,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;CAc7F;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,IAAI,EAAE,qBAAqB,CAAC,IAAI,CAAC;CAClC;AAED,yBAAiB,qBAAqB,CAAC;IACrC;;OAEG;IACH,UAAiB,IAAI;QACnB;;WAEG;QACH,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAEhC;;WAEG;QACH,QAAQ,EAAE,KAAK,CAAC,qCAAqC,GAAG,mBAAmB,GAAG,0BAA0B,CAAC,CAAC;KAC3G;IAED,UAAiB,IAAI,CAAC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H,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAE3B;;;;WAIG;QACH,cAAc,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;KAClC;CACF;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/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
 
@@ -301,6 +301,11 @@ export namespace ContractCreateResponse {
301
301
  */
302
302
  dueDate: string | null;
303
303
 
304
+ /**
305
+ * The billing provider ID of the draft invoice this preview describes
306
+ */
307
+ invoiceId: string | null;
308
+
304
309
  /**
305
310
  * The end of the billing period the upcoming invoice covers
306
311
  */
@@ -641,6 +646,11 @@ export namespace ContractRetrieveResponse {
641
646
  */
642
647
  dueDate: string | null;
643
648
 
649
+ /**
650
+ * The billing provider ID of the draft invoice this preview describes
651
+ */
652
+ invoiceId: string | null;
653
+
644
654
  /**
645
655
  * The end of the billing period the upcoming invoice covers
646
656
  */
@@ -981,6 +991,11 @@ export namespace ContractUpdateResponse {
981
991
  */
982
992
  dueDate: string | null;
983
993
 
994
+ /**
995
+ * The billing provider ID of the draft invoice this preview describes
996
+ */
997
+ invoiceId: string | null;
998
+
984
999
  /**
985
1000
  * The end of the billing period the upcoming invoice covers
986
1001
  */
@@ -1310,6 +1325,11 @@ export namespace ContractListResponse {
1310
1325
  */
1311
1326
  dueDate: string | null;
1312
1327
 
1328
+ /**
1329
+ * The billing provider ID of the draft invoice this preview describes
1330
+ */
1331
+ invoiceId: string | null;
1332
+
1313
1333
  /**
1314
1334
  * The end of the billing period the upcoming invoice covers
1315
1335
  */
@@ -1649,6 +1669,11 @@ export namespace ContractDeleteResponse {
1649
1669
  */
1650
1670
  dueDate: string | null;
1651
1671
 
1672
+ /**
1673
+ * The billing provider ID of the draft invoice this preview describes
1674
+ */
1675
+ invoiceId: string | null;
1676
+
1652
1677
  /**
1653
1678
  * The end of the billing period the upcoming invoice covers
1654
1679
  */
@@ -1922,7 +1947,9 @@ export namespace ContractCreateParams {
1922
1947
  awaitPaymentConfirmation?: boolean;
1923
1948
 
1924
1949
  /**
1925
- * The ISO 3166-1 alpha-2 country code for billing
1950
+ * The country code used to select a localized price, or "eu" for the European
1951
+ * Union group you map countries into, falling back to the default price when none
1952
+ * matches
1926
1953
  */
1927
1954
  billingCountryCode?: string | null;
1928
1955
 
@@ -1960,7 +1987,8 @@ export namespace ContractCreateParams {
1960
1987
  entitlements?: Array<NewSubscription.Feature | NewSubscription.Credit>;
1961
1988
 
1962
1989
  /**
1963
- * Additional metadata for the subscription
1990
+ * Additional metadata for the subscription, stored as an arbitrary flat key-value
1991
+ * object.
1964
1992
  */
1965
1993
  metadata?: { [key: string]: string };
1966
1994
 
@@ -2262,7 +2290,8 @@ export namespace ContractCreateParams {
2262
2290
  isInvoicePaid?: boolean;
2263
2291
 
2264
2292
  /**
2265
- * Additional metadata for the subscription
2293
+ * Additional metadata for the subscription, stored as an arbitrary flat key-value
2294
+ * object.
2266
2295
  */
2267
2296
  metadata?: { [key: string]: string };
2268
2297
 
@@ -2507,6 +2536,11 @@ export namespace ContractCreateParams {
2507
2536
  * SubscriptionCreditEntitlementRequest
2508
2537
  */
2509
2538
  type: 'CREDIT';
2539
+
2540
+ /**
2541
+ * Whether the credit balance is a soft limit
2542
+ */
2543
+ hasSoftLimit?: boolean;
2510
2544
  }
2511
2545
 
2512
2546
  /**
@@ -2657,7 +2691,10 @@ export namespace ContractCreateParams {
2657
2691
  baseCharge?: boolean;
2658
2692
 
2659
2693
  /**
2660
- * The billing country code of the price
2694
+ * ISO 3166-1 alpha-2 country code this price applies to, or "eu" for the European
2695
+ * Union group you map countries into. Omit for the default price shown to all
2696
+ * countries; set one or more country-specific price periods on the same currency
2697
+ * to localize the amount by billing country.
2661
2698
  */
2662
2699
  billingCountryCode?: string;
2663
2700
 
@@ -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,8 @@ export namespace Coupon {
160
161
  description: string | null;
161
162
 
162
163
  /**
163
- * Duration of the coupon validity in months
164
+ * How many billing cycles the discount applies for once redeemed. Leave unset for
165
+ * a discount that lasts for the lifetime of the subscription.
164
166
  */
165
167
  durationInMonths: number | null;
166
168
 
@@ -175,7 +177,8 @@ export namespace Coupon {
175
177
  name: string;
176
178
 
177
179
  /**
178
- * Percentage discount off the original price
180
+ * Percentage discount off the original price. Provide exactly one of percentOff or
181
+ * amountsOff — not both, not neither.
179
182
  */
180
183
  percentOff: number | null;
181
184
 
@@ -344,7 +347,8 @@ export interface CouponListResponse {
344
347
  id: string;
345
348
 
346
349
  /**
347
- * Fixed amount discounts in different currencies
350
+ * Fixed amount discounts in different currencies. Provide exactly one of
351
+ * percentOff or amountsOff — not both, not neither.
348
352
  */
349
353
  amountsOff: Array<CouponListResponse.AmountsOff> | null;
350
354
 
@@ -369,7 +373,8 @@ export interface CouponListResponse {
369
373
  description: string | null;
370
374
 
371
375
  /**
372
- * Duration of the coupon validity in months
376
+ * How many billing cycles the discount applies for once redeemed. Leave unset for
377
+ * a discount that lasts for the lifetime of the subscription.
373
378
  */
374
379
  durationInMonths: number | null;
375
380
 
@@ -384,7 +389,8 @@ export interface CouponListResponse {
384
389
  name: string;
385
390
 
386
391
  /**
387
- * Percentage discount off the original price
392
+ * Percentage discount off the original price. Provide exactly one of percentOff or
393
+ * amountsOff — not both, not neither.
388
394
  */
389
395
  percentOff: number | null;
390
396
 
@@ -549,7 +555,8 @@ export interface CouponCreateParams {
549
555
  id: string;
550
556
 
551
557
  /**
552
- * Body param: Fixed amount discounts in different currencies
558
+ * Body param: Fixed amount discounts in different currencies. Provide exactly one
559
+ * of percentOff or amountsOff — not both, not neither.
553
560
  */
554
561
  amountsOff: Array<CouponCreateParams.AmountsOff> | null;
555
562
 
@@ -559,7 +566,8 @@ export interface CouponCreateParams {
559
566
  description: string | null;
560
567
 
561
568
  /**
562
- * Body param: Duration of the coupon validity in months
569
+ * Body param: How many billing cycles the discount applies for once redeemed.
570
+ * Leave unset for a discount that lasts for the lifetime of the subscription.
563
571
  */
564
572
  durationInMonths: number | null;
565
573
 
@@ -574,7 +582,8 @@ export interface CouponCreateParams {
574
582
  name: string;
575
583
 
576
584
  /**
577
- * Body param: Percentage discount off the original price
585
+ * Body param: Percentage discount off the original price. Provide exactly one of
586
+ * percentOff or amountsOff — not both, not neither.
578
587
  */
579
588
  percentOff: number | null;
580
589
 
@@ -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
  /**