@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.
- package/CHANGELOG.md +15 -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 +35 -4
- package/resources/v1/contracts.d.mts.map +1 -1
- package/resources/v1/contracts.d.ts +35 -4
- package/resources/v1/contracts.d.ts.map +1 -1
- package/resources/v1/coupons.d.mts +18 -9
- package/resources/v1/coupons.d.mts.map +1 -1
- package/resources/v1/coupons.d.ts +18 -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 +119 -49
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +119 -49
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +12 -12
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +12 -12
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/integrations.d.mts +17 -8
- package/resources/v1/customers/integrations.d.mts.map +1 -1
- package/resources/v1/customers/integrations.d.ts +17 -8
- 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/events.d.mts +13 -5
- package/resources/v1/events/events.d.mts.map +1 -1
- package/resources/v1/events/events.d.ts +13 -5
- 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/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 +41 -4
- package/src/resources/v1/coupons.ts +18 -9
- package/src/resources/v1/credits/grants.ts +51 -14
- package/src/resources/v1/customers/customers.ts +120 -49
- package/src/resources/v1/customers/integrations.ts +17 -8
- 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/events.ts +13 -5
- 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,
|
|
@@ -270,12 +270,12 @@ export class Customers extends APIResource {
|
|
|
270
270
|
|
|
271
271
|
/**
|
|
272
272
|
* Retrieves the effective entitlements for a customer or resource, including
|
|
273
|
-
* feature and credit entitlements.
|
|
274
|
-
*
|
|
275
|
-
*
|
|
276
|
-
*
|
|
277
|
-
*
|
|
278
|
-
*
|
|
273
|
+
* feature and credit entitlements. Each call reaches the Stigg API directly, so
|
|
274
|
+
* latency reflects a network round trip. For entitlement checks on a hot path
|
|
275
|
+
* (e.g. gating a request in real time), the Stigg Node Server SDK (with its
|
|
276
|
+
* built-in cache) or the Sidecar will typically respond faster and keep working
|
|
277
|
+
* through brief Stigg outages; reach for this endpoint when a live HTTP call is
|
|
278
|
+
* the natural fit, such as from a non-Node backend or a server-side job.
|
|
279
279
|
*/
|
|
280
280
|
retrieveEntitlements(
|
|
281
281
|
id: string,
|
|
@@ -329,28 +329,34 @@ export type CustomerListResourcesResponsesMyCursorIDPage = MyCursorIDPage<Custom
|
|
|
329
329
|
*/
|
|
330
330
|
export interface CustomerIntegrationResponse {
|
|
331
331
|
/**
|
|
332
|
-
*
|
|
332
|
+
* Links this customer to their record in a specific configured integration (e.g.
|
|
333
|
+
* their Stripe customer ID under your Stripe integration). A customer has at most
|
|
334
|
+
* one link per integration.
|
|
333
335
|
*/
|
|
334
336
|
data: CustomerIntegrationResponse.Data;
|
|
335
337
|
}
|
|
336
338
|
|
|
337
339
|
export namespace CustomerIntegrationResponse {
|
|
338
340
|
/**
|
|
339
|
-
*
|
|
341
|
+
* Links this customer to their record in a specific configured integration (e.g.
|
|
342
|
+
* their Stripe customer ID under your Stripe integration). A customer has at most
|
|
343
|
+
* one link per integration.
|
|
340
344
|
*/
|
|
341
345
|
export interface Data {
|
|
342
346
|
/**
|
|
343
|
-
*
|
|
347
|
+
* The internal ID of the integration this record is linked to
|
|
344
348
|
*/
|
|
345
349
|
id: string;
|
|
346
350
|
|
|
347
351
|
/**
|
|
348
|
-
*
|
|
352
|
+
* The external entity ID this record is linked to in the vendor system (e.g. the
|
|
353
|
+
* Stripe customer ID). Null until the link has synced; required when creating the
|
|
354
|
+
* link.
|
|
349
355
|
*/
|
|
350
356
|
syncedEntityId: string | null;
|
|
351
357
|
|
|
352
358
|
/**
|
|
353
|
-
* The vendor identifier of integration
|
|
359
|
+
* The vendor identifier of the integration (e.g. STRIPE, SALESFORCE, SNOWFLAKE)
|
|
354
360
|
*/
|
|
355
361
|
vendorIdentifier:
|
|
356
362
|
| 'AUTH0'
|
|
@@ -616,7 +622,11 @@ export namespace CustomerResponse {
|
|
|
616
622
|
language?: string | null;
|
|
617
623
|
|
|
618
624
|
/**
|
|
619
|
-
*
|
|
625
|
+
* Custom key-value metadata to attach to the customer. When creating a customer,
|
|
626
|
+
* this sets the initial metadata. When updating a customer, this replaces the
|
|
627
|
+
* customer's existing metadata object entirely — it is not merged key by key. Omit
|
|
628
|
+
* this field on update to leave the customer's existing metadata untouched; pass
|
|
629
|
+
* an empty object to clear it.
|
|
620
630
|
*/
|
|
621
631
|
metadata?: { [key: string]: string };
|
|
622
632
|
|
|
@@ -668,21 +678,25 @@ export namespace CustomerResponse {
|
|
|
668
678
|
}
|
|
669
679
|
|
|
670
680
|
/**
|
|
671
|
-
*
|
|
681
|
+
* Links this customer to their record in a specific configured integration (e.g.
|
|
682
|
+
* their Stripe customer ID under your Stripe integration). A customer has at most
|
|
683
|
+
* one link per integration.
|
|
672
684
|
*/
|
|
673
685
|
export interface Integration {
|
|
674
686
|
/**
|
|
675
|
-
*
|
|
687
|
+
* The internal ID of the integration this record is linked to
|
|
676
688
|
*/
|
|
677
689
|
id: string;
|
|
678
690
|
|
|
679
691
|
/**
|
|
680
|
-
*
|
|
692
|
+
* The external entity ID this record is linked to in the vendor system (e.g. the
|
|
693
|
+
* Stripe customer ID). Null until the link has synced; required when creating the
|
|
694
|
+
* link.
|
|
681
695
|
*/
|
|
682
696
|
syncedEntityId: string | null;
|
|
683
697
|
|
|
684
698
|
/**
|
|
685
|
-
* The vendor identifier of integration
|
|
699
|
+
* The vendor identifier of the integration (e.g. STRIPE, SALESFORCE, SNOWFLAKE)
|
|
686
700
|
*/
|
|
687
701
|
vendorIdentifier:
|
|
688
702
|
| 'AUTH0'
|
|
@@ -737,7 +751,9 @@ export namespace CustomerResponse {
|
|
|
737
751
|
invoiceCustomFields?: { [key: string]: string };
|
|
738
752
|
|
|
739
753
|
/**
|
|
740
|
-
* Additional metadata
|
|
754
|
+
* Additional metadata to pass through to the billing provider on the customer's
|
|
755
|
+
* record there. This is separate from the customer's own metadata field — it's
|
|
756
|
+
* stored only on the billing-provider side, not on the Stigg customer object.
|
|
741
757
|
*/
|
|
742
758
|
metadata?: { [key: string]: string };
|
|
743
759
|
|
|
@@ -975,7 +991,9 @@ export namespace CustomerResponse {
|
|
|
975
991
|
| 'xpf';
|
|
976
992
|
|
|
977
993
|
/**
|
|
978
|
-
* Additional metadata
|
|
994
|
+
* Additional metadata to pass through to the billing provider on the customer's
|
|
995
|
+
* record there. This is separate from the customer's own metadata field — it's
|
|
996
|
+
* stored only on the billing-provider side, not on the Stigg customer object.
|
|
979
997
|
*/
|
|
980
998
|
metadata?: { [key: string]: string };
|
|
981
999
|
|
|
@@ -1202,7 +1220,11 @@ export interface CustomerListResponse {
|
|
|
1202
1220
|
language?: string | null;
|
|
1203
1221
|
|
|
1204
1222
|
/**
|
|
1205
|
-
*
|
|
1223
|
+
* Custom key-value metadata to attach to the customer. When creating a customer,
|
|
1224
|
+
* this sets the initial metadata. When updating a customer, this replaces the
|
|
1225
|
+
* customer's existing metadata object entirely — it is not merged key by key. Omit
|
|
1226
|
+
* this field on update to leave the customer's existing metadata untouched; pass
|
|
1227
|
+
* an empty object to clear it.
|
|
1206
1228
|
*/
|
|
1207
1229
|
metadata?: { [key: string]: string };
|
|
1208
1230
|
|
|
@@ -1254,21 +1276,25 @@ export namespace CustomerListResponse {
|
|
|
1254
1276
|
}
|
|
1255
1277
|
|
|
1256
1278
|
/**
|
|
1257
|
-
*
|
|
1279
|
+
* Links this customer to their record in a specific configured integration (e.g.
|
|
1280
|
+
* their Stripe customer ID under your Stripe integration). A customer has at most
|
|
1281
|
+
* one link per integration.
|
|
1258
1282
|
*/
|
|
1259
1283
|
export interface Integration {
|
|
1260
1284
|
/**
|
|
1261
|
-
*
|
|
1285
|
+
* The internal ID of the integration this record is linked to
|
|
1262
1286
|
*/
|
|
1263
1287
|
id: string;
|
|
1264
1288
|
|
|
1265
1289
|
/**
|
|
1266
|
-
*
|
|
1290
|
+
* The external entity ID this record is linked to in the vendor system (e.g. the
|
|
1291
|
+
* Stripe customer ID). Null until the link has synced; required when creating the
|
|
1292
|
+
* link.
|
|
1267
1293
|
*/
|
|
1268
1294
|
syncedEntityId: string | null;
|
|
1269
1295
|
|
|
1270
1296
|
/**
|
|
1271
|
-
* The vendor identifier of integration
|
|
1297
|
+
* The vendor identifier of the integration (e.g. STRIPE, SALESFORCE, SNOWFLAKE)
|
|
1272
1298
|
*/
|
|
1273
1299
|
vendorIdentifier:
|
|
1274
1300
|
| 'AUTH0'
|
|
@@ -1323,7 +1349,9 @@ export namespace CustomerListResponse {
|
|
|
1323
1349
|
invoiceCustomFields?: { [key: string]: string };
|
|
1324
1350
|
|
|
1325
1351
|
/**
|
|
1326
|
-
* Additional metadata
|
|
1352
|
+
* Additional metadata to pass through to the billing provider on the customer's
|
|
1353
|
+
* record there. This is separate from the customer's own metadata field — it's
|
|
1354
|
+
* stored only on the billing-provider side, not on the Stigg customer object.
|
|
1327
1355
|
*/
|
|
1328
1356
|
metadata?: { [key: string]: string };
|
|
1329
1357
|
|
|
@@ -1561,7 +1589,9 @@ export namespace CustomerListResponse {
|
|
|
1561
1589
|
| 'xpf';
|
|
1562
1590
|
|
|
1563
1591
|
/**
|
|
1564
|
-
* Additional metadata
|
|
1592
|
+
* Additional metadata to pass through to the billing provider on the customer's
|
|
1593
|
+
* record there. This is separate from the customer's own metadata field — it's
|
|
1594
|
+
* stored only on the billing-provider side, not on the Stigg customer object.
|
|
1565
1595
|
*/
|
|
1566
1596
|
metadata?: { [key: string]: string };
|
|
1567
1597
|
|
|
@@ -1986,6 +2016,11 @@ export namespace CustomerListContractsResponse {
|
|
|
1986
2016
|
*/
|
|
1987
2017
|
dueDate: string | null;
|
|
1988
2018
|
|
|
2019
|
+
/**
|
|
2020
|
+
* The billing provider ID of the draft invoice this preview describes
|
|
2021
|
+
*/
|
|
2022
|
+
invoiceId: string | null;
|
|
2023
|
+
|
|
1989
2024
|
/**
|
|
1990
2025
|
* The end of the billing period the upcoming invoice covers
|
|
1991
2026
|
*/
|
|
@@ -2268,7 +2303,12 @@ export namespace CustomerListInvoicesResponse {
|
|
|
2268
2303
|
}
|
|
2269
2304
|
|
|
2270
2305
|
/**
|
|
2271
|
-
* Resource object that belongs to a customer
|
|
2306
|
+
* Resource object that belongs to a customer, used to scope subscriptions and
|
|
2307
|
+
* entitlements to a specific instance within the customer's account (e.g. a
|
|
2308
|
+
* website, project, or workspace) for multi-resource pricing. A resource is
|
|
2309
|
+
* identified only by its resourceId — there's no separate display name or metadata
|
|
2310
|
+
* field on the resource itself; if you need to attach descriptive data, keep it in
|
|
2311
|
+
* your own system keyed by resourceId.
|
|
2272
2312
|
*/
|
|
2273
2313
|
export interface CustomerListResourcesResponse {
|
|
2274
2314
|
/**
|
|
@@ -2654,7 +2694,11 @@ export interface CustomerUpdateParams {
|
|
|
2654
2694
|
language?: string | null;
|
|
2655
2695
|
|
|
2656
2696
|
/**
|
|
2657
|
-
* Body param:
|
|
2697
|
+
* Body param: Custom key-value metadata to attach to the customer. When creating a
|
|
2698
|
+
* customer, this sets the initial metadata. When updating a customer, this
|
|
2699
|
+
* replaces the customer's existing metadata object entirely — it is not merged key
|
|
2700
|
+
* by key. Omit this field on update to leave the customer's existing metadata
|
|
2701
|
+
* untouched; pass an empty object to clear it.
|
|
2658
2702
|
*/
|
|
2659
2703
|
metadata?: { [key: string]: string };
|
|
2660
2704
|
|
|
@@ -2689,21 +2733,25 @@ export interface CustomerUpdateParams {
|
|
|
2689
2733
|
|
|
2690
2734
|
export namespace CustomerUpdateParams {
|
|
2691
2735
|
/**
|
|
2692
|
-
*
|
|
2736
|
+
* Links this customer to their record in a specific configured integration (e.g.
|
|
2737
|
+
* their Stripe customer ID under your Stripe integration). A customer has at most
|
|
2738
|
+
* one link per integration.
|
|
2693
2739
|
*/
|
|
2694
2740
|
export interface Integration {
|
|
2695
2741
|
/**
|
|
2696
|
-
*
|
|
2742
|
+
* The internal ID of the integration this record is linked to
|
|
2697
2743
|
*/
|
|
2698
2744
|
id: string;
|
|
2699
2745
|
|
|
2700
2746
|
/**
|
|
2701
|
-
*
|
|
2747
|
+
* The external entity ID this record is linked to in the vendor system (e.g. the
|
|
2748
|
+
* Stripe customer ID). Null until the link has synced; required when creating the
|
|
2749
|
+
* link.
|
|
2702
2750
|
*/
|
|
2703
2751
|
syncedEntityId: string | null;
|
|
2704
2752
|
|
|
2705
2753
|
/**
|
|
2706
|
-
* The vendor identifier of integration
|
|
2754
|
+
* The vendor identifier of the integration (e.g. STRIPE, SALESFORCE, SNOWFLAKE)
|
|
2707
2755
|
*/
|
|
2708
2756
|
vendorIdentifier:
|
|
2709
2757
|
| 'AUTH0'
|
|
@@ -2758,7 +2806,9 @@ export namespace CustomerUpdateParams {
|
|
|
2758
2806
|
invoiceCustomFields?: { [key: string]: string };
|
|
2759
2807
|
|
|
2760
2808
|
/**
|
|
2761
|
-
* Additional metadata
|
|
2809
|
+
* Additional metadata to pass through to the billing provider on the customer's
|
|
2810
|
+
* record there. This is separate from the customer's own metadata field — it's
|
|
2811
|
+
* stored only on the billing-provider side, not on the Stigg customer object.
|
|
2762
2812
|
*/
|
|
2763
2813
|
metadata?: { [key: string]: string };
|
|
2764
2814
|
|
|
@@ -2996,7 +3046,9 @@ export namespace CustomerUpdateParams {
|
|
|
2996
3046
|
| 'xpf';
|
|
2997
3047
|
|
|
2998
3048
|
/**
|
|
2999
|
-
* Additional metadata
|
|
3049
|
+
* Additional metadata to pass through to the billing provider on the customer's
|
|
3050
|
+
* record there. This is separate from the customer's own metadata field — it's
|
|
3051
|
+
* stored only on the billing-provider side, not on the Stigg customer object.
|
|
3000
3052
|
*/
|
|
3001
3053
|
metadata?: { [key: string]: string };
|
|
3002
3054
|
|
|
@@ -3167,7 +3219,7 @@ export interface CustomerImportParams {
|
|
|
3167
3219
|
customers: Array<CustomerImportParams.Customer>;
|
|
3168
3220
|
|
|
3169
3221
|
/**
|
|
3170
|
-
* Body param:
|
|
3222
|
+
* Body param: The internal ID of the integration this record is linked to
|
|
3171
3223
|
*/
|
|
3172
3224
|
integrationId?: string;
|
|
3173
3225
|
|
|
@@ -3208,12 +3260,19 @@ export namespace CustomerImportParams {
|
|
|
3208
3260
|
billingId?: string;
|
|
3209
3261
|
|
|
3210
3262
|
/**
|
|
3211
|
-
*
|
|
3263
|
+
* Custom key-value metadata to attach to the customer. When creating a customer,
|
|
3264
|
+
* this sets the initial metadata. When updating a customer, this replaces the
|
|
3265
|
+
* customer's existing metadata object entirely — it is not merged key by key. Omit
|
|
3266
|
+
* this field on update to leave the customer's existing metadata untouched; pass
|
|
3267
|
+
* an empty object to clear it.
|
|
3212
3268
|
*/
|
|
3213
3269
|
metadata?: { [key: string]: string };
|
|
3214
3270
|
|
|
3215
3271
|
/**
|
|
3216
|
-
* Billing provider payment method id
|
|
3272
|
+
* Billing provider payment method id. Attaching it makes it the customer's new
|
|
3273
|
+
* default payment method for future charges; any previously attached payment
|
|
3274
|
+
* method is no longer used as the default, though it is not removed from the
|
|
3275
|
+
* billing provider.
|
|
3217
3276
|
*/
|
|
3218
3277
|
paymentMethodId?: string;
|
|
3219
3278
|
|
|
@@ -3467,7 +3526,11 @@ export interface CustomerProvisionParams {
|
|
|
3467
3526
|
language?: string | null;
|
|
3468
3527
|
|
|
3469
3528
|
/**
|
|
3470
|
-
* Body param:
|
|
3529
|
+
* Body param: Custom key-value metadata to attach to the customer. When creating a
|
|
3530
|
+
* customer, this sets the initial metadata. When updating a customer, this
|
|
3531
|
+
* replaces the customer's existing metadata object entirely — it is not merged key
|
|
3532
|
+
* by key. Omit this field on update to leave the customer's existing metadata
|
|
3533
|
+
* untouched; pass an empty object to clear it.
|
|
3471
3534
|
*/
|
|
3472
3535
|
metadata?: { [key: string]: string };
|
|
3473
3536
|
|
|
@@ -3532,21 +3595,25 @@ export namespace CustomerProvisionParams {
|
|
|
3532
3595
|
}
|
|
3533
3596
|
|
|
3534
3597
|
/**
|
|
3535
|
-
*
|
|
3598
|
+
* Links this customer to their record in a specific configured integration (e.g.
|
|
3599
|
+
* their Stripe customer ID under your Stripe integration). A customer has at most
|
|
3600
|
+
* one link per integration.
|
|
3536
3601
|
*/
|
|
3537
3602
|
export interface Integration {
|
|
3538
3603
|
/**
|
|
3539
|
-
*
|
|
3604
|
+
* The internal ID of the integration this record is linked to
|
|
3540
3605
|
*/
|
|
3541
3606
|
id: string;
|
|
3542
3607
|
|
|
3543
3608
|
/**
|
|
3544
|
-
*
|
|
3609
|
+
* The external entity ID this record is linked to in the vendor system (e.g. the
|
|
3610
|
+
* Stripe customer ID). Null until the link has synced; required when creating the
|
|
3611
|
+
* link.
|
|
3545
3612
|
*/
|
|
3546
3613
|
syncedEntityId: string | null;
|
|
3547
3614
|
|
|
3548
3615
|
/**
|
|
3549
|
-
* The vendor identifier of integration
|
|
3616
|
+
* The vendor identifier of the integration (e.g. STRIPE, SALESFORCE, SNOWFLAKE)
|
|
3550
3617
|
*/
|
|
3551
3618
|
vendorIdentifier:
|
|
3552
3619
|
| 'AUTH0'
|
|
@@ -3601,7 +3668,9 @@ export namespace CustomerProvisionParams {
|
|
|
3601
3668
|
invoiceCustomFields?: { [key: string]: string };
|
|
3602
3669
|
|
|
3603
3670
|
/**
|
|
3604
|
-
* Additional metadata
|
|
3671
|
+
* Additional metadata to pass through to the billing provider on the customer's
|
|
3672
|
+
* record there. This is separate from the customer's own metadata field — it's
|
|
3673
|
+
* stored only on the billing-provider side, not on the Stigg customer object.
|
|
3605
3674
|
*/
|
|
3606
3675
|
metadata?: { [key: string]: string };
|
|
3607
3676
|
|
|
@@ -3839,7 +3908,9 @@ export namespace CustomerProvisionParams {
|
|
|
3839
3908
|
| 'xpf';
|
|
3840
3909
|
|
|
3841
3910
|
/**
|
|
3842
|
-
* Additional metadata
|
|
3911
|
+
* Additional metadata to pass through to the billing provider on the customer's
|
|
3912
|
+
* record there. This is separate from the customer's own metadata field — it's
|
|
3913
|
+
* stored only on the billing-provider side, not on the Stigg customer object.
|
|
3843
3914
|
*/
|
|
3844
3915
|
metadata?: { [key: string]: string };
|
|
3845
3916
|
|
|
@@ -128,21 +128,25 @@ 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 identifier of integration
|
|
149
|
+
* The vendor identifier of the integration (e.g. STRIPE, SALESFORCE, SNOWFLAKE)
|
|
146
150
|
*/
|
|
147
151
|
vendorIdentifier:
|
|
148
152
|
| 'AUTH0'
|
|
@@ -246,7 +250,9 @@ export interface IntegrationUpdateParams {
|
|
|
246
250
|
id: string;
|
|
247
251
|
|
|
248
252
|
/**
|
|
249
|
-
* Body param:
|
|
253
|
+
* Body param: The external entity ID this record is linked to in the vendor system
|
|
254
|
+
* (e.g. the Stripe customer ID). Null until the link has synced; required when
|
|
255
|
+
* creating the link.
|
|
250
256
|
*/
|
|
251
257
|
syncedEntityId: string | null;
|
|
252
258
|
|
|
@@ -302,17 +308,20 @@ export interface IntegrationListParams extends MyCursorIDPageParams {
|
|
|
302
308
|
|
|
303
309
|
export interface IntegrationLinkParams {
|
|
304
310
|
/**
|
|
305
|
-
* Body param:
|
|
311
|
+
* Body param: The internal ID of the integration this record is linked to
|
|
306
312
|
*/
|
|
307
313
|
id: string;
|
|
308
314
|
|
|
309
315
|
/**
|
|
310
|
-
* Body param:
|
|
316
|
+
* Body param: The external entity ID this record is linked to in the vendor system
|
|
317
|
+
* (e.g. the Stripe customer ID). Null until the link has synced; required when
|
|
318
|
+
* creating the link.
|
|
311
319
|
*/
|
|
312
320
|
syncedEntityId: string;
|
|
313
321
|
|
|
314
322
|
/**
|
|
315
|
-
* Body param: The vendor identifier of integration
|
|
323
|
+
* Body param: The vendor identifier of the integration (e.g. STRIPE, SALESFORCE,
|
|
324
|
+
* SNOWFLAKE)
|
|
316
325
|
*/
|
|
317
326
|
vendorIdentifier:
|
|
318
327
|
| 'AUTH0'
|
|
@@ -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
|
/**
|
|
@@ -45,8 +45,8 @@ export class Events extends APIResource {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
|
-
* Reports raw usage events for event-based metering. Events are
|
|
49
|
-
*
|
|
48
|
+
* Reports raw usage events for event-based metering. Events are validated and
|
|
49
|
+
* stored synchronously, then aggregated into usage totals asynchronously.
|
|
50
50
|
*/
|
|
51
51
|
report(params: EventReportParams, options?: RequestOptions): APIPromise<EventReportResponse> {
|
|
52
52
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
@@ -172,7 +172,10 @@ export interface EventEstimateParams {
|
|
|
172
172
|
dimensions?: { [key: string]: string | number | boolean };
|
|
173
173
|
|
|
174
174
|
/**
|
|
175
|
-
* Body param:
|
|
175
|
+
* Body param: The customer resource this usage applies to. Optional — only
|
|
176
|
+
* required if the customer has multiple resources (for example, one subscription
|
|
177
|
+
* per workspace or site) and usage needs to be tracked separately per resource;
|
|
178
|
+
* omit it to report usage at the customer level.
|
|
176
179
|
*/
|
|
177
180
|
resourceId?: string | null;
|
|
178
181
|
|
|
@@ -226,7 +229,9 @@ export namespace EventReportParams {
|
|
|
226
229
|
eventName: string;
|
|
227
230
|
|
|
228
231
|
/**
|
|
229
|
-
*
|
|
232
|
+
* A key you provide to safely retry the same usage report without double-counting
|
|
233
|
+
* it. Reports with a previously-seen idempotency key are deduplicated for 7 days;
|
|
234
|
+
* after that window a retry is treated as new usage.
|
|
230
235
|
*/
|
|
231
236
|
idempotencyKey: string;
|
|
232
237
|
|
|
@@ -236,7 +241,10 @@ export namespace EventReportParams {
|
|
|
236
241
|
dimensions?: { [key: string]: string | number | boolean };
|
|
237
242
|
|
|
238
243
|
/**
|
|
239
|
-
*
|
|
244
|
+
* The customer resource this usage applies to. Optional — only required if the
|
|
245
|
+
* customer has multiple resources (for example, one subscription per workspace or
|
|
246
|
+
* site) and usage needs to be tracked separately per resource; omit it to report
|
|
247
|
+
* usage at the customer level.
|
|
240
248
|
*/
|
|
241
249
|
resourceId?: string | null;
|
|
242
250
|
|