diff --git a/packages/grpc-protobufjs/src/index.ts b/packages/grpc-protobufjs/src/index.ts index 5f443f983..25516792e 100644 --- a/packages/grpc-protobufjs/src/index.ts +++ b/packages/grpc-protobufjs/src/index.ts @@ -32,6 +32,8 @@ export interface MethodDefinition { path: string; requestStream: boolean; responseStream: boolean; + requestType: Protobuf.Type; + responseType: Protobuf.Type; requestSerialize: Serialize; responseSerialize: Serialize; requestDeserialize: Deserialize; @@ -92,6 +94,8 @@ function createMethodDefinition(method: Protobuf.Method, serviceName: string, op path: '/' + serviceName + '/' + method.name, requestStream: !!method.requestStream, responseStream: !!method.responseStream, + requestType: method.resolvedRequestType as Protobuf.Type, + responseType: method.resolvedResponseType as Protobuf.Type, requestSerialize: createSerializer(method.resolvedRequestType as Protobuf.Type), requestDeserialize: createDeserializer(method.resolvedRequestType as Protobuf.Type, options), responseSerialize: createSerializer(method.resolvedResponseType as Protobuf.Type),