createOrUpdateEntitySettings

Function

Creates or updates the entity settings for an entity. Currently this how the following are configured/persisted:

  1. allowed participation channels
  2. allowed locations (geometries representing the region(s) on the map where users can draw custom geometries to attach to their posts/replies)

Parameters

Parameter Type Default Notes
entity Required

An IHubEntity that implements discussions-related traits

requestOptions Required IHubRequestOptions

An IHubRequestOptions object

allowedLocations Optional Polygon[] null

An optional Polygon[] representing the allowed locations for discussion post/reply geometries, defaults to null

Available requestOptions

Property Type Notes
authentication Optional ArcGISIdentityManager
fetch Optional function(input: RequestInfo, init: RequestInit) : Promise<Response>

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

hubApiUrl Optional string
isPortal Optional boolean
portalSelf Optional IHubRequestOptionsPortalSelf

Returns

a promise that resolves an IEntitySetting object

Promise<IEntitySetting>
Property Type Notes
id string
settings IEntitySettings
type EntitySettingType
createdAt Inherited Date
creator Inherited string
editor Inherited string
updatedAt Inherited Date

Function defined in common/src/core/_internal/createOrUpdateEntitySettings.ts:21