flow support for comment reactions

This commit is contained in:
jessop 2020-09-28 17:54:33 -04:00 committed by Sean Yesmunt
parent 90012bf47c
commit ba5d6b84be
3 changed files with 3276 additions and 16 deletions

View file

@ -135,6 +135,24 @@ declare type CommentListResponse = {
total_pages: number, total_pages: number,
}; };
declare type MyReactions = {
// Keys are the commentId
[string]: Array<string>
}
declare type OthersReactions = {
// Keys are the commentId
[string]: {
// Keys are the reaction_type, e.g. 'like'
[string]: number,
},
}
declare type CommentReactListResponse = {
my_reactions: Array<MyReactions>,
others_reactions: Array<OthersReactions>,
}
declare type CommentHideResponse = { declare type CommentHideResponse = {
// keyed by the CommentIds entered // keyed by the CommentIds entered
[string]: { hidden: boolean }, [string]: { hidden: boolean },

18
flow-typed/Lbry.js vendored
View file

@ -135,6 +135,24 @@ declare type CommentListResponse = {
total_pages: number, total_pages: number,
}; };
declare type MyReactions = {
// Keys are the commentId
[string]: Array<string>
}
declare type OthersReactions = {
// Keys are the commentId
[string]: {
// Keys are the reaction_type, e.g. 'like'
[string]: number,
},
}
declare type CommentReactListResponse = {
my_reactions: Array<MyReactions>,
others_reactions: Array<OthersReactions>,
}
declare type CommentHideResponse = { declare type CommentHideResponse = {
// keyed by the CommentIds entered // keyed by the CommentIds entered
[string]: { hidden: boolean }, [string]: { hidden: boolean },

3256
yarn.lock

File diff suppressed because it is too large Load diff