import { request, parseFilenameFromDisposition } from '@/utils'

export const parse_finance_data = (data) => {
    return request.post('/parse_finance_data/parse', data, { timeout: 15*60*1000, responseType: 'blob' }).then((response) => {
        const filename = parseFilenameFromDisposition(response.headers['content-disposition'])
        return {
            blob: new Blob([response.data]),
            filename,
        }
    })
}

export const get_task_list = (params = {}) => request.get('/parse_finance_data/list', { params })

