@overwolf/ow-electron-packages-types 1.0.6 → 1.1.0-beta.4

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.
@@ -1,34 +1,60 @@
1
1
  export const enum kGepSupportedGameIds {
2
2
  ApexLegends = 21566,
3
+ ArcRaiders = 27168,
4
+ ArknightsEF = 27724,
3
5
  BaldursGateIII = 22088,
4
6
  BlackMythWukong = 24504,
7
+ CoDGI = 27860,
8
+ CallofDutyModernWarfareII = 22328,
9
+ CallofDutyVanguard = 21876,
5
10
  ContentWarning = 24110,
6
11
  CS2 = 22730,
12
+ DarkandDarker = 22584,
13
+ Deadlock = 24482,
7
14
  DiabloIV = 22700,
8
15
  Dota2 = 7314,
16
+ ELDENRINGNIGHTREIGN = 25918,
17
+ EscapeFromTarkov = 21634,
9
18
  FinalFantasyXIVOnline = 6350,
10
19
  Fortnite = 21216,
11
20
  GenshinImpact = 21656,
12
- HadesII = 24218,
13
- HaloInfinite = 21854,
21
+ HearthstoneHeroesofWarcraft = 9898,
14
22
  HELLDIVERS2 = 24000,
15
23
  HonkaiStarRail = 22804,
16
24
  LeagueofLegends = 5426,
17
25
  LeagueofLegendsPBE = 22848,
18
26
  LethalCompany = 23522,
19
- ManorLords = 24176,
27
+ LostArk = 21864,
28
+ MagictheGatheringArena = 21308,
29
+ MarvelRivals = 24890,
20
30
  Minecraft = 8032,
31
+ MinecraftBedrock = 22176,
32
+ MHWilds = 25446,
33
+ NewWorld = 21816,
21
34
  OnceHuman = 23930,
22
35
  Overwatch = 10844,
23
36
  Palworld = 23944,
24
37
  PathofExile = 7212,
25
- Stormgate = 23818,
38
+ PathofExile2 = 24886,
39
+ PEAK = 26092,
40
+ PUBG = 10906,
41
+ REPO = 25448,
42
+ Rainbow6Siege = 10826,
43
+ REMATCH = 26120,
44
+ Roblox = 4688,
45
+ RobloxMicrosoftedition = 22174,
46
+ RocketLeague = 10798,
47
+ ScheduleI = 25610,
48
+ SonsoftheForest = 22638,
49
+ Splitgate2 = 25884,
50
+ StreetFighter6 = 22894,
51
+ SUPERVIVE = 24346,
26
52
  TeamfightTactics = 21570,
27
53
  TheFinals = 23478,
28
- TheFirstDescendant = 24360,
29
- RocketLeague = 10798,
30
54
  VALORANT = 21640,
55
+ Warframe = 8954,
31
56
  Warhammer40000SpaceMarine2 = 24548,
32
- WutheringWaves = 24300,
33
57
  WoW = 765,
34
- }
58
+ WutheringWaves = 24300,
59
+ XKO = 26840,
60
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@overwolf/ow-electron-packages-types",
3
- "version": "1.0.6",
3
+ "version": "1.1.0-beta.4",
4
4
  "description": "Type definition file for autocompletion and documentation purposes for ow-electron packages",
5
5
  "license": "MIT",
6
6
  "types": "types.d.ts",
@@ -30,5 +30,8 @@
30
30
  "./gep-supported-games": {
31
31
  "types": "./gep-supported-games.d.ts"
32
32
  }
33
+ },
34
+ "dependencies": {
35
+ "glob": "^13.0.0"
33
36
  }
34
37
  }
