Persist map area selection exports
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user