import type { MeshClientRecord, MeshClientRegistryBackend, MeshClientRegistrationState, RegisteredClient, RegisterResult } from './types';
export interface MeshClientRedisRegistryOptions {
    maxClientIdBytes?: number;
    maxMetadataBytes?: number;
    maxClientsPerNode?: number;
    scanBatchSize?: number;
    cleanupBatchSize?: number;
    maxAuthReplayPrincipals?: number;
    maxAuthNoncesPerPrincipal?: number;
    /** Global durable orphan queue caps (not merely per snapshot). */
    maxOrphanItems?: number;
    maxOrphanBytes?: number;
}
export declare function destroyClientRedis(): void;
export declare class MeshClientRedisRegistry<TMeta> implements MeshClientRegistryBackend<TMeta> {
    private key;
    private readonly maxClientIdBytes;
    private readonly maxMetadataBytes;
    private readonly maxClientsPerNode;
    private readonly scanBatchSize;
    private readonly cleanupBatchSize;
    private readonly maxAuthReplayPrincipals;
    private readonly maxAuthNoncesPerPrincipal;
    private readonly maxOrphanItems;
    private readonly maxOrphanBytes;
    constructor(key: string, options?: MeshClientRedisRegistryOptions);
    private clientsKey;
    private nodeSetKey;
    private nodeSetKeyPrefix;
    private nodeClaimsKey;
    private claimsKey;
    private claimsIndexKey;
    private orphanedKey;
    private orphanedIndexKey;
    private orphanedAccountingKey;
    private authNonceKey;
    private authNoncePrincipalsKey;
    private encodeMetadata;
    private registerWithState;
    register(clientId: string, nodeId: number, metadata: TMeta, allowSupersede: boolean, connectionId: string, processId?: string): Promise<RegisterResult>;
    reserve(clientId: string, nodeId: number, metadata: TMeta, allowSupersede: boolean, connectionId: string, processId?: string): Promise<RegisterResult>;
    activate(clientId: string, nodeId: number, metadata: TMeta, connectionId: string): Promise<boolean>;
    unregister(clientId: string, nodeId: number, connectionId: string): Promise<boolean>;
    updateMetadata(clientId: string, nodeId: number, metadata: TMeta, connectionId: string): Promise<boolean>;
    private tryParse;
    private toRegisteredClient;
    private toClientRecord;
    getClient(clientId: string): Promise<RegisteredClient<TMeta> | undefined>;
    getClientIncludingPending(clientId: string): Promise<MeshClientRecord<TMeta> | undefined>;
    listClients(): Promise<RegisteredClient<TMeta>[]>;
    listClientsForNode(nodeId: number): Promise<RegisteredClient<TMeta>[]>;
    listClientsPage(cursor?: string): Promise<import('./types').MeshClientListPage<TMeta>>;
    listClientsForNodePage(nodeId: number, cursor?: string): Promise<import('./types').MeshClientListPage<TMeta>>;
    cleanupNode(nodeId: number): Promise<RegisteredClient<TMeta>[]>;
    cleanupNodeAndEnqueueOrphaned(nodeId: number): Promise<RegisteredClient<TMeta>[]>;
    private decodeRemovedRecords;
    refreshNode(nodeId: number): Promise<void>;
    claim(clientId: string, nodeId: number, metadata: TMeta, state: MeshClientRegistrationState, allowSupersede: boolean, connectionId: string, processId?: string, operationId?: `${string}-${string}-${string}-${string}-${string}`): Promise<import('./types').MeshClientClaim<TMeta>>;
    commitClaim(clientId: string, nodeId: number, claimId: string): Promise<import('./types').MeshClientClaimCommitResult>;
    removeClaimPrevious(clientId: string, nodeId: number, claimId: string): Promise<boolean>;
    abortClaim(clientId: string, nodeId: number, claimId: string): Promise<boolean>;
    removeClaimResult(clientId: string, nodeId: number, claimId: string): Promise<boolean>;
    enqueueOrphaned(nodeId: number, clients: RegisteredClient<TMeta>[]): Promise<void>;
    claimOrphaned(_claimerId: string): Promise<import('./types').OrphanedClientDelivery<TMeta> | undefined>;
    ackOrphaned(id: string, claimToken: string): Promise<boolean>;
    nackOrphaned(id: string, claimToken: string): Promise<boolean>;
    consumeAuthNonce(principal: string, nonce: string, expiresAt: number): Promise<boolean>;
    private assertClientId;
}
//# sourceMappingURL=mesh-client-redis-registry.d.ts.map