import invokeApi from '../helpers/apiHelpers'; import apiPath from '../constants/apiPath'; import config from '../config'; export const initialPdfFile = async (token: string): Promise => invokeApi({ path: apiPath.initPdf, method: 'GET', data: { f: token, }, }); export const saveFile = async (token: string, data: any): Promise => invokeApi({ path: `${apiPath.saveFile}?f=${token}`, method: 'POST', data, }); export const fetchXfdf = (token: string): Promise => fetch(`${config.API_HOST}${apiPath.getXfdf}?f=${token}`).then(res => res.text() ); export default {};