agentmail 0.0.32 → 0.0.33
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/drafts/client/Client.js +5 -5
- package/api/resources/drafts/client/requests/ListDraftsRequest.d.ts +1 -1
- package/api/resources/drafts/types/ListDraftsResponse.d.ts +1 -1
- package/api/resources/inboxes/client/Client.js +6 -6
- package/api/resources/inboxes/client/requests/ListInboxesRequest.d.ts +1 -1
- package/api/resources/inboxes/resources/drafts/client/Client.js +7 -7
- package/api/resources/inboxes/resources/drafts/client/requests/ListDraftsRequest.d.ts +1 -1
- package/api/resources/inboxes/resources/messages/client/Client.js +9 -9
- package/api/resources/inboxes/resources/messages/client/requests/ListMessagesRequest.d.ts +1 -1
- package/api/resources/inboxes/resources/threads/client/Client.js +5 -5
- package/api/resources/inboxes/resources/threads/client/requests/ListThreadsRequest.d.ts +1 -1
- package/api/resources/inboxes/types/ListInboxesResponse.d.ts +1 -1
- package/api/resources/messages/types/ListMessagesResponse.d.ts +1 -1
- package/api/resources/threads/client/Client.js +5 -5
- package/api/resources/threads/client/requests/ListThreadsRequest.d.ts +1 -1
- package/api/resources/threads/types/ListThreadsResponse.d.ts +1 -1
- package/api/resources/webhooks/client/Client.js +7 -7
- package/api/resources/webhooks/client/requests/ListWebhooksRequest.d.ts +1 -1
- package/api/resources/webhooks/types/ListWebhooksResponse.d.ts +1 -1
- package/api/types/{LastKey.d.ts → PageToken.d.ts} +2 -2
- package/api/types/index.d.ts +1 -1
- package/api/types/index.js +1 -1
- package/dist/api/resources/drafts/client/Client.js +5 -5
- package/dist/api/resources/drafts/client/requests/ListDraftsRequest.d.ts +1 -1
- package/dist/api/resources/drafts/types/ListDraftsResponse.d.ts +1 -1
- package/dist/api/resources/inboxes/client/Client.js +6 -6
- package/dist/api/resources/inboxes/client/requests/ListInboxesRequest.d.ts +1 -1
- package/dist/api/resources/inboxes/resources/drafts/client/Client.js +7 -7
- package/dist/api/resources/inboxes/resources/drafts/client/requests/ListDraftsRequest.d.ts +1 -1
- package/dist/api/resources/inboxes/resources/messages/client/Client.js +9 -9
- package/dist/api/resources/inboxes/resources/messages/client/requests/ListMessagesRequest.d.ts +1 -1
- package/dist/api/resources/inboxes/resources/threads/client/Client.js +5 -5
- package/dist/api/resources/inboxes/resources/threads/client/requests/ListThreadsRequest.d.ts +1 -1
- package/dist/api/resources/inboxes/types/ListInboxesResponse.d.ts +1 -1
- package/dist/api/resources/messages/types/ListMessagesResponse.d.ts +1 -1
- package/dist/api/resources/threads/client/Client.js +5 -5
- package/dist/api/resources/threads/client/requests/ListThreadsRequest.d.ts +1 -1
- package/dist/api/resources/threads/types/ListThreadsResponse.d.ts +1 -1
- package/dist/api/resources/webhooks/client/Client.js +7 -7
- package/dist/api/resources/webhooks/client/requests/ListWebhooksRequest.d.ts +1 -1
- package/dist/api/resources/webhooks/types/ListWebhooksResponse.d.ts +1 -1
- package/dist/api/types/{LastKey.d.ts → PageToken.d.ts} +2 -2
- package/dist/api/types/index.d.ts +1 -1
- package/dist/api/types/index.js +1 -1
- package/dist/serialization/resources/drafts/types/ListDraftsResponse.d.ts +2 -2
- package/dist/serialization/resources/drafts/types/ListDraftsResponse.js +2 -2
- package/dist/serialization/resources/inboxes/types/ListInboxesResponse.d.ts +2 -2
- package/dist/serialization/resources/inboxes/types/ListInboxesResponse.js +2 -2
- package/dist/serialization/resources/messages/types/ListMessagesResponse.d.ts +2 -2
- package/dist/serialization/resources/messages/types/ListMessagesResponse.js +2 -2
- package/dist/serialization/resources/threads/types/ListThreadsResponse.d.ts +2 -2
- package/dist/serialization/resources/threads/types/ListThreadsResponse.js +2 -2
- package/dist/serialization/resources/webhooks/types/ListWebhooksResponse.d.ts +2 -2
- package/dist/serialization/resources/webhooks/types/ListWebhooksResponse.js +2 -2
- package/dist/serialization/types/{LastKey.d.ts → PageToken.d.ts} +2 -2
- package/dist/serialization/types/{LastKey.js → PageToken.js} +2 -2
- package/dist/serialization/types/index.d.ts +1 -1
- package/dist/serialization/types/index.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/serialization/resources/drafts/types/ListDraftsResponse.d.ts +2 -2
- package/serialization/resources/drafts/types/ListDraftsResponse.js +2 -2
- package/serialization/resources/inboxes/types/ListInboxesResponse.d.ts +2 -2
- package/serialization/resources/inboxes/types/ListInboxesResponse.js +2 -2
- package/serialization/resources/messages/types/ListMessagesResponse.d.ts +2 -2
- package/serialization/resources/messages/types/ListMessagesResponse.js +2 -2
- package/serialization/resources/threads/types/ListThreadsResponse.d.ts +2 -2
- package/serialization/resources/threads/types/ListThreadsResponse.js +2 -2
- package/serialization/resources/webhooks/types/ListWebhooksResponse.d.ts +2 -2
- package/serialization/resources/webhooks/types/ListWebhooksResponse.js +2 -2
- package/serialization/types/{LastKey.d.ts → PageToken.d.ts} +2 -2
- package/serialization/types/{LastKey.js → PageToken.js} +2 -2
- package/serialization/types/index.d.ts +1 -1
- package/serialization/types/index.js +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- /package/api/types/{LastKey.js → PageToken.js} +0 -0
- /package/dist/api/types/{LastKey.js → PageToken.js} +0 -0
|
@@ -72,13 +72,13 @@ class Drafts {
|
|
|
72
72
|
list() {
|
|
73
73
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
74
74
|
var _a, _b;
|
|
75
|
-
const { limit,
|
|
75
|
+
const { limit, pageToken, labels, ascending } = request;
|
|
76
76
|
const _queryParams = {};
|
|
77
77
|
if (limit != null) {
|
|
78
78
|
_queryParams["limit"] = limit.toString();
|
|
79
79
|
}
|
|
80
|
-
if (
|
|
81
|
-
_queryParams["
|
|
80
|
+
if (pageToken != null) {
|
|
81
|
+
_queryParams["page_token"] = pageToken;
|
|
82
82
|
}
|
|
83
83
|
if (labels != null) {
|
|
84
84
|
_queryParams["labels"] = (0, json_1.toJson)(serializers.Labels.jsonOrThrow(labels, { unrecognizedObjectKeys: "strip" }));
|
|
@@ -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.33", "User-Agent": "agentmail/0.0.33", "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.33", "User-Agent": "agentmail/0.0.33", "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,
|
|
@@ -5,7 +5,7 @@ import * as AgentMail from "../../../index";
|
|
|
5
5
|
export interface ListDraftsResponse {
|
|
6
6
|
count: AgentMail.Count;
|
|
7
7
|
limit?: AgentMail.Limit;
|
|
8
|
-
|
|
8
|
+
nextPageToken?: AgentMail.PageToken;
|
|
9
9
|
/** Draft items. Ordered by `updated_at` descending. */
|
|
10
10
|
drafts: AgentMail.DraftItem[];
|
|
11
11
|
}
|
|
@@ -84,18 +84,18 @@ class Inboxes {
|
|
|
84
84
|
list() {
|
|
85
85
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
86
86
|
var _a, _b;
|
|
87
|
-
const { limit,
|
|
87
|
+
const { limit, pageToken } = request;
|
|
88
88
|
const _queryParams = {};
|
|
89
89
|
if (limit != null) {
|
|
90
90
|
_queryParams["limit"] = limit.toString();
|
|
91
91
|
}
|
|
92
|
-
if (
|
|
93
|
-
_queryParams["
|
|
92
|
+
if (pageToken != null) {
|
|
93
|
+
_queryParams["page_token"] = pageToken;
|
|
94
94
|
}
|
|
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.33", "User-Agent": "agentmail/0.0.33", "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.33", "User-Agent": "agentmail/0.0.33", "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,
|
|
@@ -215,7 +215,7 @@ class Inboxes {
|
|
|
215
215
|
const _response = yield core.fetcher({
|
|
216
216
|
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
217
|
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.
|
|
218
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "agentmail/0.0.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
219
219
|
contentType: "application/json",
|
|
220
220
|
requestType: "json",
|
|
221
221
|
body: serializers.inboxes.CreateInboxRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -73,13 +73,13 @@ class Drafts {
|
|
|
73
73
|
list(inboxId_1) {
|
|
74
74
|
return __awaiter(this, arguments, void 0, function* (inboxId, request = {}, requestOptions) {
|
|
75
75
|
var _a, _b;
|
|
76
|
-
const { limit,
|
|
76
|
+
const { limit, pageToken, labels, ascending } = request;
|
|
77
77
|
const _queryParams = {};
|
|
78
78
|
if (limit != null) {
|
|
79
79
|
_queryParams["limit"] = limit.toString();
|
|
80
80
|
}
|
|
81
|
-
if (
|
|
82
|
-
_queryParams["
|
|
81
|
+
if (pageToken != null) {
|
|
82
|
+
_queryParams["page_token"] = pageToken;
|
|
83
83
|
}
|
|
84
84
|
if (labels != null) {
|
|
85
85
|
_queryParams["labels"] = (0, json_1.toJson)(serializers.Labels.jsonOrThrow(labels, { 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.33", "User-Agent": "agentmail/0.0.33", "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.33", "User-Agent": "agentmail/0.0.33", "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,
|
|
@@ -227,7 +227,7 @@ class Drafts {
|
|
|
227
227
|
const _response = yield core.fetcher({
|
|
228
228
|
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
229
|
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.
|
|
230
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "agentmail/0.0.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
231
231
|
contentType: "application/json",
|
|
232
232
|
requestType: "json",
|
|
233
233
|
body: serializers.CreateDraftRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -298,7 +298,7 @@ class Drafts {
|
|
|
298
298
|
const _response = yield core.fetcher({
|
|
299
299
|
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
300
|
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.
|
|
301
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "agentmail/0.0.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
302
302
|
contentType: "application/json",
|
|
303
303
|
requestType: "json",
|
|
304
304
|
body: serializers.UpdateMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -8,7 +8,7 @@ import * as AgentMail from "../../../../../../index";
|
|
|
8
8
|
*/
|
|
9
9
|
export interface ListDraftsRequest {
|
|
10
10
|
limit?: AgentMail.Limit;
|
|
11
|
-
|
|
11
|
+
pageToken?: AgentMail.PageToken;
|
|
12
12
|
labels?: AgentMail.Labels;
|
|
13
13
|
ascending?: AgentMail.Ascending;
|
|
14
14
|
}
|
|
@@ -73,13 +73,13 @@ class Messages {
|
|
|
73
73
|
list(inboxId_1) {
|
|
74
74
|
return __awaiter(this, arguments, void 0, function* (inboxId, request = {}, requestOptions) {
|
|
75
75
|
var _a, _b;
|
|
76
|
-
const { limit,
|
|
76
|
+
const { limit, pageToken, labels, ascending } = request;
|
|
77
77
|
const _queryParams = {};
|
|
78
78
|
if (limit != null) {
|
|
79
79
|
_queryParams["limit"] = limit.toString();
|
|
80
80
|
}
|
|
81
|
-
if (
|
|
82
|
-
_queryParams["
|
|
81
|
+
if (pageToken != null) {
|
|
82
|
+
_queryParams["page_token"] = pageToken;
|
|
83
83
|
}
|
|
84
84
|
if (labels != null) {
|
|
85
85
|
_queryParams["labels"] = (0, json_1.toJson)(serializers.Labels.jsonOrThrow(labels, { 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.33", "User-Agent": "agentmail/0.0.33", "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.33", "User-Agent": "agentmail/0.0.33", "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.33", "User-Agent": "agentmail/0.0.33", "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",
|
|
@@ -282,7 +282,7 @@ class Messages {
|
|
|
282
282
|
const _response = yield core.fetcher({
|
|
283
283
|
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`),
|
|
284
284
|
method: "POST",
|
|
285
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
285
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "agentmail/0.0.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
286
286
|
contentType: "application/json",
|
|
287
287
|
requestType: "json",
|
|
288
288
|
body: serializers.SendMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -374,7 +374,7 @@ class Messages {
|
|
|
374
374
|
const _response = yield core.fetcher({
|
|
375
375
|
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`),
|
|
376
376
|
method: "POST",
|
|
377
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
377
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "agentmail/0.0.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
378
378
|
contentType: "application/json",
|
|
379
379
|
requestType: "json",
|
|
380
380
|
body: serializers.ReplyToMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -460,7 +460,7 @@ class Messages {
|
|
|
460
460
|
const _response = yield core.fetcher({
|
|
461
461
|
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))}`),
|
|
462
462
|
method: "PATCH",
|
|
463
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
463
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "agentmail/0.0.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
464
464
|
contentType: "application/json",
|
|
465
465
|
requestType: "json",
|
|
466
466
|
body: serializers.UpdateMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -8,7 +8,7 @@ import * as AgentMail from "../../../../../../index";
|
|
|
8
8
|
*/
|
|
9
9
|
export interface ListMessagesRequest {
|
|
10
10
|
limit?: AgentMail.Limit;
|
|
11
|
-
|
|
11
|
+
pageToken?: AgentMail.PageToken;
|
|
12
12
|
labels?: AgentMail.Labels;
|
|
13
13
|
ascending?: AgentMail.Ascending;
|
|
14
14
|
}
|
|
@@ -73,13 +73,13 @@ class Threads {
|
|
|
73
73
|
list(inboxId_1) {
|
|
74
74
|
return __awaiter(this, arguments, void 0, function* (inboxId, request = {}, requestOptions) {
|
|
75
75
|
var _a, _b;
|
|
76
|
-
const { limit,
|
|
76
|
+
const { limit, pageToken, labels, ascending } = request;
|
|
77
77
|
const _queryParams = {};
|
|
78
78
|
if (limit != null) {
|
|
79
79
|
_queryParams["limit"] = limit.toString();
|
|
80
80
|
}
|
|
81
|
-
if (
|
|
82
|
-
_queryParams["
|
|
81
|
+
if (pageToken != null) {
|
|
82
|
+
_queryParams["page_token"] = pageToken;
|
|
83
83
|
}
|
|
84
84
|
if (labels != null) {
|
|
85
85
|
_queryParams["labels"] = (0, json_1.toJson)(serializers.Labels.jsonOrThrow(labels, { 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.33", "User-Agent": "agentmail/0.0.33", "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.33", "User-Agent": "agentmail/0.0.33", "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,
|
|
@@ -8,7 +8,7 @@ import * as AgentMail from "../../../../../../index";
|
|
|
8
8
|
*/
|
|
9
9
|
export interface ListThreadsRequest {
|
|
10
10
|
limit?: AgentMail.Limit;
|
|
11
|
-
|
|
11
|
+
pageToken?: AgentMail.PageToken;
|
|
12
12
|
labels?: AgentMail.Labels;
|
|
13
13
|
ascending?: AgentMail.Ascending;
|
|
14
14
|
}
|
|
@@ -5,7 +5,7 @@ import * as AgentMail from "../../../index";
|
|
|
5
5
|
export interface ListInboxesResponse {
|
|
6
6
|
count: AgentMail.Count;
|
|
7
7
|
limit?: AgentMail.Limit;
|
|
8
|
-
|
|
8
|
+
nextPageToken?: AgentMail.PageToken;
|
|
9
9
|
/** Ordered by `created_at` ascending. */
|
|
10
10
|
inboxes: AgentMail.inboxes.Inbox[];
|
|
11
11
|
}
|
|
@@ -5,7 +5,7 @@ import * as AgentMail from "../../../index";
|
|
|
5
5
|
export interface ListMessagesResponse {
|
|
6
6
|
count: AgentMail.Count;
|
|
7
7
|
limit?: AgentMail.Limit;
|
|
8
|
-
|
|
8
|
+
nextPageToken?: AgentMail.PageToken;
|
|
9
9
|
/** Message items. Ordered by `timestamp` descending. */
|
|
10
10
|
messages: AgentMail.MessageItem[];
|
|
11
11
|
}
|
|
@@ -72,13 +72,13 @@ class Threads {
|
|
|
72
72
|
list() {
|
|
73
73
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
74
74
|
var _a, _b;
|
|
75
|
-
const { limit,
|
|
75
|
+
const { limit, pageToken, labels, ascending } = request;
|
|
76
76
|
const _queryParams = {};
|
|
77
77
|
if (limit != null) {
|
|
78
78
|
_queryParams["limit"] = limit.toString();
|
|
79
79
|
}
|
|
80
|
-
if (
|
|
81
|
-
_queryParams["
|
|
80
|
+
if (pageToken != null) {
|
|
81
|
+
_queryParams["page_token"] = pageToken;
|
|
82
82
|
}
|
|
83
83
|
if (labels != null) {
|
|
84
84
|
_queryParams["labels"] = (0, json_1.toJson)(serializers.Labels.jsonOrThrow(labels, { unrecognizedObjectKeys: "strip" }));
|
|
@@ -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.33", "User-Agent": "agentmail/0.0.33", "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.33", "User-Agent": "agentmail/0.0.33", "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,
|
|
@@ -5,7 +5,7 @@ import * as AgentMail from "../../../index";
|
|
|
5
5
|
export interface ListThreadsResponse {
|
|
6
6
|
count: AgentMail.Count;
|
|
7
7
|
limit?: AgentMail.Limit;
|
|
8
|
-
|
|
8
|
+
nextPageToken?: AgentMail.PageToken;
|
|
9
9
|
/** Thread items. Ordered by `timestamp` descending. */
|
|
10
10
|
threads: AgentMail.ThreadItem[];
|
|
11
11
|
}
|
|
@@ -69,18 +69,18 @@ class Webhooks {
|
|
|
69
69
|
list() {
|
|
70
70
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
71
71
|
var _a, _b;
|
|
72
|
-
const { limit,
|
|
72
|
+
const { limit, pageToken } = request;
|
|
73
73
|
const _queryParams = {};
|
|
74
74
|
if (limit != null) {
|
|
75
75
|
_queryParams["limit"] = limit.toString();
|
|
76
76
|
}
|
|
77
|
-
if (
|
|
78
|
-
_queryParams["
|
|
77
|
+
if (pageToken != null) {
|
|
78
|
+
_queryParams["page_token"] = pageToken;
|
|
79
79
|
}
|
|
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.33", "User-Agent": "agentmail/0.0.33", "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.33", "User-Agent": "agentmail/0.0.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
137
137
|
contentType: "application/json",
|
|
138
138
|
requestType: "json",
|
|
139
139
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -200,7 +200,7 @@ class Webhooks {
|
|
|
200
200
|
const _response = yield core.fetcher({
|
|
201
201
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, "/v0/webhooks"),
|
|
202
202
|
method: "POST",
|
|
203
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
203
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "agentmail/0.0.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
204
204
|
contentType: "application/json",
|
|
205
205
|
requestType: "json",
|
|
206
206
|
body: serializers.CreateWebhookRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -264,7 +264,7 @@ class Webhooks {
|
|
|
264
264
|
const _response = yield core.fetcher({
|
|
265
265
|
url: (0, url_join_1.default)((_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.AgentMailEnvironment.Production, `/v0/webhooks/${encodeURIComponent(serializers.WebhookId.jsonOrThrow(webhookId))}`),
|
|
266
266
|
method: "DELETE",
|
|
267
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.
|
|
267
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "agentmail", "X-Fern-SDK-Version": "0.0.33", "User-Agent": "agentmail/0.0.33", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
268
268
|
contentType: "application/json",
|
|
269
269
|
requestType: "json",
|
|
270
270
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -5,7 +5,7 @@ import * as AgentMail from "../../../index";
|
|
|
5
5
|
export interface ListWebhooksResponse {
|
|
6
6
|
count: AgentMail.Count;
|
|
7
7
|
limit?: AgentMail.Limit;
|
|
8
|
-
|
|
8
|
+
nextPageToken?: AgentMail.PageToken;
|
|
9
9
|
/** Webhook items. Ordered by `created_at` ascending. */
|
|
10
10
|
webhooks: AgentMail.Webhook[];
|
|
11
11
|
}
|
package/api/types/index.d.ts
CHANGED
package/api/types/index.js
CHANGED
|
@@ -16,7 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./Limit"), exports);
|
|
18
18
|
__exportStar(require("./Count"), exports);
|
|
19
|
-
__exportStar(require("./
|
|
19
|
+
__exportStar(require("./PageToken"), exports);
|
|
20
20
|
__exportStar(require("./Labels"), exports);
|
|
21
21
|
__exportStar(require("./Ascending"), exports);
|
|
22
22
|
__exportStar(require("./OrganizationId"), exports);
|
|
@@ -72,13 +72,13 @@ class Drafts {
|
|
|
72
72
|
list() {
|
|
73
73
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
74
74
|
var _a, _b;
|
|
75
|
-
const { limit,
|
|
75
|
+
const { limit, pageToken, labels, ascending } = request;
|
|
76
76
|
const _queryParams = {};
|
|
77
77
|
if (limit != null) {
|
|
78
78
|
_queryParams["limit"] = limit.toString();
|
|
79
79
|
}
|
|
80
|
-
if (
|
|
81
|
-
_queryParams["
|
|
80
|
+
if (pageToken != null) {
|
|
81
|
+
_queryParams["page_token"] = pageToken;
|
|
82
82
|
}
|
|
83
83
|
if (labels != null) {
|
|
84
84
|
_queryParams["labels"] = (0, json_1.toJson)(serializers.Labels.jsonOrThrow(labels, { unrecognizedObjectKeys: "strip" }));
|
|
@@ -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.33", "User-Agent": "agentmail/0.0.33", "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.33", "User-Agent": "agentmail/0.0.33", "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,
|
|
@@ -5,7 +5,7 @@ import * as AgentMail from "../../../index";
|
|
|
5
5
|
export interface ListDraftsResponse {
|
|
6
6
|
count: AgentMail.Count;
|
|
7
7
|
limit?: AgentMail.Limit;
|
|
8
|
-
|
|
8
|
+
nextPageToken?: AgentMail.PageToken;
|
|
9
9
|
/** Draft items. Ordered by `updated_at` descending. */
|
|
10
10
|
drafts: AgentMail.DraftItem[];
|
|
11
11
|
}
|