@airweave/sdk 0.1.17 → 0.1.18

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 (96) hide show
  1. package/Client.d.ts +0 -3
  2. package/Client.js +0 -5
  3. package/api/resources/connections/client/Client.js +12 -12
  4. package/api/resources/destinations/client/Client.js +2 -2
  5. package/api/resources/embeddingModels/client/Client.js +2 -2
  6. package/api/resources/index.d.ts +0 -2
  7. package/api/resources/index.js +1 -3
  8. package/api/resources/sources/client/Client.js +2 -2
  9. package/api/resources/sync/client/Client.js +8 -8
  10. package/api/resources/users/client/Client.js +1 -1
  11. package/api/resources/whiteLabels/client/Client.js +8 -8
  12. package/api/types/index.d.ts +0 -2
  13. package/api/types/index.js +0 -2
  14. package/dist/Client.d.ts +0 -3
  15. package/dist/Client.js +0 -5
  16. package/dist/api/resources/connections/client/Client.js +12 -12
  17. package/dist/api/resources/destinations/client/Client.js +2 -2
  18. package/dist/api/resources/embeddingModels/client/Client.js +2 -2
  19. package/dist/api/resources/index.d.ts +0 -2
  20. package/dist/api/resources/index.js +1 -3
  21. package/dist/api/resources/sources/client/Client.js +2 -2
  22. package/dist/api/resources/sync/client/Client.js +8 -8
  23. package/dist/api/resources/users/client/Client.js +1 -1
  24. package/dist/api/resources/whiteLabels/client/Client.js +8 -8
  25. package/dist/api/types/index.d.ts +0 -2
  26. package/dist/api/types/index.js +0 -2
  27. package/dist/serialization/resources/index.d.ts +0 -1
  28. package/dist/serialization/resources/index.js +1 -2
  29. package/dist/serialization/types/index.d.ts +0 -2
  30. package/dist/serialization/types/index.js +0 -2
  31. package/dist/version.d.ts +1 -1
  32. package/dist/version.js +1 -1
  33. package/package.json +1 -1
  34. package/reference.md +0 -146
  35. package/serialization/resources/index.d.ts +0 -1
  36. package/serialization/resources/index.js +1 -2
  37. package/serialization/types/index.d.ts +0 -2
  38. package/serialization/types/index.js +0 -2
  39. package/version.d.ts +1 -1
  40. package/version.js +1 -1
  41. package/api/resources/search/client/Client.d.ts +0 -71
  42. package/api/resources/search/client/Client.js +0 -231
  43. package/api/resources/search/client/index.d.ts +0 -1
  44. package/api/resources/search/client/index.js +0 -17
  45. package/api/resources/search/client/requests/SearchSearchObjectsPostRequest.d.ts +0 -16
  46. package/api/resources/search/client/requests/SearchSearchObjectsPostRequest.js +0 -5
  47. package/api/resources/search/client/requests/SearchSummarySearchSummaryPostRequest.d.ts +0 -16
  48. package/api/resources/search/client/requests/SearchSummarySearchSummaryPostRequest.js +0 -5
  49. package/api/resources/search/client/requests/index.d.ts +0 -2
  50. package/api/resources/search/client/requests/index.js +0 -2
  51. package/api/resources/search/index.d.ts +0 -1
  52. package/api/resources/search/index.js +0 -17
  53. package/api/types/MetadataSearchFilter.d.ts +0 -11
  54. package/api/types/MetadataSearchFilter.js +0 -5
  55. package/api/types/SearchResult.d.ts +0 -11
  56. package/api/types/SearchResult.js +0 -5
  57. package/dist/api/resources/search/client/Client.d.ts +0 -71
  58. package/dist/api/resources/search/client/Client.js +0 -231
  59. package/dist/api/resources/search/client/index.d.ts +0 -1
  60. package/dist/api/resources/search/client/index.js +0 -17
  61. package/dist/api/resources/search/client/requests/SearchSearchObjectsPostRequest.d.ts +0 -16
  62. package/dist/api/resources/search/client/requests/SearchSearchObjectsPostRequest.js +0 -5
  63. package/dist/api/resources/search/client/requests/SearchSummarySearchSummaryPostRequest.d.ts +0 -16
  64. package/dist/api/resources/search/client/requests/SearchSummarySearchSummaryPostRequest.js +0 -5
  65. package/dist/api/resources/search/client/requests/index.d.ts +0 -2
  66. package/dist/api/resources/search/client/requests/index.js +0 -2
  67. package/dist/api/resources/search/index.d.ts +0 -1
  68. package/dist/api/resources/search/index.js +0 -17
  69. package/dist/api/types/MetadataSearchFilter.d.ts +0 -11
  70. package/dist/api/types/MetadataSearchFilter.js +0 -5
  71. package/dist/api/types/SearchResult.d.ts +0 -11
  72. package/dist/api/types/SearchResult.js +0 -5
  73. package/dist/serialization/resources/search/client/index.d.ts +0 -2
  74. package/dist/serialization/resources/search/client/index.js +0 -38
  75. package/dist/serialization/resources/search/client/search.d.ts +0 -16
  76. package/dist/serialization/resources/search/client/search.js +0 -44
  77. package/dist/serialization/resources/search/client/searchSummary.d.ts +0 -15
  78. package/dist/serialization/resources/search/client/searchSummary.js +0 -43
  79. package/dist/serialization/resources/search/index.d.ts +0 -1
  80. package/dist/serialization/resources/search/index.js +0 -17
  81. package/dist/serialization/types/MetadataSearchFilter.d.ts +0 -14
  82. package/dist/serialization/types/MetadataSearchFilter.js +0 -45
  83. package/dist/serialization/types/SearchResult.d.ts +0 -14
  84. package/dist/serialization/types/SearchResult.js +0 -45
  85. package/serialization/resources/search/client/index.d.ts +0 -2
  86. package/serialization/resources/search/client/index.js +0 -38
  87. package/serialization/resources/search/client/search.d.ts +0 -16
  88. package/serialization/resources/search/client/search.js +0 -44
  89. package/serialization/resources/search/client/searchSummary.d.ts +0 -15
  90. package/serialization/resources/search/client/searchSummary.js +0 -43
  91. package/serialization/resources/search/index.d.ts +0 -1
  92. package/serialization/resources/search/index.js +0 -17
  93. package/serialization/types/MetadataSearchFilter.d.ts +0 -14
  94. package/serialization/types/MetadataSearchFilter.js +0 -45
  95. package/serialization/types/SearchResult.d.ts +0 -14
  96. package/serialization/types/SearchResult.js +0 -45
