agentmail 0.5.35 → 0.5.36
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/apps/client/Client.js +7 -1
- package/dist/cjs/api/resources/apps/client/requests/ListAppsRequest.d.ts +2 -0
- package/dist/cjs/api/resources/apps/types/App.d.ts +2 -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 +2 -0
- package/dist/cjs/serialization/resources/apps/types/App.js +2 -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/apps/client/Client.mjs +7 -1
- package/dist/esm/api/resources/apps/client/requests/ListAppsRequest.d.mts +2 -0
- package/dist/esm/api/resources/apps/types/App.d.mts +2 -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 +2 -0
- package/dist/esm/serialization/resources/apps/types/App.mjs +2 -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/package.json +1 -1
- package/reference.md +3 -0
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.36",
|
|
47
|
+
"User-Agent": "agentmail/0.5.36",
|
|
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);
|
|
@@ -73,10 +73,16 @@ class AppsClient {
|
|
|
73
73
|
__list() {
|
|
74
74
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
75
75
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
76
|
-
const { limit, pageToken } = request;
|
|
76
|
+
const { limit, pageToken, category } = request;
|
|
77
77
|
const _queryParams = {
|
|
78
78
|
limit,
|
|
79
79
|
page_token: pageToken,
|
|
80
|
+
category: category != null
|
|
81
|
+
? serializers.AppCategory.jsonOrThrow(category, {
|
|
82
|
+
unrecognizedObjectKeys: "strip",
|
|
83
|
+
omitUndefined: true,
|
|
84
|
+
})
|
|
85
|
+
: undefined,
|
|
80
86
|
};
|
|
81
87
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
82
88
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
@@ -6,4 +6,6 @@ import type * as AgentMail from "../../../../index.js";
|
|
|
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
|
}
|
|
@@ -11,6 +11,8 @@ export interface App {
|
|
|
11
11
|
logoUrl?: string;
|
|
12
12
|
termsUrl?: string;
|
|
13
13
|
privacyUrl?: string;
|
|
14
|
+
/** Kinds of app, up to 3. Omitted when the app sets none. */
|
|
15
|
+
categories?: AgentMail.AppCategory[];
|
|
14
16
|
/** 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
17
|
ownerSignupLimit?: number;
|
|
16
18
|
}
|
|
@@ -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,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.AppCategory = void 0;
|
|
5
|
+
/** Kind of app. */
|
|
6
|
+
exports.AppCategory = {
|
|
7
|
+
Ai: "ai",
|
|
8
|
+
Search: "search",
|
|
9
|
+
Scraping: "scraping",
|
|
10
|
+
Browser: "browser",
|
|
11
|
+
Data: "data",
|
|
12
|
+
DeveloperTools: "developer-tools",
|
|
13
|
+
Communication: "communication",
|
|
14
|
+
Productivity: "productivity",
|
|
15
|
+
Payments: "payments",
|
|
16
|
+
Finance: "finance",
|
|
17
|
+
Commerce: "commerce",
|
|
18
|
+
Marketing: "marketing",
|
|
19
|
+
Analytics: "analytics",
|
|
20
|
+
Security: "security",
|
|
21
|
+
Infrastructure: "infrastructure",
|
|
22
|
+
Other: "other",
|
|
23
|
+
};
|
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./App.js"), exports);
|
|
18
|
+
__exportStar(require("./AppCategory.js"), exports);
|
|
18
19
|
__exportStar(require("./AppId.js"), exports);
|
|
19
20
|
__exportStar(require("./ConnectAccepted.js"), exports);
|
|
20
21
|
__exportStar(require("./ConnectAppBody.js"), exports);
|
|
@@ -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", {})
|
|
@@ -393,12 +393,16 @@ class InboxesClient {
|
|
|
393
393
|
* agentmail inboxes update --inbox-id <inbox_id> --display-name "Updated Name"
|
|
394
394
|
* ```
|
|
395
395
|
*
|
|
396
|
+
* To pause an inbox, set `status` to `paused`; set it back to `active` to
|
|
397
|
+
* resume. See [Pausing an inbox](/inboxes#pausing-an-inbox).
|
|
398
|
+
*
|
|
396
399
|
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
397
400
|
* @param {AgentMail.inboxes.UpdateInboxRequest} request
|
|
398
401
|
* @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
399
402
|
*
|
|
400
403
|
* @throws {@link AgentMail.NotFoundError}
|
|
401
404
|
* @throws {@link AgentMail.ValidationError}
|
|
405
|
+
* @throws {@link AgentMail.ConflictError}
|
|
402
406
|
*
|
|
403
407
|
* @example
|
|
404
408
|
* await client.inboxes.update("inbox_id", {})
|
|
@@ -459,6 +463,14 @@ class InboxesClient {
|
|
|
459
463
|
skipValidation: true,
|
|
460
464
|
breadcrumbsPrefix: ["response"],
|
|
461
465
|
}), _response.rawResponse);
|
|
466
|
+
case 409:
|
|
467
|
+
throw new AgentMail.ConflictError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
468
|
+
unrecognizedObjectKeys: "passthrough",
|
|
469
|
+
allowUnrecognizedUnionMembers: true,
|
|
470
|
+
allowUnrecognizedEnumValues: true,
|
|
471
|
+
skipValidation: true,
|
|
472
|
+
breadcrumbsPrefix: ["response"],
|
|
473
|
+
}), _response.rawResponse);
|
|
462
474
|
default:
|
|
463
475
|
throw new errors.AgentMailError({
|
|
464
476
|
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,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.InboxStatus = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* Whether the inbox sends and receives mail. `paused` stops both: sends
|
|
7
|
+
* return `403` with code `inbox_paused`, and incoming mail is not
|
|
8
|
+
* delivered and not bounced, then or on resume. Mail already in the inbox,
|
|
9
|
+
* its drafts, and its API keys are kept. Set `active` to resume.
|
|
10
|
+
*/
|
|
11
|
+
exports.InboxStatus = {
|
|
12
|
+
Active: "active",
|
|
13
|
+
Paused: "paused",
|
|
14
|
+
};
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import type * as AgentMail from "../../../index.js";
|
|
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.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);
|
|
@@ -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", {})
|
|
@@ -380,6 +380,7 @@ class InboxesClient {
|
|
|
380
380
|
* @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
381
381
|
*
|
|
382
382
|
* @throws {@link AgentMail.NotFoundError}
|
|
383
|
+
* @throws {@link AgentMail.ConflictError}
|
|
383
384
|
*
|
|
384
385
|
* @example
|
|
385
386
|
* await client.pods.inboxes.update("pod_id", "inbox_id", {})
|
|
@@ -432,6 +433,14 @@ class InboxesClient {
|
|
|
432
433
|
skipValidation: true,
|
|
433
434
|
breadcrumbsPrefix: ["response"],
|
|
434
435
|
}), _response.rawResponse);
|
|
436
|
+
case 409:
|
|
437
|
+
throw new AgentMail.ConflictError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
438
|
+
unrecognizedObjectKeys: "passthrough",
|
|
439
|
+
allowUnrecognizedUnionMembers: true,
|
|
440
|
+
allowUnrecognizedEnumValues: true,
|
|
441
|
+
skipValidation: true,
|
|
442
|
+
breadcrumbsPrefix: ["response"],
|
|
443
|
+
}), _response.rawResponse);
|
|
435
444
|
default:
|
|
436
445
|
throw new errors.AgentMailError({
|
|
437
446
|
statusCode: _response.error.statusCode,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type * as AgentMail from "../../../../api/index.js";
|
|
2
2
|
import * as core from "../../../../core/index.js";
|
|
3
3
|
import type * as serializers from "../../../index.js";
|
|
4
|
+
import { AppCategory } from "./AppCategory.js";
|
|
4
5
|
import { AppId } from "./AppId.js";
|
|
5
6
|
export declare const App: core.serialization.ObjectSchema<serializers.App.Raw, AgentMail.App>;
|
|
6
7
|
export declare namespace App {
|
|
@@ -12,6 +13,7 @@ export declare namespace App {
|
|
|
12
13
|
logo_url?: string | null;
|
|
13
14
|
terms_url?: string | null;
|
|
14
15
|
privacy_url?: string | null;
|
|
16
|
+
categories?: AppCategory.Raw[] | null;
|
|
15
17
|
owner_signup_limit?: number | null;
|
|
16
18
|
}
|
|
17
19
|
}
|
|
@@ -36,6 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
exports.App = void 0;
|
|
38
38
|
const core = __importStar(require("../../../../core/index.js"));
|
|
39
|
+
const AppCategory_js_1 = require("./AppCategory.js");
|
|
39
40
|
const AppId_js_1 = require("./AppId.js");
|
|
40
41
|
exports.App = core.serialization.object({
|
|
41
42
|
appId: core.serialization.property("app_id", AppId_js_1.AppId),
|
|
@@ -45,5 +46,6 @@ exports.App = core.serialization.object({
|
|
|
45
46
|
logoUrl: core.serialization.property("logo_url", core.serialization.string().optional()),
|
|
46
47
|
termsUrl: core.serialization.property("terms_url", core.serialization.string().optional()),
|
|
47
48
|
privacyUrl: core.serialization.property("privacy_url", core.serialization.string().optional()),
|
|
49
|
+
categories: core.serialization.list(AppCategory_js_1.AppCategory).optional(),
|
|
48
50
|
ownerSignupLimit: core.serialization.property("owner_signup_limit", core.serialization.number().optional()),
|
|
49
51
|
});
|
|
@@ -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 AppCategory: core.serialization.Schema<serializers.AppCategory.Raw, AgentMail.AppCategory>;
|
|
5
|
+
export declare namespace AppCategory {
|
|
6
|
+
type Raw = "ai" | "search" | "scraping" | "browser" | "data" | "developer-tools" | "communication" | "productivity" | "payments" | "finance" | "commerce" | "marketing" | "analytics" | "security" | "infrastructure" | "other";
|
|
7
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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.AppCategory = void 0;
|
|
38
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
39
|
+
exports.AppCategory = core.serialization.enum_([
|
|
40
|
+
"ai",
|
|
41
|
+
"search",
|
|
42
|
+
"scraping",
|
|
43
|
+
"browser",
|
|
44
|
+
"data",
|
|
45
|
+
"developer-tools",
|
|
46
|
+
"communication",
|
|
47
|
+
"productivity",
|
|
48
|
+
"payments",
|
|
49
|
+
"finance",
|
|
50
|
+
"commerce",
|
|
51
|
+
"marketing",
|
|
52
|
+
"analytics",
|
|
53
|
+
"security",
|
|
54
|
+
"infrastructure",
|
|
55
|
+
"other",
|
|
56
|
+
]);
|
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./App.js"), exports);
|
|
18
|
+
__exportStar(require("./AppCategory.js"), exports);
|
|
18
19
|
__exportStar(require("./AppId.js"), exports);
|
|
19
20
|
__exportStar(require("./ConnectAccepted.js"), exports);
|
|
20
21
|
__exportStar(require("./ConnectAppBody.js"), exports);
|
|
@@ -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 { InboxStatus } from "./InboxStatus.js";
|
|
6
7
|
import { Metadata } from "./Metadata.js";
|
|
7
8
|
export declare const CreateInboxRequest: core.serialization.ObjectSchema<serializers.inboxes.CreateInboxRequest.Raw, AgentMail.inboxes.CreateInboxRequest>;
|
|
8
9
|
export declare namespace CreateInboxRequest {
|
|
@@ -11,6 +12,7 @@ export declare namespace CreateInboxRequest {
|
|
|
11
12
|
domain?: string | null;
|
|
12
13
|
display_name?: DisplayName.Raw | null;
|
|
13
14
|
client_id?: ClientId.Raw | null;
|
|
15
|
+
status?: InboxStatus.Raw | null;
|
|
14
16
|
metadata?: Metadata.Raw | null;
|
|
15
17
|
}
|
|
16
18
|
}
|
|
@@ -38,11 +38,13 @@ 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 InboxStatus_js_1 = require("./InboxStatus.js");
|
|
41
42
|
const Metadata_js_1 = require("./Metadata.js");
|
|
42
43
|
exports.CreateInboxRequest = core.serialization.object({
|
|
43
44
|
username: core.serialization.string().optional(),
|
|
44
45
|
domain: core.serialization.string().optional(),
|
|
45
46
|
displayName: core.serialization.property("display_name", DisplayName_js_1.DisplayName.optional()),
|
|
46
47
|
clientId: core.serialization.property("client_id", ClientId_js_1.ClientId.optional()),
|
|
48
|
+
status: InboxStatus_js_1.InboxStatus.optional(),
|
|
47
49
|
metadata: Metadata_js_1.Metadata.optional(),
|
|
48
50
|
});
|
|
@@ -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.36";
|
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.36",
|
|
10
|
+
"User-Agent": "agentmail/0.5.36",
|
|
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);
|
|
@@ -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);
|
|
@@ -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
|
}
|
|
@@ -11,6 +11,8 @@ export interface App {
|
|
|
11
11
|
logoUrl?: string;
|
|
12
12
|
termsUrl?: string;
|
|
13
13
|
privacyUrl?: string;
|
|
14
|
+
/** Kinds of app, up to 3. Omitted when the app sets none. */
|
|
15
|
+
categories?: AgentMail.AppCategory[];
|
|
14
16
|
/** 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
17
|
ownerSignupLimit?: number;
|
|
16
18
|
}
|
|
@@ -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,6 +1,7 @@
|
|
|
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 {
|
|
@@ -12,6 +13,7 @@ export declare namespace App {
|
|
|
12
13
|
logo_url?: string | null;
|
|
13
14
|
terms_url?: string | null;
|
|
14
15
|
privacy_url?: string | null;
|
|
16
|
+
categories?: AppCategory.Raw[] | null;
|
|
15
17
|
owner_signup_limit?: number | null;
|
|
16
18
|
}
|
|
17
19
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
import * as core from "../../../../core/index.mjs";
|
|
3
|
+
import { AppCategory } from "./AppCategory.mjs";
|
|
3
4
|
import { AppId } from "./AppId.mjs";
|
|
4
5
|
export const App = core.serialization.object({
|
|
5
6
|
appId: core.serialization.property("app_id", AppId),
|
|
@@ -9,5 +10,6 @@ export const App = core.serialization.object({
|
|
|
9
10
|
logoUrl: core.serialization.property("logo_url", core.serialization.string().optional()),
|
|
10
11
|
termsUrl: core.serialization.property("terms_url", core.serialization.string().optional()),
|
|
11
12
|
privacyUrl: core.serialization.property("privacy_url", core.serialization.string().optional()),
|
|
13
|
+
categories: core.serialization.list(AppCategory).optional(),
|
|
12
14
|
ownerSignupLimit: core.serialization.property("owner_signup_limit", core.serialization.number().optional()),
|
|
13
15
|
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../../api/index.mjs";
|
|
2
|
+
import * as core from "../../../../core/index.mjs";
|
|
3
|
+
import type * as serializers from "../../../index.mjs";
|
|
4
|
+
export declare const AppCategory: core.serialization.Schema<serializers.AppCategory.Raw, AgentMail.AppCategory>;
|
|
5
|
+
export declare namespace AppCategory {
|
|
6
|
+
type Raw = "ai" | "search" | "scraping" | "browser" | "data" | "developer-tools" | "communication" | "productivity" | "payments" | "finance" | "commerce" | "marketing" | "analytics" | "security" | "infrastructure" | "other";
|
|
7
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as core from "../../../../core/index.mjs";
|
|
3
|
+
export const AppCategory = core.serialization.enum_([
|
|
4
|
+
"ai",
|
|
5
|
+
"search",
|
|
6
|
+
"scraping",
|
|
7
|
+
"browser",
|
|
8
|
+
"data",
|
|
9
|
+
"developer-tools",
|
|
10
|
+
"communication",
|
|
11
|
+
"productivity",
|
|
12
|
+
"payments",
|
|
13
|
+
"finance",
|
|
14
|
+
"commerce",
|
|
15
|
+
"marketing",
|
|
16
|
+
"analytics",
|
|
17
|
+
"security",
|
|
18
|
+
"infrastructure",
|
|
19
|
+
"other",
|
|
20
|
+
]);
|
|
@@ -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 { InboxStatus } from "./InboxStatus.mjs";
|
|
6
7
|
import { Metadata } from "./Metadata.mjs";
|
|
7
8
|
export declare const CreateInboxRequest: core.serialization.ObjectSchema<serializers.inboxes.CreateInboxRequest.Raw, AgentMail.inboxes.CreateInboxRequest>;
|
|
8
9
|
export declare namespace CreateInboxRequest {
|
|
@@ -11,6 +12,7 @@ export declare namespace CreateInboxRequest {
|
|
|
11
12
|
domain?: string | null;
|
|
12
13
|
display_name?: DisplayName.Raw | null;
|
|
13
14
|
client_id?: ClientId.Raw | null;
|
|
15
|
+
status?: InboxStatus.Raw | null;
|
|
14
16
|
metadata?: Metadata.Raw | null;
|
|
15
17
|
}
|
|
16
18
|
}
|
|
@@ -2,11 +2,13 @@
|
|
|
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 { InboxStatus } from "./InboxStatus.mjs";
|
|
5
6
|
import { Metadata } from "./Metadata.mjs";
|
|
6
7
|
export const CreateInboxRequest = core.serialization.object({
|
|
7
8
|
username: core.serialization.string().optional(),
|
|
8
9
|
domain: core.serialization.string().optional(),
|
|
9
10
|
displayName: core.serialization.property("display_name", DisplayName.optional()),
|
|
10
11
|
clientId: core.serialization.property("client_id", ClientId.optional()),
|
|
12
|
+
status: InboxStatus.optional(),
|
|
11
13
|
metadata: Metadata.optional(),
|
|
12
14
|
});
|
|
@@ -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 { InboxStatus } from "./InboxStatus.mjs";
|
|
9
10
|
import { Metadata } from "./Metadata.mjs";
|
|
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;
|
|
@@ -5,6 +5,7 @@ import { ClientId } from "./ClientId.mjs";
|
|
|
5
5
|
import { DisplayName } from "./DisplayName.mjs";
|
|
6
6
|
import { Email } from "./Email.mjs";
|
|
7
7
|
import { InboxId } from "./InboxId.mjs";
|
|
8
|
+
import { InboxStatus } from "./InboxStatus.mjs";
|
|
8
9
|
import { Metadata } from "./Metadata.mjs";
|
|
9
10
|
export const Inbox = core.serialization.object({
|
|
10
11
|
podId: core.serialization.property("pod_id", PodId),
|
|
@@ -12,6 +13,7 @@ export const Inbox = core.serialization.object({
|
|
|
12
13
|
email: Email,
|
|
13
14
|
displayName: core.serialization.property("display_name", DisplayName.optional()),
|
|
14
15
|
clientId: core.serialization.property("client_id", ClientId.optional()),
|
|
16
|
+
status: InboxStatus.optional(),
|
|
15
17
|
metadata: Metadata.optional(),
|
|
16
18
|
updatedAt: core.serialization.property("updated_at", core.serialization.date()),
|
|
17
19
|
createdAt: core.serialization.property("created_at", core.serialization.date()),
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../../api/index.mjs";
|
|
2
|
+
import * as core from "../../../../core/index.mjs";
|
|
3
|
+
import type * as serializers from "../../../index.mjs";
|
|
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
|
+
}
|
|
@@ -2,11 +2,13 @@ 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
4
|
import { DisplayName } from "./DisplayName.mjs";
|
|
5
|
+
import { InboxStatus } from "./InboxStatus.mjs";
|
|
5
6
|
import { UpdateMetadata } from "./UpdateMetadata.mjs";
|
|
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
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
import * as core from "../../../../core/index.mjs";
|
|
3
3
|
import { DisplayName } from "./DisplayName.mjs";
|
|
4
|
+
import { InboxStatus } from "./InboxStatus.mjs";
|
|
4
5
|
import { UpdateMetadata } from "./UpdateMetadata.mjs";
|
|
5
6
|
export const UpdateInboxRequest = core.serialization.object({
|
|
6
7
|
displayName: core.serialization.property("display_name", DisplayName.optional()),
|
|
8
|
+
status: InboxStatus.optional(),
|
|
7
9
|
metadata: UpdateMetadata.optionalNullable(),
|
|
8
10
|
});
|
|
@@ -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";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.5.
|
|
1
|
+
export declare const SDK_VERSION = "0.5.36";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.5.
|
|
1
|
+
export const SDK_VERSION = "0.5.36";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -284,6 +284,9 @@ await client.inboxes.create(undefined);
|
|
|
284
284
|
```bash
|
|
285
285
|
agentmail inboxes update --inbox-id <inbox_id> --display-name "Updated Name"
|
|
286
286
|
```
|
|
287
|
+
|
|
288
|
+
To pause an inbox, set `status` to `paused`; set it back to `active` to
|
|
289
|
+
resume. See [Pausing an inbox](/inboxes#pausing-an-inbox).
|
|
287
290
|
</dd>
|
|
288
291
|
</dl>
|
|
289
292
|
</dd>
|