@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
@@ -85,21 +85,23 @@ class EmailClient {
85
85
  }
86
86
  __createDraft(request, requestOptions) {
87
87
  return __awaiter(this, void 0, void 0, function* () {
88
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
88
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
89
89
  const _authRequest = yield this._options.authProvider.getAuthRequest();
90
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
91
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
92
- 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/tools/email/draft"),
90
+ 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)({
91
+ "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,
92
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
93
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
94
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/email/draft"),
93
95
  method: "POST",
94
96
  headers: _headers,
95
97
  contentType: "application/json",
96
98
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
97
99
  requestType: "json",
98
100
  body: request,
99
- 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,
100
- 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,
101
+ 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,
102
+ 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,
101
103
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
102
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
104
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
103
105
  logging: this._options.logging,
104
106
  });
105
107
  if (_response.ok) {
@@ -180,7 +182,7 @@ class EmailClient {
180
182
  }
181
183
  __search(request, requestOptions) {
182
184
  return __awaiter(this, void 0, void 0, function* () {
183
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
185
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
184
186
  const { query, catalog_id: catalogId, limit } = request;
185
187
  const _queryParams = {};
186
188
  _queryParams.query = query;
@@ -191,16 +193,18 @@ class EmailClient {
191
193
  _queryParams.limit = limit.toString();
192
194
  }
193
195
  const _authRequest = yield this._options.authProvider.getAuthRequest();
194
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
195
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
196
- 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/tools/email/search"),
196
+ 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)({
197
+ "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,
198
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
199
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
200
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.AthenaIntelligenceEnvironment.Production, "api/v0/tools/email/search"),
197
201
  method: "GET",
198
202
  headers: _headers,
199
203
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
200
- 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,
201
- 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,
204
+ 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,
205
+ 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,
202
206
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
203
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
207
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
204
208
  logging: this._options.logging,
205
209
  });
206
210
  if (_response.ok) {