@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,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
|
-
}
|
|
@@ -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
|
-
}
|