diff --git a/packages/grpc-protobufjs/src/index.ts b/packages/grpc-protobufjs/src/index.ts index 5f443f983..0fd2b4c82 100644 --- a/packages/grpc-protobufjs/src/index.ts +++ b/packages/grpc-protobufjs/src/index.ts @@ -37,6 +37,8 @@ export interface MethodDefinition { requestDeserialize: Deserialize; responseDeserialize: Deserialize; originalName?: string; + requestType: Protobuf.Type; + responseType: Protobuf.Type; } export interface ServiceDefinition { @@ -97,7 +99,9 @@ function createMethodDefinition(method: Protobuf.Method, serviceName: string, op responseSerialize: createSerializer(method.resolvedResponseType as Protobuf.Type), responseDeserialize: createDeserializer(method.resolvedResponseType as Protobuf.Type, options), // TODO(murgatroid99): Find a better way to handle this - originalName: _.camelCase(method.name) + originalName: _.camelCase(method.name), + requestType: method.resolvedRequestType as Protobuf.Type, + responseType: method.resolvedResponseType as Protobuf.Type, }; }