@airweave/sdk 0.6.36 → 0.6.38

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 (73) 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 +32 -56
  5. package/dist/cjs/api/resources/collections/client/Client.js +65 -86
  6. package/dist/cjs/api/resources/collections/client/requests/{SearchCollectionsReadableIdSearchGetRequest.d.ts → SearchGetLegacyCollectionsReadableIdSearchGetRequest.d.ts} +3 -3
  7. package/dist/cjs/api/resources/collections/client/requests/index.d.ts +1 -2
  8. package/dist/cjs/api/resources/collections/index.d.ts +1 -0
  9. package/dist/cjs/api/resources/collections/index.js +1 -0
  10. package/dist/cjs/api/resources/collections/types/SearchCollectionsReadableIdSearchPostRequest.d.ts +5 -0
  11. package/dist/cjs/api/resources/collections/types/SearchCollectionsReadableIdSearchPostRequest.js +5 -0
  12. package/dist/cjs/api/resources/collections/types/SearchCollectionsReadableIdSearchPostResponse.d.ts +5 -0
  13. package/dist/cjs/api/resources/collections/types/SearchCollectionsReadableIdSearchPostResponse.js +5 -0
  14. package/dist/cjs/api/resources/collections/types/index.d.ts +2 -0
  15. package/dist/cjs/api/resources/collections/types/index.js +18 -0
  16. package/dist/cjs/api/resources/index.d.ts +2 -1
  17. package/dist/cjs/api/resources/index.js +3 -2
  18. package/dist/cjs/api/types/LegacySearchRequest.d.ts +39 -0
  19. package/dist/cjs/api/{resources/collections/client/requests/SearchRequest.js → types/LegacySearchRequest.js} +5 -5
  20. package/dist/cjs/api/types/LegacySearchResponse.d.ts +17 -0
  21. package/dist/cjs/api/types/LegacySearchResponse.js +5 -0
  22. package/dist/cjs/api/types/OrganizationMetrics.d.ts +42 -0
  23. package/dist/cjs/api/types/OrganizationMetrics.js +5 -0
  24. package/dist/cjs/api/types/RetrievalStrategy.d.ts +12 -0
  25. package/dist/cjs/api/types/RetrievalStrategy.js +11 -0
  26. package/dist/cjs/api/types/SearchRequest.d.ts +29 -0
  27. package/dist/cjs/api/types/SearchRequest.js +5 -0
  28. package/dist/cjs/api/types/SearchResponse.d.ts +1 -6
  29. package/dist/cjs/api/types/User.d.ts +1 -0
  30. package/dist/cjs/api/types/index.d.ts +5 -0
  31. package/dist/cjs/api/types/index.js +5 -0
  32. package/dist/cjs/version.d.ts +1 -1
  33. package/dist/cjs/version.js +1 -1
  34. package/dist/esm/Client.mjs +2 -2
  35. package/dist/esm/api/index.d.mts +1 -1
  36. package/dist/esm/api/index.mjs +1 -1
  37. package/dist/esm/api/resources/collections/client/Client.d.mts +32 -56
  38. package/dist/esm/api/resources/collections/client/Client.mjs +65 -86
  39. package/dist/esm/api/resources/collections/client/requests/{SearchCollectionsReadableIdSearchGetRequest.d.mts → SearchGetLegacyCollectionsReadableIdSearchGetRequest.d.mts} +3 -3
  40. package/dist/esm/api/resources/collections/client/requests/index.d.mts +1 -2
  41. package/dist/esm/api/resources/collections/index.d.mts +1 -0
  42. package/dist/esm/api/resources/collections/index.mjs +1 -0
  43. package/dist/esm/api/resources/collections/types/SearchCollectionsReadableIdSearchPostRequest.d.mts +5 -0
  44. package/dist/esm/api/resources/collections/types/SearchCollectionsReadableIdSearchPostRequest.mjs +4 -0
  45. package/dist/esm/api/resources/collections/types/SearchCollectionsReadableIdSearchPostResponse.d.mts +5 -0
  46. package/dist/esm/api/resources/collections/types/SearchCollectionsReadableIdSearchPostResponse.mjs +4 -0
  47. package/dist/esm/api/resources/collections/types/index.d.mts +2 -0
  48. package/dist/esm/api/resources/collections/types/index.mjs +2 -0
  49. package/dist/esm/api/resources/index.d.mts +2 -1
  50. package/dist/esm/api/resources/index.mjs +2 -1
  51. package/dist/esm/api/types/LegacySearchRequest.d.mts +39 -0
  52. package/dist/esm/api/types/LegacySearchRequest.mjs +11 -0
  53. package/dist/esm/api/types/LegacySearchResponse.d.mts +17 -0
  54. package/dist/esm/api/types/LegacySearchResponse.mjs +4 -0
  55. package/dist/esm/api/types/OrganizationMetrics.d.mts +42 -0
  56. package/dist/esm/api/types/OrganizationMetrics.mjs +4 -0
  57. package/dist/esm/api/types/RetrievalStrategy.d.mts +12 -0
  58. package/dist/esm/api/types/RetrievalStrategy.mjs +8 -0
  59. package/dist/esm/api/types/SearchRequest.d.mts +29 -0
  60. package/dist/esm/api/types/SearchRequest.mjs +4 -0
  61. package/dist/esm/api/types/SearchResponse.d.mts +1 -6
  62. package/dist/esm/api/types/User.d.mts +1 -0
  63. package/dist/esm/api/types/index.d.mts +5 -0
  64. package/dist/esm/api/types/index.mjs +5 -0
  65. package/dist/esm/version.d.mts +1 -1
  66. package/dist/esm/version.mjs +1 -1
  67. package/package.json +1 -1
  68. package/reference.md +39 -65
  69. package/dist/cjs/api/resources/collections/client/requests/SearchRequest.d.ts +0 -50
  70. package/dist/esm/api/resources/collections/client/requests/SearchRequest.d.mts +0 -50
  71. package/dist/esm/api/resources/collections/client/requests/SearchRequest.mjs +0 -11
  72. /package/dist/cjs/api/resources/collections/client/requests/{SearchCollectionsReadableIdSearchGetRequest.js → SearchGetLegacyCollectionsReadableIdSearchGetRequest.js} +0 -0
  73. /package/dist/esm/api/resources/collections/client/requests/{SearchCollectionsReadableIdSearchGetRequest.mjs → SearchGetLegacyCollectionsReadableIdSearchGetRequest.mjs} +0 -0
