import type { OnboardingAppProfile, OnboardingMethod, OnboardingStepStatus } from "../../onboarding/types.js"; type CustomKeyOnboardingSetupKind = "credential" | "local_endpoint"; type CustomKeyOnboardingOutcome = "credential_entry_started" | "credential_validated" | "credential_saved" | "credential_skipped" | "credential_abandoned" | "local_endpoint_saved" | "local_endpoint_skipped" | "local_endpoint_abandoned"; type CustomKeyOutcomeResult = "tracked" | "tracked_uncorrelated" | "tracked_storage_unavailable" | "pending" | "missing" | "unavailable" | "stale" | "identity_mismatch" | "duplicate"; export declare function createOnboardingCorrelationId(): string; export declare function setCustomKeyOnboardingAttempt(id: string): Promise<"stored" | "no_session" | "unavailable">; export declare function setCustomKeyOnboardingSetupKind(setupKind: CustomKeyOnboardingSetupKind): "stored" | "memory" | "missing" | "unavailable"; export declare function trackCustomKeyOnboardingOutcome(outcome: CustomKeyOnboardingOutcome): CustomKeyOutcomeResult; export declare function withCustomKeyOnboardingCredentialSave(save: () => Promise): Promise; export declare function withCustomKeyOnboardingLocalEndpointSave(save: () => Promise): Promise; export declare function requestCustomKeyOnboardingAbandonment(): void; export declare function useCustomKeyOnboardingAttemptLifecycle(): void; export declare function __resetOnboardingSummaryReadsForTests(): void; export declare function __resetOnboardingEventDedupeForTests(): void; export declare function __resetOnboardingExperimentMemoryForTests(): void; /** * Tags later first-run onboarding events with the experiment arm the user was * exposed to, so funnels split by variant without each emitter (including the * settings-side custom-key outcome) knowing about the experiment. Only * `flow: "first_run"` events are tagged: the checklist and other onboarding * flows share this tracker and must not inherit the arm. */ export declare function setOnboardingExperiment(experiment: { id: string; variant: string; } | null): void; export declare function trackOnboardingEvent(name: string, properties: Record): void; export interface UseOnboardingResult { steps: OnboardingStepStatus[]; profile: OnboardingAppProfile | null; loading: boolean; error: string | null; summaryKnown: boolean; currentStepId: string | null; completeCount: number; totalCount: number; allComplete: boolean; dismissed: boolean; refresh: () => Promise; complete: (id: string) => Promise; dismiss: () => Promise; reopen: () => Promise; firstRun: boolean; completeFirstRun: () => Promise; completeFirstRunError: string | null; } export declare function useOnboarding(options?: { preview?: boolean; initialFirstRun?: boolean; /** The consumer renders first run itself when the server reports it. */ firstRunSurface?: boolean; }): UseOnboardingResult; export type { OnboardingMethod, OnboardingStepStatus };