UNPKG

logggai

Version:

AI-powered CLI for transforming your development work into professional content

19 lines 853 B
declare function getTokenExpiration(): Date | null; declare function isTokenExpired(): boolean; /** * Attempts to refresh the access token using the refresh token * @returns true if refresh was successful, false otherwise */ declare function refreshAccessToken(): Promise<boolean>; /** * Ensures a valid session by checking token expiration and refreshing if needed * @param relaunchFn Function to call after login (replays the command) */ export declare function ensureValidSession(relaunchFn?: () => Promise<void>): Promise<boolean>; /** * Wrapper function to automatically handle authentication for commands * @param commandFn The command function to execute */ export declare function withAuth<T>(commandFn: () => Promise<T>): Promise<T>; export { isTokenExpired, getTokenExpiration, refreshAccessToken }; //# sourceMappingURL=auth.d.ts.map