import { IHubRequestOptions } from "@esri/hub-common" ; import { getItemData } from "@esri/arcgis-rest-portal" ; param { String } id param { IHubRequestOptions } hubRequestOptions private export function _getSiteDataById ( id , hubRequestOptions ) { return getItemData ( id , hubRequestOptions ) . then ( data => { if ( data . values . groupId && ! data . values . collaborationGroupId ) { data . values . collaborationGroupId = data . values . groupId ; delete data . values . groupId ; } return data ; } ) ; }