@airweave/sdk 0.6.3 → 0.6.26

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 (139) hide show
  1. package/README.md +14 -3
  2. package/dist/cjs/Client.d.ts +4 -5
  3. package/dist/cjs/Client.js +6 -11
  4. package/dist/cjs/api/resources/collections/client/Client.d.ts +14 -27
  5. package/dist/cjs/api/resources/collections/client/Client.js +37 -85
  6. package/dist/cjs/api/resources/collections/client/requests/ListCollectionsGetRequest.d.ts +6 -7
  7. package/dist/cjs/api/resources/collections/client/requests/SearchCollectionsReadableIdSearchGetRequest.d.ts +10 -16
  8. package/dist/cjs/api/resources/collections/client/requests/index.d.ts +0 -1
  9. package/dist/cjs/api/resources/index.d.ts +0 -2
  10. package/dist/cjs/api/resources/index.js +1 -3
  11. package/dist/cjs/api/resources/sourceConnections/client/Client.d.ts +40 -9
  12. package/dist/cjs/api/resources/sourceConnections/client/Client.js +112 -20
  13. package/dist/cjs/api/resources/sourceConnections/client/requests/GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest.d.ts +3 -1
  14. package/dist/cjs/api/resources/sourceConnections/client/requests/ListSourceConnectionsGetRequest.d.ts +6 -4
  15. package/dist/cjs/api/resources/sourceConnections/client/requests/SourceConnectionCreate.d.ts +1 -1
  16. package/dist/cjs/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.ts +23 -0
  17. package/dist/cjs/api/resources/sourceConnections/client/requests/index.d.ts +1 -0
  18. package/dist/cjs/api/resources/sources/client/Client.d.ts +17 -17
  19. package/dist/cjs/api/resources/sources/client/Client.js +24 -20
  20. package/dist/cjs/api/types/ActionCheckRequest.d.ts +2 -2
  21. package/dist/cjs/api/types/ActionCheckResponse.d.ts +1 -2
  22. package/dist/cjs/api/types/AuthProviderAuthentication.d.ts +2 -2
  23. package/dist/cjs/api/types/AuthProviderConnection.d.ts +2 -0
  24. package/dist/cjs/api/{resources/authProviders/client/requests → types}/AuthProviderConnectionCreate.d.ts +2 -10
  25. package/dist/cjs/api/types/AuthenticationDetails.d.ts +1 -1
  26. package/dist/cjs/api/{resources/collections/client/requests → types}/CollectionUpdate.d.ts +4 -4
  27. package/dist/cjs/api/types/EntitySummary.d.ts +0 -1
  28. package/dist/cjs/api/types/FieldCondition.d.ts +3 -3
  29. package/dist/cjs/api/types/MatchPhrase.d.ts +10 -0
  30. package/dist/cjs/api/types/Source.d.ts +2 -2
  31. package/dist/cjs/api/types/SourceConnectionListItem.d.ts +2 -7
  32. package/dist/cjs/api/types/SubscriptionInfo.d.ts +12 -0
  33. package/dist/cjs/api/types/Sync.d.ts +0 -1
  34. package/dist/cjs/api/types/SyncCreate.d.ts +0 -1
  35. package/dist/cjs/api/types/SyncJobStatus.d.ts +2 -1
  36. package/dist/cjs/api/types/SyncJobStatus.js +1 -0
  37. package/dist/cjs/api/types/SyncUpdate.d.ts +0 -1
  38. package/dist/cjs/api/types/SyncWithSourceConnection.d.ts +0 -1
  39. package/dist/cjs/api/types/UpdatePlanRequest.d.ts +2 -0
  40. package/dist/cjs/api/types/UsageSnapshot.d.ts +4 -8
  41. package/dist/cjs/api/types/index.d.ts +3 -3
  42. package/dist/cjs/api/types/index.js +3 -3
  43. package/dist/cjs/core/fetcher/EndpointMetadata.d.ts +13 -0
  44. package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +12 -0
  45. package/dist/cjs/core/fetcher/EndpointSupplier.js +22 -0
  46. package/dist/cjs/core/fetcher/Fetcher.d.ts +5 -3
  47. package/dist/cjs/core/fetcher/Fetcher.js +4 -3
  48. package/dist/cjs/core/fetcher/index.d.ts +7 -5
  49. package/dist/cjs/core/fetcher/index.js +7 -5
  50. package/dist/cjs/core/fetcher/requestWithRetries.js +44 -8
  51. package/dist/cjs/core/headers.d.ts +2 -3
  52. package/dist/cjs/version.d.ts +1 -1
  53. package/dist/cjs/version.js +1 -1
  54. package/dist/esm/Client.d.mts +4 -5
  55. package/dist/esm/Client.mjs +2 -7
  56. package/dist/esm/api/resources/collections/client/Client.d.mts +14 -27
  57. package/dist/esm/api/resources/collections/client/Client.mjs +37 -85
  58. package/dist/esm/api/resources/collections/client/requests/ListCollectionsGetRequest.d.mts +6 -7
  59. package/dist/esm/api/resources/collections/client/requests/SearchCollectionsReadableIdSearchGetRequest.d.mts +10 -16
  60. package/dist/esm/api/resources/collections/client/requests/index.d.mts +0 -1
  61. package/dist/esm/api/resources/index.d.mts +0 -2
  62. package/dist/esm/api/resources/index.mjs +0 -2
  63. package/dist/esm/api/resources/sourceConnections/client/Client.d.mts +40 -9
  64. package/dist/esm/api/resources/sourceConnections/client/Client.mjs +112 -20
  65. package/dist/esm/api/resources/sourceConnections/client/requests/GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest.d.mts +3 -1
  66. package/dist/esm/api/resources/sourceConnections/client/requests/ListSourceConnectionsGetRequest.d.mts +6 -4
  67. package/dist/esm/api/resources/sourceConnections/client/requests/SourceConnectionCreate.d.mts +1 -1
  68. package/dist/esm/api/resources/sourceConnections/client/requests/SourceConnectionUpdate.d.mts +23 -0
  69. package/dist/esm/api/resources/sourceConnections/client/requests/index.d.mts +1 -0
  70. package/dist/esm/api/resources/sources/client/Client.d.mts +17 -17
  71. package/dist/esm/api/resources/sources/client/Client.mjs +24 -20
  72. package/dist/esm/api/types/ActionCheckRequest.d.mts +2 -2
  73. package/dist/esm/api/types/ActionCheckResponse.d.mts +1 -2
  74. package/dist/esm/api/types/AuthProviderAuthentication.d.mts +2 -2
  75. package/dist/esm/api/types/AuthProviderConnection.d.mts +2 -0
  76. package/dist/esm/api/{resources/authProviders/client/requests → types}/AuthProviderConnectionCreate.d.mts +2 -10
  77. package/dist/esm/api/types/AuthenticationDetails.d.mts +1 -1
  78. package/dist/esm/api/{resources/collections/client/requests → types}/CollectionUpdate.d.mts +4 -4
  79. package/dist/esm/api/types/EntitySummary.d.mts +0 -1
  80. package/dist/esm/api/types/FieldCondition.d.mts +3 -3
  81. package/dist/esm/api/types/MatchPhrase.d.mts +10 -0
  82. package/dist/esm/api/types/Source.d.mts +2 -2
  83. package/dist/esm/api/types/SourceConnectionListItem.d.mts +2 -7
  84. package/dist/esm/api/types/SubscriptionInfo.d.mts +12 -0
  85. package/dist/esm/api/types/Sync.d.mts +0 -1
  86. package/dist/esm/api/types/SyncCreate.d.mts +0 -1
  87. package/dist/esm/api/types/SyncJobStatus.d.mts +2 -1
  88. package/dist/esm/api/types/SyncJobStatus.mjs +1 -0
  89. package/dist/esm/api/types/SyncUpdate.d.mts +0 -1
  90. package/dist/esm/api/types/SyncWithSourceConnection.d.mts +0 -1
  91. package/dist/esm/api/types/UpdatePlanRequest.d.mts +2 -0
  92. package/dist/esm/api/types/UsageSnapshot.d.mts +4 -8
  93. package/dist/esm/api/types/index.d.mts +3 -3
  94. package/dist/esm/api/types/index.mjs +3 -3
  95. package/dist/esm/core/fetcher/EndpointMetadata.d.mts +13 -0
  96. package/dist/esm/core/fetcher/EndpointSupplier.d.mts +12 -0
  97. package/dist/esm/core/fetcher/EndpointSupplier.mjs +19 -0
  98. package/dist/esm/core/fetcher/Fetcher.d.mts +5 -3
  99. package/dist/esm/core/fetcher/Fetcher.mjs +4 -3
  100. package/dist/esm/core/fetcher/index.d.mts +7 -5
  101. package/dist/esm/core/fetcher/index.mjs +3 -2
  102. package/dist/esm/core/fetcher/requestWithRetries.mjs +44 -8
  103. package/dist/esm/core/headers.d.mts +2 -3
  104. package/dist/esm/version.d.mts +1 -1
  105. package/dist/esm/version.mjs +1 -1
  106. package/package.json +8 -13
  107. package/reference.md +109 -250
  108. package/dist/cjs/api/resources/authProviders/client/Client.d.ts +0 -90
  109. package/dist/cjs/api/resources/authProviders/client/Client.js +0 -213
  110. package/dist/cjs/api/resources/authProviders/client/index.d.ts +0 -2
  111. package/dist/cjs/api/resources/authProviders/client/index.js +0 -17
  112. package/dist/cjs/api/resources/authProviders/client/requests/index.d.ts +0 -1
  113. package/dist/cjs/api/resources/authProviders/index.d.ts +0 -1
  114. package/dist/cjs/api/resources/authProviders/index.js +0 -17
  115. package/dist/cjs/api/types/CancelSubscriptionRequest.d.ts +0 -11
  116. package/dist/cjs/api/types/SourceConnectionUpdate.d.ts +0 -16
  117. package/dist/cjs/api/types/SyncSummary.d.ts +0 -11
  118. package/dist/cjs/api/types/SyncSummary.js +0 -5
  119. package/dist/esm/api/resources/authProviders/client/Client.d.mts +0 -90
  120. package/dist/esm/api/resources/authProviders/client/Client.mjs +0 -176
  121. package/dist/esm/api/resources/authProviders/client/index.d.mts +0 -2
  122. package/dist/esm/api/resources/authProviders/client/index.mjs +0 -1
  123. package/dist/esm/api/resources/authProviders/client/requests/index.d.mts +0 -1
  124. package/dist/esm/api/resources/authProviders/index.d.mts +0 -1
  125. package/dist/esm/api/resources/authProviders/index.mjs +0 -1
  126. package/dist/esm/api/types/CancelSubscriptionRequest.d.mts +0 -11
  127. package/dist/esm/api/types/SourceConnectionUpdate.d.mts +0 -16
  128. package/dist/esm/api/types/SyncSummary.d.mts +0 -11
  129. package/dist/esm/api/types/SyncSummary.mjs +0 -4
  130. /package/dist/cjs/api/{types → resources/sourceConnections/client/requests}/SourceConnectionUpdate.js +0 -0
  131. /package/dist/cjs/api/{resources/authProviders/client/requests → types}/AuthProviderConnectionCreate.js +0 -0
  132. /package/dist/cjs/api/{resources/collections/client/requests → types}/CollectionUpdate.js +0 -0
  133. /package/dist/cjs/api/types/{CancelSubscriptionRequest.js → MatchPhrase.js} +0 -0
  134. /package/dist/cjs/{api/resources/authProviders/client/requests/index.js → core/fetcher/EndpointMetadata.js} +0 -0
  135. /package/dist/esm/api/{types → resources/sourceConnections/client/requests}/SourceConnectionUpdate.mjs +0 -0
  136. /package/dist/esm/api/{resources/authProviders/client/requests → types}/AuthProviderConnectionCreate.mjs +0 -0
  137. /package/dist/esm/api/{resources/collections/client/requests → types}/CollectionUpdate.mjs +0 -0
  138. /package/dist/esm/api/types/{CancelSubscriptionRequest.mjs → MatchPhrase.mjs} +0 -0
  139. /package/dist/esm/{api/resources/authProviders/client/requests/index.mjs → core/fetcher/EndpointMetadata.mjs} +0 -0
