IArcGISContext
Defines the properties of the ArcGISContext.
Typically components or functions will get an instance
of ArcGISContext
from ArcGISContetManager
.
ArcGISContext
implements this interface, and uses
getters to simplify the derivation of various complex properties.
Properties
Property | Type | Notes |
---|---|---|
string |
Returns the Community Org Hostname, if defined |
|
string |
Return Hub Community Org Id, if defined |
|
string |
Returns the Hub Community Org url |
|
IUser |
Returns the current user |
|
string |
Returns the discussions API URL |
|
string |
Returns Hub Domain Service URL |
|
string |
If we are in a community org with an associated e-org Return the Hub Enterprise Org Id, if defined |
|
HubEnvironment |
What environment is this running in? |
|
any |
Returns the Events configuration object from portal/self |
|
IFeatureFlags |
Hash of feature flags |
|
any |
Returns the hash of helper services from portal self |
|
IHubHistory |
Return the user's history |
|
boolean |
Returns boolean indicating if the current user belongs to an organization that has licensed ArcGIS Hub |
|
string |
Returns the current user's hub-home url. If not authenticated, returns the Hub Url. If portal, returns undefined |
|
HubLicense |
What is the current user's hub license level? |
|
IHubRequestOptions |
Return a |
|
string |
Returns the Hub Search API URL |
|
string |
Returns the Hub url, based on the portalUrl |
|
number |
Unique id from the ArcGISContextManager that created this instance. Primarily useful for debugging possible race-conditions that can result in multiple ArcGISContextManager instances being created. |
|
boolean |
Is this user in a Hub Alpha org? Derived from properties.alphaOrgs |
|
boolean |
Return boolean indicating if authenticatio is present |
|
boolean |
Is this user in a Hub Beta org? Derived from properties.betaOrgs |
|
boolean |
Is the current users org type a community org? |
|
boolean |
Is the current user an org admin and not in a custom role? |
|
boolean |
Returns boolean indicating if the backing system is ArcGIS Enterprise (formerly ArcGIS Portal) or not |
|
string |
Url for the Hub OGC API |
|
string |
Return the portal thumbnail url |
|
IPortal |
Returns the portal object |
|
string |
Return the portal url. |
|
Record<stringany> |
Additional app-specific context |
|
IRequestOptions |
Return |
|
string[] |
Groups that contain Hub Resources (linkable documents etc) that are tagged to appear in different areas of the appliation. Default platform groups are defined per-environment in the "HUB_RESOURE_GROUPS" const.. |
|
HubServiceStatus |
Hub Service Status |
|
UserSession |
Return the UserSession if authenticated |
|
string |
Returns the url to the sharing api composed from portalUrl i.e. https://myorg.maps.arcgis.com/sharing/rest |
|
string |
Return the Survey123 url |
|
string[] |
Array of Trusted Org Ids |
|
IHubTrustedOrgsResponse[] |
Trusted orgs xhr response |
|
IUserRequestOptions |
Return |
|
Optional | IUserHubSettings |
Hash of user hub settings. These are stored as
user-app-resources, associated with the |
Optional | IUserResourceToken[] |
Array of exchanged tokens for use with user-app-resources |
Methods
Method | Returns | Notes |
---|---|---|
|
Promise<void> |
Add an entry to the user's history If not authenticated, this function will no-op |
|
IPermissionAccessResponse |
Check specific permission for the current user, and optionally an entity |
|
Promise<void> |
Simple clear of the all of the user's history |
|
Promise<void> |
Refresh the current user, including their groups |
|
Promise<void> |
Remove a specific entry from the user's history |
|
string |
Return the token for a given app, if defined |
|
Promise<void> |
Update the user's hub settings directly from the Context |
addToHistory
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
entry Required | IHubHistoryEntry |
Returns
checkPermission
Check specific permission for the current user, and optionally an entity
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
permission Required | Permission | ||
entity Optional | HubEntity |
Returns
removeFromHistory
Remove a specific entry from the user's history
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
entry Required | IHubHistoryEntry |
Returns
tokenFor
Return the token for a given app, if defined
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
app Required | UserResourceApp |
Returns
updateUserHubSettings
Update the user's hub settings directly from the Context
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
settings Required | IUserHubSettings |
Returns
Interface defined in common/src/ArcGISContext.ts:68
Add an entry to the user's history If not authenticated, this function will no-op