@rongcloud/engine 5.4.1 → 5.4.2-beem-alpha.1

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.
Files changed (4) hide show
  1. package/index.d.ts +2051 -1927
  2. package/index.esm.js +1 -18
  3. package/index.js +1 -18
  4. 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 MessageBlockType {
467
- /*!
468
- 全局敏感词:命中了融云内置的全局敏感词
469
- */
470
- GLOBAL = 1,
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
- CUSTOM = 2,
475
- /*!
476
- 第三方审核拦截:命中了第三方(数美)或模板路由决定不下发的状态
391
+ SIGHT = 5,
392
+ /**
393
+ * 合并转发
477
394
  */
478
- THIRD_PARTY = 3
395
+ COMBINE_HTML = 6
479
396
  }
480
397
 
481
398
  declare enum MessageDirection {
@@ -489,1148 +406,858 @@ declare enum MessageDirection {
489
406
  RECEIVE = 2
490
407
  }
491
408
 
492
- interface IGooglePushConfig {
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
- * 分组ID
420
+ * 未知原因失败。
495
421
  */
496
- collapseKey?: string;
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
- imageUrl?: string;
432
+ PARAMETER_CHANGED = -6,
501
433
  /**
502
- *优先级
434
+ * 成功
503
435
  */
504
- priority?: 'high' | 'normal';
505
- }
506
- interface IiOSPushConfig {
436
+ SUCCESS = 0,
507
437
  /**
508
- * iOS 用于通知分组的 id
438
+ * 群组 Id 无效
509
439
  */
510
- threadId?: string;
440
+ RC_DISCUSSION_GROUP_ID_INVALID = 20407,
511
441
  /**
512
- * iOS 用于通知覆盖的 id
442
+ * 发送频率过快
513
443
  */
514
- apnsCollapseId?: string;
444
+ SEND_FREQUENCY_TOO_FAST = 20604,
515
445
  /**
516
- * iOS 分类,如果不设置后台默认取消息类型字符串,如RC:TxtMsg
446
+ * 不在讨论组。
517
447
  */
518
- category?: string;
448
+ NOT_IN_DISCUSSION = 21406,
519
449
  /**
520
- * 和 category 对应
450
+ * 群组被禁言
521
451
  */
522
- richMediaUri?: string;
523
- }
524
- interface IAndroidPushConfig {
452
+ FORBIDDEN_IN_GROUP = 22408,
453
+ RECALL_MESSAGE = 25101,
525
454
  /**
526
- * Android 的通知 id
455
+ * 不在群组。
527
456
  */
528
- notificationId?: string;
457
+ NOT_IN_GROUP = 22406,
529
458
  /**
530
- * 小米的 channelId
459
+ * 不在聊天室。
531
460
  */
532
- channelIdMi?: string;
461
+ NOT_IN_CHATROOM = 23406,
533
462
  /**
534
- * 华为的 channelId
463
+ *聊天室被禁言
535
464
  */
536
- channelIdHW?: string;
465
+ FORBIDDEN_IN_CHATROOM = 23408,
537
466
  /**
538
- * OPPO 的 channelId
467
+ * 聊天室中成员被踢出
539
468
  */
540
- channelIdOPPO?: string;
469
+ RC_CHATROOM_USER_KICKED = 23409,
541
470
  /**
542
- * vivo 的类型
471
+ * 聊天室不存在
543
472
  */
544
- typeVivo?: string;
473
+ RC_CHATROOM_NOT_EXIST = 23410,
545
474
  /**
546
- * google FCM 的推送配置
547
- */
548
- googleConfig?: IGooglePushConfig;
549
- }
550
- interface IPushConfig {
475
+ * 聊天室成员已满
476
+ */
477
+ RC_CHATROOM_IS_FULL = 23411,
551
478
  /**
552
- * 推送标题
553
- * 如果没有设置,会使用下面的默认标题显示规则
554
- * 默认标题显示规则:
555
- * 内置消息:单聊通知标题显示为发送者名称,群聊通知标题显示为群名称。
556
- * 自定义消息:默认不显示标题。
479
+ * 获取聊天室信息参数无效
557
480
  */
558
- pushTitle: string;
481
+ RC_CHATROOM_PATAMETER_INVALID = 23412,
559
482
  /**
560
- * 推送内容
561
- * 优先使用 IPushConfig.pushContent, 如果没有,则使用发送消息的 pushContent 参数
483
+ * 聊天室异常
562
484
  */
563
- pushContent: string;
485
+ CHATROOM_GET_HISTORYMSG_ERROR = 23413,
564
486
  /**
565
- * 远程推送附加信息
566
- * 优先使用 IPushConfig.pushData, 如果没有,则使用发送消息的 pushContent 参数
487
+ * 没有打开聊天室消息存储
567
488
  */
568
- pushData: string;
489
+ CHATROOM_NOT_OPEN_HISTORYMSG_STORE = 23414,
569
490
  /**
570
- * iOSConfig
491
+ * 聊天室 KV 设置超出最大值(已满, 默认最多设置 100 个)
571
492
  */
572
- iOSConfig?: IiOSPushConfig;
493
+ CHATROOM_KV_EXCEED = 23423,
573
494
  /**
574
- * androidConfig
495
+ * 聊天室 KV 设置失败(kv 已存在, 需覆盖设置)
575
496
  */
576
- androidConfig?: IAndroidPushConfig;
497
+ CHATROOM_KV_OVERWRITE_INVALID = 23424,
577
498
  /**
578
- * 是否显示推送标题. 仅针对 iOS 平台有效
499
+ * 聊天室 KV 存储功能没有开通
579
500
  */
580
- disablePushTitle: boolean;
501
+ CHATROOM_KV_STORE_NOT_OPEN = 23426,
581
502
  /**
582
- * 是否强制推送
503
+ * 聊天室Key不存在
583
504
  */
584
- forceShowDetailContent: boolean;
505
+ CHATROOM_KEY_NOT_EXIST = 23427,
506
+ CHATROOM_KV_SET_ERROR = 23431,
585
507
  /**
586
- * 推送模板id
587
- */
588
- templateId: string;
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
- hasRespond?: boolean;
514
+ SENSITIVE_REPLACE = 21502,
615
515
  /**
616
- * 已阅读用户列表(不准确)
516
+ * 加入讨论失败
617
517
  */
618
- readerList?: IMessageReader[];
518
+ JOIN_IN_DISCUSSION = 21407,
619
519
  /**
620
- * 阅读人数(不准确)
520
+ * 创建讨论组失败
621
521
  */
622
- readCount?: number;
522
+ CREATE_DISCUSSION = 21408,
623
523
  /**
624
- * 群组总人数(不准确)
524
+ * 设置讨论组邀请状态失败
625
525
  */
626
- totalCount?: number;
627
- }
628
- /**
629
- * 从服务端接收到的消息数据
630
- */
631
- interface IReceivedMessage {
526
+ INVITE_DICUSSION = 21409,
632
527
  /**
633
- * 会话的业务标识
634
- */
635
- channelId?: string;
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
- conversationType: ConversationType;
534
+ REJECTED_BY_BLACKLIST = 405,
648
535
  /**
649
- * 会话 targetId
536
+ * 通信过程中,当前 Socket 不存在。
650
537
  */
651
- targetId: string;
538
+ RC_NET_CHANNEL_INVALID = 30001,
652
539
  /**
653
- * 消息发送者的用户 Id
540
+ * Socket 连接不可用。
654
541
  */
655
- senderUserId: string;
542
+ RC_NET_UNAVAILABLE = 30002,
656
543
  /**
657
- * 消息内容
544
+ * 通信超时。
658
545
  */
659
- content: any;
546
+ RC_MSG_RESP_TIMEOUT = 30003,
660
547
  /**
661
- * 消息结构名称,即消息类型
662
- * @example RC:TxtMsg
548
+ * 导航操作时,Http 请求失败。
663
549
  */
664
- messageType: string;
550
+ RC_HTTP_SEND_FAIL = 30004,
665
551
  /**
666
- * 服务端存储的消息 Id
552
+ * HTTP 请求失败。
667
553
  */
668
- messageUId: string;
554
+ RC_HTTP_REQ_TIMEOUT = 30005,
669
555
  /**
670
- * 消息方向是发出 or 收取
556
+ * HTTP 接收失败。
671
557
  */
672
- messageDirection: MessageDirection;
558
+ RC_HTTP_RECV_FAIL = 30006,
673
559
  /**
674
- * 是否为离线消息
560
+ * 导航操作的 HTTP 请求,返回不是200。
675
561
  */
676
- isOffLineMessage: boolean;
562
+ RC_NAVI_RESOURCE_ERROR = 30007,
677
563
  /**
678
- * 消息在服务器端的发送时间
564
+ * 导航数据解析后,其中不存在有效数据。
679
565
  */
680
- sentTime: number;
566
+ RC_NODE_NOT_FOUND = 30008,
681
567
  /**
682
- * 消息接收时间,该时间通过消息的 `sentTime` 值在本地进行计算得出,不推荐使用
683
- * @description 当 isOffLineMessage 为 true 时,该值无效
568
+ * 导航数据解析后,其中不存在有效 IP 地址。
684
569
  */
685
- receivedTime: number;
570
+ RC_DOMAIN_NOT_RESOLVE = 30009,
686
571
  /**
687
- * 是否存储
688
- * @default true
572
+ * 创建 Socket 失败。
689
573
  */
690
- isPersited: boolean;
574
+ RC_SOCKET_NOT_CREATED = 30010,
691
575
  /**
692
- * 是否计数
693
- * @default true
576
+ * Socket 被断开。
694
577
  */
695
- isCounted: boolean;
578
+ RC_SOCKET_DISCONNECTED = 30011,
696
579
  /**
697
- * 是否为 @ 消息
580
+ * PING 操作失败。
698
581
  */
699
- isMentioned: boolean;
582
+ RC_PING_SEND_FAIL = 30012,
700
583
  /**
701
- * 消息是否静默
702
- * @description 静默消息不会发送 Push 信息和本地通知提醒
584
+ * PING 超时。
703
585
  */
704
- disableNotification: boolean;
586
+ RC_PONG_RECV_FAIL = 30013,
705
587
  /**
706
- * 是否是状态消息
588
+ * 消息发送失败。
707
589
  */
708
- isStatusMessage: boolean;
590
+ RC_MSG_SEND_FAIL = 30014,
709
591
  /**
710
- * 是否支持消息扩展存储
711
- */
712
- canIncludeExpansion: boolean;
592
+ * JSON 后的消息体超限, 目前最大 128kb
593
+ */
594
+ RC_MSG_CONTENT_EXCEED_LIMIT = 30016,
713
595
  /**
714
- * 消息携带的扩展存储
715
- */
716
- expansion: {
717
- [key: string]: any;
718
- } | null;
596
+ * 做 connect 连接时,收到的 ACK 超时。
597
+ */
598
+ RC_CONN_ACK_TIMEOUT = 31000,
719
599
  /**
720
- * 消息接收状态
721
- */
722
- receivedStatus: number;
600
+ * 参数错误。
601
+ */
602
+ RC_CONN_PROTO_VERSION_ERROR = 31001,
723
603
  /**
724
- * CPP 独有字段 消息本地 ID
725
- */
726
- messageId?: number;
604
+ * 参数错误,App Id 错误。
605
+ */
606
+ RC_CONN_ID_REJECT = 31002,
727
607
  /**
728
- * CPP 独有字段 消息发送状态
729
- */
730
- sentStatus?: number;
608
+ * 服务器不可用。
609
+ */
610
+ RC_CONN_SERVER_UNAVAILABLE = 31003,
731
611
  /**
732
- * 已读回执信息(导航配置grpRRVer=1时群组类型消息内存在, 其他情况为undefined)
612
+ * Token 错误。
733
613
  */
734
- readReceiptInfo?: IReadReceiptInfo;
614
+ RC_CONN_USER_OR_PASSWD_ERROR = 31004,
735
615
  /**
736
- * 推送扩展
616
+ * websocket 鉴权失败,通常为连接后未及时发送 Ping 或接收到 Pong
737
617
  */
738
- pushConfig?: IPushConfig;
618
+ RC_CONN_NOT_AUTHRORIZED = 31005,
739
619
  /**
740
- * 超级群专有字段,是否断档,服务端收到大量消息可能会断档,所以消息存在此标志位,断档需要客户手动拉取历史消息
620
+ * 重定向,地址错误。
741
621
  */
742
- isInterrupt?: boolean;
622
+ RC_CONN_REDIRECTED = 31006,
743
623
  /**
744
- * 拉取历史消息时表示该消息是否修改过(仅超级群有效)
624
+ * NAME 与后台注册信息不一致。
745
625
  */
746
- isModifyMessage?: boolean;
747
- }
748
- interface IUserProfile {
626
+ RC_CONN_PACKAGE_NAME_INVALID = 31007,
749
627
  /**
750
- * 用户 ID
751
- */
752
- id?: string;
628
+ * APP 被屏蔽、删除或不存在。
629
+ */
630
+ RC_CONN_APP_BLOCKED_OR_DELETED = 31008,
753
631
  /**
754
- * 用户名
632
+ * 用户被屏蔽。
755
633
  */
756
- name?: string;
634
+ RC_CONN_USER_BLOCKED = 31009,
757
635
  /**
758
- * 用户头像地址
759
- * @deprecated
636
+ * Disconnect,由服务器返回,比如用户互踢。
760
637
  */
761
- portraitUri?: string;
638
+ RC_DISCONN_KICK = 31010,
762
639
  /**
763
- * user info 中附加信息
640
+ * Disconnect,由服务器返回,比如用户互踢。
764
641
  */
765
- extra?: string;
642
+ RC_DISCONN_EXCEPTION = 31011,
766
643
  /**
767
- * 用户头像地址(向移动端兼容)
644
+ * 开启禁止把已在线客户端踢下线开关后,该错误码标识已有同类型端在线,禁止链接;
768
645
  */
769
- portrait?: string;
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
- user?: IUserProfile;
652
+ * One Time Password 已经被使用过
653
+ */
654
+ RC_OTP_USED = 31027,
801
655
  /**
802
- * Push 信息
803
- */
804
- pushContent?: string;
656
+ * token平台验证失败
657
+ */
658
+ RC_PLATFORM_ERROR = 31028,
805
659
  /**
806
- * 原消息体
807
- */
808
- oriContent?: any;
660
+ * 协议层内部错误。query,上传下载过程中数据错误。
661
+ */
662
+ RC_QUERY_ACK_NO_DATA = 32001,
809
663
  /**
810
- * 是否发送静默消息
811
- * @description
812
- * 当值为 `true` 时,服务器将不会发送 Push 信息,移动端也不会弹出本地通知提醒
813
- */
814
- disableNotification?: boolean;
664
+ * 协议层内部错误。
665
+ */
666
+ RC_MSG_DATA_INCOMPLETE = 32002,
815
667
  /**
816
- * 移动端推送配置
817
- */
818
- pushConfig?: IPushConfig;
668
+ * 未调用 init 初始化函数。
669
+ */
670
+ BIZ_ERROR_CLIENT_NOT_INIT = 33001,
819
671
  /**
820
- * 其他拓展信息
821
- */
822
- extra?: string;
672
+ * 数据库初始化失败。
673
+ */
674
+ BIZ_ERROR_DATABASE_ERROR = 33002,
823
675
  /**
824
- * 是否删除原始消息(在移动端会使用到),为 true 时移动端会不显示小灰条提示
676
+ * 传入参数无效。
825
677
  */
826
- isDelete?: boolean;
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
- extra?: string;
684
+ * 重新连接成功。
685
+ */
686
+ BIZ_ERROR_RECONNECT_SUCCESS = 33005,
842
687
  /**
843
- * 发送消息携带的用户信息
844
- */
845
- user?: IUserProfile;
688
+ * 连接中,再调用 connect 被拒绝。
689
+ */
690
+ BIZ_ERROR_CONNECTING = 33006,
846
691
  /**
847
- * 是否删除原始消息(在移动端会使用到),为 true 时移动端会不显示小灰条提示
692
+ * 消息漫游服务未开通
848
693
  */
849
- isDelete?: boolean;
850
- }
851
- /**
852
- * 发送消息时的可选项信息
853
- */
854
- interface ISendMsgOptions {
694
+ MSG_ROAMING_SERVICE_UNAVAILABLE = 33007,
855
695
  /**
856
- * 消息类型,即消息结构的 ObjectName
696
+ * 消息存入本地数据库失败
857
697
  */
858
- messageType: string;
698
+ MSG_INSERT_ERROR = 33008,
859
699
  /**
860
- * 消息内容
700
+ * 删除本地消息失败
861
701
  */
862
- content: {
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
- isPersited?: boolean;
706
+ TAG_EXISTS = 33101,
881
707
  /**
882
- * 是否计数
883
- * @description 只在发送未注册过的自定义消息时有效,否则使用注册时的配置
708
+ * 标签不存在
884
709
  */
885
- isCounted?: boolean;
710
+ TAG_NOT_EXIST = 33100,
886
711
  /**
887
- * 是否是状态消息,一般为无需注册的自定义消息
888
- * @description
889
- * 1. 状态消息只有 pub,没有 ack 应答
890
- * 2. 状态消息默认不存储,不计数,`isPersited` 与 `isCounted` 配置将失效
712
+ * 会话中不存在此标签
891
713
  */
892
- isStatusMessage?: boolean;
714
+ NO_TAG_IN_CONVER = 33102,
893
715
  /**
894
- * 是否发送静默消息
895
- * @description
896
- * 当值为 `true` 时,服务器将不会发送 Push 信息,移动端也不会弹出本地通知提醒
716
+ * 删除会话失败
897
717
  */
898
- disableNotification?: boolean;
718
+ CONVER_REMOVE_ERROR = 34001,
899
719
  /**
900
- * Push 信息
720
+ *拉取历史消息
901
721
  */
902
- pushContent?: string;
722
+ CONVER_GETLIST_ERROR = 34002,
903
723
  /**
904
- * Push 通知携带的附加信息
724
+ * 会话指定异常
905
725
  */
906
- pushData?: string;
726
+ CONVER_SETOP_ERROR = 34003,
907
727
  /**
908
- * 是否为 @ 消息,只当 conversationType 值为 `ConversationType.GROUP` 时有效
728
+ * 获取会话未读消息总数失败
909
729
  */
910
- isMentioned?: boolean;
730
+ CONVER_TOTAL_UNREAD_ERROR = 34004,
911
731
  /**
912
- * `@` 消息类型
913
- * @description `1: @ 所有人 2: @ 指定用户`
732
+ * 获取指定会话类型未读消息数异常
914
733
  */
915
- mentionedType?: 1 | 2;
734
+ CONVER_TYPE_UNREAD_ERROR = 34005,
916
735
  /**
917
- * 被 @ 的用户 Id 列表,当 `mentionedType` 值为 `1` 时,该值可为空
736
+ * 获取指定用户ID&会话类型未读消息数异常
918
737
  */
919
- mentionedUserIdList?: string[];
738
+ CONVER_ID_TYPE_UNREAD_ERROR = 34006,
920
739
  /**
921
- * 用于发送群定向消息,只当 conversationType 值为 `ConversationType.GROUP` 时有效
740
+ * 扩展存储 key value 超出限制 (错误码与移动端对齐)
922
741
  */
923
- directionalUserIdList?: string[];
742
+ EXPANSION_LIMIT_EXCEET = 34010,
924
743
  /**
925
- * 当对方为 iOS 设备且未在线时,其将收到 Voip Push. 此配置对 Android 无影响
744
+ * 消息不支持扩展,原消息 canIncludeExpansion 值为 false (错误码与移动端对齐)
926
745
  */
927
- isVoipPush?: boolean;
746
+ MESSAGE_KV_NOT_SUPPORT = 34008,
928
747
  /**
929
- * 消息是否支持拓展内容
748
+ * 会话数量超出上限
930
749
  */
931
- canIncludeExpansion?: boolean;
750
+ CONVER_OUT_LIMIT_ERROR = 34013,
932
751
  /**
933
- * 消息拓展内容数据
752
+ * 获取会话失败
934
753
  */
935
- expansion?: {
936
- [key: string]: string;
937
- };
754
+ CONVER_GET_ERROR = 35021,
938
755
  /**
939
- * 黑/白名单
940
- * @todo 功能未知,需确认
756
+ * 群组信息异常
941
757
  */
942
- isFilerWhiteBlacklist?: boolean;
758
+ GROUP_SYNC_ERROR = 35001,
943
759
  /**
944
- * 移动端推送配置
945
- */
946
- pushConfig?: IPushConfig;
760
+ * 匹配群信息异常
761
+ */
762
+ GROUP_MATCH_ERROR = 35002,
947
763
  /**
948
- * 会话业务标识
949
- * @description
950
- * 20 个字符长度限制
951
- */
952
- channelId?: string;
764
+ * 已读回执方法调用错误(导航开关为1时调用新接口,否则调用sendMessage)
765
+ */
766
+ READ_RECEIPT_ERROR = 35003,
953
767
  /**
954
- * 客户端的消息标识
768
+ * 公有云包不允许连接私有云环境
955
769
  */
956
- messageId?: string;
770
+ PACKAGE_ENVIRONMENT_ERROR = 35006,
957
771
  /**
958
- * 超级群专有字段,是否断档,若断档需要客户判断是否拉取
772
+ * 已连接或者内部重连中,不允许调用重连,需先调用 disconnect 方法
959
773
  */
960
- isInterrupt?: boolean;
961
- }
962
- interface IInsertMsgOptions {
963
- senderUserId: string;
964
- messageType: string;
965
- content: any;
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
- * 消息 ID
984
- */
985
- messageUId: string;
776
+ * 不支持的平台类型,一般小程序或 PC 未开通
777
+ */
778
+ SERVER_UNAVAILABLE = 35008,
986
779
  /**
987
- * 原始消息是否支持扩展的字段
988
- */
989
- canIncludeExpansion: boolean;
780
+ * Web 端设置安全域名后,连接端域名不在安全域名范围内
781
+ */
782
+ HOSTNAME_ERROR = 35009,
990
783
  /**
991
- * 删除的 keys
992
- */
993
- keys?: string[];
784
+ * 开启`禁止把已在线客户端踢下线`开关后,该错误码标识已有同类型端在线,禁止链接
785
+ */
786
+ HAS_OHTER_SAME_CLIENT_ON_LINE = 35010,
994
787
  /**
995
- * 扩展对象
996
- */
997
- expansion?: {
998
- [key: string]: string;
999
- };
788
+ * IM 在初次连接成功后,需立即同步消息,标记上线,然后获取全量超级群会话列表,列表同步完成前,所有超级群相关功能接口应不可用
789
+ */
790
+ METHOD_NOT_AVAILABLE = 35011,
1000
791
  /**
1001
- * 是否删除所有扩展
1002
- */
1003
- removeAll?: boolean;
792
+ * 该功能不支持超级群
793
+ */
794
+ METHOD_NOT_SUPPORT = 35012,
1004
795
  /**
1005
- * 原始消息的扩展
1006
- */
1007
- originExpansion?: {
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
- * 删除的 keys
1020
- */
1021
- keys?: string[];
800
+ * 该功能仅支持超级群
801
+ */
802
+ METHOD_ONLY_SUPPORT_ULTRA_GROUP = 35014,
1022
803
  /**
1023
- * 扩展对象
1024
- */
1025
- expansion?: {
1026
- [key: string]: string;
1027
- };
804
+ * 上传文件失败
805
+ */
806
+ UPLOAD_FILE_FAILED = 35020,
1028
807
  /**
1029
- * 是否删除所有扩展
1030
- */
1031
- removeAll?: boolean;
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
- content: {
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
- * 方法并未引用,getTimer 实际返回值始终为 Date.now()
1088
- * @deprecated
816
+ * 拉取聊天室历史消息失败
1089
817
  */
1090
- setTime: (time: number) => void;
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
- UNKNOWN = -2,
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
- PARAMETER_CHANGED = -6,
826
+ BLACK_ADD_ERROR = 37001,
1118
827
  /**
1119
- * 成功
828
+ * 获得指定人员再黑名单中的状态异常
1120
829
  */
1121
- SUCCESS = 0,
830
+ BLACK_GETSTATUS_ERROR = 37002,
1122
831
  /**
1123
- * 群组 Id 无效
832
+ * 移除黑名单异常
1124
833
  */
1125
- RC_DISCUSSION_GROUP_ID_INVALID = 20407,
834
+ BLACK_REMOVE_ERROR = 37003,
1126
835
  /**
1127
- * 发送频率过快
836
+ * 获取草稿失败
1128
837
  */
1129
- SEND_FREQUENCY_TOO_FAST = 20604,
838
+ DRAF_GET_ERROR = 38001,
1130
839
  /**
1131
- * 不在讨论组。
840
+ * 保存草稿失败
1132
841
  */
1133
- NOT_IN_DISCUSSION = 21406,
842
+ DRAF_SAVE_ERROR = 38002,
1134
843
  /**
1135
- * 群组被禁言
844
+ * 删除草稿失败
1136
845
  */
1137
- FORBIDDEN_IN_GROUP = 22408,
1138
- RECALL_MESSAGE = 25101,
846
+ DRAF_REMOVE_ERROR = 38003,
1139
847
  /**
1140
- * 不在群组。
848
+ * 关注公众号失败
1141
849
  */
1142
- NOT_IN_GROUP = 22406,
850
+ SUBSCRIBE_ERROR = 39001,
1143
851
  /**
1144
- * 不在聊天室。
852
+ * 方法未支持
1145
853
  */
1146
- NOT_IN_CHATROOM = 23406,
854
+ NOT_SUPPORT = 39002,
1147
855
  /**
1148
- *聊天室被禁言
856
+ * 关注公众号失败
1149
857
  */
1150
- FORBIDDEN_IN_CHATROOM = 23408,
858
+ QNTKN_FILETYPE_ERROR = 41001,
1151
859
  /**
1152
- * 聊天室中成员被踢出
860
+ * 获取七牛token失败
1153
861
  */
1154
- RC_CHATROOM_USER_KICKED = 23409,
862
+ QNTKN_GET_ERROR = 41002,
1155
863
  /**
1156
- * 聊天室不存在
864
+ * cookie被禁用
1157
865
  */
1158
- RC_CHATROOM_NOT_EXIST = 23410,
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,
1159
878
  /**
1160
- * 聊天室成员已满
879
+ * 己方取消已发出的通话请求
1161
880
  */
1162
- RC_CHATROOM_IS_FULL = 23411,
881
+ CANCEL = 1,
1163
882
  /**
1164
- * 获取聊天室信息参数无效
883
+ * 己方拒绝收到的通话请求
1165
884
  */
1166
- RC_CHATROOM_PATAMETER_INVALID = 23412,
885
+ REJECT = 2,
1167
886
  /**
1168
- * 聊天室异常
887
+ * 己方挂断
1169
888
  */
1170
- CHATROOM_GET_HISTORYMSG_ERROR = 23413,
889
+ HANGUP = 3,
1171
890
  /**
1172
- * 没有打开聊天室消息存储
891
+ * 己方忙碌
1173
892
  */
1174
- CHATROOM_NOT_OPEN_HISTORYMSG_STORE = 23414,
893
+ BUSYLINE = 4,
1175
894
  /**
1176
- * 聊天室 KV 设置超出最大值(已满, 默认最多设置 100 个)
895
+ * 己方未接听
1177
896
  */
1178
- CHATROOM_KV_EXCEED = 23423,
897
+ NO_RESPONSE = 5,
1179
898
  /**
1180
- * 聊天室 KV 设置失败(kv 已存在, 需覆盖设置)
899
+ * 己方不支持当前引擎
1181
900
  */
1182
- CHATROOM_KV_OVERWRITE_INVALID = 23424,
901
+ ENGINE_UN_SUPPORTED = 6,
1183
902
  /**
1184
- * 聊天室 KV 存储功能没有开通
903
+ * 己方网络出错
1185
904
  */
1186
- CHATROOM_KV_STORE_NOT_OPEN = 23426,
905
+ NETWORK_ERROR = 7,
1187
906
  /**
1188
- * 聊天室Key不存在
907
+ * 对方取消已发出的通话请求
1189
908
  */
1190
- CHATROOM_KEY_NOT_EXIST = 23427,
1191
- /*!
1192
- 聊天室设置 KV 失败,出现在两人或者多端同时操作一个 kv。
1193
- 如果出现该错误,为避免和其他端同时操作,请延时一定时间再试
1194
- */
1195
- CHATROOM_KV_SET_ERROR = 23431,
909
+ REMOTE_CANCEL = 11,
1196
910
  /**
1197
- * 敏感词屏蔽
911
+ * 对方拒绝收到的通话请求
1198
912
  */
1199
- SENSITIVE_SHIELD = 21501,
913
+ REMOTE_REJECT = 12,
1200
914
  /**
1201
- * 消息中含敏感词且敏感词已被替换
915
+ * 通话过程对方挂断
1202
916
  */
1203
- SENSITIVE_REPLACE = 21502,
917
+ REMOTE_HANGUP = 13,
1204
918
  /**
1205
- * 加入讨论失败
919
+ * 对方忙碌
1206
920
  */
1207
- JOIN_IN_DISCUSSION = 21407,
921
+ REMOTE_BUSYLINE = 14,
1208
922
  /**
1209
- * 创建讨论组失败
923
+ * 对方未接听
1210
924
  */
1211
- CREATE_DISCUSSION = 21408,
925
+ REMOTE_NO_RESPONSE = 15,
1212
926
  /**
1213
- * 设置讨论组邀请状态失败
927
+ * 对方网络错误
1214
928
  */
1215
- INVITE_DICUSSION = 21409,
929
+ REMOTE_ENGINE_UN_SUPPORTED = 16,
1216
930
  /**
1217
- *获取用户失败
931
+ * 对方网络错误
1218
932
  */
1219
- GET_USERINFO_ERROR = 23407,
933
+ REMOTE_NETWORK_ERROR = 17,
1220
934
  /**
1221
- * 在黑名单中。
935
+ * VoIP 不可用
1222
936
  */
1223
- REJECTED_BY_BLACKLIST = 405,
937
+ VOIP_NOT_AVALIABLE = 18,
1224
938
  /**
1225
- * 通信过程中,当前 Socket 不存在。
939
+ * 聊天室批量设置kv部分不成功
1226
940
  */
1227
- RC_NET_CHANNEL_INVALID = 30001,
941
+ CHATROOM_KV_STORE_NOT_ALL_SUCCESS = 23428,
1228
942
  /**
1229
- * Socket 连接不可用。
943
+ * 聊天室设置批量kv,一次不能超过10个
1230
944
  */
1231
- RC_NET_UNAVAILABLE = 30002,
945
+ CHATROOM_KV_STORE_OUT_LIMIT = 23429
946
+ }
947
+
948
+ /**
949
+ * 连接状态
950
+ */
951
+ declare enum ConnectionStatus {
1232
952
  /**
1233
- * 通信超时。
953
+ * 连接成功。
1234
954
  */
1235
- RC_MSG_RESP_TIMEOUT = 30003,
955
+ CONNECTED = 0,
1236
956
  /**
1237
- * 导航操作时,Http 请求失败。
957
+ * 连接中。
1238
958
  */
1239
- RC_HTTP_SEND_FAIL = 30004,
959
+ CONNECTING = 1,
1240
960
  /**
1241
- * HTTP 请求失败。
961
+ * 正常断开连接。
1242
962
  */
1243
- RC_HTTP_REQ_TIMEOUT = 30005,
963
+ DISCONNECTED = 2,
1244
964
  /**
1245
- * HTTP 接收失败。
965
+ * 网络不可用。
1246
966
  */
1247
- RC_HTTP_RECV_FAIL = 30006,
967
+ NETWORK_UNAVAILABLE = 3,
1248
968
  /**
1249
- * 导航操作的 HTTP 请求,返回不是200。
969
+ * 连接关闭。
1250
970
  */
1251
- RC_NAVI_RESOURCE_ERROR = 30007,
971
+ CONNECTION_CLOSED = 4,
1252
972
  /**
1253
- * 导航数据解析后,其中不存在有效数据。
973
+ * 用户账户在其他设备登录,本机会被踢掉线。
1254
974
  */
1255
- RC_NODE_NOT_FOUND = 30008,
975
+ KICKED_OFFLINE_BY_OTHER_CLIENT = 6,
1256
976
  /**
1257
- * 导航数据解析后,其中不存在有效 IP 地址。
977
+ * websocket 连接失败
1258
978
  */
1259
- RC_DOMAIN_NOT_RESOLVE = 30009,
979
+ WEBSOCKET_UNAVAILABLE = 7,
1260
980
  /**
1261
- * 创建 Socket 失败。
981
+ * websocket 报错
1262
982
  */
1263
- RC_SOCKET_NOT_CREATED = 30010,
983
+ WEBSOCKET_ERROR = 8,
1264
984
  /**
1265
- * Socket 被断开。
985
+ * 用户被封禁
1266
986
  */
1267
- RC_SOCKET_DISCONNECTED = 30011,
987
+ BLOCKED = 9,
1268
988
  /**
1269
- * PING 操作失败。
989
+ * 域名错误
1270
990
  */
1271
- RC_PING_SEND_FAIL = 30012,
991
+ DOMAIN_INCORRECT = 12,
1272
992
  /**
1273
- * PING 超时。
993
+ * 服务器主动断开
1274
994
  */
1275
- RC_PONG_RECV_FAIL = 30013,
995
+ DISCONNECT_BY_SERVER = 13,
1276
996
  /**
1277
- * 消息发送失败。
997
+ * 重定向
1278
998
  */
1279
- RC_MSG_SEND_FAIL = 30014,
999
+ REDIRECT = 14,
1280
1000
  /**
1281
- * JSON 后的消息体超限, 目前最大 128kb
1001
+ * appkey 不正确
1282
1002
  */
1283
- RC_MSG_CONTENT_EXCEED_LIMIT = 30016,
1003
+ APPKEY_IS_FAKE = 20,
1284
1004
  /**
1285
- * 做 connect 连接时,收到的 ACK 超时。
1286
- */
1287
- RC_CONN_ACK_TIMEOUT = 31000,
1005
+ * 其他端登录,本端禁止连接和重连
1006
+ */
1007
+ FORBID_RECONNECT_BY_OTHER_SAME_CLIENT = 31023,
1288
1008
  /**
1289
- * 参数错误。
1009
+ * 互踢次数过多(`count > 5`),此时可能出现:在其它他设备登陆有 reconnect 逻辑
1290
1010
  */
1291
- RC_CONN_PROTO_VERSION_ERROR = 31001,
1011
+ ULTRALIMIT = 1101,
1292
1012
  /**
1293
- * 参数错误,App Id 错误。
1013
+ * 开始请求导航
1294
1014
  */
1295
- RC_CONN_ID_REJECT = 31002,
1015
+ REQUEST_NAVI = 201,
1296
1016
  /**
1297
- * 服务器不可用。
1017
+ * 请求导航结束
1298
1018
  */
1299
- RC_CONN_SERVER_UNAVAILABLE = 31003,
1019
+ RESPONSE_NAVI = 202,
1300
1020
  /**
1301
- * Token 错误。
1021
+ * 请求导航失败
1302
1022
  */
1303
- RC_CONN_USER_OR_PASSWD_ERROR = 31004,
1023
+ RESPONSE_NAVI_ERROR = 203,
1304
1024
  /**
1305
- * websocket 鉴权失败,通常为连接后未及时发送 Ping 或接收到 Pong
1025
+ * 请求导航超时
1306
1026
  */
1307
- RC_CONN_NOT_AUTHRORIZED = 31005,
1027
+ RESPONSE_NAVI_TIMEOUT = 204
1028
+ }
1029
+
1030
+ declare enum ReceivedStatus {
1308
1031
  /**
1309
- * 重定向,地址错误。
1310
- */
1311
- RC_CONN_REDIRECTED = 31006,
1032
+ * 已读
1033
+ */
1034
+ READ = 1,
1312
1035
  /**
1313
- * NAME 与后台注册信息不一致。
1314
- */
1315
- RC_CONN_PACKAGE_NAME_INVALID = 31007,
1036
+ * 已听
1037
+ */
1038
+ LISTENED = 2,
1316
1039
  /**
1317
- * APP 被屏蔽、删除或不存在。
1318
- */
1319
- RC_CONN_APP_BLOCKED_OR_DELETED = 31008,
1040
+ * 已下载
1041
+ */
1042
+ DOWNLOADED = 4,
1320
1043
  /**
1321
- * 用户被屏蔽。
1322
- */
1323
- RC_CONN_USER_BLOCKED = 31009,
1044
+ * 该消息已经被其他登录的多端收取过。( 即该消息已经被其他端收取过后。当前端才登录,并重新拉取了这条消息。客户可以通过这个状态更新 UI,比如不再提示 )
1045
+ */
1046
+ RETRIEVED = 8,
1324
1047
  /**
1325
- * Disconnect,由服务器返回,比如用户互踢。
1326
- */
1327
- RC_DISCONN_KICK = 31010,
1048
+ * 未读
1049
+ */
1050
+ UNREAD = 0
1051
+ }
1052
+
1053
+ /**
1054
+ * CMP/Comet 服务连接应答码
1055
+ */
1056
+ declare const ConnectResultCode: {
1328
1057
  /**
1329
- * Disconnect,由服务器返回,比如用户互踢。
1058
+ * 连接成功
1330
1059
  */
1331
- RC_DISCONN_EXCEPTION = 31011,
1060
+ ACCEPTED: number;
1332
1061
  /**
1333
- * 开启禁止把已在线客户端踢下线开关后,该错误码标识已有同类型端在线,禁止链接;
1062
+ * 协议版本不匹配
1063
+ * @description 暂未使用
1334
1064
  */
1335
- RC_DISCONN_SAME_CLIENT_ON_LINE = 31023,
1065
+ UNACCEPTABLE_PROTOCOL_VERSION: number;
1336
1066
  /**
1337
- * app 验证Token 验证不通过。所有内部超时,访问失败,返回给客户端sdk都是验证不通过,由服务端日志去看具体是那种失败。
1067
+ * 客户端(移动端 TCP 连接建立时)`info` 字段格式错误
1068
+ * @description 格式:`{平台类型}-{设备信息}-{sdk版本}`。
1069
+ * 其中设备信息为:{手机类型}{手机型号}{网络类型,4G/WIFI}{运营商标识, 移动/电信/联通}
1338
1070
  */
1339
- RC_APP_AUTH_NOT_PASS = 31026,
1071
+ IDENTIFIER_REJECTED: number;
1340
1072
  /**
1341
- * One Time Password 已经被使用过
1073
+ * 不支持的平台类型,一般小程序或 PC 未开通
1342
1074
  */
1343
- RC_OTP_USED = 31027,
1075
+ SERVER_UNAVAILABLE: number;
1344
1076
  /**
1345
- * token平台验证失败
1077
+ * Token无法解析,或Token已过期
1346
1078
  */
1347
- RC_PLATFORM_ERROR = 31028,
1079
+ TOKEN_INCORRECT: number;
1348
1080
  /**
1349
- * 协议层内部错误。query,上传下载过程中数据错误。
1081
+ * 防黑产规则相关应答
1350
1082
  */
1351
- RC_QUERY_ACK_NO_DATA = 32001,
1083
+ NOT_AUTHORIZED: number;
1352
1084
  /**
1353
- * 协议层内部错误。
1085
+ * 服务重定向,一般服务扩缩容时,落点已经改变,此时 userId 链接到旧的节点时,会触发该错误。
1086
+ * 客户端收到该应答后须重新访问导航,重新获取 CMP 地址
1354
1087
  */
1355
- RC_MSG_DATA_INCOMPLETE = 32002,
1088
+ REDIRECT: number;
1356
1089
  /**
1357
- * 未调用 init 初始化函数。
1090
+ * 暂未使用
1358
1091
  */
1359
- BIZ_ERROR_CLIENT_NOT_INIT = 33001,
1092
+ PACKAGE_ERROR: number;
1360
1093
  /**
1361
- * 数据库初始化失败。
1094
+ * 该 AppKey 已经封禁或删除
1362
1095
  */
1363
- BIZ_ERROR_DATABASE_ERROR = 33002,
1096
+ APP_BLOCK_OR_DELETE: number;
1364
1097
  /**
1365
- * 传入参数无效。
1098
+ * 该用户 ID 已经被封禁
1366
1099
  */
1367
- BIZ_ERROR_INVALID_PARAMETER = 33003,
1100
+ BLOCK: number;
1368
1101
  /**
1369
- * 通道无效。
1102
+ * Token 已过期,暂未使用
1370
1103
  */
1371
- BIZ_ERROR_NO_CHANNEL = 33004,
1104
+ TOKEN_EXPIRE: number;
1372
1105
  /**
1373
- * 重新连接成功。
1106
+ * Token 中携带 deviceId 时,检测 Token 中 deviceId 与链接设备 deviceId 不一致
1374
1107
  */
1375
- BIZ_ERROR_RECONNECT_SUCCESS = 33005,
1108
+ DEVICE_ERROR: number;
1376
1109
  /**
1377
- * 连接中,再调用 connect 被拒绝。
1110
+ * Web 端设置安全域名后,连接端域名不在安全域名范围内
1378
1111
  */
1379
- BIZ_ERROR_CONNECTING = 33006,
1112
+ HOSTNAME_ERROR: number;
1380
1113
  /**
1381
- * 消息漫游服务未开通
1114
+ * 开启`禁止把已在线客户端踢下线`开关后,该错误码标识已有同类型端在线,禁止链接
1382
1115
  */
1383
- MSG_ROAMING_SERVICE_UNAVAILABLE = 33007,
1116
+ HASOHTERSAMECLIENTONLINE: number;
1384
1117
  /**
1385
- * 消息存入本地数据库失败
1118
+ * 客户端连错环境,引发连接拒绝
1386
1119
  */
1387
- MSG_INSERT_ERROR = 33008,
1120
+ IN_OTHER_CLUSTER: number;
1388
1121
  /**
1389
- * 删除本地消息失败
1122
+ * app 验证Token 验证不通过。所有内部超时,访问失败,返回给客户端sdk都是验证不通过,由服务端日志去看具体是那种失败。
1390
1123
  */
1391
- MSG_DEL_ERROR = 33009,
1124
+ APP_AUTH_NOT_PASS: number;
1392
1125
  /**
1393
- * 标签已存在
1126
+ * One Time Password 已经被使用过
1394
1127
  */
1395
- TAG_EXISTS = 33101,
1128
+ OTP_USED: number;
1396
1129
  /**
1397
- * 标签不存在
1130
+ * token平台验证失败
1398
1131
  */
1399
- TAG_NOT_EXIST = 33100,
1132
+ PLATFORM_ERROR: number;
1133
+ };
1134
+
1135
+ /**
1136
+ * 内置消息类型
1137
+ */
1138
+ declare enum MessageType {
1400
1139
  /**
1401
- * 会话中不存在此标签
1402
- */
1403
- NO_TAG_IN_CONVER = 33102,
1140
+ * 文字消息
1141
+ */
1142
+ TextMessage = "RC:TxtMsg",
1404
1143
  /**
1405
- * 删除会话失败
1406
- */
1407
- CONVER_REMOVE_ERROR = 34001,
1144
+ * 语音消息
1145
+ */
1146
+ VOICE = "RC:VcMsg",
1408
1147
  /**
1409
- *拉取历史消息
1410
- */
1411
- CONVER_GETLIST_ERROR = 34002,
1148
+ * 高质量消息
1149
+ */
1150
+ HQ_VOICE = "RC:HQVCMsg",
1412
1151
  /**
1413
- * 会话指定异常
1414
- */
1415
- CONVER_SETOP_ERROR = 34003,
1152
+ * 图片消息
1153
+ */
1154
+ IMAGE = "RC:ImgMsg",
1416
1155
  /**
1417
- * 获取会话未读消息总数失败
1418
- */
1419
- CONVER_TOTAL_UNREAD_ERROR = 34004,
1156
+ * GIF 消息
1157
+ */
1158
+ GIF = "RC:GIFMsg",
1420
1159
  /**
1421
- * 获取指定会话类型未读消息数异常
1422
- */
1423
- CONVER_TYPE_UNREAD_ERROR = 34005,
1160
+ * 图文消息
1161
+ */
1162
+ RICH_CONTENT = "RC:ImgTextMsg",
1424
1163
  /**
1425
- * 获取指定用户ID&会话类型未读消息数异常
1426
- */
1427
- CONVER_ID_TYPE_UNREAD_ERROR = 34006,
1164
+ * 位置消息
1165
+ */
1166
+ LOCATION = "RC:LBSMsg",
1428
1167
  /**
1429
- * 扩展存储 key value 超出限制 (错误码与移动端对齐)
1430
- */
1431
- EXPANSION_LIMIT_EXCEET = 34010,
1168
+ * 文件消息
1169
+ */
1170
+ FILE = "RC:FileMsg",
1432
1171
  /**
1433
- * 消息不支持扩展,原消息 canIncludeExpansion 值为 false (错误码与移动端对齐)
1434
- */
1435
- MESSAGE_KV_NOT_SUPPORT = 34008,
1172
+ * 小视频消息
1173
+ */
1174
+ SIGHT = "RC:SightMsg",
1436
1175
  /**
1437
- * 会话数量超出上限
1438
- */
1439
- CONVER_OUT_LIMIT_ERROR = 34013,
1176
+ * 合并转发消息
1177
+ */
1178
+ COMBINE = "RC:CombineMsg",
1440
1179
  /**
1441
- * 获取会话失败
1442
- */
1443
- CONVER_GET_ERROR = 35021,
1180
+ * 聊天室 KV 通知消息
1181
+ */
1182
+ CHRM_KV_NOTIFY = "RC:chrmKVNotiMsg",
1444
1183
  /**
1445
- * 群组信息异常
1446
- */
1447
- GROUP_SYNC_ERROR = 35001,
1184
+ * 日志通知消息
1185
+ */
1186
+ LOG_COMMAND = "RC:LogCmdMsg",
1448
1187
  /**
1449
- * 匹配群信息异常
1450
- */
1451
- GROUP_MATCH_ERROR = 35002,
1188
+ * 消息扩展
1189
+ */
1190
+ EXPANSION_NOTIFY = "RC:MsgExMsg",
1452
1191
  /**
1453
- * 已读回执方法调用错误(导航开关为1时调用新接口,否则调用sendMessage)
1454
- */
1455
- READ_RECEIPT_ERROR = 35003,
1192
+ * 引用消息
1193
+ */
1194
+ REFERENCE = "RC:ReferenceMsg",
1456
1195
  /**
1457
- * 公有云包不允许连接私有云环境
1458
- */
1459
- PACKAGE_ENVIRONMENT_ERROR = 35006,
1196
+ * 撤回消息
1197
+ */
1198
+ RECALL = "RC:RcCmd",
1460
1199
  /**
1461
- * 已连接或者内部重连中,不允许调用重连,需先调用 disconnect 方法
1462
- */
1463
- CAN_NOT_RECONNECT = 35007,
1200
+ * 已读同步状态消息
1201
+ */
1202
+ READ_RECEIPT = "RC:ReadNtf",
1464
1203
  /**
1465
- * 不支持的平台类型,一般小程序或 PC 未开通
1466
- */
1467
- SERVER_UNAVAILABLE = 35008,
1204
+ * 群已读请求回执消息
1205
+ */
1206
+ READ_RECEIPT_REQUEST = "RC:RRReqMsg",
1468
1207
  /**
1469
- * Web 端设置安全域名后,连接端域名不在安全域名范围内
1470
- */
1471
- HOSTNAME_ERROR = 35009,
1208
+ * 群已读响应回执消息
1209
+ */
1210
+ READ_RECEIPT_RESPONSE = "RC:RRRspMsg",
1472
1211
  /**
1473
- * 开启`禁止把已在线客户端踢下线`开关后,该错误码标识已有同类型端在线,禁止链接
1474
- */
1475
- HAS_OHTER_SAME_CLIENT_ON_LINE = 35010,
1212
+ * 多端同步已读状态
1213
+ */
1214
+ SYNC_READ_STATUS = "RC:SRSMsg",
1476
1215
  /**
1477
- * IM 在初次连接成功后,需立即同步消息,标记上线,然后获取全量超级群会话列表,列表同步完成前,所有超级群相关功能接口应不可用
1216
+ * 接受群已读回执更新消息(导航开关grpRRVer为1时使用)
1478
1217
  */
1479
- METHOD_NOT_AVAILABLE = 35011,
1218
+ GROUP_READ_RECEIPT_REQUEST = "RC:RRMsg",
1480
1219
  /**
1481
- * 该功能不支持超级群
1482
- */
1483
- METHOD_NOT_SUPPORT = 35012,
1220
+ * 消息送达报告,仅单聊
1221
+ */
1222
+ DELIVERED = "RC:Delivered",
1484
1223
  /**
1485
- * 消息数量没在范围内
1224
+ * 消息送达状态报告,仅群聊
1486
1225
  */
1487
- MSG_LIMIT_ERROR = 35013,
1488
- /**
1489
- * 该功能仅支持超级群
1490
- */
1491
- METHOD_ONLY_SUPPORT_ULTRA_GROUP = 35014,
1492
- /**
1493
- * 上传文件失败
1494
- */
1495
- UPLOAD_FILE_FAILED = 35020,
1496
- /**
1497
- * 加入聊天室Id为空
1498
- */
1499
- CHATROOM_ID_ISNULL = 36001,
1500
- /**
1501
- * 加入聊天室失败
1502
- */
1503
- CHARTOOM_JOIN_ERROR = 36002,
1504
- /**
1505
- * 拉取聊天室历史消息失败
1506
- */
1507
- CHATROOM_HISMESSAGE_ERROR = 36003,
1508
- /**
1509
- * 聊天室 kv 未找到
1510
- */
1511
- CHATROOM_KV_NOT_FOUND = 36004,
1512
- /**
1513
- * 加入黑名单异常
1514
- */
1515
- BLACK_ADD_ERROR = 37001,
1516
- /**
1517
- * 获得指定人员再黑名单中的状态异常
1518
- */
1519
- BLACK_GETSTATUS_ERROR = 37002,
1520
- /**
1521
- * 移除黑名单异常
1522
- */
1523
- BLACK_REMOVE_ERROR = 37003,
1524
- /**
1525
- * 获取草稿失败
1526
- */
1527
- DRAF_GET_ERROR = 38001,
1528
- /**
1529
- * 保存草稿失败
1530
- */
1531
- DRAF_SAVE_ERROR = 38002,
1532
- /**
1533
- * 删除草稿失败
1534
- */
1535
- DRAF_REMOVE_ERROR = 38003,
1536
- /**
1537
- * 关注公众号失败
1538
- */
1539
- SUBSCRIBE_ERROR = 39001,
1540
- /**
1541
- * 方法未支持
1542
- */
1543
- NOT_SUPPORT = 39002,
1544
- /**
1545
- * 关注公众号失败
1546
- */
1547
- QNTKN_FILETYPE_ERROR = 41001,
1548
- /**
1549
- * 获取七牛token失败
1550
- */
1551
- QNTKN_GET_ERROR = 41002,
1552
- /**
1553
- * cookie被禁用
1554
- */
1555
- COOKIE_ENABLE = 51001,
1556
- HAVNODEVICEID = 24001,
1557
- DEVICEIDISHAVE = 24002,
1558
- FEILD = 24009,
1559
- VOIPISNULL = 24013,
1560
- NOENGINETYPE = 24010,
1561
- NULLCHANNELNAME = 24011,
1562
- VOIPDYANMICERROR = 24012,
1563
- NOVOIP = 24014,
1564
- INTERNALERRROR = 24015,
1565
- VOIPCLOSE = 24016,
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,
1226
+ DELIVERED_MSG = "RC:DRMsg",
1606
1227
  /**
1607
- * 对方忙碌
1228
+ * 用户加入聊天室
1608
1229
  */
1609
- REMOTE_BUSYLINE = 14,
1230
+ CHATROOM_JOIN = "RC:ChrmJoinNtf",
1610
1231
  /**
1611
- * 对方未接听
1232
+ * 用户退出聊天室
1612
1233
  */
1613
- REMOTE_NO_RESPONSE = 15,
1234
+ CHATROOM_LEFT = "RC:ChrmQuitNtf",
1614
1235
  /**
1615
- * 对方网络错误
1236
+ * 用户加入退出聊天室的集合
1616
1237
  */
1617
- REMOTE_ENGINE_UN_SUPPORTED = 16,
1238
+ CHATROOM_MERGE_CHANGE = "RC:ChrmMemChange",
1618
1239
  /**
1619
- * 对方网络错误
1240
+ * 输入状态消息
1620
1241
  */
1621
- REMOTE_NETWORK_ERROR = 17,
1242
+ TYPING_STATUS = "RC:TypSts",
1622
1243
  /**
1623
- * VoIP 不可用
1244
+ * 拦截消息,(当发送的消息的敏感词时,服务会下发一个拦截消息,内容包含被拦截消息信息)
1624
1245
  */
1625
- VOIP_NOT_AVALIABLE = 18,
1246
+ INTERCEPT = "RC:InterceptMsg"
1247
+ }
1248
+
1249
+ /**
1250
+ * @deprecated 已废弃,请使用 NotificationLevel
1251
+ */
1252
+ declare enum NotificationStatus {
1626
1253
  /**
1627
- * 聊天室批量设置kv部分不成功
1628
- */
1629
- CHATROOM_KV_STORE_NOT_ALL_SUCCESS = 23428,
1254
+ * 免打扰已开启
1255
+ */
1256
+ OPEN = 1,
1630
1257
  /**
1631
- * 聊天室设置批量kv,一次不能超过10个
1632
- */
1633
- CHATROOM_KV_STORE_OUT_LIMIT = 23429
1258
+ * 免打扰已关闭
1259
+ */
1260
+ CLOSE = 2
1634
1261
  }
1635
1262
 
1636
1263
  /**
@@ -1667,1364 +1294,1820 @@ declare enum NotificationLevel {
1667
1294
  }
1668
1295
 
1669
1296
  /**
1670
- * 音视频模式
1671
- */
1672
- declare enum RTCMode {
1297
+ * 群组 @ 类型
1298
+ */
1299
+ declare enum MentionedType {
1673
1300
  /**
1674
- * 普通音视频模式
1675
- */
1676
- RTC = 0,
1301
+ * 所有人
1302
+ */
1303
+ ALL = 1,
1677
1304
  /**
1678
- * 直播模式
1679
- */
1680
- LIVE = 2
1305
+ * 部分人
1306
+ */
1307
+ SINGAL = 2
1681
1308
  }
1682
- /**
1683
- * 直播类型
1684
- */
1685
- declare enum LiveType {
1686
- /**
1687
- * 音视频直播
1688
- */
1689
- AUDIO_AND_VIDEO = 0,
1690
- /**
1691
- * 音频直播
1692
- */
1693
- AUDIO = 1
1309
+
1310
+ interface IMetionedData {
1311
+ type?: MentionedType;
1312
+ userIdList?: string[];
1313
+ mentionedContent?: string;
1694
1314
  }
1695
- declare enum LiveRole {
1696
- /**
1697
- * 主播身份
1698
- */
1699
- ANCHOR = 1,
1315
+
1316
+ declare enum UploadMethod {
1700
1317
  /**
1701
- * 观众身份
1318
+ * 七牛上传
1702
1319
  */
1703
- AUDIENCE = 2
1704
- }
1705
- /**
1706
- * CallLib 流程消息
1707
- */
1708
- declare const CallLibMsgType: {
1709
- 'RC:VCAccept': string;
1710
- 'RC:VCRinging': string;
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
1720
- }
1721
- declare enum RTCIdentityChangeType {
1722
- AnchorToViewer = 1,
1723
- ViewerToAnchor = 2
1724
- }
1725
- /**
1726
- * RTC 房间加入类型
1727
- */
1728
- declare enum RTCJoinType {
1320
+ QINIU = 1,
1729
1321
  /**
1730
- * 踢前一个设备
1322
+ * 阿里云上传
1731
1323
  */
1732
- KICK = 0,
1324
+ ALI = 2,
1733
1325
  /**
1734
- * 当前加入拒绝
1326
+ * 亚马逊上传
1735
1327
  */
1736
- REFUSE = 1,
1328
+ AWS = 3,
1737
1329
  /**
1738
- * 两个设备共存
1330
+ * stc上传
1739
1331
  */
1740
- COEXIST = 2
1332
+ STC = 4
1741
1333
  }
1742
1334
 
1743
1335
  /**
1744
- * @deprecated 已废弃,请使用 NotificationLevel
1745
- */
1746
- declare enum NotificationStatus {
1747
- /**
1748
- * 免打扰已开启
1749
- */
1750
- OPEN = 1,
1751
- /**
1752
- * 免打扰已关闭
1753
- */
1754
- CLOSE = 2
1336
+ * 聊天室 kv 存储操作类型. 对方操作, 己方收到消息(RC:chrmKVNotiMsg)中会带入此值. 根据此值判断是删除还是更新
1337
+ */
1338
+ declare enum ChatroomEntryType {
1339
+ UPDATE = 1,
1340
+ DELETE = 2
1755
1341
  }
1756
1342
 
1757
- /**
1758
- * 从服务器拉取到的会话数据结构
1343
+ declare enum LogLevel {
1344
+ LOG = 0,
1345
+ DEBUG = 0,
1346
+ INFO = 1,
1347
+ WARN = 2,
1348
+ ERROR = 3,
1349
+ FATAL = 4,
1350
+ STATISTICS = 6,
1351
+ NONE = 1000
1352
+ }
1353
+ declare enum LogSource {
1354
+ IM = "IM",
1355
+ RTC = "RTC"
1356
+ }
1357
+ /**
1358
+ * IMLib 埋点日志 Id 枚举
1359
+ * @desc 参考文档-https://rongcloud.yuque.com/tbvylv/znhprz/dpt9wf#fE9u
1759
1360
  */
1760
- interface IReceivedConversation {
1361
+ declare enum LogTagId {
1362
+ L_IMSDK_VER_O = "L-imsdk_ver-O",
1363
+ A_INIT_O = "A-init-O",
1364
+ L_INIT_O = "L-init-O",
1365
+ P_INIT_O = "P-init-O",
1366
+ A_CONNECT_T = "A-connect-T",
1367
+ A_CONNECT_R = "A-connect-R",
1368
+ A_CONNECT_S = "A-connect-S",
1369
+ A_DISCONNECT_O = "A-disconnect-O",
1370
+ A_RECONNECT_T = "A-reconnect-T",
1371
+ A_RECONNECT_R = "A_RECONNECT_R",
1372
+ L_CONNECT_T = "L-connect-T",
1373
+ L_CONNECT_R = "L-connect-R",
1374
+ L_CONNECT_S = "L-connect-S",
1375
+ P_CONNECT_O = "P-connect-O",
1376
+ P_CONNECT_S = "P-connect-S",
1377
+ A_SEND_MSG_T = "A-send_msg-T",
1378
+ A_SEND_MSG_R = "A-send_msg-R",
1379
+ P_SEND_MSG_T = "P-send_msg-T",
1380
+ P_SEND_MSG_R = "P-send_msg-R",
1381
+ L_SEND_MSG_T = "L-send_msg-T",
1382
+ L_SEND_MSG_R = "L-send_msg-R",
1383
+ L_PULL_MSG_T = "L-pull_msg-T",
1384
+ L_PULL_MSG_R = "L-pull_msg-R",
1385
+ L_PULL_ULTRA_MSG_T = "L-pull_ultra_msg-T",
1386
+ L_PULL_ULTRA_MSG_R = "L-pull_ultra_msg-R",
1387
+ L_PULL_CHATROOM_KV_T = "L-pull_chatroom_kv-T",
1388
+ L_PULL_CHATROOM_KV_R = "L-pull_chatroom_kv-R",
1389
+ L_PULL_CHATROOM_MSG_T = "L-pull_chatroom_msg-T",
1390
+ L_PULL_CHATROOM_MSG_R = "L-pull_chatroom_msg-R",
1391
+ A_DELETE_MESSAGES_S = "A-delete_messages-S",
1392
+ P_DELETE_MSG_S = "P-delete_msg-S",
1393
+ L_PULL_CONVERSATION_S = "L-pull_conversation-S",
1394
+ L_RECALL_ULTRA_MSG_S = "L-recall_ultra_msg-S",
1395
+ A_REGTYP_O = "A-regtyp-O",
1396
+ P_REGTYP_O = "P-regtype-O",
1397
+ P_REGTYP_E = "P-regtype-E",
1398
+ L_GET_NAVI_T = "L-get_navi-T",
1399
+ L_GET_NAVI_R = "L-get_navi-R",
1400
+ L_ENV_S = "L-Env-S",
1401
+ L_GET_INDEX_NAVI_S = "L-get_index_navi-S",
1402
+ A_JOIN_CHATROOM_T = "A-join_chatroom-T",
1403
+ A_JOIN_CHATROOM_R = "A-join_chatroom-R",
1404
+ L_JOIN_CHATROOM_T = "L-join_chatroom-T",
1405
+ L_JOIN_CHATROOM_R = "L-join_chatroom-R",
1406
+ A_QUIT_CHATROOM_T = "A-quit_chatroom-T",
1407
+ A_QUIT_CHATROOM_R = "A-quit_chatroom-R",
1408
+ L_REJOIN_CHATROOM_T = "L-rejoin_chatroom-T",
1409
+ L_REJOIN_CHATROOM_R = "L-rejoin_chatroom-R",
1410
+ L_MEDIA_S = "L-media-S",
1411
+ L_MEDIA_UPLOAD_T = "L-media_upload-T",
1412
+ L_MEDIA_UPLOAD_R = "L-media_upload-R",
1413
+ G_UPLOAD_LOG_S = "G-upload_log-S",
1414
+ G_REPORT_LOG_S = "G-report_log-S",
1415
+ G_UPLOAD_LOG_E = "G-upload_log-E",
1416
+ G_GET_REAL_TIMELOG_COMMAND_S = "G-get_real_timelog_command-S",
1417
+ L_CHECK_ALIVE_IM_T = "L-check_alive_im-T",
1418
+ L_CHECK_ALIVE_IM_R = "L-check_alive_im-R",
1419
+ A_GET_HISTORY_MSG_T = "A-get_history_msg-T",
1420
+ A_GET_HISTORY_MSG_R = "A-get_history_msg-R",
1421
+ L_GET_HISTORY_MSG_T = "L-get_history_msg-T",
1422
+ L_GET_HISTORY_MSG_R = "L-get_history_msg-R",
1423
+ A_CALLBACK_O = "A-callback-O",
1424
+ A_CALLBACK_E = "A-callback-E"
1425
+ }
1426
+
1427
+ /**
1428
+ * 聊天室成员进入和退出状态
1429
+ */
1430
+ declare enum ChatroomUserChangeType {
1431
+ QUIT = 0,
1432
+ JOIN = 1
1433
+ }
1434
+
1435
+ /**
1436
+ * 消息被拦截类型
1437
+ */
1438
+ declare enum MessageBlockType {
1761
1439
  /**
1762
- * 会话的业务标识
1440
+ 全局敏感词:命中了融云内置的全局敏感词
1441
+ */
1442
+ GLOBAL = 1,
1443
+ /**
1444
+ 自定义敏感词拦截:命中了客户在融云自定义的敏感词
1763
1445
  */
1764
- channelId?: string;
1446
+ CUSTOM = 2,
1765
1447
  /**
1766
- * 会话类型
1448
+ 第三方审核拦截:命中了第三方(数美)或模板路由决定不下发的状态
1449
+ */
1450
+ THIRD_PARTY = 3
1451
+ }
1452
+
1453
+ declare enum UltraGroupChannelType {
1454
+ PUBLIC = 0,
1455
+ PRIVATE = 1
1456
+ }
1457
+ declare enum UltraGroupChannelChangeType {
1458
+ PUBLIC_TO_PRIVATE = 2,
1459
+ PRIVATE_TO_PUBLIC = 3,
1460
+ PUBLIC_TO_PRIVATE_USER_NOT_IN = 6
1461
+ }
1462
+ /** PB 结构 MsgChange 属性 changeType 对应枚举值 */
1463
+ declare enum UltraMsgChangeType {
1464
+ MSG_EXPANSION = 1,
1465
+ MSG_MODIFY = 2,
1466
+ MSG_RECALL = 3,
1467
+ CHANNEL_CHANGE = 4
1468
+ }
1469
+ /** PB 结构 MsgChange 属性 subChangeType 对应枚举值 */
1470
+ declare enum UltraMsgSubChangeType {
1471
+ CHANNEL_DELETE = 1,
1472
+ PUBLIC_TO_PRIVATE = 2,
1473
+ PRIVATE_TO_PUBLIC = 3,
1474
+ PRIVATE_CHANNEL_USER_JOIN_PUBLIC = 4,
1475
+ CHANNEL_USER_KICKED = 5,
1476
+ PUBLIC_TO_PRIVATE_USER_NOT_IN = 6
1477
+ }
1478
+
1479
+ /**
1480
+ * 音视频模式
1481
+ */
1482
+ declare enum RTCMode {
1483
+ /**
1484
+ * 普通音视频模式
1767
1485
  */
1768
- conversationType: ConversationType;
1486
+ RTC = 0,
1769
1487
  /**
1770
- * 会话 Id
1771
- * @description
1772
- * 1. 当 `conversationType` 为 `ConversationType.GROUP` 时,该值为群组 Id
1773
- * 1. 当 `conversationType` 为 `ConversationType.PRIVATE` 时,该值为对方用户 Id
1488
+ * 直播模式
1774
1489
  */
1775
- targetId: string;
1490
+ LIVE = 2,
1776
1491
  /**
1777
- * 当前会话的未读消息数
1492
+ *sip呼叫
1778
1493
  */
1779
- unreadMessageCount: number;
1494
+ SIP = 4,
1780
1495
  /**
1781
- * 会话中的最后一条消息
1496
+ * 呼叫模式.包括单呼和群呼
1782
1497
  */
1783
- latestMessage: IReceivedMessage | null;
1498
+ CALL = 5,
1784
1499
  /**
1785
- * 是否包含 @ 自己的消息,此数据仅在 `conversationType` 为 `ConversationType.GROUP` 时有效
1500
+ * 会议
1786
1501
  */
1787
- hasMentioned?: boolean;
1502
+ MEETING = 6
1503
+ }
1504
+ /**
1505
+ * 直播类型
1506
+ */
1507
+ declare enum LiveType {
1788
1508
  /**
1789
- * 消息中的 @ 数据,仅在 `conversationType` 为 `ConversationType.GROUP` 时有效
1509
+ * 音视频直播
1790
1510
  */
1791
- mentionedInfo?: {
1792
- /**
1793
- * `@ 类型,其中 1 为 @ 所有人,2 为 @ 部分人`
1794
- */
1795
- type: 1 | 2;
1796
- /**
1797
- * 被 @ 的用户 Id 列表,仅在 `type` 为 `2` 时有效
1798
- */
1799
- userIdList: string[];
1800
- } | null;
1511
+ AUDIO_AND_VIDEO = 0,
1801
1512
  /**
1802
- * 会话免打扰状态
1803
- * @description
1804
- * 1. 已开启免打扰
1805
- * 2. 未开启免打扰
1513
+ * 音频直播
1806
1514
  */
1807
- notificationStatus: NotificationStatus;
1808
- notificationLevel?: NotificationLevel;
1515
+ AUDIO = 1
1516
+ }
1517
+ declare enum LiveRole {
1809
1518
  /**
1810
- * 会话是否已置顶
1519
+ * 主播身份
1811
1520
  */
1812
- isTop: boolean;
1521
+ ANCHOR = 1,
1813
1522
  /**
1814
- * 会话中消息的最后未读时间
1523
+ * 观众身份
1815
1524
  */
1816
- lastUnreadTime: number;
1525
+ AUDIENCE = 2
1526
+ }
1527
+ /**
1528
+ * CallLib 流程消息
1529
+ */
1530
+ declare const CallLibMsgType: {
1531
+ 'RC:VCAccept': string;
1532
+ 'RC:VCRinging': string;
1533
+ 'RC:VCSummary': string;
1534
+ 'RC:VCHangup': string;
1535
+ 'RC:VCInvite': string;
1536
+ 'RC:VCModifyMedia': string;
1537
+ 'RC:VCModifyMem': string;
1538
+ };
1539
+ declare enum RTCApiType {
1540
+ ROOM = 1,
1541
+ PERSON = 2
1542
+ }
1543
+ declare enum RTCIdentityChangeType {
1544
+ AnchorToViewer = 1,
1545
+ ViewerToAnchor = 2
1546
+ }
1547
+ /**
1548
+ * RTC 房间加入类型
1549
+ */
1550
+ declare enum RTCJoinType {
1817
1551
  /**
1818
- * 搜索到的会话数量
1552
+ * 踢前一个设备
1819
1553
  */
1820
- matchCount?: number;
1554
+ KICK = 0,
1821
1555
  /**
1822
- * 会话项变更时间戳
1556
+ * 当前加入拒绝
1823
1557
  */
1824
- versionTime?: number;
1825
- unreadMentionedCount?: number;
1826
- }
1827
- interface IReceivedConversationByTag extends IReceivedConversation {
1828
- isTopInTag: boolean;
1558
+ REFUSE = 1,
1559
+ /**
1560
+ * 两个设备共存
1561
+ */
1562
+ COEXIST = 2
1829
1563
  }
1830
- /**
1831
- * 设置会话状态 参数 信息
1832
- */
1833
- interface ISetConversationStatusOptions {
1564
+
1565
+ interface IConversationOption {
1834
1566
  conversationType: ConversationType;
1835
1567
  targetId: string;
1836
- isTop?: boolean;
1837
- notificationStatus?: number;
1838
- notificationLevel?: number;
1839
1568
  channelId?: string;
1840
1569
  }
1841
- interface IUpdatedConversation {
1842
- updatedItems: {
1843
- [key: string]: {
1844
- time: number;
1845
- val: any;
1846
- };
1847
- };
1570
+ interface IServerRTCRoomEntry {
1571
+ key: string;
1572
+ value: string;
1573
+ status: number;
1574
+ timestamp: number;
1575
+ uid: string;
1576
+ }
1577
+ interface IChrmKVEntry {
1578
+ key: string;
1579
+ value?: string;
1580
+ isSendNotification?: boolean;
1581
+ notificationExtra?: string;
1582
+ isOverwrite?: boolean;
1583
+ isAutoDelete?: boolean;
1584
+ timestamp?: number;
1585
+ userId?: string;
1586
+ type?: number;
1587
+ isDeleted?: boolean;
1588
+ version?: number;
1589
+ }
1590
+ interface IChrmKVEntries {
1591
+ entries: {
1592
+ key: string;
1593
+ value?: string;
1594
+ timestamp?: number;
1595
+ version?: number;
1596
+ }[];
1597
+ notificationExtra?: string;
1598
+ isOverwrite?: boolean;
1599
+ isAutoDelete?: boolean;
1600
+ timestamp?: number;
1601
+ userId?: string;
1602
+ type?: number;
1603
+ isDeleted?: boolean;
1604
+ }
1605
+ interface IServerConversationStatus {
1848
1606
  conversationType: number;
1849
1607
  targetId: string;
1850
- latestMessage?: IReceivedMessage;
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;
1608
+ updatedTime?: number;
1864
1609
  notificationStatus?: number;
1865
1610
  notificationLevel?: number;
1866
1611
  isTop?: boolean;
1612
+ type?: number;
1613
+ tags?: IConversationTag[];
1614
+ channelId?: string;
1615
+ }
1616
+ interface IUserSettingItem {
1617
+ targetId: number;
1618
+ type: number;
1619
+ key: string;
1620
+ value: any;
1621
+ version: number;
1622
+ status: number;
1623
+ tags: IConversationTag[];
1624
+ }
1625
+ interface IServerUserSetting {
1626
+ settings: {
1627
+ [key: string]: IUserSettingItem;
1628
+ };
1629
+ version: number;
1630
+ }
1631
+ interface ISyncMsgArgs {
1632
+ inboxTime: number;
1633
+ sendboxTime: number;
1634
+ broadcastSyncTime?: number;
1635
+ }
1636
+ interface IGetMsgOption {
1637
+ timestamp?: number;
1638
+ count?: number;
1639
+ order?: number;
1640
+ channelId?: string;
1641
+ }
1642
+ interface IGetConversationListOption {
1643
+ type?: number;
1644
+ count?: number;
1645
+ startTime?: number;
1646
+ order?: 0 | 1;
1647
+ }
1648
+ interface IClearMsgOption {
1649
+ timestamp?: number;
1650
+ }
1651
+
1652
+ interface IGooglePushConfig {
1653
+ /**
1654
+ * 分组ID
1655
+ */
1656
+ collapseKey?: string;
1657
+ /**
1658
+ *
1659
+ */
1660
+ imageUrl?: string;
1661
+ /**
1662
+ *优先级
1663
+ */
1664
+ priority?: 'high' | 'normal';
1665
+ }
1666
+ interface IiOSPushConfig {
1667
+ /**
1668
+ * iOS 用于通知分组的 id
1669
+ */
1670
+ threadId?: string;
1671
+ /**
1672
+ * iOS 用于通知覆盖的 id
1673
+ */
1674
+ apnsCollapseId?: string;
1675
+ /**
1676
+ * iOS 分类,如果不设置后台默认取消息类型字符串,如RC:TxtMsg
1677
+ */
1678
+ category?: string;
1679
+ /**
1680
+ * 和 category 对应
1681
+ */
1682
+ richMediaUri?: string;
1683
+ }
1684
+ interface IAndroidPushConfig {
1685
+ /**
1686
+ * Android 的通知 id
1687
+ */
1688
+ notificationId?: string;
1689
+ /**
1690
+ * 小米的 channelId
1691
+ */
1692
+ channelIdMi?: string;
1693
+ /**
1694
+ * 华为的 channelId
1695
+ */
1696
+ channelIdHW?: string;
1697
+ /**
1698
+ * OPPO 的 channelId
1699
+ */
1700
+ channelIdOPPO?: string;
1701
+ /**
1702
+ * vivo 的类型
1703
+ */
1704
+ typeVivo?: string;
1705
+ /**
1706
+ * google FCM 的推送配置
1707
+ */
1708
+ googleConfig?: IGooglePushConfig;
1709
+ }
1710
+ interface IPushConfig {
1711
+ /**
1712
+ * 推送标题
1713
+ * 如果没有设置,会使用下面的默认标题显示规则
1714
+ * 默认标题显示规则:
1715
+ * 内置消息:单聊通知标题显示为发送者名称,群聊通知标题显示为群名称。
1716
+ * 自定义消息:默认不显示标题。
1717
+ */
1718
+ pushTitle: string;
1719
+ /**
1720
+ * 推送内容
1721
+ * 优先使用 IPushConfig.pushContent, 如果没有,则使用发送消息的 pushContent 参数
1722
+ */
1723
+ pushContent: string;
1724
+ /**
1725
+ * 远程推送附加信息
1726
+ * 优先使用 IPushConfig.pushData, 如果没有,则使用发送消息的 pushContent 参数
1727
+ */
1728
+ pushData: string;
1729
+ /**
1730
+ * iOSConfig
1731
+ */
1732
+ iOSConfig?: IiOSPushConfig;
1733
+ /**
1734
+ * androidConfig
1735
+ */
1736
+ androidConfig?: IAndroidPushConfig;
1737
+ /**
1738
+ * 是否显示推送标题. 仅针对 iOS 平台有效
1739
+ */
1740
+ disablePushTitle: boolean;
1741
+ /**
1742
+ * 是否强制推送
1743
+ */
1744
+ forceShowDetailContent: boolean;
1745
+ /**
1746
+ * 推送模板id
1747
+ */
1748
+ templateId: string;
1749
+ }
1750
+
1751
+ /**
1752
+ * 已读回执数据结构
1753
+ */
1754
+ interface IMessageReader {
1755
+ readTime: number;
1756
+ userId: string;
1757
+ }
1758
+ interface IMessageReaderResponse {
1759
+ totalMemberCount: number;
1760
+ list: IMessageReader[];
1761
+ }
1762
+ interface ILocalReadReceiptInfo {
1763
+ hasRespond?: boolean;
1764
+ readerInfo?: {
1765
+ [userId: string]: number;
1766
+ };
1767
+ readCount?: number;
1768
+ totalCount?: number;
1769
+ }
1770
+ interface IReadReceiptInfo {
1771
+ /**
1772
+ * 是否已经发送已读回执
1773
+ */
1774
+ hasRespond?: boolean;
1775
+ /**
1776
+ * 已阅读用户列表(不准确)
1777
+ */
1778
+ readerList?: IMessageReader[];
1779
+ /**
1780
+ * 阅读人数(不准确)
1781
+ */
1782
+ readCount?: number;
1783
+ /**
1784
+ * 群组总人数(不准确)
1785
+ */
1786
+ totalCount?: number;
1787
+ }
1788
+ /**
1789
+ * 从服务端接收到的消息数据
1790
+ */
1791
+ interface IReceivedMessage {
1867
1792
  /**
1868
- * 会话标识
1793
+ * 会话的业务标识
1869
1794
  */
1870
1795
  channelId?: string;
1871
- tags?: IUpdatedConversation[];
1872
- versionTime?: number;
1873
1796
  /**
1874
- * @ 消息未读数
1797
+ * 会话类型
1798
+ * * 1: 单聊
1799
+ * * 3: 群聊
1800
+ * * 4: 聊天室
1801
+ * * 5: 客服会话
1802
+ * * 6: 系统消息
1803
+ * * 7: 默认关注的公众号
1804
+ * * 8: 手动关注的公众号
1805
+ * * 9: RTCLib 房间
1875
1806
  */
1876
- unreadMentionedCount?: number;
1877
- }
1878
- interface IBaseConversationInfo {
1879
1807
  conversationType: ConversationType;
1808
+ /**
1809
+ * 会话 targetId
1810
+ */
1880
1811
  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;
1891
- }
1892
-
1893
- /**
1894
- * 导航信息数据就结构
1895
- */
1896
- interface INaviInfo {
1897
1812
  /**
1898
- * Navi 数据请求响应码,200 为成功请求
1813
+ * 消息发送者的用户 Id
1899
1814
  */
1900
- code: number;
1815
+ senderUserId: string;
1901
1816
  /**
1902
- * 获取 Navi 数据失败时的提示信息
1817
+ * 消息内容
1903
1818
  */
1904
- errorMessage?: string;
1819
+ content: any;
1905
1820
  /**
1906
- * 获取 Navi 数据失败时的请求 url 信息
1821
+ * 消息结构名称,即消息类型
1822
+ * @example RC:TxtMsg
1907
1823
  */
1908
- url?: string;
1824
+ messageType: string;
1909
1825
  /**
1910
- * 请求导航数据时使用的协议:http / https
1911
- * @description 该字段为 SDK 内增加的字段,导航接口数据中不存在
1826
+ * 服务端存储的消息 Id
1912
1827
  */
1913
- protocol: 'http' | 'https';
1828
+ messageUId: string;
1914
1829
  /**
1915
- * 获取导航时使用的 userId,小程序不走导航,故拿不到 userId
1830
+ * 消息方向是发出 or 收取
1916
1831
  */
1917
- userId?: string;
1832
+ messageDirection: MessageDirection;
1918
1833
  /**
1919
- * CMP 服务 Websocket 连接地址,包含域名与端口,不含 ws 或 wss 协议头
1920
- * @example a.domain.com:443
1834
+ * 是否为离线消息
1921
1835
  */
1922
- server: string;
1836
+ isOffLineMessage: boolean;
1923
1837
  /**
1924
- * 备用 CMP 服务地址,包含域名与端口,不含 ws 或 wss 协议头,多个备用地址以 ',' 分割
1925
- * @example a.domain.com:443,b.domain.com:443
1838
+ * 消息在服务器端的发送时间
1926
1839
  */
1927
- backupServer?: string;
1840
+ sentTime: number;
1928
1841
  /**
1929
- * 备用 CMP 服务地址,POST 请求 TCP 连接返回的是 bs 字段,非 backupServer 字段
1842
+ * 消息接收时间,该时间通过消息的 `sentTime` 值在本地进行计算得出,不推荐使用
1843
+ * @description 当 isOffLineMessage 为 true 时,该值无效
1930
1844
  */
1931
- bs?: string;
1845
+ receivedTime: number;
1932
1846
  /**
1933
- * RTC 服务配置,其值可能为 null、无效字符串、有效 JSON 字符串
1934
- * 1. 公有云未开通音视频时,值为 null
1935
- * 2. 私有云无配置时为 `{ "strategy": 0 }`
1847
+ * 是否存储
1848
+ * @default true
1936
1849
  */
1937
- voipCallInfo: string | null;
1850
+ isPersited: boolean;
1938
1851
  /**
1939
- * 聊天室 kv 存储开关
1940
- * @todo 需确认详细有效值
1941
- * @description 公有云独有配置
1852
+ * 是否计数
1853
+ * @default true
1942
1854
  */
1943
- kvStorage: number;
1855
+ isCounted: boolean;
1944
1856
  /**
1945
- * HttpDNS 功能开关,在 web 端无效
1946
- * @description 公有云独有配置
1857
+ * 是否为 @ 消息
1947
1858
  */
1948
- openHttpDNS: boolean;
1859
+ isMentioned: boolean;
1949
1860
  /**
1950
- * 历史消息云存储功能开关
1951
- * @description
1952
- * 1. 公有云通过 `developer.rongcloud.cn` 管理后台 `单群聊消息云端存储` 功能开关进行配置
1953
- * 2. 私有云默认为 `true`
1861
+ * 消息是否静默
1862
+ * @description 静默消息不会发送 Push 信息和本地通知提醒
1954
1863
  */
1955
- historyMsg: boolean;
1864
+ disableNotification: boolean;
1956
1865
  /**
1957
- * 聊天室历史消息开关
1958
- * @description
1959
- * 1. 私有云对聊天室功能支持有限,默认为 `false`
1960
- * 2. TODO: 公有云配置待确认
1866
+ * 是否是状态消息
1961
1867
  */
1962
- chatroomMsg: boolean;
1868
+ isStatusMessage: boolean;
1963
1869
  /**
1964
- * 文件服务器地址
1965
- * @description
1966
- * 1. 公有云下,该地址为七牛云服务器地址
1967
- * 2. 私有云下,该地址为私有云自研文件服务器地址
1870
+ * 是否支持消息扩展存储
1871
+ */
1872
+ canIncludeExpansion: boolean;
1873
+ /**
1874
+ * 消息携带的扩展存储
1875
+ */
1876
+ expansion: {
1877
+ [key: string]: any;
1878
+ } | null;
1879
+ /**
1880
+ * 消息接收状态
1881
+ */
1882
+ receivedStatus: number;
1883
+ /**
1884
+ * CPP 独有字段 消息本地 ID
1885
+ */
1886
+ messageId?: number;
1887
+ /**
1888
+ * CPP 独有字段 消息发送状态
1889
+ */
1890
+ sentStatus?: number;
1891
+ /**
1892
+ * 已读回执信息(导航配置grpRRVer=1时群组类型消息内存在, 其他情况为undefined)
1968
1893
  */
1969
- uploadServer: string;
1894
+ readReceiptInfo?: IReadReceiptInfo;
1970
1895
  /**
1971
- * 实时位置共享配置,web 端无需处理
1896
+ * 推送扩展
1972
1897
  */
1973
- location: null | string;
1898
+ pushConfig?: IPushConfig;
1974
1899
  /**
1975
- * 实时日志上传开关
1976
- * @todo 需确认有效值及作用
1900
+ * 超级群专有字段,是否断档,服务端收到大量消息可能会断档,所以消息存在此标志位,断档需要客户手动拉取历史消息
1977
1901
  */
1978
- monitor: number;
1902
+ isInterrupt?: boolean;
1979
1903
  /**
1980
- * 是否允许加入多聊天室开关
1904
+ * 拉取历史消息时表示该消息是否修改过(仅超级群有效)
1981
1905
  */
1982
- joinMChrm: boolean;
1906
+ isModifyMessage?: boolean;
1983
1907
  /**
1984
- * 是否开启公众号功能:`0` 为未开启,`1` 为已开启
1908
+ * 拉取历史消息时表示该消息是否为超级群频道类型(仅超级群有效)
1985
1909
  */
1986
- openMp: 0 | 1;
1910
+ channelType?: UltraGroupChannelType;
1911
+ }
1912
+ interface IUserProfile {
1987
1913
  /**
1988
- * 是否开启用户级配置,若开启,需连接成功后立即拉取实时配置,0 | 1
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 需确认公有云与私有云区别
1914
+ * 用户 ID
1915
+ */
1916
+ id?: string;
1917
+ /**
1918
+ * 用户名
2000
1919
  */
2001
- openUS: 0 | 1;
1920
+ name?: string;
2002
1921
  /**
2003
- * 超级群功能开关,1表示开
1922
+ * 用户头像地址
1923
+ * @deprecated
2004
1924
  */
2005
- ugMsg?: 0 | 1;
1925
+ portraitUri?: string;
2006
1926
  /**
2007
- * 群离线消息最大下发条数,`0` 为关闭
2008
- * @description 公有云独有配合
1927
+ * user info 中附加信息
2009
1928
  */
2010
- grpMsgLimit: number;
1929
+ extra?: string;
2011
1930
  /**
2012
- * 消息加密开关,0 为关闭
2013
- * @todo
2014
- * 1. 确定其控制的功能
2015
- * 2. 确定 web 相关性
1931
+ * 用户头像地址(向移动端兼容)
2016
1932
  */
2017
- isFormatted: number;
1933
+ portrait?: string;
1934
+ }
1935
+ interface IOperateInfo {
1936
+ targetId: string;
1937
+ channelId?: string;
1938
+ userId: string;
1939
+ operationType: OperateStatus;
1940
+ operationTime?: number;
1941
+ }
1942
+ interface IOperateSummary {
1943
+ targetId: string;
1944
+ channelId?: string;
1945
+ count: number;
1946
+ operationType: OperateStatus;
1947
+ }
1948
+ interface IOperateStatusNotify {
1949
+ conversationType: ConversationType;
1950
+ hasInfo: boolean;
1951
+ hasSummary: boolean;
1952
+ info: IOperateInfo[];
1953
+ summary: IOperateSummary[];
1954
+ }
1955
+ interface IRecallMsgOptions {
2018
1956
  /**
2019
- * GIF 动图大小限制,默认 2048 KB
1957
+ * 会话组织机构标识
1958
+ * 默认值未 空字符串
1959
+ */
1960
+ channelId: string;
1961
+ /**
1962
+ * 发送消息携带的用户信息
1963
+ */
1964
+ user?: IUserProfile;
1965
+ /**
1966
+ * Push 信息
1967
+ */
1968
+ pushContent?: string;
1969
+ /**
1970
+ * 原消息体
1971
+ */
1972
+ oriContent?: any;
1973
+ /**
1974
+ * 是否发送静默消息
1975
+ * @description
1976
+ * 当值为 `true` 时,服务器将不会发送 Push 信息,移动端也不会弹出本地通知提醒
1977
+ */
1978
+ disableNotification?: boolean;
1979
+ /**
1980
+ * 移动端推送配置
1981
+ */
1982
+ pushConfig?: IPushConfig;
1983
+ /**
1984
+ * 其他拓展信息
1985
+ */
1986
+ extra?: string;
1987
+ /**
1988
+ * 是否删除原始消息(在移动端会使用到),为 true 时移动端会不显示小灰条提示
2020
1989
  */
2021
- gifSize: number;
1990
+ isDelete?: boolean;
1991
+ }
1992
+ interface IRecallMsgContent {
1993
+ conversationType: number;
1994
+ targetId: string;
1995
+ sentTime: number;
1996
+ messageUId: string;
2022
1997
  /**
2023
- * 上传小视频时长限制,单位:秒
2024
- * @description 公有云字段,即私有云配置中的 `uploadVideoTimeLimit`
2025
- */
2026
- videoTimes?: number;
1998
+ * 会话组织机构标识
1999
+ * 默认值未 空字符串
2000
+ */
2001
+ channelId: string;
2027
2002
  /**
2028
- * 上传小视频时长限制,单位:秒
2029
- * @description 私有云字段,即公有云配置中的 `videoTimes`
2030
- */
2031
- uploadVideoTimeLimit?: number;
2003
+ * 其他拓展信息
2004
+ */
2005
+ extra?: string;
2032
2006
  /**
2033
- * 实时日志上传开关:`0` 为关闭,`1` 为开启
2034
- */
2035
- logSwitch: number;
2007
+ * 发送消息携带的用户信息
2008
+ */
2009
+ user?: IUserProfile;
2036
2010
  /**
2037
- * 实时日志上传策略
2038
- * @example `'{ "url": "logcollection.ronghub.com", "level": 1,"itv": 6, "times": 5 }'`
2011
+ * 是否删除原始消息(在移动端会使用到),为 true 时移动端会不显示小灰条提示
2039
2012
  */
2040
- logPolicy: string;
2013
+ isDelete?: boolean;
2014
+ }
2015
+ /**
2016
+ * 发送消息时的可选项信息
2017
+ */
2018
+ interface ISendMsgOptions {
2041
2019
  /**
2042
- * 百度 BOS 存储服务地址
2043
- * @description 公有云独有配置
2044
- * @example `gz.bcebos.com`
2020
+ * 消息类型,即消息结构的 ObjectName
2045
2021
  */
2046
- bosAddr?: string;
2022
+ messageType: string;
2047
2023
  /**
2048
- * 阿里上传配置,字符串数组,数组顺序代表 七牛、百度、阿里云 上传权重
2049
- * @example "[{"qiniu":"upload.qiniup.com","p":"1"},{"baidu":"gz.bcebos.com","p":"2"},{"aliyun":"oss-cn-beijing.aliyuncs.com","p":"3"}]"
2024
+ * 消息内容
2050
2025
  */
2051
- ossConfig?: string;
2026
+ content: {
2027
+ /**
2028
+ * 消息内容 key-value,最终会进行 JSON 序列化后发送
2029
+ */
2030
+ [key: string]: any;
2031
+ /**
2032
+ * 消息可携带的用户数据
2033
+ */
2034
+ user?: IUserProfile;
2035
+ /**
2036
+ * 其他拓展信息
2037
+ */
2038
+ extra?: string;
2039
+ };
2052
2040
  /**
2053
- * 私有云专有属性,可用来判断当前环境是公有云还是私有云,私有云环境下该值为 `1`
2041
+ * 是否存储
2042
+ * @description 只在发送未注册过的自定义消息时有效,否则使用注册时的配置
2054
2043
  */
2055
- type?: number;
2044
+ isPersited?: boolean;
2056
2045
  /**
2057
- * @deprecated 已废弃
2046
+ * 是否计数
2047
+ * @description 只在发送未注册过的自定义消息时有效,否则使用注册时的配置
2058
2048
  */
2059
- compDays: number;
2049
+ isCounted?: boolean;
2060
2050
  /**
2061
- * @deprecated 已废弃
2051
+ * 是否是状态消息,一般为无需注册的自定义消息
2052
+ * @description
2053
+ * 1. 状态消息只有 pub,没有 ack 应答
2054
+ * 2. 状态消息默认不存储,不计数,`isPersited` 与 `isCounted` 配置将失效
2062
2055
  */
2063
- msgAck: unknown;
2056
+ isStatusMessage?: boolean;
2064
2057
  /**
2065
- * @deprecated 已废弃
2058
+ * 是否发送静默消息
2059
+ * @description
2060
+ * 当值为 `true` 时,服务器将不会发送 Push 信息,移动端也不会弹出本地通知提醒
2066
2061
  */
2067
- activeServer: string;
2062
+ disableNotification?: boolean;
2068
2063
  /**
2069
- * @deprecated 已废弃
2064
+ * Push 信息
2070
2065
  */
2071
- qnAddr: string;
2066
+ pushContent?: string;
2072
2067
  /**
2073
- * @deprecated 已废弃
2068
+ * Push 通知携带的附加信息
2074
2069
  */
2075
- extkitSwitch: number;
2070
+ pushData?: string;
2076
2071
  /**
2077
- * @deprecated 已废弃
2072
+ * 是否为 @ 消息,只当 conversationType 值为 `ConversationType.GROUP` 时有效
2078
2073
  */
2079
- alone: boolean;
2074
+ isMentioned?: boolean;
2080
2075
  /**
2081
- * @deprecated 已废弃
2076
+ * `@` 消息类型
2077
+ * @description `1: @ 所有人 2: @ 指定用户`
2082
2078
  */
2083
- voipServer: string;
2079
+ mentionedType?: 1 | 2;
2084
2080
  /**
2085
- * 离线日志上报地址
2086
- * @deprecated 已废弃
2081
+ * 被 @ 的用户 Id 列表,当 `mentionedType` 值为 `1` 时,该值可为空
2087
2082
  */
2088
- offlinelogserver: string;
2083
+ mentionedUserIdList?: string[];
2089
2084
  /**
2090
- * 在线日志上报地址
2091
- * @deprecated 已废弃
2085
+ * 用于发送群定向消息,只当 conversationType 值为 `ConversationType.GROUP` 时有效
2092
2086
  */
2093
- onlinelogserver?: string;
2087
+ directionalUserIdList?: string[];
2094
2088
  /**
2095
- * 链路加密字段,内容为 JSON 字符串,仅限 C++ 可用
2089
+ * 当对方为 iOS 设备且未在线时,其将收到 Voip Push. 此配置对 Android 无影响
2096
2090
  */
2097
- crypto?: string;
2091
+ isVoipPush?: boolean;
2098
2092
  /**
2099
- * 群组回执开关, 1: 打开,0(或者没有): 关闭
2093
+ * 消息是否支持拓展内容
2100
2094
  */
2101
- grpRRVer?: number;
2095
+ canIncludeExpansion?: boolean;
2102
2096
  /**
2103
- * 防黑产开关, 1: 打开,0:关闭
2097
+ * 消息拓展内容数据
2104
2098
  */
2105
- openAnti?: number;
2106
- }
2107
-
2108
- /**
2109
- * 聊天室成员进入和退出状态
2110
- */
2111
- declare enum ChatroomUserChangeType {
2112
- QUIT = 0,
2113
- JOIN = 1
2114
- }
2115
-
2116
- interface IChatroomEntryListenerData {
2099
+ expansion?: {
2100
+ [key: string]: string;
2101
+ };
2117
2102
  /**
2118
- * 更新的键
2119
- */
2120
- key: string;
2103
+ * 黑/白名单
2104
+ * @todo 功能未知,需确认
2105
+ */
2106
+ isFilerWhiteBlacklist?: boolean;
2121
2107
  /**
2122
- * 更新的值
2108
+ * 移动端推送配置
2123
2109
  */
2124
- value: string;
2110
+ pushConfig?: IPushConfig;
2125
2111
  /**
2126
- * 更新的时间
2112
+ * 会话业务标识
2113
+ * @description
2114
+ * 20 个字符长度限制
2127
2115
  */
2128
- timestamp: number;
2116
+ channelId?: string;
2129
2117
  /**
2130
- * 更新的聊天室 ID
2131
- */
2132
- chatroomId: string;
2118
+ * 客户端的消息标识
2119
+ * 重发消息时用到,重发消息的消息 ID,仅 electron 中有效
2120
+ */
2121
+ messageId?: number;
2133
2122
  /**
2134
- * 更新类型
2135
- */
2136
- type: ChatroomEntryType;
2123
+ * 超级群专有字段,是否断档,若断档需要客户判断是否拉取
2124
+ */
2125
+ isInterrupt?: boolean;
2137
2126
  }
2138
- interface IChatroomRejoinedFailed {
2127
+ interface IInsertMsgOptions {
2128
+ senderUserId: string;
2129
+ messageType: string;
2130
+ content: any;
2131
+ messageDirection: number;
2132
+ readStatus?: number;
2133
+ sentStatus?: number;
2134
+ sentTime?: number;
2135
+ searchContent?: string;
2136
+ isUnread?: boolean;
2137
+ messageUId?: string;
2138
+ disableNotification?: boolean;
2139
+ canIncludeExpansion?: boolean;
2140
+ expansionMsg?: string;
2141
+ channelId: string;
2142
+ }
2143
+ interface ISendExMsgOptions {
2144
+ channelId: string;
2145
+ conversationType: ConversationType;
2146
+ targetId: string;
2139
2147
  /**
2140
- * 自动重新加入的聊天室 ID
2148
+ * 消息 ID
2141
2149
  */
2142
- chatroomId: string;
2150
+ messageUId: string;
2143
2151
  /**
2144
- * 自动重新加入失败的 code
2152
+ * 原始消息是否支持扩展的字段
2145
2153
  */
2146
- errorCode: number;
2147
- }
2148
- interface IChatroomRejoinedSuccessed {
2154
+ canIncludeExpansion: boolean;
2149
2155
  /**
2150
- * 自动重新加入的聊天室 ID
2156
+ * 删除的 keys
2151
2157
  */
2152
- chatroomId: string;
2158
+ keys?: string[];
2153
2159
  /**
2154
- * 自动重新加入的聊天室拉取消息的数量
2160
+ * 扩展对象
2155
2161
  */
2156
- count: number;
2157
- }
2158
- interface IChatroomUserChangeInfo {
2159
- users: {
2160
- [userId: string]: ChatroomUserChangeType;
2162
+ expansion?: {
2163
+ [key: string]: string;
2161
2164
  };
2162
- chatroomId: string;
2163
- }
2164
- declare type IChatroomRejoinedInfo = IChatroomRejoinedFailed | IChatroomRejoinedSuccessed;
2165
- /**
2166
- * 聊天室信息
2167
- */
2168
- interface IChatroomListenerData {
2169
2165
  /**
2170
- * SDK 内部重连聊天室信息
2166
+ * 是否删除所有扩展
2171
2167
  */
2172
- rejoinedRoom?: IChatroomRejoinedInfo;
2168
+ removeAll?: boolean;
2173
2169
  /**
2174
- * 监听到的聊天室 KV 更新
2170
+ * 原始消息的扩展
2175
2171
  */
2176
- updatedEntries?: IChatroomEntryListenerData[];
2177
- /**
2178
- * 登录退出的用户通知
2179
- */
2180
- userChange?: IChatroomUserChangeInfo;
2181
- /**
2182
- * 聊天室销毁
2183
- */
2184
- chatroomDestroyed?: string;
2172
+ originExpansion?: {
2173
+ [key: string]: string;
2174
+ } | null;
2185
2175
  }
2186
- interface IChatroomEntry {
2187
- /**
2188
- * 属性名称, 支持英文字母、数字、+、=、-、_ 的组合方式, 最大长度 128 字符
2189
- */
2190
- key: string;
2191
- /**
2192
- * 属性对应的值, 最大长度 4096 字符
2193
- */
2194
- value: string;
2176
+ interface IUltraExMsgOptions {
2177
+ canIncludeExpansion: boolean;
2178
+ channelId: string;
2179
+ conversationType: ConversationType;
2180
+ targetId: string;
2181
+ messageUId: string;
2182
+ sendTime: number;
2195
2183
  /**
2196
- * 设置成功后是否发送通知消息
2197
- */
2198
- isSendNotification?: boolean;
2184
+ * 删除的 keys
2185
+ */
2186
+ keys?: string[];
2199
2187
  /**
2200
- * RC:chrmKVNotiMsg 消息中携带的附加信息
2201
- */
2202
- notificationExtra?: string;
2188
+ * 扩展对象
2189
+ */
2190
+ expansion?: {
2191
+ [key: string]: string;
2192
+ };
2203
2193
  /**
2204
- * 用户退出聊天室时是否清除此属性
2205
- */
2206
- isAutoDelete?: boolean;
2194
+ * 是否删除所有扩展
2195
+ */
2196
+ removeAll?: boolean;
2207
2197
  }
2208
- interface IChatroomUser {
2209
- /**
2210
- * 用户 id
2211
- */
2212
- id: string;
2198
+ interface IUltraModifyMsgOptions {
2199
+ canIncludeExpansion?: boolean;
2200
+ channelId: string;
2201
+ conversationType: ConversationType;
2202
+ targetId: string;
2203
+ messageUId: string;
2204
+ sendTime: number;
2213
2205
  /**
2214
- * 加入聊天室的时间
2206
+ * 消息内容
2215
2207
  */
2216
- time: number;
2208
+ content: {
2209
+ /**
2210
+ * 消息内容 key-value,最终会进行 JSON 序列化后发送
2211
+ */
2212
+ [key: string]: any;
2213
+ /**
2214
+ * 消息可携带的用户数据
2215
+ */
2216
+ user?: IUserProfile;
2217
+ /**
2218
+ * 其他拓展信息
2219
+ */
2220
+ extra?: string;
2221
+ };
2217
2222
  }
2218
- interface IChatroomInfo {
2223
+ interface IUltraMsgQueryInfo {
2224
+ sendTime: number;
2225
+ messageUId: string;
2226
+ channelId?: string;
2227
+ }
2228
+ interface IUltraMsgQueryOptions {
2229
+ conversationType: ConversationType;
2230
+ targetId: string;
2231
+ messages: IUltraMsgQueryInfo[];
2232
+ }
2233
+ /**
2234
+ * 被拦截的消息信息
2235
+ */
2236
+ interface IBlockedMessageInfo {
2237
+ blockedMessageUId: string;
2238
+ conversationType: number;
2239
+ targetId: string;
2240
+ channelId: string;
2241
+ blockType: MessageBlockType;
2242
+ extra: any;
2243
+ }
2244
+
2245
+ /**
2246
+ * TODO: 确定对外暴露的必要性
2247
+ * @deprecated
2248
+ */
2249
+ declare const DelayTimer: {
2250
+ _delayTime: number;
2219
2251
  /**
2220
- * 成员列表
2221
- * @todo 需确认数组元素的数据结构
2252
+ * 方法并未引用,getTimer 实际返回值始终为 Date.now()
2253
+ * @deprecated
2222
2254
  */
2223
- userInfos: IChatroomUser[];
2255
+ setTime: (time: number) => void;
2256
+ getTime: () => number;
2257
+ };
2258
+
2259
+ /**
2260
+ * 从服务器拉取到的会话数据结构
2261
+ */
2262
+ interface IReceivedConversation {
2224
2263
  /**
2225
- * 房间内总人数
2226
- */
2227
- userCount: number;
2228
- }
2229
- interface IRemoveChatroomEntry {
2264
+ * 会话的业务标识
2265
+ */
2266
+ channelId?: string;
2230
2267
  /**
2231
- * 属性名称, 支持英文字母、数字、+、=、-、_ 的组合方式, 最大长度 128 字符
2268
+ * 会话类型
2232
2269
  */
2233
- key: string;
2270
+ conversationType: ConversationType;
2234
2271
  /**
2235
- * 删除成功后是否发送通知消息
2272
+ * 会话 Id
2273
+ * @description
2274
+ * 1. 当 `conversationType` 为 `ConversationType.GROUP` 时,该值为群组 Id
2275
+ * 1. 当 `conversationType` 为 `ConversationType.PRIVATE` 时,该值为对方用户 Id
2236
2276
  */
2237
- isSendNotification?: boolean;
2277
+ targetId: string;
2238
2278
  /**
2239
- * RC:chrmKVNotiMsg 消息中携带的附加信息
2279
+ * 当前会话的未读消息数
2240
2280
  */
2241
- notificationExtra?: string;
2242
- }
2243
- interface IRemoveChatroomEntries {
2281
+ unreadMessageCount: number;
2244
2282
  /**
2245
- * key 属性名称, 支持英文字母、数字、+、=、-、_ 的组合方式, 最大长度 128 字符
2283
+ * 会话中的最后一条消息
2246
2284
  */
2247
- entries: {
2248
- key: string;
2249
- }[];
2285
+ latestMessage: IReceivedMessage | null;
2250
2286
  /**
2251
- * 删除成功后是否发送通知消息
2287
+ * 是否包含 @ 自己的消息,此数据仅在 `conversationType` 为 `ConversationType.GROUP` 时有效
2252
2288
  */
2289
+ hasMentioned?: boolean;
2253
2290
  /**
2254
- * RC:chrmKVNotiMsg 消息中携带的附加信息
2291
+ * 消息中的 @ 数据,仅在 `conversationType` 为 `ConversationType.GROUP` 时有效
2255
2292
  */
2256
- notificationExtra?: string;
2257
- }
2258
- interface IChatroomEntries {
2293
+ mentionedInfo?: {
2294
+ /**
2295
+ * `@ 类型,其中 1 为 @ 所有人,2 为 @ 部分人`
2296
+ */
2297
+ type: 1 | 2;
2298
+ /**
2299
+ * 被 @ 的用户 Id 列表,仅在 `type` 为 `2` 时有效
2300
+ */
2301
+ userIdList: string[];
2302
+ } | null;
2259
2303
  /**
2260
- * entries ,要设置的属性列表
2261
- * key 属性名称, 支持英文字母、数字、+、=、-、_ 的组合方式, 最大长度 128 字符
2262
- * value 属性对应的值, 最大长度 4096 字符
2304
+ * 会话免打扰状态
2305
+ * @description
2306
+ * 1. 已开启免打扰
2307
+ * 2. 未开启免打扰
2263
2308
  */
2264
- entries: {
2265
- key: string;
2266
- value: string;
2267
- }[];
2309
+ notificationStatus: NotificationStatus;
2310
+ notificationLevel?: NotificationLevel;
2268
2311
  /**
2269
- * 设置成功后是否发送通知消息
2312
+ * 会话是否已置顶
2270
2313
  */
2314
+ isTop: boolean;
2271
2315
  /**
2272
- * RC:chrmKVNotiMsg 消息中携带的附加信息
2316
+ * 会话中消息的最后未读时间
2273
2317
  */
2274
- notificationExtra?: string;
2318
+ lastUnreadTime: number;
2275
2319
  /**
2276
- * 用户退出聊天室时是否清除此属性
2320
+ * 搜索到的会话数量
2277
2321
  */
2278
- isAutoDelete?: boolean;
2322
+ matchCount?: number;
2279
2323
  /**
2280
- * 是否强制覆盖
2324
+ * 会话项变更时间戳
2281
2325
  */
2282
- isForce?: boolean;
2326
+ versionTime?: number;
2327
+ unreadMentionedCount?: number;
2283
2328
  }
2284
-
2285
- interface IUploadAuth {
2286
- /**
2287
- * 七牛 token 有效期
2288
- */
2289
- deadline: number;
2290
- /**
2291
- * 七牛上传 token
2292
- */
2293
- token: string;
2294
- /**
2295
- * 百度上传 token
2296
- */
2297
- bosToken: string;
2298
- /**
2299
- * 百度上传 header Date
2300
- */
2301
- bosDate: string;
2329
+ interface IReceivedConversationByTag extends IReceivedConversation {
2330
+ isTopInTag: boolean;
2331
+ }
2332
+ interface IUltraGroupConversation extends IReceivedConversation {
2333
+ channelType?: UltraGroupChannelType;
2334
+ }
2335
+ /**
2336
+ * 设置会话状态 参数 信息
2337
+ */
2338
+ interface ISetConversationStatusOptions {
2339
+ conversationType: ConversationType;
2340
+ targetId: string;
2341
+ isTop?: boolean;
2342
+ notificationStatus?: number;
2343
+ notificationLevel?: number;
2344
+ channelId?: string;
2345
+ }
2346
+ interface IUpdatedConversation {
2347
+ updatedItems: {
2348
+ [key: string]: {
2349
+ time: number;
2350
+ val: any;
2351
+ };
2352
+ };
2353
+ conversationType: number;
2354
+ targetId: string;
2355
+ latestMessage?: IReceivedMessage;
2356
+ unreadMessageCount?: number;
2357
+ hasMentioned?: boolean;
2358
+ mentionedInfo?: {
2359
+ /**
2360
+ * `@ 类型,其中 1 为 @ 所有人,2 为 @ 部分人`
2361
+ */
2362
+ type: 1 | 2;
2363
+ /**
2364
+ * 被 @ 的用户 Id 列表,仅在 `type` 为 `2` 时有效
2365
+ */
2366
+ userIdList: string[];
2367
+ };
2368
+ lastUnreadTime?: number;
2369
+ notificationStatus?: number;
2370
+ notificationLevel?: number;
2371
+ isTop?: boolean;
2302
2372
  /**
2303
- * 百度上传路径
2373
+ * 会话标识
2304
2374
  */
2305
- path: string;
2375
+ channelId?: string;
2376
+ tags?: IUpdatedConversation[];
2377
+ versionTime?: number;
2306
2378
  /**
2307
- * 上传文件名,阿里上传获取下载地址时,必须使用上传文件名,所以需抛出到业务端
2379
+ * @ 消息未读数
2308
2380
  */
2309
- fileName: string;
2381
+ unreadMentionedCount?: number;
2382
+ }
2383
+ interface IBaseConversationInfo {
2384
+ conversationType: ConversationType;
2385
+ targetId: string;
2386
+ channelId: string;
2387
+ }
2388
+ interface IConversationState extends IBaseConversationInfo {
2389
+ unreadCount: number;
2390
+ unreadMentionedCount: number;
2391
+ }
2392
+ /** 指定超级群会话传参 */
2393
+ interface IUltraGroupOption {
2394
+ targetId: string;
2395
+ channelId?: string;
2396
+ }
2397
+ interface IGetUltraGroupListOption {
2398
+ targetId?: string;
2399
+ channelType?: UltraGroupChannelType;
2400
+ }
2401
+ /**
2402
+ * 超级群频道变更通知内容
2403
+ */
2404
+ interface IUltraChannelChangeInfo {
2405
+ targetId: string;
2406
+ channelId: string;
2407
+ channelType: UltraGroupChannelType;
2408
+ changeType: UltraGroupChannelChangeType;
2409
+ }
2410
+ /**
2411
+ * 超级群私有频道用户被踢出白名单通知内容
2412
+ */
2413
+ interface IUltraChannelUserKickedInfo {
2414
+ targetId: string;
2415
+ channelId: string;
2416
+ channelType: UltraGroupChannelType;
2417
+ userId: string;
2418
+ }
2419
+ /**
2420
+ * 超级群频道被删除通知内容
2421
+ */
2422
+ interface IUltraChannelDeleteInfo {
2423
+ targetId: string;
2424
+ channelId: string;
2425
+ channelType: UltraGroupChannelType;
2426
+ deleteTime: number;
2427
+ }
2428
+
2429
+ /**
2430
+ * 导航信息数据就结构
2431
+ */
2432
+ interface INaviInfo {
2310
2433
  /**
2311
- * 阿里云 oss 的 AccessKeyId
2434
+ * Navi 数据请求响应码,200 为成功请求
2312
2435
  */
2313
- osskeyId: string;
2436
+ code: number;
2314
2437
  /**
2315
- * 阿里云 oss post 请求表单域中的字段 policy
2438
+ * 获取 Navi 数据失败时的提示信息
2316
2439
  */
2317
- ossPolicy: string;
2440
+ errorMessage?: string;
2318
2441
  /**
2319
- * 阿里云 oss 根据 policy 计算的签名信息
2442
+ * 获取 Navi 数据失败时的请求 url 信息
2320
2443
  */
2321
- ossSign: string;
2444
+ url?: string;
2322
2445
  /**
2323
- * 阿里云 oss 存储空间名称
2446
+ * 请求导航数据时使用的协议:http / https
2447
+ * @description 该字段为 SDK 内增加的字段,导航接口数据中不存在
2324
2448
  */
2325
- ossBucketName: string;
2449
+ protocol: 'http' | 'https';
2326
2450
  /**
2327
- * s3 认证凭证,对应 post上传 x-amz-credential 字段
2451
+ * 获取导航时使用的 userId,小程序不走导航,故拿不到 userId
2328
2452
  */
2329
- s3Credential: string;
2453
+ userId?: string;
2330
2454
  /**
2331
- * 加密算法,对应 post上传 x-amz-algorithm 字段
2455
+ * CMP 服务 Websocket 连接地址,包含域名与端口,不含 ws 或 wss 协议头
2456
+ * @example a.domain.com:443
2332
2457
  */
2333
- s3Algorithm: string;
2458
+ server: string;
2334
2459
  /**
2335
- * s3 日期,对应 post上传 x-amz-date 字段
2460
+ * 备用 CMP 服务地址,包含域名与端口,不含 ws 或 wss 协议头,多个备用地址以 ',' 分割
2461
+ * @example a.domain.com:443,b.domain.com:443
2336
2462
  */
2337
- s3Date: string;
2463
+ backupServer?: string;
2338
2464
  /**
2339
- * s3 policy,对应 post上传 policy 字段
2465
+ * 备用 CMP 服务地址,POST 请求 TCP 连接返回的是 bs 字段,非 backupServer 字段
2340
2466
  */
2341
- s3Policy: string;
2467
+ bs?: string;
2342
2468
  /**
2343
- * s3 签名信息,对应 post上传 x-amz-signature 字段
2469
+ * RTC 服务配置,其值可能为 null、无效字符串、有效 JSON 字符串
2470
+ * 1. 公有云未开通音视频时,值为 null
2471
+ * 2. 私有云无配置时为 `{ "strategy": 0 }`
2344
2472
  */
2345
- s3Signature: string;
2473
+ voipCallInfo: string | null;
2346
2474
  /**
2347
- * s3 存储空间名称
2475
+ * 聊天室 kv 存储开关
2476
+ * @todo 需确认详细有效值
2477
+ * @description 公有云独有配置
2348
2478
  */
2349
- s3BucketName: string;
2479
+ kvStorage: number;
2350
2480
  /**
2351
- * stc Authorization
2481
+ * HttpDNS 功能开关,在 web 端无效
2482
+ * @description 公有云独有配置
2352
2483
  */
2353
- stcAuthorization: string;
2484
+ openHttpDNS: boolean;
2354
2485
  /**
2355
- * stc xAmzContentSha256
2486
+ * 历史消息云存储功能开关
2487
+ * @description
2488
+ * 1. 公有云通过 `developer.rongcloud.cn` 管理后台 `单群聊消息云端存储` 功能开关进行配置
2489
+ * 2. 私有云默认为 `true`
2356
2490
  */
2357
- stcContentSha256: string;
2491
+ historyMsg: boolean;
2358
2492
  /**
2359
- * stc date
2493
+ * 聊天室历史消息开关
2494
+ * @description
2495
+ * 1. 私有云对聊天室功能支持有限,默认为 `false`
2496
+ * 2. TODO: 公有云配置待确认
2360
2497
  */
2361
- stcDate: string;
2498
+ chatroomMsg: boolean;
2362
2499
  /**
2363
- * stc 存储空间名称
2500
+ * 文件服务器地址
2501
+ * @description
2502
+ * 1. 公有云下,该地址为七牛云服务器地址
2503
+ * 2. 私有云下,该地址为私有云自研文件服务器地址
2364
2504
  */
2365
- stcBucketName: string;
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> {
2505
+ uploadServer: string;
2412
2506
  /**
2413
- * Promise 执行结果
2507
+ * 实时位置共享配置,web 端无需处理
2414
2508
  */
2415
- code: ErrorCode;
2509
+ location: null | string;
2416
2510
  /**
2417
- * 结果数据
2511
+ * 实时日志上传开关
2512
+ * @todo 需确认有效值及作用
2418
2513
  */
2419
- data?: T;
2514
+ monitor: number;
2420
2515
  /**
2421
- * 错误消息
2516
+ * 是否允许加入多聊天室开关
2422
2517
  */
2423
- msg?: string;
2424
- }
2425
- /**
2426
- * 异步任务结果定义
2427
- * @description
2428
- * 通过 `Promise.resolve` 来处理预期内的异常,进而通过 Uncatch Promise Error 暴露预期外的异常
2429
- */
2430
- declare type IPromiseResult<T> = Promise<IAsyncRes<T>>;
2431
- interface IConnectResult {
2518
+ joinMChrm: boolean;
2432
2519
  /**
2433
- * 连接错误码
2520
+ * 是否开启公众号功能:`0` 为未开启,`1` 为已开启
2434
2521
  */
2435
- code: ErrorCode;
2522
+ openMp: 0 | 1;
2436
2523
  /**
2437
- * 导航获取成功后即可有相应的值,在导航数据获取完成之前该值为 undefined
2524
+ * 是否开启用户级配置,若开启,需连接成功后立即拉取实时配置,0 | 1
2525
+ * @description
2526
+ * 配置来源:
2527
+ * 1. 导航
2528
+ * 2. 服务端实时下发
2529
+ * 已有配置字段:
2530
+ * 1. Lan. 推送使用的语言设置,用户端可自定义修改. Web 端未做设置, 只做接收
2531
+ * 2. ShPushSwit. 推送是否显示详情设置,用户端可自定义修改. Web 端未做设置, 只做接收
2532
+ * 3. MobPushSwit: Web/PC 在线,移动端不在线是否发送推送开关,用户端可自定义修改. Web 端未做设置, 只做接收
2533
+ * 4. OffMsgDur: 离线消息保存天数,设置天数不可大于App级对应配置,用户端可自定义修改. Web 端未做设置, 只做接收
2534
+ * 5. VoipInfo: 音视频相关配置,用户端不可自定义修改. 由服务端决定,与导航下发格式一致
2535
+ * @todo 需确认公有云与私有云区别
2438
2536
  */
2439
- userId?: string;
2440
- }
2441
-
2442
- declare enum HttpMethod {
2443
- GET = "GET",
2444
- POST = "POST"
2445
- }
2446
- interface IRequest {
2447
- url: string;
2537
+ openUS: 0 | 1;
2448
2538
  /**
2449
- * @default `HttpMethod.GET`
2539
+ * 超级群功能开关,1表示开
2450
2540
  */
2451
- method?: HttpMethod | 'GET' | 'POST';
2541
+ ugMsg?: 0 | 1;
2452
2542
  /**
2453
- * 查询数据
2543
+ * 群离线消息最大下发条数,`0` 为关闭
2544
+ * @description 公有云独有配合
2454
2545
  */
2455
- query?: {
2456
- [key: string]: string | number | null;
2457
- };
2546
+ grpMsgLimit: number;
2458
2547
  /**
2459
- * Request Header 信息
2548
+ * 消息加密开关,0 为关闭
2549
+ * @todo
2550
+ * 1. 确定其控制的功能
2551
+ * 2. 确定 web 相关性
2460
2552
  */
2461
- headers?: {
2462
- [key: string]: string;
2463
- };
2553
+ isFormatted: number;
2464
2554
  /**
2465
- * Request Body 数据
2555
+ * GIF 动图大小限制,默认 2048 KB
2466
2556
  */
2467
- body?: Object | string;
2557
+ gifSize: number;
2468
2558
  /**
2469
- * 超时设置
2470
- * @default 10 * 1000 毫秒
2559
+ * 上传小视频时长限制,单位:秒
2560
+ * @description 公有云字段,即私有云配置中的 `uploadVideoTimeLimit`
2471
2561
  */
2472
- timeout?: number;
2562
+ videoTimes?: number;
2473
2563
  /**
2474
- * 期望返回的数据格式,如果为 json 则返回后会对返回的数据进行一次 JSON.parse, 在小程序平台需要
2564
+ * 上传小视频时长限制,单位:秒
2565
+ * @description 私有云字段,即公有云配置中的 `videoTimes`
2475
2566
  */
2476
- dataType?: 'json' | 'text' | 'base64' | 'arraybuffer';
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 {
2567
+ uploadVideoTimeLimit?: number;
2501
2568
  /**
2502
- * 监听连接建立事件,此时 WebSocket 实例已准备好收发数据
2503
- * @param callback
2569
+ * 实时日志上传开关:`0` 为关闭,`1` 为开启
2504
2570
  */
2505
- onOpen(callback: () => void): void;
2571
+ logSwitch: number;
2506
2572
  /**
2507
- * 监听连接关闭事件
2508
- * @param callback
2573
+ * 实时日志上传策略
2574
+ * @example `'{ "url": "logcollection.ronghub.com", "level": 1,"itv": 6, "times": 5 }'`
2509
2575
  */
2510
- onClose(callback: (code?: number, reason?: string) => void): void;
2576
+ logPolicy: string;
2511
2577
  /**
2512
- * 监听接收服务器消息事件
2513
- * @param callback
2578
+ * 百度 BOS 存储服务地址
2579
+ * @description 公有云独有配置
2580
+ * @example `gz.bcebos.com`
2514
2581
  */
2515
- onMessage(callback: (data: string | ArrayBuffer) => void): void;
2582
+ bosAddr?: string;
2516
2583
  /**
2517
- * 监听链接错误事件
2518
- * @param callback
2584
+ * 阿里上传配置,字符串数组,数组顺序代表 七牛、百度、阿里云 上传权重
2585
+ * @example "[{"qiniu":"upload.qiniup.com","p":"1"},{"baidu":"gz.bcebos.com","p":"2"},{"aliyun":"oss-cn-beijing.aliyuncs.com","p":"3"}]"
2519
2586
  */
2520
- onError(callback: (error: unknown) => void): void;
2587
+ ossConfig?: string;
2521
2588
  /**
2522
- * 向服务器发送数据
2523
- * @param data
2589
+ * 私有云专有属性,可用来判断当前环境是公有云还是私有云,私有云环境下该值为 `1`
2524
2590
  */
2525
- send(data: ArrayBuffer | string): void;
2591
+ type?: number;
2526
2592
  /**
2527
- * 关闭连接
2528
- * @param code
2529
- * @param reason
2593
+ * @deprecated 已废弃
2530
2594
  */
2531
- close(code?: number, reason?: string): void;
2532
- }
2533
- /**
2534
- * 平台运行时抽象
2535
- */
2536
- interface IRuntime {
2595
+ compDays: number;
2537
2596
  /**
2538
- * 平台标识
2597
+ * @deprecated 已废弃
2539
2598
  */
2540
- tag: string;
2599
+ msgAck: unknown;
2541
2600
  /**
2542
- * 发送 http 请求
2543
- * @param options
2601
+ * @deprecated 已废弃
2544
2602
  */
2545
- httpReq(options: IRequest): Promise<IResponse>;
2603
+ activeServer: string;
2546
2604
  /**
2547
- * 检测是否支持长连接
2605
+ * @deprecated 已废弃
2548
2606
  */
2549
- isSupportSocket(): boolean;
2607
+ qnAddr: string;
2550
2608
  /**
2551
- * 是否使用导航
2609
+ * @deprecated 已废弃
2552
2610
  */
2553
- useNavi: boolean;
2611
+ extkitSwitch: number;
2554
2612
  /**
2555
- * websocket 地址上附加的平台字段
2613
+ * @deprecated 已废弃
2556
2614
  */
2557
- connectPlatform: string;
2615
+ alone: boolean;
2558
2616
  /**
2559
- * websocket 地址上 apiVer 字段,代表代码是否来源于 uniapp
2617
+ * @deprecated 已废弃
2560
2618
  */
2561
- isFromUniapp: boolean;
2619
+ voipServer: string;
2562
2620
  /**
2563
- * 创建长连接实例
2621
+ * 离线日志上报地址
2622
+ * @deprecated 已废弃
2564
2623
  */
2565
- createWebSocket?(url: string, protocols?: string[]): IWebSocket;
2624
+ offlinelogserver: string;
2566
2625
  /**
2567
- * 创建数据通道
2626
+ * 在线日志上报地址
2627
+ * @deprecated 已废弃
2568
2628
  */
2569
- createDataChannel(watcher: IDataChannelWatcher, connectType?: 'websocket' | 'comet'): ADataChannel;
2629
+ onlinelogserver?: string;
2570
2630
  /**
2571
- * 存储模块
2631
+ * 链路加密字段,内容为 JSON 字符串,仅限 C++ 可用
2572
2632
  */
2573
- localStorage: IStorage;
2633
+ crypto?: string;
2574
2634
  /**
2575
- * 在某些非浏览器平台,其等同于 localStorage
2635
+ * 群组回执开关, 1: 打开,0(或者没有): 关闭
2576
2636
  */
2577
- sessionStorage: IStorage;
2637
+ grpRRVer?: number;
2578
2638
  /**
2579
- * 获取网络状态
2580
- * 2g 3g 4g wifi unkown
2639
+ * 防黑产开关, 1: 打开,0:关闭
2581
2640
  */
2582
- getNetworkType(): Promise<NetworkType>;
2641
+ openAnti?: number;
2583
2642
  }
2584
2643
 
2585
- /**
2586
- * 文件类型
2587
- */
2588
- declare enum FileType {
2644
+ interface IChatroomEntryListenerData {
2589
2645
  /**
2590
- * 图片文件
2591
- */
2592
- IMAGE = 1,
2646
+ * 更新的键
2647
+ */
2648
+ key: string;
2593
2649
  /**
2594
- * 声音文件
2595
- */
2596
- AUDIO = 2,
2650
+ * 更新的值
2651
+ */
2652
+ value: string;
2597
2653
  /**
2598
- * 视频文件
2599
- */
2600
- VIDEO = 3,
2654
+ * 更新的时间
2655
+ */
2656
+ timestamp: number;
2601
2657
  /**
2602
- * 非媒体文件
2603
- */
2604
- FILE = 4,
2658
+ * 更新的聊天室 ID
2659
+ */
2660
+ chatroomId: string;
2605
2661
  /**
2606
- * 小视频类型
2662
+ * 更新类型
2607
2663
  */
2608
- SIGHT = 5,
2664
+ type: ChatroomEntryType;
2665
+ }
2666
+ interface IChatroomRejoinedFailed {
2609
2667
  /**
2610
- * 合并转发
2668
+ * 自动重新加入的聊天室 ID
2611
2669
  */
2612
- COMBINE_HTML = 6
2670
+ chatroomId: string;
2671
+ /**
2672
+ * 自动重新加入失败的 code
2673
+ */
2674
+ errorCode: number;
2613
2675
  }
2614
-
2615
- declare enum UploadMethod {
2676
+ interface IChatroomRejoinedSuccessed {
2616
2677
  /**
2617
- * 七牛上传
2618
- */
2619
- QINIU = 1,
2678
+ * 自动重新加入的聊天室 ID
2679
+ */
2680
+ chatroomId: string;
2620
2681
  /**
2621
- * 阿里云上传
2622
- */
2623
- ALI = 2,
2682
+ * 自动重新加入的聊天室拉取消息的数量
2683
+ */
2684
+ count: number;
2685
+ }
2686
+ interface IChatroomUserChangeInfo {
2687
+ users: {
2688
+ [userId: string]: ChatroomUserChangeType;
2689
+ };
2690
+ chatroomId: string;
2691
+ }
2692
+ declare type IChatroomRejoinedInfo = IChatroomRejoinedFailed | IChatroomRejoinedSuccessed;
2693
+ /**
2694
+ * 聊天室信息
2695
+ */
2696
+ interface IChatroomListenerData {
2624
2697
  /**
2625
- * 亚马逊上传
2698
+ * SDK 内部重连聊天室信息
2699
+ */
2700
+ rejoinedRoom?: IChatroomRejoinedInfo;
2701
+ /**
2702
+ * 监听到的聊天室 KV 更新
2703
+ */
2704
+ updatedEntries?: IChatroomEntryListenerData[];
2705
+ /**
2706
+ * 登录退出的用户通知
2626
2707
  */
2627
- AWS = 3,
2708
+ userChange?: IChatroomUserChangeInfo;
2628
2709
  /**
2629
- * stc上传
2710
+ * 聊天室销毁
2630
2711
  */
2631
- STC = 4
2712
+ chatroomDestroyed?: string;
2632
2713
  }
2633
-
2634
- /**
2635
- * 连接状态
2636
- */
2637
- declare enum ConnectionStatus {
2714
+ interface IChatroomEntry {
2638
2715
  /**
2639
- * 连接成功。
2716
+ * 属性名称, 支持英文字母、数字、+、=、-、_ 的组合方式, 最大长度 128 字符
2640
2717
  */
2641
- CONNECTED = 0,
2718
+ key: string;
2642
2719
  /**
2643
- * 连接中。
2720
+ * 属性对应的值, 最大长度 4096 字符
2644
2721
  */
2645
- CONNECTING = 1,
2722
+ value: string;
2646
2723
  /**
2647
- * 正常断开连接。
2724
+ * 设置成功后是否发送通知消息
2648
2725
  */
2649
- DISCONNECTED = 2,
2726
+ isSendNotification?: boolean;
2650
2727
  /**
2651
- * 网络不可用。
2728
+ * RC:chrmKVNotiMsg 消息中携带的附加信息
2652
2729
  */
2653
- NETWORK_UNAVAILABLE = 3,
2730
+ notificationExtra?: string;
2654
2731
  /**
2655
- * 连接关闭。
2732
+ * 用户退出聊天室时是否清除此属性
2656
2733
  */
2657
- CONNECTION_CLOSED = 4,
2734
+ isAutoDelete?: boolean;
2735
+ }
2736
+ interface IChatroomUser {
2658
2737
  /**
2659
- * 用户账户在其他设备登录,本机会被踢掉线。
2738
+ * 用户 id
2660
2739
  */
2661
- KICKED_OFFLINE_BY_OTHER_CLIENT = 6,
2740
+ id: string;
2662
2741
  /**
2663
- * websocket 连接失败
2742
+ * 加入聊天室的时间
2664
2743
  */
2665
- WEBSOCKET_UNAVAILABLE = 7,
2744
+ time: number;
2745
+ }
2746
+ interface IChatroomInfo {
2666
2747
  /**
2667
- * websocket 报错
2748
+ * 成员列表
2749
+ * @todo 需确认数组元素的数据结构
2668
2750
  */
2669
- WEBSOCKET_ERROR = 8,
2751
+ userInfos: IChatroomUser[];
2670
2752
  /**
2671
- * 用户被封禁
2753
+ * 房间内总人数
2672
2754
  */
2673
- BLOCKED = 9,
2755
+ userCount: number;
2756
+ }
2757
+ interface IRemoveChatroomEntry {
2674
2758
  /**
2675
- * 域名错误
2759
+ * 属性名称, 支持英文字母、数字、+、=、-、_ 的组合方式, 最大长度 128 字符
2676
2760
  */
2677
- DOMAIN_INCORRECT = 12,
2761
+ key: string;
2678
2762
  /**
2679
- * 服务器主动断开
2763
+ * 删除成功后是否发送通知消息
2680
2764
  */
2681
- DISCONNECT_BY_SERVER = 13,
2765
+ isSendNotification?: boolean;
2682
2766
  /**
2683
- * 重定向
2767
+ * RC:chrmKVNotiMsg 消息中携带的附加信息
2684
2768
  */
2685
- REDIRECT = 14,
2769
+ notificationExtra?: string;
2770
+ }
2771
+ interface IRemoveChatroomEntries {
2686
2772
  /**
2687
- * appkey 不正确
2773
+ * key 属性名称, 支持英文字母、数字、+、=、-、_ 的组合方式, 最大长度 128 字符
2688
2774
  */
2689
- APPKEY_IS_FAKE = 20,
2775
+ entries: {
2776
+ key: string;
2777
+ }[];
2690
2778
  /**
2691
- * 其他端登录,本端禁止连接和重连
2692
- */
2693
- FORBID_RECONNECT_BY_OTHER_SAME_CLIENT = 31023,
2779
+ * 删除成功后是否发送通知消息
2780
+ */
2694
2781
  /**
2695
- * 互踢次数过多(`count > 5`),此时可能出现:在其它他设备登陆有 reconnect 逻辑
2782
+ * RC:chrmKVNotiMsg 消息中携带的附加信息
2696
2783
  */
2697
- ULTRALIMIT = 1101,
2784
+ notificationExtra?: string;
2785
+ }
2786
+ interface IChatroomEntries {
2698
2787
  /**
2699
- * 开始请求导航
2788
+ * entries ,要设置的属性列表
2789
+ * key 属性名称, 支持英文字母、数字、+、=、-、_ 的组合方式, 最大长度 128 字符
2790
+ * value 属性对应的值, 最大长度 4096 字符
2700
2791
  */
2701
- REQUEST_NAVI = 201,
2792
+ entries: {
2793
+ key: string;
2794
+ value: string;
2795
+ }[];
2702
2796
  /**
2703
- * 请求导航结束
2797
+ * 设置成功后是否发送通知消息
2704
2798
  */
2705
- RESPONSE_NAVI = 202,
2706
2799
  /**
2707
- * 请求导航失败
2800
+ * RC:chrmKVNotiMsg 消息中携带的附加信息
2708
2801
  */
2709
- RESPONSE_NAVI_ERROR = 203,
2802
+ notificationExtra?: string;
2710
2803
  /**
2711
- * 请求导航超时
2804
+ * 用户退出聊天室时是否清除此属性
2712
2805
  */
2713
- RESPONSE_NAVI_TIMEOUT = 204
2806
+ isAutoDelete?: boolean;
2807
+ /**
2808
+ * 是否强制覆盖
2809
+ */
2810
+ isForce?: boolean;
2714
2811
  }
2715
2812
 
2716
- declare enum ReceivedStatus {
2813
+ interface IUploadAuth {
2717
2814
  /**
2718
- * 已读
2815
+ * 七牛 token 有效期
2719
2816
  */
2720
- READ = 1,
2817
+ deadline: number;
2721
2818
  /**
2722
- * 已听
2819
+ * 七牛上传 token
2723
2820
  */
2724
- LISTENED = 2,
2821
+ token: string;
2725
2822
  /**
2726
- * 已下载
2823
+ * 百度上传 token
2727
2824
  */
2728
- DOWNLOADED = 4,
2825
+ bosToken: string;
2729
2826
  /**
2730
- * 该消息已经被其他登录的多端收取过。( 即该消息已经被其他端收取过后。当前端才登录,并重新拉取了这条消息。客户可以通过这个状态更新 UI,比如不再提示 )
2827
+ * 百度上传 header Date
2731
2828
  */
2732
- RETRIEVED = 8,
2829
+ bosDate: string;
2733
2830
  /**
2734
- * 未读
2831
+ * 百度上传路径
2735
2832
  */
2736
- UNREAD = 0
2737
- }
2738
-
2739
- /**
2740
- * CMP/Comet 服务连接应答码
2741
- */
2742
- declare const ConnectResultCode: {
2833
+ path: string;
2743
2834
  /**
2744
- * 连接成功
2835
+ * 上传文件名,阿里上传获取下载地址时,必须使用上传文件名,所以需抛出到业务端
2745
2836
  */
2746
- ACCEPTED: number;
2837
+ fileName: string;
2747
2838
  /**
2748
- * 协议版本不匹配
2749
- * @description 暂未使用
2839
+ * 阿里云 oss 的 AccessKeyId
2750
2840
  */
2751
- UNACCEPTABLE_PROTOCOL_VERSION: number;
2841
+ osskeyId: string;
2752
2842
  /**
2753
- * 客户端(移动端 TCP 连接建立时)`info` 字段格式错误
2754
- * @description 格式:`{平台类型}-{设备信息}-{sdk版本}`。
2755
- * 其中设备信息为:{手机类型}{手机型号}{网络类型,4G/WIFI}{运营商标识, 移动/电信/联通}
2843
+ * 阿里云 oss post 请求表单域中的字段 policy
2756
2844
  */
2757
- IDENTIFIER_REJECTED: number;
2845
+ ossPolicy: string;
2758
2846
  /**
2759
- * 不支持的平台类型,一般小程序或 PC 未开通
2847
+ * 阿里云 oss 根据 policy 计算的签名信息
2760
2848
  */
2761
- SERVER_UNAVAILABLE: number;
2849
+ ossSign: string;
2762
2850
  /**
2763
- * Token无法解析,或Token已过期
2851
+ * 阿里云 oss 存储空间名称
2764
2852
  */
2765
- TOKEN_INCORRECT: number;
2853
+ ossBucketName: string;
2766
2854
  /**
2767
- * 防黑产规则相关应答
2855
+ * s3 认证凭证,对应 post上传 x-amz-credential 字段
2768
2856
  */
2769
- NOT_AUTHORIZED: number;
2857
+ s3Credential: string;
2770
2858
  /**
2771
- * 服务重定向,一般服务扩缩容时,落点已经改变,此时 userId 链接到旧的节点时,会触发该错误。
2772
- * 客户端收到该应答后须重新访问导航,重新获取 CMP 地址
2859
+ * 加密算法,对应 post上传 x-amz-algorithm 字段
2773
2860
  */
2774
- REDIRECT: number;
2861
+ s3Algorithm: string;
2775
2862
  /**
2776
- * 暂未使用
2863
+ * s3 日期,对应 post上传 x-amz-date 字段
2777
2864
  */
2778
- PACKAGE_ERROR: number;
2865
+ s3Date: string;
2779
2866
  /**
2780
- * AppKey 已经封禁或删除
2867
+ * s3 policy,对应 post上传 policy 字段
2781
2868
  */
2782
- APP_BLOCK_OR_DELETE: number;
2869
+ s3Policy: string;
2783
2870
  /**
2784
- * 该用户 ID 已经被封禁
2871
+ * s3 签名信息,对应 post上传 x-amz-signature 字段
2785
2872
  */
2786
- BLOCK: number;
2873
+ s3Signature: string;
2787
2874
  /**
2788
- * Token 已过期,暂未使用
2875
+ * s3 存储空间名称
2789
2876
  */
2790
- TOKEN_EXPIRE: number;
2877
+ s3BucketName: string;
2791
2878
  /**
2792
- * Token 中携带 deviceId 时,检测 Token 中 deviceId 与链接设备 deviceId 不一致
2879
+ * stc Authorization
2793
2880
  */
2794
- DEVICE_ERROR: number;
2881
+ stcAuthorization: string;
2795
2882
  /**
2796
- * Web 端设置安全域名后,连接端域名不在安全域名范围内
2883
+ * stc xAmzContentSha256
2797
2884
  */
2798
- HOSTNAME_ERROR: number;
2885
+ stcContentSha256: string;
2799
2886
  /**
2800
- * 开启`禁止把已在线客户端踢下线`开关后,该错误码标识已有同类型端在线,禁止链接
2887
+ * stc date
2801
2888
  */
2802
- HASOHTERSAMECLIENTONLINE: number;
2889
+ stcDate: string;
2803
2890
  /**
2804
- * 客户端连错环境,引发连接拒绝
2891
+ * stc 存储空间名称
2805
2892
  */
2806
- IN_OTHER_CLUSTER: number;
2893
+ stcBucketName: string;
2894
+ }
2895
+
2896
+ interface IRTCRoomInfo {
2897
+ roomId: string;
2898
+ roomData: unknown[];
2899
+ userCount: number;
2900
+ list: unknown[];
2901
+ }
2902
+ interface IRtcTokenData {
2903
+ rtcToken: string;
2904
+ }
2905
+ interface IRTCUsers {
2906
+ users: {
2907
+ [userId: string]: {
2908
+ /**
2909
+ * 发布的资源数据,是一个 JSON 字符串,解析后为发布的资源列表
2910
+ */
2911
+ uris?: string;
2912
+ /**
2913
+ * 加房间的身份标识,保存主房间 roomId
2914
+ */
2915
+ extra?: string;
2916
+ };
2917
+ };
2918
+ }
2919
+ interface IJoinRTCRoomData extends IRTCUsers {
2920
+ token: string;
2921
+ sessionId: string;
2922
+ roomInfo: {
2923
+ key: string;
2924
+ value: string;
2925
+ }[];
2926
+ kvEntries: IServerRTCRoomEntry[];
2927
+ offlineKickTime: number;
2928
+ }
2929
+ interface KVString {
2930
+ [key: string]: string;
2931
+ }
2932
+ /**
2933
+ * 设置 RTC 人员 inner、outer 数据
2934
+ */
2935
+ interface IRTCUserData {
2936
+ [key: string]: string;
2937
+ }
2938
+
2939
+ interface IAsyncRes<T = any> {
2807
2940
  /**
2808
- * app 验证Token 验证不通过。所有内部超时,访问失败,返回给客户端sdk都是验证不通过,由服务端日志去看具体是那种失败。
2941
+ * Promise 执行结果
2809
2942
  */
2810
- APP_AUTH_NOT_PASS: number;
2943
+ code: ErrorCode;
2811
2944
  /**
2812
- * One Time Password 已经被使用过
2945
+ * 结果数据
2813
2946
  */
2814
- OTP_USED: number;
2947
+ data?: T;
2815
2948
  /**
2816
- * token平台验证失败
2949
+ * 错误消息
2817
2950
  */
2818
- PLATFORM_ERROR: number;
2819
- };
2820
-
2951
+ msg?: string;
2952
+ }
2821
2953
  /**
2822
- * 内置消息类型
2954
+ * 异步任务结果定义
2955
+ * @description
2956
+ * 通过 `Promise.resolve` 来处理预期内的异常,进而通过 Uncatch Promise Error 暴露预期外的异常
2823
2957
  */
2824
- declare enum MessageType {
2825
- /**
2826
- * 文字消息
2827
- */
2828
- TextMessage = "RC:TxtMsg",
2829
- /**
2830
- * 语音消息
2831
- */
2832
- VOICE = "RC:VcMsg",
2833
- /**
2834
- * 高质量消息
2835
- */
2836
- HQ_VOICE = "RC:HQVCMsg",
2958
+ declare type IPromiseResult<T> = Promise<IAsyncRes<T>>;
2959
+ interface IConnectResult {
2837
2960
  /**
2838
- * 图片消息
2839
- */
2840
- IMAGE = "RC:ImgMsg",
2961
+ * 连接错误码
2962
+ */
2963
+ code: ErrorCode;
2841
2964
  /**
2842
- * GIF 消息
2843
- */
2844
- GIF = "RC:GIFMsg",
2965
+ * 导航获取成功后即可有相应的值,在导航数据获取完成之前该值为 undefined
2966
+ */
2967
+ userId?: string;
2968
+ }
2969
+
2970
+ declare enum HttpMethod {
2971
+ GET = "GET",
2972
+ POST = "POST"
2973
+ }
2974
+ interface IRequest {
2975
+ url: string;
2845
2976
  /**
2846
- * 图文消息
2847
- */
2848
- RICH_CONTENT = "RC:ImgTextMsg",
2977
+ * @default `HttpMethod.GET`
2978
+ */
2979
+ method?: HttpMethod | 'GET' | 'POST';
2849
2980
  /**
2850
- * 位置消息
2851
- */
2852
- LOCATION = "RC:LBSMsg",
2981
+ * 查询数据
2982
+ */
2983
+ query?: {
2984
+ [key: string]: string | number | null;
2985
+ };
2853
2986
  /**
2854
- * 文件消息
2855
- */
2856
- FILE = "RC:FileMsg",
2987
+ * Request Header 信息
2988
+ */
2989
+ headers?: {
2990
+ [key: string]: string;
2991
+ };
2857
2992
  /**
2858
- * 小视频消息
2859
- */
2860
- SIGHT = "RC:SightMsg",
2993
+ * Request Body 数据
2994
+ */
2995
+ body?: Object | string;
2861
2996
  /**
2862
- * 合并转发消息
2863
- */
2864
- COMBINE = "RC:CombineMsg",
2997
+ * 超时设置
2998
+ * @default 10 * 1000 毫秒
2999
+ */
3000
+ timeout?: number;
2865
3001
  /**
2866
- * 聊天室 KV 通知消息
2867
- */
2868
- CHRM_KV_NOTIFY = "RC:chrmKVNotiMsg",
3002
+ * 期望返回的数据格式,如果为 json 则返回后会对返回的数据进行一次 JSON.parse, 在小程序平台需要
3003
+ */
3004
+ dataType?: 'json' | 'text' | 'base64' | 'arraybuffer';
3005
+ }
3006
+ interface IStorage {
3007
+ setItem(key: string, value: string): void;
3008
+ getItem(key: string): string | null;
3009
+ removeItem(key: string): void;
3010
+ clear(): void;
3011
+ }
3012
+ interface IResponse {
3013
+ status: number;
3014
+ data?: string;
3015
+ }
3016
+ /**
3017
+ * 网络状态枚举
3018
+ */
3019
+ declare enum NetworkType {
3020
+ WIFI = "wifi",
3021
+ FOUR_G = "4g",
3022
+ THREE_G = "3g",
3023
+ TWO_G = "2g",
3024
+ FIVE_G = "2g",
3025
+ THREE_GENT = "3gnet",
3026
+ UNKONWN = "unknown"
3027
+ }
3028
+ interface IWebSocket {
2869
3029
  /**
2870
- * 日志通知消息
2871
- */
2872
- LOG_COMMAND = "RC:LogCmdMsg",
3030
+ * 监听连接建立事件,此时 WebSocket 实例已准备好收发数据
3031
+ * @param callback
3032
+ */
3033
+ onOpen(callback: () => void): void;
2873
3034
  /**
2874
- * 消息扩展
2875
- */
2876
- EXPANSION_NOTIFY = "RC:MsgExMsg",
3035
+ * 监听连接关闭事件
3036
+ * @param callback
3037
+ */
3038
+ onClose(callback: (code?: number, reason?: string) => void): void;
2877
3039
  /**
2878
- * 引用消息
2879
- */
2880
- REFERENCE = "RC:ReferenceMsg",
3040
+ * 监听接收服务器消息事件
3041
+ * @param callback
3042
+ */
3043
+ onMessage(callback: (data: string | ArrayBuffer) => void): void;
2881
3044
  /**
2882
- * 撤回消息
2883
- */
2884
- RECALL = "RC:RcCmd",
3045
+ * 监听链接错误事件
3046
+ * @param callback
3047
+ */
3048
+ onError(callback: (error: unknown) => void): void;
2885
3049
  /**
2886
- * 已读同步状态消息
2887
- */
2888
- READ_RECEIPT = "RC:ReadNtf",
3050
+ * 向服务器发送数据
3051
+ * @param data
3052
+ */
3053
+ send(data: ArrayBuffer | string): void;
2889
3054
  /**
2890
- * 群已读请求回执消息
2891
- */
2892
- READ_RECEIPT_REQUEST = "RC:RRReqMsg",
3055
+ * 关闭连接
3056
+ * @param code
3057
+ * @param reason
3058
+ */
3059
+ close(code?: number, reason?: string): void;
3060
+ }
3061
+ /**
3062
+ * 平台运行时抽象
3063
+ */
3064
+ interface IRuntime {
2893
3065
  /**
2894
- * 群已读响应回执消息
2895
- */
2896
- READ_RECEIPT_RESPONSE = "RC:RRRspMsg",
3066
+ * 平台标识
3067
+ */
3068
+ tag: string;
2897
3069
  /**
2898
- * 多端同步已读状态
2899
- */
2900
- SYNC_READ_STATUS = "RC:SRSMsg",
3070
+ * 发送 http 请求
3071
+ * @param options
3072
+ */
3073
+ httpReq(options: IRequest): Promise<IResponse>;
2901
3074
  /**
2902
- * 接受群已读回执更新消息(导航开关grpRRVer为1时使用)
3075
+ * 检测是否支持长连接
2903
3076
  */
2904
- GROUP_READ_RECEIPT_REQUEST = "RC:RRMsg",
3077
+ isSupportSocket(): boolean;
2905
3078
  /**
2906
- * 用户加入聊天室
3079
+ * 是否使用导航
2907
3080
  */
2908
- CHATROOM_JOIN = "RC:ChrmJoinNtf",
3081
+ useNavi: boolean;
2909
3082
  /**
2910
- * 用户退出聊天室
3083
+ * websocket 地址上附加的平台字段
2911
3084
  */
2912
- CHATROOM_LEFT = "RC:ChrmQuitNtf",
3085
+ connectPlatform: string;
2913
3086
  /**
2914
- * 用户加入退出聊天室的集合
3087
+ * websocket 地址上 apiVer 字段,代表代码是否来源于 uniapp
2915
3088
  */
2916
- CHATROOM_MERGE_CHANGE = "RC:ChrmMemChange",
3089
+ isFromUniapp: boolean;
2917
3090
  /**
2918
- * 输入状态消息
3091
+ * 创建长连接实例
2919
3092
  */
2920
- TYPING_STATUS = "RC:TypSts",
3093
+ createWebSocket?(url: string, protocols?: string[]): IWebSocket;
2921
3094
  /**
2922
- * 拦截消息,(当发送的消息的敏感词时,服务会下发一个拦截消息,内容包含被拦截消息信息)
3095
+ * 创建数据通道
2923
3096
  */
2924
- INTERCEPT = "RC:InterceptMsg"
2925
- }
2926
-
2927
- /**
2928
- * 群组 @ 类型
2929
- */
2930
- declare enum MentionedType {
3097
+ createDataChannel(watcher: IDataChannelWatcher, connectType?: 'websocket' | 'comet'): ADataChannel;
2931
3098
  /**
2932
- * 所有人
2933
- */
2934
- ALL = 1,
3099
+ * 存储模块
3100
+ */
3101
+ localStorage: IStorage;
2935
3102
  /**
2936
- * 部分人
2937
- */
2938
- SINGAL = 2
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
- /**
2962
- * IMLib 埋点日志 Id 枚举
2963
- * @desc 参考文档-https://rongcloud.yuque.com/tbvylv/znhprz/dpt9wf#fE9u
2964
- */
2965
- declare enum LogTagId {
2966
- L_IMSDK_VER_O = "L-imsdk_ver-O",
2967
- A_INIT_O = "A-init-O",
2968
- L_INIT_O = "L-init-O",
2969
- P_INIT_O = "P-init-O",
2970
- A_CONNECT_T = "A-connect-T",
2971
- A_CONNECT_R = "A-connect-R",
2972
- A_CONNECT_S = "A-connect-S",
2973
- A_DISCONNECT_O = "A-disconnect-O",
2974
- A_RECONNECT_T = "A-reconnect-T",
2975
- A_RECONNECT_R = "A_RECONNECT_R",
2976
- L_CONNECT_T = "L-connect-T",
2977
- L_CONNECT_R = "L-connect-R",
2978
- L_CONNECT_S = "L-connect-S",
2979
- P_CONNECT_O = "P-connect-O",
2980
- P_CONNECT_S = "P-connect-S",
2981
- A_SEND_MSG_T = "A-send_msg-T",
2982
- A_SEND_MSG_R = "A-send_msg-R",
2983
- P_SEND_MSG_T = "P-send_msg-T",
2984
- P_SEND_MSG_R = "P-send_msg-R",
2985
- L_SEND_MSG_T = "L-send_msg-T",
2986
- L_SEND_MSG_R = "L-send_msg-R",
2987
- L_PULL_MSG_T = "L-pull_msg-T",
2988
- L_PULL_MSG_R = "L-pull_msg-R",
2989
- L_PULL_ULTRA_MSG_T = "L-pull_ultra_msg-T",
2990
- L_PULL_ULTRA_MSG_R = "L-pull_ultra_msg-R",
2991
- L_PULL_CHATROOM_KV_T = "L-pull_chatroom_kv-T",
2992
- L_PULL_CHATROOM_KV_R = "L-pull_chatroom_kv-R",
2993
- L_PULL_CHATROOM_MSG_T = "L-pull_chatroom_msg-T",
2994
- L_PULL_CHATROOM_MSG_R = "L-pull_chatroom_msg-R",
2995
- A_DELETE_MESSAGES_S = "A-delete_messages-S",
2996
- P_DELETE_MSG_S = "P-delete_msg-S",
2997
- L_PULL_CONVERSATION_S = "L-pull_conversation-S",
2998
- L_RECALL_ULTRA_MSG_S = "L-recall_ultra_msg-S",
2999
- A_REGTYP_O = "A-regtyp-O",
3000
- P_REGTYP_O = "P-regtype-O",
3001
- P_REGTYP_E = "P-regtype-E",
3002
- L_GET_NAVI_T = "L-get_navi-T",
3003
- L_GET_NAVI_R = "L-get_navi-R",
3004
- L_ENV_S = "L-Env-S",
3005
- L_GET_INDEX_NAVI_S = "L-get_index_navi-S",
3006
- A_JOIN_CHATROOM_T = "A-join_chatroom-T",
3007
- A_JOIN_CHATROOM_R = "A-join_chatroom-R",
3008
- L_JOIN_CHATROOM_T = "L-join_chatroom-T",
3009
- L_JOIN_CHATROOM_R = "L-join_chatroom-R",
3010
- A_QUIT_CHATROOM_T = "A-quit_chatroom-T",
3011
- A_QUIT_CHATROOM_R = "A-quit_chatroom-R",
3012
- L_REJOIN_CHATROOM_T = "L-rejoin_chatroom-T",
3013
- L_REJOIN_CHATROOM_R = "L-rejoin_chatroom-R",
3014
- L_MEDIA_S = "L-media-S",
3015
- L_MEDIA_UPLOAD_T = "L-media_upload-T",
3016
- L_MEDIA_UPLOAD_R = "L-media_upload-R",
3017
- G_UPLOAD_LOG_S = "G-upload_log-S",
3018
- G_UPLOAD_LOG_E = "G-upload_log-E",
3019
- G_GET_REAL_TIMELOG_COMMAND_S = "G-get_real_timelog_command-S",
3020
- L_CHECK_ALIVE_IM_T = "L-check_alive_im-T",
3021
- L_CHECK_ALIVE_IM_R = "L-check_alive_im-R",
3022
- A_GET_HISTORY_MSG_T = "A-get_history_msg-T",
3023
- A_GET_HISTORY_MSG_R = "A-get_history_msg-R",
3024
- L_GET_HISTORY_MSG_T = "L-get_history_msg-T",
3025
- L_GET_HISTORY_MSG_R = "L-get_history_msg-R",
3026
- A_CALLBACK_O = "A-callback-O",
3027
- A_CALLBACK_E = "A-callback-E"
3103
+ * 在某些非浏览器平台,其等同于 localStorage
3104
+ */
3105
+ sessionStorage: IStorage;
3106
+ /**
3107
+ * 获取网络状态
3108
+ * 2g 3g 4g wifi unkown
3109
+ */
3110
+ getNetworkType(): Promise<NetworkType>;
3028
3111
  }
3029
3112
 
3030
3113
  /**
@@ -3791,6 +3874,33 @@ interface ITypingMessage {
3791
3874
  list: Array<ITypingUser>;
3792
3875
  }
3793
3876
 
3877
+ /**
3878
+ * 消息送达相关接口
3879
+ */
3880
+
3881
+ interface IDeliveredUser {
3882
+ time: number;
3883
+ userId: string;
3884
+ }
3885
+ interface IGroupMessageDeliverInfo {
3886
+ totalCount: number;
3887
+ list: IDeliveredUser[];
3888
+ }
3889
+ interface IMessageDeliver {
3890
+ deliverTime: number;
3891
+ messageUId: string;
3892
+ conversationType: ConversationType;
3893
+ targetId: string;
3894
+ }
3895
+ interface IGroupMessageDeliveredStatusInfo {
3896
+ MessageUId: string;
3897
+ deliveryCount: number;
3898
+ }
3899
+ interface IGroupMessageDeliverStatus {
3900
+ totalCount: number;
3901
+ list: IGroupMessageDeliveredStatusInfo[];
3902
+ }
3903
+
3794
3904
  /**
3795
3905
  * IndexDB中存储的log数据
3796
3906
  */
@@ -3804,7 +3914,7 @@ interface ILogInfo {
3804
3914
  tagId?: LogTagId;
3805
3915
  }
3806
3916
  interface IRealTimeLog {
3807
- level: LogLevel;
3917
+ level: number;
3808
3918
  content: string;
3809
3919
  }
3810
3920
  interface ILogExtensions {
@@ -4356,6 +4466,8 @@ declare type ITagListener = () => void;
4356
4466
  declare type IConversationTagListener = () => void;
4357
4467
  declare type ItypingStateListener = (data: ITypingMessage[]) => void;
4358
4468
  declare type IMessageBlockedListener = (data: IBlockedMessageInfo) => void;
4469
+ declare type IMessageDeliveredListener = (data: IMessageDeliver[]) => void;
4470
+ declare type IGroupMessageDeliveredStatusListener = (data: IGroupMessageDeliverStatus) => void;
4359
4471
  interface IWatcher {
4360
4472
  message?: IMessageListnenr;
4361
4473
  batchMessage?: IMessagesListnenr;
@@ -4380,6 +4492,14 @@ interface IWatcher {
4380
4492
  */
4381
4493
  typingState?: ItypingStateListener;
4382
4494
  pullFinished?: ITagListener;
4495
+ /**
4496
+ * 单聊消息送达通知
4497
+ */
4498
+ messageDelivered?: IMessageDeliveredListener;
4499
+ /**
4500
+ * 群聊消息送达状态通知
4501
+ */
4502
+ groupMessageDeliveredStatus?: IGroupMessageDeliveredStatusListener;
4383
4503
  onConnecting?: () => void;
4384
4504
  onConnected?: () => void;
4385
4505
  onDisconnect?: (status: ConnectionStatus) => void;
@@ -4396,6 +4516,9 @@ interface IWatcher {
4396
4516
  ultraGroupMessageExpansionUpdated?: (list: IReceivedMessage[]) => void;
4397
4517
  ultraGroupMessageModified?: (list: IReceivedMessage[]) => void;
4398
4518
  ultraGroupMessageRecalled?: (list: IReceivedMessage[]) => void;
4519
+ ultraGroupChannelChangeType?: (list: IUltraChannelChangeInfo[]) => void;
4520
+ ultraGroupChannelUserKicked?: (list: IUltraChannelUserKickedInfo[]) => void;
4521
+ ultraGroupChannelDelete?: (list: IUltraChannelDeleteInfo[]) => void;
4399
4522
  }
4400
4523
  interface IAPIContextOption {
4401
4524
  /**
@@ -4459,6 +4582,17 @@ interface IAPIContextOption {
4459
4582
  * 是否校验证书,默认为 true
4460
4583
  */
4461
4584
  checkCA?: boolean;
4585
+ /**
4586
+ * 实时日志收集功能自定义上传策略
4587
+ * @param {number} logSwitch 日志收集功能开关,0 关闭;1 开启
4588
+ * @param {LogLevel} level 日志上传级别
4589
+ * @param {number} itv: interval 即日志上传间隔,单位秒,最小时间间隔 1 秒
4590
+ */
4591
+ logPolicy?: {
4592
+ logSwitch?: number;
4593
+ level?: LogLevel;
4594
+ itv?: number;
4595
+ };
4462
4596
  }
4463
4597
 
4464
4598
  interface IPluginGenerator<API, InitOption> {
@@ -4563,11 +4697,17 @@ declare class APIContext {
4563
4697
  private _typingStatusListener;
4564
4698
  private _pullFinishedListener;
4565
4699
  private _MessageBlockedListener;
4700
+ private _messageDeliveredListerer;
4701
+ private _groupMessageDeliveredStatusListerer;
4702
+ private _callInfoListener;
4566
4703
  private _ultraGroupEnableListener;
4567
4704
  private _operateStatusListener;
4568
4705
  private _ultraGroupMessageExpansionUpdatedListener;
4569
4706
  private _ultraGroupMessageModifiedListener;
4570
4707
  private _ultraGroupMessageRecalledListener;
4708
+ private _ultraGroupChannelChangeTypeListener;
4709
+ private _ultraGroupChannelUserKickedListener;
4710
+ private _ultraGroupChannelDeleteListener;
4571
4711
  /**
4572
4712
  * rtc 数据变更通知 pluginContext
4573
4713
  */
@@ -4708,7 +4848,7 @@ declare class APIContext {
4708
4848
  /**
4709
4849
  * 获取超级群会话列表
4710
4850
  */
4711
- getUltraGroupList(): Promise<IAsyncRes<IReceivedConversation[]>>;
4851
+ getUltraGroupList(options: IGetUltraGroupListOption): Promise<IAsyncRes<IUltraGroupConversation[]>>;
4712
4852
  /**
4713
4853
  * 获取超级群免打扰列表
4714
4854
  */
@@ -5030,6 +5170,18 @@ declare class APIContext {
5030
5170
  * @param args
5031
5171
  */
5032
5172
  callExtra(method: string | keyof IExtraMethod, ...args: any[]): Promise<IAsyncRes<unknown>>;
5173
+ setCallInfo(targetId: string, key: string, value: string): Promise<IAsyncRes<{
5174
+ key: string;
5175
+ value: string;
5176
+ }>>;
5177
+ /**
5178
+ * 获取群组消息送达信息
5179
+ */
5180
+ getGroupMessageDeliverList(targetId: string, messageUId: string, channelId?: string): Promise<IAsyncRes<IGroupMessageDeliverInfo>>;
5181
+ /**
5182
+ * 获取单聊消息送达信息
5183
+ */
5184
+ getPrivateMessageDeliverTime(messageUId: string, channelId?: string): Promise<IAsyncRes<number>>;
5033
5185
  /**
5034
5186
  * 删除所有会话
5035
5187
  */
@@ -5264,6 +5416,10 @@ declare class PluginContext {
5264
5416
  * 目前仅通知:主播加入、退出房间的人员列表变更,发布、取消发布资源列表变更
5265
5417
  */
5266
5418
  onrtcdatachange?(data: IServerRTCRoomEntry[], roomdId?: string): void;
5419
+ /**
5420
+ * beem 专有接口,做 groupCall 用到
5421
+ */
5422
+ onCallInfo?(data: string): void;
5267
5423
  /**
5268
5424
  * 获取 `@rongcloud/engine` 包版本
5269
5425
  */
@@ -5307,6 +5463,10 @@ declare class PluginContext {
5307
5463
  * 获取加入 RTC 房间的用户信息(当前仅能查自己的)
5308
5464
  */
5309
5465
  getRTCJoinedUserInfo(userId: string): IPromiseResult<IRTCJoinedInfo[]>;
5466
+ setCallInfo(targetId: string, key: string, value: string): IPromiseResult<{
5467
+ key: string;
5468
+ value: string;
5469
+ }>;
5310
5470
  }
5311
5471
 
5312
5472
  declare class RTCPluginContext extends PluginContext {
@@ -5439,11 +5599,17 @@ interface IEngineWatcher {
5439
5599
  ultraGroupMessageExpansionUpdated: (list: IReceivedMessage[]) => void;
5440
5600
  ultraGroupMessageModified: (list: IReceivedMessage[]) => void;
5441
5601
  ultraGroupMessageRecalled: (list: IReceivedMessage[]) => void;
5602
+ ultraGroupChannelChangeType: (list: IUltraChannelChangeInfo[]) => void;
5603
+ ultraGroupChannelUserKicked: (list: IUltraChannelUserKickedInfo[]) => void;
5604
+ ultraGroupChannelDelete: (list: IUltraChannelDeleteInfo[]) => void;
5442
5605
  /**
5443
5606
  * RTC 数据变更
5444
5607
  */
5445
5608
  onRTCDataChange: (data: IServerRTCRoomEntry[], roomId?: string) => void;
5446
5609
  pullFinished: () => void;
5610
+ messageDelivered: (data: IMessageDeliver[]) => void;
5611
+ groupMessageDeliveredStatus: (data: IGroupMessageDeliverStatus) => void;
5612
+ callInfo: (data: string) => void;
5447
5613
  }
5448
5614
  /**
5449
5615
  * 引擎定义
@@ -5856,7 +6022,7 @@ declare abstract class AEngine implements IEngine {
5856
6022
  /**
5857
6023
  * 获取所有超级群会话列表
5858
6024
  */
5859
- abstract getUltraGroupList(): Promise<IAsyncRes<IReceivedConversation[]>>;
6025
+ abstract getUltraGroupList(options: IGetUltraGroupListOption): Promise<IAsyncRes<IUltraGroupConversation[]>>;
5860
6026
  /**
5861
6027
  * 获取超级群免打扰列表
5862
6028
  */
@@ -6068,6 +6234,18 @@ declare abstract class AEngine implements IEngine {
6068
6234
  list: IReceivedMessage[];
6069
6235
  hasMore: boolean;
6070
6236
  }>;
6237
+ /**
6238
+ * 获取群组消息送达列表
6239
+ */
6240
+ abstract getGroupMessageDeliverList(targetId: string, messageUId: string, channelId: string): IPromiseResult<IGroupMessageDeliverInfo>;
6241
+ /**
6242
+ * 获取单聊消息送达列表
6243
+ */
6244
+ abstract getPrivateMessageDeliverTime(messageUId: string, channelId: string): IPromiseResult<number>;
6245
+ abstract setCallInfo(targetId: string, key: string, value: string): IPromiseResult<{
6246
+ key: string;
6247
+ value: string;
6248
+ }>;
6071
6249
  /**
6072
6250
  * 无差别获取本地免打扰列表
6073
6251
  */
@@ -6291,82 +6469,11 @@ declare const isValidExpansion: (expansion: {
6291
6469
  [key: string]: string;
6292
6470
  } | undefined) => IIsValidExpansion;
6293
6471
 
6294
- /** ******************************************新重构logger,按照Web新日志规范上报 ********************************** **/
6295
- declare const sessionId: string;
6296
- /**
6297
- * logLevelTransformer
6298
- * @description 数据中心与前端日志规范LogLevel定义不统一
6299
- * WebLogLevel(前端日志级别) -> ServerLogLevel(服务器日志级别)
6300
- * @param level { LogLevel }
6301
- * @returns serverLogLevel
6302
- */
6303
- declare function logLevelTransformer(level: LogLevel): number;
6304
- /**
6305
- * 序列化引用型数据为字符串
6306
- * @value value
6307
- */
6308
- declare const formatLogObj: (value: unknown) => unknown;
6309
- /**
6310
- * 缓存日志
6311
- * @param logLevel 打印等级
6312
- * @param logObj 日志内容
6313
- * @param tagId 日志tag
6314
- */
6315
- declare function insertIntoLogCache(logLevel: LogLevel, tagId: string, logObj: any, logSource?: LogSource): ILogInfo;
6316
- /**
6317
- * 本地默认输出函数
6318
- * @param level
6319
- * @param args
6320
- */
6321
- declare function _defaultStdout(level: LogLevel, msgTag: string, ...logContents: any[]): void;
6322
- /**
6323
- * Trace ID 生成器
6324
- */
6325
- declare function ID(): string;
6326
- declare function init(userLogInfo: ILogInit): void;
6327
- declare function log(logLevel: LogLevel, tagId: LogTagId | string, logObj?: Object, logExtens?: ILogExtensions): void;
6328
- declare const debug: (tagId: string, logObj?: Object | undefined, logExtens?: ILogExtensions | undefined) => void;
6329
- declare const info: (tagId: string, logObj?: Object | undefined, logExtens?: ILogExtensions | undefined) => void;
6330
- declare const warn: (tagId: string, logObj?: Object | undefined, logExtens?: ILogExtensions | undefined) => void;
6331
- declare const error: (tagId: string, logObj?: Object | undefined, logExtens?: ILogExtensions | undefined) => void;
6332
- declare const fatal: (tagId: string, logObj?: Object | undefined, logExtens?: ILogExtensions | undefined) => void;
6333
-
6334
- declare const base_sessionId: typeof sessionId;
6335
- declare const base_logLevelTransformer: typeof logLevelTransformer;
6336
- declare const base_formatLogObj: typeof formatLogObj;
6337
- declare const base_insertIntoLogCache: typeof insertIntoLogCache;
6338
- declare const base__defaultStdout: typeof _defaultStdout;
6339
- declare const base_ID: typeof ID;
6340
- declare const base_init: typeof init;
6341
- declare const base_log: typeof log;
6342
- declare const base_debug: typeof debug;
6343
- declare const base_info: typeof info;
6344
- declare const base_warn: typeof warn;
6345
- declare const base_error: typeof error;
6346
- declare const base_fatal: typeof fatal;
6347
- declare namespace base {
6348
- export {
6349
- base_sessionId as sessionId,
6350
- base_logLevelTransformer as logLevelTransformer,
6351
- base_formatLogObj as formatLogObj,
6352
- base_insertIntoLogCache as insertIntoLogCache,
6353
- base__defaultStdout as _defaultStdout,
6354
- base_ID as ID,
6355
- base_init as init,
6356
- base_log as log,
6357
- base_debug as debug,
6358
- base_info as info,
6359
- base_warn as warn,
6360
- base_error as error,
6361
- base_fatal as fatal,
6362
- };
6363
- }
6364
-
6365
6472
  /** *********************实时日志上报***************** */
6366
6473
 
6367
6474
  /**
6368
6475
  * 缓存日志实时
6369
- * @param logLevel 日志等级
6476
+ * @param {LogLevel} logLevel 日志等级
6370
6477
  * @param tagId 日志标签
6371
6478
  * @param content 日志内容
6372
6479
  */
@@ -6433,6 +6540,23 @@ declare class Logger {
6433
6540
  }
6434
6541
  declare const _default: Logger;
6435
6542
 
6543
+ declare const logger: {
6544
+ reportLog: typeof reportLog;
6545
+ logLevelTransformer(level: LogLevel): number;
6546
+ insertIntoLogCache(logLevel: LogLevel, tagId: string, logObj: any, logSource?: LogSource | undefined): ILogInfo;
6547
+ _defaultStdout(level: LogLevel, msgTag: string, ...logContents: any[]): void;
6548
+ ID(): string;
6549
+ init(userLogInfo: ILogInit): void;
6550
+ log(logLevel: LogLevel, tagId: string, logObj?: Object, logExtens?: ILogExtensions): void;
6551
+ sessionId: string;
6552
+ formatLogObj: (value: unknown) => unknown;
6553
+ debug: (tagId: string, logObj?: Object | undefined, logExtens?: ILogExtensions | undefined) => void;
6554
+ info: (tagId: string, logObj?: Object | undefined, logExtens?: ILogExtensions | undefined) => void;
6555
+ warn: (tagId: string, logObj?: Object | undefined, logExtens?: ILogExtensions | undefined) => void;
6556
+ error: (tagId: string, logObj?: Object | undefined, logExtens?: ILogExtensions | undefined) => void;
6557
+ fatal: (tagId: string, logObj?: Object | undefined, logExtens?: ILogExtensions | undefined) => void;
6558
+ };
6559
+
6436
6560
  declare const randomNum: (min: number, max: number) => number;
6437
6561
  declare const getUUID: () => string;
6438
6562
  declare const getUUID22: () => string;
@@ -6678,4 +6802,4 @@ declare const ONE_LOG_SIZE_MAX = 1000;
6678
6802
  */
6679
6803
  declare const version: string;
6680
6804
 
6681
- 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, 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, 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, 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 };
6805
+ 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, IDeliveredUser, IEndRoomPKOptions, IEngine, IEngineWatcher, IEventListener, IExpansionListener, IExpansionListenerData, IExpansionMsgContent, IExtraMethod, IGetMsgOption, IGetUltraGroupListOption, IGooglePushConfig, IGroupMessageDeliverInfo, IGroupMessageDeliverStatus, 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, IMessageDeliver, IMessageDeliveredListener, 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, logger, map, notEmptyArray, notEmptyObject, notEmptyString, pushConfigsToJSON, pushJSONToConfigs, randomNum, reportLog, todo, usingCppEngine, validate, version };