export type GetApihttpLocalhost8000ProjectIdSkeletonsArgs = {project_id: string, created_by?: string | undefined, reviewed_by?: string | undefined, from_date?: string | undefined, to_date?: string | undefined, nodecount_gt?: string | undefined}; export type GetApihttpLocalhost8000ProjectIdSkeletonsOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * List skeletons matching filtering criteria. * * GET http://localhost:8000/{project_id}/skeletons/ */ export const getApihttpLocalhost8000ProjectIdSkeletons = async (args: GetApihttpLocalhost8000ProjectIdSkeletonsArgs, options?: GetApihttpLocalhost8000ProjectIdSkeletonsOptions) => { const {baseUrl = "http://localhost:8000", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.created_by != null) query.append("created_by", String(args.created_by)) if (args.reviewed_by != null) query.append("reviewed_by", String(args.reviewed_by)) if (args.from_date != null) query.append("from_date", String(args.from_date)) if (args.to_date != null) query.append("to_date", String(args.to_date)) if (args.nodecount_gt != null) query.append("nodecount_gt", String(args.nodecount_gt)) const url = `${baseUrl.replace(/\/+$/, '')}http://localhost:8000/${encodeURIComponent(String(args.project_id))}/skeletons/${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 };