@yuniruyuni/n8n-nodes-twitch 0.1.7 → 0.1.8
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/dist/credentials/TwitchOAuth2Api.credentials.js +3 -9
- package/dist/credentials/TwitchOAuth2Api.credentials.js.map +1 -1
- package/dist/nodes/Twitch/Twitch.node.js +0 -2
- package/dist/nodes/Twitch/Twitch.node.js.map +1 -1
- package/dist/nodes/Twitch/resources/Announcement.js +43 -51
- package/dist/nodes/Twitch/resources/Announcement.js.map +1 -1
- package/dist/nodes/Twitch/resources/Ban.js +36 -47
- package/dist/nodes/Twitch/resources/Ban.js.map +1 -1
- package/dist/nodes/Twitch/resources/BitsLeaderboard.js +54 -68
- package/dist/nodes/Twitch/resources/BitsLeaderboard.js.map +1 -1
- package/dist/nodes/Twitch/resources/Channel.js +15 -1
- package/dist/nodes/Twitch/resources/Channel.js.map +1 -1
- package/dist/nodes/Twitch/resources/ChatMessage.js +26 -34
- package/dist/nodes/Twitch/resources/ChatMessage.js.map +1 -1
- package/dist/nodes/Twitch/resources/Chatter.js +1 -1
- package/dist/nodes/Twitch/resources/Chatter.js.map +1 -1
- package/dist/nodes/Twitch/resources/Cheermote.js +1 -1
- package/dist/nodes/Twitch/resources/Cheermote.js.map +1 -1
- package/dist/nodes/Twitch/resources/Clip.js +91 -104
- package/dist/nodes/Twitch/resources/Clip.js.map +1 -1
- package/dist/nodes/Twitch/resources/CustomReward.js +316 -289
- package/dist/nodes/Twitch/resources/CustomReward.js.map +1 -1
- package/dist/nodes/Twitch/resources/Emote.js +1 -1
- package/dist/nodes/Twitch/resources/Emote.js.map +1 -1
- package/dist/nodes/Twitch/resources/Game.js +68 -74
- package/dist/nodes/Twitch/resources/Game.js.map +1 -1
- package/dist/nodes/Twitch/resources/Moderator.js +75 -15
- package/dist/nodes/Twitch/resources/Moderator.js.map +1 -1
- package/dist/nodes/Twitch/resources/Poll.js +174 -167
- package/dist/nodes/Twitch/resources/Poll.js.map +1 -1
- package/dist/nodes/Twitch/resources/Prediction.js +143 -139
- package/dist/nodes/Twitch/resources/Prediction.js.map +1 -1
- package/dist/nodes/Twitch/resources/Raid.js +48 -56
- package/dist/nodes/Twitch/resources/Raid.js.map +1 -1
- package/dist/nodes/Twitch/resources/Redemption.js +136 -114
- package/dist/nodes/Twitch/resources/Redemption.js.map +1 -1
- package/dist/nodes/Twitch/resources/Schedule.js +226 -186
- package/dist/nodes/Twitch/resources/Schedule.js.map +1 -1
- package/dist/nodes/Twitch/resources/Search.js +24 -23
- package/dist/nodes/Twitch/resources/Search.js.map +1 -1
- package/dist/nodes/Twitch/resources/Stream.js +13 -15
- package/dist/nodes/Twitch/resources/Stream.js.map +1 -1
- package/dist/nodes/Twitch/resources/Subscription.js +61 -29
- package/dist/nodes/Twitch/resources/Subscription.js.map +1 -1
- package/dist/nodes/Twitch/resources/Team.js +63 -57
- package/dist/nodes/Twitch/resources/Team.js.map +1 -1
- package/dist/nodes/Twitch/resources/User.js +13 -15
- package/dist/nodes/Twitch/resources/User.js.map +1 -1
- package/dist/nodes/Twitch/resources/Video.js +129 -125
- package/dist/nodes/Twitch/resources/Video.js.map +1 -1
- package/dist/nodes/Twitch/resources/Whisper.js +32 -28
- package/dist/nodes/Twitch/resources/Whisper.js.map +1 -1
- package/dist/nodes/Twitch/shared/updateDisplayOptions.d.ts +2 -0
- package/dist/nodes/Twitch/shared/updateDisplayOptions.js +12 -0
- package/dist/nodes/Twitch/shared/updateDisplayOptions.js.map +1 -0
- package/dist/package.json +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/nodes/Twitch/resources/CommonFields.d.ts +0 -2
- package/dist/nodes/Twitch/resources/CommonFields.js +0 -241
- package/dist/nodes/Twitch/resources/CommonFields.js.map +0 -1
|
@@ -2,6 +2,177 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.pollFields = exports.pollOperations = void 0;
|
|
4
4
|
const userIdConverter_1 = require("../shared/userIdConverter");
|
|
5
|
+
const updateDisplayOptions_1 = require("../shared/updateDisplayOptions");
|
|
6
|
+
const createPollFields = [
|
|
7
|
+
{
|
|
8
|
+
displayName: 'Broadcaster ID or Username',
|
|
9
|
+
name: 'broadcasterId',
|
|
10
|
+
type: 'string',
|
|
11
|
+
default: '',
|
|
12
|
+
required: true,
|
|
13
|
+
placeholder: 'e.g. 123456789 or username',
|
|
14
|
+
description: 'The broadcaster user ID or username. If a username is provided, it will be automatically converted to user ID.',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
displayName: 'Title',
|
|
18
|
+
name: 'title',
|
|
19
|
+
type: 'string',
|
|
20
|
+
default: '',
|
|
21
|
+
required: true,
|
|
22
|
+
placeholder: 'e.g. What game should I play next?',
|
|
23
|
+
description: 'Question displayed for the poll. Maximum: 60 characters.',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
displayName: 'Choices',
|
|
27
|
+
name: 'choices',
|
|
28
|
+
type: 'string',
|
|
29
|
+
default: '',
|
|
30
|
+
required: true,
|
|
31
|
+
placeholder: 'e.g. ["Option 1", "Option 2", "Option 3"] or Option 1, Option 2, Option 3',
|
|
32
|
+
description: 'Poll choices as a JSON array or comma-separated list',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Duration',
|
|
36
|
+
name: 'duration',
|
|
37
|
+
type: 'number',
|
|
38
|
+
default: 300,
|
|
39
|
+
required: true,
|
|
40
|
+
typeOptions: {
|
|
41
|
+
minValue: 15,
|
|
42
|
+
maxValue: 1800,
|
|
43
|
+
},
|
|
44
|
+
description: 'Total duration for the poll in seconds. Minimum: 15. Maximum: 1800.',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
displayName: 'Additional Fields',
|
|
48
|
+
name: 'additionalFields',
|
|
49
|
+
type: 'collection',
|
|
50
|
+
placeholder: 'Add Field',
|
|
51
|
+
default: {},
|
|
52
|
+
options: [
|
|
53
|
+
{
|
|
54
|
+
displayName: 'Bits Voting Enabled',
|
|
55
|
+
name: 'bitsVotingEnabled',
|
|
56
|
+
type: 'boolean',
|
|
57
|
+
default: false,
|
|
58
|
+
description: 'Whether viewers can cast additional votes using Bits',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
displayName: 'Bits Per Vote',
|
|
62
|
+
name: 'bitsPerVote',
|
|
63
|
+
type: 'number',
|
|
64
|
+
default: 0,
|
|
65
|
+
typeOptions: {
|
|
66
|
+
minValue: 0,
|
|
67
|
+
maxValue: 10000,
|
|
68
|
+
},
|
|
69
|
+
description: 'Number of Bits required to vote once with Bits',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
displayName: 'Channel Points Voting Enabled',
|
|
73
|
+
name: 'channelPointsVotingEnabled',
|
|
74
|
+
type: 'boolean',
|
|
75
|
+
default: false,
|
|
76
|
+
description: 'Whether viewers can cast additional votes using Channel Points',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
displayName: 'Channel Points Per Vote',
|
|
80
|
+
name: 'channelPointsPerVote',
|
|
81
|
+
type: 'number',
|
|
82
|
+
default: 0,
|
|
83
|
+
typeOptions: {
|
|
84
|
+
minValue: 0,
|
|
85
|
+
maxValue: 1000000,
|
|
86
|
+
},
|
|
87
|
+
description: 'Number of Channel Points required to vote once',
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
displayName: 'Note',
|
|
93
|
+
name: 'pollsNote',
|
|
94
|
+
type: 'notice',
|
|
95
|
+
default: '',
|
|
96
|
+
description: 'Requires OAuth2 authentication with channel:manage:polls scope',
|
|
97
|
+
},
|
|
98
|
+
];
|
|
99
|
+
const getPollsFields = [
|
|
100
|
+
{
|
|
101
|
+
displayName: 'Broadcaster ID or Username',
|
|
102
|
+
name: 'getBroadcasterId',
|
|
103
|
+
type: 'string',
|
|
104
|
+
default: '',
|
|
105
|
+
required: true,
|
|
106
|
+
placeholder: 'e.g. 123456789 or username',
|
|
107
|
+
description: 'The broadcaster user ID or username whose polls to retrieve',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
displayName: 'Poll IDs',
|
|
111
|
+
name: 'pollIds',
|
|
112
|
+
type: 'string',
|
|
113
|
+
default: '',
|
|
114
|
+
placeholder: 'e.g. poll-ID-1 or poll-ID-1,poll-ID-2',
|
|
115
|
+
description: 'Filter by poll ID(s). Separate multiple IDs with commas.',
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
displayName: 'First',
|
|
119
|
+
name: 'first',
|
|
120
|
+
type: 'number',
|
|
121
|
+
default: 20,
|
|
122
|
+
typeOptions: {
|
|
123
|
+
minValue: 1,
|
|
124
|
+
maxValue: 100,
|
|
125
|
+
},
|
|
126
|
+
description: 'Maximum number of items to return',
|
|
127
|
+
},
|
|
128
|
+
];
|
|
129
|
+
const endPollFields = [
|
|
130
|
+
{
|
|
131
|
+
displayName: 'Broadcaster ID or Username',
|
|
132
|
+
name: 'endBroadcasterId',
|
|
133
|
+
type: 'string',
|
|
134
|
+
default: '',
|
|
135
|
+
required: true,
|
|
136
|
+
placeholder: 'e.g. 123456789 or username',
|
|
137
|
+
description: 'The broadcaster user ID or username who owns the poll',
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
displayName: 'Poll ID',
|
|
141
|
+
name: 'pollId',
|
|
142
|
+
type: 'string',
|
|
143
|
+
default: '',
|
|
144
|
+
required: true,
|
|
145
|
+
placeholder: 'e.g. ed961efd-8a3f-4cf5-a9d0-e616c590cd2a',
|
|
146
|
+
description: 'The ID of the poll to end',
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
displayName: 'Status',
|
|
150
|
+
name: 'status',
|
|
151
|
+
type: 'options',
|
|
152
|
+
options: [
|
|
153
|
+
{
|
|
154
|
+
name: 'Terminated',
|
|
155
|
+
value: 'TERMINATED',
|
|
156
|
+
description: 'End the poll immediately',
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
name: 'Archived',
|
|
160
|
+
value: 'ARCHIVED',
|
|
161
|
+
description: 'Archive the poll immediately',
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
default: 'TERMINATED',
|
|
165
|
+
required: true,
|
|
166
|
+
description: 'The status to set for the poll when ending it',
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
displayName: 'Note',
|
|
170
|
+
name: 'pollsNote',
|
|
171
|
+
type: 'notice',
|
|
172
|
+
default: '',
|
|
173
|
+
description: 'Requires OAuth2 authentication with channel:manage:polls scope',
|
|
174
|
+
},
|
|
175
|
+
];
|
|
5
176
|
exports.pollOperations = [
|
|
6
177
|
{
|
|
7
178
|
displayName: 'Operation',
|
|
@@ -178,172 +349,8 @@ exports.pollOperations = [
|
|
|
178
349
|
},
|
|
179
350
|
];
|
|
180
351
|
exports.pollFields = [
|
|
181
|
-
{
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
type: 'string',
|
|
185
|
-
displayOptions: {
|
|
186
|
-
show: {
|
|
187
|
-
resource: ['poll'],
|
|
188
|
-
operation: ['createPoll'],
|
|
189
|
-
},
|
|
190
|
-
},
|
|
191
|
-
default: '',
|
|
192
|
-
required: true,
|
|
193
|
-
placeholder: 'e.g. What game should I play next?',
|
|
194
|
-
description: 'Question displayed for the poll. Maximum: 60 characters.',
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
displayName: 'Choices',
|
|
198
|
-
name: 'choices',
|
|
199
|
-
type: 'string',
|
|
200
|
-
displayOptions: {
|
|
201
|
-
show: {
|
|
202
|
-
resource: ['poll'],
|
|
203
|
-
operation: ['createPoll'],
|
|
204
|
-
},
|
|
205
|
-
},
|
|
206
|
-
default: '',
|
|
207
|
-
required: true,
|
|
208
|
-
placeholder: 'e.g. ["Option 1", "Option 2", "Option 3"] or Option 1, Option 2, Option 3',
|
|
209
|
-
description: 'Poll choices as a JSON array or comma-separated list',
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
displayName: 'Duration',
|
|
213
|
-
name: 'duration',
|
|
214
|
-
type: 'number',
|
|
215
|
-
displayOptions: {
|
|
216
|
-
show: {
|
|
217
|
-
resource: ['poll'],
|
|
218
|
-
operation: ['createPoll'],
|
|
219
|
-
},
|
|
220
|
-
},
|
|
221
|
-
default: 300,
|
|
222
|
-
required: true,
|
|
223
|
-
typeOptions: {
|
|
224
|
-
minValue: 15,
|
|
225
|
-
maxValue: 1800,
|
|
226
|
-
},
|
|
227
|
-
description: 'Total duration for the poll in seconds. Minimum: 15. Maximum: 1800.',
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
displayName: 'Additional Fields',
|
|
231
|
-
name: 'additionalFields',
|
|
232
|
-
type: 'collection',
|
|
233
|
-
placeholder: 'Add Field',
|
|
234
|
-
default: {},
|
|
235
|
-
displayOptions: {
|
|
236
|
-
show: {
|
|
237
|
-
resource: ['poll'],
|
|
238
|
-
operation: ['createPoll'],
|
|
239
|
-
},
|
|
240
|
-
},
|
|
241
|
-
options: [
|
|
242
|
-
{
|
|
243
|
-
displayName: 'Bits Voting Enabled',
|
|
244
|
-
name: 'bitsVotingEnabled',
|
|
245
|
-
type: 'boolean',
|
|
246
|
-
default: false,
|
|
247
|
-
description: 'Whether viewers can cast additional votes using Bits',
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
displayName: 'Bits Per Vote',
|
|
251
|
-
name: 'bitsPerVote',
|
|
252
|
-
type: 'number',
|
|
253
|
-
default: 0,
|
|
254
|
-
typeOptions: {
|
|
255
|
-
minValue: 0,
|
|
256
|
-
maxValue: 10000,
|
|
257
|
-
},
|
|
258
|
-
description: 'Number of Bits required to vote once with Bits',
|
|
259
|
-
},
|
|
260
|
-
{
|
|
261
|
-
displayName: 'Channel Points Voting Enabled',
|
|
262
|
-
name: 'channelPointsVotingEnabled',
|
|
263
|
-
type: 'boolean',
|
|
264
|
-
default: false,
|
|
265
|
-
description: 'Whether viewers can cast additional votes using Channel Points',
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
displayName: 'Channel Points Per Vote',
|
|
269
|
-
name: 'channelPointsPerVote',
|
|
270
|
-
type: 'number',
|
|
271
|
-
default: 0,
|
|
272
|
-
typeOptions: {
|
|
273
|
-
minValue: 0,
|
|
274
|
-
maxValue: 1000000,
|
|
275
|
-
},
|
|
276
|
-
description: 'Number of Channel Points required to vote once',
|
|
277
|
-
},
|
|
278
|
-
],
|
|
279
|
-
},
|
|
280
|
-
{
|
|
281
|
-
displayName: 'Poll IDs',
|
|
282
|
-
name: 'pollIds',
|
|
283
|
-
type: 'string',
|
|
284
|
-
displayOptions: {
|
|
285
|
-
show: {
|
|
286
|
-
resource: ['poll'],
|
|
287
|
-
operation: ['getPolls'],
|
|
288
|
-
},
|
|
289
|
-
},
|
|
290
|
-
default: '',
|
|
291
|
-
placeholder: 'e.g. poll-ID-1 or poll-ID-1,poll-ID-2',
|
|
292
|
-
description: 'Filter by poll ID(s). Separate multiple IDs with commas.',
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
displayName: 'Poll ID',
|
|
296
|
-
name: 'pollId',
|
|
297
|
-
type: 'string',
|
|
298
|
-
displayOptions: {
|
|
299
|
-
show: {
|
|
300
|
-
resource: ['poll'],
|
|
301
|
-
operation: ['endPoll'],
|
|
302
|
-
},
|
|
303
|
-
},
|
|
304
|
-
default: '',
|
|
305
|
-
required: true,
|
|
306
|
-
placeholder: 'e.g. ed961efd-8a3f-4cf5-a9d0-e616c590cd2a',
|
|
307
|
-
description: 'The ID of the poll to end',
|
|
308
|
-
},
|
|
309
|
-
{
|
|
310
|
-
displayName: 'Status',
|
|
311
|
-
name: 'status',
|
|
312
|
-
type: 'options',
|
|
313
|
-
displayOptions: {
|
|
314
|
-
show: {
|
|
315
|
-
resource: ['poll'],
|
|
316
|
-
operation: ['endPoll'],
|
|
317
|
-
},
|
|
318
|
-
},
|
|
319
|
-
options: [
|
|
320
|
-
{
|
|
321
|
-
name: 'Terminated',
|
|
322
|
-
value: 'TERMINATED',
|
|
323
|
-
description: 'End the poll immediately',
|
|
324
|
-
},
|
|
325
|
-
{
|
|
326
|
-
name: 'Archived',
|
|
327
|
-
value: 'ARCHIVED',
|
|
328
|
-
description: 'Archive the poll immediately',
|
|
329
|
-
},
|
|
330
|
-
],
|
|
331
|
-
default: 'TERMINATED',
|
|
332
|
-
required: true,
|
|
333
|
-
description: 'The status to set for the poll when ending it',
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
displayName: 'Note',
|
|
337
|
-
name: 'pollsNote',
|
|
338
|
-
type: 'notice',
|
|
339
|
-
default: '',
|
|
340
|
-
displayOptions: {
|
|
341
|
-
show: {
|
|
342
|
-
resource: ['poll'],
|
|
343
|
-
operation: ['createPoll', 'endPoll'],
|
|
344
|
-
},
|
|
345
|
-
},
|
|
346
|
-
description: 'Requires OAuth2 authentication with channel:manage:polls scope',
|
|
347
|
-
},
|
|
352
|
+
...(0, updateDisplayOptions_1.updateDisplayOptions)({ show: { resource: ['poll'], operation: ['createPoll'] } }, createPollFields),
|
|
353
|
+
...(0, updateDisplayOptions_1.updateDisplayOptions)({ show: { resource: ['poll'], operation: ['getPolls'] } }, getPollsFields),
|
|
354
|
+
...(0, updateDisplayOptions_1.updateDisplayOptions)({ show: { resource: ['poll'], operation: ['endPoll'] } }, endPollFields),
|
|
348
355
|
];
|
|
349
356
|
//# sourceMappingURL=Poll.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Poll.js","sourceRoot":"","sources":["../../../../nodes/Twitch/resources/Poll.ts"],"names":[],"mappings":";;;AACA,+DAAoE;
|
|
1
|
+
{"version":3,"file":"Poll.js","sourceRoot":"","sources":["../../../../nodes/Twitch/resources/Poll.ts"],"names":[],"mappings":";;;AACA,+DAAoE;AACpE,yEAAsE;AAGtE,MAAM,gBAAgB,GAAsB;IAC3C;QACC,WAAW,EAAE,4BAA4B;QACzC,IAAI,EAAE,eAAe;QACrB,IAAI,EA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C,QAAQ,EAAE,CAAC,CAAW,CAAC;gCAC5D,MAAM,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,CAAW,CAAC;gCAE5D,MAAM,IAAI,GAAgB;oCACzB,cAAc,EAAE,aAAa;oCAC7B,EAAE,EAAE,MAAM;oCACV,MAAM,EAAE,MAAM;iCACd,CAAC;gCAEF,cAAc,CAAC,IAAI,GAAG,IAAI,CAAC;gCAC3B,OAAO,cAAc,CAAC;4BACvB,CAAC;yBACD;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,UAAU;KACnB;CACD,CAAC;AAEW,QAAA,UAAU,GAAsB;IAC5C,GAAG,IAAA,2CAAoB,EAAC,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,YAAY,CAAC,EAAE,EAAE,EAAE,gBAAgB,CAAC;IACtG,GAAG,IAAA,2CAAoB,EAAC,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,cAAc,CAAC;IAClG,GAAG,IAAA,2CAAoB,EAAC,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,aAAa,CAAC;CAChG,CAAC"}
|
|
@@ -2,6 +2,146 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.predictionFields = exports.predictionOperations = void 0;
|
|
4
4
|
const userIdConverter_1 = require("../shared/userIdConverter");
|
|
5
|
+
const updateDisplayOptions_1 = require("../shared/updateDisplayOptions");
|
|
6
|
+
const createPredictionFields = [
|
|
7
|
+
{
|
|
8
|
+
displayName: 'Broadcaster ID or Username',
|
|
9
|
+
name: 'broadcasterId',
|
|
10
|
+
type: 'string',
|
|
11
|
+
default: '',
|
|
12
|
+
required: true,
|
|
13
|
+
placeholder: 'e.g. 123456789 or username',
|
|
14
|
+
description: 'The broadcaster user ID or username. If a username is provided, it will be automatically converted to user ID.',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
displayName: 'Title',
|
|
18
|
+
name: 'title',
|
|
19
|
+
type: 'string',
|
|
20
|
+
default: '',
|
|
21
|
+
required: true,
|
|
22
|
+
placeholder: 'e.g. Will I win this match?',
|
|
23
|
+
description: 'The question that viewers are predicting. Maximum: 45 characters.',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
displayName: 'Outcome 1 Title',
|
|
27
|
+
name: 'outcome1Title',
|
|
28
|
+
type: 'string',
|
|
29
|
+
default: '',
|
|
30
|
+
required: true,
|
|
31
|
+
placeholder: 'e.g. Yes',
|
|
32
|
+
description: 'The title for the first outcome. Maximum: 25 characters.',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Outcome 2 Title',
|
|
36
|
+
name: 'outcome2Title',
|
|
37
|
+
type: 'string',
|
|
38
|
+
default: '',
|
|
39
|
+
required: true,
|
|
40
|
+
placeholder: 'e.g. No',
|
|
41
|
+
description: 'The title for the second outcome. Maximum: 25 characters.',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
displayName: 'Prediction Window',
|
|
45
|
+
name: 'predictionWindow',
|
|
46
|
+
type: 'number',
|
|
47
|
+
default: 120,
|
|
48
|
+
required: true,
|
|
49
|
+
typeOptions: {
|
|
50
|
+
minValue: 30,
|
|
51
|
+
maxValue: 1800,
|
|
52
|
+
},
|
|
53
|
+
description: 'The length of time (in seconds) that viewers have to make a prediction. Minimum: 30. Maximum: 1800.',
|
|
54
|
+
},
|
|
55
|
+
];
|
|
56
|
+
const getPredictionsFields = [
|
|
57
|
+
{
|
|
58
|
+
displayName: 'Broadcaster ID or Username',
|
|
59
|
+
name: 'broadcasterId',
|
|
60
|
+
type: 'string',
|
|
61
|
+
default: '',
|
|
62
|
+
required: true,
|
|
63
|
+
placeholder: 'e.g. 123456789 or username',
|
|
64
|
+
description: 'The broadcaster user ID or username. If a username is provided, it will be automatically converted to user ID.',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
displayName: 'Prediction ID',
|
|
68
|
+
name: 'predictionId',
|
|
69
|
+
type: 'string',
|
|
70
|
+
default: '',
|
|
71
|
+
placeholder: 'e.g. abc123-def456-ghi789',
|
|
72
|
+
description: 'The ID of the prediction to get. If not specified, returns all predictions for the broadcaster.',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
displayName: 'First',
|
|
76
|
+
name: 'first',
|
|
77
|
+
type: 'number',
|
|
78
|
+
default: 20,
|
|
79
|
+
typeOptions: {
|
|
80
|
+
minValue: 1,
|
|
81
|
+
maxValue: 100,
|
|
82
|
+
},
|
|
83
|
+
description: 'Maximum number of items to return',
|
|
84
|
+
},
|
|
85
|
+
];
|
|
86
|
+
const endPredictionFields = [
|
|
87
|
+
{
|
|
88
|
+
displayName: 'Broadcaster ID or Username',
|
|
89
|
+
name: 'broadcasterId',
|
|
90
|
+
type: 'string',
|
|
91
|
+
default: '',
|
|
92
|
+
required: true,
|
|
93
|
+
placeholder: 'e.g. 123456789 or username',
|
|
94
|
+
description: 'The broadcaster user ID or username. If a username is provided, it will be automatically converted to user ID.',
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
displayName: 'Prediction ID',
|
|
98
|
+
name: 'endPredictionId',
|
|
99
|
+
type: 'string',
|
|
100
|
+
default: '',
|
|
101
|
+
required: true,
|
|
102
|
+
placeholder: 'e.g. abc123-def456-ghi789',
|
|
103
|
+
description: 'The ID of the prediction to end',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
displayName: 'Status',
|
|
107
|
+
name: 'status',
|
|
108
|
+
type: 'options',
|
|
109
|
+
options: [
|
|
110
|
+
{
|
|
111
|
+
name: 'RESOLVED',
|
|
112
|
+
value: 'RESOLVED',
|
|
113
|
+
description: 'The winning outcome is determined and points are distributed',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: 'CANCELED',
|
|
117
|
+
value: 'CANCELED',
|
|
118
|
+
description: 'The prediction is canceled and points are refunded',
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
name: 'LOCKED',
|
|
122
|
+
value: 'LOCKED',
|
|
123
|
+
description: 'The prediction is locked and viewers can no longer make predictions',
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
default: 'RESOLVED',
|
|
127
|
+
required: true,
|
|
128
|
+
description: 'The status to set the prediction to',
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
displayName: 'Winning Outcome ID',
|
|
132
|
+
name: 'winningOutcomeId',
|
|
133
|
+
type: 'string',
|
|
134
|
+
displayOptions: {
|
|
135
|
+
show: {
|
|
136
|
+
status: ['RESOLVED'],
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
default: '',
|
|
140
|
+
required: true,
|
|
141
|
+
placeholder: 'e.g. outcome123',
|
|
142
|
+
description: 'The ID of the winning outcome (required when status is RESOLVED)',
|
|
143
|
+
},
|
|
144
|
+
];
|
|
5
145
|
exports.predictionOperations = [
|
|
6
146
|
{
|
|
7
147
|
displayName: 'Operation',
|
|
@@ -162,144 +302,8 @@ exports.predictionOperations = [
|
|
|
162
302
|
},
|
|
163
303
|
];
|
|
164
304
|
exports.predictionFields = [
|
|
165
|
-
{
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
type: 'string',
|
|
169
|
-
displayOptions: {
|
|
170
|
-
show: {
|
|
171
|
-
resource: ['prediction'],
|
|
172
|
-
operation: ['createPrediction'],
|
|
173
|
-
},
|
|
174
|
-
},
|
|
175
|
-
default: '',
|
|
176
|
-
required: true,
|
|
177
|
-
placeholder: 'e.g. Will I win this match?',
|
|
178
|
-
description: 'The question that viewers are predicting. Maximum: 45 characters.',
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
displayName: 'Outcome 1 Title',
|
|
182
|
-
name: 'outcome1Title',
|
|
183
|
-
type: 'string',
|
|
184
|
-
displayOptions: {
|
|
185
|
-
show: {
|
|
186
|
-
resource: ['prediction'],
|
|
187
|
-
operation: ['createPrediction'],
|
|
188
|
-
},
|
|
189
|
-
},
|
|
190
|
-
default: '',
|
|
191
|
-
required: true,
|
|
192
|
-
placeholder: 'e.g. Yes',
|
|
193
|
-
description: 'The title for the first outcome. Maximum: 25 characters.',
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
displayName: 'Outcome 2 Title',
|
|
197
|
-
name: 'outcome2Title',
|
|
198
|
-
type: 'string',
|
|
199
|
-
displayOptions: {
|
|
200
|
-
show: {
|
|
201
|
-
resource: ['prediction'],
|
|
202
|
-
operation: ['createPrediction'],
|
|
203
|
-
},
|
|
204
|
-
},
|
|
205
|
-
default: '',
|
|
206
|
-
required: true,
|
|
207
|
-
placeholder: 'e.g. No',
|
|
208
|
-
description: 'The title for the second outcome. Maximum: 25 characters.',
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
displayName: 'Prediction Window',
|
|
212
|
-
name: 'predictionWindow',
|
|
213
|
-
type: 'number',
|
|
214
|
-
displayOptions: {
|
|
215
|
-
show: {
|
|
216
|
-
resource: ['prediction'],
|
|
217
|
-
operation: ['createPrediction'],
|
|
218
|
-
},
|
|
219
|
-
},
|
|
220
|
-
default: 120,
|
|
221
|
-
required: true,
|
|
222
|
-
typeOptions: {
|
|
223
|
-
minValue: 30,
|
|
224
|
-
maxValue: 1800,
|
|
225
|
-
},
|
|
226
|
-
description: 'The length of time (in seconds) that viewers have to make a prediction. Minimum: 30. Maximum: 1800.',
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
displayName: 'Prediction ID',
|
|
230
|
-
name: 'predictionId',
|
|
231
|
-
type: 'string',
|
|
232
|
-
displayOptions: {
|
|
233
|
-
show: {
|
|
234
|
-
resource: ['prediction'],
|
|
235
|
-
operation: ['getPredictions'],
|
|
236
|
-
},
|
|
237
|
-
},
|
|
238
|
-
default: '',
|
|
239
|
-
placeholder: 'e.g. abc123-def456-ghi789',
|
|
240
|
-
description: 'The ID of the prediction to get. If not specified, returns all predictions for the broadcaster.',
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
displayName: 'Prediction ID',
|
|
244
|
-
name: 'endPredictionId',
|
|
245
|
-
type: 'string',
|
|
246
|
-
displayOptions: {
|
|
247
|
-
show: {
|
|
248
|
-
resource: ['prediction'],
|
|
249
|
-
operation: ['endPrediction'],
|
|
250
|
-
},
|
|
251
|
-
},
|
|
252
|
-
default: '',
|
|
253
|
-
required: true,
|
|
254
|
-
placeholder: 'e.g. abc123-def456-ghi789',
|
|
255
|
-
description: 'The ID of the prediction to end',
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
displayName: 'Status',
|
|
259
|
-
name: 'status',
|
|
260
|
-
type: 'options',
|
|
261
|
-
displayOptions: {
|
|
262
|
-
show: {
|
|
263
|
-
resource: ['prediction'],
|
|
264
|
-
operation: ['endPrediction'],
|
|
265
|
-
},
|
|
266
|
-
},
|
|
267
|
-
options: [
|
|
268
|
-
{
|
|
269
|
-
name: 'RESOLVED',
|
|
270
|
-
value: 'RESOLVED',
|
|
271
|
-
description: 'The winning outcome is determined and points are distributed',
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
name: 'CANCELED',
|
|
275
|
-
value: 'CANCELED',
|
|
276
|
-
description: 'The prediction is canceled and points are refunded',
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
name: 'LOCKED',
|
|
280
|
-
value: 'LOCKED',
|
|
281
|
-
description: 'The prediction is locked and viewers can no longer make predictions',
|
|
282
|
-
},
|
|
283
|
-
],
|
|
284
|
-
default: 'RESOLVED',
|
|
285
|
-
required: true,
|
|
286
|
-
description: 'The status to set the prediction to',
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
displayName: 'Winning Outcome ID',
|
|
290
|
-
name: 'winningOutcomeId',
|
|
291
|
-
type: 'string',
|
|
292
|
-
displayOptions: {
|
|
293
|
-
show: {
|
|
294
|
-
resource: ['prediction'],
|
|
295
|
-
operation: ['endPrediction'],
|
|
296
|
-
status: ['RESOLVED'],
|
|
297
|
-
},
|
|
298
|
-
},
|
|
299
|
-
default: '',
|
|
300
|
-
required: true,
|
|
301
|
-
placeholder: 'e.g. outcome123',
|
|
302
|
-
description: 'The ID of the winning outcome (required when status is RESOLVED)',
|
|
303
|
-
},
|
|
305
|
+
...(0, updateDisplayOptions_1.updateDisplayOptions)({ show: { resource: ['prediction'], operation: ['createPrediction'] } }, createPredictionFields),
|
|
306
|
+
...(0, updateDisplayOptions_1.updateDisplayOptions)({ show: { resource: ['prediction'], operation: ['getPredictions'] } }, getPredictionsFields),
|
|
307
|
+
...(0, updateDisplayOptions_1.updateDisplayOptions)({ show: { resource: ['prediction'], operation: ['endPrediction'] } }, endPredictionFields),
|
|
304
308
|
];
|
|
305
309
|
//# sourceMappingURL=Prediction.js.map
|