export type DeleteApiV1DomeConfigsConfigIdArgs = {config_id: string, team_id: string}; export type DeleteApiV1DomeConfigsConfigIdOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Delete Dome Config * * DELETE /v1/dome-configs/{config_id} */ export const deleteApiV1DomeConfigsConfigId = async (args: DeleteApiV1DomeConfigsConfigIdArgs, options: DeleteApiV1DomeConfigsConfigIdOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.team_id != null) query.append("team_id", String(args.team_id)) const url = `${baseUrl.replace(/\/+$/, '')}/v1/dome-configs/${encodeURIComponent(String(args.config_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 };