import type { AnyMessage, Message } from "@bufbuild/protobuf"; import type { Interceptor, StreamRequest, StreamResponse, UnaryRequest, UnaryResponse } from "./interceptor.js"; /** * Runs a unary method with the given interceptors. Note that this function * is only used when implementing a Transport. * * @deprecated Use runUnaryCall from @bufbuild/connect/protocol instead. */ export declare function runUnary, O extends Message>(req: UnaryRequest, next: UnaryFn, interceptors: Interceptor[] | undefined): Promise>; /** * Runs a server-streaming method with the given interceptors. Note that this * function is only used when implementing a Transport. * * @deprecated Use runStreamingCall from @bufbuild/connect/protocol instead. */ export declare function runStreaming, O extends Message>(req: StreamRequest, next: StreamingFn, interceptors: Interceptor[] | undefined): Promise>; /** * UnaryFn represents the client-side invocation of a unary RPC - a method * that takes a single input message, and responds with a single output * message. * A Transport implements such a function, and makes it available to * interceptors. */ type UnaryFn = AnyMessage, O extends Message = AnyMessage> = (req: UnaryRequest) => Promise>; /** * StreamingFn represents the client-side invocation of a streaming RPC - a * method that takes zero or more input messages, and responds with zero or * more output messages. * A Transport implements such a function, and makes it available to * interceptors. */ type StreamingFn = AnyMessage, O extends Message = AnyMessage> = (req: StreamRequest) => Promise>; export {};