easemob-chat-uikit 2.0.1 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/ChatUI.esm.js +79482 -85006
  2. package/ChatUI.js +131 -118
  3. package/ChatUI.umd.js +131 -118
  4. package/package.json +1 -1
  5. package/style/contactList/style/detail.scss +1 -0
  6. package/style/conversation/style/item.scss +6 -2
  7. package/style/groupDetail/style/style.scss +6 -0
  8. package/style/input/style/search.scss +3 -0
  9. package/style/reaction/style/style.scss +1 -1
  10. package/style/textMessage/style/style.scss +9 -0
  11. package/style/userItem/style/style.scss +3 -0
  12. package/style/userSelect/style/style.scss +3 -0
  13. package/style.css +1 -1
  14. package/types/module/callkit/CallKit.d.ts +1 -0
  15. package/types/module/callkit/hooks/useFullscreen.d.ts +1 -1
  16. package/types/module/callkit/index.d.ts +1 -2
  17. package/types/module/callkit/layouts/MultiPartyLayout.d.ts +2 -2
  18. package/types/module/callkit/services/CallService.d.ts +6 -1
  19. package/types/module/callkit/types/index.d.ts +6 -3
  20. package/types/module/callkit/types/layout.d.ts +5 -3
  21. package/types/module/contactList/ContactDetail.d.ts +2 -0
  22. package/types/module/empty/Empty.d.ts +1 -0
  23. package/types/module/groupDetail/GroupDetail.d.ts +1 -0
  24. package/types/module/hooks/useSDK.d.ts +2 -0
  25. package/types/module/hooks/useScreen.d.ts +25 -0
  26. package/types/module/index.d.ts +2 -1
  27. package/types/module/messageInput/MessageInput.d.ts +6 -6
  28. package/types/module/messageInput/emoji/Emoji.d.ts +5 -1
  29. package/types/module/messageInput/index.d.ts +1 -0
  30. package/types/module/messageInput/recorder/Recorder.d.ts +6 -1
  31. package/types/module/reaction/EmojiKeyboard.d.ts +5 -1
  32. package/types/module/reaction/index.d.ts +1 -0
  33. package/types/module/store/Provider.d.ts +1 -1
  34. package/types/module/store/index.d.ts +1 -4
  35. package/types/module/store/rootContext.d.ts +3 -7
  36. package/types/module/thread/ThreadListExpandableIcon.d.ts +8 -3
  37. package/types/module/utils/index.d.ts +1 -1
  38. package/README.md +0 -388
  39. package/types/module/callkit/layouts/PreviewLayout.d.ts +0 -25
@@ -4,4 +4,5 @@ import type { CallKitProps, CallKitRef } from './types/index';
4
4
  * CallKit主组件
5
5
  */
6
6
  declare const CallKit: React.ForwardRefExoticComponent<CallKitProps & React.RefAttributes<CallKitRef>>;
7
+ export { CallKit };
7
8
  export default CallKit;
@@ -5,5 +5,5 @@ export declare const useFullscreen: (containerRef: React.RefObject<HTMLDivElemen
5
5
  isFullscreen: boolean;
6
6
  enterFullscreen: () => Promise<void>;
7
7
  exitFullscreen: () => Promise<void>;
8
- toggleFullscreen: () => void;
8
+ toggleFullscreen: (e: React.MouseEvent) => void;
9
9
  };
@@ -1,4 +1,4 @@
1
- import CallKit from './CallKit';
1
+ import { CallKit } from './CallKit';
2
2
  import VideoLayout from './VideoLayout';
3
3
  import CallControls from './components/CallControls';
4
4
  export type { CallKitProps, CallKitRef, VideoWindowProps, LayoutMode, InvitationInfo, InvitationNotificationProps, } from './types/index';
@@ -10,7 +10,6 @@ export { CallKit, VideoLayout, CallControls };
10
10
  export { MiniSizeWindow } from './components/MiniSizeWindow';
11
11
  export { default as InvitationContent } from './components/InvitationContent';
12
12
  export { MultiPartyLayout } from './layouts/MultiPartyLayout';
13
- export { PreviewLayout } from './layouts/PreviewLayout';
14
13
  export { FullLayoutManager } from './layouts/FullLayoutManager';
15
14
  export { OneToOneFullLayout } from './layouts/OneToOneFullLayout';