package/README.md CHANGED
@@ -37,7 +37,7 @@ following namespace:
37
37
  ```typescript
38
38
  import { AirweaveSDK } from "@airweave/sdk";
39
39
 
40
- const request: AirweaveSDK.AuthProviderConnectionCreate = {
40
+ const request: AirweaveSDK.ListCollectionsGetRequest = {
41
41
  ...
42
42
  };
43
43
  ```
@@ -76,6 +76,18 @@ const response = await client.collections.create(..., {
76
76
  });
77
77
  ```
78
78
 
79
+ ### Additional Query String Parameters
80
+
81
+ If you would like to send additional query string parameters as part of the request, use the `queryParams` request option.
82
+
83
+ ```typescript
84
+ const response = await client.collections.create(..., {
85
+ queryParams: {
86
+ 'customQueryParamKey': 'custom query param value'
87
+ }
88
+ });
89
+ ```
90
+
79
91
  ### Retries
80
92
 
81
93
  The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
@@ -132,8 +144,7 @@ console.log(rawResponse.headers['X-My-Header']);
132
144
 
133
145
  ### Runtime Compatibility
134
146
 
135
- The SDK defaults to `node-fetch` but will use the global fetch client if present. The SDK works in the following
136
- runtimes:
147
+ The SDK works in the following runtimes:
137
148
 
138
149
  - Node.js 18+
139
150
  - Vercel
@@ -4,7 +4,6 @@
4
4
  import * as environments from "./environments.js";
5
5
  import * as core from "./core/index.js";
6
6
  import { Sources } from "./api/resources/sources/client/Client.js";
7
- import { AuthProviders } from "./api/resources/authProviders/client/Client.js";
8
7
  import { Collections } from "./api/resources/collections/client/Client.js";
9
8
  import { SourceConnections } from "./api/resources/sourceConnections/client/Client.js";
10
9
  export declare namespace AirweaveSDKClient {
@@ -14,7 +13,7 @@ export declare namespace AirweaveSDKClient {
14
13
  baseUrl?: core.Supplier<string>;
15
14
  apiKey: core.Supplier<string>;
16
15
  /** Additional headers to include in requests. */
17
- headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
16
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
18
17
  }
19
18
  interface RequestOptions {
20
19
  /** The maximum time to wait for a response in seconds. */
@@ -23,19 +22,19 @@ export declare namespace AirweaveSDKClient {
23
22
  maxRetries?: number;
24
23
  /** A hook to abort the request. */
25
24
  abortSignal?: AbortSignal;
25
+ /** Additional query string parameters to include in the request. */
26
+ queryParams?: Record<string, unknown>;
26
27
  /** Additional headers to include in the request. */
27
- headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
28
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
28
29
  }
29
30
  }
30
31
  export declare class AirweaveSDKClient {
31
32
  protected readonly _options: AirweaveSDKClient.Options;
32
33
  protected _sources: Sources | undefined;
33
- protected _authProviders: AuthProviders | undefined;
34
34
  protected _collections: Collections | undefined;
35
35
  protected _sourceConnections: SourceConnections | undefined;
36
36
  constructor(_options: AirweaveSDKClient.Options);
37
37
  get sources(): Sources;
38
- get authProviders(): AuthProviders;
39
38
  get collections(): Collections;
40
39
  get sourceConnections(): SourceConnections;
41
40
  }
@@ -40,16 +40,15 @@ exports.AirweaveSDKClient = void 0;
40
40
  const core = __importStar(require("./core/index.js"));
41
41
  const headers_js_1 = require("./core/headers.js");
42
42
  const Client_js_1 = require("./api/resources/sources/client/Client.js");
43
- const Client_js_2 = require("./api/resources/authProviders/client/Client.js");
44
- const Client_js_3 = require("./api/resources/collections/client/Client.js");
45
- const Client_js_4 = require("./api/resources/sourceConnections/client/Client.js");
43
+ const Client_js_2 = require("./api/resources/collections/client/Client.js");
44
+ const Client_js_3 = require("./api/resources/sourceConnections/client/Client.js");
46
45
  class AirweaveSDKClient {
47
46
  constructor(_options) {
48
47
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
49
48
  "X-Fern-Language": "JavaScript",
50
49
  "X-Fern-SDK-Name": "@airweave/sdk",
51
- "X-Fern-SDK-Version": "v0.6.3",
52
- "User-Agent": "@airweave/sdk/v0.6.3",
50
+ "X-Fern-SDK-Version": "v0.6.26",
51
+ "User-Agent": "@airweave/sdk/v0.6.26",
53
52
  "X-Fern-Runtime": core.RUNTIME.type,
54
53
  "X-Fern-Runtime-Version": core.RUNTIME.version,
55
54
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -58,17 +57,13 @@ class AirweaveSDKClient {
58
57
  var _a;
59
58
  return ((_a = this._sources) !== null && _a !== void 0 ? _a : (this._sources = new Client_js_1.Sources(this._options)));
60
59
  }
61
- get authProviders() {
62
- var _a;
63
- return ((_a = this._authProviders) !== null && _a !== void 0 ? _a : (this._authProviders = new Client_js_2.AuthProviders(this._options)));
64
- }
65
60
  get collections() {
66
61
  var _a;
67
- return ((_a = this._collections) !== null && _a !== void 0 ? _a : (this._collections = new Client_js_3.Collections(this._options)));
62
+ return ((_a = this._collections) !== null && _a !== void 0 ? _a : (this._collections = new Client_js_2.Collections(this._options)));
68
63
  }
69
64
  get sourceConnections() {
70
65
  var _a;
71
- return ((_a = this._sourceConnections) !== null && _a !== void 0 ? _a : (this._sourceConnections = new Client_js_4.SourceConnections(this._options)));
66
+ return ((_a = this._sourceConnections) !== null && _a !== void 0 ? _a : (this._sourceConnections = new Client_js_3.SourceConnections(this._options)));
72
67
  }
73
68
  }
74
69
  exports.AirweaveSDKClient = AirweaveSDKClient;
@@ -11,7 +11,7 @@ export declare namespace Collections {
11
11
  baseUrl?: core.Supplier<string>;
12
12
  apiKey: core.Supplier<string>;
13
13
  /** Additional headers to include in requests. */
14
- headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
14
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
15
15
  }
16
16
  interface RequestOptions {
17
17
  /** The maximum time to wait for a response in seconds. */
@@ -20,8 +20,10 @@ export declare namespace Collections {
20
20
  maxRetries?: number;
21
21
  /** A hook to abort the request. */
22
22
  abortSignal?: AbortSignal;
23
+ /** Additional query string parameters to include in the request. */
24
+ queryParams?: Record<string, unknown>;
23
25
  /** Additional headers to include in the request. */
24
- headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
26
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
25
27
  }
26
28
  }
27
29
  /**
@@ -39,7 +41,10 @@ export declare class Collections {
39
41
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
40
42
  *
41
43
  * @example
42
- * await client.collections.list()
44
+ * await client.collections.list({
45
+ * skip: 1,
46
+ * limit: 1
47
+ * })
43
48
  */
44
49
  list(request?: AirweaveSDK.ListCollectionsGetRequest, requestOptions?: Collections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.Collection[]>;
45
50
  private __list;
@@ -75,26 +80,6 @@ export declare class Collections {
75
80
  */
76
81
  get(readableId: string, requestOptions?: Collections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.Collection>;
77
82
  private __get;
78
- /**
79
- * Update a collection's properties.
80
- *
81
- * Modifies the display name of an existing collection.
82
- * Note that the readable ID cannot be changed after creation to maintain stable
83
- * API endpoints and preserve any existing integrations or bookmarks.
84
- *
85
- * @param {string} readableId - The unique readable identifier of the collection to update
86
- * @param {AirweaveSDK.CollectionUpdate} request
87
- * @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
88
- *
89
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
90
- *
91
- * @example
92
- * await client.collections.update("readable_id", {
93
- * name: "Updated Finance Data"
94
- * })
95
- */
96
- update(readableId: string, request?: AirweaveSDK.CollectionUpdate, requestOptions?: Collections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.Collection>;
97
- private __update;
98
83
  /**
99
84
  * Delete a collection and all associated data.
100
85
  *
@@ -126,7 +111,11 @@ export declare class Collections {
126
111
  *
127
112
  * @example
128
113
  * await client.collections.search("readable_id", {
129
- * query: "customer payment issues"
114
+ * query: "customer payment issues",
115
+ * response_type: "raw",
116
+ * limit: 1,
117
+ * offset: 1,
118
+ * recency_bias: 1.1
130
119
  * })
131
120
  */
132
121
  search(readableId: string, request: AirweaveSDK.SearchCollectionsReadableIdSearchGetRequest, requestOptions?: Collections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SearchResponse>;
@@ -192,7 +181,5 @@ export declare class Collections {
192
181
  */
193
182
  refreshAllSourceConnections(readableId: string, requestOptions?: Collections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnectionJob[]>;
194
183
  private __refreshAllSourceConnections;
195
- protected _getCustomAuthorizationHeaders(): Promise<{
196
- "x-api-key": string;
197
- }>;
184
+ protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>>;
198
185
  }
@@ -67,7 +67,10 @@ class Collections {
67
67
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
68
68
  *
69
69
  * @example
70
- * await client.collections.list()
70
+ * await client.collections.list({
71
+ * skip: 1,
72
+ * limit: 1
73
+ * })
71
74
  */
72
75
  list(request = {}, requestOptions) {
73
76
  return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
@@ -83,11 +86,12 @@ class Collections {
83
86
  if (limit != null) {
84
87
  _queryParams["limit"] = limit.toString();
85
88
  }
89
+ 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);
86
90
  const _response = yield core.fetcher({
87
- url: core.url.join((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirweaveSDKEnvironment.Production, "collections"),
91
+ 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"),
88
92
  method: "GET",
89
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
90
- queryParameters: _queryParams,
93
+ headers: _headers,
94
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
91
95
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
92
96
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
93
97
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -147,11 +151,13 @@ class Collections {
147
151
  __create(request, requestOptions) {
148
152
  return __awaiter(this, void 0, void 0, function* () {
149
153
  var _a, _b, _c;
154
+ 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);
150
155
  const _response = yield core.fetcher({
151
- url: core.url.join((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirweaveSDKEnvironment.Production, "collections"),
156
+ 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"),
152
157
  method: "POST",
153
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
158
+ headers: _headers,
154
159
  contentType: "application/json",
160
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
155
161
  requestType: "json",
156
162
  body: request,
157
163
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -207,10 +213,12 @@ class Collections {
207
213
  __get(readableId, requestOptions) {
208
214
  return __awaiter(this, void 0, void 0, function* () {
209
215
  var _a, _b, _c;
216
+ 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);
210
217
  const _response = yield core.fetcher({
211
- url: core.url.join((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}`),
218
+ 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)}`),
212
219
  method: "GET",
213
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
220
+ headers: _headers,
221
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
214
222
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
215
223
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
216
224
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -247,73 +255,6 @@ class Collections {
247
255
  }
248
256
  });
249
257
  }
250
- /**
251
- * Update a collection's properties.
252
- *
253
- * Modifies the display name of an existing collection.
254
- * Note that the readable ID cannot be changed after creation to maintain stable
255
- * API endpoints and preserve any existing integrations or bookmarks.
256
- *
257
- * @param {string} readableId - The unique readable identifier of the collection to update
258
- * @param {AirweaveSDK.CollectionUpdate} request
259
- * @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
260
- *
261
- * @throws {@link AirweaveSDK.UnprocessableEntityError}
262
- *
263
- * @example
264
- * await client.collections.update("readable_id", {
265
- * name: "Updated Finance Data"
266
- * })
267
- */
268
- update(readableId, request = {}, requestOptions) {
269
- return core.HttpResponsePromise.fromPromise(this.__update(readableId, request, requestOptions));
270
- }
271
- __update(readableId_1) {
272
- return __awaiter(this, arguments, void 0, function* (readableId, request = {}, requestOptions) {
273
- var _a, _b, _c;
274
- const _response = yield core.fetcher({
275
- url: core.url.join((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}`),
276
- method: "PUT",
277
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
278
- contentType: "application/json",
279
- requestType: "json",
280
- body: request,
281
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
282
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
283
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
284
- });
285
- if (_response.ok) {
286
- return { data: _response.body, rawResponse: _response.rawResponse };
287
- }
288
- if (_response.error.reason === "status-code") {
289
- switch (_response.error.statusCode) {
290
- case 422:
291
- throw new AirweaveSDK.UnprocessableEntityError(_response.error.body, _response.rawResponse);
292
- default:
293
- throw new errors.AirweaveSDKError({
294
- statusCode: _response.error.statusCode,
295
- body: _response.error.body,
296
- rawResponse: _response.rawResponse,
297
- });
298
- }
299
- }
300
- switch (_response.error.reason) {
301
- case "non-json":
302
- throw new errors.AirweaveSDKError({
303
- statusCode: _response.error.statusCode,
304
- body: _response.error.rawBody,
305
- rawResponse: _response.rawResponse,
306
- });
307
- case "timeout":
308
- throw new errors.AirweaveSDKTimeoutError("Timeout exceeded when calling PUT /collections/{readable_id}.");
309
- case "unknown":
310
- throw new errors.AirweaveSDKError({
311
- message: _response.error.errorMessage,
312
- rawResponse: _response.rawResponse,
313
- });
314
- }
315
- });
316
- }
317
258
  /**
318
259
  * Delete a collection and all associated data.
319
260
  *
@@ -335,10 +276,12 @@ class Collections {
335
276
  __delete(readableId, requestOptions) {
336
277
  return __awaiter(this, void 0, void 0, function* () {
337
278
  var _a, _b, _c;
279
+ 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);
338
280
  const _response = yield core.fetcher({
339
- url: core.url.join((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}`),
281
+ 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)}`),
340
282
  method: "DELETE",
341
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
283
+ headers: _headers,
284
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
342
285
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
343
286
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
344
287
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -389,7 +332,11 @@ class Collections {
389
332
  *
390
333
  * @example
391
334
  * await client.collections.search("readable_id", {
392
- * query: "customer payment issues"
335
+ * query: "customer payment issues",
336
+ * response_type: "raw",
337
+ * limit: 1,
338
+ * offset: 1,
339
+ * recency_bias: 1.1
393
340
  * })
394
341
  */
