import { api } from "../utils/axiosClient";

export const DocumentRepository = {
   uploadDocument:(data)=> api.post(`/api/Document/upload`,data),
   getDocumentList:(entityTypeId,entityId,pageSize, pageNumber, filter,searchString)=>{
       const payloadJsonString = JSON.stringify(filter);
      return api.get(`/api/Document/list/${entityTypeId}/entity/${entityId}/?pageSize=${pageSize}&pageNumber=${pageNumber}&filter=${payloadJsonString}&searchString=${searchString}`)
   },
   getDocumentById:(id)=>api.get(`/api/Document/${id}`),

   getFilterEntities:(entityTypeId)=>api.get(`/api/Document/get/filter/${entityTypeId}`),

   UpdateDocument:(documentId,data)=>api.get(`/api/Expense/edit/${documentId}`,data)

}