package/reference.md CHANGED
@@ -2343,149 +2343,3 @@ await client.whiteLabels.listWhiteLabelSyncs("white_label_id");
2343
2343
  </dd>
2344
2344
  </dl>
2345
2345
  </details>
2346
-
2347
- ## Search
2348
-
2349
- <details><summary><code>client.search.<a href="/src/api/resources/search/client/Client.ts">searchSummary</a>({ ...params }) -> string</code></summary>
2350
- <dl>
2351
- <dd>
2352
-
2353
- #### 📝 Description
2354
-
2355
- <dl>
2356
- <dd>
2357
-
2358
- <dl>
2359
- <dd>
2360
-
2361
- Search for summarized information.
2362
-
2363
- </dd>
2364
- </dl>
2365
- </dd>
2366
- </dl>
2367
-
2368
- #### 🔌 Usage
2369
-
2370
- <dl>
2371
- <dd>
2372
-
2373
- <dl>
2374
- <dd>
2375
-
2376
- ```typescript
2377
- await client.search.searchSummary({
2378
- query: "query",
2379
- body: undefined,
2380
- });
2381
- ```
2382
-
2383
- </dd>
2384
- </dl>
2385
- </dd>
2386
- </dl>
2387
-
2388
- #### ⚙️ Parameters
2389
-
2390
- <dl>
2391
- <dd>
2392
-
2393
- <dl>
2394
- <dd>
2395
-
2396
- **request:** `AirweaveSDK.SearchSummarySearchSummaryPostRequest`
2397
-
2398
- </dd>
2399
- </dl>
2400
-
2401
- <dl>
2402
- <dd>
2403
-
2404
- **requestOptions:** `Search.RequestOptions`
2405
-
2406
- </dd>
2407
- </dl>
2408
- </dd>
2409
- </dl>
2410
-
2411
- </dd>
2412
- </dl>
2413
- </details>
2414
-
2415
- <details><summary><code>client.search.<a href="/src/api/resources/search/client/Client.ts">search</a>({ ...params }) -> AirweaveSDK.SearchResult[]</code></summary>
2416
- <dl>
2417
- <dd>
2418
-
2419
- #### 📝 Description
2420
-
2421
- <dl>
2422
- <dd>
2423
-
2424
- <dl>
2425
- <dd>
2426
-
2427
- Search for a specific item.
2428
-
2429
- ## Args:
2430
-
2431
- db (AsyncSession): The database session.
2432
- query (str): The query to search for.
2433
- sync_id (Optional[UUID]): The sync ID to search for.
2434
- metadata_filter (Optional[list[MetadataSearchFilter]]): The filter to search for.
2435
- user (schemas.User): The user to search for.
2436
-
2437
- ## Returns:
2438
-
2439
- list[SearchResult]: The search results.
2440
-
2441
- </dd>
2442
- </dl>
2443
- </dd>
2444
- </dl>
2445
-
2446
- #### 🔌 Usage
2447
-
2448
- <dl>
2449
- <dd>
2450
-
2451
- <dl>
2452
- <dd>
2453
-
2454
- ```typescript
2455
- await client.search.search({
2456
- query: "query",
2457
- body: undefined,
2458
- });
2459
- ```
2460
-
2461
- </dd>
2462
- </dl>
2463
- </dd>
2464
- </dl>
2465
-
2466
- #### ⚙️ Parameters
2467
-
2468
- <dl>
2469
- <dd>
2470
-
2471
- <dl>
2472
- <dd>
2473
-
2474
- **request:** `AirweaveSDK.SearchSearchObjectsPostRequest`
2475
-
2476
- </dd>
2477
- </dl>
2478
-
2479
- <dl>
2480
- <dd>
2481
-
2482
- **requestOptions:** `Search.RequestOptions`
2483
-
2484
- </dd>
2485
- </dl>
2486
- </dd>
2487
- </dl>
2488
-
2489
- </dd>
2490
- </dl>
2491
- </details>
@@ -5,7 +5,6 @@ export * as destinations from "./destinations";
5
5
  export * as embeddingModels from "./embeddingModels";
