import { MutableRefObject } from 'react'; import { ProfileUser, AuthTokens } from '../ProfileStorageManager'; export interface AuthActionsDeps { user: ProfileUser | null; tokens: AuthTokens | null; activeId: string | null; bridgeSyncInProgress: MutableRefObject; onRefreshToken: ((refreshToken: string) => Promise<{ accessToken: string; refreshToken?: string; expiresAt?: number; }>) | undefined; onTokenExpired: (() => void) | undefined; setActiveId: (id: string | null) => void; setUser: (user: ProfileUser | null) => void; setTokens: (tokens: AuthTokens | null) => void; setWorkspaceTokenLocal: (token: string | null) => void; setMfaRequiredState: (required: boolean) => void; setMfaChallengeIdState: (id: string | null) => void; setIsLoading: (loading: boolean) => void; clearAccounts: () => void; refreshAccounts: () => void; } export interface LogoutOptions { /** * `true` (default) = an EXPLICIT user sign-out: revoke ALL server-side * sessions (authoritative single-logout) and detour through the bridge * host's /auth/sso-clear so its stored session is wiped too. * * `false` = a failure-driven local logout (expired session, failed token * refresh, remote-SLO detection). Only THIS origin's state is cleared. * BOFF-4463: these paths used to fire the authoritative signOut mutation, * so one shell holding a stale relayed token would revoke the user's * sessions platform-wide and cascade-logout every product within the 90s * remote-SLO poll. */ authoritative?: boolean; } export interface AuthActions { login: (user: ProfileUser, accessToken: string, refreshToken?: string) => void; logout: (options?: LogoutOptions) => void; logoutAll: () => void; updateUser: (updates: Partial) => void; refreshAccessToken: () => Promise; hasPermission: (permission: string) => boolean; setWorkspaceToken: (token: string | null) => void; setMfaState: (required: boolean, challengeId?: string | null) => void; switchAccount: (accountId: string) => void; addAccount: (user: ProfileUser, accessToken: string, refreshToken?: string) => void; removeAccount: (accountId: string) => void; } export declare function useAuthActions({ user, tokens, activeId, bridgeSyncInProgress, onRefreshToken, onTokenExpired, setActiveId, setUser, setTokens, setWorkspaceTokenLocal, setMfaRequiredState, setMfaChallengeIdState, setIsLoading, clearAccounts, refreshAccounts, }: AuthActionsDeps): AuthActions; //# sourceMappingURL=useAuthActions.d.ts.map