agentmail 0.3.8 → 0.4.0
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/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/apiKeys/client/Client.js +2 -1
- package/dist/cjs/api/resources/apiKeys/client/requests/ListApiKeysRequest.d.ts +1 -0
- package/dist/cjs/api/resources/domains/client/Client.js +2 -1
- package/dist/cjs/api/resources/domains/client/requests/ListDomainsRequest.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/client/Client.js +2 -1
- package/dist/cjs/api/resources/inboxes/client/requests/ListInboxesRequest.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +2 -1
- package/dist/cjs/api/resources/inboxes/resources/messages/client/requests/ListMessagesRequest.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.js +2 -1
- package/dist/cjs/api/resources/inboxes/resources/threads/client/requests/ListThreadsRequest.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/types/InboxId.d.ts +1 -1
- package/dist/cjs/api/resources/pods/client/Client.js +2 -1
- package/dist/cjs/api/resources/pods/client/requests/ListPodsRequest.d.ts +1 -0
- package/dist/cjs/api/resources/pods/resources/domains/client/Client.d.ts +12 -0
- package/dist/cjs/api/resources/pods/resources/domains/client/Client.js +65 -1
- package/dist/cjs/api/resources/pods/resources/domains/client/requests/ListDomainsRequest.d.ts +1 -0
- package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.js +2 -1
- package/dist/cjs/api/resources/pods/resources/inboxes/client/requests/ListInboxesRequest.d.ts +1 -0
- package/dist/cjs/api/resources/pods/resources/threads/client/Client.js +2 -1
- package/dist/cjs/api/resources/pods/resources/threads/client/requests/ListThreadsRequest.d.ts +1 -0
- package/dist/cjs/api/resources/webhooks/client/Client.js +2 -1
- package/dist/cjs/api/resources/webhooks/client/requests/ListWebhooksRequest.d.ts +1 -0
- package/dist/cjs/api/types/IncludeTrash.d.ts +4 -0
- package/dist/cjs/api/types/IncludeTrash.js +3 -0
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -0
- package/dist/cjs/serialization/types/IncludeTrash.d.ts +7 -0
- package/dist/cjs/serialization/types/IncludeTrash.js +39 -0
- package/dist/cjs/serialization/types/index.d.ts +1 -0
- package/dist/cjs/serialization/types/index.js +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/apiKeys/client/Client.mjs +2 -1
- package/dist/esm/api/resources/apiKeys/client/requests/ListApiKeysRequest.d.mts +1 -0
- package/dist/esm/api/resources/domains/client/Client.mjs +2 -1
- package/dist/esm/api/resources/domains/client/requests/ListDomainsRequest.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/client/Client.mjs +2 -1
- package/dist/esm/api/resources/inboxes/client/requests/ListInboxesRequest.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +2 -1
- package/dist/esm/api/resources/inboxes/resources/messages/client/requests/ListMessagesRequest.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/threads/client/Client.mjs +2 -1
- package/dist/esm/api/resources/inboxes/resources/threads/client/requests/ListThreadsRequest.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/types/InboxId.d.mts +1 -1
- package/dist/esm/api/resources/pods/client/Client.mjs +2 -1
- package/dist/esm/api/resources/pods/client/requests/ListPodsRequest.d.mts +1 -0
- package/dist/esm/api/resources/pods/resources/domains/client/Client.d.mts +12 -0
- package/dist/esm/api/resources/pods/resources/domains/client/Client.mjs +65 -1
- package/dist/esm/api/resources/pods/resources/domains/client/requests/ListDomainsRequest.d.mts +1 -0
- package/dist/esm/api/resources/pods/resources/inboxes/client/Client.mjs +2 -1
- package/dist/esm/api/resources/pods/resources/inboxes/client/requests/ListInboxesRequest.d.mts +1 -0
- package/dist/esm/api/resources/pods/resources/threads/client/Client.mjs +2 -1
- package/dist/esm/api/resources/pods/resources/threads/client/requests/ListThreadsRequest.d.mts +1 -0
- package/dist/esm/api/resources/webhooks/client/Client.mjs +2 -1
- package/dist/esm/api/resources/webhooks/client/requests/ListWebhooksRequest.d.mts +1 -0
- package/dist/esm/api/types/IncludeTrash.d.mts +4 -0
- package/dist/esm/api/types/IncludeTrash.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -0
- package/dist/esm/serialization/types/IncludeTrash.d.mts +7 -0
- package/dist/esm/serialization/types/IncludeTrash.mjs +3 -0
- package/dist/esm/serialization/types/index.d.mts +1 -0
- package/dist/esm/serialization/types/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/llms-full.txt +376 -139
- package/dist/llms.txt +3 -2
- package/package.json +1 -1
- package/reference.md +57 -0
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "agentmail",
|
|
46
|
-
"X-Fern-SDK-Version": "0.
|
|
47
|
-
"User-Agent": "agentmail/0.
|
|
46
|
+
"X-Fern-SDK-Version": "0.4.0",
|
|
47
|
+
"User-Agent": "agentmail/0.4.0",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -69,10 +69,11 @@ class ApiKeysClient {
|
|
|
69
69
|
__list() {
|
|
70
70
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
71
71
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
72
|
-
const { limit, pageToken } = request;
|
|
72
|
+
const { limit, pageToken, ascending } = request;
|
|
73
73
|
const _queryParams = {
|
|
74
74
|
limit,
|
|
75
75
|
page_token: pageToken,
|
|
76
|
+
ascending,
|
|
76
77
|
};
|
|
77
78
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
78
79
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
@@ -69,10 +69,11 @@ class DomainsClient {
|
|
|
69
69
|
__list() {
|
|
70
70
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
71
71
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
72
|
-
const { limit, pageToken } = request;
|
|
72
|
+
const { limit, pageToken, ascending } = request;
|
|
73
73
|
const _queryParams = {
|
|
74
74
|
limit,
|
|
75
75
|
page_token: pageToken,
|
|
76
|
+
ascending,
|
|
76
77
|
};
|
|
77
78
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
78
79
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
@@ -89,10 +89,11 @@ class InboxesClient {
|
|
|
89
89
|
__list() {
|
|
90
90
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
91
91
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
92
|
-
const { limit, pageToken } = request;
|
|
92
|
+
const { limit, pageToken, ascending } = request;
|
|
93
93
|
const _queryParams = {
|
|
94
94
|
limit,
|
|
95
95
|
page_token: pageToken,
|
|
96
|
+
ascending,
|
|
96
97
|
};
|
|
97
98
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
98
99
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
@@ -73,7 +73,7 @@ class MessagesClient {
|
|
|
73
73
|
__list(inbox_id_1) {
|
|
74
74
|
return __awaiter(this, arguments, void 0, function* (inbox_id, request = {}, requestOptions) {
|
|
75
75
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
76
|
-
const { limit, pageToken, labels, before, after, ascending, includeSpam, includeBlocked } = request;
|
|
76
|
+
const { limit, pageToken, labels, before, after, ascending, includeSpam, includeBlocked, includeTrash } = request;
|
|
77
77
|
const _queryParams = {
|
|
78
78
|
limit,
|
|
79
79
|
page_token: pageToken,
|
|
@@ -92,6 +92,7 @@ class MessagesClient {
|
|
|
92
92
|
ascending,
|
|
93
93
|
include_spam: includeSpam,
|
|
94
94
|
include_blocked: includeBlocked,
|
|
95
|
+
include_trash: includeTrash,
|
|
95
96
|
};
|
|
96
97
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
97
98
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
@@ -73,7 +73,7 @@ class ThreadsClient {
|
|
|
73
73
|
__list(inbox_id_1) {
|
|
74
74
|
return __awaiter(this, arguments, void 0, function* (inbox_id, request = {}, requestOptions) {
|
|
75
75
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
76
|
-
const { limit, pageToken, labels, before, after, ascending, includeSpam, includeBlocked } = request;
|
|
76
|
+
const { limit, pageToken, labels, before, after, ascending, includeSpam, includeBlocked, includeTrash } = request;
|
|
77
77
|
const _queryParams = {
|
|
78
78
|
limit,
|
|
79
79
|
page_token: pageToken,
|
|
@@ -92,6 +92,7 @@ class ThreadsClient {
|
|
|
92
92
|
ascending,
|
|
93
93
|
include_spam: includeSpam,
|
|
94
94
|
include_blocked: includeBlocked,
|
|
95
|
+
include_trash: includeTrash,
|
|
95
96
|
};
|
|
96
97
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
97
98
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
@@ -94,10 +94,11 @@ class PodsClient {
|
|
|
94
94
|
__list() {
|
|
95
95
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
96
96
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
97
|
-
const { limit, pageToken } = request;
|
|
97
|
+
const { limit, pageToken, ascending } = request;
|
|
98
98
|
const _queryParams = {
|
|
99
99
|
limit,
|
|
100
100
|
page_token: pageToken,
|
|
101
|
+
ascending,
|
|
101
102
|
};
|
|
102
103
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
103
104
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
@@ -37,6 +37,18 @@ export declare class DomainsClient {
|
|
|
37
37
|
*/
|
|
38
38
|
create(pod_id: AgentMail.pods.PodId, request: AgentMail.CreateDomainRequest, requestOptions?: DomainsClient.RequestOptions): core.HttpResponsePromise<AgentMail.Domain>;
|
|
39
39
|
private __create;
|
|
40
|
+
/**
|
|
41
|
+
* @param {AgentMail.pods.PodId} pod_id
|
|
42
|
+
* @param {AgentMail.DomainId} domain_id
|
|
43
|
+
* @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
44
|
+
*
|
|
45
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* await client.pods.domains.get("pod_id", "domain_id")
|
|
49
|
+
*/
|
|
50
|
+
get(pod_id: AgentMail.pods.PodId, domain_id: AgentMail.DomainId, requestOptions?: DomainsClient.RequestOptions): core.HttpResponsePromise<AgentMail.Domain>;
|
|
51
|
+
private __get;
|
|
40
52
|
/**
|
|
41
53
|
* @param {AgentMail.pods.PodId} pod_id
|
|
42
54
|
* @param {AgentMail.DomainId} domain_id
|
|
@@ -72,10 +72,11 @@ class DomainsClient {
|
|
|
72
72
|
__list(pod_id_1) {
|
|
73
73
|
return __awaiter(this, arguments, void 0, function* (pod_id, request = {}, requestOptions) {
|
|
74
74
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
75
|
-
const { limit, pageToken } = request;
|
|
75
|
+
const { limit, pageToken, ascending } = request;
|
|
76
76
|
const _queryParams = {
|
|
77
77
|
limit,
|
|
78
78
|
page_token: pageToken,
|
|
79
|
+
ascending,
|
|
79
80
|
};
|
|
80
81
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
81
82
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
@@ -196,6 +197,69 @@ class DomainsClient {
|
|
|
196
197
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v0/pods/{pod_id}/domains");
|
|
197
198
|
});
|
|
198
199
|
}
|
|
200
|
+
/**
|
|
201
|
+
* @param {AgentMail.pods.PodId} pod_id
|
|
202
|
+
* @param {AgentMail.DomainId} domain_id
|
|
203
|
+
* @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
204
|
+
*
|
|
205
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
206
|
+
*
|
|
207
|
+
* @example
|
|
208
|
+
* await client.pods.domains.get("pod_id", "domain_id")
|
|
209
|
+
*/
|
|
210
|
+
get(pod_id, domain_id, requestOptions) {
|
|
211
|
+
return core.HttpResponsePromise.fromPromise(this.__get(pod_id, domain_id, requestOptions));
|
|
212
|
+
}
|
|
213
|
+
__get(pod_id, domain_id, requestOptions) {
|
|
214
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
215
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
216
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
217
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
218
|
+
const _response = yield core.fetcher({
|
|
219
|
+
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Prod)
|
|
220
|
+
.http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/domains/${core.url.encodePathParam(serializers.DomainId.jsonOrThrow(domain_id, { omitUndefined: true }))}`),
|
|
221
|
+
method: "GET",
|
|
222
|
+
headers: _headers,
|
|
223
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
224
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
225
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
226
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
227
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
228
|
+
logging: this._options.logging,
|
|
229
|
+
});
|
|
230
|
+
if (_response.ok) {
|
|
231
|
+
return {
|
|
232
|
+
data: serializers.Domain.parseOrThrow(_response.body, {
|
|
233
|
+
unrecognizedObjectKeys: "passthrough",
|
|
234
|
+
allowUnrecognizedUnionMembers: true,
|
|
235
|
+
allowUnrecognizedEnumValues: true,
|
|
236
|
+
skipValidation: true,
|
|
237
|
+
breadcrumbsPrefix: ["response"],
|
|
238
|
+
}),
|
|
239
|
+
rawResponse: _response.rawResponse,
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
if (_response.error.reason === "status-code") {
|
|
243
|
+
switch (_response.error.statusCode) {
|
|
244
|
+
case 404:
|
|
245
|
+
throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
246
|
+
unrecognizedObjectKeys: "passthrough",
|
|
247
|
+
allowUnrecognizedUnionMembers: true,
|
|
248
|
+
allowUnrecognizedEnumValues: true,
|
|
249
|
+
skipValidation: true,
|
|
250
|
+
breadcrumbsPrefix: ["response"],
|
|
251
|
+
}), _response.rawResponse);
|
|
252
|
+
default:
|
|
253
|
+
throw new errors.AgentMailError({
|
|
254
|
+
statusCode: _response.error.statusCode,
|
|
255
|
+
body: _response.error.body,
|
|
256
|
+
rawResponse: _response.rawResponse,
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v0/pods/{pod_id}/domains/{domain_id}");
|
|
261
|
+
});
|
|
262
|
+
}
|
|
199
263
|
/**
|
|
200
264
|
* @param {AgentMail.pods.PodId} pod_id
|
|
201
265
|
* @param {AgentMail.DomainId} domain_id
|
|
@@ -72,10 +72,11 @@ class InboxesClient {
|
|
|
72
72
|
__list(pod_id_1) {
|
|
73
73
|
return __awaiter(this, arguments, void 0, function* (pod_id, request = {}, requestOptions) {
|
|
74
74
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
75
|
-
const { limit, pageToken } = request;
|
|
75
|
+
const { limit, pageToken, ascending } = request;
|
|
76
76
|
const _queryParams = {
|
|
77
77
|
limit,
|
|
78
78
|
page_token: pageToken,
|
|
79
|
+
ascending,
|
|
79
80
|
};
|
|
80
81
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
81
82
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
@@ -73,7 +73,7 @@ class ThreadsClient {
|
|
|
73
73
|
__list(pod_id_1) {
|
|
74
74
|
return __awaiter(this, arguments, void 0, function* (pod_id, request = {}, requestOptions) {
|
|
75
75
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
76
|
-
const { limit, pageToken, labels, before, after, ascending, includeSpam, includeBlocked } = request;
|
|
76
|
+
const { limit, pageToken, labels, before, after, ascending, includeSpam, includeBlocked, includeTrash } = request;
|
|
77
77
|
const _queryParams = {
|
|
78
78
|
limit,
|
|
79
79
|
page_token: pageToken,
|
|
@@ -92,6 +92,7 @@ class ThreadsClient {
|
|
|
92
92
|
ascending,
|
|
93
93
|
include_spam: includeSpam,
|
|
94
94
|
include_blocked: includeBlocked,
|
|
95
|
+
include_trash: includeTrash,
|
|
95
96
|
};
|
|
96
97
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
97
98
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
@@ -69,10 +69,11 @@ class WebhooksClient {
|
|
|
69
69
|
__list() {
|
|
70
70
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
71
71
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
72
|
-
const { limit, pageToken } = request;
|
|
72
|
+
const { limit, pageToken, ascending } = request;
|
|
73
73
|
const _queryParams = {
|
|
74
74
|
limit,
|
|
75
75
|
page_token: pageToken,
|
|
76
|
+
ascending,
|
|
76
77
|
};
|
|
77
78
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
78
79
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
@@ -7,6 +7,7 @@ export * from "./ErrorName.js";
|
|
|
7
7
|
export * from "./ErrorResponse.js";
|
|
8
8
|
export * from "./IncludeBlocked.js";
|
|
9
9
|
export * from "./IncludeSpam.js";
|
|
10
|
+
export * from "./IncludeTrash.js";
|
|
10
11
|
export * from "./Labels.js";
|
|
11
12
|
export * from "./Limit.js";
|
|
12
13
|
export * from "./OrganizationId.js";
|
|
@@ -23,6 +23,7 @@ __exportStar(require("./ErrorName.js"), exports);
|
|
|
23
23
|
__exportStar(require("./ErrorResponse.js"), exports);
|
|
24
24
|
__exportStar(require("./IncludeBlocked.js"), exports);
|
|
25
25
|
__exportStar(require("./IncludeSpam.js"), exports);
|
|
26
|
+
__exportStar(require("./IncludeTrash.js"), exports);
|
|
26
27
|
__exportStar(require("./Labels.js"), exports);
|
|
27
28
|
__exportStar(require("./Limit.js"), exports);
|
|
28
29
|
__exportStar(require("./OrganizationId.js"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as AgentMail from "../../api/index.js";
|
|
2
|
+
import * as core from "../../core/index.js";
|
|
3
|
+
import type * as serializers from "../index.js";
|
|
4
|
+
export declare const IncludeTrash: core.serialization.Schema<serializers.IncludeTrash.Raw, AgentMail.IncludeTrash>;
|
|
5
|
+
export declare namespace IncludeTrash {
|
|
6
|
+
type Raw = boolean;
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.IncludeTrash = void 0;
|
|
38
|
+
const core = __importStar(require("../../core/index.js"));
|
|
39
|
+
exports.IncludeTrash = core.serialization.boolean();
|
|
@@ -7,6 +7,7 @@ export * from "./ErrorName.js";
|
|
|
7
7
|
export * from "./ErrorResponse.js";
|
|
8
8
|
export * from "./IncludeBlocked.js";
|
|
9
9
|
export * from "./IncludeSpam.js";
|
|
10
|
+
export * from "./IncludeTrash.js";
|
|
10
11
|
export * from "./Labels.js";
|
|
11
12
|
export * from "./Limit.js";
|
|
12
13
|
export * from "./OrganizationId.js";
|
|
@@ -23,6 +23,7 @@ __exportStar(require("./ErrorName.js"), exports);
|
|
|
23
23
|
__exportStar(require("./ErrorResponse.js"), exports);
|
|
24
24
|
__exportStar(require("./IncludeBlocked.js"), exports);
|
|
25
25
|
__exportStar(require("./IncludeSpam.js"), exports);
|
|
26
|
+
__exportStar(require("./IncludeTrash.js"), exports);
|
|
26
27
|
__exportStar(require("./Labels.js"), exports);
|
|
27
28
|
__exportStar(require("./Limit.js"), exports);
|
|
28
29
|
__exportStar(require("./OrganizationId.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.
|
|
1
|
+
export declare const SDK_VERSION = "0.4.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "agentmail",
|
|
9
|
-
"X-Fern-SDK-Version": "0.
|
|
10
|
-
"User-Agent": "agentmail/0.
|
|
9
|
+
"X-Fern-SDK-Version": "0.4.0",
|
|
10
|
+
"User-Agent": "agentmail/0.4.0",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -33,10 +33,11 @@ export class ApiKeysClient {
|
|
|
33
33
|
__list() {
|
|
34
34
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
35
35
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
36
|
-
const { limit, pageToken } = request;
|
|
36
|
+
const { limit, pageToken, ascending } = request;
|
|
37
37
|
const _queryParams = {
|
|
38
38
|
limit,
|
|
39
39
|
page_token: pageToken,
|
|
40
|
+
ascending,
|
|
40
41
|
};
|
|
41
42
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
42
43
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
@@ -33,10 +33,11 @@ export class DomainsClient {
|
|
|
33
33
|
__list() {
|
|
34
34
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
35
35
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
36
|
-
const { limit, pageToken } = request;
|
|
36
|
+
const { limit, pageToken, ascending } = request;
|
|
37
37
|
const _queryParams = {
|
|
38
38
|
limit,
|
|
39
39
|
page_token: pageToken,
|
|
40
|
+
ascending,
|
|
40
41
|
};
|
|
41
42
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
42
43
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
@@ -53,10 +53,11 @@ export class InboxesClient {
|
|
|
53
53
|
__list() {
|
|
54
54
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
55
55
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
56
|
-
const { limit, pageToken } = request;
|
|
56
|
+
const { limit, pageToken, ascending } = request;
|
|
57
57
|
const _queryParams = {
|
|
58
58
|
limit,
|
|
59
59
|
page_token: pageToken,
|
|
60
|
+
ascending,
|
|
60
61
|
};
|
|
61
62
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
62
63
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
@@ -37,7 +37,7 @@ export class MessagesClient {
|
|
|
37
37
|
__list(inbox_id_1) {
|
|
38
38
|
return __awaiter(this, arguments, void 0, function* (inbox_id, request = {}, requestOptions) {
|
|
39
39
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
40
|
-
const { limit, pageToken, labels, before, after, ascending, includeSpam, includeBlocked } = request;
|
|
40
|
+
const { limit, pageToken, labels, before, after, ascending, includeSpam, includeBlocked, includeTrash } = request;
|
|
41
41
|
const _queryParams = {
|
|
42
42
|
limit,
|
|
43
43
|
page_token: pageToken,
|
|
@@ -56,6 +56,7 @@ export class MessagesClient {
|
|
|
56
56
|
ascending,
|
|
57
57
|
include_spam: includeSpam,
|
|
58
58
|
include_blocked: includeBlocked,
|
|
59
|
+
include_trash: includeTrash,
|
|
59
60
|
};
|
|
60
61
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
61
62
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
@@ -37,7 +37,7 @@ export class ThreadsClient {
|
|
|
37
37
|
__list(inbox_id_1) {
|
|
38
38
|
return __awaiter(this, arguments, void 0, function* (inbox_id, request = {}, requestOptions) {
|
|
39
39
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
40
|
-
const { limit, pageToken, labels, before, after, ascending, includeSpam, includeBlocked } = request;
|
|
40
|
+
const { limit, pageToken, labels, before, after, ascending, includeSpam, includeBlocked, includeTrash } = request;
|
|
41
41
|
const _queryParams = {
|
|
42
42
|
limit,
|
|
43
43
|
page_token: pageToken,
|
|
@@ -56,6 +56,7 @@ export class ThreadsClient {
|
|
|
56
56
|
ascending,
|
|
57
57
|
include_spam: includeSpam,
|
|
58
58
|
include_blocked: includeBlocked,
|
|
59
|
+
include_trash: includeTrash,
|
|
59
60
|
};
|
|
60
61
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
61
62
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
@@ -58,10 +58,11 @@ export class PodsClient {
|
|
|
58
58
|
__list() {
|
|
59
59
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
60
60
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
61
|
-
const { limit, pageToken } = request;
|
|
61
|
+
const { limit, pageToken, ascending } = request;
|
|
62
62
|
const _queryParams = {
|
|
63
63
|
limit,
|
|
64
64
|
page_token: pageToken,
|
|
65
|
+
ascending,
|
|
65
66
|
};
|
|
66
67
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
67
68
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
@@ -37,6 +37,18 @@ export declare class DomainsClient {
|
|
|
37
37
|
*/
|
|
38
38
|
create(pod_id: AgentMail.pods.PodId, request: AgentMail.CreateDomainRequest, requestOptions?: DomainsClient.RequestOptions): core.HttpResponsePromise<AgentMail.Domain>;
|
|
39
39
|
private __create;
|
|
40
|
+
/**
|
|
41
|
+
* @param {AgentMail.pods.PodId} pod_id
|
|
42
|
+
* @param {AgentMail.DomainId} domain_id
|
|
43
|
+
* @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
44
|
+
*
|
|
45
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* await client.pods.domains.get("pod_id", "domain_id")
|
|
49
|
+
*/
|
|
50
|
+
get(pod_id: AgentMail.pods.PodId, domain_id: AgentMail.DomainId, requestOptions?: DomainsClient.RequestOptions): core.HttpResponsePromise<AgentMail.Domain>;
|
|
51
|
+
private __get;
|
|
40
52
|
/**
|
|
41
53
|
* @param {AgentMail.pods.PodId} pod_id
|
|
42
54
|
* @param {AgentMail.DomainId} domain_id
|