@overlaysymphony/twitch 0.2.2 → 0.3.0

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 (174) hide show
  1. package/package.json +6 -2
  2. package/src/authentication/authentication.ts +1 -1
  3. package/src/authentication/index.ts +1 -1
  4. package/src/chat/chat.ts +69 -134
  5. package/src/chat/helpers.ts +33 -24
  6. package/src/chat/index.ts +4 -6
  7. package/src/chat/pronouns.ts +141 -0
  8. package/src/eventsub/events/automod.message.hold-2.ts +81 -0
  9. package/src/eventsub/events/automod.message.update-2.ts +94 -0
  10. package/src/eventsub/events/automod.settings.update-1.ts +65 -0
  11. package/src/eventsub/events/automod.terms.update-1.ts +59 -0
  12. package/src/eventsub/events/channel.ad_break.begin-1.ts +50 -0
  13. package/src/eventsub/events/channel.ban-1.ts +58 -0
  14. package/src/eventsub/events/channel.bits.use-1.ts +112 -0
  15. package/src/eventsub/events/channel.channel_points_automatic_reward_redemption.add-2.ts +88 -0
  16. package/src/eventsub/events/channel.channel_points_custom_reward.add-1.ts +101 -0
  17. package/src/eventsub/events/channel.channel_points_custom_reward.remove-1.ts +103 -0
  18. package/src/eventsub/events/channel.channel_points_custom_reward.update-1.ts +103 -0
  19. package/src/eventsub/events/channel.channel_points_custom_reward_redemption.add-1.ts +65 -0
  20. package/src/eventsub/events/channel.channel_points_custom_reward_redemption.update-1.ts +65 -0
  21. package/src/eventsub/events/channel.charity_campaign.donate-1.ts +69 -0
  22. package/src/eventsub/events/channel.charity_campaign.progress-1.ts +74 -0
  23. package/src/eventsub/events/channel.charity_campaign.start-1.ts +76 -0
  24. package/src/eventsub/events/channel.charity_campaign.stop-1.ts +76 -0
  25. package/src/eventsub/events/channel.chat.clear-1.ts +41 -0
  26. package/src/eventsub/events/channel.chat.clear_user_messages-1.ts +47 -0
  27. package/src/eventsub/events/channel.chat.message-1.ts +160 -0
  28. package/src/eventsub/events/channel.chat.message_delete-1.ts +49 -0
  29. package/src/eventsub/events/channel.chat.notification-1.ts +317 -0
  30. package/src/eventsub/events/channel.chat.user_message_hold-1.ts +75 -0
  31. package/src/eventsub/events/channel.chat.user_message_update-1.ts +82 -0
  32. package/src/eventsub/events/channel.chat_settings.update-1.ts +83 -0
  33. package/src/eventsub/events/channel.cheer-1.ts +50 -0
  34. package/src/eventsub/events/channel.follow-2.ts +49 -0
  35. package/src/eventsub/events/channel.goal.begin-1.ts +80 -0
  36. package/src/eventsub/events/channel.goal.end-1.ts +80 -0
  37. package/src/eventsub/events/channel.goal.progress-1.ts +80 -0
  38. package/src/eventsub/events/channel.guest_star_guest.update-beta.ts +85 -0
  39. package/src/eventsub/events/channel.guest_star_session.begin-beta.ts +50 -0
  40. package/src/eventsub/events/channel.guest_star_session.end-beta.ts +58 -0
  41. package/src/eventsub/events/channel.guest_star_settings.update-beta.ts +62 -0
  42. package/src/eventsub/events/channel.hype_train.begin-2.ts +90 -0
  43. package/src/eventsub/events/channel.hype_train.end-2.ts +70 -0
  44. package/src/eventsub/events/channel.hype_train.progress-2.ts +90 -0
  45. package/src/eventsub/events/channel.moderate-2.ts +258 -0
  46. package/src/eventsub/events/channel.moderator.add-1.ts +44 -0
  47. package/src/eventsub/events/channel.moderator.remove-1.ts +44 -0
  48. package/src/eventsub/events/channel.poll.begin-1.ts +73 -0
  49. package/src/eventsub/events/channel.poll.end-1.ts +75 -0
  50. package/src/eventsub/events/channel.poll.progress-1.ts +73 -0
  51. package/src/eventsub/events/channel.prediction.begin-1.ts +72 -0
  52. package/src/eventsub/events/channel.prediction.end-1.ts +76 -0
  53. package/src/eventsub/events/channel.prediction.lock-1.ts +72 -0
  54. package/src/eventsub/events/channel.prediction.progress-1.ts +72 -0
  55. package/src/eventsub/events/channel.raid-1.ts +48 -0
  56. package/src/eventsub/events/channel.shared_chat.begin-1.ts +55 -0
  57. package/src/eventsub/events/channel.shared_chat.end-1.ts +46 -0
  58. package/src/eventsub/events/channel.shared_chat.update-1.ts +55 -0
  59. package/src/eventsub/events/channel.shield_mode.begin-1.ts +51 -0
  60. package/src/eventsub/events/channel.shield_mode.end-1.ts +51 -0
  61. package/src/eventsub/events/channel.shoutout.create-1.ts +61 -0
  62. package/src/eventsub/events/channel.shoutout.receive-1.ts +51 -0
  63. package/src/eventsub/events/channel.subscribe-1.ts +48 -0
  64. package/src/eventsub/events/channel.subscription.end-1.ts +48 -0
  65. package/src/eventsub/events/channel.subscription.gift-1.ts +52 -0
  66. package/src/eventsub/events/channel.subscription.message-1.ts +66 -0
  67. package/src/eventsub/events/channel.suspicious_user.message-1.ts +85 -0
  68. package/src/eventsub/events/channel.suspicious_user.update-1.ts +55 -0
  69. package/src/eventsub/events/channel.unban-1.ts +50 -0
  70. package/src/eventsub/events/channel.unban_request.create-1.ts +53 -0
  71. package/src/eventsub/events/channel.unban_request.resolve-1.ts +64 -0
  72. package/src/eventsub/events/channel.update-2.ts +48 -0
  73. package/src/eventsub/events/channel.vip.add-1.ts +44 -0
  74. package/src/eventsub/events/channel.vip.remove-1.ts +44 -0
  75. package/src/eventsub/events/channel.warning.acknowledge-1.ts +47 -0
  76. package/src/eventsub/events/channel.warning.send-1.ts +57 -0
  77. package/src/eventsub/events/index.ts +73 -284
  78. package/src/eventsub/events/stream.offline-1.ts +38 -0
  79. package/src/eventsub/events/stream.online-1.ts +44 -0
  80. package/src/eventsub/events/user.update-1.ts +48 -0
  81. package/src/eventsub/events/user.whisper.message-1.ts +51 -0
  82. package/src/eventsub/events-helpers.ts +52 -24
  83. package/src/eventsub/eventsub.ts +37 -74
  84. package/src/eventsub/index.ts +8 -6
  85. package/src/eventsub/messages.ts +16 -4
  86. package/src/helix/channel-points/custom-rewards.ts +120 -33
  87. package/src/helix/channel-points/index.ts +1 -1
  88. package/src/helix/channels/channels.ts +39 -0
  89. package/src/helix/channels/index.ts +1 -0
  90. package/src/helix/chat/emotes.ts +49 -0
  91. package/src/helix/chat/index.ts +3 -0
  92. package/src/helix/chat/send.ts +109 -0
  93. package/src/helix/chat/shared.ts +49 -0
  94. package/src/helix/helix.ts +6 -21
  95. package/src/helix/subscriptions/index.ts +1 -1
  96. package/src/helix/subscriptions/subscriptions.ts +46 -48
  97. package/src/helix/users/index.ts +1 -1
  98. package/src/helix/users/users.ts +22 -19
  99. package/src/helpers/alerts/alerts.ts +5 -5
  100. package/src/helpers/alerts/index.ts +2 -2
  101. package/src/helpers/charity/charity.ts +2 -2
  102. package/src/helpers/charity/index.ts +1 -1
  103. package/src/helpers/goal/goal.ts +2 -2
  104. package/src/helpers/goal/index.ts +1 -1
  105. package/src/helpers/hype-train/hype-train.ts +2 -2
  106. package/src/helpers/hype-train/index.ts +1 -1
  107. package/src/helpers/poll/index.ts +1 -1
  108. package/src/helpers/poll/poll.ts +3 -3
  109. package/src/helpers/prediction/index.ts +1 -1
  110. package/src/helpers/prediction/prediction.ts +3 -3
  111. package/src/helpers/redemption/index.ts +1 -1
  112. package/src/helpers/redemption/redemption.ts +2 -2
  113. package/src/helpers/status/index.ts +1 -1
  114. package/src/helpers/status/status.ts +2 -2
  115. package/src/ui/authentication.ts +1 -1
  116. package/src/ui/popup.ts +26 -3
  117. package/src/chat/interfaces/events.ts +0 -269
  118. package/src/chat/interfaces/index.ts +0 -9
  119. package/src/chat/parser.ts +0 -254
  120. package/src/eventsub/events/channel.ad_break.begin.ts +0 -51
  121. package/src/eventsub/events/channel.ban.ts +0 -59
  122. package/src/eventsub/events/channel.channel_points_custom_reward._.ts +0 -29
  123. package/src/eventsub/events/channel.channel_points_custom_reward.add.ts +0 -75
  124. package/src/eventsub/events/channel.channel_points_custom_reward.remove.ts +0 -77
  125. package/src/eventsub/events/channel.channel_points_custom_reward.update.ts +0 -77
  126. package/src/eventsub/events/channel.channel_points_custom_reward_redemption._.ts +0 -10
  127. package/src/eventsub/events/channel.channel_points_custom_reward_redemption.add.ts +0 -59
  128. package/src/eventsub/events/channel.channel_points_custom_reward_redemption.update.ts +0 -59
  129. package/src/eventsub/events/channel.charity_campaign.donate.ts +0 -66
  130. package/src/eventsub/events/channel.charity_campaign.progress.ts +0 -67
  131. package/src/eventsub/events/channel.charity_campaign.start.ts +0 -69
  132. package/src/eventsub/events/channel.charity_campaign.stop.ts +0 -69
  133. package/src/eventsub/events/channel.chat.clear.ts +0 -42
  134. package/src/eventsub/events/channel.chat.clear_user_messages.ts +0 -48
  135. package/src/eventsub/events/channel.chat.message_delete.ts +0 -50
  136. package/src/eventsub/events/channel.chat.notification.ts +0 -50
  137. package/src/eventsub/events/channel.cheer.ts +0 -51
  138. package/src/eventsub/events/channel.follow.ts +0 -50
  139. package/src/eventsub/events/channel.goal.begin.ts +0 -51
  140. package/src/eventsub/events/channel.goal.end.ts +0 -55
  141. package/src/eventsub/events/channel.goal.progress.ts +0 -51
  142. package/src/eventsub/events/channel.guest_star_guest.update.ts +0 -66
  143. package/src/eventsub/events/channel.guest_star_session.begin.ts +0 -46
  144. package/src/eventsub/events/channel.guest_star_session.end.ts +0 -48
  145. package/src/eventsub/events/channel.guest_star_settings.update.ts +0 -50
  146. package/src/eventsub/events/channel.hype_train._.ts +0 -12
  147. package/src/eventsub/events/channel.hype_train.begin.ts +0 -57
  148. package/src/eventsub/events/channel.hype_train.end.ts +0 -55
  149. package/src/eventsub/events/channel.hype_train.progress.ts +0 -70
  150. package/src/eventsub/events/channel.moderator.add.ts +0 -45
  151. package/src/eventsub/events/channel.moderator.remove.ts +0 -45
  152. package/src/eventsub/events/channel.poll._.ts +0 -26
  153. package/src/eventsub/events/channel.poll.begin.ts +0 -55
  154. package/src/eventsub/events/channel.poll.end.ts +0 -57
  155. package/src/eventsub/events/channel.poll.progress.ts +0 -55
  156. package/src/eventsub/events/channel.prediction._.ts +0 -25
  157. package/src/eventsub/events/channel.prediction.begin.ts +0 -51
  158. package/src/eventsub/events/channel.prediction.end.ts +0 -55
  159. package/src/eventsub/events/channel.prediction.lock.ts +0 -51
  160. package/src/eventsub/events/channel.prediction.progress.ts +0 -51
  161. package/src/eventsub/events/channel.raid.ts +0 -49
  162. package/src/eventsub/events/channel.shield_mode.begin.ts +0 -50
  163. package/src/eventsub/events/channel.shield_mode.end.ts +0 -50
  164. package/src/eventsub/events/channel.shoutout.create.ts +0 -62
  165. package/src/eventsub/events/channel.shoutout.receive.ts +0 -52
  166. package/src/eventsub/events/channel.subscribe.ts +0 -49
  167. package/src/eventsub/events/channel.subscription.end.ts +0 -49
  168. package/src/eventsub/events/channel.subscription.gift.ts +0 -53
  169. package/src/eventsub/events/channel.subscription.message.ts +0 -67
  170. package/src/eventsub/events/channel.unban.ts +0 -51
  171. package/src/eventsub/events/channel.update.ts +0 -49
  172. package/src/eventsub/events/stream.offline.ts +0 -39
  173. package/src/eventsub/events/stream.online.ts +0 -45
  174. package/src/eventsub/events/user.update.ts +0 -45
@@ -1,12 +0,0 @@
1
- export interface HypeTrainTopContribution {
2
- /** The ID of the user that made the contribution. */
3
- user_id: string
4
- /** The user’s login name. */
5
- user_login: string
6
- /** The user’s display name. */
7
- user_name: string
8
- /** The contribution method used. Possible values are:\n bits — Cheering with Bits.\n subscription — Subscription activity like subscribing or gifting subscriptions.\n other — Covers other contribution methods not listed. */
9
- type: string
10
- /** Integer. The total amount contributed. If type is bits, total represents the amount of Bits used. If type is subscription, total is 500, 1000, or 2500 to represent tier 1, 2, or 3 subscriptions, respectively. */
11
- total: number
12
- }
@@ -1,57 +0,0 @@
1
- import { type BaseSubscription } from "../events-helpers.js"
2
-
3
- import { type HypeTrainTopContribution } from "./channel.hype_train._.js"
4
-
5
- type HypeTrainBeginType = "channel.hype_train.begin"
6
- type HypeTrainBeginVersion = "1"
7
-
8
- /** The parameters under which an event fires when A Hype Train begins. */
9
- export interface HypeTrainBeginCondition {
10
- /** The user ID of the broadcaster. */
11
- broadcaster_user_id: string
12
- }
13
-
14
- /** The event information when A Hype Train begins. */
15
- export interface HypeTrainBeginEvent {
16
- /** The hype train 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
- /** Integer. Total points contributed to the hype train. */
25
- total: number
26
- /** Integer. The number of points contributed to the hype train at the current level. */
27
- progress: number
28
- /** Integer. The number of points required to reach the next level. */
29
- goal: number
30
- /** The contributors with the most points contributed. */
31
- top_contributions: HypeTrainTopContribution[]
32
- /** Integer. The starting level of the hype train. */
33
- level: number
34
- /** The time the hype train started. */
35
- started_at: Date
36
- /** The time the hype train expires. The expiration is extended when the hype train reaches a new level. */
37
- expires_at: Date
38
- }
39
-
40
- /** The event notification received when A Hype Train begins. */
41
- export type HypeTrainBeginSubscription = BaseSubscription<
42
- HypeTrainBeginType,
43
- HypeTrainBeginVersion,
44
- HypeTrainBeginCondition
45
- >
46
-
47
- export function makeHypeTrainBeginSubscription(
48
- userId: string,
49
- ): HypeTrainBeginSubscription {
50
- return {
51
- type: "channel.hype_train.begin",
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 HypeTrainTopContribution } from "./channel.hype_train._.js"
4
-
5
- type HypeTrainEndType = "channel.hype_train.end"
6
- type HypeTrainEndVersion = "1"
7
-
8
- /** The parameters under which an event fires when A Hype Train ends. */
9
- export interface HypeTrainEndCondition {
10
- /** The user ID of the broadcaster. */
11
- broadcaster_user_id: string
12
- }
13
-
14
- /** The event information when A Hype Train ends. */
15
- export interface HypeTrainEndEvent {
16
- /** The hype train 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
- /** Integer. The final level of the hype train. */
25
- level: number
26
- /** Integer. Total points contributed to the hype train. */
27
- total: number
28
- /** The contributors with the most points contributed. */
29
- top_contributions: HypeTrainTopContribution[]
30
- /** The time the hype train started. */
31
- started_at: Date
32
- /** The time the hype train ended. */
33
- ended_at: Date
34
- /** The time the hype train cooldown ends so that the next hype train can start. */
35
- cooldown_ends_at: Date
36
- }
37
-
38
- /** The event notification received when A Hype Train ends. */
39
- export type HypeTrainEndSubscription = BaseSubscription<
40
- HypeTrainEndType,
41
- HypeTrainEndVersion,
42
- HypeTrainEndCondition
43
- >
44
-
45
- export function makeHypeTrainEndSubscription(
46
- userId: string,
47
- ): HypeTrainEndSubscription {
48
- return {
49
- type: "channel.hype_train.end",
50
- version: "1",
51
- condition: {
52
- broadcaster_user_id: userId,
53
- },
54
- }
55
- }
@@ -1,70 +0,0 @@
1
- import { type BaseSubscription } from "../events-helpers.js"
2
-
3
- import { type HypeTrainTopContribution } from "./channel.hype_train._.js"
4
-
5
- type HypeTrainProgressType = "channel.hype_train.progress"
6
- type HypeTrainProgressVersion = "1"
7
-
8
- /** The parameters under which an event fires when A Hype Train makes progress. */
9
- export interface HypeTrainProgressCondition {
10
- /** The user ID of the broadcaster. */
11
- broadcaster_user_id: string
12
- }
13
-
14
- /** The event information when A Hype Train makes progress. */
15
- export interface HypeTrainProgressEvent {
16
- /** The hype train 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
- /** Integer. The current level of the hype train. */
25
- level: number
26
- /** Integer. Total points contributed to the hype train. */
27
- total: number
28
- /** Integer. The number of points contributed to the hype train at the current level. */
29
- progress: number
30
- /** Integer. The number of points required to reach the next level. */
31
- goal: number
32
- /** The contributors with the most points contributed. */
33
- top_contributions: HypeTrainTopContribution[]
34
- /** The most recent contribution. */
35
- last_contribution: {
36
- /** The user ID of the user who made the contribution. */
37
- user_id: string
38
- /** The user login name. */
39
- user_login: string
40
- /** The user name. */
41
- user_name: string
42
- /** The contribution method used. Possible values are:\n bits — Cheering with Bits.\n subscription — Subscription activity like subscribing or gifting subscriptions.\n other — Covers other contribution methods not listed. */
43
- type: string
44
- /** Integer. The total amount contributed. If type is bits, total represents the amount of Bits used. If type is subscription, total is 500, 1000, or 2500 to represent tier 1, 2, or 3 subscriptions, respectively. */
45
- total: number
46
- }
47
- /** The time the hype train started. */
48
- started_at: Date
49
- /** The time the hype train expires. The expiration is extended when the hype train reaches a new level. */
50
- expires_at: Date
51
- }
52
-
53
- /** The event notification received when A Hype Train makes progress. */
54
- export type HypeTrainProgressSubscription = BaseSubscription<
55
- HypeTrainProgressType,
56
- HypeTrainProgressVersion,
57
- HypeTrainProgressCondition
58
- >
59
-
60
- export function makeHypeTrainProgressSubscription(
61
- userId: string,
62
- ): HypeTrainProgressSubscription {
63
- return {
64
- type: "channel.hype_train.progress",
65
- version: "1",
66
- condition: {
67
- broadcaster_user_id: userId,
68
- },
69
- }
70
- }
@@ -1,45 +0,0 @@
1
- import { type BaseSubscription } from "../events-helpers.js"
2
-
3
- type ChannelModeratorAddType = "channel.moderator.add"
4
- type ChannelModeratorAddVersion = "1"
5
-
6
- /** The parameters under which an event fires when The broadcaster gives moderator privileges to a user. */
7
- export interface ChannelModeratorAddCondition {
8
- /** The user ID of the broadcaster. */
9
- broadcaster_user_id: string
10
- }
11
-
12
- /** The event information when The broadcaster gives moderator privileges to a user. */
13
- export interface ChannelModeratorAddEvent {
14
- /** The user ID of the broadcaster. */
15
- broadcaster_user_id: string
16
- /** The user login of the broadcaster. */
17
- broadcaster_user_login: string
18
- /** The user name of the broadcaster. */
19
- broadcaster_user_name: string
20
- /** The user ID of the new moderator. */
21
- user_id: string
22
- /** The user login of the new moderator. */
23
- user_login: string
24
- /** The user name of the new moderator. */
25
- user_name: string
26
- }
27
-
28
- /** The event notification received when The broadcaster gives moderator privileges to a user. */
29
- export type ChannelModeratorAddSubscription = BaseSubscription<
30
- ChannelModeratorAddType,
31
- ChannelModeratorAddVersion,
32
- ChannelModeratorAddCondition
33
- >
34
-
35
- export function makeChannelModeratorAddSubscription(
36
- userId: string,
37
- ): ChannelModeratorAddSubscription {
38
- return {
39
- type: "channel.moderator.add",
40
- version: "1",
41
- condition: {
42
- broadcaster_user_id: userId,
43
- },
44
- }
45
- }
@@ -1,45 +0,0 @@
1
- import { type BaseSubscription } from "../events-helpers.js"
2
-
3
- type ChannelModeratorRemoveType = "channel.moderator.remove"
4
- type ChannelModeratorRemoveVersion = "1"
5
-
6
- /** The parameters under which an event fires when The broadcaster removes moderator privileges from a user. */
7
- export interface ChannelModeratorRemoveCondition {
8
- /** The user ID of the broadcaster. */
9
- broadcaster_user_id: string
10
- }
11
-
12
- /** The event information when The broadcaster removes moderator privileges from a user. */
13
- export interface ChannelModeratorRemoveEvent {
14
- /** The user ID of the broadcaster. */
15
- broadcaster_user_id: string
16
- /** The user login of the broadcaster. */
17
- broadcaster_user_login: string
18
- /** The user name of the broadcaster. */
19
- broadcaster_user_name: string
20
- /** The user ID of the removed moderator. */
21
- user_id: string
22
- /** The user login of the removed moderator. */
23
- user_login: string
24
- /** The user name of the removed moderator. */
25
- user_name: string
26
- }
27
-
28
- /** The event notification received when The broadcaster removes moderator privileges from a user. */
29
- export type ChannelModeratorRemoveSubscription = BaseSubscription<
30
- ChannelModeratorRemoveType,
31
- ChannelModeratorRemoveVersion,
32
- ChannelModeratorRemoveCondition
33
- >
34
-
35
- export function makeChannelModeratorRemoveSubscription(
36
- userId: string,
37
- ): ChannelModeratorRemoveSubscription {
38
- return {
39
- type: "channel.moderator.remove",
40
- version: "1",
41
- condition: {
42
- broadcaster_user_id: userId,
43
- },
44
- }
45
- }
@@ -1,26 +0,0 @@
1
- export interface ChannelPollPointsVoting {
2
- /** Indicates if channel points can be used for voting. */
3
- is_enabled: boolean
4
- /** Integer. Number of channel points required to vote once with channel points. */
5
- amount_per_vote: number
6
- }
7
-
8
- export interface ChannelPollBitsVoting {
9
- /** Indicates if bits can be used for voting. */
10
- is_enabled: boolean
11
- /** Integer. Number of bits required to vote once with bits. */
12
- amount_per_vote: number
13
- }
14
-
15
- export interface ChannelPollChoice {
16
- /** ID for the choice. */
17
- id: string
18
- /** Text displayed for the choice. */
19
- title: string
20
- /** Integer. Not used; will be set to 0. */
21
- bits_votes: number
22
- /** Integer. Number of votes received via Channel Points. */
23
- channel_points_votes: number
24
- /** Integer. Total number of votes received for the choice across all methods of voting. */
25
- votes: number
26
- }
@@ -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
- }