@polyv/chat 2.1.0-rc-20251023.2 → 2.2.0-rc-20251113.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +14 -14
- package/index.es.d.ts +132 -5
- package/index.es.js +2146 -2019
- package/index.umd.js +14 -14
- package/package.json +1 -1
package/index.es.d.ts
CHANGED
|
@@ -346,6 +346,10 @@ export declare interface ChatMsgRewardType extends ChatMsgCommonType<ChatMsgSour
|
|
|
346
346
|
* 打赏礼物图片
|
|
347
347
|
*/
|
|
348
348
|
gimg: string;
|
|
349
|
+
/**
|
|
350
|
+
* 特效文件
|
|
351
|
+
*/
|
|
352
|
+
dynamicFile?: string;
|
|
349
353
|
/**
|
|
350
354
|
* 打赏数量
|
|
351
355
|
*/
|
|
@@ -657,6 +661,10 @@ declare class DownloadModule extends ChatModuleBase {
|
|
|
657
661
|
* 获取到勤/缺勤导出记录
|
|
658
662
|
*/
|
|
659
663
|
getAttendanceDownloadRecord(options?: GetAttendanceDownloadRecordOptions): Promise<PageContent<DataExportRecordData>>;
|
|
664
|
+
/**
|
|
665
|
+
* 获取导出请求参数
|
|
666
|
+
*/
|
|
667
|
+
private __getExportParams;
|
|
660
668
|
/**
|
|
661
669
|
* 导出在线列表
|
|
662
670
|
*/
|
|
@@ -687,10 +695,15 @@ export declare interface EmotionImageData {
|
|
|
687
695
|
|
|
688
696
|
declare class EmotionModule extends ChatModuleBase {
|
|
689
697
|
private __emotionParser?;
|
|
698
|
+
private __emotionParserPromise?;
|
|
690
699
|
/**
|
|
691
700
|
* 加载表情解析器
|
|
692
701
|
*/
|
|
693
702
|
setupEmotionParser(): Promise<void>;
|
|
703
|
+
/**
|
|
704
|
+
* 获取表情解析器
|
|
705
|
+
*/
|
|
706
|
+
getEmotionParser(): EmotionParser | undefined;
|
|
694
707
|
/**
|
|
695
708
|
* 获取黄脸表情节点
|
|
696
709
|
*
|
|
@@ -747,10 +760,6 @@ declare class EmotionModule extends ChatModuleBase {
|
|
|
747
760
|
* ```
|
|
748
761
|
*/
|
|
749
762
|
translateEmotions(content: string, isZhCN?: boolean): string;
|
|
750
|
-
/**
|
|
751
|
-
* 获取表情解析器
|
|
752
|
-
*/
|
|
753
|
-
getEmotionParser(): EmotionParser | undefined;
|
|
754
763
|
private __getEmotionImagePromise?;
|
|
755
764
|
/**
|
|
756
765
|
* 获取表情图片列表
|
|
@@ -864,6 +873,13 @@ export declare interface GetOnlineListOptions {
|
|
|
864
873
|
getBanStatus?: boolean;
|
|
865
874
|
}
|
|
866
875
|
|
|
876
|
+
export declare interface GetSessionHistoryCountOptions {
|
|
877
|
+
/**
|
|
878
|
+
* 场次号
|
|
879
|
+
*/
|
|
880
|
+
sessionId: string;
|
|
881
|
+
}
|
|
882
|
+
|
|
867
883
|
export declare interface GetSpeakOriginalContentOptions {
|
|
868
884
|
/**
|
|
869
885
|
* 发言消息
|
|
@@ -871,6 +887,8 @@ export declare interface GetSpeakOriginalContentOptions {
|
|
|
871
887
|
chatMsg: ChatMsgSpeakType;
|
|
872
888
|
}
|
|
873
889
|
|
|
890
|
+
export declare const GlobalVariable = "PolyvChat";
|
|
891
|
+
|
|
874
892
|
/**
|
|
875
893
|
* 历史消息模块
|
|
876
894
|
*/
|
|
@@ -897,6 +915,10 @@ declare class HistoryModule extends ChatModuleBase {
|
|
|
897
915
|
*/
|
|
898
916
|
private __getHistoryExclude;
|
|
899
917
|
getChatHistoryByWorkWechatTagId(options?: GetChatHistoryByWorkWechatTagIdOptions): Promise<ChatMsgType[]>;
|
|
918
|
+
/**
|
|
919
|
+
* 获取场次历史消息数量
|
|
920
|
+
*/
|
|
921
|
+
getSessionHistoryCount(options: GetSessionHistoryCountOptions): Promise<number>;
|
|
900
922
|
}
|
|
901
923
|
|
|
902
924
|
declare interface InternalSpeakTopData {
|
|
@@ -942,6 +964,28 @@ export declare interface KickUserOptions {
|
|
|
942
964
|
userId: string;
|
|
943
965
|
}
|
|
944
966
|
|
|
967
|
+
declare class LikeModule extends ChatModuleBase {
|
|
968
|
+
/**
|
|
969
|
+
* 实时点赞数
|
|
970
|
+
*/
|
|
971
|
+
private __realtimeLikes;
|
|
972
|
+
constructor(plvChat: PolyvChat);
|
|
973
|
+
/**
|
|
974
|
+
* 获取实时点赞数
|
|
975
|
+
*/
|
|
976
|
+
getRealtimeLikes(): number;
|
|
977
|
+
/**
|
|
978
|
+
* 更新点赞数
|
|
979
|
+
* @param realtimeLikes 点赞数
|
|
980
|
+
*/
|
|
981
|
+
setRealtimeLikes(realtimeLikes: number): void;
|
|
982
|
+
/**
|
|
983
|
+
* 发送点赞
|
|
984
|
+
* @param times 点赞次数
|
|
985
|
+
*/
|
|
986
|
+
sendLike(times: number): Promise<number>;
|
|
987
|
+
}
|
|
988
|
+
|
|
945
989
|
export declare enum ManageFailReason {
|
|
946
990
|
/** 未知错误 */
|
|
947
991
|
UnknownError = "UnknownError",
|
|
@@ -1260,6 +1304,8 @@ export declare class PolyvChat {
|
|
|
1260
1304
|
online: OnlineModule;
|
|
1261
1305
|
/** 下载导出模块 */
|
|
1262
1306
|
download: DownloadModule;
|
|
1307
|
+
/** 点赞模块 */
|
|
1308
|
+
like: LikeModule;
|
|
1263
1309
|
constructor(plvSocket: PolyvSocket, config?: PolyvChatConfig);
|
|
1264
1310
|
/** 是否设置完成 */
|
|
1265
1311
|
setuped: boolean;
|
|
@@ -1267,6 +1313,7 @@ export declare class PolyvChat {
|
|
|
1267
1313
|
* 设置聊天室
|
|
1268
1314
|
*/
|
|
1269
1315
|
setup(): Promise<void>;
|
|
1316
|
+
destroy(): Promise<void>;
|
|
1270
1317
|
}
|
|
1271
1318
|
|
|
1272
1319
|
export declare interface PolyvChatConfig {
|
|
@@ -1279,6 +1326,11 @@ export declare interface PolyvChatConfig {
|
|
|
1279
1326
|
* @default false
|
|
1280
1327
|
*/
|
|
1281
1328
|
chatHistoryEncrypt?: boolean;
|
|
1329
|
+
/**
|
|
1330
|
+
* 默认点赞数
|
|
1331
|
+
* @default 0
|
|
1332
|
+
*/
|
|
1333
|
+
defaultLikes?: number;
|
|
1282
1334
|
}
|
|
1283
1335
|
|
|
1284
1336
|
export declare enum PolyvChatEvent {
|
|
@@ -1290,6 +1342,10 @@ export declare enum PolyvChatEvent {
|
|
|
1290
1342
|
* 状态信息更新事件
|
|
1291
1343
|
*/
|
|
1292
1344
|
StatusInfoUpdate = "StatusInfoUpdate",
|
|
1345
|
+
/**
|
|
1346
|
+
* 用户登录事件
|
|
1347
|
+
*/
|
|
1348
|
+
UserLogin = "UserLogin",
|
|
1293
1349
|
/**
|
|
1294
1350
|
* 聊天消息事件
|
|
1295
1351
|
*/
|
|
@@ -1357,7 +1413,23 @@ export declare enum PolyvChatEvent {
|
|
|
1357
1413
|
/**
|
|
1358
1414
|
* 商品下单数量事件
|
|
1359
1415
|
*/
|
|
1360
|
-
ProductBuyTimes = "ProductBuyTimes"
|
|
1416
|
+
ProductBuyTimes = "ProductBuyTimes",
|
|
1417
|
+
/**
|
|
1418
|
+
* 签到次数事件
|
|
1419
|
+
*/
|
|
1420
|
+
CheckInTimes = "CheckInTimes",
|
|
1421
|
+
/**
|
|
1422
|
+
* 点赞数更新事件
|
|
1423
|
+
*/
|
|
1424
|
+
ChatLikesUpdate = "ChatLikesUpdate",
|
|
1425
|
+
/**
|
|
1426
|
+
* 聊天点赞
|
|
1427
|
+
*/
|
|
1428
|
+
ChatLike = "ChatLike",
|
|
1429
|
+
/**
|
|
1430
|
+
* 发送点赞
|
|
1431
|
+
*/
|
|
1432
|
+
SendChatLike = "SendChatLike"
|
|
1361
1433
|
}
|
|
1362
1434
|
|
|
1363
1435
|
export declare type PolyvChatEventRelations = {
|
|
@@ -1367,6 +1439,12 @@ export declare type PolyvChatEventRelations = {
|
|
|
1367
1439
|
*/
|
|
1368
1440
|
statusInfo: ChatStatusInfo;
|
|
1369
1441
|
};
|
|
1442
|
+
[PolyvChatEvent.UserLogin]: {
|
|
1443
|
+
/**
|
|
1444
|
+
* 用户信息
|
|
1445
|
+
*/
|
|
1446
|
+
user: ChatMessageUser;
|
|
1447
|
+
};
|
|
1370
1448
|
[PolyvChatEvent.ChatMessage]: {
|
|
1371
1449
|
/**
|
|
1372
1450
|
* 聊天消息对象
|
|
@@ -1483,6 +1561,50 @@ export declare type PolyvChatEventRelations = {
|
|
|
1483
1561
|
*/
|
|
1484
1562
|
productType: string;
|
|
1485
1563
|
};
|
|
1564
|
+
[PolyvChatEvent.CheckInTimes]: {
|
|
1565
|
+
/**
|
|
1566
|
+
* 用户昵称
|
|
1567
|
+
*/
|
|
1568
|
+
nickname: string;
|
|
1569
|
+
/**
|
|
1570
|
+
* 次数
|
|
1571
|
+
*/
|
|
1572
|
+
count: number;
|
|
1573
|
+
};
|
|
1574
|
+
[PolyvChatEvent.ChatLikesUpdate]: {
|
|
1575
|
+
/**
|
|
1576
|
+
* 点赞数
|
|
1577
|
+
*/
|
|
1578
|
+
realtimeLikes: number;
|
|
1579
|
+
};
|
|
1580
|
+
[PolyvChatEvent.ChatLike]: {
|
|
1581
|
+
/**
|
|
1582
|
+
* 点赞数
|
|
1583
|
+
*/
|
|
1584
|
+
count: number;
|
|
1585
|
+
/**
|
|
1586
|
+
* 实时点赞数
|
|
1587
|
+
*/
|
|
1588
|
+
realtimeLikes: number;
|
|
1589
|
+
/**
|
|
1590
|
+
* 用户 id
|
|
1591
|
+
*/
|
|
1592
|
+
userId: string;
|
|
1593
|
+
/**
|
|
1594
|
+
* 用户昵称
|
|
1595
|
+
*/
|
|
1596
|
+
nick: string;
|
|
1597
|
+
/**
|
|
1598
|
+
* 是否自己点赞
|
|
1599
|
+
*/
|
|
1600
|
+
isSelf: boolean;
|
|
1601
|
+
};
|
|
1602
|
+
[PolyvChatEvent.SendChatLike]: {
|
|
1603
|
+
/**
|
|
1604
|
+
* 点赞数
|
|
1605
|
+
*/
|
|
1606
|
+
count: number;
|
|
1607
|
+
};
|
|
1486
1608
|
};
|
|
1487
1609
|
|
|
1488
1610
|
export declare interface PushMsgToQaOptions {
|
|
@@ -1885,6 +2007,11 @@ export declare interface UploadMultiImageReadyResult {
|
|
|
1885
2007
|
imageId: string;
|
|
1886
2008
|
/** 图片预览url */
|
|
1887
2009
|
previewSrc: string;
|
|
2010
|
+
/** 图片尺寸 */
|
|
2011
|
+
size: {
|
|
2012
|
+
width: number;
|
|
2013
|
+
height: number;
|
|
2014
|
+
};
|
|
1888
2015
|
}
|
|
1889
2016
|
|
|
1890
2017
|
export declare interface UploadMultiImageResult {
|