@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
|
@@ -74,21 +74,23 @@ class ThreadsClient {
|
|
|
74
74
|
}
|
|
75
75
|
__batchStopByAssetId(request, requestOptions) {
|
|
76
76
|
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
77
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
78
78
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
79
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
80
|
+
"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,
|
|
81
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
82
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
83
|
+
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"),
|
|
82
84
|
method: "POST",
|
|
83
85
|
headers: _headers,
|
|
84
86
|
contentType: "application/json",
|
|
85
87
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
86
88
|
requestType: "json",
|
|
87
89
|
body: request,
|
|
88
|
-
timeoutMs: ((
|
|
89
|
-
maxRetries: (
|
|
90
|
+
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,
|
|
91
|
+
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,
|
|
90
92
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
91
|
-
fetchFn: (
|
|
93
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
92
94
|
logging: this._options.logging,
|
|
93
95
|
});
|
|
94
96
|
if (_response.ok) {
|
|
@@ -155,21 +157,23 @@ class ThreadsClient {
|
|
|
155
157
|
}
|
|
156
158
|
__getStatusBatch(request, requestOptions) {
|
|
157
159
|
return __awaiter(this, void 0, void 0, function* () {
|
|
158
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
160
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
159
161
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
160
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
161
|
-
|
|
162
|
-
|
|
162
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
163
|
+
"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,
|
|
164
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
165
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
166
|
+
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"),
|
|
163
167
|
method: "POST",
|
|
164
168
|
headers: _headers,
|
|
165
169
|
contentType: "application/json",
|
|
166
170
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
167
171
|
requestType: "json",
|
|
168
172
|
body: request,
|
|
169
|
-
timeoutMs: ((
|
|
170
|
-
maxRetries: (
|
|
173
|
+
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,
|
|
174
|
+
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,
|
|
171
175
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
172
|
-
fetchFn: (
|
|
176
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
173
177
|
logging: this._options.logging,
|
|
174
178
|
});
|
|
175
179
|
if (_response.ok) {
|
|
@@ -236,21 +240,23 @@ class ThreadsClient {
|
|
|
236
240
|
}
|
|
237
241
|
__batchStop(request, requestOptions) {
|
|
238
242
|
return __awaiter(this, void 0, void 0, function* () {
|
|
239
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
243
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
240
244
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
241
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
242
|
-
|
|
243
|
-
|
|
245
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
246
|
+
"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,
|
|
247
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
248
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
249
|
+
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"),
|
|
244
250
|
method: "POST",
|
|
245
251
|
headers: _headers,
|
|
246
252
|
contentType: "application/json",
|
|
247
253
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
248
254
|
requestType: "json",
|
|
249
255
|
body: request,
|
|
250
|
-
timeoutMs: ((
|
|
251
|
-
maxRetries: (
|
|
256
|
+
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,
|
|
257
|
+
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,
|
|
252
258
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
253
|
-
fetchFn: (
|
|
259
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
254
260
|
logging: this._options.logging,
|
|
255
261
|
});
|
|
256
262
|
if (_response.ok) {
|
|
@@ -318,23 +324,25 @@ class ThreadsClient {
|
|
|
318
324
|
}
|
|
319
325
|
__getStatus(request, requestOptions) {
|
|
320
326
|
return __awaiter(this, void 0, void 0, function* () {
|
|
321
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
327
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
322
328
|
const { thread_id: threadId, include_messages: includeMessages } = request;
|
|
323
329
|
const _queryParams = {};
|
|
324
330
|
if (includeMessages !== undefined) {
|
|
325
331
|
_queryParams.include_messages = (_a = includeMessages === null || includeMessages === void 0 ? void 0 : includeMessages.toString()) !== null && _a !== void 0 ? _a : null;
|
|
326
332
|
}
|
|
327
333
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
328
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_b = this._options) === null || _b === void 0 ? void 0 : _b.headers,
|
|
329
|
-
|
|
330
|
-
|
|
334
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
335
|
+
"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,
|
|
336
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
337
|
+
const _response = yield ((_e = this._options.fetcher) !== null && _e !== void 0 ? _e : core.fetcher)({
|
|
338
|
+
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`),
|
|
331
339
|
method: "GET",
|
|
332
340
|
headers: _headers,
|
|
333
341
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
334
|
-
timeoutMs: ((
|
|
335
|
-
maxRetries: (
|
|
342
|
+
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,
|
|
343
|
+
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,
|
|
336
344
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
337
|
-
fetchFn: (
|
|
345
|
+
fetchFn: (_o = this._options) === null || _o === void 0 ? void 0 : _o.fetch,
|
|
338
346
|
logging: this._options.logging,
|
|
339
347
|
});
|
|
340
348
|
if (_response.ok) {
|
|
@@ -407,19 +415,21 @@ class ThreadsClient {
|
|
|
407
415
|
}
|
|
408
416
|
__stop(request, requestOptions) {
|
|
409
417
|
return __awaiter(this, void 0, void 0, function* () {
|
|
410
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
418
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
411
419
|
const { thread_id: threadId } = request;
|
|
412
420
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
413
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
414
|
-
|
|
415
|
-
|
|
421
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
422
|
+
"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,
|
|
423
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
424
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
425
|
+
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`),
|
|
416
426
|
method: "POST",
|
|
417
427
|
headers: _headers,
|
|
418
428
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
419
|
-
timeoutMs: ((
|
|
420
|
-
maxRetries: (
|
|
429
|
+
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,
|
|
430
|
+
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,
|
|
421
431
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
422
|
-
fetchFn: (
|
|
432
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
423
433
|
logging: this._options.logging,
|
|
424
434
|
});
|
|
425
435
|
if (_response.ok) {
|
|
@@ -93,18 +93,20 @@ class ToolsClient {
|
|
|
93
93
|
}
|
|
94
94
|
__getAssetCapabilities(requestOptions) {
|
|
95
95
|
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
96
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
97
97
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
98
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
99
|
+
"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,
|
|
100
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
101
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
102
|
+
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"),
|
|
101
103
|
method: "GET",
|
|
102
104
|
headers: _headers,
|
|
103
105
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
104
|
-
timeoutMs: ((
|
|
105
|
-
maxRetries: (
|
|
106
|
+
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,
|
|
107
|
+
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,
|
|
106
108
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
107
|
-
fetchFn: (
|
|
109
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
108
110
|
logging: this._options.logging,
|
|
109
111
|
});
|
|
110
112
|
if (_response.ok) {
|
|
@@ -162,21 +164,23 @@ class ToolsClient {
|
|
|
162
164
|
}
|
|
163
165
|
__getAssetChunks(request, requestOptions) {
|
|
164
166
|
return __awaiter(this, void 0, void 0, function* () {
|
|
165
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
167
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
166
168
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
167
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
168
|
-
|
|
169
|
-
|
|
169
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
170
|
+
"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,
|
|
171
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
172
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
173
|
+
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"),
|
|
170
174
|
method: "POST",
|
|
171
175
|
headers: _headers,
|
|
172
176
|
contentType: "application/json",
|
|
173
177
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
174
178
|
requestType: "json",
|
|
175
179
|
body: request,
|
|
176
|
-
timeoutMs: ((
|
|
177
|
-
maxRetries: (
|
|
180
|
+
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,
|
|
181
|
+
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,
|
|
178
182
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
179
|
-
fetchFn: (
|
|
183
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
180
184
|
logging: this._options.logging,
|
|
181
185
|
});
|
|
182
186
|
if (_response.ok) {
|
|
@@ -240,7 +244,7 @@ class ToolsClient {
|
|
|
240
244
|
}
|
|
241
245
|
__getAssetContent(request, requestOptions) {
|
|
242
246
|
return __awaiter(this, void 0, void 0, function* () {
|
|
243
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
247
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
244
248
|
const { asset_id: assetId, include_comments: includeComments } = request;
|
|
245
249
|
const _queryParams = {};
|
|
246
250
|
_queryParams.asset_id = assetId;
|
|
@@ -248,16 +252,18 @@ class ToolsClient {
|
|
|
248
252
|
_queryParams.include_comments = includeComments.toString();
|
|
249
253
|
}
|
|
250
254
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
251
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
252
|
-
|
|
253
|
-
|
|
255
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
256
|
+
"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,
|
|
257
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
258
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
259
|
+
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"),
|
|
254
260
|
method: "GET",
|
|
255
261
|
headers: _headers,
|
|
256
262
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
257
|
-
timeoutMs: ((
|
|
258
|
-
maxRetries: (
|
|
263
|
+
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,
|
|
264
|
+
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,
|
|
259
265
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
260
|
-
fetchFn: (
|
|
266
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
261
267
|
logging: this._options.logging,
|
|
262
268
|
});
|
|
263
269
|
if (_response.ok) {
|
|
@@ -323,21 +329,23 @@ class ToolsClient {
|
|
|
323
329
|
}
|
|
324
330
|
__readAsset(request, requestOptions) {
|
|
325
331
|
return __awaiter(this, void 0, void 0, function* () {
|
|
326
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
332
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
327
333
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
328
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
329
|
-
|
|
330
|
-
|
|
334
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
335
|
+
"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,
|
|
336
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
337
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
338
|
+
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"),
|
|
331
339
|
method: "POST",
|
|
332
340
|
headers: _headers,
|
|
333
341
|
contentType: "application/json",
|
|
334
342
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
335
343
|
requestType: "json",
|
|
336
344
|
body: request,
|
|
337
|
-
timeoutMs: ((
|
|
338
|
-
maxRetries: (
|
|
345
|
+
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,
|
|
346
|
+
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,
|
|
339
347
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
340
|
-
fetchFn: (
|
|
348
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
341
349
|
logging: this._options.logging,
|
|
342
350
|
});
|
|
343
351
|
if (_response.ok) {
|
|
@@ -403,7 +411,7 @@ class ToolsClient {
|
|
|
403
411
|
}
|
|
404
412
|
__getAssetScreenshot(request, requestOptions) {
|
|
405
413
|
return __awaiter(this, void 0, void 0, function* () {
|
|
406
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
414
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
407
415
|
const { asset_id: assetId, page_number: pageNumber } = request;
|
|
408
416
|
const _queryParams = {};
|
|
409
417
|
_queryParams.asset_id = assetId;
|
|
@@ -411,16 +419,18 @@ class ToolsClient {
|
|
|
411
419
|
_queryParams.page_number = pageNumber.toString();
|
|
412
420
|
}
|
|
413
421
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
414
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
415
|
-
|
|
416
|
-
|
|
422
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
423
|
+
"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,
|
|
424
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
425
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
426
|
+
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"),
|
|
417
427
|
method: "GET",
|
|
418
428
|
headers: _headers,
|
|
419
429
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
420
|
-
timeoutMs: ((
|
|
421
|
-
maxRetries: (
|
|
430
|
+
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,
|
|
431
|
+
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,
|
|
422
432
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
423
|
-
fetchFn: (
|
|
433
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
424
434
|
logging: this._options.logging,
|
|
425
435
|
});
|
|
426
436
|
if (_response.ok) {
|
|
@@ -488,7 +498,7 @@ class ToolsClient {
|
|
|
488
498
|
}
|
|
489
499
|
__listContents() {
|
|
490
500
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
491
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
501
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
492
502
|
const { asset_id: assetId, include_asset_details: includeAssetDetails, include_system_files: includeSystemFiles, } = request;
|
|
493
503
|
const _queryParams = {};
|
|
494
504
|
if (assetId !== undefined) {
|
|
@@ -501,16 +511,18 @@ class ToolsClient {
|
|
|
501
511
|
_queryParams.include_system_files = includeSystemFiles.toString();
|
|
502
512
|
}
|
|
503
513
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
504
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
505
|
-
|
|
506
|
-
|
|
514
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
515
|
+
"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,
|
|
516
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
517
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
518
|
+
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"),
|
|
507
519
|
method: "GET",
|
|
508
520
|
headers: _headers,
|
|
509
521
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
510
|
-
timeoutMs: ((
|
|
511
|
-
maxRetries: (
|
|
522
|
+
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,
|
|
523
|
+
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,
|
|
512
524
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
513
|
-
fetchFn: (
|
|
525
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
514
526
|
logging: this._options.logging,
|
|
515
527
|
});
|
|
516
528
|
if (_response.ok) {
|
|
@@ -587,7 +599,7 @@ class ToolsClient {
|
|
|
587
599
|
}
|
|
588
600
|
__dataFrame(request, requestOptions) {
|
|
589
601
|
return __awaiter(this, void 0, void 0, function* () {
|
|
590
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
602
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
591
603
|
const { asset_id: assetId, row_limit: rowLimit, index_column: indexColumn, columns, sheet_name: sheetName, separator, } = request;
|
|
592
604
|
const _queryParams = {};
|
|
593
605
|
_queryParams.asset_id = assetId;
|
|
@@ -607,16 +619,18 @@ class ToolsClient {
|
|
|
607
619
|
_queryParams.separator = separator;
|
|
608
620
|
}
|
|
609
621
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
610
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_c = this._options) === null || _c === void 0 ? void 0 : _c.headers,
|
|
611
|
-
|
|
612
|
-
|
|
622
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
623
|
+
"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,
|
|
624
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
625
|
+
const _response = yield ((_f = this._options.fetcher) !== null && _f !== void 0 ? _f : core.fetcher)({
|
|
626
|
+
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"),
|
|
613
627
|
method: "GET",
|
|
614
628
|
headers: _headers,
|
|
615
629
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
616
|
-
timeoutMs: ((
|
|
617
|
-
maxRetries: (
|
|
630
|
+
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,
|
|
631
|
+
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,
|
|
618
632
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
619
|
-
fetchFn: (
|
|
633
|
+
fetchFn: (_p = this._options) === null || _p === void 0 ? void 0 : _p.fetch,
|
|
620
634
|
logging: this._options.logging,
|
|
621
635
|
});
|
|
622
636
|
if (_response.ok) {
|
|
@@ -679,22 +693,24 @@ class ToolsClient {
|
|
|
679
693
|
}
|
|
680
694
|
__rawData(request, requestOptions) {
|
|
681
695
|
return __awaiter(this, void 0, void 0, function* () {
|
|
682
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
696
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
683
697
|
const { asset_id: assetId } = request;
|
|
684
698
|
const _queryParams = {};
|
|
685
699
|
_queryParams.asset_id = assetId;
|
|
686
700
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
687
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
688
|
-
|
|
689
|
-
|
|
701
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
702
|
+
"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,
|
|
703
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
704
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
705
|
+
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"),
|
|
690
706
|
method: "GET",
|
|
691
707
|
headers: _headers,
|
|
692
708
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
693
709
|
responseType: "binary-response",
|
|
694
|
-
timeoutMs: ((
|
|
695
|
-
maxRetries: (
|
|
710
|
+
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,
|
|
711
|
+
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,
|
|
696
712
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
697
|
-
fetchFn: (
|
|
713
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
698
714
|
logging: this._options.logging,
|
|
699
715
|
});
|
|
700
716
|
if (_response.ok) {
|
|
@@ -762,7 +778,7 @@ class ToolsClient {
|
|
|
762
778
|
}
|
|
763
779
|
__saveAsset(request, requestOptions) {
|
|
764
780
|
return __awaiter(this, void 0, void 0, function* () {
|
|
765
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
781
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
766
782
|
const _queryParams = {};
|
|
767
783
|
if (request.parent_folder_id !== undefined) {
|
|
768
784
|
_queryParams.parent_folder_id = request.parent_folder_id;
|
|
@@ -774,19 +790,19 @@ class ToolsClient {
|
|
|
774
790
|
yield _request.appendFile("file", request.file);
|
|
775
791
|
const _maybeEncodedRequest = yield _request.getRequest();
|
|
776
792
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
777
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
778
|
-
const _response = yield ((
|
|
779
|
-
url: core.url.join((
|
|
793
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.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);
|
|
794
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
795
|
+
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"),
|
|
780
796
|
method: "POST",
|
|
781
797
|
headers: _headers,
|
|
782
798
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
783
799
|
requestType: "file",
|
|
784
800
|
duplex: _maybeEncodedRequest.duplex,
|
|
785
801
|
body: _maybeEncodedRequest.body,
|
|
786
|
-
timeoutMs: ((
|
|
787
|
-
maxRetries: (
|
|
802
|
+
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,
|
|
803
|
+
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,
|
|
788
804
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
789
|
-
fetchFn: (
|
|
805
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
790
806
|
logging: this._options.logging,
|
|
791
807
|
});
|
|
792
808
|
if (_response.ok) {
|
|
@@ -83,7 +83,7 @@ class CalendarClient {
|
|
|
83
83
|
}
|
|
84
84
|
__listEvents() {
|
|
85
85
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
86
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
86
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
87
87
|
const { title, start, end, location, attendees, limit, catalog_id: catalogId } = request;
|
|
88
88
|
const _queryParams = {};
|
|
89
89
|
if (title !== undefined) {
|
|
@@ -108,16 +108,18 @@ class CalendarClient {
|
|
|
108
108
|
_queryParams.catalog_id = catalogId;
|
|
109
109
|
}
|
|
110
110
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
111
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({
|
|
112
|
+
"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,
|
|
113
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
114
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
115
|
+
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"),
|
|
114
116
|
method: "GET",
|
|
115
117
|
headers: _headers,
|
|
116
118
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
117
|
-
timeoutMs: ((
|
|
118
|
-
maxRetries: (
|
|
119
|
+
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,
|
|
120
|
+
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,
|
|
119
121
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
120
|
-
fetchFn: (
|
|
122
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
121
123
|
logging: this._options.logging,
|
|
122
124
|
});
|
|
123
125
|
if (_response.ok) {
|