@@ -1 +1,2 @@
1
+ export * from "./types/index.mjs";
1
2
  export * from "./client/index.mjs";
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as AirweaveSDK from "../../../index.mjs";
5
+ export type SearchCollectionsReadableIdSearchPostRequest = AirweaveSDK.SearchRequest | AirweaveSDK.LegacySearchRequest;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as AirweaveSDK from "../../../index.mjs";
5
+ export type SearchCollectionsReadableIdSearchPostResponse = AirweaveSDK.SearchResponse | AirweaveSDK.LegacySearchResponse;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from "./SearchCollectionsReadableIdSearchPostRequest.mjs";
2
+ export * from "./SearchCollectionsReadableIdSearchPostResponse.mjs";
@@ -0,0 +1,2 @@
1
+ export * from "./SearchCollectionsReadableIdSearchPostRequest.mjs";
2
+ export * from "./SearchCollectionsReadableIdSearchPostResponse.mjs";
@@ -1,5 +1,6 @@
1
- export * as sources from "./sources/index.mjs";
2
1
  export * as collections from "./collections/index.mjs";
2
+ export * from "./collections/types/index.mjs";
3
+ export * as sources from "./sources/index.mjs";
3
4
  export * as sourceConnections from "./sourceConnections/index.mjs";
4
5
  export * from "./collections/client/requests/index.mjs";
5
6
  export * from "./sourceConnections/client/requests/index.mjs";
