/**
 * Backup Cloud Client (P3)
 *
 * OSS-side HTTP client for the Pro-gated cloud backup service
 * (`/api/cloud/backup`). Used by `crewly backup push/pull/list` to park an
 * archive in the cloud and pull it back on another machine.
 *
 * Transport-only: it streams files to/from the cloud and surfaces a friendly
 * upgrade error on 402. Auth (access token) + base URL come from
 * CloudClientService; both are injected so this is testable without the cloud.
 *
 * @module services/backup/backup-cloud.client
 */
/** Thrown when the account isn't Pro (HTTP 402). */
export declare class BackupNotProError extends Error {
    readonly code = "upgrade_required";
    constructor(message?: string);
}
/** Thrown on any other cloud backup HTTP failure. */
export declare class BackupCloudError extends Error {
    readonly status?: number | undefined;
    constructor(message: string, status?: number | undefined);
}
/** A cloud snapshot as returned by the service (client-facing view). */
export interface CloudBackupItem {
    backupId: string;
    deviceName: string | null;
    deviceId: string | null;
    sizeBytes: number;
    sha256: string | null;
    cryptoMode: 'sse' | 'none';
    createdAt: string;
}
/** Metadata sent with an upload. */
export interface PushMeta {
    backupId?: string;
    deviceName?: string | null;
    deviceId?: string | null;
    sha256?: string | null;
}
/** HTTP client for the cloud backup endpoints. */
export declare class BackupCloudClient {
    private readonly opts;
    private readonly fetchImpl;
    constructor(opts: {
        baseUrl: string;
        token: string;
        fetchImpl?: typeof fetch;
    });
    private url;
    private authHeaders;
    /** List this account's cloud snapshots (newest first). */
    list(): Promise<CloudBackupItem[]>;
    /**
     * Upload an archive to the cloud. Streams the file with its Content-Length so
     * the service can enforce quota before accepting the blob.
     *
     * @param archivePath - Local archive (.tar.gz)
     * @param meta - Optional backupId + device/sha metadata
     * @returns The created snapshot record
     */
    push(archivePath: string, meta?: PushMeta): Promise<CloudBackupItem>;
    /**
     * Download a snapshot to `destPath` (streamed).
     *
     * @param backupId - Snapshot id
     * @param destPath - Local file to write
     */
    pull(backupId: string, destPath: string): Promise<void>;
    /** Delete a cloud snapshot. */
    remove(backupId: string): Promise<void>;
    /** Map non-2xx responses to typed errors (402 → upgrade). */
    private assertOk;
}
//# sourceMappingURL=backup-cloud.client.d.ts.map