export type DeleteApiV2BackupTasksIdEntitiesEntityIdArgs = {id: string, entityId: string}; export type DeleteApiV2BackupTasksIdEntitiesEntityIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * delete * * DELETE /v2/backup-tasks/{id}/entities/{entityId} */ export const deleteApiV2BackupTasksIdEntitiesEntityId = async (args: DeleteApiV2BackupTasksIdEntitiesEntityIdArgs, options?: DeleteApiV2BackupTasksIdEntitiesEntityIdOptions) => { const {baseUrl = "https://api.cloudally.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") const url = `${baseUrl.replace(/\/+$/, '')}/v2/backup-tasks/${encodeURIComponent(String(args.id))}/entities/${encodeURIComponent(String(args.entityId))}${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 res.blob() };