[Flow] improve report related types
Summary:
D7916 introduced id field on the client side to identify reports and avoid comparing the entire blob each time - this is different from keyserver id assigned by the backend database.
It was properly added for ClientThreadInconsistencyReportCreationRequest and ClientEntryInconsistencyReportCreationRequest which are only ClientReportCreationRequest.
By mistake, it was also added for ErrorReportCreationRequest, MediaMissionReportCreationRequest and UserInconsistencyReportCreationRequest types which are used as both ClientReportCreationRequest and ReportCreationRequest.
That caused diverging types, invalid validators (keyserver validators were implemented without the id field) and a lot of confusion pointed out by @ashoat here:
This shouldn't cause any issues for older clients, the id field is extracted in the current code version, and also was in the past (D7910).
The main issue is that validators were not reflected in types, this diff should fix this.
Test Plan:
- FLow.
- Make sure validators are properly defined (without id field).
- report-store-reducer.test.js and report-store-ops.test.js.
- Try sending some reports and make sure it succeeded..
Reviewers: ashoat, bartek
Reviewed By: ashoat
Subscribers: tomek, ashoat
Differential Revision: https://phab.comm.dev/D9893