@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.
Files changed (130) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/index.d.ts +1 -1
  3. package/dist/cjs/api/index.js +1 -1
  4. package/dist/cjs/api/resources/collections/client/Client.d.ts +0 -63
  5. package/dist/cjs/api/resources/collections/client/Client.js +0 -181
  6. package/dist/cjs/api/resources/collections/client/requests/index.d.ts +0 -1
  7. package/dist/cjs/api/resources/collections/index.d.ts +0 -1
  8. package/dist/cjs/api/resources/collections/index.js +0 -1
  9. package/dist/cjs/api/resources/index.d.ts +1 -2
  10. package/dist/cjs/api/resources/index.js +2 -3
  11. package/dist/cjs/api/types/AgenticSearchRequest.d.ts +7 -7
  12. package/dist/cjs/api/types/ClassicSearchRequest.d.ts +17 -0
  13. package/dist/cjs/api/types/EventType.d.ts +7 -1
  14. package/dist/cjs/api/types/EventType.js +6 -0
  15. package/dist/cjs/api/types/FeatureFlag.d.ts +1 -2
  16. package/dist/cjs/api/types/FeatureFlag.js +0 -1
  17. package/dist/cjs/api/types/{AgenticSearchFilterCondition.d.ts → FilterCondition.d.ts} +8 -8
  18. package/dist/cjs/api/types/{AgenticSearchFilterGroup.d.ts → FilterGroup.d.ts} +2 -2
  19. package/dist/cjs/api/types/{AgenticSearchFilterOperator.d.ts → FilterOperator.d.ts} +2 -2
  20. package/dist/cjs/api/types/{AgenticSearchFilterOperator.js → FilterOperator.js} +2 -2
  21. package/dist/{esm/api/types/AgenticSearchFilterableField.d.mts → cjs/api/types/FilterableField.d.ts} +3 -3
  22. package/dist/cjs/api/types/{AgenticSearchFilterableField.js → FilterableField.js} +2 -2
  23. package/dist/cjs/api/types/InstantSearchRequest.d.ts +19 -0
  24. package/dist/cjs/api/types/InternalAgenticSearchRequest.d.ts +19 -0
  25. package/dist/cjs/api/types/{AgenticSearchAccessControl.d.ts → SearchAccessControl.d.ts} +2 -2
  26. package/dist/{esm/api/types/AgenticSearchBreadcrumb.d.mts → cjs/api/types/SearchBreadcrumb.d.ts} +2 -2
  27. package/dist/cjs/api/types/{AgenticSearchResult.d.ts → SearchResult.d.ts} +5 -5
  28. package/dist/cjs/api/types/{AgenticSearchSystemMetadata.d.ts → SearchSystemMetadata.d.ts} +6 -6
  29. package/dist/cjs/api/types/SearchV2Response.d.ts +11 -0
  30. package/dist/cjs/api/types/UsageSnapshot.d.ts +4 -0
  31. package/dist/cjs/api/types/index.d.ts +13 -18
  32. package/dist/cjs/api/types/index.js +13 -18
  33. package/dist/cjs/version.d.ts +1 -1
  34. package/dist/cjs/version.js +1 -1
  35. package/dist/esm/Client.mjs +2 -2
  36. package/dist/esm/api/index.d.mts +1 -1
  37. package/dist/esm/api/index.mjs +1 -1
  38. package/dist/esm/api/resources/collections/client/Client.d.mts +0 -63
  39. package/dist/esm/api/resources/collections/client/Client.mjs +0 -181
  40. package/dist/esm/api/resources/collections/client/requests/index.d.mts +0 -1
  41. package/dist/esm/api/resources/collections/index.d.mts +0 -1
  42. package/dist/esm/api/resources/collections/index.mjs +0 -1
  43. package/dist/esm/api/resources/index.d.mts +1 -2
  44. package/dist/esm/api/resources/index.mjs +1 -2
  45. package/dist/esm/api/types/AgenticSearchRequest.d.mts +7 -7
  46. package/dist/esm/api/types/ClassicSearchRequest.d.mts +17 -0
  47. package/dist/esm/api/types/EventType.d.mts +7 -1
  48. package/dist/esm/api/types/EventType.mjs +6 -0
  49. package/dist/esm/api/types/FeatureFlag.d.mts +1 -2
  50. package/dist/esm/api/types/FeatureFlag.mjs +0 -1
  51. package/dist/esm/api/types/{AgenticSearchFilterCondition.d.mts → FilterCondition.d.mts} +8 -8
  52. package/dist/esm/api/types/{AgenticSearchFilterGroup.d.mts → FilterGroup.d.mts} +2 -2
  53. package/dist/esm/api/types/{AgenticSearchFilterOperator.d.mts → FilterOperator.d.mts} +2 -2
  54. package/dist/esm/api/types/{AgenticSearchFilterOperator.mjs → FilterOperator.mjs} +1 -1
  55. package/dist/{cjs/api/types/AgenticSearchFilterableField.d.ts → esm/api/types/FilterableField.d.mts} +3 -3
  56. package/dist/esm/api/types/{AgenticSearchFilterableField.mjs → FilterableField.mjs} +1 -1
  57. package/dist/esm/api/types/InstantSearchRequest.d.mts +19 -0
  58. package/dist/esm/api/types/InternalAgenticSearchRequest.d.mts +19 -0
  59. package/dist/esm/api/types/{AgenticSearchAccessControl.d.mts → SearchAccessControl.d.mts} +2 -2
  60. package/dist/{cjs/api/types/AgenticSearchBreadcrumb.d.ts → esm/api/types/SearchBreadcrumb.d.mts} +2 -2
  61. package/dist/esm/api/types/{AgenticSearchResult.d.mts → SearchResult.d.mts} +5 -5
  62. package/dist/esm/api/types/{AgenticSearchSystemMetadata.d.mts → SearchSystemMetadata.d.mts} +6 -6
  63. package/dist/esm/api/types/SearchV2Response.d.mts +11 -0
  64. package/dist/esm/api/types/UsageSnapshot.d.mts +4 -0
  65. package/dist/esm/api/types/index.d.mts +13 -18
  66. package/dist/esm/api/types/index.mjs +13 -18
  67. package/dist/esm/version.d.mts +1 -1
  68. package/dist/esm/version.mjs +1 -1
  69. package/package.json +1 -1
  70. package/reference.md +0 -175
  71. package/dist/cjs/api/resources/collections/client/requests/SearchGetLegacyCollectionsReadableIdSearchGetRequest.d.ts +0 -26
  72. package/dist/cjs/api/resources/collections/types/SearchCollectionsReadableIdSearchPostRequest.d.ts +0 -5
  73. package/dist/cjs/api/resources/collections/types/index.d.ts +0 -1
  74. package/dist/cjs/api/resources/collections/types/index.js +0 -17
  75. package/dist/cjs/api/types/AgenticSearchAnswer.d.ts +0 -13
  76. package/dist/cjs/api/types/AgenticSearchCitation.d.ts +0 -10
  77. package/dist/cjs/api/types/AgenticSearchMode.d.ts +0 -14
  78. package/dist/cjs/api/types/AgenticSearchMode.js +0 -10
  79. package/dist/cjs/api/types/AgenticSearchResponse.d.ts +0 -11
  80. package/dist/cjs/api/types/AgenticSearchSystemMetadata.js +0 -5
  81. package/dist/cjs/api/types/LegacySearchRequest.d.ts +0 -39
  82. package/dist/cjs/api/types/LegacySearchRequest.js +0 -14
  83. package/dist/cjs/api/types/LegacySearchResponse.d.ts +0 -17
  84. package/dist/cjs/api/types/LegacySearchResponse.js +0 -5
  85. package/dist/cjs/api/types/QueryExpansionStrategy.d.ts +0 -12
  86. package/dist/cjs/api/types/QueryExpansionStrategy.js +0 -11
  87. package/dist/cjs/api/types/ResponseType.d.ts +0 -11
  88. package/dist/cjs/api/types/ResponseType.js +0 -10
  89. package/dist/cjs/api/types/SearchStatus.d.ts +0 -12
  90. package/dist/cjs/api/types/SearchStatus.js +0 -11
  91. package/dist/esm/api/resources/collections/client/requests/SearchGetLegacyCollectionsReadableIdSearchGetRequest.d.mts +0 -26
  92. package/dist/esm/api/resources/collections/types/SearchCollectionsReadableIdSearchPostRequest.d.mts +0 -5
  93. package/dist/esm/api/resources/collections/types/index.d.mts +0 -1
  94. package/dist/esm/api/resources/collections/types/index.mjs +0 -1
  95. package/dist/esm/api/types/AgenticSearchAnswer.d.mts +0 -13
  96. package/dist/esm/api/types/AgenticSearchCitation.d.mts +0 -10
  97. package/dist/esm/api/types/AgenticSearchMode.d.mts +0 -14
  98. package/dist/esm/api/types/AgenticSearchMode.mjs +0 -7
  99. package/dist/esm/api/types/AgenticSearchResponse.d.mts +0 -11
  100. package/dist/esm/api/types/AgenticSearchSystemMetadata.mjs +0 -4
  101. package/dist/esm/api/types/LegacySearchRequest.d.mts +0 -39
  102. package/dist/esm/api/types/LegacySearchRequest.mjs +0 -11
  103. package/dist/esm/api/types/LegacySearchResponse.d.mts +0 -17
  104. package/dist/esm/api/types/LegacySearchResponse.mjs +0 -4
  105. package/dist/esm/api/types/QueryExpansionStrategy.d.mts +0 -12
  106. package/dist/esm/api/types/QueryExpansionStrategy.mjs +0 -8
  107. package/dist/esm/api/types/ResponseType.d.mts +0 -11
  108. package/dist/esm/api/types/ResponseType.mjs +0 -7
  109. package/dist/esm/api/types/SearchStatus.d.mts +0 -12
  110. package/dist/esm/api/types/SearchStatus.mjs +0 -8
  111. /package/dist/cjs/api/{resources/collections/client/requests/SearchGetLegacyCollectionsReadableIdSearchGetRequest.js → types/ClassicSearchRequest.js} +0 -0
  112. /package/dist/cjs/api/{resources/collections/types/SearchCollectionsReadableIdSearchPostRequest.js → types/FilterCondition.js} +0 -0
  113. /package/dist/cjs/api/types/{AgenticSearchAccessControl.js → FilterGroup.js} +0 -0
  114. /package/dist/cjs/api/types/{AgenticSearchAnswer.js → InstantSearchRequest.js} +0 -0
  115. /package/dist/cjs/api/types/{AgenticSearchBreadcrumb.js → InternalAgenticSearchRequest.js} +0 -0
  116. /package/dist/cjs/api/types/{AgenticSearchCitation.js → SearchAccessControl.js} +0 -0
  117. /package/dist/cjs/api/types/{AgenticSearchFilterCondition.js → SearchBreadcrumb.js} +0 -0
  118. /package/dist/cjs/api/types/{AgenticSearchFilterGroup.js → SearchResult.js} +0 -0
  119. /package/dist/cjs/api/types/{AgenticSearchResponse.js → SearchSystemMetadata.js} +0 -0
  120. /package/dist/cjs/api/types/{AgenticSearchResult.js → SearchV2Response.js} +0 -0
  121. /package/dist/esm/api/{resources/collections/client/requests/SearchGetLegacyCollectionsReadableIdSearchGetRequest.mjs → types/ClassicSearchRequest.mjs} +0 -0
  122. /package/dist/esm/api/{resources/collections/types/SearchCollectionsReadableIdSearchPostRequest.mjs → types/FilterCondition.mjs} +0 -0
  123. /package/dist/esm/api/types/{AgenticSearchAccessControl.mjs → FilterGroup.mjs} +0 -0
  124. /package/dist/esm/api/types/{AgenticSearchAnswer.mjs → InstantSearchRequest.mjs} +0 -0
  125. /package/dist/esm/api/types/{AgenticSearchBreadcrumb.mjs → InternalAgenticSearchRequest.mjs} +0 -0
  126. /package/dist/esm/api/types/{AgenticSearchCitation.mjs → SearchAccessControl.mjs} +0 -0
  127. /package/dist/esm/api/types/{AgenticSearchFilterCondition.mjs → SearchBreadcrumb.mjs} +0 -0
  128. /package/dist/esm/api/types/{AgenticSearchFilterGroup.mjs → SearchResult.mjs} +0 -0
  129. /package/dist/esm/api/types/{AgenticSearchResponse.mjs → SearchSystemMetadata.mjs} +0 -0
  130. /package/dist/esm/api/types/{AgenticSearchResult.mjs → SearchV2Response.mjs} +0 -0
