import type { AndroidOnboardingErrorCategory, AndroidOnboardingStep } from './android/types.js';
import type { OnboardingErrorCategory, OnboardingStep, Platform } from './types.js';
export interface TrackBuilderOnboardingStepInput {
    apikey: string;
    appId: string;
    orgId: string;
    /** Correlation id tying every event from one onboarding run together. */
    journeyId: string;
    platform: Platform;
    step: OnboardingStep | AndroidOnboardingStep;
    durationMs?: number;
    /** Step whose elapsed time is represented by durationMs. */
    durationStep?: OnboardingStep | AndroidOnboardingStep;
    /** Raw caught error — mapped via the platform's category mapper. Use this OR errorCategory, not both. */
    error?: unknown;
    /** Pre-computed category. Takes precedence over `error` if both are present. */
    errorCategory?: OnboardingErrorCategory | AndroidOnboardingErrorCategory;
}
export type BuilderOnboardingAction = 'resume_prompt_decision' | 'android_sa_method_selected' | 'android_sa_validation_recovery_selected' | 'android_sa_validation_result';
export interface TrackBuilderOnboardingActionInput {
    apikey: string;
    appId: string;
    orgId: string;
    /** Correlation id tying every event from one onboarding run together. */
    journeyId: string;
    platform: Platform;
    step: OnboardingStep | AndroidOnboardingStep;
    action: BuilderOnboardingAction;
    tags?: Record<string, boolean | number | string>;
}
export declare function trackBuilderOnboardingStep(input: TrackBuilderOnboardingStepInput): Promise<void>;
export declare function trackBuilderOnboardingAction(input: TrackBuilderOnboardingActionInput): Promise<void>;
export interface TrackBuilderOnboardingCancelledInput {
    apikey: string;
    appId: string;
    /** May be undefined when the owner org couldn't be resolved post-exit. */
    orgId?: string;
    /** Correlation id tying every event from one onboarding run together. */
    journeyId: string;
    /**
     * The platform being onboarded, or undefined when the user quit BEFORE
     * choosing one (e.g. on the platform picker). The undefined case is itself a
     * useful signal — it isolates "left at the very first screen" drop-off.
     */
    platform?: Platform;
    /** The step the user was on when they quit, when known. */
    lastStep?: string;
    /** Total wall-clock duration of the journey, from launch to quit. */
    durationMs?: number;
    /**
     * Abort signal used to time-box the post-quit flush so a stalled network
     * can't keep the CLI alive after the user has already exited the wizard.
     */
    signal?: AbortSignal;
}
/**
 * Emits the terminal "Builder Onboarding Quit" event when a journey ends
 * without reaching build-complete (user cancel, Ctrl+C, missing platform, or a
 * fatal error that exits). Fired ONCE from command.ts after the wizard tears
 * down — never mid-flow — so each journey has at most one quit marker. Unlike
 * the per-step events this carries no org-scoped requirement: it sends with
 * whatever org id could be resolved (possibly none) rather than dropping the
 * event, because a quit is exactly when we most want the funnel exit recorded.
 */
export declare function trackBuilderOnboardingCancelled(input: TrackBuilderOnboardingCancelledInput): Promise<void>;
