import { type Reducer } from "@reduxjs/toolkit"; import { type Saga } from "redux-saga"; import { type IDashboardQuery } from "../../queries/base.js"; import { type IDashboardQueryService } from "./queryService.js"; /** * Query processing component has multiple pieces that need to be integrated into the redux store. */ export interface IQueryProcessingModule { /** * Query services may store the results in state for caching purposes. All services that use caching implement * the cache as a separate slice of the internal `_queryCache` part of the state. This reducer is a combined * reducer including all the appropriate slice reducers. */ queryCacheReducer: Reducer; /** * A single saga is in place to handle query processing requests. Query requests will be processed concurrently. */ rootQueryProcessor: Saga; } /** * @internal */ export declare const QueryEnvelopeActionPrefix = "__Q"; type QueryEnvelopeEventHandlers = { onStart: (query: TQuery) => void; onSuccess: (result: TQueryResult) => void; onError: (err: Error) => void; }; type QueryEnvelope = Readonly> & { readonly type: string; readonly query: IDashboardQuery; readonly refresh?: boolean; }; /** * @internal */ export declare function queryEnvelope(query: TQuery, eventHandlers?: Partial>, refresh?: boolean): QueryEnvelope; /** * @internal */ export declare function queryEnvelopeWithPromise(query: TQuery, refresh?: boolean): { promise: Promise; envelope: QueryEnvelope; }; /** * Creates components that should be integrated into the dashboard store in order to facilitate query processing. * * @param queryServices - query services use to initialize the components */ export declare function createQueryProcessingModule(queryServices: IDashboardQueryService[]): IQueryProcessingModule; export {}; //# sourceMappingURL=queryProcessing.d.ts.map