@tixyel/streamelements 3.2.0 → 3.3.0

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/dist/index.d.ts CHANGED
@@ -607,6 +607,26 @@ declare class EventProvider<EventMap extends Record<string, any[]> = Record<stri
607
607
  removeAllListeners<K extends keyof EventMap>(eventName: K): this;
608
608
  }
609
609
 
610
+ type SE_API = {
611
+ responses: Record<string, any>;
612
+ sendMessage: (message: string, data: object) => void;
613
+ counters: {
614
+ get: (key: string) => number | null;
615
+ };
616
+ store: {
617
+ get: <T>(key: string) => Promise<T | null>;
618
+ set: <T>(key: string, value: T) => void;
619
+ };
620
+ resumeQueue: () => void;
621
+ sanitize: (message: string) => string;
622
+ cheerFilter: (message: string) => string;
623
+ setField: (key: string, value: string | number | boolean | undefined, reload: boolean) => void;
624
+ getOverlayStatus: () => {
625
+ isEditorMode: boolean;
626
+ muted: boolean;
627
+ };
628
+ };
629
+
610
630
  type PathValue<T, P extends string> = P extends `${infer K}.${infer Rest}` ? K extends keyof T ? PathValue<T[K], Rest> : never : P extends keyof T ? T[P] : never;
611
631
  type NumberAsString<T extends number | bigint | string> = ReturnType<T['toString']>;
612
632
  type MapNumberValuesToString<T> = {
@@ -629,6 +649,8 @@ declare class useStorage<T extends object = Record<string, any>> extends EventPr
629
649
  loaded: boolean;
630
650
  data: T;
631
651
  constructor(options: UseStorageOptions<T>);
652
+ SE_API: SE_API | null;
653
+ private start;
632
654
  /**
633
655
  * Saves the current data to storage.
634
656
  * @param data Data to save (defaults to current)
@@ -1772,6 +1794,7 @@ declare class useQueue<T> extends EventProvider<QueueEvents<T>> {
1772
1794
  on<K extends keyof QueueEvents<T>>(eventName: K, callback: (this: useQueue<T>, ...args: QueueEvents<T>[K]) => void): this;
1773
1795
  }
1774
1796
 
1797
+ declare const USE_SE_API: Promise<SE_API>;
1775
1798
  declare const Tixyel: {
1776
1799
  readonly Client: typeof Client;
1777
1800
  readonly Simulation: typeof Simulation;
@@ -1787,6 +1810,7 @@ declare const Tixyel: {
1787
1810
  readonly useStorage: typeof useStorage;
1788
1811
  readonly useQueue: typeof useQueue;
1789
1812
  };
1813
+ readonly USE_SE_API: Promise<SE_API>;
1790
1814
  };
1791
1815
  type _Tixyel_ = typeof Tixyel;
1792
1816
  declare global {
@@ -1799,10 +1823,10 @@ declare global {
1799
1823
  onSessionUpdate: onSessionUpdateEvent;
1800
1824
  onEventReceived: onEventReceivedEvent;
1801
1825
  }
1802
- var Tixyel: _Tixyel_;
1826
+ const Tixyel: _Tixyel_;
1803
1827
  var client: Client;
1804
- var SE_API: SE_API;
1828
+ const SE_API: SE_API;
1805
1829
  }
1806
1830
 
1807
- export { Alejo$Pronouns, Tixyel };
1831
+ export { Alejo$Pronouns, Tixyel, USE_SE_API };
1808
1832
  export type { Alejo$Pronouns$User, Alejo$Pronouns$display, Alejo$Pronouns$name, BttvEmote, ClientEvents$1 as ClientEvents, Facebook, Kick, Provider, SeventvEmote, StreamElements, Twitch, Twitch$Cheer, Twitch$DeleteMessage, Twitch$DeleteMessages, Twitch$Follower, Twitch$IRC, Twitch$Message, Twitch$Raid, Twitch$Subscriber, TwitchBadge, TwitchBadgesKeys, TwitchEmote, Youtube };