@athenaintel/sdk 4.3.2268 → 4.3.2269

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 (26) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/tools/resources/email/client/Client.d.ts +24 -0
  3. package/dist/cjs/api/resources/tools/resources/email/client/Client.js +98 -0
  4. package/dist/cjs/api/resources/tools/resources/email/client/requests/GetMessageEmailRequest.d.ts +12 -0
  5. package/dist/cjs/api/resources/tools/resources/email/client/requests/GetMessageEmailRequest.js +3 -0
  6. package/dist/cjs/api/resources/tools/resources/email/client/requests/index.d.ts +1 -0
  7. package/dist/cjs/api/types/EmailMessageResponseOut.d.ts +33 -0
  8. package/dist/cjs/api/types/EmailMessageResponseOut.js +3 -0
  9. package/dist/cjs/api/types/index.d.ts +1 -0
  10. package/dist/cjs/api/types/index.js +1 -0
  11. package/dist/cjs/version.d.ts +1 -1
  12. package/dist/cjs/version.js +1 -1
  13. package/dist/esm/BaseClient.mjs +2 -2
  14. package/dist/esm/api/resources/tools/resources/email/client/Client.d.mts +24 -0
  15. package/dist/esm/api/resources/tools/resources/email/client/Client.mjs +98 -0
  16. package/dist/esm/api/resources/tools/resources/email/client/requests/GetMessageEmailRequest.d.mts +12 -0
  17. package/dist/esm/api/resources/tools/resources/email/client/requests/GetMessageEmailRequest.mjs +2 -0
  18. package/dist/esm/api/resources/tools/resources/email/client/requests/index.d.mts +1 -0
  19. package/dist/esm/api/types/EmailMessageResponseOut.d.mts +33 -0
  20. package/dist/esm/api/types/EmailMessageResponseOut.mjs +2 -0
  21. package/dist/esm/api/types/index.d.mts +1 -0
  22. package/dist/esm/api/types/index.mjs +1 -0
  23. package/dist/esm/version.d.mts +1 -1
  24. package/dist/esm/version.mjs +1 -1
  25. package/package.json +1 -1
  26. package/reference.md +69 -0
