agentmail 0.0.57 → 0.0.64
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/Client.d.ts +2 -2
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/domains/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/domains/client/Client.js +4 -4
- package/dist/cjs/api/resources/drafts/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/drafts/client/Client.js +2 -2
- package/dist/cjs/api/resources/drafts/types/CreateDraftRequest.d.ts +1 -0
- package/dist/cjs/api/resources/drafts/types/Draft.d.ts +1 -2
- package/dist/cjs/api/resources/drafts/types/DraftInReplyTo.d.ts +7 -0
- package/dist/cjs/api/resources/drafts/types/DraftInReplyTo.js +5 -0
- package/dist/cjs/api/resources/drafts/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/drafts/types/index.js +1 -0
- package/dist/cjs/api/resources/inboxes/client/Client.d.ts +13 -2
- package/dist/cjs/api/resources/inboxes/client/Client.js +66 -3
- package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.d.ts +3 -2
- package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.js +6 -5
- package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +7 -7
- package/dist/cjs/api/resources/inboxes/resources/metrics/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/inboxes/resources/metrics/client/Client.js +1 -1
- package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.d.ts +14 -2
- package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.js +67 -3
- package/dist/cjs/api/resources/messages/types/Message.d.ts +5 -8
- package/dist/cjs/api/resources/messages/types/MessageCreatedAt.d.ts +7 -0
- package/dist/cjs/api/resources/messages/types/MessageCreatedAt.js +5 -0
- package/dist/cjs/api/resources/messages/types/MessageInReplyTo.d.ts +7 -0
- package/dist/cjs/api/resources/messages/types/MessageInReplyTo.js +5 -0
- package/dist/cjs/api/resources/messages/types/MessageItem.d.ts +5 -0
- package/dist/cjs/api/resources/messages/types/MessageReferences.d.ts +7 -0
- package/dist/cjs/api/resources/messages/types/MessageReferences.js +5 -0
- package/dist/cjs/api/resources/messages/types/MessageReplyTo.d.ts +7 -0
- package/dist/cjs/api/resources/messages/types/MessageReplyTo.js +5 -0
- package/dist/cjs/api/resources/messages/types/MessageSize.d.ts +7 -0
- package/dist/cjs/api/resources/messages/types/MessageSize.js +5 -0
- package/dist/cjs/api/resources/messages/types/MessageUpdatedAt.d.ts +7 -0
- package/dist/cjs/api/resources/messages/types/MessageUpdatedAt.js +5 -0
- package/dist/cjs/api/resources/messages/types/index.d.ts +6 -0
- package/dist/cjs/api/resources/messages/types/index.js +6 -0
- package/dist/cjs/api/resources/metrics/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/metrics/client/Client.js +1 -1
- package/dist/cjs/api/resources/threads/client/Client.d.ts +13 -2
- package/dist/cjs/api/resources/threads/client/Client.js +66 -3
- package/dist/cjs/api/resources/threads/types/Thread.d.ts +6 -4
- package/dist/cjs/api/resources/threads/types/ThreadCreatedAt.d.ts +7 -0
- package/dist/cjs/api/resources/threads/types/ThreadCreatedAt.js +5 -0
- package/dist/cjs/api/resources/threads/types/ThreadItem.d.ts +6 -0
- package/dist/cjs/api/resources/threads/types/ThreadLastMessageId.d.ts +7 -0
- package/dist/cjs/api/resources/threads/types/ThreadLastMessageId.js +5 -0
- package/dist/cjs/api/resources/threads/types/ThreadReceivedTimestamp.d.ts +7 -0
- package/dist/cjs/api/resources/threads/types/ThreadReceivedTimestamp.js +5 -0
- package/dist/cjs/api/resources/threads/types/ThreadSentTimestamp.d.ts +7 -0
- package/dist/cjs/api/resources/threads/types/ThreadSentTimestamp.js +5 -0
- package/dist/cjs/api/resources/threads/types/ThreadSize.d.ts +7 -0
- package/dist/cjs/api/resources/threads/types/ThreadSize.js +5 -0
- package/dist/cjs/api/resources/threads/types/ThreadTimestamp.d.ts +1 -1
- package/dist/cjs/api/resources/threads/types/ThreadUpdatedAt.d.ts +7 -0
- package/dist/cjs/api/resources/threads/types/ThreadUpdatedAt.js +5 -0
- package/dist/cjs/api/resources/threads/types/index.d.ts +6 -0
- package/dist/cjs/api/resources/threads/types/index.js +6 -0
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/webhooks/client/Client.js +4 -4
- package/dist/cjs/api/resources/websockets/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/websockets/client/Client.js +2 -1
- package/dist/cjs/core/fetcher/Fetcher.d.ts +1 -1
- package/dist/cjs/core/fetcher/requestWithRetries.js +44 -8
- package/dist/cjs/core/headers.d.ts +2 -2
- package/dist/cjs/core/websocket/ws.d.ts +1 -1
- package/dist/cjs/serialization/resources/drafts/types/CreateDraftRequest.d.ts +2 -0
- package/dist/cjs/serialization/resources/drafts/types/CreateDraftRequest.js +2 -0
- package/dist/cjs/serialization/resources/drafts/types/Draft.d.ts +2 -1
- package/dist/cjs/serialization/resources/drafts/types/Draft.js +2 -1
- package/dist/cjs/serialization/resources/drafts/types/DraftInReplyTo.d.ts +10 -0
- package/dist/cjs/serialization/resources/drafts/types/DraftInReplyTo.js +41 -0
- package/dist/cjs/serialization/resources/drafts/types/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/drafts/types/index.js +1 -0
- package/dist/cjs/serialization/resources/messages/types/Message.d.ts +10 -4
- package/dist/cjs/serialization/resources/messages/types/Message.js +10 -4
- package/dist/cjs/serialization/resources/messages/types/MessageCreatedAt.d.ts +10 -0
- package/dist/cjs/serialization/resources/messages/types/MessageCreatedAt.js +41 -0
- package/dist/cjs/serialization/resources/messages/types/MessageInReplyTo.d.ts +10 -0
- package/dist/cjs/serialization/resources/messages/types/MessageInReplyTo.js +41 -0
- package/dist/cjs/serialization/resources/messages/types/MessageItem.d.ts +10 -0
- package/dist/cjs/serialization/resources/messages/types/MessageItem.js +10 -0
- package/dist/cjs/serialization/resources/messages/types/MessageReferences.d.ts +10 -0
- package/dist/cjs/serialization/resources/messages/types/MessageReferences.js +41 -0
- package/dist/cjs/serialization/resources/messages/types/MessageReplyTo.d.ts +10 -0
- package/dist/cjs/serialization/resources/messages/types/MessageReplyTo.js +41 -0
- package/dist/cjs/serialization/resources/messages/types/MessageSize.d.ts +10 -0
- package/dist/cjs/serialization/resources/messages/types/MessageSize.js +41 -0
- package/dist/cjs/serialization/resources/messages/types/MessageUpdatedAt.d.ts +10 -0
- package/dist/cjs/serialization/resources/messages/types/MessageUpdatedAt.js +41 -0
- package/dist/cjs/serialization/resources/messages/types/index.d.ts +6 -0
- package/dist/cjs/serialization/resources/messages/types/index.js +6 -0
- package/dist/cjs/serialization/resources/threads/types/Thread.d.ts +12 -2
- package/dist/cjs/serialization/resources/threads/types/Thread.js +12 -2
- package/dist/cjs/serialization/resources/threads/types/ThreadCreatedAt.d.ts +10 -0
- package/dist/cjs/serialization/resources/threads/types/ThreadCreatedAt.js +41 -0
- package/dist/cjs/serialization/resources/threads/types/ThreadItem.d.ts +12 -0
- package/dist/cjs/serialization/resources/threads/types/ThreadItem.js +12 -0
- package/dist/cjs/serialization/resources/threads/types/ThreadLastMessageId.d.ts +10 -0
- package/dist/cjs/serialization/resources/threads/types/ThreadLastMessageId.js +41 -0
- package/dist/cjs/serialization/resources/threads/types/ThreadReceivedTimestamp.d.ts +10 -0
- package/dist/cjs/serialization/resources/threads/types/ThreadReceivedTimestamp.js +41 -0
- package/dist/cjs/serialization/resources/threads/types/ThreadSentTimestamp.d.ts +10 -0
- package/dist/cjs/serialization/resources/threads/types/ThreadSentTimestamp.js +41 -0
- package/dist/cjs/serialization/resources/threads/types/ThreadSize.d.ts +10 -0
- package/dist/cjs/serialization/resources/threads/types/ThreadSize.js +41 -0
- package/dist/cjs/serialization/resources/threads/types/ThreadUpdatedAt.d.ts +10 -0
- package/dist/cjs/serialization/resources/threads/types/ThreadUpdatedAt.js +41 -0
- package/dist/cjs/serialization/resources/threads/types/index.d.ts +6 -0
- package/dist/cjs/serialization/resources/threads/types/index.js +6 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +2 -2
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/domains/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/domains/client/Client.mjs +4 -4
- package/dist/esm/api/resources/drafts/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/drafts/client/Client.mjs +2 -2
- package/dist/esm/api/resources/drafts/types/CreateDraftRequest.d.mts +1 -0
- package/dist/esm/api/resources/drafts/types/Draft.d.mts +1 -2
- package/dist/esm/api/resources/drafts/types/DraftInReplyTo.d.mts +7 -0
- package/dist/esm/api/resources/drafts/types/DraftInReplyTo.mjs +4 -0
- package/dist/esm/api/resources/drafts/types/index.d.mts +1 -0
- package/dist/esm/api/resources/drafts/types/index.mjs +1 -0
- package/dist/esm/api/resources/inboxes/client/Client.d.mts +13 -2
- package/dist/esm/api/resources/inboxes/client/Client.mjs +66 -3
- package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.d.mts +3 -2
- package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.mjs +6 -5
- package/dist/esm/api/resources/inboxes/resources/messages/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +7 -7
- package/dist/esm/api/resources/inboxes/resources/metrics/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/inboxes/resources/metrics/client/Client.mjs +1 -1
- package/dist/esm/api/resources/inboxes/resources/threads/client/Client.d.mts +14 -2
- package/dist/esm/api/resources/inboxes/resources/threads/client/Client.mjs +67 -3
- package/dist/esm/api/resources/messages/types/Message.d.mts +5 -8
- package/dist/esm/api/resources/messages/types/MessageCreatedAt.d.mts +7 -0
- package/dist/esm/api/resources/messages/types/MessageCreatedAt.mjs +4 -0
- package/dist/esm/api/resources/messages/types/MessageInReplyTo.d.mts +7 -0
- package/dist/esm/api/resources/messages/types/MessageInReplyTo.mjs +4 -0
- package/dist/esm/api/resources/messages/types/MessageItem.d.mts +5 -0
- package/dist/esm/api/resources/messages/types/MessageReferences.d.mts +7 -0
- package/dist/esm/api/resources/messages/types/MessageReferences.mjs +4 -0
- package/dist/esm/api/resources/messages/types/MessageReplyTo.d.mts +7 -0
- package/dist/esm/api/resources/messages/types/MessageReplyTo.mjs +4 -0
- package/dist/esm/api/resources/messages/types/MessageSize.d.mts +7 -0
- package/dist/esm/api/resources/messages/types/MessageSize.mjs +4 -0
- package/dist/esm/api/resources/messages/types/MessageUpdatedAt.d.mts +7 -0
- package/dist/esm/api/resources/messages/types/MessageUpdatedAt.mjs +4 -0
- package/dist/esm/api/resources/messages/types/index.d.mts +6 -0
- package/dist/esm/api/resources/messages/types/index.mjs +6 -0
- package/dist/esm/api/resources/metrics/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/metrics/client/Client.mjs +1 -1
- package/dist/esm/api/resources/threads/client/Client.d.mts +13 -2
- package/dist/esm/api/resources/threads/client/Client.mjs +66 -3
- package/dist/esm/api/resources/threads/types/Thread.d.mts +6 -4
- package/dist/esm/api/resources/threads/types/ThreadCreatedAt.d.mts +7 -0
- package/dist/esm/api/resources/threads/types/ThreadCreatedAt.mjs +4 -0
- package/dist/esm/api/resources/threads/types/ThreadItem.d.mts +6 -0
- package/dist/esm/api/resources/threads/types/ThreadLastMessageId.d.mts +7 -0
- package/dist/esm/api/resources/threads/types/ThreadLastMessageId.mjs +4 -0
- package/dist/esm/api/resources/threads/types/ThreadReceivedTimestamp.d.mts +7 -0
- package/dist/esm/api/resources/threads/types/ThreadReceivedTimestamp.mjs +4 -0
- package/dist/esm/api/resources/threads/types/ThreadSentTimestamp.d.mts +7 -0
- package/dist/esm/api/resources/threads/types/ThreadSentTimestamp.mjs +4 -0
- package/dist/esm/api/resources/threads/types/ThreadSize.d.mts +7 -0
- package/dist/esm/api/resources/threads/types/ThreadSize.mjs +4 -0
- package/dist/esm/api/resources/threads/types/ThreadTimestamp.d.mts +1 -1
- package/dist/esm/api/resources/threads/types/ThreadUpdatedAt.d.mts +7 -0
- package/dist/esm/api/resources/threads/types/ThreadUpdatedAt.mjs +4 -0
- package/dist/esm/api/resources/threads/types/index.d.mts +6 -0
- package/dist/esm/api/resources/threads/types/index.mjs +6 -0
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/webhooks/client/Client.mjs +4 -4
- package/dist/esm/api/resources/websockets/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/websockets/client/Client.mjs +2 -1
- package/dist/esm/core/fetcher/Fetcher.d.mts +1 -1
- package/dist/esm/core/fetcher/requestWithRetries.mjs +44 -8
- package/dist/esm/core/headers.d.mts +2 -2
- package/dist/esm/core/websocket/ws.d.mts +1 -1
- package/dist/esm/serialization/resources/drafts/types/CreateDraftRequest.d.mts +2 -0
- package/dist/esm/serialization/resources/drafts/types/CreateDraftRequest.mjs +2 -0
- package/dist/esm/serialization/resources/drafts/types/Draft.d.mts +2 -1
- package/dist/esm/serialization/resources/drafts/types/Draft.mjs +2 -1
- package/dist/esm/serialization/resources/drafts/types/DraftInReplyTo.d.mts +10 -0
- package/dist/esm/serialization/resources/drafts/types/DraftInReplyTo.mjs +5 -0
- package/dist/esm/serialization/resources/drafts/types/index.d.mts +1 -0
- package/dist/esm/serialization/resources/drafts/types/index.mjs +1 -0
- package/dist/esm/serialization/resources/messages/types/Message.d.mts +10 -4
- package/dist/esm/serialization/resources/messages/types/Message.mjs +10 -4
- package/dist/esm/serialization/resources/messages/types/MessageCreatedAt.d.mts +10 -0
- package/dist/esm/serialization/resources/messages/types/MessageCreatedAt.mjs +5 -0
- package/dist/esm/serialization/resources/messages/types/MessageInReplyTo.d.mts +10 -0
- package/dist/esm/serialization/resources/messages/types/MessageInReplyTo.mjs +5 -0
- package/dist/esm/serialization/resources/messages/types/MessageItem.d.mts +10 -0
- package/dist/esm/serialization/resources/messages/types/MessageItem.mjs +10 -0
- package/dist/esm/serialization/resources/messages/types/MessageReferences.d.mts +10 -0
- package/dist/esm/serialization/resources/messages/types/MessageReferences.mjs +5 -0
- package/dist/esm/serialization/resources/messages/types/MessageReplyTo.d.mts +10 -0
- package/dist/esm/serialization/resources/messages/types/MessageReplyTo.mjs +5 -0
- package/dist/esm/serialization/resources/messages/types/MessageSize.d.mts +10 -0
- package/dist/esm/serialization/resources/messages/types/MessageSize.mjs +5 -0
- package/dist/esm/serialization/resources/messages/types/MessageUpdatedAt.d.mts +10 -0
- package/dist/esm/serialization/resources/messages/types/MessageUpdatedAt.mjs +5 -0
- package/dist/esm/serialization/resources/messages/types/index.d.mts +6 -0
- package/dist/esm/serialization/resources/messages/types/index.mjs +6 -0
- package/dist/esm/serialization/resources/threads/types/Thread.d.mts +12 -2
- package/dist/esm/serialization/resources/threads/types/Thread.mjs +12 -2
- package/dist/esm/serialization/resources/threads/types/ThreadCreatedAt.d.mts +10 -0
- package/dist/esm/serialization/resources/threads/types/ThreadCreatedAt.mjs +5 -0
- package/dist/esm/serialization/resources/threads/types/ThreadItem.d.mts +12 -0
- package/dist/esm/serialization/resources/threads/types/ThreadItem.mjs +12 -0
- package/dist/esm/serialization/resources/threads/types/ThreadLastMessageId.d.mts +10 -0
- package/dist/esm/serialization/resources/threads/types/ThreadLastMessageId.mjs +5 -0
- package/dist/esm/serialization/resources/threads/types/ThreadReceivedTimestamp.d.mts +10 -0
- package/dist/esm/serialization/resources/threads/types/ThreadReceivedTimestamp.mjs +5 -0
- package/dist/esm/serialization/resources/threads/types/ThreadSentTimestamp.d.mts +10 -0
- package/dist/esm/serialization/resources/threads/types/ThreadSentTimestamp.mjs +5 -0
- package/dist/esm/serialization/resources/threads/types/ThreadSize.d.mts +10 -0
- package/dist/esm/serialization/resources/threads/types/ThreadSize.mjs +5 -0
- package/dist/esm/serialization/resources/threads/types/ThreadUpdatedAt.d.mts +10 -0
- package/dist/esm/serialization/resources/threads/types/ThreadUpdatedAt.mjs +5 -0
- package/dist/esm/serialization/resources/threads/types/index.d.mts +6 -0
- package/dist/esm/serialization/resources/threads/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 +393 -0
|
@@ -11,7 +11,7 @@ export declare namespace Threads {
|
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey?: core.Supplier<core.BearerToken | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
16
16
|
interface RequestOptions {
|
|
17
17
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -23,7 +23,7 @@ export declare namespace Threads {
|
|
|
23
23
|
/** Additional query string parameters to include in the request. */
|
|
24
24
|
queryParams?: Record<string, unknown>;
|
|
25
25
|
/** Additional headers to include in the request. */
|
|
26
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
26
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export declare class Threads {
|
|
@@ -58,5 +58,17 @@ export declare class Threads {
|
|
|
58
58
|
*/
|
|
59
59
|
getAttachment(inboxId: AgentMail.inboxes.InboxId, threadId: AgentMail.ThreadId, attachmentId: AgentMail.AttachmentId, requestOptions?: Threads.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
|
|
60
60
|
private __getAttachment;
|
|
61
|
+
/**
|
|
62
|
+
* @param {AgentMail.inboxes.InboxId} inboxId
|
|
63
|
+
* @param {AgentMail.ThreadId} threadId
|
|
64
|
+
* @param {Threads.RequestOptions} requestOptions - Request-specific configuration.
|
|
65
|
+
*
|
|
66
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* await client.inboxes.threads.delete("inbox_id", "thread_id")
|
|
70
|
+
*/
|
|
71
|
+
delete(inboxId: AgentMail.inboxes.InboxId, threadId: AgentMail.ThreadId, requestOptions?: Threads.RequestOptions): core.HttpResponsePromise<void>;
|
|
72
|
+
private __delete;
|
|
61
73
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
62
74
|
}
|
|
@@ -57,7 +57,7 @@ export class Threads {
|
|
|
57
57
|
if (ascending != null) {
|
|
58
58
|
_queryParams["ascending"] = ascending.toString();
|
|
59
59
|
}
|
|
60
|
-
|
|
60
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
61
61
|
const _response = yield core.fetcher({
|
|
62
62
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId, { omitUndefined: true }))}/threads`),
|
|
63
63
|
method: "GET",
|
|
@@ -130,7 +130,7 @@ export class Threads {
|
|
|
130
130
|
__get(inboxId, threadId, requestOptions) {
|
|
131
131
|
return __awaiter(this, void 0, void 0, function* () {
|
|
132
132
|
var _a, _b, _c;
|
|
133
|
-
|
|
133
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
134
134
|
const _response = yield core.fetcher({
|
|
135
135
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId, { omitUndefined: true }))}/threads/${encodeURIComponent(serializers.ThreadId.jsonOrThrow(threadId, { omitUndefined: true }))}`),
|
|
136
136
|
method: "GET",
|
|
@@ -196,7 +196,7 @@ export class Threads {
|
|
|
196
196
|
__getAttachment(inboxId, threadId, attachmentId, requestOptions) {
|
|
197
197
|
return __awaiter(this, void 0, void 0, function* () {
|
|
198
198
|
var _a, _b, _c;
|
|
199
|
-
|
|
199
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
200
200
|
const _response = yield core.fetcher({
|
|
201
201
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId, { omitUndefined: true }))}/threads/${encodeURIComponent(serializers.ThreadId.jsonOrThrow(threadId, { omitUndefined: true }))}/attachments/${encodeURIComponent(serializers.AttachmentId.jsonOrThrow(attachmentId, { omitUndefined: true }))}`),
|
|
202
202
|
method: "GET",
|
|
@@ -245,6 +245,70 @@ export class Threads {
|
|
|
245
245
|
}
|
|
246
246
|
});
|
|
247
247
|
}
|
|
248
|
+
/**
|
|
249
|
+
* @param {AgentMail.inboxes.InboxId} inboxId
|
|
250
|
+
* @param {AgentMail.ThreadId} threadId
|
|
251
|
+
* @param {Threads.RequestOptions} requestOptions - Request-specific configuration.
|
|
252
|
+
*
|
|
253
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
254
|
+
*
|
|
255
|
+
* @example
|
|
256
|
+
* await client.inboxes.threads.delete("inbox_id", "thread_id")
|
|
257
|
+
*/
|
|
258
|
+
delete(inboxId, threadId, requestOptions) {
|
|
259
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(inboxId, threadId, requestOptions));
|
|
260
|
+
}
|
|
261
|
+
__delete(inboxId, threadId, requestOptions) {
|
|
262
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
263
|
+
var _a, _b, _c;
|
|
264
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
265
|
+
const _response = yield core.fetcher({
|
|
266
|
+
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId, { omitUndefined: true }))}/threads/${encodeURIComponent(serializers.ThreadId.jsonOrThrow(threadId, { omitUndefined: true }))}`),
|
|
267
|
+
method: "DELETE",
|
|
268
|
+
headers: _headers,
|
|
269
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
270
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
271
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
272
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
273
|
+
});
|
|
274
|
+
if (_response.ok) {
|
|
275
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
276
|
+
}
|
|
277
|
+
if (_response.error.reason === "status-code") {
|
|
278
|
+
switch (_response.error.statusCode) {
|
|
279
|
+
case 404:
|
|
280
|
+
throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
281
|
+
unrecognizedObjectKeys: "passthrough",
|
|
282
|
+
allowUnrecognizedUnionMembers: true,
|
|
283
|
+
allowUnrecognizedEnumValues: true,
|
|
284
|
+
skipValidation: true,
|
|
285
|
+
breadcrumbsPrefix: ["response"],
|
|
286
|
+
}), _response.rawResponse);
|
|
287
|
+
default:
|
|
288
|
+
throw new errors.AgentMailError({
|
|
289
|
+
statusCode: _response.error.statusCode,
|
|
290
|
+
body: _response.error.body,
|
|
291
|
+
rawResponse: _response.rawResponse,
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
switch (_response.error.reason) {
|
|
296
|
+
case "non-json":
|
|
297
|
+
throw new errors.AgentMailError({
|
|
298
|
+
statusCode: _response.error.statusCode,
|
|
299
|
+
body: _response.error.rawBody,
|
|
300
|
+
rawResponse: _response.rawResponse,
|
|
301
|
+
});
|
|
302
|
+
case "timeout":
|
|
303
|
+
throw new errors.AgentMailTimeoutError("Timeout exceeded when calling DELETE /v0/inboxes/{inbox_id}/threads/{thread_id}.");
|
|
304
|
+
case "unknown":
|
|
305
|
+
throw new errors.AgentMailError({
|
|
306
|
+
message: _response.error.errorMessage,
|
|
307
|
+
rawResponse: _response.rawResponse,
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
}
|
|
248
312
|
_getAuthorizationHeader() {
|
|
249
313
|
return __awaiter(this, void 0, void 0, function* () {
|
|
250
314
|
var _a;
|
|
@@ -19,12 +19,9 @@ export interface Message {
|
|
|
19
19
|
text?: AgentMail.MessageText;
|
|
20
20
|
html?: AgentMail.MessageHtml;
|
|
21
21
|
attachments?: AgentMail.MessageAttachments;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
updatedAt: Date;
|
|
28
|
-
/** Time at which message was created. */
|
|
29
|
-
createdAt: Date;
|
|
22
|
+
inReplyTo?: AgentMail.MessageInReplyTo;
|
|
23
|
+
references?: AgentMail.MessageReferences;
|
|
24
|
+
size: AgentMail.MessageSize;
|
|
25
|
+
updatedAt: AgentMail.MessageUpdatedAt;
|
|
26
|
+
createdAt: AgentMail.MessageCreatedAt;
|
|
30
27
|
}
|
|
@@ -15,4 +15,9 @@ export interface MessageItem {
|
|
|
15
15
|
subject?: AgentMail.MessageSubject;
|
|
16
16
|
preview?: AgentMail.MessagePreview;
|
|
17
17
|
attachments?: AgentMail.MessageAttachments;
|
|
18
|
+
inReplyTo?: AgentMail.MessageInReplyTo;
|
|
19
|
+
references?: AgentMail.MessageReferences;
|
|
20
|
+
size: AgentMail.MessageSize;
|
|
21
|
+
updatedAt: AgentMail.MessageUpdatedAt;
|
|
22
|
+
createdAt: AgentMail.MessageCreatedAt;
|
|
18
23
|
}
|
|
@@ -2,6 +2,7 @@ export * from "./MessageId.mjs";
|
|
|
2
2
|
export * from "./MessageLabels.mjs";
|
|
3
3
|
export * from "./MessageTimestamp.mjs";
|
|
4
4
|
export * from "./MessageFrom.mjs";
|
|
5
|
+
export * from "./MessageReplyTo.mjs";
|
|
5
6
|
export * from "./MessageTo.mjs";
|
|
6
7
|
export * from "./MessageCc.mjs";
|
|
7
8
|
export * from "./MessageBcc.mjs";
|
|
@@ -10,6 +11,11 @@ export * from "./MessagePreview.mjs";
|
|
|
10
11
|
export * from "./MessageText.mjs";
|
|
11
12
|
export * from "./MessageHtml.mjs";
|
|
12
13
|
export * from "./MessageAttachments.mjs";
|
|
14
|
+
export * from "./MessageInReplyTo.mjs";
|
|
15
|
+
export * from "./MessageReferences.mjs";
|
|
16
|
+
export * from "./MessageSize.mjs";
|
|
17
|
+
export * from "./MessageUpdatedAt.mjs";
|
|
18
|
+
export * from "./MessageCreatedAt.mjs";
|
|
13
19
|
export * from "./MessageItem.mjs";
|
|
14
20
|
export * from "./Message.mjs";
|
|
15
21
|
export * from "./ListMessagesResponse.mjs";
|
|
@@ -2,6 +2,7 @@ export * from "./MessageId.mjs";
|
|
|
2
2
|
export * from "./MessageLabels.mjs";
|
|
3
3
|
export * from "./MessageTimestamp.mjs";
|
|
4
4
|
export * from "./MessageFrom.mjs";
|
|
5
|
+
export * from "./MessageReplyTo.mjs";
|
|
5
6
|
export * from "./MessageTo.mjs";
|
|
6
7
|
export * from "./MessageCc.mjs";
|
|
7
8
|
export * from "./MessageBcc.mjs";
|
|
@@ -10,6 +11,11 @@ export * from "./MessagePreview.mjs";
|
|
|
10
11
|
export * from "./MessageText.mjs";
|
|
11
12
|
export * from "./MessageHtml.mjs";
|
|
12
13
|
export * from "./MessageAttachments.mjs";
|
|
14
|
+
export * from "./MessageInReplyTo.mjs";
|
|
15
|
+
export * from "./MessageReferences.mjs";
|
|
16
|
+
export * from "./MessageSize.mjs";
|
|
17
|
+
export * from "./MessageUpdatedAt.mjs";
|
|
18
|
+
export * from "./MessageCreatedAt.mjs";
|
|
13
19
|
export * from "./MessageItem.mjs";
|
|
14
20
|
export * from "./Message.mjs";
|
|
15
21
|
export * from "./ListMessagesResponse.mjs";
|
|
@@ -11,7 +11,7 @@ export declare namespace Metrics {
|
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey?: core.Supplier<core.BearerToken | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
16
16
|
interface RequestOptions {
|
|
17
17
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -23,7 +23,7 @@ export declare namespace Metrics {
|
|
|
23
23
|
/** Additional query string parameters to include in the request. */
|
|
24
24
|
queryParams?: Record<string, unknown>;
|
|
25
25
|
/** Additional headers to include in the request. */
|
|
26
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
26
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export declare class Metrics {
|
|
@@ -49,7 +49,7 @@ export class Metrics {
|
|
|
49
49
|
}
|
|
50
50
|
_queryParams["start_timestamp"] = startTimestamp.toISOString();
|
|
51
51
|
_queryParams["end_timestamp"] = endTimestamp.toISOString();
|
|
52
|
-
|
|
52
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
53
53
|
const _response = yield core.fetcher({
|
|
54
54
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, "/v0/metrics"),
|
|
55
55
|
method: "GET",
|
|
@@ -11,7 +11,7 @@ export declare namespace Threads {
|
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey?: core.Supplier<core.BearerToken | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
16
16
|
interface RequestOptions {
|
|
17
17
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -23,7 +23,7 @@ export declare namespace Threads {
|
|
|
23
23
|
/** Additional query string parameters to include in the request. */
|
|
24
24
|
queryParams?: Record<string, unknown>;
|
|
25
25
|
/** Additional headers to include in the request. */
|
|
26
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
26
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export declare class Threads {
|
|
@@ -56,5 +56,16 @@ export declare class Threads {
|
|
|
56
56
|
*/
|
|
57
57
|
getAttachment(threadId: AgentMail.ThreadId, attachmentId: AgentMail.AttachmentId, requestOptions?: Threads.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
|
|
58
58
|
private __getAttachment;
|
|
59
|
+
/**
|
|
60
|
+
* @param {AgentMail.ThreadId} threadId
|
|
61
|
+
* @param {Threads.RequestOptions} requestOptions - Request-specific configuration.
|
|
62
|
+
*
|
|
63
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* await client.threads.delete("thread_id")
|
|
67
|
+
*/
|
|
68
|
+
delete(threadId: AgentMail.ThreadId, requestOptions?: Threads.RequestOptions): core.HttpResponsePromise<void>;
|
|
69
|
+
private __delete;
|
|
59
70
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
60
71
|
}
|
|
@@ -56,7 +56,7 @@ export class Threads {
|
|
|
56
56
|
if (ascending != null) {
|
|
57
57
|
_queryParams["ascending"] = ascending.toString();
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
60
60
|
const _response = yield core.fetcher({
|
|
61
61
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, "/v0/threads"),
|
|
62
62
|
method: "GET",
|
|
@@ -128,7 +128,7 @@ export class Threads {
|
|
|
128
128
|
__get(threadId, requestOptions) {
|
|
129
129
|
return __awaiter(this, void 0, void 0, function* () {
|
|
130
130
|
var _a, _b, _c;
|
|
131
|
-
|
|
131
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
132
132
|
const _response = yield core.fetcher({
|
|
133
133
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/threads/${encodeURIComponent(serializers.ThreadId.jsonOrThrow(threadId, { omitUndefined: true }))}`),
|
|
134
134
|
method: "GET",
|
|
@@ -194,7 +194,7 @@ export class Threads {
|
|
|
194
194
|
__getAttachment(threadId, attachmentId, requestOptions) {
|
|
195
195
|
return __awaiter(this, void 0, void 0, function* () {
|
|
196
196
|
var _a, _b, _c;
|
|
197
|
-
|
|
197
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
198
198
|
const _response = yield core.fetcher({
|
|
199
199
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/threads/${encodeURIComponent(serializers.ThreadId.jsonOrThrow(threadId, { omitUndefined: true }))}/attachments/${encodeURIComponent(serializers.AttachmentId.jsonOrThrow(attachmentId, { omitUndefined: true }))}`),
|
|
200
200
|
method: "GET",
|
|
@@ -243,6 +243,69 @@ export class Threads {
|
|
|
243
243
|
}
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
|
+
/**
|
|
247
|
+
* @param {AgentMail.ThreadId} threadId
|
|
248
|
+
* @param {Threads.RequestOptions} requestOptions - Request-specific configuration.
|
|
249
|
+
*
|
|
250
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
251
|
+
*
|
|
252
|
+
* @example
|
|
253
|
+
* await client.threads.delete("thread_id")
|
|
254
|
+
*/
|
|
255
|
+
delete(threadId, requestOptions) {
|
|
256
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(threadId, requestOptions));
|
|
257
|
+
}
|
|
258
|
+
__delete(threadId, requestOptions) {
|
|
259
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
260
|
+
var _a, _b, _c;
|
|
261
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
262
|
+
const _response = yield core.fetcher({
|
|
263
|
+
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/threads/${encodeURIComponent(serializers.ThreadId.jsonOrThrow(threadId, { omitUndefined: true }))}`),
|
|
264
|
+
method: "DELETE",
|
|
265
|
+
headers: _headers,
|
|
266
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
267
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
268
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
269
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
270
|
+
});
|
|
271
|
+
if (_response.ok) {
|
|
272
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
273
|
+
}
|
|
274
|
+
if (_response.error.reason === "status-code") {
|
|
275
|
+
switch (_response.error.statusCode) {
|
|
276
|
+
case 404:
|
|
277
|
+
throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
278
|
+
unrecognizedObjectKeys: "passthrough",
|
|
279
|
+
allowUnrecognizedUnionMembers: true,
|
|
280
|
+
allowUnrecognizedEnumValues: true,
|
|
281
|
+
skipValidation: true,
|
|
282
|
+
breadcrumbsPrefix: ["response"],
|
|
283
|
+
}), _response.rawResponse);
|
|
284
|
+
default:
|
|
285
|
+
throw new errors.AgentMailError({
|
|
286
|
+
statusCode: _response.error.statusCode,
|
|
287
|
+
body: _response.error.body,
|
|
288
|
+
rawResponse: _response.rawResponse,
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
switch (_response.error.reason) {
|
|
293
|
+
case "non-json":
|
|
294
|
+
throw new errors.AgentMailError({
|
|
295
|
+
statusCode: _response.error.statusCode,
|
|
296
|
+
body: _response.error.rawBody,
|
|
297
|
+
rawResponse: _response.rawResponse,
|
|
298
|
+
});
|
|
299
|
+
case "timeout":
|
|
300
|
+
throw new errors.AgentMailTimeoutError("Timeout exceeded when calling DELETE /v0/threads/{thread_id}.");
|
|
301
|
+
case "unknown":
|
|
302
|
+
throw new errors.AgentMailError({
|
|
303
|
+
message: _response.error.errorMessage,
|
|
304
|
+
rawResponse: _response.rawResponse,
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
}
|
|
246
309
|
_getAuthorizationHeader() {
|
|
247
310
|
return __awaiter(this, void 0, void 0, function* () {
|
|
248
311
|
var _a;
|
|
@@ -7,16 +7,18 @@ export interface Thread {
|
|
|
7
7
|
threadId: AgentMail.ThreadId;
|
|
8
8
|
labels: AgentMail.ThreadLabels;
|
|
9
9
|
timestamp: AgentMail.ThreadTimestamp;
|
|
10
|
+
receivedTimestamp: AgentMail.ThreadReceivedTimestamp;
|
|
11
|
+
sentTimestamp: AgentMail.ThreadSentTimestamp;
|
|
10
12
|
senders: AgentMail.ThreadSenders;
|
|
11
13
|
recipients: AgentMail.ThreadRecipients;
|
|
12
14
|
subject?: AgentMail.ThreadSubject;
|
|
13
15
|
preview?: AgentMail.ThreadPreview;
|
|
14
16
|
attachments?: AgentMail.ThreadAttachments;
|
|
17
|
+
lastMessageId: AgentMail.ThreadLastMessageId;
|
|
15
18
|
messageCount: AgentMail.ThreadMessageCount;
|
|
19
|
+
size: AgentMail.ThreadSize;
|
|
20
|
+
updatedAt: AgentMail.ThreadUpdatedAt;
|
|
21
|
+
createdAt: AgentMail.ThreadCreatedAt;
|
|
16
22
|
/** Messages in thread. Ordered by `timestamp` ascending. */
|
|
17
23
|
messages: AgentMail.Message[];
|
|
18
|
-
/** Time at which thread was last updated. */
|
|
19
|
-
updatedAt: Date;
|
|
20
|
-
/** Time at which thread was created. */
|
|
21
|
-
createdAt: Date;
|
|
22
24
|
}
|
|
@@ -7,10 +7,16 @@ export interface ThreadItem {
|
|
|
7
7
|
threadId: AgentMail.ThreadId;
|
|
8
8
|
labels: AgentMail.ThreadLabels;
|
|
9
9
|
timestamp: AgentMail.ThreadTimestamp;
|
|
10
|
+
receivedTimestamp: AgentMail.ThreadReceivedTimestamp;
|
|
11
|
+
sentTimestamp: AgentMail.ThreadSentTimestamp;
|
|
10
12
|
senders: AgentMail.ThreadSenders;
|
|
11
13
|
recipients: AgentMail.ThreadRecipients;
|
|
12
14
|
subject?: AgentMail.ThreadSubject;
|
|
13
15
|
preview?: AgentMail.ThreadPreview;
|
|
14
16
|
attachments?: AgentMail.ThreadAttachments;
|
|
17
|
+
lastMessageId: AgentMail.ThreadLastMessageId;
|
|
15
18
|
messageCount: AgentMail.ThreadMessageCount;
|
|
19
|
+
size: AgentMail.ThreadSize;
|
|
20
|
+
updatedAt: AgentMail.ThreadUpdatedAt;
|
|
21
|
+
createdAt: AgentMail.ThreadCreatedAt;
|
|
16
22
|
}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
export * from "./ThreadId.mjs";
|
|
2
2
|
export * from "./ThreadLabels.mjs";
|
|
3
3
|
export * from "./ThreadTimestamp.mjs";
|
|
4
|
+
export * from "./ThreadReceivedTimestamp.mjs";
|
|
5
|
+
export * from "./ThreadSentTimestamp.mjs";
|
|
4
6
|
export * from "./ThreadSenders.mjs";
|
|
5
7
|
export * from "./ThreadRecipients.mjs";
|
|
6
8
|
export * from "./ThreadSubject.mjs";
|
|
7
9
|
export * from "./ThreadPreview.mjs";
|
|
8
10
|
export * from "./ThreadAttachments.mjs";
|
|
11
|
+
export * from "./ThreadLastMessageId.mjs";
|
|
9
12
|
export * from "./ThreadMessageCount.mjs";
|
|
13
|
+
export * from "./ThreadSize.mjs";
|
|
14
|
+
export * from "./ThreadUpdatedAt.mjs";
|
|
15
|
+
export * from "./ThreadCreatedAt.mjs";
|
|
10
16
|
export * from "./ThreadItem.mjs";
|
|
11
17
|
export * from "./Thread.mjs";
|
|
12
18
|
export * from "./ListThreadsResponse.mjs";
|