@overwolf/ow-electron 44.11.3-beta.0 → 44.11.3-beta.1
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 +204 -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.1-darwin-arm64.zip": "22b89f083839b76ba6a36fabc108be461d7ce168431f2e5fc32fcc20b039892b",
|
|
5
|
+
"ow-electron-v44.11.3-beta.1-darwin-x64.zip": "83d4a1260e6d1eef4dae2c5c5c1cce582f3d5099dc7c79519bbe3fb1e85aecff",
|
|
6
|
+
"ow-electron-v44.11.3-beta.1-linux-arm64.zip": "e466ca17d35193fc7076f678d8d86f027f58a6af63f1ad1ddc895b0c8790177f",
|
|
7
|
+
"ow-electron-v44.11.3-beta.1-linux-x64.zip": "8c1096352b31d841cf3596a05ab5a22de7e0abb6b30dd0cb32731b924c43b811",
|
|
8
|
+
"ow-electron-v44.11.3-beta.1-win32-arm64.zip": "e69fdf4945acc84e1f2e6d031860c03f7494e644cf8e40cdc402da6ece69eef2",
|
|
9
|
+
"ow-electron-v44.11.3-beta.1-win32-x64.zip": "d2c06bd9155558e659b10c0a63603c5db49a91e64bf00ce581d3c025eeb29480"
|
|
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,6 +66,76 @@ 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 when the first layer closes. Rejects when no page loads - a
|
|
116
|
+
* network error, an http error (e.g. 404), or the page did not render
|
|
117
|
+
* within 30 seconds, for the page and the default one - so wrap the
|
|
118
|
+
* call in try/catch:
|
|
119
|
+
*
|
|
120
|
+
* ```ts
|
|
121
|
+
* try {
|
|
122
|
+
* if (await app.overwolf.shouldShowCMPFirstLayer()) {
|
|
123
|
+
* await app.overwolf.openCMPFirstLayerWindow({ parent: mainWindow });
|
|
124
|
+
* }
|
|
125
|
+
* } catch (err) {
|
|
126
|
+
* // the stored consent could not be read, or the first layer was not shown
|
|
127
|
+
* }
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
openCMPFirstLayerWindow(options?: CMPFirstLayerWindowOptions): Promise<void>;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Rejects all consent for the user. Use it when the user asks to reject
|
|
134
|
+
* consent outside the CMP UI, for example by email.
|
|
135
|
+
* Resolves once the consent page has loaded and the consent has been rejected. Rejects when no page loads
|
|
136
|
+
*/
|
|
137
|
+
rejectAllConsent(): Promise<void>;
|
|
138
|
+
|
|
69
139
|
/**
|
|
70
140
|
* Opens the CMP configuration window - should only be called when
|
|
71
141
|
* isCMPRequired returns true.
|
|
@@ -107,16 +177,39 @@ declare global {
|
|
|
107
177
|
*/
|
|
108
178
|
setExternalPaymentUserId(options: ExternalPaymentUserIdOptions): Promise<void>;
|
|
109
179
|
|
|
180
|
+
/**
|
|
181
|
+
* Reads a raw value out of the Overwolf storage by key.
|
|
182
|
+
*
|
|
183
|
+
* This is an escape hatch for values ow-electron starts storing before it
|
|
184
|
+
* exposes a dedicated property for them - prefer the typed properties
|
|
185
|
+
* (e.g. `utmParams`, `silentInstall`) where one exists.
|
|
186
|
+
*
|
|
187
|
+
* Returns `undefined` when the key was never written. Throws if `key` is
|
|
188
|
+
* empty, or if called before `app.ready`.
|
|
189
|
+
*
|
|
190
|
+
* Object values are returned as a copy - changing the returned object
|
|
191
|
+
* does not change what ow-electron has stored.
|
|
192
|
+
*/
|
|
193
|
+
getStorageValue(key: string): any;
|
|
194
|
+
|
|
110
195
|
/**
|
|
111
196
|
* Client persistence phasing percent
|
|
112
197
|
*/
|
|
113
198
|
readonly phasePercent: number;
|
|
114
199
|
|
|
115
200
|
/**
|
|
116
|
-
* Overwolf installer provided UTM params
|
|
201
|
+
* Overwolf installer provided UTM params.
|
|
202
|
+
*
|
|
203
|
+
* Returned as a copy - changing the returned object does not change what
|
|
204
|
+
* ow-electron has stored.
|
|
117
205
|
*/
|
|
118
206
|
readonly utmParams: any;
|
|
119
207
|
|
|
208
|
+
/**
|
|
209
|
+
* Whether the app was installed silently by the Overwolf installer.
|
|
210
|
+
*/
|
|
211
|
+
readonly silentInstall: boolean;
|
|
212
|
+
|
|
120
213
|
/**
|
|
121
214
|
* A unique identifier for the user machine.
|
|
122
215
|
*/
|
|
@@ -128,35 +221,97 @@ declare global {
|
|
|
128
221
|
readonly uid: string;
|
|
129
222
|
}
|
|
130
223
|
|
|
131
|
-
|
|
224
|
+
/**
|
|
225
|
+
* What the CMP window (openCMPWindow) and the CMP first layer
|
|
226
|
+
* (openCMPFirstLayerWindow) share: the parent window and the page's
|
|
227
|
+
* language, colors and font. A color or font left out keeps the page's
|
|
228
|
+
* own.
|
|
229
|
+
*/
|
|
230
|
+
interface CMPBaseWindowOptions {
|
|
132
231
|
/**
|
|
133
|
-
*
|
|
232
|
+
* The parent window. The CMP window opens centered over it; the first
|
|
233
|
+
* layer covers its content area (see openCMPFirstLayerWindow). Without
|
|
234
|
+
* it, both open over the focused window.
|
|
134
235
|
*/
|
|
135
|
-
|
|
236
|
+
parent?: BrowserWindow;
|
|
136
237
|
|
|
137
238
|
/**
|
|
138
|
-
* Whether
|
|
139
|
-
*
|
|
239
|
+
* Whether the window is modal to its parent. This only works with a
|
|
240
|
+
* `parent`. Default is `false`.
|
|
140
241
|
*/
|
|
141
242
|
modal?: boolean;
|
|
142
243
|
|
|
143
244
|
/**
|
|
144
|
-
*
|
|
245
|
+
* The page language, e.g. 'de' or 'zh-tw'. Falls back to 'en' for a
|
|
246
|
+
* language the page doesn't have. Default is 'en'.
|
|
145
247
|
*/
|
|
146
|
-
|
|
248
|
+
language?: string;
|
|
147
249
|
|
|
148
250
|
/**
|
|
149
|
-
*
|
|
251
|
+
* The background color: the CMP window's (its preloader and the page)
|
|
252
|
+
* or the first layer dialog's. Default is '#0D0D0D'.
|
|
150
253
|
*/
|
|
151
|
-
|
|
254
|
+
backgroundColor?: string;
|
|
152
255
|
|
|
153
256
|
/**
|
|
154
|
-
*
|
|
257
|
+
* The text color. Default is the page's grays.
|
|
155
258
|
*/
|
|
156
|
-
|
|
259
|
+
textColor?: string;
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* The titles, links (and the first layer's app name, the CMP window's
|
|
263
|
+
* "Reject All Purposes") color. Default is `textColor` when it is set,
|
|
264
|
+
* the page's otherwise.
|
|
265
|
+
*/
|
|
266
|
+
titleColor?: string;
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* The "Accept All Purposes" button color, e.g. '#3b96be'. In the CMP
|
|
270
|
+
* window also the consent switches, the active tab underline and the
|
|
271
|
+
* preloader spinner (unless `preLoaderSpinnerColor` is set).
|
|
272
|
+
*/
|
|
273
|
+
buttonColor?: string;
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* The "Accept All Purposes" button (and consent switch) hover color.
|
|
277
|
+
* Default is a brighter `buttonColor`.
|
|
278
|
+
*/
|
|
279
|
+
buttonHoverColor?: string;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* The "Accept All Purposes" button text color. Default is '#ffffff'.
|
|
283
|
+
*/
|
|
284
|
+
buttonTextColor?: string;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* The font-family list for the page, e.g. 'Roboto, "Segoe UI", sans-serif'
|
|
288
|
+
* - an installed font, or one `fontUrl` loads. Letters, digits, spaces,
|
|
289
|
+
* quotes, commas, dots and dashes only. Default is the page's font.
|
|
290
|
+
*/
|
|
291
|
+
fontFamily?: string;
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* A Google Fonts css url that loads `fontFamily`, e.g.
|
|
295
|
+
* 'https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap'.
|
|
296
|
+
* Urls on other hosts are ignored.
|
|
297
|
+
*/
|
|
298
|
+
fontUrl?: string;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
interface CMPWindowOptions extends CMPBaseWindowOptions {
|
|
302
|
+
/**
|
|
303
|
+
* Select open tab. The default is 'purposes'
|
|
304
|
+
*/
|
|
305
|
+
tab?: 'purposes' | 'features' | 'vendors';
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Show window in the center of the screen. Default is `true`.
|
|
309
|
+
*/
|
|
310
|
+
center?: boolean;
|
|
157
311
|
|
|
158
312
|
/**
|
|
159
|
-
* Control the CMP preloader color (spinner)
|
|
313
|
+
* Control the CMP preloader color (spinner). Default is `buttonColor`
|
|
314
|
+
* when it is set, '#D34037' otherwise.
|
|
160
315
|
*/
|
|
161
316
|
preLoaderSpinnerColor?: string;
|
|
162
317
|
|
|
@@ -184,11 +339,24 @@ declare global {
|
|
|
184
339
|
* Overrides the path of the cmp html
|
|
185
340
|
*/
|
|
186
341
|
cmpURL?: string;
|
|
342
|
+
}
|
|
187
343
|
|
|
344
|
+
interface CMPFirstLayerWindowOptions extends CMPBaseWindowOptions {
|
|
188
345
|
/**
|
|
189
|
-
*
|
|
346
|
+
* The product name shown in the text. Default is `app.getName()`.
|
|
190
347
|
*/
|
|
191
|
-
|
|
348
|
+
appName?: string;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Whether to dim the parent's content behind the dialog. Default is
|
|
352
|
+
* `true` with a parent, `false` without one.
|
|
353
|
+
*/
|
|
354
|
+
backdrop?: boolean;
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Overrides the first layer page url.
|
|
358
|
+
*/
|
|
359
|
+
cmpFirstLayerURL?: string;
|
|
192
360
|
}
|
|
193
361
|
|
|
194
362
|
interface EmailHashes {
|
|
@@ -197,32 +365,32 @@ declare global {
|
|
|
197
365
|
readonly md5?: string;
|
|
198
366
|
}
|
|
199
367
|
|
|
200
|
-
/**
|
|
201
|
-
* A enum of the external payment providers we know about.
|
|
202
|
-
*/
|
|
203
|
-
type ExternalPaymentProvider = 'tebex' | string;
|
|
204
|
-
|
|
205
|
-
interface ExternalPaymentUserIdOptions {
|
|
206
368
|
/**
|
|
207
|
-
*
|
|
369
|
+
* A enum of the external payment providers we know about.
|
|
208
370
|
*/
|
|
209
|
-
|
|
371
|
+
type ExternalPaymentProvider = 'tebex' | string;
|
|
210
372
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
373
|
+
interface ExternalPaymentUserIdOptions {
|
|
374
|
+
/**
|
|
375
|
+
* The name of the external payment provider.
|
|
376
|
+
*/
|
|
377
|
+
providerName: ExternalPaymentProvider;
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* The user id your app passes to the external payment provider.
|
|
381
|
+
*/
|
|
382
|
+
userId: string;
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Optional. The provider's recurring payment (subscription) agreement id.
|
|
386
|
+
*/
|
|
387
|
+
paymentId?: string;
|
|
388
|
+
}
|
|
215
389
|
|
|
216
390
|
/**
|
|
217
|
-
*
|
|
391
|
+
* A utility type for registering to `error` events, that includes the `errorMonitor` type
|
|
218
392
|
*/
|
|
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;
|
|
393
|
+
type error = 'error' | typeof errorMonitor;
|
|
226
394
|
|
|
227
395
|
/**
|
|
228
396
|
* 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.1",
|
|
4
|
+
"owElectronVersion": "44.11.3-beta.1",
|
|
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",
|