agentmail 0.5.3 → 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.
Files changed (64) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/agent/client/Client.d.ts +1 -1
  3. package/dist/cjs/api/resources/agent/client/Client.js +1 -1
  4. package/dist/cjs/api/resources/inboxes/client/Client.d.ts +2 -3
  5. package/dist/cjs/api/resources/inboxes/client/Client.js +10 -3
  6. package/dist/cjs/api/resources/inboxes/types/CreateInboxRequest.d.ts +2 -0
  7. package/dist/cjs/api/resources/inboxes/types/Inbox.d.ts +2 -0
  8. package/dist/cjs/api/resources/inboxes/types/Metadata.d.ts +6 -0
  9. package/dist/cjs/api/resources/inboxes/types/Metadata.js +3 -0
  10. package/dist/cjs/api/resources/inboxes/types/MetadataValue.d.ts +4 -0
  11. package/dist/cjs/api/resources/inboxes/types/MetadataValue.js +3 -0
  12. package/dist/cjs/api/resources/inboxes/types/UpdateInboxRequest.d.ts +8 -1
  13. package/dist/cjs/api/resources/inboxes/types/index.d.ts +2 -0
  14. package/dist/cjs/api/resources/inboxes/types/index.js +2 -0
  15. package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.d.ts +1 -3
  16. package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.js +1 -3
  17. package/dist/cjs/serialization/resources/inboxes/types/CreateInboxRequest.d.ts +2 -0
  18. package/dist/cjs/serialization/resources/inboxes/types/CreateInboxRequest.js +2 -0
  19. package/dist/cjs/serialization/resources/inboxes/types/Inbox.d.ts +2 -0
  20. package/dist/cjs/serialization/resources/inboxes/types/Inbox.js +2 -0
  21. package/dist/cjs/serialization/resources/inboxes/types/Metadata.d.ts +8 -0
  22. package/dist/cjs/serialization/resources/inboxes/types/Metadata.js +40 -0
  23. package/dist/cjs/serialization/resources/inboxes/types/MetadataValue.d.ts +7 -0
  24. package/dist/cjs/serialization/resources/inboxes/types/MetadataValue.js +43 -0
  25. package/dist/cjs/serialization/resources/inboxes/types/UpdateInboxRequest.d.ts +3 -1
  26. package/dist/cjs/serialization/resources/inboxes/types/UpdateInboxRequest.js +3 -1
  27. package/dist/cjs/serialization/resources/inboxes/types/index.d.ts +2 -0
  28. package/dist/cjs/serialization/resources/inboxes/types/index.js +2 -0
  29. package/dist/cjs/version.d.ts +1 -1
  30. package/dist/cjs/version.js +1 -1
  31. package/dist/esm/BaseClient.mjs +2 -2
  32. package/dist/esm/api/resources/agent/client/Client.d.mts +1 -1
  33. package/dist/esm/api/resources/agent/client/Client.mjs +1 -1
  34. package/dist/esm/api/resources/inboxes/client/Client.d.mts +2 -3
  35. package/dist/esm/api/resources/inboxes/client/Client.mjs +10 -3
  36. package/dist/esm/api/resources/inboxes/types/CreateInboxRequest.d.mts +2 -0
  37. package/dist/esm/api/resources/inboxes/types/Inbox.d.mts +2 -0
  38. package/dist/esm/api/resources/inboxes/types/Metadata.d.mts +6 -0
  39. package/dist/esm/api/resources/inboxes/types/Metadata.mjs +2 -0
  40. package/dist/esm/api/resources/inboxes/types/MetadataValue.d.mts +4 -0
  41. package/dist/esm/api/resources/inboxes/types/MetadataValue.mjs +2 -0
  42. package/dist/esm/api/resources/inboxes/types/UpdateInboxRequest.d.mts +8 -1
  43. package/dist/esm/api/resources/inboxes/types/index.d.mts +2 -0
  44. package/dist/esm/api/resources/inboxes/types/index.mjs +2 -0
  45. package/dist/esm/api/resources/pods/resources/inboxes/client/Client.d.mts +1 -3
  46. package/dist/esm/api/resources/pods/resources/inboxes/client/Client.mjs +1 -3
  47. package/dist/esm/serialization/resources/inboxes/types/CreateInboxRequest.d.mts +2 -0
  48. package/dist/esm/serialization/resources/inboxes/types/CreateInboxRequest.mjs +2 -0
  49. package/dist/esm/serialization/resources/inboxes/types/Inbox.d.mts +2 -0
  50. package/dist/esm/serialization/resources/inboxes/types/Inbox.mjs +2 -0
  51. package/dist/esm/serialization/resources/inboxes/types/Metadata.d.mts +8 -0
  52. package/dist/esm/serialization/resources/inboxes/types/Metadata.mjs +4 -0
  53. package/dist/esm/serialization/resources/inboxes/types/MetadataValue.d.mts +7 -0
  54. package/dist/esm/serialization/resources/inboxes/types/MetadataValue.mjs +7 -0
  55. package/dist/esm/serialization/resources/inboxes/types/UpdateInboxRequest.d.mts +3 -1
  56. package/dist/esm/serialization/resources/inboxes/types/UpdateInboxRequest.mjs +3 -1
  57. package/dist/esm/serialization/resources/inboxes/types/index.d.mts +2 -0
  58. package/dist/esm/serialization/resources/inboxes/types/index.mjs +2 -0
  59. package/dist/esm/version.d.mts +1 -1
  60. package/dist/esm/version.mjs +1 -1
  61. package/dist/llms-full.txt +65 -24
  62. package/dist/llms.txt +184 -184
  63. package/package.json +1 -1
  64. package/reference.md +3 -7
