fetchHubGroup

Function

Get a Hub Group by id we need to convert the IGroup we get to Hub Group

Parameters

Parameter Type Default Notes
identifier Required string
requestOptions Required IHubRequestOptions

Available requestOptions

Property Type Notes
authentication Optional UserSession
hubApiUrl Optional string
isPortal Optional boolean
portalSelf Optional IHubRequestOptionsPortalSelf
credentials Optional Inherited RequestCredentials

A string indicating whether credentials (cookies) will be sent with the request. Used internally for authentication workflows.

fetch Optional Inherited function(input: RequestInfo, init: RequestInit) : Promise<Response>

The implementation of fetch to use. Defaults to a global fetch.

headers Optional Inherited [key: string]: any

Additional Headers to pass into the request.

hideToken Optional Inherited boolean

Prevents the token from being passed in a URL Query param that is saved in browser history. Instead, the token will be passed in POST request body or through X-Esri-Authorization header. NOTE: This will force POST requests in browsers since auth header is not yet supported by preflight OPTIONS check with CORS.

httpMethod Optional Inherited HTTPMethods

The HTTP method to send the request with.

maxUrlLength Optional Inherited number

If the length of a GET request's URL exceeds maxUrlLength the request will use POST instead.

params Optional Inherited IParams

Additional parameters to pass in the request.

portal Optional Inherited string

Base url for the portal you want to make the request to. Defaults to authentication.portal if authentication exists, otherwise to 'https://www.arcgis.com/sharing/rest'.

rawResponse Optional Inherited boolean

Return the raw response

Returns

Promise<IHubGroup>
Property Type Notes
access AccessLevel

Access level of the group ("private" | "org" | "public") we are using AccessLevel instead of SettableAccessLevel intentionally due to the Portal API being inconsistent between .access on items vs groups

canDelete boolean

Whether the user can delete the group, only owners and admins can

canEdit boolean

Whether the user can edit the group, only owners and admins can

isDiscussable boolean

Whether discussions are enabled or disabled

isInvitationOnly boolean

Whether the group accepts members through invitations only

isReadOnly boolean

Whether the group is for read only or not

isSharedUpdate boolean

Whether the group is editable

isViewOnly boolean

Whether the group is for view only or not

protected boolean

Whether the group is protected or not the group cannot be deleted if protected

createdDate Inherited Date

Date the entity was created

createdDateSource Inherited string

Source of the creation date as a property path e.q item.created

id Inherited string

Id of the entity as a string

name Inherited string

Name of the Entity For Entities backed by items, this is typically the title

type Inherited string

For Item backed results, this will be item.type Otherwise it will be "Group", "User", "Event" etc

updatedDate Inherited Date

Date when the entity was last updated Depending on the entity, this could be derived in many different ways

updatedDateSource Inherited string

Source of the updated date

_clearEmptyFields Optional boolean

Whether there is a field we are trying to clear, if true, we need to send clearEmptyFields: true to the updateGroup call

_join Optional "invite" | "request" | "auto"

The join type for the group (invite, request, auto) This is mapped to isInvitationOnly and autoJoin

autoJoin Optional boolean

Whether members can auto join the group

description Optional string

Description for the group

hiddenMembers Optional boolean

Whether members of the group are hidden

isOpenData Optional boolean

Whether the group is an open data group

leavingDisallowed Optional boolean

Is it an admin group / is leaving disallowed

memberType Optional MemberType

Member types of the group ("owner" | "admin" | "member" | "none")

membershipAccess Optional MembershipAccess

Who can join the groups (organization, collaborators, anyone)

orgId Optional string

Id of the org that the group belongs to Depending who is fetching the group, and the owning org's settings this may not be returned from the Portal API

owner Optional string

Username of the owner of the group

sortField Optional GroupSortField

Sort field for the Group

sortOrder Optional PlatformSortOrder

Sort order for the Group

tags Optional string[]

User configurable tags

thumbnail Optional string

Group thumbnail url (read-only)

thumbnailUrl Optional string

Group thumbnail url (read-only)

typeKeywords Optional string[]

System configurable typekeywords

discussionSettings Optional Inherited IDiscussionsSettings

The entity's discussion settings

entitySettingsId Optional Inherited string
features Optional Inherited IFeatureFlags

We need a means to enable / disable the "feature/capability" represented by a permission for an entity. e.g. we want to disable events for a site, so we have hub:site:events: false

permissions Optional Inherited IEntityPermissionPolicy[]

Array of permission policies that apply to the entity Only permissions with `entity

source Optional Inherited string

Source of the entity. Exact logic for this tbd, but the intent is to allow the result to be attributed to something other than "owner"

summary Optional Inherited string

Sanitized summary derived from item.snippet, item.description, group.description, user.description, event.description etc


Function defined in common/src/groups/HubGroups.ts:143