export type DeleteApiAvxLightingsystemV1SpectrumsIdArgs = {id: string}; export type DeleteApiAvxLightingsystemV1SpectrumsIdOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Delete the spectrum file with the given identifier. * * DELETE /avx-lightingsystem/v1/spectrums/{id} */ export const deleteApiAvxLightingsystemV1SpectrumsId = async (args: DeleteApiAvxLightingsystemV1SpectrumsIdArgs, options: DeleteApiAvxLightingsystemV1SpectrumsIdOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/avx-lightingsystem/v1/spectrums/${encodeURIComponent(String(args.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 };