@esri/hub-common 12.0.0-alpha.2 → 12.0.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.
Files changed (170) hide show
  1. package/dist/esm/capabilities/_internal/checkCapabilityAccess.js +47 -0
  2. package/dist/esm/capabilities/_internal/checkCapabilityAccess.js.map +1 -0
  3. package/dist/esm/capabilities/_internal/index.js +2 -0
  4. package/dist/esm/capabilities/_internal/index.js.map +1 -0
  5. package/dist/esm/capabilities/checkCapability.js +46 -0
  6. package/dist/esm/capabilities/checkCapability.js.map +1 -0
  7. package/dist/esm/capabilities/getWorkspaceCapabilities.js +38 -0
  8. package/dist/esm/capabilities/getWorkspaceCapabilities.js.map +1 -0
  9. package/dist/esm/capabilities/index.js +5 -0
  10. package/dist/esm/capabilities/index.js.map +1 -0
  11. package/dist/esm/capabilities/processEntityCapabilities.js +25 -0
  12. package/dist/esm/capabilities/processEntityCapabilities.js.map +1 -0
  13. package/dist/esm/capabilities/types.js +22 -0
  14. package/dist/esm/capabilities/types.js.map +1 -0
  15. package/dist/esm/content/_internal.js +18 -8
  16. package/dist/esm/content/_internal.js.map +1 -1
  17. package/dist/esm/core/HubItemEntity.js +8 -0
  18. package/dist/esm/core/HubItemEntity.js.map +1 -1
  19. package/dist/esm/core/schemas/hubproject.js +1 -0
  20. package/dist/esm/core/schemas/hubproject.js.map +1 -1
  21. package/dist/esm/{permissions → core}/types/IAccessResponse.js +0 -0
  22. package/dist/esm/core/types/IAccessResponse.js.map +1 -0
  23. package/dist/esm/index.js +1 -0
  24. package/dist/esm/index.js.map +1 -1
  25. package/dist/esm/initiatives/HubInitiative.js.map +1 -1
  26. package/dist/esm/initiatives/HubInitiatives.js +2 -36
  27. package/dist/esm/initiatives/HubInitiatives.js.map +1 -1
  28. package/dist/esm/initiatives/_internal/InitiativeBusinessRules.js +79 -0
  29. package/dist/esm/initiatives/_internal/InitiativeBusinessRules.js.map +1 -0
  30. package/dist/esm/initiatives/_internal/computeProps.js +31 -0
  31. package/dist/esm/initiatives/_internal/computeProps.js.map +1 -0
  32. package/dist/esm/initiatives/_internal/getPropertyMap.js +22 -0
  33. package/dist/esm/initiatives/_internal/getPropertyMap.js.map +1 -0
  34. package/dist/esm/permissions/HubPermissionPolicies.js +4 -2
  35. package/dist/esm/permissions/HubPermissionPolicies.js.map +1 -1
  36. package/dist/esm/permissions/checkPermission.js +3 -2
  37. package/dist/esm/permissions/checkPermission.js.map +1 -1
  38. package/dist/esm/permissions/types/IPermissionAccessResponse.js +1 -0
  39. package/dist/esm/permissions/types/IPermissionAccessResponse.js.map +1 -0
  40. package/dist/esm/permissions/types/Permission.js +8 -3
  41. package/dist/esm/permissions/types/Permission.js.map +1 -1
  42. package/dist/esm/permissions/types/index.js +1 -1
  43. package/dist/esm/permissions/types/index.js.map +1 -1
  44. package/dist/esm/projects/HubProject.js.map +1 -1
  45. package/dist/esm/projects/_internal/ProjectBusinessRules.js +79 -0
  46. package/dist/esm/projects/_internal/ProjectBusinessRules.js.map +1 -0
  47. package/dist/esm/projects/{_internal.js → _internal/computeProps.js} +7 -19
  48. package/dist/esm/projects/_internal/computeProps.js.map +1 -0
  49. package/dist/esm/projects/_internal/getPropertyMap.js +22 -0
  50. package/dist/esm/projects/_internal/getPropertyMap.js.map +1 -0
  51. package/dist/esm/projects/edit.js +2 -1
  52. package/dist/esm/projects/edit.js.map +1 -1
  53. package/dist/esm/projects/fetch.js +2 -1
  54. package/dist/esm/projects/fetch.js.map +1 -1
  55. package/dist/esm/search/_internal/portalSearchItems.js +6 -0
  56. package/dist/esm/search/_internal/portalSearchItems.js.map +1 -1
  57. package/dist/esm/sites/HubSites.js +8 -74
  58. package/dist/esm/sites/HubSites.js.map +1 -1
  59. package/dist/esm/sites/_internal/{SitesPermissionPolicies.js → SiteBusinessRules.js} +34 -1
  60. package/dist/esm/sites/_internal/SiteBusinessRules.js.map +1 -0
  61. package/dist/esm/sites/_internal/computeProps.js +32 -0
  62. package/dist/esm/sites/_internal/computeProps.js.map +1 -0
  63. package/dist/esm/sites/_internal/getPropertyMap.js +59 -0
  64. package/dist/esm/sites/_internal/getPropertyMap.js.map +1 -0
  65. package/dist/node/capabilities/_internal/checkCapabilityAccess.js +51 -0
  66. package/dist/node/capabilities/_internal/checkCapabilityAccess.js.map +1 -0
  67. package/dist/node/capabilities/_internal/index.js +5 -0
  68. package/dist/node/capabilities/_internal/index.js.map +1 -0
  69. package/dist/node/capabilities/checkCapability.js +50 -0
  70. package/dist/node/capabilities/checkCapability.js.map +1 -0
  71. package/dist/node/capabilities/getWorkspaceCapabilities.js +42 -0
  72. package/dist/node/capabilities/getWorkspaceCapabilities.js.map +1 -0
  73. package/dist/node/capabilities/index.js +8 -0
  74. package/dist/node/capabilities/index.js.map +1 -0
  75. package/dist/node/capabilities/processEntityCapabilities.js +29 -0
  76. package/dist/node/capabilities/processEntityCapabilities.js.map +1 -0
  77. package/dist/node/capabilities/types.js +26 -0
  78. package/dist/node/capabilities/types.js.map +1 -0
  79. package/dist/node/content/_internal.js +18 -8
  80. package/dist/node/content/_internal.js.map +1 -1
  81. package/dist/node/core/HubItemEntity.js +8 -0
  82. package/dist/node/core/HubItemEntity.js.map +1 -1
  83. package/dist/node/core/schemas/hubproject.js +1 -0
  84. package/dist/node/core/schemas/hubproject.js.map +1 -1
  85. package/dist/node/{permissions → core}/types/IAccessResponse.js +0 -0
  86. package/dist/node/core/types/IAccessResponse.js.map +1 -0
  87. package/dist/node/index.js +1 -0
  88. package/dist/node/index.js.map +1 -1
  89. package/dist/node/initiatives/HubInitiative.js.map +1 -1
  90. package/dist/node/initiatives/HubInitiatives.js +8 -42
  91. package/dist/node/initiatives/HubInitiatives.js.map +1 -1
  92. package/dist/node/initiatives/_internal/InitiativeBusinessRules.js +82 -0
  93. package/dist/node/initiatives/_internal/InitiativeBusinessRules.js.map +1 -0
  94. package/dist/node/initiatives/_internal/computeProps.js +35 -0
  95. package/dist/node/initiatives/_internal/computeProps.js.map +1 -0
  96. package/dist/node/initiatives/_internal/getPropertyMap.js +26 -0
  97. package/dist/node/initiatives/_internal/getPropertyMap.js.map +1 -0
  98. package/dist/node/permissions/HubPermissionPolicies.js +6 -4
  99. package/dist/node/permissions/HubPermissionPolicies.js.map +1 -1
  100. package/dist/node/permissions/checkPermission.js +3 -2
  101. package/dist/node/permissions/checkPermission.js.map +1 -1
  102. package/dist/node/permissions/types/IPermissionAccessResponse.js +3 -0
  103. package/dist/node/permissions/types/IPermissionAccessResponse.js.map +1 -0
  104. package/dist/node/permissions/types/Permission.js +8 -3
  105. package/dist/node/permissions/types/Permission.js.map +1 -1
  106. package/dist/node/permissions/types/index.js +1 -1
  107. package/dist/node/permissions/types/index.js.map +1 -1
  108. package/dist/node/projects/HubProject.js.map +1 -1
  109. package/dist/node/projects/_internal/{ProjectPermissionPolicies.js → ProjectBusinessRules.js} +40 -2
  110. package/dist/node/projects/_internal/ProjectBusinessRules.js.map +1 -0
  111. package/dist/node/projects/{_internal.js → _internal/computeProps.js} +8 -21
  112. package/dist/node/projects/_internal/computeProps.js.map +1 -0
  113. package/dist/node/projects/_internal/getPropertyMap.js +26 -0
  114. package/dist/node/projects/_internal/getPropertyMap.js.map +1 -0
  115. package/dist/node/projects/edit.js +6 -5
  116. package/dist/node/projects/edit.js.map +1 -1
  117. package/dist/node/projects/fetch.js +4 -3
  118. package/dist/node/projects/fetch.js.map +1 -1
  119. package/dist/node/search/_internal/portalSearchItems.js +6 -0
  120. package/dist/node/search/_internal/portalSearchItems.js.map +1 -1
  121. package/dist/node/sites/HubSites.js +8 -74
  122. package/dist/node/sites/HubSites.js.map +1 -1
  123. package/dist/node/sites/_internal/{SitesPermissionPolicies.js → SiteBusinessRules.js} +35 -2
  124. package/dist/node/sites/_internal/SiteBusinessRules.js.map +1 -0
  125. package/dist/node/sites/_internal/computeProps.js +36 -0
  126. package/dist/node/sites/_internal/computeProps.js.map +1 -0
  127. package/dist/node/sites/_internal/getPropertyMap.js +63 -0
  128. package/dist/node/sites/_internal/getPropertyMap.js.map +1 -0
  129. package/dist/types/capabilities/_internal/checkCapabilityAccess.d.ts +10 -0
  130. package/dist/types/capabilities/_internal/index.d.ts +1 -0
  131. package/dist/types/capabilities/checkCapability.d.ts +10 -0
  132. package/dist/types/capabilities/getWorkspaceCapabilities.d.ts +15 -0
  133. package/dist/types/capabilities/index.d.ts +4 -0
  134. package/dist/types/capabilities/processEntityCapabilities.d.ts +8 -0
  135. package/dist/types/capabilities/types.d.ts +57 -0
  136. package/dist/types/content/_internal.d.ts +2 -1
  137. package/dist/types/core/HubItemEntity.d.ts +10 -4
  138. package/dist/types/core/behaviors/IWithPermissionBehavior.d.ts +10 -2
  139. package/dist/types/core/traits/IWithPermissions.d.ts +2 -0
  140. package/dist/types/{permissions → core}/types/IAccessResponse.d.ts +1 -15
  141. package/dist/types/core/types/IHubSite.d.ts +4 -4
  142. package/dist/types/index.d.ts +1 -0
  143. package/dist/types/initiatives/HubInitiative.d.ts +2 -2
  144. package/dist/types/initiatives/_internal/InitiativeBusinessRules.d.ts +26 -0
  145. package/dist/types/initiatives/_internal/computeProps.d.ts +12 -0
  146. package/dist/types/initiatives/_internal/getPropertyMap.d.ts +8 -0
  147. package/dist/types/permissions/checkPermission.d.ts +2 -2
  148. package/dist/types/permissions/types/IPermissionAccessResponse.d.ts +18 -0
  149. package/dist/types/permissions/types/Permission.d.ts +1 -1
  150. package/dist/types/permissions/types/PolicyResponse.d.ts +1 -1
  151. package/dist/types/permissions/types/index.d.ts +1 -1
  152. package/dist/types/projects/HubProject.d.ts +2 -2
  153. package/dist/types/projects/_internal/ProjectBusinessRules.d.ts +26 -0
  154. package/dist/types/projects/{_internal.d.ts → _internal/computeProps.d.ts} +2 -10
  155. package/dist/types/projects/_internal/getPropertyMap.d.ts +8 -0
  156. package/dist/types/sites/_internal/SiteBusinessRules.d.ts +25 -0
  157. package/dist/types/sites/_internal/computeProps.d.ts +12 -0
  158. package/dist/types/sites/_internal/getPropertyMap.d.ts +10 -0
  159. package/package.json +1 -1
  160. package/dist/esm/permissions/types/IAccessResponse.js.map +0 -1
  161. package/dist/esm/projects/_internal/ProjectPermissionPolicies.js +0 -41
  162. package/dist/esm/projects/_internal/ProjectPermissionPolicies.js.map +0 -1
  163. package/dist/esm/projects/_internal.js.map +0 -1
  164. package/dist/esm/sites/_internal/SitesPermissionPolicies.js.map +0 -1
  165. package/dist/node/permissions/types/IAccessResponse.js.map +0 -1
  166. package/dist/node/projects/_internal/ProjectPermissionPolicies.js.map +0 -1
  167. package/dist/node/projects/_internal.js.map +0 -1
  168. package/dist/node/sites/_internal/SitesPermissionPolicies.js.map +0 -1
  169. package/dist/types/projects/_internal/ProjectPermissionPolicies.d.ts +0 -8
  170. package/dist/types/sites/_internal/SitesPermissionPolicies.d.ts +0 -11
