export type DeleteApiAvxLightingsystemV1LightingsystemsLightingSystemIdentifierProjectorsProjectorIdentifierArgs = {lightingSystemIdentifier: string, projectorIdentifier: number}; export type DeleteApiAvxLightingsystemV1LightingsystemsLightingSystemIdentifierProjectorsProjectorIdentifierOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Delete a projector. * * DELETE /avx-lightingsystem/v1/lightingsystems/{lightingSystemIdentifier}/projectors/{projectorIdentifier} */ export const deleteApiAvxLightingsystemV1LightingsystemsLightingSystemIdentifierProjectorsProjectorIdentifier = async (args: DeleteApiAvxLightingsystemV1LightingsystemsLightingSystemIdentifierProjectorsProjectorIdentifierArgs, options: DeleteApiAvxLightingsystemV1LightingsystemsLightingSystemIdentifierProjectorsProjectorIdentifierOptions) => { 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))}/projectors/${encodeURIComponent(String(args.projectorIdentifier))}${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 };