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
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import type * as AgentMail from "../../../index.mjs";
|
|
2
2
|
/**
|
|
3
|
-
* One inbox signed in at one
|
|
3
|
+
* One inbox signed in at one app.
|
|
4
4
|
*/
|
|
5
5
|
export interface Account {
|
|
6
6
|
accountId: AgentMail.AccountId;
|
|
7
|
-
|
|
8
|
-
/** Display name of
|
|
9
|
-
|
|
7
|
+
appId: AgentMail.AppId;
|
|
8
|
+
/** Display name of app. */
|
|
9
|
+
appName?: string;
|
|
10
10
|
inboxId: AgentMail.inboxes.InboxId;
|
|
11
11
|
podId: AgentMail.pods.PodId;
|
|
12
12
|
organizationId: AgentMail.OrganizationId;
|
|
13
|
-
/** Time of first sign-in at
|
|
13
|
+
/** Time of first sign-in at app. */
|
|
14
14
|
firstSignedInAt: Date;
|
|
15
|
-
/** Time of most recent sign-in at
|
|
15
|
+
/** Time of most recent sign-in at app. */
|
|
16
16
|
lastSignedInAt: Date;
|
|
17
|
-
/** Number of sign-ins at
|
|
17
|
+
/** Number of sign-ins at app. */
|
|
18
18
|
signInCount: number;
|
|
19
19
|
/** Present only while the account is disabled. Absent means the inbox may sign in. */
|
|
20
20
|
status?: AgentMail.AccountStatus;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Status to set. `disabled` stops the inbox from signing in at the
|
|
3
|
-
*
|
|
3
|
+
* app; `enabled` re-enables it. An enabled account reads back with no
|
|
4
4
|
* `status`.
|
|
5
5
|
*/
|
|
6
6
|
export declare const UpdateAccountStatus: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
/**
|
|
3
3
|
* Status to set. `disabled` stops the inbox from signing in at the
|
|
4
|
-
*
|
|
4
|
+
* app; `enabled` re-enables it. An enabled account reads back with no
|
|
5
5
|
* `status`.
|
|
6
6
|
*/
|
|
7
7
|
export const UpdateAccountStatus = {
|
|
@@ -2,6 +2,5 @@ export * from "./Account.mjs";
|
|
|
2
2
|
export * from "./AccountId.mjs";
|
|
3
3
|
export * from "./AccountStatus.mjs";
|
|
4
4
|
export * from "./ListAccountsResponse.mjs";
|
|
5
|
-
export * from "./ProviderId.mjs";
|
|
6
5
|
export * from "./UpdateAccountRequest.mjs";
|
|
7
6
|
export * from "./UpdateAccountStatus.mjs";
|
|
@@ -2,6 +2,5 @@ export * from "./Account.mjs";
|
|
|
2
2
|
export * from "./AccountId.mjs";
|
|
3
3
|
export * from "./AccountStatus.mjs";
|
|
4
4
|
export * from "./ListAccountsResponse.mjs";
|
|
5
|
-
export * from "./ProviderId.mjs";
|
|
6
5
|
export * from "./UpdateAccountRequest.mjs";
|
|
7
6
|
export * from "./UpdateAccountStatus.mjs";
|
|
@@ -12,6 +12,8 @@ export interface ApiKeyPermissions {
|
|
|
12
12
|
inboxDelete?: boolean;
|
|
13
13
|
/** Read messages. Also required to read threads. */
|
|
14
14
|
messageRead?: boolean;
|
|
15
|
+
/** Reply and reply-all when the request is signed with a registered public key. Bearer keys reply with `message_send`. */
|
|
16
|
+
messageReply?: boolean;
|
|
15
17
|
/** Send messages. */
|
|
16
18
|
messageSend?: boolean;
|
|
17
19
|
/** Update message labels. Also required to update threads. */
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
3
|
+
import * as core from "../../../../core/index.mjs";
|
|
4
|
+
import * as AgentMail from "../../../index.mjs";
|
|
5
|
+
export declare namespace AppsClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class AppsClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<AppsClient.Options>;
|
|
12
|
+
constructor(options?: AppsClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Lists apps, most popular first.
|
|
15
|
+
*
|
|
16
|
+
* @param {AgentMail.ListAppsRequest} request
|
|
17
|
+
* @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
|
+
*
|
|
19
|
+
* @throws {@link AgentMail.ValidationError}
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* await client.apps.list()
|
|
23
|
+
*/
|
|
24
|
+
list(request?: AgentMail.ListAppsRequest, requestOptions?: AppsClient.RequestOptions): core.HttpResponsePromise<AgentMail.ListAppsResponse>;
|
|
25
|
+
private __list;
|
|
26
|
+
/**
|
|
27
|
+
* Searches apps by name prefix.
|
|
28
|
+
*
|
|
29
|
+
* @param {AgentMail.SearchAppsRequest} request
|
|
30
|
+
* @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
31
|
+
*
|
|
32
|
+
* @throws {@link AgentMail.ValidationError}
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* await client.apps.search({
|
|
36
|
+
* q: "q"
|
|
37
|
+
* })
|
|
38
|
+
*/
|
|
39
|
+
search(request: AgentMail.SearchAppsRequest, requestOptions?: AppsClient.RequestOptions): core.HttpResponsePromise<AgentMail.SearchAppsResponse>;
|
|
40
|
+
private __search;
|
|
41
|
+
/**
|
|
42
|
+
* Gets one app by ID. An app in the catalog returns its full entry.
|
|
43
|
+
* A registered app that the catalog does not list returns its ID and
|
|
44
|
+
* name only, without `updated_at`, so anyone holding its ID can still look
|
|
45
|
+
* it up. List Apps and Search Apps show catalog entries only.
|
|
46
|
+
*
|
|
47
|
+
* @param {AgentMail.AppId} app_id
|
|
48
|
+
* @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
49
|
+
*
|
|
50
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* await client.apps.get("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
|
54
|
+
*/
|
|
55
|
+
get(app_id: AgentMail.AppId, requestOptions?: AppsClient.RequestOptions): core.HttpResponsePromise<AgentMail.App>;
|
|
56
|
+
private __get;
|
|
57
|
+
/**
|
|
58
|
+
* Lists accounts at one app, most recent sign-in first.
|
|
59
|
+
*
|
|
60
|
+
* @param {AgentMail.AppId} app_id
|
|
61
|
+
* @param {AgentMail.ListAppAccountsRequest} request
|
|
62
|
+
* @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
|
+
*
|
|
64
|
+
* @throws {@link AgentMail.ValidationError}
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* await client.apps.listAccounts("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
|
68
|
+
*/
|
|
69
|
+
listAccounts(app_id: AgentMail.AppId, request?: AgentMail.ListAppAccountsRequest, requestOptions?: AppsClient.RequestOptions): core.HttpResponsePromise<AgentMail.ListAppAccountsResponse>;
|
|
70
|
+
private __listAccounts;
|
|
71
|
+
/**
|
|
72
|
+
* Starts signing an inbox in to an app. Returns a single-use `magic_url`,
|
|
73
|
+
* valid for five minutes, to open in the client that will hold the sign-in;
|
|
74
|
+
* the client enrolls as the inbox and continues to the app.
|
|
75
|
+
* A `404` names the missing resource: `App` or `Inbox`.
|
|
76
|
+
* A `403` `AppSignupLimitError` means the app accepts no more sign-ups from
|
|
77
|
+
* your organization; sign in with an inbox that already has an account there.
|
|
78
|
+
*
|
|
79
|
+
* @param {AgentMail.AppId} app_id
|
|
80
|
+
* @param {AgentMail.ConnectAppBody} request
|
|
81
|
+
* @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
82
|
+
*
|
|
83
|
+
* @throws {@link AgentMail.ValidationError}
|
|
84
|
+
* @throws {@link AgentMail.NotFoundError}
|
|
85
|
+
* @throws {@link AgentMail.AppSignupLimitError}
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* await client.apps.connect("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", undefined)
|
|
89
|
+
*/
|
|
90
|
+
connect(app_id: AgentMail.AppId, request?: AgentMail.ConnectAppBody, requestOptions?: AppsClient.RequestOptions): core.HttpResponsePromise<AgentMail.ConnectAccepted>;
|
|
91
|
+
private __connect;
|
|
92
|
+
}
|
|
@@ -16,20 +16,20 @@ import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCode
|
|
|
16
16
|
import * as errors from "../../../../errors/index.mjs";
|
|
17
17
|
import * as serializers from "../../../../serialization/index.mjs";
|
|
18
18
|
import * as AgentMail from "../../../index.mjs";
|
|
19
|
-
export class
|
|
19
|
+
export class AppsClient {
|
|
20
20
|
constructor(options = {}) {
|
|
21
21
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
* Lists
|
|
24
|
+
* Lists apps, most popular first.
|
|
25
25
|
*
|
|
26
|
-
* @param {AgentMail.
|
|
27
|
-
* @param {
|
|
26
|
+
* @param {AgentMail.ListAppsRequest} request
|
|
27
|
+
* @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
28
|
*
|
|
29
29
|
* @throws {@link AgentMail.ValidationError}
|
|
30
30
|
*
|
|
31
31
|
* @example
|
|
32
|
-
* await client.
|
|
32
|
+
* await client.apps.list()
|
|
33
33
|
*/
|
|
34
34
|
list(request = {}, requestOptions) {
|
|
35
35
|
return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
|
|
@@ -46,7 +46,7 @@ export class ProvidersClient {
|
|
|
46
46
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
47
47
|
const _response = yield core.fetcher({
|
|
48
48
|
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)
|
|
49
|
-
.http, "/v0/
|
|
49
|
+
.http, "/v0/apps"),
|
|
50
50
|
method: "GET",
|
|
51
51
|
headers: _headers,
|
|
52
52
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -58,7 +58,7 @@ export class ProvidersClient {
|
|
|
58
58
|
});
|
|
59
59
|
if (_response.ok) {
|
|
60
60
|
return {
|
|
61
|
-
data: serializers.
|
|
61
|
+
data: serializers.ListAppsResponse.parseOrThrow(_response.body, {
|
|
62
62
|
unrecognizedObjectKeys: "passthrough",
|
|
63
63
|
allowUnrecognizedUnionMembers: true,
|
|
64
64
|
allowUnrecognizedEnumValues: true,
|
|
@@ -86,19 +86,19 @@ export class ProvidersClient {
|
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/
|
|
89
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/apps");
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
93
|
-
* Searches
|
|
93
|
+
* Searches apps by name prefix.
|
|
94
94
|
*
|
|
95
|
-
* @param {AgentMail.
|
|
96
|
-
* @param {
|
|
95
|
+
* @param {AgentMail.SearchAppsRequest} request
|
|
96
|
+
* @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
97
97
|
*
|
|
98
98
|
* @throws {@link AgentMail.ValidationError}
|
|
99
99
|
*
|
|
100
100
|
* @example
|
|
101
|
-
* await client.
|
|
101
|
+
* await client.apps.search({
|
|
102
102
|
* q: "q"
|
|
103
103
|
* })
|
|
104
104
|
*/
|
|
@@ -117,7 +117,7 @@ export class ProvidersClient {
|
|
|
117
117
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
118
118
|
const _response = yield core.fetcher({
|
|
119
119
|
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)
|
|
120
|
-
.http, "/v0/
|
|
120
|
+
.http, "/v0/apps/search"),
|
|
121
121
|
method: "GET",
|
|
122
122
|
headers: _headers,
|
|
123
123
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -129,7 +129,7 @@ export class ProvidersClient {
|
|
|
129
129
|
});
|
|
130
130
|
if (_response.ok) {
|
|
131
131
|
return {
|
|
132
|
-
data: serializers.
|
|
132
|
+
data: serializers.SearchAppsResponse.parseOrThrow(_response.body, {
|
|
133
133
|
unrecognizedObjectKeys: "passthrough",
|
|
134
134
|
allowUnrecognizedUnionMembers: true,
|
|
135
135
|
allowUnrecognizedEnumValues: true,
|
|
@@ -157,29 +157,34 @@ export class ProvidersClient {
|
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/
|
|
160
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/apps/search");
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
163
|
/**
|
|
164
|
-
*
|
|
165
|
-
*
|
|
164
|
+
* Gets one app by ID. An app in the catalog returns its full entry.
|
|
165
|
+
* A registered app that the catalog does not list returns its ID and
|
|
166
|
+
* name only, without `updated_at`, so anyone holding its ID can still look
|
|
167
|
+
* it up. List Apps and Search Apps show catalog entries only.
|
|
168
|
+
*
|
|
169
|
+
* @param {AgentMail.AppId} app_id
|
|
170
|
+
* @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
166
171
|
*
|
|
167
172
|
* @throws {@link AgentMail.NotFoundError}
|
|
168
173
|
*
|
|
169
174
|
* @example
|
|
170
|
-
* await client.
|
|
175
|
+
* await client.apps.get("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
|
171
176
|
*/
|
|
172
|
-
get(
|
|
173
|
-
return core.HttpResponsePromise.fromPromise(this.__get(
|
|
177
|
+
get(app_id, requestOptions) {
|
|
178
|
+
return core.HttpResponsePromise.fromPromise(this.__get(app_id, requestOptions));
|
|
174
179
|
}
|
|
175
|
-
__get(
|
|
180
|
+
__get(app_id, requestOptions) {
|
|
176
181
|
return __awaiter(this, void 0, void 0, function* () {
|
|
177
182
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
178
183
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
179
184
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
180
185
|
const _response = yield core.fetcher({
|
|
181
186
|
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)
|
|
182
|
-
.http, `/v0/
|
|
187
|
+
.http, `/v0/apps/${core.url.encodePathParam(serializers.AppId.jsonOrThrow(app_id, { omitUndefined: true }))}`),
|
|
183
188
|
method: "GET",
|
|
184
189
|
headers: _headers,
|
|
185
190
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -191,7 +196,7 @@ export class ProvidersClient {
|
|
|
191
196
|
});
|
|
192
197
|
if (_response.ok) {
|
|
193
198
|
return {
|
|
194
|
-
data: serializers.
|
|
199
|
+
data: serializers.App.parseOrThrow(_response.body, {
|
|
195
200
|
unrecognizedObjectKeys: "passthrough",
|
|
196
201
|
allowUnrecognizedUnionMembers: true,
|
|
197
202
|
allowUnrecognizedEnumValues: true,
|
|
@@ -219,26 +224,26 @@ export class ProvidersClient {
|
|
|
219
224
|
});
|
|
220
225
|
}
|
|
221
226
|
}
|
|
222
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/
|
|
227
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/apps/{app_id}");
|
|
223
228
|
});
|
|
224
229
|
}
|
|
225
230
|
/**
|
|
226
|
-
* Lists accounts at one
|
|
231
|
+
* Lists accounts at one app, most recent sign-in first.
|
|
227
232
|
*
|
|
228
|
-
* @param {AgentMail.
|
|
229
|
-
* @param {AgentMail.
|
|
230
|
-
* @param {
|
|
233
|
+
* @param {AgentMail.AppId} app_id
|
|
234
|
+
* @param {AgentMail.ListAppAccountsRequest} request
|
|
235
|
+
* @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
231
236
|
*
|
|
232
237
|
* @throws {@link AgentMail.ValidationError}
|
|
233
238
|
*
|
|
234
239
|
* @example
|
|
235
|
-
* await client.
|
|
240
|
+
* await client.apps.listAccounts("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")
|
|
236
241
|
*/
|
|
237
|
-
listAccounts(
|
|
238
|
-
return core.HttpResponsePromise.fromPromise(this.__listAccounts(
|
|
242
|
+
listAccounts(app_id, request = {}, requestOptions) {
|
|
243
|
+
return core.HttpResponsePromise.fromPromise(this.__listAccounts(app_id, request, requestOptions));
|
|
239
244
|
}
|
|
240
|
-
__listAccounts(
|
|
241
|
-
return __awaiter(this, arguments, void 0, function* (
|
|
245
|
+
__listAccounts(app_id_1) {
|
|
246
|
+
return __awaiter(this, arguments, void 0, function* (app_id, request = {}, requestOptions) {
|
|
242
247
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
243
248
|
const { limit, pageToken } = request;
|
|
244
249
|
const _queryParams = {
|
|
@@ -249,7 +254,7 @@ export class ProvidersClient {
|
|
|
249
254
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
250
255
|
const _response = yield core.fetcher({
|
|
251
256
|
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)
|
|
252
|
-
.http, `/v0/
|
|
257
|
+
.http, `/v0/apps/${core.url.encodePathParam(serializers.AppId.jsonOrThrow(app_id, { omitUndefined: true }))}/accounts`),
|
|
253
258
|
method: "GET",
|
|
254
259
|
headers: _headers,
|
|
255
260
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -261,7 +266,7 @@ export class ProvidersClient {
|
|
|
261
266
|
});
|
|
262
267
|
if (_response.ok) {
|
|
263
268
|
return {
|
|
264
|
-
data: serializers.
|
|
269
|
+
data: serializers.ListAppAccountsResponse.parseOrThrow(_response.body, {
|
|
265
270
|
unrecognizedObjectKeys: "passthrough",
|
|
266
271
|
allowUnrecognizedUnionMembers: true,
|
|
267
272
|
allowUnrecognizedEnumValues: true,
|
|
@@ -289,42 +294,45 @@ export class ProvidersClient {
|
|
|
289
294
|
});
|
|
290
295
|
}
|
|
291
296
|
}
|
|
292
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/
|
|
297
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/apps/{app_id}/accounts");
|
|
293
298
|
});
|
|
294
299
|
}
|
|
295
300
|
/**
|
|
296
|
-
* Starts signing an inbox in to
|
|
301
|
+
* Starts signing an inbox in to an app. Returns a single-use `magic_url`,
|
|
297
302
|
* valid for five minutes, to open in the client that will hold the sign-in;
|
|
298
|
-
* the client enrolls as the inbox and continues to the
|
|
299
|
-
*
|
|
303
|
+
* the client enrolls as the inbox and continues to the app.
|
|
304
|
+
* A `404` names the missing resource: `App` or `Inbox`.
|
|
305
|
+
* A `403` `AppSignupLimitError` means the app accepts no more sign-ups from
|
|
306
|
+
* your organization; sign in with an inbox that already has an account there.
|
|
300
307
|
*
|
|
301
|
-
* @param {AgentMail.
|
|
302
|
-
* @param {AgentMail.
|
|
303
|
-
* @param {
|
|
308
|
+
* @param {AgentMail.AppId} app_id
|
|
309
|
+
* @param {AgentMail.ConnectAppBody} request
|
|
310
|
+
* @param {AppsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
304
311
|
*
|
|
305
312
|
* @throws {@link AgentMail.ValidationError}
|
|
306
313
|
* @throws {@link AgentMail.NotFoundError}
|
|
314
|
+
* @throws {@link AgentMail.AppSignupLimitError}
|
|
307
315
|
*
|
|
308
316
|
* @example
|
|
309
|
-
* await client.
|
|
317
|
+
* await client.apps.connect("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", undefined)
|
|
310
318
|
*/
|
|
311
|
-
connect(
|
|
312
|
-
return core.HttpResponsePromise.fromPromise(this.__connect(
|
|
319
|
+
connect(app_id, request, requestOptions) {
|
|
320
|
+
return core.HttpResponsePromise.fromPromise(this.__connect(app_id, request, requestOptions));
|
|
313
321
|
}
|
|
314
|
-
__connect(
|
|
322
|
+
__connect(app_id, request, requestOptions) {
|
|
315
323
|
return __awaiter(this, void 0, void 0, function* () {
|
|
316
324
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
317
325
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
318
326
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
319
327
|
const _response = yield core.fetcher({
|
|
320
328
|
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)
|
|
321
|
-
.http, `/v0/
|
|
329
|
+
.http, `/v0/apps/${core.url.encodePathParam(serializers.AppId.jsonOrThrow(app_id, { omitUndefined: true }))}/connect`),
|
|
322
330
|
method: "POST",
|
|
323
331
|
headers: _headers,
|
|
324
332
|
contentType: "application/json",
|
|
325
333
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
326
334
|
requestType: "json",
|
|
327
|
-
body: serializers.
|
|
335
|
+
body: serializers.apps.connect.Request.jsonOrThrow(request, {
|
|
328
336
|
unrecognizedObjectKeys: "strip",
|
|
329
337
|
omitUndefined: true,
|
|
330
338
|
}),
|
|
@@ -364,6 +372,14 @@ export class ProvidersClient {
|
|
|
364
372
|
skipValidation: true,
|
|
365
373
|
breadcrumbsPrefix: ["response"],
|
|
366
374
|
}), _response.rawResponse);
|
|
375
|
+
case 403:
|
|
376
|
+
throw new AgentMail.AppSignupLimitError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
|
|
377
|
+
unrecognizedObjectKeys: "passthrough",
|
|
378
|
+
allowUnrecognizedUnionMembers: true,
|
|
379
|
+
allowUnrecognizedEnumValues: true,
|
|
380
|
+
skipValidation: true,
|
|
381
|
+
breadcrumbsPrefix: ["response"],
|
|
382
|
+
}), _response.rawResponse);
|
|
367
383
|
default:
|
|
368
384
|
throw new errors.AgentMailError({
|
|
369
385
|
statusCode: _response.error.statusCode,
|
|
@@ -372,7 +388,7 @@ export class ProvidersClient {
|
|
|
372
388
|
});
|
|
373
389
|
}
|
|
374
390
|
}
|
|
375
|
-
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/
|
|
391
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/apps/{app_id}/connect");
|
|
376
392
|
});
|
|
377
393
|
}
|
|
378
394
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type * as core from "../../../../core/index.mjs";
|
|
2
|
+
import * as errors from "../../../../errors/index.mjs";
|
|
3
|
+
import type * as AgentMail from "../../../index.mjs";
|
|
4
|
+
export declare class AppSignupLimitError extends errors.AgentMailError {
|
|
5
|
+
constructor(body: AgentMail.ErrorResponse, rawResponse?: core.RawResponse);
|
|
6
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as errors from "../../../../errors/index.mjs";
|
|
3
|
+
export class AppSignupLimitError extends errors.AgentMailError {
|
|
4
|
+
constructor(body, rawResponse) {
|
|
5
|
+
super({
|
|
6
|
+
message: "AppSignupLimitError",
|
|
7
|
+
statusCode: 403,
|
|
8
|
+
body: body,
|
|
9
|
+
rawResponse: rawResponse,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./AppSignupLimitError.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./AppSignupLimitError.mjs";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type * as AgentMail from "../../../index.mjs";
|
|
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.mjs";
|
|
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.mjs";
|
|
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.mjs";
|
|
2
|
+
export * from "./AppId.mjs";
|
|
3
|
+
export * from "./ConnectAccepted.mjs";
|
|
4
|
+
export * from "./ConnectAppBody.mjs";
|
|
5
|
+
export * from "./ConnectInboxId.mjs";
|
|
6
|
+
export * from "./ListAppAccountsResponse.mjs";
|
|
7
|
+
export * from "./ListAppsResponse.mjs";
|
|
8
|
+
export * from "./MagicUrl.mjs";
|
|
9
|
+
export * from "./SearchAppsResponse.mjs";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./App.mjs";
|
|
2
|
+
export * from "./AppId.mjs";
|
|
3
|
+
export * from "./ConnectAccepted.mjs";
|
|
4
|
+
export * from "./ConnectAppBody.mjs";
|
|
5
|
+
export * from "./ConnectInboxId.mjs";
|
|
6
|
+
export * from "./ListAppAccountsResponse.mjs";
|
|
7
|
+
export * from "./ListAppsResponse.mjs";
|
|
8
|
+
export * from "./MagicUrl.mjs";
|
|
9
|
+
export * from "./SearchAppsResponse.mjs";
|