@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
|
@@ -84,7 +84,7 @@ class AssetsClient {
|
|
|
84
84
|
}
|
|
85
85
|
__list() {
|
|
86
86
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
87
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
87
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
88
88
|
const { limit, offset, filters, sort, workspace_id: workspaceId } = request;
|
|
89
89
|
const _queryParams = {};
|
|
90
90
|
if (limit != null) {
|
|
@@ -103,16 +103,18 @@ class AssetsClient {
|
|
|
103
103
|
_queryParams.workspace_id = workspaceId;
|
|
104
104
|
}
|
|
105
105
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
106
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
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)({
|
|
107
|
+
"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,
|
|
108
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
109
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
110
|
+
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/assets"),
|
|
109
111
|
method: "GET",
|
|
110
112
|
headers: _headers,
|
|
111
113
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
112
|
-
timeoutMs: ((
|
|
113
|
-
maxRetries: (
|
|
114
|
+
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,
|
|
115
|
+
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,
|
|
114
116
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
115
|
-
fetchFn: (
|
|
117
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
116
118
|
logging: this._options.logging,
|
|
117
119
|
});
|
|
118
120
|
if (_response.ok) {
|
|
@@ -178,21 +180,23 @@ class AssetsClient {
|
|
|
178
180
|
}
|
|
179
181
|
__convertExcelToSheet(request, requestOptions) {
|
|
180
182
|
return __awaiter(this, void 0, void 0, function* () {
|
|
181
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
183
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
182
184
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
183
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
184
|
-
|
|
185
|
-
|
|
185
|
+
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)({
|
|
186
|
+
"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,
|
|
187
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
188
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
189
|
+
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/assets/convert-excel-to-sheet"),
|
|
186
190
|
method: "POST",
|
|
187
191
|
headers: _headers,
|
|
188
192
|
contentType: "application/json",
|
|
189
193
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
190
194
|
requestType: "json",
|
|
191
195
|
body: request,
|
|
192
|
-
timeoutMs: ((
|
|
193
|
-
maxRetries: (
|
|
196
|
+
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,
|
|
197
|
+
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,
|
|
194
198
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
195
|
-
fetchFn: (
|
|
199
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
196
200
|
logging: this._options.logging,
|
|
197
201
|
});
|
|
198
202
|
if (_response.ok) {
|
|
@@ -267,21 +271,23 @@ class AssetsClient {
|
|
|
267
271
|
}
|
|
268
272
|
__create(request, requestOptions) {
|
|
269
273
|
return __awaiter(this, void 0, void 0, function* () {
|
|
270
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
274
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
271
275
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
272
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
273
|
-
|
|
274
|
-
|
|
276
|
+
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)({
|
|
277
|
+
"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,
|
|
278
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
279
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
280
|
+
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/assets/create"),
|
|
275
281
|
method: "POST",
|
|
276
282
|
headers: _headers,
|
|
277
283
|
contentType: "application/json",
|
|
278
284
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
279
285
|
requestType: "json",
|
|
280
286
|
body: request,
|
|
281
|
-
timeoutMs: ((
|
|
282
|
-
maxRetries: (
|
|
287
|
+
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,
|
|
288
|
+
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,
|
|
283
289
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
284
|
-
fetchFn: (
|
|
290
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
285
291
|
logging: this._options.logging,
|
|
286
292
|
});
|
|
287
293
|
if (_response.ok) {
|
|
@@ -364,21 +370,23 @@ class AssetsClient {
|
|
|
364
370
|
}
|
|
365
371
|
__createProject(request, requestOptions) {
|
|
366
372
|
return __awaiter(this, void 0, void 0, function* () {
|
|
367
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
373
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
368
374
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
369
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
370
|
-
|
|
371
|
-
|
|
375
|
+
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)({
|
|
376
|
+
"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,
|
|
377
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
378
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
379
|
+
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/assets/create_project"),
|
|
372
380
|
method: "POST",
|
|
373
381
|
headers: _headers,
|
|
374
382
|
contentType: "application/json",
|
|
375
383
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
376
384
|
requestType: "json",
|
|
377
385
|
body: request,
|
|
378
|
-
timeoutMs: ((
|
|
379
|
-
maxRetries: (
|
|
386
|
+
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,
|
|
387
|
+
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,
|
|
380
388
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
381
|
-
fetchFn: (
|
|
389
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
382
390
|
logging: this._options.logging,
|
|
383
391
|
});
|
|
384
392
|
if (_response.ok) {
|
|
@@ -451,21 +459,23 @@ class AssetsClient {
|
|
|
451
459
|
}
|
|
452
460
|
__duplicate(request, requestOptions) {
|
|
453
461
|
return __awaiter(this, void 0, void 0, function* () {
|
|
454
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
462
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
455
463
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
456
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
457
|
-
|
|
458
|
-
|
|
464
|
+
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)({
|
|
465
|
+
"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,
|
|
466
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
467
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
468
|
+
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/assets/duplicate"),
|
|
459
469
|
method: "POST",
|
|
460
470
|
headers: _headers,
|
|
461
471
|
contentType: "application/json",
|
|
462
472
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
463
473
|
requestType: "json",
|
|
464
474
|
body: request,
|
|
465
|
-
timeoutMs: ((
|
|
466
|
-
maxRetries: (
|
|
475
|
+
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,
|
|
476
|
+
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,
|
|
467
477
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
468
|
-
fetchFn: (
|
|
478
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
469
479
|
logging: this._options.logging,
|
|
470
480
|
});
|
|
471
481
|
if (_response.ok) {
|
|
@@ -536,19 +546,21 @@ class AssetsClient {
|
|
|
536
546
|
}
|
|
537
547
|
__get(request, requestOptions) {
|
|
538
548
|
return __awaiter(this, void 0, void 0, function* () {
|
|
539
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
549
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
540
550
|
const { asset_id: assetId } = request;
|
|
541
551
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
542
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
543
|
-
|
|
544
|
-
|
|
552
|
+
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)({
|
|
553
|
+
"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,
|
|
554
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
555
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
556
|
+
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/assets/${core.url.encodePathParam(assetId)}`),
|
|
545
557
|
method: "GET",
|
|
546
558
|
headers: _headers,
|
|
547
559
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
548
|
-
timeoutMs: ((
|
|
549
|
-
maxRetries: (
|
|
560
|
+
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,
|
|
561
|
+
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,
|
|
550
562
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
551
|
-
fetchFn: (
|
|
563
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
552
564
|
logging: this._options.logging,
|
|
553
565
|
});
|
|
554
566
|
if (_response.ok) {
|
|
@@ -613,22 +625,24 @@ class AssetsClient {
|
|
|
613
625
|
}
|
|
614
626
|
__rename(request, requestOptions) {
|
|
615
627
|
return __awaiter(this, void 0, void 0, function* () {
|
|
616
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
628
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
617
629
|
const { asset_id: assetId } = request, _body = __rest(request, ["asset_id"]);
|
|
618
630
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
619
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
620
|
-
|
|
621
|
-
|
|
631
|
+
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)({
|
|
632
|
+
"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,
|
|
633
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
634
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
635
|
+
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/assets/${core.url.encodePathParam(assetId)}`),
|
|
622
636
|
method: "PATCH",
|
|
623
637
|
headers: _headers,
|
|
624
638
|
contentType: "application/json",
|
|
625
639
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
626
640
|
requestType: "json",
|
|
627
641
|
body: _body,
|
|
628
|
-
timeoutMs: ((
|
|
629
|
-
maxRetries: (
|
|
642
|
+
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,
|
|
643
|
+
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,
|
|
630
644
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
631
|
-
fetchFn: (
|
|
645
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
632
646
|
logging: this._options.logging,
|
|
633
647
|
});
|
|
634
648
|
if (_response.ok) {
|
|
@@ -696,7 +710,7 @@ class AssetsClient {
|
|
|
696
710
|
}
|
|
697
711
|
__listActivity(request, requestOptions) {
|
|
698
712
|
return __awaiter(this, void 0, void 0, function* () {
|
|
699
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
713
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
700
714
|
const { asset_id: assetId, limit, to_clock: toClock } = request;
|
|
701
715
|
const _queryParams = {};
|
|
702
716
|
if (limit != null) {
|
|
@@ -706,16 +720,18 @@ class AssetsClient {
|
|
|
706
720
|
_queryParams.to_clock = (_a = toClock === null || toClock === void 0 ? void 0 : toClock.toString()) !== null && _a !== void 0 ? _a : null;
|
|
707
721
|
}
|
|
708
722
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
709
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_b = this._options) === null || _b === void 0 ? void 0 : _b.headers,
|
|
710
|
-
|
|
711
|
-
|
|
723
|
+
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)({
|
|
724
|
+
"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,
|
|
725
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
726
|
+
const _response = yield ((_e = this._options.fetcher) !== null && _e !== void 0 ? _e : core.fetcher)({
|
|
727
|
+
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/assets/${core.url.encodePathParam(assetId)}/activity`),
|
|
712
728
|
method: "GET",
|
|
713
729
|
headers: _headers,
|
|
714
730
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
715
|
-
timeoutMs: ((
|
|
716
|
-
maxRetries: (
|
|
731
|
+
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,
|
|
732
|
+
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,
|
|
717
733
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
718
|
-
fetchFn: (
|
|
734
|
+
fetchFn: (_o = this._options) === null || _o === void 0 ? void 0 : _o.fetch,
|
|
719
735
|
logging: this._options.logging,
|
|
720
736
|
});
|
|
721
737
|
if (_response.ok) {
|
|
@@ -788,22 +804,24 @@ class AssetsClient {
|
|
|
788
804
|
}
|
|
789
805
|
__getActivityDelta(request, requestOptions) {
|
|
790
806
|
return __awaiter(this, void 0, void 0, function* () {
|
|
791
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
807
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
792
808
|
const { asset_id: assetId, from: from_, to } = request;
|
|
793
809
|
const _queryParams = {};
|
|
794
810
|
_queryParams.from = from_.toString();
|
|
795
811
|
_queryParams.to = to.toString();
|
|
796
812
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
797
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
798
|
-
|
|
799
|
-
|
|
813
|
+
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)({
|
|
814
|
+
"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,
|
|
815
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
816
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
817
|
+
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/assets/${core.url.encodePathParam(assetId)}/activity/delta`),
|
|
800
818
|
method: "GET",
|
|
801
819
|
headers: _headers,
|
|
802
820
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
803
|
-
timeoutMs: ((
|
|
804
|
-
maxRetries: (
|
|
821
|
+
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,
|
|
822
|
+
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,
|
|
805
823
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
806
|
-
fetchFn: (
|
|
824
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
807
825
|
logging: this._options.logging,
|
|
808
826
|
});
|
|
809
827
|
if (_response.ok) {
|
|
@@ -883,22 +901,24 @@ class AssetsClient {
|
|
|
883
901
|
}
|
|
884
902
|
__getActivityDeltas(request, requestOptions) {
|
|
885
903
|
return __awaiter(this, void 0, void 0, function* () {
|
|
886
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
904
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
887
905
|
const { asset_id: assetId } = request, _body = __rest(request, ["asset_id"]);
|
|
888
906
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
889
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
890
|
-
|
|
891
|
-
|
|
907
|
+
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)({
|
|
908
|
+
"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,
|
|
909
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
910
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
911
|
+
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/assets/${core.url.encodePathParam(assetId)}/activity/deltas`),
|
|
892
912
|
method: "POST",
|
|
893
913
|
headers: _headers,
|
|
894
914
|
contentType: "application/json",
|
|
895
915
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
896
916
|
requestType: "json",
|
|
897
917
|
body: _body,
|
|
898
|
-
timeoutMs: ((
|
|
899
|
-
maxRetries: (
|
|
918
|
+
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,
|
|
919
|
+
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,
|
|
900
920
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
901
|
-
fetchFn: (
|
|
921
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
902
922
|
logging: this._options.logging,
|
|
903
923
|
});
|
|
904
924
|
if (_response.ok) {
|
|
@@ -969,19 +989,21 @@ class AssetsClient {
|
|
|
969
989
|
}
|
|
970
990
|
__archive(request, requestOptions) {
|
|
971
991
|
return __awaiter(this, void 0, void 0, function* () {
|
|
972
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
992
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
973
993
|
const { asset_id: assetId } = request;
|
|
974
994
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
975
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
976
|
-
|
|
977
|
-
|
|
995
|
+
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)({
|
|
996
|
+
"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,
|
|
997
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
998
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
999
|
+
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/assets/${core.url.encodePathParam(assetId)}/archive`),
|
|
978
1000
|
method: "POST",
|
|
979
1001
|
headers: _headers,
|
|
980
1002
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
981
|
-
timeoutMs: ((
|
|
982
|
-
maxRetries: (
|
|
1003
|
+
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,
|
|
1004
|
+
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,
|
|
983
1005
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
984
|
-
fetchFn: (
|
|
1006
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
985
1007
|
logging: this._options.logging,
|
|
986
1008
|
});
|
|
987
1009
|
if (_response.ok) {
|
|
@@ -1046,22 +1068,24 @@ class AssetsClient {
|
|
|
1046
1068
|
}
|
|
1047
1069
|
__createCollabToken(request, requestOptions) {
|
|
1048
1070
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1049
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1071
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
1050
1072
|
const { asset_id: assetId } = request, _body = __rest(request, ["asset_id"]);
|
|
1051
1073
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1052
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
1053
|
-
|
|
1054
|
-
|
|
1074
|
+
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)({
|
|
1075
|
+
"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,
|
|
1076
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1077
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
1078
|
+
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/assets/${core.url.encodePathParam(assetId)}/collab-token`),
|
|
1055
1079
|
method: "POST",
|
|
1056
1080
|
headers: _headers,
|
|
1057
1081
|
contentType: "application/json",
|
|
1058
1082
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1059
1083
|
requestType: "json",
|
|
1060
1084
|
body: _body,
|
|
1061
|
-
timeoutMs: ((
|
|
1062
|
-
maxRetries: (
|
|
1085
|
+
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,
|
|
1086
|
+
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,
|
|
1063
1087
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1064
|
-
fetchFn: (
|
|
1088
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
1065
1089
|
logging: this._options.logging,
|
|
1066
1090
|
});
|
|
1067
1091
|
if (_response.ok) {
|
|
@@ -1116,7 +1140,7 @@ class AssetsClient {
|
|
|
1116
1140
|
}
|
|
1117
1141
|
__download(request, requestOptions) {
|
|
1118
1142
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1119
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1143
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
1120
1144
|
const { asset_id: assetId, live_sync: liveSync, addin_id: addinId } = request;
|
|
1121
1145
|
const _queryParams = {};
|
|
1122
1146
|
if (liveSync != null) {
|
|
@@ -1126,17 +1150,19 @@ class AssetsClient {
|
|
|
1126
1150
|
_queryParams.addin_id = addinId;
|
|
1127
1151
|
}
|
|
1128
1152
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1129
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
1130
|
-
|
|
1131
|
-
|
|
1153
|
+
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)({
|
|
1154
|
+
"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,
|
|
1155
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1156
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
1157
|
+
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/assets/${core.url.encodePathParam(assetId)}/download`),
|
|
1132
1158
|
method: "GET",
|
|
1133
1159
|
headers: _headers,
|
|
1134
1160
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
1135
1161
|
responseType: "binary-response",
|
|
1136
|
-
timeoutMs: ((
|
|
1137
|
-
maxRetries: (
|
|
1162
|
+
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,
|
|
1163
|
+
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,
|
|
1138
1164
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1139
|
-
fetchFn: (
|
|
1165
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
1140
1166
|
logging: this._options.logging,
|
|
1141
1167
|
});
|
|
1142
1168
|
if (_response.ok) {
|
|
@@ -1204,22 +1230,24 @@ class AssetsClient {
|
|
|
1204
1230
|
}
|
|
1205
1231
|
__move(request, requestOptions) {
|
|
1206
1232
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1207
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1233
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
1208
1234
|
const { asset_id: assetId } = request, _body = __rest(request, ["asset_id"]);
|
|
1209
1235
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1210
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
1211
|
-
|
|
1212
|
-
|
|
1236
|
+
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)({
|
|
1237
|
+
"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,
|
|
1238
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1239
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
1240
|
+
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/assets/${core.url.encodePathParam(assetId)}/move`),
|
|
1213
1241
|
method: "POST",
|
|
1214
1242
|
headers: _headers,
|
|
1215
1243
|
contentType: "application/json",
|
|
1216
1244
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1217
1245
|
requestType: "json",
|
|
1218
1246
|
body: _body,
|
|
1219
|
-
timeoutMs: ((
|
|
1220
|
-
maxRetries: (
|
|
1247
|
+
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,
|
|
1248
|
+
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,
|
|
1221
1249
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1222
|
-
fetchFn: (
|
|
1250
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
1223
1251
|
logging: this._options.logging,
|
|
1224
1252
|
});
|
|
1225
1253
|
if (_response.ok) {
|
|
@@ -1300,22 +1328,24 @@ class AssetsClient {
|
|
|
1300
1328
|
}
|
|
1301
1329
|
__share(request, requestOptions) {
|
|
1302
1330
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1303
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1331
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
1304
1332
|
const { asset_id: assetId } = request, _body = __rest(request, ["asset_id"]);
|
|
1305
1333
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1306
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
1307
|
-
|
|
1308
|
-
|
|
1334
|
+
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)({
|
|
1335
|
+
"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,
|
|
1336
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1337
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
1338
|
+
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/assets/${core.url.encodePathParam(assetId)}/share`),
|
|
1309
1339
|
method: "POST",
|
|
1310
1340
|
headers: _headers,
|
|
1311
1341
|
contentType: "application/json",
|
|
1312
1342
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1313
1343
|
requestType: "json",
|
|
1314
1344
|
body: _body,
|
|
1315
|
-
timeoutMs: ((
|
|
1316
|
-
maxRetries: (
|
|
1345
|
+
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,
|
|
1346
|
+
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,
|
|
1317
1347
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1318
|
-
fetchFn: (
|
|
1348
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
1319
1349
|
logging: this._options.logging,
|
|
1320
1350
|
});
|
|
1321
1351
|
if (_response.ok) {
|
|
@@ -1389,22 +1419,24 @@ class AssetsClient {
|
|
|
1389
1419
|
}
|
|
1390
1420
|
__updateWorkspaceAccess(request, requestOptions) {
|
|
1391
1421
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1392
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1422
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
1393
1423
|
const { asset_id: assetId } = request, _body = __rest(request, ["asset_id"]);
|
|
1394
1424
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1395
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
1396
|
-
|
|
1397
|
-
|
|
1425
|
+
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)({
|
|
1426
|
+
"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,
|
|
1427
|
+
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1428
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
1429
|
+
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/assets/${core.url.encodePathParam(assetId)}/workspace-access`),
|
|
1398
1430
|
method: "PUT",
|
|
1399
1431
|
headers: _headers,
|
|
1400
1432
|
contentType: "application/json",
|
|
1401
1433
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1402
1434
|
requestType: "json",
|
|
1403
1435
|
body: _body,
|
|
1404
|
-
timeoutMs: ((
|
|
1405
|
-
maxRetries: (
|
|
1436
|
+
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,
|
|
1437
|
+
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,
|
|
1406
1438
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1407
|
-
fetchFn: (
|
|
1439
|
+
fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
|
|
1408
1440
|
logging: this._options.logging,
|
|
1409
1441
|
});
|
|
1410
1442
|
if (_response.ok) {
|