@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.
- package/package.json +2 -2
- package/src/authentication/authentication.ts +1 -1
- package/src/authentication/index.ts +1 -1
- package/src/chat/chat.ts +4 -4
- package/src/chat/helpers.ts +1 -1
- package/src/chat/index.ts +4 -3
- package/src/chat/interfaces/index.ts +2 -2
- package/src/chat/parser.ts +1 -1
- package/src/eventsub/events/automod.message.hold-2.ts +81 -0
- package/src/eventsub/events/automod.message.update-2.ts +94 -0
- package/src/eventsub/events/automod.settings.update-1.ts +65 -0
- package/src/eventsub/events/automod.terms.update-1.ts +59 -0
- package/src/eventsub/events/channel.ad_break.begin-1.ts +50 -0
- package/src/eventsub/events/channel.ban-1.ts +58 -0
- package/src/eventsub/events/channel.bits.use-1.ts +112 -0
- package/src/eventsub/events/channel.channel_points_automatic_reward_redemption.add-2.ts +88 -0
- package/src/eventsub/events/channel.channel_points_custom_reward.add-1.ts +101 -0
- package/src/eventsub/events/channel.channel_points_custom_reward.remove-1.ts +103 -0
- package/src/eventsub/events/channel.channel_points_custom_reward.update-1.ts +103 -0
- package/src/eventsub/events/channel.channel_points_custom_reward_redemption.add-1.ts +65 -0
- package/src/eventsub/events/channel.channel_points_custom_reward_redemption.update-1.ts +65 -0
- package/src/eventsub/events/channel.charity_campaign.donate-1.ts +69 -0
- package/src/eventsub/events/channel.charity_campaign.progress-1.ts +74 -0
- package/src/eventsub/events/channel.charity_campaign.start-1.ts +76 -0
- package/src/eventsub/events/channel.charity_campaign.stop-1.ts +76 -0
- package/src/eventsub/events/channel.chat.clear-1.ts +41 -0
- package/src/eventsub/events/channel.chat.clear_user_messages-1.ts +47 -0
- package/src/eventsub/events/channel.chat.message-1.ts +160 -0
- package/src/eventsub/events/channel.chat.message_delete-1.ts +49 -0
- package/src/eventsub/events/channel.chat.notification-1.ts +317 -0
- package/src/eventsub/events/channel.chat.user_message_hold-1.ts +75 -0
- package/src/eventsub/events/channel.chat.user_message_update-1.ts +82 -0
- package/src/eventsub/events/channel.chat_settings.update-1.ts +83 -0
- package/src/eventsub/events/channel.cheer-1.ts +50 -0
- package/src/eventsub/events/channel.follow-2.ts +49 -0
- package/src/eventsub/events/channel.goal.begin-1.ts +80 -0
- package/src/eventsub/events/channel.goal.end-1.ts +80 -0
- package/src/eventsub/events/channel.goal.progress-1.ts +80 -0
- package/src/eventsub/events/channel.guest_star_guest.update-beta.ts +85 -0
- package/src/eventsub/events/channel.guest_star_session.begin-beta.ts +50 -0
- package/src/eventsub/events/channel.guest_star_session.end-beta.ts +58 -0
- package/src/eventsub/events/channel.guest_star_settings.update-beta.ts +62 -0
- package/src/eventsub/events/channel.hype_train.begin-2.ts +90 -0
- package/src/eventsub/events/channel.hype_train.end-2.ts +70 -0
- package/src/eventsub/events/channel.hype_train.progress-2.ts +90 -0
- package/src/eventsub/events/channel.moderate-2.ts +258 -0
- package/src/eventsub/events/channel.moderator.add-1.ts +44 -0
- package/src/eventsub/events/channel.moderator.remove-1.ts +44 -0
- package/src/eventsub/events/channel.poll.begin-1.ts +73 -0
- package/src/eventsub/events/channel.poll.end-1.ts +75 -0
- package/src/eventsub/events/channel.poll.progress-1.ts +73 -0
- package/src/eventsub/events/channel.prediction.begin-1.ts +72 -0
- package/src/eventsub/events/channel.prediction.end-1.ts +76 -0
- package/src/eventsub/events/channel.prediction.lock-1.ts +72 -0
- package/src/eventsub/events/channel.prediction.progress-1.ts +72 -0
- package/src/eventsub/events/channel.raid-1.ts +48 -0
- package/src/eventsub/events/channel.shared_chat.begin-1.ts +55 -0
- package/src/eventsub/events/channel.shared_chat.end-1.ts +46 -0
- package/src/eventsub/events/channel.shared_chat.update-1.ts +55 -0
- package/src/eventsub/events/channel.shield_mode.begin-1.ts +51 -0
- package/src/eventsub/events/channel.shield_mode.end-1.ts +51 -0
- package/src/eventsub/events/channel.shoutout.create-1.ts +61 -0
- package/src/eventsub/events/channel.shoutout.receive-1.ts +51 -0
- package/src/eventsub/events/channel.subscribe-1.ts +48 -0
- package/src/eventsub/events/channel.subscription.end-1.ts +48 -0
- package/src/eventsub/events/channel.subscription.gift-1.ts +52 -0
- package/src/eventsub/events/channel.subscription.message-1.ts +66 -0
- package/src/eventsub/events/channel.suspicious_user.message-1.ts +85 -0
- package/src/eventsub/events/channel.suspicious_user.update-1.ts +55 -0
- package/src/eventsub/events/channel.unban-1.ts +50 -0
- package/src/eventsub/events/channel.unban_request.create-1.ts +53 -0
- package/src/eventsub/events/channel.unban_request.resolve-1.ts +64 -0
- package/src/eventsub/events/channel.update-2.ts +48 -0
- package/src/eventsub/events/channel.vip.add-1.ts +44 -0
- package/src/eventsub/events/channel.vip.remove-1.ts +44 -0
- package/src/eventsub/events/channel.warning.acknowledge-1.ts +47 -0
- package/src/eventsub/events/channel.warning.send-1.ts +57 -0
- package/src/eventsub/events/index.ts +73 -284
- package/src/eventsub/events/stream.offline-1.ts +38 -0
- package/src/eventsub/events/stream.online-1.ts +44 -0
- package/src/eventsub/events/user.update-1.ts +48 -0
- package/src/eventsub/events/user.whisper.message-1.ts +51 -0
- package/src/eventsub/events-helpers.ts +53 -25
- package/src/eventsub/eventsub.ts +37 -74
- package/src/eventsub/index.ts +8 -6
- package/src/eventsub/messages.ts +16 -4
- package/src/helix/channel-points/custom-rewards.ts +3 -3
- package/src/helix/channel-points/index.ts +1 -1
- package/src/helix/helix.ts +1 -1
- package/src/helix/subscriptions/index.ts +1 -1
- package/src/helix/subscriptions/subscriptions.ts +40 -47
- package/src/helix/users/index.ts +1 -1
- package/src/helix/users/users.ts +3 -3
- package/src/helpers/alerts/alerts.ts +5 -5
- package/src/helpers/alerts/index.ts +2 -2
- package/src/helpers/charity/charity.ts +2 -2
- package/src/helpers/charity/index.ts +1 -1
- package/src/helpers/goal/goal.ts +2 -2
- package/src/helpers/goal/index.ts +1 -1
- package/src/helpers/hype-train/hype-train.ts +2 -2
- package/src/helpers/hype-train/index.ts +1 -1
- package/src/helpers/poll/index.ts +1 -1
- package/src/helpers/poll/poll.ts +3 -3
- package/src/helpers/prediction/index.ts +1 -1
- package/src/helpers/prediction/prediction.ts +3 -3
- package/src/helpers/redemption/index.ts +1 -1
- package/src/helpers/redemption/redemption.ts +3 -3
- package/src/helpers/status/index.ts +1 -1
- package/src/helpers/status/status.ts +2 -2
- package/src/ui/authentication.ts +1 -1
- package/src/ui/popup.ts +26 -3
- package/src/eventsub/events/channel.ad_break.begin.ts +0 -51
- package/src/eventsub/events/channel.ban.ts +0 -59
- package/src/eventsub/events/channel.channel_points_custom_reward._.ts +0 -29
- package/src/eventsub/events/channel.channel_points_custom_reward.add.ts +0 -75
- package/src/eventsub/events/channel.channel_points_custom_reward.remove.ts +0 -77
- package/src/eventsub/events/channel.channel_points_custom_reward.update.ts +0 -77
- package/src/eventsub/events/channel.channel_points_custom_reward_redemption._.ts +0 -10
- package/src/eventsub/events/channel.channel_points_custom_reward_redemption.add.ts +0 -59
- package/src/eventsub/events/channel.channel_points_custom_reward_redemption.update.ts +0 -59
- package/src/eventsub/events/channel.charity_campaign.donate.ts +0 -66
- package/src/eventsub/events/channel.charity_campaign.progress.ts +0 -67
- package/src/eventsub/events/channel.charity_campaign.start.ts +0 -69
- package/src/eventsub/events/channel.charity_campaign.stop.ts +0 -69
- package/src/eventsub/events/channel.chat.clear.ts +0 -42
- package/src/eventsub/events/channel.chat.clear_user_messages.ts +0 -48
- package/src/eventsub/events/channel.chat.message_delete.ts +0 -50
- package/src/eventsub/events/channel.chat.notification.ts +0 -50
- package/src/eventsub/events/channel.cheer.ts +0 -51
- package/src/eventsub/events/channel.follow.ts +0 -50
- package/src/eventsub/events/channel.goal.begin.ts +0 -51
- package/src/eventsub/events/channel.goal.end.ts +0 -55
- package/src/eventsub/events/channel.goal.progress.ts +0 -51
- package/src/eventsub/events/channel.guest_star_guest.update.ts +0 -66
- package/src/eventsub/events/channel.guest_star_session.begin.ts +0 -46
- package/src/eventsub/events/channel.guest_star_session.end.ts +0 -48
- package/src/eventsub/events/channel.guest_star_settings.update.ts +0 -50
- package/src/eventsub/events/channel.hype_train._.ts +0 -12
- package/src/eventsub/events/channel.hype_train.begin.ts +0 -57
- package/src/eventsub/events/channel.hype_train.end.ts +0 -55
- package/src/eventsub/events/channel.hype_train.progress.ts +0 -70
- package/src/eventsub/events/channel.moderator.add.ts +0 -45
- package/src/eventsub/events/channel.moderator.remove.ts +0 -45
- package/src/eventsub/events/channel.poll._.ts +0 -26
- package/src/eventsub/events/channel.poll.begin.ts +0 -55
- package/src/eventsub/events/channel.poll.end.ts +0 -57
- package/src/eventsub/events/channel.poll.progress.ts +0 -55
- package/src/eventsub/events/channel.prediction._.ts +0 -25
- package/src/eventsub/events/channel.prediction.begin.ts +0 -51
- package/src/eventsub/events/channel.prediction.end.ts +0 -55
- package/src/eventsub/events/channel.prediction.lock.ts +0 -51
- package/src/eventsub/events/channel.prediction.progress.ts +0 -51
- package/src/eventsub/events/channel.raid.ts +0 -49
- package/src/eventsub/events/channel.shield_mode.begin.ts +0 -50
- package/src/eventsub/events/channel.shield_mode.end.ts +0 -50
- package/src/eventsub/events/channel.shoutout.create.ts +0 -62
- package/src/eventsub/events/channel.shoutout.receive.ts +0 -52
- package/src/eventsub/events/channel.subscribe.ts +0 -49
- package/src/eventsub/events/channel.subscription.end.ts +0 -49
- package/src/eventsub/events/channel.subscription.gift.ts +0 -53
- package/src/eventsub/events/channel.subscription.message.ts +0 -67
- package/src/eventsub/events/channel.unban.ts +0 -51
- package/src/eventsub/events/channel.update.ts +0 -49
- package/src/eventsub/events/stream.offline.ts +0 -39
- package/src/eventsub/events/stream.online.ts +0 -45
- package/src/eventsub/events/user.update.ts +0 -45
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { type BaseSubscription } from "../events-helpers.js"
|
|
2
|
-
|
|
3
|
-
type ChannelSubscribeType = "channel.subscribe"
|
|
4
|
-
type ChannelSubscribeVersion = "1"
|
|
5
|
-
|
|
6
|
-
/** The parameters under which an event fires when A user subscribes. This does not include resubscribes. */
|
|
7
|
-
export interface ChannelSubscribeCondition {
|
|
8
|
-
/** The user ID of the broadcaster. */
|
|
9
|
-
broadcaster_user_id: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/** The event information when A user subscribes. This does not include resubscribes. */
|
|
13
|
-
export interface ChannelSubscribeEvent {
|
|
14
|
-
/** The user ID of the user who subscribed. */
|
|
15
|
-
user_id: string
|
|
16
|
-
/** The user login of the user who subscribed. */
|
|
17
|
-
user_login: string
|
|
18
|
-
/** The user name of the user who subscribed. */
|
|
19
|
-
user_name: 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 tier of the subscription. Valid values are 1000, 2000, and 3000. */
|
|
27
|
-
tier: string
|
|
28
|
-
/** Whether the subscription is a gift. */
|
|
29
|
-
is_gift: boolean
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/** The event notification received when A user subscribes. This does not include resubscribes. */
|
|
33
|
-
export type ChannelSubscribeSubscription = BaseSubscription<
|
|
34
|
-
ChannelSubscribeType,
|
|
35
|
-
ChannelSubscribeVersion,
|
|
36
|
-
ChannelSubscribeCondition
|
|
37
|
-
>
|
|
38
|
-
|
|
39
|
-
export function makeChannelSubscribeSubscription(
|
|
40
|
-
userId: string,
|
|
41
|
-
): ChannelSubscribeSubscription {
|
|
42
|
-
return {
|
|
43
|
-
type: "channel.subscribe",
|
|
44
|
-
version: "1",
|
|
45
|
-
condition: {
|
|
46
|
-
broadcaster_user_id: userId,
|
|
47
|
-
},
|
|
48
|
-
}
|
|
49
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { type BaseSubscription } from "../events-helpers.js"
|
|
2
|
-
|
|
3
|
-
type ChannelSubscriptionEndType = "channel.subscription.end"
|
|
4
|
-
type ChannelSubscriptionEndVersion = "1"
|
|
5
|
-
|
|
6
|
-
/** The parameters under which an event fires when A subscription ends. */
|
|
7
|
-
export interface ChannelSubscriptionEndCondition {
|
|
8
|
-
/** The user ID of the broadcaster. */
|
|
9
|
-
broadcaster_user_id: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/** The event information when A subscription ends. */
|
|
13
|
-
export interface ChannelSubscriptionEndEvent {
|
|
14
|
-
/** The user ID of the user whose subscription ended. */
|
|
15
|
-
user_id: string
|
|
16
|
-
/** The user login of the user whose subscription ended. */
|
|
17
|
-
user_login: string
|
|
18
|
-
/** The user name of the user whose subscription ended. */
|
|
19
|
-
user_name: 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 tier of the subscription that ended. Valid values are 1000, 2000, and 3000. */
|
|
27
|
-
tier: string
|
|
28
|
-
/** Whether the subscription was a gift. */
|
|
29
|
-
is_gift: boolean
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/** The event notification received when A subscription ends. */
|
|
33
|
-
export type ChannelSubscriptionEndSubscription = BaseSubscription<
|
|
34
|
-
ChannelSubscriptionEndType,
|
|
35
|
-
ChannelSubscriptionEndVersion,
|
|
36
|
-
ChannelSubscriptionEndCondition
|
|
37
|
-
>
|
|
38
|
-
|
|
39
|
-
export function makeChannelSubscriptionEndSubscription(
|
|
40
|
-
userId: string,
|
|
41
|
-
): ChannelSubscriptionEndSubscription {
|
|
42
|
-
return {
|
|
43
|
-
type: "channel.subscription.end",
|
|
44
|
-
version: "1",
|
|
45
|
-
condition: {
|
|
46
|
-
broadcaster_user_id: userId,
|
|
47
|
-
},
|
|
48
|
-
}
|
|
49
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { type BaseSubscription } from "../events-helpers.js"
|
|
2
|
-
|
|
3
|
-
type ChannelSubscriptionGiftType = "channel.subscription.gift"
|
|
4
|
-
type ChannelSubscriptionGiftVersion = "1"
|
|
5
|
-
|
|
6
|
-
/** The parameters under which an event fires when A user gives a gift subscription to one or more users. */
|
|
7
|
-
export interface ChannelSubscriptionGiftCondition {
|
|
8
|
-
/** The user ID of the broadcaster. */
|
|
9
|
-
broadcaster_user_id: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/** The event information when A user gives a gift subscription to one or more users. */
|
|
13
|
-
export interface ChannelSubscriptionGiftEvent {
|
|
14
|
-
/** The user ID of the user who sent the subscription gift. Set to null if it was an anonymous subscription gift. */
|
|
15
|
-
user_id: string
|
|
16
|
-
/** The user login of the user who sent the gift. Set to null if it was an anonymous subscription gift. */
|
|
17
|
-
user_login: string
|
|
18
|
-
/** The user name of the user who sent the gift. Set to null if it was an anonymous subscription gift. */
|
|
19
|
-
user_name: 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
|
-
/** Integer. The number of subscriptions in the subscription gift. */
|
|
27
|
-
total: number
|
|
28
|
-
/** The tier of the subscriptions in the subscription gift. */
|
|
29
|
-
tier: string
|
|
30
|
-
/** Integer. The number of subscriptions gifted by this user in the channel. This value is null for anonymous gifts or if the gifter has opted out of sharing this information. */
|
|
31
|
-
cumulative_total: number
|
|
32
|
-
/** Whether the subscription gift was anonymous. */
|
|
33
|
-
is_anonymous: boolean
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/** The event notification received when A user gives a gift subscription to one or more users. */
|
|
37
|
-
export type ChannelSubscriptionGiftSubscription = BaseSubscription<
|
|
38
|
-
ChannelSubscriptionGiftType,
|
|
39
|
-
ChannelSubscriptionGiftVersion,
|
|
40
|
-
ChannelSubscriptionGiftCondition
|
|
41
|
-
>
|
|
42
|
-
|
|
43
|
-
export function makeChannelSubscriptionGiftSubscription(
|
|
44
|
-
userId: string,
|
|
45
|
-
): ChannelSubscriptionGiftSubscription {
|
|
46
|
-
return {
|
|
47
|
-
type: "channel.subscription.gift",
|
|
48
|
-
version: "1",
|
|
49
|
-
condition: {
|
|
50
|
-
broadcaster_user_id: userId,
|
|
51
|
-
},
|
|
52
|
-
}
|
|
53
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { type BaseSubscription } from "../events-helpers.js"
|
|
2
|
-
|
|
3
|
-
type ChannelSubscriptionMessageType = "channel.subscription.message"
|
|
4
|
-
type ChannelSubscriptionMessageVersion = "1"
|
|
5
|
-
|
|
6
|
-
/** The parameters under which an event fires when A user sends a resubscription chat message. */
|
|
7
|
-
export interface ChannelSubscriptionMessageCondition {
|
|
8
|
-
/** The user ID of the broadcaster. */
|
|
9
|
-
broadcaster_user_id: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/** The event information when A user sends a resubscription chat message. */
|
|
13
|
-
export interface ChannelSubscriptionMessageEvent {
|
|
14
|
-
/** The user ID of the user who sent a resubscription chat message. */
|
|
15
|
-
user_id: string
|
|
16
|
-
/** The user login of the user who sent a resubscription chat message. */
|
|
17
|
-
user_login: string
|
|
18
|
-
/** The user name of the user who a resubscription chat message. */
|
|
19
|
-
user_name: 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 tier of the user's subscription. */
|
|
27
|
-
tier: string
|
|
28
|
-
/** An object that contains the resubscription message and emote information needed to recreate the message. */
|
|
29
|
-
message: {
|
|
30
|
-
/** The text of the resubscription chat message. */
|
|
31
|
-
text: string
|
|
32
|
-
/** An array that includes the emote ID and start and end positions for where the emote appears in the text. */
|
|
33
|
-
emotes: Array<{
|
|
34
|
-
/** Integer. The index of where the Emote starts in the text. */
|
|
35
|
-
begin: number
|
|
36
|
-
/** Integer. The index of where the Emote ends in the text. */
|
|
37
|
-
end: number
|
|
38
|
-
/** The emote ID. */
|
|
39
|
-
id: string
|
|
40
|
-
}>
|
|
41
|
-
}
|
|
42
|
-
/** Integer. The total number of months the user is subscribed to the channel. */
|
|
43
|
-
cumulative_months: number
|
|
44
|
-
/** Integer. The number of consecutive months the user's current subscription is active. This value is null if the user has opted out of sharing this information. */
|
|
45
|
-
streak_months: number
|
|
46
|
-
/** Integer. The month duration of the subscription. */
|
|
47
|
-
duration_months: number
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/** The event notification received when A user sends a resubscription chat message. */
|
|
51
|
-
export type ChannelSubscriptionMessageSubscription = BaseSubscription<
|
|
52
|
-
ChannelSubscriptionMessageType,
|
|
53
|
-
ChannelSubscriptionMessageVersion,
|
|
54
|
-
ChannelSubscriptionMessageCondition
|
|
55
|
-
>
|
|
56
|
-
|
|
57
|
-
export function makeChannelSubscriptionMessageSubscription(
|
|
58
|
-
userId: string,
|
|
59
|
-
): ChannelSubscriptionMessageSubscription {
|
|
60
|
-
return {
|
|
61
|
-
type: "channel.subscription.message",
|
|
62
|
-
version: "1",
|
|
63
|
-
condition: {
|
|
64
|
-
broadcaster_user_id: userId,
|
|
65
|
-
},
|
|
66
|
-
}
|
|
67
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { type BaseSubscription } from "../events-helpers.js"
|
|
2
|
-
|
|
3
|
-
type ChannelUnbanType = "channel.unban"
|
|
4
|
-
type ChannelUnbanVersion = "1"
|
|
5
|
-
|
|
6
|
-
/** The parameters under which an event fires when A moderator unbans a user. */
|
|
7
|
-
export interface ChannelUnbanCondition {
|
|
8
|
-
/** The user ID of the broadcaster. */
|
|
9
|
-
broadcaster_user_id: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/** The event information when A moderator unbans a user. */
|
|
13
|
-
export interface ChannelUnbanEvent {
|
|
14
|
-
/** The user ID of the user who was unbanned. */
|
|
15
|
-
user_id: string
|
|
16
|
-
/** The user login of the user who was unbanned. */
|
|
17
|
-
user_login: string
|
|
18
|
-
/** The user name of the user who was unbanned. */
|
|
19
|
-
user_name: 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 issuer of the unban. */
|
|
27
|
-
moderator_user_id: string
|
|
28
|
-
/** The user login of the issuer of the unban. */
|
|
29
|
-
moderator_user_login: string
|
|
30
|
-
/** The user name of the issuer of the unban. */
|
|
31
|
-
moderator_user_name: string
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/** The event notification received when A moderator unbans a user. */
|
|
35
|
-
export type ChannelUnbanSubscription = BaseSubscription<
|
|
36
|
-
ChannelUnbanType,
|
|
37
|
-
ChannelUnbanVersion,
|
|
38
|
-
ChannelUnbanCondition
|
|
39
|
-
>
|
|
40
|
-
|
|
41
|
-
export function makeChannelUnbanSubscription(
|
|
42
|
-
userId: string,
|
|
43
|
-
): ChannelUnbanSubscription {
|
|
44
|
-
return {
|
|
45
|
-
type: "channel.unban",
|
|
46
|
-
version: "1",
|
|
47
|
-
condition: {
|
|
48
|
-
broadcaster_user_id: userId,
|
|
49
|
-
},
|
|
50
|
-
}
|
|
51
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { type BaseSubscription } from "../events-helpers.js"
|
|
2
|
-
|
|
3
|
-
type ChannelUpdateType = "channel.update"
|
|
4
|
-
type ChannelUpdateVersion = "2"
|
|
5
|
-
|
|
6
|
-
/** The parameters under which an event fires when The broadcaster updates their channel properties. e.g., category, title, content classification labels, broadcast, or language. */
|
|
7
|
-
export interface ChannelUpdateCondition {
|
|
8
|
-
/** The user ID of the broadcaster. */
|
|
9
|
-
broadcaster_user_id: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/** The event information when The broadcaster updates their channel properties. e.g., category, title, content classification labels, broadcast, or language. */
|
|
13
|
-
export interface ChannelUpdateEvent {
|
|
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 channel's stream title. */
|
|
21
|
-
title: string
|
|
22
|
-
/** The channel's broadcast language. */
|
|
23
|
-
language: string
|
|
24
|
-
/** The channel's category ID. */
|
|
25
|
-
category_id: string
|
|
26
|
-
/** The category name. */
|
|
27
|
-
category_name: string
|
|
28
|
-
/** Array of content classification label IDs currently applied on the Channel. */
|
|
29
|
-
content_classification_labels: string[]
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/** The event notification received when The broadcaster updates their channel properties. e.g., category, title, content classification labels, broadcast, or language. */
|
|
33
|
-
export type ChannelUpdateSubscription = BaseSubscription<
|
|
34
|
-
ChannelUpdateType,
|
|
35
|
-
ChannelUpdateVersion,
|
|
36
|
-
ChannelUpdateCondition
|
|
37
|
-
>
|
|
38
|
-
|
|
39
|
-
export function makeChannelUpdateSubscription(
|
|
40
|
-
userId: string,
|
|
41
|
-
): ChannelUpdateSubscription {
|
|
42
|
-
return {
|
|
43
|
-
type: "channel.update",
|
|
44
|
-
version: "2",
|
|
45
|
-
condition: {
|
|
46
|
-
broadcaster_user_id: userId,
|
|
47
|
-
},
|
|
48
|
-
}
|
|
49
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { type BaseSubscription } from "../events-helpers.js"
|
|
2
|
-
|
|
3
|
-
type StreamOfflineType = "stream.offline"
|
|
4
|
-
type StreamOfflineVersion = "1"
|
|
5
|
-
|
|
6
|
-
/** The parameters under which an event fires when The broadcaster stops a stream. */
|
|
7
|
-
export interface StreamOfflineCondition {
|
|
8
|
-
/** The user ID of the broadcaster. */
|
|
9
|
-
broadcaster_user_id: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/** The event information when The broadcaster stops a stream. */
|
|
13
|
-
export interface StreamOfflineEvent {
|
|
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
|
-
}
|
|
21
|
-
|
|
22
|
-
/** The event notification received when The broadcaster stops a stream. */
|
|
23
|
-
export type StreamOfflineSubscription = BaseSubscription<
|
|
24
|
-
StreamOfflineType,
|
|
25
|
-
StreamOfflineVersion,
|
|
26
|
-
StreamOfflineCondition
|
|
27
|
-
>
|
|
28
|
-
|
|
29
|
-
export function makeStreamOfflineSubscription(
|
|
30
|
-
userId: string,
|
|
31
|
-
): StreamOfflineSubscription {
|
|
32
|
-
return {
|
|
33
|
-
type: "stream.offline",
|
|
34
|
-
version: "1",
|
|
35
|
-
condition: {
|
|
36
|
-
broadcaster_user_id: userId,
|
|
37
|
-
},
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { type BaseSubscription } from "../events-helpers.js"
|
|
2
|
-
|
|
3
|
-
type StreamOnlineType = "stream.online"
|
|
4
|
-
type StreamOnlineVersion = "1"
|
|
5
|
-
|
|
6
|
-
/** The parameters under which an event fires when The broadcaster starts a stream. */
|
|
7
|
-
export interface StreamOnlineCondition {
|
|
8
|
-
/** The user ID of the broadcaster. */
|
|
9
|
-
broadcaster_user_id: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/** The event information when The broadcaster starts a stream. */
|
|
13
|
-
export interface StreamOnlineEvent {
|
|
14
|
-
/** The ID of the stream. */
|
|
15
|
-
id: string
|
|
16
|
-
/** The user ID of the broadcaster. */
|
|
17
|
-
broadcaster_user_id: string
|
|
18
|
-
/** The user login of the broadcaster. */
|
|
19
|
-
broadcaster_user_login: string
|
|
20
|
-
/** The user name of the broadcaster. */
|
|
21
|
-
broadcaster_user_name: string
|
|
22
|
-
/** The stream type. Valid values are: live, playlist, watch_party, premiere, rerun. */
|
|
23
|
-
type: string
|
|
24
|
-
/** The time the stream went online. */
|
|
25
|
-
started_at: Date
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/** The event notification received when The broadcaster starts a stream. */
|
|
29
|
-
export type StreamOnlineSubscription = BaseSubscription<
|
|
30
|
-
StreamOnlineType,
|
|
31
|
-
StreamOnlineVersion,
|
|
32
|
-
StreamOnlineCondition
|
|
33
|
-
>
|
|
34
|
-
|
|
35
|
-
export function makeStreamOnlineSubscription(
|
|
36
|
-
userId: string,
|
|
37
|
-
): StreamOnlineSubscription {
|
|
38
|
-
return {
|
|
39
|
-
type: "stream.online",
|
|
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 UserUpdateType = "user.update"
|
|
4
|
-
type UserUpdateVersion = "1"
|
|
5
|
-
|
|
6
|
-
/** The parameters under which an event fires when A user updateds their account. */
|
|
7
|
-
export interface UserUpdateCondition {
|
|
8
|
-
/** The user ID. */
|
|
9
|
-
user_id: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/** The event information when A user updateds their account. */
|
|
13
|
-
export interface UserUpdateEvent {
|
|
14
|
-
/** The user ID of the user who was updated. */
|
|
15
|
-
user_id: string
|
|
16
|
-
/** The user login of the user who was updated. */
|
|
17
|
-
user_login: string
|
|
18
|
-
/** The user name of the user who was updated. */
|
|
19
|
-
user_name: string
|
|
20
|
-
/** The user email address. The event includes the user's email address only if the app used to request this event type includes the user:read:email scope for the user; otherwise, the field is set to an empty string. See Create EventSub Subscription. */
|
|
21
|
-
email: string
|
|
22
|
-
/** A Boolean value that determines whether Twitch has verified the user's email address. Is true if Twitch has verified the email address; otherwise, false.\n\nNOTE: Ignore this field if the email field contains an empty string. */
|
|
23
|
-
email_verified: boolean
|
|
24
|
-
/** The user description. */
|
|
25
|
-
description: string
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/** The event notification received when A user updateds their account. */
|
|
29
|
-
export type UserUpdateSubscription = BaseSubscription<
|
|
30
|
-
UserUpdateType,
|
|
31
|
-
UserUpdateVersion,
|
|
32
|
-
UserUpdateCondition
|
|
33
|
-
>
|
|
34
|
-
|
|
35
|
-
export function makeUserUpdateSubscription(
|
|
36
|
-
userId: string,
|
|
37
|
-
): UserUpdateSubscription {
|
|
38
|
-
return {
|
|
39
|
-
type: "user.update",
|
|
40
|
-
version: "1",
|
|
41
|
-
condition: {
|
|
42
|
-
user_id: userId,
|
|
43
|
-
},
|
|
44
|
-
}
|
|
45
|
-
}
|