export type CreateApihttpLocalhost8000ProjectIdLandmarksGroupsLandmarkgroupIdArgs = {project_id: string, landmarkgroup_id: string, landmark_id: string, body: {name?: string | undefined, members?: string | undefined, append_members?: string | undefined}}; export type CreateApihttpLocalhost8000ProjectIdLandmarksGroupsLandmarkgroupIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Update an existing landmark group. * * POST http://localhost:8000/{project_id}/landmarks/groups/{landmarkgroup_id}/ */ export const createApihttpLocalhost8000ProjectIdLandmarksGroupsLandmarkgroupId = async (args: CreateApihttpLocalhost8000ProjectIdLandmarksGroupsLandmarkgroupIdArgs, options?: CreateApihttpLocalhost8000ProjectIdLandmarksGroupsLandmarkgroupIdOptions) => { const {baseUrl = "http://localhost:8000", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/x-www-form-urlencoded") const url = `${baseUrl.replace(/\/+$/, '')}http://localhost:8000/${encodeURIComponent(String(args.project_id))}/landmarks/groups/${encodeURIComponent(String(args.landmarkgroup_id))}/${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: new URLSearchParams(Object.entries(args.body).flatMap(([key, value]) => (value == null ? [] : [[key, String(value)]])))}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };