@overlaysymphony/twitch 0.2.1 → 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 +3 -3
  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
@@ -0,0 +1,80 @@
1
+ import { type EventConfig, registerEvent } from "../events-helpers.ts"
2
+
3
+ declare module "../events-helpers.ts" {
4
+ interface EventConfigs {
5
+ "channel.goal.begin": ChannelGoalBegin
6
+ }
7
+ }
8
+
9
+ /** Channel Goal Begin v1: When the broadcaster begins a goal. */
10
+ type ChannelGoalBegin = EventConfig<{
11
+ Type: "channel.goal.begin"
12
+ Version: "1"
13
+ /** The conditions to listen for when the broadcaster begins a goal. */
14
+ Condition: {
15
+ /** The ID of the broadcaster to get notified about. The ID must match the user_id in the OAuth access token. */
16
+ broadcaster_user_id: string
17
+ }
18
+ /** The event fired when the broadcaster begins a goal. */
19
+ Event: {
20
+ /** An ID that identifies this event. */
21
+ id: string
22
+ /** An ID that uniquely identifies the broadcaster. */
23
+ broadcaster_user_id: string
24
+ /** The broadcaster's display name. */
25
+ broadcaster_user_name: string
26
+ /** The broadcaster's user handle. */
27
+ broadcaster_user_login: string
28
+ /**
29
+ * The type of goal. Possible values are:
30
+ * - follow — The goal is to increase followers.
31
+ * - subscription — The goal is to increase subscriptions. This type shows the net increase or decrease in tier points associated with the subscriptions.
32
+ * - subscription_count — The goal is to increase subscriptions. This type shows the net increase or decrease in the number of subscriptions.
33
+ * - new_subscription — The goal is to increase subscriptions. This type shows only the net increase in tier points associated with the subscriptions (it does not account for users that unsubscribed since the goal started).
34
+ * - new_subscription_count — The goal is to increase subscriptions. This type shows only the net increase in the number of subscriptions (it does not account for users that unsubscribed since the goal started).
35
+ * - new_bit — The goal is to increase the amount of Bits used on the channel.
36
+ * - new_cheerer — The goal is to increase the number of unique Cheerers to Cheer on the channel.
37
+ */
38
+ type: string
39
+ /** A description of the goal, if specified. The description may contain a maximum of 40 characters. */
40
+ description: string
41
+ /**
42
+ * A Boolean value that indicates whether the broadcaster achieved their goal. Is true if the goal was achieved; otherwise, false.
43
+ *
44
+ * Only the channel.goal.end event includes this field.
45
+ */
46
+ is_achieved: boolean
47
+ /**
48
+ * The goal's current value.
49
+ *
50
+ * The goal's type determines how this value is increased or decreased.
51
+ * - If type is follow, this field is set to the broadcaster's current number of followers. This number increases with new followers and decreases when users unfollow the broadcaster.
52
+ * - If type is subscription, this field is increased and decreased by the points value associated with the subscription tier.
53
+ * - If type is subscription_count, this field is increased by 1 for each new subscription and decreased by 1 for each user that unsubscribes.
54
+ * - If type is new_subscription, this field is increased by the points value associated with the subscription tier.
55
+ * - If type is new_subscription_count, this field is increased by 1 for each new subscription.
56
+ */
57
+ current_amount: number
58
+ /** The goal's target value. */
59
+ target_amount: number
60
+ /** The UTC timestamp in RFC 3339 format, which indicates when the broadcaster created the goal. */
61
+ started_at: string
62
+ /**
63
+ * The UTC timestamp in RFC 3339 format, which indicates when the broadcaster ended the goal.
64
+ *
65
+ * Only the channel.goal.end event includes this field.
66
+ */
67
+ ended_at: string
68
+ }
69
+ }>
70
+
71
+ registerEvent("channel.goal.begin", {
72
+ scopes: ["channel:read:goals"],
73
+ subscriber: (userId) => ({
74
+ type: "channel.goal.begin",
75
+ version: "1",
76
+ condition: {
77
+ broadcaster_user_id: userId,
78
+ },
79
+ }),
80
+ })
@@ -0,0 +1,80 @@
1
+ import { type EventConfig, registerEvent } from "../events-helpers.ts"
2
+
3
+ declare module "../events-helpers.ts" {
4
+ interface EventConfigs {
5
+ "channel.goal.end": ChannelGoalEnd
6
+ }
7
+ }
8
+
9
+ /** Channel Goal End v1: When the broadcaster ends a goal. */
10
+ type ChannelGoalEnd = EventConfig<{
11
+ Type: "channel.goal.end"
12
+ Version: "1"
13
+ /** The conditions to listen for when the broadcaster ends a goal. */
14
+ Condition: {
15
+ /** The ID of the broadcaster to get notified about. The ID must match the user_id in the OAuth access token. */
16
+ broadcaster_user_id: string
17
+ }
18
+ /** The event fired when the broadcaster ends a goal. */
19
+ Event: {
20
+ /** An ID that identifies this event. */
21
+ id: string
22
+ /** An ID that uniquely identifies the broadcaster. */
23
+ broadcaster_user_id: string
24
+ /** The broadcaster's display name. */
25
+ broadcaster_user_name: string
26
+ /** The broadcaster's user handle. */
27
+ broadcaster_user_login: string
28
+ /**
29
+ * The type of goal. Possible values are:
30
+ * - follow — The goal is to increase followers.
31
+ * - subscription — The goal is to increase subscriptions. This type shows the net increase or decrease in tier points associated with the subscriptions.
32
+ * - subscription_count — The goal is to increase subscriptions. This type shows the net increase or decrease in the number of subscriptions.
33
+ * - new_subscription — The goal is to increase subscriptions. This type shows only the net increase in tier points associated with the subscriptions (it does not account for users that unsubscribed since the goal started).
34
+ * - new_subscription_count — The goal is to increase subscriptions. This type shows only the net increase in the number of subscriptions (it does not account for users that unsubscribed since the goal started).
35
+ * - new_bit — The goal is to increase the amount of Bits used on the channel.
36
+ * - new_cheerer — The goal is to increase the number of unique Cheerers to Cheer on the channel.
37
+ */
38
+ type: string
39
+ /** A description of the goal, if specified. The description may contain a maximum of 40 characters. */
40
+ description: string
41
+ /**
42
+ * A Boolean value that indicates whether the broadcaster achieved their goal. Is true if the goal was achieved; otherwise, false.
43
+ *
44
+ * Only the channel.goal.end event includes this field.
45
+ */
46
+ is_achieved: boolean
47
+ /**
48
+ * The goal's current value.
49
+ *
50
+ * The goal's type determines how this value is increased or decreased.
51
+ * - If type is follow, this field is set to the broadcaster's current number of followers. This number increases with new followers and decreases when users unfollow the broadcaster.
52
+ * - If type is subscription, this field is increased and decreased by the points value associated with the subscription tier.
53
+ * - If type is subscription_count, this field is increased by 1 for each new subscription and decreased by 1 for each user that unsubscribes.
54
+ * - If type is new_subscription, this field is increased by the points value associated with the subscription tier.
55
+ * - If type is new_subscription_count, this field is increased by 1 for each new subscription.
56
+ */
57
+ current_amount: number
58
+ /** The goal's target value. */
59
+ target_amount: number
60
+ /** The UTC timestamp in RFC 3339 format, which indicates when the broadcaster created the goal. */
61
+ started_at: string
62
+ /**
63
+ * The UTC timestamp in RFC 3339 format, which indicates when the broadcaster ended the goal.
64
+ *
65
+ * Only the channel.goal.end event includes this field.
66
+ */
67
+ ended_at: string
68
+ }
69
+ }>
70
+
71
+ registerEvent("channel.goal.end", {
72
+ scopes: ["channel:read:goals"],
73
+ subscriber: (userId) => ({
74
+ type: "channel.goal.end",
75
+ version: "1",
76
+ condition: {
77
+ broadcaster_user_id: userId,
78
+ },
79
+ }),
80
+ })
@@ -0,0 +1,80 @@
1
+ import { type EventConfig, registerEvent } from "../events-helpers.ts"
2
+
3
+ declare module "../events-helpers.ts" {
4
+ interface EventConfigs {
5
+ "channel.goal.progress": ChannelGoalProgress
6
+ }
7
+ }
8
+
9
+ /** Channel Goal Progress v1: When progress (either positive or negative) is made towards the broadcaster's goal. */
10
+ type ChannelGoalProgress = EventConfig<{
11
+ Type: "channel.goal.progress"
12
+ Version: "1"
13
+ /** The conditions to listen for when progress (either positive or negative) is made towards the broadcaster's goal. */
14
+ Condition: {
15
+ /** The ID of the broadcaster to get notified about. The ID must match the user_id in the OAuth access token. */
16
+ broadcaster_user_id: string
17
+ }
18
+ /** The event fired when progress (either positive or negative) is made towards the broadcaster's goal. */
19
+ Event: {
20
+ /** An ID that identifies this event. */
21
+ id: string
22
+ /** An ID that uniquely identifies the broadcaster. */
23
+ broadcaster_user_id: string
24
+ /** The broadcaster's display name. */
25
+ broadcaster_user_name: string
26
+ /** The broadcaster's user handle. */
27
+ broadcaster_user_login: string
28
+ /**
29
+ * The type of goal. Possible values are:
30
+ * - follow — The goal is to increase followers.
31
+ * - subscription — The goal is to increase subscriptions. This type shows the net increase or decrease in tier points associated with the subscriptions.
32
+ * - subscription_count — The goal is to increase subscriptions. This type shows the net increase or decrease in the number of subscriptions.
33
+ * - new_subscription — The goal is to increase subscriptions. This type shows only the net increase in tier points associated with the subscriptions (it does not account for users that unsubscribed since the goal started).
34
+ * - new_subscription_count — The goal is to increase subscriptions. This type shows only the net increase in the number of subscriptions (it does not account for users that unsubscribed since the goal started).
35
+ * - new_bit — The goal is to increase the amount of Bits used on the channel.
36
+ * - new_cheerer — The goal is to increase the number of unique Cheerers to Cheer on the channel.
37
+ */
38
+ type: string
39
+ /** A description of the goal, if specified. The description may contain a maximum of 40 characters. */
40
+ description: string
41
+ /**
42
+ * A Boolean value that indicates whether the broadcaster achieved their goal. Is true if the goal was achieved; otherwise, false.
43
+ *
44
+ * Only the channel.goal.end event includes this field.
45
+ */
46
+ is_achieved: boolean
47
+ /**
48
+ * The goal's current value.
49
+ *
50
+ * The goal's type determines how this value is increased or decreased.
51
+ * - If type is follow, this field is set to the broadcaster's current number of followers. This number increases with new followers and decreases when users unfollow the broadcaster.
52
+ * - If type is subscription, this field is increased and decreased by the points value associated with the subscription tier.
53
+ * - If type is subscription_count, this field is increased by 1 for each new subscription and decreased by 1 for each user that unsubscribes.
54
+ * - If type is new_subscription, this field is increased by the points value associated with the subscription tier.
55
+ * - If type is new_subscription_count, this field is increased by 1 for each new subscription.
56
+ */
57
+ current_amount: number
58
+ /** The goal's target value. */
59
+ target_amount: number
60
+ /** The UTC timestamp in RFC 3339 format, which indicates when the broadcaster created the goal. */
61
+ started_at: string
62
+ /**
63
+ * The UTC timestamp in RFC 3339 format, which indicates when the broadcaster ended the goal.
64
+ *
65
+ * Only the channel.goal.end event includes this field.
66
+ */
67
+ ended_at: string
68
+ }
69
+ }>
70
+
71
+ registerEvent("channel.goal.progress", {
72
+ scopes: ["channel:read:goals"],
73
+ subscriber: (userId) => ({
74
+ type: "channel.goal.progress",
75
+ version: "1",
76
+ condition: {
77
+ broadcaster_user_id: userId,
78
+ },
79
+ }),
80
+ })
@@ -0,0 +1,85 @@
1
+ import { type EventConfig, registerEvent } from "../events-helpers.ts"
2
+
3
+ declare module "../events-helpers.ts" {
4
+ interface EventConfigs {
5
+ "channel.guest_star_guest.update@be": ChannelGuestStarGuestUpdateBe
6
+ }
7
+ }
8
+
9
+ /** Channel Guest Star Guest Update Be vbeta: When a guest or a slot is updated in an active Guest Star session. */
10
+ type ChannelGuestStarGuestUpdateBe = EventConfig<{
11
+ Type: "channel.guest_star_guest.update@be"
12
+ Version: "beta"
13
+ /** The conditions to listen for when a guest or a slot is updated in an active Guest Star session. */
14
+ Condition: {
15
+ /** The broadcaster user ID of the channel hosting the Guest Star Session */
16
+ broadcaster_user_id: string
17
+ /** The user ID of the moderator or broadcaster of the specified channel. */
18
+ moderator_user_id: string
19
+ }
20
+ /** The event fired when a guest or a slot is updated in an active Guest Star session. */
21
+ Event: {
22
+ /** The non-host broadcaster user ID. */
23
+ broadcaster_user_id: string
24
+ /** The non-host broadcaster display name. */
25
+ broadcaster_user_name: string
26
+ /** The non-host broadcaster login. */
27
+ broadcaster_user_login: string
28
+ /** ID representing the unique session that was started. */
29
+ session_id: string
30
+ /** The user ID of the moderator who updated the guest's state (could be the host). null if the update was performed by the guest. */
31
+ moderator_user_id: string
32
+ /** The moderator display name. null if the update was performed by the guest. */
33
+ moderator_user_name: string
34
+ /** The moderator login. null if the update was performed by the guest. */
35
+ moderator_user_login: string
36
+ /** The user ID of the guest who transitioned states in the session. null if the slot is now empty. */
37
+ guest_user_id: string
38
+ /** The guest display name. null if the slot is now empty. */
39
+ guest_user_name: string
40
+ /** The guest login. null if the slot is now empty. */
41
+ guest_user_login: string
42
+ /** The ID of the slot assignment the guest is assigned to. null if the guest is in the INVITED, REMOVED, READY, or ACCEPTED state. */
43
+ slot_id: string
44
+ /**
45
+ * The current state of the user after the update has taken place. null if the slot is now empty. Can otherwise be one of the following:
46
+ * - invited — The guest has transitioned to the invite queue. This can take place when the guest was previously assigned a slot, but have been removed from the call and are sent back to the invite queue.
47
+ * - accepted — The guest has accepted the invite and is currently in the process of setting up to join the session.
48
+ * - ready — The guest has signaled they are ready and can be assigned a slot.
49
+ * - backstage — The guest has been assigned a slot in the session, but is not currently seen live in the broadcasting software.
50
+ * - live — The guest is now live in the host's broadcasting software.
51
+ * - removed — The guest was removed from the call or queue.
52
+ * - accepted — The guest has accepted the invite to the call.
53
+ */
54
+ state: string
55
+ /** User ID of the host channel. */
56
+ host_user_id: string
57
+ /** The host display name. */
58
+ host_user_name: string
59
+ /** The host login. */
60
+ host_user_login: string
61
+ /** Flag that signals whether the host is allowing the slot's video to be seen by participants within the session. null if the guest is not slotted. */
62
+ host_video_enabled: boolean
63
+ /** Flag that signals whether the host is allowing the slot's audio to be heard by participants within the session. null if the guest is not slotted. */
64
+ host_audio_enabled: boolean
65
+ /** Value between 0-100 that represents the slot's audio level as heard by participants within the session. null if the guest is not slotted. */
66
+ host_volume: number
67
+ }
68
+ }>
69
+
70
+ registerEvent("channel.guest_star_guest.update@be", {
71
+ scopes: [
72
+ "channel:manage:guest",
73
+ "channel:read:guest",
74
+ "moderator:manage:guest",
75
+ "moderator:read:guest",
76
+ ],
77
+ subscriber: (userId) => ({
78
+ type: "channel.guest_star_guest.update@be",
79
+ version: "beta",
80
+ condition: {
81
+ broadcaster_user_id: userId,
82
+ moderator_user_id: userId,
83
+ },
84
+ }),
85
+ })
@@ -0,0 +1,50 @@
1
+ import { type EventConfig, registerEvent } from "../events-helpers.ts"
2
+
3
+ declare module "../events-helpers.ts" {
4
+ interface EventConfigs {
5
+ "channel.guest_star_session.begin@be": ChannelGuestStarSessionBeginBe
6
+ }
7
+ }
8
+
9
+ /** Channel Guest Star Session Begin Be vbeta: When the host began a new Guest Star session. */
10
+ type ChannelGuestStarSessionBeginBe = EventConfig<{
11
+ Type: "channel.guest_star_session.begin@be"
12
+ Version: "beta"
13
+ /** The conditions to listen for when the host began a new Guest Star session. */
14
+ Condition: {
15
+ /** The broadcaster user ID of the channel hosting the Guest Star Session */
16
+ broadcaster_user_id: string
17
+ /** The user ID of the moderator or broadcaster of the specified channel. */
18
+ moderator_user_id: string
19
+ }
20
+ /** The event fired when the host began a new Guest Star session. */
21
+ Event: {
22
+ /** The broadcaster user ID. */
23
+ broadcaster_user_id: string
24
+ /** The broadcaster display name. */
25
+ broadcaster_user_name: string
26
+ /** The broadcaster login. */
27
+ broadcaster_user_login: string
28
+ /** ID representing the unique session that was started. */
29
+ session_id: string
30
+ /** RFC3339 timestamp indicating the time the session began. */
31
+ started_at: string
32
+ }
33
+ }>
34
+
35
+ registerEvent("channel.guest_star_session.begin@be", {
36
+ scopes: [
37
+ "channel:manage:guest",
38
+ "channel:read:guest",
39
+ "moderator:manage:guest",
40
+ "moderator:read:guest",
41
+ ],
42
+ subscriber: (userId) => ({
43
+ type: "channel.guest_star_session.begin@be",
44
+ version: "beta",
45
+ condition: {
46
+ broadcaster_user_id: userId,
47
+ moderator_user_id: userId,
48
+ },
49
+ }),
50
+ })
@@ -0,0 +1,58 @@
1
+ import { type EventConfig, registerEvent } from "../events-helpers.ts"
2
+
3
+ declare module "../events-helpers.ts" {
4
+ interface EventConfigs {
5
+ "channel.guest_star_session.end@be": ChannelGuestStarSessionEndBe
6
+ }
7
+ }
8
+
9
+ /** Channel Guest Star Session End Be vbeta: When a running Guest Star session has ended. */
10
+ type ChannelGuestStarSessionEndBe = EventConfig<{
11
+ Type: "channel.guest_star_session.end@be"
12
+ Version: "beta"
13
+ /** The conditions to listen for when a running Guest Star session has ended. */
14
+ Condition: {
15
+ /** The broadcaster user ID of the channel hosting the Guest Star Session */
16
+ broadcaster_user_id: string
17
+ /** The user ID of the moderator or broadcaster of the specified channel. */
18
+ moderator_user_id: string
19
+ }
20
+ /** The event fired when a running Guest Star session has ended. */
21
+ Event: {
22
+ /** The non-host broadcaster user ID. */
23
+ broadcaster_user_id: string
24
+ /** The non-host broadcaster display name. */
25
+ broadcaster_user_name: string
26
+ /** The non-host broadcaster login. */
27
+ broadcaster_user_login: string
28
+ /** ID representing the unique session that was started. */
29
+ session_id: string
30
+ /** RFC3339 timestamp indicating the time the session began. */
31
+ started_at: string
32
+ /** RFC3339 timestamp indicating the time the session ended. */
33
+ ended_at: string
34
+ /** User ID of the host channel. */
35
+ host_user_id: string
36
+ /** The host display name. */
37
+ host_user_name: string
38
+ /** The host login. */
39
+ host_user_login: string
40
+ }
41
+ }>
42
+
43
+ registerEvent("channel.guest_star_session.end@be", {
44
+ scopes: [
45
+ "channel:manage:guest",
46
+ "channel:read:guest",
47
+ "moderator:manage:guest",
48
+ "moderator:read:guest",
49
+ ],
50
+ subscriber: (userId) => ({
51
+ type: "channel.guest_star_session.end@be",
52
+ version: "beta",
53
+ condition: {
54
+ broadcaster_user_id: userId,
55
+ moderator_user_id: userId,
56
+ },
57
+ }),
58
+ })
@@ -0,0 +1,62 @@
1
+ import { type EventConfig, registerEvent } from "../events-helpers.ts"
2
+
3
+ declare module "../events-helpers.ts" {
4
+ interface EventConfigs {
5
+ "channel.guest_star_settings.update@be": ChannelGuestStarSettingsUpdateBe
6
+ }
7
+ }
8
+
9
+ /** Channel Guest Star Settings Update Be vbeta: When the host preferences for Guest Star have been updated. */
10
+ type ChannelGuestStarSettingsUpdateBe = EventConfig<{
11
+ Type: "channel.guest_star_settings.update@be"
12
+ Version: "beta"
13
+ /** The conditions to listen for when the host preferences for Guest Star have been updated. */
14
+ Condition: {
15
+ /** The broadcaster user ID of the channel hosting the Guest Star Session */
16
+ broadcaster_user_id: string
17
+ /** The user ID of the moderator or broadcaster of the specified channel. */
18
+ moderator_user_id: string
19
+ }
20
+ /** The event fired when the host preferences for Guest Star have been updated. */
21
+ Event: {
22
+ /** User ID of the host channel. */
23
+ broadcaster_user_id: string
24
+ /** The broadcaster display name */
25
+ broadcaster_user_name: string
26
+ /** he broadcaster login. */
27
+ broadcaster_user_login: string
28
+ /** Flag determining if Guest Star moderators have access to control whether a guest is live once assigned to a slot. */
29
+ is_moderator_send_live_enabled: boolean
30
+ /** Number of slots the Guest Star call interface will allow the host to add to a call. */
31
+ slot_count: number
32
+ /** Flag determining if browser sources subscribed to sessions on this channel should output audio. */
33
+ is_browser_source_audio_enabled: boolean
34
+ /**
35
+ * This setting determines how the guests within a session should be laid out within a group browser source. Can be one of the following values:
36
+ * - tiled — All live guests are tiled within the browser source with the same size.
37
+ * - screenshare — All live guests are tiled within the browser source with the same size. If there is an active screen share, it is sized larger than the other guests.
38
+ * - horizontal_top — Indicates the group layout will contain all participants in a top-aligned horizontal stack.
39
+ * - horizontal_bottom — Indicates the group layout will contain all participants in a bottom-aligned horizontal stack.
40
+ * - vertical_left — Indicates the group layout will contain all participants in a left-aligned vertical stack.
41
+ * - vertical_right — Indicates the group layout will contain all participants in a right-aligned vertical stack.
42
+ */
43
+ group_layout: string
44
+ }
45
+ }>
46
+
47
+ registerEvent("channel.guest_star_settings.update@be", {
48
+ scopes: [
49
+ "channel:manage:guest",
50
+ "channel:read:guest",
51
+ "moderator:manage:guest",
52
+ "moderator:read:guest",
53
+ ],
54
+ subscriber: (userId) => ({
55
+ type: "channel.guest_star_settings.update@be",
56
+ version: "beta",
57
+ condition: {
58
+ broadcaster_user_id: userId,
59
+ moderator_user_id: userId,
60
+ },
61
+ }),
62
+ })
@@ -0,0 +1,90 @@
1
+ import { type EventConfig, registerEvent } from "../events-helpers.ts"
2
+
3
+ declare module "../events-helpers.ts" {
4
+ interface EventConfigs {
5
+ "channel.hype_train.begin": ChannelHypeTrainBegin
6
+ }
7
+ }
8
+
9
+ /** Channel Hype Train Begin v2: When a Hype Train begins on the specified channel. */
10
+ type ChannelHypeTrainBegin = EventConfig<{
11
+ Type: "channel.hype_train.begin"
12
+ Version: "2"
13
+ /** The conditions to listen for when a Hype Train begins on the specified channel. */
14
+ Condition: {
15
+ /** The ID of the broadcaster that you want to get Hype Train begin notifications for. */
16
+ broadcaster_user_id: string
17
+ }
18
+ /** The event fired when a Hype Train begins on the specified channel. */
19
+ Event: {
20
+ /** The Hype Train ID. */
21
+ id: string
22
+ /** The requested broadcaster ID. */
23
+ broadcaster_user_id: string
24
+ /** The requested broadcaster login. */
25
+ broadcaster_user_login: string
26
+ /** The requested broadcaster display name. */
27
+ broadcaster_user_name: string
28
+ /** Total points contributed to the Hype Train. */
29
+ total: number
30
+ /** The number of points contributed to the Hype Train at the current level. */
31
+ progress: number
32
+ /** The number of points required to reach the next level. */
33
+ goal: number
34
+ /** The contributors with the most points contributed. */
35
+ top_contributions: {
36
+ /** The ID of the user that made the contribution. */
37
+ user_id: string
38
+ /** The user's login name. */
39
+ user_login: string
40
+ /** The user's display name. */
41
+ user_name: string
42
+ /**
43
+ * The contribution method used. Possible values are:
44
+ * - bits - Bits contributions with Cheering, Power-ups, and Extensions.
45
+ * - subscription - Subscription activity like subscribing or gifting subscriptions.
46
+ * - other - Covers other contribution methods not listed.
47
+ */
48
+ type: string
49
+ /** 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. */
50
+ total: number
51
+ }
52
+ /** The most recent contribution. */
53
+ last_contribution: {
54
+ /** The ID of the user that made the contribution. */
55
+ user_id: string
56
+ /** The user's login name. */
57
+ user_login: string
58
+ /** The user's display name. */
59
+ user_name: string
60
+ /**
61
+ * The contribution method used. Possible values are:
62
+ * - bits — Cheering with Bits.
63
+ * - subscription — Subscription activity like subscribing or gifting subscriptions.
64
+ * - other — Covers other contribution methods not listed.
65
+ */
66
+ type: string
67
+ /** 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. */
68
+ total: number
69
+ }
70
+ /** The starting level of the Hype Train. */
71
+ level: number
72
+ /** The time when the Hype Train started. */
73
+ started_at: string
74
+ /** The time when the Hype Train expires. The expiration is extended when the Hype Train reaches a new level. */
75
+ expires_at: string
76
+ /** Indicates if the Hype Train is a Golden Kappa Train. */
77
+ is_golden_kappa_train: boolean
78
+ }
79
+ }>
80
+
81
+ registerEvent("channel.hype_train.begin", {
82
+ scopes: ["channel:read:hype"],
83
+ subscriber: (userId) => ({
84
+ type: "channel.hype_train.begin",
85
+ version: "2",
86
+ condition: {
87
+ broadcaster_user_id: userId,
88
+ },
89
+ }),
90
+ })
@@ -0,0 +1,70 @@
1
+ import { type EventConfig, registerEvent } from "../events-helpers.ts"
2
+
3
+ declare module "../events-helpers.ts" {
4
+ interface EventConfigs {
5
+ "channel.hype_train.end": ChannelHypeTrainEnd
6
+ }
7
+ }
8
+
9
+ /** Channel Hype Train End v2: When a Hype Train ends on the specified channel. */
10
+ type ChannelHypeTrainEnd = EventConfig<{
11
+ Type: "channel.hype_train.end"
12
+ Version: "2"
13
+ /** The conditions to listen for when a Hype Train ends on the specified channel. */
14
+ Condition: {
15
+ /** The ID of the broadcaster that you want to get Hype Train end notifications for. */
16
+ broadcaster_user_id: string
17
+ }
18
+ /** The event fired when a Hype Train ends on the specified channel. */
19
+ Event: {
20
+ /** The Hype Train ID. */
21
+ id: string
22
+ /** The requested broadcaster ID. */
23
+ broadcaster_user_id: string
24
+ /** The requested broadcaster login. */
25
+ broadcaster_user_login: string
26
+ /** The requested broadcaster display name. */
27
+ broadcaster_user_name: string
28
+ /** The final level of the Hype Train. */
29
+ level: number
30
+ /** Total points contributed to the Hype Train. */
31
+ total: number
32
+ /** The contributors with the most points contributed. */
33
+ top_contributions: {
34
+ /** The ID of the user that made the contribution. */
35
+ user_id: string
36
+ /** The user's login name. */
37
+ user_login: string
38
+ /** The user's display name. */
39
+ user_name: string
40
+ /**
41
+ * The contribution method used. Possible values are:
42
+ * - bits - Bits contributions with Cheering, Power-ups, and Extensions.
43
+ * - subscription - Subscription activity like subscribing or gifting subscriptions.
44
+ * - other - Covers other contribution methods not listed.
45
+ */
46
+ type: string
47
+ /** 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. */
48
+ total: number
49
+ }
50
+ /** The time when the Hype Train started. */
51
+ started_at: string
52
+ /** The time when the Hype Train ended. */
53
+ ended_at: string
54
+ /** The time when the Hype Train cooldown ends so that the next Hype Train can start. */
55
+ cooldown_ends_at: string
56
+ /** Indicates if the Hype Train is a Golden Kappa Train. */
57
+ is_golden_kappa_train: boolean
58
+ }
59
+ }>
60
+
61
+ registerEvent("channel.hype_train.end", {
62
+ scopes: ["channel:read:hype"],
63
+ subscriber: (userId) => ({
64
+ type: "channel.hype_train.end",
65
+ version: "2",
66
+ condition: {
67
+ broadcaster_user_id: userId,
68
+ },
69
+ }),
70
+ })