UNPKG

n8n

Version:

n8n Workflow Automation Tool

11 lines (10 loc) 448 B
import type { StreamChunk } from '@n8n/agents'; import type { AgentSseEvent } from '@n8n/api-types'; import type { Response } from 'express'; export type FlushableResponse = Response & { flush?: () => void; }; export declare function initSseStream(res: FlushableResponse): { send: (event: AgentSseEvent) => void; }; export declare function pumpChunks(chunks: AsyncIterable<StreamChunk>, send: (e: AgentSseEvent) => void): Promise<boolean>;