export type Platform = 'ios' | 'android';
export interface OnboardingCompletionSummary {
    /** The Capgo dashboard build URL, when a build was kicked off. */
    buildUrl?: string;
    /** One-line CI-secret upload summary, when secrets were pushed. */
    ciSecretUploadSummary?: string | null;
    /** Path to the generated GitHub Actions workflow file, when written. */
    workflowFilePath?: string | null;
    /** Path to the exported .env file, when the user chose the env-export fallback. */
    envExportPath?: string | null;
    /** The "run anytime" build-request command shown on the final screen. */
    buildRequestCommand?: string;
}
export interface OnboardingResult {
    outcome: 'completed' | 'cancelled';
    /** Present only when outcome === 'completed'. */
    summary?: OnboardingCompletionSummary;
}
export type OnboardingStep = 'welcome' | 'platform-select' | 'adding-platform' | 'credentials-exist' | 'backing-up' | 'setup-method-select' | 'import-scanning' | 'import-distribution-mode' | 'import-pick-identity' | 'import-pick-profile' | 'import-no-match-recovery' | 'import-fetching-profile' | 'import-create-profile-only' | 'import-export-warning' | 'import-compiling-helper' | 'import-exporting' | 'api-key-instructions' | 'p8-method-select' | 'input-p8-path' | 'input-key-id' | 'input-issuer-id' | 'verifying-key' | 'creating-certificate' | 'cert-limit-prompt' | 'revoking-certificate' | 'creating-profile' | 'duplicate-profile-prompt' | 'deleting-duplicate-profiles' | 'saving-credentials' | 'detecting-ci-secrets' | 'ci-secrets-setup' | 'ci-secrets-target-select' | 'ask-ci-secrets' | 'checking-ci-secrets' | 'confirm-ci-secret-overwrite' | 'uploading-ci-secrets' | 'ci-secrets-failed' | 'ask-github-actions-setup' | 'confirm-secrets-push' | 'ask-export-env' | 'exporting-env' | 'confirm-env-export-overwrite' | 'overwrite-and-export-env' | 'pick-package-manager' | 'pick-build-script' | 'pick-build-script-custom' | 'preview-workflow-file' | 'view-workflow-diff' | 'writing-workflow-file' | 'ask-build' | 'requesting-build' | 'ai-analysis-prompt' | 'ai-analysis-running' | 'ai-analysis-result' | 'ai-analysis-result-scroll' | 'build-complete' | 'no-platform' | 'error';
export type OnboardingErrorCategory = 'apple_api_unauthorized' | 'apple_api_rate_limited' | 'cert_limit_reached' | 'profile_creation_failed' | 'p8_invalid' | 'keychain_no_identities' | 'keychain_export_failed' | 'keychain_helper_compile_failed' | 'profile_no_match' | 'profile_read_failed' | 'unknown';
export interface ApiKeyData {
    keyId: string;
    issuerId: string;
}
export interface CertificateData {
    certificateId: string;
    expirationDate: string;
    teamId: string;
    p12Base64: string;
}
export interface ProfileData {
    profileId: string;
    profileName: string;
    profileBase64: string;
}
export interface OnboardingProgress {
    platform: Platform;
    appId: string;
    startedAt: string;
    /** Path to the .p8 file on disk (content is NOT stored, only the path) */
    p8Path?: string;
    /** Partial input — saved incrementally so resume works mid-flow */
    keyId?: string;
    issuerId?: string;
    /**
     * Records which fork the user picked at `setup-method-select`. Crucial for
     * resume — without this, a partial import-flow run would resume at
     * `creating-certificate` (the create-new path) and immediately hit the
     * Apple cert-limit error.
     *
     * Absent on legacy progress files (created before this field existed) →
     * resume defaults to `create-new` for backward compatibility.
     */
    setupMethod?: 'create-new' | 'import-existing';
    /**
     * Records the distribution mode picked at `import-distribution-mode`.
     *
     * Persisted (not derived from .p8 presence) because ad_hoc users can
     * legitimately enter a one-shot .p8 during no-match recovery, which would
     * otherwise make .p8-presence-implies-app_store an incorrect heuristic. On
     * resume the UI hydrates `importDistribution` from this field so the
     * `verifying-key` branch and `doSaveCredentials` route correctly.
     *
     * Only meaningful when `setupMethod === 'import-existing'`.
     */
    importDistribution?: 'app_store' | 'ad_hoc';
    completedSteps: {
        apiKeyVerified?: ApiKeyData;
        certificateCreated?: CertificateData;
        profileCreated?: ProfileData;
    };
    /** Temporary — wiped after .p12 creation */
    _privateKeyPem?: string;
}
/** Maps each step to a progress percentage (0-100) */
export declare const STEP_PROGRESS: Record<OnboardingStep, number>;
export declare function getPhaseLabel(step: OnboardingStep): string;
