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.
- 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/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/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/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/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/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/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/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/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/llms-full.txt +65 -24
- package/dist/llms.txt +184 -184
- package/package.json +1 -1
- package/reference.md +3 -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
|
|
@@ -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));
|
|
@@ -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);
|
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
|
|
@@ -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,
|
|
@@ -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.mjs";
|
|
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
|
}
|
|
@@ -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
|
}
|