import type { AnyMessage, Message, MessageType, PartialMessage } 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 = AnyMessage, O extends Message = AnyMessage> = (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, O extends Message>(opt: { req: Omit, "signal" | "message"> & { message: PartialMessage; }; 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 = AnyMessage, O extends Message = AnyMessage> = (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, O extends Message>(opt: { req: Omit, "signal" | "message"> & { message: AsyncIterable>; }; next: StreamingFn; timeoutMs?: number; signal?: AbortSignal; interceptors?: Interceptor[]; }): Promise>; /** * Takes an AsyncIterable of partial protobuf messages of the * specified message type as input, and yields full instances. */ export declare function normalizeIterable>(messageType: MessageType, input: AsyncIterable>): AsyncIterable; export {};