@rongcloud/engine 5.3.4 → 5.4.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.d.ts +2032 -1865
- package/index.esm.js +1 -18
- package/index.js +1 -18
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -365,117 +365,34 @@ declare enum OperateStatus {
|
|
|
365
365
|
typing = 0
|
|
366
366
|
}
|
|
367
367
|
|
|
368
|
-
interface IConversationOption {
|
|
369
|
-
conversationType: ConversationType;
|
|
370
|
-
targetId: string;
|
|
371
|
-
channelId?: string;
|
|
372
|
-
}
|
|
373
|
-
interface IServerRTCRoomEntry {
|
|
374
|
-
key: string;
|
|
375
|
-
value: string;
|
|
376
|
-
status: number;
|
|
377
|
-
timestamp: number;
|
|
378
|
-
uid: string;
|
|
379
|
-
}
|
|
380
|
-
interface IChrmKVEntry {
|
|
381
|
-
key: string;
|
|
382
|
-
value?: string;
|
|
383
|
-
isSendNotification?: boolean;
|
|
384
|
-
notificationExtra?: string;
|
|
385
|
-
isOverwrite?: boolean;
|
|
386
|
-
isAutoDelete?: boolean;
|
|
387
|
-
timestamp?: number;
|
|
388
|
-
userId?: string;
|
|
389
|
-
type?: number;
|
|
390
|
-
isDeleted?: boolean;
|
|
391
|
-
version?: number;
|
|
392
|
-
}
|
|
393
|
-
interface IChrmKVEntries {
|
|
394
|
-
entries: {
|
|
395
|
-
key: string;
|
|
396
|
-
value?: string;
|
|
397
|
-
timestamp?: number;
|
|
398
|
-
version?: number;
|
|
399
|
-
}[];
|
|
400
|
-
notificationExtra?: string;
|
|
401
|
-
isOverwrite?: boolean;
|
|
402
|
-
isAutoDelete?: boolean;
|
|
403
|
-
timestamp?: number;
|
|
404
|
-
userId?: string;
|
|
405
|
-
type?: number;
|
|
406
|
-
isDeleted?: boolean;
|
|
407
|
-
}
|
|
408
|
-
interface IServerConversationStatus {
|
|
409
|
-
conversationType: number;
|
|
410
|
-
targetId: string;
|
|
411
|
-
updatedTime?: number;
|
|
412
|
-
notificationStatus?: number;
|
|
413
|
-
notificationLevel?: number;
|
|
414
|
-
isTop?: boolean;
|
|
415
|
-
type?: number;
|
|
416
|
-
tags?: IConversationTag[];
|
|
417
|
-
channelId?: string;
|
|
418
|
-
}
|
|
419
|
-
interface IUserSettingItem {
|
|
420
|
-
targetId: number;
|
|
421
|
-
type: number;
|
|
422
|
-
key: string;
|
|
423
|
-
value: any;
|
|
424
|
-
version: number;
|
|
425
|
-
status: number;
|
|
426
|
-
tags: IConversationTag[];
|
|
427
|
-
}
|
|
428
|
-
interface IServerUserSetting {
|
|
429
|
-
settings: {
|
|
430
|
-
[key: string]: IUserSettingItem;
|
|
431
|
-
};
|
|
432
|
-
version: number;
|
|
433
|
-
}
|
|
434
|
-
interface ISyncMsgArgs {
|
|
435
|
-
inboxTime: number;
|
|
436
|
-
sendboxTime: number;
|
|
437
|
-
broadcastSyncTime?: number;
|
|
438
|
-
}
|
|
439
|
-
interface IGetMsgOption {
|
|
440
|
-
timestamp?: number;
|
|
441
|
-
count?: number;
|
|
442
|
-
order?: number;
|
|
443
|
-
channelId?: string;
|
|
444
|
-
}
|
|
445
|
-
interface IGetConversationListOption {
|
|
446
|
-
type?: number;
|
|
447
|
-
count?: number;
|
|
448
|
-
startTime?: number;
|
|
449
|
-
order?: 0 | 1;
|
|
450
|
-
}
|
|
451
|
-
interface IClearMsgOption {
|
|
452
|
-
timestamp?: number;
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
/**
|
|
456
|
-
* 聊天室 kv 存储操作类型. 对方操作, 己方收到消息(RC:chrmKVNotiMsg)中会带入此值. 根据此值判断是删除还是更新
|
|
457
|
-
*/
|
|
458
|
-
declare enum ChatroomEntryType {
|
|
459
|
-
UPDATE = 1,
|
|
460
|
-
DELETE = 2
|
|
461
|
-
}
|
|
462
|
-
|
|
463
368
|
/**
|
|
464
|
-
*
|
|
369
|
+
* 文件类型
|
|
465
370
|
*/
|
|
466
|
-
declare enum
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
371
|
+
declare enum FileType {
|
|
372
|
+
/**
|
|
373
|
+
* 图片文件
|
|
374
|
+
*/
|
|
375
|
+
IMAGE = 1,
|
|
376
|
+
/**
|
|
377
|
+
* 声音文件
|
|
378
|
+
*/
|
|
379
|
+
AUDIO = 2,
|
|
380
|
+
/**
|
|
381
|
+
* 视频文件
|
|
382
|
+
*/
|
|
383
|
+
VIDEO = 3,
|
|
384
|
+
/**
|
|
385
|
+
* 非媒体文件
|
|
386
|
+
*/
|
|
387
|
+
FILE = 4,
|
|
388
|
+
/**
|
|
389
|
+
* 小视频类型
|
|
473
390
|
*/
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
391
|
+
SIGHT = 5,
|
|
392
|
+
/**
|
|
393
|
+
* 合并转发
|
|
477
394
|
*/
|
|
478
|
-
|
|
395
|
+
COMBINE_HTML = 6
|
|
479
396
|
}
|
|
480
397
|
|
|
481
398
|
declare enum MessageDirection {
|
|
@@ -489,1148 +406,850 @@ declare enum MessageDirection {
|
|
|
489
406
|
RECEIVE = 2
|
|
490
407
|
}
|
|
491
408
|
|
|
492
|
-
|
|
409
|
+
/**
|
|
410
|
+
* IM 错误码范围段
|
|
411
|
+
* 2 开头为 IM Server 返回错误码
|
|
412
|
+
* 3 开头: 30000 到 33xxx 为协议栈错误码,34001 ~ 34999 为移动端自定错误码
|
|
413
|
+
* 备注:iOS 与 Android 错误码一致。Web 与移动端一致的错误码,也用此片段,比如 34008 (消息不支持扩展)
|
|
414
|
+
* 35001 ~ 39999 为 Web 端错误码 备注:由于 Web IM 历史版本 35xxx 36xxx 37xxx 38xxx 39xxxx 都占用过,所以错误码段范围较大
|
|
415
|
+
*/
|
|
416
|
+
declare enum ErrorCode {
|
|
417
|
+
/** 超时 */
|
|
418
|
+
TIMEOUT = -1,
|
|
493
419
|
/**
|
|
494
|
-
*
|
|
420
|
+
* 未知原因失败。
|
|
495
421
|
*/
|
|
496
|
-
|
|
422
|
+
UNKNOWN = -2,
|
|
423
|
+
/** 参数错误 */
|
|
424
|
+
PARAMETER_ERROR = -3,
|
|
425
|
+
/** 未实现的方法定义,在应用层调用 callExtra 传入无法识别的方法名时抛出 */
|
|
426
|
+
EXTRA_METHOD_UNDEFINED = -4,
|
|
427
|
+
/** 主进程内方法错误 */
|
|
428
|
+
MAIN_PROCESS_ERROR = -5,
|
|
497
429
|
/**
|
|
498
|
-
*
|
|
430
|
+
* 参数变更
|
|
499
431
|
*/
|
|
500
|
-
|
|
432
|
+
PARAMETER_CHANGED = -6,
|
|
501
433
|
/**
|
|
502
|
-
|
|
434
|
+
* 成功
|
|
503
435
|
*/
|
|
504
|
-
|
|
505
|
-
}
|
|
506
|
-
interface IiOSPushConfig {
|
|
436
|
+
SUCCESS = 0,
|
|
507
437
|
/**
|
|
508
|
-
*
|
|
438
|
+
* 群组 Id 无效
|
|
509
439
|
*/
|
|
510
|
-
|
|
440
|
+
RC_DISCUSSION_GROUP_ID_INVALID = 20407,
|
|
511
441
|
/**
|
|
512
|
-
*
|
|
442
|
+
* 发送频率过快
|
|
513
443
|
*/
|
|
514
|
-
|
|
444
|
+
SEND_FREQUENCY_TOO_FAST = 20604,
|
|
515
445
|
/**
|
|
516
|
-
*
|
|
446
|
+
* 不在讨论组。
|
|
517
447
|
*/
|
|
518
|
-
|
|
448
|
+
NOT_IN_DISCUSSION = 21406,
|
|
519
449
|
/**
|
|
520
|
-
*
|
|
450
|
+
* 群组被禁言
|
|
521
451
|
*/
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
interface IAndroidPushConfig {
|
|
452
|
+
FORBIDDEN_IN_GROUP = 22408,
|
|
453
|
+
RECALL_MESSAGE = 25101,
|
|
525
454
|
/**
|
|
526
|
-
*
|
|
455
|
+
* 不在群组。
|
|
527
456
|
*/
|
|
528
|
-
|
|
457
|
+
NOT_IN_GROUP = 22406,
|
|
529
458
|
/**
|
|
530
|
-
*
|
|
459
|
+
* 不在聊天室。
|
|
531
460
|
*/
|
|
532
|
-
|
|
461
|
+
NOT_IN_CHATROOM = 23406,
|
|
533
462
|
/**
|
|
534
|
-
|
|
463
|
+
*聊天室被禁言
|
|
535
464
|
*/
|
|
536
|
-
|
|
465
|
+
FORBIDDEN_IN_CHATROOM = 23408,
|
|
537
466
|
/**
|
|
538
|
-
*
|
|
467
|
+
* 聊天室中成员被踢出
|
|
539
468
|
*/
|
|
540
|
-
|
|
469
|
+
RC_CHATROOM_USER_KICKED = 23409,
|
|
541
470
|
/**
|
|
542
|
-
*
|
|
471
|
+
* 聊天室不存在
|
|
543
472
|
*/
|
|
544
|
-
|
|
473
|
+
RC_CHATROOM_NOT_EXIST = 23410,
|
|
545
474
|
/**
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
}
|
|
550
|
-
interface IPushConfig {
|
|
475
|
+
* 聊天室成员已满
|
|
476
|
+
*/
|
|
477
|
+
RC_CHATROOM_IS_FULL = 23411,
|
|
551
478
|
/**
|
|
552
|
-
*
|
|
553
|
-
* 如果没有设置,会使用下面的默认标题显示规则
|
|
554
|
-
* 默认标题显示规则:
|
|
555
|
-
* 内置消息:单聊通知标题显示为发送者名称,群聊通知标题显示为群名称。
|
|
556
|
-
* 自定义消息:默认不显示标题。
|
|
479
|
+
* 获取聊天室信息参数无效
|
|
557
480
|
*/
|
|
558
|
-
|
|
481
|
+
RC_CHATROOM_PATAMETER_INVALID = 23412,
|
|
559
482
|
/**
|
|
560
|
-
*
|
|
561
|
-
* 优先使用 IPushConfig.pushContent, 如果没有,则使用发送消息的 pushContent 参数
|
|
483
|
+
* 聊天室异常
|
|
562
484
|
*/
|
|
563
|
-
|
|
485
|
+
CHATROOM_GET_HISTORYMSG_ERROR = 23413,
|
|
564
486
|
/**
|
|
565
|
-
*
|
|
566
|
-
* 优先使用 IPushConfig.pushData, 如果没有,则使用发送消息的 pushContent 参数
|
|
487
|
+
* 没有打开聊天室消息存储
|
|
567
488
|
*/
|
|
568
|
-
|
|
489
|
+
CHATROOM_NOT_OPEN_HISTORYMSG_STORE = 23414,
|
|
569
490
|
/**
|
|
570
|
-
*
|
|
491
|
+
* 聊天室 KV 设置超出最大值(已满, 默认最多设置 100 个)
|
|
571
492
|
*/
|
|
572
|
-
|
|
493
|
+
CHATROOM_KV_EXCEED = 23423,
|
|
573
494
|
/**
|
|
574
|
-
*
|
|
495
|
+
* 聊天室 KV 设置失败(kv 已存在, 需覆盖设置)
|
|
575
496
|
*/
|
|
576
|
-
|
|
497
|
+
CHATROOM_KV_OVERWRITE_INVALID = 23424,
|
|
577
498
|
/**
|
|
578
|
-
*
|
|
499
|
+
* 聊天室 KV 存储功能没有开通
|
|
579
500
|
*/
|
|
580
|
-
|
|
501
|
+
CHATROOM_KV_STORE_NOT_OPEN = 23426,
|
|
581
502
|
/**
|
|
582
|
-
*
|
|
503
|
+
* 聊天室Key不存在
|
|
583
504
|
*/
|
|
584
|
-
|
|
505
|
+
CHATROOM_KEY_NOT_EXIST = 23427,
|
|
506
|
+
CHATROOM_KV_SET_ERROR = 23431,
|
|
585
507
|
/**
|
|
586
|
-
*
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
/**
|
|
592
|
-
* 已读回执数据结构
|
|
593
|
-
*/
|
|
594
|
-
interface IMessageReader {
|
|
595
|
-
readTime: number;
|
|
596
|
-
userId: string;
|
|
597
|
-
}
|
|
598
|
-
interface IMessageReaderResponse {
|
|
599
|
-
totalMemberCount: number;
|
|
600
|
-
list: IMessageReader[];
|
|
601
|
-
}
|
|
602
|
-
interface ILocalReadReceiptInfo {
|
|
603
|
-
hasRespond?: boolean;
|
|
604
|
-
readerInfo?: {
|
|
605
|
-
[userId: string]: number;
|
|
606
|
-
};
|
|
607
|
-
readCount?: number;
|
|
608
|
-
totalCount?: number;
|
|
609
|
-
}
|
|
610
|
-
interface IReadReceiptInfo {
|
|
508
|
+
* 敏感词屏蔽
|
|
509
|
+
*/
|
|
510
|
+
SENSITIVE_SHIELD = 21501,
|
|
611
511
|
/**
|
|
612
|
-
*
|
|
512
|
+
* 消息中含敏感词且敏感词已被替换
|
|
613
513
|
*/
|
|
614
|
-
|
|
514
|
+
SENSITIVE_REPLACE = 21502,
|
|
615
515
|
/**
|
|
616
|
-
*
|
|
516
|
+
* 加入讨论失败
|
|
617
517
|
*/
|
|
618
|
-
|
|
518
|
+
JOIN_IN_DISCUSSION = 21407,
|
|
619
519
|
/**
|
|
620
|
-
*
|
|
520
|
+
* 创建讨论组失败
|
|
621
521
|
*/
|
|
622
|
-
|
|
522
|
+
CREATE_DISCUSSION = 21408,
|
|
623
523
|
/**
|
|
624
|
-
*
|
|
524
|
+
* 设置讨论组邀请状态失败
|
|
625
525
|
*/
|
|
626
|
-
|
|
627
|
-
}
|
|
628
|
-
/**
|
|
629
|
-
* 从服务端接收到的消息数据
|
|
630
|
-
*/
|
|
631
|
-
interface IReceivedMessage {
|
|
526
|
+
INVITE_DICUSSION = 21409,
|
|
632
527
|
/**
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
528
|
+
*获取用户失败
|
|
529
|
+
*/
|
|
530
|
+
GET_USERINFO_ERROR = 23407,
|
|
636
531
|
/**
|
|
637
|
-
*
|
|
638
|
-
* * 1: 单聊
|
|
639
|
-
* * 3: 群聊
|
|
640
|
-
* * 4: 聊天室
|
|
641
|
-
* * 5: 客服会话
|
|
642
|
-
* * 6: 系统消息
|
|
643
|
-
* * 7: 默认关注的公众号
|
|
644
|
-
* * 8: 手动关注的公众号
|
|
645
|
-
* * 9: RTCLib 房间
|
|
532
|
+
* 在黑名单中。
|
|
646
533
|
*/
|
|
647
|
-
|
|
534
|
+
REJECTED_BY_BLACKLIST = 405,
|
|
648
535
|
/**
|
|
649
|
-
*
|
|
536
|
+
* 通信过程中,当前 Socket 不存在。
|
|
650
537
|
*/
|
|
651
|
-
|
|
538
|
+
RC_NET_CHANNEL_INVALID = 30001,
|
|
652
539
|
/**
|
|
653
|
-
*
|
|
540
|
+
* Socket 连接不可用。
|
|
654
541
|
*/
|
|
655
|
-
|
|
542
|
+
RC_NET_UNAVAILABLE = 30002,
|
|
656
543
|
/**
|
|
657
|
-
*
|
|
544
|
+
* 通信超时。
|
|
658
545
|
*/
|
|
659
|
-
|
|
546
|
+
RC_MSG_RESP_TIMEOUT = 30003,
|
|
660
547
|
/**
|
|
661
|
-
*
|
|
662
|
-
* @example RC:TxtMsg
|
|
548
|
+
* 导航操作时,Http 请求失败。
|
|
663
549
|
*/
|
|
664
|
-
|
|
550
|
+
RC_HTTP_SEND_FAIL = 30004,
|
|
665
551
|
/**
|
|
666
|
-
*
|
|
552
|
+
* HTTP 请求失败。
|
|
667
553
|
*/
|
|
668
|
-
|
|
554
|
+
RC_HTTP_REQ_TIMEOUT = 30005,
|
|
669
555
|
/**
|
|
670
|
-
*
|
|
556
|
+
* HTTP 接收失败。
|
|
671
557
|
*/
|
|
672
|
-
|
|
558
|
+
RC_HTTP_RECV_FAIL = 30006,
|
|
673
559
|
/**
|
|
674
|
-
*
|
|
560
|
+
* 导航操作的 HTTP 请求,返回不是200。
|
|
675
561
|
*/
|
|
676
|
-
|
|
562
|
+
RC_NAVI_RESOURCE_ERROR = 30007,
|
|
677
563
|
/**
|
|
678
|
-
*
|
|
564
|
+
* 导航数据解析后,其中不存在有效数据。
|
|
679
565
|
*/
|
|
680
|
-
|
|
566
|
+
RC_NODE_NOT_FOUND = 30008,
|
|
681
567
|
/**
|
|
682
|
-
*
|
|
683
|
-
* @description 当 isOffLineMessage 为 true 时,该值无效
|
|
568
|
+
* 导航数据解析后,其中不存在有效 IP 地址。
|
|
684
569
|
*/
|
|
685
|
-
|
|
570
|
+
RC_DOMAIN_NOT_RESOLVE = 30009,
|
|
686
571
|
/**
|
|
687
|
-
*
|
|
688
|
-
* @default true
|
|
572
|
+
* 创建 Socket 失败。
|
|
689
573
|
*/
|
|
690
|
-
|
|
574
|
+
RC_SOCKET_NOT_CREATED = 30010,
|
|
691
575
|
/**
|
|
692
|
-
*
|
|
693
|
-
* @default true
|
|
576
|
+
* Socket 被断开。
|
|
694
577
|
*/
|
|
695
|
-
|
|
578
|
+
RC_SOCKET_DISCONNECTED = 30011,
|
|
696
579
|
/**
|
|
697
|
-
*
|
|
580
|
+
* PING 操作失败。
|
|
698
581
|
*/
|
|
699
|
-
|
|
582
|
+
RC_PING_SEND_FAIL = 30012,
|
|
700
583
|
/**
|
|
701
|
-
*
|
|
702
|
-
* @description 静默消息不会发送 Push 信息和本地通知提醒
|
|
584
|
+
* PING 超时。
|
|
703
585
|
*/
|
|
704
|
-
|
|
586
|
+
RC_PONG_RECV_FAIL = 30013,
|
|
705
587
|
/**
|
|
706
|
-
*
|
|
588
|
+
* 消息发送失败。
|
|
707
589
|
*/
|
|
708
|
-
|
|
590
|
+
RC_MSG_SEND_FAIL = 30014,
|
|
709
591
|
/**
|
|
710
|
-
*
|
|
711
|
-
|
|
712
|
-
|
|
592
|
+
* JSON 后的消息体超限, 目前最大 128kb
|
|
593
|
+
*/
|
|
594
|
+
RC_MSG_CONTENT_EXCEED_LIMIT = 30016,
|
|
713
595
|
/**
|
|
714
|
-
*
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
[key: string]: any;
|
|
718
|
-
} | null;
|
|
596
|
+
* 做 connect 连接时,收到的 ACK 超时。
|
|
597
|
+
*/
|
|
598
|
+
RC_CONN_ACK_TIMEOUT = 31000,
|
|
719
599
|
/**
|
|
720
|
-
*
|
|
721
|
-
|
|
722
|
-
|
|
600
|
+
* 参数错误。
|
|
601
|
+
*/
|
|
602
|
+
RC_CONN_PROTO_VERSION_ERROR = 31001,
|
|
723
603
|
/**
|
|
724
|
-
*
|
|
725
|
-
|
|
726
|
-
|
|
604
|
+
* 参数错误,App Id 错误。
|
|
605
|
+
*/
|
|
606
|
+
RC_CONN_ID_REJECT = 31002,
|
|
727
607
|
/**
|
|
728
|
-
*
|
|
729
|
-
|
|
730
|
-
|
|
608
|
+
* 服务器不可用。
|
|
609
|
+
*/
|
|
610
|
+
RC_CONN_SERVER_UNAVAILABLE = 31003,
|
|
731
611
|
/**
|
|
732
|
-
*
|
|
612
|
+
* Token 错误。
|
|
733
613
|
*/
|
|
734
|
-
|
|
614
|
+
RC_CONN_USER_OR_PASSWD_ERROR = 31004,
|
|
735
615
|
/**
|
|
736
|
-
*
|
|
616
|
+
* websocket 鉴权失败,通常为连接后未及时发送 Ping 或接收到 Pong
|
|
737
617
|
*/
|
|
738
|
-
|
|
618
|
+
RC_CONN_NOT_AUTHRORIZED = 31005,
|
|
739
619
|
/**
|
|
740
|
-
*
|
|
620
|
+
* 重定向,地址错误。
|
|
741
621
|
*/
|
|
742
|
-
|
|
622
|
+
RC_CONN_REDIRECTED = 31006,
|
|
743
623
|
/**
|
|
744
|
-
*
|
|
624
|
+
* NAME 与后台注册信息不一致。
|
|
745
625
|
*/
|
|
746
|
-
|
|
747
|
-
}
|
|
748
|
-
interface IUserProfile {
|
|
626
|
+
RC_CONN_PACKAGE_NAME_INVALID = 31007,
|
|
749
627
|
/**
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
628
|
+
* APP 被屏蔽、删除或不存在。
|
|
629
|
+
*/
|
|
630
|
+
RC_CONN_APP_BLOCKED_OR_DELETED = 31008,
|
|
753
631
|
/**
|
|
754
|
-
*
|
|
632
|
+
* 用户被屏蔽。
|
|
755
633
|
*/
|
|
756
|
-
|
|
634
|
+
RC_CONN_USER_BLOCKED = 31009,
|
|
757
635
|
/**
|
|
758
|
-
*
|
|
759
|
-
* @deprecated
|
|
636
|
+
* Disconnect,由服务器返回,比如用户互踢。
|
|
760
637
|
*/
|
|
761
|
-
|
|
638
|
+
RC_DISCONN_KICK = 31010,
|
|
762
639
|
/**
|
|
763
|
-
*
|
|
640
|
+
* Disconnect,由服务器返回,比如用户互踢。
|
|
764
641
|
*/
|
|
765
|
-
|
|
642
|
+
RC_DISCONN_EXCEPTION = 31011,
|
|
766
643
|
/**
|
|
767
|
-
*
|
|
644
|
+
* 开启禁止把已在线客户端踢下线开关后,该错误码标识已有同类型端在线,禁止链接;
|
|
768
645
|
*/
|
|
769
|
-
|
|
770
|
-
}
|
|
771
|
-
interface IOperateInfo {
|
|
772
|
-
targetId: string;
|
|
773
|
-
channelId?: string;
|
|
774
|
-
userId: string;
|
|
775
|
-
operationType: OperateStatus;
|
|
776
|
-
operationTime?: number;
|
|
777
|
-
}
|
|
778
|
-
interface IOperateSummary {
|
|
779
|
-
targetId: string;
|
|
780
|
-
channelId?: string;
|
|
781
|
-
count: number;
|
|
782
|
-
operationType: OperateStatus;
|
|
783
|
-
}
|
|
784
|
-
interface IOperateStatusNotify {
|
|
785
|
-
conversationType: ConversationType;
|
|
786
|
-
hasInfo: boolean;
|
|
787
|
-
hasSummary: boolean;
|
|
788
|
-
info: IOperateInfo[];
|
|
789
|
-
summary: IOperateSummary[];
|
|
790
|
-
}
|
|
791
|
-
interface IRecallMsgOptions {
|
|
646
|
+
RC_DISCONN_SAME_CLIENT_ON_LINE = 31023,
|
|
792
647
|
/**
|
|
793
|
-
*
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
channelId: string;
|
|
648
|
+
* app 验证Token 验证不通过。所有内部超时,访问失败,返回给客户端sdk都是验证不通过,由服务端日志去看具体是那种失败。
|
|
649
|
+
*/
|
|
650
|
+
RC_APP_AUTH_NOT_PASS = 31026,
|
|
797
651
|
/**
|
|
798
|
-
*
|
|
799
|
-
|
|
800
|
-
|
|
652
|
+
* One Time Password 已经被使用过
|
|
653
|
+
*/
|
|
654
|
+
RC_OTP_USED = 31027,
|
|
801
655
|
/**
|
|
802
|
-
*
|
|
803
|
-
|
|
804
|
-
|
|
656
|
+
* token平台验证失败
|
|
657
|
+
*/
|
|
658
|
+
RC_PLATFORM_ERROR = 31028,
|
|
805
659
|
/**
|
|
806
|
-
*
|
|
807
|
-
|
|
808
|
-
|
|
660
|
+
* 协议层内部错误。query,上传下载过程中数据错误。
|
|
661
|
+
*/
|
|
662
|
+
RC_QUERY_ACK_NO_DATA = 32001,
|
|
809
663
|
/**
|
|
810
|
-
*
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
*/
|
|
814
|
-
disableNotification?: boolean;
|
|
664
|
+
* 协议层内部错误。
|
|
665
|
+
*/
|
|
666
|
+
RC_MSG_DATA_INCOMPLETE = 32002,
|
|
815
667
|
/**
|
|
816
|
-
*
|
|
817
|
-
|
|
818
|
-
|
|
668
|
+
* 未调用 init 初始化函数。
|
|
669
|
+
*/
|
|
670
|
+
BIZ_ERROR_CLIENT_NOT_INIT = 33001,
|
|
819
671
|
/**
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
672
|
+
* 数据库初始化失败。
|
|
673
|
+
*/
|
|
674
|
+
BIZ_ERROR_DATABASE_ERROR = 33002,
|
|
823
675
|
/**
|
|
824
|
-
*
|
|
676
|
+
* 传入参数无效。
|
|
825
677
|
*/
|
|
826
|
-
|
|
827
|
-
}
|
|
828
|
-
interface IRecallMsgContent {
|
|
829
|
-
conversationType: number;
|
|
830
|
-
targetId: string;
|
|
831
|
-
sentTime: number;
|
|
832
|
-
messageUId: string;
|
|
678
|
+
BIZ_ERROR_INVALID_PARAMETER = 33003,
|
|
833
679
|
/**
|
|
834
|
-
*
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
channelId: string;
|
|
680
|
+
* 通道无效。
|
|
681
|
+
*/
|
|
682
|
+
BIZ_ERROR_NO_CHANNEL = 33004,
|
|
838
683
|
/**
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
684
|
+
* 重新连接成功。
|
|
685
|
+
*/
|
|
686
|
+
BIZ_ERROR_RECONNECT_SUCCESS = 33005,
|
|
842
687
|
/**
|
|
843
|
-
*
|
|
844
|
-
|
|
845
|
-
|
|
688
|
+
* 连接中,再调用 connect 被拒绝。
|
|
689
|
+
*/
|
|
690
|
+
BIZ_ERROR_CONNECTING = 33006,
|
|
846
691
|
/**
|
|
847
|
-
*
|
|
692
|
+
* 消息漫游服务未开通
|
|
848
693
|
*/
|
|
849
|
-
|
|
850
|
-
}
|
|
851
|
-
/**
|
|
852
|
-
* 发送消息时的可选项信息
|
|
853
|
-
*/
|
|
854
|
-
interface ISendMsgOptions {
|
|
694
|
+
MSG_ROAMING_SERVICE_UNAVAILABLE = 33007,
|
|
855
695
|
/**
|
|
856
|
-
*
|
|
696
|
+
* 消息存入本地数据库失败
|
|
857
697
|
*/
|
|
858
|
-
|
|
698
|
+
MSG_INSERT_ERROR = 33008,
|
|
859
699
|
/**
|
|
860
|
-
*
|
|
700
|
+
* 删除本地消息失败
|
|
861
701
|
*/
|
|
862
|
-
|
|
863
|
-
/**
|
|
864
|
-
* 消息内容 key-value,最终会进行 JSON 序列化后发送
|
|
865
|
-
*/
|
|
866
|
-
[key: string]: any;
|
|
867
|
-
/**
|
|
868
|
-
* 消息可携带的用户数据
|
|
869
|
-
*/
|
|
870
|
-
user?: IUserProfile;
|
|
871
|
-
/**
|
|
872
|
-
* 其他拓展信息
|
|
873
|
-
*/
|
|
874
|
-
extra?: string;
|
|
875
|
-
};
|
|
702
|
+
MSG_DEL_ERROR = 33009,
|
|
876
703
|
/**
|
|
877
|
-
*
|
|
878
|
-
* @description 只在发送未注册过的自定义消息时有效,否则使用注册时的配置
|
|
704
|
+
* 标签已存在
|
|
879
705
|
*/
|
|
880
|
-
|
|
706
|
+
TAG_EXISTS = 33101,
|
|
881
707
|
/**
|
|
882
|
-
*
|
|
883
|
-
* @description 只在发送未注册过的自定义消息时有效,否则使用注册时的配置
|
|
708
|
+
* 标签不存在
|
|
884
709
|
*/
|
|
885
|
-
|
|
710
|
+
TAG_NOT_EXIST = 33100,
|
|
886
711
|
/**
|
|
887
|
-
*
|
|
888
|
-
* @description
|
|
889
|
-
* 1. 状态消息只有 pub,没有 ack 应答
|
|
890
|
-
* 2. 状态消息默认不存储,不计数,`isPersited` 与 `isCounted` 配置将失效
|
|
712
|
+
* 会话中不存在此标签
|
|
891
713
|
*/
|
|
892
|
-
|
|
714
|
+
NO_TAG_IN_CONVER = 33102,
|
|
893
715
|
/**
|
|
894
|
-
*
|
|
895
|
-
* @description
|
|
896
|
-
* 当值为 `true` 时,服务器将不会发送 Push 信息,移动端也不会弹出本地通知提醒
|
|
716
|
+
* 删除会话失败
|
|
897
717
|
*/
|
|
898
|
-
|
|
718
|
+
CONVER_REMOVE_ERROR = 34001,
|
|
899
719
|
/**
|
|
900
|
-
|
|
720
|
+
*拉取历史消息
|
|
901
721
|
*/
|
|
902
|
-
|
|
722
|
+
CONVER_GETLIST_ERROR = 34002,
|
|
903
723
|
/**
|
|
904
|
-
*
|
|
724
|
+
* 会话指定异常
|
|
905
725
|
*/
|
|
906
|
-
|
|
726
|
+
CONVER_SETOP_ERROR = 34003,
|
|
907
727
|
/**
|
|
908
|
-
*
|
|
728
|
+
* 获取会话未读消息总数失败
|
|
909
729
|
*/
|
|
910
|
-
|
|
730
|
+
CONVER_TOTAL_UNREAD_ERROR = 34004,
|
|
911
731
|
/**
|
|
912
|
-
*
|
|
913
|
-
* @description `1: @ 所有人 2: @ 指定用户`
|
|
732
|
+
* 获取指定会话类型未读消息数异常
|
|
914
733
|
*/
|
|
915
|
-
|
|
734
|
+
CONVER_TYPE_UNREAD_ERROR = 34005,
|
|
916
735
|
/**
|
|
917
|
-
*
|
|
736
|
+
* 获取指定用户ID&会话类型未读消息数异常
|
|
918
737
|
*/
|
|
919
|
-
|
|
738
|
+
CONVER_ID_TYPE_UNREAD_ERROR = 34006,
|
|
920
739
|
/**
|
|
921
|
-
*
|
|
740
|
+
* 扩展存储 key value 超出限制 (错误码与移动端对齐)
|
|
922
741
|
*/
|
|
923
|
-
|
|
742
|
+
EXPANSION_LIMIT_EXCEET = 34010,
|
|
924
743
|
/**
|
|
925
|
-
*
|
|
744
|
+
* 消息不支持扩展,原消息 canIncludeExpansion 值为 false (错误码与移动端对齐)
|
|
926
745
|
*/
|
|
927
|
-
|
|
746
|
+
MESSAGE_KV_NOT_SUPPORT = 34008,
|
|
928
747
|
/**
|
|
929
|
-
*
|
|
748
|
+
* 会话数量超出上限
|
|
930
749
|
*/
|
|
931
|
-
|
|
750
|
+
CONVER_OUT_LIMIT_ERROR = 34013,
|
|
932
751
|
/**
|
|
933
|
-
*
|
|
752
|
+
* 获取会话失败
|
|
934
753
|
*/
|
|
935
|
-
|
|
936
|
-
[key: string]: string;
|
|
937
|
-
};
|
|
754
|
+
CONVER_GET_ERROR = 35021,
|
|
938
755
|
/**
|
|
939
|
-
*
|
|
940
|
-
* @todo 功能未知,需确认
|
|
756
|
+
* 群组信息异常
|
|
941
757
|
*/
|
|
942
|
-
|
|
758
|
+
GROUP_SYNC_ERROR = 35001,
|
|
943
759
|
/**
|
|
944
|
-
*
|
|
945
|
-
|
|
946
|
-
|
|
760
|
+
* 匹配群信息异常
|
|
761
|
+
*/
|
|
762
|
+
GROUP_MATCH_ERROR = 35002,
|
|
947
763
|
/**
|
|
948
|
-
*
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
*/
|
|
952
|
-
channelId?: string;
|
|
764
|
+
* 已读回执方法调用错误(导航开关为1时调用新接口,否则调用sendMessage)
|
|
765
|
+
*/
|
|
766
|
+
READ_RECEIPT_ERROR = 35003,
|
|
953
767
|
/**
|
|
954
|
-
*
|
|
768
|
+
* 公有云包不允许连接私有云环境
|
|
955
769
|
*/
|
|
956
|
-
|
|
770
|
+
PACKAGE_ENVIRONMENT_ERROR = 35006,
|
|
957
771
|
/**
|
|
958
|
-
*
|
|
772
|
+
* 已连接或者内部重连中,不允许调用重连,需先调用 disconnect 方法
|
|
959
773
|
*/
|
|
960
|
-
|
|
961
|
-
}
|
|
962
|
-
interface IInsertMsgOptions {
|
|
963
|
-
senderUserId: string;
|
|
964
|
-
messageType: string;
|
|
965
|
-
content: string;
|
|
966
|
-
messageDirection: number;
|
|
967
|
-
readStatus?: number;
|
|
968
|
-
sentStatus?: number;
|
|
969
|
-
sentTime?: number;
|
|
970
|
-
searchContent?: string;
|
|
971
|
-
isUnread?: boolean;
|
|
972
|
-
messageUId?: string;
|
|
973
|
-
disableNotification?: boolean;
|
|
974
|
-
canIncludeExpansion?: boolean;
|
|
975
|
-
expansionMsg?: string;
|
|
976
|
-
channelId: string;
|
|
977
|
-
}
|
|
978
|
-
interface ISendExMsgOptions {
|
|
979
|
-
channelId: string;
|
|
980
|
-
conversationType: ConversationType;
|
|
981
|
-
targetId: string;
|
|
774
|
+
CAN_NOT_RECONNECT = 35007,
|
|
982
775
|
/**
|
|
983
|
-
*
|
|
984
|
-
|
|
985
|
-
|
|
776
|
+
* 不支持的平台类型,一般小程序或 PC 未开通
|
|
777
|
+
*/
|
|
778
|
+
SERVER_UNAVAILABLE = 35008,
|
|
986
779
|
/**
|
|
987
|
-
*
|
|
988
|
-
|
|
989
|
-
|
|
780
|
+
* Web 端设置安全域名后,连接端域名不在安全域名范围内
|
|
781
|
+
*/
|
|
782
|
+
HOSTNAME_ERROR = 35009,
|
|
990
783
|
/**
|
|
991
|
-
*
|
|
992
|
-
|
|
993
|
-
|
|
784
|
+
* 开启`禁止把已在线客户端踢下线`开关后,该错误码标识已有同类型端在线,禁止链接
|
|
785
|
+
*/
|
|
786
|
+
HAS_OHTER_SAME_CLIENT_ON_LINE = 35010,
|
|
994
787
|
/**
|
|
995
|
-
*
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
[key: string]: string;
|
|
999
|
-
};
|
|
788
|
+
* IM 在初次连接成功后,需立即同步消息,标记上线,然后获取全量超级群会话列表,列表同步完成前,所有超级群相关功能接口应不可用
|
|
789
|
+
*/
|
|
790
|
+
METHOD_NOT_AVAILABLE = 35011,
|
|
1000
791
|
/**
|
|
1001
|
-
*
|
|
1002
|
-
|
|
1003
|
-
|
|
792
|
+
* 该功能不支持超级群
|
|
793
|
+
*/
|
|
794
|
+
METHOD_NOT_SUPPORT = 35012,
|
|
1004
795
|
/**
|
|
1005
|
-
*
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
[key: string]: string;
|
|
1009
|
-
} | null;
|
|
1010
|
-
}
|
|
1011
|
-
interface IUltraExMsgOptions {
|
|
1012
|
-
canIncludeExpansion: boolean;
|
|
1013
|
-
channelId: string;
|
|
1014
|
-
conversationType: ConversationType;
|
|
1015
|
-
targetId: string;
|
|
1016
|
-
messageUId: string;
|
|
1017
|
-
sendTime: number;
|
|
796
|
+
* 消息数量没在范围内
|
|
797
|
+
*/
|
|
798
|
+
MSG_LIMIT_ERROR = 35013,
|
|
1018
799
|
/**
|
|
1019
|
-
*
|
|
1020
|
-
|
|
1021
|
-
|
|
800
|
+
* 该功能仅支持超级群
|
|
801
|
+
*/
|
|
802
|
+
METHOD_ONLY_SUPPORT_ULTRA_GROUP = 35014,
|
|
1022
803
|
/**
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
[key: string]: string;
|
|
1027
|
-
};
|
|
804
|
+
* 上传文件失败
|
|
805
|
+
*/
|
|
806
|
+
UPLOAD_FILE_FAILED = 35020,
|
|
1028
807
|
/**
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
}
|
|
1033
|
-
interface IUltraModifyMsgOptions {
|
|
1034
|
-
canIncludeExpansion?: boolean;
|
|
1035
|
-
channelId: string;
|
|
1036
|
-
conversationType: ConversationType;
|
|
1037
|
-
targetId: string;
|
|
1038
|
-
messageUId: string;
|
|
1039
|
-
sendTime: number;
|
|
808
|
+
* 加入聊天室Id为空
|
|
809
|
+
*/
|
|
810
|
+
CHATROOM_ID_ISNULL = 36001,
|
|
1040
811
|
/**
|
|
1041
|
-
*
|
|
812
|
+
* 加入聊天室失败
|
|
1042
813
|
*/
|
|
1043
|
-
|
|
1044
|
-
/**
|
|
1045
|
-
* 消息内容 key-value,最终会进行 JSON 序列化后发送
|
|
1046
|
-
*/
|
|
1047
|
-
[key: string]: any;
|
|
1048
|
-
/**
|
|
1049
|
-
* 消息可携带的用户数据
|
|
1050
|
-
*/
|
|
1051
|
-
user?: IUserProfile;
|
|
1052
|
-
/**
|
|
1053
|
-
* 其他拓展信息
|
|
1054
|
-
*/
|
|
1055
|
-
extra?: string;
|
|
1056
|
-
};
|
|
1057
|
-
}
|
|
1058
|
-
interface IUltraMsgQueryInfo {
|
|
1059
|
-
sendTime: number;
|
|
1060
|
-
messageUId: string;
|
|
1061
|
-
channelId?: string;
|
|
1062
|
-
}
|
|
1063
|
-
interface IUltraMsgQueryOptions {
|
|
1064
|
-
conversationType: ConversationType;
|
|
1065
|
-
targetId: string;
|
|
1066
|
-
messages: IUltraMsgQueryInfo[];
|
|
1067
|
-
}
|
|
1068
|
-
/**
|
|
1069
|
-
* 被拦截的消息信息
|
|
1070
|
-
*/
|
|
1071
|
-
interface IBlockedMessageInfo {
|
|
1072
|
-
blockedMessageUId: string;
|
|
1073
|
-
conversationType: number;
|
|
1074
|
-
targetId: string;
|
|
1075
|
-
channelId: string;
|
|
1076
|
-
blockType: MessageBlockType;
|
|
1077
|
-
extra: any;
|
|
1078
|
-
}
|
|
1079
|
-
|
|
1080
|
-
/**
|
|
1081
|
-
* TODO: 确定对外暴露的必要性
|
|
1082
|
-
* @deprecated
|
|
1083
|
-
*/
|
|
1084
|
-
declare const DelayTimer: {
|
|
1085
|
-
_delayTime: number;
|
|
814
|
+
CHARTOOM_JOIN_ERROR = 36002,
|
|
1086
815
|
/**
|
|
1087
|
-
*
|
|
1088
|
-
* @deprecated
|
|
816
|
+
* 拉取聊天室历史消息失败
|
|
1089
817
|
*/
|
|
1090
|
-
|
|
1091
|
-
getTime: () => number;
|
|
1092
|
-
};
|
|
1093
|
-
|
|
1094
|
-
/**
|
|
1095
|
-
* IM 错误码范围段
|
|
1096
|
-
* 2 开头为 IM Server 返回错误码
|
|
1097
|
-
* 3 开头: 30000 到 33xxx 为协议栈错误码,34001 ~ 34999 为移动端自定错误码
|
|
1098
|
-
* 备注:iOS 与 Android 错误码一致。Web 与移动端一致的错误码,也用此片段,比如 34008 (消息不支持扩展)
|
|
1099
|
-
* 35001 ~ 39999 为 Web 端错误码 备注:由于 Web IM 历史版本 35xxx 36xxx 37xxx 38xxx 39xxxx 都占用过,所以错误码段范围较大
|
|
1100
|
-
*/
|
|
1101
|
-
declare enum ErrorCode {
|
|
1102
|
-
/** 超时 */
|
|
1103
|
-
TIMEOUT = -1,
|
|
818
|
+
CHATROOM_HISMESSAGE_ERROR = 36003,
|
|
1104
819
|
/**
|
|
1105
|
-
*
|
|
820
|
+
* 聊天室 kv 未找到
|
|
1106
821
|
*/
|
|
1107
|
-
|
|
1108
|
-
/** 参数错误 */
|
|
1109
|
-
PARAMETER_ERROR = -3,
|
|
1110
|
-
/** 未实现的方法定义,在应用层调用 callExtra 传入无法识别的方法名时抛出 */
|
|
1111
|
-
EXTRA_METHOD_UNDEFINED = -4,
|
|
1112
|
-
/** 主进程内方法错误 */
|
|
1113
|
-
MAIN_PROCESS_ERROR = -5,
|
|
822
|
+
CHATROOM_KV_NOT_FOUND = 36004,
|
|
1114
823
|
/**
|
|
1115
|
-
*
|
|
824
|
+
* 加入黑名单异常
|
|
1116
825
|
*/
|
|
1117
|
-
|
|
826
|
+
BLACK_ADD_ERROR = 37001,
|
|
1118
827
|
/**
|
|
1119
|
-
*
|
|
828
|
+
* 获得指定人员再黑名单中的状态异常
|
|
1120
829
|
*/
|
|
1121
|
-
|
|
1122
|
-
RC_MSG_UNAUTHORIZED = 20406,
|
|
830
|
+
BLACK_GETSTATUS_ERROR = 37002,
|
|
1123
831
|
/**
|
|
1124
|
-
*
|
|
832
|
+
* 移除黑名单异常
|
|
1125
833
|
*/
|
|
1126
|
-
|
|
834
|
+
BLACK_REMOVE_ERROR = 37003,
|
|
1127
835
|
/**
|
|
1128
|
-
*
|
|
836
|
+
* 获取草稿失败
|
|
1129
837
|
*/
|
|
1130
|
-
|
|
838
|
+
DRAF_GET_ERROR = 38001,
|
|
1131
839
|
/**
|
|
1132
|
-
*
|
|
840
|
+
* 保存草稿失败
|
|
1133
841
|
*/
|
|
1134
|
-
|
|
842
|
+
DRAF_SAVE_ERROR = 38002,
|
|
1135
843
|
/**
|
|
1136
|
-
*
|
|
844
|
+
* 删除草稿失败
|
|
1137
845
|
*/
|
|
1138
|
-
|
|
1139
|
-
RECALL_MESSAGE = 25101,
|
|
846
|
+
DRAF_REMOVE_ERROR = 38003,
|
|
1140
847
|
/**
|
|
1141
|
-
*
|
|
848
|
+
* 关注公众号失败
|
|
1142
849
|
*/
|
|
1143
|
-
|
|
850
|
+
SUBSCRIBE_ERROR = 39001,
|
|
1144
851
|
/**
|
|
1145
|
-
*
|
|
852
|
+
* 方法未支持
|
|
1146
853
|
*/
|
|
1147
|
-
|
|
854
|
+
NOT_SUPPORT = 39002,
|
|
1148
855
|
/**
|
|
1149
|
-
|
|
856
|
+
* 关注公众号失败
|
|
1150
857
|
*/
|
|
1151
|
-
|
|
858
|
+
QNTKN_FILETYPE_ERROR = 41001,
|
|
1152
859
|
/**
|
|
1153
|
-
*
|
|
860
|
+
* 获取七牛token失败
|
|
1154
861
|
*/
|
|
1155
|
-
|
|
862
|
+
QNTKN_GET_ERROR = 41002,
|
|
1156
863
|
/**
|
|
1157
|
-
*
|
|
864
|
+
* cookie被禁用
|
|
1158
865
|
*/
|
|
1159
|
-
|
|
866
|
+
COOKIE_ENABLE = 51001,
|
|
867
|
+
HAVNODEVICEID = 24001,
|
|
868
|
+
DEVICEIDISHAVE = 24002,
|
|
869
|
+
FEILD = 24009,
|
|
870
|
+
VOIPISNULL = 24013,
|
|
871
|
+
NOENGINETYPE = 24010,
|
|
872
|
+
NULLCHANNELNAME = 24011,
|
|
873
|
+
VOIPDYANMICERROR = 24012,
|
|
874
|
+
NOVOIP = 24014,
|
|
875
|
+
INTERNALERRROR = 24015,
|
|
876
|
+
VOIPCLOSE = 24016,
|
|
877
|
+
ULTRA_GROUP_USER_NOT_IN_PRIVATE_CHANNEL = 24416,
|
|
1160
878
|
/**
|
|
1161
|
-
*
|
|
879
|
+
* 己方取消已发出的通话请求
|
|
1162
880
|
*/
|
|
1163
|
-
|
|
881
|
+
CANCEL = 1,
|
|
1164
882
|
/**
|
|
1165
|
-
*
|
|
883
|
+
* 己方拒绝收到的通话请求
|
|
1166
884
|
*/
|
|
1167
|
-
|
|
885
|
+
REJECT = 2,
|
|
1168
886
|
/**
|
|
1169
|
-
*
|
|
887
|
+
* 己方挂断
|
|
1170
888
|
*/
|
|
1171
|
-
|
|
889
|
+
HANGUP = 3,
|
|
1172
890
|
/**
|
|
1173
|
-
*
|
|
891
|
+
* 己方忙碌
|
|
1174
892
|
*/
|
|
1175
|
-
|
|
893
|
+
BUSYLINE = 4,
|
|
1176
894
|
/**
|
|
1177
|
-
*
|
|
895
|
+
* 己方未接听
|
|
1178
896
|
*/
|
|
1179
|
-
|
|
897
|
+
NO_RESPONSE = 5,
|
|
1180
898
|
/**
|
|
1181
|
-
*
|
|
899
|
+
* 己方不支持当前引擎
|
|
1182
900
|
*/
|
|
1183
|
-
|
|
901
|
+
ENGINE_UN_SUPPORTED = 6,
|
|
1184
902
|
/**
|
|
1185
|
-
*
|
|
903
|
+
* 己方网络出错
|
|
1186
904
|
*/
|
|
1187
|
-
|
|
905
|
+
NETWORK_ERROR = 7,
|
|
1188
906
|
/**
|
|
1189
|
-
*
|
|
907
|
+
* 对方取消已发出的通话请求
|
|
1190
908
|
*/
|
|
1191
|
-
|
|
1192
|
-
/*!
|
|
1193
|
-
聊天室设置 KV 失败,出现在两人或者多端同时操作一个 kv。
|
|
1194
|
-
如果出现该错误,为避免和其他端同时操作,请延时一定时间再试
|
|
1195
|
-
*/
|
|
1196
|
-
CHATROOM_KV_SET_ERROR = 23431,
|
|
909
|
+
REMOTE_CANCEL = 11,
|
|
1197
910
|
/**
|
|
1198
|
-
*
|
|
911
|
+
* 对方拒绝收到的通话请求
|
|
1199
912
|
*/
|
|
1200
|
-
|
|
1201
|
-
SENSITIVE_REPLACE = 21502,
|
|
913
|
+
REMOTE_REJECT = 12,
|
|
1202
914
|
/**
|
|
1203
|
-
*
|
|
915
|
+
* 通话过程对方挂断
|
|
1204
916
|
*/
|
|
1205
|
-
|
|
917
|
+
REMOTE_HANGUP = 13,
|
|
1206
918
|
/**
|
|
1207
|
-
*
|
|
919
|
+
* 对方忙碌
|
|
1208
920
|
*/
|
|
1209
|
-
|
|
921
|
+
REMOTE_BUSYLINE = 14,
|
|
1210
922
|
/**
|
|
1211
|
-
*
|
|
923
|
+
* 对方未接听
|
|
1212
924
|
*/
|
|
1213
|
-
|
|
925
|
+
REMOTE_NO_RESPONSE = 15,
|
|
1214
926
|
/**
|
|
1215
|
-
|
|
927
|
+
* 对方网络错误
|
|
1216
928
|
*/
|
|
1217
|
-
|
|
929
|
+
REMOTE_ENGINE_UN_SUPPORTED = 16,
|
|
1218
930
|
/**
|
|
1219
|
-
*
|
|
931
|
+
* 对方网络错误
|
|
1220
932
|
*/
|
|
1221
|
-
|
|
933
|
+
REMOTE_NETWORK_ERROR = 17,
|
|
1222
934
|
/**
|
|
1223
|
-
*
|
|
935
|
+
* VoIP 不可用
|
|
1224
936
|
*/
|
|
1225
|
-
|
|
937
|
+
VOIP_NOT_AVALIABLE = 18,
|
|
1226
938
|
/**
|
|
1227
|
-
*
|
|
939
|
+
* 聊天室批量设置kv部分不成功
|
|
1228
940
|
*/
|
|
1229
|
-
|
|
941
|
+
CHATROOM_KV_STORE_NOT_ALL_SUCCESS = 23428,
|
|
1230
942
|
/**
|
|
1231
|
-
*
|
|
943
|
+
* 聊天室设置批量kv,一次不能超过10个
|
|
1232
944
|
*/
|
|
1233
|
-
|
|
945
|
+
CHATROOM_KV_STORE_OUT_LIMIT = 23429
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
/**
|
|
949
|
+
* 连接状态
|
|
950
|
+
*/
|
|
951
|
+
declare enum ConnectionStatus {
|
|
1234
952
|
/**
|
|
1235
|
-
*
|
|
953
|
+
* 连接成功。
|
|
1236
954
|
*/
|
|
1237
|
-
|
|
955
|
+
CONNECTED = 0,
|
|
1238
956
|
/**
|
|
1239
|
-
*
|
|
957
|
+
* 连接中。
|
|
1240
958
|
*/
|
|
1241
|
-
|
|
959
|
+
CONNECTING = 1,
|
|
1242
960
|
/**
|
|
1243
|
-
*
|
|
961
|
+
* 正常断开连接。
|
|
1244
962
|
*/
|
|
1245
|
-
|
|
963
|
+
DISCONNECTED = 2,
|
|
1246
964
|
/**
|
|
1247
|
-
*
|
|
965
|
+
* 网络不可用。
|
|
1248
966
|
*/
|
|
1249
|
-
|
|
967
|
+
NETWORK_UNAVAILABLE = 3,
|
|
1250
968
|
/**
|
|
1251
|
-
*
|
|
969
|
+
* 连接关闭。
|
|
1252
970
|
*/
|
|
1253
|
-
|
|
971
|
+
CONNECTION_CLOSED = 4,
|
|
1254
972
|
/**
|
|
1255
|
-
*
|
|
973
|
+
* 用户账户在其他设备登录,本机会被踢掉线。
|
|
1256
974
|
*/
|
|
1257
|
-
|
|
975
|
+
KICKED_OFFLINE_BY_OTHER_CLIENT = 6,
|
|
1258
976
|
/**
|
|
1259
|
-
*
|
|
977
|
+
* websocket 连接失败
|
|
1260
978
|
*/
|
|
1261
|
-
|
|
979
|
+
WEBSOCKET_UNAVAILABLE = 7,
|
|
1262
980
|
/**
|
|
1263
|
-
*
|
|
981
|
+
* websocket 报错
|
|
1264
982
|
*/
|
|
1265
|
-
|
|
983
|
+
WEBSOCKET_ERROR = 8,
|
|
1266
984
|
/**
|
|
1267
|
-
*
|
|
985
|
+
* 用户被封禁
|
|
1268
986
|
*/
|
|
1269
|
-
|
|
987
|
+
BLOCKED = 9,
|
|
1270
988
|
/**
|
|
1271
|
-
*
|
|
989
|
+
* 域名错误
|
|
1272
990
|
*/
|
|
1273
|
-
|
|
991
|
+
DOMAIN_INCORRECT = 12,
|
|
1274
992
|
/**
|
|
1275
|
-
*
|
|
993
|
+
* 服务器主动断开
|
|
1276
994
|
*/
|
|
1277
|
-
|
|
995
|
+
DISCONNECT_BY_SERVER = 13,
|
|
1278
996
|
/**
|
|
1279
|
-
*
|
|
997
|
+
* 重定向
|
|
1280
998
|
*/
|
|
1281
|
-
|
|
999
|
+
REDIRECT = 14,
|
|
1282
1000
|
/**
|
|
1283
|
-
*
|
|
1001
|
+
* appkey 不正确
|
|
1284
1002
|
*/
|
|
1285
|
-
|
|
1003
|
+
APPKEY_IS_FAKE = 20,
|
|
1286
1004
|
/**
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1005
|
+
* 其他端登录,本端禁止连接和重连
|
|
1006
|
+
*/
|
|
1007
|
+
FORBID_RECONNECT_BY_OTHER_SAME_CLIENT = 31023,
|
|
1290
1008
|
/**
|
|
1291
|
-
*
|
|
1009
|
+
* 互踢次数过多(`count > 5`),此时可能出现:在其它他设备登陆有 reconnect 逻辑
|
|
1292
1010
|
*/
|
|
1293
|
-
|
|
1011
|
+
ULTRALIMIT = 1101,
|
|
1294
1012
|
/**
|
|
1295
|
-
*
|
|
1013
|
+
* 开始请求导航
|
|
1296
1014
|
*/
|
|
1297
|
-
|
|
1015
|
+
REQUEST_NAVI = 201,
|
|
1298
1016
|
/**
|
|
1299
|
-
*
|
|
1017
|
+
* 请求导航结束
|
|
1300
1018
|
*/
|
|
1301
|
-
|
|
1019
|
+
RESPONSE_NAVI = 202,
|
|
1302
1020
|
/**
|
|
1303
|
-
*
|
|
1021
|
+
* 请求导航失败
|
|
1304
1022
|
*/
|
|
1305
|
-
|
|
1023
|
+
RESPONSE_NAVI_ERROR = 203,
|
|
1306
1024
|
/**
|
|
1307
|
-
*
|
|
1025
|
+
* 请求导航超时
|
|
1308
1026
|
*/
|
|
1309
|
-
|
|
1027
|
+
RESPONSE_NAVI_TIMEOUT = 204
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
declare enum ReceivedStatus {
|
|
1310
1031
|
/**
|
|
1311
|
-
*
|
|
1312
|
-
|
|
1313
|
-
|
|
1032
|
+
* 已读
|
|
1033
|
+
*/
|
|
1034
|
+
READ = 1,
|
|
1314
1035
|
/**
|
|
1315
|
-
*
|
|
1316
|
-
|
|
1317
|
-
|
|
1036
|
+
* 已听
|
|
1037
|
+
*/
|
|
1038
|
+
LISTENED = 2,
|
|
1318
1039
|
/**
|
|
1319
|
-
*
|
|
1320
|
-
|
|
1321
|
-
|
|
1040
|
+
* 已下载
|
|
1041
|
+
*/
|
|
1042
|
+
DOWNLOADED = 4,
|
|
1322
1043
|
/**
|
|
1323
|
-
*
|
|
1324
|
-
|
|
1325
|
-
|
|
1044
|
+
* 该消息已经被其他登录的多端收取过。( 即该消息已经被其他端收取过后。当前端才登录,并重新拉取了这条消息。客户可以通过这个状态更新 UI,比如不再提示 )
|
|
1045
|
+
*/
|
|
1046
|
+
RETRIEVED = 8,
|
|
1326
1047
|
/**
|
|
1327
|
-
*
|
|
1328
|
-
|
|
1329
|
-
|
|
1048
|
+
* 未读
|
|
1049
|
+
*/
|
|
1050
|
+
UNREAD = 0
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
/**
|
|
1054
|
+
* CMP/Comet 服务连接应答码
|
|
1055
|
+
*/
|
|
1056
|
+
declare const ConnectResultCode: {
|
|
1330
1057
|
/**
|
|
1331
|
-
*
|
|
1058
|
+
* 连接成功
|
|
1332
1059
|
*/
|
|
1333
|
-
|
|
1060
|
+
ACCEPTED: number;
|
|
1334
1061
|
/**
|
|
1335
|
-
*
|
|
1062
|
+
* 协议版本不匹配
|
|
1063
|
+
* @description 暂未使用
|
|
1336
1064
|
*/
|
|
1337
|
-
|
|
1065
|
+
UNACCEPTABLE_PROTOCOL_VERSION: number;
|
|
1338
1066
|
/**
|
|
1339
|
-
*
|
|
1067
|
+
* 客户端(移动端 TCP 连接建立时)`info` 字段格式错误
|
|
1068
|
+
* @description 格式:`{平台类型}-{设备信息}-{sdk版本}`。
|
|
1069
|
+
* 其中设备信息为:{手机类型}{手机型号}{网络类型,4G/WIFI}{运营商标识, 移动/电信/联通}
|
|
1340
1070
|
*/
|
|
1341
|
-
|
|
1071
|
+
IDENTIFIER_REJECTED: number;
|
|
1342
1072
|
/**
|
|
1343
|
-
*
|
|
1073
|
+
* 不支持的平台类型,一般小程序或 PC 未开通
|
|
1344
1074
|
*/
|
|
1345
|
-
|
|
1075
|
+
SERVER_UNAVAILABLE: number;
|
|
1346
1076
|
/**
|
|
1347
|
-
*
|
|
1077
|
+
* Token无法解析,或Token已过期
|
|
1348
1078
|
*/
|
|
1349
|
-
|
|
1079
|
+
TOKEN_INCORRECT: number;
|
|
1350
1080
|
/**
|
|
1351
|
-
*
|
|
1081
|
+
* 防黑产规则相关应答
|
|
1352
1082
|
*/
|
|
1353
|
-
|
|
1083
|
+
NOT_AUTHORIZED: number;
|
|
1354
1084
|
/**
|
|
1355
|
-
*
|
|
1085
|
+
* 服务重定向,一般服务扩缩容时,落点已经改变,此时 userId 链接到旧的节点时,会触发该错误。
|
|
1086
|
+
* 客户端收到该应答后须重新访问导航,重新获取 CMP 地址
|
|
1356
1087
|
*/
|
|
1357
|
-
|
|
1088
|
+
REDIRECT: number;
|
|
1358
1089
|
/**
|
|
1359
|
-
*
|
|
1090
|
+
* 暂未使用
|
|
1360
1091
|
*/
|
|
1361
|
-
|
|
1092
|
+
PACKAGE_ERROR: number;
|
|
1362
1093
|
/**
|
|
1363
|
-
*
|
|
1094
|
+
* 该 AppKey 已经封禁或删除
|
|
1364
1095
|
*/
|
|
1365
|
-
|
|
1096
|
+
APP_BLOCK_OR_DELETE: number;
|
|
1366
1097
|
/**
|
|
1367
|
-
*
|
|
1098
|
+
* 该用户 ID 已经被封禁
|
|
1368
1099
|
*/
|
|
1369
|
-
|
|
1100
|
+
BLOCK: number;
|
|
1370
1101
|
/**
|
|
1371
|
-
*
|
|
1102
|
+
* Token 已过期,暂未使用
|
|
1372
1103
|
*/
|
|
1373
|
-
|
|
1104
|
+
TOKEN_EXPIRE: number;
|
|
1374
1105
|
/**
|
|
1375
|
-
*
|
|
1106
|
+
* Token 中携带 deviceId 时,检测 Token 中 deviceId 与链接设备 deviceId 不一致
|
|
1376
1107
|
*/
|
|
1377
|
-
|
|
1108
|
+
DEVICE_ERROR: number;
|
|
1378
1109
|
/**
|
|
1379
|
-
*
|
|
1110
|
+
* Web 端设置安全域名后,连接端域名不在安全域名范围内
|
|
1380
1111
|
*/
|
|
1381
|
-
|
|
1382
|
-
MSG_INSERT_ERROR = 33008,
|
|
1383
|
-
MSG_DEL_ERROR = 33009,
|
|
1112
|
+
HOSTNAME_ERROR: number;
|
|
1384
1113
|
/**
|
|
1385
|
-
*
|
|
1114
|
+
* 开启`禁止把已在线客户端踢下线`开关后,该错误码标识已有同类型端在线,禁止链接
|
|
1386
1115
|
*/
|
|
1387
|
-
|
|
1116
|
+
HASOHTERSAMECLIENTONLINE: number;
|
|
1388
1117
|
/**
|
|
1389
|
-
*
|
|
1118
|
+
* 客户端连错环境,引发连接拒绝
|
|
1390
1119
|
*/
|
|
1391
|
-
|
|
1120
|
+
IN_OTHER_CLUSTER: number;
|
|
1392
1121
|
/**
|
|
1393
|
-
*
|
|
1122
|
+
* app 验证Token 验证不通过。所有内部超时,访问失败,返回给客户端sdk都是验证不通过,由服务端日志去看具体是那种失败。
|
|
1394
1123
|
*/
|
|
1395
|
-
|
|
1124
|
+
APP_AUTH_NOT_PASS: number;
|
|
1396
1125
|
/**
|
|
1397
|
-
*
|
|
1126
|
+
* One Time Password 已经被使用过
|
|
1398
1127
|
*/
|
|
1399
|
-
|
|
1128
|
+
OTP_USED: number;
|
|
1400
1129
|
/**
|
|
1401
|
-
|
|
1130
|
+
* token平台验证失败
|
|
1402
1131
|
*/
|
|
1403
|
-
|
|
1132
|
+
PLATFORM_ERROR: number;
|
|
1133
|
+
};
|
|
1134
|
+
|
|
1135
|
+
/**
|
|
1136
|
+
* 内置消息类型
|
|
1137
|
+
*/
|
|
1138
|
+
declare enum MessageType {
|
|
1404
1139
|
/**
|
|
1405
|
-
*
|
|
1406
|
-
|
|
1407
|
-
|
|
1140
|
+
* 文字消息
|
|
1141
|
+
*/
|
|
1142
|
+
TextMessage = "RC:TxtMsg",
|
|
1408
1143
|
/**
|
|
1409
|
-
*
|
|
1410
|
-
|
|
1411
|
-
|
|
1144
|
+
* 语音消息
|
|
1145
|
+
*/
|
|
1146
|
+
VOICE = "RC:VcMsg",
|
|
1412
1147
|
/**
|
|
1413
|
-
*
|
|
1414
|
-
|
|
1415
|
-
|
|
1148
|
+
* 高质量消息
|
|
1149
|
+
*/
|
|
1150
|
+
HQ_VOICE = "RC:HQVCMsg",
|
|
1416
1151
|
/**
|
|
1417
|
-
*
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
CONVER_CLEAR_ERROR = 34007,
|
|
1152
|
+
* 图片消息
|
|
1153
|
+
*/
|
|
1154
|
+
IMAGE = "RC:ImgMsg",
|
|
1421
1155
|
/**
|
|
1422
|
-
*
|
|
1423
|
-
|
|
1424
|
-
|
|
1156
|
+
* GIF 消息
|
|
1157
|
+
*/
|
|
1158
|
+
GIF = "RC:GIFMsg",
|
|
1425
1159
|
/**
|
|
1426
|
-
*
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
CLEAR_HIS_TIME_ERROR = 34011,
|
|
1160
|
+
* 图文消息
|
|
1161
|
+
*/
|
|
1162
|
+
RICH_CONTENT = "RC:ImgTextMsg",
|
|
1430
1163
|
/**
|
|
1431
|
-
*
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
CONVER_GET_ERROR = 35021,
|
|
1164
|
+
* 位置消息
|
|
1165
|
+
*/
|
|
1166
|
+
LOCATION = "RC:LBSMsg",
|
|
1435
1167
|
/**
|
|
1436
|
-
*
|
|
1437
|
-
|
|
1438
|
-
|
|
1168
|
+
* 文件消息
|
|
1169
|
+
*/
|
|
1170
|
+
FILE = "RC:FileMsg",
|
|
1439
1171
|
/**
|
|
1440
|
-
*
|
|
1441
|
-
|
|
1442
|
-
|
|
1172
|
+
* 小视频消息
|
|
1173
|
+
*/
|
|
1174
|
+
SIGHT = "RC:SightMsg",
|
|
1443
1175
|
/**
|
|
1444
|
-
*
|
|
1445
|
-
|
|
1446
|
-
|
|
1176
|
+
* 合并转发消息
|
|
1177
|
+
*/
|
|
1178
|
+
COMBINE = "RC:CombineMsg",
|
|
1447
1179
|
/**
|
|
1448
|
-
*
|
|
1449
|
-
|
|
1450
|
-
|
|
1180
|
+
* 聊天室 KV 通知消息
|
|
1181
|
+
*/
|
|
1182
|
+
CHRM_KV_NOTIFY = "RC:chrmKVNotiMsg",
|
|
1451
1183
|
/**
|
|
1452
|
-
*
|
|
1453
|
-
|
|
1454
|
-
|
|
1184
|
+
* 日志通知消息
|
|
1185
|
+
*/
|
|
1186
|
+
LOG_COMMAND = "RC:LogCmdMsg",
|
|
1455
1187
|
/**
|
|
1456
|
-
*
|
|
1457
|
-
|
|
1458
|
-
|
|
1188
|
+
* 消息扩展
|
|
1189
|
+
*/
|
|
1190
|
+
EXPANSION_NOTIFY = "RC:MsgExMsg",
|
|
1459
1191
|
/**
|
|
1460
|
-
*
|
|
1461
|
-
|
|
1462
|
-
|
|
1192
|
+
* 引用消息
|
|
1193
|
+
*/
|
|
1194
|
+
REFERENCE = "RC:ReferenceMsg",
|
|
1463
1195
|
/**
|
|
1464
|
-
*
|
|
1465
|
-
|
|
1466
|
-
|
|
1196
|
+
* 撤回消息
|
|
1197
|
+
*/
|
|
1198
|
+
RECALL = "RC:RcCmd",
|
|
1467
1199
|
/**
|
|
1468
|
-
*
|
|
1469
|
-
|
|
1470
|
-
|
|
1200
|
+
* 已读同步状态消息
|
|
1201
|
+
*/
|
|
1202
|
+
READ_RECEIPT = "RC:ReadNtf",
|
|
1471
1203
|
/**
|
|
1472
|
-
*
|
|
1473
|
-
|
|
1474
|
-
|
|
1204
|
+
* 群已读请求回执消息
|
|
1205
|
+
*/
|
|
1206
|
+
READ_RECEIPT_REQUEST = "RC:RRReqMsg",
|
|
1475
1207
|
/**
|
|
1476
|
-
*
|
|
1477
|
-
|
|
1478
|
-
|
|
1208
|
+
* 群已读响应回执消息
|
|
1209
|
+
*/
|
|
1210
|
+
READ_RECEIPT_RESPONSE = "RC:RRRspMsg",
|
|
1479
1211
|
/**
|
|
1480
|
-
*
|
|
1481
|
-
|
|
1482
|
-
|
|
1212
|
+
* 多端同步已读状态
|
|
1213
|
+
*/
|
|
1214
|
+
SYNC_READ_STATUS = "RC:SRSMsg",
|
|
1483
1215
|
/**
|
|
1484
|
-
*
|
|
1216
|
+
* 接受群已读回执更新消息(导航开关grpRRVer为1时使用)
|
|
1485
1217
|
*/
|
|
1486
|
-
|
|
1218
|
+
GROUP_READ_RECEIPT_REQUEST = "RC:RRMsg",
|
|
1487
1219
|
/**
|
|
1488
|
-
*
|
|
1220
|
+
* 用户加入聊天室
|
|
1489
1221
|
*/
|
|
1490
|
-
|
|
1222
|
+
CHATROOM_JOIN = "RC:ChrmJoinNtf",
|
|
1491
1223
|
/**
|
|
1492
|
-
*
|
|
1493
|
-
*/
|
|
1494
|
-
CHARTOOM_JOIN_ERROR = 36002,
|
|
1495
|
-
/**
|
|
1496
|
-
* 拉取聊天室历史消息失败
|
|
1497
|
-
*/
|
|
1498
|
-
CHATROOM_HISMESSAGE_ERROR = 36003,
|
|
1499
|
-
/**
|
|
1500
|
-
* 聊天室 kv 未找到
|
|
1501
|
-
*/
|
|
1502
|
-
CHATROOM_KV_NOT_FOUND = 36004,
|
|
1503
|
-
/**
|
|
1504
|
-
* 加入黑名单异常
|
|
1505
|
-
*/
|
|
1506
|
-
BLACK_ADD_ERROR = 37001,
|
|
1507
|
-
/**
|
|
1508
|
-
* 获得指定人员再黑名单中的状态异常
|
|
1509
|
-
*/
|
|
1510
|
-
BLACK_GETSTATUS_ERROR = 37002,
|
|
1511
|
-
/**
|
|
1512
|
-
* 移除黑名单异常
|
|
1513
|
-
*/
|
|
1514
|
-
BLACK_REMOVE_ERROR = 37003,
|
|
1515
|
-
/**
|
|
1516
|
-
* 获取草稿失败
|
|
1517
|
-
*/
|
|
1518
|
-
DRAF_GET_ERROR = 38001,
|
|
1519
|
-
/**
|
|
1520
|
-
* 保存草稿失败
|
|
1521
|
-
*/
|
|
1522
|
-
DRAF_SAVE_ERROR = 38002,
|
|
1523
|
-
/**
|
|
1524
|
-
* 删除草稿失败
|
|
1525
|
-
*/
|
|
1526
|
-
DRAF_REMOVE_ERROR = 38003,
|
|
1527
|
-
/**
|
|
1528
|
-
* 关注公众号失败
|
|
1529
|
-
*/
|
|
1530
|
-
SUBSCRIBE_ERROR = 39001,
|
|
1531
|
-
/**
|
|
1532
|
-
* 方法未支持
|
|
1533
|
-
*/
|
|
1534
|
-
NOT_SUPPORT = 39002,
|
|
1535
|
-
/**
|
|
1536
|
-
* 关注公众号失败
|
|
1537
|
-
*/
|
|
1538
|
-
QNTKN_FILETYPE_ERROR = 41001,
|
|
1539
|
-
/**
|
|
1540
|
-
* 获取七牛token失败
|
|
1541
|
-
*/
|
|
1542
|
-
QNTKN_GET_ERROR = 41002,
|
|
1543
|
-
/**
|
|
1544
|
-
* cookie被禁用
|
|
1545
|
-
*/
|
|
1546
|
-
COOKIE_ENABLE = 51001,
|
|
1547
|
-
GET_MESSAGE_BY_ID_ERROR = 61001,
|
|
1548
|
-
HAVNODEVICEID = 24001,
|
|
1549
|
-
DEVICEIDISHAVE = 24002,
|
|
1550
|
-
FEILD = 24009,
|
|
1551
|
-
VOIPISNULL = 24013,
|
|
1552
|
-
NOENGINETYPE = 24010,
|
|
1553
|
-
NULLCHANNELNAME = 24011,
|
|
1554
|
-
VOIPDYANMICERROR = 24012,
|
|
1555
|
-
NOVOIP = 24014,
|
|
1556
|
-
INTERNALERRROR = 24015,
|
|
1557
|
-
VOIPCLOSE = 24016,
|
|
1558
|
-
CLOSE_BEFORE_OPEN = 51001,
|
|
1559
|
-
ALREADY_IN_USE = 51002,
|
|
1560
|
-
INVALID_CHANNEL_NAME = 51003,
|
|
1561
|
-
VIDEO_CONTAINER_IS_NULL = 51004,
|
|
1562
|
-
/**
|
|
1563
|
-
* 删除消息数组长度为 0 .
|
|
1564
|
-
*/
|
|
1565
|
-
DELETE_MESSAGE_ID_IS_NULL = 61001,
|
|
1566
|
-
/**
|
|
1567
|
-
* 己方取消已发出的通话请求
|
|
1568
|
-
*/
|
|
1569
|
-
CANCEL = 1,
|
|
1570
|
-
/**
|
|
1571
|
-
* 己方拒绝收到的通话请求
|
|
1572
|
-
*/
|
|
1573
|
-
REJECT = 2,
|
|
1574
|
-
/**
|
|
1575
|
-
* 己方挂断
|
|
1576
|
-
*/
|
|
1577
|
-
HANGUP = 3,
|
|
1578
|
-
/**
|
|
1579
|
-
* 己方忙碌
|
|
1580
|
-
*/
|
|
1581
|
-
BUSYLINE = 4,
|
|
1582
|
-
/**
|
|
1583
|
-
* 己方未接听
|
|
1584
|
-
*/
|
|
1585
|
-
NO_RESPONSE = 5,
|
|
1586
|
-
/**
|
|
1587
|
-
* 己方不支持当前引擎
|
|
1588
|
-
*/
|
|
1589
|
-
ENGINE_UN_SUPPORTED = 6,
|
|
1590
|
-
/**
|
|
1591
|
-
* 己方网络出错
|
|
1592
|
-
*/
|
|
1593
|
-
NETWORK_ERROR = 7,
|
|
1594
|
-
/**
|
|
1595
|
-
* 对方取消已发出的通话请求
|
|
1596
|
-
*/
|
|
1597
|
-
REMOTE_CANCEL = 11,
|
|
1598
|
-
/**
|
|
1599
|
-
* 对方拒绝收到的通话请求
|
|
1600
|
-
*/
|
|
1601
|
-
REMOTE_REJECT = 12,
|
|
1602
|
-
/**
|
|
1603
|
-
* 通话过程对方挂断
|
|
1604
|
-
*/
|
|
1605
|
-
REMOTE_HANGUP = 13,
|
|
1606
|
-
/**
|
|
1607
|
-
* 对方忙碌
|
|
1608
|
-
*/
|
|
1609
|
-
REMOTE_BUSYLINE = 14,
|
|
1610
|
-
/**
|
|
1611
|
-
* 对方未接听
|
|
1224
|
+
* 用户退出聊天室
|
|
1612
1225
|
*/
|
|
1613
|
-
|
|
1226
|
+
CHATROOM_LEFT = "RC:ChrmQuitNtf",
|
|
1614
1227
|
/**
|
|
1615
|
-
*
|
|
1228
|
+
* 用户加入退出聊天室的集合
|
|
1616
1229
|
*/
|
|
1617
|
-
|
|
1230
|
+
CHATROOM_MERGE_CHANGE = "RC:ChrmMemChange",
|
|
1618
1231
|
/**
|
|
1619
|
-
*
|
|
1232
|
+
* 输入状态消息
|
|
1620
1233
|
*/
|
|
1621
|
-
|
|
1234
|
+
TYPING_STATUS = "RC:TypSts",
|
|
1622
1235
|
/**
|
|
1623
|
-
*
|
|
1236
|
+
* 拦截消息,(当发送的消息的敏感词时,服务会下发一个拦截消息,内容包含被拦截消息信息)
|
|
1624
1237
|
*/
|
|
1625
|
-
|
|
1238
|
+
INTERCEPT = "RC:InterceptMsg"
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
/**
|
|
1242
|
+
* @deprecated 已废弃,请使用 NotificationLevel
|
|
1243
|
+
*/
|
|
1244
|
+
declare enum NotificationStatus {
|
|
1626
1245
|
/**
|
|
1627
|
-
*
|
|
1628
|
-
|
|
1629
|
-
|
|
1246
|
+
* 免打扰已开启
|
|
1247
|
+
*/
|
|
1248
|
+
OPEN = 1,
|
|
1630
1249
|
/**
|
|
1631
|
-
*
|
|
1632
|
-
|
|
1633
|
-
|
|
1250
|
+
* 免打扰已关闭
|
|
1251
|
+
*/
|
|
1252
|
+
CLOSE = 2
|
|
1634
1253
|
}
|
|
1635
1254
|
|
|
1636
1255
|
/**
|
|
@@ -1667,1360 +1286,1806 @@ declare enum NotificationLevel {
|
|
|
1667
1286
|
}
|
|
1668
1287
|
|
|
1669
1288
|
/**
|
|
1670
|
-
*
|
|
1671
|
-
|
|
1672
|
-
declare enum
|
|
1289
|
+
* 群组 @ 类型
|
|
1290
|
+
*/
|
|
1291
|
+
declare enum MentionedType {
|
|
1673
1292
|
/**
|
|
1674
|
-
*
|
|
1675
|
-
|
|
1676
|
-
|
|
1293
|
+
* 所有人
|
|
1294
|
+
*/
|
|
1295
|
+
ALL = 1,
|
|
1677
1296
|
/**
|
|
1678
|
-
*
|
|
1679
|
-
|
|
1680
|
-
|
|
1297
|
+
* 部分人
|
|
1298
|
+
*/
|
|
1299
|
+
SINGAL = 2
|
|
1681
1300
|
}
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1301
|
+
|
|
1302
|
+
interface IMetionedData {
|
|
1303
|
+
type?: MentionedType;
|
|
1304
|
+
userIdList?: string[];
|
|
1305
|
+
mentionedContent?: string;
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
declare enum UploadMethod {
|
|
1686
1309
|
/**
|
|
1687
|
-
*
|
|
1310
|
+
* 七牛上传
|
|
1688
1311
|
*/
|
|
1689
|
-
|
|
1312
|
+
QINIU = 1,
|
|
1690
1313
|
/**
|
|
1691
|
-
*
|
|
1314
|
+
* 阿里云上传
|
|
1692
1315
|
*/
|
|
1693
|
-
|
|
1694
|
-
}
|
|
1695
|
-
declare enum LiveRole {
|
|
1316
|
+
ALI = 2,
|
|
1696
1317
|
/**
|
|
1697
|
-
*
|
|
1318
|
+
* 亚马逊上传
|
|
1698
1319
|
*/
|
|
1699
|
-
|
|
1320
|
+
AWS = 3,
|
|
1700
1321
|
/**
|
|
1701
|
-
*
|
|
1322
|
+
* stc上传
|
|
1702
1323
|
*/
|
|
1703
|
-
|
|
1324
|
+
STC = 4
|
|
1704
1325
|
}
|
|
1326
|
+
|
|
1705
1327
|
/**
|
|
1706
|
-
*
|
|
1707
|
-
|
|
1708
|
-
declare
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
'RC:VCSummary': string;
|
|
1712
|
-
'RC:VCHangup': string;
|
|
1713
|
-
'RC:VCInvite': string;
|
|
1714
|
-
'RC:VCModifyMedia': string;
|
|
1715
|
-
'RC:VCModifyMem': string;
|
|
1716
|
-
};
|
|
1717
|
-
declare enum RTCApiType {
|
|
1718
|
-
ROOM = 1,
|
|
1719
|
-
PERSON = 2
|
|
1328
|
+
* 聊天室 kv 存储操作类型. 对方操作, 己方收到消息(RC:chrmKVNotiMsg)中会带入此值. 根据此值判断是删除还是更新
|
|
1329
|
+
*/
|
|
1330
|
+
declare enum ChatroomEntryType {
|
|
1331
|
+
UPDATE = 1,
|
|
1332
|
+
DELETE = 2
|
|
1720
1333
|
}
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1334
|
+
|
|
1335
|
+
declare enum LogLevel {
|
|
1336
|
+
LOG = 0,
|
|
1337
|
+
DEBUG = 0,
|
|
1338
|
+
INFO = 1,
|
|
1339
|
+
WARN = 2,
|
|
1340
|
+
ERROR = 3,
|
|
1341
|
+
FATAL = 4,
|
|
1342
|
+
STATISTICS = 6,
|
|
1343
|
+
NONE = 1000
|
|
1724
1344
|
}
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
declare enum RTCJoinType {
|
|
1729
|
-
/**
|
|
1730
|
-
* 踢前一个设备
|
|
1731
|
-
*/
|
|
1732
|
-
KICK = 0,
|
|
1733
|
-
/**
|
|
1734
|
-
* 当前加入拒绝
|
|
1735
|
-
*/
|
|
1736
|
-
REFUSE = 1,
|
|
1737
|
-
/**
|
|
1738
|
-
* 两个设备共存
|
|
1739
|
-
*/
|
|
1740
|
-
COEXIST = 2
|
|
1345
|
+
declare enum LogSource {
|
|
1346
|
+
IM = "IM",
|
|
1347
|
+
RTC = "RTC"
|
|
1741
1348
|
}
|
|
1742
|
-
|
|
1743
1349
|
/**
|
|
1744
|
-
*
|
|
1350
|
+
* IMLib 埋点日志 Id 枚举
|
|
1351
|
+
* @desc 参考文档-https://rongcloud.yuque.com/tbvylv/znhprz/dpt9wf#fE9u
|
|
1745
1352
|
*/
|
|
1746
|
-
declare enum
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1353
|
+
declare enum LogTagId {
|
|
1354
|
+
L_IMSDK_VER_O = "L-imsdk_ver-O",
|
|
1355
|
+
A_INIT_O = "A-init-O",
|
|
1356
|
+
L_INIT_O = "L-init-O",
|
|
1357
|
+
P_INIT_O = "P-init-O",
|
|
1358
|
+
A_CONNECT_T = "A-connect-T",
|
|
1359
|
+
A_CONNECT_R = "A-connect-R",
|
|
1360
|
+
A_CONNECT_S = "A-connect-S",
|
|
1361
|
+
A_DISCONNECT_O = "A-disconnect-O",
|
|
1362
|
+
A_RECONNECT_T = "A-reconnect-T",
|
|
1363
|
+
A_RECONNECT_R = "A_RECONNECT_R",
|
|
1364
|
+
L_CONNECT_T = "L-connect-T",
|
|
1365
|
+
L_CONNECT_R = "L-connect-R",
|
|
1366
|
+
L_CONNECT_S = "L-connect-S",
|
|
1367
|
+
P_CONNECT_O = "P-connect-O",
|
|
1368
|
+
P_CONNECT_S = "P-connect-S",
|
|
1369
|
+
A_SEND_MSG_T = "A-send_msg-T",
|
|
1370
|
+
A_SEND_MSG_R = "A-send_msg-R",
|
|
1371
|
+
P_SEND_MSG_T = "P-send_msg-T",
|
|
1372
|
+
P_SEND_MSG_R = "P-send_msg-R",
|
|
1373
|
+
L_SEND_MSG_T = "L-send_msg-T",
|
|
1374
|
+
L_SEND_MSG_R = "L-send_msg-R",
|
|
1375
|
+
L_PULL_MSG_T = "L-pull_msg-T",
|
|
1376
|
+
L_PULL_MSG_R = "L-pull_msg-R",
|
|
1377
|
+
L_PULL_ULTRA_MSG_T = "L-pull_ultra_msg-T",
|
|
1378
|
+
L_PULL_ULTRA_MSG_R = "L-pull_ultra_msg-R",
|
|
1379
|
+
L_PULL_CHATROOM_KV_T = "L-pull_chatroom_kv-T",
|
|
1380
|
+
L_PULL_CHATROOM_KV_R = "L-pull_chatroom_kv-R",
|
|
1381
|
+
L_PULL_CHATROOM_MSG_T = "L-pull_chatroom_msg-T",
|
|
1382
|
+
L_PULL_CHATROOM_MSG_R = "L-pull_chatroom_msg-R",
|
|
1383
|
+
A_DELETE_MESSAGES_S = "A-delete_messages-S",
|
|
1384
|
+
P_DELETE_MSG_S = "P-delete_msg-S",
|
|
1385
|
+
L_PULL_CONVERSATION_S = "L-pull_conversation-S",
|
|
1386
|
+
L_RECALL_ULTRA_MSG_S = "L-recall_ultra_msg-S",
|
|
1387
|
+
A_REGTYP_O = "A-regtyp-O",
|
|
1388
|
+
P_REGTYP_O = "P-regtype-O",
|
|
1389
|
+
P_REGTYP_E = "P-regtype-E",
|
|
1390
|
+
L_GET_NAVI_T = "L-get_navi-T",
|
|
1391
|
+
L_GET_NAVI_R = "L-get_navi-R",
|
|
1392
|
+
L_ENV_S = "L-Env-S",
|
|
1393
|
+
L_GET_INDEX_NAVI_S = "L-get_index_navi-S",
|
|
1394
|
+
A_JOIN_CHATROOM_T = "A-join_chatroom-T",
|
|
1395
|
+
A_JOIN_CHATROOM_R = "A-join_chatroom-R",
|
|
1396
|
+
L_JOIN_CHATROOM_T = "L-join_chatroom-T",
|
|
1397
|
+
L_JOIN_CHATROOM_R = "L-join_chatroom-R",
|
|
1398
|
+
A_QUIT_CHATROOM_T = "A-quit_chatroom-T",
|
|
1399
|
+
A_QUIT_CHATROOM_R = "A-quit_chatroom-R",
|
|
1400
|
+
L_REJOIN_CHATROOM_T = "L-rejoin_chatroom-T",
|
|
1401
|
+
L_REJOIN_CHATROOM_R = "L-rejoin_chatroom-R",
|
|
1402
|
+
L_MEDIA_S = "L-media-S",
|
|
1403
|
+
L_MEDIA_UPLOAD_T = "L-media_upload-T",
|
|
1404
|
+
L_MEDIA_UPLOAD_R = "L-media_upload-R",
|
|
1405
|
+
G_UPLOAD_LOG_S = "G-upload_log-S",
|
|
1406
|
+
G_UPLOAD_LOG_E = "G-upload_log-E",
|
|
1407
|
+
G_GET_REAL_TIMELOG_COMMAND_S = "G-get_real_timelog_command-S",
|
|
1408
|
+
L_CHECK_ALIVE_IM_T = "L-check_alive_im-T",
|
|
1409
|
+
L_CHECK_ALIVE_IM_R = "L-check_alive_im-R",
|
|
1410
|
+
A_GET_HISTORY_MSG_T = "A-get_history_msg-T",
|
|
1411
|
+
A_GET_HISTORY_MSG_R = "A-get_history_msg-R",
|
|
1412
|
+
L_GET_HISTORY_MSG_T = "L-get_history_msg-T",
|
|
1413
|
+
L_GET_HISTORY_MSG_R = "L-get_history_msg-R",
|
|
1414
|
+
A_CALLBACK_O = "A-callback-O",
|
|
1415
|
+
A_CALLBACK_E = "A-callback-E"
|
|
1755
1416
|
}
|
|
1756
1417
|
|
|
1757
1418
|
/**
|
|
1758
|
-
*
|
|
1419
|
+
* 聊天室成员进入和退出状态
|
|
1759
1420
|
*/
|
|
1760
|
-
|
|
1421
|
+
declare enum ChatroomUserChangeType {
|
|
1422
|
+
QUIT = 0,
|
|
1423
|
+
JOIN = 1
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
/**
|
|
1427
|
+
* 消息被拦截类型
|
|
1428
|
+
*/
|
|
1429
|
+
declare enum MessageBlockType {
|
|
1761
1430
|
/**
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1431
|
+
全局敏感词:命中了融云内置的全局敏感词
|
|
1432
|
+
*/
|
|
1433
|
+
GLOBAL = 1,
|
|
1765
1434
|
/**
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1435
|
+
自定义敏感词拦截:命中了客户在融云自定义的敏感词
|
|
1436
|
+
*/
|
|
1437
|
+
CUSTOM = 2,
|
|
1769
1438
|
/**
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1439
|
+
第三方审核拦截:命中了第三方(数美)或模板路由决定不下发的状态
|
|
1440
|
+
*/
|
|
1441
|
+
THIRD_PARTY = 3
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
declare enum UltraGroupChannelType {
|
|
1445
|
+
PUBLIC = 0,
|
|
1446
|
+
PRIVATE = 1
|
|
1447
|
+
}
|
|
1448
|
+
declare enum UltraGroupChannelChangeType {
|
|
1449
|
+
PUBLIC_TO_PRIVATE = 2,
|
|
1450
|
+
PRIVATE_TO_PUBLIC = 3,
|
|
1451
|
+
PUBLIC_TO_PRIVATE_USER_NOT_IN = 6
|
|
1452
|
+
}
|
|
1453
|
+
/** PB 结构 MsgChange 属性 changeType 对应枚举值 */
|
|
1454
|
+
declare enum UltraMsgChangeType {
|
|
1455
|
+
MSG_EXPANSION = 1,
|
|
1456
|
+
MSG_MODIFY = 2,
|
|
1457
|
+
MSG_RECALL = 3,
|
|
1458
|
+
CHANNEL_CHANGE = 4
|
|
1459
|
+
}
|
|
1460
|
+
/** PB 结构 MsgChange 属性 subChangeType 对应枚举值 */
|
|
1461
|
+
declare enum UltraMsgSubChangeType {
|
|
1462
|
+
CHANNEL_DELETE = 1,
|
|
1463
|
+
PUBLIC_TO_PRIVATE = 2,
|
|
1464
|
+
PRIVATE_TO_PUBLIC = 3,
|
|
1465
|
+
PRIVATE_CHANNEL_USER_JOIN_PUBLIC = 4,
|
|
1466
|
+
CHANNEL_USER_KICKED = 5,
|
|
1467
|
+
PUBLIC_TO_PRIVATE_USER_NOT_IN = 6
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
/**
|
|
1471
|
+
* 音视频模式
|
|
1472
|
+
*/
|
|
1473
|
+
declare enum RTCMode {
|
|
1776
1474
|
/**
|
|
1777
|
-
*
|
|
1475
|
+
* 普通音视频模式
|
|
1778
1476
|
*/
|
|
1779
|
-
|
|
1477
|
+
RTC = 0,
|
|
1780
1478
|
/**
|
|
1781
|
-
*
|
|
1479
|
+
* 直播模式
|
|
1782
1480
|
*/
|
|
1783
|
-
|
|
1481
|
+
LIVE = 2
|
|
1482
|
+
}
|
|
1483
|
+
/**
|
|
1484
|
+
* 直播类型
|
|
1485
|
+
*/
|
|
1486
|
+
declare enum LiveType {
|
|
1784
1487
|
/**
|
|
1785
|
-
*
|
|
1488
|
+
* 音视频直播
|
|
1786
1489
|
*/
|
|
1787
|
-
|
|
1490
|
+
AUDIO_AND_VIDEO = 0,
|
|
1788
1491
|
/**
|
|
1789
|
-
*
|
|
1492
|
+
* 音频直播
|
|
1790
1493
|
*/
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
*/
|
|
1795
|
-
type: 1 | 2;
|
|
1796
|
-
/**
|
|
1797
|
-
* 被 @ 的用户 Id 列表,仅在 `type` 为 `2` 时有效
|
|
1798
|
-
*/
|
|
1799
|
-
userIdList: string[];
|
|
1800
|
-
} | null;
|
|
1494
|
+
AUDIO = 1
|
|
1495
|
+
}
|
|
1496
|
+
declare enum LiveRole {
|
|
1801
1497
|
/**
|
|
1802
|
-
*
|
|
1803
|
-
* @description
|
|
1804
|
-
* 1. 已开启免打扰
|
|
1805
|
-
* 2. 未开启免打扰
|
|
1498
|
+
* 主播身份
|
|
1806
1499
|
*/
|
|
1807
|
-
|
|
1808
|
-
notificationLevel?: NotificationLevel;
|
|
1500
|
+
ANCHOR = 1,
|
|
1809
1501
|
/**
|
|
1810
|
-
*
|
|
1502
|
+
* 观众身份
|
|
1811
1503
|
*/
|
|
1812
|
-
|
|
1504
|
+
AUDIENCE = 2
|
|
1505
|
+
}
|
|
1506
|
+
/**
|
|
1507
|
+
* CallLib 流程消息
|
|
1508
|
+
*/
|
|
1509
|
+
declare const CallLibMsgType: {
|
|
1510
|
+
'RC:VCAccept': string;
|
|
1511
|
+
'RC:VCRinging': string;
|
|
1512
|
+
'RC:VCSummary': string;
|
|
1513
|
+
'RC:VCHangup': string;
|
|
1514
|
+
'RC:VCInvite': string;
|
|
1515
|
+
'RC:VCModifyMedia': string;
|
|
1516
|
+
'RC:VCModifyMem': string;
|
|
1517
|
+
};
|
|
1518
|
+
declare enum RTCApiType {
|
|
1519
|
+
ROOM = 1,
|
|
1520
|
+
PERSON = 2
|
|
1521
|
+
}
|
|
1522
|
+
declare enum RTCIdentityChangeType {
|
|
1523
|
+
AnchorToViewer = 1,
|
|
1524
|
+
ViewerToAnchor = 2
|
|
1525
|
+
}
|
|
1526
|
+
/**
|
|
1527
|
+
* RTC 房间加入类型
|
|
1528
|
+
*/
|
|
1529
|
+
declare enum RTCJoinType {
|
|
1813
1530
|
/**
|
|
1814
|
-
*
|
|
1531
|
+
* 踢前一个设备
|
|
1815
1532
|
*/
|
|
1816
|
-
|
|
1533
|
+
KICK = 0,
|
|
1817
1534
|
/**
|
|
1818
|
-
*
|
|
1535
|
+
* 当前加入拒绝
|
|
1819
1536
|
*/
|
|
1820
|
-
|
|
1537
|
+
REFUSE = 1,
|
|
1821
1538
|
/**
|
|
1822
|
-
*
|
|
1539
|
+
* 两个设备共存
|
|
1823
1540
|
*/
|
|
1824
|
-
|
|
1825
|
-
unreadMentionedCount?: number;
|
|
1826
|
-
}
|
|
1827
|
-
interface IReceivedConversationByTag extends IReceivedConversation {
|
|
1828
|
-
isTopInTag: boolean;
|
|
1541
|
+
COEXIST = 2
|
|
1829
1542
|
}
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
*/
|
|
1833
|
-
interface ISetConversationStatusOptions {
|
|
1543
|
+
|
|
1544
|
+
interface IConversationOption {
|
|
1834
1545
|
conversationType: ConversationType;
|
|
1835
1546
|
targetId: string;
|
|
1836
|
-
isTop?: boolean;
|
|
1837
|
-
notificationStatus?: number;
|
|
1838
|
-
notificationLevel?: number;
|
|
1839
1547
|
channelId?: string;
|
|
1840
1548
|
}
|
|
1841
|
-
interface
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1549
|
+
interface IServerRTCRoomEntry {
|
|
1550
|
+
key: string;
|
|
1551
|
+
value: string;
|
|
1552
|
+
status: number;
|
|
1553
|
+
timestamp: number;
|
|
1554
|
+
uid: string;
|
|
1555
|
+
}
|
|
1556
|
+
interface IChrmKVEntry {
|
|
1557
|
+
key: string;
|
|
1558
|
+
value?: string;
|
|
1559
|
+
isSendNotification?: boolean;
|
|
1560
|
+
notificationExtra?: string;
|
|
1561
|
+
isOverwrite?: boolean;
|
|
1562
|
+
isAutoDelete?: boolean;
|
|
1563
|
+
timestamp?: number;
|
|
1564
|
+
userId?: string;
|
|
1565
|
+
type?: number;
|
|
1566
|
+
isDeleted?: boolean;
|
|
1567
|
+
version?: number;
|
|
1568
|
+
}
|
|
1569
|
+
interface IChrmKVEntries {
|
|
1570
|
+
entries: {
|
|
1571
|
+
key: string;
|
|
1572
|
+
value?: string;
|
|
1573
|
+
timestamp?: number;
|
|
1574
|
+
version?: number;
|
|
1575
|
+
}[];
|
|
1576
|
+
notificationExtra?: string;
|
|
1577
|
+
isOverwrite?: boolean;
|
|
1578
|
+
isAutoDelete?: boolean;
|
|
1579
|
+
timestamp?: number;
|
|
1580
|
+
userId?: string;
|
|
1581
|
+
type?: number;
|
|
1582
|
+
isDeleted?: boolean;
|
|
1583
|
+
}
|
|
1584
|
+
interface IServerConversationStatus {
|
|
1848
1585
|
conversationType: number;
|
|
1849
1586
|
targetId: string;
|
|
1850
|
-
|
|
1851
|
-
unreadMessageCount?: number;
|
|
1852
|
-
hasMentioned?: boolean;
|
|
1853
|
-
mentionedInfo?: {
|
|
1854
|
-
/**
|
|
1855
|
-
* `@ 类型,其中 1 为 @ 所有人,2 为 @ 部分人`
|
|
1856
|
-
*/
|
|
1857
|
-
type: 1 | 2;
|
|
1858
|
-
/**
|
|
1859
|
-
* 被 @ 的用户 Id 列表,仅在 `type` 为 `2` 时有效
|
|
1860
|
-
*/
|
|
1861
|
-
userIdList: string[];
|
|
1862
|
-
};
|
|
1863
|
-
lastUnreadTime?: number;
|
|
1587
|
+
updatedTime?: number;
|
|
1864
1588
|
notificationStatus?: number;
|
|
1865
1589
|
notificationLevel?: number;
|
|
1866
1590
|
isTop?: boolean;
|
|
1591
|
+
type?: number;
|
|
1592
|
+
tags?: IConversationTag[];
|
|
1593
|
+
channelId?: string;
|
|
1594
|
+
}
|
|
1595
|
+
interface IUserSettingItem {
|
|
1596
|
+
targetId: number;
|
|
1597
|
+
type: number;
|
|
1598
|
+
key: string;
|
|
1599
|
+
value: any;
|
|
1600
|
+
version: number;
|
|
1601
|
+
status: number;
|
|
1602
|
+
tags: IConversationTag[];
|
|
1603
|
+
}
|
|
1604
|
+
interface IServerUserSetting {
|
|
1605
|
+
settings: {
|
|
1606
|
+
[key: string]: IUserSettingItem;
|
|
1607
|
+
};
|
|
1608
|
+
version: number;
|
|
1609
|
+
}
|
|
1610
|
+
interface ISyncMsgArgs {
|
|
1611
|
+
inboxTime: number;
|
|
1612
|
+
sendboxTime: number;
|
|
1613
|
+
broadcastSyncTime?: number;
|
|
1614
|
+
}
|
|
1615
|
+
interface IGetMsgOption {
|
|
1616
|
+
timestamp?: number;
|
|
1617
|
+
count?: number;
|
|
1618
|
+
order?: number;
|
|
1619
|
+
channelId?: string;
|
|
1620
|
+
}
|
|
1621
|
+
interface IGetConversationListOption {
|
|
1622
|
+
type?: number;
|
|
1623
|
+
count?: number;
|
|
1624
|
+
startTime?: number;
|
|
1625
|
+
order?: 0 | 1;
|
|
1626
|
+
}
|
|
1627
|
+
interface IClearMsgOption {
|
|
1628
|
+
timestamp?: number;
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
interface IGooglePushConfig {
|
|
1632
|
+
/**
|
|
1633
|
+
* 分组ID
|
|
1634
|
+
*/
|
|
1635
|
+
collapseKey?: string;
|
|
1636
|
+
/**
|
|
1637
|
+
*
|
|
1638
|
+
*/
|
|
1639
|
+
imageUrl?: string;
|
|
1640
|
+
/**
|
|
1641
|
+
*优先级
|
|
1642
|
+
*/
|
|
1643
|
+
priority?: 'high' | 'normal';
|
|
1644
|
+
}
|
|
1645
|
+
interface IiOSPushConfig {
|
|
1646
|
+
/**
|
|
1647
|
+
* iOS 用于通知分组的 id
|
|
1648
|
+
*/
|
|
1649
|
+
threadId?: string;
|
|
1650
|
+
/**
|
|
1651
|
+
* iOS 用于通知覆盖的 id
|
|
1652
|
+
*/
|
|
1653
|
+
apnsCollapseId?: string;
|
|
1654
|
+
/**
|
|
1655
|
+
* iOS 分类,如果不设置后台默认取消息类型字符串,如RC:TxtMsg
|
|
1656
|
+
*/
|
|
1657
|
+
category?: string;
|
|
1658
|
+
/**
|
|
1659
|
+
* 和 category 对应
|
|
1660
|
+
*/
|
|
1661
|
+
richMediaUri?: string;
|
|
1662
|
+
}
|
|
1663
|
+
interface IAndroidPushConfig {
|
|
1664
|
+
/**
|
|
1665
|
+
* Android 的通知 id
|
|
1666
|
+
*/
|
|
1667
|
+
notificationId?: string;
|
|
1668
|
+
/**
|
|
1669
|
+
* 小米的 channelId
|
|
1670
|
+
*/
|
|
1671
|
+
channelIdMi?: string;
|
|
1672
|
+
/**
|
|
1673
|
+
* 华为的 channelId
|
|
1674
|
+
*/
|
|
1675
|
+
channelIdHW?: string;
|
|
1676
|
+
/**
|
|
1677
|
+
* OPPO 的 channelId
|
|
1678
|
+
*/
|
|
1679
|
+
channelIdOPPO?: string;
|
|
1680
|
+
/**
|
|
1681
|
+
* vivo 的类型
|
|
1682
|
+
*/
|
|
1683
|
+
typeVivo?: string;
|
|
1684
|
+
/**
|
|
1685
|
+
* google FCM 的推送配置
|
|
1686
|
+
*/
|
|
1687
|
+
googleConfig?: IGooglePushConfig;
|
|
1688
|
+
}
|
|
1689
|
+
interface IPushConfig {
|
|
1690
|
+
/**
|
|
1691
|
+
* 推送标题
|
|
1692
|
+
* 如果没有设置,会使用下面的默认标题显示规则
|
|
1693
|
+
* 默认标题显示规则:
|
|
1694
|
+
* 内置消息:单聊通知标题显示为发送者名称,群聊通知标题显示为群名称。
|
|
1695
|
+
* 自定义消息:默认不显示标题。
|
|
1696
|
+
*/
|
|
1697
|
+
pushTitle: string;
|
|
1698
|
+
/**
|
|
1699
|
+
* 推送内容
|
|
1700
|
+
* 优先使用 IPushConfig.pushContent, 如果没有,则使用发送消息的 pushContent 参数
|
|
1701
|
+
*/
|
|
1702
|
+
pushContent: string;
|
|
1703
|
+
/**
|
|
1704
|
+
* 远程推送附加信息
|
|
1705
|
+
* 优先使用 IPushConfig.pushData, 如果没有,则使用发送消息的 pushContent 参数
|
|
1706
|
+
*/
|
|
1707
|
+
pushData: string;
|
|
1708
|
+
/**
|
|
1709
|
+
* iOSConfig
|
|
1710
|
+
*/
|
|
1711
|
+
iOSConfig?: IiOSPushConfig;
|
|
1712
|
+
/**
|
|
1713
|
+
* androidConfig
|
|
1714
|
+
*/
|
|
1715
|
+
androidConfig?: IAndroidPushConfig;
|
|
1716
|
+
/**
|
|
1717
|
+
* 是否显示推送标题. 仅针对 iOS 平台有效
|
|
1718
|
+
*/
|
|
1719
|
+
disablePushTitle: boolean;
|
|
1720
|
+
/**
|
|
1721
|
+
* 是否强制推送
|
|
1722
|
+
*/
|
|
1723
|
+
forceShowDetailContent: boolean;
|
|
1724
|
+
/**
|
|
1725
|
+
* 推送模板id
|
|
1726
|
+
*/
|
|
1727
|
+
templateId: string;
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
/**
|
|
1731
|
+
* 已读回执数据结构
|
|
1732
|
+
*/
|
|
1733
|
+
interface IMessageReader {
|
|
1734
|
+
readTime: number;
|
|
1735
|
+
userId: string;
|
|
1736
|
+
}
|
|
1737
|
+
interface IMessageReaderResponse {
|
|
1738
|
+
totalMemberCount: number;
|
|
1739
|
+
list: IMessageReader[];
|
|
1740
|
+
}
|
|
1741
|
+
interface ILocalReadReceiptInfo {
|
|
1742
|
+
hasRespond?: boolean;
|
|
1743
|
+
readerInfo?: {
|
|
1744
|
+
[userId: string]: number;
|
|
1745
|
+
};
|
|
1746
|
+
readCount?: number;
|
|
1747
|
+
totalCount?: number;
|
|
1748
|
+
}
|
|
1749
|
+
interface IReadReceiptInfo {
|
|
1750
|
+
/**
|
|
1751
|
+
* 是否已经发送已读回执
|
|
1752
|
+
*/
|
|
1753
|
+
hasRespond?: boolean;
|
|
1754
|
+
/**
|
|
1755
|
+
* 已阅读用户列表(不准确)
|
|
1756
|
+
*/
|
|
1757
|
+
readerList?: IMessageReader[];
|
|
1867
1758
|
/**
|
|
1868
|
-
*
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
tags?: IUpdatedConversation[];
|
|
1872
|
-
versionTime?: number;
|
|
1759
|
+
* 阅读人数(不准确)
|
|
1760
|
+
*/
|
|
1761
|
+
readCount?: number;
|
|
1873
1762
|
/**
|
|
1874
|
-
*
|
|
1763
|
+
* 群组总人数(不准确)
|
|
1875
1764
|
*/
|
|
1876
|
-
|
|
1877
|
-
}
|
|
1878
|
-
interface IBaseConversationInfo {
|
|
1879
|
-
conversationType: ConversationType;
|
|
1880
|
-
targetId: string;
|
|
1881
|
-
channelId: string;
|
|
1882
|
-
}
|
|
1883
|
-
interface IConversationState extends IBaseConversationInfo {
|
|
1884
|
-
unreadCount: number;
|
|
1885
|
-
unreadMentionedCount: number;
|
|
1886
|
-
}
|
|
1887
|
-
/** 指定超级群会话传参 */
|
|
1888
|
-
interface IUltraGroupOption {
|
|
1889
|
-
targetId: string;
|
|
1890
|
-
channelId?: string;
|
|
1765
|
+
totalCount?: number;
|
|
1891
1766
|
}
|
|
1892
|
-
|
|
1893
1767
|
/**
|
|
1894
|
-
*
|
|
1768
|
+
* 从服务端接收到的消息数据
|
|
1895
1769
|
*/
|
|
1896
|
-
interface
|
|
1770
|
+
interface IReceivedMessage {
|
|
1897
1771
|
/**
|
|
1898
|
-
*
|
|
1772
|
+
* 会话的业务标识
|
|
1773
|
+
*/
|
|
1774
|
+
channelId?: string;
|
|
1775
|
+
/**
|
|
1776
|
+
* 会话类型
|
|
1777
|
+
* * 1: 单聊
|
|
1778
|
+
* * 3: 群聊
|
|
1779
|
+
* * 4: 聊天室
|
|
1780
|
+
* * 5: 客服会话
|
|
1781
|
+
* * 6: 系统消息
|
|
1782
|
+
* * 7: 默认关注的公众号
|
|
1783
|
+
* * 8: 手动关注的公众号
|
|
1784
|
+
* * 9: RTCLib 房间
|
|
1899
1785
|
*/
|
|
1900
|
-
|
|
1786
|
+
conversationType: ConversationType;
|
|
1901
1787
|
/**
|
|
1902
|
-
*
|
|
1788
|
+
* 会话 targetId
|
|
1903
1789
|
*/
|
|
1904
|
-
|
|
1790
|
+
targetId: string;
|
|
1905
1791
|
/**
|
|
1906
|
-
*
|
|
1792
|
+
* 消息发送者的用户 Id
|
|
1907
1793
|
*/
|
|
1908
|
-
|
|
1794
|
+
senderUserId: string;
|
|
1909
1795
|
/**
|
|
1910
|
-
*
|
|
1911
|
-
* @description 该字段为 SDK 内增加的字段,导航接口数据中不存在
|
|
1796
|
+
* 消息内容
|
|
1912
1797
|
*/
|
|
1913
|
-
|
|
1798
|
+
content: any;
|
|
1914
1799
|
/**
|
|
1915
|
-
*
|
|
1800
|
+
* 消息结构名称,即消息类型
|
|
1801
|
+
* @example RC:TxtMsg
|
|
1916
1802
|
*/
|
|
1917
|
-
|
|
1803
|
+
messageType: string;
|
|
1918
1804
|
/**
|
|
1919
|
-
*
|
|
1920
|
-
* @example a.domain.com:443
|
|
1805
|
+
* 服务端存储的消息 Id
|
|
1921
1806
|
*/
|
|
1922
|
-
|
|
1807
|
+
messageUId: string;
|
|
1923
1808
|
/**
|
|
1924
|
-
*
|
|
1925
|
-
* @example a.domain.com:443,b.domain.com:443
|
|
1809
|
+
* 消息方向是发出 or 收取
|
|
1926
1810
|
*/
|
|
1927
|
-
|
|
1811
|
+
messageDirection: MessageDirection;
|
|
1928
1812
|
/**
|
|
1929
|
-
*
|
|
1813
|
+
* 是否为离线消息
|
|
1930
1814
|
*/
|
|
1931
|
-
|
|
1815
|
+
isOffLineMessage: boolean;
|
|
1932
1816
|
/**
|
|
1933
|
-
*
|
|
1934
|
-
* 1. 公有云未开通音视频时,值为 null
|
|
1935
|
-
* 2. 私有云无配置时为 `{ "strategy": 0 }`
|
|
1817
|
+
* 消息在服务器端的发送时间
|
|
1936
1818
|
*/
|
|
1937
|
-
|
|
1819
|
+
sentTime: number;
|
|
1938
1820
|
/**
|
|
1939
|
-
*
|
|
1940
|
-
* @
|
|
1941
|
-
* @description 公有云独有配置
|
|
1821
|
+
* 消息接收时间,该时间通过消息的 `sentTime` 值在本地进行计算得出,不推荐使用
|
|
1822
|
+
* @description 当 isOffLineMessage 为 true 时,该值无效
|
|
1942
1823
|
*/
|
|
1943
|
-
|
|
1824
|
+
receivedTime: number;
|
|
1944
1825
|
/**
|
|
1945
|
-
*
|
|
1946
|
-
* @
|
|
1826
|
+
* 是否存储
|
|
1827
|
+
* @default true
|
|
1947
1828
|
*/
|
|
1948
|
-
|
|
1829
|
+
isPersited: boolean;
|
|
1949
1830
|
/**
|
|
1950
|
-
*
|
|
1951
|
-
* @
|
|
1952
|
-
* 1. 公有云通过 `developer.rongcloud.cn` 管理后台 `单群聊消息云端存储` 功能开关进行配置
|
|
1953
|
-
* 2. 私有云默认为 `true`
|
|
1831
|
+
* 是否计数
|
|
1832
|
+
* @default true
|
|
1954
1833
|
*/
|
|
1955
|
-
|
|
1834
|
+
isCounted: boolean;
|
|
1956
1835
|
/**
|
|
1957
|
-
*
|
|
1958
|
-
* @description
|
|
1959
|
-
* 1. 私有云对聊天室功能支持有限,默认为 `false`
|
|
1960
|
-
* 2. TODO: 公有云配置待确认
|
|
1836
|
+
* 是否为 @ 消息
|
|
1961
1837
|
*/
|
|
1962
|
-
|
|
1838
|
+
isMentioned: boolean;
|
|
1963
1839
|
/**
|
|
1964
|
-
*
|
|
1965
|
-
* @description
|
|
1966
|
-
* 1. 公有云下,该地址为七牛云服务器地址
|
|
1967
|
-
* 2. 私有云下,该地址为私有云自研文件服务器地址
|
|
1840
|
+
* 消息是否静默
|
|
1841
|
+
* @description 静默消息不会发送 Push 信息和本地通知提醒
|
|
1968
1842
|
*/
|
|
1969
|
-
|
|
1843
|
+
disableNotification: boolean;
|
|
1970
1844
|
/**
|
|
1971
|
-
*
|
|
1845
|
+
* 是否是状态消息
|
|
1972
1846
|
*/
|
|
1973
|
-
|
|
1847
|
+
isStatusMessage: boolean;
|
|
1974
1848
|
/**
|
|
1975
|
-
*
|
|
1976
|
-
|
|
1849
|
+
* 是否支持消息扩展存储
|
|
1850
|
+
*/
|
|
1851
|
+
canIncludeExpansion: boolean;
|
|
1852
|
+
/**
|
|
1853
|
+
* 消息携带的扩展存储
|
|
1854
|
+
*/
|
|
1855
|
+
expansion: {
|
|
1856
|
+
[key: string]: any;
|
|
1857
|
+
} | null;
|
|
1858
|
+
/**
|
|
1859
|
+
* 消息接收状态
|
|
1860
|
+
*/
|
|
1861
|
+
receivedStatus: number;
|
|
1862
|
+
/**
|
|
1863
|
+
* CPP 独有字段 消息本地 ID
|
|
1864
|
+
*/
|
|
1865
|
+
messageId?: number;
|
|
1866
|
+
/**
|
|
1867
|
+
* CPP 独有字段 消息发送状态
|
|
1868
|
+
*/
|
|
1869
|
+
sentStatus?: number;
|
|
1870
|
+
/**
|
|
1871
|
+
* 已读回执信息(导航配置grpRRVer=1时群组类型消息内存在, 其他情况为undefined)
|
|
1977
1872
|
*/
|
|
1978
|
-
|
|
1873
|
+
readReceiptInfo?: IReadReceiptInfo;
|
|
1979
1874
|
/**
|
|
1980
|
-
*
|
|
1875
|
+
* 推送扩展
|
|
1981
1876
|
*/
|
|
1982
|
-
|
|
1877
|
+
pushConfig?: IPushConfig;
|
|
1983
1878
|
/**
|
|
1984
|
-
*
|
|
1879
|
+
* 超级群专有字段,是否断档,服务端收到大量消息可能会断档,所以消息存在此标志位,断档需要客户手动拉取历史消息
|
|
1985
1880
|
*/
|
|
1986
|
-
|
|
1881
|
+
isInterrupt?: boolean;
|
|
1987
1882
|
/**
|
|
1988
|
-
*
|
|
1989
|
-
* @description
|
|
1990
|
-
* 配置来源:
|
|
1991
|
-
* 1. 导航
|
|
1992
|
-
* 2. 服务端实时下发
|
|
1993
|
-
* 已有配置字段:
|
|
1994
|
-
* 1. Lan. 推送使用的语言设置,用户端可自定义修改. Web 端未做设置, 只做接收
|
|
1995
|
-
* 2. ShPushSwit. 推送是否显示详情设置,用户端可自定义修改. Web 端未做设置, 只做接收
|
|
1996
|
-
* 3. MobPushSwit: Web/PC 在线,移动端不在线是否发送推送开关,用户端可自定义修改. Web 端未做设置, 只做接收
|
|
1997
|
-
* 4. OffMsgDur: 离线消息保存天数,设置天数不可大于App级对应配置,用户端可自定义修改. Web 端未做设置, 只做接收
|
|
1998
|
-
* 5. VoipInfo: 音视频相关配置,用户端不可自定义修改. 由服务端决定,与导航下发格式一致
|
|
1999
|
-
* @todo 需确认公有云与私有云区别
|
|
1883
|
+
* 拉取历史消息时表示该消息是否修改过(仅超级群有效)
|
|
2000
1884
|
*/
|
|
2001
|
-
|
|
1885
|
+
isModifyMessage?: boolean;
|
|
2002
1886
|
/**
|
|
2003
|
-
*
|
|
1887
|
+
* 拉取历史消息时表示该消息是否为超级群频道类型(仅超级群有效)
|
|
2004
1888
|
*/
|
|
2005
|
-
|
|
1889
|
+
channelType?: UltraGroupChannelType;
|
|
1890
|
+
}
|
|
1891
|
+
interface IUserProfile {
|
|
2006
1892
|
/**
|
|
2007
|
-
|
|
2008
|
-
|
|
1893
|
+
* 用户 ID
|
|
1894
|
+
*/
|
|
1895
|
+
id?: string;
|
|
1896
|
+
/**
|
|
1897
|
+
* 用户名
|
|
2009
1898
|
*/
|
|
2010
|
-
|
|
1899
|
+
name?: string;
|
|
2011
1900
|
/**
|
|
2012
|
-
*
|
|
2013
|
-
* @
|
|
2014
|
-
* 1. 确定其控制的功能
|
|
2015
|
-
* 2. 确定 web 相关性
|
|
1901
|
+
* 用户头像地址
|
|
1902
|
+
* @deprecated
|
|
2016
1903
|
*/
|
|
2017
|
-
|
|
1904
|
+
portraitUri?: string;
|
|
2018
1905
|
/**
|
|
2019
|
-
*
|
|
1906
|
+
* user info 中附加信息
|
|
2020
1907
|
*/
|
|
2021
|
-
|
|
1908
|
+
extra?: string;
|
|
1909
|
+
/**
|
|
1910
|
+
* 用户头像地址(向移动端兼容)
|
|
1911
|
+
*/
|
|
1912
|
+
portrait?: string;
|
|
1913
|
+
}
|
|
1914
|
+
interface IOperateInfo {
|
|
1915
|
+
targetId: string;
|
|
1916
|
+
channelId?: string;
|
|
1917
|
+
userId: string;
|
|
1918
|
+
operationType: OperateStatus;
|
|
1919
|
+
operationTime?: number;
|
|
1920
|
+
}
|
|
1921
|
+
interface IOperateSummary {
|
|
1922
|
+
targetId: string;
|
|
1923
|
+
channelId?: string;
|
|
1924
|
+
count: number;
|
|
1925
|
+
operationType: OperateStatus;
|
|
1926
|
+
}
|
|
1927
|
+
interface IOperateStatusNotify {
|
|
1928
|
+
conversationType: ConversationType;
|
|
1929
|
+
hasInfo: boolean;
|
|
1930
|
+
hasSummary: boolean;
|
|
1931
|
+
info: IOperateInfo[];
|
|
1932
|
+
summary: IOperateSummary[];
|
|
1933
|
+
}
|
|
1934
|
+
interface IRecallMsgOptions {
|
|
1935
|
+
/**
|
|
1936
|
+
* 会话组织机构标识
|
|
1937
|
+
* 默认值未 空字符串
|
|
1938
|
+
*/
|
|
1939
|
+
channelId: string;
|
|
1940
|
+
/**
|
|
1941
|
+
* 发送消息携带的用户信息
|
|
1942
|
+
*/
|
|
1943
|
+
user?: IUserProfile;
|
|
1944
|
+
/**
|
|
1945
|
+
* Push 信息
|
|
1946
|
+
*/
|
|
1947
|
+
pushContent?: string;
|
|
1948
|
+
/**
|
|
1949
|
+
* 原消息体
|
|
1950
|
+
*/
|
|
1951
|
+
oriContent?: any;
|
|
1952
|
+
/**
|
|
1953
|
+
* 是否发送静默消息
|
|
1954
|
+
* @description
|
|
1955
|
+
* 当值为 `true` 时,服务器将不会发送 Push 信息,移动端也不会弹出本地通知提醒
|
|
1956
|
+
*/
|
|
1957
|
+
disableNotification?: boolean;
|
|
1958
|
+
/**
|
|
1959
|
+
* 移动端推送配置
|
|
1960
|
+
*/
|
|
1961
|
+
pushConfig?: IPushConfig;
|
|
1962
|
+
/**
|
|
1963
|
+
* 其他拓展信息
|
|
1964
|
+
*/
|
|
1965
|
+
extra?: string;
|
|
2022
1966
|
/**
|
|
2023
|
-
*
|
|
2024
|
-
* @description 公有云字段,即私有云配置中的 `uploadVideoTimeLimit`
|
|
1967
|
+
* 是否删除原始消息(在移动端会使用到),为 true 时移动端会不显示小灰条提示
|
|
2025
1968
|
*/
|
|
2026
|
-
|
|
1969
|
+
isDelete?: boolean;
|
|
1970
|
+
}
|
|
1971
|
+
interface IRecallMsgContent {
|
|
1972
|
+
conversationType: number;
|
|
1973
|
+
targetId: string;
|
|
1974
|
+
sentTime: number;
|
|
1975
|
+
messageUId: string;
|
|
2027
1976
|
/**
|
|
2028
|
-
*
|
|
2029
|
-
*
|
|
2030
|
-
|
|
2031
|
-
|
|
1977
|
+
* 会话组织机构标识
|
|
1978
|
+
* 默认值未 空字符串
|
|
1979
|
+
*/
|
|
1980
|
+
channelId: string;
|
|
2032
1981
|
/**
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
1982
|
+
* 其他拓展信息
|
|
1983
|
+
*/
|
|
1984
|
+
extra?: string;
|
|
2036
1985
|
/**
|
|
2037
|
-
*
|
|
2038
|
-
|
|
1986
|
+
* 发送消息携带的用户信息
|
|
1987
|
+
*/
|
|
1988
|
+
user?: IUserProfile;
|
|
1989
|
+
/**
|
|
1990
|
+
* 是否删除原始消息(在移动端会使用到),为 true 时移动端会不显示小灰条提示
|
|
2039
1991
|
*/
|
|
2040
|
-
|
|
1992
|
+
isDelete?: boolean;
|
|
1993
|
+
}
|
|
1994
|
+
/**
|
|
1995
|
+
* 发送消息时的可选项信息
|
|
1996
|
+
*/
|
|
1997
|
+
interface ISendMsgOptions {
|
|
2041
1998
|
/**
|
|
2042
|
-
*
|
|
2043
|
-
* @description 公有云独有配置
|
|
2044
|
-
* @example `gz.bcebos.com`
|
|
1999
|
+
* 消息类型,即消息结构的 ObjectName
|
|
2045
2000
|
*/
|
|
2046
|
-
|
|
2001
|
+
messageType: string;
|
|
2047
2002
|
/**
|
|
2048
|
-
*
|
|
2049
|
-
* @example "[{"qiniu":"upload.qiniup.com","p":"1"},{"baidu":"gz.bcebos.com","p":"2"},{"aliyun":"oss-cn-beijing.aliyuncs.com","p":"3"}]"
|
|
2003
|
+
* 消息内容
|
|
2050
2004
|
*/
|
|
2051
|
-
|
|
2005
|
+
content: {
|
|
2006
|
+
/**
|
|
2007
|
+
* 消息内容 key-value,最终会进行 JSON 序列化后发送
|
|
2008
|
+
*/
|
|
2009
|
+
[key: string]: any;
|
|
2010
|
+
/**
|
|
2011
|
+
* 消息可携带的用户数据
|
|
2012
|
+
*/
|
|
2013
|
+
user?: IUserProfile;
|
|
2014
|
+
/**
|
|
2015
|
+
* 其他拓展信息
|
|
2016
|
+
*/
|
|
2017
|
+
extra?: string;
|
|
2018
|
+
};
|
|
2052
2019
|
/**
|
|
2053
|
-
*
|
|
2020
|
+
* 是否存储
|
|
2021
|
+
* @description 只在发送未注册过的自定义消息时有效,否则使用注册时的配置
|
|
2054
2022
|
*/
|
|
2055
|
-
|
|
2023
|
+
isPersited?: boolean;
|
|
2056
2024
|
/**
|
|
2057
|
-
*
|
|
2025
|
+
* 是否计数
|
|
2026
|
+
* @description 只在发送未注册过的自定义消息时有效,否则使用注册时的配置
|
|
2058
2027
|
*/
|
|
2059
|
-
|
|
2028
|
+
isCounted?: boolean;
|
|
2060
2029
|
/**
|
|
2061
|
-
*
|
|
2030
|
+
* 是否是状态消息,一般为无需注册的自定义消息
|
|
2031
|
+
* @description
|
|
2032
|
+
* 1. 状态消息只有 pub,没有 ack 应答
|
|
2033
|
+
* 2. 状态消息默认不存储,不计数,`isPersited` 与 `isCounted` 配置将失效
|
|
2062
2034
|
*/
|
|
2063
|
-
|
|
2035
|
+
isStatusMessage?: boolean;
|
|
2064
2036
|
/**
|
|
2065
|
-
*
|
|
2037
|
+
* 是否发送静默消息
|
|
2038
|
+
* @description
|
|
2039
|
+
* 当值为 `true` 时,服务器将不会发送 Push 信息,移动端也不会弹出本地通知提醒
|
|
2066
2040
|
*/
|
|
2067
|
-
|
|
2041
|
+
disableNotification?: boolean;
|
|
2068
2042
|
/**
|
|
2069
|
-
*
|
|
2043
|
+
* Push 信息
|
|
2070
2044
|
*/
|
|
2071
|
-
|
|
2045
|
+
pushContent?: string;
|
|
2072
2046
|
/**
|
|
2073
|
-
*
|
|
2047
|
+
* Push 通知携带的附加信息
|
|
2074
2048
|
*/
|
|
2075
|
-
|
|
2049
|
+
pushData?: string;
|
|
2076
2050
|
/**
|
|
2077
|
-
* @
|
|
2051
|
+
* 是否为 @ 消息,只当 conversationType 值为 `ConversationType.GROUP` 时有效
|
|
2078
2052
|
*/
|
|
2079
|
-
|
|
2053
|
+
isMentioned?: boolean;
|
|
2080
2054
|
/**
|
|
2081
|
-
*
|
|
2055
|
+
* `@` 消息类型
|
|
2056
|
+
* @description `1: @ 所有人 2: @ 指定用户`
|
|
2082
2057
|
*/
|
|
2083
|
-
|
|
2058
|
+
mentionedType?: 1 | 2;
|
|
2084
2059
|
/**
|
|
2085
|
-
*
|
|
2086
|
-
* @deprecated 已废弃
|
|
2060
|
+
* 被 @ 的用户 Id 列表,当 `mentionedType` 值为 `1` 时,该值可为空
|
|
2087
2061
|
*/
|
|
2088
|
-
|
|
2062
|
+
mentionedUserIdList?: string[];
|
|
2089
2063
|
/**
|
|
2090
|
-
*
|
|
2091
|
-
* @deprecated 已废弃
|
|
2064
|
+
* 用于发送群定向消息,只当 conversationType 值为 `ConversationType.GROUP` 时有效
|
|
2092
2065
|
*/
|
|
2093
|
-
|
|
2066
|
+
directionalUserIdList?: string[];
|
|
2094
2067
|
/**
|
|
2095
|
-
*
|
|
2068
|
+
* 当对方为 iOS 设备且未在线时,其将收到 Voip Push. 此配置对 Android 无影响
|
|
2096
2069
|
*/
|
|
2097
|
-
|
|
2070
|
+
isVoipPush?: boolean;
|
|
2098
2071
|
/**
|
|
2099
|
-
*
|
|
2072
|
+
* 消息是否支持拓展内容
|
|
2100
2073
|
*/
|
|
2101
|
-
|
|
2074
|
+
canIncludeExpansion?: boolean;
|
|
2102
2075
|
/**
|
|
2103
|
-
*
|
|
2076
|
+
* 消息拓展内容数据
|
|
2104
2077
|
*/
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
/**
|
|
2109
|
-
* 聊天室成员进入和退出状态
|
|
2110
|
-
*/
|
|
2111
|
-
declare enum ChatroomUserChangeType {
|
|
2112
|
-
QUIT = 0,
|
|
2113
|
-
JOIN = 1
|
|
2114
|
-
}
|
|
2115
|
-
|
|
2116
|
-
interface IChatroomEntryListenerData {
|
|
2078
|
+
expansion?: {
|
|
2079
|
+
[key: string]: string;
|
|
2080
|
+
};
|
|
2117
2081
|
/**
|
|
2118
|
-
*
|
|
2119
|
-
|
|
2120
|
-
|
|
2082
|
+
* 黑/白名单
|
|
2083
|
+
* @todo 功能未知,需确认
|
|
2084
|
+
*/
|
|
2085
|
+
isFilerWhiteBlacklist?: boolean;
|
|
2121
2086
|
/**
|
|
2122
|
-
*
|
|
2087
|
+
* 移动端推送配置
|
|
2123
2088
|
*/
|
|
2124
|
-
|
|
2089
|
+
pushConfig?: IPushConfig;
|
|
2125
2090
|
/**
|
|
2126
|
-
*
|
|
2091
|
+
* 会话业务标识
|
|
2092
|
+
* @description
|
|
2093
|
+
* 20 个字符长度限制
|
|
2127
2094
|
*/
|
|
2128
|
-
|
|
2095
|
+
channelId?: string;
|
|
2129
2096
|
/**
|
|
2130
|
-
*
|
|
2131
|
-
|
|
2132
|
-
|
|
2097
|
+
* 客户端的消息标识
|
|
2098
|
+
*/
|
|
2099
|
+
messageId?: string;
|
|
2133
2100
|
/**
|
|
2134
|
-
*
|
|
2135
|
-
|
|
2136
|
-
|
|
2101
|
+
* 超级群专有字段,是否断档,若断档需要客户判断是否拉取
|
|
2102
|
+
*/
|
|
2103
|
+
isInterrupt?: boolean;
|
|
2137
2104
|
}
|
|
2138
|
-
interface
|
|
2105
|
+
interface IInsertMsgOptions {
|
|
2106
|
+
senderUserId: string;
|
|
2107
|
+
messageType: string;
|
|
2108
|
+
content: any;
|
|
2109
|
+
messageDirection: number;
|
|
2110
|
+
readStatus?: number;
|
|
2111
|
+
sentStatus?: number;
|
|
2112
|
+
sentTime?: number;
|
|
2113
|
+
searchContent?: string;
|
|
2114
|
+
isUnread?: boolean;
|
|
2115
|
+
messageUId?: string;
|
|
2116
|
+
disableNotification?: boolean;
|
|
2117
|
+
canIncludeExpansion?: boolean;
|
|
2118
|
+
expansionMsg?: string;
|
|
2119
|
+
channelId: string;
|
|
2120
|
+
}
|
|
2121
|
+
interface ISendExMsgOptions {
|
|
2122
|
+
channelId: string;
|
|
2123
|
+
conversationType: ConversationType;
|
|
2124
|
+
targetId: string;
|
|
2139
2125
|
/**
|
|
2140
|
-
*
|
|
2126
|
+
* 消息 ID
|
|
2141
2127
|
*/
|
|
2142
|
-
|
|
2128
|
+
messageUId: string;
|
|
2143
2129
|
/**
|
|
2144
|
-
*
|
|
2130
|
+
* 原始消息是否支持扩展的字段
|
|
2145
2131
|
*/
|
|
2146
|
-
|
|
2147
|
-
}
|
|
2148
|
-
interface IChatroomRejoinedSuccessed {
|
|
2132
|
+
canIncludeExpansion: boolean;
|
|
2149
2133
|
/**
|
|
2150
|
-
*
|
|
2134
|
+
* 删除的 keys
|
|
2151
2135
|
*/
|
|
2152
|
-
|
|
2136
|
+
keys?: string[];
|
|
2153
2137
|
/**
|
|
2154
|
-
*
|
|
2138
|
+
* 扩展对象
|
|
2155
2139
|
*/
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
interface IChatroomUserChangeInfo {
|
|
2159
|
-
users: {
|
|
2160
|
-
[userId: string]: ChatroomUserChangeType;
|
|
2140
|
+
expansion?: {
|
|
2141
|
+
[key: string]: string;
|
|
2161
2142
|
};
|
|
2162
|
-
chatroomId: string;
|
|
2163
|
-
}
|
|
2164
|
-
declare type IChatroomRejoinedInfo = IChatroomRejoinedFailed | IChatroomRejoinedSuccessed;
|
|
2165
|
-
/**
|
|
2166
|
-
* 聊天室信息
|
|
2167
|
-
*/
|
|
2168
|
-
interface IChatroomListenerData {
|
|
2169
2143
|
/**
|
|
2170
|
-
*
|
|
2144
|
+
* 是否删除所有扩展
|
|
2171
2145
|
*/
|
|
2172
|
-
|
|
2146
|
+
removeAll?: boolean;
|
|
2173
2147
|
/**
|
|
2174
|
-
*
|
|
2148
|
+
* 原始消息的扩展
|
|
2175
2149
|
*/
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
*/
|
|
2180
|
-
userChange?: IChatroomUserChangeInfo;
|
|
2181
|
-
/**
|
|
2182
|
-
* 聊天室销毁
|
|
2183
|
-
*/
|
|
2184
|
-
chatroomDestroyed?: string;
|
|
2150
|
+
originExpansion?: {
|
|
2151
|
+
[key: string]: string;
|
|
2152
|
+
} | null;
|
|
2185
2153
|
}
|
|
2186
|
-
interface
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
*/
|
|
2194
|
-
value: string;
|
|
2154
|
+
interface IUltraExMsgOptions {
|
|
2155
|
+
canIncludeExpansion: boolean;
|
|
2156
|
+
channelId: string;
|
|
2157
|
+
conversationType: ConversationType;
|
|
2158
|
+
targetId: string;
|
|
2159
|
+
messageUId: string;
|
|
2160
|
+
sendTime: number;
|
|
2195
2161
|
/**
|
|
2196
|
-
*
|
|
2197
|
-
|
|
2198
|
-
|
|
2162
|
+
* 删除的 keys
|
|
2163
|
+
*/
|
|
2164
|
+
keys?: string[];
|
|
2199
2165
|
/**
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2166
|
+
* 扩展对象
|
|
2167
|
+
*/
|
|
2168
|
+
expansion?: {
|
|
2169
|
+
[key: string]: string;
|
|
2170
|
+
};
|
|
2203
2171
|
/**
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2172
|
+
* 是否删除所有扩展
|
|
2173
|
+
*/
|
|
2174
|
+
removeAll?: boolean;
|
|
2207
2175
|
}
|
|
2208
|
-
interface
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2176
|
+
interface IUltraModifyMsgOptions {
|
|
2177
|
+
canIncludeExpansion?: boolean;
|
|
2178
|
+
channelId: string;
|
|
2179
|
+
conversationType: ConversationType;
|
|
2180
|
+
targetId: string;
|
|
2181
|
+
messageUId: string;
|
|
2182
|
+
sendTime: number;
|
|
2213
2183
|
/**
|
|
2214
|
-
*
|
|
2184
|
+
* 消息内容
|
|
2215
2185
|
*/
|
|
2216
|
-
|
|
2186
|
+
content: {
|
|
2187
|
+
/**
|
|
2188
|
+
* 消息内容 key-value,最终会进行 JSON 序列化后发送
|
|
2189
|
+
*/
|
|
2190
|
+
[key: string]: any;
|
|
2191
|
+
/**
|
|
2192
|
+
* 消息可携带的用户数据
|
|
2193
|
+
*/
|
|
2194
|
+
user?: IUserProfile;
|
|
2195
|
+
/**
|
|
2196
|
+
* 其他拓展信息
|
|
2197
|
+
*/
|
|
2198
|
+
extra?: string;
|
|
2199
|
+
};
|
|
2217
2200
|
}
|
|
2218
|
-
interface
|
|
2201
|
+
interface IUltraMsgQueryInfo {
|
|
2202
|
+
sendTime: number;
|
|
2203
|
+
messageUId: string;
|
|
2204
|
+
channelId?: string;
|
|
2205
|
+
}
|
|
2206
|
+
interface IUltraMsgQueryOptions {
|
|
2207
|
+
conversationType: ConversationType;
|
|
2208
|
+
targetId: string;
|
|
2209
|
+
messages: IUltraMsgQueryInfo[];
|
|
2210
|
+
}
|
|
2211
|
+
/**
|
|
2212
|
+
* 被拦截的消息信息
|
|
2213
|
+
*/
|
|
2214
|
+
interface IBlockedMessageInfo {
|
|
2215
|
+
blockedMessageUId: string;
|
|
2216
|
+
conversationType: number;
|
|
2217
|
+
targetId: string;
|
|
2218
|
+
channelId: string;
|
|
2219
|
+
blockType: MessageBlockType;
|
|
2220
|
+
extra: any;
|
|
2221
|
+
}
|
|
2222
|
+
|
|
2223
|
+
/**
|
|
2224
|
+
* TODO: 确定对外暴露的必要性
|
|
2225
|
+
* @deprecated
|
|
2226
|
+
*/
|
|
2227
|
+
declare const DelayTimer: {
|
|
2228
|
+
_delayTime: number;
|
|
2219
2229
|
/**
|
|
2220
|
-
*
|
|
2221
|
-
* @
|
|
2230
|
+
* 方法并未引用,getTimer 实际返回值始终为 Date.now()
|
|
2231
|
+
* @deprecated
|
|
2222
2232
|
*/
|
|
2223
|
-
|
|
2233
|
+
setTime: (time: number) => void;
|
|
2234
|
+
getTime: () => number;
|
|
2235
|
+
};
|
|
2236
|
+
|
|
2237
|
+
/**
|
|
2238
|
+
* 从服务器拉取到的会话数据结构
|
|
2239
|
+
*/
|
|
2240
|
+
interface IReceivedConversation {
|
|
2224
2241
|
/**
|
|
2225
|
-
*
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
}
|
|
2229
|
-
interface IRemoveChatroomEntry {
|
|
2242
|
+
* 会话的业务标识
|
|
2243
|
+
*/
|
|
2244
|
+
channelId?: string;
|
|
2230
2245
|
/**
|
|
2231
|
-
*
|
|
2246
|
+
* 会话类型
|
|
2232
2247
|
*/
|
|
2233
|
-
|
|
2248
|
+
conversationType: ConversationType;
|
|
2234
2249
|
/**
|
|
2235
|
-
*
|
|
2250
|
+
* 会话 Id
|
|
2251
|
+
* @description
|
|
2252
|
+
* 1. 当 `conversationType` 为 `ConversationType.GROUP` 时,该值为群组 Id
|
|
2253
|
+
* 1. 当 `conversationType` 为 `ConversationType.PRIVATE` 时,该值为对方用户 Id
|
|
2236
2254
|
*/
|
|
2237
|
-
|
|
2255
|
+
targetId: string;
|
|
2238
2256
|
/**
|
|
2239
|
-
*
|
|
2257
|
+
* 当前会话的未读消息数
|
|
2240
2258
|
*/
|
|
2241
|
-
|
|
2242
|
-
}
|
|
2243
|
-
interface IRemoveChatroomEntries {
|
|
2259
|
+
unreadMessageCount: number;
|
|
2244
2260
|
/**
|
|
2245
|
-
*
|
|
2261
|
+
* 会话中的最后一条消息
|
|
2246
2262
|
*/
|
|
2247
|
-
|
|
2248
|
-
key: string;
|
|
2249
|
-
}[];
|
|
2263
|
+
latestMessage: IReceivedMessage | null;
|
|
2250
2264
|
/**
|
|
2251
|
-
*
|
|
2265
|
+
* 是否包含 @ 自己的消息,此数据仅在 `conversationType` 为 `ConversationType.GROUP` 时有效
|
|
2252
2266
|
*/
|
|
2267
|
+
hasMentioned?: boolean;
|
|
2253
2268
|
/**
|
|
2254
|
-
*
|
|
2269
|
+
* 消息中的 @ 数据,仅在 `conversationType` 为 `ConversationType.GROUP` 时有效
|
|
2255
2270
|
*/
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2271
|
+
mentionedInfo?: {
|
|
2272
|
+
/**
|
|
2273
|
+
* `@ 类型,其中 1 为 @ 所有人,2 为 @ 部分人`
|
|
2274
|
+
*/
|
|
2275
|
+
type: 1 | 2;
|
|
2276
|
+
/**
|
|
2277
|
+
* 被 @ 的用户 Id 列表,仅在 `type` 为 `2` 时有效
|
|
2278
|
+
*/
|
|
2279
|
+
userIdList: string[];
|
|
2280
|
+
} | null;
|
|
2259
2281
|
/**
|
|
2260
|
-
*
|
|
2261
|
-
*
|
|
2262
|
-
*
|
|
2282
|
+
* 会话免打扰状态
|
|
2283
|
+
* @description
|
|
2284
|
+
* 1. 已开启免打扰
|
|
2285
|
+
* 2. 未开启免打扰
|
|
2263
2286
|
*/
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
value: string;
|
|
2267
|
-
}[];
|
|
2287
|
+
notificationStatus: NotificationStatus;
|
|
2288
|
+
notificationLevel?: NotificationLevel;
|
|
2268
2289
|
/**
|
|
2269
|
-
*
|
|
2290
|
+
* 会话是否已置顶
|
|
2270
2291
|
*/
|
|
2292
|
+
isTop: boolean;
|
|
2271
2293
|
/**
|
|
2272
|
-
*
|
|
2294
|
+
* 会话中消息的最后未读时间
|
|
2273
2295
|
*/
|
|
2274
|
-
|
|
2296
|
+
lastUnreadTime: number;
|
|
2275
2297
|
/**
|
|
2276
|
-
*
|
|
2298
|
+
* 搜索到的会话数量
|
|
2277
2299
|
*/
|
|
2278
|
-
|
|
2300
|
+
matchCount?: number;
|
|
2279
2301
|
/**
|
|
2280
|
-
*
|
|
2302
|
+
* 会话项变更时间戳
|
|
2281
2303
|
*/
|
|
2282
|
-
|
|
2304
|
+
versionTime?: number;
|
|
2305
|
+
unreadMentionedCount?: number;
|
|
2283
2306
|
}
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2307
|
+
interface IReceivedConversationByTag extends IReceivedConversation {
|
|
2308
|
+
isTopInTag: boolean;
|
|
2309
|
+
}
|
|
2310
|
+
interface IUltraGroupConversation extends IReceivedConversation {
|
|
2311
|
+
channelType?: UltraGroupChannelType;
|
|
2312
|
+
}
|
|
2313
|
+
/**
|
|
2314
|
+
* 设置会话状态 参数 信息
|
|
2315
|
+
*/
|
|
2316
|
+
interface ISetConversationStatusOptions {
|
|
2317
|
+
conversationType: ConversationType;
|
|
2318
|
+
targetId: string;
|
|
2319
|
+
isTop?: boolean;
|
|
2320
|
+
notificationStatus?: number;
|
|
2321
|
+
notificationLevel?: number;
|
|
2322
|
+
channelId?: string;
|
|
2323
|
+
}
|
|
2324
|
+
interface IUpdatedConversation {
|
|
2325
|
+
updatedItems: {
|
|
2326
|
+
[key: string]: {
|
|
2327
|
+
time: number;
|
|
2328
|
+
val: any;
|
|
2329
|
+
};
|
|
2330
|
+
};
|
|
2331
|
+
conversationType: number;
|
|
2332
|
+
targetId: string;
|
|
2333
|
+
latestMessage?: IReceivedMessage;
|
|
2334
|
+
unreadMessageCount?: number;
|
|
2335
|
+
hasMentioned?: boolean;
|
|
2336
|
+
mentionedInfo?: {
|
|
2337
|
+
/**
|
|
2338
|
+
* `@ 类型,其中 1 为 @ 所有人,2 为 @ 部分人`
|
|
2339
|
+
*/
|
|
2340
|
+
type: 1 | 2;
|
|
2341
|
+
/**
|
|
2342
|
+
* 被 @ 的用户 Id 列表,仅在 `type` 为 `2` 时有效
|
|
2343
|
+
*/
|
|
2344
|
+
userIdList: string[];
|
|
2345
|
+
};
|
|
2346
|
+
lastUnreadTime?: number;
|
|
2347
|
+
notificationStatus?: number;
|
|
2348
|
+
notificationLevel?: number;
|
|
2349
|
+
isTop?: boolean;
|
|
2302
2350
|
/**
|
|
2303
|
-
*
|
|
2351
|
+
* 会话标识
|
|
2304
2352
|
*/
|
|
2305
|
-
|
|
2353
|
+
channelId?: string;
|
|
2354
|
+
tags?: IUpdatedConversation[];
|
|
2355
|
+
versionTime?: number;
|
|
2306
2356
|
/**
|
|
2307
|
-
*
|
|
2357
|
+
* @ 消息未读数
|
|
2308
2358
|
*/
|
|
2309
|
-
|
|
2359
|
+
unreadMentionedCount?: number;
|
|
2360
|
+
}
|
|
2361
|
+
interface IBaseConversationInfo {
|
|
2362
|
+
conversationType: ConversationType;
|
|
2363
|
+
targetId: string;
|
|
2364
|
+
channelId: string;
|
|
2365
|
+
}
|
|
2366
|
+
interface IConversationState extends IBaseConversationInfo {
|
|
2367
|
+
unreadCount: number;
|
|
2368
|
+
unreadMentionedCount: number;
|
|
2369
|
+
}
|
|
2370
|
+
/** 指定超级群会话传参 */
|
|
2371
|
+
interface IUltraGroupOption {
|
|
2372
|
+
targetId: string;
|
|
2373
|
+
channelId?: string;
|
|
2374
|
+
}
|
|
2375
|
+
interface IGetUltraGroupListOption {
|
|
2376
|
+
targetId?: string;
|
|
2377
|
+
channelType?: UltraGroupChannelType;
|
|
2378
|
+
}
|
|
2379
|
+
/**
|
|
2380
|
+
* 超级群频道变更通知内容
|
|
2381
|
+
*/
|
|
2382
|
+
interface IUltraChannelChangeInfo {
|
|
2383
|
+
targetId: string;
|
|
2384
|
+
channelId: string;
|
|
2385
|
+
channelType: UltraGroupChannelType;
|
|
2386
|
+
changeType: UltraGroupChannelChangeType;
|
|
2387
|
+
}
|
|
2388
|
+
/**
|
|
2389
|
+
* 超级群私有频道用户被踢出白名单通知内容
|
|
2390
|
+
*/
|
|
2391
|
+
interface IUltraChannelUserKickedInfo {
|
|
2392
|
+
targetId: string;
|
|
2393
|
+
channelId: string;
|
|
2394
|
+
channelType: UltraGroupChannelType;
|
|
2395
|
+
userId: string;
|
|
2396
|
+
}
|
|
2397
|
+
/**
|
|
2398
|
+
* 超级群频道被删除通知内容
|
|
2399
|
+
*/
|
|
2400
|
+
interface IUltraChannelDeleteInfo {
|
|
2401
|
+
targetId: string;
|
|
2402
|
+
channelId: string;
|
|
2403
|
+
channelType: UltraGroupChannelType;
|
|
2404
|
+
deleteTime: number;
|
|
2405
|
+
}
|
|
2406
|
+
|
|
2407
|
+
/**
|
|
2408
|
+
* 导航信息数据就结构
|
|
2409
|
+
*/
|
|
2410
|
+
interface INaviInfo {
|
|
2310
2411
|
/**
|
|
2311
|
-
*
|
|
2412
|
+
* Navi 数据请求响应码,200 为成功请求
|
|
2312
2413
|
*/
|
|
2313
|
-
|
|
2414
|
+
code: number;
|
|
2314
2415
|
/**
|
|
2315
|
-
*
|
|
2416
|
+
* 获取 Navi 数据失败时的提示信息
|
|
2316
2417
|
*/
|
|
2317
|
-
|
|
2418
|
+
errorMessage?: string;
|
|
2318
2419
|
/**
|
|
2319
|
-
*
|
|
2420
|
+
* 获取 Navi 数据失败时的请求 url 信息
|
|
2320
2421
|
*/
|
|
2321
|
-
|
|
2422
|
+
url?: string;
|
|
2322
2423
|
/**
|
|
2323
|
-
*
|
|
2424
|
+
* 请求导航数据时使用的协议:http / https
|
|
2425
|
+
* @description 该字段为 SDK 内增加的字段,导航接口数据中不存在
|
|
2324
2426
|
*/
|
|
2325
|
-
|
|
2427
|
+
protocol: 'http' | 'https';
|
|
2326
2428
|
/**
|
|
2327
|
-
*
|
|
2429
|
+
* 获取导航时使用的 userId,小程序不走导航,故拿不到 userId
|
|
2328
2430
|
*/
|
|
2329
|
-
|
|
2431
|
+
userId?: string;
|
|
2330
2432
|
/**
|
|
2331
|
-
*
|
|
2433
|
+
* CMP 服务 Websocket 连接地址,包含域名与端口,不含 ws 或 wss 协议头
|
|
2434
|
+
* @example a.domain.com:443
|
|
2332
2435
|
*/
|
|
2333
|
-
|
|
2436
|
+
server: string;
|
|
2334
2437
|
/**
|
|
2335
|
-
*
|
|
2438
|
+
* 备用 CMP 服务地址,包含域名与端口,不含 ws 或 wss 协议头,多个备用地址以 ',' 分割
|
|
2439
|
+
* @example a.domain.com:443,b.domain.com:443
|
|
2336
2440
|
*/
|
|
2337
|
-
|
|
2441
|
+
backupServer?: string;
|
|
2338
2442
|
/**
|
|
2339
|
-
*
|
|
2443
|
+
* 备用 CMP 服务地址,POST 请求 TCP 连接返回的是 bs 字段,非 backupServer 字段
|
|
2340
2444
|
*/
|
|
2341
|
-
|
|
2445
|
+
bs?: string;
|
|
2342
2446
|
/**
|
|
2343
|
-
*
|
|
2447
|
+
* RTC 服务配置,其值可能为 null、无效字符串、有效 JSON 字符串
|
|
2448
|
+
* 1. 公有云未开通音视频时,值为 null
|
|
2449
|
+
* 2. 私有云无配置时为 `{ "strategy": 0 }`
|
|
2344
2450
|
*/
|
|
2345
|
-
|
|
2451
|
+
voipCallInfo: string | null;
|
|
2346
2452
|
/**
|
|
2347
|
-
*
|
|
2453
|
+
* 聊天室 kv 存储开关
|
|
2454
|
+
* @todo 需确认详细有效值
|
|
2455
|
+
* @description 公有云独有配置
|
|
2348
2456
|
*/
|
|
2349
|
-
|
|
2457
|
+
kvStorage: number;
|
|
2350
2458
|
/**
|
|
2351
|
-
*
|
|
2459
|
+
* HttpDNS 功能开关,在 web 端无效
|
|
2460
|
+
* @description 公有云独有配置
|
|
2352
2461
|
*/
|
|
2353
|
-
|
|
2462
|
+
openHttpDNS: boolean;
|
|
2354
2463
|
/**
|
|
2355
|
-
*
|
|
2464
|
+
* 历史消息云存储功能开关
|
|
2465
|
+
* @description
|
|
2466
|
+
* 1. 公有云通过 `developer.rongcloud.cn` 管理后台 `单群聊消息云端存储` 功能开关进行配置
|
|
2467
|
+
* 2. 私有云默认为 `true`
|
|
2356
2468
|
*/
|
|
2357
|
-
|
|
2469
|
+
historyMsg: boolean;
|
|
2358
2470
|
/**
|
|
2359
|
-
*
|
|
2471
|
+
* 聊天室历史消息开关
|
|
2472
|
+
* @description
|
|
2473
|
+
* 1. 私有云对聊天室功能支持有限,默认为 `false`
|
|
2474
|
+
* 2. TODO: 公有云配置待确认
|
|
2360
2475
|
*/
|
|
2361
|
-
|
|
2476
|
+
chatroomMsg: boolean;
|
|
2362
2477
|
/**
|
|
2363
|
-
*
|
|
2478
|
+
* 文件服务器地址
|
|
2479
|
+
* @description
|
|
2480
|
+
* 1. 公有云下,该地址为七牛云服务器地址
|
|
2481
|
+
* 2. 私有云下,该地址为私有云自研文件服务器地址
|
|
2364
2482
|
*/
|
|
2365
|
-
|
|
2366
|
-
}
|
|
2367
|
-
|
|
2368
|
-
interface IRTCRoomInfo {
|
|
2369
|
-
roomId: string;
|
|
2370
|
-
roomData: unknown[];
|
|
2371
|
-
userCount: number;
|
|
2372
|
-
list: unknown[];
|
|
2373
|
-
}
|
|
2374
|
-
interface IRtcTokenData {
|
|
2375
|
-
rtcToken: string;
|
|
2376
|
-
}
|
|
2377
|
-
interface IRTCUsers {
|
|
2378
|
-
users: {
|
|
2379
|
-
[userId: string]: {
|
|
2380
|
-
/**
|
|
2381
|
-
* 发布的资源数据,是一个 JSON 字符串,解析后为发布的资源列表
|
|
2382
|
-
*/
|
|
2383
|
-
uris?: string;
|
|
2384
|
-
/**
|
|
2385
|
-
* 加房间的身份标识,保存主房间 roomId
|
|
2386
|
-
*/
|
|
2387
|
-
extra?: string;
|
|
2388
|
-
};
|
|
2389
|
-
};
|
|
2390
|
-
}
|
|
2391
|
-
interface IJoinRTCRoomData extends IRTCUsers {
|
|
2392
|
-
token: string;
|
|
2393
|
-
sessionId: string;
|
|
2394
|
-
roomInfo: {
|
|
2395
|
-
key: string;
|
|
2396
|
-
value: string;
|
|
2397
|
-
}[];
|
|
2398
|
-
kvEntries: IServerRTCRoomEntry[];
|
|
2399
|
-
offlineKickTime: number;
|
|
2400
|
-
}
|
|
2401
|
-
interface KVString {
|
|
2402
|
-
[key: string]: string;
|
|
2403
|
-
}
|
|
2404
|
-
/**
|
|
2405
|
-
* 设置 RTC 人员 inner、outer 数据
|
|
2406
|
-
*/
|
|
2407
|
-
interface IRTCUserData {
|
|
2408
|
-
[key: string]: string;
|
|
2409
|
-
}
|
|
2410
|
-
|
|
2411
|
-
interface IAsyncRes<T = any> {
|
|
2483
|
+
uploadServer: string;
|
|
2412
2484
|
/**
|
|
2413
|
-
*
|
|
2485
|
+
* 实时位置共享配置,web 端无需处理
|
|
2414
2486
|
*/
|
|
2415
|
-
|
|
2487
|
+
location: null | string;
|
|
2416
2488
|
/**
|
|
2417
|
-
*
|
|
2489
|
+
* 实时日志上传开关
|
|
2490
|
+
* @todo 需确认有效值及作用
|
|
2418
2491
|
*/
|
|
2419
|
-
|
|
2492
|
+
monitor: number;
|
|
2420
2493
|
/**
|
|
2421
|
-
*
|
|
2494
|
+
* 是否允许加入多聊天室开关
|
|
2422
2495
|
*/
|
|
2423
|
-
|
|
2424
|
-
}
|
|
2425
|
-
/**
|
|
2426
|
-
* 异步任务结果定义
|
|
2427
|
-
* @description
|
|
2428
|
-
* 通过 `Promise.resolve` 来处理预期内的异常,进而通过 Uncatch Promise Error 暴露预期外的异常
|
|
2429
|
-
*/
|
|
2430
|
-
declare type IPromiseResult<T> = Promise<IAsyncRes<T>>;
|
|
2431
|
-
interface IConnectResult {
|
|
2496
|
+
joinMChrm: boolean;
|
|
2432
2497
|
/**
|
|
2433
|
-
*
|
|
2498
|
+
* 是否开启公众号功能:`0` 为未开启,`1` 为已开启
|
|
2434
2499
|
*/
|
|
2435
|
-
|
|
2500
|
+
openMp: 0 | 1;
|
|
2436
2501
|
/**
|
|
2437
|
-
*
|
|
2502
|
+
* 是否开启用户级配置,若开启,需连接成功后立即拉取实时配置,0 | 1
|
|
2503
|
+
* @description
|
|
2504
|
+
* 配置来源:
|
|
2505
|
+
* 1. 导航
|
|
2506
|
+
* 2. 服务端实时下发
|
|
2507
|
+
* 已有配置字段:
|
|
2508
|
+
* 1. Lan. 推送使用的语言设置,用户端可自定义修改. Web 端未做设置, 只做接收
|
|
2509
|
+
* 2. ShPushSwit. 推送是否显示详情设置,用户端可自定义修改. Web 端未做设置, 只做接收
|
|
2510
|
+
* 3. MobPushSwit: Web/PC 在线,移动端不在线是否发送推送开关,用户端可自定义修改. Web 端未做设置, 只做接收
|
|
2511
|
+
* 4. OffMsgDur: 离线消息保存天数,设置天数不可大于App级对应配置,用户端可自定义修改. Web 端未做设置, 只做接收
|
|
2512
|
+
* 5. VoipInfo: 音视频相关配置,用户端不可自定义修改. 由服务端决定,与导航下发格式一致
|
|
2513
|
+
* @todo 需确认公有云与私有云区别
|
|
2438
2514
|
*/
|
|
2439
|
-
|
|
2440
|
-
}
|
|
2441
|
-
|
|
2442
|
-
declare enum HttpMethod {
|
|
2443
|
-
GET = "GET",
|
|
2444
|
-
POST = "POST"
|
|
2445
|
-
}
|
|
2446
|
-
interface IRequest {
|
|
2447
|
-
url: string;
|
|
2515
|
+
openUS: 0 | 1;
|
|
2448
2516
|
/**
|
|
2449
|
-
*
|
|
2517
|
+
* 超级群功能开关,1表示开
|
|
2450
2518
|
*/
|
|
2451
|
-
|
|
2519
|
+
ugMsg?: 0 | 1;
|
|
2452
2520
|
/**
|
|
2453
|
-
*
|
|
2521
|
+
* 群离线消息最大下发条数,`0` 为关闭
|
|
2522
|
+
* @description 公有云独有配合
|
|
2454
2523
|
*/
|
|
2455
|
-
|
|
2456
|
-
[key: string]: string | number | null;
|
|
2457
|
-
};
|
|
2524
|
+
grpMsgLimit: number;
|
|
2458
2525
|
/**
|
|
2459
|
-
*
|
|
2526
|
+
* 消息加密开关,0 为关闭
|
|
2527
|
+
* @todo
|
|
2528
|
+
* 1. 确定其控制的功能
|
|
2529
|
+
* 2. 确定 web 相关性
|
|
2460
2530
|
*/
|
|
2461
|
-
|
|
2462
|
-
[key: string]: string;
|
|
2463
|
-
};
|
|
2531
|
+
isFormatted: number;
|
|
2464
2532
|
/**
|
|
2465
|
-
*
|
|
2533
|
+
* GIF 动图大小限制,默认 2048 KB
|
|
2466
2534
|
*/
|
|
2467
|
-
|
|
2535
|
+
gifSize: number;
|
|
2468
2536
|
/**
|
|
2469
|
-
*
|
|
2470
|
-
* @
|
|
2537
|
+
* 上传小视频时长限制,单位:秒
|
|
2538
|
+
* @description 公有云字段,即私有云配置中的 `uploadVideoTimeLimit`
|
|
2471
2539
|
*/
|
|
2472
|
-
|
|
2540
|
+
videoTimes?: number;
|
|
2473
2541
|
/**
|
|
2474
|
-
*
|
|
2542
|
+
* 上传小视频时长限制,单位:秒
|
|
2543
|
+
* @description 私有云字段,即公有云配置中的 `videoTimes`
|
|
2475
2544
|
*/
|
|
2476
|
-
|
|
2477
|
-
}
|
|
2478
|
-
interface IStorage {
|
|
2479
|
-
setItem(key: string, value: string): void;
|
|
2480
|
-
getItem(key: string): string | null;
|
|
2481
|
-
removeItem(key: string): void;
|
|
2482
|
-
clear(): void;
|
|
2483
|
-
}
|
|
2484
|
-
interface IResponse {
|
|
2485
|
-
status: number;
|
|
2486
|
-
data?: string;
|
|
2487
|
-
}
|
|
2488
|
-
/**
|
|
2489
|
-
* 网络状态枚举
|
|
2490
|
-
*/
|
|
2491
|
-
declare enum NetworkType {
|
|
2492
|
-
WIFI = "wifi",
|
|
2493
|
-
FOUR_G = "4g",
|
|
2494
|
-
THREE_G = "3g",
|
|
2495
|
-
TWO_G = "2g",
|
|
2496
|
-
FIVE_G = "2g",
|
|
2497
|
-
THREE_GENT = "3gnet",
|
|
2498
|
-
UNKONWN = "unknown"
|
|
2499
|
-
}
|
|
2500
|
-
interface IWebSocket {
|
|
2545
|
+
uploadVideoTimeLimit?: number;
|
|
2501
2546
|
/**
|
|
2502
|
-
*
|
|
2503
|
-
* @param callback
|
|
2547
|
+
* 实时日志上传开关:`0` 为关闭,`1` 为开启
|
|
2504
2548
|
*/
|
|
2505
|
-
|
|
2549
|
+
logSwitch: number;
|
|
2506
2550
|
/**
|
|
2507
|
-
*
|
|
2508
|
-
* @
|
|
2551
|
+
* 实时日志上传策略
|
|
2552
|
+
* @example `'{ "url": "logcollection.ronghub.com", "level": 1,"itv": 6, "times": 5 }'`
|
|
2509
2553
|
*/
|
|
2510
|
-
|
|
2511
|
-
/**
|
|
2512
|
-
*
|
|
2513
|
-
* @
|
|
2554
|
+
logPolicy: string;
|
|
2555
|
+
/**
|
|
2556
|
+
* 百度 BOS 存储服务地址
|
|
2557
|
+
* @description 公有云独有配置
|
|
2558
|
+
* @example `gz.bcebos.com`
|
|
2514
2559
|
*/
|
|
2515
|
-
|
|
2560
|
+
bosAddr?: string;
|
|
2516
2561
|
/**
|
|
2517
|
-
*
|
|
2518
|
-
* @
|
|
2562
|
+
* 阿里上传配置,字符串数组,数组顺序代表 七牛、百度、阿里云 上传权重
|
|
2563
|
+
* @example "[{"qiniu":"upload.qiniup.com","p":"1"},{"baidu":"gz.bcebos.com","p":"2"},{"aliyun":"oss-cn-beijing.aliyuncs.com","p":"3"}]"
|
|
2519
2564
|
*/
|
|
2520
|
-
|
|
2565
|
+
ossConfig?: string;
|
|
2521
2566
|
/**
|
|
2522
|
-
*
|
|
2523
|
-
* @param data
|
|
2567
|
+
* 私有云专有属性,可用来判断当前环境是公有云还是私有云,私有云环境下该值为 `1`
|
|
2524
2568
|
*/
|
|
2525
|
-
|
|
2569
|
+
type?: number;
|
|
2526
2570
|
/**
|
|
2527
|
-
*
|
|
2528
|
-
* @param code
|
|
2529
|
-
* @param reason
|
|
2571
|
+
* @deprecated 已废弃
|
|
2530
2572
|
*/
|
|
2531
|
-
|
|
2532
|
-
}
|
|
2533
|
-
/**
|
|
2534
|
-
* 平台运行时抽象
|
|
2535
|
-
*/
|
|
2536
|
-
interface IRuntime {
|
|
2573
|
+
compDays: number;
|
|
2537
2574
|
/**
|
|
2538
|
-
*
|
|
2575
|
+
* @deprecated 已废弃
|
|
2539
2576
|
*/
|
|
2540
|
-
|
|
2577
|
+
msgAck: unknown;
|
|
2541
2578
|
/**
|
|
2542
|
-
*
|
|
2543
|
-
* @param options
|
|
2579
|
+
* @deprecated 已废弃
|
|
2544
2580
|
*/
|
|
2545
|
-
|
|
2581
|
+
activeServer: string;
|
|
2546
2582
|
/**
|
|
2547
|
-
*
|
|
2583
|
+
* @deprecated 已废弃
|
|
2548
2584
|
*/
|
|
2549
|
-
|
|
2585
|
+
qnAddr: string;
|
|
2550
2586
|
/**
|
|
2551
|
-
*
|
|
2587
|
+
* @deprecated 已废弃
|
|
2552
2588
|
*/
|
|
2553
|
-
|
|
2589
|
+
extkitSwitch: number;
|
|
2554
2590
|
/**
|
|
2555
|
-
*
|
|
2591
|
+
* @deprecated 已废弃
|
|
2556
2592
|
*/
|
|
2557
|
-
|
|
2593
|
+
alone: boolean;
|
|
2558
2594
|
/**
|
|
2559
|
-
*
|
|
2595
|
+
* @deprecated 已废弃
|
|
2560
2596
|
*/
|
|
2561
|
-
|
|
2597
|
+
voipServer: string;
|
|
2562
2598
|
/**
|
|
2563
|
-
*
|
|
2599
|
+
* 离线日志上报地址
|
|
2600
|
+
* @deprecated 已废弃
|
|
2564
2601
|
*/
|
|
2565
|
-
|
|
2602
|
+
offlinelogserver: string;
|
|
2566
2603
|
/**
|
|
2567
|
-
*
|
|
2604
|
+
* 在线日志上报地址
|
|
2605
|
+
* @deprecated 已废弃
|
|
2568
2606
|
*/
|
|
2569
|
-
|
|
2607
|
+
onlinelogserver?: string;
|
|
2570
2608
|
/**
|
|
2571
|
-
*
|
|
2609
|
+
* 链路加密字段,内容为 JSON 字符串,仅限 C++ 可用
|
|
2572
2610
|
*/
|
|
2573
|
-
|
|
2611
|
+
crypto?: string;
|
|
2574
2612
|
/**
|
|
2575
|
-
*
|
|
2613
|
+
* 群组回执开关, 1: 打开,0(或者没有): 关闭
|
|
2576
2614
|
*/
|
|
2577
|
-
|
|
2615
|
+
grpRRVer?: number;
|
|
2578
2616
|
/**
|
|
2579
|
-
*
|
|
2580
|
-
* 2g 3g 4g wifi unkown
|
|
2617
|
+
* 防黑产开关, 1: 打开,0:关闭
|
|
2581
2618
|
*/
|
|
2582
|
-
|
|
2619
|
+
openAnti?: number;
|
|
2583
2620
|
}
|
|
2584
2621
|
|
|
2585
|
-
|
|
2586
|
-
* 文件类型
|
|
2587
|
-
*/
|
|
2588
|
-
declare enum FileType {
|
|
2622
|
+
interface IChatroomEntryListenerData {
|
|
2589
2623
|
/**
|
|
2590
|
-
*
|
|
2591
|
-
|
|
2592
|
-
|
|
2624
|
+
* 更新的键
|
|
2625
|
+
*/
|
|
2626
|
+
key: string;
|
|
2593
2627
|
/**
|
|
2594
|
-
*
|
|
2595
|
-
|
|
2596
|
-
|
|
2628
|
+
* 更新的值
|
|
2629
|
+
*/
|
|
2630
|
+
value: string;
|
|
2597
2631
|
/**
|
|
2598
|
-
*
|
|
2599
|
-
|
|
2600
|
-
|
|
2632
|
+
* 更新的时间
|
|
2633
|
+
*/
|
|
2634
|
+
timestamp: number;
|
|
2601
2635
|
/**
|
|
2602
|
-
*
|
|
2603
|
-
|
|
2604
|
-
|
|
2636
|
+
* 更新的聊天室 ID
|
|
2637
|
+
*/
|
|
2638
|
+
chatroomId: string;
|
|
2605
2639
|
/**
|
|
2606
|
-
*
|
|
2640
|
+
* 更新类型
|
|
2607
2641
|
*/
|
|
2608
|
-
|
|
2642
|
+
type: ChatroomEntryType;
|
|
2643
|
+
}
|
|
2644
|
+
interface IChatroomRejoinedFailed {
|
|
2609
2645
|
/**
|
|
2610
|
-
*
|
|
2646
|
+
* 自动重新加入的聊天室 ID
|
|
2611
2647
|
*/
|
|
2612
|
-
|
|
2648
|
+
chatroomId: string;
|
|
2649
|
+
/**
|
|
2650
|
+
* 自动重新加入失败的 code
|
|
2651
|
+
*/
|
|
2652
|
+
errorCode: number;
|
|
2613
2653
|
}
|
|
2614
|
-
|
|
2615
|
-
declare enum UploadMethod {
|
|
2654
|
+
interface IChatroomRejoinedSuccessed {
|
|
2616
2655
|
/**
|
|
2617
|
-
*
|
|
2618
|
-
|
|
2619
|
-
|
|
2656
|
+
* 自动重新加入的聊天室 ID
|
|
2657
|
+
*/
|
|
2658
|
+
chatroomId: string;
|
|
2620
2659
|
/**
|
|
2621
|
-
*
|
|
2622
|
-
|
|
2623
|
-
|
|
2660
|
+
* 自动重新加入的聊天室拉取消息的数量
|
|
2661
|
+
*/
|
|
2662
|
+
count: number;
|
|
2663
|
+
}
|
|
2664
|
+
interface IChatroomUserChangeInfo {
|
|
2665
|
+
users: {
|
|
2666
|
+
[userId: string]: ChatroomUserChangeType;
|
|
2667
|
+
};
|
|
2668
|
+
chatroomId: string;
|
|
2669
|
+
}
|
|
2670
|
+
declare type IChatroomRejoinedInfo = IChatroomRejoinedFailed | IChatroomRejoinedSuccessed;
|
|
2671
|
+
/**
|
|
2672
|
+
* 聊天室信息
|
|
2673
|
+
*/
|
|
2674
|
+
interface IChatroomListenerData {
|
|
2624
2675
|
/**
|
|
2625
|
-
*
|
|
2676
|
+
* SDK 内部重连聊天室信息
|
|
2677
|
+
*/
|
|
2678
|
+
rejoinedRoom?: IChatroomRejoinedInfo;
|
|
2679
|
+
/**
|
|
2680
|
+
* 监听到的聊天室 KV 更新
|
|
2681
|
+
*/
|
|
2682
|
+
updatedEntries?: IChatroomEntryListenerData[];
|
|
2683
|
+
/**
|
|
2684
|
+
* 登录退出的用户通知
|
|
2626
2685
|
*/
|
|
2627
|
-
|
|
2686
|
+
userChange?: IChatroomUserChangeInfo;
|
|
2628
2687
|
/**
|
|
2629
|
-
*
|
|
2688
|
+
* 聊天室销毁
|
|
2630
2689
|
*/
|
|
2631
|
-
|
|
2690
|
+
chatroomDestroyed?: string;
|
|
2632
2691
|
}
|
|
2633
|
-
|
|
2634
|
-
/**
|
|
2635
|
-
* 连接状态
|
|
2636
|
-
*/
|
|
2637
|
-
declare enum ConnectionStatus {
|
|
2692
|
+
interface IChatroomEntry {
|
|
2638
2693
|
/**
|
|
2639
|
-
*
|
|
2694
|
+
* 属性名称, 支持英文字母、数字、+、=、-、_ 的组合方式, 最大长度 128 字符
|
|
2640
2695
|
*/
|
|
2641
|
-
|
|
2696
|
+
key: string;
|
|
2642
2697
|
/**
|
|
2643
|
-
*
|
|
2698
|
+
* 属性对应的值, 最大长度 4096 字符
|
|
2644
2699
|
*/
|
|
2645
|
-
|
|
2700
|
+
value: string;
|
|
2646
2701
|
/**
|
|
2647
|
-
*
|
|
2702
|
+
* 设置成功后是否发送通知消息
|
|
2648
2703
|
*/
|
|
2649
|
-
|
|
2704
|
+
isSendNotification?: boolean;
|
|
2650
2705
|
/**
|
|
2651
|
-
*
|
|
2706
|
+
* RC:chrmKVNotiMsg 消息中携带的附加信息
|
|
2652
2707
|
*/
|
|
2653
|
-
|
|
2708
|
+
notificationExtra?: string;
|
|
2654
2709
|
/**
|
|
2655
|
-
*
|
|
2710
|
+
* 用户退出聊天室时是否清除此属性
|
|
2656
2711
|
*/
|
|
2657
|
-
|
|
2712
|
+
isAutoDelete?: boolean;
|
|
2713
|
+
}
|
|
2714
|
+
interface IChatroomUser {
|
|
2658
2715
|
/**
|
|
2659
|
-
*
|
|
2716
|
+
* 用户 id
|
|
2660
2717
|
*/
|
|
2661
|
-
|
|
2718
|
+
id: string;
|
|
2662
2719
|
/**
|
|
2663
|
-
*
|
|
2720
|
+
* 加入聊天室的时间
|
|
2664
2721
|
*/
|
|
2665
|
-
|
|
2722
|
+
time: number;
|
|
2723
|
+
}
|
|
2724
|
+
interface IChatroomInfo {
|
|
2666
2725
|
/**
|
|
2667
|
-
*
|
|
2726
|
+
* 成员列表
|
|
2727
|
+
* @todo 需确认数组元素的数据结构
|
|
2668
2728
|
*/
|
|
2669
|
-
|
|
2729
|
+
userInfos: IChatroomUser[];
|
|
2670
2730
|
/**
|
|
2671
|
-
*
|
|
2731
|
+
* 房间内总人数
|
|
2672
2732
|
*/
|
|
2673
|
-
|
|
2733
|
+
userCount: number;
|
|
2734
|
+
}
|
|
2735
|
+
interface IRemoveChatroomEntry {
|
|
2674
2736
|
/**
|
|
2675
|
-
*
|
|
2737
|
+
* 属性名称, 支持英文字母、数字、+、=、-、_ 的组合方式, 最大长度 128 字符
|
|
2676
2738
|
*/
|
|
2677
|
-
|
|
2739
|
+
key: string;
|
|
2678
2740
|
/**
|
|
2679
|
-
*
|
|
2741
|
+
* 删除成功后是否发送通知消息
|
|
2680
2742
|
*/
|
|
2681
|
-
|
|
2743
|
+
isSendNotification?: boolean;
|
|
2682
2744
|
/**
|
|
2683
|
-
*
|
|
2745
|
+
* RC:chrmKVNotiMsg 消息中携带的附加信息
|
|
2684
2746
|
*/
|
|
2685
|
-
|
|
2747
|
+
notificationExtra?: string;
|
|
2748
|
+
}
|
|
2749
|
+
interface IRemoveChatroomEntries {
|
|
2686
2750
|
/**
|
|
2687
|
-
*
|
|
2751
|
+
* key 属性名称, 支持英文字母、数字、+、=、-、_ 的组合方式, 最大长度 128 字符
|
|
2688
2752
|
*/
|
|
2689
|
-
|
|
2753
|
+
entries: {
|
|
2754
|
+
key: string;
|
|
2755
|
+
}[];
|
|
2690
2756
|
/**
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
FORBID_RECONNECT_BY_OTHER_SAME_CLIENT = 31023,
|
|
2757
|
+
* 删除成功后是否发送通知消息
|
|
2758
|
+
*/
|
|
2694
2759
|
/**
|
|
2695
|
-
*
|
|
2760
|
+
* RC:chrmKVNotiMsg 消息中携带的附加信息
|
|
2696
2761
|
*/
|
|
2697
|
-
|
|
2762
|
+
notificationExtra?: string;
|
|
2763
|
+
}
|
|
2764
|
+
interface IChatroomEntries {
|
|
2698
2765
|
/**
|
|
2699
|
-
*
|
|
2766
|
+
* entries ,要设置的属性列表
|
|
2767
|
+
* key 属性名称, 支持英文字母、数字、+、=、-、_ 的组合方式, 最大长度 128 字符
|
|
2768
|
+
* value 属性对应的值, 最大长度 4096 字符
|
|
2700
2769
|
*/
|
|
2701
|
-
|
|
2770
|
+
entries: {
|
|
2771
|
+
key: string;
|
|
2772
|
+
value: string;
|
|
2773
|
+
}[];
|
|
2702
2774
|
/**
|
|
2703
|
-
*
|
|
2775
|
+
* 设置成功后是否发送通知消息
|
|
2776
|
+
*/
|
|
2777
|
+
/**
|
|
2778
|
+
* RC:chrmKVNotiMsg 消息中携带的附加信息
|
|
2704
2779
|
*/
|
|
2705
|
-
|
|
2780
|
+
notificationExtra?: string;
|
|
2706
2781
|
/**
|
|
2707
|
-
*
|
|
2782
|
+
* 用户退出聊天室时是否清除此属性
|
|
2708
2783
|
*/
|
|
2709
|
-
|
|
2784
|
+
isAutoDelete?: boolean;
|
|
2710
2785
|
/**
|
|
2711
|
-
*
|
|
2786
|
+
* 是否强制覆盖
|
|
2712
2787
|
*/
|
|
2713
|
-
|
|
2788
|
+
isForce?: boolean;
|
|
2714
2789
|
}
|
|
2715
2790
|
|
|
2716
|
-
|
|
2791
|
+
interface IUploadAuth {
|
|
2717
2792
|
/**
|
|
2718
|
-
*
|
|
2793
|
+
* 七牛 token 有效期
|
|
2719
2794
|
*/
|
|
2720
|
-
|
|
2795
|
+
deadline: number;
|
|
2721
2796
|
/**
|
|
2722
|
-
*
|
|
2797
|
+
* 七牛上传 token
|
|
2723
2798
|
*/
|
|
2724
|
-
|
|
2799
|
+
token: string;
|
|
2725
2800
|
/**
|
|
2726
|
-
*
|
|
2801
|
+
* 百度上传 token
|
|
2727
2802
|
*/
|
|
2728
|
-
|
|
2803
|
+
bosToken: string;
|
|
2729
2804
|
/**
|
|
2730
|
-
*
|
|
2805
|
+
* 百度上传 header Date
|
|
2731
2806
|
*/
|
|
2732
|
-
|
|
2807
|
+
bosDate: string;
|
|
2733
2808
|
/**
|
|
2734
|
-
*
|
|
2809
|
+
* 百度上传路径
|
|
2735
2810
|
*/
|
|
2736
|
-
|
|
2737
|
-
}
|
|
2738
|
-
|
|
2739
|
-
/**
|
|
2740
|
-
* CMP/Comet 服务连接应答码
|
|
2741
|
-
*/
|
|
2742
|
-
declare const ConnectResultCode: {
|
|
2811
|
+
path: string;
|
|
2743
2812
|
/**
|
|
2744
|
-
*
|
|
2813
|
+
* 上传文件名,阿里上传获取下载地址时,必须使用上传文件名,所以需抛出到业务端
|
|
2745
2814
|
*/
|
|
2746
|
-
|
|
2815
|
+
fileName: string;
|
|
2747
2816
|
/**
|
|
2748
|
-
*
|
|
2749
|
-
* @description 暂未使用
|
|
2817
|
+
* 阿里云 oss 的 AccessKeyId
|
|
2750
2818
|
*/
|
|
2751
|
-
|
|
2819
|
+
osskeyId: string;
|
|
2752
2820
|
/**
|
|
2753
|
-
*
|
|
2754
|
-
* @description 格式:`{平台类型}-{设备信息}-{sdk版本}`。
|
|
2755
|
-
* 其中设备信息为:{手机类型}{手机型号}{网络类型,4G/WIFI}{运营商标识, 移动/电信/联通}
|
|
2821
|
+
* 阿里云 oss post 请求表单域中的字段 policy
|
|
2756
2822
|
*/
|
|
2757
|
-
|
|
2823
|
+
ossPolicy: string;
|
|
2758
2824
|
/**
|
|
2759
|
-
*
|
|
2825
|
+
* 阿里云 oss 根据 policy 计算的签名信息
|
|
2760
2826
|
*/
|
|
2761
|
-
|
|
2827
|
+
ossSign: string;
|
|
2762
2828
|
/**
|
|
2763
|
-
*
|
|
2829
|
+
* 阿里云 oss 存储空间名称
|
|
2764
2830
|
*/
|
|
2765
|
-
|
|
2831
|
+
ossBucketName: string;
|
|
2766
2832
|
/**
|
|
2767
|
-
*
|
|
2833
|
+
* s3 认证凭证,对应 post上传 x-amz-credential 字段
|
|
2768
2834
|
*/
|
|
2769
|
-
|
|
2835
|
+
s3Credential: string;
|
|
2770
2836
|
/**
|
|
2771
|
-
*
|
|
2772
|
-
* 客户端收到该应答后须重新访问导航,重新获取 CMP 地址
|
|
2837
|
+
* 加密算法,对应 post上传 x-amz-algorithm 字段
|
|
2773
2838
|
*/
|
|
2774
|
-
|
|
2839
|
+
s3Algorithm: string;
|
|
2775
2840
|
/**
|
|
2776
|
-
*
|
|
2841
|
+
* s3 日期,对应 post上传 x-amz-date 字段
|
|
2777
2842
|
*/
|
|
2778
|
-
|
|
2843
|
+
s3Date: string;
|
|
2779
2844
|
/**
|
|
2780
|
-
*
|
|
2845
|
+
* s3 policy,对应 post上传 policy 字段
|
|
2781
2846
|
*/
|
|
2782
|
-
|
|
2847
|
+
s3Policy: string;
|
|
2783
2848
|
/**
|
|
2784
|
-
*
|
|
2849
|
+
* s3 签名信息,对应 post上传 x-amz-signature 字段
|
|
2785
2850
|
*/
|
|
2786
|
-
|
|
2851
|
+
s3Signature: string;
|
|
2787
2852
|
/**
|
|
2788
|
-
*
|
|
2853
|
+
* s3 存储空间名称
|
|
2789
2854
|
*/
|
|
2790
|
-
|
|
2855
|
+
s3BucketName: string;
|
|
2791
2856
|
/**
|
|
2792
|
-
*
|
|
2857
|
+
* stc Authorization 头
|
|
2793
2858
|
*/
|
|
2794
|
-
|
|
2859
|
+
stcAuthorization: string;
|
|
2795
2860
|
/**
|
|
2796
|
-
*
|
|
2861
|
+
* stc xAmzContentSha256
|
|
2797
2862
|
*/
|
|
2798
|
-
|
|
2863
|
+
stcContentSha256: string;
|
|
2799
2864
|
/**
|
|
2800
|
-
*
|
|
2865
|
+
* stc date
|
|
2801
2866
|
*/
|
|
2802
|
-
|
|
2867
|
+
stcDate: string;
|
|
2803
2868
|
/**
|
|
2804
|
-
*
|
|
2869
|
+
* stc 存储空间名称
|
|
2805
2870
|
*/
|
|
2806
|
-
|
|
2871
|
+
stcBucketName: string;
|
|
2872
|
+
}
|
|
2873
|
+
|
|
2874
|
+
interface IRTCRoomInfo {
|
|
2875
|
+
roomId: string;
|
|
2876
|
+
roomData: unknown[];
|
|
2877
|
+
userCount: number;
|
|
2878
|
+
list: unknown[];
|
|
2879
|
+
}
|
|
2880
|
+
interface IRtcTokenData {
|
|
2881
|
+
rtcToken: string;
|
|
2882
|
+
}
|
|
2883
|
+
interface IRTCUsers {
|
|
2884
|
+
users: {
|
|
2885
|
+
[userId: string]: {
|
|
2886
|
+
/**
|
|
2887
|
+
* 发布的资源数据,是一个 JSON 字符串,解析后为发布的资源列表
|
|
2888
|
+
*/
|
|
2889
|
+
uris?: string;
|
|
2890
|
+
/**
|
|
2891
|
+
* 加房间的身份标识,保存主房间 roomId
|
|
2892
|
+
*/
|
|
2893
|
+
extra?: string;
|
|
2894
|
+
};
|
|
2895
|
+
};
|
|
2896
|
+
}
|
|
2897
|
+
interface IJoinRTCRoomData extends IRTCUsers {
|
|
2898
|
+
token: string;
|
|
2899
|
+
sessionId: string;
|
|
2900
|
+
roomInfo: {
|
|
2901
|
+
key: string;
|
|
2902
|
+
value: string;
|
|
2903
|
+
}[];
|
|
2904
|
+
kvEntries: IServerRTCRoomEntry[];
|
|
2905
|
+
offlineKickTime: number;
|
|
2906
|
+
}
|
|
2907
|
+
interface KVString {
|
|
2908
|
+
[key: string]: string;
|
|
2909
|
+
}
|
|
2910
|
+
/**
|
|
2911
|
+
* 设置 RTC 人员 inner、outer 数据
|
|
2912
|
+
*/
|
|
2913
|
+
interface IRTCUserData {
|
|
2914
|
+
[key: string]: string;
|
|
2915
|
+
}
|
|
2916
|
+
|
|
2917
|
+
interface IAsyncRes<T = any> {
|
|
2807
2918
|
/**
|
|
2808
|
-
*
|
|
2919
|
+
* Promise 执行结果
|
|
2809
2920
|
*/
|
|
2810
|
-
|
|
2921
|
+
code: ErrorCode;
|
|
2811
2922
|
/**
|
|
2812
|
-
*
|
|
2923
|
+
* 结果数据
|
|
2813
2924
|
*/
|
|
2814
|
-
|
|
2925
|
+
data?: T;
|
|
2815
2926
|
/**
|
|
2816
|
-
*
|
|
2927
|
+
* 错误消息
|
|
2817
2928
|
*/
|
|
2818
|
-
|
|
2819
|
-
}
|
|
2820
|
-
|
|
2929
|
+
msg?: string;
|
|
2930
|
+
}
|
|
2821
2931
|
/**
|
|
2822
|
-
*
|
|
2932
|
+
* 异步任务结果定义
|
|
2933
|
+
* @description
|
|
2934
|
+
* 通过 `Promise.resolve` 来处理预期内的异常,进而通过 Uncatch Promise Error 暴露预期外的异常
|
|
2823
2935
|
*/
|
|
2824
|
-
declare
|
|
2825
|
-
|
|
2826
|
-
* 文字消息
|
|
2827
|
-
*/
|
|
2828
|
-
TextMessage = "RC:TxtMsg",
|
|
2829
|
-
/**
|
|
2830
|
-
* 语音消息
|
|
2831
|
-
*/
|
|
2832
|
-
VOICE = "RC:VcMsg",
|
|
2936
|
+
declare type IPromiseResult<T> = Promise<IAsyncRes<T>>;
|
|
2937
|
+
interface IConnectResult {
|
|
2833
2938
|
/**
|
|
2834
|
-
*
|
|
2835
|
-
|
|
2836
|
-
|
|
2939
|
+
* 连接错误码
|
|
2940
|
+
*/
|
|
2941
|
+
code: ErrorCode;
|
|
2837
2942
|
/**
|
|
2838
|
-
*
|
|
2839
|
-
|
|
2840
|
-
|
|
2943
|
+
* 导航获取成功后即可有相应的值,在导航数据获取完成之前该值为 undefined
|
|
2944
|
+
*/
|
|
2945
|
+
userId?: string;
|
|
2946
|
+
}
|
|
2947
|
+
|
|
2948
|
+
declare enum HttpMethod {
|
|
2949
|
+
GET = "GET",
|
|
2950
|
+
POST = "POST"
|
|
2951
|
+
}
|
|
2952
|
+
interface IRequest {
|
|
2953
|
+
url: string;
|
|
2841
2954
|
/**
|
|
2842
|
-
*
|
|
2843
|
-
|
|
2844
|
-
|
|
2955
|
+
* @default `HttpMethod.GET`
|
|
2956
|
+
*/
|
|
2957
|
+
method?: HttpMethod | 'GET' | 'POST';
|
|
2845
2958
|
/**
|
|
2846
|
-
*
|
|
2847
|
-
|
|
2848
|
-
|
|
2959
|
+
* 查询数据
|
|
2960
|
+
*/
|
|
2961
|
+
query?: {
|
|
2962
|
+
[key: string]: string | number | null;
|
|
2963
|
+
};
|
|
2849
2964
|
/**
|
|
2850
|
-
*
|
|
2851
|
-
|
|
2852
|
-
|
|
2965
|
+
* Request Header 信息
|
|
2966
|
+
*/
|
|
2967
|
+
headers?: {
|
|
2968
|
+
[key: string]: string;
|
|
2969
|
+
};
|
|
2853
2970
|
/**
|
|
2854
|
-
*
|
|
2855
|
-
|
|
2856
|
-
|
|
2971
|
+
* Request Body 数据
|
|
2972
|
+
*/
|
|
2973
|
+
body?: Object | string;
|
|
2857
2974
|
/**
|
|
2858
|
-
*
|
|
2859
|
-
|
|
2860
|
-
|
|
2975
|
+
* 超时设置
|
|
2976
|
+
* @default 10 * 1000 毫秒
|
|
2977
|
+
*/
|
|
2978
|
+
timeout?: number;
|
|
2861
2979
|
/**
|
|
2862
|
-
*
|
|
2863
|
-
|
|
2864
|
-
|
|
2980
|
+
* 期望返回的数据格式,如果为 json 则返回后会对返回的数据进行一次 JSON.parse, 在小程序平台需要
|
|
2981
|
+
*/
|
|
2982
|
+
dataType?: 'json' | 'text' | 'base64' | 'arraybuffer';
|
|
2983
|
+
}
|
|
2984
|
+
interface IStorage {
|
|
2985
|
+
setItem(key: string, value: string): void;
|
|
2986
|
+
getItem(key: string): string | null;
|
|
2987
|
+
removeItem(key: string): void;
|
|
2988
|
+
clear(): void;
|
|
2989
|
+
}
|
|
2990
|
+
interface IResponse {
|
|
2991
|
+
status: number;
|
|
2992
|
+
data?: string;
|
|
2993
|
+
}
|
|
2994
|
+
/**
|
|
2995
|
+
* 网络状态枚举
|
|
2996
|
+
*/
|
|
2997
|
+
declare enum NetworkType {
|
|
2998
|
+
WIFI = "wifi",
|
|
2999
|
+
FOUR_G = "4g",
|
|
3000
|
+
THREE_G = "3g",
|
|
3001
|
+
TWO_G = "2g",
|
|
3002
|
+
FIVE_G = "2g",
|
|
3003
|
+
THREE_GENT = "3gnet",
|
|
3004
|
+
UNKONWN = "unknown"
|
|
3005
|
+
}
|
|
3006
|
+
interface IWebSocket {
|
|
2865
3007
|
/**
|
|
2866
|
-
*
|
|
2867
|
-
|
|
2868
|
-
|
|
3008
|
+
* 监听连接建立事件,此时 WebSocket 实例已准备好收发数据
|
|
3009
|
+
* @param callback
|
|
3010
|
+
*/
|
|
3011
|
+
onOpen(callback: () => void): void;
|
|
2869
3012
|
/**
|
|
2870
|
-
*
|
|
2871
|
-
|
|
2872
|
-
|
|
3013
|
+
* 监听连接关闭事件
|
|
3014
|
+
* @param callback
|
|
3015
|
+
*/
|
|
3016
|
+
onClose(callback: (code?: number, reason?: string) => void): void;
|
|
2873
3017
|
/**
|
|
2874
|
-
*
|
|
2875
|
-
|
|
2876
|
-
|
|
3018
|
+
* 监听接收服务器消息事件
|
|
3019
|
+
* @param callback
|
|
3020
|
+
*/
|
|
3021
|
+
onMessage(callback: (data: string | ArrayBuffer) => void): void;
|
|
2877
3022
|
/**
|
|
2878
|
-
*
|
|
2879
|
-
|
|
2880
|
-
|
|
3023
|
+
* 监听链接错误事件
|
|
3024
|
+
* @param callback
|
|
3025
|
+
*/
|
|
3026
|
+
onError(callback: (error: unknown) => void): void;
|
|
2881
3027
|
/**
|
|
2882
|
-
*
|
|
2883
|
-
|
|
2884
|
-
|
|
3028
|
+
* 向服务器发送数据
|
|
3029
|
+
* @param data
|
|
3030
|
+
*/
|
|
3031
|
+
send(data: ArrayBuffer | string): void;
|
|
2885
3032
|
/**
|
|
2886
|
-
*
|
|
2887
|
-
|
|
2888
|
-
|
|
3033
|
+
* 关闭连接
|
|
3034
|
+
* @param code
|
|
3035
|
+
* @param reason
|
|
3036
|
+
*/
|
|
3037
|
+
close(code?: number, reason?: string): void;
|
|
3038
|
+
}
|
|
3039
|
+
/**
|
|
3040
|
+
* 平台运行时抽象
|
|
3041
|
+
*/
|
|
3042
|
+
interface IRuntime {
|
|
2889
3043
|
/**
|
|
2890
|
-
*
|
|
2891
|
-
|
|
2892
|
-
|
|
3044
|
+
* 平台标识
|
|
3045
|
+
*/
|
|
3046
|
+
tag: string;
|
|
2893
3047
|
/**
|
|
2894
|
-
*
|
|
2895
|
-
|
|
2896
|
-
|
|
3048
|
+
* 发送 http 请求
|
|
3049
|
+
* @param options
|
|
3050
|
+
*/
|
|
3051
|
+
httpReq(options: IRequest): Promise<IResponse>;
|
|
2897
3052
|
/**
|
|
2898
|
-
*
|
|
2899
|
-
|
|
2900
|
-
|
|
3053
|
+
* 检测是否支持长连接
|
|
3054
|
+
*/
|
|
3055
|
+
isSupportSocket(): boolean;
|
|
2901
3056
|
/**
|
|
2902
|
-
*
|
|
3057
|
+
* 是否使用导航
|
|
2903
3058
|
*/
|
|
2904
|
-
|
|
3059
|
+
useNavi: boolean;
|
|
2905
3060
|
/**
|
|
2906
|
-
*
|
|
3061
|
+
* websocket 地址上附加的平台字段
|
|
2907
3062
|
*/
|
|
2908
|
-
|
|
3063
|
+
connectPlatform: string;
|
|
2909
3064
|
/**
|
|
2910
|
-
*
|
|
3065
|
+
* websocket 地址上 apiVer 字段,代表代码是否来源于 uniapp
|
|
2911
3066
|
*/
|
|
2912
|
-
|
|
3067
|
+
isFromUniapp: boolean;
|
|
2913
3068
|
/**
|
|
2914
|
-
*
|
|
3069
|
+
* 创建长连接实例
|
|
2915
3070
|
*/
|
|
2916
|
-
|
|
3071
|
+
createWebSocket?(url: string, protocols?: string[]): IWebSocket;
|
|
2917
3072
|
/**
|
|
2918
|
-
*
|
|
3073
|
+
* 创建数据通道
|
|
2919
3074
|
*/
|
|
2920
|
-
|
|
3075
|
+
createDataChannel(watcher: IDataChannelWatcher, connectType?: 'websocket' | 'comet'): ADataChannel;
|
|
2921
3076
|
/**
|
|
2922
|
-
*
|
|
3077
|
+
* 存储模块
|
|
2923
3078
|
*/
|
|
2924
|
-
|
|
2925
|
-
}
|
|
2926
|
-
|
|
2927
|
-
/**
|
|
2928
|
-
* 群组 @ 类型
|
|
2929
|
-
*/
|
|
2930
|
-
declare enum MentionedType {
|
|
3079
|
+
localStorage: IStorage;
|
|
2931
3080
|
/**
|
|
2932
|
-
*
|
|
2933
|
-
|
|
2934
|
-
|
|
3081
|
+
* 在某些非浏览器平台,其等同于 localStorage
|
|
3082
|
+
*/
|
|
3083
|
+
sessionStorage: IStorage;
|
|
2935
3084
|
/**
|
|
2936
|
-
*
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
interface IMetionedData {
|
|
2942
|
-
type?: MentionedType;
|
|
2943
|
-
userIdList?: string[];
|
|
2944
|
-
mentionedContent?: string;
|
|
2945
|
-
}
|
|
2946
|
-
|
|
2947
|
-
declare enum LogLevel {
|
|
2948
|
-
LOG = 0,
|
|
2949
|
-
DEBUG = 0,
|
|
2950
|
-
INFO = 1,
|
|
2951
|
-
WARN = 2,
|
|
2952
|
-
ERROR = 3,
|
|
2953
|
-
FATAL = 4,
|
|
2954
|
-
STATISTICS = 6,
|
|
2955
|
-
NONE = 1000
|
|
2956
|
-
}
|
|
2957
|
-
declare enum LogSource {
|
|
2958
|
-
IM = "IM",
|
|
2959
|
-
RTC = "RTC"
|
|
2960
|
-
}
|
|
2961
|
-
declare enum LogTagId {
|
|
2962
|
-
L_IMSDK_VER_O = "L-imsdk_ver-O",
|
|
2963
|
-
A_INIT_O = "A-init-O",
|
|
2964
|
-
L_INIT_O = "L-init-O",
|
|
2965
|
-
P_INIT_O = "P-init-O",
|
|
2966
|
-
A_CONNECT_T = "A-connect-T",
|
|
2967
|
-
A_CONNECT_R = "A-connect-R",
|
|
2968
|
-
A_CONNECT_S = "A-connect-S",
|
|
2969
|
-
A_DISCONNECT_O = "A-disconnect-O",
|
|
2970
|
-
A_RECONNECT_T = "A-reconnect-T",
|
|
2971
|
-
A_RECONNECT_R = "A_RECONNECT_R",
|
|
2972
|
-
L_CONNECT_T = "L-connect-T",
|
|
2973
|
-
L_CONNECT_R = "L-connect-R",
|
|
2974
|
-
L_CONNECT_S = "L-connect-S",
|
|
2975
|
-
P_CONNECT_O = "P-connect-O",
|
|
2976
|
-
P_CONNECT_S = "P-connect-S",
|
|
2977
|
-
A_SEND_MSG_T = "A-send_msg-T",
|
|
2978
|
-
A_SEND_MSG_R = "A-send_msg-R",
|
|
2979
|
-
P_SEND_MSG_T = "P-send_msg-T",
|
|
2980
|
-
P_SEND_MSG_R = "P-send_msg-R",
|
|
2981
|
-
L_SEND_MSG_T = "L-send_msg-T",
|
|
2982
|
-
L_SEND_MSG_R = "L-send_msg-R",
|
|
2983
|
-
L_PULL_MSG_T = "L-pull_msg-T",
|
|
2984
|
-
L_PULL_MSG_R = "L-pull_msg-R",
|
|
2985
|
-
L_PULL_ULTRA_MSG_T = "L-pull_ultra_msg-T",
|
|
2986
|
-
L_PULL_ULTRA_MSG_R = "L-pull_ultra_msg-R",
|
|
2987
|
-
L_PULL_CHATROOM_KV_T = "L-pull_chatroom_kv-T",
|
|
2988
|
-
L_PULL_CHATROOM_KV_R = "L-pull_chatroom_kv-R",
|
|
2989
|
-
L_PULL_CHATROOM_MSG_T = "L-pull_chatroom_msg-T",
|
|
2990
|
-
L_PULL_CHATROOM_MSG_R = "L-pull_chatroom_msg-R",
|
|
2991
|
-
A_DELETE_MESSAGES_S = "A-delete_messages-S",
|
|
2992
|
-
P_DELETE_MSG_S = "P-delete_msg-S",
|
|
2993
|
-
L_PULL_CONVERSATION_S = "L-pull_conversation-S",
|
|
2994
|
-
L_RECALL_ULTRA_MSG_S = "L-recall_ultra_msg-S",
|
|
2995
|
-
A_REGTYP_O = "A-regtyp-O",
|
|
2996
|
-
P_REGTYP_O = "P-regtype-O",
|
|
2997
|
-
P_REGTYP_E = "P-regtype-E",
|
|
2998
|
-
L_GET_NAVI_T = "L-get_navi-T",
|
|
2999
|
-
L_GET_NAVI_R = "L-get_navi-R",
|
|
3000
|
-
L_ENV_S = "L-Env-S",
|
|
3001
|
-
L_GET_INDEX_NAVI_S = "L-get_index_navi-S",
|
|
3002
|
-
A_JOIN_CHATROOM_T = "A-join_chatroom-T",
|
|
3003
|
-
A_JOIN_CHATROOM_R = "A-join_chatroom-R",
|
|
3004
|
-
L_JOIN_CHATROOM_T = "L-join_chatroom-T",
|
|
3005
|
-
L_JOIN_CHATROOM_R = "L-join_chatroom-R",
|
|
3006
|
-
A_QUIT_CHATROOM_T = "A-quit_chatroom-T",
|
|
3007
|
-
A_QUIT_CHATROOM_R = "A-quit_chatroom-R",
|
|
3008
|
-
L_REJOIN_CHATROOM_T = "L-rejoin_chatroom-T",
|
|
3009
|
-
L_REJOIN_CHATROOM_R = "L-rejoin_chatroom-R",
|
|
3010
|
-
L_MEDIA_S = "L-media-S",
|
|
3011
|
-
L_MEDIA_UPLOAD_T = "L-media_upload-T",
|
|
3012
|
-
L_MEDIA_UPLOAD_R = "L-media_upload-R",
|
|
3013
|
-
G_UPLOAD_LOG_S = "G-upload_log-S",
|
|
3014
|
-
G_UPLOAD_LOG_E = "G-upload_log-E",
|
|
3015
|
-
G_GET_REAL_TIMELOG_COMMAND_S = "G-get_real_timelog_command-S",
|
|
3016
|
-
L_CHECK_ALIVE_IM_T = "L-check_alive_im-T",
|
|
3017
|
-
L_CHECK_ALIVE_IM_R = "L-check_alive_im-R",
|
|
3018
|
-
A_GET_HISTORY_MSG_T = "A-get_history_msg-T",
|
|
3019
|
-
A_GET_HISTORY_MSG_R = "A-get_history_msg-R",
|
|
3020
|
-
L_GET_HISTORY_MSG_T = "L-get_history_msg-T",
|
|
3021
|
-
L_GET_HISTORY_MSG_R = "L-get_history_msg-R",
|
|
3022
|
-
A_CALLBACK_O = "A-callback-O",
|
|
3023
|
-
A_CALLBACK_E = "A-callback-E"
|
|
3085
|
+
* 获取网络状态
|
|
3086
|
+
* 2g 3g 4g wifi unkown
|
|
3087
|
+
*/
|
|
3088
|
+
getNetworkType(): Promise<NetworkType>;
|
|
3024
3089
|
}
|
|
3025
3090
|
|
|
3026
3091
|
/**
|
|
@@ -3163,6 +3228,7 @@ interface IEngine {
|
|
|
3163
3228
|
*/
|
|
3164
3229
|
connect(token: string, naviInfo: INaviInfo, reconnectKickEnable?: boolean): Promise<ErrorCode>;
|
|
3165
3230
|
requestNaviInfo(uris: string[], appkey: string, token: string, checkCA?: boolean): Promise<INaviInfo | null>;
|
|
3231
|
+
getNaviInfoFromCache(): INaviInfo | null;
|
|
3166
3232
|
/**
|
|
3167
3233
|
* 上报版本信息
|
|
3168
3234
|
* @param version
|
|
@@ -3215,6 +3281,13 @@ interface IEngine {
|
|
|
3215
3281
|
list: IReceivedMessage[];
|
|
3216
3282
|
hasMore: boolean;
|
|
3217
3283
|
}>;
|
|
3284
|
+
/**
|
|
3285
|
+
* 获取指定消息类型的历史消息
|
|
3286
|
+
*/
|
|
3287
|
+
getHistoryMessagesByObjectNames(conversationType: ConversationType, targetId: string, timestamp: number, count: number, messageTypes: string[], order: number, channelId: string): Promise<IAsyncRes<{
|
|
3288
|
+
list: IReceivedMessage[];
|
|
3289
|
+
hasMore: boolean;
|
|
3290
|
+
}>>;
|
|
3218
3291
|
/**
|
|
3219
3292
|
* 删除历史消息 通过 messageUId
|
|
3220
3293
|
*/
|
|
@@ -3268,6 +3341,10 @@ interface IEngine {
|
|
|
3268
3341
|
* 会话的业务标识
|
|
3269
3342
|
*/
|
|
3270
3343
|
channelId?: string): IPromiseResult<IReceivedConversation[]>;
|
|
3344
|
+
/**
|
|
3345
|
+
* 分页获取会话列表,仅 electron中使用
|
|
3346
|
+
*/
|
|
3347
|
+
getConversationsByPage(conversationTypes: ConversationType[], startTime: number, count: number, channelId: string): IPromiseResult<IReceivedConversation[]>;
|
|
3271
3348
|
/**
|
|
3272
3349
|
* 获取指定会话
|
|
3273
3350
|
*/
|
|
@@ -3319,7 +3396,7 @@ interface IEngine {
|
|
|
3319
3396
|
* 批量设置会话 置顶、免打扰
|
|
3320
3397
|
*/
|
|
3321
3398
|
batchSetConversationStatus(statusList: ISetConversationStatusOptions[]): Promise<ErrorCode>;
|
|
3322
|
-
sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions, onBefore?: (messageId: number) => void): IPromiseResult<IReceivedMessage>;
|
|
3399
|
+
sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions, onBefore?: (messageId: number) => void, traceId?: string): IPromiseResult<IReceivedMessage>;
|
|
3323
3400
|
/**
|
|
3324
3401
|
* 断开连接
|
|
3325
3402
|
*/
|
|
@@ -3540,7 +3617,7 @@ interface IEngine {
|
|
|
3540
3617
|
/**
|
|
3541
3618
|
* 获取指定人员在黑名单中的状态
|
|
3542
3619
|
*/
|
|
3543
|
-
getBlacklistStatus(userId: string): IPromiseResult<
|
|
3620
|
+
getBlacklistStatus(userId: string): IPromiseResult<number>;
|
|
3544
3621
|
/**
|
|
3545
3622
|
* 向本地插入一条消息,不发送到服务器
|
|
3546
3623
|
*/
|
|
@@ -3548,7 +3625,7 @@ interface IEngine {
|
|
|
3548
3625
|
/**
|
|
3549
3626
|
* 删除本地消息
|
|
3550
3627
|
*/
|
|
3551
|
-
deleteMessages(
|
|
3628
|
+
deleteMessages(messageIds: number[]): Promise<ErrorCode>;
|
|
3552
3629
|
/**
|
|
3553
3630
|
* 通过时间戳删除本地消息
|
|
3554
3631
|
*/
|
|
@@ -3570,9 +3647,10 @@ interface IEngine {
|
|
|
3570
3647
|
*/
|
|
3571
3648
|
setMessageSearchField(messageId: number, content: any, searchFiles: string): Promise<ErrorCode>;
|
|
3572
3649
|
/**
|
|
3573
|
-
|
|
3650
|
+
* 通过关键字与 channelId 搜索所有会话
|
|
3574
3651
|
*/
|
|
3575
3652
|
searchConversationByContent(keyword: string, customMessageTypes: string[], channelId: string, conversationTypes?: ConversationType[]): IPromiseResult<IReceivedConversation[]>;
|
|
3653
|
+
searchConversationByContentWithAllChannel(keyword: string, customMessageTypes: string[], conversationTypes?: ConversationType[]): IPromiseResult<IReceivedConversation[]>;
|
|
3576
3654
|
/**
|
|
3577
3655
|
* 按内容搜索会话内的消息
|
|
3578
3656
|
*/
|
|
@@ -3580,6 +3658,19 @@ interface IEngine {
|
|
|
3580
3658
|
messages: IReceivedMessage[];
|
|
3581
3659
|
count: number;
|
|
3582
3660
|
}>;
|
|
3661
|
+
/**
|
|
3662
|
+
* 按内容搜索指定会话(不区分 channelId)的消息
|
|
3663
|
+
*/
|
|
3664
|
+
searchMessageByContentWithAllChannel(conversationType: ConversationType, targetId: string, keyword: string, timestamp: number, count: number): IPromiseResult<{
|
|
3665
|
+
messages: IReceivedMessage[];
|
|
3666
|
+
count: number;
|
|
3667
|
+
}>;
|
|
3668
|
+
/**
|
|
3669
|
+
* 按内容搜索时间范围内指定会话(不区分 channelId)的消息
|
|
3670
|
+
*/
|
|
3671
|
+
searchMessageByContentInTimeRangeWithAllChannel(conversationType: ConversationType, targetId: string, keyword: string, startTime: number, endTime: number, offset: number, limit: number): IPromiseResult<{
|
|
3672
|
+
messages: IReceivedMessage[];
|
|
3673
|
+
}>;
|
|
3583
3674
|
/**
|
|
3584
3675
|
* 获取会话下所有未读的 @ 消息
|
|
3585
3676
|
*/
|
|
@@ -3592,6 +3683,10 @@ interface IEngine {
|
|
|
3592
3683
|
* 设置消息接收状态
|
|
3593
3684
|
*/
|
|
3594
3685
|
setMessageReceivedStatus(messageId: number, receivedStatus: number): Promise<ErrorCode>;
|
|
3686
|
+
/**
|
|
3687
|
+
* 将自己发送的指定时间之前的消息标记对方已读,状态值为 SentStatus.READ
|
|
3688
|
+
*/
|
|
3689
|
+
updateMessageReceiptStatus(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): IPromiseResult<boolean>;
|
|
3595
3690
|
/**
|
|
3596
3691
|
* 删除时间戳前的未读数
|
|
3597
3692
|
*/
|
|
@@ -3623,6 +3718,7 @@ interface IEngine {
|
|
|
3623
3718
|
* 获取所有群聊会话 @ 消息未读数
|
|
3624
3719
|
*/
|
|
3625
3720
|
getAllUnreadMentionedCount(): Promise<IAsyncRes<number>>;
|
|
3721
|
+
clearData(): Promise<IAsyncRes<boolean>>;
|
|
3626
3722
|
joinRTCRoom(roomId: string, mode: RTCMode, broadcastType?: number, joinType?: RTCJoinType, innerUserDatas?: IRTCUserData, outerUserDatas?: IRTCUserData): IPromiseResult<IJoinRTCRoomData>;
|
|
3627
3723
|
quitRTCRoom(roomId: string): Promise<ErrorCode>;
|
|
3628
3724
|
rtcPing(roomId: string, mode: number, broadcastType?: number): Promise<ErrorCode>;
|
|
@@ -4361,6 +4457,9 @@ interface IWatcher {
|
|
|
4361
4457
|
ultraGroupMessageExpansionUpdated?: (list: IReceivedMessage[]) => void;
|
|
4362
4458
|
ultraGroupMessageModified?: (list: IReceivedMessage[]) => void;
|
|
4363
4459
|
ultraGroupMessageRecalled?: (list: IReceivedMessage[]) => void;
|
|
4460
|
+
ultraGroupChannelChangeType?: (list: IUltraChannelChangeInfo[]) => void;
|
|
4461
|
+
ultraGroupChannelUserKicked?: (list: IUltraChannelUserKickedInfo[]) => void;
|
|
4462
|
+
ultraGroupChannelDelete?: (list: IUltraChannelDeleteInfo[]) => void;
|
|
4364
4463
|
}
|
|
4365
4464
|
interface IAPIContextOption {
|
|
4366
4465
|
/**
|
|
@@ -4533,6 +4632,9 @@ declare class APIContext {
|
|
|
4533
4632
|
private _ultraGroupMessageExpansionUpdatedListener;
|
|
4534
4633
|
private _ultraGroupMessageModifiedListener;
|
|
4535
4634
|
private _ultraGroupMessageRecalledListener;
|
|
4635
|
+
private _ultraGroupChannelChangeTypeListener;
|
|
4636
|
+
private _ultraGroupChannelUserKickedListener;
|
|
4637
|
+
private _ultraGroupChannelDeleteListener;
|
|
4536
4638
|
/**
|
|
4537
4639
|
* rtc 数据变更通知 pluginContext
|
|
4538
4640
|
*/
|
|
@@ -4646,11 +4748,19 @@ declare class APIContext {
|
|
|
4646
4748
|
list: IReceivedMessage[];
|
|
4647
4749
|
hasMore: boolean;
|
|
4648
4750
|
}>>;
|
|
4751
|
+
getHistoryMessagesByObjectNames(conversationType: ConversationType, targetId: string, timestamp: number, count: number, messageTypes: string[], order: number, channelId: string): Promise<IAsyncRes<{
|
|
4752
|
+
list: IReceivedMessage[];
|
|
4753
|
+
hasMore: boolean;
|
|
4754
|
+
}>>;
|
|
4649
4755
|
/**
|
|
4650
4756
|
* 获取会话列表
|
|
4651
4757
|
* @param count 指定获取数量, 不传则获取全部会话列表,默认 `300`
|
|
4652
4758
|
*/
|
|
4653
4759
|
getConversationList(count?: number, conversationType?: ConversationType, startTime?: number, order?: 0 | 1, channelId?: string): Promise<IAsyncRes<IReceivedConversation[]>>;
|
|
4760
|
+
/**
|
|
4761
|
+
* 分页获取会话列表,仅 electron中使用
|
|
4762
|
+
*/
|
|
4763
|
+
getConversationsByPage(conversationTypes: ConversationType[], startTime: number, count: number, channelId: string): Promise<IAsyncRes<IReceivedConversation[]>>;
|
|
4654
4764
|
/**
|
|
4655
4765
|
* 获取单一会话数据
|
|
4656
4766
|
* @param conversationType
|
|
@@ -4665,7 +4775,7 @@ declare class APIContext {
|
|
|
4665
4775
|
/**
|
|
4666
4776
|
* 获取超级群会话列表
|
|
4667
4777
|
*/
|
|
4668
|
-
getUltraGroupList(): Promise<IAsyncRes<
|
|
4778
|
+
getUltraGroupList(options: IGetUltraGroupListOption): Promise<IAsyncRes<IUltraGroupConversation[]>>;
|
|
4669
4779
|
/**
|
|
4670
4780
|
* 获取超级群免打扰列表
|
|
4671
4781
|
*/
|
|
@@ -5012,7 +5122,7 @@ declare class APIContext {
|
|
|
5012
5122
|
/**
|
|
5013
5123
|
* 获取指定人员在黑名单中的状态
|
|
5014
5124
|
*/
|
|
5015
|
-
getBlacklistStatus(userId: string): Promise<IAsyncRes<
|
|
5125
|
+
getBlacklistStatus(userId: string): Promise<IAsyncRes<number>>;
|
|
5016
5126
|
/**
|
|
5017
5127
|
* 向本地插入一条消息,不发送到服务器
|
|
5018
5128
|
*/
|
|
@@ -5020,7 +5130,7 @@ declare class APIContext {
|
|
|
5020
5130
|
/**
|
|
5021
5131
|
* 删除本地消息
|
|
5022
5132
|
*/
|
|
5023
|
-
deleteMessages(
|
|
5133
|
+
deleteMessages(messageIds: number[]): Promise<ErrorCode>;
|
|
5024
5134
|
/**
|
|
5025
5135
|
* 从本地消息数据库中删除某一会话指定时间之前的消息数据
|
|
5026
5136
|
*/
|
|
@@ -5049,6 +5159,10 @@ declare class APIContext {
|
|
|
5049
5159
|
* 设置消息接收状态
|
|
5050
5160
|
*/
|
|
5051
5161
|
setMessageReceivedStatus(messageId: number, receivedStatus: number): Promise<ErrorCode>;
|
|
5162
|
+
/**
|
|
5163
|
+
* 将自己发送的指定时间之前的消息标记对方已读,状态值为 SentStatus.READ
|
|
5164
|
+
*/
|
|
5165
|
+
setMessageStatusToRead(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): Promise<IAsyncRes<boolean>>;
|
|
5052
5166
|
/**
|
|
5053
5167
|
* 设置当前用户在线状态
|
|
5054
5168
|
*/
|
|
@@ -5064,10 +5178,18 @@ declare class APIContext {
|
|
|
5064
5178
|
status: string;
|
|
5065
5179
|
}>>;
|
|
5066
5180
|
searchConversationByContent(keyword: string, customMessageTypes?: string[], channelId?: string, conversationTypes?: ConversationType[]): Promise<IAsyncRes<IReceivedConversation[]>>;
|
|
5181
|
+
searchConversationByContentWithAllChannel(keyword: string, customMessageTypes?: string[], conversationTypes?: ConversationType[]): Promise<IAsyncRes<IReceivedConversation[]>>;
|
|
5067
5182
|
searchMessageByContent(conversationType: ConversationType, targetId: string, keyword: string, timestamp: number, count: number, total: number, channelId?: string): Promise<IAsyncRes<{
|
|
5068
5183
|
messages: IReceivedMessage[];
|
|
5069
5184
|
count: number;
|
|
5070
5185
|
}>>;
|
|
5186
|
+
searchMessageByContentWithAllChannel(conversationType: ConversationType, targetId: string, keyword: string, timestamp: number, count: number): Promise<IAsyncRes<{
|
|
5187
|
+
messages: IReceivedMessage[];
|
|
5188
|
+
count: number;
|
|
5189
|
+
}>>;
|
|
5190
|
+
searchMessageByContentInTimeRangeWithAllChannel(conversationType: ConversationType, targetId: string, keyword: string, startTime: number, endTime: number, offset: number, limit: number): Promise<IAsyncRes<{
|
|
5191
|
+
messages: IReceivedMessage[];
|
|
5192
|
+
}>>;
|
|
5071
5193
|
getUnreadMentionedMessages(conversationType: ConversationType, targetId: string, channelId?: string): IReceivedMessage[];
|
|
5072
5194
|
clearUnreadCountByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): Promise<ErrorCode>;
|
|
5073
5195
|
/**
|
|
@@ -5096,6 +5218,7 @@ declare class APIContext {
|
|
|
5096
5218
|
}>>;
|
|
5097
5219
|
getConversationListWithAllChannel(): Promise<IAsyncRes<IReceivedConversation[]>>;
|
|
5098
5220
|
getConversationListWithAllChannelByPage(index: number, limit: number): Promise<IAsyncRes<IReceivedConversation[]>>;
|
|
5221
|
+
clearData(): Promise<IAsyncRes<boolean>>;
|
|
5099
5222
|
/**
|
|
5100
5223
|
* 加入房间
|
|
5101
5224
|
* @param roomId
|
|
@@ -5383,6 +5506,9 @@ interface IEngineWatcher {
|
|
|
5383
5506
|
ultraGroupMessageExpansionUpdated: (list: IReceivedMessage[]) => void;
|
|
5384
5507
|
ultraGroupMessageModified: (list: IReceivedMessage[]) => void;
|
|
5385
5508
|
ultraGroupMessageRecalled: (list: IReceivedMessage[]) => void;
|
|
5509
|
+
ultraGroupChannelChangeType: (list: IUltraChannelChangeInfo[]) => void;
|
|
5510
|
+
ultraGroupChannelUserKicked: (list: IUltraChannelUserKickedInfo[]) => void;
|
|
5511
|
+
ultraGroupChannelDelete: (list: IUltraChannelDeleteInfo[]) => void;
|
|
5386
5512
|
/**
|
|
5387
5513
|
* RTC 数据变更
|
|
5388
5514
|
*/
|
|
@@ -5403,7 +5529,6 @@ declare abstract class AEngine implements IEngine {
|
|
|
5403
5529
|
protected readonly _appkey: string;
|
|
5404
5530
|
protected readonly _apiVer: string;
|
|
5405
5531
|
protected readonly _apiVersion: string;
|
|
5406
|
-
protected _naviInfo: INaviInfo | null;
|
|
5407
5532
|
/**
|
|
5408
5533
|
* 引擎初始化
|
|
5409
5534
|
* @param _appkey
|
|
@@ -5418,7 +5543,7 @@ declare abstract class AEngine implements IEngine {
|
|
|
5418
5543
|
*/
|
|
5419
5544
|
getNaviInfo(token: string, dynamicUris: string[], force: boolean, checkCA?: boolean): Promise<INaviInfo | null>;
|
|
5420
5545
|
protected setNaviInfo2Cache(token: string, naviInfo: INaviInfo): void;
|
|
5421
|
-
|
|
5546
|
+
abstract getNaviInfoFromCache(): INaviInfo | null;
|
|
5422
5547
|
/**
|
|
5423
5548
|
* 清空导航数据:内存数据、缓存数据
|
|
5424
5549
|
*/
|
|
@@ -5478,6 +5603,13 @@ declare abstract class AEngine implements IEngine {
|
|
|
5478
5603
|
list: IReceivedMessage[];
|
|
5479
5604
|
hasMore: boolean;
|
|
5480
5605
|
}>;
|
|
5606
|
+
/**
|
|
5607
|
+
* 获取指定消息类型的历史消息
|
|
5608
|
+
*/
|
|
5609
|
+
abstract getHistoryMessagesByObjectNames(conversationType: ConversationType, targetId: string, timestamp: number, count: number, messageTypes: string[], order: number, channelId: string): Promise<IAsyncRes<{
|
|
5610
|
+
list: IReceivedMessage[];
|
|
5611
|
+
hasMore: boolean;
|
|
5612
|
+
}>>;
|
|
5481
5613
|
/**
|
|
5482
5614
|
* 删除历史消息 通过 messageUId
|
|
5483
5615
|
*/
|
|
@@ -5531,6 +5663,10 @@ declare abstract class AEngine implements IEngine {
|
|
|
5531
5663
|
* 会话的业务标识
|
|
5532
5664
|
*/
|
|
5533
5665
|
channelId?: string): IPromiseResult<IReceivedConversation[]>;
|
|
5666
|
+
/**
|
|
5667
|
+
* 分页获取会话列表,仅 electron中使用
|
|
5668
|
+
*/
|
|
5669
|
+
abstract getConversationsByPage(conversationTypes: ConversationType[], startTime: number, count: number, channelId: string): IPromiseResult<IReceivedConversation[]>;
|
|
5534
5670
|
/**
|
|
5535
5671
|
* 获取指定会话
|
|
5536
5672
|
*/
|
|
@@ -5790,7 +5926,7 @@ declare abstract class AEngine implements IEngine {
|
|
|
5790
5926
|
/**
|
|
5791
5927
|
* 获取所有超级群会话列表
|
|
5792
5928
|
*/
|
|
5793
|
-
abstract getUltraGroupList(): Promise<IAsyncRes<
|
|
5929
|
+
abstract getUltraGroupList(options: IGetUltraGroupListOption): Promise<IAsyncRes<IUltraGroupConversation[]>>;
|
|
5794
5930
|
/**
|
|
5795
5931
|
* 获取超级群免打扰列表
|
|
5796
5932
|
*/
|
|
@@ -5828,7 +5964,7 @@ declare abstract class AEngine implements IEngine {
|
|
|
5828
5964
|
* @param targetId
|
|
5829
5965
|
* @param options
|
|
5830
5966
|
*/
|
|
5831
|
-
abstract sendUltraMessage(targetId: string, options: ISendMsgOptions, traceId?: string): Promise<IAsyncRes>;
|
|
5967
|
+
abstract sendUltraMessage(targetId: string, options: ISendMsgOptions, onSendBefore?: (messageId: number) => void, traceId?: string): Promise<IAsyncRes>;
|
|
5832
5968
|
/**
|
|
5833
5969
|
* 超级群消息正在输入中
|
|
5834
5970
|
* @param options
|
|
@@ -5896,7 +6032,7 @@ declare abstract class AEngine implements IEngine {
|
|
|
5896
6032
|
/**
|
|
5897
6033
|
* 获取指定人员在黑名单中的状态
|
|
5898
6034
|
*/
|
|
5899
|
-
abstract getBlacklistStatus(userId: string): IPromiseResult<
|
|
6035
|
+
abstract getBlacklistStatus(userId: string): IPromiseResult<number>;
|
|
5900
6036
|
/**
|
|
5901
6037
|
* 向本地插入一条消息,不发送到服务器
|
|
5902
6038
|
*/
|
|
@@ -5904,7 +6040,7 @@ declare abstract class AEngine implements IEngine {
|
|
|
5904
6040
|
/**
|
|
5905
6041
|
* 删除本地消息
|
|
5906
6042
|
*/
|
|
5907
|
-
abstract deleteMessages(
|
|
6043
|
+
abstract deleteMessages(messageIds: number[]): Promise<ErrorCode>;
|
|
5908
6044
|
/**
|
|
5909
6045
|
* 通过时间戳删除本地消息
|
|
5910
6046
|
*/
|
|
@@ -5929,6 +6065,10 @@ declare abstract class AEngine implements IEngine {
|
|
|
5929
6065
|
* 通过关键字搜索会话
|
|
5930
6066
|
*/
|
|
5931
6067
|
abstract searchConversationByContent(keyword: string, customMessageTypes: string[], channelId: string, conversationTypes?: ConversationType[]): IPromiseResult<IReceivedConversation[]>;
|
|
6068
|
+
/**
|
|
6069
|
+
* 通过关键字搜索所有会话
|
|
6070
|
+
*/
|
|
6071
|
+
abstract searchConversationByContentWithAllChannel(keyword: string, customMessageTypes: string[], conversationTypes?: ConversationType[]): IPromiseResult<IReceivedConversation[]>;
|
|
5932
6072
|
/**
|
|
5933
6073
|
* 按内容搜索会话内的消息
|
|
5934
6074
|
*/
|
|
@@ -5936,6 +6076,19 @@ declare abstract class AEngine implements IEngine {
|
|
|
5936
6076
|
messages: IReceivedMessage[];
|
|
5937
6077
|
count: number;
|
|
5938
6078
|
}>;
|
|
6079
|
+
/**
|
|
6080
|
+
* 按内容搜索指定会话(不区分 channelId)的消息
|
|
6081
|
+
*/
|
|
6082
|
+
abstract searchMessageByContentWithAllChannel(conversationType: ConversationType, targetId: string, keyword: string, timestamp: number, count: number): IPromiseResult<{
|
|
6083
|
+
messages: IReceivedMessage[];
|
|
6084
|
+
count: number;
|
|
6085
|
+
}>;
|
|
6086
|
+
/**
|
|
6087
|
+
* 按内容搜索时间范围内指定会话(不区分 channelId)的消息
|
|
6088
|
+
*/
|
|
6089
|
+
abstract searchMessageByContentInTimeRangeWithAllChannel(conversationType: ConversationType, targetId: string, keyword: string, startTime: number, endTime: number, offset: number, limit: number): IPromiseResult<{
|
|
6090
|
+
messages: IReceivedMessage[];
|
|
6091
|
+
}>;
|
|
5939
6092
|
/**
|
|
5940
6093
|
* 获取会话下所有未读的 @ 消息
|
|
5941
6094
|
*/
|
|
@@ -5948,6 +6101,10 @@ declare abstract class AEngine implements IEngine {
|
|
|
5948
6101
|
* 设置消息接收状态
|
|
5949
6102
|
*/
|
|
5950
6103
|
abstract setMessageReceivedStatus(messageId: number, receivedStatus: number): Promise<ErrorCode>;
|
|
6104
|
+
/**
|
|
6105
|
+
* 将自己发送的指定时间之前的消息标记对方已读,状态值为 SentStatus.READ
|
|
6106
|
+
*/
|
|
6107
|
+
abstract updateMessageReceiptStatus(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): IPromiseResult<boolean>;
|
|
5951
6108
|
/**
|
|
5952
6109
|
* 删除时间戳前的未读数
|
|
5953
6110
|
*/
|
|
@@ -6001,6 +6158,7 @@ declare abstract class AEngine implements IEngine {
|
|
|
6001
6158
|
* 获取本地全部会话的状态
|
|
6002
6159
|
*/
|
|
6003
6160
|
abstract getAllConversationState(): Promise<IAsyncRes<IConversationState[]>>;
|
|
6161
|
+
abstract clearData(): Promise<IAsyncRes<boolean>>;
|
|
6004
6162
|
abstract joinRTCRoom(roomId: string, mode: RTCMode, broadcastType?: number, joinType?: RTCJoinType, innerUserDatas?: IRTCUserData, outerUserDatas?: IRTCUserData): IPromiseResult<IJoinRTCRoomData>;
|
|
6005
6163
|
abstract quitRTCRoom(roomId: string): Promise<ErrorCode>;
|
|
6006
6164
|
abstract rtcPing(roomId: string, mode: number, broadcastType?: number): Promise<ErrorCode>;
|
|
@@ -6189,6 +6347,7 @@ declare const isHttpUrl: (value: any) => boolean;
|
|
|
6189
6347
|
*/
|
|
6190
6348
|
declare const notEmptyObject: (val: Object) => boolean;
|
|
6191
6349
|
declare const isValidConversationType: (conversation: number) => boolean;
|
|
6350
|
+
declare const isValidChannelId: (value: any) => boolean;
|
|
6192
6351
|
/**
|
|
6193
6352
|
* 判断是否是一个有效的文件类型
|
|
6194
6353
|
*/
|
|
@@ -6229,7 +6388,7 @@ declare function insertIntoLogCache(logLevel: LogLevel, tagId: string, logObj: a
|
|
|
6229
6388
|
* @param level
|
|
6230
6389
|
* @param args
|
|
6231
6390
|
*/
|
|
6232
|
-
declare function _defaultStdout(level: LogLevel, msgTag: string,
|
|
6391
|
+
declare function _defaultStdout(level: LogLevel, msgTag: string, ...logContents: any[]): void;
|
|
6233
6392
|
/**
|
|
6234
6393
|
* Trace ID 生成器
|
|
6235
6394
|
*/
|
|
@@ -6344,6 +6503,10 @@ declare class Logger {
|
|
|
6344
6503
|
}
|
|
6345
6504
|
declare const _default: Logger;
|
|
6346
6505
|
|
|
6506
|
+
declare const randomNum: (min: number, max: number) => number;
|
|
6507
|
+
declare const getUUID: () => string;
|
|
6508
|
+
declare const getUUID22: () => string;
|
|
6509
|
+
|
|
6347
6510
|
/**
|
|
6348
6511
|
* 预定义的验证规则,只包含`值类型`数据验证
|
|
6349
6512
|
* 引用类型数据需使用自定义 validator 校验函数进行校验
|
|
@@ -6380,7 +6543,11 @@ declare enum AssertRules {
|
|
|
6380
6543
|
/**
|
|
6381
6544
|
* ChannelId 验证,必须为 String 且不超过 20 位 且不能包含下划线
|
|
6382
6545
|
*/
|
|
6383
|
-
CHANNEL_ID = 7
|
|
6546
|
+
CHANNEL_ID = 7,
|
|
6547
|
+
/**
|
|
6548
|
+
* 类型为会话
|
|
6549
|
+
*/
|
|
6550
|
+
CONVERSATION = 8
|
|
6384
6551
|
}
|
|
6385
6552
|
declare class RCAssertError extends Error {
|
|
6386
6553
|
constructor(message?: string);
|
|
@@ -6581,4 +6748,4 @@ declare const ONE_LOG_SIZE_MAX = 1000;
|
|
|
6581
6748
|
*/
|
|
6582
6749
|
declare const version: string;
|
|
6583
6750
|
|
|
6584
|
-
export { AEngine, APIContext, AppStorage, AssertRules, CONNECTION_TYPE, CPP_PROTOCAL_MSGTYPE_OPTION, CallLibMsgType, ChatroomEntryType, ChatroomUserChangeType
|
|
6751
|
+
export { AEngine, APIContext, AppStorage, AssertRules, CONNECTION_TYPE, CPP_PROTOCAL_MSGTYPE_OPTION, CallLibMsgType, ChatroomEntryType, ChatroomUserChangeType, CometChannel, ConnectResultCode, ConnectionStatus, ConversationType, DB_LOG_FLUSH_FREQUENCY, DB_LOG_MAX_SIZE, DelayTimer, ErrorCode, EventEmitter, FileType, HttpMethod, IAPIContextOption, IAndroidPushConfig, IAsyncRes, IBaseConversationInfo, IBlockedMessageInfo, ICancelRoomPKOptions, IChatRoomEntries, IChatRoomEntry, IChatroomEntries, IChatroomEntry, IChatroomEntryListenerData, IChatroomInfo, IChatroomListener, IChatroomListenerData, IChatroomRejoinedFailed, IChatroomRejoinedInfo, IChatroomRejoinedSuccessed, IChatroomUser, IChatroomUserChangeInfo, IChrmKVEntries, IChrmKVEntry, IConnectResult, IConnectionStatusListener, IConversationOption, IConversationState, IConversationStateListener, IConversationTag, IConversationTagListener, IDataChannelWatcher, IDeletedExpansion, IEndRoomPKOptions, IEngine, IEngineWatcher, IEventListener, IExpansionListener, IExpansionListenerData, IExpansionMsgContent, IExtraMethod, IGetMsgOption, IGetUltraGroupListOption, IGooglePushConfig, IInsertMsgOptions, IIsValidExpansion, IJoinRTCRoomData, ILocalReadReceiptInfo, ILocalTagStatus, ILogExtensions, ILogInfo, ILogInit, IM_CHATROOM_PULL_INTERVAL_TIME, IM_COMET_PULLMSG_TIMEOUT, IM_PING_INTERVAL_TIME, IM_PING_MIN_TIMEOUT, IM_PING_TIMEOUT, IM_SIGNAL_TIMEOUT, IMessageListnenr, IMessageReader, IMessageReaderResponse, IMetionedData, INaviInfo, IPluginGenerator, IPromiseResult, IPushConfig, IRTCInnerListener, IRTCJoinedInfo, IRTCRoomBindOption, IRTCRoomInfo, IRTCUserData, IRTCUsers, IReadReceiptInfo, IRealTimeLog, IRecallMsgContent, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IRemoveChatRoomEntries, IRemoveChatRoomEntry, IRemoveChatroomEntries, IRemoveChatroomEntry, IReqRoomPKOptions, IRequest, IResRoomPKOptions, IResponse, IRtcTokenData, IRuntime, ISendExMsgOptions, ISendMsgOptions, IServerConversationStatus, IServerRTCRoomEntry, IServerUserSetting, ISetConversationStatusOptions, IStorage, ITagInfo, ITagListener, ITagParam, ITagStatus, ITypingInfo, ITypingMessage, ITypingUser, IUltraExMsgOptions, IUltraGroupConversation, IUltraGroupOption, IUltraModifyMsgOptions, IUltraMsgQueryOptions, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserProfile, IWatcher, IWebSocket, IiOSPushConfig, ItypingStateListener, KVString, LiveRole, LiveType, LogLevel, LogSource, LogTagId, Logger, MAX_MESSAGE_CONTENT_BYTES, MAX_MESSAGE_EXPANSION_KEY_LENGTH, MAX_MESSAGE_EXPANSION_VAL_LENGTH, MINI_COMET_CONNECT_URIS, MINI_SOCKET_CONNECT_URIS, MentionedType, MessageBlockType, MessageDirection, MessageType, NAVI_CACHE_DURATION, NAVI_REQ_TIMEOUT, NetworkType, NotificationLevel, NotificationStatus, ONE_LOG_SIZE_MAX, OperateStatus, PING_REQ_TIMEOUT, PUBLIC_CLOUD_NAVI_URIS, PluginContext, RCAssertError, REAT_TIME_LOG_SIZE, RTCApiType, RTCIdentityChangeType, RTCJoinType, RTCMode, RTCPluginContext, ReceivedStatus, SEND_MESSAGE_TYPE_OPTION, STATUS_MESSAGE, STORAGE_ROOT_KEY, TagChangeType, UltraGroupChannelChangeType, UltraGroupChannelType, UltraMsgChangeType, UltraMsgSubChangeType, UploadMethod, VersionManage, WEB_SOCKET_TIMEOUT, WebSocketChannel, appendUrl, assert, clone, cloneByJSON, _default as engineLogger, forEach, formatConnectResponseCode, getBrowser, getMimeKey, getUUID, getUUID22, getUploadFileName, indexOf, isArray, isArrayBuffer, isBoolean, isFunction, isHttpUrl, isInObject, isInclude, isNull, isNumber, isObject, isString, isUndefined, isValidChannelId, isValidChrmEntryKey, isValidChrmEntryValue, isValidConversationType, isValidExpansion, isValidFileType, base as logger, map, notEmptyArray, notEmptyObject, notEmptyString, pushConfigsToJSON, pushJSONToConfigs, randomNum, todo, usingCppEngine, validate, version };
|