更新
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
export enum ERROR_CODE {
|
||||
MSG_MODIFY_CONFLICT = 2480,
|
||||
MSG_MODIFY_DISABLED_IN_AVCHATROOM = 2481,
|
||||
MODIFY_MESSAGE_NOT_EXIST = 20026,
|
||||
}
|
||||
|
||||
export enum ERROR_CODE_ENGINE {
|
||||
NOT_INIT = -100000,
|
||||
INVALID_CONV_ID = -100001,
|
||||
CONV_ID_SAME = -100002,
|
||||
CONV_NOT_EXIST = -100003,
|
||||
GET_MSG_LIST_ERROR = -100004,
|
||||
MISMATCH_TYPE_AND_PAYLOAD = -100005,
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
export enum ERROR_MSG {
|
||||
MSG_MODIFY_CONFLICT = 'MODIFY_MESSAGE_ERROR,修改消息发生冲突, data.message 是最新的消息',
|
||||
MSG_MODIFY_DISABLED_IN_AVCHATROOM = 'MODIFY_MESSAGE_ERROR,不支持修改直播群消息.',
|
||||
MODIFY_MESSAGE_NOT_EXIST = 'MODIFY_MESSAGE_ERROR,消息不存在.',
|
||||
}
|
||||
|
||||
export enum ERROR_MSG_ENGINE {
|
||||
NOT_INIT = 'TUIChatEngine 初始化未完成,请确认 TUIChatEngine.login 接口调用是否正常。',
|
||||
INVALID_CONV_ID = '会话 ID 无效',
|
||||
CONV_ID_SAME = '您切换的是同一个会话 ID',
|
||||
CONV_NOT_EXIST = '会话不存在',
|
||||
GET_MSG_LIST_ERROR = 'Chat SDK is not ready.',
|
||||
MISMATCH_TYPE_AND_PAYLOAD = 'type 与 payload 不匹配.',
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export * from './mounted-list';
|
||||
export * from './store-name';
|
||||
export * from './user-status';
|
||||
export * from './operate-type';
|
||||
export * from './error-code';
|
||||
export * from './error-msg';
|
||||
export * from './validate-api-list';
|
||||
@@ -0,0 +1,9 @@
|
||||
// ChatEngine 上挂载的业务模块列表
|
||||
export enum MountedList {
|
||||
TUIStore = 'TUIStore',
|
||||
TUIConversation = 'TUIConversation',
|
||||
TUIChat = 'TUIChat',
|
||||
TUIGroup = 'TUIGroup',
|
||||
TUIUser = 'TUIUser',
|
||||
TUIReport = 'TUIReport',
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
export enum operateType {
|
||||
ADD = 'add',
|
||||
REMOVE = 'remove',
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
const OPTIONAL_MODULE = {
|
||||
GRP: 'group-module',
|
||||
SNS: 'relationship-module',
|
||||
};
|
||||
|
||||
export default OPTIONAL_MODULE;
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* @property {String} APP 应用级别的数据管理,主要用于某些功能的全局开关控制。
|
||||
* @property {String} CONV 会话数据管理
|
||||
* @property {String} CHAT 聊天数据管理
|
||||
* @property {String} GRP 群组数据管理
|
||||
* @property {String} USER 用户数据管理
|
||||
* @property {String} FRIEND 好友数据管理
|
||||
* @property {String} SEARCH 搜索数据管理
|
||||
* @property {String} CUSTOM 自定义数据管理,业务侧可根据需要添加自定义 key-value。
|
||||
*/
|
||||
export enum StoreName {
|
||||
APP = 'application',
|
||||
CONV = 'conversation',
|
||||
CHAT = 'chat',
|
||||
GRP = 'group',
|
||||
USER = 'user',
|
||||
FRIEND = 'friend',
|
||||
SEARCH = 'search',
|
||||
CUSTOM = 'custom',
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export enum UserStatus {
|
||||
UNSUB_USER = -1, // 用于取消订阅时删除 userStore 中 map 缓存
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
// 需要校验的 API
|
||||
export const ValidateAPIList = {
|
||||
// TUIChatEngine
|
||||
ENGINE: {
|
||||
logout: 1,
|
||||
destroy: 1,
|
||||
},
|
||||
CONV: {
|
||||
// ConversationModel
|
||||
// deleteConversation: 1,
|
||||
// pinConversation: 1,
|
||||
// muteConversation: 1,
|
||||
|
||||
// TUIConversationService
|
||||
switchConversation: 1,
|
||||
getConversationProfile: 1,
|
||||
clearHistoryMessage: 1,
|
||||
setMessageRead: 1,
|
||||
},
|
||||
CHAT: {
|
||||
// MessageModel
|
||||
modifyMessage: 1,
|
||||
revokeMessage: 1,
|
||||
resendMessage: 1,
|
||||
deleteMessage: 1,
|
||||
quoteMessage: 1,
|
||||
replyMessage: 1,
|
||||
setMessageExtensions: 1,
|
||||
deleteMessageExtensions: 1,
|
||||
getMessageExtensions: 1,
|
||||
|
||||
// TUIChatService
|
||||
sendTextMessage: 1,
|
||||
sendTextAtMessage: 1,
|
||||
sendImageMessage: 1,
|
||||
sendAudioMessage: 1,
|
||||
sendVideoMessage: 1,
|
||||
sendFileMessage: 1,
|
||||
sendCustomMessage: 1,
|
||||
sendFaceMessage: 1,
|
||||
sendLocationMessage: 1,
|
||||
sendForwardMessage: 1,
|
||||
enterTypingState: 1,
|
||||
leaveTypingState: 1,
|
||||
sendMessageReadReceipt: 1,
|
||||
getGroupMessageReadMemberList: 1,
|
||||
getMessageList: 1,
|
||||
downloadMergedMessages: 1,
|
||||
setTranslationLanguage: 1,
|
||||
translateText: 1,
|
||||
searchCloudMessages: 1,
|
||||
addMessageReaction: 1,
|
||||
removeMessageReaction: 1,
|
||||
getMessageReactions: 1,
|
||||
getAllUserListOfMessageReaction: 1,
|
||||
},
|
||||
GRP: {
|
||||
// TUIGroupService
|
||||
switchGroup: 1,
|
||||
getGroupProfile: 1,
|
||||
updateGroupProfile: 1,
|
||||
createGroup: 1,
|
||||
dismissGroup: 1,
|
||||
searchGroupByID: 1,
|
||||
joinGroup: 1,
|
||||
quitGroup: 1,
|
||||
getGroupApplicationList: 1,
|
||||
handleGroupApplication: 1,
|
||||
getGroupOnlineMemberCount: 1,
|
||||
changeGroupOwner: 1,
|
||||
initGroupAttributes: 1,
|
||||
setGroupAttributes: 1,
|
||||
deleteGroupAttributes: 1,
|
||||
getGroupAttributes: 1,
|
||||
setGroupCounters: 1,
|
||||
increaseGroupCounter: 1,
|
||||
decreaseGroupCounter: 1,
|
||||
getGroupCounters: 1,
|
||||
getGroupMemberList: 1,
|
||||
getGroupMemberProfile: 1,
|
||||
addGroupMember: 1,
|
||||
deleteGroupMember: 1,
|
||||
setGroupMemberMuteTime: 1,
|
||||
setGroupMemberRole: 1,
|
||||
setGroupMemberNameCard: 1,
|
||||
setGroupMemberCustomField: 1,
|
||||
markGroupMemberList: 1,
|
||||
},
|
||||
USER: {
|
||||
// TUIUserService
|
||||
switchUserStatus: 1,
|
||||
getUserProfile: 1,
|
||||
updateMyProfile: 1,
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user