import { client } from "./client"; import { normalizePage, pageQuery, type Page, type PageParams } from "./page"; import type { Course } from "./types"; export async function getCourses(params?: PageParams, signal?: AbortSignal): Promise> { const data = await client(`/courses${pageQuery(params)}`, { signal }); return normalizePage(data); }