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
678 B

2 years ago
  1. import { ExampleItem, ExampleItemList } from '~/domain/models/example/example'
  2. export type SearchOption = { [key: string]: string | (string | null)[] }
  3. export interface ExampleRepository {
  4. list(projectId: string, { limit, offset, q, isChecked }: SearchOption): Promise<ExampleItemList>
  5. create(projectId: string, item: ExampleItem): Promise<ExampleItem>
  6. update(projectId: string, item: ExampleItem): Promise<ExampleItem>
  7. bulkDelete(projectId: string, ids: number[]): Promise<void>
  8. deleteAll(projectId: string): Promise<void>
  9. findById(projectId: string, exampleId: number): Promise<ExampleItem>
  10. confirm(projectId: string, exampleId: number): Promise<void>
  11. }