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.

19 lines
703 B

  1. import { DocumentItem, DocumentItemList } from '@/models/document'
  2. export type SearchOption = {[key: string]: string | (string | null)[]}
  3. export interface DocumentItemRepository {
  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. }