///
import * as Protobuf from 'protobufjs';
import * as descriptor from 'protobufjs/ext/descriptor';
declare module 'protobufjs' {
interface Type {
toDescriptor(protoVersion: string): Protobuf.Message & descriptor.IDescriptorProto;
}
interface Root {
toDescriptor(protoVersion: string): Protobuf.Message & descriptor.IFileDescriptorSet;
}
interface Enum {
toDescriptor(protoVersion: string): Protobuf.Message & descriptor.IEnumDescriptorProto;
}
}
export interface Serialize {
(value: T): Buffer;
}
export interface Deserialize {
(bytes: Buffer): T;
}
export interface ProtobufTypeDefinition {
format: string;
type: object;
fileDescriptorProtos: Buffer[];
}
export interface MessageTypeDefinition extends ProtobufTypeDefinition {
format: 'Protocol Buffer 3 DescriptorProto';
}
export interface EnumTypeDefinition extends ProtobufTypeDefinition {
format: 'Protocol Buffer 3 EnumDescriptorProto';
}
export interface MethodDefinition {
path: string;
requestStream: boolean;
responseStream: boolean;
requestSerialize: Serialize;
responseSerialize: Serialize;
requestDeserialize: Deserialize;
responseDeserialize: Deserialize;
originalName?: string;
requestType: MessageTypeDefinition;
responseType: MessageTypeDefinition;
}
export interface ServiceDefinition {
[index: string]: MethodDefinition