Create a new Hub Group we are creating an IGroup with the createGroup call so we need to convert the Hub Group to IGroup first then convert it back to Hub Group and return it

  • createHubGroup(partialGroup: Partial<IHubGroup>, requestOptions: IUserRequestOptions) : Promise<IHubGroup>


Parameter Type Default Notes
partialGroup Required Partial<IHubGroup>
requestOptions Required IUserRequestOptions

Available requestOptions

Property Type Notes


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

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

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:102