@airweave/sdk 0.1.28 → 0.2.0
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 -3
- package/Client.js +6 -6
- package/api/resources/connections/client/Client.d.ts +1 -43
- package/api/resources/connections/client/Client.js +11 -163
- package/api/resources/connections/client/requests/index.d.ts +0 -1
- package/api/resources/destinations/client/Client.js +2 -2
- package/api/resources/embeddingModels/client/Client.js +2 -2
- package/api/resources/entities/client/Client.js +8 -8
- package/api/resources/index.d.ts +2 -2
- package/api/resources/index.js +3 -3
- package/api/resources/search/client/Client.d.ts +55 -0
- package/api/resources/search/client/Client.js +147 -0
- package/api/resources/search/client/requests/SearchSearchGetRequest.d.ts +20 -0
- package/api/resources/search/client/requests/index.d.ts +1 -0
- package/api/resources/sources/client/Client.js +2 -2
- package/api/resources/sync/client/Client.js +11 -11
- package/api/resources/transformers/client/Client.js +3 -3
- package/api/resources/users/client/Client.js +1 -1
- package/api/resources/whiteLabels/client/Client.js +8 -8
- package/api/types/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.d.ts +7 -0
- package/api/types/SyncDagCreate.d.ts +14 -0
- package/{dist/api/resources/dag/client/requests → api/types}/SyncDagUpdate.d.ts +3 -7
- package/api/types/index.d.ts +3 -0
- package/api/types/index.js +3 -0
- package/dist/Client.d.ts +3 -3
- package/dist/Client.js +6 -6
- package/dist/api/resources/connections/client/Client.d.ts +1 -43
- package/dist/api/resources/connections/client/Client.js +11 -163
- package/dist/api/resources/connections/client/requests/index.d.ts +0 -1
- package/dist/api/resources/destinations/client/Client.js +2 -2
- package/dist/api/resources/embeddingModels/client/Client.js +2 -2
- package/dist/api/resources/entities/client/Client.js +8 -8
- package/dist/api/resources/index.d.ts +2 -2
- package/dist/api/resources/index.js +3 -3
- package/dist/api/resources/search/client/Client.d.ts +55 -0
- package/dist/api/resources/search/client/Client.js +147 -0
- package/dist/api/resources/search/client/requests/SearchSearchGetRequest.d.ts +20 -0
- package/dist/api/resources/search/client/requests/index.d.ts +1 -0
- package/dist/api/resources/sources/client/Client.js +2 -2
- package/dist/api/resources/sync/client/Client.js +11 -11
- package/dist/api/resources/transformers/client/Client.js +3 -3
- package/dist/api/resources/users/client/Client.js +1 -1
- package/dist/api/resources/whiteLabels/client/Client.js +8 -8
- package/dist/api/types/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.d.ts +7 -0
- package/dist/api/types/SyncDagCreate.d.ts +14 -0
- package/{api/resources/dag/client/requests → dist/api/types}/SyncDagUpdate.d.ts +3 -7
- package/dist/api/types/index.d.ts +3 -0
- package/dist/api/types/index.js +3 -0
- package/dist/serialization/resources/connections/client/index.d.ts +0 -1
- package/dist/serialization/resources/connections/client/index.js +1 -2
- package/dist/serialization/resources/index.d.ts +1 -2
- package/dist/serialization/resources/index.js +2 -3
- package/dist/serialization/resources/search/client/index.d.ts +1 -0
- package/dist/serialization/resources/search/client/index.js +37 -0
- package/dist/serialization/resources/{connections/client/getOauth2AuthUrl.d.ts → search/client/search.d.ts} +2 -2
- package/dist/serialization/resources/{connections/client/getOauth2AuthUrl.js → search/client/search.js} +1 -1
- package/dist/serialization/types/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.d.ts +13 -0
- package/dist/serialization/types/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.js +44 -0
- package/dist/serialization/types/SyncDagCreate.d.ts +18 -0
- package/{serialization/resources/dag/client/requests → dist/serialization/types}/SyncDagCreate.js +4 -4
- package/dist/serialization/types/SyncDagUpdate.d.ts +18 -0
- package/dist/serialization/{resources/dag/client/requests → types}/SyncDagUpdate.js +4 -4
- package/dist/serialization/types/index.d.ts +3 -0
- package/dist/serialization/types/index.js +3 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +80 -435
- package/serialization/resources/connections/client/index.d.ts +0 -1
- package/serialization/resources/connections/client/index.js +1 -2
- package/serialization/resources/index.d.ts +1 -2
- package/serialization/resources/index.js +2 -3
- package/serialization/resources/search/client/index.d.ts +1 -0
- package/serialization/resources/search/client/index.js +37 -0
- package/serialization/resources/{connections/client/getOauth2AuthUrl.d.ts → search/client/search.d.ts} +2 -2
- package/serialization/resources/{connections/client/getOauth2AuthUrl.js → search/client/search.js} +1 -1
- package/serialization/types/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.d.ts +13 -0
- package/serialization/types/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.js +44 -0
- package/serialization/types/SyncDagCreate.d.ts +18 -0
- package/{dist/serialization/resources/dag/client/requests → serialization/types}/SyncDagCreate.js +4 -4
- package/serialization/types/SyncDagUpdate.d.ts +18 -0
- package/serialization/{resources/dag/client/requests → types}/SyncDagUpdate.js +4 -4
- package/serialization/types/index.d.ts +3 -0
- package/serialization/types/index.js +3 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/connections/client/requests/GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest.d.ts +0 -12
- package/api/resources/dag/client/Client.d.ts +0 -95
- package/api/resources/dag/client/Client.js +0 -347
- package/api/resources/dag/client/requests/InitializeDagDagInitGetRequest.d.ts +0 -12
- package/api/resources/dag/client/requests/SyncDagCreate.d.ts +0 -26
- package/api/resources/dag/client/requests/index.d.ts +0 -3
- package/dist/api/resources/connections/client/requests/GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest.d.ts +0 -12
- package/dist/api/resources/dag/client/Client.d.ts +0 -95
- package/dist/api/resources/dag/client/Client.js +0 -347
- package/dist/api/resources/dag/client/requests/InitializeDagDagInitGetRequest.d.ts +0 -12
- package/dist/api/resources/dag/client/requests/SyncDagCreate.d.ts +0 -26
- package/dist/api/resources/dag/client/requests/index.d.ts +0 -3
- package/dist/serialization/resources/dag/client/index.d.ts +0 -1
- package/dist/serialization/resources/dag/client/index.js +0 -17
- package/dist/serialization/resources/dag/client/requests/SyncDagCreate.d.ts +0 -18
- package/dist/serialization/resources/dag/client/requests/SyncDagUpdate.d.ts +0 -18
- package/dist/serialization/resources/dag/client/requests/index.d.ts +0 -2
- package/dist/serialization/resources/dag/client/requests/index.js +0 -7
- package/serialization/resources/dag/client/index.d.ts +0 -1
- package/serialization/resources/dag/client/index.js +0 -17
- package/serialization/resources/dag/client/requests/SyncDagCreate.d.ts +0 -18
- package/serialization/resources/dag/client/requests/SyncDagUpdate.d.ts +0 -18
- package/serialization/resources/dag/client/requests/index.d.ts +0 -2
- package/serialization/resources/dag/client/requests/index.js +0 -7
- /package/api/resources/{dag → search}/client/index.d.ts +0 -0
- /package/api/resources/{dag → search}/client/index.js +0 -0
- /package/api/resources/{connections/client/requests/GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest.js → search/client/requests/SearchSearchGetRequest.js} +0 -0
- /package/api/resources/{dag → search}/client/requests/index.js +0 -0
- /package/api/resources/{dag → search}/index.d.ts +0 -0
- /package/api/resources/{dag → search}/index.js +0 -0
- /package/api/{resources/dag/client/requests/InitializeDagDagInitGetRequest.js → types/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.js} +0 -0
- /package/api/{resources/dag/client/requests → types}/SyncDagCreate.js +0 -0
- /package/api/{resources/dag/client/requests → types}/SyncDagUpdate.js +0 -0
- /package/dist/api/resources/{dag → search}/client/index.d.ts +0 -0
- /package/dist/api/resources/{dag → search}/client/index.js +0 -0
- /package/dist/api/resources/{connections/client/requests/GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest.js → search/client/requests/SearchSearchGetRequest.js} +0 -0
- /package/dist/api/resources/{dag → search}/client/requests/index.js +0 -0
- /package/dist/api/resources/{dag → search}/index.d.ts +0 -0
- /package/dist/api/resources/{dag → search}/index.js +0 -0
- /package/dist/api/{resources/dag/client/requests/InitializeDagDagInitGetRequest.js → types/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.js} +0 -0
- /package/dist/api/{resources/dag/client/requests → types}/SyncDagCreate.js +0 -0
- /package/dist/api/{resources/dag/client/requests → types}/SyncDagUpdate.js +0 -0
- /package/dist/serialization/resources/{dag → search}/index.d.ts +0 -0
- /package/dist/serialization/resources/{dag → search}/index.js +0 -0
- /package/serialization/resources/{dag → search}/index.d.ts +0 -0
- /package/serialization/resources/{dag → search}/index.js +0 -0
|
@@ -88,7 +88,7 @@ class Connections {
|
|
|
88
88
|
method: "GET",
|
|
89
89
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
90
90
|
? yield core.Supplier.get(this._options.apiKey)
|
|
91
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.
|
|
91
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
92
92
|
contentType: "application/json",
|
|
93
93
|
requestType: "json",
|
|
94
94
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -161,7 +161,7 @@ class Connections {
|
|
|
161
161
|
method: "GET",
|
|
162
162
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
163
163
|
? yield core.Supplier.get(this._options.apiKey)
|
|
164
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.
|
|
164
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
165
165
|
contentType: "application/json",
|
|
166
166
|
requestType: "json",
|
|
167
167
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -236,7 +236,7 @@ class Connections {
|
|
|
236
236
|
method: "GET",
|
|
237
237
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
238
238
|
? yield core.Supplier.get(this._options.apiKey)
|
|
239
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.
|
|
239
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
240
240
|
contentType: "application/json",
|
|
241
241
|
requestType: "json",
|
|
242
242
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -328,7 +328,7 @@ class Connections {
|
|
|
328
328
|
method: "POST",
|
|
329
329
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
330
330
|
? yield core.Supplier.get(this._options.apiKey)
|
|
331
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.
|
|
331
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
332
332
|
contentType: "application/json",
|
|
333
333
|
requestType: "json",
|
|
334
334
|
body: serializers.BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -404,7 +404,7 @@ class Connections {
|
|
|
404
404
|
method: "GET",
|
|
405
405
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
406
406
|
? yield core.Supplier.get(this._options.apiKey)
|
|
407
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.
|
|
407
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
408
408
|
contentType: "application/json",
|
|
409
409
|
requestType: "json",
|
|
410
410
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -481,7 +481,7 @@ class Connections {
|
|
|
481
481
|
method: "DELETE",
|
|
482
482
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
483
483
|
? yield core.Supplier.get(this._options.apiKey)
|
|
484
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.
|
|
484
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
485
485
|
contentType: "application/json",
|
|
486
486
|
requestType: "json",
|
|
487
487
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -538,7 +538,7 @@ class Connections {
|
|
|
538
538
|
*
|
|
539
539
|
* Returns:
|
|
540
540
|
* --------
|
|
541
|
-
*
|
|
541
|
+
* connection (schemas.Connection): The disconnected connection
|
|
542
542
|
*
|
|
543
543
|
* @param {string} connectionId
|
|
544
544
|
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -556,7 +556,7 @@ class Connections {
|
|
|
556
556
|
method: "PUT",
|
|
557
557
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
558
558
|
? yield core.Supplier.get(this._options.apiKey)
|
|
559
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.
|
|
559
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
560
560
|
contentType: "application/json",
|
|
561
561
|
requestType: "json",
|
|
562
562
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -602,158 +602,6 @@ class Connections {
|
|
|
602
602
|
}
|
|
603
603
|
});
|
|
604
604
|
}
|
|
605
|
-
/**
|
|
606
|
-
* Disconnect from a destination connection.
|
|
607
|
-
*
|
|
608
|
-
* Args:
|
|
609
|
-
* -----
|
|
610
|
-
* db (AsyncSession): The database session
|
|
611
|
-
* connection_id (UUID): The ID of the connection to disconnect
|
|
612
|
-
* user (schemas.User): The current user
|
|
613
|
-
*
|
|
614
|
-
* Returns:
|
|
615
|
-
* --------
|
|
616
|
-
* connection_schema (schemas.Connection): The disconnected connection
|
|
617
|
-
*
|
|
618
|
-
* @param {string} connectionId
|
|
619
|
-
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
620
|
-
*
|
|
621
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
622
|
-
*
|
|
623
|
-
* @example
|
|
624
|
-
* await client.connections.disconnectDestinationConnection("connection_id")
|
|
625
|
-
*/
|
|
626
|
-
disconnectDestinationConnection(connectionId, requestOptions) {
|
|
627
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
628
|
-
var _a;
|
|
629
|
-
const _response = yield core.fetcher({
|
|
630
|
-
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)}`),
|
|
631
|
-
method: "PUT",
|
|
632
|
-
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
633
|
-
? yield core.Supplier.get(this._options.apiKey)
|
|
634
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.28", "User-Agent": "@airweave/sdk/0.1.28", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
635
|
-
contentType: "application/json",
|
|
636
|
-
requestType: "json",
|
|
637
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
638
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
639
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
640
|
-
});
|
|
641
|
-
if (_response.ok) {
|
|
642
|
-
return serializers.Connection.parseOrThrow(_response.body, {
|
|
643
|
-
unrecognizedObjectKeys: "passthrough",
|
|
644
|
-
allowUnrecognizedUnionMembers: true,
|
|
645
|
-
allowUnrecognizedEnumValues: true,
|
|
646
|
-
breadcrumbsPrefix: ["response"],
|
|
647
|
-
});
|
|
648
|
-
}
|
|
649
|
-
if (_response.error.reason === "status-code") {
|
|
650
|
-
switch (_response.error.statusCode) {
|
|
651
|
-
case 422:
|
|
652
|
-
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
653
|
-
unrecognizedObjectKeys: "passthrough",
|
|
654
|
-
allowUnrecognizedUnionMembers: true,
|
|
655
|
-
allowUnrecognizedEnumValues: true,
|
|
656
|
-
breadcrumbsPrefix: ["response"],
|
|
657
|
-
}));
|
|
658
|
-
default:
|
|
659
|
-
throw new errors.AirweaveSDKError({
|
|
660
|
-
statusCode: _response.error.statusCode,
|
|
661
|
-
body: _response.error.body,
|
|
662
|
-
});
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
switch (_response.error.reason) {
|
|
666
|
-
case "non-json":
|
|
667
|
-
throw new errors.AirweaveSDKError({
|
|
668
|
-
statusCode: _response.error.statusCode,
|
|
669
|
-
body: _response.error.rawBody,
|
|
670
|
-
});
|
|
671
|
-
case "timeout":
|
|
672
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling PUT /connections/disconnect/destination/{connection_id}.");
|
|
673
|
-
case "unknown":
|
|
674
|
-
throw new errors.AirweaveSDKError({
|
|
675
|
-
message: _response.error.errorMessage,
|
|
676
|
-
});
|
|
677
|
-
}
|
|
678
|
-
});
|
|
679
|
-
}
|
|
680
|
-
/**
|
|
681
|
-
* Get the OAuth2 authorization URL for a source.
|
|
682
|
-
*
|
|
683
|
-
* Args:
|
|
684
|
-
* -----
|
|
685
|
-
* db: The database session
|
|
686
|
-
* short_name: The short name of the source
|
|
687
|
-
* user: The current user
|
|
688
|
-
*
|
|
689
|
-
* @param {AirweaveSDK.GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest} request
|
|
690
|
-
* @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
|
|
691
|
-
*
|
|
692
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
693
|
-
*
|
|
694
|
-
* @example
|
|
695
|
-
* await client.connections.getOauth2AuthUrl({
|
|
696
|
-
* shortName: "short_name"
|
|
697
|
-
* })
|
|
698
|
-
*/
|
|
699
|
-
getOauth2AuthUrl(request, requestOptions) {
|
|
700
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
701
|
-
var _a;
|
|
702
|
-
const { shortName } = request;
|
|
703
|
-
const _queryParams = {};
|
|
704
|
-
_queryParams["short_name"] = shortName;
|
|
705
|
-
const _response = yield core.fetcher({
|
|
706
|
-
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"),
|
|
707
|
-
method: "GET",
|
|
708
|
-
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
709
|
-
? yield core.Supplier.get(this._options.apiKey)
|
|
710
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.28", "User-Agent": "@airweave/sdk/0.1.28", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
711
|
-
contentType: "application/json",
|
|
712
|
-
queryParameters: _queryParams,
|
|
713
|
-
requestType: "json",
|
|
714
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
715
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
716
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
717
|
-
});
|
|
718
|
-
if (_response.ok) {
|
|
719
|
-
return serializers.connections.getOauth2AuthUrl.Response.parseOrThrow(_response.body, {
|
|
720
|
-
unrecognizedObjectKeys: "passthrough",
|
|
721
|
-
allowUnrecognizedUnionMembers: true,
|
|
722
|
-
allowUnrecognizedEnumValues: true,
|
|
723
|
-
breadcrumbsPrefix: ["response"],
|
|
724
|
-
});
|
|
725
|
-
}
|
|
726
|
-
if (_response.error.reason === "status-code") {
|
|
727
|
-
switch (_response.error.statusCode) {
|
|
728
|
-
case 422:
|
|
729
|
-
throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
730
|
-
unrecognizedObjectKeys: "passthrough",
|
|
731
|
-
allowUnrecognizedUnionMembers: true,
|
|
732
|
-
allowUnrecognizedEnumValues: true,
|
|
733
|
-
breadcrumbsPrefix: ["response"],
|
|
734
|
-
}));
|
|
735
|
-
default:
|
|
736
|
-
throw new errors.AirweaveSDKError({
|
|
737
|
-
statusCode: _response.error.statusCode,
|
|
738
|
-
body: _response.error.body,
|
|
739
|
-
});
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
switch (_response.error.reason) {
|
|
743
|
-
case "non-json":
|
|
744
|
-
throw new errors.AirweaveSDKError({
|
|
745
|
-
statusCode: _response.error.statusCode,
|
|
746
|
-
body: _response.error.rawBody,
|
|
747
|
-
});
|
|
748
|
-
case "timeout":
|
|
749
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /connections/oauth2/source/auth_url.");
|
|
750
|
-
case "unknown":
|
|
751
|
-
throw new errors.AirweaveSDKError({
|
|
752
|
-
message: _response.error.errorMessage,
|
|
753
|
-
});
|
|
754
|
-
}
|
|
755
|
-
});
|
|
756
|
-
}
|
|
757
605
|
/**
|
|
758
606
|
* Send the OAuth2 authorization code for a source.
|
|
759
607
|
*
|
|
@@ -792,7 +640,7 @@ class Connections {
|
|
|
792
640
|
method: "POST",
|
|
793
641
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
794
642
|
? yield core.Supplier.get(this._options.apiKey)
|
|
795
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.
|
|
643
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
796
644
|
contentType: "application/json",
|
|
797
645
|
requestType: "json",
|
|
798
646
|
body: serializers.BodySendOauth2CodeConnectionsOauth2SourceCodePost.jsonOrThrow(request, {
|
|
@@ -873,7 +721,7 @@ class Connections {
|
|
|
873
721
|
method: "POST",
|
|
874
722
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
875
723
|
? yield core.Supplier.get(this._options.apiKey)
|
|
876
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.
|
|
724
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
877
725
|
contentType: "application/json",
|
|
878
726
|
requestType: "json",
|
|
879
727
|
body: serializers.connections.sendOauth2WhiteLabelCode.Request.jsonOrThrow(request, {
|
|
@@ -951,7 +799,7 @@ class Connections {
|
|
|
951
799
|
method: "GET",
|
|
952
800
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
953
801
|
? yield core.Supplier.get(this._options.apiKey)
|
|
954
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.
|
|
802
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
955
803
|
contentType: "application/json",
|
|
956
804
|
requestType: "json",
|
|
957
805
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
export { type BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost } from "./BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost";
|
|
2
|
-
export { type GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest } from "./GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest";
|
|
3
2
|
export { type BodySendOauth2CodeConnectionsOauth2SourceCodePost } from "./BodySendOauth2CodeConnectionsOauth2SourceCodePost";
|
|
@@ -86,7 +86,7 @@ class Destinations {
|
|
|
86
86
|
method: "GET",
|
|
87
87
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
88
88
|
? yield core.Supplier.get(this._options.apiKey)
|
|
89
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.
|
|
89
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
90
90
|
contentType: "application/json",
|
|
91
91
|
requestType: "json",
|
|
92
92
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -161,7 +161,7 @@ class Destinations {
|
|
|
161
161
|
method: "GET",
|
|
162
162
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
163
163
|
? yield core.Supplier.get(this._options.apiKey)
|
|
164
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.
|
|
164
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
165
165
|
contentType: "application/json",
|
|
166
166
|
requestType: "json",
|
|
167
167
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -88,7 +88,7 @@ class EmbeddingModels {
|
|
|
88
88
|
method: "GET",
|
|
89
89
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
90
90
|
? yield core.Supplier.get(this._options.apiKey)
|
|
91
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.
|
|
91
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
92
92
|
contentType: "application/json",
|
|
93
93
|
requestType: "json",
|
|
94
94
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -161,7 +161,7 @@ class EmbeddingModels {
|
|
|
161
161
|
method: "GET",
|
|
162
162
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
163
163
|
? yield core.Supplier.get(this._options.apiKey)
|
|
164
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.
|
|
164
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
165
165
|
contentType: "application/json",
|
|
166
166
|
requestType: "json",
|
|
167
167
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -77,7 +77,7 @@ class Entities {
|
|
|
77
77
|
method: "GET",
|
|
78
78
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
79
79
|
? yield core.Supplier.get(this._options.apiKey)
|
|
80
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.
|
|
80
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
81
81
|
contentType: "application/json",
|
|
82
82
|
requestType: "json",
|
|
83
83
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -148,7 +148,7 @@ class Entities {
|
|
|
148
148
|
method: "POST",
|
|
149
149
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
150
150
|
? yield core.Supplier.get(this._options.apiKey)
|
|
151
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.
|
|
151
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
152
152
|
contentType: "application/json",
|
|
153
153
|
requestType: "json",
|
|
154
154
|
body: serializers.EntityDefinitionCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -221,7 +221,7 @@ class Entities {
|
|
|
221
221
|
method: "PUT",
|
|
222
222
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
223
223
|
? yield core.Supplier.get(this._options.apiKey)
|
|
224
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.
|
|
224
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
225
225
|
contentType: "application/json",
|
|
226
226
|
requestType: "json",
|
|
227
227
|
body: serializers.EntityDefinitionUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -286,7 +286,7 @@ class Entities {
|
|
|
286
286
|
method: "GET",
|
|
287
287
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
288
288
|
? yield core.Supplier.get(this._options.apiKey)
|
|
289
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.
|
|
289
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
290
290
|
contentType: "application/json",
|
|
291
291
|
requestType: "json",
|
|
292
292
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -355,7 +355,7 @@ class Entities {
|
|
|
355
355
|
method: "POST",
|
|
356
356
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
357
357
|
? yield core.Supplier.get(this._options.apiKey)
|
|
358
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.
|
|
358
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
359
359
|
contentType: "application/json",
|
|
360
360
|
requestType: "json",
|
|
361
361
|
body: serializers.EntityRelationCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -426,7 +426,7 @@ class Entities {
|
|
|
426
426
|
method: "PUT",
|
|
427
427
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
428
428
|
? yield core.Supplier.get(this._options.apiKey)
|
|
429
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.
|
|
429
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
430
430
|
contentType: "application/json",
|
|
431
431
|
requestType: "json",
|
|
432
432
|
body: serializers.EntityRelationUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -500,7 +500,7 @@ class Entities {
|
|
|
500
500
|
method: "POST",
|
|
501
501
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
502
502
|
? yield core.Supplier.get(this._options.apiKey)
|
|
503
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.
|
|
503
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
504
504
|
contentType: "application/json",
|
|
505
505
|
requestType: "json",
|
|
506
506
|
body: serializers.entities.getEntityDefinitionsByIds.Request.jsonOrThrow(request, {
|
|
@@ -573,7 +573,7 @@ class Entities {
|
|
|
573
573
|
method: "GET",
|
|
574
574
|
headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
|
|
575
575
|
? yield core.Supplier.get(this._options.apiKey)
|
|
576
|
-
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.
|
|
576
|
+
: undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
577
577
|
contentType: "application/json",
|
|
578
578
|
queryParameters: _queryParams,
|
|
579
579
|
requestType: "json",
|
|
@@ -7,12 +7,12 @@ export * as sources from "./sources";
|
|
|
7
7
|
export * as destinations from "./destinations";
|
|
8
8
|
export * as embeddingModels from "./embeddingModels";
|
|
9
9
|
export * as connections from "./connections";
|
|
10
|
+
export * as search from "./search";
|
|
10
11
|
export * as whiteLabels from "./whiteLabels";
|
|
11
|
-
export * as dag from "./dag";
|
|
12
12
|
export * as transformers from "./transformers";
|
|
13
13
|
export * from "./connections/client/requests";
|
|
14
14
|
export * from "./sync/client/requests";
|
|
15
|
+
export * from "./search/client/requests";
|
|
15
16
|
export * from "./whiteLabels/client/requests";
|
|
16
|
-
export * from "./dag/client/requests";
|
|
17
17
|
export * from "./entities/client/requests";
|
|
18
18
|
export * from "./transformers/client/requests";
|
|
@@ -36,7 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.transformers = exports.
|
|
39
|
+
exports.transformers = exports.whiteLabels = exports.search = exports.connections = exports.embeddingModels = exports.destinations = exports.sources = exports.users = exports.entities = exports.sync = void 0;
|
|
40
40
|
exports.sync = __importStar(require("./sync"));
|
|
41
41
|
__exportStar(require("./sync/types"), exports);
|
|
42
42
|
exports.entities = __importStar(require("./entities"));
|
|
@@ -46,12 +46,12 @@ exports.sources = __importStar(require("./sources"));
|
|
|
46
46
|
exports.destinations = __importStar(require("./destinations"));
|
|
47
47
|
exports.embeddingModels = __importStar(require("./embeddingModels"));
|
|
48
48
|
exports.connections = __importStar(require("./connections"));
|
|
49
|
+
exports.search = __importStar(require("./search"));
|
|
49
50
|
exports.whiteLabels = __importStar(require("./whiteLabels"));
|
|
50
|
-
exports.dag = __importStar(require("./dag"));
|
|
51
51
|
exports.transformers = __importStar(require("./transformers"));
|
|
52
52
|
__exportStar(require("./connections/client/requests"), exports);
|
|
53
53
|
__exportStar(require("./sync/client/requests"), exports);
|
|
54
|
+
__exportStar(require("./search/client/requests"), exports);
|
|
54
55
|
__exportStar(require("./whiteLabels/client/requests"), exports);
|
|
55
|
-
__exportStar(require("./dag/client/requests"), exports);
|
|
56
56
|
__exportStar(require("./entities/client/requests"), exports);
|
|
57
57
|
__exportStar(require("./transformers/client/requests"), exports);
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../environments";
|
|
5
|
+
import * as core from "../../../../core";
|
|
6
|
+
import * as AirweaveSDK from "../../../index";
|
|
7
|
+
export declare namespace Search {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.AirweaveSDKEnvironment | string>;
|
|
10
|
+
/** Override the x-api-key header */
|
|
11
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
12
|
+
}
|
|
13
|
+
interface RequestOptions {
|
|
14
|
+
/** The maximum time to wait for a response in seconds. */
|
|
15
|
+
timeoutInSeconds?: number;
|
|
16
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
17
|
+
maxRetries?: number;
|
|
18
|
+
/** A hook to abort the request. */
|
|
19
|
+
abortSignal?: AbortSignal;
|
|
20
|
+
/** Override the x-api-key header */
|
|
21
|
+
apiKey?: string | undefined;
|
|
22
|
+
/** Additional headers to include in the request. */
|
|
23
|
+
headers?: Record<string, string>;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export declare class Search {
|
|
27
|
+
protected readonly _options: Search.Options;
|
|
28
|
+
constructor(_options?: Search.Options);
|
|
29
|
+
/**
|
|
30
|
+
* Search for documents within a specific sync.
|
|
31
|
+
*
|
|
32
|
+
* Args:
|
|
33
|
+
* -----
|
|
34
|
+
* db: The database session
|
|
35
|
+
* sync_id: The ID of the sync to search within
|
|
36
|
+
* query: The search query text
|
|
37
|
+
* user: The current user
|
|
38
|
+
*
|
|
39
|
+
* Returns:
|
|
40
|
+
* --------
|
|
41
|
+
* list[dict]: A list of search results
|
|
42
|
+
*
|
|
43
|
+
* @param {AirweaveSDK.SearchSearchGetRequest} request
|
|
44
|
+
* @param {Search.RequestOptions} requestOptions - Request-specific configuration.
|
|
45
|
+
*
|
|
46
|
+
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* await client.search.search({
|
|
50
|
+
* syncId: "sync_id",
|
|
51
|
+
* query: "query"
|
|
52
|
+
* })
|
|
53
|
+
*/
|
|
54
|
+
search(request: AirweaveSDK.SearchSearchGetRequest, requestOptions?: Search.RequestOptions): Promise<Record<string, unknown>[]>;
|
|
55
|
+
}
|