UNPKG

easemob-chat-uikit

Version:

![Static Badge](https://img.shields.io/badge/platform-React-green) ![Static Badge](https://img.shields.io/badge/language-typescript-green) ![GitHub commit activity](https://img.shields.io/github/commit-activity/y/easemob/Easemob-UIKit-web) ![GitHub last c

35 lines (34 loc) 1.61 kB
import { ChatSDK } from '../SDK'; import { ChatType } from 'module/types/messageType'; export type PinnedMessage = ChatSDK.PinnedMessageInfo; export interface PinnedMessageInfo { list: PinnedMessage[]; cursor: string | null; } export interface PinnedMessageMap { groupChat: Record<string, PinnedMessageInfo>; chatRoom: Record<string, PinnedMessageInfo>; singleChat: Record<string, PinnedMessageInfo>; } declare class PinnedMessagesStore { messages: PinnedMessageMap; visible: boolean; constructor(); unshiftPinnedMessage(conversationType: ChatType, conversationId: string, message: PinnedMessage): void; pushPinnedMessage(conversationType: ChatType, conversationId: string, message: PinnedMessage): void; clearPinnedMessages(conversationType: ChatType, conversationId: string): void; deletePinnedMessage(conversationType: ChatType, conversationId: string, messageId: string): void; setPinnedMessageCursor(conversationType: ChatType, conversationId: string, cursor: string | null): void; updatePinnedMessage(conversationType: ChatType, conversationId: string, messageId: string, pinnedTime: number, operatorId?: string): void; modifyPinnedMessage(conversationType: ChatType, conversationId: string, message: ChatSDK.ModifiedEventMessage): void; changeVisible(visible: boolean): void; pushPinNoticeMessage(params: { conversationType: ChatType; conversationId: string; noticeType: 'pin' | 'unpin'; operatorId: string; time: number; }): void; clear(): void; } export default PinnedMessagesStore;