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