@lumiastream/lumia-types 3.5.3 → 3.5.4

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.
@@ -0,0 +1,117 @@
1
+ export const EMULATE_EXAMPLE_AVATAR_URL = 'https://static-cdn.jtvnw.net/jtv_user_pictures/2b1fa336-f9b2-42cf-bd2c-98675da74982-profile_image-300x300.png';
2
+ export function getExampleAlertVariableValue(variableName) {
3
+ const lowered = variableName.toLowerCase();
4
+ if (lowered.includes('avatar') || lowered.includes('image') || lowered.includes('thumbnail') || lowered.includes('cover') || lowered.includes('icon')) {
5
+ return EMULATE_EXAMPLE_AVATAR_URL;
6
+ }
7
+ if (lowered.includes('url') || lowered.includes('link')) {
8
+ return 'https://lumia.stream';
9
+ }
10
+ if (lowered.endsWith('symbol') || lowered === 'currencysymbol') {
11
+ return '$';
12
+ }
13
+ if (lowered.includes('currency')) {
14
+ return 'USD';
15
+ }
16
+ if (lowered.includes('color')) {
17
+ return '#FF4076';
18
+ }
19
+ if (lowered.includes('amount') ||
20
+ lowered.includes('bits') ||
21
+ lowered.includes('count') ||
22
+ lowered.includes('total') ||
23
+ lowered.includes('viewers') ||
24
+ lowered.includes('points') ||
25
+ lowered.includes('level') ||
26
+ lowered.includes('progress') ||
27
+ lowered.includes('duration') ||
28
+ lowered.includes('price')) {
29
+ return 42;
30
+ }
31
+ if (lowered.startsWith('is') || lowered.startsWith('has') || lowered.startsWith('can') || lowered.startsWith('should')) {
32
+ return true;
33
+ }
34
+ if (lowered.includes('date')) {
35
+ return new Date().toISOString().slice(0, 10);
36
+ }
37
+ if (lowered.includes('time')) {
38
+ return new Date().toISOString();
39
+ }
40
+ if (lowered.includes('song') || lowered.includes('track') || lowered.includes('title')) {
41
+ return 'Example Title';
42
+ }
43
+ if (lowered.includes('artist')) {
44
+ return 'Example Artist';
45
+ }
46
+ if (lowered.includes('album')) {
47
+ return 'Example Album';
48
+ }
49
+ if (lowered.includes('username') || lowered.includes('user') || lowered.includes('viewer') || lowered.includes('sender') || lowered.includes('author')) {
50
+ return 'lumiastream';
51
+ }
52
+ if (lowered.includes('message') || lowered.includes('text') || lowered.includes('content') || lowered.includes('body')) {
53
+ return 'Example message';
54
+ }
55
+ if (lowered.endsWith('id') || lowered.includes('_id')) {
56
+ return '12345';
57
+ }
58
+ return `Example ${variableName}`;
59
+ }
60
+ export function buildExampleAlertVariables(acceptedVariables, existingExtraSettings) {
61
+ if (!Array.isArray(acceptedVariables) || acceptedVariables.length === 0) {
62
+ return {};
63
+ }
64
+ const currentValues = existingExtraSettings !== null && existingExtraSettings !== void 0 ? existingExtraSettings : {};
65
+ return acceptedVariables.reduce((all, variableName) => {
66
+ if (typeof variableName !== 'string') {
67
+ return all;
68
+ }
69
+ const cleanedVariableName = variableName.replace(/^\{\{|\}\}$/g, '').trim();
70
+ if (!cleanedVariableName) {
71
+ return all;
72
+ }
73
+ if (Object.prototype.hasOwnProperty.call(currentValues, cleanedVariableName)) {
74
+ return all;
75
+ }
76
+ return { ...all, [cleanedVariableName]: getExampleAlertVariableValue(cleanedVariableName) };
77
+ }, {});
78
+ }
79
+ const LINKED_VARIABLE_FIELD_GROUPS = [['giftAmount', 'amount']];
80
+ export function isRedundantInputField(inputField, allInputFields) {
81
+ if (!inputField || !allInputFields)
82
+ return false;
83
+ for (const group of LINKED_VARIABLE_FIELD_GROUPS) {
84
+ const idx = group.indexOf(inputField.variableField);
85
+ if (idx <= 0)
86
+ continue;
87
+ const primary = group[0];
88
+ if (allInputFields.some((f) => f.variableField === primary)) {
89
+ return true;
90
+ }
91
+ }
92
+ return false;
93
+ }
94
+ export function syncLinkedVariableFields(values) {
95
+ if (!values)
96
+ return;
97
+ for (const group of LINKED_VARIABLE_FIELD_GROUPS) {
98
+ let source;
99
+ let sourceKey;
100
+ for (const key of group) {
101
+ if (values[key] !== undefined && values[key] !== null && values[key] !== '') {
102
+ source = values[key];
103
+ sourceKey = key;
104
+ break;
105
+ }
106
+ }
107
+ if (sourceKey === undefined)
108
+ continue;
109
+ for (const key of group) {
110
+ if (key === sourceKey)
111
+ continue;
112
+ if (values[key] === undefined || values[key] === null || values[key] === '') {
113
+ values[key] = source;
114
+ }
115
+ }
116
+ }
117
+ }
@@ -90,7 +90,6 @@ export const LumiaMapAlertTypeToEventListType = {
90
90
  [LumiaAlertValues.TWITCH_HYPETRAIN_STARTED]: LumiaEventListTypes.HYPETRAIN,
91
91
  [LumiaAlertValues.TWITCH_CHARITY_DONATION]: LumiaEventListTypes.CHARITY,
92
92
  [LumiaAlertValues.TWITCH_POWERUPS]: LumiaEventListTypes.BITS,
93
- [LumiaAlertValues.TWITCH_POWERUPS_POINTS]: LumiaEventListTypes.POINTS,
94
93
  // --- YouTube ---
95
94
  [LumiaAlertValues.YOUTUBE_SUBSCRIBER]: LumiaEventListTypes.FOLLOWER,
96
95
  [LumiaAlertValues.YOUTUBE_SESSION_SUBS]: LumiaEventListTypes.FOLLOWER,
package/dist/esm/index.js CHANGED
@@ -4,6 +4,7 @@ export { LumiaIntegrations, LumiaEventTypes, } from './event.types.js';
4
4
  export { LumiaEventListTypes, LumiaMapAlertTypeToEventListType, AlertsToFilter, PlatformsToFilter, LumiaEventListTypeColors, getEventListCategoryColor } from './eventlist.types.js';
5
5
  export { SystemVariables, ReservedVariables, AllVariables, getAcceptedVariableName, getAcceptedVariableNames, } from './variables.types.js';
6
6
  export { formatCondition } from './helpers.js';
7
+ export { EMULATE_EXAMPLE_AVATAR_URL, getExampleAlertVariableValue, buildExampleAlertVariables, isRedundantInputField, syncLinkedVariableFields, } from './emulate.helpers.js';
7
8
  export { KickKicksData } from './kick_kicks.js';
8
9
  export { BLANK_OVERLAY_TEMPLATE_ID } from './overlay_template.types.js';
9
10
  export { TiktokGiftsData } from './tiktok_gifts.js';
@@ -727,6 +727,10 @@ export var SystemVariables;
727
727
  SystemVariables["SPOTIFY_NOW_PLAYING_URL"] = "spotify_now_playing_url";
728
728
  /** Now playing Spotify URI. Use as {{spotify_now_playing_uri}}. */
729
729
  SystemVariables["SPOTIFY_NOW_PLAYING_URI"] = "spotify_now_playing_uri";
730
+ /** Now playing track duration in seconds. Use as {{spotify_now_playing_duration}}. */
731
+ SystemVariables["SPOTIFY_NOW_PLAYING_DURATION"] = "spotify_now_playing_duration";
732
+ /** Now playing track progress (current position) in seconds. Use as {{spotify_now_playing_progress}}. */
733
+ SystemVariables["SPOTIFY_NOW_PLAYING_PROGRESS"] = "spotify_now_playing_progress";
730
734
  /** Next song title. Use as {{spotify_next_song}}. */
731
735
  SystemVariables["SPOTIFY_NEXT_SONG"] = "spotify_next_song";
732
736
  /** Next song artwork URL. Use as {{spotify_next_image}}. */
@@ -752,6 +756,10 @@ export var SystemVariables;
752
756
  SystemVariables["YOUTUBEMUSIC_NOW_PLAYING_ID"] = "youtubemusic_now_playing_id";
753
757
  /** Now playing URL. Use as {{youtubemusic_now_playing_url}}. */
754
758
  SystemVariables["YOUTUBEMUSIC_NOW_PLAYING_URL"] = "youtubemusic_now_playing_url";
759
+ /** Now playing track duration in seconds. Use as {{youtubemusic_now_playing_duration}}. */
760
+ SystemVariables["YOUTUBEMUSIC_NOW_PLAYING_DURATION"] = "youtubemusic_now_playing_duration";
761
+ /** Now playing track progress (current position) in seconds. Use as {{youtubemusic_now_playing_progress}}. */
762
+ SystemVariables["YOUTUBEMUSIC_NOW_PLAYING_PROGRESS"] = "youtubemusic_now_playing_progress";
755
763
  /** Next song title. Use as {{youtubemusic_next_song}}. */
756
764
  SystemVariables["YOUTUBEMUSIC_NEXT_SONG"] = "youtubemusic_next_song";
757
765
  /** Next song artwork URL. Use as {{youtubemusic_next_image}}. */
@@ -808,6 +816,10 @@ export var SystemVariables;
808
816
  SystemVariables["VLC_NOW_PLAYING_ID"] = "vlc_now_playing_id";
809
817
  /** Media URL. Use as {{vlc_now_playing_url}}. */
810
818
  SystemVariables["VLC_NOW_PLAYING_URL"] = "vlc_now_playing_url";
819
+ /** Now playing media duration in seconds. Use as {{vlc_now_playing_duration}}. */
820
+ SystemVariables["VLC_NOW_PLAYING_DURATION"] = "vlc_now_playing_duration";
821
+ /** Now playing media progress (current position) in seconds. Use as {{vlc_now_playing_progress}}. */
822
+ SystemVariables["VLC_NOW_PLAYING_PROGRESS"] = "vlc_now_playing_progress";
811
823
  /** Media URI. Use as {{vlc_now_playing_uri}}. */
812
824
  SystemVariables["VLC_NOW_PLAYING_URI"] = "vlc_now_playing_uri";
813
825
  // ────────────────────────────────── Voicemod ──────────────────────────────────
@@ -2231,6 +2243,8 @@ export const AllVariables = {
2231
2243
  'spotify_now_playing_artist',
2232
2244
  'spotify_now_playing_uri',
2233
2245
  'spotify_now_playing_url',
2246
+ 'spotify_now_playing_duration',
2247
+ 'spotify_now_playing_progress',
2234
2248
  'spotify_next_song',
2235
2249
  'spotify_next_image',
2236
2250
  'spotify_next_artist',
@@ -2586,7 +2600,6 @@ export const AllVariables = {
2586
2600
  adStopped: ['length', 'is_automatic', 'started_at', 'twitch_next_ad', 'amount'],
2587
2601
  watchStreak: ['username', 'userId', 'displayname', 'avatar', 'streak_count', 'channel_points_awarded', 'amount', 'message', 'system_message'],
2588
2602
  powerups: ['username', 'avatar', 'type', 'amount', 'message', 'reward_id', 'powerup_source'],
2589
- powerupsPoints: ['username', 'avatar', 'type', 'amount', 'message'],
2590
2603
  },
2591
2604
  },
2592
2605
  twitter: {
@@ -2637,7 +2650,7 @@ export const AllVariables = {
2637
2650
  },
2638
2651
  },
2639
2652
  vlc: {
2640
- variables: ['vlc_now_playing_media', 'vlc_now_playing_image', 'vlc_now_playing_id', 'vlc_now_playing_artist', 'vlc_now_playing_uri', 'vlc_now_playing_url'],
2653
+ variables: ['vlc_now_playing_media', 'vlc_now_playing_image', 'vlc_now_playing_id', 'vlc_now_playing_artist', 'vlc_now_playing_uri', 'vlc_now_playing_url', 'vlc_now_playing_duration', 'vlc_now_playing_progress'],
2641
2654
  alerts: {
2642
2655
  switchSong: ['name', 'uri', 'image'],
2643
2656
  songPlayed: ['name', 'uri', 'image'],
@@ -2772,6 +2785,8 @@ export const AllVariables = {
2772
2785
  'youtubemusic_now_playing_id',
2773
2786
  'youtubemusic_now_playing_artist',
2774
2787
  'youtubemusic_now_playing_url',
2788
+ 'youtubemusic_now_playing_duration',
2789
+ 'youtubemusic_now_playing_progress',
2775
2790
  'youtubemusic_next_song',
2776
2791
  'youtubemusic_next_image',
2777
2792
  'youtubemusic_next_artist',
@@ -13,8 +13,12 @@ const getViewerProfileAchievementSourceKeys = (metric) => {
13
13
  case 'uniqueAlerts':
14
14
  case 'totalBitsSpent':
15
15
  case 'totalKicksSpent':
16
+ case 'totalJewelsSpent':
17
+ case 'totalDiamondsSpent':
18
+ case 'totalStarsSpent':
16
19
  case 'totalGiftSubscriptions':
17
20
  case 'totalMoneySpent':
21
+ case 'totalCharitySpent':
18
22
  return ['alerts'];
19
23
  case 'totalCommandsAndAlerts':
20
24
  case 'allRounder':
@@ -318,6 +322,129 @@ const VIEWER_PROFILE_ACHIEVEMENT_DEFINITIONS = [
318
322
  icon: 'LocalFireDepartment',
319
323
  color: 'gold',
320
324
  },
325
+ // ───────── YouTube Jewels ─────────
326
+ {
327
+ id: 'jewels-spark',
328
+ label: 'Jewels Spark',
329
+ description: 'Sent 100 jewels.',
330
+ metric: 'totalJewelsSpent',
331
+ threshold: 100,
332
+ connectionKeys: ['youtube'],
333
+ icon: 'Diamond',
334
+ color: 'rose',
335
+ },
336
+ {
337
+ id: 'jewels-glow',
338
+ label: 'Jewels Glow',
339
+ description: 'Sent 500 jewels.',
340
+ metric: 'totalJewelsSpent',
341
+ threshold: 500,
342
+ connectionKeys: ['youtube'],
343
+ icon: 'Diamond',
344
+ color: 'violet',
345
+ },
346
+ {
347
+ id: 'jewels-beam',
348
+ label: 'Jewels Beam',
349
+ description: 'Sent 2,500 jewels.',
350
+ metric: 'totalJewelsSpent',
351
+ threshold: 2500,
352
+ connectionKeys: ['youtube'],
353
+ icon: 'Diamond',
354
+ color: 'cyan',
355
+ },
356
+ {
357
+ id: 'jewels-supernova',
358
+ label: 'Jewels Supernova',
359
+ description: 'Sent 10,000 jewels.',
360
+ metric: 'totalJewelsSpent',
361
+ threshold: 10000,
362
+ connectionKeys: ['youtube'],
363
+ icon: 'Diamond',
364
+ color: 'gold',
365
+ },
366
+ // ───────── TikTok Diamonds ─────────
367
+ {
368
+ id: 'diamonds-spark',
369
+ label: 'Diamonds Spark',
370
+ description: 'Sent 100 diamonds.',
371
+ metric: 'totalDiamondsSpent',
372
+ threshold: 100,
373
+ connectionKeys: ['tiktok'],
374
+ icon: 'Diamond',
375
+ color: 'cyan',
376
+ },
377
+ {
378
+ id: 'diamonds-glow',
379
+ label: 'Diamonds Glow',
380
+ description: 'Sent 1,000 diamonds.',
381
+ metric: 'totalDiamondsSpent',
382
+ threshold: 1000,
383
+ connectionKeys: ['tiktok'],
384
+ icon: 'Diamond',
385
+ color: 'sky',
386
+ },
387
+ {
388
+ id: 'diamonds-beam',
389
+ label: 'Diamonds Beam',
390
+ description: 'Sent 5,000 diamonds.',
391
+ metric: 'totalDiamondsSpent',
392
+ threshold: 5000,
393
+ connectionKeys: ['tiktok'],
394
+ icon: 'Diamond',
395
+ color: 'violet',
396
+ },
397
+ {
398
+ id: 'diamonds-supernova',
399
+ label: 'Diamonds Supernova',
400
+ description: 'Sent 25,000 diamonds.',
401
+ metric: 'totalDiamondsSpent',
402
+ threshold: 25000,
403
+ connectionKeys: ['tiktok'],
404
+ icon: 'Diamond',
405
+ color: 'gold',
406
+ },
407
+ // ───────── Facebook Stars ─────────
408
+ {
409
+ id: 'stars-spark',
410
+ label: 'Stars Spark',
411
+ description: 'Sent 100 stars.',
412
+ metric: 'totalStarsSpent',
413
+ threshold: 100,
414
+ connectionKeys: ['facebook'],
415
+ icon: 'Star',
416
+ color: 'sky',
417
+ },
418
+ {
419
+ id: 'stars-glow',
420
+ label: 'Stars Glow',
421
+ description: 'Sent 500 stars.',
422
+ metric: 'totalStarsSpent',
423
+ threshold: 500,
424
+ connectionKeys: ['facebook'],
425
+ icon: 'Star',
426
+ color: 'teal',
427
+ },
428
+ {
429
+ id: 'stars-beam',
430
+ label: 'Stars Beam',
431
+ description: 'Sent 2,500 stars.',
432
+ metric: 'totalStarsSpent',
433
+ threshold: 2500,
434
+ connectionKeys: ['facebook'],
435
+ icon: 'Star',
436
+ color: 'amber',
437
+ },
438
+ {
439
+ id: 'stars-supernova',
440
+ label: 'Stars Supernova',
441
+ description: 'Sent 10,000 stars.',
442
+ metric: 'totalStarsSpent',
443
+ threshold: 10000,
444
+ connectionKeys: ['facebook'],
445
+ icon: 'Star',
446
+ color: 'gold',
447
+ },
321
448
  // ───────── Donations ─────────
322
449
  {
323
450
  id: 'light-supporter',
@@ -364,6 +491,43 @@ const VIEWER_PROFILE_ACHIEVEMENT_DEFINITIONS = [
364
491
  icon: 'MonetizationOn',
365
492
  color: 'gold',
366
493
  },
494
+ // ───────── Charity ─────────
495
+ {
496
+ id: 'charity-helper',
497
+ label: 'Charity Helper',
498
+ description: 'Gave 10 to charity in your default currency.',
499
+ metric: 'totalCharitySpent',
500
+ threshold: 10,
501
+ icon: 'Favorite',
502
+ color: 'rose',
503
+ },
504
+ {
505
+ id: 'charity-advocate',
506
+ label: 'Charity Advocate',
507
+ description: 'Gave 50 to charity in your default currency.',
508
+ metric: 'totalCharitySpent',
509
+ threshold: 50,
510
+ icon: 'Favorite',
511
+ color: 'rose',
512
+ },
513
+ {
514
+ id: 'charity-champion',
515
+ label: 'Charity Champion',
516
+ description: 'Gave 250 to charity in your default currency.',
517
+ metric: 'totalCharitySpent',
518
+ threshold: 250,
519
+ icon: 'VolunteerActivism',
520
+ color: 'amber',
521
+ },
522
+ {
523
+ id: 'charity-hero',
524
+ label: 'Charity Hero',
525
+ description: 'Gave 1,000 to charity in your default currency.',
526
+ metric: 'totalCharitySpent',
527
+ threshold: 1000,
528
+ icon: 'VolunteerActivism',
529
+ color: 'gold',
530
+ },
367
531
  // ───────── Gift Subscriptions ─────────
368
532
  {
369
533
  id: 'gift-spark',
@@ -93,7 +93,6 @@ exports.LumiaMapAlertTypeToEventListType = {
93
93
  [activity_types_1.LumiaAlertValues.TWITCH_HYPETRAIN_STARTED]: LumiaEventListTypes.HYPETRAIN,
94
94
  [activity_types_1.LumiaAlertValues.TWITCH_CHARITY_DONATION]: LumiaEventListTypes.CHARITY,
95
95
  [activity_types_1.LumiaAlertValues.TWITCH_POWERUPS]: LumiaEventListTypes.BITS,
96
- [activity_types_1.LumiaAlertValues.TWITCH_POWERUPS_POINTS]: LumiaEventListTypes.POINTS,
97
96
  // --- YouTube ---
98
97
  [activity_types_1.LumiaAlertValues.YOUTUBE_SUBSCRIBER]: LumiaEventListTypes.FOLLOWER,
99
98
  [activity_types_1.LumiaAlertValues.YOUTUBE_SESSION_SUBS]: LumiaEventListTypes.FOLLOWER,
package/dist/index.d.ts CHANGED
@@ -4,10 +4,11 @@ export { ILumiaSendPack, ILumiaEvent, ILumiaEventChatCommandBody, ILumiaEventCha
4
4
  export { LumiaEventListTypes, LumiaMapAlertTypeToEventListType, AlertsToFilter, PlatformsToFilter, LumiaEventListTypeColors, getEventListCategoryColor } from './eventlist.types';
5
5
  export { SystemVariables, ReservedVariables, AllVariables, getAcceptedVariableName, getAcceptedVariableNames, type LumiaAcceptedVariable, type LumiaAcceptedVariableDefinition, } from './variables.types';
6
6
  export { formatCondition } from './helpers';
7
+ export { EMULATE_EXAMPLE_AVATAR_URL, getExampleAlertVariableValue, buildExampleAlertVariables, isRedundantInputField, syncLinkedVariableFields, type InputFieldLike, } from './emulate.helpers';
7
8
  export { KickKicksData } from './kick_kicks';
8
9
  export { BLANK_OVERLAY_TEMPLATE_ID, type OverlayTemplate, type OverlayTemplateLayerDescriptor, type OverlayTemplateAnchor, type OverlayTemplateLayerOverrides } from './overlay_template.types';
9
10
  export { TiktokGiftsData } from './tiktok_gifts';
10
11
  export { YoutubeSuperstickersData } from './youtube_superstickers';
11
12
  export { VIEWER_PROFILE_ACHIEVEMENTS, type ViewerProfileAchievementColor, type ViewerProfileAchievementDefinition, type ViewerProfileAchievementMetric, type ViewerProfileCollectionMode, type ViewerProfileCollectionRule, type ViewerProfileCollectionSettings, type ViewerProfileCollectionSource, } from './viewer_profile_achievements';
12
13
  export { SongRequestStatus, SongRequestSource, SongRequestProvider, SongRequestPlaybackTarget, type SongRequestItem, type SongRequestConfig, type SongRequestState, type SongRequestQueueUpdatePayload, type SongRequestPendingUpdatePayload, type SongRequestNowPlayingPayload, type SongRequestAddParams, type SongRequestModerationParams, } from './songrequest.types';
13
- export type { IAlertEvent, AlertPlatform, AlertEventUnion, AlertEventInputMap, SessionAggregateDynamic, SessionAggregateExtraSettings, TwitchFollowerDynamic, TwitchFollowerExtraSettings, TwitchSubscriberDynamic, TwitchSubscriberExtraSettings, TwitchGiftSubscriptionRecipient, TwitchGiftSubscriptionDynamic, TwitchGiftSubscriptionExtraSettings, TwitchBitsDynamic, TwitchBitsExtraSettings, TwitchBitsComboDynamic, TwitchBitsComboExtraSettings, TwitchRaidDynamic, TwitchRaidExtraSettings, TwitchRaidOutDynamic, TwitchRaidOutExtraSettings, TwitchChannelJoinDynamic, TwitchChannelJoinExtraSettings, TwitchChannelLeaveDynamic, TwitchChannelLeaveExtraSettings, TwitchFirstChatterDynamic, TwitchFirstChatterExtraSettings, TwitchEntranceDynamic, TwitchEntranceExtraSettings, TwitchTimeoutDynamic, TwitchTimeoutExtraSettings, TwitchTimeoutOverDynamic, TwitchTimeoutOverExtraSettings, TwitchBannedDynamic, TwitchBannedExtraSettings, TwitchClipDynamic, TwitchClipExtraSettings, TwitchCategoryDynamic, TwitchCategoryExtraSettings, TwitchHypeTrainInfo, TwitchHypeTrainDynamic, TwitchHypeTrainExtraSettings, TwitchHypeTrainStartedDynamic, TwitchHypeTrainStartedExtraSettings, TwitchHypeTrainProgressedDynamic, TwitchHypeTrainProgressedExtraSettings, TwitchHypeTrainLevelProgressedDynamic, TwitchHypeTrainLevelProgressedExtraSettings, TwitchHypeTrainEndedDynamic, TwitchHypeTrainEndedExtraSettings, TwitchPollChoice, TwitchPollInfo, TwitchPollDynamic, TwitchPollExtraSettings, TwitchPollStartedDynamic, TwitchPollStartedExtraSettings, TwitchPollProgressedDynamic, TwitchPollProgressedExtraSettings, TwitchPollEndedDynamic, TwitchPollEndedExtraSettings, TwitchPredictionOutcome, TwitchPredictionInfo, TwitchPredictionDynamic, TwitchPredictionExtraSettings, TwitchPredictionStartedDynamic, TwitchPredictionStartedExtraSettings, TwitchPredictionProgressedDynamic, TwitchPredictionProgressedExtraSettings, TwitchPredictionLockedDynamic, TwitchPredictionLockedExtraSettings, TwitchPredictionEndedDynamic, TwitchPredictionEndedExtraSettings, TwitchGoalInfo, TwitchGoalDynamic, TwitchGoalExtraSettings, TwitchGoalStartedDynamic, TwitchGoalStartedExtraSettings, TwitchGoalProgressedDynamic, TwitchGoalProgressedExtraSettings, TwitchGoalEndedDynamic, TwitchGoalEndedExtraSettings, TwitchCharityDonationDynamic, TwitchCharityDonationExtraSettings, TwitchCharityCampaignDynamic, TwitchCharityCampaignExtraSettings, TwitchCharityCampaignStartedDynamic, TwitchCharityCampaignStartedExtraSettings, TwitchCharityCampaignProgressedDynamic, TwitchCharityCampaignProgressedExtraSettings, TwitchCharityCampaignStoppedDynamic, TwitchCharityCampaignStoppedExtraSettings, TwitchShoutoutReceiveDynamic, TwitchShoutoutReceiveExtraSettings, TwitchAdDynamic, TwitchAdStartedExtraSettings, TwitchAdStoppedExtraSettings, TwitchStreamLiveDynamic, TwitchStreamLiveExtraSettings, TwitchStreamOfflineDynamic, TwitchStreamOfflineExtraSettings, TwitchWatchStreakDynamic, TwitchWatchStreakExtraSettings, TwitchPowerupsDynamic, TwitchPowerupsExtraSettings, TwitchPowerupsPointsExtraSettings, TwitchRedemptionDynamic, TwitchRedemptionExtraSettings, TwitchSessionFollowersDynamic, TwitchSessionFollowersExtraSettings, TwitchSessionSubsDynamic, TwitchSessionSubsExtraSettings, TwitchSessionGiftSubscriptionsDynamic, TwitchSessionGiftSubscriptionsExtraSettings, TwitchSessionBitsDynamic, TwitchSessionBitsExtraSettings, KickFollowerDynamic, KickFollowerExtraSettings, KickSubscriberDynamic, KickSubscriberExtraSettings, KickGiftSubscriptionRecipient, KickGiftSubscriptionDynamic, KickGiftSubscriptionExtraSettings, KickKicksDynamic, KickKicksExtraSettings, KickHostDynamic, KickHostExtraSettings, KickBannedDynamic, KickBannedExtraSettings, KickUnbannedDynamic, KickUnbannedExtraSettings, KickFirstChatterDynamic, KickFirstChatterExtraSettings, KickEntranceDynamic, KickEntranceExtraSettings, KickSessionFollowersDynamic, KickSessionFollowersExtraSettings, KickSessionSubsDynamic, KickSessionSubsExtraSettings, KickSessionGiftSubscriptionsDynamic, KickSessionGiftSubscriptionsExtraSettings, KickSessionKicksDynamic, KickSessionKicksExtraSettings, } from './wire.types';
14
+ export type { IAlertEvent, AlertPlatform, AlertEventUnion, AlertEventInputMap, SessionAggregateDynamic, SessionAggregateExtraSettings, TwitchFollowerDynamic, TwitchFollowerExtraSettings, TwitchSubscriberDynamic, TwitchSubscriberExtraSettings, TwitchGiftSubscriptionRecipient, TwitchGiftSubscriptionDynamic, TwitchGiftSubscriptionExtraSettings, TwitchBitsDynamic, TwitchBitsExtraSettings, TwitchBitsComboDynamic, TwitchBitsComboExtraSettings, TwitchRaidDynamic, TwitchRaidExtraSettings, TwitchRaidOutDynamic, TwitchRaidOutExtraSettings, TwitchChannelJoinDynamic, TwitchChannelJoinExtraSettings, TwitchChannelLeaveDynamic, TwitchChannelLeaveExtraSettings, TwitchFirstChatterDynamic, TwitchFirstChatterExtraSettings, TwitchEntranceDynamic, TwitchEntranceExtraSettings, TwitchTimeoutDynamic, TwitchTimeoutExtraSettings, TwitchTimeoutOverDynamic, TwitchTimeoutOverExtraSettings, TwitchBannedDynamic, TwitchBannedExtraSettings, TwitchClipDynamic, TwitchClipExtraSettings, TwitchCategoryDynamic, TwitchCategoryExtraSettings, TwitchHypeTrainInfo, TwitchHypeTrainDynamic, TwitchHypeTrainExtraSettings, TwitchHypeTrainStartedDynamic, TwitchHypeTrainStartedExtraSettings, TwitchHypeTrainProgressedDynamic, TwitchHypeTrainProgressedExtraSettings, TwitchHypeTrainLevelProgressedDynamic, TwitchHypeTrainLevelProgressedExtraSettings, TwitchHypeTrainEndedDynamic, TwitchHypeTrainEndedExtraSettings, TwitchPollChoice, TwitchPollInfo, TwitchPollDynamic, TwitchPollExtraSettings, TwitchPollStartedDynamic, TwitchPollStartedExtraSettings, TwitchPollProgressedDynamic, TwitchPollProgressedExtraSettings, TwitchPollEndedDynamic, TwitchPollEndedExtraSettings, TwitchPredictionOutcome, TwitchPredictionInfo, TwitchPredictionDynamic, TwitchPredictionExtraSettings, TwitchPredictionStartedDynamic, TwitchPredictionStartedExtraSettings, TwitchPredictionProgressedDynamic, TwitchPredictionProgressedExtraSettings, TwitchPredictionLockedDynamic, TwitchPredictionLockedExtraSettings, TwitchPredictionEndedDynamic, TwitchPredictionEndedExtraSettings, TwitchGoalInfo, TwitchGoalDynamic, TwitchGoalExtraSettings, TwitchGoalStartedDynamic, TwitchGoalStartedExtraSettings, TwitchGoalProgressedDynamic, TwitchGoalProgressedExtraSettings, TwitchGoalEndedDynamic, TwitchGoalEndedExtraSettings, TwitchCharityDonationDynamic, TwitchCharityDonationExtraSettings, TwitchCharityCampaignDynamic, TwitchCharityCampaignExtraSettings, TwitchCharityCampaignStartedDynamic, TwitchCharityCampaignStartedExtraSettings, TwitchCharityCampaignProgressedDynamic, TwitchCharityCampaignProgressedExtraSettings, TwitchCharityCampaignStoppedDynamic, TwitchCharityCampaignStoppedExtraSettings, TwitchShoutoutReceiveDynamic, TwitchShoutoutReceiveExtraSettings, TwitchAdDynamic, TwitchAdStartedExtraSettings, TwitchAdStoppedExtraSettings, TwitchStreamLiveDynamic, TwitchStreamLiveExtraSettings, TwitchStreamOfflineDynamic, TwitchStreamOfflineExtraSettings, TwitchWatchStreakDynamic, TwitchWatchStreakExtraSettings, TwitchPowerupsDynamic, TwitchPowerupsExtraSettings, TwitchRedemptionDynamic, TwitchRedemptionExtraSettings, TwitchSessionFollowersDynamic, TwitchSessionFollowersExtraSettings, TwitchSessionSubsDynamic, TwitchSessionSubsExtraSettings, TwitchSessionGiftSubscriptionsDynamic, TwitchSessionGiftSubscriptionsExtraSettings, TwitchSessionBitsDynamic, TwitchSessionBitsExtraSettings, KickFollowerDynamic, KickFollowerExtraSettings, KickSubscriberDynamic, KickSubscriberExtraSettings, KickGiftSubscriptionRecipient, KickGiftSubscriptionDynamic, KickGiftSubscriptionExtraSettings, KickKicksDynamic, KickKicksExtraSettings, KickHostDynamic, KickHostExtraSettings, KickBannedDynamic, KickBannedExtraSettings, KickUnbannedDynamic, KickUnbannedExtraSettings, KickFirstChatterDynamic, KickFirstChatterExtraSettings, KickEntranceDynamic, KickEntranceExtraSettings, KickSessionFollowersDynamic, KickSessionFollowersExtraSettings, KickSessionSubsDynamic, KickSessionSubsExtraSettings, KickSessionGiftSubscriptionsDynamic, KickSessionGiftSubscriptionsExtraSettings, KickSessionKicksDynamic, KickSessionKicksExtraSettings, } from './wire.types';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SongRequestPlaybackTarget = exports.SongRequestProvider = exports.SongRequestSource = exports.SongRequestStatus = exports.VIEWER_PROFILE_ACHIEVEMENTS = exports.YoutubeSuperstickersData = exports.TiktokGiftsData = exports.BLANK_OVERLAY_TEMPLATE_ID = exports.KickKicksData = exports.formatCondition = exports.getAcceptedVariableNames = exports.getAcceptedVariableName = exports.AllVariables = exports.ReservedVariables = exports.SystemVariables = exports.getEventListCategoryColor = exports.LumiaEventListTypeColors = exports.PlatformsToFilter = exports.AlertsToFilter = exports.LumiaMapAlertTypeToEventListType = exports.LumiaEventListTypes = exports.LumiaEventTypes = exports.LumiaIntegrations = exports.LumiaAlertConfigs = exports.LumiaRedemptionCurrencySymbol = exports.LumiaRedemptionCurrency = exports.VariationCurrencySymbol = exports.LumiaVariationCurrency = exports.LumiaVariationConditions = exports.LumiaActivityTestType = exports.LumiaActivityNoValueTypes = exports.LumiaActivityApiValueType = exports.LumiaActivityOriginTypes = exports.LumiaAlertFriendlyValues = exports.LumiaAlertValues = exports.LumiaExternalActivityCommandTypes = exports.LumiaActivityCommandTypes = exports.LumiaStreamingSites = void 0;
3
+ exports.SongRequestPlaybackTarget = exports.SongRequestProvider = exports.SongRequestSource = exports.SongRequestStatus = exports.VIEWER_PROFILE_ACHIEVEMENTS = exports.YoutubeSuperstickersData = exports.TiktokGiftsData = exports.BLANK_OVERLAY_TEMPLATE_ID = exports.KickKicksData = exports.syncLinkedVariableFields = exports.isRedundantInputField = exports.buildExampleAlertVariables = exports.getExampleAlertVariableValue = exports.EMULATE_EXAMPLE_AVATAR_URL = exports.formatCondition = exports.getAcceptedVariableNames = exports.getAcceptedVariableName = exports.AllVariables = exports.ReservedVariables = exports.SystemVariables = exports.getEventListCategoryColor = exports.LumiaEventListTypeColors = exports.PlatformsToFilter = exports.AlertsToFilter = exports.LumiaMapAlertTypeToEventListType = exports.LumiaEventListTypes = exports.LumiaEventTypes = exports.LumiaIntegrations = exports.LumiaAlertConfigs = exports.LumiaRedemptionCurrencySymbol = exports.LumiaRedemptionCurrency = exports.VariationCurrencySymbol = exports.LumiaVariationCurrency = exports.LumiaVariationConditions = exports.LumiaActivityTestType = exports.LumiaActivityNoValueTypes = exports.LumiaActivityApiValueType = exports.LumiaActivityOriginTypes = exports.LumiaAlertFriendlyValues = exports.LumiaAlertValues = exports.LumiaExternalActivityCommandTypes = exports.LumiaActivityCommandTypes = exports.LumiaStreamingSites = void 0;
4
4
  var activity_types_1 = require("./activity.types");
5
5
  Object.defineProperty(exports, "LumiaStreamingSites", { enumerable: true, get: function () { return activity_types_1.LumiaStreamingSites; } });
6
6
  Object.defineProperty(exports, "LumiaActivityCommandTypes", { enumerable: true, get: function () { return activity_types_1.LumiaActivityCommandTypes; } });
@@ -36,6 +36,12 @@ Object.defineProperty(exports, "getAcceptedVariableName", { enumerable: true, ge
36
36
  Object.defineProperty(exports, "getAcceptedVariableNames", { enumerable: true, get: function () { return variables_types_1.getAcceptedVariableNames; } });
37
37
  var helpers_1 = require("./helpers");
38
38
  Object.defineProperty(exports, "formatCondition", { enumerable: true, get: function () { return helpers_1.formatCondition; } });
39
+ var emulate_helpers_1 = require("./emulate.helpers");
40
+ Object.defineProperty(exports, "EMULATE_EXAMPLE_AVATAR_URL", { enumerable: true, get: function () { return emulate_helpers_1.EMULATE_EXAMPLE_AVATAR_URL; } });
41
+ Object.defineProperty(exports, "getExampleAlertVariableValue", { enumerable: true, get: function () { return emulate_helpers_1.getExampleAlertVariableValue; } });
42
+ Object.defineProperty(exports, "buildExampleAlertVariables", { enumerable: true, get: function () { return emulate_helpers_1.buildExampleAlertVariables; } });
43
+ Object.defineProperty(exports, "isRedundantInputField", { enumerable: true, get: function () { return emulate_helpers_1.isRedundantInputField; } });
44
+ Object.defineProperty(exports, "syncLinkedVariableFields", { enumerable: true, get: function () { return emulate_helpers_1.syncLinkedVariableFields; } });
39
45
  var kick_kicks_1 = require("./kick_kicks");
40
46
  Object.defineProperty(exports, "KickKicksData", { enumerable: true, get: function () { return kick_kicks_1.KickKicksData; } });
41
47
  var overlay_template_types_1 = require("./overlay_template.types");
@@ -719,6 +719,10 @@ export declare enum SystemVariables {
719
719
  SPOTIFY_NOW_PLAYING_URL = "spotify_now_playing_url",
720
720
  /** Now playing Spotify URI. Use as {{spotify_now_playing_uri}}. */
721
721
  SPOTIFY_NOW_PLAYING_URI = "spotify_now_playing_uri",
722
+ /** Now playing track duration in seconds. Use as {{spotify_now_playing_duration}}. */
723
+ SPOTIFY_NOW_PLAYING_DURATION = "spotify_now_playing_duration",
724
+ /** Now playing track progress (current position) in seconds. Use as {{spotify_now_playing_progress}}. */
725
+ SPOTIFY_NOW_PLAYING_PROGRESS = "spotify_now_playing_progress",
722
726
  /** Next song title. Use as {{spotify_next_song}}. */
723
727
  SPOTIFY_NEXT_SONG = "spotify_next_song",
724
728
  /** Next song artwork URL. Use as {{spotify_next_image}}. */
@@ -743,6 +747,10 @@ export declare enum SystemVariables {
743
747
  YOUTUBEMUSIC_NOW_PLAYING_ID = "youtubemusic_now_playing_id",
744
748
  /** Now playing URL. Use as {{youtubemusic_now_playing_url}}. */
745
749
  YOUTUBEMUSIC_NOW_PLAYING_URL = "youtubemusic_now_playing_url",
750
+ /** Now playing track duration in seconds. Use as {{youtubemusic_now_playing_duration}}. */
751
+ YOUTUBEMUSIC_NOW_PLAYING_DURATION = "youtubemusic_now_playing_duration",
752
+ /** Now playing track progress (current position) in seconds. Use as {{youtubemusic_now_playing_progress}}. */
753
+ YOUTUBEMUSIC_NOW_PLAYING_PROGRESS = "youtubemusic_now_playing_progress",
746
754
  /** Next song title. Use as {{youtubemusic_next_song}}. */
747
755
  YOUTUBEMUSIC_NEXT_SONG = "youtubemusic_next_song",
748
756
  /** Next song artwork URL. Use as {{youtubemusic_next_image}}. */
@@ -797,6 +805,10 @@ export declare enum SystemVariables {
797
805
  VLC_NOW_PLAYING_ID = "vlc_now_playing_id",
798
806
  /** Media URL. Use as {{vlc_now_playing_url}}. */
799
807
  VLC_NOW_PLAYING_URL = "vlc_now_playing_url",
808
+ /** Now playing media duration in seconds. Use as {{vlc_now_playing_duration}}. */
809
+ VLC_NOW_PLAYING_DURATION = "vlc_now_playing_duration",
810
+ /** Now playing media progress (current position) in seconds. Use as {{vlc_now_playing_progress}}. */
811
+ VLC_NOW_PLAYING_PROGRESS = "vlc_now_playing_progress",
800
812
  /** Media URI. Use as {{vlc_now_playing_uri}}. */
801
813
  VLC_NOW_PLAYING_URI = "vlc_now_playing_uri",
802
814
  /** Voice changer on (true/false). Use as {{voicemod_voice_changer_on}}. */
@@ -1393,7 +1405,6 @@ export declare const AllVariables: {
1393
1405
  adStopped: string[];
1394
1406
  watchStreak: string[];
1395
1407
  powerups: string[];
1396
- powerupsPoints: string[];
1397
1408
  };
1398
1409
  };
1399
1410
  twitter: {
@@ -732,6 +732,10 @@ var SystemVariables;
732
732
  SystemVariables["SPOTIFY_NOW_PLAYING_URL"] = "spotify_now_playing_url";
733
733
  /** Now playing Spotify URI. Use as {{spotify_now_playing_uri}}. */
734
734
  SystemVariables["SPOTIFY_NOW_PLAYING_URI"] = "spotify_now_playing_uri";
735
+ /** Now playing track duration in seconds. Use as {{spotify_now_playing_duration}}. */
736
+ SystemVariables["SPOTIFY_NOW_PLAYING_DURATION"] = "spotify_now_playing_duration";
737
+ /** Now playing track progress (current position) in seconds. Use as {{spotify_now_playing_progress}}. */
738
+ SystemVariables["SPOTIFY_NOW_PLAYING_PROGRESS"] = "spotify_now_playing_progress";
735
739
  /** Next song title. Use as {{spotify_next_song}}. */
736
740
  SystemVariables["SPOTIFY_NEXT_SONG"] = "spotify_next_song";
737
741
  /** Next song artwork URL. Use as {{spotify_next_image}}. */
@@ -757,6 +761,10 @@ var SystemVariables;
757
761
  SystemVariables["YOUTUBEMUSIC_NOW_PLAYING_ID"] = "youtubemusic_now_playing_id";
758
762
  /** Now playing URL. Use as {{youtubemusic_now_playing_url}}. */
759
763
  SystemVariables["YOUTUBEMUSIC_NOW_PLAYING_URL"] = "youtubemusic_now_playing_url";
764
+ /** Now playing track duration in seconds. Use as {{youtubemusic_now_playing_duration}}. */
765
+ SystemVariables["YOUTUBEMUSIC_NOW_PLAYING_DURATION"] = "youtubemusic_now_playing_duration";
766
+ /** Now playing track progress (current position) in seconds. Use as {{youtubemusic_now_playing_progress}}. */
767
+ SystemVariables["YOUTUBEMUSIC_NOW_PLAYING_PROGRESS"] = "youtubemusic_now_playing_progress";
760
768
  /** Next song title. Use as {{youtubemusic_next_song}}. */
761
769
  SystemVariables["YOUTUBEMUSIC_NEXT_SONG"] = "youtubemusic_next_song";
762
770
  /** Next song artwork URL. Use as {{youtubemusic_next_image}}. */
@@ -813,6 +821,10 @@ var SystemVariables;
813
821
  SystemVariables["VLC_NOW_PLAYING_ID"] = "vlc_now_playing_id";
814
822
  /** Media URL. Use as {{vlc_now_playing_url}}. */
815
823
  SystemVariables["VLC_NOW_PLAYING_URL"] = "vlc_now_playing_url";
824
+ /** Now playing media duration in seconds. Use as {{vlc_now_playing_duration}}. */
825
+ SystemVariables["VLC_NOW_PLAYING_DURATION"] = "vlc_now_playing_duration";
826
+ /** Now playing media progress (current position) in seconds. Use as {{vlc_now_playing_progress}}. */
827
+ SystemVariables["VLC_NOW_PLAYING_PROGRESS"] = "vlc_now_playing_progress";
816
828
  /** Media URI. Use as {{vlc_now_playing_uri}}. */
817
829
  SystemVariables["VLC_NOW_PLAYING_URI"] = "vlc_now_playing_uri";
818
830
  // ────────────────────────────────── Voicemod ──────────────────────────────────
@@ -2236,6 +2248,8 @@ exports.AllVariables = {
2236
2248
  'spotify_now_playing_artist',
2237
2249
  'spotify_now_playing_uri',
2238
2250
  'spotify_now_playing_url',
2251
+ 'spotify_now_playing_duration',
2252
+ 'spotify_now_playing_progress',
2239
2253
  'spotify_next_song',
2240
2254
  'spotify_next_image',
2241
2255
  'spotify_next_artist',
@@ -2591,7 +2605,6 @@ exports.AllVariables = {
2591
2605
  adStopped: ['length', 'is_automatic', 'started_at', 'twitch_next_ad', 'amount'],
2592
2606
  watchStreak: ['username', 'userId', 'displayname', 'avatar', 'streak_count', 'channel_points_awarded', 'amount', 'message', 'system_message'],
2593
2607
  powerups: ['username', 'avatar', 'type', 'amount', 'message', 'reward_id', 'powerup_source'],
2594
- powerupsPoints: ['username', 'avatar', 'type', 'amount', 'message'],
2595
2608
  },
2596
2609
  },
2597
2610
  twitter: {
@@ -2642,7 +2655,7 @@ exports.AllVariables = {
2642
2655
  },
2643
2656
  },
2644
2657
  vlc: {
2645
- variables: ['vlc_now_playing_media', 'vlc_now_playing_image', 'vlc_now_playing_id', 'vlc_now_playing_artist', 'vlc_now_playing_uri', 'vlc_now_playing_url'],
2658
+ variables: ['vlc_now_playing_media', 'vlc_now_playing_image', 'vlc_now_playing_id', 'vlc_now_playing_artist', 'vlc_now_playing_uri', 'vlc_now_playing_url', 'vlc_now_playing_duration', 'vlc_now_playing_progress'],
2646
2659
  alerts: {
2647
2660
  switchSong: ['name', 'uri', 'image'],
2648
2661
  songPlayed: ['name', 'uri', 'image'],
@@ -2777,6 +2790,8 @@ exports.AllVariables = {
2777
2790
  'youtubemusic_now_playing_id',
2778
2791
  'youtubemusic_now_playing_artist',
2779
2792
  'youtubemusic_now_playing_url',
2793
+ 'youtubemusic_now_playing_duration',
2794
+ 'youtubemusic_now_playing_progress',
2780
2795
  'youtubemusic_next_song',
2781
2796
  'youtubemusic_next_image',
2782
2797
  'youtubemusic_next_artist',
@@ -1,4 +1,4 @@
1
- export type ViewerProfileAchievementMetric = 'totalCommands' | 'uniqueCommands' | 'totalChatbotCommands' | 'totalFirstChatters' | 'totalPointsCommands' | 'totalPointsSpent' | 'totalTwitchExtensionsCommands' | 'totalBitsSpent' | 'totalKicksSpent' | 'totalGiftSubscriptions' | 'totalMoneySpent' | 'totalAlerts' | 'uniqueAlerts' | 'totalCommandsAndAlerts' | 'daysActive' | 'allRounder';
1
+ export type ViewerProfileAchievementMetric = 'totalCommands' | 'uniqueCommands' | 'totalChatbotCommands' | 'totalFirstChatters' | 'totalPointsCommands' | 'totalPointsSpent' | 'totalTwitchExtensionsCommands' | 'totalBitsSpent' | 'totalKicksSpent' | 'totalJewelsSpent' | 'totalDiamondsSpent' | 'totalStarsSpent' | 'totalGiftSubscriptions' | 'totalMoneySpent' | 'totalCharitySpent' | 'totalAlerts' | 'uniqueAlerts' | 'totalCommandsAndAlerts' | 'daysActive' | 'allRounder';
2
2
  export type ViewerProfileCollectionSource = 'commands' | 'alerts' | 'firstChatters';
3
3
  export type ViewerProfileCollectionMode = 'all' | 'none' | 'selected';
4
4
  export type ViewerProfileCollectionRule = {