export type GetApiAppProjectsProjectVerticalContextArgs = {project: number}; export type GetApiAppProjectsProjectVerticalContextOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Niche benchmarks + negatives assembled for a project's vertical (for UI + prompt grounding) * * GET /app/projects/{project}/vertical-context */ export const getApiAppProjectsProjectVerticalContext = async (args: GetApiAppProjectsProjectVerticalContextArgs, options: GetApiAppProjectsProjectVerticalContextOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/app/projects/${encodeURIComponent(String(args.project))}/vertical-context${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };