@crowbartools/firebot-types 5.67.0-alpha11 → 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.
Files changed (83) hide show
  1. package/backend/events/filters/builtin/firebot/index.d.ts +1 -1
  2. package/backend/events/filters/builtin/firebot/new-currency-amount.d.ts +1 -1
  3. package/backend/events/filters/builtin/firebot/new-view-time.d.ts +1 -1
  4. package/backend/events/filters/builtin/firebot/previous-currency-amount.d.ts +1 -1
  5. package/backend/events/filters/builtin/firebot/previous-view-time.d.ts +1 -1
  6. package/backend/events/filters/builtin/index.d.ts +1 -1
  7. package/backend/events/filters/builtin/third-party/donation-amount.d.ts +1 -1
  8. package/backend/events/filters/builtin/third-party/index.d.ts +1 -1
  9. package/backend/events/filters/builtin/twitch/bits-badge-tier.d.ts +1 -1
  10. package/backend/events/filters/builtin/twitch/chat-mode-duration.d.ts +1 -1
  11. package/backend/events/filters/builtin/twitch/cheer-bits-amount.d.ts +1 -1
  12. package/backend/events/filters/builtin/twitch/gift-count.d.ts +1 -1
  13. package/backend/events/filters/builtin/twitch/gift-duration.d.ts +1 -1
  14. package/backend/events/filters/builtin/twitch/index.d.ts +1 -1
  15. package/backend/events/filters/builtin/twitch/lifetime-gift-count.d.ts +1 -1
  16. package/backend/events/filters/builtin/twitch/raid-viewer-count.d.ts +1 -1
  17. package/backend/events/filters/builtin/twitch/sub-months.d.ts +1 -1
  18. package/backend/events/filters/builtin/twitch/watch-streak-count.d.ts +1 -1
  19. package/backend/integrations/builtin/streamloots/filters/chest-quantity.d.ts +1 -1
  20. package/backend/overlay-widgets/overlay-widgets-manager.d.ts +1 -1
  21. package/backend/ranks/rank-ladder-helper.d.ts +1 -1
  22. package/backend/restrictions/builtin/index.d.ts +1 -1
  23. package/backend/scripts/script-api/namespaces/http-server.d.ts +2 -0
  24. package/index.d.ts +1 -1
  25. package/package.json +1 -1
  26. package/types/accounts.d.ts +1 -2
  27. package/types/auth.d.ts +1 -10
  28. package/types/channel-rewards.d.ts +1 -5
  29. package/types/chat.d.ts +9 -31
  30. package/types/commands.d.ts +11 -31
  31. package/types/counters.d.ts +1 -2
  32. package/types/currency.d.ts +1 -3
  33. package/types/discord.d.ts +0 -1
  34. package/types/effects.d.ts +9 -42
  35. package/types/events.d.ts +3 -36
  36. package/types/expressionish.d.ts +2 -22
  37. package/types/games.d.ts +1 -4
  38. package/types/hotkeys.d.ts +1 -3
  39. package/types/http-server.d.ts +2 -14
  40. package/types/icons.d.ts +1 -1
  41. package/types/import.d.ts +7 -34
  42. package/types/index.d.ts +1 -1
  43. package/types/integrations.d.ts +41 -65
  44. package/types/moderation.d.ts +1 -8
  45. package/types/modules/event-manager.d.ts +2 -10
  46. package/types/modules/frontend-communicator.d.ts +5 -21
  47. package/types/modules/index.d.ts +1 -1
  48. package/types/notifications.d.ts +1 -6
  49. package/types/overlay-widgets.d.ts +11 -34
  50. package/types/parameters.d.ts +26 -182
  51. package/types/plugins.d.ts +18 -58
  52. package/types/power-ups.d.ts +0 -2
  53. package/types/pronouns.d.ts +1 -2
  54. package/types/quick-actions.d.ts +1 -3
  55. package/types/quotes.d.ts +1 -3
  56. package/types/ranks.d.ts +1 -2
  57. package/types/restrictions.d.ts +7 -24
  58. package/types/roles.d.ts +1 -3
  59. package/types/script-api.d.ts +14 -49
  60. package/types/settings.d.ts +7 -7
  61. package/types/setups.d.ts +2 -4
  62. package/types/sort-tags.d.ts +1 -1
  63. package/types/timers.d.ts +1 -5
  64. package/types/triggers.d.ts +12 -23
  65. package/types/ui/angular.d.ts +5 -26
  66. package/types/ui/effect-helper-service.d.ts +1 -2
  67. package/types/ui/effect-queues-service.d.ts +8 -4
  68. package/types/ui/firebot-root-scope.d.ts +0 -1
  69. package/types/ui/index.d.ts +1 -1
  70. package/types/ui/modal-factory.d.ts +5 -13
  71. package/types/ui/modal-service.d.ts +3 -2
  72. package/types/ui/ng-toast.d.ts +5 -1
  73. package/types/ui/object-copy-helper.d.ts +0 -1
  74. package/types/ui/platform-service.d.ts +1 -1
  75. package/types/ui/preset-effect-lists-service.d.ts +1 -6
  76. package/types/ui/settings-service.d.ts +0 -1
  77. package/types/ui-extensions.d.ts +9 -16
  78. package/types/util-types.d.ts +7 -33
  79. package/types/variable-macros.d.ts +1 -1
  80. package/types/variables.d.ts +5 -19
  81. package/types/viewers.d.ts +1 -3
  82. package/types/webhooks.d.ts +1 -1
  83. package/types/websocket.d.ts +8 -46
@@ -1,28 +1,10 @@
1
1
  import type { FirebotChatMessage } from "./chat";
2
2
  import type { CommandDefinition, SubCommand } from "./commands";
3
-
4
- export type TriggerType =
5
- | "command"
6
- | "custom_script"
7
- | "startup_script"
8
- | "api"
9
- | "event"
10
- | "hotkey"
11
- | "timer"
12
- | "scheduled_task"
13
- | "counter"
14
- | "preset"
15
- | "quick_action"
16
- | "manual"
17
- | "channel_reward"
18
- | "power_up"
19
- | "overlay_widget";
20
-
3
+ export type TriggerType = "command" | "custom_script" | "startup_script" | "api" | "event" | "hotkey" | "timer" | "scheduled_task" | "counter" | "preset" | "quick_action" | "manual" | "channel_reward" | "power_up" | "overlay_widget";
21
4
  export type TriggerMeta = {
22
5
  triggerId?: string;
23
6
  [x: string]: unknown;
24
7
  };
25
-
26
8
  export type Trigger = {
27
9
  type: TriggerType;
28
10
  metadata: {
@@ -37,8 +19,14 @@ export type Trigger = {
37
19
  subcommandId?: string;
38
20
  };
39
21
  chatMessage?: FirebotChatMessage;
40
- event?: { id: string, name: string };
41
- eventSource?: { id: string, name: string };
22
+ event?: {
23
+ id: string;
24
+ name: string;
25
+ };
26
+ eventSource?: {
27
+ id: string;
28
+ name: string;
29
+ };
42
30
  eventData?: {
43
31
  chatMessage?: FirebotChatMessage;
44
32
  [x: string]: unknown;
@@ -53,9 +41,10 @@ export type Trigger = {
53
41
  };
54
42
  [x: string]: unknown;
55
43
  };
56
- effectOutputs?: { [key: string]: unknown };
44
+ effectOutputs?: {
45
+ [key: string]: unknown;
46
+ };
57
47
  };
58
-
59
48
  export type TriggersObject = {
60
49
  [T in TriggerType]?: T extends "event" ? string[] | boolean : boolean;
61
50
  };
@@ -1,31 +1,10 @@
1
1
  import type angular from "angular";
2
-
3
2
  export type BindingsDefinition<Bindings> = {
4
- [K in keyof Bindings]: {} extends Pick<Bindings, K>
5
- ? Bindings[K] extends string
6
- ? "@?" | "<?" | "=?" | `@?${string}` | `<?${string}` | `=?${string}`
7
- : Bindings[K] extends boolean
8
- ? "<?" | "=?" | `<?${string}` | `=?${string}`
9
- : Bindings[K] extends number
10
- ? "<?" | "=?" | `<?${string}` | `=?${string}`
11
- : Bindings[K] extends (...args: any[]) => any
12
- ? "&?" | `&?${string}`
13
- : "<?" | "=?" | `<?${string}` | `=?${string}`
14
- : Bindings[K] extends string
15
- ? "@" | "<" | "=" | `@${string}` | `<${string}` | `=${string}`
16
- : Bindings[K] extends boolean
17
- ? "<" | "=" | `<${string}` | `=${string}`
18
- : Bindings[K] extends number
19
- ? "<" | "=" | `<${string}` | `=${string}`
20
- : Bindings[K] extends (...args: any[]) => any
21
- ? "&" | `&${string}`
22
- : "<" | "=" | `<${string}` | `=${string}`;
3
+ [K in keyof Bindings]: {} extends Pick<Bindings, K> ? Bindings[K] extends string ? "@?" | "<?" | "=?" | `@?${string}` | `<?${string}` | `=?${string}` : Bindings[K] extends boolean ? "<?" | "=?" | `<?${string}` | `=?${string}` : Bindings[K] extends number ? "<?" | "=?" | `<?${string}` | `=?${string}` : Bindings[K] extends (...args: any[]) => any ? "&?" | `&?${string}` : "<?" | "=?" | `<?${string}` | `=?${string}` : Bindings[K] extends string ? "@" | "<" | "=" | `@${string}` | `<${string}` | `=${string}` : Bindings[K] extends boolean ? "<" | "=" | `<${string}` | `=${string}` : Bindings[K] extends number ? "<" | "=" | `<${string}` | `=${string}` : Bindings[K] extends (...args: any[]) => any ? "&" | `&${string}` : "<" | "=" | `<${string}` | `=${string}`;
23
4
  };
24
-
25
5
  export type FirebotComponent<Bindings, ExtraControllerProps = {}> = angular.IComponentOptions & {
26
6
  bindings: BindingsDefinition<Bindings>;
27
- controller: (
28
- this: angular.IController & Bindings & ExtraControllerProps & { [key: string]: unknown },
29
- ...args: unknown[]
30
- ) => void;
31
- };
7
+ controller: (this: angular.IController & Bindings & ExtraControllerProps & {
8
+ [key: string]: unknown;
9
+ }, ...args: unknown[]) => void;
10
+ };
@@ -1,5 +1,4 @@
1
1
  import type { EffectType } from "../effects";