6
6
  export * as connections from "./connections";
7
7
  export * as whiteLabels from "./whiteLabels";
8
- export * as search from "./search";
9
8
  export * from "./connections/client/requests";
10
9
  export * from "./sync/client/requests";
11
10
  export * from "./whiteLabels/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.search = exports.whiteLabels = exports.connections = exports.embeddingModels = exports.destinations = exports.sources = exports.sync = void 0;
39
+ exports.whiteLabels = exports.connections = exports.embeddingModels = exports.destinations = exports.sources = exports.sync = void 0;
40
40
  exports.sync = __importStar(require("./sync"));
41
41
  __exportStar(require("./sync/types"), exports);
42
42
  exports.sources = __importStar(require("./sources"));
@@ -44,7 +44,6 @@ exports.destinations = __importStar(require("./destinations"));
44
44
  exports.embeddingModels = __importStar(require("./embeddingModels"));
45
45
  exports.connections = __importStar(require("./connections"));
46
46
  exports.whiteLabels = __importStar(require("./whiteLabels"));
47
- exports.search = __importStar(require("./search"));
48
47
  __exportStar(require("./connections/client/requests"), exports);
49
48
  __exportStar(require("./sync/client/requests"), exports);
50
49
  __exportStar(require("./whiteLabels/client/requests"), exports);
