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
|
@@ -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",
|
|
@@ -102,6 +102,7 @@ class Messages {
|
|
|
102
102
|
unrecognizedObjectKeys: "passthrough",
|
|
103
103
|
allowUnrecognizedUnionMembers: true,
|
|
104
104
|
allowUnrecognizedEnumValues: true,
|
|
105
|
+
skipValidation: true,
|
|
105
106
|
breadcrumbsPrefix: ["response"],
|
|
106
107
|
});
|
|
107
108
|
}
|
|
@@ -112,6 +113,7 @@ class Messages {
|
|
|
112
113
|
unrecognizedObjectKeys: "passthrough",
|
|
113
114
|
allowUnrecognizedUnionMembers: true,
|
|
114
115
|
allowUnrecognizedEnumValues: true,
|
|
116
|
+
skipValidation: true,
|
|
115
117
|
breadcrumbsPrefix: ["response"],
|
|
116
118
|
}));
|
|
117
119
|
default:
|
|
@@ -152,7 +154,7 @@ class Messages {
|
|
|
152
154
|
const _response = yield core.fetcher({
|
|
153
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))}`),
|
|
154
156
|
method: "GET",
|
|
155
|
-
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),
|
|
156
158
|
contentType: "application/json",
|
|
157
159
|
requestType: "json",
|
|
158
160
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -164,6 +166,7 @@ class Messages {
|
|
|
164
166
|
unrecognizedObjectKeys: "passthrough",
|
|
165
167
|
allowUnrecognizedUnionMembers: true,
|
|
166
168
|
allowUnrecognizedEnumValues: true,
|
|
169
|
+
skipValidation: true,
|
|
167
170
|
breadcrumbsPrefix: ["response"],
|
|
168
171
|
});
|
|
169
172
|
}
|
|
@@ -174,6 +177,7 @@ class Messages {
|
|
|
174
177
|
unrecognizedObjectKeys: "passthrough",
|
|
175
178
|
allowUnrecognizedUnionMembers: true,
|
|
176
179
|
allowUnrecognizedEnumValues: true,
|
|
180
|
+
skipValidation: true,
|
|
177
181
|
breadcrumbsPrefix: ["response"],
|
|
178
182
|
}));
|
|
179
183
|
default:
|
|
@@ -207,7 +211,7 @@ class Messages {
|
|
|
207
211
|
const _response = yield core.fetcher({
|
|
208
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))}`),
|
|
209
213
|
method: "GET",
|
|
210
|
-
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),
|
|
211
215
|
contentType: "application/json",
|
|
212
216
|
requestType: "json",
|
|
213
217
|
responseType: "streaming",
|
|
@@ -225,6 +229,7 @@ class Messages {
|
|
|
225
229
|
unrecognizedObjectKeys: "passthrough",
|
|
226
230
|
allowUnrecognizedUnionMembers: true,
|
|
227
231
|
allowUnrecognizedEnumValues: true,
|
|
232
|
+
skipValidation: true,
|
|
228
233
|
breadcrumbsPrefix: ["response"],
|
|
229
234
|
}));
|
|
230
235
|
default:
|
|
@@ -274,7 +279,7 @@ class Messages {
|
|
|
274
279
|
const _response = yield core.fetcher({
|
|
275
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`),
|
|
276
281
|
method: "POST",
|
|
277
|
-
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),
|
|
278
283
|
contentType: "application/json",
|
|
279
284
|
requestType: "json",
|
|
280
285
|
body: serializers.SendMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -287,6 +292,7 @@ class Messages {
|
|
|
287
292
|
unrecognizedObjectKeys: "passthrough",
|
|
288
293
|
allowUnrecognizedUnionMembers: true,
|
|
289
294
|
allowUnrecognizedEnumValues: true,
|
|
295
|
+
skipValidation: true,
|
|
290
296
|
breadcrumbsPrefix: ["response"],
|
|
291
297
|
});
|
|
292
298
|
}
|
|
@@ -297,6 +303,7 @@ class Messages {
|
|
|
297
303
|
unrecognizedObjectKeys: "passthrough",
|
|
298
304
|
allowUnrecognizedUnionMembers: true,
|
|
299
305
|
allowUnrecognizedEnumValues: true,
|
|
306
|
+
skipValidation: true,
|
|
300
307
|
breadcrumbsPrefix: ["response"],
|
|
301
308
|
}));
|
|
302
309
|
case 400:
|
|
@@ -304,6 +311,7 @@ class Messages {
|
|
|
304
311
|
unrecognizedObjectKeys: "passthrough",
|
|
305
312
|
allowUnrecognizedUnionMembers: true,
|
|
306
313
|
allowUnrecognizedEnumValues: true,
|
|
314
|
+
skipValidation: true,
|
|
307
315
|
breadcrumbsPrefix: ["response"],
|
|
308
316
|
}));
|
|
309
317
|
case 403:
|
|
@@ -311,6 +319,7 @@ class Messages {
|
|
|
311
319
|
unrecognizedObjectKeys: "passthrough",
|
|
312
320
|
allowUnrecognizedUnionMembers: true,
|
|
313
321
|
allowUnrecognizedEnumValues: true,
|
|
322
|
+
skipValidation: true,
|
|
314
323
|
breadcrumbsPrefix: ["response"],
|
|
315
324
|
}));
|
|
316
325
|
default:
|
|
@@ -359,7 +368,7 @@ class Messages {
|
|
|
359
368
|
const _response = yield core.fetcher({
|
|
360
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`),
|
|
361
370
|
method: "POST",
|
|
362
|
-
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),
|
|
363
372
|
contentType: "application/json",
|
|
364
373
|
requestType: "json",
|
|
365
374
|
body: serializers.ReplyToMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -372,6 +381,7 @@ class Messages {
|
|
|
372
381
|
unrecognizedObjectKeys: "passthrough",
|
|
373
382
|
allowUnrecognizedUnionMembers: true,
|
|
374
383
|
allowUnrecognizedEnumValues: true,
|
|
384
|
+
skipValidation: true,
|
|
375
385
|
breadcrumbsPrefix: ["response"],
|
|
376
386
|
});
|
|
377
387
|
}
|
|
@@ -382,6 +392,7 @@ class Messages {
|
|
|
382
392
|
unrecognizedObjectKeys: "passthrough",
|
|
383
393
|
allowUnrecognizedUnionMembers: true,
|
|
384
394
|
allowUnrecognizedEnumValues: true,
|
|
395
|
+
skipValidation: true,
|
|
385
396
|
breadcrumbsPrefix: ["response"],
|
|
386
397
|
}));
|
|
387
398
|
case 400:
|
|
@@ -389,6 +400,7 @@ class Messages {
|
|
|
389
400
|
unrecognizedObjectKeys: "passthrough",
|
|
390
401
|
allowUnrecognizedUnionMembers: true,
|
|
391
402
|
allowUnrecognizedEnumValues: true,
|
|
403
|
+
skipValidation: true,
|
|
392
404
|
breadcrumbsPrefix: ["response"],
|
|
393
405
|
}));
|
|
394
406
|
case 403:
|
|
@@ -396,6 +408,7 @@ class Messages {
|
|
|
396
408
|
unrecognizedObjectKeys: "passthrough",
|
|
397
409
|
allowUnrecognizedUnionMembers: true,
|
|
398
410
|
allowUnrecognizedEnumValues: true,
|
|
411
|
+
skipValidation: true,
|
|
399
412
|
breadcrumbsPrefix: ["response"],
|
|
400
413
|
}));
|
|
401
414
|
default:
|
|
@@ -6,8 +6,9 @@ import * as AgentMail from "../../../index";
|
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
8
|
* messages: [{
|
|
9
|
-
*
|
|
9
|
+
* inboxId: "yourinbox@agentmail.to",
|
|
10
10
|
* threadId: "thread_123",
|
|
11
|
+
* messageId: "msg_123",
|
|
11
12
|
* eventId: "event_123",
|
|
12
13
|
* labels: ["RECEIVED", "UNREAD"],
|
|
13
14
|
* timestamp: "2024-01-15T09:30:00Z",
|
|
@@ -25,8 +26,9 @@ import * as AgentMail from "../../../index";
|
|
|
25
26
|
* inline: false
|
|
26
27
|
* }]
|
|
27
28
|
* }, {
|
|
28
|
-
*
|
|
29
|
+
* inboxId: "yourinbox@agentmail.to",
|
|
29
30
|
* threadId: "thread_123",
|
|
31
|
+
* messageId: "msg_456",
|
|
30
32
|
* eventId: "event_456",
|
|
31
33
|
* labels: ["SENT"],
|
|
32
34
|
* timestamp: "2024-01-15T10:15:00Z",
|
|
@@ -41,9 +43,9 @@ import * as AgentMail from "../../../index";
|
|
|
41
43
|
* }
|
|
42
44
|
*/
|
|
43
45
|
export interface ListMessagesResponse {
|
|
44
|
-
/** Messages items. Ordered by `sent_at` descending. */
|
|
45
|
-
messages: AgentMail.MessageItem[];
|
|
46
46
|
count: AgentMail.Count;
|
|
47
47
|
limit?: AgentMail.Limit;
|
|
48
48
|
lastKey?: AgentMail.LastKey;
|
|
49
|
+
/** Message items. Ordered by `timestamp` descending. */
|
|
50
|
+
messages: AgentMail.MessageItem[];
|
|
49
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"],
|
|
@@ -28,28 +27,25 @@ import * as AgentMail from "../../../index";
|
|
|
28
27
|
* }],
|
|
29
28
|
* inReplyTo: "msg_122",
|
|
30
29
|
* references: ["msg_121", "msg_122"],
|
|
31
|
-
* inboxId: "yourinbox@agentmail.to"
|
|
32
|
-
* organizationId: "org_123"
|
|
30
|
+
* inboxId: "yourinbox@agentmail.to"
|
|
33
31
|
* }
|
|
34
32
|
*/
|
|
35
33
|
export interface Message {
|
|
34
|
+
inboxId: AgentMail.InboxId;
|
|
36
35
|
threadId: AgentMail.ThreadId;
|
|
37
36
|
messageId: AgentMail.MessageId;
|
|
38
37
|
eventId: AgentMail.MessageEventId;
|
|
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;
|
|
51
49
|
inReplyTo?: AgentMail.MessageInReplyTo;
|
|
52
50
|
references?: AgentMail.MessageReferences;
|
|
53
|
-
inboxId: AgentMail.InboxId;
|
|
54
|
-
organizationId: AgentMail.OrganizationId;
|
|
55
51
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as AgentMail from "../../../index";
|
|
5
5
|
export interface MessageItem {
|
|
6
|
+
inboxId: AgentMail.InboxId;
|
|
6
7
|
threadId: AgentMail.ThreadId;
|
|
7
8
|
messageId: AgentMail.MessageId;
|
|
8
9
|
eventId: AgentMail.MessageEventId;
|
|
@@ -15,4 +16,6 @@ export interface MessageItem {
|
|
|
15
16
|
subject?: AgentMail.MessageSubject;
|
|
16
17
|
preview?: AgentMail.MessagePreview;
|
|
17
18
|
attachments?: AgentMail.MessageAttachments;
|
|
19
|
+
inReplyTo?: AgentMail.MessageInReplyTo;
|
|
20
|
+
references?: AgentMail.MessageReferences;
|
|
18
21
|
}
|
|
@@ -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",
|
|
@@ -102,6 +102,7 @@ class Threads {
|
|
|
102
102
|
unrecognizedObjectKeys: "passthrough",
|
|
103
103
|
allowUnrecognizedUnionMembers: true,
|
|
104
104
|
allowUnrecognizedEnumValues: true,
|
|
105
|
+
skipValidation: true,
|
|
105
106
|
breadcrumbsPrefix: ["response"],
|
|
106
107
|
});
|
|
107
108
|
}
|
|
@@ -112,6 +113,7 @@ class Threads {
|
|
|
112
113
|
unrecognizedObjectKeys: "passthrough",
|
|
113
114
|
allowUnrecognizedUnionMembers: true,
|
|
114
115
|
allowUnrecognizedEnumValues: true,
|
|
116
|
+
skipValidation: true,
|
|
115
117
|
breadcrumbsPrefix: ["response"],
|
|
116
118
|
}));
|
|
117
119
|
default:
|
|
@@ -152,7 +154,7 @@ class Threads {
|
|
|
152
154
|
const _response = yield core.fetcher({
|
|
153
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))}`),
|
|
154
156
|
method: "GET",
|
|
155
|
-
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),
|
|
156
158
|
contentType: "application/json",
|
|
157
159
|
requestType: "json",
|
|
158
160
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -164,6 +166,7 @@ class Threads {
|
|
|
164
166
|
unrecognizedObjectKeys: "passthrough",
|
|
165
167
|
allowUnrecognizedUnionMembers: true,
|
|
166
168
|
allowUnrecognizedEnumValues: true,
|
|
169
|
+
skipValidation: true,
|
|
167
170
|
breadcrumbsPrefix: ["response"],
|
|
168
171
|
});
|
|
169
172
|
}
|
|
@@ -174,6 +177,7 @@ class Threads {
|
|
|
174
177
|
unrecognizedObjectKeys: "passthrough",
|
|
175
178
|
allowUnrecognizedUnionMembers: true,
|
|
176
179
|
allowUnrecognizedEnumValues: true,
|
|
180
|
+
skipValidation: true,
|
|
177
181
|
breadcrumbsPrefix: ["response"],
|
|
178
182
|
}));
|
|
179
183
|
default:
|
|
@@ -6,6 +6,7 @@ import * as AgentMail from "../../../index";
|
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
8
|
* threads: [{
|
|
9
|
+
* inboxId: "yourinbox@agentmail.to",
|
|
9
10
|
* threadId: "thread_123",
|
|
10
11
|
* eventId: "event_123",
|
|
11
12
|
* labels: ["RECEIVED", "UNREAD"],
|
|
@@ -16,6 +17,7 @@ import * as AgentMail from "../../../index";
|
|
|
16
17
|
* subject: "Project Discussion",
|
|
17
18
|
* preview: "Let's review the timeline for..."
|
|
18
19
|
* }, {
|
|
20
|
+
* inboxId: "yourinbox@agentmail.to",
|
|
19
21
|
* threadId: "thread_456",
|
|
20
22
|
* eventId: "event_456",
|
|
21
23
|
* labels: ["SENT"],
|
|
@@ -32,9 +34,9 @@ import * as AgentMail from "../../../index";
|
|
|
32
34
|
* }
|
|
33
35
|
*/
|
|
34
36
|
export interface ListThreadsResponse {
|
|
35
|
-
/** Thread items. Ordered by `updated_at` descending. */
|
|
36
|
-
threads: AgentMail.ThreadItem[];
|
|
37
37
|
count: AgentMail.Count;
|
|
38
38
|
limit?: AgentMail.Limit;
|
|
39
39
|
lastKey?: AgentMail.LastKey;
|
|
40
|
+
/** Thread items. Ordered by `timestamp` descending. */
|
|
41
|
+
threads: AgentMail.ThreadItem[];
|
|
40
42
|
}
|
|
@@ -5,7 +5,6 @@ import * as AgentMail from "../../../index";
|
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
|
-
* organizationId: "org_123",
|
|
9
8
|
* inboxId: "yourinbox@agentmail.to",
|
|
10
9
|
* threadId: "thread_123",
|
|
11
10
|
* eventId: "event_123",
|
|
@@ -25,12 +24,12 @@ import * as AgentMail from "../../../index";
|
|
|
25
24
|
* from: "alice@example.com",
|
|
26
25
|
* to: ["bob@example.com"],
|
|
27
26
|
* text: "Let's review the timeline for the project.",
|
|
28
|
-
* inboxId: "yourinbox@agentmail.to"
|
|
29
|
-
* organizationId: "org_123"
|
|
27
|
+
* inboxId: "yourinbox@agentmail.to"
|
|
30
28
|
* }]
|
|
31
29
|
* }
|
|
32
30
|
*/
|
|
33
31
|
export interface Thread {
|
|
32
|
+
inboxId: AgentMail.InboxId;
|
|
34
33
|
threadId: AgentMail.ThreadId;
|
|
35
34
|
eventId: AgentMail.ThreadEventId;
|
|
36
35
|
labels: AgentMail.ThreadLabels;
|
|
@@ -43,6 +42,4 @@ export interface Thread {
|
|
|
43
42
|
attachments?: AgentMail.ThreadAttachments;
|
|
44
43
|
/** Messages in thread. Ordered by `sent_at` ascending. */
|
|
45
44
|
messages: AgentMail.Message[];
|
|
46
|
-
inboxId: AgentMail.InboxId;
|
|
47
|
-
organizationId: AgentMail.OrganizationId;
|
|
48
45
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export * from "./ThreadAttachment";
|
|
2
1
|
export * from "./ThreadId";
|
|
3
2
|
export * from "./ThreadEventId";
|
|
4
3
|
export * from "./ThreadLabels";
|
|
@@ -8,6 +7,7 @@ export * from "./ThreadRecipients";
|
|
|
8
7
|
export * from "./ThreadMessageCount";
|
|
9
8
|
export * from "./ThreadSubject";
|
|
10
9
|
export * from "./ThreadPreview";
|
|
10
|
+
export * from "./ThreadAttachment";
|
|
11
11
|
export * from "./ThreadAttachments";
|
|
12
12
|
export * from "./ThreadItem";
|
|
13
13
|
export * from "./Thread";
|
|
@@ -14,7 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./ThreadAttachment"), exports);
|
|
18
17
|
__exportStar(require("./ThreadId"), exports);
|
|
19
18
|
__exportStar(require("./ThreadEventId"), exports);
|
|
20
19
|
__exportStar(require("./ThreadLabels"), exports);
|
|
@@ -24,6 +23,7 @@ __exportStar(require("./ThreadRecipients"), exports);
|
|
|
24
23
|
__exportStar(require("./ThreadMessageCount"), exports);
|
|
25
24
|
__exportStar(require("./ThreadSubject"), exports);
|
|
26
25
|
__exportStar(require("./ThreadPreview"), exports);
|
|
26
|
+
__exportStar(require("./ThreadAttachment"), exports);
|
|
27
27
|
__exportStar(require("./ThreadAttachments"), exports);
|
|
28
28
|
__exportStar(require("./ThreadItem"), exports);
|
|
29
29
|
__exportStar(require("./Thread"), exports);
|
|
@@ -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",
|
|
@@ -93,6 +93,7 @@ class Webhooks {
|
|
|
93
93
|
unrecognizedObjectKeys: "passthrough",
|
|
94
94
|
allowUnrecognizedUnionMembers: true,
|
|
95
95
|
allowUnrecognizedEnumValues: true,
|
|
96
|
+
skipValidation: true,
|
|
96
97
|
breadcrumbsPrefix: ["response"],
|
|
97
98
|
});
|
|
98
99
|
}
|
|
@@ -132,7 +133,7 @@ class Webhooks {
|
|
|
132
133
|
const _response = yield core.fetcher({
|
|
133
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))}`),
|
|
134
135
|
method: "GET",
|
|
135
|
-
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),
|
|
136
137
|
contentType: "application/json",
|
|
137
138
|
requestType: "json",
|
|
138
139
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -144,6 +145,7 @@ class Webhooks {
|
|
|
144
145
|
unrecognizedObjectKeys: "passthrough",
|
|
145
146
|
allowUnrecognizedUnionMembers: true,
|
|
146
147
|
allowUnrecognizedEnumValues: true,
|
|
148
|
+
skipValidation: true,
|
|
147
149
|
breadcrumbsPrefix: ["response"],
|
|
148
150
|
});
|
|
149
151
|
}
|
|
@@ -154,6 +156,7 @@ class Webhooks {
|
|
|
154
156
|
unrecognizedObjectKeys: "passthrough",
|
|
155
157
|
allowUnrecognizedUnionMembers: true,
|
|
156
158
|
allowUnrecognizedEnumValues: true,
|
|
159
|
+
skipValidation: true,
|
|
157
160
|
breadcrumbsPrefix: ["response"],
|
|
158
161
|
}));
|
|
159
162
|
default:
|
|
@@ -197,7 +200,7 @@ class Webhooks {
|
|
|
197
200
|
const _response = yield core.fetcher({
|
|
198
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"),
|
|
199
202
|
method: "POST",
|
|
200
|
-
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),
|
|
201
204
|
contentType: "application/json",
|
|
202
205
|
requestType: "json",
|
|
203
206
|
body: serializers.CreateWebhookRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -210,6 +213,7 @@ class Webhooks {
|
|
|
210
213
|
unrecognizedObjectKeys: "passthrough",
|
|
211
214
|
allowUnrecognizedUnionMembers: true,
|
|
212
215
|
allowUnrecognizedEnumValues: true,
|
|
216
|
+
skipValidation: true,
|
|
213
217
|
breadcrumbsPrefix: ["response"],
|
|
214
218
|
});
|
|
215
219
|
}
|
|
@@ -220,6 +224,7 @@ class Webhooks {
|
|
|
220
224
|
unrecognizedObjectKeys: "passthrough",
|
|
221
225
|
allowUnrecognizedUnionMembers: true,
|
|
222
226
|
allowUnrecognizedEnumValues: true,
|
|
227
|
+
skipValidation: true,
|
|
223
228
|
breadcrumbsPrefix: ["response"],
|
|
224
229
|
}));
|
|
225
230
|
default:
|
|
@@ -259,7 +264,7 @@ class Webhooks {
|
|
|
259
264
|
const _response = yield core.fetcher({
|
|
260
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))}`),
|
|
261
266
|
method: "DELETE",
|
|
262
|
-
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),
|
|
263
268
|
contentType: "application/json",
|
|
264
269
|
requestType: "json",
|
|
265
270
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -276,6 +281,7 @@ class Webhooks {
|
|
|
276
281
|
unrecognizedObjectKeys: "passthrough",
|
|
277
282
|
allowUnrecognizedUnionMembers: true,
|
|
278
283
|
allowUnrecognizedEnumValues: true,
|
|
284
|
+
skipValidation: true,
|
|
279
285
|
breadcrumbsPrefix: ["response"],
|
|
280
286
|
}));
|
|
281
287
|
default:
|
|
@@ -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
|
+
}
|