@athenaintel/sdk 4.3.2158 → 4.3.2159
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/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/errors/TooManyRequestsError.d.ts +1 -1
- package/dist/cjs/api/resources/tools/resources/calendar/client/Client.d.ts +20 -13
- package/dist/cjs/api/resources/tools/resources/calendar/client/Client.js +70 -71
- package/dist/cjs/api/resources/tools/resources/calendar/client/index.d.ts +1 -1
- package/dist/cjs/api/resources/tools/resources/calendar/client/index.js +15 -0
- package/dist/cjs/api/resources/tools/resources/calendar/client/requests/ListEventsCalendarRequest.d.ts +22 -0
- package/dist/cjs/api/resources/tools/resources/calendar/client/requests/ListEventsCalendarRequest.js +3 -0
- package/dist/cjs/api/resources/tools/resources/calendar/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/tools/resources/calendar/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/tools/resources/email/client/Client.d.ts +40 -16
- package/dist/cjs/api/resources/tools/resources/email/client/Client.js +105 -82
- package/dist/cjs/api/resources/tools/resources/email/client/index.d.ts +1 -1
- package/dist/cjs/api/resources/tools/resources/email/client/index.js +15 -0
- package/dist/cjs/api/resources/tools/resources/email/client/requests/EmailDraftRequestIn.d.ts +27 -0
- package/dist/cjs/api/resources/tools/resources/email/client/requests/EmailDraftRequestIn.js +3 -0
- package/dist/cjs/api/resources/tools/resources/email/client/requests/SearchEmailRequest.d.ts +15 -0
- package/dist/cjs/api/resources/tools/resources/email/client/requests/SearchEmailRequest.js +3 -0
- package/dist/cjs/api/resources/tools/resources/email/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/tools/resources/email/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/tools/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/tools/resources/index.js +5 -3
- package/dist/cjs/api/types/CalendarAttendeeOut.d.ts +11 -0
- package/dist/cjs/api/types/CalendarAttendeeOut.js +3 -0
- package/dist/cjs/api/types/CalendarEventOut.d.ts +28 -0
- package/dist/cjs/api/types/CalendarEventOut.js +3 -0
- package/dist/cjs/api/types/CalendarEventsResponseOut.d.ts +14 -0
- package/dist/cjs/api/types/CalendarEventsResponseOut.js +3 -0
- package/dist/cjs/api/types/EmailDraftResponseOut.d.ts +23 -0
- package/dist/cjs/api/types/EmailDraftResponseOut.js +3 -0
- package/dist/cjs/api/types/EmailSearchResponseOut.d.ts +22 -0
- package/dist/cjs/api/types/EmailSearchResponseOut.js +3 -0
- package/dist/cjs/api/types/EmailSearchResultOut.d.ts +25 -0
- package/dist/cjs/api/types/EmailSearchResultOut.js +3 -0
- package/dist/cjs/api/types/index.d.ts +6 -0
- package/dist/cjs/api/types/index.js +6 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/errors/TooManyRequestsError.d.mts +1 -1
- package/dist/esm/api/resources/tools/resources/calendar/client/Client.d.mts +20 -13
- package/dist/esm/api/resources/tools/resources/calendar/client/Client.mjs +70 -71
- package/dist/esm/api/resources/tools/resources/calendar/client/index.d.mts +1 -1
- package/dist/esm/api/resources/tools/resources/calendar/client/index.mjs +1 -1
- package/dist/esm/api/resources/tools/resources/calendar/client/requests/ListEventsCalendarRequest.d.mts +22 -0
- package/dist/esm/api/resources/tools/resources/calendar/client/requests/ListEventsCalendarRequest.mjs +2 -0
- package/dist/esm/api/resources/tools/resources/calendar/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/tools/resources/calendar/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/tools/resources/email/client/Client.d.mts +40 -16
- package/dist/esm/api/resources/tools/resources/email/client/Client.mjs +105 -82
- package/dist/esm/api/resources/tools/resources/email/client/index.d.mts +1 -1
- package/dist/esm/api/resources/tools/resources/email/client/index.mjs +1 -1
- package/dist/esm/api/resources/tools/resources/email/client/requests/EmailDraftRequestIn.d.mts +27 -0
- package/dist/esm/api/resources/tools/resources/email/client/requests/EmailDraftRequestIn.mjs +2 -0
- package/dist/esm/api/resources/tools/resources/email/client/requests/SearchEmailRequest.d.mts +15 -0
- package/dist/esm/api/resources/tools/resources/email/client/requests/SearchEmailRequest.mjs +2 -0
- package/dist/esm/api/resources/tools/resources/email/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/tools/resources/email/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/tools/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/tools/resources/index.mjs +2 -0
- package/dist/esm/api/types/CalendarAttendeeOut.d.mts +11 -0
- package/dist/esm/api/types/CalendarAttendeeOut.mjs +2 -0
- package/dist/esm/api/types/CalendarEventOut.d.mts +28 -0
- package/dist/esm/api/types/CalendarEventOut.mjs +2 -0
- package/dist/esm/api/types/CalendarEventsResponseOut.d.mts +14 -0
- package/dist/esm/api/types/CalendarEventsResponseOut.mjs +2 -0
- package/dist/esm/api/types/EmailDraftResponseOut.d.mts +23 -0
- package/dist/esm/api/types/EmailDraftResponseOut.mjs +2 -0
- package/dist/esm/api/types/EmailSearchResponseOut.d.mts +22 -0
- package/dist/esm/api/types/EmailSearchResponseOut.mjs +2 -0
- package/dist/esm/api/types/EmailSearchResultOut.d.mts +25 -0
- package/dist/esm/api/types/EmailSearchResultOut.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +6 -0
- package/dist/esm/api/types/index.mjs +6 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +44 -105
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "@athenaintel/sdk",
|
|
46
|
-
"X-Fern-SDK-Version": "4.3.
|
|
47
|
-
"User-Agent": "@athenaintel/sdk/4.3.
|
|
46
|
+
"X-Fern-SDK-Version": "4.3.2159",
|
|
47
|
+
"User-Agent": "@athenaintel/sdk/4.3.2159",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as core from "../../core/index.js";
|
|
2
2
|
import * as errors from "../../errors/index.js";
|
|
3
3
|
export declare class TooManyRequestsError extends errors.AthenaIntelligenceError {
|
|
4
|
-
constructor(body
|
|
4
|
+
constructor(body?: unknown, rawResponse?: core.RawResponse);
|
|
5
5
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
|
|
2
2
|
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
|
|
3
3
|
import * as core from "../../../../../../core/index.js";
|
|
4
|
+
import * as AthenaIntelligence from "../../../../../index.js";
|
|
4
5
|
export declare namespace CalendarClient {
|
|
5
6
|
interface Options extends BaseClientOptions {
|
|
6
7
|
}
|
|
@@ -11,23 +12,29 @@ export declare class CalendarClient {
|
|
|
11
12
|
protected readonly _options: NormalizedClientOptionsWithAuth<CalendarClient.Options>;
|
|
12
13
|
constructor(options?: CalendarClient.Options);
|
|
13
14
|
/**
|
|
14
|
-
*
|
|
15
|
+
* List events on the calendar of the caller's connected account.
|
|
15
16
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
|
|
21
|
-
listEvents(requestOptions?: CalendarClient.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
22
|
-
private __listEvents;
|
|
23
|
-
/**
|
|
24
|
-
* Coming soon! Create new calendar events.
|
|
17
|
+
* Reads the primary Google Calendar of a Gmail account or the default calendar
|
|
18
|
+
* of an Outlook account. `start`/`end` select the events overlapping that
|
|
19
|
+
* window; without them, Outlook returns recurring series as single entries, so
|
|
20
|
+
* supply a window to expand them. `title`, `location` and `attendees` filter the
|
|
21
|
+
* events that were read.
|
|
25
22
|
*
|
|
23
|
+
* @param {AthenaIntelligence.tools.ListEventsCalendarRequest} request
|
|
26
24
|
* @param {CalendarClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
25
|
*
|
|
26
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
27
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
28
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
29
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
30
|
+
* @throws {@link AthenaIntelligence.TooManyRequestsError}
|
|
31
|
+
* @throws {@link AthenaIntelligence.BadGatewayError}
|
|
32
|
+
*
|
|
28
33
|
* @example
|
|
29
|
-
* await client.tools.calendar.
|
|
34
|
+
* await client.tools.calendar.listEvents({
|
|
35
|
+
* limit: 50
|
|
36
|
+
* })
|
|
30
37
|
*/
|
|
31
|
-
|
|
32
|
-
private
|
|
38
|
+
listEvents(request?: AthenaIntelligence.tools.ListEventsCalendarRequest, requestOptions?: CalendarClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.CalendarEventsResponseOut>;
|
|
39
|
+
private __listEvents;
|
|
33
40
|
}
|
|
@@ -49,90 +49,71 @@ const headers_js_1 = require("../../../../../../core/headers.js");
|
|
|
49
49
|
const core = __importStar(require("../../../../../../core/index.js"));
|
|
50
50
|
const environments = __importStar(require("../../../../../../environments.js"));
|
|
51
51
|
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
52
|
+
const AthenaIntelligence = __importStar(require("../../../../../index.js"));
|
|
52
53
|
class CalendarClient {
|
|
53
54
|
constructor(options = {}) {
|
|
54
55
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
55
56
|
}
|
|
56
57
|
/**
|
|
57
|
-
*
|
|
58
|
+
* List events on the calendar of the caller's connected account.
|
|
58
59
|
*
|
|
60
|
+
* Reads the primary Google Calendar of a Gmail account or the default calendar
|
|
61
|
+
* of an Outlook account. `start`/`end` select the events overlapping that
|
|
62
|
+
* window; without them, Outlook returns recurring series as single entries, so
|
|
63
|
+
* supply a window to expand them. `title`, `location` and `attendees` filter the
|
|
64
|
+
* events that were read.
|
|
65
|
+
*
|
|
66
|
+
* @param {AthenaIntelligence.tools.ListEventsCalendarRequest} request
|
|
59
67
|
* @param {CalendarClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
60
68
|
*
|
|
69
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
70
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
71
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
72
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
73
|
+
* @throws {@link AthenaIntelligence.TooManyRequestsError}
|
|
74
|
+
* @throws {@link AthenaIntelligence.BadGatewayError}
|
|
75
|
+
*
|
|
61
76
|
* @example
|
|
62
|
-
* await client.tools.calendar.listEvents(
|
|
77
|
+
* await client.tools.calendar.listEvents({
|
|
78
|
+
* limit: 50
|
|
79
|
+
* })
|
|
63
80
|
*/
|
|
64
|
-
listEvents(requestOptions) {
|
|
65
|
-
return core.HttpResponsePromise.fromPromise(this.__listEvents(requestOptions));
|
|
81
|
+
listEvents(request = {}, requestOptions) {
|
|
82
|
+
return core.HttpResponsePromise.fromPromise(this.__listEvents(request, requestOptions));
|
|
66
83
|
}
|
|
67
|
-
__listEvents(
|
|
68
|
-
return __awaiter(this,
|
|
84
|
+
__listEvents() {
|
|
85
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
69
86
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
70
|
-
const
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
method: "GET",
|
|
75
|
-
headers: _headers,
|
|
76
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
77
|
-
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,
|
|
78
|
-
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,
|
|
79
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
80
|
-
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
81
|
-
logging: this._options.logging,
|
|
82
|
-
});
|
|
83
|
-
if (_response.ok) {
|
|
84
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
87
|
+
const { title, start, end, location, attendees, limit, catalog_id: catalogId } = request;
|
|
88
|
+
const _queryParams = {};
|
|
89
|
+
if (title !== undefined) {
|
|
90
|
+
_queryParams.title = title;
|
|
85
91
|
}
|
|
86
|
-
if (
|
|
87
|
-
|
|
88
|
-
statusCode: _response.error.statusCode,
|
|
89
|
-
body: _response.error.body,
|
|
90
|
-
rawResponse: _response.rawResponse,
|
|
91
|
-
});
|
|
92
|
+
if (start !== undefined) {
|
|
93
|
+
_queryParams.start = start;
|
|
92
94
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
case "unknown":
|
|
108
|
-
throw new errors.AthenaIntelligenceError({
|
|
109
|
-
message: _response.error.errorMessage,
|
|
110
|
-
rawResponse: _response.rawResponse,
|
|
111
|
-
});
|
|
95
|
+
if (end !== undefined) {
|
|
96
|
+
_queryParams.end = end;
|
|
97
|
+
}
|
|
98
|
+
if (location !== undefined) {
|
|
99
|
+
_queryParams.location = location;
|
|
100
|
+
}
|
|
101
|
+
if (attendees !== undefined) {
|
|
102
|
+
_queryParams.attendees = attendees;
|
|
103
|
+
}
|
|
104
|
+
if (limit != null) {
|
|
105
|
+
_queryParams.limit = limit.toString();
|
|
106
|
+
}
|
|
107
|
+
if (catalogId !== undefined) {
|
|
108
|
+
_queryParams.catalog_id = catalogId;
|
|
112
109
|
}
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Coming soon! Create new calendar events.
|
|
117
|
-
*
|
|
118
|
-
* @param {CalendarClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
119
|
-
*
|
|
120
|
-
* @example
|
|
121
|
-
* await client.tools.calendar.createEvent()
|
|
122
|
-
*/
|
|
123
|
-
createEvent(requestOptions) {
|
|
124
|
-
return core.HttpResponsePromise.fromPromise(this.__createEvent(requestOptions));
|
|
125
|
-
}
|
|
126
|
-
__createEvent(requestOptions) {
|
|
127
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
128
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
129
110
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
130
111
|
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);
|
|
131
112
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
132
113
|
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/calendar/events"),
|
|
133
|
-
method: "
|
|
114
|
+
method: "GET",
|
|
134
115
|
headers: _headers,
|
|
135
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
116
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
136
117
|
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,
|
|
137
118
|
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,
|
|
138
119
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -140,14 +121,32 @@ class CalendarClient {
|
|
|
140
121
|
logging: this._options.logging,
|
|
141
122
|
});
|
|
142
123
|
if (_response.ok) {
|
|
143
|
-
return {
|
|
124
|
+
return {
|
|
125
|
+
data: _response.body,
|
|
126
|
+
rawResponse: _response.rawResponse,
|
|
127
|
+
};
|
|
144
128
|
}
|
|
145
129
|
if (_response.error.reason === "status-code") {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
130
|
+
switch (_response.error.statusCode) {
|
|
131
|
+
case 400:
|
|
132
|
+
throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
|
|
133
|
+
case 403:
|
|
134
|
+
throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
135
|
+
case 404:
|
|
136
|
+
throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
|
|
137
|
+
case 422:
|
|
138
|
+
throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
139
|
+
case 429:
|
|
140
|
+
throw new AthenaIntelligence.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
141
|
+
case 502:
|
|
142
|
+
throw new AthenaIntelligence.BadGatewayError(_response.error.body, _response.rawResponse);
|
|
143
|
+
default:
|
|
144
|
+
throw new errors.AthenaIntelligenceError({
|
|
145
|
+
statusCode: _response.error.statusCode,
|
|
146
|
+
body: _response.error.body,
|
|
147
|
+
rawResponse: _response.rawResponse,
|
|
148
|
+
});
|
|
149
|
+
}
|
|
151
150
|
}
|
|
152
151
|
switch (_response.error.reason) {
|
|
153
152
|
case "non-json":
|
|
@@ -162,7 +161,7 @@ class CalendarClient {
|
|
|
162
161
|
rawResponse: _response.rawResponse,
|
|
163
162
|
});
|
|
164
163
|
case "timeout":
|
|
165
|
-
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling
|
|
164
|
+
throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/tools/calendar/events.");
|
|
166
165
|
case "unknown":
|
|
167
166
|
throw new errors.AthenaIntelligenceError({
|
|
168
167
|
message: _response.error.errorMessage,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./requests/index.js";
|
|
@@ -1,2 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests/index.js"), exports);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* limit: 50
|
|
5
|
+
* }
|
|
6
|
+
*/
|
|
7
|
+
export interface ListEventsCalendarRequest {
|
|
8
|
+
/** Text filter. On Outlook this matches the event title only (`contains(subject, …)`); on Google Calendar it is Google's free-text event search (`q`), which also matches the description, location and attendee names. */
|
|
9
|
+
title?: string | null;
|
|
10
|
+
/** Window start. `start` and `end` select events that overlap the window: an event that begins before `start` but is still running at `start` is included. ISO 8601 with an explicit UTC offset or Z (e.g. `2026-10-01T00:00:00-04:00`); the instant is forwarded in RFC 3339 form. Recurring series are expanded into their instances inside the window. Given only one bound, Google leaves the other side open while Outlook derives it 60 days away. */
|
|
11
|
+
start?: string | null;
|
|
12
|
+
/** Window end (see `start`); must be later than `start` when both are given. ISO 8601 with an explicit UTC offset or Z. */
|
|
13
|
+
end?: string | null;
|
|
14
|
+
/** Only events whose location contains this text. Applied after up to `limit` events have been read from the provider, so narrow the window with `start`/`end` when looking for a specific event. */
|
|
15
|
+
location?: string | null;
|
|
16
|
+
/** Only events with at least one of these attendee emails (comma-separated). Applied after up to `limit` events have been read from the provider, so narrow the window with `start`/`end` when looking for a specific event. */
|
|
17
|
+
attendees?: string | null;
|
|
18
|
+
/** Maximum number of events (1-200). */
|
|
19
|
+
limit?: number;
|
|
20
|
+
/** Connected email account to use, as the catalog asset id returned by the Athena UI or the assets API. Defaults to the caller's default email account. An id that is not one of the caller's own connected accounts in the current workspace is a 404. */
|
|
21
|
+
catalog_id?: string | null;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { ListEventsCalendarRequest } from "./ListEventsCalendarRequest.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
|
|
2
2
|
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
|
|
3
3
|
import * as core from "../../../../../../core/index.js";
|
|
4
|
+
import * as AthenaIntelligence from "../../../../../index.js";
|
|
4
5
|
export declare namespace EmailClient {
|
|
5
6
|
interface Options extends BaseClientOptions {
|
|
6
7
|
}
|
|
@@ -11,33 +12,56 @@ export declare class EmailClient {
|
|
|
11
12
|
protected readonly _options: NormalizedClientOptionsWithAuth<EmailClient.Options>;
|
|
12
13
|
constructor(options?: EmailClient.Options);
|
|
13
14
|
/**
|
|
14
|
-
*
|
|
15
|
+
* Save a draft in the caller's connected Gmail or Outlook account.
|
|
15
16
|
*
|
|
17
|
+
* Nothing is sent. The draft appears in the account's Drafts folder, where it
|
|
18
|
+
* is reviewed, edited and sent from the mail client — that review step is why
|
|
19
|
+
* drafting is available here while sending is not. Set `reply_to_message_id`
|
|
20
|
+
* to thread the draft as a reply.
|
|
21
|
+
*
|
|
22
|
+
* @param {AthenaIntelligence.tools.EmailDraftRequestIn} request
|
|
16
23
|
* @param {EmailClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
17
24
|
*
|
|
25
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
26
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
27
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
28
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
29
|
+
* @throws {@link AthenaIntelligence.TooManyRequestsError}
|
|
30
|
+
* @throws {@link AthenaIntelligence.BadGatewayError}
|
|
31
|
+
*
|
|
18
32
|
* @example
|
|
19
|
-
* await client.tools.email.createDraft(
|
|
33
|
+
* await client.tools.email.createDraft({
|
|
34
|
+
* body: "Hi Ada,<br><br>Attached below is the Q3 forecast summary.",
|
|
35
|
+
* cc: ["grace@example.com"],
|
|
36
|
+
* subject: "Q3 forecast",
|
|
37
|
+
* to: ["ada@example.com"]
|
|
38
|
+
* })
|
|
20
39
|
*/
|
|
21
|
-
createDraft(requestOptions?: EmailClient.RequestOptions): core.HttpResponsePromise<
|
|
40
|
+
createDraft(request: AthenaIntelligence.tools.EmailDraftRequestIn, requestOptions?: EmailClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.EmailDraftResponseOut>;
|
|
22
41
|
private __createDraft;
|
|
23
42
|
/**
|
|
24
|
-
*
|
|
43
|
+
* Search the caller's connected Gmail or Outlook mailbox.
|
|
25
44
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* await client.tools.email.search()
|
|
30
|
-
*/
|
|
31
|
-
search(requestOptions?: EmailClient.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
32
|
-
private __search;
|
|
33
|
-
/**
|
|
34
|
-
* Coming soon! Send emails to specified recipients.
|
|
45
|
+
* Results come from the connected account the caller can access in their
|
|
46
|
+
* current workspace (the default account unless `catalog_id` names another).
|
|
47
|
+
* Unsent drafts are included and flagged with `is_draft`.
|
|
35
48
|
*
|
|
49
|
+
* @param {AthenaIntelligence.tools.SearchEmailRequest} request
|
|
36
50
|
* @param {EmailClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
51
|
*
|
|
52
|
+
* @throws {@link AthenaIntelligence.BadRequestError}
|
|
53
|
+
* @throws {@link AthenaIntelligence.ForbiddenError}
|
|
54
|
+
* @throws {@link AthenaIntelligence.NotFoundError}
|
|
55
|
+
* @throws {@link AthenaIntelligence.UnprocessableEntityError}
|
|
56
|
+
* @throws {@link AthenaIntelligence.TooManyRequestsError}
|
|
57
|
+
* @throws {@link AthenaIntelligence.BadGatewayError}
|
|
58
|
+
*
|
|
38
59
|
* @example
|
|
39
|
-
* await client.tools.email.
|
|
60
|
+
* await client.tools.email.search({
|
|
61
|
+
* query: "from:ada@example.com newer_than:7d",
|
|
62
|
+
* limit: 20
|
|
63
|
+
* })
|
|
40
64
|
*/
|
|
41
|
-
|
|
42
|
-
private
|
|
65
|
+
search(request: AthenaIntelligence.tools.SearchEmailRequest, requestOptions?: EmailClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.EmailSearchResponseOut>;
|
|
66
|
+
private __search;
|
|
43
67
|
}
|