import { type CubeDefinition, type HierarchyDefinition, type SemanticLayer, type SemanticLayerProviderConfig, type SemanticSourceMetadata, type SnowflakeQueryExecutor } from '@duckcodeailabs/dql-core';
export interface SemanticImportManifestObject {
    id: string;
    kind: 'cube' | 'metric' | 'measure' | 'dimension' | 'time_dimension' | 'entity' | 'hierarchy' | 'segment' | 'pre_aggregation' | 'semantic_model' | 'saved_query';
    name: string;
    label: string;
    domain: string;
    cube?: string;
    filePath: string;
    source?: SemanticSourceMetadata;
}
export interface SemanticImportManifest {
    version: 1;
    mode: 'imported';
    provider: 'dbt' | 'cubejs' | 'snowflake';
    importedAt: string;
    source: {
        projectPath?: string;
        repoUrl?: string;
        branch?: string;
        subPath?: string;
        connection?: string;
    };
    warnings: string[];
    generatedFiles: string[];
    objects: SemanticImportManifestObject[];
}
export interface SemanticImportResult {
    manifest: SemanticImportManifest;
    counts: Record<SemanticImportManifestObject['kind'], number>;
}
export interface SemanticImportPreview {
    provider: 'dbt' | 'cubejs' | 'snowflake';
    counts: Record<SemanticImportManifestObject['kind'], number>;
    domains: string[];
    warnings: string[];
    objects: Array<{
        kind: SemanticImportManifestObject['kind'];
        name: string;
        label: string;
        domain: string;
    }>;
}
export interface SemanticSyncDiff {
    added: Array<{
        kind: SemanticImportManifestObject['kind'];
        name: string;
        label: string;
        domain: string;
    }>;
    removed: Array<{
        kind: SemanticImportManifestObject['kind'];
        name: string;
        label: string;
        domain: string;
    }>;
    changed: Array<{
        kind: SemanticImportManifestObject['kind'];
        name: string;
        label: string;
        domain: string;
    }>;
    unchanged: number;
}
export interface SemanticTreeNode {
    id: string;
    label: string;
    kind: 'provider' | 'domain' | 'cube' | 'group' | SemanticImportManifestObject['kind'];
    count?: number;
    meta?: Record<string, string | number | boolean | null | undefined>;
    children?: SemanticTreeNode[];
}
export interface SemanticObjectDetail {
    id: string;
    kind: SemanticImportManifestObject['kind'];
    name: string;
    label: string;
    description: string;
    domain: string;
    cube?: string;
    table?: string;
    sql?: string;
    type?: string;
    tags: string[];
    owner: string | null;
    source: SemanticSourceMetadata | null;
    filePath: string | null;
    importedAt: string | null;
    joins?: CubeDefinition['joins'];
    levels?: HierarchyDefinition['levels'];
    measures?: string[];
    dimensions?: string[];
    timeDimension?: string;
    granularity?: string;
    refreshKey?: string;
    agg?: string;
    expr?: string;
    metricType?: string;
    typeParams?: Record<string, unknown>;
    filter?: unknown;
    entities?: string[];
    savedQueryMetrics?: string[];
    exports?: Array<Record<string, unknown>>;
}
export declare function performSemanticImport(opts: {
    targetProjectRoot: string;
    provider: 'dbt' | 'cubejs' | 'snowflake';
    sourceConfig: SemanticLayerProviderConfig;
    executeQuery?: SnowflakeQueryExecutor;
}): Promise<SemanticImportResult>;
export declare function syncSemanticImport(opts: {
    targetProjectRoot: string;
    executeQuery?: SnowflakeQueryExecutor;
}): Promise<SemanticImportResult>;
export declare function loadSemanticImportManifest(projectRoot: string): SemanticImportManifest | null;
export declare function buildSemanticTree(layer: SemanticLayer, manifest: SemanticImportManifest | null): SemanticTreeNode;
export declare function buildSemanticObjectDetail(layer: SemanticLayer, manifest: SemanticImportManifest | null, id: string): SemanticObjectDetail | null;
/**
 * Preview a semantic import without writing any files.
 * Returns counts, domains, warnings, and object summaries.
 */
export declare function previewSemanticImport(opts: {
    targetProjectRoot: string;
    provider: 'dbt' | 'cubejs' | 'snowflake';
    sourceConfig: SemanticLayerProviderConfig;
    executeQuery?: SnowflakeQueryExecutor;
}): Promise<SemanticImportPreview>;
/**
 * Compute the diff between the current manifest and a fresh import, without applying changes.
 */
export declare function computeSyncDiff(opts: {
    targetProjectRoot: string;
    executeQuery?: SnowflakeQueryExecutor;
}): Promise<SemanticSyncDiff>;
//# sourceMappingURL=semantic-import.d.ts.map