export type DeleteApiDevicesIdClientMonitorArgs = {id: number}; export type DeleteApiDevicesIdClientMonitorOptions = {baseUrl?: string | undefined, Bearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * Revoke client monitor setting for a device * * DELETE /devices/{id}/client-monitor */ export const deleteApiDevicesIdClientMonitor = async (args: DeleteApiDevicesIdClientMonitorArgs, options?: DeleteApiDevicesIdClientMonitorOptions) => { const {baseUrl = "https://api.extremecloudiq.com", fetch: fetchFn = fetch, Bearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (Bearer !== undefined) headers.set('authorization', `Bearer ${Bearer}`) const url = `${baseUrl.replace(/\/+$/, '')}/devices/${encodeURIComponent(String(args.id))}/client-monitor${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 };