/// <reference types="node" resolution-mode="require"/>
/// <reference types="node" resolution-mode="require"/>
import { AppConfig } from './app-config.js';
export { AppConfig, FunctionProcessingError, IgnoringFileError, } from './app-config.js';
export { allBaseFilesInDir, allConfigDirsPaths, allConfigFilesInDir, allConfigFilesPaths, allConfigFilesPathsByType, getAllConfigPaths, globAllFilesByPath, isPathDirectory, } from './paths.js';
export declare const PUSH_CONCURRENCY = 3;
/**
 * An app as defined by the Swell API. This is different than an app
 * configuration that developers define.
 */
export interface App {
    categories?: string[];
    client?: any;
    client_id?: string;
    compatibilities?: {
        [key: string]: string;
    };
    configs?: AppConfig[];
    date_created?: string;
    date_updated?: string;
    description?: string;
    extensions?: any[];
    features?: string[];
    frontend?: {
        deployment?: null | object;
        deployment_hash?: string;
        deployment_id?: string;
        framework?: string;
        service?: string;
        url?: string;
    };
    highlights?: Array<{
        id: string;
        image_src?: unknown;
        title: string;
    }>;
    id?: string;
    installed?: {
        date_created: string;
        id: string;
    };
    kind?: string;
    logo_icon?: unknown;
    name?: string;
    owned?: boolean;
    preview_image?: unknown;
    preview_mobile_image?: unknown;
    private_id?: string;
    public_id?: string;
    published?: boolean;
    purchase_options?: string[];
    storefront?: {
        [key: string]: any;
    };
    styles?: Array<{
        color: string;
        color_alt?: string;
        id: string;
        label: string;
        preview_image?: unknown;
        preview_mobile_image?: unknown;
    }>;
    theme?: {
        [key: string]: any;
    };
    type?: string;
    use_cases?: string[];
    version?: string;
}
export declare enum SwellJsonFields {
    DESCRIPTION = "description",
    EXTENSIONS = "extensions",
    ID = "id",
    KIND = "kind",
    NAME = "name",
    PERMISSIONS = "permissions",
    STOREFRONT = "storefront",
    THEME = "theme",
    TYPE = "type",
    VERSION = "version"
}
export interface AppVersion {
    date_created: string;
    description?: string;
    id: string;
    name: string;
    published?: boolean;
    release_notes?: string;
    released?: boolean;
    supported?: boolean;
    version: string;
}
export declare enum ConfigType {
    ASSET = "asset",
    CONTENT = "content",
    FILE = "file",
    FRONTEND = "frontend",
    COMPONENT = "component",
    FUNCTION = "function",
    MODEL = "model",
    NOTIFICATION = "notification",
    SETTING = "setting",
    THEME = "theme",
    WEBHOOK = "webhook"
}
export type ConfigTypeKey = keyof typeof ConfigType;
export declare const StorefrontConfigTypes: ConfigTypeKey[];
export declare const ThemeConfigTypes: ConfigTypeKey[];
export type ConfigPathsType = {
    [key in ConfigTypeKey]: string;
};
export declare const AllConfigPaths: ConfigPathsType;
export declare const StandardConfigPaths: ConfigPathsType;
export declare const StorefrontConfigPaths: ConfigPathsType;
export declare const ThemeConfigPaths: ConfigPathsType;
export declare enum ConfigInputFields {
    FILE = "file",
    NAME = "name",
    TYPE = "type",
    VALUES = "values",
    VERSION = "version"
}
export interface FrontendProjectType {
    appTypes?: string[];
    buildCommand?: string;
    devCommand: string;
    displayOrder?: number;
    installCommand?: string;
    mainPackage: string;
    name: string;
    slug: string;
}
export declare const CUSTOM_FRAMEWORK_SLUG = "custom";
export declare const FrontendProjectTypes: FrontendProjectType[];
export declare function getFrontendProjectSlugs(withNone?: boolean, withLegacy?: boolean): string[];
export declare function getFrontendProjectValidValues(withNone?: boolean, withLegacy?: boolean): string;
export declare function getFrontendProjectType(appPath: string): Promise<FrontendProjectType | undefined>;
/**
 * Get project commands transformed for the detected package manager.
 * Detects the package manager from lock files in appPath and transforms
 * npm-style commands to the equivalent for that package manager.
 */
export declare function getProjectCommands(appPath: string, projectType: FrontendProjectType): Promise<{
    buildCommand?: string;
    devCommand: string;
}>;
/**
 * Get a suggested dev command for an unrecognized frontend project,
 * translated for the detected package manager.
 */
export declare function getManualDevHint(appPath: string, port: number): Promise<string>;
export declare function getConfigTypeFromPath(path: string): ConfigType | undefined;
export declare function getConfigTypeKeyFromValue(value: string): string | undefined;
export declare function filePathExists(filePath: string): boolean;
export declare function filePathExistsAsync(filePath: string): Promise<boolean>;
export declare function writeFile(file: string, data: string): Promise<void>;
export declare function deleteFile(file: string): Promise<void>;
export declare function writeJsonFile(file: string, data?: any): Promise<void>;
export declare function hashFile(filePath: string, fileContents?: Buffer, relativePath?: string): string;
export declare function hashString(...contents: (Buffer | string)[]): string;
export declare function appAssetImage(appPath: string, fileName: string): Promise<string | undefined>;
export declare function appConfigFromFile(filePath: string, configType: ConfigType, appPath: string): Promise<AppConfig>;
export declare function findAppConfig(app: App, filePath: string, configType: ConfigType): AppConfig | undefined;
interface BatchAppFiles {
    configs: AppConfig[];
    type: ConfigType;
    label: string;
    concurrency: number;
}
/**
 * Get files to push in batches prioritized by dependencies
 *
 * @param {AppConfig[]} configs - List of app configs
 * @returns {BatchAppFiles[]} Batches of files to push
 */
export declare function batchAppFilesByType(configs: AppConfig[]): BatchAppFiles[];
export declare function hasAppContext(): Promise<boolean>;
export declare function getCurrentAppSlugId(): Promise<string | undefined>;
