export type CreateApihttpLocalhost8000ProjectIdLandmarksNormalizeNamesArgs = {project_id: string}; export type CreateApihttpLocalhost8000ProjectIdLandmarksNormalizeNamesOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Ensure all landmark names and landmark group names follow the same * * POST http://localhost:8000/{project_id}/landmarks/normalize-names */ export const createApihttpLocalhost8000ProjectIdLandmarksNormalizeNames = async (args: CreateApihttpLocalhost8000ProjectIdLandmarksNormalizeNamesArgs, options?: CreateApihttpLocalhost8000ProjectIdLandmarksNormalizeNamesOptions) => { 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))}/landmarks/normalize-names${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 };