agentmail 0.3.8 → 0.3.9
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/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/pods/resources/domains/client/Client.d.ts +12 -0
- package/dist/cjs/api/resources/pods/resources/domains/client/Client.js +63 -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/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/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/pods/resources/domains/client/Client.d.mts +12 -0
- package/dist/esm/api/resources/pods/resources/domains/client/Client.mjs +63 -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/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 +33 -139
- package/dist/llms.txt +2 -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.3.
|
|
47
|
-
"User-Agent": "agentmail/0.3.
|
|
46
|
+
"X-Fern-SDK-Version": "0.3.9",
|
|
47
|
+
"User-Agent": "agentmail/0.3.9",
|
|
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);
|
|
@@ -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);
|
|
@@ -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
|
|
@@ -196,6 +196,69 @@ class DomainsClient {
|
|
|
196
196
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v0/pods/{pod_id}/domains");
|
|
197
197
|
});
|
|
198
198
|
}
|
|
199
|
+
/**
|
|
200
|
+
* @param {AgentMail.pods.PodId} pod_id
|
|
201
|
+
* @param {AgentMail.DomainId} domain_id
|
|
202
|
+
* @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
203
|
+
*
|
|
204
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
205
|
+
*
|
|
206
|
+
* @example
|
|
207
|
+
* await client.pods.domains.get("pod_id", "domain_id")
|
|
208
|
+
*/
|
|
209
|
+
get(pod_id, domain_id, requestOptions) {
|
|
210
|
+
return core.HttpResponsePromise.fromPromise(this.__get(pod_id, domain_id, requestOptions));
|
|
211
|
+
}
|
|
212
|
+
__get(pod_id, domain_id, requestOptions) {
|
|
213
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
214
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
215
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
216
|
+
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);
|
|
217
|
+
const _response = yield core.fetcher({
|
|
218
|
+
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)
|
|
219
|
+
.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 }))}`),
|
|
220
|
+
method: "GET",
|
|
221
|
+
headers: _headers,
|
|
222
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
223
|
+
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,
|
|
224
|
+
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,
|
|
225
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
226
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
227
|
+
logging: this._options.logging,
|
|
228
|
+
});
|
|
229
|
+
if (_response.ok) {
|
|
230
|
+
return {
|
|
231
|
+
data: serializers.Domain.parseOrThrow(_response.body, {
|
|
232
|
+
unrecognizedObjectKeys: "passthrough",
|
|
233
|
+
allowUnrecognizedUnionMembers: true,
|
|
234
|
+
allowUnrecognizedEnumValues: true,
|
|
235
|
+
skipValidation: true,
|
|
236
|
+
breadcrumbsPrefix: ["response"],
|
|
237
|
+
}),
|
|
238
|
+
rawResponse: _response.rawResponse,
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
if (_response.error.reason === "status-code") {
|
|
242
|
+
switch (_response.error.statusCode) {
|
|
243
|
+
case 404:
|
|
244
|
+
throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
245
|
+
unrecognizedObjectKeys: "passthrough",
|
|
246
|
+
allowUnrecognizedUnionMembers: true,
|
|
247
|
+
allowUnrecognizedEnumValues: true,
|
|
248
|
+
skipValidation: true,
|
|
249
|
+
breadcrumbsPrefix: ["response"],
|
|
250
|
+
}), _response.rawResponse);
|
|
251
|
+
default:
|
|
252
|
+
throw new errors.AgentMailError({
|
|
253
|
+
statusCode: _response.error.statusCode,
|
|
254
|
+
body: _response.error.body,
|
|
255
|
+
rawResponse: _response.rawResponse,
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v0/pods/{pod_id}/domains/{domain_id}");
|
|
260
|
+
});
|
|
261
|
+
}
|
|
199
262
|
/**
|
|
200
263
|
* @param {AgentMail.pods.PodId} pod_id
|
|
201
264
|
* @param {AgentMail.DomainId} domain_id
|
|
@@ -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);
|
|
@@ -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.3.
|
|
1
|
+
export declare const SDK_VERSION = "0.3.9";
|
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.3.
|
|
10
|
-
"User-Agent": "agentmail/0.3.
|
|
9
|
+
"X-Fern-SDK-Version": "0.3.9",
|
|
10
|
+
"User-Agent": "agentmail/0.3.9",
|
|
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);
|
|
@@ -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);
|
|
@@ -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
|
|
@@ -160,6 +160,69 @@ export class DomainsClient {
|
|
|
160
160
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/pods/{pod_id}/domains");
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
|
+
/**
|
|
164
|
+
* @param {AgentMail.pods.PodId} pod_id
|
|
165
|
+
* @param {AgentMail.DomainId} domain_id
|
|
166
|
+
* @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
167
|
+
*
|
|
168
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* await client.pods.domains.get("pod_id", "domain_id")
|
|
172
|
+
*/
|
|
173
|
+
get(pod_id, domain_id, requestOptions) {
|
|
174
|
+
return core.HttpResponsePromise.fromPromise(this.__get(pod_id, domain_id, requestOptions));
|
|
175
|
+
}
|
|
176
|
+
__get(pod_id, domain_id, requestOptions) {
|
|
177
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
178
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
179
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
180
|
+
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);
|
|
181
|
+
const _response = yield core.fetcher({
|
|
182
|
+
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)
|
|
183
|
+
.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 }))}`),
|
|
184
|
+
method: "GET",
|
|
185
|
+
headers: _headers,
|
|
186
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
187
|
+
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,
|
|
188
|
+
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,
|
|
189
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
190
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
191
|
+
logging: this._options.logging,
|
|
192
|
+
});
|
|
193
|
+
if (_response.ok) {
|
|
194
|
+
return {
|
|
195
|
+
data: serializers.Domain.parseOrThrow(_response.body, {
|
|
196
|
+
unrecognizedObjectKeys: "passthrough",
|
|
197
|
+
allowUnrecognizedUnionMembers: true,
|
|
198
|
+
allowUnrecognizedEnumValues: true,
|
|
199
|
+
skipValidation: true,
|
|
200
|
+
breadcrumbsPrefix: ["response"],
|
|
201
|
+
}),
|
|
202
|
+
rawResponse: _response.rawResponse,
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
if (_response.error.reason === "status-code") {
|
|
206
|
+
switch (_response.error.statusCode) {
|
|
207
|
+
case 404:
|
|
208
|
+
throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
209
|
+
unrecognizedObjectKeys: "passthrough",
|
|
210
|
+
allowUnrecognizedUnionMembers: true,
|
|
211
|
+
allowUnrecognizedEnumValues: true,
|
|
212
|
+
skipValidation: true,
|
|
213
|
+
breadcrumbsPrefix: ["response"],
|
|
214
|
+
}), _response.rawResponse);
|
|
215
|
+
default:
|
|
216
|
+
throw new errors.AgentMailError({
|
|
217
|
+
statusCode: _response.error.statusCode,
|
|
218
|
+
body: _response.error.body,
|
|
219
|
+
rawResponse: _response.rawResponse,
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/pods/{pod_id}/domains/{domain_id}");
|
|
224
|
+
});
|
|
225
|
+
}
|
|
163
226
|
/**
|
|
164
227
|
* @param {AgentMail.pods.PodId} pod_id
|
|
165
228
|
* @param {AgentMail.DomainId} domain_id
|
|
@@ -37,7 +37,7 @@ export class ThreadsClient {
|
|
|
37
37
|
__list(pod_id_1) {
|
|
38
38
|
return __awaiter(this, arguments, void 0, function* (pod_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);
|
|
@@ -7,6 +7,7 @@ export * from "./ErrorName.mjs";
|
|
|
7
7
|
export * from "./ErrorResponse.mjs";
|
|
8
8
|
export * from "./IncludeBlocked.mjs";
|
|
9
9
|
export * from "./IncludeSpam.mjs";
|
|
10
|
+
export * from "./IncludeTrash.mjs";
|
|
10
11
|
export * from "./Labels.mjs";
|
|
11
12
|
export * from "./Limit.mjs";
|
|
12
13
|
export * from "./OrganizationId.mjs";
|
|
@@ -7,6 +7,7 @@ export * from "./ErrorName.mjs";
|
|
|
7
7
|
export * from "./ErrorResponse.mjs";
|
|
8
8
|
export * from "./IncludeBlocked.mjs";
|
|
9
9
|
export * from "./IncludeSpam.mjs";
|
|
10
|
+
export * from "./IncludeTrash.mjs";
|
|
10
11
|
export * from "./Labels.mjs";
|
|
11
12
|
export * from "./Limit.mjs";
|
|
12
13
|
export * from "./OrganizationId.mjs";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as AgentMail from "../../api/index.mjs";
|
|
2
|
+
import * as core from "../../core/index.mjs";
|
|
3
|
+
import type * as serializers from "../index.mjs";
|
|
4
|
+
export declare const IncludeTrash: core.serialization.Schema<serializers.IncludeTrash.Raw, AgentMail.IncludeTrash>;
|
|
5
|
+
export declare namespace IncludeTrash {
|
|
6
|
+
type Raw = boolean;
|
|
7
|
+
}
|
|
@@ -7,6 +7,7 @@ export * from "./ErrorName.mjs";
|
|
|
7
7
|
export * from "./ErrorResponse.mjs";
|
|
8
8
|
export * from "./IncludeBlocked.mjs";
|
|
9
9
|
export * from "./IncludeSpam.mjs";
|
|
10
|
+
export * from "./IncludeTrash.mjs";
|
|
10
11
|
export * from "./Labels.mjs";
|
|
11
12
|
export * from "./Limit.mjs";
|
|
12
13
|
export * from "./OrganizationId.mjs";
|
|
@@ -7,6 +7,7 @@ export * from "./ErrorName.mjs";
|
|
|
7
7
|
export * from "./ErrorResponse.mjs";
|
|
8
8
|
export * from "./IncludeBlocked.mjs";
|
|
9
9
|
export * from "./IncludeSpam.mjs";
|
|
10
|
+
export * from "./IncludeTrash.mjs";
|
|
10
11
|
export * from "./Labels.mjs";
|
|
11
12
|
export * from "./Limit.mjs";
|
|
12
13
|
export * from "./OrganizationId.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.3.
|
|
1
|
+
export declare const SDK_VERSION = "0.3.9";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.3.
|
|
1
|
+
export const SDK_VERSION = "0.3.9";
|
package/dist/llms-full.txt
CHANGED
|
@@ -205,107 +205,6 @@ Get your API key from the [Console](https://console.agentmail.to) and replace `a
|
|
|
205
205
|
```
|
|
206
206
|
</CodeBlocks>
|
|
207
207
|
|
|
208
|
-
## Copy for Cursor / Claude
|
|
209
|
-
|
|
210
|
-
Copy one of the blocks below into Cursor or Claude for a complete, working AgentMail integration. Each block includes setup, API reference, error handling, rate limiting, and idempotency guidance.
|
|
211
|
-
|
|
212
|
-
<CodeBlocks>
|
|
213
|
-
```python title="Python"
|
|
214
|
-
"""
|
|
215
|
-
AgentMail Python Quickstart — copy into Cursor/Claude for instant setup.
|
|
216
|
-
|
|
217
|
-
Setup: pip install agentmail python-dotenv. Set AGENTMAIL_API_KEY in .env.
|
|
218
|
-
|
|
219
|
-
API reference:
|
|
220
|
-
- inboxes.create(username?, domain?, display_name?, client_id?) — client_id for idempotent retries
|
|
221
|
-
- messages.send(inbox_id, to, subject, text, html?, cc?, bcc?, reply_to?, attachments?)
|
|
222
|
-
- messages.list(inbox_id, limit?, page_token?, labels?) — receive emails; use extracted_text/extracted_html for reply content
|
|
223
|
-
|
|
224
|
-
Errors: SDK raises on 4xx/5xx. Inspect error.body.message or str(e).
|
|
225
|
-
Rate limit: 429 with Retry-After header. Implement exponential backoff for retries.
|
|
226
|
-
Idempotency: Pass client_id to inboxes.create() to safely retry without duplicates.
|
|
227
|
-
"""
|
|
228
|
-
import os
|
|
229
|
-
from dotenv import load_dotenv
|
|
230
|
-
from agentmail import AgentMail
|
|
231
|
-
|
|
232
|
-
load_dotenv()
|
|
233
|
-
client = AgentMail(api_key=os.getenv("AGENTMAIL_API_KEY"))
|
|
234
|
-
|
|
235
|
-
# Create inbox (client_id enables safe retries)
|
|
236
|
-
inbox = client.inboxes.create(client_id="my-agent-inbox-v1")
|
|
237
|
-
|
|
238
|
-
# Send email
|
|
239
|
-
try:
|
|
240
|
-
client.inboxes.messages.send(
|
|
241
|
-
inbox.inbox_id,
|
|
242
|
-
to="recipient@example.com",
|
|
243
|
-
subject="Hello from AgentMail",
|
|
244
|
-
text="Plain text body",
|
|
245
|
-
html="<p>HTML body</p>",
|
|
246
|
-
)
|
|
247
|
-
except Exception as e:
|
|
248
|
-
# Handle validation, not found, rate limit (429), etc.
|
|
249
|
-
print(f"Send failed: {e}")
|
|
250
|
-
raise
|
|
251
|
-
|
|
252
|
-
# Receive messages
|
|
253
|
-
for msg in client.inboxes.messages.list(inbox.inbox_id, limit=10).messages:
|
|
254
|
-
print(msg.subject, msg.extracted_text or msg.text)
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
```typescript title="TypeScript"
|
|
258
|
-
/**
|
|
259
|
-
* AgentMail TypeScript Quickstart — copy into Cursor/Claude for instant setup.
|
|
260
|
-
*
|
|
261
|
-
* Setup: npm install agentmail dotenv. Set AGENTMAIL_API_KEY in .env.
|
|
262
|
-
*
|
|
263
|
-
* API reference:
|
|
264
|
-
* - inboxes.create({ username?, domain?, displayName?, clientId? }) — clientId for idempotent retries
|
|
265
|
-
* - messages.send(inboxId, { to, subject, text, html?, cc?, bcc?, replyTo?, attachments? })
|
|
266
|
-
* - messages.list(inboxId, { limit?, pageToken?, labels? }) — receive; use extractedText/extractedHtml for reply content
|
|
267
|
-
*
|
|
268
|
-
* Errors: SDK throws on 4xx/5xx. Check error.body?.message.
|
|
269
|
-
* Rate limit: 429 with Retry-After header. Use exponential backoff for retries.
|
|
270
|
-
* Idempotency: Pass clientId to inboxes.create() to safely retry without duplicates.
|
|
271
|
-
*/
|
|
272
|
-
import { AgentMailClient } from "agentmail";
|
|
273
|
-
import "dotenv/config";
|
|
274
|
-
|
|
275
|
-
const client = new AgentMailClient({
|
|
276
|
-
apiKey: process.env.AGENTMAIL_API_KEY!,
|
|
277
|
-
});
|
|
278
|
-
|
|
279
|
-
async function main() {
|
|
280
|
-
// Create inbox (clientId enables safe retries)
|
|
281
|
-
const inbox = await client.inboxes.create({
|
|
282
|
-
clientId: "my-agent-inbox-v1",
|
|
283
|
-
});
|
|
284
|
-
|
|
285
|
-
try {
|
|
286
|
-
await client.inboxes.messages.send(inbox.inboxId, {
|
|
287
|
-
to: "recipient@example.com",
|
|
288
|
-
subject: "Hello from AgentMail",
|
|
289
|
-
text: "Plain text body",
|
|
290
|
-
html: "<p>HTML body</p>",
|
|
291
|
-
});
|
|
292
|
-
} catch (error: unknown) {
|
|
293
|
-
// Handle validation, not found, rate limit (429), etc.
|
|
294
|
-
const msg = (error as { body?: { message?: string } })?.body?.message ?? String(error);
|
|
295
|
-
throw new Error(`Send failed: ${msg}`);
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
// Receive messages
|
|
299
|
-
const res = await client.inboxes.messages.list(inbox.inboxId, { limit: 10 });
|
|
300
|
-
for (const msg of res.messages) {
|
|
301
|
-
console.log(msg.subject, msg.extractedText ?? msg.text);
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
main();
|
|
306
|
-
```
|
|
307
|
-
</CodeBlocks>
|
|
308
|
-
|
|
309
208
|
<Tip>
|
|
310
209
|
When receiving emails, messages include `extracted_text` and `extracted_html`
|
|
311
210
|
for reply content without quoted history.
|
|
@@ -1806,30 +1705,30 @@ title: Skills
|
|
|
1806
1705
|
subtitle: Add AgentMail to AI coding assistants with the official skill
|
|
1807
1706
|
slug: integrations/skills
|
|
1808
1707
|
description: >-
|
|
1809
|
-
AgentMail's official skill for
|
|
1708
|
+
AgentMail's official skill for Moltbot, Claude Code, Cursor, and other AI
|
|
1810
1709
|
assistants
|
|
1811
1710
|
----------
|
|
1812
1711
|
|
|
1813
1712
|
## Getting started
|
|
1814
1713
|
|
|
1815
|
-
AgentMail provides an official skill that can be installed on AI coding assistants and agents that support the [AgentSkills](https://skills.sh) format. This includes
|
|
1714
|
+
AgentMail provides an official skill that can be installed on AI coding assistants and agents that support the [AgentSkills](https://skills.sh) format. This includes Moltbot, Claude Code, Cursor, Codex, and other compatible tools.
|
|
1816
1715
|
|
|
1817
1716
|
The skill is available at [skills.sh/agentmail-to/agentmail-skills/agentmail](https://skills.sh/agentmail-to/agentmail-skills/agentmail).
|
|
1818
1717
|
|
|
1819
1718
|
## Installation
|
|
1820
1719
|
|
|
1821
|
-
###
|
|
1720
|
+
### Moltbot
|
|
1822
1721
|
|
|
1823
|
-
Install the skill using the
|
|
1722
|
+
Install the skill using the Moltbot CLI:
|
|
1824
1723
|
|
|
1825
1724
|
```bash
|
|
1826
|
-
|
|
1725
|
+
moltbot skills install agentmail-to/agentmail-skills/agentmail
|
|
1827
1726
|
```
|
|
1828
1727
|
|
|
1829
|
-
Or install via
|
|
1728
|
+
Or install via ClawdHub:
|
|
1830
1729
|
|
|
1831
1730
|
```bash
|
|
1832
|
-
|
|
1731
|
+
clawdhub install agentmail
|
|
1833
1732
|
```
|
|
1834
1733
|
|
|
1835
1734
|
### Claude Code
|
|
@@ -1868,9 +1767,9 @@ Set the `AGENTMAIL_API_KEY` environment variable:
|
|
|
1868
1767
|
export AGENTMAIL_API_KEY="your-api-key-here"
|
|
1869
1768
|
```
|
|
1870
1769
|
|
|
1871
|
-
###
|
|
1770
|
+
### Moltbot configuration
|
|
1872
1771
|
|
|
1873
|
-
Add the API key to `~/.
|
|
1772
|
+
Add the API key to `~/.clawdbot/moltbot.json`:
|
|
1874
1773
|
|
|
1875
1774
|
```json
|
|
1876
1775
|
{
|
|
@@ -1957,13 +1856,7 @@ The Model Context Protocol (MCP) is an open standard that enables AI application
|
|
|
1957
1856
|
|
|
1958
1857
|
### Setup
|
|
1959
1858
|
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
```bash
|
|
1963
|
-
npx @smithery/cli@latest mcp add agentmail
|
|
1964
|
-
```
|
|
1965
|
-
|
|
1966
|
-
Configure your API key when prompted. Get your key from the [AgentMail Console](https://console.agentmail.to). For more details, visit [mcp.agentmail.to](https://mcp.agentmail.to).
|
|
1859
|
+
To get started with the AgentMail MCP server, visit [mcp.agentmail.to](https://mcp.agentmail.to) for installation instructions and configuration details.
|
|
1967
1860
|
|
|
1968
1861
|
## Features
|
|
1969
1862
|
|
|
@@ -1988,25 +1881,25 @@ For detailed setup instructions and available tools, visit [mcp.agentmail.to](ht
|
|
|
1988
1881
|
|
|
1989
1882
|
***
|
|
1990
1883
|
|
|
1991
|
-
title:
|
|
1992
|
-
subtitle: Give your
|
|
1884
|
+
title: Openclaw
|
|
1885
|
+
subtitle: Give your Openclaw agent its own email inbox
|
|
1993
1886
|
slug: integrations/openclaw
|
|
1994
|
-
description: AgentMail's
|
|
1887
|
+
description: AgentMail's Openclaw integration
|
|
1995
1888
|
---------------------------------------------
|
|
1996
1889
|
|
|
1997
1890
|
## Getting started
|
|
1998
1891
|
|
|
1999
|
-
|
|
1892
|
+
Openclaw (formerly Moltbot) is an open-source AI personal assistant that runs on your own devices and integrates with messaging platforms like WhatsApp, Telegram, Discord, and Slack. By adding AgentMail to Openclaw, your agent gains the ability to send and receive emails, enabling two-way email conversations alongside your existing chat channels.
|
|
2000
1893
|
|
|
2001
|
-
There are two ways to integrate AgentMail with
|
|
1894
|
+
There are two ways to integrate AgentMail with Openclaw: using the official AgentMail skill or creating a custom skill.
|
|
2002
1895
|
|
|
2003
1896
|
## Option 1: Official AgentMail Skill (Recommended)
|
|
2004
1897
|
|
|
2005
|
-
The easiest way to add email capabilities to
|
|
1898
|
+
The easiest way to add email capabilities to Openclaw is by installing the official AgentMail skill from [skills.sh](https://skills.sh/agentmail-to/agentmail-skills/agentmail). This skill is maintained by the AgentMail team and provides comprehensive email functionality.
|
|
2006
1899
|
|
|
2007
1900
|
### Installation
|
|
2008
1901
|
|
|
2009
|
-
Install the skill using the
|
|
1902
|
+
Install the skill using the Openclaw CLI:
|
|
2010
1903
|
|
|
2011
1904
|
```bash
|
|
2012
1905
|
openclaw skills install agentmail-to/agentmail-skills/agentmail
|
|
@@ -2064,11 +1957,11 @@ You should see `agentmail` in the list of available skills.
|
|
|
2064
1957
|
|
|
2065
1958
|
## Option 2: Custom Skill
|
|
2066
1959
|
|
|
2067
|
-
For more control over the integration, you can create a custom AgentMail skill. Skills are directories containing a `SKILL.md` file with instructions for
|
|
1960
|
+
For more control over the integration, you can create a custom AgentMail skill. Skills are directories containing a `SKILL.md` file with instructions for Openclaw.
|
|
2068
1961
|
|
|
2069
1962
|
### Create the skill directory
|
|
2070
1963
|
|
|
2071
|
-
Create a new skill in your
|
|
1964
|
+
Create a new skill in your Openclaw workspace:
|
|
2072
1965
|
|
|
2073
1966
|
```bash
|
|
2074
1967
|
mkdir -p ~/.openclaw/skills/agentmail
|
|
@@ -2130,10 +2023,10 @@ curl -s -X POST -H "Authorization: Bearer $AGENTMAIL_API_KEY" \
|
|
|
2130
2023
|
-H "Content-Type: application/json" \
|
|
2131
2024
|
-d '{
|
|
2132
2025
|
"to": ["recipient@example.com"],
|
|
2133
|
-
"subject": "Hello from
|
|
2026
|
+
"subject": "Hello from Openclaw",
|
|
2134
2027
|
"text": "This email was sent by my AI assistant."
|
|
2135
2028
|
}' \
|
|
2136
|
-
https://api.agentmail.to/v0/inboxes/{inbox_id}/messages
|
|
2029
|
+
https://api.agentmail.to/v0/inboxes/{inbox_id}/messages
|
|
2137
2030
|
```
|
|
2138
2031
|
|
|
2139
2032
|
### List messages in an inbox
|
|
@@ -2184,7 +2077,7 @@ You should see `agentmail` in the list of available skills.
|
|
|
2184
2077
|
|
|
2185
2078
|
## Example use cases
|
|
2186
2079
|
|
|
2187
|
-
Once AgentMail is integrated with
|
|
2080
|
+
Once AgentMail is integrated with Openclaw, you can ask your agent to:
|
|
2188
2081
|
|
|
2189
2082
|
* "Create a new email inbox for my project"
|
|
2190
2083
|
* "Check my inbox for new emails"
|
|
@@ -2194,9 +2087,9 @@ Once AgentMail is integrated with OpenClaw, you can ask your agent to:
|
|
|
2194
2087
|
|
|
2195
2088
|
## Real-time email notifications
|
|
2196
2089
|
|
|
2197
|
-
For proactive email handling, you can combine AgentMail webhooks with
|
|
2090
|
+
For proactive email handling, you can combine AgentMail webhooks with Openclaw's webhook support. This allows Openclaw to notify you immediately when new emails arrive.
|
|
2198
2091
|
|
|
2199
|
-
1. Set up a webhook endpoint in
|
|
2092
|
+
1. Set up a webhook endpoint in Openclaw (see [Openclaw webhook documentation](https://docs.openclaw.ai/automation/webhook))
|
|
2200
2093
|
|
|
2201
2094
|
2. Register the webhook with AgentMail:
|
|
2202
2095
|
|
|
@@ -2210,14 +2103,14 @@ curl -X POST -H "Authorization: Bearer $AGENTMAIL_API_KEY" \
|
|
|
2210
2103
|
https://api.agentmail.to/v0/webhooks
|
|
2211
2104
|
```
|
|
2212
2105
|
|
|
2213
|
-
Now
|
|
2106
|
+
Now Openclaw will be notified whenever a new email arrives, allowing it to proactively inform you or take action.
|
|
2214
2107
|
|
|
2215
2108
|
## Resources
|
|
2216
2109
|
|
|
2217
2110
|
* [Official AgentMail Skill](https://skills.sh/agentmail-to/agentmail-skills/agentmail)
|
|
2218
2111
|
* [AgentMail API Reference](/api-reference)
|
|
2219
|
-
* [
|
|
2220
|
-
* [
|
|
2112
|
+
* [Openclaw Documentation](https://docs.openclaw.ai)
|
|
2113
|
+
* [Openclaw Skills Guide](https://docs.openclaw.ai/tools/skills)
|
|
2221
2114
|
|
|
2222
2115
|
|
|
2223
2116
|
***
|
|
@@ -8751,7 +8644,8 @@ and get support.
|
|
|
8751
8644
|
</Callout>
|
|
8752
8645
|
|
|
8753
8646
|
|
|
8754
|
-
|
|
8647
|
+
***
|
|
8648
|
+
|
|
8755
8649
|
title: Support
|
|
8756
8650
|
slug: support
|
|
8757
8651
|
description: Get help with AgentMail through our support channels.
|
|
@@ -18185,8 +18079,8 @@ client = AgentMail(
|
|
|
18185
18079
|
|
|
18186
18080
|
client.inboxes.metrics.get(
|
|
18187
18081
|
inbox_id="inbox_id",
|
|
18188
|
-
start_timestamp=datetime.fromisoformat("2024-01-15T09:30:
|
|
18189
|
-
end_timestamp=datetime.fromisoformat("2024-01-15T09:30:
|
|
18082
|
+
start_timestamp=datetime.fromisoformat("2024-01-15T09:30:00+00:00"),
|
|
18083
|
+
end_timestamp=datetime.fromisoformat("2024-01-15T09:30:00+00:00")
|
|
18190
18084
|
)
|
|
18191
18085
|
|
|
18192
18086
|
```
|
|
@@ -27194,8 +27088,8 @@ client = AgentMail(
|
|
|
27194
27088
|
)
|
|
27195
27089
|
|
|
27196
27090
|
client.metrics.list(
|
|
27197
|
-
start_timestamp=datetime.fromisoformat("2024-01-15T09:30:
|
|
27198
|
-
end_timestamp=datetime.fromisoformat("2024-01-15T09:30:
|
|
27091
|
+
start_timestamp=datetime.fromisoformat("2024-01-15T09:30:00+00:00"),
|
|
27092
|
+
end_timestamp=datetime.fromisoformat("2024-01-15T09:30:00+00:00")
|
|
27199
27093
|
)
|
|
27200
27094
|
|
|
27201
27095
|
```
|
package/dist/llms.txt
CHANGED
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
- [Lists](https://docs.agentmail.to/lists.mdx): Learn how to use Lists to control which email addresses and domains your agents can send to or receive from.
|
|
14
14
|
- [Attachments](https://docs.agentmail.to/attachments.mdx): Learn how to send files as attachments, and download incoming attachments from both messages and threads.
|
|
15
15
|
- [Pods](https://docs.agentmail.to/documentation/core-concepts/pods.mdx): Learn how to use pods for multi-tenant email management
|
|
16
|
-
- [Skills](https://docs.agentmail.to/integrations/skills.mdx): AgentMail's official skill for
|
|
16
|
+
- [Skills](https://docs.agentmail.to/integrations/skills.mdx): AgentMail's official skill for Moltbot, Claude Code, Cursor, and other AI assistants
|
|
17
17
|
- [MCP](https://docs.agentmail.to/integrations/mcp.mdx): AgentMail's Model Context Protocol (MCP) integration
|
|
18
|
-
- [
|
|
18
|
+
- [Openclaw](https://docs.agentmail.to/integrations/openclaw.mdx): AgentMail's Openclaw integration
|
|
19
19
|
- [Replit](https://docs.agentmail.to/integrations/replit.mdx): AgentMail's Replit integration
|
|
20
20
|
- [x402](https://docs.agentmail.to/integrations/x402.mdx): AgentMail's x402 integration for HTTP-native payments
|
|
21
21
|
- [Guide: Sending & Receiving Email](https://docs.agentmail.to/sending-receiving-email.mdx): A step-by-step guide to the practical workflow of sending initial emails and handling replies to have a full conversation.
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -3075,6 +3075,63 @@ await client.pods.domains.create("pod_id", {
|
|
|
3075
3075
|
</dl>
|
|
3076
3076
|
|
|
3077
3077
|
|
|
3078
|
+
</dd>
|
|
3079
|
+
</dl>
|
|
3080
|
+
</details>
|
|
3081
|
+
|
|
3082
|
+
<details><summary><code>client.pods.domains.<a href="/src/api/resources/pods/resources/domains/client/Client.ts">get</a>(pod_id, domain_id) -> AgentMail.Domain</code></summary>
|
|
3083
|
+
<dl>
|
|
3084
|
+
<dd>
|
|
3085
|
+
|
|
3086
|
+
#### 🔌 Usage
|
|
3087
|
+
|
|
3088
|
+
<dl>
|
|
3089
|
+
<dd>
|
|
3090
|
+
|
|
3091
|
+
<dl>
|
|
3092
|
+
<dd>
|
|
3093
|
+
|
|
3094
|
+
```typescript
|
|
3095
|
+
await client.pods.domains.get("pod_id", "domain_id");
|
|
3096
|
+
|
|
3097
|
+
```
|
|
3098
|
+
</dd>
|
|
3099
|
+
</dl>
|
|
3100
|
+
</dd>
|
|
3101
|
+
</dl>
|
|
3102
|
+
|
|
3103
|
+
#### ⚙️ Parameters
|
|
3104
|
+
|
|
3105
|
+
<dl>
|
|
3106
|
+
<dd>
|
|
3107
|
+
|
|
3108
|
+
<dl>
|
|
3109
|
+
<dd>
|
|
3110
|
+
|
|
3111
|
+
**pod_id:** `AgentMail.PodId`
|
|
3112
|
+
|
|
3113
|
+
</dd>
|
|
3114
|
+
</dl>
|
|
3115
|
+
|
|
3116
|
+
<dl>
|
|
3117
|
+
<dd>
|
|
3118
|
+
|
|
3119
|
+
**domain_id:** `AgentMail.DomainId`
|
|
3120
|
+
|
|
3121
|
+
</dd>
|
|
3122
|
+
</dl>
|
|
3123
|
+
|
|
3124
|
+
<dl>
|
|
3125
|
+
<dd>
|
|
3126
|
+
|
|
3127
|
+
**requestOptions:** `DomainsClient.RequestOptions`
|
|
3128
|
+
|
|
3129
|
+
</dd>
|
|
3130
|
+
</dl>
|
|
3131
|
+
</dd>
|
|
3132
|
+
</dl>
|
|
3133
|
+
|
|
3134
|
+
|
|
3078
3135
|
</dd>
|
|
3079
3136
|
</dl>
|
|
3080
3137
|
</details>
|