[identity] Add GetDeviceListForUser RPC
Summary:
Resolves ENG-5049. According to the whitepaper and the Linear task, client needs all device list updates since the last time it asked for them. This RPC is used to get device list history for a user.
The response format complies to the whitepaper (Fig. 4) although it doesn't include signing information yet (this can be easily added in the future).
Depends on D10247
Test Plan:
Similiar to D10247 test plan:
Added three device list updates to DDB. Then called the RPC
- Without timestamp, all three are returned. They're JSON-encoded and JSON.parse() returns a valid JS object.
- Given timestamp T, where U1 < T < U2 < U3, the function returned U2 and U3.
- Empty list is returned if timestamp is after all updates.
- Empty list is returned if the user has no device lists yet (of the new format, i.e. not yet migrated).
Reviewers: ashoat, varun, michal
Reviewed By: ashoat, varun
Subscribers: tomek
Differential Revision: https://phab.comm.dev/D10301