feat: make spatial entry optional and authoritative
GeoIntel release gates / Compile, test, contracts and builds (push) Canceled after 0s
GeoIntel release gates / Python and npm vulnerability policy (push) Canceled after 0s
GeoIntel release gates / GIS image, SBOM and container scan (push) Canceled after 0s

This commit is contained in:
Jens
2026-07-26 03:39:50 +02:00
parent 5efcf94d82
commit 25b6f1ab39
21 changed files with 462 additions and 104 deletions
+5 -1
View File
@@ -1,5 +1,5 @@
import { apiGet, apiPost, apiPatch } from './client'
import type { AreaCreate, AreaListResponse, AreaRead } from '../../types'
import type { AreaCreate, AreaListResponse, AreaRead, MunicipalitySearchResponse } from '../../types'
const AREA_PAGE_SIZE = 200
@@ -36,4 +36,8 @@ export const areasApi = {
apiGet<AreaRead>(`/api/v1/projects/${projectId}/areas/${areaId}`),
update: (projectId: string, areaId: string, payload: Partial<AreaCreate>): Promise<AreaRead> =>
apiPatch<AreaRead>(`/api/v1/projects/${projectId}/areas/${areaId}`, payload),
searchMunicipalities: (projectId: string, query: string): Promise<MunicipalitySearchResponse> =>
apiGet<MunicipalitySearchResponse>(`/api/v1/projects/${projectId}/areas/municipalities?query=${encodeURIComponent(query)}&limit=12`),
activateMunicipality: (projectId: string, niscode: string): Promise<AreaRead> =>
apiPost<AreaRead>(`/api/v1/projects/${projectId}/areas/municipalities/${encodeURIComponent(niscode)}/activate`, {}),
}