@magnetarjs/core
Version:
Magnetar core library.
20 lines (19 loc) • 788 B
TypeScript
import type { ActionConfig, DoOnStream, EventNameFnsMap, PluginModuleConfig, PluginStreamAction, StreamResponse, WriteLock } 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>;
writeLockMap: Map<string, WriteLock>;
}): Promise<StreamResponse | DoOnStream>;