@esri/hub-common 14.14.0 → 14.16.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/addAssociation.js +16 -0
- package/dist/esm/associations/addAssociation.js.map +1 -0
- package/dist/esm/associations/index.js +5 -0
- package/dist/esm/associations/index.js.map +1 -0
- package/dist/esm/associations/internal/getTargetEntityFromAssociationType.js +18 -0
- package/dist/esm/associations/internal/getTargetEntityFromAssociationType.js.map +1 -0
- package/dist/esm/associations/internal/getTypeByIdsQuery.js +28 -0
- package/dist/esm/associations/internal/getTypeByIdsQuery.js.map +1 -0
- package/dist/esm/associations/internal/getTypeFromAssociationType.js +18 -0
- package/dist/esm/associations/internal/getTypeFromAssociationType.js.map +1 -0
- package/dist/esm/associations/internal/getTypeWithKeywordQuery.js +27 -0
- package/dist/esm/associations/internal/getTypeWithKeywordQuery.js.map +1 -0
- package/dist/esm/associations/internal/getTypeWithoutKeywordQuery.js +27 -0
- package/dist/esm/associations/internal/getTypeWithoutKeywordQuery.js.map +1 -0
- package/dist/esm/associations/listAssociations.js +17 -0
- package/dist/esm/associations/listAssociations.js.map +1 -0
- package/dist/esm/associations/removeAssociation.js +17 -0
- package/dist/esm/associations/removeAssociation.js.map +1 -0
- package/dist/esm/associations/types.js +2 -0
- package/dist/esm/associations/types.js.map +1 -0
- package/dist/esm/content/_internal/computeProps.js +4 -4
- package/dist/esm/content/_internal/computeProps.js.map +1 -1
- package/dist/esm/content/edit.js +8 -5
- package/dist/esm/content/edit.js.map +1 -1
- package/dist/esm/core/HubItemEntity.js +48 -1
- package/dist/esm/core/HubItemEntity.js.map +1 -1
- package/dist/esm/core/behaviors/IWIthAssociationBehavior.js +1 -0
- package/dist/esm/core/behaviors/IWIthAssociationBehavior.js.map +1 -0
- package/dist/esm/core/behaviors/IWithFollowersBehavior.js +1 -0
- package/dist/esm/core/behaviors/IWithFollowersBehavior.js.map +1 -0
- package/dist/esm/core/behaviors/index.js +1 -0
- package/dist/esm/core/behaviors/index.js.map +1 -1
- package/dist/esm/core/getTypeFromEntity.js +0 -5
- package/dist/esm/core/getTypeFromEntity.js.map +1 -1
- package/dist/esm/core/schemas/internal/getEntityEditorSchemas.js +1 -0
- package/dist/esm/core/schemas/internal/getEntityEditorSchemas.js.map +1 -1
- package/dist/esm/core/schemas/internal/getLocationExtent.js +2 -2
- package/dist/esm/core/schemas/internal/getLocationExtent.js.map +1 -1
- package/dist/esm/core/schemas/internal/getLocationOptions.js +12 -53
- package/dist/esm/core/schemas/internal/getLocationOptions.js.map +1 -1
- package/dist/esm/core/schemas/internal/subsetSchema.js +3 -0
- package/dist/esm/core/schemas/internal/subsetSchema.js.map +1 -1
- package/dist/esm/core/schemas/shared/HubItemEntitySchema.js +10 -0
- package/dist/esm/core/schemas/shared/HubItemEntitySchema.js.map +1 -1
- package/dist/esm/core/traits/IWithAssociations.js +1 -0
- package/dist/esm/core/traits/IWithAssociations.js.map +1 -0
- package/dist/esm/core/traits/index.js +1 -0
- package/dist/esm/core/traits/index.js.map +1 -1
- package/dist/esm/extent.js +6 -6
- package/dist/esm/extent.js.map +1 -1
- package/dist/esm/groups/HubGroups.js +1 -1
- package/dist/esm/groups/HubGroups.js.map +1 -1
- package/dist/esm/groups/_internal/computeProps.js +1 -1
- package/dist/esm/groups/_internal/computeProps.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/initiatives/HubInitiative.js +1 -1
- package/dist/esm/initiatives/HubInitiative.js.map +1 -1
- package/dist/esm/initiatives/HubInitiatives.js +129 -0
- package/dist/esm/initiatives/HubInitiatives.js.map +1 -1
- package/dist/esm/metrics/resolveMetric.js +6 -3
- package/dist/esm/metrics/resolveMetric.js.map +1 -1
- package/dist/esm/permissions/types/Permission.js +0 -2
- package/dist/esm/permissions/types/Permission.js.map +1 -1
- package/dist/esm/projects/HubProject.js +1 -1
- package/dist/esm/projects/HubProject.js.map +1 -1
- package/dist/esm/projects/fetch.js +26 -0
- package/dist/esm/projects/fetch.js.map +1 -1
- package/dist/esm/search/_internal/combineQueries.js +2 -0
- package/dist/esm/search/_internal/combineQueries.js.map +1 -1
- package/dist/esm/search/_internal/getEntityTypeFromType.js +21 -0
- package/dist/esm/search/_internal/getEntityTypeFromType.js.map +1 -0
- package/dist/esm/search/_internal/negateGroupPredicates.js +28 -0
- package/dist/esm/search/_internal/negateGroupPredicates.js.map +1 -0
- package/dist/esm/search/hubSearch.js +5 -1
- package/dist/esm/search/hubSearch.js.map +1 -1
- package/dist/esm/search/utils.js +16 -0
- package/dist/esm/search/utils.js.map +1 -1
- package/dist/esm/sites/HubSite.js +18 -8
- package/dist/esm/sites/HubSite.js.map +1 -1
- package/dist/esm/sites/HubSites.js +12 -0
- package/dist/esm/sites/HubSites.js.map +1 -1
- package/dist/esm/sites/_internal/SiteBusinessRules.js +7 -0
- package/dist/esm/sites/_internal/SiteBusinessRules.js.map +1 -1
- package/dist/esm/sites/_internal/SiteSchema.js +5 -1
- package/dist/esm/sites/_internal/SiteSchema.js.map +1 -1
- package/dist/esm/sites/_internal/SiteUiSchemaEdit.js +3 -3
- package/dist/esm/sites/_internal/SiteUiSchemaFollowers.js +56 -0
- package/dist/esm/sites/_internal/SiteUiSchemaFollowers.js.map +1 -0
- package/dist/esm/sites/_internal/capabilities/capabilityToFeatureMap.js +31 -0
- package/dist/esm/sites/_internal/capabilities/capabilityToFeatureMap.js.map +1 -0
- package/dist/esm/sites/_internal/capabilities/convertFeaturesToLegacyCapabilities.js +46 -0
- package/dist/esm/sites/_internal/capabilities/convertFeaturesToLegacyCapabilities.js.map +1 -0
- package/dist/esm/sites/_internal/capabilities/migrateLegacyCapabilitiesToFeatures.js +34 -0
- package/dist/esm/sites/_internal/capabilities/migrateLegacyCapabilitiesToFeatures.js.map +1 -0
- package/dist/esm/sites/_internal/capabilities/types.js +1 -0
- package/dist/esm/sites/_internal/capabilities/types.js.map +1 -0
- package/dist/esm/sites/upgrade-site-schema.js +2 -0
- package/dist/esm/sites/upgrade-site-schema.js.map +1 -1
- package/dist/esm/users/HubUsers.js +1 -1
- package/dist/esm/users/HubUsers.js.map +1 -1
- package/dist/esm/utils/memoize.js +2 -4
- package/dist/esm/utils/memoize.js.map +1 -1
- package/dist/node/associations/addAssociation.js +20 -0
- package/dist/node/associations/addAssociation.js.map +1 -0
- package/dist/node/associations/index.js +8 -0
- package/dist/node/associations/index.js.map +1 -0
- package/dist/node/associations/internal/getTargetEntityFromAssociationType.js +22 -0
- package/dist/node/associations/internal/getTargetEntityFromAssociationType.js.map +1 -0
- package/dist/node/associations/internal/getTypeByIdsQuery.js +32 -0
- package/dist/node/associations/internal/getTypeByIdsQuery.js.map +1 -0
- package/dist/node/associations/internal/getTypeFromAssociationType.js +22 -0
- package/dist/node/associations/internal/getTypeFromAssociationType.js.map +1 -0
- package/dist/node/associations/internal/getTypeWithKeywordQuery.js +31 -0
- package/dist/node/associations/internal/getTypeWithKeywordQuery.js.map +1 -0
- package/dist/node/associations/internal/getTypeWithoutKeywordQuery.js +31 -0
- package/dist/node/associations/internal/getTypeWithoutKeywordQuery.js.map +1 -0
- package/dist/node/associations/listAssociations.js +21 -0
- package/dist/node/associations/listAssociations.js.map +1 -0
- package/dist/node/associations/removeAssociation.js +21 -0
- package/dist/node/associations/removeAssociation.js.map +1 -0
- package/dist/node/associations/types.js +4 -0
- package/dist/node/associations/types.js.map +1 -0
- package/dist/node/content/_internal/computeProps.js +5 -5
- package/dist/node/content/_internal/computeProps.js.map +1 -1
- package/dist/node/content/edit.js +8 -5
- package/dist/node/content/edit.js.map +1 -1
- package/dist/node/core/HubItemEntity.js +47 -0
- package/dist/node/core/HubItemEntity.js.map +1 -1
- package/dist/node/core/behaviors/IWIthAssociationBehavior.js +3 -0
- package/dist/node/core/behaviors/IWIthAssociationBehavior.js.map +1 -0
- package/dist/node/core/behaviors/IWithFollowersBehavior.js +3 -0
- package/dist/node/core/behaviors/IWithFollowersBehavior.js.map +1 -0
- package/dist/node/core/behaviors/index.js +1 -0
- package/dist/node/core/behaviors/index.js.map +1 -1
- package/dist/node/core/getTypeFromEntity.js +0 -5
- package/dist/node/core/getTypeFromEntity.js.map +1 -1
- package/dist/node/core/schemas/internal/getEntityEditorSchemas.js +1 -0
- package/dist/node/core/schemas/internal/getEntityEditorSchemas.js.map +1 -1
- package/dist/node/core/schemas/internal/getLocationExtent.js +1 -1
- package/dist/node/core/schemas/internal/getLocationExtent.js.map +1 -1
- package/dist/node/core/schemas/internal/getLocationOptions.js +13 -55
- package/dist/node/core/schemas/internal/getLocationOptions.js.map +1 -1
- package/dist/node/core/schemas/internal/subsetSchema.js +3 -0
- package/dist/node/core/schemas/internal/subsetSchema.js.map +1 -1
- package/dist/node/core/schemas/shared/HubItemEntitySchema.js +10 -0
- package/dist/node/core/schemas/shared/HubItemEntitySchema.js.map +1 -1
- package/dist/node/core/traits/IWithAssociations.js +3 -0
- package/dist/node/core/traits/IWithAssociations.js.map +1 -0
- package/dist/node/core/traits/index.js +1 -0
- package/dist/node/core/traits/index.js.map +1 -1
- package/dist/node/extent.js +8 -8
- package/dist/node/extent.js.map +1 -1
- package/dist/node/groups/HubGroups.js +4 -4
- package/dist/node/groups/HubGroups.js.map +1 -1
- package/dist/node/groups/_internal/computeProps.js +2 -2
- package/dist/node/groups/_internal/computeProps.js.map +1 -1
- package/dist/node/index.js +1 -0
- package/dist/node/index.js.map +1 -1
- package/dist/node/initiatives/HubInitiative.js +3 -3
- package/dist/node/initiatives/HubInitiative.js.map +1 -1
- package/dist/node/initiatives/HubInitiatives.js +134 -1
- package/dist/node/initiatives/HubInitiatives.js.map +1 -1
- package/dist/node/metrics/resolveMetric.js +6 -3
- package/dist/node/metrics/resolveMetric.js.map +1 -1
- package/dist/node/permissions/types/Permission.js +0 -2
- package/dist/node/permissions/types/Permission.js.map +1 -1
- package/dist/node/projects/HubProject.js +3 -3
- package/dist/node/projects/HubProject.js.map +1 -1
- package/dist/node/projects/fetch.js +28 -1
- package/dist/node/projects/fetch.js.map +1 -1
- package/dist/node/search/_internal/combineQueries.js +2 -0
- package/dist/node/search/_internal/combineQueries.js.map +1 -1
- package/dist/node/search/_internal/getEntityTypeFromType.js +25 -0
- package/dist/node/search/_internal/getEntityTypeFromType.js.map +1 -0
- package/dist/node/search/_internal/negateGroupPredicates.js +32 -0
- package/dist/node/search/_internal/negateGroupPredicates.js.map +1 -0
- package/dist/node/search/hubSearch.js +10 -6
- package/dist/node/search/hubSearch.js.map +1 -1
- package/dist/node/search/utils.js +18 -1
- package/dist/node/search/utils.js.map +1 -1
- package/dist/node/sites/HubSite.js +18 -8
- package/dist/node/sites/HubSite.js.map +1 -1
- package/dist/node/sites/HubSites.js +12 -0
- package/dist/node/sites/HubSites.js.map +1 -1
- package/dist/node/sites/_internal/SiteBusinessRules.js +7 -0
- package/dist/node/sites/_internal/SiteBusinessRules.js.map +1 -1
- package/dist/node/sites/_internal/SiteSchema.js +5 -1
- package/dist/node/sites/_internal/SiteSchema.js.map +1 -1
- package/dist/node/sites/_internal/SiteUiSchemaEdit.js +3 -3
- package/dist/node/sites/_internal/SiteUiSchemaFollowers.js +59 -0
- package/dist/node/sites/_internal/SiteUiSchemaFollowers.js.map +1 -0
- package/dist/node/sites/_internal/capabilities/capabilityToFeatureMap.js +34 -0
- package/dist/node/sites/_internal/capabilities/capabilityToFeatureMap.js.map +1 -0
- package/dist/node/sites/_internal/capabilities/convertFeaturesToLegacyCapabilities.js +49 -0
- package/dist/node/sites/_internal/capabilities/convertFeaturesToLegacyCapabilities.js.map +1 -0
- package/dist/node/sites/_internal/capabilities/migrateLegacyCapabilitiesToFeatures.js +37 -0
- package/dist/node/sites/_internal/capabilities/migrateLegacyCapabilitiesToFeatures.js.map +1 -0
- package/dist/node/sites/_internal/capabilities/types.js +3 -0
- package/dist/node/sites/_internal/capabilities/types.js.map +1 -0
- package/dist/node/sites/upgrade-site-schema.js +2 -0
- package/dist/node/sites/upgrade-site-schema.js.map +1 -1
- package/dist/node/users/HubUsers.js +4 -4
- package/dist/node/users/HubUsers.js.map +1 -1
- package/dist/node/utils/memoize.js +2 -4
- package/dist/node/utils/memoize.js.map +1 -1
- package/dist/types/associations/addAssociation.d.ts +9 -0
- package/dist/types/associations/index.d.ts +4 -0
- package/dist/types/associations/internal/getTargetEntityFromAssociationType.d.ts +8 -0
- package/dist/types/associations/internal/getTypeByIdsQuery.d.ts +10 -0
- package/dist/types/associations/internal/getTypeFromAssociationType.d.ts +7 -0
- package/dist/types/associations/internal/getTypeWithKeywordQuery.d.ts +10 -0
- package/dist/types/associations/internal/getTypeWithoutKeywordQuery.d.ts +10 -0
- package/dist/types/associations/listAssociations.d.ts +8 -0
- package/dist/types/associations/removeAssociation.d.ts +9 -0
- package/dist/types/associations/types.d.ts +19 -0
- package/dist/types/content/_internal/computeProps.d.ts +1 -1
- package/dist/types/content/_internal/internalContentUtils.d.ts +10 -36
- package/dist/types/core/HubItemEntity.d.ts +32 -2
- package/dist/types/core/behaviors/IWIthAssociationBehavior.d.ts +23 -0
- package/dist/types/core/behaviors/IWithFollowersBehavior.d.ts +15 -0
- package/dist/types/core/behaviors/index.d.ts +1 -0
- package/dist/types/core/schemas/internal/getLocationOptions.d.ts +0 -1
- package/dist/types/core/schemas/types.d.ts +1 -1
- package/dist/types/core/traits/IWithAssociations.d.ts +4 -0
- package/dist/types/core/traits/IWithFollowers.d.ts +1 -1
- package/dist/types/core/traits/index.d.ts +1 -0
- package/dist/types/core/types/IHubItemEntity.d.ts +19 -1
- package/dist/types/core/types/IHubSite.d.ts +3 -10
- package/dist/types/extent.d.ts +1 -1
- package/dist/types/groups/HubGroups.d.ts +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/initiatives/HubInitiative.d.ts +1 -1
- package/dist/types/initiatives/HubInitiatives.d.ts +40 -1
- package/dist/types/permissions/types/Permission.d.ts +14 -2
- package/dist/types/projects/HubProject.d.ts +1 -1
- package/dist/types/projects/fetch.d.ts +14 -0
- package/dist/types/search/_internal/getEntityTypeFromType.d.ts +9 -0
- package/dist/types/search/_internal/negateGroupPredicates.d.ts +9 -0
- package/dist/types/search/utils.d.ts +8 -0
- package/dist/types/sites/_internal/SiteBusinessRules.d.ts +1 -1
- package/dist/types/sites/_internal/SiteSchema.d.ts +1 -1
- package/dist/types/sites/_internal/SiteUiSchemaEdit.d.ts +3 -3
- package/dist/types/sites/_internal/SiteUiSchemaFollowers.d.ts +11 -0
- package/dist/types/sites/_internal/capabilities/capabilityToFeatureMap.d.ts +14 -0
- package/dist/types/sites/_internal/capabilities/convertFeaturesToLegacyCapabilities.d.ts +19 -0
- package/dist/types/sites/_internal/capabilities/migrateLegacyCapabilitiesToFeatures.d.ts +12 -0
- package/dist/types/sites/_internal/capabilities/types.d.ts +29 -0
- package/dist/types/users/HubUsers.d.ts +1 -1
- package/package.json +1 -1
|
@@ -3,10 +3,12 @@ import { IHubGeography } from "../../types";
|
|
|
3
3
|
import { AccessLevel } from "./types";
|
|
4
4
|
import { IWithPermissions, IWithViewSettings, IWithDiscussions } from "../traits";
|
|
5
5
|
import { IHubLocation } from "./IHubLocation";
|
|
6
|
+
import { IWithFollowers } from "../traits/IWithFollowers";
|
|
7
|
+
import { IWithAssociations } from "../traits/IWithAssociations";
|
|
6
8
|
/**
|
|
7
9
|
* Properties exposed by Entities that are backed by Items
|
|
8
10
|
*/
|
|
9
|
-
export interface IHubItemEntity extends IHubEntityBase, IWithPermissions, IWithDiscussions {
|
|
11
|
+
export interface IHubItemEntity extends IHubEntityBase, IWithPermissions, IWithDiscussions, IWithFollowers, IWithAssociations {
|
|
10
12
|
/**
|
|
11
13
|
* Access level of the item ("private" | "org" | "public")
|
|
12
14
|
*/
|
|
@@ -101,3 +103,19 @@ export interface IHubItemEntity extends IHubEntityBase, IWithPermissions, IWithD
|
|
|
101
103
|
*/
|
|
102
104
|
protected?: boolean;
|
|
103
105
|
}
|
|
106
|
+
export declare type IHubItemEntityEditor<T> = Omit<T, "extent"> & {
|
|
107
|
+
/**
|
|
108
|
+
* Thumbnail image. This is only used on the Editor and is
|
|
109
|
+
* persisted in the fromEditor method on the Class
|
|
110
|
+
*/
|
|
111
|
+
_thumbnail?: any;
|
|
112
|
+
/**
|
|
113
|
+
* Follower group settings. These settings are only used in the
|
|
114
|
+
* Editor and is persisted appropriately in the fromEditor
|
|
115
|
+
* method on the Class
|
|
116
|
+
*/
|
|
117
|
+
_followers?: {
|
|
118
|
+
groupAccess?: AccessLevel;
|
|
119
|
+
showFollowAction?: boolean;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { IExtent } from "@esri/arcgis-rest-feature-layer";
|
|
2
2
|
import { IWithVersioningBehavior } from "../behaviors";
|
|
3
3
|
import { IWithCatalog, IWithLayout, IWithPermissions, IWithSlug } from "../traits/index";
|
|
4
|
-
import { IHubItemEntity } from "./IHubItemEntity";
|
|
5
|
-
import { IWithFollowers } from "../traits/IWithFollowers";
|
|
4
|
+
import { IHubItemEntity, IHubItemEntityEditor } from "./IHubItemEntity";
|
|
6
5
|
/**
|
|
7
6
|
* DRAFT: Under development and more properties will likely be added
|
|
8
7
|
* @internal
|
|
9
8
|
*/
|
|
10
|
-
export interface IHubSite extends IHubItemEntity, IWithSlug, IWithCatalog, IWithLayout, IWithPermissions, IWithVersioningBehavior
|
|
9
|
+
export interface IHubSite extends IHubItemEntity, IWithSlug, IWithCatalog, IWithLayout, IWithPermissions, IWithVersioningBehavior {
|
|
11
10
|
/**
|
|
12
11
|
* Array of minimal page objects
|
|
13
12
|
*/
|
|
@@ -70,10 +69,4 @@ export interface IHubSite extends IHubItemEntity, IWithSlug, IWithCatalog, IWith
|
|
|
70
69
|
/** Legacy teams - list of ids */
|
|
71
70
|
legacyTeams: string[];
|
|
72
71
|
}
|
|
73
|
-
export declare type IHubSiteEditor =
|
|
74
|
-
/**
|
|
75
|
-
* Thumbnail image. This is only used on the Editor and is
|
|
76
|
-
* persisted in the fromEditor method on the Class
|
|
77
|
-
*/
|
|
78
|
-
_thumbnail?: any;
|
|
79
|
-
};
|
|
72
|
+
export declare type IHubSiteEditor = IHubItemEntityEditor<IHubSite> & {};
|
package/dist/types/extent.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export declare const GLOBAL_EXTENT: IExtent;
|
|
|
24
24
|
* Gets the geographic extent for an org
|
|
25
25
|
* @param hubRequestOptions
|
|
26
26
|
*/
|
|
27
|
-
export declare function
|
|
27
|
+
export declare function orgExtent(hubRequestOptions: IHubRequestOptions): Promise<IExtent>;
|
|
28
28
|
/**
|
|
29
29
|
* Get the default org extent as a bbox for use on item.extent
|
|
30
30
|
* @param {IHubRequestOptions} hubRequestOptions
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { IGroup } from "@esri/arcgis-rest-types";
|
|
2
|
-
import { IHubSearchResult } from "../search";
|
|
3
2
|
import { IHubRequestOptions } from "../types";
|
|
4
3
|
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
5
4
|
import { IHubGroup } from "../core/types/IHubGroup";
|
|
6
5
|
import { IUserRequestOptions } from "@esri/arcgis-rest-auth";
|
|
6
|
+
import { IHubSearchResult } from "../search/types/IHubSearchResult";
|
|
7
7
|
/**
|
|
8
8
|
* Enrich a generic search result
|
|
9
9
|
* @param group
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IEntityEditorContext } from "../core/types/HubEntityEditor";
|
|
2
|
-
import { Catalog } from "../search";
|
|
2
|
+
import { Catalog } from "../search/Catalog";
|
|
3
3
|
import { IArcGISContext } from "../ArcGISContext";
|
|
4
4
|
import { HubItemEntity } from "../core/HubItemEntity";
|
|
5
5
|
import { InitiativeEditorType } from "./_internal/InitiativeSchema";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { IUserRequestOptions } from "@esri/arcgis-rest-auth";
|
|
2
2
|
import { IHubRequestOptions } from "../index";
|
|
3
|
+
import { IQuery } from "../search/types/IHubCatalog";
|
|
3
4
|
import { IItem } from "@esri/arcgis-rest-portal";
|
|
4
5
|
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
5
|
-
import { IHubInitiative } from "../core/types";
|
|
6
|
+
import { IEntityInfo, IHubInitiative } from "../core/types";
|
|
6
7
|
import { IHubSearchResult } from "../search";
|
|
7
8
|
/**
|
|
8
9
|
* @private
|
|
@@ -53,3 +54,41 @@ export declare function convertItemToInitiative(item: IItem, requestOptions: IRe
|
|
|
53
54
|
* @returns
|
|
54
55
|
*/
|
|
55
56
|
export declare function enrichInitiativeSearchResult(item: IItem, include: string[], requestOptions: IHubRequestOptions): Promise<IHubSearchResult>;
|
|
57
|
+
/**
|
|
58
|
+
* Fetch the Projects that are "Accepted" with an Initiative.
|
|
59
|
+
* This is a subset of the "Associated" projects, limited
|
|
60
|
+
* to those included in the Initiative's Catalog.
|
|
61
|
+
* @param initiative
|
|
62
|
+
* @param requestOptions
|
|
63
|
+
* @param query: Optional `IQuery` to further filter the results
|
|
64
|
+
* @returns
|
|
65
|
+
*/
|
|
66
|
+
export declare function fetchAcceptedProjects(initiative: IHubInitiative, requestOptions: IHubRequestOptions, query?: IQuery): Promise<IEntityInfo[]>;
|
|
67
|
+
/**
|
|
68
|
+
* Fetch the Projects that are "Associated" to the Initiative but are not
|
|
69
|
+
* "Accepted", meaning they have the keyword but are not included in the Initiative's Catalog.
|
|
70
|
+
* This is how we can get the list of Projects awaiting Acceptance
|
|
71
|
+
* @param initiative
|
|
72
|
+
* @param requestOptions
|
|
73
|
+
* @param query
|
|
74
|
+
* @returns
|
|
75
|
+
*/
|
|
76
|
+
export declare function fetchPendingProjects(initiative: IHubInitiative, requestOptions: IHubRequestOptions, query?: IQuery): Promise<IEntityInfo[]>;
|
|
77
|
+
/**
|
|
78
|
+
* Associated projects are those with the Initiative id in the typekeywords
|
|
79
|
+
* and is included in the Initiative's catalog.
|
|
80
|
+
* This is passed into the Gallery showing "Approved Projects"
|
|
81
|
+
* @param initiative
|
|
82
|
+
* @returns
|
|
83
|
+
*/
|
|
84
|
+
export declare function getAcceptedProjectsQuery(initiative: IHubInitiative): IQuery;
|
|
85
|
+
/**
|
|
86
|
+
* Related Projects are those that have the Initiative id in the
|
|
87
|
+
* typekeywords but NOT in the catalog. We use this query to show
|
|
88
|
+
* Projects which want to be associated but are not yet included in
|
|
89
|
+
* the catalog
|
|
90
|
+
* This is passed into the Gallery showing "Pending Projects"
|
|
91
|
+
* @param initiative
|
|
92
|
+
* @returns
|
|
93
|
+
*/
|
|
94
|
+
export declare function getPendingProjectsQuery(initiative: IHubInitiative): IQuery;
|
|
@@ -1,8 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
import { ProjectPermissions } from "../../projects/_internal/ProjectBusinessRules";
|
|
2
|
+
import { SitePermissions } from "../../sites/_internal/SiteBusinessRules";
|
|
3
|
+
import { InitiativePermissions } from "../../initiatives/_internal/InitiativeBusinessRules";
|
|
4
|
+
import { ContentPermissions } from "../../content/_internal/ContentBusinessRules";
|
|
5
|
+
import { GroupPermissions } from "../../groups/_internal/GroupBusinessRules";
|
|
6
|
+
import { PagePermissions } from "../../pages/_internal/PageBusinessRules";
|
|
7
|
+
import { PlatformPermissions } from "../PlatformPermissionPolicies";
|
|
8
|
+
/**
|
|
9
|
+
* Defines the values for Permissions
|
|
10
|
+
* It's critical that the arrays defined in the modules use `as const`
|
|
11
|
+
* otherwise Permission devolves into just a string type
|
|
12
|
+
*/
|
|
13
|
+
declare const TempPermissions: string[];
|
|
2
14
|
/**
|
|
3
15
|
* Defines the possible values for Permissions
|
|
4
16
|
*/
|
|
5
|
-
export declare type Permission = (typeof
|
|
17
|
+
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 TempPermissions)[number];
|
|
6
18
|
/**
|
|
7
19
|
* Validate a Permission
|
|
8
20
|
* @param permission
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IHubProject, IWithCatalogBehavior, IWithStoreBehavior, IWithSharingBehavior, IResolvedMetric, IWithCardBehavior, IHubProjectEditor, IEntityEditorContext } from "../core";
|
|
2
|
-
import { Catalog } from "../search";
|
|
2
|
+
import { Catalog } from "../search/Catalog";
|
|
3
3
|
import { IArcGISContext } from "../ArcGISContext";
|
|
4
4
|
import { HubItemEntity } from "../core/HubItemEntity";
|
|
5
5
|
import { IEditorConfig, IWithEditorBehavior } from "../core/behaviors/IWithEditorBehavior";
|
|
@@ -2,6 +2,7 @@ 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";
|
|
5
6
|
import { IHubRequestOptions } from "../types";
|
|
6
7
|
/**
|
|
7
8
|
* @private
|
|
@@ -28,3 +29,16 @@ export declare function convertItemToProject(item: IItem, requestOptions: IReque
|
|
|
28
29
|
* @returns
|
|
29
30
|
*/
|
|
30
31
|
export declare function enrichProjectSearchResult(item: IItem, include: string[], requestOptions: IHubRequestOptions): Promise<IHubSearchResult>;
|
|
32
|
+
/**
|
|
33
|
+
* Get a query that will fetch all the initiatives which the project has
|
|
34
|
+
* chosen to connect to. If project has not defined any associations
|
|
35
|
+
* to any Initiatives, will return `null`.
|
|
36
|
+
* Currently, we have not implemented a means to get the list of initiatives that have
|
|
37
|
+
* "Accepted" the Project via inclusion in it's catalog.
|
|
38
|
+
*
|
|
39
|
+
* If needed, this could be done by getting all the groups the project is shared into
|
|
40
|
+
* then cross-walking that into the catalogs of all the Associated Initiatives
|
|
41
|
+
* @param project
|
|
42
|
+
* @returns
|
|
43
|
+
*/
|
|
44
|
+
export declare function getAssociatedInitiativesQuery(project: IHubProject): IQuery;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EntityType } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* @private
|
|
4
|
+
* Given a type (e.g. Hub Site Application) return the appropriate entity type
|
|
5
|
+
* that can be used as a `targetEntity` in an `IQuery`
|
|
6
|
+
* @param type
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare function getEntityTypeFromType(type: string): EntityType;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IQuery } from "../types/IHubCatalog";
|
|
2
|
+
/**
|
|
3
|
+
* @private
|
|
4
|
+
* Helper function that locates group predicates and "negates" them
|
|
5
|
+
* so we get a query that is `not in groups ...` vs `in groups ...`
|
|
6
|
+
* @param query
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare function negateGroupPredicates(query: IQuery): IQuery;
|
|
@@ -85,6 +85,7 @@ export declare function getUserThumbnailUrl(portalUrl: string, user: IUser, toke
|
|
|
85
85
|
*/
|
|
86
86
|
export declare function migrateToCollectionKey(collectionOrSearchCategory: LegacySearchCategory | WellKnownCollection): WellKnownCollection;
|
|
87
87
|
/**
|
|
88
|
+
* DEPRECATED: Please use `getGroupPredicate`
|
|
88
89
|
* Searches through a catalog scope and retrieves the predicate responsible
|
|
89
90
|
* for determining group sharing requirements.
|
|
90
91
|
*
|
|
@@ -92,6 +93,13 @@ export declare function migrateToCollectionKey(collectionOrSearchCategory: Legac
|
|
|
92
93
|
* @returns The first predicate with a `group` field (if present)
|
|
93
94
|
*/
|
|
94
95
|
export declare function getScopeGroupPredicate(scope: IQuery): IPredicate;
|
|
96
|
+
/**
|
|
97
|
+
* Searches through an `IQuery` and retrieves the predicate with a `group` definition.
|
|
98
|
+
* If there is no group predicate, returns `null`
|
|
99
|
+
* @param query IQuery to search
|
|
100
|
+
* @returns
|
|
101
|
+
*/
|
|
102
|
+
export declare function getGroupPredicate(query: IQuery): IPredicate;
|
|
95
103
|
/**
|
|
96
104
|
* Determines the canonical siteRelative link for a search result.
|
|
97
105
|
*
|
|
@@ -7,7 +7,7 @@ export declare const SiteDefaultFeatures: IFeatureFlags;
|
|
|
7
7
|
* Site Permissions
|
|
8
8
|
* This feeds into the Permissions type
|
|
9
9
|
*/
|
|
10
|
-
export declare const SitePermissions: readonly ["hub:site", "hub:site:create", "hub:site:delete", "hub:site:edit", "hub:site:view", "hub:site:owner", "hub:site:events", "hub:site:content", "hub:site:discussions", "hub:site:workspace:overview", "hub:site:workspace:dashboard", "hub:site:workspace:details", "hub:site:workspace:settings", "hub:site:workspace:collaborators", "hub:site:workspace:content", "hub:site:workspace:metrics", "hub:site:workspace:followers", "hub:site:workspace:followers:member", "hub:site:workspace:followers:manager", "hub:site:manage"];
|
|
10
|
+
export declare const SitePermissions: readonly ["hub:site", "hub:site:create", "hub:site:delete", "hub:site:edit", "hub:site:view", "hub:site:owner", "hub:site:events", "hub:site:content", "hub:site:discussions", "hub:site:feature:follow", "hub:site:workspace:overview", "hub:site:workspace:dashboard", "hub:site:workspace:details", "hub:site:workspace:settings", "hub:site:workspace:collaborators", "hub:site:workspace:content", "hub:site:workspace:metrics", "hub:site:workspace:followers", "hub:site:workspace:followers:member", "hub:site:workspace:followers:manager", "hub:site:manage"];
|
|
11
11
|
/**
|
|
12
12
|
* Site permission policies
|
|
13
13
|
* @private
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IConfigurationSchema } from "../../core";
|
|
2
2
|
export declare type SiteEditorType = (typeof SiteEditorTypes)[number];
|
|
3
|
-
export declare const SiteEditorTypes: readonly ["hub:site:edit", "hub:site:create"];
|
|
3
|
+
export declare const SiteEditorTypes: readonly ["hub:site:edit", "hub:site:create", "hub:site:followers"];
|
|
4
4
|
/**
|
|
5
5
|
* defines the JSON schema for a Hub Site's editable fields
|
|
6
6
|
*/
|
|
@@ -3,8 +3,8 @@ import { IUiSchema } from "../../core/schemas/types";
|
|
|
3
3
|
import { IHubSite } from "../../core/types";
|
|
4
4
|
/**
|
|
5
5
|
* @private
|
|
6
|
-
*
|
|
7
|
-
* how the schema properties should
|
|
8
|
-
*
|
|
6
|
+
* constructs the edit uiSchema for Hub Sites.
|
|
7
|
+
* This defines how the schema properties should
|
|
8
|
+
* be rendered in the site editing experience
|
|
9
9
|
*/
|
|
10
10
|
export declare const buildUiSchema: (i18nScope: string, entity: IHubSite, context: IArcGISContext) => Promise<IUiSchema>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IArcGISContext } from "../../ArcGISContext";
|
|
2
|
+
import { IUiSchema } from "../../core/schemas/types";
|
|
3
|
+
import { IHubSite } from "../../core/types";
|
|
4
|
+
/**
|
|
5
|
+
* @private
|
|
6
|
+
* constructs the followers uiSchema for Hub Sites.
|
|
7
|
+
* This defines how the schema properties should
|
|
8
|
+
* be rendered in the site followers > settings
|
|
9
|
+
* experience
|
|
10
|
+
*/
|
|
11
|
+
export declare const buildUiSchema: (i18nScope: string, entity: IHubSite, context: IArcGISContext) => Promise<IUiSchema>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ICapabilityToFeatureMap } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Returns an array of ICapabilityToFeatureMap objects
|
|
4
|
+
* that define the projection of legacy capabilities
|
|
5
|
+
* to permission features.
|
|
6
|
+
*
|
|
7
|
+
* We use this map to manage foward and backard conversions
|
|
8
|
+
* and migration of legacy capablities to features when a
|
|
9
|
+
* site is fetched or updated
|
|
10
|
+
*
|
|
11
|
+
* NOTE: if you are porting a legacy capability over to
|
|
12
|
+
* workspaces, add it to this map
|
|
13
|
+
*/
|
|
14
|
+
export declare const capabilityToFeatureMap: ICapabilityToFeatureMap[];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IModel } from "../../../types";
|
|
2
|
+
/**
|
|
3
|
+
* Site capabilities are currently saved as an array on the
|
|
4
|
+
* site.data.values.capabilities. We want to migragte these
|
|
5
|
+
* legacy capabilities over to features in the new permissions
|
|
6
|
+
* system; however, we must continue persisting updates to
|
|
7
|
+
* these features in the legacy capabilities array until the
|
|
8
|
+
* existing site capabilities in our application are plumbed
|
|
9
|
+
* to work off of permissions
|
|
10
|
+
*
|
|
11
|
+
* This function is called within updateSite to ensure
|
|
12
|
+
* the legacy capabilities array is kept up-to-date
|
|
13
|
+
*
|
|
14
|
+
* TODO: Remove once site capabilities use permissions
|
|
15
|
+
*
|
|
16
|
+
* @param modelToUpdate
|
|
17
|
+
* @param currentModel
|
|
18
|
+
*/
|
|
19
|
+
export declare const convertFeaturesToLegacyCapabilities: (modelToUpdate: IModel, currentModel: IModel) => IModel;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IModel } from "../../../types";
|
|
2
|
+
/**
|
|
3
|
+
* Site capabilities are currently saved as an array on the
|
|
4
|
+
* site.data.values.capabilities. We want to migragte these
|
|
5
|
+
* legacy capabilities over to features in the new permissions
|
|
6
|
+
* system and expose them on the entity
|
|
7
|
+
*
|
|
8
|
+
* This function is called within fetchSite to ensure all
|
|
9
|
+
* sites have features that are kept up-to-date with the
|
|
10
|
+
* legacy capabilities array
|
|
11
|
+
*/
|
|
12
|
+
export declare const migrateLegacyCapabilitiesToFeatures: (model: IModel) => IModel;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { SitePermissions } from "../SiteBusinessRules";
|
|
2
|
+
/**
|
|
3
|
+
* legacy site capabilities
|
|
4
|
+
*/
|
|
5
|
+
export declare type LegacyCapability = "hideFollow";
|
|
6
|
+
/**
|
|
7
|
+
* representation of legacy site capabilities as
|
|
8
|
+
* feature flags
|
|
9
|
+
*/
|
|
10
|
+
export interface ILegacyCapabilityFeatureFlags extends Partial<Record<LegacyCapability, boolean>> {
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* capability to feature map entry that provides a
|
|
14
|
+
* "cross-walk" between a legacy site capability
|
|
15
|
+
* and site feature (using the new permissions
|
|
16
|
+
* system)
|
|
17
|
+
*
|
|
18
|
+
* This enables us to convert/migrate capabilities
|
|
19
|
+
* to features when sites are fetched and updated
|
|
20
|
+
*/
|
|
21
|
+
export interface ICapabilityToFeatureMap {
|
|
22
|
+
capability: LegacyCapability;
|
|
23
|
+
feature: (typeof SitePermissions)[number];
|
|
24
|
+
/**
|
|
25
|
+
* whether to apply a ! when converting between the
|
|
26
|
+
* capability and feature
|
|
27
|
+
*/
|
|
28
|
+
negate?: boolean;
|
|
29
|
+
}
|