import { request , IRequestOptions } from "@esri/arcgis-rest-request" ; import { IItemUpdate } from "@esri/arcgis-rest-types" ; import { getPortalUrl } from "../util/get-portal-url" ; export interface IUpdateGroupOptions extends IRequestOptions { group : IItemUpdate ; } param requestOptions returns export function updateGroup ( requestOptions ) { const url = `${ getPortalUrl ( requestOptions ) }/community/groups/${ requestOptions . group . id }/update` ; requestOptions . params = { ... requestOptions . params , ... requestOptions . group } ; return request ( url , requestOptions ) ; }