export type GetApihttpLocalhost8000ProjectIdSkeletonSkeletonIdEswcArgs = {project_id: string, skeleton_id: string}; export type GetApihttpLocalhost8000ProjectIdSkeletonSkeletonIdEswcOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Export an extended SWC file. It includes a creation user name, creation * * GET http://localhost:8000/{project_id}/skeleton/{skeleton_id}/eswc */ export const getApihttpLocalhost8000ProjectIdSkeletonSkeletonIdEswc = async (args: GetApihttpLocalhost8000ProjectIdSkeletonSkeletonIdEswcArgs, options?: GetApihttpLocalhost8000ProjectIdSkeletonSkeletonIdEswcOptions) => { 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))}/skeleton/${encodeURIComponent(String(args.skeleton_id))}/eswc${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 };