import { ModelsSource, ModelExtension } from '@stackbit/types'; import { ConfigValidationResult } from './config-validator'; import { ConfigError, ConfigLoadError, ModelLoadError, ConfigValidationError, StackbitConfigNotFoundError } from './config-errors'; import { Logger } from '../utils'; import type { Config, StackbitConfigWithPaths, Model } from './config-types'; import { WithReloadAndDestroy } from './config-loader-utils'; export type ConfigWithModelsPresetsResult = { valid: boolean; config: Config | null; errors: ConfigError[]; }; export type ConfigWithModelsPresetsResultWithReloadDestroy = WithReloadAndDestroy; export declare function loadConfigWithModelsPresetsAndValidate({ dirPath, modelsSource, stackbitConfigESBuildOutDir, watchCallback, logger, isForcedGitCSI }: { dirPath: string; modelsSource?: ModelsSource; stackbitConfigESBuildOutDir?: string; watchCallback?: (result: ConfigWithModelsPresetsResult) => void; logger?: Logger; isForcedGitCSI?: boolean; }): Promise; export type LoadConfigWithModelsResult = { config: Config | null; errors: (ConfigLoadError | StackbitConfigNotFoundError | ModelLoadError | ConfigValidationError)[]; }; export type LoadConfigWithModelsResultWithReloadDestroy = WithReloadAndDestroy; export declare function loadConfigWithModels({ dirPath, stackbitConfigESBuildOutDir, watchCallback, logger }: { dirPath: string; stackbitConfigESBuildOutDir?: string; watchCallback?: (result: LoadConfigWithModelsResult) => void; logger?: Logger; }): Promise; export type LoadConfigResult = { config: Config; errors: ConfigValidationError[]; } | { config: null; errors: (ConfigLoadError | StackbitConfigNotFoundError)[]; }; export type LoadConfigResultWithReloadDestroy = WithReloadAndDestroy; export declare function loadConfig({ dirPath, stackbitConfigESBuildOutDir, watchCallback, logger }: { dirPath: string; stackbitConfigESBuildOutDir?: string; watchCallback?: (result: LoadConfigResult) => void; logger?: Logger; }): Promise; export declare function loadAndMergeModelsFromFiles(config: Config): Promise<{ config: Config; errors: (ModelLoadError | ConfigValidationError)[]; }>; export declare function validateAndNormalizeConfig(config: Config, isForcedGitCSI?: boolean): ConfigValidationResult; export type LoadConfigFromDirResult = { config: StackbitConfigWithPaths; error: null; } | { config: null; error: ConfigLoadError | StackbitConfigNotFoundError; }; export type LoadConfigFromDirResultWithReloadDestroy = WithReloadAndDestroy; export declare function loadConfigFromDir({ dirPath, stackbitConfigESBuildOutDir, watchCallback, logger }: { dirPath: string; stackbitConfigESBuildOutDir?: string; watchCallback?: (result: LoadConfigFromDirResult) => void; logger?: Logger; }): Promise; export declare function mergeConfigModelsWithExternalModels({ configModels, externalModels, logger }: { configModels: ModelExtension[]; externalModels: Model[]; logger?: Logger; }): Model[]; //# sourceMappingURL=config-loader.d.ts.map