@overwolf/ow-electron-packages-types 0.2.0-beta.2 → 0.2.1-beta.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/package.json +1 -1
- package/types.d.ts +160 -1
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -96,6 +96,7 @@ interface OWPackages extends overwolf.packages.OverwolfPackageManager {
|
|
|
96
96
|
recorder: IOverwolfRecordingApi;
|
|
97
97
|
overlay: IOverwolfOverlayApi;
|
|
98
98
|
utility: IOverwolfUtilityApi;
|
|
99
|
+
crn: IOverwolfCRNApi;
|
|
99
100
|
}
|
|
100
101
|
|
|
101
102
|
/**
|
|
@@ -169,8 +170,38 @@ interface IOverlayHotkey {
|
|
|
169
170
|
passthrough?: boolean;
|
|
170
171
|
}
|
|
171
172
|
|
|
173
|
+
/**
|
|
174
|
+
* options for the `GameLaunchEvent`.
|
|
175
|
+
* ability to override some game settings in runtime.
|
|
176
|
+
*
|
|
177
|
+
* @see GameLaunchEvent
|
|
178
|
+
* @since 1.8.0
|
|
179
|
+
*/
|
|
180
|
+
export interface GameLaunchEventOptions {
|
|
181
|
+
/**
|
|
182
|
+
* Force OOPO mode (when oopo is false in game list).
|
|
183
|
+
* @default false
|
|
184
|
+
*/
|
|
185
|
+
forceOOPO?: boolean;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Force OOPO mouse Mixed mode control.
|
|
189
|
+
* @default false
|
|
190
|
+
*/
|
|
191
|
+
forceOOPOMixedMode?: boolean;
|
|
192
|
+
}
|
|
193
|
+
|
|
172
194
|
interface GameLaunchEvent {
|
|
173
|
-
|
|
195
|
+
/**
|
|
196
|
+
* Inject the overlay into the game.
|
|
197
|
+
* @param options - options for the `GameLaunchEvent` since 1.8.0.
|
|
198
|
+
*/
|
|
199
|
+
inject: (options?: GameLaunchEventOptions) => void;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Dismiss the overlay.
|
|
203
|
+
*/
|
|
204
|
+
dismiss: () => void;
|
|
174
205
|
}
|
|
175
206
|
|
|
176
207
|
/**
|
|
@@ -783,6 +814,13 @@ interface AudioDeviceSettingsInfo extends AudioDeviceSettings {
|
|
|
783
814
|
readonly name: string;
|
|
784
815
|
}
|
|
785
816
|
|
|
817
|
+
export interface AudioDeviceSettingsUpdateInfo extends AudioDeviceSettings {
|
|
818
|
+
/**
|
|
819
|
+
* Audio device unique name or Process name for application
|
|
820
|
+
*/
|
|
821
|
+
readonly name: string;
|
|
822
|
+
}
|
|
823
|
+
|
|
786
824
|
interface ApplicationAudioDeviceSettingsInfo
|
|
787
825
|
extends AudioDeviceSettingsInfo {
|
|
788
826
|
readonly type: 'output';
|
|
@@ -1608,6 +1646,21 @@ interface IOverwolfRecordingApi {
|
|
|
1608
1646
|
*/
|
|
1609
1647
|
options: RecordingAppOptions;
|
|
1610
1648
|
|
|
1649
|
+
/**
|
|
1650
|
+
* Overlay package version
|
|
1651
|
+
*/
|
|
1652
|
+
readonly version: string;
|
|
1653
|
+
|
|
1654
|
+
/**
|
|
1655
|
+
* Path to ffmpeg executable
|
|
1656
|
+
*/
|
|
1657
|
+
readonly ffmpegPath: string;
|
|
1658
|
+
|
|
1659
|
+
/**
|
|
1660
|
+
* Path to bin folder
|
|
1661
|
+
*/
|
|
1662
|
+
readonly binFolderPath: string;
|
|
1663
|
+
|
|
1611
1664
|
/**
|
|
1612
1665
|
* Is recording or replays active
|
|
1613
1666
|
*/
|
|
@@ -1741,6 +1794,17 @@ interface IOverwolfRecordingApi {
|
|
|
1741
1794
|
*/
|
|
1742
1795
|
registerGames(filter: GamesFilter);
|
|
1743
1796
|
|
|
1797
|
+
/**
|
|
1798
|
+
* Update audio device settings while recording
|
|
1799
|
+
* (for example, volume, mute, etc.) by device name.
|
|
1800
|
+
*
|
|
1801
|
+
* @param device
|
|
1802
|
+
* @since 0.32.0
|
|
1803
|
+
*/
|
|
1804
|
+
updateAudioDevice(
|
|
1805
|
+
device: AudioDeviceSettingsUpdateInfo
|
|
1806
|
+
): Promise<void>;
|
|
1807
|
+
|
|
1744
1808
|
/**
|
|
1745
1809
|
* Fired when registered game is detected
|
|
1746
1810
|
*/
|
|
@@ -1788,3 +1852,98 @@ interface IOverwolfRecordingApi {
|
|
|
1788
1852
|
*/
|
|
1789
1853
|
on(eventName: 'stats', listener: (args: RecorderStats) => void): this;
|
|
1790
1854
|
}
|
|
1855
|
+
|
|
1856
|
+
// -----------------------------------------------------------------------------
|
|
1857
|
+
// Overwolf CRN API
|
|
1858
|
+
|
|
1859
|
+
export interface ICRNEvent {
|
|
1860
|
+
abort: () => void;
|
|
1861
|
+
}
|
|
1862
|
+
|
|
1863
|
+
/**
|
|
1864
|
+
* All supported notification actions.
|
|
1865
|
+
*/
|
|
1866
|
+
export type CRNActionType =
|
|
1867
|
+
/**
|
|
1868
|
+
* User clicked on the `X` button to dismiss the notification.
|
|
1869
|
+
*/
|
|
1870
|
+
| 'Dismissed'
|
|
1871
|
+
/**
|
|
1872
|
+
* Notification closed due to launching another game while the notification is displayed.
|
|
1873
|
+
*/
|
|
1874
|
+
| 'IgnoredByLaunchingGame'
|
|
1875
|
+
/**
|
|
1876
|
+
* Notification automatically closed after no user action was registered.
|
|
1877
|
+
*/
|
|
1878
|
+
| 'Timeout'
|
|
1879
|
+
/**
|
|
1880
|
+
* User clicked on `Turn off notifications` from the cogwheel icon.
|
|
1881
|
+
*/
|
|
1882
|
+
| 'TurnOffNotificationsRequested'
|
|
1883
|
+
/**
|
|
1884
|
+
* User clicked on a notification that opens an external URL (e.g., newsletter site).
|
|
1885
|
+
*/
|
|
1886
|
+
| 'OpenExternalUrl'
|
|
1887
|
+
/**
|
|
1888
|
+
* User clicked on a notification that downloads an external app.
|
|
1889
|
+
*/
|
|
1890
|
+
| 'DownloadExternalApp'
|
|
1891
|
+
/**
|
|
1892
|
+
* User clicked on the `Cancel` button while the external app was downloading.
|
|
1893
|
+
*/
|
|
1894
|
+
| 'CancelDownloadExternalApp'
|
|
1895
|
+
/**
|
|
1896
|
+
* User clicked on the `X` button while the external app was downloading.
|
|
1897
|
+
*/
|
|
1898
|
+
| 'CloseClickedWhileDownloadingExternalApp'
|
|
1899
|
+
/**
|
|
1900
|
+
* Developer programmatically closed the notification using the `closeNotificationWindow()` method.
|
|
1901
|
+
*/
|
|
1902
|
+
| 'ForceClosed';
|
|
1903
|
+
|
|
1904
|
+
export interface IOverwolfCRNApi {
|
|
1905
|
+
/**
|
|
1906
|
+
* returns Notification visible status.
|
|
1907
|
+
* true if the notification is currently visible, false if not.
|
|
1908
|
+
*/
|
|
1909
|
+
isNotificationVisible(): Promise<boolean>;
|
|
1910
|
+
|
|
1911
|
+
/**
|
|
1912
|
+
* returns Notification settings status:
|
|
1913
|
+
* true if notifications are allowed, false if not.
|
|
1914
|
+
*/
|
|
1915
|
+
getNotificationStatus(): Promise<boolean>;
|
|
1916
|
+
|
|
1917
|
+
/**
|
|
1918
|
+
* Closes the notification.
|
|
1919
|
+
*/
|
|
1920
|
+
closeNotificationWindow(): void;
|
|
1921
|
+
|
|
1922
|
+
/**
|
|
1923
|
+
* Enables or disables notifications.
|
|
1924
|
+
* @param enable - true to enable notifications, false to disable.
|
|
1925
|
+
*/
|
|
1926
|
+
allowNotifications(enable: boolean): void;
|
|
1927
|
+
|
|
1928
|
+
/**
|
|
1929
|
+
* Fired before a notification is shown.
|
|
1930
|
+
* @param eventName
|
|
1931
|
+
* @param listener
|
|
1932
|
+
*/
|
|
1933
|
+
on(
|
|
1934
|
+
eventName: 'before-notification',
|
|
1935
|
+
listener: (event: ICRNEvent, args: any) => void
|
|
1936
|
+
): this;
|
|
1937
|
+
|
|
1938
|
+
/**
|
|
1939
|
+
* Fired when a notification action is triggered.
|
|
1940
|
+
* @param eventName
|
|
1941
|
+
* @param listener
|
|
1942
|
+
*/
|
|
1943
|
+
on(
|
|
1944
|
+
eventName: 'notification-action',
|
|
1945
|
+
listener: (event: CRNActionType) => void
|
|
1946
|
+
): this;
|
|
1947
|
+
}
|
|
1948
|
+
|
|
1949
|
+
// -----------------------------------------------------------------------------
|