@airweave/sdk 0.1.28 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/Client.d.ts +3 -3
  2. package/Client.js +6 -6
  3. package/api/resources/connections/client/Client.d.ts +1 -43
  4. package/api/resources/connections/client/Client.js +11 -163
  5. package/api/resources/connections/client/requests/index.d.ts +0 -1
  6. package/api/resources/destinations/client/Client.js +2 -2
  7. package/api/resources/embeddingModels/client/Client.js +2 -2
  8. package/api/resources/entities/client/Client.js +8 -8
  9. package/api/resources/index.d.ts +2 -2
  10. package/api/resources/index.js +3 -3
  11. package/api/resources/search/client/Client.d.ts +55 -0
  12. package/api/resources/search/client/Client.js +147 -0
  13. package/api/resources/search/client/requests/SearchSearchGetRequest.d.ts +20 -0
  14. package/api/resources/search/client/requests/index.d.ts +1 -0
  15. package/api/resources/sources/client/Client.js +2 -2
  16. package/api/resources/sync/client/Client.js +11 -11
  17. package/api/resources/transformers/client/Client.js +3 -3
  18. package/api/resources/users/client/Client.js +1 -1
  19. package/api/resources/whiteLabels/client/Client.js +8 -8
  20. package/api/types/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.d.ts +7 -0
  21. package/api/types/SyncDagCreate.d.ts +14 -0
  22. package/{dist/api/resources/dag/client/requests → api/types}/SyncDagUpdate.d.ts +3 -7
  23. package/api/types/index.d.ts +3 -0
  24. package/api/types/index.js +3 -0
  25. package/dist/Client.d.ts +3 -3
  26. package/dist/Client.js +6 -6
  27. package/dist/api/resources/connections/client/Client.d.ts +1 -43
  28. package/dist/api/resources/connections/client/Client.js +11 -163
  29. package/dist/api/resources/connections/client/requests/index.d.ts +0 -1
  30. package/dist/api/resources/destinations/client/Client.js +2 -2
  31. package/dist/api/resources/embeddingModels/client/Client.js +2 -2
  32. package/dist/api/resources/entities/client/Client.js +8 -8
  33. package/dist/api/resources/index.d.ts +2 -2
  34. package/dist/api/resources/index.js +3 -3
  35. package/dist/api/resources/search/client/Client.d.ts +55 -0
  36. package/dist/api/resources/search/client/Client.js +147 -0
  37. package/dist/api/resources/search/client/requests/SearchSearchGetRequest.d.ts +20 -0
  38. package/dist/api/resources/search/client/requests/index.d.ts +1 -0
  39. package/dist/api/resources/sources/client/Client.js +2 -2
  40. package/dist/api/resources/sync/client/Client.js +11 -11
  41. package/dist/api/resources/transformers/client/Client.js +3 -3
  42. package/dist/api/resources/users/client/Client.js +1 -1
  43. package/dist/api/resources/whiteLabels/client/Client.js +8 -8
  44. package/dist/api/types/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.d.ts +7 -0
  45. package/dist/api/types/SyncDagCreate.d.ts +14 -0
  46. package/{api/resources/dag/client/requests → dist/api/types}/SyncDagUpdate.d.ts +3 -7
  47. package/dist/api/types/index.d.ts +3 -0
  48. package/dist/api/types/index.js +3 -0
  49. package/dist/serialization/resources/connections/client/index.d.ts +0 -1
  50. package/dist/serialization/resources/connections/client/index.js +1 -2
  51. package/dist/serialization/resources/index.d.ts +1 -2
  52. package/dist/serialization/resources/index.js +2 -3
  53. package/dist/serialization/resources/search/client/index.d.ts +1 -0
  54. package/dist/serialization/resources/search/client/index.js +37 -0
  55. package/dist/serialization/resources/{connections/client/getOauth2AuthUrl.d.ts → search/client/search.d.ts} +2 -2
  56. package/dist/serialization/resources/{connections/client/getOauth2AuthUrl.js → search/client/search.js} +1 -1
  57. package/dist/serialization/types/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.d.ts +13 -0
  58. package/dist/serialization/types/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.js +44 -0
  59. package/dist/serialization/types/SyncDagCreate.d.ts +18 -0
  60. package/{serialization/resources/dag/client/requests → dist/serialization/types}/SyncDagCreate.js +4 -4
  61. package/dist/serialization/types/SyncDagUpdate.d.ts +18 -0
  62. package/dist/serialization/{resources/dag/client/requests → types}/SyncDagUpdate.js +4 -4
  63. package/dist/serialization/types/index.d.ts +3 -0
  64. package/dist/serialization/types/index.js +3 -0
  65. package/dist/version.d.ts +1 -1
  66. package/dist/version.js +1 -1
  67. package/package.json +1 -1
  68. package/reference.md +80 -435
  69. package/serialization/resources/connections/client/index.d.ts +0 -1
  70. package/serialization/resources/connections/client/index.js +1 -2
  71. package/serialization/resources/index.d.ts +1 -2
  72. package/serialization/resources/index.js +2 -3
  73. package/serialization/resources/search/client/index.d.ts +1 -0
  74. package/serialization/resources/search/client/index.js +37 -0
  75. package/serialization/resources/{connections/client/getOauth2AuthUrl.d.ts → search/client/search.d.ts} +2 -2
  76. package/serialization/resources/{connections/client/getOauth2AuthUrl.js → search/client/search.js} +1 -1
  77. package/serialization/types/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.d.ts +13 -0
  78. package/serialization/types/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.js +44 -0
  79. package/serialization/types/SyncDagCreate.d.ts +18 -0
  80. package/{dist/serialization/resources/dag/client/requests → serialization/types}/SyncDagCreate.js +4 -4
  81. package/serialization/types/SyncDagUpdate.d.ts +18 -0
  82. package/serialization/{resources/dag/client/requests → types}/SyncDagUpdate.js +4 -4
  83. package/serialization/types/index.d.ts +3 -0
  84. package/serialization/types/index.js +3 -0
  85. package/version.d.ts +1 -1
  86. package/version.js +1 -1
  87. package/api/resources/connections/client/requests/GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest.d.ts +0 -12
  88. package/api/resources/dag/client/Client.d.ts +0 -95
  89. package/api/resources/dag/client/Client.js +0 -347
  90. package/api/resources/dag/client/requests/InitializeDagDagInitGetRequest.d.ts +0 -12
  91. package/api/resources/dag/client/requests/SyncDagCreate.d.ts +0 -26
  92. package/api/resources/dag/client/requests/index.d.ts +0 -3
  93. package/dist/api/resources/connections/client/requests/GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest.d.ts +0 -12
  94. package/dist/api/resources/dag/client/Client.d.ts +0 -95
  95. package/dist/api/resources/dag/client/Client.js +0 -347
  96. package/dist/api/resources/dag/client/requests/InitializeDagDagInitGetRequest.d.ts +0 -12
  97. package/dist/api/resources/dag/client/requests/SyncDagCreate.d.ts +0 -26
  98. package/dist/api/resources/dag/client/requests/index.d.ts +0 -3
  99. package/dist/serialization/resources/dag/client/index.d.ts +0 -1
  100. package/dist/serialization/resources/dag/client/index.js +0 -17
  101. package/dist/serialization/resources/dag/client/requests/SyncDagCreate.d.ts +0 -18
  102. package/dist/serialization/resources/dag/client/requests/SyncDagUpdate.d.ts +0 -18
  103. package/dist/serialization/resources/dag/client/requests/index.d.ts +0 -2
  104. package/dist/serialization/resources/dag/client/requests/index.js +0 -7
  105. package/serialization/resources/dag/client/index.d.ts +0 -1
  106. package/serialization/resources/dag/client/index.js +0 -17
  107. package/serialization/resources/dag/client/requests/SyncDagCreate.d.ts +0 -18
  108. package/serialization/resources/dag/client/requests/SyncDagUpdate.d.ts +0 -18
  109. package/serialization/resources/dag/client/requests/index.d.ts +0 -2
  110. package/serialization/resources/dag/client/requests/index.js +0 -7
  111. /package/api/resources/{dag → search}/client/index.d.ts +0 -0
  112. /package/api/resources/{dag → search}/client/index.js +0 -0
  113. /package/api/resources/{connections/client/requests/GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest.js → search/client/requests/SearchSearchGetRequest.js} +0 -0
  114. /package/api/resources/{dag → search}/client/requests/index.js +0 -0
  115. /package/api/resources/{dag → search}/index.d.ts +0 -0
  116. /package/api/resources/{dag → search}/index.js +0 -0
  117. /package/api/{resources/dag/client/requests/InitializeDagDagInitGetRequest.js → types/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.js} +0 -0
  118. /package/api/{resources/dag/client/requests → types}/SyncDagCreate.js +0 -0
  119. /package/api/{resources/dag/client/requests → types}/SyncDagUpdate.js +0 -0
  120. /package/dist/api/resources/{dag → search}/client/index.d.ts +0 -0
  121. /package/dist/api/resources/{dag → search}/client/index.js +0 -0
  122. /package/dist/api/resources/{connections/client/requests/GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest.js → search/client/requests/SearchSearchGetRequest.js} +0 -0
  123. /package/dist/api/resources/{dag → search}/client/requests/index.js +0 -0
  124. /package/dist/api/resources/{dag → search}/index.d.ts +0 -0
  125. /package/dist/api/resources/{dag → search}/index.js +0 -0
  126. /package/dist/api/{resources/dag/client/requests/InitializeDagDagInitGetRequest.js → types/BodyConnectSlackWithTokenConnectionsDirectTokenSlackPost.js} +0 -0
  127. /package/dist/api/{resources/dag/client/requests → types}/SyncDagCreate.js +0 -0
  128. /package/dist/api/{resources/dag/client/requests → types}/SyncDagUpdate.js +0 -0
  129. /package/dist/serialization/resources/{dag → search}/index.d.ts +0 -0
  130. /package/dist/serialization/resources/{dag → search}/index.js +0 -0
  131. /package/serialization/resources/{dag → search}/index.d.ts +0 -0
  132. /package/serialization/resources/{dag → search}/index.js +0 -0
