2026-04-24 16:16:31 +08:00
|
|
|
export { ImSDK } from './ImSDK'
|
2026-04-25 17:27:19 +08:00
|
|
|
import { ImSDK as _ImSDK } from './ImSDK'
|
|
|
|
|
|
|
|
|
|
// Convenience named exports for friend APIs
|
|
|
|
|
export const listFriends = (): Promise<string[]> => _ImSDK.listFriends()
|
|
|
|
|
export const addFriend = (friendId: string): Promise<void> => _ImSDK.addFriend(friendId)
|
|
|
|
|
export const removeFriend = (friendId: string): Promise<void> => _ImSDK.removeFriend(friendId)
|
2026-05-02 12:30:32 +08:00
|
|
|
export const removeAllFriends = (): Promise<void> => _ImSDK.removeAllFriends()
|
|
|
|
|
export const setFriendGroup = (friendId: string, groupName?: string): Promise<void> => _ImSDK.setFriendGroup(friendId, groupName)
|
|
|
|
|
export const listFriendGroups = (): ReturnType<typeof _ImSDK.listFriendGroups> => _ImSDK.listFriendGroups()
|
|
|
|
|
export const listFriendsByGroup = (groupName: string): ReturnType<typeof _ImSDK.listFriendsByGroup> => _ImSDK.listFriendsByGroup(groupName)
|
|
|
|
|
export const checkBlacklist = (targetUserId: string): ReturnType<typeof _ImSDK.checkBlacklist> => _ImSDK.checkBlacklist(targetUserId)
|
2026-04-28 20:11:38 +08:00
|
|
|
export const searchUsers = (keyword: string, size?: number): ReturnType<typeof _ImSDK.searchUsers> => _ImSDK.searchUsers(keyword, size)
|
|
|
|
|
export const searchGroups = (keyword: string, size?: number): ReturnType<typeof _ImSDK.searchGroups> => _ImSDK.searchGroups(keyword, size)
|
2026-04-28 21:05:06 +08:00
|
|
|
export const searchMessages = (params: Parameters<typeof _ImSDK.searchMessages>[0]): ReturnType<typeof _ImSDK.searchMessages> => _ImSDK.searchMessages(params)
|
2026-04-28 22:32:21 +08:00
|
|
|
export const editMessage = (messageId: string, content: string): ReturnType<typeof _ImSDK.editMessage> => _ImSDK.editMessage(messageId, content)
|
2026-05-02 12:30:32 +08:00
|
|
|
export const setConversationHidden = (targetId: string, chatType: Parameters<typeof _ImSDK.setConversationHidden>[1], hidden: boolean): ReturnType<typeof _ImSDK.setConversationHidden> => _ImSDK.setConversationHidden(targetId, chatType, hidden)
|
|
|
|
|
export const setConversationGroup = (targetId: string, chatType: Parameters<typeof _ImSDK.setConversationGroup>[1], groupName?: string): ReturnType<typeof _ImSDK.setConversationGroup> => _ImSDK.setConversationGroup(targetId, chatType, groupName)
|
|
|
|
|
export const listConversationGroups = (): ReturnType<typeof _ImSDK.listConversationGroups> => _ImSDK.listConversationGroups()
|
|
|
|
|
export const listConversationGroupItems = (groupName: string): ReturnType<typeof _ImSDK.listConversationGroupItems> => _ImSDK.listConversationGroupItems(groupName)
|
2026-04-28 22:32:21 +08:00
|
|
|
export const locateHistoryPage = (toId: string, messageId: string, pageSize?: number, maxPages?: number): ReturnType<typeof _ImSDK.locateHistoryPage> => _ImSDK.locateHistoryPage(toId, messageId, pageSize, maxPages)
|
|
|
|
|
export const locateGroupHistoryPage = (groupId: string, messageId: string, pageSize?: number, maxPages?: number): ReturnType<typeof _ImSDK.locateGroupHistoryPage> => _ImSDK.locateGroupHistoryPage(groupId, messageId, pageSize, maxPages)
|
2026-05-02 22:57:55 +08:00
|
|
|
export const syncOfflineMessages = (maxCount?: number): ReturnType<typeof _ImSDK.syncOfflineMessages> => _ImSDK.syncOfflineMessages(maxCount)
|
|
|
|
|
export const offlineMessageCount = (): ReturnType<typeof _ImSDK.offlineMessageCount> => _ImSDK.offlineMessageCount()
|
2026-04-24 16:16:31 +08:00
|
|
|
export { ImClient } from './ImClient'
|
2026-04-24 20:54:12 +08:00
|
|
|
export { ImDatabase } from './db/ImDatabase'
|
2026-04-25 16:41:19 +08:00
|
|
|
export type { MessageSearchParams } from './db/ImDatabase'
|
2026-04-24 16:16:31 +08:00
|
|
|
export type {
|
|
|
|
|
ImMessage, ImGroup, ChatType, MsgType, MsgStatus,
|
|
|
|
|
ImEventListener, SendMessageParams,
|
2026-04-28 10:27:23 +08:00
|
|
|
ConversationData,
|
2026-05-02 12:30:32 +08:00
|
|
|
ConversationGroupItem,
|
2026-04-28 16:55:12 +08:00
|
|
|
HistoryQuery,
|
|
|
|
|
PageResult,
|
2026-04-28 10:27:23 +08:00
|
|
|
FriendRequest,
|
|
|
|
|
GroupJoinRequest,
|
|
|
|
|
BlacklistEntry,
|
2026-05-02 12:30:32 +08:00
|
|
|
BlacklistCheckResult,
|
|
|
|
|
GroupReadReceiptSummary,
|
2026-04-28 16:55:12 +08:00
|
|
|
UserProfile,
|
2026-04-24 16:16:31 +08:00
|
|
|
} from './types'
|
2026-04-25 16:41:19 +08:00
|
|
|
export { uploadFile } from './upload'
|
|
|
|
|
export type { UploadResult } from './upload'
|