import { EngineService } from '../engine'; import { JobState, JobData, JobOutput, ExtensionType } from '../../types/job'; import { JobMessageCallback } from '../../types/quorum'; import { StreamData, StreamDataResponse } from '../../types/stream'; interface PubSubContext { engine: EngineService | null; } /** * Publishes a message to a workflow topic, starting a new job. * Returns the job ID immediately (fire-and-forget). */ export declare function pub(instance: PubSubContext, topic: string, data?: JobData, context?: JobState, extended?: ExtensionType): Promise; /** * Subscribes to all output and interim emissions from a specific workflow topic. */ export declare function sub(instance: PubSubContext, topic: string, callback: JobMessageCallback): Promise; /** * Unsubscribes from a single workflow topic previously registered with `sub()`. */ export declare function unsub(instance: PubSubContext, topic: string): Promise; /** * Subscribes to workflow emissions matching a wildcard pattern. */ export declare function psub(instance: PubSubContext, wild: string, callback: JobMessageCallback): Promise; /** * Unsubscribes from a wildcard pattern previously registered with `psub()`. */ export declare function punsub(instance: PubSubContext, wild: string): Promise; /** * Publishes a message to a workflow topic and blocks until the workflow completes. */ export declare function pubsub(instance: PubSubContext, topic: string, data?: JobData, context?: JobState | null, timeout?: number): Promise; /** * Adds a transition message to the workstream, resuming Leg 2 of a paused * reentrant activity. */ export declare function add(instance: PubSubContext, streamData: StreamData | StreamDataResponse): Promise; export {};