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

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 (86) hide show
  1. package/LICENSE +674 -674
  2. package/backend/events/filters/builtin/firebot/index.d.ts +1 -1
  3. package/backend/events/filters/builtin/firebot/new-currency-amount.d.ts +1 -1
  4. package/backend/events/filters/builtin/firebot/new-view-time.d.ts +1 -1
  5. package/backend/events/filters/builtin/firebot/previous-currency-amount.d.ts +1 -1
  6. package/backend/events/filters/builtin/firebot/previous-view-time.d.ts +1 -1
  7. package/backend/events/filters/builtin/index.d.ts +1 -1
  8. package/backend/events/filters/builtin/third-party/donation-amount.d.ts +1 -1
  9. package/backend/events/filters/builtin/third-party/index.d.ts +1 -1
  10. package/backend/events/filters/builtin/twitch/bits-badge-tier.d.ts +1 -1
  11. package/backend/events/filters/builtin/twitch/chat-mode-duration.d.ts +1 -1
  12. package/backend/events/filters/builtin/twitch/cheer-bits-amount.d.ts +1 -1
  13. package/backend/events/filters/builtin/twitch/gift-count.d.ts +1 -1
  14. package/backend/events/filters/builtin/twitch/gift-duration.d.ts +1 -1
  15. package/backend/events/filters/builtin/twitch/index.d.ts +1 -1
  16. package/backend/events/filters/builtin/twitch/lifetime-gift-count.d.ts +1 -1
  17. package/backend/events/filters/builtin/twitch/raid-viewer-count.d.ts +1 -1
  18. package/backend/events/filters/builtin/twitch/sub-months.d.ts +1 -1
  19. package/backend/events/filters/builtin/twitch/watch-streak-count.d.ts +1 -1
  20. package/backend/integrations/builtin/streamloots/filters/chest-quantity.d.ts +1 -1
  21. package/backend/overlay-widgets/overlay-widgets-manager.d.ts +1 -1
  22. package/backend/ranks/rank-ladder-helper.d.ts +1 -1
  23. package/backend/restrictions/builtin/index.d.ts +1 -1
  24. package/backend/scripts/executors/plugin-executor.d.ts +2 -1
  25. package/backend/scripts/executors/script-executor.interface.d.ts +2 -1
  26. package/backend/webhooks/webhook-config-manager.d.ts +12 -1
  27. package/index.d.ts +1 -1
  28. package/package.json +1 -1
  29. package/types/accounts.d.ts +1 -2
  30. package/types/auth.d.ts +1 -10
  31. package/types/channel-rewards.d.ts +1 -5
  32. package/types/chat.d.ts +9 -31
  33. package/types/commands.d.ts +11 -31
  34. package/types/counters.d.ts +1 -2
  35. package/types/currency.d.ts +1 -3
  36. package/types/discord.d.ts +0 -1
  37. package/types/effects.d.ts +9 -42
  38. package/types/events.d.ts +3 -36
  39. package/types/expressionish.d.ts +2 -22
  40. package/types/games.d.ts +1 -4
  41. package/types/hotkeys.d.ts +1 -3
  42. package/types/http-server.d.ts +2 -14
  43. package/types/icons.d.ts +1 -1
  44. package/types/import.d.ts +7 -34
  45. package/types/index.d.ts +1 -1
  46. package/types/integrations.d.ts +41 -65
  47. package/types/moderation.d.ts +1 -8
  48. package/types/modules/event-manager.d.ts +2 -10
  49. package/types/modules/frontend-communicator.d.ts +5 -21
  50. package/types/modules/index.d.ts +1 -1
  51. package/types/notifications.d.ts +1 -6
  52. package/types/overlay-widgets.d.ts +11 -34
  53. package/types/parameters.d.ts +26 -182
  54. package/types/plugins.d.ts +20 -58
  55. package/types/power-ups.d.ts +0 -2
  56. package/types/pronouns.d.ts +1 -2
  57. package/types/quick-actions.d.ts +1 -3
  58. package/types/quotes.d.ts +1 -3
  59. package/types/ranks.d.ts +1 -2
  60. package/types/restrictions.d.ts +7 -24
  61. package/types/roles.d.ts +1 -3
  62. package/types/script-api.d.ts +5 -59
  63. package/types/settings.d.ts +7 -7
  64. package/types/setups.d.ts +2 -4
  65. package/types/sort-tags.d.ts +1 -1
  66. package/types/timers.d.ts +1 -5
  67. package/types/triggers.d.ts +12 -23
  68. package/types/ui/angular.d.ts +5 -26
  69. package/types/ui/effect-helper-service.d.ts +1 -2
  70. package/types/ui/effect-queues-service.d.ts +8 -4
  71. package/types/ui/firebot-root-scope.d.ts +0 -1
  72. package/types/ui/index.d.ts +1 -1
  73. package/types/ui/modal-factory.d.ts +5 -13
  74. package/types/ui/modal-service.d.ts +3 -2
  75. package/types/ui/ng-toast.d.ts +5 -1
  76. package/types/ui/object-copy-helper.d.ts +0 -1
  77. package/types/ui/platform-service.d.ts +1 -1
  78. package/types/ui/preset-effect-lists-service.d.ts +1 -6
  79. package/types/ui/settings-service.d.ts +0 -1
  80. package/types/ui-extensions.d.ts +9 -16
  81. package/types/util-types.d.ts +7 -33
  82. package/types/variable-macros.d.ts +1 -1
  83. package/types/variables.d.ts +5 -19
  84. package/types/viewers.d.ts +1 -3
  85. package/types/webhooks.d.ts +6 -1
  86. package/types/websocket.d.ts +8 -46