@@ -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.40",
52
- "User-Agent": "@airweave/sdk/v0.9.40",
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) });
@@ -1,3 +1,3 @@
1
- export * from "./resources/index.js";
2
1
  export * from "./types/index.js";
3
2
  export * from "./errors/index.js";
3
+ export * from "./resources/index.js";
@@ -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";
@@ -1,2 +1 @@
1
- export * from "./types/index.js";
2
1
  export * from "./client/index.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.sources = exports.collections = void 0;
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
- * Request schema for agentic search.
6
+ * Agentic search request full agent loop with tool calling.
7
7
  */
8
8
  export interface AgenticSearchRequest {
9
- /** The natural language search query. */
9
+ /** Search query text. */
10
10
  query: string;
11
- /** Filter groups that are always applied to search results. Conditions within a group are combined with AND. Multiple groups are combined with OR. Leave empty for no filtering. */
12
- filter?: AirweaveSDK.AgenticSearchFilterGroup[];
13
- /** The search mode. 'fast' performs a single search pass. 'thinking' performs an intelligent multi-step search to find the best results (may take longer). Defaults to 'thinking'. */
14
- mode?: AirweaveSDK.AgenticSearchMode;
15
- /** Maximum number of results to return. The response will contain at most this many results, but the agent can decide to return fewer. When not set, all results are returned. */
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" | "agentic_search" | "api_key_admin_sync" | "connect";
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
  };
