- Remove XML builder, format query param, and XML tests - Simplify ExportFlowModal (no format picker) - Simplify rfflowParser (JSON-only) - Remove format field from schemas and types Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
18 lines
595 B
TypeScript
18 lines
595 B
TypeScript
import apiClient from './client'
|
|
import type { RFFlowFile, FlowImportResponse } from '@/types'
|
|
|
|
export const flowTransferApi = {
|
|
async exportFlow(treeId: string): Promise<Blob> {
|
|
const response = await apiClient.get(`/trees/${treeId}/export`, {
|
|
responseType: 'blob',
|
|
})
|
|
return response.data
|
|
},
|
|
|
|
async importFlow(data: RFFlowFile, nameOverride?: string): Promise<FlowImportResponse> {
|
|
const params = nameOverride ? { name_override: nameOverride } : undefined
|
|
const response = await apiClient.post('/trees/import', data, { params })
|
|
return response.data
|
|
},
|
|
}
|