agentmail 0.5.35 → 0.5.37
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/apps/client/Client.d.ts +14 -11
- package/dist/cjs/api/resources/apps/client/Client.js +21 -12
- package/dist/cjs/api/resources/apps/client/requests/ListAppsRequest.d.ts +2 -0
- package/dist/cjs/api/resources/apps/types/App.d.ts +4 -0
- package/dist/cjs/api/resources/apps/types/AppCategory.d.ts +20 -0
- package/dist/cjs/api/resources/apps/types/AppCategory.js +23 -0
- package/dist/cjs/api/resources/apps/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/apps/types/index.js +1 -0
- package/dist/cjs/api/resources/inboxes/client/Client.d.ts +4 -0
- package/dist/cjs/api/resources/inboxes/client/Client.js +12 -0
- package/dist/cjs/api/resources/inboxes/types/CreateInboxRequest.d.ts +2 -0
- package/dist/cjs/api/resources/inboxes/types/Inbox.d.ts +6 -0
- package/dist/cjs/api/resources/inboxes/types/InboxStatus.d.ts +11 -0
- package/dist/cjs/api/resources/inboxes/types/InboxStatus.js +14 -0
- package/dist/cjs/api/resources/inboxes/types/UpdateInboxRequest.d.ts +8 -2
- package/dist/cjs/api/resources/inboxes/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/types/index.js +1 -0
- package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.js +9 -0
- package/dist/cjs/serialization/resources/apps/types/App.d.ts +3 -0
- package/dist/cjs/serialization/resources/apps/types/App.js +3 -0
- package/dist/cjs/serialization/resources/apps/types/AppCategory.d.ts +7 -0
- package/dist/cjs/serialization/resources/apps/types/AppCategory.js +56 -0
- package/dist/cjs/serialization/resources/apps/types/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/apps/types/index.js +1 -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/InboxStatus.d.ts +7 -0
- package/dist/cjs/serialization/resources/inboxes/types/InboxStatus.js +39 -0
- package/dist/cjs/serialization/resources/inboxes/types/UpdateInboxRequest.d.ts +2 -0
- package/dist/cjs/serialization/resources/inboxes/types/UpdateInboxRequest.js +2 -0
- package/dist/cjs/serialization/resources/inboxes/types/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/inboxes/types/index.js +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/agent/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/agent/client/Client.mjs +1 -1
- package/dist/esm/api/resources/apps/client/Client.d.mts +14 -11
- package/dist/esm/api/resources/apps/client/Client.mjs +21 -12
- package/dist/esm/api/resources/apps/client/requests/ListAppsRequest.d.mts +2 -0
- package/dist/esm/api/resources/apps/types/App.d.mts +4 -0
- package/dist/esm/api/resources/apps/types/AppCategory.d.mts +20 -0
- package/dist/esm/api/resources/apps/types/AppCategory.mjs +20 -0
- package/dist/esm/api/resources/apps/types/index.d.mts +1 -0
- package/dist/esm/api/resources/apps/types/index.mjs +1 -0
- package/dist/esm/api/resources/inboxes/client/Client.d.mts +4 -0
- package/dist/esm/api/resources/inboxes/client/Client.mjs +12 -0
- package/dist/esm/api/resources/inboxes/types/CreateInboxRequest.d.mts +2 -0
- package/dist/esm/api/resources/inboxes/types/Inbox.d.mts +6 -0
- package/dist/esm/api/resources/inboxes/types/InboxStatus.d.mts +11 -0
- package/dist/esm/api/resources/inboxes/types/InboxStatus.mjs +11 -0
- package/dist/esm/api/resources/inboxes/types/UpdateInboxRequest.d.mts +8 -2
- package/dist/esm/api/resources/inboxes/types/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/types/index.mjs +1 -0
- package/dist/esm/api/resources/pods/resources/inboxes/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/pods/resources/inboxes/client/Client.mjs +9 -0
- package/dist/esm/serialization/resources/apps/types/App.d.mts +3 -0
- package/dist/esm/serialization/resources/apps/types/App.mjs +3 -0
- package/dist/esm/serialization/resources/apps/types/AppCategory.d.mts +7 -0
- package/dist/esm/serialization/resources/apps/types/AppCategory.mjs +20 -0
- package/dist/esm/serialization/resources/apps/types/index.d.mts +1 -0
- package/dist/esm/serialization/resources/apps/types/index.mjs +1 -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/InboxStatus.d.mts +7 -0
- package/dist/esm/serialization/resources/inboxes/types/InboxStatus.mjs +3 -0
- package/dist/esm/serialization/resources/inboxes/types/UpdateInboxRequest.d.mts +2 -0
- package/dist/esm/serialization/resources/inboxes/types/UpdateInboxRequest.mjs +2 -0
- package/dist/esm/serialization/resources/inboxes/types/index.d.mts +1 -0
- package/dist/esm/serialization/resources/inboxes/types/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/llms.txt +3 -1
- package/package.json +1 -1
- package/reference.md +15 -9
|
@@ -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 { InboxStatus } from "./InboxStatus.js";
|
|
9
10
|
import { Metadata } from "./Metadata.js";
|
|
10
11
|
export declare const Inbox: core.serialization.ObjectSchema<serializers.inboxes.Inbox.Raw, AgentMail.inboxes.Inbox>;
|
|
11
12
|
export declare namespace Inbox {
|
|
@@ -15,6 +16,7 @@ export declare namespace Inbox {
|
|
|
15
16
|
email: Email.Raw;
|
|
16
17
|
display_name?: DisplayName.Raw | null;
|
|
17
18
|
client_id?: ClientId.Raw | null;
|
|
19
|
+
status?: InboxStatus.Raw | null;
|
|
18
20
|
metadata?: Metadata.Raw | null;
|
|
19
21
|
updated_at: string;
|
|
20
22
|
created_at: string;
|
|
@@ -41,6 +41,7 @@ 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 InboxStatus_js_1 = require("./InboxStatus.js");
|
|
44
45
|
const Metadata_js_1 = require("./Metadata.js");
|
|
45
46
|
exports.Inbox = core.serialization.object({
|
|
46
47
|
podId: core.serialization.property("pod_id", PodId_js_1.PodId),
|
|
@@ -48,6 +49,7 @@ exports.Inbox = core.serialization.object({
|
|
|
48
49
|
email: Email_js_1.Email,
|
|
49
50
|
displayName: core.serialization.property("display_name", DisplayName_js_1.DisplayName.optional()),
|
|
50
51
|
clientId: core.serialization.property("client_id", ClientId_js_1.ClientId.optional()),
|
|
52
|
+
status: InboxStatus_js_1.InboxStatus.optional(),
|
|
51
53
|
metadata: Metadata_js_1.Metadata.optional(),
|
|
52
54
|
updatedAt: core.serialization.property("updated_at", core.serialization.date()),
|
|
53
55
|
createdAt: core.serialization.property("created_at", core.serialization.date()),
|
|
@@ -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 InboxStatus: core.serialization.Schema<serializers.inboxes.InboxStatus.Raw, AgentMail.inboxes.InboxStatus>;
|
|
5
|
+
export declare namespace InboxStatus {
|
|
6
|
+
type Raw = "active" | "paused";
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.InboxStatus = void 0;
|
|
38
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
39
|
+
exports.InboxStatus = core.serialization.enum_(["active", "paused"]);
|
|
@@ -2,11 +2,13 @@ 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 { InboxStatus } from "./InboxStatus.js";
|
|
5
6
|
import { UpdateMetadata } from "./UpdateMetadata.js";
|
|
6
7
|
export declare const UpdateInboxRequest: core.serialization.ObjectSchema<serializers.inboxes.UpdateInboxRequest.Raw, AgentMail.inboxes.UpdateInboxRequest>;
|
|
7
8
|
export declare namespace UpdateInboxRequest {
|
|
8
9
|
interface Raw {
|
|
9
10
|
display_name?: DisplayName.Raw | null;
|
|
11
|
+
status?: InboxStatus.Raw | null;
|
|
10
12
|
metadata?: (UpdateMetadata.Raw | null | undefined) | null;
|
|
11
13
|
}
|
|
12
14
|
}
|
|
@@ -37,8 +37,10 @@ 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 InboxStatus_js_1 = require("./InboxStatus.js");
|
|
40
41
|
const UpdateMetadata_js_1 = require("./UpdateMetadata.js");
|
|
41
42
|
exports.UpdateInboxRequest = core.serialization.object({
|
|
42
43
|
displayName: core.serialization.property("display_name", DisplayName_js_1.DisplayName.optional()),
|
|
44
|
+
status: InboxStatus_js_1.InboxStatus.optional(),
|
|
43
45
|
metadata: UpdateMetadata_js_1.UpdateMetadata.optionalNullable(),
|
|
44
46
|
});
|
|
@@ -6,6 +6,7 @@ export * from "./DisplayName.js";
|
|
|
6
6
|
export * from "./Email.js";
|
|
7
7
|
export * from "./Inbox.js";
|
|
8
8
|
export * from "./InboxId.js";
|
|
9
|
+
export * from "./InboxStatus.js";
|
|
9
10
|
export * from "./ListInboxesResponse.js";
|
|
10
11
|
export * from "./Metadata.js";
|
|
11
12
|
export * from "./MetadataValue.js";
|
|
@@ -22,6 +22,7 @@ __exportStar(require("./DisplayName.js"), exports);
|
|
|
22
22
|
__exportStar(require("./Email.js"), exports);
|
|
23
23
|
__exportStar(require("./Inbox.js"), exports);
|
|
24
24
|
__exportStar(require("./InboxId.js"), exports);
|
|
25
|
+
__exportStar(require("./InboxStatus.js"), exports);
|
|
25
26
|
__exportStar(require("./ListInboxesResponse.js"), exports);
|
|
26
27
|
__exportStar(require("./Metadata.js"), exports);
|
|
27
28
|
__exportStar(require("./MetadataValue.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.37";
|
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.37",
|
|
10
|
+
"User-Agent": "agentmail/0.5.37",
|
|
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);
|
|
@@ -15,7 +15,7 @@ export declare class AgentClient {
|
|
|
15
15
|
*
|
|
16
16
|
* A 6-digit OTP is sent to the human's email for verification.
|
|
17
17
|
*
|
|
18
|
-
* `human_email` is optional. Without it, the inbox can receive email but cannot send to anyone until a human is attached with the attach human endpoint. There is also no way to recover the API key, so store it durably. Calling sign-up again without `human_email` creates a new organization, which needs a different `username`: the original username stays with the lost organization's inbox.
|
|
18
|
+
* `human_email` is optional. Without it, the inbox can receive email but cannot send to anyone until a human is attached with the attach human endpoint or, for a US-region inbox, claims it in the AgentMail Console with the API key (see [How do I claim my agent's inbox?](https://docs.agentmail.to/knowledge-base/claiming-agent-inbox)). There is also no way to recover the API key, so store it durably. Calling sign-up again without `human_email` creates a new organization, which needs a different `username`: the original username stays with the lost organization's inbox.
|
|
19
19
|
*
|
|
20
20
|
* This endpoint is idempotent. Calling it again with the same `human_email` will rotate the API key and resend the OTP if expired.
|
|
21
21
|
*
|
|
@@ -25,7 +25,7 @@ export class AgentClient {
|
|
|
25
25
|
*
|
|
26
26
|
* A 6-digit OTP is sent to the human's email for verification.
|
|
27
27
|
*
|
|
28
|
-
* `human_email` is optional. Without it, the inbox can receive email but cannot send to anyone until a human is attached with the attach human endpoint. There is also no way to recover the API key, so store it durably. Calling sign-up again without `human_email` creates a new organization, which needs a different `username`: the original username stays with the lost organization's inbox.
|
|
28
|
+
* `human_email` is optional. Without it, the inbox can receive email but cannot send to anyone until a human is attached with the attach human endpoint or, for a US-region inbox, claims it in the AgentMail Console with the API key (see [How do I claim my agent's inbox?](https://docs.agentmail.to/knowledge-base/claiming-agent-inbox)). There is also no way to recover the API key, so store it durably. Calling sign-up again without `human_email` creates a new organization, which needs a different `username`: the original username stays with the lost organization's inbox.
|
|
29
29
|
*
|
|
30
30
|
* This endpoint is idempotent. Calling it again with the same `human_email` will rotate the API key and resend the OTP if expired.
|
|
31
31
|
*
|
|
@@ -39,44 +39,47 @@ export declare class AppsClient {
|
|
|
39
39
|
search(request: AgentMail.SearchAppsRequest, requestOptions?: AppsClient.RequestOptions): core.HttpResponsePromise<AgentMail.SearchAppsResponse>;
|
|
40
40
|
private __search;
|
|
41
41
|
/**
|
|
42
|
-
* Gets one app by ID
|
|
42
|
+
* Gets one app by ID or slug. A catalog app returns its full entry.
|
|
43
43
|
* A registered app that the catalog does not list returns its ID and
|
|
44
44
|
* name only, without `updated_at`, so anyone holding its ID can still look
|
|
45
|
-
* it up. List Apps and Search Apps show
|
|
45
|
+
* it up; a slug finds catalog apps only. List Apps and Search Apps show
|
|
46
|
+
* catalog entries only.
|
|
46
47
|
*
|
|
47
|
-
* @param {
|
|
48
|
+
* @param {string} app_id - ID of app, or the `slug` of an app in the catalog. A slug ignores case, spaces and punctuation.
|
|
48
49
|
* @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
49
50
|
*
|
|
50
51
|
* @throws {@link AgentMail.NotFoundError}
|
|
51
52
|
*
|
|
52
53
|
* @example
|
|
53
|
-
* await client.apps.get("
|
|
54
|
+
* await client.apps.get("app_id")
|
|
54
55
|
*/
|
|
55
|
-
get(app_id:
|
|
56
|
+
get(app_id: string, requestOptions?: AppsClient.RequestOptions): core.HttpResponsePromise<AgentMail.App>;
|
|
56
57
|
private __get;
|
|
57
58
|
/**
|
|
58
59
|
* Lists accounts at one app, most recent sign-in first.
|
|
59
60
|
*
|
|
60
|
-
* @param {
|
|
61
|
+
* @param {string} app_id - ID of app, or the `slug` of an app in the catalog. A slug ignores case, spaces and punctuation.
|
|
61
62
|
* @param {AgentMail.ListAppAccountsRequest} request
|
|
62
63
|
* @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
64
|
*
|
|
64
65
|
* @throws {@link AgentMail.ValidationError}
|
|
65
66
|
*
|
|
66
67
|
* @example
|
|
67
|
-
* await client.apps.listAccounts("
|
|
68
|
+
* await client.apps.listAccounts("app_id")
|
|
68
69
|
*/
|
|
69
|
-
listAccounts(app_id:
|
|
70
|
+
listAccounts(app_id: string, request?: AgentMail.ListAppAccountsRequest, requestOptions?: AppsClient.RequestOptions): core.HttpResponsePromise<AgentMail.ListAppAccountsResponse>;
|
|
70
71
|
private __listAccounts;
|
|
71
72
|
/**
|
|
72
73
|
* Starts signing an inbox in to an app. Returns a single-use `magic_url`,
|
|
73
74
|
* valid for five minutes, to open in the client that will hold the sign-in;
|
|
74
75
|
* the client enrolls as the inbox and continues to the app.
|
|
76
|
+
* An app in the catalog can be named by its `slug`, as in
|
|
77
|
+
* `POST /v0/apps/firecrawl/connect`.
|
|
75
78
|
* A `404` names the missing resource: `App` or `Inbox`.
|
|
76
79
|
* A `403` `AppSignupLimitError` means the app accepts no more sign-ups from
|
|
77
80
|
* your organization; sign in with an inbox that already has an account there.
|
|
78
81
|
*
|
|
79
|
-
* @param {
|
|
82
|
+
* @param {string} app_id - ID of app, or the `slug` of an app in the catalog. A slug ignores case, spaces and punctuation.
|
|
80
83
|
* @param {AgentMail.ConnectAppBody} request
|
|
81
84
|
* @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
82
85
|
*
|
|
@@ -85,8 +88,8 @@ export declare class AppsClient {
|
|
|
85
88
|
* @throws {@link AgentMail.AppSignupLimitError}
|
|
86
89
|
*
|
|
87
90
|
* @example
|
|
88
|
-
* await client.apps.connect("
|
|
91
|
+
* await client.apps.connect("app_id", undefined)
|
|
89
92
|
*/
|
|
90
|
-
connect(app_id:
|
|
93
|
+
connect(app_id: string, request?: AgentMail.ConnectAppBody, requestOptions?: AppsClient.RequestOptions): core.HttpResponsePromise<AgentMail.ConnectAccepted>;
|
|
91
94
|
private __connect;
|
|
92
95
|
}
|
|
@@ -37,10 +37,16 @@ export class AppsClient {
|
|
|
37
37
|
__list() {
|
|
38
38
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
39
39
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
40
|
-
const { limit, pageToken } = request;
|
|
40
|
+
const { limit, pageToken, category } = request;
|
|
41
41
|
const _queryParams = {
|
|
42
42
|
limit,
|
|
43
43
|
page_token: pageToken,
|
|
44
|
+
category: category != null
|
|
45
|
+
? serializers.AppCategory.jsonOrThrow(category, {
|
|
46
|
+
unrecognizedObjectKeys: "strip",
|
|
47
|
+
omitUndefined: true,
|
|
48
|
+
})
|
|
49
|
+
: undefined,
|
|
44
50
|
};
|
|
45
51
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
46
52
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
@@ -161,18 +167,19 @@ export class AppsClient {
|
|
|
161
167
|
});
|
|
162
168
|
}
|
|
163
169
|
/**
|
|
164
|
-
* Gets one app by ID
|
|
170
|
+
* Gets one app by ID or slug. A catalog app returns its full entry.
|
|
165
171
|
* A registered app that the catalog does not list returns its ID and
|
|
166
172
|
* name only, without `updated_at`, so anyone holding its ID can still look
|
|
167
|
-
* it up. List Apps and Search Apps show
|
|
173
|
+
* it up; a slug finds catalog apps only. List Apps and Search Apps show
|
|
174
|
+
* catalog entries only.
|
|
168
175
|
*
|
|
169
|
-
* @param {
|
|
176
|
+
* @param {string} app_id - ID of app, or the `slug` of an app in the catalog. A slug ignores case, spaces and punctuation.
|
|
170
177
|
* @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
171
178
|
*
|
|
172
179
|
* @throws {@link AgentMail.NotFoundError}
|
|
173
180
|
*
|
|
174
181
|
* @example
|
|
175
|
-
* await client.apps.get("
|
|
182
|
+
* await client.apps.get("app_id")
|
|
176
183
|
*/
|
|
177
184
|
get(app_id, requestOptions) {
|
|
178
185
|
return core.HttpResponsePromise.fromPromise(this.__get(app_id, requestOptions));
|
|
@@ -184,7 +191,7 @@ export class AppsClient {
|
|
|
184
191
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
185
192
|
const _response = yield core.fetcher({
|
|
186
193
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Prod)
|
|
187
|
-
.http, `/v0/apps/${core.url.encodePathParam(
|
|
194
|
+
.http, `/v0/apps/${core.url.encodePathParam(app_id)}`),
|
|
188
195
|
method: "GET",
|
|
189
196
|
headers: _headers,
|
|
190
197
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -230,14 +237,14 @@ export class AppsClient {
|
|
|
230
237
|
/**
|
|
231
238
|
* Lists accounts at one app, most recent sign-in first.
|
|
232
239
|
*
|
|
233
|
-
* @param {
|
|
240
|
+
* @param {string} app_id - ID of app, or the `slug` of an app in the catalog. A slug ignores case, spaces and punctuation.
|
|
234
241
|
* @param {AgentMail.ListAppAccountsRequest} request
|
|
235
242
|
* @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
236
243
|
*
|
|
237
244
|
* @throws {@link AgentMail.ValidationError}
|
|
238
245
|
*
|
|
239
246
|
* @example
|
|
240
|
-
* await client.apps.listAccounts("
|
|
247
|
+
* await client.apps.listAccounts("app_id")
|
|
241
248
|
*/
|
|
242
249
|
listAccounts(app_id, request = {}, requestOptions) {
|
|
243
250
|
return core.HttpResponsePromise.fromPromise(this.__listAccounts(app_id, request, requestOptions));
|
|
@@ -254,7 +261,7 @@ export class AppsClient {
|
|
|
254
261
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
255
262
|
const _response = yield core.fetcher({
|
|
256
263
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Prod)
|
|
257
|
-
.http, `/v0/apps/${core.url.encodePathParam(
|
|
264
|
+
.http, `/v0/apps/${core.url.encodePathParam(app_id)}/accounts`),
|
|
258
265
|
method: "GET",
|
|
259
266
|
headers: _headers,
|
|
260
267
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -301,11 +308,13 @@ export class AppsClient {
|
|
|
301
308
|
* Starts signing an inbox in to an app. Returns a single-use `magic_url`,
|
|
302
309
|
* valid for five minutes, to open in the client that will hold the sign-in;
|
|
303
310
|
* the client enrolls as the inbox and continues to the app.
|
|
311
|
+
* An app in the catalog can be named by its `slug`, as in
|
|
312
|
+
* `POST /v0/apps/firecrawl/connect`.
|
|
304
313
|
* A `404` names the missing resource: `App` or `Inbox`.
|
|
305
314
|
* A `403` `AppSignupLimitError` means the app accepts no more sign-ups from
|
|
306
315
|
* your organization; sign in with an inbox that already has an account there.
|
|
307
316
|
*
|
|
308
|
-
* @param {
|
|
317
|
+
* @param {string} app_id - ID of app, or the `slug` of an app in the catalog. A slug ignores case, spaces and punctuation.
|
|
309
318
|
* @param {AgentMail.ConnectAppBody} request
|
|
310
319
|
* @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
311
320
|
*
|
|
@@ -314,7 +323,7 @@ export class AppsClient {
|
|
|
314
323
|
* @throws {@link AgentMail.AppSignupLimitError}
|
|
315
324
|
*
|
|
316
325
|
* @example
|
|
317
|
-
* await client.apps.connect("
|
|
326
|
+
* await client.apps.connect("app_id", undefined)
|
|
318
327
|
*/
|
|
319
328
|
connect(app_id, request, requestOptions) {
|
|
320
329
|
return core.HttpResponsePromise.fromPromise(this.__connect(app_id, request, requestOptions));
|
|
@@ -326,7 +335,7 @@ export class AppsClient {
|
|
|
326
335
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
327
336
|
const _response = yield core.fetcher({
|
|
328
337
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Prod)
|
|
329
|
-
.http, `/v0/apps/${core.url.encodePathParam(
|
|
338
|
+
.http, `/v0/apps/${core.url.encodePathParam(app_id)}/connect`),
|
|
330
339
|
method: "POST",
|
|
331
340
|
headers: _headers,
|
|
332
341
|
contentType: "application/json",
|
|
@@ -6,4 +6,6 @@ import type * as AgentMail from "../../../../index.mjs";
|
|
|
6
6
|
export interface ListAppsRequest {
|
|
7
7
|
limit?: AgentMail.Limit;
|
|
8
8
|
pageToken?: AgentMail.PageToken;
|
|
9
|
+
/** Only apps in this category. A filtered page can hold fewer than `limit` apps while more remain, so page until `next_page_token` is absent. A `page_token` works only with the `category` it was returned for. */
|
|
10
|
+
category?: AgentMail.AppCategory;
|
|
9
11
|
}
|
|
@@ -4,6 +4,8 @@ import type * as AgentMail from "../../../index.mjs";
|
|
|
4
4
|
*/
|
|
5
5
|
export interface App {
|
|
6
6
|
appId: AgentMail.AppId;
|
|
7
|
+
/** Short name accepted in place of `app_id` by Get App, List App Accounts and Connect App. Set by AgentMail on apps in the catalog; renaming the app does not change it. Store `app_id`, the app's permanent ID. */
|
|
8
|
+
slug?: string;
|
|
7
9
|
name?: string;
|
|
8
10
|
/** Time at which app was last updated. */
|
|
9
11
|
updatedAt?: Date;
|
|
@@ -11,6 +13,8 @@ export interface App {
|
|
|
11
13
|
logoUrl?: string;
|
|
12
14
|
termsUrl?: string;
|
|
13
15
|
privacyUrl?: string;
|
|
16
|
+
/** Kinds of app, up to 3. Omitted when the app sets none. */
|
|
17
|
+
categories?: AgentMail.AppCategory[];
|
|
14
18
|
/** Maximum number of accounts your organization may sign up at this app. Omitted when the app sets no limit. 0 means the app has paused new sign-ups; existing accounts keep signing in. */
|
|
15
19
|
ownerSignupLimit?: number;
|
|
16
20
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Kind of app. */
|
|
2
|
+
export declare const AppCategory: {
|
|
3
|
+
readonly Ai: "ai";
|
|
4
|
+
readonly Search: "search";
|
|
5
|
+
readonly Scraping: "scraping";
|
|
6
|
+
readonly Browser: "browser";
|
|
7
|
+
readonly Data: "data";
|
|
8
|
+
readonly DeveloperTools: "developer-tools";
|
|
9
|
+
readonly Communication: "communication";
|
|
10
|
+
readonly Productivity: "productivity";
|
|
11
|
+
readonly Payments: "payments";
|
|
12
|
+
readonly Finance: "finance";
|
|
13
|
+
readonly Commerce: "commerce";
|
|
14
|
+
readonly Marketing: "marketing";
|
|
15
|
+
readonly Analytics: "analytics";
|
|
16
|
+
readonly Security: "security";
|
|
17
|
+
readonly Infrastructure: "infrastructure";
|
|
18
|
+
readonly Other: "other";
|
|
19
|
+
};
|
|
20
|
+
export type AppCategory = (typeof AppCategory)[keyof typeof AppCategory];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
/** Kind of app. */
|
|
3
|
+
export const AppCategory = {
|
|
4
|
+
Ai: "ai",
|
|
5
|
+
Search: "search",
|
|
6
|
+
Scraping: "scraping",
|
|
7
|
+
Browser: "browser",
|
|
8
|
+
Data: "data",
|
|
9
|
+
DeveloperTools: "developer-tools",
|
|
10
|
+
Communication: "communication",
|
|
11
|
+
Productivity: "productivity",
|
|
12
|
+
Payments: "payments",
|
|
13
|
+
Finance: "finance",
|
|
14
|
+
Commerce: "commerce",
|
|
15
|
+
Marketing: "marketing",
|
|
16
|
+
Analytics: "analytics",
|
|
17
|
+
Security: "security",
|
|
18
|
+
Infrastructure: "infrastructure",
|
|
19
|
+
Other: "other",
|
|
20
|
+
};
|
|
@@ -110,12 +110,16 @@ export declare class InboxesClient {
|
|
|
110
110
|
* agentmail inboxes update --inbox-id <inbox_id> --display-name "Updated Name"
|
|
111
111
|
* ```
|
|
112
112
|
*
|
|
113
|
+
* To pause an inbox, set `status` to `paused`; set it back to `active` to
|
|
114
|
+
* resume. See [Pausing an inbox](/inboxes#pausing-an-inbox).
|
|
115
|
+
*
|
|
113
116
|
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
114
117
|
* @param {AgentMail.inboxes.UpdateInboxRequest} request
|
|
115
118
|
* @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
116
119
|
*
|
|
117
120
|
* @throws {@link AgentMail.NotFoundError}
|
|
118
121
|
* @throws {@link AgentMail.ValidationError}
|
|
122
|
+
* @throws {@link AgentMail.ConflictError}
|
|
119
123
|
*
|
|
120
124
|
* @example
|
|
121
125
|
* await client.inboxes.update("inbox_id", {})
|
|
@@ -357,12 +357,16 @@ export class InboxesClient {
|
|
|
357
357
|
* agentmail inboxes update --inbox-id <inbox_id> --display-name "Updated Name"
|
|
358
358
|
* ```
|
|
359
359
|
*
|
|
360
|
+
* To pause an inbox, set `status` to `paused`; set it back to `active` to
|
|
361
|
+
* resume. See [Pausing an inbox](/inboxes#pausing-an-inbox).
|
|
362
|
+
*
|
|
360
363
|
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
361
364
|
* @param {AgentMail.inboxes.UpdateInboxRequest} request
|
|
362
365
|
* @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
363
366
|
*
|
|
364
367
|
* @throws {@link AgentMail.NotFoundError}
|
|
365
368
|
* @throws {@link AgentMail.ValidationError}
|
|
369
|
+
* @throws {@link AgentMail.ConflictError}
|
|
366
370
|
*
|
|
367
371
|
* @example
|
|
368
372
|
* await client.inboxes.update("inbox_id", {})
|
|
@@ -423,6 +427,14 @@ export class InboxesClient {
|
|
|
423
427
|
skipValidation: true,
|
|
424
428
|
breadcrumbsPrefix: ["response"],
|
|
425
429
|
}), _response.rawResponse);
|
|
430
|
+
case 409:
|
|
431
|
+
throw new AgentMail.ConflictError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
432
|
+
unrecognizedObjectKeys: "passthrough",
|
|
433
|
+
allowUnrecognizedUnionMembers: true,
|
|
434
|
+
allowUnrecognizedEnumValues: true,
|
|
435
|
+
skipValidation: true,
|
|
436
|
+
breadcrumbsPrefix: ["response"],
|
|
437
|
+
}), _response.rawResponse);
|
|
426
438
|
default:
|
|
427
439
|
throw new errors.AgentMailError({
|
|
428
440
|
statusCode: _response.error.statusCode,
|
|
@@ -10,6 +10,8 @@ export interface CreateInboxRequest {
|
|
|
10
10
|
domain?: string;
|
|
11
11
|
displayName?: AgentMail.inboxes.DisplayName;
|
|
12
12
|
clientId?: AgentMail.inboxes.ClientId;
|
|
13
|
+
/** Set `paused` to create the inbox paused. */
|
|
14
|
+
status?: AgentMail.inboxes.InboxStatus;
|
|
13
15
|
/** Custom metadata to attach to the inbox. */
|
|
14
16
|
metadata?: AgentMail.inboxes.Metadata;
|
|
15
17
|
}
|
|
@@ -5,6 +5,12 @@ export interface Inbox {
|
|
|
5
5
|
email: AgentMail.inboxes.Email;
|
|
6
6
|
displayName?: AgentMail.inboxes.DisplayName;
|
|
7
7
|
clientId?: AgentMail.inboxes.ClientId;
|
|
8
|
+
/**
|
|
9
|
+
* `paused` when the inbox is paused. Omitted when the inbox is active.
|
|
10
|
+
* Treat any value other than `paused` as an inbox that sends and
|
|
11
|
+
* receives normally.
|
|
12
|
+
*/
|
|
13
|
+
status?: AgentMail.inboxes.InboxStatus;
|
|
8
14
|
/** Custom metadata attached to the inbox. */
|
|
9
15
|
metadata?: AgentMail.inboxes.Metadata;
|
|
10
16
|
/** Time at which inbox was last updated. */
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether the inbox sends and receives mail. `paused` stops both: sends
|
|
3
|
+
* return `403` with code `inbox_paused`, and incoming mail is not
|
|
4
|
+
* delivered and not bounced, then or on resume. Mail already in the inbox,
|
|
5
|
+
* its drafts, and its API keys are kept. Set `active` to resume.
|
|
6
|
+
*/
|
|
7
|
+
export declare const InboxStatus: {
|
|
8
|
+
readonly Active: "active";
|
|
9
|
+
readonly Paused: "paused";
|
|
10
|
+
};
|
|
11
|
+
export type InboxStatus = (typeof InboxStatus)[keyof typeof InboxStatus];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
/**
|
|
3
|
+
* Whether the inbox sends and receives mail. `paused` stops both: sends
|
|
4
|
+
* return `403` with code `inbox_paused`, and incoming mail is not
|
|
5
|
+
* delivered and not bounced, then or on resume. Mail already in the inbox,
|
|
6
|
+
* its drafts, and its API keys are kept. Set `active` to resume.
|
|
7
|
+
*/
|
|
8
|
+
export const InboxStatus = {
|
|
9
|
+
Active: "active",
|
|
10
|
+
Paused: "paused",
|
|
11
|
+
};
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import type * as AgentMail from "../../../index.mjs";
|
|
2
2
|
export interface UpdateInboxRequest {
|
|
3
3
|
displayName?: AgentMail.inboxes.DisplayName;
|
|
4
|
+
/**
|
|
5
|
+
* `paused` stops the inbox sending and receiving mail; `active` resumes
|
|
6
|
+
* it. Mail that arrived while the inbox was paused is not delivered on
|
|
7
|
+
* resume.
|
|
8
|
+
*/
|
|
9
|
+
status?: AgentMail.inboxes.InboxStatus;
|
|
4
10
|
/**
|
|
5
11
|
* Metadata to merge into the inbox's existing metadata. Keys you include
|
|
6
12
|
* are added or overwritten; keys you omit are left unchanged. To remove a
|
|
7
13
|
* single key, send it with a null value. To clear all metadata, send
|
|
8
14
|
* `metadata` as null. Sending an empty object is rejected; use null to
|
|
9
|
-
* clear. Each update must include at least one of `display_name
|
|
10
|
-
* `metadata`.
|
|
15
|
+
* clear. Each update must include at least one of `display_name`,
|
|
16
|
+
* `status`, or `metadata`.
|
|
11
17
|
*/
|
|
12
18
|
metadata?: AgentMail.inboxes.UpdateMetadata | null;
|
|
13
19
|
}
|
|
@@ -6,6 +6,7 @@ export * from "./DisplayName.mjs";
|
|
|
6
6
|
export * from "./Email.mjs";
|
|
7
7
|
export * from "./Inbox.mjs";
|
|
8
8
|
export * from "./InboxId.mjs";
|
|
9
|
+
export * from "./InboxStatus.mjs";
|
|
9
10
|
export * from "./ListInboxesResponse.mjs";
|
|
10
11
|
export * from "./Metadata.mjs";
|
|
11
12
|
export * from "./MetadataValue.mjs";
|
|
@@ -6,6 +6,7 @@ export * from "./DisplayName.mjs";
|
|
|
6
6
|
export * from "./Email.mjs";
|
|
7
7
|
export * from "./Inbox.mjs";
|
|
8
8
|
export * from "./InboxId.mjs";
|
|
9
|
+
export * from "./InboxStatus.mjs";
|
|
9
10
|
export * from "./ListInboxesResponse.mjs";
|
|
10
11
|
export * from "./Metadata.mjs";
|
|
11
12
|
export * from "./MetadataValue.mjs";
|
|
@@ -96,6 +96,7 @@ export declare class InboxesClient {
|
|
|
96
96
|
* @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
97
97
|
*
|
|
98
98
|
* @throws {@link AgentMail.NotFoundError}
|
|
99
|
+
* @throws {@link AgentMail.ConflictError}
|
|
99
100
|
*
|
|
100
101
|
* @example
|
|
101
102
|
* await client.pods.inboxes.update("pod_id", "inbox_id", {})
|
|
@@ -344,6 +344,7 @@ export class InboxesClient {
|
|
|
344
344
|
* @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
345
345
|
*
|
|
346
346
|
* @throws {@link AgentMail.NotFoundError}
|
|
347
|
+
* @throws {@link AgentMail.ConflictError}
|
|
347
348
|
*
|
|
348
349
|
* @example
|
|
349
350
|
* await client.pods.inboxes.update("pod_id", "inbox_id", {})
|
|
@@ -396,6 +397,14 @@ export class InboxesClient {
|
|
|
396
397
|
skipValidation: true,
|
|
397
398
|
breadcrumbsPrefix: ["response"],
|
|
398
399
|
}), _response.rawResponse);
|
|
400
|
+
case 409:
|
|
401
|
+
throw new AgentMail.ConflictError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
402
|
+
unrecognizedObjectKeys: "passthrough",
|
|
403
|
+
allowUnrecognizedUnionMembers: true,
|
|
404
|
+
allowUnrecognizedEnumValues: true,
|
|
405
|
+
skipValidation: true,
|
|
406
|
+
breadcrumbsPrefix: ["response"],
|
|
407
|
+
}), _response.rawResponse);
|
|
399
408
|
default:
|
|
400
409
|
throw new errors.AgentMailError({
|
|
401
410
|
statusCode: _response.error.statusCode,
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import type * as AgentMail from "../../../../api/index.mjs";
|
|
2
2
|
import * as core from "../../../../core/index.mjs";
|
|
3
3
|
import type * as serializers from "../../../index.mjs";
|
|
4
|
+
import { AppCategory } from "./AppCategory.mjs";
|
|
4
5
|
import { AppId } from "./AppId.mjs";
|
|
5
6
|
export declare const App: core.serialization.ObjectSchema<serializers.App.Raw, AgentMail.App>;
|
|
6
7
|
export declare namespace App {
|
|
7
8
|
interface Raw {
|
|
8
9
|
app_id: AppId.Raw;
|
|
10
|
+
slug?: string | null;
|
|
9
11
|
name?: string | null;
|
|
10
12
|
updated_at?: string | null;
|
|
11
13
|
description?: string | null;
|
|
12
14
|
logo_url?: string | null;
|
|
13
15
|
terms_url?: string | null;
|
|
14
16
|
privacy_url?: string | null;
|
|
17
|
+
categories?: AppCategory.Raw[] | null;
|
|
15
18
|
owner_signup_limit?: number | null;
|
|
16
19
|
}
|
|
17
20
|
}
|