@openclaw/twitch 2026.7.1-beta.6 → 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,167 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
import type { Logger } from '@d-fischer/logger';
|
|
3
|
-
import { type RateLimiter, type RateLimiterStats } from '@d-fischer/rate-limiter';
|
|
4
|
-
import { EventEmitter } from '@d-fischer/typed-event-emitter';
|
|
5
|
-
import { type AuthProvider, TokenInfo } from '@twurple/auth';
|
|
6
|
-
import { type UserIdResolvable } from '@twurple/common';
|
|
7
|
-
import { HelixBitsApi } from '../endpoints/bits/HelixBitsApi.js';
|
|
8
|
-
import { HelixChannelApi } from '../endpoints/channel/HelixChannelApi.js';
|
|
9
|
-
import { HelixChannelPointsApi } from '../endpoints/channelPoints/HelixChannelPointsApi.js';
|
|
10
|
-
import { HelixCharityApi } from '../endpoints/charity/HelixCharityApi.js';
|
|
11
|
-
import { HelixChatApi } from '../endpoints/chat/HelixChatApi.js';
|
|
12
|
-
import { HelixClipApi } from '../endpoints/clip/HelixClipApi.js';
|
|
13
|
-
import { HelixContentClassificationLabelApi } from '../endpoints/contentClassificationLabels/HelixContentClassificationLabelApi.js';
|
|
14
|
-
import { HelixEntitlementApi } from '../endpoints/entitlements/HelixEntitlementApi.js';
|
|
15
|
-
import { HelixEventSubApi } from '../endpoints/eventSub/HelixEventSubApi.js';
|
|
16
|
-
import { HelixExtensionsApi } from '../endpoints/extensions/HelixExtensionsApi.js';
|
|
17
|
-
import { HelixGameApi } from '../endpoints/game/HelixGameApi.js';
|
|
18
|
-
import { HelixGoalApi } from '../endpoints/goals/HelixGoalApi.js';
|
|
19
|
-
import { HelixHypeTrainApi } from '../endpoints/hypeTrain/HelixHypeTrainApi.js';
|
|
20
|
-
import { HelixModerationApi } from '../endpoints/moderation/HelixModerationApi.js';
|
|
21
|
-
import { HelixPollApi } from '../endpoints/poll/HelixPollApi.js';
|
|
22
|
-
import { HelixPredictionApi } from '../endpoints/prediction/HelixPredictionApi.js';
|
|
23
|
-
import { HelixRaidApi } from '../endpoints/raids/HelixRaidApi.js';
|
|
24
|
-
import { HelixScheduleApi } from '../endpoints/schedule/HelixScheduleApi.js';
|
|
25
|
-
import { HelixSearchApi } from '../endpoints/search/HelixSearchApi.js';
|
|
26
|
-
import { HelixStreamApi } from '../endpoints/stream/HelixStreamApi.js';
|
|
27
|
-
import { HelixSubscriptionApi } from '../endpoints/subscriptions/HelixSubscriptionApi.js';
|
|
28
|
-
import { HelixTeamApi } from '../endpoints/team/HelixTeamApi.js';
|
|
29
|
-
import { HelixUserApi } from '../endpoints/user/HelixUserApi.js';
|
|
30
|
-
import { HelixVideoApi } from '../endpoints/video/HelixVideoApi.js';
|
|
31
|
-
import { HelixWhisperApi } from '../endpoints/whisper/HelixWhisperApi.js';
|
|
32
|
-
import { ApiReportedRequest } from '../reporting/ApiReportedRequest.js';
|
|
33
|
-
import { type ApiConfig, type TwitchApiCallOptionsInternal } from './ApiClient.js';
|
|
34
|
-
import { type ContextApiCallOptions } from './ContextApiCallOptions.js';
|
|
35
|
-
/** @private */
|
|
36
|
-
export declare class BaseApiClient extends EventEmitter {
|
|
37
|
-
protected readonly _config: ApiConfig;
|
|
38
|
-
protected readonly _logger: Logger;
|
|
39
|
-
protected readonly _rateLimiter: RateLimiter<TwitchApiCallOptionsInternal, Response>;
|
|
40
|
-
readonly onRequest: import("@d-fischer/typed-event-emitter").EventBinder<[request: ApiReportedRequest]>;
|
|
41
|
-
/**
|
|
42
|
-
* Requests scopes from the auth provider for the given user.
|
|
43
|
-
*
|
|
44
|
-
* @param user The user to request scopes for.
|
|
45
|
-
* @param scopes The scopes to request.
|
|
46
|
-
*/
|
|
47
|
-
requestScopesForUser(user: UserIdResolvable, scopes: string[]): Promise<void>;
|
|
48
|
-
/**
|
|
49
|
-
* Gets information about your access token.
|
|
50
|
-
*/
|
|
51
|
-
getTokenInfo(): Promise<TokenInfo>;
|
|
52
|
-
/**
|
|
53
|
-
* Makes a call to the Twitch API using your access token.
|
|
54
|
-
*
|
|
55
|
-
* @param options The configuration of the call.
|
|
56
|
-
*/
|
|
57
|
-
callApi<T = unknown>(options: ContextApiCallOptions): Promise<T>;
|
|
58
|
-
/**
|
|
59
|
-
* The Helix bits API methods.
|
|
60
|
-
*/
|
|
61
|
-
get bits(): HelixBitsApi;
|
|
62
|
-
/**
|
|
63
|
-
* The Helix channels API methods.
|
|
64
|
-
*/
|
|
65
|
-
get channels(): HelixChannelApi;
|
|
66
|
-
/**
|
|
67
|
-
* The Helix channel points API methods.
|
|
68
|
-
*/
|
|
69
|
-
get channelPoints(): HelixChannelPointsApi;
|
|
70
|
-
/**
|
|
71
|
-
* The Helix charity API methods.
|
|
72
|
-
*/
|
|
73
|
-
get charity(): HelixCharityApi;
|
|
74
|
-
/**
|
|
75
|
-
* The Helix chat API methods.
|
|
76
|
-
*/
|
|
77
|
-
get chat(): HelixChatApi;
|
|
78
|
-
/**
|
|
79
|
-
* The Helix clips API methods.
|
|
80
|
-
*/
|
|
81
|
-
get clips(): HelixClipApi;
|
|
82
|
-
/**
|
|
83
|
-
* The Helix content classification label API methods.
|
|
84
|
-
*/
|
|
85
|
-
get contentClassificationLabels(): HelixContentClassificationLabelApi;
|
|
86
|
-
/**
|
|
87
|
-
* The Helix entitlement API methods.
|
|
88
|
-
*/
|
|
89
|
-
get entitlements(): HelixEntitlementApi;
|
|
90
|
-
/**
|
|
91
|
-
* The Helix EventSub API methods.
|
|
92
|
-
*/
|
|
93
|
-
get eventSub(): HelixEventSubApi;
|
|
94
|
-
/**
|
|
95
|
-
* The Helix extensions API methods.
|
|
96
|
-
*/
|
|
97
|
-
get extensions(): HelixExtensionsApi;
|
|
98
|
-
/**
|
|
99
|
-
* The Helix game API methods.
|
|
100
|
-
*/
|
|
101
|
-
get games(): HelixGameApi;
|
|
102
|
-
/**
|
|
103
|
-
* The Helix Hype Train API methods.
|
|
104
|
-
*/
|
|
105
|
-
get hypeTrain(): HelixHypeTrainApi;
|
|
106
|
-
/**
|
|
107
|
-
* The Helix goal API methods.
|
|
108
|
-
*/
|
|
109
|
-
get goals(): HelixGoalApi;
|
|
110
|
-
/**
|
|
111
|
-
* The Helix moderation API methods.
|
|
112
|
-
*/
|
|
113
|
-
get moderation(): HelixModerationApi;
|
|
114
|
-
/**
|
|
115
|
-
* The Helix poll API methods.
|
|
116
|
-
*/
|
|
117
|
-
get polls(): HelixPollApi;
|
|
118
|
-
/**
|
|
119
|
-
* The Helix prediction API methods.
|
|
120
|
-
*/
|
|
121
|
-
get predictions(): HelixPredictionApi;
|
|
122
|
-
/**
|
|
123
|
-
* The Helix raid API methods.
|
|
124
|
-
*/
|
|
125
|
-
get raids(): HelixRaidApi;
|
|
126
|
-
/**
|
|
127
|
-
* The Helix schedule API methods.
|
|
128
|
-
*/
|
|
129
|
-
get schedule(): HelixScheduleApi;
|
|
130
|
-
/**
|
|
131
|
-
* The Helix search API methods.
|
|
132
|
-
*/
|
|
133
|
-
get search(): HelixSearchApi;
|
|
134
|
-
/**
|
|
135
|
-
* The Helix stream API methods.
|
|
136
|
-
*/
|
|
137
|
-
get streams(): HelixStreamApi;
|
|
138
|
-
/**
|
|
139
|
-
* The Helix subscription API methods.
|
|
140
|
-
*/
|
|
141
|
-
get subscriptions(): HelixSubscriptionApi;
|
|
142
|
-
/**
|
|
143
|
-
* The Helix team API methods.
|
|
144
|
-
*/
|
|
145
|
-
get teams(): HelixTeamApi;
|
|
146
|
-
/**
|
|
147
|
-
* The Helix user API methods.
|
|
148
|
-
*/
|
|
149
|
-
get users(): HelixUserApi;
|
|
150
|
-
/**
|
|
151
|
-
* The Helix video API methods.
|
|
152
|
-
*/
|
|
153
|
-
get videos(): HelixVideoApi;
|
|
154
|
-
/**
|
|
155
|
-
* The API methods that deal with whispers.
|
|
156
|
-
*/
|
|
157
|
-
get whispers(): HelixWhisperApi;
|
|
158
|
-
/**
|
|
159
|
-
* Statistics on the rate limiter for the Helix API.
|
|
160
|
-
*/
|
|
161
|
-
get rateLimiterStats(): RateLimiterStats | null;
|
|
162
|
-
/** @private */
|
|
163
|
-
get _authProvider(): AuthProvider;
|
|
164
|
-
private _callApiUsingInitialToken;
|
|
165
|
-
private _callApiInternal;
|
|
166
|
-
}
|
|
167
|
-
//# sourceMappingURL=BaseApiClient.d.ts.map
|
|
@@ -1,446 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { Cacheable, CachedGetter } from '@d-fischer/cache-decorators';
|
|
3
|
-
import { ResponseBasedRateLimiter } from '@d-fischer/rate-limiter';
|
|
4
|
-
import { promiseWithResolvers } from '@d-fischer/shared-utils';
|
|
5
|
-
import { EventEmitter } from '@d-fischer/typed-event-emitter';
|
|
6
|
-
import { callTwitchApi, callTwitchApiRaw, handleTwitchApiResponseError, HttpStatusCodeError, transformTwitchApiResponse, } from '@twurple/api-call';
|
|
7
|
-
import { accessTokenIsExpired, InvalidTokenError, TokenInfo, } from '@twurple/auth';
|
|
8
|
-
import { HellFreezesOverError, rtfm } from '@twurple/common';
|
|
9
|
-
import * as retry from 'retry';
|
|
10
|
-
import { HelixBitsApi } from '../endpoints/bits/HelixBitsApi.js';
|
|
11
|
-
import { HelixChannelApi } from '../endpoints/channel/HelixChannelApi.js';
|
|
12
|
-
import { HelixChannelPointsApi } from '../endpoints/channelPoints/HelixChannelPointsApi.js';
|
|
13
|
-
import { HelixCharityApi } from '../endpoints/charity/HelixCharityApi.js';
|
|
14
|
-
import { HelixChatApi } from '../endpoints/chat/HelixChatApi.js';
|
|
15
|
-
import { HelixClipApi } from '../endpoints/clip/HelixClipApi.js';
|
|
16
|
-
import { HelixContentClassificationLabelApi } from '../endpoints/contentClassificationLabels/HelixContentClassificationLabelApi.js';
|
|
17
|
-
import { HelixEntitlementApi } from '../endpoints/entitlements/HelixEntitlementApi.js';
|
|
18
|
-
import { HelixEventSubApi } from '../endpoints/eventSub/HelixEventSubApi.js';
|
|
19
|
-
import { HelixExtensionsApi } from '../endpoints/extensions/HelixExtensionsApi.js';
|
|
20
|
-
import { HelixGameApi } from '../endpoints/game/HelixGameApi.js';
|
|
21
|
-
import { HelixGoalApi } from '../endpoints/goals/HelixGoalApi.js';
|
|
22
|
-
import { HelixHypeTrainApi } from '../endpoints/hypeTrain/HelixHypeTrainApi.js';
|
|
23
|
-
import { HelixModerationApi } from '../endpoints/moderation/HelixModerationApi.js';
|
|
24
|
-
import { HelixPollApi } from '../endpoints/poll/HelixPollApi.js';
|
|
25
|
-
import { HelixPredictionApi } from '../endpoints/prediction/HelixPredictionApi.js';
|
|
26
|
-
import { HelixRaidApi } from '../endpoints/raids/HelixRaidApi.js';
|
|
27
|
-
import { HelixScheduleApi } from '../endpoints/schedule/HelixScheduleApi.js';
|
|
28
|
-
import { HelixSearchApi } from '../endpoints/search/HelixSearchApi.js';
|
|
29
|
-
import { HelixStreamApi } from '../endpoints/stream/HelixStreamApi.js';
|
|
30
|
-
import { HelixSubscriptionApi } from '../endpoints/subscriptions/HelixSubscriptionApi.js';
|
|
31
|
-
import { HelixTeamApi } from '../endpoints/team/HelixTeamApi.js';
|
|
32
|
-
import { HelixUserApi } from '../endpoints/user/HelixUserApi.js';
|
|
33
|
-
import { HelixVideoApi } from '../endpoints/video/HelixVideoApi.js';
|
|
34
|
-
import { HelixWhisperApi } from '../endpoints/whisper/HelixWhisperApi.js';
|
|
35
|
-
import { ApiReportedRequest } from '../reporting/ApiReportedRequest.js';
|
|
36
|
-
/** @private */
|
|
37
|
-
let BaseApiClient = class BaseApiClient extends EventEmitter {
|
|
38
|
-
_config;
|
|
39
|
-
_logger;
|
|
40
|
-
_rateLimiter;
|
|
41
|
-
onRequest = this.registerEvent();
|
|
42
|
-
/** @internal */
|
|
43
|
-
constructor(config, logger, rateLimiter) {
|
|
44
|
-
super();
|
|
45
|
-
this._config = config;
|
|
46
|
-
this._logger = logger;
|
|
47
|
-
this._rateLimiter = rateLimiter;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Requests scopes from the auth provider for the given user.
|
|
51
|
-
*
|
|
52
|
-
* @param user The user to request scopes for.
|
|
53
|
-
* @param scopes The scopes to request.
|
|
54
|
-
*/
|
|
55
|
-
async requestScopesForUser(user, scopes) {
|
|
56
|
-
await this._config.authProvider.getAccessTokenForUser(user, ...scopes.map(scope => [scope]));
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Gets information about your access token.
|
|
60
|
-
*/
|
|
61
|
-
async getTokenInfo() {
|
|
62
|
-
try {
|
|
63
|
-
const data = await this.callApi({ type: 'auth', url: 'validate' });
|
|
64
|
-
return new TokenInfo(data);
|
|
65
|
-
}
|
|
66
|
-
catch (e) {
|
|
67
|
-
if (e instanceof HttpStatusCodeError && e.statusCode === 401) {
|
|
68
|
-
throw new InvalidTokenError({ cause: e });
|
|
69
|
-
}
|
|
70
|
-
throw e;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Makes a call to the Twitch API using your access token.
|
|
75
|
-
*
|
|
76
|
-
* @param options The configuration of the call.
|
|
77
|
-
*/
|
|
78
|
-
async callApi(options) {
|
|
79
|
-
const { authProvider } = this._config;
|
|
80
|
-
const shouldAuth = options.auth ?? true;
|
|
81
|
-
if (!shouldAuth) {
|
|
82
|
-
return await callTwitchApi(options, authProvider.clientId, undefined, undefined, this._config.fetchOptions);
|
|
83
|
-
}
|
|
84
|
-
let forceUser = false;
|
|
85
|
-
if (options.forceType) {
|
|
86
|
-
switch (options.forceType) {
|
|
87
|
-
case 'app': {
|
|
88
|
-
if (!authProvider.getAppAccessToken) {
|
|
89
|
-
throw new Error('Tried to make an API call that requires an app access token but your auth provider does not support that');
|
|
90
|
-
}
|
|
91
|
-
const accessToken = await authProvider.getAppAccessToken();
|
|
92
|
-
return await this._callApiUsingInitialToken(options, accessToken);
|
|
93
|
-
}
|
|
94
|
-
case 'user': {
|
|
95
|
-
forceUser = true;
|
|
96
|
-
break;
|
|
97
|
-
}
|
|
98
|
-
default: {
|
|
99
|
-
throw new HellFreezesOverError(`Unknown forced token type: ${options.forceType}`);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
if (options.scopes) {
|
|
104
|
-
forceUser = true;
|
|
105
|
-
}
|
|
106
|
-
if (forceUser) {
|
|
107
|
-
const contextUserId = options.canOverrideScopedUserContext
|
|
108
|
-
? this._getUserIdFromRequestContext(options.userId)
|
|
109
|
-
: options.userId;
|
|
110
|
-
if (!contextUserId) {
|
|
111
|
-
throw new Error('Tried to make an API call with a user context but no context user ID');
|
|
112
|
-
}
|
|
113
|
-
const accessToken = await authProvider.getAccessTokenForUser(contextUserId, options.scopes);
|
|
114
|
-
if (!accessToken) {
|
|
115
|
-
throw new Error(`Tried to make an API call with a user context for user ID ${contextUserId} but no token was found`);
|
|
116
|
-
}
|
|
117
|
-
if (accessTokenIsExpired(accessToken) && authProvider.refreshAccessTokenForUser) {
|
|
118
|
-
const newAccessToken = await authProvider.refreshAccessTokenForUser(contextUserId);
|
|
119
|
-
return await this._callApiUsingInitialToken(options, newAccessToken, true);
|
|
120
|
-
}
|
|
121
|
-
return await this._callApiUsingInitialToken(options, accessToken);
|
|
122
|
-
}
|
|
123
|
-
const requestContextUserId = this._getUserIdFromRequestContext(options.userId);
|
|
124
|
-
const accessToken = requestContextUserId === null
|
|
125
|
-
? await authProvider.getAnyAccessToken()
|
|
126
|
-
: await authProvider.getAnyAccessToken(requestContextUserId ?? options.userId);
|
|
127
|
-
if (accessTokenIsExpired(accessToken) && accessToken.userId && authProvider.refreshAccessTokenForUser) {
|
|
128
|
-
const newAccessToken = await authProvider.refreshAccessTokenForUser(accessToken.userId);
|
|
129
|
-
return await this._callApiUsingInitialToken(options, newAccessToken, true);
|
|
130
|
-
}
|
|
131
|
-
return await this._callApiUsingInitialToken(options, accessToken);
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* The Helix bits API methods.
|
|
135
|
-
*/
|
|
136
|
-
get bits() {
|
|
137
|
-
return new HelixBitsApi(this);
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* The Helix channels API methods.
|
|
141
|
-
*/
|
|
142
|
-
get channels() {
|
|
143
|
-
return new HelixChannelApi(this);
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* The Helix channel points API methods.
|
|
147
|
-
*/
|
|
148
|
-
get channelPoints() {
|
|
149
|
-
return new HelixChannelPointsApi(this);
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* The Helix charity API methods.
|
|
153
|
-
*/
|
|
154
|
-
get charity() {
|
|
155
|
-
return new HelixCharityApi(this);
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* The Helix chat API methods.
|
|
159
|
-
*/
|
|
160
|
-
get chat() {
|
|
161
|
-
return new HelixChatApi(this);
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* The Helix clips API methods.
|
|
165
|
-
*/
|
|
166
|
-
get clips() {
|
|
167
|
-
return new HelixClipApi(this);
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* The Helix content classification label API methods.
|
|
171
|
-
*/
|
|
172
|
-
get contentClassificationLabels() {
|
|
173
|
-
return new HelixContentClassificationLabelApi(this);
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* The Helix entitlement API methods.
|
|
177
|
-
*/
|
|
178
|
-
get entitlements() {
|
|
179
|
-
return new HelixEntitlementApi(this);
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* The Helix EventSub API methods.
|
|
183
|
-
*/
|
|
184
|
-
get eventSub() {
|
|
185
|
-
return new HelixEventSubApi(this);
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* The Helix extensions API methods.
|
|
189
|
-
*/
|
|
190
|
-
get extensions() {
|
|
191
|
-
return new HelixExtensionsApi(this);
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* The Helix game API methods.
|
|
195
|
-
*/
|
|
196
|
-
get games() {
|
|
197
|
-
return new HelixGameApi(this);
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* The Helix Hype Train API methods.
|
|
201
|
-
*/
|
|
202
|
-
get hypeTrain() {
|
|
203
|
-
return new HelixHypeTrainApi(this);
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* The Helix goal API methods.
|
|
207
|
-
*/
|
|
208
|
-
get goals() {
|
|
209
|
-
return new HelixGoalApi(this);
|
|
210
|
-
}
|
|
211
|
-
/**
|
|
212
|
-
* The Helix moderation API methods.
|
|
213
|
-
*/
|
|
214
|
-
get moderation() {
|
|
215
|
-
return new HelixModerationApi(this);
|
|
216
|
-
}
|
|
217
|
-
/**
|
|
218
|
-
* The Helix poll API methods.
|
|
219
|
-
*/
|
|
220
|
-
get polls() {
|
|
221
|
-
return new HelixPollApi(this);
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* The Helix prediction API methods.
|
|
225
|
-
*/
|
|
226
|
-
get predictions() {
|
|
227
|
-
return new HelixPredictionApi(this);
|
|
228
|
-
}
|
|
229
|
-
/**
|
|
230
|
-
* The Helix raid API methods.
|
|
231
|
-
*/
|
|
232
|
-
get raids() {
|
|
233
|
-
return new HelixRaidApi(this);
|
|
234
|
-
}
|
|
235
|
-
/**
|
|
236
|
-
* The Helix schedule API methods.
|
|
237
|
-
*/
|
|
238
|
-
get schedule() {
|
|
239
|
-
return new HelixScheduleApi(this);
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* The Helix search API methods.
|
|
243
|
-
*/
|
|
244
|
-
get search() {
|
|
245
|
-
return new HelixSearchApi(this);
|
|
246
|
-
}
|
|
247
|
-
/**
|
|
248
|
-
* The Helix stream API methods.
|
|
249
|
-
*/
|
|
250
|
-
get streams() {
|
|
251
|
-
return new HelixStreamApi(this);
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* The Helix subscription API methods.
|
|
255
|
-
*/
|
|
256
|
-
get subscriptions() {
|
|
257
|
-
return new HelixSubscriptionApi(this);
|
|
258
|
-
}
|
|
259
|
-
/**
|
|
260
|
-
* The Helix team API methods.
|
|
261
|
-
*/
|
|
262
|
-
get teams() {
|
|
263
|
-
return new HelixTeamApi(this);
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* The Helix user API methods.
|
|
267
|
-
*/
|
|
268
|
-
get users() {
|
|
269
|
-
return new HelixUserApi(this);
|
|
270
|
-
}
|
|
271
|
-
/**
|
|
272
|
-
* The Helix video API methods.
|
|
273
|
-
*/
|
|
274
|
-
get videos() {
|
|
275
|
-
return new HelixVideoApi(this);
|
|
276
|
-
}
|
|
277
|
-
/**
|
|
278
|
-
* The API methods that deal with whispers.
|
|
279
|
-
*/
|
|
280
|
-
get whispers() {
|
|
281
|
-
return new HelixWhisperApi(this);
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
* Statistics on the rate limiter for the Helix API.
|
|
285
|
-
*/
|
|
286
|
-
get rateLimiterStats() {
|
|
287
|
-
if (this._rateLimiter instanceof ResponseBasedRateLimiter) {
|
|
288
|
-
return this._rateLimiter.stats;
|
|
289
|
-
}
|
|
290
|
-
return null;
|
|
291
|
-
}
|
|
292
|
-
/** @private */
|
|
293
|
-
get _authProvider() {
|
|
294
|
-
return this._config.authProvider;
|
|
295
|
-
}
|
|
296
|
-
/** @internal */
|
|
297
|
-
get _batchDelay() {
|
|
298
|
-
return this._config.batchDelay ?? 0;
|
|
299
|
-
}
|
|
300
|
-
// null means app access, undefined means none specified
|
|
301
|
-
/** @internal */
|
|
302
|
-
_getUserIdFromRequestContext(contextUserId) {
|
|
303
|
-
return contextUserId;
|
|
304
|
-
}
|
|
305
|
-
async _callApiUsingInitialToken(options, accessToken, wasRefreshed = false) {
|
|
306
|
-
const { authProvider } = this._config;
|
|
307
|
-
const { authorizationType } = authProvider;
|
|
308
|
-
let response = await this._callApiInternal(options, authProvider.clientId, accessToken.accessToken, authorizationType);
|
|
309
|
-
if (response.status === 401 && !wasRefreshed) {
|
|
310
|
-
if (accessToken.userId) {
|
|
311
|
-
if (authProvider.refreshAccessTokenForUser) {
|
|
312
|
-
const token = await authProvider.refreshAccessTokenForUser(accessToken.userId);
|
|
313
|
-
response = await this._callApiInternal(options, authProvider.clientId, token.accessToken, authorizationType);
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
else if (authProvider.getAppAccessToken) {
|
|
317
|
-
const token = await authProvider.getAppAccessToken(true);
|
|
318
|
-
response = await this._callApiInternal(options, authProvider.clientId, token.accessToken, authorizationType);
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
this.emit(this.onRequest, new ApiReportedRequest(options, response.status, accessToken.userId ?? null));
|
|
322
|
-
await handleTwitchApiResponseError(response, options);
|
|
323
|
-
return await transformTwitchApiResponse(response);
|
|
324
|
-
}
|
|
325
|
-
async _callApiInternal(options, clientId, accessToken, authorizationType) {
|
|
326
|
-
const { fetchOptions } = this._config;
|
|
327
|
-
const type = options.type ?? 'helix';
|
|
328
|
-
this._logger.debug(`Calling ${type} API: ${options.method ?? 'GET'} ${options.url}`);
|
|
329
|
-
this._logger.trace(`Query: ${JSON.stringify(options.query)}`);
|
|
330
|
-
if (options.jsonBody) {
|
|
331
|
-
this._logger.trace(`Request body: ${JSON.stringify(options.jsonBody)}`);
|
|
332
|
-
}
|
|
333
|
-
const op = retry.operation({
|
|
334
|
-
retries: 3,
|
|
335
|
-
minTimeout: 500,
|
|
336
|
-
factor: 2,
|
|
337
|
-
});
|
|
338
|
-
const { promise, resolve, reject } = promiseWithResolvers();
|
|
339
|
-
op.attempt(async () => {
|
|
340
|
-
try {
|
|
341
|
-
const response = type === 'helix'
|
|
342
|
-
? await this._rateLimiter.request({
|
|
343
|
-
options,
|
|
344
|
-
clientId,
|
|
345
|
-
accessToken,
|
|
346
|
-
authorizationType,
|
|
347
|
-
fetchOptions,
|
|
348
|
-
})
|
|
349
|
-
: await callTwitchApiRaw(options, clientId, accessToken, authorizationType, fetchOptions);
|
|
350
|
-
if (!response.ok && response.status >= 500 && response.status < 600) {
|
|
351
|
-
await handleTwitchApiResponseError(response, options);
|
|
352
|
-
}
|
|
353
|
-
resolve(response);
|
|
354
|
-
}
|
|
355
|
-
catch (e) {
|
|
356
|
-
if (op.retry(e)) {
|
|
357
|
-
return;
|
|
358
|
-
}
|
|
359
|
-
reject(op.mainError());
|
|
360
|
-
}
|
|
361
|
-
});
|
|
362
|
-
const result = await promise;
|
|
363
|
-
this._logger.debug(`Called ${type} API: ${options.method ?? 'GET'} ${options.url} - result: ${result.status}`);
|
|
364
|
-
return result;
|
|
365
|
-
}
|
|
366
|
-
};
|
|
367
|
-
__decorate([
|
|
368
|
-
CachedGetter()
|
|
369
|
-
], BaseApiClient.prototype, "bits", null);
|
|
370
|
-
__decorate([
|
|
371
|
-
CachedGetter()
|
|
372
|
-
], BaseApiClient.prototype, "channels", null);
|
|
373
|
-
__decorate([
|
|
374
|
-
CachedGetter()
|
|
375
|
-
], BaseApiClient.prototype, "channelPoints", null);
|
|
376
|
-
__decorate([
|
|
377
|
-
CachedGetter()
|
|
378
|
-
], BaseApiClient.prototype, "charity", null);
|
|
379
|
-
__decorate([
|
|
380
|
-
CachedGetter()
|
|
381
|
-
], BaseApiClient.prototype, "chat", null);
|
|
382
|
-
__decorate([
|
|
383
|
-
CachedGetter()
|
|
384
|
-
], BaseApiClient.prototype, "clips", null);
|
|
385
|
-
__decorate([
|
|
386
|
-
CachedGetter()
|
|
387
|
-
], BaseApiClient.prototype, "contentClassificationLabels", null);
|
|
388
|
-
__decorate([
|
|
389
|
-
CachedGetter()
|
|
390
|
-
], BaseApiClient.prototype, "entitlements", null);
|
|
391
|
-
__decorate([
|
|
392
|
-
CachedGetter()
|
|
393
|
-
], BaseApiClient.prototype, "eventSub", null);
|
|
394
|
-
__decorate([
|
|
395
|
-
CachedGetter()
|
|
396
|
-
], BaseApiClient.prototype, "extensions", null);
|
|
397
|
-
__decorate([
|
|
398
|
-
CachedGetter()
|
|
399
|
-
], BaseApiClient.prototype, "games", null);
|
|
400
|
-
__decorate([
|
|
401
|
-
CachedGetter()
|
|
402
|
-
], BaseApiClient.prototype, "hypeTrain", null);
|
|
403
|
-
__decorate([
|
|
404
|
-
CachedGetter()
|
|
405
|
-
], BaseApiClient.prototype, "goals", null);
|
|
406
|
-
__decorate([
|
|
407
|
-
CachedGetter()
|
|
408
|
-
], BaseApiClient.prototype, "moderation", null);
|
|
409
|
-
__decorate([
|
|
410
|
-
CachedGetter()
|
|
411
|
-
], BaseApiClient.prototype, "polls", null);
|
|
412
|
-
__decorate([
|
|
413
|
-
CachedGetter()
|
|
414
|
-
], BaseApiClient.prototype, "predictions", null);
|
|
415
|
-
__decorate([
|
|
416
|
-
CachedGetter()
|
|
417
|
-
], BaseApiClient.prototype, "raids", null);
|
|
418
|
-
__decorate([
|
|
419
|
-
CachedGetter()
|
|
420
|
-
], BaseApiClient.prototype, "schedule", null);
|
|
421
|
-
__decorate([
|
|
422
|
-
CachedGetter()
|
|
423
|
-
], BaseApiClient.prototype, "search", null);
|
|
424
|
-
__decorate([
|
|
425
|
-
CachedGetter()
|
|
426
|
-
], BaseApiClient.prototype, "streams", null);
|
|
427
|
-
__decorate([
|
|
428
|
-
CachedGetter()
|
|
429
|
-
], BaseApiClient.prototype, "subscriptions", null);
|
|
430
|
-
__decorate([
|
|
431
|
-
CachedGetter()
|
|
432
|
-
], BaseApiClient.prototype, "teams", null);
|
|
433
|
-
__decorate([
|
|
434
|
-
CachedGetter()
|
|
435
|
-
], BaseApiClient.prototype, "users", null);
|
|
436
|
-
__decorate([
|
|
437
|
-
CachedGetter()
|
|
438
|
-
], BaseApiClient.prototype, "videos", null);
|
|
439
|
-
__decorate([
|
|
440
|
-
CachedGetter()
|
|
441
|
-
], BaseApiClient.prototype, "whispers", null);
|
|
442
|
-
BaseApiClient = __decorate([
|
|
443
|
-
Cacheable,
|
|
444
|
-
rtfm('api', 'ApiClient')
|
|
445
|
-
], BaseApiClient);
|
|
446
|
-
export { BaseApiClient };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { type TwitchApiCallOptions } from '@twurple/api-call';
|
|
2
|
-
/**
|
|
3
|
-
* The definition of an API call intended to be called in the context of a specific user ID or of the app.
|
|
4
|
-
*
|
|
5
|
-
* @inheritDoc
|
|
6
|
-
*/
|
|
7
|
-
export interface ContextApiCallOptions extends TwitchApiCallOptions {
|
|
8
|
-
/**
|
|
9
|
-
* Require the call to be sent using an user/app access token.
|
|
10
|
-
*/
|
|
11
|
-
forceType?: 'user' | 'app';
|
|
12
|
-
/**
|
|
13
|
-
* The ID of the user to use as the context of the API call.
|
|
14
|
-
*/
|
|
15
|
-
userId?: string;
|
|
16
|
-
/**
|
|
17
|
-
* Whether user context can be overridden using `asUser` or `asIntent` even though scopes are set.
|
|
18
|
-
*/
|
|
19
|
-
canOverrideScopedUserContext?: boolean;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=ContextApiCallOptions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { rtfm } from '@twurple/common';
|
|
3
|
-
import { BaseApiClient } from './BaseApiClient.js';
|
|
4
|
-
/** @private */
|
|
5
|
-
let NoContextApiClient = class NoContextApiClient extends BaseApiClient {
|
|
6
|
-
/** @internal */
|
|
7
|
-
_getUserIdFromRequestContext() {
|
|
8
|
-
return null;
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
NoContextApiClient = __decorate([
|
|
12
|
-
rtfm('api', 'ApiClient')
|
|
13
|
-
], NoContextApiClient);
|
|
14
|
-
export { NoContextApiClient };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { rtfm } from '@twurple/common';
|
|
3
|
-
import { BaseApiClient } from './BaseApiClient.js';
|
|
4
|
-
/** @private */
|
|
5
|
-
let UserContextApiClient = class UserContextApiClient extends BaseApiClient {
|
|
6
|
-
_userId;
|
|
7
|
-
/** @internal */
|
|
8
|
-
constructor(config, logger, rateLimiter, _userId) {
|
|
9
|
-
super(config, logger, rateLimiter);
|
|
10
|
-
this._userId = _userId;
|
|
11
|
-
}
|
|
12
|
-
/** @internal */
|
|
13
|
-
_getUserIdFromRequestContext() {
|
|
14
|
-
return this._userId;
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
UserContextApiClient = __decorate([
|
|
18
|
-
rtfm('api', 'ApiClient')
|
|
19
|
-
], UserContextApiClient);
|
|
20
|
-
export { UserContextApiClient };
|