HomePhabricator
Diffusion Comm afc6a825b2f5

[web] Introduce types for identity service communication

Description

[web] Introduce types for identity service communication

Summary:

  1. I added the latest version of google-protobuf to web/package.json
  2. I installed its Flow types via flow-typed install google-protobuf
  3. 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
  4. 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:.
  5. 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

Details

Provenance
ashoatAuthored on Apr 4 2023, 12:20 PM
Reviewer
atul
Differential Revision
D7306: [web] Introduce types for identity service communication
Parents
rCOMM48e5d941cf3c: [native] Pass a referrer to Google Play
Branches
Unknown
Tags
Unknown