import * as grpc from "@grpc/grpc-js"; /** * Type for a function that generates gRPC metadata (e.g., for taskhub, auth tokens). */ export type MetadataGenerator = () => Promise; /** * Promisifies a gRPC unary call with metadata support. * * @param method The gRPC method to call (must be bound to the stub). * @param req The request object. * @param metadataGenerator Optional function to generate metadata for the call. * @returns A promise that resolves with the response or rejects with an error. */ export declare function callWithMetadata(method: (req: TReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: TRes) => void) => grpc.ClientUnaryCall, req: TReq, metadataGenerator?: MetadataGenerator): Promise;