export type GetApihttpLocalhost8000ProjectIdVolumesVolumeIdIntersectArgs = {project_id: string, volume_id: string, x?: string | undefined, y?: string | undefined, z?: string | undefined}; export type GetApihttpLocalhost8000ProjectIdVolumesVolumeIdIntersectOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Test if a point intersects with the bounding box of a given volume. * * GET http://localhost:8000/{project_id}/volumes/{volume_id}/intersect */ export const getApihttpLocalhost8000ProjectIdVolumesVolumeIdIntersect = async (args: GetApihttpLocalhost8000ProjectIdVolumesVolumeIdIntersectArgs, options?: GetApihttpLocalhost8000ProjectIdVolumesVolumeIdIntersectOptions) => { const {baseUrl = "http://localhost:8000", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.x != null) query.append("x", String(args.x)) if (args.y != null) query.append("y", String(args.y)) if (args.z != null) query.append("z", String(args.z)) const url = `${baseUrl.replace(/\/+$/, '')}http://localhost:8000/${encodeURIComponent(String(args.project_id))}/volumes/${encodeURIComponent(String(args.volume_id))}/intersect${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 };