package/types.d.ts CHANGED
@@ -61,6 +61,22 @@ interface IOverwolfUtilityApi {
61
61
  */
62
62
  scan(filter?: GamesFilter): Promise<InstalledGameInfo[]>;
63
63
 
64
+ /**
65
+ * install ow-electron helpers to
66
+ * %CommonProgramFiles%\<app-name>\ with UAC elevation.
67
+ * will allow us to inject into high elevation games
68
+ * No-ops if files are already present.
69
+ * @throws {HelperInstallError} exitCode 1223 — user cancelled the UAC prompt (ERROR_CANCELLED)
70
+ * @throws {HelperInstallError} any other non-zero exitCode — installation failed
71
+ */
72
+ installHighElevationHelper(): Promise<void>;
73
+
74
+ /**
75
+ * Returns true if ow-electron helpers is already installed in
76
+ * %CommonProgramFiles%\<app-name>\.
77
+ */
78
+ isHighElevationHelperInstalled(): Promise<boolean>;
79
+
64
80
  /**
65
81
  * Fires when a tracked game is launched.
66
82
  *
@@ -490,7 +506,15 @@ type CaptureSourceType =
490
506
  /**
491
507
  * Capture a specific application window.
492
508
  */
493
- | 'Window';
509
+ | 'Window'
510
+ /**
511
+ * Capture a specific image.
512
+ */
513
+ | 'Image'
514
+ /**
515
+ * Capture a solid color screen.
516
+ */
517
+ | 'Color';
494
518
 
495
519
 
496
520
 
@@ -2011,7 +2035,9 @@ export interface AudioNoiseSuppressFilterV2 extends AudioFilterBase {
2011
2035
  * This type uses the `id` property as a type discriminator. When used in a switch
2012
2036
  * statement or conditional, TypeScript will narrow the `parameters` to the
2013
2037
  * specific interface associated with that ID.
2014
- * * @example
2038
+ *
2039
+ * For more information about the filter types, see [OBS Audio Filters](https://obsproject.com/kb/filters-guide#:~:text=the%20Source%20image-,Audio/Video%20Filters,-Compressor).
2040
+ * @example
2015
2041
  * ```typescript
2016
2042
  * function applyFilter(filter: AudioFilter) {
2017
2043
  * if (filter.id === 'gain_filter') {
@@ -2672,6 +2698,44 @@ interface WindowCaptureSourceSettings extends CaptureSourceSettings {
2672
2698
  compatibility?: boolean;
2673
2699
  }
2674
2700
 
2701
+ /**
2702
+ * Settings for capturing a static image as a source.
2703
+ *
2704
+ * Extends {@link CaptureSourceSettings} with image-specific options such as file path.
2705
+ *
2706
+ * @see CaptureSourceSettings
2707
+ */
2708
+ export interface ImageCaptureSourceSettings extends CaptureSourceSettings {
2709
+ /**
2710
+ * Image file path.
2711
+ */
2712
+ path: string;
2713
+ }
2714
+
2715
+ /**
2716
+ * Settings for capturing a solid color as a source.
2717
+ *
2718
+ * Extends {@link CaptureSourceSettings} with color-specific options such as color value, width, and height.
2719
+ *
2720
+ * @see CaptureSourceSettings
2721
+ */
2722
+ export interface ColorCaptureSourceSettings extends CaptureSourceSettings {
2723
+ /**
2724
+ * Color in #RRGGBBAA format. (red green blue alpha)
2725
+ */
2726
+ color: string;
2727
+
2728
+ /**
2729
+ * Width in pixels
2730
+ */
2731
+ width: number;
2732
+
2733
+ /**
2734
+ * Height in pixels
2735
+ */
2736
+ height: number;
2737
+ }
2738
+
2675
2739
  /**
2676
2740
  * Information about a generic capture source configuration, used for identifying and configuring
2677
2741
  * a video capture input such as a display, game, or application window.
@@ -2775,6 +2839,54 @@ interface WindowCaptureSource extends CaptureSource {
2775
2839
  readonly properties: WindowCaptureSourceSettings;
2776
2840
  }
2777
2841
 
2842
+ /**
2843
+ * Image-based capture source configuration.
2844
+ *
2845
+ * Extends {@link CaptureSource} with the `'Image'` type and
2846
+ * configuration options for capturing a static image file.
2847
+ */
2848
+ export interface ImageCaptureSource extends CaptureSource {
2849
+ /**
2850
+ * The capture source type.
2851
+ *
2852
+ * Always set to `'Image'` for this interface.
2853
+ */
2854
+ readonly type: 'Image';
2855
+
2856
+ /**
2857
+ * Configuration settings for image capture.
2858
+ *
2859
+ * Includes file path.
2860
+ *
2861
+ * @see ImageCaptureSourceSettings
2862
+ */
2863
+ readonly properties: ImageCaptureSourceSettings;
2864
+ }
2865
+
2866
+ /**
2867
+ * Color-based capture source configuration.
2868
+ *
2869
+ * Extends {@link CaptureSource} with the `'Color'` type and
2870
+ * configuration options for capturing a solid color.
2871
+ */
2872
+ export interface ColorCaptureSource extends CaptureSource {
2873
+ /**
2874
+ * The capture source type.
2875
+ *
2876
+ * Always set to `'Color'` for this interface.
2877
+ */
2878
+ readonly type: 'Color';
2879
+
2880
+ /**
2881
+ * Configuration settings for color capture.
2882
+ *
2883
+ * Includes color value, width, and height.
2884
+ *
2885
+ * @see ColorCaptureSourceSettings
2886
+ */
2887
+ readonly properties: ColorCaptureSourceSettings;
2888
+ }
2889
+
2778
2890
 
2779
2891
  /**
2780
2892
  * Configuration for all audio-related settings.
@@ -3377,7 +3489,7 @@ interface CaptureSettingsBuilder extends CaptureSettings {
3377
3489
  * @returns The builder instance for chaining.
3378
3490
  */
3379
3491
  addScreenSource(
3380
- settings: MonitorCaptureSourceSettings
3492
+ settings: MonitorCaptureSourceSettings,
3381
3493
  ): CaptureSettingsBuilder;
3382
3494
 
3383
3495
  /**
@@ -3394,7 +3506,7 @@ interface CaptureSettingsBuilder extends CaptureSettings {
3394
3506
  * @param settings
3395
3507
  */
3396
3508
  addWindowSource(
3397
- settings: WindowCaptureSourceSettings
3509
+ settings: WindowCaptureSourceSettings,
3398
3510
  ): CaptureSettingsBuilder;
3399
3511
 
3400
3512
  /**
@@ -3405,9 +3517,21 @@ interface CaptureSettingsBuilder extends CaptureSettings {
3405
3517
  */
3406
3518
  addBrowserWindowSource(
3407
3519
  browserWindow: BrowserWindow,
3408
- setting: WindowCaptureSourceSettings
3520
+ setting: WindowCaptureSourceSettings,
3409
3521
  ): CaptureSettingsBuilder;
3410
3522
 
3523
+ /**
3524
+ * Add Image capture source
3525
+ * @param settings
3526
+ */
3527
+ addImageSource(settings: ImageCaptureSourceSettings): CaptureSettingsBuilder;
3528
+
3529
+ /**
3530
+ * Add Color capture source
3531
+ * @param settings
3532
+ */
3533
+ addColorSource(settings: ColorCaptureSourceSettings): CaptureSettingsBuilder;
3534
+
3411
3535
  /**
3412
3536
  * Adds an audio device for capturing input or output audio.
3413
3537
  *
@@ -3417,7 +3541,7 @@ interface CaptureSettingsBuilder extends CaptureSettings {
3417
3541
  */
3418
3542
  addAudioCapture(
3419
3543
  params: AudioDeviceParams,
3420
- settings?: AudioDeviceSettings
3544
+ settings?: AudioDeviceSettings,
3421
3545
  ): CaptureSettingsBuilder;
3422
3546
 
3423
3547
  /**
@@ -3431,7 +3555,7 @@ interface CaptureSettingsBuilder extends CaptureSettings {
3431
3555
  addAudioDefaultCapture(
3432
3556
  type: AudioDeviceType,
3433
3557
  params?: DefaultAudioDeviceParams,
3434
- settings?: AudioDeviceSettings
3558
+ settings?: AudioDeviceSettings,
3435
3559
  ): CaptureSettingsBuilder;
3436
3560
 
3437
3561
  /**
@@ -3443,7 +3567,7 @@ interface CaptureSettingsBuilder extends CaptureSettings {
3443
3567
  */
3444
3568
  addApplicationAudioCapture(
3445
3569
  param: ApplicationAudioCaptureParams,
3446
- settings?: AudioDeviceSettings
3570
+ settings?: AudioDeviceSettings,
3447
3571
  ): CaptureSettingsBuilder;
3448
3572
 
3449
3573
  /**
@@ -4701,6 +4825,14 @@ interface OverlayWindowOptions
4701
4825
  * modifiers: { ctrl: true, alt: true },
4702
4826
  * passthrough: false
4703
4827
  * };
4828
+ *
4829
+ * // Since 1.13.3: use W3C KeyboardEvent.code strings (preferred, layout-independent)
4830
+ * const toggleHotkey: IOverlayHotkey = {
4831
+ * name: 'toggle',
4832
+ * keyCode: 'KeyF',
4833
+ * modifiers: { ctrl: true, custom: 'Tab' },
4834
+ * passthrough: true
4835
+ * };
4704
4836
  * ```
4705
4837
  */
4706
4838
  interface IOverlayHotkey {
@@ -4710,16 +4842,21 @@ interface IOverlayHotkey {
4710
4842
  name: string;
4711
4843
 
4712
4844
  /**
4713
- * Primary key code for the hotkey. Use standard keyboard codes.
4845
+ * Primary key code for the hotkey.
4846
+ *
4847
+ * Accepts a numeric Windows Virtual-Key code or, since 1.13.3, a W3C
4848
+ * `KeyboardEvent.code` string (e.g. `'KeyA'`, `'F10'`, `'ArrowUp'`).
4849
+ * String values are resolved to VK codes at registration time; an unknown
4850
+ * string throws an error.
4714
4851
  */
4715
- keyCode: number;
4852
+ keyCode: number | string;
4716
4853
 
4717
4854
  /**
4718
4855
  * Modifier keys that must be pressed along with the main key.
4719
4856
  */
4720
4857
  modifiers?: {
4721
4858
  /**
4722
- * Used for `alt` ket.
4859
+ * Used for `alt` key.
4723
4860
  */
4724
4861
  alt?: boolean;
4725
4862
  /**
@@ -4731,9 +4868,11 @@ interface IOverlayHotkey {
4731
4868
  */
4732
4869
  shift?: boolean;
4733
4870
  /**
4734
- * Custom key binding. Use key code.
4871
+ * Custom key binding. Accepts a numeric Windows Virtual-Key code or,
4872
+ * since 1.13.3, a W3C `KeyboardEvent.code` string (same format as
4873
+ * `keyCode`).
4735
4874
  */
4736
- custom?: number;
4875
+ custom?: number | string;
4737
4876
  /**
4738
4877
  * Use for the `windows` or `command` key.
4739
4878
  */
@@ -4742,10 +4881,10 @@ interface IOverlayHotkey {
4742
4881
 
4743
4882
  /**
4744
4883
  * Controls whether the hotkey will be passed through to the underlying game.
4745
- *
4884
+ *
4746
4885
  * - If `true`, the hotkey will be captured by the overlay and pass to the game.
4747
4886
  * - If `false`, the hotkey will be captured exclusively by the overlay.
4748
- *
4887
+ *
4749
4888
  * @default false
4750
4889
  */
4751
4890
  passthrough?: boolean;
@@ -5302,6 +5441,22 @@ interface IOverwolfOverlayApi extends EventEmitter {
5302
5441
  */
5303
5442
  exitExclusiveMode(): void;
5304
5443
 
5444
+ /**
5445
+ * install ow-electron helpers to
5446
+ * %CommonProgramFiles%\<app-name>\ with UAC elevation.
5447
+ * will allow us to inject into high elevation games
5448
+ * No-ops if files are already present.
5449
+ * @throws {HelperInstallError} exitCode 1223 — user cancelled the UAC prompt (ERROR_CANCELLED)
5450
+ * @throws {HelperInstallError} any other non-zero exitCode — installation failed
5451
+ */
5452
+ installHighElevationHelper(): Promise<void>;
5453
+
5454
+ /**
5455
+ * Returns true if ow-electron helpers is already installed in
5456
+ * %CommonProgramFiles%\<app-name>\.
5457
+ */
5458
+ isHighElevationHelperInstalled(): Promise<boolean>;
5459
+
5305
5460
  /**
5306
5461
  * Fires when an internal error occurs within the overlay system.
5307
5462
  */