export type GetApiV2ResellersAccountsAccountIdBackupTasksIdArgs = {id: string, accountId: string}; export type GetApiV2ResellersAccountsAccountIdBackupTasksIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * getTask * * GET /v2/resellers/accounts/{accountId}/backup-tasks/{id} */ export const getApiV2ResellersAccountsAccountIdBackupTasksId = async (args: GetApiV2ResellersAccountsAccountIdBackupTasksIdArgs, options?: GetApiV2ResellersAccountsAccountIdBackupTasksIdOptions) => { 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/resellers/accounts/${encodeURIComponent(String(args.accountId))}/backup-tasks/${encodeURIComponent(String(args.id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };