@airweave/sdk 0.6.43 → 0.6.45

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.
@@ -47,8 +47,8 @@ class AirweaveSDKClient {
47
47
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
48
48
  "X-Fern-Language": "JavaScript",
49
49
  "X-Fern-SDK-Name": "@airweave/sdk",
50
- "X-Fern-SDK-Version": "v0.6.43",
51
- "User-Agent": "@airweave/sdk/v0.6.43",
50
+ "X-Fern-SDK-Version": "v0.6.45",
51
+ "User-Agent": "@airweave/sdk/v0.6.45",
52
52
  "X-Fern-Runtime": core.RUNTIME.type,
53
53
  "X-Fern-Runtime-Version": core.RUNTIME.version,
54
54
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -129,15 +129,27 @@ export declare class SourceConnections {
129
129
  *
130
130
  * Runs are always executed through Temporal workflow engine.
131
131
  *
132
+ * Args:
133
+ * db: Database session
134
+ * source_connection_id: ID of the source connection to run
135
+ * ctx: API context with organization and user information
136
+ * guard_rail: Guard rail service for usage limits
137
+ * force_full_sync: If True, forces a full sync with orphaned entity cleanup
138
+ * for continuous syncs. Raises 400 error if used on
139
+ * non-continuous syncs (which are always full syncs).
140
+ *
132
141
  * @param {string} sourceConnectionId
142
+ * @param {AirweaveSDK.RunSourceConnectionsSourceConnectionIdRunPostRequest} request
133
143
  * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
134
144
  *
135
145
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
136
146
  *
137
147
  * @example
138
- * await client.sourceConnections.run("source_connection_id")
148
+ * await client.sourceConnections.run("source_connection_id", {
149
+ * force_full_sync: true
150
+ * })
139
151
  */
140
- run(sourceConnectionId: string, requestOptions?: SourceConnections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnectionJob>;
152
+ run(sourceConnectionId: string, request?: AirweaveSDK.RunSourceConnectionsSourceConnectionIdRunPostRequest, requestOptions?: SourceConnections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnectionJob>;
141
153
  private __run;
142
154
  /**
143
155
  * Get sync jobs for a source connection.
@@ -405,26 +405,43 @@ class SourceConnections {
405
405
  *
406
406
  * Runs are always executed through Temporal workflow engine.
407
407
  *
408
+ * Args:
409
+ * db: Database session
410
+ * source_connection_id: ID of the source connection to run
411
+ * ctx: API context with organization and user information
412
+ * guard_rail: Guard rail service for usage limits
413
+ * force_full_sync: If True, forces a full sync with orphaned entity cleanup
414
+ * for continuous syncs. Raises 400 error if used on
415
+ * non-continuous syncs (which are always full syncs).
416
+ *
408
417
  * @param {string} sourceConnectionId
418
+ * @param {AirweaveSDK.RunSourceConnectionsSourceConnectionIdRunPostRequest} request
409
419
  * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
410
420
  *
411
421
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
412
422
  *
413
423
  * @example
414
- * await client.sourceConnections.run("source_connection_id")
424
+ * await client.sourceConnections.run("source_connection_id", {
425
+ * force_full_sync: true
426
+ * })
415
427
  */
416
- run(sourceConnectionId, requestOptions) {
417
- return core.HttpResponsePromise.fromPromise(this.__run(sourceConnectionId, requestOptions));
428
+ run(sourceConnectionId, request = {}, requestOptions) {
429
+ return core.HttpResponsePromise.fromPromise(this.__run(sourceConnectionId, request, requestOptions));
418
430
  }
419
- __run(sourceConnectionId, requestOptions) {
420
- return __awaiter(this, void 0, void 0, function* () {
431
+ __run(sourceConnectionId_1) {
432
+ return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
421
433
  var _a, _b, _c;
434
+ const { force_full_sync: forceFullSync } = request;
435
+ const _queryParams = {};
436
+ if (forceFullSync != null) {
437
+ _queryParams["force_full_sync"] = forceFullSync.toString();
438
+ }
422
439
  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);
423
440
  const _response = yield core.fetcher({
424
441
  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, `source-connections/${encodeURIComponent(sourceConnectionId)}/run`),
425
442
  method: "POST",
426
443
  headers: _headers,
427
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
444
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
428
445
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
429
446
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
430
447
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * force_full_sync: true
8
+ * }
9
+ */
10
+ export interface RunSourceConnectionsSourceConnectionIdRunPostRequest {
11
+ /** Force a full sync ignoring cursor data instead of waiting for the daily cleanup schedule. Only allowed for continuous syncs. */
12
+ force_full_sync?: boolean;
13
+ }
@@ -0,0 +1,5 @@
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,4 +1,5 @@
1
1
  export { type ListSourceConnectionsGetRequest } from "./ListSourceConnectionsGetRequest.js";
2
2
  export { type SourceConnectionCreate } from "./SourceConnectionCreate.js";
3
3
  export { type SourceConnectionUpdate } from "./SourceConnectionUpdate.js";
4
+ export { type RunSourceConnectionsSourceConnectionIdRunPostRequest } from "./RunSourceConnectionsSourceConnectionIdRunPostRequest.js";
4
5
  export { type GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest } from "./GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest.js";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "v0.6.43";
1
+ export declare const SDK_VERSION = "v0.6.45";
@@ -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.6.43";
4
+ exports.SDK_VERSION = "v0.6.45";
@@ -11,8 +11,8 @@ export class AirweaveSDKClient {
11
11
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
12
12
  "X-Fern-Language": "JavaScript",
13
13
  "X-Fern-SDK-Name": "@airweave/sdk",
14
- "X-Fern-SDK-Version": "v0.6.43",
15
- "User-Agent": "@airweave/sdk/v0.6.43",
14
+ "X-Fern-SDK-Version": "v0.6.45",
15
+ "User-Agent": "@airweave/sdk/v0.6.45",
16
16
  "X-Fern-Runtime": core.RUNTIME.type,
17
17
  "X-Fern-Runtime-Version": core.RUNTIME.version,
18
18
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -129,15 +129,27 @@ export declare class SourceConnections {
129
129
  *
130
130
  * Runs are always executed through Temporal workflow engine.
131
131
  *
132
+ * Args:
133
+ * db: Database session
134
+ * source_connection_id: ID of the source connection to run
135
+ * ctx: API context with organization and user information
136
+ * guard_rail: Guard rail service for usage limits
137
+ * force_full_sync: If True, forces a full sync with orphaned entity cleanup
138
+ * for continuous syncs. Raises 400 error if used on
139
+ * non-continuous syncs (which are always full syncs).
140
+ *
132
141
  * @param {string} sourceConnectionId
142
+ * @param {AirweaveSDK.RunSourceConnectionsSourceConnectionIdRunPostRequest} request
133
143
  * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
134
144
  *
135
145
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
136
146
  *
137
147
  * @example
138
- * await client.sourceConnections.run("source_connection_id")
148
+ * await client.sourceConnections.run("source_connection_id", {
149
+ * force_full_sync: true
150
+ * })
139
151
  */
140
- run(sourceConnectionId: string, requestOptions?: SourceConnections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnectionJob>;
152
+ run(sourceConnectionId: string, request?: AirweaveSDK.RunSourceConnectionsSourceConnectionIdRunPostRequest, requestOptions?: SourceConnections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnectionJob>;
141
153
  private __run;
142
154
  /**
143
155
  * Get sync jobs for a source connection.
@@ -369,26 +369,43 @@ export class SourceConnections {
369
369
  *
370
370
  * Runs are always executed through Temporal workflow engine.
371
371
  *
372
+ * Args:
373
+ * db: Database session
374
+ * source_connection_id: ID of the source connection to run
375
+ * ctx: API context with organization and user information
376
+ * guard_rail: Guard rail service for usage limits
377
+ * force_full_sync: If True, forces a full sync with orphaned entity cleanup
378
+ * for continuous syncs. Raises 400 error if used on
379
+ * non-continuous syncs (which are always full syncs).
380
+ *
372
381
  * @param {string} sourceConnectionId
382
+ * @param {AirweaveSDK.RunSourceConnectionsSourceConnectionIdRunPostRequest} request
373
383
  * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
374
384
  *
375
385
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
376
386
  *
377
387
  * @example
378
- * await client.sourceConnections.run("source_connection_id")
388
+ * await client.sourceConnections.run("source_connection_id", {
389
+ * force_full_sync: true
390
+ * })
379
391
  */
380
- run(sourceConnectionId, requestOptions) {
381
- return core.HttpResponsePromise.fromPromise(this.__run(sourceConnectionId, requestOptions));
392
+ run(sourceConnectionId, request = {}, requestOptions) {
393
+ return core.HttpResponsePromise.fromPromise(this.__run(sourceConnectionId, request, requestOptions));
382
394
  }
383
- __run(sourceConnectionId, requestOptions) {
384
- return __awaiter(this, void 0, void 0, function* () {
395
+ __run(sourceConnectionId_1) {
396
+ return __awaiter(this, arguments, void 0, function* (sourceConnectionId, request = {}, requestOptions) {
385
397
  var _a, _b, _c;
398
+ const { force_full_sync: forceFullSync } = request;
399
+ const _queryParams = {};
400
+ if (forceFullSync != null) {
401
+ _queryParams["force_full_sync"] = forceFullSync.toString();
402
+ }
386
403
  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);
387
404
  const _response = yield core.fetcher({
388
405
  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, `source-connections/${encodeURIComponent(sourceConnectionId)}/run`),
389
406
  method: "POST",
390
407
  headers: _headers,
391
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
408
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
392
409
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
393
410
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
394
411
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * force_full_sync: true
8
+ * }
9
+ */
10
+ export interface RunSourceConnectionsSourceConnectionIdRunPostRequest {
11
+ /** Force a full sync ignoring cursor data instead of waiting for the daily cleanup schedule. Only allowed for continuous syncs. */
12
+ force_full_sync?: boolean;
13
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -1,4 +1,5 @@
1
1
  export { type ListSourceConnectionsGetRequest } from "./ListSourceConnectionsGetRequest.mjs";
2
2
  export { type SourceConnectionCreate } from "./SourceConnectionCreate.mjs";
3
3
  export { type SourceConnectionUpdate } from "./SourceConnectionUpdate.mjs";
4
+ export { type RunSourceConnectionsSourceConnectionIdRunPostRequest } from "./RunSourceConnectionsSourceConnectionIdRunPostRequest.mjs";
4
5
  export { type GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest } from "./GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "v0.6.43";
1
+ export declare const SDK_VERSION = "v0.6.45";
@@ -1 +1 @@
1
- export const SDK_VERSION = "v0.6.43";
1
+ export const SDK_VERSION = "v0.6.45";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@airweave/sdk",
3
- "version": "v0.6.43",
3
+ "version": "v0.6.45",
4
4
  "private": false,
5
5
  "repository": "github:airweave-ai/typescript-sdk",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -966,7 +966,7 @@ await client.sourceConnections.update("source_connection_id");
966
966
  </dl>
967
967
  </details>
968
968
 
969
- <details><summary><code>client.sourceConnections.<a href="/src/api/resources/sourceConnections/client/Client.ts">run</a>(sourceConnectionId) -> AirweaveSDK.SourceConnectionJob</code></summary>
969
+ <details><summary><code>client.sourceConnections.<a href="/src/api/resources/sourceConnections/client/Client.ts">run</a>(sourceConnectionId, { ...params }) -> AirweaveSDK.SourceConnectionJob</code></summary>
970
970
  <dl>
971
971
  <dd>
972
972
 
@@ -982,6 +982,15 @@ Trigger a sync run for a source connection.
982
982
 
983
983
  Runs are always executed through Temporal workflow engine.
984
984
 
985
+ Args:
986
+ db: Database session
987
+ source_connection_id: ID of the source connection to run
988
+ ctx: API context with organization and user information
989
+ guard_rail: Guard rail service for usage limits
990
+ force_full_sync: If True, forces a full sync with orphaned entity cleanup
991
+ for continuous syncs. Raises 400 error if used on
992
+ non-continuous syncs (which are always full syncs).
993
+
985
994
  </dd>
986
995
  </dl>
987
996
  </dd>
@@ -996,7 +1005,9 @@ Runs are always executed through Temporal workflow engine.
996
1005
  <dd>
997
1006
 
998
1007
  ```typescript
999
- await client.sourceConnections.run("source_connection_id");
1008
+ await client.sourceConnections.run("source_connection_id", {
1009
+ force_full_sync: true,
1010
+ });
1000
1011
  ```
1001
1012
 
1002
1013
  </dd>
@@ -1020,6 +1031,14 @@ await client.sourceConnections.run("source_connection_id");
1020
1031
  <dl>
1021
1032
  <dd>
1022
1033
 
1034
+ **request:** `AirweaveSDK.RunSourceConnectionsSourceConnectionIdRunPostRequest`
1035
+
1036
+ </dd>
1037
+ </dl>
1038
+
1039
+ <dl>
1040
+ <dd>
1041
+
1023
1042
  **requestOptions:** `SourceConnections.RequestOptions`
1024
1043
 
1025
1044
  </dd>