import type { IBackoff, IPolicy } from '../../deps/cockatiel'; import type { CallContext } from './iapi'; import type { ChannelOptions } from '../../deps/grpc'; export interface CallOptions { deadline?: number | Date; host?: string; parent?: any; propagate_flags?: number; [key: string]: any; } export type CallOptionsFactory = CallOptions | ((context: CallContext) => CallOptions); export interface IOptions { credentials?: { rootCertificate: Buffer; privateKey?: Buffer; certChain?: Buffer; }; grpcOptions?: ChannelOptions; auth?: { username: string; password: string; callOptions?: CallOptionsFactory; }; defaultCallOptions?: CallOptionsFactory; hosts?: string[] | string; dialTimeout?: number; faultHandling?: Partial<{ host: (hostname: string) => IPolicy; global: IPolicy; watchBackoff: IBackoff; }>; }