@lumiastream/lumia-types 3.3.0 → 3.3.2
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/activity.types.d.ts +6 -0
- package/dist/activity.types.js +6 -0
- package/dist/alert.types.js +110 -0
- package/dist/custom-code/important-notes.md +24 -9
- package/dist/custom-overlays/custom-overlays.d.ts +4 -0
- package/dist/custom-overlays.d.ts +4 -0
- package/dist/event.types.d.ts +1 -0
- package/dist/variables.types.d.ts +2 -0
- package/dist/variables.types.js +10 -1
- package/package.json +1 -1
package/dist/activity.types.d.ts
CHANGED
|
@@ -407,6 +407,10 @@ export declare enum LumiaAlertValues {
|
|
|
407
407
|
TILTIFY_DONATION = "tiltify-campaignDonation",
|
|
408
408
|
/** Throne gift purchase */
|
|
409
409
|
THRONE_GIFT_PURCHASE = "throne-giftPurchase",
|
|
410
|
+
/** Throne contribution purchase */
|
|
411
|
+
THRONE_CONTRIBUTION_PURCHASE = "throne-contributionPurchase",
|
|
412
|
+
/** Throne gift crowdfunded */
|
|
413
|
+
THRONE_GIFT_CROWDFUNDED = "throne-giftCrowdfunded",
|
|
410
414
|
/** TipeeeStream donation */
|
|
411
415
|
TIPEEESTREAM_DONATION = "tipeeestream-donation",
|
|
412
416
|
/** TreatStream treat */
|
|
@@ -687,6 +691,8 @@ export declare const LumiaAlertFriendlyValues: {
|
|
|
687
691
|
"donordrive-donation": string;
|
|
688
692
|
"tiltify-campaignDonation": string;
|
|
689
693
|
"throne-giftPurchase": string;
|
|
694
|
+
"throne-contributionPurchase": string;
|
|
695
|
+
"throne-giftCrowdfunded": string;
|
|
690
696
|
"tipeeestream-donation": string;
|
|
691
697
|
"treatstream-treat": string;
|
|
692
698
|
"patreon-campaignPledge": string;
|
package/dist/activity.types.js
CHANGED
|
@@ -428,6 +428,10 @@ var LumiaAlertValues;
|
|
|
428
428
|
LumiaAlertValues["TILTIFY_DONATION"] = "tiltify-campaignDonation";
|
|
429
429
|
/** Throne gift purchase */
|
|
430
430
|
LumiaAlertValues["THRONE_GIFT_PURCHASE"] = "throne-giftPurchase";
|
|
431
|
+
/** Throne contribution purchase */
|
|
432
|
+
LumiaAlertValues["THRONE_CONTRIBUTION_PURCHASE"] = "throne-contributionPurchase";
|
|
433
|
+
/** Throne gift crowdfunded */
|
|
434
|
+
LumiaAlertValues["THRONE_GIFT_CROWDFUNDED"] = "throne-giftCrowdfunded";
|
|
431
435
|
/** TipeeeStream donation */
|
|
432
436
|
LumiaAlertValues["TIPEEESTREAM_DONATION"] = "tipeeestream-donation";
|
|
433
437
|
/** TreatStream treat */
|
|
@@ -717,6 +721,8 @@ exports.LumiaAlertFriendlyValues = {
|
|
|
717
721
|
[LumiaAlertValues.DONORDRIVE_DONATION]: 'Donordrive Tip',
|
|
718
722
|
[LumiaAlertValues.TILTIFY_DONATION]: 'Tiltify Campaign Tip',
|
|
719
723
|
[LumiaAlertValues.THRONE_GIFT_PURCHASE]: 'Throne Gift Purchase',
|
|
724
|
+
[LumiaAlertValues.THRONE_CONTRIBUTION_PURCHASE]: 'Throne Contribution Purchase',
|
|
725
|
+
[LumiaAlertValues.THRONE_GIFT_CROWDFUNDED]: 'Throne Gift Crowdfunded',
|
|
720
726
|
// [LumiaAlertValues.PAYPAL_PAYMENT_COMPLETE]: "Paypal Payment Complete",
|
|
721
727
|
// [LumiaAlertValues.PAYPAL_PAYMENT_DENIED]: "Paypal Payment Denied",
|
|
722
728
|
[LumiaAlertValues.TIPEEESTREAM_DONATION]: 'Tipeeestream Tip',
|
package/dist/alert.types.js
CHANGED
|
@@ -7334,6 +7334,116 @@ exports.LumiaAlertConfigs = {
|
|
|
7334
7334
|
{ type: LumiaVariationConditions.EQUAL_VARIABLE },
|
|
7335
7335
|
],
|
|
7336
7336
|
},
|
|
7337
|
+
[activity_types_1.LumiaAlertValues.THRONE_CONTRIBUTION_PURCHASE]: {
|
|
7338
|
+
connection: event_types_1.LumiaIntegrations.THRONE,
|
|
7339
|
+
message: '{{username}} contributed {{amount}} {{currency}} toward {{itemName}} on Throne. {{message}}',
|
|
7340
|
+
eventlistMessage: 'Contribution Purchase',
|
|
7341
|
+
eventlistDetailedMessage: 'contributed {{amount}} {{currency}} toward {{itemName}}',
|
|
7342
|
+
acceptedVariables: variables_types_1.AllVariables.throne.alerts.contributionPurchase,
|
|
7343
|
+
quickActions: [
|
|
7344
|
+
{
|
|
7345
|
+
label: '$10',
|
|
7346
|
+
dynamic: { value: 10, currency: LumiaVariationCurrency.USD },
|
|
7347
|
+
extraSettings: {
|
|
7348
|
+
username: 'lumiastream',
|
|
7349
|
+
displayname: 'lumiastream',
|
|
7350
|
+
message: 'Happy to contribute!',
|
|
7351
|
+
itemName: 'AirPods Max',
|
|
7352
|
+
itemThumbnailUrl: 'https://m.media-amazon.com/images/I/81jqUPkIVRL._AC_SX522_.jpg',
|
|
7353
|
+
amount: 10,
|
|
7354
|
+
currency: LumiaVariationCurrency.USD,
|
|
7355
|
+
creatorUsername: 'lumiastream',
|
|
7356
|
+
},
|
|
7357
|
+
},
|
|
7358
|
+
],
|
|
7359
|
+
inputFields: [
|
|
7360
|
+
{
|
|
7361
|
+
type: 'text',
|
|
7362
|
+
label: 'Username',
|
|
7363
|
+
variableField: 'username',
|
|
7364
|
+
required: false,
|
|
7365
|
+
default: 'lumiastream',
|
|
7366
|
+
},
|
|
7367
|
+
{
|
|
7368
|
+
type: 'text',
|
|
7369
|
+
label: 'Item',
|
|
7370
|
+
variableField: 'itemName',
|
|
7371
|
+
required: true,
|
|
7372
|
+
default: 'AirPods Max',
|
|
7373
|
+
},
|
|
7374
|
+
{
|
|
7375
|
+
type: 'number',
|
|
7376
|
+
label: 'Amount',
|
|
7377
|
+
dynamicField: 'value',
|
|
7378
|
+
variableField: 'amount',
|
|
7379
|
+
required: false,
|
|
7380
|
+
default: 10,
|
|
7381
|
+
},
|
|
7382
|
+
{
|
|
7383
|
+
type: 'currency',
|
|
7384
|
+
label: 'Currency',
|
|
7385
|
+
dynamicField: 'currency',
|
|
7386
|
+
variableField: 'currency',
|
|
7387
|
+
required: false,
|
|
7388
|
+
default: LumiaVariationCurrency.USD,
|
|
7389
|
+
},
|
|
7390
|
+
{
|
|
7391
|
+
type: 'text',
|
|
7392
|
+
label: 'Message',
|
|
7393
|
+
variableField: 'message',
|
|
7394
|
+
required: false,
|
|
7395
|
+
default: 'Happy to contribute!',
|
|
7396
|
+
},
|
|
7397
|
+
],
|
|
7398
|
+
LumiaVariationConditions: [
|
|
7399
|
+
{ type: LumiaVariationConditions.RANDOM },
|
|
7400
|
+
{
|
|
7401
|
+
type: LumiaVariationConditions.EQUAL_CURRENCY_NUMBER,
|
|
7402
|
+
},
|
|
7403
|
+
{
|
|
7404
|
+
type: LumiaVariationConditions.GREATER_CURRENCY_NUMBER,
|
|
7405
|
+
},
|
|
7406
|
+
{ type: LumiaVariationConditions.EQUAL_VARIABLE },
|
|
7407
|
+
],
|
|
7408
|
+
},
|
|
7409
|
+
[activity_types_1.LumiaAlertValues.THRONE_GIFT_CROWDFUNDED]: {
|
|
7410
|
+
connection: event_types_1.LumiaIntegrations.THRONE,
|
|
7411
|
+
message: '{{itemName}} was crowdfunded on Throne.',
|
|
7412
|
+
eventlistMessage: 'Gift Crowdfunded',
|
|
7413
|
+
eventlistDetailedMessage: 'crowdfunded {{itemName}}',
|
|
7414
|
+
acceptedVariables: variables_types_1.AllVariables.throne.alerts.giftCrowdfunded,
|
|
7415
|
+
quickActions: [
|
|
7416
|
+
{
|
|
7417
|
+
label: 'Gift',
|
|
7418
|
+
dynamic: { value: 'AirPods Max', name: 'AirPods Max' },
|
|
7419
|
+
extraSettings: {
|
|
7420
|
+
username: 'Community',
|
|
7421
|
+
displayname: 'Community',
|
|
7422
|
+
itemName: 'AirPods Max',
|
|
7423
|
+
itemThumbnailUrl: 'https://m.media-amazon.com/images/I/81jqUPkIVRL._AC_SX522_.jpg',
|
|
7424
|
+
isSurpriseGift: false,
|
|
7425
|
+
creatorUsername: 'lumiastream',
|
|
7426
|
+
},
|
|
7427
|
+
},
|
|
7428
|
+
],
|
|
7429
|
+
inputFields: [
|
|
7430
|
+
{
|
|
7431
|
+
type: 'text',
|
|
7432
|
+
label: 'Item',
|
|
7433
|
+
dynamicField: 'value',
|
|
7434
|
+
variableField: 'itemName',
|
|
7435
|
+
required: true,
|
|
7436
|
+
default: 'AirPods Max',
|
|
7437
|
+
},
|
|
7438
|
+
],
|
|
7439
|
+
LumiaVariationConditions: [
|
|
7440
|
+
{ type: LumiaVariationConditions.RANDOM },
|
|
7441
|
+
{
|
|
7442
|
+
type: LumiaVariationConditions.EQUAL_STRING,
|
|
7443
|
+
},
|
|
7444
|
+
{ type: LumiaVariationConditions.EQUAL_VARIABLE },
|
|
7445
|
+
],
|
|
7446
|
+
},
|
|
7337
7447
|
// },
|
|
7338
7448
|
// fourthwall: {
|
|
7339
7449
|
[activity_types_1.LumiaAlertValues.FOURTHWALL_DONATION]: {
|
|
@@ -13,28 +13,43 @@ title: Important notes
|
|
|
13
13
|
The different options are: `isSelf, mod, vip, tier3, tier2, tier1, subscriber, follower`.
|
|
14
14
|
In your code you should use `const levels = await getVariable('userLevelsRaw');` and then you can check a level with `if (levels.subscriber) {}` since these are all booleans
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
## Origin and queue type variables
|
|
17
|
+
|
|
18
|
+
We expose `{{originType}}` and `{{queueType}}` so custom code can tell where an activity came from and what kind of queued activity is running.
|
|
19
|
+
|
|
20
|
+
Use `originType` when you want to branch by the source of the activity. Use `queueType` when you need the specific command category that Lumia is executing.
|
|
21
|
+
|
|
22
|
+
| Variable | What it means | Common values |
|
|
23
|
+
| --- | --- | --- |
|
|
24
|
+
| `originType` | Where the activity came from. This controls queue priority and groups similar sources together. | `alert`, `chat`, `chatbot`, `twitch-points`, `twitch-extension`, `kick-points`, `system`, `api`, `streamdeck`, `touchportal`, `loupedeck`, `avermedia`, `lumiastreamlink` |
|
|
25
|
+
| `queueType` | The specific queued command/activity type. This is the best value to check when you need to distinguish a normal chat command from a chat match. | `alert`, `chat-command`, `chatbot-command`, `chat-match`, `twitch-points`, `twitch-points-output`, `twitch-extension`, `twitch-extension-hfx`, `kick-points` |
|
|
26
|
+
|
|
27
|
+
Important: "commands" are not a single `originType`. A normal chat command uses `originType: "chat"` and `queueType: "chat-command"`, while a chat match also uses `originType: "chat"` but uses `queueType: "chat-match"`.
|
|
19
28
|
|
|
20
29
|
```js
|
|
21
30
|
async function() {
|
|
22
31
|
const originType = await getVariable('originType');
|
|
23
|
-
const
|
|
32
|
+
const queueType = await getVariable('queueType');
|
|
24
33
|
|
|
25
|
-
if (
|
|
26
|
-
|
|
34
|
+
if (queueType === 'chat-match') {
|
|
35
|
+
log('This ran from a chat match.');
|
|
27
36
|
done();
|
|
28
37
|
return;
|
|
29
38
|
}
|
|
30
39
|
|
|
31
|
-
if (
|
|
32
|
-
|
|
40
|
+
if (queueType === 'chat-command') {
|
|
41
|
+
log('This ran from a normal chat command.');
|
|
42
|
+
done();
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (originType === 'alert') {
|
|
47
|
+
log('This ran from an alert.');
|
|
33
48
|
done();
|
|
34
49
|
return;
|
|
35
50
|
}
|
|
36
51
|
|
|
37
|
-
log(`Skipping custom code for originType
|
|
52
|
+
log(`Skipping custom code for originType=${originType}, queueType=${queueType}`);
|
|
38
53
|
done();
|
|
39
54
|
}
|
|
40
55
|
```
|
|
@@ -695,6 +695,10 @@ export declare enum LumiaAlertValues {
|
|
|
695
695
|
TILTIFY_DONATION = "tiltify-campaignDonation",
|
|
696
696
|
/** Throne gift purchase */
|
|
697
697
|
THRONE_GIFT_PURCHASE = "throne-giftPurchase",
|
|
698
|
+
/** Throne contribution purchase */
|
|
699
|
+
THRONE_CONTRIBUTION_PURCHASE = "throne-contributionPurchase",
|
|
700
|
+
/** Throne gift crowdfunded */
|
|
701
|
+
THRONE_GIFT_CROWDFUNDED = "throne-giftCrowdfunded",
|
|
698
702
|
/** TipeeeStream donation */
|
|
699
703
|
TIPEEESTREAM_DONATION = "tipeeestream-donation",
|
|
700
704
|
/** TreatStream treat */
|
|
@@ -695,6 +695,10 @@ export declare enum LumiaAlertValues {
|
|
|
695
695
|
TILTIFY_DONATION = "tiltify-campaignDonation",
|
|
696
696
|
/** Throne gift purchase */
|
|
697
697
|
THRONE_GIFT_PURCHASE = "throne-giftPurchase",
|
|
698
|
+
/** Throne contribution purchase */
|
|
699
|
+
THRONE_CONTRIBUTION_PURCHASE = "throne-contributionPurchase",
|
|
700
|
+
/** Throne gift crowdfunded */
|
|
701
|
+
THRONE_GIFT_CROWDFUNDED = "throne-giftCrowdfunded",
|
|
698
702
|
/** TipeeeStream donation */
|
|
699
703
|
TIPEEESTREAM_DONATION = "tipeeestream-donation",
|
|
700
704
|
/** TreatStream treat */
|
package/dist/event.types.d.ts
CHANGED
package/dist/variables.types.js
CHANGED
|
@@ -734,6 +734,7 @@ exports.ReservedVariables = [
|
|
|
734
734
|
'value',
|
|
735
735
|
'site',
|
|
736
736
|
'originType',
|
|
737
|
+
'queueType',
|
|
737
738
|
'command',
|
|
738
739
|
'merch',
|
|
739
740
|
'message',
|
|
@@ -952,6 +953,7 @@ exports.AllVariables = {
|
|
|
952
953
|
'channelDescription',
|
|
953
954
|
'channelViews',
|
|
954
955
|
'originType',
|
|
956
|
+
'queueType',
|
|
955
957
|
'command',
|
|
956
958
|
'message',
|
|
957
959
|
'messageId',
|
|
@@ -977,6 +979,7 @@ exports.AllVariables = {
|
|
|
977
979
|
'channelDescription',
|
|
978
980
|
'channelViews',
|
|
979
981
|
'originType',
|
|
982
|
+
'queueType',
|
|
980
983
|
'command',
|
|
981
984
|
'message',
|
|
982
985
|
'messageId',
|
|
@@ -998,6 +1001,7 @@ exports.AllVariables = {
|
|
|
998
1001
|
'channelDescription',
|
|
999
1002
|
'channelViews',
|
|
1000
1003
|
'originType',
|
|
1004
|
+
'queueType',
|
|
1001
1005
|
'command',
|
|
1002
1006
|
'prompt',
|
|
1003
1007
|
'message',
|
|
@@ -1015,6 +1019,7 @@ exports.AllVariables = {
|
|
|
1015
1019
|
'channelDescription',
|
|
1016
1020
|
'channelViews',
|
|
1017
1021
|
'originType',
|
|
1022
|
+
'queueType',
|
|
1018
1023
|
'command',
|
|
1019
1024
|
'prompt',
|
|
1020
1025
|
'message',
|
|
@@ -1032,6 +1037,7 @@ exports.AllVariables = {
|
|
|
1032
1037
|
'channelDescription',
|
|
1033
1038
|
'channelViews',
|
|
1034
1039
|
'originType',
|
|
1040
|
+
'queueType',
|
|
1035
1041
|
'command',
|
|
1036
1042
|
'prompt',
|
|
1037
1043
|
'message',
|
|
@@ -1042,7 +1048,7 @@ exports.AllVariables = {
|
|
|
1042
1048
|
'points_cost',
|
|
1043
1049
|
],
|
|
1044
1050
|
fileWatcher: ['content', 'file', 'path', 'timestamp'],
|
|
1045
|
-
chatmatch: ['language_detect_result', 'detected_language', 'detected_language_code'],
|
|
1051
|
+
chatmatch: ['originType', 'queueType', 'language_detect_result', 'detected_language', 'detected_language_code'],
|
|
1046
1052
|
commands: [
|
|
1047
1053
|
'get_all_commands',
|
|
1048
1054
|
'get_commands',
|
|
@@ -1055,6 +1061,7 @@ exports.AllVariables = {
|
|
|
1055
1061
|
'channelDescription',
|
|
1056
1062
|
'channelViews',
|
|
1057
1063
|
'originType',
|
|
1064
|
+
'queueType',
|
|
1058
1065
|
'command',
|
|
1059
1066
|
'message',
|
|
1060
1067
|
'messageId',
|
|
@@ -1724,6 +1731,8 @@ exports.AllVariables = {
|
|
|
1724
1731
|
variables: ['throne_last_gift'],
|
|
1725
1732
|
alerts: {
|
|
1726
1733
|
giftPurchase: ['username', 'displayname', 'message', 'itemName', 'itemThumbnailUrl', 'isSurpriseGift', 'creatorUsername', 'raw'],
|
|
1734
|
+
contributionPurchase: ['username', 'displayname', 'message', 'itemName', 'itemThumbnailUrl', 'amount', 'currency', 'creatorUsername', 'raw'],
|
|
1735
|
+
giftCrowdfunded: ['username', 'displayname', 'itemName', 'itemThumbnailUrl', 'isSurpriseGift', 'creatorUsername', 'raw'],
|
|
1727
1736
|
},
|
|
1728
1737
|
},
|
|
1729
1738
|
tipeeestream: {
|