@openclaw/twitch 2026.7.1 → 2026.7.2-beta.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/dist/api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{monitor-DuF1m2_8.js → monitor-BL82UZIL.js} +6 -8
- package/dist/{plugin-C5o3rImF.js → plugin-DG2hXX7Z.js} +51 -31
- package/npm-shrinkwrap.json +3 -36
- package/package.json +6 -6
- package/node_modules/@twurple/api/LICENSE +0 -21
- package/node_modules/@twurple/api/README.md +0 -24
- package/node_modules/@twurple/api/lib/client/ApiClient.d.ts +0 -98
- package/node_modules/@twurple/api/lib/client/ApiClient.js +0 -107
- package/node_modules/@twurple/api/lib/client/BaseApiClient.d.ts +0 -167
- package/node_modules/@twurple/api/lib/client/BaseApiClient.js +0 -446
- package/node_modules/@twurple/api/lib/client/ContextApiCallOptions.d.ts +0 -21
- package/node_modules/@twurple/api/lib/client/ContextApiCallOptions.js +0 -1
- package/node_modules/@twurple/api/lib/client/NoContextApiClient.d.ts +0 -5
- package/node_modules/@twurple/api/lib/client/NoContextApiClient.js +0 -14
- package/node_modules/@twurple/api/lib/client/UserContextApiClient.d.ts +0 -6
- package/node_modules/@twurple/api/lib/client/UserContextApiClient.js +0 -20
- package/node_modules/@twurple/api/lib/endpoints/BaseApi.d.ts +0 -4
- package/node_modules/@twurple/api/lib/endpoints/BaseApi.js +0 -17
- package/node_modules/@twurple/api/lib/endpoints/bits/CheermoteDisplayInfo.d.ts +0 -48
- package/node_modules/@twurple/api/lib/endpoints/bits/CheermoteDisplayInfo.js +0 -1
- package/node_modules/@twurple/api/lib/endpoints/bits/HelixBitsApi.d.ts +0 -38
- package/node_modules/@twurple/api/lib/endpoints/bits/HelixBitsApi.js +0 -61
- package/node_modules/@twurple/api/lib/endpoints/bits/HelixBitsLeaderboard.d.ts +0 -17
- package/node_modules/@twurple/api/lib/endpoints/bits/HelixBitsLeaderboard.js +0 -39
- package/node_modules/@twurple/api/lib/endpoints/bits/HelixBitsLeaderboardEntry.d.ts +0 -33
- package/node_modules/@twurple/api/lib/endpoints/bits/HelixBitsLeaderboardEntry.js +0 -57
- package/node_modules/@twurple/api/lib/endpoints/bits/HelixCheermoteList.d.ts +0 -23
- package/node_modules/@twurple/api/lib/endpoints/bits/HelixCheermoteList.js +0 -44
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixAdSchedule.d.ts +0 -35
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixAdSchedule.js +0 -50
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannel.d.ts +0 -64
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannel.js +0 -103
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannelApi.d.ts +0 -185
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannelApi.js +0 -371
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannelEditor.d.ts +0 -25
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannelEditor.js +0 -45
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannelFollower.d.ts +0 -29
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannelFollower.js +0 -51
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannelReference.d.ts +0 -43
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannelReference.js +0 -71
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixFollowedChannel.d.ts +0 -29
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixFollowedChannel.js +0 -51
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixSnoozeNextAdResult.d.ts +0 -20
- package/node_modules/@twurple/api/lib/endpoints/channel/HelixSnoozeNextAdResult.js +0 -29
- package/node_modules/@twurple/api/lib/endpoints/channelPoints/HelixChannelPointsApi.d.ts +0 -117
- package/node_modules/@twurple/api/lib/endpoints/channelPoints/HelixChannelPointsApi.js +0 -228
- package/node_modules/@twurple/api/lib/endpoints/channelPoints/HelixCustomReward.d.ts +0 -94
- package/node_modules/@twurple/api/lib/endpoints/channelPoints/HelixCustomReward.js +0 -152
- package/node_modules/@twurple/api/lib/endpoints/channelPoints/HelixCustomRewardRedemption.d.ts +0 -88
- package/node_modules/@twurple/api/lib/endpoints/channelPoints/HelixCustomRewardRedemption.js +0 -138
- package/node_modules/@twurple/api/lib/endpoints/charity/HelixCharityApi.d.ts +0 -39
- package/node_modules/@twurple/api/lib/endpoints/charity/HelixCharityApi.js +0 -66
- package/node_modules/@twurple/api/lib/endpoints/charity/HelixCharityCampaign.d.ts +0 -54
- package/node_modules/@twurple/api/lib/endpoints/charity/HelixCharityCampaign.js +0 -88
- package/node_modules/@twurple/api/lib/endpoints/charity/HelixCharityCampaignAmount.d.ts +0 -29
- package/node_modules/@twurple/api/lib/endpoints/charity/HelixCharityCampaignAmount.js +0 -40
- package/node_modules/@twurple/api/lib/endpoints/charity/HelixCharityCampaignDonation.d.ts +0 -34
- package/node_modules/@twurple/api/lib/endpoints/charity/HelixCharityCampaignDonation.js +0 -58
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixChannelEmote.d.ts +0 -31
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixChannelEmote.js +0 -49
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatApi.d.ts +0 -224
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatApi.js +0 -446
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatBadgeSet.d.ts +0 -23
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatBadgeSet.js +0 -37
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatBadgeVersion.d.ts +0 -35
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatBadgeVersion.js +0 -49
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatChatter.d.ts +0 -25
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatChatter.js +0 -45
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatSettings.d.ts +0 -45
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatSettings.js +0 -64
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixEmote.d.ts +0 -14
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixEmote.js +0 -20
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixEmoteBase.d.ts +0 -48
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixEmoteBase.js +0 -68
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixEmoteFromSet.d.ts +0 -33
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixEmoteFromSet.js +0 -67
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixPrivilegedChatSettings.d.ts +0 -17
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixPrivilegedChatSettings.js +0 -26
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixSentChatMessage.d.ts +0 -24
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixSentChatMessage.js +0 -35
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixSharedChatSession.d.ts +0 -34
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixSharedChatSession.js +0 -58
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixSharedChatSessionParticipant.d.ts +0 -17
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixSharedChatSessionParticipant.js +0 -33
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixUserEmote.d.ts +0 -37
- package/node_modules/@twurple/api/lib/endpoints/chat/HelixUserEmote.js +0 -58
- package/node_modules/@twurple/api/lib/endpoints/clip/HelixClip.d.ts +0 -98
- package/node_modules/@twurple/api/lib/endpoints/clip/HelixClip.js +0 -152
- package/node_modules/@twurple/api/lib/endpoints/clip/HelixClipApi.d.ts +0 -99
- package/node_modules/@twurple/api/lib/endpoints/clip/HelixClipApi.js +0 -192
- package/node_modules/@twurple/api/lib/endpoints/contentClassificationLabels/HelixContentClassificationLabel.d.ts +0 -20
- package/node_modules/@twurple/api/lib/endpoints/contentClassificationLabels/HelixContentClassificationLabel.js +0 -24
- package/node_modules/@twurple/api/lib/endpoints/contentClassificationLabels/HelixContentClassificationLabelApi.d.ts +0 -25
- package/node_modules/@twurple/api/lib/endpoints/contentClassificationLabels/HelixContentClassificationLabelApi.js +0 -38
- package/node_modules/@twurple/api/lib/endpoints/entitlements/HelixDropsEntitlement.d.ts +0 -46
- package/node_modules/@twurple/api/lib/endpoints/entitlements/HelixDropsEntitlement.js +0 -75
- package/node_modules/@twurple/api/lib/endpoints/entitlements/HelixEntitlementApi.d.ts +0 -68
- package/node_modules/@twurple/api/lib/endpoints/entitlements/HelixEntitlementApi.js +0 -122
- package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixEventSubApi.d.ts +0 -780
- package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixEventSubApi.js +0 -1150
- package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixEventSubConduit.d.ts +0 -32
- package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixEventSubConduit.js +0 -53
- package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixEventSubConduitShard.d.ts +0 -20
- package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixEventSubConduitShard.js +0 -29
- package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixEventSubSubscription.d.ts +0 -44
- package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixEventSubSubscription.js +0 -80
- package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixPaginatedEventSubSubscriptionsRequest.d.ts +0 -20
- package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixPaginatedEventSubSubscriptionsRequest.js +0 -40
- package/node_modules/@twurple/api/lib/endpoints/extensions/HelixExtensionBitsProduct.d.ts +0 -32
- package/node_modules/@twurple/api/lib/endpoints/extensions/HelixExtensionBitsProduct.js +0 -48
- package/node_modules/@twurple/api/lib/endpoints/extensions/HelixExtensionTransaction.d.ts +0 -69
- package/node_modules/@twurple/api/lib/endpoints/extensions/HelixExtensionTransaction.js +0 -111
- package/node_modules/@twurple/api/lib/endpoints/extensions/HelixExtensionsApi.d.ts +0 -84
- package/node_modules/@twurple/api/lib/endpoints/extensions/HelixExtensionsApi.js +0 -143
- package/node_modules/@twurple/api/lib/endpoints/game/HelixGame.d.ts +0 -47
- package/node_modules/@twurple/api/lib/endpoints/game/HelixGame.js +0 -71
- package/node_modules/@twurple/api/lib/endpoints/game/HelixGameApi.d.ts +0 -89
- package/node_modules/@twurple/api/lib/endpoints/game/HelixGameApi.js +0 -162
- package/node_modules/@twurple/api/lib/endpoints/goals/HelixGoal.d.ts +0 -49
- package/node_modules/@twurple/api/lib/endpoints/goals/HelixGoal.js +0 -81
- package/node_modules/@twurple/api/lib/endpoints/goals/HelixGoalApi.d.ts +0 -20
- package/node_modules/@twurple/api/lib/endpoints/goals/HelixGoalApi.js +0 -34
- package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrain.d.ts +0 -70
- package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrain.js +0 -112
- package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainAllTimeHigh.d.ts +0 -20
- package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainAllTimeHigh.js +0 -29
- package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainApi.d.ts +0 -26
- package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainApi.js +0 -37
- package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainContribution.d.ts +0 -33
- package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainContribution.js +0 -57
- package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainSharedParticipant.d.ts +0 -25
- package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainSharedParticipant.js +0 -45
- package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainStatus.d.ts +0 -22
- package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainStatus.js +0 -41
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixAutoModSettings.d.ts +0 -52
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixAutoModSettings.js +0 -77
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixAutoModStatus.d.ts +0 -16
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixAutoModStatus.js +0 -23
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixBan.d.ts +0 -29
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixBan.js +0 -48
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixBanUser.d.ts +0 -35
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixBanUser.js +0 -64
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixBlockedTerm.d.ts +0 -37
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixBlockedTerm.js +0 -54
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixModeratedChannel.d.ts +0 -30
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixModeratedChannel.js +0 -51
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixModerationApi.d.ts +0 -281
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixModerationApi.js +0 -580
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixModerator.d.ts +0 -25
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixModerator.js +0 -45
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixShieldModeStatus.d.ts +0 -33
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixShieldModeStatus.js +0 -57
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixUnbanRequest.d.ts +0 -83
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixUnbanRequest.js +0 -131
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixWarning.d.ts +0 -37
- package/node_modules/@twurple/api/lib/endpoints/moderation/HelixWarning.js +0 -63
- package/node_modules/@twurple/api/lib/endpoints/poll/HelixPoll.d.ts +0 -62
- package/node_modules/@twurple/api/lib/endpoints/poll/HelixPoll.js +0 -100
- package/node_modules/@twurple/api/lib/endpoints/poll/HelixPollApi.d.ts +0 -71
- package/node_modules/@twurple/api/lib/endpoints/poll/HelixPollApi.js +0 -130
- package/node_modules/@twurple/api/lib/endpoints/poll/HelixPollChoice.d.ts +0 -24
- package/node_modules/@twurple/api/lib/endpoints/poll/HelixPollChoice.js +0 -35
- package/node_modules/@twurple/api/lib/endpoints/prediction/HelixPrediction.d.ts +0 -66
- package/node_modules/@twurple/api/lib/endpoints/prediction/HelixPrediction.js +0 -115
- package/node_modules/@twurple/api/lib/endpoints/prediction/HelixPredictionApi.d.ts +0 -86
- package/node_modules/@twurple/api/lib/endpoints/prediction/HelixPredictionApi.js +0 -151
- package/node_modules/@twurple/api/lib/endpoints/prediction/HelixPredictionOutcome.d.ts +0 -33
- package/node_modules/@twurple/api/lib/endpoints/prediction/HelixPredictionOutcome.js +0 -58
- package/node_modules/@twurple/api/lib/endpoints/prediction/HelixPredictor.d.ts +0 -33
- package/node_modules/@twurple/api/lib/endpoints/prediction/HelixPredictor.js +0 -57
- package/node_modules/@twurple/api/lib/endpoints/raids/HelixRaid.d.ts +0 -16
- package/node_modules/@twurple/api/lib/endpoints/raids/HelixRaid.js +0 -23
- package/node_modules/@twurple/api/lib/endpoints/raids/HelixRaidApi.d.ts +0 -33
- package/node_modules/@twurple/api/lib/endpoints/raids/HelixRaidApi.js +0 -58
- package/node_modules/@twurple/api/lib/endpoints/schedule/HelixPaginatedScheduleSegmentRequest.d.ts +0 -9
- package/node_modules/@twurple/api/lib/endpoints/schedule/HelixPaginatedScheduleSegmentRequest.js +0 -31
- package/node_modules/@twurple/api/lib/endpoints/schedule/HelixSchedule.d.ts +0 -38
- package/node_modules/@twurple/api/lib/endpoints/schedule/HelixSchedule.js +0 -66
- package/node_modules/@twurple/api/lib/endpoints/schedule/HelixScheduleApi.d.ts +0 -95
- package/node_modules/@twurple/api/lib/endpoints/schedule/HelixScheduleApi.js +0 -171
- package/node_modules/@twurple/api/lib/endpoints/schedule/HelixScheduleSegment.d.ts +0 -45
- package/node_modules/@twurple/api/lib/endpoints/schedule/HelixScheduleSegment.js +0 -76
- package/node_modules/@twurple/api/lib/endpoints/search/HelixChannelSearchResult.d.ts +0 -58
- package/node_modules/@twurple/api/lib/endpoints/search/HelixChannelSearchResult.js +0 -95
- package/node_modules/@twurple/api/lib/endpoints/search/HelixSearchApi.d.ts +0 -59
- package/node_modules/@twurple/api/lib/endpoints/search/HelixSearchApi.js +0 -94
- package/node_modules/@twurple/api/lib/endpoints/stream/HelixStream.d.ts +0 -88
- package/node_modules/@twurple/api/lib/endpoints/stream/HelixStream.js +0 -137
- package/node_modules/@twurple/api/lib/endpoints/stream/HelixStreamApi.d.ts +0 -140
- package/node_modules/@twurple/api/lib/endpoints/stream/HelixStreamApi.js +0 -303
- package/node_modules/@twurple/api/lib/endpoints/stream/HelixStreamMarker.d.ts +0 -24
- package/node_modules/@twurple/api/lib/endpoints/stream/HelixStreamMarker.js +0 -45
- package/node_modules/@twurple/api/lib/endpoints/stream/HelixStreamMarkerWithVideo.d.ts +0 -23
- package/node_modules/@twurple/api/lib/endpoints/stream/HelixStreamMarkerWithVideo.js +0 -38
- package/node_modules/@twurple/api/lib/endpoints/subscriptions/HelixPaginatedSubscriptionsRequest.d.ts +0 -16
- package/node_modules/@twurple/api/lib/endpoints/subscriptions/HelixPaginatedSubscriptionsRequest.js +0 -34
- package/node_modules/@twurple/api/lib/endpoints/subscriptions/HelixSubscription.d.ts +0 -58
- package/node_modules/@twurple/api/lib/endpoints/subscriptions/HelixSubscription.js +0 -88
- package/node_modules/@twurple/api/lib/endpoints/subscriptions/HelixSubscriptionApi.d.ts +0 -66
- package/node_modules/@twurple/api/lib/endpoints/subscriptions/HelixSubscriptionApi.js +0 -119
- package/node_modules/@twurple/api/lib/endpoints/subscriptions/HelixUserSubscription.d.ts +0 -33
- package/node_modules/@twurple/api/lib/endpoints/subscriptions/HelixUserSubscription.js +0 -57
- package/node_modules/@twurple/api/lib/endpoints/team/HelixTeam.d.ts +0 -51
- package/node_modules/@twurple/api/lib/endpoints/team/HelixTeam.js +0 -84
- package/node_modules/@twurple/api/lib/endpoints/team/HelixTeamApi.d.ts +0 -43
- package/node_modules/@twurple/api/lib/endpoints/team/HelixTeamApi.js +0 -92
- package/node_modules/@twurple/api/lib/endpoints/team/HelixTeamWithUsers.d.ts +0 -14
- package/node_modules/@twurple/api/lib/endpoints/team/HelixTeamWithUsers.js +0 -21
- package/node_modules/@twurple/api/lib/endpoints/user/HelixFollow.d.ts +0 -45
- package/node_modules/@twurple/api/lib/endpoints/user/HelixFollow.js +0 -76
- package/node_modules/@twurple/api/lib/endpoints/user/HelixPrivilegedUser.d.ts +0 -19
- package/node_modules/@twurple/api/lib/endpoints/user/HelixPrivilegedUser.js +0 -28
- package/node_modules/@twurple/api/lib/endpoints/user/HelixUser.d.ts +0 -134
- package/node_modules/@twurple/api/lib/endpoints/user/HelixUser.js +0 -183
- package/node_modules/@twurple/api/lib/endpoints/user/HelixUserApi.d.ts +0 -137
- package/node_modules/@twurple/api/lib/endpoints/user/HelixUserApi.js +0 -280
- package/node_modules/@twurple/api/lib/endpoints/user/HelixUserBlock.d.ts +0 -25
- package/node_modules/@twurple/api/lib/endpoints/user/HelixUserBlock.js +0 -45
- package/node_modules/@twurple/api/lib/endpoints/user/extensions/HelixBaseExtension.d.ts +0 -18
- package/node_modules/@twurple/api/lib/endpoints/user/extensions/HelixBaseExtension.js +0 -22
- package/node_modules/@twurple/api/lib/endpoints/user/extensions/HelixInstalledExtension.d.ts +0 -20
- package/node_modules/@twurple/api/lib/endpoints/user/extensions/HelixInstalledExtension.js +0 -34
- package/node_modules/@twurple/api/lib/endpoints/user/extensions/HelixInstalledExtensionList.d.ts +0 -14
- package/node_modules/@twurple/api/lib/endpoints/user/extensions/HelixInstalledExtensionList.js +0 -26
- package/node_modules/@twurple/api/lib/endpoints/user/extensions/HelixUserExtension.d.ts +0 -18
- package/node_modules/@twurple/api/lib/endpoints/user/extensions/HelixUserExtension.js +0 -26
- package/node_modules/@twurple/api/lib/endpoints/video/HelixVideo.d.ts +0 -105
- package/node_modules/@twurple/api/lib/endpoints/video/HelixVideo.js +0 -195
- package/node_modules/@twurple/api/lib/endpoints/video/HelixVideoApi.d.ts +0 -85
- package/node_modules/@twurple/api/lib/endpoints/video/HelixVideoApi.js +0 -162
- package/node_modules/@twurple/api/lib/endpoints/whisper/HelixWhisperApi.d.ts +0 -36
- package/node_modules/@twurple/api/lib/endpoints/whisper/HelixWhisperApi.js +0 -53
- package/node_modules/@twurple/api/lib/errors/ChatMessageDroppedError.d.ts +0 -10
- package/node_modules/@twurple/api/lib/errors/ChatMessageDroppedError.js +0 -14
- package/node_modules/@twurple/api/lib/errors/ConfigError.d.ts +0 -7
- package/node_modules/@twurple/api/lib/errors/ConfigError.js +0 -6
- package/node_modules/@twurple/api/lib/errors/StreamNotLiveError.d.ts +0 -9
- package/node_modules/@twurple/api/lib/errors/StreamNotLiveError.js +0 -10
- package/node_modules/@twurple/api/lib/index.d.ts +0 -151
- package/node_modules/@twurple/api/lib/index.js +0 -111
- package/node_modules/@twurple/api/lib/interfaces/endpoints/bits.external.d.ts +0 -43
- package/node_modules/@twurple/api/lib/interfaces/endpoints/bits.external.js +0 -10
- package/node_modules/@twurple/api/lib/interfaces/endpoints/bits.input.d.ts +0 -30
- package/node_modules/@twurple/api/lib/interfaces/endpoints/bits.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/channel.external.d.ts +0 -58
- package/node_modules/@twurple/api/lib/interfaces/endpoints/channel.external.js +0 -42
- package/node_modules/@twurple/api/lib/interfaces/endpoints/channel.input.d.ts +0 -39
- package/node_modules/@twurple/api/lib/interfaces/endpoints/channel.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/channelPoints.external.d.ts +0 -74
- package/node_modules/@twurple/api/lib/interfaces/endpoints/channelPoints.external.js +0 -60
- package/node_modules/@twurple/api/lib/interfaces/endpoints/channelPoints.input.d.ts +0 -78
- package/node_modules/@twurple/api/lib/interfaces/endpoints/channelPoints.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/charity.external.d.ts +0 -28
- package/node_modules/@twurple/api/lib/interfaces/endpoints/charity.external.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/chat.external.d.ts +0 -114
- package/node_modules/@twurple/api/lib/interfaces/endpoints/chat.external.js +0 -52
- package/node_modules/@twurple/api/lib/interfaces/endpoints/chat.input.d.ts +0 -93
- package/node_modules/@twurple/api/lib/interfaces/endpoints/chat.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/clip.external.d.ts +0 -28
- package/node_modules/@twurple/api/lib/interfaces/endpoints/clip.external.js +0 -33
- package/node_modules/@twurple/api/lib/interfaces/endpoints/clip.input.d.ts +0 -85
- package/node_modules/@twurple/api/lib/interfaces/endpoints/clip.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/contentClassificationLabels.external.d.ts +0 -7
- package/node_modules/@twurple/api/lib/interfaces/endpoints/contentClassificationLabels.external.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/entitlement.external.d.ts +0 -24
- package/node_modules/@twurple/api/lib/interfaces/endpoints/entitlement.external.js +0 -17
- package/node_modules/@twurple/api/lib/interfaces/endpoints/entitlement.input.d.ts +0 -26
- package/node_modules/@twurple/api/lib/interfaces/endpoints/entitlement.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/eventSub.external.d.ts +0 -88
- package/node_modules/@twurple/api/lib/interfaces/endpoints/eventSub.external.js +0 -54
- package/node_modules/@twurple/api/lib/interfaces/endpoints/eventSub.input.d.ts +0 -66
- package/node_modules/@twurple/api/lib/interfaces/endpoints/eventSub.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/extensions.external.d.ts +0 -42
- package/node_modules/@twurple/api/lib/interfaces/endpoints/extensions.external.js +0 -28
- package/node_modules/@twurple/api/lib/interfaces/endpoints/extensions.input.d.ts +0 -47
- package/node_modules/@twurple/api/lib/interfaces/endpoints/extensions.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/game.external.d.ts +0 -8
- package/node_modules/@twurple/api/lib/interfaces/endpoints/game.external.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/generic.external.d.ts +0 -20
- package/node_modules/@twurple/api/lib/interfaces/endpoints/generic.external.js +0 -32
- package/node_modules/@twurple/api/lib/interfaces/endpoints/goal.external.d.ts +0 -14
- package/node_modules/@twurple/api/lib/interfaces/endpoints/goal.external.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/hypeTrain.external.d.ts +0 -52
- package/node_modules/@twurple/api/lib/interfaces/endpoints/hypeTrain.external.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/moderation.external.d.ts +0 -96
- package/node_modules/@twurple/api/lib/interfaces/endpoints/moderation.external.js +0 -81
- package/node_modules/@twurple/api/lib/interfaces/endpoints/moderation.input.d.ts +0 -65
- package/node_modules/@twurple/api/lib/interfaces/endpoints/moderation.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/poll.external.d.ts +0 -29
- package/node_modules/@twurple/api/lib/interfaces/endpoints/poll.external.js +0 -20
- package/node_modules/@twurple/api/lib/interfaces/endpoints/poll.input.d.ts +0 -22
- package/node_modules/@twurple/api/lib/interfaces/endpoints/poll.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/prediction.external.d.ts +0 -38
- package/node_modules/@twurple/api/lib/interfaces/endpoints/prediction.external.js +0 -19
- package/node_modules/@twurple/api/lib/interfaces/endpoints/prediction.input.d.ts +0 -18
- package/node_modules/@twurple/api/lib/interfaces/endpoints/prediction.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/raid.external.d.ts +0 -6
- package/node_modules/@twurple/api/lib/interfaces/endpoints/raid.external.js +0 -8
- package/node_modules/@twurple/api/lib/interfaces/endpoints/schedule.external.d.ts +0 -36
- package/node_modules/@twurple/api/lib/interfaces/endpoints/schedule.external.js +0 -54
- package/node_modules/@twurple/api/lib/interfaces/endpoints/schedule.input.d.ts +0 -125
- package/node_modules/@twurple/api/lib/interfaces/endpoints/schedule.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/search.external.d.ts +0 -15
- package/node_modules/@twurple/api/lib/interfaces/endpoints/search.external.js +0 -7
- package/node_modules/@twurple/api/lib/interfaces/endpoints/search.input.d.ts +0 -14
- package/node_modules/@twurple/api/lib/interfaces/endpoints/search.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/shared-chat-session.external.d.ts +0 -13
- package/node_modules/@twurple/api/lib/interfaces/endpoints/shared-chat-session.external.js +0 -7
- package/node_modules/@twurple/api/lib/interfaces/endpoints/stream.external.d.ts +0 -52
- package/node_modules/@twurple/api/lib/interfaces/endpoints/stream.external.js +0 -24
- package/node_modules/@twurple/api/lib/interfaces/endpoints/stream.input.d.ts +0 -33
- package/node_modules/@twurple/api/lib/interfaces/endpoints/stream.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/subscription.external.d.ts +0 -25
- package/node_modules/@twurple/api/lib/interfaces/endpoints/subscription.external.js +0 -8
- package/node_modules/@twurple/api/lib/interfaces/endpoints/subscription.input.d.ts +0 -12
- package/node_modules/@twurple/api/lib/interfaces/endpoints/subscription.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/team.external.d.ts +0 -18
- package/node_modules/@twurple/api/lib/interfaces/endpoints/team.external.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/user.external.d.ts +0 -41
- package/node_modules/@twurple/api/lib/interfaces/endpoints/user.external.js +0 -15
- package/node_modules/@twurple/api/lib/interfaces/endpoints/user.input.d.ts +0 -20
- package/node_modules/@twurple/api/lib/interfaces/endpoints/user.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/userExtension.external.d.ts +0 -34
- package/node_modules/@twurple/api/lib/interfaces/endpoints/userExtension.external.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/userExtension.input.d.ts +0 -48
- package/node_modules/@twurple/api/lib/interfaces/endpoints/userExtension.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/video.external.d.ts +0 -38
- package/node_modules/@twurple/api/lib/interfaces/endpoints/video.external.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/video.input.d.ts +0 -29
- package/node_modules/@twurple/api/lib/interfaces/endpoints/video.input.js +0 -1
- package/node_modules/@twurple/api/lib/interfaces/endpoints/whisper.external.d.ts +0 -2
- package/node_modules/@twurple/api/lib/interfaces/endpoints/whisper.external.js +0 -8
- package/node_modules/@twurple/api/lib/relations/HelixUserRelation.d.ts +0 -25
- package/node_modules/@twurple/api/lib/relations/HelixUserRelation.js +0 -45
- package/node_modules/@twurple/api/lib/reporting/ApiReportedRequest.d.ts +0 -22
- package/node_modules/@twurple/api/lib/reporting/ApiReportedRequest.js +0 -32
- package/node_modules/@twurple/api/lib/utils/HelixRateLimiter.d.ts +0 -2
- package/node_modules/@twurple/api/lib/utils/HelixRateLimiter.js +0 -23
- package/node_modules/@twurple/api/lib/utils/HelixRequestBatcher.d.ts +0 -2
- package/node_modules/@twurple/api/lib/utils/HelixRequestBatcher.js +0 -95
- package/node_modules/@twurple/api/lib/utils/pagination/HelixPaginatedRequest.d.ts +0 -49
- package/node_modules/@twurple/api/lib/utils/pagination/HelixPaginatedRequest.js +0 -140
- package/node_modules/@twurple/api/lib/utils/pagination/HelixPaginatedRequestWithTotal.d.ts +0 -13
- package/node_modules/@twurple/api/lib/utils/pagination/HelixPaginatedRequestWithTotal.js +0 -22
- package/node_modules/@twurple/api/lib/utils/pagination/HelixPaginatedResult.d.ts +0 -31
- package/node_modules/@twurple/api/lib/utils/pagination/HelixPaginatedResult.js +0 -19
- package/node_modules/@twurple/api/lib/utils/pagination/HelixPagination.d.ts +0 -25
- package/node_modules/@twurple/api/lib/utils/pagination/HelixPagination.js +0 -8
- package/node_modules/@twurple/api/package.json +0 -60
- package/node_modules/retry/License +0 -21
- package/node_modules/retry/README.md +0 -227
- package/node_modules/retry/example/dns.js +0 -31
- package/node_modules/retry/example/stop.js +0 -40
- package/node_modules/retry/index.js +0 -1
- package/node_modules/retry/lib/retry.js +0 -100
- package/node_modules/retry/lib/retry_operation.js +0 -162
- package/node_modules/retry/package.json +0 -36
|
@@ -1,1150 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { mapOptional } from '@d-fischer/shared-utils';
|
|
3
|
-
import { extractUserId, rtfm } from '@twurple/common';
|
|
4
|
-
import { createEventSubBroadcasterCondition, createEventSubDropEntitlementGrantCondition, createEventSubModeratorCondition, createEventSubRewardCondition, createEventSubUserCondition, createEventSubConduitCondition, createEventSubConduitUpdateCondition, createEventSubConduitShardsUpdateCondition, } from '../../interfaces/endpoints/eventSub.external.js';
|
|
5
|
-
import { createSingleKeyQuery } from '../../interfaces/endpoints/generic.external.js';
|
|
6
|
-
import { HelixPaginatedRequest } from '../../utils/pagination/HelixPaginatedRequest.js';
|
|
7
|
-
import { createPaginatedResultWithTotal, createPaginatedResult } from '../../utils/pagination/HelixPaginatedResult.js';
|
|
8
|
-
import { createPaginationQuery } from '../../utils/pagination/HelixPagination.js';
|
|
9
|
-
import { BaseApi } from '../BaseApi.js';
|
|
10
|
-
import { HelixEventSubSubscription } from './HelixEventSubSubscription.js';
|
|
11
|
-
import { HelixPaginatedEventSubSubscriptionsRequest } from './HelixPaginatedEventSubSubscriptionsRequest.js';
|
|
12
|
-
import { HelixEventSubConduit } from './HelixEventSubConduit.js';
|
|
13
|
-
import { HelixEventSubConduitShard } from './HelixEventSubConduitShard.js';
|
|
14
|
-
/**
|
|
15
|
-
* The API methods that deal with EventSub.
|
|
16
|
-
*
|
|
17
|
-
* Can be accessed using `client.eventSub` on an {@link ApiClient} instance.
|
|
18
|
-
*
|
|
19
|
-
* ## Before using these methods...
|
|
20
|
-
*
|
|
21
|
-
* All methods in this class assume that you are already running a working EventSub listener reachable using the given transport.
|
|
22
|
-
*
|
|
23
|
-
* If you don't already have one, we recommend use of the `@twurple/eventsub-http` or `@twurple/eventsub-ws` libraries,
|
|
24
|
-
* which handle subscribing and unsubscribing to these topics automatically.
|
|
25
|
-
*
|
|
26
|
-
* ## Example
|
|
27
|
-
* ```ts
|
|
28
|
-
* const api = new ApiClient({ authProvider });
|
|
29
|
-
* await api.eventSub.subscribeToUserFollowsTo('125328655', { callbackUrl: 'https://example.com' });
|
|
30
|
-
* ```
|
|
31
|
-
*
|
|
32
|
-
* @meta category helix
|
|
33
|
-
* @meta categorizedTitle EventSub
|
|
34
|
-
*/
|
|
35
|
-
let HelixEventSubApi = class HelixEventSubApi extends BaseApi {
|
|
36
|
-
/**
|
|
37
|
-
* Gets the current EventSub subscriptions for the current client.
|
|
38
|
-
*
|
|
39
|
-
* @param pagination
|
|
40
|
-
*
|
|
41
|
-
* @expandParams
|
|
42
|
-
*/
|
|
43
|
-
async getSubscriptions(pagination) {
|
|
44
|
-
const result = await this._client.callApi({
|
|
45
|
-
type: 'helix',
|
|
46
|
-
url: 'eventsub/subscriptions',
|
|
47
|
-
query: createPaginationQuery(pagination),
|
|
48
|
-
});
|
|
49
|
-
return {
|
|
50
|
-
...createPaginatedResultWithTotal(result, HelixEventSubSubscription, this._client),
|
|
51
|
-
totalCost: result.total_cost,
|
|
52
|
-
maxTotalCost: result.max_total_cost,
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Creates a paginator for the current EventSub subscriptions for the current client.
|
|
57
|
-
*/
|
|
58
|
-
getSubscriptionsPaginated() {
|
|
59
|
-
return new HelixPaginatedEventSubSubscriptionsRequest({}, undefined, this._client);
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Gets the current EventSub subscriptions with the given status for the current client.
|
|
63
|
-
*
|
|
64
|
-
* @param status The status of the subscriptions to get.
|
|
65
|
-
* @param pagination
|
|
66
|
-
*
|
|
67
|
-
* @expandParams
|
|
68
|
-
*/
|
|
69
|
-
async getSubscriptionsForStatus(status, pagination) {
|
|
70
|
-
const result = await this._client.callApi({
|
|
71
|
-
type: 'helix',
|
|
72
|
-
url: 'eventsub/subscriptions',
|
|
73
|
-
query: {
|
|
74
|
-
...createPaginationQuery(pagination),
|
|
75
|
-
status,
|
|
76
|
-
},
|
|
77
|
-
});
|
|
78
|
-
return {
|
|
79
|
-
...createPaginatedResultWithTotal(result, HelixEventSubSubscription, this._client),
|
|
80
|
-
totalCost: result.total_cost,
|
|
81
|
-
maxTotalCost: result.max_total_cost,
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Creates a paginator for the current EventSub subscriptions with the given status for the current client.
|
|
86
|
-
*
|
|
87
|
-
* @param status The status of the subscriptions to get.
|
|
88
|
-
*/
|
|
89
|
-
getSubscriptionsForStatusPaginated(status) {
|
|
90
|
-
return new HelixPaginatedEventSubSubscriptionsRequest({ status }, undefined, this._client);
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Gets the current EventSub subscriptions with the given type for the current client.
|
|
94
|
-
*
|
|
95
|
-
* @param type The type of the subscriptions to get.
|
|
96
|
-
* @param pagination
|
|
97
|
-
*
|
|
98
|
-
* @expandParams
|
|
99
|
-
*/
|
|
100
|
-
async getSubscriptionsForType(type, pagination) {
|
|
101
|
-
const result = await this._client.callApi({
|
|
102
|
-
type: 'helix',
|
|
103
|
-
url: 'eventsub/subscriptions',
|
|
104
|
-
query: {
|
|
105
|
-
...createPaginationQuery(pagination),
|
|
106
|
-
type,
|
|
107
|
-
},
|
|
108
|
-
});
|
|
109
|
-
return {
|
|
110
|
-
...createPaginatedResultWithTotal(result, HelixEventSubSubscription, this._client),
|
|
111
|
-
totalCost: result.total_cost,
|
|
112
|
-
maxTotalCost: result.max_total_cost,
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Creates a paginator for the current EventSub subscriptions with the given type for the current client.
|
|
117
|
-
*
|
|
118
|
-
* @param type The type of the subscriptions to get.
|
|
119
|
-
*/
|
|
120
|
-
getSubscriptionsForTypePaginated(type) {
|
|
121
|
-
return new HelixPaginatedEventSubSubscriptionsRequest({ type }, undefined, this._client);
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Gets the current EventSub subscriptions for the current user and client.
|
|
125
|
-
*
|
|
126
|
-
* @param user The user to get subscriptions for.
|
|
127
|
-
* @param pagination
|
|
128
|
-
*
|
|
129
|
-
* @expandParams
|
|
130
|
-
*/
|
|
131
|
-
async getSubscriptionsForUser(user, pagination) {
|
|
132
|
-
const result = await this._client.callApi({
|
|
133
|
-
type: 'helix',
|
|
134
|
-
url: 'eventsub/subscriptions',
|
|
135
|
-
userId: extractUserId(user),
|
|
136
|
-
query: {
|
|
137
|
-
...createSingleKeyQuery('user_id', extractUserId(user)),
|
|
138
|
-
...createPaginationQuery(pagination),
|
|
139
|
-
},
|
|
140
|
-
});
|
|
141
|
-
return {
|
|
142
|
-
...createPaginatedResultWithTotal(result, HelixEventSubSubscription, this._client),
|
|
143
|
-
totalCost: result.total_cost,
|
|
144
|
-
maxTotalCost: result.max_total_cost,
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Creates a paginator for the current EventSub subscriptions with the given type for the current client.
|
|
149
|
-
*
|
|
150
|
-
* @param user The user to get subscriptions for.
|
|
151
|
-
*/
|
|
152
|
-
getSubscriptionsForUserPaginated(user) {
|
|
153
|
-
const userId = extractUserId(user);
|
|
154
|
-
return new HelixPaginatedEventSubSubscriptionsRequest(createSingleKeyQuery('user_id', userId), userId, this._client);
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Sends an arbitrary request to subscribe to an event.
|
|
158
|
-
*
|
|
159
|
-
* You can only create WebHook transport subscriptions using app tokens
|
|
160
|
-
* and WebSocket transport subscriptions using user tokens.
|
|
161
|
-
*
|
|
162
|
-
* @param type The type of the event.
|
|
163
|
-
* @param version The version of the event.
|
|
164
|
-
* @param condition The condition of the subscription.
|
|
165
|
-
* @param transport The transport of the subscription.
|
|
166
|
-
* @param user The user to create the subscription in context of.
|
|
167
|
-
* @param requiredScopeSet The scope set required by the subscription. Will only be checked for applicable transports.
|
|
168
|
-
* @param canOverrideScopedUserContext Whether the auth user context can be overridden.
|
|
169
|
-
* @param isBatched Whether to enable batching for the subscription. Is only supported for select topics.
|
|
170
|
-
*/
|
|
171
|
-
async createSubscription(type, version, condition, transport, user, requiredScopeSet, canOverrideScopedUserContext, isBatched) {
|
|
172
|
-
const usesAppAuth = transport.method === 'webhook' || transport.method === 'conduit';
|
|
173
|
-
const scopes = usesAppAuth ? undefined : requiredScopeSet;
|
|
174
|
-
if (!usesAppAuth && !user) {
|
|
175
|
-
throw new Error(`Transport ${transport.method} can only handle subscriptions with user context`);
|
|
176
|
-
}
|
|
177
|
-
const jsonBody = {
|
|
178
|
-
type,
|
|
179
|
-
version,
|
|
180
|
-
condition,
|
|
181
|
-
transport,
|
|
182
|
-
};
|
|
183
|
-
if (isBatched) {
|
|
184
|
-
jsonBody.is_batching_enabled = true;
|
|
185
|
-
}
|
|
186
|
-
const result = await this._client.callApi({
|
|
187
|
-
type: 'helix',
|
|
188
|
-
url: 'eventsub/subscriptions',
|
|
189
|
-
method: 'POST',
|
|
190
|
-
scopes,
|
|
191
|
-
userId: mapOptional(user, extractUserId),
|
|
192
|
-
canOverrideScopedUserContext,
|
|
193
|
-
forceType: usesAppAuth ? 'app' : 'user',
|
|
194
|
-
jsonBody,
|
|
195
|
-
});
|
|
196
|
-
return new HelixEventSubSubscription(result.data[0], this._client);
|
|
197
|
-
}
|
|
198
|
-
/**
|
|
199
|
-
* Deletes a subscription.
|
|
200
|
-
*
|
|
201
|
-
* @param id The ID of the subscription.
|
|
202
|
-
*/
|
|
203
|
-
async deleteSubscription(id) {
|
|
204
|
-
await this._client.callApi({
|
|
205
|
-
type: 'helix',
|
|
206
|
-
url: 'eventsub/subscriptions',
|
|
207
|
-
method: 'DELETE',
|
|
208
|
-
query: {
|
|
209
|
-
id,
|
|
210
|
-
},
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* Deletes *all* subscriptions.
|
|
215
|
-
*/
|
|
216
|
-
async deleteAllSubscriptions() {
|
|
217
|
-
await this._deleteSubscriptionsWithCondition();
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* Deletes all broken subscriptions, i.e. all that are not enabled or pending verification.
|
|
221
|
-
*/
|
|
222
|
-
async deleteBrokenSubscriptions() {
|
|
223
|
-
await this._deleteSubscriptionsWithCondition(sub => sub.status !== 'enabled' && sub.status !== 'webhook_callback_verification_pending');
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* Subscribe to events that represent a stream going live.
|
|
227
|
-
*
|
|
228
|
-
* @param broadcaster The broadcaster you want to listen to online events for.
|
|
229
|
-
* @param transport The transport options.
|
|
230
|
-
*/
|
|
231
|
-
async subscribeToStreamOnlineEvents(broadcaster, transport) {
|
|
232
|
-
return await this.createSubscription('stream.online', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster);
|
|
233
|
-
}
|
|
234
|
-
/**
|
|
235
|
-
* Subscribe to events that represent a stream going offline.
|
|
236
|
-
*
|
|
237
|
-
* @param broadcaster The broadcaster you want to listen to online events for.
|
|
238
|
-
* @param transport The transport options.
|
|
239
|
-
*/
|
|
240
|
-
async subscribeToStreamOfflineEvents(broadcaster, transport) {
|
|
241
|
-
return await this.createSubscription('stream.offline', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster);
|
|
242
|
-
}
|
|
243
|
-
/**
|
|
244
|
-
* Subscribe to events that represent a channel updating their metadata.
|
|
245
|
-
*
|
|
246
|
-
* @param broadcaster The broadcaster you want to listen to update events for.
|
|
247
|
-
* @param transport The transport options.
|
|
248
|
-
*/
|
|
249
|
-
async subscribeToChannelUpdateEvents(broadcaster, transport) {
|
|
250
|
-
return await this.createSubscription('channel.update', '2', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster);
|
|
251
|
-
}
|
|
252
|
-
/**
|
|
253
|
-
* Subscribe to events that represent a user following a channel.
|
|
254
|
-
*
|
|
255
|
-
* @param broadcaster The broadcaster you want to listen to follow events for.
|
|
256
|
-
* @param transport The transport options.
|
|
257
|
-
*/
|
|
258
|
-
async subscribeToChannelFollowEvents(broadcaster, transport) {
|
|
259
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
260
|
-
return await this.createSubscription('channel.follow', '2', createEventSubModeratorCondition(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcasterId, ['moderator:read:followers'], true);
|
|
261
|
-
}
|
|
262
|
-
/**
|
|
263
|
-
* Subscribe to events that represent a user subscribing to a channel.
|
|
264
|
-
*
|
|
265
|
-
* @param broadcaster The broadcaster you want to listen to subscribe events for.
|
|
266
|
-
* @param transport The transport options.
|
|
267
|
-
*/
|
|
268
|
-
async subscribeToChannelSubscriptionEvents(broadcaster, transport) {
|
|
269
|
-
return await this.createSubscription('channel.subscribe', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:subscriptions']);
|
|
270
|
-
}
|
|
271
|
-
/**
|
|
272
|
-
* Subscribe to events that represent a user gifting another user a subscription to a channel.
|
|
273
|
-
*
|
|
274
|
-
* @param broadcaster The broadcaster you want to listen to subscription gift events for.
|
|
275
|
-
* @param transport The transport options.
|
|
276
|
-
*/
|
|
277
|
-
async subscribeToChannelSubscriptionGiftEvents(broadcaster, transport) {
|
|
278
|
-
return await this.createSubscription('channel.subscription.gift', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:subscriptions']);
|
|
279
|
-
}
|
|
280
|
-
/**
|
|
281
|
-
* Subscribe to events that represent a user's subscription to a channel being announced.
|
|
282
|
-
*
|
|
283
|
-
* @param broadcaster The broadcaster you want to listen to subscription message events for.
|
|
284
|
-
* @param transport The transport options.
|
|
285
|
-
*/
|
|
286
|
-
async subscribeToChannelSubscriptionMessageEvents(broadcaster, transport) {
|
|
287
|
-
return await this.createSubscription('channel.subscription.message', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:subscriptions']);
|
|
288
|
-
}
|
|
289
|
-
/**
|
|
290
|
-
* Subscribe to events that represent a user's subscription to a channel ending.
|
|
291
|
-
*
|
|
292
|
-
* @param broadcaster The broadcaster you want to listen to subscription end events for.
|
|
293
|
-
* @param transport The transport options.
|
|
294
|
-
*/
|
|
295
|
-
async subscribeToChannelSubscriptionEndEvents(broadcaster, transport) {
|
|
296
|
-
return await this.createSubscription('channel.subscription.end', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:subscriptions']);
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* Subscribe to events that represent a user cheering bits to a channel.
|
|
300
|
-
*
|
|
301
|
-
* @param broadcaster The broadcaster you want to listen to cheer events for.
|
|
302
|
-
* @param transport The transport options.
|
|
303
|
-
*/
|
|
304
|
-
async subscribeToChannelCheerEvents(broadcaster, transport) {
|
|
305
|
-
return await this.createSubscription('channel.cheer', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['bits:read']);
|
|
306
|
-
}
|
|
307
|
-
/**
|
|
308
|
-
* Subscribe to events that represent a charity campaign starting in a channel.
|
|
309
|
-
*
|
|
310
|
-
* @param broadcaster The broadcaster you want to listen to charity donation events for.
|
|
311
|
-
* @param transport The transport options.
|
|
312
|
-
*/
|
|
313
|
-
async subscribeToChannelCharityCampaignStartEvents(broadcaster, transport) {
|
|
314
|
-
return await this.createSubscription('channel.charity_campaign.start', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:charity']);
|
|
315
|
-
}
|
|
316
|
-
/**
|
|
317
|
-
* Subscribe to events that represent a charity campaign ending in a channel.
|
|
318
|
-
*
|
|
319
|
-
* @param broadcaster The broadcaster you want to listen to charity donation events for.
|
|
320
|
-
* @param transport The transport options.
|
|
321
|
-
*/
|
|
322
|
-
async subscribeToChannelCharityCampaignStopEvents(broadcaster, transport) {
|
|
323
|
-
return await this.createSubscription('channel.charity_campaign.stop', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:charity']);
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* Subscribe to events that represent a user donating to a charity campaign in a channel.
|
|
327
|
-
*
|
|
328
|
-
* @param broadcaster The broadcaster you want to listen to charity donation events for.
|
|
329
|
-
* @param transport The transport options.
|
|
330
|
-
*/
|
|
331
|
-
async subscribeToChannelCharityDonationEvents(broadcaster, transport) {
|
|
332
|
-
return await this.createSubscription('channel.charity_campaign.donate', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:charity']);
|
|
333
|
-
}
|
|
334
|
-
/**
|
|
335
|
-
* Subscribe to events that represent a charity campaign progressing in a channel.
|
|
336
|
-
*
|
|
337
|
-
* @param broadcaster The broadcaster you want to listen to charity donation events for.
|
|
338
|
-
* @param transport The transport options.
|
|
339
|
-
*/
|
|
340
|
-
async subscribeToChannelCharityCampaignProgressEvents(broadcaster, transport) {
|
|
341
|
-
return await this.createSubscription('channel.charity_campaign.progress', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:charity']);
|
|
342
|
-
}
|
|
343
|
-
/**
|
|
344
|
-
* Subscribe to events that represent a user being banned in a channel.
|
|
345
|
-
*
|
|
346
|
-
* @param broadcaster The broadcaster you want to listen to ban events for.
|
|
347
|
-
* @param transport The transport options.
|
|
348
|
-
*/
|
|
349
|
-
async subscribeToChannelBanEvents(broadcaster, transport) {
|
|
350
|
-
return await this.createSubscription('channel.ban', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:moderate']);
|
|
351
|
-
}
|
|
352
|
-
/**
|
|
353
|
-
* Subscribe to events that represent a user being unbanned in a channel.
|
|
354
|
-
*
|
|
355
|
-
* @param broadcaster The broadcaster you want to listen to unban events for.
|
|
356
|
-
* @param transport The transport options.
|
|
357
|
-
*/
|
|
358
|
-
async subscribeToChannelUnbanEvents(broadcaster, transport) {
|
|
359
|
-
return await this.createSubscription('channel.unban', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:moderate']);
|
|
360
|
-
}
|
|
361
|
-
/**
|
|
362
|
-
* Subscribe to events that represent Shield Mode being activated in a channel.
|
|
363
|
-
*
|
|
364
|
-
* @param broadcaster The broadcaster you want to listen to Shield Mode activation events for.
|
|
365
|
-
* @param transport The transport options.
|
|
366
|
-
*/
|
|
367
|
-
async subscribeToChannelShieldModeBeginEvents(broadcaster, transport) {
|
|
368
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
369
|
-
return await this.createSubscription('channel.shield_mode.begin', '1', createEventSubModeratorCondition(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcasterId, ['moderator:read:shield_mode', 'moderator:manage:shield_mode'], true);
|
|
370
|
-
}
|
|
371
|
-
/**
|
|
372
|
-
* Subscribe to events that represent Shield Mode being deactivated in a channel.
|
|
373
|
-
*
|
|
374
|
-
* @param broadcaster The broadcaster you want to listen to Shield Mode deactivation events for.
|
|
375
|
-
* @param transport The transport options.
|
|
376
|
-
*/
|
|
377
|
-
async subscribeToChannelShieldModeEndEvents(broadcaster, transport) {
|
|
378
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
379
|
-
return await this.createSubscription('channel.shield_mode.end', '1', createEventSubModeratorCondition(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcasterId, ['moderator:read:shield_mode', 'moderator:manage:shield_mode'], true);
|
|
380
|
-
}
|
|
381
|
-
/**
|
|
382
|
-
* Subscribe to events that represent a moderator being added to a channel.
|
|
383
|
-
*
|
|
384
|
-
* @param broadcaster The broadcaster you want to listen for moderator add events for.
|
|
385
|
-
* @param transport The transport options.
|
|
386
|
-
*/
|
|
387
|
-
async subscribeToChannelModeratorAddEvents(broadcaster, transport) {
|
|
388
|
-
return await this.createSubscription('channel.moderator.add', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['moderation:read']);
|
|
389
|
-
}
|
|
390
|
-
/**
|
|
391
|
-
* Subscribe to events that represent a moderator being removed from a channel.
|
|
392
|
-
*
|
|
393
|
-
* @param broadcaster The broadcaster you want to listen for moderator remove events for.
|
|
394
|
-
* @param transport The transport options.
|
|
395
|
-
*/
|
|
396
|
-
async subscribeToChannelModeratorRemoveEvents(broadcaster, transport) {
|
|
397
|
-
return await this.createSubscription('channel.moderator.remove', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['moderation:read']);
|
|
398
|
-
}
|
|
399
|
-
/**
|
|
400
|
-
* Subscribe to events that represent a broadcaster raiding another broadcaster.
|
|
401
|
-
*
|
|
402
|
-
* @param broadcaster The broadcaster you want to listen to outgoing raid events for.
|
|
403
|
-
* @param transport The transport options.
|
|
404
|
-
*/
|
|
405
|
-
async subscribeToChannelRaidEventsFrom(broadcaster, transport) {
|
|
406
|
-
return await this.createSubscription('channel.raid', '1', createSingleKeyQuery('from_broadcaster_user_id', extractUserId(broadcaster)), transport, broadcaster);
|
|
407
|
-
}
|
|
408
|
-
/**
|
|
409
|
-
* Subscribe to events that represent a broadcaster being raided by another broadcaster.
|
|
410
|
-
*
|
|
411
|
-
* @param broadcaster The broadcaster you want to listen to incoming raid events for.
|
|
412
|
-
* @param transport The transport options.
|
|
413
|
-
*/
|
|
414
|
-
async subscribeToChannelRaidEventsTo(broadcaster, transport) {
|
|
415
|
-
return await this.createSubscription('channel.raid', '1', createSingleKeyQuery('to_broadcaster_user_id', extractUserId(broadcaster)), transport, broadcaster);
|
|
416
|
-
}
|
|
417
|
-
/**
|
|
418
|
-
* Subscribe to events that represent a Channel Points reward being added to a channel.
|
|
419
|
-
*
|
|
420
|
-
* @param broadcaster The broadcaster you want to listen to reward add events for.
|
|
421
|
-
* @param transport The transport options.
|
|
422
|
-
*/
|
|
423
|
-
async subscribeToChannelRewardAddEvents(broadcaster, transport) {
|
|
424
|
-
return await this.createSubscription('channel.channel_points_custom_reward.add', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:redemptions', 'channel:manage:redemptions']);
|
|
425
|
-
}
|
|
426
|
-
/**
|
|
427
|
-
* Subscribe to events that represent a Channel Points reward being updated in a channel.
|
|
428
|
-
*
|
|
429
|
-
* @param broadcaster The broadcaster you want to listen to reward update events for.
|
|
430
|
-
* @param transport The transport options.
|
|
431
|
-
*/
|
|
432
|
-
async subscribeToChannelRewardUpdateEvents(broadcaster, transport) {
|
|
433
|
-
return await this.createSubscription('channel.channel_points_custom_reward.update', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:redemptions', 'channel:manage:redemptions']);
|
|
434
|
-
}
|
|
435
|
-
/**
|
|
436
|
-
* Subscribe to events that represent a specific Channel Points reward being updated.
|
|
437
|
-
*
|
|
438
|
-
* @param broadcaster The broadcaster you want to listen to reward update events for.
|
|
439
|
-
* @param rewardId The ID of the reward you want to listen to update events for.
|
|
440
|
-
* @param transport The transport options.
|
|
441
|
-
*/
|
|
442
|
-
async subscribeToChannelRewardUpdateEventsForReward(broadcaster, rewardId, transport) {
|
|
443
|
-
return await this.createSubscription('channel.channel_points_custom_reward.update', '1', createEventSubRewardCondition(broadcaster, rewardId), transport, broadcaster, ['channel:read:redemptions', 'channel:manage:redemptions']);
|
|
444
|
-
}
|
|
445
|
-
/**
|
|
446
|
-
* Subscribe to events that represent a Channel Points reward being removed from a channel.
|
|
447
|
-
*
|
|
448
|
-
* @param broadcaster The broadcaster you want to listen to reward remove events for.
|
|
449
|
-
* @param transport The transport options.
|
|
450
|
-
*/
|
|
451
|
-
async subscribeToChannelRewardRemoveEvents(broadcaster, transport) {
|
|
452
|
-
return await this.createSubscription('channel.channel_points_custom_reward.remove', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:redemptions', 'channel:manage:redemptions']);
|
|
453
|
-
}
|
|
454
|
-
/**
|
|
455
|
-
* Subscribe to events that represent a specific Channel Points reward being removed from a channel.
|
|
456
|
-
*
|
|
457
|
-
* @param broadcaster The broadcaster you want to listen to reward remove events for.
|
|
458
|
-
* @param rewardId The ID of the reward you want to listen to remove events for.
|
|
459
|
-
* @param transport The transport options.
|
|
460
|
-
*/
|
|
461
|
-
async subscribeToChannelRewardRemoveEventsForReward(broadcaster, rewardId, transport) {
|
|
462
|
-
return await this.createSubscription('channel.channel_points_custom_reward.remove', '1', createEventSubRewardCondition(broadcaster, rewardId), transport, broadcaster, ['channel:read:redemptions', 'channel:manage:redemptions']);
|
|
463
|
-
}
|
|
464
|
-
/**
|
|
465
|
-
* Subscribe to events that represent a Channel Points reward being redeemed.
|
|
466
|
-
*
|
|
467
|
-
* @param broadcaster The broadcaster you want to listen to redemption events for.
|
|
468
|
-
* @param transport The transport options.
|
|
469
|
-
*/
|
|
470
|
-
async subscribeToChannelRedemptionAddEvents(broadcaster, transport) {
|
|
471
|
-
return await this.createSubscription('channel.channel_points_custom_reward_redemption.add', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:redemptions', 'channel:manage:redemptions']);
|
|
472
|
-
}
|
|
473
|
-
/**
|
|
474
|
-
* Subscribe to events that represent a specific Channel Points reward being redeemed.
|
|
475
|
-
*
|
|
476
|
-
* @param broadcaster The broadcaster you want to listen to redemption events for.
|
|
477
|
-
* @param rewardId The ID of the reward you want to listen to redemption events for.
|
|
478
|
-
* @param transport The transport options.
|
|
479
|
-
*/
|
|
480
|
-
async subscribeToChannelRedemptionAddEventsForReward(broadcaster, rewardId, transport) {
|
|
481
|
-
return await this.createSubscription('channel.channel_points_custom_reward_redemption.add', '1', createEventSubRewardCondition(broadcaster, rewardId), transport, broadcaster, ['channel:read:redemptions', 'channel:manage:redemptions']);
|
|
482
|
-
}
|
|
483
|
-
/**
|
|
484
|
-
* Subscribe to events that represent a Channel Points redemption being updated.
|
|
485
|
-
*
|
|
486
|
-
* @param broadcaster The broadcaster you want to listen to redemption update events for.
|
|
487
|
-
* @param transport The transport options.
|
|
488
|
-
*/
|
|
489
|
-
async subscribeToChannelRedemptionUpdateEvents(broadcaster, transport) {
|
|
490
|
-
return await this.createSubscription('channel.channel_points_custom_reward_redemption.update', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:redemptions', 'channel:manage:redemptions']);
|
|
491
|
-
}
|
|
492
|
-
/**
|
|
493
|
-
* Subscribe to events that represent a specific Channel Points reward's redemption being updated.
|
|
494
|
-
*
|
|
495
|
-
* @param broadcaster The broadcaster you want to listen to redemption update events for.
|
|
496
|
-
* @param rewardId The ID of the reward you want to listen to redemption updates for.
|
|
497
|
-
* @param transport The transport options.
|
|
498
|
-
*/
|
|
499
|
-
async subscribeToChannelRedemptionUpdateEventsForReward(broadcaster, rewardId, transport) {
|
|
500
|
-
return await this.createSubscription('channel.channel_points_custom_reward_redemption.update', '1', createEventSubRewardCondition(broadcaster, rewardId), transport, broadcaster, ['channel:read:redemptions', 'channel:manage:redemptions']);
|
|
501
|
-
}
|
|
502
|
-
/**
|
|
503
|
-
* Subscribe to events that represent a Channel Points automatic reward being redeemed.
|
|
504
|
-
*
|
|
505
|
-
* @param broadcaster The broadcaster you want to listen to automatic reward redemption events for.
|
|
506
|
-
* @param transport The transport options.
|
|
507
|
-
*/
|
|
508
|
-
async subscribeToChannelAutomaticRewardRedemptionAddEvents(broadcaster, transport) {
|
|
509
|
-
return await this.createSubscription('channel.channel_points_automatic_reward_redemption.add', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:redemptions', 'channel:manage:redemptions']);
|
|
510
|
-
}
|
|
511
|
-
/**
|
|
512
|
-
* Subscribe to events that represent a Channel Points automatic reward being redeemed.
|
|
513
|
-
*
|
|
514
|
-
* @param broadcaster The broadcaster you want to listen to automatic reward redemption events for.
|
|
515
|
-
* @param transport The transport options.
|
|
516
|
-
*/
|
|
517
|
-
async subscribeToChannelAutomaticRewardRedemptionAddV2Events(broadcaster, transport) {
|
|
518
|
-
return await this.createSubscription('channel.channel_points_automatic_reward_redemption.add', '2', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:redemptions', 'channel:manage:redemptions']);
|
|
519
|
-
}
|
|
520
|
-
/**
|
|
521
|
-
* Subscribe to events that represent a poll starting in a channel.
|
|
522
|
-
*
|
|
523
|
-
* @param broadcaster The broadcaster you want to listen to poll begin events for.
|
|
524
|
-
* @param transport The transport options.
|
|
525
|
-
*/
|
|
526
|
-
async subscribeToChannelPollBeginEvents(broadcaster, transport) {
|
|
527
|
-
return await this.createSubscription('channel.poll.begin', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:polls', 'channel:manage:polls']);
|
|
528
|
-
}
|
|
529
|
-
/**
|
|
530
|
-
* Subscribe to events that represent a poll being voted on in a channel.
|
|
531
|
-
*
|
|
532
|
-
* @param broadcaster The broadcaster you want to listen to poll progress events for.
|
|
533
|
-
* @param transport The transport options.
|
|
534
|
-
*/
|
|
535
|
-
async subscribeToChannelPollProgressEvents(broadcaster, transport) {
|
|
536
|
-
return await this.createSubscription('channel.poll.progress', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:polls', 'channel:manage:polls']);
|
|
537
|
-
}
|
|
538
|
-
/**
|
|
539
|
-
* Subscribe to events that represent a poll ending in a channel.
|
|
540
|
-
*
|
|
541
|
-
* @param broadcaster The broadcaster you want to listen to poll end events for.
|
|
542
|
-
* @param transport The transport options.
|
|
543
|
-
*/
|
|
544
|
-
async subscribeToChannelPollEndEvents(broadcaster, transport) {
|
|
545
|
-
return await this.createSubscription('channel.poll.end', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:polls', 'channel:manage:polls']);
|
|
546
|
-
}
|
|
547
|
-
/**
|
|
548
|
-
* Subscribe to events that represent a prediction starting in a channel.
|
|
549
|
-
*
|
|
550
|
-
* @param broadcaster The broadcaster you want to listen to prediction begin events for.
|
|
551
|
-
* @param transport The transport options.
|
|
552
|
-
*/
|
|
553
|
-
async subscribeToChannelPredictionBeginEvents(broadcaster, transport) {
|
|
554
|
-
return await this.createSubscription('channel.prediction.begin', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:predictions', 'channel:manage:predictions']);
|
|
555
|
-
}
|
|
556
|
-
/**
|
|
557
|
-
* Subscribe to events that represent a prediction being voted on in a channel.
|
|
558
|
-
*
|
|
559
|
-
* @param broadcaster The broadcaster you want to listen to prediction preogress events for.
|
|
560
|
-
* @param transport The transport options.
|
|
561
|
-
*/
|
|
562
|
-
async subscribeToChannelPredictionProgressEvents(broadcaster, transport) {
|
|
563
|
-
return await this.createSubscription('channel.prediction.progress', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:predictions', 'channel:manage:predictions']);
|
|
564
|
-
}
|
|
565
|
-
/**
|
|
566
|
-
* Subscribe to events that represent a prediction being locked in a channel.
|
|
567
|
-
*
|
|
568
|
-
* @param broadcaster The broadcaster you want to listen to prediction lock events for.
|
|
569
|
-
* @param transport The transport options.
|
|
570
|
-
*/
|
|
571
|
-
async subscribeToChannelPredictionLockEvents(broadcaster, transport) {
|
|
572
|
-
return await this.createSubscription('channel.prediction.lock', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:predictions', 'channel:manage:predictions']);
|
|
573
|
-
}
|
|
574
|
-
/**
|
|
575
|
-
* Subscribe to events that represent a prediction ending in a channel.
|
|
576
|
-
*
|
|
577
|
-
* @param broadcaster The broadcaster you want to listen to prediction end events for.
|
|
578
|
-
* @param transport The transport options.
|
|
579
|
-
*/
|
|
580
|
-
async subscribeToChannelPredictionEndEvents(broadcaster, transport) {
|
|
581
|
-
return await this.createSubscription('channel.prediction.end', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:predictions', 'channel:manage:predictions']);
|
|
582
|
-
}
|
|
583
|
-
/**
|
|
584
|
-
* Subscribe to events that represent the beginning of a creator goal event in a channel.
|
|
585
|
-
*
|
|
586
|
-
* @param broadcaster The broadcaster you want to listen to goal begin events for.
|
|
587
|
-
* @param transport The transport options.
|
|
588
|
-
*/
|
|
589
|
-
async subscribeToChannelGoalBeginEvents(broadcaster, transport) {
|
|
590
|
-
return await this.createSubscription('channel.goal.begin', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:goals']);
|
|
591
|
-
}
|
|
592
|
-
/**
|
|
593
|
-
* Subscribe to events that represent progress towards a creator goal.
|
|
594
|
-
*
|
|
595
|
-
* @param broadcaster The broadcaster for which you want to listen to goal progress events.
|
|
596
|
-
* @param transport The transport options.
|
|
597
|
-
*/
|
|
598
|
-
async subscribeToChannelGoalProgressEvents(broadcaster, transport) {
|
|
599
|
-
return await this.createSubscription('channel.goal.progress', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:goals']);
|
|
600
|
-
}
|
|
601
|
-
/**
|
|
602
|
-
* Subscribe to events that represent the end of a creator goal event.
|
|
603
|
-
*
|
|
604
|
-
* @param broadcaster The broadcaster for which you want to listen to goal end events.
|
|
605
|
-
* @param transport The transport options.
|
|
606
|
-
*/
|
|
607
|
-
async subscribeToChannelGoalEndEvents(broadcaster, transport) {
|
|
608
|
-
return await this.createSubscription('channel.goal.end', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:goals']);
|
|
609
|
-
}
|
|
610
|
-
/**
|
|
611
|
-
* Subscribe to events that represent the beginning of a Hype Train event in a channel.
|
|
612
|
-
*
|
|
613
|
-
* @param broadcaster The broadcaster you want to listen to Hype train begin events for.
|
|
614
|
-
* @param transport The transport options.
|
|
615
|
-
*/
|
|
616
|
-
async subscribeToChannelHypeTrainBeginEvents(broadcaster, transport) {
|
|
617
|
-
return await this.createSubscription('channel.hype_train.begin', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:hype_train']);
|
|
618
|
-
}
|
|
619
|
-
/**
|
|
620
|
-
* Subscribe to events that represent progress towards the Hype Train goal.
|
|
621
|
-
*
|
|
622
|
-
* @param broadcaster The broadcaster for which you want to listen to Hype Train progress events.
|
|
623
|
-
* @param transport The transport options.
|
|
624
|
-
*/
|
|
625
|
-
async subscribeToChannelHypeTrainProgressEvents(broadcaster, transport) {
|
|
626
|
-
return await this.createSubscription('channel.hype_train.progress', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:hype_train']);
|
|
627
|
-
}
|
|
628
|
-
/**
|
|
629
|
-
* Subscribe to events that represent the end of a Hype Train event.
|
|
630
|
-
*
|
|
631
|
-
* @param broadcaster The broadcaster for which you want to listen to Hype Train end events.
|
|
632
|
-
* @param transport The transport options.
|
|
633
|
-
*/
|
|
634
|
-
async subscribeToChannelHypeTrainEndEvents(broadcaster, transport) {
|
|
635
|
-
return await this.createSubscription('channel.hype_train.end', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:hype_train']);
|
|
636
|
-
}
|
|
637
|
-
/**
|
|
638
|
-
* Subscribe to events that represent the beginning of a Hype Train event in a channel.
|
|
639
|
-
*
|
|
640
|
-
* @param broadcaster The broadcaster you want to listen to Hype train begin events for.
|
|
641
|
-
* @param transport The transport options.
|
|
642
|
-
*/
|
|
643
|
-
async subscribeToChannelHypeTrainBeginV2Events(broadcaster, transport) {
|
|
644
|
-
return await this.createSubscription('channel.hype_train.begin', '2', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:hype_train']);
|
|
645
|
-
}
|
|
646
|
-
/**
|
|
647
|
-
* Subscribe to events that represent progress towards the Hype Train goal.
|
|
648
|
-
*
|
|
649
|
-
* @param broadcaster The broadcaster for which you want to listen to Hype Train progress events.
|
|
650
|
-
* @param transport The transport options.
|
|
651
|
-
*/
|
|
652
|
-
async subscribeToChannelHypeTrainProgressV2Events(broadcaster, transport) {
|
|
653
|
-
return await this.createSubscription('channel.hype_train.progress', '2', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:hype_train']);
|
|
654
|
-
}
|
|
655
|
-
/**
|
|
656
|
-
* Subscribe to events that represent the end of a Hype Train event.
|
|
657
|
-
*
|
|
658
|
-
* @param broadcaster The broadcaster for which you want to listen to Hype Train end events.
|
|
659
|
-
* @param transport The transport options.
|
|
660
|
-
*/
|
|
661
|
-
async subscribeToChannelHypeTrainEndV2Events(broadcaster, transport) {
|
|
662
|
-
return await this.createSubscription('channel.hype_train.end', '2', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:hype_train']);
|
|
663
|
-
}
|
|
664
|
-
/**
|
|
665
|
-
* Subscribe to events that represent a broadcaster shouting out another broadcaster.
|
|
666
|
-
*
|
|
667
|
-
* @param broadcaster The broadcaster for which you want to listen to outgoing shoutout events.
|
|
668
|
-
* @param transport The transport options.
|
|
669
|
-
*/
|
|
670
|
-
async subscribeToChannelShoutoutCreateEvents(broadcaster, transport) {
|
|
671
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
672
|
-
return await this.createSubscription('channel.shoutout.create', '1', createEventSubModeratorCondition(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcasterId, ['moderator:read:shoutouts', 'moderator:manage:shoutouts'], true);
|
|
673
|
-
}
|
|
674
|
-
/**
|
|
675
|
-
* Subscribe to events that represent a broadcaster being shouting out by another broadcaster.
|
|
676
|
-
*
|
|
677
|
-
* @param broadcaster The broadcaster for which you want to listen to incoming shoutout events.
|
|
678
|
-
* @param transport The transport options.
|
|
679
|
-
*/
|
|
680
|
-
async subscribeToChannelShoutoutReceiveEvents(broadcaster, transport) {
|
|
681
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
682
|
-
return await this.createSubscription('channel.shoutout.receive', '1', createEventSubModeratorCondition(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcasterId, ['moderator:read:shoutouts', 'moderator:manage:shoutouts'], true);
|
|
683
|
-
}
|
|
684
|
-
/**
|
|
685
|
-
* Subscribe to events that represent an ad break beginning in a channel.
|
|
686
|
-
*
|
|
687
|
-
* @param broadcaster The broadcaster for which you want to listen to ad break begin events.
|
|
688
|
-
* @param transport The transport options.
|
|
689
|
-
*/
|
|
690
|
-
async subscribeToChannelAdBreakBeginEvents(broadcaster, transport) {
|
|
691
|
-
return await this.createSubscription('channel.ad_break.begin', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:ads']);
|
|
692
|
-
}
|
|
693
|
-
/**
|
|
694
|
-
* Subscribe to events that represent a channel's chat being cleared.
|
|
695
|
-
*
|
|
696
|
-
* @param broadcaster The broadcaster for which you want to listen to chat clear events.
|
|
697
|
-
* @param transport The transport options.
|
|
698
|
-
*/
|
|
699
|
-
async subscribeToChannelChatClearEvents(broadcaster, transport) {
|
|
700
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
701
|
-
return await this.createSubscription('channel.chat.clear', '1', createEventSubUserCondition(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcaster, ['user:read:chat'], true);
|
|
702
|
-
}
|
|
703
|
-
/**
|
|
704
|
-
* Subscribe to events that represent a user's chat messages being cleared in a channel.
|
|
705
|
-
*
|
|
706
|
-
* @param broadcaster The broadcaster for which you want to listen to user chat message clear events.
|
|
707
|
-
* @param transport The transport options.
|
|
708
|
-
*/
|
|
709
|
-
async subscribeToChannelChatClearUserMessagesEvents(broadcaster, transport) {
|
|
710
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
711
|
-
return await this.createSubscription('channel.chat.clear_user_messages', '1', createEventSubUserCondition(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcaster, ['user:read:chat'], true);
|
|
712
|
-
}
|
|
713
|
-
/**
|
|
714
|
-
* Subscribe to events that represent a chat message being deleted in a channel.
|
|
715
|
-
*
|
|
716
|
-
* @param broadcaster The broadcaster for which you want to listen to chat message delete events.
|
|
717
|
-
* @param transport The transport options.
|
|
718
|
-
*/
|
|
719
|
-
async subscribeToChannelChatMessageDeleteEvents(broadcaster, transport) {
|
|
720
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
721
|
-
return await this.createSubscription('channel.chat.message_delete', '1', createEventSubUserCondition(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcaster, ['user:read:chat'], true);
|
|
722
|
-
}
|
|
723
|
-
/**
|
|
724
|
-
* Subscribe to events that represent a chat notification in a channel.
|
|
725
|
-
*
|
|
726
|
-
* @param broadcaster The broadcaster for which you want to listen to chat notification events.
|
|
727
|
-
* @param transport The transport options.
|
|
728
|
-
*/
|
|
729
|
-
async subscribeToChannelChatNotificationEvents(broadcaster, transport) {
|
|
730
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
731
|
-
return await this.createSubscription('channel.chat.notification', '1', createEventSubUserCondition(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcaster, ['user:read:chat'], true);
|
|
732
|
-
}
|
|
733
|
-
/**
|
|
734
|
-
* Subscribe to events that represent a chat message in a channel.
|
|
735
|
-
*
|
|
736
|
-
* @param broadcaster The broadcaster for which you want to listen to chat message events.
|
|
737
|
-
* @param transport The transport options.
|
|
738
|
-
*/
|
|
739
|
-
async subscribeToChannelChatMessageEvents(broadcaster, transport) {
|
|
740
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
741
|
-
return await this.createSubscription('channel.chat.message', '1', createEventSubUserCondition(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcaster, ['user:read:chat'], true);
|
|
742
|
-
}
|
|
743
|
-
/**
|
|
744
|
-
* Subscribe to events that represent chat settings being updated in a channel.
|
|
745
|
-
*
|
|
746
|
-
* @param broadcaster The broadcaster for which you want to listen to chat settings update events.
|
|
747
|
-
* @param transport The transport options.
|
|
748
|
-
*/
|
|
749
|
-
async subscribeToChannelChatSettingsUpdateEvents(broadcaster, transport) {
|
|
750
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
751
|
-
return await this.createSubscription('channel.chat_settings.update', '1', createEventSubUserCondition(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcaster, ['user:read:chat'], true);
|
|
752
|
-
}
|
|
753
|
-
/**
|
|
754
|
-
* Subscribe to events that represent a created unban requests in a channel.
|
|
755
|
-
*
|
|
756
|
-
* @param broadcaster The broadcaster for which you want to listen to unban requests.
|
|
757
|
-
* @param transport The transport options.
|
|
758
|
-
*/
|
|
759
|
-
async subscribeToChannelUnbanRequestCreateEvents(broadcaster, transport) {
|
|
760
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
761
|
-
return await this.createSubscription('channel.unban_request.create', '1', createEventSubModeratorCondition(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcaster, ['moderator:read:unban_requests', 'moderator:manage:unban_requests'], true);
|
|
762
|
-
}
|
|
763
|
-
/**
|
|
764
|
-
* Subscribe to events that represent a resolved unban requests in a channel.
|
|
765
|
-
*
|
|
766
|
-
* @param broadcaster The broadcaster for which you want to listen to unban requests.
|
|
767
|
-
* @param transport The transport options.
|
|
768
|
-
*/
|
|
769
|
-
async subscribeToChannelUnbanRequestResolveEvents(broadcaster, transport) {
|
|
770
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
771
|
-
return await this.createSubscription('channel.unban_request.resolve', '1', createEventSubModeratorCondition(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcaster, ['moderator:read:unban_requests', 'moderator:manage:unban_requests'], true);
|
|
772
|
-
}
|
|
773
|
-
/**
|
|
774
|
-
* Subscribe to events that represent a moderator performing an action on a channel.
|
|
775
|
-
*
|
|
776
|
-
* This requires the following scopes:
|
|
777
|
-
* - `moderator:read:blocked_terms` OR `moderator:manage:blocked_terms`
|
|
778
|
-
* - `moderator:read:chat_settings` OR `moderator:manage:chat_settings`
|
|
779
|
-
* - `moderator:read:unban_requests` OR `moderator:manage:unban_requests`
|
|
780
|
-
* - `moderator:read:banned_users` OR `moderator:manage:banned_users`
|
|
781
|
-
* - `moderator:read:chat_messages` OR `moderator:manage:chat_messages`
|
|
782
|
-
* - `moderator:read:warnings` OR `moderator:manage:warnings`
|
|
783
|
-
* - `moderator:read:moderators`
|
|
784
|
-
* - `moderator:read:vips`
|
|
785
|
-
*
|
|
786
|
-
* These scope requirements cannot be checked by the library, so they are just assumed.
|
|
787
|
-
* Make sure to catch authorization errors yourself.
|
|
788
|
-
*
|
|
789
|
-
* @param broadcaster The broadcaster for which you want to listen to moderation events.
|
|
790
|
-
* @param transport The transport options.
|
|
791
|
-
*/
|
|
792
|
-
async subscribeToChannelModerateEvents(broadcaster, transport) {
|
|
793
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
794
|
-
return await this.createSubscription('channel.moderate', '2', createEventSubModeratorCondition(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcaster, [], true);
|
|
795
|
-
}
|
|
796
|
-
/**
|
|
797
|
-
* Subscribe to events that represent a warning being acknowledged by a user.
|
|
798
|
-
*
|
|
799
|
-
* @param broadcaster The broadcaster for whom you want to listen to warnings.
|
|
800
|
-
* @param transport The transport options.
|
|
801
|
-
*/
|
|
802
|
-
async subscribeToChannelWarningAcknowledgeEvents(broadcaster, transport) {
|
|
803
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
804
|
-
return await this.createSubscription('channel.warning.acknowledge', '1', createEventSubModeratorCondition(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcaster, ['moderator:read:warnings', 'moderator:manage:warnings'], true);
|
|
805
|
-
}
|
|
806
|
-
/**
|
|
807
|
-
* Subscribe to events that represent a warning sent to a user.
|
|
808
|
-
*
|
|
809
|
-
* @param broadcaster The broadcaster for whom you want to listen to warnings.
|
|
810
|
-
* @param transport The transport options.
|
|
811
|
-
*/
|
|
812
|
-
async subscribeToChannelWarningSendEvents(broadcaster, transport) {
|
|
813
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
814
|
-
return await this.createSubscription('channel.warning.send', '1', createEventSubModeratorCondition(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcaster, ['moderator:read:warnings', 'moderator:manage:warnings'], true);
|
|
815
|
-
}
|
|
816
|
-
/**
|
|
817
|
-
* Subscribe to events that represent a VIP being added to a channel.
|
|
818
|
-
*
|
|
819
|
-
* @param broadcaster The broadcaster you want to listen for VIP add events for.
|
|
820
|
-
* @param transport The transport options.
|
|
821
|
-
*/
|
|
822
|
-
async subscribeToChannelVipAddEvents(broadcaster, transport) {
|
|
823
|
-
return await this.createSubscription('channel.vip.add', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:vips', 'channel:manage:vips']);
|
|
824
|
-
}
|
|
825
|
-
/**
|
|
826
|
-
* Subscribe to events that represent a VIP being removed from a channel.
|
|
827
|
-
*
|
|
828
|
-
* @param broadcaster The broadcaster you want to listen for VIP remove events for.
|
|
829
|
-
* @param transport The transport options.
|
|
830
|
-
*/
|
|
831
|
-
async subscribeToChannelVipRemoveEvents(broadcaster, transport) {
|
|
832
|
-
return await this.createSubscription('channel.vip.remove', '1', createEventSubBroadcasterCondition(broadcaster), transport, broadcaster, ['channel:read:vips', 'channel:manage:vips']);
|
|
833
|
-
}
|
|
834
|
-
/**
|
|
835
|
-
* Subscribe to events that represent an extension Bits transaction.
|
|
836
|
-
*
|
|
837
|
-
* @param clientId The Client ID for the extension you want to listen to Bits transactions for.
|
|
838
|
-
* @param transport The transport options.
|
|
839
|
-
*/
|
|
840
|
-
async subscribeToExtensionBitsTransactionCreateEvents(clientId, transport) {
|
|
841
|
-
return await this.createSubscription('extension.bits_transaction.create', '1', createSingleKeyQuery('extension_client_id', clientId), transport);
|
|
842
|
-
}
|
|
843
|
-
/**
|
|
844
|
-
* Subscribe to events that represent a user granting authorization to an application.
|
|
845
|
-
*
|
|
846
|
-
* @param clientId The Client ID for the application you want to listen to authorization grant events for.
|
|
847
|
-
* @param transport The transport options.
|
|
848
|
-
*/
|
|
849
|
-
async subscribeToUserAuthorizationGrantEvents(clientId, transport) {
|
|
850
|
-
return await this.createSubscription('user.authorization.grant', '1', createSingleKeyQuery('client_id', clientId), transport);
|
|
851
|
-
}
|
|
852
|
-
/**
|
|
853
|
-
* Subscribe to events that represent a user revoking their authorization from an application.
|
|
854
|
-
*
|
|
855
|
-
* @param clientId The Client ID for the application you want to listen to authorization revoke events for.
|
|
856
|
-
* @param transport The transport options.
|
|
857
|
-
*/
|
|
858
|
-
async subscribeToUserAuthorizationRevokeEvents(clientId, transport) {
|
|
859
|
-
return await this.createSubscription('user.authorization.revoke', '1', createSingleKeyQuery('client_id', clientId), transport);
|
|
860
|
-
}
|
|
861
|
-
/**
|
|
862
|
-
* Subscribe to events that represent a user updating their account details.
|
|
863
|
-
*
|
|
864
|
-
* @param user The user you want to listen to user update events for.
|
|
865
|
-
* @param transport The transport options.
|
|
866
|
-
* @param withEmail Whether to request adding the email address of the user to the notification.
|
|
867
|
-
*
|
|
868
|
-
* Only has an effect with the websocket transport.
|
|
869
|
-
* With the webhook transport, this depends solely on the previous authorization given by the user.
|
|
870
|
-
*/
|
|
871
|
-
async subscribeToUserUpdateEvents(user, transport, withEmail) {
|
|
872
|
-
return await this.createSubscription('user.update', '1', createSingleKeyQuery('user_id', extractUserId(user)), transport, user, withEmail ? ['user:read:email'] : undefined);
|
|
873
|
-
}
|
|
874
|
-
/**
|
|
875
|
-
* Subscribe to events that represent a user receiving a whisper message from another user.
|
|
876
|
-
*
|
|
877
|
-
* @param user The user you want to listen to whisper message events for.
|
|
878
|
-
* @param transport The transport options.
|
|
879
|
-
*/
|
|
880
|
-
async subscribeToUserWhisperMessageEvents(user, transport) {
|
|
881
|
-
return await this.createSubscription('user.whisper.message', '1', createSingleKeyQuery('user_id', extractUserId(user)), transport, user, ['user:read:whispers', 'user:manage:whispers']);
|
|
882
|
-
}
|
|
883
|
-
/**
|
|
884
|
-
* Subscribe to events that represent a drop entitlement being granted.
|
|
885
|
-
*
|
|
886
|
-
* @expandParams
|
|
887
|
-
*
|
|
888
|
-
* @param filter
|
|
889
|
-
* @param transport The transport options.
|
|
890
|
-
*/
|
|
891
|
-
async subscribeToDropEntitlementGrantEvents(filter, transport) {
|
|
892
|
-
return await this.createSubscription('drop.entitlement.grant', '1', createEventSubDropEntitlementGrantCondition(filter), transport, undefined, undefined, false, true);
|
|
893
|
-
}
|
|
894
|
-
/**
|
|
895
|
-
* Subscribes to events that represent a chat message being held by AutoMod.
|
|
896
|
-
*
|
|
897
|
-
* @param broadcaster The broadcaster you want to listen to AutoMod message hold events for.
|
|
898
|
-
* @param transport The transport options.
|
|
899
|
-
*/
|
|
900
|
-
async subscribeToAutoModMessageHoldEvents(broadcaster, transport) {
|
|
901
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
902
|
-
return await this.createSubscription('automod.message.hold', '1', createEventSubModeratorCondition(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcaster, ['moderator:manage:automod'], true);
|
|
903
|
-
}
|
|
904
|
-
/**
|
|
905
|
-
* Subscribes to events that represent a held chat message by AutoMod being resolved.
|
|
906
|
-
*
|
|
907
|
-
* @param broadcaster The broadcaster you want to listen to AutoMod message resolution events for.
|
|
908
|
-
* @param transport The transport options.
|
|
909
|
-
*/
|
|
910
|
-
async subscribeToAutoModMessageUpdateEvents(broadcaster, transport) {
|
|
911
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
912
|
-
return await this.createSubscription('automod.message.update', '1', createEventSubModeratorCondition(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcaster, ['moderator:manage:automod'], true);
|
|
913
|
-
}
|
|
914
|
-
/**
|
|
915
|
-
* Subscribes to events (v2) that represent a chat message being held by AutoMod.
|
|
916
|
-
*
|
|
917
|
-
* @param broadcaster The broadcaster you want to listen to AutoMod message hold events for.
|
|
918
|
-
* @param transport The transport options.
|
|
919
|
-
*/
|
|
920
|
-
async subscribeToAutoModMessageHoldV2Events(broadcaster, transport) {
|
|
921
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
922
|
-
return await this.createSubscription('automod.message.hold', '2', createEventSubModeratorCondition(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcaster, ['moderator:manage:automod'], true);
|
|
923
|
-
}
|
|
924
|
-
/**
|
|
925
|
-
* Subscribes to events (v2) that represent a held chat message by AutoMod being resolved.
|
|
926
|
-
*
|
|
927
|
-
* @param broadcaster The broadcaster you want to listen to AutoMod message resolution events for.
|
|
928
|
-
* @param transport The transport options.
|
|
929
|
-
*/
|
|
930
|
-
async subscribeToAutoModMessageUpdateV2Events(broadcaster, transport) {
|
|
931
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
932
|
-
return await this.createSubscription('automod.message.update', '2', createEventSubModeratorCondition(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcaster, ['moderator:manage:automod'], true);
|
|
933
|
-
}
|
|
934
|
-
/**
|
|
935
|
-
* Subscribes to events that represent the AutoMod settings being updated.
|
|
936
|
-
*
|
|
937
|
-
* @param broadcaster The broadcaster you want to listen to AutoMod settings update events.
|
|
938
|
-
* @param transport The transport options.
|
|
939
|
-
*/
|
|
940
|
-
async subscribeToAutoModSettingsUpdateEvents(broadcaster, transport) {
|
|
941
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
942
|
-
return await this.createSubscription('automod.settings.update', '1', createEventSubModeratorCondition(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcaster, ['moderator:read:automod_settings'], true);
|
|
943
|
-
}
|
|
944
|
-
/**
|
|
945
|
-
* Subscribes to events that represent the AutoMod terms being updated.
|
|
946
|
-
*
|
|
947
|
-
* @param broadcaster The broadcaster you want to listen to AutoMod terms update events.
|
|
948
|
-
* @param transport The transport options.
|
|
949
|
-
*/
|
|
950
|
-
async subscribeToAutoModTermsUpdateEvents(broadcaster, transport) {
|
|
951
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
952
|
-
return await this.createSubscription('automod.terms.update', '1', createEventSubModeratorCondition(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcaster, ['moderator:manage:automod'], true);
|
|
953
|
-
}
|
|
954
|
-
/**
|
|
955
|
-
* Subscribes to events that represent a user's notification about their message being held by AutoMod.
|
|
956
|
-
*
|
|
957
|
-
* @param broadcaster The broadcaster you want to listen to AutoMod message hold events for.
|
|
958
|
-
* @param transport The transport options.
|
|
959
|
-
*/
|
|
960
|
-
async subscribeToChannelChatUserMessageHoldEvents(broadcaster, transport) {
|
|
961
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
962
|
-
return await this.createSubscription('channel.chat.user_message_hold', '1', createEventSubUserCondition(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcaster, ['user:read:chat'], true);
|
|
963
|
-
}
|
|
964
|
-
/**
|
|
965
|
-
* Subscribes to events that represent a user's notification about a held chat message by AutoMod being resolved.
|
|
966
|
-
*
|
|
967
|
-
* @param broadcaster The broadcaster you want to listen to AutoMod message resolution events for.
|
|
968
|
-
* @param transport The transport options.
|
|
969
|
-
*/
|
|
970
|
-
async subscribeToChannelChatUserMessageUpdateEvents(broadcaster, transport) {
|
|
971
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
972
|
-
return await this.createSubscription('channel.chat.user_message_update', '1', createEventSubUserCondition(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcaster, ['user:read:chat'], true);
|
|
973
|
-
}
|
|
974
|
-
/**
|
|
975
|
-
* Subscribes to events that represent a suspicious user updated in a channel.
|
|
976
|
-
*
|
|
977
|
-
* @param broadcaster The broadcaster you want to listen for suspicious user update events.
|
|
978
|
-
* @param transport The transport options.
|
|
979
|
-
*/
|
|
980
|
-
async subscribeToChannelSuspiciousUserUpdateEvents(broadcaster, transport) {
|
|
981
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
982
|
-
return await this.createSubscription('channel.suspicious_user.update', '1', createEventSubModeratorCondition(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcaster, ['moderator:read:suspicious_users'], true);
|
|
983
|
-
}
|
|
984
|
-
/**
|
|
985
|
-
* Subscribes to events that represent a message sent by a suspicious user.
|
|
986
|
-
*
|
|
987
|
-
* @param broadcaster The broadcaster you want to listen for messages sent by suspicious users.
|
|
988
|
-
* @param transport The transport options.
|
|
989
|
-
*/
|
|
990
|
-
async subscribeToChannelSuspiciousUserMessageEvents(broadcaster, transport) {
|
|
991
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
992
|
-
return await this.createSubscription('channel.suspicious_user.message', '1', createEventSubModeratorCondition(broadcasterId, this._getUserContextIdWithDefault(broadcasterId)), transport, broadcaster, ['moderator:read:suspicious_users'], true);
|
|
993
|
-
}
|
|
994
|
-
/**
|
|
995
|
-
* Subscribes to events indicating that a shared chat session has begun in a channel.
|
|
996
|
-
*
|
|
997
|
-
* @param broadcaster The broadcaster for whom shared chat session begin events should be listened to.
|
|
998
|
-
* @param transport The transport options to use for the subscription.
|
|
999
|
-
*/
|
|
1000
|
-
async subscribeToChannelSharedChatSessionBeginEvents(broadcaster, transport) {
|
|
1001
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
1002
|
-
return await this.createSubscription('channel.shared_chat.begin', '1', createEventSubBroadcasterCondition(broadcasterId), transport, broadcasterId);
|
|
1003
|
-
}
|
|
1004
|
-
/**
|
|
1005
|
-
* Subscribes to events indicating that a shared chat session has been updated in a channel.
|
|
1006
|
-
*
|
|
1007
|
-
* @param broadcaster The broadcaster for whom shared chat session update events should be listened to.
|
|
1008
|
-
* @param transport The transport options to use for the subscription.
|
|
1009
|
-
*/
|
|
1010
|
-
async subscribeToChannelSharedChatSessionUpdateEvents(broadcaster, transport) {
|
|
1011
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
1012
|
-
return await this.createSubscription('channel.shared_chat.update', '1', createEventSubBroadcasterCondition(broadcasterId), transport, broadcasterId);
|
|
1013
|
-
}
|
|
1014
|
-
/**
|
|
1015
|
-
* Subscribes to events indicating that a shared chat session has ended in a channel.
|
|
1016
|
-
*
|
|
1017
|
-
* @param broadcaster The broadcaster for whom shared chat session end events should be listened to.
|
|
1018
|
-
* @param transport The transport options to use for the subscription.
|
|
1019
|
-
*/
|
|
1020
|
-
async subscribeToChannelSharedChatSessionEndEvents(broadcaster, transport) {
|
|
1021
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
1022
|
-
return await this.createSubscription('channel.shared_chat.end', '1', createEventSubBroadcasterCondition(broadcasterId), transport, broadcasterId);
|
|
1023
|
-
}
|
|
1024
|
-
/**
|
|
1025
|
-
* Subscribes to events indicating that bits are used in a channel.
|
|
1026
|
-
*
|
|
1027
|
-
* @param broadcaster The broadcaster for whom you want to listen to bits usage events.
|
|
1028
|
-
* @param transport The transport options to use for the subscription.
|
|
1029
|
-
*/
|
|
1030
|
-
async subscribeToChannelBitsUseEvents(broadcaster, transport) {
|
|
1031
|
-
const broadcasterId = extractUserId(broadcaster);
|
|
1032
|
-
return await this.createSubscription('channel.bits.use', '1', createEventSubBroadcasterCondition(broadcasterId), transport, broadcasterId, ['bits:read']);
|
|
1033
|
-
}
|
|
1034
|
-
/**
|
|
1035
|
-
* Gets the current EventSub conduits for the current client.
|
|
1036
|
-
*
|
|
1037
|
-
*/
|
|
1038
|
-
async getConduits() {
|
|
1039
|
-
const result = await this._client.callApi({
|
|
1040
|
-
type: 'helix',
|
|
1041
|
-
url: 'eventsub/conduits',
|
|
1042
|
-
});
|
|
1043
|
-
return result.data.map(data => new HelixEventSubConduit(data, this._client));
|
|
1044
|
-
}
|
|
1045
|
-
/**
|
|
1046
|
-
* Creates a new EventSub conduit for the current client.
|
|
1047
|
-
*
|
|
1048
|
-
* @param shardCount The number of shards to create for this conduit.
|
|
1049
|
-
*/
|
|
1050
|
-
async createConduit(shardCount) {
|
|
1051
|
-
const result = await this._client.callApi({
|
|
1052
|
-
type: 'helix',
|
|
1053
|
-
url: 'eventsub/conduits',
|
|
1054
|
-
method: 'POST',
|
|
1055
|
-
query: {
|
|
1056
|
-
...createSingleKeyQuery('shard_count', shardCount.toString()),
|
|
1057
|
-
},
|
|
1058
|
-
});
|
|
1059
|
-
return new HelixEventSubConduit(result.data[0], this._client);
|
|
1060
|
-
}
|
|
1061
|
-
/**
|
|
1062
|
-
* Updates an EventSub conduit for the current client.
|
|
1063
|
-
*
|
|
1064
|
-
* @param id The ID of the conduit to update.
|
|
1065
|
-
* @param shardCount The number of shards to update for this conduit.
|
|
1066
|
-
*/
|
|
1067
|
-
async updateConduit(id, shardCount) {
|
|
1068
|
-
const result = await this._client.callApi({
|
|
1069
|
-
type: 'helix',
|
|
1070
|
-
url: 'eventsub/conduits',
|
|
1071
|
-
method: 'PATCH',
|
|
1072
|
-
query: createEventSubConduitUpdateCondition(id, shardCount),
|
|
1073
|
-
});
|
|
1074
|
-
return new HelixEventSubConduit(result.data[0], this._client);
|
|
1075
|
-
}
|
|
1076
|
-
/**
|
|
1077
|
-
* Deletes an EventSub conduit for the current client.
|
|
1078
|
-
*
|
|
1079
|
-
* @param id The ID of the conduit to delete.
|
|
1080
|
-
*/
|
|
1081
|
-
async deleteConduit(id) {
|
|
1082
|
-
await this._client.callApi({
|
|
1083
|
-
type: 'helix',
|
|
1084
|
-
url: 'eventsub/conduits',
|
|
1085
|
-
method: 'DELETE',
|
|
1086
|
-
query: {
|
|
1087
|
-
...createSingleKeyQuery('id', id),
|
|
1088
|
-
},
|
|
1089
|
-
});
|
|
1090
|
-
}
|
|
1091
|
-
/**
|
|
1092
|
-
* Gets the shards of an EventSub conduit for the current client.
|
|
1093
|
-
*
|
|
1094
|
-
* @param conduitId The ID of the conduit to get shards for.
|
|
1095
|
-
* @param status The status of the shards to filter by.
|
|
1096
|
-
* @param pagination
|
|
1097
|
-
*/
|
|
1098
|
-
async getConduitShards(conduitId, status, pagination) {
|
|
1099
|
-
const result = await this._client.callApi({
|
|
1100
|
-
type: 'helix',
|
|
1101
|
-
url: 'eventsub/conduits/shards',
|
|
1102
|
-
query: {
|
|
1103
|
-
...createEventSubConduitCondition(conduitId, status),
|
|
1104
|
-
...createPaginationQuery(pagination),
|
|
1105
|
-
},
|
|
1106
|
-
});
|
|
1107
|
-
return {
|
|
1108
|
-
...createPaginatedResult(result, HelixEventSubConduitShard, this._client),
|
|
1109
|
-
};
|
|
1110
|
-
}
|
|
1111
|
-
/**
|
|
1112
|
-
* Creates a paginator for the shards of an EventSub conduit for the current client.
|
|
1113
|
-
*
|
|
1114
|
-
* @param conduitId The ID of the conduit to get shards for.
|
|
1115
|
-
* @param status The status of the shards to filter by.
|
|
1116
|
-
*/
|
|
1117
|
-
getConduitShardsPaginated(conduitId, status) {
|
|
1118
|
-
return new HelixPaginatedRequest({
|
|
1119
|
-
url: 'eventsub/conduits/shards',
|
|
1120
|
-
query: createEventSubConduitCondition(conduitId, status),
|
|
1121
|
-
}, this._client, data => new HelixEventSubConduitShard(data));
|
|
1122
|
-
}
|
|
1123
|
-
/**
|
|
1124
|
-
* Updates shards of an EventSub conduit for the current client.
|
|
1125
|
-
*
|
|
1126
|
-
* @param conduitId The ID of the conduit to update shards for.
|
|
1127
|
-
* @param shards List of shards to update
|
|
1128
|
-
*/
|
|
1129
|
-
async updateConduitShards(conduitId, shards) {
|
|
1130
|
-
const result = await this._client.callApi({
|
|
1131
|
-
type: 'helix',
|
|
1132
|
-
url: 'eventsub/conduits/shards',
|
|
1133
|
-
method: 'PATCH',
|
|
1134
|
-
jsonBody: createEventSubConduitShardsUpdateCondition(conduitId, shards),
|
|
1135
|
-
});
|
|
1136
|
-
return result.data.map(data => new HelixEventSubConduitShard(data));
|
|
1137
|
-
}
|
|
1138
|
-
async _deleteSubscriptionsWithCondition(cond) {
|
|
1139
|
-
const subsPaginator = this.getSubscriptionsPaginated();
|
|
1140
|
-
for await (const sub of subsPaginator) {
|
|
1141
|
-
if (!cond || cond(sub)) {
|
|
1142
|
-
await sub.unsubscribe();
|
|
1143
|
-
}
|
|
1144
|
-
}
|
|
1145
|
-
}
|
|
1146
|
-
};
|
|
1147
|
-
HelixEventSubApi = __decorate([
|
|
1148
|
-
rtfm('api', 'HelixEventSubApi')
|
|
1149
|
-
], HelixEventSubApi);
|
|
1150
|
-
export { HelixEventSubApi };
|