export type CreateApihttpLocalhost8000ProjectIdSkeletonsSamplerCountArgs = {project_id: string, skeleton_ids: string}; export type CreateApihttpLocalhost8000ProjectIdSkeletonsSamplerCountOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Get the number of samplers associated with each skeleton in the passed in * * POST http://localhost:8000/{project_id}/skeletons/sampler-count */ export const createApihttpLocalhost8000ProjectIdSkeletonsSamplerCount = async (args: CreateApihttpLocalhost8000ProjectIdSkeletonsSamplerCountArgs, options?: CreateApihttpLocalhost8000ProjectIdSkeletonsSamplerCountOptions) => { const {baseUrl = "http://localhost:8000", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}http://localhost:8000/${encodeURIComponent(String(args.project_id))}/skeletons/sampler-count${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };