import type { grpc } from "@improbable-eng/grpc-web"; import type { BinaryWriter } from "@bufbuild/protobuf/wire"; import type { Result } from "../common/result"; import type { Exact, DeepPartial } from "../generated-proto/pb_schema/camera_kit/v3/service"; import type { GrpcHandler } from "./grpcHandler"; type TsProtoServiceDefinition = { name: string; fullName: string; methods: Methods; }; type TsProtoMethods = { [methodName: string]: TsProtoMethodDefinition; }; type TsProtoMethodDefinition = { name: string; requestType: TsProtoMessage; responseType: TsProtoMessage; }; type TsProtoMessage = { encode: (message: M) => BinaryWriter; decode: (message: Uint8Array) => M; fromPartial: (partialMessage: any) => M; }; export type TsProtoServiceClient> = { [MethodName in keyof S["methods"]]: InferTsProtoMethod; }; type InferTsProtoMethod> = M extends TsProtoMethodDefinition ? , I>>(request: I) => Promise, grpc.UnaryOutput>> : never; /** * Convert a service definition generated by ts-proto (using the `outputServices=generic-definitions` CLI option) into * a working client. * * @param serviceDefinition * @param handler * @returns A client that can make requests to a remote service by sending Protobuf-encoded messages over HTTP using the * grpc-web package. * * @internal */ export declare function createTsProtoClient>(serviceDefinition: S, handler: GrpcHandler): TsProtoServiceClient; export {}; //# sourceMappingURL=createTsProtoClient.d.ts.map