@@ -17,8 +17,6 @@ export * from "./EmbeddingModelWithConfigFields";
17
17
  export * from "./Fields";
18
18
  export * from "./HttpValidationError";
19
19
  export * from "./IntegrationType";
20
- export * from "./MetadataSearchFilter";
21
- export * from "./SearchResult";
22
20
  export * from "./Source";
23
21
  export * from "./SourceWithConfigFields";
24
22
  export * from "./Sync";
@@ -33,8 +33,6 @@ __exportStar(require("./EmbeddingModelWithConfigFields"), exports);
33
33
  __exportStar(require("./Fields"), exports);
34
34
  __exportStar(require("./HttpValidationError"), exports);
35
35
  __exportStar(require("./IntegrationType"), exports);
36
- __exportStar(require("./MetadataSearchFilter"), exports);
37
- __exportStar(require("./SearchResult"), exports);
38
36
  __exportStar(require("./Source"), exports);
39
37
  __exportStar(require("./SourceWithConfigFields"), exports);
40
38
  __exportStar(require("./Sync"), exports);
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.1.17";
1
+ export declare const SDK_VERSION = "0.1.18";
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 = "0.1.17";
4
+ exports.SDK_VERSION = "0.1.18";
@@ -1,71 +0,0 @@
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 summarized information.
31
- *
32
- * @param {AirweaveSDK.SearchSummarySearchSummaryPostRequest} request
33
- * @param {Search.RequestOptions} requestOptions - Request-specific configuration.
34
- *
35
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
36
- *
37
- * @example
38
- * await client.search.searchSummary({
39
- * query: "query",
40
- * body: undefined
41
- * })
42
- */
43
- searchSummary(request: AirweaveSDK.SearchSummarySearchSummaryPostRequest, requestOptions?: Search.RequestOptions): Promise<string>;
44
- /**
45
- * Search for a specific item.
46
- *
47
- * Args:
48
- * ----
49
- * db (AsyncSession): The database session.
50
- * query (str): The query to search for.
51
- * sync_id (Optional[UUID]): The sync ID to search for.
52
- * metadata_filter (Optional[list[MetadataSearchFilter]]): The filter to search for.
53
- * user (schemas.User): The user to search for.
54
- *
55
- * Returns:
56
- * -------
57
- * list[SearchResult]: The search results.
58
- *
59
- * @param {AirweaveSDK.SearchSearchObjectsPostRequest} request
60
- * @param {Search.RequestOptions} requestOptions - Request-specific configuration.
61
- *
62
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
63
- *
64
- * @example
65
- * await client.search.search({
66
- * query: "query",
67
- * body: undefined
68
- * })
69
- */
70
- search(request: AirweaveSDK.SearchSearchObjectsPostRequest, requestOptions?: Search.RequestOptions): Promise<AirweaveSDK.SearchResult[]>;
71
- }
@@ -1,231 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || (function () {
22
- var ownKeys = function(o) {
23
- ownKeys = Object.getOwnPropertyNames || function (o) {
24
- var ar = [];
25
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
- return ar;
27
- };
28
- return ownKeys(o);
29
- };
30
- return function (mod) {
31
- if (mod && mod.__esModule) return mod;
32
- var result = {};
33
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
- __setModuleDefault(result, mod);
35
- return result;
36
- };
37
- })();
38
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
- return new (P || (P = Promise))(function (resolve, reject) {
41
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
42
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
43
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44
- step((generator = generator.apply(thisArg, _arguments || [])).next());
45
- });
46
- };
47
- var __importDefault = (this && this.__importDefault) || function (mod) {
48
- return (mod && mod.__esModule) ? mod : { "default": mod };
49
- };
50
- Object.defineProperty(exports, "__esModule", { value: true });
51
- exports.Search = void 0;
52
- const environments = __importStar(require("../../../../environments"));
53
- const core = __importStar(require("../../../../core"));
54
- const AirweaveSDK = __importStar(require("../../../index"));
55
- const serializers = __importStar(require("../../../../serialization/index"));
56
- const url_join_1 = __importDefault(require("url-join"));
57
- const errors = __importStar(require("../../../../errors/index"));
58
- class Search {
59
- constructor(_options = {}) {
60
- this._options = _options;
61
- }
62
- /**
63
- * Search for summarized information.
64
- *
65
- * @param {AirweaveSDK.SearchSummarySearchSummaryPostRequest} request
66
- * @param {Search.RequestOptions} requestOptions - Request-specific configuration.
67
- *
68
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
69
- *
70
- * @example
71
- * await client.search.searchSummary({
72
- * query: "query",
73
- * body: undefined
74
- * })
75
- */
76
- searchSummary(request, requestOptions) {
77
- return __awaiter(this, void 0, void 0, function* () {
78
- var _a;
79
- const { query, syncId, body: _body } = request;
80
- const _queryParams = {};
81
- _queryParams["query"] = query;
82
- if (syncId != null) {
83
- _queryParams["sync_id"] = syncId;
84
- }
85
- const _response = yield core.fetcher({
86
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "search/summary"),
87
- method: "POST",
88
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
89
- ? yield core.Supplier.get(this._options.apiKey)
90
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.17", "User-Agent": "@airweave/sdk/0.1.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
91
- contentType: "application/json",
92
- queryParameters: _queryParams,
93
- requestType: "json",
94
- body: _body != null
95
- ? serializers.search.searchSummary.Request.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" })
96
- : undefined,
97
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
98
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
99
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
100
- });
101
- if (_response.ok) {
102
- return serializers.search.searchSummary.Response.parseOrThrow(_response.body, {
103
- unrecognizedObjectKeys: "passthrough",
104
- allowUnrecognizedUnionMembers: true,
105
- allowUnrecognizedEnumValues: true,
106
- breadcrumbsPrefix: ["response"],
107
- });
108
- }
109
- if (_response.error.reason === "status-code") {
110
- switch (_response.error.statusCode) {
111
- case 422:
112
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
113
- unrecognizedObjectKeys: "passthrough",
114
- allowUnrecognizedUnionMembers: true,
115
- allowUnrecognizedEnumValues: true,
116
- breadcrumbsPrefix: ["response"],
117
- }));
118
- default:
119
- throw new errors.AirweaveSDKError({
120
- statusCode: _response.error.statusCode,
121
- body: _response.error.body,
122
- });
123
- }
124
- }
125
- switch (_response.error.reason) {
126
- case "non-json":
127
- throw new errors.AirweaveSDKError({
128
- statusCode: _response.error.statusCode,
129
- body: _response.error.rawBody,
130
- });
131
- case "timeout":
132
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /search/summary.");
133
- case "unknown":
134
- throw new errors.AirweaveSDKError({
135
- message: _response.error.errorMessage,
136
- });
137
- }
138
- });
139
- }
140
- /**
141
- * Search for a specific item.
142
- *
143
- * Args:
144
- * ----
145
- * db (AsyncSession): The database session.
146
- * query (str): The query to search for.
147
- * sync_id (Optional[UUID]): The sync ID to search for.
148
- * metadata_filter (Optional[list[MetadataSearchFilter]]): The filter to search for.
149
- * user (schemas.User): The user to search for.
150
- *
151
- * Returns:
152
- * -------
153
- * list[SearchResult]: The search results.
154
- *
155
- * @param {AirweaveSDK.SearchSearchObjectsPostRequest} request
156
- * @param {Search.RequestOptions} requestOptions - Request-specific configuration.
157
- *
158
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
159
- *
160
- * @example
161
- * await client.search.search({
162
- * query: "query",
163
- * body: undefined
164
- * })
165
- */
166
- search(request, requestOptions) {
167
- return __awaiter(this, void 0, void 0, function* () {
168
- var _a;
169
- const { query, syncId, body: _body } = request;
170
- const _queryParams = {};
171
- _queryParams["query"] = query;
172
- if (syncId != null) {
173
- _queryParams["sync_id"] = syncId;
174
- }
175
- const _response = yield core.fetcher({
176
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.AirweaveSDKEnvironment.Production, "search/objects"),
177
- method: "POST",
178
- headers: Object.assign({ "x-api-key": (yield core.Supplier.get(this._options.apiKey)) != null
179
- ? yield core.Supplier.get(this._options.apiKey)
180
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@airweave/sdk", "X-Fern-SDK-Version": "0.1.17", "User-Agent": "@airweave/sdk/0.1.17", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
181
- contentType: "application/json",
182
- queryParameters: _queryParams,
183
- requestType: "json",
184
- body: _body != null
185
- ? serializers.search.search.Request.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" })
186
- : undefined,
187
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
188
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
189
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
190
- });
191
- if (_response.ok) {
192
- return serializers.search.search.Response.parseOrThrow(_response.body, {
193
- unrecognizedObjectKeys: "passthrough",
194
- allowUnrecognizedUnionMembers: true,
195
- allowUnrecognizedEnumValues: true,
196
- breadcrumbsPrefix: ["response"],
197
- });
198
- }
199
- if (_response.error.reason === "status-code") {
200
- switch (_response.error.statusCode) {
201
- case 422:
202
- throw new AirweaveSDK.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
203
- unrecognizedObjectKeys: "passthrough",
204
- allowUnrecognizedUnionMembers: true,
205
- allowUnrecognizedEnumValues: true,
206
- breadcrumbsPrefix: ["response"],
207
- }));
208
- default:
209
- throw new errors.AirweaveSDKError({
210
- statusCode: _response.error.statusCode,
211
- body: _response.error.body,
212
- });
213
- }
214
- }
215
- switch (_response.error.reason) {
216
- case "non-json":
217
- throw new errors.AirweaveSDKError({
218
- statusCode: _response.error.statusCode,
219
- body: _response.error.rawBody,
220
- });
221
- case "timeout":
222
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /search/objects.");
223
- case "unknown":
224
- throw new errors.AirweaveSDKError({
225
- message: _response.error.errorMessage,
226
- });
227
- }
228
- });
229
- }
230
- }
231
- exports.Search = Search;
@@ -1 +0,0 @@
1
- export * from "./requests";
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./requests"), exports);
@@ -1,16 +0,0 @@
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
- * body: undefined
10
- * }
11
- */
12
- export interface SearchSearchObjectsPostRequest {
13
- query: string;
14
- syncId?: string;
15
- body?: AirweaveSDK.MetadataSearchFilter[];
16
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,16 +0,0 @@
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
- * body: undefined
10
- * }
11
- */
12
- export interface SearchSummarySearchSummaryPostRequest {
13
- query: string;
14
- syncId?: string;
15
- body?: AirweaveSDK.MetadataSearchFilter[];
16
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- export { type SearchSummarySearchSummaryPostRequest } from "./SearchSummarySearchSummaryPostRequest";
2
- export { type SearchSearchObjectsPostRequest } from "./SearchSearchObjectsPostRequest";
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +0,0 @@
1
- export * from "./client";
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./client"), exports);
@@ -1,11 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- /**
5
- * The filter for the search.
6
- */
7
- export interface MetadataSearchFilter {
8
- key: string;
9
- value: string;
10
- operator: string;
11
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,11 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- /**
5
- * The result of the search.
6
- */
7
- export interface SearchResult {
8
- id: string;
9
- title: string;
10
- description: string;
11
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });