agentmail 0.0.38 → 0.0.39
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/README.md +1 -0
- package/api/resources/contexts/client/Client.js +4 -4
- package/api/resources/drafts/client/Client.js +2 -2
- package/api/resources/drafts/types/CreateDraftRequest.d.ts +1 -0
- package/api/resources/drafts/types/Draft.d.ts +1 -0
- package/api/resources/drafts/types/DraftReplyTo.d.ts +7 -0
- package/api/resources/drafts/types/DraftReplyTo.js +5 -0
- package/api/resources/drafts/types/index.d.ts +1 -0
- package/api/resources/drafts/types/index.js +1 -0
- package/api/resources/inboxes/client/Client.d.ts +2 -1
- package/api/resources/inboxes/client/Client.js +5 -4
- package/api/resources/inboxes/resources/drafts/client/Client.d.ts +1 -0
- package/api/resources/inboxes/resources/drafts/client/Client.js +5 -4
- package/api/resources/inboxes/resources/messages/client/Client.js +6 -6
- package/api/resources/inboxes/resources/threads/client/Client.js +3 -3
- package/api/resources/inboxes/types/ClientId.d.ts +7 -0
- package/api/resources/inboxes/types/ClientId.js +5 -0
- package/api/resources/inboxes/types/CreateInboxRequest.d.ts +2 -0
- package/api/resources/inboxes/types/Inbox.d.ts +1 -0
- package/api/resources/inboxes/types/index.d.ts +1 -0
- package/api/resources/inboxes/types/index.js +1 -0
- package/api/resources/messages/types/Message.d.ts +1 -1
- package/api/resources/threads/client/Client.js +3 -3
- package/api/resources/webhooks/client/Client.d.ts +2 -1
- package/api/resources/webhooks/client/Client.js +6 -5
- package/api/resources/webhooks/types/ClientId.d.ts +7 -0
- package/api/resources/webhooks/types/ClientId.js +5 -0
- package/api/resources/webhooks/types/CreateWebhookRequest.d.ts +1 -0
- package/api/resources/webhooks/types/Webhook.d.ts +1 -0
- package/api/resources/webhooks/types/index.d.ts +1 -0
- package/api/resources/webhooks/types/index.js +1 -0
- package/dist/api/resources/contexts/client/Client.js +4 -4
- package/dist/api/resources/drafts/client/Client.js +2 -2
- package/dist/api/resources/drafts/types/CreateDraftRequest.d.ts +1 -0
- package/dist/api/resources/drafts/types/Draft.d.ts +1 -0
- package/dist/api/resources/drafts/types/DraftReplyTo.d.ts +7 -0
- package/dist/api/resources/drafts/types/DraftReplyTo.js +5 -0
- package/dist/api/resources/drafts/types/index.d.ts +1 -0
- package/dist/api/resources/drafts/types/index.js +1 -0
- package/dist/api/resources/inboxes/client/Client.d.ts +2 -1
- package/dist/api/resources/inboxes/client/Client.js +5 -4
- package/dist/api/resources/inboxes/resources/drafts/client/Client.d.ts +1 -0
- package/dist/api/resources/inboxes/resources/drafts/client/Client.js +5 -4
- package/dist/api/resources/inboxes/resources/messages/client/Client.js +6 -6
- package/dist/api/resources/inboxes/resources/threads/client/Client.js +3 -3
- package/dist/api/resources/inboxes/types/ClientId.d.ts +7 -0
- package/dist/api/resources/inboxes/types/ClientId.js +5 -0
- package/dist/api/resources/inboxes/types/CreateInboxRequest.d.ts +2 -0
- package/dist/api/resources/inboxes/types/Inbox.d.ts +1 -0
- package/dist/api/resources/inboxes/types/index.d.ts +1 -0
- package/dist/api/resources/inboxes/types/index.js +1 -0
- package/dist/api/resources/messages/types/Message.d.ts +1 -1
- package/dist/api/resources/threads/client/Client.js +3 -3
- package/dist/api/resources/webhooks/client/Client.d.ts +2 -1
- package/dist/api/resources/webhooks/client/Client.js +6 -5
- package/dist/api/resources/webhooks/types/ClientId.d.ts +7 -0
- package/dist/api/resources/webhooks/types/ClientId.js +5 -0
- package/dist/api/resources/webhooks/types/CreateWebhookRequest.d.ts +1 -0
- package/dist/api/resources/webhooks/types/Webhook.d.ts +1 -0
- package/dist/api/resources/webhooks/types/index.d.ts +1 -0
- package/dist/api/resources/webhooks/types/index.js +1 -0
- package/dist/serialization/resources/drafts/types/CreateDraftRequest.d.ts +2 -0
- package/dist/serialization/resources/drafts/types/CreateDraftRequest.js +2 -0
- package/dist/serialization/resources/drafts/types/Draft.d.ts +2 -0
- package/dist/serialization/resources/drafts/types/Draft.js +2 -0
- package/dist/serialization/resources/drafts/types/DraftReplyTo.d.ts +10 -0
- package/dist/serialization/resources/drafts/types/DraftReplyTo.js +41 -0
- package/dist/serialization/resources/drafts/types/index.d.ts +1 -0
- package/dist/serialization/resources/drafts/types/index.js +1 -0
- package/dist/serialization/resources/inboxes/types/ClientId.d.ts +10 -0
- package/dist/serialization/resources/inboxes/types/ClientId.js +41 -0
- package/dist/serialization/resources/inboxes/types/CreateInboxRequest.d.ts +2 -0
- package/dist/serialization/resources/inboxes/types/CreateInboxRequest.js +2 -0
- package/dist/serialization/resources/inboxes/types/Inbox.d.ts +2 -0
- package/dist/serialization/resources/inboxes/types/Inbox.js +2 -0
- package/dist/serialization/resources/inboxes/types/index.d.ts +1 -0
- package/dist/serialization/resources/inboxes/types/index.js +1 -0
- package/dist/serialization/resources/webhooks/types/ClientId.d.ts +10 -0
- package/dist/serialization/resources/webhooks/types/ClientId.js +41 -0
- package/dist/serialization/resources/webhooks/types/CreateWebhookRequest.d.ts +2 -0
- package/dist/serialization/resources/webhooks/types/CreateWebhookRequest.js +2 -0
- package/dist/serialization/resources/webhooks/types/Webhook.d.ts +2 -0
- package/dist/serialization/resources/webhooks/types/Webhook.js +2 -0
- package/dist/serialization/resources/webhooks/types/index.d.ts +1 -0
- package/dist/serialization/resources/webhooks/types/index.js +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +3 -0
- package/serialization/resources/drafts/types/CreateDraftRequest.d.ts +2 -0
- package/serialization/resources/drafts/types/CreateDraftRequest.js +2 -0
- package/serialization/resources/drafts/types/Draft.d.ts +2 -0
- package/serialization/resources/drafts/types/Draft.js +2 -0
- package/serialization/resources/drafts/types/DraftReplyTo.d.ts +10 -0
- package/serialization/resources/drafts/types/DraftReplyTo.js +41 -0
- package/serialization/resources/drafts/types/index.d.ts +1 -0
- package/serialization/resources/drafts/types/index.js +1 -0
- package/serialization/resources/inboxes/types/ClientId.d.ts +10 -0
- package/serialization/resources/inboxes/types/ClientId.js +41 -0
- package/serialization/resources/inboxes/types/CreateInboxRequest.d.ts +2 -0
- package/serialization/resources/inboxes/types/CreateInboxRequest.js +2 -0
- package/serialization/resources/inboxes/types/Inbox.d.ts +2 -0
- package/serialization/resources/inboxes/types/Inbox.js +2 -0
- package/serialization/resources/inboxes/types/index.d.ts +1 -0
- package/serialization/resources/inboxes/types/index.js +1 -0
- package/serialization/resources/webhooks/types/ClientId.d.ts +10 -0
- package/serialization/resources/webhooks/types/ClientId.js +41 -0
- package/serialization/resources/webhooks/types/CreateWebhookRequest.d.ts +2 -0
- package/serialization/resources/webhooks/types/CreateWebhookRequest.js +2 -0
- package/serialization/resources/webhooks/types/Webhook.d.ts +2 -0
- package/serialization/resources/webhooks/types/Webhook.js +2 -0
- package/serialization/resources/webhooks/types/index.d.ts +1 -0
- package/serialization/resources/webhooks/types/index.js +1 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -89,7 +89,7 @@ class Drafts {
|
|
|
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/drafts"),
|
|
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.39", "User-Agent": "agentmail/0.0.39", "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",
|
|
@@ -153,7 +153,7 @@ class Drafts {
|
|
|
153
153
|
const _response = yield core.fetcher({
|
|
154
154
|
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/drafts/${encodeURIComponent(serializers.DraftId.jsonOrThrow(draftId))}`),
|
|
155
155
|
method: "GET",
|
|
156
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
156
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.39", "User-Agent": "agentmail/0.0.39", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
157
157
|
contentType: "application/json",
|
|
158
158
|
requestType: "json",
|
|
159
159
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./DraftId"), exports);
|
|
18
18
|
__exportStar(require("./DraftLabels"), exports);
|
|
19
|
+
__exportStar(require("./DraftReplyTo"), exports);
|
|
19
20
|
__exportStar(require("./DraftTo"), exports);
|
|
20
21
|
__exportStar(require("./DraftCc"), exports);
|
|
21
22
|
__exportStar(require("./DraftBcc"), exports);
|
|
@@ -62,7 +62,8 @@ export declare class Inboxes {
|
|
|
62
62
|
* await client.inboxes.create({
|
|
63
63
|
* username: undefined,
|
|
64
64
|
* domain: undefined,
|
|
65
|
-
* displayName: undefined
|
|
65
|
+
* displayName: undefined,
|
|
66
|
+
* clientId: undefined
|
|
66
67
|
* })
|
|
67
68
|
*/
|
|
68
69
|
create(request: AgentMail.inboxes.CreateInboxRequest, requestOptions?: Inboxes.RequestOptions): Promise<AgentMail.inboxes.Inbox>;
|
|
@@ -95,7 +95,7 @@ class Inboxes {
|
|
|
95
95
|
const _response = yield core.fetcher({
|
|
96
96
|
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"),
|
|
97
97
|
method: "GET",
|
|
98
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
98
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.39", "User-Agent": "agentmail/0.0.39", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
99
99
|
contentType: "application/json",
|
|
100
100
|
queryParameters: _queryParams,
|
|
101
101
|
requestType: "json",
|
|
@@ -148,7 +148,7 @@ class Inboxes {
|
|
|
148
148
|
const _response = yield core.fetcher({
|
|
149
149
|
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.inboxes.InboxId.jsonOrThrow(inboxId))}`),
|
|
150
150
|
method: "GET",
|
|
151
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
151
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.39", "User-Agent": "agentmail/0.0.39", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
152
152
|
contentType: "application/json",
|
|
153
153
|
requestType: "json",
|
|
154
154
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -206,7 +206,8 @@ class Inboxes {
|
|
|
206
206
|
* await client.inboxes.create({
|
|
207
207
|
* username: undefined,
|
|
208
208
|
* domain: undefined,
|
|
209
|
-
* displayName: undefined
|
|
209
|
+
* displayName: undefined,
|
|
210
|
+
* clientId: undefined
|
|
210
211
|
* })
|
|
211
212
|
*/
|
|
212
213
|
create(request, requestOptions) {
|
|
@@ -215,7 +216,7 @@ class Inboxes {
|
|
|
215
216
|
const _response = yield core.fetcher({
|
|
216
217
|
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"),
|
|
217
218
|
method: "POST",
|
|
218
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
219
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.39", "User-Agent": "agentmail/0.0.39", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
219
220
|
contentType: "application/json",
|
|
220
221
|
requestType: "json",
|
|
221
222
|
body: serializers.inboxes.CreateInboxRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -90,7 +90,7 @@ class Drafts {
|
|
|
90
90
|
const _response = yield core.fetcher({
|
|
91
91
|
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.inboxes.InboxId.jsonOrThrow(inboxId))}/drafts`),
|
|
92
92
|
method: "GET",
|
|
93
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
93
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.39", "User-Agent": "agentmail/0.0.39", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
94
94
|
contentType: "application/json",
|
|
95
95
|
queryParameters: _queryParams,
|
|
96
96
|
requestType: "json",
|
|
@@ -155,7 +155,7 @@ class Drafts {
|
|
|
155
155
|
const _response = yield core.fetcher({
|
|
156
156
|
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.inboxes.InboxId.jsonOrThrow(inboxId))}/drafts/${encodeURIComponent(serializers.DraftId.jsonOrThrow(draftId))}`),
|
|
157
157
|
method: "GET",
|
|
158
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
158
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.39", "User-Agent": "agentmail/0.0.39", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
159
159
|
contentType: "application/json",
|
|
160
160
|
requestType: "json",
|
|
161
161
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -213,6 +213,7 @@ class Drafts {
|
|
|
213
213
|
* @example
|
|
214
214
|
* await client.inboxes.drafts.create("inbox_id", {
|
|
215
215
|
* labels: undefined,
|
|
216
|
+
* replyTo: undefined,
|
|
216
217
|
* to: undefined,
|
|
217
218
|
* cc: undefined,
|
|
218
219
|
* bcc: undefined,
|
|
@@ -227,7 +228,7 @@ class Drafts {
|
|
|
227
228
|
const _response = yield core.fetcher({
|
|
228
229
|
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.inboxes.InboxId.jsonOrThrow(inboxId))}/drafts`),
|
|
229
230
|
method: "POST",
|
|
230
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
231
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.39", "User-Agent": "agentmail/0.0.39", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
231
232
|
contentType: "application/json",
|
|
232
233
|
requestType: "json",
|
|
233
234
|
body: serializers.CreateDraftRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -298,7 +299,7 @@ class Drafts {
|
|
|
298
299
|
const _response = yield core.fetcher({
|
|
299
300
|
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.inboxes.InboxId.jsonOrThrow(inboxId))}/drafts/${encodeURIComponent(serializers.DraftId.jsonOrThrow(draftId))}/send`),
|
|
300
301
|
method: "POST",
|
|
301
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
302
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.39", "User-Agent": "agentmail/0.0.39", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
302
303
|
contentType: "application/json",
|
|
303
304
|
requestType: "json",
|
|
304
305
|
body: serializers.UpdateMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -90,7 +90,7 @@ class Messages {
|
|
|
90
90
|
const _response = yield core.fetcher({
|
|
91
91
|
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.inboxes.InboxId.jsonOrThrow(inboxId))}/messages`),
|
|
92
92
|
method: "GET",
|
|
93
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
93
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.39", "User-Agent": "agentmail/0.0.39", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
94
94
|
contentType: "application/json",
|
|
95
95
|
queryParameters: _queryParams,
|
|
96
96
|
requestType: "json",
|
|
@@ -155,7 +155,7 @@ class Messages {
|
|
|
155
155
|
const _response = yield core.fetcher({
|
|
156
156
|
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.inboxes.InboxId.jsonOrThrow(inboxId))}/messages/${encodeURIComponent(serializers.MessageId.jsonOrThrow(messageId))}`),
|
|
157
157
|
method: "GET",
|
|
158
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
158
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.39", "User-Agent": "agentmail/0.0.39", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
159
159
|
contentType: "application/json",
|
|
160
160
|
requestType: "json",
|
|
161
161
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -212,7 +212,7 @@ class Messages {
|
|
|
212
212
|
const _response = yield core.fetcher({
|
|
213
213
|
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.inboxes.InboxId.jsonOrThrow(inboxId))}/messages/${encodeURIComponent(serializers.MessageId.jsonOrThrow(messageId))}/attachments/${encodeURIComponent(serializers.AttachmentId.jsonOrThrow(attachmentId))}`),
|
|
214
214
|
method: "GET",
|
|
215
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
215
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.39", "User-Agent": "agentmail/0.0.39", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
216
216
|
contentType: "application/json",
|
|
217
217
|
requestType: "json",
|
|
218
218
|
responseType: "streaming",
|
|
@@ -283,7 +283,7 @@ class Messages {
|
|
|
283
283
|
const _response = yield core.fetcher({
|
|
284
284
|
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.inboxes.InboxId.jsonOrThrow(inboxId))}/messages/send`),
|
|
285
285
|
method: "POST",
|
|
286
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
286
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.39", "User-Agent": "agentmail/0.0.39", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
287
287
|
contentType: "application/json",
|
|
288
288
|
requestType: "json",
|
|
289
289
|
body: serializers.SendMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -376,7 +376,7 @@ class Messages {
|
|
|
376
376
|
const _response = yield core.fetcher({
|
|
377
377
|
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.inboxes.InboxId.jsonOrThrow(inboxId))}/messages/${encodeURIComponent(serializers.MessageId.jsonOrThrow(messageId))}/reply`),
|
|
378
378
|
method: "POST",
|
|
379
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
379
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.39", "User-Agent": "agentmail/0.0.39", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
380
380
|
contentType: "application/json",
|
|
381
381
|
requestType: "json",
|
|
382
382
|
body: serializers.ReplyToMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -462,7 +462,7 @@ class Messages {
|
|
|
462
462
|
const _response = yield core.fetcher({
|
|
463
463
|
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.inboxes.InboxId.jsonOrThrow(inboxId))}/messages/${encodeURIComponent(serializers.MessageId.jsonOrThrow(messageId))}`),
|
|
464
464
|
method: "PATCH",
|
|
465
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
465
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.39", "User-Agent": "agentmail/0.0.39", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
466
466
|
contentType: "application/json",
|
|
467
467
|
requestType: "json",
|
|
468
468
|
body: serializers.UpdateMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -90,7 +90,7 @@ class Threads {
|
|
|
90
90
|
const _response = yield core.fetcher({
|
|
91
91
|
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.inboxes.InboxId.jsonOrThrow(inboxId))}/threads`),
|
|
92
92
|
method: "GET",
|
|
93
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
93
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.39", "User-Agent": "agentmail/0.0.39", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
94
94
|
contentType: "application/json",
|
|
95
95
|
queryParameters: _queryParams,
|
|
96
96
|
requestType: "json",
|
|
@@ -155,7 +155,7 @@ class Threads {
|
|
|
155
155
|
const _response = yield core.fetcher({
|
|
156
156
|
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.inboxes.InboxId.jsonOrThrow(inboxId))}/threads/${encodeURIComponent(serializers.ThreadId.jsonOrThrow(threadId))}`),
|
|
157
157
|
method: "GET",
|
|
158
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
158
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.39", "User-Agent": "agentmail/0.0.39", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
159
159
|
contentType: "application/json",
|
|
160
160
|
requestType: "json",
|
|
161
161
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -212,7 +212,7 @@ class Threads {
|
|
|
212
212
|
const _response = yield core.fetcher({
|
|
213
213
|
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.inboxes.InboxId.jsonOrThrow(inboxId))}/threads/${encodeURIComponent(serializers.ThreadId.jsonOrThrow(threadId))}/attachments/${encodeURIComponent(serializers.AttachmentId.jsonOrThrow(attachmentId))}`),
|
|
214
214
|
method: "GET",
|
|
215
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
215
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.39", "User-Agent": "agentmail/0.0.39", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
216
216
|
contentType: "application/json",
|
|
217
217
|
requestType: "json",
|
|
218
218
|
responseType: "streaming",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as AgentMail from "../../../index";
|
|
4
5
|
export interface CreateInboxRequest {
|
|
5
6
|
/** Username of address. Randomly generated if not specified. */
|
|
6
7
|
username?: string;
|
|
@@ -8,4 +9,5 @@ export interface CreateInboxRequest {
|
|
|
8
9
|
domain?: string;
|
|
9
10
|
/** Display name: `Display Name <username@domain.com>`. Defaults to `AgentMail`. Pass empty string to omit. */
|
|
10
11
|
displayName?: string;
|
|
12
|
+
clientId?: AgentMail.inboxes.ClientId;
|
|
11
13
|
}
|
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./InboxId"), exports);
|
|
18
|
+
__exportStar(require("./ClientId"), exports);
|
|
18
19
|
__exportStar(require("./Inbox"), exports);
|
|
19
20
|
__exportStar(require("./ListInboxesResponse"), exports);
|
|
20
21
|
__exportStar(require("./CreateInboxRequest"), exports);
|
|
@@ -9,7 +9,7 @@ export interface Message {
|
|
|
9
9
|
labels: AgentMail.MessageLabels;
|
|
10
10
|
timestamp: AgentMail.MessageTimestamp;
|
|
11
11
|
from: AgentMail.MessageFrom;
|
|
12
|
-
/**
|
|
12
|
+
/** Reply-to addresses. In format `username@domain.com` or `Display Name <username@domain.com>`. */
|
|
13
13
|
replyTo?: string[];
|
|
14
14
|
to: AgentMail.MessageTo;
|
|
15
15
|
cc?: AgentMail.MessageCc;
|
|
@@ -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/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.39", "User-Agent": "agentmail/0.0.39", "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",
|
|
@@ -153,7 +153,7 @@ class Threads {
|
|
|
153
153
|
const _response = yield core.fetcher({
|
|
154
154
|
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/threads/${encodeURIComponent(serializers.ThreadId.jsonOrThrow(threadId))}`),
|
|
155
155
|
method: "GET",
|
|
156
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
156
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.39", "User-Agent": "agentmail/0.0.39", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
157
157
|
contentType: "application/json",
|
|
158
158
|
requestType: "json",
|
|
159
159
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -210,7 +210,7 @@ class Threads {
|
|
|
210
210
|
const _response = yield core.fetcher({
|
|
211
211
|
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/threads/${encodeURIComponent(serializers.ThreadId.jsonOrThrow(threadId))}/attachments/${encodeURIComponent(serializers.AttachmentId.jsonOrThrow(attachmentId))}`),
|
|
212
212
|
method: "GET",
|
|
213
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
213
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.39", "User-Agent": "agentmail/0.0.39", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
214
214
|
contentType: "application/json",
|
|
215
215
|
requestType: "json",
|
|
216
216
|
responseType: "streaming",
|
|
@@ -53,7 +53,8 @@ export declare class Webhooks {
|
|
|
53
53
|
* await client.webhooks.create({
|
|
54
54
|
* url: "url",
|
|
55
55
|
* eventTypes: ["message.received", "message.received"],
|
|
56
|
-
* inboxIds: undefined
|
|
56
|
+
* inboxIds: undefined,
|
|
57
|
+
* clientId: undefined
|
|
57
58
|
* })
|
|
58
59
|
*/
|
|
59
60
|
create(request: AgentMail.CreateWebhookRequest, requestOptions?: Webhooks.RequestOptions): Promise<AgentMail.Webhook>;
|
|
@@ -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.39", "User-Agent": "agentmail/0.0.39", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
84
84
|
contentType: "application/json",
|
|
85
85
|
queryParameters: _queryParams,
|
|
86
86
|
requestType: "json",
|
|
@@ -133,7 +133,7 @@ class Webhooks {
|
|
|
133
133
|
const _response = yield core.fetcher({
|
|
134
134
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/webhooks/${encodeURIComponent(serializers.WebhookId.jsonOrThrow(webhookId))}`),
|
|
135
135
|
method: "GET",
|
|
136
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
136
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.39", "User-Agent": "agentmail/0.0.39", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
137
137
|
contentType: "application/json",
|
|
138
138
|
requestType: "json",
|
|
139
139
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -191,7 +191,8 @@ class Webhooks {
|
|
|
191
191
|
* await client.webhooks.create({
|
|
192
192
|
* url: "url",
|
|
193
193
|
* eventTypes: ["message.received", "message.received"],
|
|
194
|
-
* inboxIds: undefined
|
|
194
|
+
* inboxIds: undefined,
|
|
195
|
+
* clientId: undefined
|
|
195
196
|
* })
|
|
196
197
|
*/
|
|
197
198
|
create(request, requestOptions) {
|
|
@@ -200,7 +201,7 @@ class Webhooks {
|
|
|
200
201
|
const _response = yield core.fetcher({
|
|
201
202
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, "/v0/webhooks"),
|
|
202
203
|
method: "POST",
|
|
203
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
204
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.39", "User-Agent": "agentmail/0.0.39", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
204
205
|
contentType: "application/json",
|
|
205
206
|
requestType: "json",
|
|
206
207
|
body: serializers.CreateWebhookRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -264,7 +265,7 @@ class Webhooks {
|
|
|
264
265
|
const _response = yield core.fetcher({
|
|
265
266
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/webhooks/${encodeURIComponent(serializers.WebhookId.jsonOrThrow(webhookId))}`),
|
|
266
267
|
method: "DELETE",
|
|
267
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
268
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.39", "User-Agent": "agentmail/0.0.39", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
268
269
|
contentType: "application/json",
|
|
269
270
|
requestType: "json",
|
|
270
271
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./WebhookId"), exports);
|
|
18
|
+
__exportStar(require("./ClientId"), exports);
|
|
18
19
|
__exportStar(require("./Url"), exports);
|
|
19
20
|
__exportStar(require("./EventType"), exports);
|
|
20
21
|
__exportStar(require("./EventTypes"), exports);
|
|
@@ -5,6 +5,7 @@ import * as serializers from "../../../index";
|
|
|
5
5
|
import * as AgentMail from "../../../../api/index";
|
|
6
6
|
import * as core from "../../../../core";
|
|
7
7
|
import { DraftLabels } from "./DraftLabels";
|
|
8
|
+
import { DraftReplyTo } from "./DraftReplyTo";
|
|
8
9
|
import { DraftTo } from "./DraftTo";
|
|
9
10
|
import { DraftCc } from "./DraftCc";
|
|
10
11
|
import { DraftBcc } from "./DraftBcc";
|
|
@@ -15,6 +16,7 @@ export declare const CreateDraftRequest: core.serialization.ObjectSchema<seriali
|
|
|
15
16
|
export declare namespace CreateDraftRequest {
|
|
16
17
|
interface Raw {
|
|
17
18
|
labels?: DraftLabels.Raw | null;
|
|
19
|
+
reply_to?: DraftReplyTo.Raw | null;
|
|
18
20
|
to?: DraftTo.Raw | null;
|
|
19
21
|
cc?: DraftCc.Raw | null;
|
|
20
22
|
bcc?: DraftBcc.Raw | null;
|
|
@@ -39,6 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.CreateDraftRequest = void 0;
|
|
40
40
|
const core = __importStar(require("../../../../core"));
|
|
41
41
|
const DraftLabels_1 = require("./DraftLabels");
|
|
42
|
+
const DraftReplyTo_1 = require("./DraftReplyTo");
|
|
42
43
|
const DraftTo_1 = require("./DraftTo");
|
|
43
44
|
const DraftCc_1 = require("./DraftCc");
|
|
44
45
|
const DraftBcc_1 = require("./DraftBcc");
|
|
@@ -47,6 +48,7 @@ const DraftText_1 = require("./DraftText");
|
|
|
47
48
|
const DraftHtml_1 = require("./DraftHtml");
|
|
48
49
|
exports.CreateDraftRequest = core.serialization.object({
|
|
49
50
|
labels: DraftLabels_1.DraftLabels.optional(),
|
|
51
|
+
replyTo: core.serialization.property("reply_to", DraftReplyTo_1.DraftReplyTo.optional()),
|
|
50
52
|
to: DraftTo_1.DraftTo.optional(),
|
|
51
53
|
cc: DraftCc_1.DraftCc.optional(),
|
|
52
54
|
bcc: DraftBcc_1.DraftBcc.optional(),
|
|
@@ -8,6 +8,7 @@ import { InboxId } from "../../inboxes/types/InboxId";
|
|
|
8
8
|
import { ThreadId } from "../../threads/types/ThreadId";
|
|
9
9
|
import { DraftId } from "./DraftId";
|
|
10
10
|
import { DraftLabels } from "./DraftLabels";
|
|
11
|
+
import { DraftReplyTo } from "./DraftReplyTo";
|
|
11
12
|
import { DraftTo } from "./DraftTo";
|
|
12
13
|
import { DraftCc } from "./DraftCc";
|
|
13
14
|
import { DraftBcc } from "./DraftBcc";
|
|
@@ -24,6 +25,7 @@ export declare namespace Draft {
|
|
|
24
25
|
thread_id: ThreadId.Raw;
|
|
25
26
|
draft_id: DraftId.Raw;
|
|
26
27
|
labels: DraftLabels.Raw;
|
|
28
|
+
reply_to?: DraftReplyTo.Raw | null;
|
|
27
29
|
to?: DraftTo.Raw | null;
|
|
28
30
|
cc?: DraftCc.Raw | null;
|
|
29
31
|
bcc?: DraftBcc.Raw | null;
|
|
@@ -42,6 +42,7 @@ const InboxId_1 = require("../../inboxes/types/InboxId");
|
|
|
42
42
|
const ThreadId_1 = require("../../threads/types/ThreadId");
|
|
43
43
|
const DraftId_1 = require("./DraftId");
|
|
44
44
|
const DraftLabels_1 = require("./DraftLabels");
|
|
45
|
+
const DraftReplyTo_1 = require("./DraftReplyTo");
|
|
45
46
|
const DraftTo_1 = require("./DraftTo");
|
|
46
47
|
const DraftCc_1 = require("./DraftCc");
|
|
47
48
|
const DraftBcc_1 = require("./DraftBcc");
|
|
@@ -56,6 +57,7 @@ exports.Draft = core.serialization.object({
|
|
|
56
57
|
threadId: core.serialization.property("thread_id", ThreadId_1.ThreadId),
|
|
57
58
|
draftId: core.serialization.property("draft_id", DraftId_1.DraftId),
|
|
58
59
|
labels: DraftLabels_1.DraftLabels,
|
|
60
|
+
replyTo: core.serialization.property("reply_to", DraftReplyTo_1.DraftReplyTo.optional()),
|
|
59
61
|
to: DraftTo_1.DraftTo.optional(),
|
|
60
62
|
cc: DraftCc_1.DraftCc.optional(),
|
|
61
63
|
bcc: DraftBcc_1.DraftBcc.optional(),
|
|
@@ -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 DraftReplyTo: core.serialization.Schema<serializers.DraftReplyTo.Raw, AgentMail.DraftReplyTo>;
|
|
8
|
+
export declare namespace DraftReplyTo {
|
|
9
|
+
type Raw = string[];
|
|
10
|
+
}
|