import { a as HeyCatchPersonProperties, H as HeyCatchConfig, b as HeyCatchProperties, T as TrackOptions } from './shared-B8y8fJCD.cjs'; export { P as PersonPropertyUpdate, S as SDK_VERSION, c as STAGE, d as ServerTrackOptions } from './shared-B8y8fJCD.cjs'; import { ReactNode } from 'react'; /** * Link the device's anonymous visitor to the authenticated user. Same * contract as the web entry: a stable internal user id - never an email or * a session token - with email/name in the PROPERTIES. No-op before * `init()`, mirroring the web entry. */ declare function setIdentity(userId: string, properties?: HeyCatchPersonProperties, propertiesOnce?: HeyCatchPersonProperties): void; /** * Clear the current identity. Call on sign-out so the next user on this * device starts anonymous. */ declare function resetIdentity(): void; declare function init(config: HeyCatchConfig): void; /** * Record a screen view. `HeyCatchProvider` calls this automatically on * Expo Router route changes; call it manually only on a non-Expo-Router * navigator (pass the current route name from your navigation container). * * Manual by design: the transport's own screen autocapture is broken on * React Navigation v7 (what current Expo Router runs on) - its hooks may * not run above the navigator, which is exactly where a provider sits. */ declare function trackScreen(name: string, properties?: HeyCatchProperties): void; /** * Record a product event. Touch autocapture (via `HeyCatchProvider`) and * lifecycle events cover behaviour - this is for the moments only the app * knows about. Same validation contract as the web entry; `userId` in the * options is ignored here, the device session already knows who. */ declare function trackEvent(event: string, properties?: HeyCatchProperties, options?: TrackOptions): void; /** * Update the current person's properties without sending a product event - * same surface as the web entry. The `$set` event is the transport's * person-update carrier; it is a built-in, not a custom event, so no * `heycatch_custom_user_event` stamp. */ declare function setPersonProperties(set?: HeyCatchPersonProperties, setOnce?: HeyCatchPersonProperties): void; /** * Mount once in the root layout (`app/_layout.tsx`), wrapping the layout's * children. It adds the two things `init` alone cannot: touch autocapture * (the transport hooks touches via a root View, so a component is * structurally required) and automatic screen views on Expo Router. * Everything else - lifecycle events, identity, business events - works * from `init` alone. */ declare function HeyCatchProvider({ children, }: { children: ReactNode; }): ReactNode; /** * The React Native entry. The `react-native` export condition routes a * bare `@heycatch/sdk` import here under Metro (newest Expo enables * package exports with that condition), so the customer API stays ONE * surface across web, server, and native. * * Wraps posthog-react-native - a regular dependency, deliberately NOT * bundled: bundling breaks its optional-Expo-peer probing. Not a peer * either: a peer would force the agent guide to name the vendor in its * install line (the vendor-ban spec forbids exactly that); the dependency * resolves silently instead. The Expo companions are app-level installs * the guide's RN line carries (`expo-file-system` above all - without it * persistence silently falls back to memory and every launch becomes a * new anonymous person). * * Flags, surveys, replay, and error tracking are never fetched or enabled. * Native-only additions to the namespace: `trackScreen`, plus the * `HeyCatchProvider` component for touch autocapture + Expo Router screen * views. */ /** * The same-shaped `analytics` namespace as the web and server entries, * plus the native-only `trackScreen`. */ declare const analytics: { readonly init: typeof init; readonly resetIdentity: typeof resetIdentity; readonly setIdentity: typeof setIdentity; readonly setPersonProperties: typeof setPersonProperties; readonly trackEvent: typeof trackEvent; readonly trackScreen: typeof trackScreen; }; export { HeyCatchConfig, HeyCatchPersonProperties, HeyCatchProperties, HeyCatchProvider, TrackOptions, analytics };