@yuniruyuni/n8n-nodes-twitch 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. package/dist/nodes/{TwitchBans/TwitchBans.node.d.ts → Twitch/Twitch.node.d.ts} +1 -1
  2. package/dist/nodes/Twitch/Twitch.node.js +147 -0
  3. package/dist/nodes/Twitch/Twitch.node.js.map +1 -0
  4. package/dist/nodes/Twitch/resources/Announcement.d.ts +3 -0
  5. package/dist/nodes/Twitch/resources/Announcement.js +116 -0
  6. package/dist/nodes/Twitch/resources/Announcement.js.map +1 -0
  7. package/dist/nodes/Twitch/resources/Ban.d.ts +3 -0
  8. package/dist/nodes/Twitch/resources/Ban.js +202 -0
  9. package/dist/nodes/Twitch/resources/Ban.js.map +1 -0
  10. package/dist/nodes/Twitch/resources/BitsLeaderboard.d.ts +3 -0
  11. package/dist/nodes/Twitch/resources/BitsLeaderboard.js +138 -0
  12. package/dist/nodes/Twitch/resources/BitsLeaderboard.js.map +1 -0
  13. package/dist/nodes/Twitch/resources/Channel.d.ts +3 -0
  14. package/dist/nodes/Twitch/resources/Channel.js +62 -0
  15. package/dist/nodes/Twitch/resources/Channel.js.map +1 -0
  16. package/dist/nodes/Twitch/resources/ChatMessage.d.ts +3 -0
  17. package/dist/nodes/Twitch/resources/ChatMessage.js +95 -0
  18. package/dist/nodes/Twitch/resources/ChatMessage.js.map +1 -0
  19. package/dist/nodes/Twitch/resources/Chatter.d.ts +3 -0
  20. package/dist/nodes/Twitch/resources/Chatter.js +61 -0
  21. package/dist/nodes/Twitch/resources/Chatter.js.map +1 -0
  22. package/dist/nodes/Twitch/resources/Cheermote.d.ts +3 -0
  23. package/dist/nodes/Twitch/resources/Cheermote.js +58 -0
  24. package/dist/nodes/Twitch/resources/Cheermote.js.map +1 -0
  25. package/dist/nodes/Twitch/resources/Clip.d.ts +3 -0
  26. package/dist/nodes/Twitch/resources/Clip.js +224 -0
  27. package/dist/nodes/Twitch/resources/Clip.js.map +1 -0
  28. package/dist/nodes/Twitch/resources/CommonFields.d.ts +2 -0
  29. package/dist/nodes/Twitch/resources/CommonFields.js +241 -0
  30. package/dist/nodes/Twitch/resources/CommonFields.js.map +1 -0
  31. package/dist/nodes/Twitch/resources/CustomReward.d.ts +3 -0
  32. package/dist/nodes/Twitch/resources/CustomReward.js +550 -0
  33. package/dist/nodes/Twitch/resources/CustomReward.js.map +1 -0
  34. package/dist/nodes/Twitch/resources/Emote.d.ts +3 -0
  35. package/dist/nodes/Twitch/resources/Emote.js +56 -0
  36. package/dist/nodes/Twitch/resources/Emote.js.map +1 -0
  37. package/dist/nodes/Twitch/resources/Game.d.ts +3 -0
  38. package/dist/nodes/Twitch/resources/Game.js +191 -0
  39. package/dist/nodes/Twitch/resources/Game.js.map +1 -0
  40. package/dist/nodes/Twitch/resources/Moderator.d.ts +3 -0
  41. package/dist/nodes/Twitch/resources/Moderator.js +175 -0
  42. package/dist/nodes/Twitch/resources/Moderator.js.map +1 -0
  43. package/dist/nodes/Twitch/resources/Poll.d.ts +3 -0
  44. package/dist/nodes/Twitch/resources/Poll.js +349 -0
  45. package/dist/nodes/Twitch/resources/Poll.js.map +1 -0
  46. package/dist/nodes/Twitch/resources/Prediction.d.ts +3 -0
  47. package/dist/nodes/Twitch/resources/Prediction.js +305 -0
  48. package/dist/nodes/Twitch/resources/Prediction.js.map +1 -0
  49. package/dist/nodes/Twitch/resources/Raid.d.ts +3 -0
  50. package/dist/nodes/Twitch/resources/Raid.js +146 -0
  51. package/dist/nodes/Twitch/resources/Raid.js.map +1 -0
  52. package/dist/nodes/Twitch/resources/Redemption.d.ts +3 -0
  53. package/dist/nodes/Twitch/resources/Redemption.js +235 -0
  54. package/dist/nodes/Twitch/resources/Redemption.js.map +1 -0
  55. package/dist/nodes/Twitch/resources/Schedule.d.ts +3 -0
  56. package/dist/nodes/Twitch/resources/Schedule.js +388 -0
  57. package/dist/nodes/Twitch/resources/Schedule.js.map +1 -0
  58. package/dist/nodes/Twitch/resources/Search.d.ts +3 -0
  59. package/dist/nodes/Twitch/resources/Search.js +97 -0
  60. package/dist/nodes/Twitch/resources/Search.js.map +1 -0
  61. package/dist/nodes/Twitch/resources/Stream.d.ts +3 -0
  62. package/dist/nodes/Twitch/resources/Stream.js +68 -0
  63. package/dist/nodes/Twitch/resources/Stream.js.map +1 -0
  64. package/dist/nodes/Twitch/resources/Subscription.d.ts +3 -0
  65. package/dist/nodes/Twitch/resources/Subscription.js +144 -0
  66. package/dist/nodes/Twitch/resources/Subscription.js.map +1 -0
  67. package/dist/nodes/Twitch/resources/Team.d.ts +3 -0
  68. package/dist/nodes/Twitch/resources/Team.js +153 -0
  69. package/dist/nodes/Twitch/resources/Team.js.map +1 -0
  70. package/dist/nodes/Twitch/resources/User.d.ts +3 -0
  71. package/dist/nodes/Twitch/resources/User.js +68 -0
  72. package/dist/nodes/Twitch/resources/User.js.map +1 -0
  73. package/dist/nodes/Twitch/resources/Video.d.ts +3 -0
  74. package/dist/nodes/Twitch/resources/Video.js +296 -0
  75. package/dist/nodes/Twitch/resources/Video.js.map +1 -0
  76. package/dist/nodes/Twitch/resources/Whisper.d.ts +3 -0
  77. package/dist/nodes/Twitch/resources/Whisper.js +78 -0
  78. package/dist/nodes/Twitch/resources/Whisper.js.map +1 -0
  79. package/dist/nodes/Twitch/shared/userIdConverter.js.map +1 -0
  80. package/dist/nodes/TwitchTrigger/TwitchTrigger.node.js +1 -1
  81. package/dist/nodes/TwitchTrigger/TwitchTrigger.node.js.map +1 -1
  82. package/dist/package.json +3 -26
  83. package/dist/tsconfig.tsbuildinfo +1 -1
  84. package/package.json +3 -26
  85. package/dist/nodes/TwitchAnnouncements/TwitchAnnouncements.node.d.ts +0 -4
  86. package/dist/nodes/TwitchAnnouncements/TwitchAnnouncements.node.js +0 -169
  87. package/dist/nodes/TwitchAnnouncements/TwitchAnnouncements.node.js.map +0 -1
  88. package/dist/nodes/TwitchBans/TwitchBans.node.js +0 -340
  89. package/dist/nodes/TwitchBans/TwitchBans.node.js.map +0 -1
  90. package/dist/nodes/TwitchBans/twitch.dark.svg +0 -1
  91. package/dist/nodes/TwitchBans/twitch.svg +0 -1
  92. package/dist/nodes/TwitchBitsLeaderboard/TwitchBitsLeaderboard.node.d.ts +0 -4
  93. package/dist/nodes/TwitchBitsLeaderboard/TwitchBitsLeaderboard.node.js +0 -174
  94. package/dist/nodes/TwitchBitsLeaderboard/TwitchBitsLeaderboard.node.js.map +0 -1
  95. package/dist/nodes/TwitchBitsLeaderboard/twitch.dark.svg +0 -1
  96. package/dist/nodes/TwitchBitsLeaderboard/twitch.svg +0 -1
  97. package/dist/nodes/TwitchChannels/TwitchChannels.node.d.ts +0 -4
  98. package/dist/nodes/TwitchChannels/TwitchChannels.node.js +0 -104
  99. package/dist/nodes/TwitchChannels/TwitchChannels.node.js.map +0 -1
  100. package/dist/nodes/TwitchChannels/twitch.dark.svg +0 -1
  101. package/dist/nodes/TwitchChannels/twitch.svg +0 -1
  102. package/dist/nodes/TwitchChatMessages/TwitchChatMessages.node.d.ts +0 -4
  103. package/dist/nodes/TwitchChatMessages/TwitchChatMessages.node.js +0 -133
  104. package/dist/nodes/TwitchChatMessages/TwitchChatMessages.node.js.map +0 -1
  105. package/dist/nodes/TwitchChatMessages/twitch.dark.svg +0 -1
  106. package/dist/nodes/TwitchChatMessages/twitch.svg +0 -1
  107. package/dist/nodes/TwitchChatters/TwitchChatters.node.d.ts +0 -4
  108. package/dist/nodes/TwitchChatters/TwitchChatters.node.js +0 -133
  109. package/dist/nodes/TwitchChatters/TwitchChatters.node.js.map +0 -1
  110. package/dist/nodes/TwitchChatters/twitch.dark.svg +0 -1
  111. package/dist/nodes/TwitchChatters/twitch.svg +0 -1
  112. package/dist/nodes/TwitchCheermotes/TwitchCheermotes.node.d.ts +0 -4
  113. package/dist/nodes/TwitchCheermotes/TwitchCheermotes.node.js +0 -99
  114. package/dist/nodes/TwitchCheermotes/TwitchCheermotes.node.js.map +0 -1
  115. package/dist/nodes/TwitchCheermotes/twitch.dark.svg +0 -1
  116. package/dist/nodes/TwitchCheermotes/twitch.svg +0 -1
  117. package/dist/nodes/TwitchClips/TwitchClips.node.d.ts +0 -4
  118. package/dist/nodes/TwitchClips/TwitchClips.node.js +0 -291
  119. package/dist/nodes/TwitchClips/TwitchClips.node.js.map +0 -1
  120. package/dist/nodes/TwitchClips/twitch.dark.svg +0 -1
  121. package/dist/nodes/TwitchClips/twitch.svg +0 -1
  122. package/dist/nodes/TwitchCustomRewards/TwitchCustomRewards.node.d.ts +0 -4
  123. package/dist/nodes/TwitchCustomRewards/TwitchCustomRewards.node.js +0 -581
  124. package/dist/nodes/TwitchCustomRewards/TwitchCustomRewards.node.js.map +0 -1
  125. package/dist/nodes/TwitchCustomRewards/twitch.dark.svg +0 -1
  126. package/dist/nodes/TwitchCustomRewards/twitch.svg +0 -1
  127. package/dist/nodes/TwitchEmotes/TwitchEmotes.node.d.ts +0 -4
  128. package/dist/nodes/TwitchEmotes/TwitchEmotes.node.js +0 -97
  129. package/dist/nodes/TwitchEmotes/TwitchEmotes.node.js.map +0 -1
  130. package/dist/nodes/TwitchEmotes/twitch.dark.svg +0 -1
  131. package/dist/nodes/TwitchEmotes/twitch.svg +0 -1
  132. package/dist/nodes/TwitchGames/TwitchGames.node.d.ts +0 -4
  133. package/dist/nodes/TwitchGames/TwitchGames.node.js +0 -230
  134. package/dist/nodes/TwitchGames/TwitchGames.node.js.map +0 -1
  135. package/dist/nodes/TwitchGames/twitch.dark.svg +0 -1
  136. package/dist/nodes/TwitchGames/twitch.svg +0 -1
  137. package/dist/nodes/TwitchModerators/TwitchModerators.node.d.ts +0 -4
  138. package/dist/nodes/TwitchModerators/TwitchModerators.node.js +0 -287
  139. package/dist/nodes/TwitchModerators/TwitchModerators.node.js.map +0 -1
  140. package/dist/nodes/TwitchModerators/twitch.dark.svg +0 -1
  141. package/dist/nodes/TwitchModerators/twitch.svg +0 -1
  142. package/dist/nodes/TwitchPolls/TwitchPolls.node.d.ts +0 -4
  143. package/dist/nodes/TwitchPolls/TwitchPolls.node.js +0 -426
  144. package/dist/nodes/TwitchPolls/TwitchPolls.node.js.map +0 -1
  145. package/dist/nodes/TwitchPolls/twitch.dark.svg +0 -1
  146. package/dist/nodes/TwitchPolls/twitch.svg +0 -1
  147. package/dist/nodes/TwitchPredictions/TwitchPredictions.node.d.ts +0 -4
  148. package/dist/nodes/TwitchPredictions/TwitchPredictions.node.js +0 -382
  149. package/dist/nodes/TwitchPredictions/TwitchPredictions.node.js.map +0 -1
  150. package/dist/nodes/TwitchPredictions/twitch.dark.svg +0 -1
  151. package/dist/nodes/TwitchPredictions/twitch.svg +0 -1
  152. package/dist/nodes/TwitchRaids/TwitchRaids.node.d.ts +0 -4
  153. package/dist/nodes/TwitchRaids/TwitchRaids.node.js +0 -183
  154. package/dist/nodes/TwitchRaids/TwitchRaids.node.js.map +0 -1
  155. package/dist/nodes/TwitchRaids/twitch.dark.svg +0 -1
  156. package/dist/nodes/TwitchRaids/twitch.svg +0 -1
  157. package/dist/nodes/TwitchRedemptions/TwitchRedemptions.node.d.ts +0 -4
  158. package/dist/nodes/TwitchRedemptions/TwitchRedemptions.node.js +0 -274
  159. package/dist/nodes/TwitchRedemptions/TwitchRedemptions.node.js.map +0 -1
  160. package/dist/nodes/TwitchRedemptions/twitch.dark.svg +0 -1
  161. package/dist/nodes/TwitchRedemptions/twitch.svg +0 -1
  162. package/dist/nodes/TwitchSchedule/TwitchSchedule.node.d.ts +0 -4
  163. package/dist/nodes/TwitchSchedule/TwitchSchedule.node.js +0 -432
  164. package/dist/nodes/TwitchSchedule/TwitchSchedule.node.js.map +0 -1
  165. package/dist/nodes/TwitchSchedule/twitch.dark.svg +0 -1
  166. package/dist/nodes/TwitchSchedule/twitch.svg +0 -1
  167. package/dist/nodes/TwitchSearch/TwitchSearch.node.d.ts +0 -4
  168. package/dist/nodes/TwitchSearch/TwitchSearch.node.js +0 -134
  169. package/dist/nodes/TwitchSearch/TwitchSearch.node.js.map +0 -1
  170. package/dist/nodes/TwitchSearch/twitch.dark.svg +0 -1
  171. package/dist/nodes/TwitchSearch/twitch.svg +0 -1
  172. package/dist/nodes/TwitchStreams/TwitchStreams.node.d.ts +0 -4
  173. package/dist/nodes/TwitchStreams/TwitchStreams.node.js +0 -94
  174. package/dist/nodes/TwitchStreams/TwitchStreams.node.js.map +0 -1
  175. package/dist/nodes/TwitchStreams/twitch.dark.svg +0 -1
  176. package/dist/nodes/TwitchStreams/twitch.svg +0 -1
  177. package/dist/nodes/TwitchSubscriptions/TwitchSubscriptions.node.d.ts +0 -4
  178. package/dist/nodes/TwitchSubscriptions/TwitchSubscriptions.node.js +0 -208
  179. package/dist/nodes/TwitchSubscriptions/TwitchSubscriptions.node.js.map +0 -1
  180. package/dist/nodes/TwitchSubscriptions/twitch.dark.svg +0 -1
  181. package/dist/nodes/TwitchSubscriptions/twitch.svg +0 -1
  182. package/dist/nodes/TwitchTeams/TwitchTeams.node.d.ts +0 -4
  183. package/dist/nodes/TwitchTeams/TwitchTeams.node.js +0 -191
  184. package/dist/nodes/TwitchTeams/TwitchTeams.node.js.map +0 -1
  185. package/dist/nodes/TwitchTeams/twitch.dark.svg +0 -1
  186. package/dist/nodes/TwitchTeams/twitch.svg +0 -1
  187. package/dist/nodes/TwitchUsers/TwitchUsers.node.d.ts +0 -4
  188. package/dist/nodes/TwitchUsers/TwitchUsers.node.js +0 -94
  189. package/dist/nodes/TwitchUsers/TwitchUsers.node.js.map +0 -1
  190. package/dist/nodes/TwitchUsers/twitch.dark.svg +0 -1
  191. package/dist/nodes/TwitchUsers/twitch.svg +0 -1
  192. package/dist/nodes/TwitchVideos/TwitchVideos.node.d.ts +0 -4
  193. package/dist/nodes/TwitchVideos/TwitchVideos.node.js +0 -343
  194. package/dist/nodes/TwitchVideos/TwitchVideos.node.js.map +0 -1
  195. package/dist/nodes/TwitchVideos/twitch.dark.svg +0 -1
  196. package/dist/nodes/TwitchVideos/twitch.svg +0 -1
  197. package/dist/nodes/TwitchWhispers/TwitchWhispers.node.d.ts +0 -4
  198. package/dist/nodes/TwitchWhispers/TwitchWhispers.node.js +0 -105
  199. package/dist/nodes/TwitchWhispers/TwitchWhispers.node.js.map +0 -1
  200. package/dist/nodes/TwitchWhispers/twitch.dark.svg +0 -1
  201. package/dist/nodes/TwitchWhispers/twitch.svg +0 -1
  202. package/dist/nodes/shared/userIdConverter.js.map +0 -1
  203. /package/dist/nodes/{shared → Twitch/shared}/userIdConverter.d.ts +0 -0
  204. /package/dist/nodes/{shared → Twitch/shared}/userIdConverter.js +0 -0
  205. /package/dist/nodes/{TwitchAnnouncements → Twitch}/twitch.dark.svg +0 -0
  206. /package/dist/nodes/{TwitchAnnouncements → Twitch}/twitch.svg +0 -0
