@athenaintel/sdk 4.3.2202 → 4.3.2203

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/BaseClient.d.ts +4 -0
  3. package/dist/cjs/BaseClient.js +3 -2
  4. package/dist/cjs/api/resources/agents/resources/general/client/Client.js +18 -14
  5. package/dist/cjs/api/resources/aop/client/Client.js +64 -49
  6. package/dist/cjs/api/resources/assets/client/Client.js +144 -112
  7. package/dist/cjs/api/resources/collabAgents/client/Client.js +9 -7
  8. package/dist/cjs/api/resources/computer/client/Client.js +63 -49
  9. package/dist/cjs/api/resources/databases/client/Client.js +72 -56
  10. package/dist/cjs/api/resources/meetings/client/Client.js +27 -21
  11. package/dist/cjs/api/resources/query/client/Client.js +9 -7
  12. package/dist/cjs/api/resources/semanticModel/client/Client.js +27 -21
  13. package/dist/cjs/api/resources/sessions/client/Client.js +45 -35
  14. package/dist/cjs/api/resources/threads/client/Client.js +45 -35
  15. package/dist/cjs/api/resources/tools/client/Client.js +79 -63
  16. package/dist/cjs/api/resources/tools/resources/calendar/client/Client.js +9 -7
  17. package/dist/cjs/api/resources/tools/resources/email/client/Client.js +18 -14
  18. package/dist/cjs/api/resources/tools/resources/sheets/client/Client.js +153 -119
  19. package/dist/cjs/api/resources/tools/resources/structuredDataExtractor/client/Client.js +9 -7
  20. package/dist/cjs/api/resources/tools/resources/tasks/client/Client.js +9 -7
  21. package/dist/cjs/api/resources/users/client/Client.js +45 -35
  22. package/dist/cjs/api/resources/workspaces/client/Client.js +63 -49
  23. package/dist/cjs/version.d.ts +1 -1
  24. package/dist/cjs/version.js +1 -1
  25. package/dist/esm/BaseClient.d.mts +4 -0
  26. package/dist/esm/BaseClient.mjs +3 -2
  27. package/dist/esm/api/resources/agents/resources/general/client/Client.mjs +19 -15
  28. package/dist/esm/api/resources/aop/client/Client.mjs +64 -49
  29. package/dist/esm/api/resources/assets/client/Client.mjs +145 -113
  30. package/dist/esm/api/resources/collabAgents/client/Client.mjs +10 -8
  31. package/dist/esm/api/resources/computer/client/Client.mjs +64 -50
  32. package/dist/esm/api/resources/databases/client/Client.mjs +73 -57
  33. package/dist/esm/api/resources/meetings/client/Client.mjs +28 -22
  34. package/dist/esm/api/resources/query/client/Client.mjs +10 -8
  35. package/dist/esm/api/resources/semanticModel/client/Client.mjs +28 -22
  36. package/dist/esm/api/resources/sessions/client/Client.mjs +46 -36
  37. package/dist/esm/api/resources/threads/client/Client.mjs +46 -36
  38. package/dist/esm/api/resources/tools/client/Client.mjs +79 -63
  39. package/dist/esm/api/resources/tools/resources/calendar/client/Client.mjs +10 -8
  40. package/dist/esm/api/resources/tools/resources/email/client/Client.mjs +19 -15
  41. package/dist/esm/api/resources/tools/resources/sheets/client/Client.mjs +154 -120
  42. package/dist/esm/api/resources/tools/resources/structuredDataExtractor/client/Client.mjs +10 -8
  43. package/dist/esm/api/resources/tools/resources/tasks/client/Client.mjs +10 -8
  44. package/dist/esm/api/resources/users/client/Client.mjs +46 -36
  45. package/dist/esm/api/resources/workspaces/client/Client.mjs +64 -50
  46. package/dist/esm/version.d.mts +1 -1
  47. package/dist/esm/version.mjs +1 -1
  48. package/package.json +1 -1
