@airweave/sdk 0.1.10 → 0.1.12
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/Client.d.ts +3 -2
- package/Client.js +1 -1
- package/README.md +1 -1
- package/api/resources/apiKeys/client/Client.d.ts +3 -2
- package/api/resources/apiKeys/client/Client.js +14 -9
- package/api/resources/chat/client/Client.d.ts +3 -2
- package/api/resources/chat/client/Client.js +26 -17
- package/api/resources/connections/client/Client.d.ts +3 -2
- package/api/resources/connections/client/Client.js +38 -25
- package/api/resources/destinations/client/Client.d.ts +3 -2
- package/api/resources/destinations/client/Client.js +8 -5
- package/api/resources/embeddingModels/client/Client.d.ts +3 -2
- package/api/resources/embeddingModels/client/Client.js +8 -5
- package/api/resources/health/client/Client.d.ts +3 -2
- package/api/resources/health/client/Client.js +5 -3
- package/api/resources/sources/client/Client.d.ts +3 -2
- package/api/resources/sources/client/Client.js +8 -5
- package/api/resources/sync/client/Client.d.ts +3 -2
- package/api/resources/sync/client/Client.js +26 -17
- package/api/resources/users/client/Client.d.ts +3 -2
- package/api/resources/users/client/Client.js +5 -3
- package/api/resources/whiteLabels/client/Client.d.ts +4 -3
- package/api/resources/whiteLabels/client/Client.js +27 -18
- package/api/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +2 -2
- package/api/types/WhiteLabel.d.ts +1 -1
- package/dist/Client.d.ts +3 -2
- package/dist/Client.js +1 -1
- package/dist/api/resources/apiKeys/client/Client.d.ts +3 -2
- package/dist/api/resources/apiKeys/client/Client.js +14 -9
- package/dist/api/resources/chat/client/Client.d.ts +3 -2
- package/dist/api/resources/chat/client/Client.js +26 -17
- package/dist/api/resources/connections/client/Client.d.ts +3 -2
- package/dist/api/resources/connections/client/Client.js +38 -25
- package/dist/api/resources/destinations/client/Client.d.ts +3 -2
- package/dist/api/resources/destinations/client/Client.js +8 -5
- package/dist/api/resources/embeddingModels/client/Client.d.ts +3 -2
- package/dist/api/resources/embeddingModels/client/Client.js +8 -5
- package/dist/api/resources/health/client/Client.d.ts +3 -2
- package/dist/api/resources/health/client/Client.js +5 -3
- package/dist/api/resources/sources/client/Client.d.ts +3 -2
- package/dist/api/resources/sources/client/Client.js +8 -5
- package/dist/api/resources/sync/client/Client.d.ts +3 -2
- package/dist/api/resources/sync/client/Client.js +26 -17
- package/dist/api/resources/users/client/Client.d.ts +3 -2
- package/dist/api/resources/users/client/Client.js +5 -3
- package/dist/api/resources/whiteLabels/client/Client.d.ts +4 -3
- package/dist/api/resources/whiteLabels/client/Client.js +27 -18
- package/dist/api/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +2 -2
- package/dist/api/types/WhiteLabel.d.ts +1 -1
- package/dist/environments.d.ts +8 -0
- package/dist/environments.js +10 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/dist/serialization/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +1 -1
- package/dist/serialization/resources/whiteLabels/client/requests/WhiteLabelCreate.js +1 -1
- package/dist/serialization/types/WhiteLabel.d.ts +1 -1
- package/dist/serialization/types/WhiteLabel.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/environments.d.ts +8 -0
- package/environments.js +10 -0
- package/index.d.ts +1 -0
- package/index.js +3 -1
- package/package.json +1 -1
- package/reference.md +1 -1
- package/serialization/resources/whiteLabels/client/requests/WhiteLabelCreate.d.ts +1 -1
- package/serialization/resources/whiteLabels/client/requests/WhiteLabelCreate.js +1 -1
- package/serialization/types/WhiteLabel.d.ts +1 -1
- package/serialization/types/WhiteLabel.js +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -49,13 +49,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
49
49
|
};
|
|
50
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
51
|
exports.Connections = void 0;
|
|
52
|
+
const environments = __importStar(require("../../../../environments"));
|
|
52
53
|
const core = __importStar(require("../../../../core"));
|
|
53
54
|
const AirweaveSDK = __importStar(require("../../../index"));
|
|
54
55
|
const url_join_1 = __importDefault(require("url-join"));
|
|
55
56
|
const serializers = __importStar(require("../../../../serialization/index"));
|
|
56
57
|
const errors = __importStar(require("../../../../errors/index"));
|
|
57
58
|
class Connections {
|
|
58
|
-
constructor(_options) {
|
|
59
|
+
constructor(_options = {}) {
|
|
59
60
|
this._options = _options;
|
|
60
61
|
}
|
|
61
62
|
/**
|
|
@@ -71,12 +72,13 @@ class Connections {
|
|
|
71
72
|
*/
|
|
72
73
|
getConnection(connectionId, requestOptions) {
|
|
73
74
|
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
var _a;
|
|
74
76
|
const _response = yield core.fetcher({
|
|
75
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `connections/detail/${encodeURIComponent(connectionId)}`),
|
|
77
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/detail/${encodeURIComponent(connectionId)}`),
|
|
76
78
|
method: "GET",
|
|
77
79
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
78
80
|
? yield core.Supplier.get(this._options.apiKey)
|
|
79
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
81
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@airweave/sdk/0.1.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
80
82
|
contentType: "application/json",
|
|
81
83
|
requestType: "json",
|
|
82
84
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -134,12 +136,13 @@ class Connections {
|
|
|
134
136
|
*/
|
|
135
137
|
listAllConnectedIntegrations(requestOptions) {
|
|
136
138
|
return __awaiter(this, void 0, void 0, function* () {
|
|
139
|
+
var _a;
|
|
137
140
|
const _response = yield core.fetcher({
|
|
138
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "connections/list"),
|
|
141
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "connections/list"),
|
|
139
142
|
method: "GET",
|
|
140
143
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
141
144
|
? yield core.Supplier.get(this._options.apiKey)
|
|
142
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
145
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@airweave/sdk/0.1.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
143
146
|
contentType: "application/json",
|
|
144
147
|
requestType: "json",
|
|
145
148
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -206,12 +209,13 @@ class Connections {
|
|
|
206
209
|
*/
|
|
207
210
|
listConnectedIntegrations(integrationType, requestOptions) {
|
|
208
211
|
return __awaiter(this, void 0, void 0, function* () {
|
|
212
|
+
var _a;
|
|
209
213
|
const _response = yield core.fetcher({
|
|
210
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `connections/list/${encodeURIComponent(serializers.IntegrationType.jsonOrThrow(integrationType))}`),
|
|
214
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/list/${encodeURIComponent(serializers.IntegrationType.jsonOrThrow(integrationType))}`),
|
|
211
215
|
method: "GET",
|
|
212
216
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
213
217
|
? yield core.Supplier.get(this._options.apiKey)
|
|
214
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
218
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@airweave/sdk/0.1.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
215
219
|
contentType: "application/json",
|
|
216
220
|
requestType: "json",
|
|
217
221
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -284,12 +288,13 @@ class Connections {
|
|
|
284
288
|
*/
|
|
285
289
|
connectIntegration(integrationType, shortName, request, requestOptions) {
|
|
286
290
|
return __awaiter(this, void 0, void 0, function* () {
|
|
291
|
+
var _a;
|
|
287
292
|
const _response = yield core.fetcher({
|
|
288
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `connections/connect/${encodeURIComponent(serializers.IntegrationType.jsonOrThrow(integrationType))}/${encodeURIComponent(shortName)}`),
|
|
293
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/connect/${encodeURIComponent(serializers.IntegrationType.jsonOrThrow(integrationType))}/${encodeURIComponent(shortName)}`),
|
|
289
294
|
method: "POST",
|
|
290
295
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
291
296
|
? yield core.Supplier.get(this._options.apiKey)
|
|
292
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
297
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@airweave/sdk/0.1.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
293
298
|
contentType: "application/json",
|
|
294
299
|
requestType: "json",
|
|
295
300
|
body: serializers.BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -357,12 +362,13 @@ class Connections {
|
|
|
357
362
|
*/
|
|
358
363
|
getConnectionCredentials(connectionId, requestOptions) {
|
|
359
364
|
return __awaiter(this, void 0, void 0, function* () {
|
|
365
|
+
var _a;
|
|
360
366
|
const _response = yield core.fetcher({
|
|
361
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `connections/credentials/${encodeURIComponent(connectionId)}`),
|
|
367
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/credentials/${encodeURIComponent(connectionId)}`),
|
|
362
368
|
method: "GET",
|
|
363
369
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
364
370
|
? yield core.Supplier.get(this._options.apiKey)
|
|
365
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
371
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@airweave/sdk/0.1.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
366
372
|
contentType: "application/json",
|
|
367
373
|
requestType: "json",
|
|
368
374
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -432,12 +438,13 @@ class Connections {
|
|
|
432
438
|
*/
|
|
433
439
|
deleteConnection(connectionId, requestOptions) {
|
|
434
440
|
return __awaiter(this, void 0, void 0, function* () {
|
|
441
|
+
var _a;
|
|
435
442
|
const _response = yield core.fetcher({
|
|
436
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `connections/delete/source/${encodeURIComponent(connectionId)}`),
|
|
443
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/delete/source/${encodeURIComponent(connectionId)}`),
|
|
437
444
|
method: "DELETE",
|
|
438
445
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
439
446
|
? yield core.Supplier.get(this._options.apiKey)
|
|
440
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
447
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@airweave/sdk/0.1.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
441
448
|
contentType: "application/json",
|
|
442
449
|
requestType: "json",
|
|
443
450
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -503,12 +510,13 @@ class Connections {
|
|
|
503
510
|
*/
|
|
504
511
|
disconnectSourceConnection(connectionId, requestOptions) {
|
|
505
512
|
return __awaiter(this, void 0, void 0, function* () {
|
|
513
|
+
var _a;
|
|
506
514
|
const _response = yield core.fetcher({
|
|
507
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `connections/disconnect/source/${encodeURIComponent(connectionId)}`),
|
|
515
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/disconnect/source/${encodeURIComponent(connectionId)}`),
|
|
508
516
|
method: "PUT",
|
|
509
517
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
510
518
|
? yield core.Supplier.get(this._options.apiKey)
|
|
511
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
519
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@airweave/sdk/0.1.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
512
520
|
contentType: "application/json",
|
|
513
521
|
requestType: "json",
|
|
514
522
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -575,12 +583,13 @@ class Connections {
|
|
|
575
583
|
*/
|
|
576
584
|
disconnectDestinationConnection(connectionId, requestOptions) {
|
|
577
585
|
return __awaiter(this, void 0, void 0, function* () {
|
|
586
|
+
var _a;
|
|
578
587
|
const _response = yield core.fetcher({
|
|
579
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `connections/disconnect/destination/${encodeURIComponent(connectionId)}`),
|
|
588
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/disconnect/destination/${encodeURIComponent(connectionId)}`),
|
|
580
589
|
method: "PUT",
|
|
581
590
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
582
591
|
? yield core.Supplier.get(this._options.apiKey)
|
|
583
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
592
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@airweave/sdk/0.1.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
584
593
|
contentType: "application/json",
|
|
585
594
|
requestType: "json",
|
|
586
595
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -641,15 +650,16 @@ class Connections {
|
|
|
641
650
|
*/
|
|
642
651
|
getOauth2AuthUrl(request, requestOptions) {
|
|
643
652
|
return __awaiter(this, void 0, void 0, function* () {
|
|
653
|
+
var _a;
|
|
644
654
|
const { shortName } = request;
|
|
645
655
|
const _queryParams = {};
|
|
646
656
|
_queryParams["short_name"] = shortName;
|
|
647
657
|
const _response = yield core.fetcher({
|
|
648
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "connections/oauth2/source/auth_url"),
|
|
658
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "connections/oauth2/source/auth_url"),
|
|
649
659
|
method: "GET",
|
|
650
660
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
651
661
|
? yield core.Supplier.get(this._options.apiKey)
|
|
652
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
662
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@airweave/sdk/0.1.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
653
663
|
contentType: "application/json",
|
|
654
664
|
queryParameters: _queryParams,
|
|
655
665
|
requestType: "json",
|
|
@@ -717,12 +727,13 @@ class Connections {
|
|
|
717
727
|
*/
|
|
718
728
|
sendOauth2Code(request, requestOptions) {
|
|
719
729
|
return __awaiter(this, void 0, void 0, function* () {
|
|
730
|
+
var _a;
|
|
720
731
|
const _response = yield core.fetcher({
|
|
721
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "connections/oauth2/source/code"),
|
|
732
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "connections/oauth2/source/code"),
|
|
722
733
|
method: "POST",
|
|
723
734
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
724
735
|
? yield core.Supplier.get(this._options.apiKey)
|
|
725
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
736
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@airweave/sdk/0.1.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
726
737
|
contentType: "application/json",
|
|
727
738
|
requestType: "json",
|
|
728
739
|
body: serializers.BodySendOauth2CodeConnectionsOauth2SourceCodePost.jsonOrThrow(request, {
|
|
@@ -785,12 +796,13 @@ class Connections {
|
|
|
785
796
|
*/
|
|
786
797
|
sendOauth2WhiteLabelCode(whiteLabelId, request, requestOptions) {
|
|
787
798
|
return __awaiter(this, void 0, void 0, function* () {
|
|
799
|
+
var _a;
|
|
788
800
|
const _response = yield core.fetcher({
|
|
789
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `connections/oauth2/white-label/${encodeURIComponent(whiteLabelId)}/code`),
|
|
801
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/oauth2/white-label/${encodeURIComponent(whiteLabelId)}/code`),
|
|
790
802
|
method: "POST",
|
|
791
803
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
792
804
|
? yield core.Supplier.get(this._options.apiKey)
|
|
793
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
805
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@airweave/sdk/0.1.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
794
806
|
contentType: "application/json",
|
|
795
807
|
requestType: "json",
|
|
796
808
|
body: serializers.connections.sendOauth2WhiteLabelCode.Request.jsonOrThrow(request, {
|
|
@@ -852,12 +864,13 @@ class Connections {
|
|
|
852
864
|
*/
|
|
853
865
|
getOauth2WhiteLabelAuthUrl(whiteLabelId, requestOptions) {
|
|
854
866
|
return __awaiter(this, void 0, void 0, function* () {
|
|
867
|
+
var _a;
|
|
855
868
|
const _response = yield core.fetcher({
|
|
856
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `connections/oauth2/white-label/${encodeURIComponent(whiteLabelId)}/auth_url`),
|
|
869
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/oauth2/white-label/${encodeURIComponent(whiteLabelId)}/auth_url`),
|
|
857
870
|
method: "GET",
|
|
858
871
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
859
872
|
? yield core.Supplier.get(this._options.apiKey)
|
|
860
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
873
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@airweave/sdk/0.1.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
861
874
|
contentType: "application/json",
|
|
862
875
|
requestType: "json",
|
|
863
876
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as environments from "../../../../environments";
|
|
4
5
|
import * as core from "../../../../core";
|
|
5
6
|
import * as AirweaveSDK from "../../../index";
|
|
6
7
|
export declare namespace Destinations {
|
|
7
8
|
interface Options {
|
|
8
|
-
environment
|
|
9
|
+
environment?: core.Supplier<environments.AirweaveSDKEnvironment | string>;
|
|
9
10
|
/** Override the x-api-key header */
|
|
10
11
|
apiKey?: core.Supplier<string | undefined>;
|
|
11
12
|
}
|
|
@@ -24,7 +25,7 @@ export declare namespace Destinations {
|
|
|
24
25
|
}
|
|
25
26
|
export declare class Destinations {
|
|
26
27
|
protected readonly _options: Destinations.Options;
|
|
27
|
-
constructor(_options
|
|
28
|
+
constructor(_options?: Destinations.Options);
|
|
28
29
|
/**
|
|
29
30
|
* Get all available destinations.
|
|
30
31
|
*
|
|
@@ -49,13 +49,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
49
49
|
};
|
|
50
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
51
|
exports.Destinations = void 0;
|
|
52
|
+
const environments = __importStar(require("../../../../environments"));
|
|
52
53
|
const core = __importStar(require("../../../../core"));
|
|
53
54
|
const AirweaveSDK = __importStar(require("../../../index"));
|
|
54
55
|
const url_join_1 = __importDefault(require("url-join"));
|
|
55
56
|
const serializers = __importStar(require("../../../../serialization/index"));
|
|
56
57
|
const errors = __importStar(require("../../../../errors/index"));
|
|
57
58
|
class Destinations {
|
|
58
|
-
constructor(_options) {
|
|
59
|
+
constructor(_options = {}) {
|
|
59
60
|
this._options = _options;
|
|
60
61
|
}
|
|
61
62
|
/**
|
|
@@ -70,12 +71,13 @@ class Destinations {
|
|
|
70
71
|
*/
|
|
71
72
|
listDestinations(requestOptions) {
|
|
72
73
|
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
var _a;
|
|
73
75
|
const _response = yield core.fetcher({
|
|
74
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "destinations/list"),
|
|
76
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "destinations/list"),
|
|
75
77
|
method: "GET",
|
|
76
78
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
77
79
|
? yield core.Supplier.get(this._options.apiKey)
|
|
78
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
80
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@airweave/sdk/0.1.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
79
81
|
contentType: "application/json",
|
|
80
82
|
requestType: "json",
|
|
81
83
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -134,12 +136,13 @@ class Destinations {
|
|
|
134
136
|
*/
|
|
135
137
|
readDestination(shortName, requestOptions) {
|
|
136
138
|
return __awaiter(this, void 0, void 0, function* () {
|
|
139
|
+
var _a;
|
|
137
140
|
const _response = yield core.fetcher({
|
|
138
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `destinations/detail/${encodeURIComponent(shortName)}`),
|
|
141
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `destinations/detail/${encodeURIComponent(shortName)}`),
|
|
139
142
|
method: "GET",
|
|
140
143
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
141
144
|
? yield core.Supplier.get(this._options.apiKey)
|
|
142
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
145
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@airweave/sdk/0.1.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
143
146
|
contentType: "application/json",
|
|
144
147
|
requestType: "json",
|
|
145
148
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as environments from "../../../../environments";
|
|
4
5
|
import * as core from "../../../../core";
|
|
5
6
|
import * as AirweaveSDK from "../../../index";
|
|
6
7
|
export declare namespace EmbeddingModels {
|
|
7
8
|
interface Options {
|
|
8
|
-
environment
|
|
9
|
+
environment?: core.Supplier<environments.AirweaveSDKEnvironment | string>;
|
|
9
10
|
/** Override the x-api-key header */
|
|
10
11
|
apiKey?: core.Supplier<string | undefined>;
|
|
11
12
|
}
|
|
@@ -24,7 +25,7 @@ export declare namespace EmbeddingModels {
|
|
|
24
25
|
}
|
|
25
26
|
export declare class EmbeddingModels {
|
|
26
27
|
protected readonly _options: EmbeddingModels.Options;
|
|
27
|
-
constructor(_options
|
|
28
|
+
constructor(_options?: EmbeddingModels.Options);
|
|
28
29
|
/**
|
|
29
30
|
* Get embedding model by id.
|
|
30
31
|
*
|
|
@@ -49,13 +49,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
49
49
|
};
|
|
50
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
51
|
exports.EmbeddingModels = void 0;
|
|
52
|
+
const environments = __importStar(require("../../../../environments"));
|
|
52
53
|
const core = __importStar(require("../../../../core"));
|
|
53
54
|
const AirweaveSDK = __importStar(require("../../../index"));
|
|
54
55
|
const url_join_1 = __importDefault(require("url-join"));
|
|
55
56
|
const serializers = __importStar(require("../../../../serialization/index"));
|
|
56
57
|
const errors = __importStar(require("../../../../errors/index"));
|
|
57
58
|
class EmbeddingModels {
|
|
58
|
-
constructor(_options) {
|
|
59
|
+
constructor(_options = {}) {
|
|
59
60
|
this._options = _options;
|
|
60
61
|
}
|
|
61
62
|
/**
|
|
@@ -81,12 +82,13 @@ class EmbeddingModels {
|
|
|
81
82
|
*/
|
|
82
83
|
readEmbeddingModel(shortName, requestOptions) {
|
|
83
84
|
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
var _a;
|
|
84
86
|
const _response = yield core.fetcher({
|
|
85
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `embedding_models/detail/${encodeURIComponent(shortName)}`),
|
|
87
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `embedding_models/detail/${encodeURIComponent(shortName)}`),
|
|
86
88
|
method: "GET",
|
|
87
89
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
88
90
|
? yield core.Supplier.get(this._options.apiKey)
|
|
89
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
91
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@airweave/sdk/0.1.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
90
92
|
contentType: "application/json",
|
|
91
93
|
requestType: "json",
|
|
92
94
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -153,12 +155,13 @@ class EmbeddingModels {
|
|
|
153
155
|
*/
|
|
154
156
|
readEmbeddingModels(requestOptions) {
|
|
155
157
|
return __awaiter(this, void 0, void 0, function* () {
|
|
158
|
+
var _a;
|
|
156
159
|
const _response = yield core.fetcher({
|
|
157
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "embedding_models/list"),
|
|
160
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "embedding_models/list"),
|
|
158
161
|
method: "GET",
|
|
159
162
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
160
163
|
? yield core.Supplier.get(this._options.apiKey)
|
|
161
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
164
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@airweave/sdk/0.1.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
162
165
|
contentType: "application/json",
|
|
163
166
|
requestType: "json",
|
|
164
167
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as environments from "../../../../environments";
|
|
4
5
|
import * as core from "../../../../core";
|
|
5
6
|
export declare namespace Health {
|
|
6
7
|
interface Options {
|
|
7
|
-
environment
|
|
8
|
+
environment?: core.Supplier<environments.AirweaveSDKEnvironment | string>;
|
|
8
9
|
/** Override the x-api-key header */
|
|
9
10
|
apiKey?: core.Supplier<string | undefined>;
|
|
10
11
|
}
|
|
@@ -23,7 +24,7 @@ export declare namespace Health {
|
|
|
23
24
|
}
|
|
24
25
|
export declare class Health {
|
|
25
26
|
protected readonly _options: Health.Options;
|
|
26
|
-
constructor(_options
|
|
27
|
+
constructor(_options?: Health.Options);
|
|
27
28
|
/**
|
|
28
29
|
* Check if the API is healthy.
|
|
29
30
|
*
|
|
@@ -49,12 +49,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
49
49
|
};
|
|
50
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
51
|
exports.Health = void 0;
|
|
52
|
+
const environments = __importStar(require("../../../../environments"));
|
|
52
53
|
const core = __importStar(require("../../../../core"));
|
|
53
54
|
const url_join_1 = __importDefault(require("url-join"));
|
|
54
55
|
const serializers = __importStar(require("../../../../serialization/index"));
|
|
55
56
|
const errors = __importStar(require("../../../../errors/index"));
|
|
56
57
|
class Health {
|
|
57
|
-
constructor(_options) {
|
|
58
|
+
constructor(_options = {}) {
|
|
58
59
|
this._options = _options;
|
|
59
60
|
}
|
|
60
61
|
/**
|
|
@@ -70,12 +71,13 @@ class Health {
|
|
|
70
71
|
*/
|
|
71
72
|
healthCheck(requestOptions) {
|
|
72
73
|
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
var _a;
|
|
73
75
|
const _response = yield core.fetcher({
|
|
74
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "health"),
|
|
76
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "health"),
|
|
75
77
|
method: "GET",
|
|
76
78
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
77
79
|
? yield core.Supplier.get(this._options.apiKey)
|
|
78
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
80
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@airweave/sdk/0.1.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
79
81
|
contentType: "application/json",
|
|
80
82
|
requestType: "json",
|
|
81
83
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as environments from "../../../../environments";
|
|
4
5
|
import * as core from "../../../../core";
|
|
5
6
|
import * as AirweaveSDK from "../../../index";
|
|
6
7
|
export declare namespace Sources {
|
|
7
8
|
interface Options {
|
|
8
|
-
environment
|
|
9
|
+
environment?: core.Supplier<environments.AirweaveSDKEnvironment | string>;
|
|
9
10
|
/** Override the x-api-key header */
|
|
10
11
|
apiKey?: core.Supplier<string | undefined>;
|
|
11
12
|
}
|
|
@@ -24,7 +25,7 @@ export declare namespace Sources {
|
|
|
24
25
|
}
|
|
25
26
|
export declare class Sources {
|
|
26
27
|
protected readonly _options: Sources.Options;
|
|
27
|
-
constructor(_options
|
|
28
|
+
constructor(_options?: Sources.Options);
|
|
28
29
|
/**
|
|
29
30
|
* Get source by id.
|
|
30
31
|
*
|
|
@@ -49,13 +49,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
49
49
|
};
|
|
50
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
51
|
exports.Sources = void 0;
|
|
52
|
+
const environments = __importStar(require("../../../../environments"));
|
|
52
53
|
const core = __importStar(require("../../../../core"));
|
|
53
54
|
const AirweaveSDK = __importStar(require("../../../index"));
|
|
54
55
|
const url_join_1 = __importDefault(require("url-join"));
|
|
55
56
|
const serializers = __importStar(require("../../../../serialization/index"));
|
|
56
57
|
const errors = __importStar(require("../../../../errors/index"));
|
|
57
58
|
class Sources {
|
|
58
|
-
constructor(_options) {
|
|
59
|
+
constructor(_options = {}) {
|
|
59
60
|
this._options = _options;
|
|
60
61
|
}
|
|
61
62
|
/**
|
|
@@ -81,12 +82,13 @@ class Sources {
|
|
|
81
82
|
*/
|
|
82
83
|
readSource(shortName, requestOptions) {
|
|
83
84
|
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
var _a;
|
|
84
86
|
const _response = yield core.fetcher({
|
|
85
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `sources/detail/${encodeURIComponent(shortName)}`),
|
|
87
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `sources/detail/${encodeURIComponent(shortName)}`),
|
|
86
88
|
method: "GET",
|
|
87
89
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
88
90
|
? yield core.Supplier.get(this._options.apiKey)
|
|
89
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
91
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@airweave/sdk/0.1.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
90
92
|
contentType: "application/json",
|
|
91
93
|
requestType: "json",
|
|
92
94
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -148,12 +150,13 @@ class Sources {
|
|
|
148
150
|
*/
|
|
149
151
|
readSources(requestOptions) {
|
|
150
152
|
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
+
var _a;
|
|
151
154
|
const _response = yield core.fetcher({
|
|
152
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "sources/list"),
|
|
155
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "sources/list"),
|
|
153
156
|
method: "GET",
|
|
154
157
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
155
158
|
? yield core.Supplier.get(this._options.apiKey)
|
|
156
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.
|
|
159
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@airweave/sdk/0.1.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
157
160
|
contentType: "application/json",
|
|
158
161
|
requestType: "json",
|
|
159
162
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as environments from "../../../../environments";
|
|
4
5
|
import * as core from "../../../../core";
|
|
5
6
|
import * as AirweaveSDK from "../../../index";
|
|
6
7
|
export declare namespace Sync {
|
|
7
8
|
interface Options {
|
|
8
|
-
environment
|
|
9
|
+
environment?: core.Supplier<environments.AirweaveSDKEnvironment | string>;
|
|
9
10
|
/** Override the x-api-key header */
|
|
10
11
|
apiKey?: core.Supplier<string | undefined>;
|
|
11
12
|
}
|
|
@@ -24,7 +25,7 @@ export declare namespace Sync {
|
|
|
24
25
|
}
|
|
25
26
|
export declare class Sync {
|
|
26
27
|
protected readonly _options: Sync.Options;
|
|
27
|
-
constructor(_options
|
|
28
|
+
constructor(_options?: Sync.Options);
|
|
28
29
|
/**
|
|
29
30
|
* List all syncs for the current user.
|
|
30
31
|
*
|