@@ -0,0 +1,144 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.subscriptionFields = exports.subscriptionOperations = void 0;
4
+ const userIdConverter_1 = require("../shared/userIdConverter");
5
+ exports.subscriptionOperations = [
6
+ {
7
+ displayName: 'Operation',
8
+ name: 'operation',
9
+ type: 'options',
10
+ noDataExpression: true,
11
+ displayOptions: {
12
+ show: {
13
+ resource: ['subscription'],
14
+ },
15
+ },
16
+ options: [
17
+ {
18
+ name: 'Get Broadcaster Subscriptions',
19
+ value: 'getBroadcasterSubscriptions',
20
+ action: 'Get broadcaster subscriptions',
21
+ description: 'Get a list of broadcaster subscriptions',
22
+ routing: {
23
+ request: {
24
+ method: 'GET',
25
+ url: '/subscriptions',
26
+ },
27
+ send: {
28
+ preSend: [
29
+ async function (requestOptions) {
30
+ const broadcasterIdInput = this.getNodeParameter('broadcasterId', 0);
31
+ const userIdInput = this.getNodeParameter('userId', 0);
32
+ const first = this.getNodeParameter('first', 0);
33
+ const after = this.getNodeParameter('after', 0);
34
+ const broadcasterId = await userIdConverter_1.resolveUserIdOrUsername.call(this, broadcasterIdInput);
35
+ const qs = {
36
+ broadcaster_id: broadcasterId,
37
+ };
38
+ if (userIdInput) {
39
+ const userIds = userIdInput.split(',').map((id) => id.trim()).filter((id) => id);
40
+ if (userIds.length > 0) {
41
+ const resolvedUserIds = await Promise.all(userIds.map((id) => userIdConverter_1.resolveUserIdOrUsername.call(this, id)));
42
+ qs.user_id = resolvedUserIds;
43
+ }
44
+ }
45
+ if (first)
46
+ qs.first = first;
47
+ if (after)
48
+ qs.after = after;
49
+ requestOptions.qs = qs;
50
+ return requestOptions;
51
+ },
52
+ ],
53
+ },
54
+ output: {
55
+ postReceive: [
56
+ {
57
+ type: 'rootProperty',
58
+ properties: {
59
+ property: 'data',
60
+ },
61
+ },
62
+ ],
63
+ },
64
+ },
65
+ },
66
+ {
67
+ name: 'Check User Subscription',
68
+ value: 'checkUserSubscription',
69
+ action: 'Check user subscription',
70
+ description: 'Check if a user is subscribed to a broadcaster',
71
+ routing: {
72
+ request: {
73
+ method: 'GET',
74
+ url: '/subscriptions/user',
75
+ },
76
+ send: {
77
+ preSend: [
78
+ async function (requestOptions) {
79
+ const broadcasterIdInput = this.getNodeParameter('broadcasterId', 0);
80
+ const userIdInput = this.getNodeParameter('checkUserId', 0);
81
+ const broadcasterId = await userIdConverter_1.resolveUserIdOrUsername.call(this, broadcasterIdInput);
82
+ const userId = await userIdConverter_1.resolveUserIdOrUsername.call(this, userIdInput);
83
+ requestOptions.qs = {
84
+ broadcaster_id: broadcasterId,
85
+ user_id: userId,
86
+ };
87
+ return requestOptions;
88
+ },
89
+ ],
90
+ },
91
+ output: {
92
+ postReceive: [
93
+ {
94
+ type: 'rootProperty',
95
+ properties: {
96
+ property: 'data',
97
+ },
98
+ },
99
+ {
100
+ type: 'setKeyValue',
101
+ properties: {
102
+ index: 0,
103
+ },
104
+ },
105
+ ],
106
+ },
107
+ },
108
+ },
109
+ ],
110
+ default: 'getBroadcasterSubscriptions',
111
+ },
112
+ ];
113
+ exports.subscriptionFields = [
114
+ {
115
+ displayName: 'User ID or Username',
116
+ name: 'checkUserId',
117
+ type: 'string',
118
+ required: true,
119
+ default: '',
120
+ placeholder: 'e.g. 123456789 or username',
121
+ description: 'The user ID or username to check. If a username is provided, it will be automatically converted to user ID.',
122
+ displayOptions: {
123
+ show: {
124
+ resource: ['subscription'],
125
+ operation: ['checkUserSubscription'],
126
+ },
127
+ },
128
+ },
129
+ {
130
+ displayName: 'After',
131
+ name: 'after',
132
+ type: 'string',
133
+ default: '',
134
+ placeholder: 'e.g. eyJiIjpudWxsLCJhIjp7Ik9mZnNldCI6MjB9fQ',
135
+ description: 'Pagination cursor',
136
+ displayOptions: {
137
+ show: {
138
+ resource: ['subscription'],
139
+ operation: ['getBroadcasterSubscriptions'],
140
+ },
141
+ },
142
+ },
143
+ ];
144
+ //# sourceMappingURL=Subscription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Subscription.js","sourceRoot":"","sources":["../../../../nodes/Twitch/resources/Subscription.ts"],"names":[],"mappings":";;;AACA,+DAAoE;AAEvD,QAAA,sBAAsB,GAAsB;IACxD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,cAAc,CAAC;aAC1B;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,+BAA+B;gBACrC,KAAK,EAAE,6BAA6B;gBACpC,MAAM,EAAE,+BAA+B;gBACvC,WAAW,EAAE,yCAAyC;gBACtD,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,MAAM,EAAE,KAAK;wBACb,GAAG,EAAE,gBAAgB;qBACrB;oBACD,IAAI,EAAE;wBACL,OAAO,EAAE;4BACR,KAAK,WAAiB,cAAc;gCACnC,MAAM,kBAAkB,GAAG,IAAI,CAAC,gBAAgB,CAAC,eAAe,EAAE,CAAC,CAAW,CAAC;gCAC/E,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,E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WAAW,EAAE,4BAA4B;QACzC,WAAW,EAAE,6GAA6G;QAC1H,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,cAAc,CAAC;gBAC1B,SAAS,EAAE,CAAC,uBAAuB,CAAC;aACpC;SACD;KACD;IAGD;QACC,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,6CAA6C;QAC1D,WAAW,EAAE,mBAAmB;QAChC,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,cAAc,CAAC;gBAC1B,SAAS,EAAE,CAAC,6BAA6B,CAAC;aAC1C;SACD;KACD;CACD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const teamOperations: INodeProperties[];
3
+ export declare const teamFields: INodeProperties[];
@@ -0,0 +1,153 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.teamFields = exports.teamOperations = void 0;
4
+ const userIdConverter_1 = require("../shared/userIdConverter");
5
+ exports.teamOperations = [
6
+ {
7
+ displayName: 'Operation',
8
+ name: 'operation',
9
+ type: 'options',
10
+ noDataExpression: true,
11
+ displayOptions: {
12
+ show: {
13
+ resource: ['team'],
14
+ },
15
+ },
16
+ options: [
17
+ {
18
+ name: 'Get Channel Teams',
19
+ value: 'getChannelTeams',
20
+ action: 'Get channel teams',
21
+ description: 'Get all teams that a broadcaster is a member of',
22
+ routing: {
23
+ request: {
24
+ method: 'GET',
25
+ url: '/teams/channel',
26
+ },
27
+ send: {
28
+ preSend: [
29
+ async function (requestOptions) {
30
+ const broadcasterIdInput = this.getNodeParameter('broadcasterId', 0);
31
+ const broadcasterId = await userIdConverter_1.resolveUserIdOrUsername.call(this, broadcasterIdInput);
32
+ requestOptions.qs = {
33
+ broadcaster_id: broadcasterId,
34
+ };
35
+ return requestOptions;
36
+ },
37
+ ],
38
+ },
39
+ output: {
40
+ postReceive: [
41
+ {
42
+ type: 'rootProperty',
43
+ properties: {
44
+ property: 'data',
45
+ },
46
+ },
47
+ ],
48
+ },
49
+ },
50
+ },
51
+ {
52
+ name: 'Get Team',
53
+ value: 'getTeam',
54
+ action: 'Get team',
55
+ description: 'Get information about a specific team',
56
+ routing: {
57
+ request: {
58
+ method: 'GET',
59
+ url: '/teams',
60
+ },
61
+ send: {
62
+ preSend: [
63
+ async function (requestOptions) {
64
+ const searchBy = this.getNodeParameter('searchBy', 0);
65
+ const searchValue = this.getNodeParameter(searchBy, 0);
66
+ requestOptions.qs = {
67
+ [searchBy]: searchValue,
68
+ };
69
+ return requestOptions;
70
+ },
71
+ ],
72
+ },
73
+ output: {
74
+ postReceive: [
75
+ {
76
+ type: 'rootProperty',
77
+ properties: {
78
+ property: 'data',
79
+ },
80
+ },
81
+ {
82
+ type: 'setKeyValue',
83
+ properties: {
84
+ index: 0,
85
+ },
86
+ },
87
+ ],
88
+ },
89
+ },
90
+ },
91
+ ],
92
+ default: 'getChannelTeams',
93
+ }
94
+ ];
95
+ exports.teamFields = [
96
+ {
97
+ displayName: 'Search By',
98
+ name: 'searchBy',
99
+ type: 'options',
100
+ required: true,
101
+ options: [
102
+ {
103
+ name: 'Name',
104
+ value: 'name',
105
+ },
106
+ {
107
+ name: 'ID',
108
+ value: 'id',
109
+ },
110
+ ],
111
+ default: 'name',
112
+ description: 'Search team by name or ID',
113
+ displayOptions: {
114
+ show: {
115
+ resource: ['team'],
116
+ operation: ['getTeam'],
117
+ },
118
+ },
119
+ },
120
+ {
121
+ displayName: 'Team Name',
122
+ name: 'name',
123
+ type: 'string',
124
+ required: true,
125
+ default: '',
126
+ placeholder: 'e.g. staff',
127
+ description: 'The name of the team',
128
+ displayOptions: {
129
+ show: {
130
+ resource: ['team'],
131
+ operation: ['getTeam'],
132
+ searchBy: ['name'],
133
+ },
134
+ },
135
+ },
136
+ {
137
+ displayName: 'Team ID',
138
+ name: 'id',
139
+ type: 'string',
140
+ required: true,
141
+ default: '',
142
+ placeholder: 'e.g. 123456',
143
+ description: 'The ID of the team',
144
+ displayOptions: {
145
+ show: {
146
+ resource: ['team'],
147
+ operation: ['getTeam'],
148
+ searchBy: ['id'],
149
+ },
150
+ },
151
+ },
152
+ ];
153
+ //# sourceMappingURL=Team.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Team.js","sourceRoot":"","sources":["../../../../nodes/Twitch/resources/Team.ts"],"names":[],"mappings":";;;AACA,+DAAoE;AAEvD,QAAA,cAAc,GAAsB;IAChD;QACG,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACxB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,MAAM,CAAC;aAClB;SACD;QACC,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,mBAAmB;gBACzB,KAAK,EAAE,iBAAiB;gBACxB,MAAM,EAAE,mBAAmB;gBAC3B,WAAW,EAAE,iDAAiD;gBAC9D,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,MAAM,EAAE,KAAK;wBACb,GAAG,EAAE,gBAAgB;qBACrB;oBACD,IAAI,EAAE;wBACL,OAAO,EAAE;4BACR,KAAK,WAAiB,cAAc;gCACnC,MAAM,kBAAkB,GAAG,IAAI,CAAC,gBAAgB,CAAC,eAAe,EAAE,CAAC,CAAW,CAAC;gCAC/E,MAAM,aAAa,GAAG,MAAM,yCAAuB,CAAC,IAAI,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;gCAEnF,cAAc,CAAC,EAAE,GAAG;oCACnB,cAAc,EAAE,aAAa;iCAC7B,CAAC;gCAEF,OAAO,cAAc,CAAC;4BACvB,CAAC;yBACD;qBACD;oBACD,MAAM,EAAE;wBACP,WAAW,EAAE;4BACZ;gCACC,IAAI,EAAE,cAAc;gCACpB,UAAU,EAAE;oCACX,QAAQ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AI,EAAE;gBACP,QAAQ,EAAE,CAAC,MAAM,CAAC;gBAChB,SAAS,EAAE,CAAC,SAAS,CAAC;aACtB;SACD;KACD;IACD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,YAAY;QACzB,WAAW,EAAE,sBAAsB;QACnC,cAAc,EAAE;YACf,IAAI,EAAE;gBACP,QAAQ,EAAE,CAAC,MAAM,CAAC;gBAChB,SAAS,EAAE,CAAC,SAAS,CAAC;gBACtB,QAAQ,EAAE,CAAC,MAAM,CAAC;aAClB;SACD;KACD;IACD;QACC,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,IAAI;QACV,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,aAAa;QAC1B,WAAW,EAAE,oBAAoB;QACjC,cAAc,EAAE;YACf,IAAI,EAAE;gBACP,QAAQ,EAAE,CAAC,MAAM,CAAC;gBAChB,SAAS,EAAE,CAAC,SAAS,CAAC;gBACtB,QAAQ,EAAE,CAAC,IAAI,CAAC;aAChB;SACD;KACD;CACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const userOperations: INodeProperties[];
3
+ export declare const userFields: INodeProperties[];
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.userFields = exports.userOperations = void 0;
4
+ exports.userOperations = [
5
+ {
6
+ displayName: 'Operation',
7
+ name: 'operation',
8
+ type: 'options',
9
+ noDataExpression: true,
10
+ displayOptions: {
11
+ show: {
12
+ resource: ['user'],
13
+ },
14
+ },
15
+ options: [
16
+ {
17
+ name: 'Get',
18
+ value: 'get',
19
+ action: 'Get a user',
20
+ description: 'Get information about a user',
21
+ routing: {
22
+ request: {
23
+ method: 'GET',
24
+ url: '/users',
25
+ qs: {
26
+ login: '={{$parameter.userLogin}}',
27
+ },
28
+ },
29
+ output: {
30
+ postReceive: [
31
+ {
32
+ type: 'rootProperty',
33
+ properties: {
34
+ property: 'data',
35
+ },
36
+ },
37
+ {
38
+ type: 'setKeyValue',
39
+ properties: {
40
+ index: 0,
41
+ },
42
+ },
43
+ ],
44
+ },
45
+ },
46
+ },
47
+ ],
48
+ default: 'get',
49
+ },
50
+ ];
51
+ exports.userFields = [
52
+ {
53
+ displayName: 'User Login',
54
+ name: 'userLogin',
55
+ type: 'string',
56
+ displayOptions: {
57
+ show: {
58
+ resource: ['user'],
59
+ operation: ['get'],
60
+ },
61
+ },
62
+ default: '',
63
+ required: true,
64
+ placeholder: 'e.g. username',
65
+ description: 'The user login name',
66
+ },
67
+ ];
68
+ //# sourceMappingURL=User.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"User.js","sourceRoot":"","sources":["../../../../nodes/Twitch/resources/User.ts"],"names":[],"mappings":";;;AAEa,QAAA,cAAc,GAAsB;IAChD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,MAAM,CAAC;aAClB;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;gBACZ,MAAM,EAAE,YAAY;gBACpB,WAAW,EAAE,8BAA8B;gBAC3C,OAAO,EAAE;oBACR,OAAO,EAAE;wBACR,MAAM,EAAE,KAAK;wBACb,GAAG,EAAE,QAAQ;wBACb,EAAE,EAAE;4BACH,KAAK,EAAE,2BAA2B;yBAClC;qBACD;oBACD,MAAM,EAAE;wBACP,WAAW,EAAE;4BACZ;gCACC,IAAI,EAAE,cAAc;gCACpB,UAAU,EAAE;oCACX,QAAQ,EAAE,MAAM;iCAChB;6BACD;4BACD;gCACC,IAAI,EAAE,aAAa;gCACnB,UAAU,EAAE;oCACX,KAAK,EAAE,CAAC;iCACR;6BACD;yBACD;qBACD;iBACD;aACD;SACD;QACD,OAAO,EAAE,KAAK;KACd;CACD,CAAC;AAEW,QAAA,UAAU,GAAsB;IAC5C;QACC,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,MAAM,CAAC;gBAClB,SAAS,EAAE,CAAC,KAAK,CAAC;aAClB;SACD;QACD,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,eAAe;QAC5B,WAAW,EAAE,qBAAqB;KAClC;CACD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const videoOperations: INodeProperties[];
3
+ export declare const videoFields: INodeProperties[];