@esri/hub-common 13.46.2 → 14.1.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/ArcGISContext.js +8 -10
- package/dist/esm/ArcGISContext.js.map +1 -1
- package/dist/esm/ArcGISContextManager.js +8 -62
- package/dist/esm/ArcGISContextManager.js.map +1 -1
- package/dist/esm/content/_internal/ContentBusinessRules.js +3 -40
- package/dist/esm/content/_internal/ContentBusinessRules.js.map +1 -1
- package/dist/esm/content/_internal/getPropertyMap.js +1 -5
- package/dist/esm/content/_internal/getPropertyMap.js.map +1 -1
- package/dist/esm/content/compose.js +1 -0
- package/dist/esm/content/compose.js.map +1 -1
- package/dist/esm/core/HubItemEntity.js +0 -11
- package/dist/esm/core/HubItemEntity.js.map +1 -1
- package/dist/esm/core/traits/IWithFollowers.js +1 -0
- package/dist/esm/core/traits/IWithFollowers.js.map +1 -0
- package/dist/esm/core/types/ISystemStatus.js +0 -26
- package/dist/esm/core/types/ISystemStatus.js.map +1 -1
- package/dist/esm/discussions/_internal/DiscussionBusinessRules.js +0 -42
- package/dist/esm/discussions/_internal/DiscussionBusinessRules.js.map +1 -1
- package/dist/esm/discussions/_internal/computeProps.js +0 -5
- package/dist/esm/discussions/_internal/computeProps.js.map +1 -1
- package/dist/esm/groups/_internal/GroupBusinessRules.js +0 -41
- package/dist/esm/groups/_internal/GroupBusinessRules.js.map +1 -1
- package/dist/esm/groups/_internal/computeProps.js +0 -5
- package/dist/esm/groups/_internal/computeProps.js.map +1 -1
- package/dist/esm/groups/_internal/getPropertyMap.js +1 -0
- package/dist/esm/groups/_internal/getPropertyMap.js.map +1 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/initiatives/_internal/InitiativeBusinessRules.js +0 -48
- package/dist/esm/initiatives/_internal/InitiativeBusinessRules.js.map +1 -1
- package/dist/esm/initiatives/_internal/computeProps.js +3 -7
- package/dist/esm/initiatives/_internal/computeProps.js.map +1 -1
- package/dist/esm/initiatives/_internal/getPropertyMap.js +4 -4
- package/dist/esm/initiatives/_internal/getPropertyMap.js.map +1 -1
- package/dist/esm/pages/_internal/PageBusinessRules.js +0 -42
- package/dist/esm/pages/_internal/PageBusinessRules.js.map +1 -1
- package/dist/esm/pages/_internal/computeProps.js +3 -7
- package/dist/esm/pages/_internal/computeProps.js.map +1 -1
- package/dist/esm/permissions/HubPermissionPolicies.js +3 -5
- package/dist/esm/permissions/HubPermissionPolicies.js.map +1 -1
- package/dist/esm/permissions/PlatformPermissionPolicies.js +100 -100
- package/dist/esm/permissions/PlatformPermissionPolicies.js.map +1 -1
- package/dist/esm/permissions/_internal/getPolicyResponseCode.js +0 -4
- package/dist/esm/permissions/_internal/getPolicyResponseCode.js.map +1 -1
- package/dist/esm/permissions/_internal/processEntityFeatures.js.map +1 -1
- package/dist/esm/permissions/checkPermission.js +7 -3
- package/dist/esm/permissions/checkPermission.js.map +1 -1
- package/dist/esm/projects/_internal/ProjectBusinessRules.js +1 -55
- package/dist/esm/projects/_internal/ProjectBusinessRules.js.map +1 -1
- package/dist/esm/projects/_internal/computeProps.js +3 -7
- package/dist/esm/projects/_internal/computeProps.js.map +1 -1
- package/dist/esm/projects/_internal/getPropertyMap.js +2 -2
- package/dist/esm/projects/_internal/getPropertyMap.js.map +1 -1
- package/dist/esm/sites/_internal/SiteBusinessRules.js +29 -48
- package/dist/esm/sites/_internal/SiteBusinessRules.js.map +1 -1
- package/dist/esm/sites/_internal/computeProps.js +3 -8
- package/dist/esm/sites/_internal/computeProps.js.map +1 -1
- package/dist/esm/sites/_internal/getPropertyMap.js +8 -8
- package/dist/esm/sites/_internal/getPropertyMap.js.map +1 -1
- package/dist/node/ArcGISContext.js +8 -10
- package/dist/node/ArcGISContext.js.map +1 -1
- package/dist/node/ArcGISContextManager.js +8 -62
- package/dist/node/ArcGISContextManager.js.map +1 -1
- package/dist/node/content/_internal/ContentBusinessRules.js +4 -41
- package/dist/node/content/_internal/ContentBusinessRules.js.map +1 -1
- package/dist/node/content/_internal/getPropertyMap.js +1 -5
- package/dist/node/content/_internal/getPropertyMap.js.map +1 -1
- package/dist/node/content/compose.js +1 -0
- package/dist/node/content/compose.js.map +1 -1
- package/dist/node/core/HubItemEntity.js +0 -11
- package/dist/node/core/HubItemEntity.js.map +1 -1
- package/dist/node/core/traits/IWithFollowers.js +3 -0
- package/dist/node/core/traits/IWithFollowers.js.map +1 -0
- package/dist/node/core/types/ISystemStatus.js +1 -28
- package/dist/node/core/types/ISystemStatus.js.map +1 -1
- package/dist/node/discussions/_internal/DiscussionBusinessRules.js +1 -43
- package/dist/node/discussions/_internal/DiscussionBusinessRules.js.map +1 -1
- package/dist/node/discussions/_internal/computeProps.js +0 -5
- package/dist/node/discussions/_internal/computeProps.js.map +1 -1
- package/dist/node/groups/_internal/GroupBusinessRules.js +1 -42
- package/dist/node/groups/_internal/GroupBusinessRules.js.map +1 -1
- package/dist/node/groups/_internal/computeProps.js +0 -5
- package/dist/node/groups/_internal/computeProps.js.map +1 -1
- package/dist/node/groups/_internal/getPropertyMap.js +1 -0
- package/dist/node/groups/_internal/getPropertyMap.js.map +1 -1
- package/dist/node/index.js +0 -1
- package/dist/node/index.js.map +1 -1
- package/dist/node/initiatives/_internal/InitiativeBusinessRules.js +1 -49
- package/dist/node/initiatives/_internal/InitiativeBusinessRules.js.map +1 -1
- package/dist/node/initiatives/_internal/computeProps.js +3 -7
- package/dist/node/initiatives/_internal/computeProps.js.map +1 -1
- package/dist/node/initiatives/_internal/getPropertyMap.js +4 -4
- package/dist/node/initiatives/_internal/getPropertyMap.js.map +1 -1
- package/dist/node/pages/_internal/PageBusinessRules.js +1 -43
- package/dist/node/pages/_internal/PageBusinessRules.js.map +1 -1
- package/dist/node/pages/_internal/computeProps.js +3 -7
- package/dist/node/pages/_internal/computeProps.js.map +1 -1
- package/dist/node/permissions/HubPermissionPolicies.js +3 -5
- package/dist/node/permissions/HubPermissionPolicies.js.map +1 -1
- package/dist/node/permissions/PlatformPermissionPolicies.js +100 -100
- package/dist/node/permissions/PlatformPermissionPolicies.js.map +1 -1
- package/dist/node/permissions/_internal/getPolicyResponseCode.js +0 -4
- package/dist/node/permissions/_internal/getPolicyResponseCode.js.map +1 -1
- package/dist/node/permissions/_internal/processEntityFeatures.js.map +1 -1
- package/dist/node/permissions/checkPermission.js +7 -3
- package/dist/node/permissions/checkPermission.js.map +1 -1
- package/dist/node/projects/_internal/ProjectBusinessRules.js +2 -56
- package/dist/node/projects/_internal/ProjectBusinessRules.js.map +1 -1
- package/dist/node/projects/_internal/computeProps.js +3 -7
- package/dist/node/projects/_internal/computeProps.js.map +1 -1
- package/dist/node/projects/_internal/getPropertyMap.js +2 -2
- package/dist/node/projects/_internal/getPropertyMap.js.map +1 -1
- package/dist/node/sites/_internal/SiteBusinessRules.js +30 -49
- package/dist/node/sites/_internal/SiteBusinessRules.js.map +1 -1
- package/dist/node/sites/_internal/computeProps.js +3 -8
- package/dist/node/sites/_internal/computeProps.js.map +1 -1
- package/dist/node/sites/_internal/getPropertyMap.js +8 -8
- package/dist/node/sites/_internal/getPropertyMap.js.map +1 -1
- package/dist/types/ArcGISContext.d.ts +16 -17
- package/dist/types/ArcGISContextManager.d.ts +7 -7
- package/dist/types/content/_internal/ContentBusinessRules.d.ts +3 -16
- package/dist/types/content/_internal/internalContentUtils.d.ts +8 -9
- package/dist/types/core/HubItemEntity.d.ts +2 -9
- package/dist/types/core/behaviors/IWithPermissionBehavior.d.ts +0 -11
- package/dist/types/core/traits/IWithFollowers.d.ts +7 -0
- package/dist/types/core/traits/IWithPermissions.d.ts +3 -7
- package/dist/types/core/types/IHubSite.d.ts +2 -1
- package/dist/types/core/types/ISystemStatus.d.ts +1 -21
- package/dist/types/discussions/_internal/DiscussionBusinessRules.d.ts +0 -17
- package/dist/types/groups/_internal/GroupBusinessRules.d.ts +0 -16
- package/dist/types/index.d.ts +0 -1
- package/dist/types/initiatives/_internal/InitiativeBusinessRules.d.ts +2 -17
- package/dist/types/pages/_internal/PageBusinessRules.d.ts +2 -19
- package/dist/types/permissions/_internal/processEntityFeatures.d.ts +2 -2
- package/dist/types/permissions/checkPermission.d.ts +12 -2
- package/dist/types/permissions/types/IPermissionAccessResponse.d.ts +1 -2
- package/dist/types/permissions/types/IPermissionPolicy.d.ts +10 -9
- package/dist/types/permissions/types/PolicyResponse.d.ts +1 -1
- package/dist/types/projects/_internal/ProjectBusinessRules.d.ts +2 -19
- package/dist/types/sites/_internal/SiteBusinessRules.d.ts +3 -20
- package/package.json +1 -1
- package/dist/esm/capabilities/_internal/checkCapabilityAccess.js +0 -49
- package/dist/esm/capabilities/_internal/checkCapabilityAccess.js.map +0 -1
- package/dist/esm/capabilities/_internal/index.js +0 -2
- package/dist/esm/capabilities/_internal/index.js.map +0 -1
- package/dist/esm/capabilities/checkCapability.js +0 -53
- package/dist/esm/capabilities/checkCapability.js.map +0 -1
- package/dist/esm/capabilities/getWorkspaceCapabilities.js +0 -48
- package/dist/esm/capabilities/getWorkspaceCapabilities.js.map +0 -1
- package/dist/esm/capabilities/index.js +0 -5
- package/dist/esm/capabilities/index.js.map +0 -1
- package/dist/esm/capabilities/processEntityCapabilities.js +0 -27
- package/dist/esm/capabilities/processEntityCapabilities.js.map +0 -1
- package/dist/esm/capabilities/types.js +0 -26
- package/dist/esm/capabilities/types.js.map +0 -1
- package/dist/node/capabilities/_internal/checkCapabilityAccess.js +0 -53
- package/dist/node/capabilities/_internal/checkCapabilityAccess.js.map +0 -1
- package/dist/node/capabilities/_internal/index.js +0 -5
- package/dist/node/capabilities/_internal/index.js.map +0 -1
- package/dist/node/capabilities/checkCapability.js +0 -57
- package/dist/node/capabilities/checkCapability.js.map +0 -1
- package/dist/node/capabilities/getWorkspaceCapabilities.js +0 -52
- package/dist/node/capabilities/getWorkspaceCapabilities.js.map +0 -1
- package/dist/node/capabilities/index.js +0 -8
- package/dist/node/capabilities/index.js.map +0 -1
- package/dist/node/capabilities/processEntityCapabilities.js +0 -31
- package/dist/node/capabilities/processEntityCapabilities.js.map +0 -1
- package/dist/node/capabilities/types.js +0 -30
- package/dist/node/capabilities/types.js.map +0 -1
- package/dist/types/capabilities/_internal/checkCapabilityAccess.d.ts +0 -11
- package/dist/types/capabilities/_internal/index.d.ts +0 -1
- package/dist/types/capabilities/checkCapability.d.ts +0 -10
- package/dist/types/capabilities/getWorkspaceCapabilities.d.ts +0 -16
- package/dist/types/capabilities/index.d.ts +0 -4
- package/dist/types/capabilities/processEntityCapabilities.d.ts +0 -8
- package/dist/types/capabilities/types.d.ts +0 -57
|
@@ -1,21 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IPermissionPolicy } from "../../permissions";
|
|
1
|
+
import { IFeatureFlags, IPermissionPolicy } from "../../permissions";
|
|
3
2
|
/**
|
|
4
|
-
* Default
|
|
5
|
-
* This hash is combined with the capabilities hash stored in the item data. Regardless of what
|
|
6
|
-
* properties are defined in the item data, only the capabilities defined here will be available
|
|
7
|
-
* @private
|
|
8
|
-
* TODO: remove with Capabilities
|
|
9
|
-
*/
|
|
10
|
-
export declare const ContentDefaultCapabilities: EntityCapabilities;
|
|
11
|
-
/**
|
|
12
|
-
* List of all the Content Capability Permissions
|
|
13
|
-
* These are considered Hub Business Rules and are not intended
|
|
14
|
-
* to be modified by consumers
|
|
15
|
-
* TODO: remove with Capabilities
|
|
16
|
-
* @private
|
|
3
|
+
* Default features for a Content item. Intentionally empty to prevent overriding and adding features
|
|
17
4
|
*/
|
|
18
|
-
export declare const
|
|
5
|
+
export declare const ContentDefaultFeatures: IFeatureFlags;
|
|
19
6
|
/**
|
|
20
7
|
* Content Permission Policies
|
|
21
8
|
* These define the requirements any user must meet to perform related actions
|
|
@@ -82,28 +82,27 @@ export declare const setContentBoundary: (content: IHubContent, boundary: Geogra
|
|
|
82
82
|
owner: string;
|
|
83
83
|
url?: string;
|
|
84
84
|
id: string;
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
canEdit: boolean;
|
|
86
|
+
name: string;
|
|
87
87
|
access?: import("../../core").AccessLevel;
|
|
88
|
-
culture?: string;
|
|
89
88
|
description?: string;
|
|
90
|
-
extent?: number[][];
|
|
91
89
|
tags: string[];
|
|
90
|
+
type: string;
|
|
91
|
+
culture?: string;
|
|
92
|
+
extent?: number[][];
|
|
93
|
+
itemControl: string;
|
|
92
94
|
thumbnailUrl?: string;
|
|
93
95
|
thumbnail?: string;
|
|
94
96
|
typeKeywords?: string[];
|
|
95
|
-
canEdit: boolean;
|
|
96
97
|
canDelete: boolean;
|
|
97
98
|
location?: import("../../core").IHubLocation;
|
|
99
|
+
orgId?: string;
|
|
98
100
|
protected?: boolean;
|
|
99
|
-
name: string;
|
|
100
101
|
createdDate: Date;
|
|
101
102
|
createdDateSource: string;
|
|
102
103
|
updatedDate: Date;
|
|
103
104
|
updatedDateSource: string;
|
|
104
|
-
|
|
105
|
-
features?: import("../..").IEntityFeatures;
|
|
106
|
-
capabilities?: import("../..").EntityCapabilities;
|
|
105
|
+
features?: import("../..").IFeatureFlags;
|
|
107
106
|
isDiscussable?: boolean;
|
|
108
107
|
statistics?: any;
|
|
109
108
|
data?: {
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { IGroup } from "@esri/arcgis-rest-portal";
|
|
2
2
|
import { IArcGISContext } from "../ArcGISContext";
|
|
3
|
-
import { Capability, ICapabilityAccessResponse } from "../capabilities";
|
|
4
3
|
import { IPermissionAccessResponse, IEntityPermissionPolicy, Permission } from "../permissions";
|
|
5
|
-
import { IWithSharingBehavior, IWithStoreBehavior, IWithFeaturedImageBehavior, IWithPermissionBehavior
|
|
4
|
+
import { IWithSharingBehavior, IWithStoreBehavior, IWithFeaturedImageBehavior, IWithPermissionBehavior } from "./behaviors";
|
|
6
5
|
import { IWithThumbnailBehavior } from "./behaviors/IWithThumbnailBehavior";
|
|
7
6
|
import { IHubItemEntity, SettableAccessLevel } from "./types";
|
|
8
7
|
import { IWithDiscussionsBehavior } from "./behaviors/IWithDiscussionsBehavior";
|
|
9
8
|
/**
|
|
10
9
|
* Base class for all Hub Entities backed by items
|
|
11
10
|
*/
|
|
12
|
-
export declare abstract class HubItemEntity<T extends IHubItemEntity> implements IWithStoreBehavior<T>, IWithSharingBehavior, IWithThumbnailBehavior, IWithFeaturedImageBehavior, IWithPermissionBehavior,
|
|
11
|
+
export declare abstract class HubItemEntity<T extends IHubItemEntity> implements IWithStoreBehavior<T>, IWithSharingBehavior, IWithThumbnailBehavior, IWithFeaturedImageBehavior, IWithPermissionBehavior, IWithDiscussionsBehavior {
|
|
13
12
|
protected context: IArcGISContext;
|
|
14
13
|
protected entity: T;
|
|
15
14
|
protected isDestroyed: boolean;
|
|
@@ -43,12 +42,6 @@ export declare abstract class HubItemEntity<T extends IHubItemEntity> implements
|
|
|
43
42
|
* @param id
|
|
44
43
|
*/
|
|
45
44
|
removePermissionPolicy(permission: Permission, id: string): void;
|
|
46
|
-
/**
|
|
47
|
-
* DEPRECATED: use checkPermission instead
|
|
48
|
-
* Check if the current user can access a specific capability
|
|
49
|
-
* @param capability
|
|
50
|
-
*/
|
|
51
|
-
checkCapability(capability: Capability): ICapabilityAccessResponse;
|
|
52
45
|
/**
|
|
53
46
|
* Return the entity id
|
|
54
47
|
*/
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IPermissionAccessResponse, IEntityPermissionPolicy, Permission } from "../../permissions";
|
|
2
|
-
import { Capability, ICapabilityAccessResponse } from "../../capabilities";
|
|
3
2
|
/**
|
|
4
3
|
* Composable behavior that adds permissions to an entity
|
|
5
4
|
*/
|
|
@@ -27,13 +26,3 @@ export interface IWithPermissionBehavior {
|
|
|
27
26
|
*/
|
|
28
27
|
removePermissionPolicy(permission: Permission, id: string): void;
|
|
29
28
|
}
|
|
30
|
-
/**
|
|
31
|
-
* DEPRECATED: Composable behavior that adds capabilities to an entity
|
|
32
|
-
*/
|
|
33
|
-
export interface IWithCapabilityBehavior {
|
|
34
|
-
/**
|
|
35
|
-
* Is a specific capability available and enabled for the this entity?
|
|
36
|
-
* @param capability
|
|
37
|
-
*/
|
|
38
|
-
checkCapability(capability: Capability): ICapabilityAccessResponse;
|
|
39
|
-
}
|
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { EntityCapabilities } from "../../capabilities";
|
|
1
|
+
import { IFeatureFlags, IEntityPermissionPolicy } from "../../permissions";
|
|
3
2
|
/**
|
|
4
3
|
* Adds permissions property to an entity
|
|
5
4
|
*/
|
|
6
5
|
export interface IWithPermissions {
|
|
7
6
|
/**
|
|
8
7
|
* Array of permission policies that apply to the entity
|
|
8
|
+
* Only permissions with `entity
|
|
9
9
|
*/
|
|
10
10
|
permissions?: IEntityPermissionPolicy[];
|
|
11
11
|
/**
|
|
12
12
|
* We need a means to enable / disable the "feature/capability" represented by a permission
|
|
13
13
|
* for an entity. e.g. we want to disable events for a site, so we have `hub:site:events`: false
|
|
14
14
|
*/
|
|
15
|
-
features?:
|
|
16
|
-
/**
|
|
17
|
-
* DEPRECATEDL use `features` instead
|
|
18
|
-
*/
|
|
19
|
-
capabilities?: EntityCapabilities;
|
|
15
|
+
features?: IFeatureFlags;
|
|
20
16
|
}
|
|
@@ -2,11 +2,12 @@ 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
4
|
import { IHubItemEntity } from "./IHubItemEntity";
|
|
5
|
+
import { IWithFollowers } from "../traits/IWithFollowers";
|
|
5
6
|
/**
|
|
6
7
|
* DRAFT: Under development and more properties will likely be added
|
|
7
8
|
* @internal
|
|
8
9
|
*/
|
|
9
|
-
export interface IHubSite extends IHubItemEntity, IWithSlug, IWithCatalog, IWithLayout, IWithPermissions, IWithVersioningBehavior {
|
|
10
|
+
export interface IHubSite extends IHubItemEntity, IWithSlug, IWithCatalog, IWithLayout, IWithPermissions, IWithVersioningBehavior, IWithFollowers {
|
|
10
11
|
/**
|
|
11
12
|
* Array of minimal page objects
|
|
12
13
|
*/
|
|
@@ -3,27 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export declare type SystemStatus = "online" | "offline" | "maintenance" | "not-available";
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
* Hash of subsystems and their status
|
|
8
|
-
*/
|
|
9
|
-
export declare type HubSystemStatus = {
|
|
10
|
-
[key in HubSubsystem]: SystemStatus;
|
|
11
|
-
};
|
|
12
|
-
declare const validSubsystems: readonly ["content", "discussions", "events", "initiatives", "items", "metrics", "notifications", "pages", "projects", "search", "sites", "groups", "platform"];
|
|
13
|
-
/**
|
|
14
|
-
* * DEPRECATED: use HubService instead
|
|
15
|
-
* Defines values for HubSubsystem
|
|
16
|
-
*/
|
|
17
|
-
export declare type HubSubsystem = (typeof validSubsystems)[number];
|
|
18
|
-
/**
|
|
19
|
-
* * DEPRECATED: use isHubService instead
|
|
20
|
-
* Validate a Subsystem
|
|
21
|
-
* @param subsystem
|
|
22
|
-
* @returns
|
|
23
|
-
*/
|
|
24
|
-
export declare function isSubsystem(maybeSubsystem: string): boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Hash of subsystems and their status
|
|
6
|
+
* Hash of Services and their status
|
|
27
7
|
*/
|
|
28
8
|
export declare type HubServiceStatus = {
|
|
29
9
|
[key in HubService]: SystemStatus;
|
|
@@ -1,21 +1,4 @@
|
|
|
1
|
-
import { EntityCapabilities, ICapabilityPermission } from "../../capabilities";
|
|
2
1
|
import { IPermissionPolicy } from "../../permissions";
|
|
3
|
-
/**
|
|
4
|
-
* Default capabilities for a Discussion. If not listed here, the capability will not be available
|
|
5
|
-
* This hash is combined with the capabilities hash stored in the item data. Regardless of what
|
|
6
|
-
* properties are defined in the item data, only the capabilities defined here will be available
|
|
7
|
-
* @private
|
|
8
|
-
* TODO: Remove capabilities
|
|
9
|
-
*/
|
|
10
|
-
export declare const DiscussionDefaultCapabilities: EntityCapabilities;
|
|
11
|
-
/**
|
|
12
|
-
* List of all the Discussion Capability Permissions
|
|
13
|
-
* These are considered Hub Business Rules and are not intended
|
|
14
|
-
* to be modified by consumers
|
|
15
|
-
* TODO: Remove capabilities
|
|
16
|
-
* @private
|
|
17
|
-
*/
|
|
18
|
-
export declare const DiscussionCapabilityPermissions: ICapabilityPermission[];
|
|
19
2
|
/**
|
|
20
3
|
* Discussion Permission Policies
|
|
21
4
|
* These define the requirements any user must meet to perform related actions
|
|
@@ -1,20 +1,4 @@
|
|
|
1
|
-
import { EntityCapabilities, ICapabilityPermission } from "../../capabilities";
|
|
2
1
|
import { IPermissionPolicy } from "../../permissions";
|
|
3
|
-
/**
|
|
4
|
-
* Default capabilities for a Group.
|
|
5
|
-
* If not listed here, the capability will not be available
|
|
6
|
-
* TODO: Remove capabilities
|
|
7
|
-
* @private
|
|
8
|
-
*/
|
|
9
|
-
export declare const GroupDefaultCapabilities: EntityCapabilities;
|
|
10
|
-
/**
|
|
11
|
-
* List of all the Group Capability Permissions
|
|
12
|
-
* These are considered Hub Business Rules and are not intended
|
|
13
|
-
* to be modified by consumers
|
|
14
|
-
* TODO: Remove capabilities
|
|
15
|
-
* @private
|
|
16
|
-
*/
|
|
17
|
-
export declare const GroupCapabilityPermissions: ICapabilityPermission[];
|
|
18
2
|
/**
|
|
19
3
|
* Group Permission Policies
|
|
20
4
|
* These define the requirements any user must meet to perform related actions
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,23 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IEntityFeatures, IPermissionPolicy } from "../../permissions";
|
|
3
|
-
/**
|
|
4
|
-
* Default capabilities for a Initiative. If not listed here, the capability will not be available
|
|
5
|
-
* This hash is combined with the capabilities hash stored in the item data. Regardless of what
|
|
6
|
-
* properties are defined in the item data, only the capabilities defined here will be available
|
|
7
|
-
* @private
|
|
8
|
-
*/
|
|
9
|
-
export declare const InitiativeDefaultCapabilities: EntityCapabilities;
|
|
10
|
-
/**
|
|
11
|
-
* List of all the Initiative Capability Permissions
|
|
12
|
-
* These are considered Hub Business Rules and are not intended
|
|
13
|
-
* to be modified by consumers
|
|
14
|
-
* @private
|
|
15
|
-
*/
|
|
16
|
-
export declare const InitiativeCapabilityPermissions: ICapabilityPermission[];
|
|
1
|
+
import { IFeatureFlags, IPermissionPolicy } from "../../permissions";
|
|
17
2
|
/**
|
|
18
3
|
* Default features for a Initiative. These are the features that can be enabled / disabled by the entity owner
|
|
19
4
|
*/
|
|
20
|
-
export declare const InitiativeDefaultFeatures:
|
|
5
|
+
export declare const InitiativeDefaultFeatures: IFeatureFlags;
|
|
21
6
|
/**
|
|
22
7
|
* Initiative Permission Policies
|
|
23
8
|
* These define the requirements any user must meet to perform related actions
|
|
@@ -1,25 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IEntityFeatures, IPermissionPolicy } from "../../permissions";
|
|
3
|
-
/**
|
|
4
|
-
* Default capabilities for a Page. If not listed here, the capability will not be available
|
|
5
|
-
* This hash is combined with the capabilities hash stored in the item data. Regardless of what
|
|
6
|
-
* properties are defined in the item data, only the capabilities defined here will be available
|
|
7
|
-
* @private
|
|
8
|
-
* TODO: Remove capabilities
|
|
9
|
-
*/
|
|
10
|
-
export declare const PageDefaultCapabilities: EntityCapabilities;
|
|
11
|
-
/**
|
|
12
|
-
* List of all the Page Capability Permissions
|
|
13
|
-
* These are considered Hub Business Rules and are not intended
|
|
14
|
-
* to be modified by consumers
|
|
15
|
-
* TODO: Remove capabilities
|
|
16
|
-
* @private
|
|
17
|
-
*/
|
|
18
|
-
export declare const PageCapabilityPermissions: ICapabilityPermission[];
|
|
1
|
+
import { IFeatureFlags, IPermissionPolicy } from "../../permissions";
|
|
19
2
|
/**
|
|
20
3
|
* Default features for a Project. These are the features that can be enabled / disabled by the entity owner
|
|
21
4
|
*/
|
|
22
|
-
export declare const PageDefaultFeatures:
|
|
5
|
+
export declare const PageDefaultFeatures: IFeatureFlags;
|
|
23
6
|
/**
|
|
24
7
|
* Page Permission Policies
|
|
25
8
|
* These define the requirements any user must meet to perform related actions
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IFeatureFlags } from "../types/IPermissionPolicy";
|
|
2
2
|
/**
|
|
3
3
|
* Take an entity's features and merge them with the default features ensuring
|
|
4
4
|
* that only the featires defined in the business rules are allowed through.
|
|
@@ -6,4 +6,4 @@ import { IEntityFeatures } from "../types/IPermissionPolicy";
|
|
|
6
6
|
* @param defaultFeatures
|
|
7
7
|
* @returns
|
|
8
8
|
*/
|
|
9
|
-
export declare function processEntityFeatures(entityFeatures:
|
|
9
|
+
export declare function processEntityFeatures(entityFeatures: IFeatureFlags, defaultFeatures: IFeatureFlags): IFeatureFlags;
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import { IArcGISContext } from "../ArcGISContext";
|
|
2
2
|
import { IPermissionAccessResponse, Permission } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Type to allow either an entity or and entity and label to be
|
|
5
|
+
* passed into `checkPermission`
|
|
6
|
+
*/
|
|
7
|
+
export declare type EntityOrOptions = Record<string, any> | {
|
|
8
|
+
entity?: Record<string, any>;
|
|
9
|
+
label: string;
|
|
10
|
+
};
|
|
3
11
|
/**
|
|
4
12
|
* Check a permission against the system policies, and possibly an entity policy
|
|
13
|
+
* Note: Calls that fail will automatically be logged to the console. Additional
|
|
14
|
+
* context for the call can be passed via `.label` on the `entityOrOptions` argument.
|
|
5
15
|
* @param permission
|
|
6
16
|
* @param context
|
|
7
|
-
* @param
|
|
17
|
+
* @param entityOrOptions
|
|
8
18
|
* @returns
|
|
9
19
|
*/
|
|
10
|
-
export declare function checkPermission(permission: Permission, context: IArcGISContext,
|
|
20
|
+
export declare function checkPermission(permission: Permission, context: IArcGISContext, entityOrOptions?: EntityOrOptions): IPermissionAccessResponse;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Permission } from "./Permission";
|
|
2
|
-
import { Capability } from "../../capabilities";
|
|
3
2
|
import { IAccessResponse } from "../../core/types/IAccessResponse";
|
|
4
3
|
import { IPolicyCheck } from "./IPolicyCheck";
|
|
5
4
|
/**
|
|
@@ -9,7 +8,7 @@ export interface IPermissionAccessResponse extends IAccessResponse {
|
|
|
9
8
|
/**
|
|
10
9
|
* Permission being checked
|
|
11
10
|
*/
|
|
12
|
-
policy: Permission
|
|
11
|
+
policy: Permission;
|
|
13
12
|
/**
|
|
14
13
|
* List of all the policies that were checked, and their responses
|
|
15
14
|
* For debugging / observability
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HubLicense } from "./HubLicense";
|
|
2
|
-
import { HubService
|
|
2
|
+
import { HubService } from "../../core/types/ISystemStatus";
|
|
3
3
|
import { Permission } from "./Permission";
|
|
4
4
|
import { PlatformPrivilege } from "./PlatformPrivilege";
|
|
5
5
|
/**
|
|
@@ -17,10 +17,6 @@ export interface IPermissionPolicy {
|
|
|
17
17
|
* Parent permissions this permission is dependent on
|
|
18
18
|
*/
|
|
19
19
|
dependencies?: Permission[];
|
|
20
|
-
/**
|
|
21
|
-
* DEPRECATED: What subsystems are required to be online for this permission to be granted
|
|
22
|
-
*/
|
|
23
|
-
subsystems?: HubSubsystem[];
|
|
24
20
|
/**
|
|
25
21
|
* What services are required to be online for this permission to be granted
|
|
26
22
|
*/
|
|
@@ -80,11 +76,16 @@ export interface IPermissionPolicy {
|
|
|
80
76
|
flagValue?: boolean;
|
|
81
77
|
}
|
|
82
78
|
/**
|
|
83
|
-
* Hash of
|
|
84
|
-
*
|
|
85
|
-
*
|
|
79
|
+
* Hash of permission:boolean, which is used in two contexts.
|
|
80
|
+
* First, it is used to control access to "features" are enabled for a particular entity
|
|
81
|
+
* e.g. By default, Events are enabled for Sites, but a specific Site may disable events
|
|
82
|
+
* The second use of `IFeatureFlags` is in `ArcGISContext`, and it holds a hash of permissions
|
|
83
|
+
* which have been enabled or disabled via uri parameters. Parsing of the uri parameters is
|
|
84
|
+
* the responsibility of the host application. In this use, if the value is set to false, then
|
|
85
|
+
* access is denied under all conditions. If the value is set to true, licensing,
|
|
86
|
+
* privilege and services checks are run, and if those pass, access is granted.
|
|
86
87
|
*/
|
|
87
|
-
export interface
|
|
88
|
+
export interface IFeatureFlags extends Record<Permission, boolean> {
|
|
88
89
|
}
|
|
89
90
|
/**
|
|
90
91
|
* Hub Availability levels
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**`
|
|
2
2
|
* Human readable response from a policy check
|
|
3
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" | "edit-access" | "invalid-permission" | "invalid-capability" | "privilege-required" | "
|
|
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" | "edit-access" | "invalid-permission" | "invalid-capability" | "privilege-required" | "service-offline" | "service-maintenance" | "service-not-available" | "entity-required" | "not-authenticated" | "not-alpha-org" | "not-beta-org" | "property-missing" | "property-not-array" | "array-contains-invalid-value" | "array-missing-required-value" | "property-mismatch" | "user-not-group-member" | "user-not-group-manager" | "user-not-group-owner" | "assertion-property-not-found" | "assertion-failed" | "assertion-requires-numeric-values" | "property-match" | "feature-disabled" | "feature-enabled" | "not-in-environment";
|
|
@@ -1,25 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IEntityFeatures, IPermissionPolicy } from "../../permissions";
|
|
3
|
-
/**
|
|
4
|
-
* Default capabilities for a Project. If not listed here, the capability will not be available
|
|
5
|
-
* This hash is combined with the capabilities hash stored in the item data. Regardless of what
|
|
6
|
-
* properties are defined in the item data, only the capabilities defined here will be available
|
|
7
|
-
* @private
|
|
8
|
-
* TODO: Remove capabilities
|
|
9
|
-
*/
|
|
10
|
-
export declare const ProjectDefaultCapabilities: EntityCapabilities;
|
|
11
|
-
/**
|
|
12
|
-
* List of all the Project Capability Permissions
|
|
13
|
-
* These are considered Hub Business Rules and are not intended
|
|
14
|
-
* to be modified by consumers
|
|
15
|
-
* TODO: Remove capabilities
|
|
16
|
-
* @private
|
|
17
|
-
*/
|
|
18
|
-
export declare const ProjectCapabilityPermissions: ICapabilityPermission[];
|
|
1
|
+
import { IFeatureFlags, IPermissionPolicy } from "../../permissions";
|
|
19
2
|
/**
|
|
20
3
|
* Default features for a Project. These are the features that can be enabled / disabled by the entity owner
|
|
21
4
|
*/
|
|
22
|
-
export declare const ProjectDefaultFeatures:
|
|
5
|
+
export declare const ProjectDefaultFeatures: IFeatureFlags;
|
|
23
6
|
/**
|
|
24
7
|
* Project Permission Policies
|
|
25
8
|
* These define the requirements any user must meet to perform related actions
|
|
@@ -1,30 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IEntityFeatures, IPermissionPolicy } from "../../permissions/types";
|
|
3
|
-
/**
|
|
4
|
-
* DEPRECATED
|
|
5
|
-
* Default capabilities for a Site. If not listed here, the capability will not be available
|
|
6
|
-
* This hash is combined with the capabilities hash stored in the item data. Regardless of what
|
|
7
|
-
* properties are defined in the item data, only the capabilities defined here will be available
|
|
8
|
-
* @private
|
|
9
|
-
*/
|
|
10
|
-
export declare const SiteDefaultCapabilities: EntityCapabilities;
|
|
11
|
-
/**
|
|
12
|
-
* DEPRECATED
|
|
13
|
-
* List of all the Site Capability Permissions
|
|
14
|
-
* These are considered Hub Business Rules and are not intended
|
|
15
|
-
* to be modified by consumers
|
|
16
|
-
* @private
|
|
17
|
-
*/
|
|
18
|
-
export declare const SiteCapabilityPermissions: ICapabilityPermission[];
|
|
1
|
+
import { IFeatureFlags, IPermissionPolicy } from "../../permissions/types";
|
|
19
2
|
/**
|
|
20
3
|
* Default features for a Site. These are the features that can be enabled / disabled by the entity owner
|
|
21
4
|
*/
|
|
22
|
-
export declare const SiteDefaultFeatures:
|
|
5
|
+
export declare const SiteDefaultFeatures: IFeatureFlags;
|
|
23
6
|
/**
|
|
24
7
|
* Site Permissions
|
|
25
8
|
* This feeds into the Permissions type
|
|
26
9
|
*/
|
|
27
|
-
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"];
|
|
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"];
|
|
28
11
|
/**
|
|
29
12
|
* Site permission policies
|
|
30
13
|
* @private
|
package/package.json
CHANGED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { checkPermission } from "../../permissions";
|
|
2
|
-
/**
|
|
3
|
-
* Check an individual capability access rule
|
|
4
|
-
* @param rule
|
|
5
|
-
* @param context
|
|
6
|
-
* @param entity
|
|
7
|
-
* @returns
|
|
8
|
-
*/
|
|
9
|
-
export function checkCapabilityAccess(rule, context, entity) {
|
|
10
|
-
// tslint:disable-next-line: no-console
|
|
11
|
-
console.warn(`DEPRECATION: checkCapabilityAccess is deprecated. Use checkFeatureAccess instead.`);
|
|
12
|
-
// check if the capability is disabled for the entity; we default to false
|
|
13
|
-
const value = entity.capabilities[rule.capability] || false;
|
|
14
|
-
// if disabled, then access is denied
|
|
15
|
-
if (!value) {
|
|
16
|
-
return {
|
|
17
|
-
capability: rule.capability,
|
|
18
|
-
access: false,
|
|
19
|
-
code: "disabled",
|
|
20
|
-
response: "not-available",
|
|
21
|
-
message: `Owner ${entity.owner} has disabled ${rule.capability} capability.`,
|
|
22
|
-
responses: [],
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
// check each permission in the rule
|
|
27
|
-
const chks = rule.permissions.map((permission) => {
|
|
28
|
-
return checkPermission(permission, context, entity);
|
|
29
|
-
});
|
|
30
|
-
// default to last check
|
|
31
|
-
let accessCheck = chks[chks.length - 1];
|
|
32
|
-
// if all checks are true, then access is granted
|
|
33
|
-
const access = chks.every((chk) => chk.access);
|
|
34
|
-
if (!access) {
|
|
35
|
-
// get the first failed check and use it's values in the response
|
|
36
|
-
accessCheck = chks.find((chk) => !chk.access);
|
|
37
|
-
}
|
|
38
|
-
// construct the response
|
|
39
|
-
return {
|
|
40
|
-
capability: rule.capability,
|
|
41
|
-
access: accessCheck.access,
|
|
42
|
-
code: accessCheck.code,
|
|
43
|
-
response: accessCheck.response,
|
|
44
|
-
message: accessCheck.message,
|
|
45
|
-
responses: chks,
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=checkCapabilityAccess.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkCapabilityAccess.js","sourceRoot":"","sources":["../../../../src/capabilities/_internal/checkCapabilityAccess.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAA6B,MAAM,mBAAmB,CAAC;AAG/E;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CACnC,IAA2B,EAC3B,OAAuB,EACvB,MAAkC;IAElC,uCAAuC;IACvC,OAAO,CAAC,IAAI,CACV,mFAAmF,CACpF,CAAC;IACF,0EAA0E;IAC1E,MAAM,KAAK,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC;IAC5D,qCAAqC;IACrC,IAAI,CAAC,KAAK,EAAE;QACV,OAAO;YACL,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE,eAAe;YACzB,OAAO,EAAE,SAAS,MAAM,CAAC,KAAK,iBAAiB,IAAI,CAAC,UAAU,cAAc;YAC5E,SAAS,EAAE,EAAE;SACd,CAAC;KACH;SAAM;QACL,oCAAoC;QACpC,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE;YAC/C,OAAO,eAAe,CAAC,UAAU,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QACtD,CAAC,CAAC,CAAC;QACH,wBAAwB;QACxB,IAAI,WAAW,GAA8B,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACnE,iDAAiD;QACjD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAE/C,IAAI,CAAC,MAAM,EAAE;YACX,iEAAiE;YACjE,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;SAC/C;QACD,yBAAyB;QACzB,OAAO;YACL,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,MAAM,EAAE,WAAW,CAAC,MAAM;YAC1B,IAAI,EAAE,WAAW,CAAC,IAAI;YACtB,QAAQ,EAAE,WAAW,CAAC,QAAQ;YAC9B,OAAO,EAAE,WAAW,CAAC,OAAO;YAC5B,SAAS,EAAE,IAAI;SAChB,CAAC;KACH;AACH,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/capabilities/_internal/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { isCapability } from "./types";
|
|
2
|
-
import { CapabilityPermissions } from "./getWorkspaceCapabilities";
|
|
3
|
-
import { checkCapabilityAccess } from "./_internal";
|
|
4
|
-
// Any of these causes checkCapability to not be defined in tests
|
|
5
|
-
// import { getTypeFromEntity } from "../index";
|
|
6
|
-
// import { getTypeFromEntity } from "../core";
|
|
7
|
-
// import { getTypeFromEntity } from "../core/index";
|
|
8
|
-
// This direct import resolves the problem
|
|
9
|
-
import { getTypeFromEntity } from "../core/getTypeFromEntity";
|
|
10
|
-
/**
|
|
11
|
-
* Check if a capability is enabled for a given entity and if the current user has necessary permissions to access it
|
|
12
|
-
* @param capability
|
|
13
|
-
* @param context
|
|
14
|
-
* @param entity
|
|
15
|
-
* @returns
|
|
16
|
-
*/
|
|
17
|
-
export function checkCapability(capability, context, entity) {
|
|
18
|
-
/* tslint:disable-next-line: no-console */
|
|
19
|
-
console.warn(`DEPRECATION: checkCapability is deprecated. Use checkPermission instead.`);
|
|
20
|
-
const entityType = getTypeFromEntity(entity);
|
|
21
|
-
// Find the rule for the given entity type and capability
|
|
22
|
-
const isValid = isCapability(capability);
|
|
23
|
-
if (isValid) {
|
|
24
|
-
const rule = CapabilityPermissions.find((e) => e.entity === entityType && e.capability === capability);
|
|
25
|
-
if (rule) {
|
|
26
|
-
// check each capability access rule
|
|
27
|
-
return checkCapabilityAccess(rule, context, entity);
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
// No rule found
|
|
31
|
-
return {
|
|
32
|
-
capability,
|
|
33
|
-
access: false,
|
|
34
|
-
code: "disabled",
|
|
35
|
-
response: "not-available",
|
|
36
|
-
message: `Capability "${capability}" is not defined for ${entityType}.`,
|
|
37
|
-
responses: [],
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
// Invlaid Capability
|
|
43
|
-
return {
|
|
44
|
-
capability,
|
|
45
|
-
access: false,
|
|
46
|
-
code: "disabled",
|
|
47
|
-
response: "invalid-capability",
|
|
48
|
-
message: `Value "${capability}" is not a valid Hub Capability.`,
|
|
49
|
-
responses: [],
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
//# sourceMappingURL=checkCapability.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkCapability.js","sourceRoot":"","sources":["../../../src/capabilities/checkCapability.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,YAAY,EAAE,MAAM,SAAS,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAOpD,iEAAiE;AACjE,gDAAgD;AAChD,+CAA+C;AAC/C,qDAAqD;AACrD,0CAA0C;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAC7B,UAAsB,EACtB,OAAuB,EACvB,MAAkC;IAElC,0CAA0C;IAC1C,OAAO,CAAC,IAAI,CACV,0EAA0E,CAC3E,CAAC;IACF,MAAM,UAAU,GAAkB,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAC5D,yDAAyD;IACzD,MAAM,OAAO,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;IACzC,IAAI,OAAO,EAAE;QACX,MAAM,IAAI,GAAG,qBAAqB,CAAC,IAAI,CACrC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,UAAU,IAAI,CAAC,CAAC,UAAU,KAAK,UAAU,CAC9D,CAAC;QACF,IAAI,IAAI,EAAE;YACR,oCAAoC;YACpC,OAAO,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;SACrD;aAAM;YACL,gBAAgB;YAChB,OAAO;gBACL,UAAU;gBACV,MAAM,EAAE,KAAK;gBACb,IAAI,EAAE,UAAU;gBAChB,QAAQ,EAAE,eAAe;gBACzB,OAAO,EAAE,eAAe,UAAU,wBAAwB,UAAU,GAAG;gBACvE,SAAS,EAAE,EAAE;aACe,CAAC;SAChC;KACF;SAAM;QACL,qBAAqB;QACrB,OAAO;YACL,UAAU;YACV,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE,oBAAoB;YAC9B,OAAO,EAAE,UAAU,UAAU,kCAAkC;YAC/D,SAAS,EAAE,EAAE;SACe,CAAC;KAChC;AACH,CAAC"}
|