2
-
3
2
  export type EffectHelperService = {
4
3
  getAllEffectTypes: () => Promise<EffectType[]>;
5
- };
4
+ };
@@ -1,10 +1,14 @@
1
- import type { EffectQueueConfig } from "../../types";
2
-
1
+ import type { EffectQueueConfig } from "..";
3
2
  export type EffectQueuesService = {
4
3
  effectQueues: EffectQueueConfig[];
5
4
  getEffectQueues: () => EffectQueueConfig[];
6
5
  getEffectQueue: (id: string) => EffectQueueConfig | undefined;
7
6
  showAddEditEffectQueueModal: (queueId?: string) => Promise<string>;
8
7
  showDeleteEffectQueueModal: (queueId: string) => Promise<boolean>;
9
- queueModes: { value: string, label: string, description: string, iconClass: string }[];
10
- };
8
+ queueModes: {
9
+ value: string;
10
+ label: string;
11
+ description: string;
12
+ iconClass: string;
13
+ }[];
14
+ };
@@ -1,5 +1,4 @@
1
1
  import type angular from "angular";
2
-
3
2
  export type FirebotRootScope = angular.IRootScopeService & {
4
3
  copyTextToClipboard: (text: string) => void;
5
4
  };
@@ -9,4 +9,4 @@ export * from "./ng-toast";
9
9
  export * from "./firebot-root-scope";
10
10
  export * from "./object-copy-helper";
11
11
  export * from "./preset-effect-lists-service";
