diff --git a/lib/types/avatar-types.js b/lib/types/avatar-types.js new file mode 100644 index 000000000..e94d9dd42 --- /dev/null +++ b/lib/types/avatar-types.js @@ -0,0 +1,21 @@ +// @flow + +export type EmojiAvatarDBContent = { + +type: 'emoji', + +emoji: string, + +color: string, // hex, without "#" or "0x" +}; + +export type ImageAvatarDBContent = { + +type: 'image', + +uploadID: string, +}; + +export type ENSAvatarDBContent = { + +type: 'ens', +}; + +export type AvatarDBContent = + | EmojiAvatarDBContent + | ImageAvatarDBContent + | ENSAvatarDBContent;