agentmail 0.0.25 → 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 +3 -3
- package/api/resources/inboxes/types/ListInboxesResponse.d.ts +2 -2
- package/api/resources/index.d.ts +3 -0
- package/api/resources/index.js +4 -1
- package/api/resources/messages/client/Client.js +5 -5
- package/api/resources/messages/types/ListMessagesResponse.d.ts +2 -2
- package/api/resources/messages/types/Message.d.ts +2 -4
- package/api/resources/messages/types/MessageItem.d.ts +2 -0
- 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 +2 -2
- package/api/resources/threads/types/ListThreadsResponse.d.ts +2 -2
- package/api/resources/webhooks/client/Client.js +4 -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 +3 -3
- package/dist/api/resources/inboxes/types/ListInboxesResponse.d.ts +2 -2
- 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 +5 -5
- package/dist/api/resources/messages/types/ListMessagesResponse.d.ts +2 -2
- package/dist/api/resources/messages/types/Message.d.ts +2 -4
- package/dist/api/resources/messages/types/MessageItem.d.ts +2 -0
- 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 +2 -2
- package/dist/api/resources/threads/types/ListThreadsResponse.d.ts +2 -2
- package/dist/api/resources/webhooks/client/Client.js +4 -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/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 +4 -6
- package/dist/serialization/resources/messages/types/Message.js +4 -6
- package/dist/serialization/resources/messages/types/MessageItem.d.ts +4 -0
- package/dist/serialization/resources/messages/types/MessageItem.js +4 -0
- 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/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/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 +4 -6
- package/serialization/resources/messages/types/Message.js +4 -6
- package/serialization/resources/messages/types/MessageItem.d.ts +4 -0
- package/serialization/resources/messages/types/MessageItem.js +4 -0
- 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/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
|
+
* 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",
|
|
@@ -136,7 +136,7 @@ class Inboxes {
|
|
|
136
136
|
const _response = yield core.fetcher({
|
|
137
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))}`),
|
|
138
138
|
method: "GET",
|
|
139
|
-
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),
|
|
140
140
|
contentType: "application/json",
|
|
141
141
|
requestType: "json",
|
|
142
142
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -207,7 +207,7 @@ class Inboxes {
|
|
|
207
207
|
const _response = yield core.fetcher({
|
|
208
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"),
|
|
209
209
|
method: "POST",
|
|
210
|
-
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),
|
|
211
211
|
contentType: "application/json",
|
|
212
212
|
requestType: "json",
|
|
213
213
|
body: serializers.CreateInboxRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -16,9 +16,9 @@ import * as AgentMail from "../../../index";
|
|
|
16
16
|
* }
|
|
17
17
|
*/
|
|
18
18
|
export interface ListInboxesResponse {
|
|
19
|
-
/** Inbox items. Ordered by `created_at` ascending. */
|
|
20
|
-
inboxes: AgentMail.Inbox[];
|
|
21
19
|
count: AgentMail.Count;
|
|
22
20
|
limit?: AgentMail.Limit;
|
|
23
21
|
lastKey?: AgentMail.LastKey;
|
|
22
|
+
/** Inbox items. Ordered by `created_at` ascending. */
|
|
23
|
+
inboxes: AgentMail.Inbox[];
|
|
24
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);
|
|
@@ -89,7 +89,7 @@ class Messages {
|
|
|
89
89
|
const _response = yield core.fetcher({
|
|
90
90
|
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))}/messages`),
|
|
91
91
|
method: "GET",
|
|
92
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
92
|
+
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),
|
|
93
93
|
contentType: "application/json",
|
|
94
94
|
queryParameters: _queryParams,
|
|
95
95
|
requestType: "json",
|
|
@@ -154,7 +154,7 @@ class Messages {
|
|
|
154
154
|
const _response = yield core.fetcher({
|
|
155
155
|
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))}/messages/${encodeURIComponent(serializers.MessageId.jsonOrThrow(messageId))}`),
|
|
156
156
|
method: "GET",
|
|
157
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
157
|
+
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),
|
|
158
158
|
contentType: "application/json",
|
|
159
159
|
requestType: "json",
|
|
160
160
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -211,7 +211,7 @@ class Messages {
|
|
|
211
211
|
const _response = yield core.fetcher({
|
|
212
212
|
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))}/messages/${encodeURIComponent(serializers.MessageId.jsonOrThrow(messageId))}/attachments/${encodeURIComponent(serializers.AttachmentId.jsonOrThrow(attachmentId))}`),
|
|
213
213
|
method: "GET",
|
|
214
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
214
|
+
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),
|
|
215
215
|
contentType: "application/json",
|
|
216
216
|
requestType: "json",
|
|
217
217
|
responseType: "streaming",
|
|
@@ -279,7 +279,7 @@ class Messages {
|
|
|
279
279
|
const _response = yield core.fetcher({
|
|
280
280
|
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))}/messages/send`),
|
|
281
281
|
method: "POST",
|
|
282
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
282
|
+
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),
|
|
283
283
|
contentType: "application/json",
|
|
284
284
|
requestType: "json",
|
|
285
285
|
body: serializers.SendMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -368,7 +368,7 @@ class Messages {
|
|
|
368
368
|
const _response = yield core.fetcher({
|
|
369
369
|
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))}/messages/${encodeURIComponent(serializers.MessageId.jsonOrThrow(messageId))}/reply`),
|
|
370
370
|
method: "POST",
|
|
371
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
371
|
+
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),
|
|
372
372
|
contentType: "application/json",
|
|
373
373
|
requestType: "json",
|
|
374
374
|
body: serializers.ReplyToMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -43,9 +43,9 @@ import * as AgentMail from "../../../index";
|
|
|
43
43
|
* }
|
|
44
44
|
*/
|
|
45
45
|
export interface ListMessagesResponse {
|
|
46
|
-
/** Messages items. Ordered by `sent_at` descending. */
|
|
47
|
-
messages: AgentMail.MessageItem[];
|
|
48
46
|
count: AgentMail.Count;
|
|
49
47
|
limit?: AgentMail.Limit;
|
|
50
48
|
lastKey?: AgentMail.LastKey;
|
|
49
|
+
/** Message items. Ordered by `timestamp` descending. */
|
|
50
|
+
messages: AgentMail.MessageItem[];
|
|
51
51
|
}
|
|
@@ -11,7 +11,6 @@ import * as AgentMail from "../../../index";
|
|
|
11
11
|
* labels: ["RECEIVED", "UNREAD"],
|
|
12
12
|
* timestamp: "2024-01-15T09:30:00Z",
|
|
13
13
|
* from: "alice@example.com",
|
|
14
|
-
* replyTo: "alice.work@example.com",
|
|
15
14
|
* to: ["bob@example.com"],
|
|
16
15
|
* cc: ["charlie@example.com"],
|
|
17
16
|
* bcc: ["david@example.com"],
|
|
@@ -39,12 +38,11 @@ export interface Message {
|
|
|
39
38
|
labels: AgentMail.MessageLabels;
|
|
40
39
|
timestamp: AgentMail.MessageTimestamp;
|
|
41
40
|
from: AgentMail.MessageFrom;
|
|
42
|
-
replyTo?: AgentMail.MessageReplyTo;
|
|
43
|
-
subject?: AgentMail.MessageSubject;
|
|
44
|
-
preview?: AgentMail.MessagePreview;
|
|
45
41
|
to: AgentMail.MessageTo;
|
|
46
42
|
cc?: AgentMail.MessageCc;
|
|
47
43
|
bcc?: AgentMail.MessageBcc;
|
|
44
|
+
subject?: AgentMail.MessageSubject;
|
|
45
|
+
preview?: AgentMail.MessagePreview;
|
|
48
46
|
text?: AgentMail.MessageText;
|
|
49
47
|
html?: AgentMail.MessageHtml;
|
|
50
48
|
attachments?: AgentMail.MessageAttachments;
|
|
@@ -11,18 +11,17 @@ export * from "./MessageEventId";
|
|
|
11
11
|
export * from "./MessageLabels";
|
|
12
12
|
export * from "./MessageTimestamp";
|
|
13
13
|
export * from "./MessageFrom";
|
|
14
|
-
export * from "./MessageReplyTo";
|
|
15
|
-
export * from "./MessageSubject";
|
|
16
|
-
export * from "./MessagePreview";
|
|
17
14
|
export * from "./MessageTo";
|
|
18
15
|
export * from "./MessageCc";
|
|
19
16
|
export * from "./MessageBcc";
|
|
17
|
+
export * from "./MessageSubject";
|
|
18
|
+
export * from "./MessagePreview";
|
|
19
|
+
export * from "./MessageText";
|
|
20
|
+
export * from "./MessageHtml";
|
|
20
21
|
export * from "./MessageAttachments";
|
|
21
22
|
export * from "./MessageInReplyTo";
|
|
22
23
|
export * from "./MessageReferences";
|
|
23
24
|
export * from "./MessageItem";
|
|
24
|
-
export * from "./MessageText";
|
|
25
|
-
export * from "./MessageHtml";
|
|
26
25
|
export * from "./Message";
|
|
27
26
|
export * from "./ListMessagesResponse";
|
|
28
27
|
export * from "./Addresses";
|
|
@@ -27,18 +27,17 @@ __exportStar(require("./MessageEventId"), exports);
|
|
|
27
27
|
__exportStar(require("./MessageLabels"), exports);
|
|
28
28
|
__exportStar(require("./MessageTimestamp"), exports);
|
|
29
29
|
__exportStar(require("./MessageFrom"), exports);
|
|
30
|
-
__exportStar(require("./MessageReplyTo"), exports);
|
|
31
|
-
__exportStar(require("./MessageSubject"), exports);
|
|
32
|
-
__exportStar(require("./MessagePreview"), exports);
|
|
33
30
|
__exportStar(require("./MessageTo"), exports);
|
|
34
31
|
__exportStar(require("./MessageCc"), exports);
|
|
35
32
|
__exportStar(require("./MessageBcc"), exports);
|
|
33
|
+
__exportStar(require("./MessageSubject"), exports);
|
|
34
|
+
__exportStar(require("./MessagePreview"), exports);
|
|
35
|
+
__exportStar(require("./MessageText"), exports);
|
|
36
|
+
__exportStar(require("./MessageHtml"), exports);
|
|
36
37
|
__exportStar(require("./MessageAttachments"), exports);
|
|
37
38
|
__exportStar(require("./MessageInReplyTo"), exports);
|
|
38
39
|
__exportStar(require("./MessageReferences"), exports);
|
|
39
40
|
__exportStar(require("./MessageItem"), exports);
|
|
40
|
-
__exportStar(require("./MessageText"), exports);
|
|
41
|
-
__exportStar(require("./MessageHtml"), exports);
|
|
42
41
|
__exportStar(require("./Message"), exports);
|
|
43
42
|
__exportStar(require("./ListMessagesResponse"), exports);
|
|
44
43
|
__exportStar(require("./Addresses"), exports);
|
|
@@ -89,7 +89,7 @@ class Threads {
|
|
|
89
89
|
const _response = yield core.fetcher({
|
|
90
90
|
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))}/threads`),
|
|
91
91
|
method: "GET",
|
|
92
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
92
|
+
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),
|
|
93
93
|
contentType: "application/json",
|
|
94
94
|
queryParameters: _queryParams,
|
|
95
95
|
requestType: "json",
|
|
@@ -154,7 +154,7 @@ class Threads {
|
|
|
154
154
|
const _response = yield core.fetcher({
|
|
155
155
|
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))}/threads/${encodeURIComponent(serializers.ThreadId.jsonOrThrow(threadId))}`),
|
|
156
156
|
method: "GET",
|
|
157
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
157
|
+
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),
|
|
158
158
|
contentType: "application/json",
|
|
159
159
|
requestType: "json",
|
|
160
160
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -34,9 +34,9 @@ import * as AgentMail from "../../../index";
|
|
|
34
34
|
* }
|
|
35
35
|
*/
|
|
36
36
|
export interface ListThreadsResponse {
|
|
37
|
-
/** Thread items. Ordered by `updated_at` descending. */
|
|
38
|
-
threads: AgentMail.ThreadItem[];
|
|
39
37
|
count: AgentMail.Count;
|
|
40
38
|
limit?: AgentMail.Limit;
|
|
41
39
|
lastKey?: AgentMail.LastKey;
|
|
40
|
+
/** Thread items. Ordered by `timestamp` descending. */
|
|
41
|
+
threads: AgentMail.ThreadItem[];
|
|
42
42
|
}
|
|
@@ -80,7 +80,7 @@ class Webhooks {
|
|
|
80
80
|
const _response = yield core.fetcher({
|
|
81
81
|
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/webhooks"),
|
|
82
82
|
method: "GET",
|
|
83
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
83
|
+
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),
|
|
84
84
|
contentType: "application/json",
|
|
85
85
|
queryParameters: _queryParams,
|
|
86
86
|
requestType: "json",
|
|
@@ -133,7 +133,7 @@ class Webhooks {
|
|
|
133
133
|
const _response = yield core.fetcher({
|
|
134
134
|
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/webhooks/${encodeURIComponent(serializers.WebhookId.jsonOrThrow(webhookId))}`),
|
|
135
135
|
method: "GET",
|
|
136
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
136
|
+
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),
|
|
137
137
|
contentType: "application/json",
|
|
138
138
|
requestType: "json",
|
|
139
139
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -200,7 +200,7 @@ class Webhooks {
|
|
|
200
200
|
const _response = yield core.fetcher({
|
|
201
201
|
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/webhooks"),
|
|
202
202
|
method: "POST",
|
|
203
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
203
|
+
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),
|
|
204
204
|
contentType: "application/json",
|
|
205
205
|
requestType: "json",
|
|
206
206
|
body: serializers.CreateWebhookRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -264,7 +264,7 @@ class Webhooks {
|
|
|
264
264
|
const _response = yield core.fetcher({
|
|
265
265
|
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/webhooks/${encodeURIComponent(serializers.WebhookId.jsonOrThrow(webhookId))}`),
|
|
266
266
|
method: "DELETE",
|
|
267
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
267
|
+
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),
|
|
268
268
|
contentType: "application/json",
|
|
269
269
|
requestType: "json",
|
|
270
270
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as AgentMail from "../../../index";
|
|
5
5
|
export interface ListWebhooksResponse {
|
|
6
|
-
/** Webhook items. Ordered by `created_at` ascending. */
|
|
7
|
-
webhooks: AgentMail.Webhook[];
|
|
8
6
|
count: AgentMail.Count;
|
|
9
7
|
limit?: AgentMail.Limit;
|
|
10
8
|
lastKey?: AgentMail.LastKey;
|
|
9
|
+
/** Webhook items. Ordered by `created_at` ascending. */
|
|
10
|
+
webhooks: AgentMail.Webhook[];
|
|
11
11
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./types";
|
|
@@ -0,0 +1,17 @@
|
|
|
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("./types"), exports);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../../../index";
|
|
5
|
+
import * as AgentMail from "../../../../api/index";
|
|
6
|
+
import * as core from "../../../../core";
|
|
7
|
+
import { InboxId } from "../../inboxes/types/InboxId";
|
|
8
|
+
import { ThreadId } from "../../threads/types/ThreadId";
|
|
9
|
+
import { DraftId } from "./DraftId";
|
|
10
|
+
import { DraftEventId } from "./DraftEventId";
|
|
11
|
+
import { DraftLabels } from "./DraftLabels";
|
|
12
|
+
import { DraftUpdatedAt } from "./DraftUpdatedAt";
|
|
13
|
+
import { DraftCreatedAt } from "./DraftCreatedAt";
|
|
14
|
+
import { DraftTo } from "./DraftTo";
|
|
15
|
+
import { DraftCc } from "./DraftCc";
|
|
16
|
+
import { DraftBcc } from "./DraftBcc";
|
|
17
|
+
import { DraftSubject } from "./DraftSubject";
|
|
18
|
+
import { DraftPreview } from "./DraftPreview";
|
|
19
|
+
import { DraftText } from "./DraftText";
|
|
20
|
+
import { DraftHtml } from "./DraftHtml";
|
|
21
|
+
import { DraftAttachments } from "./DraftAttachments";
|
|
22
|
+
import { DraftInReplyTo } from "./DraftInReplyTo";
|
|
23
|
+
import { DraftReferences } from "./DraftReferences";
|
|
24
|
+
export declare const Draft: core.serialization.ObjectSchema<serializers.Draft.Raw, AgentMail.Draft>;
|
|
25
|
+
export declare namespace Draft {
|
|
26
|
+
interface Raw {
|
|
27
|
+
inbox_id: InboxId.Raw;
|
|
28
|
+
thread_id: ThreadId.Raw;
|
|
29
|
+
draft_id: DraftId.Raw;
|
|
30
|
+
event_id: DraftEventId.Raw;
|
|
31
|
+
labels: DraftLabels.Raw;
|
|
32
|
+
updated_at: DraftUpdatedAt.Raw;
|
|
33
|
+
created_at: DraftCreatedAt.Raw;
|
|
34
|
+
to?: DraftTo.Raw | null;
|
|
35
|
+
cc?: DraftCc.Raw | null;
|
|
36
|
+
bcc?: DraftBcc.Raw | null;
|
|
37
|
+
subject?: DraftSubject.Raw | null;
|
|
38
|
+
preview?: DraftPreview.Raw | null;
|
|
39
|
+
text?: DraftText.Raw | null;
|
|
40
|
+
html?: DraftHtml.Raw | null;
|
|
41
|
+
attachments?: DraftAttachments.Raw | null;
|
|
42
|
+
in_reply_to?: DraftInReplyTo.Raw | null;
|
|
43
|
+
references?: DraftReferences.Raw | null;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.Draft = void 0;
|
|
40
|
+
const core = __importStar(require("../../../../core"));
|
|
41
|
+
const InboxId_1 = require("../../inboxes/types/InboxId");
|
|
42
|
+
const ThreadId_1 = require("../../threads/types/ThreadId");
|
|
43
|
+
const DraftId_1 = require("./DraftId");
|
|
44
|
+
const DraftEventId_1 = require("./DraftEventId");
|
|
45
|
+
const DraftLabels_1 = require("./DraftLabels");
|
|
46
|
+
const DraftUpdatedAt_1 = require("./DraftUpdatedAt");
|
|
47
|
+
const DraftCreatedAt_1 = require("./DraftCreatedAt");
|
|
48
|
+
const DraftTo_1 = require("./DraftTo");
|
|
49
|
+
const DraftCc_1 = require("./DraftCc");
|
|
50
|
+
const DraftBcc_1 = require("./DraftBcc");
|
|
51
|
+
const DraftSubject_1 = require("./DraftSubject");
|
|
52
|
+
const DraftPreview_1 = require("./DraftPreview");
|
|
53
|
+
const DraftText_1 = require("./DraftText");
|
|
54
|
+
const DraftHtml_1 = require("./DraftHtml");
|
|
55
|
+
const DraftAttachments_1 = require("./DraftAttachments");
|
|
56
|
+
const DraftInReplyTo_1 = require("./DraftInReplyTo");
|
|
57
|
+
const DraftReferences_1 = require("./DraftReferences");
|
|
58
|
+
exports.Draft = core.serialization.object({
|
|
59
|
+
inboxId: core.serialization.property("inbox_id", InboxId_1.InboxId),
|
|
60
|
+
threadId: core.serialization.property("thread_id", ThreadId_1.ThreadId),
|
|
61
|
+
draftId: core.serialization.property("draft_id", DraftId_1.DraftId),
|
|
62
|
+
eventId: core.serialization.property("event_id", DraftEventId_1.DraftEventId),
|
|
63
|
+
labels: DraftLabels_1.DraftLabels,
|
|
64
|
+
updatedAt: core.serialization.property("updated_at", DraftUpdatedAt_1.DraftUpdatedAt),
|
|
65
|
+
createdAt: core.serialization.property("created_at", DraftCreatedAt_1.DraftCreatedAt),
|
|
66
|
+
to: DraftTo_1.DraftTo.optional(),
|
|
67
|
+
cc: DraftCc_1.DraftCc.optional(),
|
|
68
|
+
bcc: DraftBcc_1.DraftBcc.optional(),
|
|
69
|
+
subject: DraftSubject_1.DraftSubject.optional(),
|
|
70
|
+
preview: DraftPreview_1.DraftPreview.optional(),
|
|
71
|
+
text: DraftText_1.DraftText.optional(),
|
|
72
|
+
html: DraftHtml_1.DraftHtml.optional(),
|
|
73
|
+
attachments: DraftAttachments_1.DraftAttachments.optional(),
|
|
74
|
+
inReplyTo: core.serialization.property("in_reply_to", DraftInReplyTo_1.DraftInReplyTo.optional()),
|
|
75
|
+
references: DraftReferences_1.DraftReferences.optional(),
|
|
76
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../../../index";
|
|
5
|
+
import * as AgentMail from "../../../../api/index";
|
|
6
|
+
import * as core from "../../../../core";
|
|
7
|
+
import { Attachment } from "../../messages/types/Attachment";
|
|
8
|
+
export declare const DraftAttachments: core.serialization.Schema<serializers.DraftAttachments.Raw, AgentMail.DraftAttachments>;
|
|
9
|
+
export declare namespace DraftAttachments {
|
|
10
|
+
type Raw = Attachment.Raw[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.DraftAttachments = void 0;
|
|
40
|
+
const core = __importStar(require("../../../../core"));
|
|
41
|
+
const Attachment_1 = require("../../messages/types/Attachment");
|
|
42
|
+
exports.DraftAttachments = core.serialization.list(Attachment_1.Attachment);
|