@@ -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.2268",
47
- "User-Agent": "@athenaintel/sdk/4.3.2268",
46
+ "X-Fern-SDK-Version": "4.3.2269",
47
+ "User-Agent": "@athenaintel/sdk/4.3.2269",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  "X-Athena-Session-Credential": options === null || options === void 0 ? void 0 : options.sessionCredential,
@@ -39,6 +39,30 @@ export declare class EmailClient {
39
39
  */
40
40
  createDraft(request: AthenaIntelligence.tools.EmailDraftRequestIn, requestOptions?: EmailClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.EmailDraftResponseOut>;
41
41
  private __createDraft;
42
+ /**
43
+ * Read one message from the caller's connected Gmail or Outlook mailbox.
44
+ *
45
+ * Returns its headers and its body as plain text, so an agent can keep the
46
+ * whole email (in a CRM timeline, for example) rather than the search
47
+ * snippet. Read-only; attachments are not returned.
48
+ *
49
+ * @param {AthenaIntelligence.tools.GetMessageEmailRequest} request
50
+ * @param {EmailClient.RequestOptions} requestOptions - Request-specific configuration.
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
+ *
59
+ * @example
60
+ * await client.tools.email.getMessage({
61
+ * message_id: "18f2a7c3b9d4e5f6"
62
+ * })
63
+ */
64
+ getMessage(request: AthenaIntelligence.tools.GetMessageEmailRequest, requestOptions?: EmailClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.EmailMessageResponseOut>;
65
+ private __getMessage;
42
66
  /**
43
67
  * Search the caller's connected Gmail or Outlook mailbox.
44
68
  *
@@ -154,6 +154,104 @@ class EmailClient {
154
154
  }
155
155
  });
156
156
  }
157
+ /**
158
+ * Read one message from the caller's connected Gmail or Outlook mailbox.
159
+ *
160
+ * Returns its headers and its body as plain text, so an agent can keep the
161
+ * whole email (in a CRM timeline, for example) rather than the search
162
+ * snippet. Read-only; attachments are not returned.
163
+ *
164
+ * @param {AthenaIntelligence.tools.GetMessageEmailRequest} request
165
+ * @param {EmailClient.RequestOptions} requestOptions - Request-specific configuration.
166
+ *
167
+ * @throws {@link AthenaIntelligence.BadRequestError}
168
+ * @throws {@link AthenaIntelligence.ForbiddenError}
169
+ * @throws {@link AthenaIntelligence.NotFoundError}
170
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
171
+ * @throws {@link AthenaIntelligence.TooManyRequestsError}
172
+ * @throws {@link AthenaIntelligence.BadGatewayError}
173
+ *
174
+ * @example
175
+ * await client.tools.email.getMessage({
176
+ * message_id: "18f2a7c3b9d4e5f6"
177
+ * })
178
+ */
179
+ getMessage(request, requestOptions) {
180
+ return core.HttpResponsePromise.fromPromise(this.__getMessage(request, requestOptions));
181
+ }
182
+ __getMessage(request, requestOptions) {
183
+ return __awaiter(this, void 0, void 0, function* () {
184
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
185
+ const { message_id: messageId, catalog_id: catalogId } = request;
186
+ const _queryParams = {};
187
+ if (catalogId !== undefined) {
188
+ _queryParams.catalog_id = catalogId;
189
+ }
190
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
191
+ 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)({
192
+ "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,
193
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
194
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
195
+ 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/messages/${core.url.encodePathParam(messageId)}`),
196
+ method: "GET",
197
+ headers: _headers,
198
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
199
+ 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,
200
+ 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,
201
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
202
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
203
+ logging: this._options.logging,
204
+ });
205
+ if (_response.ok) {
206
+ return {
207
+ data: _response.body,
208
+ rawResponse: _response.rawResponse,
209
+ };
210
+ }
211
+ if (_response.error.reason === "status-code") {
212
+ switch (_response.error.statusCode) {
213
+ case 400:
214
+ throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
215
+ case 403:
216
+ throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
217
+ case 404:
218
+ throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
219
+ case 422:
220
+ throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
221
+ case 429:
222
+ throw new AthenaIntelligence.TooManyRequestsError(_response.error.body, _response.rawResponse);
223
+ case 502:
224
+ throw new AthenaIntelligence.BadGatewayError(_response.error.body, _response.rawResponse);
225
+ default:
226
+ throw new errors.AthenaIntelligenceError({
227
+ statusCode: _response.error.statusCode,
228
+ body: _response.error.body,
229
+ rawResponse: _response.rawResponse,
230
+ });
231
+ }
232
+ }
233
+ switch (_response.error.reason) {
234
+ case "non-json":
235
+ throw new errors.AthenaIntelligenceError({
236
+ statusCode: _response.error.statusCode,
237
+ body: _response.error.rawBody,
238
+ rawResponse: _response.rawResponse,
239
+ });
240
+ case "body-is-null":
241
+ throw new errors.AthenaIntelligenceError({
242
+ statusCode: _response.error.statusCode,
243
+ rawResponse: _response.rawResponse,
244
+ });
245
+ case "timeout":
246
+ throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/tools/email/messages/{message_id}.");
247
+ case "unknown":
248
+ throw new errors.AthenaIntelligenceError({
249
+ message: _response.error.errorMessage,
250
+ rawResponse: _response.rawResponse,
251
+ });
252
+ }
253
+ });
254
+ }
157
255
  /**
158
256
  * Search the caller's connected Gmail or Outlook mailbox.
159
257
  *
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * message_id: "18f2a7c3b9d4e5f6"
5
+ * }
6
+ */
7
+ export interface GetMessageEmailRequest {
8
+ /** Provider message id, as `GET /tools/email/search` returns it in `results[].id`. */
9
+ message_id: string;
10
+ /** 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. */
11
+ catalog_id?: string | null;
12
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +1,3 @@
1
1
  export type { EmailDraftRequestIn } from "./EmailDraftRequestIn.js";
2
+ export type { GetMessageEmailRequest } from "./GetMessageEmailRequest.js";
2
3
  export type { SearchEmailRequest } from "./SearchEmailRequest.js";
@@ -0,0 +1,33 @@
1
+ /**
2
+ * One message's headers and plain-text body.
3
+ */
4
+ export interface EmailMessageResponseOut {
5
+ /** The message body as plain text, HTML converted. At most 50,000 characters; see `truncated`. */
6
+ body_text?: string;
7
+ /** The connected account the message was read from. */
8
+ catalog_id: string;
9
+ /** Cc recipients, comma-separated as the provider reports them. */
10
+ cc?: string;
11
+ /** Microsoft Graph conversation id. Outlook accounts only. */
12
+ conversation_id?: string | null;
13
+ /** Sent or received timestamp, in the provider's format. */
14
+ date?: string;
15
+ /** Provider draft id, when the provider exposes one for a draft. */
16
+ draft_id?: string | null;
17
+ /** Sender, as the provider reports it. */
18
+ from?: string;
19
+ /** Provider message id, as `GET /tools/email/search` returns it and `reply_to_message_id` accepts. */
20
+ id: string;
21
+ /** True when the message is an unsent draft sitting in the mailbox. */
22
+ is_draft?: boolean;
23
+ /** Account provider as Athena reports it: `gmail` or `outlook` for accounts connected through the Integrations page; `google` or `microsoft365` for directly-connected accounts. */
24
+ provider: string;
25
+ /** Subject line. */
26
+ subject?: string;
27
+ /** Gmail thread id. Gmail accounts only. */
28
+ thread_id?: string | null;
29
+ /** Recipients, comma-separated as the provider reports them. */
30
+ to?: string;
31
+ /** True when `body_text` was cut to its maximum length. */
32
+ truncated?: boolean;
33
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -72,6 +72,7 @@ export * from "./DeployComputerResponseOut.js";
72
72
  export * from "./DimensionProperties.js";
73
73
  export * from "./DuplicateAssetResponseOut.js";
74
74
  export * from "./EmailDraftResponseOut.js";
75
+ export * from "./EmailMessageResponseOut.js";
75
76
  export * from "./EmailSearchResponseOut.js";
76
77
  export * from "./EmailSearchResultOut.js";
77
78
  export * from "./FileTooLargeError.js";
@@ -88,6 +88,7 @@ __exportStar(require("./DeployComputerResponseOut.js"), exports);
88
88
  __exportStar(require("./DimensionProperties.js"), exports);
89
89
  __exportStar(require("./DuplicateAssetResponseOut.js"), exports);
90
90
  __exportStar(require("./EmailDraftResponseOut.js"), exports);
91
+ __exportStar(require("./EmailMessageResponseOut.js"), exports);
91
92
  __exportStar(require("./EmailSearchResponseOut.js"), exports);
92
93
  __exportStar(require("./EmailSearchResultOut.js"), exports);
93
94
  __exportStar(require("./FileTooLargeError.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "4.3.2268";
1
+ export declare const SDK_VERSION = "4.3.2269";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "4.3.2268";
4
+ exports.SDK_VERSION = "4.3.2269";
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "@athenaintel/sdk",
9
- "X-Fern-SDK-Version": "4.3.2268",
10
- "User-Agent": "@athenaintel/sdk/4.3.2268",
9
+ "X-Fern-SDK-Version": "4.3.2269",
10
+ "User-Agent": "@athenaintel/sdk/4.3.2269",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  "X-Athena-Session-Credential": options === null || options === void 0 ? void 0 : options.sessionCredential,
@@ -39,6 +39,30 @@ export declare class EmailClient {
39
39
  */
40
40
  createDraft(request: AthenaIntelligence.tools.EmailDraftRequestIn, requestOptions?: EmailClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.EmailDraftResponseOut>;
41
41
  private __createDraft;
42
+ /**
43
+ * Read one message from the caller's connected Gmail or Outlook mailbox.
44
+ *
45
+ * Returns its headers and its body as plain text, so an agent can keep the
46
+ * whole email (in a CRM timeline, for example) rather than the search
47
+ * snippet. Read-only; attachments are not returned.
48
+ *
49
+ * @param {AthenaIntelligence.tools.GetMessageEmailRequest} request
50
+ * @param {EmailClient.RequestOptions} requestOptions - Request-specific configuration.
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
+ *
59
+ * @example
60
+ * await client.tools.email.getMessage({
61
+ * message_id: "18f2a7c3b9d4e5f6"
62
+ * })
63
+ */
64
+ getMessage(request: AthenaIntelligence.tools.GetMessageEmailRequest, requestOptions?: EmailClient.RequestOptions): core.HttpResponsePromise<AthenaIntelligence.EmailMessageResponseOut>;
65
+ private __getMessage;
42
66
  /**
43
67
  * Search the caller's connected Gmail or Outlook mailbox.
44
68
  *
@@ -118,6 +118,104 @@ export class EmailClient {
118
118
  }
119
119
  });
120
120
  }
121
+ /**
122
+ * Read one message from the caller's connected Gmail or Outlook mailbox.
123
+ *
124
+ * Returns its headers and its body as plain text, so an agent can keep the
125
+ * whole email (in a CRM timeline, for example) rather than the search
126
+ * snippet. Read-only; attachments are not returned.
127
+ *
128
+ * @param {AthenaIntelligence.tools.GetMessageEmailRequest} request
129
+ * @param {EmailClient.RequestOptions} requestOptions - Request-specific configuration.
130
+ *
131
+ * @throws {@link AthenaIntelligence.BadRequestError}
132
+ * @throws {@link AthenaIntelligence.ForbiddenError}
133
+ * @throws {@link AthenaIntelligence.NotFoundError}
134
+ * @throws {@link AthenaIntelligence.UnprocessableEntityError}
135
+ * @throws {@link AthenaIntelligence.TooManyRequestsError}
136
+ * @throws {@link AthenaIntelligence.BadGatewayError}
137
+ *
138
+ * @example
139
+ * await client.tools.email.getMessage({
140
+ * message_id: "18f2a7c3b9d4e5f6"
141
+ * })
142
+ */
143
+ getMessage(request, requestOptions) {
144
+ return core.HttpResponsePromise.fromPromise(this.__getMessage(request, requestOptions));
145
+ }
146
+ __getMessage(request, requestOptions) {
147
+ return __awaiter(this, void 0, void 0, function* () {
148
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
149
+ const { message_id: messageId, catalog_id: catalogId } = request;
150
+ const _queryParams = {};
151
+ if (catalogId !== undefined) {
152
+ _queryParams.catalog_id = catalogId;
153
+ }
154
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
155
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
156
+ "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,
157
+ }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
158
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
159
+ 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/messages/${core.url.encodePathParam(messageId)}`),
160
+ method: "GET",
161
+ headers: _headers,
162
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
163
+ 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,
164
+ 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,
165
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
166
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
167
+ logging: this._options.logging,
168
+ });
169
+ if (_response.ok) {
170
+ return {
171
+ data: _response.body,
172
+ rawResponse: _response.rawResponse,
173
+ };
174
+ }
175
+ if (_response.error.reason === "status-code") {
176
+ switch (_response.error.statusCode) {
177
+ case 400:
178
+ throw new AthenaIntelligence.BadRequestError(_response.error.body, _response.rawResponse);
179
+ case 403:
180
+ throw new AthenaIntelligence.ForbiddenError(_response.error.body, _response.rawResponse);
181
+ case 404:
182
+ throw new AthenaIntelligence.NotFoundError(_response.error.body, _response.rawResponse);
183
+ case 422:
184
+ throw new AthenaIntelligence.UnprocessableEntityError(_response.error.body, _response.rawResponse);
185
+ case 429:
186
+ throw new AthenaIntelligence.TooManyRequestsError(_response.error.body, _response.rawResponse);
187
+ case 502:
188
+ throw new AthenaIntelligence.BadGatewayError(_response.error.body, _response.rawResponse);
189
+ default:
190
+ throw new errors.AthenaIntelligenceError({
191
+ statusCode: _response.error.statusCode,
192
+ body: _response.error.body,
193
+ rawResponse: _response.rawResponse,
194
+ });
195
+ }
196
+ }
197
+ switch (_response.error.reason) {
198
+ case "non-json":
199
+ throw new errors.AthenaIntelligenceError({
200
+ statusCode: _response.error.statusCode,
201
+ body: _response.error.rawBody,
202
+ rawResponse: _response.rawResponse,
203
+ });
204
+ case "body-is-null":
205
+ throw new errors.AthenaIntelligenceError({
206
+ statusCode: _response.error.statusCode,
207
+ rawResponse: _response.rawResponse,
208
+ });
209
+ case "timeout":
210
+ throw new errors.AthenaIntelligenceTimeoutError("Timeout exceeded when calling GET /api/v0/tools/email/messages/{message_id}.");
211
+ case "unknown":
212
+ throw new errors.AthenaIntelligenceError({
213
+ message: _response.error.errorMessage,
214
+ rawResponse: _response.rawResponse,
215
+ });
216
+ }
217
+ });
218
+ }
121
219
  /**
122
220
  * Search the caller's connected Gmail or Outlook mailbox.
123
221
  *
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * message_id: "18f2a7c3b9d4e5f6"
5
+ * }
6
+ */
7
+ export interface GetMessageEmailRequest {
8
+ /** Provider message id, as `GET /tools/email/search` returns it in `results[].id`. */
9
+ message_id: string;
10
+ /** 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. */
11
+ catalog_id?: string | null;
12
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,2 +1,3 @@
1
1
  export type { EmailDraftRequestIn } from "./EmailDraftRequestIn.mjs";
2
+ export type { GetMessageEmailRequest } from "./GetMessageEmailRequest.mjs";
2
3
  export type { SearchEmailRequest } from "./SearchEmailRequest.mjs";
@@ -0,0 +1,33 @@
1
+ /**
2
+ * One message's headers and plain-text body.
3
+ */
4
+ export interface EmailMessageResponseOut {
5
+ /** The message body as plain text, HTML converted. At most 50,000 characters; see `truncated`. */
6
+ body_text?: string;
7
+ /** The connected account the message was read from. */
8
+ catalog_id: string;
9
+ /** Cc recipients, comma-separated as the provider reports them. */
10
+ cc?: string;
11
+ /** Microsoft Graph conversation id. Outlook accounts only. */
12
+ conversation_id?: string | null;
13
+ /** Sent or received timestamp, in the provider's format. */
14
+ date?: string;
15
+ /** Provider draft id, when the provider exposes one for a draft. */
16
+ draft_id?: string | null;
17
+ /** Sender, as the provider reports it. */
18
+ from?: string;
19
+ /** Provider message id, as `GET /tools/email/search` returns it and `reply_to_message_id` accepts. */
20
+ id: string;
21
+ /** True when the message is an unsent draft sitting in the mailbox. */
22
+ is_draft?: boolean;
23
+ /** Account provider as Athena reports it: `gmail` or `outlook` for accounts connected through the Integrations page; `google` or `microsoft365` for directly-connected accounts. */
24
+ provider: string;
25
+ /** Subject line. */
26
+ subject?: string;
27
+ /** Gmail thread id. Gmail accounts only. */
28
+ thread_id?: string | null;
29
+ /** Recipients, comma-separated as the provider reports them. */
30
+ to?: string;
31
+ /** True when `body_text` was cut to its maximum length. */
32
+ truncated?: boolean;
33
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -72,6 +72,7 @@ export * from "./DeployComputerResponseOut.mjs";
72
72
  export * from "./DimensionProperties.mjs";
73
73
  export * from "./DuplicateAssetResponseOut.mjs";
74
74
  export * from "./EmailDraftResponseOut.mjs";
75
+ export * from "./EmailMessageResponseOut.mjs";
75
76
  export * from "./EmailSearchResponseOut.mjs";
76
77
  export * from "./EmailSearchResultOut.mjs";
77
78
  export * from "./FileTooLargeError.mjs";
@@ -72,6 +72,7 @@ export * from "./DeployComputerResponseOut.mjs";
72
72
  export * from "./DimensionProperties.mjs";
73
73
  export * from "./DuplicateAssetResponseOut.mjs";
74
74
  export * from "./EmailDraftResponseOut.mjs";
75
+ export * from "./EmailMessageResponseOut.mjs";
75
76
  export * from "./EmailSearchResponseOut.mjs";
76
77
  export * from "./EmailSearchResultOut.mjs";
77
78
  export * from "./FileTooLargeError.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "4.3.2268";
1
+ export declare const SDK_VERSION = "4.3.2269";
@@ -1 +1 @@
1
- export const SDK_VERSION = "4.3.2268";
1
+ export const SDK_VERSION = "4.3.2269";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@athenaintel/sdk",
3
- "version": "4.3.2268",
3
+ "version": "4.3.2269",
4
4
  "private": false,
5
5
  "repository": "github:Athena-Intel/athena-typescript",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -6673,6 +6673,75 @@ await client.tools.email.createDraft({
6673
6673
  </dl>
6674
6674
 
6675
6675
 
6676
+ </dd>
6677
+ </dl>
6678
+ </details>
6679
+
6680
+ <details><summary><code>client.tools.email.<a href="/src/api/resources/tools/resources/email/client/Client.ts">getMessage</a>({ ...params }) -> AthenaIntelligence.EmailMessageResponseOut</code></summary>
6681
+ <dl>
6682
+ <dd>
6683
+
6684
+ #### 📝 Description
6685
+
6686
+ <dl>
6687
+ <dd>
6688
+
6689
+ <dl>
6690
+ <dd>
6691
+
6692
+ Read one message from the caller's connected Gmail or Outlook mailbox.
6693
+
6694
+ Returns its headers and its body as plain text, so an agent can keep the
6695
+ whole email (in a CRM timeline, for example) rather than the search
6696
+ snippet. Read-only; attachments are not returned.
6697
+ </dd>
6698
+ </dl>
6699
+ </dd>
6700
+ </dl>
6701
+
6702
+ #### 🔌 Usage
6703
+
6704
+ <dl>
6705
+ <dd>
6706
+
6707
+ <dl>
6708
+ <dd>
6709
+
6710
+ ```typescript
6711
+ await client.tools.email.getMessage({
6712
+ message_id: "18f2a7c3b9d4e5f6"
6713
+ });
6714
+
6715
+ ```
6716
+ </dd>
6717
+ </dl>
6718
+ </dd>
6719
+ </dl>
6720
+
6721
+ #### ⚙️ Parameters
6722
+
6723
+ <dl>
6724
+ <dd>
6725
+
6726
+ <dl>
6727
+ <dd>
6728
+
6729
+ **request:** `AthenaIntelligence.tools.GetMessageEmailRequest`
6730
+
6731
+ </dd>
6732
+ </dl>
6733
+
6734
+ <dl>
6735
+ <dd>
6736
+
6737
+ **requestOptions:** `EmailClient.RequestOptions`
6738
+
6739
+ </dd>
6740
+ </dl>
6741
+ </dd>
6742
+ </dl>
6743
+
6744
+
6676
6745
  </dd>
6677
6746
  </dl>
6678
6747
  </details>