import { type ContentVerificationInfo } from './contentVerification';
import { type Dashboard } from './dashboard';
import { type Table } from './explore';
import { type Dimension, type Metric } from './field';
import { type ChartKind, type SavedChart } from './savedCharts';
import { type Space } from './space';
import { type SqlChart } from './sqlRunner';
import { type ValidationErrorChartResponse, type ValidationErrorDashboardResponse, type ValidationErrorTableResponse } from './validation';
type RankedItem = {
    search_rank: number;
};
export type SpaceSearchResult = Pick<Space, 'uuid' | 'name' | 'uuid'> & RankedItem;
export type DashboardSearchResult = Pick<Dashboard, 'uuid' | 'name' | 'description' | 'spaceUuid' | 'projectUuid' | 'slug'> & {
    validationErrors: {
        validationUuid: ValidationErrorDashboardResponse['validationUuid'];
        /** @deprecated Use validationUuid. Null for post-migration validations. */
        validationId: ValidationErrorDashboardResponse['validationId'];
    }[];
    viewsCount: number;
    firstViewedAt: string | null;
    lastModified: string | null;
    createdBy: {
        firstName: string;
        lastName: string;
        userUuid: string;
    } | null;
    lastUpdatedBy: {
        firstName: string;
        lastName: string;
        userUuid: string;
    } | null;
    charts: {
        uuid: string;
        name: string;
        description?: string;
        chartType: ChartKind;
        viewsCount: number;
        verification: ContentVerificationInfo | null;
    }[];
    verification: ContentVerificationInfo | null;
} & RankedItem;
export type SavedChartSearchResult = Pick<SavedChart, 'uuid' | 'name' | 'description' | 'spaceUuid' | 'projectUuid' | 'slug'> & {
    chartType: ChartKind;
    validationErrors: {
        validationUuid: ValidationErrorChartResponse['validationUuid'];
        /** @deprecated Use validationUuid. Null for post-migration validations. */
        validationId: ValidationErrorChartResponse['validationId'];
    }[];
    chartSource: 'saved';
    viewsCount: number;
    firstViewedAt: string | null;
    lastModified: string | null;
    createdBy: {
        firstName: string;
        lastName: string;
        userUuid: string;
    } | null;
    lastUpdatedBy: {
        firstName: string;
        lastName: string;
        userUuid: string;
    } | null;
    verification: ContentVerificationInfo | null;
} & RankedItem;
export type SqlChartSearchResult = Pick<SqlChart, 'name' | 'description' | 'slug'> & {
    uuid: SqlChart['savedSqlUuid'];
    chartType: ChartKind;
    spaceUuid: SqlChart['space']['uuid'];
    projectUuid: SqlChart['project']['projectUuid'];
    chartSource: 'sql';
    viewsCount: number;
    firstViewedAt: string | null;
    lastModified: string | null;
    createdBy: {
        firstName: string;
        lastName: string;
        userUuid: string;
    } | null;
    lastUpdatedBy: {
        firstName: string;
        lastName: string;
        userUuid: string;
    } | null;
    verification: ContentVerificationInfo | null;
} & RankedItem;
export type AllChartsSearchResult = Pick<SavedChartSearchResult, 'uuid' | 'name' | 'description' | 'spaceUuid' | 'projectUuid' | 'slug'> & {
    chartType: ChartKind;
    chartSource: 'saved' | 'sql';
    viewsCount: number;
    firstViewedAt: string | null;
    lastModified: string | null;
    createdBy: {
        firstName: string;
        lastName: string;
        userUuid: string;
    } | null;
    lastUpdatedBy: {
        firstName: string;
        lastName: string;
        userUuid: string;
    } | null;
    verification: ContentVerificationInfo | null;
} & RankedItem;
export type TableSearchResult = Pick<Table, 'name' | 'label' | 'description' | 'requiredAttributes' | 'anyAttributes'> & {
    explore: string;
    exploreLabel: string;
    regexMatchCount: number;
};
export type TableErrorSearchResult = Pick<TableSearchResult, 'explore' | 'exploreLabel'> & {
    validationErrors: {
        validationUuid: ValidationErrorTableResponse['validationUuid'];
        /** @deprecated Use validationUuid. Null for post-migration validations. */
        validationId: ValidationErrorTableResponse['validationId'];
    }[];
};
export type FieldSearchResult = Pick<Dimension | Metric, 'name' | 'label' | 'description' | 'type' | 'fieldType' | 'table' | 'tableLabel'> & {
    requiredAttributes?: Record<string, string | string[]>;
    anyAttributes?: Record<string, string | string[]>;
    tablesRequiredAttributes?: Record<string, Record<string, string | string[]>>;
    tablesAnyAttributes?: Record<string, Record<string, string | string[]>>;
    explore: string;
    exploreLabel: string;
    regexMatchCount: number;
};
export type DataAppSearchResult = {
    uuid: string;
    name: string;
    description: string;
    spaceUuid: string | null;
    projectUuid: string;
    viewsCount: number;
    createdBy: {
        firstName: string;
        lastName: string;
        userUuid: string;
    } | null;
} & RankedItem;
type PageResult = {
    uuid: string;
    name: string;
    url: string;
};
export type DashboardTabResult = {
    uuid: string;
    name: string;
    dashboardUuid: string;
    dashboardName: string;
    spaceUuid: string;
};
export type SearchResult = SpaceSearchResult | DashboardSearchResult | DashboardTabResult | SavedChartSearchResult | SqlChartSearchResult | AllChartsSearchResult | TableErrorSearchResult | TableSearchResult | FieldSearchResult | PageResult | DataAppSearchResult;
export declare const isExploreSearchResult: (value: SearchResult) => value is TableSearchResult | FieldSearchResult;
export declare const isFieldSearchResult: (value: SearchResult) => value is FieldSearchResult;
export declare const isTableErrorSearchResult: (value: SearchResult) => value is TableErrorSearchResult;
export declare const isSavedChartSearchResult: (value: SearchResult) => value is SavedChartSearchResult;
export declare const isSqlChartSearchResult: (value: SearchResult) => value is SqlChartSearchResult;
export declare const isDashboardSearchResult: (value: SearchResult) => value is DashboardSearchResult;
export type SearchResults = {
    spaces: SpaceSearchResult[];
    dashboards: DashboardSearchResult[];
    savedCharts: SavedChartSearchResult[];
    sqlCharts: SqlChartSearchResult[];
    tables: (TableSearchResult | TableErrorSearchResult)[];
    fields: FieldSearchResult[];
    pages: PageResult[];
    dashboardTabs: DashboardTabResult[];
    dataApps: DataAppSearchResult[];
};
export declare const getSearchResultId: (meta: SearchResult | undefined) => string;
export declare enum SearchItemType {
    DASHBOARD = "dashboard",
    DASHBOARD_TAB = "dashboard_tab",
    CHART = "saved_chart",
    SQL_CHART = "sql_chart",
    SPACE = "space",
    TABLE = "table",
    FIELD = "field",
    PAGE = "page",
    DATA_APP = "data_app",
    SETTINGS = "settings"
}
export declare function getSearchItemTypeFromResultKey(searchResultKey: keyof SearchResults): SearchItemType.DASHBOARD | SearchItemType.DASHBOARD_TAB | SearchItemType.CHART | SearchItemType.SQL_CHART | SearchItemType.SPACE | SearchItemType.TABLE | SearchItemType.FIELD | SearchItemType.PAGE | SearchItemType.DATA_APP;
export type SearchFilters = {
    type?: string;
    fromDate?: string;
    toDate?: string;
    createdByUuid?: string;
};
export {};
//# sourceMappingURL=search.d.ts.map