agentmail 0.5.1 → 0.5.3

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.
Files changed (70) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/agent/types/AgentSignupRequest.d.ts +12 -0
  3. package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.d.ts +23 -0
  4. package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +80 -0
  5. package/dist/cjs/api/resources/lists/types/ListEntryBase.d.ts +2 -0
  6. package/dist/cjs/api/resources/messages/types/BatchGetMessagesMessageIds.d.ts +8 -0
  7. package/dist/cjs/api/resources/messages/types/BatchGetMessagesMessageIds.js +3 -0
  8. package/dist/cjs/api/resources/messages/types/BatchGetMessagesRequest.d.ts +4 -0
  9. package/dist/cjs/api/resources/messages/types/BatchGetMessagesRequest.js +3 -0
  10. package/dist/cjs/api/resources/messages/types/BatchGetMessagesResponse.d.ts +11 -0
  11. package/dist/cjs/api/resources/messages/types/BatchGetMessagesResponse.js +3 -0
  12. package/dist/cjs/api/resources/messages/types/index.d.ts +3 -0
  13. package/dist/cjs/api/resources/messages/types/index.js +3 -0
  14. package/dist/cjs/api/resources/webhooks/client/Client.d.ts +3 -0
  15. package/dist/cjs/api/resources/webhooks/client/Client.js +3 -0
  16. package/dist/cjs/api/resources/webhooks/types/CreateWebhookRequest.d.ts +5 -0
  17. package/dist/cjs/api/resources/webhooks/types/UpdateWebhookRequest.d.ts +9 -0
  18. package/dist/cjs/serialization/resources/agent/types/AgentSignupRequest.d.ts +2 -0
  19. package/dist/cjs/serialization/resources/agent/types/AgentSignupRequest.js +2 -0
  20. package/dist/cjs/serialization/resources/lists/types/ListEntryBase.d.ts +1 -0
  21. package/dist/cjs/serialization/resources/lists/types/ListEntryBase.js +1 -0
  22. package/dist/cjs/serialization/resources/messages/types/BatchGetMessagesMessageIds.d.ts +8 -0
  23. package/dist/cjs/serialization/resources/messages/types/BatchGetMessagesMessageIds.js +40 -0
  24. package/dist/cjs/serialization/resources/messages/types/BatchGetMessagesRequest.d.ts +10 -0
  25. package/dist/cjs/serialization/resources/messages/types/BatchGetMessagesRequest.js +42 -0
  26. package/dist/cjs/serialization/resources/messages/types/BatchGetMessagesResponse.d.ts +14 -0
  27. package/dist/cjs/serialization/resources/messages/types/BatchGetMessagesResponse.js +46 -0
  28. package/dist/cjs/serialization/resources/messages/types/index.d.ts +3 -0
  29. package/dist/cjs/serialization/resources/messages/types/index.js +3 -0
  30. package/dist/cjs/serialization/resources/webhooks/types/UpdateWebhookRequest.d.ts +2 -0
  31. package/dist/cjs/serialization/resources/webhooks/types/UpdateWebhookRequest.js +2 -0
  32. package/dist/cjs/version.d.ts +1 -1
  33. package/dist/cjs/version.js +1 -1
  34. package/dist/esm/BaseClient.mjs +2 -2
  35. package/dist/esm/api/resources/agent/types/AgentSignupRequest.d.mts +12 -0
  36. package/dist/esm/api/resources/inboxes/resources/messages/client/Client.d.mts +23 -0
  37. package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +80 -0
  38. package/dist/esm/api/resources/lists/types/ListEntryBase.d.mts +2 -0
  39. package/dist/esm/api/resources/messages/types/BatchGetMessagesMessageIds.d.mts +8 -0
  40. package/dist/esm/api/resources/messages/types/BatchGetMessagesMessageIds.mjs +2 -0
  41. package/dist/esm/api/resources/messages/types/BatchGetMessagesRequest.d.mts +4 -0
  42. package/dist/esm/api/resources/messages/types/BatchGetMessagesRequest.mjs +2 -0
  43. package/dist/esm/api/resources/messages/types/BatchGetMessagesResponse.d.mts +11 -0
  44. package/dist/esm/api/resources/messages/types/BatchGetMessagesResponse.mjs +2 -0
  45. package/dist/esm/api/resources/messages/types/index.d.mts +3 -0
  46. package/dist/esm/api/resources/messages/types/index.mjs +3 -0
  47. package/dist/esm/api/resources/webhooks/client/Client.d.mts +3 -0
  48. package/dist/esm/api/resources/webhooks/client/Client.mjs +3 -0
  49. package/dist/esm/api/resources/webhooks/types/CreateWebhookRequest.d.mts +5 -0
  50. package/dist/esm/api/resources/webhooks/types/UpdateWebhookRequest.d.mts +9 -0
  51. package/dist/esm/serialization/resources/agent/types/AgentSignupRequest.d.mts +2 -0
  52. package/dist/esm/serialization/resources/agent/types/AgentSignupRequest.mjs +2 -0
  53. package/dist/esm/serialization/resources/lists/types/ListEntryBase.d.mts +1 -0
  54. package/dist/esm/serialization/resources/lists/types/ListEntryBase.mjs +1 -0
  55. package/dist/esm/serialization/resources/messages/types/BatchGetMessagesMessageIds.d.mts +8 -0
  56. package/dist/esm/serialization/resources/messages/types/BatchGetMessagesMessageIds.mjs +4 -0
  57. package/dist/esm/serialization/resources/messages/types/BatchGetMessagesRequest.d.mts +10 -0
  58. package/dist/esm/serialization/resources/messages/types/BatchGetMessagesRequest.mjs +6 -0
  59. package/dist/esm/serialization/resources/messages/types/BatchGetMessagesResponse.d.mts +14 -0
  60. package/dist/esm/serialization/resources/messages/types/BatchGetMessagesResponse.mjs +10 -0
  61. package/dist/esm/serialization/resources/messages/types/index.d.mts +3 -0
  62. package/dist/esm/serialization/resources/messages/types/index.mjs +3 -0
  63. package/dist/esm/serialization/resources/webhooks/types/UpdateWebhookRequest.d.mts +2 -0
  64. package/dist/esm/serialization/resources/webhooks/types/UpdateWebhookRequest.mjs +2 -0
  65. package/dist/esm/version.d.mts +1 -1
  66. package/dist/esm/version.mjs +1 -1
  67. package/dist/llms-full.txt +6816 -7026
  68. package/dist/llms.txt +10 -1
  69. package/package.json +1 -1
  70. package/reference.md +83 -0
