@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
@@ -124,12 +124,12 @@ export class Customers extends APIResource {
124
124
  /**
125
125
  * Checks a single entitlement (feature or credit) for a customer or resource.
126
126
  * Supports `requestedUsage` and `requestedValues` to evaluate against limits or
127
- * enum values.
128
- *
129
- * **Warning:** This REST API endpoint lacks built-in client-side caching, fallback
130
- * mechanisms, and low-latency guarantees. It is not recommended for hot-path
131
- * entitlement checks. For production use, consider using the Stigg Node Server SDK
132
- * with caching or the Sidecar for low-latency cached responses.
127
+ * enum values. Each call reaches the Stigg API directly, so latency reflects a
128
+ * network round trip. For entitlement checks on a hot path (e.g. gating a request
129
+ * in real time), the Stigg Node Server SDK (with its built-in cache) or the
130
+ * Sidecar will typically respond faster and keep working through brief Stigg
131
+ * outages; reach for this endpoint when a live HTTP call is the natural fit, such
132
+ * as from a non-Node backend or a server-side job.
133
133
  */
134
134
  checkEntitlement(
135
135
  id: string,
@@ -170,10 +170,9 @@ export class Customers extends APIResource {
170
170
  }
171
171
 
172
172
  /**
173
- * Retrieves a customer's contracts, fetched live from the connected billing
174
- * provider, each enriched with a preview of its upcoming (next) invoice when
175
- * available. Returns an empty list when no billing provider is connected or the
176
- * customer is not synced.
173
+ * Retrieves a customer's contracts. Each contract that has a billing contract is
174
+ * enriched with a preview of its upcoming (next) invoice when available. Returns
175
+ * an empty list when the customer has no contracts.
177
176
  */
178
177
  listContracts(
179
178
  id: string,
@@ -270,12 +269,12 @@ export class Customers extends APIResource {
270
269
 
271
270
  /**
272
271
  * Retrieves the effective entitlements for a customer or resource, including
273
- * feature and credit entitlements.
274
- *
275
- * **Warning:** This REST API endpoint lacks built-in client-side caching, fallback
276
- * mechanisms, and low-latency guarantees. It is not recommended for hot-path
277
- * entitlement checks. For production use, consider using the Stigg Node Server SDK
278
- * with caching or the Sidecar for low-latency cached responses.
272
+ * feature and credit entitlements. Each call reaches the Stigg API directly, so
273
+ * latency reflects a network round trip. For entitlement checks on a hot path
274
+ * (e.g. gating a request in real time), the Stigg Node Server SDK (with its
275
+ * built-in cache) or the Sidecar will typically respond faster and keep working
276
+ * through brief Stigg outages; reach for this endpoint when a live HTTP call is
277
+ * the natural fit, such as from a non-Node backend or a server-side job.
279
278
  */
280
279
  retrieveEntitlements(
281
280
  id: string,
@@ -329,44 +328,36 @@ export type CustomerListResourcesResponsesMyCursorIDPage = MyCursorIDPage<Custom
329
328
  */
330
329
  export interface CustomerIntegrationResponse {
331
330
  /**
332
- * External billing or CRM integration link
331
+ * Links this customer to their record in a specific configured integration (e.g.
332
+ * their Stripe customer ID under your Stripe integration). A customer has at most
333
+ * one link per integration.
333
334
  */
334
335
  data: CustomerIntegrationResponse.Data;
335
336
  }
336
337
 
337
338
  export namespace CustomerIntegrationResponse {
338
339
  /**
339
- * External billing or CRM integration link
340
+ * Links this customer to their record in a specific configured integration (e.g.
341
+ * their Stripe customer ID under your Stripe integration). A customer has at most
342
+ * one link per integration.
340
343
  */
341
344
  export interface Data {
342
345
  /**
343
- * Integration details
346
+ * The internal ID of the integration this record is linked to
344
347
  */
345
348
  id: string;
346
349
 
347
350
  /**
348
- * Synced entity id
351
+ * The external entity ID this record is linked to in the vendor system (e.g. the
352
+ * Stripe customer ID). Null until the link has synced; required when creating the
353
+ * link.
349
354
  */
350
355
  syncedEntityId: string | null;
351
356
 
352
357
  /**
353
- * The vendor identifier of integration
358
+ * The vendor whose system holds the customer record
354
359
  */
355
- vendorIdentifier:
356
- | 'AUTH0'
357
- | 'ZUORA'
358
- | 'STRIPE'
359
- | 'HUBSPOT'
360
- | 'AWS_MARKETPLACE'
361
- | 'SNOWFLAKE'
362
- | 'SALESFORCE'
363
- | 'BIG_QUERY'
364
- | 'OPEN_FGA'
365
- | 'APP_STORE'
366
- | 'RECEIVED'
367
- | 'PREQUEL'
368
- | 'AIRWALLEX'
369
- | 'STRIPE_INVOICING';
360
+ vendorIdentifier: 'STRIPE' | 'ZUORA' | 'HUBSPOT' | 'AWS_MARKETPLACE';
370
361
 
371
362
  /**
372
363
  * Price billing sync revision data containing billing ID, link URL, and price
@@ -616,7 +607,11 @@ export namespace CustomerResponse {
616
607
  language?: string | null;
617
608
 
618
609
  /**
619
- * Additional metadata
610
+ * Custom key-value metadata to attach to the customer. When creating a customer,
611
+ * this sets the initial metadata. When updating a customer, this replaces the
612
+ * customer's existing metadata object entirely — it is not merged key by key. Omit
613
+ * this field on update to leave the customer's existing metadata untouched; pass
614
+ * an empty object to clear it.
620
615
  */
621
616
  metadata?: { [key: string]: string };
622
617
 
@@ -664,25 +659,29 @@ export namespace CustomerResponse {
664
659
  /**
665
660
  * The default payment method type
666
661
  */
667
- type: 'CARD' | 'BANK' | 'CASH_APP';
662
+ type: 'CARD' | 'BANK' | 'CASH_APP' | 'PAYPAL' | null;
668
663
  }
669
664
 
670
665
  /**
671
- * External billing or CRM integration link
666
+ * Links this customer to their record in a specific configured integration (e.g.
667
+ * their Stripe customer ID under your Stripe integration). A customer has at most
668
+ * one link per integration.
672
669
  */
673
670
  export interface Integration {
674
671
  /**
675
- * Integration details
672
+ * The internal ID of the integration this record is linked to
676
673
  */
677
674
  id: string;
678
675
 
679
676
  /**
680
- * Synced entity id
677
+ * The external entity ID this record is linked to in the vendor system (e.g. the
678
+ * Stripe customer ID). Null until the link has synced; required when creating the
679
+ * link.
681
680
  */
682
681
  syncedEntityId: string | null;
683
682
 
684
683
  /**
685
- * The vendor identifier of integration
684
+ * The vendor identifier of the integration (e.g. STRIPE, SALESFORCE, SNOWFLAKE)
686
685
  */
687
686
  vendorIdentifier:
688
687
  | 'AUTH0'
@@ -737,7 +736,9 @@ export namespace CustomerResponse {
737
736
  invoiceCustomFields?: { [key: string]: string };
738
737
 
739
738
  /**
740
- * Additional metadata
739
+ * Additional metadata to pass through to the billing provider on the customer's
740
+ * record there. This is separate from the customer's own metadata field — it's
741
+ * stored only on the billing-provider side, not on the Stigg customer object.
741
742
  */
742
743
  metadata?: { [key: string]: string };
743
744
 
@@ -975,7 +976,9 @@ export namespace CustomerResponse {
975
976
  | 'xpf';
976
977
 
977
978
  /**
978
- * Additional metadata
979
+ * Additional metadata to pass through to the billing provider on the customer's
980
+ * record there. This is separate from the customer's own metadata field — it's
981
+ * stored only on the billing-provider side, not on the Stigg customer object.
979
982
  */
980
983
  metadata?: { [key: string]: string };
981
984
 
@@ -1202,7 +1205,11 @@ export interface CustomerListResponse {
1202
1205
  language?: string | null;
1203
1206
 
1204
1207
  /**
1205
- * Additional metadata
1208
+ * Custom key-value metadata to attach to the customer. When creating a customer,
1209
+ * this sets the initial metadata. When updating a customer, this replaces the
1210
+ * customer's existing metadata object entirely — it is not merged key by key. Omit
1211
+ * this field on update to leave the customer's existing metadata untouched; pass
1212
+ * an empty object to clear it.
1206
1213
  */
1207
1214
  metadata?: { [key: string]: string };
1208
1215
 
@@ -1250,25 +1257,29 @@ export namespace CustomerListResponse {
1250
1257
  /**
1251
1258
  * The default payment method type
1252
1259
  */
1253
- type: 'CARD' | 'BANK' | 'CASH_APP';
1260
+ type: 'CARD' | 'BANK' | 'CASH_APP' | 'PAYPAL' | null;
1254
1261
  }
1255
1262
 
1256
1263
  /**
1257
- * External billing or CRM integration link
1264
+ * Links this customer to their record in a specific configured integration (e.g.
1265
+ * their Stripe customer ID under your Stripe integration). A customer has at most
1266
+ * one link per integration.
1258
1267
  */
1259
1268
  export interface Integration {
1260
1269
  /**
1261
- * Integration details
1270
+ * The internal ID of the integration this record is linked to
1262
1271
  */
1263
1272
  id: string;
1264
1273
 
1265
1274
  /**
1266
- * Synced entity id
1275
+ * The external entity ID this record is linked to in the vendor system (e.g. the
1276
+ * Stripe customer ID). Null until the link has synced; required when creating the
1277
+ * link.
1267
1278
  */
1268
1279
  syncedEntityId: string | null;
1269
1280
 
1270
1281
  /**
1271
- * The vendor identifier of integration
1282
+ * The vendor identifier of the integration (e.g. STRIPE, SALESFORCE, SNOWFLAKE)
1272
1283
  */
1273
1284
  vendorIdentifier:
1274
1285
  | 'AUTH0'
@@ -1323,7 +1334,9 @@ export namespace CustomerListResponse {
1323
1334
  invoiceCustomFields?: { [key: string]: string };
1324
1335
 
1325
1336
  /**
1326
- * Additional metadata
1337
+ * Additional metadata to pass through to the billing provider on the customer's
1338
+ * record there. This is separate from the customer's own metadata field — it's
1339
+ * stored only on the billing-provider side, not on the Stigg customer object.
1327
1340
  */
1328
1341
  metadata?: { [key: string]: string };
1329
1342
 
@@ -1561,7 +1574,9 @@ export namespace CustomerListResponse {
1561
1574
  | 'xpf';
1562
1575
 
1563
1576
  /**
1564
- * Additional metadata
1577
+ * Additional metadata to pass through to the billing provider on the customer's
1578
+ * record there. This is separate from the customer's own metadata field — it's
1579
+ * stored only on the billing-provider side, not on the Stigg customer object.
1565
1580
  */
1566
1581
  metadata?: { [key: string]: string };
1567
1582
 
@@ -1986,6 +2001,11 @@ export namespace CustomerListContractsResponse {
1986
2001
  */
1987
2002
  dueDate: string | null;
1988
2003
 
2004
+ /**
2005
+ * The billing provider ID of the draft invoice this preview describes
2006
+ */
2007
+ invoiceId: string | null;
2008
+
1989
2009
  /**
1990
2010
  * The end of the billing period the upcoming invoice covers
1991
2011
  */
@@ -2268,7 +2288,12 @@ export namespace CustomerListInvoicesResponse {
2268
2288
  }
2269
2289
 
2270
2290
  /**
2271
- * Resource object that belongs to a customer
2291
+ * Resource object that belongs to a customer, used to scope subscriptions and
2292
+ * entitlements to a specific instance within the customer's account (e.g. a
2293
+ * website, project, or workspace) for multi-resource pricing. A resource is
2294
+ * identified only by its resourceId — there's no separate display name or metadata
2295
+ * field on the resource itself; if you need to attach descriptive data, keep it in
2296
+ * your own system keyed by resourceId.
2272
2297
  */
2273
2298
  export interface CustomerListResourcesResponse {
2274
2299
  /**
@@ -2654,7 +2679,11 @@ export interface CustomerUpdateParams {
2654
2679
  language?: string | null;
2655
2680
 
2656
2681
  /**
2657
- * Body param: Additional metadata
2682
+ * Body param: Custom key-value metadata to attach to the customer. When creating a
2683
+ * customer, this sets the initial metadata. When updating a customer, this
2684
+ * replaces the customer's existing metadata object entirely — it is not merged key
2685
+ * by key. Omit this field on update to leave the customer's existing metadata
2686
+ * untouched; pass an empty object to clear it.
2658
2687
  */
2659
2688
  metadata?: { [key: string]: string };
2660
2689
 
@@ -2689,21 +2718,25 @@ export interface CustomerUpdateParams {
2689
2718
 
2690
2719
  export namespace CustomerUpdateParams {
2691
2720
  /**
2692
- * External billing or CRM integration link
2721
+ * Links this customer to their record in a specific configured integration (e.g.
2722
+ * their Stripe customer ID under your Stripe integration). A customer has at most
2723
+ * one link per integration.
2693
2724
  */
2694
2725
  export interface Integration {
2695
2726
  /**
2696
- * Integration details
2727
+ * The internal ID of the integration this record is linked to
2697
2728
  */
2698
2729
  id: string;
2699
2730
 
2700
2731
  /**
2701
- * Synced entity id
2732
+ * The external entity ID this record is linked to in the vendor system (e.g. the
2733
+ * Stripe customer ID). Null until the link has synced; required when creating the
2734
+ * link.
2702
2735
  */
2703
2736
  syncedEntityId: string | null;
2704
2737
 
2705
2738
  /**
2706
- * The vendor identifier of integration
2739
+ * The vendor identifier of the integration (e.g. STRIPE, SALESFORCE, SNOWFLAKE)
2707
2740
  */
2708
2741
  vendorIdentifier:
2709
2742
  | 'AUTH0'
@@ -2758,7 +2791,9 @@ export namespace CustomerUpdateParams {
2758
2791
  invoiceCustomFields?: { [key: string]: string };
2759
2792
 
2760
2793
  /**
2761
- * Additional metadata
2794
+ * Additional metadata to pass through to the billing provider on the customer's
2795
+ * record there. This is separate from the customer's own metadata field — it's
2796
+ * stored only on the billing-provider side, not on the Stigg customer object.
2762
2797
  */
2763
2798
  metadata?: { [key: string]: string };
2764
2799
 
@@ -2996,7 +3031,9 @@ export namespace CustomerUpdateParams {
2996
3031
  | 'xpf';
2997
3032
 
2998
3033
  /**
2999
- * Additional metadata
3034
+ * Additional metadata to pass through to the billing provider on the customer's
3035
+ * record there. This is separate from the customer's own metadata field — it's
3036
+ * stored only on the billing-provider side, not on the Stigg customer object.
3000
3037
  */
3001
3038
  metadata?: { [key: string]: string };
3002
3039
 
@@ -3167,7 +3204,7 @@ export interface CustomerImportParams {
3167
3204
  customers: Array<CustomerImportParams.Customer>;
3168
3205
 
3169
3206
  /**
3170
- * Body param: Integration details
3207
+ * Body param: The internal ID of the integration this record is linked to
3171
3208
  */
3172
3209
  integrationId?: string;
3173
3210
 
@@ -3208,12 +3245,19 @@ export namespace CustomerImportParams {
3208
3245
  billingId?: string;
3209
3246
 
3210
3247
  /**
3211
- * Additional metadata
3248
+ * Custom key-value metadata to attach to the customer. When creating a customer,
3249
+ * this sets the initial metadata. When updating a customer, this replaces the
3250
+ * customer's existing metadata object entirely — it is not merged key by key. Omit
3251
+ * this field on update to leave the customer's existing metadata untouched; pass
3252
+ * an empty object to clear it.
3212
3253
  */
3213
3254
  metadata?: { [key: string]: string };
3214
3255
 
3215
3256
  /**
3216
- * Billing provider payment method id
3257
+ * Billing provider payment method id. Attaching it makes it the customer's new
3258
+ * default payment method for future charges; any previously attached payment
3259
+ * method is no longer used as the default, though it is not removed from the
3260
+ * billing provider.
3217
3261
  */
3218
3262
  paymentMethodId?: string;
3219
3263
 
@@ -3467,7 +3511,11 @@ export interface CustomerProvisionParams {
3467
3511
  language?: string | null;
3468
3512
 
3469
3513
  /**
3470
- * Body param: Additional metadata
3514
+ * Body param: Custom key-value metadata to attach to the customer. When creating a
3515
+ * customer, this sets the initial metadata. When updating a customer, this
3516
+ * replaces the customer's existing metadata object entirely — it is not merged key
3517
+ * by key. Omit this field on update to leave the customer's existing metadata
3518
+ * untouched; pass an empty object to clear it.
3471
3519
  */
3472
3520
  metadata?: { [key: string]: string };
3473
3521
 
@@ -3528,25 +3576,29 @@ export namespace CustomerProvisionParams {
3528
3576
  /**
3529
3577
  * The default payment method type
3530
3578
  */
3531
- type: 'CARD' | 'BANK' | 'CASH_APP';
3579
+ type: 'CARD' | 'BANK' | 'CASH_APP' | 'PAYPAL' | null;
3532
3580
  }
3533
3581
 
3534
3582
  /**
3535
- * External billing or CRM integration link
3583
+ * Links this customer to their record in a specific configured integration (e.g.
3584
+ * their Stripe customer ID under your Stripe integration). A customer has at most
3585
+ * one link per integration.
3536
3586
  */
3537
3587
  export interface Integration {
3538
3588
  /**
3539
- * Integration details
3589
+ * The internal ID of the integration this record is linked to
3540
3590
  */
3541
3591
  id: string;
3542
3592
 
3543
3593
  /**
3544
- * Synced entity id
3594
+ * The external entity ID this record is linked to in the vendor system (e.g. the
3595
+ * Stripe customer ID). Null until the link has synced; required when creating the
3596
+ * link.
3545
3597
  */
3546
3598
  syncedEntityId: string | null;
3547
3599
 
3548
3600
  /**
3549
- * The vendor identifier of integration
3601
+ * The vendor identifier of the integration (e.g. STRIPE, SALESFORCE, SNOWFLAKE)
3550
3602
  */
3551
3603
  vendorIdentifier:
3552
3604
  | 'AUTH0'
@@ -3601,7 +3653,9 @@ export namespace CustomerProvisionParams {
3601
3653
  invoiceCustomFields?: { [key: string]: string };
3602
3654
 
3603
3655
  /**
3604
- * Additional metadata
3656
+ * Additional metadata to pass through to the billing provider on the customer's
3657
+ * record there. This is separate from the customer's own metadata field — it's
3658
+ * stored only on the billing-provider side, not on the Stigg customer object.
3605
3659
  */
3606
3660
  metadata?: { [key: string]: string };
3607
3661
 
@@ -3839,7 +3893,9 @@ export namespace CustomerProvisionParams {
3839
3893
  | 'xpf';
3840
3894
 
3841
3895
  /**
3842
- * Additional metadata
3896
+ * Additional metadata to pass through to the billing provider on the customer's
3897
+ * record there. This is separate from the customer's own metadata field — it's
3898
+ * stored only on the billing-provider side, not on the Stigg customer object.
3843
3899
  */
3844
3900
  metadata?: { [key: string]: string };
3845
3901
 
@@ -128,37 +128,27 @@ export class Integrations extends APIResource {
128
128
  export type IntegrationListResponsesMyCursorIDPage = MyCursorIDPage<IntegrationListResponse>;
129
129
 
130
130
  /**
131
- * External billing or CRM integration link
131
+ * Links this customer to their record in a specific configured integration (e.g.
132
+ * their Stripe customer ID under your Stripe integration). A customer has at most
133
+ * one link per integration.
132
134
  */
133
135
  export interface IntegrationListResponse {
134
136
  /**
135
- * Integration details
137
+ * The internal ID of the integration this record is linked to
136
138
  */
137
139
  id: string;
138
140
 
139
141
  /**
140
- * Synced entity id
142
+ * The external entity ID this record is linked to in the vendor system (e.g. the
143
+ * Stripe customer ID). Null until the link has synced; required when creating the
144
+ * link.
141
145
  */
142
146
  syncedEntityId: string | null;
143
147
 
144
148
  /**
145
- * The vendor identifier of integration
149
+ * The vendor whose system holds the customer record
146
150
  */
147
- vendorIdentifier:
148
- | 'AUTH0'
149
- | 'ZUORA'
150
- | 'STRIPE'
151
- | 'HUBSPOT'
152
- | 'AWS_MARKETPLACE'
153
- | 'SNOWFLAKE'
154
- | 'SALESFORCE'
155
- | 'BIG_QUERY'
156
- | 'OPEN_FGA'
157
- | 'APP_STORE'
158
- | 'RECEIVED'
159
- | 'PREQUEL'
160
- | 'AIRWALLEX'
161
- | 'STRIPE_INVOICING';
151
+ vendorIdentifier: 'STRIPE' | 'ZUORA' | 'HUBSPOT' | 'AWS_MARKETPLACE';
162
152
 
163
153
  /**
164
154
  * Price billing sync revision data containing billing ID, link URL, and price
@@ -246,7 +236,9 @@ export interface IntegrationUpdateParams {
246
236
  id: string;
247
237
 
248
238
  /**
249
- * Body param: Synced entity id
239
+ * Body param: The external entity ID this record is linked to in the vendor system
240
+ * (e.g. the Stripe customer ID). Null until the link has synced; required when
241
+ * creating the link.
250
242
  */
251
243
  syncedEntityId: string | null;
252
244
 
@@ -269,22 +261,7 @@ export interface IntegrationListParams extends MyCursorIDPageParams {
269
261
  * Query param: Filter by vendor identifier. Supports comma-separated values for
270
262
  * multiple vendors (e.g., STRIPE,HUBSPOT)
271
263
  */
272
- vendorIdentifier?: Array<
273
- | 'AUTH0'
274
- | 'ZUORA'
275
- | 'STRIPE'
276
- | 'HUBSPOT'
277
- | 'AWS_MARKETPLACE'
278
- | 'SNOWFLAKE'
279
- | 'SALESFORCE'
280
- | 'BIG_QUERY'
281
- | 'OPEN_FGA'
282
- | 'APP_STORE'
283
- | 'RECEIVED'
284
- | 'PREQUEL'
285
- | 'AIRWALLEX'
286
- | 'STRIPE_INVOICING'
287
- >;
264
+ vendorIdentifier?: Array<'STRIPE' | 'ZUORA' | 'HUBSPOT' | 'AWS_MARKETPLACE'>;
288
265
 
289
266
  /**
290
267
  * Header param: Account ID — optional when authenticating with a user JWT (Bearer
@@ -302,33 +279,21 @@ export interface IntegrationListParams extends MyCursorIDPageParams {
302
279
 
303
280
  export interface IntegrationLinkParams {
304
281
  /**
305
- * Body param: Integration details
282
+ * Body param: The internal ID of the integration this record is linked to
306
283
  */
307
284
  id: string;
308
285
 
309
286
  /**
310
- * Body param: Synced entity id
287
+ * Body param: The external entity ID this record is linked to in the vendor system
288
+ * (e.g. the Stripe customer ID). Null until the link has synced; required when
289
+ * creating the link.
311
290
  */
312
291
  syncedEntityId: string;
313
292
 
314
293
  /**
315
- * Body param: The vendor identifier of integration
294
+ * Body param: The vendor whose system holds the customer record
316
295
  */
317
- vendorIdentifier:
318
- | 'AUTH0'
319
- | 'ZUORA'
320
- | 'STRIPE'
321
- | 'HUBSPOT'
322
- | 'AWS_MARKETPLACE'
323
- | 'SNOWFLAKE'
324
- | 'SALESFORCE'
325
- | 'BIG_QUERY'
326
- | 'OPEN_FGA'
327
- | 'APP_STORE'
328
- | 'RECEIVED'
329
- | 'PREQUEL'
330
- | 'AIRWALLEX'
331
- | 'STRIPE_INVOICING';
296
+ vendorIdentifier: 'STRIPE' | 'ZUORA' | 'HUBSPOT' | 'AWS_MARKETPLACE';
332
297
 
333
298
  /**
334
299
  * Header param: Account ID — optional when authenticating with a user JWT (Bearer
@@ -59,17 +59,21 @@ export class PaymentMethod extends APIResource {
59
59
 
60
60
  export interface PaymentMethodAttachParams {
61
61
  /**
62
- * Body param: Integration details
62
+ * Body param: The internal ID of the integration this record is linked to
63
63
  */
64
64
  integrationId: string;
65
65
 
66
66
  /**
67
- * Body param: Billing provider payment method id
67
+ * Body param: Billing provider payment method id. Attaching it makes it the
68
+ * customer's new default payment method for future charges; any previously
69
+ * attached payment method is no longer used as the default, though it is not
70
+ * removed from the billing provider.
68
71
  */
69
72
  paymentMethodId: string;
70
73
 
71
74
  /**
72
- * Body param: The vendor identifier of integration
75
+ * Body param: The vendor identifier of the integration (e.g. STRIPE, SALESFORCE,
76
+ * SNOWFLAKE)
73
77
  */
74
78
  vendorIdentifier:
75
79
  | 'AUTH0'
@@ -95,7 +95,11 @@ export interface PromotionalEntitlementCreateResponse {
95
95
 
96
96
  export namespace PromotionalEntitlementCreateResponse {
97
97
  /**
98
- * Granted feature entitlement
98
+ * A feature entitlement granted to a customer outside of their subscription plan.
99
+ * Promotional entitlements are applied on top of whatever the subscription already
100
+ * grants and are not removed when a plan or subscription changes; once past their
101
+ * end date they keep appearing in the customer's entitlement list with an Expired
102
+ * status rather than disappearing.
99
103
  */
100
104
  export interface Data {
101
105
  /**
@@ -235,7 +239,11 @@ export namespace PromotionalEntitlementCreateResponse {
235
239
  }
236
240
 
237
241
  /**
238
- * Granted feature entitlement
242
+ * A feature entitlement granted to a customer outside of their subscription plan.
243
+ * Promotional entitlements are applied on top of whatever the subscription already
244
+ * grants and are not removed when a plan or subscription changes; once past their
245
+ * end date they keep appearing in the customer's entitlement list with an Expired
246
+ * status rather than disappearing.
239
247
  */
240
248
  export interface PromotionalEntitlementListResponse {
241
249
  /**
@@ -378,14 +386,22 @@ export namespace PromotionalEntitlementListResponse {
378
386
  */
379
387
  export interface PromotionalEntitlementRevokeResponse {
380
388
  /**
381
- * Granted feature entitlement
389
+ * A feature entitlement granted to a customer outside of their subscription plan.
390
+ * Promotional entitlements are applied on top of whatever the subscription already
391
+ * grants and are not removed when a plan or subscription changes; once past their
392
+ * end date they keep appearing in the customer's entitlement list with an Expired
393
+ * status rather than disappearing.
382
394
  */
383
395
  data: PromotionalEntitlementRevokeResponse.Data;
384
396
  }
385
397
 
386
398
  export namespace PromotionalEntitlementRevokeResponse {
387
399
  /**
388
- * Granted feature entitlement
400
+ * A feature entitlement granted to a customer outside of their subscription plan.
401
+ * Promotional entitlements are applied on top of whatever the subscription already
402
+ * grants and are not removed when a plan or subscription changes; once past their
403
+ * end date they keep appearing in the customer's entitlement list with an Expired
404
+ * status rather than disappearing.
389
405
  */
390
406
  export interface Data {
391
407
  /**
@@ -546,7 +562,9 @@ export interface PromotionalEntitlementCreateParams {
546
562
 
547
563
  export namespace PromotionalEntitlementCreateParams {
548
564
  /**
549
- * Single entitlement grant config
565
+ * Single entitlement grant config. Granting again for the same customer and
566
+ * feature replaces the existing promotional entitlement for that feature rather
567
+ * than stacking a second one.
550
568
  */
551
569
  export interface PromotionalEntitlement {
552
570
  /**