@@ -1,4 +1,4 @@
1
- declare const _default: (Omit<import("../../../../../types").EventFilter, "presetValues"> | (Omit<import("../../../../../types").EventFilter, "valueType" | "presetValues"> & {
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 filter: Omit<import("../../../../../types").EventFilter, "valueType" | "presetValues"> & {
1
+ declare const filter: Omit<import("../../../../../types").EventFilter, "presetValues" | "valueType"> & {
2
2
  valueType: "number";
3
3
  };
4
4
  export default filter;
@@ -1,4 +1,4 @@
1
- declare const filter: Omit<import("../../../../../types").EventFilter, "valueType" | "presetValues"> & {
1
+ declare const filter: Omit<import("../../../../../types").EventFilter, "presetValues" | "valueType"> & {
2
2
  valueType: "number";
3
3
  };
4
4
  export default filter;
@@ -1,4 +1,4 @@
1
- declare const filter: Omit<import("../../../../../types").EventFilter, "valueType" | "presetValues"> & {
1
+ declare const filter: Omit<import("../../../../../types").EventFilter, "presetValues" | "valueType"> & {
2
2
  valueType: "number";
3
3
  };
4
4
  export default filter;
@@ -1,4 +1,4 @@
1
- declare const filter: Omit<import("../../../../../types").EventFilter, "valueType" | "presetValues"> & {
1
+ declare const filter: Omit<import("../../../../../types").EventFilter, "presetValues" | "valueType"> & {
2
2
  valueType: "number";
3
3
  };
4
4
  export default filter;
@@ -1,4 +1,4 @@
1
- declare const _default: (Omit<import("../../../../types").EventFilter, "presetValues"> | (Omit<import("../../../../types").EventFilter, "valueType" | "presetValues"> & {
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 filter: Omit<import("../../../../../types").EventFilter, "valueType" | "presetValues"> & {
1
+ declare const filter: Omit<import("../../../../../types").EventFilter, "presetValues" | "valueType"> & {
2
2
  valueType: "number";
3
3
  };
4
4
  export default filter;
@@ -1,4 +1,4 @@
1
- declare const _default: (Omit<import("../../../../../types").EventFilter, "presetValues"> | (Omit<import("../../../../../types").EventFilter, "valueType" | "presetValues"> & {
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 filter: Omit<import("../../../../../types").EventFilter, "valueType" | "presetValues"> & {
1
+ declare const filter: Omit<import("../../../../../types").EventFilter, "presetValues" | "valueType"> & {
2
2
  valueType: "number";
3
3
  };
4
4
  export default filter;
@@ -1,4 +1,4 @@
1
- declare const filter: Omit<import("../../../../../types").EventFilter, "valueType" | "presetValues"> & {
1
+ declare const filter: Omit<import("../../../../../types").EventFilter, "presetValues" | "valueType"> & {
2
2
  valueType: "number";
3
3
  };
4
4
  export default filter;
@@ -1,4 +1,4 @@
1
- declare const filter: Omit<import("../../../../../types").EventFilter, "valueType" | "presetValues"> & {
1
+ declare const filter: Omit<import("../../../../../types").EventFilter, "presetValues" | "valueType"> & {
2
2
  valueType: "number";
3
3
  };
4
4
  export default filter;
@@ -1,4 +1,4 @@
1
- declare const filter: Omit<import("../../../../../types").EventFilter, "valueType" | "presetValues"> & {
1
+ declare const filter: Omit<import("../../../../../types").EventFilter, "presetValues" | "valueType"> & {
2
2
  valueType: "number";
3
3
  };
4
4
  export default filter;
@@ -1,4 +1,4 @@
1
- declare const filter: Omit<import("../../../../../types").EventFilter, "valueType" | "presetValues"> & {
1
+ declare const filter: Omit<import("../../../../../types").EventFilter, "presetValues" | "valueType"> & {
2
2
  valueType: "number";
3
3
  };
4
4
  export default filter;
@@ -1,4 +1,4 @@
1
- declare const _default: (Omit<import("../../../../../types").EventFilter, "presetValues"> | (Omit<import("../../../../../types").EventFilter, "valueType" | "presetValues"> & {
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 filter: Omit<import("../../../../../types").EventFilter, "valueType" | "presetValues"> & {
1
+ declare const filter: Omit<import("../../../../../types").EventFilter, "presetValues" | "valueType"> & {
2
2
  valueType: "number";
3
3
  };
4
4
  export default filter;
@@ -1,4 +1,4 @@
1
- declare const filter: Omit<import("../../../../../types").EventFilter, "valueType" | "presetValues"> & {
1
+ declare const filter: Omit<import("../../../../../types").EventFilter, "presetValues" | "valueType"> & {
2
2
  valueType: "number";
3
3
  };
4
4
  export default filter;
@@ -1,4 +1,4 @@
1
- declare const filter: Omit<import("../../../../../types").EventFilter, "valueType" | "presetValues"> & {
1
+ declare const filter: Omit<import("../../../../../types").EventFilter, "presetValues" | "valueType"> & {
2
2
  valueType: "number";
3
3
  };
4
4
  export default filter;
@@ -1,4 +1,4 @@
1
- declare const filter: Omit<import("../../../../../types").EventFilter, "valueType" | "presetValues"> & {
1
+ declare const filter: Omit<import("../../../../../types").EventFilter, "presetValues" | "valueType"> & {
2
2
  valueType: "number";
3
3
  };
4
4
  export default filter;
@@ -1,4 +1,4 @@
1
- declare const filter: Omit<import("../../../../../types").EventFilter, "valueType" | "presetValues"> & {
1
+ declare const filter: Omit<import("../../../../../types").EventFilter, "presetValues" | "valueType"> & {
2
2
  valueType: "number";
3
3
  };
4
4
  export = filter;
@@ -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" | "description" | "icon" | "settingsSchema" | "userCanConfigure" | "supportsLivePreview" | "initialState" | "initialAspectRatio" | "nonEditableSettings"> & {
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(): "currency" | "view_time" | "metadata";
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;
@@ -1,5 +1,6 @@
1
1
  import { ScriptBase, LegacyCustomScript, Plugin, InstalledPluginConfig, ScriptDetails } from "../../../types";
2
2
  import { IPluginExecutor, PluginRegistrations, PluginExecutionResult } from "./script-executor.interface";
3
+ import { ScriptApiContext } from "../script-api";
3
4
  /**
4
5
  * Executor for new-spec Plugins (manifest.type === "plugin")
5
6
  */
@@ -7,7 +8,7 @@ export declare class PluginExecutor extends IPluginExecutor {
7
8
  constructor();
8
9
  canHandle(script: ScriptBase | LegacyCustomScript): script is Plugin<import("../../../types").FirebotParams>;
9
10
  getScriptDetails(script: ScriptBase | LegacyCustomScript): ScriptDetails | null;
10
- executePlugin(script: ScriptBase | LegacyCustomScript, config: InstalledPluginConfig, isInstalling?: boolean): Promise<PluginExecutionResult>;
11
+ executePlugin(script: ScriptBase | LegacyCustomScript, config: InstalledPluginConfig, isInstalling?: boolean, ctx?: ScriptApiContext): Promise<PluginExecutionResult>;
11
12
  unloadPlugin(script: ScriptBase | LegacyCustomScript, config: InstalledPluginConfig, registrations?: PluginRegistrations, isUninstalling?: boolean): Promise<void>;
12
13
  updateParameters(script: ScriptBase | LegacyCustomScript, config: InstalledPluginConfig): Promise<void>;
13
14
  private registerAll;
@@ -1,4 +1,5 @@
1
1
  import { InstalledPluginConfig, LegacyCustomScript, ScriptBase, ScriptContext, Awaitable, ScriptDetails } from "../../../types";
2
+ import type { ScriptApiContext } from "../script-api";
2
3
  declare abstract class IBaseScriptExecutor {
3
4
  abstract canHandle(script: ScriptBase | LegacyCustomScript): Awaitable<boolean>;
4
5
  abstract getScriptDetails(script: ScriptBase | LegacyCustomScript): Awaitable<ScriptDetails | null>;
@@ -25,7 +26,7 @@ export type PluginExecutionResult = {
25
26
  error: string;
26
27
  };
27
28
  export declare abstract class IPluginExecutor extends IBaseScriptExecutor {
28
- abstract executePlugin(script: ScriptBase | LegacyCustomScript, config: InstalledPluginConfig, isInstalling?: boolean): Awaitable<PluginExecutionResult>;
29
+ abstract executePlugin(script: ScriptBase | LegacyCustomScript, config: InstalledPluginConfig, isInstalling?: boolean, ctx?: ScriptApiContext): Awaitable<PluginExecutionResult>;
29
30
  abstract unloadPlugin(script: ScriptBase | LegacyCustomScript, config: InstalledPluginConfig, registrations?: PluginRegistrations, isUninstalling?: boolean): Awaitable<void>;
30
31
  updateParameters?(script: ScriptBase | LegacyCustomScript, config: InstalledPluginConfig): Awaitable<void>;
31
32
  }
@@ -1,4 +1,5 @@
1
- import type { WebhookConfig } from "../../types";
1
+ import type { ScriptWebhook, WebhookConfig } from "../../types";
2
+ import type { ScriptWebhookEventHandler } from "../../types/script-api";
2
3
  import JsonDbManager from "../database/json-db-manager";
3
4
  type ExtraEvents = {
4
5
  "webhook-received": (data: {
@@ -9,8 +10,18 @@ type ExtraEvents = {
9
10
  }) => void;
10
11
  };
11
12
  declare class WebhookConfigManager extends JsonDbManager<WebhookConfig, ExtraEvents> {
13
+ private _registeredPlugins;
12
14
  constructor();
13
15
  getWebhookUrlById(webhookId: string): string;
16
+ private toPublic;
17
+ findPluginWebhookByName(pluginId: string, webhookName: string): WebhookConfig;
18
+ getPluginWebhook(pluginId: string, webhookName: string): ScriptWebhook;
19
+ getAllPluginWebhooks(pluginId: string): ScriptWebhook[];
20
+ savePluginWebhook(pluginId: string, webhookName: string): ScriptWebhook;
21
+ deletePluginWebhook(pluginId: string, webhookName: string): boolean;
22
+ getPluginWebhookUrl(pluginId: string, webhookName: string): string;
23
+ registerPluginHandler(pluginId: string, handler: ScriptWebhookEventHandler): boolean;
24
+ unregisterPluginHandler(pluginId: string): boolean;
14
25
  }
15
26
  declare const webhookConfigManager: WebhookConfigManager;
16
27
  export = webhookConfigManager;
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Auto-generated by grunt publish-types. Do not edit by hand.
1
+ // Auto-generated by grunt build-types. Do not edit by hand.
2
2
  import { FirebotScriptApi } from "./types/script-api";
3
3
 
4
4
  export * from "./types";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crowbartools/firebot-types",
3
- "version": "5.67.0-alpha12",
3
+ "version": "5.67.0-alpha14",
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",
@@ -1,5 +1,4 @@
1
1
  import type { AuthDetails } from "./auth";
2
-
3
2
  export type FirebotAccount = {
4
3
  username: string;
5
4
  displayName?: string;
@@ -10,4 +9,4 @@ export type FirebotAccount = {
10
9
  broadcasterType?: string;
11
10
  auth?: AuthDetails;
12
11
  loggedIn?: boolean;
13
- };
12
+ };
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 {};
@@ -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
- event: {
130
- command: SystemCommand<OptionsModel>['definition'];
131
- userCommand: UserCommand;
132
- chatMessage: FirebotChatMessage;
133
- commandOptions?: {
134
- [x in keyof OptionsModel]: OptionsModel[x]
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
+ };
@@ -1,5 +1,4 @@
1
1
  import type { EffectList } from "./effects";
2
-
3
2
  export type Counter = {
4
3
  id?: string;
5
4
  name: string;
@@ -10,4 +9,4 @@ export type Counter = {
10
9
  updateEffects?: EffectList;
11
10
  minimumEffects?: EffectList;
12
11
  maximumEffects?: EffectList;
13
- };
12
+ };
@@ -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
+ };
@@ -6,5 +6,4 @@ export type DiscordCustomEmbed = {
6
6
  authorIconUrl?: string;
7
7
  imageUrl?: string;
8
8
  };
9
-
10
9
  export type DiscordEmbedType = "channel" | "stream" | "custom";