@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,75 +0,0 @@
1
- import { type BaseSubscription } from "../events-helpers.js"
2
-
3
- import { type ChannelPointsCustomRewardGlobalCooldown, type ChannelPointsCustomRewardImage, type ChannelPointsCustomRewardMaxPerStream, type ChannelPointsCustomRewardMaxPerUserPerStream } from "./channel.channel_points_custom_reward._.js"
4
-
5
- type ChannelPointsCustomRewardAddType = "channel.channel_points_custom_reward.add"
6
- type ChannelPointsCustomRewardAddVersion = "1"
7
-
8
- /** The parameters under which an event fires when The broadcaster creates a custom channel points reward. */
9
- export interface ChannelPointsCustomRewardAddCondition {
10
- /** The user ID of the broadcaster. */
11
- broadcaster_user_id: string
12
- }
13
-
14
- /** The event information when The broadcaster creates a custom channel points reward. */
15
- export interface ChannelPointsCustomRewardAddEvent {
16
- /** The reward identifier. */
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
- /** Is the reward currently enabled. If false, the reward won't show up to viewers. */
25
- is_enabled: boolean
26
- /** Is the reward currently paused. If true, viewers can't redeem. */
27
- is_paused: boolean
28
- /** Is the reward currently in stock. If false, viewers can't redeem. */
29
- is_in_stock: boolean
30
- /** The reward title. */
31
- title: string
32
- /** Integer. The reward cost. */
33
- cost: number
34
- /** The reward description. */
35
- prompt: string
36
- /** Does the viewer need to enter information when redeeming the reward. */
37
- is_user_input_required: boolean
38
- /** Should redemptions be set to fulfilled status immediately when redeemed and skip the request queue instead of the normal unfulfilled status. */
39
- should_redemptions_skip_request_queue: boolean
40
- /** Whether a maximum per stream is enabled and what the maximum is. */
41
- max_per_stream: ChannelPointsCustomRewardMaxPerStream
42
- /** Whether a maximum per user per stream is enabled and what the maximum is. */
43
- max_per_user_per_stream: ChannelPointsCustomRewardMaxPerUserPerStream
44
- /** Custom background color for the reward. Format: Hex with # prefix. Example: #FA1ED2. */
45
- background_color: string
46
- /** Set of custom images of 1x, 2x and 4x sizes for the reward. Can be null if no images have been uploaded. */
47
- image: ChannelPointsCustomRewardImage
48
- /** Set of default images of 1x, 2x and 4x sizes for the reward. */
49
- default_image: ChannelPointsCustomRewardImage
50
- /** Whether a cooldown is enabled and what the cooldown is in seconds. */
51
- global_cooldown: ChannelPointsCustomRewardGlobalCooldown
52
- /** The time the cooldown expires. null if the reward isn't on cooldown. */
53
- cooldown_expires_at: Date
54
- /** Integer. The number of redemptions redeemed during the current live stream. Counts against the max_per_stream limit. null if the broadcasters stream isn't live or max_per_stream isn't enabled. */
55
- redemptions_redeemed_current_stream: number
56
- }
57
-
58
- /** The event notification received when The broadcaster creates a custom channel points reward. */
59
- export type ChannelPointsCustomRewardAddSubscription = BaseSubscription<
60
- ChannelPointsCustomRewardAddType,
61
- ChannelPointsCustomRewardAddVersion,
62
- ChannelPointsCustomRewardAddCondition
63
- >
64
-
65
- export function makeChannelPointsCustomRewardAddSubscription(
66
- userId: string,
67
- ): ChannelPointsCustomRewardAddSubscription {
68
- return {
69
- type: "channel.channel_points_custom_reward.add",
70
- version: "1",
71
- condition: {
72
- broadcaster_user_id: userId,
73
- },
74
- }
75
- }
@@ -1,77 +0,0 @@
1
- import { type BaseSubscription } from "../events-helpers.js"
2
-
3
- import { type ChannelPointsCustomRewardGlobalCooldown, type ChannelPointsCustomRewardImage, type ChannelPointsCustomRewardMaxPerStream, type ChannelPointsCustomRewardMaxPerUserPerStream } from "./channel.channel_points_custom_reward._.js"
4
-
5
- type ChannelPointsCustomRewardRemoveType = "channel.channel_points_custom_reward.remove"
6
- type ChannelPointsCustomRewardRemoveVersion = "1"
7
-
8
- /** The parameters under which an event fires when The broadcaster removes a custom channel points reward. */
9
- export interface ChannelPointsCustomRewardRemoveCondition {
10
- /** The user ID of the broadcaster. */
11
- broadcaster_user_id: string
12
- /** Optional. Specify a reward ID to only receive notifications for a specific reward. */
13
- reward_id?: string
14
- }
15
-
16
- /** The event information when The broadcaster removes a custom channel points reward. */
17
- export interface ChannelPointsCustomRewardRemoveEvent {
18
- /** The reward identifier. */
19
- id: string
20
- /** The user ID of the broadcaster. */
21
- broadcaster_user_id: string
22
- /** The user login of the broadcaster. */
23
- broadcaster_user_login: string
24
- /** The user name of the broadcaster. */
25
- broadcaster_user_name: string
26
- /** Is the reward currently enabled. If false, the reward won't show up to viewers. */
27
- is_enabled: boolean
28
- /** Is the reward currently paused. If true, viewers can't redeem. */
29
- is_paused: boolean
30
- /** Is the reward currently in stock. If false, viewers can't redeem. */
31
- is_in_stock: boolean
32
- /** The reward title. */
33
- title: string
34
- /** Integer. The reward cost. */
35
- cost: number
36
- /** The reward description. */
37
- prompt: string
38
- /** Does the viewer need to enter information when redeeming the reward. */
39
- is_user_input_required: boolean
40
- /** Should redemptions be set to fulfilled status immediately when redeemed and skip the request queue instead of the normal unfulfilled status. */
41
- should_redemptions_skip_request_queue: boolean
42
- /** Whether a maximum per stream is enabled and what the maximum is. */
43
- max_per_stream: ChannelPointsCustomRewardMaxPerStream
44
- /** Whether a maximum per user per stream is enabled and what the maximum is. */
45
- max_per_user_per_stream: ChannelPointsCustomRewardMaxPerUserPerStream
46
- /** Custom background color for the reward. Format: Hex with # prefix. Example: #FA1ED2. */
47
- background_color: string
48
- /** Set of custom images of 1x, 2x and 4x sizes for the reward. Can be null if no images have been uploaded. */
49
- image: ChannelPointsCustomRewardImage
50
- /** Set of default images of 1x, 2x and 4x sizes for the reward. */
51
- default_image: ChannelPointsCustomRewardImage
52
- /** Whether a cooldown is enabled and what the cooldown is in seconds. */
53
- global_cooldown: ChannelPointsCustomRewardGlobalCooldown
54
- /** The time the cooldown expires. null if the reward isn't on cooldown. */
55
- cooldown_expires_at: Date
56
- /** Integer. The number of redemptions redeemed during the current live stream. Counts against the max_per_stream limit. null if the broadcasters stream isn't live or max_per_stream isn't enabled. */
57
- redemptions_redeemed_current_stream: number
58
- }
59
-
60
- /** The event notification received when The broadcaster removes a custom channel points reward. */
61
- export type ChannelPointsCustomRewardRemoveSubscription = BaseSubscription<
62
- ChannelPointsCustomRewardRemoveType,
63
- ChannelPointsCustomRewardRemoveVersion,
64
- ChannelPointsCustomRewardRemoveCondition
65
- >
66
-
67
- export function makeChannelPointsCustomRewardRemoveSubscription(
68
- userId: string,
69
- ): ChannelPointsCustomRewardRemoveSubscription {
70
- return {
71
- type: "channel.channel_points_custom_reward.remove",
72
- version: "1",
73
- condition: {
74
- broadcaster_user_id: userId,
75
- },
76
- }
77
- }
@@ -1,77 +0,0 @@
1
- import { type BaseSubscription } from "../events-helpers.js"
2
-
3
- import { type ChannelPointsCustomRewardGlobalCooldown, type ChannelPointsCustomRewardImage, type ChannelPointsCustomRewardMaxPerStream, type ChannelPointsCustomRewardMaxPerUserPerStream } from "./channel.channel_points_custom_reward._.js"
4
-
5
- type ChannelPointsCustomRewardUpdateType = "channel.channel_points_custom_reward.update"
6
- type ChannelPointsCustomRewardUpdateVersion = "1"
7
-
8
- /** The parameters under which an event fires when The broadcaster updates a custom channel points reward. */
9
- export interface ChannelPointsCustomRewardUpdateCondition {
10
- /** The user ID of the broadcaster. */
11
- broadcaster_user_id: string
12
- /** Optional. Specify a reward ID to only receive notifications for a specific reward. */
13
- reward_id?: string
14
- }
15
-
16
- /** The event information when The broadcaster updates a custom channel points reward. */
17
- export interface ChannelPointsCustomRewardUpdateEvent {
18
- /** The reward identifier. */
19
- id: string
20
- /** The user ID of the broadcaster. */
21
- broadcaster_user_id: string
22
- /** The user login of the broadcaster. */
23
- broadcaster_user_login: string
24
- /** The user name of the broadcaster. */
25
- broadcaster_user_name: string
26
- /** Is the reward currently enabled. If false, the reward won't show up to viewers. */
27
- is_enabled: boolean
28
- /** Is the reward currently paused. If true, viewers can't redeem. */
29
- is_paused: boolean
30
- /** Is the reward currently in stock. If false, viewers can't redeem. */
31
- is_in_stock: boolean
32
- /** The reward title. */
33
- title: string
34
- /** Integer. The reward cost. */
35
- cost: number
36
- /** The reward description. */
37
- prompt: string
38
- /** Does the viewer need to enter information when redeeming the reward. */
39
- is_user_input_required: boolean
40
- /** Should redemptions be set to fulfilled status immediately when redeemed and skip the request queue instead of the normal unfulfilled status. */
41
- should_redemptions_skip_request_queue: boolean
42
- /** Whether a maximum per stream is enabled and what the maximum is. */
43
- max_per_stream: ChannelPointsCustomRewardMaxPerStream
44
- /** Whether a maximum per user per stream is enabled and what the maximum is. */
45
- max_per_user_per_stream: ChannelPointsCustomRewardMaxPerUserPerStream
46
- /** Custom background color for the reward. Format: Hex with # prefix. Example: #FA1ED2. */
47
- background_color: string
48
- /** Set of custom images of 1x, 2x and 4x sizes for the reward. Can be null if no images have been uploaded. */
49
- image: ChannelPointsCustomRewardImage
50
- /** Set of default images of 1x, 2x and 4x sizes for the reward. */
51
- default_image: ChannelPointsCustomRewardImage
52
- /** Whether a cooldown is enabled and what the cooldown is in seconds. */
53
- global_cooldown: ChannelPointsCustomRewardGlobalCooldown
54
- /** The time the cooldown expires. null if the reward isn't on cooldown. */
55
- cooldown_expires_at: Date
56
- /** Integer. The number of redemptions redeemed during the current live stream. Counts against the max_per_stream limit. null if the broadcasters stream isn't live or max_per_stream isn't enabled. */
57
- redemptions_redeemed_current_stream: number
58
- }
59
-
60
- /** The event notification received when The broadcaster updates a custom channel points reward. */
61
- export type ChannelPointsCustomRewardUpdateSubscription = BaseSubscription<
62
- ChannelPointsCustomRewardUpdateType,
63
- ChannelPointsCustomRewardUpdateVersion,
64
- ChannelPointsCustomRewardUpdateCondition
65
- >
66
-
67
- export function makeChannelPointsCustomRewardUpdateSubscription(
68
- userId: string,
69
- ): ChannelPointsCustomRewardUpdateSubscription {
70
- return {
71
- type: "channel.channel_points_custom_reward.update",
72
- version: "1",
73
- condition: {
74
- broadcaster_user_id: userId,
75
- },
76
- }
77
- }
@@ -1,10 +0,0 @@
1
- export interface ChannelPointsCustomRewardRedemptionReward {
2
- /** The reward identifier. */
3
- id: string
4
- /** The reward name. */
5
- title: string
6
- /** Integer. The reward cost. */
7
- cost: number
8
- /** The reward description. */
9
- prompt: string
10
- }
@@ -1,59 +0,0 @@
1
- import { type BaseSubscription } from "../events-helpers.js"
2
-
3
- import { type ChannelPointsCustomRewardRedemptionReward } from "./channel.channel_points_custom_reward_redemption._.js"
4
-
5
- type ChannelPointsCustomRewardRedemptionAddType = "channel.channel_points_custom_reward_redemption.add"
6
- type ChannelPointsCustomRewardRedemptionAddVersion = "1"
7
-
8
- /** The parameters under which an event fires when A user redeems a custom channel points reward. */
9
- export interface ChannelPointsCustomRewardRedemptionAddCondition {
10
- /** The user ID of the broadcaster. */
11
- broadcaster_user_id: string
12
- /** Optional. Specify a reward ID to only receive notifications for a specific reward. */
13
- reward_id?: string
14
- }
15
-
16
- /** The event information when A user redeems a custom channel points reward. */
17
- export interface ChannelPointsCustomRewardRedemptionAddEvent {
18
- /** The redemption identifier. */
19
- id: string
20
- /** The user ID of the broadcaster. */
21
- broadcaster_user_id: string
22
- /** The user login of the broadcaster. */
23
- broadcaster_user_login: string
24
- /** The user name of the broadcaster. */
25
- broadcaster_user_name: string
26
- /** The user ID of the user who redeemed the reward. */
27
- user_id: string
28
- /** The user login of the user who redeemed the reward. */
29
- user_login: string
30
- /** The user name of the user who redeemed the reward. */
31
- user_name: string
32
- /** The user input provided. Empty string if not provided. */
33
- user_input: string
34
- /** Defaults to unfulfilled. Possible values are unknown, unfulfilled, fulfilled, and canceled. */
35
- status: string
36
- /** Basic information about the reward that was redeemed, at the time it was redeemed. */
37
- reward: ChannelPointsCustomRewardRedemptionReward
38
- /** The time the reward was redeemed. */
39
- redeemed_at: Date
40
- }
41
-
42
- /** The event notification received when A user redeems a custom channel points reward. */
43
- export type ChannelPointsCustomRewardRedemptionAddSubscription = BaseSubscription<
44
- ChannelPointsCustomRewardRedemptionAddType,
45
- ChannelPointsCustomRewardRedemptionAddVersion,
46
- ChannelPointsCustomRewardRedemptionAddCondition
47
- >
48
-
49
- export function makeChannelPointsCustomRewardRedemptionAddSubscription(
50
- userId: string,
51
- ): ChannelPointsCustomRewardRedemptionAddSubscription {
52
- return {
53
- type: "channel.channel_points_custom_reward_redemption.add",
54
- version: "1",
55
- condition: {
56
- broadcaster_user_id: userId,
57
- },
58
- }
59
- }
@@ -1,59 +0,0 @@
1
- import { type BaseSubscription } from "../events-helpers.js"
2
-
3
- import { type ChannelPointsCustomRewardRedemptionReward } from "./channel.channel_points_custom_reward_redemption._.js"
4
-
5
- type ChannelPointsCustomRewardRedemptionUpdateType = "channel.channel_points_custom_reward_redemption.update"
6
- type ChannelPointsCustomRewardRedemptionUpdateVersion = "1"
7
-
8
- /** The parameters under which an event fires when A moderator updates the redemption of a channel points custom reward. */
9
- export interface ChannelPointsCustomRewardRedemptionUpdateCondition {
10
- /** The user ID of the broadcaster. */
11
- broadcaster_user_id: string
12
- /** Optional. Specify a reward ID to only receive notifications for a specific reward. */
13
- reward_id?: string
14
- }
15
-
16
- /** The event information when A moderator updates the redemption of a channel points custom reward. */
17
- export interface ChannelPointsCustomRewardRedemptionUpdateEvent {
18
- /** The redemption identifier. */
19
- id: string
20
- /** The user ID of the broadcaster. */
21
- broadcaster_user_id: string
22
- /** The user login of the broadcaster. */
23
- broadcaster_user_login: string
24
- /** The user name of the broadcaster. */
25
- broadcaster_user_name: string
26
- /** The user ID of the user who redeemed the reward. */
27
- user_id: string
28
- /** The user login of the user who redeemed the reward. */
29
- user_login: string
30
- /** The user name of the user who redeemed the reward. */
31
- user_name: string
32
- /** The user input provided. Empty string if not provided. */
33
- user_input: string
34
- /** Will be fulfilled or canceled. Possible values are unknown, unfulfilled, fulfilled, and canceled. */
35
- status: string
36
- /** Basic information about the reward that was redeemed, at the time it was redeemed. */
37
- reward: ChannelPointsCustomRewardRedemptionReward
38
- /** The time the reward was redeemed. */
39
- redeemed_at: Date
40
- }
41
-
42
- /** The event notification received when A moderator updates the redemption of a channel points custom reward. */
43
- export type ChannelPointsCustomRewardRedemptionUpdateSubscription = BaseSubscription<
44
- ChannelPointsCustomRewardRedemptionUpdateType,
45
- ChannelPointsCustomRewardRedemptionUpdateVersion,
46
- ChannelPointsCustomRewardRedemptionUpdateCondition
47
- >
48
-
49
- export function makeChannelPointsCustomRewardRedemptionUpdateSubscription(
50
- userId: string,
51
- ): ChannelPointsCustomRewardRedemptionUpdateSubscription {
52
- return {
53
- type: "channel.channel_points_custom_reward_redemption.update",
54
- version: "1",
55
- condition: {
56
- broadcaster_user_id: userId,
57
- },
58
- }
59
- }
@@ -1,66 +0,0 @@
1
- import { type BaseSubscription } from "../events-helpers.js"
2
-
3
- type CharityDonationType = "channel.charity_campaign.donate"
4
- type CharityDonationVersion = "1"
5
-
6
- /** The parameters under which an event fires when A user donates to the broadcaster's charity campaign. */
7
- export interface CharityDonationCondition {
8
- /** The user ID of the broadcaster. */
9
- broadcaster_user_id: string
10
- }
11
-
12
- /** The event information when A user donates to the broadcaster's charity campaign. */
13
- export interface CharityDonationEvent {
14
- /** An ID of the donation. The ID is unique across campaigns. */
15
- id: string
16
- /** The ID of the charity campaign. */
17
- campaign_id: string
18
- /** The user ID of the broadcaster. */
19
- broadcaster_id: string
20
- /** The user login of the broadcaster. */
21
- broadcaster_login: string
22
- /** The user name of the broadcaster. */
23
- broadcaster_name: string
24
- /** The user ID of the user who donated to the campaign. */
25
- user_id: string
26
- /** The user login of the user who donated to the campaign. */
27
- user_login: string
28
- /** The user name of the user who donated to the campaign. */
29
- user_name: string
30
- /** The charity's name. */
31
- charity_name: string
32
- /** A description of the charity. */
33
- charity_description: string
34
- /** A URL to an image of the charity's logo. The image's type is PNG and its size is 100px X 100px. */
35
- charity_logo: string
36
- /** A URL to the charity's website. */
37
- charity_website: string
38
- /** An object that contains the current amount of donations that the campaign has received. */
39
- amount: {
40
- /** Integer. The monetary amount. The amount is specified in the currency's minor unit. For example, the minor units for USD is cents, so if the amount is $5.50 USD, value is set to 550. */
41
- value: number
42
- /** Integer. The number of decimal places used by the currency. For example, USD uses two decimal places. Use this number to translate value from minor units to major units by using the formula:\n\nvalue / 10^decimal_places */
43
- decimal_places: number
44
- /** The ISO-4217 three-letter currency code that identifies the type of currency in value. */
45
- currency: string
46
- }
47
- }
48
-
49
- /** The event notification received when A user donates to the broadcaster's charity campaign. */
50
- export type CharityDonationSubscription = BaseSubscription<
51
- CharityDonationType,
52
- CharityDonationVersion,
53
- CharityDonationCondition
54
- >
55
-
56
- export function makeCharityDonationSubscription(
57
- userId: string,
58
- ): CharityDonationSubscription {
59
- return {
60
- type: "channel.charity_campaign.donate",
61
- version: "1",
62
- condition: {
63
- broadcaster_user_id: userId,
64
- },
65
- }
66
- }
@@ -1,67 +0,0 @@
1
- import { type BaseSubscription } from "../events-helpers.js"
2
-
3
- type CharityCampaignProgressType = "channel.charity_campaign.progress"
4
- type CharityCampaignProgressVersion = "1"
5
-
6
- /** The parameters under which an event fires when Progress is made towards the campaign's goal or when the broadcaster changes the fundraising goal. */
7
- export interface CharityCampaignProgressCondition {
8
- /** The user ID of the broadcaster. */
9
- broadcaster_user_id: string
10
- }
11
-
12
- /** The event information when Progress is made towards the campaign's goal or when the broadcaster changes the fundraising goal. */
13
- export interface CharityCampaignProgressEvent {
14
- /** The ID of the charity campaign. */
15
- id: string
16
- /** The user ID of the broadcaster. */
17
- broadcaster_id: string
18
- /** The user login of the broadcaster. */
19
- broadcaster_login: string
20
- /** The user name of the broadcaster. */
21
- broadcaster_name: string
22
- /** The charity's name. */
23
- charity_name: string
24
- /** A description of the charity. */
25
- charity_description: string
26
- /** A URL to an image of the charity's logo. The image's type is PNG and its size is 100px X 100px. */
27
- charity_logo: string
28
- /** A URL to the charity's website. */
29
- charity_website: string
30
- /** An object that contains the current amount of donations that the campaign has received. */
31
- current_amount: {
32
- /** Integer. The monetary amount. The amount is specified in the currency's minor unit. For example, the minor units for USD is cents, so if the amount is $5.50 USD, value is set to 550. */
33
- value: number
34
- /** Integer. The number of decimal places used by the currency. For example, USD uses two decimal places. Use this number to translate value from minor units to major units by using the formula:\n\nvalue / 10^decimal_places */
35
- decimal_places: number
36
- /** The ISO-4217 three-letter currency code that identifies the type of currency in value. */
37
- currency: string
38
- }
39
- /** An object that contains the campaign's target fundraising goal. */
40
- target_amount: {
41
- /** Integer. The monetary amount. The amount is specified in the currency's minor unit. For example, the minor units for USD is cents, so if the amount is $5.50 USD, value is set to 550. */
42
- value: number
43
- /** Integer. The number of decimal places used by the currency. For example, USD uses two decimal places. Use this number to translate value from minor units to major units by using the formula:\n\nvalue / 10^decimal_places */
44
- decimal_places: number
45
- /** The ISO-4217 three-letter currency code that identifies the type of currency in value. */
46
- currency: string
47
- }
48
- }
49
-
50
- /** The event notification received when Progress is made towards the campaign's goal or when the broadcaster changes the fundraising goal. */
51
- export type CharityCampaignProgressSubscription = BaseSubscription<
52
- CharityCampaignProgressType,
53
- CharityCampaignProgressVersion,
54
- CharityCampaignProgressCondition
55
- >
56
-
57
- export function makeCharityCampaignProgressSubscription(
58
- userId: string,
59
- ): CharityCampaignProgressSubscription {
60
- return {
61
- type: "channel.charity_campaign.progress",
62
- version: "1",
63
- condition: {
64
- broadcaster_user_id: userId,
65
- },
66
- }
67
- }
@@ -1,69 +0,0 @@
1
- import { type BaseSubscription } from "../events-helpers.js"
2
-
3
- type CharityCampaignStartType = "channel.charity_campaign.start"
4
- type CharityCampaignStartVersion = "1"
5
-
6
- /** The parameters under which an event fires when The broadcaster starts a charity campaign. */
7
- export interface CharityCampaignStartCondition {
8
- /** The user ID of the broadcaster. */
9
- broadcaster_user_id: string
10
- }
11
-
12
- /** The event information when The broadcaster starts a charity campaign. */
13
- export interface CharityCampaignStartEvent {
14
- /** The ID of the charity campaign. */
15
- id: string
16
- /** The user ID of the broadcaster. */
17
- broadcaster_id: string
18
- /** The user login of the broadcaster. */
19
- broadcaster_login: string
20
- /** The user name of the broadcaster. */
21
- broadcaster_name: string
22
- /** The charity's name. */
23
- charity_name: string
24
- /** A description of the charity. */
25
- charity_description: string
26
- /** A URL to an image of the charity's logo. The image's type is PNG and its size is 100px X 100px. */
27
- charity_logo: string
28
- /** A URL to the charity's website. */
29
- charity_website: string
30
- /** An object that contains the current amount of donations that the campaign has received. */
31
- current_amount: {
32
- /** Integer. The monetary amount. The amount is specified in the currency's minor unit. For example, the minor units for USD is cents, so if the amount is $5.50 USD, value is set to 550. */
33
- value: number
34
- /** Integer. The number of decimal places used by the currency. For example, USD uses two decimal places. Use this number to translate value from minor units to major units by using the formula:\n\nvalue / 10^decimal_places */
35
- decimal_places: number
36
- /** The ISO-4217 three-letter currency code that identifies the type of currency in value. */
37
- currency: string
38
- }
39
- /** An object that contains the campaign's target fundraising goal. */
40
- target_amount: {
41
- /** Integer. The monetary amount. The amount is specified in the currency's minor unit. For example, the minor units for USD is cents, so if the amount is $5.50 USD, value is set to 550. */
42
- value: number
43
- /** Integer. The number of decimal places used by the currency. For example, USD uses two decimal places. Use this number to translate value from minor units to major units by using the formula:\n\nvalue / 10^decimal_places */
44
- decimal_places: number
45
- /** The ISO-4217 three-letter currency code that identifies the type of currency in value. */
46
- currency: string
47
- }
48
- /** The time the broadcaster started the campaign. */
49
- started_at: Date
50
- }
51
-
52
- /** The event notification received when The broadcaster starts a charity campaign. */
53
- export type CharityCampaignStartSubscription = BaseSubscription<
54
- CharityCampaignStartType,
55
- CharityCampaignStartVersion,
56
- CharityCampaignStartCondition
57
- >
58
-
59
- export function makeCharityCampaignStartSubscription(
60
- userId: string,
61
- ): CharityCampaignStartSubscription {
62
- return {
63
- type: "channel.charity_campaign.start",
64
- version: "1",
65
- condition: {
66
- broadcaster_user_id: userId,
67
- },
68
- }
69
- }
@@ -1,69 +0,0 @@
1
- import { type BaseSubscription } from "../events-helpers.js"
2
-
3
- type CharityCampaignStopType = "channel.charity_campaign.stop"
4
- type CharityCampaignStopVersion = "1"
5
-
6
- /** The parameters under which an event fires when The broadcaster stops a charity campaign. */
7
- export interface CharityCampaignStopCondition {
8
- /** The user ID of the broadcaster. */
9
- broadcaster_user_id: string
10
- }
11
-
12
- /** The event information when The broadcaster stops a charity campaign. */
13
- export interface CharityCampaignStopEvent {
14
- /** The ID of the charity campaign. */
15
- id: string
16
- /** The user ID of the broadcaster. */
17
- broadcaster_id: string
18
- /** The user login of the broadcaster. */
19
- broadcaster_login: string
20
- /** The user name of the broadcaster. */
21
- broadcaster_name: string
22
- /** The charity's name. */
23
- charity_name: string
24
- /** A description of the charity. */
25
- charity_description: string
26
- /** A URL to an image of the charity's logo. The image's type is PNG and its size is 100px X 100px. */
27
- charity_logo: string
28
- /** A URL to the charity's website. */
29
- charity_website: string
30
- /** An object that contains the current amount of donations that the campaign has received. */
31
- current_amount: {
32
- /** Integer. The monetary amount. The amount is specified in the currency's minor unit. For example, the minor units for USD is cents, so if the amount is $5.50 USD, value is set to 550. */
33
- value: number
34
- /** Integer. The number of decimal places used by the currency. For example, USD uses two decimal places. Use this number to translate value from minor units to major units by using the formula:\n\nvalue / 10^decimal_places */
35
- decimal_places: number
36
- /** The ISO-4217 three-letter currency code that identifies the type of currency in value. */
37
- currency: string
38
- }
39
- /** An object that contains the campaign's target fundraising goal. */
40
- target_amount: {
41
- /** Integer. The monetary amount. The amount is specified in the currency's minor unit. For example, the minor units for USD is cents, so if the amount is $5.50 USD, value is set to 550. */
42
- value: number
43
- /** Integer. The number of decimal places used by the currency. For example, USD uses two decimal places. Use this number to translate value from minor units to major units by using the formula:\n\nvalue / 10^decimal_places */
44
- decimal_places: number
45
- /** The ISO-4217 three-letter currency code that identifies the type of currency in value. */
46
- currency: string
47
- }
48
- /** The time the broadcaster stopped the campaign. */
49
- stopped_at: Date
50
- }
51
-
52
- /** The event notification received when The broadcaster stops a charity campaign. */
53
- export type CharityCampaignStopSubscription = BaseSubscription<
54
- CharityCampaignStopType,
55
- CharityCampaignStopVersion,
56
- CharityCampaignStopCondition
57
- >
58
-
59
- export function makeCharityCampaignStopSubscription(
60
- userId: string,
61
- ): CharityCampaignStopSubscription {
62
- return {
63
- type: "channel.charity_campaign.stop",
64
- version: "1",
65
- condition: {
66
- broadcaster_user_id: userId,
67
- },
68
- }
69
- }