import type { DescMessage, MessageInitShape } from "@bufbuild/protobuf"; import type { Interceptor, StreamRequest, StreamResponse, UnaryRequest, UnaryResponse } from "../interceptor.js"; /** * 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 = (req: UnaryRequest) => Promise>; /** * Runs a unary method with the given interceptors. Note that this function * is only used when implementing a Transport. */ export declare function runUnaryCall(opt: { req: Omit, "signal" | "message"> & { message: MessageInitShape; }; next: UnaryFn; timeoutMs?: number; signal?: AbortSignal; interceptors?: Interceptor[]; }): 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 = (req: StreamRequest) => Promise>; /** * Runs a server-streaming method with the given interceptors. Note that this * function is only used when implementing a Transport. */ export declare function runStreamingCall(opt: { req: Omit, "signal" | "message"> & { message: AsyncIterable>; }; next: StreamingFn; timeoutMs?: number; signal?: AbortSignal; interceptors?: Interceptor[]; }): Promise>; export {};