@airweave/sdk 0.7.1 → 0.7.3

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/README.md CHANGED
@@ -7,29 +7,9 @@ The Airweave TypeScript library provides convenient access to the Airweave APIs
7
7
 
8
8
  ## Table of Contents
9
9
 
10
- - [Table of Contents](#table-of-contents)
11
10
  - [Installation](#installation)
12
11
  - [Reference](#reference)
13
12
  - [Usage](#usage)
14
- - [Framework Tracking](#framework-tracking)
15
- - [Request and Response Types](#request-and-response-types)
16
- - [Exception Handling](#exception-handling)
17
- - [Advanced](#advanced)
18
- - [Additional Headers](#additional-headers)
19
- - [Additional Query String Parameters](#additional-query-string-parameters)
20
- - [Retries](#retries)
21
- - [Timeouts](#timeouts)
22
- - [Aborting Requests](#aborting-requests)
23
- - [Access Raw Response Data](#access-raw-response-data)
24
- - [Runtime Compatibility](#runtime-compatibility)
25
- - [Contributing](#contributing)
26
-
27
- ## Table of Contents
28
-
29
- - [Installation](#installation)
30
- - [Reference](#reference)
31
- - [Usage](#usage)
32
- - [Framework Tracking](#framework-tracking)
33
13
  - [Request and Response Types](#request-and-response-types)
34
14
  - [Exception Handling](#exception-handling)
35
15
  - [Advanced](#advanced)
@@ -70,22 +50,6 @@ await client.collections.create({
70
50
  });
71
51
  ```
72
52
 
73
- ## Framework Tracking
74
-
75
- If you're using Airweave with an agent framework like CrewAI, LangChain, or LlamaIndex, you can track which framework is making requests. This helps Airweave provide better analytics and support for your specific framework.
76
-
77
- ```typescript
78
- import { AirweaveSDKClient } from "@airweave/sdk";
79
-
80
- const client = new AirweaveSDKClient({
81
- apiKey: "YOUR_API_KEY",
82
- frameworkName: "langchain",
83
- frameworkVersion: "0.2.0",
84
- });
85
- ```
86
-
87
- The framework information is automatically sent with every request as headers (`X-Framework-Name` and `X-Framework-Version`), enabling better insights and troubleshooting.
88
-
89
53
  ## Request and Response Types
90
54
 
91
55
  The SDK exports all request and response types as TypeScript interfaces. Simply import them with the
@@ -49,8 +49,8 @@ class AirweaveSDKClient {
49
49
  "X-Framework-Version": _options === null || _options === void 0 ? void 0 : _options.frameworkVersion,
50
50
  "X-Fern-Language": "JavaScript",
51
51
  "X-Fern-SDK-Name": "@airweave/sdk",
52
- "X-Fern-SDK-Version": "v0.7.1",
53
- "User-Agent": "@airweave/sdk/v0.7.1",
52
+ "X-Fern-SDK-Version": "v0.7.3",
53
+ "User-Agent": "@airweave/sdk/v0.7.3",
54
54
  "X-Fern-Runtime": core.RUNTIME.type,
55
55
  "X-Fern-Runtime-Version": core.RUNTIME.version,
56
56
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -41,7 +41,9 @@ export declare class Collections {
41
41
  protected readonly _options: Collections.Options;
42
42
  constructor(_options: Collections.Options);
43
43
  /**
44
- * List all collections that belong to your organization.
44
+ * List all collections that belong to your organization with optional search filtering.
45
+ *
46
+ * Collections are always sorted by creation date (newest first).
45
47
  *
46
48
  * @param {AirweaveSDK.ListCollectionsGetRequest} request
47
49
  * @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
@@ -51,7 +53,8 @@ export declare class Collections {
51
53
  * @example
52
54
  * await client.collections.list({
53
55
  * skip: 1,
54
- * limit: 1
56
+ * limit: 1,
57
+ * search: "search"
55
58
  * })
56
59
  */
57
60
  list(request?: AirweaveSDK.ListCollectionsGetRequest, requestOptions?: Collections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.Collection[]>;
@@ -59,7 +59,9 @@ class Collections {
59
59
  this._options = _options;
60
60
  }
61
61
  /**
62
- * List all collections that belong to your organization.
62
+ * List all collections that belong to your organization with optional search filtering.
63
+ *
64
+ * Collections are always sorted by creation date (newest first).
63
65
  *
64
66
  * @param {AirweaveSDK.ListCollectionsGetRequest} request
65
67
  * @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
@@ -69,7 +71,8 @@ class Collections {
69
71
  * @example
70
72
  * await client.collections.list({
71
73
  * skip: 1,
72
- * limit: 1
74
+ * limit: 1,
75
+ * search: "search"
73
76
  * })
74
77
  */
75
78
  list(request = {}, requestOptions) {
@@ -78,7 +81,7 @@ class Collections {
78
81
  __list() {
79
82
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
80
83
  var _a, _b, _c, _d, _e, _f, _g;
81
- const { skip, limit } = request;
84
+ const { skip, limit, search } = request;
82
85
  const _queryParams = {};
83
86
  if (skip != null) {
84
87
  _queryParams["skip"] = skip.toString();
@@ -86,6 +89,9 @@ class Collections {
86
89
  if (limit != null) {
87
90
  _queryParams["limit"] = limit.toString();
88
91
  }
92
+ if (search != null) {
93
+ _queryParams["search"] = search;
94
+ }
89
95
  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({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
90
96
  const _response = yield core.fetcher({
91
97
  url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, "collections"),
@@ -5,7 +5,8 @@
5
5
  * @example
6
6
  * {
7
7
  * skip: 1,
8
- * limit: 1
8
+ * limit: 1,
9
+ * search: "search"
9
10
  * }
10
11
  */
11
12
  export interface ListCollectionsGetRequest {
@@ -13,4 +14,6 @@ export interface ListCollectionsGetRequest {
13
14
  skip?: number;
14
15
  /** Maximum number of collections to return (1-1000) */
15
16
  limit?: number;
17
+ /** Search term to filter by name or readable_id */
18
+ search?: string;
16
19
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "v0.7.1";
1
+ export declare const SDK_VERSION = "v0.7.3";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "v0.7.1";
4
+ exports.SDK_VERSION = "v0.7.3";
@@ -13,8 +13,8 @@ export class AirweaveSDKClient {
13
13
  "X-Framework-Version": _options === null || _options === void 0 ? void 0 : _options.frameworkVersion,
14
14
  "X-Fern-Language": "JavaScript",
15
15
  "X-Fern-SDK-Name": "@airweave/sdk",
16
- "X-Fern-SDK-Version": "v0.7.1",
17
- "User-Agent": "@airweave/sdk/v0.7.1",
16
+ "X-Fern-SDK-Version": "v0.7.3",
17
+ "User-Agent": "@airweave/sdk/v0.7.3",
18
18
  "X-Fern-Runtime": core.RUNTIME.type,
19
19
  "X-Fern-Runtime-Version": core.RUNTIME.version,
20
20
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -41,7 +41,9 @@ export declare class Collections {
41
41
  protected readonly _options: Collections.Options;
42
42
  constructor(_options: Collections.Options);
43
43
  /**
44
- * List all collections that belong to your organization.
44
+ * List all collections that belong to your organization with optional search filtering.
45
+ *
46
+ * Collections are always sorted by creation date (newest first).
45
47
  *
46
48
  * @param {AirweaveSDK.ListCollectionsGetRequest} request
47
49
  * @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
@@ -51,7 +53,8 @@ export declare class Collections {
51
53
  * @example
52
54
  * await client.collections.list({
53
55
  * skip: 1,
54
- * limit: 1
56
+ * limit: 1,
57
+ * search: "search"
55
58
  * })
56
59
  */
57
60
  list(request?: AirweaveSDK.ListCollectionsGetRequest, requestOptions?: Collections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.Collection[]>;
@@ -23,7 +23,9 @@ export class Collections {
23
23
  this._options = _options;
24
24
  }
25
25
  /**
26
- * List all collections that belong to your organization.
26
+ * List all collections that belong to your organization with optional search filtering.
27
+ *
28
+ * Collections are always sorted by creation date (newest first).
27
29
  *
28
30
  * @param {AirweaveSDK.ListCollectionsGetRequest} request
29
31
  * @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
@@ -33,7 +35,8 @@ export class Collections {
33
35
  * @example
34
36
  * await client.collections.list({
35
37
  * skip: 1,
36
- * limit: 1
38
+ * limit: 1,
39
+ * search: "search"
37
40
  * })
38
41
  */
39
42
  list(request = {}, requestOptions) {
@@ -42,7 +45,7 @@ export class Collections {
42
45
  __list() {
43
46
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
44
47
  var _a, _b, _c, _d, _e, _f, _g;
45
- const { skip, limit } = request;
48
+ const { skip, limit, search } = request;
46
49
  const _queryParams = {};
47
50
  if (skip != null) {
48
51
  _queryParams["skip"] = skip.toString();
@@ -50,6 +53,9 @@ export class Collections {
50
53
  if (limit != null) {
51
54
  _queryParams["limit"] = limit.toString();
52
55
  }
56
+ if (search != null) {
57
+ _queryParams["search"] = search;
58
+ }
53
59
  let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({ "X-Framework-Name": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkName) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.frameworkName, "X-Framework-Version": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.frameworkVersion) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.frameworkVersion }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
54
60
  const _response = yield core.fetcher({
55
61
  url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AirweaveSDKEnvironment.Production, "collections"),
@@ -5,7 +5,8 @@
5
5
  * @example
6
6
  * {
7
7
  * skip: 1,
8
- * limit: 1
8
+ * limit: 1,
9
+ * search: "search"
9
10
  * }
10
11
  */
11
12
  export interface ListCollectionsGetRequest {
@@ -13,4 +14,6 @@ export interface ListCollectionsGetRequest {
13
14
  skip?: number;
14
15
  /** Maximum number of collections to return (1-1000) */
15
16
  limit?: number;
17
+ /** Search term to filter by name or readable_id */
18
+ search?: string;
16
19
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "v0.7.1";
1
+ export declare const SDK_VERSION = "v0.7.3";
@@ -1 +1 @@
1
- export const SDK_VERSION = "v0.7.1";
1
+ export const SDK_VERSION = "v0.7.3";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@airweave/sdk",
3
- "version": "v0.7.1",
3
+ "version": "v0.7.3",
4
4
  "private": false,
5
5
  "repository": "github:airweave-ai/typescript-sdk",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -137,7 +137,9 @@ await client.sources.get("short_name");
137
137
  <dl>
138
138
  <dd>
139
139
 
140
- List all collections that belong to your organization.
140
+ List all collections that belong to your organization with optional search filtering.
141
+
142
+ Collections are always sorted by creation date (newest first).
141
143
 
142
144
  </dd>
143
145
  </dl>
@@ -156,6 +158,7 @@ List all collections that belong to your organization.
156
158
  await client.collections.list({
157
159
  skip: 1,
158
160
  limit: 1,
161
+ search: "search",
159
162
  });
160
163
  ```
161
164