@@ -1,5 +1,6 @@
1
- export * as sources from "./sources/index.mjs";
2
1
  export * as collections from "./collections/index.mjs";
2
+ export * from "./collections/types/index.mjs";
3
+ export * as sources from "./sources/index.mjs";
3
4
  export * as sourceConnections from "./sourceConnections/index.mjs";
4
5
  export * from "./collections/client/requests/index.mjs";
5
6
  export * from "./sourceConnections/client/requests/index.mjs";
@@ -0,0 +1,39 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as AirweaveSDK from "../index.mjs";
5
+ /**
6
+ * Legacy search request schema for backwards compatibility.
7
+ */
8
+ export interface LegacySearchRequest {
9
+ /** The search query text */
10
+ query: string;
11
+ /** Qdrant native filter for metadata-based filtering */
12
+ filter?: AirweaveSDK.Filter;
13
+ /** Number of results to skip */
14
+ offset?: number;
15
+ /** Maximum number of results */
16
+ limit?: number;
17
+ /** Minimum similarity score threshold (deprecated, will be ignored) */
18
+ score_threshold?: number;
19
+ /** Type of response - 'raw' or 'completion' */
20
+ response_type?: AirweaveSDK.ResponseType;
21
+ /** Search method to use */
22
+ search_method?: LegacySearchRequest.SearchMethod;
23
+ /** How much document age affects the similarity score (0..1) */
24
+ recency_bias?: number;
25
+ /** Query expansion strategy */
26
+ expansion_strategy?: AirweaveSDK.QueryExpansionStrategy;
27
+ /** Enable LLM-based reranking to improve result relevance */
28
+ enable_reranking?: boolean;
29
+ /** Enable automatic filter extraction from natural language query */
30
+ enable_query_interpretation?: boolean;
31
+ }
32
+ export declare namespace LegacySearchRequest {
33
+ type SearchMethod = "hybrid" | "neural" | "keyword";
34
+ const SearchMethod: {
35
+ readonly Hybrid: "hybrid";
36
+ readonly Neural: "neural";
37
+ readonly Keyword: "keyword";
38
+ };
39
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export var LegacySearchRequest;
5
+ (function (LegacySearchRequest) {
6
+ LegacySearchRequest.SearchMethod = {
7
+ Hybrid: "hybrid",
8
+ Neural: "neural",
9
+ Keyword: "keyword",
10
+ };
11
+ })(LegacySearchRequest || (LegacySearchRequest = {}));
@@ -0,0 +1,17 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as AirweaveSDK from "../index.mjs";
5
+ /**
6
+ * Legacy search response schema for backwards compatibility.
7
+ */
8
+ export interface LegacySearchResponse {
9
+ /** Array of search result objects */
10
+ results: Record<string, unknown>[];
11
+ /** Indicates whether results are raw search matches or AI-generated completions */
12
+ response_type: AirweaveSDK.ResponseType;
13
+ /** AI-generated natural language answer when response_type is 'completion' */
14
+ completion?: string;
15
+ /** Status of the search operation */
16
+ status: AirweaveSDK.SearchStatus;
17
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,42 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Comprehensive organization metrics for admin dashboard.
6
+ *
7
+ * Combines organization info with billing and usage metrics from the Usage model.
8
+ */
9
+ export interface OrganizationMetrics {
10
+ /** Organization ID */
11
+ id: string;
12
+ /** Organization name */
13
+ name: string;
14
+ /** Organization description */
15
+ description?: string;
16
+ /** When organization was created */
17
+ created_at: string;
18
+ /** Last modification time */
19
+ modified_at: string;
20
+ /** Auth0 organization ID */
21
+ auth0_org_id?: string;
22
+ /** Current billing plan (trial, starter, pro, enterprise) */
23
+ billing_plan?: string;
24
+ /** Billing status (active, cancelled, past_due, etc.) */
25
+ billing_status?: string;
26
+ /** Stripe customer ID */
27
+ stripe_customer_id?: string;
28
+ /** When trial ends */
29
+ trial_ends_at?: string;
30
+ /** Number of users in organization */
31
+ user_count?: number;
32
+ /** Number of source connections (from Usage.source_connections) */
33
+ source_connection_count?: number;
34
+ /** Total number of entities (from Usage.entities) */
35
+ entity_count?: number;
36
+ /** Total number of queries (from Usage.queries) */
37
+ query_count?: number;
38
+ /** Whether the current admin user is already a member */
39
+ is_member?: boolean;
40
+ /** Admin's role in this organization (if member) */
41
+ member_role?: string;
42
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Retrieval strategies for search.
6
+ */
7
+ export type RetrievalStrategy = "hybrid" | "neural" | "keyword";
8
+ export declare const RetrievalStrategy: {
9
+ readonly Hybrid: "hybrid";
10
+ readonly Neural: "neural";
11
+ readonly Keyword: "keyword";
12
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export const RetrievalStrategy = {
5
+ Hybrid: "hybrid",
6
+ Neural: "neural",
7
+ Keyword: "keyword",
8
+ };
@@ -0,0 +1,29 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as AirweaveSDK from "../index.mjs";
5
+ /**
6
+ * Search request schema.
7
+ */
8
+ export interface SearchRequest {
9
+ /** The search query text */
10
+ query: string;
11
+ /** The retrieval strategy to use */
12
+ retrieval_strategy?: AirweaveSDK.RetrievalStrategy;
13
+ /** Qdrant native filter for metadata-based filtering */
14
+ filter?: AirweaveSDK.Filter;
15
+ /** Number of results to skip */
16
+ offset?: number;
17
+ /** Maximum number of results to return */
18
+ limit?: number;
19
+ /** Weight recent content higher than older content; 0 = no recency effect, 1 = only recent items matter */
20
+ temporal_relevance?: number;
21
+ /** Generate a few query variations to improve recall */
22
+ expand_query?: boolean;
23
+ /** Extract structured filters from natural-language query */
24
+ interpret_filters?: boolean;
25
+ /** Reorder the top candidate results for improved relevance. Max number of results that can be reranked is capped to around 1000. */
26
+ rerank?: boolean;
27
+ /** Generate a natural-language answer to the query */
28
+ generate_answer?: boolean;
29
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -1,17 +1,12 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as AirweaveSDK from "../index.mjs";
5
4
  /**
6
5
  * Comprehensive search response containing results and metadata.
7
6
  */
8
7
  export interface SearchResponse {
9
8
  /** Array of search result objects containing the found documents, records, or data entities. */
10
9
  results: Record<string, unknown>[];
11
- /** Indicates whether results are raw search matches or AI-generated completions based on the found content. */
12
- response_type: AirweaveSDK.ResponseType;
13
- /** AI-generated natural language answer when response_type is 'completion'. This provides natural language answers to your query based on the content found across your connected data sources. */
10
+ /** This provides natural language answers to your query based on the content found across your connected data sources when generate_answer is true. */
14
11
  completion?: string;
15
- /** Status of the search operation indicating the quality and availability of results:<br/>• **success**: Search found relevant results matching your query<br/>• **no_relevant_results**: Search completed but found no sufficiently relevant matches<br/>• **no_results**: Search found no results at all, possibly indicating empty collections or very specific queries */
16
- status: AirweaveSDK.SearchStatus;
17
12
  }
@@ -12,4 +12,5 @@ export interface User {
12
12
  auth0_id?: string;
13
13
  primary_organization_id?: string;
14
14
  user_organizations?: AirweaveSDK.UserOrganization[];
15
+ is_admin?: boolean;
15
16
  }
@@ -58,6 +58,8 @@ export * from "./InvitationCreate.mjs";
58
58
  export * from "./InvitationResponse.mjs";
59
59
  export * from "./IsEmptyCondition.mjs";
60
60
  export * from "./IsNullCondition.mjs";
61
+ export * from "./LegacySearchRequest.mjs";
62
+ export * from "./LegacySearchResponse.mjs";
61
63
  export * from "./MatchAny.mjs";
62
64
  export * from "./MatchExcept.mjs";
63
65
  export * from "./MatchPhrase.mjs";
@@ -75,13 +77,16 @@ export * from "./OAuthTokenAuthentication.mjs";
75
77
  export * from "./OAuthType.mjs";
76
78
  export * from "./Organization.mjs";
77
79
  export * from "./OrganizationCreate.mjs";
80
+ export * from "./OrganizationMetrics.mjs";
78
81
  export * from "./OrganizationWithRole.mjs";
79
82
  export * from "./PayloadField.mjs";
80
83
  export * from "./QueryExpansionStrategy.mjs";
81
84
  export * from "./ResponseType.mjs";
85
+ export * from "./RetrievalStrategy.mjs";
82
86
  export * from "./ScheduleConfig.mjs";
83
87
  export * from "./ScheduleDetails.mjs";
84
88
  export * from "./ScheduleResponse.mjs";
89
+ export * from "./SearchRequest.mjs";
85
90
  export * from "./SearchResponse.mjs";
86
91
  export * from "./SearchStatus.mjs";
87
92
  export * from "./SingleActionCheckResponse.mjs";
@@ -58,6 +58,8 @@ export * from "./InvitationCreate.mjs";
58
58
  export * from "./InvitationResponse.mjs";
59
59
  export * from "./IsEmptyCondition.mjs";
60
60
  export * from "./IsNullCondition.mjs";
61
+ export * from "./LegacySearchRequest.mjs";
62
+ export * from "./LegacySearchResponse.mjs";
61
63
  export * from "./MatchAny.mjs";
62
64
  export * from "./MatchExcept.mjs";
63
65
  export * from "./MatchPhrase.mjs";
@@ -75,13 +77,16 @@ export * from "./OAuthTokenAuthentication.mjs";
75
77
  export * from "./OAuthType.mjs";
76
78
  export * from "./Organization.mjs";
77
79
  export * from "./OrganizationCreate.mjs";
80
+ export * from "./OrganizationMetrics.mjs";
78
81
  export * from "./OrganizationWithRole.mjs";
79
82
  export * from "./PayloadField.mjs";
80
83
  export * from "./QueryExpansionStrategy.mjs";
81
84
  export * from "./ResponseType.mjs";
85
+ export * from "./RetrievalStrategy.mjs";
82
86
  export * from "./ScheduleConfig.mjs";
83
87
  export * from "./ScheduleDetails.mjs";
84
88
  export * from "./ScheduleResponse.mjs";
89
+ export * from "./SearchRequest.mjs";
85
90
  export * from "./SearchResponse.mjs";
86
91
  export * from "./SearchStatus.mjs";
87
92
  export * from "./SingleActionCheckResponse.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "v0.6.36";
1
+ export declare const SDK_VERSION = "v0.6.38";
@@ -1 +1 @@
1
- export const SDK_VERSION = "v0.6.36";
1
+ export const SDK_VERSION = "v0.6.38";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@airweave/sdk",
3
- "version": "v0.6.36",
3
+ "version": "v0.6.38",
4
4
  "private": false,
5
5
  "repository": "github:airweave-ai/typescript-sdk",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -390,7 +390,7 @@ await client.collections.delete("readable_id");
390
390
  </dl>
391
391
  </details>
392
392
 
393
- <details><summary><code>client.collections.<a href="/src/api/resources/collections/client/Client.ts">search</a>(readableId, { ...params }) -> AirweaveSDK.SearchResponse</code></summary>
393
+ <details><summary><code>client.collections.<a href="/src/api/resources/collections/client/Client.ts">refreshAllSourceConnections</a>(readableId) -> AirweaveSDK.SourceConnectionJob[]</code></summary>
394
394
  <dl>
395
395
  <dd>
396
396
 
@@ -402,10 +402,12 @@ await client.collections.delete("readable_id");
402
402
  <dl>
403
403
  <dd>
404
404
 
405
- Search across all data sources within the specified collection.
405
+ Trigger data synchronization for all source connections in the collection.
406
406
 
407
- This GET endpoint provides basic search functionality. For advanced filtering
408
- and options, use the POST /search endpoint.
407
+ The sync jobs run asynchronously in the background, so this endpoint
408
+ returns immediately with job details that you can use to track progress. You can
409
+ monitor the status of individual data synchronization using the source connection
410
+ endpoints.
409
411
 
410
412
  </dd>
411
413
  </dl>
@@ -421,13 +423,7 @@ and options, use the POST /search endpoint.
421
423
  <dd>
422
424
 
423
425
  ```typescript
424
- await client.collections.search("readable_id", {
425
- query: "customer payment issues",
426
- response_type: "raw",
427
- limit: 1,
428
- offset: 1,
429
- recency_bias: 1.1,
430
- });
426
+ await client.collections.refreshAllSourceConnections("readable_id");
431
427
  ```
432
428
 
433
429
  </dd>
@@ -443,15 +439,7 @@ await client.collections.search("readable_id", {
443
439
  <dl>
444
440
  <dd>
445
441
 
446
- **readableId:** `string` — The unique readable identifier of the collection to search
447
-
448
- </dd>
449
- </dl>
450
-
451
- <dl>
452
- <dd>
453
-
454
- **request:** `AirweaveSDK.SearchCollectionsReadableIdSearchGetRequest`
442
+ **readableId:** `string` — The unique readable identifier of the collection to refresh
455
443
 
456
444
  </dd>
457
445
  </dl>
@@ -470,7 +458,7 @@ await client.collections.search("readable_id", {
470
458
  </dl>
471
459
  </details>
472
460
 
473
- <details><summary><code>client.collections.<a href="/src/api/resources/collections/client/Client.ts">searchAdvanced</a>(readableId, { ...params }) -> AirweaveSDK.SearchResponse</code></summary>
461
+ <details><summary><code>client.collections.<a href="/src/api/resources/collections/client/Client.ts">searchGetLegacy</a>(readableId, { ...params }) -> AirweaveSDK.LegacySearchResponse</code></summary>
474
462
  <dl>
475
463
  <dd>
476
464
 
@@ -482,33 +470,15 @@ await client.collections.search("readable_id", {
482
470
  <dl>
483
471
  <dd>
484
472
 
485
- Advanced search with comprehensive filtering and options.
486
-
487
- This endpoint supports:
488
-
489
- - Metadata filtering using Qdrant's native filter syntax
490
- - Pagination with offset and limit
491
- - Score threshold filtering
492
- - Query expansion strategies (default: AUTO, generates up to 4 variations)
493
- - Automatic filter extraction from natural language (default: ON)
494
- - LLM-based result reranking (default: ON)
495
-
496
- Default behavior:
473
+ Legacy GET search endpoint for backwards compatibility.
497
474
 
498
- - Query expansion: ON (AUTO strategy)
499
- - Query interpretation: ON (extracts filters from natural language)
500
- - Reranking: ON (improves relevance using LLM)
501
- - Score threshold: None (no filtering)
475
+ DEPRECATED: This endpoint uses the old schema. Please migrate to POST with the new
476
+ SearchRequest format for access to all features.
502
477
 
503
- To disable features, explicitly set:
504
-
505
- - enable_reranking: false
506
- - enable_query_interpretation: false
507
- - expansion_strategy: "no_expansion"
508
- </dd>
509
- </dl>
510
- </dd>
511
- </dl>
478
+ </dd>
479
+ </dl>
480
+ </dd>
481
+ </dl>
512
482
 
513
483
  #### 🔌 Usage
514
484
 
@@ -519,16 +489,12 @@ To disable features, explicitly set:
519
489
  <dd>
520
490
 
521
491
  ```typescript
522
- await client.collections.searchAdvanced("readable_id", {
523
- query: "customer payment issues",
524
- filter: {
525
- must: {
526
- key: "key",
527
- },
528
- },
529
- limit: 10,
530
- score_threshold: 0.7,
531
- response_type: "completion",
492
+ await client.collections.searchGetLegacy("readable_id", {
493
+ query: "query",
494
+ response_type: "raw",
495
+ limit: 1,
496
+ offset: 1,
497
+ recency_bias: 1.1,
532
498
  });
533
499
  ```
534
500
 
@@ -553,7 +519,7 @@ await client.collections.searchAdvanced("readable_id", {
553
519
  <dl>
554
520
  <dd>
555
521
 
556
- **request:** `AirweaveSDK.SearchRequest`
522
+ **request:** `AirweaveSDK.SearchGetLegacyCollectionsReadableIdSearchGetRequest`
557
523
 
558
524
  </dd>
559
525
  </dl>
@@ -572,7 +538,7 @@ await client.collections.searchAdvanced("readable_id", {
572
538
  </dl>
573
539
  </details>
574
540
 
575
- <details><summary><code>client.collections.<a href="/src/api/resources/collections/client/Client.ts">refreshAllSourceConnections</a>(readableId) -> AirweaveSDK.SourceConnectionJob[]</code></summary>
541
+ <details><summary><code>client.collections.<a href="/src/api/resources/collections/client/Client.ts">search</a>(readableId, { ...params }) -> AirweaveSDK.SearchCollectionsReadableIdSearchPostResponse</code></summary>
576
542
  <dl>
577
543
  <dd>
578
544
 
@@ -584,12 +550,10 @@ await client.collections.searchAdvanced("readable_id", {
584
550
  <dl>
585
551
  <dd>
586
552
 
587
- Trigger data synchronization for all source connections in the collection.
553
+ Search your collection.
588
554
 
589
- The sync jobs run asynchronously in the background, so this endpoint
590
- returns immediately with job details that you can use to track progress. You can
591
- monitor the status of individual data synchronization using the source connection
592
- endpoints.
555
+ Accepts both new SearchRequest and legacy LegacySearchRequest formats
556
+ for backwards compatibility.
593
557
 
594
558
  </dd>
595
559
  </dl>
@@ -605,7 +569,9 @@ endpoints.
605
569
  <dd>
606
570
 
607
571
  ```typescript
608
- await client.collections.refreshAllSourceConnections("readable_id");
572
+ await client.collections.search("readable_id", {
573
+ query: "query",
574
+ });
609
575
  ```
610
576
 
611
577
  </dd>
@@ -621,7 +587,15 @@ await client.collections.refreshAllSourceConnections("readable_id");
621
587
  <dl>
622
588
  <dd>
623
589
 
624
- **readableId:** `string` — The unique readable identifier of the collection to refresh
590
+ **readableId:** `string` — The unique readable identifier of the collection
591
+
592
+ </dd>
593
+ </dl>
594
+
595
+ <dl>
596
+ <dd>
597
+
598
+ **request:** `AirweaveSDK.SearchCollectionsReadableIdSearchPostRequest`
625
599
 
626
600
  </dd>
627
601
  </dl>
@@ -1,50 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as AirweaveSDK from "../../../../index.js";
5
- /**
6
- * @example
7
- * {
8
- * query: "customer payment issues",
9
- * filter: {
10
- * must: {
11
- * key: "key"
12
- * }
13
- * },
14
- * limit: 10,
15
- * score_threshold: 0.7,
16
- * response_type: "completion"
17
- * }
18
- */
19
- export interface SearchRequest {
20
- /** The search query text */
21
- query: string;
22
- /** Qdrant native filter for metadata-based filtering */
23
- filter?: AirweaveSDK.Filter;
24
- /** Number of results to skip (DEFAULT: 0) */
25
- offset?: number;
26
- /** Maximum number of results to return (DEFAULT: 100) */
27
- limit?: number;
28
- /** Minimum similarity score threshold (DEFAULT: None - no filtering) */
29
- score_threshold?: number;
30
- /** Type of response - 'raw' or 'completion' (DEFAULT: 'raw') */
31
- response_type?: AirweaveSDK.ResponseType;
32
- /** Search method to use (DEFAULT: 'hybrid' - combines neural + BM25) */
33
- search_method?: SearchRequest.SearchMethod;
34
- /** How much document age penalizes the similarity score (0..1). 0 = no age penalty (pure similarity); 0.5 = old docs lose up to 50% of their score; 1 = old docs get zero score (pure recency). Applied as: score × (1 - bias + bias × age_factor). Works within top ~10,000 semantic matches. DEFAULT: 0.3 */
35
- recency_bias?: number;
36
- /** Query expansion strategy (DEFAULT: 'auto' - generates up to 4 query variations). Options: 'auto', 'llm', 'no_expansion' */
37
- expansion_strategy?: AirweaveSDK.QueryExpansionStrategy;
38
- /** Enable LLM-based reranking to improve result relevance (DEFAULT: True - enabled, set to False to disable) */
39
- enable_reranking?: boolean;
40
- /** Enable automatic filter extraction from natural language query (DEFAULT: True - enabled, set to False to disable) */
41
- enable_query_interpretation?: boolean;
42
- }
43
- export declare namespace SearchRequest {
44
- type SearchMethod = "hybrid" | "neural" | "keyword";
45
- const SearchMethod: {
46
- readonly Hybrid: "hybrid";
47
- readonly Neural: "neural";
48
- readonly Keyword: "keyword";
49
- };
50
- }
@@ -1,50 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as AirweaveSDK from "../../../../index.mjs";
5
- /**
6
- * @example
7
- * {
8
- * query: "customer payment issues",
9
- * filter: {
10
- * must: {
11
- * key: "key"
12
- * }
13
- * },
14
- * limit: 10,
15
- * score_threshold: 0.7,
16
- * response_type: "completion"
17
- * }
18
- */
19
- export interface SearchRequest {
20
- /** The search query text */
21
- query: string;
22
- /** Qdrant native filter for metadata-based filtering */
23
- filter?: AirweaveSDK.Filter;
24
- /** Number of results to skip (DEFAULT: 0) */
25
- offset?: number;
26
- /** Maximum number of results to return (DEFAULT: 100) */
27
- limit?: number;
28
- /** Minimum similarity score threshold (DEFAULT: None - no filtering) */
29
- score_threshold?: number;
30
- /** Type of response - 'raw' or 'completion' (DEFAULT: 'raw') */
31
- response_type?: AirweaveSDK.ResponseType;
32
- /** Search method to use (DEFAULT: 'hybrid' - combines neural + BM25) */
33
- search_method?: SearchRequest.SearchMethod;
34
- /** How much document age penalizes the similarity score (0..1). 0 = no age penalty (pure similarity); 0.5 = old docs lose up to 50% of their score; 1 = old docs get zero score (pure recency). Applied as: score × (1 - bias + bias × age_factor). Works within top ~10,000 semantic matches. DEFAULT: 0.3 */
35
- recency_bias?: number;
36
- /** Query expansion strategy (DEFAULT: 'auto' - generates up to 4 query variations). Options: 'auto', 'llm', 'no_expansion' */
37
- expansion_strategy?: AirweaveSDK.QueryExpansionStrategy;
38
- /** Enable LLM-based reranking to improve result relevance (DEFAULT: True - enabled, set to False to disable) */
39
- enable_reranking?: boolean;
40
- /** Enable automatic filter extraction from natural language query (DEFAULT: True - enabled, set to False to disable) */
41
- enable_query_interpretation?: boolean;
42
- }
43
- export declare namespace SearchRequest {
44
- type SearchMethod = "hybrid" | "neural" | "keyword";
45
- const SearchMethod: {
46
- readonly Hybrid: "hybrid";
47
- readonly Neural: "neural";
48
- readonly Keyword: "keyword";
49
- };
50
- }
@@ -1,11 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export var SearchRequest;
5
- (function (SearchRequest) {
6
- SearchRequest.SearchMethod = {
7
- Hybrid: "hybrid",
8
- Neural: "neural",
9
- Keyword: "keyword",
10
- };
11
- })(SearchRequest || (SearchRequest = {}));