16
15
  export { MultiPartyFullLayout } from './layouts/MultiPartyFullLayout';
@@ -9,7 +9,7 @@ export declare class MultiPartyLayoutStrategy implements LayoutStrategy {
9
9
  renderLayout(videos: VideoWindowProps[], layoutConfig: LayoutConfig, videoSize: VideoSize, renderVideoWindow: (video: VideoWindowProps, index: number, windowSize?: {
10
10
  width: number;
11
11
  height: number;
12
- }) => React.ReactNode, prefixCls: string, gap: number, selectedVideoId?: string, onVideoClick?: (videoId: string) => void, switchingState?: VideoSwitchingState): React.ReactNode;
12
+ }) => React.ReactNode, prefixCls: string, gap: number, selectedVideoId?: string, onVideoClick?: (e: React.MouseEvent, videoId: string) => void, switchingState?: VideoSwitchingState): React.ReactNode;
13
13
  }
14
14
  /**
15
15
  * 主要视频 + 缩略图布局策略
@@ -20,7 +20,7 @@ export declare class MainVideoLayoutStrategy implements LayoutStrategy {
20
20
  renderLayout(videos: VideoWindowProps[], layoutConfig: LayoutConfig, videoSize: VideoSize, renderVideoWindow: (video: VideoWindowProps, index: number, windowSize?: {
21
21
  width: number;
22
22
  height: number;
23
- }) => React.ReactNode, prefixCls: string, gap: number, selectedVideoId?: string, onVideoClick?: (videoId: string) => void, switchingState?: VideoSwitchingState, onExitMainVideoMode?: () => void): React.ReactNode;
23
+ }) => React.ReactNode, prefixCls: string, gap: number, selectedVideoId?: string, onVideoClick?: (e: React.MouseEvent, videoId: string) => void, switchingState?: VideoSwitchingState, onExitMainVideoMode?: () => void): React.ReactNode;
24
24
  }
25
25
  /**
26
26
  * 多人布局组件
@@ -85,6 +85,8 @@ export interface CallServiceConfig {
85
85
  onRtcEngineCreated?: (rtc: any) => void;
86
86
  onInvitedUserRemoved?: (userId: string, reason: 'refused' | 'cancelled' | 'timeout') => void;
87
87
  encoderConfig?: VideoEncoderConfigurationPreset;
88
+ onRingtoneStart?: (type: 'outgoing' | 'incoming') => void;
89
+ onRingtoneEnd?: (type: 'outgoing' | 'incoming') => void;
88
90
  }
89
91
  export declare class CallService {
90
92
  private client;
@@ -127,6 +129,8 @@ export declare class CallService {
127
129
  private onRemoteUserLeft?;
128
130
  private onRtcEngineCreated?;
129
131
  private onCallError?;
132
+ private onRingtoneStart?;
133
+ private onRingtoneEnd?;
130
134
  private cachedGroupInfos;
131
135
  private speakingVolumeThreshold;
132
136
  private outgoingRingtoneAudio;
@@ -142,6 +146,7 @@ export declare class CallService {
142
146
  private encoderConfig?;
143
147
  private creatingAudioTrack;
144
148
  private UIdToUserIdMap;
149
+ private enableMic;
145
150
  constructor(config: CallServiceConfig);
146
151
  setUIdToUserIdMap(uid: string, userId: string): void;
147
152
  getAccessToken(): Promise<string | null>;
@@ -186,7 +191,7 @@ export declare class CallService {
186
191
  private handleConfirmCalleeMessage;
187
192
  private handleCancelCallMessage;
188
193
  private handleLeaveCallMessage;
189
- toggleMute(): boolean;
194
+ toggleMute(): Promise<boolean>;
190
195
  toggleCamera(): Promise<boolean>;
191
196
  private toggleCameraInPreview;
192
197
  private speakerEnabled;
@@ -51,7 +51,7 @@ export interface LayoutStrategy {
51
51
  renderLayout(videos: VideoWindowProps[], layoutConfig: LayoutConfig, videoSize: VideoSize, renderVideoWindow: (video: VideoWindowProps, index: number, windowSize?: {
52
52
  width: number;
53
53
  height: number;
54
- }) => React.ReactNode, prefixCls: string, gap: number, selectedVideoId?: string, onVideoClick?: (videoId: string) => void, switchingState?: VideoSwitchingState, onExitMainVideoMode?: () => void): React.ReactNode;
54
+ }) => React.ReactNode, prefixCls: string, gap: number, selectedVideoId?: string, onVideoClick?: (e: React.MouseEvent, videoId: string) => void, switchingState?: VideoSwitchingState, onExitMainVideoMode?: () => void): React.ReactNode;
55
55
  }
56
56
  export interface LayoutOptions {
57
57
  aspectRatio: number;
@@ -109,7 +109,7 @@ export interface CallKitRef {
109
109
  setUserInfo: (userInfo: {
110
110
  [key: string]: any;
111
111
  }) => void;
112
- toggleMute: () => boolean;
112
+ toggleMute: () => Promise<boolean>;
113
113
  toggleCamera: () => Promise<boolean>;
114
114
  isMuted: () => boolean;
115
115
  isCameraEnabled: () => boolean;
@@ -211,7 +211,7 @@ export interface CallKitProps {
211
211
  onSpeakerToggle?: (enabled: boolean) => void;
212
212
  onScreenShareToggle?: (sharing: boolean) => void;
213
213
  onHangup?: () => void;
214
- onAddParticipant?: () => void;
214
+ onAddParticipant?: (event: React.MouseEvent) => void;
215
215
  onInvitationAccept?: (invitation: InvitationInfo) => void;
216
216
  onInvitationReject?: (invitation: InvitationInfo) => void;
217
217
  logLevel?: 'error' | 'warn' | 'info' | 'debug' | 'verbose';
@@ -229,6 +229,9 @@ export interface CallKitProps {
229
229
  onRemoteUserLeft?: (userId: string, callType: 'video' | 'audio' | 'group') => void;
230
230
  onRtcEngineCreated?: (rtc: any) => void;
231
231
  onEndCallWithReason?: (reason: string, callInfo: CallInfo) => void;
232
+ onRingtoneStart?: (type: 'outgoing' | 'incoming') => void;
233
+ onRingtoneEnd?: () => void;
234
+ onCallStatusChanged?: (status: 'idle' | 'calling' | 'ringing' | 'connected' | 'disconnected') => void;
232
235
  }
233
236
  import type React from 'react';
234
237
  export interface CustomIconProps {
@@ -29,9 +29,9 @@ export interface FullLayoutProps extends BaseLayoutProps {
29
29
  callStatus?: 'idle' | 'calling' | 'ringing' | 'connected';
30
30
  isShowingPreview?: boolean;
31
31
  isFullscreen?: boolean;
32
- onFullscreenToggle?: () => void;
32
+ onFullscreenToggle?: (e: React.MouseEvent) => void;
33
33
  isMinimized?: boolean;
34
- onMinimizedToggle?: () => void;
34
+ onMinimizedToggle?: (e: React.MouseEvent) => void;
35
35
  showControls?: boolean;
36
36
  muted?: boolean;
37
37
  cameraEnabled?: boolean;
@@ -42,7 +42,7 @@ export interface FullLayoutProps extends BaseLayoutProps {
42
42
  onSpeakerToggle?: (enabled: boolean) => void;
43
43
  onScreenShareToggle?: (sharing: boolean) => void;
44
44
  onHangup?: () => void;
45
- onAddParticipant?: () => void;
45
+ onAddParticipant?: (event: React.MouseEvent) => void;
46
46
  onPreviewAccept?: () => void;
47
47
  onPreviewReject?: () => void;
48
48
  onMinimizedClick?: (event?: React.MouseEvent) => void;
@@ -65,6 +65,8 @@ export interface FullLayoutProps extends BaseLayoutProps {
65
65
  }>;
66
66
  customIcons?: CallKitIconMap;
67
67
  iconRenderer?: (iconType: string, defaultIcon: React.ReactElement, context?: any) => React.ReactElement;
68
+ isDragging?: boolean;
69
+ justFinishedDrag?: boolean;
68
70
  }
69
71
  /**
70
72
  * 布局组件的工厂函数类型
@@ -18,6 +18,8 @@ export interface ContactDetailProps {
18
18
  onAudioCall?: () => void | boolean;
19
19
  onVideoCall?: () => void | boolean;
20
20
  renderEmpty?: () => React.ReactNode;
21
+ back?: boolean;
22
+ onClickBack?: () => void;
21
23
  }
22
24
  export declare const ContactDetail: React.FC<ContactDetailProps>;
23
25
  declare const _default: React.FunctionComponent<ContactDetailProps>;
@@ -5,6 +5,7 @@ export interface EmptyProps {
5
5
  prefix?: string;
6
6
  text?: ReactNode;
7
7
  icon?: ReactNode;
8
+ onClickBack?: () => void;
8
9
  }
9
10
  declare const Empty: FC<EmptyProps>;
10
11
  export { Empty };
@@ -13,6 +13,7 @@ export interface GroupDetailProps {
13
13
  onLeaveGroup?: () => void;
14
14
  onDestroyGroup?: () => void;
15
15
  onGroupMemberVisibleChange?: (visible: boolean) => void;
16
+ onBack?: () => void;
16
17
  }
17
18
  declare const _default: React.FunctionComponent<GroupDetailProps>;
18
19
  export default _default;
@@ -1,4 +1,6 @@
1
+ import { ChatSDK } from '../SDK';
1
2
  declare const useSDK: () => {
2
3
  ChatSDK: import("easemob-websdk").EasemobChatStatic;
4
+ ChatSDKType: typeof ChatSDK;
3
5
  };
4
6
  export { useSDK };
@@ -0,0 +1,25 @@
1
+ export type Orientation = 'portrait' | 'landscape';
2
+ export type BreakpointKey = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
3
+ export interface Breakpoints {
4
+ xs: number;
5
+ sm: number;
6
+ md: number;
7
+ lg: number;
8
+ xl: number;
9
+ }
10
+ export interface ScreenInfo {
11
+ width: number;
12
+ height: number;
13
+ vw: number;
14
+ vh: number;
15
+ devicePixelRatio: number;
16
+ orientation: Orientation;
17
+ breakpoint: BreakpointKey;
18
+ isMobile: boolean;
19
+ isTablet: boolean;
20
+ isDesktop: boolean;
21
+ isTouchDevice: boolean;
22
+ prefersReducedMotion: boolean;
23
+ }
24
+ export declare function useScreen(customBreakpoints?: Partial<Breakpoints>): ScreenInfo;
25
+ export declare function useIsMobile(customBreakpoints?: Partial<Breakpoints>): boolean;
@@ -34,6 +34,7 @@ import { useChatContext } from './hooks/useChatContext';
34
34
  import { useAddressContext } from './hooks/useAddressContext';
35
35
  import { useThreadContext } from './hooks/useThreadContext';
36
36
  import { useSDK } from './hooks/useSDK';
37
+ import { useIsMobile, useScreen } from './hooks/useScreen';
37
38
  import Thread, { ThreadProps } from './thread';
38
39
  import UserProfile, { UserProfileProps } from './userProfile';
39
40
  import { Blocklist, BlocklistProps } from './blocklist';
@@ -45,4 +46,4 @@ import { CallKitProps, CallInfo, CallErrorCode, CallError } from './callkit';
45
46
  import { CallKitRef } from './callkit/types/index';
46
47
  export type { AudioMessageProps, BaseMessageProps, FileMessageProps, ImageMessageProps, ImagePreviewProps, NoticeMessageProps, TextMessageProps, VideoMessageProps, MessageStatusProps, CombinedMessageProps, PinnedMessageProps, RepliedMsgProps, UnsentRepliedMsgProps, ChatProps, MsgListProps, ConversationItemProps, ConversationListProps, ConversationData, MessageInputProps, MoreActionProps, RecorderProps, EmojiProps, SelectedControlsProps, SuggestListProps, TextareaProps, HeaderProps, EmptyProps, RecalledMessageProps, RootStore, InitConfig, MessageStore, Message, SelectedMessage, Typing, ConversationStore, AT_TYPE, Conversation, CurrentConversation, ById, AddressStore, MemberRole, MemberItem, GroupItem, AppUserInfo, ThreadStore, ThreadData, CurrentThread, ProviderProps, ContextProps, ThreadProps, UserProfileProps, BlocklistProps, ContactListProps, ContactDetailProps, GroupDetailProps, GroupMemberProps, UserCardMessageProps, UserSelectProps, CallKitProps, CallKitRef, CallInfo, CallErrorCode, CallError, };
47
48
  declare const UIKitProvider: import("react").NamedExoticComponent<ProviderProps>;
48
- export { AudioMessage, BaseMessage, FileMessage, ImageMessage, NoticeMessage, TextMessage, VideoMessage, CombinedMessage, PinnedMessage, RepliedMsg, UnsentRepliedMsg, MessageStatus, Chat, MessageList, ContactList, ConversationList, ConversationItem, MessageInput, Header, Empty, RecalledMessage, rootStore, RootContext, RootProvider, RootConsumer, Provider, UIKitProvider, Thread, UserProfile, Blocklist, useClient, useConversations, usePinnedMessage, useHistoryMessages, useSDK, useConversationContext, useChatContext, useAddressContext, useThreadContext, useChatroomContext, Chatroom, ChatroomMember, ChatroomMessage, ContactItem, ContactDetail, GroupDetail, GroupMember, UserCardMessage, UserSelect, CallKit, };
49
+ export { AudioMessage, BaseMessage, FileMessage, ImageMessage, NoticeMessage, TextMessage, VideoMessage, CombinedMessage, PinnedMessage, RepliedMsg, UnsentRepliedMsg, MessageStatus, Chat, MessageList, ContactList, ConversationList, ConversationItem, MessageInput, Header, Empty, RecalledMessage, rootStore, RootContext, RootProvider, RootConsumer, Provider, UIKitProvider, Thread, UserProfile, Blocklist, useClient, useConversations, usePinnedMessage, useHistoryMessages, useSDK, useIsMobile, useScreen, useConversationContext, useChatContext, useAddressContext, useThreadContext, useChatroomContext, Chatroom, ChatroomMember, ChatroomMessage, ContactItem, ContactDetail, GroupDetail, GroupMember, UserCardMessage, UserSelect, CallKit, };
@@ -30,11 +30,11 @@ export interface MessageInputProps {
30
30
  giftKeyboardProps?: GiftKeyboardProps;
31
31
  onChange?: (value: string) => void;
32
32
  onFocus?: () => void;
33
+ disableRecorder?: boolean;
34
+ disableRecorderTitle?: string;
33
35
  }
34
- declare const _default: {
35
- (props: MessageInputProps): import("react/jsx-runtime").JSX.Element;
36
- defaultActions: Actions;
37
- } & {
38
- displayName: string;
39
- };
36
+ export interface MessageInputRef {
37
+ stopRecording: () => void;
38
+ }
39
+ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<MessageInputProps & React.RefAttributes<MessageInputRef>, "ref"> & React.RefAttributes<MessageInputRef>>>;
40
40
  export default _default;
@@ -26,5 +26,9 @@ export interface EmojiProps {
26
26
  closeAfterClick?: boolean;
27
27
  onOpenChange?: (open: boolean) => void;
28
28
  }
29
- declare const Emoji: (props: EmojiProps) => import("react/jsx-runtime").JSX.Element;
29
+ export interface EmojiRef {
30
+ open?: () => void;
31
+ close?: () => void;
32
+ }
33
+ declare const Emoji: React.ForwardRefExoticComponent<EmojiProps & React.RefAttributes<EmojiRef>>;
30
34
  export { Emoji };
@@ -6,4 +6,5 @@ export type { EmojiProps } from './emoji';
6
6
  export type { SelectedControlsProps } from './selectedControls';
7
7
  export type { SuggestListProps } from './suggestList';
8
8
  export type { TextareaProps } from './textarea';
9
+ export type { MessageInputRef } from './MessageInput';
9
10
  export default MessageInput;
@@ -14,6 +14,11 @@ export interface RecorderProps {
14
14
  conversation?: CurrentConversation;
15
15
  onBeforeSendMessage?: (message: ChatSDK.MessageBody) => Promise<CurrentConversation | void>;
16
16
  isChatThread?: boolean;
17
+ disabled?: boolean;
18
+ disabledTitle?: string;
17
19
  }
18
- declare const Recorder: React.FC<RecorderProps>;
20
+ export interface RecorderRef {
21
+ stopRecording: () => void;
22
+ }
23
+ declare const Recorder: React.ForwardRefExoticComponent<RecorderProps & React.RefAttributes<RecorderRef>>;
19
24
  export { Recorder };
@@ -10,5 +10,9 @@ export interface EmojiKeyBoardProps {
10
10
  onClick?: (e: React.MouseEvent<Element, MouseEvent>) => void;
11
11
  onOpenChange?: (open: boolean) => void;
12
12
  }
13
- declare const EmojiKeyBoard: (props: EmojiKeyBoardProps) => import("react/jsx-runtime").JSX.Element;
13
+ export interface EmojiKeyBoardRef {
14
+ open?: () => void;
15
+ close?: () => void;
16
+ }
17
+ declare const EmojiKeyBoard: React.ForwardRefExoticComponent<EmojiKeyBoardProps & React.RefAttributes<EmojiKeyBoardRef>>;
14
18
  export { EmojiKeyBoard };
@@ -1,4 +1,5 @@
1
1
  import { EmojiKeyBoard } from './EmojiKeyboard';
2
2
  import { ReactionMessage } from './ReactionMessage';
3
3
  export type { ReactionData, ReactionMessageProps } from './ReactionMessage';
4
+ export type { EmojiKeyBoardRef } from './EmojiKeyboard';
4
5
  export { EmojiKeyBoard, ReactionMessage };
@@ -1,7 +1,7 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  export interface ProviderProps {
3
3
  initConfig: {
4
- appKey: string;
4
+ appKey?: string;
5
5
  userId?: string;
6
6
  token?: string;
7
7
  password?: string;
@@ -6,11 +6,8 @@ import PinnedMessagesStore from './PinnedMessagesStore';
6
6
  import { ChatSDK } from 'module/SDK';
7
7
  import { ProviderProps } from '../store/Provider';
8
8
  type InitConfig = {
9
- appKey: string;
10
- appId?: string;
11
- } | {
12
9
  appKey?: string;
13
- appId: string;
10
+ appId?: string;
14
11
  };
15
12
  declare class RootStore {
16
13
  messageStore: MessageStore;
@@ -8,6 +8,8 @@ export interface RootConsumerProps {
8
8
  export interface ContextProps {
9
9
  rootStore: RootStore;
10
10
  initConfig: {
11
+ appKey?: string;
12
+ appId?: string;
11
13
  token?: string;
12
14
  userId?: string;
13
15
  translationTargetLanguage?: string;
@@ -15,13 +17,7 @@ export interface ContextProps {
15
17
  maxMessages?: number;
16
18
  isFixedDeviceId?: boolean;
17
19
  useOwnUploadFun?: boolean;
18
- } & ({
19
- appKey: string;
20
- appId?: string;
21
- } | {
22
- appKey?: string;
23
- appId: string;
24
- });
20
+ };
25
21
  client: ChatSDK.Connection;
26
22
  features?: {
27
23
  chat?: {
@@ -5,8 +5,13 @@ export interface ThreadListExpandableIconProps {
5
5
  style?: React.CSSProperties;
6
6
  onClose?: () => void;
7
7
  icon?: React.ReactNode;
8
+ iconWidth?: string | number;
9
+ iconHeight?: string | number;
10
+ onClickItem?: () => void;
8
11
  }
9
- declare const _default: ((props: ThreadListExpandableIconProps) => import("react/jsx-runtime").JSX.Element) & {
10
- displayName: string;
11
- };
12
+ export interface ThreadListExpandableIconRef {
13
+ open: () => void;
14
+ close: () => void;
15
+ }
16
+ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<ThreadListExpandableIconProps & React.RefAttributes<ThreadListExpandableIconRef>, "ref"> & React.RefAttributes<ThreadListExpandableIconRef>>>;
12
17
  export default _default;
@@ -31,5 +31,5 @@ export declare function getMessages(cvs: CurrentConversation): (ChatSDK.MessageB
31
31
  export declare function getMessageIndex(messages: (ChatSDK.MessageBody | NoticeMessageBody)[], messageId: string): number;
32
32
  export declare function getReactionByEmoji(message: ChatSDK.MessageBody | NoticeMessageBody, emoji: string): any;
33
33
  export declare const getMsgSenderNickname: (msg: BaseMessageType, parentId?: string) => any;
34
- export declare function sortByPinned(a: any, b: any): 0 | 1 | -1;
34
+ export declare function sortByPinned(a: any, b: any): 1 | 0 | -1;
35
35
  export declare function checkCharacter(character: string): "zh" | "en" | "unknown";