@athenaintel/sdk 4.3.2202 → 4.3.2203
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 +3 -3
- package/dist/cjs/BaseClient.d.ts +4 -0
- package/dist/cjs/BaseClient.js +3 -2
- package/dist/cjs/api/resources/agents/resources/general/client/Client.js +18 -14
- package/dist/cjs/api/resources/aop/client/Client.js +64 -49
- package/dist/cjs/api/resources/assets/client/Client.js +144 -112
- package/dist/cjs/api/resources/collabAgents/client/Client.js +9 -7
- package/dist/cjs/api/resources/computer/client/Client.js +63 -49
- package/dist/cjs/api/resources/databases/client/Client.js +72 -56
- package/dist/cjs/api/resources/meetings/client/Client.js +27 -21
- package/dist/cjs/api/resources/query/client/Client.js +9 -7
- package/dist/cjs/api/resources/semanticModel/client/Client.js +27 -21
- package/dist/cjs/api/resources/sessions/client/Client.js +45 -35
- package/dist/cjs/api/resources/threads/client/Client.js +45 -35
- package/dist/cjs/api/resources/tools/client/Client.js +79 -63
- package/dist/cjs/api/resources/tools/resources/calendar/client/Client.js +9 -7
- package/dist/cjs/api/resources/tools/resources/email/client/Client.js +18 -14
- package/dist/cjs/api/resources/tools/resources/sheets/client/Client.js +153 -119
- package/dist/cjs/api/resources/tools/resources/structuredDataExtractor/client/Client.js +9 -7
- package/dist/cjs/api/resources/tools/resources/tasks/client/Client.js +9 -7
- package/dist/cjs/api/resources/users/client/Client.js +45 -35
- package/dist/cjs/api/resources/workspaces/client/Client.js +63 -49
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +4 -0
- package/dist/esm/BaseClient.mjs +3 -2
- package/dist/esm/api/resources/agents/resources/general/client/Client.mjs +19 -15
- package/dist/esm/api/resources/aop/client/Client.mjs +64 -49
- package/dist/esm/api/resources/assets/client/Client.mjs +145 -113
- package/dist/esm/api/resources/collabAgents/client/Client.mjs +10 -8
- package/dist/esm/api/resources/computer/client/Client.mjs +64 -50
- package/dist/esm/api/resources/databases/client/Client.mjs +73 -57
- package/dist/esm/api/resources/meetings/client/Client.mjs +28 -22
- package/dist/esm/api/resources/query/client/Client.mjs +10 -8
- package/dist/esm/api/resources/semanticModel/client/Client.mjs +28 -22
- package/dist/esm/api/resources/sessions/client/Client.mjs +46 -36
- package/dist/esm/api/resources/threads/client/Client.mjs +46 -36
- package/dist/esm/api/resources/tools/client/Client.mjs +79 -63
- package/dist/esm/api/resources/tools/resources/calendar/client/Client.mjs +10 -8
- package/dist/esm/api/resources/tools/resources/email/client/Client.mjs +19 -15
- package/dist/esm/api/resources/tools/resources/sheets/client/Client.mjs +154 -120
- package/dist/esm/api/resources/tools/resources/structuredDataExtractor/client/Client.mjs +10 -8
- package/dist/esm/api/resources/tools/resources/tasks/client/Client.mjs +10 -8
- package/dist/esm/api/resources/users/client/Client.mjs +46 -36
- package/dist/esm/api/resources/workspaces/client/Client.mjs +64 -50
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
12
|
-
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
12
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
13
13
|
import * as core from "../../../../core/index.mjs";
|
|
14
14
|
import * as environments from "../../../../environments.mjs";
|
|
15
15
|
import * as errors from "../../../../errors/index.mjs";
|
|
@@ -38,21 +38,23 @@ export class ThreadsClient {
|
|
|
38
38
|
}
|
|
39
39
|
__batchStopByAssetId(request, requestOptions) {
|
|
40
40
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
41
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
42
42
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
43
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
44
|
+
"X-Athena-Session-Credential": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.sessionCredential) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.sessionCredential,
|
|
45
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
46
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
47
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.AthenaIntelligenceEnvironment.Production, "api/v0/threads/batch-stop"),
|
|
46
48
|
method: "POST",
|
|
47
49
|
headers: _headers,
|
|
48
50
|
contentType: "application/json",
|
|
49
51
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
50
52
|
requestType: "json",
|
|
51
53
|
body: request,
|
|
52
|
-
timeoutMs: ((
|
|
53
|
-
maxRetries: (
|
|
54
|
+
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
55
|
+
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
54
56
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
55
|
-
fetchFn: (
|
|
57
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
56
58
|
logging: this._options.logging,
|
|
57
59
|
});
|
|
58
60
|
if (_response.ok) {
|
|
@@ -119,21 +121,23 @@ export class ThreadsClient {
|
|
|
119
121
|
}
|
|
120
122
|
__getStatusBatch(request, requestOptions) {
|
|
121
123
|
return __awaiter(this, void 0, void 0, function* () {
|
|
122
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
124
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
123
125
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
124
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
125
|
-
|
|
126
|
-
|
|
126
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
127
|
+
"X-Athena-Session-Credential": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.sessionCredential) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.sessionCredential,
|
|
128
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
129
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
130
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.AthenaIntelligenceEnvironment.Production, "api/v0/threads/status-batch"),
|
|
127
131
|
method: "POST",
|
|
128
132
|
headers: _headers,
|
|
129
133
|
contentType: "application/json",
|
|
130
134
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
131
135
|
requestType: "json",
|
|
132
136
|
body: request,
|
|
133
|
-
timeoutMs: ((
|
|
134
|
-
maxRetries: (
|
|
137
|
+
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
138
|
+
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
135
139
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
136
|
-
fetchFn: (
|
|
140
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
137
141
|
logging: this._options.logging,
|
|
138
142
|
});
|
|
139
143
|
if (_response.ok) {
|
|
@@ -200,21 +204,23 @@ export class ThreadsClient {
|
|
|
200
204
|
}
|
|
201
205
|
__batchStop(request, requestOptions) {
|
|
202
206
|
return __awaiter(this, void 0, void 0, function* () {
|
|
203
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
207
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
204
208
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
205
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
206
|
-
|
|
207
|
-
|
|
209
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
210
|
+
"X-Athena-Session-Credential": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.sessionCredential) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.sessionCredential,
|
|
211
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
212
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
213
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.AthenaIntelligenceEnvironment.Production, "api/v0/threads/stop"),
|
|
208
214
|
method: "POST",
|
|
209
215
|
headers: _headers,
|
|
210
216
|
contentType: "application/json",
|
|
211
217
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
212
218
|
requestType: "json",
|
|
213
219
|
body: request,
|
|
214
|
-
timeoutMs: ((
|
|
215
|
-
maxRetries: (
|
|
220
|
+
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
221
|
+
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
216
222
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
217
|
-
fetchFn: (
|
|
223
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
218
224
|
logging: this._options.logging,
|
|
219
225
|
});
|
|
220
226
|
if (_response.ok) {
|
|
@@ -282,23 +288,25 @@ export class ThreadsClient {
|
|
|
282
288
|
}
|
|
283
289
|
__getStatus(request, requestOptions) {
|
|
284
290
|
return __awaiter(this, void 0, void 0, function* () {
|
|
285
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
291
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
286
292
|
const { thread_id: threadId, include_messages: includeMessages } = request;
|
|
287
293
|
const _queryParams = {};
|
|
288
294
|
if (includeMessages !== undefined) {
|
|
289
295
|
_queryParams.include_messages = (_a = includeMessages === null || includeMessages === void 0 ? void 0 : includeMessages.toString()) !== null && _a !== void 0 ? _a : null;
|
|
290
296
|
}
|
|
291
297
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
292
|
-
const _headers = mergeHeaders(_authRequest.headers, (_b = this._options) === null || _b === void 0 ? void 0 : _b.headers,
|
|
293
|
-
|
|
294
|
-
|
|
298
|
+
const _headers = mergeHeaders(_authRequest.headers, (_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, mergeOnlyDefinedHeaders({
|
|
299
|
+
"X-Athena-Session-Credential": (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.sessionCredential) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.sessionCredential,
|
|
300
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
301
|
+
const _response = yield ((_e = this._options.fetcher) !== null && _e !== void 0 ? _e : core.fetcher)({
|
|
302
|
+
url: core.url.join((_g = (_f = (yield core.Supplier.get(this._options.baseUrl))) !== null && _f !== void 0 ? _f : (yield core.Supplier.get(this._options.environment))) !== null && _g !== void 0 ? _g : environments.AthenaIntelligenceEnvironment.Production, `api/v0/threads/${core.url.encodePathParam(threadId)}/status`),
|
|
295
303
|
method: "GET",
|
|
296
304
|
headers: _headers,
|
|
297
305
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
298
|
-
timeoutMs: ((
|
|
299
|
-
maxRetries: (
|
|
306
|
+
timeoutMs: ((_k = (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.timeoutInSeconds) !== null && _k !== void 0 ? _k : 60) * 1000,
|
|
307
|
+
maxRetries: (_l = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _l !== void 0 ? _l : (_m = this._options) === null || _m === void 0 ? void 0 : _m.maxRetries,
|
|
300
308
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
301
|
-
fetchFn: (
|
|
309
|
+
fetchFn: (_o = this._options) === null || _o === void 0 ? void 0 : _o.fetch,
|
|
302
310
|
logging: this._options.logging,
|
|
303
311
|
});
|
|
304
312
|
if (_response.ok) {
|
|
@@ -371,19 +379,21 @@ export class ThreadsClient {
|
|
|
371
379
|
}
|
|
372
380
|
__stop(request, requestOptions) {
|
|
373
381
|
return __awaiter(this, void 0, void 0, function* () {
|
|
374
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
382
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
375
383
|
const { thread_id: threadId } = request;
|
|
376
384
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
377
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
378
|
-
|
|
379
|
-
|
|
385
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
386
|
+
"X-Athena-Session-Credential": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.sessionCredential) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.sessionCredential,
|
|
387
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
388
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
389
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.AthenaIntelligenceEnvironment.Production, `api/v0/threads/${core.url.encodePathParam(threadId)}/stop`),
|
|
380
390
|
method: "POST",
|
|
381
391
|
headers: _headers,
|
|
382
392
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
383
|
-
timeoutMs: ((
|
|
384
|
-
maxRetries: (
|
|
393
|
+
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
394
|
+
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
385
395
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
386
|
-
fetchFn: (
|
|
396
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
387
397
|
logging: this._options.logging,
|
|
388
398
|
});
|
|
389
399
|
if (_response.ok) {
|
|
@@ -57,18 +57,20 @@ export class ToolsClient {
|
|
|
57
57
|
}
|
|
58
58
|
__getAssetCapabilities(requestOptions) {
|
|
59
59
|
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
60
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
61
61
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
62
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
63
|
+
"X-Athena-Session-Credential": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.sessionCredential) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.sessionCredential,
|
|
64
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
65
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
66
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/asset/capabilities"),
|
|
65
67
|
method: "GET",
|
|
66
68
|
headers: _headers,
|
|
67
69
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
68
|
-
timeoutMs: ((
|
|
69
|
-
maxRetries: (
|
|
70
|
+
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
71
|
+
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
70
72
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
71
|
-
fetchFn: (
|
|
73
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
72
74
|
logging: this._options.logging,
|
|
73
75
|
});
|
|
74
76
|
if (_response.ok) {
|
|
@@ -126,21 +128,23 @@ export class ToolsClient {
|
|
|
126
128
|
}
|
|
127
129
|
__getAssetChunks(request, requestOptions) {
|
|
128
130
|
return __awaiter(this, void 0, void 0, function* () {
|
|
129
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
131
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
130
132
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
131
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
132
|
-
|
|
133
|
-
|
|
133
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
134
|
+
"X-Athena-Session-Credential": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.sessionCredential) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.sessionCredential,
|
|
135
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
136
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
137
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/asset/chunks"),
|
|
134
138
|
method: "POST",
|
|
135
139
|
headers: _headers,
|
|
136
140
|
contentType: "application/json",
|
|
137
141
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
138
142
|
requestType: "json",
|
|
139
143
|
body: request,
|
|
140
|
-
timeoutMs: ((
|
|
141
|
-
maxRetries: (
|
|
144
|
+
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
145
|
+
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
142
146
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
143
|
-
fetchFn: (
|
|
147
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
144
148
|
logging: this._options.logging,
|
|
145
149
|
});
|
|
146
150
|
if (_response.ok) {
|
|
@@ -204,7 +208,7 @@ export class ToolsClient {
|
|
|
204
208
|
}
|
|
205
209
|
__getAssetContent(request, requestOptions) {
|
|
206
210
|
return __awaiter(this, void 0, void 0, function* () {
|
|
207
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
211
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
208
212
|
const { asset_id: assetId, include_comments: includeComments } = request;
|
|
209
213
|
const _queryParams = {};
|
|
210
214
|
_queryParams.asset_id = assetId;
|
|
@@ -212,16 +216,18 @@ export class ToolsClient {
|
|
|
212
216
|
_queryParams.include_comments = includeComments.toString();
|
|
213
217
|
}
|
|
214
218
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
215
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
216
|
-
|
|
217
|
-
|
|
219
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
220
|
+
"X-Athena-Session-Credential": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.sessionCredential) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.sessionCredential,
|
|
221
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
222
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
223
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/asset/content"),
|
|
218
224
|
method: "GET",
|
|
219
225
|
headers: _headers,
|
|
220
226
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
221
|
-
timeoutMs: ((
|
|
222
|
-
maxRetries: (
|
|
227
|
+
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
228
|
+
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
223
229
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
224
|
-
fetchFn: (
|
|
230
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
225
231
|
logging: this._options.logging,
|
|
226
232
|
});
|
|
227
233
|
if (_response.ok) {
|
|
@@ -287,21 +293,23 @@ export class ToolsClient {
|
|
|
287
293
|
}
|
|
288
294
|
__readAsset(request, requestOptions) {
|
|
289
295
|
return __awaiter(this, void 0, void 0, function* () {
|
|
290
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
296
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
291
297
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
292
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
293
|
-
|
|
294
|
-
|
|
298
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
299
|
+
"X-Athena-Session-Credential": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.sessionCredential) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.sessionCredential,
|
|
300
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
301
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
302
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/asset/read"),
|
|
295
303
|
method: "POST",
|
|
296
304
|
headers: _headers,
|
|
297
305
|
contentType: "application/json",
|
|
298
306
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
299
307
|
requestType: "json",
|
|
300
308
|
body: request,
|
|
301
|
-
timeoutMs: ((
|
|
302
|
-
maxRetries: (
|
|
309
|
+
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
310
|
+
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
303
311
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
304
|
-
fetchFn: (
|
|
312
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
305
313
|
logging: this._options.logging,
|
|
306
314
|
});
|
|
307
315
|
if (_response.ok) {
|
|
@@ -367,7 +375,7 @@ export class ToolsClient {
|
|
|
367
375
|
}
|
|
368
376
|
__getAssetScreenshot(request, requestOptions) {
|
|
369
377
|
return __awaiter(this, void 0, void 0, function* () {
|
|
370
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
378
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
371
379
|
const { asset_id: assetId, page_number: pageNumber } = request;
|
|
372
380
|
const _queryParams = {};
|
|
373
381
|
_queryParams.asset_id = assetId;
|
|
@@ -375,16 +383,18 @@ export class ToolsClient {
|
|
|
375
383
|
_queryParams.page_number = pageNumber.toString();
|
|
376
384
|
}
|
|
377
385
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
378
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
379
|
-
|
|
380
|
-
|
|
386
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
387
|
+
"X-Athena-Session-Credential": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.sessionCredential) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.sessionCredential,
|
|
388
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
389
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
390
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/asset/screenshot"),
|
|
381
391
|
method: "GET",
|
|
382
392
|
headers: _headers,
|
|
383
393
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
384
|
-
timeoutMs: ((
|
|
385
|
-
maxRetries: (
|
|
394
|
+
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
395
|
+
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
386
396
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
387
|
-
fetchFn: (
|
|
397
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
388
398
|
logging: this._options.logging,
|
|
389
399
|
});
|
|
390
400
|
if (_response.ok) {
|
|
@@ -452,7 +462,7 @@ export class ToolsClient {
|
|
|
452
462
|
}
|
|
453
463
|
__listContents() {
|
|
454
464
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
455
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
465
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
456
466
|
const { asset_id: assetId, include_asset_details: includeAssetDetails, include_system_files: includeSystemFiles, } = request;
|
|
457
467
|
const _queryParams = {};
|
|
458
468
|
if (assetId !== undefined) {
|
|
@@ -465,16 +475,18 @@ export class ToolsClient {
|
|
|
465
475
|
_queryParams.include_system_files = includeSystemFiles.toString();
|
|
466
476
|
}
|
|
467
477
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
468
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
469
|
-
|
|
470
|
-
|
|
478
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
479
|
+
"X-Athena-Session-Credential": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.sessionCredential) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.sessionCredential,
|
|
480
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
481
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
482
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/contents"),
|
|
471
483
|
method: "GET",
|
|
472
484
|
headers: _headers,
|
|
473
485
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
474
|
-
timeoutMs: ((
|
|
475
|
-
maxRetries: (
|
|
486
|
+
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
487
|
+
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
476
488
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
477
|
-
fetchFn: (
|
|
489
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
478
490
|
logging: this._options.logging,
|
|
479
491
|
});
|
|
480
492
|
if (_response.ok) {
|
|
@@ -551,7 +563,7 @@ export class ToolsClient {
|
|
|
551
563
|
}
|
|
552
564
|
__dataFrame(request, requestOptions) {
|
|
553
565
|
return __awaiter(this, void 0, void 0, function* () {
|
|
554
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
566
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
555
567
|
const { asset_id: assetId, row_limit: rowLimit, index_column: indexColumn, columns, sheet_name: sheetName, separator, } = request;
|
|
556
568
|
const _queryParams = {};
|
|
557
569
|
_queryParams.asset_id = assetId;
|
|
@@ -571,16 +583,18 @@ export class ToolsClient {
|
|
|
571
583
|
_queryParams.separator = separator;
|
|
572
584
|
}
|
|
573
585
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
574
|
-
const _headers = mergeHeaders(_authRequest.headers, (_c = this._options) === null || _c === void 0 ? void 0 : _c.headers,
|
|
575
|
-
|
|
576
|
-
|
|
586
|
+
const _headers = mergeHeaders(_authRequest.headers, (_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, mergeOnlyDefinedHeaders({
|
|
587
|
+
"X-Athena-Session-Credential": (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.sessionCredential) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.sessionCredential,
|
|
588
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
589
|
+
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
590
|
+
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/file/data-frame"),
|
|
577
591
|
method: "GET",
|
|
578
592
|
headers: _headers,
|
|
579
593
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
580
|
-
timeoutMs: ((
|
|
581
|
-
maxRetries: (
|
|
594
|
+
timeoutMs: ((_l = (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.timeoutInSeconds) !== null && _l !== void 0 ? _l : 60) * 1000,
|
|
595
|
+
maxRetries: (_m = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _m !== void 0 ? _m : (_o = this._options) === null || _o === void 0 ? void 0 : _o.maxRetries,
|
|
582
596
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
583
|
-
fetchFn: (
|
|
597
|
+
fetchFn: (_p = this._options) === null || _p === void 0 ? void 0 : _p.fetch,
|
|
584
598
|
logging: this._options.logging,
|
|
585
599
|
});
|
|
586
600
|
if (_response.ok) {
|
|
@@ -643,22 +657,24 @@ export class ToolsClient {
|
|
|
643
657
|
}
|
|
644
658
|
__rawData(request, requestOptions) {
|
|
645
659
|
return __awaiter(this, void 0, void 0, function* () {
|
|
646
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
660
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
647
661
|
const { asset_id: assetId } = request;
|
|
648
662
|
const _queryParams = {};
|
|
649
663
|
_queryParams.asset_id = assetId;
|
|
650
664
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
651
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
652
|
-
|
|
653
|
-
|
|
665
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
666
|
+
"X-Athena-Session-Credential": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.sessionCredential) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.sessionCredential,
|
|
667
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
668
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
669
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/file/raw-data"),
|
|
654
670
|
method: "GET",
|
|
655
671
|
headers: _headers,
|
|
656
672
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
657
673
|
responseType: "binary-response",
|
|
658
|
-
timeoutMs: ((
|
|
659
|
-
maxRetries: (
|
|
674
|
+
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
675
|
+
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
660
676
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
661
|
-
fetchFn: (
|
|
677
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
662
678
|
logging: this._options.logging,
|
|
663
679
|
});
|
|
664
680
|
if (_response.ok) {
|
|
@@ -726,7 +742,7 @@ export class ToolsClient {
|
|
|
726
742
|
}
|
|
727
743
|
__saveAsset(request, requestOptions) {
|
|
728
744
|
return __awaiter(this, void 0, void 0, function* () {
|
|
729
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
745
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
730
746
|
const _queryParams = {};
|
|
731
747
|
if (request.parent_folder_id !== undefined) {
|
|
732
748
|
_queryParams.parent_folder_id = request.parent_folder_id;
|
|
@@ -738,19 +754,19 @@ export class ToolsClient {
|
|
|
738
754
|
yield _request.appendFile("file", request.file);
|
|
739
755
|
const _maybeEncodedRequest = yield _request.getRequest();
|
|
740
756
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
741
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
742
|
-
const _response = yield ((
|
|
743
|
-
url: core.url.join((
|
|
757
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({ "X-Athena-Session-Credential": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.sessionCredential) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.sessionCredential }, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
758
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
759
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/file/save"),
|
|
744
760
|
method: "POST",
|
|
745
761
|
headers: _headers,
|
|
746
762
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
747
763
|
requestType: "file",
|
|
748
764
|
duplex: _maybeEncodedRequest.duplex,
|
|
749
765
|
body: _maybeEncodedRequest.body,
|
|
750
|
-
timeoutMs: ((
|
|
751
|
-
maxRetries: (
|
|
766
|
+
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
767
|
+
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
752
768
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
753
|
-
fetchFn: (
|
|
769
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
754
770
|
logging: this._options.logging,
|
|
755
771
|
});
|
|
756
772
|
if (_response.ok) {
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
import { normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
12
|
-
import { mergeHeaders } from "../../../../../../core/headers.mjs";
|
|
12
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
|
|
13
13
|
import * as core from "../../../../../../core/index.mjs";
|
|
14
14
|
import * as environments from "../../../../../../environments.mjs";
|
|
15
15
|
import * as errors from "../../../../../../errors/index.mjs";
|
|
@@ -47,7 +47,7 @@ export class CalendarClient {
|
|
|
47
47
|
}
|
|
48
48
|
__listEvents() {
|
|
49
49
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
50
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
50
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
51
51
|
const { title, start, end, location, attendees, limit, catalog_id: catalogId } = request;
|
|
52
52
|
const _queryParams = {};
|
|
53
53
|
if (title !== undefined) {
|
|
@@ -72,16 +72,18 @@ export class CalendarClient {
|
|
|
72
72
|
_queryParams.catalog_id = catalogId;
|
|
73
73
|
}
|
|
74
74
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
75
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
76
|
+
"X-Athena-Session-Credential": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.sessionCredential) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.sessionCredential,
|
|
77
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
78
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
79
|
+
url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/calendar/events"),
|
|
78
80
|
method: "GET",
|
|
79
81
|
headers: _headers,
|
|
80
82
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
81
|
-
timeoutMs: ((
|
|
82
|
-
maxRetries: (
|
|
83
|
+
timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 60) * 1000,
|
|
84
|
+
maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
|
|
83
85
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
84
|
-
fetchFn: (
|
|
86
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
85
87
|
logging: this._options.logging,
|
|
86
88
|
});
|
|
87
89
|
if (_response.ok) {
|