diff --git a/src/api/initialDataTypes.js b/src/api/initialDataTypes.js index 5ff6a77fc58..fd7987ea75c 100644 --- a/src/api/initialDataTypes.js +++ b/src/api/initialDataTypes.js @@ -100,6 +100,14 @@ export type InitialDataRealmFilters = {| realm_filters: RealmFilter[], |}; +// TODO: Make complete and exact. +export type RawInitialDataRealmUser = { + realm_users: Array<{| ...User, avatar_url: string | null |}>, + realm_non_active_users: Array<{| ...User, avatar_url: string | null |}>, + cross_realm_bots: Array<{| ...CrossRealmBot, avatar_url: string | void | null |}>, + ... +}; + export type InitialDataRealmUser = {| avatar_source: 'G', avatar_url: string | null, @@ -280,7 +288,17 @@ export type InitialDataUserStatus = {| user_status?: UserStatusMapObject, |}; -// Initial data snapshot sent in response to a `/register` request. +// Initial data snapshot sent in response to a `/register` request, +// before validation and transformation. +// +// TODO: Make complete and exact. +export type RawInitialData = { + ...RawInitialDataRealmUser, + ... +}; + +// Initial data snapshot sent in response to a `/register` request, +// after validation and transformation. export type InitialData = {| // The server sends different subsets of the full available data, // depending on what event types the client subscribes to with the