Page MenuHomePhabricator

[lib] Add types for identity search websocket server
ClosedPublic

Authored by will on Feb 1 2024, 10:20 PM.
Tags
None
Referenced Files
F2174115: D10928.id36869.diff
Tue, Jul 2, 11:33 PM
F2173225: D10928.id.diff
Tue, Jul 2, 9:44 PM
F2168821: D10928.id36572.diff
Tue, Jul 2, 9:49 AM
Unknown Object (File)
Mon, Jul 1, 8:41 AM
Unknown Object (File)
Sun, Jun 30, 7:54 PM
Unknown Object (File)
Sun, Jun 30, 4:42 PM
Unknown Object (File)
Sun, Jun 30, 3:55 PM
Unknown Object (File)
Sun, Jun 30, 12:59 PM
Subscribers

Details

Summary

This implements the types associated with identity search messages to be used by identity search context provider

Depends on D11125

Test Plan

flow

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

will requested review of this revision.Feb 1 2024, 10:38 PM
lib/types/identity-search/search-query-types.js
8 ↗(On Diff #36572)

SearchQuery is set equal to Prefix as I have yet to implement other search options

will retitled this revision from [lib] Add types for identity search websocket server to [lib] [1/n] Add types for identity search websocket server.Feb 1 2024, 10:45 PM
lib/types/identity-search/messages.js
27 ↗(On Diff #36572)

Are you sure we want to use a single enum for messages that either side sends? Or should we separate the message types between server/client?

lib/types/identity-search/messages.js
27 ↗(On Diff #36572)

Agreed. Would definitely make this more organized. Was following Tunnelbroker conventions, but this would make type checking airtight on client end. Will implement these changes

will planned changes to this revision.Feb 5 2024, 7:44 AM
will retitled this revision from [lib] [1/n] Add types for identity search websocket server to [lib] [2/n] Add types for identity search websocket server.
will edited the summary of this revision. (Show Details)

Split messages into client and server messages

will planned changes to this revision.Feb 5 2024, 11:38 AM
will retitled this revision from [lib] [2/n] Add types for identity search websocket server to [lib] [1/n] Add types for identity search websocket server.Feb 6 2024, 11:35 PM
will retitled this revision from [lib] [1/n] Add types for identity search websocket server to [lib] [3/n] Add types for identity search websocket server.
will edited the summary of this revision. (Show Details)
will retitled this revision from [lib] [3/n] Add types for identity search websocket server to [lib] [4/n] Add types for identity search websocket server.Feb 6 2024, 11:38 PM
will retitled this revision from [lib] [4/n] Add types for identity search websocket server to [lib] Add types for identity search websocket server.Feb 8 2024, 10:14 AM

rebase on changes to identity search message type changes

lib/types/identity-search/messages.js
27 ↗(On Diff #36572)

Rust addressed in https://phab.comm.dev/D10945 and updated review to separate server/client message types

lib/types/identity-search/messages.js
27–37 ↗(On Diff #36869)

do we need this message in other files, too?

would also be great if you could rebase on master now that the CI is fixed

will marked an inline comment as done.

rebase

lib/types/identity-search/messages.js
27–37 ↗(On Diff #36869)

Yeah, I think that'd definitely be nice to have. Will add in next diff

varun added inline comments.
lib/types/identity-search/messages.js
27–37 ↗(On Diff #36869)

might be easier to just rebase and add it in this diff. if not, can you please link a linear task or diff here before landing?

This revision is now accepted and ready to land.Feb 13 2024, 10:58 AM
lib/types/identity-search/messages.js
27–37 ↗(On Diff #36869)

Sorry. Should have clarified. I meant I'll rebase on this diff

lib/types/identity-search/messages.js
27–37 ↗(On Diff #37016)

i feel like this note should come before the imports

rebase with change to IdentitySearchUser and add comments

typo in AuthMessage

lib/types/identity-search/messages.js
27–37 ↗(On Diff #37016)

Moved

lib/types/identity-search/messages.js
27–37 ↗(On Diff #36869)

Addressed in latest rebase

Please take the feedback about User and apply it to all of your named exports

lib/types/identity-search/auth-message-types.js
20 ↗(On Diff #37279)

We need to be more thoughtful about names that get exported. They should be "universal" across the JS codebase.

In this case, this should be something more like IdentitySearchAuthMessage

27 ↗(On Diff #37279)

And this should be more like identitySearchAuthMessageValidator

lib/types/identity-search/search-query-types.js
22 ↗(On Diff #37279)

Extremely generic name

rebase with IdentitySearch prefix

will edited the summary of this revision. (Show Details)

rebase