import { type TransformOptions } from './util';
import { Shape, type Plugin, Plugins, type CommitFunction, type Context, type Project as IProject, type Keys, Database, type Diagnostics, type Transform, type Factory, type Parser, type CoalesceKeys, Compiler, type CompilerOptions, FileSystem, type File, type Logger, type NowConfigOptions, type Package, // Named this way to prevent naming conflict with path arguments
ts, type Diagnostic, NowConfig, type Telemetry, type Result } from '@servicenow/sdk-build-core';
import { ProjectFile } from './project-file';
export type TransformResult = {
    changedFiles: ProjectFile[];
    handledPaths: string[];
};
type IInspector = {
    inspect: (shape: Shape, ...plugins: Plugin[]) => void;
};
type ICommitter = {
    commit: CommitFunction;
};
type ITargeter = {
    getTarget: (shape: Shape, ...plugins: Plugin[]) => Promise<Result<ts.Node>>;
};
type FullContext = Omit<Context, 'self'> & IInspector & ICommitter;
export declare class Project implements IProject {
    private readonly rootDir;
    private readonly files;
    private readonly filesForDeletion;
    private readonly plugins;
    private readonly fileSystem;
    private readonly logger;
    private readonly compiler;
    private readonly config;
    private readonly package;
    private readonly keys;
    private readonly diagnostics;
    private readonly transformService;
    private readonly factory;
    private readonly parser;
    private readonly inspector;
    private readonly committer;
    private readonly targeter;
    private readonly context;
    private readonly telemetryClient;
    private readonly transformMode;
    private readonly staticContentInputDirs;
    constructor({ fileSystem, logger, rootDir, sourceFilePaths, compilerOptions, compiler, plugins, config, packageJson, keys, diagnostics, transform, factory, parser, inspector, committer, targeter, telemetryClient, transformMode, }?: {
        fileSystem?: FileSystem;
        logger?: Logger;
        rootDir?: string;
        sourceFilePaths?: string[];
        compilerOptions?: CompilerOptions;
        compiler?: Compiler;
        config?: Partial<NowConfigOptions>;
        packageJson?: Package;
        plugins?: Plugin[] | Plugins;
        keys?: Keys;
        diagnostics?: Diagnostics;
        transform?: Transform;
        factory?: Factory;
        parser?: Parser;
        inspector?: IInspector;
        committer?: ICommitter;
        targeter?: ITargeter;
        telemetryClient?: Telemetry;
        transformMode?: 'transform' | 'type-generation';
    });
    private registerClaimsFile;
    private registerFiles;
    getContext(): FullContext;
    getTelemetryClient(): Telemetry;
    getPlugins(): Plugins;
    getFileSystem(): FileSystem;
    getLogger(): Logger;
    getDiagnosticsService(): Diagnostics;
    getCompiler(): Compiler;
    getKeys(): Keys;
    getConfig(): NowConfig;
    getPackage(): Package;
    getTransform(): Transform;
    getFactory(): Factory;
    getFiles(): ProjectFile[];
    getEntryPoints(): Promise<ProjectFile[]>;
    getFileIfExists(path: string): ProjectFile | undefined;
    getFile(path: string): ProjectFile;
    findFile(name: string): ProjectFile | undefined;
    findFile(predicate: (file: ProjectFile) => boolean): ProjectFile | undefined;
    reloadFile(path: string, refreshFromFileSystem?: boolean): ProjectFile;
    reloadDirectory(path: string, refreshFromFileSystem?: boolean): ProjectFile[];
    addFile(file: File, options?: {
        resolveDependencies?: boolean;
        excludeFromCompiler?: boolean;
    }): ProjectFile;
    addFile(path: string, options?: {
        resolveDependencies?: boolean;
        excludeFromCompiler?: boolean;
    }): ProjectFile;
    private addFiles;
    private checkDirectoryExists;
    private addDirectory;
    removeFile(file: ProjectFile): void;
    removeFile(path: string): void;
    transform(input: string | File | Shape | (string | File | Shape)[], { format, tables }?: TransformOptions): Promise<TransformResult>;
    registerExplicitId(table: string, key: string | number, guidOverride?: string): string;
    registerCoalesceId(table: string, key: CoalesceKeys, guidOverride?: string): string;
    getOutput(sysIds?: Set<string>, errorOnConflict?: boolean): Promise<File[]>;
    private getOutput0;
    private copyMetadataRecords;
    getRecords(sysIds?: Set<string>, errorOnConflict?: boolean): Promise<Database>;
    private getAttachmentsForFields;
    private generateRecordsFromDeletedKeys;
    getDiagnostics(): Promise<Diagnostic[]>;
    private registerStaticContentDir;
    private isInStaticContentAssetsDir;
    isInDir(dir: string, path: string): boolean;
    getRootDir(): string;
    isInRootDir(path: string): boolean;
    getMetadataDir(): string;
    isInMetadataDir(path: string): boolean;
    isInUiHtmlContentDir(path: string): boolean;
    private getSnDirName;
    getFluentDir(): string;
    isInFluentDir(path: string): boolean;
    getServerDir(): string;
    isInServerDir(path: string): boolean;
    isInConditionalDir(path: string): boolean;
    /**
     * True when both paths live under conditional directories but belong to different
     * conditional plugins (if/<plugin> or hosted_plugins/<plugin>). These records deliver to
     * separate plugins and must be treated as distinct even when they share a sys_id, so the
     * incoming one is preserved as metadata XML rather than merged into the already-seen record.
     */
    inDifferentConditionalDirs(pathA: string, pathB: string): boolean;
    isInFluentHostedPluginDir(path: string, pluginId?: string): boolean;
    resolvePath(...paths: string[]): string;
    relativePath(...paths: string[]): string;
    dispose(): void;
    fix(): Promise<void[]>;
    format(): Promise<void[]>;
    save(): void;
    saveOutput(sysIds?: Set<string>, errorOnConflict?: boolean): Promise<File[]>;
    deleteFile(path: string): void;
    handleMetadataCopy(file: ProjectFile, metadataDirRecordPath?: string): ProjectFile;
    isTypesGenerationMode(): boolean;
}
export {};
