import type { ConnectRouter, ConnectRouterOptions, ContextValues } from "@connectrpc/connect"; import type * as express from "express"; interface ExpressConnectMiddlewareOptions extends ConnectRouterOptions { /** * Route definitions. We recommend the following pattern: * * Create a file `connect.ts` with a default export such as this: * * ```ts * import {ConnectRouter} from "@connectrpc/connect"; * * export default (router: ConnectRouter) => { * router.service(ElizaService, {}); * } * ``` * * Then pass this function here. */ routes: (router: ConnectRouter) => void; /** * Serve all handlers under this prefix. For example, the prefix "/something" * will serve the RPC foo.FooService/Bar under "/something/foo.FooService/Bar". * Note that many gRPC client implementations do not allow for prefixes. */ requestPathPrefix?: string; /** * Context values to extract from the request. These values are passed to * the handlers. */ contextValues?: (req: express.Request) => ContextValues; } /** * Adds your Connect RPCs to an Express server. */ export declare function expressConnectMiddleware(options: ExpressConnectMiddlewareOptions): express.Handler; export {};