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
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.37",
|
|
47
|
+
"User-Agent": "agentmail/0.5.37",
|
|
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);
|
|
@@ -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
|
*
|
|
@@ -61,7 +61,7 @@ class AgentClient {
|
|
|
61
61
|
*
|
|
62
62
|
* A 6-digit OTP is sent to the human's email for verification.
|
|
63
63
|
*
|
|
64
|
-
* `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.
|
|
64
|
+
* `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.
|
|
65
65
|
*
|
|
66
66
|
* This endpoint is idempotent. Calling it again with the same `human_email` will rotate the API key and resend the OTP if expired.
|
|
67
67
|
*
|
|
@@ -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
|
}
|
|
@@ -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);
|
|
@@ -197,18 +203,19 @@ class AppsClient {
|
|
|
197
203
|
});
|
|
198
204
|
}
|
|
199
205
|
/**
|
|
200
|
-
* Gets one app by ID
|
|
206
|
+
* Gets one app by ID or slug. A catalog app returns its full entry.
|
|
201
207
|
* A registered app that the catalog does not list returns its ID and
|
|
202
208
|
* name only, without `updated_at`, so anyone holding its ID can still look
|
|
203
|
-
* it up. List Apps and Search Apps show
|
|
209
|
+
* it up; a slug finds catalog apps only. List Apps and Search Apps show
|
|
210
|
+
* catalog entries only.
|
|
204
211
|
*
|
|
205
|
-
* @param {
|
|
212
|
+
* @param {string} app_id - ID of app, or the `slug` of an app in the catalog. A slug ignores case, spaces and punctuation.
|
|
206
213
|
* @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
207
214
|
*
|
|
208
215
|
* @throws {@link AgentMail.NotFoundError}
|
|
209
216
|
*
|
|
210
217
|
* @example
|
|
211
|
-
* await client.apps.get("
|
|
218
|
+
* await client.apps.get("app_id")
|
|
212
219
|
*/
|
|
213
220
|
get(app_id, requestOptions) {
|
|
214
221
|
return core.HttpResponsePromise.fromPromise(this.__get(app_id, requestOptions));
|
|
@@ -220,7 +227,7 @@ class AppsClient {
|
|
|
220
227
|
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);
|
|
221
228
|
const _response = yield core.fetcher({
|
|
222
229
|
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)
|
|
223
|
-
.http, `/v0/apps/${core.url.encodePathParam(
|
|
230
|
+
.http, `/v0/apps/${core.url.encodePathParam(app_id)}`),
|
|
224
231
|
method: "GET",
|
|
225
232
|
headers: _headers,
|
|
226
233
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -266,14 +273,14 @@ class AppsClient {
|
|
|
266
273
|
/**
|
|
267
274
|
* Lists accounts at one app, most recent sign-in first.
|
|
268
275
|
*
|
|
269
|
-
* @param {
|
|
276
|
+
* @param {string} app_id - ID of app, or the `slug` of an app in the catalog. A slug ignores case, spaces and punctuation.
|
|
270
277
|
* @param {AgentMail.ListAppAccountsRequest} request
|
|
271
278
|
* @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
272
279
|
*
|
|
273
280
|
* @throws {@link AgentMail.ValidationError}
|
|
274
281
|
*
|
|
275
282
|
* @example
|
|
276
|
-
* await client.apps.listAccounts("
|
|
283
|
+
* await client.apps.listAccounts("app_id")
|
|
277
284
|
*/
|
|
278
285
|
listAccounts(app_id, request = {}, requestOptions) {
|
|
279
286
|
return core.HttpResponsePromise.fromPromise(this.__listAccounts(app_id, request, requestOptions));
|
|
@@ -290,7 +297,7 @@ class AppsClient {
|
|
|
290
297
|
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);
|
|
291
298
|
const _response = yield core.fetcher({
|
|
292
299
|
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)
|
|
293
|
-
.http, `/v0/apps/${core.url.encodePathParam(
|
|
300
|
+
.http, `/v0/apps/${core.url.encodePathParam(app_id)}/accounts`),
|
|
294
301
|
method: "GET",
|
|
295
302
|
headers: _headers,
|
|
296
303
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -337,11 +344,13 @@ class AppsClient {
|
|
|
337
344
|
* Starts signing an inbox in to an app. Returns a single-use `magic_url`,
|
|
338
345
|
* valid for five minutes, to open in the client that will hold the sign-in;
|
|
339
346
|
* the client enrolls as the inbox and continues to the app.
|
|
347
|
+
* An app in the catalog can be named by its `slug`, as in
|
|
348
|
+
* `POST /v0/apps/firecrawl/connect`.
|
|
340
349
|
* A `404` names the missing resource: `App` or `Inbox`.
|
|
341
350
|
* A `403` `AppSignupLimitError` means the app accepts no more sign-ups from
|
|
342
351
|
* your organization; sign in with an inbox that already has an account there.
|
|
343
352
|
*
|
|
344
|
-
* @param {
|
|
353
|
+
* @param {string} app_id - ID of app, or the `slug` of an app in the catalog. A slug ignores case, spaces and punctuation.
|
|
345
354
|
* @param {AgentMail.ConnectAppBody} request
|
|
346
355
|
* @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
347
356
|
*
|
|
@@ -350,7 +359,7 @@ class AppsClient {
|
|
|
350
359
|
* @throws {@link AgentMail.AppSignupLimitError}
|
|
351
360
|
*
|
|
352
361
|
* @example
|
|
353
|
-
* await client.apps.connect("
|
|
362
|
+
* await client.apps.connect("app_id", undefined)
|
|
354
363
|
*/
|
|
355
364
|
connect(app_id, request, requestOptions) {
|
|
356
365
|
return core.HttpResponsePromise.fromPromise(this.__connect(app_id, request, requestOptions));
|
|
@@ -362,7 +371,7 @@ class AppsClient {
|
|
|
362
371
|
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);
|
|
363
372
|
const _response = yield core.fetcher({
|
|
364
373
|
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)
|
|
365
|
-
.http, `/v0/apps/${core.url.encodePathParam(
|
|
374
|
+
.http, `/v0/apps/${core.url.encodePathParam(app_id)}/connect`),
|
|
366
375
|
method: "POST",
|
|
367
376
|
headers: _headers,
|
|
368
377
|
contentType: "application/json",
|
|
@@ -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
|
}
|
|
@@ -4,6 +4,8 @@ import type * as AgentMail from "../../../index.js";
|
|
|
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,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,17 +1,20 @@
|
|
|
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 {
|
|
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
|
}
|
|
@@ -36,14 +36,17 @@ 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),
|
|
43
|
+
slug: core.serialization.string().optional(),
|
|
42
44
|
name: core.serialization.string().optional(),
|
|
43
45
|
updatedAt: core.serialization.property("updated_at", core.serialization.date().optional()),
|
|
44
46
|
description: core.serialization.string().optional(),
|
|
45
47
|
logoUrl: core.serialization.property("logo_url", core.serialization.string().optional()),
|
|
46
48
|
termsUrl: core.serialization.property("terms_url", core.serialization.string().optional()),
|
|
47
49
|
privacyUrl: core.serialization.property("privacy_url", core.serialization.string().optional()),
|
|
50
|
+
categories: core.serialization.list(AppCategory_js_1.AppCategory).optional(),
|
|
48
51
|
ownerSignupLimit: core.serialization.property("owner_signup_limit", core.serialization.number().optional()),
|
|
49
52
|
});
|
|
@@ -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
|
});
|