import { IEnoRegistrationUnit } from "./IEnoRegistrationUnit"; /** Which field produced the hit. Identifier and GID values come from the exact match tier. */ export type DedSearchMatchedBy = "ean" | "eic" | "om" | "gid" | "name" | "address"; /** Nested coordinate array of a GeoJSON geometry. */ export type DedGeoJsonCoordinates = number[] | DedGeoJsonCoordinates[]; export interface IDedGeoJsonGeometry { type: string; coordinates: DedGeoJsonCoordinates; } export interface IDedCentroid { lat: number; lon: number; } export interface IDedBuildingSearchResult { gid: string; name: string | null; designation: string | null; /** * Evidenční jednotka, null when the building has no majetek record. Deliberately the same shape * as on the building detail endpoint so a client can reuse one type across both. */ registration_unit: IEnoRegistrationUnit | null; /** Main address of the building (eno_adresa.hlavni), null when the building has no address. */ address: string | null; /** Every distinct address of the building, main one first. */ addresses: string[]; matched_by: DedSearchMatchedBy; /** The identifier that matched, present only for exact matches. */ matched_value: string | null; score: number; identifiers: { ean: string[]; eic: string[]; om: string[]; }; /** Building outline in EPSG:4326, null when the building has no usable geometry. */ geometry: IDedGeoJsonGeometry | null; /** [minLon, minLat, maxLon, maxLat] in EPSG:4326, for zooming the map. */ bbox: [number, number, number, number] | null; centroid: IDedCentroid | null; geometry_source: string | null; has_building_record: boolean; active_points_count: number; } export interface IDedBuildingSearchResponse { query: string; /** True when at least one result came from the exact identifier or GID tier. */ matched_exactly: boolean; results: IDedBuildingSearchResult[]; }