// package: // file: proto/download-progress/download-progress.proto import * as proto_download_progress_download_progress_pb from "../../proto/download-progress/download-progress_pb"; import {grpc} from "@improbable-eng/grpc-web"; type DownloadProgressStat = { readonly methodName: string; readonly service: typeof DownloadProgress; readonly requestStream: false; readonly responseStream: false; readonly requestType: typeof proto_download_progress_download_progress_pb.StatRequest; readonly responseType: typeof proto_download_progress_download_progress_pb.StatReply; }; type DownloadProgressStatStream = { readonly methodName: string; readonly service: typeof DownloadProgress; readonly requestStream: false; readonly responseStream: true; readonly requestType: typeof proto_download_progress_download_progress_pb.StatRequest; readonly responseType: typeof proto_download_progress_download_progress_pb.StatReply; }; export class DownloadProgress { static readonly serviceName: string; static readonly Stat: DownloadProgressStat; static readonly StatStream: DownloadProgressStatStream; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } export type Status = { details: string, code: number; metadata: grpc.Metadata } interface UnaryResponse { cancel(): void; } interface ResponseStream { cancel(): void; on(type: 'data', handler: (message: T) => void): ResponseStream; on(type: 'end', handler: (status?: Status) => void): ResponseStream; on(type: 'status', handler: (status: Status) => void): ResponseStream; } interface RequestStream { write(message: T): RequestStream; end(): void; cancel(): void; on(type: 'end', handler: (status?: Status) => void): RequestStream; on(type: 'status', handler: (status: Status) => void): RequestStream; } interface BidirectionalStream { write(message: ReqT): BidirectionalStream; end(): void; cancel(): void; on(type: 'data', handler: (message: ResT) => void): BidirectionalStream; on(type: 'end', handler: (status?: Status) => void): BidirectionalStream; on(type: 'status', handler: (status: Status) => void): BidirectionalStream; } export class DownloadProgressClient { readonly serviceHost: string; constructor(serviceHost: string, options?: grpc.RpcOptions); stat( requestMessage: proto_download_progress_download_progress_pb.StatRequest, metadata: grpc.Metadata, callback: (error: ServiceError|null, responseMessage: proto_download_progress_download_progress_pb.StatReply|null) => void ): UnaryResponse; stat( requestMessage: proto_download_progress_download_progress_pb.StatRequest, callback: (error: ServiceError|null, responseMessage: proto_download_progress_download_progress_pb.StatReply|null) => void ): UnaryResponse; statStream(requestMessage: proto_download_progress_download_progress_pb.StatRequest, metadata?: grpc.Metadata): ResponseStream; }