395
342
  search(readableId, request, requestOptions) {
@@ -413,11 +360,12 @@ class Collections {
413
360
  if (recencyBias != null) {
414
361
  _queryParams["recency_bias"] = recencyBias.toString();
415
362
  }
363
+ 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);
416
364
  const _response = yield core.fetcher({
417
- url: core.url.join((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}/search`),
365
+ 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)}/search`),
418
366
  method: "GET",
419
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
420
- queryParameters: _queryParams,
367
+ headers: _headers,
368
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
421
369
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
422
370
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
423
371
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -501,11 +449,13 @@ class Collections {
501
449
  __searchAdvanced(readableId, request, requestOptions) {
502
450
  return __awaiter(this, void 0, void 0, function* () {
503
451
  var _a, _b, _c;
452
+ 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);
504
453
  const _response = yield core.fetcher({
505
- url: core.url.join((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}/search`),
454
+ 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)}/search`),
506
455
  method: "POST",
507
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
456
+ headers: _headers,
508
457
  contentType: "application/json",
458
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
509
459
  requestType: "json",
510
460
  body: request,
511
461
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -566,10 +516,12 @@ class Collections {
566
516
  __refreshAllSourceConnections(readableId, requestOptions) {
567
517
  return __awaiter(this, void 0, void 0, function* () {
568
518
  var _a, _b, _c;
519
+ 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);
569
520
  const _response = yield core.fetcher({
570
- url: core.url.join((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AirweaveSDKEnvironment.Production, `collections/${encodeURIComponent(readableId)}/refresh_all`),
521
+ 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`),
571
522
  method: "POST",
572
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
523
+ headers: _headers,
524
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
573
525
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
574
526
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
575
527
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -3,15 +3,14 @@
3
3
  */
4
4
  /**
5
5
  * @example
6
- * {}
6
+ * {
7
+ * skip: 1,
8
+ * limit: 1
9
+ * }
7
10
  */
8
11
  export interface ListCollectionsGetRequest {
9
- /**
10
- * Number of collections to skip for pagination
11
- */
12
+ /** Number of collections to skip for pagination */
12
13
  skip?: number;
13
- /**
14
- * Maximum number of collections to return (1-1000)
15
- */
14
+ /** Maximum number of collections to return (1-1000) */
16
15
  limit?: number;
17
16
  }
@@ -5,28 +5,22 @@ import * as AirweaveSDK from "../../../../index.js";
5
5
  /**
6
6
  * @example
7
7
  * {
8
- * query: "customer payment issues"
8
+ * query: "customer payment issues",
9
+ * response_type: "raw",
10
+ * limit: 1,
11
+ * offset: 1,
12
+ * recency_bias: 1.1
9
13
  * }
10
14
  */
11
15
  export interface SearchCollectionsReadableIdSearchGetRequest {
12
- /**
13
- * The search query text to find relevant documents and data
14
- */
16
+ /** The search query text to find relevant documents and data */
15
17
  query: string;
16
- /**
17
- * Format of the response: 'raw' returns search results, 'completion' returns AI-generated answers
18
- */
18
+ /** Format of the response: 'raw' returns search results, 'completion' returns AI-generated answers */
19
19
  response_type?: AirweaveSDK.ResponseType;
20
- /**
21
- * Maximum number of results to return
22
- */
20
+ /** Maximum number of results to return */
23
21
  limit?: number;
24
- /**
25
- * Number of results to skip for pagination
26
- */
22
+ /** Number of results to skip for pagination */
27
23
  offset?: number;
28
- /**
29
- * How much to weigh recency vs similarity (0..1). 0 = no recency effect; 1 = rank by recency only.
30
- */
24
+ /** How much to weigh recency vs similarity (0..1). 0 = no recency effect; 1 = rank by recency only. */
31
25
  recency_bias?: number;
32
26
  }
@@ -1,5 +1,4 @@
1
1
  export { type ListCollectionsGetRequest } from "./ListCollectionsGetRequest.js";
2
2
  export { type CollectionCreate } from "./CollectionCreate.js";
3
- export { type CollectionUpdate } from "./CollectionUpdate.js";
4
3
  export { type SearchCollectionsReadableIdSearchGetRequest } from "./SearchCollectionsReadableIdSearchGetRequest.js";
5
4
  export { type SearchRequest } from "./SearchRequest.js";
@@ -1,7 +1,5 @@
1
1
  export * as sources from "./sources/index.js";
2
- export * as authProviders from "./authProviders/index.js";
3
2
  export * as collections from "./collections/index.js";
4
3
  export * as sourceConnections from "./sourceConnections/index.js";
5
- export * from "./authProviders/client/requests/index.js";
6
4
  export * from "./collections/client/requests/index.js";
7
5
  export * from "./sourceConnections/client/requests/index.js";
@@ -36,11 +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.sourceConnections = exports.collections = exports.authProviders = exports.sources = void 0;
39
+ exports.sourceConnections = exports.collections = exports.sources = void 0;
40
40
  exports.sources = __importStar(require("./sources/index.js"));
41
- exports.authProviders = __importStar(require("./authProviders/index.js"));
42
41
  exports.collections = __importStar(require("./collections/index.js"));
43
42
  exports.sourceConnections = __importStar(require("./sourceConnections/index.js"));
44
- __exportStar(require("./authProviders/client/requests/index.js"), exports);
45
43
  __exportStar(require("./collections/client/requests/index.js"), exports);
46
44
  __exportStar(require("./sourceConnections/client/requests/index.js"), exports);
@@ -11,7 +11,7 @@ export declare namespace SourceConnections {
11
11
  baseUrl?: core.Supplier<string>;
12
12
  apiKey: core.Supplier<string>;
13
13
  /** Additional headers to include in requests. */
14
- headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
14
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
15
15
  }
16
16
  interface RequestOptions {
17
17
  /** The maximum time to wait for a response in seconds. */
@@ -20,8 +20,10 @@ export declare namespace SourceConnections {
20
20
  maxRetries?: number;
21
21
  /** A hook to abort the request. */
22
22
  abortSignal?: AbortSignal;
23
+ /** Additional query string parameters to include in the request. */
24
+ queryParams?: Record<string, unknown>;
23
25
  /** Additional headers to include in the request. */
24
- headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
26
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
25
27
  }
26
28
  }
27
29
  /**
@@ -39,7 +41,11 @@ export declare class SourceConnections {
39
41
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
40
42
  *
41
43
  * @example
42
- * await client.sourceConnections.list()
44
+ * await client.sourceConnections.list({
45
+ * collection: "collection",
46
+ * skip: 1,
47
+ * limit: 1
48
+ * })
43
49
  */
44
50
  list(request?: AirweaveSDK.ListSourceConnectionsGetRequest, requestOptions?: SourceConnections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnectionListItem[]>;
45
51
  private __list;
@@ -55,6 +61,10 @@ export declare class SourceConnections {
55
61
  * BYOC (Bring Your Own Client) is detected when client_id and client_secret
56
62
  * are provided in OAuthBrowserAuthentication.
57
63
  *
64
+ * sync_immediately defaults:
65
+ * - True for: direct, oauth_token, auth_provider
66
+ * - False for: oauth_browser, oauth_byoc (these sync after authentication)
67
+ *
58
68
  * @param {AirweaveSDK.SourceConnectionCreate} request
59
69
  * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
60
70
  *
@@ -94,6 +104,26 @@ export declare class SourceConnections {
94
104
  */
95
105
  delete(sourceConnectionId: string, requestOptions?: SourceConnections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnection>;
96
106
  private __delete;
107
+ /**
108
+ * Update a source connection.
109
+ *
110
+ * Updateable fields:
111
+ * - name, description
112
+ * - config_fields
113
+ * - cron_schedule
114
+ * - auth_fields (direct auth only)
115
+ *
116
+ * @param {string} sourceConnectionId
117
+ * @param {AirweaveSDK.SourceConnectionUpdate} request
118
+ * @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
119
+ *
120
+ * @throws {@link AirweaveSDK.UnprocessableEntityError}
121
+ *
122
+ * @example
123
+ * await client.sourceConnections.update("source_connection_id")
124
+ */
125
+ update(sourceConnectionId: string, request?: AirweaveSDK.SourceConnectionUpdate, requestOptions?: SourceConnections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnection>;
126
+ private __update;
97
127
  /**
98
128
  * Trigger a sync run for a source connection.
99
129
  *
@@ -119,15 +149,18 @@ export declare class SourceConnections {
119
149
  * @throws {@link AirweaveSDK.UnprocessableEntityError}
120
150
  *
121
151
  * @example
122
- * await client.sourceConnections.getSourceConnectionJobs("source_connection_id")
152
+ * await client.sourceConnections.getSourceConnectionJobs("source_connection_id", {
153
+ * limit: 1
154
+ * })
123
155
  */
124
156
  getSourceConnectionJobs(sourceConnectionId: string, request?: AirweaveSDK.GetSourceConnectionJobsSourceConnectionsSourceConnectionIdJobsGetRequest, requestOptions?: SourceConnections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnectionJob[]>;
125
157
  private __getSourceConnectionJobs;
126
158
  /**
127
159
  * Cancel a running sync job for a source connection.
128
160
  *
129
- * This will update the job status in the database to CANCELLED and
130
- * send a cancellation request to the Temporal workflow if it's running.
161
+ * This endpoint requests cancellation and marks the job as CANCELLING.
162
+ * The workflow updates the final status to CANCELLED when it processes
163
+ * the cancellation request.
131
164
  *
132
165
  * @param {string} sourceConnectionId
133
166
  * @param {string} jobId
@@ -140,7 +173,5 @@ export declare class SourceConnections {
140
173
  */
141
174
  cancelJob(sourceConnectionId: string, jobId: string, requestOptions?: SourceConnections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnectionJob>;
142
175
  private __cancelJob;
143
- protected _getCustomAuthorizationHeaders(): Promise<{
144
- "x-api-key": string;
145
- }>;
176
+ protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>>;
146
177
  }