@allior/wmake-streamelements-events 2.0.4 → 3.1.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/README.md +110 -86
- package/dist/react/hooks/factory.d.ts +31 -0
- package/dist/react/hooks/factory.d.ts.map +1 -0
- package/dist/react/hooks/use-on-event-received.d.ts +85 -13
- package/dist/react/hooks/use-on-event-received.d.ts.map +1 -1
- package/dist/react/index.iife.js +1 -1
- package/dist/react/index.iife.js.map +1 -1
- package/dist/react/index.js +49 -10
- package/dist/react/index.js.map +1 -1
- package/dist/root/{aggregate.d.ts → aggregator/index.d.ts} +5 -3
- package/dist/root/aggregator/index.d.ts.map +1 -0
- package/dist/root/aggregator/types.d.ts +14 -0
- package/dist/root/aggregator/types.d.ts.map +1 -0
- package/dist/root/classifier.d.ts.map +1 -1
- package/dist/root/guards/on-event-received.d.ts +2 -3
- package/dist/root/guards/on-event-received.d.ts.map +1 -1
- package/dist/root/index.d.ts +1 -1
- package/dist/root/index.d.ts.map +1 -1
- package/dist/root/index.iife.js +1 -1
- package/dist/root/index.iife.js.map +1 -1
- package/dist/root/index.js +2 -2
- package/dist/root/types/on-event-received/base.d.ts +0 -13
- package/dist/root/types/on-event-received/base.d.ts.map +1 -1
- package/dist/root/types/on-event-received/button.d.ts +10 -0
- package/dist/root/types/on-event-received/button.d.ts.map +1 -0
- package/dist/root/types/on-event-received/index.d.ts +8 -8
- package/dist/root/types/on-event-received/index.d.ts.map +1 -1
- package/dist/root/types/on-event-received/moderation.d.ts +9 -1
- package/dist/root/types/on-event-received/moderation.d.ts.map +1 -1
- package/dist/root/types/on-event-received/subscriber.d.ts +2 -2
- package/dist/root/types/on-event-received/subscriber.d.ts.map +1 -1
- package/dist/root/types/on-event-received/unknown.d.ts +6 -0
- package/dist/root/types/on-event-received/unknown.d.ts.map +1 -0
- package/dist/{root-BzhLLMHq.js → root-DJod-F4M.js} +31 -47
- package/dist/root-DJod-F4M.js.map +1 -0
- package/package.json +1 -1
- package/dist/root/aggregate.d.ts.map +0 -1
- package/dist/root/types/on-event-received/donation.d.ts +0 -25
- package/dist/root/types/on-event-received/donation.d.ts.map +0 -1
- package/dist/root/types/on-event-received/other.d.ts +0 -10
- package/dist/root/types/on-event-received/other.d.ts.map +0 -1
- package/dist/root-BzhLLMHq.js.map +0 -1
package/dist/root/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, f as r, i, l as a, m as o, n as s, o as c, p as l, r as u, s as d, t as f, u as p } from "../root-
|
|
2
|
-
export { f as AlertQueue, s as TwitchUserMessageData, u as UserRole, r as classifyEvent, l as getCacheKey, i as getTestAlertKey, e as getTestMessageKey,
|
|
1
|
+
import { a as e, c as t, d as n, f as r, i, l as a, m as o, n as s, o as c, p as l, r as u, s as d, t as f, u as p } from "../root-DJod-F4M.js";
|
|
2
|
+
export { f as AlertQueue, s as TwitchUserMessageData, u as UserRole, n as aggregateIncomingEvent, r as classifyEvent, l as getCacheKey, i as getTestAlertKey, e as getTestMessageKey, o as parseTier, c as testAlert, a as testAlerts, d as testMessage, t as testMessages, p as testOnWidgetLoadDetail };
|
|
@@ -42,17 +42,4 @@ export interface ClassifiedTieredBase extends ClassifiedBase {
|
|
|
42
42
|
tier: number;
|
|
43
43
|
tierText: string;
|
|
44
44
|
}
|
|
45
|
-
export interface CacheLike {
|
|
46
|
-
_has(key: string): boolean;
|
|
47
|
-
_set(key: string, value: boolean): void;
|
|
48
|
-
}
|
|
49
|
-
export interface CacheSubsByType {
|
|
50
|
-
_has?(key: string): boolean;
|
|
51
|
-
_set?(key: string, value: boolean): void;
|
|
52
|
-
[type: string]: CacheLike | ((k: string) => boolean) | ((k: string, v: boolean) => void) | undefined;
|
|
53
|
-
}
|
|
54
|
-
export interface NormalizerOptions {
|
|
55
|
-
cacheSubs?: CacheSubsByType;
|
|
56
|
-
broadcasterLogin?: string;
|
|
57
|
-
}
|
|
58
45
|
//# sourceMappingURL=base.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/root/types/on-event-received/base.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,MAAM,EAAE,CAAC,GAAG,OAAO;IACnD,QAAQ,EAAE,CAAC,CAAC;IACZ,KAAK,EAAE,CAAC,CAAC;CACT;AAED,MAAM,WAAW,YAChB,SAAQ,OAAO,CACd,WAAW,CACV,MAAM,EACN;IACC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACvB,CACD,CACD;CAAG;AAEL,MAAM,WAAW,cAAc;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE;QACP,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QACvB,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACvB,CAAC;CACF;AAED,MAAM,WAAW,QAAQ;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,cAAc,GACvB,0BAA0B,GAC1B,gBAAgB,GAChB,UAAU,GACV,qBAAqB,GACrB,aAAa,GACb,QAAQ,GACR,gBAAgB,GAChB,iBAAiB,GACjB,QAAQ,GACR,SAAS,GACT,2BAA2B,GAC3B,sBAAsB,GACtB,sBAAsB,GACtB,mBAAmB,GACnB,YAAY,GACZ,OAAO,GACP,MAAM,GACN,UAAU,GACV,MAAM,CAAC;AAEV,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,cAAc,CAAC;CACrB;AAED,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CACjB
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/root/types/on-event-received/base.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,MAAM,EAAE,CAAC,GAAG,OAAO;IACnD,QAAQ,EAAE,CAAC,CAAC;IACZ,KAAK,EAAE,CAAC,CAAC;CACT;AAED,MAAM,WAAW,YAChB,SAAQ,OAAO,CACd,WAAW,CACV,MAAM,EACN;IACC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACvB,CACD,CACD;CAAG;AAEL,MAAM,WAAW,cAAc;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE;QACP,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QACvB,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACvB,CAAC;CACF;AAED,MAAM,WAAW,QAAQ;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,cAAc,GACvB,0BAA0B,GAC1B,gBAAgB,GAChB,UAAU,GACV,qBAAqB,GACrB,aAAa,GACb,QAAQ,GACR,gBAAgB,GAChB,iBAAiB,GACjB,QAAQ,GACR,SAAS,GACT,2BAA2B,GAC3B,sBAAsB,GACtB,sBAAsB,GACtB,mBAAmB,GACnB,YAAY,GACZ,OAAO,GACP,MAAM,GACN,UAAU,GACV,MAAM,CAAC;AAEV,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,cAAc,CAAC;CACrB;AAED,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ClassifiedBase, EventDetail } from "./base";
|
|
2
|
+
export type TestButtonDetail = EventDetail<"event:test", {
|
|
3
|
+
listener: "widget-button";
|
|
4
|
+
field: string;
|
|
5
|
+
}>;
|
|
6
|
+
export interface ClassifiedButtonClick<T = string> extends ClassifiedBase {
|
|
7
|
+
type: "button";
|
|
8
|
+
field: T;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/root/types/on-event-received/button.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE1D,MAAM,MAAM,gBAAgB,GAAG,WAAW,CACzC,YAAY,EACZ;IACC,QAAQ,EAAE,eAAe,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;CACd,CACD,CAAC;AAEF,MAAM,WAAW,qBAAqB,CAAC,CAAC,GAAG,MAAM,CAAE,SAAQ,cAAc;IACxE,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,CAAC,CAAC;CACT"}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
export * from "./base";
|
|
2
|
+
export * from "./button";
|
|
2
3
|
export * from "./cheer";
|
|
3
|
-
export * from "./donation";
|
|
4
4
|
export * from "./follower";
|
|
5
5
|
export * from "./message";
|
|
6
6
|
export * from "./moderation";
|
|
7
|
-
export * from "./other";
|
|
8
7
|
export * from "./raid";
|
|
9
8
|
export * from "./subscriber";
|
|
9
|
+
export * from "./unknown";
|
|
10
10
|
import type { CheerDetail } from "./cheer";
|
|
11
|
-
import type { DonationDetail } from "./donation";
|
|
12
11
|
import type { FollowerDetail } from "./follower";
|
|
13
12
|
import type { TwitchMessageDetail } from "./message";
|
|
14
13
|
import type { DeleteMessageDetail, DeleteMessagesDetail } from "./moderation";
|
|
15
14
|
import type { RaidDetail } from "./raid";
|
|
16
15
|
import type { CommunityGiftPurchaseDetail, SubscriberDetail, SubscriberLatestDetail } from "./subscriber";
|
|
17
|
-
export type AlertDetail = FollowerDetail | SubscriberLatestDetail | CommunityGiftPurchaseDetail | SubscriberDetail | CheerDetail | RaidDetail |
|
|
16
|
+
export type AlertDetail = FollowerDetail | SubscriberLatestDetail | CommunityGiftPurchaseDetail | SubscriberDetail | CheerDetail | RaidDetail | DeleteMessageDetail | DeleteMessagesDetail | TwitchMessageDetail;
|
|
17
|
+
import type { ClassifiedButtonClick } from "./button";
|
|
18
18
|
import type { ClassifiedCheer } from "./cheer";
|
|
19
|
-
import type { ClassifiedDonation } from "./donation";
|
|
20
19
|
import type { ClassifiedFollower } from "./follower";
|
|
21
|
-
import type {
|
|
20
|
+
import type { ClassifiedDeleteMessage, ClassifiedDeleteMessages } from "./moderation";
|
|
22
21
|
import type { ClassifiedRaid } from "./raid";
|
|
23
|
-
import type {
|
|
24
|
-
|
|
22
|
+
import type { AggregatedCommunityGift, AggregatedRecipient, ClassifiedSelfSub, ClassifiedSoloSub, ClassifiedSubRenewal } from "./subscriber";
|
|
23
|
+
import type { ClassifiedUnknown } from "./unknown";
|
|
24
|
+
export type ClassifiedEvent = AggregatedCommunityGift | AggregatedRecipient | ClassifiedSoloSub | ClassifiedSubRenewal | ClassifiedSelfSub | ClassifiedFollower | ClassifiedCheer | ClassifiedRaid | ClassifiedDeleteMessage | ClassifiedDeleteMessages | ClassifiedButtonClick | ClassifiedUnknown;
|
|
25
25
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/root/types/on-event-received/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/root/types/on-event-received/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;A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-
import type { EventDetail } from "./base";
|
|
1
|
+
import type { ClassifiedBase, EventDetail } from "./base";
|
|
2
2
|
export interface DeleteMessageDetail extends EventDetail<"delete-message", {
|
|
3
3
|
msgId: string;
|
|
4
4
|
}> {
|
|
@@ -7,4 +7,12 @@ export interface DeleteMessagesDetail extends EventDetail<"delete-messages", {
|
|
|
7
7
|
userId: string;
|
|
8
8
|
}> {
|
|
9
9
|
}
|
|
10
|
+
export interface ClassifiedDeleteMessage extends ClassifiedBase {
|
|
11
|
+
type: "delete-message";
|
|
12
|
+
messageId: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ClassifiedDeleteMessages extends ClassifiedBase {
|
|
15
|
+
type: "delete-messages";
|
|
16
|
+
userName: string;
|
|
17
|
+
}
|
|
10
18
|
//# sourceMappingURL=moderation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moderation.d.ts","sourceRoot":"","sources":["../../../../src/root/types/on-event-received/moderation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"moderation.d.ts","sourceRoot":"","sources":["../../../../src/root/types/on-event-received/moderation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE1D,MAAM,WAAW,mBAChB,SAAQ,WAAW,CAAC,gBAAgB,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;CAAG;AAE5D,MAAM,WAAW,oBAChB,SAAQ,WAAW,CAAC,iBAAiB,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;CAAG;AAE9D,MAAM,WAAW,uBAAwB,SAAQ,cAAc;IAC9D,IAAI,EAAE,gBAAgB,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,wBAAyB,SAAQ,cAAc;IAC/D,IAAI,EAAE,iBAAiB,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -37,14 +37,14 @@ export interface CommunityGiftPurchaseDetail extends EventDetail<"event", {
|
|
|
37
37
|
activityId: string;
|
|
38
38
|
}> {
|
|
39
39
|
}
|
|
40
|
-
export interface
|
|
40
|
+
export interface AggregatedCommunityGift extends ClassifiedTieredBase {
|
|
41
41
|
type: "community-gift" | "community-gift-anonymous";
|
|
42
42
|
totalAmount: number;
|
|
43
43
|
recipients: string[];
|
|
44
44
|
sender?: string;
|
|
45
45
|
anonymousDisplayName?: string;
|
|
46
46
|
}
|
|
47
|
-
export interface
|
|
47
|
+
export interface AggregatedRecipient extends ClassifiedTieredBase {
|
|
48
48
|
_role: "recipient";
|
|
49
49
|
activityGroup: string;
|
|
50
50
|
recipient: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriber.d.ts","sourceRoot":"","sources":["../../../../src/root/types/on-event-received/subscriber.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAEhE,MAAM,WAAW,sBAChB,SAAQ,WAAW,CAAC,mBAAmB,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;CAAG;AAE9E,MAAM,WAAW,gBAChB,SAAQ,WAAW,CAClB,OAAO,EACP;IACC,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE;QACL,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;CACnB,CACD;CAAG;AAEL,MAAM,WAAW,2BAChB,SAAQ,WAAW,CAClB,OAAO,EACP;IACC,IAAI,EAAE,uBAAuB,CAAC;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE;QACL,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;CACnB,CACD;CAAG;AAEL,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"subscriber.d.ts","sourceRoot":"","sources":["../../../../src/root/types/on-event-received/subscriber.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAEhE,MAAM,WAAW,sBAChB,SAAQ,WAAW,CAAC,mBAAmB,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;CAAG;AAE9E,MAAM,WAAW,gBAChB,SAAQ,WAAW,CAClB,OAAO,EACP;IACC,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE;QACL,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;I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Q,oBAAoB;IAC9D,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unknown.d.ts","sourceRoot":"","sources":["../../../../src/root/types/on-event-received/unknown.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAE7D,MAAM,WAAW,iBAAkB,SAAQ,cAAc;IACxD,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,cAAc,CAAC;CACvB"}
|
|
@@ -155,25 +155,22 @@ function n(t) {
|
|
|
155
155
|
viewers: e
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
return {
|
|
158
|
+
return n === "delete-message" ? {
|
|
159
|
+
type: "delete-message",
|
|
160
|
+
messageId: r.msgId ?? ""
|
|
161
|
+
} : n === "delete-messages" ? {
|
|
162
|
+
type: "delete-messages",
|
|
163
|
+
userName: r.userId ?? ""
|
|
164
|
+
} : n === "event:test" && r.listener === "widget-button" ? {
|
|
165
|
+
type: "button",
|
|
166
|
+
field: r.field
|
|
167
|
+
} : {
|
|
171
168
|
type: "unknown",
|
|
172
169
|
detail: t
|
|
173
170
|
};
|
|
174
171
|
}
|
|
175
172
|
//#endregion
|
|
176
|
-
//#region src/root/
|
|
173
|
+
//#region src/root/aggregator/index.ts
|
|
177
174
|
var r = 2500, i = {}, a = {};
|
|
178
175
|
function o(e, t) {
|
|
179
176
|
if (!e) return null;
|
|
@@ -206,15 +203,15 @@ function c(e, t, n, r) {
|
|
|
206
203
|
recipients: m
|
|
207
204
|
}, t, n));
|
|
208
205
|
}
|
|
209
|
-
function l(e,
|
|
210
|
-
let
|
|
211
|
-
if (!
|
|
212
|
-
|
|
206
|
+
function l(e, o, s) {
|
|
207
|
+
let l = o?.cacheSubs, u = o?.broadcasterLogin ?? "", d = n(e);
|
|
208
|
+
if (!d) {
|
|
209
|
+
s(null);
|
|
213
210
|
return;
|
|
214
211
|
}
|
|
215
|
-
let
|
|
216
|
-
if (
|
|
217
|
-
let e =
|
|
212
|
+
let f = t(e), p = e.event ?? {}, m = p.data ?? p;
|
|
213
|
+
if (d._role === "recipient") {
|
|
214
|
+
let e = d, t = e.activityGroup ?? f;
|
|
218
215
|
i[t] || (i[t] = {
|
|
219
216
|
type: e.type,
|
|
220
217
|
subscribers: [],
|
|
@@ -222,20 +219,20 @@ function l(e, s, l) {
|
|
|
222
219
|
tierText: e.tierText,
|
|
223
220
|
totalAmount: 0
|
|
224
221
|
}), a[t] && clearTimeout(a[t]), a[t] = setTimeout(() => {
|
|
225
|
-
c(t,
|
|
222
|
+
c(t, l, s, u);
|
|
226
223
|
}, r), i[t].subscribers.push({
|
|
227
224
|
recipient: e.recipient,
|
|
228
|
-
username:
|
|
229
|
-
name:
|
|
230
|
-
sender:
|
|
225
|
+
username: m.username,
|
|
226
|
+
name: m.displayName,
|
|
227
|
+
sender: m.sender
|
|
231
228
|
}), i[t].totalAmount === 0 && (i[t].totalAmount = 1);
|
|
232
229
|
return;
|
|
233
230
|
}
|
|
234
|
-
if (
|
|
235
|
-
if (e.listener === "event" &&
|
|
236
|
-
let e =
|
|
231
|
+
if (d.type === "community-gift-anonymous" || d.type === "community-gift") {
|
|
232
|
+
if (e.listener === "event" && p.type === "communityGiftPurchase") {
|
|
233
|
+
let e = p.activityGroup ?? m?.activityGroup ?? f, t = d;
|
|
237
234
|
i[e] ? (i[e].purchase = t, i[e].tier = t.tier, i[e].tierText = t.tierText, i[e].totalAmount = t.totalAmount ?? i[e].totalAmount, i[e].sender = t.sender, a[e] && clearTimeout(a[e]), a[e] = setTimeout(() => {
|
|
238
|
-
c(e,
|
|
235
|
+
c(e, l, s, u);
|
|
239
236
|
}, r)) : (i[e] = {
|
|
240
237
|
type: t.type,
|
|
241
238
|
purchase: t,
|
|
@@ -245,33 +242,20 @@ function l(e, s, l) {
|
|
|
245
242
|
totalAmount: Number(t.totalAmount) || 0,
|
|
246
243
|
sender: t.sender
|
|
247
244
|
}, a[e] = setTimeout(() => {
|
|
248
|
-
c(e,
|
|
245
|
+
c(e, l, s, u);
|
|
249
246
|
}, r));
|
|
250
247
|
return;
|
|
251
248
|
}
|
|
252
249
|
if (e.listener === "subscriber-latest") {
|
|
253
|
-
let e =
|
|
254
|
-
if (
|
|
255
|
-
|
|
250
|
+
let e = d;
|
|
251
|
+
if (d.type === "community-gift" && u && e.sender === u) {
|
|
252
|
+
s(null);
|
|
256
253
|
return;
|
|
257
254
|
}
|
|
258
255
|
return;
|
|
259
256
|
}
|
|
260
257
|
return;
|
|
261
258
|
}
|
|
262
|
-
if (f.type === "self-sub" || f.type === "solo-sub-to-someone" || f.type === "sub-renewal") {
|
|
263
|
-
if (p?._has(m)) {
|
|
264
|
-
l(null);
|
|
265
|
-
return;
|
|
266
|
-
}
|
|
267
|
-
p && p._set(m, !0);
|
|
268
|
-
let e = f;
|
|
269
|
-
if (f.type === "solo-sub-to-someone" && d && e.sender === d) {
|
|
270
|
-
l(null);
|
|
271
|
-
return;
|
|
272
|
-
}
|
|
273
|
-
l(f);
|
|
274
|
-
}
|
|
275
259
|
}
|
|
276
260
|
//#endregion
|
|
277
261
|
//#region src/root/sources/on-widget-load-detail.ts
|
|
@@ -2931,4 +2915,4 @@ var v = /* @__PURE__ */ function(e) {
|
|
|
2931
2915
|
//#endregion
|
|
2932
2916
|
export { g as a, f as c, l as d, n as f, _ as i, d as l, e as m, y as n, h as o, t as p, v as r, m as s, b as t, u };
|
|
2933
2917
|
|
|
2934
|
-
//# sourceMappingURL=root-
|
|
2918
|
+
//# sourceMappingURL=root-DJod-F4M.js.map
|