import { type ConsoleRequest } from "./agent-access.js"; /** * Log in with Relay: an agent's OAuth2 client, read and changed through the * same Relay Console routes its OAuth2 tab uses (Relay-Console * apps/api/src/routes/agents.ts: GET and PATCH /orgs/:orgId/agents/:id/oauth2, * POST /orgs/:orgId/agents/:id/oauth2 and .../oauth2/reset-secret). The * client ID is the agent's ID. A read never makes the client; `create` does, * and shows its secret once. */ export declare const OAUTH_SCOPES: readonly ["openid", "profile", "email", "phone", "birthdate"]; export type OAuthScope = (typeof OAUTH_SCOPES)[number]; /** Makes the client, once; the only answer besides a reset that shows the secret. */ export declare function createOAuth(request: ConsoleRequest, handle: string): Promise<{ handle: string; client_id: string; redirect_uris: string[]; scopes: ("birthdate" | "email" | "openid" | "phone" | "profile")[]; client_secret?: string; }>; /** The client, as the OAuth2 tab shows it. A read never makes the client and never shows the secret. */ export declare function showOAuth(request: ConsoleRequest, handle: string): Promise<{ handle: string; client_id: string; redirect_uris: string[]; scopes: ("birthdate" | "email" | "openid" | "phone" | "profile")[]; client_secret?: string; }>; export declare function addRedirect(request: ConsoleRequest, handle: string, uri: string): Promise<{ handle: string; client_id: string; redirect_uris: string[]; scopes: ("birthdate" | "email" | "openid" | "phone" | "profile")[]; client_secret?: string; }>; export declare function removeRedirect(request: ConsoleRequest, handle: string, uri: string): Promise<{ handle: string; client_id: string; redirect_uris: string[]; scopes: ("birthdate" | "email" | "openid" | "phone" | "profile")[]; client_secret?: string; }>; /** Sets the optional scopes; openid and profile are always on. */ export declare function setScopes(request: ConsoleRequest, handle: string, scopes: string[]): Promise<{ handle: string; client_id: string; redirect_uris: string[]; scopes: ("birthdate" | "email" | "openid" | "phone" | "profile")[]; client_secret?: string; }>; /** Discord's Reset Secret: a new secret, shown once; the old one stops working. */ export declare function resetSecret(request: ConsoleRequest, handle: string): Promise<{ handle: string; client_id: string; redirect_uris: string[]; scopes: ("birthdate" | "email" | "openid" | "phone" | "profile")[]; client_secret?: string; }>; //# sourceMappingURL=agent-oauth.d.ts.map