- 新增 BUG_TRACKER.md 记录已修复和开放的bug - 新增 TEST_EXECUTION_2026-04-30.md 自动化测试执行报告 - 新增 TEST_PROGRESS.md 测试进度跟踪文档 - 修复 Android SDK connectedCheck 内存不足问题 - 修复 Android sample-app CAMERA 权限 lint 失败 - 修复 Android UpdateSDK longVersionCode minSdk lint 失败 - 修复 RN Chat Demo Jest 无法解析本地 SDK 源码包 - 修复 Python Server SDK 回调消息解析与顶层导出错误 - 修复 Vue3 SDK package exports 条件顺序警告 - 修复 im-service 群消息不进入会话聚合列表问题 - 修复 im-service 对外时间字段单位不一致问题 - 修复 RN SDK 历史消息 upsert 丢失回推状态问题 - 修复 Android 黑名单操作静默失败问题 - 修复 AppSecret 调用无鉴权安全问题 - 修复 IM Token 无过期信息问题 - 修复 RN SDK 草稿同步服务端数据污染问题 - 修复 Vue3 SDK 撤回编辑后依赖 WS 刷新延迟问题 - 修复 im-service 消息摘要不支持媒体类型问题
146 行
2.8 KiB
TypeScript
146 行
2.8 KiB
TypeScript
export interface SDKConfig {
|
|
appKey: string
|
|
appSecret: string
|
|
debug?: boolean
|
|
baseUrl?: string
|
|
wsUrl?: string
|
|
}
|
|
|
|
export type MsgType =
|
|
| 'TEXT'
|
|
| 'IMAGE'
|
|
| 'VIDEO'
|
|
| 'AUDIO'
|
|
| 'FILE'
|
|
| 'CUSTOM'
|
|
| 'LOCATION'
|
|
| 'NOTIFY'
|
|
| 'RICH_TEXT'
|
|
| 'CALL_AUDIO'
|
|
| 'CALL_VIDEO'
|
|
| 'REVOKED'
|
|
| 'FORWARD'
|
|
|
|
export type ChatType = 'SINGLE' | 'GROUP'
|
|
|
|
export type MsgStatus = 'SENDING' | 'SENT' | 'DELIVERED' | 'READ' | 'FAILED' | 'REVOKED'
|
|
|
|
export interface ImMessage {
|
|
id: string
|
|
appId: string
|
|
fromUserId: string
|
|
fromId?: string
|
|
toId: string
|
|
chatType: ChatType
|
|
msgType: MsgType
|
|
content: string
|
|
status: MsgStatus
|
|
mentionedUserIds?: string
|
|
groupReadCount?: number
|
|
revoked?: boolean
|
|
createdAt: string
|
|
}
|
|
|
|
export interface ConversationView {
|
|
targetId: string
|
|
chatType: ChatType
|
|
lastMsgContent?: string | null
|
|
lastMsgType?: string | null
|
|
lastMsgTime: number
|
|
unreadCount: number
|
|
isMuted: boolean
|
|
isPinned: boolean
|
|
}
|
|
|
|
export interface PageResult<T> {
|
|
content: T[]
|
|
totalElements: number
|
|
totalPages: number
|
|
size: number
|
|
number: number
|
|
numberOfElements: number
|
|
first: boolean
|
|
last: boolean
|
|
empty: boolean
|
|
}
|
|
|
|
export interface HistoryQuery {
|
|
msgType?: MsgType
|
|
keyword?: string
|
|
startTime?: string | Date
|
|
endTime?: string | Date
|
|
page?: number
|
|
size?: number
|
|
}
|
|
|
|
export interface UserProfile {
|
|
id?: string
|
|
appId?: string
|
|
userId: string
|
|
nickname?: string | null
|
|
avatar?: string | null
|
|
gender?: string | null
|
|
status?: string | null
|
|
createdAt?: string | number | null
|
|
}
|
|
|
|
export interface ImGroup {
|
|
id: string
|
|
appId?: string
|
|
name: string
|
|
groupType?: string
|
|
creatorId: string
|
|
memberIds: string
|
|
adminIds: string
|
|
announcement?: string | null
|
|
createdAt?: string | number | null
|
|
}
|
|
|
|
export interface FriendRequest {
|
|
id: string
|
|
appId?: string
|
|
fromUserId: string
|
|
toUserId: string
|
|
remark?: string | null
|
|
status: 'PENDING' | 'ACCEPTED' | 'REJECTED'
|
|
createdAt: string | number
|
|
reviewedAt?: string | number | null
|
|
}
|
|
|
|
export interface GroupJoinRequest {
|
|
id: string
|
|
appId?: string
|
|
groupId: string
|
|
requesterId: string
|
|
remark?: string | null
|
|
status: 'PENDING' | 'ACCEPTED' | 'REJECTED'
|
|
createdAt: string | number
|
|
reviewedAt?: string | number | null
|
|
}
|
|
|
|
export interface SendMessageParams {
|
|
messageId?: string
|
|
toId: string
|
|
chatType: ChatType
|
|
msgType: MsgType
|
|
content: string
|
|
extra?: string
|
|
mentionedUserIds?: string
|
|
}
|
|
|
|
export interface ImEventMap {
|
|
message: (msg: ImMessage) => void
|
|
read: (msg: ImMessage) => void
|
|
revoke: (data: { msgId: string; operatorId: string }) => void
|
|
connected: () => void
|
|
disconnected: (code: number, reason: string) => void
|
|
error: (err: Event) => void
|
|
}
|
|
|
|
export interface ApiResponse<T> {
|
|
code: number
|
|
status: string
|
|
data: T
|
|
message: string
|
|
}
|