@rongcloud/engine 5.14.1 → 5.16.0-c-rtc-alpha-2
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.
- package/index.cjs +16 -0
- package/index.cjs.js +16 -0
- package/index.d.ts +504 -218
- package/index.esm.js +1 -1
- package/index.mjs +15 -0
- package/package.json +13 -4
- package/index.js +0 -16
package/index.d.ts
CHANGED
|
@@ -31,7 +31,6 @@ declare enum UploadMethod {
|
|
|
31
31
|
*/
|
|
32
32
|
declare enum LogTagId {
|
|
33
33
|
L_IMSDK_VER_O = "L-imsdk_ver-O",
|
|
34
|
-
A_INIT_O = "A-init-O",
|
|
35
34
|
A_INIT_REPEAT_O = "A_INIT_REPEAT_O",
|
|
36
35
|
L_INIT_O = "L-init-O",
|
|
37
36
|
A_DESTROY_O = "A_DESTROY_O",
|
|
@@ -95,7 +94,9 @@ declare enum LogTagId {
|
|
|
95
94
|
A_DELETE_MESSAGES_S = "A-delete_messages-S",
|
|
96
95
|
P_DELETE_MSG_S = "P-delete_msg-S",
|
|
97
96
|
L_PULL_CONVERSATION_S = "L-pull_conversation-S",
|
|
98
|
-
|
|
97
|
+
A_RECALL_MESSAGE_T = "A-recall_msg-T",
|
|
98
|
+
A_RECALL_MESSAGE_R = "A-recall_msg-R",
|
|
99
|
+
A_RECALL_MESSAGE_E = "A-recall_msg-E",
|
|
99
100
|
A_REGTYP_O = "A-regtyp-O",
|
|
100
101
|
P_REGTYP_E = "P-regtype-E",
|
|
101
102
|
L_GET_NAVI_T = "L-get_navi-T",
|
|
@@ -124,6 +125,8 @@ declare enum LogTagId {
|
|
|
124
125
|
L_CHECK_ALIVE_IM_T = "L-check_alive_im-T",
|
|
125
126
|
L_CHECK_ALIVE_IM_R = "L-check_alive_im-R",
|
|
126
127
|
L_CHECK_ALIVE_IM_S = "L-check_alive_im-S",
|
|
128
|
+
A_GET_LOCAL_MESSAGE_T = "A-get_local_message-T",
|
|
129
|
+
A_GET_LOCAL_MESSAGE_R = "A-get_local_message-R",
|
|
127
130
|
A_GET_HISTORY_MSG_T = "A-get_history_msg-T",
|
|
128
131
|
A_GET_HISTORY_MSG_R = "A-get_history_msg-R",
|
|
129
132
|
L_GET_HISTORY_MSG_T = "L-get_history_msg-T",
|
|
@@ -226,7 +229,11 @@ declare enum LogTagId {
|
|
|
226
229
|
L_PULL_EVENT_CHANGE_NOTIFY_ULTRA_ONLINE_S = "L-pull_event_change_notify_ultra_online-S",
|
|
227
230
|
L_PULL_EVENT_CHANGE_T = "L-pull_event_change-T",
|
|
228
231
|
L_PULL_EVENT_CHANGE_R = "L-pull_event_change-R",
|
|
229
|
-
L_PARSE_JSON_E = "L-parse_json-E"
|
|
232
|
+
L_PARSE_JSON_E = "L-parse_json-E",
|
|
233
|
+
L_REQ_STREAM_MSG_CONTENT_T = "L-req_stream_msg_content-T",
|
|
234
|
+
L_REQ_STREAM_MSG_CONTENT_R = "L-req_stream_msg_content-R",
|
|
235
|
+
L_REQ_STREAM_MSG_CONTENT_O = "L-req_stream_msg_content-O",
|
|
236
|
+
L_REQ_STREAM_MSG_CONTENT_E = "L-req_stream_msg_content-E"
|
|
230
237
|
}
|
|
231
238
|
|
|
232
239
|
/**
|
|
@@ -605,10 +612,6 @@ declare enum ChrmMemOperateType {
|
|
|
605
612
|
|
|
606
613
|
/**
|
|
607
614
|
* 融云 IM 错误码
|
|
608
|
-
*
|
|
609
|
-
* 本文件由 ErrorCodeGenerator 自动生成
|
|
610
|
-
* 请勿擅自修改
|
|
611
|
-
*
|
|
612
615
|
* @category Enum
|
|
613
616
|
*/
|
|
614
617
|
declare enum ErrorCode {
|
|
@@ -1232,6 +1235,12 @@ declare enum ErrorCode {
|
|
|
1232
1235
|
* @since 5.12.0
|
|
1233
1236
|
*/
|
|
1234
1237
|
RC_FRIEND_NOT_ALLOW_ADD_SELF = 25473,
|
|
1238
|
+
/**
|
|
1239
|
+
* 25480
|
|
1240
|
+
* 托管资料信息审核不通过
|
|
1241
|
+
* @since 5.16.0
|
|
1242
|
+
*/
|
|
1243
|
+
SERVICE_INFORMATION_AUDIT_FAILED = 25480,
|
|
1235
1244
|
/**
|
|
1236
1245
|
* 26001
|
|
1237
1246
|
* 用户级设置服务 请求参数不合法
|
|
@@ -1269,7 +1278,7 @@ declare enum ErrorCode {
|
|
|
1269
1278
|
RC_SERVER_PARAMETER_MESSAGEUID_INVALID = 26009,
|
|
1270
1279
|
/**
|
|
1271
1280
|
* 26010
|
|
1272
|
-
*
|
|
1281
|
+
* 参数有���
|
|
1273
1282
|
*/
|
|
1274
1283
|
RC_SERVER_PARAMETER_INVALID = 26010,
|
|
1275
1284
|
/**
|
|
@@ -1399,6 +1408,12 @@ declare enum ErrorCode {
|
|
|
1399
1408
|
* @since 5.2.0
|
|
1400
1409
|
*/
|
|
1401
1410
|
RC_MSG_CONTENT_EXCEED_LIMIT = 30016,
|
|
1411
|
+
/**
|
|
1412
|
+
* 30017
|
|
1413
|
+
* 消息类型不支持发送。
|
|
1414
|
+
* @since 5.16.0
|
|
1415
|
+
*/
|
|
1416
|
+
MESSAGE_NOT_SUPPORT_SENDING = 30017,
|
|
1402
1417
|
/**
|
|
1403
1418
|
* 30019
|
|
1404
1419
|
* 网络连接不可用
|
|
@@ -1434,7 +1449,7 @@ declare enum ErrorCode {
|
|
|
1434
1449
|
RC_CONN_IDENTIFIER_REJECTED = 31002,
|
|
1435
1450
|
/**
|
|
1436
1451
|
* 31003
|
|
1437
|
-
*
|
|
1452
|
+
* 连接服务未开通���需要排查后台小程序(或桌面端)服务是否已开通
|
|
1438
1453
|
* @solution 建议到开发者后台 - 服务管理开通对应业务服务
|
|
1439
1454
|
* @since 5.2.0
|
|
1440
1455
|
*/
|
|
@@ -2543,6 +2558,42 @@ declare enum ErrorCode {
|
|
|
2543
2558
|
* @deprecated
|
|
2544
2559
|
*/
|
|
2545
2560
|
DRAF_GET_ERROR = 38001,
|
|
2561
|
+
/**
|
|
2562
|
+
* 39001
|
|
2563
|
+
* 流式消息不可用
|
|
2564
|
+
* @since 5.16.0
|
|
2565
|
+
*/
|
|
2566
|
+
STREAM_MESSAGE_DISABLE = 39001,
|
|
2567
|
+
/**
|
|
2568
|
+
* 39002
|
|
2569
|
+
* 流式消息并发个数限制,最多 3 个。
|
|
2570
|
+
* @since 5.16.0
|
|
2571
|
+
*/
|
|
2572
|
+
STREAM_MESSAGE_REQUEST_COUNT_LIMIT_EXCEEDED = 39002,
|
|
2573
|
+
/**
|
|
2574
|
+
* 39003
|
|
2575
|
+
* 流式消息的摘要扩展 Key 不支持修改或删除。
|
|
2576
|
+
* @since 5.16.0
|
|
2577
|
+
*/
|
|
2578
|
+
STREAM_MESSAGE_EXPANSION_KEY_ERROR = 39003,
|
|
2579
|
+
/**
|
|
2580
|
+
* 39005
|
|
2581
|
+
* 拉取流式消息请求失败。
|
|
2582
|
+
* @since 5.16.0
|
|
2583
|
+
*/
|
|
2584
|
+
STREAM_MESSAGE_REQUEST_FAIL = 39005,
|
|
2585
|
+
/**
|
|
2586
|
+
* 39006
|
|
2587
|
+
* 消息内容正在拉取中,请勿重复请求
|
|
2588
|
+
* @since 5.16.0
|
|
2589
|
+
*/
|
|
2590
|
+
STREAM_MESSAGE_REQUEST_IN_PROCESS = 39006,
|
|
2591
|
+
/**
|
|
2592
|
+
* 39007
|
|
2593
|
+
* 流式消息已同步完成,不需要重新拉取
|
|
2594
|
+
* @since 5.16.0
|
|
2595
|
+
*/
|
|
2596
|
+
STREAM_MESSAGE_SYNCED = 39007,
|
|
2546
2597
|
/**
|
|
2547
2598
|
* 41002
|
|
2548
2599
|
* 获取七牛token失败
|
|
@@ -2804,7 +2855,11 @@ declare enum MessageType {
|
|
|
2804
2855
|
/**
|
|
2805
2856
|
* 云控消息
|
|
2806
2857
|
*/
|
|
2807
|
-
CLOUD_CONTROL = "RC:CCConfigChangeRequestMsg"
|
|
2858
|
+
CLOUD_CONTROL = "RC:CCConfigChangeRequestMsg",
|
|
2859
|
+
/**
|
|
2860
|
+
* 流式消息
|
|
2861
|
+
*/
|
|
2862
|
+
STREAM_MESSAGE = "RC:StreamMsg"
|
|
2808
2863
|
}
|
|
2809
2864
|
|
|
2810
2865
|
/**
|
|
@@ -3232,6 +3287,208 @@ declare const UUId: {
|
|
|
3232
3287
|
genWithLen(strLen?: number): string;
|
|
3233
3288
|
};
|
|
3234
3289
|
|
|
3290
|
+
declare type LSR<T> = {
|
|
3291
|
+
[P in keyof T]: T[P] extends (...args: any) => any ? T[P] : never;
|
|
3292
|
+
};
|
|
3293
|
+
declare type Params<T, K extends keyof T> = Parameters<LSR<T>[K]> extends never ? any : Parameters<LSR<T>[K]>;
|
|
3294
|
+
/**
|
|
3295
|
+
* @typeParam T - 事件类型与回调函数类型映射,用于数据类型推导
|
|
3296
|
+
*/
|
|
3297
|
+
declare class EventEmitter$1<T> {
|
|
3298
|
+
/**
|
|
3299
|
+
* 事件监听器集合,其中键为事件类型,值为监听器数组;监听器数组中以优先级升序排列
|
|
3300
|
+
*/
|
|
3301
|
+
private readonly _map;
|
|
3302
|
+
private _addItem;
|
|
3303
|
+
/**
|
|
3304
|
+
* @hidden
|
|
3305
|
+
* 添加事件监听器
|
|
3306
|
+
* @param event 事件类型
|
|
3307
|
+
* @param listener 监听器
|
|
3308
|
+
* @param target 监听器回调时的 this 对象
|
|
3309
|
+
* @param priority 监听器调用优先级,默认为 0,值越大调用优先级越高,最大值 100
|
|
3310
|
+
* @returns 返回 symbol,移除监听时使用
|
|
3311
|
+
*/
|
|
3312
|
+
on<K extends keyof T>(event: K, listener: LSR<T>[K], target?: any, priority?: number): symbol;
|
|
3313
|
+
/**
|
|
3314
|
+
* @hidden
|
|
3315
|
+
* 添加事件监听器,并在一次通知过后移除该监听器
|
|
3316
|
+
* @param event 事件类型
|
|
3317
|
+
* @param listener 监听器
|
|
3318
|
+
* @param target 监听器回调时的 this 对象
|
|
3319
|
+
* @param priority 监听器调用优先级,默认为 0,值越大调用优先级越高,最大值 100
|
|
3320
|
+
* @returns 返回 symbol,移除监听时使用
|
|
3321
|
+
*/
|
|
3322
|
+
once<K extends keyof T>(event: K, listener: LSR<T>[K], target?: any, priority?: number): symbol;
|
|
3323
|
+
/**
|
|
3324
|
+
* @hidden
|
|
3325
|
+
* 移除事件监听
|
|
3326
|
+
* @param symbol - 监听器 symbol
|
|
3327
|
+
*/
|
|
3328
|
+
off(symbol: symbol): void;
|
|
3329
|
+
/**
|
|
3330
|
+
* @hidden
|
|
3331
|
+
* 派发事件以通知所有观察者,派发顺序按监听器优先级降序调用
|
|
3332
|
+
*/
|
|
3333
|
+
emit<K extends keyof T>(event: K, ...args: Params<T, K>): void;
|
|
3334
|
+
/**
|
|
3335
|
+
* @hidden
|
|
3336
|
+
* 清除指定类型的所有事件监听
|
|
3337
|
+
* @param event
|
|
3338
|
+
*/
|
|
3339
|
+
removeAll(event: keyof T): void;
|
|
3340
|
+
/**
|
|
3341
|
+
* @hidden
|
|
3342
|
+
* 清除所有事件监听器,同时解除所有事件的 pipe
|
|
3343
|
+
*/
|
|
3344
|
+
clear(): void;
|
|
3345
|
+
private _piped;
|
|
3346
|
+
/**
|
|
3347
|
+
* 连接目标事件监听器,本实例派发的事件会被传递给入参事件监听器
|
|
3348
|
+
* 举例:a.pipe(b) 后,当 a.emit 后,b 的所有监听器也会触发,但会晚于所有 a 的监听器;
|
|
3349
|
+
* @param emitter
|
|
3350
|
+
* @hidden
|
|
3351
|
+
*/
|
|
3352
|
+
pipe(emitter: EventEmitter$1<any>): void;
|
|
3353
|
+
}
|
|
3354
|
+
|
|
3355
|
+
declare class SuspendablePromise<T> {
|
|
3356
|
+
private readonly _promise;
|
|
3357
|
+
private _resolve;
|
|
3358
|
+
private _onCancel;
|
|
3359
|
+
constructor(handle: (resolve: (val: T) => void) => void, onCancel: (resolve: (val: T) => void) => void);
|
|
3360
|
+
private _onResolve;
|
|
3361
|
+
result(): Promise<T>;
|
|
3362
|
+
abort(): void;
|
|
3363
|
+
}
|
|
3364
|
+
|
|
3365
|
+
declare class RCResult<T = void> {
|
|
3366
|
+
readonly code: number;
|
|
3367
|
+
readonly msg: string;
|
|
3368
|
+
readonly data?: T;
|
|
3369
|
+
readonly isOk: boolean;
|
|
3370
|
+
/**
|
|
3371
|
+
* @hidden
|
|
3372
|
+
*/
|
|
3373
|
+
constructor(code: number, msg: string, data?: T);
|
|
3374
|
+
/**
|
|
3375
|
+
* 结果为 ok 时,进行后续异步操作
|
|
3376
|
+
* @hidden
|
|
3377
|
+
*/
|
|
3378
|
+
next<U>(onfulfilled: (value: T) => Promise<RCResult<U>>): Promise<RCResult<U>>;
|
|
3379
|
+
/**
|
|
3380
|
+
* 当结果为 ok 时,直接返回当前值;若结果为 fail 是,调用 onfail 等待处理,并返回处理结果
|
|
3381
|
+
* @param onfail
|
|
3382
|
+
* @description 回调函数返回的数据类型需与原类型保持一致
|
|
3383
|
+
* @hidden
|
|
3384
|
+
*/
|
|
3385
|
+
or(onfail: (code: number) => Promise<RCResult<T>>): Promise<RCResult<T>>;
|
|
3386
|
+
/**
|
|
3387
|
+
* 结果为 ok 时,对 data 进行数据转换
|
|
3388
|
+
* @hidden
|
|
3389
|
+
*/
|
|
3390
|
+
trans<U>(handler: (data: T) => U): RCResult<U>;
|
|
3391
|
+
/**
|
|
3392
|
+
* 结果为 ok 时,尝试进行后续数据转换,并返回转换结果
|
|
3393
|
+
* @hidden
|
|
3394
|
+
*/
|
|
3395
|
+
tryTrans<U>(handler: (data: T) => RCResult<U>): RCResult<U>;
|
|
3396
|
+
/**
|
|
3397
|
+
* JSON 序列号错误信息
|
|
3398
|
+
* @hidden
|
|
3399
|
+
*/
|
|
3400
|
+
errmsg(): string;
|
|
3401
|
+
/**
|
|
3402
|
+
* 抹除 data 数据,返回新的 RCResult 对象,不改变原数据
|
|
3403
|
+
* @hidden
|
|
3404
|
+
*/
|
|
3405
|
+
wipe(): RCResult<any>;
|
|
3406
|
+
}
|
|
3407
|
+
declare const ok: <T>(data?: T, desc?: string) => RCResult<T>;
|
|
3408
|
+
declare const fail: <T>(code: number, desc?: string, data?: T) => RCResult<T>;
|
|
3409
|
+
|
|
3410
|
+
declare class Validator {
|
|
3411
|
+
protected readonly _apiName: string;
|
|
3412
|
+
/**
|
|
3413
|
+
* @param apiName 记录方法名
|
|
3414
|
+
* @returns
|
|
3415
|
+
*/
|
|
3416
|
+
static create(apiName: string): Validator;
|
|
3417
|
+
/** 验证结果是否有效 */
|
|
3418
|
+
private _isValid;
|
|
3419
|
+
/** 当结果无效时定义错误码 */
|
|
3420
|
+
private _code;
|
|
3421
|
+
private _errmsg;
|
|
3422
|
+
/** 检测结果失败时定义错误码及错误信息,整个检测过程中仅第一次调用生效 */
|
|
3423
|
+
fail(code: number, msg?: string): Validator;
|
|
3424
|
+
/** 获取检测结果 */
|
|
3425
|
+
result(): RCResult;
|
|
3426
|
+
/**
|
|
3427
|
+
* @hidden
|
|
3428
|
+
*/
|
|
3429
|
+
constructor(_apiName: string);
|
|
3430
|
+
/**
|
|
3431
|
+
* 验证参数是否合规
|
|
3432
|
+
* @param key
|
|
3433
|
+
* @param value
|
|
3434
|
+
* @param handler
|
|
3435
|
+
* @param required
|
|
3436
|
+
*/
|
|
3437
|
+
validate(key: string, value: any, handler: (value: any) => boolean, required?: boolean): Validator;
|
|
3438
|
+
/**
|
|
3439
|
+
* 验证参数是否合规,不合规时抛出 CMSYError
|
|
3440
|
+
* @param key - 参数名,当抛出异常时用于提供详细错误信息
|
|
3441
|
+
* @param value - 待验证数据
|
|
3442
|
+
* @param handler - 验证方法,返回一个 boolean
|
|
3443
|
+
* @param required - 待验证参数是否未必填项
|
|
3444
|
+
* @throws CMSYError
|
|
3445
|
+
*/
|
|
3446
|
+
assert(key: string, value: any, handler: (value: any) => boolean, required?: boolean): Validator;
|
|
3447
|
+
isString(key: string, value: unknown, required?: boolean): Validator;
|
|
3448
|
+
/** string 类型检查 */
|
|
3449
|
+
assertString(key: string, value: unknown, required?: boolean): Validator;
|
|
3450
|
+
/** 长度不为 0 的有效字符串 */
|
|
3451
|
+
isNotEmptyString(key: string, value: unknown, required?: boolean): Validator;
|
|
3452
|
+
assertNotEmptyString(key: string, value: unknown, required?: boolean): Validator;
|
|
3453
|
+
isLimitedString(key: string, value: unknown, minLength: number, maxLength: number, required?: boolean): Validator;
|
|
3454
|
+
/** 限定长度字符串检查,检查失败时抛出 CMSYError */
|
|
3455
|
+
assertLimitedString(key: string, value: unknown, minLength: number, maxLength: number, required?: boolean): Validator;
|
|
3456
|
+
isBoolean(key: string, value: unknown, required?: boolean): Validator;
|
|
3457
|
+
/** 布尔值类型检查 */
|
|
3458
|
+
assertBoolean(key: string, value: unknown, required?: boolean): Validator;
|
|
3459
|
+
isNumber(key: string, value: unknown, required?: boolean): Validator;
|
|
3460
|
+
/** Number 类型检查 */
|
|
3461
|
+
assertNumber(key: string, value: unknown, required?: boolean): Validator;
|
|
3462
|
+
isLimitedNumber(key: string, value: unknown, min: number, max: number, required?: boolean): Validator;
|
|
3463
|
+
/** 检查限定范围数字 */
|
|
3464
|
+
assertLimitedNumber(key: string, value: unknown, min: number, max: number, required?: boolean): Validator;
|
|
3465
|
+
isInteger(key: string, value: unknown, required?: boolean): Validator;
|
|
3466
|
+
/** 整数检查 */
|
|
3467
|
+
assertInteger(key: string, value: unknown, required?: boolean): Validator;
|
|
3468
|
+
isLimitedInteger(key: string, value: unknown, min: number, max: number, required?: boolean): Validator;
|
|
3469
|
+
/** 有限整数检查 */
|
|
3470
|
+
assertLimitedInteger(key: string, value: unknown, min: number, max: number, required?: boolean): Validator;
|
|
3471
|
+
isArray(key: string, value: unknown, required?: boolean): Validator;
|
|
3472
|
+
/** Array 类型检查 */
|
|
3473
|
+
assertArray(key: string, value: unknown, required?: boolean): Validator;
|
|
3474
|
+
isLimitedArray(key: string, value: unknown, maxLength: number, required?: boolean, minLength?: number): Validator;
|
|
3475
|
+
/** 检查是否为限定长度的数组 */
|
|
3476
|
+
assertLimitedArray(key: string, value: unknown, maxLength: number, required?: boolean, minLength?: number): Validator;
|
|
3477
|
+
isTypedArray(key: string, value: unknown, itemValidator: (item: any) => boolean, required?: boolean): Validator;
|
|
3478
|
+
/** 类型化数组检查,除数组类型检查外,增加对每个元素的检查 */
|
|
3479
|
+
assertTypedArray(key: string, value: unknown, itemValidator: (item: any) => boolean, required?: boolean): Validator;
|
|
3480
|
+
isLimitedTypedArray(key: string, value: unknown, maxLength: number, itemValidator: (item: any) => boolean, required?: boolean, minLength?: number): Validator;
|
|
3481
|
+
/** 检查是否为限定长度的类型化数组 */
|
|
3482
|
+
assertLimitedTypedArray(key: string, value: unknown, maxLength: number, itemValidator: (item: any) => boolean, required?: boolean, minLength?: number): Validator;
|
|
3483
|
+
isObject(key: string, value: unknown, required?: boolean): Validator;
|
|
3484
|
+
/** Object 类型检查 */
|
|
3485
|
+
assertObject(key: string, value: unknown, required?: boolean): Validator;
|
|
3486
|
+
isValueOf<T extends Object>(key: string, value: unknown, target: T, required?: boolean): Validator;
|
|
3487
|
+
assertValueOf<T extends Object>(key: string, value: unknown, target: T, required?: boolean): Validator;
|
|
3488
|
+
isFunction(key: string, value: unknown, required?: boolean): Validator;
|
|
3489
|
+
assertFunction(key: string, value: unknown, required?: boolean): Validator;
|
|
3490
|
+
}
|
|
3491
|
+
|
|
3235
3492
|
/**
|
|
3236
3493
|
* @category Interface
|
|
3237
3494
|
*/
|
|
@@ -3738,6 +3995,10 @@ interface IUploadAuth {
|
|
|
3738
3995
|
* 下载鉴权信息
|
|
3739
3996
|
*/
|
|
3740
3997
|
downloadAuthInfo?: IDownloadAuth;
|
|
3998
|
+
/**
|
|
3999
|
+
* oss 存储配置,优先级高于导航 ossConfig 配置;值为 Json 字符串
|
|
4000
|
+
*/
|
|
4001
|
+
ossConfig?: string;
|
|
3741
4002
|
}
|
|
3742
4003
|
/**
|
|
3743
4004
|
* 下载鉴权信息
|
|
@@ -5270,24 +5531,24 @@ interface IOperateStatusNotify {
|
|
|
5270
5531
|
*/
|
|
5271
5532
|
summary: IOperateSummary[];
|
|
5272
5533
|
}
|
|
5273
|
-
|
|
5534
|
+
declare type IRecallMsgOptions = {
|
|
5274
5535
|
/**
|
|
5275
|
-
*
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5536
|
+
* 消息的唯一id,客户端依赖此属性查找要撤回的消息
|
|
5537
|
+
*/
|
|
5538
|
+
messageUId: string;
|
|
5539
|
+
/**
|
|
5540
|
+
* 消息发送时间
|
|
5541
|
+
* @deprecated 目前公有云已不再依赖消息的发送时间,私有云因存在一些老客户服务版本过旧,暂时仍建议发送该参数
|
|
5542
|
+
*/
|
|
5543
|
+
sentTime: number;
|
|
5279
5544
|
/**
|
|
5280
|
-
*
|
|
5545
|
+
* 撤回消息携带用户信息
|
|
5281
5546
|
*/
|
|
5282
5547
|
user?: IUserProfile;
|
|
5283
5548
|
/**
|
|
5284
5549
|
* Push 信息
|
|
5285
5550
|
*/
|
|
5286
5551
|
pushContent?: string;
|
|
5287
|
-
/**
|
|
5288
|
-
* 原消息体
|
|
5289
|
-
*/
|
|
5290
|
-
oriContent?: any;
|
|
5291
5552
|
/**
|
|
5292
5553
|
* 是否发送静默消息
|
|
5293
5554
|
* @description
|
|
@@ -5299,22 +5560,26 @@ interface IRecallMsgOptions {
|
|
|
5299
5560
|
*/
|
|
5300
5561
|
pushConfig?: IPushConfig;
|
|
5301
5562
|
/**
|
|
5302
|
-
|
|
5303
|
-
|
|
5563
|
+
* 撤回消息携带扩展信息
|
|
5564
|
+
*/
|
|
5304
5565
|
extra?: string;
|
|
5305
5566
|
/**
|
|
5306
|
-
*
|
|
5567
|
+
* 是否删除接收端本地存储的原始消息,对 Web 平台无效
|
|
5307
5568
|
*/
|
|
5308
5569
|
isDelete?: boolean;
|
|
5309
5570
|
/**
|
|
5310
|
-
*
|
|
5571
|
+
* 用于标识定向消息撤回,只当 conversationType 值为 群、超级群 时有效
|
|
5311
5572
|
*/
|
|
5312
5573
|
directionalUserIdList?: string[];
|
|
5313
5574
|
/**
|
|
5314
|
-
* 禁止更新到会话最新一条消息,默认 false: 更新,true:
|
|
5575
|
+
* 禁止更新到会话最新一条消息,默认 false: 更新,true: 不更新。
|
|
5315
5576
|
*/
|
|
5316
5577
|
disableUpdateLastMessage?: boolean;
|
|
5317
|
-
|
|
5578
|
+
/**
|
|
5579
|
+
* 用于融云 IMKit 展示需求,或业务其他需求,为透传字段,无实际管理作用
|
|
5580
|
+
*/
|
|
5581
|
+
isAdmin?: boolean;
|
|
5582
|
+
};
|
|
5318
5583
|
/**
|
|
5319
5584
|
* 发送消息时的可选项信息
|
|
5320
5585
|
*/
|
|
@@ -5574,6 +5839,8 @@ interface ISendExMsgOptions {
|
|
|
5574
5839
|
originExpansion?: {
|
|
5575
5840
|
[key: string]: string;
|
|
5576
5841
|
} | null;
|
|
5842
|
+
/** 消息类型 */
|
|
5843
|
+
messageType: string;
|
|
5577
5844
|
}
|
|
5578
5845
|
interface IUltraExMsgOptions {
|
|
5579
5846
|
canIncludeExpansion: boolean;
|
|
@@ -5866,137 +6133,6 @@ interface IGroupMessageDeliverStatus {
|
|
|
5866
6133
|
list: IGroupMessageDeliveredStatusInfo[];
|
|
5867
6134
|
}
|
|
5868
6135
|
|
|
5869
|
-
declare class SuspendablePromise<T> {
|
|
5870
|
-
private readonly _promise;
|
|
5871
|
-
private _resolve;
|
|
5872
|
-
private _onCancel;
|
|
5873
|
-
constructor(handle: (resolve: (val: T) => void) => void, onCancel: (resolve: (val: T) => void) => void);
|
|
5874
|
-
private _onResolve;
|
|
5875
|
-
result(): Promise<T>;
|
|
5876
|
-
abort(): void;
|
|
5877
|
-
}
|
|
5878
|
-
|
|
5879
|
-
declare class RCResult<T = void> {
|
|
5880
|
-
readonly code: number;
|
|
5881
|
-
readonly msg: string;
|
|
5882
|
-
readonly data?: T;
|
|
5883
|
-
readonly isOk: boolean;
|
|
5884
|
-
/**
|
|
5885
|
-
* @internal
|
|
5886
|
-
*/
|
|
5887
|
-
constructor(code: number, msg: string, data?: T);
|
|
5888
|
-
/**
|
|
5889
|
-
* 结果为 ok 时,进行后续异步操作
|
|
5890
|
-
* @internal
|
|
5891
|
-
*/
|
|
5892
|
-
next<U>(onfulfilled: (value: T) => Promise<RCResult<U>>): Promise<RCResult<U>>;
|
|
5893
|
-
/**
|
|
5894
|
-
* 结果为 ok 时,对 data 进行数据转换
|
|
5895
|
-
* @internal
|
|
5896
|
-
*/
|
|
5897
|
-
trans<U>(handler: (data: T) => U): RCResult<U>;
|
|
5898
|
-
/**
|
|
5899
|
-
* 结果为 ok 时,尝试进行后续数据转换,并返回转换结果
|
|
5900
|
-
* @internal
|
|
5901
|
-
*/
|
|
5902
|
-
tryTrans<U>(handler: (data: T) => RCResult<U>): RCResult<U>;
|
|
5903
|
-
/**
|
|
5904
|
-
* 抹除 data 数据
|
|
5905
|
-
* @internal
|
|
5906
|
-
*/
|
|
5907
|
-
wipe(): RCResult<any>;
|
|
5908
|
-
/** @internal */
|
|
5909
|
-
static ok<T>(data?: T, desc?: string): RCResult<T>;
|
|
5910
|
-
/** @internal */
|
|
5911
|
-
static unknown<T>(code: number, data?: T, desc?: string): RCResult<T>;
|
|
5912
|
-
/** @internal */
|
|
5913
|
-
static fail<T>(code: number, desc?: string, data?: T): RCResult<T>;
|
|
5914
|
-
}
|
|
5915
|
-
declare const ok: typeof RCResult.ok;
|
|
5916
|
-
declare const unknown: typeof RCResult.unknown;
|
|
5917
|
-
declare const fail: typeof RCResult.fail;
|
|
5918
|
-
|
|
5919
|
-
declare class Validator {
|
|
5920
|
-
protected readonly _apiName: string;
|
|
5921
|
-
/**
|
|
5922
|
-
* @param apiName 记录方法名
|
|
5923
|
-
* @returns
|
|
5924
|
-
*/
|
|
5925
|
-
static create(apiName: string): Validator;
|
|
5926
|
-
/** 验证结果是否有效 */
|
|
5927
|
-
private _isValid;
|
|
5928
|
-
/** 当结果无效时定义错误码 */
|
|
5929
|
-
private _code;
|
|
5930
|
-
private _errmsg;
|
|
5931
|
-
/** 检测结果失败时定义错误码及错误信息,整个检测过程中仅第一次调用生效 */
|
|
5932
|
-
fail(code: number, msg?: string): Validator;
|
|
5933
|
-
/** 获取检测结果 */
|
|
5934
|
-
result(): RCResult;
|
|
5935
|
-
/**
|
|
5936
|
-
* @internal
|
|
5937
|
-
* @param _apiName
|
|
5938
|
-
*/
|
|
5939
|
-
constructor(_apiName: string);
|
|
5940
|
-
/**
|
|
5941
|
-
* 验证参数是否合规
|
|
5942
|
-
* @param key
|
|
5943
|
-
* @param value
|
|
5944
|
-
* @param handler
|
|
5945
|
-
* @param required
|
|
5946
|
-
*/
|
|
5947
|
-
validate(key: string, value: any, handler: (value: any) => boolean, required?: boolean): Validator;
|
|
5948
|
-
/**
|
|
5949
|
-
* 验证参数是否合规,不合规时抛出 CMSYError
|
|
5950
|
-
* @param key - 参数名,当抛出异常时用于提供详细错误信息
|
|
5951
|
-
* @param value - 待验证数据
|
|
5952
|
-
* @param handler - 验证方法,返回一个 boolean
|
|
5953
|
-
* @param required - 待验证参数是否未必填项
|
|
5954
|
-
* @throws CMSYError
|
|
5955
|
-
*/
|
|
5956
|
-
assert(key: string, value: any, handler: (value: any) => boolean, required?: boolean): Validator;
|
|
5957
|
-
isString(key: string, value: unknown, required?: boolean): Validator;
|
|
5958
|
-
/** string 类型检查 */
|
|
5959
|
-
assertString(key: string, value: unknown, required?: boolean): Validator;
|
|
5960
|
-
/** 长度不为 0 的有效字符串 */
|
|
5961
|
-
isNotEmptyString(key: string, value: unknown, required?: boolean): Validator;
|
|
5962
|
-
assertNotEmptyString(key: string, value: unknown, required?: boolean): Validator;
|
|
5963
|
-
isLimitedString(key: string, value: unknown, minLength: number, maxLength: number, required?: boolean): Validator;
|
|
5964
|
-
/** 限定长度字符串检查,检查失败时抛出 CMSYError */
|
|
5965
|
-
assertLimitedString(key: string, value: unknown, minLength: number, maxLength: number, required?: boolean): Validator;
|
|
5966
|
-
isBoolean(key: string, value: unknown, required?: boolean): Validator;
|
|
5967
|
-
/** 布尔值类型检查 */
|
|
5968
|
-
assertBoolean(key: string, value: unknown, required?: boolean): Validator;
|
|
5969
|
-
isNumber(key: string, value: unknown, required?: boolean): Validator;
|
|
5970
|
-
/** Number 类型检查 */
|
|
5971
|
-
assertNumber(key: string, value: unknown, required?: boolean): Validator;
|
|
5972
|
-
isLimitedNumber(key: string, value: unknown, min: number, max: number, required?: boolean): Validator;
|
|
5973
|
-
/** 检查限定范围数字 */
|
|
5974
|
-
assertLimitedNumber(key: string, value: unknown, min: number, max: number, required?: boolean): Validator;
|
|
5975
|
-
isInteger(key: string, value: unknown, required?: boolean): Validator;
|
|
5976
|
-
/** 整数检查 */
|
|
5977
|
-
assertInteger(key: string, value: unknown, required?: boolean): Validator;
|
|
5978
|
-
isLimitedInteger(key: string, value: unknown, min: number, max: number, required?: boolean): Validator;
|
|
5979
|
-
/** 有限整数检查 */
|
|
5980
|
-
assertLimitedInteger(key: string, value: unknown, min: number, max: number, required?: boolean): Validator;
|
|
5981
|
-
isArray(key: string, value: unknown, required?: boolean): Validator;
|
|
5982
|
-
/** Array 类型检查 */
|
|
5983
|
-
assertArray(key: string, value: unknown, required?: boolean): Validator;
|
|
5984
|
-
isLimitedArray(key: string, value: unknown, maxLength: number, required?: boolean, minLength?: number): Validator;
|
|
5985
|
-
/** 检查是否为限定长度的数组 */
|
|
5986
|
-
assertLimitedArray(key: string, value: unknown, maxLength: number, required?: boolean, minLength?: number): Validator;
|
|
5987
|
-
isTypedArray(key: string, value: unknown, itemValidator: (item: any) => boolean, required?: boolean): Validator;
|
|
5988
|
-
/** 类型化数组检查,除数组类型检查外,增加对每个元素的检查 */
|
|
5989
|
-
assertTypedArray(key: string, value: unknown, itemValidator: (item: any) => boolean, required?: boolean): Validator;
|
|
5990
|
-
isLimitedTypedArray(key: string, value: unknown, maxLength: number, itemValidator: (item: any) => boolean, required?: boolean, minLength?: number): Validator;
|
|
5991
|
-
/** 检查是否为限定长度的类型化数组 */
|
|
5992
|
-
assertLimitedTypedArray(key: string, value: unknown, maxLength: number, itemValidator: (item: any) => boolean, required?: boolean, minLength?: number): Validator;
|
|
5993
|
-
isObject(key: string, value: unknown, required?: boolean): Validator;
|
|
5994
|
-
/** Object 类型检查 */
|
|
5995
|
-
assertObject(key: string, value: unknown, required?: boolean): Validator;
|
|
5996
|
-
isValueOf<T extends Object>(key: string, value: unknown, target: T, required?: boolean): Validator;
|
|
5997
|
-
assertValueOf<T extends Object>(key: string, value: unknown, target: T, required?: boolean): Validator;
|
|
5998
|
-
}
|
|
5999
|
-
|
|
6000
6136
|
/**
|
|
6001
6137
|
* 异步任务结果结构
|
|
6002
6138
|
* @category Interface
|
|
@@ -6028,7 +6164,9 @@ interface IServerAddressData {
|
|
|
6028
6164
|
addr: string;
|
|
6029
6165
|
protocol: EConnectProtocol;
|
|
6030
6166
|
weight: number;
|
|
6167
|
+
/** 是否进行 tls 和 quic 竞速 */
|
|
6031
6168
|
race?: boolean;
|
|
6169
|
+
/** 非服务下发属性,用于判断地址是否失败过的标识 */
|
|
6032
6170
|
failed?: boolean;
|
|
6033
6171
|
}
|
|
6034
6172
|
interface ILogPolicy {
|
|
@@ -6040,6 +6178,14 @@ interface INaviLogConfig {
|
|
|
6040
6178
|
policy: ILogPolicy;
|
|
6041
6179
|
addrs: IServerAddressData[];
|
|
6042
6180
|
}
|
|
6181
|
+
declare type IStreamServerAddress = {
|
|
6182
|
+
/** 服务地址,域名 + 端口 */
|
|
6183
|
+
addr: string;
|
|
6184
|
+
/** 协议类型 */
|
|
6185
|
+
protocol: EConnectProtocol;
|
|
6186
|
+
/** 权重,值越大优先级越高 */
|
|
6187
|
+
weight: number;
|
|
6188
|
+
};
|
|
6043
6189
|
/**
|
|
6044
6190
|
* 导航信息数据结构
|
|
6045
6191
|
*/
|
|
@@ -6114,7 +6260,7 @@ interface INaviInfo {
|
|
|
6114
6260
|
*/
|
|
6115
6261
|
chatroomMsg: boolean;
|
|
6116
6262
|
/**
|
|
6117
|
-
*
|
|
6263
|
+
* 文件服务器地址,优先级低于 ossConfig 配置
|
|
6118
6264
|
* @description
|
|
6119
6265
|
* 1. 公有云下,该地址为七牛云服务器地址
|
|
6120
6266
|
* 2. 私有云下,该地址为私有云自研文件服务器地址
|
|
@@ -6340,6 +6486,17 @@ interface INaviInfo {
|
|
|
6340
6486
|
* 第一位:0:未开通实时会话,1: 开通实时会话
|
|
6341
6487
|
*/
|
|
6342
6488
|
sessionMode?: number;
|
|
6489
|
+
/**
|
|
6490
|
+
* 0 未 ipv4 域名,1 为双栈域名,默认 0
|
|
6491
|
+
*/
|
|
6492
|
+
ipType?: number;
|
|
6493
|
+
/**
|
|
6494
|
+
* AI 流式消息拉取服务地址
|
|
6495
|
+
*/
|
|
6496
|
+
streamServer?: {
|
|
6497
|
+
/** 服务地址数据列表 */
|
|
6498
|
+
addrs?: IStreamServerAddress[];
|
|
6499
|
+
};
|
|
6343
6500
|
}
|
|
6344
6501
|
|
|
6345
6502
|
/**
|
|
@@ -7053,7 +7210,7 @@ interface IGroupInfoChanged {
|
|
|
7053
7210
|
operatorInfo: IGroupMemberInfo;
|
|
7054
7211
|
/**
|
|
7055
7212
|
* 变更的群组信息,仅包含变更字段
|
|
7056
|
-
* @deprecated
|
|
7213
|
+
* @deprecated 从 5.14.0 版本开始,建议使用 `changedGroupInfo` 字段替代
|
|
7057
7214
|
*/
|
|
7058
7215
|
groupInfo: IGroupInfo;
|
|
7059
7216
|
/**
|
|
@@ -7116,9 +7273,10 @@ interface IGroupFollowsChangedSync {
|
|
|
7116
7273
|
*/
|
|
7117
7274
|
userIds: string[];
|
|
7118
7275
|
}
|
|
7119
|
-
|
|
7276
|
+
declare type IProcessCode = {
|
|
7120
7277
|
processCode: ErrorCode;
|
|
7121
|
-
}
|
|
7278
|
+
};
|
|
7279
|
+
declare type ICreateGroupFail = IProcessCode & IErrorKeys;
|
|
7122
7280
|
interface IServerGroupBaseInfo {
|
|
7123
7281
|
name?: string;
|
|
7124
7282
|
portraitUrl?: string;
|
|
@@ -7269,7 +7427,7 @@ interface IEngine {
|
|
|
7269
7427
|
* 会话的业务标识
|
|
7270
7428
|
*/
|
|
7271
7429
|
channelId: string): Promise<ErrorCode>;
|
|
7272
|
-
recallMsg(
|
|
7430
|
+
recallMsg(conversation: IConversationOption, recallMsgOptions: IRecallMsgOptions): Promise<RCResult<IReceivedMessage>>;
|
|
7273
7431
|
/**
|
|
7274
7432
|
* 删除历史消息 通过 时间戳
|
|
7275
7433
|
* @param timestamp 小于等于传入时间戳的消息均删除
|
|
@@ -7627,7 +7785,7 @@ interface IEngine {
|
|
|
7627
7785
|
/**
|
|
7628
7786
|
* 获取消息
|
|
7629
7787
|
*/
|
|
7630
|
-
getMessage(messageId: number | string):
|
|
7788
|
+
getMessage(messageId: number | string): Promise<RCResult<IReceivedMessage>>;
|
|
7631
7789
|
/**
|
|
7632
7790
|
* 设置消息内容
|
|
7633
7791
|
*/
|
|
@@ -7745,9 +7903,7 @@ interface IEngine {
|
|
|
7745
7903
|
* 获取指定用户的在线状态
|
|
7746
7904
|
*/
|
|
7747
7905
|
getSubscribeUserStatus(subscribeType: SubscribeType, userIds: string[]): Promise<IAsyncRes<ISubscribeUserStatusInfo[]>>;
|
|
7748
|
-
updateMyUserProfile(profile: IUserProfileInfo): Promise<IAsyncRes<
|
|
7749
|
-
errorKey: string;
|
|
7750
|
-
}>>;
|
|
7906
|
+
updateMyUserProfile(profile: IUserProfileInfo): Promise<IAsyncRes<IUpdateMyProfileFail>>;
|
|
7751
7907
|
getUserProfiles(userIds: string[]): Promise<IAsyncRes<IUserProfileInfo[]>>;
|
|
7752
7908
|
getMyUserProfile(): Promise<IAsyncRes<IUserProfileInfo>>;
|
|
7753
7909
|
updateMyUserProfileVisibility(visibility: UserProfileVisibility): Promise<IAsyncRes>;
|
|
@@ -7755,10 +7911,10 @@ interface IEngine {
|
|
|
7755
7911
|
searchUserProfileByUniqueId(uniqueId: string): Promise<IAsyncRes<IUserProfileInfo>>;
|
|
7756
7912
|
createGroup(groupId: string, baseInfo: IServerGroupBaseInfo, extProfile: {
|
|
7757
7913
|
[key: string]: string;
|
|
7758
|
-
} | undefined, inviteeUserIds: string[]): Promise<IAsyncRes<
|
|
7914
|
+
} | undefined, inviteeUserIds: string[]): Promise<IAsyncRes<ICreateGroupFail>>;
|
|
7759
7915
|
updateGroupInfo(groupId: string, baseInfo: IServerGroupBaseInfo, extProfile: {
|
|
7760
7916
|
[key: string]: string;
|
|
7761
|
-
} | undefined): Promise<IAsyncRes<
|
|
7917
|
+
} | undefined): Promise<IAsyncRes<IErrorKeys>>;
|
|
7762
7918
|
getGroupsInfo(groupIds: string[]): Promise<IAsyncRes<IGroupInfo[]>>;
|
|
7763
7919
|
kickGroupMembers(groupId: string, userIds: string[], config: IQuitGroupConfig): Promise<IAsyncRes<void>>;
|
|
7764
7920
|
quitGroup(groupId: string, config: IQuitGroupConfig): Promise<IAsyncRes<void>>;
|
|
@@ -7767,7 +7923,7 @@ interface IEngine {
|
|
|
7767
7923
|
setGroupManagers(type: GroupOperationType, groupId: string, userIds: string[]): Promise<IAsyncRes<void>>;
|
|
7768
7924
|
getGroupMembersByRole(groupId: string, role: GroupMemberRole, option: IPagingQueryOption): Promise<IAsyncRes<IPagingQueryResult<IGroupMemberInfo>>>;
|
|
7769
7925
|
getGroupMembers(groupId: string, userIds: string[]): Promise<IAsyncRes<IGroupMemberInfo[]>>;
|
|
7770
|
-
setGroupMemberInfo(groupId: string, userId: string, nickname: string, extra?: string): Promise<IAsyncRes<
|
|
7926
|
+
setGroupMemberInfo(groupId: string, userId: string, nickname: string, extra?: string): Promise<IAsyncRes<IErrorKeys>>;
|
|
7771
7927
|
searchGroupMembers(groupId: string, nickName: string, option: IPagingQueryOption): Promise<IAsyncRes<IPagingQueryResult<IGroupMemberInfo>>>;
|
|
7772
7928
|
joinGroup(groupId: string): Promise<IAsyncRes<IProcessCode>>;
|
|
7773
7929
|
inviteUsersToGroup(groupId: string, userIds: string[]): Promise<IAsyncRes<IProcessCode>>;
|
|
@@ -7792,7 +7948,7 @@ interface IEngine {
|
|
|
7792
7948
|
refuseFriendApplication(userId: string, reason?: string): Promise<IAsyncRes<void>>;
|
|
7793
7949
|
setFriendInfo(userId: string, remark: string, extProfile: {
|
|
7794
7950
|
[key: string]: string;
|
|
7795
|
-
}): Promise<IAsyncRes<
|
|
7951
|
+
}): Promise<IAsyncRes<IErrorKeys>>;
|
|
7796
7952
|
checkFriends(userIds: string[], directionType: DirectionType): Promise<IAsyncRes<IFriendRelationInfo[]>>;
|
|
7797
7953
|
getFriends(directionType: QueryFriendsDirectionType, option: IPagingQueryOption | undefined): Promise<IAsyncRes<IPagingQueryResult<IFriendInfo>>>;
|
|
7798
7954
|
getFriendApplications(option: IPagingQueryOption, type?: FriendApplicationType[], status?: FriendApplicationStatus[]): Promise<IAsyncRes<IPagingQueryResult<IFriendApplicationInfo>>>;
|
|
@@ -8024,6 +8180,21 @@ interface IEngineWatcher extends IConnectionListener {
|
|
|
8024
8180
|
databaseUpgradeDidComplete: (code: ErrorCode) => void;
|
|
8025
8181
|
}
|
|
8026
8182
|
|
|
8183
|
+
declare type IErrorKeys = {
|
|
8184
|
+
/**
|
|
8185
|
+
* 更新错误的 key 数组
|
|
8186
|
+
* @since 5.16.0
|
|
8187
|
+
*/
|
|
8188
|
+
errorKeys?: string[];
|
|
8189
|
+
};
|
|
8190
|
+
declare type IUpdateMyProfileFail = IErrorKeys & {
|
|
8191
|
+
/**
|
|
8192
|
+
* 更新错误的 key;自 5.16.0 版本开始,该值废弃;请优先使用 errorKeys
|
|
8193
|
+
* @deprecated @since 5.16.0;
|
|
8194
|
+
*/
|
|
8195
|
+
errorKey: string;
|
|
8196
|
+
};
|
|
8197
|
+
|
|
8027
8198
|
/**
|
|
8028
8199
|
* 检查参数是否为字符串
|
|
8029
8200
|
* 只做类型检查,不做长度检查,故当字符串长度为 0,结果依然为 true
|
|
@@ -8250,10 +8421,10 @@ declare abstract class BasicLogger {
|
|
|
8250
8421
|
private static _traceIdCount;
|
|
8251
8422
|
constructor(_appkey: string, _id: string, _type: LogType);
|
|
8252
8423
|
/**
|
|
8253
|
-
|
|
8254
|
-
|
|
8255
|
-
protected abstract
|
|
8256
|
-
protected
|
|
8424
|
+
* 由子类继承实现日志入库
|
|
8425
|
+
*/
|
|
8426
|
+
protected abstract _handleWrite(data: ILogData): void;
|
|
8427
|
+
protected _write(logData: ILogData): void;
|
|
8257
8428
|
/**
|
|
8258
8429
|
* 创建事务追踪 ID,全局唯一,便于跨进程、异步事务追踪,需要考虑多进程
|
|
8259
8430
|
*/
|
|
@@ -8263,7 +8434,7 @@ declare abstract class BasicLogger {
|
|
|
8263
8434
|
* @returns
|
|
8264
8435
|
*/
|
|
8265
8436
|
getSessionId(): string;
|
|
8266
|
-
|
|
8437
|
+
protected _stdout(logData: ILogData): void;
|
|
8267
8438
|
/**
|
|
8268
8439
|
* 用户的打印日志等级配置
|
|
8269
8440
|
*/
|
|
@@ -8274,6 +8445,18 @@ declare abstract class BasicLogger {
|
|
|
8274
8445
|
info: (tag: string, content?: LogContent | undefined, traceId?: string | undefined) => void;
|
|
8275
8446
|
warn: (tag: string, content?: LogContent | undefined, traceId?: string | undefined) => void;
|
|
8276
8447
|
error: (tag: string, content?: LogContent | undefined, traceId?: string | undefined) => void;
|
|
8448
|
+
/**
|
|
8449
|
+
* 汇总 result 结果记录并记录日志
|
|
8450
|
+
* @param tag
|
|
8451
|
+
* @param isSuccess
|
|
8452
|
+
* @param traceId
|
|
8453
|
+
* @param summaryInfo - 日志摘要数据
|
|
8454
|
+
* @param successMsg - 自定义成功日志信息,优先级高于 summaryInfo
|
|
8455
|
+
* @param failMsg - 自定义失败日志信息,优先级高于 summaryInfo
|
|
8456
|
+
*/
|
|
8457
|
+
summary(tag: string, res: RCResult<any>, traceId?: string, summaryInfo?: {
|
|
8458
|
+
[key: string]: string | number | boolean | undefined;
|
|
8459
|
+
}, successMsg?: () => string, failMsg?: () => string): void;
|
|
8277
8460
|
/**
|
|
8278
8461
|
* 内部质量数据统计接口,仅限 IMLib 与 RTCLib 内部使用
|
|
8279
8462
|
*/
|
|
@@ -8323,6 +8506,49 @@ declare enum AreaCode {
|
|
|
8323
8506
|
SA = 5
|
|
8324
8507
|
}
|
|
8325
8508
|
|
|
8509
|
+
interface ISSERequestOpts {
|
|
8510
|
+
/** 应用 appkey */
|
|
8511
|
+
readonly appkey: string;
|
|
8512
|
+
/** Token */
|
|
8513
|
+
readonly token: string;
|
|
8514
|
+
/** 消息 UId */
|
|
8515
|
+
readonly msgUId: string;
|
|
8516
|
+
/**
|
|
8517
|
+
* 原始数据回调,SSEClient 不处理业务数据
|
|
8518
|
+
* @param rawContent - 当次收到的增量数据
|
|
8519
|
+
*/
|
|
8520
|
+
onRawContent(rawContent: string): void;
|
|
8521
|
+
/**
|
|
8522
|
+
* 连接中网络中断
|
|
8523
|
+
*/
|
|
8524
|
+
onNetworkError(code: number): void;
|
|
8525
|
+
/**
|
|
8526
|
+
* 连接超时配置,单位毫秒
|
|
8527
|
+
*/
|
|
8528
|
+
timeout: number;
|
|
8529
|
+
}
|
|
8530
|
+
interface ISSEClientInitOpts extends ISSERequestOpts {
|
|
8531
|
+
readonly logger: ILogger;
|
|
8532
|
+
}
|
|
8533
|
+
declare abstract class SSEClient {
|
|
8534
|
+
#private;
|
|
8535
|
+
/** 平台标识,用于请求时携带 */
|
|
8536
|
+
protected abstract _platform: string;
|
|
8537
|
+
protected readonly _logger: ILogger;
|
|
8538
|
+
constructor(
|
|
8539
|
+
/** 初始化参数 */
|
|
8540
|
+
initOpts: ISSEClientInitOpts);
|
|
8541
|
+
/**
|
|
8542
|
+
* @param url - 服务地址
|
|
8543
|
+
* @param opts
|
|
8544
|
+
*/
|
|
8545
|
+
protected abstract _openHandler(url: string, opts: ISSERequestOpts): Promise<RCResult>;
|
|
8546
|
+
/**
|
|
8547
|
+
* 打开 SSE 连接,SSEClient 将依次按权重顺序尝试每个服务地址,直到成功打开连接。
|
|
8548
|
+
*/
|
|
8549
|
+
open(addrs: IStreamServerAddress[]): Promise<RCResult>;
|
|
8550
|
+
}
|
|
8551
|
+
|
|
8326
8552
|
interface IStorage {
|
|
8327
8553
|
setItem(key: string, value: string): void;
|
|
8328
8554
|
getItem(key: string): string | null;
|
|
@@ -8415,6 +8641,10 @@ interface IRuntime {
|
|
|
8415
8641
|
* @since 5.7.9
|
|
8416
8642
|
*/
|
|
8417
8643
|
removeNetworkStatusListener: () => void;
|
|
8644
|
+
/**
|
|
8645
|
+
* 创建 EventSource 客户端建立 SSE 链路,用于拉取 AI 流式消息数据
|
|
8646
|
+
*/
|
|
8647
|
+
createSSEClient(initOpts: ISSEClientInitOpts): RCResult<SSEClient>;
|
|
8418
8648
|
}
|
|
8419
8649
|
|
|
8420
8650
|
declare const runtime: IRuntime;
|
|
@@ -8425,6 +8655,7 @@ declare type PBModule = {
|
|
|
8425
8655
|
[key: string]: Function;
|
|
8426
8656
|
};
|
|
8427
8657
|
declare class Codec$1<T> {
|
|
8658
|
+
#private;
|
|
8428
8659
|
/**
|
|
8429
8660
|
* 嵌套结构声明
|
|
8430
8661
|
* key: pbname
|
|
@@ -8456,11 +8687,6 @@ declare class Codec$1<T> {
|
|
|
8456
8687
|
* @param data 待解码数据
|
|
8457
8688
|
*/
|
|
8458
8689
|
decode<K extends keyof T>(pbname: K, uint8array: Uint8Array): T[K];
|
|
8459
|
-
/**
|
|
8460
|
-
* protobuf 结构中,int64 类型数据无法直接转为 JS 的 number 数据,需计算获取
|
|
8461
|
-
* @param data
|
|
8462
|
-
*/
|
|
8463
|
-
private fixInt64Values;
|
|
8464
8690
|
/**
|
|
8465
8691
|
* @deprecated
|
|
8466
8692
|
*/
|
|
@@ -8738,7 +8964,7 @@ declare type ModuleType<T> = {
|
|
|
8738
8964
|
[key in KeyType<T>]?: any;
|
|
8739
8965
|
};
|
|
8740
8966
|
/**
|
|
8741
|
-
* @deprecated
|
|
8967
|
+
* @deprecated 因该工具已向 RTC 业务暴露,因此暂时不可删除,待 RTC 迁移到新工具后删除
|
|
8742
8968
|
*/
|
|
8743
8969
|
declare class Codec<T> {
|
|
8744
8970
|
/**
|
|
@@ -8815,7 +9041,7 @@ declare class PluginContext {
|
|
|
8815
9041
|
* 获取 context
|
|
8816
9042
|
*/
|
|
8817
9043
|
__getContext(): APIContext;
|
|
8818
|
-
/** @deprecated
|
|
9044
|
+
/** @deprecated 使用 `createPBCodec` 替代 */
|
|
8819
9045
|
createCodec<T extends CodecPBMaps>(keymaps: T, pbDesc: string): Codec<T>;
|
|
8820
9046
|
createPBCodec<T>(desc: string, nestedMap: Map<string, keyof T>): Codec$1<T>;
|
|
8821
9047
|
/**
|
|
@@ -9104,6 +9330,66 @@ interface IConnectResult {
|
|
|
9104
9330
|
userId?: string;
|
|
9105
9331
|
}
|
|
9106
9332
|
|
|
9333
|
+
/**
|
|
9334
|
+
* 流式消息数据拉取响应事件类型
|
|
9335
|
+
* @category Enum
|
|
9336
|
+
*/
|
|
9337
|
+
declare enum StreamMessageResponseEventType {
|
|
9338
|
+
/**
|
|
9339
|
+
* 流式消息内容传输通道就绪
|
|
9340
|
+
*/
|
|
9341
|
+
INIT = "INIT",
|
|
9342
|
+
/**
|
|
9343
|
+
* 流式消息数据到达通知
|
|
9344
|
+
*/
|
|
9345
|
+
DATA = "DATA",
|
|
9346
|
+
/**
|
|
9347
|
+
* 流式消息拉取结束通知
|
|
9348
|
+
*/
|
|
9349
|
+
END = "END"
|
|
9350
|
+
}
|
|
9351
|
+
|
|
9352
|
+
/**
|
|
9353
|
+
* 流式消息内容数据结构,在 `StreamMessageEvent.DATA` 事件中返回
|
|
9354
|
+
*/
|
|
9355
|
+
declare type IStreamMessageResponseChunkData = {
|
|
9356
|
+
/**
|
|
9357
|
+
* 本次事件接收到的增量内容
|
|
9358
|
+
*/
|
|
9359
|
+
content: string;
|
|
9360
|
+
/**
|
|
9361
|
+
* 已拉取到的累加内容
|
|
9362
|
+
*/
|
|
9363
|
+
fullContent: string;
|
|
9364
|
+
};
|
|
9365
|
+
/**
|
|
9366
|
+
* 流式消息事件数据
|
|
9367
|
+
*/
|
|
9368
|
+
declare type IStreamMessageResponseEventData<T> = {
|
|
9369
|
+
/** 流式消息 UId */
|
|
9370
|
+
messageUId: string;
|
|
9371
|
+
/** 消息实例,仅 Electron 平台支持 */
|
|
9372
|
+
message?: T;
|
|
9373
|
+
/** 当 type 值为 END 时,需要依赖 code 值确定重置或结束原因 */
|
|
9374
|
+
code: number;
|
|
9375
|
+
/** 响应事件类型 */
|
|
9376
|
+
type: StreamMessageResponseEventType;
|
|
9377
|
+
/** 接收到的流数据,仅当 type 值为 DATA 时有效 */
|
|
9378
|
+
chunk?: IStreamMessageResponseChunkData;
|
|
9379
|
+
/**
|
|
9380
|
+
* 服务器端数据是否已同步完成,当值为 true 时,表示服务器已不再产生新的流数据;仅当 type 值为 END 时有效
|
|
9381
|
+
*/
|
|
9382
|
+
complete?: boolean;
|
|
9383
|
+
};
|
|
9384
|
+
/** SSE 模块 */
|
|
9385
|
+
declare class SSEModule extends EventEmitter$1<{
|
|
9386
|
+
message: (data: IStreamMessageResponseEventData<IReceivedMessage>) => void;
|
|
9387
|
+
}> {
|
|
9388
|
+
#private;
|
|
9389
|
+
constructor(ctx: APIContext, inElectron: boolean);
|
|
9390
|
+
requestStreamMessageContent(messageUId: string): Promise<RCResult>;
|
|
9391
|
+
}
|
|
9392
|
+
|
|
9107
9393
|
declare class APIContext {
|
|
9108
9394
|
private static _context?;
|
|
9109
9395
|
static init(options: IAPIContextOption): APIContext;
|
|
@@ -9128,6 +9414,8 @@ declare class APIContext {
|
|
|
9128
9414
|
private readonly _engine;
|
|
9129
9415
|
readonly appkey: string;
|
|
9130
9416
|
private readonly _options;
|
|
9417
|
+
/** 流式消息处理模块 */
|
|
9418
|
+
readonly sse: SSEModule;
|
|
9131
9419
|
private _versionInfo;
|
|
9132
9420
|
private _typingInfo;
|
|
9133
9421
|
/**
|
|
@@ -9315,6 +9603,8 @@ declare class APIContext {
|
|
|
9315
9603
|
getDeviceId(): string;
|
|
9316
9604
|
getCurrentUserId(): string;
|
|
9317
9605
|
getConnectionStatus(): RCConnectionStatus;
|
|
9606
|
+
/** 高阶函数,生成一个验证方法,验证是否处于连接中状态,并在连接状态可用时返回导航数据 */
|
|
9607
|
+
get validatorConnected(): () => RCResult<INaviInfo>;
|
|
9318
9608
|
get token(): string;
|
|
9319
9609
|
refetchNaviInfo(): IPromiseResult<INaviInfo | null>;
|
|
9320
9610
|
/**
|
|
@@ -9377,9 +9667,6 @@ declare class APIContext {
|
|
|
9377
9667
|
sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions, onBefore?: (messageId: number) => void, traceId?: string): Promise<IAsyncRes<IReceivedMessage>>;
|
|
9378
9668
|
/**
|
|
9379
9669
|
* 发送扩展消息
|
|
9380
|
-
* @param messageUId 消息 Id
|
|
9381
|
-
* @param keys 需要删除的 key
|
|
9382
|
-
* @param expansion 设置的扩展
|
|
9383
9670
|
*/
|
|
9384
9671
|
sendExpansionMessage(options: ISendExMsgOptions): Promise<IAsyncRes<ErrorCode>>;
|
|
9385
9672
|
/**
|
|
@@ -9543,7 +9830,15 @@ declare class APIContext {
|
|
|
9543
9830
|
saveConversationMessageDraft(conversationType: ConversationType, targetId: string, draft: string, channelId?: string): Promise<ErrorCode>;
|
|
9544
9831
|
getConversationMessageDraft(conversationType: ConversationType, targetId: string, channelId?: string): Promise<IAsyncRes<string>>;
|
|
9545
9832
|
clearConversationMessageDraft(conversationType: ConversationType, targetId: string, channelId?: string): Promise<ErrorCode>;
|
|
9546
|
-
|
|
9833
|
+
/**
|
|
9834
|
+
* 撤回消息
|
|
9835
|
+
* @param conversation 会话信息
|
|
9836
|
+
* @param messageUId
|
|
9837
|
+
* @param sentTime - 目前公有云已撤回消息已不再依赖消息的发送时间,私有云因存在一些老客户服务版本过旧,暂时仍需发送该参数
|
|
9838
|
+
* @param recallMsgOptions
|
|
9839
|
+
* @returns
|
|
9840
|
+
*/
|
|
9841
|
+
recallMessage(conversation: IConversationOption, recallMsgOptions: IRecallMsgOptions): Promise<RCResult<IReceivedMessage>>;
|
|
9547
9842
|
/**
|
|
9548
9843
|
* 删除远端消息
|
|
9549
9844
|
* @param conversationType
|
|
@@ -9677,22 +9972,17 @@ declare class APIContext {
|
|
|
9677
9972
|
* @returns
|
|
9678
9973
|
*/
|
|
9679
9974
|
getFileToken(fileType: FileType, fileName?: string, httpMethod?: 'POST' | 'PUT', queryString?: string, url?: string, size?: number): Promise<IUploadAuth & {
|
|
9680
|
-
bos: string;
|
|
9681
9975
|
qiniu: string;
|
|
9682
9976
|
ossConfig: string;
|
|
9683
9977
|
}>;
|
|
9684
9978
|
/**
|
|
9685
|
-
* 获取
|
|
9979
|
+
* 获取 七牛、阿里云上传后的可下载 URL
|
|
9686
9980
|
* @param fileType 文件类型
|
|
9687
9981
|
* @param fileName 文件名
|
|
9688
9982
|
* @param saveName 下载后的存储文件名
|
|
9689
|
-
* @param uploadRes 插件上传返回的结果。降级百度上传后,用户传入返回结果,再把结果里的下载地址返回给用户,保证兼容之前结果获取
|
|
9690
9983
|
* @param serverType 使用的存储服务标识
|
|
9691
9984
|
*/
|
|
9692
|
-
getFileUrl(fileType: FileType, fileName
|
|
9693
|
-
isBosRes: boolean;
|
|
9694
|
-
downloadUrl: string;
|
|
9695
|
-
}, serverType?: UploadMethod): Promise<{
|
|
9985
|
+
getFileUrl(fileType: FileType, fileName: string, serverType: UploadMethod, saveName?: string): Promise<{
|
|
9696
9986
|
downloadUrl: string;
|
|
9697
9987
|
}>;
|
|
9698
9988
|
/**
|
|
@@ -9878,9 +10168,7 @@ declare class APIContext {
|
|
|
9878
10168
|
* 获取指定用户的在线状态
|
|
9879
10169
|
*/
|
|
9880
10170
|
getSubscribeUserStatus(subscribeType: SubscribeType, userIds: string[]): Promise<IAsyncRes<ISubscribeUserStatusInfo[]>>;
|
|
9881
|
-
updateMyUserProfile(profile: IUserProfileInfo): Promise<IAsyncRes<
|
|
9882
|
-
errorKey: string;
|
|
9883
|
-
}>>;
|
|
10171
|
+
updateMyUserProfile(profile: IUserProfileInfo): Promise<IAsyncRes<IUpdateMyProfileFail>>;
|
|
9884
10172
|
getUserProfiles(userIds: string[]): Promise<IAsyncRes<IUserProfileInfo[]>>;
|
|
9885
10173
|
getMyUserProfile(): Promise<IAsyncRes<IUserProfileInfo>>;
|
|
9886
10174
|
updateMyUserProfileVisibility(visibility: UserProfileVisibility): Promise<IAsyncRes>;
|
|
@@ -9941,7 +10229,7 @@ declare class APIContext {
|
|
|
9941
10229
|
/**
|
|
9942
10230
|
* 获取本地消息
|
|
9943
10231
|
*/
|
|
9944
|
-
|
|
10232
|
+
getLocalMessage(messageId: number | string): Promise<RCResult<IReceivedMessage>>;
|
|
9945
10233
|
/**
|
|
9946
10234
|
* 设置消息内容
|
|
9947
10235
|
*/
|
|
@@ -10064,10 +10352,10 @@ declare class APIContext {
|
|
|
10064
10352
|
testProxy(proxy: IProxy, testHost: string): Promise<IResponse>;
|
|
10065
10353
|
createGroup(groupId: string, baseInfo: IServerGroupBaseInfo, extProfile: {
|
|
10066
10354
|
[key: string]: string;
|
|
10067
|
-
} | undefined, inviteeUserIds?: string[]): Promise<IAsyncRes<
|
|
10355
|
+
} | undefined, inviteeUserIds?: string[]): Promise<IAsyncRes<ICreateGroupFail>>;
|
|
10068
10356
|
updateGroupInfo(groupId: string, baseInfo: IServerGroupBaseInfo, extProfile: {
|
|
10069
10357
|
[key: string]: string;
|
|
10070
|
-
} | undefined): Promise<IAsyncRes<
|
|
10358
|
+
} | undefined): Promise<IAsyncRes<IErrorKeys>>;
|
|
10071
10359
|
getGroupsInfo(groupIds: string[]): Promise<IAsyncRes<IGroupInfo[]>>;
|
|
10072
10360
|
kickGroupMembers(groupId: string, userIds: string[], config: IQuitGroupConfig): Promise<IAsyncRes<void>>;
|
|
10073
10361
|
quitGroup(groupId: string, config: IQuitGroupConfig): Promise<IAsyncRes<void>>;
|
|
@@ -10076,7 +10364,7 @@ declare class APIContext {
|
|
|
10076
10364
|
setGroupManagers(type: GroupOperationType, groupId: string, userIds: string[]): Promise<IAsyncRes<void>>;
|
|
10077
10365
|
getGroupMembersByRole(groupId: string, role: GroupMemberRole, option: IPagingQueryOption): Promise<IAsyncRes<IPagingQueryResult<IGroupMemberInfo>>>;
|
|
10078
10366
|
getGroupMembers(groupId: string, userIds: string[]): Promise<IAsyncRes<IGroupMemberInfo[]>>;
|
|
10079
|
-
setGroupMemberInfo(groupId: string, userId: string, nickname: string, extra?: string): Promise<IAsyncRes<
|
|
10367
|
+
setGroupMemberInfo(groupId: string, userId: string, nickname: string, extra?: string): Promise<IAsyncRes<IErrorKeys>>;
|
|
10080
10368
|
searchGroupMembers(groupId: string, nickName: string, option: IPagingQueryOption): Promise<IAsyncRes<IPagingQueryResult<IGroupMemberInfo>>>;
|
|
10081
10369
|
joinGroup(groupId: string): Promise<IAsyncRes<IProcessCode>>;
|
|
10082
10370
|
inviteUsersToGroup(groupId: string, userIds: string[]): Promise<IAsyncRes<IProcessCode>>;
|
|
@@ -10098,7 +10386,7 @@ declare class APIContext {
|
|
|
10098
10386
|
refuseFriendApplication(userId: string, reason: string): Promise<IAsyncRes<void>>;
|
|
10099
10387
|
setFriendInfo(userId: string, remark: string, extProfile: {
|
|
10100
10388
|
[key: string]: string;
|
|
10101
|
-
}): Promise<IAsyncRes<
|
|
10389
|
+
}): Promise<IAsyncRes<IErrorKeys>>;
|
|
10102
10390
|
checkFriends(userIds: string[], directionType: DirectionType): Promise<IAsyncRes<IFriendRelationInfo[]>>;
|
|
10103
10391
|
getFriends(directionType: QueryFriendsDirectionType, option: IPagingQueryOption | undefined): Promise<IAsyncRes<IPagingQueryResult<IFriendInfo>>>;
|
|
10104
10392
|
getFriendApplications(option: IPagingQueryOption, type?: FriendApplicationType[], status?: FriendApplicationStatus[]): Promise<IAsyncRes<IPagingQueryResult<IFriendApplicationInfo>>>;
|
|
@@ -10183,8 +10471,8 @@ declare class RTCPluginContext extends PluginContext {
|
|
|
10183
10471
|
setRTCData(roomId: string, key: string, value: string, isInner: boolean, apiType: RTCApiType, message?: any): Promise<ErrorCode>;
|
|
10184
10472
|
/**
|
|
10185
10473
|
* @deprecated
|
|
10186
|
-
* @param
|
|
10187
|
-
* @param
|
|
10474
|
+
* @param roomId
|
|
10475
|
+
* @param message 向前兼容的消息数据,以兼容旧版本 SDK,即增量数据,如:
|
|
10188
10476
|
* ```
|
|
10189
10477
|
* JSON.stringify({
|
|
10190
10478
|
* name: 'RCRTC:PublishResource',
|
|
@@ -10192,8 +10480,8 @@ declare class RTCPluginContext extends PluginContext {
|
|
|
10192
10480
|
* }
|
|
10193
10481
|
* })
|
|
10194
10482
|
* ```
|
|
10195
|
-
* @param
|
|
10196
|
-
* @param
|
|
10483
|
+
* @param valueInfo 全量资源数据
|
|
10484
|
+
* @param 全量 URI 消息名,即 `RCRTC:TotalContentResources`
|
|
10197
10485
|
*/
|
|
10198
10486
|
setRTCTotalRes(roomId: string,
|
|
10199
10487
|
/**
|
|
@@ -10482,7 +10770,7 @@ declare abstract class AEngine {
|
|
|
10482
10770
|
* 会话的业务标识
|
|
10483
10771
|
*/
|
|
10484
10772
|
channelId: string): Promise<ErrorCode>;
|
|
10485
|
-
abstract recallMsg(
|
|
10773
|
+
abstract recallMsg(conversation: IConversationOption, recallMsgOptions: IRecallMsgOptions): Promise<RCResult<IReceivedMessage>>;
|
|
10486
10774
|
/**
|
|
10487
10775
|
* 删除历史消息 通过 时间戳
|
|
10488
10776
|
* @param timestamp 小于等于传入时间戳的消息均删除
|
|
@@ -10737,7 +11025,7 @@ declare abstract class AEngine {
|
|
|
10737
11025
|
* @param saveName 下载后的存储文件名
|
|
10738
11026
|
* @returns
|
|
10739
11027
|
*/
|
|
10740
|
-
abstract getFileUrl(fileType: FileType, serverType: UploadMethod, fileName
|
|
11028
|
+
abstract getFileUrl(fileType: FileType, serverType: UploadMethod, fileName: string, saveName?: string): IPromiseResult<{
|
|
10741
11029
|
downloadUrl: string;
|
|
10742
11030
|
}>;
|
|
10743
11031
|
/**
|
|
@@ -10966,7 +11254,7 @@ declare abstract class AEngine {
|
|
|
10966
11254
|
/**
|
|
10967
11255
|
* 获取消息
|
|
10968
11256
|
*/
|
|
10969
|
-
abstract getMessage(messageId: number | string):
|
|
11257
|
+
abstract getMessage(messageId: number | string): Promise<RCResult<IReceivedMessage>>;
|
|
10970
11258
|
/**
|
|
10971
11259
|
* 设置消息内容
|
|
10972
11260
|
*/
|
|
@@ -11185,9 +11473,7 @@ declare abstract class AEngine {
|
|
|
11185
11473
|
* 获取指定用户的在线状态
|
|
11186
11474
|
*/
|
|
11187
11475
|
abstract getSubscribeUserStatus(subscribeType: SubscribeType, userIds: string[]): Promise<IAsyncRes<ISubscribeUserStatusInfo[]>>;
|
|
11188
|
-
abstract updateMyUserProfile(profile: IUserProfileInfo): Promise<IAsyncRes<
|
|
11189
|
-
errorKey: string;
|
|
11190
|
-
}>>;
|
|
11476
|
+
abstract updateMyUserProfile(profile: IUserProfileInfo): Promise<IAsyncRes<IUpdateMyProfileFail>>;
|
|
11191
11477
|
abstract getUserProfiles(userIds: string[]): Promise<IAsyncRes<IUserProfileInfo[]>>;
|
|
11192
11478
|
abstract getMyUserProfile(): Promise<IAsyncRes<IUserProfileInfo>>;
|
|
11193
11479
|
abstract updateMyUserProfileVisibility(visibility: UserProfileVisibility): Promise<IAsyncRes>;
|
|
@@ -11204,10 +11490,10 @@ declare abstract class AEngine {
|
|
|
11204
11490
|
abstract getConversations(conversations: IConversationOption[]): Promise<IAsyncRes<IReceivedConversation[]>>;
|
|
11205
11491
|
abstract createGroup(groupId: string, baseInfo: IServerGroupBaseInfo, extProfile: {
|
|
11206
11492
|
[key: string]: string;
|
|
11207
|
-
} | undefined, inviteeUserIds: string[]): Promise<IAsyncRes<
|
|
11493
|
+
} | undefined, inviteeUserIds: string[]): Promise<IAsyncRes<ICreateGroupFail>>;
|
|
11208
11494
|
abstract updateGroupInfo(groupId: string, baseInfo: IServerGroupBaseInfo, extProfile: {
|
|
11209
11495
|
[key: string]: string;
|
|
11210
|
-
} | undefined): Promise<IAsyncRes<
|
|
11496
|
+
} | undefined): Promise<IAsyncRes<IErrorKeys>>;
|
|
11211
11497
|
abstract getGroupsInfo(groupIds: string[]): Promise<IAsyncRes<IGroupInfo[]>>;
|
|
11212
11498
|
abstract kickGroupMembers(groupId: string, userIds: string[], config: IQuitGroupConfig): Promise<IAsyncRes<void>>;
|
|
11213
11499
|
abstract quitGroup(groupId: string, config: IQuitGroupConfig): Promise<IAsyncRes<void>>;
|
|
@@ -11216,7 +11502,7 @@ declare abstract class AEngine {
|
|
|
11216
11502
|
abstract setGroupManagers(type: GroupOperationType, groupId: string, userIds: string[]): Promise<IAsyncRes<void>>;
|
|
11217
11503
|
abstract getGroupMembersByRole(groupId: string, role: GroupMemberRole, option: IPagingQueryOption): Promise<IAsyncRes<IPagingQueryResult<IGroupMemberInfo>>>;
|
|
11218
11504
|
abstract getGroupMembers(groupId: string, userIds: string[]): Promise<IAsyncRes<IGroupMemberInfo[]>>;
|
|
11219
|
-
abstract setGroupMemberInfo(groupId: string, userId: string, nickname: string, extra?: string): Promise<IAsyncRes<
|
|
11505
|
+
abstract setGroupMemberInfo(groupId: string, userId: string, nickname: string, extra?: string): Promise<IAsyncRes<IErrorKeys>>;
|
|
11220
11506
|
abstract searchGroupMembers(groupId: string, nickName: string, option: IPagingQueryOption): Promise<IAsyncRes<IPagingQueryResult<IGroupMemberInfo>>>;
|
|
11221
11507
|
abstract joinGroup(groupId: string): Promise<IAsyncRes<IProcessCode>>;
|
|
11222
11508
|
abstract inviteUsersToGroup(groupId: string, userIds: string[]): Promise<IAsyncRes<IProcessCode>>;
|
|
@@ -11241,7 +11527,7 @@ declare abstract class AEngine {
|
|
|
11241
11527
|
abstract refuseFriendApplication(userId: string, reason: string): Promise<IAsyncRes<void>>;
|
|
11242
11528
|
abstract setFriendInfo(userId: string, remark: string, extProfile: {
|
|
11243
11529
|
[key: string]: string;
|
|
11244
|
-
}): Promise<IAsyncRes<
|
|
11530
|
+
}): Promise<IAsyncRes<IErrorKeys>>;
|
|
11245
11531
|
abstract checkFriends(userIds: string[], directionType: DirectionType): Promise<IAsyncRes<IFriendRelationInfo[]>>;
|
|
11246
11532
|
abstract getFriends(directionType: QueryFriendsDirectionType, option: IPagingQueryOption | undefined): Promise<IAsyncRes<IPagingQueryResult<IFriendInfo>>>;
|
|
11247
11533
|
abstract getFriendApplications(option: IPagingQueryOption, type?: FriendApplicationType[], status?: FriendApplicationStatus[]): Promise<IAsyncRes<IPagingQueryResult<IFriendApplicationInfo>>>;
|
|
@@ -11519,11 +11805,11 @@ declare const isValidConversation: (conversation: any, conversationTypeList?: Co
|
|
|
11519
11805
|
};
|
|
11520
11806
|
|
|
11521
11807
|
/**
|
|
11522
|
-
* @deprecated
|
|
11808
|
+
* @deprecated 使用 UUId.gen() 替代
|
|
11523
11809
|
*/
|
|
11524
11810
|
declare const getUUID: () => string;
|
|
11525
11811
|
/**
|
|
11526
|
-
* @deprecated
|
|
11812
|
+
* @deprecated 使用 UUId.genWithLen(22) 替代
|
|
11527
11813
|
*/
|
|
11528
11814
|
declare const getUUID22: () => string;
|
|
11529
11815
|
|
|
@@ -11550,4 +11836,4 @@ declare class AppStorage {
|
|
|
11550
11836
|
}): void;
|
|
11551
11837
|
}
|
|
11552
11838
|
|
|
11553
|
-
export { AEngine, APIContext, AbsCodec, AppStorage, AreaCode, AssertRules, BasicLogger, ChatroomEntryType, ChatroomSyncStatusReason, ChatroomUserChangeType, ChrmMemBanType, ChrmMemOperateType, ChrmSyncStatus, Codec, CodecPBMaps, ConnectionStatus, ConversationType, DirectionType, EnableLogL, ErrorCode, EventEmitter, FileType, FriendAddPermission, FriendApplicationStatus, FriendApplicationType, FriendRelationType, GroupApplicationDirection, GroupApplicationStatus, GroupApplicationType, GroupInviteHandlePermission, GroupJoinPermission, GroupMemberInfoEditPermission, GroupMemberRole, GroupOperation, GroupOperationPermission, GroupOperationRole, GroupOperationStatus, GroupOperationType, HttpMethod, IAPIContextOption, IAndroidPushConfig, IAsyncRes, IBaseConversationInfo, IBlockedMessageInfo, IChannelAndUserGroupChangeData, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomInfo, IChatroomJoinResponse, IChatroomListener, IChatroomListenerData, IChatroomModule, IChatroomNotifyBan, IChatroomNotifyBlock, IChatroomNotifyMultiLoginSync, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomUser, IChatroomUserChangeInfo, IChrmKVEntries, IChrmKVEntry, IClearMessageOption, ICombineV2MessageContent, ICombinedMessage, IConnectionStatusListener, IConversationIdentifier, IConversationOption, IConversationState, IConversationStateListener, IConversationTag, IConversationTagListener, IConversationUnreadCount, IDeletedExpansion, IDeliveredUser, IDownloadAuth, IEngine, IEngineWatcher, IEventListener, IExpansionListener, IExpansionListenerData, IExtraMethod, IFirstUnreadMessageInfo, IFollowsInfo, IFriendAdd, IFriendApplicationInfo, IFriendApplicationStatusChange, IFriendDelete, IFriendInfo, IFriendInfoChangedSync, IFriendRelationInfo, IGetMsgOption, IGetUltraGroupListOption, IGooglePushConfig, IGroupApplicationInfo, IGroupFollowsChangedSync, IGroupFollowsList, IGroupFollowsUserInfo, IGroupInfo, IGroupInfoChanged, IGroupInfoOption, IGroupMemberInfo, IGroupMemberInfoChanged, IGroupMembers, IGroupMessageDeliverInfo, IGroupMessageDeliverStatus, IGroupMessageDeliveredStatusInfo, IGroupOperationInfo, IGroupReadReceiptData, IGroupRemarkChangedSync, IHarmonyOSPushConfig, IInsertMessage, IInsertMsgOptions, ILocalTagStatus, ILogData, ILogger, IMessageDeliver, IMessageDeliveredListener, IMessageListnenr, IMessageReadReceiptV4Response, IMessageReader, IMessageReaderResponse, INaviInfo, INetwork, INotificationQuietHoursSetting, IOSInfo, IOperateInfo, IOperateStatusNotify, IOperateSummary, IPagingQueryOption, IPagingQueryResult, IPluginGenerator, IPrivateReadReceiptData, IProcessCache, IProcessCode, IProcessInfo, IPromiseResult, IProxy, IPushConfig, IQuitGroupConfig, IRTCInnerListener, IRTCJoinedInfo, IRTCRoomBindOption, IRTCUsers, IReadReceiptData, IReadReceiptInfo, IReadReceiptResponseInfo, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IReceivedStatusInfo, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IRequest, IResponse, IRuntime, ISendMsgOptions, IServerConversationStatus, IServerGroupBaseInfo, IServerUserSetting, ISetConversationStatusOptions, IStorage, ISubscribeRelationInfo, ISubscribeStatusDetail, ISubscribeUserStatusInfo, ISyncReadStatusData, ITagInfo, ITagListener, ITagParam, ITypingMessage, ITypingUser, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUltraExMsgOptions, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadInfo, IUltraGroupUnreadMentionedOption, IUltraModifyMsgOptions, IUltraMsgQueryOptions, IUltraUnreadMsg, IUpdateItem, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserGroupChangeData, IUserGroupStatusInfo, IUserProfile, IUserProfileInfo, IWatcher, IiOSPushConfig, InnerRTCKeyMaps, InterruptionLevel, ItypingStateListener, KVString, LogL, LogLevel, LogSource, LogTagId, LogType, MAX_MESSAGE_CONTENT_BYTES, MAX_UPLOAD_FILE_SIZE, MentionedInfoBody, MentionedType, MessageBlockSourceType, MessageBlockType, MessageDirection, MessageType, NotificationLevel, NotificationStatus, OnlineStatus, OperateStatus, Codec$1 as PBCodec, PlatformInfo, PluginContext, PushImportanceHonor, PushNotificationQuietHoursLevel, QueryFriendsDirectionType, RCConnectionStatus, RCResult, RTCApiType, RTCJoinType, RTCMode, RTCPluginContext, ReceivedStatus, SEND_MESSAGE_TYPE_OPTION, SentStatus, SubscribeOperationType, SubscribeType, SuspendablePromise, UPLOAD_FILE_CHUNK_SIZE, UUId, UltraGroupChannelChangeType, UltraGroupChannelType, UploadMethod, UserProfileVisibility, Validator, ValidatorManage, VersionManage, assert, fail, fixUrlProtocol, forEach, getUUID, getUUID22, httpRequest, isArray, isBoolean, isFunction, isHttpUrl, isInteger, isLimitedArray, isLimitedString, isNull, isNumber, isObject, isString, isUndefined, isValidConversation, isValidConversationType, isValidEnum, isValidFileType, isValidGroupId, isValidNotificationLevel, isValidTargetId, logger, map, notEmptyArray, notEmptyObject, notEmptyString, ok, runtime, transformReceivedStatusFlag, transformReceivedStatusInfo,
|
|
11839
|
+
export { AEngine, APIContext, AbsCodec, AppStorage, AreaCode, AssertRules, BasicLogger, ChatroomEntryType, ChatroomSyncStatusReason, ChatroomUserChangeType, ChrmMemBanType, ChrmMemOperateType, ChrmSyncStatus, Codec, CodecPBMaps, ConnectionStatus, ConversationType, DirectionType, EnableLogL, ErrorCode, EventEmitter, FileType, FriendAddPermission, FriendApplicationStatus, FriendApplicationType, FriendRelationType, GroupApplicationDirection, GroupApplicationStatus, GroupApplicationType, GroupInviteHandlePermission, GroupJoinPermission, GroupMemberInfoEditPermission, GroupMemberRole, GroupOperation, GroupOperationPermission, GroupOperationRole, GroupOperationStatus, GroupOperationType, HttpMethod, IAPIContextOption, IAndroidPushConfig, IAsyncRes, IBaseConversationInfo, IBlockedMessageInfo, IChannelAndUserGroupChangeData, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomInfo, IChatroomJoinResponse, IChatroomListener, IChatroomListenerData, IChatroomModule, IChatroomNotifyBan, IChatroomNotifyBlock, IChatroomNotifyMultiLoginSync, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomUser, IChatroomUserChangeInfo, IChrmKVEntries, IChrmKVEntry, IClearMessageOption, ICombineV2MessageContent, ICombinedMessage, IConnectionStatusListener, IConversationIdentifier, IConversationOption, IConversationState, IConversationStateListener, IConversationTag, IConversationTagListener, IConversationUnreadCount, ICreateGroupFail, IDeletedExpansion, IDeliveredUser, IDownloadAuth, IEngine, IEngineWatcher, IErrorKeys, IEventListener, IExpansionListener, IExpansionListenerData, IExtraMethod, IFirstUnreadMessageInfo, IFollowsInfo, IFriendAdd, IFriendApplicationInfo, IFriendApplicationStatusChange, IFriendDelete, IFriendInfo, IFriendInfoChangedSync, IFriendRelationInfo, IGetMsgOption, IGetUltraGroupListOption, IGooglePushConfig, IGroupApplicationInfo, IGroupFollowsChangedSync, IGroupFollowsList, IGroupFollowsUserInfo, IGroupInfo, IGroupInfoChanged, IGroupInfoOption, IGroupMemberInfo, IGroupMemberInfoChanged, IGroupMembers, IGroupMessageDeliverInfo, IGroupMessageDeliverStatus, IGroupMessageDeliveredStatusInfo, IGroupOperationInfo, IGroupReadReceiptData, IGroupRemarkChangedSync, IHarmonyOSPushConfig, IInsertMessage, IInsertMsgOptions, ILocalTagStatus, ILogData, ILogger, IMessageDeliver, IMessageDeliveredListener, IMessageListnenr, IMessageReadReceiptV4Response, IMessageReader, IMessageReaderResponse, INaviInfo, INetwork, INotificationQuietHoursSetting, IOSInfo, IOperateInfo, IOperateStatusNotify, IOperateSummary, IPagingQueryOption, IPagingQueryResult, IPluginGenerator, IPrivateReadReceiptData, IProcessCache, IProcessCode, IProcessInfo, IPromiseResult, IProxy, IPushConfig, IQuitGroupConfig, IRTCInnerListener, IRTCJoinedInfo, IRTCRoomBindOption, IRTCUsers, IReadReceiptData, IReadReceiptInfo, IReadReceiptResponseInfo, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IReceivedStatusInfo, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IRequest, IResponse, IRuntime, ISendMsgOptions, IServerConversationStatus, IServerGroupBaseInfo, IServerUserSetting, ISetConversationStatusOptions, IStorage, IStreamMessageResponseChunkData, IStreamMessageResponseEventData, ISubscribeRelationInfo, ISubscribeStatusDetail, ISubscribeUserStatusInfo, ISyncReadStatusData, ITagInfo, ITagListener, ITagParam, ITypingMessage, ITypingUser, IUltraChannelChangeInfo, IUltraChannelDeleteInfo, IUltraChannelUserKickedInfo, IUltraExMsgOptions, IUltraGroupConversation, IUltraGroupOption, IUltraGroupUnreadInfo, IUltraGroupUnreadMentionedOption, IUltraModifyMsgOptions, IUltraMsgQueryOptions, IUltraUnreadMsg, IUpdateItem, IUpdateMyProfileFail, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserGroupChangeData, IUserGroupStatusInfo, IUserProfile, IUserProfileInfo, IWatcher, IiOSPushConfig, InnerRTCKeyMaps, InterruptionLevel, ItypingStateListener, KVString, LogL, LogLevel, LogSource, LogTagId, LogType, MAX_MESSAGE_CONTENT_BYTES, MAX_UPLOAD_FILE_SIZE, MentionedInfoBody, MentionedType, MessageBlockSourceType, MessageBlockType, MessageDirection, MessageType, NotificationLevel, NotificationStatus, OnlineStatus, OperateStatus, Codec$1 as PBCodec, PlatformInfo, PluginContext, PushImportanceHonor, PushNotificationQuietHoursLevel, QueryFriendsDirectionType, RCConnectionStatus, RCResult, RTCApiType, RTCJoinType, RTCMode, RTCPluginContext, ReceivedStatus, SEND_MESSAGE_TYPE_OPTION, SSEModule, SentStatus, StreamMessageResponseEventType, SubscribeOperationType, SubscribeType, SuspendablePromise, UPLOAD_FILE_CHUNK_SIZE, UUId, UltraGroupChannelChangeType, UltraGroupChannelType, UploadMethod, UserProfileVisibility, Validator, ValidatorManage, VersionManage, assert, fail, fixUrlProtocol, forEach, getUUID, getUUID22, httpRequest, isArray, isBoolean, isFunction, isHttpUrl, isInteger, isLimitedArray, isLimitedString, isNull, isNumber, isObject, isString, isUndefined, isValidConversation, isValidConversationType, isValidEnum, isValidFileType, isValidGroupId, isValidNotificationLevel, isValidTargetId, logger, map, notEmptyArray, notEmptyObject, notEmptyString, ok, runtime, transformReceivedStatusFlag, transformReceivedStatusInfo, usingCppEngine, validate };
|