@airweave/sdk 0.6.45 → 0.6.48
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/README.md +21 -1
- package/dist/cjs/Client.d.ts +8 -0
- package/dist/cjs/Client.js +4 -2
- package/dist/cjs/api/resources/collections/client/Client.d.ts +8 -0
- package/dist/cjs/api/resources/collections/client/Client.js +21 -21
- package/dist/cjs/api/resources/sourceConnections/client/Client.d.ts +8 -0
- package/dist/cjs/api/resources/sourceConnections/client/Client.js +24 -24
- package/dist/cjs/api/resources/sources/client/Client.d.ts +8 -0
- package/dist/cjs/api/resources/sources/client/Client.js +6 -6
- package/dist/cjs/api/types/BillingPeriod.d.ts +30 -0
- package/dist/cjs/api/types/BillingPeriod.js +5 -0
- package/dist/cjs/api/types/BillingPeriodStatus.d.ts +14 -0
- package/dist/cjs/api/types/BillingPeriodStatus.js +13 -0
- package/dist/cjs/api/types/BillingPlan.d.ts +14 -0
- package/dist/cjs/api/types/BillingPlan.js +13 -0
- package/dist/cjs/api/types/BillingStatus.d.ts +16 -0
- package/dist/cjs/api/types/BillingStatus.js +15 -0
- package/dist/cjs/api/types/BillingTransition.d.ts +15 -0
- package/dist/cjs/api/types/BillingTransition.js +14 -0
- package/dist/cjs/api/types/Organization.d.ts +12 -1
- package/dist/cjs/api/types/OrganizationBilling.d.ts +44 -0
- package/dist/cjs/api/types/OrganizationBilling.js +5 -0
- package/dist/cjs/api/types/OrganizationWithRole.d.ts +2 -0
- package/dist/cjs/api/types/index.d.ts +6 -0
- package/dist/cjs/api/types/index.js +6 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +8 -0
- package/dist/esm/Client.mjs +4 -2
- package/dist/esm/api/resources/collections/client/Client.d.mts +8 -0
- package/dist/esm/api/resources/collections/client/Client.mjs +21 -21
- package/dist/esm/api/resources/sourceConnections/client/Client.d.mts +8 -0
- package/dist/esm/api/resources/sourceConnections/client/Client.mjs +24 -24
- package/dist/esm/api/resources/sources/client/Client.d.mts +8 -0
- package/dist/esm/api/resources/sources/client/Client.mjs +6 -6
- package/dist/esm/api/types/BillingPeriod.d.mts +30 -0
- package/dist/esm/api/types/BillingPeriod.mjs +4 -0
- package/dist/esm/api/types/BillingPeriodStatus.d.mts +14 -0
- package/dist/esm/api/types/BillingPeriodStatus.mjs +10 -0
- package/dist/esm/api/types/BillingPlan.d.mts +14 -0
- package/dist/esm/api/types/BillingPlan.mjs +10 -0
- package/dist/esm/api/types/BillingStatus.d.mts +16 -0
- package/dist/esm/api/types/BillingStatus.mjs +12 -0
- package/dist/esm/api/types/BillingTransition.d.mts +15 -0
- package/dist/esm/api/types/BillingTransition.mjs +11 -0
- package/dist/esm/api/types/Organization.d.mts +12 -1
- package/dist/esm/api/types/OrganizationBilling.d.mts +44 -0
- package/dist/esm/api/types/OrganizationBilling.mjs +4 -0
- package/dist/esm/api/types/OrganizationWithRole.d.mts +2 -0
- package/dist/esm/api/types/index.d.mts +6 -0
- package/dist/esm/api/types/index.mjs +6 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,13 +22,33 @@ Instantiate and use the client with the following:
|
|
|
22
22
|
```typescript
|
|
23
23
|
import { AirweaveSDKClient } from "@airweave/sdk";
|
|
24
24
|
|
|
25
|
-
const client = new AirweaveSDKClient({
|
|
25
|
+
const client = new AirweaveSDKClient({
|
|
26
|
+
apiKey: "YOUR_API_KEY",
|
|
27
|
+
frameworkName: "YOUR_FRAMEWORK_NAME",
|
|
28
|
+
frameworkVersion: "YOUR_FRAMEWORK_VERSION",
|
|
29
|
+
});
|
|
26
30
|
await client.collections.create({
|
|
27
31
|
name: "Finance Data",
|
|
28
32
|
readable_id: "finance-data-reports",
|
|
29
33
|
});
|
|
30
34
|
```
|
|
31
35
|
|
|
36
|
+
## Framework Tracking
|
|
37
|
+
|
|
38
|
+
If you're using Airweave with an agent framework like CrewAI, LangChain, or LlamaIndex, you can track which framework is making requests. This helps Airweave provide better analytics and support for your specific framework.
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
import { AirweaveSDKClient } from "@airweave/sdk";
|
|
42
|
+
|
|
43
|
+
const client = new AirweaveSDKClient({
|
|
44
|
+
apiKey: "YOUR_API_KEY",
|
|
45
|
+
frameworkName: "langchain",
|
|
46
|
+
frameworkVersion: "0.2.0",
|
|
47
|
+
});
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The framework information is automatically sent with every request as headers (`X-Framework-Name` and `X-Framework-Version`), enabling better insights and troubleshooting.
|
|
51
|
+
|
|
32
52
|
## Request And Response Types
|
|
33
53
|
|
|
34
54
|
The SDK exports all request and response types as TypeScript interfaces. Simply import them with the
|
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -12,6 +12,10 @@ export declare namespace AirweaveSDKClient {
|
|
|
12
12
|
/** Specify a custom URL to connect the client to. */
|
|
13
13
|
baseUrl?: core.Supplier<string>;
|
|
14
14
|
apiKey: core.Supplier<string>;
|
|
15
|
+
/** Override the X-Framework-Name header */
|
|
16
|
+
frameworkName?: core.Supplier<string | undefined>;
|
|
17
|
+
/** Override the X-Framework-Version header */
|
|
18
|
+
frameworkVersion?: core.Supplier<string | undefined>;
|
|
15
19
|
/** Additional headers to include in requests. */
|
|
16
20
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
17
21
|
}
|
|
@@ -22,6 +26,10 @@ export declare namespace AirweaveSDKClient {
|
|
|
22
26
|
maxRetries?: number;
|
|
23
27
|
/** A hook to abort the request. */
|
|
24
28
|
abortSignal?: AbortSignal;
|
|
29
|
+
/** Override the X-Framework-Name header */
|
|
30
|
+
frameworkName?: string | undefined;
|
|
31
|
+
/** Override the X-Framework-Version header */
|
|
32
|
+
frameworkVersion?: string | undefined;
|
|
25
33
|
/** Additional query string parameters to include in the request. */
|
|
26
34
|
queryParams?: Record<string, unknown>;
|
|
27
35
|
/** Additional headers to include in the request. */
|
package/dist/cjs/Client.js
CHANGED
|
@@ -45,10 +45,12 @@ const Client_js_3 = require("./api/resources/sourceConnections/client/Client.js"
|
|
|
45
45
|
class AirweaveSDKClient {
|
|
46
46
|
constructor(_options) {
|
|
47
47
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
48
|
+
"X-Framework-Name": _options === null || _options === void 0 ? void 0 : _options.frameworkName,
|
|
49
|
+
"X-Framework-Version": _options === null || _options === void 0 ? void 0 : _options.frameworkVersion,
|
|
48
50
|
"X-Fern-Language": "JavaScript",
|
|
49
51
|
"X-Fern-SDK-Name": "@airweave/sdk",
|
|
50
|
-
"X-Fern-SDK-Version": "v0.6.
|
|
51
|
-
"User-Agent": "@airweave/sdk/v0.6.
|
|
52
|
+
"X-Fern-SDK-Version": "v0.6.48",
|
|
53
|
+
"User-Agent": "@airweave/sdk/v0.6.48",
|
|
52
54
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
53
55
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
54
56
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -10,6 +10,10 @@ export declare namespace Collections {
|
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey: core.Supplier<string>;
|
|
13
|
+
/** Override the X-Framework-Name header */
|
|
14
|
+
frameworkName?: core.Supplier<string | undefined>;
|
|
15
|
+
/** Override the X-Framework-Version header */
|
|
16
|
+
frameworkVersion?: core.Supplier<string | undefined>;
|
|
13
17
|
/** Additional headers to include in requests. */
|
|
14
18
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
19
|
}
|
|
@@ -20,6 +24,10 @@ export declare namespace Collections {
|
|
|
20
24
|
maxRetries?: number;
|
|
21
25
|
/** A hook to abort the request. */
|
|
22
26
|
abortSignal?: AbortSignal;
|
|
27
|
+
/** Override the X-Framework-Name header */
|
|
28
|
+
frameworkName?: string | undefined;
|
|
29
|
+
/** Override the X-Framework-Version header */
|
|
30
|
+
frameworkVersion?: string | undefined;
|
|
23
31
|
/** Additional query string parameters to include in the request. */
|
|
24
32
|
queryParams?: Record<string, unknown>;
|
|
25
33
|
/** Additional headers to include in the request. */
|
|
@@ -77,7 +77,7 @@ class Collections {
|
|
|
77
77
|
}
|
|
78
78
|
__list() {
|
|
79
79
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
80
|
-
var _a, _b, _c;
|
|
80
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
81
81
|
const { skip, limit } = request;
|
|
82
82
|
const _queryParams = {};
|
|
83
83
|
if (skip != null) {
|
|
@@ -86,9 +86,9 @@ class Collections {
|
|
|
86
86
|
if (limit != null) {
|
|
87
87
|
_queryParams["limit"] = limit.toString();
|
|
88
88
|
}
|
|
89
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
89
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
90
90
|
const _response = yield core.fetcher({
|
|
91
|
-
url: core.url.join((
|
|
91
|
+
url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, "collections"),
|
|
92
92
|
method: "GET",
|
|
93
93
|
headers: _headers,
|
|
94
94
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -150,10 +150,10 @@ class Collections {
|
|
|
150
150
|
}
|
|
151
151
|
__create(request, requestOptions) {
|
|
152
152
|
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
-
var _a, _b, _c;
|
|
154
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
153
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
154
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
155
155
|
const _response = yield core.fetcher({
|
|
156
|
-
url: core.url.join((
|
|
156
|
+
url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, "collections"),
|
|
157
157
|
method: "POST",
|
|
158
158
|
headers: _headers,
|
|
159
159
|
contentType: "application/json",
|
|
@@ -212,10 +212,10 @@ class Collections {
|
|
|
212
212
|
}
|
|
213
213
|
__get(readableId, requestOptions) {
|
|
214
214
|
return __awaiter(this, void 0, void 0, function* () {
|
|
215
|
-
var _a, _b, _c;
|
|
216
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
215
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
216
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
217
217
|
const _response = yield core.fetcher({
|
|
218
|
-
url: core.url.join((
|
|
218
|
+
url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}`),
|
|
219
219
|
method: "GET",
|
|
220
220
|
headers: _headers,
|
|
221
221
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -275,10 +275,10 @@ class Collections {
|
|
|
275
275
|
}
|
|
276
276
|
__delete(readableId, requestOptions) {
|
|
277
277
|
return __awaiter(this, void 0, void 0, function* () {
|
|
278
|
-
var _a, _b, _c;
|
|
279
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
278
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
279
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
280
280
|
const _response = yield core.fetcher({
|
|
281
|
-
url: core.url.join((
|
|
281
|
+
url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}`),
|
|
282
282
|
method: "DELETE",
|
|
283
283
|
headers: _headers,
|
|
284
284
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -339,10 +339,10 @@ class Collections {
|
|
|
339
339
|
}
|
|
340
340
|
__refreshAllSourceConnections(readableId, requestOptions) {
|
|
341
341
|
return __awaiter(this, void 0, void 0, function* () {
|
|
342
|
-
var _a, _b, _c;
|
|
343
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
342
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
343
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
344
344
|
const _response = yield core.fetcher({
|
|
345
|
-
url: core.url.join((
|
|
345
|
+
url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}/refresh_all`),
|
|
346
346
|
method: "POST",
|
|
347
347
|
headers: _headers,
|
|
348
348
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -408,7 +408,7 @@ class Collections {
|
|
|
408
408
|
}
|
|
409
409
|
__searchGetLegacy(readableId, request, requestOptions) {
|
|
410
410
|
return __awaiter(this, void 0, void 0, function* () {
|
|
411
|
-
var _a, _b, _c;
|
|
411
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
412
412
|
const { query, response_type: responseType, limit, offset, recency_bias: recencyBias } = request;
|
|
413
413
|
const _queryParams = {};
|
|
414
414
|
_queryParams["query"] = query;
|
|
@@ -424,9 +424,9 @@ class Collections {
|
|
|
424
424
|
if (recencyBias != null) {
|
|
425
425
|
_queryParams["recency_bias"] = recencyBias.toString();
|
|
426
426
|
}
|
|
427
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
427
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
428
428
|
const _response = yield core.fetcher({
|
|
429
|
-
url: core.url.join((
|
|
429
|
+
url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}/search`),
|
|
430
430
|
method: "GET",
|
|
431
431
|
headers: _headers,
|
|
432
432
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -488,10 +488,10 @@ class Collections {
|
|
|
488
488
|
}
|
|
489
489
|
__search(readableId, request, requestOptions) {
|
|
490
490
|
return __awaiter(this, void 0, void 0, function* () {
|
|
491
|
-
var _a, _b, _c;
|
|
492
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
491
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
492
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
493
493
|
const _response = yield core.fetcher({
|
|
494
|
-
url: core.url.join((
|
|
494
|
+
url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}/search`),
|
|
495
495
|
method: "POST",
|
|
496
496
|
headers: _headers,
|
|
497
497
|
contentType: "application/json",
|
|
@@ -10,6 +10,10 @@ export declare namespace SourceConnections {
|
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey: core.Supplier<string>;
|
|
13
|
+
/** Override the X-Framework-Name header */
|
|
14
|
+
frameworkName?: core.Supplier<string | undefined>;
|
|
15
|
+
/** Override the X-Framework-Version header */
|
|
16
|
+
frameworkVersion?: core.Supplier<string | undefined>;
|
|
13
17
|
/** Additional headers to include in requests. */
|
|
14
18
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
19
|
}
|
|
@@ -20,6 +24,10 @@ export declare namespace SourceConnections {
|
|
|
20
24
|
maxRetries?: number;
|
|
21
25
|
/** A hook to abort the request. */
|
|
22
26
|
abortSignal?: AbortSignal;
|
|
27
|
+
/** Override the X-Framework-Name header */
|
|
28
|
+
frameworkName?: string | undefined;
|
|
29
|
+
/** Override the X-Framework-Version header */
|
|
30
|
+
frameworkVersion?: string | undefined;
|
|
23
31
|
/** Additional query string parameters to include in the request. */
|
|
24
32
|
queryParams?: Record<string, unknown>;
|
|
25
33
|
/** Additional headers to include in the request. */
|
|
@@ -78,7 +78,7 @@ class SourceConnections {
|
|
|
78
78
|
}
|
|
79
79
|
__list() {
|
|
80
80
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
81
|
-
var _a, _b, _c;
|
|
81
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
82
82
|
const { collection, skip, limit } = request;
|
|
83
83
|
const _queryParams = {};
|
|
84
84
|
if (collection != null) {
|
|
@@ -90,9 +90,9 @@ class SourceConnections {
|
|
|
90
90
|
if (limit != null) {
|
|
91
91
|
_queryParams["limit"] = limit.toString();
|
|
92
92
|
}
|
|
93
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
93
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
94
94
|
const _response = yield core.fetcher({
|
|
95
|
-
url: core.url.join((
|
|
95
|
+
url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, "source-connections"),
|
|
96
96
|
method: "GET",
|
|
97
97
|
headers: _headers,
|
|
98
98
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -167,10 +167,10 @@ class SourceConnections {
|
|
|
167
167
|
}
|
|
168
168
|
__create(request, requestOptions) {
|
|
169
169
|
return __awaiter(this, void 0, void 0, function* () {
|
|
170
|
-
var _a, _b, _c;
|
|
171
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
170
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
171
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
172
172
|
const _response = yield core.fetcher({
|
|
173
|
-
url: core.url.join((
|
|
173
|
+
url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, "source-connections"),
|
|
174
174
|
method: "POST",
|
|
175
175
|
headers: _headers,
|
|
176
176
|
contentType: "application/json",
|
|
@@ -229,10 +229,10 @@ class SourceConnections {
|
|
|
229
229
|
}
|
|
230
230
|
__get(sourceConnectionId, requestOptions) {
|
|
231
231
|
return __awaiter(this, void 0, void 0, function* () {
|
|
232
|
-
var _a, _b, _c;
|
|
233
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
232
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
233
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
234
234
|
const _response = yield core.fetcher({
|
|
235
|
-
url: core.url.join((
|
|
235
|
+
url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
|
|
236
236
|
method: "GET",
|
|
237
237
|
headers: _headers,
|
|
238
238
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -288,10 +288,10 @@ class SourceConnections {
|
|
|
288
288
|
}
|
|
289
289
|
__delete(sourceConnectionId, requestOptions) {
|
|
290
290
|
return __awaiter(this, void 0, void 0, function* () {
|
|
291
|
-
var _a, _b, _c;
|
|
292
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
291
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
292
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
293
293
|
const _response = yield core.fetcher({
|
|
294
|
-
url: core.url.join((
|
|
294
|
+
url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
|
|
295
295
|
method: "DELETE",
|
|
296
296
|
headers: _headers,
|
|
297
297
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -354,10 +354,10 @@ class SourceConnections {
|
|
|
354
354
|
}
|
|
355
355
|
__update(sourceConnectionId_1) {
|
|
356
356
|
return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
|
|
357
|
-
var _a, _b, _c;
|
|
358
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
357
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
358
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
359
359
|
const _response = yield core.fetcher({
|
|
360
|
-
url: core.url.join((
|
|
360
|
+
url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}`),
|
|
361
361
|
method: "PATCH",
|
|
362
362
|
headers: _headers,
|
|
363
363
|
contentType: "application/json",
|
|
@@ -430,15 +430,15 @@ class SourceConnections {
|
|
|
430
430
|
}
|
|
431
431
|
__run(sourceConnectionId_1) {
|
|
432
432
|
return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
|
|
433
|
-
var _a, _b, _c;
|
|
433
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
434
434
|
const { force_full_sync: forceFullSync } = request;
|
|
435
435
|
const _queryParams = {};
|
|
436
436
|
if (forceFullSync != null) {
|
|
437
437
|
_queryParams["force_full_sync"] = forceFullSync.toString();
|
|
438
438
|
}
|
|
439
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
439
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
440
440
|
const _response = yield core.fetcher({
|
|
441
|
-
url: core.url.join((
|
|
441
|
+
url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}/run`),
|
|
442
442
|
method: "POST",
|
|
443
443
|
headers: _headers,
|
|
444
444
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -497,15 +497,15 @@ class SourceConnections {
|
|
|
497
497
|
}
|
|
498
498
|
__getSourceConnectionJobs(sourceConnectionId_1) {
|
|
499
499
|
return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
|
|
500
|
-
var _a, _b, _c;
|
|
500
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
501
501
|
const { limit } = request;
|
|
502
502
|
const _queryParams = {};
|
|
503
503
|
if (limit != null) {
|
|
504
504
|
_queryParams["limit"] = limit.toString();
|
|
505
505
|
}
|
|
506
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
506
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
507
507
|
const _response = yield core.fetcher({
|
|
508
|
-
url: core.url.join((
|
|
508
|
+
url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}/jobs`),
|
|
509
509
|
method: "GET",
|
|
510
510
|
headers: _headers,
|
|
511
511
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -566,10 +566,10 @@ class SourceConnections {
|
|
|
566
566
|
}
|
|
567
567
|
__cancelJob(sourceConnectionId, jobId, requestOptions) {
|
|
568
568
|
return __awaiter(this, void 0, void 0, function* () {
|
|
569
|
-
var _a, _b, _c;
|
|
570
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
569
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
570
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
571
571
|
const _response = yield core.fetcher({
|
|
572
|
-
url: core.url.join((
|
|
572
|
+
url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `source-connections/${encodeURIComponent(sourceConnectionId)}/jobs/${encodeURIComponent(jobId)}/cancel`),
|
|
573
573
|
method: "POST",
|
|
574
574
|
headers: _headers,
|
|
575
575
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -10,6 +10,10 @@ export declare namespace Sources {
|
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey: core.Supplier<string>;
|
|
13
|
+
/** Override the X-Framework-Name header */
|
|
14
|
+
frameworkName?: core.Supplier<string | undefined>;
|
|
15
|
+
/** Override the X-Framework-Version header */
|
|
16
|
+
frameworkVersion?: core.Supplier<string | undefined>;
|
|
13
17
|
/** Additional headers to include in requests. */
|
|
14
18
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
19
|
}
|
|
@@ -20,6 +24,10 @@ export declare namespace Sources {
|
|
|
20
24
|
maxRetries?: number;
|
|
21
25
|
/** A hook to abort the request. */
|
|
22
26
|
abortSignal?: AbortSignal;
|
|
27
|
+
/** Override the X-Framework-Name header */
|
|
28
|
+
frameworkName?: string | undefined;
|
|
29
|
+
/** Override the X-Framework-Version header */
|
|
30
|
+
frameworkVersion?: string | undefined;
|
|
23
31
|
/** Additional query string parameters to include in the request. */
|
|
24
32
|
queryParams?: Record<string, unknown>;
|
|
25
33
|
/** Additional headers to include in the request. */
|
|
@@ -76,10 +76,10 @@ class Sources {
|
|
|
76
76
|
}
|
|
77
77
|
__list(requestOptions) {
|
|
78
78
|
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
-
var _a, _b, _c;
|
|
80
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
79
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
80
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
81
81
|
const _response = yield core.fetcher({
|
|
82
|
-
url: core.url.join((
|
|
82
|
+
url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, "sources"),
|
|
83
83
|
method: "GET",
|
|
84
84
|
headers: _headers,
|
|
85
85
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -135,10 +135,10 @@ class Sources {
|
|
|
135
135
|
}
|
|
136
136
|
__get(shortName, requestOptions) {
|
|
137
137
|
return __awaiter(this, void 0, void 0, function* () {
|
|
138
|
-
var _a, _b, _c;
|
|
139
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
138
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
139
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
140
140
|
const _response = yield core.fetcher({
|
|
141
|
-
url: core.url.join((
|
|
141
|
+
url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, `sources/${encodeURIComponent(shortName)}`),
|
|
142
142
|
method: "GET",
|
|
143
143
|
headers: _headers,
|
|
144
144
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as AirweaveSDK from "../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* Complete billing period representation.
|
|
7
|
+
*/
|
|
8
|
+
export interface BillingPeriod {
|
|
9
|
+
/** Organization this period belongs to */
|
|
10
|
+
organization_id: string;
|
|
11
|
+
/** Period start (inclusive) */
|
|
12
|
+
period_start: string;
|
|
13
|
+
/** Period end (exclusive) */
|
|
14
|
+
period_end: string;
|
|
15
|
+
/** Plan for this period */
|
|
16
|
+
plan: AirweaveSDK.BillingPlan;
|
|
17
|
+
/** Period status */
|
|
18
|
+
status: AirweaveSDK.BillingPeriodStatus;
|
|
19
|
+
/** How this period was created */
|
|
20
|
+
created_from: AirweaveSDK.BillingTransition;
|
|
21
|
+
id: string;
|
|
22
|
+
stripe_subscription_id?: string;
|
|
23
|
+
stripe_invoice_id?: string;
|
|
24
|
+
amount_cents?: number;
|
|
25
|
+
currency?: string;
|
|
26
|
+
paid_at?: string;
|
|
27
|
+
previous_period_id?: string;
|
|
28
|
+
created_at: string;
|
|
29
|
+
modified_at: string;
|
|
30
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Status of a billing period.
|
|
6
|
+
*/
|
|
7
|
+
export type BillingPeriodStatus = "active" | "completed" | "ended_unpaid" | "trial" | "grace";
|
|
8
|
+
export declare const BillingPeriodStatus: {
|
|
9
|
+
readonly Active: "active";
|
|
10
|
+
readonly Completed: "completed";
|
|
11
|
+
readonly EndedUnpaid: "ended_unpaid";
|
|
12
|
+
readonly Trial: "trial";
|
|
13
|
+
readonly Grace: "grace";
|
|
14
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.BillingPeriodStatus = void 0;
|
|
7
|
+
exports.BillingPeriodStatus = {
|
|
8
|
+
Active: "active",
|
|
9
|
+
Completed: "completed",
|
|
10
|
+
EndedUnpaid: "ended_unpaid",
|
|
11
|
+
Trial: "trial",
|
|
12
|
+
Grace: "grace",
|
|
13
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Billing plan tiers.
|
|
6
|
+
*/
|
|
7
|
+
export type BillingPlan = "trial" | "developer" | "pro" | "team" | "enterprise";
|
|
8
|
+
export declare const BillingPlan: {
|
|
9
|
+
readonly Trial: "trial";
|
|
10
|
+
readonly Developer: "developer";
|
|
11
|
+
readonly Pro: "pro";
|
|
12
|
+
readonly Team: "team";
|
|
13
|
+
readonly Enterprise: "enterprise";
|
|
14
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.BillingPlan = void 0;
|
|
7
|
+
exports.BillingPlan = {
|
|
8
|
+
Trial: "trial",
|
|
9
|
+
Developer: "developer",
|
|
10
|
+
Pro: "pro",
|
|
11
|
+
Team: "team",
|
|
12
|
+
Enterprise: "enterprise",
|
|
13
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Billing subscription status.
|
|
6
|
+
*/
|
|
7
|
+
export type BillingStatus = "active" | "past_due" | "canceled" | "paused" | "trialing" | "trial_expired" | "grace_period";
|
|
8
|
+
export declare const BillingStatus: {
|
|
9
|
+
readonly Active: "active";
|
|
10
|
+
readonly PastDue: "past_due";
|
|
11
|
+
readonly Canceled: "canceled";
|
|
12
|
+
readonly Paused: "paused";
|
|
13
|
+
readonly Trialing: "trialing";
|
|
14
|
+
readonly TrialExpired: "trial_expired";
|
|
15
|
+
readonly GracePeriod: "grace_period";
|
|
16
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.BillingStatus = void 0;
|
|
7
|
+
exports.BillingStatus = {
|
|
8
|
+
Active: "active",
|
|
9
|
+
PastDue: "past_due",
|
|
10
|
+
Canceled: "canceled",
|
|
11
|
+
Paused: "paused",
|
|
12
|
+
Trialing: "trialing",
|
|
13
|
+
TrialExpired: "trial_expired",
|
|
14
|
+
GracePeriod: "grace_period",
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* How this billing period was created.
|
|
6
|
+
*/
|
|
7
|
+
export type BillingTransition = "initial_signup" | "renewal" | "upgrade" | "downgrade" | "reactivation" | "trial_conversion";
|
|
8
|
+
export declare const BillingTransition: {
|
|
9
|
+
readonly InitialSignup: "initial_signup";
|
|
10
|
+
readonly Renewal: "renewal";
|
|
11
|
+
readonly Upgrade: "upgrade";
|
|
12
|
+
readonly Downgrade: "downgrade";
|
|
13
|
+
readonly Reactivation: "reactivation";
|
|
14
|
+
readonly TrialConversion: "trial_conversion";
|
|
15
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.BillingTransition = void 0;
|
|
7
|
+
exports.BillingTransition = {
|
|
8
|
+
InitialSignup: "initial_signup",
|
|
9
|
+
Renewal: "renewal",
|
|
10
|
+
Upgrade: "upgrade",
|
|
11
|
+
Downgrade: "downgrade",
|
|
12
|
+
Reactivation: "reactivation",
|
|
13
|
+
TrialConversion: "trial_conversion",
|
|
14
|
+
};
|