import { Identifiable } from "@/data"; import { axios } from "@/api/index"; export enum UploadType { Ipp = "IppScan", DeanConsent = "DeanConsent", Insurance = "NnwInsurance", } const CREATE_DOCUMENT_ENDPOINT = '/document'; const DOCUMENT_UPLOAD_ENDPOINT = '/document/:id/scan'; interface Document extends Identifiable { description?: string; type: UploadType; } export async function create(type: UploadType, content: File) { const response = await axios.post(CREATE_DOCUMENT_ENDPOINT, { type }); console.log(response.data); }