@overlaysymphony/twitch 0.2.2 → 0.2.3

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 (166) hide show
  1. package/package.json +2 -2
  2. package/src/authentication/authentication.ts +1 -1
  3. package/src/authentication/index.ts +1 -1
  4. package/src/chat/chat.ts +4 -4
  5. package/src/chat/helpers.ts +1 -1
  6. package/src/chat/index.ts +4 -3
  7. package/src/chat/interfaces/index.ts +2 -2
  8. package/src/chat/parser.ts +1 -1
  9. package/src/eventsub/events/automod.message.hold-2.ts +81 -0
  10. package/src/eventsub/events/automod.message.update-2.ts +94 -0
  11. package/src/eventsub/events/automod.settings.update-1.ts +65 -0
  12. package/src/eventsub/events/automod.terms.update-1.ts +59 -0
  13. package/src/eventsub/events/channel.ad_break.begin-1.ts +50 -0
  14. package/src/eventsub/events/channel.ban-1.ts +58 -0
  15. package/src/eventsub/events/channel.bits.use-1.ts +112 -0
  16. package/src/eventsub/events/channel.channel_points_automatic_reward_redemption.add-2.ts +88 -0
  17. package/src/eventsub/events/channel.channel_points_custom_reward.add-1.ts +101 -0
  18. package/src/eventsub/events/channel.channel_points_custom_reward.remove-1.ts +103 -0
  19. package/src/eventsub/events/channel.channel_points_custom_reward.update-1.ts +103 -0
  20. package/src/eventsub/events/channel.channel_points_custom_reward_redemption.add-1.ts +65 -0
  21. package/src/eventsub/events/channel.channel_points_custom_reward_redemption.update-1.ts +65 -0
  22. package/src/eventsub/events/channel.charity_campaign.donate-1.ts +69 -0
  23. package/src/eventsub/events/channel.charity_campaign.progress-1.ts +74 -0
  24. package/src/eventsub/events/channel.charity_campaign.start-1.ts +76 -0
  25. package/src/eventsub/events/channel.charity_campaign.stop-1.ts +76 -0
  26. package/src/eventsub/events/channel.chat.clear-1.ts +41 -0
  27. package/src/eventsub/events/channel.chat.clear_user_messages-1.ts +47 -0
  28. package/src/eventsub/events/channel.chat.message-1.ts +160 -0
  29. package/src/eventsub/events/channel.chat.message_delete-1.ts +49 -0
  30. package/src/eventsub/events/channel.chat.notification-1.ts +317 -0
  31. package/src/eventsub/events/channel.chat.user_message_hold-1.ts +75 -0
  32. package/src/eventsub/events/channel.chat.user_message_update-1.ts +82 -0
  33. package/src/eventsub/events/channel.chat_settings.update-1.ts +83 -0
  34. package/src/eventsub/events/channel.cheer-1.ts +50 -0
  35. package/src/eventsub/events/channel.follow-2.ts +49 -0
  36. package/src/eventsub/events/channel.goal.begin-1.ts +80 -0
  37. package/src/eventsub/events/channel.goal.end-1.ts +80 -0
  38. package/src/eventsub/events/channel.goal.progress-1.ts +80 -0
  39. package/src/eventsub/events/channel.guest_star_guest.update-beta.ts +85 -0
  40. package/src/eventsub/events/channel.guest_star_session.begin-beta.ts +50 -0
  41. package/src/eventsub/events/channel.guest_star_session.end-beta.ts +58 -0
  42. package/src/eventsub/events/channel.guest_star_settings.update-beta.ts +62 -0
  43. package/src/eventsub/events/channel.hype_train.begin-2.ts +90 -0
  44. package/src/eventsub/events/channel.hype_train.end-2.ts +70 -0
  45. package/src/eventsub/events/channel.hype_train.progress-2.ts +90 -0
  46. package/src/eventsub/events/channel.moderate-2.ts +258 -0
  47. package/src/eventsub/events/channel.moderator.add-1.ts +44 -0
  48. package/src/eventsub/events/channel.moderator.remove-1.ts +44 -0
  49. package/src/eventsub/events/channel.poll.begin-1.ts +73 -0
  50. package/src/eventsub/events/channel.poll.end-1.ts +75 -0
  51. package/src/eventsub/events/channel.poll.progress-1.ts +73 -0
  52. package/src/eventsub/events/channel.prediction.begin-1.ts +72 -0
  53. package/src/eventsub/events/channel.prediction.end-1.ts +76 -0
  54. package/src/eventsub/events/channel.prediction.lock-1.ts +72 -0
  55. package/src/eventsub/events/channel.prediction.progress-1.ts +72 -0
  56. package/src/eventsub/events/channel.raid-1.ts +48 -0
  57. package/src/eventsub/events/channel.shared_chat.begin-1.ts +55 -0
  58. package/src/eventsub/events/channel.shared_chat.end-1.ts +46 -0
  59. package/src/eventsub/events/channel.shared_chat.update-1.ts +55 -0
  60. package/src/eventsub/events/channel.shield_mode.begin-1.ts +51 -0
  61. package/src/eventsub/events/channel.shield_mode.end-1.ts +51 -0
  62. package/src/eventsub/events/channel.shoutout.create-1.ts +61 -0
  63. package/src/eventsub/events/channel.shoutout.receive-1.ts +51 -0
  64. package/src/eventsub/events/channel.subscribe-1.ts +48 -0
  65. package/src/eventsub/events/channel.subscription.end-1.ts +48 -0
  66. package/src/eventsub/events/channel.subscription.gift-1.ts +52 -0
  67. package/src/eventsub/events/channel.subscription.message-1.ts +66 -0
  68. package/src/eventsub/events/channel.suspicious_user.message-1.ts +85 -0
  69. package/src/eventsub/events/channel.suspicious_user.update-1.ts +55 -0
  70. package/src/eventsub/events/channel.unban-1.ts +50 -0
  71. package/src/eventsub/events/channel.unban_request.create-1.ts +53 -0
  72. package/src/eventsub/events/channel.unban_request.resolve-1.ts +64 -0
  73. package/src/eventsub/events/channel.update-2.ts +48 -0
  74. package/src/eventsub/events/channel.vip.add-1.ts +44 -0
  75. package/src/eventsub/events/channel.vip.remove-1.ts +44 -0
  76. package/src/eventsub/events/channel.warning.acknowledge-1.ts +47 -0
  77. package/src/eventsub/events/channel.warning.send-1.ts +57 -0
  78. package/src/eventsub/events/index.ts +73 -284
  79. package/src/eventsub/events/stream.offline-1.ts +38 -0
  80. package/src/eventsub/events/stream.online-1.ts +44 -0
  81. package/src/eventsub/events/user.update-1.ts +48 -0
  82. package/src/eventsub/events/user.whisper.message-1.ts +51 -0
  83. package/src/eventsub/events-helpers.ts +53 -25
  84. package/src/eventsub/eventsub.ts +37 -74
  85. package/src/eventsub/index.ts +8 -6
  86. package/src/eventsub/messages.ts +16 -4
  87. package/src/helix/channel-points/custom-rewards.ts +3 -3
  88. package/src/helix/channel-points/index.ts +1 -1
  89. package/src/helix/helix.ts +1 -1
  90. package/src/helix/subscriptions/index.ts +1 -1
  91. package/src/helix/subscriptions/subscriptions.ts +40 -47
  92. package/src/helix/users/index.ts +1 -1
  93. package/src/helix/users/users.ts +3 -3
  94. package/src/helpers/alerts/alerts.ts +5 -5
  95. package/src/helpers/alerts/index.ts +2 -2
  96. package/src/helpers/charity/charity.ts +2 -2
  97. package/src/helpers/charity/index.ts +1 -1
  98. package/src/helpers/goal/goal.ts +2 -2
  99. package/src/helpers/goal/index.ts +1 -1
  100. package/src/helpers/hype-train/hype-train.ts +2 -2
  101. package/src/helpers/hype-train/index.ts +1 -1
  102. package/src/helpers/poll/index.ts +1 -1
  103. package/src/helpers/poll/poll.ts +3 -3
  104. package/src/helpers/prediction/index.ts +1 -1
  105. package/src/helpers/prediction/prediction.ts +3 -3
  106. package/src/helpers/redemption/index.ts +1 -1
  107. package/src/helpers/redemption/redemption.ts +2 -2
  108. package/src/helpers/status/index.ts +1 -1
  109. package/src/helpers/status/status.ts +2 -2
  110. package/src/ui/authentication.ts +1 -1
  111. package/src/ui/popup.ts +26 -3
  112. package/src/eventsub/events/channel.ad_break.begin.ts +0 -51
  113. package/src/eventsub/events/channel.ban.ts +0 -59
  114. package/src/eventsub/events/channel.channel_points_custom_reward._.ts +0 -29
  115. package/src/eventsub/events/channel.channel_points_custom_reward.add.ts +0 -75
  116. package/src/eventsub/events/channel.channel_points_custom_reward.remove.ts +0 -77
  117. package/src/eventsub/events/channel.channel_points_custom_reward.update.ts +0 -77
  118. package/src/eventsub/events/channel.channel_points_custom_reward_redemption._.ts +0 -10
  119. package/src/eventsub/events/channel.channel_points_custom_reward_redemption.add.ts +0 -59
  120. package/src/eventsub/events/channel.channel_points_custom_reward_redemption.update.ts +0 -59
  121. package/src/eventsub/events/channel.charity_campaign.donate.ts +0 -66
  122. package/src/eventsub/events/channel.charity_campaign.progress.ts +0 -67
  123. package/src/eventsub/events/channel.charity_campaign.start.ts +0 -69
  124. package/src/eventsub/events/channel.charity_campaign.stop.ts +0 -69
  125. package/src/eventsub/events/channel.chat.clear.ts +0 -42
  126. package/src/eventsub/events/channel.chat.clear_user_messages.ts +0 -48
  127. package/src/eventsub/events/channel.chat.message_delete.ts +0 -50
  128. package/src/eventsub/events/channel.chat.notification.ts +0 -50
  129. package/src/eventsub/events/channel.cheer.ts +0 -51
  130. package/src/eventsub/events/channel.follow.ts +0 -50
  131. package/src/eventsub/events/channel.goal.begin.ts +0 -51
  132. package/src/eventsub/events/channel.goal.end.ts +0 -55
  133. package/src/eventsub/events/channel.goal.progress.ts +0 -51
  134. package/src/eventsub/events/channel.guest_star_guest.update.ts +0 -66
  135. package/src/eventsub/events/channel.guest_star_session.begin.ts +0 -46
  136. package/src/eventsub/events/channel.guest_star_session.end.ts +0 -48
  137. package/src/eventsub/events/channel.guest_star_settings.update.ts +0 -50
  138. package/src/eventsub/events/channel.hype_train._.ts +0 -12
  139. package/src/eventsub/events/channel.hype_train.begin.ts +0 -57
  140. package/src/eventsub/events/channel.hype_train.end.ts +0 -55
  141. package/src/eventsub/events/channel.hype_train.progress.ts +0 -70
  142. package/src/eventsub/events/channel.moderator.add.ts +0 -45
  143. package/src/eventsub/events/channel.moderator.remove.ts +0 -45
  144. package/src/eventsub/events/channel.poll._.ts +0 -26
  145. package/src/eventsub/events/channel.poll.begin.ts +0 -55
  146. package/src/eventsub/events/channel.poll.end.ts +0 -57
  147. package/src/eventsub/events/channel.poll.progress.ts +0 -55
  148. package/src/eventsub/events/channel.prediction._.ts +0 -25
  149. package/src/eventsub/events/channel.prediction.begin.ts +0 -51
  150. package/src/eventsub/events/channel.prediction.end.ts +0 -55
  151. package/src/eventsub/events/channel.prediction.lock.ts +0 -51
  152. package/src/eventsub/events/channel.prediction.progress.ts +0 -51
  153. package/src/eventsub/events/channel.raid.ts +0 -49
  154. package/src/eventsub/events/channel.shield_mode.begin.ts +0 -50
  155. package/src/eventsub/events/channel.shield_mode.end.ts +0 -50
  156. package/src/eventsub/events/channel.shoutout.create.ts +0 -62
  157. package/src/eventsub/events/channel.shoutout.receive.ts +0 -52
  158. package/src/eventsub/events/channel.subscribe.ts +0 -49
  159. package/src/eventsub/events/channel.subscription.end.ts +0 -49
  160. package/src/eventsub/events/channel.subscription.gift.ts +0 -53
  161. package/src/eventsub/events/channel.subscription.message.ts +0 -67
  162. package/src/eventsub/events/channel.unban.ts +0 -51
  163. package/src/eventsub/events/channel.update.ts +0 -49
  164. package/src/eventsub/events/stream.offline.ts +0 -39
  165. package/src/eventsub/events/stream.online.ts +0 -45
  166. package/src/eventsub/events/user.update.ts +0 -45