package/Client.d.ts CHANGED
@@ -9,8 +9,8 @@ import { Destinations } from "./api/resources/destinations/client/Client";
9
9
  import { EmbeddingModels } from "./api/resources/embeddingModels/client/Client";
10
10
  import { Connections } from "./api/resources/connections/client/Client";
11
11
  import { Sync } from "./api/resources/sync/client/Client";
12
+ import { Search } from "./api/resources/search/client/Client";
12
13
  import { WhiteLabels } from "./api/resources/whiteLabels/client/Client";
13
- import { Dag } from "./api/resources/dag/client/Client";
14
14
  import { Entities } from "./api/resources/entities/client/Client";
15
15
  import { Transformers } from "./api/resources/transformers/client/Client";
16
16
  export declare namespace AirweaveSDKClient {
@@ -40,8 +40,8 @@ export declare class AirweaveSDKClient {
40
40
  protected _embeddingModels: EmbeddingModels | undefined;
41
41
  protected _connections: Connections | undefined;
42
42
  protected _sync: Sync | undefined;
43
+ protected _search: Search | undefined;
43
44
  protected _whiteLabels: WhiteLabels | undefined;
44
- protected _dag: Dag | undefined;
45
45
  protected _entities: Entities | undefined;
46
46
  protected _transformers: Transformers | undefined;
47
47
  constructor(_options?: AirweaveSDKClient.Options);
@@ -51,8 +51,8 @@ export declare class AirweaveSDKClient {
51
51
  get embeddingModels(): EmbeddingModels;
52
52
  get connections(): Connections;
53
53
  get sync(): Sync;
54
+ get search(): Search;
54
55
  get whiteLabels(): WhiteLabels;
55
- get dag(): Dag;
56
56
  get entities(): Entities;
57
57
  get transformers(): Transformers;
58
58
  }
package/Client.js CHANGED
@@ -10,8 +10,8 @@ const Client_3 = require("./api/resources/destinations/client/Client");
10
10
  const Client_4 = require("./api/resources/embeddingModels/client/Client");
11
11
  const Client_5 = require("./api/resources/connections/client/Client");
12
12
  const Client_6 = require("./api/resources/sync/client/Client");
13
- const Client_7 = require("./api/resources/whiteLabels/client/Client");
14
- const Client_8 = require("./api/resources/dag/client/Client");
13
+ const Client_7 = require("./api/resources/search/client/Client");
14
+ const Client_8 = require("./api/resources/whiteLabels/client/Client");
15
15
  const Client_9 = require("./api/resources/entities/client/Client");
16
16
  const Client_10 = require("./api/resources/transformers/client/Client");
17
17
  class AirweaveSDKClient {
@@ -42,13 +42,13 @@ class AirweaveSDKClient {
42
42
  var _a;
43
43
  return ((_a = this._sync) !== null && _a !== void 0 ? _a : (this._sync = new Client_6.Sync(this._options)));
44
44
  }
45
- get whiteLabels() {
45
+ get search() {
46
46
  var _a;
47
- return ((_a = this._whiteLabels) !== null && _a !== void 0 ? _a : (this._whiteLabels = new Client_7.WhiteLabels(this._options)));
47
+ return ((_a = this._search) !== null && _a !== void 0 ? _a : (this._search = new Client_7.Search(this._options)));
48
48
  }
49
- get dag() {
49
+ get whiteLabels() {
50
50
  var _a;
51
- return ((_a = this._dag) !== null && _a !== void 0 ? _a : (this._dag = new Client_8.Dag(this._options)));
51
+ return ((_a = this._whiteLabels) !== null && _a !== void 0 ? _a : (this._whiteLabels = new Client_8.WhiteLabels(this._options)));
52
52
  }
53
53
  get entities() {
54
54
  var _a;
@@ -186,7 +186,7 @@ export declare class Connections {
186
186
  *
187
187
  * Returns:
188
188
  * --------
189
- * connection_schema (schemas.Connection): The disconnected connection
189
+ * connection (schemas.Connection): The disconnected connection
190
190
  *
191
191
  * @param {string} connectionId
192
192
  * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
@@ -197,48 +197,6 @@ export declare class Connections {
197
197
  * await client.connections.disconnectSourceConnection("connection_id")
198
198
  */
199
199
  disconnectSourceConnection(connectionId: string, requestOptions?: Connections.RequestOptions): Promise<AirweaveSDK.Connection>;
200
- /**
201
- * Disconnect from a destination connection.
202
- *
203
- * Args:
204
- * -----
205
- * db (AsyncSession): The database session
206
- * connection_id (UUID): The ID of the connection to disconnect
207
- * user (schemas.User): The current user
208
- *
209
- * Returns:
210
- * --------
211
- * connection_schema (schemas.Connection): The disconnected connection
212
- *
213
- * @param {string} connectionId
214
- * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
215
- *
216
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
217
- *
218
- * @example
219
- * await client.connections.disconnectDestinationConnection("connection_id")
220
- */
221
- disconnectDestinationConnection(connectionId: string, requestOptions?: Connections.RequestOptions): Promise<AirweaveSDK.Connection>;
222
- /**
223
- * Get the OAuth2 authorization URL for a source.
224
- *
225
- * Args:
226
- * -----
227
- * db: The database session
228
- * short_name: The short name of the source
229
- * user: The current user
230
- *
231
- * @param {AirweaveSDK.GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest} request
232
- * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
233
- *
234
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
235
- *
236
- * @example
237
- * await client.connections.getOauth2AuthUrl({
238
- * shortName: "short_name"
239
- * })
240
- */
241
- getOauth2AuthUrl(request: AirweaveSDK.GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest, requestOptions?: Connections.RequestOptions): Promise<string>;
242
200
  /**
243
201
  * Send the OAuth2 authorization code for a source.
244
202
  *
@@ -88,7 +88,7 @@ class Connections {
88
88
  method: "GET",
89
89
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
90
90
  ? yield core.Supplier.get(this._options.apiKey)
91
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.28", "User-Agent": "@airweave/sdk/0.1.28", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
91
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
92
92
  contentType: "application/json",
93
93
  requestType: "json",
94
94
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -161,7 +161,7 @@ class Connections {
161
161
  method: "GET",
162
162
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
163
163
  ? yield core.Supplier.get(this._options.apiKey)
164
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.28", "User-Agent": "@airweave/sdk/0.1.28", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
164
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
165
165
  contentType: "application/json",
166
166
  requestType: "json",
167
167
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -236,7 +236,7 @@ class Connections {
236
236
  method: "GET",
237
237
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
238
238
  ? yield core.Supplier.get(this._options.apiKey)
239
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.28", "User-Agent": "@airweave/sdk/0.1.28", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
239
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
240
240
  contentType: "application/json",
241
241
  requestType: "json",
242
242
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -328,7 +328,7 @@ class Connections {
328
328
  method: "POST",
329
329
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
330
330
  ? yield core.Supplier.get(this._options.apiKey)
331
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.28", "User-Agent": "@airweave/sdk/0.1.28", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
331
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
332
332
  contentType: "application/json",
333
333
  requestType: "json",
334
334
  body: serializers.BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -404,7 +404,7 @@ class Connections {
404
404
  method: "GET",
405
405
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
406
406
  ? yield core.Supplier.get(this._options.apiKey)
407
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.28", "User-Agent": "@airweave/sdk/0.1.28", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
407
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
408
408
  contentType: "application/json",
409
409
  requestType: "json",
410
410
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -481,7 +481,7 @@ class Connections {
481
481
  method: "DELETE",
482
482
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
483
483
  ? yield core.Supplier.get(this._options.apiKey)
484
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.28", "User-Agent": "@airweave/sdk/0.1.28", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
484
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
485
485
  contentType: "application/json",
486
486
  requestType: "json",
487
487
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -538,7 +538,7 @@ class Connections {
538
538
  *
539
539
  * Returns:
540
540
  * --------
541
- * connection_schema (schemas.Connection): The disconnected connection
541
+ * connection (schemas.Connection): The disconnected connection
542
542
  *
543
543
  * @param {string} connectionId
544
544
  * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
@@ -556,7 +556,7 @@ class Connections {
556
556
  method: "PUT",
557
557
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
558
558
  ? yield core.Supplier.get(this._options.apiKey)
559
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.28", "User-Agent": "@airweave/sdk/0.1.28", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
559
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
560
560
  contentType: "application/json",
561
561
  requestType: "json",
562
562
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -602,158 +602,6 @@ class Connections {
602
602
  }
603
603
  });
604
604
  }
605
- /**
606
- * Disconnect from a destination connection.
607
- *
608
- * Args:
609
- * -----
610
- * db (AsyncSession): The database session
611
- * connection_id (UUID): The ID of the connection to disconnect
612
- * user (schemas.User): The current user
613
- *
614
- * Returns:
615
- * --------
616
- * connection_schema (schemas.Connection): The disconnected connection
617
- *
618
- * @param {string} connectionId
619
- * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
620
- *
621
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
622
- *
623
- * @example
624
- * await client.connections.disconnectDestinationConnection("connection_id")
625
- */
626
- disconnectDestinationConnection(connectionId, requestOptions) {
627
- return __awaiter(this, void 0, void 0, function* () {
628
- var _a;
629
- const _response = yield core.fetcher({
630
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `connections/disconnect/destination/${encodeURIComponent(connectionId)}`),
631
- method: "PUT",
632
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
633
- ? yield core.Supplier.get(this._options.apiKey)
634
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.28", "User-Agent": "@airweave/sdk/0.1.28", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
635
- contentType: "application/json",
636
- requestType: "json",
637
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
638
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
639
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
640
- });
641
- if (_response.ok) {
642
- return serializers.Connection.parseOrThrow(_response.body, {
643
- unrecognizedObjectKeys: "passthrough",
644
- allowUnrecognizedUnionMembers: true,
645
- allowUnrecognizedEnumValues: true,
646
- breadcrumbsPrefix: ["response"],
647
- });
648
- }
649
- if (_response.error.reason === "status-code") {
650
- switch (_response.error.statusCode) {
651
- case 422:
652
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
653
- unrecognizedObjectKeys: "passthrough",
654
- allowUnrecognizedUnionMembers: true,
655
- allowUnrecognizedEnumValues: true,
656
- breadcrumbsPrefix: ["response"],
657
- }));
658
- default:
659
- throw new errors.AirweaveSDKError({
660
- statusCode: _response.error.statusCode,
661
- body: _response.error.body,
662
- });
663
- }
664
- }
665
- switch (_response.error.reason) {
666
- case "non-json":
667
- throw new errors.AirweaveSDKError({
668
- statusCode: _response.error.statusCode,
669
- body: _response.error.rawBody,
670
- });
671
- case "timeout":
672
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling PUT /connections/disconnect/destination/{connection_id}.");
673
- case "unknown":
674
- throw new errors.AirweaveSDKError({
675
- message: _response.error.errorMessage,
676
- });
677
- }
678
- });
679
- }
680
- /**
681
- * Get the OAuth2 authorization URL for a source.
682
- *
683
- * Args:
684
- * -----
685
- * db: The database session
686
- * short_name: The short name of the source
687
- * user: The current user
688
- *
689
- * @param {AirweaveSDK.GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest} request
690
- * @param {Connections.RequestOptions} requestOptions - Request-specific configuration.
691
- *
692
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
693
- *
694
- * @example
695
- * await client.connections.getOauth2AuthUrl({
696
- * shortName: "short_name"
697
- * })
698
- */
699
- getOauth2AuthUrl(request, requestOptions) {
700
- return __awaiter(this, void 0, void 0, function* () {
701
- var _a;
702
- const { shortName } = request;
703
- const _queryParams = {};
704
- _queryParams["short_name"] = shortName;
705
- const _response = yield core.fetcher({
706
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "connections/oauth2/source/auth_url"),
707
- method: "GET",
708
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
709
- ? yield core.Supplier.get(this._options.apiKey)
710
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.28", "User-Agent": "@airweave/sdk/0.1.28", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
711
- contentType: "application/json",
712
- queryParameters: _queryParams,
713
- requestType: "json",
714
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
715
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
716
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
717
- });
718
- if (_response.ok) {
719
- return serializers.connections.getOauth2AuthUrl.Response.parseOrThrow(_response.body, {
720
- unrecognizedObjectKeys: "passthrough",
721
- allowUnrecognizedUnionMembers: true,
722
- allowUnrecognizedEnumValues: true,
723
- breadcrumbsPrefix: ["response"],
724
- });
725
- }
726
- if (_response.error.reason === "status-code") {
727
- switch (_response.error.statusCode) {
728
- case 422:
729
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
730
- unrecognizedObjectKeys: "passthrough",
731
- allowUnrecognizedUnionMembers: true,
732
- allowUnrecognizedEnumValues: true,
733
- breadcrumbsPrefix: ["response"],
734
- }));
735
- default:
736
- throw new errors.AirweaveSDKError({
737
- statusCode: _response.error.statusCode,
738
- body: _response.error.body,
739
- });
740
- }
741
- }
742
- switch (_response.error.reason) {
743
- case "non-json":
744
- throw new errors.AirweaveSDKError({
745
- statusCode: _response.error.statusCode,
746
- body: _response.error.rawBody,
747
- });
748
- case "timeout":
749
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /connections/oauth2/source/auth_url.");
750
- case "unknown":
751
- throw new errors.AirweaveSDKError({
752
- message: _response.error.errorMessage,
753
- });
754
- }
755
- });
756
- }
757
605
  /**
758
606
  * Send the OAuth2 authorization code for a source.
759
607
  *
@@ -792,7 +640,7 @@ class Connections {
792
640
  method: "POST",
793
641
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
794
642
  ? yield core.Supplier.get(this._options.apiKey)
795
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.28", "User-Agent": "@airweave/sdk/0.1.28", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
643
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
796
644
  contentType: "application/json",
797
645
  requestType: "json",
798
646
  body: serializers.BodySendOauth2CodeConnectionsOauth2SourceCodePost.jsonOrThrow(request, {
@@ -873,7 +721,7 @@ class Connections {
873
721
  method: "POST",
874
722
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
875
723
  ? yield core.Supplier.get(this._options.apiKey)
876
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.28", "User-Agent": "@airweave/sdk/0.1.28", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
724
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
877
725
  contentType: "application/json",
878
726
  requestType: "json",
879
727
  body: serializers.connections.sendOauth2WhiteLabelCode.Request.jsonOrThrow(request, {
@@ -951,7 +799,7 @@ class Connections {
951
799
  method: "GET",
952
800
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
953
801
  ? yield core.Supplier.get(this._options.apiKey)
954
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.28", "User-Agent": "@airweave/sdk/0.1.28", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
802
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
955
803
  contentType: "application/json",
956
804
  requestType: "json",
957
805
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1,3 +1,2 @@
1
1
  export { type BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost } from "./BodyConnectIntegrationConnectionsConnectIntegrationTypeShortNamePost";
2
- export { type GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest } from "./GetOauth2AuthUrlConnectionsOauth2SourceAuthUrlGetRequest";
3
2
  export { type BodySendOauth2CodeConnectionsOauth2SourceCodePost } from "./BodySendOauth2CodeConnectionsOauth2SourceCodePost";
@@ -86,7 +86,7 @@ class Destinations {
86
86
  method: "GET",
87
87
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
88
88
  ? yield core.Supplier.get(this._options.apiKey)
89
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.28", "User-Agent": "@airweave/sdk/0.1.28", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
89
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
90
90
  contentType: "application/json",
91
91
  requestType: "json",
92
92
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -161,7 +161,7 @@ class Destinations {
161
161
  method: "GET",
162
162
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
163
163
  ? yield core.Supplier.get(this._options.apiKey)
164
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.28", "User-Agent": "@airweave/sdk/0.1.28", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
164
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
165
165
  contentType: "application/json",
166
166
  requestType: "json",
167
167
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -88,7 +88,7 @@ class EmbeddingModels {
88
88
  method: "GET",
89
89
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
90
90
  ? yield core.Supplier.get(this._options.apiKey)
91
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.28", "User-Agent": "@airweave/sdk/0.1.28", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
91
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
92
92
  contentType: "application/json",
93
93
  requestType: "json",
94
94
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -161,7 +161,7 @@ class EmbeddingModels {
161
161
  method: "GET",
162
162
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
163
163
  ? yield core.Supplier.get(this._options.apiKey)
164
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.28", "User-Agent": "@airweave/sdk/0.1.28", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
164
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
165
165
  contentType: "application/json",
166
166
  requestType: "json",
167
167
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -77,7 +77,7 @@ class Entities {
77
77
  method: "GET",
78
78
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
79
79
  ? yield core.Supplier.get(this._options.apiKey)
80
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.28", "User-Agent": "@airweave/sdk/0.1.28", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
80
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
81
81
  contentType: "application/json",
82
82
  requestType: "json",
83
83
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -148,7 +148,7 @@ class Entities {
148
148
  method: "POST",
149
149
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
150
150
  ? yield core.Supplier.get(this._options.apiKey)
151
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.28", "User-Agent": "@airweave/sdk/0.1.28", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
151
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
152
152
  contentType: "application/json",
153
153
  requestType: "json",
154
154
  body: serializers.EntityDefinitionCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -221,7 +221,7 @@ class Entities {
221
221
  method: "PUT",
222
222
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
223
223
  ? yield core.Supplier.get(this._options.apiKey)
224
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.28", "User-Agent": "@airweave/sdk/0.1.28", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
224
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
225
225
  contentType: "application/json",
226
226
  requestType: "json",
227
227
  body: serializers.EntityDefinitionUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -286,7 +286,7 @@ class Entities {
286
286
  method: "GET",
287
287
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
288
288
  ? yield core.Supplier.get(this._options.apiKey)
289
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.28", "User-Agent": "@airweave/sdk/0.1.28", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
289
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
290
290
  contentType: "application/json",
291
291
  requestType: "json",
292
292
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -355,7 +355,7 @@ class Entities {
355
355
  method: "POST",
356
356
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
357
357
  ? yield core.Supplier.get(this._options.apiKey)
358
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.28", "User-Agent": "@airweave/sdk/0.1.28", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
358
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
359
359
  contentType: "application/json",
360
360
  requestType: "json",
361
361
  body: serializers.EntityRelationCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -426,7 +426,7 @@ class Entities {
426
426
  method: "PUT",
427
427
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
428
428
  ? yield core.Supplier.get(this._options.apiKey)
429
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.28", "User-Agent": "@airweave/sdk/0.1.28", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
429
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
430
430
  contentType: "application/json",
431
431
  requestType: "json",
432
432
  body: serializers.EntityRelationUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -500,7 +500,7 @@ class Entities {
500
500
  method: "POST",
501
501
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
502
502
  ? yield core.Supplier.get(this._options.apiKey)
503
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.28", "User-Agent": "@airweave/sdk/0.1.28", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
503
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
504
504
  contentType: "application/json",
505
505
  requestType: "json",
506
506
  body: serializers.entities.getEntityDefinitionsByIds.Request.jsonOrThrow(request, {
@@ -573,7 +573,7 @@ class Entities {
573
573
  method: "GET",
574
574
  headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
575
575
  ? yield core.Supplier.get(this._options.apiKey)
576
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.28", "User-Agent": "@airweave/sdk/0.1.28", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
576
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.2.0", "User-Agent": "@airweave/sdk/0.2.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
577
577
  contentType: "application/json",
578
578
  queryParameters: _queryParams,
579
579
  requestType: "json",
@@ -7,12 +7,12 @@ export * as sources from "./sources";
7
7
  export * as destinations from "./destinations";
8
8
  export * as embeddingModels from "./embeddingModels";
9
9
  export * as connections from "./connections";
10
+ export * as search from "./search";
10
11
  export * as whiteLabels from "./whiteLabels";
11
- export * as dag from "./dag";
12
12
  export * as transformers from "./transformers";
13
13
  export * from "./connections/client/requests";
14
14
  export * from "./sync/client/requests";
15
+ export * from "./search/client/requests";
15
16
  export * from "./whiteLabels/client/requests";
16
- export * from "./dag/client/requests";
17
17
  export * from "./entities/client/requests";
18
18
  export * from "./transformers/client/requests";
@@ -36,7 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.transformers = exports.dag = exports.whiteLabels = exports.connections = exports.embeddingModels = exports.destinations = exports.sources = exports.users = exports.entities = exports.sync = void 0;
39
+ exports.transformers = exports.whiteLabels = exports.search = exports.connections = exports.embeddingModels = exports.destinations = exports.sources = exports.users = exports.entities = exports.sync = void 0;
40
40
  exports.sync = __importStar(require("./sync"));
41
41
  __exportStar(require("./sync/types"), exports);
42
42
  exports.entities = __importStar(require("./entities"));
@@ -46,12 +46,12 @@ exports.sources = __importStar(require("./sources"));
46
46
  exports.destinations = __importStar(require("./destinations"));
47
47
  exports.embeddingModels = __importStar(require("./embeddingModels"));
48
48
  exports.connections = __importStar(require("./connections"));
49
+ exports.search = __importStar(require("./search"));
49
50
  exports.whiteLabels = __importStar(require("./whiteLabels"));
50
- exports.dag = __importStar(require("./dag"));
51
51
  exports.transformers = __importStar(require("./transformers"));
52
52
  __exportStar(require("./connections/client/requests"), exports);
53
53
  __exportStar(require("./sync/client/requests"), exports);
54
+ __exportStar(require("./search/client/requests"), exports);
54
55
  __exportStar(require("./whiteLabels/client/requests"), exports);
55
- __exportStar(require("./dag/client/requests"), exports);
56
56
  __exportStar(require("./entities/client/requests"), exports);
57
57
  __exportStar(require("./transformers/client/requests"), exports);
@@ -0,0 +1,55 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../environments";
5
+ import * as core from "../../../../core";
6
+ import * as AirweaveSDK from "../../../index";
7
+ export declare namespace Search {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.AirweaveSDKEnvironment | string>;
10
+ /** Override the x-api-key header */
11
+ apiKey?: core.Supplier<string | undefined>;
12
+ }
13
+ interface RequestOptions {
14
+ /** The maximum time to wait for a response in seconds. */
15
+ timeoutInSeconds?: number;
16
+ /** The number of times to retry the request. Defaults to 2. */
17
+ maxRetries?: number;
18
+ /** A hook to abort the request. */
19
+ abortSignal?: AbortSignal;
20
+ /** Override the x-api-key header */
21
+ apiKey?: string | undefined;
22
+ /** Additional headers to include in the request. */
23
+ headers?: Record<string, string>;
24
+ }
25
+ }
26
+ export declare class Search {
27
+ protected readonly _options: Search.Options;
28
+ constructor(_options?: Search.Options);
29
+ /**
30
+ * Search for documents within a specific sync.
31
+ *
32
+ * Args:
33
+ * -----
34
+ * db: The database session
35
+ * sync_id: The ID of the sync to search within
36
+ * query: The search query text
37
+ * user: The current user
38
+ *
39
+ * Returns:
40
+ * --------
41
+ * list[dict]: A list of search results
42
+ *
43
+ * @param {AirweaveSDK.SearchSearchGetRequest} request
44
+ * @param {Search.RequestOptions} requestOptions - Request-specific configuration.
45
+ *
46
+ * @throws {@link AirweaveSDK.UnprocessableEntityError}
47
+ *
48
+ * @example
49
+ * await client.search.search({
50
+ * syncId: "sync_id",
51
+ * query: "query"
52
+ * })
53
+ */
54
+ search(request: AirweaveSDK.SearchSearchGetRequest, requestOptions?: Search.RequestOptions): Promise<Record<string, unknown>[]>;
55
+ }