export type DeleteApiV1GenomesGenomeIdArgs = {genome_id: string}; export type DeleteApiV1GenomesGenomeIdOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Delete Genome * * DELETE /v1/genomes/{genome_id} */ export const deleteApiV1GenomesGenomeId = async (args: DeleteApiV1GenomesGenomeIdArgs, options: DeleteApiV1GenomesGenomeIdOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/v1/genomes/${encodeURIComponent(String(args.genome_id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };