import type { ApiSuccess } from './api/success';
import type { KnexPaginatedData } from './knex-paginate';
import type { ChartKind } from './savedCharts';
export type ValidationResponseBase = {
    validationUuid: string;
    /**
     * @deprecated Use `validationUuid`. The integer `validationId` is null
     * for validations created after the UUID migration (PROD-7386).
     */
    validationId: number | null;
    createdAt: Date;
    name: string;
    error: string;
    errorType: ValidationErrorType;
    projectUuid: string;
    spaceUuid?: string;
    source?: ValidationSourceType;
};
export type ValidationErrorChartResponse = ValidationResponseBase & {
    chartUuid: string | undefined;
    chartKind?: ChartKind;
    fieldName?: string;
    lastUpdatedBy?: string;
    lastUpdatedAt?: Date;
    chartViews: number;
    chartName?: string;
};
export type ValidationErrorDashboardResponse = ValidationResponseBase & {
    dashboardUuid: string | undefined;
    chartName?: string;
    fieldName?: string;
    tableName?: string;
    dashboardFilterErrorType?: DashboardFilterValidationErrorType;
    lastUpdatedBy?: string;
    lastUpdatedAt?: Date;
    dashboardViews: number;
};
export type ValidationErrorTableResponse = Omit<ValidationResponseBase, 'name'> & {
    name: string | undefined;
};
export type ValidationResponse = ValidationErrorChartResponse | ValidationErrorDashboardResponse | ValidationErrorTableResponse;
export type CreateTableValidation = Pick<ValidationErrorTableResponse, 'error' | 'errorType' | 'projectUuid' | 'name' | 'source'> & {
    modelName: string;
};
export type CreateChartValidation = Pick<ValidationErrorChartResponse, 'error' | 'errorType' | 'fieldName' | 'name' | 'projectUuid' | 'chartUuid' | 'source' | 'chartName'>;
export type CreateDashboardValidation = Pick<ValidationErrorDashboardResponse, 'error' | 'errorType' | 'fieldName' | 'name' | 'projectUuid' | 'dashboardUuid' | 'chartName' | 'source'>;
export type CreateValidation = CreateTableValidation | CreateChartValidation | CreateDashboardValidation;
/** @deprecated Use ApiPaginatedValidateResponse with GET /validate/list instead */
export type ApiValidateResponse = {
    status: 'ok';
    results: ValidationResponse[];
};
export type ApiPaginatedValidateResponse = ApiSuccess<KnexPaginatedData<ValidationResponse[]>>;
export type ApiSingleValidationResponse = ApiSuccess<ValidationResponse>;
export type ApiValidationDismissResponse = {
    status: 'ok';
};
export type ApiChartValidationResponse = ApiSuccess<{
    errors: CreateChartValidation[];
}>;
export type ApiDashboardValidationResponse = ApiSuccess<{
    errors: CreateDashboardValidation[];
}>;
export type ValidationSummary = Pick<ValidationResponse, 'error' | 'createdAt' | 'validationUuid' | 'validationId'>;
export declare enum ValidationErrorType {
    Chart = "chart",
    Sorting = "sorting",
    Filter = "filter",
    Metric = "metric",
    Model = "model",
    Dimension = "dimension",
    CustomMetric = "custom metric",
    ChartConfiguration = "chart configuration"
}
export declare enum DashboardFilterValidationErrorType {
    FieldDoesNotExist = "field_does_not_exist",
    FieldTableMismatch = "field_table_mismatch",
    TableNotUsedByAnyChart = "table_not_used_by_any_chart",
    TableDoesNotExist = "table_does_not_exist"
}
export declare enum ValidationSourceType {
    Chart = "chart",
    Dashboard = "dashboard",
    Table = "table"
}
export declare const isTableValidationError: (error: ValidationResponse | CreateValidation) => error is ValidationErrorTableResponse | CreateTableValidation;
export declare const isChartValidationError: (error: ValidationResponse | CreateValidation) => error is ValidationErrorChartResponse | CreateChartValidation;
export declare const isDashboardValidationError: (error: ValidationResponse | CreateValidation) => error is ValidationErrorDashboardResponse | CreateDashboardValidation;
/**
 * Checks if a dashboard validation error is fixable via rename.
 * Fixable: FieldDoesNotExist (field renamed), TableDoesNotExist (model renamed),
 * FieldTableMismatch (field doesn't match table after model rename).
 */
export declare const isFixableDashboardValidationError: (error: ValidationResponse) => error is ValidationErrorDashboardResponse;
export declare enum ValidationTarget {
    CHARTS = "charts",
    DASHBOARDS = "dashboards",
    TABLES = "tables"
}
export declare function isValidationTargetValid(validationTarget: string): boolean;
//# sourceMappingURL=validation.d.ts.map