@esri/hub-common 14.74.1 → 14.75.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 (214) hide show
  1. package/dist/esm/associations/addAssociation.js +3 -0
  2. package/dist/esm/associations/addAssociation.js.map +1 -1
  3. package/dist/esm/associations/breakAssociation.js +54 -0
  4. package/dist/esm/associations/breakAssociation.js.map +1 -0
  5. package/dist/esm/associations/getAssociatedEntitiesQuery.js +33 -0
  6. package/dist/esm/associations/getAssociatedEntitiesQuery.js.map +1 -0
  7. package/dist/esm/associations/getAssociationStats.js +49 -0
  8. package/dist/esm/associations/getAssociationStats.js.map +1 -0
  9. package/dist/esm/associations/getAvailableToRequestEntitiesQuery.js +65 -0
  10. package/dist/esm/associations/getAvailableToRequestEntitiesQuery.js.map +1 -0
  11. package/dist/esm/associations/getPendingEntitiesQuery.js +41 -0
  12. package/dist/esm/associations/getPendingEntitiesQuery.js.map +1 -0
  13. package/dist/esm/associations/getRequestingEntitiesQuery.js +41 -0
  14. package/dist/esm/associations/getRequestingEntitiesQuery.js.map +1 -0
  15. package/dist/esm/associations/getWellKnownAssociationsCatalog.js +72 -0
  16. package/dist/esm/associations/getWellKnownAssociationsCatalog.js.map +1 -0
  17. package/dist/esm/associations/index.js +12 -0
  18. package/dist/esm/associations/index.js.map +1 -1
  19. package/dist/esm/associations/internal/getAssociationHierarchy.js +33 -0
  20. package/dist/esm/associations/internal/getAssociationHierarchy.js.map +1 -0
  21. package/dist/esm/associations/internal/getIdsFromAssociationGroups.js +25 -0
  22. package/dist/esm/associations/internal/getIdsFromAssociationGroups.js.map +1 -0
  23. package/dist/esm/associations/internal/getIdsFromKeywords.js +22 -0
  24. package/dist/esm/associations/internal/getIdsFromKeywords.js.map +1 -0
  25. package/dist/esm/associations/internal/getIncludesAndReferencesQuery.js +58 -0
  26. package/dist/esm/associations/internal/getIncludesAndReferencesQuery.js.map +1 -0
  27. package/dist/esm/associations/internal/getIncludesDoesNotReferenceQuery.js +58 -0
  28. package/dist/esm/associations/internal/getIncludesDoesNotReferenceQuery.js.map +1 -0
  29. package/dist/esm/associations/internal/getReferencesDoesNotIncludeQuery.js +62 -0
  30. package/dist/esm/associations/internal/getReferencesDoesNotIncludeQuery.js.map +1 -0
  31. package/dist/esm/associations/internal/getTypeByIdsQuery.js +13 -15
  32. package/dist/esm/associations/internal/getTypeByIdsQuery.js.map +1 -1
  33. package/dist/esm/associations/internal/getTypeByNotIdsQuery.js +26 -0
  34. package/dist/esm/associations/internal/getTypeByNotIdsQuery.js.map +1 -0
  35. package/dist/esm/associations/internal/getTypeWithKeywordQuery.js +11 -6
  36. package/dist/esm/associations/internal/getTypeWithKeywordQuery.js.map +1 -1
  37. package/dist/esm/associations/internal/getTypeWithoutKeywordQuery.js +10 -5
  38. package/dist/esm/associations/internal/getTypeWithoutKeywordQuery.js.map +1 -1
  39. package/dist/esm/associations/internal/isAssociationSupported.js +29 -0
  40. package/dist/esm/associations/internal/isAssociationSupported.js.map +1 -0
  41. package/dist/esm/associations/internal/removeAssociationKeyword.js +16 -0
  42. package/dist/esm/associations/internal/removeAssociationKeyword.js.map +1 -0
  43. package/dist/esm/associations/internal/setAssociationKeyword.js +18 -0
  44. package/dist/esm/associations/internal/setAssociationKeyword.js.map +1 -0
  45. package/dist/esm/associations/listAssociations.js +4 -0
  46. package/dist/esm/associations/listAssociations.js.map +1 -1
  47. package/dist/esm/associations/removeAssociation.js +3 -0
  48. package/dist/esm/associations/removeAssociation.js.map +1 -1
  49. package/dist/esm/associations/requestAssociation.js +57 -0
  50. package/dist/esm/associations/requestAssociation.js.map +1 -0
  51. package/dist/esm/associations/types.js +0 -1
  52. package/dist/esm/associations/types.js.map +1 -1
  53. package/dist/esm/core/HubItemEntity.js +33 -10
  54. package/dist/esm/core/HubItemEntity.js.map +1 -1
  55. package/dist/esm/core/_internal/getBasePropertyMap.js +1 -1
  56. package/dist/esm/core/_internal/getBasePropertyMap.js.map +1 -1
  57. package/dist/esm/core/getTypesFromEntityType.js +39 -0
  58. package/dist/esm/core/getTypesFromEntityType.js.map +1 -0
  59. package/dist/esm/core/index.js +1 -0
  60. package/dist/esm/core/index.js.map +1 -1
  61. package/dist/esm/core/processActionLinks.js +1 -1
  62. package/dist/esm/core/processActionLinks.js.map +1 -1
  63. package/dist/esm/core/updateHubEntity.js +4 -0
  64. package/dist/esm/core/updateHubEntity.js.map +1 -1
  65. package/dist/esm/initiatives/HubInitiatives.js +15 -42
  66. package/dist/esm/initiatives/HubInitiatives.js.map +1 -1
  67. package/dist/esm/initiatives/_internal/InitiativeAssociationHierarchies.js +5 -0
  68. package/dist/esm/initiatives/_internal/InitiativeAssociationHierarchies.js.map +1 -0
  69. package/dist/esm/initiatives/_internal/InitiativeBusinessRules.js +29 -0
  70. package/dist/esm/initiatives/_internal/InitiativeBusinessRules.js.map +1 -1
  71. package/dist/esm/projects/_internal/ProjectAssociationHierarchies.js +5 -0
  72. package/dist/esm/projects/_internal/ProjectAssociationHierarchies.js.map +1 -0
  73. package/dist/esm/projects/_internal/ProjectBusinessRules.js +6 -0
  74. package/dist/esm/projects/_internal/ProjectBusinessRules.js.map +1 -1
  75. package/dist/esm/projects/_internal/computeProps.js +4 -2
  76. package/dist/esm/projects/_internal/computeProps.js.map +1 -1
  77. package/dist/esm/projects/fetch.js +3 -0
  78. package/dist/esm/projects/fetch.js.map +1 -1
  79. package/dist/esm/search/_internal/buildCatalog.js +25 -0
  80. package/dist/esm/search/_internal/buildCatalog.js.map +1 -0
  81. package/dist/esm/search/wellKnownCatalog.js +29 -43
  82. package/dist/esm/search/wellKnownCatalog.js.map +1 -1
  83. package/dist/node/associations/addAssociation.js +3 -0
  84. package/dist/node/associations/addAssociation.js.map +1 -1
  85. package/dist/node/associations/breakAssociation.js +57 -0
  86. package/dist/node/associations/breakAssociation.js.map +1 -0
  87. package/dist/node/associations/getAssociatedEntitiesQuery.js +36 -0
  88. package/dist/node/associations/getAssociatedEntitiesQuery.js.map +1 -0
  89. package/dist/node/associations/getAssociationStats.js +52 -0
  90. package/dist/node/associations/getAssociationStats.js.map +1 -0
  91. package/dist/node/associations/getAvailableToRequestEntitiesQuery.js +68 -0
  92. package/dist/node/associations/getAvailableToRequestEntitiesQuery.js.map +1 -0
  93. package/dist/node/associations/getPendingEntitiesQuery.js +44 -0
  94. package/dist/node/associations/getPendingEntitiesQuery.js.map +1 -0
  95. package/dist/node/associations/getRequestingEntitiesQuery.js +44 -0
  96. package/dist/node/associations/getRequestingEntitiesQuery.js.map +1 -0
  97. package/dist/node/associations/getWellKnownAssociationsCatalog.js +76 -0
  98. package/dist/node/associations/getWellKnownAssociationsCatalog.js.map +1 -0
  99. package/dist/node/associations/index.js +14 -0
  100. package/dist/node/associations/index.js.map +1 -1
  101. package/dist/node/associations/internal/getAssociationHierarchy.js +36 -0
  102. package/dist/node/associations/internal/getAssociationHierarchy.js.map +1 -0
  103. package/dist/node/associations/internal/getIdsFromAssociationGroups.js +28 -0
  104. package/dist/node/associations/internal/getIdsFromAssociationGroups.js.map +1 -0
  105. package/dist/node/associations/internal/getIdsFromKeywords.js +25 -0
  106. package/dist/node/associations/internal/getIdsFromKeywords.js.map +1 -0
  107. package/dist/node/associations/internal/getIncludesAndReferencesQuery.js +61 -0
  108. package/dist/node/associations/internal/getIncludesAndReferencesQuery.js.map +1 -0
  109. package/dist/node/associations/internal/getIncludesDoesNotReferenceQuery.js +61 -0
  110. package/dist/node/associations/internal/getIncludesDoesNotReferenceQuery.js.map +1 -0
  111. package/dist/node/associations/internal/getReferencesDoesNotIncludeQuery.js +65 -0
  112. package/dist/node/associations/internal/getReferencesDoesNotIncludeQuery.js.map +1 -0
  113. package/dist/node/associations/internal/getTypeByIdsQuery.js +13 -15
  114. package/dist/node/associations/internal/getTypeByIdsQuery.js.map +1 -1
  115. package/dist/node/associations/internal/getTypeByNotIdsQuery.js +30 -0
  116. package/dist/node/associations/internal/getTypeByNotIdsQuery.js.map +1 -0
  117. package/dist/node/associations/internal/getTypeWithKeywordQuery.js +11 -6
  118. package/dist/node/associations/internal/getTypeWithKeywordQuery.js.map +1 -1
  119. package/dist/node/associations/internal/getTypeWithoutKeywordQuery.js +10 -5
  120. package/dist/node/associations/internal/getTypeWithoutKeywordQuery.js.map +1 -1
  121. package/dist/node/associations/internal/isAssociationSupported.js +32 -0
  122. package/dist/node/associations/internal/isAssociationSupported.js.map +1 -0
  123. package/dist/node/associations/internal/removeAssociationKeyword.js +20 -0
  124. package/dist/node/associations/internal/removeAssociationKeyword.js.map +1 -0
  125. package/dist/node/associations/internal/setAssociationKeyword.js +22 -0
  126. package/dist/node/associations/internal/setAssociationKeyword.js.map +1 -0
  127. package/dist/node/associations/listAssociations.js +4 -0
  128. package/dist/node/associations/listAssociations.js.map +1 -1
  129. package/dist/node/associations/removeAssociation.js +3 -0
  130. package/dist/node/associations/removeAssociation.js.map +1 -1
  131. package/dist/node/associations/requestAssociation.js +60 -0
  132. package/dist/node/associations/requestAssociation.js.map +1 -0
  133. package/dist/node/associations/types.js +0 -1
  134. package/dist/node/associations/types.js.map +1 -1
  135. package/dist/node/core/HubItemEntity.js +33 -10
  136. package/dist/node/core/HubItemEntity.js.map +1 -1
  137. package/dist/node/core/_internal/getBasePropertyMap.js +1 -1
  138. package/dist/node/core/_internal/getBasePropertyMap.js.map +1 -1
  139. package/dist/node/core/getTypesFromEntityType.js +42 -0
  140. package/dist/node/core/getTypesFromEntityType.js.map +1 -0
  141. package/dist/node/core/index.js +1 -0
  142. package/dist/node/core/index.js.map +1 -1
  143. package/dist/node/core/processActionLinks.js +2 -2
  144. package/dist/node/core/processActionLinks.js.map +1 -1
  145. package/dist/node/core/updateHubEntity.js +4 -0
  146. package/dist/node/core/updateHubEntity.js.map +1 -1
  147. package/dist/node/initiatives/HubInitiatives.js +15 -42
  148. package/dist/node/initiatives/HubInitiatives.js.map +1 -1
  149. package/dist/node/initiatives/_internal/InitiativeAssociationHierarchies.js +8 -0
  150. package/dist/node/initiatives/_internal/InitiativeAssociationHierarchies.js.map +1 -0
  151. package/dist/node/initiatives/_internal/InitiativeBusinessRules.js +29 -0
  152. package/dist/node/initiatives/_internal/InitiativeBusinessRules.js.map +1 -1
  153. package/dist/node/projects/_internal/ProjectAssociationHierarchies.js +8 -0
  154. package/dist/node/projects/_internal/ProjectAssociationHierarchies.js.map +1 -0
  155. package/dist/node/projects/_internal/ProjectBusinessRules.js +6 -0
  156. package/dist/node/projects/_internal/ProjectBusinessRules.js.map +1 -1
  157. package/dist/node/projects/_internal/computeProps.js +4 -2
  158. package/dist/node/projects/_internal/computeProps.js.map +1 -1
  159. package/dist/node/projects/fetch.js +3 -0
  160. package/dist/node/projects/fetch.js.map +1 -1
  161. package/dist/node/search/_internal/buildCatalog.js +29 -0
  162. package/dist/node/search/_internal/buildCatalog.js.map +1 -0
  163. package/dist/node/search/wellKnownCatalog.js +29 -43
  164. package/dist/node/search/wellKnownCatalog.js.map +1 -1
  165. package/dist/types/associations/addAssociation.d.ts +3 -0
  166. package/dist/types/associations/breakAssociation.d.ts +20 -0
  167. package/dist/types/associations/getAssociatedEntitiesQuery.d.ts +21 -0
  168. package/dist/types/associations/getAssociationStats.d.ts +13 -0
  169. package/dist/types/associations/getAvailableToRequestEntitiesQuery.d.ts +21 -0
  170. package/dist/types/associations/getPendingEntitiesQuery.d.ts +26 -0
  171. package/dist/types/associations/getRequestingEntitiesQuery.d.ts +26 -0
  172. package/dist/types/associations/getWellKnownAssociationsCatalog.d.ts +34 -0
  173. package/dist/types/associations/index.d.ts +9 -0
  174. package/dist/types/associations/internal/getAssociationHierarchy.d.ts +15 -0
  175. package/dist/types/associations/internal/getIdsFromAssociationGroups.d.ts +15 -0
  176. package/dist/types/associations/internal/getIdsFromKeywords.d.ts +13 -0
  177. package/dist/types/associations/internal/getIncludesAndReferencesQuery.d.ts +14 -0
  178. package/dist/types/associations/internal/getIncludesDoesNotReferenceQuery.d.ts +14 -0
  179. package/dist/types/associations/internal/getReferencesDoesNotIncludeQuery.d.ts +14 -0
  180. package/dist/types/associations/internal/getTypeByIdsQuery.d.ts +8 -6
  181. package/dist/types/associations/internal/getTypeByNotIdsQuery.d.ts +12 -0
  182. package/dist/types/associations/internal/getTypeWithKeywordQuery.d.ts +8 -5
  183. package/dist/types/associations/internal/getTypeWithoutKeywordQuery.d.ts +8 -5
  184. package/dist/types/associations/internal/isAssociationSupported.d.ts +11 -0
  185. package/dist/types/associations/internal/removeAssociationKeyword.d.ts +12 -0
  186. package/dist/types/associations/internal/setAssociationKeyword.d.ts +12 -0
  187. package/dist/types/associations/listAssociations.d.ts +4 -0
  188. package/dist/types/associations/removeAssociation.d.ts +3 -0
  189. package/dist/types/associations/requestAssociation.d.ts +23 -0
  190. package/dist/types/associations/types.d.ts +53 -0
  191. package/dist/types/core/HubItemEntity.d.ts +10 -1
  192. package/dist/types/core/behaviors/IWIthAssociationBehavior.d.ts +9 -0
  193. package/dist/types/core/behaviors/IWithFeaturedImageBehavior.d.ts +2 -2
  194. package/dist/types/core/getTypesFromEntityType.d.ts +10 -0
  195. package/dist/types/core/index.d.ts +1 -0
  196. package/dist/types/core/traits/IWithAssociations.d.ts +13 -0
  197. package/dist/types/initiatives/HubInitiatives.d.ts +12 -0
  198. package/dist/types/initiatives/_internal/InitiativeAssociationHierarchies.d.ts +2 -0
  199. package/dist/types/initiatives/_internal/InitiativeBusinessRules.d.ts +1 -1
  200. package/dist/types/projects/_internal/ProjectAssociationHierarchies.d.ts +2 -0
  201. package/dist/types/projects/_internal/ProjectBusinessRules.d.ts +1 -1
  202. package/dist/types/projects/fetch.d.ts +3 -0
  203. package/dist/types/search/_internal/buildCatalog.d.ts +12 -0
  204. package/package.json +1 -1
  205. package/dist/esm/associations/internal/getTargetEntityFromAssociationType.js +0 -18
  206. package/dist/esm/associations/internal/getTargetEntityFromAssociationType.js.map +0 -1
  207. package/dist/esm/associations/internal/getTypeFromAssociationType.js +0 -18
  208. package/dist/esm/associations/internal/getTypeFromAssociationType.js.map +0 -1
  209. package/dist/node/associations/internal/getTargetEntityFromAssociationType.js +0 -22
  210. package/dist/node/associations/internal/getTargetEntityFromAssociationType.js.map +0 -1
  211. package/dist/node/associations/internal/getTypeFromAssociationType.js +0 -22
  212. package/dist/node/associations/internal/getTypeFromAssociationType.js.map +0 -1
  213. package/dist/types/associations/internal/getTargetEntityFromAssociationType.d.ts +0 -8
  214. package/dist/types/associations/internal/getTypeFromAssociationType.d.ts +0 -7
