@esri/hub-common 11.23.1 → 12.0.0-alpha.1
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/ArcGISContext.js +24 -1
- package/dist/esm/ArcGISContext.js.map +1 -1
- package/dist/esm/ArcGISContextManager.js +48 -0
- package/dist/esm/ArcGISContextManager.js.map +1 -1
- package/dist/esm/content/compose.js +12 -0
- package/dist/esm/content/compose.js.map +1 -1
- package/dist/esm/core/HubItemEntity.js +39 -57
- package/dist/esm/core/HubItemEntity.js.map +1 -1
- package/dist/esm/core/_internal/PropertyMapper.js +10 -2
- package/dist/esm/core/_internal/PropertyMapper.js.map +1 -1
- package/dist/esm/core/_internal/getBasePropertyMap.js +1 -0
- package/dist/esm/core/_internal/getBasePropertyMap.js.map +1 -1
- package/dist/esm/core/behaviors/IWithPermissionBehavior.js +0 -68
- package/dist/esm/core/behaviors/IWithPermissionBehavior.js.map +1 -1
- package/dist/esm/core/fetchHubEntity.js +28 -0
- package/dist/esm/core/fetchHubEntity.js.map +1 -0
- package/dist/esm/core/getTypeFromEntity.js +26 -0
- package/dist/esm/core/getTypeFromEntity.js.map +1 -0
- package/dist/esm/core/index.js +2 -1
- package/dist/esm/core/index.js.map +1 -1
- package/dist/esm/core/types/HubEntity.js +1 -0
- package/dist/esm/core/types/HubEntity.js.map +1 -0
- package/dist/esm/core/types/HubEntityType.js +1 -0
- package/dist/esm/core/types/HubEntityType.js.map +1 -0
- package/dist/esm/core/types/ISystemStatus.js +21 -0
- package/dist/esm/core/types/ISystemStatus.js.map +1 -0
- package/dist/esm/core/types/index.js +3 -2
- package/dist/esm/core/types/index.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 +0 -13
- package/dist/esm/initiatives/HubInitiative.js.map +1 -1
- package/dist/esm/permissions/HubPermissionPolicies.js +18 -0
- package/dist/esm/permissions/HubPermissionPolicies.js.map +1 -0
- package/dist/esm/permissions/_internal/checkAuthentication.js +24 -0
- package/dist/esm/permissions/_internal/checkAuthentication.js.map +1 -0
- package/dist/esm/permissions/_internal/checkEdit.js +35 -0
- package/dist/esm/permissions/_internal/checkEdit.js.map +1 -0
- package/dist/esm/permissions/_internal/checkEntityPolicy.js +56 -0
- package/dist/esm/permissions/_internal/checkEntityPolicy.js.map +1 -0
- package/dist/esm/permissions/_internal/checkLicense.js +27 -0
- package/dist/esm/permissions/_internal/checkLicense.js.map +1 -0
- package/dist/esm/permissions/_internal/checkOwner.js +36 -0
- package/dist/esm/permissions/_internal/checkOwner.js.map +1 -0
- package/dist/esm/permissions/_internal/checkPrivileges.js +27 -0
- package/dist/esm/permissions/_internal/checkPrivileges.js.map +1 -0
- package/dist/esm/permissions/_internal/getPolicyResponseCode.js +29 -0
- package/dist/esm/permissions/_internal/getPolicyResponseCode.js.map +1 -0
- package/dist/esm/permissions/checkPermission.js +88 -0
- package/dist/esm/permissions/checkPermission.js.map +1 -0
- package/dist/esm/permissions/index.js +5 -0
- package/dist/esm/permissions/index.js.map +1 -0
- package/dist/esm/permissions/types/HubLicense.js +1 -0
- package/dist/esm/permissions/types/HubLicense.js.map +1 -0
- package/dist/esm/permissions/types/IAccessResponse.js +1 -0
- package/dist/esm/permissions/types/IAccessResponse.js.map +1 -0
- package/dist/esm/permissions/types/IEntityPermissionPolicy.js +1 -0
- package/dist/esm/permissions/types/IEntityPermissionPolicy.js.map +1 -0
- package/dist/esm/permissions/types/IPermissionPolicy.js +1 -0
- package/dist/esm/permissions/types/IPermissionPolicy.js.map +1 -0
- package/dist/esm/permissions/types/IPolicyCheck.js +1 -0
- package/dist/esm/permissions/types/IPolicyCheck.js.map +1 -0
- package/dist/esm/permissions/types/Permission.js +24 -0
- package/dist/esm/permissions/types/Permission.js.map +1 -0
- package/dist/esm/permissions/types/PlatformPrivilege.js +5 -0
- package/dist/esm/permissions/types/PlatformPrivilege.js.map +1 -0
- package/dist/esm/permissions/types/PolicyResponse.js +4 -0
- package/dist/esm/permissions/types/PolicyResponse.js.map +1 -0
- package/dist/esm/permissions/types/index.js +9 -0
- package/dist/esm/permissions/types/index.js.map +1 -0
- package/dist/esm/permissions/utils.js +26 -0
- package/dist/esm/permissions/utils.js.map +1 -0
- package/dist/esm/projects/HubProject.js +5 -14
- package/dist/esm/projects/HubProject.js.map +1 -1
- package/dist/esm/projects/_internal/ProjectPermissionPolicies.js +35 -0
- package/dist/esm/projects/_internal/ProjectPermissionPolicies.js.map +1 -0
- package/dist/esm/projects/_internal.js +43 -0
- package/dist/esm/projects/_internal.js.map +1 -0
- package/dist/esm/projects/edit.js +115 -0
- package/dist/esm/projects/edit.js.map +1 -0
- package/dist/esm/projects/fetch.js +104 -0
- package/dist/esm/projects/fetch.js.map +1 -0
- package/dist/esm/projects/index.js +2 -1
- package/dist/esm/projects/index.js.map +1 -1
- package/dist/esm/search/Catalog.js.map +1 -1
- package/dist/esm/sites/HubSite.js +0 -13
- package/dist/esm/sites/HubSite.js.map +1 -1
- package/dist/esm/sites/_internal/SitesPermissionPolicies.js +34 -0
- package/dist/esm/sites/_internal/SitesPermissionPolicies.js.map +1 -0
- package/dist/esm/util.js +3 -1
- package/dist/esm/util.js.map +1 -1
- package/dist/node/ArcGISContext.js +28 -5
- package/dist/node/ArcGISContext.js.map +1 -1
- package/dist/node/ArcGISContextManager.js +48 -0
- package/dist/node/ArcGISContextManager.js.map +1 -1
- package/dist/node/content/compose.js +12 -0
- package/dist/node/content/compose.js.map +1 -1
- package/dist/node/core/HubItemEntity.js +38 -56
- package/dist/node/core/HubItemEntity.js.map +1 -1
- package/dist/node/core/_internal/PropertyMapper.js +9 -1
- package/dist/node/core/_internal/PropertyMapper.js.map +1 -1
- package/dist/node/core/_internal/getBasePropertyMap.js +1 -0
- package/dist/node/core/_internal/getBasePropertyMap.js.map +1 -1
- package/dist/node/core/behaviors/IWithPermissionBehavior.js +0 -73
- package/dist/node/core/behaviors/IWithPermissionBehavior.js.map +1 -1
- package/dist/node/core/fetchHubEntity.js +32 -0
- package/dist/node/core/fetchHubEntity.js.map +1 -0
- package/dist/node/core/getTypeFromEntity.js +30 -0
- package/dist/node/core/getTypeFromEntity.js.map +1 -0
- package/dist/node/core/index.js +2 -1
- package/dist/node/core/index.js.map +1 -1
- package/dist/node/core/types/{IHubPermission.js → HubEntity.js} +1 -1
- package/dist/node/core/types/HubEntity.js.map +1 -0
- package/dist/node/core/types/HubEntityType.js +3 -0
- package/dist/node/core/types/HubEntityType.js.map +1 -0
- package/dist/node/core/types/ISystemStatus.js +25 -0
- package/dist/node/core/types/ISystemStatus.js.map +1 -0
- package/dist/node/core/types/index.js +3 -2
- package/dist/node/core/types/index.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 +0 -13
- package/dist/node/initiatives/HubInitiative.js.map +1 -1
- package/dist/node/permissions/HubPermissionPolicies.js +22 -0
- package/dist/node/permissions/HubPermissionPolicies.js.map +1 -0
- package/dist/node/permissions/_internal/checkAuthentication.js +28 -0
- package/dist/node/permissions/_internal/checkAuthentication.js.map +1 -0
- package/dist/node/permissions/_internal/checkEdit.js +39 -0
- package/dist/node/permissions/_internal/checkEdit.js.map +1 -0
- package/dist/node/permissions/_internal/checkEntityPolicy.js +60 -0
- package/dist/node/permissions/_internal/checkEntityPolicy.js.map +1 -0
- package/dist/node/permissions/_internal/checkLicense.js +31 -0
- package/dist/node/permissions/_internal/checkLicense.js.map +1 -0
- package/dist/node/permissions/_internal/checkOwner.js +40 -0
- package/dist/node/permissions/_internal/checkOwner.js.map +1 -0
- package/dist/node/permissions/_internal/checkPrivileges.js +31 -0
- package/dist/node/permissions/_internal/checkPrivileges.js.map +1 -0
- package/dist/node/permissions/_internal/getPolicyResponseCode.js +33 -0
- package/dist/node/permissions/_internal/getPolicyResponseCode.js.map +1 -0
- package/dist/node/permissions/checkPermission.js +92 -0
- package/dist/node/permissions/checkPermission.js.map +1 -0
- package/dist/node/permissions/index.js +8 -0
- package/dist/node/permissions/index.js.map +1 -0
- package/dist/node/permissions/types/HubLicense.js +3 -0
- package/dist/node/permissions/types/HubLicense.js.map +1 -0
- package/dist/node/permissions/types/IAccessResponse.js +3 -0
- package/dist/node/permissions/types/IAccessResponse.js.map +1 -0
- package/dist/node/permissions/types/IEntityPermissionPolicy.js +3 -0
- package/dist/node/permissions/types/IEntityPermissionPolicy.js.map +1 -0
- package/dist/node/permissions/types/IPermissionPolicy.js +3 -0
- package/dist/node/permissions/types/IPermissionPolicy.js.map +1 -0
- package/dist/node/permissions/types/IPolicyCheck.js +3 -0
- package/dist/node/permissions/types/IPolicyCheck.js.map +1 -0
- package/dist/node/permissions/types/Permission.js +28 -0
- package/dist/node/permissions/types/Permission.js.map +1 -0
- package/dist/node/permissions/types/PlatformPrivilege.js +7 -0
- package/dist/node/permissions/types/PlatformPrivilege.js.map +1 -0
- package/dist/node/permissions/types/PolicyResponse.js +6 -0
- package/dist/node/permissions/types/PolicyResponse.js.map +1 -0
- package/dist/node/permissions/types/index.js +12 -0
- package/dist/node/permissions/types/index.js.map +1 -0
- package/dist/node/permissions/utils.js +31 -0
- package/dist/node/permissions/utils.js.map +1 -0
- package/dist/node/projects/HubProject.js +10 -19
- package/dist/node/projects/HubProject.js.map +1 -1
- package/dist/node/projects/_internal/ProjectPermissionPolicies.js +38 -0
- package/dist/node/projects/_internal/ProjectPermissionPolicies.js.map +1 -0
- package/dist/node/projects/_internal.js +48 -0
- package/dist/node/projects/_internal.js.map +1 -0
- package/dist/node/projects/edit.js +122 -0
- package/dist/node/projects/edit.js.map +1 -0
- package/dist/node/projects/fetch.js +110 -0
- package/dist/node/projects/fetch.js.map +1 -0
- package/dist/node/projects/index.js +2 -1
- package/dist/node/projects/index.js.map +1 -1
- package/dist/node/search/Catalog.js.map +1 -1
- package/dist/node/sites/HubSite.js +0 -13
- package/dist/node/sites/HubSite.js.map +1 -1
- package/dist/node/sites/_internal/SitesPermissionPolicies.js +37 -0
- package/dist/node/sites/_internal/SitesPermissionPolicies.js.map +1 -0
- package/dist/node/util.js +3 -1
- package/dist/node/util.js.map +1 -1
- package/dist/types/ArcGISContext.d.ts +23 -1
- package/dist/types/ArcGISContextManager.d.ts +6 -1
- package/dist/types/content/_internal.d.ts +15 -5
- package/dist/types/core/HubItemEntity.d.ts +29 -4
- package/dist/types/core/behaviors/IWithPermissionBehavior.d.ts +23 -35
- package/dist/types/core/behaviors/IWithStoreBehavior.d.ts +10 -10
- package/dist/types/core/fetchHubEntity.d.ts +11 -0
- package/dist/types/core/getTypeFromEntity.d.ts +8 -0
- package/dist/types/core/index.d.ts +2 -1
- package/dist/types/core/traits/IWithPermissions.d.ts +3 -3
- package/dist/types/core/types/HubEntity.d.ts +5 -0
- package/dist/types/core/types/HubEntityType.d.ts +1 -0
- package/dist/types/core/types/IHubContent.d.ts +2 -1
- package/dist/types/core/types/IHubItemEntity.d.ts +19 -2
- package/dist/types/core/types/ISystemStatus.d.ts +22 -0
- package/dist/types/core/types/index.d.ts +3 -2
- package/dist/types/index.d.ts +1 -0
- package/dist/types/initiatives/HubInitiative.d.ts +1 -7
- package/dist/types/permissions/HubPermissionPolicies.d.ts +11 -0
- package/dist/types/permissions/_internal/checkAuthentication.d.ts +11 -0
- package/dist/types/permissions/_internal/checkEdit.d.ts +11 -0
- package/dist/types/permissions/_internal/checkEntityPolicy.d.ts +9 -0
- package/dist/types/permissions/_internal/checkLicense.d.ts +10 -0
- package/dist/types/permissions/_internal/checkOwner.d.ts +11 -0
- package/dist/types/permissions/_internal/checkPrivileges.d.ts +11 -0
- package/dist/types/permissions/_internal/getPolicyResponseCode.d.ts +7 -0
- package/dist/types/permissions/checkPermission.d.ts +11 -0
- package/dist/types/permissions/index.d.ts +4 -0
- package/dist/types/permissions/types/HubLicense.d.ts +4 -0
- package/dist/types/permissions/types/IAccessResponse.d.ts +29 -0
- package/dist/types/permissions/types/IEntityPermissionPolicy.d.ts +22 -0
- package/dist/types/permissions/types/IPermissionPolicy.d.ts +48 -0
- package/dist/types/permissions/types/IPolicyCheck.d.ts +25 -0
- package/dist/types/permissions/types/Permission.d.ts +17 -0
- package/dist/types/permissions/types/PlatformPrivilege.d.ts +5 -0
- package/dist/types/permissions/types/PolicyResponse.d.ts +4 -0
- package/dist/types/permissions/types/index.d.ts +8 -0
- package/dist/types/permissions/utils.d.ts +18 -0
- package/dist/types/projects/HubProject.d.ts +1 -7
- package/dist/types/projects/_internal/ProjectPermissionPolicies.d.ts +7 -0
- package/dist/types/projects/_internal.d.ts +20 -0
- package/dist/types/projects/{HubProjects.d.ts → edit.d.ts} +1 -29
- package/dist/types/projects/fetch.d.ts +30 -0
- package/dist/types/projects/index.d.ts +2 -1
- package/dist/types/sites/HubSite.d.ts +1 -7
- package/dist/types/sites/_internal/SitesPermissionPolicies.d.ts +6 -0
- package/package.json +1 -1
- package/dist/esm/core/PermissionManager.js +0 -60
- package/dist/esm/core/PermissionManager.js.map +0 -1
- package/dist/esm/core/types/IHubPermission.js +0 -1
- package/dist/esm/core/types/IHubPermission.js.map +0 -1
- package/dist/esm/projects/HubProjects.js +0 -248
- package/dist/esm/projects/HubProjects.js.map +0 -1
- package/dist/node/core/PermissionManager.js +0 -64
- package/dist/node/core/PermissionManager.js.map +0 -1
- package/dist/node/core/types/IHubPermission.js.map +0 -1
- package/dist/node/projects/HubProjects.js +0 -258
- package/dist/node/projects/HubProjects.js.map +0 -1
- package/dist/types/core/PermissionManager.d.ts +0 -43
- package/dist/types/core/types/IHubPermission.d.ts +0 -23
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HubEntity } from "./types/HubEntity";
|
|
2
|
+
import { HubEntityType } from "./types/HubEntityType";
|
|
3
|
+
/**
|
|
4
|
+
* Given a HubEntity, return it's HubEntityType
|
|
5
|
+
* @param entity
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare function getTypeFromEntity(entity: HubEntity): HubEntityType;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IEntityPermissionPolicy } from "../../permissions";
|
|
2
2
|
/**
|
|
3
3
|
* Adds permissions property to an entity
|
|
4
4
|
*/
|
|
5
5
|
export interface IWithPermissions {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Array of permission policies that apply to the entity
|
|
8
8
|
*/
|
|
9
|
-
permissions
|
|
9
|
+
permissions?: IEntityPermissionPolicy[];
|
|
10
10
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type HubEntityType = "site" | "project" | "initiative" | "page";
|
|
@@ -15,7 +15,7 @@ export declare enum PublisherSource {
|
|
|
15
15
|
/**
|
|
16
16
|
* Data model for content
|
|
17
17
|
*/
|
|
18
|
-
export interface IHubContent extends Omit<IHubItemEntity, "schemaVersion">, IHubContentEnrichments, IItem {
|
|
18
|
+
export interface IHubContent extends Omit<IHubItemEntity, "schemaVersion" | "permissions">, IHubContentEnrichments, IItem {
|
|
19
19
|
/**
|
|
20
20
|
* The underlying portal item referenced by this content
|
|
21
21
|
*/
|
|
@@ -40,6 +40,7 @@ export interface IHubContent extends Omit<IHubItemEntity, "schemaVersion">, IHub
|
|
|
40
40
|
identifier: string;
|
|
41
41
|
/**
|
|
42
42
|
* Content visibility and access control, including groups
|
|
43
|
+
* NOTE: this needs to be reconciled with Hub permission system
|
|
43
44
|
*/
|
|
44
45
|
permissions: {
|
|
45
46
|
/** Visibility of the content */
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { IHubEntityBase } from "./IHubEntityBase";
|
|
2
2
|
import { IHubGeography } from "../../types";
|
|
3
3
|
import { AccessLevel } from "./types";
|
|
4
|
-
import { IWithViewSettings } from "../traits";
|
|
4
|
+
import { IWithPermissions, IWithViewSettings } from "../traits";
|
|
5
5
|
/**
|
|
6
6
|
* Properties exposed by Entities that are backed by Items
|
|
7
7
|
*/
|
|
8
|
-
export interface IHubItemEntity extends IHubEntityBase {
|
|
8
|
+
export interface IHubItemEntity extends IHubEntityBase, IWithPermissions {
|
|
9
9
|
/**
|
|
10
10
|
* Access level of the item ("private" | "org" | "public")
|
|
11
11
|
*/
|
|
@@ -29,6 +29,11 @@ export interface IHubItemEntity extends IHubEntityBase {
|
|
|
29
29
|
* Extent of the Entity
|
|
30
30
|
*/
|
|
31
31
|
extent?: number[][];
|
|
32
|
+
/**
|
|
33
|
+
* Platform derived based on current user's access to the entity
|
|
34
|
+
* if defined, it means the user can edit the entity
|
|
35
|
+
*/
|
|
36
|
+
itemControl: string;
|
|
32
37
|
/**
|
|
33
38
|
* Username of the owner of the item
|
|
34
39
|
*/
|
|
@@ -62,4 +67,16 @@ export interface IHubItemEntity extends IHubEntityBase {
|
|
|
62
67
|
* Project display properties
|
|
63
68
|
*/
|
|
64
69
|
view?: IWithViewSettings;
|
|
70
|
+
/**
|
|
71
|
+
* Can current user edit the entity
|
|
72
|
+
* Derived from `item.itemControl` = "admin" | "update"
|
|
73
|
+
* @readonly
|
|
74
|
+
*/
|
|
75
|
+
canEdit: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Can current user delete the entity
|
|
78
|
+
* Derived from `item.itemControl` = "admin"
|
|
79
|
+
* @readonly
|
|
80
|
+
*/
|
|
81
|
+
canDelete: boolean;
|
|
65
82
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What is the status of a subsystem
|
|
3
|
+
*/
|
|
4
|
+
export declare type SystemStatus = "online" | "offline" | "maintenance" | "not-available";
|
|
5
|
+
/**
|
|
6
|
+
* Hash of subsystems and their status
|
|
7
|
+
*/
|
|
8
|
+
export declare type HubSystemStatus = {
|
|
9
|
+
[key in HubSubsystem]: SystemStatus;
|
|
10
|
+
};
|
|
11
|
+
declare const validSubsystems: readonly ["discussions", "events", "initiatives", "items", "metrics", "notifications", "pages", "projects", "search", "sites"];
|
|
12
|
+
/**
|
|
13
|
+
* Defines values for HubSubsystem
|
|
14
|
+
*/
|
|
15
|
+
export declare type HubSubsystem = typeof validSubsystems[number];
|
|
16
|
+
/**
|
|
17
|
+
* Validate a Subsystem
|
|
18
|
+
* @param subsystem
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
export declare function isSubsystem(maybeSubsystem: string): boolean;
|
|
22
|
+
export {};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * from "./HubEntity";
|
|
2
|
+
export * from "./HubEntityType";
|
|
1
3
|
export * from "./IHubContent";
|
|
2
4
|
export * from "./IHubContentEnrichments";
|
|
3
5
|
export * from "./IHubEntityBase";
|
|
@@ -13,6 +15,5 @@ export * from "./IHubSiteTheme";
|
|
|
13
15
|
export * from "./IHubTimeline";
|
|
14
16
|
export * from "./IItemEnrichments";
|
|
15
17
|
export * from "./IServerEnrichments";
|
|
18
|
+
export * from "./ISystemStatus";
|
|
16
19
|
export * from "./types";
|
|
17
|
-
export * from "./IHubPermission";
|
|
18
|
-
export * from "../traits/IWithViewSettings";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IHubInitiative, IWithPermissionBehavior, IWithCatalogBehavior,
|
|
1
|
+
import { IHubInitiative, IWithPermissionBehavior, IWithCatalogBehavior, IWithStoreBehavior, IWithSharingBehavior } from "../core";
|
|
2
2
|
import { Catalog } from "../search/Catalog";
|
|
3
3
|
import { IArcGISContext } from "../ArcGISContext";
|
|
4
4
|
import { HubItemEntity } from "../core/HubItemEntity";
|
|
@@ -7,7 +7,6 @@ import { HubItemEntity } from "../core/HubItemEntity";
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class HubInitiative extends HubItemEntity<IHubInitiative> implements IWithStoreBehavior<IHubInitiative>, IWithPermissionBehavior, IWithCatalogBehavior, IWithSharingBehavior {
|
|
9
9
|
private _catalog;
|
|
10
|
-
private _permissionManager;
|
|
11
10
|
/**
|
|
12
11
|
* Private constructor so we don't have `new` all over the place. Allows for
|
|
13
12
|
* more flexibility in how we create the HubInitiativeManager over time.
|
|
@@ -19,11 +18,6 @@ export declare class HubInitiative extends HubItemEntity<IHubInitiative> impleme
|
|
|
19
18
|
* @returns Catalog
|
|
20
19
|
*/
|
|
21
20
|
get catalog(): Catalog;
|
|
22
|
-
/**
|
|
23
|
-
* PermissionManager instance for this Initiative. Note: Do not hold direct references to this object; always access it from the Initiative.
|
|
24
|
-
* @returns PermissionManager
|
|
25
|
-
*/
|
|
26
|
-
get permissions(): PermissionManager;
|
|
27
21
|
/**
|
|
28
22
|
* Create an instance from an IHubInitiative object
|
|
29
23
|
* @param json - JSON object to create a HubInitiative from
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IPermissionPolicy, Permission } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* All the permission policies for the Hub
|
|
4
|
+
*/
|
|
5
|
+
export declare const HubPermissionsPolicies: IPermissionPolicy[];
|
|
6
|
+
/**
|
|
7
|
+
* Get the policies defined for a specific permission
|
|
8
|
+
* @param permission
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
export declare function getPermissionPolicy(permission: Permission): IPermissionPolicy;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IArcGISContext } from "../../ArcGISContext";
|
|
2
|
+
import { HubEntity } from "../../core";
|
|
3
|
+
import { IPermissionPolicy, IPolicyCheck } from "../types";
|
|
4
|
+
/**
|
|
5
|
+
* Validate authentication policy
|
|
6
|
+
* @param policy
|
|
7
|
+
* @param context
|
|
8
|
+
* @param entity
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
export declare function checkAuthentication(policy: IPermissionPolicy, context: IArcGISContext, entity?: HubEntity): IPolicyCheck[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IArcGISContext } from "../../ArcGISContext";
|
|
2
|
+
import { HubEntity } from "../../core";
|
|
3
|
+
import { IPermissionPolicy, IPolicyCheck } from "../types";
|
|
4
|
+
/**
|
|
5
|
+
* Validate entityEdit policy
|
|
6
|
+
* @param policy
|
|
7
|
+
* @param context
|
|
8
|
+
* @param entity
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
export declare function checkEdit(policy: IPermissionPolicy, context: IArcGISContext, entity?: HubEntity): IPolicyCheck[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IArcGISContext } from "../../ArcGISContext";
|
|
2
|
+
import { IPolicyCheck, IEntityPermissionPolicy } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Validate user meets entity policy
|
|
5
|
+
* @param policy
|
|
6
|
+
* @param context
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare function checkEntityPolicy(policy: IEntityPermissionPolicy, context: IArcGISContext): IPolicyCheck;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IArcGISContext } from "../../ArcGISContext";
|
|
2
|
+
import { IPermissionPolicy, IPolicyCheck } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Validate license policy
|
|
5
|
+
* @param policy
|
|
6
|
+
* @param response
|
|
7
|
+
* @param context
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
export declare function checkLicense(policy: IPermissionPolicy, context: IArcGISContext): IPolicyCheck[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IArcGISContext } from "../../ArcGISContext";
|
|
2
|
+
import { HubEntity } from "../../core";
|
|
3
|
+
import { IPermissionPolicy, IPolicyCheck } from "../types";
|
|
4
|
+
/**
|
|
5
|
+
* Validate entityOwner policy
|
|
6
|
+
* @param policy
|
|
7
|
+
* @param context
|
|
8
|
+
* @param entity
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
export declare function checkOwner(policy: IPermissionPolicy, context: IArcGISContext, entity?: HubEntity): IPolicyCheck[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IArcGISContext } from "../../ArcGISContext";
|
|
2
|
+
import { HubEntity } from "../../core";
|
|
3
|
+
import { IPermissionPolicy, IPolicyCheck } from "../types";
|
|
4
|
+
/**
|
|
5
|
+
* Validate privilege policy
|
|
6
|
+
* @param policy
|
|
7
|
+
* @param context
|
|
8
|
+
* @param entity
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
export declare function checkPrivileges(policy: IPermissionPolicy, context: IArcGISContext, entity?: HubEntity): IPolicyCheck[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IArcGISContext } from "../ArcGISContext";
|
|
2
|
+
import { HubEntity } from "../core";
|
|
3
|
+
import { IAccessResponse, Permission } from "./types";
|
|
4
|
+
/**
|
|
5
|
+
* Check a permission against the system policies, and possibly an entity policy
|
|
6
|
+
* @param permission
|
|
7
|
+
* @param context
|
|
8
|
+
* @param entity
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
export declare function checkPermission(permission: Permission, context: IArcGISContext, entity?: HubEntity): IAccessResponse;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Permission } from "./Permission";
|
|
2
|
+
import { IPolicyCheck } from "./IPolicyCheck";
|
|
3
|
+
import { PolicyResponse } from "./PolicyResponse";
|
|
4
|
+
/**
|
|
5
|
+
* Response from a permission check
|
|
6
|
+
*/
|
|
7
|
+
export interface IAccessResponse {
|
|
8
|
+
/**
|
|
9
|
+
* Permission being checked
|
|
10
|
+
*/
|
|
11
|
+
permission: Permission;
|
|
12
|
+
/**
|
|
13
|
+
* Is the user allowed to perform the action
|
|
14
|
+
*/
|
|
15
|
+
access: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Code for the access response. Used for i18n and UX level messages
|
|
18
|
+
*/
|
|
19
|
+
code: string;
|
|
20
|
+
/**
|
|
21
|
+
* Reason for the access response
|
|
22
|
+
*/
|
|
23
|
+
response: PolicyResponse;
|
|
24
|
+
/**
|
|
25
|
+
* List of all the policies that were checked, and their responses
|
|
26
|
+
* For debugging / observability
|
|
27
|
+
*/
|
|
28
|
+
checks: IPolicyCheck[];
|
|
29
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Permission } from "./Permission";
|
|
2
|
+
/**
|
|
3
|
+
* Association of a Permission with a set of collaborators
|
|
4
|
+
*/
|
|
5
|
+
export interface IEntityPermissionPolicy {
|
|
6
|
+
/**
|
|
7
|
+
* Permission being granted
|
|
8
|
+
*/
|
|
9
|
+
permission: Permission;
|
|
10
|
+
/**
|
|
11
|
+
* Type of the collaboration - org, group, group-admin or user
|
|
12
|
+
*/
|
|
13
|
+
collaborationType: CollaborationType;
|
|
14
|
+
/**
|
|
15
|
+
* Id of the collaboration set
|
|
16
|
+
*/
|
|
17
|
+
collaborationId: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Type of collaboration set. Used when associating a permission with a set of collaborators
|
|
21
|
+
*/
|
|
22
|
+
export declare type CollaborationType = "user" | "group" | "group-admin" | "org";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { HubLicense } from "./HubLicense";
|
|
2
|
+
import { HubSubsystem } from "../../core/types/ISystemStatus";
|
|
3
|
+
import { Permission } from "./Permission";
|
|
4
|
+
import { PlatformPrivilege } from "./PlatformPrivilege";
|
|
5
|
+
/**
|
|
6
|
+
* Defines a system level policy for a specific permission.
|
|
7
|
+
* All conditions must be met for the permission to be granted. Additinonal conditions may be added by an entity to further
|
|
8
|
+
* limit access when the permission is checed in the contex to the entity.
|
|
9
|
+
* e.g. "hub:project:create" in the context of an Initiative, may further restrict to members of a specfic group
|
|
10
|
+
*/
|
|
11
|
+
export interface IPermissionPolicy {
|
|
12
|
+
/**
|
|
13
|
+
* Permission being defined
|
|
14
|
+
*/
|
|
15
|
+
permission: Permission;
|
|
16
|
+
/**
|
|
17
|
+
* What subsystems are required to be online for this permission to be granted
|
|
18
|
+
*/
|
|
19
|
+
subsystems: HubSubsystem[];
|
|
20
|
+
/**
|
|
21
|
+
* Must the user authenticated?
|
|
22
|
+
*/
|
|
23
|
+
authenticated: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* What licenses are required for this permission to be granted.
|
|
26
|
+
* This is checking the licese of the current user's org. It is not transitive to the entity being accessed.
|
|
27
|
+
* e.g. If a user is in a Partner "hub-basic" org, they can not create "premium" entities (e.g. Projects)
|
|
28
|
+
*/
|
|
29
|
+
licenses: HubLicense[];
|
|
30
|
+
/**
|
|
31
|
+
* Any platform level privileges required for this permission to be granted
|
|
32
|
+
* e.g. "portal:user:createItem"
|
|
33
|
+
*/
|
|
34
|
+
privileges?: PlatformPrivilege[];
|
|
35
|
+
/**
|
|
36
|
+
* Does the user need to be in a specific platform role to be granted this permission?
|
|
37
|
+
* This is likely extremely rare.
|
|
38
|
+
*/
|
|
39
|
+
roles?: string[];
|
|
40
|
+
/**
|
|
41
|
+
* Does the user require edit access to the entity to be granted this permission?
|
|
42
|
+
*/
|
|
43
|
+
entityEdit?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Does the user need to be the owner of the entity to be granted this permission?
|
|
46
|
+
*/
|
|
47
|
+
entityOwner?: boolean;
|
|
48
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { PolicyResponse } from "./PolicyResponse";
|
|
2
|
+
/**
|
|
3
|
+
* Information about a specific policy check, and its response
|
|
4
|
+
* Used for debugging / observability
|
|
5
|
+
*/
|
|
6
|
+
export interface IPolicyCheck {
|
|
7
|
+
/**
|
|
8
|
+
* Description of the policy being checked
|
|
9
|
+
* e.g. License Required: "hub-premium"
|
|
10
|
+
*/
|
|
11
|
+
name: string;
|
|
12
|
+
/**
|
|
13
|
+
* Value determined for the current user
|
|
14
|
+
* e.g. "hub-basic"
|
|
15
|
+
*/
|
|
16
|
+
value: string;
|
|
17
|
+
/**
|
|
18
|
+
* Policy Response code, for i18n
|
|
19
|
+
*/
|
|
20
|
+
code: string;
|
|
21
|
+
/**
|
|
22
|
+
* Policy Response string
|
|
23
|
+
*/
|
|
24
|
+
response: PolicyResponse;
|
|
25
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines the values for Permissions
|
|
3
|
+
* Note: This needs to be managed as a single list or typechecking does not work
|
|
4
|
+
* We use an array so we can check for valid permissions
|
|
5
|
+
*/
|
|
6
|
+
declare const validPermissions: readonly ["hub:site:create", "hub:site:delete", "hub:site:edit", "hub:site:view", "hub:project:create", "hub:project:delete", "hub:project:edit", "hub:project:view"];
|
|
7
|
+
/**
|
|
8
|
+
* Defines the possible values for Permissions
|
|
9
|
+
*/
|
|
10
|
+
export declare type Permission = typeof validPermissions[number];
|
|
11
|
+
/**
|
|
12
|
+
* Validate a Permission
|
|
13
|
+
* @param permission
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
export declare function isPermission(maybePermission: string): boolean;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type that defines Platform Privileges
|
|
3
|
+
* TODO: Ensure this is a complete list
|
|
4
|
+
*/
|
|
5
|
+
export declare type PlatformPrivilege = "opendata:user:designateGroup" | "opendata:user:openDataAdmin" | "portal:admin:assignToGroups" | "portal:admin:categorizeItems" | "portal:admin:changeUserRoles" | "portal:admin:createGPWebhook" | "portal:admin:createUpdateCapableGroup" | "portal:admin:deleteGroups" | "portal:admin:deleteItems" | "portal:admin:deleteUsers" | "portal:admin:disableUsers" | "portal:admin:inviteUsers" | "portal:admin:manageCollaborations" | "portal:admin:manageCredits" | "portal:admin:manageEnterpriseGroups" | "portal:admin:manageLicenses" | "portal:admin:manageRoles" | "portal:admin:manageSecurity" | "portal:admin:manageServers" | "portal:admin:manageUtilityServices" | "portal:admin:manageWebhooks" | "portal:admin:manageWebsite" | "portal:admin:reassignGroups" | "portal:admin:reassignItems" | "portal:admin:reassignUsers" | "portal:admin:shareToGroup" | "portal:admin:shareToOrg" | "portal:admin:shareToPublic" | "portal:admin:updateGroups" | "portal:admin:updateItemCategorySchema" | "portal:admin:updateItems" | "portal:admin:updateMemberCategorySchema" | "portal:admin:updateUsers" | "portal:admin:viewGroups" | "portal:admin:viewItems" | "portal:admin:viewUsers" | "portal:publisher:bulkPublishFromDataStores" | "portal:publisher:createFeatureWebhook" | "portal:publisher:publishBigDataAnalytics" | "portal:publisher:publishDynamicImagery" | "portal:publisher:publishFeatures" | "portal:publisher:publishFeeds" | "portal:publisher:publishKnowledgeGraph" | "portal:publisher:publishRealTimeAnalytics" | "portal:publisher:publishScenes" | "portal:publisher:publishServerGPServices" | "portal:publisher:publishServerServices" | "portal:publisher:publishTiledImagery" | "portal:publisher:publishTiles" | "portal:publisher:registerDataStores" | "portal:user:addExternalMembersToGroup" | "portal:user:categorizeItems" | "portal:user:createGroup" | "portal:user:createItem" | "portal:user:invitePartneredCollaborationMembers" | "portal:user:joinGroup" | "portal:user:joinNonOrgGroup" | "portal:user:reassignItems" | "portal:user:receiveItems" | "portal:user:runWebTool" | "portal:user:shareGroupToOrg" | "portal:user:shareGroupToPublic" | "portal:user:shareToGroup" | "portal:user:shareToOrg" | "portal:user:shareToPublic" | "portal:user:viewHostedFeatureServices" | "portal:user:viewHostedTileServices" | "portal:user:viewOrgGroups" | "portal:user:viewOrgItems" | "portal:user:viewOrgUsers" | "portal:user:viewTracks";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/**`
|
|
2
|
+
* Human readable response from a policy check
|
|
3
|
+
*/
|
|
4
|
+
export declare type PolicyResponse = "granted" | "org-member" | "not-org-member" | "group-member" | "not-group-member" | "not-group-admin" | "is-user" | "not-owner" | "not-licensed" | "not-licensed-available" | "not-available" | "not-granted" | "no-edit-access" | "invalid-permission" | "privilege-required" | "system-offline" | "system-maintenance" | "entity-required" | "not-authenticated";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./HubLicense";
|
|
2
|
+
export * from "./IAccessResponse";
|
|
3
|
+
export * from "./IEntityPermissionPolicy";
|
|
4
|
+
export * from "./IPermissionPolicy";
|
|
5
|
+
export * from "./IPolicyCheck";
|
|
6
|
+
export * from "./Permission";
|
|
7
|
+
export * from "./PlatformPrivilege";
|
|
8
|
+
export * from "./PolicyResponse";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IEntityPermissionPolicy, Permission } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Add a policy to an array of entity policies
|
|
4
|
+
* Returns a new array
|
|
5
|
+
* @param permissions
|
|
6
|
+
* @param policy
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare function addPermissionPolicy(permissions: IEntityPermissionPolicy[], policy: IEntityPermissionPolicy): IEntityPermissionPolicy[];
|
|
10
|
+
/**
|
|
11
|
+
* Remove a policy from an array of entity policies
|
|
12
|
+
* Returns a new array
|
|
13
|
+
* @param permissions
|
|
14
|
+
* @param permission
|
|
15
|
+
* @param id
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
18
|
+
export declare function removePermissionPolicy(permissions: IEntityPermissionPolicy[], permission: Permission, id: string): IEntityPermissionPolicy[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IHubProject, IWithPermissionBehavior, IWithCatalogBehavior,
|
|
1
|
+
import { IHubProject, IWithPermissionBehavior, IWithCatalogBehavior, IWithStoreBehavior, IWithSharingBehavior, UiSchemaElementOptions } from "../core";
|
|
2
2
|
import { Catalog } from "../search/Catalog";
|
|
3
3
|
import { IArcGISContext } from "../ArcGISContext";
|
|
4
4
|
import { HubItemEntity } from "../core/HubItemEntity";
|
|
@@ -8,7 +8,6 @@ import { EditorConfigType, IEditorConfig } from "../core/behaviors/IWithEditorBe
|
|
|
8
8
|
*/
|
|
9
9
|
export declare class HubProject extends HubItemEntity<IHubProject> implements IWithStoreBehavior<IHubProject>, IWithPermissionBehavior, IWithCatalogBehavior, IWithSharingBehavior {
|
|
10
10
|
private _catalog;
|
|
11
|
-
private _permissionManager;
|
|
12
11
|
/**
|
|
13
12
|
* Private constructor so we don't have `new` all over the place. Allows for
|
|
14
13
|
* more flexibility in how we create the HubProjectManager over time.
|
|
@@ -20,11 +19,6 @@ export declare class HubProject extends HubItemEntity<IHubProject> implements IW
|
|
|
20
19
|
* @returns
|
|
21
20
|
*/
|
|
22
21
|
get catalog(): Catalog;
|
|
23
|
-
/**
|
|
24
|
-
* PermissionManager instance for this project. Note: Do not hold direct references to this object; always access it from the project.
|
|
25
|
-
* @returns
|
|
26
|
-
*/
|
|
27
|
-
get permissions(): PermissionManager;
|
|
28
22
|
/**
|
|
29
23
|
* Create an instance from an IHubProject object
|
|
30
24
|
* @param json - JSON object to create a HubProject from
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
|
+
import { IHubProject } from "../core";
|
|
3
|
+
import { IPropertyMap } from "../core/_internal/PropertyMapper";
|
|
4
|
+
import { IModel } from "../types";
|
|
5
|
+
/**
|
|
6
|
+
* Given a model and a project, set various computed properties that can't be directly mapped
|
|
7
|
+
* @private
|
|
8
|
+
* @param model
|
|
9
|
+
* @param project
|
|
10
|
+
* @param requestOptions
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
export declare function computeProps(model: IModel, project: Partial<IHubProject>, requestOptions: IRequestOptions): IHubProject;
|
|
14
|
+
/**
|
|
15
|
+
* Returns an Array of IPropertyMap objects
|
|
16
|
+
* that define the projection of properties from a IModel to an IHubProject
|
|
17
|
+
* @returns
|
|
18
|
+
* @private
|
|
19
|
+
*/
|
|
20
|
+
export declare function getPropertyMap(): IPropertyMap[];
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { IUserRequestOptions } from "@esri/arcgis-rest-auth";
|
|
2
|
-
import {
|
|
3
|
-
import { IItem } from "@esri/arcgis-rest-portal";
|
|
4
|
-
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
|
+
import { EditorConfigType, UiSchemaElementOptions, IEditorConfig } from "../index";
|
|
5
3
|
import { IHubProject } from "../core/types";
|
|
6
|
-
import { IHubSearchResult } from "../search";
|
|
7
4
|
/**
|
|
8
5
|
* @private
|
|
9
6
|
* Create a new Hub Project item
|
|
@@ -21,13 +18,6 @@ export declare function createProject(partialProject: Partial<IHubProject>, requ
|
|
|
21
18
|
* @param requestOptions
|
|
22
19
|
*/
|
|
23
20
|
export declare function updateProject(project: IHubProject, requestOptions: IUserRequestOptions): Promise<IHubProject>;
|
|
24
|
-
/**
|
|
25
|
-
* @private
|
|
26
|
-
* Get a Hub Project by id or slug
|
|
27
|
-
* @param identifier item id or slug
|
|
28
|
-
* @param requestOptions
|
|
29
|
-
*/
|
|
30
|
-
export declare function fetchProject(identifier: string, requestOptions: IRequestOptions): Promise<IHubProject>;
|
|
31
21
|
/**
|
|
32
22
|
* @private
|
|
33
23
|
* Remove a Hub Project
|
|
@@ -35,24 +25,6 @@ export declare function fetchProject(identifier: string, requestOptions: IReques
|
|
|
35
25
|
* @param requestOptions
|
|
36
26
|
*/
|
|
37
27
|
export declare function deleteProject(id: string, requestOptions: IUserRequestOptions): Promise<void>;
|
|
38
|
-
/**
|
|
39
|
-
* @private
|
|
40
|
-
* Convert an Hub Project Item into a Hub Project, fetching any additional
|
|
41
|
-
* information that may be required
|
|
42
|
-
* @param item
|
|
43
|
-
* @param auth
|
|
44
|
-
* @returns
|
|
45
|
-
*/
|
|
46
|
-
export declare function convertItemToProject(item: IItem, requestOptions: IRequestOptions): Promise<IHubProject>;
|
|
47
|
-
/**
|
|
48
|
-
* @private
|
|
49
|
-
* Fetch project specific enrichments
|
|
50
|
-
* @param item
|
|
51
|
-
* @param include
|
|
52
|
-
* @param requestOptions
|
|
53
|
-
* @returns
|
|
54
|
-
*/
|
|
55
|
-
export declare function enrichProjectSearchResult(item: IItem, include: string[], requestOptions: IHubRequestOptions): Promise<IHubSearchResult>;
|
|
56
28
|
/**
|
|
57
29
|
* Get the editor config for for the HubProject entity.
|
|
58
30
|
* @param i18nScope Translation scope to be interpolated into the schemas
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
|
+
import { IItem } from "@esri/arcgis-rest-portal";
|
|
3
|
+
import { IHubProject } from "../core";
|
|
4
|
+
import { IHubSearchResult } from "../search";
|
|
5
|
+
import { IHubRequestOptions } from "../types";
|
|
6
|
+
/**
|
|
7
|
+
* @private
|
|
8
|
+
* Get a Hub Project by id or slug
|
|
9
|
+
* @param identifier item id or slug
|
|
10
|
+
* @param requestOptions
|
|
11
|
+
*/
|
|
12
|
+
export declare function fetchProject(identifier: string, requestOptions: IRequestOptions): Promise<IHubProject>;
|
|
13
|
+
/**
|
|
14
|
+
* @private
|
|
15
|
+
* Convert an Hub Project Item into a Hub Project, fetching any additional
|
|
16
|
+
* information that may be required
|
|
17
|
+
* @param item
|
|
18
|
+
* @param auth
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
export declare function convertItemToProject(item: IItem, requestOptions: IRequestOptions): Promise<IHubProject>;
|
|
22
|
+
/**
|
|
23
|
+
* @private
|
|
24
|
+
* Fetch project specific enrichments
|
|
25
|
+
* @param item
|
|
26
|
+
* @param include
|
|
27
|
+
* @param requestOptions
|
|
28
|
+
* @returns
|
|
29
|
+
*/
|
|
30
|
+
export declare function enrichProjectSearchResult(item: IItem, include: string[], requestOptions: IHubRequestOptions): Promise<IHubSearchResult>;
|