@athenaintel/sdk 4.3.2201 → 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/api/types/ConversationAssetInfo.d.ts +1 -1
- package/dist/cjs/api/types/PublicAssetOut.d.ts +1 -1
- 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/api/types/ConversationAssetInfo.d.mts +1 -1
- package/dist/esm/api/types/PublicAssetOut.d.mts +1 -1
- 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";
|
|
@@ -39,21 +39,23 @@ export class SheetsClient {
|
|
|
39
39
|
}
|
|
40
40
|
__updateCell(request, requestOptions) {
|
|
41
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
42
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
43
43
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
44
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
45
|
+
"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,
|
|
46
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
47
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
48
|
+
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/sheets/cell/update"),
|
|
47
49
|
method: "POST",
|
|
48
50
|
headers: _headers,
|
|
49
51
|
contentType: "application/json",
|
|
50
52
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
51
53
|
requestType: "json",
|
|
52
54
|
body: request,
|
|
53
|
-
timeoutMs: ((
|
|
54
|
-
maxRetries: (
|
|
55
|
+
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,
|
|
56
|
+
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,
|
|
55
57
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
56
|
-
fetchFn: (
|
|
58
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
57
59
|
logging: this._options.logging,
|
|
58
60
|
});
|
|
59
61
|
if (_response.ok) {
|
|
@@ -118,21 +120,23 @@ export class SheetsClient {
|
|
|
118
120
|
}
|
|
119
121
|
__deleteCells(request, requestOptions) {
|
|
120
122
|
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
123
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
122
124
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
123
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
124
|
-
|
|
125
|
-
|
|
125
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
126
|
+
"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,
|
|
127
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
128
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
129
|
+
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/sheets/cells/delete"),
|
|
126
130
|
method: "POST",
|
|
127
131
|
headers: _headers,
|
|
128
132
|
contentType: "application/json",
|
|
129
133
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
130
134
|
requestType: "json",
|
|
131
135
|
body: request,
|
|
132
|
-
timeoutMs: ((
|
|
133
|
-
maxRetries: (
|
|
136
|
+
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,
|
|
137
|
+
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,
|
|
134
138
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
135
|
-
fetchFn: (
|
|
139
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
136
140
|
logging: this._options.logging,
|
|
137
141
|
});
|
|
138
142
|
if (_response.ok) {
|
|
@@ -194,21 +198,23 @@ export class SheetsClient {
|
|
|
194
198
|
}
|
|
195
199
|
__deleteColumn(request, requestOptions) {
|
|
196
200
|
return __awaiter(this, void 0, void 0, function* () {
|
|
197
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
201
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
198
202
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
199
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
200
|
-
|
|
201
|
-
|
|
203
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
204
|
+
"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,
|
|
205
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
206
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
207
|
+
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/sheets/column/delete"),
|
|
202
208
|
method: "POST",
|
|
203
209
|
headers: _headers,
|
|
204
210
|
contentType: "application/json",
|
|
205
211
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
206
212
|
requestType: "json",
|
|
207
213
|
body: request,
|
|
208
|
-
timeoutMs: ((
|
|
209
|
-
maxRetries: (
|
|
214
|
+
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,
|
|
215
|
+
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,
|
|
210
216
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
211
|
-
fetchFn: (
|
|
217
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
212
218
|
logging: this._options.logging,
|
|
213
219
|
});
|
|
214
220
|
if (_response.ok) {
|
|
@@ -270,21 +276,23 @@ export class SheetsClient {
|
|
|
270
276
|
}
|
|
271
277
|
__insertColumn(request, requestOptions) {
|
|
272
278
|
return __awaiter(this, void 0, void 0, function* () {
|
|
273
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
279
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
274
280
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
275
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
276
|
-
|
|
277
|
-
|
|
281
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
282
|
+
"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,
|
|
283
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
284
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
285
|
+
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/sheets/column/insert"),
|
|
278
286
|
method: "POST",
|
|
279
287
|
headers: _headers,
|
|
280
288
|
contentType: "application/json",
|
|
281
289
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
282
290
|
requestType: "json",
|
|
283
291
|
body: request,
|
|
284
|
-
timeoutMs: ((
|
|
285
|
-
maxRetries: (
|
|
292
|
+
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,
|
|
293
|
+
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,
|
|
286
294
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
287
|
-
fetchFn: (
|
|
295
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
288
296
|
logging: this._options.logging,
|
|
289
297
|
});
|
|
290
298
|
if (_response.ok) {
|
|
@@ -349,21 +357,23 @@ export class SheetsClient {
|
|
|
349
357
|
}
|
|
350
358
|
__clearFormatting(request, requestOptions) {
|
|
351
359
|
return __awaiter(this, void 0, void 0, function* () {
|
|
352
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
360
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
353
361
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
354
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
355
|
-
|
|
356
|
-
|
|
362
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
363
|
+
"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,
|
|
364
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
365
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
366
|
+
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/sheets/formatting/clear"),
|
|
357
367
|
method: "POST",
|
|
358
368
|
headers: _headers,
|
|
359
369
|
contentType: "application/json",
|
|
360
370
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
361
371
|
requestType: "json",
|
|
362
372
|
body: request,
|
|
363
|
-
timeoutMs: ((
|
|
364
|
-
maxRetries: (
|
|
373
|
+
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,
|
|
374
|
+
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,
|
|
365
375
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
366
|
-
fetchFn: (
|
|
376
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
367
377
|
logging: this._options.logging,
|
|
368
378
|
});
|
|
369
379
|
if (_response.ok) {
|
|
@@ -428,21 +438,23 @@ export class SheetsClient {
|
|
|
428
438
|
}
|
|
429
439
|
__clearRange(request, requestOptions) {
|
|
430
440
|
return __awaiter(this, void 0, void 0, function* () {
|
|
431
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
441
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
432
442
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
433
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
434
|
-
|
|
435
|
-
|
|
443
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
444
|
+
"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,
|
|
445
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
446
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
447
|
+
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/sheets/range/clear"),
|
|
436
448
|
method: "POST",
|
|
437
449
|
headers: _headers,
|
|
438
450
|
contentType: "application/json",
|
|
439
451
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
440
452
|
requestType: "json",
|
|
441
453
|
body: request,
|
|
442
|
-
timeoutMs: ((
|
|
443
|
-
maxRetries: (
|
|
454
|
+
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,
|
|
455
|
+
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,
|
|
444
456
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
445
|
-
fetchFn: (
|
|
457
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
446
458
|
logging: this._options.logging,
|
|
447
459
|
});
|
|
448
460
|
if (_response.ok) {
|
|
@@ -508,21 +520,23 @@ export class SheetsClient {
|
|
|
508
520
|
}
|
|
509
521
|
__formatRange(request, requestOptions) {
|
|
510
522
|
return __awaiter(this, void 0, void 0, function* () {
|
|
511
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
523
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
512
524
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
513
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
514
|
-
|
|
515
|
-
|
|
525
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
526
|
+
"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,
|
|
527
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
528
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
529
|
+
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/sheets/range/format"),
|
|
516
530
|
method: "POST",
|
|
517
531
|
headers: _headers,
|
|
518
532
|
contentType: "application/json",
|
|
519
533
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
520
534
|
requestType: "json",
|
|
521
535
|
body: request,
|
|
522
|
-
timeoutMs: ((
|
|
523
|
-
maxRetries: (
|
|
536
|
+
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,
|
|
537
|
+
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,
|
|
524
538
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
525
|
-
fetchFn: (
|
|
539
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
526
540
|
logging: this._options.logging,
|
|
527
541
|
});
|
|
528
542
|
if (_response.ok) {
|
|
@@ -586,21 +600,23 @@ export class SheetsClient {
|
|
|
586
600
|
}
|
|
587
601
|
__updateRange(request, requestOptions) {
|
|
588
602
|
return __awaiter(this, void 0, void 0, function* () {
|
|
589
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
603
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
590
604
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
591
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
592
|
-
|
|
593
|
-
|
|
605
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
606
|
+
"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,
|
|
607
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
608
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
609
|
+
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/sheets/range/update"),
|
|
594
610
|
method: "POST",
|
|
595
611
|
headers: _headers,
|
|
596
612
|
contentType: "application/json",
|
|
597
613
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
598
614
|
requestType: "json",
|
|
599
615
|
body: request,
|
|
600
|
-
timeoutMs: ((
|
|
601
|
-
maxRetries: (
|
|
616
|
+
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,
|
|
617
|
+
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,
|
|
602
618
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
603
|
-
fetchFn: (
|
|
619
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
604
620
|
logging: this._options.logging,
|
|
605
621
|
});
|
|
606
622
|
if (_response.ok) {
|
|
@@ -662,21 +678,23 @@ export class SheetsClient {
|
|
|
662
678
|
}
|
|
663
679
|
__insertRow(request, requestOptions) {
|
|
664
680
|
return __awaiter(this, void 0, void 0, function* () {
|
|
665
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
681
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
666
682
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
667
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
668
|
-
|
|
669
|
-
|
|
683
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
684
|
+
"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,
|
|
685
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
686
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
687
|
+
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/sheets/row/insert"),
|
|
670
688
|
method: "POST",
|
|
671
689
|
headers: _headers,
|
|
672
690
|
contentType: "application/json",
|
|
673
691
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
674
692
|
requestType: "json",
|
|
675
693
|
body: request,
|
|
676
|
-
timeoutMs: ((
|
|
677
|
-
maxRetries: (
|
|
694
|
+
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,
|
|
695
|
+
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,
|
|
678
696
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
679
|
-
fetchFn: (
|
|
697
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
680
698
|
logging: this._options.logging,
|
|
681
699
|
});
|
|
682
700
|
if (_response.ok) {
|
|
@@ -737,21 +755,23 @@ export class SheetsClient {
|
|
|
737
755
|
}
|
|
738
756
|
__duplicateSheet(request, requestOptions) {
|
|
739
757
|
return __awaiter(this, void 0, void 0, function* () {
|
|
740
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
758
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
741
759
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
742
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
743
|
-
|
|
744
|
-
|
|
760
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
761
|
+
"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,
|
|
762
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
763
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
764
|
+
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/sheets/sheet/duplicate"),
|
|
745
765
|
method: "POST",
|
|
746
766
|
headers: _headers,
|
|
747
767
|
contentType: "application/json",
|
|
748
768
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
749
769
|
requestType: "json",
|
|
750
770
|
body: request,
|
|
751
|
-
timeoutMs: ((
|
|
752
|
-
maxRetries: (
|
|
771
|
+
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,
|
|
772
|
+
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,
|
|
753
773
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
754
|
-
fetchFn: (
|
|
774
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
755
775
|
logging: this._options.logging,
|
|
756
776
|
});
|
|
757
777
|
if (_response.ok) {
|
|
@@ -819,21 +839,23 @@ export class SheetsClient {
|
|
|
819
839
|
}
|
|
820
840
|
__createTab(request, requestOptions) {
|
|
821
841
|
return __awaiter(this, void 0, void 0, function* () {
|
|
822
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
842
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
823
843
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
824
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
825
|
-
|
|
826
|
-
|
|
844
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
845
|
+
"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,
|
|
846
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
847
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
848
|
+
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/sheets/tab/create"),
|
|
827
849
|
method: "POST",
|
|
828
850
|
headers: _headers,
|
|
829
851
|
contentType: "application/json",
|
|
830
852
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
831
853
|
requestType: "json",
|
|
832
854
|
body: request,
|
|
833
|
-
timeoutMs: ((
|
|
834
|
-
maxRetries: (
|
|
855
|
+
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,
|
|
856
|
+
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,
|
|
835
857
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
836
|
-
fetchFn: (
|
|
858
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
837
859
|
logging: this._options.logging,
|
|
838
860
|
});
|
|
839
861
|
if (_response.ok) {
|
|
@@ -896,21 +918,23 @@ export class SheetsClient {
|
|
|
896
918
|
}
|
|
897
919
|
__deleteTableColumn(request, requestOptions) {
|
|
898
920
|
return __awaiter(this, void 0, void 0, function* () {
|
|
899
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
921
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
900
922
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
901
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
902
|
-
|
|
903
|
-
|
|
923
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
924
|
+
"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,
|
|
925
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
926
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
927
|
+
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/sheets/table/column/delete"),
|
|
904
928
|
method: "POST",
|
|
905
929
|
headers: _headers,
|
|
906
930
|
contentType: "application/json",
|
|
907
931
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
908
932
|
requestType: "json",
|
|
909
933
|
body: request,
|
|
910
|
-
timeoutMs: ((
|
|
911
|
-
maxRetries: (
|
|
934
|
+
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,
|
|
935
|
+
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,
|
|
912
936
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
913
|
-
fetchFn: (
|
|
937
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
914
938
|
logging: this._options.logging,
|
|
915
939
|
});
|
|
916
940
|
if (_response.ok) {
|
|
@@ -974,21 +998,23 @@ export class SheetsClient {
|
|
|
974
998
|
}
|
|
975
999
|
__insertTableColumn(request, requestOptions) {
|
|
976
1000
|
return __awaiter(this, void 0, void 0, function* () {
|
|
977
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1001
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
978
1002
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
979
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
980
|
-
|
|
981
|
-
|
|
1003
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
1004
|
+
"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,
|
|
1005
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1006
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
1007
|
+
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/sheets/table/column/insert"),
|
|
982
1008
|
method: "POST",
|
|
983
1009
|
headers: _headers,
|
|
984
1010
|
contentType: "application/json",
|
|
985
1011
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
986
1012
|
requestType: "json",
|
|
987
1013
|
body: request,
|
|
988
|
-
timeoutMs: ((
|
|
989
|
-
maxRetries: (
|
|
1014
|
+
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,
|
|
1015
|
+
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,
|
|
990
1016
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
991
|
-
fetchFn: (
|
|
1017
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
992
1018
|
logging: this._options.logging,
|
|
993
1019
|
});
|
|
994
1020
|
if (_response.ok) {
|
|
@@ -1055,21 +1081,23 @@ export class SheetsClient {
|
|
|
1055
1081
|
}
|
|
1056
1082
|
__createTable(request, requestOptions) {
|
|
1057
1083
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1058
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1084
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
1059
1085
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1060
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
1061
|
-
|
|
1062
|
-
|
|
1086
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
1087
|
+
"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,
|
|
1088
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1089
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
1090
|
+
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/sheets/table/create"),
|
|
1063
1091
|
method: "POST",
|
|
1064
1092
|
headers: _headers,
|
|
1065
1093
|
contentType: "application/json",
|
|
1066
1094
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1067
1095
|
requestType: "json",
|
|
1068
1096
|
body: request,
|
|
1069
|
-
timeoutMs: ((
|
|
1070
|
-
maxRetries: (
|
|
1097
|
+
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,
|
|
1098
|
+
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,
|
|
1071
1099
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1072
|
-
fetchFn: (
|
|
1100
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
1073
1101
|
logging: this._options.logging,
|
|
1074
1102
|
});
|
|
1075
1103
|
if (_response.ok) {
|
|
@@ -1131,21 +1159,23 @@ export class SheetsClient {
|
|
|
1131
1159
|
}
|
|
1132
1160
|
__getTable(request, requestOptions) {
|
|
1133
1161
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1134
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1162
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
1135
1163
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1136
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
1137
|
-
|
|
1138
|
-
|
|
1164
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
1165
|
+
"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,
|
|
1166
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1167
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
1168
|
+
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/sheets/table/get"),
|
|
1139
1169
|
method: "POST",
|
|
1140
1170
|
headers: _headers,
|
|
1141
1171
|
contentType: "application/json",
|
|
1142
1172
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1143
1173
|
requestType: "json",
|
|
1144
1174
|
body: request,
|
|
1145
|
-
timeoutMs: ((
|
|
1146
|
-
maxRetries: (
|
|
1175
|
+
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,
|
|
1176
|
+
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,
|
|
1147
1177
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1148
|
-
fetchFn: (
|
|
1178
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
1149
1179
|
logging: this._options.logging,
|
|
1150
1180
|
});
|
|
1151
1181
|
if (_response.ok) {
|
|
@@ -1207,21 +1237,23 @@ export class SheetsClient {
|
|
|
1207
1237
|
}
|
|
1208
1238
|
__insertTableRow(request, requestOptions) {
|
|
1209
1239
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1210
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1240
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
1211
1241
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1212
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
1213
|
-
|
|
1214
|
-
|
|
1242
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
1243
|
+
"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,
|
|
1244
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1245
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
1246
|
+
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/sheets/table/insert-row"),
|
|
1215
1247
|
method: "POST",
|
|
1216
1248
|
headers: _headers,
|
|
1217
1249
|
contentType: "application/json",
|
|
1218
1250
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1219
1251
|
requestType: "json",
|
|
1220
1252
|
body: request,
|
|
1221
|
-
timeoutMs: ((
|
|
1222
|
-
maxRetries: (
|
|
1253
|
+
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,
|
|
1254
|
+
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,
|
|
1223
1255
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1224
|
-
fetchFn: (
|
|
1256
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
1225
1257
|
logging: this._options.logging,
|
|
1226
1258
|
});
|
|
1227
1259
|
if (_response.ok) {
|
|
@@ -1288,21 +1320,23 @@ export class SheetsClient {
|
|
|
1288
1320
|
}
|
|
1289
1321
|
__updateTable(request, requestOptions) {
|
|
1290
1322
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1291
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1323
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
1292
1324
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1293
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
1294
|
-
|
|
1295
|
-
|
|
1325
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
1326
|
+
"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,
|
|
1327
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1328
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
1329
|
+
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/sheets/table/update"),
|
|
1296
1330
|
method: "POST",
|
|
1297
1331
|
headers: _headers,
|
|
1298
1332
|
contentType: "application/json",
|
|
1299
1333
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1300
1334
|
requestType: "json",
|
|
1301
1335
|
body: request,
|
|
1302
|
-
timeoutMs: ((
|
|
1303
|
-
maxRetries: (
|
|
1336
|
+
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,
|
|
1337
|
+
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,
|
|
1304
1338
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1305
|
-
fetchFn: (
|
|
1339
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
1306
1340
|
logging: this._options.logging,
|
|
1307
1341
|
});
|
|
1308
1342
|
if (_response.ok) {
|