import { BaseService, RequestHelper } from '../infrastructure'; import { RequestOptions } from '../infrastructure/RequestHelper'; class ProjectImportExport extends BaseService { download(projectId: ProjectId) { const pId = encodeURIComponent(projectId); return RequestHelper.get(this, `projects/${pId}/export/download`); } exportStatus(projectId: ProjectId) { const pId = encodeURIComponent(projectId); return RequestHelper.get(this, `projects/${pId}/export`); } import(file: temporaryAny, path: string, options: RequestOptions) { return RequestHelper.post(this, 'projects/import', { file, path, ...options }); } importStatus(projectId: ProjectId) { const pId = encodeURIComponent(projectId); return RequestHelper.get(this, `projects/${pId}/import`); } schedule(projectId: ProjectId, options: RequestOptions) { const pId = encodeURIComponent(projectId); return RequestHelper.post(this, `projects/${pId}/export`, options); } } export default ProjectImportExport;