agentmail 0.5.27 → 0.5.28
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/accounts/client/Client.d.ts +38 -1
- package/dist/cjs/api/resources/accounts/client/Client.js +111 -1
- package/dist/cjs/api/resources/accounts/types/Account.d.ts +4 -0
- package/dist/cjs/api/resources/accounts/types/AccountStatus.d.ts +8 -0
- package/dist/cjs/api/resources/accounts/types/AccountStatus.js +11 -0
- package/dist/cjs/api/resources/accounts/types/UpdateAccountRequest.d.ts +9 -0
- package/dist/cjs/api/resources/accounts/types/UpdateAccountRequest.js +3 -0
- package/dist/cjs/api/resources/accounts/types/UpdateAccountStatus.d.ts +10 -0
- package/dist/cjs/api/resources/accounts/types/UpdateAccountStatus.js +13 -0
- package/dist/cjs/api/resources/accounts/types/index.d.ts +3 -0
- package/dist/cjs/api/resources/accounts/types/index.js +3 -0
- package/dist/cjs/api/resources/apiKeys/types/ApiKeyPermissions.d.ts +5 -0
- package/dist/cjs/api/resources/inboxes/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/inboxes/client/Client.js +21 -16
- package/dist/cjs/api/resources/inboxes/resources/accounts/client/Client.d.ts +42 -0
- package/dist/cjs/api/resources/inboxes/resources/accounts/client/Client.js +197 -0
- package/dist/cjs/api/resources/inboxes/resources/accounts/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/accounts/client/index.js +17 -0
- package/dist/cjs/api/resources/inboxes/resources/accounts/client/requests/ListAccountsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/inboxes/resources/accounts/client/requests/ListAccountsRequest.js +3 -0
- package/dist/cjs/api/resources/inboxes/resources/accounts/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/accounts/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/inboxes/resources/accounts/exports.d.ts +2 -0
- package/dist/cjs/api/resources/inboxes/resources/accounts/exports.js +21 -0
- package/dist/cjs/api/resources/inboxes/resources/accounts/index.d.ts +1 -0
- package/dist/cjs/api/resources/inboxes/resources/accounts/index.js +17 -0
- package/dist/cjs/api/resources/inboxes/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/inboxes/resources/index.js +3 -1
- package/dist/cjs/api/resources/pods/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/pods/client/Client.js +21 -16
- package/dist/cjs/api/resources/pods/resources/accounts/client/Client.d.ts +42 -0
- package/dist/cjs/api/resources/pods/resources/accounts/client/Client.js +197 -0
- package/dist/cjs/api/resources/pods/resources/accounts/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/pods/resources/accounts/client/index.js +17 -0
- package/dist/cjs/api/resources/pods/resources/accounts/client/requests/ListAccountsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/pods/resources/accounts/client/requests/ListAccountsRequest.js +3 -0
- package/dist/cjs/api/resources/pods/resources/accounts/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/pods/resources/accounts/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/pods/resources/accounts/exports.d.ts +2 -0
- package/dist/cjs/api/resources/pods/resources/accounts/exports.js +21 -0
- package/dist/cjs/api/resources/pods/resources/accounts/index.d.ts +1 -0
- package/dist/cjs/api/resources/pods/resources/accounts/index.js +17 -0
- package/dist/cjs/api/resources/pods/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/pods/resources/index.js +3 -1
- package/dist/cjs/api/resources/webhooks/types/CreateWebhookRequest.d.ts +4 -0
- package/dist/cjs/api/resources/webhooks/types/UpdatePodWebhookRequest.d.ts +5 -1
- package/dist/cjs/serialization/resources/accounts/types/Account.d.ts +3 -0
- package/dist/cjs/serialization/resources/accounts/types/Account.js +3 -0
- package/dist/cjs/serialization/resources/accounts/types/AccountStatus.d.ts +7 -0
- package/dist/cjs/serialization/resources/accounts/types/AccountStatus.js +39 -0
- package/dist/cjs/serialization/resources/accounts/types/UpdateAccountRequest.d.ts +10 -0
- package/dist/cjs/serialization/resources/accounts/types/UpdateAccountRequest.js +42 -0
- package/dist/cjs/serialization/resources/accounts/types/UpdateAccountStatus.d.ts +7 -0
- package/dist/cjs/serialization/resources/accounts/types/UpdateAccountStatus.js +39 -0
- package/dist/cjs/serialization/resources/accounts/types/index.d.ts +3 -0
- package/dist/cjs/serialization/resources/accounts/types/index.js +3 -0
- package/dist/cjs/serialization/resources/apiKeys/types/ApiKeyPermissions.d.ts +1 -0
- package/dist/cjs/serialization/resources/apiKeys/types/ApiKeyPermissions.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/accounts/client/Client.d.mts +38 -1
- package/dist/esm/api/resources/accounts/client/Client.mjs +111 -1
- package/dist/esm/api/resources/accounts/types/Account.d.mts +4 -0
- package/dist/esm/api/resources/accounts/types/AccountStatus.d.mts +8 -0
- package/dist/esm/api/resources/accounts/types/AccountStatus.mjs +8 -0
- package/dist/esm/api/resources/accounts/types/UpdateAccountRequest.d.mts +9 -0
- package/dist/esm/api/resources/accounts/types/UpdateAccountRequest.mjs +2 -0
- package/dist/esm/api/resources/accounts/types/UpdateAccountStatus.d.mts +10 -0
- package/dist/esm/api/resources/accounts/types/UpdateAccountStatus.mjs +10 -0
- package/dist/esm/api/resources/accounts/types/index.d.mts +3 -0
- package/dist/esm/api/resources/accounts/types/index.mjs +3 -0
- package/dist/esm/api/resources/apiKeys/types/ApiKeyPermissions.d.mts +5 -0
- package/dist/esm/api/resources/inboxes/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/inboxes/client/Client.mjs +5 -0
- package/dist/esm/api/resources/inboxes/resources/accounts/client/Client.d.mts +42 -0
- package/dist/esm/api/resources/inboxes/resources/accounts/client/Client.mjs +160 -0
- package/dist/esm/api/resources/inboxes/resources/accounts/client/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/accounts/client/index.mjs +1 -0
- package/dist/esm/api/resources/inboxes/resources/accounts/client/requests/ListAccountsRequest.d.mts +10 -0
- package/dist/esm/api/resources/inboxes/resources/accounts/client/requests/ListAccountsRequest.mjs +2 -0
- package/dist/esm/api/resources/inboxes/resources/accounts/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/accounts/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/inboxes/resources/accounts/exports.d.mts +2 -0
- package/dist/esm/api/resources/inboxes/resources/accounts/exports.mjs +3 -0
- package/dist/esm/api/resources/inboxes/resources/accounts/index.d.mts +1 -0
- package/dist/esm/api/resources/inboxes/resources/accounts/index.mjs +1 -0
- package/dist/esm/api/resources/inboxes/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/inboxes/resources/index.mjs +2 -0
- package/dist/esm/api/resources/pods/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/pods/client/Client.mjs +5 -0
- package/dist/esm/api/resources/pods/resources/accounts/client/Client.d.mts +42 -0
- package/dist/esm/api/resources/pods/resources/accounts/client/Client.mjs +160 -0
- package/dist/esm/api/resources/pods/resources/accounts/client/index.d.mts +1 -0
- package/dist/esm/api/resources/pods/resources/accounts/client/index.mjs +1 -0
- package/dist/esm/api/resources/pods/resources/accounts/client/requests/ListAccountsRequest.d.mts +10 -0
- package/dist/esm/api/resources/pods/resources/accounts/client/requests/ListAccountsRequest.mjs +2 -0
- package/dist/esm/api/resources/pods/resources/accounts/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/pods/resources/accounts/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/pods/resources/accounts/exports.d.mts +2 -0
- package/dist/esm/api/resources/pods/resources/accounts/exports.mjs +3 -0
- package/dist/esm/api/resources/pods/resources/accounts/index.d.mts +1 -0
- package/dist/esm/api/resources/pods/resources/accounts/index.mjs +1 -0
- package/dist/esm/api/resources/pods/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/pods/resources/index.mjs +2 -0
- package/dist/esm/api/resources/webhooks/types/CreateWebhookRequest.d.mts +4 -0
- package/dist/esm/api/resources/webhooks/types/UpdatePodWebhookRequest.d.mts +5 -1
- package/dist/esm/serialization/resources/accounts/types/Account.d.mts +3 -0
- package/dist/esm/serialization/resources/accounts/types/Account.mjs +3 -0
- package/dist/esm/serialization/resources/accounts/types/AccountStatus.d.mts +7 -0
- package/dist/esm/serialization/resources/accounts/types/AccountStatus.mjs +3 -0
- package/dist/esm/serialization/resources/accounts/types/UpdateAccountRequest.d.mts +10 -0
- package/dist/esm/serialization/resources/accounts/types/UpdateAccountRequest.mjs +6 -0
- package/dist/esm/serialization/resources/accounts/types/UpdateAccountStatus.d.mts +7 -0
- package/dist/esm/serialization/resources/accounts/types/UpdateAccountStatus.mjs +3 -0
- package/dist/esm/serialization/resources/accounts/types/index.d.mts +3 -0
- package/dist/esm/serialization/resources/accounts/types/index.mjs +3 -0
- package/dist/esm/serialization/resources/apiKeys/types/ApiKeyPermissions.d.mts +1 -0
- package/dist/esm/serialization/resources/apiKeys/types/ApiKeyPermissions.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/llms.txt +8 -2
- package/package.json +23 -1
- package/reference.md +393 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests/index.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { ListAccountsRequest } from "./ListAccountsRequest.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.AccountsClient = void 0;
|
|
19
|
+
var Client_js_1 = require("./client/Client.js");
|
|
20
|
+
Object.defineProperty(exports, "AccountsClient", { enumerable: true, get: function () { return Client_js_1.AccountsClient; } });
|
|
21
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -36,7 +36,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.webhooks = exports.threads = exports.metrics = exports.messages = exports.lists = exports.events = exports.drafts = exports.apiKeys = void 0;
|
|
39
|
+
exports.webhooks = exports.threads = exports.metrics = exports.messages = exports.lists = exports.events = exports.drafts = exports.apiKeys = exports.accounts = void 0;
|
|
40
|
+
__exportStar(require("./accounts/client/requests/index.js"), exports);
|
|
41
|
+
exports.accounts = __importStar(require("./accounts/index.js"));
|
|
40
42
|
__exportStar(require("./apiKeys/client/requests/index.js"), exports);
|
|
41
43
|
exports.apiKeys = __importStar(require("./apiKeys/index.js"));
|
|
42
44
|
__exportStar(require("./drafts/client/requests/index.js"), exports);
|
|
@@ -2,6 +2,7 @@ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClie
|
|
|
2
2
|
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
3
|
import * as core from "../../../../core/index.js";
|
|
4
4
|
import * as AgentMail from "../../../index.js";
|
|
5
|
+
import { AccountsClient } from "../resources/accounts/client/Client.js";
|
|
5
6
|
import { ApiKeysClient } from "../resources/apiKeys/client/Client.js";
|
|
6
7
|
import { DomainsClient } from "../resources/domains/client/Client.js";
|
|
7
8
|
import { DraftsClient } from "../resources/drafts/client/Client.js";
|
|
@@ -25,6 +26,7 @@ export declare class PodsClient {
|
|
|
25
26
|
protected _lists: ListsClient | undefined;
|
|
26
27
|
protected _metrics: MetricsClient | undefined;
|
|
27
28
|
protected _apiKeys: ApiKeysClient | undefined;
|
|
29
|
+
protected _accounts: AccountsClient | undefined;
|
|
28
30
|
constructor(options?: PodsClient.Options);
|
|
29
31
|
get inboxes(): InboxesClient;
|
|
30
32
|
get threads(): ThreadsClient;
|
|
@@ -34,6 +36,7 @@ export declare class PodsClient {
|
|
|
34
36
|
get lists(): ListsClient;
|
|
35
37
|
get metrics(): MetricsClient;
|
|
36
38
|
get apiKeys(): ApiKeysClient;
|
|
39
|
+
get accounts(): AccountsClient;
|
|
37
40
|
/**
|
|
38
41
|
* **CLI:**
|
|
39
42
|
* ```bash
|
|
@@ -52,49 +52,54 @@ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatu
|
|
|
52
52
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
53
53
|
const serializers = __importStar(require("../../../../serialization/index.js"));
|
|
54
54
|
const AgentMail = __importStar(require("../../../index.js"));
|
|
55
|
-
const Client_js_1 = require("../resources/
|
|
56
|
-
const Client_js_2 = require("../resources/
|
|
57
|
-
const Client_js_3 = require("../resources/
|
|
58
|
-
const Client_js_4 = require("../resources/
|
|
59
|
-
const Client_js_5 = require("../resources/
|
|
60
|
-
const Client_js_6 = require("../resources/
|
|
61
|
-
const Client_js_7 = require("../resources/
|
|
62
|
-
const Client_js_8 = require("../resources/
|
|
55
|
+
const Client_js_1 = require("../resources/accounts/client/Client.js");
|
|
56
|
+
const Client_js_2 = require("../resources/apiKeys/client/Client.js");
|
|
57
|
+
const Client_js_3 = require("../resources/domains/client/Client.js");
|
|
58
|
+
const Client_js_4 = require("../resources/drafts/client/Client.js");
|
|
59
|
+
const Client_js_5 = require("../resources/inboxes/client/Client.js");
|
|
60
|
+
const Client_js_6 = require("../resources/lists/client/Client.js");
|
|
61
|
+
const Client_js_7 = require("../resources/metrics/client/Client.js");
|
|
62
|
+
const Client_js_8 = require("../resources/threads/client/Client.js");
|
|
63
|
+
const Client_js_9 = require("../resources/webhooks/client/Client.js");
|
|
63
64
|
class PodsClient {
|
|
64
65
|
constructor(options = {}) {
|
|
65
66
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
66
67
|
}
|
|
67
68
|
get inboxes() {
|
|
68
69
|
var _a;
|
|
69
|
-
return ((_a = this._inboxes) !== null && _a !== void 0 ? _a : (this._inboxes = new
|
|
70
|
+
return ((_a = this._inboxes) !== null && _a !== void 0 ? _a : (this._inboxes = new Client_js_5.InboxesClient(this._options)));
|
|
70
71
|
}
|
|
71
72
|
get threads() {
|
|
72
73
|
var _a;
|
|
73
|
-
return ((_a = this._threads) !== null && _a !== void 0 ? _a : (this._threads = new
|
|
74
|
+
return ((_a = this._threads) !== null && _a !== void 0 ? _a : (this._threads = new Client_js_8.ThreadsClient(this._options)));
|
|
74
75
|
}
|
|
75
76
|
get drafts() {
|
|
76
77
|
var _a;
|
|
77
|
-
return ((_a = this._drafts) !== null && _a !== void 0 ? _a : (this._drafts = new
|
|
78
|
+
return ((_a = this._drafts) !== null && _a !== void 0 ? _a : (this._drafts = new Client_js_4.DraftsClient(this._options)));
|
|
78
79
|
}
|
|
79
80
|
get webhooks() {
|
|
80
81
|
var _a;
|
|
81
|
-
return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new
|
|
82
|
+
return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Client_js_9.WebhooksClient(this._options)));
|
|
82
83
|
}
|
|
83
84
|
get domains() {
|
|
84
85
|
var _a;
|
|
85
|
-
return ((_a = this._domains) !== null && _a !== void 0 ? _a : (this._domains = new
|
|
86
|
+
return ((_a = this._domains) !== null && _a !== void 0 ? _a : (this._domains = new Client_js_3.DomainsClient(this._options)));
|
|
86
87
|
}
|
|
87
88
|
get lists() {
|
|
88
89
|
var _a;
|
|
89
|
-
return ((_a = this._lists) !== null && _a !== void 0 ? _a : (this._lists = new
|
|
90
|
+
return ((_a = this._lists) !== null && _a !== void 0 ? _a : (this._lists = new Client_js_6.ListsClient(this._options)));
|
|
90
91
|
}
|
|
91
92
|
get metrics() {
|
|
92
93
|
var _a;
|
|
93
|
-
return ((_a = this._metrics) !== null && _a !== void 0 ? _a : (this._metrics = new
|
|
94
|
+
return ((_a = this._metrics) !== null && _a !== void 0 ? _a : (this._metrics = new Client_js_7.MetricsClient(this._options)));
|
|
94
95
|
}
|
|
95
96
|
get apiKeys() {
|
|
96
97
|
var _a;
|
|
97
|
-
return ((_a = this._apiKeys) !== null && _a !== void 0 ? _a : (this._apiKeys = new
|
|
98
|
+
return ((_a = this._apiKeys) !== null && _a !== void 0 ? _a : (this._apiKeys = new Client_js_2.ApiKeysClient(this._options)));
|
|
99
|
+
}
|
|
100
|
+
get accounts() {
|
|
101
|
+
var _a;
|
|
102
|
+
return ((_a = this._accounts) !== null && _a !== void 0 ? _a : (this._accounts = new Client_js_1.AccountsClient(this._options)));
|
|
98
103
|
}
|
|
99
104
|
/**
|
|
100
105
|
* **CLI:**
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
|
|
3
|
+
import * as core from "../../../../../../core/index.js";
|
|
4
|
+
import * as AgentMail from "../../../../../index.js";
|
|
5
|
+
export declare namespace AccountsClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class AccountsClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<AccountsClient.Options>;
|
|
12
|
+
constructor(options?: AccountsClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Lists accounts held by inboxes in the pod, across all providers. Requires `inbox_read`.
|
|
15
|
+
*
|
|
16
|
+
* @param {AgentMail.pods.PodId} pod_id
|
|
17
|
+
* @param {AgentMail.pods.ListAccountsRequest} request
|
|
18
|
+
* @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
19
|
+
*
|
|
20
|
+
* @throws {@link AgentMail.ValidationError}
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* await client.pods.accounts.list("pod_id")
|
|
24
|
+
*/
|
|
25
|
+
list(pod_id: AgentMail.pods.PodId, request?: AgentMail.pods.ListAccountsRequest, requestOptions?: AccountsClient.RequestOptions): core.HttpResponsePromise<AgentMail.ListAccountsResponse>;
|
|
26
|
+
private __list;
|
|
27
|
+
/**
|
|
28
|
+
* Returns one account held by inboxes in the pod. An account elsewhere is a 404. Requires
|
|
29
|
+
* `inbox_read`.
|
|
30
|
+
*
|
|
31
|
+
* @param {AgentMail.pods.PodId} pod_id
|
|
32
|
+
* @param {AgentMail.AccountId} account_id
|
|
33
|
+
* @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
34
|
+
*
|
|
35
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* await client.pods.accounts.get("pod_id", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
|
39
|
+
*/
|
|
40
|
+
get(pod_id: AgentMail.pods.PodId, account_id: AgentMail.AccountId, requestOptions?: AccountsClient.RequestOptions): core.HttpResponsePromise<AgentMail.Account>;
|
|
41
|
+
private __get;
|
|
42
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.AccountsClient = void 0;
|
|
47
|
+
const BaseClient_js_1 = require("../../../../../../BaseClient.js");
|
|
48
|
+
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
49
|
+
const core = __importStar(require("../../../../../../core/index.js"));
|
|
50
|
+
const environments = __importStar(require("../../../../../../environments.js"));
|
|
51
|
+
const handleNonStatusCodeError_js_1 = require("../../../../../../errors/handleNonStatusCodeError.js");
|
|
52
|
+
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
53
|
+
const serializers = __importStar(require("../../../../../../serialization/index.js"));
|
|
54
|
+
const AgentMail = __importStar(require("../../../../../index.js"));
|
|
55
|
+
class AccountsClient {
|
|
56
|
+
constructor(options = {}) {
|
|
57
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Lists accounts held by inboxes in the pod, across all providers. Requires `inbox_read`.
|
|
61
|
+
*
|
|
62
|
+
* @param {AgentMail.pods.PodId} pod_id
|
|
63
|
+
* @param {AgentMail.pods.ListAccountsRequest} request
|
|
64
|
+
* @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
65
|
+
*
|
|
66
|
+
* @throws {@link AgentMail.ValidationError}
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* await client.pods.accounts.list("pod_id")
|
|
70
|
+
*/
|
|
71
|
+
list(pod_id, request = {}, requestOptions) {
|
|
72
|
+
return core.HttpResponsePromise.fromPromise(this.__list(pod_id, request, requestOptions));
|
|
73
|
+
}
|
|
74
|
+
__list(pod_id_1) {
|
|
75
|
+
return __awaiter(this, arguments, void 0, function* (pod_id, request = {}, requestOptions) {
|
|
76
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
77
|
+
const { limit, pageToken, ascending } = request;
|
|
78
|
+
const _queryParams = {
|
|
79
|
+
limit,
|
|
80
|
+
page_token: pageToken,
|
|
81
|
+
ascending,
|
|
82
|
+
};
|
|
83
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
84
|
+
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);
|
|
85
|
+
const _response = yield core.fetcher({
|
|
86
|
+
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)
|
|
87
|
+
.http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/accounts`),
|
|
88
|
+
method: "GET",
|
|
89
|
+
headers: _headers,
|
|
90
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
91
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
92
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
93
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
94
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
95
|
+
logging: this._options.logging,
|
|
96
|
+
});
|
|
97
|
+
if (_response.ok) {
|
|
98
|
+
return {
|
|
99
|
+
data: serializers.ListAccountsResponse.parseOrThrow(_response.body, {
|
|
100
|
+
unrecognizedObjectKeys: "passthrough",
|
|
101
|
+
allowUnrecognizedUnionMembers: true,
|
|
102
|
+
allowUnrecognizedEnumValues: true,
|
|
103
|
+
skipValidation: true,
|
|
104
|
+
breadcrumbsPrefix: ["response"],
|
|
105
|
+
}),
|
|
106
|
+
rawResponse: _response.rawResponse,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
if (_response.error.reason === "status-code") {
|
|
110
|
+
switch (_response.error.statusCode) {
|
|
111
|
+
case 400:
|
|
112
|
+
throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
|
|
113
|
+
unrecognizedObjectKeys: "passthrough",
|
|
114
|
+
allowUnrecognizedUnionMembers: true,
|
|
115
|
+
allowUnrecognizedEnumValues: true,
|
|
116
|
+
skipValidation: true,
|
|
117
|
+
breadcrumbsPrefix: ["response"],
|
|
118
|
+
}), _response.rawResponse);
|
|
119
|
+
default:
|
|
120
|
+
throw new errors.AgentMailError({
|
|
121
|
+
statusCode: _response.error.statusCode,
|
|
122
|
+
body: _response.error.body,
|
|
123
|
+
rawResponse: _response.rawResponse,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v0/pods/{pod_id}/accounts");
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Returns one account held by inboxes in the pod. An account elsewhere is a 404. Requires
|
|
132
|
+
* `inbox_read`.
|
|
133
|
+
*
|
|
134
|
+
* @param {AgentMail.pods.PodId} pod_id
|
|
135
|
+
* @param {AgentMail.AccountId} account_id
|
|
136
|
+
* @param {AccountsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
137
|
+
*
|
|
138
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* await client.pods.accounts.get("pod_id", "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
|
142
|
+
*/
|
|
143
|
+
get(pod_id, account_id, requestOptions) {
|
|
144
|
+
return core.HttpResponsePromise.fromPromise(this.__get(pod_id, account_id, requestOptions));
|
|
145
|
+
}
|
|
146
|
+
__get(pod_id, account_id, requestOptions) {
|
|
147
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
148
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
149
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
150
|
+
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);
|
|
151
|
+
const _response = yield core.fetcher({
|
|
152
|
+
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)
|
|
153
|
+
.http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/accounts/${core.url.encodePathParam(serializers.AccountId.jsonOrThrow(account_id, { omitUndefined: true }))}`),
|
|
154
|
+
method: "GET",
|
|
155
|
+
headers: _headers,
|
|
156
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
157
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
158
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
159
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
160
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
161
|
+
logging: this._options.logging,
|
|
162
|
+
});
|
|
163
|
+
if (_response.ok) {
|
|
164
|
+
return {
|
|
165
|
+
data: serializers.Account.parseOrThrow(_response.body, {
|
|
166
|
+
unrecognizedObjectKeys: "passthrough",
|
|
167
|
+
allowUnrecognizedUnionMembers: true,
|
|
168
|
+
allowUnrecognizedEnumValues: true,
|
|
169
|
+
skipValidation: true,
|
|
170
|
+
breadcrumbsPrefix: ["response"],
|
|
171
|
+
}),
|
|
172
|
+
rawResponse: _response.rawResponse,
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
if (_response.error.reason === "status-code") {
|
|
176
|
+
switch (_response.error.statusCode) {
|
|
177
|
+
case 404:
|
|
178
|
+
throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
179
|
+
unrecognizedObjectKeys: "passthrough",
|
|
180
|
+
allowUnrecognizedUnionMembers: true,
|
|
181
|
+
allowUnrecognizedEnumValues: true,
|
|
182
|
+
skipValidation: true,
|
|
183
|
+
breadcrumbsPrefix: ["response"],
|
|
184
|
+
}), _response.rawResponse);
|
|
185
|
+
default:
|
|
186
|
+
throw new errors.AgentMailError({
|
|
187
|
+
statusCode: _response.error.statusCode,
|
|
188
|
+
body: _response.error.body,
|
|
189
|
+
rawResponse: _response.rawResponse,
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v0/pods/{pod_id}/accounts/{account_id}");
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
exports.AccountsClient = AccountsClient;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests/index.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { ListAccountsRequest } from "./ListAccountsRequest.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.AccountsClient = void 0;
|
|
19
|
+
var Client_js_1 = require("./client/Client.js");
|
|
20
|
+
Object.defineProperty(exports, "AccountsClient", { enumerable: true, get: function () { return Client_js_1.AccountsClient; } });
|
|
21
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -36,7 +36,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.webhooks = exports.threads = exports.metrics = exports.lists = exports.inboxes = exports.drafts = exports.domains = exports.apiKeys = void 0;
|
|
39
|
+
exports.webhooks = exports.threads = exports.metrics = exports.lists = exports.inboxes = exports.drafts = exports.domains = exports.apiKeys = exports.accounts = void 0;
|
|
40
|
+
__exportStar(require("./accounts/client/requests/index.js"), exports);
|
|
41
|
+
exports.accounts = __importStar(require("./accounts/index.js"));
|
|
40
42
|
__exportStar(require("./apiKeys/client/requests/index.js"), exports);
|
|
41
43
|
exports.apiKeys = __importStar(require("./apiKeys/index.js"));
|
|
42
44
|
__exportStar(require("./domains/client/requests/index.js"), exports);
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type * as AgentMail from "../../../index.js";
|
|
2
2
|
export interface CreateWebhookRequest extends AgentMail.webhooks.CreatePodWebhookRequest {
|
|
3
|
+
/**
|
|
4
|
+
* Pods for which to send events. Maximum 10 per webhook. The webhook receives an event that matches
|
|
5
|
+
* any listed pod or inbox, so a listed pod already covers every inbox in it.
|
|
6
|
+
*/
|
|
3
7
|
podIds?: AgentMail.PodIds;
|
|
4
8
|
}
|
|
@@ -4,7 +4,11 @@ import type * as AgentMail from "../../../index.js";
|
|
|
4
4
|
* its `event_types`, but not the pod scope itself.
|
|
5
5
|
*/
|
|
6
6
|
export interface UpdatePodWebhookRequest extends AgentMail.webhooks.UpdateInboxWebhookRequest {
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Inbox IDs to subscribe to the webhook. This only adds to what the webhook receives: on a webhook
|
|
9
|
+
* that covers its whole pod, it changes nothing. To receive only specific inboxes, create a webhook
|
|
10
|
+
* with `inbox_ids` instead.
|
|
11
|
+
*/
|
|
8
12
|
addInboxIds?: AgentMail.InboxIds;
|
|
9
13
|
/** Inbox IDs to unsubscribe from the webhook. */
|
|
10
14
|
removeInboxIds?: AgentMail.InboxIds;
|
|
@@ -5,6 +5,7 @@ import { OrganizationId } from "../../../types/OrganizationId.js";
|
|
|
5
5
|
import { InboxId } from "../../inboxes/types/InboxId.js";
|
|
6
6
|
import { PodId } from "../../pods/types/PodId.js";
|
|
7
7
|
import { AccountId } from "./AccountId.js";
|
|
8
|
+
import { AccountStatus } from "./AccountStatus.js";
|
|
8
9
|
import { ProviderId } from "./ProviderId.js";
|
|
9
10
|
export declare const Account: core.serialization.ObjectSchema<serializers.Account.Raw, AgentMail.Account>;
|
|
10
11
|
export declare namespace Account {
|
|
@@ -18,5 +19,7 @@ export declare namespace Account {
|
|
|
18
19
|
first_signed_in_at: string;
|
|
19
20
|
last_signed_in_at: string;
|
|
20
21
|
sign_in_count: number;
|
|
22
|
+
status?: AccountStatus.Raw | null;
|
|
23
|
+
disabled_at?: string | null;
|
|
21
24
|
}
|
|
22
25
|
}
|
|
@@ -40,6 +40,7 @@ const OrganizationId_js_1 = require("../../../types/OrganizationId.js");
|
|
|
40
40
|
const InboxId_js_1 = require("../../inboxes/types/InboxId.js");
|
|
41
41
|
const PodId_js_1 = require("../../pods/types/PodId.js");
|
|
42
42
|
const AccountId_js_1 = require("./AccountId.js");
|
|
43
|
+
const AccountStatus_js_1 = require("./AccountStatus.js");
|
|
43
44
|
const ProviderId_js_1 = require("./ProviderId.js");
|
|
44
45
|
exports.Account = core.serialization.object({
|
|
45
46
|
accountId: core.serialization.property("account_id", AccountId_js_1.AccountId),
|
|
@@ -51,4 +52,6 @@ exports.Account = core.serialization.object({
|
|
|
51
52
|
firstSignedInAt: core.serialization.property("first_signed_in_at", core.serialization.date()),
|
|
52
53
|
lastSignedInAt: core.serialization.property("last_signed_in_at", core.serialization.date()),
|
|
53
54
|
signInCount: core.serialization.property("sign_in_count", core.serialization.number()),
|
|
55
|
+
status: AccountStatus_js_1.AccountStatus.optional(),
|
|
56
|
+
disabledAt: core.serialization.property("disabled_at", core.serialization.date().optional()),
|
|
54
57
|
});
|
|
@@ -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 AccountStatus: core.serialization.Schema<serializers.AccountStatus.Raw, AgentMail.AccountStatus>;
|
|
5
|
+
export declare namespace AccountStatus {
|
|
6
|
+
type Raw = "disabled";
|
|
7
|
+
}
|