@esri/hub-common 13.17.2 → 13.17.4
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/associations/addAssociation.js +16 -0
- package/dist/esm/associations/addAssociation.js.map +1 -0
- package/dist/esm/associations/index.js +5 -0
- package/dist/esm/associations/index.js.map +1 -0
- package/dist/esm/associations/internal/getTargetEntityFromAssociationType.js +18 -0
- package/dist/esm/associations/internal/getTargetEntityFromAssociationType.js.map +1 -0
- package/dist/esm/associations/internal/getTypeByIdsQuery.js +28 -0
- package/dist/esm/associations/internal/getTypeByIdsQuery.js.map +1 -0
- package/dist/esm/associations/internal/getTypeFromAssociationType.js +18 -0
- package/dist/esm/associations/internal/getTypeFromAssociationType.js.map +1 -0
- package/dist/esm/associations/internal/getTypeWithKeywordQuery.js +27 -0
- package/dist/esm/associations/internal/getTypeWithKeywordQuery.js.map +1 -0
- package/dist/esm/associations/internal/getTypeWithoutKeywordQuery.js +27 -0
- package/dist/esm/associations/internal/getTypeWithoutKeywordQuery.js.map +1 -0
- package/dist/esm/associations/listAssociations.js +17 -0
- package/dist/esm/associations/listAssociations.js.map +1 -0
- package/dist/esm/associations/removeAssociation.js +17 -0
- package/dist/esm/associations/removeAssociation.js.map +1 -0
- package/dist/esm/associations/types.js +2 -0
- package/dist/esm/associations/types.js.map +1 -0
- package/dist/esm/content/_internal/ContentSchema.js +16 -0
- package/dist/esm/content/_internal/ContentSchema.js.map +1 -0
- package/dist/esm/content/_internal/ContentUiSchemaEdit.js +148 -0
- package/dist/esm/content/_internal/ContentUiSchemaEdit.js.map +1 -0
- package/dist/esm/content/_internal/ContentUiSchemaSettings.js +59 -0
- package/dist/esm/content/_internal/ContentUiSchemaSettings.js.map +1 -0
- package/dist/esm/content/_internal/computeProps.js +57 -0
- package/dist/esm/content/_internal/computeProps.js.map +1 -0
- package/dist/esm/content/hostedServiceUtils.js +91 -0
- package/dist/esm/content/hostedServiceUtils.js.map +1 -0
- package/dist/esm/core/EntityEditor.js +56 -0
- package/dist/esm/core/EntityEditor.js.map +1 -0
- package/dist/esm/core/behaviors/IWIthAssociationBehavior.js +1 -0
- package/dist/esm/core/behaviors/IWIthAssociationBehavior.js.map +1 -0
- package/dist/esm/core/behaviors/IWithFollowersBehavior.js +1 -0
- package/dist/esm/core/behaviors/IWithFollowersBehavior.js.map +1 -0
- package/dist/esm/core/enrichEntity.js +66 -0
- package/dist/esm/core/enrichEntity.js.map +1 -0
- package/dist/esm/core/schemas/getEditorConfig.js +13 -0
- package/dist/esm/core/schemas/getEditorConfig.js.map +1 -0
- package/dist/esm/core/schemas/internal/ConfigurableEntity.js +1 -0
- package/dist/esm/core/schemas/internal/ConfigurableEntity.js.map +1 -0
- package/dist/esm/core/schemas/internal/configOptionHelpers.js +88 -0
- package/dist/esm/core/schemas/internal/configOptionHelpers.js.map +1 -0
- package/dist/esm/core/schemas/internal/getCategoryItems.js +34 -0
- package/dist/esm/core/schemas/internal/getCategoryItems.js.map +1 -0
- package/dist/esm/core/schemas/internal/getConfigOptions.js +15 -0
- package/dist/esm/core/schemas/internal/getConfigOptions.js.map +1 -0
- package/dist/esm/core/schemas/internal/getEditorConfigOptions.js +37 -0
- package/dist/esm/core/schemas/internal/getEditorConfigOptions.js.map +1 -0
- package/dist/esm/core/schemas/internal/getEntityEditorSchemas.js +93 -0
- package/dist/esm/core/schemas/internal/getEntityEditorSchemas.js.map +1 -0
- package/dist/esm/core/schemas/internal/getFeaturedContentCatalogs.js +21 -0
- package/dist/esm/core/schemas/internal/getFeaturedContentCatalogs.js.map +1 -0
- package/dist/esm/core/schemas/internal/getFeaturedImageUrl.js +11 -0
- package/dist/esm/core/schemas/internal/getFeaturedImageUrl.js.map +1 -0
- package/dist/esm/core/schemas/internal/getLocationExtent.js +11 -0
- package/dist/esm/core/schemas/internal/getLocationExtent.js.map +1 -0
- package/dist/esm/core/schemas/internal/getLocationOptions.js +64 -0
- package/dist/esm/core/schemas/internal/getLocationOptions.js.map +1 -0
- package/dist/esm/core/schemas/internal/getSharableGroupsComboBoxItems.js +27 -0
- package/dist/esm/core/schemas/internal/getSharableGroupsComboBoxItems.js.map +1 -0
- package/dist/esm/core/schemas/internal/getTagItems.js +61 -0
- package/dist/esm/core/schemas/internal/getTagItems.js.map +1 -0
- package/dist/esm/core/traits/IWithAssociations.js +1 -0
- package/dist/esm/core/traits/IWithAssociations.js.map +1 -0
- package/dist/esm/core/traits/IWithFollowers.js +1 -0
- package/dist/esm/core/traits/IWithFollowers.js.map +1 -0
- package/dist/esm/core/types/HubEntityEditor.js +1 -0
- package/dist/esm/core/types/HubEntityEditor.js.map +1 -0
- package/dist/esm/core/types/IHubGroup.js +1 -0
- package/dist/esm/core/types/IHubGroup.js.map +1 -0
- package/dist/esm/discussions/api/channels/channels.js +14 -0
- package/dist/esm/discussions/api/channels/channels.js.map +1 -0
- package/dist/esm/discussions/api/channels/index.js +2 -0
- package/dist/esm/discussions/api/channels/index.js.map +1 -0
- package/dist/esm/discussions/api/index.js +3 -0
- package/dist/esm/discussions/api/index.js.map +1 -0
- package/dist/esm/discussions/api/request.js +20 -0
- package/dist/esm/discussions/api/request.js.map +1 -0
- package/dist/esm/discussions/api/types.js +245 -0
- package/dist/esm/discussions/api/types.js.map +1 -0
- package/dist/esm/discussions/api/utils/request.js +77 -0
- package/dist/esm/discussions/api/utils/request.js.map +1 -0
- package/dist/esm/features/_internal/checkCapabilityAccess.js +54 -0
- package/dist/esm/features/_internal/checkCapabilityAccess.js.map +1 -0
- package/dist/esm/features/_internal/checkFeatureAccess.js +99 -0
- package/dist/esm/features/_internal/checkFeatureAccess.js.map +1 -0
- package/dist/esm/features/_internal/index.js +3 -0
- package/dist/esm/features/_internal/index.js.map +1 -0
- package/dist/esm/features/checkFeature.js +107 -0
- package/dist/esm/features/checkFeature.js.map +1 -0
- package/dist/esm/features/index.js +5 -0
- package/dist/esm/features/index.js.map +1 -0
- package/dist/esm/features/types.js +28 -0
- package/dist/esm/features/types.js.map +1 -0
- package/dist/esm/groups/HubGroup.js +258 -0
- package/dist/esm/groups/HubGroup.js.map +1 -0
- package/dist/esm/groups/_internal/AddOrInviteUsersToGroupUtils.js +195 -0
- package/dist/esm/groups/_internal/AddOrInviteUsersToGroupUtils.js.map +1 -0
- package/dist/esm/groups/_internal/GroupBusinessRules.js +94 -0
- package/dist/esm/groups/_internal/GroupBusinessRules.js.map +1 -0
- package/dist/esm/groups/_internal/GroupSchema.js +31 -0
- package/dist/esm/groups/_internal/GroupSchema.js.map +1 -0
- package/dist/esm/groups/_internal/GroupUiSchemaEdit.js +62 -0
- package/dist/esm/groups/_internal/GroupUiSchemaEdit.js.map +1 -0
- package/dist/esm/groups/_internal/GroupUiSchemaSettings.js +46 -0
- package/dist/esm/groups/_internal/GroupUiSchemaSettings.js.map +1 -0
- package/dist/esm/groups/_internal/autoAddUsersAsAdmins.js +24 -0
- package/dist/esm/groups/_internal/autoAddUsersAsAdmins.js.map +1 -0
- package/dist/esm/groups/_internal/computeProps.js +45 -0
- package/dist/esm/groups/_internal/computeProps.js.map +1 -0
- package/dist/esm/groups/_internal/convertGroupToHubGroup.js +14 -0
- package/dist/esm/groups/_internal/convertGroupToHubGroup.js.map +1 -0
- package/dist/esm/groups/_internal/convertHubGroupToGroup.js +26 -0
- package/dist/esm/groups/_internal/convertHubGroupToGroup.js.map +1 -0
- package/dist/esm/groups/_internal/getPropertyMap.js +40 -0
- package/dist/esm/groups/_internal/getPropertyMap.js.map +1 -0
- package/dist/esm/groups/_internal/processAutoAddUsers.js +62 -0
- package/dist/esm/groups/_internal/processAutoAddUsers.js.map +1 -0
- package/dist/esm/groups/_internal/processEmailUsers.js +50 -0
- package/dist/esm/groups/_internal/processEmailUsers.js.map +1 -0
- package/dist/esm/groups/_internal/processInviteUsers.js +51 -0
- package/dist/esm/groups/_internal/processInviteUsers.js.map +1 -0
- package/dist/esm/groups/addOrInviteUsersToGroup.js +67 -0
- package/dist/esm/groups/addOrInviteUsersToGroup.js.map +1 -0
- package/dist/esm/groups/addOrInviteUsersToGroups.js +51 -0
- package/dist/esm/groups/addOrInviteUsersToGroups.js.map +1 -0
- package/dist/esm/groups/autoAddUsers.js +24 -0
- package/dist/esm/groups/autoAddUsers.js.map +1 -0
- package/dist/esm/groups/defaults.js +21 -0
- package/dist/esm/groups/defaults.js.map +1 -0
- package/dist/esm/groups/deleteGroupThumbnail.js +14 -0
- package/dist/esm/groups/deleteGroupThumbnail.js.map +1 -0
- package/dist/esm/groups/emailOrgUsers.js +29 -0
- package/dist/esm/groups/emailOrgUsers.js.map +1 -0
- package/dist/esm/groups/inviteUsers.js +30 -0
- package/dist/esm/groups/inviteUsers.js.map +1 -0
- package/dist/esm/groups/setGroupThumbnail.js +32 -0
- package/dist/esm/groups/setGroupThumbnail.js.map +1 -0
- package/dist/esm/groups/types/types.js +1 -0
- package/dist/esm/groups/types/types.js.map +1 -0
- package/dist/esm/initiatives/_internal/InitiativeUiSchemaCreate.js +134 -0
- package/dist/esm/initiatives/_internal/InitiativeUiSchemaCreate.js.map +1 -0
- package/dist/esm/initiatives/view.js +81 -0
- package/dist/esm/initiatives/view.js.map +1 -0
- package/dist/esm/items/deleteItemThumbnail.js +14 -0
- package/dist/esm/items/deleteItemThumbnail.js.map +1 -0
- package/dist/esm/pages/HubPage.js +201 -0
- package/dist/esm/pages/HubPage.js.map +1 -0
- package/dist/esm/pages/_internal/PageSchema.js +31 -0
- package/dist/esm/pages/_internal/PageSchema.js.map +1 -0
- package/dist/esm/pages/_internal/PageUiSchemaEdit.js +126 -0
- package/dist/esm/pages/_internal/PageUiSchemaEdit.js.map +1 -0
- package/dist/esm/pages/_internal/computeProps.js +45 -0
- package/dist/esm/pages/_internal/computeProps.js.map +1 -0
- package/dist/esm/pages/_internal/getPropertyMap.js +20 -0
- package/dist/esm/pages/_internal/getPropertyMap.js.map +1 -0
- package/dist/esm/pages/defaults.js +41 -0
- package/dist/esm/pages/defaults.js.map +1 -0
- package/dist/esm/permissions/PlatformPermissionPolicies.js +711 -0
- package/dist/esm/permissions/PlatformPermissionPolicies.js.map +1 -0
- package/dist/esm/permissions/_internal/PermissionCheckFunction.js +1 -0
- package/dist/esm/permissions/_internal/PermissionCheckFunction.js.map +1 -0
- package/dist/esm/permissions/_internal/checkAvailability.js +46 -0
- package/dist/esm/permissions/_internal/checkAvailability.js.map +1 -0
- package/dist/esm/permissions/_internal/checkEntityFeature.js +29 -0
- package/dist/esm/permissions/_internal/checkEntityFeature.js.map +1 -0
- package/dist/esm/permissions/_internal/checkEnvironment.js +28 -0
- package/dist/esm/permissions/_internal/checkEnvironment.js.map +1 -0
- package/dist/esm/permissions/_internal/checkFeature.js +65 -0
- package/dist/esm/permissions/_internal/checkFeature.js.map +1 -0
- package/dist/esm/permissions/_internal/checkFeatures.js +42 -0
- package/dist/esm/permissions/_internal/checkFeatures.js.map +1 -0
- package/dist/esm/permissions/_internal/checkParents.js +23 -0
- package/dist/esm/permissions/_internal/checkParents.js.map +1 -0
- package/dist/esm/permissions/_internal/checkServiceStatus.js +24 -0
- package/dist/esm/permissions/_internal/checkServiceStatus.js.map +1 -0
- package/dist/esm/permissions/_internal/processEntityFeatures.js +26 -0
- package/dist/esm/permissions/_internal/processEntityFeatures.js.map +1 -0
- package/dist/esm/projects/_internal/getProjectEditorConfigOptions.js +63 -0
- package/dist/esm/projects/_internal/getProjectEditorConfigOptions.js.map +1 -0
- package/dist/esm/search/_internal/commonHelpers/getDiscussionsApiDefinition.js +10 -0
- package/dist/esm/search/_internal/commonHelpers/getDiscussionsApiDefinition.js.map +1 -0
- package/dist/esm/search/_internal/commonHelpers/shouldUseDiscussionsApi.js +13 -0
- package/dist/esm/search/_internal/commonHelpers/shouldUseDiscussionsApi.js.map +1 -0
- package/dist/esm/search/_internal/explainFilter.js +34 -0
- package/dist/esm/search/_internal/explainFilter.js.map +1 -0
- package/dist/esm/search/_internal/explainHelpers.js +193 -0
- package/dist/esm/search/_internal/explainHelpers.js.map +1 -0
- package/dist/esm/search/_internal/explainPredicate.js +35 -0
- package/dist/esm/search/_internal/explainPredicate.js.map +1 -0
- package/dist/esm/search/_internal/getEntityTypeFromType.js +21 -0
- package/dist/esm/search/_internal/getEntityTypeFromType.js.map +1 -0
- package/dist/esm/search/_internal/hubSearchChannels.js +137 -0
- package/dist/esm/search/_internal/hubSearchChannels.js.map +1 -0
- package/dist/esm/search/_internal/negateGroupPredicates.js +28 -0
- package/dist/esm/search/_internal/negateGroupPredicates.js.map +1 -0
- package/dist/esm/search/_internal/portalSearchGroupMembers.js +10 -1
- package/dist/esm/search/_internal/portalSearchGroupMembers.js.map +1 -1
- package/dist/esm/search/explainQueryResult.js +53 -0
- package/dist/esm/search/explainQueryResult.js.map +1 -0
- package/dist/esm/sites/HubSite.js +2 -1
- package/dist/esm/sites/HubSite.js.map +1 -1
- package/dist/esm/sites/_internal/SiteUiSchemaFollowers.js +56 -0
- package/dist/esm/sites/_internal/SiteUiSchemaFollowers.js.map +1 -0
- package/dist/esm/sites/_internal/_migrate-summary-stat-card-configs.js +188 -0
- package/dist/esm/sites/_internal/_migrate-summary-stat-card-configs.js.map +1 -0
- package/dist/esm/sites/_internal/applyCatalogStructureMigration.js +39 -0
- package/dist/esm/sites/_internal/applyCatalogStructureMigration.js.map +1 -0
- package/dist/esm/sites/_internal/applyDefaultCollectionMigration.js +92 -0
- package/dist/esm/sites/_internal/applyDefaultCollectionMigration.js.map +1 -0
- package/dist/esm/sites/_internal/capabilities/capabilityToFeatureMap.js +31 -0
- package/dist/esm/sites/_internal/capabilities/capabilityToFeatureMap.js.map +1 -0
- package/dist/esm/sites/_internal/capabilities/convertFeaturesToLegacyCapabilities.js +46 -0
- package/dist/esm/sites/_internal/capabilities/convertFeaturesToLegacyCapabilities.js.map +1 -0
- package/dist/esm/sites/_internal/capabilities/migrateLegacyCapabilitiesToFeatures.js +34 -0
- package/dist/esm/sites/_internal/capabilities/migrateLegacyCapabilitiesToFeatures.js.map +1 -0
- package/dist/esm/sites/_internal/capabilities/types.js +1 -0
- package/dist/esm/sites/_internal/capabilities/types.js.map +1 -0
- package/dist/esm/sites/_internal/convertCatalogToLegacyFormat.js +33 -0
- package/dist/esm/sites/_internal/convertCatalogToLegacyFormat.js.map +1 -0
- package/dist/esm/sites/_internal/reflectCollectionsToSearchCategories.js +55 -0
- package/dist/esm/sites/_internal/reflectCollectionsToSearchCategories.js.map +1 -0
- package/dist/esm/sites/_internal/types.js +11 -0
- package/dist/esm/sites/_internal/types.js.map +1 -0
- package/dist/esm/urls/cacheBustUrl.js +13 -0
- package/dist/esm/urls/cacheBustUrl.js.map +1 -0
- package/dist/esm/urls/getCardModelUrl.js +76 -0
- package/dist/esm/urls/getCardModelUrl.js.map +1 -0
- package/dist/esm/users/view.js +71 -0
- package/dist/esm/users/view.js.map +1 -0
- package/dist/esm/utils/getEnvironmentFromPortalUrl.js +20 -0
- package/dist/esm/utils/getEnvironmentFromPortalUrl.js.map +1 -0
- package/dist/node/associations/addAssociation.js +20 -0
- package/dist/node/associations/addAssociation.js.map +1 -0
- package/dist/node/associations/index.js +8 -0
- package/dist/node/associations/index.js.map +1 -0
- package/dist/node/associations/internal/getTargetEntityFromAssociationType.js +22 -0
- package/dist/node/associations/internal/getTargetEntityFromAssociationType.js.map +1 -0
- package/dist/node/associations/internal/getTypeByIdsQuery.js +32 -0
- package/dist/node/associations/internal/getTypeByIdsQuery.js.map +1 -0
- package/dist/node/associations/internal/getTypeFromAssociationType.js +22 -0
- package/dist/node/associations/internal/getTypeFromAssociationType.js.map +1 -0
- package/dist/node/associations/internal/getTypeWithKeywordQuery.js +31 -0
- package/dist/node/associations/internal/getTypeWithKeywordQuery.js.map +1 -0
- package/dist/node/associations/internal/getTypeWithoutKeywordQuery.js +31 -0
- package/dist/node/associations/internal/getTypeWithoutKeywordQuery.js.map +1 -0
- package/dist/node/associations/listAssociations.js +21 -0
- package/dist/node/associations/listAssociations.js.map +1 -0
- package/dist/node/associations/removeAssociation.js +21 -0
- package/dist/node/associations/removeAssociation.js.map +1 -0
- package/dist/node/associations/types.js +4 -0
- package/dist/node/associations/types.js.map +1 -0
- package/dist/node/content/_internal/ContentSchema.js +19 -0
- package/dist/node/content/_internal/ContentSchema.js.map +1 -0
- package/dist/node/content/_internal/ContentUiSchemaEdit.js +151 -0
- package/dist/node/content/_internal/ContentUiSchemaEdit.js.map +1 -0
- package/dist/node/content/_internal/ContentUiSchemaSettings.js +62 -0
- package/dist/node/content/_internal/ContentUiSchemaSettings.js.map +1 -0
- package/dist/node/content/_internal/computeProps.js +62 -0
- package/dist/node/content/_internal/computeProps.js.map +1 -0
- package/dist/node/content/hostedServiceUtils.js +98 -0
- package/dist/node/content/hostedServiceUtils.js.map +1 -0
- package/dist/node/core/EntityEditor.js +60 -0
- package/dist/node/core/EntityEditor.js.map +1 -0
- package/dist/node/core/behaviors/IWIthAssociationBehavior.js +3 -0
- package/dist/node/core/behaviors/IWIthAssociationBehavior.js.map +1 -0
- package/dist/node/core/behaviors/IWithFollowersBehavior.js +3 -0
- package/dist/node/core/behaviors/IWithFollowersBehavior.js.map +1 -0
- package/dist/node/core/enrichEntity.js +69 -0
- package/dist/node/core/enrichEntity.js.map +1 -0
- package/dist/node/core/schemas/getEditorConfig.js +17 -0
- package/dist/node/core/schemas/getEditorConfig.js.map +1 -0
- package/dist/node/core/schemas/internal/ConfigurableEntity.js +3 -0
- package/dist/node/core/schemas/internal/ConfigurableEntity.js.map +1 -0
- package/dist/node/core/schemas/internal/configOptionHelpers.js +91 -0
- package/dist/node/core/schemas/internal/configOptionHelpers.js.map +1 -0
- package/dist/node/core/schemas/internal/getCategoryItems.js +38 -0
- package/dist/node/core/schemas/internal/getCategoryItems.js.map +1 -0
- package/dist/node/core/schemas/internal/getConfigOptions.js +19 -0
- package/dist/node/core/schemas/internal/getConfigOptions.js.map +1 -0
- package/dist/node/core/schemas/internal/getEditorConfigOptions.js +41 -0
- package/dist/node/core/schemas/internal/getEditorConfigOptions.js.map +1 -0
- package/dist/node/core/schemas/internal/getEntityEditorSchemas.js +97 -0
- package/dist/node/core/schemas/internal/getEntityEditorSchemas.js.map +1 -0
- package/dist/node/core/schemas/internal/getFeaturedContentCatalogs.js +25 -0
- package/dist/node/core/schemas/internal/getFeaturedContentCatalogs.js.map +1 -0
- package/dist/node/core/schemas/internal/getFeaturedImageUrl.js +15 -0
- package/dist/node/core/schemas/internal/getFeaturedImageUrl.js.map +1 -0
- package/dist/node/core/schemas/internal/getLocationExtent.js +15 -0
- package/dist/node/core/schemas/internal/getLocationExtent.js.map +1 -0
- package/dist/node/core/schemas/internal/getLocationOptions.js +68 -0
- package/dist/node/core/schemas/internal/getLocationOptions.js.map +1 -0
- package/dist/node/core/schemas/internal/getSharableGroupsComboBoxItems.js +31 -0
- package/dist/node/core/schemas/internal/getSharableGroupsComboBoxItems.js.map +1 -0
- package/dist/node/core/schemas/internal/getTagItems.js +65 -0
- package/dist/node/core/schemas/internal/getTagItems.js.map +1 -0
- package/dist/node/core/traits/IWithAssociations.js +3 -0
- package/dist/node/core/traits/IWithAssociations.js.map +1 -0
- package/dist/node/core/traits/IWithFollowers.js +3 -0
- package/dist/node/core/traits/IWithFollowers.js.map +1 -0
- package/dist/node/core/types/HubEntityEditor.js +3 -0
- package/dist/node/core/types/HubEntityEditor.js.map +1 -0
- package/dist/node/core/types/IHubGroup.js +3 -0
- package/dist/node/core/types/IHubGroup.js.map +1 -0
- package/dist/node/discussions/api/channels/channels.js +18 -0
- package/dist/node/discussions/api/channels/channels.js.map +1 -0
- package/dist/node/discussions/api/channels/index.js +5 -0
- package/dist/node/discussions/api/channels/index.js.map +1 -0
- package/dist/node/discussions/api/index.js +6 -0
- package/dist/node/discussions/api/index.js.map +1 -0
- package/dist/node/discussions/api/request.js +24 -0
- package/dist/node/discussions/api/request.js.map +1 -0
- package/dist/node/discussions/api/types.js +248 -0
- package/dist/node/discussions/api/types.js.map +1 -0
- package/dist/node/discussions/api/utils/request.js +83 -0
- package/dist/node/discussions/api/utils/request.js.map +1 -0
- package/dist/node/features/_internal/checkCapabilityAccess.js +54 -0
- package/dist/node/features/_internal/checkCapabilityAccess.js.map +1 -0
- package/dist/node/features/_internal/checkFeatureAccess.js +99 -0
- package/dist/node/features/_internal/checkFeatureAccess.js.map +1 -0
- package/dist/node/features/_internal/index.js +3 -0
- package/dist/node/features/_internal/index.js.map +1 -0
- package/dist/node/features/checkFeature.js +111 -0
- package/dist/node/features/checkFeature.js.map +1 -0
- package/dist/node/features/index.js +8 -0
- package/dist/node/features/index.js.map +1 -0
- package/dist/node/features/types.js +32 -0
- package/dist/node/features/types.js.map +1 -0
- package/dist/node/groups/HubGroup.js +262 -0
- package/dist/node/groups/HubGroup.js.map +1 -0
- package/dist/node/groups/_internal/AddOrInviteUsersToGroupUtils.js +205 -0
- package/dist/node/groups/_internal/AddOrInviteUsersToGroupUtils.js.map +1 -0
- package/dist/node/groups/_internal/GroupBusinessRules.js +97 -0
- package/dist/node/groups/_internal/GroupBusinessRules.js.map +1 -0
- package/dist/node/groups/_internal/GroupSchema.js +34 -0
- package/dist/node/groups/_internal/GroupSchema.js.map +1 -0
- package/dist/node/groups/_internal/GroupUiSchemaEdit.js +65 -0
- package/dist/node/groups/_internal/GroupUiSchemaEdit.js.map +1 -0
- package/dist/node/groups/_internal/GroupUiSchemaSettings.js +49 -0
- package/dist/node/groups/_internal/GroupUiSchemaSettings.js.map +1 -0
- package/dist/node/groups/_internal/autoAddUsersAsAdmins.js +28 -0
- package/dist/node/groups/_internal/autoAddUsersAsAdmins.js.map +1 -0
- package/dist/node/groups/_internal/computeProps.js +49 -0
- package/dist/node/groups/_internal/computeProps.js.map +1 -0
- package/dist/node/groups/_internal/convertGroupToHubGroup.js +18 -0
- package/dist/node/groups/_internal/convertGroupToHubGroup.js.map +1 -0
- package/dist/node/groups/_internal/convertHubGroupToGroup.js +30 -0
- package/dist/node/groups/_internal/convertHubGroupToGroup.js.map +1 -0
- package/dist/node/groups/_internal/getPropertyMap.js +44 -0
- package/dist/node/groups/_internal/getPropertyMap.js.map +1 -0
- package/dist/node/groups/_internal/processAutoAddUsers.js +66 -0
- package/dist/node/groups/_internal/processAutoAddUsers.js.map +1 -0
- package/dist/node/groups/_internal/processEmailUsers.js +54 -0
- package/dist/node/groups/_internal/processEmailUsers.js.map +1 -0
- package/dist/node/groups/_internal/processInviteUsers.js +55 -0
- package/dist/node/groups/_internal/processInviteUsers.js.map +1 -0
- package/dist/node/groups/addOrInviteUsersToGroup.js +71 -0
- package/dist/node/groups/addOrInviteUsersToGroup.js.map +1 -0
- package/dist/node/groups/addOrInviteUsersToGroups.js +55 -0
- package/dist/node/groups/addOrInviteUsersToGroups.js.map +1 -0
- package/dist/node/groups/autoAddUsers.js +28 -0
- package/dist/node/groups/autoAddUsers.js.map +1 -0
- package/dist/node/groups/defaults.js +24 -0
- package/dist/node/groups/defaults.js.map +1 -0
- package/dist/node/groups/deleteGroupThumbnail.js +18 -0
- package/dist/node/groups/deleteGroupThumbnail.js.map +1 -0
- package/dist/node/groups/emailOrgUsers.js +33 -0
- package/dist/node/groups/emailOrgUsers.js.map +1 -0
- package/dist/node/groups/inviteUsers.js +34 -0
- package/dist/node/groups/inviteUsers.js.map +1 -0
- package/dist/node/groups/setGroupThumbnail.js +36 -0
- package/dist/node/groups/setGroupThumbnail.js.map +1 -0
- package/dist/node/groups/types/types.js +3 -0
- package/dist/node/groups/types/types.js.map +1 -0
- package/dist/node/initiatives/_internal/InitiativeUiSchemaCreate.js +137 -0
- package/dist/node/initiatives/_internal/InitiativeUiSchemaCreate.js.map +1 -0
- package/dist/node/initiatives/view.js +84 -0
- package/dist/node/initiatives/view.js.map +1 -0
- package/dist/node/items/deleteItemThumbnail.js +18 -0
- package/dist/node/items/deleteItemThumbnail.js.map +1 -0
- package/dist/node/pages/HubPage.js +205 -0
- package/dist/node/pages/HubPage.js.map +1 -0
- package/dist/node/pages/_internal/PageSchema.js +34 -0
- package/dist/node/pages/_internal/PageSchema.js.map +1 -0
- package/dist/node/pages/_internal/PageUiSchemaEdit.js +129 -0
- package/dist/node/pages/_internal/PageUiSchemaEdit.js.map +1 -0
- package/dist/node/pages/_internal/computeProps.js +49 -0
- package/dist/node/pages/_internal/computeProps.js.map +1 -0
- package/dist/node/pages/_internal/getPropertyMap.js +24 -0
- package/dist/node/pages/_internal/getPropertyMap.js.map +1 -0
- package/dist/node/pages/defaults.js +44 -0
- package/dist/node/pages/defaults.js.map +1 -0
- package/dist/node/permissions/PlatformPermissionPolicies.js +714 -0
- package/dist/node/permissions/PlatformPermissionPolicies.js.map +1 -0
- package/dist/node/permissions/_internal/PermissionCheckFunction.js +3 -0
- package/dist/node/permissions/_internal/PermissionCheckFunction.js.map +1 -0
- package/dist/node/permissions/_internal/checkAvailability.js +50 -0
- package/dist/node/permissions/_internal/checkAvailability.js.map +1 -0
- package/dist/node/permissions/_internal/checkEntityFeature.js +33 -0
- package/dist/node/permissions/_internal/checkEntityFeature.js.map +1 -0
- package/dist/node/permissions/_internal/checkEnvironment.js +32 -0
- package/dist/node/permissions/_internal/checkEnvironment.js.map +1 -0
- package/dist/node/permissions/_internal/checkFeature.js +69 -0
- package/dist/node/permissions/_internal/checkFeature.js.map +1 -0
- package/dist/node/permissions/_internal/checkFeatures.js +46 -0
- package/dist/node/permissions/_internal/checkFeatures.js.map +1 -0
- package/dist/node/permissions/_internal/checkParents.js +27 -0
- package/dist/node/permissions/_internal/checkParents.js.map +1 -0
- package/dist/node/permissions/_internal/checkServiceStatus.js +28 -0
- package/dist/node/permissions/_internal/checkServiceStatus.js.map +1 -0
- package/dist/node/permissions/_internal/processEntityFeatures.js +30 -0
- package/dist/node/permissions/_internal/processEntityFeatures.js.map +1 -0
- package/dist/node/projects/_internal/getProjectEditorConfigOptions.js +67 -0
- package/dist/node/projects/_internal/getProjectEditorConfigOptions.js.map +1 -0
- package/dist/node/search/_internal/commonHelpers/getDiscussionsApiDefinition.js +14 -0
- package/dist/node/search/_internal/commonHelpers/getDiscussionsApiDefinition.js.map +1 -0
- package/dist/node/search/_internal/commonHelpers/shouldUseDiscussionsApi.js +17 -0
- package/dist/node/search/_internal/commonHelpers/shouldUseDiscussionsApi.js.map +1 -0
- package/dist/node/search/_internal/explainFilter.js +38 -0
- package/dist/node/search/_internal/explainFilter.js.map +1 -0
- package/dist/node/search/_internal/explainHelpers.js +202 -0
- package/dist/node/search/_internal/explainHelpers.js.map +1 -0
- package/dist/node/search/_internal/explainPredicate.js +39 -0
- package/dist/node/search/_internal/explainPredicate.js.map +1 -0
- package/dist/node/search/_internal/getEntityTypeFromType.js +25 -0
- package/dist/node/search/_internal/getEntityTypeFromType.js.map +1 -0
- package/dist/node/search/_internal/hubSearchChannels.js +140 -0
- package/dist/node/search/_internal/hubSearchChannels.js.map +1 -0
- package/dist/node/search/_internal/negateGroupPredicates.js +32 -0
- package/dist/node/search/_internal/negateGroupPredicates.js.map +1 -0
- package/dist/node/search/_internal/portalSearchGroupMembers.js +10 -1
- package/dist/node/search/_internal/portalSearchGroupMembers.js.map +1 -1
- package/dist/node/search/explainQueryResult.js +57 -0
- package/dist/node/search/explainQueryResult.js.map +1 -0
- package/dist/node/sites/HubSite.js +2 -1
- package/dist/node/sites/HubSite.js.map +1 -1
- package/dist/node/sites/_internal/SiteUiSchemaFollowers.js +59 -0
- package/dist/node/sites/_internal/SiteUiSchemaFollowers.js.map +1 -0
- package/dist/node/sites/_internal/_migrate-summary-stat-card-configs.js +192 -0
- package/dist/node/sites/_internal/_migrate-summary-stat-card-configs.js.map +1 -0
- package/dist/node/sites/_internal/applyCatalogStructureMigration.js +43 -0
- package/dist/node/sites/_internal/applyCatalogStructureMigration.js.map +1 -0
- package/dist/node/sites/_internal/applyDefaultCollectionMigration.js +96 -0
- package/dist/node/sites/_internal/applyDefaultCollectionMigration.js.map +1 -0
- package/dist/node/sites/_internal/capabilities/capabilityToFeatureMap.js +34 -0
- package/dist/node/sites/_internal/capabilities/capabilityToFeatureMap.js.map +1 -0
- package/dist/node/sites/_internal/capabilities/convertFeaturesToLegacyCapabilities.js +49 -0
- package/dist/node/sites/_internal/capabilities/convertFeaturesToLegacyCapabilities.js.map +1 -0
- package/dist/node/sites/_internal/capabilities/migrateLegacyCapabilitiesToFeatures.js +37 -0
- package/dist/node/sites/_internal/capabilities/migrateLegacyCapabilitiesToFeatures.js.map +1 -0
- package/dist/node/sites/_internal/capabilities/types.js +3 -0
- package/dist/node/sites/_internal/capabilities/types.js.map +1 -0
- package/dist/node/sites/_internal/convertCatalogToLegacyFormat.js +37 -0
- package/dist/node/sites/_internal/convertCatalogToLegacyFormat.js.map +1 -0
- package/dist/node/sites/_internal/reflectCollectionsToSearchCategories.js +59 -0
- package/dist/node/sites/_internal/reflectCollectionsToSearchCategories.js.map +1 -0
- package/dist/node/sites/_internal/types.js +14 -0
- package/dist/node/sites/_internal/types.js.map +1 -0
- package/dist/node/urls/cacheBustUrl.js +16 -0
- package/dist/node/urls/cacheBustUrl.js.map +1 -0
- package/dist/node/urls/getCardModelUrl.js +81 -0
- package/dist/node/urls/getCardModelUrl.js.map +1 -0
- package/dist/node/users/view.js +74 -0
- package/dist/node/users/view.js.map +1 -0
- package/dist/node/utils/getEnvironmentFromPortalUrl.js +24 -0
- package/dist/node/utils/getEnvironmentFromPortalUrl.js.map +1 -0
- package/dist/types/associations/addAssociation.d.ts +9 -0
- package/dist/types/associations/index.d.ts +4 -0
- package/dist/types/associations/internal/getTargetEntityFromAssociationType.d.ts +8 -0
- package/dist/types/associations/internal/getTypeByIdsQuery.d.ts +10 -0
- package/dist/types/associations/internal/getTypeFromAssociationType.d.ts +7 -0
- package/dist/types/associations/internal/getTypeWithKeywordQuery.d.ts +10 -0
- package/dist/types/associations/internal/getTypeWithoutKeywordQuery.d.ts +10 -0
- package/dist/types/associations/listAssociations.d.ts +8 -0
- package/dist/types/associations/removeAssociation.d.ts +9 -0
- package/dist/types/associations/types.d.ts +19 -0
- package/dist/types/content/_internal/ContentSchema.d.ts +7 -0
- package/dist/types/content/_internal/ContentUiSchemaEdit.d.ts +10 -0
- package/dist/types/content/_internal/ContentUiSchemaSettings.d.ts +10 -0
- package/dist/types/content/_internal/computeProps.d.ts +9 -0
- package/dist/types/content/hostedServiceUtils.d.ts +35 -0
- package/dist/types/core/EntityEditor.d.ts +13 -0
- package/dist/types/core/behaviors/IWIthAssociationBehavior.d.ts +23 -0
- package/dist/types/core/behaviors/IWithFollowersBehavior.d.ts +15 -0
- package/dist/types/core/enrichEntity.d.ts +16 -0
- package/dist/types/core/schemas/getEditorConfig.d.ts +13 -0
- package/dist/types/core/schemas/internal/ConfigurableEntity.d.ts +4 -0
- package/dist/types/core/schemas/internal/configOptionHelpers.d.ts +6 -0
- package/dist/types/core/schemas/internal/getCategoryItems.d.ts +11 -0
- package/dist/types/core/schemas/internal/getConfigOptions.d.ts +12 -0
- package/dist/types/core/schemas/internal/getEditorConfigOptions.d.ts +11 -0
- package/dist/types/core/schemas/internal/getEntityEditorSchemas.d.ts +15 -0
- package/dist/types/core/schemas/internal/getFeaturedContentCatalogs.d.ts +8 -0
- package/dist/types/core/schemas/internal/getFeaturedImageUrl.d.ts +3 -0
- package/dist/types/core/schemas/internal/getLocationExtent.d.ts +7 -0
- package/dist/types/core/schemas/internal/getLocationOptions.d.ts +16 -0
- package/dist/types/core/schemas/internal/getSharableGroupsComboBoxItems.d.ts +7 -0
- package/dist/types/core/schemas/internal/getTagItems.d.ts +12 -0
- package/dist/types/core/traits/IWithAssociations.d.ts +4 -0
- package/dist/types/core/traits/IWithFollowers.d.ts +7 -0
- package/dist/types/core/types/HubEntityEditor.d.ts +11 -0
- package/dist/types/core/types/IHubGroup.d.ts +109 -0
- package/dist/types/discussions/api/channels/channels.d.ts +10 -0
- package/dist/types/discussions/api/channels/index.d.ts +1 -0
- package/dist/types/discussions/api/index.d.ts +2 -0
- package/dist/types/discussions/api/request.d.ts +11 -0
- package/dist/types/discussions/api/types.d.ts +1007 -0
- package/dist/types/discussions/api/utils/request.d.ts +25 -0
- package/dist/types/features/_internal/checkCapabilityAccess.d.ts +0 -0
- package/dist/types/features/_internal/checkFeatureAccess.d.ts +0 -0
- package/dist/types/features/_internal/index.d.ts +0 -0
- package/dist/types/features/checkFeature.d.ts +10 -0
- package/dist/types/features/index.d.ts +2 -0
- package/dist/types/features/types.d.ts +31 -0
- package/dist/types/groups/HubGroup.d.ts +114 -0
- package/dist/types/groups/_internal/AddOrInviteUsersToGroupUtils.d.ts +82 -0
- package/dist/types/groups/_internal/GroupBusinessRules.d.ts +12 -0
- package/dist/types/groups/_internal/GroupSchema.d.ts +7 -0
- package/dist/types/groups/_internal/GroupUiSchemaEdit.d.ts +10 -0
- package/dist/types/groups/_internal/GroupUiSchemaSettings.d.ts +10 -0
- package/dist/types/groups/_internal/autoAddUsersAsAdmins.d.ts +13 -0
- package/dist/types/groups/_internal/computeProps.d.ts +12 -0
- package/dist/types/groups/_internal/convertGroupToHubGroup.d.ts +9 -0
- package/dist/types/groups/_internal/convertHubGroupToGroup.d.ts +7 -0
- package/dist/types/groups/_internal/getPropertyMap.d.ts +8 -0
- package/dist/types/groups/_internal/processAutoAddUsers.d.ts +15 -0
- package/dist/types/groups/_internal/processEmailUsers.d.ts +14 -0
- package/dist/types/groups/_internal/processInviteUsers.d.ts +13 -0
- package/dist/types/groups/addOrInviteUsersToGroup.d.ts +18 -0
- package/dist/types/groups/addOrInviteUsersToGroups.d.ts +30 -0
- package/dist/types/groups/autoAddUsers.d.ts +14 -0
- package/dist/types/groups/defaults.d.ts +11 -0
- package/dist/types/groups/deleteGroupThumbnail.d.ts +9 -0
- package/dist/types/groups/emailOrgUsers.d.ts +15 -0
- package/dist/types/groups/inviteUsers.d.ts +17 -0
- package/dist/types/groups/setGroupThumbnail.d.ts +9 -0
- package/dist/types/groups/types/types.d.ts +72 -0
- package/dist/types/initiatives/_internal/InitiativeUiSchemaCreate.d.ts +13 -0
- package/dist/types/initiatives/view.d.ts +19 -0
- package/dist/types/items/deleteItemThumbnail.d.ts +9 -0
- package/dist/types/pages/HubPage.d.ts +71 -0
- package/dist/types/pages/_internal/PageSchema.d.ts +7 -0
- package/dist/types/pages/_internal/PageUiSchemaEdit.d.ts +10 -0
- package/dist/types/pages/_internal/computeProps.d.ts +12 -0
- package/dist/types/pages/_internal/getPropertyMap.d.ts +8 -0
- package/dist/types/pages/defaults.d.ts +13 -0
- package/dist/types/permissions/PlatformPermissionPolicies.d.ts +9 -0
- package/dist/types/permissions/_internal/PermissionCheckFunction.d.ts +7 -0
- package/dist/types/permissions/_internal/checkAvailability.d.ts +13 -0
- package/dist/types/permissions/_internal/checkEntityFeature.d.ts +4 -0
- package/dist/types/permissions/_internal/checkEnvironment.d.ts +13 -0
- package/dist/types/permissions/_internal/checkFeature.d.ts +16 -0
- package/dist/types/permissions/_internal/checkFeatures.d.ts +10 -0
- package/dist/types/permissions/_internal/checkParents.d.ts +12 -0
- package/dist/types/permissions/_internal/checkServiceStatus.d.ts +4 -0
- package/dist/types/permissions/_internal/processEntityFeatures.d.ts +9 -0
- package/dist/types/projects/_internal/getProjectEditorConfigOptions.d.ts +10 -0
- package/dist/types/search/_internal/commonHelpers/getDiscussionsApiDefinition.d.ts +2 -0
- package/dist/types/search/_internal/commonHelpers/shouldUseDiscussionsApi.d.ts +11 -0
- package/dist/types/search/_internal/explainFilter.d.ts +11 -0
- package/dist/types/search/_internal/explainHelpers.d.ts +38 -0
- package/dist/types/search/_internal/explainPredicate.d.ts +12 -0
- package/dist/types/search/_internal/getEntityTypeFromType.d.ts +9 -0
- package/dist/types/search/_internal/hubSearchChannels.d.ts +30 -0
- package/dist/types/search/_internal/negateGroupPredicates.d.ts +9 -0
- package/dist/types/search/_internal/portalSearchGroupMembers.d.ts +2 -1
- package/dist/types/search/explainQueryResult.d.ts +102 -0
- package/dist/types/sites/_internal/SiteUiSchemaFollowers.d.ts +11 -0
- package/dist/types/sites/_internal/_migrate-summary-stat-card-configs.d.ts +9 -0
- package/dist/types/sites/_internal/applyCatalogStructureMigration.d.ts +11 -0
- package/dist/types/sites/_internal/applyDefaultCollectionMigration.d.ts +21 -0
- package/dist/types/sites/_internal/capabilities/capabilityToFeatureMap.d.ts +14 -0
- package/dist/types/sites/_internal/capabilities/convertFeaturesToLegacyCapabilities.d.ts +19 -0
- package/dist/types/sites/_internal/capabilities/migrateLegacyCapabilitiesToFeatures.d.ts +12 -0
- package/dist/types/sites/_internal/capabilities/types.d.ts +29 -0
- package/dist/types/sites/_internal/convertCatalogToLegacyFormat.d.ts +11 -0
- package/dist/types/sites/_internal/reflectCollectionsToSearchCategories.d.ts +11 -0
- package/dist/types/sites/_internal/types.d.ts +8 -0
- package/dist/types/urls/cacheBustUrl.d.ts +5 -0
- package/dist/types/urls/getCardModelUrl.d.ts +21 -0
- package/dist/types/users/view.d.ts +9 -0
- package/dist/types/utils/getEnvironmentFromPortalUrl.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { RemoteServerError as _RemoteServerError } from "../../../request";
|
|
2
|
+
import { IDiscussionsRequestOptions } from "../types";
|
|
3
|
+
export declare class RemoteServerError extends _RemoteServerError {
|
|
4
|
+
error: string;
|
|
5
|
+
constructor(message: string, url: string, status: number, error: string);
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* returns Promise that resolves token to use in Discussions API requests
|
|
9
|
+
*
|
|
10
|
+
* @export
|
|
11
|
+
* @param {IDiscussionsRequestOptions} options
|
|
12
|
+
* @return {*} {Promise<string>}
|
|
13
|
+
*/
|
|
14
|
+
export declare function authenticateRequest(options: IDiscussionsRequestOptions): Promise<string>;
|
|
15
|
+
/**
|
|
16
|
+
* parses IDiscussionsRequestOptions and makes request against Discussions API
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @template T
|
|
20
|
+
* @param {string} route
|
|
21
|
+
* @param {IDiscussionsRequestOptions} options
|
|
22
|
+
* @param {string} [token]
|
|
23
|
+
* @return {*} {Promise<T>}
|
|
24
|
+
*/
|
|
25
|
+
export declare function apiRequest<T>(route: string, options: IDiscussionsRequestOptions, token?: string): Promise<T>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HubFeature, IFeatureAccessResponse } from "./types";
|
|
2
|
+
import { IArcGISContext, HubEntity, IHubItemEntity } from "../index";
|
|
3
|
+
/**
|
|
4
|
+
* Check if a capability is enabled for a given entity and if the current user has necessary permissions to access it
|
|
5
|
+
* @param capability
|
|
6
|
+
* @param context
|
|
7
|
+
* @param entity
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
export declare function checkFeature(feature: HubFeature, context: IArcGISContext, entity: IHubItemEntity | HubEntity): IFeatureAccessResponse;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { IAccessResponse } from "../core/types/IAccessResponse";
|
|
2
|
+
/**
|
|
3
|
+
* Hub System Features
|
|
4
|
+
*/
|
|
5
|
+
declare const validFeaures: readonly ["workspaces"];
|
|
6
|
+
/**
|
|
7
|
+
* Defines the possible values for HubFeature
|
|
8
|
+
*/
|
|
9
|
+
export declare type HubFeature = (typeof validFeaures)[number];
|
|
10
|
+
/**
|
|
11
|
+
* Hash of with keys constrained to Capability
|
|
12
|
+
*/
|
|
13
|
+
export declare type HubFeatures = {
|
|
14
|
+
[key in HubFeature]?: boolean;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Validate a feature. This is used because the libary can be used outside of typescript and we want to be able to return a message is the string passed in is not a valid capability
|
|
18
|
+
* @param Feature
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
export declare function isHubFeature(maybeFeature: string): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Response from checking a Capability
|
|
24
|
+
*/
|
|
25
|
+
export interface IFeatureAccessResponse extends IAccessResponse {
|
|
26
|
+
/**
|
|
27
|
+
* Capability being checked
|
|
28
|
+
*/
|
|
29
|
+
feature: HubFeature;
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { IHubGroup, IHubGroupEditor } from "../core/types/IHubGroup";
|
|
2
|
+
import { IEntityPermissionPolicy, IPermissionAccessResponse, Permission } from "../permissions";
|
|
3
|
+
import { IWithStoreBehavior } from "../core/behaviors/IWithStoreBehavior";
|
|
4
|
+
import { IWithPermissionBehavior } from "../core/behaviors/IWithPermissionBehavior";
|
|
5
|
+
import { IArcGISContext } from "../ArcGISContext";
|
|
6
|
+
import { IEditorConfig, IWithEditorBehavior } from "../core/behaviors/IWithEditorBehavior";
|
|
7
|
+
import { GroupEditorType } from "./_internal/GroupSchema";
|
|
8
|
+
import { IEntityEditorContext } from "../core";
|
|
9
|
+
/**
|
|
10
|
+
* Hub Group Class
|
|
11
|
+
*/
|
|
12
|
+
export declare class HubGroup implements IWithStoreBehavior<IHubGroup>, IWithPermissionBehavior, IWithEditorBehavior {
|
|
13
|
+
protected context: IArcGISContext;
|
|
14
|
+
protected entity: IHubGroup;
|
|
15
|
+
protected isDestroyed: boolean;
|
|
16
|
+
protected thumbnailCache: {
|
|
17
|
+
file?: any;
|
|
18
|
+
filename?: string;
|
|
19
|
+
clear?: boolean;
|
|
20
|
+
};
|
|
21
|
+
private constructor();
|
|
22
|
+
/**
|
|
23
|
+
* Whether the user can edit the group,
|
|
24
|
+
* only the owner or admins of the group can
|
|
25
|
+
*/
|
|
26
|
+
get canEdit(): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the user can delete the group
|
|
29
|
+
* only the owner or admins of the group can
|
|
30
|
+
*/
|
|
31
|
+
get canDelete(): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Whether the group is protected, if so, it can't be deleted
|
|
34
|
+
*/
|
|
35
|
+
get isProtected(): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Create an instance from an IHubGroup object
|
|
38
|
+
* @param json - JSON object to create a HubGroup from
|
|
39
|
+
* @param context - ArcGIS context
|
|
40
|
+
* @returns
|
|
41
|
+
*/
|
|
42
|
+
static fromJson(json: Partial<IHubGroup>, context: IArcGISContext): HubGroup;
|
|
43
|
+
/**
|
|
44
|
+
* Create a new HubGroup, returning a HubGroup instance.
|
|
45
|
+
* Note: This does not persist the Group into the backing store
|
|
46
|
+
* @param partialGroup
|
|
47
|
+
* @param context
|
|
48
|
+
* @returns
|
|
49
|
+
*/
|
|
50
|
+
static create(partialGroup: Partial<IHubGroup>, context: IArcGISContext, save?: boolean): Promise<HubGroup>;
|
|
51
|
+
/**
|
|
52
|
+
* Fetch a Group from the backing store and return a HubGroup instance.
|
|
53
|
+
* @param identifier - Identifier of the group to load
|
|
54
|
+
* @param context
|
|
55
|
+
* @returns
|
|
56
|
+
*/
|
|
57
|
+
static fetch(identifier: string, context: IArcGISContext): Promise<HubGroup>;
|
|
58
|
+
private static applyDefaults;
|
|
59
|
+
/**
|
|
60
|
+
* Return the backing entity as an object literal
|
|
61
|
+
*/
|
|
62
|
+
toJson(): IHubGroup;
|
|
63
|
+
/**
|
|
64
|
+
* Apply a new state to the instance
|
|
65
|
+
* @param changes
|
|
66
|
+
*/
|
|
67
|
+
update(changes: Partial<IHubGroup>): void;
|
|
68
|
+
/**
|
|
69
|
+
* Save the HubGroup to the backing store
|
|
70
|
+
* @returns
|
|
71
|
+
*/
|
|
72
|
+
save(): Promise<void>;
|
|
73
|
+
/**
|
|
74
|
+
* Delete the HubGroup from the store
|
|
75
|
+
* set a flag to indicate that it is destroyed
|
|
76
|
+
* @returns
|
|
77
|
+
*/
|
|
78
|
+
delete(): Promise<void>;
|
|
79
|
+
/**
|
|
80
|
+
* Check if current user has a specific permission, accounting for
|
|
81
|
+
* both system and entity level policies
|
|
82
|
+
* @param permission
|
|
83
|
+
* @returns
|
|
84
|
+
*/
|
|
85
|
+
checkPermission(permission: Permission): IPermissionAccessResponse;
|
|
86
|
+
/**
|
|
87
|
+
* Get all policies related to a specific permission
|
|
88
|
+
* @param permission
|
|
89
|
+
* @returns
|
|
90
|
+
*/
|
|
91
|
+
getPermissionPolicies(permission: Permission): IEntityPermissionPolicy[];
|
|
92
|
+
/**
|
|
93
|
+
* Add a policy to the entity
|
|
94
|
+
* @param policy
|
|
95
|
+
*/
|
|
96
|
+
addPermissionPolicy(policy: IEntityPermissionPolicy): void;
|
|
97
|
+
/**
|
|
98
|
+
* Remove a policy from the entity
|
|
99
|
+
* @param permission
|
|
100
|
+
* @param id
|
|
101
|
+
*/
|
|
102
|
+
removePermissionPolicy(permission: Permission, id: string): void;
|
|
103
|
+
getEditorConfig(i18nScope: string, type: GroupEditorType): Promise<IEditorConfig>;
|
|
104
|
+
/**
|
|
105
|
+
* Return the group as an editor object
|
|
106
|
+
*/
|
|
107
|
+
toEditor(editorContext?: IEntityEditorContext, include?: string[]): Promise<IHubGroupEditor>;
|
|
108
|
+
/**
|
|
109
|
+
* Load the group from the editor object
|
|
110
|
+
* @param editor
|
|
111
|
+
* @returns
|
|
112
|
+
*/
|
|
113
|
+
fromEditor(editor: IHubGroupEditor): Promise<IHubGroup>;
|
|
114
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { IAddOrInviteContext, IAddOrInviteResponse, IUserOrgRelationship, IUserWithOrgType } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* @private
|
|
4
|
+
* Handles add/invite logic for collaboration coordinators inside partnered orgs.
|
|
5
|
+
* This is intentionally split out from the invitation of partnered org normal members,
|
|
6
|
+
* because the two types of partnered org usres (regular and collaboration coordinator)
|
|
7
|
+
* always come from the same 'bucket', however have distinctly different add paths Invite vs auto add.
|
|
8
|
+
* It returns either an empty instance of the addOrInviteResponse
|
|
9
|
+
* object, or their response from auto adding users.
|
|
10
|
+
*
|
|
11
|
+
* @export
|
|
12
|
+
* @param {IAddOrInviteContext} context context object
|
|
13
|
+
* @return {IAddOrInviteResponse} response object
|
|
14
|
+
*/
|
|
15
|
+
export declare function addOrInviteCollaborationCoordinators(context: IAddOrInviteContext): Promise<IAddOrInviteResponse>;
|
|
16
|
+
/**
|
|
17
|
+
* @private
|
|
18
|
+
* Handles add/invite logic for community users
|
|
19
|
+
* It returns either an empty instance of the addOrInviteResponse
|
|
20
|
+
* object, or either ther esponse from processing auto adding
|
|
21
|
+
* users or inviting users. If an email has been passed in it also notifies
|
|
22
|
+
* processAutoAddUsers that emails should be sent.
|
|
23
|
+
*
|
|
24
|
+
* @export
|
|
25
|
+
* @param {IAddOrInviteContext} context context object
|
|
26
|
+
* @return {IAddOrInviteResponse} response object
|
|
27
|
+
*/
|
|
28
|
+
export declare function addOrInviteCommunityUsers(context: IAddOrInviteContext): Promise<IAddOrInviteResponse>;
|
|
29
|
+
/**
|
|
30
|
+
* @private
|
|
31
|
+
* Handles add/invite logic for Org users
|
|
32
|
+
* It returns either an empty instance of the addOrInviteResponse
|
|
33
|
+
* object, or either ther esponse from processing auto adding a users or inviting a user
|
|
34
|
+
*
|
|
35
|
+
* @export
|
|
36
|
+
* @param {IAddOrInviteContext} context context object
|
|
37
|
+
* @return {IAddOrInviteResponse} response object
|
|
38
|
+
*/
|
|
39
|
+
export declare function addOrInviteOrgUsers(context: IAddOrInviteContext): Promise<IAddOrInviteResponse>;
|
|
40
|
+
/**
|
|
41
|
+
* @private
|
|
42
|
+
* Handles add/invite logic for partnered org users.
|
|
43
|
+
* It returns either an empty instance of the addOrInviteResponse
|
|
44
|
+
* object, or their response from inviting users.
|
|
45
|
+
*
|
|
46
|
+
* @export
|
|
47
|
+
* @param {IAddOrInviteContext} context context object
|
|
48
|
+
* @return {IAddOrInviteResponse} response object
|
|
49
|
+
*/
|
|
50
|
+
export declare function addOrInvitePartneredUsers(context: IAddOrInviteContext): Promise<IAddOrInviteResponse>;
|
|
51
|
+
/**
|
|
52
|
+
* @private
|
|
53
|
+
* Handles add/invite logic for world users
|
|
54
|
+
* It either returns an empty instance of the add/invite response
|
|
55
|
+
* object, or a populated version from processInviteUsers
|
|
56
|
+
*
|
|
57
|
+
* @export
|
|
58
|
+
* @param {IAddOrInviteContext} context Context object
|
|
59
|
+
* @return {IAddOrInviteResponse} Response object
|
|
60
|
+
*/
|
|
61
|
+
export declare function addOrInviteWorldUsers(context: IAddOrInviteContext): Promise<IAddOrInviteResponse>;
|
|
62
|
+
/**
|
|
63
|
+
* @private
|
|
64
|
+
* Returns an empty instance of the addorinviteresponse object.
|
|
65
|
+
* We are using this because if you leave out any of the props
|
|
66
|
+
* from the final object and you are concatting together arrays you can concat
|
|
67
|
+
* an undeifined inside an array which will throw off array lengths.
|
|
68
|
+
*
|
|
69
|
+
* @export
|
|
70
|
+
* @return {IAddOrInviteResponse}
|
|
71
|
+
*/
|
|
72
|
+
export declare function handleNoUsers(context?: IAddOrInviteContext, userType?: "world" | "org" | "community" | "partnered", shouldEmail?: boolean): Promise<IAddOrInviteResponse>;
|
|
73
|
+
/**
|
|
74
|
+
* @private
|
|
75
|
+
* Takes users array and sorts them into an object by the type of user they are
|
|
76
|
+
* based on the orgType prop (world|org|community)
|
|
77
|
+
*
|
|
78
|
+
* @export
|
|
79
|
+
* @param {IUserWithOrgType[]} users array of users
|
|
80
|
+
* @return {IUserOrgRelationship} Object of users sorted by type (world, org, community)
|
|
81
|
+
*/
|
|
82
|
+
export declare function groupUsersByOrgRelationship(users: IUserWithOrgType[]): IUserOrgRelationship;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IPermissionPolicy } from "../../permissions";
|
|
2
|
+
/**
|
|
3
|
+
* Group Permission Policies
|
|
4
|
+
* These define the requirements any user must meet to perform related actions
|
|
5
|
+
* @private
|
|
6
|
+
*/
|
|
7
|
+
export declare const GroupPermissions: readonly ["hub:group", "hub:group:create", "hub:group:delete", "hub:group:edit", "hub:group:view", "hub:group:owner", "hub:group:workspace:overview", "hub:group:workspace:dashboard", "hub:group:workspace:details", "hub:group:workspace:settings", "hub:group:workspace:collaborators", "hub:group:workspace:content", "hub:group:workspace:members", "hub:group:shareContent", "hub:group:manage"];
|
|
8
|
+
/**
|
|
9
|
+
* Group permission policies
|
|
10
|
+
* @private
|
|
11
|
+
*/
|
|
12
|
+
export declare const GroupPermissionPolicies: IPermissionPolicy[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IConfigurationSchema } from "../../core";
|
|
2
|
+
export declare type GroupEditorType = (typeof GroupEditorTypes)[number];
|
|
3
|
+
export declare const GroupEditorTypes: readonly ["hub:group:edit", "hub:group:settings"];
|
|
4
|
+
/**
|
|
5
|
+
* Defines the JSON schema for a Hub Group's editable fields
|
|
6
|
+
*/
|
|
7
|
+
export declare const GroupSchema: IConfigurationSchema;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IUiSchema } from "../../core/schemas/types";
|
|
2
|
+
import { IArcGISContext } from "../../ArcGISContext";
|
|
3
|
+
import { IHubGroup } from "../../core/types";
|
|
4
|
+
/**
|
|
5
|
+
* @private
|
|
6
|
+
* constructs the complete edit uiSchema for Hub Groups
|
|
7
|
+
* This defines how the schema properties should be
|
|
8
|
+
* rendered in the group editing experience
|
|
9
|
+
*/
|
|
10
|
+
export declare const buildUiSchema: (i18nScope: string, entity: IHubGroup, context: IArcGISContext) => Promise<IUiSchema>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IUiSchema } from "../../core";
|
|
2
|
+
import { IArcGISContext } from "../../ArcGISContext";
|
|
3
|
+
import { IHubGroup } from "../../core/types";
|
|
4
|
+
/**
|
|
5
|
+
* @private
|
|
6
|
+
* constructs the complete settings uiSchema for Hub Groups
|
|
7
|
+
* This defines how the schema properties should be
|
|
8
|
+
* rendered in the group settings experience
|
|
9
|
+
*/
|
|
10
|
+
export declare const buildUiSchema: (i18nScope: string, entity: IHubGroup, context: IArcGISContext) => Promise<IUiSchema>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IAddGroupUsersResult, IUser } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IAuthenticationManager } from "@esri/arcgis-rest-request";
|
|
3
|
+
/**
|
|
4
|
+
* @private
|
|
5
|
+
* Auto add N users to a single group, with users added as admins of that group
|
|
6
|
+
*
|
|
7
|
+
* @export
|
|
8
|
+
* @param {string} id Group ID
|
|
9
|
+
* @param {IUser[]} admins array of users to add to group as admin
|
|
10
|
+
* @param {IAuthenticationManager} authentication authentication manager
|
|
11
|
+
* @return {IAddGroupUsersResult} Result of the transaction (null if no users are passed in)
|
|
12
|
+
*/
|
|
13
|
+
export declare function autoAddUsersAsAdmins(id: string, admins: IUser[], authentication: IAuthenticationManager): Promise<IAddGroupUsersResult | null>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
|
+
import { IHubGroup } from "../../core/types/IHubGroup";
|
|
3
|
+
import { IGroup } from "@esri/arcgis-rest-types";
|
|
4
|
+
/**
|
|
5
|
+
* Given a model and a group, set various computed properties that can't be directly mapped
|
|
6
|
+
* @private
|
|
7
|
+
* @param group
|
|
8
|
+
* @param hubGroup
|
|
9
|
+
* @param requestOptions
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
export declare function computeProps(group: IGroup, hubGroup: Partial<IHubGroup>, requestOptions: IRequestOptions): IHubGroup;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IGroup } from "@esri/arcgis-rest-types";
|
|
2
|
+
import { IHubGroup } from "../../core/types/IHubGroup";
|
|
3
|
+
import { IUserRequestOptions } from "@esri/arcgis-rest-auth";
|
|
4
|
+
/**
|
|
5
|
+
* Convert an IGroup to a Hub Group
|
|
6
|
+
* @param group
|
|
7
|
+
* @param requestOptions
|
|
8
|
+
*/
|
|
9
|
+
export declare function convertGroupToHubGroup(group: IGroup, requestOptions: IUserRequestOptions): IHubGroup;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IPropertyMap } from "../../core/_internal/PropertyMapper";
|
|
2
|
+
/**
|
|
3
|
+
* Returns an Array of IPropertyMap objects
|
|
4
|
+
* that define the projection of properties from a IGroup to an IHubGroup
|
|
5
|
+
* @returns
|
|
6
|
+
* @private
|
|
7
|
+
*/
|
|
8
|
+
export declare function getPropertyMap(): IPropertyMap[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IAddOrInviteContext, IAddOrInviteResponse } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* @private
|
|
4
|
+
* Governs logic for automatically adding N users to a group.
|
|
5
|
+
* Users are added as either a regular user OR as an administrator of the group
|
|
6
|
+
* depending on the addUserAsGroupAdmin prop on the IAddOrInviteContext.
|
|
7
|
+
* If there is an email object on the IAddOrInviteContext, then email notifications are sent.
|
|
8
|
+
*
|
|
9
|
+
* @export
|
|
10
|
+
* @param {IAddOrInviteContext} context context object
|
|
11
|
+
* @param {string} userType what type of user is it: org | world | community
|
|
12
|
+
* @param {boolean} [shouldEmail=false] should the user be emailed?
|
|
13
|
+
* @return {IAddOrInviteResponse} response object
|
|
14
|
+
*/
|
|
15
|
+
export declare function processAutoAddUsers(context: IAddOrInviteContext, userType: "world" | "org" | "community" | "partnered" | "collaborationCoordinator", shouldEmail?: boolean): Promise<IAddOrInviteResponse>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IAddOrInviteContext, IAddOrInviteResponse } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* @private
|
|
4
|
+
* Governs the logic for emailing N users. It acts under the assumption
|
|
5
|
+
* that all the 'community' users are the ones being emailed (this is due to platform rules we conform to)
|
|
6
|
+
* Function is called upstream depending on if an email object is attached to the context.
|
|
7
|
+
* Email object contains its own auth as it'll require the community admin to send the email itself.
|
|
8
|
+
* An individual email call goes out for each user due to how the response of multiple users in a single call works.
|
|
9
|
+
*
|
|
10
|
+
* @export
|
|
11
|
+
* @param {IAddOrInviteContext} context context object
|
|
12
|
+
* @return {IAddOrInviteResponse} response object
|
|
13
|
+
*/
|
|
14
|
+
export declare function processEmailUsers(context: IAddOrInviteContext): Promise<IAddOrInviteResponse>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IAddOrInviteContext, IAddOrInviteResponse } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* @private
|
|
4
|
+
* Governs the logic for inviting N users to a single group.
|
|
5
|
+
* An individual invite call goes out for each user and the results are consolidated.
|
|
6
|
+
* See comment in function about the for...of loop which explains reasoning.
|
|
7
|
+
*
|
|
8
|
+
* @export
|
|
9
|
+
* @param {IAddOrInviteContext} context context object
|
|
10
|
+
* @param {string} userType what type of user is it: org | world | community
|
|
11
|
+
* @return {IAddOrInviteResponse} response object
|
|
12
|
+
*/
|
|
13
|
+
export declare function processInviteUsers(context: IAddOrInviteContext, userType: "world" | "org" | "community" | "partnered"): Promise<IAddOrInviteResponse>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IAuthenticationManager } from "@esri/arcgis-rest-request";
|
|
2
|
+
import { IAddOrInviteEmail, IAddOrInviteToGroupResult, IUserWithOrgType } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Add or invite N users to a single group
|
|
5
|
+
* Org|community|world logic flows are run even if there are no users applicable for that particular path.
|
|
6
|
+
* Results from each path are consolidated and surfaced in the return object as failures and errors are of
|
|
7
|
+
* more importance than successes.
|
|
8
|
+
*
|
|
9
|
+
* @export
|
|
10
|
+
* @param {string} groupId Group we are adding users to
|
|
11
|
+
* @param {IUserWithOrgType[]} users array of users to add
|
|
12
|
+
* @param {IAuthenticationManager} primaryRO primary requestOptions
|
|
13
|
+
* @param {boolean} canAutoAddUser Can we automatically add a user to the group?
|
|
14
|
+
* @param {boolean} addUserAsGroupAdmin Should the user be added as a group administrator
|
|
15
|
+
* @param {IAddOrInviteEmail} email Email object
|
|
16
|
+
* @return {IAddOrInviteToGroupResult} Result object
|
|
17
|
+
*/
|
|
18
|
+
export declare function addOrInviteUsersToGroup(groupId: string, users: IUserWithOrgType[], primaryRO: IAuthenticationManager, canAutoAddUser: boolean, addUserAsGroupAdmin: boolean, email: IAddOrInviteEmail): Promise<IAddOrInviteToGroupResult>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ArcGISRequestError, IAuthenticationManager } from "@esri/arcgis-rest-request";
|
|
2
|
+
import { IAddOrInviteEmail, IAddOrInviteToGroupResult, IUserWithOrgType } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* addOrInviteUsersToGroups adds/invites N users to N groups
|
|
5
|
+
* Initial entry point function for add/invite members flow
|
|
6
|
+
* when dealing with multiple groups.
|
|
7
|
+
* Responses from each group are then consolidated into the final returned object.
|
|
8
|
+
*
|
|
9
|
+
* @export
|
|
10
|
+
* @param {string[]} groupIds array of groups we are adding users to
|
|
11
|
+
* @param {IUserWithOrgType[]} users array of users to add to those groups
|
|
12
|
+
* @param {IAuthenticationManager} primaryRO primary requestOptions
|
|
13
|
+
* @param {boolean} [canAutoAddUser=false] Can we automatically add a user to the group?
|
|
14
|
+
* @param {boolean} [addUserAsGroupAdmin=false] Can the user be added to a group as an administrator of that group?
|
|
15
|
+
* @param {IAddOrInviteEmail} [email] Email object contains auth for the email && the email object itself
|
|
16
|
+
* @return {*} {Promise<{
|
|
17
|
+
* notAdded: string[];
|
|
18
|
+
* notInvited: string[];
|
|
19
|
+
* notEmailed: string[];
|
|
20
|
+
* errors: ArcGISRequestError[];
|
|
21
|
+
* responses: IAddOrInviteToGroupResult[];
|
|
22
|
+
* }>} Results object
|
|
23
|
+
*/
|
|
24
|
+
export declare function addOrInviteUsersToGroups(groupIds: string[], users: IUserWithOrgType[], primaryRO: IAuthenticationManager, canAutoAddUser?: boolean, addUserAsGroupAdmin?: boolean, email?: IAddOrInviteEmail): Promise<{
|
|
25
|
+
notAdded: string[];
|
|
26
|
+
notInvited: string[];
|
|
27
|
+
notEmailed: string[];
|
|
28
|
+
errors: ArcGISRequestError[];
|
|
29
|
+
responses: IAddOrInviteToGroupResult[];
|
|
30
|
+
}>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IUser } from "@esri/arcgis-rest-auth";
|
|
2
|
+
import { IAddGroupUsersResult } from "@esri/arcgis-rest-portal";
|
|
3
|
+
import { IAuthenticationManager } from "@esri/arcgis-rest-request";
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* Attempts to auto-add users to a group
|
|
7
|
+
*
|
|
8
|
+
* @param {string} id ID of the group the users will be added to
|
|
9
|
+
* @param {IUser[]} users
|
|
10
|
+
* @param {IAuthenticationManager} authentication
|
|
11
|
+
*
|
|
12
|
+
* @returns {IAddGroupUsersResult|null} Result of the transaction (null if no users are passed in)
|
|
13
|
+
*/
|
|
14
|
+
export declare function autoAddUsers(id: string, users: IUser[], authentication: IAuthenticationManager): Promise<IAddGroupUsersResult | null>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IGroup } from "@esri/arcgis-rest-types";
|
|
2
|
+
import { IHubGroup } from "../core/types/IHubGroup";
|
|
3
|
+
export declare const HUB_GROUP_TYPE = "Hub Group";
|
|
4
|
+
/**
|
|
5
|
+
* Default values of a IHubGroup
|
|
6
|
+
*/
|
|
7
|
+
export declare const DEFAULT_GROUP: Partial<IHubGroup>;
|
|
8
|
+
/**
|
|
9
|
+
* Default values for a new HubGroup Model
|
|
10
|
+
*/
|
|
11
|
+
export declare const DEFAULT_GROUP_MODEL: IGroup;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IUserRequestOptions } from "@esri/arcgis-rest-auth";
|
|
2
|
+
/**
|
|
3
|
+
* Delete a group's thumbnail
|
|
4
|
+
* @param id
|
|
5
|
+
* @param owner
|
|
6
|
+
* @param requestOptions
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare function deleteGroupThumbnail(id: string, requestOptions: IUserRequestOptions): Promise<any>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IUser } from "@esri/arcgis-rest-auth";
|
|
2
|
+
import { ICreateOrgNotificationResult } from "@esri/arcgis-rest-portal";
|
|
3
|
+
import { IAuthenticationManager } from "@esri/arcgis-rest-request";
|
|
4
|
+
import { IEmail } from "./types";
|
|
5
|
+
/**
|
|
6
|
+
* Attempts to email members of the requesting user's organization.
|
|
7
|
+
*
|
|
8
|
+
* @param {IUser[]} users Users to email (must be in the same org as the requesting user)
|
|
9
|
+
* @param {IEmail} email
|
|
10
|
+
* @param {IAuthenticationManager} authentication
|
|
11
|
+
* @param {boolean} isOrgAdmin // Whether the requesting user in an org admin
|
|
12
|
+
*
|
|
13
|
+
* @returns {object|null} A promise that resolves to the result of the transaction (null if no users are passed in)
|
|
14
|
+
*/
|
|
15
|
+
export declare function emailOrgUsers(users: IUser[], email: IEmail, authentication: IAuthenticationManager, isOrgAdmin: boolean): Promise<ICreateOrgNotificationResult | null>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IUser } from "@esri/arcgis-rest-auth";
|
|
2
|
+
import { IInviteGroupUsersResult } from "@esri/arcgis-rest-portal";
|
|
3
|
+
import { IAuthenticationManager } from "@esri/arcgis-rest-request";
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* Attempts to invite users to a group
|
|
7
|
+
*
|
|
8
|
+
* @param {string} id ID of the group the users will be invited to
|
|
9
|
+
* @param {object[]} users
|
|
10
|
+
* @param {object} authentication
|
|
11
|
+
* @param {number} expiration How long the invite will be active (in minutes)
|
|
12
|
+
* @param {string} role What role should they be added as. Defaults to group member
|
|
13
|
+
*
|
|
14
|
+
* @returns {object|null} Result of the transaction (null if no users are passed in)
|
|
15
|
+
*/
|
|
16
|
+
export declare function inviteUsers(id: string, users: IUser[], authentication: IAuthenticationManager, expiration?: number, // default to 2 week expiration TODO: is this actually 2 weeks?
|
|
17
|
+
role?: "group_member" | "group_admin"): Promise<IInviteGroupUsersResult | null>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IUserRequestOptions } from "@esri/arcgis-rest-auth";
|
|
2
|
+
/**
|
|
3
|
+
* Upload a file to be used as the thumbnail for a group
|
|
4
|
+
* @param id
|
|
5
|
+
* @param file
|
|
6
|
+
* @param filename
|
|
7
|
+
* @param requestOptions
|
|
8
|
+
*/
|
|
9
|
+
export declare function setGroupThumbnail(id: string, file: any, filename: string, requestOptions: IUserRequestOptions, owner: string): Promise<void>;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { ArcGISRequestError, IAuthenticationManager } from "@esri/arcgis-rest-request";
|
|
2
|
+
import { IUser } from "@esri/arcgis-rest-types";
|
|
3
|
+
export interface IEmail {
|
|
4
|
+
subject?: string;
|
|
5
|
+
body?: string;
|
|
6
|
+
copyMe?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* User object returned from add users modal in ember application
|
|
10
|
+
* It extends the IUser interface with an additional property
|
|
11
|
+
* that denotes what org relationship the user might have (world|org|community|partnered|collaborationCoordinator)
|
|
12
|
+
*/
|
|
13
|
+
export interface IUserWithOrgType extends IUser {
|
|
14
|
+
orgType: "world" | "org" | "community" | "partnered" | "collaborationCoordinator";
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* User org relationship interface
|
|
18
|
+
* Object contains users parsed by their org relationship (world|org|community|partnered|collaborationCoordinator)
|
|
19
|
+
*/
|
|
20
|
+
export interface IUserOrgRelationship {
|
|
21
|
+
world: IUserWithOrgType[];
|
|
22
|
+
org: IUserWithOrgType[];
|
|
23
|
+
community: IUserWithOrgType[];
|
|
24
|
+
partnered: IUserWithOrgType[];
|
|
25
|
+
collaborationCoordinator: IUserWithOrgType[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Interface governing the add or invite response out of process auto add / invite / emailing users
|
|
29
|
+
*/
|
|
30
|
+
export interface IAddOrInviteResponse {
|
|
31
|
+
users: string[];
|
|
32
|
+
errors: ArcGISRequestError[];
|
|
33
|
+
notAdded: string[];
|
|
34
|
+
notInvited: string[];
|
|
35
|
+
notEmailed: string[];
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Email input object for add/invite flow
|
|
39
|
+
* contains both the IEmail object and auth for the email.
|
|
40
|
+
*/
|
|
41
|
+
export interface IAddOrInviteEmail {
|
|
42
|
+
message: IEmail;
|
|
43
|
+
auth: IAuthenticationManager;
|
|
44
|
+
groupId?: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Add or invite flow context - object that contains all the needed
|
|
48
|
+
* inputs for org/world/community users
|
|
49
|
+
*/
|
|
50
|
+
export interface IAddOrInviteContext extends IUserOrgRelationship {
|
|
51
|
+
groupId: string;
|
|
52
|
+
primaryRO: IAuthenticationManager;
|
|
53
|
+
allUsers: IUserWithOrgType[];
|
|
54
|
+
canAutoAddUser: boolean;
|
|
55
|
+
addUserAsGroupAdmin: boolean;
|
|
56
|
+
email: IAddOrInviteEmail;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Interface for result object out of addOrInviteUsersToGroup.
|
|
60
|
+
*/
|
|
61
|
+
export interface IAddOrInviteToGroupResult {
|
|
62
|
+
errors: ArcGISRequestError[];
|
|
63
|
+
notAdded: string[];
|
|
64
|
+
notInvited: string[];
|
|
65
|
+
notEmailed: string[];
|
|
66
|
+
community: IAddOrInviteResponse;
|
|
67
|
+
org: IAddOrInviteResponse;
|
|
68
|
+
world: IAddOrInviteResponse;
|
|
69
|
+
partnered: IAddOrInviteResponse;
|
|
70
|
+
collaborationCoordinator: IAddOrInviteResponse;
|
|
71
|
+
groupId: string;
|
|
72
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IArcGISContext } from "../../ArcGISContext";
|
|
2
|
+
import { IHubInitiative } from "../../core/types";
|
|
3
|
+
import { IUiSchema } from "../../core/schemas/types";
|
|
4
|
+
/**
|
|
5
|
+
* @private
|
|
6
|
+
* constructs the minimal create uiSchema for Hub Initiatives.
|
|
7
|
+
* This defines how the schema properties should be rendered
|
|
8
|
+
* in the initiative creation experience
|
|
9
|
+
*
|
|
10
|
+
* TODO: this was copied from projects and is just a placeholder
|
|
11
|
+
* for now - it isn't being used anywhere in the application
|
|
12
|
+
*/
|
|
13
|
+
export declare const buildUiSchema: (i18nScope: string, entity: IHubInitiative, context: IArcGISContext) => Promise<IUiSchema>;
|