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