import type { z } from 'zod'; import type { DefinitionSchemaDirection } from '../core/types/definition-schema-to-json.ts'; import type { ErasedOperation } from './operation-catalog.ts'; /** * Build the AsyncAPI channel object for a WebSocket subscription operation. */ export declare function buildWebSocketChannel(operation: ErasedOperation): Record; /** * Build the AsyncAPI channel object for an SSE stream operation. * * `restBindingPath` MUST be the operation's REST binding path translated to * OpenAPI path-parameter syntax (e.g. `/v1/workflows/{id}/sse`). Without it * the channel address falls back to a synthetic dotted-name-to-path * conversion that does not match any wire endpoint — kept only as a * non-failing default so a misconfigured registry produces a recognizable * synthetic address rather than throwing during document generation. */ export declare function buildSseChannel(operation: ErasedOperation, restBindingPath: string | undefined): Record; /** * Build named component messages for a WebSocket subscription operation. */ export declare function buildWebSocketMessages(operation: ErasedOperation, definitionSchemaToJsonSchema: (schema: z.ZodType, direction?: DefinitionSchemaDirection) => Record): Record>; /** * Build named component messages for an SSE stream operation. * * The token message's `data:` line carries the operation's wire-encoded * token text — for the only SSE operation today (`weft.workflows.streams.sse`) * that is the raw `token` string from `mapTokenChunkToText`, NOT a JSON * encoding of the operation's `eventSchema`. The `eventSchema` describes * the logical per-element type for non-SSE callers (JSON-RPC envelopes * carry the full object); SSE is a separate, plain-text wire. * * The schema below reflects the actual SSE wire. The `x-weft-event-schema` * extension surfaces the logical schema for clients that need it. */ export declare function buildSseMessages(operation: ErasedOperation, definitionSchemaToJsonSchema: (schema: z.ZodType, direction?: DefinitionSchemaDirection) => Record): Record>; /** * Build an AsyncAPI operation entry for a stream or subscription operation. */ export declare function buildOperationEntry(operation: ErasedOperation, channelName: string, kind: 'subscription' | 'stream'): Record;