@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,130 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { createBroadcasterQuery } from '@twurple/api-call';
|
|
3
|
-
import { extractUserId, rtfm } from '@twurple/common';
|
|
4
|
-
import { createGetByIdsQuery } from '../../interfaces/endpoints/generic.external.js';
|
|
5
|
-
import { createPollBody, createPollEndBody } from '../../interfaces/endpoints/poll.external.js';
|
|
6
|
-
import { HelixPaginatedRequest } from '../../utils/pagination/HelixPaginatedRequest.js';
|
|
7
|
-
import { createPaginatedResult } from '../../utils/pagination/HelixPaginatedResult.js';
|
|
8
|
-
import { createPaginationQuery } from '../../utils/pagination/HelixPagination.js';
|
|
9
|
-
import { BaseApi } from '../BaseApi.js';
|
|
10
|
-
import { HelixPoll } from './HelixPoll.js';
|
|
11
|
-
/**
|
|
12
|
-
* The Helix API methods that deal with polls.
|
|
13
|
-
*
|
|
14
|
-
* Can be accessed using `client.polls` on an {@link ApiClient} instance.
|
|
15
|
-
*
|
|
16
|
-
* ## Example
|
|
17
|
-
* ```ts
|
|
18
|
-
* const api = new ApiClient({ authProvider });
|
|
19
|
-
* const { data: polls } = await api.helix.polls.getPolls('61369223');
|
|
20
|
-
* ```
|
|
21
|
-
*
|
|
22
|
-
* @meta category helix
|
|
23
|
-
* @meta categorizedTitle Polls
|
|
24
|
-
*/
|
|
25
|
-
let HelixPollApi = class HelixPollApi extends BaseApi {
|
|
26
|
-
/**
|
|
27
|
-
* Gets a list of polls for the given broadcaster.
|
|
28
|
-
*
|
|
29
|
-
* @param broadcaster The broadcaster to get polls for.
|
|
30
|
-
* @param pagination
|
|
31
|
-
*
|
|
32
|
-
* @expandParams
|
|
33
|
-
*/
|
|
34
|
-
async getPolls(broadcaster, pagination) {
|
|
35
|
-
const result = await this._client.callApi({
|
|
36
|
-
type: 'helix',
|
|
37
|
-
url: 'polls',
|
|
38
|
-
userId: extractUserId(broadcaster),
|
|
39
|
-
scopes: ['channel:read:polls', 'channel:manage:polls'],
|
|
40
|
-
query: {
|
|
41
|
-
...createBroadcasterQuery(broadcaster),
|
|
42
|
-
...createPaginationQuery(pagination),
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
return createPaginatedResult(result, HelixPoll, this._client);
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Creates a paginator for polls for the given broadcaster.
|
|
49
|
-
*
|
|
50
|
-
* @param broadcaster The broadcaster to get polls for.
|
|
51
|
-
*/
|
|
52
|
-
getPollsPaginated(broadcaster) {
|
|
53
|
-
return new HelixPaginatedRequest({
|
|
54
|
-
url: 'polls',
|
|
55
|
-
userId: extractUserId(broadcaster),
|
|
56
|
-
scopes: ['channel:read:polls', 'channel:manage:polls'],
|
|
57
|
-
query: createBroadcasterQuery(broadcaster),
|
|
58
|
-
}, this._client, data => new HelixPoll(data, this._client), 20);
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Gets polls by IDs.
|
|
62
|
-
*
|
|
63
|
-
* @param broadcaster The broadcaster to get the polls for.
|
|
64
|
-
* @param ids The IDs of the polls.
|
|
65
|
-
*/
|
|
66
|
-
async getPollsByIds(broadcaster, ids) {
|
|
67
|
-
if (!ids.length) {
|
|
68
|
-
return [];
|
|
69
|
-
}
|
|
70
|
-
const result = await this._client.callApi({
|
|
71
|
-
type: 'helix',
|
|
72
|
-
url: 'polls',
|
|
73
|
-
userId: extractUserId(broadcaster),
|
|
74
|
-
scopes: ['channel:read:polls', 'channel:manage:polls'],
|
|
75
|
-
query: createGetByIdsQuery(broadcaster, ids),
|
|
76
|
-
});
|
|
77
|
-
return result.data.map(data => new HelixPoll(data, this._client));
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Gets a poll by ID.
|
|
81
|
-
*
|
|
82
|
-
* @param broadcaster The broadcaster to get the poll for.
|
|
83
|
-
* @param id The ID of the poll.
|
|
84
|
-
*/
|
|
85
|
-
async getPollById(broadcaster, id) {
|
|
86
|
-
const polls = await this.getPollsByIds(broadcaster, [id]);
|
|
87
|
-
return polls.length ? polls[0] : null;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Creates a new poll.
|
|
91
|
-
*
|
|
92
|
-
* @param broadcaster The broadcaster to create the poll for.
|
|
93
|
-
* @param data
|
|
94
|
-
*
|
|
95
|
-
* @expandParams
|
|
96
|
-
*/
|
|
97
|
-
async createPoll(broadcaster, data) {
|
|
98
|
-
const result = await this._client.callApi({
|
|
99
|
-
type: 'helix',
|
|
100
|
-
url: 'polls',
|
|
101
|
-
method: 'POST',
|
|
102
|
-
userId: extractUserId(broadcaster),
|
|
103
|
-
scopes: ['channel:manage:polls'],
|
|
104
|
-
jsonBody: createPollBody(broadcaster, data),
|
|
105
|
-
});
|
|
106
|
-
return new HelixPoll(result.data[0], this._client);
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Ends a poll.
|
|
110
|
-
*
|
|
111
|
-
* @param broadcaster The broadcaster to end the poll for.
|
|
112
|
-
* @param id The ID of the poll to end.
|
|
113
|
-
* @param showResult Whether to allow the result to be viewed publicly.
|
|
114
|
-
*/
|
|
115
|
-
async endPoll(broadcaster, id, showResult = true) {
|
|
116
|
-
const result = await this._client.callApi({
|
|
117
|
-
type: 'helix',
|
|
118
|
-
url: 'polls',
|
|
119
|
-
method: 'PATCH',
|
|
120
|
-
userId: extractUserId(broadcaster),
|
|
121
|
-
scopes: ['channel:manage:polls'],
|
|
122
|
-
jsonBody: createPollEndBody(broadcaster, id, showResult),
|
|
123
|
-
});
|
|
124
|
-
return new HelixPoll(result.data[0], this._client);
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
HelixPollApi = __decorate([
|
|
128
|
-
rtfm('api', 'HelixPollApi')
|
|
129
|
-
], HelixPollApi);
|
|
130
|
-
export { HelixPollApi };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { DataObject } from '@twurple/common';
|
|
2
|
-
import { type HelixPollChoiceData } from '../../interfaces/endpoints/poll.external.js';
|
|
3
|
-
/**
|
|
4
|
-
* A choice in a channel poll.
|
|
5
|
-
*/
|
|
6
|
-
export declare class HelixPollChoice extends DataObject<HelixPollChoiceData> {
|
|
7
|
-
/**
|
|
8
|
-
* The ID of the choice.
|
|
9
|
-
*/
|
|
10
|
-
get id(): string;
|
|
11
|
-
/**
|
|
12
|
-
* The title of the choice.
|
|
13
|
-
*/
|
|
14
|
-
get title(): string;
|
|
15
|
-
/**
|
|
16
|
-
* The total votes the choice received.
|
|
17
|
-
*/
|
|
18
|
-
get totalVotes(): number;
|
|
19
|
-
/**
|
|
20
|
-
* The votes the choice received by spending channel points.
|
|
21
|
-
*/
|
|
22
|
-
get channelPointsVotes(): number;
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=HelixPollChoice.d.ts.map
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { DataObject, rawDataSymbol, rtfm } from '@twurple/common';
|
|
3
|
-
/**
|
|
4
|
-
* A choice in a channel poll.
|
|
5
|
-
*/
|
|
6
|
-
let HelixPollChoice = class HelixPollChoice extends DataObject {
|
|
7
|
-
/**
|
|
8
|
-
* The ID of the choice.
|
|
9
|
-
*/
|
|
10
|
-
get id() {
|
|
11
|
-
return this[rawDataSymbol].id;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* The title of the choice.
|
|
15
|
-
*/
|
|
16
|
-
get title() {
|
|
17
|
-
return this[rawDataSymbol].title;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* The total votes the choice received.
|
|
21
|
-
*/
|
|
22
|
-
get totalVotes() {
|
|
23
|
-
return this[rawDataSymbol].votes;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* The votes the choice received by spending channel points.
|
|
27
|
-
*/
|
|
28
|
-
get channelPointsVotes() {
|
|
29
|
-
return this[rawDataSymbol].channel_points_votes;
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
HelixPollChoice = __decorate([
|
|
33
|
-
rtfm('api', 'HelixPollChoice', 'id')
|
|
34
|
-
], HelixPollChoice);
|
|
35
|
-
export { HelixPollChoice };
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { DataObject } from '@twurple/common';
|
|
2
|
-
import { type HelixPredictionData, type HelixPredictionStatus } from '../../interfaces/endpoints/prediction.external.js';
|
|
3
|
-
import type { HelixUser } from '../user/HelixUser.js';
|
|
4
|
-
import { HelixPredictionOutcome } from './HelixPredictionOutcome.js';
|
|
5
|
-
/**
|
|
6
|
-
* A channel prediction.
|
|
7
|
-
*/
|
|
8
|
-
export declare class HelixPrediction extends DataObject<HelixPredictionData> {
|
|
9
|
-
/**
|
|
10
|
-
* The ID of the prediction.
|
|
11
|
-
*/
|
|
12
|
-
get id(): string;
|
|
13
|
-
/**
|
|
14
|
-
* The ID of the broadcaster.
|
|
15
|
-
*/
|
|
16
|
-
get broadcasterId(): string;
|
|
17
|
-
/**
|
|
18
|
-
* The name of the broadcaster.
|
|
19
|
-
*/
|
|
20
|
-
get broadcasterName(): string;
|
|
21
|
-
/**
|
|
22
|
-
* The display name of the broadcaster.
|
|
23
|
-
*/
|
|
24
|
-
get broadcasterDisplayName(): string;
|
|
25
|
-
/**
|
|
26
|
-
* Gets more information about the broadcaster.
|
|
27
|
-
*/
|
|
28
|
-
getBroadcaster(): Promise<HelixUser>;
|
|
29
|
-
/**
|
|
30
|
-
* The title of the prediction.
|
|
31
|
-
*/
|
|
32
|
-
get title(): string;
|
|
33
|
-
/**
|
|
34
|
-
* The status of the prediction.
|
|
35
|
-
*/
|
|
36
|
-
get status(): HelixPredictionStatus;
|
|
37
|
-
/**
|
|
38
|
-
* The time after which the prediction will be automatically locked, in seconds from creation.
|
|
39
|
-
*/
|
|
40
|
-
get autoLockAfter(): number;
|
|
41
|
-
/**
|
|
42
|
-
* The date when the prediction started.
|
|
43
|
-
*/
|
|
44
|
-
get creationDate(): Date;
|
|
45
|
-
/**
|
|
46
|
-
* The date when the prediction ended, or null if it didn't end yet.
|
|
47
|
-
*/
|
|
48
|
-
get endDate(): Date | null;
|
|
49
|
-
/**
|
|
50
|
-
* The date when the prediction was locked, or null if it wasn't locked yet.
|
|
51
|
-
*/
|
|
52
|
-
get lockDate(): Date | null;
|
|
53
|
-
/**
|
|
54
|
-
* The possible outcomes of the prediction.
|
|
55
|
-
*/
|
|
56
|
-
get outcomes(): HelixPredictionOutcome[];
|
|
57
|
-
/**
|
|
58
|
-
* The ID of the winning outcome, or null if the prediction is currently running or was canceled.
|
|
59
|
-
*/
|
|
60
|
-
get winningOutcomeId(): string | null;
|
|
61
|
-
/**
|
|
62
|
-
* The winning outcome, or null if the prediction is currently running or was canceled.
|
|
63
|
-
*/
|
|
64
|
-
get winningOutcome(): HelixPredictionOutcome | null;
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=HelixPrediction.d.ts.map
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { Enumerable } from '@d-fischer/shared-utils';
|
|
3
|
-
import { checkRelationAssertion, DataObject, HellFreezesOverError, rawDataSymbol, rtfm } from '@twurple/common';
|
|
4
|
-
import { HelixPredictionOutcome } from './HelixPredictionOutcome.js';
|
|
5
|
-
/**
|
|
6
|
-
* A channel prediction.
|
|
7
|
-
*/
|
|
8
|
-
let HelixPrediction = class HelixPrediction extends DataObject {
|
|
9
|
-
/** @internal */ _client;
|
|
10
|
-
/** @internal */
|
|
11
|
-
constructor(data, client) {
|
|
12
|
-
super(data);
|
|
13
|
-
this._client = client;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* The ID of the prediction.
|
|
17
|
-
*/
|
|
18
|
-
get id() {
|
|
19
|
-
return this[rawDataSymbol].id;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* The ID of the broadcaster.
|
|
23
|
-
*/
|
|
24
|
-
get broadcasterId() {
|
|
25
|
-
return this[rawDataSymbol].broadcaster_id;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* The name of the broadcaster.
|
|
29
|
-
*/
|
|
30
|
-
get broadcasterName() {
|
|
31
|
-
return this[rawDataSymbol].broadcaster_login;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* The display name of the broadcaster.
|
|
35
|
-
*/
|
|
36
|
-
get broadcasterDisplayName() {
|
|
37
|
-
return this[rawDataSymbol].broadcaster_name;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Gets more information about the broadcaster.
|
|
41
|
-
*/
|
|
42
|
-
async getBroadcaster() {
|
|
43
|
-
return checkRelationAssertion(await this._client.users.getUserById(this[rawDataSymbol].broadcaster_id));
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* The title of the prediction.
|
|
47
|
-
*/
|
|
48
|
-
get title() {
|
|
49
|
-
return this[rawDataSymbol].title;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* The status of the prediction.
|
|
53
|
-
*/
|
|
54
|
-
get status() {
|
|
55
|
-
return this[rawDataSymbol].status;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* The time after which the prediction will be automatically locked, in seconds from creation.
|
|
59
|
-
*/
|
|
60
|
-
get autoLockAfter() {
|
|
61
|
-
return this[rawDataSymbol].prediction_window;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* The date when the prediction started.
|
|
65
|
-
*/
|
|
66
|
-
get creationDate() {
|
|
67
|
-
return new Date(this[rawDataSymbol].created_at);
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* The date when the prediction ended, or null if it didn't end yet.
|
|
71
|
-
*/
|
|
72
|
-
get endDate() {
|
|
73
|
-
return this[rawDataSymbol].ended_at ? new Date(this[rawDataSymbol].ended_at) : null;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* The date when the prediction was locked, or null if it wasn't locked yet.
|
|
77
|
-
*/
|
|
78
|
-
get lockDate() {
|
|
79
|
-
return this[rawDataSymbol].locked_at ? new Date(this[rawDataSymbol].locked_at) : null;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* The possible outcomes of the prediction.
|
|
83
|
-
*/
|
|
84
|
-
get outcomes() {
|
|
85
|
-
return this[rawDataSymbol].outcomes.map(data => new HelixPredictionOutcome(data, this._client));
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* The ID of the winning outcome, or null if the prediction is currently running or was canceled.
|
|
89
|
-
*/
|
|
90
|
-
get winningOutcomeId() {
|
|
91
|
-
// can apparently be empty string
|
|
92
|
-
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
93
|
-
return this[rawDataSymbol].winning_outcome_id || null;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* The winning outcome, or null if the prediction is currently running or was canceled.
|
|
97
|
-
*/
|
|
98
|
-
get winningOutcome() {
|
|
99
|
-
if (!this[rawDataSymbol].winning_outcome_id) {
|
|
100
|
-
return null;
|
|
101
|
-
}
|
|
102
|
-
const found = this[rawDataSymbol].outcomes.find(o => o.id === this[rawDataSymbol].winning_outcome_id);
|
|
103
|
-
if (!found) {
|
|
104
|
-
throw new HellFreezesOverError('Winning outcome not found in outcomes array');
|
|
105
|
-
}
|
|
106
|
-
return new HelixPredictionOutcome(found, this._client);
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
__decorate([
|
|
110
|
-
Enumerable(false)
|
|
111
|
-
], HelixPrediction.prototype, "_client", void 0);
|
|
112
|
-
HelixPrediction = __decorate([
|
|
113
|
-
rtfm('api', 'HelixPrediction', 'id')
|
|
114
|
-
], HelixPrediction);
|
|
115
|
-
export { HelixPrediction };
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { type UserIdResolvable } from '@twurple/common';
|
|
2
|
-
import { type HelixPredictionData } from '../../interfaces/endpoints/prediction.external.js';
|
|
3
|
-
import { type HelixCreatePredictionData } from '../../interfaces/endpoints/prediction.input.js';
|
|
4
|
-
import { HelixPaginatedRequest } from '../../utils/pagination/HelixPaginatedRequest.js';
|
|
5
|
-
import { type HelixPaginatedResult } from '../../utils/pagination/HelixPaginatedResult.js';
|
|
6
|
-
import { type HelixForwardPagination } from '../../utils/pagination/HelixPagination.js';
|
|
7
|
-
import { BaseApi } from '../BaseApi.js';
|
|
8
|
-
import { HelixPrediction } from './HelixPrediction.js';
|
|
9
|
-
/**
|
|
10
|
-
* The Helix API methods that deal with predictions.
|
|
11
|
-
*
|
|
12
|
-
* Can be accessed using `client.predictions` on an {@link ApiClient} instance.
|
|
13
|
-
*
|
|
14
|
-
* ## Example
|
|
15
|
-
* ```ts
|
|
16
|
-
* const api = new ApiClient({ authProvider });
|
|
17
|
-
* const { data: predictions } = await api.helix.predictions.getPredictions('61369223');
|
|
18
|
-
* ```
|
|
19
|
-
*
|
|
20
|
-
* @meta category helix
|
|
21
|
-
* @meta categorizedTitle Predictions
|
|
22
|
-
*/
|
|
23
|
-
export declare class HelixPredictionApi extends BaseApi {
|
|
24
|
-
/**
|
|
25
|
-
* Gets a list of predictions for the given broadcaster.
|
|
26
|
-
*
|
|
27
|
-
* @param broadcaster The broadcaster to get predictions for.
|
|
28
|
-
* @param pagination
|
|
29
|
-
*
|
|
30
|
-
* @expandParams
|
|
31
|
-
*/
|
|
32
|
-
getPredictions(broadcaster: UserIdResolvable, pagination?: HelixForwardPagination): Promise<HelixPaginatedResult<HelixPrediction>>;
|
|
33
|
-
/**
|
|
34
|
-
* Creates a paginator for predictions for the given broadcaster.
|
|
35
|
-
*
|
|
36
|
-
* @param broadcaster The broadcaster to get predictions for.
|
|
37
|
-
*/
|
|
38
|
-
getPredictionsPaginated(broadcaster: UserIdResolvable): HelixPaginatedRequest<HelixPredictionData, HelixPrediction>;
|
|
39
|
-
/**
|
|
40
|
-
* Gets predictions by IDs.
|
|
41
|
-
*
|
|
42
|
-
* @param broadcaster The broadcaster to get the predictions for.
|
|
43
|
-
* @param ids The IDs of the predictions.
|
|
44
|
-
*/
|
|
45
|
-
getPredictionsByIds(broadcaster: UserIdResolvable, ids: string[]): Promise<HelixPrediction[]>;
|
|
46
|
-
/**
|
|
47
|
-
* Gets a prediction by ID.
|
|
48
|
-
*
|
|
49
|
-
* @param broadcaster The broadcaster to get the prediction for.
|
|
50
|
-
* @param id The ID of the prediction.
|
|
51
|
-
*/
|
|
52
|
-
getPredictionById(broadcaster: UserIdResolvable, id: string): Promise<HelixPrediction | null>;
|
|
53
|
-
/**
|
|
54
|
-
* Creates a new prediction.
|
|
55
|
-
*
|
|
56
|
-
* @param broadcaster The broadcaster to create the prediction for.
|
|
57
|
-
* @param data
|
|
58
|
-
*
|
|
59
|
-
* @expandParams
|
|
60
|
-
*/
|
|
61
|
-
createPrediction(broadcaster: UserIdResolvable, data: HelixCreatePredictionData): Promise<HelixPrediction>;
|
|
62
|
-
/**
|
|
63
|
-
* Locks a prediction.
|
|
64
|
-
*
|
|
65
|
-
* @param broadcaster The broadcaster to lock the prediction for.
|
|
66
|
-
* @param id The ID of the prediction to lock.
|
|
67
|
-
*/
|
|
68
|
-
lockPrediction(broadcaster: UserIdResolvable, id: string): Promise<HelixPrediction>;
|
|
69
|
-
/**
|
|
70
|
-
* Resolves a prediction.
|
|
71
|
-
*
|
|
72
|
-
* @param broadcaster The broadcaster to resolve the prediction for.
|
|
73
|
-
* @param id The ID of the prediction to resolve.
|
|
74
|
-
* @param outcomeId The ID of the winning outcome.
|
|
75
|
-
*/
|
|
76
|
-
resolvePrediction(broadcaster: UserIdResolvable, id: string, outcomeId: string): Promise<HelixPrediction>;
|
|
77
|
-
/**
|
|
78
|
-
* Cancels a prediction.
|
|
79
|
-
*
|
|
80
|
-
* @param broadcaster The broadcaster to cancel the prediction for.
|
|
81
|
-
* @param id The ID of the prediction to cancel.
|
|
82
|
-
*/
|
|
83
|
-
cancelPrediction(broadcaster: UserIdResolvable, id: string): Promise<HelixPrediction>;
|
|
84
|
-
private _endPrediction;
|
|
85
|
-
}
|
|
86
|
-
//# sourceMappingURL=HelixPredictionApi.d.ts.map
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { createBroadcasterQuery } from '@twurple/api-call';
|
|
3
|
-
import { extractUserId, rtfm } from '@twurple/common';
|
|
4
|
-
import { createGetByIdsQuery } from '../../interfaces/endpoints/generic.external.js';
|
|
5
|
-
import { createEndPredictionBody, createPredictionBody, } from '../../interfaces/endpoints/prediction.external.js';
|
|
6
|
-
import { HelixPaginatedRequest } from '../../utils/pagination/HelixPaginatedRequest.js';
|
|
7
|
-
import { createPaginatedResult } from '../../utils/pagination/HelixPaginatedResult.js';
|
|
8
|
-
import { createPaginationQuery } from '../../utils/pagination/HelixPagination.js';
|
|
9
|
-
import { BaseApi } from '../BaseApi.js';
|
|
10
|
-
import { HelixPrediction } from './HelixPrediction.js';
|
|
11
|
-
/**
|
|
12
|
-
* The Helix API methods that deal with predictions.
|
|
13
|
-
*
|
|
14
|
-
* Can be accessed using `client.predictions` on an {@link ApiClient} instance.
|
|
15
|
-
*
|
|
16
|
-
* ## Example
|
|
17
|
-
* ```ts
|
|
18
|
-
* const api = new ApiClient({ authProvider });
|
|
19
|
-
* const { data: predictions } = await api.helix.predictions.getPredictions('61369223');
|
|
20
|
-
* ```
|
|
21
|
-
*
|
|
22
|
-
* @meta category helix
|
|
23
|
-
* @meta categorizedTitle Predictions
|
|
24
|
-
*/
|
|
25
|
-
let HelixPredictionApi = class HelixPredictionApi extends BaseApi {
|
|
26
|
-
/**
|
|
27
|
-
* Gets a list of predictions for the given broadcaster.
|
|
28
|
-
*
|
|
29
|
-
* @param broadcaster The broadcaster to get predictions for.
|
|
30
|
-
* @param pagination
|
|
31
|
-
*
|
|
32
|
-
* @expandParams
|
|
33
|
-
*/
|
|
34
|
-
async getPredictions(broadcaster, pagination) {
|
|
35
|
-
const result = await this._client.callApi({
|
|
36
|
-
type: 'helix',
|
|
37
|
-
url: 'predictions',
|
|
38
|
-
userId: extractUserId(broadcaster),
|
|
39
|
-
scopes: ['channel:read:predictions'],
|
|
40
|
-
query: {
|
|
41
|
-
...createBroadcasterQuery(broadcaster),
|
|
42
|
-
...createPaginationQuery(pagination),
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
return createPaginatedResult(result, HelixPrediction, this._client);
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Creates a paginator for predictions for the given broadcaster.
|
|
49
|
-
*
|
|
50
|
-
* @param broadcaster The broadcaster to get predictions for.
|
|
51
|
-
*/
|
|
52
|
-
getPredictionsPaginated(broadcaster) {
|
|
53
|
-
return new HelixPaginatedRequest({
|
|
54
|
-
url: 'predictions',
|
|
55
|
-
userId: extractUserId(broadcaster),
|
|
56
|
-
scopes: ['channel:read:predictions'],
|
|
57
|
-
query: createBroadcasterQuery(broadcaster),
|
|
58
|
-
}, this._client, data => new HelixPrediction(data, this._client), 20);
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Gets predictions by IDs.
|
|
62
|
-
*
|
|
63
|
-
* @param broadcaster The broadcaster to get the predictions for.
|
|
64
|
-
* @param ids The IDs of the predictions.
|
|
65
|
-
*/
|
|
66
|
-
async getPredictionsByIds(broadcaster, ids) {
|
|
67
|
-
if (!ids.length) {
|
|
68
|
-
return [];
|
|
69
|
-
}
|
|
70
|
-
const result = await this._client.callApi({
|
|
71
|
-
type: 'helix',
|
|
72
|
-
url: 'predictions',
|
|
73
|
-
userId: extractUserId(broadcaster),
|
|
74
|
-
scopes: ['channel:read:predictions'],
|
|
75
|
-
query: createGetByIdsQuery(broadcaster, ids),
|
|
76
|
-
});
|
|
77
|
-
return result.data.map(data => new HelixPrediction(data, this._client));
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Gets a prediction by ID.
|
|
81
|
-
*
|
|
82
|
-
* @param broadcaster The broadcaster to get the prediction for.
|
|
83
|
-
* @param id The ID of the prediction.
|
|
84
|
-
*/
|
|
85
|
-
async getPredictionById(broadcaster, id) {
|
|
86
|
-
const predictions = await this.getPredictionsByIds(broadcaster, [id]);
|
|
87
|
-
return predictions.length ? predictions[0] : null;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Creates a new prediction.
|
|
91
|
-
*
|
|
92
|
-
* @param broadcaster The broadcaster to create the prediction for.
|
|
93
|
-
* @param data
|
|
94
|
-
*
|
|
95
|
-
* @expandParams
|
|
96
|
-
*/
|
|
97
|
-
async createPrediction(broadcaster, data) {
|
|
98
|
-
const result = await this._client.callApi({
|
|
99
|
-
type: 'helix',
|
|
100
|
-
url: 'predictions',
|
|
101
|
-
method: 'POST',
|
|
102
|
-
userId: extractUserId(broadcaster),
|
|
103
|
-
scopes: ['channel:manage:predictions'],
|
|
104
|
-
jsonBody: createPredictionBody(broadcaster, data),
|
|
105
|
-
});
|
|
106
|
-
return new HelixPrediction(result.data[0], this._client);
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Locks a prediction.
|
|
110
|
-
*
|
|
111
|
-
* @param broadcaster The broadcaster to lock the prediction for.
|
|
112
|
-
* @param id The ID of the prediction to lock.
|
|
113
|
-
*/
|
|
114
|
-
async lockPrediction(broadcaster, id) {
|
|
115
|
-
return await this._endPrediction(broadcaster, id, 'LOCKED');
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Resolves a prediction.
|
|
119
|
-
*
|
|
120
|
-
* @param broadcaster The broadcaster to resolve the prediction for.
|
|
121
|
-
* @param id The ID of the prediction to resolve.
|
|
122
|
-
* @param outcomeId The ID of the winning outcome.
|
|
123
|
-
*/
|
|
124
|
-
async resolvePrediction(broadcaster, id, outcomeId) {
|
|
125
|
-
return await this._endPrediction(broadcaster, id, 'RESOLVED', outcomeId);
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Cancels a prediction.
|
|
129
|
-
*
|
|
130
|
-
* @param broadcaster The broadcaster to cancel the prediction for.
|
|
131
|
-
* @param id The ID of the prediction to cancel.
|
|
132
|
-
*/
|
|
133
|
-
async cancelPrediction(broadcaster, id) {
|
|
134
|
-
return await this._endPrediction(broadcaster, id, 'CANCELED');
|
|
135
|
-
}
|
|
136
|
-
async _endPrediction(broadcaster, id, status, outcomeId) {
|
|
137
|
-
const result = await this._client.callApi({
|
|
138
|
-
type: 'helix',
|
|
139
|
-
url: 'predictions',
|
|
140
|
-
method: 'PATCH',
|
|
141
|
-
userId: extractUserId(broadcaster),
|
|
142
|
-
scopes: ['channel:manage:predictions'],
|
|
143
|
-
jsonBody: createEndPredictionBody(broadcaster, id, status, outcomeId),
|
|
144
|
-
});
|
|
145
|
-
return new HelixPrediction(result.data[0], this._client);
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
HelixPredictionApi = __decorate([
|
|
149
|
-
rtfm('api', 'HelixPredictionApi')
|
|
150
|
-
], HelixPredictionApi);
|
|
151
|
-
export { HelixPredictionApi };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { DataObject } from '@twurple/common';
|
|
2
|
-
import { type HelixPredictionOutcomeColor, type HelixPredictionOutcomeData } from '../../interfaces/endpoints/prediction.external.js';
|
|
3
|
-
import { HelixPredictor } from './HelixPredictor.js';
|
|
4
|
-
/**
|
|
5
|
-
* A possible outcome in a channel prediction.
|
|
6
|
-
*/
|
|
7
|
-
export declare class HelixPredictionOutcome extends DataObject<HelixPredictionOutcomeData> {
|
|
8
|
-
/**
|
|
9
|
-
* The ID of the outcome.
|
|
10
|
-
*/
|
|
11
|
-
get id(): string;
|
|
12
|
-
/**
|
|
13
|
-
* The title of the outcome.
|
|
14
|
-
*/
|
|
15
|
-
get title(): string;
|
|
16
|
-
/**
|
|
17
|
-
* The number of users that guessed the outcome.
|
|
18
|
-
*/
|
|
19
|
-
get users(): number;
|
|
20
|
-
/**
|
|
21
|
-
* The total number of channel points that were spent on guessing the outcome.
|
|
22
|
-
*/
|
|
23
|
-
get totalChannelPoints(): number;
|
|
24
|
-
/**
|
|
25
|
-
* The color of the outcome.
|
|
26
|
-
*/
|
|
27
|
-
get color(): HelixPredictionOutcomeColor;
|
|
28
|
-
/**
|
|
29
|
-
* The top predictors of the outcome.
|
|
30
|
-
*/
|
|
31
|
-
get topPredictors(): HelixPredictor[];
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=HelixPredictionOutcome.d.ts.map
|