@crowbartools/firebot-types 5.67.0-alpha11 → 5.67.0-alpha12

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.
@@ -0,0 +1,2 @@
1
+ import type { ScriptWebServerApi } from "../../../../types/script-api";
2
+ export declare const createWebServerApi: import("../internal/define-namespace").ScriptApiNamespaceFactory<ScriptWebServerApi>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crowbartools/firebot-types",
3
- "version": "5.67.0-alpha11",
3
+ "version": "5.67.0-alpha12",
4
4
  "description": "Type definitions and script API for Firebot plugins and custom scripts.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -203,6 +203,15 @@ export interface Accounts {
203
203
  bot: FirebotAccount;
204
204
  }
205
205
 
206
+ export interface ScriptWebServerApi {
207
+ /**
208
+ * Sends a custom event over the internal Firebot WebSocket server
209
+ * @param name Name of the event to send. Full event name will be `custom-event:{name}`
210
+ * @param data Any optional data you would like to send with the event
211
+ */
212
+ sendWebSocketEvent(name: string, data?: unknown);
213
+ }
214
+
206
215
  export interface FirebotScriptApi {
207
216
  /** Running Firebot version, e.g. `"5.67.0"`. */
208
217
  version: string;
@@ -230,4 +239,6 @@ export interface FirebotScriptApi {
230
239
  notifications: ScriptNotificationsApi;
231
240
  /** Access to installed plugins. */
232
241
  plugins: ScriptPluginsApi;
242
+ /** Firebot internal web server functions. */
243
+ webServer: ScriptWebServerApi;
233
244
  }