agentmail 0.5.2 → 0.5.4
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/agent/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/agent/client/Client.js +1 -1
- package/dist/cjs/api/resources/agent/types/AgentSignupRequest.d.ts +12 -0
- package/dist/cjs/api/resources/inboxes/client/Client.d.ts +2 -3
- package/dist/cjs/api/resources/inboxes/client/Client.js +10 -3
- package/dist/cjs/api/resources/inboxes/types/CreateInboxRequest.d.ts +2 -0
- package/dist/cjs/api/resources/inboxes/types/Inbox.d.ts +2 -0
- package/dist/cjs/api/resources/inboxes/types/Metadata.d.ts +6 -0
- package/dist/cjs/api/resources/inboxes/types/Metadata.js +3 -0
- package/dist/cjs/api/resources/inboxes/types/MetadataValue.d.ts +4 -0
- package/dist/cjs/api/resources/inboxes/types/MetadataValue.js +3 -0
- package/dist/cjs/api/resources/inboxes/types/UpdateInboxRequest.d.ts +8 -1
- package/dist/cjs/api/resources/inboxes/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/inboxes/types/index.js +2 -0
- package/dist/cjs/api/resources/lists/types/ListEntryBase.d.ts +2 -0
- package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.d.ts +1 -3
- package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.js +1 -3
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/webhooks/client/Client.js +3 -0
- package/dist/cjs/api/resources/webhooks/types/CreateWebhookRequest.d.ts +5 -0
- package/dist/cjs/api/resources/webhooks/types/UpdateWebhookRequest.d.ts +9 -0
- package/dist/cjs/serialization/resources/agent/types/AgentSignupRequest.d.ts +2 -0
- package/dist/cjs/serialization/resources/agent/types/AgentSignupRequest.js +2 -0
- package/dist/cjs/serialization/resources/inboxes/types/CreateInboxRequest.d.ts +2 -0
- package/dist/cjs/serialization/resources/inboxes/types/CreateInboxRequest.js +2 -0
- package/dist/cjs/serialization/resources/inboxes/types/Inbox.d.ts +2 -0
- package/dist/cjs/serialization/resources/inboxes/types/Inbox.js +2 -0
- package/dist/cjs/serialization/resources/inboxes/types/Metadata.d.ts +8 -0
- package/dist/cjs/serialization/resources/inboxes/types/Metadata.js +40 -0
- package/dist/cjs/serialization/resources/inboxes/types/MetadataValue.d.ts +7 -0
- package/dist/cjs/serialization/resources/inboxes/types/MetadataValue.js +43 -0
- package/dist/cjs/serialization/resources/inboxes/types/UpdateInboxRequest.d.ts +3 -1
- package/dist/cjs/serialization/resources/inboxes/types/UpdateInboxRequest.js +3 -1
- package/dist/cjs/serialization/resources/inboxes/types/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/inboxes/types/index.js +2 -0
- package/dist/cjs/serialization/resources/lists/types/ListEntryBase.d.ts +1 -0
- package/dist/cjs/serialization/resources/lists/types/ListEntryBase.js +1 -0
- package/dist/cjs/serialization/resources/webhooks/types/UpdateWebhookRequest.d.ts +2 -0
- package/dist/cjs/serialization/resources/webhooks/types/UpdateWebhookRequest.js +2 -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/agent/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/agent/client/Client.mjs +1 -1
- package/dist/esm/api/resources/agent/types/AgentSignupRequest.d.mts +12 -0
- package/dist/esm/api/resources/inboxes/client/Client.d.mts +2 -3
- package/dist/esm/api/resources/inboxes/client/Client.mjs +10 -3
- package/dist/esm/api/resources/inboxes/types/CreateInboxRequest.d.mts +2 -0
- package/dist/esm/api/resources/inboxes/types/Inbox.d.mts +2 -0
- package/dist/esm/api/resources/inboxes/types/Metadata.d.mts +6 -0
- package/dist/esm/api/resources/inboxes/types/Metadata.mjs +2 -0
- package/dist/esm/api/resources/inboxes/types/MetadataValue.d.mts +4 -0
- package/dist/esm/api/resources/inboxes/types/MetadataValue.mjs +2 -0
- package/dist/esm/api/resources/inboxes/types/UpdateInboxRequest.d.mts +8 -1
- package/dist/esm/api/resources/inboxes/types/index.d.mts +2 -0
- package/dist/esm/api/resources/inboxes/types/index.mjs +2 -0
- package/dist/esm/api/resources/lists/types/ListEntryBase.d.mts +2 -0
- package/dist/esm/api/resources/pods/resources/inboxes/client/Client.d.mts +1 -3
- package/dist/esm/api/resources/pods/resources/inboxes/client/Client.mjs +1 -3
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/webhooks/client/Client.mjs +3 -0
- package/dist/esm/api/resources/webhooks/types/CreateWebhookRequest.d.mts +5 -0
- package/dist/esm/api/resources/webhooks/types/UpdateWebhookRequest.d.mts +9 -0
- package/dist/esm/serialization/resources/agent/types/AgentSignupRequest.d.mts +2 -0
- package/dist/esm/serialization/resources/agent/types/AgentSignupRequest.mjs +2 -0
- package/dist/esm/serialization/resources/inboxes/types/CreateInboxRequest.d.mts +2 -0
- package/dist/esm/serialization/resources/inboxes/types/CreateInboxRequest.mjs +2 -0
- package/dist/esm/serialization/resources/inboxes/types/Inbox.d.mts +2 -0
- package/dist/esm/serialization/resources/inboxes/types/Inbox.mjs +2 -0
- package/dist/esm/serialization/resources/inboxes/types/Metadata.d.mts +8 -0
- package/dist/esm/serialization/resources/inboxes/types/Metadata.mjs +4 -0
- package/dist/esm/serialization/resources/inboxes/types/MetadataValue.d.mts +7 -0
- package/dist/esm/serialization/resources/inboxes/types/MetadataValue.mjs +7 -0
- package/dist/esm/serialization/resources/inboxes/types/UpdateInboxRequest.d.mts +3 -1
- package/dist/esm/serialization/resources/inboxes/types/UpdateInboxRequest.mjs +3 -1
- package/dist/esm/serialization/resources/inboxes/types/index.d.mts +2 -0
- package/dist/esm/serialization/resources/inboxes/types/index.mjs +2 -0
- package/dist/esm/serialization/resources/lists/types/ListEntryBase.d.mts +1 -0
- package/dist/esm/serialization/resources/lists/types/ListEntryBase.mjs +1 -0
- package/dist/esm/serialization/resources/webhooks/types/UpdateWebhookRequest.d.mts +2 -0
- package/dist/esm/serialization/resources/webhooks/types/UpdateWebhookRequest.mjs +2 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/llms-full.txt +6877 -7046
- package/dist/llms.txt +192 -183
- package/package.json +1 -1
- package/reference.md +6 -7
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.5.
|
|
47
|
-
"User-Agent": "agentmail/0.5.
|
|
46
|
+
"X-Fern-SDK-Version": "0.5.4",
|
|
47
|
+
"User-Agent": "agentmail/0.5.4",
|
|
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);
|
|
@@ -42,7 +42,7 @@ export declare class AgentClient {
|
|
|
42
42
|
*
|
|
43
43
|
* On success, the organization is upgraded from `agent_unverified` to `agent_verified`, the send allowlist is removed, and free plan entitlements are applied.
|
|
44
44
|
*
|
|
45
|
-
* The OTP expires after 24 hours and allows a maximum of 10 attempts.
|
|
45
|
+
* The OTP expires after 24 hours and allows a maximum of 10 attempts. If you run into any difficulties receiving the OTP code, you can also create an account on [console.agentmail.to](https://console.agentmail.to) using the human email address you provided to verify your account.
|
|
46
46
|
*
|
|
47
47
|
* **CLI:**
|
|
48
48
|
* ```bash
|
|
@@ -144,7 +144,7 @@ class AgentClient {
|
|
|
144
144
|
*
|
|
145
145
|
* On success, the organization is upgraded from `agent_unverified` to `agent_verified`, the send allowlist is removed, and free plan entitlements are applied.
|
|
146
146
|
*
|
|
147
|
-
* The OTP expires after 24 hours and allows a maximum of 10 attempts.
|
|
147
|
+
* The OTP expires after 24 hours and allows a maximum of 10 attempts. If you run into any difficulties receiving the OTP code, you can also create an account on [console.agentmail.to](https://console.agentmail.to) using the human email address you provided to verify your account.
|
|
148
148
|
*
|
|
149
149
|
* **CLI:**
|
|
150
150
|
* ```bash
|
|
@@ -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
|
}
|
|
@@ -88,11 +88,10 @@ export declare class InboxesClient {
|
|
|
88
88
|
* @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
89
89
|
*
|
|
90
90
|
* @throws {@link AgentMail.NotFoundError}
|
|
91
|
+
* @throws {@link AgentMail.ValidationError}
|
|
91
92
|
*
|
|
92
93
|
* @example
|
|
93
|
-
* await client.inboxes.update("inbox_id", {
|
|
94
|
-
* displayName: "display_name"
|
|
95
|
-
* })
|
|
94
|
+
* await client.inboxes.update("inbox_id", {})
|
|
96
95
|
*/
|
|
97
96
|
update(inbox_id: AgentMail.inboxes.InboxId, request: AgentMail.inboxes.UpdateInboxRequest, requestOptions?: InboxesClient.RequestOptions): core.HttpResponsePromise<AgentMail.inboxes.Inbox>;
|
|
98
97
|
private __update;
|
|
@@ -302,11 +302,10 @@ class InboxesClient {
|
|
|
302
302
|
* @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
303
303
|
*
|
|
304
304
|
* @throws {@link AgentMail.NotFoundError}
|
|
305
|
+
* @throws {@link AgentMail.ValidationError}
|
|
305
306
|
*
|
|
306
307
|
* @example
|
|
307
|
-
* await client.inboxes.update("inbox_id", {
|
|
308
|
-
* displayName: "display_name"
|
|
309
|
-
* })
|
|
308
|
+
* await client.inboxes.update("inbox_id", {})
|
|
310
309
|
*/
|
|
311
310
|
update(inbox_id, request, requestOptions) {
|
|
312
311
|
return core.HttpResponsePromise.fromPromise(this.__update(inbox_id, request, requestOptions));
|
|
@@ -356,6 +355,14 @@ class InboxesClient {
|
|
|
356
355
|
skipValidation: true,
|
|
357
356
|
breadcrumbsPrefix: ["response"],
|
|
358
357
|
}), _response.rawResponse);
|
|
358
|
+
case 400:
|
|
359
|
+
throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
|
|
360
|
+
unrecognizedObjectKeys: "passthrough",
|
|
361
|
+
allowUnrecognizedUnionMembers: true,
|
|
362
|
+
allowUnrecognizedEnumValues: true,
|
|
363
|
+
skipValidation: true,
|
|
364
|
+
breadcrumbsPrefix: ["response"],
|
|
365
|
+
}), _response.rawResponse);
|
|
359
366
|
default:
|
|
360
367
|
throw new errors.AgentMailError({
|
|
361
368
|
statusCode: _response.error.statusCode,
|
|
@@ -5,6 +5,8 @@ export interface Inbox {
|
|
|
5
5
|
email: AgentMail.inboxes.Email;
|
|
6
6
|
displayName?: AgentMail.inboxes.DisplayName;
|
|
7
7
|
clientId?: AgentMail.inboxes.ClientId;
|
|
8
|
+
/** Custom metadata attached to the inbox. */
|
|
9
|
+
metadata?: AgentMail.inboxes.Metadata;
|
|
8
10
|
/** Time at which inbox was last updated. */
|
|
9
11
|
updatedAt: Date;
|
|
10
12
|
/** Time at which inbox was created. */
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import type * as AgentMail from "../../../index.js";
|
|
2
2
|
export interface UpdateInboxRequest {
|
|
3
|
-
displayName
|
|
3
|
+
displayName?: AgentMail.inboxes.DisplayName;
|
|
4
|
+
/**
|
|
5
|
+
* Metadata to merge into the inbox's existing metadata. Keys you include
|
|
6
|
+
* are added or overwritten; keys you omit are left unchanged. To remove a
|
|
7
|
+
* single key, send it with a null value. To clear all metadata, send
|
|
8
|
+
* `metadata` as null. Provide at least one of `display_name` or `metadata`.
|
|
9
|
+
*/
|
|
10
|
+
metadata?: AgentMail.inboxes.Metadata;
|
|
4
11
|
}
|
|
@@ -21,4 +21,6 @@ __exportStar(require("./Email.js"), exports);
|
|
|
21
21
|
__exportStar(require("./Inbox.js"), exports);
|
|
22
22
|
__exportStar(require("./InboxId.js"), exports);
|
|
23
23
|
__exportStar(require("./ListInboxesResponse.js"), exports);
|
|
24
|
+
__exportStar(require("./Metadata.js"), exports);
|
|
25
|
+
__exportStar(require("./MetadataValue.js"), exports);
|
|
24
26
|
__exportStar(require("./UpdateInboxRequest.js"), exports);
|
|
@@ -75,9 +75,7 @@ export declare class InboxesClient {
|
|
|
75
75
|
* @throws {@link AgentMail.NotFoundError}
|
|
76
76
|
*
|
|
77
77
|
* @example
|
|
78
|
-
* await client.pods.inboxes.update("pod_id", "inbox_id", {
|
|
79
|
-
* displayName: "display_name"
|
|
80
|
-
* })
|
|
78
|
+
* await client.pods.inboxes.update("pod_id", "inbox_id", {})
|
|
81
79
|
*/
|
|
82
80
|
update(pod_id: AgentMail.pods.PodId, inbox_id: AgentMail.inboxes.InboxId, request: AgentMail.inboxes.UpdateInboxRequest, requestOptions?: InboxesClient.RequestOptions): core.HttpResponsePromise<AgentMail.inboxes.Inbox>;
|
|
83
81
|
private __update;
|
|
@@ -286,9 +286,7 @@ class InboxesClient {
|
|
|
286
286
|
* @throws {@link AgentMail.NotFoundError}
|
|
287
287
|
*
|
|
288
288
|
* @example
|
|
289
|
-
* await client.pods.inboxes.update("pod_id", "inbox_id", {
|
|
290
|
-
* displayName: "display_name"
|
|
291
|
-
* })
|
|
289
|
+
* await client.pods.inboxes.update("pod_id", "inbox_id", {})
|
|
292
290
|
*/
|
|
293
291
|
update(pod_id, inbox_id, request, requestOptions) {
|
|
294
292
|
return core.HttpResponsePromise.fromPromise(this.__update(pod_id, inbox_id, request, requestOptions));
|
|
@@ -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
|
}
|
|
@@ -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
|
});
|
|
@@ -3,6 +3,7 @@ import * as core from "../../../../core/index.js";
|
|
|
3
3
|
import type * as serializers from "../../../index.js";
|
|
4
4
|
import { ClientId } from "./ClientId.js";
|
|
5
5
|
import { DisplayName } from "./DisplayName.js";
|
|
6
|
+
import { Metadata } from "./Metadata.js";
|
|
6
7
|
export declare const CreateInboxRequest: core.serialization.ObjectSchema<serializers.inboxes.CreateInboxRequest.Raw, AgentMail.inboxes.CreateInboxRequest>;
|
|
7
8
|
export declare namespace CreateInboxRequest {
|
|
8
9
|
interface Raw {
|
|
@@ -10,5 +11,6 @@ export declare namespace CreateInboxRequest {
|
|
|
10
11
|
domain?: string | null;
|
|
11
12
|
display_name?: DisplayName.Raw | null;
|
|
12
13
|
client_id?: ClientId.Raw | null;
|
|
14
|
+
metadata?: Metadata.Raw | null;
|
|
13
15
|
}
|
|
14
16
|
}
|
|
@@ -38,9 +38,11 @@ exports.CreateInboxRequest = void 0;
|
|
|
38
38
|
const core = __importStar(require("../../../../core/index.js"));
|
|
39
39
|
const ClientId_js_1 = require("./ClientId.js");
|
|
40
40
|
const DisplayName_js_1 = require("./DisplayName.js");
|
|
41
|
+
const Metadata_js_1 = require("./Metadata.js");
|
|
41
42
|
exports.CreateInboxRequest = core.serialization.object({
|
|
42
43
|
username: core.serialization.string().optional(),
|
|
43
44
|
domain: core.serialization.string().optional(),
|
|
44
45
|
displayName: core.serialization.property("display_name", DisplayName_js_1.DisplayName.optional()),
|
|
45
46
|
clientId: core.serialization.property("client_id", ClientId_js_1.ClientId.optional()),
|
|
47
|
+
metadata: Metadata_js_1.Metadata.optional(),
|
|
46
48
|
});
|
|
@@ -6,6 +6,7 @@ import { ClientId } from "./ClientId.js";
|
|
|
6
6
|
import { DisplayName } from "./DisplayName.js";
|
|
7
7
|
import { Email } from "./Email.js";
|
|
8
8
|
import { InboxId } from "./InboxId.js";
|
|
9
|
+
import { Metadata } from "./Metadata.js";
|
|
9
10
|
export declare const Inbox: core.serialization.ObjectSchema<serializers.inboxes.Inbox.Raw, AgentMail.inboxes.Inbox>;
|
|
10
11
|
export declare namespace Inbox {
|
|
11
12
|
interface Raw {
|
|
@@ -14,6 +15,7 @@ export declare namespace Inbox {
|
|
|
14
15
|
email: Email.Raw;
|
|
15
16
|
display_name?: DisplayName.Raw | null;
|
|
16
17
|
client_id?: ClientId.Raw | null;
|
|
18
|
+
metadata?: Metadata.Raw | null;
|
|
17
19
|
updated_at: string;
|
|
18
20
|
created_at: string;
|
|
19
21
|
}
|
|
@@ -41,12 +41,14 @@ const ClientId_js_1 = require("./ClientId.js");
|
|
|
41
41
|
const DisplayName_js_1 = require("./DisplayName.js");
|
|
42
42
|
const Email_js_1 = require("./Email.js");
|
|
43
43
|
const InboxId_js_1 = require("./InboxId.js");
|
|
44
|
+
const Metadata_js_1 = require("./Metadata.js");
|
|
44
45
|
exports.Inbox = core.serialization.object({
|
|
45
46
|
podId: core.serialization.property("pod_id", PodId_js_1.PodId),
|
|
46
47
|
inboxId: core.serialization.property("inbox_id", InboxId_js_1.InboxId),
|
|
47
48
|
email: Email_js_1.Email,
|
|
48
49
|
displayName: core.serialization.property("display_name", DisplayName_js_1.DisplayName.optional()),
|
|
49
50
|
clientId: core.serialization.property("client_id", ClientId_js_1.ClientId.optional()),
|
|
51
|
+
metadata: Metadata_js_1.Metadata.optional(),
|
|
50
52
|
updatedAt: core.serialization.property("updated_at", core.serialization.date()),
|
|
51
53
|
createdAt: core.serialization.property("created_at", core.serialization.date()),
|
|
52
54
|
});
|
|
@@ -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 { MetadataValue } from "./MetadataValue.js";
|
|
5
|
+
export declare const Metadata: core.serialization.Schema<serializers.inboxes.Metadata.Raw, AgentMail.inboxes.Metadata>;
|
|
6
|
+
export declare namespace Metadata {
|
|
7
|
+
type Raw = Record<string, MetadataValue.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.Metadata = void 0;
|
|
38
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
39
|
+
const MetadataValue_js_1 = require("./MetadataValue.js");
|
|
40
|
+
exports.Metadata = core.serialization.record(core.serialization.string(), MetadataValue_js_1.MetadataValue);
|
|
@@ -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 MetadataValue: core.serialization.Schema<serializers.inboxes.MetadataValue.Raw, AgentMail.inboxes.MetadataValue>;
|
|
5
|
+
export declare namespace MetadataValue {
|
|
6
|
+
type Raw = string | number | boolean;
|
|
7
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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.MetadataValue = void 0;
|
|
38
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
39
|
+
exports.MetadataValue = core.serialization.undiscriminatedUnion([
|
|
40
|
+
core.serialization.string(),
|
|
41
|
+
core.serialization.number(),
|
|
42
|
+
core.serialization.boolean(),
|
|
43
|
+
]);
|
|
@@ -2,9 +2,11 @@ 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
4
|
import { DisplayName } from "./DisplayName.js";
|
|
5
|
+
import { Metadata } from "./Metadata.js";
|
|
5
6
|
export declare const UpdateInboxRequest: core.serialization.ObjectSchema<serializers.inboxes.UpdateInboxRequest.Raw, AgentMail.inboxes.UpdateInboxRequest>;
|
|
6
7
|
export declare namespace UpdateInboxRequest {
|
|
7
8
|
interface Raw {
|
|
8
|
-
display_name
|
|
9
|
+
display_name?: DisplayName.Raw | null;
|
|
10
|
+
metadata?: Metadata.Raw | null;
|
|
9
11
|
}
|
|
10
12
|
}
|
|
@@ -37,6 +37,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
37
37
|
exports.UpdateInboxRequest = void 0;
|
|
38
38
|
const core = __importStar(require("../../../../core/index.js"));
|
|
39
39
|
const DisplayName_js_1 = require("./DisplayName.js");
|
|
40
|
+
const Metadata_js_1 = require("./Metadata.js");
|
|
40
41
|
exports.UpdateInboxRequest = core.serialization.object({
|
|
41
|
-
displayName: core.serialization.property("display_name", DisplayName_js_1.DisplayName),
|
|
42
|
+
displayName: core.serialization.property("display_name", DisplayName_js_1.DisplayName.optional()),
|
|
43
|
+
metadata: Metadata_js_1.Metadata.optional(),
|
|
42
44
|
});
|
|
@@ -21,4 +21,6 @@ __exportStar(require("./Email.js"), exports);
|
|
|
21
21
|
__exportStar(require("./Inbox.js"), exports);
|
|
22
22
|
__exportStar(require("./InboxId.js"), exports);
|
|
23
23
|
__exportStar(require("./ListInboxesResponse.js"), exports);
|
|
24
|
+
__exportStar(require("./Metadata.js"), exports);
|
|
25
|
+
__exportStar(require("./MetadataValue.js"), exports);
|
|
24
26
|
__exportStar(require("./UpdateInboxRequest.js"), exports);
|
|
@@ -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
|
});
|
|
@@ -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
|
});
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.5.
|
|
1
|
+
export declare const SDK_VERSION = "0.5.4";
|
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.5.
|
|
10
|
-
"User-Agent": "agentmail/0.5.
|
|
9
|
+
"X-Fern-SDK-Version": "0.5.4",
|
|
10
|
+
"User-Agent": "agentmail/0.5.4",
|
|
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);
|
|
@@ -42,7 +42,7 @@ export declare class AgentClient {
|
|
|
42
42
|
*
|
|
43
43
|
* On success, the organization is upgraded from `agent_unverified` to `agent_verified`, the send allowlist is removed, and free plan entitlements are applied.
|
|
44
44
|
*
|
|
45
|
-
* The OTP expires after 24 hours and allows a maximum of 10 attempts.
|
|
45
|
+
* The OTP expires after 24 hours and allows a maximum of 10 attempts. If you run into any difficulties receiving the OTP code, you can also create an account on [console.agentmail.to](https://console.agentmail.to) using the human email address you provided to verify your account.
|
|
46
46
|
*
|
|
47
47
|
* **CLI:**
|
|
48
48
|
* ```bash
|
|
@@ -108,7 +108,7 @@ export class AgentClient {
|
|
|
108
108
|
*
|
|
109
109
|
* On success, the organization is upgraded from `agent_unverified` to `agent_verified`, the send allowlist is removed, and free plan entitlements are applied.
|
|
110
110
|
*
|
|
111
|
-
* The OTP expires after 24 hours and allows a maximum of 10 attempts.
|
|
111
|
+
* The OTP expires after 24 hours and allows a maximum of 10 attempts. If you run into any difficulties receiving the OTP code, you can also create an account on [console.agentmail.to](https://console.agentmail.to) using the human email address you provided to verify your account.
|
|
112
112
|
*
|
|
113
113
|
* **CLI:**
|
|
114
114
|
* ```bash
|
|
@@ -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
|
}
|
|
@@ -88,11 +88,10 @@ export declare class InboxesClient {
|
|
|
88
88
|
* @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
89
89
|
*
|
|
90
90
|
* @throws {@link AgentMail.NotFoundError}
|
|
91
|
+
* @throws {@link AgentMail.ValidationError}
|
|
91
92
|
*
|
|
92
93
|
* @example
|
|
93
|
-
* await client.inboxes.update("inbox_id", {
|
|
94
|
-
* displayName: "display_name"
|
|
95
|
-
* })
|
|
94
|
+
* await client.inboxes.update("inbox_id", {})
|
|
96
95
|
*/
|
|
97
96
|
update(inbox_id: AgentMail.inboxes.InboxId, request: AgentMail.inboxes.UpdateInboxRequest, requestOptions?: InboxesClient.RequestOptions): core.HttpResponsePromise<AgentMail.inboxes.Inbox>;
|
|
98
97
|
private __update;
|