@yuniruyuni/n8n-nodes-twitch 0.1.1
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/LICENSE.md +19 -0
- package/README.ja.md +243 -0
- package/README.md +243 -0
- package/dist/credentials/TwitchApi.credentials.d.ts +10 -0
- package/dist/credentials/TwitchApi.credentials.js +47 -0
- package/dist/credentials/TwitchApi.credentials.js.map +1 -0
- package/dist/credentials/TwitchOAuth2Api.credentials.d.ts +10 -0
- package/dist/credentials/TwitchOAuth2Api.credentials.js +434 -0
- package/dist/credentials/TwitchOAuth2Api.credentials.js.map +1 -0
- package/dist/icons/twitch.dark.svg +1 -0
- package/dist/icons/twitch.svg +1 -0
- package/dist/nodes/TwitchAnnouncements/TwitchAnnouncements.node.d.ts +4 -0
- package/dist/nodes/TwitchAnnouncements/TwitchAnnouncements.node.js +196 -0
- package/dist/nodes/TwitchAnnouncements/TwitchAnnouncements.node.js.map +1 -0
- package/dist/nodes/TwitchAnnouncements/twitch.dark.svg +1 -0
- package/dist/nodes/TwitchAnnouncements/twitch.svg +1 -0
- package/dist/nodes/TwitchBans/TwitchBans.node.d.ts +4 -0
- package/dist/nodes/TwitchBans/TwitchBans.node.js +354 -0
- package/dist/nodes/TwitchBans/TwitchBans.node.js.map +1 -0
- package/dist/nodes/TwitchBans/twitch.dark.svg +1 -0
- package/dist/nodes/TwitchBans/twitch.svg +1 -0
- package/dist/nodes/TwitchBitsLeaderboard/TwitchBitsLeaderboard.node.d.ts +4 -0
- package/dist/nodes/TwitchBitsLeaderboard/TwitchBitsLeaderboard.node.js +202 -0
- package/dist/nodes/TwitchBitsLeaderboard/TwitchBitsLeaderboard.node.js.map +1 -0
- package/dist/nodes/TwitchBitsLeaderboard/twitch.dark.svg +1 -0
- package/dist/nodes/TwitchBitsLeaderboard/twitch.svg +1 -0
- package/dist/nodes/TwitchChannels/TwitchChannels.node.d.ts +4 -0
- package/dist/nodes/TwitchChannels/TwitchChannels.node.js +124 -0
- package/dist/nodes/TwitchChannels/TwitchChannels.node.js.map +1 -0
- package/dist/nodes/TwitchChannels/twitch.dark.svg +1 -0
- package/dist/nodes/TwitchChannels/twitch.svg +1 -0
- package/dist/nodes/TwitchChatMessages/TwitchChatMessages.node.d.ts +4 -0
- package/dist/nodes/TwitchChatMessages/TwitchChatMessages.node.js +160 -0
- package/dist/nodes/TwitchChatMessages/TwitchChatMessages.node.js.map +1 -0
- package/dist/nodes/TwitchChatMessages/twitch.dark.svg +1 -0
- package/dist/nodes/TwitchChatMessages/twitch.svg +1 -0
- package/dist/nodes/TwitchChatters/TwitchChatters.node.d.ts +4 -0
- package/dist/nodes/TwitchChatters/TwitchChatters.node.js +148 -0
- package/dist/nodes/TwitchChatters/TwitchChatters.node.js.map +1 -0
- package/dist/nodes/TwitchChatters/twitch.dark.svg +1 -0
- package/dist/nodes/TwitchChatters/twitch.svg +1 -0
- package/dist/nodes/TwitchCheermotes/TwitchCheermotes.node.d.ts +4 -0
- package/dist/nodes/TwitchCheermotes/TwitchCheermotes.node.js +113 -0
- package/dist/nodes/TwitchCheermotes/TwitchCheermotes.node.js.map +1 -0
- package/dist/nodes/TwitchCheermotes/twitch.dark.svg +1 -0
- package/dist/nodes/TwitchCheermotes/twitch.svg +1 -0
- package/dist/nodes/TwitchClips/TwitchClips.node.d.ts +4 -0
- package/dist/nodes/TwitchClips/TwitchClips.node.js +308 -0
- package/dist/nodes/TwitchClips/TwitchClips.node.js.map +1 -0
- package/dist/nodes/TwitchClips/twitch.dark.svg +1 -0
- package/dist/nodes/TwitchClips/twitch.svg +1 -0
- package/dist/nodes/TwitchCustomRewards/TwitchCustomRewards.node.d.ts +4 -0
- package/dist/nodes/TwitchCustomRewards/TwitchCustomRewards.node.js +606 -0
- package/dist/nodes/TwitchCustomRewards/TwitchCustomRewards.node.js.map +1 -0
- package/dist/nodes/TwitchCustomRewards/twitch.dark.svg +1 -0
- package/dist/nodes/TwitchCustomRewards/twitch.svg +1 -0
- package/dist/nodes/TwitchEmotes/TwitchEmotes.node.d.ts +4 -0
- package/dist/nodes/TwitchEmotes/TwitchEmotes.node.js +125 -0
- package/dist/nodes/TwitchEmotes/TwitchEmotes.node.js.map +1 -0
- package/dist/nodes/TwitchEmotes/twitch.dark.svg +1 -0
- package/dist/nodes/TwitchEmotes/twitch.svg +1 -0
- package/dist/nodes/TwitchGames/TwitchGames.node.d.ts +4 -0
- package/dist/nodes/TwitchGames/TwitchGames.node.js +260 -0
- package/dist/nodes/TwitchGames/TwitchGames.node.js.map +1 -0
- package/dist/nodes/TwitchGames/twitch.dark.svg +1 -0
- package/dist/nodes/TwitchGames/twitch.svg +1 -0
- package/dist/nodes/TwitchModerators/TwitchModerators.node.d.ts +4 -0
- package/dist/nodes/TwitchModerators/TwitchModerators.node.js +310 -0
- package/dist/nodes/TwitchModerators/TwitchModerators.node.js.map +1 -0
- package/dist/nodes/TwitchModerators/twitch.dark.svg +1 -0
- package/dist/nodes/TwitchModerators/twitch.svg +1 -0
- package/dist/nodes/TwitchPolls/TwitchPolls.node.d.ts +4 -0
- package/dist/nodes/TwitchPolls/TwitchPolls.node.js +452 -0
- package/dist/nodes/TwitchPolls/TwitchPolls.node.js.map +1 -0
- package/dist/nodes/TwitchPolls/twitch.dark.svg +1 -0
- package/dist/nodes/TwitchPolls/twitch.svg +1 -0
- package/dist/nodes/TwitchPredictions/TwitchPredictions.node.d.ts +4 -0
- package/dist/nodes/TwitchPredictions/TwitchPredictions.node.js +408 -0
- package/dist/nodes/TwitchPredictions/TwitchPredictions.node.js.map +1 -0
- package/dist/nodes/TwitchPredictions/twitch.dark.svg +1 -0
- package/dist/nodes/TwitchPredictions/twitch.svg +1 -0
- package/dist/nodes/TwitchRaids/TwitchRaids.node.d.ts +4 -0
- package/dist/nodes/TwitchRaids/TwitchRaids.node.js +192 -0
- package/dist/nodes/TwitchRaids/TwitchRaids.node.js.map +1 -0
- package/dist/nodes/TwitchRaids/twitch.dark.svg +1 -0
- package/dist/nodes/TwitchRaids/twitch.svg +1 -0
- package/dist/nodes/TwitchRedemptions/TwitchRedemptions.node.d.ts +4 -0
- package/dist/nodes/TwitchRedemptions/TwitchRedemptions.node.js +301 -0
- package/dist/nodes/TwitchRedemptions/TwitchRedemptions.node.js.map +1 -0
- package/dist/nodes/TwitchRedemptions/twitch.dark.svg +1 -0
- package/dist/nodes/TwitchRedemptions/twitch.svg +1 -0
- package/dist/nodes/TwitchSchedule/TwitchSchedule.node.d.ts +4 -0
- package/dist/nodes/TwitchSchedule/TwitchSchedule.node.js +457 -0
- package/dist/nodes/TwitchSchedule/TwitchSchedule.node.js.map +1 -0
- package/dist/nodes/TwitchSchedule/twitch.dark.svg +1 -0
- package/dist/nodes/TwitchSchedule/twitch.svg +1 -0
- package/dist/nodes/TwitchSearch/TwitchSearch.node.d.ts +4 -0
- package/dist/nodes/TwitchSearch/TwitchSearch.node.js +164 -0
- package/dist/nodes/TwitchSearch/TwitchSearch.node.js.map +1 -0
- package/dist/nodes/TwitchSearch/twitch.dark.svg +1 -0
- package/dist/nodes/TwitchSearch/twitch.svg +1 -0
- package/dist/nodes/TwitchStreams/TwitchStreams.node.d.ts +4 -0
- package/dist/nodes/TwitchStreams/TwitchStreams.node.js +124 -0
- package/dist/nodes/TwitchStreams/TwitchStreams.node.js.map +1 -0
- package/dist/nodes/TwitchStreams/twitch.dark.svg +1 -0
- package/dist/nodes/TwitchStreams/twitch.svg +1 -0
- package/dist/nodes/TwitchSubscriptions/TwitchSubscriptions.node.d.ts +4 -0
- package/dist/nodes/TwitchSubscriptions/TwitchSubscriptions.node.js +232 -0
- package/dist/nodes/TwitchSubscriptions/TwitchSubscriptions.node.js.map +1 -0
- package/dist/nodes/TwitchSubscriptions/twitch.dark.svg +1 -0
- package/dist/nodes/TwitchSubscriptions/twitch.svg +1 -0
- package/dist/nodes/TwitchTeams/TwitchTeams.node.d.ts +4 -0
- package/dist/nodes/TwitchTeams/TwitchTeams.node.js +219 -0
- package/dist/nodes/TwitchTeams/TwitchTeams.node.js.map +1 -0
- package/dist/nodes/TwitchTeams/twitch.dark.svg +1 -0
- package/dist/nodes/TwitchTeams/twitch.svg +1 -0
- package/dist/nodes/TwitchTrigger/TwitchTrigger.node.d.ts +12 -0
- package/dist/nodes/TwitchTrigger/TwitchTrigger.node.js +418 -0
- package/dist/nodes/TwitchTrigger/TwitchTrigger.node.js.map +1 -0
- package/dist/nodes/TwitchTrigger/twitch.dark.svg +1 -0
- package/dist/nodes/TwitchTrigger/twitch.svg +1 -0
- package/dist/nodes/TwitchUsers/TwitchUsers.node.d.ts +4 -0
- package/dist/nodes/TwitchUsers/TwitchUsers.node.js +124 -0
- package/dist/nodes/TwitchUsers/TwitchUsers.node.js.map +1 -0
- package/dist/nodes/TwitchUsers/twitch.dark.svg +1 -0
- package/dist/nodes/TwitchUsers/twitch.svg +1 -0
- package/dist/nodes/TwitchVideos/TwitchVideos.node.d.ts +4 -0
- package/dist/nodes/TwitchVideos/TwitchVideos.node.js +371 -0
- package/dist/nodes/TwitchVideos/TwitchVideos.node.js.map +1 -0
- package/dist/nodes/TwitchVideos/twitch.dark.svg +1 -0
- package/dist/nodes/TwitchVideos/twitch.svg +1 -0
- package/dist/nodes/TwitchWhispers/TwitchWhispers.node.d.ts +4 -0
- package/dist/nodes/TwitchWhispers/TwitchWhispers.node.js +105 -0
- package/dist/nodes/TwitchWhispers/TwitchWhispers.node.js.map +1 -0
- package/dist/nodes/TwitchWhispers/twitch.dark.svg +1 -0
- package/dist/nodes/TwitchWhispers/twitch.svg +1 -0
- package/dist/package.json +86 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +86 -0
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TwitchOAuth2Api = void 0;
|
|
4
|
+
class TwitchOAuth2Api {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'twitchOAuth2Api';
|
|
7
|
+
this.extends = ['oAuth2Api'];
|
|
8
|
+
this.displayName = 'Twitch OAuth2 API';
|
|
9
|
+
this.icon = { light: 'file:../icons/twitch.svg', dark: 'file:../icons/twitch.dark.svg' };
|
|
10
|
+
this.documentationUrl = 'https://dev.twitch.tv/docs/authentication/getting-tokens-oauth/';
|
|
11
|
+
this.properties = [
|
|
12
|
+
{
|
|
13
|
+
displayName: 'Grant Type',
|
|
14
|
+
name: 'grantType',
|
|
15
|
+
type: 'hidden',
|
|
16
|
+
default: 'authorizationCode',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
displayName: 'Authorization URL',
|
|
20
|
+
name: 'authUrl',
|
|
21
|
+
type: 'hidden',
|
|
22
|
+
default: 'https://id.twitch.tv/oauth2/authorize',
|
|
23
|
+
required: true,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
displayName: 'Access Token URL',
|
|
27
|
+
name: 'accessTokenUrl',
|
|
28
|
+
type: 'hidden',
|
|
29
|
+
default: 'https://id.twitch.tv/oauth2/token',
|
|
30
|
+
required: true,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
displayName: 'Scope',
|
|
34
|
+
name: 'scope',
|
|
35
|
+
type: 'multiOptions',
|
|
36
|
+
default: ['user:read:email'],
|
|
37
|
+
description: 'Select the Twitch scopes required for your application. See <a href="https://dev.twitch.tv/docs/authentication/scopes/" target="_blank">Twitch Scopes</a> for details.',
|
|
38
|
+
options: [
|
|
39
|
+
{
|
|
40
|
+
name: 'View Analytics',
|
|
41
|
+
value: 'analytics:read:extensions',
|
|
42
|
+
description: 'View analytics data for the Twitch Extensions owned by the authenticated account',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'View Game Analytics',
|
|
46
|
+
value: 'analytics:read:games',
|
|
47
|
+
description: 'View analytics data for the games owned by the authenticated account',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: 'Read Bits',
|
|
51
|
+
value: 'bits:read',
|
|
52
|
+
description: 'View Bits information for a channel',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'Channel Bot',
|
|
56
|
+
value: 'channel:bot',
|
|
57
|
+
description: 'Perform bot actions in a channel',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'Manage Ads',
|
|
61
|
+
value: 'channel:manage:ads',
|
|
62
|
+
description: 'Manage ads schedule on a channel',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: 'Read Ads',
|
|
66
|
+
value: 'channel:read:ads',
|
|
67
|
+
description: 'Read the ads schedule and details on your channel',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'Manage Broadcast',
|
|
71
|
+
value: 'channel:manage:broadcast',
|
|
72
|
+
description: 'Manage a channel\'s broadcast configuration, including updating channel configuration and managing stream markers and stream tags',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: 'Read Charity Campaign',
|
|
76
|
+
value: 'channel:read:charity',
|
|
77
|
+
description: 'Read charity campaign details and user donations on your channel',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: 'Manage Clips',
|
|
81
|
+
value: 'channel:manage:clips',
|
|
82
|
+
description: 'Manage Clips for a channel',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: 'Edit Commercial',
|
|
86
|
+
value: 'channel:edit:commercial',
|
|
87
|
+
description: 'Run commercials on a channel',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'Read Editors',
|
|
91
|
+
value: 'channel:read:editors',
|
|
92
|
+
description: 'View a list of users with the editor role for a channel',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: 'Manage Extensions',
|
|
96
|
+
value: 'channel:manage:extensions',
|
|
97
|
+
description: 'Manage a channel\'s Extension configuration, including activating Extensions',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
name: 'Read Goals',
|
|
101
|
+
value: 'channel:read:goals',
|
|
102
|
+
description: 'View Creator Goals for a channel',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: 'Read Guest Star',
|
|
106
|
+
value: 'channel:read:guest_star',
|
|
107
|
+
description: 'Read Guest Star details for your channel',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: 'Manage Guest Star',
|
|
111
|
+
value: 'channel:manage:guest_star',
|
|
112
|
+
description: 'Manage Guest Star for your channel',
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: 'Read Hype Train',
|
|
116
|
+
value: 'channel:read:hype_train',
|
|
117
|
+
description: 'View Hype Train information for a channel',
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: 'Moderate Channel',
|
|
121
|
+
value: 'channel:moderate',
|
|
122
|
+
description: 'Perform moderation actions in a channel',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: 'Manage Moderators',
|
|
126
|
+
value: 'channel:manage:moderators',
|
|
127
|
+
description: 'Add or remove the moderator role from users in your channel',
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: 'Read Polls',
|
|
131
|
+
value: 'channel:read:polls',
|
|
132
|
+
description: 'View a channel\'s polls',
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: 'Manage Polls',
|
|
136
|
+
value: 'channel:manage:polls',
|
|
137
|
+
description: 'Manage a channel\'s polls',
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: 'Read Predictions',
|
|
141
|
+
value: 'channel:read:predictions',
|
|
142
|
+
description: 'View a channel\'s Channel Points Predictions',
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
name: 'Manage Predictions',
|
|
146
|
+
value: 'channel:manage:predictions',
|
|
147
|
+
description: 'Manage a channel\'s Channel Points Predictions',
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
name: 'Manage Raids',
|
|
151
|
+
value: 'channel:manage:raids',
|
|
152
|
+
description: 'Manage a channel raiding another channel',
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
name: 'Read Redemptions',
|
|
156
|
+
value: 'channel:read:redemptions',
|
|
157
|
+
description: 'View Channel Points custom rewards and their redemptions on a channel',
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
name: 'Manage Redemptions',
|
|
161
|
+
value: 'channel:manage:redemptions',
|
|
162
|
+
description: 'Manage Channel Points custom rewards and their redemptions on a channel',
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
name: 'Manage Schedule',
|
|
166
|
+
value: 'channel:manage:schedule',
|
|
167
|
+
description: 'Manage a channel\'s stream schedule',
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: 'Read Stream Key',
|
|
171
|
+
value: 'channel:read:stream_key',
|
|
172
|
+
description: 'View an authorized user\'s stream key',
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
name: 'Read Subscriptions',
|
|
176
|
+
value: 'channel:read:subscriptions',
|
|
177
|
+
description: 'View a list of all subscribers to a channel and check if a user is subscribed to a channel',
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: 'Manage Videos',
|
|
181
|
+
value: 'channel:manage:videos',
|
|
182
|
+
description: 'Manage a channel\'s videos, including deleting videos',
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
name: 'Read VIPs',
|
|
186
|
+
value: 'channel:read:vips',
|
|
187
|
+
description: 'View a list of users with the VIP role in a channel',
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
name: 'Manage VIPs',
|
|
191
|
+
value: 'channel:manage:vips',
|
|
192
|
+
description: 'Add or remove the VIP role from users in your channel',
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
name: 'Manage Announcements',
|
|
196
|
+
value: 'moderator:manage:announcements',
|
|
197
|
+
description: 'Send announcements in channels where you have the moderator role',
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
name: 'Manage AutoMod',
|
|
201
|
+
value: 'moderator:manage:automod',
|
|
202
|
+
description: 'Manage messages held for review by AutoMod in channels where you are a moderator',
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
name: 'Read AutoMod Settings',
|
|
206
|
+
value: 'moderator:read:automod_settings',
|
|
207
|
+
description: 'View a broadcaster\'s AutoMod settings',
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
name: 'Manage AutoMod Settings',
|
|
211
|
+
value: 'moderator:manage:automod_settings',
|
|
212
|
+
description: 'Manage a broadcaster\'s AutoMod settings',
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
name: 'Read Banned Users',
|
|
216
|
+
value: 'moderator:read:banned_users',
|
|
217
|
+
description: 'View a broadcaster\'s list of banned users',
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
name: 'Manage Banned Users',
|
|
221
|
+
value: 'moderator:manage:banned_users',
|
|
222
|
+
description: 'Ban and unban users',
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
name: 'Read Blocked Terms',
|
|
226
|
+
value: 'moderator:read:blocked_terms',
|
|
227
|
+
description: 'View a broadcaster\'s list of blocked terms',
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
name: 'Manage Blocked Terms',
|
|
231
|
+
value: 'moderator:manage:blocked_terms',
|
|
232
|
+
description: 'Manage a broadcaster\'s list of blocked terms',
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
name: 'Read Chat Messages',
|
|
236
|
+
value: 'moderator:read:chat_messages',
|
|
237
|
+
description: 'View chat messages in channels where you have the moderator role',
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
name: 'Manage Chat Messages',
|
|
241
|
+
value: 'moderator:manage:chat_messages',
|
|
242
|
+
description: 'Delete chat messages in channels where you have the moderator role',
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
name: 'Read Chat Settings',
|
|
246
|
+
value: 'moderator:read:chat_settings',
|
|
247
|
+
description: 'View a broadcaster\'s chat room settings',
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
name: 'Manage Chat Settings',
|
|
251
|
+
value: 'moderator:manage:chat_settings',
|
|
252
|
+
description: 'Manage a broadcaster\'s chat room settings',
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
name: 'Read Chatters',
|
|
256
|
+
value: 'moderator:read:chatters',
|
|
257
|
+
description: 'View the chatters in a broadcaster\'s chat room',
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
name: 'Read Followers',
|
|
261
|
+
value: 'moderator:read:followers',
|
|
262
|
+
description: 'View a broadcaster\'s followers',
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
name: 'Read Shield Mode',
|
|
266
|
+
value: 'moderator:read:shield_mode',
|
|
267
|
+
description: 'View a broadcaster\'s Shield Mode status',
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
name: 'Manage Shield Mode',
|
|
271
|
+
value: 'moderator:manage:shield_mode',
|
|
272
|
+
description: 'Manage a broadcaster\'s Shield Mode status',
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
name: 'Read Shoutouts',
|
|
276
|
+
value: 'moderator:read:shoutouts',
|
|
277
|
+
description: 'View a broadcaster\'s shoutouts',
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
name: 'Manage Shoutouts',
|
|
281
|
+
value: 'moderator:manage:shoutouts',
|
|
282
|
+
description: 'Manage a broadcaster\'s shoutouts',
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
name: 'Read Unban Requests',
|
|
286
|
+
value: 'moderator:read:unban_requests',
|
|
287
|
+
description: 'View a broadcaster\'s unban requests',
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
name: 'Manage Unban Requests',
|
|
291
|
+
value: 'moderator:manage:unban_requests',
|
|
292
|
+
description: 'Manage a broadcaster\'s unban requests',
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
name: 'Read Warnings',
|
|
296
|
+
value: 'moderator:read:warnings',
|
|
297
|
+
description: 'View warnings in channels where you have the moderator role',
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
name: 'Manage Warnings',
|
|
301
|
+
value: 'moderator:manage:warnings',
|
|
302
|
+
description: 'Warn users in channels where you have the moderator role',
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
name: 'Edit Clips',
|
|
306
|
+
value: 'clips:edit',
|
|
307
|
+
description: 'Manage Clips for a channel',
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
name: 'Manage Clips (Editor)',
|
|
311
|
+
value: 'editor:manage:clips',
|
|
312
|
+
description: 'Manage Clips for a channel using editor role',
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
name: 'Read Moderated Channels',
|
|
316
|
+
value: 'moderation:read',
|
|
317
|
+
description: 'View channels that the user has moderator privileges in',
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
name: 'User Bot',
|
|
321
|
+
value: 'user:bot',
|
|
322
|
+
description: 'Perform bot actions as a user',
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
name: 'Manage Blocked Users',
|
|
326
|
+
value: 'user:manage:blocked_users',
|
|
327
|
+
description: 'Manage the list of blocked users',
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
name: 'Read Blocked Users',
|
|
331
|
+
value: 'user:read:blocked_users',
|
|
332
|
+
description: 'View the list of blocked users',
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
name: 'Read Broadcast',
|
|
336
|
+
value: 'user:read:broadcast',
|
|
337
|
+
description: 'View a user\'s broadcasting configuration, including Extension configurations',
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
name: 'Read Chat',
|
|
341
|
+
value: 'user:read:chat',
|
|
342
|
+
description: 'View live chat messages sent in your channel using EventSub',
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
name: 'Manage Chat Color',
|
|
346
|
+
value: 'user:manage:chat_color',
|
|
347
|
+
description: 'Update the color used for the user\'s name in chat',
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
name: 'Read Email',
|
|
351
|
+
value: 'user:read:email',
|
|
352
|
+
description: 'View a user\'s email address',
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
name: 'Read Emotes',
|
|
356
|
+
value: 'user:read:emotes',
|
|
357
|
+
description: 'View emotes available to a user',
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
name: 'Read Follows',
|
|
361
|
+
value: 'user:read:follows',
|
|
362
|
+
description: 'View the list of channels a user follows',
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
name: 'Read Moderated Channels',
|
|
366
|
+
value: 'user:read:moderated_channels',
|
|
367
|
+
description: 'View channels that the user has moderator privileges in',
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
name: 'Read Subscriptions',
|
|
371
|
+
value: 'user:read:subscriptions',
|
|
372
|
+
description: 'View if an authorized user is subscribed to specific channels',
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
name: 'Read Whispers',
|
|
376
|
+
value: 'user:read:whispers',
|
|
377
|
+
description: 'View whispers sent to a user',
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
name: 'Manage Whispers',
|
|
381
|
+
value: 'user:manage:whispers',
|
|
382
|
+
description: 'Send whispers on behalf of a user',
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
name: 'Write Chat',
|
|
386
|
+
value: 'user:write:chat',
|
|
387
|
+
description: 'Send live chat messages using IRC or the Twitch API',
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
name: 'Read Chat (IRC)',
|
|
391
|
+
value: 'chat:read',
|
|
392
|
+
description: 'View chat messages sent in a chatroom using an IRC connection',
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
name: 'Edit Chat (IRC)',
|
|
396
|
+
value: 'chat:edit',
|
|
397
|
+
description: 'Send chat messages to a chatroom using an IRC connection',
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
name: 'Read Whispers (PubSub)',
|
|
401
|
+
value: 'whispers:read',
|
|
402
|
+
description: 'Receive whisper messages for your user using PubSub',
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
name: 'Edit Whispers (PubSub)',
|
|
406
|
+
value: 'whispers:edit',
|
|
407
|
+
description: 'Send whisper messages using PubSub',
|
|
408
|
+
},
|
|
409
|
+
],
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
displayName: 'Auth URI Query Parameters',
|
|
413
|
+
name: 'authQueryParameters',
|
|
414
|
+
type: 'hidden',
|
|
415
|
+
default: 'force_verify=false',
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
displayName: 'Authentication',
|
|
419
|
+
name: 'authentication',
|
|
420
|
+
type: 'hidden',
|
|
421
|
+
default: 'body',
|
|
422
|
+
},
|
|
423
|
+
];
|
|
424
|
+
}
|
|
425
|
+
async preAuthentication(credentials) {
|
|
426
|
+
const result = { ...credentials };
|
|
427
|
+
if (Array.isArray(result.scope)) {
|
|
428
|
+
result.scope = result.scope.join(' ');
|
|
429
|
+
}
|
|
430
|
+
return result;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
exports.TwitchOAuth2Api = TwitchOAuth2Api;
|
|
434
|
+
//# sourceMappingURL=TwitchOAuth2Api.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TwitchOAuth2Api.credentials.js","sourceRoot":"","sources":["../../credentials/TwitchOAuth2Api.credentials.ts"],"names":[],"mappings":";;;AASA,MAAa,eAAe;IAA5B;QACC,SAAI,GAAG,iBAAiB,CAAC;QAEzB,YAAO,GAAG,CAAC,WAAW,CAAC,CAAC;QAExB,gBAAW,GAAG,mBAAmB,CAAC;QAElC,SAAI,GAAS,EAAE,KAAK,EAAE,0BAA0B,EAAE,IAAI,EAAE,+BAA+B,EAAE,CAAC;QAE1F,qBAAgB,GAAG,iEAAiE,CAAC;QAErF,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAA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0DAA0D;qBACvE;oBAED;wBACC,IAAI,EAAE,wBAAwB;wBAC9B,KAAK,EAAE,eAAe;wBACtB,WAAW,EAAE,qDAAqD;qBAClE;oBACD;wBACC,IAAI,EAAE,wBAAwB;wBAC9B,KAAK,EAAE,eAAe;wBACtB,WAAW,EAAE,oCAAoC;qBACjD;iBACD;aACD;YACD;gBACC,WAAW,EAAE,2BAA2B;gBACxC,IAAI,EAAE,qBAAqB;gBAC3B,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,oBAAoB;aAC7B;YACD;gBACC,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,MAAM;aACf;SACD,CAAC;IAaH,CAAC;IAXA,KAAK,CAAC,iBAAiB,CAEtB,WAA2C;QAG3C,MAAM,MAAM,GAAG,EAAE,GAAG,WAAW,EAAE,CAAC;QAClC,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;YACjC,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACvC,CAAC;QACD,OAAO,MAAM,CAAC;IACf,CAAC;CACD;AA7bD,0CA6bC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Twitch</title><path fill="#FFFFFF" d="M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0L1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143l-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Twitch</title><path d="M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0L1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143l-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714Z"/></svg>
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TwitchAnnouncements = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
class TwitchAnnouncements {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.description = {
|
|
8
|
+
displayName: 'Twitch Announcements',
|
|
9
|
+
name: 'twitchAnnouncements',
|
|
10
|
+
icon: { light: 'file:twitch.svg', dark: 'file:twitch.dark.svg' },
|
|
11
|
+
group: ['output'],
|
|
12
|
+
version: 1,
|
|
13
|
+
subtitle: '={{$parameter["operation"]}}',
|
|
14
|
+
description: 'Send announcements in a Twitch channel',
|
|
15
|
+
defaults: {
|
|
16
|
+
name: 'Twitch Announcements',
|
|
17
|
+
},
|
|
18
|
+
usableAsTool: true,
|
|
19
|
+
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
20
|
+
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
21
|
+
credentials: [
|
|
22
|
+
{
|
|
23
|
+
name: 'twitchApi',
|
|
24
|
+
required: true,
|
|
25
|
+
displayOptions: {
|
|
26
|
+
show: {
|
|
27
|
+
authentication: ['clientCredentials'],
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: 'twitchOAuth2Api',
|
|
33
|
+
required: true,
|
|
34
|
+
displayOptions: {
|
|
35
|
+
show: {
|
|
36
|
+
authentication: ['oAuth2'],
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
requestDefaults: {
|
|
42
|
+
baseURL: 'https://api.twitch.tv/helix',
|
|
43
|
+
headers: {
|
|
44
|
+
Accept: 'application/json',
|
|
45
|
+
'Content-Type': 'application/json',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
properties: [
|
|
49
|
+
{
|
|
50
|
+
displayName: 'Authentication',
|
|
51
|
+
name: 'authentication',
|
|
52
|
+
type: 'options',
|
|
53
|
+
options: [
|
|
54
|
+
{
|
|
55
|
+
name: 'Client Credentials',
|
|
56
|
+
value: 'clientCredentials',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'OAuth2',
|
|
60
|
+
value: 'oAuth2',
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
default: 'oAuth2',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
displayName: 'Operation',
|
|
67
|
+
name: 'operation',
|
|
68
|
+
type: 'options',
|
|
69
|
+
noDataExpression: true,
|
|
70
|
+
options: [
|
|
71
|
+
{
|
|
72
|
+
name: 'Send',
|
|
73
|
+
value: 'send',
|
|
74
|
+
action: 'Send an announcement',
|
|
75
|
+
description: 'Send an announcement to the broadcaster\'s chat room',
|
|
76
|
+
routing: {
|
|
77
|
+
request: {
|
|
78
|
+
method: 'POST',
|
|
79
|
+
url: '/chat/announcements',
|
|
80
|
+
},
|
|
81
|
+
send: {
|
|
82
|
+
preSend: [
|
|
83
|
+
async function (requestOptions) {
|
|
84
|
+
const broadcasterId = this.getNodeParameter('broadcasterId');
|
|
85
|
+
const moderatorId = this.getNodeParameter('moderatorId');
|
|
86
|
+
const message = this.getNodeParameter('message');
|
|
87
|
+
const color = this.getNodeParameter('color', 'primary');
|
|
88
|
+
requestOptions.qs = {
|
|
89
|
+
broadcaster_id: broadcasterId,
|
|
90
|
+
moderator_id: moderatorId,
|
|
91
|
+
};
|
|
92
|
+
requestOptions.body = {
|
|
93
|
+
message,
|
|
94
|
+
color,
|
|
95
|
+
};
|
|
96
|
+
return requestOptions;
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
},
|
|
100
|
+
output: {
|
|
101
|
+
postReceive: [
|
|
102
|
+
{
|
|
103
|
+
type: 'rootProperty',
|
|
104
|
+
properties: {
|
|
105
|
+
property: 'data',
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
],
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
],
|
|
113
|
+
default: 'send',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
displayName: 'Broadcaster ID',
|
|
117
|
+
name: 'broadcasterId',
|
|
118
|
+
type: 'string',
|
|
119
|
+
displayOptions: {
|
|
120
|
+
show: {
|
|
121
|
+
operation: ['send'],
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
default: '',
|
|
125
|
+
required: true,
|
|
126
|
+
placeholder: 'e.g. 123456789',
|
|
127
|
+
description: 'The ID of the broadcaster whose chat room you want to send the announcement to',
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
displayName: 'Moderator ID',
|
|
131
|
+
name: 'moderatorId',
|
|
132
|
+
type: 'string',
|
|
133
|
+
displayOptions: {
|
|
134
|
+
show: {
|
|
135
|
+
operation: ['send'],
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
default: '',
|
|
139
|
+
required: true,
|
|
140
|
+
placeholder: 'e.g. 987654321',
|
|
141
|
+
description: 'The ID of the moderator sending the announcement (must match the user access token)',
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
displayName: 'Message',
|
|
145
|
+
name: 'message',
|
|
146
|
+
type: 'string',
|
|
147
|
+
displayOptions: {
|
|
148
|
+
show: {
|
|
149
|
+
operation: ['send'],
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
default: '',
|
|
153
|
+
required: true,
|
|
154
|
+
placeholder: 'e.g. Important announcement!',
|
|
155
|
+
description: 'The announcement message (max 500 characters)',
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
displayName: 'Color',
|
|
159
|
+
name: 'color',
|
|
160
|
+
type: 'options',
|
|
161
|
+
displayOptions: {
|
|
162
|
+
show: {
|
|
163
|
+
operation: ['send'],
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
options: [
|
|
167
|
+
{
|
|
168
|
+
name: 'Blue',
|
|
169
|
+
value: 'blue',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: 'Green',
|
|
173
|
+
value: 'green',
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name: 'Orange',
|
|
177
|
+
value: 'orange',
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: 'Primary',
|
|
181
|
+
value: 'primary',
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
name: 'Purple',
|
|
185
|
+
value: 'purple',
|
|
186
|
+
},
|
|
187
|
+
],
|
|
188
|
+
default: 'primary',
|
|
189
|
+
description: 'The color of the announcement',
|
|
190
|
+
},
|
|
191
|
+
],
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
exports.TwitchAnnouncements = TwitchAnnouncements;
|
|
196
|
+
//# sourceMappingURL=TwitchAnnouncements.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TwitchAnnouncements.node.js","sourceRoot":"","sources":["../../../nodes/TwitchAnnouncements/TwitchAnnouncements.node.ts"],"names":[],"mappings":";;;AAAA,+CAA8F;AAE9F,MAAa,mBAAmB;IAAhC;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,sBAAsB;YACnC,IAAI,EAAE,qBAAqB;YAC3B,IAAI,EAAE,EAAE,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,sBAAsB,EAAE;YAChE,KAAK,EAAE,CAAC,QAAQ,CAAC;YACjB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8BAA8B;YACxC,WAAW,EAAE,wCAAwC;YACrD,QAAQ,EAAE;gBACT,IAAI,EAAE,sBAAsB;aAC5B;YACD,YAAY,EAAE,IAAI;YAClB,MAAM,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YAClC,OAAO,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