@esri/hub-common 15.31.3 → 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/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/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/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/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 +1 -1
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { ICreatePostParams, ICreatePostParamsV2, ICreateReplyParams, IPost, ISearchPostsParams, IExportPostsParams, IFetchPostParams, IRemovePostParams, IRemovePostResponse, IUpdatePostParams, IUpdatePostStatusParams, IPagedResponse } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* search posts
|
|
4
|
+
*
|
|
5
|
+
* @deprecated use searchPostsV2 instead
|
|
6
|
+
* @export
|
|
7
|
+
* @param {ISearchPostsParams} options
|
|
8
|
+
* @return {*} {Promise<IPagedResponse<IPost>>}
|
|
9
|
+
*/
|
|
10
|
+
export declare function searchPosts(options: ISearchPostsParams): Promise<IPagedResponse<IPost>>;
|
|
11
|
+
/**
|
|
12
|
+
* searches for posts and resolves a promise with CSV string representing the results
|
|
13
|
+
*
|
|
14
|
+
* @deprecated use exportPostsV2 instead
|
|
15
|
+
* @export
|
|
16
|
+
* @param {IExportPostsParams} options
|
|
17
|
+
* @return {*} {Promise<string>}
|
|
18
|
+
*/
|
|
19
|
+
export declare function exportPosts(options: IExportPostsParams): Promise<string>;
|
|
20
|
+
/**
|
|
21
|
+
* create post
|
|
22
|
+
*
|
|
23
|
+
* @deprecated use createPostV2 instead
|
|
24
|
+
* @export
|
|
25
|
+
* @param {ICreatePostParams} options
|
|
26
|
+
* @return {*} {Promise<IPost>}
|
|
27
|
+
*/
|
|
28
|
+
export declare function createPost(options: ICreatePostParams): Promise<IPost>;
|
|
29
|
+
/**
|
|
30
|
+
* create reply to post
|
|
31
|
+
*
|
|
32
|
+
* @deprecated use createReplyV2 instead
|
|
33
|
+
* @export
|
|
34
|
+
* @param {string} parentId
|
|
35
|
+
* @param {ICreateReplyParams} options
|
|
36
|
+
* @return {*} {Promise<IPost>}
|
|
37
|
+
*/
|
|
38
|
+
export declare function createReply(options: ICreateReplyParams): Promise<IPost>;
|
|
39
|
+
/**
|
|
40
|
+
* fetch post
|
|
41
|
+
*
|
|
42
|
+
* @deprecated use fetchPostV2 instead
|
|
43
|
+
* @export
|
|
44
|
+
* @param {IFetchPostParams} params
|
|
45
|
+
* @return {*} {Promise<IPost>}
|
|
46
|
+
*/
|
|
47
|
+
export declare function fetchPost(params: IFetchPostParams): Promise<IPost>;
|
|
48
|
+
/**
|
|
49
|
+
* remove post
|
|
50
|
+
*
|
|
51
|
+
* @deprecated use removePostV2 instead
|
|
52
|
+
* @export
|
|
53
|
+
* @param {IRemovePostParams} options
|
|
54
|
+
* @return {*} {Promise<IRemovePostResponse>}
|
|
55
|
+
*/
|
|
56
|
+
export declare function removePost(options: IRemovePostParams): Promise<IRemovePostResponse>;
|
|
57
|
+
/**
|
|
58
|
+
* update post
|
|
59
|
+
* NOTE: this method currently only update post.title and post.body
|
|
60
|
+
*
|
|
61
|
+
* @deprecated use updatePostV2 instead
|
|
62
|
+
* @export
|
|
63
|
+
* @param {IUpdatePostParams} options
|
|
64
|
+
* @return {*} {Promise<IPost>}
|
|
65
|
+
*/
|
|
66
|
+
export declare function updatePost(options: IUpdatePostParams): Promise<IPost>;
|
|
67
|
+
/**
|
|
68
|
+
* update post status
|
|
69
|
+
* NOTE: this method will only update a post's status
|
|
70
|
+
*
|
|
71
|
+
* @deprecated use updatePostStatusV2 instead
|
|
72
|
+
* @export
|
|
73
|
+
* @param {IUpdatePostStatusParams} options
|
|
74
|
+
* @return {*} {Promise<IPost>}
|
|
75
|
+
*/
|
|
76
|
+
export declare function updatePostStatus(options: IUpdatePostStatusParams): Promise<IPost>;
|
|
77
|
+
/*******************************
|
|
78
|
+
* V2
|
|
79
|
+
*******************************/
|
|
80
|
+
/**
|
|
81
|
+
* search posts V2
|
|
82
|
+
*
|
|
83
|
+
* @export
|
|
84
|
+
* @param {ISearchPostsParams} options
|
|
85
|
+
* @return {*} {Promise<IPagedResponse<IPost>>}
|
|
86
|
+
*/
|
|
87
|
+
export declare function searchPostsV2(options: ISearchPostsParams): Promise<IPagedResponse<IPost>>;
|
|
88
|
+
/**
|
|
89
|
+
* searches for posts and resolves a promise with CSV string representing the results V2
|
|
90
|
+
*
|
|
91
|
+
* @export
|
|
92
|
+
* @param {IExportPostsParams} options
|
|
93
|
+
* @return {*} {Promise<string>}
|
|
94
|
+
*/
|
|
95
|
+
export declare function exportPostsV2(options: IExportPostsParams): Promise<string>;
|
|
96
|
+
/**
|
|
97
|
+
* create post
|
|
98
|
+
*
|
|
99
|
+
* @export
|
|
100
|
+
* @param {ICreatePostParamsV2} options
|
|
101
|
+
* @return {*} {Promise<IPost>}
|
|
102
|
+
*/
|
|
103
|
+
export declare function createPostV2(options: ICreatePostParamsV2): Promise<IPost>;
|
|
104
|
+
/**
|
|
105
|
+
* create reply to post
|
|
106
|
+
*
|
|
107
|
+
* @export
|
|
108
|
+
* @param {string} parentId
|
|
109
|
+
* @param {ICreateReplyParams} options
|
|
110
|
+
* @return {*} {Promise<IPost>}
|
|
111
|
+
*/
|
|
112
|
+
export declare function createReplyV2(options: ICreateReplyParams): Promise<IPost>;
|
|
113
|
+
/**
|
|
114
|
+
* fetch post
|
|
115
|
+
*
|
|
116
|
+
* @export
|
|
117
|
+
* @param {IFetchPostParams} params
|
|
118
|
+
* @return {*} {Promise<IPost>}
|
|
119
|
+
*/
|
|
120
|
+
export declare function fetchPostV2(params: IFetchPostParams): Promise<IPost>;
|
|
121
|
+
/**
|
|
122
|
+
* remove post
|
|
123
|
+
*
|
|
124
|
+
* @export
|
|
125
|
+
* @param {IRemovePostParams} options
|
|
126
|
+
* @return {*} {Promise<IRemovePostResponse>}
|
|
127
|
+
*/
|
|
128
|
+
export declare function removePostV2(options: IRemovePostParams): Promise<IRemovePostResponse>;
|
|
129
|
+
/**
|
|
130
|
+
* update post
|
|
131
|
+
* NOTE: this method currently only update post.title and post.body
|
|
132
|
+
*
|
|
133
|
+
* @export
|
|
134
|
+
* @param {IUpdatePostParams} options
|
|
135
|
+
* @return {*} {Promise<IPost>}
|
|
136
|
+
*/
|
|
137
|
+
export declare function updatePostV2(options: IUpdatePostParams): Promise<IPost>;
|
|
138
|
+
/**
|
|
139
|
+
* update post status
|
|
140
|
+
* NOTE: this method will only update a post's status
|
|
141
|
+
*
|
|
142
|
+
* @export
|
|
143
|
+
* @param {IUpdatePostStatusParams} options
|
|
144
|
+
* @return {*} {Promise<IPost>}
|
|
145
|
+
*/
|
|
146
|
+
export declare function updatePostStatusV2(options: IUpdatePostStatusParams): Promise<IPost>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./reactions";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ICreateReactionOptions, IRemoveReactionOptions, IRemoveReactionResponse, IReaction } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* create reaction to post
|
|
4
|
+
*
|
|
5
|
+
* @deprecated use createReactionV2 instead
|
|
6
|
+
* @export
|
|
7
|
+
* @param {ICreateReactionOptions} options
|
|
8
|
+
* @return {*} {Promise<IReaction>}
|
|
9
|
+
*/
|
|
10
|
+
export declare function createReaction(options: ICreateReactionOptions): Promise<IReaction>;
|
|
11
|
+
/**
|
|
12
|
+
* remove reaction
|
|
13
|
+
*
|
|
14
|
+
* @deprecated use removeReactionV2 instead
|
|
15
|
+
* @export
|
|
16
|
+
* @param {IRemoveReactionOptions} options
|
|
17
|
+
* @return {*} {Promise<IRemoveReactionResponse>}
|
|
18
|
+
*/
|
|
19
|
+
export declare function removeReaction(options: IRemoveReactionOptions): Promise<IRemoveReactionResponse>;
|
|
20
|
+
/*******************************
|
|
21
|
+
* V2
|
|
22
|
+
*******************************/
|
|
23
|
+
/**
|
|
24
|
+
* create reaction to post
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @param {ICreateReactionOptions} options
|
|
28
|
+
* @return {*} {Promise<IReaction>}
|
|
29
|
+
*/
|
|
30
|
+
export declare function createReactionV2(options: ICreateReactionOptions): Promise<IReaction>;
|
|
31
|
+
/**
|
|
32
|
+
* remove reaction
|
|
33
|
+
*
|
|
34
|
+
* @export
|
|
35
|
+
* @param {IRemoveReactionOptions} options
|
|
36
|
+
* @return {*} {Promise<IRemoveReactionResponse>}
|
|
37
|
+
*/
|
|
38
|
+
export declare function removeReactionV2(options: IRemoveReactionOptions): Promise<IRemoveReactionResponse>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { IChannel, IDiscussionsUser, IUpdateChannelV2 } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* @hidden
|
|
5
|
+
*/
|
|
6
|
+
export declare class ChannelPermission {
|
|
7
|
+
private readonly ALLOWED_GROUP_MEMBER_TYPES;
|
|
8
|
+
private isChannelAclEmpty;
|
|
9
|
+
private existingChannel;
|
|
10
|
+
private permissionsByCategory;
|
|
11
|
+
constructor(channel: IChannel);
|
|
12
|
+
canPostToChannel(user: IDiscussionsUser): boolean;
|
|
13
|
+
canCreateChannel(user: IDiscussionsUser): boolean;
|
|
14
|
+
canModerateChannel(user: IDiscussionsUser): boolean;
|
|
15
|
+
canReadChannel(user: IDiscussionsUser): boolean;
|
|
16
|
+
canDeleteChannel(user: IDiscussionsUser): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Ensure the user has rights to update the channel before calling this method
|
|
19
|
+
* Ex: canModerateChannel
|
|
20
|
+
*/
|
|
21
|
+
canUpdateProperties(user: IDiscussionsUser, updateData?: IUpdateChannelV2): boolean;
|
|
22
|
+
private isChanged;
|
|
23
|
+
private isStringArrayChanged;
|
|
24
|
+
private isRoleChanged;
|
|
25
|
+
private isCategoryChanged;
|
|
26
|
+
private canAnyUser;
|
|
27
|
+
private canAnyAuthenticatedUser;
|
|
28
|
+
private canSomeUser;
|
|
29
|
+
private canSomeUserGroup;
|
|
30
|
+
private canSomeUserOrg;
|
|
31
|
+
private userCanAddAnonymousToAcl;
|
|
32
|
+
private userCanAddUnauthenticatedToAcl;
|
|
33
|
+
private userCanAddAllGroupsToAcl;
|
|
34
|
+
private userCanAddAllOrgsToAcl;
|
|
35
|
+
private isEveryPermissionForUserOrg;
|
|
36
|
+
private userCanAddUsersToAcl;
|
|
37
|
+
private isUserUnAuthenticated;
|
|
38
|
+
private mapUserGroupsById;
|
|
39
|
+
private isMemberTypeAuthorized;
|
|
40
|
+
private determineUserRole;
|
|
41
|
+
private isOwner;
|
|
42
|
+
private isManager;
|
|
43
|
+
private isModerator;
|
|
44
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IUser } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IChannel, IDiscussionsUser } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Utility to determine if User has privileges to create a channel with the defined permissions
|
|
5
|
+
* @export
|
|
6
|
+
* @param channel
|
|
7
|
+
* @param user
|
|
8
|
+
* @returns {boolean}
|
|
9
|
+
*/
|
|
10
|
+
export declare function canCreateChannelV2(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IUser } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IChannel, IDiscussionsUser } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Utility to determine if User has privileges to create a channel with the defined permissions
|
|
5
|
+
* @deprecated replace with canCreateChannelV2 for v2 discussions
|
|
6
|
+
* @export
|
|
7
|
+
* @param channel
|
|
8
|
+
* @param user
|
|
9
|
+
* @returns {boolean}
|
|
10
|
+
*/
|
|
11
|
+
export declare function canCreateChannel(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IUser } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IChannel, IDiscussionsUser } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Utility to determine if User has privileges to delete a channel
|
|
5
|
+
* @export
|
|
6
|
+
* @param channel
|
|
7
|
+
* @param user
|
|
8
|
+
* @returns {boolean}
|
|
9
|
+
*/
|
|
10
|
+
export declare function canDeleteChannelV2(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IUser } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IChannel, IDiscussionsUser } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Utility to determine if User has privileges to delete a channel
|
|
5
|
+
* @deprecated replace with canDeleteChannelV2 for v2 discussions
|
|
6
|
+
* @export
|
|
7
|
+
* @param channel
|
|
8
|
+
* @param user
|
|
9
|
+
* @returns {boolean}
|
|
10
|
+
*/
|
|
11
|
+
export declare function canDeleteChannel(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IUser } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IChannel, IDiscussionsUser, IUpdateChannelV2 } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Utility to determine if User has privileges to edit a channel
|
|
5
|
+
* @export
|
|
6
|
+
* @param channel
|
|
7
|
+
* @param user
|
|
8
|
+
* @param updateData
|
|
9
|
+
* @returns {boolean}
|
|
10
|
+
*/
|
|
11
|
+
export declare function canEditChannelV2(channel: IChannel, user: IUser | IDiscussionsUser, updateData: IUpdateChannelV2): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IUser } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IChannel, IDiscussionsUser } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Utility to determine if User has privileges to edit a channel
|
|
5
|
+
* @export
|
|
6
|
+
* @deprecated replace with canEditChannelV2 for v2 discussions
|
|
7
|
+
* @param channel
|
|
8
|
+
* @param user
|
|
9
|
+
* @returns {boolean}
|
|
10
|
+
*/
|
|
11
|
+
export declare function canEditChannel(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IUser } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IChannel, IDiscussionsUser } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Utility to determine if User has privileges to modify a channel
|
|
5
|
+
* @deprecated use `canEditChannelV2` or `canDeleteChannelV2` instead.
|
|
6
|
+
* @export
|
|
7
|
+
* @param channel
|
|
8
|
+
* @param user
|
|
9
|
+
* @returns {boolean}
|
|
10
|
+
*/
|
|
11
|
+
export declare function canModifyChannel(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IUser } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IChannel, IDiscussionsUser } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Utility to determine if User has privileges to create a post in a channel
|
|
5
|
+
* @deprecated use `canCreatePostV2` or 'canCreateReplyV2` instead
|
|
6
|
+
* @export
|
|
7
|
+
* @param channel
|
|
8
|
+
* @param user
|
|
9
|
+
* @returns {boolean}
|
|
10
|
+
*/
|
|
11
|
+
export declare function canPostToChannel(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IUser } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IChannel, IDiscussionsUser } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Utility to determine if User can view channel posts and channel attributes
|
|
5
|
+
*
|
|
6
|
+
* @export
|
|
7
|
+
* @param {IChannel} channel
|
|
8
|
+
* @param {IUser} user
|
|
9
|
+
* @return {*} {boolean}
|
|
10
|
+
*/
|
|
11
|
+
export declare function canReadChannelV2(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { IUser } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IChannel, IDiscussionsUser } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Utility to determine if User can view channel posts and channel attributes
|
|
5
|
+
*
|
|
6
|
+
* @deprecated replace with canReadChannelV2 for v2 discussions
|
|
7
|
+
* @export
|
|
8
|
+
* @param {IChannel} channel
|
|
9
|
+
* @param {IUser} user
|
|
10
|
+
* @return {*} {boolean}
|
|
11
|
+
*/
|
|
12
|
+
export declare function canReadChannel(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Utility (deprecated) to determine whether User can view posts belonging to Channel
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @deprecated replace with canReadChannelV2 for v2 discussions
|
|
18
|
+
* @param {IChannel} channel
|
|
19
|
+
* @param {IUser} user
|
|
20
|
+
* @return {*} {boolean}
|
|
21
|
+
*/
|
|
22
|
+
export declare function canReadFromChannel(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { canCreateChannel } from "./can-create-channel";
|
|
2
|
+
export { canDeleteChannel } from "./can-delete-channel";
|
|
3
|
+
export { canEditChannel } from "./can-edit-channel";
|
|
4
|
+
export { canModifyChannel } from "./can-modify-channel";
|
|
5
|
+
export { canPostToChannel } from "./can-post-to-channel";
|
|
6
|
+
export { canReadChannel, canReadFromChannel } from "./can-read-channel";
|
|
7
|
+
export { canCreateChannelV2 } from "./can-create-channel-v2";
|
|
8
|
+
export { canDeleteChannelV2 } from "./can-delete-channel-v2";
|
|
9
|
+
export { canEditChannelV2 } from "./can-edit-channel-v2";
|
|
10
|
+
export { canReadChannelV2 } from "./can-read-channel-v2";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IUser } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IChannel, IDiscussionsUser } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Utility to determine if User has privileges to modify a channel by legacy channel permissions
|
|
5
|
+
* @param channel
|
|
6
|
+
* @param user
|
|
7
|
+
* @returns {boolean}
|
|
8
|
+
* @internal
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
export declare function isAuthorizedToModifyChannelByLegacyPermissions(user: IUser | IDiscussionsUser, channel: IChannel): boolean;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { GroupMembership, IGroup, IUser } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IDiscussionsUser } from "../types";
|
|
3
|
+
declare type Privilege = "portal:admin:deleteItems" | "portal:admin:shareToOrg" | "portal:admin:shareToPublic" | "portal:admin:updateItems" | "portal:admin:viewItems" | "portal:user:createItem" | "portal:user:shareToGroup" | "portal:user:shareToOrg" | "portal:user:shareToPublic" | "portal:user:viewOrgItems";
|
|
4
|
+
/**
|
|
5
|
+
* Utility that returns reducer function that filters a user's groups
|
|
6
|
+
* by membership type and produces an array of group id's
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
* @export
|
|
10
|
+
* @param {GroupMembership[]} membershipTypes
|
|
11
|
+
* @return {*} {((memo: string[], group: IGroup) => string[])}
|
|
12
|
+
*/
|
|
13
|
+
export declare function reduceByGroupMembership(membershipTypes: GroupMembership[]): (memo: string[], group: IGroup) => string[];
|
|
14
|
+
/**
|
|
15
|
+
* Utility that checks if a user is a portal org admin, or an org_admin by a platform role
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
* @param {IUser} user
|
|
19
|
+
* @return {*} {boolean}
|
|
20
|
+
*/
|
|
21
|
+
export declare function isOrgAdmin(user: IUser): boolean;
|
|
22
|
+
export declare function isUserInOrg(user: IUser | IDiscussionsUser, orgId: string): boolean;
|
|
23
|
+
export declare function isOrgAdminInOrg(user: IUser, orgId: string): boolean;
|
|
24
|
+
export declare function userHasPrivilege(user: IUser | IDiscussionsUser, privilege: Privilege): boolean;
|
|
25
|
+
export declare function userHasPrivileges(user: IUser | IDiscussionsUser, privileges: Privilege[]): boolean;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IUser } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IDiscussionsUser } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
* @hidden
|
|
6
|
+
*/
|
|
7
|
+
export declare function hasOrgAdminViewRights(user: IUser | IDiscussionsUser, orgId: string): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export declare function hasOrgAdminUpdateRights(user: IUser | IDiscussionsUser, orgId: string): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
* @hidden
|
|
16
|
+
*/
|
|
17
|
+
export declare function hasOrgAdminDeleteRights(user: IUser | IDiscussionsUser, orgId: string): boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IUser } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IChannel, IDiscussionsUser } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Utility to determine if User has privileges to create a post in a channel
|
|
5
|
+
* @export
|
|
6
|
+
* @param channel
|
|
7
|
+
* @param user
|
|
8
|
+
* @returns {boolean}
|
|
9
|
+
*/
|
|
10
|
+
export declare function canCreatePostV2(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IUser } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IChannel, IDiscussionsUser } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Utility to determine if User has privileges to create a post in a channel
|
|
5
|
+
*
|
|
6
|
+
* @deprecated replace with canCreatePostV2 for v2 discussions
|
|
7
|
+
* @export
|
|
8
|
+
* @param channel
|
|
9
|
+
* @param user
|
|
10
|
+
* @returns {boolean}
|
|
11
|
+
*/
|
|
12
|
+
export declare function canCreatePost(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IUser } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IChannel, IDiscussionsUser } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Utility to determine if User has privileges to create a reply in a channel
|
|
5
|
+
* @param channel
|
|
6
|
+
* @param user
|
|
7
|
+
* @returns {boolean}
|
|
8
|
+
*/
|
|
9
|
+
export declare function canCreateReplyV2(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IUser } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IChannel, IDiscussionsUser } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Utility to determine if User has privileges to create a reply in a channel
|
|
5
|
+
*
|
|
6
|
+
* @export
|
|
7
|
+
* @deprecated replace with canCreateReplyV2 for v2 discussions
|
|
8
|
+
* @param channel
|
|
9
|
+
* @param user
|
|
10
|
+
* @returns {boolean}
|
|
11
|
+
*/
|
|
12
|
+
export declare function canCreateReply(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IUser } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IChannel, IDiscussionsUser, IPost } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Utility to determine if User has privileges to delete a post
|
|
5
|
+
* @export
|
|
6
|
+
* @param post
|
|
7
|
+
* @param user
|
|
8
|
+
* @param channel
|
|
9
|
+
* @returns {boolean}
|
|
10
|
+
*/
|
|
11
|
+
export declare function canDeletePostV2(post: IPost, channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IUser } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IChannel, IDiscussionsUser, IPost } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Utility to determine if User has privileges to delete a post
|
|
5
|
+
* @deprecated replace with canDeletePostV2 for v2 discussions
|
|
6
|
+
* @export
|
|
7
|
+
* @param post
|
|
8
|
+
* @param user
|
|
9
|
+
* @param channel
|
|
10
|
+
* @returns {boolean}
|
|
11
|
+
*/
|
|
12
|
+
export declare function canDeletePost(post: IPost, channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IUser } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IChannel, IDiscussionsUser } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Utility to determine if User has privileges to modify the status of a post
|
|
5
|
+
* @param channel
|
|
6
|
+
* @param user
|
|
7
|
+
* @returns {boolean}
|
|
8
|
+
*/
|
|
9
|
+
export declare function canEditPostStatusV2(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IUser } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IChannel, IDiscussionsUser } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Utility to determine if User has privileges to modify the status of a post
|
|
5
|
+
* @export
|
|
6
|
+
* @deprecated replace with canEditPostStatusV2 for v2 discussions
|
|
7
|
+
* @param channel
|
|
8
|
+
* @param user
|
|
9
|
+
* @returns {boolean}
|
|
10
|
+
*/
|
|
11
|
+
export declare function canModifyPostStatus(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Utility to determine if User has privileges to modify the status of a post
|
|
14
|
+
* @export
|
|
15
|
+
* @deprecated replace with canEditPostStatusV2 for v2 discussions
|
|
16
|
+
* @param channel
|
|
17
|
+
* @param user
|
|
18
|
+
* @returns {boolean}
|
|
19
|
+
*/
|
|
20
|
+
export declare function canEditPostStatus(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IUser } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IChannel, IDiscussionsUser, IPost } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Utility to determine if User has privileges to modify a post
|
|
5
|
+
* @param post
|
|
6
|
+
* @param user
|
|
7
|
+
* @param channel
|
|
8
|
+
* @returns {boolean}
|
|
9
|
+
*/
|
|
10
|
+
export declare function canEditPostV2(post: IPost, user: IUser | IDiscussionsUser, channel: IChannel): boolean;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IUser } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IChannel, IDiscussionsUser, IPost } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Utility to determine if User has privileges to modify a post
|
|
5
|
+
* @export
|
|
6
|
+
* @deprecated replace with canEditPostV2 for v2 discussions
|
|
7
|
+
* @param post
|
|
8
|
+
* @param user
|
|
9
|
+
* @param channel
|
|
10
|
+
* @returns {boolean}
|
|
11
|
+
*/
|
|
12
|
+
export declare function canModifyPost(post: IPost, user: IUser | IDiscussionsUser, channel: IChannel): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Utility to determine if User has privileges to modify a post
|
|
15
|
+
* @export
|
|
16
|
+
* @deprecated replace with canEditPostV2 for v2 discussions
|
|
17
|
+
* @param post
|
|
18
|
+
* @param user
|
|
19
|
+
* @param channel
|
|
20
|
+
* @returns {boolean}
|
|
21
|
+
*/
|
|
22
|
+
export declare function canEditPost(post: IPost, user: IUser | IDiscussionsUser, channel: IChannel): boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { canCreatePost } from "./can-create-post";
|
|
2
|
+
export { canCreateReply } from "./can-create-reply";
|
|
3
|
+
export { canDeletePost } from "./can-delete-post";
|
|
4
|
+
export { canModifyPostStatus, canEditPostStatus } from "./can-edit-post-status";
|
|
5
|
+
export { canModifyPost, canEditPost } from "./can-edit-post";
|
|
6
|
+
export { parseDiscussionURI } from "./parse-discussion-uri";
|
|
7
|
+
export { parseMentionedUsers } from "./parse-mentioned-users";
|
|
8
|
+
export { canCreatePostV2 } from "./can-create-post-v2";
|
|
9
|
+
export { canCreateReplyV2 } from "./can-create-reply-v2";
|
|
10
|
+
export { canDeletePostV2 } from "./can-delete-post-v2";
|
|
11
|
+
export { canEditPostStatusV2 } from "./can-edit-post-status-v2";
|
|
12
|
+
export { canEditPostV2 } from "./can-edit-post-v2";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IDiscussionParams } from "../../types";
|
|
2
|
+
/**
|
|
3
|
+
* Utility that parses a discussion URI string into its component parts
|
|
4
|
+
*
|
|
5
|
+
* @export
|
|
6
|
+
* @param {string} discussion A discussion URI
|
|
7
|
+
* @return {string}
|
|
8
|
+
*/
|
|
9
|
+
export declare function parseDiscussionURI(discussion: string): IDiscussionParams;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IUser } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { PostReaction, IChannel, IDiscussionsUser } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Utility that determines whether a Channel allows a given PostReaction
|
|
5
|
+
* and whether the User has permissions to create it
|
|
6
|
+
*
|
|
7
|
+
* @export
|
|
8
|
+
* @param {IChannel} channel
|
|
9
|
+
* @param {PostReaction} value
|
|
10
|
+
* @return {*} {boolean}
|
|
11
|
+
*/
|
|
12
|
+
export declare function canCreateReactionV2(channel: IChannel, value: PostReaction, user?: IUser | IDiscussionsUser): boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IUser } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { PostReaction, IChannel, IDiscussionsUser } from "../../types";
|
|
3
|
+
/**
|
|
4
|
+
* Utility that determines whether a Channel allows a given PostReaction
|
|
5
|
+
* and whether the User has permissions to create it
|
|
6
|
+
*
|
|
7
|
+
* @export
|
|
8
|
+
* @deprecated replace with canCreateReactionV2 for v2 discussions
|
|
9
|
+
* @param {IChannel} channel
|
|
10
|
+
* @param {PostReaction} value
|
|
11
|
+
* @return {*} {boolean}
|
|
12
|
+
*/
|
|
13
|
+
export declare function canCreateReaction(channel: IChannel, value: PostReaction, user?: IUser | IDiscussionsUser): boolean;
|