import { AuthMethodType, LoginFlowSnapshot, ProviderAuthSummary } from "../../types/auth.mjs"; //#region src/web/lib/authApi.d.ts export type ProvidersResult = { providers: ProviderAuthSummary[]; } | { error: string; }; export type LoginFlowResult = { flow: LoginFlowSnapshot; } | { error: string; }; export type LogoutResult = { ok: true; } | { error: string; }; export interface GatewaySettings { providers: { id: string; shared: boolean; }[]; peers: { hostId: string; machineName?: string; status: 'ok' | 'unreachable' | 'no-https'; }[]; /** The backend's caller locality decision, never inferred from the page URL. */ editable?: boolean; } /** A missing optional package is not a provider-auth failure. */ export declare function readProviderSharing(): Promise<{ settings: GatewaySettings; } | { error: string; }>; export declare function writeProviderSharing(providerId: string, shared: boolean): Promise; /** Every provider Pi knows on the hub's machine, with its auth state. */ export declare function listProviders(): Promise; /** Starts a sign-in on the hub; the returned flow is then polled with readLogin. */ export declare function startLogin(providerId: string, type: AuthMethodType): Promise; export declare function readLogin(flowId: string): Promise; export declare function answerLogin(flowId: string, promptId: string, value: string): Promise; export declare function cancelLogin(flowId: string): Promise; /** Removes the credential /login stored; environment variables are untouched. */ export declare function logoutProvider(providerId: string): Promise; //#endregion //# sourceMappingURL=authApi.d.mts.map