@overwolf/ow-electron 44.11.3-beta.0 → 44.11.3-beta.2
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/checksums.json +8 -8
- package/ow-electron-types.d.ts +217 -36
- package/package.json +2 -2
package/checksums.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"electron-api.json": "
|
|
3
|
-
"electron.d.ts": "
|
|
4
|
-
"ow-electron-v44.11.3-beta.
|
|
5
|
-
"ow-electron-v44.11.3-beta.
|
|
6
|
-
"ow-electron-v44.11.3-beta.
|
|
7
|
-
"ow-electron-v44.11.3-beta.
|
|
8
|
-
"ow-electron-v44.11.3-beta.
|
|
9
|
-
"ow-electron-v44.11.3-beta.
|
|
2
|
+
"electron-api.json": "35702b1636123d09ef492e27f8cfca34d0531959c57c864265fffca194dc115e",
|
|
3
|
+
"electron.d.ts": "a3cddd177f68dd9f8b878499a26fa6b10783657fea3e56c27efc17774c5a84ac",
|
|
4
|
+
"ow-electron-v44.11.3-beta.2-darwin-arm64.zip": "98878e5454d073ef1f71f42952f5e7ed6edc55a7c789601874bb1ac94dd2b734",
|
|
5
|
+
"ow-electron-v44.11.3-beta.2-darwin-x64.zip": "1714eae34e580f30687420fdc19d41b10818f28fea16a160485515f0abbdba48",
|
|
6
|
+
"ow-electron-v44.11.3-beta.2-linux-arm64.zip": "0a117813555907e511793160a80fd92c6677d7d869fba31823f5e765e6074fac",
|
|
7
|
+
"ow-electron-v44.11.3-beta.2-linux-x64.zip": "c9e0ef0df5c3a0e53a420b2fccec89bf7aa2a9052b080ade28237d5a7ad05397",
|
|
8
|
+
"ow-electron-v44.11.3-beta.2-win32-arm64.zip": "e69fdf4945acc84e1f2e6d031860c03f7494e644cf8e40cdc402da6ece69eef2",
|
|
9
|
+
"ow-electron-v44.11.3-beta.2-win32-x64.zip": "493bd721d1f6f6fa4db2c38d9688c74c8b67a5c84bc9d17efa8a2f2d8fffbe9e"
|
|
10
10
|
}
|
package/ow-electron-types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Shared Overwolf type declarations for ow-electron 44.11.3
|
|
1
|
+
// Shared Overwolf type declarations for ow-electron 44.11.3-beta.1
|
|
2
2
|
//
|
|
3
3
|
// This file *augments* the existing `electron` types instead of bundling a copy
|
|
4
4
|
// of them. It only adds members to the global `Electron` namespace and to the
|
|
@@ -66,9 +66,86 @@ declare global {
|
|
|
66
66
|
*/
|
|
67
67
|
isCMPRequired(): Promise<boolean>;
|
|
68
68
|
|
|
69
|
+
/**
|
|
70
|
+
* Returns true if the app should show the CMP first layer.
|
|
71
|
+
*
|
|
72
|
+
* True when the CMP is required (see isCMPRequired) and the user has not
|
|
73
|
+
* answered it - not in the installer (e.g. an install without it)
|
|
74
|
+
* and not in the app (the first layer or the CMP
|
|
75
|
+
* window). The default consent ow-electron stores on startup does not
|
|
76
|
+
* count as an answer. Once the user answers, it returns false.
|
|
77
|
+
*
|
|
78
|
+
* Note that this is an async function and should be called with await.
|
|
79
|
+
* It rejects when the CMP is required and the user's stored consent can't
|
|
80
|
+
* be read - so wrap the call in try/catch:
|
|
81
|
+
*
|
|
82
|
+
* ```ts
|
|
83
|
+
* try {
|
|
84
|
+
* if (await app.overwolf.shouldShowCMPFirstLayer()) {
|
|
85
|
+
* await app.overwolf.openCMPFirstLayerWindow({ parent: mainWindow });
|
|
86
|
+
* }
|
|
87
|
+
* } catch (err) {
|
|
88
|
+
* // the stored consent could not be read
|
|
89
|
+
* }
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
shouldShowCMPFirstLayer(): Promise<boolean>;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Opens the CMP first layer - "We value your privacy" with "Manage" and
|
|
96
|
+
* "Accept All Purposes" - should be called when shouldShowCMPFirstLayer
|
|
97
|
+
* returns true.
|
|
98
|
+
*
|
|
99
|
+
* With a `parent`, it covers the parent's content area with a dimmed
|
|
100
|
+
* backdrop and follows the parent when it moves or resizes. Dragging
|
|
101
|
+
* the backdrop moves the parent (Windows). A parent smaller than the
|
|
102
|
+
* dialog grows to fit it; when it can't (its maximum size, a small
|
|
103
|
+
* screen, or it is maximized), the first layer opens as a dialog sized
|
|
104
|
+
* modal window over the parent instead (on macOS the parent stays
|
|
105
|
+
* enabled, the dialog stays above it). On Linux the first layer is
|
|
106
|
+
* always a dialog sized modal window over the parent - a window can't
|
|
107
|
+
* be placed over another under Wayland.
|
|
108
|
+
*
|
|
109
|
+
* - "Accept All Purposes" stores the consent and closes the first layer.
|
|
110
|
+
* - "Manage" closes the first layer and opens the CMP window (see
|
|
111
|
+
* openCMPWindow), modal over the parent.
|
|
112
|
+
*
|
|
113
|
+
* The window shows only once the page has rendered its dialog.
|
|
114
|
+
*
|
|
115
|
+
* Resolves once the user is done: after "Accept All Purposes", or after
|
|
116
|
+
* "Manage" once the CMP window closes. It also resolves when the parent
|
|
117
|
+
* closes first. Calling it again while it is pending focuses the open
|
|
118
|
+
* window and returns the same promise. Rejects when no page loads - a
|
|
119
|
+
* network error, an http error (e.g. 404), or the page did not render
|
|
120
|
+
* within 30 seconds, for the page and the default one - so wrap the
|
|
121
|
+
* call in try/catch:
|
|
122
|
+
*
|
|
123
|
+
* ```ts
|
|
124
|
+
* try {
|
|
125
|
+
* if (await app.overwolf.shouldShowCMPFirstLayer()) {
|
|
126
|
+
* await app.overwolf.openCMPFirstLayerWindow({ parent: mainWindow });
|
|
127
|
+
* }
|
|
128
|
+
* } catch (err) {
|
|
129
|
+
* // the stored consent could not be read, or the first layer was not shown
|
|
130
|
+
* }
|
|
131
|
+
* ```
|
|
132
|
+
*/
|
|
133
|
+
openCMPFirstLayerWindow(options?: CMPFirstLayerWindowOptions): Promise<void>;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Rejects all consent for the user. Use it when the user asks to reject
|
|
137
|
+
* consent outside the CMP UI, for example by email.
|
|
138
|
+
* Resolves once the consent page has loaded and the consent has been rejected. Rejects when no page loads
|
|
139
|
+
*/
|
|
140
|
+
rejectAllConsent(): Promise<void>;
|
|
141
|
+
|
|
69
142
|
/**
|
|
70
143
|
* Opens the CMP configuration window - should only be called when
|
|
71
144
|
* isCMPRequired returns true.
|
|
145
|
+
*
|
|
146
|
+
* Resolves once the window has opened, not when it closes. When its page
|
|
147
|
+
* fails to load (a network error, an http error, or not loaded within 30
|
|
148
|
+
* seconds), the window closes by itself.
|
|
72
149
|
*/
|
|
73
150
|
openCMPWindow(options?: CMPWindowOptions): Promise<void>;
|
|
74
151
|
|
|
@@ -107,16 +184,39 @@ declare global {
|
|
|
107
184
|
*/
|
|
108
185
|
setExternalPaymentUserId(options: ExternalPaymentUserIdOptions): Promise<void>;
|
|
109
186
|
|
|
187
|
+
/**
|
|
188
|
+
* Reads a raw value out of the Overwolf storage by key.
|
|
189
|
+
*
|
|
190
|
+
* This is an escape hatch for values ow-electron starts storing before it
|
|
191
|
+
* exposes a dedicated property for them - prefer the typed properties
|
|
192
|
+
* (e.g. `utmParams`, `silentInstall`) where one exists.
|
|
193
|
+
*
|
|
194
|
+
* Returns `undefined` when the key was never written. Throws if `key` is
|
|
195
|
+
* empty, or if called before `app.ready`.
|
|
196
|
+
*
|
|
197
|
+
* Object values are returned as a copy - changing the returned object
|
|
198
|
+
* does not change what ow-electron has stored.
|
|
199
|
+
*/
|
|
200
|
+
getStorageValue(key: string): any;
|
|
201
|
+
|
|
110
202
|
/**
|
|
111
203
|
* Client persistence phasing percent
|
|
112
204
|
*/
|
|
113
205
|
readonly phasePercent: number;
|
|
114
206
|
|
|
115
207
|
/**
|
|
116
|
-
* Overwolf installer provided UTM params
|
|
208
|
+
* Overwolf installer provided UTM params.
|
|
209
|
+
*
|
|
210
|
+
* Returned as a copy - changing the returned object does not change what
|
|
211
|
+
* ow-electron has stored.
|
|
117
212
|
*/
|
|
118
213
|
readonly utmParams: any;
|
|
119
214
|
|
|
215
|
+
/**
|
|
216
|
+
* Whether the app was installed silently by the Overwolf installer.
|
|
217
|
+
*/
|
|
218
|
+
readonly silentInstall: boolean;
|
|
219
|
+
|
|
120
220
|
/**
|
|
121
221
|
* A unique identifier for the user machine.
|
|
122
222
|
*/
|
|
@@ -128,35 +228,97 @@ declare global {
|
|
|
128
228
|
readonly uid: string;
|
|
129
229
|
}
|
|
130
230
|
|
|
131
|
-
|
|
231
|
+
/**
|
|
232
|
+
* What the CMP window (openCMPWindow) and the CMP first layer
|
|
233
|
+
* (openCMPFirstLayerWindow) share: the parent window and the page's
|
|
234
|
+
* language, colors and font. A color or font left out keeps the page's
|
|
235
|
+
* own.
|
|
236
|
+
*/
|
|
237
|
+
interface CMPBaseWindowOptions {
|
|
132
238
|
/**
|
|
133
|
-
*
|
|
239
|
+
* The parent window. The CMP window opens centered over it; the first
|
|
240
|
+
* layer covers its content area (see openCMPFirstLayerWindow). Without
|
|
241
|
+
* it, both open over the focused window.
|
|
134
242
|
*/
|
|
135
|
-
|
|
243
|
+
parent?: BrowserWindow;
|
|
136
244
|
|
|
137
245
|
/**
|
|
138
|
-
* Whether
|
|
139
|
-
*
|
|
246
|
+
* Whether the window is modal to its parent. This only works with a
|
|
247
|
+
* `parent`. Default is `false`.
|
|
140
248
|
*/
|
|
141
249
|
modal?: boolean;
|
|
142
250
|
|
|
143
251
|
/**
|
|
144
|
-
*
|
|
252
|
+
* The page language, e.g. 'de' or 'zh-tw'. Falls back to 'en' for a
|
|
253
|
+
* language the page doesn't have. Default is 'en'.
|
|
145
254
|
*/
|
|
146
|
-
|
|
255
|
+
language?: string;
|
|
147
256
|
|
|
148
257
|
/**
|
|
149
|
-
*
|
|
258
|
+
* The background color: the CMP window's (its preloader and the page)
|
|
259
|
+
* or the first layer dialog's. Default is '#0D0D0D'.
|
|
150
260
|
*/
|
|
151
|
-
|
|
261
|
+
backgroundColor?: string;
|
|
152
262
|
|
|
153
263
|
/**
|
|
154
|
-
*
|
|
264
|
+
* The text color. Default is the page's grays.
|
|
155
265
|
*/
|
|
156
|
-
|
|
266
|
+
textColor?: string;
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* The titles, links (and the first layer's app name, the CMP window's
|
|
270
|
+
* "Reject All Purposes") color. Default is `textColor` when it is set,
|
|
271
|
+
* the page's otherwise.
|
|
272
|
+
*/
|
|
273
|
+
titleColor?: string;
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* The "Accept All Purposes" button color, e.g. '#3b96be'. In the CMP
|
|
277
|
+
* window also the consent switches, the active tab underline and the
|
|
278
|
+
* preloader spinner (unless `preLoaderSpinnerColor` is set).
|
|
279
|
+
*/
|
|
280
|
+
buttonColor?: string;
|
|
157
281
|
|
|
158
282
|
/**
|
|
159
|
-
*
|
|
283
|
+
* The "Accept All Purposes" button (and consent switch) hover color.
|
|
284
|
+
* Default is a brighter `buttonColor`.
|
|
285
|
+
*/
|
|
286
|
+
buttonHoverColor?: string;
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* The "Accept All Purposes" button text color. Default is '#ffffff'.
|
|
290
|
+
*/
|
|
291
|
+
buttonTextColor?: string;
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* The font-family list for the page, e.g. 'Roboto, "Segoe UI", sans-serif'
|
|
295
|
+
* - an installed font, or one `fontUrl` loads. Letters, digits, spaces,
|
|
296
|
+
* quotes, commas, dots and dashes only. Default is the page's font.
|
|
297
|
+
*/
|
|
298
|
+
fontFamily?: string;
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* A Google Fonts css url that loads `fontFamily`, e.g.
|
|
302
|
+
* 'https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap'.
|
|
303
|
+
* Urls on other hosts are ignored.
|
|
304
|
+
*/
|
|
305
|
+
fontUrl?: string;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
interface CMPWindowOptions extends CMPBaseWindowOptions {
|
|
309
|
+
/**
|
|
310
|
+
* Select open tab. The default is 'purposes'
|
|
311
|
+
*/
|
|
312
|
+
tab?: 'purposes' | 'features' | 'vendors';
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Show window in the center of the screen. Default is `true`.
|
|
316
|
+
*/
|
|
317
|
+
center?: boolean;
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Control the CMP preloader color (spinner). Default is `buttonColor`
|
|
321
|
+
* when it is set, '#D34037' otherwise.
|
|
160
322
|
*/
|
|
161
323
|
preLoaderSpinnerColor?: string;
|
|
162
324
|
|
|
@@ -184,11 +346,30 @@ declare global {
|
|
|
184
346
|
* Overrides the path of the cmp html
|
|
185
347
|
*/
|
|
186
348
|
cmpURL?: string;
|
|
349
|
+
}
|
|
187
350
|
|
|
351
|
+
interface CMPFirstLayerWindowOptions extends CMPBaseWindowOptions {
|
|
188
352
|
/**
|
|
189
|
-
*
|
|
353
|
+
* The product name shown in the text. Default is `app.getName()`.
|
|
190
354
|
*/
|
|
191
|
-
|
|
355
|
+
appName?: string;
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Whether to dim the parent's content behind the dialog. Default is
|
|
359
|
+
* `true` with a parent, `false` without one.
|
|
360
|
+
*/
|
|
361
|
+
backdrop?: boolean;
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* The preloader spinner color of the CMP window "Manage" opens.
|
|
365
|
+
* Default is `buttonColor` when it is set, '#D34037' otherwise.
|
|
366
|
+
*/
|
|
367
|
+
preLoaderSpinnerColor?: string;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Overrides the first layer page url.
|
|
371
|
+
*/
|
|
372
|
+
cmpFirstLayerURL?: string;
|
|
192
373
|
}
|
|
193
374
|
|
|
194
375
|
interface EmailHashes {
|
|
@@ -197,32 +378,32 @@ declare global {
|
|
|
197
378
|
readonly md5?: string;
|
|
198
379
|
}
|
|
199
380
|
|
|
200
|
-
/**
|
|
201
|
-
* A enum of the external payment providers we know about.
|
|
202
|
-
*/
|
|
203
|
-
type ExternalPaymentProvider = 'tebex' | string;
|
|
204
|
-
|
|
205
|
-
interface ExternalPaymentUserIdOptions {
|
|
206
381
|
/**
|
|
207
|
-
*
|
|
382
|
+
* A enum of the external payment providers we know about.
|
|
208
383
|
*/
|
|
209
|
-
|
|
384
|
+
type ExternalPaymentProvider = 'tebex' | string;
|
|
210
385
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
386
|
+
interface ExternalPaymentUserIdOptions {
|
|
387
|
+
/**
|
|
388
|
+
* The name of the external payment provider.
|
|
389
|
+
*/
|
|
390
|
+
providerName: ExternalPaymentProvider;
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* The user id your app passes to the external payment provider.
|
|
394
|
+
*/
|
|
395
|
+
userId: string;
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* Optional. The provider's recurring payment (subscription) agreement id.
|
|
399
|
+
*/
|
|
400
|
+
paymentId?: string;
|
|
401
|
+
}
|
|
215
402
|
|
|
216
403
|
/**
|
|
217
|
-
*
|
|
404
|
+
* A utility type for registering to `error` events, that includes the `errorMonitor` type
|
|
218
405
|
*/
|
|
219
|
-
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* A utility type for registering to `error` events, that includes the `errorMonitor` type
|
|
224
|
-
*/
|
|
225
|
-
type error = 'error' | typeof errorMonitor;
|
|
406
|
+
type error = 'error' | typeof errorMonitor;
|
|
226
407
|
|
|
227
408
|
/**
|
|
228
409
|
* Namespace containing everything related to Overwolf Packages
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@overwolf/ow-electron",
|
|
3
|
-
"version": "44.11.3-beta.
|
|
4
|
-
"owElectronVersion": "44.11.3-beta.
|
|
3
|
+
"version": "44.11.3-beta.2",
|
|
4
|
+
"owElectronVersion": "44.11.3-beta.2",
|
|
5
5
|
"electronVersion": "44.11.3",
|
|
6
6
|
"repository": "https://github.com/electron/electron",
|
|
7
7
|
"description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
|