import * as v from '../../shared/src/valita.ts';
import type { Read, Write } from './dag/store.ts';
import { type ClientGroupID, type ClientID } from './sync/ids.ts';
/**
 * We keep track of deleted clients in the {@linkcode DELETED_CLIENTS_HEAD_NAME}
 * head.
 */
export declare const DELETED_CLIENTS_HEAD_NAME = "deleted-clients-v2";
type ClientIDPair = {
    clientGroupID: ClientGroupID;
    clientID: ClientID;
};
export type DeletedClients = readonly Readonly<ClientIDPair>[];
export type WritableDeletedClients = ClientIDPair[];
export declare const deletedClientsSchema: v.Type<DeletedClients>;
export declare function normalizeDeletedClients(deletedClients: DeletedClients): DeletedClients;
export declare function mergeDeletedClients(a: DeletedClients, b: DeletedClients): DeletedClients;
export declare function removeFromDeletedClients(old: DeletedClients, toRemove: DeletedClients): DeletedClients;
export declare function setDeletedClients(dagWrite: Write, deletedClients: DeletedClients): Promise<DeletedClients>;
export declare function getDeletedClients(dagRead: Read): Promise<DeletedClients>;
/**
 * Adds deleted clients to the {@linkcode DELETED_CLIENTS_HEAD_NAME} head.
 * @returns the new list of deleted clients (sorted and deduped).
 */
export declare function addDeletedClients(dagWrite: Write, deletedClientsToAdd: DeletedClients): Promise<DeletedClients>;
export declare function removeDeletedClients(dagWrite: Write, deletedClientsToRemove: DeletedClients): Promise<DeletedClients>;
export declare function confirmDeletedClients(dagWrite: Write, deletedClientIds: readonly ClientID[], deletedClientGroupIds: readonly ClientGroupID[]): Promise<DeletedClients>;
/**
 * Sorts and dedupes the given array.
 */
export declare function normalize<T>(arr: readonly T[]): T[];
export {};
//# sourceMappingURL=deleted-clients.d.ts.map