import { request } from "@esri/arcgis-rest-request" ; import { getPortalUrl } from "../util/get-portal-url" ; import { IUserGroupOptions } from "./helpers" ; param requestOptions returns export function joinGroup ( requestOptions ) { const url = `${ getPortalUrl ( requestOptions ) }/community/groups/${ requestOptions . id }/join` ; return request ( url , requestOptions ) ; } param requestOptions returns export function leaveGroup ( requestOptions ) { const url = `${ getPortalUrl ( requestOptions ) }/community/groups/${ requestOptions . id }/leave` ; return request ( url , requestOptions ) ; }