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.

17 lines
628 B

2 years ago
  1. import { CommentItem, CommentItemList } from '~/domain/models/comment/comment'
  2. export type SearchOption = { [key: string]: string | (string | null)[] }
  3. export interface CommentRepository {
  4. listAll(projectId: string, { limit, offset, q }: SearchOption): Promise<CommentItemList>
  5. list(projectId: string, docId: number): Promise<CommentItem[]>
  6. create(projectId: string, docId: number, text: string): Promise<CommentItem>
  7. update(projectId: string, item: CommentItem): Promise<CommentItem>
  8. delete(projectId: string, commentId: number): Promise<void>
  9. deleteBulk(projectId: string, items: number[]): Promise<void>
  10. }