import { type FirebaseApp } from '@react-native-firebase/app'; import type { AppCheck, AppCheckOptions, AppCheckTokenResult, PartialObserver, Unsubscribe } from './types/appcheck'; export { CustomProvider, ReactNativeFirebaseAppCheckProvider } from './providers'; /** * Activate App Check for the given app. Can be called only once per app. * @param app - The app to initialize App Check for. Optional. * @param options - App Check options. * @returns Promise */ export declare function initializeAppCheck(app?: FirebaseApp, options?: AppCheckOptions): Promise; /** * Get the current App Check token. Attaches to the most recent in-flight request if one is present. * Returns null if no token is present and no token requests are in-flight. * @param appCheckInstance - The App Check instance. * @param forceRefresh - Whether to force refresh the token. Optional * @returns Promise */ export declare function getToken(appCheckInstance: AppCheck, forceRefresh?: boolean): Promise; /** * Get a limited-use (consumable) App Check token. * For use with server calls to firebase functions or custom backends using the firebase admin SDK. * @param appCheckInstance - The App Check instance. * @returns Promise */ export declare function getLimitedUseToken(appCheckInstance: AppCheck): Promise; /** * Set whether App Check will automatically refresh tokens as needed. * @param appCheckInstance - The App Check instance. * @param isAutoRefreshEnabled - Whether to enable auto-refresh. */ export declare function setTokenAutoRefreshEnabled(appCheckInstance: AppCheck, isAutoRefreshEnabled: boolean): void; /** * Registers a listener to changes in the token state. There can be more * than one listener registered at the same time for one or more * App Check instances. The listeners call back on the UI thread whenever * the current token associated with this App Check instance changes. * * @param appCheckInstance - The App Check instance. * @param observer - The listener to register. * @returns Unsubscribe */ export declare function onTokenChanged(appCheckInstance: AppCheck, observer: PartialObserver): Unsubscribe; /** * Registers a listener to changes in the token state. There can be more * than one listener registered at the same time for one or more * App Check instances. The listeners call back on the UI thread whenever * the current token associated with this App Check instance changes. * * @param appCheckInstance - The App Check instance. * @param onNext - The callback function for token changes. * @param onError - Optional error callback. * @param onCompletion - Optional completion callback. * @returns Unsubscribe */ export declare function onTokenChanged(appCheckInstance: AppCheck, onNext: (tokenResult: AppCheckTokenResult) => void, onError?: (error: Error) => void, onCompletion?: () => void): Unsubscribe; //# sourceMappingURL=modular.d.ts.map