@crowbartools/firebot-types 5.67.0-alpha26 → 5.67.0-alpha27
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/LICENSE +674 -674
- package/backend/chat/active-user-handler.d.ts +7 -1
- package/backend/chat/frontend-chat-manager.d.ts +36 -0
- package/backend/common/connection-manager.d.ts +40 -0
- package/backend/common/profile-manager.d.ts +3 -0
- package/backend/core/update-manager.d.ts +16 -0
- package/backend/currency/currency-manager.d.ts +1 -0
- package/backend/events/activity-feed-manager.d.ts +8 -1
- package/backend/events/event-manager.d.ts +1 -1
- package/backend/overlay-widgets/builtin-types/index.d.ts +2 -2
- package/backend/plugins/plugin-api/namespaces/currency.d.ts +2 -0
- package/backend/plugins/plugin-api/namespaces/viewers.d.ts +2 -0
- package/backend/plugins/plugin-manager.d.ts +19 -7
- package/backend/roles/twitch-roles-manager.d.ts +4 -0
- package/backend/streaming-platforms/twitch/api/eventsub/eventsub-chat-helpers.d.ts +1 -0
- package/backend/streaming-platforms/twitch/api/resource/moderation.d.ts +1 -1
- package/backend/streaming-platforms/twitch/events/bits.d.ts +1 -1
- package/backend/ui-extensions/ui-extension-manager.d.ts +4 -2
- package/backend/utils/index.d.ts +1 -0
- package/backend/utils/versions.d.ts +9 -0
- package/backend/viewers/viewer-database.d.ts +3 -1
- package/backend/viewers/viewer-metadata-manager.d.ts +3 -0
- package/backend/viewers/viewer-online-status-manager.d.ts +1 -1
- package/package.json +1 -1
- package/shared/compare-versions.d.ts +21 -0
- package/types/chat.d.ts +76 -0
- package/types/integrations.d.ts +1 -2
- package/types/plugin-api.d.ts +84 -1
- package/types/plugins.d.ts +28 -30
- package/types/ui/modal-factory.d.ts +9 -0
- package/types/ui-extensions.d.ts +3 -1
- package/types/viewers.d.ts +9 -0
- package/backend/chat/frontend-chat-helpers.d.ts +0 -14
package/types/plugins.d.ts
CHANGED
|
@@ -16,6 +16,26 @@ import type { PluginWebhooks } from "./webhooks";
|
|
|
16
16
|
import { ConditionType } from "./conditions";
|
|
17
17
|
type NoResult = Awaitable<void>;
|
|
18
18
|
type GenericParameters = Record<string, unknown>;
|
|
19
|
+
type FontAwesomeIcon = {
|
|
20
|
+
type: "font-awesome";
|
|
21
|
+
/**
|
|
22
|
+
* A FontAwesome icon name shown in the UI (eg. "fa-cogs").
|
|
23
|
+
*/
|
|
24
|
+
name: `fa-${string}`;
|
|
25
|
+
/**
|
|
26
|
+
* A css color value (eg. "#FF0000") used for the icon.
|
|
27
|
+
*/
|
|
28
|
+
color?: string;
|
|
29
|
+
};
|
|
30
|
+
type CustomIcon = {
|
|
31
|
+
type: "custom";
|
|
32
|
+
url: string;
|
|
33
|
+
/**
|
|
34
|
+
* A css color value (eg. "#FF0000") used for the background of the icon.
|
|
35
|
+
*/
|
|
36
|
+
backgroundColor?: string;
|
|
37
|
+
};
|
|
38
|
+
export type PluginIcon = FontAwesomeIcon | CustomIcon;
|
|
19
39
|
export type ManagedPluginManifest = {
|
|
20
40
|
name: string;
|
|
21
41
|
author: string;
|
|
@@ -35,16 +55,20 @@ export type ManagedPluginManifest = {
|
|
|
35
55
|
minimumFirebotVersion?: ManifestFirebotVersion;
|
|
36
56
|
maximumFirebotVersion?: ManifestFirebotVersion;
|
|
37
57
|
};
|
|
38
|
-
export type
|
|
58
|
+
export type ManagedPluginBase = {
|
|
39
59
|
author: string;
|
|
40
60
|
name: string;
|
|
41
61
|
version: string;
|
|
42
62
|
};
|
|
43
|
-
export type
|
|
63
|
+
export type ManagedPlugin = ManagedPluginBase & {
|
|
44
64
|
manifest: ManagedPluginManifest;
|
|
45
65
|
};
|
|
66
|
+
export type ManagedPluginExtended = ManagedPlugin & {
|
|
67
|
+
installed: boolean;
|
|
68
|
+
installedVersion?: string;
|
|
69
|
+
};
|
|
46
70
|
export type ManagedPluginUpdateRequest = {
|
|
47
|
-
plugins: Array<
|
|
71
|
+
plugins: Array<ManagedPluginBase>;
|
|
48
72
|
firebotVersion: ManifestFirebotVersion;
|
|
49
73
|
};
|
|
50
74
|
export type InstalledPluginConfig<Params extends GenericParameters = GenericParameters> = {
|
|
@@ -52,7 +76,7 @@ export type InstalledPluginConfig<Params extends GenericParameters = GenericPara
|
|
|
52
76
|
fileName: string;
|
|
53
77
|
enabled?: boolean;
|
|
54
78
|
legacyImport?: boolean;
|
|
55
|
-
managedPluginDetails?:
|
|
79
|
+
managedPluginDetails?: ManagedPluginBase;
|
|
56
80
|
parameters: Params;
|
|
57
81
|
};
|
|
58
82
|
export type PluginContext<Params extends FirebotParams = FirebotParams> = {
|
|
@@ -71,26 +95,6 @@ export interface ManifestFirebotVersion {
|
|
|
71
95
|
minor?: number;
|
|
72
96
|
patch?: number;
|
|
73
97
|
}
|
|
74
|
-
type FontAwesomeIcon = {
|
|
75
|
-
type: "font-awesome";
|
|
76
|
-
/**
|
|
77
|
-
* A FontAwesome icon name shown in the UI (eg. "fa-cogs").
|
|
78
|
-
*/
|
|
79
|
-
name: `fa-${string}`;
|
|
80
|
-
/**
|
|
81
|
-
* A css color value (eg. "#FF0000") used for the icon.
|
|
82
|
-
*/
|
|
83
|
-
color?: string;
|
|
84
|
-
};
|
|
85
|
-
type CustomIcon = {
|
|
86
|
-
type: "custom";
|
|
87
|
-
url: string;
|
|
88
|
-
/**
|
|
89
|
-
* A css color value (eg. "#FF0000") used for the background of the icon.
|
|
90
|
-
*/
|
|
91
|
-
backgroundColor?: string;
|
|
92
|
-
};
|
|
93
|
-
export type PluginIcon = FontAwesomeIcon | CustomIcon;
|
|
94
98
|
export interface Manifest {
|
|
95
99
|
name: string;
|
|
96
100
|
version: string;
|
|
@@ -120,11 +124,6 @@ export interface Manifest {
|
|
|
120
124
|
* The icon to be displayed for the plugin.
|
|
121
125
|
*/
|
|
122
126
|
icon?: PluginIcon;
|
|
123
|
-
/**
|
|
124
|
-
* If true, the plugin will be initialized before parameters are shown to the user,
|
|
125
|
-
* allowing the plugin to provide custom parameter types that can be used in its own parametersSchema.
|
|
126
|
-
*/
|
|
127
|
-
initBeforeShowingParams?: boolean;
|
|
128
127
|
}
|
|
129
128
|
export interface PluginBase<Params extends FirebotParams = FirebotParams> {
|
|
130
129
|
manifest: Manifest;
|
|
@@ -213,7 +212,6 @@ type LegacyCustomScriptManifest = {
|
|
|
213
212
|
author: string;
|
|
214
213
|
website?: string;
|
|
215
214
|
startupOnly?: boolean;
|
|
216
|
-
initBeforeShowingParams?: boolean;
|
|
217
215
|
firebotVersion?: "5";
|
|
218
216
|
};
|
|
219
217
|
export type LegacyScriptData = {
|
|
@@ -19,4 +19,13 @@ export type ModalFactory = {
|
|
|
19
19
|
trigger?: TriggerType;
|
|
20
20
|
triggerMeta?: unknown;
|
|
21
21
|
}, callback: (result: T) => void, dismissCallback?: () => void) => void;
|
|
22
|
+
showConfirmationModal: (options: {
|
|
23
|
+
title: string;
|
|
24
|
+
question: string;
|
|
25
|
+
tip?: string;
|
|
26
|
+
cancelLabel?: string;
|
|
27
|
+
cancelBtnType?: string;
|
|
28
|
+
confirmLabel?: string;
|
|
29
|
+
confirmBtnType?: string;
|
|
30
|
+
}) => Promise<boolean>;
|
|
22
31
|
};
|
package/types/ui-extensions.d.ts
CHANGED
|
@@ -13,7 +13,9 @@ export type AngularJsPage = BasePage & {
|
|
|
13
13
|
};
|
|
14
14
|
export type IframePage = BasePage & {
|
|
15
15
|
type: 'iframe';
|
|
16
|
+
url: string;
|
|
16
17
|
};
|
|
18
|
+
export type UiExtensionPage = AngularJsPage | IframePage;
|
|
17
19
|
export type AngularJsFactory = {
|
|
18
20
|
name: string;
|
|
19
21
|
function: Function;
|
|
@@ -80,7 +82,7 @@ export type UIExtension = {
|
|
|
80
82
|
/**
|
|
81
83
|
* Adds new sidebar entries under an "Extensions" category
|
|
82
84
|
*/
|
|
83
|
-
pages?:
|
|
85
|
+
pages?: UiExtensionPage[];
|
|
84
86
|
/**
|
|
85
87
|
* Add your own AngularJS services, components, directives, filters
|
|
86
88
|
*/
|
package/types/viewers.d.ts
CHANGED
|
@@ -26,3 +26,12 @@ export interface BasicViewer {
|
|
|
26
26
|
profilePicUrl?: string;
|
|
27
27
|
}
|
|
28
28
|
export type NewFirebotViewer = BasicViewer & Partial<Omit<FirebotViewer, "_id" | "username" | "displayName" | "twitchRoles" | "profilePicUrl">>;
|
|
29
|
+
export type FrontendViewer = {
|
|
30
|
+
id: string;
|
|
31
|
+
username: string;
|
|
32
|
+
displayName: string;
|
|
33
|
+
roles: string[];
|
|
34
|
+
profilePicUrl: string;
|
|
35
|
+
active: boolean;
|
|
36
|
+
disableViewerList?: boolean;
|
|
37
|
+
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { FirebotChatMessage } from "../../types";
|
|
2
|
-
declare class FirebotFrontendChatHelpers {
|
|
3
|
-
private logger;
|
|
4
|
-
private _pendingMessageCache;
|
|
5
|
-
private sendChatMessageToChatWidget;
|
|
6
|
-
sendChatMessageToFrontend(chatMessage: FirebotChatMessage): void;
|
|
7
|
-
private deleteMessageFromChatWidget;
|
|
8
|
-
deleteMessageFromFrontend(messageId: string, animate?: boolean): void;
|
|
9
|
-
deleteUserMessagesFromFrontend(username: string): void;
|
|
10
|
-
clearChatFeed(moderatorName: string): void;
|
|
11
|
-
updateMessageAutomodStatus(messageId: string, newStatus: FirebotChatMessage["autoModStatus"], resolverName: string, resolverId: string, flaggedPhrases: string[]): void;
|
|
12
|
-
}
|
|
13
|
-
declare const frontendChatHelpers: FirebotFrontendChatHelpers;
|
|
14
|
-
export { frontendChatHelpers as FirebotFrontendChatHelpers };
|