export type DeleteApiSmolmachinesV1MachinesIdArgs = {id: string}; export type DeleteApiSmolmachinesV1MachinesIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Permanently delete a machine and its storage * * DELETE /smolmachines/v1/machines/{id} */ export const deleteApiSmolmachinesV1MachinesId = async (args: DeleteApiSmolmachinesV1MachinesIdArgs, options?: DeleteApiSmolmachinesV1MachinesIdOptions) => { const {baseUrl = "https://api.orthogonal.com/mpp", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/smolmachines/v1/machines/${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 };