@todesktop/shared 7.186.6 → 7.186.7

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,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import { ISwitchableValue } from './toDesktop';
3
- import { MenuItemConstructorOptions, BrowserWindowConstructorOptions, WebPreferences } from '@todesktop/client-electron-types';
3
+ import { MenuItemConstructorOptions, BrowserWindowConstructorOptions, WebPreferences, NotificationConstructorOptions, MessageBoxOptions } from '@todesktop/client-electron-types';
4
4
  import { BaseApp } from './base';
5
5
  import { DesktopAppPlugin } from './plugin';
6
6
  import { ValidTranslationKeys, ValidTranslationLanguages } from './translation';
@@ -209,11 +209,37 @@ export interface DesktopifyAppWindow {
209
209
  */
210
210
  file?: string;
211
211
  }
212
+ export declare type AutoUpdateConfiguration = {
213
+ autoUpdater: boolean;
214
+ shouldAutoCheckOnLaunch: boolean;
215
+ simulateLocalAutoUpdates: boolean;
216
+ autoCheckIntervalMins: number;
217
+ updateReadyAction: {
218
+ showInstallAndRestartPrompt: {
219
+ mode: 'always' | 'whenInForeground' | 'never';
220
+ options: Omit<MessageBoxOptions, 'buttons'> & {
221
+ installOnNextLaunchButton: string;
222
+ restartAndInstallButton: string;
223
+ };
224
+ };
225
+ showNotification: {
226
+ mode: 'always' | 'whenInBackground' | 'never';
227
+ options: Omit<NotificationConstructorOptions, 'actions'>;
228
+ };
229
+ };
230
+ };
212
231
  export interface DesktopifyApp2<Plugin = DesktopAppPlugin> {
213
232
  /**
214
233
  * Used as appUserModelId on windows
215
234
  */
216
235
  appModelId?: string;
236
+ /**
237
+ * Configure auto updates
238
+ */
239
+ autoUpdates?: AutoUpdateConfiguration;
240
+ /**
241
+ * App identifier
242
+ */
217
243
  id: string;
218
244
  /**
219
245
  * Last desktopify version that was used to update the app
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@todesktop/shared",
3
- "version": "7.186.6",
3
+ "version": "7.186.7",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -3,6 +3,8 @@ import {
3
3
  MenuItemConstructorOptions,
4
4
  BrowserWindowConstructorOptions,
5
5
  WebPreferences,
6
+ NotificationConstructorOptions,
7
+ MessageBoxOptions,
6
8
  } from '@todesktop/client-electron-types';
7
9
  import { BaseApp } from './base';
8
10
  import { DesktopAppPlugin } from './plugin';
@@ -337,11 +339,39 @@ export interface DesktopifyAppWindow {
337
339
  }
338
340
  // TODO: Look into hasMinHeight, etc
339
341
 
342
+ export type AutoUpdateConfiguration = {
343
+ autoUpdater: boolean;
344
+ shouldAutoCheckOnLaunch: boolean;
345
+ simulateLocalAutoUpdates: boolean;
346
+ autoCheckIntervalMins: number;
347
+ updateReadyAction: {
348
+ showInstallAndRestartPrompt: {
349
+ mode: 'always' | 'whenInForeground' | 'never';
350
+ options: Omit<MessageBoxOptions, 'buttons'> & {
351
+ installOnNextLaunchButton: string;
352
+ restartAndInstallButton: string;
353
+ };
354
+ };
355
+ showNotification: {
356
+ mode: 'always' | 'whenInBackground' | 'never';
357
+ options: Omit<NotificationConstructorOptions, 'actions'>;
358
+ };
359
+ };
360
+ };
361
+
340
362
  export interface DesktopifyApp2<Plugin = DesktopAppPlugin> {
341
363
  /**
342
364
  * Used as appUserModelId on windows
343
365
  */
344
366
  appModelId?: string;
367
+ /**
368
+ * Configure auto updates
369
+ */
370
+ autoUpdates?: AutoUpdateConfiguration;
371
+
372
+ /**
373
+ * App identifier
374
+ */
345
375
  id: string;
346
376
  /**
347
377
  * Last desktopify version that was used to update the app