import React from 'react'; import { RefreshResult } from 'react-native-app-auth'; import { AxiosError } from 'axios'; export interface AuthStatus { loading: boolean; isLoggedIn: boolean; authResult?: AuthResult; storeAuthResult: (authResult: AuthResult) => Promise; clearAuthResult: () => Promise; initialize: (refreshHandler: RefreshHandler) => Promise; refreshForAuthFailure: (error: AxiosError) => Promise; refreshForInviteAccept: () => Promise; } export type AuthResult = Omit; export type RefreshHandler = (authResult: AuthResult) => Promise; export declare function shouldAttemptTokenRefresh(expirationDate: string | number | Date | undefined): boolean; /** * The AuthContextProvider is primarily focused on secure auth token storage. * Being the gatekeeper on that auth token/result, it also centralizes state * about loading or refreshing (e.g. `loading` and `isLoggedIn`). */ export declare const AuthContextProvider: ({ children, }: { children?: React.ReactNode; }) => React.JSX.Element; export declare const useAuth: () => AuthStatus;