export interface RegisteredClient<TMeta> {
    clientId: string;
    nodeId: number;
    connectedAt: number;
    metadata: TMeta;
}
export type MeshClientRegistrationState = 'active' | 'pending';
/** Result of a register call. */
export type RegisterResult = {
    status: 'ok';
    supersededNodeId: number | null;
} | {
    status: 'conflict';
    ownerNodeId: number | null;
};
export interface MeshClientRegistryBackend<TMeta> {
    register(clientId: string, nodeId: number, metadata: TMeta, allowSupersede?: boolean): Promise<RegisterResult>;
    reserve(clientId: string, nodeId: number, metadata: TMeta, allowSupersede?: boolean): Promise<RegisterResult>;
    activate(clientId: string, nodeId: number, metadata: TMeta): Promise<boolean>;
    unregister(clientId: string, nodeId: number): Promise<boolean>;
    updateMetadata(clientId: string, nodeId: number, metadata: TMeta): Promise<boolean>;
    getClient(clientId: string): Promise<RegisteredClient<TMeta> | undefined>;
    listClients(): Promise<RegisteredClient<TMeta>[]>;
    listClientsForNode(nodeId: number): Promise<RegisteredClient<TMeta>[]>;
    cleanupNode(nodeId: number): Promise<RegisteredClient<TMeta>[]>;
}
export declare class ClientNotFoundError extends Error {
    constructor(clientId: string);
}
export declare class ClientDisconnectedError extends Error {
    constructor(clientId: string);
}
export declare class ClientInvocationError extends Error {
    constructor(message: string);
}
export declare type __ΩRegisteredClient = any[];
export declare type __ΩMeshClientRegistrationState = any[];
export declare type __ΩRegisterResult = any[];
export declare type __ΩMeshClientRegistryBackend = any[];
//# sourceMappingURL=types.d.ts.map