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
F3486400: D10928.id37278.diff
Wed, Dec 18, 4:51 AM
F3486350: D10928.id37279.diff
Wed, Dec 18, 4:41 AM
F3486072: D10928.diff
Wed, Dec 18, 2:44 AM
Unknown Object (File)
Mon, Dec 16, 11:42 PM
Unknown Object (File)
Mon, Dec 16, 11:42 PM
Unknown Object (File)
Mon, Dec 16, 11:42 PM
Unknown Object (File)
Mon, Dec 16, 11:42 PM
Unknown Object (File)
Mon, Dec 16, 11:42 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
Branch
wyilio/prefix-client
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

will requested review of this revision.Feb 1 2024, 10:38 PM
lib/types/identity-search/search-query-types.js
8

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

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

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

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