@airweave/sdk 0.9.40 → 0.9.42
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/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/index.d.ts +1 -1
- package/dist/cjs/api/index.js +1 -1
- package/dist/cjs/api/resources/collections/client/Client.d.ts +0 -63
- package/dist/cjs/api/resources/collections/client/Client.js +0 -181
- package/dist/cjs/api/resources/collections/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/collections/index.d.ts +0 -1
- package/dist/cjs/api/resources/collections/index.js +0 -1
- package/dist/cjs/api/resources/index.d.ts +1 -2
- package/dist/cjs/api/resources/index.js +2 -3
- package/dist/cjs/api/types/AgenticSearchRequest.d.ts +7 -7
- package/dist/cjs/api/types/ClassicSearchRequest.d.ts +17 -0
- package/dist/cjs/api/types/EventType.d.ts +7 -1
- package/dist/cjs/api/types/EventType.js +6 -0
- package/dist/cjs/api/types/FeatureFlag.d.ts +1 -2
- package/dist/cjs/api/types/FeatureFlag.js +0 -1
- package/dist/cjs/api/types/{AgenticSearchFilterCondition.d.ts → FilterCondition.d.ts} +8 -8
- package/dist/cjs/api/types/{AgenticSearchFilterGroup.d.ts → FilterGroup.d.ts} +2 -2
- package/dist/cjs/api/types/{AgenticSearchFilterOperator.d.ts → FilterOperator.d.ts} +2 -2
- package/dist/cjs/api/types/{AgenticSearchFilterOperator.js → FilterOperator.js} +2 -2
- package/dist/{esm/api/types/AgenticSearchFilterableField.d.mts → cjs/api/types/FilterableField.d.ts} +3 -3
- package/dist/cjs/api/types/{AgenticSearchFilterableField.js → FilterableField.js} +2 -2
- package/dist/cjs/api/types/InstantSearchRequest.d.ts +19 -0
- package/dist/cjs/api/types/InternalAgenticSearchRequest.d.ts +19 -0
- package/dist/cjs/api/types/{AgenticSearchAccessControl.d.ts → SearchAccessControl.d.ts} +2 -2
- package/dist/{esm/api/types/AgenticSearchBreadcrumb.d.mts → cjs/api/types/SearchBreadcrumb.d.ts} +2 -2
- package/dist/cjs/api/types/{AgenticSearchResult.d.ts → SearchResult.d.ts} +5 -5
- package/dist/cjs/api/types/{AgenticSearchSystemMetadata.d.ts → SearchSystemMetadata.d.ts} +6 -6
- package/dist/cjs/api/types/SearchV2Response.d.ts +11 -0
- package/dist/cjs/api/types/UsageSnapshot.d.ts +4 -0
- package/dist/cjs/api/types/index.d.ts +13 -18
- package/dist/cjs/api/types/index.js +13 -18
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/index.d.mts +1 -1
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/resources/collections/client/Client.d.mts +0 -63
- package/dist/esm/api/resources/collections/client/Client.mjs +0 -181
- package/dist/esm/api/resources/collections/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/collections/index.d.mts +0 -1
- package/dist/esm/api/resources/collections/index.mjs +0 -1
- package/dist/esm/api/resources/index.d.mts +1 -2
- package/dist/esm/api/resources/index.mjs +1 -2
- package/dist/esm/api/types/AgenticSearchRequest.d.mts +7 -7
- package/dist/esm/api/types/ClassicSearchRequest.d.mts +17 -0
- package/dist/esm/api/types/EventType.d.mts +7 -1
- package/dist/esm/api/types/EventType.mjs +6 -0
- package/dist/esm/api/types/FeatureFlag.d.mts +1 -2
- package/dist/esm/api/types/FeatureFlag.mjs +0 -1
- package/dist/esm/api/types/{AgenticSearchFilterCondition.d.mts → FilterCondition.d.mts} +8 -8
- package/dist/esm/api/types/{AgenticSearchFilterGroup.d.mts → FilterGroup.d.mts} +2 -2
- package/dist/esm/api/types/{AgenticSearchFilterOperator.d.mts → FilterOperator.d.mts} +2 -2
- package/dist/esm/api/types/{AgenticSearchFilterOperator.mjs → FilterOperator.mjs} +1 -1
- package/dist/{cjs/api/types/AgenticSearchFilterableField.d.ts → esm/api/types/FilterableField.d.mts} +3 -3
- package/dist/esm/api/types/{AgenticSearchFilterableField.mjs → FilterableField.mjs} +1 -1
- package/dist/esm/api/types/InstantSearchRequest.d.mts +19 -0
- package/dist/esm/api/types/InternalAgenticSearchRequest.d.mts +19 -0
- package/dist/esm/api/types/{AgenticSearchAccessControl.d.mts → SearchAccessControl.d.mts} +2 -2
- package/dist/{cjs/api/types/AgenticSearchBreadcrumb.d.ts → esm/api/types/SearchBreadcrumb.d.mts} +2 -2
- package/dist/esm/api/types/{AgenticSearchResult.d.mts → SearchResult.d.mts} +5 -5
- package/dist/esm/api/types/{AgenticSearchSystemMetadata.d.mts → SearchSystemMetadata.d.mts} +6 -6
- package/dist/esm/api/types/SearchV2Response.d.mts +11 -0
- package/dist/esm/api/types/UsageSnapshot.d.mts +4 -0
- package/dist/esm/api/types/index.d.mts +13 -18
- package/dist/esm/api/types/index.mjs +13 -18
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +0 -175
- package/dist/cjs/api/resources/collections/client/requests/SearchGetLegacyCollectionsReadableIdSearchGetRequest.d.ts +0 -26
- package/dist/cjs/api/resources/collections/types/SearchCollectionsReadableIdSearchPostRequest.d.ts +0 -5
- package/dist/cjs/api/resources/collections/types/index.d.ts +0 -1
- package/dist/cjs/api/resources/collections/types/index.js +0 -17
- package/dist/cjs/api/types/AgenticSearchAnswer.d.ts +0 -13
- package/dist/cjs/api/types/AgenticSearchCitation.d.ts +0 -10
- package/dist/cjs/api/types/AgenticSearchMode.d.ts +0 -14
- package/dist/cjs/api/types/AgenticSearchMode.js +0 -10
- package/dist/cjs/api/types/AgenticSearchResponse.d.ts +0 -11
- package/dist/cjs/api/types/AgenticSearchSystemMetadata.js +0 -5
- package/dist/cjs/api/types/LegacySearchRequest.d.ts +0 -39
- package/dist/cjs/api/types/LegacySearchRequest.js +0 -14
- package/dist/cjs/api/types/LegacySearchResponse.d.ts +0 -17
- package/dist/cjs/api/types/LegacySearchResponse.js +0 -5
- package/dist/cjs/api/types/QueryExpansionStrategy.d.ts +0 -12
- package/dist/cjs/api/types/QueryExpansionStrategy.js +0 -11
- package/dist/cjs/api/types/ResponseType.d.ts +0 -11
- package/dist/cjs/api/types/ResponseType.js +0 -10
- package/dist/cjs/api/types/SearchStatus.d.ts +0 -12
- package/dist/cjs/api/types/SearchStatus.js +0 -11
- package/dist/esm/api/resources/collections/client/requests/SearchGetLegacyCollectionsReadableIdSearchGetRequest.d.mts +0 -26
- package/dist/esm/api/resources/collections/types/SearchCollectionsReadableIdSearchPostRequest.d.mts +0 -5
- package/dist/esm/api/resources/collections/types/index.d.mts +0 -1
- package/dist/esm/api/resources/collections/types/index.mjs +0 -1
- package/dist/esm/api/types/AgenticSearchAnswer.d.mts +0 -13
- package/dist/esm/api/types/AgenticSearchCitation.d.mts +0 -10
- package/dist/esm/api/types/AgenticSearchMode.d.mts +0 -14
- package/dist/esm/api/types/AgenticSearchMode.mjs +0 -7
- package/dist/esm/api/types/AgenticSearchResponse.d.mts +0 -11
- package/dist/esm/api/types/AgenticSearchSystemMetadata.mjs +0 -4
- package/dist/esm/api/types/LegacySearchRequest.d.mts +0 -39
- package/dist/esm/api/types/LegacySearchRequest.mjs +0 -11
- package/dist/esm/api/types/LegacySearchResponse.d.mts +0 -17
- package/dist/esm/api/types/LegacySearchResponse.mjs +0 -4
- package/dist/esm/api/types/QueryExpansionStrategy.d.mts +0 -12
- package/dist/esm/api/types/QueryExpansionStrategy.mjs +0 -8
- package/dist/esm/api/types/ResponseType.d.mts +0 -11
- package/dist/esm/api/types/ResponseType.mjs +0 -7
- package/dist/esm/api/types/SearchStatus.d.mts +0 -12
- package/dist/esm/api/types/SearchStatus.mjs +0 -8
- /package/dist/cjs/api/{resources/collections/client/requests/SearchGetLegacyCollectionsReadableIdSearchGetRequest.js → types/ClassicSearchRequest.js} +0 -0
- /package/dist/cjs/api/{resources/collections/types/SearchCollectionsReadableIdSearchPostRequest.js → types/FilterCondition.js} +0 -0
- /package/dist/cjs/api/types/{AgenticSearchAccessControl.js → FilterGroup.js} +0 -0
- /package/dist/cjs/api/types/{AgenticSearchAnswer.js → InstantSearchRequest.js} +0 -0
- /package/dist/cjs/api/types/{AgenticSearchBreadcrumb.js → InternalAgenticSearchRequest.js} +0 -0
- /package/dist/cjs/api/types/{AgenticSearchCitation.js → SearchAccessControl.js} +0 -0
- /package/dist/cjs/api/types/{AgenticSearchFilterCondition.js → SearchBreadcrumb.js} +0 -0
- /package/dist/cjs/api/types/{AgenticSearchFilterGroup.js → SearchResult.js} +0 -0
- /package/dist/cjs/api/types/{AgenticSearchResponse.js → SearchSystemMetadata.js} +0 -0
- /package/dist/cjs/api/types/{AgenticSearchResult.js → SearchV2Response.js} +0 -0
- /package/dist/esm/api/{resources/collections/client/requests/SearchGetLegacyCollectionsReadableIdSearchGetRequest.mjs → types/ClassicSearchRequest.mjs} +0 -0
- /package/dist/esm/api/{resources/collections/types/SearchCollectionsReadableIdSearchPostRequest.mjs → types/FilterCondition.mjs} +0 -0
- /package/dist/esm/api/types/{AgenticSearchAccessControl.mjs → FilterGroup.mjs} +0 -0
- /package/dist/esm/api/types/{AgenticSearchAnswer.mjs → InstantSearchRequest.mjs} +0 -0
- /package/dist/esm/api/types/{AgenticSearchBreadcrumb.mjs → InternalAgenticSearchRequest.mjs} +0 -0
- /package/dist/esm/api/types/{AgenticSearchCitation.mjs → SearchAccessControl.mjs} +0 -0
- /package/dist/esm/api/types/{AgenticSearchFilterCondition.mjs → SearchBreadcrumb.mjs} +0 -0
- /package/dist/esm/api/types/{AgenticSearchFilterGroup.mjs → SearchResult.mjs} +0 -0
- /package/dist/esm/api/types/{AgenticSearchResponse.mjs → SearchSystemMetadata.mjs} +0 -0
- /package/dist/esm/api/types/{AgenticSearchResult.mjs → SearchV2Response.mjs} +0 -0
package/dist/cjs/Client.js
CHANGED
|
@@ -48,8 +48,8 @@ class AirweaveSDKClient {
|
|
|
48
48
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
49
49
|
"X-Fern-Language": "JavaScript",
|
|
50
50
|
"X-Fern-SDK-Name": "@airweave/sdk",
|
|
51
|
-
"X-Fern-SDK-Version": "v0.9.
|
|
52
|
-
"User-Agent": "@airweave/sdk/v0.9.
|
|
51
|
+
"X-Fern-SDK-Version": "v0.9.42",
|
|
52
|
+
"User-Agent": "@airweave/sdk/v0.9.42",
|
|
53
53
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
54
54
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
55
55
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
package/dist/cjs/api/index.d.ts
CHANGED
package/dist/cjs/api/index.js
CHANGED
|
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./resources/index.js"), exports);
|
|
18
17
|
__exportStar(require("./types/index.js"), exports);
|
|
19
18
|
__exportStar(require("./errors/index.js"), exports);
|
|
19
|
+
__exportStar(require("./resources/index.js"), exports);
|
|
@@ -149,68 +149,5 @@ export declare class Collections {
|
|
|
149
149
|
*/
|
|
150
150
|
update(readableId: string, request?: AirweaveSDK.CollectionUpdate, requestOptions?: Collections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.Collection>;
|
|
151
151
|
private __update;
|
|
152
|
-
/**
|
|
153
|
-
* **DEPRECATED**: Use POST /collections/{readable_id}/search instead.
|
|
154
|
-
*
|
|
155
|
-
* This legacy GET endpoint provides basic search functionality via query parameters.
|
|
156
|
-
* Migrate to the POST endpoint for access to advanced features like:
|
|
157
|
-
* - Structured filters
|
|
158
|
-
* - Query expansion
|
|
159
|
-
* - Reranking
|
|
160
|
-
* - Streaming responses
|
|
161
|
-
*
|
|
162
|
-
* @param {string} readableId - The unique readable identifier of the collection to search
|
|
163
|
-
* @param {AirweaveSDK.SearchGetLegacyCollectionsReadableIdSearchGetRequest} request
|
|
164
|
-
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
165
|
-
*
|
|
166
|
-
* @throws {@link AirweaveSDK.NotFoundError}
|
|
167
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
168
|
-
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
169
|
-
*
|
|
170
|
-
* @example
|
|
171
|
-
* await client.collections.searchGetLegacy("customer-support-tickets-x7k9m", {
|
|
172
|
-
* query: "How do I reset my password?",
|
|
173
|
-
* response_type: "raw",
|
|
174
|
-
* limit: 10,
|
|
175
|
-
* offset: 0,
|
|
176
|
-
* recency_bias: 1.1
|
|
177
|
-
* })
|
|
178
|
-
*/
|
|
179
|
-
searchGetLegacy(readableId: string, request: AirweaveSDK.SearchGetLegacyCollectionsReadableIdSearchGetRequest, requestOptions?: Collections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.LegacySearchResponse>;
|
|
180
|
-
private __searchGetLegacy;
|
|
181
|
-
/**
|
|
182
|
-
* Search your collection using semantic and hybrid search.
|
|
183
|
-
*
|
|
184
|
-
* This is the primary search endpoint providing powerful AI-powered search capabilities:
|
|
185
|
-
*
|
|
186
|
-
* **Search Strategies:**
|
|
187
|
-
* - **hybrid** (default): Combines neural (semantic) and keyword (BM25) matching
|
|
188
|
-
* - **neural**: Pure semantic search using embeddings
|
|
189
|
-
* - **keyword**: Traditional keyword-based BM25 search
|
|
190
|
-
*
|
|
191
|
-
* **Features:**
|
|
192
|
-
* - **Query expansion**: Generate query variations to improve recall
|
|
193
|
-
* - **Filter interpretation**: Extract structured filters from natural language
|
|
194
|
-
* - **Reranking**: LLM-based reranking for improved relevance
|
|
195
|
-
* - **Answer generation**: AI-generated answers based on search results
|
|
196
|
-
*
|
|
197
|
-
* **Note**: Accepts both new SearchRequest and legacy LegacySearchRequest formats
|
|
198
|
-
* for backwards compatibility.
|
|
199
|
-
*
|
|
200
|
-
* @param {string} readableId - The unique readable identifier of the collection to search
|
|
201
|
-
* @param {AirweaveSDK.SearchCollectionsReadableIdSearchPostRequest} request
|
|
202
|
-
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
203
|
-
*
|
|
204
|
-
* @throws {@link AirweaveSDK.NotFoundError}
|
|
205
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
206
|
-
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
207
|
-
*
|
|
208
|
-
* @example
|
|
209
|
-
* await client.collections.search("customer-support-tickets-x7k9m", {
|
|
210
|
-
* query: "How do I reset my password?"
|
|
211
|
-
* })
|
|
212
|
-
*/
|
|
213
|
-
search(readableId: string, request: AirweaveSDK.SearchCollectionsReadableIdSearchPostRequest, requestOptions?: Collections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SearchResponse>;
|
|
214
|
-
private __search;
|
|
215
152
|
protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>>;
|
|
216
153
|
}
|
|
@@ -438,187 +438,6 @@ class Collections {
|
|
|
438
438
|
}
|
|
439
439
|
});
|
|
440
440
|
}
|
|
441
|
-
/**
|
|
442
|
-
* **DEPRECATED**: Use POST /collections/{readable_id}/search instead.
|
|
443
|
-
*
|
|
444
|
-
* This legacy GET endpoint provides basic search functionality via query parameters.
|
|
445
|
-
* Migrate to the POST endpoint for access to advanced features like:
|
|
446
|
-
* - Structured filters
|
|
447
|
-
* - Query expansion
|
|
448
|
-
* - Reranking
|
|
449
|
-
* - Streaming responses
|
|
450
|
-
*
|
|
451
|
-
* @param {string} readableId - The unique readable identifier of the collection to search
|
|
452
|
-
* @param {AirweaveSDK.SearchGetLegacyCollectionsReadableIdSearchGetRequest} request
|
|
453
|
-
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
454
|
-
*
|
|
455
|
-
* @throws {@link AirweaveSDK.NotFoundError}
|
|
456
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
457
|
-
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
458
|
-
*
|
|
459
|
-
* @example
|
|
460
|
-
* await client.collections.searchGetLegacy("customer-support-tickets-x7k9m", {
|
|
461
|
-
* query: "How do I reset my password?",
|
|
462
|
-
* response_type: "raw",
|
|
463
|
-
* limit: 10,
|
|
464
|
-
* offset: 0,
|
|
465
|
-
* recency_bias: 1.1
|
|
466
|
-
* })
|
|
467
|
-
*/
|
|
468
|
-
searchGetLegacy(readableId, request, requestOptions) {
|
|
469
|
-
return core.HttpResponsePromise.fromPromise(this.__searchGetLegacy(readableId, request, requestOptions));
|
|
470
|
-
}
|
|
471
|
-
__searchGetLegacy(readableId, request, requestOptions) {
|
|
472
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
473
|
-
var _a, _b, _c;
|
|
474
|
-
const { query, response_type: responseType, limit, offset, recency_bias: recencyBias } = request;
|
|
475
|
-
const _queryParams = {};
|
|
476
|
-
_queryParams["query"] = query;
|
|
477
|
-
if (responseType != null) {
|
|
478
|
-
_queryParams["response_type"] = responseType;
|
|
479
|
-
}
|
|
480
|
-
if (limit != null) {
|
|
481
|
-
_queryParams["limit"] = limit.toString();
|
|
482
|
-
}
|
|
483
|
-
if (offset != null) {
|
|
484
|
-
_queryParams["offset"] = offset.toString();
|
|
485
|
-
}
|
|
486
|
-
if (recencyBias != null) {
|
|
487
|
-
_queryParams["recency_bias"] = recencyBias.toString();
|
|
488
|
-
}
|
|
489
|
-
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);
|
|
490
|
-
const _response = yield core.fetcher({
|
|
491
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}/search`),
|
|
492
|
-
method: "GET",
|
|
493
|
-
headers: _headers,
|
|
494
|
-
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
495
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
496
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
497
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
498
|
-
});
|
|
499
|
-
if (_response.ok) {
|
|
500
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
501
|
-
}
|
|
502
|
-
if (_response.error.reason === "status-code") {
|
|
503
|
-
switch (_response.error.statusCode) {
|
|
504
|
-
case 404:
|
|
505
|
-
throw new AirweaveSDK.NotFoundError(_response.error.body, _response.rawResponse);
|
|
506
|
-
case 422:
|
|
507
|
-
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
508
|
-
case 429:
|
|
509
|
-
throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
510
|
-
default:
|
|
511
|
-
throw new errors.AirweaveSDKError({
|
|
512
|
-
statusCode: _response.error.statusCode,
|
|
513
|
-
body: _response.error.body,
|
|
514
|
-
rawResponse: _response.rawResponse,
|
|
515
|
-
});
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
switch (_response.error.reason) {
|
|
519
|
-
case "non-json":
|
|
520
|
-
throw new errors.AirweaveSDKError({
|
|
521
|
-
statusCode: _response.error.statusCode,
|
|
522
|
-
body: _response.error.rawBody,
|
|
523
|
-
rawResponse: _response.rawResponse,
|
|
524
|
-
});
|
|
525
|
-
case "timeout":
|
|
526
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /collections/{readable_id}/search.");
|
|
527
|
-
case "unknown":
|
|
528
|
-
throw new errors.AirweaveSDKError({
|
|
529
|
-
message: _response.error.errorMessage,
|
|
530
|
-
rawResponse: _response.rawResponse,
|
|
531
|
-
});
|
|
532
|
-
}
|
|
533
|
-
});
|
|
534
|
-
}
|
|
535
|
-
/**
|
|
536
|
-
* Search your collection using semantic and hybrid search.
|
|
537
|
-
*
|
|
538
|
-
* This is the primary search endpoint providing powerful AI-powered search capabilities:
|
|
539
|
-
*
|
|
540
|
-
* **Search Strategies:**
|
|
541
|
-
* - **hybrid** (default): Combines neural (semantic) and keyword (BM25) matching
|
|
542
|
-
* - **neural**: Pure semantic search using embeddings
|
|
543
|
-
* - **keyword**: Traditional keyword-based BM25 search
|
|
544
|
-
*
|
|
545
|
-
* **Features:**
|
|
546
|
-
* - **Query expansion**: Generate query variations to improve recall
|
|
547
|
-
* - **Filter interpretation**: Extract structured filters from natural language
|
|
548
|
-
* - **Reranking**: LLM-based reranking for improved relevance
|
|
549
|
-
* - **Answer generation**: AI-generated answers based on search results
|
|
550
|
-
*
|
|
551
|
-
* **Note**: Accepts both new SearchRequest and legacy LegacySearchRequest formats
|
|
552
|
-
* for backwards compatibility.
|
|
553
|
-
*
|
|
554
|
-
* @param {string} readableId - The unique readable identifier of the collection to search
|
|
555
|
-
* @param {AirweaveSDK.SearchCollectionsReadableIdSearchPostRequest} request
|
|
556
|
-
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
557
|
-
*
|
|
558
|
-
* @throws {@link AirweaveSDK.NotFoundError}
|
|
559
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
560
|
-
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
561
|
-
*
|
|
562
|
-
* @example
|
|
563
|
-
* await client.collections.search("customer-support-tickets-x7k9m", {
|
|
564
|
-
* query: "How do I reset my password?"
|
|
565
|
-
* })
|
|
566
|
-
*/
|
|
567
|
-
search(readableId, request, requestOptions) {
|
|
568
|
-
return core.HttpResponsePromise.fromPromise(this.__search(readableId, request, requestOptions));
|
|
569
|
-
}
|
|
570
|
-
__search(readableId, request, requestOptions) {
|
|
571
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
572
|
-
var _a, _b, _c;
|
|
573
|
-
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);
|
|
574
|
-
const _response = yield core.fetcher({
|
|
575
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}/search`),
|
|
576
|
-
method: "POST",
|
|
577
|
-
headers: _headers,
|
|
578
|
-
contentType: "application/json",
|
|
579
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
580
|
-
requestType: "json",
|
|
581
|
-
body: request,
|
|
582
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
583
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
584
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
585
|
-
});
|
|
586
|
-
if (_response.ok) {
|
|
587
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
588
|
-
}
|
|
589
|
-
if (_response.error.reason === "status-code") {
|
|
590
|
-
switch (_response.error.statusCode) {
|
|
591
|
-
case 404:
|
|
592
|
-
throw new AirweaveSDK.NotFoundError(_response.error.body, _response.rawResponse);
|
|
593
|
-
case 422:
|
|
594
|
-
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
595
|
-
case 429:
|
|
596
|
-
throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
597
|
-
default:
|
|
598
|
-
throw new errors.AirweaveSDKError({
|
|
599
|
-
statusCode: _response.error.statusCode,
|
|
600
|
-
body: _response.error.body,
|
|
601
|
-
rawResponse: _response.rawResponse,
|
|
602
|
-
});
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
switch (_response.error.reason) {
|
|
606
|
-
case "non-json":
|
|
607
|
-
throw new errors.AirweaveSDKError({
|
|
608
|
-
statusCode: _response.error.statusCode,
|
|
609
|
-
body: _response.error.rawBody,
|
|
610
|
-
rawResponse: _response.rawResponse,
|
|
611
|
-
});
|
|
612
|
-
case "timeout":
|
|
613
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /collections/{readable_id}/search.");
|
|
614
|
-
case "unknown":
|
|
615
|
-
throw new errors.AirweaveSDKError({
|
|
616
|
-
message: _response.error.errorMessage,
|
|
617
|
-
rawResponse: _response.rawResponse,
|
|
618
|
-
});
|
|
619
|
-
}
|
|
620
|
-
});
|
|
621
|
-
}
|
|
622
441
|
_getCustomAuthorizationHeaders() {
|
|
623
442
|
return __awaiter(this, void 0, void 0, function* () {
|
|
624
443
|
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { type ListCollectionsGetRequest } from "./ListCollectionsGetRequest.js";
|
|
2
2
|
export { type CollectionCreate } from "./CollectionCreate.js";
|
|
3
3
|
export { type CollectionUpdate } from "./CollectionUpdate.js";
|
|
4
|
-
export { type SearchGetLegacyCollectionsReadableIdSearchGetRequest } from "./SearchGetLegacyCollectionsReadableIdSearchGetRequest.js";
|
|
@@ -14,5 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./types/index.js"), exports);
|
|
18
17
|
__exportStar(require("./client/index.js"), exports);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export * as collections from "./collections/index.js";
|
|
2
|
-
export * from "./collections/types/index.js";
|
|
3
1
|
export * as sources from "./sources/index.js";
|
|
2
|
+
export * as collections from "./collections/index.js";
|
|
4
3
|
export * as sourceConnections from "./sourceConnections/index.js";
|
|
5
4
|
export * as webhooks from "./webhooks/index.js";
|
|
6
5
|
export * from "./collections/client/requests/index.js";
|
|
@@ -36,10 +36,9 @@ 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.webhooks = exports.sourceConnections = exports.
|
|
40
|
-
exports.collections = __importStar(require("./collections/index.js"));
|
|
41
|
-
__exportStar(require("./collections/types/index.js"), exports);
|
|
39
|
+
exports.webhooks = exports.sourceConnections = exports.collections = exports.sources = void 0;
|
|
42
40
|
exports.sources = __importStar(require("./sources/index.js"));
|
|
41
|
+
exports.collections = __importStar(require("./collections/index.js"));
|
|
43
42
|
exports.sourceConnections = __importStar(require("./sourceConnections/index.js"));
|
|
44
43
|
exports.webhooks = __importStar(require("./webhooks/index.js"));
|
|
45
44
|
__exportStar(require("./collections/client/requests/index.js"), exports);
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as AirweaveSDK from "../index.js";
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Agentic search request — full agent loop with tool calling.
|
|
7
7
|
*/
|
|
8
8
|
export interface AgenticSearchRequest {
|
|
9
|
-
/**
|
|
9
|
+
/** Search query text. */
|
|
10
10
|
query: string;
|
|
11
|
-
/**
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
/**
|
|
11
|
+
/** Enable extended thinking / chain-of-thought. */
|
|
12
|
+
thinking?: boolean;
|
|
13
|
+
/** Filter groups (combined with OR). */
|
|
14
|
+
filter?: AirweaveSDK.FilterGroup[];
|
|
15
|
+
/** Max results. None means agent decides. */
|
|
16
16
|
limit?: number;
|
|
17
17
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as AirweaveSDK from "../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* Classic search request — LLM generates a search plan, execute against Vespa.
|
|
7
|
+
*/
|
|
8
|
+
export interface ClassicSearchRequest {
|
|
9
|
+
/** Search query text. */
|
|
10
|
+
query: string;
|
|
11
|
+
/** Filter groups (combined with OR). */
|
|
12
|
+
filter?: AirweaveSDK.FilterGroup[];
|
|
13
|
+
/** Max results to return. */
|
|
14
|
+
limit?: number;
|
|
15
|
+
/** Number of results to skip. */
|
|
16
|
+
offset?: number;
|
|
17
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type EventType = "sync.pending" | "sync.running" | "sync.completed" | "sync.failed" | "sync.cancelled" | "entity.batch_processed" | "query.processed" | "access_control.batch_processed" | "collection.created" | "collection.updated" | "collection.deleted" | "source_connection.created" | "source_connection.auth_completed" | "source_connection.deleted" | "organization.created" | "organization.deleted" | "organization.member_added" | "organization.member_removed";
|
|
4
|
+
export type EventType = "sync.pending" | "sync.running" | "sync.completed" | "sync.failed" | "sync.cancelled" | "entity.batch_processed" | "query.processed" | "access_control.batch_processed" | "collection.created" | "collection.updated" | "collection.deleted" | "source_connection.created" | "source_connection.auth_completed" | "source_connection.deleted" | "organization.created" | "organization.deleted" | "organization.member_added" | "organization.member_removed" | "search.started" | "search.completed" | "search.failed" | "search.reranking" | "search.thinking" | "search.tool_called";
|
|
5
5
|
export declare const EventType: {
|
|
6
6
|
readonly SyncPending: "sync.pending";
|
|
7
7
|
readonly SyncRunning: "sync.running";
|
|
@@ -21,4 +21,10 @@ export declare const EventType: {
|
|
|
21
21
|
readonly OrganizationDeleted: "organization.deleted";
|
|
22
22
|
readonly OrganizationMemberAdded: "organization.member_added";
|
|
23
23
|
readonly OrganizationMemberRemoved: "organization.member_removed";
|
|
24
|
+
readonly SearchStarted: "search.started";
|
|
25
|
+
readonly SearchCompleted: "search.completed";
|
|
26
|
+
readonly SearchFailed: "search.failed";
|
|
27
|
+
readonly SearchReranking: "search.reranking";
|
|
28
|
+
readonly SearchThinking: "search.thinking";
|
|
29
|
+
readonly SearchToolCalled: "search.tool_called";
|
|
24
30
|
};
|
|
@@ -23,4 +23,10 @@ exports.EventType = {
|
|
|
23
23
|
OrganizationDeleted: "organization.deleted",
|
|
24
24
|
OrganizationMemberAdded: "organization.member_added",
|
|
25
25
|
OrganizationMemberRemoved: "organization.member_removed",
|
|
26
|
+
SearchStarted: "search.started",
|
|
27
|
+
SearchCompleted: "search.completed",
|
|
28
|
+
SearchFailed: "search.failed",
|
|
29
|
+
SearchReranking: "search.reranking",
|
|
30
|
+
SearchThinking: "search.thinking",
|
|
31
|
+
SearchToolCalled: "search.tool_called",
|
|
26
32
|
};
|
|
@@ -6,13 +6,12 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Add new flags here to enable feature gating at the organization level.
|
|
8
8
|
*/
|
|
9
|
-
export type FeatureFlag = "priority_support" | "source_rate_limiting" | "zephyr_scale" | "sharepoint_2019_v2" | "
|
|
9
|
+
export type FeatureFlag = "priority_support" | "source_rate_limiting" | "zephyr_scale" | "sharepoint_2019_v2" | "api_key_admin_sync" | "connect";
|
|
10
10
|
export declare const FeatureFlag: {
|
|
11
11
|
readonly PrioritySupport: "priority_support";
|
|
12
12
|
readonly SourceRateLimiting: "source_rate_limiting";
|
|
13
13
|
readonly ZephyrScale: "zephyr_scale";
|
|
14
14
|
readonly Sharepoint2019V2: "sharepoint_2019_v2";
|
|
15
|
-
readonly AgenticSearch: "agentic_search";
|
|
16
15
|
readonly ApiKeyAdminSync: "api_key_admin_sync";
|
|
17
16
|
readonly Connect: "connect";
|
|
18
17
|
};
|
|
@@ -6,8 +6,8 @@ import * as AirweaveSDK from "../index.js";
|
|
|
6
6
|
* A single filter condition.
|
|
7
7
|
*
|
|
8
8
|
* Pydantic validates that:
|
|
9
|
-
* - ``field`` is a valid
|
|
10
|
-
* - ``operator`` is a valid
|
|
9
|
+
* - ``field`` is a valid FilterableField enum value
|
|
10
|
+
* - ``operator`` is a valid FilterOperator enum value
|
|
11
11
|
* - ``value`` matches the expected types
|
|
12
12
|
* - The combination of field + operator + value is semantically valid
|
|
13
13
|
*
|
|
@@ -20,17 +20,17 @@ import * as AirweaveSDK from "../index.js";
|
|
|
20
20
|
* "value": "2024-01-01T00:00:00Z"}
|
|
21
21
|
* {"field": "breadcrumbs.name", "operator": "contains", "value": "Engineering"}
|
|
22
22
|
*/
|
|
23
|
-
export interface
|
|
23
|
+
export interface FilterCondition {
|
|
24
24
|
/** Field to filter on (use dot notation for nested fields). */
|
|
25
|
-
field: AirweaveSDK.
|
|
25
|
+
field: AirweaveSDK.FilterableField;
|
|
26
26
|
/** The comparison operator to use. */
|
|
27
|
-
operator: AirweaveSDK.
|
|
27
|
+
operator: AirweaveSDK.FilterOperator;
|
|
28
28
|
/** Value to compare against. Use a list for 'in' and 'not_in' operators. */
|
|
29
|
-
value:
|
|
29
|
+
value: FilterCondition.Value;
|
|
30
30
|
}
|
|
31
|
-
export declare namespace
|
|
31
|
+
export declare namespace FilterCondition {
|
|
32
32
|
/**
|
|
33
33
|
* Value to compare against. Use a list for 'in' and 'not_in' operators.
|
|
34
34
|
*/
|
|
35
|
-
type Value = string | number |
|
|
35
|
+
type Value = string | number | boolean | string[] | number[];
|
|
36
36
|
}
|
|
@@ -31,7 +31,7 @@ import * as AirweaveSDK from "../index.js";
|
|
|
31
31
|
* "value": "Engineering"}
|
|
32
32
|
* ]}
|
|
33
33
|
*/
|
|
34
|
-
export interface
|
|
34
|
+
export interface FilterGroup {
|
|
35
35
|
/** Filter conditions within this group, combined with AND */
|
|
36
|
-
conditions: AirweaveSDK.
|
|
36
|
+
conditions: AirweaveSDK.FilterCondition[];
|
|
37
37
|
}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Supported filter operators.
|
|
6
6
|
*/
|
|
7
|
-
export type
|
|
8
|
-
export declare const
|
|
7
|
+
export type FilterOperator = "equals" | "not_equals" | "contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "in" | "not_in";
|
|
8
|
+
export declare const FilterOperator: {
|
|
9
9
|
readonly Equals: "equals";
|
|
10
10
|
readonly NotEquals: "not_equals";
|
|
11
11
|
readonly Contains: "contains";
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* This file was auto-generated by Fern from our API Definition.
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
6
|
+
exports.FilterOperator = void 0;
|
|
7
|
+
exports.FilterOperator = {
|
|
8
8
|
Equals: "equals",
|
|
9
9
|
NotEquals: "not_equals",
|
|
10
10
|
Contains: "contains",
|
package/dist/{esm/api/types/AgenticSearchFilterableField.d.mts → cjs/api/types/FilterableField.d.ts}
RENAMED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
* Filterable fields in
|
|
5
|
+
* Filterable fields in search.
|
|
6
6
|
*
|
|
7
7
|
* Uses dot notation for nested fields (e.g., breadcrumbs.name,
|
|
8
8
|
* airweave_system_metadata.source_name).
|
|
9
9
|
*/
|
|
10
|
-
export type
|
|
11
|
-
export declare const
|
|
10
|
+
export type FilterableField = "entity_id" | "name" | "created_at" | "updated_at" | "breadcrumbs.entity_id" | "breadcrumbs.name" | "breadcrumbs.entity_type" | "airweave_system_metadata.entity_type" | "airweave_system_metadata.source_name" | "airweave_system_metadata.original_entity_id" | "airweave_system_metadata.chunk_index" | "airweave_system_metadata.sync_id" | "airweave_system_metadata.sync_job_id";
|
|
11
|
+
export declare const FilterableField: {
|
|
12
12
|
readonly EntityId: "entity_id";
|
|
13
13
|
readonly Name: "name";
|
|
14
14
|
readonly CreatedAt: "created_at";
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* This file was auto-generated by Fern from our API Definition.
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
6
|
+
exports.FilterableField = void 0;
|
|
7
|
+
exports.FilterableField = {
|
|
8
8
|
EntityId: "entity_id",
|
|
9
9
|
Name: "name",
|
|
10
10
|
CreatedAt: "created_at",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as AirweaveSDK from "../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* Instant search request — embed query, fire at Vespa, return results.
|
|
7
|
+
*/
|
|
8
|
+
export interface InstantSearchRequest {
|
|
9
|
+
/** Search query text. */
|
|
10
|
+
query: string;
|
|
11
|
+
/** Which retrieval strategy to use. */
|
|
12
|
+
retrieval_strategy?: AirweaveSDK.RetrievalStrategy;
|
|
13
|
+
/** Filter groups (combined with OR). */
|
|
14
|
+
filter?: AirweaveSDK.FilterGroup[];
|
|
15
|
+
/** Max results to return. */
|
|
16
|
+
limit?: number;
|
|
17
|
+
/** Number of results to skip. */
|
|
18
|
+
offset?: number;
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as AirweaveSDK from "../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* Admin-only agentic search request with model override for evals.
|
|
7
|
+
*/
|
|
8
|
+
export interface InternalAgenticSearchRequest {
|
|
9
|
+
/** Search query text. */
|
|
10
|
+
query: string;
|
|
11
|
+
/** Enable extended thinking / chain-of-thought. */
|
|
12
|
+
thinking?: boolean;
|
|
13
|
+
/** Filter groups (combined with OR). */
|
|
14
|
+
filter?: AirweaveSDK.FilterGroup[];
|
|
15
|
+
/** Max results. None means agent decides. */
|
|
16
|
+
limit?: number;
|
|
17
|
+
/** LLM model override. Format: 'provider/model' e.g. 'together/zai-glm-5-thinking'. When not set, uses the default model from config. */
|
|
18
|
+
model?: string;
|
|
19
|
+
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
* Access control in
|
|
5
|
+
* Access control in search result.
|
|
6
6
|
*/
|
|
7
|
-
export interface
|
|
7
|
+
export interface SearchAccessControl {
|
|
8
8
|
/** Principal IDs who can view this entity. None if unknown. */
|
|
9
9
|
viewers?: string[];
|
|
10
10
|
/** Whether this entity is publicly accessible. None if unknown. */
|
package/dist/{esm/api/types/AgenticSearchBreadcrumb.d.mts → cjs/api/types/SearchBreadcrumb.d.ts}
RENAMED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
* Breadcrumb in
|
|
5
|
+
* Breadcrumb in search result.
|
|
6
6
|
*/
|
|
7
|
-
export interface
|
|
7
|
+
export interface SearchBreadcrumb {
|
|
8
8
|
/** ID of the entity in the source. */
|
|
9
9
|
entity_id: string;
|
|
10
10
|
/** Display name of the entity. */
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as AirweaveSDK from "../index.js";
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Search result.
|
|
7
7
|
*/
|
|
8
|
-
export interface
|
|
8
|
+
export interface SearchResult {
|
|
9
9
|
/** Original entity ID. */
|
|
10
10
|
entity_id: string;
|
|
11
11
|
/** Entity display name. */
|
|
@@ -13,7 +13,7 @@ export interface AgenticSearchResult {
|
|
|
13
13
|
/** Relevance score from the search engine. */
|
|
14
14
|
relevance_score: number;
|
|
15
15
|
/** Breadcrumbs showing entity hierarchy. */
|
|
16
|
-
breadcrumbs: AirweaveSDK.
|
|
16
|
+
breadcrumbs: AirweaveSDK.SearchBreadcrumb[];
|
|
17
17
|
/** When the entity was created. */
|
|
18
18
|
created_at?: string;
|
|
19
19
|
/** When the entity was last updated. */
|
|
@@ -21,9 +21,9 @@ export interface AgenticSearchResult {
|
|
|
21
21
|
/** Semantically searchable text content */
|
|
22
22
|
textual_representation: string;
|
|
23
23
|
/** System metadata */
|
|
24
|
-
airweave_system_metadata: AirweaveSDK.
|
|
24
|
+
airweave_system_metadata: AirweaveSDK.SearchSystemMetadata;
|
|
25
25
|
/** Access control */
|
|
26
|
-
access: AirweaveSDK.
|
|
26
|
+
access: AirweaveSDK.SearchAccessControl;
|
|
27
27
|
/** URL to view the entity in its source application (e.g., Notion, Asana). */
|
|
28
28
|
web_url: string;
|
|
29
29
|
/** Download URL for file entities. Only present for FileEntity types. */
|