Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fishpi

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fishpi - npm Package Compare versions

Comparing version 0.0.26 to 0.0.27

11

lib/chat.d.ts
import ReconnectingWebSocket from 'reconnecting-websocket';
import { ApiResponse, ChatData, NoticeMsg } from './typing';
import { ApiResponse, ChatData, ChatRevoke, NoticeMsg } from './typing';
declare class Chat {

@@ -40,2 +40,5 @@ private _apiKey;

unread(): Promise<ApiResponse<ChatData>>;
revoke(msgId: string): Promise<{
result: number;
}>;
/**

@@ -47,3 +50,3 @@ * 移除聊天室消息监听函数

removeListener(user: string | undefined, wsCallback: ({ msg }: {
msg: NoticeMsg;
msg: NoticeMsg | ChatRevoke | ChatData;
}) => void): void;

@@ -55,3 +58,5 @@ /**

*/
addListener(wsCallback: Function, user?: string): Promise<void>;
addListener(wsCallback: ({ msg }: {
msg: NoticeMsg | ChatRevoke | ChatData;
}) => void, user?: string): Promise<void>;
/**

@@ -58,0 +63,0 @@ * 连接用户私聊频道

@@ -104,3 +104,2 @@ "use strict";

}
rsp = rsp;
return [2 /*return*/, rsp];

@@ -136,3 +135,2 @@ case 2:

}
rsp = rsp;
if (param.autoRead)

@@ -169,3 +167,2 @@ this.markRead(param.user);

}
rsp = rsp;
return [2 /*return*/, rsp];

@@ -199,3 +196,2 @@ case 2:

}
rsp = rsp;
return [2 /*return*/, rsp];

@@ -210,2 +206,13 @@ case 2:

};
Chat.prototype.revoke = function (msgId) {
try {
var rsp = (0, utils_1.request)({
url: "chat/revoke?apiKey=".concat(this._apiKey, "&oId=").concat(msgId)
});
return rsp;
}
catch (e) {
throw e;
}
};
/**

@@ -212,0 +219,0 @@ * 移除聊天室消息监听函数

@@ -54,2 +54,6 @@ import { ApiResponse, ChatContentType, ChatMessageType, ChatRoomMessage, GestureType, Message, MuteItem, RedPacket, RedPacketInfo } from './typing';

barrage(msg: string, color?: string): Promise<ApiResponse<undefined>>;
/**
* 获取弹幕发送价格
* @returns 返回价格`cost`与单位`unit`
*/
barragePay(): Promise<{

@@ -56,0 +60,0 @@ cost: number;

@@ -288,2 +288,6 @@ "use strict";

};
/**
* 获取弹幕发送价格
* @returns 返回价格`cost`与单位`unit`
*/
ChatRoom.prototype.barragePay = function () {

@@ -290,0 +294,0 @@ return __awaiter(this, void 0, void 0, function () {

@@ -2053,2 +2053,6 @@ /**

}
export interface ChatRevoke {
data: string;
type: 'revoke';
}
/**

@@ -2055,0 +2059,0 @@ * 禁言用户信息

{
"name": "fishpi",
"version": "0.0.26",
"version": "0.0.27",
"description": "A Package to use API of fishpi.",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc