Socket
Socket
Sign inDemoInstall

@twurple/api

Package Overview
Dependencies
Maintainers
1
Versions
146
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@twurple/api - npm Package Compare versions

Comparing version 7.1.0-pre.2 to 7.1.0-pre.3

14

lib/endpoints/eventSub/HelixEventSubApi.d.ts

@@ -465,2 +465,16 @@ import { type UserIdResolvable } from '@twurple/common';

/**
* Subscribe to events that represent a chat notification in a channel.
*
* @param broadcaster The broadcaster for which you want to listen to chat notification events.
* @param transport The transport options.
*/
subscribeToChannelChatNotificationEvents(broadcaster: UserIdResolvable, transport: HelixEventSubTransportOptions): Promise<HelixEventSubSubscription>;
/**
* Subscribe to events that represent a chat message in a channel.
*
* @param broadcaster The broadcaster for which you want to listen to chat message events.
* @param transport The transport options.
*/
subscribeToChannelChatMessageEvents(broadcaster: UserIdResolvable, transport: HelixEventSubTransportOptions): Promise<HelixEventSubSubscription>;
/**
* Subscribe to events that represent an extension Bits transaction.

@@ -467,0 +481,0 @@ *

29

lib/endpoints/eventSub/HelixEventSubApi.js

@@ -654,3 +654,4 @@ "use strict";

async subscribeToChannelChatClearEvents(broadcaster, transport) {
return await this.createSubscription('channel.chat.clear', '1', (0, eventSub_external_1.createEventSubBroadcasterCondition)(broadcaster), transport, broadcaster, ['user:read:chat']);
const broadcasterId = (0, common_1.extractUserId)(broadcaster);
return await this.createSubscription('channel.chat.clear', '1', (0, eventSub_external_1.createEventSubUserCondition)(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcaster, ['user:read:chat']);
}

@@ -664,3 +665,4 @@ /**

async subscribeToChannelChatClearUserMessagesEvents(broadcaster, transport) {
return await this.createSubscription('channel.chat.clear_user_messages', '1', (0, eventSub_external_1.createEventSubBroadcasterCondition)(broadcaster), transport, broadcaster, ['user:read:chat']);
const broadcasterId = (0, common_1.extractUserId)(broadcaster);
return await this.createSubscription('channel.chat.clear_user_messages', '1', (0, eventSub_external_1.createEventSubUserCondition)(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcaster, ['user:read:chat']);
}

@@ -674,5 +676,26 @@ /**

async subscribeToChannelChatMessageDeleteEvents(broadcaster, transport) {
return await this.createSubscription('channel.chat.message_delete', '1', (0, eventSub_external_1.createEventSubBroadcasterCondition)(broadcaster), transport, broadcaster, ['user:read:chat']);
const broadcasterId = (0, common_1.extractUserId)(broadcaster);
return await this.createSubscription('channel.chat.message_delete', '1', (0, eventSub_external_1.createEventSubUserCondition)(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcaster, ['user:read:chat']);
}
/**
* Subscribe to events that represent a chat notification in a channel.
*
* @param broadcaster The broadcaster for which you want to listen to chat notification events.
* @param transport The transport options.
*/
async subscribeToChannelChatNotificationEvents(broadcaster, transport) {
const broadcasterId = (0, common_1.extractUserId)(broadcaster);
return await this.createSubscription('channel.chat.notification', '1', (0, eventSub_external_1.createEventSubUserCondition)(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcaster, ['user:read:chat']);
}
/**
* Subscribe to events that represent a chat message in a channel.
*
* @param broadcaster The broadcaster for which you want to listen to chat message events.
* @param transport The transport options.
*/
async subscribeToChannelChatMessageEvents(broadcaster, transport) {
const broadcasterId = (0, common_1.extractUserId)(broadcaster);
return await this.createSubscription('channel.chat.message', '1', (0, eventSub_external_1.createEventSubUserCondition)(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcaster, ['user:read:chat']);
}
/**
* Subscribe to events that represent an extension Bits transaction.

@@ -679,0 +702,0 @@ *

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createEventSubDropEntitlementGrantCondition = exports.createEventSubModeratorCondition = exports.createEventSubRewardCondition = exports.createEventSubBroadcasterCondition = void 0;
exports.createEventSubDropEntitlementGrantCondition = exports.createEventSubUserCondition = exports.createEventSubModeratorCondition = exports.createEventSubRewardCondition = exports.createEventSubBroadcasterCondition = void 0;
const common_1 = require("@twurple/common");

@@ -26,2 +26,10 @@ /** @internal */

/** @internal */
function createEventSubUserCondition(broadcasterId, userId) {
return {
broadcaster_user_id: broadcasterId,
user_id: userId,
};
}
exports.createEventSubUserCondition = createEventSubUserCondition;
/** @internal */
function createEventSubDropEntitlementGrantCondition(filter) {

@@ -28,0 +36,0 @@ return {

10

package.json
{
"name": "@twurple/api",
"version": "7.1.0-pre.2",
"version": "7.1.0-pre.3",
"publishConfig": {

@@ -43,4 +43,4 @@ "access": "public"

"@d-fischer/typed-event-emitter": "^3.3.1",
"@twurple/api-call": "7.1.0-pre.2",
"@twurple/common": "7.1.0-pre.2",
"@twurple/api-call": "7.1.0-pre.3",
"@twurple/common": "7.1.0-pre.3",
"retry": "^0.13.1",

@@ -50,7 +50,7 @@ "tslib": "^2.0.3"

"devDependencies": {
"@twurple/auth": "7.1.0-pre.2",
"@twurple/auth": "7.1.0-pre.3",
"@types/retry": "^0.12.2"
},
"peerDependencies": {
"@twurple/auth": "7.1.0-pre.2"
"@twurple/auth": "7.1.0-pre.3"
},

@@ -57,0 +57,0 @@ "files": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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