@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.
Files changed (359) hide show
  1. package/dist/api.js +1 -1
  2. package/dist/channel-plugin-api.js +1 -1
  3. package/dist/{monitor-DuF1m2_8.js → monitor-BL82UZIL.js} +6 -8
  4. package/dist/{plugin-C5o3rImF.js → plugin-DG2hXX7Z.js} +51 -31
  5. package/npm-shrinkwrap.json +3 -36
  6. package/package.json +6 -6
  7. package/node_modules/@twurple/api/LICENSE +0 -21
  8. package/node_modules/@twurple/api/README.md +0 -24
  9. package/node_modules/@twurple/api/lib/client/ApiClient.d.ts +0 -98
  10. package/node_modules/@twurple/api/lib/client/ApiClient.js +0 -107
  11. package/node_modules/@twurple/api/lib/client/BaseApiClient.d.ts +0 -167
  12. package/node_modules/@twurple/api/lib/client/BaseApiClient.js +0 -446
  13. package/node_modules/@twurple/api/lib/client/ContextApiCallOptions.d.ts +0 -21
  14. package/node_modules/@twurple/api/lib/client/ContextApiCallOptions.js +0 -1
  15. package/node_modules/@twurple/api/lib/client/NoContextApiClient.d.ts +0 -5
  16. package/node_modules/@twurple/api/lib/client/NoContextApiClient.js +0 -14
  17. package/node_modules/@twurple/api/lib/client/UserContextApiClient.d.ts +0 -6
  18. package/node_modules/@twurple/api/lib/client/UserContextApiClient.js +0 -20
  19. package/node_modules/@twurple/api/lib/endpoints/BaseApi.d.ts +0 -4
  20. package/node_modules/@twurple/api/lib/endpoints/BaseApi.js +0 -17
  21. package/node_modules/@twurple/api/lib/endpoints/bits/CheermoteDisplayInfo.d.ts +0 -48
  22. package/node_modules/@twurple/api/lib/endpoints/bits/CheermoteDisplayInfo.js +0 -1
  23. package/node_modules/@twurple/api/lib/endpoints/bits/HelixBitsApi.d.ts +0 -38
  24. package/node_modules/@twurple/api/lib/endpoints/bits/HelixBitsApi.js +0 -61
  25. package/node_modules/@twurple/api/lib/endpoints/bits/HelixBitsLeaderboard.d.ts +0 -17
  26. package/node_modules/@twurple/api/lib/endpoints/bits/HelixBitsLeaderboard.js +0 -39
  27. package/node_modules/@twurple/api/lib/endpoints/bits/HelixBitsLeaderboardEntry.d.ts +0 -33
  28. package/node_modules/@twurple/api/lib/endpoints/bits/HelixBitsLeaderboardEntry.js +0 -57
  29. package/node_modules/@twurple/api/lib/endpoints/bits/HelixCheermoteList.d.ts +0 -23
  30. package/node_modules/@twurple/api/lib/endpoints/bits/HelixCheermoteList.js +0 -44
  31. package/node_modules/@twurple/api/lib/endpoints/channel/HelixAdSchedule.d.ts +0 -35
  32. package/node_modules/@twurple/api/lib/endpoints/channel/HelixAdSchedule.js +0 -50
  33. package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannel.d.ts +0 -64
  34. package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannel.js +0 -103
  35. package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannelApi.d.ts +0 -185
  36. package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannelApi.js +0 -371
  37. package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannelEditor.d.ts +0 -25
  38. package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannelEditor.js +0 -45
  39. package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannelFollower.d.ts +0 -29
  40. package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannelFollower.js +0 -51
  41. package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannelReference.d.ts +0 -43
  42. package/node_modules/@twurple/api/lib/endpoints/channel/HelixChannelReference.js +0 -71
  43. package/node_modules/@twurple/api/lib/endpoints/channel/HelixFollowedChannel.d.ts +0 -29
  44. package/node_modules/@twurple/api/lib/endpoints/channel/HelixFollowedChannel.js +0 -51
  45. package/node_modules/@twurple/api/lib/endpoints/channel/HelixSnoozeNextAdResult.d.ts +0 -20
  46. package/node_modules/@twurple/api/lib/endpoints/channel/HelixSnoozeNextAdResult.js +0 -29
  47. package/node_modules/@twurple/api/lib/endpoints/channelPoints/HelixChannelPointsApi.d.ts +0 -117
  48. package/node_modules/@twurple/api/lib/endpoints/channelPoints/HelixChannelPointsApi.js +0 -228
  49. package/node_modules/@twurple/api/lib/endpoints/channelPoints/HelixCustomReward.d.ts +0 -94
  50. package/node_modules/@twurple/api/lib/endpoints/channelPoints/HelixCustomReward.js +0 -152
  51. package/node_modules/@twurple/api/lib/endpoints/channelPoints/HelixCustomRewardRedemption.d.ts +0 -88
  52. package/node_modules/@twurple/api/lib/endpoints/channelPoints/HelixCustomRewardRedemption.js +0 -138
  53. package/node_modules/@twurple/api/lib/endpoints/charity/HelixCharityApi.d.ts +0 -39
  54. package/node_modules/@twurple/api/lib/endpoints/charity/HelixCharityApi.js +0 -66
  55. package/node_modules/@twurple/api/lib/endpoints/charity/HelixCharityCampaign.d.ts +0 -54
  56. package/node_modules/@twurple/api/lib/endpoints/charity/HelixCharityCampaign.js +0 -88
  57. package/node_modules/@twurple/api/lib/endpoints/charity/HelixCharityCampaignAmount.d.ts +0 -29
  58. package/node_modules/@twurple/api/lib/endpoints/charity/HelixCharityCampaignAmount.js +0 -40
  59. package/node_modules/@twurple/api/lib/endpoints/charity/HelixCharityCampaignDonation.d.ts +0 -34
  60. package/node_modules/@twurple/api/lib/endpoints/charity/HelixCharityCampaignDonation.js +0 -58
  61. package/node_modules/@twurple/api/lib/endpoints/chat/HelixChannelEmote.d.ts +0 -31
  62. package/node_modules/@twurple/api/lib/endpoints/chat/HelixChannelEmote.js +0 -49
  63. package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatApi.d.ts +0 -224
  64. package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatApi.js +0 -446
  65. package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatBadgeSet.d.ts +0 -23
  66. package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatBadgeSet.js +0 -37
  67. package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatBadgeVersion.d.ts +0 -35
  68. package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatBadgeVersion.js +0 -49
  69. package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatChatter.d.ts +0 -25
  70. package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatChatter.js +0 -45
  71. package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatSettings.d.ts +0 -45
  72. package/node_modules/@twurple/api/lib/endpoints/chat/HelixChatSettings.js +0 -64
  73. package/node_modules/@twurple/api/lib/endpoints/chat/HelixEmote.d.ts +0 -14
  74. package/node_modules/@twurple/api/lib/endpoints/chat/HelixEmote.js +0 -20
  75. package/node_modules/@twurple/api/lib/endpoints/chat/HelixEmoteBase.d.ts +0 -48
  76. package/node_modules/@twurple/api/lib/endpoints/chat/HelixEmoteBase.js +0 -68
  77. package/node_modules/@twurple/api/lib/endpoints/chat/HelixEmoteFromSet.d.ts +0 -33
  78. package/node_modules/@twurple/api/lib/endpoints/chat/HelixEmoteFromSet.js +0 -67
  79. package/node_modules/@twurple/api/lib/endpoints/chat/HelixPrivilegedChatSettings.d.ts +0 -17
  80. package/node_modules/@twurple/api/lib/endpoints/chat/HelixPrivilegedChatSettings.js +0 -26
  81. package/node_modules/@twurple/api/lib/endpoints/chat/HelixSentChatMessage.d.ts +0 -24
  82. package/node_modules/@twurple/api/lib/endpoints/chat/HelixSentChatMessage.js +0 -35
  83. package/node_modules/@twurple/api/lib/endpoints/chat/HelixSharedChatSession.d.ts +0 -34
  84. package/node_modules/@twurple/api/lib/endpoints/chat/HelixSharedChatSession.js +0 -58
  85. package/node_modules/@twurple/api/lib/endpoints/chat/HelixSharedChatSessionParticipant.d.ts +0 -17
  86. package/node_modules/@twurple/api/lib/endpoints/chat/HelixSharedChatSessionParticipant.js +0 -33
  87. package/node_modules/@twurple/api/lib/endpoints/chat/HelixUserEmote.d.ts +0 -37
  88. package/node_modules/@twurple/api/lib/endpoints/chat/HelixUserEmote.js +0 -58
  89. package/node_modules/@twurple/api/lib/endpoints/clip/HelixClip.d.ts +0 -98
  90. package/node_modules/@twurple/api/lib/endpoints/clip/HelixClip.js +0 -152
  91. package/node_modules/@twurple/api/lib/endpoints/clip/HelixClipApi.d.ts +0 -99
  92. package/node_modules/@twurple/api/lib/endpoints/clip/HelixClipApi.js +0 -192
  93. package/node_modules/@twurple/api/lib/endpoints/contentClassificationLabels/HelixContentClassificationLabel.d.ts +0 -20
  94. package/node_modules/@twurple/api/lib/endpoints/contentClassificationLabels/HelixContentClassificationLabel.js +0 -24
  95. package/node_modules/@twurple/api/lib/endpoints/contentClassificationLabels/HelixContentClassificationLabelApi.d.ts +0 -25
  96. package/node_modules/@twurple/api/lib/endpoints/contentClassificationLabels/HelixContentClassificationLabelApi.js +0 -38
  97. package/node_modules/@twurple/api/lib/endpoints/entitlements/HelixDropsEntitlement.d.ts +0 -46
  98. package/node_modules/@twurple/api/lib/endpoints/entitlements/HelixDropsEntitlement.js +0 -75
  99. package/node_modules/@twurple/api/lib/endpoints/entitlements/HelixEntitlementApi.d.ts +0 -68
  100. package/node_modules/@twurple/api/lib/endpoints/entitlements/HelixEntitlementApi.js +0 -122
  101. package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixEventSubApi.d.ts +0 -780
  102. package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixEventSubApi.js +0 -1150
  103. package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixEventSubConduit.d.ts +0 -32
  104. package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixEventSubConduit.js +0 -53
  105. package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixEventSubConduitShard.d.ts +0 -20
  106. package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixEventSubConduitShard.js +0 -29
  107. package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixEventSubSubscription.d.ts +0 -44
  108. package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixEventSubSubscription.js +0 -80
  109. package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixPaginatedEventSubSubscriptionsRequest.d.ts +0 -20
  110. package/node_modules/@twurple/api/lib/endpoints/eventSub/HelixPaginatedEventSubSubscriptionsRequest.js +0 -40
  111. package/node_modules/@twurple/api/lib/endpoints/extensions/HelixExtensionBitsProduct.d.ts +0 -32
  112. package/node_modules/@twurple/api/lib/endpoints/extensions/HelixExtensionBitsProduct.js +0 -48
  113. package/node_modules/@twurple/api/lib/endpoints/extensions/HelixExtensionTransaction.d.ts +0 -69
  114. package/node_modules/@twurple/api/lib/endpoints/extensions/HelixExtensionTransaction.js +0 -111
  115. package/node_modules/@twurple/api/lib/endpoints/extensions/HelixExtensionsApi.d.ts +0 -84
  116. package/node_modules/@twurple/api/lib/endpoints/extensions/HelixExtensionsApi.js +0 -143
  117. package/node_modules/@twurple/api/lib/endpoints/game/HelixGame.d.ts +0 -47
  118. package/node_modules/@twurple/api/lib/endpoints/game/HelixGame.js +0 -71
  119. package/node_modules/@twurple/api/lib/endpoints/game/HelixGameApi.d.ts +0 -89
  120. package/node_modules/@twurple/api/lib/endpoints/game/HelixGameApi.js +0 -162
  121. package/node_modules/@twurple/api/lib/endpoints/goals/HelixGoal.d.ts +0 -49
  122. package/node_modules/@twurple/api/lib/endpoints/goals/HelixGoal.js +0 -81
  123. package/node_modules/@twurple/api/lib/endpoints/goals/HelixGoalApi.d.ts +0 -20
  124. package/node_modules/@twurple/api/lib/endpoints/goals/HelixGoalApi.js +0 -34
  125. package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrain.d.ts +0 -70
  126. package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrain.js +0 -112
  127. package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainAllTimeHigh.d.ts +0 -20
  128. package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainAllTimeHigh.js +0 -29
  129. package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainApi.d.ts +0 -26
  130. package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainApi.js +0 -37
  131. package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainContribution.d.ts +0 -33
  132. package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainContribution.js +0 -57
  133. package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainSharedParticipant.d.ts +0 -25
  134. package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainSharedParticipant.js +0 -45
  135. package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainStatus.d.ts +0 -22
  136. package/node_modules/@twurple/api/lib/endpoints/hypeTrain/HelixHypeTrainStatus.js +0 -41
  137. package/node_modules/@twurple/api/lib/endpoints/moderation/HelixAutoModSettings.d.ts +0 -52
  138. package/node_modules/@twurple/api/lib/endpoints/moderation/HelixAutoModSettings.js +0 -77
  139. package/node_modules/@twurple/api/lib/endpoints/moderation/HelixAutoModStatus.d.ts +0 -16
  140. package/node_modules/@twurple/api/lib/endpoints/moderation/HelixAutoModStatus.js +0 -23
  141. package/node_modules/@twurple/api/lib/endpoints/moderation/HelixBan.d.ts +0 -29
  142. package/node_modules/@twurple/api/lib/endpoints/moderation/HelixBan.js +0 -48
  143. package/node_modules/@twurple/api/lib/endpoints/moderation/HelixBanUser.d.ts +0 -35
  144. package/node_modules/@twurple/api/lib/endpoints/moderation/HelixBanUser.js +0 -64
  145. package/node_modules/@twurple/api/lib/endpoints/moderation/HelixBlockedTerm.d.ts +0 -37
  146. package/node_modules/@twurple/api/lib/endpoints/moderation/HelixBlockedTerm.js +0 -54
  147. package/node_modules/@twurple/api/lib/endpoints/moderation/HelixModeratedChannel.d.ts +0 -30
  148. package/node_modules/@twurple/api/lib/endpoints/moderation/HelixModeratedChannel.js +0 -51
  149. package/node_modules/@twurple/api/lib/endpoints/moderation/HelixModerationApi.d.ts +0 -281
  150. package/node_modules/@twurple/api/lib/endpoints/moderation/HelixModerationApi.js +0 -580
  151. package/node_modules/@twurple/api/lib/endpoints/moderation/HelixModerator.d.ts +0 -25
  152. package/node_modules/@twurple/api/lib/endpoints/moderation/HelixModerator.js +0 -45
  153. package/node_modules/@twurple/api/lib/endpoints/moderation/HelixShieldModeStatus.d.ts +0 -33
  154. package/node_modules/@twurple/api/lib/endpoints/moderation/HelixShieldModeStatus.js +0 -57
  155. package/node_modules/@twurple/api/lib/endpoints/moderation/HelixUnbanRequest.d.ts +0 -83
  156. package/node_modules/@twurple/api/lib/endpoints/moderation/HelixUnbanRequest.js +0 -131
  157. package/node_modules/@twurple/api/lib/endpoints/moderation/HelixWarning.d.ts +0 -37
  158. package/node_modules/@twurple/api/lib/endpoints/moderation/HelixWarning.js +0 -63
  159. package/node_modules/@twurple/api/lib/endpoints/poll/HelixPoll.d.ts +0 -62
  160. package/node_modules/@twurple/api/lib/endpoints/poll/HelixPoll.js +0 -100
  161. package/node_modules/@twurple/api/lib/endpoints/poll/HelixPollApi.d.ts +0 -71
  162. package/node_modules/@twurple/api/lib/endpoints/poll/HelixPollApi.js +0 -130
  163. package/node_modules/@twurple/api/lib/endpoints/poll/HelixPollChoice.d.ts +0 -24
  164. package/node_modules/@twurple/api/lib/endpoints/poll/HelixPollChoice.js +0 -35
  165. package/node_modules/@twurple/api/lib/endpoints/prediction/HelixPrediction.d.ts +0 -66
  166. package/node_modules/@twurple/api/lib/endpoints/prediction/HelixPrediction.js +0 -115
  167. package/node_modules/@twurple/api/lib/endpoints/prediction/HelixPredictionApi.d.ts +0 -86
  168. package/node_modules/@twurple/api/lib/endpoints/prediction/HelixPredictionApi.js +0 -151
  169. package/node_modules/@twurple/api/lib/endpoints/prediction/HelixPredictionOutcome.d.ts +0 -33
  170. package/node_modules/@twurple/api/lib/endpoints/prediction/HelixPredictionOutcome.js +0 -58
  171. package/node_modules/@twurple/api/lib/endpoints/prediction/HelixPredictor.d.ts +0 -33
  172. package/node_modules/@twurple/api/lib/endpoints/prediction/HelixPredictor.js +0 -57
  173. package/node_modules/@twurple/api/lib/endpoints/raids/HelixRaid.d.ts +0 -16
  174. package/node_modules/@twurple/api/lib/endpoints/raids/HelixRaid.js +0 -23
  175. package/node_modules/@twurple/api/lib/endpoints/raids/HelixRaidApi.d.ts +0 -33
  176. package/node_modules/@twurple/api/lib/endpoints/raids/HelixRaidApi.js +0 -58
  177. package/node_modules/@twurple/api/lib/endpoints/schedule/HelixPaginatedScheduleSegmentRequest.d.ts +0 -9
  178. package/node_modules/@twurple/api/lib/endpoints/schedule/HelixPaginatedScheduleSegmentRequest.js +0 -31
  179. package/node_modules/@twurple/api/lib/endpoints/schedule/HelixSchedule.d.ts +0 -38
  180. package/node_modules/@twurple/api/lib/endpoints/schedule/HelixSchedule.js +0 -66
  181. package/node_modules/@twurple/api/lib/endpoints/schedule/HelixScheduleApi.d.ts +0 -95
  182. package/node_modules/@twurple/api/lib/endpoints/schedule/HelixScheduleApi.js +0 -171
  183. package/node_modules/@twurple/api/lib/endpoints/schedule/HelixScheduleSegment.d.ts +0 -45
  184. package/node_modules/@twurple/api/lib/endpoints/schedule/HelixScheduleSegment.js +0 -76
  185. package/node_modules/@twurple/api/lib/endpoints/search/HelixChannelSearchResult.d.ts +0 -58
  186. package/node_modules/@twurple/api/lib/endpoints/search/HelixChannelSearchResult.js +0 -95
  187. package/node_modules/@twurple/api/lib/endpoints/search/HelixSearchApi.d.ts +0 -59
  188. package/node_modules/@twurple/api/lib/endpoints/search/HelixSearchApi.js +0 -94
  189. package/node_modules/@twurple/api/lib/endpoints/stream/HelixStream.d.ts +0 -88
  190. package/node_modules/@twurple/api/lib/endpoints/stream/HelixStream.js +0 -137
  191. package/node_modules/@twurple/api/lib/endpoints/stream/HelixStreamApi.d.ts +0 -140
  192. package/node_modules/@twurple/api/lib/endpoints/stream/HelixStreamApi.js +0 -303
  193. package/node_modules/@twurple/api/lib/endpoints/stream/HelixStreamMarker.d.ts +0 -24
  194. package/node_modules/@twurple/api/lib/endpoints/stream/HelixStreamMarker.js +0 -45
  195. package/node_modules/@twurple/api/lib/endpoints/stream/HelixStreamMarkerWithVideo.d.ts +0 -23
  196. package/node_modules/@twurple/api/lib/endpoints/stream/HelixStreamMarkerWithVideo.js +0 -38
  197. package/node_modules/@twurple/api/lib/endpoints/subscriptions/HelixPaginatedSubscriptionsRequest.d.ts +0 -16
  198. package/node_modules/@twurple/api/lib/endpoints/subscriptions/HelixPaginatedSubscriptionsRequest.js +0 -34
  199. package/node_modules/@twurple/api/lib/endpoints/subscriptions/HelixSubscription.d.ts +0 -58
  200. package/node_modules/@twurple/api/lib/endpoints/subscriptions/HelixSubscription.js +0 -88
  201. package/node_modules/@twurple/api/lib/endpoints/subscriptions/HelixSubscriptionApi.d.ts +0 -66
  202. package/node_modules/@twurple/api/lib/endpoints/subscriptions/HelixSubscriptionApi.js +0 -119
  203. package/node_modules/@twurple/api/lib/endpoints/subscriptions/HelixUserSubscription.d.ts +0 -33
  204. package/node_modules/@twurple/api/lib/endpoints/subscriptions/HelixUserSubscription.js +0 -57
  205. package/node_modules/@twurple/api/lib/endpoints/team/HelixTeam.d.ts +0 -51
  206. package/node_modules/@twurple/api/lib/endpoints/team/HelixTeam.js +0 -84
  207. package/node_modules/@twurple/api/lib/endpoints/team/HelixTeamApi.d.ts +0 -43
  208. package/node_modules/@twurple/api/lib/endpoints/team/HelixTeamApi.js +0 -92
  209. package/node_modules/@twurple/api/lib/endpoints/team/HelixTeamWithUsers.d.ts +0 -14
  210. package/node_modules/@twurple/api/lib/endpoints/team/HelixTeamWithUsers.js +0 -21
  211. package/node_modules/@twurple/api/lib/endpoints/user/HelixFollow.d.ts +0 -45
  212. package/node_modules/@twurple/api/lib/endpoints/user/HelixFollow.js +0 -76
  213. package/node_modules/@twurple/api/lib/endpoints/user/HelixPrivilegedUser.d.ts +0 -19
  214. package/node_modules/@twurple/api/lib/endpoints/user/HelixPrivilegedUser.js +0 -28
  215. package/node_modules/@twurple/api/lib/endpoints/user/HelixUser.d.ts +0 -134
  216. package/node_modules/@twurple/api/lib/endpoints/user/HelixUser.js +0 -183
  217. package/node_modules/@twurple/api/lib/endpoints/user/HelixUserApi.d.ts +0 -137
  218. package/node_modules/@twurple/api/lib/endpoints/user/HelixUserApi.js +0 -280
  219. package/node_modules/@twurple/api/lib/endpoints/user/HelixUserBlock.d.ts +0 -25
  220. package/node_modules/@twurple/api/lib/endpoints/user/HelixUserBlock.js +0 -45
  221. package/node_modules/@twurple/api/lib/endpoints/user/extensions/HelixBaseExtension.d.ts +0 -18
  222. package/node_modules/@twurple/api/lib/endpoints/user/extensions/HelixBaseExtension.js +0 -22
  223. package/node_modules/@twurple/api/lib/endpoints/user/extensions/HelixInstalledExtension.d.ts +0 -20
  224. package/node_modules/@twurple/api/lib/endpoints/user/extensions/HelixInstalledExtension.js +0 -34
  225. package/node_modules/@twurple/api/lib/endpoints/user/extensions/HelixInstalledExtensionList.d.ts +0 -14
  226. package/node_modules/@twurple/api/lib/endpoints/user/extensions/HelixInstalledExtensionList.js +0 -26
  227. package/node_modules/@twurple/api/lib/endpoints/user/extensions/HelixUserExtension.d.ts +0 -18
  228. package/node_modules/@twurple/api/lib/endpoints/user/extensions/HelixUserExtension.js +0 -26
  229. package/node_modules/@twurple/api/lib/endpoints/video/HelixVideo.d.ts +0 -105
  230. package/node_modules/@twurple/api/lib/endpoints/video/HelixVideo.js +0 -195
  231. package/node_modules/@twurple/api/lib/endpoints/video/HelixVideoApi.d.ts +0 -85
  232. package/node_modules/@twurple/api/lib/endpoints/video/HelixVideoApi.js +0 -162
  233. package/node_modules/@twurple/api/lib/endpoints/whisper/HelixWhisperApi.d.ts +0 -36
  234. package/node_modules/@twurple/api/lib/endpoints/whisper/HelixWhisperApi.js +0 -53
  235. package/node_modules/@twurple/api/lib/errors/ChatMessageDroppedError.d.ts +0 -10
  236. package/node_modules/@twurple/api/lib/errors/ChatMessageDroppedError.js +0 -14
  237. package/node_modules/@twurple/api/lib/errors/ConfigError.d.ts +0 -7
  238. package/node_modules/@twurple/api/lib/errors/ConfigError.js +0 -6
  239. package/node_modules/@twurple/api/lib/errors/StreamNotLiveError.d.ts +0 -9
  240. package/node_modules/@twurple/api/lib/errors/StreamNotLiveError.js +0 -10
  241. package/node_modules/@twurple/api/lib/index.d.ts +0 -151
  242. package/node_modules/@twurple/api/lib/index.js +0 -111
  243. package/node_modules/@twurple/api/lib/interfaces/endpoints/bits.external.d.ts +0 -43
  244. package/node_modules/@twurple/api/lib/interfaces/endpoints/bits.external.js +0 -10
  245. package/node_modules/@twurple/api/lib/interfaces/endpoints/bits.input.d.ts +0 -30
  246. package/node_modules/@twurple/api/lib/interfaces/endpoints/bits.input.js +0 -1
  247. package/node_modules/@twurple/api/lib/interfaces/endpoints/channel.external.d.ts +0 -58
  248. package/node_modules/@twurple/api/lib/interfaces/endpoints/channel.external.js +0 -42
  249. package/node_modules/@twurple/api/lib/interfaces/endpoints/channel.input.d.ts +0 -39
  250. package/node_modules/@twurple/api/lib/interfaces/endpoints/channel.input.js +0 -1
  251. package/node_modules/@twurple/api/lib/interfaces/endpoints/channelPoints.external.d.ts +0 -74
  252. package/node_modules/@twurple/api/lib/interfaces/endpoints/channelPoints.external.js +0 -60
  253. package/node_modules/@twurple/api/lib/interfaces/endpoints/channelPoints.input.d.ts +0 -78
  254. package/node_modules/@twurple/api/lib/interfaces/endpoints/channelPoints.input.js +0 -1
  255. package/node_modules/@twurple/api/lib/interfaces/endpoints/charity.external.d.ts +0 -28
  256. package/node_modules/@twurple/api/lib/interfaces/endpoints/charity.external.js +0 -1
  257. package/node_modules/@twurple/api/lib/interfaces/endpoints/chat.external.d.ts +0 -114
  258. package/node_modules/@twurple/api/lib/interfaces/endpoints/chat.external.js +0 -52
  259. package/node_modules/@twurple/api/lib/interfaces/endpoints/chat.input.d.ts +0 -93
  260. package/node_modules/@twurple/api/lib/interfaces/endpoints/chat.input.js +0 -1
  261. package/node_modules/@twurple/api/lib/interfaces/endpoints/clip.external.d.ts +0 -28
  262. package/node_modules/@twurple/api/lib/interfaces/endpoints/clip.external.js +0 -33
  263. package/node_modules/@twurple/api/lib/interfaces/endpoints/clip.input.d.ts +0 -85
  264. package/node_modules/@twurple/api/lib/interfaces/endpoints/clip.input.js +0 -1
  265. package/node_modules/@twurple/api/lib/interfaces/endpoints/contentClassificationLabels.external.d.ts +0 -7
  266. package/node_modules/@twurple/api/lib/interfaces/endpoints/contentClassificationLabels.external.js +0 -1
  267. package/node_modules/@twurple/api/lib/interfaces/endpoints/entitlement.external.d.ts +0 -24
  268. package/node_modules/@twurple/api/lib/interfaces/endpoints/entitlement.external.js +0 -17
  269. package/node_modules/@twurple/api/lib/interfaces/endpoints/entitlement.input.d.ts +0 -26
  270. package/node_modules/@twurple/api/lib/interfaces/endpoints/entitlement.input.js +0 -1
  271. package/node_modules/@twurple/api/lib/interfaces/endpoints/eventSub.external.d.ts +0 -88
  272. package/node_modules/@twurple/api/lib/interfaces/endpoints/eventSub.external.js +0 -54
  273. package/node_modules/@twurple/api/lib/interfaces/endpoints/eventSub.input.d.ts +0 -66
  274. package/node_modules/@twurple/api/lib/interfaces/endpoints/eventSub.input.js +0 -1
  275. package/node_modules/@twurple/api/lib/interfaces/endpoints/extensions.external.d.ts +0 -42
  276. package/node_modules/@twurple/api/lib/interfaces/endpoints/extensions.external.js +0 -28
  277. package/node_modules/@twurple/api/lib/interfaces/endpoints/extensions.input.d.ts +0 -47
  278. package/node_modules/@twurple/api/lib/interfaces/endpoints/extensions.input.js +0 -1
  279. package/node_modules/@twurple/api/lib/interfaces/endpoints/game.external.d.ts +0 -8
  280. package/node_modules/@twurple/api/lib/interfaces/endpoints/game.external.js +0 -1
  281. package/node_modules/@twurple/api/lib/interfaces/endpoints/generic.external.d.ts +0 -20
  282. package/node_modules/@twurple/api/lib/interfaces/endpoints/generic.external.js +0 -32
  283. package/node_modules/@twurple/api/lib/interfaces/endpoints/goal.external.d.ts +0 -14
  284. package/node_modules/@twurple/api/lib/interfaces/endpoints/goal.external.js +0 -1
  285. package/node_modules/@twurple/api/lib/interfaces/endpoints/hypeTrain.external.d.ts +0 -52
  286. package/node_modules/@twurple/api/lib/interfaces/endpoints/hypeTrain.external.js +0 -1
  287. package/node_modules/@twurple/api/lib/interfaces/endpoints/moderation.external.d.ts +0 -96
  288. package/node_modules/@twurple/api/lib/interfaces/endpoints/moderation.external.js +0 -81
  289. package/node_modules/@twurple/api/lib/interfaces/endpoints/moderation.input.d.ts +0 -65
  290. package/node_modules/@twurple/api/lib/interfaces/endpoints/moderation.input.js +0 -1
  291. package/node_modules/@twurple/api/lib/interfaces/endpoints/poll.external.d.ts +0 -29
  292. package/node_modules/@twurple/api/lib/interfaces/endpoints/poll.external.js +0 -20
  293. package/node_modules/@twurple/api/lib/interfaces/endpoints/poll.input.d.ts +0 -22
  294. package/node_modules/@twurple/api/lib/interfaces/endpoints/poll.input.js +0 -1
  295. package/node_modules/@twurple/api/lib/interfaces/endpoints/prediction.external.d.ts +0 -38
  296. package/node_modules/@twurple/api/lib/interfaces/endpoints/prediction.external.js +0 -19
  297. package/node_modules/@twurple/api/lib/interfaces/endpoints/prediction.input.d.ts +0 -18
  298. package/node_modules/@twurple/api/lib/interfaces/endpoints/prediction.input.js +0 -1
  299. package/node_modules/@twurple/api/lib/interfaces/endpoints/raid.external.d.ts +0 -6
  300. package/node_modules/@twurple/api/lib/interfaces/endpoints/raid.external.js +0 -8
  301. package/node_modules/@twurple/api/lib/interfaces/endpoints/schedule.external.d.ts +0 -36
  302. package/node_modules/@twurple/api/lib/interfaces/endpoints/schedule.external.js +0 -54
  303. package/node_modules/@twurple/api/lib/interfaces/endpoints/schedule.input.d.ts +0 -125
  304. package/node_modules/@twurple/api/lib/interfaces/endpoints/schedule.input.js +0 -1
  305. package/node_modules/@twurple/api/lib/interfaces/endpoints/search.external.d.ts +0 -15
  306. package/node_modules/@twurple/api/lib/interfaces/endpoints/search.external.js +0 -7
  307. package/node_modules/@twurple/api/lib/interfaces/endpoints/search.input.d.ts +0 -14
  308. package/node_modules/@twurple/api/lib/interfaces/endpoints/search.input.js +0 -1
  309. package/node_modules/@twurple/api/lib/interfaces/endpoints/shared-chat-session.external.d.ts +0 -13
  310. package/node_modules/@twurple/api/lib/interfaces/endpoints/shared-chat-session.external.js +0 -7
  311. package/node_modules/@twurple/api/lib/interfaces/endpoints/stream.external.d.ts +0 -52
  312. package/node_modules/@twurple/api/lib/interfaces/endpoints/stream.external.js +0 -24
  313. package/node_modules/@twurple/api/lib/interfaces/endpoints/stream.input.d.ts +0 -33
  314. package/node_modules/@twurple/api/lib/interfaces/endpoints/stream.input.js +0 -1
  315. package/node_modules/@twurple/api/lib/interfaces/endpoints/subscription.external.d.ts +0 -25
  316. package/node_modules/@twurple/api/lib/interfaces/endpoints/subscription.external.js +0 -8
  317. package/node_modules/@twurple/api/lib/interfaces/endpoints/subscription.input.d.ts +0 -12
  318. package/node_modules/@twurple/api/lib/interfaces/endpoints/subscription.input.js +0 -1
  319. package/node_modules/@twurple/api/lib/interfaces/endpoints/team.external.d.ts +0 -18
  320. package/node_modules/@twurple/api/lib/interfaces/endpoints/team.external.js +0 -1
  321. package/node_modules/@twurple/api/lib/interfaces/endpoints/user.external.d.ts +0 -41
  322. package/node_modules/@twurple/api/lib/interfaces/endpoints/user.external.js +0 -15
  323. package/node_modules/@twurple/api/lib/interfaces/endpoints/user.input.d.ts +0 -20
  324. package/node_modules/@twurple/api/lib/interfaces/endpoints/user.input.js +0 -1
  325. package/node_modules/@twurple/api/lib/interfaces/endpoints/userExtension.external.d.ts +0 -34
  326. package/node_modules/@twurple/api/lib/interfaces/endpoints/userExtension.external.js +0 -1
  327. package/node_modules/@twurple/api/lib/interfaces/endpoints/userExtension.input.d.ts +0 -48
  328. package/node_modules/@twurple/api/lib/interfaces/endpoints/userExtension.input.js +0 -1
  329. package/node_modules/@twurple/api/lib/interfaces/endpoints/video.external.d.ts +0 -38
  330. package/node_modules/@twurple/api/lib/interfaces/endpoints/video.external.js +0 -1
  331. package/node_modules/@twurple/api/lib/interfaces/endpoints/video.input.d.ts +0 -29
  332. package/node_modules/@twurple/api/lib/interfaces/endpoints/video.input.js +0 -1
  333. package/node_modules/@twurple/api/lib/interfaces/endpoints/whisper.external.d.ts +0 -2
  334. package/node_modules/@twurple/api/lib/interfaces/endpoints/whisper.external.js +0 -8
  335. package/node_modules/@twurple/api/lib/relations/HelixUserRelation.d.ts +0 -25
  336. package/node_modules/@twurple/api/lib/relations/HelixUserRelation.js +0 -45
  337. package/node_modules/@twurple/api/lib/reporting/ApiReportedRequest.d.ts +0 -22
  338. package/node_modules/@twurple/api/lib/reporting/ApiReportedRequest.js +0 -32
  339. package/node_modules/@twurple/api/lib/utils/HelixRateLimiter.d.ts +0 -2
  340. package/node_modules/@twurple/api/lib/utils/HelixRateLimiter.js +0 -23
  341. package/node_modules/@twurple/api/lib/utils/HelixRequestBatcher.d.ts +0 -2
  342. package/node_modules/@twurple/api/lib/utils/HelixRequestBatcher.js +0 -95
  343. package/node_modules/@twurple/api/lib/utils/pagination/HelixPaginatedRequest.d.ts +0 -49
  344. package/node_modules/@twurple/api/lib/utils/pagination/HelixPaginatedRequest.js +0 -140
  345. package/node_modules/@twurple/api/lib/utils/pagination/HelixPaginatedRequestWithTotal.d.ts +0 -13
  346. package/node_modules/@twurple/api/lib/utils/pagination/HelixPaginatedRequestWithTotal.js +0 -22
  347. package/node_modules/@twurple/api/lib/utils/pagination/HelixPaginatedResult.d.ts +0 -31
  348. package/node_modules/@twurple/api/lib/utils/pagination/HelixPaginatedResult.js +0 -19
  349. package/node_modules/@twurple/api/lib/utils/pagination/HelixPagination.d.ts +0 -25
  350. package/node_modules/@twurple/api/lib/utils/pagination/HelixPagination.js +0 -8
  351. package/node_modules/@twurple/api/package.json +0 -60
  352. package/node_modules/retry/License +0 -21
  353. package/node_modules/retry/README.md +0 -227
  354. package/node_modules/retry/example/dns.js +0 -31
  355. package/node_modules/retry/example/stop.js +0 -40
  356. package/node_modules/retry/index.js +0 -1
  357. package/node_modules/retry/lib/retry.js +0 -100
  358. package/node_modules/retry/lib/retry_operation.js +0 -162
  359. package/node_modules/retry/package.json +0 -36
