import * as Protocol from './protocols/connection/protocol.connection'; import { ProviderState } from './provider.state'; export declare type TPendingDemand = { body?: string | Uint8Array; respondentId: string; protocol: string; demand: string; expected: string; expectantId: string; sent: number; options?: Protocol.Message.Demand.Options; query?: Protocol.KeyValue[]; }; export interface IScopedRespondentList { hosts: string[]; clients: string[]; all: string[]; target: string | null; type: Protocol.Message.Demand.Options.Scope | null; } export declare type TQuery = { [key: string]: string; }; export declare type THandler = (...args: any[]) => any; export declare class ProcessorDemands { private state; private demands; private pendingDemandRespondent; private pendingDemandResults; private serverDemandsHanlders; private _logger; constructor(state: ProviderState); checkPendingRespondent(): void; getRespondentsForDemand(protocol: string, demand: string, query: any[], scope: Protocol.Message.Demand.Options.Scope): IScopedRespondentList | Error; sendDemand(protocol: string, demand: string, body: string | Uint8Array, expected: string, expectantId: string, respondentId: string, demandGUID: string): void; sendDemandResponse(protocol: string, demand: string, body: string | Uint8Array, expected: string, expectantId: string, error: string, demandRequestId: string): void; getResponseOfDemandByServer(protocol: string, demand: string, body: string | Uint8Array, expected: string, respondentId: string, expectantId: string): Promise; proccessDemandByServer(protocol: string, demand: string, body: string | Uint8Array, expected: string, respondentId: string, expectantId: string, demandGUID: string): Promise; createPendingTask(demandGUID: string, pendingTask: TPendingDemand): void; getPendingResults(demandGUID: string): TPendingDemand | undefined; subscribe(protocolSignature: string, demandSignature: string, guid: string, query: TQuery | Protocol.KeyValue[]): boolean | Error; unsubscribe(clientId: string, protocolSignature: string, demandSignature: string): boolean; refServerHandler(guid: string, handler: THandler): void; unrefServerHandler(guid: string): void; getSubscriptions(protocolSignature: string, demandSignature: string): string[] | Error; getInfo(): { demands: number; results: number; }; disconnect(clientId: string): Promise; drop(): Promise; }