agentmail 0.0.24 → 0.0.26
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/Client.d.ts +3 -0
- package/Client.js +7 -2
- package/README.md +1 -1
- package/api/resources/drafts/client/Client.d.ts +53 -0
- package/api/resources/drafts/client/Client.js +218 -0
- package/api/resources/drafts/client/index.d.ts +1 -0
- package/api/resources/drafts/client/index.js +17 -0
- package/api/resources/drafts/client/requests/ListDraftsRequest.d.ts +15 -0
- package/api/resources/drafts/client/requests/index.d.ts +1 -0
- package/api/resources/drafts/client/requests/index.js +2 -0
- package/api/resources/drafts/index.d.ts +2 -0
- package/api/resources/drafts/index.js +18 -0
- package/api/resources/drafts/types/Draft.d.ts +51 -0
- package/api/resources/drafts/types/DraftAttachments.d.ts +8 -0
- package/api/resources/drafts/types/DraftAttachments.js +5 -0
- package/api/resources/drafts/types/DraftBcc.d.ts +7 -0
- package/api/resources/drafts/types/DraftBcc.js +5 -0
- package/api/resources/drafts/types/DraftCc.d.ts +7 -0
- package/api/resources/drafts/types/DraftCc.js +5 -0
- package/api/resources/drafts/types/DraftCreatedAt.d.ts +7 -0
- package/api/resources/drafts/types/DraftCreatedAt.js +5 -0
- package/api/resources/drafts/types/DraftEventId.d.ts +7 -0
- package/api/resources/drafts/types/DraftEventId.js +5 -0
- package/api/resources/drafts/types/DraftHtml.d.ts +7 -0
- package/api/resources/drafts/types/DraftHtml.js +5 -0
- package/api/resources/drafts/types/DraftId.d.ts +7 -0
- package/api/resources/drafts/types/DraftId.js +5 -0
- package/api/resources/drafts/types/DraftInReplyTo.d.ts +7 -0
- package/api/resources/drafts/types/DraftInReplyTo.js +5 -0
- package/api/resources/drafts/types/DraftItem.d.ts +21 -0
- package/api/resources/drafts/types/DraftItem.js +5 -0
- package/api/resources/drafts/types/DraftLabels.d.ts +7 -0
- package/api/resources/drafts/types/DraftLabels.js +5 -0
- package/api/resources/drafts/types/DraftPreview.d.ts +7 -0
- package/api/resources/drafts/types/DraftPreview.js +5 -0
- package/api/resources/drafts/types/DraftReferences.d.ts +7 -0
- package/api/resources/drafts/types/DraftReferences.js +5 -0
- package/api/resources/drafts/types/DraftSubject.d.ts +7 -0
- package/api/resources/drafts/types/DraftSubject.js +5 -0
- package/api/resources/drafts/types/DraftText.d.ts +7 -0
- package/api/resources/drafts/types/DraftText.js +5 -0
- package/api/resources/drafts/types/DraftTo.d.ts +7 -0
- package/api/resources/drafts/types/DraftTo.js +5 -0
- package/api/resources/drafts/types/DraftUpdatedAt.d.ts +7 -0
- package/api/resources/drafts/types/DraftUpdatedAt.js +5 -0
- package/api/resources/drafts/types/ListDraftsResponse.d.ts +51 -0
- package/api/resources/drafts/types/ListDraftsResponse.js +5 -0
- package/api/resources/drafts/types/index.d.ts +18 -0
- package/api/resources/drafts/types/index.js +34 -0
- package/api/resources/inboxes/client/Client.js +8 -3
- package/api/resources/inboxes/types/Inbox.d.ts +0 -4
- package/api/resources/inboxes/types/ListInboxesResponse.d.ts +2 -3
- package/api/resources/index.d.ts +3 -0
- package/api/resources/index.js +4 -1
- package/api/resources/messages/client/Client.js +18 -5
- package/api/resources/messages/types/ListMessagesResponse.d.ts +6 -4
- package/api/resources/messages/types/Message.d.ts +4 -8
- package/api/resources/messages/types/MessageItem.d.ts +3 -0
- package/api/resources/messages/types/SendAttachment.d.ts +1 -1
- package/api/resources/messages/types/index.d.ts +4 -5
- package/api/resources/messages/types/index.js +4 -5
- package/api/resources/threads/client/Client.js +6 -2
- package/api/resources/threads/types/ListThreadsResponse.d.ts +4 -2
- package/api/resources/threads/types/Thread.d.ts +2 -5
- package/api/resources/threads/types/ThreadItem.d.ts +1 -0
- package/api/resources/threads/types/index.d.ts +1 -1
- package/api/resources/threads/types/index.js +1 -1
- package/api/resources/webhooks/client/Client.js +10 -4
- package/api/resources/webhooks/types/ListWebhooksResponse.d.ts +2 -2
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +7 -2
- package/dist/api/resources/drafts/client/Client.d.ts +53 -0
- package/dist/api/resources/drafts/client/Client.js +218 -0
- package/dist/api/resources/drafts/client/index.d.ts +1 -0
- package/dist/api/resources/drafts/client/index.js +17 -0
- package/dist/api/resources/drafts/client/requests/ListDraftsRequest.d.ts +15 -0
- package/dist/api/resources/drafts/client/requests/ListDraftsRequest.js +5 -0
- package/dist/api/resources/drafts/client/requests/index.d.ts +1 -0
- package/dist/api/resources/drafts/client/requests/index.js +2 -0
- package/dist/api/resources/drafts/index.d.ts +2 -0
- package/dist/api/resources/drafts/index.js +18 -0
- package/dist/api/resources/drafts/types/Draft.d.ts +51 -0
- package/dist/api/resources/drafts/types/Draft.js +5 -0
- package/dist/api/resources/drafts/types/DraftAttachments.d.ts +8 -0
- package/dist/api/resources/drafts/types/DraftAttachments.js +5 -0
- package/dist/api/resources/drafts/types/DraftBcc.d.ts +7 -0
- package/dist/api/resources/drafts/types/DraftBcc.js +5 -0
- package/dist/api/resources/drafts/types/DraftCc.d.ts +7 -0
- package/dist/api/resources/drafts/types/DraftCc.js +5 -0
- package/dist/api/resources/drafts/types/DraftCreatedAt.d.ts +7 -0
- package/dist/api/resources/drafts/types/DraftCreatedAt.js +5 -0
- package/dist/api/resources/drafts/types/DraftEventId.d.ts +7 -0
- package/dist/api/resources/drafts/types/DraftEventId.js +5 -0
- package/dist/api/resources/drafts/types/DraftHtml.d.ts +7 -0
- package/dist/api/resources/drafts/types/DraftHtml.js +5 -0
- package/dist/api/resources/drafts/types/DraftId.d.ts +7 -0
- package/dist/api/resources/drafts/types/DraftId.js +5 -0
- package/dist/api/resources/drafts/types/DraftInReplyTo.d.ts +7 -0
- package/dist/api/resources/drafts/types/DraftInReplyTo.js +5 -0
- package/dist/api/resources/drafts/types/DraftItem.d.ts +21 -0
- package/dist/api/resources/drafts/types/DraftItem.js +5 -0
- package/dist/api/resources/drafts/types/DraftLabels.d.ts +7 -0
- package/dist/api/resources/drafts/types/DraftLabels.js +5 -0
- package/dist/api/resources/drafts/types/DraftPreview.d.ts +7 -0
- package/dist/api/resources/drafts/types/DraftPreview.js +5 -0
- package/dist/api/resources/drafts/types/DraftReferences.d.ts +7 -0
- package/dist/api/resources/drafts/types/DraftReferences.js +5 -0
- package/dist/api/resources/drafts/types/DraftSubject.d.ts +7 -0
- package/dist/api/resources/drafts/types/DraftSubject.js +5 -0
- package/dist/api/resources/drafts/types/DraftText.d.ts +7 -0
- package/dist/api/resources/drafts/types/DraftText.js +5 -0
- package/dist/api/resources/drafts/types/DraftTo.d.ts +7 -0
- package/dist/api/resources/drafts/types/DraftTo.js +5 -0
- package/dist/api/resources/drafts/types/DraftUpdatedAt.d.ts +7 -0
- package/dist/api/resources/drafts/types/DraftUpdatedAt.js +5 -0
- package/dist/api/resources/drafts/types/ListDraftsResponse.d.ts +51 -0
- package/dist/api/resources/drafts/types/ListDraftsResponse.js +5 -0
- package/dist/api/resources/drafts/types/index.d.ts +18 -0
- package/dist/api/resources/drafts/types/index.js +34 -0
- package/dist/api/resources/inboxes/client/Client.js +8 -3
- package/dist/api/resources/inboxes/types/Inbox.d.ts +0 -4
- package/dist/api/resources/inboxes/types/ListInboxesResponse.d.ts +2 -3
- package/dist/api/resources/index.d.ts +3 -0
- package/dist/api/resources/index.js +4 -1
- package/dist/api/resources/messages/client/Client.js +18 -5
- package/dist/api/resources/messages/types/ListMessagesResponse.d.ts +6 -4
- package/dist/api/resources/messages/types/Message.d.ts +4 -8
- package/dist/api/resources/messages/types/MessageItem.d.ts +3 -0
- package/dist/api/resources/messages/types/SendAttachment.d.ts +1 -1
- package/dist/api/resources/messages/types/index.d.ts +4 -5
- package/dist/api/resources/messages/types/index.js +4 -5
- package/dist/api/resources/threads/client/Client.js +6 -2
- package/dist/api/resources/threads/types/ListThreadsResponse.d.ts +4 -2
- package/dist/api/resources/threads/types/Thread.d.ts +2 -5
- package/dist/api/resources/threads/types/ThreadItem.d.ts +1 -0
- package/dist/api/resources/threads/types/index.d.ts +1 -1
- package/dist/api/resources/threads/types/index.js +1 -1
- package/dist/api/resources/webhooks/client/Client.js +10 -4
- package/dist/api/resources/webhooks/types/ListWebhooksResponse.d.ts +2 -2
- package/dist/serialization/resources/drafts/index.d.ts +1 -0
- package/dist/serialization/resources/drafts/index.js +17 -0
- package/dist/serialization/resources/drafts/types/Draft.d.ts +45 -0
- package/dist/serialization/resources/drafts/types/Draft.js +76 -0
- package/dist/serialization/resources/drafts/types/DraftAttachments.d.ts +11 -0
- package/dist/serialization/resources/drafts/types/DraftAttachments.js +42 -0
- package/dist/serialization/resources/drafts/types/DraftBcc.d.ts +10 -0
- package/dist/serialization/resources/drafts/types/DraftBcc.js +41 -0
- package/dist/serialization/resources/drafts/types/DraftCc.d.ts +10 -0
- package/dist/serialization/resources/drafts/types/DraftCc.js +41 -0
- package/dist/serialization/resources/{messages/types/MessageReplyTo.d.ts → drafts/types/DraftCreatedAt.d.ts} +2 -2
- package/dist/serialization/resources/{messages/types/MessageReplyTo.js → drafts/types/DraftCreatedAt.js} +2 -2
- package/{serialization/resources/messages/types/MessageReplyTo.d.ts → dist/serialization/resources/drafts/types/DraftEventId.d.ts} +2 -2
- package/{serialization/resources/messages/types/MessageReplyTo.js → dist/serialization/resources/drafts/types/DraftEventId.js} +2 -2
- package/dist/serialization/resources/drafts/types/DraftHtml.d.ts +10 -0
- package/dist/serialization/resources/drafts/types/DraftHtml.js +41 -0
- package/dist/serialization/resources/drafts/types/DraftId.d.ts +10 -0
- package/dist/serialization/resources/drafts/types/DraftId.js +41 -0
- package/dist/serialization/resources/drafts/types/DraftInReplyTo.d.ts +10 -0
- package/dist/serialization/resources/drafts/types/DraftInReplyTo.js +41 -0
- package/dist/serialization/resources/drafts/types/DraftItem.d.ts +41 -0
- package/dist/serialization/resources/drafts/types/DraftItem.js +72 -0
- package/dist/serialization/resources/drafts/types/DraftLabels.d.ts +10 -0
- package/dist/serialization/resources/drafts/types/DraftLabels.js +41 -0
- package/dist/serialization/resources/drafts/types/DraftPreview.d.ts +10 -0
- package/dist/serialization/resources/drafts/types/DraftPreview.js +41 -0
- package/dist/serialization/resources/drafts/types/DraftReferences.d.ts +10 -0
- package/dist/serialization/resources/drafts/types/DraftReferences.js +41 -0
- package/dist/serialization/resources/drafts/types/DraftSubject.d.ts +10 -0
- package/dist/serialization/resources/drafts/types/DraftSubject.js +41 -0
- package/dist/serialization/resources/drafts/types/DraftText.d.ts +10 -0
- package/dist/serialization/resources/drafts/types/DraftText.js +41 -0
- package/dist/serialization/resources/drafts/types/DraftTo.d.ts +10 -0
- package/dist/serialization/resources/drafts/types/DraftTo.js +41 -0
- package/dist/serialization/resources/drafts/types/DraftUpdatedAt.d.ts +10 -0
- package/dist/serialization/resources/drafts/types/DraftUpdatedAt.js +41 -0
- package/dist/serialization/resources/drafts/types/ListDraftsResponse.d.ts +19 -0
- package/dist/serialization/resources/drafts/types/ListDraftsResponse.js +50 -0
- package/dist/serialization/resources/drafts/types/index.d.ts +18 -0
- package/dist/serialization/resources/drafts/types/index.js +34 -0
- package/dist/serialization/resources/inboxes/types/Inbox.d.ts +0 -1
- package/dist/serialization/resources/inboxes/types/Inbox.js +0 -1
- package/dist/serialization/resources/inboxes/types/ListInboxesResponse.d.ts +2 -2
- package/dist/serialization/resources/inboxes/types/ListInboxesResponse.js +2 -2
- package/dist/serialization/resources/index.d.ts +2 -0
- package/dist/serialization/resources/index.js +3 -1
- package/dist/serialization/resources/messages/types/ListMessagesResponse.d.ts +2 -2
- package/dist/serialization/resources/messages/types/ListMessagesResponse.js +2 -2
- package/dist/serialization/resources/messages/types/Message.d.ts +6 -10
- package/dist/serialization/resources/messages/types/Message.js +6 -10
- package/dist/serialization/resources/messages/types/MessageItem.d.ts +6 -0
- package/dist/serialization/resources/messages/types/MessageItem.js +6 -0
- package/dist/serialization/resources/messages/types/SendAttachment.d.ts +1 -1
- package/dist/serialization/resources/messages/types/SendAttachment.js +1 -1
- package/dist/serialization/resources/messages/types/index.d.ts +4 -5
- package/dist/serialization/resources/messages/types/index.js +4 -5
- package/dist/serialization/resources/threads/types/ListThreadsResponse.d.ts +2 -2
- package/dist/serialization/resources/threads/types/ListThreadsResponse.js +2 -2
- package/dist/serialization/resources/threads/types/Thread.d.ts +2 -4
- package/dist/serialization/resources/threads/types/Thread.js +2 -4
- package/dist/serialization/resources/threads/types/ThreadItem.d.ts +2 -0
- package/dist/serialization/resources/threads/types/ThreadItem.js +2 -0
- package/dist/serialization/resources/threads/types/index.d.ts +1 -1
- package/dist/serialization/resources/threads/types/index.js +1 -1
- package/dist/serialization/resources/webhooks/types/ListWebhooksResponse.d.ts +2 -2
- package/dist/serialization/resources/webhooks/types/ListWebhooksResponse.js +2 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +116 -0
- package/serialization/resources/drafts/index.d.ts +1 -0
- package/serialization/resources/drafts/index.js +17 -0
- package/serialization/resources/drafts/types/Draft.d.ts +45 -0
- package/serialization/resources/drafts/types/Draft.js +76 -0
- package/serialization/resources/drafts/types/DraftAttachments.d.ts +11 -0
- package/serialization/resources/drafts/types/DraftAttachments.js +42 -0
- package/serialization/resources/drafts/types/DraftBcc.d.ts +10 -0
- package/serialization/resources/drafts/types/DraftBcc.js +41 -0
- package/serialization/resources/drafts/types/DraftCc.d.ts +10 -0
- package/serialization/resources/drafts/types/DraftCc.js +41 -0
- package/serialization/resources/drafts/types/DraftCreatedAt.d.ts +10 -0
- package/serialization/resources/drafts/types/DraftCreatedAt.js +41 -0
- package/serialization/resources/drafts/types/DraftEventId.d.ts +10 -0
- package/serialization/resources/drafts/types/DraftEventId.js +41 -0
- package/serialization/resources/drafts/types/DraftHtml.d.ts +10 -0
- package/serialization/resources/drafts/types/DraftHtml.js +41 -0
- package/serialization/resources/drafts/types/DraftId.d.ts +10 -0
- package/serialization/resources/drafts/types/DraftId.js +41 -0
- package/serialization/resources/drafts/types/DraftInReplyTo.d.ts +10 -0
- package/serialization/resources/drafts/types/DraftInReplyTo.js +41 -0
- package/serialization/resources/drafts/types/DraftItem.d.ts +41 -0
- package/serialization/resources/drafts/types/DraftItem.js +72 -0
- package/serialization/resources/drafts/types/DraftLabels.d.ts +10 -0
- package/serialization/resources/drafts/types/DraftLabels.js +41 -0
- package/serialization/resources/drafts/types/DraftPreview.d.ts +10 -0
- package/serialization/resources/drafts/types/DraftPreview.js +41 -0
- package/serialization/resources/drafts/types/DraftReferences.d.ts +10 -0
- package/serialization/resources/drafts/types/DraftReferences.js +41 -0
- package/serialization/resources/drafts/types/DraftSubject.d.ts +10 -0
- package/serialization/resources/drafts/types/DraftSubject.js +41 -0
- package/serialization/resources/drafts/types/DraftText.d.ts +10 -0
- package/serialization/resources/drafts/types/DraftText.js +41 -0
- package/serialization/resources/drafts/types/DraftTo.d.ts +10 -0
- package/serialization/resources/drafts/types/DraftTo.js +41 -0
- package/serialization/resources/drafts/types/DraftUpdatedAt.d.ts +10 -0
- package/serialization/resources/drafts/types/DraftUpdatedAt.js +41 -0
- package/serialization/resources/drafts/types/ListDraftsResponse.d.ts +19 -0
- package/serialization/resources/drafts/types/ListDraftsResponse.js +50 -0
- package/serialization/resources/drafts/types/index.d.ts +18 -0
- package/serialization/resources/drafts/types/index.js +34 -0
- package/serialization/resources/inboxes/types/Inbox.d.ts +0 -1
- package/serialization/resources/inboxes/types/Inbox.js +0 -1
- package/serialization/resources/inboxes/types/ListInboxesResponse.d.ts +2 -2
- package/serialization/resources/inboxes/types/ListInboxesResponse.js +2 -2
- package/serialization/resources/index.d.ts +2 -0
- package/serialization/resources/index.js +3 -1
- package/serialization/resources/messages/types/ListMessagesResponse.d.ts +2 -2
- package/serialization/resources/messages/types/ListMessagesResponse.js +2 -2
- package/serialization/resources/messages/types/Message.d.ts +6 -10
- package/serialization/resources/messages/types/Message.js +6 -10
- package/serialization/resources/messages/types/MessageItem.d.ts +6 -0
- package/serialization/resources/messages/types/MessageItem.js +6 -0
- package/serialization/resources/messages/types/SendAttachment.d.ts +1 -1
- package/serialization/resources/messages/types/SendAttachment.js +1 -1
- package/serialization/resources/messages/types/index.d.ts +4 -5
- package/serialization/resources/messages/types/index.js +4 -5
- package/serialization/resources/threads/types/ListThreadsResponse.d.ts +2 -2
- package/serialization/resources/threads/types/ListThreadsResponse.js +2 -2
- package/serialization/resources/threads/types/Thread.d.ts +2 -4
- package/serialization/resources/threads/types/Thread.js +2 -4
- package/serialization/resources/threads/types/ThreadItem.d.ts +2 -0
- package/serialization/resources/threads/types/ThreadItem.js +2 -0
- package/serialization/resources/threads/types/index.d.ts +1 -1
- package/serialization/resources/threads/types/index.js +1 -1
- package/serialization/resources/webhooks/types/ListWebhooksResponse.d.ts +2 -2
- package/serialization/resources/webhooks/types/ListWebhooksResponse.js +2 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/messages/types/MessageReplyTo.d.ts +0 -7
- package/dist/api/resources/messages/types/MessageReplyTo.d.ts +0 -7
- /package/api/resources/{messages/types/MessageReplyTo.js → drafts/client/requests/ListDraftsRequest.js} +0 -0
- /package/{dist/api/resources/messages/types/MessageReplyTo.js → api/resources/drafts/types/Draft.js} +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as AgentMail from "../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* inboxId: "yourinbox@agentmail.to",
|
|
9
|
+
* threadId: "thread_123",
|
|
10
|
+
* draftId: "draft_123",
|
|
11
|
+
* eventId: "event_123",
|
|
12
|
+
* labels: ["RECEIVED", "UNREAD"],
|
|
13
|
+
* updatedAt: "2024-01-15T09:30:00Z",
|
|
14
|
+
* createdAt: "2024-01-15T09:30:00Z",
|
|
15
|
+
* to: ["bob@example.com"],
|
|
16
|
+
* cc: ["charlie@example.com"],
|
|
17
|
+
* bcc: ["david@example.com"],
|
|
18
|
+
* subject: "Project Discussion",
|
|
19
|
+
* preview: "Let's review the timeline for the project.",
|
|
20
|
+
* text: "Let's review the timeline for the project. How does tomorrow look?",
|
|
21
|
+
* html: "<p>Let's review the timeline for the project. How does tomorrow look?</p>",
|
|
22
|
+
* attachments: [{
|
|
23
|
+
* attachmentId: "att_123",
|
|
24
|
+
* filename: "proposal.pdf",
|
|
25
|
+
* contentType: "application/pdf",
|
|
26
|
+
* size: 1024,
|
|
27
|
+
* inline: false
|
|
28
|
+
* }],
|
|
29
|
+
* inReplyTo: "msg_122",
|
|
30
|
+
* references: ["msg_121", "msg_122"]
|
|
31
|
+
* }
|
|
32
|
+
*/
|
|
33
|
+
export interface Draft {
|
|
34
|
+
inboxId: AgentMail.InboxId;
|
|
35
|
+
threadId: AgentMail.ThreadId;
|
|
36
|
+
draftId: AgentMail.DraftId;
|
|
37
|
+
eventId: AgentMail.DraftEventId;
|
|
38
|
+
labels: AgentMail.DraftLabels;
|
|
39
|
+
updatedAt: AgentMail.DraftUpdatedAt;
|
|
40
|
+
createdAt: AgentMail.DraftCreatedAt;
|
|
41
|
+
to?: AgentMail.DraftTo;
|
|
42
|
+
cc?: AgentMail.DraftCc;
|
|
43
|
+
bcc?: AgentMail.DraftBcc;
|
|
44
|
+
subject?: AgentMail.DraftSubject;
|
|
45
|
+
preview?: AgentMail.DraftPreview;
|
|
46
|
+
text?: AgentMail.DraftText;
|
|
47
|
+
html?: AgentMail.DraftHtml;
|
|
48
|
+
attachments?: AgentMail.DraftAttachments;
|
|
49
|
+
inReplyTo?: AgentMail.DraftInReplyTo;
|
|
50
|
+
references?: AgentMail.DraftReferences;
|
|
51
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as AgentMail from "../../../index";
|
|
5
|
+
export interface DraftItem {
|
|
6
|
+
inboxId: AgentMail.InboxId;
|
|
7
|
+
threadId: AgentMail.ThreadId;
|
|
8
|
+
draftId: AgentMail.DraftId;
|
|
9
|
+
eventId: AgentMail.DraftEventId;
|
|
10
|
+
labels: AgentMail.DraftLabels;
|
|
11
|
+
updatedAt: AgentMail.DraftUpdatedAt;
|
|
12
|
+
createdAt: AgentMail.DraftCreatedAt;
|
|
13
|
+
to?: AgentMail.DraftTo;
|
|
14
|
+
cc?: AgentMail.DraftCc;
|
|
15
|
+
bcc?: AgentMail.DraftBcc;
|
|
16
|
+
subject?: AgentMail.DraftSubject;
|
|
17
|
+
preview?: AgentMail.DraftPreview;
|
|
18
|
+
attachments?: AgentMail.DraftAttachments;
|
|
19
|
+
inReplyTo?: AgentMail.DraftInReplyTo;
|
|
20
|
+
references?: AgentMail.DraftReferences;
|
|
21
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as AgentMail from "../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* drafts: [{
|
|
9
|
+
* inboxId: "yourinbox@agentmail.to",
|
|
10
|
+
* threadId: "thread_123",
|
|
11
|
+
* draftId: "draft_123",
|
|
12
|
+
* eventId: "event_123",
|
|
13
|
+
* labels: ["RECEIVED", "UNREAD"],
|
|
14
|
+
* updatedAt: "2024-01-15T09:30:00Z",
|
|
15
|
+
* createdAt: "2024-01-15T09:30:00Z",
|
|
16
|
+
* to: ["bob@example.com"],
|
|
17
|
+
* subject: "Project Discussion",
|
|
18
|
+
* preview: "Let's review the timeline for the project.",
|
|
19
|
+
* cc: ["charlie@example.com"],
|
|
20
|
+
* bcc: ["david@example.com"],
|
|
21
|
+
* attachments: [{
|
|
22
|
+
* attachmentId: "att_123",
|
|
23
|
+
* filename: "proposal.pdf",
|
|
24
|
+
* contentType: "application/pdf",
|
|
25
|
+
* size: 1024,
|
|
26
|
+
* inline: false
|
|
27
|
+
* }]
|
|
28
|
+
* }, {
|
|
29
|
+
* inboxId: "yourinbox@agentmail.to",
|
|
30
|
+
* threadId: "thread_123",
|
|
31
|
+
* draftId: "draft_456",
|
|
32
|
+
* eventId: "event_456",
|
|
33
|
+
* labels: ["SENT"],
|
|
34
|
+
* updatedAt: "2024-01-15T10:15:00Z",
|
|
35
|
+
* createdAt: "2024-01-15T10:15:00Z",
|
|
36
|
+
* to: ["alice@example.com"],
|
|
37
|
+
* subject: "Re: Project Discussion",
|
|
38
|
+
* preview: "Sounds good, let's meet tomorrow."
|
|
39
|
+
* }],
|
|
40
|
+
* limit: 10,
|
|
41
|
+
* count: 2,
|
|
42
|
+
* lastKey: "draft_456#2024-01-15T10:15:00Z"
|
|
43
|
+
* }
|
|
44
|
+
*/
|
|
45
|
+
export interface ListDraftsResponse {
|
|
46
|
+
count: AgentMail.Count;
|
|
47
|
+
limit?: AgentMail.Limit;
|
|
48
|
+
lastKey?: AgentMail.LastKey;
|
|
49
|
+
/** Draft items. Ordered by `updated_at` descending. */
|
|
50
|
+
drafts: AgentMail.DraftItem[];
|
|
51
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export * from "./DraftId";
|
|
2
|
+
export * from "./DraftEventId";
|
|
3
|
+
export * from "./DraftLabels";
|
|
4
|
+
export * from "./DraftUpdatedAt";
|
|
5
|
+
export * from "./DraftCreatedAt";
|
|
6
|
+
export * from "./DraftTo";
|
|
7
|
+
export * from "./DraftCc";
|
|
8
|
+
export * from "./DraftBcc";
|
|
9
|
+
export * from "./DraftSubject";
|
|
10
|
+
export * from "./DraftPreview";
|
|
11
|
+
export * from "./DraftText";
|
|
12
|
+
export * from "./DraftHtml";
|
|
13
|
+
export * from "./DraftAttachments";
|
|
14
|
+
export * from "./DraftInReplyTo";
|
|
15
|
+
export * from "./DraftReferences";
|
|
16
|
+
export * from "./DraftItem";
|
|
17
|
+
export * from "./Draft";
|
|
18
|
+
export * from "./ListDraftsResponse";
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./DraftId"), exports);
|
|
18
|
+
__exportStar(require("./DraftEventId"), exports);
|
|
19
|
+
__exportStar(require("./DraftLabels"), exports);
|
|
20
|
+
__exportStar(require("./DraftUpdatedAt"), exports);
|
|
21
|
+
__exportStar(require("./DraftCreatedAt"), exports);
|
|
22
|
+
__exportStar(require("./DraftTo"), exports);
|
|
23
|
+
__exportStar(require("./DraftCc"), exports);
|
|
24
|
+
__exportStar(require("./DraftBcc"), exports);
|
|
25
|
+
__exportStar(require("./DraftSubject"), exports);
|
|
26
|
+
__exportStar(require("./DraftPreview"), exports);
|
|
27
|
+
__exportStar(require("./DraftText"), exports);
|
|
28
|
+
__exportStar(require("./DraftHtml"), exports);
|
|
29
|
+
__exportStar(require("./DraftAttachments"), exports);
|
|
30
|
+
__exportStar(require("./DraftInReplyTo"), exports);
|
|
31
|
+
__exportStar(require("./DraftReferences"), exports);
|
|
32
|
+
__exportStar(require("./DraftItem"), exports);
|
|
33
|
+
__exportStar(require("./Draft"), exports);
|
|
34
|
+
__exportStar(require("./ListDraftsResponse"), exports);
|
|
@@ -83,7 +83,7 @@ class Inboxes {
|
|
|
83
83
|
const _response = yield core.fetcher({
|
|
84
84
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, "/v0/inboxes"),
|
|
85
85
|
method: "GET",
|
|
86
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
86
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.26", "User-Agent": "agentmail/0.0.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
87
87
|
contentType: "application/json",
|
|
88
88
|
queryParameters: _queryParams,
|
|
89
89
|
requestType: "json",
|
|
@@ -96,6 +96,7 @@ class Inboxes {
|
|
|
96
96
|
unrecognizedObjectKeys: "passthrough",
|
|
97
97
|
allowUnrecognizedUnionMembers: true,
|
|
98
98
|
allowUnrecognizedEnumValues: true,
|
|
99
|
+
skipValidation: true,
|
|
99
100
|
breadcrumbsPrefix: ["response"],
|
|
100
101
|
});
|
|
101
102
|
}
|
|
@@ -135,7 +136,7 @@ class Inboxes {
|
|
|
135
136
|
const _response = yield core.fetcher({
|
|
136
137
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.InboxId.jsonOrThrow(inboxId))}`),
|
|
137
138
|
method: "GET",
|
|
138
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
139
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.26", "User-Agent": "agentmail/0.0.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
139
140
|
contentType: "application/json",
|
|
140
141
|
requestType: "json",
|
|
141
142
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -147,6 +148,7 @@ class Inboxes {
|
|
|
147
148
|
unrecognizedObjectKeys: "passthrough",
|
|
148
149
|
allowUnrecognizedUnionMembers: true,
|
|
149
150
|
allowUnrecognizedEnumValues: true,
|
|
151
|
+
skipValidation: true,
|
|
150
152
|
breadcrumbsPrefix: ["response"],
|
|
151
153
|
});
|
|
152
154
|
}
|
|
@@ -157,6 +159,7 @@ class Inboxes {
|
|
|
157
159
|
unrecognizedObjectKeys: "passthrough",
|
|
158
160
|
allowUnrecognizedUnionMembers: true,
|
|
159
161
|
allowUnrecognizedEnumValues: true,
|
|
162
|
+
skipValidation: true,
|
|
160
163
|
breadcrumbsPrefix: ["response"],
|
|
161
164
|
}));
|
|
162
165
|
default:
|
|
@@ -204,7 +207,7 @@ class Inboxes {
|
|
|
204
207
|
const _response = yield core.fetcher({
|
|
205
208
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, "/v0/inboxes"),
|
|
206
209
|
method: "POST",
|
|
207
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
210
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.26", "User-Agent": "agentmail/0.0.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
208
211
|
contentType: "application/json",
|
|
209
212
|
requestType: "json",
|
|
210
213
|
body: serializers.CreateInboxRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -217,6 +220,7 @@ class Inboxes {
|
|
|
217
220
|
unrecognizedObjectKeys: "passthrough",
|
|
218
221
|
allowUnrecognizedUnionMembers: true,
|
|
219
222
|
allowUnrecognizedEnumValues: true,
|
|
223
|
+
skipValidation: true,
|
|
220
224
|
breadcrumbsPrefix: ["response"],
|
|
221
225
|
});
|
|
222
226
|
}
|
|
@@ -227,6 +231,7 @@ class Inboxes {
|
|
|
227
231
|
unrecognizedObjectKeys: "passthrough",
|
|
228
232
|
allowUnrecognizedUnionMembers: true,
|
|
229
233
|
allowUnrecognizedEnumValues: true,
|
|
234
|
+
skipValidation: true,
|
|
230
235
|
breadcrumbsPrefix: ["response"],
|
|
231
236
|
}));
|
|
232
237
|
default:
|
|
@@ -6,7 +6,6 @@ import * as AgentMail from "../../../index";
|
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
8
|
* inboxId: "yourinbox@agentmail.to",
|
|
9
|
-
* organizationId: "123e4567-e89b-12d3-a456-426614174000",
|
|
10
9
|
* displayName: "Your Inbox",
|
|
11
10
|
* createdAt: "2024-01-15T09:30:00Z"
|
|
12
11
|
* }
|
|
@@ -14,15 +13,12 @@ import * as AgentMail from "../../../index";
|
|
|
14
13
|
* @example
|
|
15
14
|
* {
|
|
16
15
|
* inboxId: "helpfulagent123@yourdomain.com",
|
|
17
|
-
* organizationId: "123e4567-e89b-12d3-a456-426614174000",
|
|
18
16
|
* displayName: "Helpful Agent",
|
|
19
17
|
* createdAt: "2024-01-15T09:30:00Z"
|
|
20
18
|
* }
|
|
21
19
|
*/
|
|
22
20
|
export interface Inbox {
|
|
23
21
|
inboxId: AgentMail.InboxId;
|
|
24
|
-
/** ID of organization that owns inbox. */
|
|
25
|
-
organizationId: string;
|
|
26
22
|
displayName?: AgentMail.DisplayName;
|
|
27
23
|
/** Time at which inbox was created. */
|
|
28
24
|
createdAt: Date;
|
|
@@ -7,7 +7,6 @@ import * as AgentMail from "../../../index";
|
|
|
7
7
|
* {
|
|
8
8
|
* inboxes: [{
|
|
9
9
|
* inboxId: "yourinbox@agentmail.to",
|
|
10
|
-
* organizationId: "123e4567-e89b-12d3-a456-426614174000",
|
|
11
10
|
* displayName: "Your Inbox",
|
|
12
11
|
* createdAt: "2024-01-15T09:30:00Z"
|
|
13
12
|
* }],
|
|
@@ -17,9 +16,9 @@ import * as AgentMail from "../../../index";
|
|
|
17
16
|
* }
|
|
18
17
|
*/
|
|
19
18
|
export interface ListInboxesResponse {
|
|
20
|
-
/** Inbox items. Ordered by `created_at` ascending. */
|
|
21
|
-
inboxes: AgentMail.Inbox[];
|
|
22
19
|
count: AgentMail.Count;
|
|
23
20
|
limit?: AgentMail.Limit;
|
|
24
21
|
lastKey?: AgentMail.LastKey;
|
|
22
|
+
/** Inbox items. Ordered by `created_at` ascending. */
|
|
23
|
+
inboxes: AgentMail.Inbox[];
|
|
25
24
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * as drafts from "./drafts";
|
|
2
|
+
export * from "./drafts/types";
|
|
1
3
|
export * as inboxes from "./inboxes";
|
|
2
4
|
export * from "./inboxes/types";
|
|
3
5
|
export * as messages from "./messages";
|
|
@@ -7,6 +9,7 @@ export * from "./threads/types";
|
|
|
7
9
|
export * as webhooks from "./webhooks";
|
|
8
10
|
export * from "./webhooks/types";
|
|
9
11
|
export * from "./messages/errors";
|
|
12
|
+
export * from "./drafts/client/requests";
|
|
10
13
|
export * from "./inboxes/client/requests";
|
|
11
14
|
export * from "./messages/client/requests";
|
|
12
15
|
export * from "./threads/client/requests";
|
|
@@ -36,7 +36,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.webhooks = exports.threads = exports.messages = exports.inboxes = void 0;
|
|
39
|
+
exports.webhooks = exports.threads = exports.messages = exports.inboxes = exports.drafts = void 0;
|
|
40
|
+
exports.drafts = __importStar(require("./drafts"));
|
|
41
|
+
__exportStar(require("./drafts/types"), exports);
|
|
40
42
|
exports.inboxes = __importStar(require("./inboxes"));
|
|
41
43
|
__exportStar(require("./inboxes/types"), exports);
|
|
42
44
|
exports.messages = __importStar(require("./messages"));
|
|
@@ -46,6 +48,7 @@ __exportStar(require("./threads/types"), exports);
|
|
|
46
48
|
exports.webhooks = __importStar(require("./webhooks"));
|
|
47
49
|
__exportStar(require("./webhooks/types"), exports);
|
|
48
50
|
__exportStar(require("./messages/errors"), exports);
|
|
51
|
+
__exportStar(require("./drafts/client/requests"), exports);
|
|
49
52
|
__exportStar(require("./inboxes/client/requests"), exports);
|
|
50
53
|
__exportStar(require("./messages/client/requests"), exports);
|
|
51
54
|
__exportStar(require("./threads/client/requests"), exports);
|