[web] Introduce types for identity service communication
Summary:
- I added the latest version of google-protobuf to web/package.json
- I installed its Flow types via flow-typed install google-protobuf
- I generated web/protobufs/identity-client.cjs and web/protobufs/identity-structs.cjs by running protoc -I=shared/protos/ identity_client.proto --js_out=import_style=commonjs:web/protobufs and then added the @generated line to hide them from Phabricator diffs
- I wrote web/protobufs/identity-client.cjs.flow and web/protobufs/identity-structs.cjs.flow, which were inspired by TypeScript bindings generated with protoc -I=shared/protos/ identity_client.proto --grpc-web_out=import_style=commonjs+dts,mode=grpcwebtext:.
- I wrote flow-typed/npm/grpc-web_v1.x.x.js, only typing the things that were needed for the last step
Test Plan: I tested the code and the Flow types with this patch: https://gist.github.com/Ashoat/7cf4a0fbdebc152d585884184bc0ac07
Reviewers: varun, jon, atul
Reviewed By: atul
Subscribers: tomek
Differential Revision: https://phab.comm.dev/D7306