@athenaintel/sdk 4.3.2202 → 4.3.2203
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/cjs/BaseClient.d.ts +4 -0
- package/dist/cjs/BaseClient.js +3 -2
- package/dist/cjs/api/resources/agents/resources/general/client/Client.js +18 -14
- package/dist/cjs/api/resources/aop/client/Client.js +64 -49
- package/dist/cjs/api/resources/assets/client/Client.js +144 -112
- package/dist/cjs/api/resources/collabAgents/client/Client.js +9 -7
- package/dist/cjs/api/resources/computer/client/Client.js +63 -49
- package/dist/cjs/api/resources/databases/client/Client.js +72 -56
- package/dist/cjs/api/resources/meetings/client/Client.js +27 -21
- package/dist/cjs/api/resources/query/client/Client.js +9 -7
- package/dist/cjs/api/resources/semanticModel/client/Client.js +27 -21
- package/dist/cjs/api/resources/sessions/client/Client.js +45 -35
- package/dist/cjs/api/resources/threads/client/Client.js +45 -35
- package/dist/cjs/api/resources/tools/client/Client.js +79 -63
- package/dist/cjs/api/resources/tools/resources/calendar/client/Client.js +9 -7
- package/dist/cjs/api/resources/tools/resources/email/client/Client.js +18 -14
- package/dist/cjs/api/resources/tools/resources/sheets/client/Client.js +153 -119
- package/dist/cjs/api/resources/tools/resources/structuredDataExtractor/client/Client.js +9 -7
- package/dist/cjs/api/resources/tools/resources/tasks/client/Client.js +9 -7
- package/dist/cjs/api/resources/users/client/Client.js +45 -35
- package/dist/cjs/api/resources/workspaces/client/Client.js +63 -49
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +4 -0
- package/dist/esm/BaseClient.mjs +3 -2
- package/dist/esm/api/resources/agents/resources/general/client/Client.mjs +19 -15
- package/dist/esm/api/resources/aop/client/Client.mjs +64 -49
- package/dist/esm/api/resources/assets/client/Client.mjs +145 -113
- package/dist/esm/api/resources/collabAgents/client/Client.mjs +10 -8
- package/dist/esm/api/resources/computer/client/Client.mjs +64 -50
- package/dist/esm/api/resources/databases/client/Client.mjs +73 -57
- package/dist/esm/api/resources/meetings/client/Client.mjs +28 -22
- package/dist/esm/api/resources/query/client/Client.mjs +10 -8
- package/dist/esm/api/resources/semanticModel/client/Client.mjs +28 -22
- package/dist/esm/api/resources/sessions/client/Client.mjs +46 -36
- package/dist/esm/api/resources/threads/client/Client.mjs +46 -36
- package/dist/esm/api/resources/tools/client/Client.mjs +79 -63
- package/dist/esm/api/resources/tools/resources/calendar/client/Client.mjs +10 -8
- package/dist/esm/api/resources/tools/resources/email/client/Client.mjs +19 -15
- package/dist/esm/api/resources/tools/resources/sheets/client/Client.mjs +154 -120
- package/dist/esm/api/resources/tools/resources/structuredDataExtractor/client/Client.mjs +10 -8
- package/dist/esm/api/resources/tools/resources/tasks/client/Client.mjs +10 -8
- package/dist/esm/api/resources/users/client/Client.mjs +46 -36
- package/dist/esm/api/resources/workspaces/client/Client.mjs +64 -50
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
|
@@ -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,
|
|
91
|
-
|
|
92
|
-
|
|
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: ((
|
|
100
|
-
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: (
|
|
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,
|
|
195
|
-
|
|
196
|
-
|
|
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: ((
|
|
201
|
-
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: (
|
|
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) {
|