Persist map area selection exports
GeoIntel CI / docs-smoke (push) Has been cancelled
GeoIntel CI / contract-smoke (push) Has been cancelled

This commit is contained in:
Codex
2026-06-25 02:12:09 +02:00
parent f773225b98
commit 46fe3edfc5
15 changed files with 359 additions and 7 deletions
+18 -2
View File
@@ -1,9 +1,25 @@
import { apiGet, apiPost, apiUrl } from './client'
import type { ExportContentResponse, ExportCreateResponse, ExportKind, ExportListResponse, ExportRead } from '../../types'
import type {
ExportContentResponse,
ExportCreateResponse,
ExportKind,
ExportListResponse,
ExportRead,
VectorSelectionBBox,
} from '../../types'
export const exportsApi = {
exportGeojson: (
payload: { dataset_id?: string; analysis_run_id?: string; export_kind?: ExportKind; name?: string } | string,
payload:
| {
dataset_id?: string
analysis_run_id?: string
export_kind?: ExportKind
name?: string
bbox?: VectorSelectionBBox
limit?: number
}
| string,
): Promise<ExportCreateResponse> => {
const body = typeof payload === 'string' ? { dataset_id: payload, export_kind: 'dataset' } : payload
return apiPost<ExportCreateResponse>(`/api/v1/exports/geojson`, body)