@@ -84,7 +84,7 @@ export declare const setContentBoundary: (content: IHubContent, boundary: Geogra
84
84
  itemControl: string;
85
85
  access?: import("../core").AccessLevel;
86
86
  url?: string;
87
- canEdit: boolean;
87
+ capabilities?: import("..").EntityCapabilities;
88
88
  description?: string;
89
89
  name: string;
90
90
  tags: string[];
@@ -94,6 +94,7 @@ export declare const setContentBoundary: (content: IHubContent, boundary: Geogra
94
94
  thumbnailUrl?: string;
95
95
  thumbnail?: string;
96
96
  typeKeywords?: string[];
97
+ canEdit: boolean;
97
98
  canDelete: boolean;
98
99
  createdDate: Date;
99
100
  createdDateSource: string;
@@ -1,13 +1,14 @@
1
1
  import { IGroup } from "@esri/arcgis-rest-portal";
2
2
  import { IArcGISContext } from "../ArcGISContext";
3
- import { IAccessResponse, IEntityPermissionPolicy, Permission } from "../permissions";
4
- import { IWithSharingBehavior, IWithStoreBehavior, IWithFeaturedImageBehavior, IWithPermissionBehavior } from "./behaviors";
3
+ import { Capability, ICapabilityAccessResponse } from "../capabilities";
4
+ import { IPermissionAccessResponse, IEntityPermissionPolicy, Permission } from "../permissions";
5
+ import { IWithSharingBehavior, IWithStoreBehavior, IWithFeaturedImageBehavior, IWithPermissionBehavior, IWithCapabilityBehavior } from "./behaviors";
5
6
  import { IWithThumbnailBehavior } from "./behaviors/IWithThumbnailBehavior";
6
7
  import { IHubItemEntity, SettableAccessLevel } from "./types";
7
8
  /**
8
9
  * Base class for all Hub Entities backed by items
9
10
  */
10
- 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, IWithCapabilityBehavior {
11
12
  protected context: IArcGISContext;
12
13
  protected entity: T;
13
14
  protected isDestroyed: boolean;
@@ -22,7 +23,7 @@ export declare abstract class HubItemEntity<T extends IHubItemEntity> implements
22
23
  * @param permission
23
24
  * @returns
24
25
  */
25
- checkPermission(permission: Permission): IAccessResponse;
26
+ checkPermission(permission: Permission): IPermissionAccessResponse;
26
27
  /**
27
28
  * Get all policies related to a specific permission
28
29
  * @param permission
@@ -40,6 +41,11 @@ export declare abstract class HubItemEntity<T extends IHubItemEntity> implements
40
41
  * @param id
41
42
  */
42
43
  removePermissionPolicy(permission: Permission, id: string): void;
44
+ /**
45
+ * Check if the current user can access a specific capability
46
+ * @param capability
47
+ */
48
+ checkCapability(capability: Capability): ICapabilityAccessResponse;
43
49
  /**
44
50
  * Return the entity id
45
51
  */
@@ -1,4 +1,5 @@
1
- import { IAccessResponse, IEntityPermissionPolicy, Permission } from "../../permissions";
1
+ import { IPermissionAccessResponse, IEntityPermissionPolicy, Permission } from "../../permissions";
2
+ import { Capability, ICapabilityAccessResponse } from "../../capabilities";
2
3
  /**
3
4
  * Composable behavior that adds permissions to an entity
4
5
  */
@@ -8,7 +9,7 @@ export interface IWithPermissionBehavior {
8
9
  * taking into account any entity specific policies
9
10
  * @param permission
10
11
  */
11
- checkPermission(permission: Permission): IAccessResponse;
12
+ checkPermission(permission: Permission): IPermissionAccessResponse;
12
13
  /**
13
14
  * Get all policies for a specific permission
14
15
  * @param permission
@@ -26,3 +27,10 @@ export interface IWithPermissionBehavior {
26
27
  */
27
28
  removePermissionPolicy(permission: Permission, id: string): void;
28
29
  }
30
+ export interface IWithCapabilityBehavior {
31
+ /**
32
+ * Is a specific capability available and enabled for the this entity?
33
+ * @param capability
34
+ */
35
+ checkCapability(capability: Capability): ICapabilityAccessResponse;
36
+ }
@@ -1,4 +1,5 @@
1
1
  import { IEntityPermissionPolicy } from "../../permissions";
2
+ import { EntityCapabilities } from "../../capabilities";
2
3
  /**
3
4
  * Adds permissions property to an entity
4
5
  */
@@ -7,4 +8,5 @@ export interface IWithPermissions {
7
8
  * Array of permission policies that apply to the entity
8
9
  */
9
10
  permissions?: IEntityPermissionPolicy[];
11
+ capabilities?: EntityCapabilities;
10
12
  }
@@ -1,14 +1,5 @@
1
- import { Permission } from "./Permission";
2
- import { IPolicyCheck } from "./IPolicyCheck";
3
- import { PolicyResponse } from "./PolicyResponse";
4
- /**
5
- * Response from a permission check
6
- */
1
+ import { PolicyResponse } from "../../permissions/types/PolicyResponse";
7
2
  export interface IAccessResponse {
8
- /**
9
- * Permission being checked
10
- */
11
- permission: Permission;
12
3
  /**
13
4
  * Is the user allowed to perform the action
14
5
  */
@@ -26,9 +17,4 @@ export interface IAccessResponse {
26
17
  * information about assertion failures
27
18
  */
28
19
  message?: string;
29
- /**
30
- * List of all the policies that were checked, and their responses
31
- * For debugging / observability
32
- */
33
- checks: IPolicyCheck[];
34
20
  }
@@ -18,10 +18,6 @@ export interface IHubSite extends IHubItemEntity, IWithSlug, IWithCatalog, IWith
18
18
  * Site Theme as json
19
19
  */
20
20
  theme: Record<string, any>;
21
- /**
22
- * Array of capabilities enabled for the site
23
- */
24
- capabilities: string[];
25
21
  /**
26
22
  * Subdomain of the site
27
23
  * Will be prepended to `<org-key>.hub.arcgis.com`
@@ -64,4 +60,8 @@ export interface IHubSite extends IHubItemEntity, IWithSlug, IWithCatalog, IWith
64
60
  * Header CSS
65
61
  */
66
62
  headerSass: string;
63
+ /**
64
+ * Classic capabilities
65
+ */
66
+ classicCapabilities: string[];
67
67
  }
@@ -6,6 +6,7 @@ export * from "./auth";
6
6
  export * from "./categories";
7
7
  export * from "./content";
8
8
  export * from "./core";
9
+ export * from "./capabilities";
9
10
  export * from "./downloads";
10
11
  export * from "./extent";
11
12
  export * from "./groups";
@@ -1,11 +1,11 @@
1
- import { IHubInitiative, IWithPermissionBehavior, IWithCatalogBehavior, IWithStoreBehavior, IWithSharingBehavior } from "../core";
1
+ import { IHubInitiative, IWithPermissionBehavior, IWithCatalogBehavior, IWithStoreBehavior, IWithSharingBehavior, IWithCapabilityBehavior } from "../core";
2
2
  import { Catalog } from "../search/Catalog";
3
3
  import { IArcGISContext } from "../ArcGISContext";
4
4
  import { HubItemEntity } from "../core/HubItemEntity";
5
5
  /**
6
6
  * Hub Initiative Class
7
7
  */
8
- export declare class HubInitiative extends HubItemEntity<IHubInitiative> implements IWithStoreBehavior<IHubInitiative>, IWithPermissionBehavior, IWithCatalogBehavior, IWithSharingBehavior {
8
+ export declare class HubInitiative extends HubItemEntity<IHubInitiative> implements IWithStoreBehavior<IHubInitiative>, IWithPermissionBehavior, IWithCapabilityBehavior, IWithCatalogBehavior, IWithSharingBehavior {
9
9
  private _catalog;
10
10
  /**
11
11
  * Private constructor so we don't have `new` all over the place. Allows for
@@ -0,0 +1,26 @@
1
+ import { EntityCapabilities, ICapabilityPermission, IPermissionPolicy } from "../../index";
2
+ /**
3
+ * Default capabilities for a Initiative. If not listed here, the capability will not be available
4
+ * This hash is combined with the capabilities hash stored in the item data. Regardless of what
5
+ * properties are defined in the item data, only the capabilities defined here will be available
6
+ * @private
7
+ */
8
+ export declare const InitiativeDefaultCapabilities: EntityCapabilities;
9
+ /**
10
+ * List of all the Initiative Capability Permissions
11
+ * These are considered Hub Business Rules and are not intended
12
+ * to be modified by consumers
13
+ * @private
14
+ */
15
+ export declare const InitiativeCapabilityPermissions: ICapabilityPermission[];
16
+ /**
17
+ * Initiative Permission Policies
18
+ * These define the requirements any user must meet to perform related actions
19
+ * @private
20
+ */
21
+ export declare const InitiativePermissions: readonly ["hub:initiative:create", "hub:initiative:delete", "hub:initiative:edit", "hub:initiative:view"];
22
+ /**
23
+ * Initiative permission policies
24
+ * @private
25
+ */
26
+ export declare const InitiativePermissionPolicies: IPermissionPolicy[];
@@ -0,0 +1,12 @@
1
+ import { IRequestOptions } from "@esri/arcgis-rest-request";
2
+ import { IModel } from "../../types";
3
+ import { IHubInitiative } from "../../core";
4
+ /**
5
+ * Given a model and an Initiative, set various computed properties that can't be directly mapped
6
+ * @private
7
+ * @param model
8
+ * @param initiative
9
+ * @param requestOptions
10
+ * @returns
11
+ */
12
+ export declare function computeProps(model: IModel, initiative: Partial<IHubInitiative>, requestOptions: IRequestOptions): IHubInitiative;
@@ -0,0 +1,8 @@
1
+ import { IPropertyMap } from "../../core/_internal/PropertyMapper";
2
+ /**
3
+ * Returns an Array of IPropertyMap objects
4
+ * that define the projection of properties from a IModel to an IHubProject
5
+ * @returns
6
+ * @private
7
+ */
8
+ export declare function getPropertyMap(): IPropertyMap[];
@@ -1,5 +1,5 @@
1
1
  import { IArcGISContext } from "../ArcGISContext";
2
- import { IAccessResponse, Permission } from "./types";
2
+ import { IPermissionAccessResponse, Permission } from "./types";
3
3
  /**
4
4
  * Check a permission against the system policies, and possibly an entity policy
5
5
  * @param permission
@@ -7,4 +7,4 @@ import { IAccessResponse, Permission } from "./types";
7
7
  * @param entity
8
8
  * @returns
9
9
  */
10
- export declare function checkPermission(permission: Permission, context: IArcGISContext, entity?: Record<string, any>): IAccessResponse;
10
+ export declare function checkPermission(permission: Permission, context: IArcGISContext, entity?: Record<string, any>): IPermissionAccessResponse;
@@ -0,0 +1,18 @@
1
+ import { Permission } from "./Permission";
2
+ import { Capability } from "../../capabilities";
3
+ import { IAccessResponse } from "../../core/types/IAccessResponse";
4
+ import { IPolicyCheck } from "./IPolicyCheck";
5
+ /**
6
+ * Response from a permission check
7
+ */
8
+ export interface IPermissionAccessResponse extends IAccessResponse {
9
+ /**
10
+ * Permission being checked
11
+ */
12
+ policy: Permission | Capability;
13
+ /**
14
+ * List of all the policies that were checked, and their responses
15
+ * For debugging / observability
16
+ */
17
+ checks: IPolicyCheck[];
18
+ }
@@ -3,7 +3,7 @@
3
3
  * It's critical that the arrays defined in the modules use `as const`
4
4
  * otherwise Permission devolves into just a string type
5
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"];
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", "hub:initiative:create", "hub:initiative:delete", "hub:initiative:edit", "hub:initiative:view"];
7
7
  /**
8
8
  * Defines the possible values for Permissions
9
9
  */
@@ -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" | "privilege-required" | "system-offline" | "system-maintenance" | "entity-required" | "not-authenticated" | "not-alpha-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";
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" | "system-offline" | "system-maintenance" | "entity-required" | "not-authenticated" | "not-alpha-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";
@@ -1,5 +1,5 @@
1
1
  export * from "./HubLicense";
2
- export * from "./IAccessResponse";
2
+ export * from "./IPermissionAccessResponse";
3
3
  export * from "./IEntityPermissionPolicy";
4
4
  export * from "./IPermissionPolicy";
5
5
  export * from "./IPolicyCheck";
@@ -1,4 +1,4 @@
1
- import { IHubProject, IWithPermissionBehavior, IWithCatalogBehavior, IWithStoreBehavior, IWithSharingBehavior, UiSchemaElementOptions } from "../core";
1
+ import { IHubProject, IWithPermissionBehavior, IWithCatalogBehavior, IWithStoreBehavior, IWithSharingBehavior, UiSchemaElementOptions, IWithCapabilityBehavior } from "../core";
2
2
  import { Catalog } from "../search/Catalog";
3
3
  import { IArcGISContext } from "../ArcGISContext";
4
4
  import { HubItemEntity } from "../core/HubItemEntity";
@@ -6,7 +6,7 @@ import { EditorConfigType, IEditorConfig } from "../core/behaviors/IWithEditorBe
6
6
  /**
7
7
  * Hub Project Class
8
8
  */
9
- export declare class HubProject extends HubItemEntity<IHubProject> implements IWithStoreBehavior<IHubProject>, IWithPermissionBehavior, IWithCatalogBehavior, IWithSharingBehavior {
9
+ export declare class HubProject extends HubItemEntity<IHubProject> implements IWithStoreBehavior<IHubProject>, IWithPermissionBehavior, IWithCapabilityBehavior, IWithCatalogBehavior, IWithSharingBehavior {
10
10
  private _catalog;
11
11
  /**
12
12
  * Private constructor so we don't have `new` all over the place. Allows for
@@ -0,0 +1,26 @@
1
+ import { EntityCapabilities, ICapabilityPermission, IPermissionPolicy } from "../../index";
2
+ /**
3
+ * Default capabilities for a Project. If not listed here, the capability will not be available
4
+ * This hash is combined with the capabilities hash stored in the item data. Regardless of what
5
+ * properties are defined in the item data, only the capabilities defined here will be available
6
+ * @private
7
+ */
8
+ export declare const ProjectDefaultCapabilities: EntityCapabilities;
9
+ /**
10
+ * List of all the Project Capability Permissions
11
+ * These are considered Hub Business Rules and are not intended
12
+ * to be modified by consumers
13
+ * @private
14
+ */
15
+ export declare const ProjectCapabilityPermissions: ICapabilityPermission[];
16
+ /**
17
+ * Project Permission Policies
18
+ * These define the requirements any user must meet to perform related actions
19
+ * @private
20
+ */
21
+ export declare const ProjectPermissions: readonly ["hub:project:create", "hub:project:delete", "hub:project:edit", "hub:project:view"];
22
+ /**
23
+ * Project permission policies
24
+ * @private
25
+ */
26
+ export declare const ProjectPermissionPolicies: IPermissionPolicy[];
@@ -1,7 +1,6 @@
1
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";
2
+ import { IHubProject } from "../../core";
3
+ import { IModel } from "../../types";
5
4
  /**
6
5
  * Given a model and a project, set various computed properties that can't be directly mapped
7
6
  * @private
@@ -11,10 +10,3 @@ import { IModel } from "../types";
11
10
  * @returns
12
11
  */
13
12
  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[];
@@ -0,0 +1,8 @@
1
+ import { IPropertyMap } from "../../core/_internal/PropertyMapper";
2
+ /**
3
+ * Returns an Array of IPropertyMap objects
4
+ * that define the projection of properties from a IModel to an IHubProject
5
+ * @returns
6
+ * @private
7
+ */
8
+ export declare function getPropertyMap(): IPropertyMap[];
@@ -0,0 +1,25 @@
1
+ import { EntityCapabilities, ICapabilityPermission } from "../../index";
2
+ import { IPermissionPolicy } from "../../permissions/types";
3
+ /**
4
+ * Default capabilities for a Site. 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 SiteDefaultCapabilities: EntityCapabilities;
10
+ /**
11
+ * List of all the Site Capability Permissions
12
+ * These are considered Hub Business Rules and are not intended
13
+ * to be modified by consumers
14
+ */
15
+ export declare const SiteCapabilityPermissions: ICapabilityPermission[];
16
+ /**
17
+ * Site Permissions
18
+ * This feeds into the Permissions type
19
+ */
20
+ export declare const SitePermissions: readonly ["hub:site:create", "hub:site:delete", "hub:site:edit", "hub:site:view"];
21
+ /**
22
+ * Site permission policies
23
+ * @private
24
+ */
25
+ export declare const SitesPermissionPolicies: IPermissionPolicy[];
@@ -0,0 +1,12 @@
1
+ import { IRequestOptions } from "@esri/arcgis-rest-request";
2
+ import { IHubSite } from "../../core";
3
+ import { IModel } from "../../types";
4
+ /**
5
+ * Given a model and a site, set various computed properties that can't be directly mapped
6
+ * @private
7
+ * @param model
8
+ * @param site
9
+ * @param requestOptions
10
+ * @returns
11
+ */
12
+ export declare function computeProps(model: IModel, site: Partial<IHubSite>, requestOptions: IRequestOptions): IHubSite;
@@ -0,0 +1,10 @@
1
+ import { IPropertyMap } from "../../core/_internal/PropertyMapper";
2
+ /**
3
+ * Returns an Array of IPropertyMap objects
4
+ * We could define these directly, but since the
5
+ * properties of IHubSite map directly to properties
6
+ * on item or data, it's slightly less verbose to
7
+ * generate the structure.
8
+ * @returns
9
+ */
10
+ export declare function getPropertyMap(): IPropertyMap[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/hub-common",
3
- "version": "12.0.0-alpha.2",
3
+ "version": "12.0.0",
4
4
  "description": "Common TypeScript types and utility functions for @esri/hub.js.",
5
5
  "main": "dist/node/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -1 +0,0 @@
1
- {"version":3,"file":"IAccessResponse.js","sourceRoot":"","sources":["../../../../src/permissions/types/IAccessResponse.ts"],"names":[],"mappings":""}
@@ -1,41 +0,0 @@
1
- /**
2
- * Project Permission Policies
3
- * These define the requirements any user must meet to perform related actions
4
- * @private
5
- */
6
- export const ProjectPermissions = [
7
- "hub:project:create",
8
- "hub:project:delete",
9
- "hub:project:edit",
10
- "hub:project:view",
11
- ];
12
- export const ProjectPermissionPolicies = [
13
- {
14
- permission: "hub:project:create",
15
- subsystems: ["projects"],
16
- authenticated: true,
17
- privileges: ["portal:user:createItem"],
18
- licenses: ["hub-premium"],
19
- },
20
- {
21
- permission: "hub:project:view",
22
- subsystems: ["projects"],
23
- authenticated: false,
24
- licenses: ["hub-premium"],
25
- },
26
- {
27
- permission: "hub:project:edit",
28
- authenticated: true,
29
- subsystems: ["projects"],
30
- entityEdit: true,
31
- licenses: ["hub-premium"],
32
- },
33
- {
34
- permission: "hub:project:delete",
35
- authenticated: true,
36
- subsystems: ["projects"],
37
- entityOwner: true,
38
- licenses: ["hub-premium"],
39
- },
40
- ];
41
- //# sourceMappingURL=ProjectPermissionPolicies.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProjectPermissionPolicies.js","sourceRoot":"","sources":["../../../../src/projects/_internal/ProjectPermissionPolicies.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,oBAAoB;IACpB,oBAAoB;IACpB,kBAAkB;IAClB,kBAAkB;CACV,CAAC;AAEX,MAAM,CAAC,MAAM,yBAAyB,GAAwB;IAC5D;QACE,UAAU,EAAE,oBAAoB;QAChC,UAAU,EAAE,CAAC,UAAU,CAAC;QACxB,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,CAAC,wBAAwB,CAAC;QACtC,QAAQ,EAAE,CAAC,aAAa,CAAC;KAC1B;IACD;QACE,UAAU,EAAE,kBAAkB;QAC9B,UAAU,EAAE,CAAC,UAAU,CAAC;QACxB,aAAa,EAAE,KAAK;QACpB,QAAQ,EAAE,CAAC,aAAa,CAAC;KAC1B;IACD;QACE,UAAU,EAAE,kBAAkB;QAC9B,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,CAAC,U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AAC,OAAO,CAAC;QACrB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,CAAC,WAAW,EAAE,aAAa,EAAE,kBAAkB,CAAC;QAC1D,WAAW,EAAE,IAAI;KAClB;IACD;QACE,UAAU,EAAE,eAAe;QAC3B,UAAU,EAAE,IAAI;QAChB,UAAU,EAAE,CAAC,OAAO,CAAC;QACrB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,CAAC,WAAW,EAAE,aAAa,EAAE,kBAAkB,CAAC;KAC3D;CACF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"IAccessResponse.js","sourceRoot":"","sources":["../../../../src/permissions/types/IAccessResponse.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProjectPermissionPolicies.js","sourceRoot":"","sources":["../../../../src/projects/_internal/ProjectPermissionPolicies.ts"],"names":[],"mappings":";;;AAEA;;;;GAIG;AACU,QAAA,kBAAkB,GAAG;IAChC,oBAAoB;IACpB,oBAAoB;IACpB,kBAAkB;IAClB,kBAAkB;CACV,CAAC;AAEE,QAAA,yBAAyB,GAAwB;IAC5D;QACE,UAAU,EAAE,oBAAoB;QAChC,UAAU,EAAE,CAAC,UAAU,CAAC;QACxB,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,CAAC,wBAAwB,CAAC;QACtC,QAAQ,EAAE,CAAC,aAAa,CAAC;KAC1B;IACD;QACE,UAAU,EAAE,kBAAkB;QAC9B,UAAU,EAAE,CAAC,UAAU,CAAC;QACxB,aAAa,EAAE,KAAK;QACpB,QAAQ,EAAE,CAAC,aAAa,CAAC;KAC1B;IACD;QACE,UAAU,EAAE,kBAAkB;QAC9B,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,CAAC,UAAU,CAAC;QACxB,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,CAAC,aAAa,CAAC;KAC1B;IACD;QACE,UAAU,EAAE,oBAAoB;QAChC,aAAa,EAAE,IAAI;QACnB,UAAU,E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AG,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,kBAAkB,EAAE,CAAC,CAAC;IACrE,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,CAAC;IAC/D,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,CAAC;IAE/D,OAAO,GAAG,CAAC;AACb,CAAC;AAXD,wCAWC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SitesPermissionPolicies.js","sourceRoot":"","sources":["../../../../src/sites/_internal/SitesPermissionPolicies.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACU,QAAA,eAAe,GAAG;IAC7B,iBAAiB;IACjB,iBAAiB;IACjB,eAAe;IACf,eAAe;CACP,CAAC;AAEX;;;GAGG;AACU,QAAA,uBAAuB,GAAwB;IAC1D;QACE,UAAU,EAAE,iBAAiB;QAC7B,UAAU,EAAE,CAAC,OAAO,CAAC;QACrB,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,CAAC,wBAAwB,CAAC;QACtC,QAAQ,EAAE,CAAC,WAAW,EAAE,aAAa,EAAE,kBAAkB,CAAC;KAC3D;IACD;QACE,UAAU,EAAE,eAAe;QAC3B,UAAU,EAAE,CAAC,OAAO,CAAC;QACrB,aAAa,EAAE,KAAK;QACpB,QAAQ,EAAE,CAAC,WAAW,EAAE,aAAa,EAAE,kBAAkB,CAAC;KAC3D;IACD;QACE,UAAU,EAAE,iBAAiB;QAC7B,UAAU,EAAE,CAAC,OAAO,CAAC;QACrB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,CAAC,WAAW,EAAE,aAAa,EAAE,kBAAkB,CAAC;QAC1D,WAAW,EAAE,IAAI;KAClB;IACD;QACE,UAAU,EAAE,eAAe;QAC3B,UAAU,EAAE,IAAI;QAChB,UAAU,EAAE,CAAC,OAAO,CAAC;QACrB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,CAAC,WAAW,EAAE,aAAa,EAAE,kBAAkB,CAAC;KAC3D;CACF,CAAC"}
@@ -1,8 +0,0 @@
1
- import { IPermissionPolicy } from "../../permissions/types";
2
- /**
3
- * Project Permission Policies
4
- * These define the requirements any user must meet to perform related actions
5
- * @private
6
- */
7
- export declare const ProjectPermissions: readonly ["hub:project:create", "hub:project:delete", "hub:project:edit", "hub:project:view"];
8
- export declare const ProjectPermissionPolicies: IPermissionPolicy[];
@@ -1,11 +0,0 @@
1
- import { IPermissionPolicy } from "../../permissions/types";
2
- /**
3
- * Site Permissions
4
- * This feeds into the Permissions type
5
- */
6
- export declare const SitePermissions: readonly ["hub:site:create", "hub:site:delete", "hub:site:edit", "hub:site:view"];
7
- /**
8
- * Site permission policies
9
- * @private
10
- */
11
- export declare const SitesPermissionPolicies: IPermissionPolicy[];