@@ -9,7 +9,6 @@ exports.FeatureFlag = {
9
9
  SourceRateLimiting: "source_rate_limiting",
10
10
  ZephyrScale: "zephyr_scale",
11
11
  Sharepoint2019V2: "sharepoint_2019_v2",
12
- AgenticSearch: "agentic_search",
13
12
  ApiKeyAdminSync: "api_key_admin_sync",
14
13
  Connect: "connect",
15
14
  };
@@ -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 AgenticSearchFilterableField enum value
10
- * - ``operator`` is a valid AgenticSearchFilterOperator enum value
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 AgenticSearchFilterCondition {
23
+ export interface FilterCondition {
24
24
  /** Field to filter on (use dot notation for nested fields). */
25
- field: AirweaveSDK.AgenticSearchFilterableField;
25
+ field: AirweaveSDK.FilterableField;
26
26
  /** The comparison operator to use. */
27
- operator: AirweaveSDK.AgenticSearchFilterOperator;
27
+ operator: AirweaveSDK.FilterOperator;
28
28
  /** Value to compare against. Use a list for 'in' and 'not_in' operators. */
29
- value: AgenticSearchFilterCondition.Value;
29
+ value: FilterCondition.Value;
30
30
  }
31
- export declare namespace AgenticSearchFilterCondition {
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 | number | boolean | 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 AgenticSearchFilterGroup {
34
+ export interface FilterGroup {
35
35
  /** Filter conditions within this group, combined with AND */
36
- conditions: AirweaveSDK.AgenticSearchFilterCondition[];
36
+ conditions: AirweaveSDK.FilterCondition[];
37
37
  }
@@ -4,8 +4,8 @@
4
4
  /**
5
5
  * Supported filter operators.
6
6
  */
7
- export type AgenticSearchFilterOperator = "equals" | "not_equals" | "contains" | "greater_than" | "less_than" | "greater_than_or_equal" | "less_than_or_equal" | "in" | "not_in";
8
- export declare const AgenticSearchFilterOperator: {
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.AgenticSearchFilterOperator = void 0;
7
- exports.AgenticSearchFilterOperator = {
6
+ exports.FilterOperator = void 0;
7
+ exports.FilterOperator = {
8
8
  Equals: "equals",
9
9
  NotEquals: "not_equals",
10
10
  Contains: "contains",
@@ -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 agentic search.
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 AgenticSearchFilterableField = "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 AgenticSearchFilterableField: {
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.AgenticSearchFilterableField = void 0;
7
- exports.AgenticSearchFilterableField = {
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 agentic search result.
5
+ * Access control in search result.
6
6
  */
7
- export interface AgenticSearchAccessControl {
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. */
@@ -2,9 +2,9 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  /**
5
- * Breadcrumb in agentic search result.
5
+ * Breadcrumb in search result.
6
6
  */
7
- export interface AgenticSearchBreadcrumb {
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
- * Agentic search result.
6
+ * Search result.
7
7
  */
8
- export interface AgenticSearchResult {
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.AgenticSearchBreadcrumb[];
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.AgenticSearchSystemMetadata;
24
+ airweave_system_metadata: AirweaveSDK.SearchSystemMetadata;
25
25
  /** Access control */
26
- access: AirweaveSDK.AgenticSearchAccessControl;
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. */