@@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  return t;
21
21
  };
22
22
  import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
23
- import { mergeHeaders } from "../../../../core/headers.mjs";
23
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
24
24
  import * as core from "../../../../core/index.mjs";
25
25
  import * as environments from "../../../../environments.mjs";
26
26
  import * as errors from "../../../../errors/index.mjs";
@@ -48,7 +48,7 @@ export class AssetsClient {
48
48
  }
49
49
  __list() {
50
50
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
51
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
51
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
52
52
  const { limit, offset, filters, sort, workspace_id: workspaceId } = request;
53
53
  const _queryParams = {};
54
54
  if (limit != null) {
@@ -67,16 +67,18 @@ export class AssetsClient {
67
67
  _queryParams.workspace_id = workspaceId;
68
68
  }
69
69
  const _authRequest = yield this._options.authProvider.getAuthRequest();
70
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
71
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
72
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/assets"),
70
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
71
+ "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,
72
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
73
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
74
+ 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"),
73
75
  method: "GET",
74
76
  headers: _headers,
75
77
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
76
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
77
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
78
+ 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,
79
+ 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,
78
80
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
79
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
81
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
80
82
  logging: this._options.logging,
81
83
  });
82
84
  if (_response.ok) {
@@ -142,21 +144,23 @@ export class AssetsClient {
142
144
  }
143
145
  __convertExcelToSheet(request, requestOptions) {
144
146
  return __awaiter(this, void 0, void 0, function* () {
145
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
147
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
146
148
  const _authRequest = yield this._options.authProvider.getAuthRequest();
147
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
148
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
149
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/assets/convert-excel-to-sheet"),
149
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
150
+ "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,
151
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
152
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
153
+ 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"),
150
154
  method: "POST",
151
155
  headers: _headers,
152
156
  contentType: "application/json",
153
157
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
154
158
  requestType: "json",
155
159
  body: request,
156
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
157
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
160
+ 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,
161
+ 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,
158
162
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
159
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
163
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
160
164
  logging: this._options.logging,
161
165
  });
162
166
  if (_response.ok) {
@@ -231,21 +235,23 @@ export class AssetsClient {
231
235
  }
232
236
  __create(request, requestOptions) {
233
237
  return __awaiter(this, void 0, void 0, function* () {
234
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
238
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
235
239
  const _authRequest = yield this._options.authProvider.getAuthRequest();
236
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
237
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
238
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/assets/create"),
240
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
241
+ "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,
242
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
243
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
244
+ 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"),
239
245
  method: "POST",
240
246
  headers: _headers,
241
247
  contentType: "application/json",
242
248
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
243
249
  requestType: "json",
244
250
  body: request,
245
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
246
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
251
+ 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,
252
+ 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,
247
253
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
248
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
254
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
249
255
  logging: this._options.logging,
250
256
  });
251
257
  if (_response.ok) {
@@ -328,21 +334,23 @@ export class AssetsClient {
328
334
  }
329
335
  __createProject(request, requestOptions) {
330
336
  return __awaiter(this, void 0, void 0, function* () {
331
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
337
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
332
338
  const _authRequest = yield this._options.authProvider.getAuthRequest();
333
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
334
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
335
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/assets/create_project"),
339
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
340
+ "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,
341
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
342
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
343
+ 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"),
336
344
  method: "POST",
337
345
  headers: _headers,
338
346
  contentType: "application/json",
339
347
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
340
348
  requestType: "json",
341
349
  body: request,
342
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
343
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
350
+ 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,
351
+ 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,
344
352
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
345
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
353
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
346
354
  logging: this._options.logging,
347
355
  });
348
356
  if (_response.ok) {
@@ -415,21 +423,23 @@ export class AssetsClient {
415
423
  }
416
424
  __duplicate(request, requestOptions) {
417
425
  return __awaiter(this, void 0, void 0, function* () {
418
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
426
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
419
427
  const _authRequest = yield this._options.authProvider.getAuthRequest();
420
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
421
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
422
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, "api/v0/assets/duplicate"),
428
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
429
+ "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,
430
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
431
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
432
+ 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"),
423
433
  method: "POST",
424
434
  headers: _headers,
425
435
  contentType: "application/json",
426
436
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
427
437
  requestType: "json",
428
438
  body: request,
429
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
430
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
439
+ 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,
440
+ 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,
431
441
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
432
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
442
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
433
443
  logging: this._options.logging,
434
444
  });
435
445
  if (_response.ok) {
@@ -500,19 +510,21 @@ export class AssetsClient {
500
510
  }
501
511
  __get(request, requestOptions) {
502
512
  return __awaiter(this, void 0, void 0, function* () {
503
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
513
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
504
514
  const { asset_id: assetId } = request;
505
515
  const _authRequest = yield this._options.authProvider.getAuthRequest();
506
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
507
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
508
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, `api/v0/assets/${core.url.encodePathParam(assetId)}`),
516
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
517
+ "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,
518
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
519
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
520
+ 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)}`),
509
521
  method: "GET",
510
522
  headers: _headers,
511
523
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
512
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
513
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
524
+ 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,
525
+ 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,
514
526
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
515
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
527
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
516
528
  logging: this._options.logging,
517
529
  });
518
530
  if (_response.ok) {
@@ -577,22 +589,24 @@ export class AssetsClient {
577
589
  }
578
590
  __rename(request, requestOptions) {
579
591
  return __awaiter(this, void 0, void 0, function* () {
580
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
592
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
581
593
  const { asset_id: assetId } = request, _body = __rest(request, ["asset_id"]);
582
594
  const _authRequest = yield this._options.authProvider.getAuthRequest();
583
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
584
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
585
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, `api/v0/assets/${core.url.encodePathParam(assetId)}`),
595
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
596
+ "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,
597
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
598
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
599
+ 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)}`),
586
600
  method: "PATCH",
587
601
  headers: _headers,
588
602
  contentType: "application/json",
589
603
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
590
604
  requestType: "json",
591
605
  body: _body,
592
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
593
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
606
+ 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,
607
+ 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,
594
608
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
595
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
609
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
596
610
  logging: this._options.logging,
597
611
  });
598
612
  if (_response.ok) {
@@ -660,7 +674,7 @@ export class AssetsClient {
660
674
  }
661
675
  __listActivity(request, requestOptions) {
662
676
  return __awaiter(this, void 0, void 0, function* () {
663
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
677
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
664
678
  const { asset_id: assetId, limit, to_clock: toClock } = request;
665
679
  const _queryParams = {};
666
680
  if (limit != null) {
@@ -670,16 +684,18 @@ export class AssetsClient {
670
684
  _queryParams.to_clock = (_a = toClock === null || toClock === void 0 ? void 0 : toClock.toString()) !== null && _a !== void 0 ? _a : null;
671
685
  }
672
686
  const _authRequest = yield this._options.authProvider.getAuthRequest();
673
- const _headers = mergeHeaders(_authRequest.headers, (_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
674
- const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
675
- url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.AthenaIntelligenceEnvironment.Production, `api/v0/assets/${core.url.encodePathParam(assetId)}/activity`),
687
+ const _headers = mergeHeaders(_authRequest.headers, (_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, mergeOnlyDefinedHeaders({
688
+ "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,
689
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
690
+ const _response = yield ((_e = this._options.fetcher) !== null && _e !== void 0 ? _e : core.fetcher)({
691
+ 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`),
676
692
  method: "GET",
677
693
  headers: _headers,
678
694
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
679
- timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
680
- maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
695
+ 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,
696
+ 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,
681
697
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
682
- fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
698
+ fetchFn: (_o = this._options) === null || _o === void 0 ? void 0 : _o.fetch,
683
699
  logging: this._options.logging,
684
700
  });
685
701
  if (_response.ok) {
@@ -752,22 +768,24 @@ export class AssetsClient {
752
768
  }
753
769
  __getActivityDelta(request, requestOptions) {
754
770
  return __awaiter(this, void 0, void 0, function* () {
755
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
771
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
756
772
  const { asset_id: assetId, from: from_, to } = request;
757
773
  const _queryParams = {};
758
774
  _queryParams.from = from_.toString();
759
775
  _queryParams.to = to.toString();
760
776
  const _authRequest = yield this._options.authProvider.getAuthRequest();
761
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
762
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
763
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, `api/v0/assets/${core.url.encodePathParam(assetId)}/activity/delta`),
777
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
778
+ "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,
779
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
780
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
781
+ 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`),
764
782
  method: "GET",
765
783
  headers: _headers,
766
784
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
767
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
768
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
785
+ 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,
786
+ 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,
769
787
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
770
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
788
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
771
789
  logging: this._options.logging,
772
790
  });
773
791
  if (_response.ok) {
@@ -847,22 +865,24 @@ export class AssetsClient {
847
865
  }
848
866
  __getActivityDeltas(request, requestOptions) {
849
867
  return __awaiter(this, void 0, void 0, function* () {
850
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
868
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
851
869
  const { asset_id: assetId } = request, _body = __rest(request, ["asset_id"]);
852
870
  const _authRequest = yield this._options.authProvider.getAuthRequest();
853
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
854
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
855
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, `api/v0/assets/${core.url.encodePathParam(assetId)}/activity/deltas`),
871
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
872
+ "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,
873
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
874
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
875
+ 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`),
856
876
  method: "POST",
857
877
  headers: _headers,
858
878
  contentType: "application/json",
859
879
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
860
880
  requestType: "json",
861
881
  body: _body,
862
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
863
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
882
+ 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,
883
+ 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,
864
884
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
865
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
885
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
866
886
  logging: this._options.logging,
867
887
  });
868
888
  if (_response.ok) {
@@ -933,19 +953,21 @@ export class AssetsClient {
933
953
  }
934
954
  __archive(request, requestOptions) {
935
955
  return __awaiter(this, void 0, void 0, function* () {
936
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
956
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
937
957
  const { asset_id: assetId } = request;
938
958
  const _authRequest = yield this._options.authProvider.getAuthRequest();
939
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
940
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
941
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, `api/v0/assets/${core.url.encodePathParam(assetId)}/archive`),
959
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
960
+ "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,
961
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
962
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
963
+ 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`),
942
964
  method: "POST",
943
965
  headers: _headers,
944
966
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
945
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
946
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
967
+ 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,
968
+ 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,
947
969
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
948
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
970
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
949
971
  logging: this._options.logging,
950
972
  });
951
973
  if (_response.ok) {
@@ -1010,22 +1032,24 @@ export class AssetsClient {
1010
1032
  }
1011
1033
  __createCollabToken(request, requestOptions) {
1012
1034
  return __awaiter(this, void 0, void 0, function* () {
1013
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1035
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
1014
1036
  const { asset_id: assetId } = request, _body = __rest(request, ["asset_id"]);
1015
1037
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1016
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1017
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1018
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, `api/v0/assets/${core.url.encodePathParam(assetId)}/collab-token`),
1038
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
1039
+ "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,
1040
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1041
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
1042
+ 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`),
1019
1043
  method: "POST",
1020
1044
  headers: _headers,
1021
1045
  contentType: "application/json",
1022
1046
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1023
1047
  requestType: "json",
1024
1048
  body: _body,
1025
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
1026
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
1049
+ 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,
1050
+ 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,
1027
1051
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1028
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
1052
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
1029
1053
  logging: this._options.logging,
1030
1054
  });
1031
1055
  if (_response.ok) {
@@ -1080,7 +1104,7 @@ export class AssetsClient {
1080
1104
  }
1081
1105
  __download(request, requestOptions) {
1082
1106
  return __awaiter(this, void 0, void 0, function* () {
1083
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1107
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
1084
1108
  const { asset_id: assetId, live_sync: liveSync, addin_id: addinId } = request;
1085
1109
  const _queryParams = {};
1086
1110
  if (liveSync != null) {
@@ -1090,17 +1114,19 @@ export class AssetsClient {
1090
1114
  _queryParams.addin_id = addinId;
1091
1115
  }
1092
1116
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1093
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1094
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1095
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, `api/v0/assets/${core.url.encodePathParam(assetId)}/download`),
1117
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
1118
+ "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,
1119
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1120
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
1121
+ 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`),
1096
1122
  method: "GET",
1097
1123
  headers: _headers,
1098
1124
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
1099
1125
  responseType: "binary-response",
1100
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
1101
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
1126
+ 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,
1127
+ 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,
1102
1128
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1103
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
1129
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
1104
1130
  logging: this._options.logging,
1105
1131
  });
1106
1132
  if (_response.ok) {
@@ -1168,22 +1194,24 @@ export class AssetsClient {
1168
1194
  }
1169
1195
  __move(request, requestOptions) {
1170
1196
  return __awaiter(this, void 0, void 0, function* () {
1171
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1197
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
1172
1198
  const { asset_id: assetId } = request, _body = __rest(request, ["asset_id"]);
1173
1199
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1174
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1175
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1176
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, `api/v0/assets/${core.url.encodePathParam(assetId)}/move`),
1200
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
1201
+ "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,
1202
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1203
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
1204
+ 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`),
1177
1205
  method: "POST",
1178
1206
  headers: _headers,
1179
1207
  contentType: "application/json",
1180
1208
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1181
1209
  requestType: "json",
1182
1210
  body: _body,
1183
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
1184
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
1211
+ 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,
1212
+ 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,
1185
1213
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1186
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
1214
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
1187
1215
  logging: this._options.logging,
1188
1216
  });
1189
1217
  if (_response.ok) {
@@ -1264,22 +1292,24 @@ export class AssetsClient {
1264
1292
  }
1265
1293
  __share(request, requestOptions) {
1266
1294
  return __awaiter(this, void 0, void 0, function* () {
1267
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1295
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
1268
1296
  const { asset_id: assetId } = request, _body = __rest(request, ["asset_id"]);
1269
1297
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1270
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1271
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1272
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, `api/v0/assets/${core.url.encodePathParam(assetId)}/share`),
1298
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
1299
+ "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,
1300
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1301
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
1302
+ 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`),
1273
1303
  method: "POST",
1274
1304
  headers: _headers,
1275
1305
  contentType: "application/json",
1276
1306
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1277
1307
  requestType: "json",
1278
1308
  body: _body,
1279
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
1280
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
1309
+ 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,
1310
+ 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,
1281
1311
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1282
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
1312
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
1283
1313
  logging: this._options.logging,
1284
1314
  });
1285
1315
  if (_response.ok) {
@@ -1353,22 +1383,24 @@ export class AssetsClient {
1353
1383
  }
1354
1384
  __updateWorkspaceAccess(request, requestOptions) {
1355
1385
  return __awaiter(this, void 0, void 0, function* () {
1356
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1386
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
1357
1387
  const { asset_id: assetId } = request, _body = __rest(request, ["asset_id"]);
1358
1388
  const _authRequest = yield this._options.authProvider.getAuthRequest();
1359
- const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1360
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
1361
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.AthenaIntelligenceEnvironment.Production, `api/v0/assets/${core.url.encodePathParam(assetId)}/workspace-access`),
1389
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
1390
+ "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,
1391
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1392
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
1393
+ 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`),
1362
1394
  method: "PUT",
1363
1395
  headers: _headers,
1364
1396
  contentType: "application/json",
1365
1397
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
1366
1398
  requestType: "json",
1367
1399
  body: _body,
1368
- timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
1369
- maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
1400
+ 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,
1401
+ 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,
1370
1402
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1371
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
1403
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
1372
1404
  logging: this._options.logging,
1373
1405
  });
1374
1406
  if (_response.ok) {