import { type CloudflareCheckupSnapshotV1, type SnapshotEntry } from './contract.js';
import { LocalCheckupError } from './errors.js';
export declare function sha256Hex(bytes: Uint8Array | string): string;
/** Write the snapshot; refuses an existing file unless `overwrite` (atomic rename). */
export declare function writeSnapshotFile(path: string, text: string, options: {
    overwrite: boolean;
}): Promise<{
    bytes: number;
    sha256: string;
}>;
export type LoadedSnapshot = {
    path: string;
    bytes: Buffer;
    sha256: string;
    snapshot: CloudflareCheckupSnapshotV1;
};
/** Map a failed contract parse to the CLI error (no values, issue codes only). */
export declare function snapshotParseError(issues: ReadonlyArray<{
    code?: string;
    message?: string;
    path?: ReadonlyArray<PropertyKey>;
    params?: unknown;
}>): LocalCheckupError;
/** Read, hash and validate a snapshot file against the vendored contract. */
export declare function loadSnapshotFile(path: string): Promise<LoadedSnapshot>;
export type EntryCounts = {
    total: number;
    ok: number;
    httpError: number;
    notCollected: number;
    collectionFailed: number;
};
export declare function countEntries(entries: readonly SnapshotEntry[]): EntryCounts;
export type EntryKindCounts = Record<string, {
    total: number;
    ok: number;
    httpError: number;
    notCollected: number;
    collectionFailed: number;
}>;
export declare function countEntriesByKind(entries: readonly SnapshotEntry[]): EntryKindCounts;
/** Counts of every free-text or identifying category the snapshot carries (`inspect`). */
export type DataCategories = {
    memberEmails: number;
    accessRuleValues: number;
    dnsHostnames: number;
    pseudonymizedIps: number;
    ruleDescriptions: number;
};
export declare function dataCategories(snapshot: CloudflareCheckupSnapshotV1): DataCategories;
export declare function zoneCount(snapshot: CloudflareCheckupSnapshotV1): number;
export declare function accountName(snapshot: CloudflareCheckupSnapshotV1): string | null;