@@ -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.5.1",
47
- "User-Agent": "agentmail/0.5.1",
46
+ "X-Fern-SDK-Version": "0.5.3",
47
+ "User-Agent": "agentmail/0.5.3",
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);
@@ -6,4 +6,16 @@ export interface AgentSignupRequest {
6
6
  humanEmail: string;
7
7
  /** Username for the auto-created inbox (e.g. "my-agent" creates my-agent@agentmail.to). */
8
8
  username: string;
9
+ /**
10
+ * The SDK, framework, or platform issuing this sign-up (e.g. `agentmail-python`, `agentmail-cli`, `agentmail-mcp`).
11
+ * Identifies the caller — answers "who is signing up".
12
+ * Max 2048 characters.
13
+ */
14
+ source?: string;
15
+ /**
16
+ * The channel that drove this sign-up — where the agent or its developer discovered AgentMail
17
+ * (e.g. `agent.email`, a partner URL, a campaign tag). Answers "where did this sign-up come from".
18
+ * Max 2048 characters.
19
+ */
20
+ referrer?: string;
9
21
  }
@@ -44,6 +44,29 @@ export declare class MessagesClient {
44
44
  */
45
45
  get(inbox_id: AgentMail.inboxes.InboxId, message_id: AgentMail.MessageId, requestOptions?: MessagesClient.RequestOptions): core.HttpResponsePromise<AgentMail.Message>;
46
46
  private __get;
47
+ /**
48
+ * Fetch metadata for up to 500 messages in one request. Missing or
49
+ * restricted IDs are silently omitted; compare `count` against `limit`
50
+ * to detect misses.
51
+ *
52
+ * **CLI:**
53
+ * ```bash
54
+ * agentmail inboxes:messages batch-get --inbox-id <inbox_id> --message-id <id1> --message-id <id2>
55
+ * ```
56
+ *
57
+ * @param {AgentMail.inboxes.InboxId} inbox_id
58
+ * @param {AgentMail.BatchGetMessagesRequest} request
59
+ * @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration.
60
+ *
61
+ * @throws {@link AgentMail.ValidationError}
62
+ *
63
+ * @example
64
+ * await client.inboxes.messages.batchGet("inbox_id", {
65
+ * messageIds: ["message_ids", "message_ids"]
66
+ * })
67
+ */
68
+ batchGet(inbox_id: AgentMail.inboxes.InboxId, request: AgentMail.BatchGetMessagesRequest, requestOptions?: MessagesClient.RequestOptions): core.HttpResponsePromise<AgentMail.BatchGetMessagesResponse>;
69
+ private __batchGet;
47
70
  /**
48
71
  * **CLI:**
49
72
  * ```bash
@@ -215,6 +215,86 @@ class MessagesClient {
215
215
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v0/inboxes/{inbox_id}/messages/{message_id}");
216
216
  });
217
217
  }
218
+ /**
219
+ * Fetch metadata for up to 500 messages in one request. Missing or
220
+ * restricted IDs are silently omitted; compare `count` against `limit`
221
+ * to detect misses.
222
+ *
223
+ * **CLI:**
224
+ * ```bash
225
+ * agentmail inboxes:messages batch-get --inbox-id <inbox_id> --message-id <id1> --message-id <id2>
226
+ * ```
227
+ *
228
+ * @param {AgentMail.inboxes.InboxId} inbox_id
229
+ * @param {AgentMail.BatchGetMessagesRequest} request
230
+ * @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration.
231
+ *
232
+ * @throws {@link AgentMail.ValidationError}
233
+ *
234
+ * @example
235
+ * await client.inboxes.messages.batchGet("inbox_id", {
236
+ * messageIds: ["message_ids", "message_ids"]
237
+ * })
238
+ */
239
+ batchGet(inbox_id, request, requestOptions) {
240
+ return core.HttpResponsePromise.fromPromise(this.__batchGet(inbox_id, request, requestOptions));
241
+ }
242
+ __batchGet(inbox_id, request, requestOptions) {
243
+ return __awaiter(this, void 0, void 0, function* () {
244
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
245
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
246
+ 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);
247
+ const _response = yield core.fetcher({
248
+ 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)
249
+ .http, `/v0/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(inbox_id, { omitUndefined: true }))}/messages/batch-get`),
250
+ method: "POST",
251
+ headers: _headers,
252
+ contentType: "application/json",
253
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
254
+ requestType: "json",
255
+ body: serializers.BatchGetMessagesRequest.jsonOrThrow(request, {
256
+ unrecognizedObjectKeys: "strip",
257
+ omitUndefined: true,
258
+ }),
259
+ 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,
260
+ 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,
261
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
262
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
263
+ logging: this._options.logging,
264
+ });
265
+ if (_response.ok) {
266
+ return {
267
+ data: serializers.BatchGetMessagesResponse.parseOrThrow(_response.body, {
268
+ unrecognizedObjectKeys: "passthrough",
269
+ allowUnrecognizedUnionMembers: true,
270
+ allowUnrecognizedEnumValues: true,
271
+ skipValidation: true,
272
+ breadcrumbsPrefix: ["response"],
273
+ }),
274
+ rawResponse: _response.rawResponse,
275
+ };
276
+ }
277
+ if (_response.error.reason === "status-code") {
278
+ switch (_response.error.statusCode) {
279
+ case 400:
280
+ throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
281
+ unrecognizedObjectKeys: "passthrough",
282
+ allowUnrecognizedUnionMembers: true,
283
+ allowUnrecognizedEnumValues: true,
284
+ skipValidation: true,
285
+ breadcrumbsPrefix: ["response"],
286
+ }), _response.rawResponse);
287
+ default:
288
+ throw new errors.AgentMailError({
289
+ statusCode: _response.error.statusCode,
290
+ body: _response.error.body,
291
+ rawResponse: _response.rawResponse,
292
+ });
293
+ }
294
+ }
295
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v0/inboxes/{inbox_id}/messages/batch-get");
296
+ });
297
+ }
218
298
  /**
219
299
  * **CLI:**
220
300
  * ```bash
@@ -10,4 +10,6 @@ export interface ListEntryBase {
10
10
  entryType: AgentMail.EntryType;
11
11
  /** Time at which entry was created. */