@@ -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.3",
47
- "User-Agent": "agentmail/0.5.3",
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
@@ -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,
@@ -6,4 +6,6 @@ export interface CreateInboxRequest {
6
6
  domain?: string;
7
7
  displayName?: AgentMail.inboxes.DisplayName;
8
8
  clientId?: AgentMail.inboxes.ClientId;
9
+ /** Custom metadata to attach to the inbox. */
10
+ metadata?: AgentMail.inboxes.Metadata;
9
11
  }
@@ -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. */
@@ -0,0 +1,6 @@
1
+ import type * as AgentMail from "../../../index.js";
2
+ /**
3
+ * Custom key-value pairs attached to the inbox. Up to 256 keys. Keys and
4
+ * string values are each limited to 256 characters.
5
+ */
6
+ export type Metadata = Record<string, AgentMail.inboxes.MetadataValue>;
@@ -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
+ /**
2
+ * A metadata value. May be a string, number, or boolean.
3
+ */
4
+ export type MetadataValue = string | number | boolean;
@@ -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,11 @@
1
1
  import type * as AgentMail from "../../../index.js";
2
2
  export interface UpdateInboxRequest {
3
- displayName: AgentMail.inboxes.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
  }
@@ -5,4 +5,6 @@ export * from "./Email.js";
5
5
  export * from "./Inbox.js";
6
6
  export * from "./InboxId.js";
7
7
  export * from "./ListInboxesResponse.js";
8
+ export * from "./Metadata.js";
9
+ export * from "./MetadataValue.js";
8
10
  export * from "./UpdateInboxRequest.js";
@@ -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));
@@ -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: DisplayName.Raw;
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
  });
@@ -5,4 +5,6 @@ export * from "./Email.js";
5
5
  export * from "./Inbox.js";
6
6
  export * from "./InboxId.js";
7
7
  export * from "./ListInboxesResponse.js";
8
+ export * from "./Metadata.js";
9
+ export * from "./MetadataValue.js";
8
10
  export * from "./UpdateInboxRequest.js";
@@ -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);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.5.3";
1
+ export declare const SDK_VERSION = "0.5.4";
@@ -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.3";
4
+ exports.SDK_VERSION = "0.5.4";
@@ -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.3",
10
- "User-Agent": "agentmail/0.5.3",
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
@@ -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;
@@ -266,11 +266,10 @@ export class InboxesClient {
266
266
  * @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
267
267
  *
268
268
  * @throws {@link AgentMail.NotFoundError}
269
+ * @throws {@link AgentMail.ValidationError}
269
270
  *
270
271
  * @example
271
- * await client.inboxes.update("inbox_id", {
272
- * displayName: "display_name"
273
- * })
272
+ * await client.inboxes.update("inbox_id", {})
274
273
  */
275
274
  update(inbox_id, request, requestOptions) {
276
275
  return core.HttpResponsePromise.fromPromise(this.__update(inbox_id, request, requestOptions));
@@ -320,6 +319,14 @@ export class InboxesClient {
320
319
  skipValidation: true,
321
320
  breadcrumbsPrefix: ["response"],
322
321
  }), _response.rawResponse);
