export type DeleteApiAvxLightingsystemV1LightingsystemsLightingSystemIdentifierArgs = {lightingSystemIdentifier: string}; export type DeleteApiAvxLightingsystemV1LightingsystemsLightingSystemIdentifierOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Delete a lighting system with the given identifier. * * DELETE /avx-lightingsystem/v1/lightingsystems/{lightingSystemIdentifier} */ export const deleteApiAvxLightingsystemV1LightingsystemsLightingSystemIdentifier = async (args: DeleteApiAvxLightingsystemV1LightingsystemsLightingSystemIdentifierArgs, options: DeleteApiAvxLightingsystemV1LightingsystemsLightingSystemIdentifierOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/avx-lightingsystem/v1/lightingsystems/${encodeURIComponent(String(args.lightingSystemIdentifier))}${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 };