@esri/hub-common 15.37.0 → 15.37.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/ArcGISContext.js +1 -1
- package/dist/esm/ArcGISContext.js.map +1 -1
- package/dist/esm/ArcGISContextManager.js +2 -2
- package/dist/esm/ArcGISContextManager.js.map +1 -1
- package/dist/esm/Hub.js +1 -1
- package/dist/esm/Hub.js.map +1 -1
- package/dist/esm/OperationStack.js +5 -5
- package/dist/esm/OperationStack.js.map +1 -1
- package/dist/esm/core/schemas/shared/HubItemEntitySchema.js +1 -1
- package/dist/esm/core/schemas/shared/HubItemEntitySchema.js.map +1 -1
- package/dist/esm/core/types/IHubContent.js.map +1 -1
- package/dist/esm/downloads/_internal/canUseExportImageFlow.js +1 -1
- package/dist/esm/downloads/_internal/canUseExportImageFlow.js.map +1 -1
- package/dist/esm/{types.js → hub-types.js} +1 -1
- package/dist/esm/hub-types.js.map +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/initiative-templates/view.js.map +1 -1
- package/dist/esm/initiatives/_internal/InitiativeSchema.js +1 -1
- package/dist/esm/initiatives/_internal/InitiativeSchema.js.map +1 -1
- package/dist/esm/initiatives/defaults.js +1 -1
- package/dist/esm/initiatives/defaults.js.map +1 -1
- package/dist/esm/initiatives/view.js +1 -1
- package/dist/esm/initiatives/view.js.map +1 -1
- package/dist/esm/items/fetch-all-pages.js +6 -6
- package/dist/esm/items/fetch-all-pages.js.map +1 -1
- package/dist/esm/items/interpolate-item-id.js +1 -1
- package/dist/esm/items/normalize-solution-template-item.js +2 -2
- package/dist/esm/items/normalize-solution-template-item.js.map +1 -1
- package/dist/esm/projects/_internal/ProjectSchema.js +1 -1
- package/dist/esm/projects/_internal/ProjectSchema.js.map +1 -1
- package/dist/esm/projects/defaults.js +1 -1
- package/dist/esm/projects/defaults.js.map +1 -1
- package/dist/esm/projects/view.js.map +1 -1
- package/dist/esm/resources/_internal/_validate-url-helpers.js +1 -1
- package/dist/esm/resources/_internal/_validate-url-helpers.js.map +1 -1
- package/dist/esm/resources/add-solution-resource-url-to-assets.js +1 -1
- package/dist/esm/resources/add-solution-resource-url-to-assets.js.map +1 -1
- package/dist/esm/resources/convert-solution-template-resources-to-assets.js +2 -2
- package/dist/esm/resources/convert-solution-template-resources-to-assets.js.map +1 -1
- package/dist/esm/resources/get-item-assets.js +3 -3
- package/dist/esm/resources/get-item-assets.js.map +1 -1
- package/dist/esm/resources/upload-resources-from-url.js +1 -1
- package/dist/esm/resources/validate-url.js +1 -1
- package/dist/esm/resources/validate-url.js.map +1 -1
- package/dist/esm/search/_internal/portalSearchItems.js +1 -1
- package/dist/esm/search/_internal/portalSearchItems.js.map +1 -1
- package/dist/esm/search/wellKnownCatalog.js.map +1 -1
- package/dist/esm/types/IArcGISContext.js +1 -0
- package/dist/esm/types/IArcGISContext.js.map +1 -0
- package/dist/esm/types/IArcGISContextManagerOptions.js +1 -0
- package/dist/esm/types/IArcGISContextManagerOptions.js.map +1 -0
- package/dist/esm/types/IArcGISContextOptions.js +1 -0
- package/dist/esm/types/IArcGISContextOptions.js.map +1 -0
- package/dist/esm/types/IUserResourceConfig.js +1 -0
- package/dist/esm/types/IUserResourceConfig.js.map +1 -0
- package/dist/esm/types/IUserResourceToken.js +1 -0
- package/dist/esm/types/IUserResourceToken.js.map +1 -0
- package/dist/esm/types/index.js +5 -0
- package/dist/esm/types/index.js.map +1 -1
- package/dist/esm/utils/IUserHubSettings.js +1 -0
- package/dist/esm/utils/IUserHubSettings.js.map +1 -0
- package/dist/esm/utils/IUserSiteSettings.js +4 -0
- package/dist/esm/utils/IUserSiteSettings.js.map +1 -0
- package/dist/esm/utils/batch.js +2 -2
- package/dist/esm/utils/batch.js.map +1 -1
- package/dist/esm/utils/hubUserAppResources.js.map +1 -1
- package/dist/esm/utils/index.js +2 -0
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/esm/utils/internal/siteSettingsMigrations.js.map +1 -1
- package/dist/esm/utils/revertable-tasks.js +5 -5
- package/dist/esm/utils/revertable-tasks.js.map +1 -1
- package/dist/node/ArcGISContext.js.map +1 -1
- package/dist/node/ArcGISContextManager.js.map +1 -1
- package/dist/node/Hub.js.map +1 -1
- package/dist/node/OperationStack.js +5 -5
- package/dist/node/OperationStack.js.map +1 -1
- package/dist/node/core/schemas/shared/HubItemEntitySchema.js +3 -3
- package/dist/node/core/schemas/shared/HubItemEntitySchema.js.map +1 -1
- package/dist/node/core/types/IHubContent.js.map +1 -1
- package/dist/node/downloads/_internal/canUseExportImageFlow.js +2 -2
- package/dist/node/downloads/_internal/canUseExportImageFlow.js.map +1 -1
- package/dist/node/{types.js → hub-types.js} +1 -1
- package/dist/node/hub-types.js.map +1 -0
- package/dist/node/index.js +1 -0
- package/dist/node/index.js.map +1 -1
- package/dist/node/initiative-templates/view.js.map +1 -1
- package/dist/node/initiatives/_internal/InitiativeSchema.js +3 -3
- package/dist/node/initiatives/_internal/InitiativeSchema.js.map +1 -1
- package/dist/node/initiatives/defaults.js +5 -5
- package/dist/node/initiatives/defaults.js.map +1 -1
- package/dist/node/initiatives/view.js +2 -2
- package/dist/node/initiatives/view.js.map +1 -1
- package/dist/node/items/fetch-all-pages.js +6 -6
- package/dist/node/items/fetch-all-pages.js.map +1 -1
- package/dist/node/items/interpolate-item-id.js +1 -1
- package/dist/node/items/normalize-solution-template-item.js +2 -2
- package/dist/node/items/normalize-solution-template-item.js.map +1 -1
- package/dist/node/projects/_internal/ProjectSchema.js +3 -3
- package/dist/node/projects/_internal/ProjectSchema.js.map +1 -1
- package/dist/node/projects/defaults.js +3 -3
- package/dist/node/projects/defaults.js.map +1 -1
- package/dist/node/projects/view.js.map +1 -1
- package/dist/node/resources/_internal/_validate-url-helpers.js +11 -11
- package/dist/node/resources/_internal/_validate-url-helpers.js.map +1 -1
- package/dist/node/resources/add-solution-resource-url-to-assets.js +1 -1
- package/dist/node/resources/add-solution-resource-url-to-assets.js.map +1 -1
- package/dist/node/resources/convert-solution-template-resources-to-assets.js +2 -2
- package/dist/node/resources/convert-solution-template-resources-to-assets.js.map +1 -1
- package/dist/node/resources/get-item-assets.js +3 -3
- package/dist/node/resources/get-item-assets.js.map +1 -1
- package/dist/node/resources/upload-resources-from-url.js +1 -1
- package/dist/node/resources/validate-url.js +2 -2
- package/dist/node/resources/validate-url.js.map +1 -1
- package/dist/node/search/_internal/portalSearchItems.js +2 -2
- package/dist/node/search/_internal/portalSearchItems.js.map +1 -1
- package/dist/node/search/wellKnownCatalog.js.map +1 -1
- package/dist/node/types/IArcGISContext.js +3 -0
- package/dist/node/types/IArcGISContext.js.map +1 -0
- package/dist/node/types/IArcGISContextManagerOptions.js +3 -0
- package/dist/node/types/IArcGISContextManagerOptions.js.map +1 -0
- package/dist/node/types/IArcGISContextOptions.js +3 -0
- package/dist/node/types/IArcGISContextOptions.js.map +1 -0
- package/dist/node/types/IUserResourceConfig.js +3 -0
- package/dist/node/types/IUserResourceConfig.js.map +1 -0
- package/dist/node/types/IUserResourceToken.js +3 -0
- package/dist/node/types/IUserResourceToken.js.map +1 -0
- package/dist/node/types/index.js +5 -0
- package/dist/node/types/index.js.map +1 -1
- package/dist/node/utils/IUserHubSettings.js +3 -0
- package/dist/node/utils/IUserHubSettings.js.map +1 -0
- package/dist/node/utils/IUserSiteSettings.js +6 -0
- package/dist/node/utils/IUserSiteSettings.js.map +1 -0
- package/dist/node/utils/batch.js +2 -2
- package/dist/node/utils/batch.js.map +1 -1
- package/dist/node/utils/hubUserAppResources.js.map +1 -1
- package/dist/node/utils/index.js +2 -0
- package/dist/node/utils/index.js.map +1 -1
- package/dist/node/utils/internal/siteSettingsMigrations.js.map +1 -1
- package/dist/node/utils/revertable-tasks.js +5 -5
- package/dist/node/utils/revertable-tasks.js.map +1 -1
- package/dist/types/ArcGISContext.d.ts +6 -321
- package/dist/types/ArcGISContextManager.d.ts +4 -92
- package/dist/types/Hub.d.ts +3 -2
- package/dist/types/OperationError.d.ts +1 -1
- package/dist/types/OperationStack.d.ts +1 -1
- package/dist/types/access/can-edit-event.d.ts +1 -1
- package/dist/types/api.d.ts +1 -1
- package/dist/types/associations/breakAssociation.d.ts +1 -1
- package/dist/types/associations/getAssociatedEntitiesQuery.d.ts +1 -1
- package/dist/types/associations/getAssociationStats.d.ts +1 -1
- package/dist/types/associations/getPendingEntitiesQuery.d.ts +1 -1
- package/dist/types/associations/getRequestingEntitiesQuery.d.ts +1 -1
- package/dist/types/associations/internal/getIncludesAndReferencesQuery.d.ts +1 -1
- package/dist/types/associations/internal/getIncludesDoesNotReferenceQuery.d.ts +1 -1
- package/dist/types/associations/internal/getReferencesDoesNotIncludeQuery.d.ts +1 -1
- package/dist/types/associations/requestAssociation.d.ts +1 -1
- package/dist/types/associations/setEntityAssociationGroup.d.ts +1 -1
- package/dist/types/associations/wellKnownAssociationCatalogs.d.ts +1 -1
- package/dist/types/content/HubContent.d.ts +1 -1
- package/dist/types/content/_fetch.d.ts +3 -2
- package/dist/types/content/_internal/ContentUiSchemaDiscussions.d.ts +1 -1
- package/dist/types/content/_internal/ContentUiSchemaEdit.d.ts +1 -1
- package/dist/types/content/_internal/ContentUiSchemaSettings.d.ts +1 -1
- package/dist/types/content/_internal/computeProps.d.ts +1 -1
- package/dist/types/content/_internal/internalContentUtils.d.ts +4 -4
- package/dist/types/content/compose.d.ts +1 -1
- package/dist/types/content/composeHubContent.d.ts +1 -1
- package/dist/types/content/contentUtils.d.ts +1 -1
- package/dist/types/content/fetchContent.d.ts +1 -1
- package/dist/types/content/get-family.d.ts +1 -1
- package/dist/types/content/manageSchedule.d.ts +1 -1
- package/dist/types/content/modelToHubEditableContent.d.ts +1 -1
- package/dist/types/content/search.d.ts +1 -1
- package/dist/types/content/types.d.ts +1 -1
- package/dist/types/core/EntityEditor.d.ts +1 -1
- package/dist/types/core/HubItemEntity.d.ts +1 -1
- package/dist/types/core/_internal/deepContains.d.ts +1 -1
- package/dist/types/core/catalogContains.d.ts +1 -1
- package/dist/types/core/deepCatalogContains.d.ts +1 -1
- package/dist/types/core/enrichEntity.d.ts +1 -1
- package/dist/types/core/fetchHubEntity.d.ts +1 -1
- package/dist/types/core/getEntityGroups.d.ts +1 -1
- package/dist/types/core/processActionLinks.d.ts +1 -1
- package/dist/types/core/schemas/getEditorConfig.d.ts +1 -1
- package/dist/types/core/schemas/internal/events/EventGalleryCardUiSchema.d.ts +1 -1
- package/dist/types/core/schemas/internal/fetchCategoriesUiSchemaElement.d.ts +1 -1
- package/dist/types/core/schemas/internal/fetchCategoryItems.d.ts +1 -1
- package/dist/types/core/schemas/internal/follow/FollowCardUiSchema.d.ts +1 -1
- package/dist/types/core/schemas/internal/getCardEditorSchemas.d.ts +1 -1
- package/dist/types/core/schemas/internal/getEditorSchemas.d.ts +1 -1
- package/dist/types/core/schemas/internal/getLocationExtent.d.ts +1 -1
- package/dist/types/core/schemas/internal/getLocationOptions.d.ts +1 -1
- package/dist/types/core/schemas/internal/getTagItems.d.ts +1 -1
- package/dist/types/core/schemas/internal/metrics/InitiativeUiSchemaMetrics.d.ts +1 -1
- package/dist/types/core/schemas/internal/metrics/ProjectUiSchemaMetrics.d.ts +1 -1
- package/dist/types/core/schemas/internal/metrics/StatCardUiSchema.d.ts +1 -1
- package/dist/types/core/schemas/types.d.ts +1 -1
- package/dist/types/core/setEntityAccess.d.ts +1 -1
- package/dist/types/core/shareEntityWithGroups.d.ts +1 -1
- package/dist/types/core/traits/IWithStatus.d.ts +1 -1
- package/dist/types/core/traits/IWithViewSettings.d.ts +1 -1
- package/dist/types/core/types/IHubCardViewModel.d.ts +1 -1
- package/dist/types/core/types/IHubContent.d.ts +1 -1
- package/dist/types/core/types/IHubContentEnrichments.d.ts +1 -1
- package/dist/types/core/types/IHubItemEntity.d.ts +1 -1
- package/dist/types/core/types/IHubUser.d.ts +1 -1
- package/dist/types/core/types/IItemEnrichments.d.ts +1 -1
- package/dist/types/core/unshareEntityWithGroups.d.ts +1 -1
- package/dist/types/core/updateHubEntity.d.ts +1 -1
- package/dist/types/discussions/HubDiscussion.d.ts +1 -1
- package/dist/types/discussions/_internal/DiscussionUiSchemaCreate.d.ts +1 -1
- package/dist/types/discussions/_internal/DiscussionUiSchemaEdit.d.ts +1 -1
- package/dist/types/discussions/_internal/DiscussionUiSchemaSettings.d.ts +1 -1
- package/dist/types/discussions/_internal/computeProps.d.ts +1 -1
- package/dist/types/discussions/api/types.d.ts +1 -1
- package/dist/types/discussions/defaults.d.ts +1 -1
- package/dist/types/discussions/edit.d.ts +1 -1
- package/dist/types/discussions/fetch.d.ts +1 -1
- package/dist/types/downloads/_internal/getExportItemDataUrl.d.ts +1 -1
- package/dist/types/downloads/canUseHubDownloadApi.d.ts +1 -1
- package/dist/types/downloads/types.d.ts +1 -1
- package/dist/types/events/HubEvent.d.ts +1 -1
- package/dist/types/events/_internal/EventUiSchemaAttendeesSettings.d.ts +1 -1
- package/dist/types/events/_internal/EventUiSchemaCreate.d.ts +1 -1
- package/dist/types/events/_internal/EventUiSchemaEdit.d.ts +1 -1
- package/dist/types/events/_internal/buildEventAssociations.d.ts +1 -1
- package/dist/types/events/_internal/buildReferencedContentSchema.d.ts +1 -1
- package/dist/types/events/_internal/shareEventWithGroups.d.ts +1 -1
- package/dist/types/events/_internal/unshareEventWithGroups.d.ts +1 -1
- package/dist/types/events/api/types.d.ts +1 -1
- package/dist/types/events/edit.d.ts +1 -1
- package/dist/types/events/fetch.d.ts +1 -1
- package/dist/types/events/getEventGroups.d.ts +1 -1
- package/dist/types/extent.d.ts +1 -1
- package/dist/types/groups/HubGroup.d.ts +1 -1
- package/dist/types/groups/HubGroups.d.ts +1 -1
- package/dist/types/groups/_internal/GroupUiSchemaCreate.d.ts +1 -1
- package/dist/types/groups/_internal/GroupUiSchemaCreateAssociation.d.ts +1 -1
- package/dist/types/groups/_internal/GroupUiSchemaCreateEdit.d.ts +1 -1
- package/dist/types/groups/_internal/GroupUiSchemaCreateFollowers.d.ts +1 -1
- package/dist/types/groups/_internal/GroupUiSchemaCreateView.d.ts +1 -1
- package/dist/types/groups/_internal/GroupUiSchemaDiscussions.d.ts +1 -1
- package/dist/types/groups/_internal/GroupUiSchemaEdit.d.ts +1 -1
- package/dist/types/groups/_internal/GroupUiSchemaSettings.d.ts +1 -1
- package/dist/types/groups/_internal/convertGroupToHubGroup.d.ts +1 -1
- package/dist/types/groups/_internal/enrichments.d.ts +1 -1
- package/dist/types/groups/add-users-workflow/add-users-to-group.d.ts +1 -1
- package/dist/types/groups/add-users-workflow/interfaces.d.ts +1 -1
- package/dist/types/groups/getWellKnownGroup.d.ts +1 -1
- package/dist/types/{types.d.ts → hub-types.d.ts} +4 -0
- package/dist/types/i18n/get-culture.d.ts +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/initiative-templates/HubInitiativeTemplate.d.ts +1 -1
- package/dist/types/initiative-templates/_internal/InitiativeTemplateUiSchemaEdit.d.ts +1 -1
- package/dist/types/initiative-templates/_internal/computeProps.d.ts +1 -1
- package/dist/types/initiative-templates/defaults.d.ts +1 -1
- package/dist/types/initiative-templates/fetch.d.ts +1 -1
- package/dist/types/initiatives/HubInitiative.d.ts +1 -1
- package/dist/types/initiatives/HubInitiatives.d.ts +1 -1
- package/dist/types/initiatives/_internal/InitiativeUiSchemaAssociations.d.ts +1 -1
- package/dist/types/initiatives/_internal/InitiativeUiSchemaCreate.d.ts +1 -1
- package/dist/types/initiatives/_internal/InitiativeUiSchemaCreate2.d.ts +1 -1
- package/dist/types/initiatives/_internal/InitiativeUiSchemaEdit.d.ts +1 -1
- package/dist/types/initiatives/_internal/InitiativeUiSchemaSettings.d.ts +1 -1
- package/dist/types/initiatives/_internal/applyInitiativeMigrations.d.ts +1 -1
- package/dist/types/initiatives/_internal/computeProps.d.ts +1 -1
- package/dist/types/initiatives/defaults.d.ts +1 -1
- package/dist/types/initiatives/view.d.ts +2 -2
- package/dist/types/items/_enrichments.d.ts +1 -1
- package/dist/types/items/_internal/_prepare-upload-requests.d.ts +1 -1
- package/dist/types/items/_internal/ensureUniqueEntitySlug.d.ts +1 -1
- package/dist/types/items/fail-safe-update.d.ts +1 -1
- package/dist/types/items/fetch-all-pages.d.ts +1 -1
- package/dist/types/items/follow.d.ts +1 -1
- package/dist/types/items/get-model-from-options.d.ts +1 -1
- package/dist/types/items/interpolate-item-id.d.ts +1 -1
- package/dist/types/items/normalize-solution-template-item.d.ts +1 -1
- package/dist/types/items/replace-item-id.d.ts +1 -1
- package/dist/types/items/unprotect-model.d.ts +1 -1
- package/dist/types/metrics/resolveMetric.d.ts +1 -1
- package/dist/types/models/index.d.ts +1 -1
- package/dist/types/models/serializeModel.d.ts +1 -1
- package/dist/types/newsletters/api/types.d.ts +1 -1
- package/dist/types/newsletters-scheduler/api/types.d.ts +1 -1
- package/dist/types/pages/HubPage.d.ts +1 -1
- package/dist/types/pages/HubPages.d.ts +1 -1
- package/dist/types/pages/_internal/PageUiSchemaCreate.d.ts +1 -1
- package/dist/types/pages/_internal/PageUiSchemaEdit.d.ts +1 -1
- package/dist/types/pages/_internal/computeProps.d.ts +1 -1
- package/dist/types/pages/defaults.d.ts +1 -1
- package/dist/types/permissions/_internal/PermissionCheckFunction.d.ts +1 -1
- package/dist/types/permissions/_internal/checkAssertion.d.ts +1 -1
- package/dist/types/permissions/_internal/checkAssertions.d.ts +1 -1
- package/dist/types/permissions/_internal/checkAuthentication.d.ts +1 -1
- package/dist/types/permissions/_internal/checkAvailability.d.ts +1 -1
- package/dist/types/permissions/_internal/checkDelete.d.ts +1 -1
- package/dist/types/permissions/_internal/checkEdit.d.ts +1 -1
- package/dist/types/permissions/_internal/checkEntityFeature.d.ts +1 -1
- package/dist/types/permissions/_internal/checkEntityPolicy.d.ts +1 -1
- package/dist/types/permissions/_internal/checkEnvironment.d.ts +1 -1
- package/dist/types/permissions/_internal/checkLicense.d.ts +1 -1
- package/dist/types/permissions/_internal/checkOwner.d.ts +1 -1
- package/dist/types/permissions/_internal/checkParents.d.ts +1 -1
- package/dist/types/permissions/_internal/checkPrivileges.d.ts +1 -1
- package/dist/types/permissions/_internal/checkServiceStatus.d.ts +1 -1
- package/dist/types/permissions/checkPermission.d.ts +1 -1
- package/dist/types/projects/HubProject.d.ts +1 -1
- package/dist/types/projects/_internal/ProjectUiSchemaCreate.d.ts +1 -1
- package/dist/types/projects/_internal/ProjectUiSchemaCreate2.d.ts +1 -1
- package/dist/types/projects/_internal/ProjectUiSchemaEdit.d.ts +1 -1
- package/dist/types/projects/_internal/ProjectUiSchemaSettings.d.ts +1 -1
- package/dist/types/projects/_internal/computeProps.d.ts +1 -1
- package/dist/types/projects/defaults.d.ts +1 -1
- package/dist/types/projects/fetch.d.ts +1 -1
- package/dist/types/request.d.ts +1 -1
- package/dist/types/resources/_add-token-to-resource-url.d.ts +1 -1
- package/dist/types/resources/_internal/_validate-url-helpers.d.ts +1 -1
- package/dist/types/resources/add-solution-resource-url-to-assets.d.ts +1 -1
- package/dist/types/resources/convert-solution-template-resources-to-assets.d.ts +1 -1
- package/dist/types/resources/get-item-assets.d.ts +1 -1
- package/dist/types/resources/get-item-thumbnail-url.d.ts +1 -1
- package/dist/types/resources/upload-resources-from-url.d.ts +1 -1
- package/dist/types/search/Catalog.d.ts +1 -1
- package/dist/types/search/Collection.d.ts +1 -1
- package/dist/types/search/_internal/getWorkflowForType.d.ts +1 -1
- package/dist/types/search/_internal/hubEventsHelpers/processFilters.d.ts +1 -1
- package/dist/types/search/_internal/hubSearchItemsHelpers/ogcItemToSearchResult.d.ts +1 -1
- package/dist/types/search/_internal/portalSearchItems.d.ts +1 -1
- package/dist/types/search/fetchEntityCatalog.d.ts +1 -1
- package/dist/types/search/getAddContentConfig.d.ts +1 -1
- package/dist/types/search/getCatalogGroups.d.ts +3 -3
- package/dist/types/search/searchCatalogs.d.ts +1 -1
- package/dist/types/search/searchEntityCatalogs.d.ts +1 -1
- package/dist/types/search/types/IHubSearchOptions.d.ts +1 -1
- package/dist/types/search/types/IHubSearchResult.d.ts +1 -1
- package/dist/types/search/utils.d.ts +1 -1
- package/dist/types/search/wellKnownCatalog.d.ts +2 -2
- package/dist/types/sites/HubSite.d.ts +1 -1
- package/dist/types/sites/HubSites.d.ts +1 -1
- package/dist/types/sites/_internal/SiteUiSchemaCreate.d.ts +1 -1
- package/dist/types/sites/_internal/SiteUiSchemaDiscussions.d.ts +1 -1
- package/dist/types/sites/_internal/SiteUiSchemaEdit.d.ts +1 -1
- package/dist/types/sites/_internal/SiteUiSchemaFollowers.d.ts +1 -1
- package/dist/types/sites/_internal/SiteUiSchemaSettings.d.ts +1 -1
- package/dist/types/sites/_internal/_apply-site-schema.d.ts +1 -1
- package/dist/types/sites/_internal/_enforce-lowercase-domains.d.ts +1 -1
- package/dist/types/sites/_internal/_ensure-catalog.d.ts +1 -1
- package/dist/types/sites/_internal/_ensure-telemetry.d.ts +1 -1
- package/dist/types/sites/_internal/_migrate-event-list-card-configs.d.ts +1 -1
- package/dist/types/sites/_internal/_migrate-feed-config.d.ts +1 -1
- package/dist/types/sites/_internal/_migrate-link-underlines-capability.d.ts +1 -1
- package/dist/types/sites/_internal/_migrate-telemetry-config.d.ts +1 -1
- package/dist/types/sites/_internal/_purge-non-guids-from-catalog.d.ts +1 -1
- package/dist/types/sites/_internal/applyCatalogStructureMigration.d.ts +1 -1
- package/dist/types/sites/_internal/applyDefaultCollectionMigration.d.ts +1 -1
- package/dist/types/sites/_internal/applyPermissionMigration.d.ts +1 -1
- package/dist/types/sites/_internal/capabilities/convertFeaturesToLegacyCapabilities.d.ts +1 -1
- package/dist/types/sites/_internal/capabilities/migrateLegacyCapabilitiesToFeatures.d.ts +1 -1
- package/dist/types/sites/_internal/computeProps.d.ts +1 -1
- package/dist/types/sites/_internal/convertCatalogToLegacyFormat.d.ts +1 -1
- package/dist/types/sites/_internal/ensureBaseTelemetry.d.ts +1 -1
- package/dist/types/sites/_internal/handleDomainChanges.d.ts +1 -1
- package/dist/types/sites/_internal/migrateBadBasemap.d.ts +1 -1
- package/dist/types/sites/_internal/migrateWebMappingApplicationSites.d.ts +1 -1
- package/dist/types/sites/_internal/reflectCollectionsToSearchCategories.d.ts +1 -1
- package/dist/types/sites/defaults.d.ts +1 -1
- package/dist/types/sites/domains/_get-auth-header.d.ts +1 -1
- package/dist/types/sites/domains/add-domain.d.ts +1 -1
- package/dist/types/sites/domains/addSiteDomains.d.ts +1 -1
- package/dist/types/sites/domains/domain-exists-portal.d.ts +1 -1
- package/dist/types/sites/domains/domain-exists.d.ts +1 -1
- package/dist/types/sites/domains/ensure-unique-domain-name.d.ts +1 -1
- package/dist/types/sites/domains/get-domains-for-site.d.ts +1 -1
- package/dist/types/sites/domains/get-unique-domain-name-portal.d.ts +1 -1
- package/dist/types/sites/domains/get-unique-domain-name.d.ts +1 -1
- package/dist/types/sites/domains/is-domain-for-legacy-site.d.ts +1 -1
- package/dist/types/sites/domains/is-domain-used-elsewhere.d.ts +1 -1
- package/dist/types/sites/domains/is-valid-domain.d.ts +1 -1
- package/dist/types/sites/domains/lookup-domain.d.ts +1 -1
- package/dist/types/sites/domains/remove-domain.d.ts +1 -1
- package/dist/types/sites/domains/remove-domains-by-site-id.d.ts +1 -1
- package/dist/types/sites/domains/removeDomainByHostname.d.ts +1 -1
- package/dist/types/sites/domains/update-domain.d.ts +2 -2
- package/dist/types/sites/drafts/build-draft.d.ts +1 -1
- package/dist/types/sites/feed-configuration.d.ts +1 -1
- package/dist/types/sites/feeds/previewFeed.d.ts +1 -1
- package/dist/types/sites/fetchSiteModel.d.ts +2 -2
- package/dist/types/sites/get-catalog-from-site-model.d.ts +1 -1
- package/dist/types/sites/get-site-by-id.d.ts +2 -2
- package/dist/types/sites/registerSiteAsApplication.d.ts +1 -1
- package/dist/types/sites/reharvestSiteCatalog.d.ts +1 -1
- package/dist/types/sites/upgrade-site-schema.d.ts +1 -1
- package/dist/types/surveys/HubSurvey.d.ts +1 -1
- package/dist/types/surveys/_internal/SurveyUiSchemaEdit.d.ts +1 -1
- package/dist/types/surveys/_internal/SurveyUiSchemaSettings.d.ts +1 -1
- package/dist/types/surveys/_internal/computeProps.d.ts +1 -1
- package/dist/types/surveys/fetch.d.ts +1 -1
- package/dist/types/surveys/utils/get-input-feature-service-model.d.ts +1 -1
- package/dist/types/surveys/utils/get-s123-edit-url.d.ts +1 -1
- package/dist/types/surveys/utils/get-s123-share-url.d.ts +1 -1
- package/dist/types/surveys/utils/get-source-feature-service-model-from-fieldworker.d.ts +1 -1
- package/dist/types/surveys/utils/get-stakeholder-model.d.ts +1 -1
- package/dist/types/surveys/utils/get-survey-models.d.ts +1 -1
- package/dist/types/templates/HubTemplate.d.ts +1 -1
- package/dist/types/templates/_internal/TemplateUiSchemaEdit.d.ts +1 -1
- package/dist/types/templates/_internal/computeProps.d.ts +1 -1
- package/dist/types/templates/defaults.d.ts +1 -1
- package/dist/types/templates/fetch.d.ts +1 -1
- package/dist/types/types/IArcGISContext.d.ts +258 -0
- package/dist/types/types/IArcGISContextManagerOptions.d.ts +86 -0
- package/dist/types/types/IArcGISContextOptions.d.ts +78 -0
- package/dist/types/types/IUserResourceConfig.d.ts +5 -0
- package/dist/types/types/IUserResourceToken.d.ts +4 -0
- package/dist/types/types/index.d.ts +5 -0
- package/dist/types/urls/get-campaign-url.d.ts +1 -1
- package/dist/types/urls/get-item-api-url.d.ts +1 -1
- package/dist/types/urls/get-item-data-url.d.ts +1 -1
- package/dist/types/urls/get-item-home-url.d.ts +1 -1
- package/dist/types/urls/get-portal-api-url.d.ts +1 -1
- package/dist/types/urls/get-portal-url.d.ts +1 -1
- package/dist/types/urls/getCardModelUrl.d.ts +1 -1
- package/dist/types/urls/getContentHomeUrl.d.ts +1 -1
- package/dist/types/urls/getGroupHomeUrl.d.ts +1 -1
- package/dist/types/urls/getUserHomeUrl.d.ts +1 -1
- package/dist/types/urls/is-safe-redirect-url.d.ts +1 -1
- package/dist/types/users/HubUser.d.ts +1 -1
- package/dist/types/users/HubUsers.d.ts +2 -2
- package/dist/types/users/_internal/UserUiSchemaSettings.d.ts +1 -1
- package/dist/types/users/_internal/computeProps.d.ts +1 -1
- package/dist/types/users/_internal/enrichments.d.ts +1 -1
- package/dist/types/utils/IUserHubSettings.d.ts +32 -0
- package/dist/types/utils/IUserSiteSettings.d.ts +8 -0
- package/dist/types/utils/batch.d.ts +1 -1
- package/dist/types/utils/create-operation-pipeline.d.ts +1 -1
- package/dist/types/utils/fail-safe.d.ts +1 -1
- package/dist/types/utils/hubUserAppResources.d.ts +3 -41
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/types/utils/internal/clearUserHubSettings.d.ts +2 -2
- package/dist/types/utils/internal/clearUserSiteSettings.d.ts +2 -2
- package/dist/types/utils/internal/fetchAndMigrateUserHubSettings.d.ts +1 -1
- package/dist/types/utils/internal/resolveDynamicValue.d.ts +1 -1
- package/dist/types/utils/internal/resolveDynamicValues.d.ts +1 -1
- package/dist/types/utils/internal/resolveItemQueryValues.d.ts +1 -1
- package/dist/types/utils/internal/resolvePortalValues.d.ts +1 -1
- package/dist/types/utils/internal/resolveServiceQueryValues.d.ts +1 -1
- package/dist/types/utils/internal/setEntityStatusKeyword.d.ts +1 -1
- package/dist/types/utils/internal/siteSettingsMigrations.d.ts +2 -1
- package/dist/types/utils/internal/updateCommunityOrgSettings.d.ts +1 -1
- package/dist/types/utils/internal/updatePortalOrgSettings.d.ts +1 -1
- package/dist/types/utils/revertable-tasks.d.ts +1 -1
- package/dist/types/versioning/_internal/getIncludeListFromItemType.d.ts +1 -1
- package/dist/types/versioning/_internal/getVersionData.d.ts +1 -1
- package/dist/types/versioning/createVersion.d.ts +2 -2
- package/dist/types/versioning/deleteVersion.d.ts +1 -1
- package/dist/types/versioning/getVersion.d.ts +1 -1
- package/dist/types/versioning/searchVersions.d.ts +1 -1
- package/dist/types/versioning/updateVersion.d.ts +2 -2
- package/dist/types/versioning/updateVersionMetadata.d.ts +1 -1
- package/dist/types/versioning/utils.d.ts +1 -1
- package/package.json +1 -1
- package/dist/esm/types.js.map +0 -1
- package/dist/node/types.js.map +0 -1
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { UserSession, IUserRequestOptions } from "@esri/arcgis-rest-auth";
|
|
2
|
+
import type { IPortal } from "@esri/arcgis-rest-portal";
|
|
3
|
+
import type { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
4
|
+
import type { IUser } from "@esri/arcgis-rest-types";
|
|
5
|
+
import { HubServiceStatus, HubEntity } from "../core";
|
|
6
|
+
import type { IHubHistory, IHubHistoryEntry } from "../core/hubHistory";
|
|
7
|
+
import type { HubLicense, HubEnvironment, IFeatureFlags, Permission, IPermissionAccessResponse } from "../permissions";
|
|
8
|
+
import type { IHubRequestOptions, IHubTrustedOrgsResponse, UserResourceApp } from "../hub-types";
|
|
9
|
+
import type { IUserResourceToken } from "./IUserResourceToken";
|
|
10
|
+
import type { IUserHubSettings } from "../utils/IUserHubSettings";
|
|
11
|
+
/**
|
|
12
|
+
* Defines the properties of the ArcGISContext.
|
|
13
|
+
* Typically components or functions will get an instance
|
|
14
|
+
* of `ArcGISContext` from `ArcGISContetManager`.
|
|
15
|
+
*
|
|
16
|
+
* `ArcGISContext` implements this interface, and uses
|
|
17
|
+
* getters to simplify the derivation of various complex properties.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
export interface IArcGISContext {
|
|
21
|
+
/**
|
|
22
|
+
* Unique id from the ArcGISContextManager that created
|
|
23
|
+
* this instance. Primarily useful for debugging possible
|
|
24
|
+
* race-conditions that can result in multiple ArcGISContextManager
|
|
25
|
+
* instances being created.
|
|
26
|
+
*/
|
|
27
|
+
id: number;
|
|
28
|
+
/**
|
|
29
|
+
* Return the UserSession if authenticated
|
|
30
|
+
*/
|
|
31
|
+
session: UserSession;
|
|
32
|
+
/**
|
|
33
|
+
* Return boolean indicating if authenticatio is present
|
|
34
|
+
*/
|
|
35
|
+
isAuthenticated: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Return `IUserRequestOptions`, which is used for REST-JS
|
|
38
|
+
* functions which require authentication information.
|
|
39
|
+
*
|
|
40
|
+
* If context is not authenticated, this function will return `undefined`
|
|
41
|
+
*/
|
|
42
|
+
userRequestOptions: IUserRequestOptions;
|
|
43
|
+
/**
|
|
44
|
+
* Return `IRequestOptions`, which is used by REST-JS functions
|
|
45
|
+
* which *may* use authentication information if provided.
|
|
46
|
+
*
|
|
47
|
+
* If context is not authenticated, this function just returns
|
|
48
|
+
* the `portal` property, which informs REST-JS what Sharing API
|
|
49
|
+
* instance to use (i.e. AGO, Enterprise etc)
|
|
50
|
+
*/
|
|
51
|
+
requestOptions: IRequestOptions;
|
|
52
|
+
/**
|
|
53
|
+
* Return a `IHubRequestOptions` object
|
|
54
|
+
*
|
|
55
|
+
* If context is not authenticated, this function will return `undefined`
|
|
56
|
+
*/
|
|
57
|
+
hubRequestOptions: IHubRequestOptions;
|
|
58
|
+
/**
|
|
59
|
+
* Return the portal url.
|
|
60
|
+
*
|
|
61
|
+
* If authenticated @ ArcGIS Online, it will return
|
|
62
|
+
* the https://org.env.arcgis.com
|
|
63
|
+
*
|
|
64
|
+
* If authenticated @ ArcGIS Enterprise, it will return
|
|
65
|
+
* https://{portalHostname}/{webadaptor}
|
|
66
|
+
*/
|
|
67
|
+
portalUrl: string;
|
|
68
|
+
/**
|
|
69
|
+
* Returns the url to the sharing api composed from portalUrl
|
|
70
|
+
* i.e. https://myorg.maps.arcgis.com/sharing/rest
|
|
71
|
+
*/
|
|
72
|
+
sharingApiUrl: string;
|
|
73
|
+
/**
|
|
74
|
+
* Returns the Hub url, based on the portalUrl
|
|
75
|
+
*
|
|
76
|
+
* For ArcGIS Enterprise this will return `undefined`
|
|
77
|
+
*/
|
|
78
|
+
hubUrl: string;
|
|
79
|
+
/**
|
|
80
|
+
* Url for the Hub OGC API
|
|
81
|
+
*/
|
|
82
|
+
ogcApiUrl: string;
|
|
83
|
+
/**
|
|
84
|
+
* Returns the current user's hub-home url. If not authenticated,
|
|
85
|
+
* returns the Hub Url. If portal, returns undefined
|
|
86
|
+
*/
|
|
87
|
+
hubHomeUrl: string;
|
|
88
|
+
/**
|
|
89
|
+
* Returns boolean indicating if the backing system
|
|
90
|
+
* is ArcGIS Enterprise (formerly ArcGIS Portal) or not
|
|
91
|
+
*/
|
|
92
|
+
isPortal: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Returns the discussions API URL
|
|
95
|
+
*/
|
|
96
|
+
discussionsServiceUrl: string;
|
|
97
|
+
/**
|
|
98
|
+
* Returns the Hub Search API URL
|
|
99
|
+
*/
|
|
100
|
+
hubSearchServiceUrl: string;
|
|
101
|
+
/**
|
|
102
|
+
* Returns Hub Domain Service URL
|
|
103
|
+
*/
|
|
104
|
+
domainServiceUrl: string;
|
|
105
|
+
/**
|
|
106
|
+
* Returns the Events configuration object from portal/self
|
|
107
|
+
*
|
|
108
|
+
* `{serviceId: '3ef..', publicViewId: 'bc3...'}`
|
|
109
|
+
*/
|
|
110
|
+
eventsConfig: any;
|
|
111
|
+
/**
|
|
112
|
+
* Returns boolean indicating if the current user
|
|
113
|
+
* belongs to an organization that has licensed
|
|
114
|
+
* ArcGIS Hub
|
|
115
|
+
*/
|
|
116
|
+
hubEnabled: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Return Hub Community Org Id, if defined
|
|
119
|
+
*/
|
|
120
|
+
communityOrgId: string;
|
|
121
|
+
/**
|
|
122
|
+
* If we are in a community org with an associated e-org Return the Hub Enterprise Org Id, if defined
|
|
123
|
+
*/
|
|
124
|
+
enterpriseOrgId: string;
|
|
125
|
+
/**
|
|
126
|
+
* Returns the Community Org Hostname, if defined
|
|
127
|
+
*/
|
|
128
|
+
communityOrgHostname: string;
|
|
129
|
+
/**
|
|
130
|
+
* Returns the Hub Community Org url
|
|
131
|
+
*
|
|
132
|
+
* i.e. https://c-org.maps.arcgis.com
|
|
133
|
+
*/
|
|
134
|
+
communityOrgUrl: string;
|
|
135
|
+
/**
|
|
136
|
+
* Returns the hash of helper services from portal self
|
|
137
|
+
*/
|
|
138
|
+
helperServices: any;
|
|
139
|
+
/**
|
|
140
|
+
* Returns the current user
|
|
141
|
+
*/
|
|
142
|
+
currentUser: IUser;
|
|
143
|
+
/**
|
|
144
|
+
* Returns the portal object
|
|
145
|
+
*/
|
|
146
|
+
portal: IPortal;
|
|
147
|
+
/**
|
|
148
|
+
* What is the current user's hub license level?
|
|
149
|
+
*/
|
|
150
|
+
hubLicense: HubLicense;
|
|
151
|
+
/**
|
|
152
|
+
* Additional app-specific context
|
|
153
|
+
*/
|
|
154
|
+
properties: Record<string, any>;
|
|
155
|
+
/**
|
|
156
|
+
* Hub Service Status
|
|
157
|
+
*/
|
|
158
|
+
serviceStatus: HubServiceStatus;
|
|
159
|
+
/**
|
|
160
|
+
* Is this user in a Hub Alpha org?
|
|
161
|
+
* Derived from properties.alphaOrgs
|
|
162
|
+
*/
|
|
163
|
+
isAlphaOrg: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Is this user in a Hub Beta org?
|
|
166
|
+
* Derived from properties.betaOrgs
|
|
167
|
+
*/
|
|
168
|
+
isBetaOrg: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* What environment is this running in?
|
|
171
|
+
*/
|
|
172
|
+
environment: HubEnvironment;
|
|
173
|
+
/**
|
|
174
|
+
* Hash of feature flags
|
|
175
|
+
*/
|
|
176
|
+
featureFlags: IFeatureFlags;
|
|
177
|
+
/**
|
|
178
|
+
* Array of Trusted Org Ids
|
|
179
|
+
*/
|
|
180
|
+
trustedOrgIds: string[];
|
|
181
|
+
/**
|
|
182
|
+
* Trusted orgs xhr response
|
|
183
|
+
*/
|
|
184
|
+
trustedOrgs: IHubTrustedOrgsResponse[];
|
|
185
|
+
/**
|
|
186
|
+
* Array of exchanged tokens for use
|
|
187
|
+
* with user-app-resources
|
|
188
|
+
*/
|
|
189
|
+
userResourceTokens?: IUserResourceToken[];
|
|
190
|
+
/**
|
|
191
|
+
* Hash of user hub settings. These are stored as
|
|
192
|
+
* user-app-resources, associated with the `hubforarcgis` clientId
|
|
193
|
+
*/
|
|
194
|
+
userHubSettings?: IUserHubSettings;
|
|
195
|
+
/**
|
|
196
|
+
* Return the user's history
|
|
197
|
+
* @returns
|
|
198
|
+
*/
|
|
199
|
+
history: IHubHistory;
|
|
200
|
+
/**
|
|
201
|
+
* Return the portal thumbnail url
|
|
202
|
+
*/
|
|
203
|
+
orgThumbnailUrl: string;
|
|
204
|
+
/**
|
|
205
|
+
* Return the Survey123 url
|
|
206
|
+
*/
|
|
207
|
+
survey123Url: string;
|
|
208
|
+
/**
|
|
209
|
+
* Is the current users org type a community org?
|
|
210
|
+
*/
|
|
211
|
+
isCommunityOrg: boolean;
|
|
212
|
+
/**
|
|
213
|
+
* Is the current user an org admin and not in a custom role?
|
|
214
|
+
*/
|
|
215
|
+
isOrgAdmin: boolean;
|
|
216
|
+
/**
|
|
217
|
+
* Groups that contain Hub Resources (linkable documents etc)
|
|
218
|
+
* that are tagged to appear in different areas of the appliation.
|
|
219
|
+
* Default platform groups are defined per-environment in the
|
|
220
|
+
* "HUB_RESOURE_GROUPS" const..
|
|
221
|
+
*/
|
|
222
|
+
resourceGroupIDs: string[];
|
|
223
|
+
/**
|
|
224
|
+
* Return the token for a given app, if defined
|
|
225
|
+
* @param app
|
|
226
|
+
*/
|
|
227
|
+
tokenFor(app: UserResourceApp): string;
|
|
228
|
+
/**
|
|
229
|
+
* Refresh the current user, including their groups
|
|
230
|
+
*/
|
|
231
|
+
refreshUser(): Promise<void>;
|
|
232
|
+
/**
|
|
233
|
+
* Add an entry to the user's history
|
|
234
|
+
* If not authenticated, this function will no-op
|
|
235
|
+
* @param entry
|
|
236
|
+
*/
|
|
237
|
+
addToHistory(entry: IHubHistoryEntry): Promise<void>;
|
|
238
|
+
/**
|
|
239
|
+
* Remove a specific entry from the user's history
|
|
240
|
+
* @param entry
|
|
241
|
+
*/
|
|
242
|
+
removeFromHistory(entry: IHubHistoryEntry): Promise<void>;
|
|
243
|
+
/**
|
|
244
|
+
* Simple clear of the all of the user's history
|
|
245
|
+
*/
|
|
246
|
+
clearHistory(): Promise<void>;
|
|
247
|
+
/**
|
|
248
|
+
* Check specific permission for the current user, and optionally an entity
|
|
249
|
+
* @param permission
|
|
250
|
+
* @param entity
|
|
251
|
+
*/
|
|
252
|
+
checkPermission(permission: Permission, entity?: HubEntity): IPermissionAccessResponse;
|
|
253
|
+
/**
|
|
254
|
+
* Update the user's hub settings directly from the Context
|
|
255
|
+
* @param settings
|
|
256
|
+
*/
|
|
257
|
+
updateUserHubSettings(settings: IUserHubSettings): Promise<void>;
|
|
258
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { UserSession } from "@esri/arcgis-rest-auth";
|
|
2
|
+
import { IPortal } from "@esri/arcgis-rest-portal";
|
|
3
|
+
import { IUser } from "@esri/arcgis-rest-types";
|
|
4
|
+
import { IUserResourceToken } from "./IUserResourceToken";
|
|
5
|
+
import { IUserResourceConfig } from "./IUserResourceConfig";
|
|
6
|
+
import { HubServiceStatus } from "../core/types/ISystemStatus";
|
|
7
|
+
import { IFeatureFlags } from "../permissions";
|
|
8
|
+
import { IHubTrustedOrgsResponse } from "../hub-types";
|
|
9
|
+
import { Level } from "../utils";
|
|
10
|
+
import { IUserHubSettings } from "../utils/IUserHubSettings";
|
|
11
|
+
/**
|
|
12
|
+
* Options that can be passed into `ArcGISContextManager.create`
|
|
13
|
+
*/
|
|
14
|
+
export interface IArcGISContextManagerOptions {
|
|
15
|
+
/**
|
|
16
|
+
* Existing user session, which may be created from Identity Manager
|
|
17
|
+
* `const session = UserSession.fromCredential(idMgr.getCredential());`
|
|
18
|
+
*/
|
|
19
|
+
authentication?: UserSession;
|
|
20
|
+
/**
|
|
21
|
+
* ArcGIS Online or ArcGIS Enterprise portal url.
|
|
22
|
+
* Do not include `/sharing/rest`
|
|
23
|
+
* Defaults to `https://www.arcgis.com`
|
|
24
|
+
* For ArcGIS Enterprise, you must include the webadaptor name.
|
|
25
|
+
* i.e. https://gis.mytown.gov/portal
|
|
26
|
+
*
|
|
27
|
+
* When Authentication is present, the UserSession.portal value is
|
|
28
|
+
* used instead of this property.
|
|
29
|
+
*/
|
|
30
|
+
portalUrl?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Portal self for the authenticated user. If not passed into `.create`
|
|
33
|
+
* with the UserSession, it will be fetched
|
|
34
|
+
*/
|
|
35
|
+
portal?: IPortal;
|
|
36
|
+
/**
|
|
37
|
+
* Current user as `IUser`. If not passed into `.create` with the UserSession
|
|
38
|
+
* it will be fetched.
|
|
39
|
+
*/
|
|
40
|
+
currentUser?: IUser;
|
|
41
|
+
/**
|
|
42
|
+
* Any additional properties to expose on the context. This allows
|
|
43
|
+
* an application to send additional context into the system.
|
|
44
|
+
* For example, in ArcGIS Hub, many times we want to pass in the
|
|
45
|
+
* active "Hub Site" as additional context, so we will send that in
|
|
46
|
+
* as a node on a properties object.
|
|
47
|
+
*/
|
|
48
|
+
properties?: Record<string, any>;
|
|
49
|
+
/**
|
|
50
|
+
* Logging level
|
|
51
|
+
* off > error > warn > info > debug > all
|
|
52
|
+
* defaults to 'error'
|
|
53
|
+
*/
|
|
54
|
+
logLevel?: Level;
|
|
55
|
+
/**
|
|
56
|
+
* Option to pass in service status vs fetching it
|
|
57
|
+
*/
|
|
58
|
+
serviceStatus?: HubServiceStatus;
|
|
59
|
+
/**
|
|
60
|
+
* Optional hash of feature flags
|
|
61
|
+
*/
|
|
62
|
+
featureFlags?: IFeatureFlags;
|
|
63
|
+
/**
|
|
64
|
+
* Array of Trusted Org Ids
|
|
65
|
+
*/
|
|
66
|
+
trustedOrgIds?: string[];
|
|
67
|
+
/**
|
|
68
|
+
* Trusted orgs xhr response
|
|
69
|
+
*/
|
|
70
|
+
trustedOrgs?: IHubTrustedOrgsResponse[];
|
|
71
|
+
/**
|
|
72
|
+
* Array of app, clientId's that Context Manager should
|
|
73
|
+
* exchange tokens for
|
|
74
|
+
*/
|
|
75
|
+
resourceConfigs?: IUserResourceConfig[];
|
|
76
|
+
/**
|
|
77
|
+
* Array of app, clientId, token objects which Context
|
|
78
|
+
* Manager has exchanged tokens for
|
|
79
|
+
*/
|
|
80
|
+
resourceTokens?: IUserResourceToken[];
|
|
81
|
+
/**
|
|
82
|
+
* Hash of user hub settings. These are stored as
|
|
83
|
+
* user-app-resources, associated with the `hubforarcgis` clientId
|
|
84
|
+
*/
|
|
85
|
+
userHubSettings?: IUserHubSettings;
|
|
86
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { UserSession } from "@esri/arcgis-rest-auth";
|
|
2
|
+
import type { IPortal } from "@esri/arcgis-rest-portal";
|
|
3
|
+
import type { IUser } from "@esri/arcgis-rest-types";
|
|
4
|
+
import type { IUserResourceToken } from "./IUserResourceToken";
|
|
5
|
+
import type { HubServiceStatus } from "../core/types/ISystemStatus";
|
|
6
|
+
import type { IFeatureFlags } from "../permissions";
|
|
7
|
+
import type { IHubTrustedOrgsResponse } from "../hub-types";
|
|
8
|
+
import type { IUserHubSettings } from "../utils/IUserHubSettings";
|
|
9
|
+
/**
|
|
10
|
+
* Options for the ArcGISContext constructor
|
|
11
|
+
*/
|
|
12
|
+
export interface IArcGISContextOptions {
|
|
13
|
+
/**
|
|
14
|
+
* Unique id from the ArcGISContextManager that created
|
|
15
|
+
* this instance. Primarily useful for debugging possible
|
|
16
|
+
* race-conditions that can result in multiple ArcGISContextManager
|
|
17
|
+
* instances being created.
|
|
18
|
+
*/
|
|
19
|
+
id: number;
|
|
20
|
+
/**
|
|
21
|
+
* Portal base url
|
|
22
|
+
* For ArcGIS Online - https://org.env.arcgis.com
|
|
23
|
+
* For ArcGIS Enterprise - https://{portalHostname}/{webadaptor}
|
|
24
|
+
*/
|
|
25
|
+
portalUrl: string;
|
|
26
|
+
/**
|
|
27
|
+
* Hub Url that corresponds to the portal url is appropritate
|
|
28
|
+
*/
|
|
29
|
+
hubUrl?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The current UserSession
|
|
32
|
+
*/
|
|
33
|
+
authentication?: UserSession;
|
|
34
|
+
/**
|
|
35
|
+
* If the user is authenticated, the portal should be passed in
|
|
36
|
+
* so various getters can work as expected.
|
|
37
|
+
*
|
|
38
|
+
* ArcGISContextManager handles this internally
|
|
39
|
+
*/
|
|
40
|
+
portalSelf?: IPortal;
|
|
41
|
+
/**
|
|
42
|
+
* If the user is authenticated, the user should be passed in
|
|
43
|
+
* so various getters can work as expected.
|
|
44
|
+
*
|
|
45
|
+
* ArcGISContextManager handles this internally
|
|
46
|
+
*/
|
|
47
|
+
currentUser?: IUser;
|
|
48
|
+
/**
|
|
49
|
+
* Optional hash of additional context
|
|
50
|
+
*/
|
|
51
|
+
properties?: Record<string, any>;
|
|
52
|
+
/**
|
|
53
|
+
* Option to pass in service status vs fetching it
|
|
54
|
+
*/
|
|
55
|
+
serviceStatus?: HubServiceStatus;
|
|
56
|
+
/**
|
|
57
|
+
* Hash of feature flags
|
|
58
|
+
*/
|
|
59
|
+
featureFlags?: IFeatureFlags;
|
|
60
|
+
/**
|
|
61
|
+
* Array of Trusted Org Ids
|
|
62
|
+
*/
|
|
63
|
+
trustedOrgIds?: string[];
|
|
64
|
+
/**
|
|
65
|
+
* Trusted orgs xhr response
|
|
66
|
+
*/
|
|
67
|
+
trustedOrgs?: IHubTrustedOrgsResponse[];
|
|
68
|
+
/**
|
|
69
|
+
* Array of exchanged tokens for use
|
|
70
|
+
* with user-app-resources
|
|
71
|
+
*/
|
|
72
|
+
userResourceTokens?: IUserResourceToken[];
|
|
73
|
+
/**
|
|
74
|
+
* Hash of user hub settings. These are stored as
|
|
75
|
+
* user-app-resources, associated with the `hubforarcgis` clientId
|
|
76
|
+
*/
|
|
77
|
+
userHubSettings?: IUserHubSettings;
|
|
78
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
2
|
import { IItem, IPortal } from "@esri/arcgis-rest-portal";
|
|
3
|
-
import { IHubRequestOptions } from "../types";
|
|
3
|
+
import { IHubRequestOptions } from "../hub-types";
|
|
4
4
|
/**
|
|
5
5
|
* Get the fully qualified URL to the REST end point for an item.
|
|
6
6
|
* @param item w/ id and access
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
2
|
import { IItem, IPortal } from "@esri/arcgis-rest-portal";
|
|
3
|
-
import { IHubRequestOptions } from "../types";
|
|
3
|
+
import { IHubRequestOptions } from "../hub-types";
|
|
4
4
|
/**
|
|
5
5
|
* Get the fully qualified URL to the data REST end point for an item
|
|
6
6
|
* @param item w/ id and access
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
2
|
import { IPortal } from "@esri/arcgis-rest-portal";
|
|
3
|
-
import { IHubRequestOptions } from "../types";
|
|
3
|
+
import { IHubRequestOptions } from "../hub-types";
|
|
4
4
|
/**
|
|
5
5
|
* Return the URL of the item's page in the Portal Home application
|
|
6
6
|
* @param itemId The item's ID
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
2
|
import { IPortal } from "@esri/arcgis-rest-portal";
|
|
3
|
-
import { IHubRequestOptions } from "../types";
|
|
3
|
+
import { IHubRequestOptions } from "../hub-types";
|
|
4
4
|
/**
|
|
5
5
|
* ```js
|
|
6
6
|
* import { getPortalApiUrl } from "@esri/hub-common";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
2
|
import { IPortal } from "@esri/arcgis-rest-portal";
|
|
3
|
-
import { IHubRequestOptions } from "../types";
|
|
3
|
+
import { IHubRequestOptions } from "../hub-types";
|
|
4
4
|
/**
|
|
5
5
|
* ```js
|
|
6
6
|
* import { getPortalUrl } from "@esri/hub-common";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IArcGISContext } from "../
|
|
1
|
+
import type { IArcGISContext } from "../types/IArcGISContext";
|
|
2
2
|
import { HubEntity } from "../core/types/HubEntity";
|
|
3
3
|
import { CardModelTarget } from "../core/types/IHubCardViewModel";
|
|
4
4
|
import { IHubSearchResult } from "../search/types/IHubSearchResult";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IPortal } from "@esri/arcgis-rest-portal/dist/esm/util/get-portal";
|
|
2
|
-
import { IHubRequestOptions } from "../types";
|
|
2
|
+
import { IHubRequestOptions } from "../hub-types";
|
|
3
3
|
import { IRequestOptions } from "@esri/arcgis-rest-request/dist/esm/utils/IRequestOptions";
|
|
4
4
|
/**
|
|
5
5
|
* Computes a URL to the "Content" tab in the AGO Home app for a given portal URL string, IPortal, IHubRequestOptions or IRequestOptions object
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
2
|
import { IPortal } from "@esri/arcgis-rest-portal";
|
|
3
|
-
import { IHubRequestOptions } from "../types";
|
|
3
|
+
import { IHubRequestOptions } from "../hub-types";
|
|
4
4
|
/**
|
|
5
5
|
* Return the URL of the group's page in the Portal Home application
|
|
6
6
|
* @param groupId The group's ID
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
2
|
import { IPortal } from "@esri/arcgis-rest-portal";
|
|
3
|
-
import { IHubRequestOptions } from "../types";
|
|
3
|
+
import { IHubRequestOptions } from "../hub-types";
|
|
4
4
|
/**
|
|
5
5
|
* Return the URL of the user's page in the Portal Home application
|
|
6
6
|
* @param username The username
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IEntityEditorContext, IHubUser } from "../core/types";
|
|
2
|
-
import { IArcGISContext } from "../
|
|
2
|
+
import type { IArcGISContext } from "../types/IArcGISContext";
|
|
3
3
|
import { IEditorConfig } from "../core/schemas/types";
|
|
4
4
|
import { IWithEditorBehavior } from "../core/behaviors/IWithEditorBehavior";
|
|
5
5
|
import { UserEditorType } from "./_internal/UserSchema";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IUser } from "@esri/arcgis-rest-types";
|
|
2
2
|
import { IHubUser } from "../core/types/IHubUser";
|
|
3
|
-
import { IHubRequestOptions } from "../types";
|
|
3
|
+
import { IHubRequestOptions } from "../hub-types";
|
|
4
4
|
import { IHubSearchResult } from "../search/types/IHubSearchResult";
|
|
5
|
-
import { IArcGISContext } from "../
|
|
5
|
+
import type { IArcGISContext } from "../types/IArcGISContext";
|
|
6
6
|
/**
|
|
7
7
|
* Converts a IUser object into an IHubUser.
|
|
8
8
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IUser } from "@esri/arcgis-rest-types";
|
|
2
|
-
import { IArcGISContext } from "../../
|
|
2
|
+
import type { IArcGISContext } from "../../types/IArcGISContext";
|
|
3
3
|
import { IHubUser } from "../../core/types";
|
|
4
4
|
/**
|
|
5
5
|
* Given a model and a user, sets various computed properties that can't be directly mapped.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IUser, IPortal } from "@esri/arcgis-rest-portal";
|
|
2
|
-
import { IEnrichmentErrorInfo, IHubRequestOptions } from "../../types";
|
|
2
|
+
import { IEnrichmentErrorInfo, IHubRequestOptions } from "../../hub-types";
|
|
3
3
|
/**
|
|
4
4
|
* Possible additional properties available through enrichments
|
|
5
5
|
*/
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { IHubHistory } from "../core/hubHistory";
|
|
2
|
+
/**
|
|
3
|
+
* Hub Level Settings
|
|
4
|
+
*/
|
|
5
|
+
export interface IUserHubSettings {
|
|
6
|
+
schemaVersion: number;
|
|
7
|
+
username?: string;
|
|
8
|
+
updated?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Track notices the user has dismissed
|
|
11
|
+
* stored as an object so we can add more types in the future
|
|
12
|
+
*/
|
|
13
|
+
notices?: {
|
|
14
|
+
/**
|
|
15
|
+
* Ids of notices the user has dismissed
|
|
16
|
+
*/
|
|
17
|
+
dismissed?: string[];
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Features that are enabled for the user in preview mode
|
|
21
|
+
*/
|
|
22
|
+
preview?: {
|
|
23
|
+
/**
|
|
24
|
+
* Enable the workspace feature
|
|
25
|
+
*/
|
|
26
|
+
workspace: boolean;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Optional history of sites/content the user has visited
|
|
30
|
+
*/
|
|
31
|
+
history?: IHubHistory;
|
|
32
|
+
}
|