import { n as CONNECTION_KEY_HEADER, r as ConnectionKey, t as CONNECTION_KEY_EVENT } from "./connection-key-CvX95c4J.js"; import { a as SseConnectionConfig, i as SseConnection, o as SsePostResponse, s as SsePostResult, t as SseServerTransport } from "./server-transport-CvFEgWFf.js"; import { Router } from "express"; //#region src/express-router.d.ts interface SseExpressRouterOptions { /** * Path for the sync endpoint where clients POST messages. * @default "/sync" */ syncPath?: string; /** * Path for the events endpoint where clients connect via SSE. * @default "/events" */ eventsPath?: string; /** * Interval in milliseconds for sending heartbeat comments to keep connections alive. * @default 30000 (30 seconds) */ heartbeatInterval?: number; } /** * Create an Express router for SSE server endpoints. * * This factory function creates Express routes that integrate with * SseServerTransport. It handles: * - POST endpoint for clients to send messages to the server * - GET endpoint for clients to receive messages via SSE * - Heartbeat mechanism to detect stale connections * * @param transport The SseServerTransport instance * @param options Configuration options for the router * @returns An Express Router ready to be mounted * * @example * ```typescript * import { SseServerTransport } from "@kyneta/sse-transport/server" * import { createSseExpressRouter } from "@kyneta/sse-transport/express" * * const serverTransport = new SseServerTransport() * app.use("/sse", createSseExpressRouter(serverTransport)) * ``` */ declare function createSseExpressRouter(transport: SseServerTransport, options?: SseExpressRouterOptions): Router; //#endregion export { CONNECTION_KEY_EVENT, CONNECTION_KEY_HEADER, type ConnectionKey, SseConnection, type SseConnectionConfig, type SseExpressRouterOptions, type SsePostResponse, type SsePostResult, SseServerTransport, createSseExpressRouter }; //# sourceMappingURL=express.d.ts.map