type AjvJSONSchemaType = object; export interface DesktopAppPlugin { /** * Specifies if the plugin requires authentication to npm for installation. * If true, the npm token will be retrieved from Azure KeyVault during the build. */ npmAuthRequired?: boolean; /** * Package name, including version information. * e.g. "@todesktop/plugin-foo", "@todesktop/plugin-baz@1.0.0" */ package: string; /** * Configuration gathered from the todesktop plugin. * Named `todesktop` to clarify that it maps to the `todesktop` key on the package.json */ todesktop?: ToDesktopPlugin; } export interface CustomPlugin { addedAt: string; description?: string; displayName?: string; lastLinkedAt?: string; packageName: string; sourcePath: string; todesktop: ToDesktopPlugin; } export type ToDesktopPlugin = { main?: string; namespace: string; preferences?: PluginPreferences; preload?: string; version: number; }; export type PluginPreferences = { [id: string]: PluginPreference; }; export type PluginPreference = CheckboxSpec | NumberSpec | TextSpec; export type TextSpec = PreferenceSpec<'text', { placeholder?: string; validator?: AjvJSONSchemaType; value?: string; }>; export type NumberSpec = PreferenceSpec<'number', { placeholder?: number; validator?: AjvJSONSchemaType; value?: number; }>; export type CheckboxSpec = PreferenceSpec<'checkbox', { validator?: AjvJSONSchemaType; value?: boolean; }>; interface PreferenceSpec { description: string; name: string; order?: number; spec: V; type: T; } export {};