@airweave/sdk 0.4.17 → 0.4.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.
- package/README.md +8 -8
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/collections/client/Client.d.ts +23 -23
- package/dist/cjs/api/resources/collections/client/Client.js +30 -30
- package/dist/cjs/api/resources/collections/client/requests/{ListCollectionsCollectionsGetRequest.d.ts → ListCollectionsGetRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/collections/client/requests/{SearchCollectionCollectionsReadableIdSearchGetRequest.d.ts → SearchCollectionsReadableIdSearchGetRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/collections/client/requests/index.d.ts +2 -2
- package/dist/cjs/api/resources/sourceConnections/client/Client.d.ts +30 -30
- package/dist/cjs/api/resources/sourceConnections/client/Client.js +39 -39
- package/dist/{esm/api/resources/sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.d.mts → cjs/api/resources/sourceConnections/client/requests/BodyRunSourceConnectionsSourceConnectionIdRunPost.d.ts} +1 -1
- package/dist/cjs/api/resources/sourceConnections/client/requests/{GetSourceConnectionSourceConnectionsSourceConnectionIdGetRequest.d.ts → GetSourceConnectionsSourceConnectionIdGetRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/sourceConnections/client/requests/{ListSourceConnectionsSourceConnectionsGetRequest.d.ts → ListSourceConnectionsGetRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/sourceConnections/client/requests/index.d.ts +3 -3
- package/dist/cjs/api/resources/sources/client/Client.d.ts +6 -6
- package/dist/cjs/api/resources/sources/client/Client.js +8 -8
- 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 +23 -23
- package/dist/esm/api/resources/collections/client/Client.mjs +30 -30
- package/dist/esm/api/resources/collections/client/requests/{ListCollectionsCollectionsGetRequest.d.mts → ListCollectionsGetRequest.d.mts} +1 -1
- package/dist/esm/api/resources/collections/client/requests/{SearchCollectionCollectionsReadableIdSearchGetRequest.d.mts → SearchCollectionsReadableIdSearchGetRequest.d.mts} +1 -1
- package/dist/esm/api/resources/collections/client/requests/index.d.mts +2 -2
- package/dist/esm/api/resources/sourceConnections/client/Client.d.mts +30 -30
- package/dist/esm/api/resources/sourceConnections/client/Client.mjs +39 -39
- package/dist/{cjs/api/resources/sourceConnections/client/requests/BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.d.ts → esm/api/resources/sourceConnections/client/requests/BodyRunSourceConnectionsSourceConnectionIdRunPost.d.mts} +1 -1
- package/dist/esm/api/resources/sourceConnections/client/requests/{GetSourceConnectionSourceConnectionsSourceConnectionIdGetRequest.d.mts → GetSourceConnectionsSourceConnectionIdGetRequest.d.mts} +1 -1
- package/dist/esm/api/resources/sourceConnections/client/requests/{ListSourceConnectionsSourceConnectionsGetRequest.d.mts → ListSourceConnectionsGetRequest.d.mts} +1 -1
- package/dist/esm/api/resources/sourceConnections/client/requests/index.d.mts +3 -3
- package/dist/esm/api/resources/sources/client/Client.d.mts +6 -6
- package/dist/esm/api/resources/sources/client/Client.mjs +8 -8
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +41 -41
- /package/dist/cjs/api/resources/collections/client/requests/{ListCollectionsCollectionsGetRequest.js → ListCollectionsGetRequest.js} +0 -0
- /package/dist/cjs/api/resources/collections/client/requests/{SearchCollectionCollectionsReadableIdSearchGetRequest.js → SearchCollectionsReadableIdSearchGetRequest.js} +0 -0
- /package/dist/cjs/api/resources/sourceConnections/client/requests/{BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.js → BodyRunSourceConnectionsSourceConnectionIdRunPost.js} +0 -0
- /package/dist/cjs/api/resources/sourceConnections/client/requests/{GetSourceConnectionSourceConnectionsSourceConnectionIdGetRequest.js → GetSourceConnectionsSourceConnectionIdGetRequest.js} +0 -0
- /package/dist/cjs/api/resources/sourceConnections/client/requests/{ListSourceConnectionsSourceConnectionsGetRequest.js → ListSourceConnectionsGetRequest.js} +0 -0
- /package/dist/esm/api/resources/collections/client/requests/{ListCollectionsCollectionsGetRequest.mjs → ListCollectionsGetRequest.mjs} +0 -0
- /package/dist/esm/api/resources/collections/client/requests/{SearchCollectionCollectionsReadableIdSearchGetRequest.mjs → SearchCollectionsReadableIdSearchGetRequest.mjs} +0 -0
- /package/dist/esm/api/resources/sourceConnections/client/requests/{BodyRunSourceConnectionSourceConnectionsSourceConnectionIdRunPost.mjs → BodyRunSourceConnectionsSourceConnectionIdRunPost.mjs} +0 -0
- /package/dist/esm/api/resources/sourceConnections/client/requests/{GetSourceConnectionSourceConnectionsSourceConnectionIdGetRequest.mjs → GetSourceConnectionsSourceConnectionIdGetRequest.mjs} +0 -0
- /package/dist/esm/api/resources/sourceConnections/client/requests/{ListSourceConnectionsSourceConnectionsGetRequest.mjs → ListSourceConnectionsGetRequest.mjs} +0 -0
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ Instantiate and use the client with the following:
|
|
|
23
23
|
import { AirweaveSDKClient } from "@airweave/sdk";
|
|
24
24
|
|
|
25
25
|
const client = new AirweaveSDKClient({ apiKey: "YOUR_API_KEY" });
|
|
26
|
-
await client.collections.
|
|
26
|
+
await client.collections.create({
|
|
27
27
|
name: "Finance Data",
|
|
28
28
|
readable_id: "finance-data-reports",
|
|
29
29
|
});
|
|
@@ -37,7 +37,7 @@ following namespace:
|
|
|
37
37
|
```typescript
|
|
38
38
|
import { AirweaveSDK } from "@airweave/sdk";
|
|
39
39
|
|
|
40
|
-
const request: AirweaveSDK.
|
|
40
|
+
const request: AirweaveSDK.ListCollectionsGetRequest = {
|
|
41
41
|
...
|
|
42
42
|
};
|
|
43
43
|
```
|
|
@@ -51,7 +51,7 @@ will be thrown.
|
|
|
51
51
|
import { AirweaveSDKError } from "@airweave/sdk";
|
|
52
52
|
|
|
53
53
|
try {
|
|
54
|
-
await client.collections.
|
|
54
|
+
await client.collections.create(...);
|
|
55
55
|
} catch (err) {
|
|
56
56
|
if (err instanceof AirweaveSDKError) {
|
|
57
57
|
console.log(err.statusCode);
|
|
@@ -69,7 +69,7 @@ try {
|
|
|
69
69
|
If you would like to send additional headers as part of the request, use the `headers` request option.
|
|
70
70
|
|
|
71
71
|
```typescript
|
|
72
|
-
const response = await client.collections.
|
|
72
|
+
const response = await client.collections.create(..., {
|
|
73
73
|
headers: {
|
|
74
74
|
'X-Custom-Header': 'custom value'
|
|
75
75
|
}
|
|
@@ -91,7 +91,7 @@ A request is deemed retryable when any of the following HTTP status codes is ret
|
|
|
91
91
|
Use the `maxRetries` request option to configure this behavior.
|
|
92
92
|
|
|
93
93
|
```typescript
|
|
94
|
-
const response = await client.collections.
|
|
94
|
+
const response = await client.collections.create(..., {
|
|
95
95
|
maxRetries: 0 // override maxRetries at the request level
|
|
96
96
|
});
|
|
97
97
|
```
|
|
@@ -101,7 +101,7 @@ const response = await client.collections.createCollection(..., {
|
|
|
101
101
|
The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
|
|
102
102
|
|
|
103
103
|
```typescript
|
|
104
|
-
const response = await client.collections.
|
|
104
|
+
const response = await client.collections.create(..., {
|
|
105
105
|
timeoutInSeconds: 30 // override timeout to 30s
|
|
106
106
|
});
|
|
107
107
|
```
|
|
@@ -112,7 +112,7 @@ The SDK allows users to abort requests at any point by passing in an abort signa
|
|
|
112
112
|
|
|
113
113
|
```typescript
|
|
114
114
|
const controller = new AbortController();
|
|
115
|
-
const response = await client.collections.
|
|
115
|
+
const response = await client.collections.create(..., {
|
|
116
116
|
abortSignal: controller.signal
|
|
117
117
|
});
|
|
118
118
|
controller.abort(); // aborts the request
|
|
@@ -124,7 +124,7 @@ The SDK provides access to raw response data, including headers, through the `.w
|
|
|
124
124
|
The `.withRawResponse()` method returns a promise that results to an object with a `data` and a `rawResponse` property.
|
|
125
125
|
|
|
126
126
|
```typescript
|
|
127
|
-
const { data, rawResponse } = await client.collections.
|
|
127
|
+
const { data, rawResponse } = await client.collections.create(...).withRawResponse();
|
|
128
128
|
|
|
129
129
|
console.log(data);
|
|
130
130
|
console.log(rawResponse.headers['X-My-Header']);
|
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.4.
|
|
52
|
-
"User-Agent": "@airweave/sdk/v0.4.
|
|
51
|
+
"X-Fern-SDK-Version": "v0.4.18",
|
|
52
|
+
"User-Agent": "@airweave/sdk/v0.4.18",
|
|
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) });
|
|
@@ -33,16 +33,16 @@ export declare class Collections {
|
|
|
33
33
|
/**
|
|
34
34
|
* List all collections that belong to your organization.
|
|
35
35
|
*
|
|
36
|
-
* @param {AirweaveSDK.
|
|
36
|
+
* @param {AirweaveSDK.ListCollectionsGetRequest} request
|
|
37
37
|
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
38
|
*
|
|
39
39
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
40
40
|
*
|
|
41
41
|
* @example
|
|
42
|
-
* await client.collections.
|
|
42
|
+
* await client.collections.list()
|
|
43
43
|
*/
|
|
44
|
-
|
|
45
|
-
private
|
|
44
|
+
list(request?: AirweaveSDK.ListCollectionsGetRequest, requestOptions?: Collections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.Collection[]>;
|
|
45
|
+
private __list;
|
|
46
46
|
/**
|
|
47
47
|
* Create a new collection.
|
|
48
48
|
*
|
|
@@ -55,13 +55,13 @@ export declare class Collections {
|
|
|
55
55
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
56
56
|
*
|
|
57
57
|
* @example
|
|
58
|
-
* await client.collections.
|
|
58
|
+
* await client.collections.create({
|
|
59
59
|
* name: "Finance Data",
|
|
60
60
|
* readable_id: "finance-data-reports"
|
|
61
61
|
* })
|
|
62
62
|
*/
|
|
63
|
-
|
|
64
|
-
private
|
|
63
|
+
create(request: AirweaveSDK.CollectionCreate, requestOptions?: Collections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.Collection>;
|
|
64
|
+
private __create;
|
|
65
65
|
/**
|
|
66
66
|
* Retrieve a specific collection by its readable ID.
|
|
67
67
|
*
|
|
@@ -71,10 +71,10 @@ export declare class Collections {
|
|
|
71
71
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
72
72
|
*
|
|
73
73
|
* @example
|
|
74
|
-
* await client.collections.
|
|
74
|
+
* await client.collections.get("readable_id")
|
|
75
75
|
*/
|
|
76
|
-
|
|
77
|
-
private
|
|
76
|
+
get(readableId: string, requestOptions?: Collections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.Collection>;
|
|
77
|
+
private __get;
|
|
78
78
|
/**
|
|
79
79
|
* Update a collection's properties.
|
|
80
80
|
*
|
|
@@ -89,12 +89,12 @@ export declare class Collections {
|
|
|
89
89
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
90
90
|
*
|
|
91
91
|
* @example
|
|
92
|
-
* await client.collections.
|
|
92
|
+
* await client.collections.update("readable_id", {
|
|
93
93
|
* name: "Updated Finance Data"
|
|
94
94
|
* })
|
|
95
95
|
*/
|
|
96
|
-
|
|
97
|
-
private
|
|
96
|
+
update(readableId: string, request?: AirweaveSDK.CollectionUpdate, requestOptions?: Collections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.Collection>;
|
|
97
|
+
private __update;
|
|
98
98
|
/**
|
|
99
99
|
* Delete a collection and all associated data.
|
|
100
100
|
*
|
|
@@ -108,10 +108,10 @@ export declare class Collections {
|
|
|
108
108
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
109
109
|
*
|
|
110
110
|
* @example
|
|
111
|
-
* await client.collections.
|
|
111
|
+
* await client.collections.delete("readable_id")
|
|
112
112
|
*/
|
|
113
|
-
|
|
114
|
-
private
|
|
113
|
+
delete(readableId: string, requestOptions?: Collections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.Collection>;
|
|
114
|
+
private __delete;
|
|
115
115
|
/**
|
|
116
116
|
* Search across all data sources within the specified collection.
|
|
117
117
|
*
|
|
@@ -119,18 +119,18 @@ export declare class Collections {
|
|
|
119
119
|
* and options, use the POST /search endpoint.
|
|
120
120
|
*
|
|
121
121
|
* @param {string} readableId - The unique readable identifier of the collection to search
|
|
122
|
-
* @param {AirweaveSDK.
|
|
122
|
+
* @param {AirweaveSDK.SearchCollectionsReadableIdSearchGetRequest} request
|
|
123
123
|
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
124
124
|
*
|
|
125
125
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
126
126
|
*
|
|
127
127
|
* @example
|
|
128
|
-
* await client.collections.
|
|
128
|
+
* await client.collections.search("readable_id", {
|
|
129
129
|
* query: "customer payment issues"
|
|
130
130
|
* })
|
|
131
131
|
*/
|
|
132
|
-
|
|
133
|
-
private
|
|
132
|
+
search(readableId: string, request: AirweaveSDK.SearchCollectionsReadableIdSearchGetRequest, requestOptions?: Collections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SearchResponse>;
|
|
133
|
+
private __search;
|
|
134
134
|
/**
|
|
135
135
|
* Advanced search with comprehensive filtering and options.
|
|
136
136
|
*
|
|
@@ -160,7 +160,7 @@ export declare class Collections {
|
|
|
160
160
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
161
161
|
*
|
|
162
162
|
* @example
|
|
163
|
-
* await client.collections.
|
|
163
|
+
* await client.collections.searchAdvanced("readable_id", {
|
|
164
164
|
* query: "customer payment issues",
|
|
165
165
|
* filter: {
|
|
166
166
|
* must: {
|
|
@@ -172,8 +172,8 @@ export declare class Collections {
|
|
|
172
172
|
* response_type: "completion"
|
|
173
173
|
* })
|
|
174
174
|
*/
|
|
175
|
-
|
|
176
|
-
private
|
|
175
|
+
searchAdvanced(readableId: string, request: AirweaveSDK.SearchRequest, requestOptions?: Collections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SearchResponse>;
|
|
176
|
+
private __searchAdvanced;
|
|
177
177
|
/**
|
|
178
178
|
* Trigger data synchronization for all source connections in the collection.
|
|
179
179
|
*
|
|
@@ -61,18 +61,18 @@ class Collections {
|
|
|
61
61
|
/**
|
|
62
62
|
* List all collections that belong to your organization.
|
|
63
63
|
*
|
|
64
|
-
* @param {AirweaveSDK.
|
|
64
|
+
* @param {AirweaveSDK.ListCollectionsGetRequest} request
|
|
65
65
|
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
66
66
|
*
|
|
67
67
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
68
68
|
*
|
|
69
69
|
* @example
|
|
70
|
-
* await client.collections.
|
|
70
|
+
* await client.collections.list()
|
|
71
71
|
*/
|
|
72
|
-
|
|
73
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
72
|
+
list(request = {}, requestOptions) {
|
|
73
|
+
return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
|
|
74
74
|
}
|
|
75
|
-
|
|
75
|
+
__list() {
|
|
76
76
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
77
77
|
var _a, _b, _c;
|
|
78
78
|
const { skip, limit } = request;
|
|
@@ -136,15 +136,15 @@ class Collections {
|
|
|
136
136
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
137
137
|
*
|
|
138
138
|
* @example
|
|
139
|
-
* await client.collections.
|
|
139
|
+
* await client.collections.create({
|
|
140
140
|
* name: "Finance Data",
|
|
141
141
|
* readable_id: "finance-data-reports"
|
|
142
142
|
* })
|
|
143
143
|
*/
|
|
144
|
-
|
|
145
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
144
|
+
create(request, requestOptions) {
|
|
145
|
+
return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
|
|
146
146
|
}
|
|
147
|
-
|
|
147
|
+
__create(request, requestOptions) {
|
|
148
148
|
return __awaiter(this, void 0, void 0, function* () {
|
|
149
149
|
var _a, _b, _c;
|
|
150
150
|
const _response = yield core.fetcher({
|
|
@@ -199,12 +199,12 @@ class Collections {
|
|
|
199
199
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
200
200
|
*
|
|
201
201
|
* @example
|
|
202
|
-
* await client.collections.
|
|
202
|
+
* await client.collections.get("readable_id")
|
|
203
203
|
*/
|
|
204
|
-
|
|
205
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
204
|
+
get(readableId, requestOptions) {
|
|
205
|
+
return core.HttpResponsePromise.fromPromise(this.__get(readableId, requestOptions));
|
|
206
206
|
}
|
|
207
|
-
|
|
207
|
+
__get(readableId, requestOptions) {
|
|
208
208
|
return __awaiter(this, void 0, void 0, function* () {
|
|
209
209
|
var _a, _b, _c;
|
|
210
210
|
const _response = yield core.fetcher({
|
|
@@ -261,14 +261,14 @@ class Collections {
|
|
|
261
261
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
262
262
|
*
|
|
263
263
|
* @example
|
|
264
|
-
* await client.collections.
|
|
264
|
+
* await client.collections.update("readable_id", {
|
|
265
265
|
* name: "Updated Finance Data"
|
|
266
266
|
* })
|
|
267
267
|
*/
|
|
268
|
-
|
|
269
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
268
|
+
update(readableId, request = {}, requestOptions) {
|
|
269
|
+
return core.HttpResponsePromise.fromPromise(this.__update(readableId, request, requestOptions));
|
|
270
270
|
}
|
|
271
|
-
|
|
271
|
+
__update(readableId_1) {
|
|
272
272
|
return __awaiter(this, arguments, void 0, function* (readableId, request = {}, requestOptions) {
|
|
273
273
|
var _a, _b, _c;
|
|
274
274
|
const _response = yield core.fetcher({
|
|
@@ -327,12 +327,12 @@ class Collections {
|
|
|
327
327
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
328
328
|
*
|
|
329
329
|
* @example
|
|
330
|
-
* await client.collections.
|
|
330
|
+
* await client.collections.delete("readable_id")
|
|
331
331
|
*/
|
|
332
|
-
|
|
333
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
332
|
+
delete(readableId, requestOptions) {
|
|
333
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(readableId, requestOptions));
|
|
334
334
|
}
|
|
335
|
-
|
|
335
|
+
__delete(readableId, requestOptions) {
|
|
336
336
|
return __awaiter(this, void 0, void 0, function* () {
|
|
337
337
|
var _a, _b, _c;
|
|
338
338
|
const _response = yield core.fetcher({
|
|
@@ -382,20 +382,20 @@ class Collections {
|
|
|
382
382
|
* and options, use the POST /search endpoint.
|
|
383
383
|
*
|
|
384
384
|
* @param {string} readableId - The unique readable identifier of the collection to search
|
|
385
|
-
* @param {AirweaveSDK.
|
|
385
|
+
* @param {AirweaveSDK.SearchCollectionsReadableIdSearchGetRequest} request
|
|
386
386
|
* @param {Collections.RequestOptions} requestOptions - Request-specific configuration.
|
|
387
387
|
*
|
|
388
388
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
389
389
|
*
|
|
390
390
|
* @example
|
|
391
|
-
* await client.collections.
|
|
391
|
+
* await client.collections.search("readable_id", {
|
|
392
392
|
* query: "customer payment issues"
|
|
393
393
|
* })
|
|
394
394
|
*/
|
|
395
|
-
|
|
396
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
395
|
+
search(readableId, request, requestOptions) {
|
|
396
|
+
return core.HttpResponsePromise.fromPromise(this.__search(readableId, request, requestOptions));
|
|
397
397
|
}
|
|
398
|
-
|
|
398
|
+
__search(readableId, request, requestOptions) {
|
|
399
399
|
return __awaiter(this, void 0, void 0, function* () {
|
|
400
400
|
var _a, _b, _c;
|
|
401
401
|
const { query, response_type: responseType, limit, offset, recency_bias: recencyBias } = request;
|
|
@@ -483,7 +483,7 @@ class Collections {
|
|
|
483
483
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
484
484
|
*
|
|
485
485
|
* @example
|
|
486
|
-
* await client.collections.
|
|
486
|
+
* await client.collections.searchAdvanced("readable_id", {
|
|
487
487
|
* query: "customer payment issues",
|
|
488
488
|
* filter: {
|
|
489
489
|
* must: {
|
|
@@ -495,10 +495,10 @@ class Collections {
|
|
|
495
495
|
* response_type: "completion"
|
|
496
496
|
* })
|
|
497
497
|
*/
|
|
498
|
-
|
|
499
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
498
|
+
searchAdvanced(readableId, request, requestOptions) {
|
|
499
|
+
return core.HttpResponsePromise.fromPromise(this.__searchAdvanced(readableId, request, requestOptions));
|
|
500
500
|
}
|
|
501
|
-
|
|
501
|
+
__searchAdvanced(readableId, request, requestOptions) {
|
|
502
502
|
return __awaiter(this, void 0, void 0, function* () {
|
|
503
503
|
var _a, _b, _c;
|
|
504
504
|
const _response = yield core.fetcher({
|
|
@@ -8,7 +8,7 @@ import * as AirweaveSDK from "../../../../index.js";
|
|
|
8
8
|
* query: "customer payment issues"
|
|
9
9
|
* }
|
|
10
10
|
*/
|
|
11
|
-
export interface
|
|
11
|
+
export interface SearchCollectionsReadableIdSearchGetRequest {
|
|
12
12
|
/**
|
|
13
13
|
* The search query text to find relevant documents and data
|
|
14
14
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { type
|
|
1
|
+
export { type ListCollectionsGetRequest } from "./ListCollectionsGetRequest.js";
|
|
2
2
|
export { type CollectionCreate } from "./CollectionCreate.js";
|
|
3
3
|
export { type CollectionUpdate } from "./CollectionUpdate.js";
|
|
4
|
-
export { type
|
|
4
|
+
export { type SearchCollectionsReadableIdSearchGetRequest } from "./SearchCollectionsReadableIdSearchGetRequest.js";
|
|
5
5
|
export { type SearchRequest } from "./SearchRequest.js";
|
|
@@ -38,16 +38,16 @@ export declare class SourceConnections {
|
|
|
38
38
|
* collection. This is useful for getting an overview of all your data sources
|
|
39
39
|
* or managing connections within a particular collection.
|
|
40
40
|
*
|
|
41
|
-
* @param {AirweaveSDK.
|
|
41
|
+
* @param {AirweaveSDK.ListSourceConnectionsGetRequest} request
|
|
42
42
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
43
43
|
*
|
|
44
44
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
45
45
|
*
|
|
46
46
|
* @example
|
|
47
|
-
* await client.sourceConnections.
|
|
47
|
+
* await client.sourceConnections.list()
|
|
48
48
|
*/
|
|
49
|
-
|
|
50
|
-
private
|
|
49
|
+
list(request?: AirweaveSDK.ListSourceConnectionsGetRequest, requestOptions?: SourceConnections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnectionListItem[]>;
|
|
50
|
+
private __list;
|
|
51
51
|
/**
|
|
52
52
|
* Create a new source connection to sync data into your collection.
|
|
53
53
|
*
|
|
@@ -70,27 +70,27 @@ export declare class SourceConnections {
|
|
|
70
70
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
71
71
|
*
|
|
72
72
|
* @example
|
|
73
|
-
* await client.sourceConnections.
|
|
73
|
+
* await client.sourceConnections.create({
|
|
74
74
|
* name: "Production Stripe Account",
|
|
75
75
|
* short_name: "stripe"
|
|
76
76
|
* })
|
|
77
77
|
*/
|
|
78
|
-
|
|
79
|
-
private
|
|
78
|
+
create(request: AirweaveSDK.SourceConnectionCreate, requestOptions?: SourceConnections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnection>;
|
|
79
|
+
private __create;
|
|
80
80
|
/**
|
|
81
81
|
* Retrieve a specific source connection by its ID.
|
|
82
82
|
*
|
|
83
83
|
* @param {string} sourceConnectionId - The unique identifier of the source connection
|
|
84
|
-
* @param {AirweaveSDK.
|
|
84
|
+
* @param {AirweaveSDK.GetSourceConnectionsSourceConnectionIdGetRequest} request
|
|
85
85
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
86
86
|
*
|
|
87
87
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
88
88
|
*
|
|
89
89
|
* @example
|
|
90
|
-
* await client.sourceConnections.
|
|
90
|
+
* await client.sourceConnections.get("source_connection_id")
|
|
91
91
|
*/
|
|
92
|
-
|
|
93
|
-
private
|
|
92
|
+
get(sourceConnectionId: string, request?: AirweaveSDK.GetSourceConnectionsSourceConnectionIdGetRequest, requestOptions?: SourceConnections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnection>;
|
|
93
|
+
private __get;
|
|
94
94
|
/**
|
|
95
95
|
* Update a source connection's properties.
|
|
96
96
|
*
|
|
@@ -104,10 +104,10 @@ export declare class SourceConnections {
|
|
|
104
104
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
105
105
|
*
|
|
106
106
|
* @example
|
|
107
|
-
* await client.sourceConnections.
|
|
107
|
+
* await client.sourceConnections.update("source_connection_id")
|
|
108
108
|
*/
|
|
109
|
-
|
|
110
|
-
private
|
|
109
|
+
update(sourceConnectionId: string, request?: AirweaveSDK.SourceConnectionUpdate, requestOptions?: SourceConnections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnection>;
|
|
110
|
+
private __update;
|
|
111
111
|
/**
|
|
112
112
|
* Delete a source connection and all associated data.
|
|
113
113
|
*
|
|
@@ -121,10 +121,10 @@ export declare class SourceConnections {
|
|
|
121
121
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
122
122
|
*
|
|
123
123
|
* @example
|
|
124
|
-
* await client.sourceConnections.
|
|
124
|
+
* await client.sourceConnections.delete("source_connection_id")
|
|
125
125
|
*/
|
|
126
|
-
|
|
127
|
-
private
|
|
126
|
+
delete(sourceConnectionId: string, requestOptions?: SourceConnections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnection>;
|
|
127
|
+
private __delete;
|
|
128
128
|
/**
|
|
129
129
|
* Manually trigger a data sync for this source connection.
|
|
130
130
|
*
|
|
@@ -133,16 +133,16 @@ export declare class SourceConnections {
|
|
|
133
133
|
* The job runs asynchronously and endpoint returns immediately with tracking information.
|
|
134
134
|
*
|
|
135
135
|
* @param {string} sourceConnectionId - The unique identifier of the source connection to sync
|
|
136
|
-
* @param {AirweaveSDK.
|
|
136
|
+
* @param {AirweaveSDK.BodyRunSourceConnectionsSourceConnectionIdRunPost} request
|
|
137
137
|
* @param {SourceConnections.RequestOptions} requestOptions - Request-specific configuration.
|
|
138
138
|
*
|
|
139
139
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
140
140
|
*
|
|
141
141
|
* @example
|
|
142
|
-
* await client.sourceConnections.
|
|
142
|
+
* await client.sourceConnections.run("source_connection_id")
|
|
143
143
|
*/
|
|
144
|
-
|
|
145
|
-
private
|
|
144
|
+
run(sourceConnectionId: string, request?: AirweaveSDK.BodyRunSourceConnectionsSourceConnectionIdRunPost, requestOptions?: SourceConnections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnectionJob>;
|
|
145
|
+
private __run;
|
|
146
146
|
/**
|
|
147
147
|
* List all sync jobs for a source connection.
|
|
148
148
|
*
|
|
@@ -155,10 +155,10 @@ export declare class SourceConnections {
|
|
|
155
155
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
156
156
|
*
|
|
157
157
|
* @example
|
|
158
|
-
* await client.sourceConnections.
|
|
158
|
+
* await client.sourceConnections.listJobs("source_connection_id")
|
|
159
159
|
*/
|
|
160
|
-
|
|
161
|
-
private
|
|
160
|
+
listJobs(sourceConnectionId: string, requestOptions?: SourceConnections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnectionJob[]>;
|
|
161
|
+
private __listJobs;
|
|
162
162
|
/**
|
|
163
163
|
* Get detailed information about a specific sync job.
|
|
164
164
|
*
|
|
@@ -169,10 +169,10 @@ export declare class SourceConnections {
|
|
|
169
169
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
170
170
|
*
|
|
171
171
|
* @example
|
|
172
|
-
* await client.sourceConnections.
|
|
172
|
+
* await client.sourceConnections.getJob("source_connection_id", "job_id")
|
|
173
173
|
*/
|
|
174
|
-
|
|
175
|
-
private
|
|
174
|
+
getJob(sourceConnectionId: string, jobId: string, requestOptions?: SourceConnections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnectionJob>;
|
|
175
|
+
private __getJob;
|
|
176
176
|
/**
|
|
177
177
|
* Cancel a running sync job.
|
|
178
178
|
*
|
|
@@ -187,10 +187,10 @@ export declare class SourceConnections {
|
|
|
187
187
|
* @throws {@link AirweaveSDK.UnprocessableEntityError}
|
|
188
188
|
*
|
|
189
189
|
* @example
|
|
190
|
-
* await client.sourceConnections.
|
|
190
|
+
* await client.sourceConnections.cancelJob("source_connection_id", "job_id")
|
|
191
191
|
*/
|
|
192
|
-
|
|
193
|
-
private
|
|
192
|
+
cancelJob(sourceConnectionId: string, jobId: string, requestOptions?: SourceConnections.RequestOptions): core.HttpResponsePromise<AirweaveSDK.SourceConnectionJob>;
|
|
193
|
+
private __cancelJob;
|
|
194
194
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
195
195
|
"x-api-key": string;
|
|
196
196
|
}>;
|