@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.
- package/package.json +6 -2
- package/src/authentication/authentication.ts +1 -1
- package/src/authentication/index.ts +1 -1
- package/src/chat/chat.ts +69 -134
- package/src/chat/helpers.ts +33 -24
- package/src/chat/index.ts +4 -6
- package/src/chat/pronouns.ts +141 -0
- 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 +52 -24
- 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 +120 -33
- package/src/helix/channel-points/index.ts +1 -1
- package/src/helix/channels/channels.ts +39 -0
- package/src/helix/channels/index.ts +1 -0
- package/src/helix/chat/emotes.ts +49 -0
- package/src/helix/chat/index.ts +3 -0
- package/src/helix/chat/send.ts +109 -0
- package/src/helix/chat/shared.ts +49 -0
- package/src/helix/helix.ts +6 -21
- package/src/helix/subscriptions/index.ts +1 -1
- package/src/helix/subscriptions/subscriptions.ts +46 -48
- package/src/helix/users/index.ts +1 -1
- package/src/helix/users/users.ts +22 -19
- 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 +2 -2
- 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/chat/interfaces/events.ts +0 -269
- package/src/chat/interfaces/index.ts +0 -9
- package/src/chat/parser.ts +0 -254
- 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,42 +0,0 @@
|
|
|
1
|
-
import { type BaseSubscription } from "../events-helpers.js"
|
|
2
|
-
|
|
3
|
-
type ChannelChatClearType = "channel.chat.clear"
|
|
4
|
-
type ChannelChatClearVersion = "1"
|
|
5
|
-
|
|
6
|
-
/** The parameters under which an event fires when A moderator clears all messages from the chat room. */
|
|
7
|
-
export interface ChannelChatClearCondition {
|
|
8
|
-
/** The user ID of the broadcaster. */
|
|
9
|
-
broadcaster_user_id: string
|
|
10
|
-
/** The user ID to read chat as. */
|
|
11
|
-
user_id: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/** The event information when A moderator clears all messages from the chat room. */
|
|
15
|
-
export interface ChannelChatClearEvent {
|
|
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
|
-
}
|
|
23
|
-
|
|
24
|
-
/** The event notification received when A moderator clears all messages from the chat room. */
|
|
25
|
-
export type ChannelChatClearSubscription = BaseSubscription<
|
|
26
|
-
ChannelChatClearType,
|
|
27
|
-
ChannelChatClearVersion,
|
|
28
|
-
ChannelChatClearCondition
|
|
29
|
-
>
|
|
30
|
-
|
|
31
|
-
export function makeChannelChatClearSubscription(
|
|
32
|
-
userId: string,
|
|
33
|
-
): ChannelChatClearSubscription {
|
|
34
|
-
return {
|
|
35
|
-
type: "channel.chat.clear",
|
|
36
|
-
version: "1",
|
|
37
|
-
condition: {
|
|
38
|
-
broadcaster_user_id: userId,
|
|
39
|
-
user_id: userId,
|
|
40
|
-
},
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { type BaseSubscription } from "../events-helpers.js"
|
|
2
|
-
|
|
3
|
-
type ChannelChatClearUserMessagesType = "channel.chat.clear_user_messages"
|
|
4
|
-
type ChannelChatClearUserMessagesVersion = "1"
|
|
5
|
-
|
|
6
|
-
/** The parameters under which an event fires when A moderator clears all messages from a specific user. */
|
|
7
|
-
export interface ChannelChatClearUserMessagesCondition {
|
|
8
|
-
/** The user ID of the broadcaster. */
|
|
9
|
-
broadcaster_user_id: string
|
|
10
|
-
/** The user ID to read chat as. */
|
|
11
|
-
user_id: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/** The event information when A moderator clears all messages from a specific user. */
|
|
15
|
-
export interface ChannelChatClearUserMessagesEvent {
|
|
16
|
-
/** The user ID of the broadcaster. */
|
|
17
|
-
broadcaster_user_id: string
|
|
18
|
-
/** The user login of the broadcaster. */
|
|
19
|
-
broadcaster_user_login: string
|
|
20
|
-
/** The user name of the broadcaster. */
|
|
21
|
-
broadcaster_user_name: string
|
|
22
|
-
/** The user ID of the user who was banned or put in a timeout. */
|
|
23
|
-
target_user_id: string
|
|
24
|
-
/** The user name of the user who was banned or put in a timeout. */
|
|
25
|
-
target_user_login: string
|
|
26
|
-
/** The user login of the user who was banned or put in a timeout. */
|
|
27
|
-
target_user_name: string
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/** The event notification received when A moderator clears all messages from a specific user. */
|
|
31
|
-
export type ChannelChatClearUserMessagesSubscription = BaseSubscription<
|
|
32
|
-
ChannelChatClearUserMessagesType,
|
|
33
|
-
ChannelChatClearUserMessagesVersion,
|
|
34
|
-
ChannelChatClearUserMessagesCondition
|
|
35
|
-
>
|
|
36
|
-
|
|
37
|
-
export function makeChannelChatClearUserMessagesSubscription(
|
|
38
|
-
userId: string,
|
|
39
|
-
): ChannelChatClearUserMessagesSubscription {
|
|
40
|
-
return {
|
|
41
|
-
type: "channel.chat.clear_user_messages",
|
|
42
|
-
version: "1",
|
|
43
|
-
condition: {
|
|
44
|
-
broadcaster_user_id: userId,
|
|
45
|
-
user_id: userId,
|
|
46
|
-
},
|
|
47
|
-
}
|
|
48
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { type BaseSubscription } from "../events-helpers.js"
|
|
2
|
-
|
|
3
|
-
type ChannelChatMessageDeleteType = "channel.chat.message_delete"
|
|
4
|
-
type ChannelChatMessageDeleteVersion = "1"
|
|
5
|
-
|
|
6
|
-
/** The parameters under which an event fires when A moderator removes a specific message. */
|
|
7
|
-
export interface ChannelChatMessageDeleteCondition {
|
|
8
|
-
/** The user ID of the broadcaster. */
|
|
9
|
-
broadcaster_user_id: string
|
|
10
|
-
/** The user ID to read chat as. */
|
|
11
|
-
user_id: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/** The event information when A moderator removes a specific message. */
|
|
15
|
-
export interface ChannelChatMessageDeleteEvent {
|
|
16
|
-
/** The user ID of the broadcaster. */
|
|
17
|
-
broadcaster_user_id: string
|
|
18
|
-
/** The user login of the broadcaster. */
|
|
19
|
-
broadcaster_user_login: string
|
|
20
|
-
/** The user name of the broadcaster. */
|
|
21
|
-
broadcaster_user_name: string
|
|
22
|
-
/** The user ID of the user whose message was deleted. */
|
|
23
|
-
target_user_id: string
|
|
24
|
-
/** The user name of the user whose message was deleted. */
|
|
25
|
-
target_user_login: string
|
|
26
|
-
/** The user login of the user whose message was deleted. */
|
|
27
|
-
target_user_name: string
|
|
28
|
-
/** The UUID of the message that was removed. */
|
|
29
|
-
message_id: string
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/** The event notification received when A moderator removes a specific message. */
|
|
33
|
-
export type ChannelChatMessageDeleteSubscription = BaseSubscription<
|
|
34
|
-
ChannelChatMessageDeleteType,
|
|
35
|
-
ChannelChatMessageDeleteVersion,
|
|
36
|
-
ChannelChatMessageDeleteCondition
|
|
37
|
-
>
|
|
38
|
-
|
|
39
|
-
export function makeChannelChatMessageDeleteSubscription(
|
|
40
|
-
userId: string,
|
|
41
|
-
): ChannelChatMessageDeleteSubscription {
|
|
42
|
-
return {
|
|
43
|
-
type: "channel.chat.message_delete",
|
|
44
|
-
version: "1",
|
|
45
|
-
condition: {
|
|
46
|
-
broadcaster_user_id: userId,
|
|
47
|
-
user_id: userId,
|
|
48
|
-
},
|
|
49
|
-
}
|
|
50
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { type BaseSubscription } from "../events-helpers.js"
|
|
2
|
-
|
|
3
|
-
type ChannelChatNotificationType = "channel.chat.notification"
|
|
4
|
-
type ChannelChatNotificationVersion = "1"
|
|
5
|
-
|
|
6
|
-
/** The parameters under which an event fires when An event appears in chat. */
|
|
7
|
-
export interface ChannelChatNotificationCondition {
|
|
8
|
-
/** The user ID of the broadcaster. */
|
|
9
|
-
broadcaster_user_id: string
|
|
10
|
-
/** The user ID to read chat as. */
|
|
11
|
-
user_id: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/** The event information when An event appears in chat. */
|
|
15
|
-
export interface ChannelChatNotificationEvent {
|
|
16
|
-
/** The user ID of the broadcaster. */
|
|
17
|
-
broadcaster_user_id: string
|
|
18
|
-
/** The user login of the broadcaster. */
|
|
19
|
-
broadcaster_user_login: string
|
|
20
|
-
/** The user name of the broadcaster. */
|
|
21
|
-
broadcaster_user_name: string
|
|
22
|
-
/** The user ID of the user who sent the message. */
|
|
23
|
-
chatter_user_id: string
|
|
24
|
-
/** The user login of the user who sent the message. */
|
|
25
|
-
chatter_user_login: string
|
|
26
|
-
/** The user name of the user who sent the message. */
|
|
27
|
-
chatter_user_name: string
|
|
28
|
-
/** The UUID of the message. */
|
|
29
|
-
message_id: string
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/** The event notification received when An event appears in chat. */
|
|
33
|
-
export type ChannelChatNotificationSubscription = BaseSubscription<
|
|
34
|
-
ChannelChatNotificationType,
|
|
35
|
-
ChannelChatNotificationVersion,
|
|
36
|
-
ChannelChatNotificationCondition
|
|
37
|
-
>
|
|
38
|
-
|
|
39
|
-
export function makeChannelChatNotificationSubscription(
|
|
40
|
-
userId: string,
|
|
41
|
-
): ChannelChatNotificationSubscription {
|
|
42
|
-
return {
|
|
43
|
-
type: "channel.chat.notification",
|
|
44
|
-
version: "1",
|
|
45
|
-
condition: {
|
|
46
|
-
broadcaster_user_id: userId,
|
|
47
|
-
user_id: userId,
|
|
48
|
-
},
|
|
49
|
-
}
|
|
50
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { type BaseSubscription } from "../events-helpers.js"
|
|
2
|
-
|
|
3
|
-
type ChannelCheerType = "channel.cheer"
|
|
4
|
-
type ChannelCheerVersion = "1"
|
|
5
|
-
|
|
6
|
-
/** The parameters under which an event fires when A user cheers. */
|
|
7
|
-
export interface ChannelCheerCondition {
|
|
8
|
-
/** The user ID of the broadcaster. */
|
|
9
|
-
broadcaster_user_id: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/** The event information when A user cheers. */
|
|
13
|
-
export interface ChannelCheerEvent {
|
|
14
|
-
/** Whether the user cheered anonymously or not. */
|
|
15
|
-
is_anonymous: boolean
|
|
16
|
-
/** The user ID of the user who cheered. This is null if is_anonymous is true. */
|
|
17
|
-
user_id: string
|
|
18
|
-
/** The user login of the user who cheered. This is null if is_anonymous is true. */
|
|
19
|
-
user_login: string
|
|
20
|
-
/** The user name of the user who cheered. This is null if is_anonymous is true. */
|
|
21
|
-
user_name: string
|
|
22
|
-
/** The user ID of the broadcaster. */
|
|
23
|
-
broadcaster_user_id: string
|
|
24
|
-
/** The user login of the broadcaster. */
|
|
25
|
-
broadcaster_user_login: string
|
|
26
|
-
/** The user name of the broadcaster. */
|
|
27
|
-
broadcaster_user_name: string
|
|
28
|
-
/** The message sent with the cheer. */
|
|
29
|
-
message: string
|
|
30
|
-
/** Integer. The number of bits cheered. */
|
|
31
|
-
bits: number
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/** The event notification received when A user cheers. */
|
|
35
|
-
export type ChannelCheerSubscription = BaseSubscription<
|
|
36
|
-
ChannelCheerType,
|
|
37
|
-
ChannelCheerVersion,
|
|
38
|
-
ChannelCheerCondition
|
|
39
|
-
>
|
|
40
|
-
|
|
41
|
-
export function makeChannelCheerSubscription(
|
|
42
|
-
userId: string,
|
|
43
|
-
): ChannelCheerSubscription {
|
|
44
|
-
return {
|
|
45
|
-
type: "channel.cheer",
|
|
46
|
-
version: "1",
|
|
47
|
-
condition: {
|
|
48
|
-
broadcaster_user_id: userId,
|
|
49
|
-
},
|
|
50
|
-
}
|
|
51
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { type BaseSubscription } from "../events-helpers.js"
|
|
2
|
-
|
|
3
|
-
type ChannelFollowType = "channel.follow"
|
|
4
|
-
type ChannelFollowVersion = "2"
|
|
5
|
-
|
|
6
|
-
/** The parameters under which an event fires when A user follows. */
|
|
7
|
-
export interface ChannelFollowCondition {
|
|
8
|
-
/** The user ID of the broadcaster. */
|
|
9
|
-
broadcaster_user_id: string
|
|
10
|
-
/** The user ID of the moderator or broadcaster. */
|
|
11
|
-
moderator_user_id: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/** The event information when A user follows. */
|
|
15
|
-
export interface ChannelFollowEvent {
|
|
16
|
-
/** The user ID of the user who followed. */
|
|
17
|
-
user_id: string
|
|
18
|
-
/** The user login of the user who followed. */
|
|
19
|
-
user_login: string
|
|
20
|
-
/** The user name of the user who followed. */
|
|
21
|
-
user_name: string
|
|
22
|
-
/** The user ID of the broadcaster. */
|
|
23
|
-
broadcaster_user_id: string
|
|
24
|
-
/** The user login of the broadcaster. */
|
|
25
|
-
broadcaster_user_login: string
|
|
26
|
-
/** The user name of the broadcaster. */
|
|
27
|
-
broadcaster_user_name: string
|
|
28
|
-
/** The time the follow occurred. */
|
|
29
|
-
followed_at: Date
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/** The event notification received when A user follows. */
|
|
33
|
-
export type ChannelFollowSubscription = BaseSubscription<
|
|
34
|
-
ChannelFollowType,
|
|
35
|
-
ChannelFollowVersion,
|
|
36
|
-
ChannelFollowCondition
|
|
37
|
-
>
|
|
38
|
-
|
|
39
|
-
export function makeChannelFollowSubscription(
|
|
40
|
-
userId: string,
|
|
41
|
-
): ChannelFollowSubscription {
|
|
42
|
-
return {
|
|
43
|
-
type: "channel.follow",
|
|
44
|
-
version: "2",
|
|
45
|
-
condition: {
|
|
46
|
-
broadcaster_user_id: userId,
|
|
47
|
-
moderator_user_id: userId,
|
|
48
|
-
},
|
|
49
|
-
}
|
|
50
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { type BaseSubscription } from "../events-helpers.js"
|
|
2
|
-
|
|
3
|
-
type GoalBeginType = "channel.goal.begin"
|
|
4
|
-
type GoalBeginVersion = "1"
|
|
5
|
-
|
|
6
|
-
/** The parameters under which an event fires when The broadcaster begins a goal. */
|
|
7
|
-
export interface GoalBeginCondition {
|
|
8
|
-
/** The user ID of the broadcaster. */
|
|
9
|
-
broadcaster_user_id: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/** The event information when The broadcaster begins a goal. */
|
|
13
|
-
export interface GoalBeginEvent {
|
|
14
|
-
/** The ID of the goal. */
|
|
15
|
-
id: string
|
|
16
|
-
/** The user ID of the broadcaster. */
|
|
17
|
-
broadcaster_user_id: string
|
|
18
|
-
/** The user name of the broadcaster. */
|
|
19
|
-
broadcaster_user_name: string
|
|
20
|
-
/** The user login of the broadcaster. */
|
|
21
|
-
broadcaster_user_login: string
|
|
22
|
-
/** The type of goal. Possible values are:\nfollow — The goal is to increase followers.\nsubscription — The goal is to increase subscriptions. This type shows the net increase or decrease in tier points associated with the subscriptions.\nsubscription_count — The goal is to increase subscriptions. This type shows the net increase or decrease in the number of subscriptions.\nnew_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).\nnew_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). */
|
|
23
|
-
type: string
|
|
24
|
-
/** A description of the goal, if specified. The description may contain a maximum of 40 characters. */
|
|
25
|
-
description: string
|
|
26
|
-
/** Integer. The goal's current value.\n\nThe goal's type determines how this value is increased or decreased.\nIf 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.\nIf type is subscription, this field is increased and decreased by the points value associated with the subscription tier. For example, if a tier-two subscription is worth 2 points, this field is increased or decreased by 2, not 1.\nIf type is subscription_count, this field is increased by 1 for each new subscription and decreased by 1 for each user that unsubscribes.\nIf type is new_subscription, this field is increased by the points value associated with the subscription tier. For example, if a tier-two subscription is worth 2 points, this field is increased by 2, not 1.\nIf type is new_subscription_count, this field is increased by 1 for each new subscription. */
|
|
27
|
-
current_amount: number
|
|
28
|
-
/** Integer. The goal's target value. For example, if the broadcaster has 200 followers before creating the goal, and their goal is to double that number, this field is set to 400. */
|
|
29
|
-
target_amount: number
|
|
30
|
-
/** The time the broadcaster created the goal. */
|
|
31
|
-
started_at: Date
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/** The event notification received when The broadcaster begins a goal. */
|
|
35
|
-
export type GoalBeginSubscription = BaseSubscription<
|
|
36
|
-
GoalBeginType,
|
|
37
|
-
GoalBeginVersion,
|
|
38
|
-
GoalBeginCondition
|
|
39
|
-
>
|
|
40
|
-
|
|
41
|
-
export function makeGoalBeginSubscription(
|
|
42
|
-
userId: string,
|
|
43
|
-
): GoalBeginSubscription {
|
|
44
|
-
return {
|
|
45
|
-
type: "channel.goal.begin",
|
|
46
|
-
version: "1",
|
|
47
|
-
condition: {
|
|
48
|
-
broadcaster_user_id: userId,
|
|
49
|
-
},
|
|
50
|
-
}
|
|
51
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { type BaseSubscription } from "../events-helpers.js"
|
|
2
|
-
|
|
3
|
-
type GoalEndType = "channel.goal.end"
|
|
4
|
-
type GoalEndVersion = "1"
|
|
5
|
-
|
|
6
|
-
/** The parameters under which an event fires when The broadcaster ends a goal. */
|
|
7
|
-
export interface GoalEndCondition {
|
|
8
|
-
/** The user ID of the broadcaster. */
|
|
9
|
-
broadcaster_user_id: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/** The event information when The broadcaster ends a goal. */
|
|
13
|
-
export interface GoalEndEvent {
|
|
14
|
-
/** The ID of the goal. */
|
|
15
|
-
id: string
|
|
16
|
-
/** The user ID of the broadcaster. */
|
|
17
|
-
broadcaster_user_id: string
|
|
18
|
-
/** The user name of the broadcaster. */
|
|
19
|
-
broadcaster_user_name: string
|
|
20
|
-
/** The user login of the broadcaster. */
|
|
21
|
-
broadcaster_user_login: string
|
|
22
|
-
/** The type of goal. Possible values are:\nfollow — The goal is to increase followers.\nsubscription — The goal is to increase subscriptions. This type shows the net increase or decrease in tier points associated with the subscriptions.\nsubscription_count — The goal is to increase subscriptions. This type shows the net increase or decrease in the number of subscriptions.\nnew_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).\nnew_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). */
|
|
23
|
-
type: string
|
|
24
|
-
/** A description of the goal, if specified. The description may contain a maximum of 40 characters. */
|
|
25
|
-
description: string
|
|
26
|
-
/** A Boolean value that indicates whether the broadcaster achieved their goal. Is true if the goal was achieved; otherwise, false. */
|
|
27
|
-
is_achieved: boolean
|
|
28
|
-
/** Integer. The goal's current value.\n\nThe goal's type determines how this value is increased or decreased.\nIf 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.\nIf type is subscription, this field is increased and decreased by the points value associated with the subscription tier. For example, if a tier-two subscription is worth 2 points, this field is increased or decreased by 2, not 1.\nIf type is subscription_count, this field is increased by 1 for each new subscription and decreased by 1 for each user that unsubscribes.\nIf type is new_subscription, this field is increased by the points value associated with the subscription tier. For example, if a tier-two subscription is worth 2 points, this field is increased by 2, not 1.\nIf type is new_subscription_count, this field is increased by 1 for each new subscription. */
|
|
29
|
-
current_amount: number
|
|
30
|
-
/** Integer. The goal's target value. For example, if the broadcaster has 200 followers before creating the goal, and their goal is to double that number, this field is set to 400. */
|
|
31
|
-
target_amount: number
|
|
32
|
-
/** The time the broadcaster created the goal. */
|
|
33
|
-
started_at: Date
|
|
34
|
-
/** The time the broadcaster ended the goal.\n\nOnly the channel.goal.end event includes this field. */
|
|
35
|
-
ended_at: Date
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/** The event notification received when The broadcaster ends a goal. */
|
|
39
|
-
export type GoalEndSubscription = BaseSubscription<
|
|
40
|
-
GoalEndType,
|
|
41
|
-
GoalEndVersion,
|
|
42
|
-
GoalEndCondition
|
|
43
|
-
>
|
|
44
|
-
|
|
45
|
-
export function makeGoalEndSubscription(
|
|
46
|
-
userId: string,
|
|
47
|
-
): GoalEndSubscription {
|
|
48
|
-
return {
|
|
49
|
-
type: "channel.goal.end",
|
|
50
|
-
version: "1",
|
|
51
|
-
condition: {
|
|
52
|
-
broadcaster_user_id: userId,
|
|
53
|
-
},
|
|
54
|
-
}
|
|
55
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { type BaseSubscription } from "../events-helpers.js"
|
|
2
|
-
|
|
3
|
-
type GoalProgressType = "channel.goal.progress"
|
|
4
|
-
type GoalProgressVersion = "1"
|
|
5
|
-
|
|
6
|
-
/** The parameters under which an event fires when Progress (either positive or negative) is made towards the broadcaster's goal. */
|
|
7
|
-
export interface GoalProgressCondition {
|
|
8
|
-
/** The user ID of the broadcaster. */
|
|
9
|
-
broadcaster_user_id: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/** The event information when Progress (either positive or negative) is made towards the broadcaster's goal. */
|
|
13
|
-
export interface GoalProgressEvent {
|
|
14
|
-
/** The ID of the goal. */
|
|
15
|
-
id: string
|
|
16
|
-
/** The user ID of the broadcaster. */
|
|
17
|
-
broadcaster_user_id: string
|
|
18
|
-
/** The user name of the broadcaster. */
|
|
19
|
-
broadcaster_user_name: string
|
|
20
|
-
/** The user login of the broadcaster. */
|
|
21
|
-
broadcaster_user_login: string
|
|
22
|
-
/** The type of goal. Possible values are:\nfollow — The goal is to increase followers.\nsubscription — The goal is to increase subscriptions. This type shows the net increase or decrease in tier points associated with the subscriptions.\nsubscription_count — The goal is to increase subscriptions. This type shows the net increase or decrease in the number of subscriptions.\nnew_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).\nnew_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). */
|
|
23
|
-
type: string
|
|
24
|
-
/** A description of the goal, if specified. The description may contain a maximum of 40 characters. */
|
|
25
|
-
description: string
|
|
26
|
-
/** Integer. The goal's current value.\n\nThe goal's type determines how this value is increased or decreased.\nIf 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.\nIf type is subscription, this field is increased and decreased by the points value associated with the subscription tier. For example, if a tier-two subscription is worth 2 points, this field is increased or decreased by 2, not 1.\nIf type is subscription_count, this field is increased by 1 for each new subscription and decreased by 1 for each user that unsubscribes.\nIf type is new_subscription, this field is increased by the points value associated with the subscription tier. For example, if a tier-two subscription is worth 2 points, this field is increased by 2, not 1.\nIf type is new_subscription_count, this field is increased by 1 for each new subscription. */
|
|
27
|
-
current_amount: number
|
|
28
|
-
/** Integer. The goal's target value. For example, if the broadcaster has 200 followers before creating the goal, and their goal is to double that number, this field is set to 400. */
|
|
29
|
-
target_amount: number
|
|
30
|
-
/** The time the broadcaster created the goal. */
|
|
31
|
-
started_at: Date
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/** The event notification received when Progress (either positive or negative) is made towards the broadcaster's goal. */
|
|
35
|
-
export type GoalProgressSubscription = BaseSubscription<
|
|
36
|
-
GoalProgressType,
|
|
37
|
-
GoalProgressVersion,
|
|
38
|
-
GoalProgressCondition
|
|
39
|
-
>
|
|
40
|
-
|
|
41
|
-
export function makeGoalProgressSubscription(
|
|
42
|
-
userId: string,
|
|
43
|
-
): GoalProgressSubscription {
|
|
44
|
-
return {
|
|
45
|
-
type: "channel.goal.progress",
|
|
46
|
-
version: "1",
|
|
47
|
-
condition: {
|
|
48
|
-
broadcaster_user_id: userId,
|
|
49
|
-
},
|
|
50
|
-
}
|
|
51
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { type BaseSubscription } from "../events-helpers.js"
|
|
2
|
-
|
|
3
|
-
type ChannelGuestStarGuestUpdateType = "channel.guest_star_guest.update"
|
|
4
|
-
type ChannelGuestStarGuestUpdateVersion = "beta"
|
|
5
|
-
|
|
6
|
-
/** The parameters under which an event fires when A guest or a slot is updated in an active Guest Star session. */
|
|
7
|
-
export interface ChannelGuestStarGuestUpdateCondition {
|
|
8
|
-
/** The user ID of the broadcaster. */
|
|
9
|
-
broadcaster_user_id: string
|
|
10
|
-
/** The user ID of the moderator or broadcaster. */
|
|
11
|
-
moderator_user_id: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/** The event information when A guest or a slot is updated in an active Guest Star session. */
|
|
15
|
-
export interface ChannelGuestStarGuestUpdateEvent {
|
|
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
|
-
/** ID representing the unique session that was started. */
|
|
23
|
-
session_id: string
|
|
24
|
-
/** The user ID of the moderator who updated the guest's state. null if the update was performed by the guest. */
|
|
25
|
-
moderator_user_id: string
|
|
26
|
-
/** The user login of the moderator. null if the update was performed by the guest. */
|
|
27
|
-
moderator_user_login: string
|
|
28
|
-
/** The user name of the moderator. null if the update was performed by the guest. */
|
|
29
|
-
moderator_user_name: string
|
|
30
|
-
/** The user ID of the guest who transitioned states in the session. null if the slot is now empty. */
|
|
31
|
-
guest_user_id: string
|
|
32
|
-
/** The guest user login. null if the slot is now empty. */
|
|
33
|
-
guest_user_login: string
|
|
34
|
-
/** The guest user name. null if the slot is now empty. */
|
|
35
|
-
guest_user_name: string
|
|
36
|
-
/** The ID of the slot assignment the guest is assigned to. null if the guest is in the INVITED, REMOVED, READY, or ACCEPTED state. */
|
|
37
|
-
slot_id: string
|
|
38
|
-
/** 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:\n - 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.\n - accepted — The guest has accepted the invite and is currently in the process of setting up to join the session.\n - ready — The guest has signaled they are ready and can be assigned a slot.\n - backstage — The guest has been assigned a slot in the session, but is not currently seen live in the broadcasting software.\n - live — The guest is now live in the host's broadcasting software.\n - removed — The guest was removed from the call or queue.\n - accepted — The guest has accepted the invite to the call. */
|
|
39
|
-
state: string
|
|
40
|
-
/** 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. */
|
|
41
|
-
host_video_enabled: boolean
|
|
42
|
-
/** 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. */
|
|
43
|
-
host_audio_enabled: boolean
|
|
44
|
-
/** Integer. 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. */
|
|
45
|
-
host_volume: number
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/** The event notification received when A guest or a slot is updated in an active Guest Star session. */
|
|
49
|
-
export type ChannelGuestStarGuestUpdateSubscription = BaseSubscription<
|
|
50
|
-
ChannelGuestStarGuestUpdateType,
|
|
51
|
-
ChannelGuestStarGuestUpdateVersion,
|
|
52
|
-
ChannelGuestStarGuestUpdateCondition
|
|
53
|
-
>
|
|
54
|
-
|
|
55
|
-
export function makeChannelGuestStarGuestUpdateSubscription(
|
|
56
|
-
userId: string,
|
|
57
|
-
): ChannelGuestStarGuestUpdateSubscription {
|
|
58
|
-
return {
|
|
59
|
-
type: "channel.guest_star_guest.update",
|
|
60
|
-
version: "beta",
|
|
61
|
-
condition: {
|
|
62
|
-
broadcaster_user_id: userId,
|
|
63
|
-
moderator_user_id: userId,
|
|
64
|
-
},
|
|
65
|
-
}
|
|
66
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { type BaseSubscription } from "../events-helpers.js"
|
|
2
|
-
|
|
3
|
-
type ChannelGuestStarSessionBeginType = "channel.guest_star_session.begin"
|
|
4
|
-
type ChannelGuestStarSessionBeginVersion = "beta"
|
|
5
|
-
|
|
6
|
-
/** The parameters under which an event fires when The broadcaster began a new Guest Star session. */
|
|
7
|
-
export interface ChannelGuestStarSessionBeginCondition {
|
|
8
|
-
/** The user ID of the broadcaster. */
|
|
9
|
-
broadcaster_user_id: string
|
|
10
|
-
/** The user ID of the moderator or broadcaster. */
|
|
11
|
-
moderator_user_id: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/** The event information when The broadcaster began a new Guest Star session. */
|
|
15
|
-
export interface ChannelGuestStarSessionBeginEvent {
|
|
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
|
-
/** ID representing the unique session that was started. */
|
|
23
|
-
session_id: string
|
|
24
|
-
/** The time the session began. */
|
|
25
|
-
started_at: Date
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/** The event notification received when The broadcaster began a new Guest Star session. */
|
|
29
|
-
export type ChannelGuestStarSessionBeginSubscription = BaseSubscription<
|
|
30
|
-
ChannelGuestStarSessionBeginType,
|
|
31
|
-
ChannelGuestStarSessionBeginVersion,
|
|
32
|
-
ChannelGuestStarSessionBeginCondition
|
|
33
|
-
>
|
|
34
|
-
|
|
35
|
-
export function makeChannelGuestStarSessionBeginSubscription(
|
|
36
|
-
userId: string,
|
|
37
|
-
): ChannelGuestStarSessionBeginSubscription {
|
|
38
|
-
return {
|
|
39
|
-
type: "channel.guest_star_session.begin",
|
|
40
|
-
version: "beta",
|
|
41
|
-
condition: {
|
|
42
|
-
broadcaster_user_id: userId,
|
|
43
|
-
moderator_user_id: userId,
|
|
44
|
-
},
|
|
45
|
-
}
|
|
46
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { type BaseSubscription } from "../events-helpers.js"
|
|
2
|
-
|
|
3
|
-
type ChannelGuestStarSessionEndType = "channel.guest_star_session.end"
|
|
4
|
-
type ChannelGuestStarSessionEndVersion = "beta"
|
|
5
|
-
|
|
6
|
-
/** The parameters under which an event fires when A running Guest Star session ends. */
|
|
7
|
-
export interface ChannelGuestStarSessionEndCondition {
|
|
8
|
-
/** The user ID of the broadcaster. */
|
|
9
|
-
broadcaster_user_id: string
|
|
10
|
-
/** The user ID of the moderator or broadcaster. */
|
|
11
|
-
moderator_user_id: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/** The event information when A running Guest Star session ends. */
|
|
15
|
-
export interface ChannelGuestStarSessionEndEvent {
|
|
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
|
-
/** ID representing the unique session that was started. */
|
|
23
|
-
session_id: string
|
|
24
|
-
/** The time the session began. */
|
|
25
|
-
started_at: Date
|
|
26
|
-
/** The time the session ended. */
|
|
27
|
-
ended_at: Date
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/** The event notification received when A running Guest Star session ends. */
|
|
31
|
-
export type ChannelGuestStarSessionEndSubscription = BaseSubscription<
|
|
32
|
-
ChannelGuestStarSessionEndType,
|
|
33
|
-
ChannelGuestStarSessionEndVersion,
|
|
34
|
-
ChannelGuestStarSessionEndCondition
|
|
35
|
-
>
|
|
36
|
-
|
|
37
|
-
export function makeChannelGuestStarSessionEndSubscription(
|
|
38
|
-
userId: string,
|
|
39
|
-
): ChannelGuestStarSessionEndSubscription {
|
|
40
|
-
return {
|
|
41
|
-
type: "channel.guest_star_session.end",
|
|
42
|
-
version: "beta",
|
|
43
|
-
condition: {
|
|
44
|
-
broadcaster_user_id: userId,
|
|
45
|
-
moderator_user_id: userId,
|
|
46
|
-
},
|
|
47
|
-
}
|
|
48
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { type BaseSubscription } from "../events-helpers.js"
|
|
2
|
-
|
|
3
|
-
type ChannelGuestStarSettingsUpdateType = "channel.guest_star_settings.update"
|
|
4
|
-
type ChannelGuestStarSettingsUpdateVersion = "beta"
|
|
5
|
-
|
|
6
|
-
/** The parameters under which an event fires when The broadcaster updates preferences for Guest Star. */
|
|
7
|
-
export interface ChannelGuestStarSettingsUpdateCondition {
|
|
8
|
-
/** The user ID of the broadcaster. */
|
|
9
|
-
broadcaster_user_id: string
|
|
10
|
-
/** The user ID of the moderator or broadcaster. */
|
|
11
|
-
moderator_user_id: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/** The event information when The broadcaster updates preferences for Guest Star. */
|
|
15
|
-
export interface ChannelGuestStarSettingsUpdateEvent {
|
|
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
|
-
/** Flag determining if Guest Star moderators have access to control whether a guest is live once assigned to a slot. */
|
|
23
|
-
is_moderator_send_live_enabled: boolean
|
|
24
|
-
/** Integer. Number of slots the Guest Star call interface will allow the host to add to a call. */
|
|
25
|
-
slot_count: number
|
|
26
|
-
/** Flag determining if browser sources subscribed to sessions on this channel should output audio. */
|
|
27
|
-
is_browser_source_audio_enabled: boolean
|
|
28
|
-
/** 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:\n - tiled — All live guests are tiled within the browser source with the same size.\n - 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.\n - horizontal_top — Indicates the group layout will contain all participants in a top-aligned horizontal stack.\n - horizontal_bottom — Indicates the group layout will contain all participants in a bottom-aligned horizontal stack.\n - vertical_left — Indicates the group layout will contain all participants in a left-aligned vertical stack.\n - vertical_right — Indicates the group layout will contain all participants in a right-aligned vertical stack. */
|
|
29
|
-
group_layout: string
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/** The event notification received when The broadcaster updates preferences for Guest Star. */
|
|
33
|
-
export type ChannelGuestStarSettingsUpdateSubscription = BaseSubscription<
|
|
34
|
-
ChannelGuestStarSettingsUpdateType,
|
|
35
|
-
ChannelGuestStarSettingsUpdateVersion,
|
|
36
|
-
ChannelGuestStarSettingsUpdateCondition
|
|
37
|
-
>
|
|
38
|
-
|
|
39
|
-
export function makeChannelGuestStarSettingsUpdateSubscription(
|
|
40
|
-
userId: string,
|
|
41
|
-
): ChannelGuestStarSettingsUpdateSubscription {
|
|
42
|
-
return {
|
|
43
|
-
type: "channel.guest_star_settings.update",
|
|
44
|
-
version: "beta",
|
|
45
|
-
condition: {
|
|
46
|
-
broadcaster_user_id: userId,
|
|
47
|
-
moderator_user_id: userId,
|
|
48
|
-
},
|
|
49
|
-
}
|
|
50
|
-
}
|