@@ -5,6 +5,7 @@ export * from "./schemas";
5
5
  export * from "./fetchHubEntity";
6
6
  export * from "./getEntityDefaultWorkspacePane";
7
7
  export * from "./getTypeFromEntity";
8
+ export * from "./getTypesFromEntityType";
8
9
  export * from "./getRelativeWorkspaceUrl";
9
10
  export * from "./isValidEntityType";
10
11
  export * from "./processActionLinks";
@@ -1,4 +1,17 @@
1
+ import { IHubAssociationRules } from "../../associations";
2
+ /** properties for entities with associations */
1
3
  export interface IWithAssociations {
4
+ associations?: {
5
+ /**
6
+ * association group id - this is exposed as
7
+ * its own property for convenience. It is
8
+ * also included in the association rules
9
+ * query as a group predicate.
10
+ */
11
+ groupId: string;
12
+ /** association rules */
13
+ rules: IHubAssociationRules;
14
+ };
2
15
  typeKeywords?: string[];
3
16
  [key: string]: any;
4
17
  }
@@ -62,6 +62,9 @@ export declare function convertItemToInitiative(item: IItem, requestOptions: IRe
62
62
  */
63
63
  export declare function enrichInitiativeSearchResult(item: IItem, include: string[], requestOptions: IHubRequestOptions): Promise<IHubSearchResult>;
64
64
  /**
65
+ * ** DEPRECATED: Please use the association methods directly.
66
+ * This will be removed in the next breaking version **
67
+ *
65
68
  * Fetch the Projects that are "Accepted" with an Initiative.
66
69
  * This is a subset of the "Associated" projects, limited
67
70
  * to those included in the Initiative's Catalog.
@@ -72,6 +75,9 @@ export declare function enrichInitiativeSearchResult(item: IItem, include: strin
72
75
  */
73
76
  export declare function fetchAcceptedProjects(initiative: IHubInitiative, requestOptions: IHubRequestOptions, query?: IQuery): Promise<IEntityInfo[]>;
74
77
  /**
78
+ * ** DEPRECATED: Please use the association methods directly.
79
+ * This will be removed in the next breaking version **
80
+ *
75
81
  * Fetch the Projects that are "Associated" to the Initiative but are not
76
82
  * "Accepted", meaning they have the keyword but are not included in the Initiative's Catalog.
77
83
  * This is how we can get the list of Projects awaiting Acceptance
@@ -82,6 +88,9 @@ export declare function fetchAcceptedProjects(initiative: IHubInitiative, reques
82
88
  */
83
89
  export declare function fetchPendingProjects(initiative: IHubInitiative, requestOptions: IHubRequestOptions, query?: IQuery): Promise<IEntityInfo[]>;
84
90
  /**
91
+ * ** DEPRECATED: Please use the association methods directly.
92
+ * This will be removed in the next breaking version **
93
+ *
85
94
  * Associated projects are those with the Initiative id in the typekeywords
86
95
  * and is included in the Initiative's catalog.
87
96
  * This is passed into the Gallery showing "Approved Projects"
@@ -90,6 +99,9 @@ export declare function fetchPendingProjects(initiative: IHubInitiative, request
90
99
  */
91
100
  export declare function getAcceptedProjectsQuery(initiative: IHubInitiative): IQuery;
92
101
  /**
102
+ * ** DEPRECATED: Please use the association methods directly.
103
+ * This will be removed in the next breaking version **
104
+ *
93
105
  * Related Projects are those that have the Initiative id in the
94
106
  * typekeywords but NOT in the catalog. We use this query to show
95
107
  * Projects which want to be associated but are not yet included in
@@ -0,0 +1,2 @@
1
+ import { IHubAssociationHierarchy } from "../../associations/types";
2
+ export declare const InitiativeAssociationHierarchies: IHubAssociationHierarchy;
@@ -8,7 +8,7 @@ export declare const InitiativeDefaultFeatures: IFeatureFlags;
8
8
  * These define the requirements any user must meet to perform related actions
9
9
  * @private
10
10
  */
11
- export declare const InitiativePermissions: readonly ["hub:initiative", "hub:initiative:create", "hub:initiative:delete", "hub:initiative:edit", "hub:initiative:view", "hub:initiative:events", "hub:initiative:content", "hub:initiative:discussions", "hub:initiative:workspace", "hub:initiative:workspace:overview", "hub:initiative:workspace:dashboard", "hub:initiative:workspace:details", "hub:initiative:workspace:settings", "hub:initiative:workspace:collaborators", "hub:initiative:workspace:content", "hub:initiative:workspace:metrics", "hub:initiative:manage"];
11
+ export declare const InitiativePermissions: readonly ["hub:initiative", "hub:initiative:create", "hub:initiative:delete", "hub:initiative:edit", "hub:initiative:view", "hub:initiative:events", "hub:initiative:content", "hub:initiative:discussions", "hub:initiative:workspace", "hub:initiative:workspace:overview", "hub:initiative:workspace:dashboard", "hub:initiative:workspace:details", "hub:initiative:workspace:projects", "hub:initiative:workspace:projects:member", "hub:initiative:workspace:projects:manager", "hub:initiative:workspace:settings", "hub:initiative:workspace:collaborators", "hub:initiative:workspace:content", "hub:initiative:workspace:metrics", "hub:initiative:manage"];
12
12
  /**
13
13
  * Initiative permission policies
14
14
  * @private
@@ -0,0 +1,2 @@
1
+ import { IHubAssociationHierarchy } from "../../associations/types";
2
+ export declare const ProjectAssociationHierarchies: IHubAssociationHierarchy;
@@ -8,7 +8,7 @@ export declare const ProjectDefaultFeatures: IFeatureFlags;
8
8
  * These define the requirements any user must meet to perform related actions
9
9
  * @private
10
10
  */
11
- export declare const ProjectPermissions: readonly ["hub:project", "hub:project:create", "hub:project:delete", "hub:project:edit", "hub:project:view", "hub:project:owner", "hub:project:events", "hub:project:content", "hub:project:discussions", "hub:project:workspace", "hub:project:workspace:overview", "hub:project:workspace:dashboard", "hub:project:workspace:details", "hub:project:workspace:settings", "hub:project:workspace:collaborators", "hub:project:workspace:content", "hub:project:workspace:metrics", "hub:project:workspace:metrics-coming-soon", "hub:project:manage"];
11
+ export declare const ProjectPermissions: readonly ["hub:project", "hub:project:create", "hub:project:delete", "hub:project:edit", "hub:project:view", "hub:project:owner", "hub:project:events", "hub:project:content", "hub:project:discussions", "hub:project:workspace", "hub:project:workspace:overview", "hub:project:workspace:dashboard", "hub:project:workspace:details", "hub:project:workspace:initiatives", "hub:project:workspace:settings", "hub:project:workspace:collaborators", "hub:project:workspace:content", "hub:project:workspace:metrics", "hub:project:workspace:metrics-coming-soon", "hub:project:manage"];
12
12
  /**
13
13
  * Project permission policies
14
14
  * @private
@@ -30,6 +30,9 @@ export declare function convertItemToProject(item: IItem, requestOptions: IReque
30
30
  */
31
31
  export declare function enrichProjectSearchResult(item: IItem, include: string[], requestOptions: IHubRequestOptions): Promise<IHubSearchResult>;
32
32
  /**
33
+ * ** DEPRECATED: Please use the association methods directly.
34
+ * This will be removed in the next breaking version **
35
+ *
33
36
  * Get a query that will fetch all the initiatives which the project has
34
37
  * chosen to connect to. If project has not defined any associations
35
38
  * to any Initiatives, will return `null`.
@@ -0,0 +1,12 @@
1
+ import { EntityType, IFilter, IHubCatalog, IHubCollection } from "../types";
2
+ /**
3
+ * Build an IHubCatalog definition JSON object based on a
4
+ * well-known catalog name, scope filters, and collections
5
+ *
6
+ * @param i18nScope - i18n scope for the catalog title
7
+ * @param catalogName - well known catalog name
8
+ * @param filters - filters to build the catalog scope
9
+ * @param collections - collections to include in the catalog
10
+ * @returns {IHubCatalog}
11
+ */
12
+ export declare function buildCatalog(i18nScope: string, catalogName: string, filters: IFilter[], collections: IHubCollection[], targetEntity: EntityType): IHubCatalog;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/hub-common",
3
- "version": "14.74.1",
3
+ "version": "14.75.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,18 +0,0 @@
1
- /**
2
- * Get the entity item type for an association type
3
- * @param type
4
- * @returns
5
- */
6
- export function getTargetEntityFromAssociationType(type) {
7
- let entityType = "item";
8
- switch (type) {
9
- case "initiative":
10
- entityType = "item";
11
- break;
12
- // as we add more association types we need to extend this hash
13
- default:
14
- throw new Error(`getTargetEntityFromAssociationType: Invalid association type ${type}.`);
15
- }
16
- return entityType;
17
- }
18
- //# sourceMappingURL=getTargetEntityFromAssociationType.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getTargetEntityFromAssociationType.js","sourceRoot":"","sources":["../../../../src/associations/internal/getTargetEntityFromAssociationType.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,MAAM,UAAU,kCAAkC,CAChD,IAAqB;IAErB,IAAI,UAAU,GAAe,MAAM,CAAC;IAEpC,QAAQ,IAAI,EAAE;QACZ,KAAK,YAAY;YACf,UAAU,GAAG,MAAM,CAAC;YACpB,MAAM;QACR,+DAA+D;QAC/D;YACE,MAAM,IAAI,KAAK,CACb,gEAAgE,IAAI,GAAG,CACxE,CAAC;KACL;IACD,OAAO,UAAU,CAAC;AACpB,CAAC"}
@@ -1,18 +0,0 @@
1
- /**
2
- * Get the item type for an association type
3
- * @param type
4
- * @returns
5
- */
6
- export function getTypeFromAssociationType(type) {
7
- let itemType = "Hub Initiative";
8
- switch (type) {
9
- case "initiative":
10
- itemType = "Hub Initiative";
11
- break;
12
- // as we add more association types we need to extend this hash
13
- default:
14
- throw new Error(`getTypeFromAssociationType: Invalid association type ${type}.`);
15
- }
16
- return itemType;
17
- }
18
- //# sourceMappingURL=getTypeFromAssociationType.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getTypeFromAssociationType.js","sourceRoot":"","sources":["../../../../src/associations/internal/getTypeFromAssociationType.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CAAC,IAAqB;IAC9D,IAAI,QAAQ,GAAG,gBAAgB,CAAC;IAChC,QAAQ,IAAI,EAAE;QACZ,KAAK,YAAY;YACf,QAAQ,GAAG,gBAAgB,CAAC;YAC5B,MAAM;QACR,+DAA+D;QAC/D;YACE,MAAM,IAAI,KAAK,CACb,wDAAwD,IAAI,GAAG,CAChE,CAAC;KACL;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getTargetEntityFromAssociationType = void 0;
4
- /**
5
- * Get the entity item type for an association type
6
- * @param type
7
- * @returns
8
- */
9
- function getTargetEntityFromAssociationType(type) {
10
- let entityType = "item";
11
- switch (type) {
12
- case "initiative":
13
- entityType = "item";
14
- break;
15
- // as we add more association types we need to extend this hash
16
- default:
17
- throw new Error(`getTargetEntityFromAssociationType: Invalid association type ${type}.`);
18
- }
19
- return entityType;
20
- }
21
- exports.getTargetEntityFromAssociationType = getTargetEntityFromAssociationType;
22
- //# sourceMappingURL=getTargetEntityFromAssociationType.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getTargetEntityFromAssociationType.js","sourceRoot":"","sources":["../../../../src/associations/internal/getTargetEntityFromAssociationType.ts"],"names":[],"mappings":";;;AAGA;;;;GAIG;AACH,SAAgB,kCAAkC,CAChD,IAAqB;IAErB,IAAI,UAAU,GAAe,MAAM,CAAC;IAEpC,QAAQ,IAAI,EAAE;QACZ,KAAK,YAAY;YACf,UAAU,GAAG,MAAM,CAAC;YACpB,MAAM;QACR,+DAA+D;QAC/D;YACE,MAAM,IAAI,KAAK,CACb,gEAAgE,IAAI,GAAG,CACxE,CAAC;KACL;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAhBD,gFAgBC"}
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getTypeFromAssociationType = void 0;
4
- /**
5
- * Get the item type for an association type
6
- * @param type
7
- * @returns
8
- */
9
- function getTypeFromAssociationType(type) {
10
- let itemType = "Hub Initiative";
11
- switch (type) {
12
- case "initiative":
13
- itemType = "Hub Initiative";
14
- break;
15
- // as we add more association types we need to extend this hash
16
- default:
17
- throw new Error(`getTypeFromAssociationType: Invalid association type ${type}.`);
18
- }
19
- return itemType;
20
- }
21
- exports.getTypeFromAssociationType = getTypeFromAssociationType;
22
- //# sourceMappingURL=getTypeFromAssociationType.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getTypeFromAssociationType.js","sourceRoot":"","sources":["../../../../src/associations/internal/getTypeFromAssociationType.ts"],"names":[],"mappings":";;;AAEA;;;;GAIG;AACH,SAAgB,0BAA0B,CAAC,IAAqB;IAC9D,IAAI,QAAQ,GAAG,gBAAgB,CAAC;IAChC,QAAQ,IAAI,EAAE;QACZ,KAAK,YAAY;YACf,QAAQ,GAAG,gBAAgB,CAAC;YAC5B,MAAM;QACR,+DAA+D;QAC/D;YACE,MAAM,IAAI,KAAK,CACb,wDAAwD,IAAI,GAAG,CAChE,CAAC;KACL;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAbD,gEAaC"}
@@ -1,8 +0,0 @@
1
- import { EntityType } from "../../search/types/IHubCatalog";
2
- import { AssociationType } from "../types";
3
- /**
4
- * Get the entity item type for an association type
5
- * @param type
6
- * @returns
7
- */
8
- export declare function getTargetEntityFromAssociationType(type: AssociationType): EntityType;
@@ -1,7 +0,0 @@
1
- import { AssociationType } from "../types";
2
- /**
3
- * Get the item type for an association type
4
- * @param type
5
- * @returns
6
- */
7
- export declare function getTypeFromAssociationType(type: AssociationType): string;