@todesktop/shared 7.60.0 → 7.63.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/lib/base.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ export interface Schemable {
2
+ schemaVersion?: number;
3
+ }
4
+ export interface BaseApp extends Schemable {
5
+ id: string;
6
+ subscription?: {
7
+ status: string;
8
+ subscriptionId: string;
9
+ itemId: string;
10
+ planId: string;
11
+ };
12
+ }
package/lib/base.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +1,7 @@
1
1
  /// <reference types="node" />
2
- import { IApp, ISwitchableValue } from "./toDesktop";
2
+ import { ISwitchableValue } from "./toDesktop";
3
3
  import { MenuItemConstructorOptions, BrowserWindowConstructorOptions, WebPreferences } from "@todesktop/client-electron-types";
4
+ import { BaseApp, Schemable } from "./base";
4
5
  /**
5
6
  * Custom ToDesktop Roles for Application & Tray Menus
6
7
  */
@@ -135,15 +136,11 @@ export interface DesktopifyAppWindow {
135
136
  webPreferences?: Pick<WebPreferences, whitelistedWebPreferencesOptions>;
136
137
  };
137
138
  }
138
- export interface DesktopifyApp2 {
139
+ export interface DesktopifyApp2 extends Schemable {
139
140
  /**
140
141
  * The name of the app
141
142
  */
142
143
  name: string;
143
- /**
144
- * A unique app id
145
- */
146
- id: string;
147
144
  /**
148
145
  * The app icon
149
146
  */
@@ -250,9 +247,7 @@ export interface DesktopifyApp2 {
250
247
  */
251
248
  menus: DesktopifyAppMenu[];
252
249
  }
253
- export interface IApp2 extends IApp {
254
- windows: DesktopifyAppWindow[];
255
- trays: DesktopifyAppTray[];
256
- menus: DesktopifyAppMenu[];
250
+ export interface IApp2 extends BaseApp {
251
+ desktopApp: DesktopifyApp2;
257
252
  }
258
253
  export {};
package/lib/index.d.ts CHANGED
@@ -3,6 +3,7 @@ export * from "./desktopify";
3
3
  export * from "./validations";
4
4
  export * from "./getSiteInfo";
5
5
  export * from "./plans";
6
+ export * from './base';
6
7
  export * from "./desktopify2";
7
8
  declare const schemaVersion: string;
8
9
  export { schemaVersion };
@@ -1,3 +1,4 @@
1
+ import { BaseApp, Schemable } from "./base";
1
2
  import { ExtraFileReference, FilePath, IAppBuilderLib, URL } from "./desktopify";
2
3
  export declare type IUploadFileStatus = "error" | "success" | "done" | "uploading" | "removed";
3
4
  export interface IUploadFile {
@@ -191,12 +192,6 @@ export interface IAppPublishedVersions {
191
192
  desktopify?: string;
192
193
  version?: string;
193
194
  }
194
- interface IStripeSubscription {
195
- status: string;
196
- subscriptionId: string;
197
- itemId: string;
198
- planId: string;
199
- }
200
195
  export interface ISwitchableValue<T> {
201
196
  enabled: boolean;
202
197
  value: T;
@@ -233,7 +228,7 @@ export interface CustomWindowsCodeSignEV {
233
228
  hsmCertType: WindowsHSMCertType.ev;
234
229
  hsmCertName: string;
235
230
  }
236
- export interface IApp {
231
+ export interface IApp extends BaseApp {
237
232
  appModelId: string;
238
233
  appPkgName?: string;
239
234
  appProtocol?: ISwitchableValue<string>;
@@ -254,7 +249,6 @@ export interface IApp {
254
249
  };
255
250
  icon?: string;
256
251
  icons?: IIcon[];
257
- id: string;
258
252
  internalUrls?: ISwitchableValue<string>;
259
253
  isContextMenuDisabled: boolean;
260
254
  isDevToolsDisabled: boolean;
@@ -293,7 +287,6 @@ export interface IApp {
293
287
  snapStore?: {
294
288
  login?: string;
295
289
  };
296
- subscription?: IStripeSubscription;
297
290
  themeSource?: "system" | "light" | "dark";
298
291
  themeSourceMac?: "system" | "light" | "dark";
299
292
  toggleVisibilityKeyboardShortcut?: ISwitchableValue<string>;
@@ -302,9 +295,8 @@ export interface IApp {
302
295
  windowOptions: IWindowOptions;
303
296
  pollForAppUpdatesEveryXMinutes?: number;
304
297
  }
305
- export interface IUser {
298
+ export interface IUser extends Schemable {
306
299
  id: string;
307
- schemaVersion?: number;
308
300
  authInfo?: {};
309
301
  avatar?: string;
310
302
  currentApplication?: string;
@@ -322,4 +314,3 @@ export interface CiInput {
322
314
  buildId?: string;
323
315
  userId: string;
324
316
  }
325
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@todesktop/shared",
3
- "version": "7.60.0",
3
+ "version": "7.63.0",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
package/src/base.ts ADDED
@@ -0,0 +1,13 @@
1
+ export interface Schemable {
2
+ schemaVersion?: number;
3
+ }
4
+
5
+ export interface BaseApp extends Schemable {
6
+ id: string;
7
+ subscription?: {
8
+ status: string;
9
+ subscriptionId: string;
10
+ itemId: string;
11
+ planId: string;
12
+ };
13
+ }
@@ -1,9 +1,10 @@
1
- import { IApp, ISwitchableValue } from "./toDesktop";
1
+ import { ISwitchableValue } from "./toDesktop";
2
2
  import {
3
3
  MenuItemConstructorOptions,
4
4
  BrowserWindowConstructorOptions,
5
5
  WebPreferences,
6
6
  } from "@todesktop/client-electron-types";
7
+ import { BaseApp, Schemable } from "./base";
7
8
 
8
9
  /**
9
10
  * Custom ToDesktop Roles for Application & Tray Menus
@@ -242,15 +243,11 @@ export interface DesktopifyAppWindow {
242
243
  }
243
244
  // TODO: Look into hasMinHeight, etc
244
245
 
245
- export interface DesktopifyApp2 {
246
+ export interface DesktopifyApp2 extends Schemable {
246
247
  /**
247
248
  * The name of the app
248
249
  */
249
250
  name: string;
250
- /**
251
- * A unique app id
252
- */
253
- id: string;
254
251
  /**
255
252
  * The app icon
256
253
  */
@@ -358,8 +355,6 @@ export interface DesktopifyApp2 {
358
355
  menus: DesktopifyAppMenu[];
359
356
  }
360
357
 
361
- export interface IApp2 extends IApp {
362
- windows: DesktopifyAppWindow[];
363
- trays: DesktopifyAppTray[];
364
- menus: DesktopifyAppMenu[];
358
+ export interface IApp2 extends BaseApp {
359
+ desktopApp: DesktopifyApp2;
365
360
  }
package/src/index.ts CHANGED
@@ -5,6 +5,7 @@ export * from "./desktopify";
5
5
  export * from "./validations";
6
6
  export * from "./getSiteInfo";
7
7
  export * from "./plans";
8
+ export * from './base';
8
9
 
9
10
  export * from "./desktopify2";
10
11
 
package/src/toDesktop.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { BaseApp, Schemable } from "./base";
1
2
  import {
2
3
  ExtraFileReference,
3
4
  FilePath,
@@ -216,13 +217,6 @@ export interface IAppPublishedVersions {
216
217
  version?: string;
217
218
  }
218
219
 
219
- interface IStripeSubscription {
220
- status: string;
221
- subscriptionId: string;
222
- itemId: string;
223
- planId: string;
224
- }
225
-
226
220
  export interface ISwitchableValue<T> {
227
221
  enabled: boolean;
228
222
  value: T;
@@ -267,7 +261,7 @@ export interface CustomWindowsCodeSignEV {
267
261
  hsmCertName: string;
268
262
  }
269
263
 
270
- export interface IApp {
264
+ export interface IApp extends BaseApp {
271
265
  appModelId: string;
272
266
  appPkgName?: string;
273
267
  appProtocol?: ISwitchableValue<string>;
@@ -286,7 +280,6 @@ export interface IApp {
286
280
  environmentVariables?: { [propertyName: string]: string };
287
281
  icon?: string;
288
282
  icons?: IIcon[];
289
- id: string;
290
283
  internalUrls?: ISwitchableValue<string>;
291
284
  isContextMenuDisabled: boolean;
292
285
  isDevToolsDisabled: boolean;
@@ -301,7 +294,6 @@ export interface IApp {
301
294
  shouldUseRealUserAgent?: boolean;
302
295
  extraBrowserWindowOptions?: string;
303
296
  enablePushNotifications?: boolean;
304
-
305
297
  isTransitioningFromSquirrelWindows?: boolean;
306
298
  jsToInject?: string;
307
299
  menubarIcon?: string;
@@ -324,7 +316,6 @@ export interface IApp {
324
316
  shouldOnlySendAbsolutelyNecessaryRequests?: boolean;
325
317
  shouldReuseRendererProcess?: boolean;
326
318
  snapStore?: { login?: string };
327
- subscription?: IStripeSubscription;
328
319
  themeSource?: "system" | "light" | "dark";
329
320
  themeSourceMac?: "system" | "light" | "dark";
330
321
  toggleVisibilityKeyboardShortcut?: ISwitchableValue<string>;
@@ -334,9 +325,8 @@ export interface IApp {
334
325
  pollForAppUpdatesEveryXMinutes?: number;
335
326
  }
336
327
 
337
- export interface IUser {
328
+ export interface IUser extends Schemable {
338
329
  id: string;
339
- schemaVersion?: number;
340
330
  authInfo?: {};
341
331
  avatar?: string;
342
332
  currentApplication?: string;