import { breaker } from '@synnaxlabs/x'; import { z } from 'zod'; import { Transport } from './transport'; /** * An interface for an entity that implements a simple request-response transport * between two entities. */ export interface UnaryClient extends Transport { /** * Sends a request to the target server and waits until a response is received. * @param resSchema - The schema to validate the response against. * @returns the decoded response. * @throws Error: if the server returns an error or the transport fails. */ send: (target: string, req: z.input | z.infer, reqSchema: RQ, resSchema: RS) => Promise>; } export declare const unaryWithBreaker: (base: UnaryClient, cfg: breaker.Config) => UnaryClient; //# sourceMappingURL=unary.d.ts.map