@capgo/cli
Version:
A CLI to upload to capgo servers
23 lines (22 loc) • 1.37 kB
TypeScript
import type { AndroidOnboardingProgress, AndroidOnboardingStep } from './types.js';
export declare function loadAndroidProgress(appId: string, baseDir?: string): Promise<AndroidOnboardingProgress | null>;
export declare function saveAndroidProgress(appId: string, progress: AndroidOnboardingProgress, baseDir?: string): Promise<void>;
export declare function deleteAndroidProgress(appId: string, baseDir?: string): Promise<void>;
export declare function hasAnyOAuthProgress(progress: AndroidOnboardingProgress): boolean;
/**
* Determine the first incomplete step for the Android flow.
*
* Each phase is validated by checking both:
* 1. The `completedSteps.<phase>` marker (atomic write to a single field)
* 2. The ephemeral fields the marker depends on (separate top-level writes
* that can race against each other and against the marker)
*
* If a marker is present but the ephemeral data is missing, the phase is
* treated as incomplete — the user is routed back to the input step that
* collects the missing field, never further forward.
*
* This is the contract that makes the state machine self-healing: any
* inconsistent state on disk lands the user on a working input step instead
* of crashing several phases later.
*/
export declare function getAndroidResumeStep(progress: AndroidOnboardingProgress | null): AndroidOnboardingStep;