12
- export * from "./effect-queues-service";
12
+ export * from "./effect-queues-service";
@@ -1,19 +1,11 @@
1
1
  import type { EffectInstance } from "../effects";
2
2
  import type { TriggerType } from "../triggers";
3
-
4
3
  export type ModalFactory = {
5
- showEditEffectModal: (
6
- effectInstance: EffectInstance,
7
- effectIndex: number | null,
8
- trigger: TriggerType,
9
- closeCallback: (response: {
10
- action: "add" | "update" | "delete";
11
- effect: EffectInstance | null;
12
- index: number;
13
- }) => void,
14
- triggerMeta: unknown,
15
- isNewEffect: boolean
16
- ) => void;
4
+ showEditEffectModal: (effectInstance: EffectInstance, effectIndex: number | null, trigger: TriggerType, closeCallback: (response: {
5
+ action: "add" | "update" | "delete";
6
+ effect: EffectInstance | null;
7
+ index: number;
8
+ }) => void, triggerMeta: unknown, isNewEffect: boolean) => void;
17
9
  openGetInputModal: <T extends string | number>(options: {
18
10
  model: T;
19
11
  inputType?: "text" | "number" | "password";
@@ -1,9 +1,10 @@
1
1
  import type angular from "angular";
2
-
3
2
  export type ModalService = {
4
3
  showModal: (options: {
5
4
  component?: string;
6
- resolveObj?: { [key: string]: unknown };
5
+ resolveObj?: {
6
+ [key: string]: unknown;
7
+ };
7
8
  dismissCallback?: () => void;
8
9
  closeCallback?: (data: unknown) => void;
9
10
  size?: "sm" | "md" | "mdlg" | "lg" | "xl";
@@ -1,3 +1,7 @@
1
1
  export type NgToast = {
2
- create: (options: { content: string, timeout?: number, className?: string } | string) => void;
2
+ create: (options: {
3
+ content: string;
4
+ timeout?: number;
5
+ className?: string;
6
+ } | string) => void;
3
7
  };
@@ -1,6 +1,5 @@
1
1
  import type { EffectInstance } from "../effects";
2
2
  import type { TriggerType } from "../triggers";
3
-
4
3
  export type ObjectCopyHelper = {
5
4
  copyEffects: (effects: EffectInstance[]) => void;
6
5
  getCopiedEffects: (trigger: TriggerType, triggerMeta: unknown) => Promise<EffectInstance[]>;
@@ -4,4 +4,4 @@ export type PlatformService = {
4
4
  isWindows: boolean;
5
5
  isLinux: boolean;
6
6
  loadPlatform: () => void;
7
- };
7
+ };
@@ -1,5 +1,4 @@
1
1
  import type { PresetEffectList } from "../effects";
2
-
3
2
  export type PresetEffectListsService = {
4
3
  presetEffectLists: PresetEffectList[];
5
4
  loadPresetEffectLists: () => void;
@@ -9,11 +8,7 @@ export type PresetEffectListsService = {
9
8
  saveAllPresetEffectLists: (presetEffectLists: PresetEffectList[]) => void;
10
9
  presetEffectListNameExists: (name: string) => boolean;
11
10
  showRunPresetListModal: (id: string, isQuickAction?: boolean) => void;
12
- manuallyTriggerPresetEffectList: (
13
- presetEffectListId: string,
14
- args?: Record<string, unknown>,
15
- isQuickAction?: boolean
16
- ) => void;
11
+ manuallyTriggerPresetEffectList: (presetEffectListId: string, args?: Record<string, unknown>, isQuickAction?: boolean) => void;
17
12
  duplicatePresetEffectList: (presetEffectListId: string) => void;
18
13
  deletePresetEffectList: (presetEffectListId: string) => void;
19
14
  showAddEditPresetEffectListModal: (presetEffectList?: Partial<PresetEffectList>) => Promise<PresetEffectList | null>;
@@ -1,5 +1,4 @@
1
1
  import type { FirebotSettingsTypes } from "../settings";
2
-
3
2
  export type SettingsService = {
4
3
  getSetting: <Key extends keyof FirebotSettingsTypes>(key: Key) => FirebotSettingsTypes[Key];
5
4
  };
@@ -1,4 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-unsafe-function-type */
2
1
  export type BasePage = {
3
2
  id: string;
4
3
  name: string;
@@ -6,32 +5,27 @@ export type BasePage = {
6
5
  fullPage?: boolean;
7
6
  disableScroll?: boolean;
8
7
  };
9
-
10
8
  export type AngularJsPage = BasePage & {
11
9
  type: 'angularjs';
12
10
  template: string;
13
11
  controller: Function;
14
12
  };
15
-
16
13
  export type IframePage = BasePage & {
17
14
  type: 'iframe';
18
- // Other properties TBD
19
15
  };
20
-
21
16
  export type AngularJsFactory = {
22
17
  name: string;
23
18
  function: Function;
24
19
  };
25
-
26
20
  export type AngularJsComponent = {
27
21
  name: string;
28
22
  bindings: Record<string, string>;
29
23
  template: string;
30
- transclude?: boolean | string | { [slot: string]: string };
24
+ transclude?: boolean | string | {
25
+ [slot: string]: string;
26
+ };
31
27
  controller: Function;
32
28
  };
33
-
34
-
35
29
  /**
36
30
  * A specialized AngularJS component for rendering Firebot parameters.
37
31
  * These components will always have the following bindings:
@@ -53,10 +47,8 @@ export type AngularJsFirebotParameterComponent = {
53
47
  template: string;
54
48
  controller: Function;
55
49
  };
56
-
57
50
  export type AngularJsDirective = {
58
51
  name: string;
59
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
60
52
  function: (...args: any[]) => {
61
53
  compile?: Function;
62
54
  controller?: Function;
@@ -64,23 +56,24 @@ export type AngularJsDirective = {
64
56
  multiElement?: boolean;
65
57
  name?: string;
66
58
  priority?: number;
67
- require?: string | string[] | { [controller: string]: string };
59
+ require?: string | string[] | {
60
+ [controller: string]: string;
61
+ };
68
62
  restrict?: string;
69
63
  scope?: boolean | object;
70
64
  template?: string;
71
65
  terminal?: boolean;
72
- transclude?: boolean | string | { [slot: string]: string };
66
+ transclude?: boolean | string | {
67
+ [slot: string]: string;
68
+ };
73
69
  };
74
70
  };
75
-
76
71
  export type AngularJsFilter = {
77
72
  name: string;
78
73
  function: {
79
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
80
74
  (...args: any[]): Function;
81
75
  };
82
76
  };
83
-
84
77
  export type UIExtension = {
85
78
  id: string;
86
79
  /**
@@ -1,52 +1,26 @@
1
- export type NoFunctionValue =
2
- boolean
3
- | string
4
- | number
5
- | null
6
- | undefined
7
-
8
- | NoFunctionObject
9
-
10
- | NoFunctionArray;
11
-
1
+ export type NoFunctionValue = boolean | string | number | null | undefined | NoFunctionObject | NoFunctionArray;
12
2
  export interface NoFunctionObject {
13
3
  [key: string]: NoFunctionValue;
14
4
  }
15
-
16
5
  export type NoFunctionArray = Array<NoFunctionValue>;
17
-
18
6
  export type Awaitable<T> = T | PromiseLike<T>;
19
-
20
- type ObjectOfUnknowns = {
7
+ export type ObjectOfUnknowns = {
21
8
  [key: string]: unknown;
22
9
  };
23
-
24
10
  export type KeyValuePair<K = string, V = string> = {
25
11
  key: K;
26
12
  value: V;
27
13
  };
28
-
29
14
  export type FileFilter = {
30
15
  name: string;
31
16
  extensions: string[];
32
17
  };
33
-
34
18
  /**
35
19
  * Converts a camelCase string type into its snake_case equivalent.
36
20
  * Uppercase letters and digits are prefixed with an underscore.
37
21
  */
38
- type CamelToSnake<S extends string, Acc extends string = ""> = S extends `${infer H}${infer T}`
39
- ? H extends Uppercase<H>
40
- ? H extends Lowercase<H>
41
- ? CamelToSnake<T, `${Acc}_${H}`>
42
- : CamelToSnake<T, `${Acc}_${Lowercase<H>}`>
43
- : CamelToSnake<T, `${Acc}${H}`>
44
- : Acc;
45
-
46
- export type SnakeCased<T> = T extends Date
47
- ? string
48
- : T extends Array<infer U>
49
- ? Array<SnakeCased<U>>
50
- : T extends object
51
- ? { [K in keyof T as K extends string ? CamelToSnake<K> : K]: SnakeCased<T[K]> }
52
- : T;
22
+ type CamelToSnake<S extends string, Acc extends string = ""> = S extends `${infer H}${infer T}` ? H extends Uppercase<H> ? H extends Lowercase<H> ? CamelToSnake<T, `${Acc}_${H}`> : CamelToSnake<T, `${Acc}_${Lowercase<H>}`> : CamelToSnake<T, `${Acc}${H}`> : Acc;
23
+ export type SnakeCased<T> = T extends Date ? string : T extends Array<infer U> ? Array<SnakeCased<U>> : T extends object ? {
24
+ [K in keyof T as K extends string ? CamelToSnake<K> : K]: SnakeCased<T[K]>;
25
+ } : T;
26
+ export {};
@@ -4,4 +4,4 @@ export type VariableMacro = {
4
4
  expression: string;
5
5
  description?: string;
6
6
  argNames?: string[];
7
- };
7
+ };
@@ -1,23 +1,11 @@
1
1
  import type { Trigger, TriggersObject, TriggerType, TriggerMeta } from "./triggers";
2
2
  import type { Awaitable } from "./util-types";
3
-
4
3
  export { Trigger, TriggersObject, TriggerType, TriggerMeta };
5
-
6
- export type VariableCategory =
7
- | "common"
8
- | "trigger based"
9
- | "user based"
10
- | "text"
11
- | "numbers"
12
- | "advanced"
13
- | "obs"
14
- | "integrations";
15
-
4
+ export type VariableCategory = "common" | "trigger based" | "user based" | "text" | "numbers" | "advanced" | "obs" | "integrations";
16
5
  export type VariableUsage = {
17
6
  usage: string;
18
7
  description?: string;
19
8
  };
20
-
21
9
  interface VariableDefinition {
22
10
  handle: string;
23
11
  aliases?: string[];
@@ -32,23 +20,21 @@ interface VariableDefinition {
32
20
  sensitive?: boolean;
33
21
  hidden?: boolean;
34
22
  }
35
-
36
23
  type Variable = {
37
24
  definition: VariableDefinition;
38
25
  getSuggestions?: (triggerType: TriggerType, triggerMeta?: TriggerMeta) => Awaitable<VariableUsage[]>;
39
26
  argsCheck?: (...args: unknown[]) => void;
40
27
  evaluator(trigger: Trigger, ...args: unknown[]): Awaitable<unknown>;
41
28
  };
42
-
43
29
  type SpoofedVariable = {
44
- definition: VariableDefinition & { spoof: true };
30
+ definition: VariableDefinition & {
31
+ spoof: true;
32
+ };
45
33
  argsCheck?: never;
46
34
  evaluator?: never;
47
35
  getSuggestions?: (triggerType: TriggerType, triggerMeta?: TriggerMeta) => Awaitable<VariableUsage[]>;
48
36
  };
49
-
50
37
  export type ReplaceVariable = Variable | SpoofedVariable;
51
-
52
38
  export type RegisteredVariable = {
53
39
  definition: VariableDefinition;
54
40
  handle: string;
@@ -56,4 +42,4 @@ export type RegisteredVariable = {
56
42
  argsCheck: (...args: unknown[]) => void;
57
43
  evaluator(trigger: Trigger, ...args: unknown[]): Awaitable<unknown>;
58
44
  getSuggestions: (triggerType: TriggerType, triggerMeta?: TriggerMeta) => Awaitable<VariableUsage[]>;
59
- };
45
+ };
@@ -18,7 +18,6 @@ export interface FirebotViewer {
18
18
  currency: Record<string, number>;
19
19
  ranks: Record<string, string>;
20
20
  }
21
-
22
21
  export interface BasicViewer {
23
22
  id: string;
24
23
  username: string;
@@ -26,5 +25,4 @@ export interface BasicViewer {
26
25
  twitchRoles?: string[];
27
26
  profilePicUrl?: string;
28
27
  }
29
-
30
- export type NewFirebotViewer = BasicViewer & Partial<Omit<FirebotViewer, "_id" | "username" | "displayName" | "twitchRoles" | "profilePicUrl">>
28
+ export type NewFirebotViewer = BasicViewer & Partial<Omit<FirebotViewer, "_id" | "username" | "displayName" | "twitchRoles" | "profilePicUrl">>;
@@ -2,4 +2,4 @@ export type WebhookConfig = {
2
2
  id: string;
3
3
  name: string;
4
4
  scriptId?: string;
5
- };
5
+ };
@@ -1,70 +1,32 @@
1
1
  import type { Awaitable } from "./util-types";
2
-
3
- export type WebSocketEventType =
4
- "subscribe-events" |
5
- "overlay-connected" |
6
- "overlay-event" |
7
- "send-to-overlay" |
8
-
9
- "command:created" |
10
- "command:updated" |
11
- "command:deleted" |
12
-
13
- "counter:created" |
14
- "counter:updated" |
15
- "counter:deleted" |
16
-
17
- "custom-role:created" |
18
- "custom-role:updated" |
19
- "custom-role:deleted" |
20
-
21
- "custom-variable:created" |
22
- "custom-variable:updated" |
23
- "custom-variable:deleted" |
24
-
25
- "effect-queue:created" |
26
- "effect-queue:updated" |
27
- "effect-queue:length-updated" |
28
- "effect-queue:deleted" |
29
-
30
- "preset-effect-list:created" |
31
- "preset-effect-list:updated" |
32
- "preset-effect-list:deleted" |
33
-
34
- "timer:created" |
35
- "timer:updated" |
36
- "timer:deleted";
37
-
38
- interface Message {
2
+ export type WebSocketEventType = "subscribe-events" | "overlay-connected" | "overlay-event" | "send-to-overlay" | "command:created" | "command:updated" | "command:deleted" | "counter:created" | "counter:updated" | "counter:deleted" | "custom-role:created" | "custom-role:updated" | "custom-role:deleted" | "custom-variable:created" | "custom-variable:updated" | "custom-variable:deleted" | "effect-queue:created" | "effect-queue:updated" | "effect-queue:length-updated" | "effect-queue:deleted" | "preset-effect-list:created" | "preset-effect-list:updated" | "preset-effect-list:deleted" | "timer:created" | "timer:updated" | "timer:deleted";
3
+ export interface Message {
39
4
  type: string;
40
5
  id?: number | string;
41
6
  name: string;
42
7
  data?: unknown;
43
8
  }
44
- interface InvokeMessage extends Message {
9
+ export interface InvokeMessage extends Message {
45
10
  type: "invoke";
46
11
  id: string | number;
47
12
  data: unknown;
48
13
  }
49
- interface ResponseMessage extends Message {
14
+ export interface ResponseMessage extends Message {
50
15
  type: "response";
51
16
  id: number | string;
52
17
  name: "error" | "success";
53
18
  }
54
- interface EventMessage extends Message {
19
+ export interface EventMessage extends Message {
55
20
  type: "event";
56
21
  }
57
-
58
- interface InvokePluginMessage extends InvokeMessage {
22
+ export interface InvokePluginMessage extends InvokeMessage {
59
23
  name: "plugin";
60
24
  pluginName: string;
61
25
  }
62
-
63
- interface CustomWebSocketHandler {
26
+ export interface CustomWebSocketHandler {
64
27
  pluginName: string;
65
28
  handler: (data: unknown) => Awaitable<void>;
66
29
  }
67
-
68
30
  export type OverlayConnectedData = {
69
31
  instanceName: string;
70
- };
32
+ };