@esri/hub-common 15.31.2 → 15.31.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/channels/HubChannel.js +173 -0
- package/dist/esm/channels/HubChannel.js.map +1 -0
- package/dist/esm/channels/_internal/ChannelBusinessRules.js +39 -0
- package/dist/esm/channels/_internal/ChannelBusinessRules.js.map +1 -0
- package/dist/esm/channels/_internal/ChannelSchema.js +198 -0
- package/dist/esm/channels/_internal/ChannelSchema.js.map +1 -0
- package/dist/esm/channels/_internal/ChannelUiSchemaCreate.js +288 -0
- package/dist/esm/channels/_internal/ChannelUiSchemaCreate.js.map +1 -0
- package/dist/esm/channels/_internal/ChannelUiSchemaEdit.js +20 -0
- package/dist/esm/channels/_internal/ChannelUiSchemaEdit.js.map +1 -0
- package/dist/esm/channels/_internal/buildDefaultChannel.js +26 -0
- package/dist/esm/channels/_internal/buildDefaultChannel.js.map +1 -0
- package/dist/esm/channels/_internal/transformAclPermissionToEntityPermissionPolicy.js +49 -0
- package/dist/esm/channels/_internal/transformAclPermissionToEntityPermissionPolicy.js.map +1 -0
- package/dist/esm/channels/_internal/transformChannelToEntity.js +61 -0
- package/dist/esm/channels/_internal/transformChannelToEntity.js.map +1 -0
- package/dist/esm/channels/_internal/transformEditorToEntity.js +22 -0
- package/dist/esm/channels/_internal/transformEditorToEntity.js.map +1 -0
- package/dist/esm/channels/_internal/transformEntityPermissionPoliciesToFormValues.js +150 -0
- package/dist/esm/channels/_internal/transformEntityPermissionPoliciesToFormValues.js.map +1 -0
- package/dist/esm/channels/_internal/transformEntityToChannelData.js +69 -0
- package/dist/esm/channels/_internal/transformEntityToChannelData.js.map +1 -0
- package/dist/esm/channels/_internal/transformEntityToEditor.js +20 -0
- package/dist/esm/channels/_internal/transformEntityToEditor.js.map +1 -0
- package/dist/esm/channels/_internal/transformFormValuesToEntityPermissionPolicies.js +55 -0
- package/dist/esm/channels/_internal/transformFormValuesToEntityPermissionPolicies.js.map +1 -0
- package/dist/esm/channels/edit.js +35 -0
- package/dist/esm/channels/edit.js.map +1 -0
- package/dist/esm/channels/fetch.js +14 -0
- package/dist/esm/channels/fetch.js.map +1 -0
- package/dist/esm/channels/index.js +4 -0
- package/dist/esm/channels/index.js.map +1 -0
- package/dist/esm/core/schemas/internal/discussions/EntityUiSchemaDiscussionsSettings.js +141 -0
- package/dist/esm/core/schemas/internal/discussions/EntityUiSchemaDiscussionsSettings.js.map +1 -0
- package/dist/esm/core/types/IHubChannel.js +1 -0
- package/dist/esm/core/types/IHubChannel.js.map +1 -0
- package/dist/esm/core/types/IHubOrganization.js +1 -0
- package/dist/esm/core/types/IHubOrganization.js.map +1 -0
- package/dist/esm/discussions/api/posts/index.js +2 -0
- package/dist/esm/discussions/api/posts/index.js.map +1 -0
- package/dist/esm/discussions/api/posts/posts.js +225 -0
- package/dist/esm/discussions/api/posts/posts.js.map +1 -0
- package/dist/esm/discussions/api/reactions/index.js +2 -0
- package/dist/esm/discussions/api/reactions/index.js.map +1 -0
- package/dist/esm/discussions/api/reactions/reactions.js +53 -0
- package/dist/esm/discussions/api/reactions/reactions.js.map +1 -0
- package/dist/esm/discussions/api/utils/channel-permission.js +377 -0
- package/dist/esm/discussions/api/utils/channel-permission.js.map +1 -0
- package/dist/esm/discussions/api/utils/channels/can-create-channel-v2.js +13 -0
- package/dist/esm/discussions/api/utils/channels/can-create-channel-v2.js.map +1 -0
- package/dist/esm/discussions/api/utils/channels/can-create-channel.js +54 -0
- package/dist/esm/discussions/api/utils/channels/can-create-channel.js.map +1 -0
- package/dist/esm/discussions/api/utils/channels/can-delete-channel-v2.js +17 -0
- package/dist/esm/discussions/api/utils/channels/can-delete-channel-v2.js.map +1 -0
- package/dist/esm/discussions/api/utils/channels/can-delete-channel.js +17 -0
- package/dist/esm/discussions/api/utils/channels/can-delete-channel.js.map +1 -0
- package/dist/esm/discussions/api/utils/channels/can-edit-channel-v2.js +19 -0
- package/dist/esm/discussions/api/utils/channels/can-edit-channel-v2.js.map +1 -0
- package/dist/esm/discussions/api/utils/channels/can-edit-channel.js +17 -0
- package/dist/esm/discussions/api/utils/channels/can-edit-channel.js.map +1 -0
- package/dist/esm/discussions/api/utils/channels/can-modify-channel.js +18 -0
- package/dist/esm/discussions/api/utils/channels/can-modify-channel.js.map +1 -0
- package/dist/esm/discussions/api/utils/channels/can-post-to-channel.js +57 -0
- package/dist/esm/discussions/api/utils/channels/can-post-to-channel.js.map +1 -0
- package/dist/esm/discussions/api/utils/channels/can-read-channel-v2.js +18 -0
- package/dist/esm/discussions/api/utils/channels/can-read-channel-v2.js.map +1 -0
- package/dist/esm/discussions/api/utils/channels/can-read-channel.js +52 -0
- package/dist/esm/discussions/api/utils/channels/can-read-channel.js.map +1 -0
- package/dist/esm/discussions/api/utils/channels/channel-to-dto-map.js +11 -0
- package/dist/esm/discussions/api/utils/channels/channel-to-dto-map.js.map +1 -0
- package/dist/esm/discussions/api/utils/channels/index.js +13 -0
- package/dist/esm/discussions/api/utils/channels/index.js.map +1 -0
- package/dist/esm/discussions/api/utils/channels/is-authorized-to-modify-channel-by-legacy-permissions.js +44 -0
- package/dist/esm/discussions/api/utils/channels/is-authorized-to-modify-channel-by-legacy-permissions.js.map +1 -0
- package/dist/esm/discussions/api/utils/platform.js +44 -0
- package/dist/esm/discussions/api/utils/platform.js.map +1 -0
- package/dist/esm/discussions/api/utils/portal-privilege.js +35 -0
- package/dist/esm/discussions/api/utils/portal-privilege.js.map +1 -0
- package/dist/esm/discussions/api/utils/posts/can-create-post-v2.js +20 -0
- package/dist/esm/discussions/api/utils/posts/can-create-post-v2.js.map +1 -0
- package/dist/esm/discussions/api/utils/posts/can-create-post.js +52 -0
- package/dist/esm/discussions/api/utils/posts/can-create-post.js.map +1 -0
- package/dist/esm/discussions/api/utils/posts/can-create-reply-v2.js +19 -0
- package/dist/esm/discussions/api/utils/posts/can-create-reply-v2.js.map +1 -0
- package/dist/esm/discussions/api/utils/posts/can-create-reply.js +52 -0
- package/dist/esm/discussions/api/utils/posts/can-create-reply.js.map +1 -0
- package/dist/esm/discussions/api/utils/posts/can-delete-post-v2.js +24 -0
- package/dist/esm/discussions/api/utils/posts/can-delete-post-v2.js.map +1 -0
- package/dist/esm/discussions/api/utils/posts/can-delete-post.js +28 -0
- package/dist/esm/discussions/api/utils/posts/can-delete-post.js.map +1 -0
- package/dist/esm/discussions/api/utils/posts/can-edit-post-status-v2.js +16 -0
- package/dist/esm/discussions/api/utils/posts/can-edit-post-status-v2.js.map +1 -0
- package/dist/esm/discussions/api/utils/posts/can-edit-post-status.js +61 -0
- package/dist/esm/discussions/api/utils/posts/can-edit-post-status.js.map +1 -0
- package/dist/esm/discussions/api/utils/posts/can-edit-post-v2.js +19 -0
- package/dist/esm/discussions/api/utils/posts/can-edit-post-v2.js.map +1 -0
- package/dist/esm/discussions/api/utils/posts/can-edit-post.js +62 -0
- package/dist/esm/discussions/api/utils/posts/can-edit-post.js.map +1 -0
- package/dist/esm/discussions/api/utils/posts/index.js +15 -0
- package/dist/esm/discussions/api/utils/posts/index.js.map +1 -0
- package/dist/esm/discussions/api/utils/posts/parse-discussion-uri.js +38 -0
- package/dist/esm/discussions/api/utils/posts/parse-discussion-uri.js.map +1 -0
- package/dist/esm/discussions/api/utils/posts/parse-mentioned-users.js +19 -0
- package/dist/esm/discussions/api/utils/posts/parse-mentioned-users.js.map +1 -0
- package/dist/esm/discussions/api/utils/reactions/can-create-reaction-v2.js +27 -0
- package/dist/esm/discussions/api/utils/reactions/can-create-reaction-v2.js.map +1 -0
- package/dist/esm/discussions/api/utils/reactions/can-create-reaction.js +28 -0
- package/dist/esm/discussions/api/utils/reactions/can-create-reaction.js.map +1 -0
- package/dist/esm/discussions/api/utils/reactions/index.js +3 -0
- package/dist/esm/discussions/api/utils/reactions/index.js.map +1 -0
- package/dist/esm/hub-types.js +916 -0
- package/dist/esm/hub-types.js.map +1 -0
- package/dist/esm/items/is-services-directory-disabled.js +5 -2
- package/dist/esm/items/is-services-directory-disabled.js.map +1 -1
- package/dist/esm/org/fetch-org.js +5 -1
- package/dist/esm/org/fetch-org.js.map +1 -1
- package/dist/esm/org/fetch.js +83 -0
- package/dist/esm/org/fetch.js.map +1 -0
- package/dist/esm/resources/_internal/_validate-url-helpers.js +12 -0
- package/dist/esm/resources/_internal/_validate-url-helpers.js.map +1 -1
- package/dist/esm/resources/fetch-image-as-blob.js +7 -2
- package/dist/esm/resources/fetch-image-as-blob.js.map +1 -1
- package/dist/esm/search/_internal/hubDiscussionsHelpers/channelResultsToSearchResults.js +33 -0
- package/dist/esm/search/_internal/hubDiscussionsHelpers/channelResultsToSearchResults.js.map +1 -0
- package/dist/esm/search/_internal/hubDiscussionsHelpers/processChannelFilters.js +67 -0
- package/dist/esm/search/_internal/hubDiscussionsHelpers/processChannelFilters.js.map +1 -0
- package/dist/esm/search/_internal/hubDiscussionsHelpers/processChannelOptions.js +35 -0
- package/dist/esm/search/_internal/hubDiscussionsHelpers/processChannelOptions.js.map +1 -0
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getFieldsQueryParam.js +15 -0
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getFieldsQueryParam.js.map +1 -0
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getFlattenQueryParam.js +15 -0
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getFlattenQueryParam.js.map +1 -0
- package/dist/esm/search/_internal/portalFetchOrgs.js +33 -0
- package/dist/esm/search/_internal/portalFetchOrgs.js.map +1 -0
- package/dist/esm/sites/_internal/_migrate-to-v2-catalog.js +24 -0
- package/dist/esm/sites/_internal/_migrate-to-v2-catalog.js.map +1 -0
- package/dist/esm/sites/defaultSiteCollectionKeys.js +7 -0
- package/dist/esm/sites/defaultSiteCollectionKeys.js.map +1 -0
- package/dist/esm/sites/searchCategoriesToCollections.js +75 -0
- package/dist/esm/sites/searchCategoriesToCollections.js.map +1 -0
- 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/urls/getPortalBaseFromOrgUrl.js +3 -1
- package/dist/esm/urls/getPortalBaseFromOrgUrl.js.map +1 -1
- package/dist/esm/utils/IHubConfig.js +1 -0
- package/dist/esm/utils/IHubConfig.js.map +1 -0
- 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/LogLevel.js +1 -0
- package/dist/esm/utils/LogLevel.js.map +1 -0
- package/dist/esm/utils/internal/config.js +11 -0
- package/dist/esm/utils/internal/config.js.map +1 -0
- package/dist/node/channels/HubChannel.js +177 -0
- package/dist/node/channels/HubChannel.js.map +1 -0
- package/dist/node/channels/_internal/ChannelBusinessRules.js +42 -0
- package/dist/node/channels/_internal/ChannelBusinessRules.js.map +1 -0
- package/dist/node/channels/_internal/ChannelSchema.js +201 -0
- package/dist/node/channels/_internal/ChannelSchema.js.map +1 -0
- package/dist/node/channels/_internal/ChannelUiSchemaCreate.js +291 -0
- package/dist/node/channels/_internal/ChannelUiSchemaCreate.js.map +1 -0
- package/dist/node/channels/_internal/ChannelUiSchemaEdit.js +23 -0
- package/dist/node/channels/_internal/ChannelUiSchemaEdit.js.map +1 -0
- package/dist/node/channels/_internal/buildDefaultChannel.js +30 -0
- package/dist/node/channels/_internal/buildDefaultChannel.js.map +1 -0
- package/dist/node/channels/_internal/transformAclPermissionToEntityPermissionPolicy.js +52 -0
- package/dist/node/channels/_internal/transformAclPermissionToEntityPermissionPolicy.js.map +1 -0
- package/dist/node/channels/_internal/transformChannelToEntity.js +65 -0
- package/dist/node/channels/_internal/transformChannelToEntity.js.map +1 -0
- package/dist/node/channels/_internal/transformEditorToEntity.js +26 -0
- package/dist/node/channels/_internal/transformEditorToEntity.js.map +1 -0
- package/dist/node/channels/_internal/transformEntityPermissionPoliciesToFormValues.js +153 -0
- package/dist/node/channels/_internal/transformEntityPermissionPoliciesToFormValues.js.map +1 -0
- package/dist/node/channels/_internal/transformEntityToChannelData.js +73 -0
- package/dist/node/channels/_internal/transformEntityToChannelData.js.map +1 -0
- package/dist/node/channels/_internal/transformEntityToEditor.js +24 -0
- package/dist/node/channels/_internal/transformEntityToEditor.js.map +1 -0
- package/dist/node/channels/_internal/transformFormValuesToEntityPermissionPolicies.js +59 -0
- package/dist/node/channels/_internal/transformFormValuesToEntityPermissionPolicies.js.map +1 -0
- package/dist/node/channels/edit.js +41 -0
- package/dist/node/channels/edit.js.map +1 -0
- package/dist/node/channels/fetch.js +18 -0
- package/dist/node/channels/fetch.js.map +1 -0
- package/dist/node/channels/index.js +7 -0
- package/dist/node/channels/index.js.map +1 -0
- package/dist/node/core/schemas/internal/discussions/EntityUiSchemaDiscussionsSettings.js +144 -0
- package/dist/node/core/schemas/internal/discussions/EntityUiSchemaDiscussionsSettings.js.map +1 -0
- package/dist/node/core/types/IHubChannel.js +3 -0
- package/dist/node/core/types/IHubChannel.js.map +1 -0
- package/dist/node/core/types/IHubOrganization.js +3 -0
- package/dist/node/core/types/IHubOrganization.js.map +1 -0
- package/dist/node/discussions/api/posts/index.js +5 -0
- package/dist/node/discussions/api/posts/index.js.map +1 -0
- package/dist/node/discussions/api/posts/posts.js +244 -0
- package/dist/node/discussions/api/posts/posts.js.map +1 -0
- package/dist/node/discussions/api/reactions/index.js +5 -0
- package/dist/node/discussions/api/reactions/index.js.map +1 -0
- package/dist/node/discussions/api/reactions/reactions.js +60 -0
- package/dist/node/discussions/api/reactions/reactions.js.map +1 -0
- package/dist/node/discussions/api/utils/channel-permission.js +381 -0
- package/dist/node/discussions/api/utils/channel-permission.js.map +1 -0
- package/dist/node/discussions/api/utils/channels/can-create-channel-v2.js +17 -0
- package/dist/node/discussions/api/utils/channels/can-create-channel-v2.js.map +1 -0
- package/dist/node/discussions/api/utils/channels/can-create-channel.js +58 -0
- package/dist/node/discussions/api/utils/channels/can-create-channel.js.map +1 -0
- package/dist/node/discussions/api/utils/channels/can-delete-channel-v2.js +21 -0
- package/dist/node/discussions/api/utils/channels/can-delete-channel-v2.js.map +1 -0
- package/dist/node/discussions/api/utils/channels/can-delete-channel.js +21 -0
- package/dist/node/discussions/api/utils/channels/can-delete-channel.js.map +1 -0
- package/dist/node/discussions/api/utils/channels/can-edit-channel-v2.js +23 -0
- package/dist/node/discussions/api/utils/channels/can-edit-channel-v2.js.map +1 -0
- package/dist/node/discussions/api/utils/channels/can-edit-channel.js +21 -0
- package/dist/node/discussions/api/utils/channels/can-edit-channel.js.map +1 -0
- package/dist/node/discussions/api/utils/channels/can-modify-channel.js +22 -0
- package/dist/node/discussions/api/utils/channels/can-modify-channel.js.map +1 -0
- package/dist/node/discussions/api/utils/channels/can-post-to-channel.js +61 -0
- package/dist/node/discussions/api/utils/channels/can-post-to-channel.js.map +1 -0
- package/dist/node/discussions/api/utils/channels/can-read-channel-v2.js +22 -0
- package/dist/node/discussions/api/utils/channels/can-read-channel-v2.js.map +1 -0
- package/dist/node/discussions/api/utils/channels/can-read-channel.js +57 -0
- package/dist/node/discussions/api/utils/channels/can-read-channel.js.map +1 -0
- package/dist/node/discussions/api/utils/channels/channel-to-dto-map.js +15 -0
- package/dist/node/discussions/api/utils/channels/channel-to-dto-map.js.map +1 -0
- package/dist/node/discussions/api/utils/channels/index.js +26 -0
- package/dist/node/discussions/api/utils/channels/index.js.map +1 -0
- package/dist/node/discussions/api/utils/channels/is-authorized-to-modify-channel-by-legacy-permissions.js +48 -0
- package/dist/node/discussions/api/utils/channels/is-authorized-to-modify-channel-by-legacy-permissions.js.map +1 -0
- package/dist/node/discussions/api/utils/platform.js +53 -0
- package/dist/node/discussions/api/utils/platform.js.map +1 -0
- package/dist/node/discussions/api/utils/portal-privilege.js +41 -0
- package/dist/node/discussions/api/utils/portal-privilege.js.map +1 -0
- package/dist/node/discussions/api/utils/posts/can-create-post-v2.js +24 -0
- package/dist/node/discussions/api/utils/posts/can-create-post-v2.js.map +1 -0
- package/dist/node/discussions/api/utils/posts/can-create-post.js +56 -0
- package/dist/node/discussions/api/utils/posts/can-create-post.js.map +1 -0
- package/dist/node/discussions/api/utils/posts/can-create-reply-v2.js +23 -0
- package/dist/node/discussions/api/utils/posts/can-create-reply-v2.js.map +1 -0
- package/dist/node/discussions/api/utils/posts/can-create-reply.js +56 -0
- package/dist/node/discussions/api/utils/posts/can-create-reply.js.map +1 -0
- package/dist/node/discussions/api/utils/posts/can-delete-post-v2.js +28 -0
- package/dist/node/discussions/api/utils/posts/can-delete-post-v2.js.map +1 -0
- package/dist/node/discussions/api/utils/posts/can-delete-post.js +32 -0
- package/dist/node/discussions/api/utils/posts/can-delete-post.js.map +1 -0
- package/dist/node/discussions/api/utils/posts/can-edit-post-status-v2.js +20 -0
- package/dist/node/discussions/api/utils/posts/can-edit-post-status-v2.js.map +1 -0
- package/dist/node/discussions/api/utils/posts/can-edit-post-status.js +66 -0
- package/dist/node/discussions/api/utils/posts/can-edit-post-status.js.map +1 -0
- package/dist/node/discussions/api/utils/posts/can-edit-post-v2.js +23 -0
- package/dist/node/discussions/api/utils/posts/can-edit-post-v2.js.map +1 -0
- package/dist/node/discussions/api/utils/posts/can-edit-post.js +67 -0
- package/dist/node/discussions/api/utils/posts/can-edit-post.js.map +1 -0
- package/dist/node/discussions/api/utils/posts/index.js +31 -0
- package/dist/node/discussions/api/utils/posts/index.js.map +1 -0
- package/dist/node/discussions/api/utils/posts/parse-discussion-uri.js +42 -0
- package/dist/node/discussions/api/utils/posts/parse-discussion-uri.js.map +1 -0
- package/dist/node/discussions/api/utils/posts/parse-mentioned-users.js +23 -0
- package/dist/node/discussions/api/utils/posts/parse-mentioned-users.js.map +1 -0
- package/dist/node/discussions/api/utils/reactions/can-create-reaction-v2.js +31 -0
- package/dist/node/discussions/api/utils/reactions/can-create-reaction-v2.js.map +1 -0
- package/dist/node/discussions/api/utils/reactions/can-create-reaction.js +32 -0
- package/dist/node/discussions/api/utils/reactions/can-create-reaction.js.map +1 -0
- package/dist/node/discussions/api/utils/reactions/index.js +7 -0
- package/dist/node/discussions/api/utils/reactions/index.js.map +1 -0
- package/dist/node/hub-types.js +919 -0
- package/dist/node/hub-types.js.map +1 -0
- package/dist/node/items/is-services-directory-disabled.js +5 -2
- package/dist/node/items/is-services-directory-disabled.js.map +1 -1
- package/dist/node/org/fetch-org.js +5 -1
- package/dist/node/org/fetch-org.js.map +1 -1
- package/dist/node/org/fetch.js +89 -0
- package/dist/node/org/fetch.js.map +1 -0
- package/dist/node/resources/_internal/_validate-url-helpers.js +12 -0
- package/dist/node/resources/_internal/_validate-url-helpers.js.map +1 -1
- package/dist/node/resources/fetch-image-as-blob.js +7 -2
- package/dist/node/resources/fetch-image-as-blob.js.map +1 -1
- package/dist/node/search/_internal/hubDiscussionsHelpers/channelResultsToSearchResults.js +37 -0
- package/dist/node/search/_internal/hubDiscussionsHelpers/channelResultsToSearchResults.js.map +1 -0
- package/dist/node/search/_internal/hubDiscussionsHelpers/processChannelFilters.js +72 -0
- package/dist/node/search/_internal/hubDiscussionsHelpers/processChannelFilters.js.map +1 -0
- package/dist/node/search/_internal/hubDiscussionsHelpers/processChannelOptions.js +39 -0
- package/dist/node/search/_internal/hubDiscussionsHelpers/processChannelOptions.js.map +1 -0
- package/dist/node/search/_internal/hubSearchItemsHelpers/getFieldsQueryParam.js +19 -0
- package/dist/node/search/_internal/hubSearchItemsHelpers/getFieldsQueryParam.js.map +1 -0
- package/dist/node/search/_internal/hubSearchItemsHelpers/getFlattenQueryParam.js +19 -0
- package/dist/node/search/_internal/hubSearchItemsHelpers/getFlattenQueryParam.js.map +1 -0
- package/dist/node/search/_internal/portalFetchOrgs.js +37 -0
- package/dist/node/search/_internal/portalFetchOrgs.js.map +1 -0
- package/dist/node/sites/_internal/_migrate-to-v2-catalog.js +28 -0
- package/dist/node/sites/_internal/_migrate-to-v2-catalog.js.map +1 -0
- package/dist/node/sites/defaultSiteCollectionKeys.js +10 -0
- package/dist/node/sites/defaultSiteCollectionKeys.js.map +1 -0
- package/dist/node/sites/searchCategoriesToCollections.js +79 -0
- package/dist/node/sites/searchCategoriesToCollections.js.map +1 -0
- 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/urls/getPortalBaseFromOrgUrl.js +3 -1
- package/dist/node/urls/getPortalBaseFromOrgUrl.js.map +1 -1
- package/dist/node/utils/IHubConfig.js +3 -0
- package/dist/node/utils/IHubConfig.js.map +1 -0
- 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/LogLevel.js +3 -0
- package/dist/node/utils/LogLevel.js.map +1 -0
- package/dist/node/utils/internal/config.js +14 -0
- package/dist/node/utils/internal/config.js.map +1 -0
- package/dist/types/channels/HubChannel.d.ts +105 -0
- package/dist/types/channels/_internal/ChannelBusinessRules.d.ts +19 -0
- package/dist/types/channels/_internal/ChannelSchema.d.ts +16 -0
- package/dist/types/channels/_internal/ChannelUiSchemaCreate.d.ts +10 -0
- package/dist/types/channels/_internal/ChannelUiSchemaEdit.d.ts +10 -0
- package/dist/types/channels/_internal/buildDefaultChannel.d.ts +8 -0
- package/dist/types/channels/_internal/transformAclPermissionToEntityPermissionPolicy.d.ts +11 -0
- package/dist/types/channels/_internal/transformChannelToEntity.d.ts +11 -0
- package/dist/types/channels/_internal/transformEditorToEntity.d.ts +8 -0
- package/dist/types/channels/_internal/transformEntityPermissionPoliciesToFormValues.d.ts +44 -0
- package/dist/types/channels/_internal/transformEntityToChannelData.d.ts +9 -0
- package/dist/types/channels/_internal/transformEntityToEditor.d.ts +9 -0
- package/dist/types/channels/_internal/transformFormValuesToEntityPermissionPolicies.d.ts +9 -0
- package/dist/types/channels/edit.d.ts +23 -0
- package/dist/types/channels/fetch.d.ts +9 -0
- package/dist/types/channels/index.d.ts +3 -0
- package/dist/types/core/schemas/internal/discussions/EntityUiSchemaDiscussionsSettings.d.ts +11 -0
- package/dist/types/core/types/IHubChannel.d.ts +91 -0
- package/dist/types/core/types/IHubOrganization.d.ts +61 -0
- package/dist/types/discussions/api/posts/index.d.ts +1 -0
- package/dist/types/discussions/api/posts/posts.d.ts +146 -0
- package/dist/types/discussions/api/reactions/index.d.ts +1 -0
- package/dist/types/discussions/api/reactions/reactions.d.ts +38 -0
- package/dist/types/discussions/api/utils/channel-permission.d.ts +44 -0
- package/dist/types/discussions/api/utils/channels/can-create-channel-v2.d.ts +10 -0
- package/dist/types/discussions/api/utils/channels/can-create-channel.d.ts +11 -0
- package/dist/types/discussions/api/utils/channels/can-delete-channel-v2.d.ts +10 -0
- package/dist/types/discussions/api/utils/channels/can-delete-channel.d.ts +11 -0
- package/dist/types/discussions/api/utils/channels/can-edit-channel-v2.d.ts +11 -0
- package/dist/types/discussions/api/utils/channels/can-edit-channel.d.ts +11 -0
- package/dist/types/discussions/api/utils/channels/can-modify-channel.d.ts +11 -0
- package/dist/types/discussions/api/utils/channels/can-post-to-channel.d.ts +11 -0
- package/dist/types/discussions/api/utils/channels/can-read-channel-v2.d.ts +11 -0
- package/dist/types/discussions/api/utils/channels/can-read-channel.d.ts +22 -0
- package/dist/types/discussions/api/utils/channels/channel-to-dto-map.d.ts +6 -0
- package/dist/types/discussions/api/utils/channels/index.d.ts +10 -0
- package/dist/types/discussions/api/utils/channels/is-authorized-to-modify-channel-by-legacy-permissions.d.ts +11 -0
- package/dist/types/discussions/api/utils/platform.d.ts +26 -0
- package/dist/types/discussions/api/utils/portal-privilege.d.ts +17 -0
- package/dist/types/discussions/api/utils/posts/can-create-post-v2.d.ts +10 -0
- package/dist/types/discussions/api/utils/posts/can-create-post.d.ts +12 -0
- package/dist/types/discussions/api/utils/posts/can-create-reply-v2.d.ts +9 -0
- package/dist/types/discussions/api/utils/posts/can-create-reply.d.ts +12 -0
- package/dist/types/discussions/api/utils/posts/can-delete-post-v2.d.ts +11 -0
- package/dist/types/discussions/api/utils/posts/can-delete-post.d.ts +12 -0
- package/dist/types/discussions/api/utils/posts/can-edit-post-status-v2.d.ts +9 -0
- package/dist/types/discussions/api/utils/posts/can-edit-post-status.d.ts +20 -0
- package/dist/types/discussions/api/utils/posts/can-edit-post-v2.d.ts +10 -0
- package/dist/types/discussions/api/utils/posts/can-edit-post.d.ts +22 -0
- package/dist/types/discussions/api/utils/posts/index.d.ts +12 -0
- package/dist/types/discussions/api/utils/posts/parse-discussion-uri.d.ts +9 -0
- package/dist/types/discussions/api/utils/posts/parse-mentioned-users.d.ts +6 -0
- package/dist/types/discussions/api/utils/reactions/can-create-reaction-v2.d.ts +12 -0
- package/dist/types/discussions/api/utils/reactions/can-create-reaction.d.ts +13 -0
- package/dist/types/discussions/api/utils/reactions/index.d.ts +2 -0
- package/dist/types/hub-types.d.ts +547 -0
- package/dist/types/org/fetch.d.ts +26 -0
- package/dist/types/search/_internal/hubDiscussionsHelpers/channelResultsToSearchResults.d.ts +11 -0
- package/dist/types/search/_internal/hubDiscussionsHelpers/processChannelFilters.d.ts +32 -0
- package/dist/types/search/_internal/hubDiscussionsHelpers/processChannelOptions.d.ts +10 -0
- package/dist/types/search/_internal/hubSearchItemsHelpers/getFieldsQueryParam.d.ts +11 -0
- package/dist/types/search/_internal/hubSearchItemsHelpers/getFlattenQueryParam.d.ts +11 -0
- package/dist/types/search/_internal/portalFetchOrgs.d.ts +9 -0
- package/dist/types/sites/_internal/_migrate-to-v2-catalog.d.ts +8 -0
- package/dist/types/sites/defaultSiteCollectionKeys.d.ts +2 -0
- package/dist/types/sites/searchCategoriesToCollections.d.ts +10 -0
- package/dist/types/types/IArcGISContext.d.ts +258 -0
- package/dist/types/types/IArcGISContextManagerOptions.d.ts +79 -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/utils/IHubConfig.d.ts +24 -0
- package/dist/types/utils/IUserHubSettings.d.ts +32 -0
- package/dist/types/utils/IUserSiteSettings.d.ts +8 -0
- package/dist/types/utils/LogLevel.d.ts +2 -0
- package/dist/types/utils/internal/config.d.ts +1 -0
- package/package.json +5 -4
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IQuery } from "../../types/IHubCatalog";
|
|
2
|
+
/**
|
|
3
|
+
* @private
|
|
4
|
+
* Extracts the fields value that the search should be filtered by.
|
|
5
|
+
* Also validates that the fields predicate is not combined in some
|
|
6
|
+
* invalid way with other predicates.
|
|
7
|
+
*
|
|
8
|
+
* @param query query to extract the fields predicate from
|
|
9
|
+
* @returns the fields value to filter by
|
|
10
|
+
*/
|
|
11
|
+
export declare function getFieldsQueryParam(query: IQuery): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IQuery } from "../../types/IHubCatalog";
|
|
2
|
+
/**
|
|
3
|
+
* @private
|
|
4
|
+
* Extracts the flatten value that the search should be filtered by.
|
|
5
|
+
* Also validates that the flatten predicate is not combined in some
|
|
6
|
+
* invalid way with other predicates.
|
|
7
|
+
*
|
|
8
|
+
* @param query query to extract the flatten predicate from
|
|
9
|
+
* @returns the flatten value to filter by
|
|
10
|
+
*/
|
|
11
|
+
export declare function getFlattenQueryParam(query: IQuery): boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IHubSearchOptions, IHubSearchResponse, IHubSearchResult, IQuery } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Since the portal api does not actually have a search endpoint for orgs,
|
|
4
|
+
* this function simply extracts the id predicate from the query and
|
|
5
|
+
* fetches the orgs that match that ids.
|
|
6
|
+
* @param query
|
|
7
|
+
* @param options
|
|
8
|
+
*/
|
|
9
|
+
export declare function portalFetchOrgs(query: IQuery, options: IHubSearchOptions): Promise<IHubSearchResponse<IHubSearchResult>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IDraft, IModel } from "../../hub-types";
|
|
2
|
+
/**
|
|
3
|
+
* Adds a new `catalogV2` property to the site model, which is a migrated version of the existing catalog.
|
|
4
|
+
* @private
|
|
5
|
+
* @param {object} model Site Model
|
|
6
|
+
* @returns {object}
|
|
7
|
+
*/
|
|
8
|
+
export declare function _migrateToV2Catalog<T extends IModel | IDraft>(model: T): T;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IHubCollection } from "../search/types/IHubCatalog";
|
|
2
|
+
import { SearchCategories } from "./_internal/types";
|
|
3
|
+
/**
|
|
4
|
+
* Convert searchCategories to collections. If no searchCategories are provided,
|
|
5
|
+
* the default collections will be returned.
|
|
6
|
+
*
|
|
7
|
+
* @param searchCategories searchCategories from site model (data.values.searchCategories)
|
|
8
|
+
* @returns IHubCollections that respect the searchCategories configuration
|
|
9
|
+
*/
|
|
10
|
+
export declare function searchCategoriesToCollections(searchCategories?: SearchCategories[]): IHubCollection[];
|
|
@@ -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-portal";
|
|
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,79 @@
|
|
|
1
|
+
import type { UserSession } from "@esri/arcgis-rest-auth";
|
|
2
|
+
import { IPortal } from "@esri/arcgis-rest-portal";
|
|
3
|
+
import type { IUser } from "@esri/arcgis-rest-portal";
|
|
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 { IUserHubSettings } from "../utils/IUserHubSettings";
|
|
10
|
+
/**
|
|
11
|
+
* Options that can be passed into `ArcGISContextManager.create`
|
|
12
|
+
*/
|
|
13
|
+
export interface IArcGISContextManagerOptions {
|
|
14
|
+
/**
|
|
15
|
+
* Existing user session, which may be created from Identity Manager
|
|
16
|
+
* `const session = UserSession.fromCredential(idMgr.getCredential());`
|
|
17
|
+
*/
|
|
18
|
+
authentication?: UserSession;
|
|
19
|
+
/**
|
|
20
|
+
* ArcGIS Online or ArcGIS Enterprise portal url.
|
|
21
|
+
* Do not include `/sharing/rest`
|
|
22
|
+
* Defaults to `https://www.arcgis.com`
|
|
23
|
+
* For ArcGIS Enterprise, you must include the webadaptor name.
|
|
24
|
+
* i.e. https://gis.mytown.gov/portal
|
|
25
|
+
*
|
|
26
|
+
* When Authentication is present, the UserSession.portal value is
|
|
27
|
+
* used instead of this property.
|
|
28
|
+
*/
|
|
29
|
+
portalUrl?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Portal self for the authenticated user. If not passed into `.create`
|
|
32
|
+
* with the UserSession, it will be fetched
|
|
33
|
+
*/
|
|
34
|
+
portal?: IPortal;
|
|
35
|
+
/**
|
|
36
|
+
* Current user as `IUser`. If not passed into `.create` with the UserSession
|
|
37
|
+
* it will be fetched.
|
|
38
|
+
*/
|
|
39
|
+
currentUser?: IUser;
|
|
40
|
+
/**
|
|
41
|
+
* Any additional properties to expose on the context. This allows
|
|
42
|
+
* an application to send additional context into the system.
|
|
43
|
+
* For example, in ArcGIS Hub, many times we want to pass in the
|
|
44
|
+
* active "Hub Site" as additional context, so we will send that in
|
|
45
|
+
* as a node on a properties object.
|
|
46
|
+
*/
|
|
47
|
+
properties?: Record<string, any>;
|
|
48
|
+
/**
|
|
49
|
+
* Option to pass in service status vs fetching it
|
|
50
|
+
*/
|
|
51
|
+
serviceStatus?: HubServiceStatus;
|
|
52
|
+
/**
|
|
53
|
+
* Optional hash of feature flags
|
|
54
|
+
*/
|
|
55
|
+
featureFlags?: IFeatureFlags;
|
|
56
|
+
/**
|
|
57
|
+
* Array of Trusted Org Ids
|
|
58
|
+
*/
|
|
59
|
+
trustedOrgIds?: string[];
|
|
60
|
+
/**
|
|
61
|
+
* Trusted orgs xhr response
|
|
62
|
+
*/
|
|
63
|
+
trustedOrgs?: IHubTrustedOrgsResponse[];
|
|
64
|
+
/**
|
|
65
|
+
* Array of app, clientId's that Context Manager should
|
|
66
|
+
* exchange tokens for
|
|
67
|
+
*/
|
|
68
|
+
resourceConfigs?: IUserResourceConfig[];
|
|
69
|
+
/**
|
|
70
|
+
* Array of app, clientId, token objects which Context
|
|
71
|
+
* Manager has exchanged tokens for
|
|
72
|
+
*/
|
|
73
|
+
resourceTokens?: IUserResourceToken[];
|
|
74
|
+
/**
|
|
75
|
+
* Hash of user hub settings. These are stored as
|
|
76
|
+
* user-app-resources, associated with the `hubforarcgis` clientId
|
|
77
|
+
*/
|
|
78
|
+
userHubSettings?: IUserHubSettings;
|
|
79
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { UserSession } from "@esri/arcgis-rest-auth";
|
|
2
|
+
import type { IPortal } from "@esri/arcgis-rest-portal";
|
|
3
|
+
import type { IUser } from "@esri/arcgis-rest-portal";
|
|
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
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { LogLevel } from "./LogLevel";
|
|
2
|
+
/**
|
|
3
|
+
* Hub.js configuration settings
|
|
4
|
+
*
|
|
5
|
+
* You can override the default settings by
|
|
6
|
+
* initializing the global `arcgisHubConfig` variable
|
|
7
|
+
* before using any Hub.js functions, for example:
|
|
8
|
+
* ```js
|
|
9
|
+
* import { Logger } from '@esri/hub-common';
|
|
10
|
+
* // configure Hub.js
|
|
11
|
+
* const logLevel = environment === 'production' ? 'error' : 'debug';
|
|
12
|
+
* globalThis.arcgisHubConfig = { logLevel };
|
|
13
|
+
* // then use Hub.js
|
|
14
|
+
* Logger.info('This message will not log on production');
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export interface IHubConfig {
|
|
18
|
+
/**
|
|
19
|
+
* The global log level for Hub.js
|
|
20
|
+
*
|
|
21
|
+
* Available logging levels are specified in the LogLevel type. The default is 'info'.
|
|
22
|
+
*/
|
|
23
|
+
logLevel?: LogLevel;
|
|
24
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const logLevel: import("..").LogLevel;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esri/hub-common",
|
|
3
|
-
"version": "15.31.
|
|
3
|
+
"version": "15.31.4",
|
|
4
4
|
"description": "Common TypeScript types and utility functions for @esri/hub.js.",
|
|
5
5
|
"main": "dist/node/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@esri/arcgis-rest-auth": "^2.14.0 || 3",
|
|
26
|
-
"@esri/arcgis-rest-feature-layer": "^3.
|
|
26
|
+
"@esri/arcgis-rest-feature-layer": "^3.8.0",
|
|
27
27
|
"@esri/arcgis-rest-portal": "^2.18.0 || 3",
|
|
28
28
|
"@esri/arcgis-rest-request": "^2.14.0 || 3",
|
|
29
|
-
"@esri/arcgis-rest-service-admin": "^3.
|
|
29
|
+
"@esri/arcgis-rest-service-admin": "^3.8.0",
|
|
30
30
|
"@esri/arcgis-rest-types": "^2.15.0 || 3"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
@@ -47,7 +47,8 @@
|
|
|
47
47
|
"y:push": "yalc push"
|
|
48
48
|
},
|
|
49
49
|
"publishConfig": {
|
|
50
|
-
"access": "public"
|
|
50
|
+
"access": "public",
|
|
51
|
+
"tag": "portal115"
|
|
51
52
|
},
|
|
52
53
|
"repository": "github:/Esri/hub.js",
|
|
53
54
|
"contributors": [
|