@rongcloud/engine 5.4.1 → 5.4.2-beem-enterprise.2

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