import type { Client } from '@botpress/client';
import { type DependencyMigrationMarker, type DependencySnapshotData, type Environment } from './types.js';
export interface DependencySnapshotStoreOptions {
    projectPath: string;
}
export interface DependencySnapshotWarning {
    code: 'SNAPSHOT_CORRUPT';
    message: string;
    env: Environment;
    path: string;
}
export interface IntegrationAuthorizationSpecSource {
    getSpec(name: string, version?: string): Promise<unknown>;
}
export declare class DependencySnapshotStore {
    private readonly projectPath;
    private readonly dirPath;
    constructor(opts: DependencySnapshotStoreOptions);
    getSnapshotPath(env: Environment): string;
    getMigrationMarkerPath(): string;
    exists(env: Environment): Promise<boolean>;
    read(env: Environment, options?: {
        tolerant?: boolean;
    }): Promise<DependencySnapshotData | null>;
    readOrEmpty(env: Environment, options?: {
        tolerant?: boolean;
        botId?: string;
        fetchedAt?: Date;
    }): Promise<DependencySnapshotData>;
    write(snapshot: DependencySnapshotData): Promise<void>;
    delete(env: Environment): Promise<void>;
    /**
     * The migration marker is an existence-only tombstone: present ⟹ the one-way
     * legacy→Cloud migration already ran. Its JSON contents (version, migratedAt,
     * sources) are informational — never parsed for gating, so a corrupt marker
     * still counts as migrated. The CLI patcher applies the same existence
     * semantics to the same file.
     */
    hasMigrationMarker(): Promise<boolean>;
    writeMigrationMarker(marker: DependencyMigrationMarker): Promise<void>;
    refreshFromCloud(opts: {
        client: Client;
        botId: string;
        env: Environment;
        fetchedAt?: Date;
        integrationRegistry?: IntegrationAuthorizationSpecSource;
        onWarning?: (warning: DependencySnapshotWarning) => void;
    }): Promise<DependencySnapshotData>;
    private readForRefresh;
}
export declare function emptyDependencySnapshot(env: Environment, botId?: string, fetchedAt?: Date): DependencySnapshotData;
export declare function dependencySnapshotFromBot(opts: {
    bot: Awaited<ReturnType<Client['getBot']>>['bot'];
    botId: string;
    env: Environment;
    fetchedAt: Date;
    previous?: DependencySnapshotData | null;
}): DependencySnapshotData;
//# sourceMappingURL=snapshot-store.d.ts.map