@lumiastream/lumia-types 2.3.6 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-overlays/custom-overlays-alerts.d.ts +521 -0
- package/dist/custom-overlays/custom-overlays-cheatsheet.md +271 -0
- package/dist/custom-overlays/custom-overlays-documentation.md +815 -0
- package/dist/custom-overlays/custom-overlays-examples.md +2308 -0
- package/dist/custom-overlays/custom-overlays.d.ts +1406 -0
- package/dist/custom-overlays.d.ts +1406 -0
- package/package.json +4 -3
|
@@ -0,0 +1,521 @@
|
|
|
1
|
+
/// <reference path="./custom-overlays.d.ts" />
|
|
2
|
+
|
|
3
|
+
import { LumiaAlertValues } from './custom-overlays';
|
|
4
|
+
|
|
5
|
+
/* -------------------------------------------------------------------------- */
|
|
6
|
+
/* Utility + shared pieces */
|
|
7
|
+
/* -------------------------------------------------------------------------- */
|
|
8
|
+
|
|
9
|
+
/** Known platforms (extendable). */
|
|
10
|
+
type Platform = 'twitch' | 'youtube' | 'kick' | 'tiktok' | 'facebook' | 'trovo' | string;
|
|
11
|
+
|
|
12
|
+
/** ISO-8601 timestamp branding for better editor hints. */
|
|
13
|
+
type ISODateString = string & { __iso8601: true };
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Timing metadata for alerts.
|
|
17
|
+
* - `checkTimingType: false` → no timing info
|
|
18
|
+
* - `timingType: "duration"` → show for a number of milliseconds
|
|
19
|
+
* - `timingType: "cycle"` → show for a number of cycles (app-defined)
|
|
20
|
+
*/
|
|
21
|
+
type Timing = { checkTimingType: false } | { checkTimingType: true; timingType: 'duration'; duration: number } | { checkTimingType: true; timingType: 'cycle'; cycles: number };
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Common fields many alerts include.
|
|
25
|
+
* These are merged into each alert’s `extraSettings`.
|
|
26
|
+
*/
|
|
27
|
+
interface CommonExtras {
|
|
28
|
+
/** Origin site/platform for this alert (e.g., "twitch"). */
|
|
29
|
+
site: Platform;
|
|
30
|
+
/** ISO-8601 timestamp when the alert originated. */
|
|
31
|
+
timestamp: ISODateString;
|
|
32
|
+
|
|
33
|
+
/** Username on the origin platform (if available). */
|
|
34
|
+
username?: string;
|
|
35
|
+
/** Display name on the origin platform (if available). */
|
|
36
|
+
displayname?: string;
|
|
37
|
+
/** User ID on the origin platform (string or number). */
|
|
38
|
+
userId?: string | number;
|
|
39
|
+
/** Avatar URL (nullable if not provided). */
|
|
40
|
+
avatar?: string | null;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Canonical base alert shape used by all specific alerts.
|
|
45
|
+
* `dynamic` is narrowed automatically when `alert` is a specific discriminator.
|
|
46
|
+
*/
|
|
47
|
+
interface BaseAlert<T extends LumiaAlertValues, D extends object, E extends object> {
|
|
48
|
+
/** Discriminant – use values from LumiaAlertValues (e.g., "twitch-subscriber"). */
|
|
49
|
+
alert: T;
|
|
50
|
+
/** Alert payload that varies by alert type (narrowed via `alert`). */
|
|
51
|
+
dynamic: D;
|
|
52
|
+
/**
|
|
53
|
+
* Extra settings – alert-specific fields merged with shared `CommonExtras` and `Timing`.
|
|
54
|
+
* Do NOT duplicate CommonExtras fields in specialisations unless they truly differ.
|
|
55
|
+
*/
|
|
56
|
+
extraSettings: E & CommonExtras & Timing;
|
|
57
|
+
/**
|
|
58
|
+
* Whether this alert originated from Lumia’s internal pipeline.
|
|
59
|
+
* Kept as boolean to make testing/mocking easier.
|
|
60
|
+
*/
|
|
61
|
+
fromLumia: boolean;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* -------------------------------------------------------------------------- */
|
|
65
|
+
/* Per-alert specialisations */
|
|
66
|
+
/* -------------------------------------------------------------------------- */
|
|
67
|
+
|
|
68
|
+
/** New follower on Twitch. */
|
|
69
|
+
type TwitchFollower = BaseAlert<
|
|
70
|
+
LumiaAlertValues.TWITCH_FOLLOWER,
|
|
71
|
+
Record<string, never>,
|
|
72
|
+
{
|
|
73
|
+
/** Channel view count (at time of alert). */
|
|
74
|
+
channelViews: number;
|
|
75
|
+
/** Channel description text. */
|
|
76
|
+
channelDescription: string;
|
|
77
|
+
}
|
|
78
|
+
>;
|
|
79
|
+
|
|
80
|
+
/** Incoming raid on Twitch. */
|
|
81
|
+
type TwitchRaid = BaseAlert<
|
|
82
|
+
LumiaAlertValues.TWITCH_RAID,
|
|
83
|
+
{
|
|
84
|
+
/** Raid size / viewer count. */
|
|
85
|
+
value: number;
|
|
86
|
+
/** Raider username (convenience duplicate). */
|
|
87
|
+
username: string;
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
/** Viewers included in the raid (vendor field). */
|
|
91
|
+
viewers: number;
|
|
92
|
+
/** Optional expanded channel description. */
|
|
93
|
+
channelDescription: string | null;
|
|
94
|
+
/** Avatar URL for raider. */
|
|
95
|
+
avatar: string;
|
|
96
|
+
/** Channel views for raider. */
|
|
97
|
+
channelViews: number;
|
|
98
|
+
/** Optional display message from the raider. */
|
|
99
|
+
message?: string | null;
|
|
100
|
+
}
|
|
101
|
+
>;
|
|
102
|
+
|
|
103
|
+
/** Cheer/Bits on Twitch (including PowerUps also modeled separately). */
|
|
104
|
+
type TwitchBits = BaseAlert<
|
|
105
|
+
LumiaAlertValues.TWITCH_BITS,
|
|
106
|
+
{
|
|
107
|
+
/** Canonical numeric value of the contribution. */
|
|
108
|
+
value: number;
|
|
109
|
+
/** Cheer username. */
|
|
110
|
+
username: string;
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
/** Bits reported by vendor. */
|
|
114
|
+
bits: number;
|
|
115
|
+
/** Amount reported by vendor (kept for parity). */
|
|
116
|
+
amount: number;
|
|
117
|
+
/** Optional message accompanying the cheer. */
|
|
118
|
+
message: string | null;
|
|
119
|
+
/** Raw message string from the platform. */
|
|
120
|
+
rawMessage: string;
|
|
121
|
+
/** Full message (Lumia-computed, if present). */
|
|
122
|
+
full_message: string;
|
|
123
|
+
/** Channel views at time of alert. */
|
|
124
|
+
channelViews: number;
|
|
125
|
+
/** Channel description text. */
|
|
126
|
+
channelDescription: string | null;
|
|
127
|
+
}
|
|
128
|
+
>;
|
|
129
|
+
|
|
130
|
+
/** Subscription event on Twitch (sub, resub, gift). */
|
|
131
|
+
type TwitchSubscriber = BaseAlert<
|
|
132
|
+
LumiaAlertValues.TWITCH_SUBSCRIBER,
|
|
133
|
+
| {
|
|
134
|
+
/** Tier value for sub/resub ("1000" | "2000" | "3000"). */
|
|
135
|
+
value: '1000' | '2000' | '3000';
|
|
136
|
+
/** Subscriber username. */
|
|
137
|
+
username: string;
|
|
138
|
+
/** Total months subbed. */
|
|
139
|
+
subMonths: number;
|
|
140
|
+
/** Current streak months. */
|
|
141
|
+
streakMonths: number;
|
|
142
|
+
/** Whether this is a Prime sub. */
|
|
143
|
+
isPrime: boolean;
|
|
144
|
+
}
|
|
145
|
+
| {
|
|
146
|
+
/** Tier value for gifted sub. */
|
|
147
|
+
value: '1000' | '2000' | '3000';
|
|
148
|
+
/** Gifter username. */
|
|
149
|
+
username: string;
|
|
150
|
+
/** Recipient months (vendor value; may be present). */
|
|
151
|
+
subMonths: number;
|
|
152
|
+
/** Number of subs gifted in this event. */
|
|
153
|
+
giftAmount: number;
|
|
154
|
+
/** Cumulative gifted subs by this gifter. */
|
|
155
|
+
totalGifts: number;
|
|
156
|
+
/** Gift indicator. */
|
|
157
|
+
isGift: true;
|
|
158
|
+
/** Whether the gifter is anonymous. */
|
|
159
|
+
isAnon?: boolean;
|
|
160
|
+
/** Whether this event is Prime (rare for gifts). */
|
|
161
|
+
isPrime: boolean;
|
|
162
|
+
/** Whether this is a resub gift. */
|
|
163
|
+
isResub: boolean;
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
/** Tier name ("Tier 1", "Tier 2", "Tier 3"). */
|
|
167
|
+
subPlanName: string;
|
|
168
|
+
/** Tier code ("1000" | "2000" | "3000"). */
|
|
169
|
+
subPlan: string;
|
|
170
|
+
/** Tier value duplicate for convenience. */
|
|
171
|
+
value: '1000' | '2000' | '3000';
|
|
172
|
+
/** Optional display/sticker message. */
|
|
173
|
+
message: string | null;
|
|
174
|
+
/** Gifter username, if applicable. */
|
|
175
|
+
gifter?: string;
|
|
176
|
+
/** Recipient username, if applicable. */
|
|
177
|
+
recipient?: string;
|
|
178
|
+
/** Comma-separated recipients (mass gift). */
|
|
179
|
+
recipients?: string;
|
|
180
|
+
/** Streak months (duplicated in dynamic for normal/resub). */
|
|
181
|
+
streakMonths?: number;
|
|
182
|
+
/** Gift bundle size (duplicated) */
|
|
183
|
+
giftAmount?: number;
|
|
184
|
+
/** Cumulative gift count by gifter. */
|
|
185
|
+
totalGifts?: number;
|
|
186
|
+
/** String tier (e.g., "Prime", "1000"). */
|
|
187
|
+
tier: string;
|
|
188
|
+
}
|
|
189
|
+
>;
|
|
190
|
+
|
|
191
|
+
/** Twitch PowerUps (bits-based effects). */
|
|
192
|
+
type TwitchPowerup = BaseAlert<
|
|
193
|
+
LumiaAlertValues.TWITCH_POWERUPS,
|
|
194
|
+
{
|
|
195
|
+
/** Human-friendly name of the PowerUp. */
|
|
196
|
+
name: string;
|
|
197
|
+
/** Canonical numeric value (e.g., bits). */
|
|
198
|
+
value: number;
|
|
199
|
+
/** Username who triggered the PowerUp. */
|
|
200
|
+
username: string;
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
/** Bits reported by vendor. */
|
|
204
|
+
bits: number;
|
|
205
|
+
/** Vendor-provided type string. */
|
|
206
|
+
type: string;
|
|
207
|
+
/** Vendor amount (mirrors value). */
|
|
208
|
+
amount: number;
|
|
209
|
+
/** Raw chat message, if present. */
|
|
210
|
+
rawMessage: string | null;
|
|
211
|
+
/** Full message (Lumia-computed), if present. */
|
|
212
|
+
full_message: string | null;
|
|
213
|
+
/** Channel views at time of alert. */
|
|
214
|
+
channelViews: number;
|
|
215
|
+
/** Channel description text. */
|
|
216
|
+
channelDescription: string | null;
|
|
217
|
+
}
|
|
218
|
+
>;
|
|
219
|
+
|
|
220
|
+
/** Twitch Extension monetization / points. */
|
|
221
|
+
type TwitchExtension = BaseAlert<
|
|
222
|
+
LumiaAlertValues.TWITCH_EXTENSION,
|
|
223
|
+
{
|
|
224
|
+
/** Redeemer username. */
|
|
225
|
+
username: string;
|
|
226
|
+
/** Item/extension name. */
|
|
227
|
+
name: string;
|
|
228
|
+
/** Currency type for the extension. */
|
|
229
|
+
currency: 'points' | 'bits';
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
/** Bits-based amount (when applicable). */
|
|
233
|
+
bits: number;
|
|
234
|
+
/** Numeric amount (points or bits). */
|
|
235
|
+
amount: number;
|
|
236
|
+
/** Origin tag for the event. */
|
|
237
|
+
origin: 'twitch-extension';
|
|
238
|
+
/** Command invoked within the extension. */
|
|
239
|
+
command: string;
|
|
240
|
+
/** Command identifier. */
|
|
241
|
+
command_id: string;
|
|
242
|
+
/** Message text (extension-defined). */
|
|
243
|
+
message: string;
|
|
244
|
+
/** Currency string echo. */
|
|
245
|
+
currency: 'points' | 'bits';
|
|
246
|
+
/** Amount type echo. */
|
|
247
|
+
amount_type: 'points' | 'bits';
|
|
248
|
+
/** Currency symbol (if applicable). */
|
|
249
|
+
currencySymbol: string;
|
|
250
|
+
/** Platform is always "twitch" for this alert. */
|
|
251
|
+
platform: 'twitch';
|
|
252
|
+
/** Channel views at time of alert (string|number to match vendor inconsistencies). */
|
|
253
|
+
channelViews: string | number;
|
|
254
|
+
/** Full message (Lumia-computed), if present. */
|
|
255
|
+
full_message: string;
|
|
256
|
+
/** Channel description text. */
|
|
257
|
+
channelDescription: string;
|
|
258
|
+
}
|
|
259
|
+
>;
|
|
260
|
+
|
|
261
|
+
/** Tiltify campaign donation. */
|
|
262
|
+
type TiltifyDonation = BaseAlert<
|
|
263
|
+
LumiaAlertValues.TILTIFY_DONATION,
|
|
264
|
+
{
|
|
265
|
+
/** Canonical numeric donation amount. */
|
|
266
|
+
value: number;
|
|
267
|
+
/** ISO currency code (e.g., "USD"). */
|
|
268
|
+
currency: string;
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
/** Raw amount string as provided by vendor. */
|
|
272
|
+
amount: string;
|
|
273
|
+
/** Optional donor message. */
|
|
274
|
+
message: string | null;
|
|
275
|
+
}
|
|
276
|
+
>;
|
|
277
|
+
|
|
278
|
+
/** New follower on Kick. */
|
|
279
|
+
type KickFollower = BaseAlert<
|
|
280
|
+
LumiaAlertValues.KICK_FOLLOWER,
|
|
281
|
+
{
|
|
282
|
+
/** Usually an empty string; keep for parity. */
|
|
283
|
+
value: string;
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
/** Nullable avatar URL. */
|
|
287
|
+
avatar: string | null;
|
|
288
|
+
}
|
|
289
|
+
>;
|
|
290
|
+
|
|
291
|
+
/** Kick channel “Points” (custom loyalty on Kick). */
|
|
292
|
+
type KickPoints = BaseAlert<
|
|
293
|
+
LumiaAlertValues.KICK_POINTS,
|
|
294
|
+
{
|
|
295
|
+
/** Numeric points value used for this redemption. */
|
|
296
|
+
value: number;
|
|
297
|
+
/** Command/name of the points trigger. */
|
|
298
|
+
name: string;
|
|
299
|
+
/** Currency discriminator for points. */
|
|
300
|
+
currency: 'points';
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
/** Display title for the points command. */
|
|
304
|
+
title: string;
|
|
305
|
+
/** Echo of numeric value as string. */
|
|
306
|
+
value: string;
|
|
307
|
+
/** Amount as number (same as numeric value). */
|
|
308
|
+
amount: number;
|
|
309
|
+
/** Origin tag for the event. */
|
|
310
|
+
origin: 'kick-points';
|
|
311
|
+
/** Points value (duplicate). */
|
|
312
|
+
points: number;
|
|
313
|
+
/** Optional prompt text associated with the command. */
|
|
314
|
+
prompt: string | null;
|
|
315
|
+
/** The Kick command triggered. */
|
|
316
|
+
command: string;
|
|
317
|
+
/** Raw chat message (if present). */
|
|
318
|
+
message: string | null;
|
|
319
|
+
/** Platform discriminator. */
|
|
320
|
+
platform: 'kick';
|
|
321
|
+
/** Raw message (not parsed). */
|
|
322
|
+
rawMessage: string | null;
|
|
323
|
+
/** Amount type echo. */
|
|
324
|
+
amount_type: 'points';
|
|
325
|
+
/** Currency symbol (if set). */
|
|
326
|
+
currencySymbol: string;
|
|
327
|
+
/** Raw user levels map. */
|
|
328
|
+
userLevelsRaw: {
|
|
329
|
+
mod: boolean;
|
|
330
|
+
vip: boolean;
|
|
331
|
+
isSelf: boolean;
|
|
332
|
+
follower: boolean;
|
|
333
|
+
subscriber: boolean;
|
|
334
|
+
};
|
|
335
|
+
/** Lumia internal user levels. */
|
|
336
|
+
lumiauserlevels: number[];
|
|
337
|
+
}
|
|
338
|
+
>;
|
|
339
|
+
|
|
340
|
+
/** TikTok gift (coins/diamonds). */
|
|
341
|
+
type TikTokGift = BaseAlert<
|
|
342
|
+
LumiaAlertValues.TIKTOK_GIFT,
|
|
343
|
+
{
|
|
344
|
+
/** Gift display name. */
|
|
345
|
+
name: string;
|
|
346
|
+
/** Canonical numeric value for this gift event. */
|
|
347
|
+
value: number;
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
/** TikTok coins value. */
|
|
351
|
+
coins: number;
|
|
352
|
+
/** Same as value (vendor echo). */
|
|
353
|
+
value: number;
|
|
354
|
+
/** Gift numeric ID. */
|
|
355
|
+
giftId: number;
|
|
356
|
+
/** Sender user ID. */
|
|
357
|
+
userId: string;
|
|
358
|
+
/** Gift description. */
|
|
359
|
+
describe: string;
|
|
360
|
+
/** Gift name (echo). */
|
|
361
|
+
giftName: string;
|
|
362
|
+
/** TikTok gift type code. */
|
|
363
|
+
giftType: number;
|
|
364
|
+
/** Sender username. */
|
|
365
|
+
username: string;
|
|
366
|
+
/** Whether repeat animation ended. */
|
|
367
|
+
repeatEnd: boolean;
|
|
368
|
+
/** Repeat count. */
|
|
369
|
+
repeatCount: number;
|
|
370
|
+
/** Diamonds for the gift. */
|
|
371
|
+
diamondCount: number;
|
|
372
|
+
/** URL of the gift picture. */
|
|
373
|
+
giftPictureUrl: string;
|
|
374
|
+
/** Receiver user ID, if applicable. */
|
|
375
|
+
receiverUserId: string;
|
|
376
|
+
/** Sender avatar URL. */
|
|
377
|
+
profilePictureUrl: string;
|
|
378
|
+
/** Sender display name. */
|
|
379
|
+
displayname: string;
|
|
380
|
+
/** Whether this is a new gifter. */
|
|
381
|
+
isNewGifter: boolean;
|
|
382
|
+
}
|
|
383
|
+
>;
|
|
384
|
+
|
|
385
|
+
/** New subscriber on YouTube. */
|
|
386
|
+
type YouTubeSubscriber = BaseAlert<
|
|
387
|
+
LumiaAlertValues.YOUTUBE_SUBSCRIBER,
|
|
388
|
+
{
|
|
389
|
+
/** Usually an empty string; keep for parity. */
|
|
390
|
+
value: string;
|
|
391
|
+
},
|
|
392
|
+
Record<string, never>
|
|
393
|
+
>;
|
|
394
|
+
|
|
395
|
+
/** YouTube SuperSticker. */
|
|
396
|
+
type YouTubeSuperSticker = BaseAlert<
|
|
397
|
+
LumiaAlertValues.YOUTUBE_SUPERSTICKER,
|
|
398
|
+
{
|
|
399
|
+
/** Canonical numeric value of the sticker purchase. */
|
|
400
|
+
value: number;
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
/** Amount numeric (duplicate). */
|
|
404
|
+
amount: number;
|
|
405
|
+
}
|
|
406
|
+
>;
|
|
407
|
+
|
|
408
|
+
/** YouTube SuperChat. */
|
|
409
|
+
type YouTubeSuperChat = BaseAlert<
|
|
410
|
+
LumiaAlertValues.YOUTUBE_SUPERCHAT,
|
|
411
|
+
{
|
|
412
|
+
/** Canonical numeric value for the SuperChat. */
|
|
413
|
+
value: number;
|
|
414
|
+
/** ISO currency code (e.g., "USD"). */
|
|
415
|
+
currency: string;
|
|
416
|
+
/** SuperChatter username. */
|
|
417
|
+
username: string;
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
/** Numeric amount (duplicate). */
|
|
421
|
+
amount: number;
|
|
422
|
+
/** Currency code (duplicate). */
|
|
423
|
+
currency: string;
|
|
424
|
+
/** Convenience duplicate of value for some toolchains. */
|
|
425
|
+
value: number;
|
|
426
|
+
}
|
|
427
|
+
>;
|
|
428
|
+
|
|
429
|
+
/** YouTube channel membership (join/renew). */
|
|
430
|
+
type YouTubeMember = BaseAlert<
|
|
431
|
+
LumiaAlertValues.YOUTUBE_MEMBER,
|
|
432
|
+
{
|
|
433
|
+
/** Usually an empty string; keep for parity. */
|
|
434
|
+
value: string;
|
|
435
|
+
},
|
|
436
|
+
Record<string, never>
|
|
437
|
+
>;
|
|
438
|
+
|
|
439
|
+
/** Crowd Control effect fired (for supported platforms). */
|
|
440
|
+
type CrowdControlEffect = BaseAlert<
|
|
441
|
+
LumiaAlertValues.CROWDCONTROL_EFFECT,
|
|
442
|
+
{
|
|
443
|
+
/** Raw value (effect identifier or label). */
|
|
444
|
+
value: string;
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
/** Game name. */
|
|
448
|
+
game: string;
|
|
449
|
+
/** Effect label. */
|
|
450
|
+
effect: string;
|
|
451
|
+
/** Game ID (vendor). */
|
|
452
|
+
gameId: string;
|
|
453
|
+
/** Artwork URL for game/effect. */
|
|
454
|
+
artwork: string;
|
|
455
|
+
/** Optional message. */
|
|
456
|
+
message: string;
|
|
457
|
+
/** Effect ID. */
|
|
458
|
+
effectId: string;
|
|
459
|
+
/** Platform running the effect. */
|
|
460
|
+
platform: 'twitch' | 'youtube' | 'kick';
|
|
461
|
+
/** Duration in milliseconds. */
|
|
462
|
+
duration: number;
|
|
463
|
+
}
|
|
464
|
+
>;
|
|
465
|
+
|
|
466
|
+
/* -------------------------------------------------------------------------- */
|
|
467
|
+
/* All alerts together */
|
|
468
|
+
/* -------------------------------------------------------------------------- */
|
|
469
|
+
|
|
470
|
+
/** Discriminated union of all supported alerts. */
|
|
471
|
+
export type LumiaAlert =
|
|
472
|
+
| TwitchFollower
|
|
473
|
+
| TwitchRaid
|
|
474
|
+
| TwitchBits
|
|
475
|
+
| TwitchSubscriber
|
|
476
|
+
| TwitchPowerup
|
|
477
|
+
| TwitchExtension
|
|
478
|
+
| TiltifyDonation
|
|
479
|
+
| KickFollower
|
|
480
|
+
| KickPoints
|
|
481
|
+
| TikTokGift
|
|
482
|
+
| YouTubeSubscriber
|
|
483
|
+
| YouTubeSuperSticker
|
|
484
|
+
| YouTubeSuperChat
|
|
485
|
+
| YouTubeMember
|
|
486
|
+
| CrowdControlEffect;
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Map from alert discriminator to its concrete alert type.
|
|
490
|
+
* Useful for generic helpers and editor navigation.
|
|
491
|
+
*/
|
|
492
|
+
export interface AlertMap {
|
|
493
|
+
[LumiaAlertValues.TWITCH_FOLLOWER]: TwitchFollower;
|
|
494
|
+
[LumiaAlertValues.TWITCH_RAID]: TwitchRaid;
|
|
495
|
+
[LumiaAlertValues.TWITCH_BITS]: TwitchBits;
|
|
496
|
+
[LumiaAlertValues.TWITCH_SUBSCRIBER]: TwitchSubscriber;
|
|
497
|
+
[LumiaAlertValues.TWITCH_POWERUPS]: TwitchPowerup;
|
|
498
|
+
[LumiaAlertValues.TWITCH_EXTENSION]: TwitchExtension;
|
|
499
|
+
[LumiaAlertValues.TILTIFY_DONATION]: TiltifyDonation;
|
|
500
|
+
[LumiaAlertValues.KICK_FOLLOWER]: KickFollower;
|
|
501
|
+
[LumiaAlertValues.KICK_POINTS]: KickPoints;
|
|
502
|
+
[LumiaAlertValues.TIKTOK_GIFT]: TikTokGift;
|
|
503
|
+
[LumiaAlertValues.YOUTUBE_SUBSCRIBER]: YouTubeSubscriber;
|
|
504
|
+
[LumiaAlertValues.YOUTUBE_SUPERSTICKER]: YouTubeSuperSticker;
|
|
505
|
+
[LumiaAlertValues.YOUTUBE_SUPERCHAT]: YouTubeSuperChat;
|
|
506
|
+
[LumiaAlertValues.YOUTUBE_MEMBER]: YouTubeMember;
|
|
507
|
+
[LumiaAlertValues.CROWDCONTROL_EFFECT]: CrowdControlEffect;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
/* -------------------------------------------------------------------------- */
|
|
511
|
+
/* Helpers – for dev ergonomics */
|
|
512
|
+
/* -------------------------------------------------------------------------- */
|
|
513
|
+
|
|
514
|
+
/** "twitch-subscriber" | "kick-points" | ... (all alert discriminants). */
|
|
515
|
+
export type AlertType = LumiaAlert['alert'];
|
|
516
|
+
|
|
517
|
+
/** Dynamic payload for a specific alert type. */
|
|
518
|
+
export type AlertDynamic<T extends AlertType> = AlertMap[T]['dynamic'];
|
|
519
|
+
|
|
520
|
+
/** Extra settings (merged with CommonExtras & Timing) for a specific alert type. */
|
|
521
|
+
export type AlertExtra<T extends AlertType> = AlertMap[T]['extraSettings'];
|