@airweave/sdk 0.1.35 → 0.1.37

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 (56) hide show
  1. package/Client.d.ts +0 -3
  2. package/Client.js +4 -9
  3. package/api/resources/collections/client/Client.d.ts +25 -0
  4. package/api/resources/collections/client/Client.js +90 -5
  5. package/api/resources/collections/client/requests/SearchCollectionCollectionsReadableIdSearchGetRequest.d.ts +20 -0
  6. package/{dist/api/resources/connections/client/index.js → api/resources/collections/client/requests/SearchCollectionCollectionsReadableIdSearchGetRequest.js} +3 -0
  7. package/api/resources/collections/client/requests/index.d.ts +1 -0
  8. package/api/resources/index.d.ts +0 -1
  9. package/api/resources/index.js +1 -2
  10. package/api/resources/sourceConnections/client/Client.js +7 -7
  11. package/api/resources/sources/client/Client.js +2 -2
  12. package/api/resources/whiteLabels/client/Client.js +6 -6
  13. package/dist/Client.d.ts +0 -3
  14. package/dist/Client.js +4 -9
  15. package/dist/api/resources/collections/client/Client.d.ts +25 -0
  16. package/dist/api/resources/collections/client/Client.js +90 -5
  17. package/dist/api/resources/collections/client/requests/SearchCollectionCollectionsReadableIdSearchGetRequest.d.ts +20 -0
  18. package/{api/resources/connections/client/index.js → dist/api/resources/collections/client/requests/SearchCollectionCollectionsReadableIdSearchGetRequest.js} +3 -0
  19. package/dist/api/resources/collections/client/requests/index.d.ts +1 -0
  20. package/dist/api/resources/index.d.ts +0 -1
  21. package/dist/api/resources/index.js +1 -2
  22. package/dist/api/resources/sourceConnections/client/Client.js +7 -7
  23. package/dist/api/resources/sources/client/Client.js +2 -2
  24. package/dist/api/resources/whiteLabels/client/Client.js +6 -6
  25. package/dist/serialization/resources/index.d.ts +0 -1
  26. package/dist/serialization/resources/index.js +1 -2
  27. package/dist/version.d.ts +1 -1
  28. package/dist/version.js +1 -1
  29. package/package.json +1 -1
  30. package/reference.md +29 -85
  31. package/serialization/resources/index.d.ts +0 -1
  32. package/serialization/resources/index.js +1 -2
  33. package/version.d.ts +1 -1
  34. package/version.js +1 -1
  35. package/api/resources/connections/client/Client.d.ts +0 -73
  36. package/api/resources/connections/client/Client.js +0 -216
  37. package/api/resources/connections/client/index.d.ts +0 -1
  38. package/api/resources/connections/index.d.ts +0 -1
  39. package/api/resources/connections/index.js +0 -17
  40. package/dist/api/resources/connections/client/Client.d.ts +0 -73
  41. package/dist/api/resources/connections/client/Client.js +0 -216
  42. package/dist/api/resources/connections/client/index.d.ts +0 -1
  43. package/dist/api/resources/connections/index.d.ts +0 -1
  44. package/dist/api/resources/connections/index.js +0 -17
  45. package/dist/serialization/resources/connections/client/index.d.ts +0 -1
  46. package/dist/serialization/resources/connections/client/index.js +0 -37
  47. package/dist/serialization/resources/connections/client/listAllConnectedIntegrations.d.ts +0 -11
  48. package/dist/serialization/resources/connections/client/listAllConnectedIntegrations.js +0 -42
  49. package/dist/serialization/resources/connections/index.d.ts +0 -1
  50. package/dist/serialization/resources/connections/index.js +0 -17
  51. package/serialization/resources/connections/client/index.d.ts +0 -1
  52. package/serialization/resources/connections/client/index.js +0 -37
  53. package/serialization/resources/connections/client/listAllConnectedIntegrations.d.ts +0 -11
  54. package/serialization/resources/connections/client/listAllConnectedIntegrations.js +0 -42
  55. package/serialization/resources/connections/index.d.ts +0 -1
  56. package/serialization/resources/connections/index.js +0 -17