322
+ case 400:
323
+ throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
324
+ unrecognizedObjectKeys: "passthrough",
325
+ allowUnrecognizedUnionMembers: true,
326
+ allowUnrecognizedEnumValues: true,
327
+ skipValidation: true,
328
+ breadcrumbsPrefix: ["response"],
329
+ }), _response.rawResponse);
323
330
  default:
324
331
  throw new errors.AgentMailError({
325
332
  statusCode: _response.error.statusCode,
@@ -6,4 +6,6 @@ export interface CreateInboxRequest {
6
6
  domain?: string;
7
7
  displayName?: AgentMail.inboxes.DisplayName;
8
8
  clientId?: AgentMail.inboxes.ClientId;
9
+ /** Custom metadata to attach to the inbox. */
10
+ metadata?: AgentMail.inboxes.Metadata;
9
11
  }
@@ -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. */
@@ -0,0 +1,6 @@
1
+ import type * as AgentMail from "../../../index.mjs";
2
+ /**
3
+ * Custom key-value pairs attached to the inbox. Up to 256 keys. Keys and
4
+ * string values are each limited to 256 characters.
5
+ */
6
+ export type Metadata = Record<string, AgentMail.inboxes.MetadataValue>;
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ /**
2
+ * A metadata value. May be a string, number, or boolean.
3
+ */
4
+ export type MetadataValue = string | number | boolean;
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,4 +1,11 @@
1
1
  import type * as AgentMail from "../../../index.mjs";
2
2
  export interface UpdateInboxRequest {
3
- displayName: AgentMail.inboxes.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
  }
@@ -5,4 +5,6 @@ export * from "./Email.mjs";
5
5
  export * from "./Inbox.mjs";
6
6
  export * from "./InboxId.mjs";
7
7
  export * from "./ListInboxesResponse.mjs";
8
+ export * from "./Metadata.mjs";
9
+ export * from "./MetadataValue.mjs";
8
10
  export * from "./UpdateInboxRequest.mjs";
@@ -5,4 +5,6 @@ export * from "./Email.mjs";
5
5
  export * from "./Inbox.mjs";
6
6
  export * from "./InboxId.mjs";
7
7
  export * from "./ListInboxesResponse.mjs";
8
+ export * from "./Metadata.mjs";
9
+ export * from "./MetadataValue.mjs";
8
10
  export * from "./UpdateInboxRequest.mjs";
@@ -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;
@@ -250,9 +250,7 @@ export class InboxesClient {
250
250
  * @throws {@link AgentMail.NotFoundError}
251
251
  *
252
252
  * @example
253
- * await client.pods.inboxes.update("pod_id", "inbox_id", {
254
- * displayName: "display_name"
255
- * })
253
+ * await client.pods.inboxes.update("pod_id", "inbox_id", {})
256
254
  */
257
255
  update(pod_id, inbox_id, request, requestOptions) {
258
256
  return core.HttpResponsePromise.fromPromise(this.__update(pod_id, inbox_id, request, requestOptions));
@@ -3,6 +3,7 @@ import * as core from "../../../../core/index.mjs";
3
3
  import type * as serializers from "../../../index.mjs";
4
4
  import { ClientId } from "./ClientId.mjs";
5
5
  import { DisplayName } from "./DisplayName.mjs";
6
+ import { Metadata } from "./Metadata.mjs";
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
  }
@@ -2,9 +2,11 @@
2
2
  import * as core from "../../../../core/index.mjs";
3
3
  import { ClientId } from "./ClientId.mjs";
4
4
  import { DisplayName } from "./DisplayName.mjs";
5
+ import { Metadata } from "./Metadata.mjs";
5
6
  export const CreateInboxRequest = core.serialization.object({
6
7
  username: core.serialization.string().optional(),
7
8
  domain: core.serialization.string().optional(),
8
9
  displayName: core.serialization.property("display_name", DisplayName.optional()),
9
10
  clientId: core.serialization.property("client_id", ClientId.optional()),
11
+ metadata: Metadata.optional(),
10
12
  });
@@ -6,6 +6,7 @@ import { ClientId } from "./ClientId.mjs";
6
6
  import { DisplayName } from "./DisplayName.mjs";
7
7
  import { Email } from "./Email.mjs";
8
8
  import { InboxId } from "./InboxId.mjs";
9
+ import { Metadata } from "./Metadata.mjs";
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
  }