@crowbartools/firebot-types 5.67.0-alpha2 → 5.67.0-alpha3

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 CHANGED
@@ -10,32 +10,42 @@ This package is **type-only**. At runtime the `@crowbartools/firebot-types` modu
10
10
  npm i -D @crowbartools/firebot-types
11
11
  ```
12
12
 
13
- A `@types/node` peer dependency is required (the script API uses `Buffer` / `BufferEncoding`).
13
+ A `@types/node` peer dependency is required.
14
14
 
15
15
  ## Usage
16
16
 
17
17
  The default export is the runtime API object provided by Firebot. Named types are re-exported from the package root and can be imported alongside the default in a single statement.
18
18
 
19
19
  ```ts
20
- import firebot, { Plugin, EffectScript, Manifest } from "@crowbartools/firebot-types";
20
+ import firebot, { Plugin } from "@crowbartools/firebot-types";
21
21
 
22
- export const manifest: Manifest = {
22
+ type Params = {
23
+ message: string;
24
+ }
25
+
26
+ const plugin: Plugin<Params> = {
27
+ manifest: {
23
28
  name: "My Plugin",
24
29
  version: "1.0.0",
25
30
  author: "you",
26
31
  description: "Example",
27
32
  type: "plugin"
28
- };
29
-
30
- export function onLoad() {
31
- firebot.logger.info(`Running on Firebot ${firebot.version}`);
33
+ },
34
+ parametersSchema: [
35
+ {
36
+ name: "message",
37
+ type: "string",
38
+ default: "Hello World!",
39
+ title: "Hello!",
40
+ description: "Message",
41
+ }
42
+ ],
43
+ onLoad: (context) => {
44
+ firebot.logger.info(`${context.parameters.message} (${firebot.version})`);
45
+ }
32
46
  }
33
- ```
34
-
35
- Deep imports for less common types are also supported:
36
47
 
37
- ```ts
38
- import type { EffectHelperService } from "@crowbartools/firebot-types/types/ui/effect-helper-service";
48
+ export default plugin;
39
49
  ```
40
50
 
41
51
  CommonJS style works too (requires `esModuleInterop` in your tsconfig):
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@crowbartools/firebot-types",
3
- "version": "5.67.0-alpha2",
4
- "description": "Type definitions and script API for Firebot custom scripts and plugins.",
3
+ "version": "5.67.0-alpha3",
4
+ "description": "Type definitions and script API for Firebot plugins and custom scripts.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
7
7
  "exports": {
package/types/events.d.ts CHANGED
@@ -8,6 +8,8 @@ export type ComparisonType =
8
8
  | "greater than or equal to"
9
9
  | "less than"
10
10
  | "less than or equal to"
11
+ | "include"
12
+ | "doesn't include"
11
13
  | "contains"
12
14
  | "doesn't contain"
13
15
  | "doesn't start with"