@@ -86,7 +86,7 @@ class Collections {
86
86
  method: "GET",
87
87
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "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": "v0.1.35", "User-Agent": "@airweave/sdk/v0.1.35", "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": "v0.1.37", "User-Agent": "@airweave/sdk/v0.1.37", "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
  queryParameters: _queryParams,
92
92
  requestType: "json",
@@ -154,7 +154,7 @@ class Collections {
154
154
  method: "POST",
155
155
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
156
156
  ? yield core.Supplier.get(this._options.apiKey)
157
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.35", "User-Agent": "@airweave/sdk/v0.1.35", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
157
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.37", "User-Agent": "@airweave/sdk/v0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
158
158
  contentType: "application/json",
159
159
  requestType: "json",
160
160
  body: serializers.CollectionCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -220,7 +220,7 @@ class Collections {
220
220
  method: "GET",
221
221
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
222
222
  ? yield core.Supplier.get(this._options.apiKey)
223
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.35", "User-Agent": "@airweave/sdk/v0.1.35", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
223
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.37", "User-Agent": "@airweave/sdk/v0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
224
224
  contentType: "application/json",
225
225
  requestType: "json",
226
226
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -300,7 +300,7 @@ class Collections {
300
300
  method: "DELETE",
301
301
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
302
302
  ? yield core.Supplier.get(this._options.apiKey)
303
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.35", "User-Agent": "@airweave/sdk/v0.1.35", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
303
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.37", "User-Agent": "@airweave/sdk/v0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
304
304
  contentType: "application/json",
305
305
  queryParameters: _queryParams,
306
306
  requestType: "json",
@@ -347,6 +347,91 @@ class Collections {
347
347
  }
348
348
  });
349
349
  }
350
+ /**
351
+ * Search within a collection identified by readable ID.
352
+ *
353
+ * Args:
354
+ * readable_id: The readable ID of the collection to search
355
+ * query: The search query
356
+ * response_type: Type of response (raw results or AI completion)
357
+ * db: The database session
358
+ * current_user: The current user
359
+ *
360
+ * Returns:
361
+ * dict: Search results or AI completion response
362
+ *
363
+ * @param {string} readableId
364
+ * @param {AirweaveSDK.SearchCollectionCollectionsReadableIdSearchGetRequest} request
365
+ * @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
366
+ *
367
+ * @throws {@link AirweaveSDK.UnprocessableEntityError}
368
+ *
369
+ * @example
370
+ * await client.collections.searchCollection("readable_id", {
371
+ * query: "query"
372
+ * })
373
+ */
374
+ searchCollection(readableId, request, requestOptions) {
375
+ return __awaiter(this, void 0, void 0, function* () {
376
+ var _a;
377
+ const { query, responseType } = request;
378
+ const _queryParams = {};
379
+ _queryParams["query"] = query;
380
+ if (responseType != null) {
381
+ _queryParams["response_type"] = responseType;
382
+ }
383
+ const _response = yield core.fetcher({
384
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}/search`),
385
+ method: "GET",
386
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
387
+ ? yield core.Supplier.get(this._options.apiKey)
388
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.37", "User-Agent": "@airweave/sdk/v0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
389
+ contentType: "application/json",
390
+ queryParameters: _queryParams,
391
+ requestType: "json",
392
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
393
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
394
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
395
+ });
396
+ if (_response.ok) {
397
+ return serializers.SearchResponse.parseOrThrow(_response.body, {
398
+ unrecognizedObjectKeys: "passthrough",
399
+ allowUnrecognizedUnionMembers: true,
400
+ allowUnrecognizedEnumValues: true,
401
+ breadcrumbsPrefix: ["response"],
402
+ });
403
+ }
404
+ if (_response.error.reason === "status-code") {
405
+ switch (_response.error.statusCode) {
406
+ case 422:
407
+ throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
408
+ unrecognizedObjectKeys: "passthrough",
409
+ allowUnrecognizedUnionMembers: true,
410
+ allowUnrecognizedEnumValues: true,
411
+ breadcrumbsPrefix: ["response"],
412
+ }));
413
+ default:
414
+ throw new errors.AirweaveSDKError({
415
+ statusCode: _response.error.statusCode,
416
+ body: _response.error.body,
417
+ });
418
+ }
419
+ }
420
+ switch (_response.error.reason) {
421
+ case "non-json":
422
+ throw new errors.AirweaveSDKError({
423
+ statusCode: _response.error.statusCode,
424
+ body: _response.error.rawBody,
425
+ });
426
+ case "timeout":
427
+ throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling GET /collections/{readable_id}/search.");
428
+ case "unknown":
429
+ throw new errors.AirweaveSDKError({
430
+ message: _response.error.errorMessage,
431
+ });
432
+ }
433
+ });
434
+ }
350
435
  /**
351
436
  * Start sync jobs for all source connections in the collection.
352
437
  *
@@ -375,7 +460,7 @@ class Collections {
375
460
  method: "POST",
376
461
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
377
462
  ? yield core.Supplier.get(this._options.apiKey)
378
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.35", "User-Agent": "@airweave/sdk/v0.1.35", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
463
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.37", "User-Agent": "@airweave/sdk/v0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
379
464
  contentType: "application/json",
380
465
  requestType: "json",
381
466
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -0,0 +1,20 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as AirweaveSDK from "../../../../index";
5
+ /**
6
+ * @example
7
+ * {
8
+ * query: "query"
9
+ * }
10
+ */
11
+ export interface SearchCollectionCollectionsReadableIdSearchGetRequest {
12
+ /**
13
+ * Search query
14
+ */
15
+ query: string;
16
+ /**
17
+ * Type of response: raw search results or AI completion
18
+ */
19
+ responseType?: AirweaveSDK.ResponseType;
20
+ }
@@ -1,2 +1,5 @@
1
1
  "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,4 @@
1
1
  export { type ListCollectionsCollectionsGetRequest } from "./ListCollectionsCollectionsGetRequest";
2
2
  export { type CollectionCreate } from "./CollectionCreate";
3
3
  export { type DeleteCollectionCollectionsReadableIdDeleteRequest } from "./DeleteCollectionCollectionsReadableIdDeleteRequest";
4
+ export { type SearchCollectionCollectionsReadableIdSearchGetRequest } from "./SearchCollectionCollectionsReadableIdSearchGetRequest";
@@ -1,6 +1,5 @@
1
1
  export * as sources from "./sources";
2
2
  export * as collections from "./collections";
3
- export * as connections from "./connections";
4
3
  export * as sourceConnections from "./sourceConnections";
5
4
  export * as whiteLabels from "./whiteLabels";
6
5
  export * from "./collections/client/requests";
@@ -36,10 +36,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.whiteLabels = exports.sourceConnections = exports.connections = exports.collections = exports.sources = void 0;
39
+ exports.whiteLabels = exports.sourceConnections = exports.collections = exports.sources = void 0;
40
40
  exports.sources = __importStar(require("./sources"));
41
41
  exports.collections = __importStar(require("./collections"));
42
- exports.connections = __importStar(require("./connections"));
43
42
  exports.sourceConnections = __importStar(require("./sourceConnections"));
44
43
  exports.whiteLabels = __importStar(require("./whiteLabels"));
45
44
  __exportStar(require("./collections/client/requests"), exports);
@@ -99,7 +99,7 @@ class SourceConnections {
99
99
  method: "GET",
100
100
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
101
101
  ? yield core.Supplier.get(this._options.apiKey)
102
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.35", "User-Agent": "@airweave/sdk/v0.1.35", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
102
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.37", "User-Agent": "@airweave/sdk/v0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
103
103
  contentType: "application/json",
104
104
  queryParameters: _queryParams,
105
105
  requestType: "json",
@@ -184,7 +184,7 @@ class SourceConnections {
184
184
  method: "POST",
185
185
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
186
186
  ? yield core.Supplier.get(this._options.apiKey)
187
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.35", "User-Agent": "@airweave/sdk/v0.1.35", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
187
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.37", "User-Agent": "@airweave/sdk/v0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
188
188
  contentType: "application/json",
189
189
  requestType: "json",
190
190
  body: serializers.SourceConnectionCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -265,7 +265,7 @@ class SourceConnections {
265
265
  method: "GET",
266
266
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
267
267
  ? yield core.Supplier.get(this._options.apiKey)
268
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.35", "User-Agent": "@airweave/sdk/v0.1.35", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
268
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.37", "User-Agent": "@airweave/sdk/v0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
269
269
  contentType: "application/json",
270
270
  queryParameters: _queryParams,
271
271
  requestType: "json",
@@ -341,7 +341,7 @@ class SourceConnections {
341
341
  method: "PUT",
342
342
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
343
343
  ? yield core.Supplier.get(this._options.apiKey)
344
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.35", "User-Agent": "@airweave/sdk/v0.1.35", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
344
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.37", "User-Agent": "@airweave/sdk/v0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
345
345
  contentType: "application/json",
346
346
  requestType: "json",
347
347
  body: serializers.SourceConnectionUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -422,7 +422,7 @@ class SourceConnections {
422
422
  method: "DELETE",
423
423
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
424
424
  ? yield core.Supplier.get(this._options.apiKey)
425
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.35", "User-Agent": "@airweave/sdk/v0.1.35", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
425
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.37", "User-Agent": "@airweave/sdk/v0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
426
426
  contentType: "application/json",
427
427
  queryParameters: _queryParams,
428
428
  requestType: "json",
@@ -497,7 +497,7 @@ class SourceConnections {
497
497
  method: "POST",
498
498
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
499
499
  ? yield core.Supplier.get(this._options.apiKey)
500
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.35", "User-Agent": "@airweave/sdk/v0.1.35", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
500
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.37", "User-Agent": "@airweave/sdk/v0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
501
501
  contentType: "application/json",
502
502
  requestType: "json",
503
503
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -570,7 +570,7 @@ class SourceConnections {
570
570
  method: "GET",
571
571
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
572
572
  ? yield core.Supplier.get(this._options.apiKey)
573
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.35", "User-Agent": "@airweave/sdk/v0.1.35", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
573
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.37", "User-Agent": "@airweave/sdk/v0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
574
574
  contentType: "application/json",
575
575
  requestType: "json",
576
576
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -88,7 +88,7 @@ class Sources {
88
88
  method: "GET",
89
89
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "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": "v0.1.35", "User-Agent": "@airweave/sdk/v0.1.35", "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": "v0.1.37", "User-Agent": "@airweave/sdk/v0.1.37", "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 Sources {
161
161
  method: "GET",
162
162
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "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": "v0.1.35", "User-Agent": "@airweave/sdk/v0.1.35", "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": "v0.1.37", "User-Agent": "@airweave/sdk/v0.1.37", "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,
@@ -86,7 +86,7 @@ class WhiteLabels {
86
86
  method: "GET",
87
87
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "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": "v0.1.35", "User-Agent": "@airweave/sdk/v0.1.35", "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": "v0.1.37", "User-Agent": "@airweave/sdk/v0.1.37", "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,
@@ -167,7 +167,7 @@ class WhiteLabels {
167
167
  method: "POST",
168
168
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
169
169
  ? yield core.Supplier.get(this._options.apiKey)
170
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.35", "User-Agent": "@airweave/sdk/v0.1.35", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
170
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.37", "User-Agent": "@airweave/sdk/v0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
171
171
  contentType: "application/json",
172
172
  requestType: "json",
173
173
  body: serializers.WhiteLabelCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -243,7 +243,7 @@ class WhiteLabels {
243
243
  method: "GET",
244
244
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
245
245
  ? yield core.Supplier.get(this._options.apiKey)
246
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.35", "User-Agent": "@airweave/sdk/v0.1.35", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
246
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.37", "User-Agent": "@airweave/sdk/v0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
247
247
  contentType: "application/json",
248
248
  requestType: "json",
249
249
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -320,7 +320,7 @@ class WhiteLabels {
320
320
  method: "PUT",
321
321
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
322
322
  ? yield core.Supplier.get(this._options.apiKey)
323
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.35", "User-Agent": "@airweave/sdk/v0.1.35", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
323
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.37", "User-Agent": "@airweave/sdk/v0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
324
324
  contentType: "application/json",
325
325
  requestType: "json",
326
326
  body: serializers.WhiteLabelUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -396,7 +396,7 @@ class WhiteLabels {
396
396
  method: "DELETE",
397
397
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
398
398
  ? yield core.Supplier.get(this._options.apiKey)
399
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.35", "User-Agent": "@airweave/sdk/v0.1.35", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
399
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.37", "User-Agent": "@airweave/sdk/v0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
400
400
  contentType: "application/json",
401
401
  requestType: "json",
402
402
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -471,7 +471,7 @@ class WhiteLabels {
471
471
  method: "GET",
472
472
  headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
473
473
  ? yield core.Supplier.get(this._options.apiKey)
474
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.35", "User-Agent": "@airweave/sdk/v0.1.35", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
474
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "v0.1.37", "User-Agent": "@airweave/sdk/v0.1.37", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
475
475
  contentType: "application/json",
476
476
  requestType: "json",
477
477
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1,6 +1,5 @@
1
1
  export * as sources from "./sources";
2
2
  export * as collections from "./collections";
3
- export * as connections from "./connections";
4
3
  export * as sourceConnections from "./sourceConnections";
5
4
  export * as whiteLabels from "./whiteLabels";
6
5
  export * from "./collections/client/requests";
@@ -36,10 +36,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.whiteLabels = exports.sourceConnections = exports.connections = exports.collections = exports.sources = void 0;
39
+ exports.whiteLabels = exports.sourceConnections = exports.collections = exports.sources = void 0;
40
40
  exports.sources = __importStar(require("./sources"));
41
41
  exports.collections = __importStar(require("./collections"));
42
- exports.connections = __importStar(require("./connections"));
43
42
  exports.sourceConnections = __importStar(require("./sourceConnections"));
44
43
  exports.whiteLabels = __importStar(require("./whiteLabels"));
45
44
  __exportStar(require("./collections/client/requests"), exports);
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "v0.1.35";
1
+ export declare const SDK_VERSION = "v0.1.37";
package/dist/version.js CHANGED
@@ -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.1.35";
4
+ exports.SDK_VERSION = "v0.1.37";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@airweave/sdk",
3
- "version": "v0.1.35",
3
+ "version": "v0.1.37",
4
4
  "private": false,
5
5
  "repository": "https://github.com/airweave-ai/typescript-sdk",
6
6
  "main": "./index.js",
package/reference.md CHANGED
@@ -412,7 +412,7 @@ await client.collections.deleteCollection("readable_id");
412
412
  </dl>
413
413
  </details>
414
414
 
415
- <details><summary><code>client.collections.<a href="/src/api/resources/collections/client/Client.ts">refreshAllSourceConnections</a>(readableId) -> AirweaveSDK.SourceConnectionJob[]</code></summary>
415
+ <details><summary><code>client.collections.<a href="/src/api/resources/collections/client/Client.ts">searchCollection</a>(readableId, { ...params }) -> AirweaveSDK.SearchResponse</code></summary>
416
416
  <dl>
417
417
  <dd>
418
418
 
@@ -424,16 +424,17 @@ await client.collections.deleteCollection("readable_id");
424
424
  <dl>
425
425
  <dd>
426
426
 
427
- Start sync jobs for all source connections in the collection.
427
+ Search within a collection identified by readable ID.
428
428
 
429
429
  Args:
430
- readable_id: The readable ID of the collection
430
+ readable_id: The readable ID of the collection to search
431
+ query: The search query
432
+ response_type: Type of response (raw results or AI completion)
431
433
  db: The database session
432
434
  current_user: The current user
433
- background_tasks: Background tasks for async operations
434
435
 
435
436
  Returns:
436
- A list of created sync jobs
437
+ dict: Search results or AI completion response
437
438
 
438
439
  </dd>
439
440
  </dl>
@@ -449,7 +450,9 @@ A list of created sync jobs
449
450
  <dd>
450
451
 
451
452
  ```typescript
452
- await client.collections.refreshAllSourceConnections("readable_id");
453
+ await client.collections.searchCollection("readable_id", {
454
+ query: "query",
455
+ });
453
456
  ```
454
457
 
455
458
  </dd>
@@ -473,6 +476,14 @@ await client.collections.refreshAllSourceConnections("readable_id");
473
476
  <dl>
474
477
  <dd>
475
478
 
479
+ **request:** `AirweaveSDK.SearchCollectionCollectionsReadableIdSearchGetRequest`
480
+
481
+ </dd>
482
+ </dl>
483
+
484
+ <dl>
485
+ <dd>
486
+
476
487
  **requestOptions:** `Collections.RequestOptions`
477
488
 
478
489
  </dd>
@@ -484,9 +495,7 @@ await client.collections.refreshAllSourceConnections("readable_id");
484
495
  </dl>
485
496
  </details>
486
497
 
487
- ## Connections
488
-
489
- <details><summary><code>client.connections.<a href="/src/api/resources/connections/client/Client.ts">getConnection</a>(connectionId) -> AirweaveSDK.Connection</code></summary>
498
+ <details><summary><code>client.collections.<a href="/src/api/resources/collections/client/Client.ts">refreshAllSourceConnections</a>(readableId) -> AirweaveSDK.SourceConnectionJob[]</code></summary>
490
499
  <dl>
491
500
  <dd>
492
501
 
@@ -498,17 +507,16 @@ await client.collections.refreshAllSourceConnections("readable_id");
498
507
  <dl>
499
508
  <dd>
500
509
 
501
- Get a specific connection.
502
-
503
- ## Args:
504
-
505
- connection_id: The ID of the connection to get.
506
- db: The database session.
507
- user: The current user.
510
+ Start sync jobs for all source connections in the collection.
508
511
 
509
- ## Returns:
512
+ Args:
513
+ readable_id: The readable ID of the collection
514
+ db: The database session
515
+ current_user: The current user
516
+ background_tasks: Background tasks for async operations
510
517
 
511
- schemas.Connection: The connection.
518
+ Returns:
519
+ A list of created sync jobs
512
520
 
513
521
  </dd>
514
522
  </dl>
@@ -524,7 +532,7 @@ Get a specific connection.
524
532
  <dd>
525
533
 
526
534
  ```typescript
527
- await client.connections.getConnection("connection_id");
535
+ await client.collections.refreshAllSourceConnections("readable_id");
528
536
  ```
529
537
 
530
538
  </dd>
@@ -540,79 +548,15 @@ await client.connections.getConnection("connection_id");
540
548
  <dl>
541
549
  <dd>
542
550
 
543
- **connectionId:** `string`
544
-
545
- </dd>
546
- </dl>
547
-
548
- <dl>
549
- <dd>
550
-
551
- **requestOptions:** `Connections.RequestOptions`
552
-
553
- </dd>
554
- </dl>
555
- </dd>
556
- </dl>
557
-
558
- </dd>
559
- </dl>
560
- </details>
561
-
562
- <details><summary><code>client.connections.<a href="/src/api/resources/connections/client/Client.ts">listAllConnectedIntegrations</a>() -> AirweaveSDK.Connection[]</code></summary>
563
- <dl>
564
- <dd>
565
-
566
- #### 📝 Description
567
-
568
- <dl>
569
- <dd>
570
-
571
- <dl>
572
- <dd>
573
-
574
- Get all active connections for the current user across all integration types.
575
-
576
- ## Args:
577
-
578
- db: The database session.
579
- user: The current user.
580
-
581
- ## Returns:
582
-
583
- list[schemas.Connection]: The list of connections.
584
-
585
- </dd>
586
- </dl>
587
- </dd>
588
- </dl>
589
-
590
- #### 🔌 Usage
591
-
592
- <dl>
593
- <dd>
594
-
595
- <dl>
596
- <dd>
597
-
598
- ```typescript
599
- await client.connections.listAllConnectedIntegrations();
600
- ```
551
+ **readableId:** `string`
601
552
 
602
- </dd>
603
- </dl>
604
553
  </dd>
605
554
  </dl>
606
555
 
607
- #### ⚙️ Parameters
608
-
609
556
  <dl>
610
557
  <dd>
611
558
 
612
- <dl>
613
- <dd>
614
-
615
- **requestOptions:** `Connections.RequestOptions`
559
+ **requestOptions:** `Collections.RequestOptions`
616
560
 
617
561
  </dd>
618
562
  </dl>
@@ -1,6 +1,5 @@
1
1
  export * as sources from "./sources";
2
2
  export * as collections from "./collections";
3
- export * as connections from "./connections";
4
3
  export * as sourceConnections from "./sourceConnections";
5
4
  export * as whiteLabels from "./whiteLabels";
6
5
  export * from "./collections/client/requests";
@@ -36,10 +36,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.whiteLabels = exports.sourceConnections = exports.connections = exports.collections = exports.sources = void 0;
39
+ exports.whiteLabels = exports.sourceConnections = exports.collections = exports.sources = void 0;
40
40
  exports.sources = __importStar(require("./sources"));
41
41
  exports.collections = __importStar(require("./collections"));
42
- exports.connections = __importStar(require("./connections"));
43
42
  exports.sourceConnections = __importStar(require("./sourceConnections"));
44
43
  exports.whiteLabels = __importStar(require("./whiteLabels"));
45
44
  __exportStar(require("./collections/client/requests"), exports);
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "v0.1.35";
1
+ export declare const SDK_VERSION = "v0.1.37";
package/version.js CHANGED
@@ -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.1.35";
4
+ exports.SDK_VERSION = "v0.1.37";