UNPKG

@towns-protocol/sdk

Version:

For more details, visit the following resources:

32 lines 1.76 kB
import { MessageTips, ThreadStatsData, type MessageReactions, TimelineEvent, TimelineEventConfirmation } from '../models/timelineTypes'; export type TimelinesMap = Record<string, TimelineEvent[]>; export type ThreadStatsMap = Record<string, Record<string, ThreadStatsData>>; export type ThreadsMap = Record<string, TimelinesMap>; export type ReactionsMap = Record<string, Record<string, MessageReactions>>; export type TipsMap = Record<string, Record<string, MessageTips>>; export type TimelinesViewModel = { timelines: TimelinesMap; replacedEvents: Record<string, { oldEvent: TimelineEvent; newEvent: TimelineEvent; }[]>; pendingReplacedEvents: Record<string, Record<string, TimelineEvent>>; threadsStats: ThreadStatsMap; threads: ThreadsMap; reactions: ReactionsMap; tips: TipsMap; lastestEventByUser: { [userId: string]: TimelineEvent; }; }; export interface TimelinesViewInterface { initializeStream: (userId: string, streamId: string) => void; reset: (streamIds: string[]) => void; appendEvents: (events: TimelineEvent[], userId: string, streamId: string, specialFunction?: 'initializeStream') => void; prependEvents: (events: TimelineEvent[], userId: string, streamId: string) => void; updateEvents: (events: TimelineEvent[], userId: string, streamId: string) => void; updateEvent: (event: TimelineEvent, userId: string, streamId: string, updatingEventId: string) => void; confirmEvents: (confirmations: TimelineEventConfirmation[], streamId: string) => void; } export declare function makeTimelinesViewInterface(setState: (fn: (prevState: TimelinesViewModel) => TimelinesViewModel) => void): TimelinesViewInterface; //# sourceMappingURL=timelinesModel.d.ts.map