@lumiastream/lumia-types 3.5.9 → 3.6.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/alert.types.js +16 -16
- package/dist/emulate.helpers.d.ts +1 -0
- package/dist/emulate.helpers.js +29 -0
- package/dist/esm/alert.types.js +16 -16
- package/dist/esm/emulate.helpers.js +28 -0
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -1
- package/package.json +1 -1
package/dist/alert.types.js
CHANGED
|
@@ -2784,7 +2784,7 @@ exports.LumiaAlertConfigs = {
|
|
|
2784
2784
|
charity_id: 'lumia123',
|
|
2785
2785
|
charity_name: 'Lumia Charity',
|
|
2786
2786
|
charity_description: 'Give me more lights',
|
|
2787
|
-
|
|
2787
|
+
contentImage: 'https://static-cdn.jtvnw.net/jtv_user_pictures/2b1fa336-f9b2-42cf-bd2c-98675da74982-profile_image-70x70.png',
|
|
2788
2788
|
charity_website: 'https://lumiastream.com',
|
|
2789
2789
|
started_at: '2022-07-26T17:00:03.17106713Z',
|
|
2790
2790
|
},
|
|
@@ -2800,7 +2800,7 @@ exports.LumiaAlertConfigs = {
|
|
|
2800
2800
|
charity_id: 'lumia123',
|
|
2801
2801
|
charity_name: 'Lumia Charity',
|
|
2802
2802
|
charity_description: 'Give me more lights',
|
|
2803
|
-
|
|
2803
|
+
contentImage: 'https://static-cdn.jtvnw.net/jtv_user_pictures/2b1fa336-f9b2-42cf-bd2c-98675da74982-profile_image-70x70.png',
|
|
2804
2804
|
charity_website: 'https://lumiastream.com',
|
|
2805
2805
|
started_at: '2022-07-26T17:00:03.17106713Z',
|
|
2806
2806
|
},
|
|
@@ -2816,7 +2816,7 @@ exports.LumiaAlertConfigs = {
|
|
|
2816
2816
|
charity_id: 'lumia123',
|
|
2817
2817
|
charity_name: 'Lumia Charity',
|
|
2818
2818
|
charity_description: 'Give me more lights',
|
|
2819
|
-
|
|
2819
|
+
contentImage: 'https://static-cdn.jtvnw.net/jtv_user_pictures/2b1fa336-f9b2-42cf-bd2c-98675da74982-profile_image-70x70.png',
|
|
2820
2820
|
charity_website: 'https://lumiastream.com',
|
|
2821
2821
|
started_at: '2022-07-26T17:00:03.17106713Z',
|
|
2822
2822
|
},
|
|
@@ -2891,7 +2891,7 @@ exports.LumiaAlertConfigs = {
|
|
|
2891
2891
|
charity_id: 'lumia123',
|
|
2892
2892
|
charity_name: 'Lumia Charity',
|
|
2893
2893
|
charity_description: 'Give me more lights',
|
|
2894
|
-
|
|
2894
|
+
contentImage: 'https://static-cdn.jtvnw.net/jtv_user_pictures/2b1fa336-f9b2-42cf-bd2c-98675da74982-profile_image-70x70.png',
|
|
2895
2895
|
charity_amount: 0,
|
|
2896
2896
|
charity_target_amount: 100,
|
|
2897
2897
|
charity_website: 'https://lumiastream.com',
|
|
@@ -2954,7 +2954,7 @@ exports.LumiaAlertConfigs = {
|
|
|
2954
2954
|
extraSettings: {
|
|
2955
2955
|
charity_name: 'Lumia Charity',
|
|
2956
2956
|
charity_description: 'Give me more lights',
|
|
2957
|
-
|
|
2957
|
+
contentImage: 'https://static-cdn.jtvnw.net/jtv_user_pictures/2b1fa336-f9b2-42cf-bd2c-98675da74982-profile_image-70x70.png',
|
|
2958
2958
|
charity_amount: 20,
|
|
2959
2959
|
charity_target_amount: 100,
|
|
2960
2960
|
charity_website: 'https://lumiastream.com',
|
|
@@ -3016,7 +3016,7 @@ exports.LumiaAlertConfigs = {
|
|
|
3016
3016
|
extraSettings: {
|
|
3017
3017
|
charity_name: 'Lumia Charity',
|
|
3018
3018
|
charity_description: 'Give me more lights',
|
|
3019
|
-
|
|
3019
|
+
contentImage: 'https://static-cdn.jtvnw.net/jtv_user_pictures/2b1fa336-f9b2-42cf-bd2c-98675da74982-profile_image-70x70.png',
|
|
3020
3020
|
charity_amount: 100,
|
|
3021
3021
|
charity_target_amount: 100,
|
|
3022
3022
|
charity_website: 'https://lumiastream.com',
|
|
@@ -3924,7 +3924,7 @@ exports.LumiaAlertConfigs = {
|
|
|
3924
3924
|
comboCount: 1,
|
|
3925
3925
|
hasVisualEffect: false,
|
|
3926
3926
|
giftUrl: 'https://www.gstatic.com/youtube/img/pdg/gift/assets/gold_coin_v2_320x320.png',
|
|
3927
|
-
|
|
3927
|
+
contentImage: 'https://www.gstatic.com/youtube/img/pdg/gift/assets/gold_coin_v2_320x320.png',
|
|
3928
3928
|
giftDurationSeconds: 3,
|
|
3929
3929
|
giftDurationNanos: 0,
|
|
3930
3930
|
altText: 'Heart',
|
|
@@ -3944,7 +3944,7 @@ exports.LumiaAlertConfigs = {
|
|
|
3944
3944
|
comboCount: 1,
|
|
3945
3945
|
hasVisualEffect: true,
|
|
3946
3946
|
giftUrl: 'https://www.gstatic.com/youtube/img/pdg/gift/assets/gold_coin_v2_320x320.png',
|
|
3947
|
-
|
|
3947
|
+
contentImage: 'https://www.gstatic.com/youtube/img/pdg/gift/assets/gold_coin_v2_320x320.png',
|
|
3948
3948
|
giftDurationSeconds: 3,
|
|
3949
3949
|
giftDurationNanos: 0,
|
|
3950
3950
|
altText: 'Rose',
|
|
@@ -3964,7 +3964,7 @@ exports.LumiaAlertConfigs = {
|
|
|
3964
3964
|
comboCount: 5,
|
|
3965
3965
|
hasVisualEffect: true,
|
|
3966
3966
|
giftUrl: 'https://www.gstatic.com/youtube/img/pdg/gift/assets/gold_coin_v2_320x320.png',
|
|
3967
|
-
|
|
3967
|
+
contentImage: 'https://www.gstatic.com/youtube/img/pdg/gift/assets/gold_coin_v2_320x320.png',
|
|
3968
3968
|
giftDurationSeconds: 3,
|
|
3969
3969
|
giftDurationNanos: 0,
|
|
3970
3970
|
altText: 'Star',
|
|
@@ -4218,7 +4218,7 @@ exports.LumiaAlertConfigs = {
|
|
|
4218
4218
|
currencySymbol: '$',
|
|
4219
4219
|
stickerId: 'emoji_beaming_face',
|
|
4220
4220
|
stickerName: 'Emoji Beaming Face',
|
|
4221
|
-
|
|
4221
|
+
contentImage: (_b = (_a = youtube_superstickers_1.YoutubeSuperstickersData.find((sticker) => sticker.value === 'emoji_beaming_face')) === null || _a === void 0 ? void 0 : _a.imageUrl) !== null && _b !== void 0 ? _b : '',
|
|
4222
4222
|
},
|
|
4223
4223
|
},
|
|
4224
4224
|
{
|
|
@@ -4233,7 +4233,7 @@ exports.LumiaAlertConfigs = {
|
|
|
4233
4233
|
currencySymbol: '$',
|
|
4234
4234
|
stickerId: 'emoji_laughing',
|
|
4235
4235
|
stickerName: 'Emoji Laughing',
|
|
4236
|
-
|
|
4236
|
+
contentImage: (_d = (_c = youtube_superstickers_1.YoutubeSuperstickersData.find((sticker) => sticker.value === 'emoji_laughing')) === null || _c === void 0 ? void 0 : _c.imageUrl) !== null && _d !== void 0 ? _d : '',
|
|
4237
4237
|
},
|
|
4238
4238
|
},
|
|
4239
4239
|
{
|
|
@@ -4248,7 +4248,7 @@ exports.LumiaAlertConfigs = {
|
|
|
4248
4248
|
currencySymbol: '$',
|
|
4249
4249
|
stickerId: 'emoji_sad',
|
|
4250
4250
|
stickerName: 'Emoji Sad',
|
|
4251
|
-
|
|
4251
|
+
contentImage: (_f = (_e = youtube_superstickers_1.YoutubeSuperstickersData.find((sticker) => sticker.value === 'emoji_sad')) === null || _e === void 0 ? void 0 : _e.imageUrl) !== null && _f !== void 0 ? _f : '',
|
|
4252
4252
|
},
|
|
4253
4253
|
},
|
|
4254
4254
|
],
|
|
@@ -4287,7 +4287,7 @@ exports.LumiaAlertConfigs = {
|
|
|
4287
4287
|
{
|
|
4288
4288
|
type: 'text',
|
|
4289
4289
|
label: 'Image URL',
|
|
4290
|
-
variableField: '
|
|
4290
|
+
variableField: 'contentImage',
|
|
4291
4291
|
required: false,
|
|
4292
4292
|
default: (_h = (_g = youtube_superstickers_1.YoutubeSuperstickersData.find((sticker) => sticker.value === 'emoji_beaming_face')) === null || _g === void 0 ? void 0 : _g.imageUrl) !== null && _h !== void 0 ? _h : '',
|
|
4293
4293
|
},
|
|
@@ -4959,7 +4959,7 @@ exports.LumiaAlertConfigs = {
|
|
|
4959
4959
|
coins: 1,
|
|
4960
4960
|
diamonds: 1,
|
|
4961
4961
|
amount: 1,
|
|
4962
|
-
|
|
4962
|
+
contentImage: 'https://p19-webcast.tiktokcdn.com/img/maliva/webcast-va/eba3a9bb85c33e017f3648eaf88d7189~tplv-obj.png',
|
|
4963
4963
|
},
|
|
4964
4964
|
},
|
|
4965
4965
|
{
|
|
@@ -4969,7 +4969,7 @@ exports.LumiaAlertConfigs = {
|
|
|
4969
4969
|
username: 'lumiastream',
|
|
4970
4970
|
avatar: 'https://static-cdn.jtvnw.net/jtv_user_pictures/2b1fa336-f9b2-42cf-bd2c-98675da74982-profile_image-70x70.png',
|
|
4971
4971
|
giftName: 'Pumpkin',
|
|
4972
|
-
|
|
4972
|
+
contentImage: 'https://p19-webcast.tiktokcdn.com/img/maliva/webcast-va/e675252b83e97135f9ede3b5d32c2c71~tplv-obj.png',
|
|
4973
4973
|
giftType: 2,
|
|
4974
4974
|
giftId: 7095,
|
|
4975
4975
|
giftAmount: 1,
|
|
@@ -4986,7 +4986,7 @@ exports.LumiaAlertConfigs = {
|
|
|
4986
4986
|
username: 'lumiastream',
|
|
4987
4987
|
avatar: 'https://static-cdn.jtvnw.net/jtv_user_pictures/2b1fa336-f9b2-42cf-bd2c-98675da74982-profile_image-70x70.png',
|
|
4988
4988
|
giftName: 'Boiling Cauldron',
|
|
4989
|
-
|
|
4989
|
+
contentImage: 'https://p19-webcast.tiktokcdn.com/img/maliva/webcast-va/e675252b83e97135f9ede3b5d32c2c71~tplv-obj.png',
|
|
4990
4990
|
giftType: 2,
|
|
4991
4991
|
giftId: 7158,
|
|
4992
4992
|
giftAmount: 1,
|
|
@@ -6,4 +6,5 @@ export interface InputFieldLike {
|
|
|
6
6
|
}
|
|
7
7
|
export declare function isRedundantInputField(inputField: InputFieldLike, allInputFields: ReadonlyArray<InputFieldLike> | undefined): boolean;
|
|
8
8
|
export declare function syncLinkedVariableFields(values: Record<string, any>): void;
|
|
9
|
+
export declare function aliasContentImageFromLegacy(values: Record<string, any>): void;
|
|
9
10
|
export declare function coerceNumericAlertFields(values: Record<string, any>): void;
|
package/dist/emulate.helpers.js
CHANGED
|
@@ -5,6 +5,7 @@ exports.getExampleAlertVariableValue = getExampleAlertVariableValue;
|
|
|
5
5
|
exports.buildExampleAlertVariables = buildExampleAlertVariables;
|
|
6
6
|
exports.isRedundantInputField = isRedundantInputField;
|
|
7
7
|
exports.syncLinkedVariableFields = syncLinkedVariableFields;
|
|
8
|
+
exports.aliasContentImageFromLegacy = aliasContentImageFromLegacy;
|
|
8
9
|
exports.coerceNumericAlertFields = coerceNumericAlertFields;
|
|
9
10
|
exports.EMULATE_EXAMPLE_AVATAR_URL = 'https://static-cdn.jtvnw.net/jtv_user_pictures/2b1fa336-f9b2-42cf-bd2c-98675da74982-profile_image-300x300.png';
|
|
10
11
|
function getExampleAlertVariableValue(variableName) {
|
|
@@ -85,6 +86,21 @@ function buildExampleAlertVariables(acceptedVariables, existingExtraSettings) {
|
|
|
85
86
|
}, {});
|
|
86
87
|
}
|
|
87
88
|
const LINKED_VARIABLE_FIELD_GROUPS = [['giftAmount', 'amount']];
|
|
89
|
+
// One-way alias: any of the legacy per-platform image field names (the
|
|
90
|
+
// pre-canonical names — giftPictureUrl, imageUrl, etc.) backfills
|
|
91
|
+
// `contentImage` if it's empty. We don't do the reverse — populating every
|
|
92
|
+
// legacy field from canonical would scatter the URL across alert types it
|
|
93
|
+
// doesn't belong to. Real platform managers continue to emit their own
|
|
94
|
+
// legacy field directly; this only matters for emulated payloads and any
|
|
95
|
+
// older form that still binds to a legacy variableField.
|
|
96
|
+
const LEGACY_CONTENT_IMAGE_FIELDS = [
|
|
97
|
+
'giftPictureUrl',
|
|
98
|
+
'imageUrl',
|
|
99
|
+
'giftImageUrl',
|
|
100
|
+
'clip_thumbnail',
|
|
101
|
+
'charity_logo',
|
|
102
|
+
'offerImageUrl',
|
|
103
|
+
];
|
|
88
104
|
function isRedundantInputField(inputField, allInputFields) {
|
|
89
105
|
if (!inputField || !allInputFields)
|
|
90
106
|
return false;
|
|
@@ -164,6 +180,19 @@ const NUMERIC_ALERT_FIELDS = new Set([
|
|
|
164
180
|
'progress',
|
|
165
181
|
'goal',
|
|
166
182
|
]);
|
|
183
|
+
function aliasContentImageFromLegacy(values) {
|
|
184
|
+
if (!values)
|
|
185
|
+
return;
|
|
186
|
+
if (typeof values.contentImage === 'string' && values.contentImage !== '')
|
|
187
|
+
return;
|
|
188
|
+
for (const key of LEGACY_CONTENT_IMAGE_FIELDS) {
|
|
189
|
+
const v = values[key];
|
|
190
|
+
if (typeof v === 'string' && v !== '') {
|
|
191
|
+
values.contentImage = v;
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
167
196
|
function coerceNumericAlertFields(values) {
|
|
168
197
|
if (!values)
|
|
169
198
|
return;
|
package/dist/esm/alert.types.js
CHANGED
|
@@ -2781,7 +2781,7 @@ export const LumiaAlertConfigs = {
|
|
|
2781
2781
|
charity_id: 'lumia123',
|
|
2782
2782
|
charity_name: 'Lumia Charity',
|
|
2783
2783
|
charity_description: 'Give me more lights',
|
|
2784
|
-
|
|
2784
|
+
contentImage: 'https://static-cdn.jtvnw.net/jtv_user_pictures/2b1fa336-f9b2-42cf-bd2c-98675da74982-profile_image-70x70.png',
|
|
2785
2785
|
charity_website: 'https://lumiastream.com',
|
|
2786
2786
|
started_at: '2022-07-26T17:00:03.17106713Z',
|
|
2787
2787
|
},
|
|
@@ -2797,7 +2797,7 @@ export const LumiaAlertConfigs = {
|
|
|
2797
2797
|
charity_id: 'lumia123',
|
|
2798
2798
|
charity_name: 'Lumia Charity',
|
|
2799
2799
|
charity_description: 'Give me more lights',
|
|
2800
|
-
|
|
2800
|
+
contentImage: 'https://static-cdn.jtvnw.net/jtv_user_pictures/2b1fa336-f9b2-42cf-bd2c-98675da74982-profile_image-70x70.png',
|
|
2801
2801
|
charity_website: 'https://lumiastream.com',
|
|
2802
2802
|
started_at: '2022-07-26T17:00:03.17106713Z',
|
|
2803
2803
|
},
|
|
@@ -2813,7 +2813,7 @@ export const LumiaAlertConfigs = {
|
|
|
2813
2813
|
charity_id: 'lumia123',
|
|
2814
2814
|
charity_name: 'Lumia Charity',
|
|
2815
2815
|
charity_description: 'Give me more lights',
|
|
2816
|
-
|
|
2816
|
+
contentImage: 'https://static-cdn.jtvnw.net/jtv_user_pictures/2b1fa336-f9b2-42cf-bd2c-98675da74982-profile_image-70x70.png',
|
|
2817
2817
|
charity_website: 'https://lumiastream.com',
|
|
2818
2818
|
started_at: '2022-07-26T17:00:03.17106713Z',
|
|
2819
2819
|
},
|
|
@@ -2888,7 +2888,7 @@ export const LumiaAlertConfigs = {
|
|
|
2888
2888
|
charity_id: 'lumia123',
|
|
2889
2889
|
charity_name: 'Lumia Charity',
|
|
2890
2890
|
charity_description: 'Give me more lights',
|
|
2891
|
-
|
|
2891
|
+
contentImage: 'https://static-cdn.jtvnw.net/jtv_user_pictures/2b1fa336-f9b2-42cf-bd2c-98675da74982-profile_image-70x70.png',
|
|
2892
2892
|
charity_amount: 0,
|
|
2893
2893
|
charity_target_amount: 100,
|
|
2894
2894
|
charity_website: 'https://lumiastream.com',
|
|
@@ -2951,7 +2951,7 @@ export const LumiaAlertConfigs = {
|
|
|
2951
2951
|
extraSettings: {
|
|
2952
2952
|
charity_name: 'Lumia Charity',
|
|
2953
2953
|
charity_description: 'Give me more lights',
|
|
2954
|
-
|
|
2954
|
+
contentImage: 'https://static-cdn.jtvnw.net/jtv_user_pictures/2b1fa336-f9b2-42cf-bd2c-98675da74982-profile_image-70x70.png',
|
|
2955
2955
|
charity_amount: 20,
|
|
2956
2956
|
charity_target_amount: 100,
|
|
2957
2957
|
charity_website: 'https://lumiastream.com',
|
|
@@ -3013,7 +3013,7 @@ export const LumiaAlertConfigs = {
|
|
|
3013
3013
|
extraSettings: {
|
|
3014
3014
|
charity_name: 'Lumia Charity',
|
|
3015
3015
|
charity_description: 'Give me more lights',
|
|
3016
|
-
|
|
3016
|
+
contentImage: 'https://static-cdn.jtvnw.net/jtv_user_pictures/2b1fa336-f9b2-42cf-bd2c-98675da74982-profile_image-70x70.png',
|
|
3017
3017
|
charity_amount: 100,
|
|
3018
3018
|
charity_target_amount: 100,
|
|
3019
3019
|
charity_website: 'https://lumiastream.com',
|
|
@@ -3921,7 +3921,7 @@ export const LumiaAlertConfigs = {
|
|
|
3921
3921
|
comboCount: 1,
|
|
3922
3922
|
hasVisualEffect: false,
|
|
3923
3923
|
giftUrl: 'https://www.gstatic.com/youtube/img/pdg/gift/assets/gold_coin_v2_320x320.png',
|
|
3924
|
-
|
|
3924
|
+
contentImage: 'https://www.gstatic.com/youtube/img/pdg/gift/assets/gold_coin_v2_320x320.png',
|
|
3925
3925
|
giftDurationSeconds: 3,
|
|
3926
3926
|
giftDurationNanos: 0,
|
|
3927
3927
|
altText: 'Heart',
|
|
@@ -3941,7 +3941,7 @@ export const LumiaAlertConfigs = {
|
|
|
3941
3941
|
comboCount: 1,
|
|
3942
3942
|
hasVisualEffect: true,
|
|
3943
3943
|
giftUrl: 'https://www.gstatic.com/youtube/img/pdg/gift/assets/gold_coin_v2_320x320.png',
|
|
3944
|
-
|
|
3944
|
+
contentImage: 'https://www.gstatic.com/youtube/img/pdg/gift/assets/gold_coin_v2_320x320.png',
|
|
3945
3945
|
giftDurationSeconds: 3,
|
|
3946
3946
|
giftDurationNanos: 0,
|
|
3947
3947
|
altText: 'Rose',
|
|
@@ -3961,7 +3961,7 @@ export const LumiaAlertConfigs = {
|
|
|
3961
3961
|
comboCount: 5,
|
|
3962
3962
|
hasVisualEffect: true,
|
|
3963
3963
|
giftUrl: 'https://www.gstatic.com/youtube/img/pdg/gift/assets/gold_coin_v2_320x320.png',
|
|
3964
|
-
|
|
3964
|
+
contentImage: 'https://www.gstatic.com/youtube/img/pdg/gift/assets/gold_coin_v2_320x320.png',
|
|
3965
3965
|
giftDurationSeconds: 3,
|
|
3966
3966
|
giftDurationNanos: 0,
|
|
3967
3967
|
altText: 'Star',
|
|
@@ -4215,7 +4215,7 @@ export const LumiaAlertConfigs = {
|
|
|
4215
4215
|
currencySymbol: '$',
|
|
4216
4216
|
stickerId: 'emoji_beaming_face',
|
|
4217
4217
|
stickerName: 'Emoji Beaming Face',
|
|
4218
|
-
|
|
4218
|
+
contentImage: (_b = (_a = YoutubeSuperstickersData.find((sticker) => sticker.value === 'emoji_beaming_face')) === null || _a === void 0 ? void 0 : _a.imageUrl) !== null && _b !== void 0 ? _b : '',
|
|
4219
4219
|
},
|
|
4220
4220
|
},
|
|
4221
4221
|
{
|
|
@@ -4230,7 +4230,7 @@ export const LumiaAlertConfigs = {
|
|
|
4230
4230
|
currencySymbol: '$',
|
|
4231
4231
|
stickerId: 'emoji_laughing',
|
|
4232
4232
|
stickerName: 'Emoji Laughing',
|
|
4233
|
-
|
|
4233
|
+
contentImage: (_d = (_c = YoutubeSuperstickersData.find((sticker) => sticker.value === 'emoji_laughing')) === null || _c === void 0 ? void 0 : _c.imageUrl) !== null && _d !== void 0 ? _d : '',
|
|
4234
4234
|
},
|
|
4235
4235
|
},
|
|
4236
4236
|
{
|
|
@@ -4245,7 +4245,7 @@ export const LumiaAlertConfigs = {
|
|
|
4245
4245
|
currencySymbol: '$',
|
|
4246
4246
|
stickerId: 'emoji_sad',
|
|
4247
4247
|
stickerName: 'Emoji Sad',
|
|
4248
|
-
|
|
4248
|
+
contentImage: (_f = (_e = YoutubeSuperstickersData.find((sticker) => sticker.value === 'emoji_sad')) === null || _e === void 0 ? void 0 : _e.imageUrl) !== null && _f !== void 0 ? _f : '',
|
|
4249
4249
|
},
|
|
4250
4250
|
},
|
|
4251
4251
|
],
|
|
@@ -4284,7 +4284,7 @@ export const LumiaAlertConfigs = {
|
|
|
4284
4284
|
{
|
|
4285
4285
|
type: 'text',
|
|
4286
4286
|
label: 'Image URL',
|
|
4287
|
-
variableField: '
|
|
4287
|
+
variableField: 'contentImage',
|
|
4288
4288
|
required: false,
|
|
4289
4289
|
default: (_h = (_g = YoutubeSuperstickersData.find((sticker) => sticker.value === 'emoji_beaming_face')) === null || _g === void 0 ? void 0 : _g.imageUrl) !== null && _h !== void 0 ? _h : '',
|
|
4290
4290
|
},
|
|
@@ -4956,7 +4956,7 @@ export const LumiaAlertConfigs = {
|
|
|
4956
4956
|
coins: 1,
|
|
4957
4957
|
diamonds: 1,
|
|
4958
4958
|
amount: 1,
|
|
4959
|
-
|
|
4959
|
+
contentImage: 'https://p19-webcast.tiktokcdn.com/img/maliva/webcast-va/eba3a9bb85c33e017f3648eaf88d7189~tplv-obj.png',
|
|
4960
4960
|
},
|
|
4961
4961
|
},
|
|
4962
4962
|
{
|
|
@@ -4966,7 +4966,7 @@ export const LumiaAlertConfigs = {
|
|
|
4966
4966
|
username: 'lumiastream',
|
|
4967
4967
|
avatar: 'https://static-cdn.jtvnw.net/jtv_user_pictures/2b1fa336-f9b2-42cf-bd2c-98675da74982-profile_image-70x70.png',
|
|
4968
4968
|
giftName: 'Pumpkin',
|
|
4969
|
-
|
|
4969
|
+
contentImage: 'https://p19-webcast.tiktokcdn.com/img/maliva/webcast-va/e675252b83e97135f9ede3b5d32c2c71~tplv-obj.png',
|
|
4970
4970
|
giftType: 2,
|
|
4971
4971
|
giftId: 7095,
|
|
4972
4972
|
giftAmount: 1,
|
|
@@ -4983,7 +4983,7 @@ export const LumiaAlertConfigs = {
|
|
|
4983
4983
|
username: 'lumiastream',
|
|
4984
4984
|
avatar: 'https://static-cdn.jtvnw.net/jtv_user_pictures/2b1fa336-f9b2-42cf-bd2c-98675da74982-profile_image-70x70.png',
|
|
4985
4985
|
giftName: 'Boiling Cauldron',
|
|
4986
|
-
|
|
4986
|
+
contentImage: 'https://p19-webcast.tiktokcdn.com/img/maliva/webcast-va/e675252b83e97135f9ede3b5d32c2c71~tplv-obj.png',
|
|
4987
4987
|
giftType: 2,
|
|
4988
4988
|
giftId: 7158,
|
|
4989
4989
|
giftAmount: 1,
|
|
@@ -77,6 +77,21 @@ export function buildExampleAlertVariables(acceptedVariables, existingExtraSetti
|
|
|
77
77
|
}, {});
|
|
78
78
|
}
|
|
79
79
|
const LINKED_VARIABLE_FIELD_GROUPS = [['giftAmount', 'amount']];
|
|
80
|
+
// One-way alias: any of the legacy per-platform image field names (the
|
|
81
|
+
// pre-canonical names — giftPictureUrl, imageUrl, etc.) backfills
|
|
82
|
+
// `contentImage` if it's empty. We don't do the reverse — populating every
|
|
83
|
+
// legacy field from canonical would scatter the URL across alert types it
|
|
84
|
+
// doesn't belong to. Real platform managers continue to emit their own
|
|
85
|
+
// legacy field directly; this only matters for emulated payloads and any
|
|
86
|
+
// older form that still binds to a legacy variableField.
|
|
87
|
+
const LEGACY_CONTENT_IMAGE_FIELDS = [
|
|
88
|
+
'giftPictureUrl',
|
|
89
|
+
'imageUrl',
|
|
90
|
+
'giftImageUrl',
|
|
91
|
+
'clip_thumbnail',
|
|
92
|
+
'charity_logo',
|
|
93
|
+
'offerImageUrl',
|
|
94
|
+
];
|
|
80
95
|
export function isRedundantInputField(inputField, allInputFields) {
|
|
81
96
|
if (!inputField || !allInputFields)
|
|
82
97
|
return false;
|
|
@@ -156,6 +171,19 @@ const NUMERIC_ALERT_FIELDS = new Set([
|
|
|
156
171
|
'progress',
|
|
157
172
|
'goal',
|
|
158
173
|
]);
|
|
174
|
+
export function aliasContentImageFromLegacy(values) {
|
|
175
|
+
if (!values)
|
|
176
|
+
return;
|
|
177
|
+
if (typeof values.contentImage === 'string' && values.contentImage !== '')
|
|
178
|
+
return;
|
|
179
|
+
for (const key of LEGACY_CONTENT_IMAGE_FIELDS) {
|
|
180
|
+
const v = values[key];
|
|
181
|
+
if (typeof v === 'string' && v !== '') {
|
|
182
|
+
values.contentImage = v;
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
159
187
|
export function coerceNumericAlertFields(values) {
|
|
160
188
|
if (!values)
|
|
161
189
|
return;
|
package/dist/esm/index.js
CHANGED
|
@@ -4,7 +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, coerceNumericAlertFields, isRedundantInputField, syncLinkedVariableFields, } from './emulate.helpers.js';
|
|
7
|
+
export { EMULATE_EXAMPLE_AVATAR_URL, getExampleAlertVariableValue, buildExampleAlertVariables, coerceNumericAlertFields, aliasContentImageFromLegacy, isRedundantInputField, syncLinkedVariableFields, } from './emulate.helpers.js';
|
|
8
8
|
export { KickKicksData } from './kick_kicks.js';
|
|
9
9
|
export { BLANK_OVERLAY_TEMPLATE_ID } from './overlay_template.types.js';
|
|
10
10
|
export { TiktokGiftsData } from './tiktok_gifts.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ 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, coerceNumericAlertFields, isRedundantInputField, syncLinkedVariableFields, type InputFieldLike, } from './emulate.helpers';
|
|
7
|
+
export { EMULATE_EXAMPLE_AVATAR_URL, getExampleAlertVariableValue, buildExampleAlertVariables, coerceNumericAlertFields, aliasContentImageFromLegacy, isRedundantInputField, syncLinkedVariableFields, type InputFieldLike, } from './emulate.helpers';
|
|
8
8
|
export { KickKicksData } from './kick_kicks';
|
|
9
9
|
export { BLANK_OVERLAY_TEMPLATE_ID, type OverlayTemplate, type OverlayTemplateLayerDescriptor, type OverlayTemplateAnchor, type OverlayTemplateLayerOverrides } from './overlay_template.types';
|
|
10
10
|
export { TiktokGiftsData } from './tiktok_gifts';
|
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.syncLinkedVariableFields = exports.isRedundantInputField = exports.coerceNumericAlertFields = 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;
|
|
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.aliasContentImageFromLegacy = exports.coerceNumericAlertFields = 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; } });
|
|
@@ -41,6 +41,7 @@ Object.defineProperty(exports, "EMULATE_EXAMPLE_AVATAR_URL", { enumerable: true,
|
|
|
41
41
|
Object.defineProperty(exports, "getExampleAlertVariableValue", { enumerable: true, get: function () { return emulate_helpers_1.getExampleAlertVariableValue; } });
|
|
42
42
|
Object.defineProperty(exports, "buildExampleAlertVariables", { enumerable: true, get: function () { return emulate_helpers_1.buildExampleAlertVariables; } });
|
|
43
43
|
Object.defineProperty(exports, "coerceNumericAlertFields", { enumerable: true, get: function () { return emulate_helpers_1.coerceNumericAlertFields; } });
|
|
44
|
+
Object.defineProperty(exports, "aliasContentImageFromLegacy", { enumerable: true, get: function () { return emulate_helpers_1.aliasContentImageFromLegacy; } });
|
|
44
45
|
Object.defineProperty(exports, "isRedundantInputField", { enumerable: true, get: function () { return emulate_helpers_1.isRedundantInputField; } });
|
|
45
46
|
Object.defineProperty(exports, "syncLinkedVariableFields", { enumerable: true, get: function () { return emulate_helpers_1.syncLinkedVariableFields; } });
|
|
46
47
|
var kick_kicks_1 = require("./kick_kicks");
|