@twurple/api
Advanced tools
Comparing version 7.1.0-pre.2 to 7.1.0-pre.3
@@ -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 @@ * |
@@ -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 { |
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1112763
29885
+ Added@twurple/api-call@7.1.0-pre.3(transitive)
+ Added@twurple/auth@7.1.0-pre.3(transitive)
+ Added@twurple/common@7.1.0-pre.3(transitive)
- Removed@twurple/api-call@7.1.0-pre.2(transitive)
- Removed@twurple/auth@7.1.0-pre.2(transitive)
- Removed@twurple/common@7.1.0-pre.2(transitive)
Updated@twurple/common@7.1.0-pre.3