@@ -1,140 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { Enumerable } from '@d-fischer/shared-utils';
3
- import { rtfm } from '@twurple/common';
4
- if (!Object.prototype.hasOwnProperty.call(Symbol, 'asyncIterator')) {
5
- // eslint-disable-next-line @typescript-eslint/no-explicit-any,@typescript-eslint/no-unnecessary-condition,@typescript-eslint/no-unsafe-member-access
6
- Symbol.asyncIterator = Symbol.asyncIterator ?? Symbol.for('Symbol.asyncIterator');
7
- }
8
- /**
9
- * Represents a request to the new Twitch API (Helix) that utilizes a cursor to paginate through its results.
10
- *
11
- * Aside from the methods described below, you can also utilize the async iterator using `for await .. of`:
12
- *
13
- * ```ts
14
- * const result = client.videos.getVideosByUserPaginated('125328655');
15
- * for await (const video of result) {
16
- * console.log(video.title);
17
- * }
18
- * ```
19
- */
20
- let HelixPaginatedRequest = class HelixPaginatedRequest {
21
- _callOptions;
22
- _mapper;
23
- _limitPerPage;
24
- /** @internal */ _client;
25
- /** @internal */ _currentCursor;
26
- /** @internal */ _isFinished = false;
27
- /** @internal */ _currentData;
28
- /** @internal */
29
- constructor(_callOptions, client, _mapper, _limitPerPage = 100) {
30
- this._callOptions = _callOptions;
31
- this._mapper = _mapper;
32
- this._limitPerPage = _limitPerPage;
33
- this._client = client;
34
- }
35
- /**
36
- * The last fetched page of data associated to the requested resource.
37
- *
38
- * Only works with {@link HelixPaginatedRequest#getNext} and not with any other methods of data fetching.
39
- */
40
- get current() {
41
- return this._currentData?.data;
42
- }
43
- /**
44
- * Gets the next available page of data associated to the requested resource, or an empty array if there are no more available pages.
45
- */
46
- async getNext() {
47
- if (this._isFinished) {
48
- return [];
49
- }
50
- const result = await this._fetchData();
51
- // should never be null, but in practice is sometimes
52
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
53
- if (!result.data?.length) {
54
- this._isFinished = true;
55
- return [];
56
- }
57
- return this._processResult(result);
58
- }
59
- /**
60
- * Gets all data associated to the requested resource.
61
- *
62
- * Be aware that this makes multiple calls to the Twitch API. Due to this, you might be more suspectible to rate limits.
63
- *
64
- * Also be aware that this resets the internal cursor, so avoid using this and {@link HelixPaginatedRequest#getNext}} together.
65
- */
66
- async getAll() {
67
- this.reset();
68
- const result = [];
69
- do {
70
- const data = await this.getNext();
71
- if (!data.length) {
72
- break;
73
- }
74
- result.push(...data);
75
- } while (this._currentCursor);
76
- this.reset();
77
- return result;
78
- }
79
- /**
80
- * Gets the current cursor.
81
- *
82
- * Only useful if you want to make manual requests to the API.
83
- */
84
- get currentCursor() {
85
- return this._currentCursor;
86
- }
87
- /**
88
- * Resets the internal cursor.
89
- *
90
- * This will make {@link HelixPaginatedRequest#getNext}} start from the first page again.
91
- */
92
- reset() {
93
- this._currentCursor = undefined;
94
- this._isFinished = false;
95
- this._currentData = undefined;
96
- }
97
- async *[Symbol.asyncIterator]() {
98
- this.reset();
99
- while (true) {
100
- const data = await this.getNext();
101
- if (!data.length) {
102
- break;
103
- }
104
- yield* data[Symbol.iterator]();
105
- }
106
- }
107
- /** @internal */
108
- async _fetchData(additionalOptions = {}) {
109
- return await this._client.callApi({
110
- type: 'helix',
111
- ...this._callOptions,
112
- ...additionalOptions,
113
- query: {
114
- ...this._callOptions.query,
115
- after: this._currentCursor,
116
- first: this._limitPerPage.toString(),
117
- ...additionalOptions.query,
118
- },
119
- });
120
- }
121
- /** @internal */
122
- _processResult(result) {
123
- this._currentCursor = typeof result.pagination === 'string' ? result.pagination : result.pagination?.cursor;
124
- if (this._currentCursor === undefined) {
125
- this._isFinished = true;
126
- }
127
- this._currentData = result;
128
- return result.data.reduce((acc, elem) => {
129
- const mapped = this._mapper(elem);
130
- return Array.isArray(mapped) ? [...acc, ...mapped] : [...acc, mapped];
131
- }, []);
132
- }
133
- };
134
- __decorate([
135
- Enumerable(false)
136
- ], HelixPaginatedRequest.prototype, "_client", void 0);
137
- HelixPaginatedRequest = __decorate([
138
- rtfm('api', 'HelixPaginatedRequest')
139
- ], HelixPaginatedRequest);
140
- export { HelixPaginatedRequest };
@@ -1,13 +0,0 @@
1
- import { HelixPaginatedRequest } from './HelixPaginatedRequest.js';
2
- /**
3
- * A special case of {@link HelixPaginatedRequest} with support for fetching the total number of entities, whenever an endpoint supports it.
4
- *
5
- * @inheritDoc
6
- */
7
- export declare class HelixPaginatedRequestWithTotal<D, T> extends HelixPaginatedRequest<D, T> {
8
- /**
9
- * Gets the total number of entities existing in the queried result set.
10
- */
11
- getTotalCount(): Promise<number>;
12
- }
13
- //# sourceMappingURL=HelixPaginatedRequestWithTotal.d.ts.map
@@ -1,22 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { rtfm } from '@twurple/common';
3
- import { HelixPaginatedRequest } from './HelixPaginatedRequest.js';
4
- /**
5
- * A special case of {@link HelixPaginatedRequest} with support for fetching the total number of entities, whenever an endpoint supports it.
6
- *
7
- * @inheritDoc
8
- */
9
- let HelixPaginatedRequestWithTotal = class HelixPaginatedRequestWithTotal extends HelixPaginatedRequest {
10
- /**
11
- * Gets the total number of entities existing in the queried result set.
12
- */
13
- async getTotalCount() {
14
- const data = this._currentData ??
15
- (await this._fetchData({ query: { after: undefined } }));
16
- return data.total;
17
- }
18
- };
19
- HelixPaginatedRequestWithTotal = __decorate([
20
- rtfm('api', 'HelixPaginatedRequestWithTotal')
21
- ], HelixPaginatedRequestWithTotal);
22
- export { HelixPaginatedRequestWithTotal };
@@ -1,31 +0,0 @@
1
- /**
2
- * A result coming from a Helix resource that is paginated using a cursor.
3
- */
4
- export interface HelixPaginatedResult<T> {
5
- /**
6
- * The returned data.
7
- */
8
- readonly data: T[];
9
- /**
10
- * A cursor for traversing more results.
11
- */
12
- cursor?: string;
13
- }
14
- /**
15
- * A result coming from a Helix resource that is paginated using a cursor, also including a total number of items.
16
- */
17
- export interface HelixPaginatedResultWithTotal<T> {
18
- /**
19
- * The returned data.
20
- */
21
- readonly data: T[];
22
- /**
23
- * A cursor for traversing more results.
24
- */
25
- cursor: string;
26
- /**
27
- * The total number of items.
28
- */
29
- total: number;
30
- }
31
- //# sourceMappingURL=HelixPaginatedResult.d.ts.map
@@ -1,19 +0,0 @@
1
- /** @internal */ export function createPaginatedResult(response, type, client) {
2
- let dataCache = undefined;
3
- return {
4
- get data() {
5
- return (dataCache ??= response.data?.map(data => new type(data, client)) ?? []);
6
- },
7
- cursor: typeof response.pagination === 'string' ? response.pagination : response.pagination?.cursor,
8
- };
9
- }
10
- /** @internal */ export function createPaginatedResultWithTotal(response, type, client) {
11
- let dataCache = undefined;
12
- return {
13
- get data() {
14
- return (dataCache ??= response.data?.map(data => new type(data, client)) ?? []);
15
- },
16
- cursor: response.pagination.cursor,
17
- total: response.total,
18
- };
19
- }
@@ -1,25 +0,0 @@
1
- /**
2
- * Base forward pagination parameters for Helix requests.
3
- */
4
- export interface HelixForwardPagination {
5
- /**
6
- * The number of results per page.
7
- */
8
- limit?: number;
9
- /**
10
- * A cursor to get the following page of.
11
- */
12
- after?: string;
13
- }
14
- /**
15
- * Base pagination parameters for Helix requests.
16
- *
17
- * @inheritDoc
18
- */
19
- export interface HelixPagination extends HelixForwardPagination {
20
- /**
21
- * A cursor to get the previous page of.
22
- */
23
- before?: string;
24
- }
25
- //# sourceMappingURL=HelixPagination.d.ts.map
@@ -1,8 +0,0 @@
1
- /** @internal */
2
- export function createPaginationQuery({ after, before, limit } = {}) {
3
- return {
4
- after,
5
- before,
6
- first: limit?.toString(),
7
- };
8
- }
@@ -1,60 +0,0 @@
1
- {
2
- "name": "@twurple/api",
3
- "version": "8.1.4",
4
- "publishConfig": {
5
- "access": "public"
6
- },
7
- "description": "Interact with Twitch's API.",
8
- "keywords": [
9
- "twitch",
10
- "api",
11
- "stream",
12
- "helix",
13
- "chatters",
14
- "bot"
15
- ],
16
- "sideEffects": false,
17
- "type": "module",
18
- "main": "lib",
19
- "types": "lib",
20
- "exports": {
21
- ".": {
22
- "types": "./lib/index.d.ts",
23
- "default": "./lib/index.js"
24
- }
25
- },
26
- "repository": {
27
- "type": "git",
28
- "url": "https://github.com/twurple/twurple.git",
29
- "directory": "packages/api"
30
- },
31
- "homepage": "https://twurple.js.org",
32
- "author": "Daniel Fischer <daniel@d-fischer.dev>",
33
- "funding": "https://github.com/sponsors/d-fischer",
34
- "license": "MIT",
35
- "dependencies": {
36
- "@d-fischer/cache-decorators": "^4.0.0",
37
- "@d-fischer/detect-node": "^3.0.1",
38
- "@d-fischer/logger": "^4.2.1",
39
- "@d-fischer/rate-limiter": "^1.1.0",
40
- "@d-fischer/shared-utils": "^3.6.1",
41
- "@d-fischer/typed-event-emitter": "^3.3.3",
42
- "@twurple/api-call": "8.1.4",
43
- "@twurple/common": "8.1.4",
44
- "retry": "^0.13.1",
45
- "tslib": "^2.0.3"
46
- },
47
- "devDependencies": {
48
- "@twurple/auth": "8.1.4",
49
- "@types/retry": "^0.12.2"
50
- },
51
- "peerDependencies": {
52
- "@twurple/auth": "8.1.4"
53
- },
54
- "files": [
55
- "LICENSE",
56
- "README.md",
57
- "lib",
58
- "!lib/**/*.d.ts.map"
59
- ]
60
- }
@@ -1,21 +0,0 @@
1
- Copyright (c) 2011:
2
- Tim Koschützki (tim@debuggable.com)
3
- Felix Geisendörfer (felix@debuggable.com)
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
@@ -1,227 +0,0 @@
1
- <!-- badges/ -->
2
- [![Build Status](https://secure.travis-ci.org/tim-kos/node-retry.svg?branch=master)](http://travis-ci.org/tim-kos/node-retry "Check this project's build status on TravisCI")
3
- [![codecov](https://codecov.io/gh/tim-kos/node-retry/branch/master/graph/badge.svg)](https://codecov.io/gh/tim-kos/node-retry)
4
- <!-- /badges -->
5
-
6
- # retry
7
-
8
- Abstraction for exponential and custom retry strategies for failed operations.
9
-
10
- ## Installation
11
-
12
- npm install retry
13
-
14
- ## Current Status
15
-
16
- This module has been tested and is ready to be used.
17
-
18
- ## Tutorial
19
-
20
- The example below will retry a potentially failing `dns.resolve` operation
21
- `10` times using an exponential backoff strategy. With the default settings, this
22
- means the last attempt is made after `17 minutes and 3 seconds`.
23
-
24
- ``` javascript
25
- var dns = require('dns');
26
- var retry = require('retry');
27
-
28
- function faultTolerantResolve(address, cb) {
29
- var operation = retry.operation();
30
-
31
- operation.attempt(function(currentAttempt) {
32
- dns.resolve(address, function(err, addresses) {
33
- if (operation.retry(err)) {
34
- return;
35
- }
36
-
37
- cb(err ? operation.mainError() : null, addresses);
38
- });
39
- });
40
- }
41
-
42
- faultTolerantResolve('nodejs.org', function(err, addresses) {
43
- console.log(err, addresses);
44
- });
45
- ```
46
-
47
- Of course you can also configure the factors that go into the exponential
48
- backoff. See the API documentation below for all available settings.
49
- currentAttempt is an int representing the number of attempts so far.
50
-
51
- ``` javascript
52
- var operation = retry.operation({
53
- retries: 5,
54
- factor: 3,
55
- minTimeout: 1 * 1000,
56
- maxTimeout: 60 * 1000,
57
- randomize: true,
58
- });
59
- ```
60
-
61
- ## API
62
-
63
- ### retry.operation([options])
64
-
65
- Creates a new `RetryOperation` object. `options` is the same as `retry.timeouts()`'s `options`, with three additions:
66
-
67
- * `forever`: Whether to retry forever, defaults to `false`.
68
- * `unref`: Whether to [unref](https://nodejs.org/api/timers.html#timers_unref) the setTimeout's, defaults to `false`.
69
- * `maxRetryTime`: The maximum time (in milliseconds) that the retried operation is allowed to run. Default is `Infinity`.
70
-
71
- ### retry.timeouts([options])
72
-
73
- Returns an array of timeouts. All time `options` and return values are in
74
- milliseconds. If `options` is an array, a copy of that array is returned.
75
-
76
- `options` is a JS object that can contain any of the following keys:
77
-
78
- * `retries`: The maximum amount of times to retry the operation. Default is `10`. Seting this to `1` means `do it once, then retry it once`.
79
- * `factor`: The exponential factor to use. Default is `2`.
80
- * `minTimeout`: The number of milliseconds before starting the first retry. Default is `1000`.
81
- * `maxTimeout`: The maximum number of milliseconds between two retries. Default is `Infinity`.
82
- * `randomize`: Randomizes the timeouts by multiplying with a factor between `1` to `2`. Default is `false`.
83
-
84
- The formula used to calculate the individual timeouts is:
85
-
86
- ```
87
- Math.min(random * minTimeout * Math.pow(factor, attempt), maxTimeout)
88
- ```
89
-
90
- Have a look at [this article][article] for a better explanation of approach.
91
-
92
- If you want to tune your `factor` / `times` settings to attempt the last retry
93
- after a certain amount of time, you can use wolfram alpha. For example in order
94
- to tune for `10` attempts in `5 minutes`, you can use this equation:
95
-
96
- ![screenshot](https://github.com/tim-kos/node-retry/raw/master/equation.gif)
97
-
98
- Explaining the various values from left to right:
99
-
100
- * `k = 0 ... 9`: The `retries` value (10)
101
- * `1000`: The `minTimeout` value in ms (1000)
102
- * `x^k`: No need to change this, `x` will be your resulting factor
103
- * `5 * 60 * 1000`: The desired total amount of time for retrying in ms (5 minutes)
104
-
105
- To make this a little easier for you, use wolfram alpha to do the calculations:
106
-
107
- <http://www.wolframalpha.com/input/?i=Sum%5B1000*x^k%2C+{k%2C+0%2C+9}%5D+%3D+5+*+60+*+1000>
108
-
109
- [article]: http://dthain.blogspot.com/2009/02/exponential-backoff-in-distributed.html
110
-
111
- ### retry.createTimeout(attempt, opts)
112
-
113
- Returns a new `timeout` (integer in milliseconds) based on the given parameters.
114
-
115
- `attempt` is an integer representing for which retry the timeout should be calculated. If your retry operation was executed 4 times you had one attempt and 3 retries. If you then want to calculate a new timeout, you should set `attempt` to 4 (attempts are zero-indexed).
116
-
117
- `opts` can include `factor`, `minTimeout`, `randomize` (boolean) and `maxTimeout`. They are documented above.
118
-
119
- `retry.createTimeout()` is used internally by `retry.timeouts()` and is public for you to be able to create your own timeouts for reinserting an item, see [issue #13](https://github.com/tim-kos/node-retry/issues/13).
120
-
121
- ### retry.wrap(obj, [options], [methodNames])
122
-
123
- Wrap all functions of the `obj` with retry. Optionally you can pass operation options and
124
- an array of method names which need to be wrapped.
125
-
126
- ```
127
- retry.wrap(obj)
128
-
129
- retry.wrap(obj, ['method1', 'method2'])
130
-
131
- retry.wrap(obj, {retries: 3})
132
-
133
- retry.wrap(obj, {retries: 3}, ['method1', 'method2'])
134
- ```
135
- The `options` object can take any options that the usual call to `retry.operation` can take.
136
-
137
- ### new RetryOperation(timeouts, [options])
138
-
139
- Creates a new `RetryOperation` where `timeouts` is an array where each value is
140
- a timeout given in milliseconds.
141
-
142
- Available options:
143
- * `forever`: Whether to retry forever, defaults to `false`.
144
- * `unref`: Wether to [unref](https://nodejs.org/api/timers.html#timers_unref) the setTimeout's, defaults to `false`.
145
-
146
- If `forever` is true, the following changes happen:
147
- * `RetryOperation.errors()` will only output an array of one item: the last error.
148
- * `RetryOperation` will repeatedly use the `timeouts` array. Once all of its timeouts have been used up, it restarts with the first timeout, then uses the second and so on.
149
-
150
- #### retryOperation.errors()
151
-
152
- Returns an array of all errors that have been passed to `retryOperation.retry()` so far. The
153
- returning array has the errors ordered chronologically based on when they were passed to
154
- `retryOperation.retry()`, which means the first passed error is at index zero and the last is
155
- at the last index.
156
-
157
- #### retryOperation.mainError()
158
-
159
- A reference to the error object that occured most frequently. Errors are
160
- compared using the `error.message` property.
161
-
162
- If multiple error messages occured the same amount of time, the last error
163
- object with that message is returned.
164
-
165
- If no errors occured so far, the value is `null`.
166
-
167
- #### retryOperation.attempt(fn, timeoutOps)
168
-
169
- Defines the function `fn` that is to be retried and executes it for the first
170
- time right away. The `fn` function can receive an optional `currentAttempt` callback that represents the number of attempts to execute `fn` so far.
171
-
172
- Optionally defines `timeoutOps` which is an object having a property `timeout` in miliseconds and a property `cb` callback function.
173
- Whenever your retry operation takes longer than `timeout` to execute, the timeout callback function `cb` is called.
174
-
175
-
176
- #### retryOperation.try(fn)
177
-
178
- This is an alias for `retryOperation.attempt(fn)`. This is deprecated. Please use `retryOperation.attempt(fn)` instead.
179
-
180
- #### retryOperation.start(fn)
181
-
182
- This is an alias for `retryOperation.attempt(fn)`. This is deprecated. Please use `retryOperation.attempt(fn)` instead.
183
-
184
- #### retryOperation.retry(error)
185
-
186
- Returns `false` when no `error` value is given, or the maximum amount of retries
187
- has been reached.
188
-
189
- Otherwise it returns `true`, and retries the operation after the timeout for
190
- the current attempt number.
191
-
192
- #### retryOperation.stop()
193
-
194
- Allows you to stop the operation being retried. Useful for aborting the operation on a fatal error etc.
195
-
196
- #### retryOperation.reset()
197
-
198
- Resets the internal state of the operation object, so that you can call `attempt()` again as if this was a new operation object.
199
-
200
- #### retryOperation.attempts()
201
-
202
- Returns an int representing the number of attempts it took to call `fn` before it was successful.
203
-
204
- ## License
205
-
206
- retry is licensed under the MIT license.
207
-
208
-
209
- # Changelog
210
-
211
- 0.10.0 Adding `stop` functionality, thanks to @maxnachlinger.
212
-
213
- 0.9.0 Adding `unref` functionality, thanks to @satazor.
214
-
215
- 0.8.0 Implementing retry.wrap.
216
-
217
- 0.7.0 Some bug fixes and made retry.createTimeout() public. Fixed issues [#10](https://github.com/tim-kos/node-retry/issues/10), [#12](https://github.com/tim-kos/node-retry/issues/12), and [#13](https://github.com/tim-kos/node-retry/issues/13).
218
-
219
- 0.6.0 Introduced optional timeOps parameter for the attempt() function which is an object having a property timeout in milliseconds and a property cb callback function. Whenever your retry operation takes longer than timeout to execute, the timeout callback function cb is called.
220
-
221
- 0.5.0 Some minor refactoring.
222
-
223
- 0.4.0 Changed retryOperation.try() to retryOperation.attempt(). Deprecated the aliases start() and try() for it.
224
-
225
- 0.3.0 Added retryOperation.start() which is an alias for retryOperation.try().
226
-
227
- 0.2.0 Added attempts() function and parameter to retryOperation.try() representing the number of attempts it took to call fn().
@@ -1,31 +0,0 @@
1
- var dns = require('dns');
2
- var retry = require('../lib/retry');
3
-
4
- function faultTolerantResolve(address, cb) {
5
- var opts = {
6
- retries: 2,
7
- factor: 2,
8
- minTimeout: 1 * 1000,
9
- maxTimeout: 2 * 1000,
10
- randomize: true
11
- };
12
- var operation = retry.operation(opts);
13
-
14
- operation.attempt(function(currentAttempt) {
15
- dns.resolve(address, function(err, addresses) {
16
- if (operation.retry(err)) {
17
- return;
18
- }
19
-
20
- cb(operation.mainError(), operation.errors(), addresses);
21
- });
22
- });
23
- }
24
-
25
- faultTolerantResolve('nodejs.org', function(err, errors, addresses) {
26
- console.warn('err:');
27
- console.log(err);
28
-
29
- console.warn('addresses:');
30
- console.log(addresses);
31
- });
@@ -1,40 +0,0 @@
1
- var retry = require('../lib/retry');
2
-
3
- function attemptAsyncOperation(someInput, cb) {
4
- var opts = {
5
- retries: 2,
6
- factor: 2,
7
- minTimeout: 1 * 1000,
8
- maxTimeout: 2 * 1000,
9
- randomize: true
10
- };
11
- var operation = retry.operation(opts);
12
-
13
- operation.attempt(function(currentAttempt) {
14
- failingAsyncOperation(someInput, function(err, result) {
15
-
16
- if (err && err.message === 'A fatal error') {
17
- operation.stop();
18
- return cb(err);
19
- }
20
-
21
- if (operation.retry(err)) {
22
- return;
23
- }
24
-
25
- cb(operation.mainError(), operation.errors(), result);
26
- });
27
- });
28
- }
29
-
30
- attemptAsyncOperation('test input', function(err, errors, result) {
31
- console.warn('err:');
32
- console.log(err);
33
-
34
- console.warn('result:');
35
- console.log(result);
36
- });
37
-
38
- function failingAsyncOperation(input, cb) {
39
- return setImmediate(cb.bind(null, new Error('A fatal error')));
40
- }
@@ -1 +0,0 @@
1
- module.exports = require('./lib/retry');