import { a as HeyCatchPersonProperties, H as HeyCatchConfig, b as HeyCatchProperties, T as TrackOptions } from './shared-B8y8fJCD.js'; export { P as PersonPropertyUpdate, S as SDK_VERSION, c as STAGE, d as ServerTrackOptions } from './shared-B8y8fJCD.js'; /** * Link the anonymous visitor to your authenticated user. Call once * right after sign-in with a stable internal user id - never an email * or a session token AS THE ID. Any auth provider works. No-op before * `init()` or on the server. * * Pass person `properties` as the second arg - they ride along on the * identify event and power the dashboard's users table. Email here is * fine; it's a property, not the identity. * * The third arg is set-ONCE: written only if the person does not already * have the key, so a later sign-in cannot overwrite it. Use it for values * that describe the beginning (`signup_date`, `initial_plan`) - passing * those as regular properties would reset them on every login. * * @example * setIdentity(user.id, * { email: user.email, plan: 'pro' }, * { signup_date: user.createdAt }, * ); */ declare function setIdentity(userId: string, properties?: HeyCatchPersonProperties, propertiesOnce?: HeyCatchPersonProperties): void; /** * Clear the current identity. Call on sign-out so the next visitor on * this browser starts anonymous. */ declare function resetIdentity(): void; declare function init(config: HeyCatchConfig): void; /** * Record a product event. * * Autocapture already sends pageviews, clicks and rage-clicks, so this is for * the moments only your app knows about: a completed sign-up, a subscription, * a finished onboarding step. * * `set` / `setOnce` attach person properties to the same request, which is one * round trip instead of two and keeps the property change atomic with the event * that caused it: * * @example * track('subscription_started', { plan: 'pro' }, { * set: { current_plan: 'pro' }, * setOnce: { first_subscribed_at: new Date().toISOString() }, * }); * * No-op before `init()` or on the server. */ declare function trackEvent(event: string, properties?: HeyCatchProperties, options?: TrackOptions): void; /** * Update the current person's properties without sending a product event, and * without changing who they are. * * Use when something about the user changed but no single event represents it - * a plan downgrade applied by a cron, a profile edit. If an event DOES * represent it, prefer `track(..., { set })`: one request, and the property * change stays attached to its cause. * * @example setPersonProperties({ plan: 'enterprise', seats: 75 }); * * No-op before `init()` or on the server. */ declare function setPersonProperties(set?: HeyCatchPersonProperties, setOnce?: HeyCatchPersonProperties): void; /** * The analytics surface, as one namespace. The package is HeyCatch's * product SDK - analytics is its first capability, not its identity - so * the API ships as `analytics.*` and a future capability arrives as a * sibling namespace instead of more loose top-level functions. The server * entry exports the same-shaped object, which is what keeps isomorphic * code resolving under every `exports` condition. */ declare const analytics: { readonly init: typeof init; readonly resetIdentity: typeof resetIdentity; readonly setIdentity: typeof setIdentity; readonly setPersonProperties: typeof setPersonProperties; readonly trackEvent: typeof trackEvent; }; export { HeyCatchConfig, HeyCatchPersonProperties, HeyCatchProperties, TrackOptions, analytics };