@magnetarjs/core
Version:
Magnetar core library.
19 lines (18 loc) • 735 B
TypeScript
import type { ActionConfig, DoOnStream, EventNameFnsMap, PluginModuleConfig, PluginStreamAction, StreamResponse } from '@magnetarjs/types';
/**
* handleStream is responsible for executing (1) on.before (2) the action provided by the store plugin (3) on.error / on.success
*/
export declare function handleStream(args: {
collectionPath: string;
docId: string | undefined;
pluginModuleConfig: PluginModuleConfig;
pluginAction: PluginStreamAction;
payload: {
[key: string]: unknown;
} | undefined;
actionConfig: ActionConfig;
eventNameFnsMap: EventNameFnsMap;
actionName: 'stream';
storeName: string;
mustExecuteOnRead: Required<DoOnStream>;
}): Promise<StreamResponse | DoOnStream>;