You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
794 B

  1. import { DocumentItem, DocumentItemList } from '~/domain/models/document/document'
  2. export type SearchOption = {[key: string]: string | (string | null)[]}
  3. export interface DocumentRepository {
  4. list(projectId: string, { limit, offset, q, isChecked, filterName }: SearchOption): Promise<DocumentItemList>
  5. create(projectId: string, item: DocumentItem): Promise<DocumentItem>
  6. update(projectId: string, item: DocumentItem): Promise<DocumentItem>
  7. bulkDelete(projectId: string, ids: number[]): Promise<void>
  8. deleteAll(projectId: string): Promise<void>
  9. uploadFile(projectId: string, payload: FormData): Promise<void>
  10. exportFile(projectId: string, format: string, onlyApproved: boolean): Promise<any>
  11. approve(projectId: string, docId: number, approved: boolean): Promise<void>
  12. }