|
|
@@ -307,6 +307,21 @@ namespace EventEmitter {
|
|
|
const EventEmitter: EventEmitterStatic;
|
|
|
}
|
|
|
|
|
|
+enum ImAreaCode {
|
|
|
+ /**
|
|
|
+ * 中国
|
|
|
+ */
|
|
|
+ DEFAULT = 0,
|
|
|
+ /**
|
|
|
+ * 中国
|
|
|
+ */
|
|
|
+ CN = 1,
|
|
|
+ /**
|
|
|
+ * 海外
|
|
|
+ */
|
|
|
+ SEA = 2
|
|
|
+}
|
|
|
+
|
|
|
interface ImAttachmentProgress {
|
|
|
progress: number;
|
|
|
totalSize: number;
|
|
|
@@ -453,6 +468,7 @@ class ImEngine_2 extends EventEmitter<ImSdkListener> {
|
|
|
private supportsWebRtc;
|
|
|
private supportWASM;
|
|
|
private initFlag;
|
|
|
+ private initStatus;
|
|
|
constructor();
|
|
|
static engine: ImEngine_2;
|
|
|
/**
|
|
|
@@ -476,6 +492,11 @@ class ImEngine_2 extends EventEmitter<ImSdkListener> {
|
|
|
* @param config SDK配置信息
|
|
|
*/
|
|
|
init(config: ImSdkConfig): Promise<0 | ImErrors.ERROR_CLIENT_REPEATED_INIT>;
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * @returns SDK是否已初始化
|
|
|
+ */
|
|
|
+ static isInitialized(): boolean;
|
|
|
/**
|
|
|
* 添加 Engine 事件监听
|
|
|
*/
|
|
|
@@ -765,6 +786,14 @@ interface ImGroupInfo {
|
|
|
* @param muteStatus 群禁言信息
|
|
|
*/
|
|
|
muteStatus: ImGroupMuteStatus;
|
|
|
+ /**
|
|
|
+ * 是否是超级大群,即群人数是否超过一定人数(默认是2000)
|
|
|
+ *
|
|
|
+ * 注意:
|
|
|
+ * 1、若是大群,则群成员变化会控制通知频率,不会实时通知,进退群的成员列表信息也不全
|
|
|
+ * 2、若是大群,则不支持查询群用户列表(查询会返回420错误)
|
|
|
+ */
|
|
|
+ isBigGroup: boolean;
|
|
|
}
|
|
|
|
|
|
interface ImGroupInfoStatus {
|
|
|
@@ -1172,7 +1201,8 @@ interface ImMessage {
|
|
|
|
|
|
enum ImMessageLevel {
|
|
|
NORMAL = 0,
|
|
|
- HIGH = 1
|
|
|
+ MEDIUM = 1,
|
|
|
+ HIGH = 2
|
|
|
}
|
|
|
|
|
|
interface ImMessageListener {
|
|
|
@@ -1308,6 +1338,10 @@ interface ImSdkConfig {
|
|
|
extra?: {
|
|
|
[key: string]: string;
|
|
|
};
|
|
|
+ /**
|
|
|
+ * @param areaCode 地区
|
|
|
+ */
|
|
|
+ areaCode?: ImAreaCode;
|
|
|
/**
|
|
|
* @param uploader 附件上传器参数
|
|
|
*/
|