Changeset View
Changeset View
Standalone View
Standalone View
lib/types/thread-types.js
// @flow | // @flow | ||||
import invariant from 'invariant'; | import invariant from 'invariant'; | ||||
import type { ClientAvatar } from './avatar-types.js'; | |||||
import type { Shape } from './core.js'; | import type { Shape } from './core.js'; | ||||
import type { CalendarQuery, RawEntryInfo } from './entry-types.js'; | import type { CalendarQuery, RawEntryInfo } from './entry-types.js'; | ||||
import type { Media } from './media-types.js'; | import type { Media } from './media-types.js'; | ||||
import type { | import type { | ||||
RawMessageInfo, | RawMessageInfo, | ||||
MessageTruncationStatuses, | MessageTruncationStatuses, | ||||
} from './message-types.js'; | } from './message-types.js'; | ||||
import type { ThreadSubscription } from './subscription-types.js'; | import type { ThreadSubscription } from './subscription-types.js'; | ||||
▲ Show 20 Lines • Show All 194 Lines • ▼ Show 20 Lines | export type RawThreadInfo = { | ||||
+repliesCount: number, | +repliesCount: number, | ||||
}; | }; | ||||
export type ThreadInfo = { | export type ThreadInfo = { | ||||
+id: string, | +id: string, | ||||
+type: ThreadType, | +type: ThreadType, | ||||
+name: ?string, | +name: ?string, | ||||
+uiName: string | ThreadEntity, | +uiName: string | ThreadEntity, | ||||
+avatar?: ?ClientAvatar, | |||||
+description: ?string, | +description: ?string, | ||||
+color: string, // hex, without "#" or "0x" | +color: string, // hex, without "#" or "0x" | ||||
+creationTime: number, // millisecond timestamp | +creationTime: number, // millisecond timestamp | ||||
+parentThreadID: ?string, | +parentThreadID: ?string, | ||||
+containingThreadID: ?string, | +containingThreadID: ?string, | ||||
+community: ?string, | +community: ?string, | ||||
+members: $ReadOnlyArray<RelativeMemberInfo>, | +members: $ReadOnlyArray<RelativeMemberInfo>, | ||||
+roles: { [id: string]: RoleInfo }, | +roles: { [id: string]: RoleInfo }, | ||||
+currentUser: ThreadCurrentUserInfo, | +currentUser: ThreadCurrentUserInfo, | ||||
+sourceMessageID?: string, | +sourceMessageID?: string, | ||||
+repliesCount: number, | +repliesCount: number, | ||||
}; | }; | ||||
export type ResolvedThreadInfo = { | export type ResolvedThreadInfo = { | ||||
+id: string, | +id: string, | ||||
+type: ThreadType, | +type: ThreadType, | ||||
+name: ?string, | +name: ?string, | ||||
+uiName: string, | +uiName: string, | ||||
+avatar?: ?ClientAvatar, | |||||
+description: ?string, | +description: ?string, | ||||
+color: string, // hex, without "#" or "0x" | +color: string, // hex, without "#" or "0x" | ||||
+creationTime: number, // millisecond timestamp | +creationTime: number, // millisecond timestamp | ||||
+parentThreadID: ?string, | +parentThreadID: ?string, | ||||
+containingThreadID: ?string, | +containingThreadID: ?string, | ||||
+community: ?string, | +community: ?string, | ||||
+members: $ReadOnlyArray<RelativeMemberInfo>, | +members: $ReadOnlyArray<RelativeMemberInfo>, | ||||
+roles: { [id: string]: RoleInfo }, | +roles: { [id: string]: RoleInfo }, | ||||
▲ Show 20 Lines • Show All 240 Lines • Show Last 20 Lines |