@esri/hub-common 14.223.0 → 14.225.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/associations/index.js +0 -3
- package/dist/esm/associations/index.js.map +1 -1
- package/dist/esm/associations/types.js.map +1 -1
- package/dist/esm/content/_internal/ContentBusinessRules.js +0 -5
- package/dist/esm/content/_internal/ContentBusinessRules.js.map +1 -1
- package/dist/esm/content/hostedServiceUtils.js +0 -22
- package/dist/esm/content/hostedServiceUtils.js.map +1 -1
- package/dist/esm/core/HubItemEntity.js +0 -37
- package/dist/esm/core/HubItemEntity.js.map +1 -1
- package/dist/esm/core/_internal/deepContains.js +40 -31
- package/dist/esm/core/_internal/deepContains.js.map +1 -1
- package/dist/esm/core/behaviors/index.js +0 -1
- package/dist/esm/core/behaviors/index.js.map +1 -1
- package/dist/esm/core/catalogContains.js +115 -0
- package/dist/esm/core/catalogContains.js.map +1 -0
- package/dist/esm/core/deepCatalogContains.js +4 -6
- package/dist/esm/core/deepCatalogContains.js.map +1 -1
- package/dist/esm/core/getEntityTypeFromHubEntityType.js +10 -0
- package/dist/esm/core/getEntityTypeFromHubEntityType.js.map +1 -0
- package/dist/esm/core/getHubTypeFromItemType.js +14 -0
- package/dist/esm/core/getHubTypeFromItemType.js.map +1 -0
- package/dist/esm/core/index.js +3 -1
- package/dist/esm/core/index.js.map +1 -1
- package/dist/esm/core/parseContainmentPath.js +19 -0
- package/dist/esm/core/parseContainmentPath.js.map +1 -1
- package/dist/esm/core/types/IHubProject.js +0 -13
- package/dist/esm/core/types/IHubProject.js.map +1 -1
- package/dist/esm/downloads/getDownloadFormats.js +1 -1
- package/dist/esm/downloads/index.js +0 -1
- package/dist/esm/downloads/index.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/initiative-templates/HubInitiativeTemplate.js +4 -3
- package/dist/esm/initiative-templates/HubInitiativeTemplate.js.map +1 -1
- package/dist/esm/initiative-templates/edit.js +0 -11
- package/dist/esm/initiative-templates/edit.js.map +1 -1
- package/dist/esm/initiatives/HubInitiatives.js +9 -79
- package/dist/esm/initiatives/HubInitiatives.js.map +1 -1
- package/dist/esm/initiatives/_internal/computeProps.js +3 -0
- package/dist/esm/initiatives/_internal/computeProps.js.map +1 -1
- package/dist/esm/initiatives/_internal/getPropertyMap.js +0 -1
- package/dist/esm/initiatives/_internal/getPropertyMap.js.map +1 -1
- package/dist/esm/initiatives/defaults.js +1 -2
- package/dist/esm/initiatives/defaults.js.map +1 -1
- package/dist/esm/permissions/HubPermissionPolicies.js +0 -18
- package/dist/esm/permissions/HubPermissionPolicies.js.map +1 -1
- package/dist/esm/permissions/types/Permission.js +0 -7
- package/dist/esm/permissions/types/Permission.js.map +1 -1
- package/dist/esm/projects/_internal/computeProps.js +3 -0
- package/dist/esm/projects/_internal/computeProps.js.map +1 -1
- package/dist/esm/projects/defaults.js +3 -2
- package/dist/esm/projects/defaults.js.map +1 -1
- package/dist/esm/projects/fetch.js +0 -29
- package/dist/esm/projects/fetch.js.map +1 -1
- package/dist/esm/search/Catalog.js +26 -107
- package/dist/esm/search/Catalog.js.map +1 -1
- package/dist/esm/search/fetchEntityCatalog.js +65 -0
- package/dist/esm/search/fetchEntityCatalog.js.map +1 -0
- package/dist/esm/search/index.js +0 -1
- package/dist/esm/search/index.js.map +1 -1
- package/dist/esm/search/types/IHubCatalog.js.map +1 -1
- package/dist/esm/search/upgradeCatalogSchema.js +1 -1
- package/dist/esm/search/upgradeCatalogSchema.js.map +1 -1
- package/dist/esm/search/utils.js +1 -1
- package/dist/esm/sites/HubSite.js +3 -3
- package/dist/esm/sites/HubSite.js.map +1 -1
- package/dist/esm/sites/_internal/SiteBusinessRules.js +5 -0
- package/dist/esm/sites/_internal/SiteBusinessRules.js.map +1 -1
- package/dist/esm/sites/defaults.js +1 -2
- package/dist/esm/sites/defaults.js.map +1 -1
- package/dist/esm/sites/feed-configuration.js +4 -3
- package/dist/esm/sites/feed-configuration.js.map +1 -1
- package/dist/esm/sites/feeds/_internal/defaults.js +56 -0
- package/dist/esm/sites/feeds/_internal/defaults.js.map +1 -0
- package/dist/esm/sites/feeds/_internal/getMajorVersion.js +11 -0
- package/dist/esm/sites/feeds/_internal/getMajorVersion.js.map +1 -0
- package/dist/esm/sites/feeds/getFeedTemplate.js +25 -0
- package/dist/esm/sites/feeds/getFeedTemplate.js.map +1 -0
- package/dist/esm/sites/feeds/previewFeed.js +35 -0
- package/dist/esm/sites/feeds/previewFeed.js.map +1 -0
- package/dist/esm/sites/feeds/setFeedTemplate.js +20 -0
- package/dist/esm/sites/feeds/setFeedTemplate.js.map +1 -0
- package/dist/esm/sites/feeds/types.js +1 -0
- package/dist/esm/sites/feeds/types.js.map +1 -0
- package/dist/esm/sites/index.js +4 -0
- package/dist/esm/sites/index.js.map +1 -1
- package/dist/esm/utils/hubUserAppResources.js +0 -52
- package/dist/esm/utils/hubUserAppResources.js.map +1 -1
- package/dist/esm/utils/index.js +0 -1
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/node/associations/index.js +0 -3
- package/dist/node/associations/index.js.map +1 -1
- package/dist/node/associations/types.js.map +1 -1
- package/dist/node/content/_internal/ContentBusinessRules.js +0 -5
- package/dist/node/content/_internal/ContentBusinessRules.js.map +1 -1
- package/dist/node/content/hostedServiceUtils.js +1 -25
- package/dist/node/content/hostedServiceUtils.js.map +1 -1
- package/dist/node/core/HubItemEntity.js +0 -37
- package/dist/node/core/HubItemEntity.js.map +1 -1
- package/dist/node/core/_internal/deepContains.js +39 -30
- package/dist/node/core/_internal/deepContains.js.map +1 -1
- package/dist/node/core/behaviors/index.js +0 -1
- package/dist/node/core/behaviors/index.js.map +1 -1
- package/dist/node/core/catalogContains.js +119 -0
- package/dist/node/core/catalogContains.js.map +1 -0
- package/dist/node/core/deepCatalogContains.js +4 -6
- package/dist/node/core/deepCatalogContains.js.map +1 -1
- package/dist/node/core/getEntityTypeFromHubEntityType.js +14 -0
- package/dist/node/core/getEntityTypeFromHubEntityType.js.map +1 -0
- package/dist/node/core/getHubTypeFromItemType.js +18 -0
- package/dist/node/core/getHubTypeFromItemType.js.map +1 -0
- package/dist/node/core/index.js +3 -1
- package/dist/node/core/index.js.map +1 -1
- package/dist/node/core/parseContainmentPath.js +22 -1
- package/dist/node/core/parseContainmentPath.js.map +1 -1
- package/dist/node/core/types/IHubProject.js +0 -14
- package/dist/node/core/types/IHubProject.js.map +1 -1
- package/dist/node/downloads/getDownloadFormats.js +1 -1
- package/dist/node/downloads/index.js +0 -1
- package/dist/node/downloads/index.js.map +1 -1
- package/dist/node/index.js +1 -0
- package/dist/node/index.js.map +1 -1
- package/dist/node/initiative-templates/HubInitiativeTemplate.js +5 -4
- package/dist/node/initiative-templates/HubInitiativeTemplate.js.map +1 -1
- package/dist/node/initiative-templates/edit.js +1 -13
- package/dist/node/initiative-templates/edit.js.map +1 -1
- package/dist/node/initiatives/HubInitiatives.js +9 -82
- package/dist/node/initiatives/HubInitiatives.js.map +1 -1
- package/dist/node/initiatives/_internal/computeProps.js +3 -0
- package/dist/node/initiatives/_internal/computeProps.js.map +1 -1
- package/dist/node/initiatives/_internal/getPropertyMap.js +0 -1
- package/dist/node/initiatives/_internal/getPropertyMap.js.map +1 -1
- package/dist/node/initiatives/defaults.js +1 -2
- package/dist/node/initiatives/defaults.js.map +1 -1
- package/dist/node/permissions/HubPermissionPolicies.js +0 -18
- package/dist/node/permissions/HubPermissionPolicies.js.map +1 -1
- package/dist/node/permissions/types/Permission.js +0 -7
- package/dist/node/permissions/types/Permission.js.map +1 -1
- package/dist/node/projects/_internal/computeProps.js +3 -0
- package/dist/node/projects/_internal/computeProps.js.map +1 -1
- package/dist/node/projects/defaults.js +3 -2
- package/dist/node/projects/defaults.js.map +1 -1
- package/dist/node/projects/fetch.js +1 -31
- package/dist/node/projects/fetch.js.map +1 -1
- package/dist/node/search/Catalog.js +25 -106
- package/dist/node/search/Catalog.js.map +1 -1
- package/dist/node/search/fetchEntityCatalog.js +69 -0
- package/dist/node/search/fetchEntityCatalog.js.map +1 -0
- package/dist/node/search/index.js +0 -1
- package/dist/node/search/index.js.map +1 -1
- package/dist/node/search/types/IHubCatalog.js.map +1 -1
- package/dist/node/search/upgradeCatalogSchema.js +1 -1
- package/dist/node/search/upgradeCatalogSchema.js.map +1 -1
- package/dist/node/search/utils.js +1 -1
- package/dist/node/sites/HubSite.js +5 -5
- package/dist/node/sites/HubSite.js.map +1 -1
- package/dist/node/sites/_internal/SiteBusinessRules.js +5 -0
- package/dist/node/sites/_internal/SiteBusinessRules.js.map +1 -1
- package/dist/node/sites/defaults.js +1 -2
- package/dist/node/sites/defaults.js.map +1 -1
- package/dist/node/sites/feed-configuration.js +10 -9
- package/dist/node/sites/feed-configuration.js.map +1 -1
- package/dist/node/sites/feeds/_internal/defaults.js +60 -0
- package/dist/node/sites/feeds/_internal/defaults.js.map +1 -0
- package/dist/node/sites/feeds/_internal/getMajorVersion.js +15 -0
- package/dist/node/sites/feeds/_internal/getMajorVersion.js.map +1 -0
- package/dist/node/sites/feeds/getFeedTemplate.js +29 -0
- package/dist/node/sites/feeds/getFeedTemplate.js.map +1 -0
- package/dist/node/sites/feeds/previewFeed.js +39 -0
- package/dist/node/sites/feeds/previewFeed.js.map +1 -0
- package/dist/node/sites/feeds/setFeedTemplate.js +24 -0
- package/dist/node/sites/feeds/setFeedTemplate.js.map +1 -0
- package/dist/node/{core/behaviors/IWIthAssociationBehavior.js → sites/feeds/types.js} +1 -1
- package/dist/node/sites/feeds/types.js.map +1 -0
- package/dist/node/sites/index.js +4 -0
- package/dist/node/sites/index.js.map +1 -1
- package/dist/node/utils/hubUserAppResources.js +1 -57
- package/dist/node/utils/hubUserAppResources.js.map +1 -1
- package/dist/node/utils/index.js +0 -1
- package/dist/node/utils/index.js.map +1 -1
- package/dist/types/associations/index.d.ts +0 -3
- package/dist/types/associations/types.d.ts +0 -25
- package/dist/types/content/_fetch.d.ts +1 -1
- package/dist/types/content/_internal/ContentBusinessRules.d.ts +1 -1
- package/dist/types/content/hostedServiceUtils.d.ts +0 -14
- package/dist/types/core/HubItemEntity.d.ts +2 -31
- package/dist/types/core/_internal/deepContains.d.ts +3 -2
- package/dist/types/core/behaviors/IWithCatalogBehavior.d.ts +1 -1
- package/dist/types/core/behaviors/index.d.ts +0 -1
- package/dist/types/core/catalogContains.d.ts +11 -0
- package/dist/types/core/deepCatalogContains.d.ts +2 -2
- package/dist/types/core/getEntityTypeFromHubEntityType.d.ts +8 -0
- package/dist/types/core/getHubTypeFromItemType.d.ts +8 -0
- package/dist/types/core/index.d.ts +2 -1
- package/dist/types/core/parseContainmentPath.d.ts +14 -0
- package/dist/types/core/schemas/types.d.ts +0 -14
- package/dist/types/core/traits/IWithCatalog.d.ts +3 -9
- package/dist/types/core/types/IHubDiscussion.d.ts +2 -2
- package/dist/types/core/types/IHubEvent.d.ts +2 -2
- package/dist/types/core/types/IHubInitiative.d.ts +2 -3
- package/dist/types/core/types/IHubLocation.d.ts +1 -5
- package/dist/types/core/types/IHubProject.d.ts +2 -15
- package/dist/types/core/types/IHubSite.d.ts +2 -3
- package/dist/types/downloads/getDownloadFormats.d.ts +1 -1
- package/dist/types/downloads/index.d.ts +0 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/initiative-templates/HubInitiativeTemplate.d.ts +1 -1
- package/dist/types/initiative-templates/edit.d.ts +1 -10
- package/dist/types/initiatives/HubInitiatives.d.ts +1 -38
- package/dist/types/permissions/types/Permission.d.ts +1 -2
- package/dist/types/projects/fetch.d.ts +0 -17
- package/dist/types/search/Catalog.d.ts +9 -13
- package/dist/types/search/fetchEntityCatalog.d.ts +18 -0
- package/dist/types/search/index.d.ts +0 -1
- package/dist/types/search/types/IHubCatalog.d.ts +2 -0
- package/dist/types/search/types/types.d.ts +6 -1
- package/dist/types/search/utils.d.ts +1 -1
- package/dist/types/sites/HubSite.d.ts +1 -1
- package/dist/types/sites/_internal/SiteBusinessRules.d.ts +1 -1
- package/dist/types/sites/feed-configuration.d.ts +3 -0
- package/dist/types/sites/feeds/_internal/defaults.d.ts +5 -0
- package/dist/types/sites/feeds/_internal/getMajorVersion.d.ts +8 -0
- package/dist/types/sites/feeds/getFeedTemplate.d.ts +15 -0
- package/dist/types/sites/feeds/previewFeed.d.ts +19 -0
- package/dist/types/sites/feeds/setFeedTemplate.d.ts +17 -0
- package/dist/types/sites/feeds/types.d.ts +21 -0
- package/dist/types/sites/index.d.ts +4 -0
- package/dist/types/utils/hubUserAppResources.d.ts +0 -36
- package/dist/types/utils/index.d.ts +0 -1
- package/package.json +1 -1
- package/dist/esm/associations/addAssociation.js +0 -19
- package/dist/esm/associations/addAssociation.js.map +0 -1
- package/dist/esm/associations/listAssociations.js +0 -21
- package/dist/esm/associations/listAssociations.js.map +0 -1
- package/dist/esm/associations/removeAssociation.js +0 -20
- package/dist/esm/associations/removeAssociation.js.map +0 -1
- package/dist/esm/core/behaviors/IWIthAssociationBehavior.js +0 -1
- package/dist/esm/core/behaviors/IWIthAssociationBehavior.js.map +0 -1
- package/dist/esm/core/getEntityDefaultWorkspacePane.js +0 -17
- package/dist/esm/core/getEntityDefaultWorkspacePane.js.map +0 -1
- package/dist/esm/downloads/fetchDownloadFormats.js +0 -39
- package/dist/esm/downloads/fetchDownloadFormats.js.map +0 -1
- package/dist/esm/search/fetchCatalog.js +0 -56
- package/dist/esm/search/fetchCatalog.js.map +0 -1
- package/dist/esm/utils/sessionLocalStorage.js +0 -57
- package/dist/esm/utils/sessionLocalStorage.js.map +0 -1
- package/dist/node/associations/addAssociation.js +0 -23
- package/dist/node/associations/addAssociation.js.map +0 -1
- package/dist/node/associations/listAssociations.js +0 -25
- package/dist/node/associations/listAssociations.js.map +0 -1
- package/dist/node/associations/removeAssociation.js +0 -24
- package/dist/node/associations/removeAssociation.js.map +0 -1
- package/dist/node/core/behaviors/IWIthAssociationBehavior.js.map +0 -1
- package/dist/node/core/getEntityDefaultWorkspacePane.js +0 -20
- package/dist/node/core/getEntityDefaultWorkspacePane.js.map +0 -1
- package/dist/node/downloads/fetchDownloadFormats.js +0 -43
- package/dist/node/downloads/fetchDownloadFormats.js.map +0 -1
- package/dist/node/search/fetchCatalog.js +0 -60
- package/dist/node/search/fetchCatalog.js.map +0 -1
- package/dist/node/utils/sessionLocalStorage.js +0 -63
- package/dist/node/utils/sessionLocalStorage.js.map +0 -1
- package/dist/types/associations/addAssociation.d.ts +0 -12
- package/dist/types/associations/listAssociations.d.ts +0 -12
- package/dist/types/associations/removeAssociation.d.ts +0 -12
- package/dist/types/core/behaviors/IWIthAssociationBehavior.d.ts +0 -32
- package/dist/types/core/getEntityDefaultWorkspacePane.d.ts +0 -11
- package/dist/types/downloads/fetchDownloadFormats.d.ts +0 -9
- package/dist/types/search/fetchCatalog.d.ts +0 -10
- package/dist/types/utils/sessionLocalStorage.d.ts +0 -29
|
@@ -8,7 +8,7 @@ export declare const ContentDefaultFeatures: IFeatureFlags;
|
|
|
8
8
|
* These define the requirements any user must meet to perform related actions
|
|
9
9
|
* @private
|
|
10
10
|
*/
|
|
11
|
-
export declare const ContentPermissions: readonly ["hub:content:create", "hub:content:delete", "hub:content:edit", "hub:content:view", "hub:content:canChangeAccess", "hub:content:workspace", "hub:content:workspace:overview", "hub:content:workspace:dashboard", "hub:content:workspace:details", "hub:content:workspace:discussion", "hub:content:workspace:settings", "hub:content:workspace:settings:schedule", "hub:content:workspace:collaborators", "hub:content:manage", "hub:content:canRecordDownloadErrors", "hub:content:downloads:displayErrors", "
|
|
11
|
+
export declare const ContentPermissions: readonly ["hub:content:create", "hub:content:delete", "hub:content:edit", "hub:content:view", "hub:content:canChangeAccess", "hub:content:workspace", "hub:content:workspace:overview", "hub:content:workspace:dashboard", "hub:content:workspace:details", "hub:content:workspace:discussion", "hub:content:workspace:settings", "hub:content:workspace:settings:schedule", "hub:content:workspace:collaborators", "hub:content:manage", "hub:content:canRecordDownloadErrors", "hub:content:downloads:displayErrors", "hub:content:document:create"];
|
|
12
12
|
/**
|
|
13
13
|
* Content permission policies
|
|
14
14
|
* No need to specify license for permissions that are available to all licenses
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import { IFeatureServiceDefinition } from "@esri/arcgis-rest-feature-layer";
|
|
2
2
|
import { IItem } from "@esri/arcgis-rest-portal";
|
|
3
3
|
import { IHubEditableContent } from "../core/types/IHubEditableContent";
|
|
4
|
-
/**
|
|
5
|
-
* DEPRECATED: This will be removed in the next breaking version. Use "isHostedFeatureServiceMainItem" instead.
|
|
6
|
-
* Determines whether an item represents a hosted feature service
|
|
7
|
-
* @param item item to check
|
|
8
|
-
* @returns whether the item represents a hosted feature service
|
|
9
|
-
*/
|
|
10
|
-
export declare function isHostedFeatureServiceItem(item: IItem): boolean;
|
|
11
4
|
/**
|
|
12
5
|
* Determines whether an item represents the main item of a hosted feature service
|
|
13
6
|
* (i.e. the item that was created when the service was published, not an item that
|
|
@@ -20,13 +13,6 @@ export declare function isHostedFeatureServiceItem(item: IItem): boolean;
|
|
|
20
13
|
* @returns whether the item passes the hosted feature service check
|
|
21
14
|
*/
|
|
22
15
|
export declare function isHostedFeatureServiceMainItem(item: IItem): boolean;
|
|
23
|
-
/**
|
|
24
|
-
* DEPRECATED: This will be removed in the next breaking version Use "isHostedFeatureServiceMainEntity" instead
|
|
25
|
-
* Determines whether an entity represents a hosted feature service
|
|
26
|
-
* @param content content entity to check
|
|
27
|
-
* @returns
|
|
28
|
-
*/
|
|
29
|
-
export declare function isHostedFeatureServiceEntity(content: IHubEditableContent): boolean;
|
|
30
16
|
/**
|
|
31
17
|
* Determines whether an entity represents the main entity of a hosted feature service
|
|
32
18
|
* (i.e. the entity that was created when the service was published, not an entity that
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { IGroup } from "@esri/arcgis-rest-portal";
|
|
2
2
|
import { IArcGISContext } from "../ArcGISContext";
|
|
3
3
|
import { IPermissionAccessResponse, IEntityPermissionPolicy, Permission } from "../permissions";
|
|
4
|
-
import { IWithSharingBehavior, IWithStoreBehavior, IWithFeaturedImageBehavior, IWithPermissionBehavior
|
|
4
|
+
import { IWithSharingBehavior, IWithStoreBehavior, IWithFeaturedImageBehavior, IWithPermissionBehavior } from "./behaviors";
|
|
5
5
|
import { IWithThumbnailBehavior } from "./behaviors/IWithThumbnailBehavior";
|
|
6
6
|
import { IHubItemEntity } from "./types/IHubItemEntity";
|
|
7
7
|
import { SettableAccessLevel } from "./types/types";
|
|
8
8
|
import { IWithDiscussionsBehavior } from "./behaviors/IWithDiscussionsBehavior";
|
|
9
9
|
import { IWithFollowersBehavior } from "./behaviors/IWithFollowersBehavior";
|
|
10
|
-
import { AssociationType, IAssociationInfo } from "../associations/types";
|
|
11
10
|
/**
|
|
12
11
|
* Base class for all Hub Entities backed by items
|
|
13
12
|
*/
|
|
14
|
-
export declare abstract class HubItemEntity<T extends IHubItemEntity> implements IWithStoreBehavior<T>, IWithSharingBehavior, IWithThumbnailBehavior, IWithFeaturedImageBehavior, IWithPermissionBehavior, IWithDiscussionsBehavior, IWithFollowersBehavior
|
|
13
|
+
export declare abstract class HubItemEntity<T extends IHubItemEntity> implements IWithStoreBehavior<T>, IWithSharingBehavior, IWithThumbnailBehavior, IWithFeaturedImageBehavior, IWithPermissionBehavior, IWithDiscussionsBehavior, IWithFollowersBehavior {
|
|
15
14
|
protected context: IArcGISContext;
|
|
16
15
|
protected entity: T;
|
|
17
16
|
protected isDestroyed: boolean;
|
|
@@ -158,32 +157,4 @@ export declare abstract class HubItemEntity<T extends IHubItemEntity> implements
|
|
|
158
157
|
* @param isDiscussable whether to enable or disable discussions
|
|
159
158
|
*/
|
|
160
159
|
updateIsDiscussable(isDiscussable: boolean): void;
|
|
161
|
-
/**
|
|
162
|
-
* ** DEPRECATED: This will be removed in the next
|
|
163
|
-
* breaking version **
|
|
164
|
-
*
|
|
165
|
-
* Return a list of IAssociationInfo objects representing
|
|
166
|
-
* the associations this entity has, to the specified type
|
|
167
|
-
* @param type
|
|
168
|
-
* @returns
|
|
169
|
-
*/
|
|
170
|
-
listAssociations(type: AssociationType): IAssociationInfo[];
|
|
171
|
-
/**
|
|
172
|
-
* ** DEPRECATED: please use requestAssociation instead.
|
|
173
|
-
* This will be removed in the next breaking version **
|
|
174
|
-
*
|
|
175
|
-
* Add an association to this entity
|
|
176
|
-
* @param info
|
|
177
|
-
* @returns
|
|
178
|
-
*/
|
|
179
|
-
addAssociation(info: IAssociationInfo): void;
|
|
180
|
-
/**
|
|
181
|
-
* ** DEPRECATED: please use breakAssociation instead.
|
|
182
|
-
* This will be removed in the next breaking version **
|
|
183
|
-
*
|
|
184
|
-
* Remove an association from this entity
|
|
185
|
-
* @param info
|
|
186
|
-
* @returns
|
|
187
|
-
*/
|
|
188
|
-
removeAssociation(info: IAssociationInfo): void;
|
|
189
160
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IArcGISContext } from "../../ArcGISContext";
|
|
2
|
-
import {
|
|
2
|
+
import { IContainsResponse, IDeepCatalogInfo } from "../../search";
|
|
3
|
+
import { HubEntityType } from "../types/HubEntityType";
|
|
3
4
|
/**
|
|
4
5
|
* Convert a path string into an array of `IDeepCatalogInfo` objects.
|
|
5
6
|
* e.g. /initiatives/00a/projects/00b => [{entityType: "item", id: "00a"}, {entityType: "item", id: "00b"}]
|
|
@@ -31,4 +32,4 @@ export declare function pathToCatalogInfo(path: string): IDeepCatalogInfo[];
|
|
|
31
32
|
* @param options
|
|
32
33
|
* @returns
|
|
33
34
|
*/
|
|
34
|
-
export declare function deepContains(identifier: string,
|
|
35
|
+
export declare function deepContains(identifier: string, hubEntityType: HubEntityType, hierarchy: IDeepCatalogInfo[], context: IArcGISContext): Promise<IContainsResponse>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IHubCatalog } from "../search/types/IHubCatalog";
|
|
2
|
+
import { IContainsOptions, IContainsResponse } from "../search/types/types";
|
|
3
|
+
import { IArcGISContext } from "../ArcGISContext";
|
|
4
|
+
/**
|
|
5
|
+
* Given an identifier and a catalog, check if the catalog contains the identifier.
|
|
6
|
+
* Optionally, pass in the
|
|
7
|
+
* @param identifier
|
|
8
|
+
* @param catalog
|
|
9
|
+
* @param options
|
|
10
|
+
*/
|
|
11
|
+
export declare function catalogContains(identifier: string, catalog: IHubCatalog, context: IArcGISContext, options?: IContainsOptions): Promise<IContainsResponse>;
|
|
@@ -6,9 +6,9 @@ import { HubEntityType } from "./types/HubEntityType";
|
|
|
6
6
|
* Check that a specific entity is contained within a hierarchy of catalogs
|
|
7
7
|
* @param identifier id or slug of the entity to check
|
|
8
8
|
* @param hubEntityType Entity type of the identifier
|
|
9
|
-
* @param path
|
|
9
|
+
* @param path definition of the containment hierarchy /site/00c/projects/cc1 etc
|
|
10
10
|
* @param context
|
|
11
|
-
* @param rootCatalog root level catalog to start checking from
|
|
11
|
+
* @param rootCatalog Optional, root level catalog to start checking from (typically the site)
|
|
12
12
|
* @returns
|
|
13
13
|
*/
|
|
14
14
|
export declare function deepCatalogContains(identifier: string, hubEntityType: HubEntityType, path: string, context: IArcGISContext, rootCatalog?: IHubCatalog): Promise<IContainsResponse>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EntityType } from "../search/types/IHubCatalog";
|
|
2
|
+
import { HubEntityType } from "./types/HubEntityType";
|
|
3
|
+
/**
|
|
4
|
+
* Convert from a Hub Entity Type (e.g. "site") to an EntityType (e.g. "item")
|
|
5
|
+
* @param type
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare function getEntityTypeFromHubEntityType(type: HubEntityType): EntityType;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HubEntityType } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Given an item type, return its HubEntityType
|
|
4
|
+
* Simple wrapper over the poorly named `getTypeFromEntity` function
|
|
5
|
+
* @param itemType
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare function getHubTypeFromItemType(itemType: string): HubEntityType;
|
|
@@ -3,7 +3,6 @@ export * from "./types";
|
|
|
3
3
|
export * from "./behaviors";
|
|
4
4
|
export * from "./schemas";
|
|
5
5
|
export * from "./fetchHubEntity";
|
|
6
|
-
export * from "./getEntityDefaultWorkspacePane";
|
|
7
6
|
export * from "./getTypeFromEntity";
|
|
8
7
|
export * from "./getTypesFromEntityType";
|
|
9
8
|
export * from "./getRelativeWorkspaceUrl";
|
|
@@ -14,3 +13,5 @@ export * from "./shareEntityWithGroups";
|
|
|
14
13
|
export * from "./unshareEntityWithGroups";
|
|
15
14
|
export * from "./getEntityGroups";
|
|
16
15
|
export * from "./getEntityThumbnailUrl";
|
|
16
|
+
export * from "./getHubTypeFromItemType";
|
|
17
|
+
export * from "./getEntityTypeFromHubEntityType";
|
|
@@ -4,6 +4,20 @@ import { HubEntityType } from "./types/HubEntityType";
|
|
|
4
4
|
* Mapping of path segments to entity types.
|
|
5
5
|
*/
|
|
6
6
|
export declare const pathMap: Record<string, HubEntityType>;
|
|
7
|
+
/**
|
|
8
|
+
* Given a HubEntityType, return the path segment for that type.
|
|
9
|
+
* e.g. "site" -> "sites", "page" -> "pages", "content" -> "content"
|
|
10
|
+
* @param type
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
export declare function getPathForHubEntityType(type: HubEntityType): string;
|
|
14
|
+
/**
|
|
15
|
+
* Given a path segment, return the HubEntityType for that path.
|
|
16
|
+
* e.g. "sites" -> "site", "pages" -> "page", "content" -> "content"
|
|
17
|
+
* @param path
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
20
|
+
export declare function getHubEntityTypeFromPath(path: string): HubEntityType;
|
|
7
21
|
/**
|
|
8
22
|
* @internal
|
|
9
23
|
* Parsed path object, with validation information.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { JSONSchema } from "json-schema-typed";
|
|
2
|
-
import Ajv from "ajv";
|
|
3
2
|
import { CardEditorOptions, EntityEditorOptions } from "./internal/EditorOptions";
|
|
4
3
|
import { IArcGISContext } from "../../ArcGISContext";
|
|
5
4
|
import { HubActionLink } from "../types";
|
|
@@ -113,19 +112,6 @@ export interface IChangeEventDetail {
|
|
|
113
112
|
};
|
|
114
113
|
schema?: IConfigurationSchema;
|
|
115
114
|
}
|
|
116
|
-
/**
|
|
117
|
-
* **DEPRECATED:** this should not have been hoisted
|
|
118
|
-
* to hub.js and should live in opendata-ui. It is now
|
|
119
|
-
* duplicated there, and this interface should be removed
|
|
120
|
-
* during the next breaking change
|
|
121
|
-
*
|
|
122
|
-
* Note: once removed, we should also be able to remove
|
|
123
|
-
* ajv as a dependency in this repo
|
|
124
|
-
*/
|
|
125
|
-
export interface IValidationResult {
|
|
126
|
-
valid: boolean;
|
|
127
|
-
errors?: Ajv.ErrorObject[];
|
|
128
|
-
}
|
|
129
115
|
export interface IUiSchemaElement {
|
|
130
116
|
type: string;
|
|
131
117
|
id?: string;
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import { IHubCatalog } from "../../search";
|
|
2
|
+
/**
|
|
3
|
+
* Expose a the content catalog on an entity
|
|
4
|
+
*/
|
|
2
5
|
export interface IWithCatalog {
|
|
3
6
|
/**
|
|
4
7
|
* Catalog
|
|
5
8
|
*/
|
|
6
9
|
catalog: IHubCatalog;
|
|
7
10
|
}
|
|
8
|
-
/**
|
|
9
|
-
* Expose a set of catalogs on an entity
|
|
10
|
-
*/
|
|
11
|
-
export interface IWithCatalogs {
|
|
12
|
-
/**
|
|
13
|
-
* Catalogs
|
|
14
|
-
*/
|
|
15
|
-
catalogs: IHubCatalog[];
|
|
16
|
-
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IWithCatalog } from "../traits/IWithCatalog";
|
|
2
2
|
import { IWithPermissions } from "../traits/IWithPermissions";
|
|
3
3
|
import { IWithSlug } from "../traits/IWithSlug";
|
|
4
4
|
import { IHubItemEntity, IHubItemEntityEditor } from "./IHubItemEntity";
|
|
@@ -6,6 +6,6 @@ import { IHubItemEntity, IHubItemEntityEditor } from "./IHubItemEntity";
|
|
|
6
6
|
* DRAFT: Under development and more properties will likely be added
|
|
7
7
|
* @internal
|
|
8
8
|
*/
|
|
9
|
-
export interface IHubDiscussion extends IHubItemEntity, IWithSlug,
|
|
9
|
+
export interface IHubDiscussion extends IHubItemEntity, IWithSlug, IWithCatalog, IWithPermissions {
|
|
10
10
|
}
|
|
11
11
|
export declare type IHubDiscussionEditor = IHubItemEntityEditor<IHubDiscussion> & {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HubEventAttendanceType, HubEventCapacityType } from "../../events/types";
|
|
2
|
-
import {
|
|
2
|
+
import { IWithCatalog } from "../traits/IWithCatalog";
|
|
3
3
|
import { IWithPermissions } from "../traits/IWithPermissions";
|
|
4
4
|
import { IWithSlug } from "../traits/IWithSlug";
|
|
5
5
|
import { IHubItemEntity, IHubItemEntityEditor } from "./IHubItemEntity";
|
|
@@ -7,7 +7,7 @@ import { IHubItemEntity, IHubItemEntityEditor } from "./IHubItemEntity";
|
|
|
7
7
|
* DRAFT: Under development and more properties will likely be added
|
|
8
8
|
* @internal
|
|
9
9
|
*/
|
|
10
|
-
export interface IHubEvent extends IHubItemEntity, IWithPermissions, IWithSlug,
|
|
10
|
+
export interface IHubEvent extends IHubItemEntity, IWithPermissions, IWithSlug, IWithCatalog {
|
|
11
11
|
/**
|
|
12
12
|
* True when users can be registered to attend the event
|
|
13
13
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IWithCatalog
|
|
1
|
+
import { IWithCatalog } from "../traits/IWithCatalog";
|
|
2
2
|
import { IWithMetrics } from "../traits/IWithMetrics";
|
|
3
3
|
import { IWithPermissions } from "../traits/IWithPermissions";
|
|
4
4
|
import { IWithSlug } from "../traits/IWithSlug";
|
|
@@ -8,7 +8,6 @@ import { IHubItemEntity, IHubItemEntityEditor } from "./IHubItemEntity";
|
|
|
8
8
|
* DRAFT: Under development and more properties will likely be added
|
|
9
9
|
* @internal
|
|
10
10
|
*/
|
|
11
|
-
export interface IHubInitiative extends IHubItemEntity, IWithSlug, IWithCatalog,
|
|
12
|
-
IWithCatalogs, IWithMetrics, IWithPermissions, IWithStatus {
|
|
11
|
+
export interface IHubInitiative extends IHubItemEntity, IWithSlug, IWithCatalog, IWithMetrics, IWithPermissions, IWithStatus {
|
|
13
12
|
}
|
|
14
13
|
export declare type IHubInitiativeEditor = IHubItemEntityEditor<IHubInitiative> & {};
|
|
@@ -10,11 +10,7 @@ export interface IHubLocation {
|
|
|
10
10
|
spatialReference?: ISpatialReference;
|
|
11
11
|
extent?: number[][];
|
|
12
12
|
geometries?: Array<Partial<__esri.Geometry>>;
|
|
13
|
-
|
|
14
|
-
center?: number[];
|
|
15
|
-
orgSpatialReference?: ISpatialReference;
|
|
16
|
-
graphic?: any;
|
|
17
|
-
geoJson?: any;
|
|
13
|
+
/** The name of the location */
|
|
18
14
|
name?: string;
|
|
19
15
|
}
|
|
20
16
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IWithCatalog
|
|
1
|
+
import { IWithCatalog } from "../traits/IWithCatalog";
|
|
2
2
|
import { IWithLayout } from "../traits/IWithLayout";
|
|
3
3
|
import { IWithMetrics } from "../traits/IWithMetrics";
|
|
4
4
|
import { IWithPermissions } from "../traits/IWithPermissions";
|
|
@@ -9,8 +9,7 @@ import { IHubItemEntity, IHubItemEntityEditor } from "./IHubItemEntity";
|
|
|
9
9
|
/**
|
|
10
10
|
* Defines the properties of a Hub Project object
|
|
11
11
|
*/
|
|
12
|
-
export interface IHubProject extends IHubItemEntity, IWithSlug, IWithCatalog,
|
|
13
|
-
IWithCatalogs, IWithLayout, IWithMetrics, IWithPermissions, IWithEvents, IWithContent, IWithStatus {
|
|
12
|
+
export interface IHubProject extends IHubItemEntity, IWithSlug, IWithCatalog, IWithLayout, IWithMetrics, IWithPermissions, IWithEvents, IWithContent, IWithStatus {
|
|
14
13
|
}
|
|
15
14
|
/**
|
|
16
15
|
* This type redefines the IHubProject interface in such a way
|
|
@@ -19,15 +18,3 @@ IWithCatalogs, IWithLayout, IWithMetrics, IWithPermissions, IWithEvents, IWithCo
|
|
|
19
18
|
export declare type IHubProjectEditor = IHubItemEntityEditor<IHubProject> & {
|
|
20
19
|
_groups?: string[];
|
|
21
20
|
};
|
|
22
|
-
/**
|
|
23
|
-
* @internal
|
|
24
|
-
* *** DEPRECATED ***
|
|
25
|
-
* This is deprecated and will be removed during our next planned
|
|
26
|
-
* breaking change. Please use HubEntityStatus instead
|
|
27
|
-
*/
|
|
28
|
-
export declare enum PROJECT_STATUSES {
|
|
29
|
-
notStarted = "notStarted",
|
|
30
|
-
inProgress = "inProgress",
|
|
31
|
-
onHold = "onHold",
|
|
32
|
-
complete = "complete"
|
|
33
|
-
}
|
|
@@ -2,7 +2,7 @@ import { IExtent } from "@esri/arcgis-rest-feature-layer";
|
|
|
2
2
|
import { IWithVersioningBehavior } from "../behaviors";
|
|
3
3
|
import { IHubItemEntity, IHubItemEntityEditor } from "./IHubItemEntity";
|
|
4
4
|
import { IWithSlug } from "../traits/IWithSlug";
|
|
5
|
-
import { IWithCatalog
|
|
5
|
+
import { IWithCatalog } from "../traits/IWithCatalog";
|
|
6
6
|
import { IWithLayout } from "../traits/IWithLayout";
|
|
7
7
|
import { IWithPermissions } from "../traits/IWithPermissions";
|
|
8
8
|
interface IUrlProperties {
|
|
@@ -31,8 +31,7 @@ export interface IHubSiteUrlInfo extends IUrlProperties {
|
|
|
31
31
|
* DRAFT: Under development and more properties will likely be added
|
|
32
32
|
* @internal
|
|
33
33
|
*/
|
|
34
|
-
export interface IHubSite extends IHubItemEntity, IWithSlug, IWithCatalog,
|
|
35
|
-
IWithCatalogs, IWithLayout, IWithPermissions, IWithVersioningBehavior, IUrlProperties {
|
|
34
|
+
export interface IHubSite extends IHubItemEntity, IWithSlug, IWithCatalog, IWithLayout, IWithPermissions, IWithVersioningBehavior, IUrlProperties {
|
|
36
35
|
/**
|
|
37
36
|
* Array of minimal page objects
|
|
38
37
|
*/
|
|
@@ -3,7 +3,7 @@ import { IDownloadFormat, IFetchDownloadFormatsOptions } from "./types";
|
|
|
3
3
|
* Gets available download formats / additional resources for the given entity in the order they have been configured.
|
|
4
4
|
* If a format has been configured to be hidden, it will not be included in the results.
|
|
5
5
|
*
|
|
6
|
-
* @param options options to refine / filter the results of the
|
|
6
|
+
* @param options options to refine / filter the results of the getDownloadFormats operation
|
|
7
7
|
* @returns The available download formats and additional resources
|
|
8
8
|
*/
|
|
9
9
|
export declare function getDownloadFormats(options: IFetchDownloadFormatsOptions): IDownloadFormat[];
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export * from "./build-existing-exports-portal-query";
|
|
2
2
|
export * from "./types";
|
|
3
3
|
export * from "./fetchDownloadFile";
|
|
4
|
-
export * from "./fetchDownloadFormats";
|
|
5
4
|
export * from "./canUseCreateReplica";
|
|
6
5
|
export * from "./canUseHubDownloadSystem";
|
|
7
6
|
export * from "./canUseHubDownloadApi";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -49,6 +49,7 @@ export * from "./search/getPredicateValues";
|
|
|
49
49
|
export * from "./core/hubHistory";
|
|
50
50
|
export * from "./core/deepCatalogContains";
|
|
51
51
|
export * from "./core/parseContainmentPath";
|
|
52
|
+
export * from "./core/catalogContains";
|
|
52
53
|
import OperationStack from "./OperationStack";
|
|
53
54
|
import OperationError from "./OperationError";
|
|
54
55
|
import HubError from "./HubError";
|
|
@@ -3,7 +3,7 @@ import { IHubInitiativeTemplate, IWithCatalogBehavior, IWithCardBehavior, IConve
|
|
|
3
3
|
import { IEditorConfig } from "../core/schemas/types";
|
|
4
4
|
import { IWithEditorBehavior } from "../core/behaviors/IWithEditorBehavior";
|
|
5
5
|
import { IArcGISContext } from "..";
|
|
6
|
-
import { Catalog } from "../search";
|
|
6
|
+
import { Catalog } from "../search/Catalog";
|
|
7
7
|
import { InitiativeTemplateEditorType } from "./_internal/InitiativeTemplateSchema";
|
|
8
8
|
/**
|
|
9
9
|
* Hub Initiative Template Class
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { IUserRequestOptions } from "@esri/arcgis-rest-auth";
|
|
2
|
-
import {
|
|
3
|
-
import { IHubInitiativeTemplate, IHubInitiativeTemplateEditor } from "../core/types/IHubInitiativeTemplate";
|
|
2
|
+
import { IHubInitiativeTemplate } from "../core/types/IHubInitiativeTemplate";
|
|
4
3
|
/**
|
|
5
4
|
* @private
|
|
6
5
|
* Create a new Hub Initiative Template item
|
|
@@ -9,14 +8,6 @@ import { IHubInitiativeTemplate, IHubInitiativeTemplateEditor } from "../core/ty
|
|
|
9
8
|
* @returns
|
|
10
9
|
*/
|
|
11
10
|
export declare function createInitiativeTemplate(partialInitiativeTemplate: Partial<IHubInitiativeTemplate>, requestOptions: IUserRequestOptions): Promise<IHubInitiativeTemplate>;
|
|
12
|
-
/**
|
|
13
|
-
* DEPRECATED: just use editorToEntity instead
|
|
14
|
-
* Convert an IHubInitiativeTemplateEditor back to an IHubInitiativeTemplate
|
|
15
|
-
* @param editor
|
|
16
|
-
* @param portal
|
|
17
|
-
* @returns
|
|
18
|
-
*/
|
|
19
|
-
export declare function editorToInitiativeTemplate(editor: IHubInitiativeTemplateEditor, portal: IPortal): IHubInitiativeTemplate;
|
|
20
11
|
/**
|
|
21
12
|
* @private
|
|
22
13
|
* Update a Hub Initiative Template
|
|
@@ -3,7 +3,7 @@ import { IHubRequestOptions, IHubInitiativeEditor } from "../index";
|
|
|
3
3
|
import { IQuery } from "../search/types/IHubCatalog";
|
|
4
4
|
import { IItem } from "@esri/arcgis-rest-portal";
|
|
5
5
|
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
6
|
-
import {
|
|
6
|
+
import { IHubInitiative } from "../core/types";
|
|
7
7
|
import { IHubSearchResult } from "../search";
|
|
8
8
|
import { IArcGISContext } from "../ArcGISContext";
|
|
9
9
|
/**
|
|
@@ -62,43 +62,6 @@ export declare function convertItemToInitiative(item: IItem, requestOptions: IRe
|
|
|
62
62
|
* @returns
|
|
63
63
|
*/
|
|
64
64
|
export declare function enrichInitiativeSearchResult(item: IItem, include: string[], requestOptions: IHubRequestOptions): Promise<IHubSearchResult>;
|
|
65
|
-
/**
|
|
66
|
-
* ** DEPRECATED: Please use the association methods directly.
|
|
67
|
-
* This will be removed in the next breaking version **
|
|
68
|
-
*
|
|
69
|
-
* Fetch the Projects that are "Accepted" with an Initiative.
|
|
70
|
-
* This is a subset of the "Associated" projects, limited
|
|
71
|
-
* to those included in the Initiative's Catalog.
|
|
72
|
-
* @param initiative
|
|
73
|
-
* @param requestOptions
|
|
74
|
-
* @param query: Optional `IQuery` to further filter the results
|
|
75
|
-
* @returns
|
|
76
|
-
*/
|
|
77
|
-
export declare function fetchAcceptedProjects(initiative: IHubInitiative, requestOptions: IHubRequestOptions, query?: IQuery): Promise<IEntityInfo[]>;
|
|
78
|
-
/**
|
|
79
|
-
* ** DEPRECATED: Please use the association methods directly.
|
|
80
|
-
* This will be removed in the next breaking version **
|
|
81
|
-
*
|
|
82
|
-
* Fetch the Projects that are "Associated" to the Initiative but are not
|
|
83
|
-
* "Accepted", meaning they have the keyword but are not included in the Initiative's Catalog.
|
|
84
|
-
* This is how we can get the list of Projects awaiting Acceptance
|
|
85
|
-
* @param initiative
|
|
86
|
-
* @param requestOptions
|
|
87
|
-
* @param query
|
|
88
|
-
* @returns
|
|
89
|
-
*/
|
|
90
|
-
export declare function fetchPendingProjects(initiative: IHubInitiative, requestOptions: IHubRequestOptions, query?: IQuery): Promise<IEntityInfo[]>;
|
|
91
|
-
/**
|
|
92
|
-
* ** DEPRECATED: Please use the association methods directly.
|
|
93
|
-
* This will be removed in the next breaking version **
|
|
94
|
-
*
|
|
95
|
-
* Associated projects are those with the Initiative id in the typekeywords
|
|
96
|
-
* and is included in the Initiative's catalog.
|
|
97
|
-
* This is passed into the Gallery showing "Approved Projects"
|
|
98
|
-
* @param initiative
|
|
99
|
-
* @returns
|
|
100
|
-
*/
|
|
101
|
-
export declare function getAcceptedProjectsQuery(initiative: IHubInitiative): IQuery;
|
|
102
65
|
/**
|
|
103
66
|
* ** DEPRECATED: Please use the association methods directly.
|
|
104
67
|
* This will be removed in the next breaking version **
|
|
@@ -16,12 +16,11 @@ import { UserPermissions } from "../../users/_internal/UserBusinessRules";
|
|
|
16
16
|
* It's critical that the arrays defined in the modules use `as const`
|
|
17
17
|
* otherwise Permission devolves into just a string type
|
|
18
18
|
*/
|
|
19
|
-
declare const TempPermissions: string[];
|
|
20
19
|
declare const SystemPermissions: string[];
|
|
21
20
|
/**
|
|
22
21
|
* Defines the possible values for Permissions
|
|
23
22
|
*/
|
|
24
|
-
export declare type Permission = (typeof SitePermissions)[number] | (typeof ProjectPermissions)[number] | (typeof InitiativePermissions)[number] | (typeof ContentPermissions)[number] | (typeof GroupPermissions)[number] | (typeof PagePermissions)[number] | (typeof PlatformPermissions)[number] | (typeof
|
|
23
|
+
export declare type Permission = (typeof SitePermissions)[number] | (typeof ProjectPermissions)[number] | (typeof InitiativePermissions)[number] | (typeof ContentPermissions)[number] | (typeof GroupPermissions)[number] | (typeof PagePermissions)[number] | (typeof PlatformPermissions)[number] | (typeof DiscussionPermissions)[number] | (typeof InitiativeTemplatePermissions)[number] | (typeof TemplatePermissions)[number] | (typeof SystemPermissions)[number] | (typeof SurveyPermissions)[number] | (typeof EventPermissions)[number] | (typeof UserPermissions)[number];
|
|
25
24
|
/**
|
|
26
25
|
* Validate a Permission
|
|
27
26
|
* @param permission
|
|
@@ -2,7 +2,6 @@ import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
|
2
2
|
import { IItem } from "@esri/arcgis-rest-portal";
|
|
3
3
|
import { IHubProject } from "../core/types";
|
|
4
4
|
import { IHubSearchResult } from "../search";
|
|
5
|
-
import { IQuery } from "../search/types/IHubCatalog";
|
|
6
5
|
import { IHubRequestOptions } from "../types";
|
|
7
6
|
/**
|
|
8
7
|
* @private
|
|
@@ -29,19 +28,3 @@ export declare function convertItemToProject(item: IItem, requestOptions: IReque
|
|
|
29
28
|
* @returns
|
|
30
29
|
*/
|
|
31
30
|
export declare function enrichProjectSearchResult(item: IItem, include: string[], requestOptions: IHubRequestOptions): Promise<IHubSearchResult>;
|
|
32
|
-
/**
|
|
33
|
-
* ** DEPRECATED: Please use the association methods directly.
|
|
34
|
-
* This will be removed in the next breaking version **
|
|
35
|
-
*
|
|
36
|
-
* Get a query that will fetch all the initiatives which the project has
|
|
37
|
-
* chosen to connect to. If project has not defined any associations
|
|
38
|
-
* to any Initiatives, will return `null`.
|
|
39
|
-
* Currently, we have not implemented a means to get the list of initiatives that have
|
|
40
|
-
* "Accepted" the Project via inclusion in it's catalog.
|
|
41
|
-
*
|
|
42
|
-
* If needed, this could be done by getting all the groups the project is shared into
|
|
43
|
-
* then cross-walking that into the catalogs of all the Associated Initiatives
|
|
44
|
-
* @param project
|
|
45
|
-
* @returns
|
|
46
|
-
*/
|
|
47
|
-
export declare function getAssociatedInitiativesQuery(project: IHubProject): IQuery;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IArcGISContext } from "../ArcGISContext";
|
|
2
|
+
import { HubEntityType } from "../core";
|
|
2
3
|
import { Collection } from "./Collection";
|
|
3
4
|
import { EntityType, ISearchResponseHash, IContainsOptions, IContainsResponse, IHubSearchOptions, IHubSearchResponse, IHubSearchResult, ICatalogScope, IHubCatalog, IQuery, IFilter, IHubCollection } from "./types";
|
|
4
5
|
/**
|
|
@@ -15,16 +16,17 @@ export declare class Catalog implements IHubCatalog {
|
|
|
15
16
|
private _containsCache;
|
|
16
17
|
private constructor();
|
|
17
18
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* '''
|
|
22
|
-
*
|
|
23
|
-
* @param identifier
|
|
19
|
+
* Fetch a catalog
|
|
20
|
+
* At this point, it returns the `.catalog` property from the entity
|
|
21
|
+
* @param identifier url, guid, cuid
|
|
24
22
|
* @param context
|
|
23
|
+
* @param options is possible, pass the hubEntityType to improve fetching performance
|
|
25
24
|
* @returns
|
|
26
25
|
*/
|
|
27
|
-
static init(identifier: string, context?: IArcGISContext
|
|
26
|
+
static init(identifier: string, context?: IArcGISContext, options?: {
|
|
27
|
+
hubEntityType: HubEntityType;
|
|
28
|
+
prop: string;
|
|
29
|
+
}): Promise<Catalog>;
|
|
28
30
|
/**
|
|
29
31
|
* Create a Catalog instance from a Catalog Definition Json object
|
|
30
32
|
* @param json
|
|
@@ -118,12 +120,6 @@ export declare class Catalog implements IHubCatalog {
|
|
|
118
120
|
* @returns
|
|
119
121
|
*/
|
|
120
122
|
searchItems(query: string | IQuery, options?: IHubSearchOptions): Promise<IHubSearchResponse<IHubSearchResult>>;
|
|
121
|
-
/**
|
|
122
|
-
* Does the Catalog contain a specific piece of content?
|
|
123
|
-
* @param identifier id or slug of the content
|
|
124
|
-
* @param options entityType if known; otherwise will execute one search for each scope
|
|
125
|
-
* @returns
|
|
126
|
-
*/
|
|
127
123
|
contains(identifier: string, options: IContainsOptions): Promise<IContainsResponse>;
|
|
128
124
|
/**
|
|
129
125
|
* Search for Groups
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IArcGISContext } from "../ArcGISContext";
|
|
2
|
+
import { IHubCatalog } from "./types/IHubCatalog";
|
|
3
|
+
/**
|
|
4
|
+
* Fetch a Catalog for an entity.
|
|
5
|
+
* This function fetches the entity and returns the `.catalog` property
|
|
6
|
+
* However, other properties can be fetched by passing the name of the property
|
|
7
|
+
* in the `prop` option.
|
|
8
|
+
* Additionally, passing the `hubEntityType` option provide a performance boost
|
|
9
|
+
* by skipping the fetch of the backing Item, then fetching the entity.
|
|
10
|
+
* @param identifier
|
|
11
|
+
* @param context
|
|
12
|
+
* @param options { hubEntityType?: string; prop: string }
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
export declare function fetchEntityCatalog(identifier: string, context: IArcGISContext, options?: {
|
|
16
|
+
hubEntityType?: string;
|
|
17
|
+
prop: string;
|
|
18
|
+
}): Promise<IHubCatalog>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { WellKnownCollection } from "../wellKnownCatalog";
|
|
2
|
+
export declare type CatalogType = "content" | "exclusion";
|
|
2
3
|
export interface IHubCatalog {
|
|
3
4
|
/**
|
|
4
5
|
* Title for the Gallery
|
|
@@ -20,6 +21,7 @@ export interface IHubCatalog {
|
|
|
20
21
|
* Schema Version
|
|
21
22
|
*/
|
|
22
23
|
schemaVersion: number;
|
|
24
|
+
type?: CatalogType;
|
|
23
25
|
/**
|
|
24
26
|
* Hashes to verify the integrity of the catalog
|
|
25
27
|
* Only verified when the catalog is loaded into the editor
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { HubEntityType } from "../../core";
|
|
1
2
|
import { EntityType, IHubCatalog } from "./IHubCatalog";
|
|
2
3
|
import { IHubSearchResponse } from "./IHubSearchResponse";
|
|
3
4
|
import { IHubSearchResult } from "./IHubSearchResult";
|
|
@@ -82,6 +83,10 @@ export interface IContainsOptions {
|
|
|
82
83
|
* Specifing this will allow us to skip a lookup
|
|
83
84
|
*/
|
|
84
85
|
entityType?: EntityType;
|
|
86
|
+
/**
|
|
87
|
+
* Hub Entity type of the identifier
|
|
88
|
+
*/
|
|
89
|
+
hubEntityType?: HubEntityType;
|
|
85
90
|
}
|
|
86
91
|
/**
|
|
87
92
|
* Basic information about a catalog
|
|
@@ -93,7 +98,7 @@ export interface ICatalogInfo extends Partial<IDeepCatalogInfo> {
|
|
|
93
98
|
*/
|
|
94
99
|
export interface IDeepCatalogInfo {
|
|
95
100
|
id: string;
|
|
96
|
-
|
|
101
|
+
hubEntityType: HubEntityType;
|
|
97
102
|
catalog?: IHubCatalog;
|
|
98
103
|
}
|
|
99
104
|
/**
|