@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.
- package/CHANGELOG.md +33 -0
- package/package.json +1 -1
- package/resources/v1/addons/addons.d.mts +30 -13
- package/resources/v1/addons/addons.d.mts.map +1 -1
- package/resources/v1/addons/addons.d.ts +30 -13
- package/resources/v1/addons/addons.d.ts.map +1 -1
- package/resources/v1/addons/addons.js +5 -1
- package/resources/v1/addons/addons.js.map +1 -1
- package/resources/v1/addons/addons.mjs +5 -1
- package/resources/v1/addons/addons.mjs.map +1 -1
- package/resources/v1/contracts.d.mts +53 -14
- package/resources/v1/contracts.d.mts.map +1 -1
- package/resources/v1/contracts.d.ts +53 -14
- package/resources/v1/contracts.d.ts.map +1 -1
- package/resources/v1/contracts.js +3 -4
- package/resources/v1/contracts.js.map +1 -1
- package/resources/v1/contracts.mjs +3 -4
- package/resources/v1/contracts.mjs.map +1 -1
- package/resources/v1/coupons.d.mts +22 -9
- package/resources/v1/coupons.d.mts.map +1 -1
- package/resources/v1/coupons.d.ts +22 -9
- package/resources/v1/coupons.d.ts.map +1 -1
- package/resources/v1/credits/grants.d.mts +51 -14
- package/resources/v1/credits/grants.d.mts.map +1 -1
- package/resources/v1/credits/grants.d.ts +51 -14
- package/resources/v1/credits/grants.d.ts.map +1 -1
- package/resources/v1/customers/customers.d.mts +126 -57
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +126 -57
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +15 -16
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +15 -16
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/integrations.d.mts +19 -11
- package/resources/v1/customers/integrations.d.mts.map +1 -1
- package/resources/v1/customers/integrations.d.ts +19 -11
- package/resources/v1/customers/integrations.d.ts.map +1 -1
- package/resources/v1/customers/payment-method.d.mts +7 -3
- package/resources/v1/customers/payment-method.d.mts.map +1 -1
- package/resources/v1/customers/payment-method.d.ts +7 -3
- package/resources/v1/customers/payment-method.d.ts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.mts +23 -5
- package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.ts +23 -5
- package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -1
- package/resources/v1/events/data-export/data-export.d.mts +1 -61
- package/resources/v1/events/data-export/data-export.d.mts.map +1 -1
- package/resources/v1/events/data-export/data-export.d.ts +1 -61
- package/resources/v1/events/data-export/data-export.d.ts.map +1 -1
- package/resources/v1/events/data-export/data-export.js +0 -18
- package/resources/v1/events/data-export/data-export.js.map +1 -1
- package/resources/v1/events/data-export/data-export.mjs +0 -18
- package/resources/v1/events/data-export/data-export.mjs.map +1 -1
- package/resources/v1/events/data-export/index.d.mts +1 -1
- package/resources/v1/events/data-export/index.d.mts.map +1 -1
- package/resources/v1/events/data-export/index.d.ts +1 -1
- package/resources/v1/events/data-export/index.d.ts.map +1 -1
- package/resources/v1/events/data-export/index.js.map +1 -1
- package/resources/v1/events/data-export/index.mjs.map +1 -1
- package/resources/v1/events/events.d.mts +15 -7
- package/resources/v1/events/events.d.mts.map +1 -1
- package/resources/v1/events/events.d.ts +15 -7
- package/resources/v1/events/events.d.ts.map +1 -1
- package/resources/v1/events/events.js +2 -2
- package/resources/v1/events/events.js.map +1 -1
- package/resources/v1/events/events.mjs +2 -2
- package/resources/v1/events/events.mjs.map +1 -1
- package/resources/v1/events/index.d.mts +1 -1
- package/resources/v1/events/index.d.mts.map +1 -1
- package/resources/v1/events/index.d.ts +1 -1
- package/resources/v1/events/index.d.ts.map +1 -1
- package/resources/v1/events/index.js.map +1 -1
- package/resources/v1/events/index.mjs.map +1 -1
- package/resources/v1/features.d.mts +222 -7
- package/resources/v1/features.d.mts.map +1 -1
- package/resources/v1/features.d.ts +222 -7
- package/resources/v1/features.d.ts.map +1 -1
- package/resources/v1/plans/plans.d.mts +62 -22
- package/resources/v1/plans/plans.d.mts.map +1 -1
- package/resources/v1/plans/plans.d.ts +62 -22
- package/resources/v1/plans/plans.d.ts.map +1 -1
- package/resources/v1/plans/plans.js +5 -1
- package/resources/v1/plans/plans.js.map +1 -1
- package/resources/v1/plans/plans.mjs +5 -1
- package/resources/v1/plans/plans.mjs.map +1 -1
- package/resources/v1/products.d.mts +15 -7
- package/resources/v1/products.d.mts.map +1 -1
- package/resources/v1/products.d.ts +15 -7
- package/resources/v1/products.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.mts +66 -22
- package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.ts +66 -22
- package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.js +11 -3
- package/resources/v1/subscriptions/subscriptions.js.map +1 -1
- package/resources/v1/subscriptions/subscriptions.mjs +11 -3
- package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
- package/resources/v1/usage.d.mts +32 -9
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts +32 -9
- package/resources/v1/usage.d.ts.map +1 -1
- package/src/resources/v1/addons/addons.ts +30 -13
- package/src/resources/v1/contracts.ts +61 -15
- package/src/resources/v1/coupons.ts +22 -9
- package/src/resources/v1/credits/grants.ts +51 -14
- package/src/resources/v1/customers/customers.ts +127 -71
- package/src/resources/v1/customers/integrations.ts +19 -54
- package/src/resources/v1/customers/payment-method.ts +7 -3
- package/src/resources/v1/customers/promotional-entitlements.ts +23 -5
- package/src/resources/v1/events/data-export/data-export.ts +0 -86
- package/src/resources/v1/events/data-export/index.ts +0 -2
- package/src/resources/v1/events/events.ts +13 -9
- package/src/resources/v1/events/index.ts +0 -2
- package/src/resources/v1/features.ts +288 -7
- package/src/resources/v1/plans/plans.ts +62 -22
- package/src/resources/v1/products.ts +15 -7
- package/src/resources/v1/subscriptions/subscriptions.ts +68 -22
- package/src/resources/v1/usage.ts +32 -9
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -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
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
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
|
|
174
|
-
*
|
|
175
|
-
*
|
|
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
|
-
*
|
|
276
|
-
*
|
|
277
|
-
*
|
|
278
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
346
|
+
* The internal ID of the integration this record is linked to
|
|
344
347
|
*/
|
|
345
348
|
id: string;
|
|
346
349
|
|
|
347
350
|
/**
|
|
348
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
672
|
+
* The internal ID of the integration this record is linked to
|
|
676
673
|
*/
|
|
677
674
|
id: string;
|
|
678
675
|
|
|
679
676
|
/**
|
|
680
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
1270
|
+
* The internal ID of the integration this record is linked to
|
|
1262
1271
|
*/
|
|
1263
1272
|
id: string;
|
|
1264
1273
|
|
|
1265
1274
|
/**
|
|
1266
|
-
*
|
|
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:
|
|
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
|
-
*
|
|
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
|
-
*
|
|
2727
|
+
* The internal ID of the integration this record is linked to
|
|
2697
2728
|
*/
|
|
2698
2729
|
id: string;
|
|
2699
2730
|
|
|
2700
2731
|
/**
|
|
2701
|
-
*
|
|
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:
|
|
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
|
-
*
|
|
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:
|
|
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
|
-
*
|
|
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
|
-
*
|
|
3589
|
+
* The internal ID of the integration this record is linked to
|
|
3540
3590
|
*/
|
|
3541
3591
|
id: string;
|
|
3542
3592
|
|
|
3543
3593
|
/**
|
|
3544
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
137
|
+
* The internal ID of the integration this record is linked to
|
|
136
138
|
*/
|
|
137
139
|
id: string;
|
|
138
140
|
|
|
139
141
|
/**
|
|
140
|
-
*
|
|
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
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
|
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:
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
/**
|