@stigg/typescript 0.1.0-beta.56 → 0.1.0-beta.58
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 +83 -0
- package/client.d.mts +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/v1/contracts.d.mts +18 -10
- package/resources/v1/contracts.d.mts.map +1 -1
- package/resources/v1/contracts.d.ts +18 -10
- 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 +10 -6
- package/resources/v1/coupons.d.mts.map +1 -1
- package/resources/v1/coupons.d.ts +10 -6
- package/resources/v1/coupons.d.ts.map +1 -1
- package/resources/v1/credits/consumption.d.mts +50 -0
- package/resources/v1/credits/consumption.d.mts.map +1 -1
- package/resources/v1/credits/consumption.d.ts +50 -0
- package/resources/v1/credits/consumption.d.ts.map +1 -1
- package/resources/v1/customers/customers.d.mts +28 -9
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +28 -9
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +3 -4
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +3 -4
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/integrations.d.mts +5 -6
- package/resources/v1/customers/integrations.d.mts.map +1 -1
- package/resources/v1/customers/integrations.d.ts +5 -6
- package/resources/v1/customers/integrations.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 +2 -2
- package/resources/v1/events/events.d.mts.map +1 -1
- package/resources/v1/events/events.d.ts +2 -2
- package/resources/v1/events/events.d.ts.map +1 -1
- package/resources/v1/events/events.js.map +1 -1
- 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/usage.d.mts +4 -1
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts +4 -1
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.js +4 -1
- package/resources/v1/usage.js.map +1 -1
- package/resources/v1/usage.mjs +4 -1
- package/resources/v1/usage.mjs.map +1 -1
- package/resources/v2/index.d.mts +3 -0
- package/resources/v2/index.d.mts.map +1 -0
- package/resources/v2/index.d.ts +3 -0
- package/resources/v2/index.d.ts.map +1 -0
- package/resources/v2/index.js +9 -0
- package/resources/v2/index.js.map +1 -0
- package/resources/v2/index.mjs +4 -0
- package/resources/v2/index.mjs.map +1 -0
- package/resources/v2/usage.d.mts +284 -0
- package/resources/v2/usage.d.mts.map +1 -0
- package/resources/v2/usage.d.ts +284 -0
- package/resources/v2/usage.d.ts.map +1 -0
- package/resources/v2/usage.js +32 -0
- package/resources/v2/usage.js.map +1 -0
- package/resources/v2/usage.mjs +28 -0
- package/resources/v2/usage.mjs.map +1 -0
- package/resources/v2/v2.d.mts +10 -0
- package/resources/v2/v2.d.mts.map +1 -0
- package/resources/v2/v2.d.ts +10 -0
- package/resources/v2/v2.d.ts.map +1 -0
- package/resources/v2/v2.js +17 -0
- package/resources/v2/v2.js.map +1 -0
- package/resources/v2/v2.mjs +12 -0
- package/resources/v2/v2.mjs.map +1 -0
- package/resources/v2.d.mts +2 -0
- package/resources/v2.d.mts.map +1 -0
- package/resources/v2.d.ts +2 -0
- package/resources/v2.d.ts.map +1 -0
- package/resources/v2.js +6 -0
- package/resources/v2.js.map +1 -0
- package/resources/v2.mjs +3 -0
- package/resources/v2.mjs.map +1 -0
- package/src/client.ts +5 -0
- package/src/resources/index.ts +1 -0
- package/src/resources/v1/contracts.ts +20 -11
- package/src/resources/v1/coupons.ts +10 -6
- package/src/resources/v1/credits/consumption.ts +60 -0
- package/src/resources/v1/customers/customers.ts +32 -23
- package/src/resources/v1/customers/integrations.ts +5 -49
- 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 +0 -4
- package/src/resources/v1/events/index.ts +0 -2
- package/src/resources/v1/usage.ts +4 -1
- package/src/resources/v2/index.ts +4 -0
- package/src/resources/v2/usage.ts +344 -0
- package/src/resources/v2/v2.ts +19 -0
- package/src/resources/v2.ts +3 -0
- 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v2.d.ts","sourceRoot":"","sources":["../../src/resources/v2/v2.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,QAAQ,mBAAgB;AACpC,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,mBAAgB;AAExE,qBAAa,EAAG,SAAQ,WAAW;IACjC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;CAC1D;AAID,MAAM,CAAC,OAAO,WAAW,EAAE,CAAC;IAC1B,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.V2 = void 0;
|
|
5
|
+
const tslib_1 = require("../../internal/tslib.js");
|
|
6
|
+
const resource_1 = require("../../core/resource.js");
|
|
7
|
+
const UsageAPI = tslib_1.__importStar(require("./usage.js"));
|
|
8
|
+
const usage_1 = require("./usage.js");
|
|
9
|
+
class V2 extends resource_1.APIResource {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.usage = new UsageAPI.Usage(this._client);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.V2 = V2;
|
|
16
|
+
V2.Usage = usage_1.Usage;
|
|
17
|
+
//# sourceMappingURL=v2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v2.js","sourceRoot":"","sources":["../../src/resources/v2/v2.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,6DAAoC;AACpC,sCAAwE;AAExE,MAAa,EAAG,SAAQ,sBAAW;IAAnC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;CAAA;AAFD,gBAEC;AAED,EAAE,CAAC,KAAK,GAAG,aAAK,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import * as UsageAPI from "./usage.mjs";
|
|
4
|
+
import { Usage } from "./usage.mjs";
|
|
5
|
+
export class V2 extends APIResource {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.usage = new UsageAPI.Usage(this._client);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
V2.Usage = Usage;
|
|
12
|
+
//# sourceMappingURL=v2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v2.mjs","sourceRoot":"","sources":["../../src/resources/v2/v2.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,QAAQ,oBAAgB;AACpC,OAAO,EAAE,KAAK,EAA0C,oBAAgB;AAExE,MAAM,OAAO,EAAG,SAAQ,WAAW;IAAnC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;CAAA;AAED,EAAE,CAAC,KAAK,GAAG,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v2.d.mts","sourceRoot":"","sources":["../src/resources/v2.ts"],"names":[],"mappings":"AAEA,+BAA2B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v2.d.ts","sourceRoot":"","sources":["../src/resources/v2.ts"],"names":[],"mappings":"AAEA,8BAA2B"}
|
package/resources/v2.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const tslib_1 = require("../internal/tslib.js");
|
|
5
|
+
tslib_1.__exportStar(require("./v2/index.js"), exports);
|
|
6
|
+
//# sourceMappingURL=v2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v2.js","sourceRoot":"","sources":["../src/resources/v2.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAA2B"}
|
package/resources/v2.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v2.mjs","sourceRoot":"","sources":["../src/resources/v2.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,+BAA2B"}
|
package/src/client.ts
CHANGED
|
@@ -21,6 +21,7 @@ import * as API from './resources/index';
|
|
|
21
21
|
import { APIPromise } from './core/api-promise';
|
|
22
22
|
import { V1Beta } from './resources/v1-beta/v1-beta';
|
|
23
23
|
import { V1 } from './resources/v1/v1';
|
|
24
|
+
import { V2 } from './resources/v2/v2';
|
|
24
25
|
import { type Fetch } from './internal/builtin-types';
|
|
25
26
|
import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
|
|
26
27
|
import { FinalRequestOptions, RequestOptions } from './internal/request-options';
|
|
@@ -764,10 +765,12 @@ export class Stigg {
|
|
|
764
765
|
|
|
765
766
|
v1: API.V1 = new API.V1(this);
|
|
766
767
|
v1Beta: API.V1Beta = new API.V1Beta(this);
|
|
768
|
+
v2: API.V2 = new API.V2(this);
|
|
767
769
|
}
|
|
768
770
|
|
|
769
771
|
Stigg.V1 = V1;
|
|
770
772
|
Stigg.V1Beta = V1Beta;
|
|
773
|
+
Stigg.V2 = V2;
|
|
771
774
|
|
|
772
775
|
export declare namespace Stigg {
|
|
773
776
|
export type RequestOptions = Opts.RequestOptions;
|
|
@@ -781,4 +784,6 @@ export declare namespace Stigg {
|
|
|
781
784
|
export { V1 as V1 };
|
|
782
785
|
|
|
783
786
|
export { V1Beta as V1Beta };
|
|
787
|
+
|
|
788
|
+
export { V2 as V2 };
|
|
784
789
|
}
|
package/src/resources/index.ts
CHANGED
|
@@ -78,10 +78,9 @@ export class Contracts extends APIResource {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
/**
|
|
81
|
-
* Retrieves a cursor-paginated list of contracts in the environment
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
* billing provider is connected. Supports filtering by customer external ID,
|
|
81
|
+
* Retrieves a cursor-paginated list of contracts in the environment. Each contract
|
|
82
|
+
* that has a billing contract is enriched with a preview of its upcoming (next)
|
|
83
|
+
* invoice when one is available. Supports filtering by customer external ID,
|
|
85
84
|
* state, and name.
|
|
86
85
|
*/
|
|
87
86
|
list(
|
|
@@ -1846,13 +1845,6 @@ export interface ContractCreateParams {
|
|
|
1846
1845
|
*/
|
|
1847
1846
|
customerId: string;
|
|
1848
1847
|
|
|
1849
|
-
/**
|
|
1850
|
-
* Body param: The subscriptions to attach to the contract (must be non-empty).
|
|
1851
|
-
* Each entry is either a new subscription to create or a reference to an existing
|
|
1852
|
-
* custom subscription.
|
|
1853
|
-
*/
|
|
1854
|
-
subscriptions: Array<ContractCreateParams.Subscription>;
|
|
1855
|
-
|
|
1856
1848
|
/**
|
|
1857
1849
|
* Body param: Optional contract activation end date
|
|
1858
1850
|
*/
|
|
@@ -1863,6 +1855,15 @@ export interface ContractCreateParams {
|
|
|
1863
1855
|
*/
|
|
1864
1856
|
activationStartDate?: string;
|
|
1865
1857
|
|
|
1858
|
+
/**
|
|
1859
|
+
* Body param: Your own ID for the contract, which makes this call idempotent:
|
|
1860
|
+
* sending the same one again returns the existing contract instead of creating a
|
|
1861
|
+
* second. Omit it and one is generated for you, but then a retry cannot be told
|
|
1862
|
+
* apart from a new contract — and contracts cannot be deleted. Recommended
|
|
1863
|
+
* whenever a retry is possible, e.g. building a contract from an order form.
|
|
1864
|
+
*/
|
|
1865
|
+
contractId?: string;
|
|
1866
|
+
|
|
1866
1867
|
/**
|
|
1867
1868
|
* Body param: Optional contract name
|
|
1868
1869
|
*/
|
|
@@ -1881,6 +1882,14 @@ export interface ContractCreateParams {
|
|
|
1881
1882
|
*/
|
|
1882
1883
|
setupBilling?: boolean;
|
|
1883
1884
|
|
|
1885
|
+
/**
|
|
1886
|
+
* Body param: The subscriptions to attach to the contract. Each entry is either a
|
|
1887
|
+
* new subscription to create or a reference to an existing custom subscription.
|
|
1888
|
+
* Optional — omit it (or pass an empty list) to create a contract with no
|
|
1889
|
+
* subscriptions and attach them later.
|
|
1890
|
+
*/
|
|
1891
|
+
subscriptions?: Array<ContractCreateParams.Subscription>;
|
|
1892
|
+
|
|
1884
1893
|
/**
|
|
1885
1894
|
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
1886
1895
|
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
@@ -161,8 +161,9 @@ export namespace Coupon {
|
|
|
161
161
|
description: string | null;
|
|
162
162
|
|
|
163
163
|
/**
|
|
164
|
-
* How many
|
|
165
|
-
*
|
|
164
|
+
* How many calendar months the discount applies for once redeemed, counted from
|
|
165
|
+
* when the coupon is applied (not tied to the subscription's billing period).
|
|
166
|
+
* Leave unset for a discount that lasts for the lifetime of the subscription.
|
|
166
167
|
*/
|
|
167
168
|
durationInMonths: number | null;
|
|
168
169
|
|
|
@@ -373,8 +374,9 @@ export interface CouponListResponse {
|
|
|
373
374
|
description: string | null;
|
|
374
375
|
|
|
375
376
|
/**
|
|
376
|
-
* How many
|
|
377
|
-
*
|
|
377
|
+
* How many calendar months the discount applies for once redeemed, counted from
|
|
378
|
+
* when the coupon is applied (not tied to the subscription's billing period).
|
|
379
|
+
* Leave unset for a discount that lasts for the lifetime of the subscription.
|
|
378
380
|
*/
|
|
379
381
|
durationInMonths: number | null;
|
|
380
382
|
|
|
@@ -566,8 +568,10 @@ export interface CouponCreateParams {
|
|
|
566
568
|
description: string | null;
|
|
567
569
|
|
|
568
570
|
/**
|
|
569
|
-
* Body param: How many
|
|
570
|
-
*
|
|
571
|
+
* Body param: How many calendar months the discount applies for once redeemed,
|
|
572
|
+
* counted from when the coupon is applied (not tied to the subscription's billing
|
|
573
|
+
* period). Leave unset for a discount that lasts for the lifetime of the
|
|
574
|
+
* subscription.
|
|
571
575
|
*/
|
|
572
576
|
durationInMonths: number | null;
|
|
573
577
|
|
|
@@ -92,6 +92,14 @@ export namespace ConsumptionConsumeResponse {
|
|
|
92
92
|
*/
|
|
93
93
|
credit?: Data.Credit | null;
|
|
94
94
|
|
|
95
|
+
/**
|
|
96
|
+
* The current usage of each governance entitlement this request counted towards.
|
|
97
|
+
* Absent when governance is not enabled or the usage is unknown. Entitlements
|
|
98
|
+
* whose usage could not be read, and those of repeated idempotent requests, are
|
|
99
|
+
* left out
|
|
100
|
+
*/
|
|
101
|
+
entities?: Array<Data.Entity>;
|
|
102
|
+
|
|
95
103
|
/**
|
|
96
104
|
* The resource the consumption was attributed to
|
|
97
105
|
*/
|
|
@@ -134,6 +142,58 @@ export namespace ConsumptionConsumeResponse {
|
|
|
134
142
|
*/
|
|
135
143
|
usagePeriodEnd?: string | null;
|
|
136
144
|
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* The usage counted against one governance entitlement
|
|
148
|
+
*/
|
|
149
|
+
export interface Entity {
|
|
150
|
+
/**
|
|
151
|
+
* The absolute usage counted against the entitlement
|
|
152
|
+
*/
|
|
153
|
+
currentUsage: number;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* The customer whose usage counted towards the entitlement
|
|
157
|
+
*/
|
|
158
|
+
customerId: string;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* The governance entitlement the usage counts towards
|
|
162
|
+
*/
|
|
163
|
+
entitlementId: string;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* The governance entity the entitlement belongs to
|
|
167
|
+
*/
|
|
168
|
+
entityId: string;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* The customer resource the usage counted from; `null` for customer-level usage
|
|
172
|
+
*/
|
|
173
|
+
resourceId: string | null;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* The entities the entitlement is scoped to (empty when it is not scoped)
|
|
177
|
+
*/
|
|
178
|
+
scopeEntityIds: Array<string>;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* When the entitlement usage was last updated
|
|
182
|
+
*/
|
|
183
|
+
usageUpdatedAt: string;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* The credit currency the entitlement governs (exactly one of featureId and
|
|
187
|
+
* currencyId is set)
|
|
188
|
+
*/
|
|
189
|
+
currencyId?: string;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* The feature the entitlement governs (exactly one of featureId and currencyId is
|
|
193
|
+
* set)
|
|
194
|
+
*/
|
|
195
|
+
featureId?: string;
|
|
196
|
+
}
|
|
137
197
|
}
|
|
138
198
|
}
|
|
139
199
|
|
|
@@ -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,
|
|
@@ -356,23 +355,9 @@ export namespace CustomerIntegrationResponse {
|
|
|
356
355
|
syncedEntityId: string | null;
|
|
357
356
|
|
|
358
357
|
/**
|
|
359
|
-
* The vendor
|
|
358
|
+
* The vendor whose system holds the customer record
|
|
360
359
|
*/
|
|
361
|
-
vendorIdentifier:
|
|
362
|
-
| 'AUTH0'
|
|
363
|
-
| 'ZUORA'
|
|
364
|
-
| 'STRIPE'
|
|
365
|
-
| 'HUBSPOT'
|
|
366
|
-
| 'AWS_MARKETPLACE'
|
|
367
|
-
| 'SNOWFLAKE'
|
|
368
|
-
| 'SALESFORCE'
|
|
369
|
-
| 'BIG_QUERY'
|
|
370
|
-
| 'OPEN_FGA'
|
|
371
|
-
| 'APP_STORE'
|
|
372
|
-
| 'RECEIVED'
|
|
373
|
-
| 'PREQUEL'
|
|
374
|
-
| 'AIRWALLEX'
|
|
375
|
-
| 'STRIPE_INVOICING';
|
|
360
|
+
vendorIdentifier: 'STRIPE' | 'ZUORA' | 'HUBSPOT' | 'AWS_MARKETPLACE';
|
|
376
361
|
|
|
377
362
|
/**
|
|
378
363
|
* Price billing sync revision data containing billing ID, link URL, and price
|
|
@@ -656,6 +641,12 @@ export namespace CustomerResponse {
|
|
|
656
641
|
*/
|
|
657
642
|
billingId: string | null;
|
|
658
643
|
|
|
644
|
+
/**
|
|
645
|
+
* The card brand of the default payment method, as reported by the billing
|
|
646
|
+
* provider (e.g. visa, mastercard, amex)
|
|
647
|
+
*/
|
|
648
|
+
cardBrand: string | null;
|
|
649
|
+
|
|
659
650
|
/**
|
|
660
651
|
* The expiration month of the default payment method
|
|
661
652
|
*/
|
|
@@ -674,7 +665,13 @@ export namespace CustomerResponse {
|
|
|
674
665
|
/**
|
|
675
666
|
* The default payment method type
|
|
676
667
|
*/
|
|
677
|
-
type: 'CARD' | 'BANK' | 'CASH_APP';
|
|
668
|
+
type: 'CARD' | 'BANK' | 'CASH_APP' | 'PAYPAL' | null;
|
|
669
|
+
|
|
670
|
+
/**
|
|
671
|
+
* The digital wallet used to add the default card payment method, as reported by
|
|
672
|
+
* the billing provider (e.g. apple_pay, google_pay)
|
|
673
|
+
*/
|
|
674
|
+
walletType: string | null;
|
|
678
675
|
}
|
|
679
676
|
|
|
680
677
|
/**
|
|
@@ -1254,6 +1251,12 @@ export namespace CustomerListResponse {
|
|
|
1254
1251
|
*/
|
|
1255
1252
|
billingId: string | null;
|
|
1256
1253
|
|
|
1254
|
+
/**
|
|
1255
|
+
* The card brand of the default payment method, as reported by the billing
|
|
1256
|
+
* provider (e.g. visa, mastercard, amex)
|
|
1257
|
+
*/
|
|
1258
|
+
cardBrand: string | null;
|
|
1259
|
+
|
|
1257
1260
|
/**
|
|
1258
1261
|
* The expiration month of the default payment method
|
|
1259
1262
|
*/
|
|
@@ -1272,7 +1275,13 @@ export namespace CustomerListResponse {
|
|
|
1272
1275
|
/**
|
|
1273
1276
|
* The default payment method type
|
|
1274
1277
|
*/
|
|
1275
|
-
type: 'CARD' | 'BANK' | 'CASH_APP';
|
|
1278
|
+
type: 'CARD' | 'BANK' | 'CASH_APP' | 'PAYPAL' | null;
|
|
1279
|
+
|
|
1280
|
+
/**
|
|
1281
|
+
* The digital wallet used to add the default card payment method, as reported by
|
|
1282
|
+
* the billing provider (e.g. apple_pay, google_pay)
|
|
1283
|
+
*/
|
|
1284
|
+
walletType: string | null;
|
|
1276
1285
|
}
|
|
1277
1286
|
|
|
1278
1287
|
/**
|
|
@@ -3591,7 +3600,7 @@ export namespace CustomerProvisionParams {
|
|
|
3591
3600
|
/**
|
|
3592
3601
|
* The default payment method type
|
|
3593
3602
|
*/
|
|
3594
|
-
type: 'CARD' | 'BANK' | 'CASH_APP';
|
|
3603
|
+
type: 'CARD' | 'BANK' | 'CASH_APP' | 'PAYPAL' | null;
|
|
3595
3604
|
}
|
|
3596
3605
|
|
|
3597
3606
|
/**
|
|
@@ -146,23 +146,9 @@ export interface IntegrationListResponse {
|
|
|
146
146
|
syncedEntityId: string | null;
|
|
147
147
|
|
|
148
148
|
/**
|
|
149
|
-
* The vendor
|
|
149
|
+
* The vendor whose system holds the customer record
|
|
150
150
|
*/
|
|
151
|
-
vendorIdentifier:
|
|
152
|
-
| 'AUTH0'
|
|
153
|
-
| 'ZUORA'
|
|
154
|
-
| 'STRIPE'
|
|
155
|
-
| 'HUBSPOT'
|
|
156
|
-
| 'AWS_MARKETPLACE'
|
|
157
|
-
| 'SNOWFLAKE'
|
|
158
|
-
| 'SALESFORCE'
|
|
159
|
-
| 'BIG_QUERY'
|
|
160
|
-
| 'OPEN_FGA'
|
|
161
|
-
| 'APP_STORE'
|
|
162
|
-
| 'RECEIVED'
|
|
163
|
-
| 'PREQUEL'
|
|
164
|
-
| 'AIRWALLEX'
|
|
165
|
-
| 'STRIPE_INVOICING';
|
|
151
|
+
vendorIdentifier: 'STRIPE' | 'ZUORA' | 'HUBSPOT' | 'AWS_MARKETPLACE';
|
|
166
152
|
|
|
167
153
|
/**
|
|
168
154
|
* Price billing sync revision data containing billing ID, link URL, and price
|
|
@@ -275,22 +261,7 @@ export interface IntegrationListParams extends MyCursorIDPageParams {
|
|
|
275
261
|
* Query param: Filter by vendor identifier. Supports comma-separated values for
|
|
276
262
|
* multiple vendors (e.g., STRIPE,HUBSPOT)
|
|
277
263
|
*/
|
|
278
|
-
vendorIdentifier?: Array<
|
|
279
|
-
| 'AUTH0'
|
|
280
|
-
| 'ZUORA'
|
|
281
|
-
| 'STRIPE'
|
|
282
|
-
| 'HUBSPOT'
|
|
283
|
-
| 'AWS_MARKETPLACE'
|
|
284
|
-
| 'SNOWFLAKE'
|
|
285
|
-
| 'SALESFORCE'
|
|
286
|
-
| 'BIG_QUERY'
|
|
287
|
-
| 'OPEN_FGA'
|
|
288
|
-
| 'APP_STORE'
|
|
289
|
-
| 'RECEIVED'
|
|
290
|
-
| 'PREQUEL'
|
|
291
|
-
| 'AIRWALLEX'
|
|
292
|
-
| 'STRIPE_INVOICING'
|
|
293
|
-
>;
|
|
264
|
+
vendorIdentifier?: Array<'STRIPE' | 'ZUORA' | 'HUBSPOT' | 'AWS_MARKETPLACE'>;
|
|
294
265
|
|
|
295
266
|
/**
|
|
296
267
|
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
@@ -320,24 +291,9 @@ export interface IntegrationLinkParams {
|
|
|
320
291
|
syncedEntityId: string;
|
|
321
292
|
|
|
322
293
|
/**
|
|
323
|
-
* Body param: The vendor
|
|
324
|
-
* SNOWFLAKE)
|
|
294
|
+
* Body param: The vendor whose system holds the customer record
|
|
325
295
|
*/
|
|
326
|
-
vendorIdentifier:
|
|
327
|
-
| 'AUTH0'
|
|
328
|
-
| 'ZUORA'
|
|
329
|
-
| 'STRIPE'
|
|
330
|
-
| 'HUBSPOT'
|
|
331
|
-
| 'AWS_MARKETPLACE'
|
|
332
|
-
| 'SNOWFLAKE'
|
|
333
|
-
| 'SALESFORCE'
|
|
334
|
-
| 'BIG_QUERY'
|
|
335
|
-
| 'OPEN_FGA'
|
|
336
|
-
| 'APP_STORE'
|
|
337
|
-
| 'RECEIVED'
|
|
338
|
-
| 'PREQUEL'
|
|
339
|
-
| 'AIRWALLEX'
|
|
340
|
-
| 'STRIPE_INVOICING';
|
|
296
|
+
vendorIdentifier: 'STRIPE' | 'ZUORA' | 'HUBSPOT' | 'AWS_MARKETPLACE';
|
|
341
297
|
|
|
342
298
|
/**
|
|
343
299
|
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
@@ -39,28 +39,6 @@ export class DataExport extends APIResource {
|
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
/**
|
|
43
|
-
* Mint a scoped JWT for the FE embedded SDK. Lazy-creates the DATA_EXPORT
|
|
44
|
-
* integration if needed.
|
|
45
|
-
*/
|
|
46
|
-
mintScopedToken(
|
|
47
|
-
params: DataExportMintScopedTokenParams,
|
|
48
|
-
options?: RequestOptions,
|
|
49
|
-
): APIPromise<DataExportMintScopedTokenResponse> {
|
|
50
|
-
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|
|
51
|
-
return this._client.post('/api/v1/data-export/scoped-token', {
|
|
52
|
-
body,
|
|
53
|
-
...options,
|
|
54
|
-
headers: buildHeaders([
|
|
55
|
-
{
|
|
56
|
-
...(xAccountID != null ? { 'X-ACCOUNT-ID': xAccountID } : undefined),
|
|
57
|
-
...(xEnvironmentID != null ? { 'X-ENVIRONMENT-ID': xEnvironmentID } : undefined),
|
|
58
|
-
},
|
|
59
|
-
options?.headers,
|
|
60
|
-
]),
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
|
|
64
42
|
/**
|
|
65
43
|
* Trigger a sync for one destination or all destinations under the provider
|
|
66
44
|
* entity.
|
|
@@ -146,38 +124,6 @@ export namespace DataExportListModelsResponse {
|
|
|
146
124
|
}
|
|
147
125
|
}
|
|
148
126
|
|
|
149
|
-
/**
|
|
150
|
-
* Response object
|
|
151
|
-
*/
|
|
152
|
-
export interface DataExportMintScopedTokenResponse {
|
|
153
|
-
/**
|
|
154
|
-
* Scoped token + expiry + provider-specific metadata for the FE SDK.
|
|
155
|
-
*/
|
|
156
|
-
data: DataExportMintScopedTokenResponse.Data;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export namespace DataExportMintScopedTokenResponse {
|
|
160
|
-
/**
|
|
161
|
-
* Scoped token + expiry + provider-specific metadata for the FE SDK.
|
|
162
|
-
*/
|
|
163
|
-
export interface Data {
|
|
164
|
-
/**
|
|
165
|
-
* Provider scoped JWT
|
|
166
|
-
*/
|
|
167
|
-
token: string;
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* ISO8601 token expiry
|
|
171
|
-
*/
|
|
172
|
-
expiresAt: string;
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* Provider-specific extras the FE embedded SDK needs
|
|
176
|
-
*/
|
|
177
|
-
providerMetadata: { [key: string]: unknown };
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
127
|
/**
|
|
182
128
|
* Response object
|
|
183
129
|
*/
|
|
@@ -242,36 +188,6 @@ export interface DataExportListModelsParams {
|
|
|
242
188
|
'X-ENVIRONMENT-ID'?: string;
|
|
243
189
|
}
|
|
244
190
|
|
|
245
|
-
export interface DataExportMintScopedTokenParams {
|
|
246
|
-
/**
|
|
247
|
-
* Body param: FE origin the resulting JWT is bound to (provider-side anti-fraud)
|
|
248
|
-
*/
|
|
249
|
-
applicationOrigin: string;
|
|
250
|
-
|
|
251
|
-
/**
|
|
252
|
-
* Body param: Pin the token to a specific warehouse connect flow
|
|
253
|
-
*/
|
|
254
|
-
destinationType?: string;
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* Body param
|
|
258
|
-
*/
|
|
259
|
-
enabledModels?: Array<string>;
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* Header param: Account ID — optional when authenticating with a user JWT (Bearer
|
|
263
|
-
* token); falls back to the user's first membership. Ignored for API-key auth.
|
|
264
|
-
*/
|
|
265
|
-
'X-ACCOUNT-ID'?: string;
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
* Header param: Environment ID — required when authenticating with a user JWT
|
|
269
|
-
* (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is
|
|
270
|
-
* intrinsic to the key).
|
|
271
|
-
*/
|
|
272
|
-
'X-ENVIRONMENT-ID'?: string;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
191
|
export interface DataExportTriggerSyncParams {
|
|
276
192
|
/**
|
|
277
193
|
* Body param: Provider destination ID to sync. Omit to sync all destinations.
|
|
@@ -297,10 +213,8 @@ DataExport.Destinations = Destinations;
|
|
|
297
213
|
export declare namespace DataExport {
|
|
298
214
|
export {
|
|
299
215
|
type DataExportListModelsResponse as DataExportListModelsResponse,
|
|
300
|
-
type DataExportMintScopedTokenResponse as DataExportMintScopedTokenResponse,
|
|
301
216
|
type DataExportTriggerSyncResponse as DataExportTriggerSyncResponse,
|
|
302
217
|
type DataExportListModelsParams as DataExportListModelsParams,
|
|
303
|
-
type DataExportMintScopedTokenParams as DataExportMintScopedTokenParams,
|
|
304
218
|
type DataExportTriggerSyncParams as DataExportTriggerSyncParams,
|
|
305
219
|
};
|
|
306
220
|
|
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
export {
|
|
4
4
|
DataExport,
|
|
5
5
|
type DataExportListModelsResponse,
|
|
6
|
-
type DataExportMintScopedTokenResponse,
|
|
7
6
|
type DataExportTriggerSyncResponse,
|
|
8
7
|
type DataExportListModelsParams,
|
|
9
|
-
type DataExportMintScopedTokenParams,
|
|
10
8
|
type DataExportTriggerSyncParams,
|
|
11
9
|
} from './data-export';
|
|
12
10
|
export {
|
|
@@ -8,8 +8,6 @@ import {
|
|
|
8
8
|
DataExport,
|
|
9
9
|
DataExportListModelsParams,
|
|
10
10
|
DataExportListModelsResponse,
|
|
11
|
-
DataExportMintScopedTokenParams,
|
|
12
|
-
DataExportMintScopedTokenResponse,
|
|
13
11
|
DataExportTriggerSyncParams,
|
|
14
12
|
DataExportTriggerSyncResponse,
|
|
15
13
|
} from './data-export/data-export';
|
|
@@ -269,10 +267,8 @@ export declare namespace Events {
|
|
|
269
267
|
export {
|
|
270
268
|
DataExport as DataExport,
|
|
271
269
|
type DataExportListModelsResponse as DataExportListModelsResponse,
|
|
272
|
-
type DataExportMintScopedTokenResponse as DataExportMintScopedTokenResponse,
|
|
273
270
|
type DataExportTriggerSyncResponse as DataExportTriggerSyncResponse,
|
|
274
271
|
type DataExportListModelsParams as DataExportListModelsParams,
|
|
275
|
-
type DataExportMintScopedTokenParams as DataExportMintScopedTokenParams,
|
|
276
272
|
type DataExportTriggerSyncParams as DataExportTriggerSyncParams,
|
|
277
273
|
};
|
|
278
274
|
|
|
@@ -4,10 +4,8 @@ export { Beta } from './beta/index';
|
|
|
4
4
|
export {
|
|
5
5
|
DataExport,
|
|
6
6
|
type DataExportListModelsResponse,
|
|
7
|
-
type DataExportMintScopedTokenResponse,
|
|
8
7
|
type DataExportTriggerSyncResponse,
|
|
9
8
|
type DataExportListModelsParams,
|
|
10
|
-
type DataExportMintScopedTokenParams,
|
|
11
9
|
type DataExportTriggerSyncParams,
|
|
12
10
|
} from './data-export/index';
|
|
13
11
|
export {
|
|
@@ -54,7 +54,10 @@ export class Usage extends APIResource {
|
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* Reports usage measurements for metered features. The reported usage is used to
|
|
57
|
-
* track, limit, and bill customer consumption.
|
|
57
|
+
* track, limit, and bill customer consumption. Deprecated: use
|
|
58
|
+
* `POST /api/v2/usage`.
|
|
59
|
+
*
|
|
60
|
+
* @deprecated
|
|
58
61
|
*/
|
|
59
62
|
report(params: UsageReportParams, options?: RequestOptions): APIPromise<UsageReportResponse> {
|
|
60
63
|
const { 'X-ACCOUNT-ID': xAccountID, 'X-ENVIRONMENT-ID': xEnvironmentID, ...body } = params;
|