@airweave/sdk 0.8.94 → 0.8.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/collections/client/Client.d.ts +0 -21
- package/dist/cjs/api/resources/collections/client/Client.js +0 -71
- package/dist/cjs/api/types/BodyResyncWithExecutionConfigAdminResyncSyncIdPost.d.ts +2 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/collections/client/Client.d.mts +0 -21
- package/dist/esm/api/resources/collections/client/Client.mjs +0 -71
- package/dist/esm/api/types/BodyResyncWithExecutionConfigAdminResyncSyncIdPost.d.mts +2 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +0 -69
package/dist/cjs/Client.js
CHANGED
|
@@ -48,8 +48,8 @@ class AirweaveSDKClient {
|
|
|
48
48
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
49
49
|
"X-Fern-Language": "JavaScript",
|
|
50
50
|
"X-Fern-SDK-Name": "@airweave/sdk",
|
|
51
|
-
"X-Fern-SDK-Version": "v0.8.
|
|
52
|
-
"User-Agent": "@airweave/sdk/v0.8.
|
|
51
|
+
"X-Fern-SDK-Version": "v0.8.96",
|
|
52
|
+
"User-Agent": "@airweave/sdk/v0.8.96",
|
|
53
53
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
54
54
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
55
55
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -149,27 +149,6 @@ export declare class Collections {
|
|
|
149
149
|
*/
|
|
150
150
|
update(readableId: string, request?: AirweaveSDK.CollectionUpdate, requestOptions?: Collections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.Collection>;
|
|
151
151
|
private __update;
|
|
152
|
-
/**
|
|
153
|
-
* Trigger data synchronization for all source connections in a collection.
|
|
154
|
-
*
|
|
155
|
-
* Starts sync jobs for every source connection in the collection, pulling the latest
|
|
156
|
-
* data from each connected source. Jobs run asynchronously in the background.
|
|
157
|
-
*
|
|
158
|
-
* Returns a list of sync jobs that were created. Use the source connection endpoints
|
|
159
|
-
* to monitor the progress and status of individual sync jobs.
|
|
160
|
-
*
|
|
161
|
-
* @param {string} readableId - The unique readable identifier of the collection to refresh
|
|
162
|
-
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
163
|
-
*
|
|
164
|
-
* @throws {@link AirweaveSDK.NotFoundError}
|
|
165
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
166
|
-
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
167
|
-
*
|
|
168
|
-
* @example
|
|
169
|
-
* await client.collections.refreshAllSourceConnections("customer-support-tickets-x7k9m")
|
|
170
|
-
*/
|
|
171
|
-
refreshAllSourceConnections(readableId: string, requestOptions?: Collections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnectionJob[]>;
|
|
172
|
-
private __refreshAllSourceConnections;
|
|
173
152
|
/**
|
|
174
153
|
* **DEPRECATED**: Use POST /collections/{readable_id}/search instead.
|
|
175
154
|
*
|
|
@@ -438,77 +438,6 @@ class Collections {
|
|
|
438
438
|
}
|
|
439
439
|
});
|
|
440
440
|
}
|
|
441
|
-
/**
|
|
442
|
-
* Trigger data synchronization for all source connections in a collection.
|
|
443
|
-
*
|
|
444
|
-
* Starts sync jobs for every source connection in the collection, pulling the latest
|
|
445
|
-
* data from each connected source. Jobs run asynchronously in the background.
|
|
446
|
-
*
|
|
447
|
-
* Returns a list of sync jobs that were created. Use the source connection endpoints
|
|
448
|
-
* to monitor the progress and status of individual sync jobs.
|
|
449
|
-
*
|
|
450
|
-
* @param {string} readableId - The unique readable identifier of the collection to refresh
|
|
451
|
-
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
452
|
-
*
|
|
453
|
-
* @throws {@link AirweaveSDK.NotFoundError}
|
|
454
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
455
|
-
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
456
|
-
*
|
|
457
|
-
* @example
|
|
458
|
-
* await client.collections.refreshAllSourceConnections("customer-support-tickets-x7k9m")
|
|
459
|
-
*/
|
|
460
|
-
refreshAllSourceConnections(readableId, requestOptions) {
|
|
461
|
-
return core.HttpResponsePromise.fromPromise(this.__refreshAllSourceConnections(readableId, requestOptions));
|
|
462
|
-
}
|
|
463
|
-
__refreshAllSourceConnections(readableId, requestOptions) {
|
|
464
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
465
|
-
var _a, _b, _c;
|
|
466
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
467
|
-
const _response = yield core.fetcher({
|
|
468
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}/refresh_all`),
|
|
469
|
-
method: "POST",
|
|
470
|
-
headers: _headers,
|
|
471
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
472
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
473
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
474
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
475
|
-
});
|
|
476
|
-
if (_response.ok) {
|
|
477
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
478
|
-
}
|
|
479
|
-
if (_response.error.reason === "status-code") {
|
|
480
|
-
switch (_response.error.statusCode) {
|
|
481
|
-
case 404:
|
|
482
|
-
throw new AirweaveSDK.NotFoundError(_response.error.body, _response.rawResponse);
|
|
483
|
-
case 422:
|
|
484
|
-
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
485
|
-
case 429:
|
|
486
|
-
throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
487
|
-
default:
|
|
488
|
-
throw new errors.AirweaveSDKError({
|
|
489
|
-
statusCode: _response.error.statusCode,
|
|
490
|
-
body: _response.error.body,
|
|
491
|
-
rawResponse: _response.rawResponse,
|
|
492
|
-
});
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
switch (_response.error.reason) {
|
|
496
|
-
case "non-json":
|
|
497
|
-
throw new errors.AirweaveSDKError({
|
|
498
|
-
statusCode: _response.error.statusCode,
|
|
499
|
-
body: _response.error.rawBody,
|
|
500
|
-
rawResponse: _response.rawResponse,
|
|
501
|
-
});
|
|
502
|
-
case "timeout":
|
|
503
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /collections/{readable_id}/refresh_all.");
|
|
504
|
-
case "unknown":
|
|
505
|
-
throw new errors.AirweaveSDKError({
|
|
506
|
-
message: _response.error.errorMessage,
|
|
507
|
-
rawResponse: _response.rawResponse,
|
|
508
|
-
});
|
|
509
|
-
}
|
|
510
|
-
});
|
|
511
|
-
}
|
|
512
441
|
/**
|
|
513
442
|
* **DEPRECATED**: Use POST /collections/{readable_id}/search instead.
|
|
514
443
|
*
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as AirweaveSDK from "../index.js";
|
|
5
5
|
export interface BodyResyncWithExecutionConfigAdminResyncSyncIdPost {
|
|
6
|
-
/** Optional nested SyncConfig for sync behavior
|
|
6
|
+
/** Optional nested SyncConfig for sync behavior */
|
|
7
7
|
execution_config?: AirweaveSDK.SyncConfig;
|
|
8
|
-
/** Optional tags for filtering and organizing sync jobs
|
|
8
|
+
/** Optional tags for filtering and organizing sync jobs */
|
|
9
9
|
tags?: string[];
|
|
10
10
|
}
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "v0.8.
|
|
1
|
+
export declare const SDK_VERSION = "v0.8.96";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -12,8 +12,8 @@ export class AirweaveSDKClient {
|
|
|
12
12
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
13
13
|
"X-Fern-Language": "JavaScript",
|
|
14
14
|
"X-Fern-SDK-Name": "@airweave/sdk",
|
|
15
|
-
"X-Fern-SDK-Version": "v0.8.
|
|
16
|
-
"User-Agent": "@airweave/sdk/v0.8.
|
|
15
|
+
"X-Fern-SDK-Version": "v0.8.96",
|
|
16
|
+
"User-Agent": "@airweave/sdk/v0.8.96",
|
|
17
17
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
18
18
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
19
19
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -149,27 +149,6 @@ export declare class Collections {
|
|
|
149
149
|
*/
|
|
150
150
|
update(readableId: string, request?: AirweaveSDK.CollectionUpdate, requestOptions?: Collections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.Collection>;
|
|
151
151
|
private __update;
|
|
152
|
-
/**
|
|
153
|
-
* Trigger data synchronization for all source connections in a collection.
|
|
154
|
-
*
|
|
155
|
-
* Starts sync jobs for every source connection in the collection, pulling the latest
|
|
156
|
-
* data from each connected source. Jobs run asynchronously in the background.
|
|
157
|
-
*
|
|
158
|
-
* Returns a list of sync jobs that were created. Use the source connection endpoints
|
|
159
|
-
* to monitor the progress and status of individual sync jobs.
|
|
160
|
-
*
|
|
161
|
-
* @param {string} readableId - The unique readable identifier of the collection to refresh
|
|
162
|
-
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
163
|
-
*
|
|
164
|
-
* @throws {@link AirweaveSDK.NotFoundError}
|
|
165
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
166
|
-
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
167
|
-
*
|
|
168
|
-
* @example
|
|
169
|
-
* await client.collections.refreshAllSourceConnections("customer-support-tickets-x7k9m")
|
|
170
|
-
*/
|
|
171
|
-
refreshAllSourceConnections(readableId: string, requestOptions?: Collections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnectionJob[]>;
|
|
172
|
-
private __refreshAllSourceConnections;
|
|
173
152
|
/**
|
|
174
153
|
* **DEPRECATED**: Use POST /collections/{readable_id}/search instead.
|
|
175
154
|
*
|
|
@@ -402,77 +402,6 @@ export class Collections {
|
|
|
402
402
|
}
|
|
403
403
|
});
|
|
404
404
|
}
|
|
405
|
-
/**
|
|
406
|
-
* Trigger data synchronization for all source connections in a collection.
|
|
407
|
-
*
|
|
408
|
-
* Starts sync jobs for every source connection in the collection, pulling the latest
|
|
409
|
-
* data from each connected source. Jobs run asynchronously in the background.
|
|
410
|
-
*
|
|
411
|
-
* Returns a list of sync jobs that were created. Use the source connection endpoints
|
|
412
|
-
* to monitor the progress and status of individual sync jobs.
|
|
413
|
-
*
|
|
414
|
-
* @param {string} readableId - The unique readable identifier of the collection to refresh
|
|
415
|
-
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
416
|
-
*
|
|
417
|
-
* @throws {@link AirweaveSDK.NotFoundError}
|
|
418
|
-
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
419
|
-
* @throws {@link AirweaveSDK.TooManyRequestsError}
|
|
420
|
-
*
|
|
421
|
-
* @example
|
|
422
|
-
* await client.collections.refreshAllSourceConnections("customer-support-tickets-x7k9m")
|
|
423
|
-
*/
|
|
424
|
-
refreshAllSourceConnections(readableId, requestOptions) {
|
|
425
|
-
return core.HttpResponsePromise.fromPromise(this.__refreshAllSourceConnections(readableId, requestOptions));
|
|
426
|
-
}
|
|
427
|
-
__refreshAllSourceConnections(readableId, requestOptions) {
|
|
428
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
429
|
-
var _a, _b, _c;
|
|
430
|
-
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
431
|
-
const _response = yield core.fetcher({
|
|
432
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}/refresh_all`),
|
|
433
|
-
method: "POST",
|
|
434
|
-
headers: _headers,
|
|
435
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
436
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
437
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
438
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
439
|
-
});
|
|
440
|
-
if (_response.ok) {
|
|
441
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
442
|
-
}
|
|
443
|
-
if (_response.error.reason === "status-code") {
|
|
444
|
-
switch (_response.error.statusCode) {
|
|
445
|
-
case 404:
|
|
446
|
-
throw new AirweaveSDK.NotFoundError(_response.error.body, _response.rawResponse);
|
|
447
|
-
case 422:
|
|
448
|
-
throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
449
|
-
case 429:
|
|
450
|
-
throw new AirweaveSDK.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
451
|
-
default:
|
|
452
|
-
throw new errors.AirweaveSDKError({
|
|
453
|
-
statusCode: _response.error.statusCode,
|
|
454
|
-
body: _response.error.body,
|
|
455
|
-
rawResponse: _response.rawResponse,
|
|
456
|
-
});
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
switch (_response.error.reason) {
|
|
460
|
-
case "non-json":
|
|
461
|
-
throw new errors.AirweaveSDKError({
|
|
462
|
-
statusCode: _response.error.statusCode,
|
|
463
|
-
body: _response.error.rawBody,
|
|
464
|
-
rawResponse: _response.rawResponse,
|
|
465
|
-
});
|
|
466
|
-
case "timeout":
|
|
467
|
-
throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling POST /collections/{readable_id}/refresh_all.");
|
|
468
|
-
case "unknown":
|
|
469
|
-
throw new errors.AirweaveSDKError({
|
|
470
|
-
message: _response.error.errorMessage,
|
|
471
|
-
rawResponse: _response.rawResponse,
|
|
472
|
-
});
|
|
473
|
-
}
|
|
474
|
-
});
|
|
475
|
-
}
|
|
476
405
|
/**
|
|
477
406
|
* **DEPRECATED**: Use POST /collections/{readable_id}/search instead.
|
|
478
407
|
*
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as AirweaveSDK from "../index.mjs";
|
|
5
5
|
export interface BodyResyncWithExecutionConfigAdminResyncSyncIdPost {
|
|
6
|
-
/** Optional nested SyncConfig for sync behavior
|
|
6
|
+
/** Optional nested SyncConfig for sync behavior */
|
|
7
7
|
execution_config?: AirweaveSDK.SyncConfig;
|
|
8
|
-
/** Optional tags for filtering and organizing sync jobs
|
|
8
|
+
/** Optional tags for filtering and organizing sync jobs */
|
|
9
9
|
tags?: string[];
|
|
10
10
|
}
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "v0.8.
|
|
1
|
+
export declare const SDK_VERSION = "v0.8.96";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "v0.8.
|
|
1
|
+
export const SDK_VERSION = "v0.8.96";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -508,75 +508,6 @@ await client.collections.update("customer-support-tickets-x7k9m", {
|
|
|
508
508
|
</dl>
|
|
509
509
|
</details>
|
|
510
510
|
|
|
511
|
-
<details><summary><code>client.collections.<a href="/src/api/resources/collections/client/Client.ts">refreshAllSourceConnections</a>(readableId) -> AirweaveSDK.SourceConnectionJob[]</code></summary>
|
|
512
|
-
<dl>
|
|
513
|
-
<dd>
|
|
514
|
-
|
|
515
|
-
#### 📝 Description
|
|
516
|
-
|
|
517
|
-
<dl>
|
|
518
|
-
<dd>
|
|
519
|
-
|
|
520
|
-
<dl>
|
|
521
|
-
<dd>
|
|
522
|
-
|
|
523
|
-
Trigger data synchronization for all source connections in a collection.
|
|
524
|
-
|
|
525
|
-
Starts sync jobs for every source connection in the collection, pulling the latest
|
|
526
|
-
data from each connected source. Jobs run asynchronously in the background.
|
|
527
|
-
|
|
528
|
-
Returns a list of sync jobs that were created. Use the source connection endpoints
|
|
529
|
-
to monitor the progress and status of individual sync jobs.
|
|
530
|
-
|
|
531
|
-
</dd>
|
|
532
|
-
</dl>
|
|
533
|
-
</dd>
|
|
534
|
-
</dl>
|
|
535
|
-
|
|
536
|
-
#### 🔌 Usage
|
|
537
|
-
|
|
538
|
-
<dl>
|
|
539
|
-
<dd>
|
|
540
|
-
|
|
541
|
-
<dl>
|
|
542
|
-
<dd>
|
|
543
|
-
|
|
544
|
-
```typescript
|
|
545
|
-
await client.collections.refreshAllSourceConnections("customer-support-tickets-x7k9m");
|
|
546
|
-
```
|
|
547
|
-
|
|
548
|
-
</dd>
|
|
549
|
-
</dl>
|
|
550
|
-
</dd>
|
|
551
|
-
</dl>
|
|
552
|
-
|
|
553
|
-
#### ⚙️ Parameters
|
|
554
|
-
|
|
555
|
-
<dl>
|
|
556
|
-
<dd>
|
|
557
|
-
|
|
558
|
-
<dl>
|
|
559
|
-
<dd>
|
|
560
|
-
|
|
561
|
-
**readableId:** `string` — The unique readable identifier of the collection to refresh
|
|
562
|
-
|
|
563
|
-
</dd>
|
|
564
|
-
</dl>
|
|
565
|
-
|
|
566
|
-
<dl>
|
|
567
|
-
<dd>
|
|
568
|
-
|
|
569
|
-
**requestOptions:** `Collections.RequestOptions`
|
|
570
|
-
|
|
571
|
-
</dd>
|
|
572
|
-
</dl>
|
|
573
|
-
</dd>
|
|
574
|
-
</dl>
|
|
575
|
-
|
|
576
|
-
</dd>
|
|
577
|
-
</dl>
|
|
578
|
-
</details>
|
|
579
|
-
|
|
580
511
|
<details><summary><code>client.collections.<a href="/src/api/resources/collections/client/Client.ts">searchGetLegacy</a>(readableId, { ...params }) -> AirweaveSDK.LegacySearchResponse</code></summary>
|
|
581
512
|
<dl>
|
|
582
513
|
<dd>
|