export type CreateApiV1TasksIdEntitiesEntityIdPauseArgs = {id: string, entityId: string}; export type CreateApiV1TasksIdEntitiesEntityIdPauseOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * pause * * POST /v1/tasks/{id}/entities/{entityId}/pause */ export const createApiV1TasksIdEntitiesEntityIdPause = async (args: CreateApiV1TasksIdEntitiesEntityIdPauseArgs, options?: CreateApiV1TasksIdEntitiesEntityIdPauseOptions) => { 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(/\/+$/, '')}/v1/tasks/${encodeURIComponent(String(args.id))}/entities/${encodeURIComponent(String(args.entityId))}/pause${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };