import type { EventSubscription } from 'react-native'; import type { AmplitudeBootOptions, AmplitudeInitOptions, AmplitudeIntegration, GuideOrSurvey, ThemeMode } from './types'; import type { BaseEvent } from '@amplitude/analytics-core'; import { type AmplitudeLogger } from './logger'; /** * Async factory for an {@link AmplitudeEngagement}. Awaits the native * `newInstance` handle rather than requiring it synchronously. The native * `newInstance` is now Promise-returning and runs off the JS thread (the heavy * `AESDK_Factory.make` work is scheduled off the app-launch critical path on * each platform, so awaiting this does not block the caller. */ export declare function mkAmplitudeEngagement(apiKey: string, options?: AmplitudeInitOptions): Promise; export declare class AmplitudeEngagement { /** * Handle to the native instance. Kept as a Promise so callers can invoke SDK * methods before initialization has finished; each method awaits it before * touching the native module. */ id: Promise; logger: AmplitudeLogger; integrations: AmplitudeIntegration[]; integrationsSubscription: EventSubscription | null; routerSubscription: EventSubscription | null; private constructor(); /** * Fire-and-forget construction: kicks off the native `newInstance` and wraps * the returned handle promise without awaiting it, so the caller (the * synchronous {@link init}) is not blocked. SDK calls issued before the id * resolves queue on {@link id}. Used by {@link init}. */ static create(apiKey: string, options?: AmplitudeInitOptions): AmplitudeEngagement; /** * Awaits the native handle before returning, so callers that `await` this are * guaranteed the native instance exists before they issue further calls. The * native `newInstance` runs off the JS thread, so this still does not block * the caller's thread. Used by {@link initAsync}. */ static createAsync(apiKey: string, options?: AmplitudeInitOptions): Promise; boot(options: AmplitudeBootOptions): Promise; boot(user_id?: string, device_id?: string, user_properties?: Object): Promise; enable(): Promise; disable(): Promise; shutdown(): Promise; setThemeMode(themeMode: ThemeMode): Promise; reset(key: string, stepIndex: number): Promise; list(): Promise; show(key: string, stepIndex: number): Promise; screen(screenName: string): Promise; closeAll(): Promise; forwardEvent(event: BaseEvent): Promise; addCallback(key: string, func: () => void): () => void; /** * Sets a router function used to handle navigation requests from guides * (e.g. "Go to screen" CTA actions). */ setRouter(router: (url: string) => void): Promise; /** Removes the currently configured router, if any. */ unsetRouter(): Promise; handleURL(url: string): Promise; updateLanguage(locale: string): Promise; } //# sourceMappingURL=AmplitudeEngagement.d.ts.map