import type { $Fetch } from 'ofetch'; import type { List } from '~/types/lists' export default class ListRepository { private fetcher: $Fetch; constructor(fetcher: $Fetch) { this.fetcher = fetcher; } async getAll() { return await this.fetcher('/lists'); } async create(data: Partial) { return await this.fetcher('/lists', { method: 'POST', body: data }); } }