import { ProjectUIDL } from '@teleporthq/teleport-types'; import { InstantSearchConfig, SearchSectionKey } from './settings'; /** * The sections the search route reads from the database: which table, which * data source, which columns to match and to show, and where a row's page is. * A section exists only while its feature is on, its table reachable through * a data source the generated fetchers know, and its rows have a page to * open — a result that leads nowhere is left out whole. */ export interface DetailsRoute { /** `/products` for `/products/[slug]`. */ staticBase: string; /** The row column the address ends with. */ column: string; } export interface DbSearchSection { key: Exclude; label: string; tableName: string; dataSourceId: string; dataSourceType: string; route: DetailsRoute; /** The columns the search term is matched against. */ searchColumns: string[]; titleColumns: string[]; descriptionColumns: string[]; imageColumns: string[]; /** A column that must not read false for the row to be shown. */ activeColumn: string | null; } /** * The details page bound to `tableName`, from the project's routes: `/[]`. * A public page wins over an editor under `/admin` for the same table, so a compared * booking item opens on `/book/[slug]` rather than the admin update page. */ export declare const resolveDetailsRouteForTable: (uidl: ProjectUIDL, tableName: string) => DetailsRoute | null; /** The data source a table is read through: the page resource that binds it, else the shared TeleportHQ one. */ export declare const resolveTableDataSource: (uidl: ProjectUIDL, tableName: string) => { dataSourceId: string; dataSourceType: string; } | null; /** The database sections the configuration asks for and the project can serve, in the modal's order. */ export declare const resolveDbSearchSections: (uidl: ProjectUIDL, config: InstantSearchConfig) => DbSearchSection[]; //# sourceMappingURL=sections.d.ts.map