@overwolf/ow-electron-packages-types 1.1.12-beta.3 → 1.1.12-beta.5
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 +3 -2
- package/types.d.ts +61 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@overwolf/ow-electron-packages-types",
|
|
3
|
-
"version": "1.1.12-beta.
|
|
3
|
+
"version": "1.1.12-beta.5",
|
|
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",
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
"scripts": {
|
|
35
35
|
"combine": "node combine-dts.js ./modules",
|
|
36
36
|
"beta": "node beta.js",
|
|
37
|
-
"release": "node release.js"
|
|
37
|
+
"release": "node release.js",
|
|
38
|
+
"prepare": "git config core.hooksPath .githooks || true"
|
|
38
39
|
},
|
|
39
40
|
"dependencies": {
|
|
40
41
|
"glob": "^13.0.0"
|
package/types.d.ts
CHANGED
|
@@ -101,6 +101,46 @@ interface ElevatedInjectionCapability {
|
|
|
101
101
|
readonly brokerInstalled: boolean;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
/**
|
|
105
|
+
* The value a failed elevation call rejects with: `installHighElevationHelper()`,
|
|
106
|
+
* `isHighElevationHelperInstalled()`, `canInjectElevated()`,
|
|
107
|
+
* `installElevationBroker()` and `uninstallElevationBroker()`.
|
|
108
|
+
*
|
|
109
|
+
* It is a plain object, not an `Error` instance: `err instanceof Error` is
|
|
110
|
+
* `false`, and there is no stack trace.
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* ```ts
|
|
114
|
+
* try {
|
|
115
|
+
* await api.installElevationBroker();
|
|
116
|
+
* } catch (err) {
|
|
117
|
+
* const { message, exitCode } = err as UtilityApiError;
|
|
118
|
+
* if (exitCode === 1223) {
|
|
119
|
+
* console.warn('User cancelled UAC prompt');
|
|
120
|
+
* } else {
|
|
121
|
+
* console.error('Broker install failed:', message, exitCode);
|
|
122
|
+
* }
|
|
123
|
+
* }
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
126
|
+
interface UtilityApiError {
|
|
127
|
+
/**
|
|
128
|
+
* Describes the failure.
|
|
129
|
+
*/
|
|
130
|
+
readonly message: string;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Exit code of the elevated installer process. Only set by the calls that
|
|
134
|
+
* prompt for UAC (`installHighElevationHelper()`,
|
|
135
|
+
* `installElevationBroker()` and `uninstallElevationBroker()`), and only
|
|
136
|
+
* when the installer actually ran - it is absent when the call failed
|
|
137
|
+
* before that, e.g. a missing helper binary.
|
|
138
|
+
*
|
|
139
|
+
* `1223` (ERROR_CANCELLED) means the user cancelled the UAC prompt.
|
|
140
|
+
*/
|
|
141
|
+
readonly exitCode?: number;
|
|
142
|
+
}
|
|
143
|
+
|
|
104
144
|
/**
|
|
105
145
|
* Defines the API for managing game launch and utility operations.
|
|
106
146
|
*/
|
|
@@ -132,9 +172,9 @@ interface IOverwolfUtilityApi {
|
|
|
132
172
|
* Allows injection into high elevation games.
|
|
133
173
|
* No-ops if files are already present.
|
|
134
174
|
*
|
|
135
|
-
* @throws
|
|
136
|
-
* @throws
|
|
137
|
-
* @throws `
|
|
175
|
+
* @throws {@link UtilityApiError} `exitCode 1223` — user cancelled the UAC prompt (ERROR_CANCELLED)
|
|
176
|
+
* @throws {@link UtilityApiError} any other `exitCode` — the installer process failed. Log `err.exitCode` and investigate.
|
|
177
|
+
* @throws {@link UtilityApiError} no `exitCode` — the call failed before the installer ran. Log `err.message`.
|
|
138
178
|
*
|
|
139
179
|
* @remarks
|
|
140
180
|
* The helper binaries are installed to:
|
|
@@ -150,12 +190,13 @@ interface IOverwolfUtilityApi {
|
|
|
150
190
|
* try {
|
|
151
191
|
* await api.installHighElevationHelper();
|
|
152
192
|
* console.log('Helper installed successfully');
|
|
153
|
-
* } catch (err
|
|
154
|
-
*
|
|
193
|
+
* } catch (err) {
|
|
194
|
+
* const { message, exitCode } = err as UtilityApiError;
|
|
195
|
+
* if (exitCode === 1223) {
|
|
155
196
|
* // User cancelled the UAC prompt — not an error, just inform the user
|
|
156
197
|
* console.warn('User cancelled UAC prompt');
|
|
157
198
|
* } else {
|
|
158
|
-
* console.error('Installation failed
|
|
199
|
+
* console.error('Installation failed:', message, exitCode);
|
|
159
200
|
* }
|
|
160
201
|
* }
|
|
161
202
|
* ```
|
|
@@ -179,6 +220,7 @@ interface IOverwolfUtilityApi {
|
|
|
179
220
|
* `%CommonProgramFiles%\<app-name>\`.
|
|
180
221
|
*
|
|
181
222
|
* @returns `true` if the helper is installed and ready.
|
|
223
|
+
* @throws {@link UtilityApiError}
|
|
182
224
|
*
|
|
183
225
|
* @remarks
|
|
184
226
|
* This only reports whether the binaries are present. On a standard
|
|
@@ -202,6 +244,7 @@ interface IOverwolfUtilityApi {
|
|
|
202
244
|
*
|
|
203
245
|
* @returns An {@link ElevatedInjectionCapability} describing what's
|
|
204
246
|
* missing when elevated injection isn't currently possible.
|
|
247
|
+
* @throws {@link UtilityApiError}
|
|
205
248
|
*
|
|
206
249
|
* @remarks
|
|
207
250
|
* `supported` is `false` with reason `'account-cannot-elevate'` on a
|
|
@@ -227,8 +270,9 @@ interface IOverwolfUtilityApi {
|
|
|
227
270
|
* integrity, which is the only way an app running under a standard user
|
|
228
271
|
* account can overlay an elevated game. Prompts for UAC once.
|
|
229
272
|
*
|
|
230
|
-
* @throws
|
|
231
|
-
* @throws
|
|
273
|
+
* @throws {@link UtilityApiError} `exitCode 1223` — user cancelled the UAC prompt (ERROR_CANCELLED)
|
|
274
|
+
* @throws {@link UtilityApiError} any other `exitCode` — installation failed
|
|
275
|
+
* @throws {@link UtilityApiError} no `exitCode` — the call failed before the installer ran
|
|
232
276
|
*
|
|
233
277
|
* @remarks
|
|
234
278
|
* The service stays registered until `uninstallElevationBroker()` removes
|
|
@@ -242,6 +286,10 @@ interface IOverwolfUtilityApi {
|
|
|
242
286
|
* Stops and removes the elevation broker service. Prompts for UAC once.
|
|
243
287
|
* Succeeds when the service is already absent.
|
|
244
288
|
*
|
|
289
|
+
* @throws {@link UtilityApiError} `exitCode 1223` — user cancelled the UAC prompt (ERROR_CANCELLED)
|
|
290
|
+
* @throws {@link UtilityApiError} any other `exitCode` — removal failed
|
|
291
|
+
* @throws {@link UtilityApiError} no `exitCode` — the call failed before the uninstaller ran
|
|
292
|
+
*
|
|
245
293
|
* @returns Resolves when removal completes.
|
|
246
294
|
*/
|
|
247
295
|
uninstallElevationBroker?(): Promise<void>;
|
|
@@ -3689,7 +3737,11 @@ interface EncoderSettingsAMF extends VideoEncoderSettingsBase {
|
|
|
3689
3737
|
*
|
|
3690
3738
|
* B-frames improve compression efficiency but may add encoding latency.
|
|
3691
3739
|
*
|
|
3692
|
-
*
|
|
3740
|
+
* Applies to H.264 and AV1; ignored for HEVC. AV1 B-frames need a GPU that
|
|
3741
|
+
* supports them, such as the Radeon RX 9000 series; on other GPUs the
|
|
3742
|
+
* encoder logs a warning and encodes without B-frames.
|
|
3743
|
+
*
|
|
3744
|
+
* @default 3 (`2` for AV1)
|
|
3693
3745
|
*/
|
|
3694
3746
|
bf?: number;
|
|
3695
3747
|
}
|