12
12
  createdAt: Date;
13
+ /** Whether the entry is read-only and cannot be deleted via the API. */
14
+ readOnly?: boolean;
13
15
  }
@@ -0,0 +1,8 @@
1
+ import type * as AgentMail from "../../../index.js";
2
+ /**
3
+ * IDs of messages to fetch. Maximum 500 ids per request. Duplicates are
4
+ * rejected with a validation error. IDs not found in the inbox (including
5
+ * cross-inbox or permission-restricted) are silently omitted from the
6
+ * response; callers detect misses by comparing `count` against `limit`.
7
+ */
8
+ export type BatchGetMessagesMessageIds = AgentMail.MessageId[];
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import type * as AgentMail from "../../../index.js";
2
+ export interface BatchGetMessagesRequest {
3
+ messageIds: AgentMail.BatchGetMessagesMessageIds;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import type * as AgentMail from "../../../index.js";
2
+ export interface BatchGetMessagesResponse {
3
+ limit: AgentMail.Limit;
4
+ count: AgentMail.Count;
5
+ /**
6
+ * Found messages. Order matches `message_ids` in the request. Body
7
+ * fields (`text`, `html`, `extracted_text`, `extracted_html`) are
8
+ * never populated; use the single-message endpoint to retrieve bodies.
9
+ */
10
+ messages: AgentMail.Message[];
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,7 @@
1
1
  export * from "./Addresses.js";
2
+ export * from "./BatchGetMessagesMessageIds.js";
3
+ export * from "./BatchGetMessagesRequest.js";
4
+ export * from "./BatchGetMessagesResponse.js";
2
5
  export * from "./ListMessagesResponse.js";
3
6
  export * from "./Message.js";
4
7
  export * from "./MessageAttachments.js";
@@ -15,6 +15,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./Addresses.js"), exports);
18
+ __exportStar(require("./BatchGetMessagesMessageIds.js"), exports);
19
+ __exportStar(require("./BatchGetMessagesRequest.js"), exports);
20
+ __exportStar(require("./BatchGetMessagesResponse.js"), exports);
18
21
  __exportStar(require("./ListMessagesResponse.js"), exports);
19
22
  __exportStar(require("./Message.js"), exports);
20
23
  __exportStar(require("./MessageAttachments.js"), exports);
@@ -60,6 +60,9 @@ export declare class WebhooksClient {
60
60
  create(request: AgentMail.webhooks.CreateWebhookRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<AgentMail.webhooks.Webhook>;
61
61
  private __create;
62
62
  /**
63
+ * Update inbox or pod subscriptions, or replace the webhook's `event_types` in full when you pass a
64
+ * non-empty `event_types` array (see request field docs). Inbox and pod changes use add/remove lists.
65
+ *
63
66
  * **CLI:**
64
67
  * ```bash
65
68
  * agentmail webhooks update --webhook-id <webhook_id> --add-inbox-id <inbox_id>
@@ -260,6 +260,9 @@ class WebhooksClient {
260
260
  });
261
261
  }
262
262
  /**
263
+ * Update inbox or pod subscriptions, or replace the webhook's `event_types` in full when you pass a
264
+ * non-empty `event_types` array (see request field docs). Inbox and pod changes use add/remove lists.
265
+ *
263
266
  * **CLI:**
264
267
  * ```bash
265
268
  * agentmail webhooks update --webhook-id <webhook_id> --add-inbox-id <inbox_id>
@@ -1,6 +1,11 @@
1
1
  import type * as AgentMail from "../../../index.js";
2
2
  export interface CreateWebhookRequest {
3
3
  url: AgentMail.webhooks.Url;
4
+ /**
5
+ * Full list of event types this webhook should receive. At least one type is required. Send every type you
6
+ * want in this array (not incremental). See [Webhooks overview](https://docs.agentmail.to/webhooks-overview)
7
+ * for spam, blocked, and unauthenticated events and required permissions.
8
+ */
4
9
  eventTypes: AgentMail.EventTypes;
5
10
  podIds?: AgentMail.PodIds;
6
11
  inboxIds?: AgentMail.InboxIds;
@@ -8,4 +8,13 @@ export interface UpdateWebhookRequest {
8
8
  addPodIds?: AgentMail.PodIds;
9
9
  /** Pod IDs to unsubscribe from the webhook. */
10
10
  removePodIds?: AgentMail.PodIds;
11
+ /**
12
+ * When you send a non-empty list, it replaces the webhook's subscribed event types in full (the same
13
+ * "set the list" behavior as create). It is not a merge or diff: include every event type you want after
14
+ * the update. Sending a one-element array means the webhook will only receive that one type afterward.
15
+ * Omit this field or send an empty array to leave event types unchanged. Clearing all types with an empty
16
+ * list is not supported. Subscribing to `message.received.spam`, `message.received.blocked`, or
17
+ * `message.received.unauthenticated` requires the matching label permission on the API key.
18
+ */
19
+ eventTypes?: AgentMail.EventTypes;
11
20
  }
@@ -6,5 +6,7 @@ export declare namespace AgentSignupRequest {
6
6
  interface Raw {
7
7
  human_email: string;
8
8
  username: string;
9
+ source?: string | null;
10
+ referrer?: string | null;
9
11
  }
10
12
  }
@@ -39,4 +39,6 @@ const core = __importStar(require("../../../../core/index.js"));
39
39
  exports.AgentSignupRequest = core.serialization.object({
40
40
  humanEmail: core.serialization.property("human_email", core.serialization.string()),
41
41
  username: core.serialization.string(),
42
+ source: core.serialization.string().optional(),
43
+ referrer: core.serialization.string().optional(),
42
44
  });
@@ -15,5 +15,6 @@ export declare namespace ListEntryBase {
15
15
  list_type: ListType.Raw;
16
16
  entry_type: EntryType.Raw;
17
17
  created_at: string;
18
+ read_only?: boolean | null;
18
19
  }
19
20
  }
@@ -48,4 +48,5 @@ exports.ListEntryBase = core.serialization.object({
48
48
  listType: core.serialization.property("list_type", ListType_js_1.ListType),
49
49
  entryType: core.serialization.property("entry_type", EntryType_js_1.EntryType),
50
50
  createdAt: core.serialization.property("created_at", core.serialization.date()),
51
+ readOnly: core.serialization.property("read_only", core.serialization.boolean().optional()),
51
52
  });
@@ -0,0 +1,8 @@
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
+ import { MessageId } from "./MessageId.js";
5
+ export declare const BatchGetMessagesMessageIds: core.serialization.Schema<serializers.BatchGetMessagesMessageIds.Raw, AgentMail.BatchGetMessagesMessageIds>;
6
+ export declare namespace BatchGetMessagesMessageIds {
7
+ type Raw = MessageId.Raw[];
8
+ }
@@ -0,0 +1,40 @@
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.BatchGetMessagesMessageIds = void 0;
38
+ const core = __importStar(require("../../../../core/index.js"));
39
+ const MessageId_js_1 = require("./MessageId.js");
40
+ exports.BatchGetMessagesMessageIds = core.serialization.list(MessageId_js_1.MessageId);
@@ -0,0 +1,10 @@
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
+ import { BatchGetMessagesMessageIds } from "./BatchGetMessagesMessageIds.js";
5
+ export declare const BatchGetMessagesRequest: core.serialization.ObjectSchema<serializers.BatchGetMessagesRequest.Raw, AgentMail.BatchGetMessagesRequest>;
6
+ export declare namespace BatchGetMessagesRequest {
7
+ interface Raw {
8
+ message_ids: BatchGetMessagesMessageIds.Raw;
9
+ }
10
+ }
@@ -0,0 +1,42 @@
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.BatchGetMessagesRequest = void 0;
38
+ const core = __importStar(require("../../../../core/index.js"));
39
+ const BatchGetMessagesMessageIds_js_1 = require("./BatchGetMessagesMessageIds.js");
40
+ exports.BatchGetMessagesRequest = core.serialization.object({
41
+ messageIds: core.serialization.property("message_ids", BatchGetMessagesMessageIds_js_1.BatchGetMessagesMessageIds),
42
+ });
@@ -0,0 +1,14 @@
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
+ import { Count } from "../../../types/Count.js";
5
+ import { Limit } from "../../../types/Limit.js";
6
+ import { Message } from "./Message.js";
7
+ export declare const BatchGetMessagesResponse: core.serialization.ObjectSchema<serializers.BatchGetMessagesResponse.Raw, AgentMail.BatchGetMessagesResponse>;
8
+ export declare namespace BatchGetMessagesResponse {
9
+ interface Raw {
10
+ limit: Limit.Raw;
11
+ count: Count.Raw;
12
+ messages: Message.Raw[];
13
+ }
14
+ }
@@ -0,0 +1,46 @@
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.BatchGetMessagesResponse = void 0;
38
+ const core = __importStar(require("../../../../core/index.js"));
39
+ const Count_js_1 = require("../../../types/Count.js");
40
+ const Limit_js_1 = require("../../../types/Limit.js");
41
+ const Message_js_1 = require("./Message.js");
42
+ exports.BatchGetMessagesResponse = core.serialization.object({
43
+ limit: Limit_js_1.Limit,
44
+ count: Count_js_1.Count,
45
+ messages: core.serialization.list(Message_js_1.Message),
46
+ });
@@ -1,4 +1,7 @@
1
1
  export * from "./Addresses.js";
2
+ export * from "./BatchGetMessagesMessageIds.js";
3
+ export * from "./BatchGetMessagesRequest.js";
4
+ export * from "./BatchGetMessagesResponse.js";
2
5
  export * from "./ListMessagesResponse.js";
3
6
  export * from "./Message.js";
4
7
  export * from "./MessageAttachments.js";
@@ -15,6 +15,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./Addresses.js"), exports);
18
+ __exportStar(require("./BatchGetMessagesMessageIds.js"), exports);
19
+ __exportStar(require("./BatchGetMessagesRequest.js"), exports);
20
+ __exportStar(require("./BatchGetMessagesResponse.js"), exports);
18
21
  __exportStar(require("./ListMessagesResponse.js"), exports);
19
22
  __exportStar(require("./Message.js"), exports);
20
23
  __exportStar(require("./MessageAttachments.js"), exports);
@@ -1,6 +1,7 @@
1
1
  import type * as AgentMail from "../../../../api/index.js";
2
2
  import * as core from "../../../../core/index.js";
3
3
  import type * as serializers from "../../../index.js";
4
+ import { EventTypes } from "../../events/types/EventTypes.js";
4
5
  import { InboxIds } from "../../events/types/InboxIds.js";
5
6
  import { PodIds } from "../../events/types/PodIds.js";
6
7
  export declare const UpdateWebhookRequest: core.serialization.ObjectSchema<serializers.webhooks.UpdateWebhookRequest.Raw, AgentMail.webhooks.UpdateWebhookRequest>;
@@ -10,5 +11,6 @@ export declare namespace UpdateWebhookRequest {
10
11
  remove_inbox_ids?: InboxIds.Raw | null;
11
12
  add_pod_ids?: PodIds.Raw | null;
12
13
  remove_pod_ids?: PodIds.Raw | null;
14
+ event_types?: EventTypes.Raw | null;
13
15
  }
14
16
  }
@@ -36,6 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.UpdateWebhookRequest = void 0;
38
38
  const core = __importStar(require("../../../../core/index.js"));
39
+ const EventTypes_js_1 = require("../../events/types/EventTypes.js");
39
40
  const InboxIds_js_1 = require("../../events/types/InboxIds.js");
40
41
  const PodIds_js_1 = require("../../events/types/PodIds.js");
41
42
  exports.UpdateWebhookRequest = core.serialization.object({
@@ -43,4 +44,5 @@ exports.UpdateWebhookRequest = core.serialization.object({
43
44
  removeInboxIds: core.serialization.property("remove_inbox_ids", InboxIds_js_1.InboxIds.optional()),
44
45
  addPodIds: core.serialization.property("add_pod_ids", PodIds_js_1.PodIds.optional()),
45
46
  removePodIds: core.serialization.property("remove_pod_ids", PodIds_js_1.PodIds.optional()),
47
+ eventTypes: core.serialization.property("event_types", EventTypes_js_1.EventTypes.optional()),
46
48
  });
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.5.1";
1
+ export declare const SDK_VERSION = "0.5.3";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.5.1";
4
+ exports.SDK_VERSION = "0.5.3";
@@ -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.5.1",
10
- "User-Agent": "agentmail/0.5.1",
9
+ "X-Fern-SDK-Version": "0.5.3",
10
+ "User-Agent": "agentmail/0.5.3",
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);
@@ -6,4 +6,16 @@ export interface AgentSignupRequest {
6
6
  humanEmail: string;
7
7
  /** Username for the auto-created inbox (e.g. "my-agent" creates my-agent@agentmail.to). */
8
8
  username: string;
9
+ /**
10
+ * The SDK, framework, or platform issuing this sign-up (e.g. `agentmail-python`, `agentmail-cli`, `agentmail-mcp`).
11
+ * Identifies the caller — answers "who is signing up".
12
+ * Max 2048 characters.
13
+ */
14
+ source?: string;
15
+ /**
16
+ * The channel that drove this sign-up — where the agent or its developer discovered AgentMail
17
+ * (e.g. `agent.email`, a partner URL, a campaign tag). Answers "where did this sign-up come from".
18
+ * Max 2048 characters.
19
+ */
20
+ referrer?: string;
9
21
  }
@@ -44,6 +44,29 @@ export declare class MessagesClient {
44
44
  */
45
45
  get(inbox_id: AgentMail.inboxes.InboxId, message_id: AgentMail.MessageId, requestOptions?: MessagesClient.RequestOptions): core.HttpResponsePromise<AgentMail.Message>;
46
46
  private __get;
47
+ /**
48
+ * Fetch metadata for up to 500 messages in one request. Missing or
49
+ * restricted IDs are silently omitted; compare `count` against `limit`
50
+ * to detect misses.
51
+ *
52
+ * **CLI:**
53
+ * ```bash
54
+ * agentmail inboxes:messages batch-get --inbox-id <inbox_id> --message-id <id1> --message-id <id2>
55
+ * ```
56
+ *
57
+ * @param {AgentMail.inboxes.InboxId} inbox_id
58
+ * @param {AgentMail.BatchGetMessagesRequest} request
59
+ * @param {MessagesClient.RequestOptions} requestOptions - Request-specific configuration.
60
+ *
61
+ * @throws {@link AgentMail.ValidationError}
62
+ *
63
+ * @example
64
+ * await client.inboxes.messages.batchGet("inbox_id", {
65
+ * messageIds: ["message_ids", "message_ids"]
66
+ * })
67
+ */
68
+ batchGet(inbox_id: AgentMail.inboxes.InboxId, request: AgentMail.BatchGetMessagesRequest, requestOptions?: MessagesClient.RequestOptions): core.HttpResponsePromise<AgentMail.BatchGetMessagesResponse>;
69
+ private __batchGet;
47
70
  /**
48
71
  * **CLI:**
49
72
  * ```bash