@@ -1,55 +0,0 @@
1
- import { type BaseSubscription } from "../events-helpers.js"
2
-
3
- import { type ChannelPollBitsVoting, type ChannelPollChoice, type ChannelPollPointsVoting } from "./channel.poll._.js"
4
-
5
- type ChannelPollBeginType = "channel.poll.begin"
6
- type ChannelPollBeginVersion = "1"
7
-
8
- /** The parameters under which an event fires when A poll starts. */
9
- export interface ChannelPollBeginCondition {
10
- /** The user ID of the broadcaster. */
11
- broadcaster_user_id: string
12
- }
13
-
14
- /** The event information when A poll starts. */
15
- export interface ChannelPollBeginEvent {
16
- /** ID of the poll. */
17
- id: string
18
- /** The user ID of the broadcaster. */
19
- broadcaster_user_id: string
20
- /** The user login of the broadcaster. */
21
- broadcaster_user_login: string
22
- /** The user name of the broadcaster. */
23
- broadcaster_user_name: string
24
- /** Question displayed for the poll. */
25
- title: string
26
- /** An array of choices for the poll. */
27
- choices: ChannelPollChoice[]
28
- /** The bits voting settings for the poll. */
29
- bits_voting: ChannelPollBitsVoting
30
- /** The Channel Points voting settings for the poll. */
31
- channel_points_voting: ChannelPollPointsVoting
32
- /** The time the poll started. */
33
- started_at: Date
34
- /** The time the poll will end. */
35
- ends_at: Date
36
- }
37
-
38
- /** The event notification received when A poll starts. */
39
- export type ChannelPollBeginSubscription = BaseSubscription<
40
- ChannelPollBeginType,
41
- ChannelPollBeginVersion,
42
- ChannelPollBeginCondition
43
- >
44
-
45
- export function makeChannelPollBeginSubscription(
46
- userId: string,
47
- ): ChannelPollBeginSubscription {
48
- return {
49
- type: "channel.poll.begin",
50
- version: "1",
51
- condition: {
52
- broadcaster_user_id: userId,
53
- },
54
- }
55
- }
@@ -1,57 +0,0 @@
1
- import { type BaseSubscription } from "../events-helpers.js"
2
-
3
- import { type ChannelPollBitsVoting, type ChannelPollChoice, type ChannelPollPointsVoting } from "./channel.poll._.js"
4
-
5
- type ChannelPollEndType = "channel.poll.end"
6
- type ChannelPollEndVersion = "1"
7
-
8
- /** The parameters under which an event fires when A poll ends. */
9
- export interface ChannelPollEndCondition {
10
- /** The user ID of the broadcaster. */
11
- broadcaster_user_id: string
12
- }
13
-
14
- /** The event information when A poll ends. */
15
- export interface ChannelPollEndEvent {
16
- /** ID of the poll. */
17
- id: string
18
- /** The user ID of the broadcaster. */
19
- broadcaster_user_id: string
20
- /** The user login of the broadcaster. */
21
- broadcaster_user_login: string
22
- /** The user name of the broadcaster. */
23
- broadcaster_user_name: string
24
- /** Question displayed for the poll. */
25
- title: string
26
- /** An array of choices for the poll. Includes vote counts. */
27
- choices: ChannelPollChoice[]
28
- /** The bits voting settings for the poll. */
29
- bits_voting: ChannelPollBitsVoting
30
- /** The Channel Points voting settings for the poll. */
31
- channel_points_voting: ChannelPollPointsVoting
32
- /** The status of the poll. Valid values are completed, archived, and terminated. */
33
- status: string
34
- /** The time the poll started. */
35
- started_at: Date
36
- /** The time the poll ended. */
37
- ended_at: Date
38
- }
39
-
40
- /** The event notification received when A poll ends. */
41
- export type ChannelPollEndSubscription = BaseSubscription<
42
- ChannelPollEndType,
43
- ChannelPollEndVersion,
44
- ChannelPollEndCondition
45
- >
46
-
47
- export function makeChannelPollEndSubscription(
48
- userId: string,
49
- ): ChannelPollEndSubscription {
50
- return {
51
- type: "channel.poll.end",
52
- version: "1",
53
- condition: {
54
- broadcaster_user_id: userId,
55
- },
56
- }
57
- }
@@ -1,55 +0,0 @@
1
- import { type BaseSubscription } from "../events-helpers.js"
2
-
3
- import { type ChannelPollBitsVoting, type ChannelPollChoice, type ChannelPollPointsVoting } from "./channel.poll._.js"
4
-
5
- type ChannelPollProgressType = "channel.poll.progress"
6
- type ChannelPollProgressVersion = "1"
7
-
8
- /** The parameters under which an event fires when A user responds to a poll. */
9
- export interface ChannelPollProgressCondition {
10
- /** The user ID of the broadcaster. */
11
- broadcaster_user_id: string
12
- }
13
-
14
- /** The event information when A user responds to a poll. */
15
- export interface ChannelPollProgressEvent {
16
- /** ID of the poll. */
17
- id: string
18
- /** The user ID of the broadcaster. */
19
- broadcaster_user_id: string
20
- /** The user login of the broadcaster. */
21
- broadcaster_user_login: string
22
- /** The user name of the broadcaster. */
23
- broadcaster_user_name: string
24
- /** Question displayed for the poll. */
25
- title: string
26
- /** An array of choices for the poll. Includes vote counts. */
27
- choices: ChannelPollChoice[]
28
- /** The bits voting settings for the poll. */
29
- bits_voting: ChannelPollBitsVoting
30
- /** The Channel Points voting settings for the poll. */
31
- channel_points_voting: ChannelPollPointsVoting
32
- /** The time the poll started. */
33
- started_at: Date
34
- /** The time the poll will end. */
35
- ends_at: Date
36
- }
37
-
38
- /** The event notification received when A user responds to a poll. */
39
- export type ChannelPollProgressSubscription = BaseSubscription<
40
- ChannelPollProgressType,
41
- ChannelPollProgressVersion,
42
- ChannelPollProgressCondition
43
- >
44
-
45
- export function makeChannelPollProgressSubscription(
46
- userId: string,
47
- ): ChannelPollProgressSubscription {
48
- return {
49
- type: "channel.poll.progress",
50
- version: "1",
51
- condition: {
52
- broadcaster_user_id: userId,
53
- },
54
- }
55
- }
@@ -1,25 +0,0 @@
1
- export interface ChannelPredictionOutcome {
2
- /** The outcome ID. */
3
- id: string
4
- /** The outcome title. */
5
- title: string
6
- /** The color for the outcome. Valid values are pink and blue. */
7
- color: string
8
- /** Integer. The number of users who used Channel Points on this outcome. */
9
- users: number
10
- /** Integer. The total number of Channel Points used on this outcome. */
11
- channel_points: number
12
- /** An array of users who used the most Channel Points on this outcome. */
13
- top_predictors: Array<{
14
- /** The ID of the user. */
15
- user_id: string
16
- /** The login of the user. */
17
- user_login: string
18
- /** The display name of the user. */
19
- user_name: string
20
- /** Integer. The number of Channel Points won. This value is always null in the event payload for Prediction progress and Prediction lock. This value is 0 if the outcome did not win or if the Prediction was canceled and Channel Points were refunded. */
21
- channel_points_won: number
22
- /** Integer. The number of Channel Points used to participate in the Prediction. */
23
- channel_points_used: number
24
- }>
25
- }
@@ -1,51 +0,0 @@
1
- import { type BaseSubscription } from "../events-helpers.js"
2
-
3
- import { type ChannelPredictionOutcome } from "./channel.prediction._.js"
4
-
5
- type ChannelPredictionBeginType = "channel.prediction.begin"
6
- type ChannelPredictionBeginVersion = "1"
7
-
8
- /** The parameters under which an event fires when A Prediction startn. */
9
- export interface ChannelPredictionBeginCondition {
10
- /** The user ID of the broadcaster. */
11
- broadcaster_user_id: string
12
- }
13
-
14
- /** The event information when A Prediction startn. */
15
- export interface ChannelPredictionBeginEvent {
16
- /** Channel Points Prediction ID. */
17
- id: string
18
- /** The user ID of the broadcaster. */
19
- broadcaster_user_id: string
20
- /** The user login of the broadcaster. */
21
- broadcaster_user_login: string
22
- /** The user name of the broadcaster. */
23
- broadcaster_user_name: string
24
- /** Title for the Channel Points Prediction. */
25
- title: string
26
- /** An array of outcomes for the Channel Points Prediction. */
27
- outcomes: ChannelPredictionOutcome[]
28
- /** The time the Channel Points Prediction started. */
29
- started_at: Date
30
- /** The time the Channel Points Prediction will automatically lock. */
31
- locks_at: Date
32
- }
33
-
34
- /** The event notification received when A Prediction startn. */
35
- export type ChannelPredictionBeginSubscription = BaseSubscription<
36
- ChannelPredictionBeginType,
37
- ChannelPredictionBeginVersion,
38
- ChannelPredictionBeginCondition
39
- >
40
-
41
- export function makeChannelPredictionBeginSubscription(
42
- userId: string,
43
- ): ChannelPredictionBeginSubscription {
44
- return {
45
- type: "channel.prediction.begin",
46
- version: "1",
47
- condition: {
48
- broadcaster_user_id: userId,
49
- },
50
- }
51
- }
@@ -1,55 +0,0 @@
1
- import { type BaseSubscription } from "../events-helpers.js"
2
-
3
- import { type ChannelPredictionOutcome } from "./channel.prediction._.js"
4
-
5
- type ChannelPredictionEndType = "channel.prediction.end"
6
- type ChannelPredictionEndVersion = "1"
7
-
8
- /** The parameters under which an event fires when A Prediction ends. */
9
- export interface ChannelPredictionEndCondition {
10
- /** The user ID of the broadcaster. */
11
- broadcaster_user_id: string
12
- }
13
-
14
- /** The event information when A Prediction ends. */
15
- export interface ChannelPredictionEndEvent {
16
- /** Channel Points Prediction ID. */
17
- id: string
18
- /** The user ID of the broadcaster. */
19
- broadcaster_user_id: string
20
- /** The user login of the broadcaster. */
21
- broadcaster_user_login: string
22
- /** The user name of the broadcaster. */
23
- broadcaster_user_name: string
24
- /** Title for the Channel Points Prediction. */
25
- title: string
26
- /** ID of the winning outcome. */
27
- winning_outcome_id: string
28
- /** An array of outcomes for the Channel Points Prediction. Includes top_predictors. */
29
- outcomes: ChannelPredictionOutcome[]
30
- /** The status of the Channel Points Prediction. Valid values are resolved and canceled. */
31
- status: string
32
- /** The time the Channel Points Prediction started. */
33
- started_at: Date
34
- /** The time the Channel Points Prediction ended. */
35
- ended_at: Date
36
- }
37
-
38
- /** The event notification received when A Prediction ends. */
39
- export type ChannelPredictionEndSubscription = BaseSubscription<
40
- ChannelPredictionEndType,
41
- ChannelPredictionEndVersion,
42
- ChannelPredictionEndCondition
43
- >
44
-
45
- export function makeChannelPredictionEndSubscription(
46
- userId: string,
47
- ): ChannelPredictionEndSubscription {
48
- return {
49
- type: "channel.prediction.end",
50
- version: "1",
51
- condition: {
52
- broadcaster_user_id: userId,
53
- },
54
- }
55
- }
@@ -1,51 +0,0 @@
1
- import { type BaseSubscription } from "../events-helpers.js"
2
-
3
- import { type ChannelPredictionOutcome } from "./channel.prediction._.js"
4
-
5
- type ChannelPredictionLockType = "channel.prediction.lock"
6
- type ChannelPredictionLockVersion = "1"
7
-
8
- /** The parameters under which an event fires when A Prediction lockeds. */
9
- export interface ChannelPredictionLockCondition {
10
- /** The user ID of the broadcaster. */
11
- broadcaster_user_id: string
12
- }
13
-
14
- /** The event information when A Prediction lockeds. */
15
- export interface ChannelPredictionLockEvent {
16
- /** Channel Points Prediction ID. */
17
- id: string
18
- /** The user ID of the broadcaster. */
19
- broadcaster_user_id: string
20
- /** The user login of the broadcaster. */
21
- broadcaster_user_login: string
22
- /** The user name of the broadcaster. */
23
- broadcaster_user_name: string
24
- /** Title for the Channel Points Prediction. */
25
- title: string
26
- /** An array of outcomes for the Channel Points Prediction. Includes top_predictors. */
27
- outcomes: ChannelPredictionOutcome[]
28
- /** The time the Channel Points Prediction started. */
29
- started_at: Date
30
- /** The time the Channel Points Prediction was locked. */
31
- locked_at: Date
32
- }
33
-
34
- /** The event notification received when A Prediction lockeds. */
35
- export type ChannelPredictionLockSubscription = BaseSubscription<
36
- ChannelPredictionLockType,
37
- ChannelPredictionLockVersion,
38
- ChannelPredictionLockCondition
39
- >
40
-
41
- export function makeChannelPredictionLockSubscription(
42
- userId: string,
43
- ): ChannelPredictionLockSubscription {
44
- return {
45
- type: "channel.prediction.lock",
46
- version: "1",
47
- condition: {
48
- broadcaster_user_id: userId,
49
- },
50
- }
51
- }
@@ -1,51 +0,0 @@
1
- import { type BaseSubscription } from "../events-helpers.js"
2
-
3
- import { type ChannelPredictionOutcome } from "./channel.prediction._.js"
4
-
5
- type ChannelPredictionProgressType = "channel.prediction.progress"
6
- type ChannelPredictionProgressVersion = "1"
7
-
8
- /** The parameters under which an event fires when A user participates in a Prediction. */
9
- export interface ChannelPredictionProgressCondition {
10
- /** The user ID of the broadcaster. */
11
- broadcaster_user_id: string
12
- }
13
-
14
- /** The event information when A user participates in a Prediction. */
15
- export interface ChannelPredictionProgressEvent {
16
- /** Channel Points Prediction ID. */
17
- id: string
18
- /** The user ID of the broadcaster. */
19
- broadcaster_user_id: string
20
- /** The user login of the broadcaster. */
21
- broadcaster_user_login: string
22
- /** The user name of the broadcaster. */
23
- broadcaster_user_name: string
24
- /** Title for the Channel Points Prediction. */
25
- title: string
26
- /** An array of outcomes for the Channel Points Prediction. Includes top_predictors. */
27
- outcomes: ChannelPredictionOutcome[]
28
- /** The time the Channel Points Prediction started. */
29
- started_at: Date
30
- /** The time the Channel Points Prediction will automatically lock. */
31
- locks_at: Date
32
- }
33
-
34
- /** The event notification received when A user participates in a Prediction. */
35
- export type ChannelPredictionProgressSubscription = BaseSubscription<
36
- ChannelPredictionProgressType,
37
- ChannelPredictionProgressVersion,
38
- ChannelPredictionProgressCondition
39
- >
40
-
41
- export function makeChannelPredictionProgressSubscription(
42
- userId: string,
43
- ): ChannelPredictionProgressSubscription {
44
- return {
45
- type: "channel.prediction.progress",
46
- version: "1",
47
- condition: {
48
- broadcaster_user_id: userId,
49
- },
50
- }
51
- }
@@ -1,49 +0,0 @@
1
- import { type BaseSubscription } from "../events-helpers.js"
2
-
3
- type ChannelRaidType = "channel.raid"
4
- type ChannelRaidVersion = "1"
5
-
6
- /** The parameters under which an event fires when The broadcaster raids another broadcaster's channel. */
7
- export interface ChannelRaidCondition {
8
- /** The user ID of the broadcaster that created the channel raid. */
9
- from_broadcaster_user_id?: string
10
- /** The user ID of the broadcaster that received the channel raid. */
11
- to_broadcaster_user_id?: string
12
- }
13
-
14
- /** The event information when The broadcaster raids another broadcaster's channel. */
15
- export interface ChannelRaidEvent {
16
- /** The user ID of the broadcaster that created the raid. */
17
- from_broadcaster_user_id: string
18
- /** The user login of the broadcaster that created the raid. */
19
- from_broadcaster_user_login: string
20
- /** The user name of the broadcaster that created the raid. */
21
- from_broadcaster_user_name: string
22
- /** The user ID of the broadcaster that received the raid. */
23
- to_broadcaster_user_id: string
24
- /** The user login of the broadcaster that received the raid. */
25
- to_broadcaster_user_login: string
26
- /** The user name of the broadcaster that received the raid. */
27
- to_broadcaster_user_name: string
28
- /** Integer. The number of viewers in the raid. */
29
- viewers: number
30
- }
31
-
32
- /** The event notification received when The broadcaster raids another broadcaster's channel. */
33
- export type ChannelRaidSubscription = BaseSubscription<
34
- ChannelRaidType,
35
- ChannelRaidVersion,
36
- ChannelRaidCondition
37
- >
38
-
39
- export function makeChannelRaidSubscription(
40
- userId: string,
41
- ): ChannelRaidSubscription {
42
- return {
43
- type: "channel.raid",
44
- version: "1",
45
- condition: {
46
- to_broadcaster_user_id: userId,
47
- },
48
- }
49
- }
@@ -1,50 +0,0 @@
1
- import { type BaseSubscription } from "../events-helpers.js"
2
-
3
- type ShieldModeBeginType = "channel.shield_mode.begin"
4
- type ShieldModeBeginVersion = "1"
5
-
6
- /** The parameters under which an event fires when The broadcaster activates Shield Mode. */
7
- export interface ShieldModeBeginCondition {
8
- /** The user ID of the broadcaster. */
9
- broadcaster_user_id: string
10
- /** The user ID of the moderator or broadcaster. */
11
- moderator_user_id: string
12
- }
13
-
14
- /** The event information when The broadcaster activates Shield Mode. */
15
- export interface ShieldModeBeginEvent {
16
- /** The user ID of the broadcaster. */
17
- broadcaster_user_id: string
18
- /** The user login of the broadcaster. */
19
- broadcaster_user_login: string
20
- /** The user name of the broadcaster. */
21
- broadcaster_user_name: string
22
- /** The user ID of the moderator that updated the shield mode's status. If the broadcaster updated the status, this ID will be the same as broadcaster_user_id. */
23
- moderator_user_id: string
24
- /** The user login of the moderator. */
25
- moderator_user_login: string
26
- /** The user name of the moderator. */
27
- moderator_user_name: string
28
- /** The time the moderator activated shield mode. */
29
- started_at: Date
30
- }
31
-
32
- /** The event notification received when The broadcaster activates Shield Mode. */
33
- export type ShieldModeBeginSubscription = BaseSubscription<
34
- ShieldModeBeginType,
35
- ShieldModeBeginVersion,
36
- ShieldModeBeginCondition
37
- >
38
-
39
- export function makeShieldModeBeginSubscription(
40
- userId: string,
41
- ): ShieldModeBeginSubscription {
42
- return {
43
- type: "channel.shield_mode.begin",
44
- version: "1",
45
- condition: {
46
- broadcaster_user_id: userId,
47
- moderator_user_id: userId,
48
- },
49
- }
50
- }
@@ -1,50 +0,0 @@
1
- import { type BaseSubscription } from "../events-helpers.js"
2
-
3
- type ShieldModeEndType = "channel.shield_mode.end"
4
- type ShieldModeEndVersion = "1"
5
-
6
- /** The parameters under which an event fires when The broadcaster deactivates Shield Mode. */
7
- export interface ShieldModeEndCondition {
8
- /** The user ID of the broadcaster. */
9
- broadcaster_user_id: string
10
- /** The user ID of the moderator or broadcaster. */
11
- moderator_user_id: string
12
- }
13
-
14
- /** The event information when The broadcaster deactivates Shield Mode. */
15
- export interface ShieldModeEndEvent {
16
- /** The user ID of the broadcaster. */
17
- broadcaster_user_id: string
18
- /** The user login of the broadcaster. */
19
- broadcaster_user_login: string
20
- /** The user name of the broadcaster. */
21
- broadcaster_user_name: string
22
- /** The user ID of the moderator that updated the shield mode's status. If the broadcaster updated the status, this ID will be the same as broadcaster_user_id. */
23
- moderator_user_id: string
24
- /** The user login of the moderator. */
25
- moderator_user_login: string
26
- /** The user name of the moderator. */
27
- moderator_user_name: string
28
- /** The time the moderator deactivated shield mode. */
29
- ended_at: Date
30
- }
31
-
32
- /** The event notification received when The broadcaster deactivates Shield Mode. */
33
- export type ShieldModeEndSubscription = BaseSubscription<
34
- ShieldModeEndType,
35
- ShieldModeEndVersion,
36
- ShieldModeEndCondition
37
- >
38
-
39
- export function makeShieldModeEndSubscription(
40
- userId: string,
41
- ): ShieldModeEndSubscription {
42
- return {
43
- type: "channel.shield_mode.end",
44
- version: "1",
45
- condition: {
46
- broadcaster_user_id: userId,
47
- moderator_user_id: userId,
48
- },
49
- }
50
- }
@@ -1,62 +0,0 @@
1
- import { type BaseSubscription } from "../events-helpers.js"
2
-
3
- type ShoutoutCreateType = "channel.shoutout.create"
4
- type ShoutoutCreateVersion = "1"
5
-
6
- /** The parameters under which an event fires when The broadcaster sends a Shoutout. */
7
- export interface ShoutoutCreateCondition {
8
- /** The user ID of the broadcaster. */
9
- broadcaster_user_id: string
10
- /** The user ID of the moderator or broadcaster. */
11
- moderator_user_id: string
12
- }
13
-
14
- /** The event information when The broadcaster sends a Shoutout. */
15
- export interface ShoutoutCreateEvent {
16
- /** The user ID of the broadcaster. */
17
- broadcaster_user_id: string
18
- /** The user login of the broadcaster. */
19
- broadcaster_user_login: string
20
- /** The user name of the broadcaster. */
21
- broadcaster_user_name: string
22
- /** The user ID of the broadcaster that received the shoutout. */
23
- to_broadcaster_user_id: string
24
- /** The user login of the broadcaster. */
25
- to_broadcaster_user_login: string
26
- /** The user name of the broadcaster. */
27
- to_broadcaster_user_name: string
28
- /** The user ID of the moderator that sent the shoutout. If the broadcaster sent the shoutout, this ID is the same as the ID in broadcaster_user_id. */
29
- moderator_user_id: string
30
- /** The user login of the moderator. */
31
- moderator_user_login: string
32
- /** The user name of the moderator. */
33
- moderator_user_name: string
34
- /** Integer. The number of users that were watching the broadcaster's stream at the time of the shoutout. */
35
- viewer_count: number
36
- /** The time the moderator sent the shoutout. */
37
- started_at: Date
38
- /** The time the broadcaster may send a shoutout to a different broadcaster. */
39
- cooldown_ends_at: Date
40
- /** The time the broadcaster may send another shoutout to the broadcaster in to_broadcaster_user_id. */
41
- target_cooldown_ends_at: Date
42
- }
43
-
44
- /** The event notification received when The broadcaster sends a Shoutout. */
45
- export type ShoutoutCreateSubscription = BaseSubscription<
46
- ShoutoutCreateType,
47
- ShoutoutCreateVersion,
48
- ShoutoutCreateCondition
49
- >
50
-
51
- export function makeShoutoutCreateSubscription(
52
- userId: string,
53
- ): ShoutoutCreateSubscription {
54
- return {
55
- type: "channel.shoutout.create",
56
- version: "1",
57
- condition: {
58
- broadcaster_user_id: userId,
59
- moderator_user_id: userId,
60
- },
61
- }
62
- }
@@ -1,52 +0,0 @@
1
- import { type BaseSubscription } from "../events-helpers.js"
2
-
3
- type ShoutoutReceiveType = "channel.shoutout.receive"
4
- type ShoutoutReceiveVersion = "1"
5
-
6
- /** The parameters under which an event fires when The broadcaster receives a Shoutout. */
7
- export interface ShoutoutReceiveCondition {
8
- /** The user ID of the broadcaster. */
9
- broadcaster_user_id: string
10
- /** The user ID of the moderator or broadcaster. */
11
- moderator_user_id: string
12
- }
13
-
14
- /** The event information when The broadcaster receives a Shoutout. */
15
- export interface ShoutoutReceiveEvent {
16
- /** The user ID of the broadcaster. */
17
- broadcaster_user_id: string
18
- /** The user login of the broadcaster. */
19
- broadcaster_user_login: string
20
- /** The user name of the broadcaster. */
21
- broadcaster_user_name: string
22
- /** The user ID of the broadcaster that sent the shoutout. */
23
- from_broadcaster_user_id: string
24
- /** The user login of the broadcaster. */
25
- from_broadcaster_user_login: string
26
- /** The user name of the broadcaster. */
27
- from_broadcaster_user_name: string
28
- /** Integer. The number of users that were watching the from-broadcaster's stream at the time of the shoutout. */
29
- viewer_count: number
30
- /** The time the moderator sent the shoutout. */
31
- started_at: Date
32
- }
33
-
34
- /** The event notification received when The broadcaster receives a Shoutout. */
35
- export type ShoutoutReceiveSubscription = BaseSubscription<
36
- ShoutoutReceiveType,
37
- ShoutoutReceiveVersion,
38
- ShoutoutReceiveCondition
39
- >
40
-
41
- export function makeShoutoutReceiveSubscription(
42
- userId: string,
43
- ): ShoutoutReceiveSubscription {
44
- return {
45
- type: "channel.shoutout.receive",
46
- version: "1",
47
- condition: {
48
- broadcaster_user_id: userId,
49
- moderator_user_id: userId,
50
- },
51
- }
52
- }