[lib] move a shared type to lib
Summary:
This type is needed on native/web too so I'm moving it.
Depends on D9114
Test Plan: ran flow
Reviewers: atul, marcin
Reviewed By: marcin
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D9115