@crowbartools/firebot-types 5.67.0-alpha12 → 5.67.0-alpha13
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/backend/events/filters/builtin/firebot/index.d.ts +1 -1
- package/backend/events/filters/builtin/firebot/new-currency-amount.d.ts +1 -1
- package/backend/events/filters/builtin/firebot/new-view-time.d.ts +1 -1
- package/backend/events/filters/builtin/firebot/previous-currency-amount.d.ts +1 -1
- package/backend/events/filters/builtin/firebot/previous-view-time.d.ts +1 -1
- package/backend/events/filters/builtin/index.d.ts +1 -1
- package/backend/events/filters/builtin/third-party/donation-amount.d.ts +1 -1
- package/backend/events/filters/builtin/third-party/index.d.ts +1 -1
- package/backend/events/filters/builtin/twitch/bits-badge-tier.d.ts +1 -1
- package/backend/events/filters/builtin/twitch/chat-mode-duration.d.ts +1 -1
- package/backend/events/filters/builtin/twitch/cheer-bits-amount.d.ts +1 -1
- package/backend/events/filters/builtin/twitch/gift-count.d.ts +1 -1
- package/backend/events/filters/builtin/twitch/gift-duration.d.ts +1 -1
- package/backend/events/filters/builtin/twitch/index.d.ts +1 -1
- package/backend/events/filters/builtin/twitch/lifetime-gift-count.d.ts +1 -1
- package/backend/events/filters/builtin/twitch/raid-viewer-count.d.ts +1 -1
- package/backend/events/filters/builtin/twitch/sub-months.d.ts +1 -1
- package/backend/events/filters/builtin/twitch/watch-streak-count.d.ts +1 -1
- package/backend/integrations/builtin/streamloots/filters/chest-quantity.d.ts +1 -1
- package/backend/overlay-widgets/overlay-widgets-manager.d.ts +1 -1
- package/backend/ranks/rank-ladder-helper.d.ts +1 -1
- package/backend/restrictions/builtin/index.d.ts +1 -1
- package/index.d.ts +1 -1
- package/package.json +1 -1
- package/types/accounts.d.ts +1 -2
- package/types/auth.d.ts +1 -10
- package/types/channel-rewards.d.ts +1 -5
- package/types/chat.d.ts +9 -31
- package/types/commands.d.ts +11 -31
- package/types/counters.d.ts +1 -2
- package/types/currency.d.ts +1 -3
- package/types/discord.d.ts +0 -1
- package/types/effects.d.ts +9 -42
- package/types/events.d.ts +3 -36
- package/types/expressionish.d.ts +2 -22
- package/types/games.d.ts +1 -4
- package/types/hotkeys.d.ts +1 -3
- package/types/http-server.d.ts +2 -14
- package/types/icons.d.ts +1 -1
- package/types/import.d.ts +7 -34
- package/types/index.d.ts +1 -1
- package/types/integrations.d.ts +41 -65
- package/types/moderation.d.ts +1 -8
- package/types/modules/event-manager.d.ts +2 -10
- package/types/modules/frontend-communicator.d.ts +5 -21
- package/types/modules/index.d.ts +1 -1
- package/types/notifications.d.ts +1 -6
- package/types/overlay-widgets.d.ts +11 -34
- package/types/parameters.d.ts +26 -182
- package/types/plugins.d.ts +18 -58
- package/types/power-ups.d.ts +0 -2
- package/types/pronouns.d.ts +1 -2
- package/types/quick-actions.d.ts +1 -3
- package/types/quotes.d.ts +1 -3
- package/types/ranks.d.ts +1 -2
- package/types/restrictions.d.ts +7 -24
- package/types/roles.d.ts +1 -3
- package/types/script-api.d.ts +5 -51
- package/types/settings.d.ts +7 -7
- package/types/setups.d.ts +2 -4
- package/types/sort-tags.d.ts +1 -1
- package/types/timers.d.ts +1 -5
- package/types/triggers.d.ts +12 -23
- package/types/ui/angular.d.ts +5 -26
- package/types/ui/effect-helper-service.d.ts +1 -2
- package/types/ui/effect-queues-service.d.ts +8 -4
- package/types/ui/firebot-root-scope.d.ts +0 -1
- package/types/ui/index.d.ts +1 -1
- package/types/ui/modal-factory.d.ts +5 -13
- package/types/ui/modal-service.d.ts +3 -2
- package/types/ui/ng-toast.d.ts +5 -1
- package/types/ui/object-copy-helper.d.ts +0 -1
- package/types/ui/platform-service.d.ts +1 -1
- package/types/ui/preset-effect-lists-service.d.ts +1 -6
- package/types/ui/settings-service.d.ts +0 -1
- package/types/ui-extensions.d.ts +9 -16
- package/types/util-types.d.ts +7 -33
- package/types/variable-macros.d.ts +1 -1
- package/types/variables.d.ts +5 -19
- package/types/viewers.d.ts +1 -3
- package/types/webhooks.d.ts +1 -1
- package/types/websocket.d.ts +8 -46
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (Omit<import("../../../../../types").EventFilter, "presetValues"> | (Omit<import("../../../../../types").EventFilter, "
|
|
1
|
+
declare const _default: (Omit<import("../../../../../types").EventFilter, "presetValues"> | (Omit<import("../../../../../types").EventFilter, "presetValues" | "valueType"> & {
|
|
2
2
|
valueType: "number";
|
|
3
3
|
}))[];
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (Omit<import("../../../../types").EventFilter, "presetValues"> | (Omit<import("../../../../types").EventFilter, "
|
|
1
|
+
declare const _default: (Omit<import("../../../../types").EventFilter, "presetValues"> | (Omit<import("../../../../types").EventFilter, "presetValues" | "valueType"> & {
|
|
2
2
|
valueType: "number";
|
|
3
3
|
}))[];
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (Omit<import("../../../../../types").EventFilter, "presetValues"> | (Omit<import("../../../../../types").EventFilter, "
|
|
1
|
+
declare const _default: (Omit<import("../../../../../types").EventFilter, "presetValues"> | (Omit<import("../../../../../types").EventFilter, "presetValues" | "valueType"> & {
|
|
2
2
|
valueType: "number";
|
|
3
3
|
}))[];
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (Omit<import("../../../../../types").EventFilter, "presetValues"> | (Omit<import("../../../../../types").EventFilter, "
|
|
1
|
+
declare const _default: (Omit<import("../../../../../types").EventFilter, "presetValues"> | (Omit<import("../../../../../types").EventFilter, "presetValues" | "valueType"> & {
|
|
2
2
|
valueType: "number";
|
|
3
3
|
}))[];
|
|
4
4
|
export default _default;
|
|
@@ -10,7 +10,7 @@ declare class OverlayWidgetsManager extends TypedEmitter<Events> {
|
|
|
10
10
|
registerOverlayWidgetType(overlayWidgetType: OverlayWidgetType<any, any>): void;
|
|
11
11
|
unregisterOverlayWidgetType(id: string): void;
|
|
12
12
|
getOverlayWidgetType(id: string): OverlayWidgetType | null;
|
|
13
|
-
getOverlayWidgetTypesForFrontend(): (Pick<OverlayWidgetType, "id" | "name" | "
|
|
13
|
+
getOverlayWidgetTypesForFrontend(): (Pick<OverlayWidgetType, "id" | "name" | "icon" | "description" | "settingsSchema" | "userCanConfigure" | "supportsLivePreview" | "initialState" | "initialAspectRatio" | "nonEditableSettings"> & {
|
|
14
14
|
uiActions?: Omit<WidgetUIAction, "click">[];
|
|
15
15
|
})[];
|
|
16
16
|
getOverlayExtensions(): {
|
|
@@ -5,7 +5,7 @@ export declare class RankLadderHelper {
|
|
|
5
5
|
get id(): string;
|
|
6
6
|
get name(): string;
|
|
7
7
|
get mode(): "manual" | "auto";
|
|
8
|
-
get trackBy(): "
|
|
8
|
+
get trackBy(): "view_time" | "currency" | "metadata";
|
|
9
9
|
get currencyId(): string;
|
|
10
10
|
get metadataKey(): string;
|
|
11
11
|
get announcePromotionsInChat(): boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("../../../types").RestrictionType[];
|
|
1
|
+
declare const _default: import("../../../types").RestrictionType<never>[];
|
|
2
2
|
export default _default;
|
package/index.d.ts
CHANGED
package/package.json
CHANGED
package/types/accounts.d.ts
CHANGED
package/types/auth.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type ClientOAuth2 from "client-oauth2";
|
|
2
|
-
|
|
3
2
|
export interface AuthProviderDefinition {
|
|
4
3
|
id: string;
|
|
5
4
|
name: string;
|
|
@@ -17,7 +16,6 @@ export interface AuthProviderDefinition {
|
|
|
17
16
|
redirectUriHost?: string;
|
|
18
17
|
scopes?: string[] | string | undefined;
|
|
19
18
|
}
|
|
20
|
-
|
|
21
19
|
export interface AuthProvider {
|
|
22
20
|
id: string;
|
|
23
21
|
oauthClient: ClientOAuth2;
|
|
@@ -26,26 +24,19 @@ export interface AuthProvider {
|
|
|
26
24
|
tokenUri: string;
|
|
27
25
|
details: AuthProviderDefinition;
|
|
28
26
|
}
|
|
29
|
-
|
|
30
27
|
export interface AuthDetails {
|
|
31
28
|
/** The access token */
|
|
32
29
|
access_token: string;
|
|
33
|
-
|
|
34
30
|
/** The type of access token */
|
|
35
31
|
token_type: string;
|
|
36
|
-
|
|
37
32
|
/** OAuth scopes of the access token */
|
|
38
33
|
scope: string[];
|
|
39
|
-
|
|
40
34
|
/** When the token was obtained, in epoch timestamp format */
|
|
41
35
|
obtainment_timestamp?: number;
|
|
42
|
-
|
|
43
36
|
/** How many seconds before the token expires */
|
|
44
37
|
expires_in?: number;
|
|
45
|
-
|
|
46
38
|
/** JSON representation of when access token expires */
|
|
47
39
|
expires_at?: Date;
|
|
48
|
-
|
|
49
40
|
/** The refresh token */
|
|
50
41
|
refresh_token?: string;
|
|
51
|
-
}
|
|
42
|
+
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import type { EffectList } from "./effects";
|
|
2
2
|
import type { RestrictionData } from "./restrictions";
|
|
3
|
-
|
|
4
3
|
export interface CustomRewardImageSet {
|
|
5
4
|
url1x: string;
|
|
6
5
|
url2x: string;
|
|
7
6
|
url4x: string;
|
|
8
7
|
}
|
|
9
|
-
|
|
10
8
|
export interface CustomReward {
|
|
11
9
|
broadcasterId: string;
|
|
12
10
|
broadcasterLogin: string;
|
|
@@ -38,7 +36,6 @@ export interface CustomReward {
|
|
|
38
36
|
redemptionsRedeemedCurrentStream?: number;
|
|
39
37
|
cooldownExpiresAt?: Date;
|
|
40
38
|
}
|
|
41
|
-
|
|
42
39
|
export type SavedChannelReward = {
|
|
43
40
|
id: string;
|
|
44
41
|
twitchData: CustomReward;
|
|
@@ -49,7 +46,6 @@ export type SavedChannelReward = {
|
|
|
49
46
|
restrictionData?: RestrictionData;
|
|
50
47
|
autoApproveRedemptions?: boolean;
|
|
51
48
|
};
|
|
52
|
-
|
|
53
49
|
export type RewardRedemptionMetadata = {
|
|
54
50
|
username: string;
|
|
55
51
|
userId: string;
|
|
@@ -60,4 +56,4 @@ export type RewardRedemptionMetadata = {
|
|
|
60
56
|
rewardImage: string;
|
|
61
57
|
rewardName: string;
|
|
62
58
|
rewardCost: number;
|
|
63
|
-
};
|
|
59
|
+
};
|
package/types/chat.d.ts
CHANGED
|
@@ -1,36 +1,25 @@
|
|
|
1
|
-
type FirebotChatMessagePartType =
|
|
2
|
-
| "text"
|
|
3
|
-
| "link"
|
|
4
|
-
| "emote"
|
|
5
|
-
| "third-party-emote"
|
|
6
|
-
| "cheermote"
|
|
7
|
-
| "mention";
|
|
8
|
-
|
|
1
|
+
type FirebotChatMessagePartType = "text" | "link" | "emote" | "third-party-emote" | "cheermote" | "mention";
|
|
9
2
|
type FirebotChatMessagePartBase = {
|
|
10
3
|
type: FirebotChatMessagePartType;
|
|
11
4
|
id?: string;
|
|
12
5
|
text: string;
|
|
13
6
|
};
|
|
14
|
-
|
|
15
|
-
type FirebotChatMessageTextPart = FirebotChatMessagePartBase & {
|
|
7
|
+
export type FirebotChatMessageTextPart = FirebotChatMessagePartBase & {
|
|
16
8
|
type: "text";
|
|
17
9
|
flagged?: boolean;
|
|
18
10
|
};
|
|
19
|
-
|
|
20
|
-
type FirebotChatMessageLinkPart = FirebotChatMessagePartBase & {
|
|
11
|
+
export type FirebotChatMessageLinkPart = FirebotChatMessagePartBase & {
|
|
21
12
|
type: "link";
|
|
22
13
|
url: string;
|
|
23
14
|
};
|
|
24
|
-
|
|
25
|
-
type FirebotChatMessageEmotePart = FirebotChatMessagePartBase & {
|
|
15
|
+
export type FirebotChatMessageEmotePart = FirebotChatMessagePartBase & {
|
|
26
16
|
type: "emote" | "third-party-emote";
|
|
27
17
|
name: string;
|
|
28
18
|
origin: string;
|
|
29
19
|
url: string;
|
|
30
20
|
animatedUrl?: string;
|
|
31
21
|
};
|
|
32
|
-
|
|
33
|
-
type FirebotChatMessageCheermotePart = FirebotChatMessagePartBase & {
|
|
22
|
+
export type FirebotChatMessageCheermotePart = FirebotChatMessagePartBase & {
|
|
34
23
|
type: "cheermote";
|
|
35
24
|
name: string;
|
|
36
25
|
url: string;
|
|
@@ -38,21 +27,13 @@ type FirebotChatMessageCheermotePart = FirebotChatMessagePartBase & {
|
|
|
38
27
|
amount: number;
|
|
39
28
|
color: string;
|
|
40
29
|
};
|
|
41
|
-
|
|
42
|
-
type FirebotChatMessageMentionPart = FirebotChatMessagePartBase & {
|
|
30
|
+
export type FirebotChatMessageMentionPart = FirebotChatMessagePartBase & {
|
|
43
31
|
type: "mention";
|
|
44
32
|
username: string;
|
|
45
33
|
userId: string;
|
|
46
34
|
userDisplayName: string;
|
|
47
35
|
};
|
|
48
|
-
|
|
49
|
-
export type FirebotChatMessagePart =
|
|
50
|
-
| FirebotChatMessageTextPart
|
|
51
|
-
| FirebotChatMessageLinkPart
|
|
52
|
-
| FirebotChatMessageEmotePart
|
|
53
|
-
| FirebotChatMessageCheermotePart
|
|
54
|
-
| FirebotChatMessageMentionPart;
|
|
55
|
-
|
|
36
|
+
export type FirebotChatMessagePart = FirebotChatMessageTextPart | FirebotChatMessageLinkPart | FirebotChatMessageEmotePart | FirebotChatMessageCheermotePart | FirebotChatMessageMentionPart;
|
|
56
37
|
export type FirebotParsedMessagePart = {
|
|
57
38
|
type: string;
|
|
58
39
|
id?: string;
|
|
@@ -67,7 +48,6 @@ export type FirebotParsedMessagePart = {
|
|
|
67
48
|
amount?: number;
|
|
68
49
|
color?: string;
|
|
69
50
|
};
|
|
70
|
-
|
|
71
51
|
export type FirebotChatMessage = {
|
|
72
52
|
id: string;
|
|
73
53
|
timestamp?: number;
|
|
@@ -135,14 +115,12 @@ export type FirebotChatMessage = {
|
|
|
135
115
|
};
|
|
136
116
|
isGigantified?: boolean;
|
|
137
117
|
};
|
|
138
|
-
|
|
139
118
|
export type FirebotEmote = {
|
|
140
119
|
url: string;
|
|
141
120
|
animatedUrl: string;
|
|
142
121
|
origin: string;
|
|
143
122
|
code: string;
|
|
144
123
|
};
|
|
145
|
-
|
|
146
124
|
export type FirebotCheermoteInstance = {
|
|
147
125
|
name: string;
|
|
148
126
|
amount: number;
|
|
@@ -150,10 +128,10 @@ export type FirebotCheermoteInstance = {
|
|
|
150
128
|
animatedUrl: string;
|
|
151
129
|
color: string;
|
|
152
130
|
};
|
|
153
|
-
|
|
154
131
|
export type SharedChatParticipant = {
|
|
155
132
|
broadcasterId: string;
|
|
156
133
|
broadcasterName: string;
|
|
157
134
|
broadcasterDisplayName: string;
|
|
158
135
|
profilePictureUrl: string;
|
|
159
|
-
};
|
|
136
|
+
};
|
|
137
|
+
export {};
|
package/types/commands.d.ts
CHANGED
|
@@ -3,10 +3,8 @@ import type { EffectList } from "./effects";
|
|
|
3
3
|
import type { RestrictionData } from "./restrictions";
|
|
4
4
|
import type { ParametersConfig } from "./parameters";
|
|
5
5
|
import type { Awaitable } from "./util-types";
|
|
6
|
-
|
|
7
6
|
export type CommandType = "system" | "custom";
|
|
8
|
-
|
|
9
|
-
type Cooldown = {
|
|
7
|
+
export type Cooldown = {
|
|
10
8
|
/**
|
|
11
9
|
* Global cooldown to use a command in seconds.
|
|
12
10
|
*/
|
|
@@ -16,7 +14,6 @@ type Cooldown = {
|
|
|
16
14
|
*/
|
|
17
15
|
user: number | undefined;
|
|
18
16
|
};
|
|
19
|
-
|
|
20
17
|
export type SubCommand = {
|
|
21
18
|
arg: string;
|
|
22
19
|
usage: string;
|
|
@@ -34,7 +31,6 @@ export type SubCommand = {
|
|
|
34
31
|
effects?: EffectList;
|
|
35
32
|
hidden?: boolean;
|
|
36
33
|
};
|
|
37
|
-
|
|
38
34
|
export type CommandDefinition<OptionsModel = any> = {
|
|
39
35
|
id?: string;
|
|
40
36
|
name?: string;
|
|
@@ -96,8 +92,7 @@ export type CommandDefinition<OptionsModel = any> = {
|
|
|
96
92
|
};
|
|
97
93
|
allowTriggerBySharedChat?: boolean | "inherit" | undefined;
|
|
98
94
|
};
|
|
99
|
-
|
|
100
|
-
type UserCommand = {
|
|
95
|
+
export type UserCommand = {
|
|
101
96
|
trigger: string;
|
|
102
97
|
args: string[];
|
|
103
98
|
triggeredSubcmd?: SubCommand;
|
|
@@ -107,32 +102,17 @@ type UserCommand = {
|
|
|
107
102
|
commandSender: string;
|
|
108
103
|
senderRoles: string[];
|
|
109
104
|
};
|
|
110
|
-
|
|
111
|
-
type BasicCommandDefinition = Omit<
|
|
112
|
-
CommandDefinition,
|
|
113
|
-
| "type"
|
|
114
|
-
| "createdBy"
|
|
115
|
-
| "createdAt"
|
|
116
|
-
| "lastEditBy"
|
|
117
|
-
| "lastEditAt"
|
|
118
|
-
| "count"
|
|
119
|
-
| "simple"
|
|
120
|
-
>;
|
|
121
|
-
|
|
122
105
|
export type SystemCommandDefinition<OptionsModel = any> = CommandDefinition<OptionsModel> & {
|
|
123
106
|
hideCooldowns?: boolean;
|
|
124
107
|
};
|
|
125
|
-
|
|
126
108
|
export type SystemCommand<OptionsModel = any> = {
|
|
127
109
|
definition: SystemCommandDefinition<OptionsModel>;
|
|
128
|
-
onTriggerEvent: (
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
) => Awaitable<boolean | void>;
|
|
138
|
-
};
|
|
110
|
+
onTriggerEvent: (event: {
|
|
111
|
+
command: SystemCommand<OptionsModel>['definition'];
|
|
112
|
+
userCommand: UserCommand;
|
|
113
|
+
chatMessage: FirebotChatMessage;
|
|
114
|
+
commandOptions?: {
|
|
115
|
+
[x in keyof OptionsModel]: OptionsModel[x];
|
|
116
|
+
};
|
|
117
|
+
}) => Awaitable<boolean | void>;
|
|
118
|
+
};
|
package/types/counters.d.ts
CHANGED
package/types/currency.d.ts
CHANGED
|
@@ -6,10 +6,8 @@ export type Currency = {
|
|
|
6
6
|
transfer: "Allow" | "Disallow";
|
|
7
7
|
interval: number;
|
|
8
8
|
payout: number;
|
|
9
|
-
|
|
10
9
|
/** Offline payout */
|
|
11
10
|
offline?: number | string;
|
|
12
|
-
|
|
13
11
|
/** Maps user role IDs to the amount of bonus payout they receive. */
|
|
14
12
|
bonus: Record<string, number>;
|
|
15
|
-
};
|
|
13
|
+
};
|
package/types/discord.d.ts
CHANGED
package/types/effects.d.ts
CHANGED
|
@@ -1,27 +1,12 @@
|
|
|
1
1
|
import ng from "angular";
|
|
2
2
|
import type { TriggerType, TriggersObject, Trigger } from "./triggers";
|
|
3
3
|
import type { Awaitable } from "./util-types";
|
|
4
|
-
|
|
5
4
|
type Func<T> = (...args: unknown[]) => T;
|
|
6
|
-
|
|
7
|
-
interface EffectScope<EffectModel> extends ng.IScope {
|
|
5
|
+
export interface EffectScope<EffectModel> extends ng.IScope {
|
|
8
6
|
effect: EffectModel;
|
|
9
7
|
[x: string]: any;
|
|
10
8
|
}
|
|
11
|
-
|
|
12
|
-
export type EffectCategory =
|
|
13
|
-
| "common"
|
|
14
|
-
| "twitch"
|
|
15
|
-
| "moderation"
|
|
16
|
-
| "chat based"
|
|
17
|
-
| "dashboard"
|
|
18
|
-
| "overlay"
|
|
19
|
-
| "fun"
|
|
20
|
-
| "integrations"
|
|
21
|
-
| "firebot control"
|
|
22
|
-
| "advanced"
|
|
23
|
-
| "scripting";
|
|
24
|
-
|
|
9
|
+
export type EffectCategory = "common" | "twitch" | "moderation" | "chat based" | "dashboard" | "overlay" | "fun" | "integrations" | "firebot control" | "advanced" | "scripting";
|
|
25
10
|
export type EffectTriggerResponse = {
|
|
26
11
|
success: boolean;
|
|
27
12
|
execution?: {
|
|
@@ -32,35 +17,33 @@ export type EffectTriggerResponse = {
|
|
|
32
17
|
[x: string]: unknown;
|
|
33
18
|
};
|
|
34
19
|
};
|
|
35
|
-
|
|
36
20
|
export type EffectOutput = {
|
|
37
21
|
label: string;
|
|
38
22
|
description: string;
|
|
39
23
|
defaultName: string;
|
|
40
24
|
};
|
|
41
|
-
|
|
42
25
|
export type EffectDependencies = {
|
|
43
26
|
twitch?: boolean;
|
|
44
27
|
integrations?: Record<string, boolean>;
|
|
45
28
|
};
|
|
46
|
-
|
|
47
29
|
export type OverlayExtension<OverlayData = unknown> = {
|
|
48
30
|
dependencies?: {
|
|
49
31
|
globalStyles?: string;
|
|
50
32
|
css?: string[];
|
|
51
|
-
js?: Array<string | {
|
|
33
|
+
js?: Array<string | {
|
|
34
|
+
module: boolean;
|
|
35
|
+
url: string;
|
|
36
|
+
}>;
|
|
52
37
|
};
|
|
53
38
|
event: {
|
|
54
39
|
name: string;
|
|
55
40
|
onOverlayEvent: (data: OverlayData) => void;
|
|
56
41
|
};
|
|
57
42
|
};
|
|
58
|
-
|
|
59
43
|
export type OverlayDimensions = {
|
|
60
44
|
width: number;
|
|
61
45
|
height: number;
|
|
62
46
|
};
|
|
63
|
-
|
|
64
47
|
export type OverlayPosition = {
|
|
65
48
|
position: string;
|
|
66
49
|
customCoords?: {
|
|
@@ -71,29 +54,23 @@ export type OverlayPosition = {
|
|
|
71
54
|
};
|
|
72
55
|
zIndex?: number;
|
|
73
56
|
};
|
|
74
|
-
|
|
75
57
|
export type OverlayRotation = {
|
|
76
58
|
rotation: number;
|
|
77
59
|
rotType: "deg" | "rad" | "turn";
|
|
78
60
|
};
|
|
79
|
-
|
|
80
61
|
export type OverlayEnterExitAnimations = {
|
|
81
62
|
enterAnimation: string;
|
|
82
63
|
enterDuration: number;
|
|
83
|
-
|
|
84
64
|
inbetweenAnimation: string;
|
|
85
65
|
inbetweenDuration: number;
|
|
86
66
|
inbetweenDelay: number;
|
|
87
67
|
inbetweenRepeat: number;
|
|
88
|
-
|
|
89
68
|
exitAnimation: string;
|
|
90
69
|
exitDuration: number;
|
|
91
70
|
};
|
|
92
|
-
|
|
93
71
|
export type OverlayInstance = {
|
|
94
72
|
overlayInstance: string;
|
|
95
73
|
};
|
|
96
|
-
|
|
97
74
|
export type EffectDefinition<EffectModel = unknown> = {
|
|
98
75
|
id: string;
|
|
99
76
|
name: string;
|
|
@@ -125,7 +102,6 @@ export type EffectDefinition<EffectModel = unknown> = {
|
|
|
125
102
|
*/
|
|
126
103
|
isNoOp?: boolean;
|
|
127
104
|
};
|
|
128
|
-
|
|
129
105
|
export type EffectInstance<EffectModel = unknown> = {
|
|
130
106
|
id: string;
|
|
131
107
|
type: string;
|
|
@@ -141,7 +117,6 @@ export type EffectInstance<EffectModel = unknown> = {
|
|
|
141
117
|
} & {
|
|
142
118
|
[x: string]: unknown;
|
|
143
119
|
};
|
|
144
|
-
|
|
145
120
|
export type EffectType<EffectModel = unknown, OverlayData = unknown> = {
|
|
146
121
|
definition: EffectDefinition<EffectModel>;
|
|
147
122
|
optionsTemplate: string;
|
|
@@ -158,9 +133,7 @@ export type EffectType<EffectModel = unknown, OverlayData = unknown> = {
|
|
|
158
133
|
}) => Awaitable<void | boolean | EffectTriggerResponse>;
|
|
159
134
|
overlayExtension?: OverlayExtension<OverlayData>;
|
|
160
135
|
};
|
|
161
|
-
|
|
162
136
|
export type EffectListRunMode = "all" | "random" | "sequential";
|
|
163
|
-
|
|
164
137
|
export interface EffectList {
|
|
165
138
|
id: string;
|
|
166
139
|
list: EffectInstance[];
|
|
@@ -171,7 +144,6 @@ export interface EffectList {
|
|
|
171
144
|
weighted?: boolean;
|
|
172
145
|
dontRepeatUntilAllUsed?: boolean;
|
|
173
146
|
}
|
|
174
|
-
|
|
175
147
|
export type PresetEffectList = {
|
|
176
148
|
id: string;
|
|
177
149
|
name: string;
|
|
@@ -181,9 +153,7 @@ export type PresetEffectList = {
|
|
|
181
153
|
effects: EffectList;
|
|
182
154
|
sortTags: string[];
|
|
183
155
|
};
|
|
184
|
-
|
|
185
156
|
type QueueMode = "auto" | "interval" | "custom" | "manual";
|
|
186
|
-
|
|
187
157
|
export type EffectQueueConfig = {
|
|
188
158
|
id: string;
|
|
189
159
|
name: string;
|
|
@@ -195,9 +165,7 @@ export type EffectQueueConfig = {
|
|
|
195
165
|
length: number;
|
|
196
166
|
queue: any[];
|
|
197
167
|
};
|
|
198
|
-
|
|
199
168
|
export type QueueStatus = "running" | "paused" | "idle" | "canceled";
|
|
200
|
-
|
|
201
169
|
export type RunEffectsContext = {
|
|
202
170
|
trigger: Trigger;
|
|
203
171
|
effects: EffectList;
|
|
@@ -206,13 +174,11 @@ export type RunEffectsContext = {
|
|
|
206
174
|
};
|
|
207
175
|
[key: string]: unknown;
|
|
208
176
|
};
|
|
209
|
-
|
|
210
|
-
type QueueItem = {
|
|
177
|
+
export type QueueItem = {
|
|
211
178
|
runEffectsContext: RunEffectsContext;
|
|
212
179
|
duration?: number;
|
|
213
180
|
priority?: "none" | "high";
|
|
214
181
|
};
|
|
215
|
-
|
|
216
182
|
export type QueueState = {
|
|
217
183
|
status: QueueStatus;
|
|
218
184
|
queuedItems: QueueItem[];
|
|
@@ -220,4 +186,5 @@ export type QueueState = {
|
|
|
220
186
|
interval: number;
|
|
221
187
|
mode: QueueMode;
|
|
222
188
|
runEffectsImmediatelyWhenPaused?: boolean;
|
|
223
|
-
};
|
|
189
|
+
};
|
|
190
|
+
export {};
|