import { type SagaIterator } from "redux-saga"; import { type IDashboardCommand } from "../../commands/base.js"; /** * @internal */ export declare const CommandEnvelopeActionPrefix = "__C"; type CommandEnvelopeEventHandlers = { onStart: (command: TCommand) => void; onSuccess: (result: TResult) => void; onError: (err: Error) => void; }; type CommandEnvelope = Readonly> & { readonly type: string; readonly command: TCommand; }; export declare function commandEnvelope(command: TCommand, eventHandlers?: Partial>): CommandEnvelope; /** * @internal */ export declare function commandEnvelopeWithPromise(command: TCommand): { promise: Promise; envelope: CommandEnvelope; }; /** * Root command handler is the central point through which all command processing is done. The handler registers * for all actions starting with `GDC.DASH/CMD` === all dashboard commands. * * The commands are intended for serial processing, without any forking. A buffering action channel is in place to * prevent loss of commands. * * TODO: refactor this so that root command handler is created dynamically similar to query processor. the handlers * should be providable by the caller */ export declare function rootCommandHandler(): SagaIterator; export {}; //# sourceMappingURL=rootCommandHandler.d.ts.map