@tixyel/streamelements 4.3.0 → 4.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/index.d.ts +81 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -473,6 +473,7 @@ declare namespace StreamElementsEvents {
|
|
|
473
473
|
updatedAt: string;
|
|
474
474
|
activityId: string;
|
|
475
475
|
sessionEventsCount: number;
|
|
476
|
+
isMock?: boolean;
|
|
476
477
|
}
|
|
477
478
|
namespace Event {
|
|
478
479
|
type Data = {
|
|
@@ -486,7 +487,6 @@ declare namespace StreamElementsEvents {
|
|
|
486
487
|
amount: string;
|
|
487
488
|
currency: string;
|
|
488
489
|
username: string;
|
|
489
|
-
tipId: string;
|
|
490
490
|
message: string;
|
|
491
491
|
avatar: string;
|
|
492
492
|
};
|
|
@@ -630,6 +630,81 @@ declare namespace YoutubeEvents {
|
|
|
630
630
|
isCommunityGift: true;
|
|
631
631
|
};
|
|
632
632
|
}
|
|
633
|
+
interface BaseEvent {
|
|
634
|
+
provider: 'youtube';
|
|
635
|
+
flagged: boolean;
|
|
636
|
+
channel: string;
|
|
637
|
+
createdAt: string;
|
|
638
|
+
_id: string;
|
|
639
|
+
expiresAt: string;
|
|
640
|
+
updatedAt: string;
|
|
641
|
+
activityId: string;
|
|
642
|
+
sessionEventsCount: number;
|
|
643
|
+
isMock?: boolean;
|
|
644
|
+
}
|
|
645
|
+
namespace Event {
|
|
646
|
+
type Data = {
|
|
647
|
+
listener: 'event';
|
|
648
|
+
event: Event;
|
|
649
|
+
};
|
|
650
|
+
type Event = Superchat | Subscriber | Sponsor | CommunityGiftedSponsor;
|
|
651
|
+
interface Superchat extends BaseEvent {
|
|
652
|
+
type: 'superchat';
|
|
653
|
+
data: {
|
|
654
|
+
amount: string;
|
|
655
|
+
username: string;
|
|
656
|
+
message: string;
|
|
657
|
+
avatar: string;
|
|
658
|
+
providerId: string;
|
|
659
|
+
};
|
|
660
|
+
}
|
|
661
|
+
interface Subscriber extends BaseEvent {
|
|
662
|
+
type: 'subscriber';
|
|
663
|
+
data: {
|
|
664
|
+
avatar: string;
|
|
665
|
+
displayName: string;
|
|
666
|
+
username: string;
|
|
667
|
+
providerId: string;
|
|
668
|
+
};
|
|
669
|
+
}
|
|
670
|
+
interface Sponsor extends BaseEvent {
|
|
671
|
+
type: 'sponsor';
|
|
672
|
+
data: FirstTimeSponsor | Resubscribe | GiftedSponsor;
|
|
673
|
+
}
|
|
674
|
+
type FirstTimeSponsor = {
|
|
675
|
+
amount: number;
|
|
676
|
+
username: string;
|
|
677
|
+
displayName: string;
|
|
678
|
+
providerId: string;
|
|
679
|
+
avatar: string;
|
|
680
|
+
};
|
|
681
|
+
type Resubscribe = {
|
|
682
|
+
amount: number;
|
|
683
|
+
username: string;
|
|
684
|
+
displayName: string;
|
|
685
|
+
providerId: string;
|
|
686
|
+
avatar: string;
|
|
687
|
+
};
|
|
688
|
+
type GiftedSponsor = {
|
|
689
|
+
amount: number;
|
|
690
|
+
username: string;
|
|
691
|
+
displayName: string;
|
|
692
|
+
providerId: string;
|
|
693
|
+
sender: string;
|
|
694
|
+
gifted: true;
|
|
695
|
+
avatar: string;
|
|
696
|
+
};
|
|
697
|
+
interface CommunityGiftedSponsor extends BaseEvent {
|
|
698
|
+
type: 'communityGiftPurchase';
|
|
699
|
+
data: {
|
|
700
|
+
amount: number;
|
|
701
|
+
username: string;
|
|
702
|
+
displayName: string;
|
|
703
|
+
providerId: string;
|
|
704
|
+
avatar: string;
|
|
705
|
+
};
|
|
706
|
+
}
|
|
707
|
+
}
|
|
633
708
|
}
|
|
634
709
|
|
|
635
710
|
type PathValue<T, P extends string> = P extends `${infer K}.${infer Rest}` ? K extends keyof T ? PathValue<T[K], Rest> : never : P extends keyof T ? T[P] : never;
|
|
@@ -819,6 +894,7 @@ declare namespace TwitchEvents {
|
|
|
819
894
|
updatedAt: string;
|
|
820
895
|
activityId: string;
|
|
821
896
|
sessionEventsCount: number;
|
|
897
|
+
isMock?: boolean;
|
|
822
898
|
}
|
|
823
899
|
namespace Event {
|
|
824
900
|
type Data = {
|
|
@@ -997,8 +1073,9 @@ declare namespace StreamElements {
|
|
|
997
1073
|
};
|
|
998
1074
|
namespace Provider {
|
|
999
1075
|
namespace YouTube {
|
|
1000
|
-
type Events =
|
|
1076
|
+
type Events = Message | Event | Superchat | Subscriber | Sponsor;
|
|
1001
1077
|
type Message = YoutubeEvents.Message.Data;
|
|
1078
|
+
type Event = YoutubeEvents.Event.Data;
|
|
1002
1079
|
type Superchat = YoutubeEvents.Superchat.Data;
|
|
1003
1080
|
type Subscriber = YoutubeEvents.Subscriber.Data;
|
|
1004
1081
|
type Sponsor = YoutubeEvents.Sponsor.Data;
|
|
@@ -1007,7 +1084,7 @@ declare namespace StreamElements {
|
|
|
1007
1084
|
type spam = YoutubeEvents.Sponsor.spam;
|
|
1008
1085
|
}
|
|
1009
1086
|
namespace StreamElements {
|
|
1010
|
-
type Events =
|
|
1087
|
+
type Events = Tip | Event | KVStore | EventSkip | EventTest | BotCounter | AlertService;
|
|
1011
1088
|
type Tip = StreamElementsEvents.Tip.Data;
|
|
1012
1089
|
type Event = StreamElementsEvents.Event.Data;
|
|
1013
1090
|
type KVStore = StreamElementsEvents.KVStore.Data;
|
|
@@ -1017,7 +1094,7 @@ declare namespace StreamElements {
|
|
|
1017
1094
|
type AlertService = StreamElementsEvents.AlertService.Data;
|
|
1018
1095
|
}
|
|
1019
1096
|
namespace Twitch {
|
|
1020
|
-
type Events =
|
|
1097
|
+
type Events = Raid | Event | Cheer | Message | Follower | Subscriber | DeleteMessage | DeleteMessages;
|
|
1021
1098
|
type SubscriberTier = TwitchEvents.Subscriber.SubscriberTier;
|
|
1022
1099
|
type Raid = TwitchEvents.Raid.Data;
|
|
1023
1100
|
type Event = TwitchEvents.Event.Data;
|
package/package.json
CHANGED