agentmail 0.0.23 → 0.0.24
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/api/resources/inboxes/client/Client.js +3 -3
- package/api/resources/messages/client/Client.js +5 -5
- package/api/resources/messages/types/AttachmentContent.d.ts +7 -0
- package/api/resources/messages/types/AttachmentContent.js +5 -0
- package/api/resources/messages/types/ReplyToMessageRequest.d.ts +1 -0
- package/api/resources/messages/types/SendAttachment.d.ts +9 -0
- package/api/resources/messages/types/SendAttachment.js +5 -0
- package/api/resources/messages/types/SendMessageAttachments.d.ts +8 -0
- package/api/resources/messages/types/SendMessageAttachments.js +5 -0
- package/api/resources/messages/types/SendMessageRequest.d.ts +1 -0
- package/api/resources/messages/types/index.d.ts +3 -0
- package/api/resources/messages/types/index.js +3 -0
- package/api/resources/threads/client/Client.js +2 -2
- package/api/resources/webhooks/client/Client.js +4 -4
- package/dist/api/resources/inboxes/client/Client.js +3 -3
- package/dist/api/resources/messages/client/Client.js +5 -5
- package/dist/api/resources/messages/types/AttachmentContent.d.ts +7 -0
- package/dist/api/resources/messages/types/AttachmentContent.js +5 -0
- package/dist/api/resources/messages/types/ReplyToMessageRequest.d.ts +1 -0
- package/dist/api/resources/messages/types/SendAttachment.d.ts +9 -0
- package/dist/api/resources/messages/types/SendAttachment.js +5 -0
- package/dist/api/resources/messages/types/SendMessageAttachments.d.ts +8 -0
- package/dist/api/resources/messages/types/SendMessageAttachments.js +5 -0
- package/dist/api/resources/messages/types/SendMessageRequest.d.ts +1 -0
- package/dist/api/resources/messages/types/index.d.ts +3 -0
- package/dist/api/resources/messages/types/index.js +3 -0
- package/dist/api/resources/threads/client/Client.js +2 -2
- package/dist/api/resources/webhooks/client/Client.js +4 -4
- package/dist/serialization/resources/messages/types/AttachmentContent.d.ts +10 -0
- package/dist/serialization/resources/messages/types/AttachmentContent.js +41 -0
- package/dist/serialization/resources/messages/types/ReplyToMessageRequest.d.ts +2 -0
- package/dist/serialization/resources/messages/types/ReplyToMessageRequest.js +2 -0
- package/dist/serialization/resources/messages/types/SendAttachment.d.ts +17 -0
- package/dist/serialization/resources/messages/types/SendAttachment.js +48 -0
- package/dist/serialization/resources/messages/types/SendMessageAttachments.d.ts +11 -0
- package/dist/serialization/resources/messages/types/SendMessageAttachments.js +42 -0
- package/dist/serialization/resources/messages/types/SendMessageRequest.d.ts +2 -0
- package/dist/serialization/resources/messages/types/SendMessageRequest.js +2 -0
- package/dist/serialization/resources/messages/types/index.d.ts +3 -0
- package/dist/serialization/resources/messages/types/index.js +3 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/serialization/resources/messages/types/AttachmentContent.d.ts +10 -0
- package/serialization/resources/messages/types/AttachmentContent.js +41 -0
- package/serialization/resources/messages/types/ReplyToMessageRequest.d.ts +2 -0
- package/serialization/resources/messages/types/ReplyToMessageRequest.js +2 -0
- package/serialization/resources/messages/types/SendAttachment.d.ts +17 -0
- package/serialization/resources/messages/types/SendAttachment.js +48 -0
- package/serialization/resources/messages/types/SendMessageAttachments.d.ts +11 -0
- package/serialization/resources/messages/types/SendMessageAttachments.js +42 -0
- package/serialization/resources/messages/types/SendMessageRequest.d.ts +2 -0
- package/serialization/resources/messages/types/SendMessageRequest.js +2 -0
- package/serialization/resources/messages/types/index.d.ts +3 -0
- package/serialization/resources/messages/types/index.js +3 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -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.24", "User-Agent": "agentmail/0.0.24", "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",
|
|
@@ -135,7 +135,7 @@ class Inboxes {
|
|
|
135
135
|
const _response = yield core.fetcher({
|
|
136
136
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.InboxId.jsonOrThrow(inboxId))}`),
|
|
137
137
|
method: "GET",
|
|
138
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
138
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.24", "User-Agent": "agentmail/0.0.24", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
139
139
|
contentType: "application/json",
|
|
140
140
|
requestType: "json",
|
|
141
141
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -204,7 +204,7 @@ class Inboxes {
|
|
|
204
204
|
const _response = yield core.fetcher({
|
|
205
205
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, "/v0/inboxes"),
|
|
206
206
|
method: "POST",
|
|
207
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
207
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.24", "User-Agent": "agentmail/0.0.24", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
208
208
|
contentType: "application/json",
|
|
209
209
|
requestType: "json",
|
|
210
210
|
body: serializers.CreateInboxRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -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.24", "User-Agent": "agentmail/0.0.24", "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",
|
|
@@ -152,7 +152,7 @@ class Messages {
|
|
|
152
152
|
const _response = yield core.fetcher({
|
|
153
153
|
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
154
|
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.
|
|
155
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.24", "User-Agent": "agentmail/0.0.24", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
156
156
|
contentType: "application/json",
|
|
157
157
|
requestType: "json",
|
|
158
158
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -207,7 +207,7 @@ class Messages {
|
|
|
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/${encodeURIComponent(serializers.InboxId.jsonOrThrow(inboxId))}/messages/${encodeURIComponent(serializers.MessageId.jsonOrThrow(messageId))}/attachments/${encodeURIComponent(serializers.AttachmentId.jsonOrThrow(attachmentId))}`),
|
|
209
209
|
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.
|
|
210
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.24", "User-Agent": "agentmail/0.0.24", "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
|
responseType: "streaming",
|
|
@@ -274,7 +274,7 @@ class Messages {
|
|
|
274
274
|
const _response = yield core.fetcher({
|
|
275
275
|
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
276
|
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.
|
|
277
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.24", "User-Agent": "agentmail/0.0.24", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
278
278
|
contentType: "application/json",
|
|
279
279
|
requestType: "json",
|
|
280
280
|
body: serializers.SendMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -359,7 +359,7 @@ class Messages {
|
|
|
359
359
|
const _response = yield core.fetcher({
|
|
360
360
|
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
361
|
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.
|
|
362
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.24", "User-Agent": "agentmail/0.0.24", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
363
363
|
contentType: "application/json",
|
|
364
364
|
requestType: "json",
|
|
365
365
|
body: serializers.ReplyToMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as AgentMail from "../../../index";
|
|
5
|
+
export interface SendAttachment {
|
|
6
|
+
filename: AgentMail.AttachmentFilename;
|
|
7
|
+
contentType: AgentMail.AttachmentContentType;
|
|
8
|
+
content: AgentMail.AttachmentContent;
|
|
9
|
+
}
|
|
@@ -3,7 +3,9 @@ export * from "./AttachmentFilename";
|
|
|
3
3
|
export * from "./AttachmentContentType";
|
|
4
4
|
export * from "./AttachmentSize";
|
|
5
5
|
export * from "./AttachmentInline";
|
|
6
|
+
export * from "./AttachmentContent";
|
|
6
7
|
export * from "./Attachment";
|
|
8
|
+
export * from "./SendAttachment";
|
|
7
9
|
export * from "./MessageId";
|
|
8
10
|
export * from "./MessageEventId";
|
|
9
11
|
export * from "./MessageLabels";
|
|
@@ -27,6 +29,7 @@ export * from "./Addresses";
|
|
|
27
29
|
export * from "./SendMessageTo";
|
|
28
30
|
export * from "./SendMessageCc";
|
|
29
31
|
export * from "./SendMessageBcc";
|
|
32
|
+
export * from "./SendMessageAttachments";
|
|
30
33
|
export * from "./SendMessageRequest";
|
|
31
34
|
export * from "./SendMessageResponse";
|
|
32
35
|
export * from "./ReplyToMessageRequest";
|
|
@@ -19,7 +19,9 @@ __exportStar(require("./AttachmentFilename"), exports);
|
|
|
19
19
|
__exportStar(require("./AttachmentContentType"), exports);
|
|
20
20
|
__exportStar(require("./AttachmentSize"), exports);
|
|
21
21
|
__exportStar(require("./AttachmentInline"), exports);
|
|
22
|
+
__exportStar(require("./AttachmentContent"), exports);
|
|
22
23
|
__exportStar(require("./Attachment"), exports);
|
|
24
|
+
__exportStar(require("./SendAttachment"), exports);
|
|
23
25
|
__exportStar(require("./MessageId"), exports);
|
|
24
26
|
__exportStar(require("./MessageEventId"), exports);
|
|
25
27
|
__exportStar(require("./MessageLabels"), exports);
|
|
@@ -43,6 +45,7 @@ __exportStar(require("./Addresses"), exports);
|
|
|
43
45
|
__exportStar(require("./SendMessageTo"), exports);
|
|
44
46
|
__exportStar(require("./SendMessageCc"), exports);
|
|
45
47
|
__exportStar(require("./SendMessageBcc"), exports);
|
|
48
|
+
__exportStar(require("./SendMessageAttachments"), exports);
|
|
46
49
|
__exportStar(require("./SendMessageRequest"), exports);
|
|
47
50
|
__exportStar(require("./SendMessageResponse"), exports);
|
|
48
51
|
__exportStar(require("./ReplyToMessageRequest"), 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.24", "User-Agent": "agentmail/0.0.24", "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",
|
|
@@ -152,7 +152,7 @@ class Threads {
|
|
|
152
152
|
const _response = yield core.fetcher({
|
|
153
153
|
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
154
|
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.
|
|
155
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.24", "User-Agent": "agentmail/0.0.24", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
156
156
|
contentType: "application/json",
|
|
157
157
|
requestType: "json",
|
|
158
158
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -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.24", "User-Agent": "agentmail/0.0.24", "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",
|
|
@@ -132,7 +132,7 @@ class Webhooks {
|
|
|
132
132
|
const _response = yield core.fetcher({
|
|
133
133
|
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
134
|
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.
|
|
135
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.24", "User-Agent": "agentmail/0.0.24", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
136
136
|
contentType: "application/json",
|
|
137
137
|
requestType: "json",
|
|
138
138
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -197,7 +197,7 @@ class Webhooks {
|
|
|
197
197
|
const _response = yield core.fetcher({
|
|
198
198
|
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
199
|
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.
|
|
200
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.24", "User-Agent": "agentmail/0.0.24", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
201
201
|
contentType: "application/json",
|
|
202
202
|
requestType: "json",
|
|
203
203
|
body: serializers.CreateWebhookRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -259,7 +259,7 @@ class Webhooks {
|
|
|
259
259
|
const _response = yield core.fetcher({
|
|
260
260
|
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
261
|
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.
|
|
262
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.24", "User-Agent": "agentmail/0.0.24", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
263
263
|
contentType: "application/json",
|
|
264
264
|
requestType: "json",
|
|
265
265
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -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.24", "User-Agent": "agentmail/0.0.24", "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",
|
|
@@ -135,7 +135,7 @@ class Inboxes {
|
|
|
135
135
|
const _response = yield core.fetcher({
|
|
136
136
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/inboxes/${encodeURIComponent(serializers.InboxId.jsonOrThrow(inboxId))}`),
|
|
137
137
|
method: "GET",
|
|
138
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
138
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.24", "User-Agent": "agentmail/0.0.24", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
139
139
|
contentType: "application/json",
|
|
140
140
|
requestType: "json",
|
|
141
141
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -204,7 +204,7 @@ class Inboxes {
|
|
|
204
204
|
const _response = yield core.fetcher({
|
|
205
205
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, "/v0/inboxes"),
|
|
206
206
|
method: "POST",
|
|
207
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
207
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.24", "User-Agent": "agentmail/0.0.24", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
208
208
|
contentType: "application/json",
|
|
209
209
|
requestType: "json",
|
|
210
210
|
body: serializers.CreateInboxRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -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.24", "User-Agent": "agentmail/0.0.24", "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",
|
|
@@ -152,7 +152,7 @@ class Messages {
|
|
|
152
152
|
const _response = yield core.fetcher({
|
|
153
153
|
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
154
|
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.
|
|
155
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.24", "User-Agent": "agentmail/0.0.24", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
156
156
|
contentType: "application/json",
|
|
157
157
|
requestType: "json",
|
|
158
158
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -207,7 +207,7 @@ class Messages {
|
|
|
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/${encodeURIComponent(serializers.InboxId.jsonOrThrow(inboxId))}/messages/${encodeURIComponent(serializers.MessageId.jsonOrThrow(messageId))}/attachments/${encodeURIComponent(serializers.AttachmentId.jsonOrThrow(attachmentId))}`),
|
|
209
209
|
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.
|
|
210
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.24", "User-Agent": "agentmail/0.0.24", "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
|
responseType: "streaming",
|
|
@@ -274,7 +274,7 @@ class Messages {
|
|
|
274
274
|
const _response = yield core.fetcher({
|
|
275
275
|
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
276
|
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.
|
|
277
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.24", "User-Agent": "agentmail/0.0.24", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
278
278
|
contentType: "application/json",
|
|
279
279
|
requestType: "json",
|
|
280
280
|
body: serializers.SendMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -359,7 +359,7 @@ class Messages {
|
|
|
359
359
|
const _response = yield core.fetcher({
|
|
360
360
|
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
361
|
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.
|
|
362
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.24", "User-Agent": "agentmail/0.0.24", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
363
363
|
contentType: "application/json",
|
|
364
364
|
requestType: "json",
|
|
365
365
|
body: serializers.ReplyToMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as AgentMail from "../../../index";
|
|
5
|
+
export interface SendAttachment {
|
|
6
|
+
filename: AgentMail.AttachmentFilename;
|
|
7
|
+
contentType: AgentMail.AttachmentContentType;
|
|
8
|
+
content: AgentMail.AttachmentContent;
|
|
9
|
+
}
|
|
@@ -3,7 +3,9 @@ export * from "./AttachmentFilename";
|
|
|
3
3
|
export * from "./AttachmentContentType";
|
|
4
4
|
export * from "./AttachmentSize";
|
|
5
5
|
export * from "./AttachmentInline";
|
|
6
|
+
export * from "./AttachmentContent";
|
|
6
7
|
export * from "./Attachment";
|
|
8
|
+
export * from "./SendAttachment";
|
|
7
9
|
export * from "./MessageId";
|
|
8
10
|
export * from "./MessageEventId";
|
|
9
11
|
export * from "./MessageLabels";
|
|
@@ -27,6 +29,7 @@ export * from "./Addresses";
|
|
|
27
29
|
export * from "./SendMessageTo";
|
|
28
30
|
export * from "./SendMessageCc";
|
|
29
31
|
export * from "./SendMessageBcc";
|
|
32
|
+
export * from "./SendMessageAttachments";
|
|
30
33
|
export * from "./SendMessageRequest";
|
|
31
34
|
export * from "./SendMessageResponse";
|
|
32
35
|
export * from "./ReplyToMessageRequest";
|
|
@@ -19,7 +19,9 @@ __exportStar(require("./AttachmentFilename"), exports);
|
|
|
19
19
|
__exportStar(require("./AttachmentContentType"), exports);
|
|
20
20
|
__exportStar(require("./AttachmentSize"), exports);
|
|
21
21
|
__exportStar(require("./AttachmentInline"), exports);
|
|
22
|
+
__exportStar(require("./AttachmentContent"), exports);
|
|
22
23
|
__exportStar(require("./Attachment"), exports);
|
|
24
|
+
__exportStar(require("./SendAttachment"), exports);
|
|
23
25
|
__exportStar(require("./MessageId"), exports);
|
|
24
26
|
__exportStar(require("./MessageEventId"), exports);
|
|
25
27
|
__exportStar(require("./MessageLabels"), exports);
|
|
@@ -43,6 +45,7 @@ __exportStar(require("./Addresses"), exports);
|
|
|
43
45
|
__exportStar(require("./SendMessageTo"), exports);
|
|
44
46
|
__exportStar(require("./SendMessageCc"), exports);
|
|
45
47
|
__exportStar(require("./SendMessageBcc"), exports);
|
|
48
|
+
__exportStar(require("./SendMessageAttachments"), exports);
|
|
46
49
|
__exportStar(require("./SendMessageRequest"), exports);
|
|
47
50
|
__exportStar(require("./SendMessageResponse"), exports);
|
|
48
51
|
__exportStar(require("./ReplyToMessageRequest"), 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.24", "User-Agent": "agentmail/0.0.24", "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",
|
|
@@ -152,7 +152,7 @@ class Threads {
|
|
|
152
152
|
const _response = yield core.fetcher({
|
|
153
153
|
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
154
|
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.
|
|
155
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.24", "User-Agent": "agentmail/0.0.24", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
156
156
|
contentType: "application/json",
|
|
157
157
|
requestType: "json",
|
|
158
158
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -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.24", "User-Agent": "agentmail/0.0.24", "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",
|
|
@@ -132,7 +132,7 @@ class Webhooks {
|
|
|
132
132
|
const _response = yield core.fetcher({
|
|
133
133
|
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
134
|
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.
|
|
135
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.24", "User-Agent": "agentmail/0.0.24", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
136
136
|
contentType: "application/json",
|
|
137
137
|
requestType: "json",
|
|
138
138
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -197,7 +197,7 @@ class Webhooks {
|
|
|
197
197
|
const _response = yield core.fetcher({
|
|
198
198
|
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
199
|
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.
|
|
200
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.24", "User-Agent": "agentmail/0.0.24", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
201
201
|
contentType: "application/json",
|
|
202
202
|
requestType: "json",
|
|
203
203
|
body: serializers.CreateWebhookRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -259,7 +259,7 @@ class Webhooks {
|
|
|
259
259
|
const _response = yield core.fetcher({
|
|
260
260
|
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
261
|
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.
|
|
262
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.24", "User-Agent": "agentmail/0.0.24", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
263
263
|
contentType: "application/json",
|
|
264
264
|
requestType: "json",
|
|
265
265
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
export declare const AttachmentContent: core.serialization.Schema<serializers.AttachmentContent.Raw, AgentMail.AttachmentContent>;
|
|
8
|
+
export declare namespace AttachmentContent {
|
|
9
|
+
type Raw = string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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.AttachmentContent = void 0;
|
|
40
|
+
const core = __importStar(require("../../../../core"));
|
|
41
|
+
exports.AttachmentContent = core.serialization.string();
|
|
@@ -9,6 +9,7 @@ import { SendMessageCc } from "./SendMessageCc";
|
|
|
9
9
|
import { SendMessageBcc } from "./SendMessageBcc";
|
|
10
10
|
import { MessageText } from "./MessageText";
|
|
11
11
|
import { MessageHtml } from "./MessageHtml";
|
|
12
|
+
import { SendMessageAttachments } from "./SendMessageAttachments";
|
|
12
13
|
export declare const ReplyToMessageRequest: core.serialization.ObjectSchema<serializers.ReplyToMessageRequest.Raw, AgentMail.ReplyToMessageRequest>;
|
|
13
14
|
export declare namespace ReplyToMessageRequest {
|
|
14
15
|
interface Raw {
|
|
@@ -17,5 +18,6 @@ export declare namespace ReplyToMessageRequest {
|
|
|
17
18
|
bcc?: SendMessageBcc.Raw | null;
|
|
18
19
|
text?: MessageText.Raw | null;
|
|
19
20
|
html?: MessageHtml.Raw | null;
|
|
21
|
+
attachments?: SendMessageAttachments.Raw | null;
|
|
20
22
|
}
|
|
21
23
|
}
|
|
@@ -43,10 +43,12 @@ const SendMessageCc_1 = require("./SendMessageCc");
|
|
|
43
43
|
const SendMessageBcc_1 = require("./SendMessageBcc");
|
|
44
44
|
const MessageText_1 = require("./MessageText");
|
|
45
45
|
const MessageHtml_1 = require("./MessageHtml");
|
|
46
|
+
const SendMessageAttachments_1 = require("./SendMessageAttachments");
|
|
46
47
|
exports.ReplyToMessageRequest = core.serialization.object({
|
|
47
48
|
to: SendMessageTo_1.SendMessageTo.optional(),
|
|
48
49
|
cc: SendMessageCc_1.SendMessageCc.optional(),
|
|
49
50
|
bcc: SendMessageBcc_1.SendMessageBcc.optional(),
|
|
50
51
|
text: MessageText_1.MessageText.optional(),
|
|
51
52
|
html: MessageHtml_1.MessageHtml.optional(),
|
|
53
|
+
attachments: SendMessageAttachments_1.SendMessageAttachments.optional(),
|
|
52
54
|
});
|
|
@@ -0,0 +1,17 @@
|
|
|
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 { AttachmentFilename } from "./AttachmentFilename";
|
|
8
|
+
import { AttachmentContentType } from "./AttachmentContentType";
|
|
9
|
+
import { AttachmentContent } from "./AttachmentContent";
|
|
10
|
+
export declare const SendAttachment: core.serialization.ObjectSchema<serializers.SendAttachment.Raw, AgentMail.SendAttachment>;
|
|
11
|
+
export declare namespace SendAttachment {
|
|
12
|
+
interface Raw {
|
|
13
|
+
filename: AttachmentFilename.Raw;
|
|
14
|
+
content_type: AttachmentContentType.Raw;
|
|
15
|
+
content: AttachmentContent.Raw;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
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.SendAttachment = void 0;
|
|
40
|
+
const core = __importStar(require("../../../../core"));
|
|
41
|
+
const AttachmentFilename_1 = require("./AttachmentFilename");
|
|
42
|
+
const AttachmentContentType_1 = require("./AttachmentContentType");
|
|
43
|
+
const AttachmentContent_1 = require("./AttachmentContent");
|
|
44
|
+
exports.SendAttachment = core.serialization.object({
|
|
45
|
+
filename: AttachmentFilename_1.AttachmentFilename,
|
|
46
|
+
contentType: core.serialization.property("content_type", AttachmentContentType_1.AttachmentContentType),
|
|
47
|
+
content: AttachmentContent_1.AttachmentContent,
|
|
48
|
+
});
|
|
@@ -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 { SendAttachment } from "./SendAttachment";
|
|
8
|
+
export declare const SendMessageAttachments: core.serialization.Schema<serializers.SendMessageAttachments.Raw, AgentMail.SendMessageAttachments>;
|
|
9
|
+
export declare namespace SendMessageAttachments {
|
|
10
|
+
type Raw = SendAttachment.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.SendMessageAttachments = void 0;
|
|
40
|
+
const core = __importStar(require("../../../../core"));
|
|
41
|
+
const SendAttachment_1 = require("./SendAttachment");
|
|
42
|
+
exports.SendMessageAttachments = core.serialization.list(SendAttachment_1.SendAttachment);
|
|
@@ -10,6 +10,7 @@ import { SendMessageBcc } from "./SendMessageBcc";
|
|
|
10
10
|
import { MessageSubject } from "./MessageSubject";
|
|
11
11
|
import { MessageText } from "./MessageText";
|
|
12
12
|
import { MessageHtml } from "./MessageHtml";
|
|
13
|
+
import { SendMessageAttachments } from "./SendMessageAttachments";
|
|
13
14
|
export declare const SendMessageRequest: core.serialization.ObjectSchema<serializers.SendMessageRequest.Raw, AgentMail.SendMessageRequest>;
|
|
14
15
|
export declare namespace SendMessageRequest {
|
|
15
16
|
interface Raw {
|
|
@@ -19,5 +20,6 @@ export declare namespace SendMessageRequest {
|
|
|
19
20
|
subject?: MessageSubject.Raw | null;
|
|
20
21
|
text?: MessageText.Raw | null;
|
|
21
22
|
html?: MessageHtml.Raw | null;
|
|
23
|
+
attachments?: SendMessageAttachments.Raw | null;
|
|
22
24
|
}
|
|
23
25
|
}
|
|
@@ -44,6 +44,7 @@ const SendMessageBcc_1 = require("./SendMessageBcc");
|
|
|
44
44
|
const MessageSubject_1 = require("./MessageSubject");
|
|
45
45
|
const MessageText_1 = require("./MessageText");
|
|
46
46
|
const MessageHtml_1 = require("./MessageHtml");
|
|
47
|
+
const SendMessageAttachments_1 = require("./SendMessageAttachments");
|
|
47
48
|
exports.SendMessageRequest = core.serialization.object({
|
|
48
49
|
to: SendMessageTo_1.SendMessageTo,
|
|
49
50
|
cc: SendMessageCc_1.SendMessageCc.optional(),
|
|
@@ -51,4 +52,5 @@ exports.SendMessageRequest = core.serialization.object({
|
|
|
51
52
|
subject: MessageSubject_1.MessageSubject.optional(),
|
|
52
53
|
text: MessageText_1.MessageText.optional(),
|
|
53
54
|
html: MessageHtml_1.MessageHtml.optional(),
|
|
55
|
+
attachments: SendMessageAttachments_1.SendMessageAttachments.optional(),
|
|
54
56
|
});
|
|
@@ -3,7 +3,9 @@ export * from "./AttachmentFilename";
|
|
|
3
3
|
export * from "./AttachmentContentType";
|
|
4
4
|
export * from "./AttachmentSize";
|
|
5
5
|
export * from "./AttachmentInline";
|
|
6
|
+
export * from "./AttachmentContent";
|
|
6
7
|
export * from "./Attachment";
|
|
8
|
+
export * from "./SendAttachment";
|
|
7
9
|
export * from "./MessageId";
|
|
8
10
|
export * from "./MessageEventId";
|
|
9
11
|
export * from "./MessageLabels";
|
|
@@ -27,6 +29,7 @@ export * from "./Addresses";
|
|
|
27
29
|
export * from "./SendMessageTo";
|
|
28
30
|
export * from "./SendMessageCc";
|
|
29
31
|
export * from "./SendMessageBcc";
|
|
32
|
+
export * from "./SendMessageAttachments";
|
|
30
33
|
export * from "./SendMessageRequest";
|
|
31
34
|
export * from "./SendMessageResponse";
|
|
32
35
|
export * from "./ReplyToMessageRequest";
|
|
@@ -19,7 +19,9 @@ __exportStar(require("./AttachmentFilename"), exports);
|
|
|
19
19
|
__exportStar(require("./AttachmentContentType"), exports);
|
|
20
20
|
__exportStar(require("./AttachmentSize"), exports);
|
|
21
21
|
__exportStar(require("./AttachmentInline"), exports);
|
|
22
|
+
__exportStar(require("./AttachmentContent"), exports);
|
|
22
23
|
__exportStar(require("./Attachment"), exports);
|
|
24
|
+
__exportStar(require("./SendAttachment"), exports);
|
|
23
25
|
__exportStar(require("./MessageId"), exports);
|
|
24
26
|
__exportStar(require("./MessageEventId"), exports);
|
|
25
27
|
__exportStar(require("./MessageLabels"), exports);
|
|
@@ -43,6 +45,7 @@ __exportStar(require("./Addresses"), exports);
|
|
|
43
45
|
__exportStar(require("./SendMessageTo"), exports);
|
|
44
46
|
__exportStar(require("./SendMessageCc"), exports);
|
|
45
47
|
__exportStar(require("./SendMessageBcc"), exports);
|
|
48
|
+
__exportStar(require("./SendMessageAttachments"), exports);
|
|
46
49
|
__exportStar(require("./SendMessageRequest"), exports);
|
|
47
50
|
__exportStar(require("./SendMessageResponse"), exports);
|
|
48
51
|
__exportStar(require("./ReplyToMessageRequest"), exports);
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.24";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
export declare const AttachmentContent: core.serialization.Schema<serializers.AttachmentContent.Raw, AgentMail.AttachmentContent>;
|
|
8
|
+
export declare namespace AttachmentContent {
|
|
9
|
+
type Raw = string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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.AttachmentContent = void 0;
|
|
40
|
+
const core = __importStar(require("../../../../core"));
|
|
41
|
+
exports.AttachmentContent = core.serialization.string();
|
|
@@ -9,6 +9,7 @@ import { SendMessageCc } from "./SendMessageCc";
|
|
|
9
9
|
import { SendMessageBcc } from "./SendMessageBcc";
|
|
10
10
|
import { MessageText } from "./MessageText";
|
|
11
11
|
import { MessageHtml } from "./MessageHtml";
|
|
12
|
+
import { SendMessageAttachments } from "./SendMessageAttachments";
|
|
12
13
|
export declare const ReplyToMessageRequest: core.serialization.ObjectSchema<serializers.ReplyToMessageRequest.Raw, AgentMail.ReplyToMessageRequest>;
|
|
13
14
|
export declare namespace ReplyToMessageRequest {
|
|
14
15
|
interface Raw {
|
|
@@ -17,5 +18,6 @@ export declare namespace ReplyToMessageRequest {
|
|
|
17
18
|
bcc?: SendMessageBcc.Raw | null;
|
|
18
19
|
text?: MessageText.Raw | null;
|
|
19
20
|
html?: MessageHtml.Raw | null;
|
|
21
|
+
attachments?: SendMessageAttachments.Raw | null;
|
|
20
22
|
}
|
|
21
23
|
}
|
|
@@ -43,10 +43,12 @@ const SendMessageCc_1 = require("./SendMessageCc");
|
|
|
43
43
|
const SendMessageBcc_1 = require("./SendMessageBcc");
|
|
44
44
|
const MessageText_1 = require("./MessageText");
|
|
45
45
|
const MessageHtml_1 = require("./MessageHtml");
|
|
46
|
+
const SendMessageAttachments_1 = require("./SendMessageAttachments");
|
|
46
47
|
exports.ReplyToMessageRequest = core.serialization.object({
|
|
47
48
|
to: SendMessageTo_1.SendMessageTo.optional(),
|
|
48
49
|
cc: SendMessageCc_1.SendMessageCc.optional(),
|
|
49
50
|
bcc: SendMessageBcc_1.SendMessageBcc.optional(),
|
|
50
51
|
text: MessageText_1.MessageText.optional(),
|
|
51
52
|
html: MessageHtml_1.MessageHtml.optional(),
|
|
53
|
+
attachments: SendMessageAttachments_1.SendMessageAttachments.optional(),
|
|
52
54
|
});
|
|
@@ -0,0 +1,17 @@
|
|
|
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 { AttachmentFilename } from "./AttachmentFilename";
|
|
8
|
+
import { AttachmentContentType } from "./AttachmentContentType";
|
|
9
|
+
import { AttachmentContent } from "./AttachmentContent";
|
|
10
|
+
export declare const SendAttachment: core.serialization.ObjectSchema<serializers.SendAttachment.Raw, AgentMail.SendAttachment>;
|
|
11
|
+
export declare namespace SendAttachment {
|
|
12
|
+
interface Raw {
|
|
13
|
+
filename: AttachmentFilename.Raw;
|
|
14
|
+
content_type: AttachmentContentType.Raw;
|
|
15
|
+
content: AttachmentContent.Raw;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
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.SendAttachment = void 0;
|
|
40
|
+
const core = __importStar(require("../../../../core"));
|
|
41
|
+
const AttachmentFilename_1 = require("./AttachmentFilename");
|
|
42
|
+
const AttachmentContentType_1 = require("./AttachmentContentType");
|
|
43
|
+
const AttachmentContent_1 = require("./AttachmentContent");
|
|
44
|
+
exports.SendAttachment = core.serialization.object({
|
|
45
|
+
filename: AttachmentFilename_1.AttachmentFilename,
|
|
46
|
+
contentType: core.serialization.property("content_type", AttachmentContentType_1.AttachmentContentType),
|
|
47
|
+
content: AttachmentContent_1.AttachmentContent,
|
|
48
|
+
});
|
|
@@ -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 { SendAttachment } from "./SendAttachment";
|
|
8
|
+
export declare const SendMessageAttachments: core.serialization.Schema<serializers.SendMessageAttachments.Raw, AgentMail.SendMessageAttachments>;
|
|
9
|
+
export declare namespace SendMessageAttachments {
|
|
10
|
+
type Raw = SendAttachment.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.SendMessageAttachments = void 0;
|
|
40
|
+
const core = __importStar(require("../../../../core"));
|
|
41
|
+
const SendAttachment_1 = require("./SendAttachment");
|
|
42
|
+
exports.SendMessageAttachments = core.serialization.list(SendAttachment_1.SendAttachment);
|
|
@@ -10,6 +10,7 @@ import { SendMessageBcc } from "./SendMessageBcc";
|
|
|
10
10
|
import { MessageSubject } from "./MessageSubject";
|
|
11
11
|
import { MessageText } from "./MessageText";
|
|
12
12
|
import { MessageHtml } from "./MessageHtml";
|
|
13
|
+
import { SendMessageAttachments } from "./SendMessageAttachments";
|
|
13
14
|
export declare const SendMessageRequest: core.serialization.ObjectSchema<serializers.SendMessageRequest.Raw, AgentMail.SendMessageRequest>;
|
|
14
15
|
export declare namespace SendMessageRequest {
|
|
15
16
|
interface Raw {
|
|
@@ -19,5 +20,6 @@ export declare namespace SendMessageRequest {
|
|
|
19
20
|
subject?: MessageSubject.Raw | null;
|
|
20
21
|
text?: MessageText.Raw | null;
|
|
21
22
|
html?: MessageHtml.Raw | null;
|
|
23
|
+
attachments?: SendMessageAttachments.Raw | null;
|
|
22
24
|
}
|
|
23
25
|
}
|
|
@@ -44,6 +44,7 @@ const SendMessageBcc_1 = require("./SendMessageBcc");
|
|
|
44
44
|
const MessageSubject_1 = require("./MessageSubject");
|
|
45
45
|
const MessageText_1 = require("./MessageText");
|
|
46
46
|
const MessageHtml_1 = require("./MessageHtml");
|
|
47
|
+
const SendMessageAttachments_1 = require("./SendMessageAttachments");
|
|
47
48
|
exports.SendMessageRequest = core.serialization.object({
|
|
48
49
|
to: SendMessageTo_1.SendMessageTo,
|
|
49
50
|
cc: SendMessageCc_1.SendMessageCc.optional(),
|
|
@@ -51,4 +52,5 @@ exports.SendMessageRequest = core.serialization.object({
|
|
|
51
52
|
subject: MessageSubject_1.MessageSubject.optional(),
|
|
52
53
|
text: MessageText_1.MessageText.optional(),
|
|
53
54
|
html: MessageHtml_1.MessageHtml.optional(),
|
|
55
|
+
attachments: SendMessageAttachments_1.SendMessageAttachments.optional(),
|
|
54
56
|
});
|
|
@@ -3,7 +3,9 @@ export * from "./AttachmentFilename";
|
|
|
3
3
|
export * from "./AttachmentContentType";
|
|
4
4
|
export * from "./AttachmentSize";
|
|
5
5
|
export * from "./AttachmentInline";
|
|
6
|
+
export * from "./AttachmentContent";
|
|
6
7
|
export * from "./Attachment";
|
|
8
|
+
export * from "./SendAttachment";
|
|
7
9
|
export * from "./MessageId";
|
|
8
10
|
export * from "./MessageEventId";
|
|
9
11
|
export * from "./MessageLabels";
|
|
@@ -27,6 +29,7 @@ export * from "./Addresses";
|
|
|
27
29
|
export * from "./SendMessageTo";
|
|
28
30
|
export * from "./SendMessageCc";
|
|
29
31
|
export * from "./SendMessageBcc";
|
|
32
|
+
export * from "./SendMessageAttachments";
|
|
30
33
|
export * from "./SendMessageRequest";
|
|
31
34
|
export * from "./SendMessageResponse";
|
|
32
35
|
export * from "./ReplyToMessageRequest";
|
|
@@ -19,7 +19,9 @@ __exportStar(require("./AttachmentFilename"), exports);
|
|
|
19
19
|
__exportStar(require("./AttachmentContentType"), exports);
|
|
20
20
|
__exportStar(require("./AttachmentSize"), exports);
|
|
21
21
|
__exportStar(require("./AttachmentInline"), exports);
|
|
22
|
+
__exportStar(require("./AttachmentContent"), exports);
|
|
22
23
|
__exportStar(require("./Attachment"), exports);
|
|
24
|
+
__exportStar(require("./SendAttachment"), exports);
|
|
23
25
|
__exportStar(require("./MessageId"), exports);
|
|
24
26
|
__exportStar(require("./MessageEventId"), exports);
|
|
25
27
|
__exportStar(require("./MessageLabels"), exports);
|
|
@@ -43,6 +45,7 @@ __exportStar(require("./Addresses"), exports);
|
|
|
43
45
|
__exportStar(require("./SendMessageTo"), exports);
|
|
44
46
|
__exportStar(require("./SendMessageCc"), exports);
|
|
45
47
|
__exportStar(require("./SendMessageBcc"), exports);
|
|
48
|
+
__exportStar(require("./SendMessageAttachments"), exports);
|
|
46
49
|
__exportStar(require("./SendMessageRequest"), exports);
|
|
47
50
|
__exportStar(require("./SendMessageResponse"), exports);
|
|
48
51
|
__exportStar(require("./ReplyToMessageRequest"), exports);
|
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.24";
|
package/version.js
CHANGED