agentmail 0.5.32 → 0.5.33
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/Client.d.ts +3 -3
- package/dist/cjs/Client.js +21 -21
- package/dist/cjs/api/resources/accounts/client/Client.d.ts +6 -6
- package/dist/cjs/api/resources/accounts/client/Client.js +6 -6
- package/dist/cjs/api/resources/accounts/types/Account.d.ts +7 -7
- package/dist/cjs/api/resources/accounts/types/UpdateAccountStatus.d.ts +1 -1
- package/dist/cjs/api/resources/accounts/types/UpdateAccountStatus.js +1 -1
- package/dist/cjs/api/resources/accounts/types/index.d.ts +0 -1
- package/dist/cjs/api/resources/accounts/types/index.js +0 -1
- package/dist/cjs/api/resources/apiKeys/types/AcceptDisclosure.d.ts +1 -1
- package/dist/cjs/api/resources/apiKeys/types/ApiKeyPermissions.d.ts +2 -0
- package/dist/cjs/api/resources/apps/client/Client.d.ts +92 -0
- package/dist/cjs/api/resources/{providers → apps}/client/Client.js +67 -51
- package/dist/cjs/api/resources/{providers/client/requests/ListProviderAccountsRequest.d.ts → apps/client/requests/ListAppAccountsRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/{providers/client/requests/ListProvidersRequest.d.ts → apps/client/requests/ListAppsRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/{providers/client/requests/SearchProvidersRequest.d.ts → apps/client/requests/SearchAppsRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/apps/client/requests/index.d.ts +3 -0
- package/dist/cjs/api/resources/apps/errors/AppSignupLimitError.d.ts +6 -0
- package/dist/cjs/api/resources/apps/errors/AppSignupLimitError.js +54 -0
- package/dist/cjs/api/resources/apps/errors/index.d.ts +1 -0
- package/dist/cjs/api/resources/apps/errors/index.js +17 -0
- package/dist/cjs/api/resources/apps/exports.d.ts +2 -0
- package/dist/cjs/api/resources/{providers → apps}/exports.js +2 -2
- package/dist/cjs/{serialization/resources/providers → api/resources/apps}/index.d.ts +1 -0
- package/dist/cjs/{serialization/resources/providers → api/resources/apps}/index.js +1 -0
- package/dist/cjs/api/resources/apps/types/App.d.ts +16 -0
- package/dist/cjs/api/resources/apps/types/AppId.d.ts +4 -0
- package/dist/cjs/api/resources/{providers/types/ConnectProviderBody.d.ts → apps/types/ConnectAppBody.d.ts} +1 -1
- package/dist/cjs/api/resources/{providers/types/ListProviderAccountsResponse.d.ts → apps/types/ListAppAccountsResponse.d.ts} +2 -2
- package/dist/cjs/api/resources/{providers/types/ListProvidersResponse.d.ts → apps/types/ListAppsResponse.d.ts} +2 -2
- package/dist/cjs/api/resources/{providers/types/SearchProvidersResponse.d.ts → apps/types/SearchAppsResponse.d.ts} +2 -2
- package/dist/cjs/api/resources/apps/types/index.d.ts +9 -0
- package/dist/cjs/{serialization/resources/providers → api/resources/apps}/types/index.js +6 -5
- package/dist/cjs/api/resources/inboxes/client/Client.d.ts +3 -1
- package/dist/cjs/api/resources/inboxes/client/Client.js +11 -1
- package/dist/cjs/api/resources/inboxes/resources/accounts/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/inboxes/resources/accounts/client/Client.js +1 -1
- package/dist/cjs/api/resources/index.d.ts +4 -3
- package/dist/cjs/api/resources/index.js +5 -4
- package/dist/cjs/api/resources/pods/resources/accounts/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/pods/resources/accounts/client/Client.js +1 -1
- package/dist/cjs/serialization/resources/accounts/types/Account.d.ts +3 -3
- package/dist/cjs/serialization/resources/accounts/types/Account.js +3 -3
- package/dist/cjs/serialization/resources/accounts/types/index.d.ts +0 -1
- package/dist/cjs/serialization/resources/accounts/types/index.js +0 -1
- 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/serialization/resources/{providers → apps}/client/connect.d.ts +3 -3
- package/dist/cjs/serialization/resources/{providers → apps}/client/connect.js +2 -2
- package/dist/cjs/serialization/resources/{providers/types/Provider.d.ts → apps/types/App.d.ts} +4 -4
- package/dist/cjs/serialization/resources/{providers/types/Provider.js → apps/types/App.js} +4 -4
- package/dist/cjs/serialization/resources/{accounts/types/ProviderId.d.ts → apps/types/AppId.d.ts} +2 -2
- package/dist/cjs/serialization/resources/{accounts/types/ProviderId.js → apps/types/AppId.js} +2 -2
- package/dist/cjs/serialization/resources/{providers/types/ConnectProviderBody.d.ts → apps/types/ConnectAppBody.d.ts} +2 -2
- package/dist/cjs/serialization/resources/{providers/types/ConnectProviderBody.js → apps/types/ConnectAppBody.js} +2 -2
- package/dist/cjs/serialization/resources/{providers/types/ListProviderAccountsResponse.d.ts → apps/types/ListAppAccountsResponse.d.ts} +4 -4
- package/dist/cjs/serialization/resources/{providers/types/ListProviderAccountsResponse.js → apps/types/ListAppAccountsResponse.js} +4 -4
- package/dist/cjs/serialization/resources/{providers/types/ListProvidersResponse.d.ts → apps/types/ListAppsResponse.d.ts} +4 -4
- package/dist/cjs/serialization/resources/{providers/types/ListProvidersResponse.js → apps/types/ListAppsResponse.js} +4 -4
- package/dist/cjs/serialization/resources/{providers/types/SearchProvidersResponse.d.ts → apps/types/SearchAppsResponse.d.ts} +4 -4
- package/dist/cjs/serialization/resources/{providers/types/SearchProvidersResponse.js → apps/types/SearchAppsResponse.js} +4 -4
- package/dist/cjs/serialization/resources/apps/types/index.d.ts +9 -0
- package/dist/cjs/{api/resources/providers → serialization/resources/apps}/types/index.js +6 -5
- package/dist/cjs/serialization/resources/index.d.ts +2 -2
- package/dist/cjs/serialization/resources/index.js +3 -3
- 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/Client.d.mts +3 -3
- package/dist/esm/Client.mjs +5 -5
- package/dist/esm/api/resources/accounts/client/Client.d.mts +6 -6
- package/dist/esm/api/resources/accounts/client/Client.mjs +6 -6
- package/dist/esm/api/resources/accounts/types/Account.d.mts +7 -7
- package/dist/esm/api/resources/accounts/types/UpdateAccountStatus.d.mts +1 -1
- package/dist/esm/api/resources/accounts/types/UpdateAccountStatus.mjs +1 -1
- package/dist/esm/api/resources/accounts/types/index.d.mts +0 -1
- package/dist/esm/api/resources/accounts/types/index.mjs +0 -1
- package/dist/esm/api/resources/apiKeys/types/AcceptDisclosure.d.mts +1 -1
- package/dist/esm/api/resources/apiKeys/types/ApiKeyPermissions.d.mts +2 -0
- package/dist/esm/api/resources/apps/client/Client.d.mts +92 -0
- package/dist/esm/api/resources/{providers → apps}/client/Client.mjs +65 -49
- package/dist/esm/api/resources/{providers/client/requests/ListProviderAccountsRequest.d.mts → apps/client/requests/ListAppAccountsRequest.d.mts} +1 -1
- package/dist/esm/api/resources/{providers/client/requests/ListProvidersRequest.d.mts → apps/client/requests/ListAppsRequest.d.mts} +1 -1
- package/dist/esm/api/resources/{providers/client/requests/SearchProvidersRequest.d.mts → apps/client/requests/SearchAppsRequest.d.mts} +1 -1
- package/dist/esm/api/resources/apps/client/requests/index.d.mts +3 -0
- package/dist/esm/api/resources/apps/errors/AppSignupLimitError.d.mts +6 -0
- package/dist/esm/api/resources/apps/errors/AppSignupLimitError.mjs +17 -0
- package/dist/esm/api/resources/apps/errors/index.d.mts +1 -0
- package/dist/esm/api/resources/apps/errors/index.mjs +1 -0
- package/dist/esm/api/resources/apps/exports.d.mts +2 -0
- package/dist/esm/api/resources/{providers → apps}/exports.mjs +1 -1
- package/dist/esm/{serialization/resources/providers → api/resources/apps}/index.d.mts +1 -0
- package/dist/esm/{serialization/resources/providers → api/resources/apps}/index.mjs +1 -0
- package/dist/esm/api/resources/apps/types/App.d.mts +16 -0
- package/dist/esm/api/resources/apps/types/AppId.d.mts +4 -0
- package/dist/esm/api/resources/{providers/types/ConnectProviderBody.d.mts → apps/types/ConnectAppBody.d.mts} +1 -1
- package/dist/esm/api/resources/{providers/types/ListProviderAccountsResponse.d.mts → apps/types/ListAppAccountsResponse.d.mts} +2 -2
- package/dist/esm/api/resources/{providers/types/ListProvidersResponse.d.mts → apps/types/ListAppsResponse.d.mts} +2 -2
- package/dist/esm/api/resources/{providers/types/SearchProvidersResponse.d.mts → apps/types/SearchAppsResponse.d.mts} +2 -2
- package/dist/esm/api/resources/apps/types/index.d.mts +9 -0
- package/dist/esm/api/resources/apps/types/index.mjs +9 -0
- package/dist/esm/api/resources/inboxes/client/Client.d.mts +3 -1
- package/dist/esm/api/resources/inboxes/client/Client.mjs +11 -1
- package/dist/esm/api/resources/inboxes/resources/accounts/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/inboxes/resources/accounts/client/Client.mjs +1 -1
- package/dist/esm/api/resources/index.d.mts +4 -3
- package/dist/esm/api/resources/index.mjs +4 -3
- package/dist/esm/api/resources/pods/resources/accounts/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/pods/resources/accounts/client/Client.mjs +1 -1
- package/dist/esm/serialization/resources/accounts/types/Account.d.mts +3 -3
- package/dist/esm/serialization/resources/accounts/types/Account.mjs +3 -3
- package/dist/esm/serialization/resources/accounts/types/index.d.mts +0 -1
- package/dist/esm/serialization/resources/accounts/types/index.mjs +0 -1
- 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/serialization/resources/{providers → apps}/client/connect.d.mts +3 -3
- package/dist/esm/serialization/resources/apps/client/connect.mjs +3 -0
- package/dist/esm/serialization/resources/{providers/types/Provider.d.mts → apps/types/App.d.mts} +4 -4
- package/dist/esm/serialization/resources/{providers/types/Provider.mjs → apps/types/App.mjs} +3 -3
- package/dist/esm/serialization/resources/{accounts/types/ProviderId.d.mts → apps/types/AppId.d.mts} +2 -2
- package/dist/esm/serialization/resources/{accounts/types/ProviderId.mjs → apps/types/AppId.mjs} +1 -1
- package/dist/esm/serialization/resources/{providers/types/ConnectProviderBody.d.mts → apps/types/ConnectAppBody.d.mts} +2 -2
- package/dist/esm/serialization/resources/{providers/types/ConnectProviderBody.mjs → apps/types/ConnectAppBody.mjs} +1 -1
- package/dist/esm/serialization/resources/{providers/types/ListProviderAccountsResponse.d.mts → apps/types/ListAppAccountsResponse.d.mts} +4 -4
- package/dist/esm/serialization/resources/{providers/types/ListProviderAccountsResponse.mjs → apps/types/ListAppAccountsResponse.mjs} +3 -3
- package/dist/esm/serialization/resources/{providers/types/ListProvidersResponse.d.mts → apps/types/ListAppsResponse.d.mts} +4 -4
- package/dist/esm/serialization/resources/{providers/types/ListProvidersResponse.mjs → apps/types/ListAppsResponse.mjs} +3 -3
- package/dist/esm/serialization/resources/{providers/types/SearchProvidersResponse.d.mts → apps/types/SearchAppsResponse.d.mts} +4 -4
- package/dist/esm/serialization/resources/{providers/types/SearchProvidersResponse.mjs → apps/types/SearchAppsResponse.mjs} +3 -3
- package/dist/esm/serialization/resources/apps/types/index.d.mts +9 -0
- package/dist/esm/serialization/resources/apps/types/index.mjs +9 -0
- package/dist/esm/serialization/resources/index.d.mts +2 -2
- package/dist/esm/serialization/resources/index.mjs +2 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/llms.txt +2 -1
- package/package.json +12 -12
- package/reference.md +1227 -1207
- package/dist/cjs/api/resources/accounts/types/ProviderId.d.ts +0 -4
- package/dist/cjs/api/resources/providers/client/Client.d.ts +0 -84
- package/dist/cjs/api/resources/providers/client/requests/index.d.ts +0 -3
- package/dist/cjs/api/resources/providers/exports.d.ts +0 -2
- package/dist/cjs/api/resources/providers/types/Provider.d.ts +0 -16
- package/dist/cjs/api/resources/providers/types/index.d.ts +0 -8
- package/dist/cjs/serialization/resources/providers/types/index.d.ts +0 -8
- package/dist/esm/api/resources/accounts/types/ProviderId.d.mts +0 -4
- package/dist/esm/api/resources/providers/client/Client.d.mts +0 -84
- package/dist/esm/api/resources/providers/client/requests/index.d.mts +0 -3
- package/dist/esm/api/resources/providers/exports.d.mts +0 -2
- package/dist/esm/api/resources/providers/types/Provider.d.mts +0 -16
- package/dist/esm/api/resources/providers/types/index.d.mts +0 -8
- package/dist/esm/api/resources/providers/types/index.mjs +0 -8
- package/dist/esm/serialization/resources/providers/client/connect.mjs +0 -3
- package/dist/esm/serialization/resources/providers/types/index.d.mts +0 -8
- package/dist/esm/serialization/resources/providers/types/index.mjs +0 -8
- /package/dist/cjs/api/resources/{providers → apps}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{providers → apps}/client/index.js +0 -0
- /package/dist/cjs/api/resources/{accounts/types/ProviderId.js → apps/client/requests/ListAppAccountsRequest.js} +0 -0
- /package/dist/cjs/api/resources/{providers/client/requests/ListProviderAccountsRequest.js → apps/client/requests/ListAppsRequest.js} +0 -0
- /package/dist/cjs/api/resources/{providers/client/requests/ListProvidersRequest.js → apps/client/requests/SearchAppsRequest.js} +0 -0
- /package/dist/cjs/api/resources/{providers → apps}/client/requests/index.js +0 -0
- /package/dist/cjs/api/resources/{providers/client/requests/SearchProvidersRequest.js → apps/types/App.js} +0 -0
- /package/dist/cjs/api/resources/{providers/types/ConnectAccepted.js → apps/types/AppId.js} +0 -0
- /package/dist/cjs/api/resources/{providers → apps}/types/ConnectAccepted.d.ts +0 -0
- /package/dist/cjs/api/resources/{providers/types/ConnectInboxId.js → apps/types/ConnectAccepted.js} +0 -0
- /package/dist/cjs/api/resources/{providers/types/ConnectProviderBody.js → apps/types/ConnectAppBody.js} +0 -0
- /package/dist/cjs/api/resources/{providers → apps}/types/ConnectInboxId.d.ts +0 -0
- /package/dist/cjs/api/resources/{providers/types/ListProviderAccountsResponse.js → apps/types/ConnectInboxId.js} +0 -0
- /package/dist/cjs/api/resources/{providers/types/ListProvidersResponse.js → apps/types/ListAppAccountsResponse.js} +0 -0
- /package/dist/cjs/api/resources/{providers/types/MagicUrl.js → apps/types/ListAppsResponse.js} +0 -0
- /package/dist/cjs/api/resources/{providers → apps}/types/MagicUrl.d.ts +0 -0
- /package/dist/cjs/api/resources/{providers/types/Provider.js → apps/types/MagicUrl.js} +0 -0
- /package/dist/cjs/api/resources/{providers/types/SearchProvidersResponse.js → apps/types/SearchAppsResponse.js} +0 -0
- /package/dist/cjs/serialization/resources/{providers → apps}/client/index.d.ts +0 -0
- /package/dist/cjs/serialization/resources/{providers → apps}/client/index.js +0 -0
- /package/dist/cjs/{api/resources/providers → serialization/resources/apps}/index.d.ts +0 -0
- /package/dist/cjs/{api/resources/providers → serialization/resources/apps}/index.js +0 -0
- /package/dist/cjs/serialization/resources/{providers → apps}/types/ConnectAccepted.d.ts +0 -0
- /package/dist/cjs/serialization/resources/{providers → apps}/types/ConnectAccepted.js +0 -0
- /package/dist/cjs/serialization/resources/{providers → apps}/types/ConnectInboxId.d.ts +0 -0
- /package/dist/cjs/serialization/resources/{providers → apps}/types/ConnectInboxId.js +0 -0
- /package/dist/cjs/serialization/resources/{providers → apps}/types/MagicUrl.d.ts +0 -0
- /package/dist/cjs/serialization/resources/{providers → apps}/types/MagicUrl.js +0 -0
- /package/dist/esm/api/resources/{providers → apps}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/{providers → apps}/client/index.mjs +0 -0
- /package/dist/esm/api/resources/{accounts/types/ProviderId.mjs → apps/client/requests/ListAppAccountsRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{providers/client/requests/ListProviderAccountsRequest.mjs → apps/client/requests/ListAppsRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{providers/client/requests/ListProvidersRequest.mjs → apps/client/requests/SearchAppsRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{providers → apps}/client/requests/index.mjs +0 -0
- /package/dist/esm/api/resources/{providers/client/requests/SearchProvidersRequest.mjs → apps/types/App.mjs} +0 -0
- /package/dist/esm/api/resources/{providers/types/ConnectAccepted.mjs → apps/types/AppId.mjs} +0 -0
- /package/dist/esm/api/resources/{providers → apps}/types/ConnectAccepted.d.mts +0 -0
- /package/dist/esm/api/resources/{providers/types/ConnectInboxId.mjs → apps/types/ConnectAccepted.mjs} +0 -0
- /package/dist/esm/api/resources/{providers/types/ConnectProviderBody.mjs → apps/types/ConnectAppBody.mjs} +0 -0
- /package/dist/esm/api/resources/{providers → apps}/types/ConnectInboxId.d.mts +0 -0
- /package/dist/esm/api/resources/{providers/types/ListProviderAccountsResponse.mjs → apps/types/ConnectInboxId.mjs} +0 -0
- /package/dist/esm/api/resources/{providers/types/ListProvidersResponse.mjs → apps/types/ListAppAccountsResponse.mjs} +0 -0
- /package/dist/esm/api/resources/{providers/types/MagicUrl.mjs → apps/types/ListAppsResponse.mjs} +0 -0
- /package/dist/esm/api/resources/{providers → apps}/types/MagicUrl.d.mts +0 -0
- /package/dist/esm/api/resources/{providers/types/Provider.mjs → apps/types/MagicUrl.mjs} +0 -0
- /package/dist/esm/api/resources/{providers/types/SearchProvidersResponse.mjs → apps/types/SearchAppsResponse.mjs} +0 -0
- /package/dist/esm/serialization/resources/{providers → apps}/client/index.d.mts +0 -0
- /package/dist/esm/serialization/resources/{providers → apps}/client/index.mjs +0 -0
- /package/dist/esm/{api/resources/providers → serialization/resources/apps}/index.d.mts +0 -0
- /package/dist/esm/{api/resources/providers → serialization/resources/apps}/index.mjs +0 -0
- /package/dist/esm/serialization/resources/{providers → apps}/types/ConnectAccepted.d.mts +0 -0
- /package/dist/esm/serialization/resources/{providers → apps}/types/ConnectAccepted.mjs +0 -0
- /package/dist/esm/serialization/resources/{providers → apps}/types/ConnectInboxId.d.mts +0 -0
- /package/dist/esm/serialization/resources/{providers → apps}/types/ConnectInboxId.mjs +0 -0
- /package/dist/esm/serialization/resources/{providers → apps}/types/MagicUrl.d.mts +0 -0
- /package/dist/esm/serialization/resources/{providers → apps}/types/MagicUrl.mjs +0 -0
|
@@ -43,7 +43,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
-
exports.
|
|
46
|
+
exports.AppsClient = void 0;
|
|
47
47
|
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
48
48
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
49
49
|
const core = __importStar(require("../../../../core/index.js"));
|
|
@@ -52,20 +52,20 @@ 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
|
-
class
|
|
55
|
+
class AppsClient {
|
|
56
56
|
constructor(options = {}) {
|
|
57
57
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
|
-
* Lists
|
|
60
|
+
* Lists apps, most popular first.
|
|
61
61
|
*
|
|
62
|
-
* @param {AgentMail.
|
|
63
|
-
* @param {
|
|
62
|
+
* @param {AgentMail.ListAppsRequest} request
|
|
63
|
+
* @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
64
|
*
|
|
65
65
|
* @throws {@link AgentMail.ValidationError}
|
|
66
66
|
*
|
|
67
67
|
* @example
|
|
68
|
-
* await client.
|
|
68
|
+
* await client.apps.list()
|
|
69
69
|
*/
|
|
70
70
|
list(request = {}, requestOptions) {
|
|
71
71
|
return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
|
|
@@ -82,7 +82,7 @@ class ProvidersClient {
|
|
|
82
82
|
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);
|
|
83
83
|
const _response = yield core.fetcher({
|
|
84
84
|
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)
|
|
85
|
-
.http, "/v0/
|
|
85
|
+
.http, "/v0/apps"),
|
|
86
86
|
method: "GET",
|
|
87
87
|
headers: _headers,
|
|
88
88
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -94,7 +94,7 @@ class ProvidersClient {
|
|
|
94
94
|
});
|
|
95
95
|
if (_response.ok) {
|
|
96
96
|
return {
|
|
97
|
-
data: serializers.
|
|
97
|
+
data: serializers.ListAppsResponse.parseOrThrow(_response.body, {
|
|
98
98
|
unrecognizedObjectKeys: "passthrough",
|
|
99
99
|
allowUnrecognizedUnionMembers: true,
|
|
100
100
|
allowUnrecognizedEnumValues: true,
|
|
@@ -122,19 +122,19 @@ class ProvidersClient {
|
|
|
122
122
|
});
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v0/
|
|
125
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v0/apps");
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
128
|
/**
|
|
129
|
-
* Searches
|
|
129
|
+
* Searches apps by name prefix.
|
|
130
130
|
*
|
|
131
|
-
* @param {AgentMail.
|
|
132
|
-
* @param {
|
|
131
|
+
* @param {AgentMail.SearchAppsRequest} request
|
|
132
|
+
* @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
133
133
|
*
|
|
134
134
|
* @throws {@link AgentMail.ValidationError}
|
|
135
135
|
*
|
|
136
136
|
* @example
|
|
137
|
-
* await client.
|
|
137
|
+
* await client.apps.search({
|
|
138
138
|
* q: "q"
|
|
139
139
|
* })
|
|
140
140
|
*/
|
|
@@ -153,7 +153,7 @@ class ProvidersClient {
|
|
|
153
153
|
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);
|
|
154
154
|
const _response = yield core.fetcher({
|
|
155
155
|
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)
|
|
156
|
-
.http, "/v0/
|
|
156
|
+
.http, "/v0/apps/search"),
|
|
157
157
|
method: "GET",
|
|
158
158
|
headers: _headers,
|
|
159
159
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -165,7 +165,7 @@ class ProvidersClient {
|
|
|
165
165
|
});
|
|
166
166
|
if (_response.ok) {
|
|
167
167
|
return {
|
|
168
|
-
data: serializers.
|
|
168
|
+
data: serializers.SearchAppsResponse.parseOrThrow(_response.body, {
|
|
169
169
|
unrecognizedObjectKeys: "passthrough",
|
|
170
170
|
allowUnrecognizedUnionMembers: true,
|
|
171
171
|
allowUnrecognizedEnumValues: true,
|
|
@@ -193,29 +193,34 @@ class ProvidersClient {
|
|
|
193
193
|
});
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v0/
|
|
196
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v0/apps/search");
|
|
197
197
|
});
|
|
198
198
|
}
|
|
199
199
|
/**
|
|
200
|
-
*
|
|
201
|
-
*
|
|
200
|
+
* Gets one app by ID. An app in the catalog returns its full entry.
|
|
201
|
+
* A registered app that the catalog does not list returns its ID and
|
|
202
|
+
* name only, without `updated_at`, so anyone holding its ID can still look
|
|
203
|
+
* it up. List Apps and Search Apps show catalog entries only.
|
|
204
|
+
*
|
|
205
|
+
* @param {AgentMail.AppId} app_id
|
|
206
|
+
* @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
202
207
|
*
|
|
203
208
|
* @throws {@link AgentMail.NotFoundError}
|
|
204
209
|
*
|
|
205
210
|
* @example
|
|
206
|
-
* await client.
|
|
211
|
+
* await client.apps.get("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
|
207
212
|
*/
|
|
208
|
-
get(
|
|
209
|
-
return core.HttpResponsePromise.fromPromise(this.__get(
|
|
213
|
+
get(app_id, requestOptions) {
|
|
214
|
+
return core.HttpResponsePromise.fromPromise(this.__get(app_id, requestOptions));
|
|
210
215
|
}
|
|
211
|
-
__get(
|
|
216
|
+
__get(app_id, requestOptions) {
|
|
212
217
|
return __awaiter(this, void 0, void 0, function* () {
|
|
213
218
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
214
219
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
215
220
|
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);
|
|
216
221
|
const _response = yield core.fetcher({
|
|
217
222
|
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)
|
|
218
|
-
.http, `/v0/
|
|
223
|
+
.http, `/v0/apps/${core.url.encodePathParam(serializers.AppId.jsonOrThrow(app_id, { omitUndefined: true }))}`),
|
|
219
224
|
method: "GET",
|
|
220
225
|
headers: _headers,
|
|
221
226
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -227,7 +232,7 @@ class ProvidersClient {
|
|
|
227
232
|
});
|
|
228
233
|
if (_response.ok) {
|
|
229
234
|
return {
|
|
230
|
-
data: serializers.
|
|
235
|
+
data: serializers.App.parseOrThrow(_response.body, {
|
|
231
236
|
unrecognizedObjectKeys: "passthrough",
|
|
232
237
|
allowUnrecognizedUnionMembers: true,
|
|
233
238
|
allowUnrecognizedEnumValues: true,
|
|
@@ -255,26 +260,26 @@ class ProvidersClient {
|
|
|
255
260
|
});
|
|
256
261
|
}
|
|
257
262
|
}
|
|
258
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v0/
|
|
263
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v0/apps/{app_id}");
|
|
259
264
|
});
|
|
260
265
|
}
|
|
261
266
|
/**
|
|
262
|
-
* Lists accounts at one
|
|
267
|
+
* Lists accounts at one app, most recent sign-in first.
|
|
263
268
|
*
|
|
264
|
-
* @param {AgentMail.
|
|
265
|
-
* @param {AgentMail.
|
|
266
|
-
* @param {
|
|
269
|
+
* @param {AgentMail.AppId} app_id
|
|
270
|
+
* @param {AgentMail.ListAppAccountsRequest} request
|
|
271
|
+
* @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
267
272
|
*
|
|
268
273
|
* @throws {@link AgentMail.ValidationError}
|
|
269
274
|
*
|
|
270
275
|
* @example
|
|
271
|
-
* await client.
|
|
276
|
+
* await client.apps.listAccounts("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
|
272
277
|
*/
|
|
273
|
-
listAccounts(
|
|
274
|
-
return core.HttpResponsePromise.fromPromise(this.__listAccounts(
|
|
278
|
+
listAccounts(app_id, request = {}, requestOptions) {
|
|
279
|
+
return core.HttpResponsePromise.fromPromise(this.__listAccounts(app_id, request, requestOptions));
|
|
275
280
|
}
|
|
276
|
-
__listAccounts(
|
|
277
|
-
return __awaiter(this, arguments, void 0, function* (
|
|
281
|
+
__listAccounts(app_id_1) {
|
|
282
|
+
return __awaiter(this, arguments, void 0, function* (app_id, request = {}, requestOptions) {
|
|
278
283
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
279
284
|
const { limit, pageToken } = request;
|
|
280
285
|
const _queryParams = {
|
|
@@ -285,7 +290,7 @@ class ProvidersClient {
|
|
|
285
290
|
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);
|
|
286
291
|
const _response = yield core.fetcher({
|
|
287
292
|
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)
|
|
288
|
-
.http, `/v0/
|
|
293
|
+
.http, `/v0/apps/${core.url.encodePathParam(serializers.AppId.jsonOrThrow(app_id, { omitUndefined: true }))}/accounts`),
|
|
289
294
|
method: "GET",
|
|
290
295
|
headers: _headers,
|
|
291
296
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -297,7 +302,7 @@ class ProvidersClient {
|
|
|
297
302
|
});
|
|
298
303
|
if (_response.ok) {
|
|
299
304
|
return {
|
|
300
|
-
data: serializers.
|
|
305
|
+
data: serializers.ListAppAccountsResponse.parseOrThrow(_response.body, {
|
|
301
306
|
unrecognizedObjectKeys: "passthrough",
|
|
302
307
|
allowUnrecognizedUnionMembers: true,
|
|
303
308
|
allowUnrecognizedEnumValues: true,
|
|
@@ -325,42 +330,45 @@ class ProvidersClient {
|
|
|
325
330
|
});
|
|
326
331
|
}
|
|
327
332
|
}
|
|
328
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v0/
|
|
333
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v0/apps/{app_id}/accounts");
|
|
329
334
|
});
|
|
330
335
|
}
|
|
331
336
|
/**
|
|
332
|
-
* Starts signing an inbox in to
|
|
337
|
+
* Starts signing an inbox in to an app. Returns a single-use `magic_url`,
|
|
333
338
|
* valid for five minutes, to open in the client that will hold the sign-in;
|
|
334
|
-
* the client enrolls as the inbox and continues to the
|
|
335
|
-
*
|
|
339
|
+
* the client enrolls as the inbox and continues to the app.
|
|
340
|
+
* A `404` names the missing resource: `App` or `Inbox`.
|
|
341
|
+
* A `403` `AppSignupLimitError` means the app accepts no more sign-ups from
|
|
342
|
+
* your organization; sign in with an inbox that already has an account there.
|
|
336
343
|
*
|
|
337
|
-
* @param {AgentMail.
|
|
338
|
-
* @param {AgentMail.
|
|
339
|
-
* @param {
|
|
344
|
+
* @param {AgentMail.AppId} app_id
|
|
345
|
+
* @param {AgentMail.ConnectAppBody} request
|
|
346
|
+
* @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
340
347
|
*
|
|
341
348
|
* @throws {@link AgentMail.ValidationError}
|
|
342
349
|
* @throws {@link AgentMail.NotFoundError}
|
|
350
|
+
* @throws {@link AgentMail.AppSignupLimitError}
|
|
343
351
|
*
|
|
344
352
|
* @example
|
|
345
|
-
* await client.
|
|
353
|
+
* await client.apps.connect("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", undefined)
|
|
346
354
|
*/
|
|
347
|
-
connect(
|
|
348
|
-
return core.HttpResponsePromise.fromPromise(this.__connect(
|
|
355
|
+
connect(app_id, request, requestOptions) {
|
|
356
|
+
return core.HttpResponsePromise.fromPromise(this.__connect(app_id, request, requestOptions));
|
|
349
357
|
}
|
|
350
|
-
__connect(
|
|
358
|
+
__connect(app_id, request, requestOptions) {
|
|
351
359
|
return __awaiter(this, void 0, void 0, function* () {
|
|
352
360
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
353
361
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
354
362
|
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);
|
|
355
363
|
const _response = yield core.fetcher({
|
|
356
364
|
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)
|
|
357
|
-
.http, `/v0/
|
|
365
|
+
.http, `/v0/apps/${core.url.encodePathParam(serializers.AppId.jsonOrThrow(app_id, { omitUndefined: true }))}/connect`),
|
|
358
366
|
method: "POST",
|
|
359
367
|
headers: _headers,
|
|
360
368
|
contentType: "application/json",
|
|
361
369
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
362
370
|
requestType: "json",
|
|
363
|
-
body: serializers.
|
|
371
|
+
body: serializers.apps.connect.Request.jsonOrThrow(request, {
|
|
364
372
|
unrecognizedObjectKeys: "strip",
|
|
365
373
|
omitUndefined: true,
|
|
366
374
|
}),
|
|
@@ -400,6 +408,14 @@ class ProvidersClient {
|
|
|
400
408
|
skipValidation: true,
|
|
401
409
|
breadcrumbsPrefix: ["response"],
|
|
402
410
|
}), _response.rawResponse);
|
|
411
|
+
case 403:
|
|
412
|
+
throw new AgentMail.AppSignupLimitError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
413
|
+
unrecognizedObjectKeys: "passthrough",
|
|
414
|
+
allowUnrecognizedUnionMembers: true,
|
|
415
|
+
allowUnrecognizedEnumValues: true,
|
|
416
|
+
skipValidation: true,
|
|
417
|
+
breadcrumbsPrefix: ["response"],
|
|
418
|
+
}), _response.rawResponse);
|
|
403
419
|
default:
|
|
404
420
|
throw new errors.AgentMailError({
|
|
405
421
|
statusCode: _response.error.statusCode,
|
|
@@ -408,8 +424,8 @@ class ProvidersClient {
|
|
|
408
424
|
});
|
|
409
425
|
}
|
|
410
426
|
}
|
|
411
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v0/
|
|
427
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v0/apps/{app_id}/connect");
|
|
412
428
|
});
|
|
413
429
|
}
|
|
414
430
|
}
|
|
415
|
-
exports.
|
|
431
|
+
exports.AppsClient = AppsClient;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type * as core from "../../../../core/index.js";
|
|
2
|
+
import * as errors from "../../../../errors/index.js";
|
|
3
|
+
import type * as AgentMail from "../../../index.js";
|
|
4
|
+
export declare class AppSignupLimitError extends errors.AgentMailError {
|
|
5
|
+
constructor(body: AgentMail.ErrorResponse, rawResponse?: core.RawResponse);
|
|
6
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
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.AppSignupLimitError = void 0;
|
|
38
|
+
const errors = __importStar(require("../../../../errors/index.js"));
|
|
39
|
+
class AppSignupLimitError extends errors.AgentMailError {
|
|
40
|
+
constructor(body, rawResponse) {
|
|
41
|
+
super({
|
|
42
|
+
message: "AppSignupLimitError",
|
|
43
|
+
statusCode: 403,
|
|
44
|
+
body: body,
|
|
45
|
+
rawResponse: rawResponse,
|
|
46
|
+
});
|
|
47
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
48
|
+
if (Error.captureStackTrace) {
|
|
49
|
+
Error.captureStackTrace(this, this.constructor);
|
|
50
|
+
}
|
|
51
|
+
this.name = this.constructor.name;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.AppSignupLimitError = AppSignupLimitError;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./AppSignupLimitError.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("./AppSignupLimitError.js"), exports);
|
|
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
16
|
};
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.
|
|
18
|
+
exports.AppsClient = void 0;
|
|
19
19
|
var Client_js_1 = require("./client/Client.js");
|
|
20
|
-
Object.defineProperty(exports, "
|
|
20
|
+
Object.defineProperty(exports, "AppsClient", { enumerable: true, get: function () { return Client_js_1.AppsClient; } });
|
|
21
21
|
__exportStar(require("./client/index.js"), exports);
|
|
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./client/index.js"), exports);
|
|
18
|
+
__exportStar(require("./errors/index.js"), exports);
|
|
18
19
|
__exportStar(require("./types/index.js"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* An app an inbox can sign in to.
|
|
4
|
+
*/
|
|
5
|
+
export interface App {
|
|
6
|
+
appId: AgentMail.AppId;
|
|
7
|
+
name?: string;
|
|
8
|
+
/** Time at which app was last updated. */
|
|
9
|
+
updatedAt?: Date;
|
|
10
|
+
description?: string;
|
|
11
|
+
logoUrl?: string;
|
|
12
|
+
termsUrl?: string;
|
|
13
|
+
privacyUrl?: string;
|
|
14
|
+
/** 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
|
+
ownerSignupLimit?: number;
|
|
16
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as AgentMail from "../../../index.js";
|
|
2
|
-
export interface
|
|
3
|
-
|
|
2
|
+
export interface ListAppAccountsResponse {
|
|
3
|
+
app?: AgentMail.App;
|
|
4
4
|
count: AgentMail.Count;
|
|
5
5
|
limit: AgentMail.Limit;
|
|
6
6
|
nextPageToken?: AgentMail.PageToken;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as AgentMail from "../../../index.js";
|
|
2
|
-
export interface
|
|
2
|
+
export interface ListAppsResponse {
|
|
3
3
|
count: AgentMail.Count;
|
|
4
4
|
limit: AgentMail.Limit;
|
|
5
5
|
nextPageToken?: AgentMail.PageToken;
|
|
6
|
-
|
|
6
|
+
apps: AgentMail.App[];
|
|
7
7
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./App.js";
|
|
2
|
+
export * from "./AppId.js";
|
|
3
|
+
export * from "./ConnectAccepted.js";
|
|
4
|
+
export * from "./ConnectAppBody.js";
|
|
5
|
+
export * from "./ConnectInboxId.js";
|
|
6
|
+
export * from "./ListAppAccountsResponse.js";
|
|
7
|
+
export * from "./ListAppsResponse.js";
|
|
8
|
+
export * from "./MagicUrl.js";
|
|
9
|
+
export * from "./SearchAppsResponse.js";
|
|
@@ -14,11 +14,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./App.js"), exports);
|
|
18
|
+
__exportStar(require("./AppId.js"), exports);
|
|
17
19
|
__exportStar(require("./ConnectAccepted.js"), exports);
|
|
20
|
+
__exportStar(require("./ConnectAppBody.js"), exports);
|
|
18
21
|
__exportStar(require("./ConnectInboxId.js"), exports);
|
|
19
|
-
__exportStar(require("./
|
|
20
|
-
__exportStar(require("./
|
|
21
|
-
__exportStar(require("./ListProvidersResponse.js"), exports);
|
|
22
|
+
__exportStar(require("./ListAppAccountsResponse.js"), exports);
|
|
23
|
+
__exportStar(require("./ListAppsResponse.js"), exports);
|
|
22
24
|
__exportStar(require("./MagicUrl.js"), exports);
|
|
23
|
-
__exportStar(require("./
|
|
24
|
-
__exportStar(require("./SearchProvidersResponse.js"), exports);
|
|
25
|
+
__exportStar(require("./SearchAppsResponse.js"), exports);
|
|
@@ -142,7 +142,8 @@ export declare class InboxesClient {
|
|
|
142
142
|
* Authorizes the AgentID sign-in a client is already waiting in, for the
|
|
143
143
|
* inbox in the path, and returns the ID of the pending public key it will
|
|
144
144
|
* activate. Read the key with Get API Key. A repeat for the same token,
|
|
145
|
-
* inbox, and bearer returns the same key ID.
|
|
145
|
+
* inbox, and bearer returns the same key ID. A `403` `AppSignupLimitError`
|
|
146
|
+
* means the app accepts no more sign-ups from your organization.
|
|
146
147
|
*
|
|
147
148
|
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
148
149
|
* @param {AgentMail.inboxes.AuthorizeInboxRequest} request
|
|
@@ -150,6 +151,7 @@ export declare class InboxesClient {
|
|
|
150
151
|
*
|
|
151
152
|
* @throws {@link AgentMail.ValidationError}
|
|
152
153
|
* @throws {@link AgentMail.NotFoundError}
|
|
154
|
+
* @throws {@link AgentMail.AppSignupLimitError}
|
|
153
155
|
*
|
|
154
156
|
* @example
|
|
155
157
|
* await client.inboxes.authorize("inbox_id", {
|
|
@@ -532,7 +532,8 @@ class InboxesClient {
|
|
|
532
532
|
* Authorizes the AgentID sign-in a client is already waiting in, for the
|
|
533
533
|
* inbox in the path, and returns the ID of the pending public key it will
|
|
534
534
|
* activate. Read the key with Get API Key. A repeat for the same token,
|
|
535
|
-
* inbox, and bearer returns the same key ID.
|
|
535
|
+
* inbox, and bearer returns the same key ID. A `403` `AppSignupLimitError`
|
|
536
|
+
* means the app accepts no more sign-ups from your organization.
|
|
536
537
|
*
|
|
537
538
|
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
538
539
|
* @param {AgentMail.inboxes.AuthorizeInboxRequest} request
|
|
@@ -540,6 +541,7 @@ class InboxesClient {
|
|
|
540
541
|
*
|
|
541
542
|
* @throws {@link AgentMail.ValidationError}
|
|
542
543
|
* @throws {@link AgentMail.NotFoundError}
|
|
544
|
+
* @throws {@link AgentMail.AppSignupLimitError}
|
|
543
545
|
*
|
|
544
546
|
* @example
|
|
545
547
|
* await client.inboxes.authorize("inbox_id", {
|
|
@@ -602,6 +604,14 @@ class InboxesClient {
|
|
|
602
604
|
skipValidation: true,
|
|
603
605
|
breadcrumbsPrefix: ["response"],
|
|
604
606
|
}), _response.rawResponse);
|
|
607
|
+
case 403:
|
|
608
|
+
throw new AgentMail.AppSignupLimitError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
609
|
+
unrecognizedObjectKeys: "passthrough",
|
|
610
|
+
allowUnrecognizedUnionMembers: true,
|
|
611
|
+
allowUnrecognizedEnumValues: true,
|
|
612
|
+
skipValidation: true,
|
|
613
|
+
breadcrumbsPrefix: ["response"],
|
|
614
|
+
}), _response.rawResponse);
|
|
605
615
|
default:
|
|
606
616
|
throw new errors.AgentMailError({
|
|
607
617
|
statusCode: _response.error.statusCode,
|
|
@@ -11,7 +11,7 @@ export declare class AccountsClient {
|
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<AccountsClient.Options>;
|
|
12
12
|
constructor(options?: AccountsClient.Options);
|
|
13
13
|
/**
|
|
14
|
-
* Lists accounts held by the inbox, across all
|
|
14
|
+
* Lists accounts held by the inbox, across all apps. Requires `inbox_read`.
|
|
15
15
|
*
|
|
16
16
|
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
17
17
|
* @param {AgentMail.inboxes.ListAccountsRequest} request
|
|
@@ -57,7 +57,7 @@ class AccountsClient {
|
|
|
57
57
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
|
-
* Lists accounts held by the inbox, across all
|
|
60
|
+
* Lists accounts held by the inbox, across all apps. Requires `inbox_read`.
|
|
61
61
|
*
|
|
62
62
|
* @param {AgentMail.inboxes.InboxId} inbox_id
|
|
63
63
|
* @param {AgentMail.inboxes.ListAccountsRequest} request
|
|
@@ -6,6 +6,10 @@ export * from "./agent/types/index.js";
|
|
|
6
6
|
export * from "./apiKeys/client/requests/index.js";
|
|
7
7
|
export * as apiKeys from "./apiKeys/index.js";
|
|
8
8
|
export * from "./apiKeys/types/index.js";
|
|
9
|
+
export * from "./apps/client/requests/index.js";
|
|
10
|
+
export * from "./apps/errors/index.js";
|
|
11
|
+
export * as apps from "./apps/index.js";
|
|
12
|
+
export * from "./apps/types/index.js";
|
|
9
13
|
export * as attachments from "./attachments/index.js";
|
|
10
14
|
export * from "./attachments/types/index.js";
|
|
11
15
|
export * as auth from "./auth/index.js";
|
|
@@ -33,9 +37,6 @@ export * from "./metrics/types/index.js";
|
|
|
33
37
|
export * as organizations from "./organizations/index.js";
|
|
34
38
|
export * from "./organizations/types/index.js";
|
|
35
39
|
export * as pods from "./pods/index.js";
|
|
36
|
-
export * from "./providers/client/requests/index.js";
|
|
37
|
-
export * as providers from "./providers/index.js";
|
|
38
|
-
export * from "./providers/types/index.js";
|
|
39
40
|
export * from "./threads/client/requests/index.js";
|
|
40
41
|
export * as threads from "./threads/index.js";
|
|
41
42
|
export * from "./threads/types/index.js";
|