diff --git a/lib/types/avatar-types.js b/lib/types/avatar-types.js --- a/lib/types/avatar-types.js +++ b/lib/types/avatar-types.js @@ -25,3 +25,15 @@ export type UpdateUserAvatarRequest = | AvatarDBContent | UpdateUserAvatarRemoveRequest; + +export type ClientEmojiAvatar = EmojiAvatarDBContent; +export type ClientImageAvatar = { + +type: 'image', + +uri: string, +}; +export type ClientENSAvatar = ENSAvatarDBContent; + +export type ClientAvatar = + | ClientEmojiAvatar + | ClientImageAvatar + | ClientENSAvatar; diff --git a/lib/types/user-types.js b/lib/types/user-types.js --- a/lib/types/user-types.js +++ b/lib/types/user-types.js @@ -1,23 +1,27 @@ // @flow import type { DefaultNotificationPayload } from './account-types.js'; +import type { ClientAvatar } from './avatar-types.js'; import type { UserRelationshipStatus } from './relationship-types.js'; import type { UserInconsistencyReportCreationRequest } from './report-types.js'; export type GlobalUserInfo = { +id: string, +username: ?string, + +avatar?: ?ClientAvatar, }; export type GlobalAccountUserInfo = { +id: string, +username: string, + +avatar?: ?ClientAvatar, }; export type UserInfo = { +id: string, +username: ?string, +relationshipStatus?: UserRelationshipStatus, + +avatar?: ?ClientAvatar, }; export type UserInfos = { +[id: string]: UserInfo }; @@ -25,6 +29,7 @@ +id: string, +username: string, +relationshipStatus?: UserRelationshipStatus, + +avatar?: ?ClientAvatar, }; export type UserStore = { @@ -36,6 +41,7 @@ +id: string, +username: ?string, +isViewer: boolean, + +avatar?: ?ClientAvatar, }; export type OldLoggedInUserInfo = { @@ -49,6 +55,7 @@ +id: string, +username: string, +settings?: DefaultNotificationPayload, + +avatar?: ?ClientAvatar, }; export type LoggedOutUserInfo = { @@ -73,4 +80,5 @@ +notice?: string, +alertText?: string, +alertTitle?: string, + +avatar?: ?ClientAvatar, };