/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @format
 */
import { DeviceType, OS } from './server-types';
export interface PluginDetails {
    name: string;
    specVersion: number;
    version: string;
    source: string;
    main: string;
    serverAddOnSource?: string;
    serverAddOn?: string;
    id: string;
    gatekeeper?: string;
    title: string;
    icon?: string;
    description?: string;
    category?: string;
    engines?: {
        [name: string]: string;
    };
    bugs?: {
        email?: string;
        url?: string;
    };
    flipperSDKVersion?: string;
    pluginType?: PluginType;
    supportedDevices?: SupportedDevice[];
    supportedApps?: SupportedApp[];
    publishedDocs?: {
        overview?: boolean;
        setup?: boolean;
    };
    /**
     * Provided by NPM. Allows developers to deprecated packages. Its value is the deprecation reason.
     * Alternatively, might be a part of the plugin's package JSON. In this case, the plugin is excluded from bundling.
     */
    deprecated?: string;
}
export interface SupportedDevice {
    readonly os?: OS;
    readonly type?: DeviceType;
    readonly archived?: boolean;
    readonly specs?: DeviceSpec[];
}
export interface SupportedApp {
    readonly appID?: string;
    readonly os?: OS;
    readonly type?: DeviceType;
}
export type PluginType = 'client' | 'device';
export type DeviceSpec = 'KaiOS';
export interface ConcretePluginDetails extends PluginDetails {
    isActivatable: boolean;
}
export interface InstalledPluginDetails extends ConcretePluginDetails {
    isActivatable: true;
    dir: string;
    entry: string;
    serverAddOnEntry?: string;
}
export type ActivatablePluginDetails = InstalledPluginDetails;
export interface DownloadablePluginDetails extends ConcretePluginDetails {
    isActivatable: false;
    buildId: string;
    downloadUrls: string[];
    lastUpdated: Date;
    isEnabledByDefault: boolean;
}
export interface MarketplacePluginDetails extends DownloadablePluginDetails {
    availableVersions?: DownloadablePluginDetails[];
}
export type UpdateResult = {
    kind: 'not-installed';
    version: string;
} | {
    kind: 'up-to-date';
} | {
    kind: 'error';
    error: Error;
} | {
    kind: 'update-available';
    version: string;
};
export type UpdatablePlugin = {
    updateStatus: UpdateResult;
};
export type UpdatablePluginDetails = InstalledPluginDetails & UpdatablePlugin;
export declare function getPluginDetails(packageJson: any): PluginDetails;
export declare function isPluginJson(packageJson: any): boolean;
//# sourceMappingURL=PluginDetails.d.ts.map