@esri/hub-common 15.31.3 → 15.31.4

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 (389) hide show
  1. package/dist/esm/channels/HubChannel.js +173 -0
  2. package/dist/esm/channels/HubChannel.js.map +1 -0
  3. package/dist/esm/channels/_internal/ChannelBusinessRules.js +39 -0
  4. package/dist/esm/channels/_internal/ChannelBusinessRules.js.map +1 -0
  5. package/dist/esm/channels/_internal/ChannelSchema.js +198 -0
  6. package/dist/esm/channels/_internal/ChannelSchema.js.map +1 -0
  7. package/dist/esm/channels/_internal/ChannelUiSchemaCreate.js +288 -0
  8. package/dist/esm/channels/_internal/ChannelUiSchemaCreate.js.map +1 -0
  9. package/dist/esm/channels/_internal/ChannelUiSchemaEdit.js +20 -0
  10. package/dist/esm/channels/_internal/ChannelUiSchemaEdit.js.map +1 -0
  11. package/dist/esm/channels/_internal/buildDefaultChannel.js +26 -0
  12. package/dist/esm/channels/_internal/buildDefaultChannel.js.map +1 -0
  13. package/dist/esm/channels/_internal/transformAclPermissionToEntityPermissionPolicy.js +49 -0
  14. package/dist/esm/channels/_internal/transformAclPermissionToEntityPermissionPolicy.js.map +1 -0
  15. package/dist/esm/channels/_internal/transformChannelToEntity.js +61 -0
  16. package/dist/esm/channels/_internal/transformChannelToEntity.js.map +1 -0
  17. package/dist/esm/channels/_internal/transformEditorToEntity.js +22 -0
  18. package/dist/esm/channels/_internal/transformEditorToEntity.js.map +1 -0
  19. package/dist/esm/channels/_internal/transformEntityPermissionPoliciesToFormValues.js +150 -0
  20. package/dist/esm/channels/_internal/transformEntityPermissionPoliciesToFormValues.js.map +1 -0
  21. package/dist/esm/channels/_internal/transformEntityToChannelData.js +69 -0
  22. package/dist/esm/channels/_internal/transformEntityToChannelData.js.map +1 -0
  23. package/dist/esm/channels/_internal/transformEntityToEditor.js +20 -0
  24. package/dist/esm/channels/_internal/transformEntityToEditor.js.map +1 -0
  25. package/dist/esm/channels/_internal/transformFormValuesToEntityPermissionPolicies.js +55 -0
  26. package/dist/esm/channels/_internal/transformFormValuesToEntityPermissionPolicies.js.map +1 -0
  27. package/dist/esm/channels/edit.js +35 -0
  28. package/dist/esm/channels/edit.js.map +1 -0
  29. package/dist/esm/channels/fetch.js +14 -0
  30. package/dist/esm/channels/fetch.js.map +1 -0
  31. package/dist/esm/channels/index.js +4 -0
  32. package/dist/esm/channels/index.js.map +1 -0
  33. package/dist/esm/core/schemas/internal/discussions/EntityUiSchemaDiscussionsSettings.js +141 -0
  34. package/dist/esm/core/schemas/internal/discussions/EntityUiSchemaDiscussionsSettings.js.map +1 -0
  35. package/dist/esm/core/types/IHubChannel.js +1 -0
  36. package/dist/esm/core/types/IHubChannel.js.map +1 -0
  37. package/dist/esm/core/types/IHubOrganization.js +1 -0
  38. package/dist/esm/core/types/IHubOrganization.js.map +1 -0
  39. package/dist/esm/discussions/api/posts/index.js +2 -0
  40. package/dist/esm/discussions/api/posts/index.js.map +1 -0
  41. package/dist/esm/discussions/api/posts/posts.js +225 -0
  42. package/dist/esm/discussions/api/posts/posts.js.map +1 -0
  43. package/dist/esm/discussions/api/reactions/index.js +2 -0
  44. package/dist/esm/discussions/api/reactions/index.js.map +1 -0
  45. package/dist/esm/discussions/api/reactions/reactions.js +53 -0
  46. package/dist/esm/discussions/api/reactions/reactions.js.map +1 -0
  47. package/dist/esm/discussions/api/utils/channel-permission.js +377 -0
  48. package/dist/esm/discussions/api/utils/channel-permission.js.map +1 -0
  49. package/dist/esm/discussions/api/utils/channels/can-create-channel-v2.js +13 -0
  50. package/dist/esm/discussions/api/utils/channels/can-create-channel-v2.js.map +1 -0
  51. package/dist/esm/discussions/api/utils/channels/can-create-channel.js +54 -0
  52. package/dist/esm/discussions/api/utils/channels/can-create-channel.js.map +1 -0
  53. package/dist/esm/discussions/api/utils/channels/can-delete-channel-v2.js +17 -0
  54. package/dist/esm/discussions/api/utils/channels/can-delete-channel-v2.js.map +1 -0
  55. package/dist/esm/discussions/api/utils/channels/can-delete-channel.js +17 -0
  56. package/dist/esm/discussions/api/utils/channels/can-delete-channel.js.map +1 -0
  57. package/dist/esm/discussions/api/utils/channels/can-edit-channel-v2.js +19 -0
  58. package/dist/esm/discussions/api/utils/channels/can-edit-channel-v2.js.map +1 -0
  59. package/dist/esm/discussions/api/utils/channels/can-edit-channel.js +17 -0
  60. package/dist/esm/discussions/api/utils/channels/can-edit-channel.js.map +1 -0
  61. package/dist/esm/discussions/api/utils/channels/can-modify-channel.js +18 -0
  62. package/dist/esm/discussions/api/utils/channels/can-modify-channel.js.map +1 -0
  63. package/dist/esm/discussions/api/utils/channels/can-post-to-channel.js +57 -0
  64. package/dist/esm/discussions/api/utils/channels/can-post-to-channel.js.map +1 -0
  65. package/dist/esm/discussions/api/utils/channels/can-read-channel-v2.js +18 -0
  66. package/dist/esm/discussions/api/utils/channels/can-read-channel-v2.js.map +1 -0
  67. package/dist/esm/discussions/api/utils/channels/can-read-channel.js +52 -0
  68. package/dist/esm/discussions/api/utils/channels/can-read-channel.js.map +1 -0
  69. package/dist/esm/discussions/api/utils/channels/channel-to-dto-map.js +11 -0
  70. package/dist/esm/discussions/api/utils/channels/channel-to-dto-map.js.map +1 -0
  71. package/dist/esm/discussions/api/utils/channels/index.js +13 -0
  72. package/dist/esm/discussions/api/utils/channels/index.js.map +1 -0
  73. package/dist/esm/discussions/api/utils/channels/is-authorized-to-modify-channel-by-legacy-permissions.js +44 -0
  74. package/dist/esm/discussions/api/utils/channels/is-authorized-to-modify-channel-by-legacy-permissions.js.map +1 -0
  75. package/dist/esm/discussions/api/utils/platform.js +44 -0
  76. package/dist/esm/discussions/api/utils/platform.js.map +1 -0
  77. package/dist/esm/discussions/api/utils/portal-privilege.js +35 -0
  78. package/dist/esm/discussions/api/utils/portal-privilege.js.map +1 -0
  79. package/dist/esm/discussions/api/utils/posts/can-create-post-v2.js +20 -0
  80. package/dist/esm/discussions/api/utils/posts/can-create-post-v2.js.map +1 -0
  81. package/dist/esm/discussions/api/utils/posts/can-create-post.js +52 -0
  82. package/dist/esm/discussions/api/utils/posts/can-create-post.js.map +1 -0
  83. package/dist/esm/discussions/api/utils/posts/can-create-reply-v2.js +19 -0
  84. package/dist/esm/discussions/api/utils/posts/can-create-reply-v2.js.map +1 -0
  85. package/dist/esm/discussions/api/utils/posts/can-create-reply.js +52 -0
  86. package/dist/esm/discussions/api/utils/posts/can-create-reply.js.map +1 -0
  87. package/dist/esm/discussions/api/utils/posts/can-delete-post-v2.js +24 -0
  88. package/dist/esm/discussions/api/utils/posts/can-delete-post-v2.js.map +1 -0
  89. package/dist/esm/discussions/api/utils/posts/can-delete-post.js +28 -0
  90. package/dist/esm/discussions/api/utils/posts/can-delete-post.js.map +1 -0
  91. package/dist/esm/discussions/api/utils/posts/can-edit-post-status-v2.js +16 -0
  92. package/dist/esm/discussions/api/utils/posts/can-edit-post-status-v2.js.map +1 -0
  93. package/dist/esm/discussions/api/utils/posts/can-edit-post-status.js +61 -0
  94. package/dist/esm/discussions/api/utils/posts/can-edit-post-status.js.map +1 -0
  95. package/dist/esm/discussions/api/utils/posts/can-edit-post-v2.js +19 -0
  96. package/dist/esm/discussions/api/utils/posts/can-edit-post-v2.js.map +1 -0
  97. package/dist/esm/discussions/api/utils/posts/can-edit-post.js +62 -0
  98. package/dist/esm/discussions/api/utils/posts/can-edit-post.js.map +1 -0
  99. package/dist/esm/discussions/api/utils/posts/index.js +15 -0
  100. package/dist/esm/discussions/api/utils/posts/index.js.map +1 -0
  101. package/dist/esm/discussions/api/utils/posts/parse-discussion-uri.js +38 -0
  102. package/dist/esm/discussions/api/utils/posts/parse-discussion-uri.js.map +1 -0
  103. package/dist/esm/discussions/api/utils/posts/parse-mentioned-users.js +19 -0
  104. package/dist/esm/discussions/api/utils/posts/parse-mentioned-users.js.map +1 -0
  105. package/dist/esm/discussions/api/utils/reactions/can-create-reaction-v2.js +27 -0
  106. package/dist/esm/discussions/api/utils/reactions/can-create-reaction-v2.js.map +1 -0
  107. package/dist/esm/discussions/api/utils/reactions/can-create-reaction.js +28 -0
  108. package/dist/esm/discussions/api/utils/reactions/can-create-reaction.js.map +1 -0
  109. package/dist/esm/discussions/api/utils/reactions/index.js +3 -0
  110. package/dist/esm/discussions/api/utils/reactions/index.js.map +1 -0
  111. package/dist/esm/hub-types.js +916 -0
  112. package/dist/esm/hub-types.js.map +1 -0
  113. package/dist/esm/org/fetch-org.js +5 -1
  114. package/dist/esm/org/fetch-org.js.map +1 -1
  115. package/dist/esm/org/fetch.js +83 -0
  116. package/dist/esm/org/fetch.js.map +1 -0
  117. package/dist/esm/search/_internal/hubDiscussionsHelpers/channelResultsToSearchResults.js +33 -0
  118. package/dist/esm/search/_internal/hubDiscussionsHelpers/channelResultsToSearchResults.js.map +1 -0
  119. package/dist/esm/search/_internal/hubDiscussionsHelpers/processChannelFilters.js +67 -0
  120. package/dist/esm/search/_internal/hubDiscussionsHelpers/processChannelFilters.js.map +1 -0
  121. package/dist/esm/search/_internal/hubDiscussionsHelpers/processChannelOptions.js +35 -0
  122. package/dist/esm/search/_internal/hubDiscussionsHelpers/processChannelOptions.js.map +1 -0
  123. package/dist/esm/search/_internal/hubSearchItemsHelpers/getFieldsQueryParam.js +15 -0
  124. package/dist/esm/search/_internal/hubSearchItemsHelpers/getFieldsQueryParam.js.map +1 -0
  125. package/dist/esm/search/_internal/hubSearchItemsHelpers/getFlattenQueryParam.js +15 -0
  126. package/dist/esm/search/_internal/hubSearchItemsHelpers/getFlattenQueryParam.js.map +1 -0
  127. package/dist/esm/search/_internal/portalFetchOrgs.js +33 -0
  128. package/dist/esm/search/_internal/portalFetchOrgs.js.map +1 -0
  129. package/dist/esm/sites/_internal/_migrate-to-v2-catalog.js +24 -0
  130. package/dist/esm/sites/_internal/_migrate-to-v2-catalog.js.map +1 -0
  131. package/dist/esm/sites/defaultSiteCollectionKeys.js +7 -0
  132. package/dist/esm/sites/defaultSiteCollectionKeys.js.map +1 -0
  133. package/dist/esm/sites/searchCategoriesToCollections.js +75 -0
  134. package/dist/esm/sites/searchCategoriesToCollections.js.map +1 -0
  135. package/dist/esm/types/IArcGISContext.js +1 -0
  136. package/dist/esm/types/IArcGISContext.js.map +1 -0
  137. package/dist/esm/types/IArcGISContextManagerOptions.js +1 -0
  138. package/dist/esm/types/IArcGISContextManagerOptions.js.map +1 -0
  139. package/dist/esm/types/IArcGISContextOptions.js +1 -0
  140. package/dist/esm/types/IArcGISContextOptions.js.map +1 -0
  141. package/dist/esm/types/IUserResourceConfig.js +1 -0
  142. package/dist/esm/types/IUserResourceConfig.js.map +1 -0
  143. package/dist/esm/types/IUserResourceToken.js +1 -0
  144. package/dist/esm/types/IUserResourceToken.js.map +1 -0
  145. package/dist/esm/urls/getPortalBaseFromOrgUrl.js +3 -1
  146. package/dist/esm/urls/getPortalBaseFromOrgUrl.js.map +1 -1
  147. package/dist/esm/utils/IHubConfig.js +1 -0
  148. package/dist/esm/utils/IHubConfig.js.map +1 -0
  149. package/dist/esm/utils/IUserHubSettings.js +1 -0
  150. package/dist/esm/utils/IUserHubSettings.js.map +1 -0
  151. package/dist/esm/utils/IUserSiteSettings.js +4 -0
  152. package/dist/esm/utils/IUserSiteSettings.js.map +1 -0
  153. package/dist/esm/utils/LogLevel.js +1 -0
  154. package/dist/esm/utils/LogLevel.js.map +1 -0
  155. package/dist/esm/utils/internal/config.js +11 -0
  156. package/dist/esm/utils/internal/config.js.map +1 -0
  157. package/dist/node/channels/HubChannel.js +177 -0
  158. package/dist/node/channels/HubChannel.js.map +1 -0
  159. package/dist/node/channels/_internal/ChannelBusinessRules.js +42 -0
  160. package/dist/node/channels/_internal/ChannelBusinessRules.js.map +1 -0
  161. package/dist/node/channels/_internal/ChannelSchema.js +201 -0
  162. package/dist/node/channels/_internal/ChannelSchema.js.map +1 -0
  163. package/dist/node/channels/_internal/ChannelUiSchemaCreate.js +291 -0
  164. package/dist/node/channels/_internal/ChannelUiSchemaCreate.js.map +1 -0
  165. package/dist/node/channels/_internal/ChannelUiSchemaEdit.js +23 -0
  166. package/dist/node/channels/_internal/ChannelUiSchemaEdit.js.map +1 -0
  167. package/dist/node/channels/_internal/buildDefaultChannel.js +30 -0
  168. package/dist/node/channels/_internal/buildDefaultChannel.js.map +1 -0
  169. package/dist/node/channels/_internal/transformAclPermissionToEntityPermissionPolicy.js +52 -0
  170. package/dist/node/channels/_internal/transformAclPermissionToEntityPermissionPolicy.js.map +1 -0
  171. package/dist/node/channels/_internal/transformChannelToEntity.js +65 -0
  172. package/dist/node/channels/_internal/transformChannelToEntity.js.map +1 -0
  173. package/dist/node/channels/_internal/transformEditorToEntity.js +26 -0
  174. package/dist/node/channels/_internal/transformEditorToEntity.js.map +1 -0
  175. package/dist/node/channels/_internal/transformEntityPermissionPoliciesToFormValues.js +153 -0
  176. package/dist/node/channels/_internal/transformEntityPermissionPoliciesToFormValues.js.map +1 -0
  177. package/dist/node/channels/_internal/transformEntityToChannelData.js +73 -0
  178. package/dist/node/channels/_internal/transformEntityToChannelData.js.map +1 -0
  179. package/dist/node/channels/_internal/transformEntityToEditor.js +24 -0
  180. package/dist/node/channels/_internal/transformEntityToEditor.js.map +1 -0
  181. package/dist/node/channels/_internal/transformFormValuesToEntityPermissionPolicies.js +59 -0
  182. package/dist/node/channels/_internal/transformFormValuesToEntityPermissionPolicies.js.map +1 -0
  183. package/dist/node/channels/edit.js +41 -0
  184. package/dist/node/channels/edit.js.map +1 -0
  185. package/dist/node/channels/fetch.js +18 -0
  186. package/dist/node/channels/fetch.js.map +1 -0
  187. package/dist/node/channels/index.js +7 -0
  188. package/dist/node/channels/index.js.map +1 -0
  189. package/dist/node/core/schemas/internal/discussions/EntityUiSchemaDiscussionsSettings.js +144 -0
  190. package/dist/node/core/schemas/internal/discussions/EntityUiSchemaDiscussionsSettings.js.map +1 -0
  191. package/dist/node/core/types/IHubChannel.js +3 -0
  192. package/dist/node/core/types/IHubChannel.js.map +1 -0
  193. package/dist/node/core/types/IHubOrganization.js +3 -0
  194. package/dist/node/core/types/IHubOrganization.js.map +1 -0
  195. package/dist/node/discussions/api/posts/index.js +5 -0
  196. package/dist/node/discussions/api/posts/index.js.map +1 -0
  197. package/dist/node/discussions/api/posts/posts.js +244 -0
  198. package/dist/node/discussions/api/posts/posts.js.map +1 -0
  199. package/dist/node/discussions/api/reactions/index.js +5 -0
  200. package/dist/node/discussions/api/reactions/index.js.map +1 -0
  201. package/dist/node/discussions/api/reactions/reactions.js +60 -0
  202. package/dist/node/discussions/api/reactions/reactions.js.map +1 -0
  203. package/dist/node/discussions/api/utils/channel-permission.js +381 -0
  204. package/dist/node/discussions/api/utils/channel-permission.js.map +1 -0
  205. package/dist/node/discussions/api/utils/channels/can-create-channel-v2.js +17 -0
  206. package/dist/node/discussions/api/utils/channels/can-create-channel-v2.js.map +1 -0
  207. package/dist/node/discussions/api/utils/channels/can-create-channel.js +58 -0
  208. package/dist/node/discussions/api/utils/channels/can-create-channel.js.map +1 -0
  209. package/dist/node/discussions/api/utils/channels/can-delete-channel-v2.js +21 -0
  210. package/dist/node/discussions/api/utils/channels/can-delete-channel-v2.js.map +1 -0
  211. package/dist/node/discussions/api/utils/channels/can-delete-channel.js +21 -0
  212. package/dist/node/discussions/api/utils/channels/can-delete-channel.js.map +1 -0
  213. package/dist/node/discussions/api/utils/channels/can-edit-channel-v2.js +23 -0
  214. package/dist/node/discussions/api/utils/channels/can-edit-channel-v2.js.map +1 -0
  215. package/dist/node/discussions/api/utils/channels/can-edit-channel.js +21 -0
  216. package/dist/node/discussions/api/utils/channels/can-edit-channel.js.map +1 -0
  217. package/dist/node/discussions/api/utils/channels/can-modify-channel.js +22 -0
  218. package/dist/node/discussions/api/utils/channels/can-modify-channel.js.map +1 -0
  219. package/dist/node/discussions/api/utils/channels/can-post-to-channel.js +61 -0
  220. package/dist/node/discussions/api/utils/channels/can-post-to-channel.js.map +1 -0
  221. package/dist/node/discussions/api/utils/channels/can-read-channel-v2.js +22 -0
  222. package/dist/node/discussions/api/utils/channels/can-read-channel-v2.js.map +1 -0
  223. package/dist/node/discussions/api/utils/channels/can-read-channel.js +57 -0
  224. package/dist/node/discussions/api/utils/channels/can-read-channel.js.map +1 -0
  225. package/dist/node/discussions/api/utils/channels/channel-to-dto-map.js +15 -0
  226. package/dist/node/discussions/api/utils/channels/channel-to-dto-map.js.map +1 -0
  227. package/dist/node/discussions/api/utils/channels/index.js +26 -0
  228. package/dist/node/discussions/api/utils/channels/index.js.map +1 -0
  229. package/dist/node/discussions/api/utils/channels/is-authorized-to-modify-channel-by-legacy-permissions.js +48 -0
  230. package/dist/node/discussions/api/utils/channels/is-authorized-to-modify-channel-by-legacy-permissions.js.map +1 -0
  231. package/dist/node/discussions/api/utils/platform.js +53 -0
  232. package/dist/node/discussions/api/utils/platform.js.map +1 -0
  233. package/dist/node/discussions/api/utils/portal-privilege.js +41 -0
  234. package/dist/node/discussions/api/utils/portal-privilege.js.map +1 -0
  235. package/dist/node/discussions/api/utils/posts/can-create-post-v2.js +24 -0
  236. package/dist/node/discussions/api/utils/posts/can-create-post-v2.js.map +1 -0
  237. package/dist/node/discussions/api/utils/posts/can-create-post.js +56 -0
  238. package/dist/node/discussions/api/utils/posts/can-create-post.js.map +1 -0
  239. package/dist/node/discussions/api/utils/posts/can-create-reply-v2.js +23 -0
  240. package/dist/node/discussions/api/utils/posts/can-create-reply-v2.js.map +1 -0
  241. package/dist/node/discussions/api/utils/posts/can-create-reply.js +56 -0
  242. package/dist/node/discussions/api/utils/posts/can-create-reply.js.map +1 -0
  243. package/dist/node/discussions/api/utils/posts/can-delete-post-v2.js +28 -0
  244. package/dist/node/discussions/api/utils/posts/can-delete-post-v2.js.map +1 -0
  245. package/dist/node/discussions/api/utils/posts/can-delete-post.js +32 -0
  246. package/dist/node/discussions/api/utils/posts/can-delete-post.js.map +1 -0
  247. package/dist/node/discussions/api/utils/posts/can-edit-post-status-v2.js +20 -0
  248. package/dist/node/discussions/api/utils/posts/can-edit-post-status-v2.js.map +1 -0
  249. package/dist/node/discussions/api/utils/posts/can-edit-post-status.js +66 -0
  250. package/dist/node/discussions/api/utils/posts/can-edit-post-status.js.map +1 -0
  251. package/dist/node/discussions/api/utils/posts/can-edit-post-v2.js +23 -0
  252. package/dist/node/discussions/api/utils/posts/can-edit-post-v2.js.map +1 -0
  253. package/dist/node/discussions/api/utils/posts/can-edit-post.js +67 -0
  254. package/dist/node/discussions/api/utils/posts/can-edit-post.js.map +1 -0
  255. package/dist/node/discussions/api/utils/posts/index.js +31 -0
  256. package/dist/node/discussions/api/utils/posts/index.js.map +1 -0
  257. package/dist/node/discussions/api/utils/posts/parse-discussion-uri.js +42 -0
  258. package/dist/node/discussions/api/utils/posts/parse-discussion-uri.js.map +1 -0
  259. package/dist/node/discussions/api/utils/posts/parse-mentioned-users.js +23 -0
  260. package/dist/node/discussions/api/utils/posts/parse-mentioned-users.js.map +1 -0
  261. package/dist/node/discussions/api/utils/reactions/can-create-reaction-v2.js +31 -0
  262. package/dist/node/discussions/api/utils/reactions/can-create-reaction-v2.js.map +1 -0
  263. package/dist/node/discussions/api/utils/reactions/can-create-reaction.js +32 -0
  264. package/dist/node/discussions/api/utils/reactions/can-create-reaction.js.map +1 -0
  265. package/dist/node/discussions/api/utils/reactions/index.js +7 -0
  266. package/dist/node/discussions/api/utils/reactions/index.js.map +1 -0
  267. package/dist/node/hub-types.js +919 -0
  268. package/dist/node/hub-types.js.map +1 -0
  269. package/dist/node/org/fetch-org.js +5 -1
  270. package/dist/node/org/fetch-org.js.map +1 -1
  271. package/dist/node/org/fetch.js +89 -0
  272. package/dist/node/org/fetch.js.map +1 -0
  273. package/dist/node/search/_internal/hubDiscussionsHelpers/channelResultsToSearchResults.js +37 -0
  274. package/dist/node/search/_internal/hubDiscussionsHelpers/channelResultsToSearchResults.js.map +1 -0
  275. package/dist/node/search/_internal/hubDiscussionsHelpers/processChannelFilters.js +72 -0
  276. package/dist/node/search/_internal/hubDiscussionsHelpers/processChannelFilters.js.map +1 -0
  277. package/dist/node/search/_internal/hubDiscussionsHelpers/processChannelOptions.js +39 -0
  278. package/dist/node/search/_internal/hubDiscussionsHelpers/processChannelOptions.js.map +1 -0
  279. package/dist/node/search/_internal/hubSearchItemsHelpers/getFieldsQueryParam.js +19 -0
  280. package/dist/node/search/_internal/hubSearchItemsHelpers/getFieldsQueryParam.js.map +1 -0
  281. package/dist/node/search/_internal/hubSearchItemsHelpers/getFlattenQueryParam.js +19 -0
  282. package/dist/node/search/_internal/hubSearchItemsHelpers/getFlattenQueryParam.js.map +1 -0
  283. package/dist/node/search/_internal/portalFetchOrgs.js +37 -0
  284. package/dist/node/search/_internal/portalFetchOrgs.js.map +1 -0
  285. package/dist/node/sites/_internal/_migrate-to-v2-catalog.js +28 -0
  286. package/dist/node/sites/_internal/_migrate-to-v2-catalog.js.map +1 -0
  287. package/dist/node/sites/defaultSiteCollectionKeys.js +10 -0
  288. package/dist/node/sites/defaultSiteCollectionKeys.js.map +1 -0
  289. package/dist/node/sites/searchCategoriesToCollections.js +79 -0
  290. package/dist/node/sites/searchCategoriesToCollections.js.map +1 -0
  291. package/dist/node/types/IArcGISContext.js +3 -0
  292. package/dist/node/types/IArcGISContext.js.map +1 -0
  293. package/dist/node/types/IArcGISContextManagerOptions.js +3 -0
  294. package/dist/node/types/IArcGISContextManagerOptions.js.map +1 -0
  295. package/dist/node/types/IArcGISContextOptions.js +3 -0
  296. package/dist/node/types/IArcGISContextOptions.js.map +1 -0
  297. package/dist/node/types/IUserResourceConfig.js +3 -0
  298. package/dist/node/types/IUserResourceConfig.js.map +1 -0
  299. package/dist/node/types/IUserResourceToken.js +3 -0
  300. package/dist/node/types/IUserResourceToken.js.map +1 -0
  301. package/dist/node/urls/getPortalBaseFromOrgUrl.js +3 -1
  302. package/dist/node/urls/getPortalBaseFromOrgUrl.js.map +1 -1
  303. package/dist/node/utils/IHubConfig.js +3 -0
  304. package/dist/node/utils/IHubConfig.js.map +1 -0
  305. package/dist/node/utils/IUserHubSettings.js +3 -0
  306. package/dist/node/utils/IUserHubSettings.js.map +1 -0
  307. package/dist/node/utils/IUserSiteSettings.js +6 -0
  308. package/dist/node/utils/IUserSiteSettings.js.map +1 -0
  309. package/dist/node/utils/LogLevel.js +3 -0
  310. package/dist/node/utils/LogLevel.js.map +1 -0
  311. package/dist/node/utils/internal/config.js +14 -0
  312. package/dist/node/utils/internal/config.js.map +1 -0
  313. package/dist/types/channels/HubChannel.d.ts +105 -0
  314. package/dist/types/channels/_internal/ChannelBusinessRules.d.ts +19 -0
  315. package/dist/types/channels/_internal/ChannelSchema.d.ts +16 -0
  316. package/dist/types/channels/_internal/ChannelUiSchemaCreate.d.ts +10 -0
  317. package/dist/types/channels/_internal/ChannelUiSchemaEdit.d.ts +10 -0
  318. package/dist/types/channels/_internal/buildDefaultChannel.d.ts +8 -0
  319. package/dist/types/channels/_internal/transformAclPermissionToEntityPermissionPolicy.d.ts +11 -0
  320. package/dist/types/channels/_internal/transformChannelToEntity.d.ts +11 -0
  321. package/dist/types/channels/_internal/transformEditorToEntity.d.ts +8 -0
  322. package/dist/types/channels/_internal/transformEntityPermissionPoliciesToFormValues.d.ts +44 -0
  323. package/dist/types/channels/_internal/transformEntityToChannelData.d.ts +9 -0
  324. package/dist/types/channels/_internal/transformEntityToEditor.d.ts +9 -0
  325. package/dist/types/channels/_internal/transformFormValuesToEntityPermissionPolicies.d.ts +9 -0
  326. package/dist/types/channels/edit.d.ts +23 -0
  327. package/dist/types/channels/fetch.d.ts +9 -0
  328. package/dist/types/channels/index.d.ts +3 -0
  329. package/dist/types/core/schemas/internal/discussions/EntityUiSchemaDiscussionsSettings.d.ts +11 -0
  330. package/dist/types/core/types/IHubChannel.d.ts +91 -0
  331. package/dist/types/core/types/IHubOrganization.d.ts +61 -0
  332. package/dist/types/discussions/api/posts/index.d.ts +1 -0
  333. package/dist/types/discussions/api/posts/posts.d.ts +146 -0
  334. package/dist/types/discussions/api/reactions/index.d.ts +1 -0
  335. package/dist/types/discussions/api/reactions/reactions.d.ts +38 -0
  336. package/dist/types/discussions/api/utils/channel-permission.d.ts +44 -0
  337. package/dist/types/discussions/api/utils/channels/can-create-channel-v2.d.ts +10 -0
  338. package/dist/types/discussions/api/utils/channels/can-create-channel.d.ts +11 -0
  339. package/dist/types/discussions/api/utils/channels/can-delete-channel-v2.d.ts +10 -0
  340. package/dist/types/discussions/api/utils/channels/can-delete-channel.d.ts +11 -0
  341. package/dist/types/discussions/api/utils/channels/can-edit-channel-v2.d.ts +11 -0
  342. package/dist/types/discussions/api/utils/channels/can-edit-channel.d.ts +11 -0
  343. package/dist/types/discussions/api/utils/channels/can-modify-channel.d.ts +11 -0
  344. package/dist/types/discussions/api/utils/channels/can-post-to-channel.d.ts +11 -0
  345. package/dist/types/discussions/api/utils/channels/can-read-channel-v2.d.ts +11 -0
  346. package/dist/types/discussions/api/utils/channels/can-read-channel.d.ts +22 -0
  347. package/dist/types/discussions/api/utils/channels/channel-to-dto-map.d.ts +6 -0
  348. package/dist/types/discussions/api/utils/channels/index.d.ts +10 -0
  349. package/dist/types/discussions/api/utils/channels/is-authorized-to-modify-channel-by-legacy-permissions.d.ts +11 -0
  350. package/dist/types/discussions/api/utils/platform.d.ts +26 -0
  351. package/dist/types/discussions/api/utils/portal-privilege.d.ts +17 -0
  352. package/dist/types/discussions/api/utils/posts/can-create-post-v2.d.ts +10 -0
  353. package/dist/types/discussions/api/utils/posts/can-create-post.d.ts +12 -0
  354. package/dist/types/discussions/api/utils/posts/can-create-reply-v2.d.ts +9 -0
  355. package/dist/types/discussions/api/utils/posts/can-create-reply.d.ts +12 -0
  356. package/dist/types/discussions/api/utils/posts/can-delete-post-v2.d.ts +11 -0
  357. package/dist/types/discussions/api/utils/posts/can-delete-post.d.ts +12 -0
  358. package/dist/types/discussions/api/utils/posts/can-edit-post-status-v2.d.ts +9 -0
  359. package/dist/types/discussions/api/utils/posts/can-edit-post-status.d.ts +20 -0
  360. package/dist/types/discussions/api/utils/posts/can-edit-post-v2.d.ts +10 -0
  361. package/dist/types/discussions/api/utils/posts/can-edit-post.d.ts +22 -0
  362. package/dist/types/discussions/api/utils/posts/index.d.ts +12 -0
  363. package/dist/types/discussions/api/utils/posts/parse-discussion-uri.d.ts +9 -0
  364. package/dist/types/discussions/api/utils/posts/parse-mentioned-users.d.ts +6 -0
  365. package/dist/types/discussions/api/utils/reactions/can-create-reaction-v2.d.ts +12 -0
  366. package/dist/types/discussions/api/utils/reactions/can-create-reaction.d.ts +13 -0
  367. package/dist/types/discussions/api/utils/reactions/index.d.ts +2 -0
  368. package/dist/types/hub-types.d.ts +547 -0
  369. package/dist/types/org/fetch.d.ts +26 -0
  370. package/dist/types/search/_internal/hubDiscussionsHelpers/channelResultsToSearchResults.d.ts +11 -0
  371. package/dist/types/search/_internal/hubDiscussionsHelpers/processChannelFilters.d.ts +32 -0
  372. package/dist/types/search/_internal/hubDiscussionsHelpers/processChannelOptions.d.ts +10 -0
  373. package/dist/types/search/_internal/hubSearchItemsHelpers/getFieldsQueryParam.d.ts +11 -0
  374. package/dist/types/search/_internal/hubSearchItemsHelpers/getFlattenQueryParam.d.ts +11 -0
  375. package/dist/types/search/_internal/portalFetchOrgs.d.ts +9 -0
  376. package/dist/types/sites/_internal/_migrate-to-v2-catalog.d.ts +8 -0
  377. package/dist/types/sites/defaultSiteCollectionKeys.d.ts +2 -0
  378. package/dist/types/sites/searchCategoriesToCollections.d.ts +10 -0
  379. package/dist/types/types/IArcGISContext.d.ts +258 -0
  380. package/dist/types/types/IArcGISContextManagerOptions.d.ts +79 -0
  381. package/dist/types/types/IArcGISContextOptions.d.ts +78 -0
  382. package/dist/types/types/IUserResourceConfig.d.ts +5 -0
  383. package/dist/types/types/IUserResourceToken.d.ts +4 -0
  384. package/dist/types/utils/IHubConfig.d.ts +24 -0
  385. package/dist/types/utils/IUserHubSettings.d.ts +32 -0
  386. package/dist/types/utils/IUserSiteSettings.d.ts +8 -0
  387. package/dist/types/utils/LogLevel.d.ts +2 -0
  388. package/dist/types/utils/internal/config.d.ts +1 -0
  389. package/package.json +1 -1
@@ -0,0 +1,146 @@
1
+ import { ICreatePostParams, ICreatePostParamsV2, ICreateReplyParams, IPost, ISearchPostsParams, IExportPostsParams, IFetchPostParams, IRemovePostParams, IRemovePostResponse, IUpdatePostParams, IUpdatePostStatusParams, IPagedResponse } from "../types";
2
+ /**
3
+ * search posts
4
+ *
5
+ * @deprecated use searchPostsV2 instead
6
+ * @export
7
+ * @param {ISearchPostsParams} options
8
+ * @return {*} {Promise<IPagedResponse<IPost>>}
9
+ */
10
+ export declare function searchPosts(options: ISearchPostsParams): Promise<IPagedResponse<IPost>>;
11
+ /**
12
+ * searches for posts and resolves a promise with CSV string representing the results
13
+ *
14
+ * @deprecated use exportPostsV2 instead
15
+ * @export
16
+ * @param {IExportPostsParams} options
17
+ * @return {*} {Promise<string>}
18
+ */
19
+ export declare function exportPosts(options: IExportPostsParams): Promise<string>;
20
+ /**
21
+ * create post
22
+ *
23
+ * @deprecated use createPostV2 instead
24
+ * @export
25
+ * @param {ICreatePostParams} options
26
+ * @return {*} {Promise<IPost>}
27
+ */
28
+ export declare function createPost(options: ICreatePostParams): Promise<IPost>;
29
+ /**
30
+ * create reply to post
31
+ *
32
+ * @deprecated use createReplyV2 instead
33
+ * @export
34
+ * @param {string} parentId
35
+ * @param {ICreateReplyParams} options
36
+ * @return {*} {Promise<IPost>}
37
+ */
38
+ export declare function createReply(options: ICreateReplyParams): Promise<IPost>;
39
+ /**
40
+ * fetch post
41
+ *
42
+ * @deprecated use fetchPostV2 instead
43
+ * @export
44
+ * @param {IFetchPostParams} params
45
+ * @return {*} {Promise<IPost>}
46
+ */
47
+ export declare function fetchPost(params: IFetchPostParams): Promise<IPost>;
48
+ /**
49
+ * remove post
50
+ *
51
+ * @deprecated use removePostV2 instead
52
+ * @export
53
+ * @param {IRemovePostParams} options
54
+ * @return {*} {Promise<IRemovePostResponse>}
55
+ */
56
+ export declare function removePost(options: IRemovePostParams): Promise<IRemovePostResponse>;
57
+ /**
58
+ * update post
59
+ * NOTE: this method currently only update post.title and post.body
60
+ *
61
+ * @deprecated use updatePostV2 instead
62
+ * @export
63
+ * @param {IUpdatePostParams} options
64
+ * @return {*} {Promise<IPost>}
65
+ */
66
+ export declare function updatePost(options: IUpdatePostParams): Promise<IPost>;
67
+ /**
68
+ * update post status
69
+ * NOTE: this method will only update a post's status
70
+ *
71
+ * @deprecated use updatePostStatusV2 instead
72
+ * @export
73
+ * @param {IUpdatePostStatusParams} options
74
+ * @return {*} {Promise<IPost>}
75
+ */
76
+ export declare function updatePostStatus(options: IUpdatePostStatusParams): Promise<IPost>;
77
+ /*******************************
78
+ * V2
79
+ *******************************/
80
+ /**
81
+ * search posts V2
82
+ *
83
+ * @export
84
+ * @param {ISearchPostsParams} options
85
+ * @return {*} {Promise<IPagedResponse<IPost>>}
86
+ */
87
+ export declare function searchPostsV2(options: ISearchPostsParams): Promise<IPagedResponse<IPost>>;
88
+ /**
89
+ * searches for posts and resolves a promise with CSV string representing the results V2
90
+ *
91
+ * @export
92
+ * @param {IExportPostsParams} options
93
+ * @return {*} {Promise<string>}
94
+ */
95
+ export declare function exportPostsV2(options: IExportPostsParams): Promise<string>;
96
+ /**
97
+ * create post
98
+ *
99
+ * @export
100
+ * @param {ICreatePostParamsV2} options
101
+ * @return {*} {Promise<IPost>}
102
+ */
103
+ export declare function createPostV2(options: ICreatePostParamsV2): Promise<IPost>;
104
+ /**
105
+ * create reply to post
106
+ *
107
+ * @export
108
+ * @param {string} parentId
109
+ * @param {ICreateReplyParams} options
110
+ * @return {*} {Promise<IPost>}
111
+ */
112
+ export declare function createReplyV2(options: ICreateReplyParams): Promise<IPost>;
113
+ /**
114
+ * fetch post
115
+ *
116
+ * @export
117
+ * @param {IFetchPostParams} params
118
+ * @return {*} {Promise<IPost>}
119
+ */
120
+ export declare function fetchPostV2(params: IFetchPostParams): Promise<IPost>;
121
+ /**
122
+ * remove post
123
+ *
124
+ * @export
125
+ * @param {IRemovePostParams} options
126
+ * @return {*} {Promise<IRemovePostResponse>}
127
+ */
128
+ export declare function removePostV2(options: IRemovePostParams): Promise<IRemovePostResponse>;
129
+ /**
130
+ * update post
131
+ * NOTE: this method currently only update post.title and post.body
132
+ *
133
+ * @export
134
+ * @param {IUpdatePostParams} options
135
+ * @return {*} {Promise<IPost>}
136
+ */
137
+ export declare function updatePostV2(options: IUpdatePostParams): Promise<IPost>;
138
+ /**
139
+ * update post status
140
+ * NOTE: this method will only update a post's status
141
+ *
142
+ * @export
143
+ * @param {IUpdatePostStatusParams} options
144
+ * @return {*} {Promise<IPost>}
145
+ */
146
+ export declare function updatePostStatusV2(options: IUpdatePostStatusParams): Promise<IPost>;
@@ -0,0 +1 @@
1
+ export * from "./reactions";
@@ -0,0 +1,38 @@
1
+ import { ICreateReactionOptions, IRemoveReactionOptions, IRemoveReactionResponse, IReaction } from "../types";
2
+ /**
3
+ * create reaction to post
4
+ *
5
+ * @deprecated use createReactionV2 instead
6
+ * @export
7
+ * @param {ICreateReactionOptions} options
8
+ * @return {*} {Promise<IReaction>}
9
+ */
10
+ export declare function createReaction(options: ICreateReactionOptions): Promise<IReaction>;
11
+ /**
12
+ * remove reaction
13
+ *
14
+ * @deprecated use removeReactionV2 instead
15
+ * @export
16
+ * @param {IRemoveReactionOptions} options
17
+ * @return {*} {Promise<IRemoveReactionResponse>}
18
+ */
19
+ export declare function removeReaction(options: IRemoveReactionOptions): Promise<IRemoveReactionResponse>;
20
+ /*******************************
21
+ * V2
22
+ *******************************/
23
+ /**
24
+ * create reaction to post
25
+ *
26
+ * @export
27
+ * @param {ICreateReactionOptions} options
28
+ * @return {*} {Promise<IReaction>}
29
+ */
30
+ export declare function createReactionV2(options: ICreateReactionOptions): Promise<IReaction>;
31
+ /**
32
+ * remove reaction
33
+ *
34
+ * @export
35
+ * @param {IRemoveReactionOptions} options
36
+ * @return {*} {Promise<IRemoveReactionResponse>}
37
+ */
38
+ export declare function removeReactionV2(options: IRemoveReactionOptions): Promise<IRemoveReactionResponse>;
@@ -0,0 +1,44 @@
1
+ import { IChannel, IDiscussionsUser, IUpdateChannelV2 } from "../types";
2
+ /**
3
+ * @internal
4
+ * @hidden
5
+ */
6
+ export declare class ChannelPermission {
7
+ private readonly ALLOWED_GROUP_MEMBER_TYPES;
8
+ private isChannelAclEmpty;
9
+ private existingChannel;
10
+ private permissionsByCategory;
11
+ constructor(channel: IChannel);
12
+ canPostToChannel(user: IDiscussionsUser): boolean;
13
+ canCreateChannel(user: IDiscussionsUser): boolean;
14
+ canModerateChannel(user: IDiscussionsUser): boolean;
15
+ canReadChannel(user: IDiscussionsUser): boolean;
16
+ canDeleteChannel(user: IDiscussionsUser): boolean;
17
+ /**
18
+ * Ensure the user has rights to update the channel before calling this method
19
+ * Ex: canModerateChannel
20
+ */
21
+ canUpdateProperties(user: IDiscussionsUser, updateData?: IUpdateChannelV2): boolean;
22
+ private isChanged;
23
+ private isStringArrayChanged;
24
+ private isRoleChanged;
25
+ private isCategoryChanged;
26
+ private canAnyUser;
27
+ private canAnyAuthenticatedUser;
28
+ private canSomeUser;
29
+ private canSomeUserGroup;
30
+ private canSomeUserOrg;
31
+ private userCanAddAnonymousToAcl;
32
+ private userCanAddUnauthenticatedToAcl;
33
+ private userCanAddAllGroupsToAcl;
34
+ private userCanAddAllOrgsToAcl;
35
+ private isEveryPermissionForUserOrg;
36
+ private userCanAddUsersToAcl;
37
+ private isUserUnAuthenticated;
38
+ private mapUserGroupsById;
39
+ private isMemberTypeAuthorized;
40
+ private determineUserRole;
41
+ private isOwner;
42
+ private isManager;
43
+ private isModerator;
44
+ }
@@ -0,0 +1,10 @@
1
+ import type { IUser } from "@esri/arcgis-rest-portal";
2
+ import { IChannel, IDiscussionsUser } from "../../types";
3
+ /**
4
+ * Utility to determine if User has privileges to create a channel with the defined permissions
5
+ * @export
6
+ * @param channel
7
+ * @param user
8
+ * @returns {boolean}
9
+ */
10
+ export declare function canCreateChannelV2(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
@@ -0,0 +1,11 @@
1
+ import { IUser } from "@esri/arcgis-rest-portal";
2
+ import { IChannel, IDiscussionsUser } from "../../types";
3
+ /**
4
+ * Utility to determine if User has privileges to create a channel with the defined permissions
5
+ * @deprecated replace with canCreateChannelV2 for v2 discussions
6
+ * @export
7
+ * @param channel
8
+ * @param user
9
+ * @returns {boolean}
10
+ */
11
+ export declare function canCreateChannel(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
@@ -0,0 +1,10 @@
1
+ import type { IUser } from "@esri/arcgis-rest-portal";
2
+ import { IChannel, IDiscussionsUser } from "../../types";
3
+ /**
4
+ * Utility to determine if User has privileges to delete a channel
5
+ * @export
6
+ * @param channel
7
+ * @param user
8
+ * @returns {boolean}
9
+ */
10
+ export declare function canDeleteChannelV2(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
@@ -0,0 +1,11 @@
1
+ import { IUser } from "@esri/arcgis-rest-portal";
2
+ import { IChannel, IDiscussionsUser } from "../../types";
3
+ /**
4
+ * Utility to determine if User has privileges to delete a channel
5
+ * @deprecated replace with canDeleteChannelV2 for v2 discussions
6
+ * @export
7
+ * @param channel
8
+ * @param user
9
+ * @returns {boolean}
10
+ */
11
+ export declare function canDeleteChannel(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
@@ -0,0 +1,11 @@
1
+ import type { IUser } from "@esri/arcgis-rest-portal";
2
+ import { IChannel, IDiscussionsUser, IUpdateChannelV2 } from "../../types";
3
+ /**
4
+ * Utility to determine if User has privileges to edit a channel
5
+ * @export
6
+ * @param channel
7
+ * @param user
8
+ * @param updateData
9
+ * @returns {boolean}
10
+ */
11
+ export declare function canEditChannelV2(channel: IChannel, user: IUser | IDiscussionsUser, updateData: IUpdateChannelV2): boolean;
@@ -0,0 +1,11 @@
1
+ import { IUser } from "@esri/arcgis-rest-portal";
2
+ import { IChannel, IDiscussionsUser } from "../../types";
3
+ /**
4
+ * Utility to determine if User has privileges to edit a channel
5
+ * @export
6
+ * @deprecated replace with canEditChannelV2 for v2 discussions
7
+ * @param channel
8
+ * @param user
9
+ * @returns {boolean}
10
+ */
11
+ export declare function canEditChannel(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
@@ -0,0 +1,11 @@
1
+ import { IUser } from "@esri/arcgis-rest-portal";
2
+ import { IChannel, IDiscussionsUser } from "../../types";
3
+ /**
4
+ * Utility to determine if User has privileges to modify a channel
5
+ * @deprecated use `canEditChannelV2` or `canDeleteChannelV2` instead.
6
+ * @export
7
+ * @param channel
8
+ * @param user
9
+ * @returns {boolean}
10
+ */
11
+ export declare function canModifyChannel(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
@@ -0,0 +1,11 @@
1
+ import { IUser } from "@esri/arcgis-rest-portal";
2
+ import { IChannel, IDiscussionsUser } from "../../types";
3
+ /**
4
+ * Utility to determine if User has privileges to create a post in a channel
5
+ * @deprecated use `canCreatePostV2` or 'canCreateReplyV2` instead
6
+ * @export
7
+ * @param channel
8
+ * @param user
9
+ * @returns {boolean}
10
+ */
11
+ export declare function canPostToChannel(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
@@ -0,0 +1,11 @@
1
+ import type { IUser } from "@esri/arcgis-rest-portal";
2
+ import { IChannel, IDiscussionsUser } from "../../types";
3
+ /**
4
+ * Utility to determine if User can view channel posts and channel attributes
5
+ *
6
+ * @export
7
+ * @param {IChannel} channel
8
+ * @param {IUser} user
9
+ * @return {*} {boolean}
10
+ */
11
+ export declare function canReadChannelV2(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
@@ -0,0 +1,22 @@
1
+ import type { IUser } from "@esri/arcgis-rest-portal";
2
+ import { IChannel, IDiscussionsUser } from "../../types";
3
+ /**
4
+ * Utility to determine if User can view channel posts and channel attributes
5
+ *
6
+ * @deprecated replace with canReadChannelV2 for v2 discussions
7
+ * @export
8
+ * @param {IChannel} channel
9
+ * @param {IUser} user
10
+ * @return {*} {boolean}
11
+ */
12
+ export declare function canReadChannel(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
13
+ /**
14
+ * Utility (deprecated) to determine whether User can view posts belonging to Channel
15
+ *
16
+ * @export
17
+ * @deprecated replace with canReadChannelV2 for v2 discussions
18
+ * @param {IChannel} channel
19
+ * @param {IUser} user
20
+ * @return {*} {boolean}
21
+ */
22
+ export declare function canReadFromChannel(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
@@ -0,0 +1,6 @@
1
+ import { IChannel } from "../../types";
2
+ /**
3
+ * @hidden
4
+ * @internal
5
+ */
6
+ export declare function dtoToChannel(dto: any): IChannel;
@@ -0,0 +1,10 @@
1
+ export { canCreateChannel } from "./can-create-channel";
2
+ export { canDeleteChannel } from "./can-delete-channel";
3
+ export { canEditChannel } from "./can-edit-channel";
4
+ export { canModifyChannel } from "./can-modify-channel";
5
+ export { canPostToChannel } from "./can-post-to-channel";
6
+ export { canReadChannel, canReadFromChannel } from "./can-read-channel";
7
+ export { canCreateChannelV2 } from "./can-create-channel-v2";
8
+ export { canDeleteChannelV2 } from "./can-delete-channel-v2";
9
+ export { canEditChannelV2 } from "./can-edit-channel-v2";
10
+ export { canReadChannelV2 } from "./can-read-channel-v2";
@@ -0,0 +1,11 @@
1
+ import { IUser } from "@esri/arcgis-rest-portal";
2
+ import { IChannel, IDiscussionsUser } from "../../types";
3
+ /**
4
+ * Utility to determine if User has privileges to modify a channel by legacy channel permissions
5
+ * @param channel
6
+ * @param user
7
+ * @returns {boolean}
8
+ * @internal
9
+ * @hidden
10
+ */
11
+ export declare function isAuthorizedToModifyChannelByLegacyPermissions(user: IUser | IDiscussionsUser, channel: IChannel): boolean;
@@ -0,0 +1,26 @@
1
+ import { GroupMembership, IGroup, IUser } from "@esri/arcgis-rest-portal";
2
+ import { IDiscussionsUser } from "../types";
3
+ declare type Privilege = "portal:admin:deleteItems" | "portal:admin:shareToOrg" | "portal:admin:shareToPublic" | "portal:admin:updateItems" | "portal:admin:viewItems" | "portal:user:createItem" | "portal:user:shareToGroup" | "portal:user:shareToOrg" | "portal:user:shareToPublic" | "portal:user:viewOrgItems";
4
+ /**
5
+ * Utility that returns reducer function that filters a user's groups
6
+ * by membership type and produces an array of group id's
7
+ *
8
+ *
9
+ * @export
10
+ * @param {GroupMembership[]} membershipTypes
11
+ * @return {*} {((memo: string[], group: IGroup) => string[])}
12
+ */
13
+ export declare function reduceByGroupMembership(membershipTypes: GroupMembership[]): (memo: string[], group: IGroup) => string[];
14
+ /**
15
+ * Utility that checks if a user is a portal org admin, or an org_admin by a platform role
16
+ *
17
+ * @export
18
+ * @param {IUser} user
19
+ * @return {*} {boolean}
20
+ */
21
+ export declare function isOrgAdmin(user: IUser): boolean;
22
+ export declare function isUserInOrg(user: IUser | IDiscussionsUser, orgId: string): boolean;
23
+ export declare function isOrgAdminInOrg(user: IUser, orgId: string): boolean;
24
+ export declare function userHasPrivilege(user: IUser | IDiscussionsUser, privilege: Privilege): boolean;
25
+ export declare function userHasPrivileges(user: IUser | IDiscussionsUser, privileges: Privilege[]): boolean;
26
+ export {};
@@ -0,0 +1,17 @@
1
+ import { IUser } from "@esri/arcgis-rest-portal";
2
+ import { IDiscussionsUser } from "../types";
3
+ /**
4
+ * @internal
5
+ * @hidden
6
+ */
7
+ export declare function hasOrgAdminViewRights(user: IUser | IDiscussionsUser, orgId: string): boolean;
8
+ /**
9
+ * @internal
10
+ * @hidden
11
+ */
12
+ export declare function hasOrgAdminUpdateRights(user: IUser | IDiscussionsUser, orgId: string): boolean;
13
+ /**
14
+ * @internal
15
+ * @hidden
16
+ */
17
+ export declare function hasOrgAdminDeleteRights(user: IUser | IDiscussionsUser, orgId: string): boolean;
@@ -0,0 +1,10 @@
1
+ import type { IUser } from "@esri/arcgis-rest-portal";
2
+ import { IChannel, IDiscussionsUser } from "../../types";
3
+ /**
4
+ * Utility to determine if User has privileges to create a post in a channel
5
+ * @export
6
+ * @param channel
7
+ * @param user
8
+ * @returns {boolean}
9
+ */
10
+ export declare function canCreatePostV2(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
@@ -0,0 +1,12 @@
1
+ import { IUser } from "@esri/arcgis-rest-portal";
2
+ import { IChannel, IDiscussionsUser } from "../../types";
3
+ /**
4
+ * Utility to determine if User has privileges to create a post in a channel
5
+ *
6
+ * @deprecated replace with canCreatePostV2 for v2 discussions
7
+ * @export
8
+ * @param channel
9
+ * @param user
10
+ * @returns {boolean}
11
+ */
12
+ export declare function canCreatePost(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
@@ -0,0 +1,9 @@
1
+ import type { IUser } from "@esri/arcgis-rest-portal";
2
+ import { IChannel, IDiscussionsUser } from "../../types";
3
+ /**
4
+ * Utility to determine if User has privileges to create a reply in a channel
5
+ * @param channel
6
+ * @param user
7
+ * @returns {boolean}
8
+ */
9
+ export declare function canCreateReplyV2(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
@@ -0,0 +1,12 @@
1
+ import { IUser } from "@esri/arcgis-rest-portal";
2
+ import { IChannel, IDiscussionsUser } from "../../types";
3
+ /**
4
+ * Utility to determine if User has privileges to create a reply in a channel
5
+ *
6
+ * @export
7
+ * @deprecated replace with canCreateReplyV2 for v2 discussions
8
+ * @param channel
9
+ * @param user
10
+ * @returns {boolean}
11
+ */
12
+ export declare function canCreateReply(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
@@ -0,0 +1,11 @@
1
+ import type { IUser } from "@esri/arcgis-rest-portal";
2
+ import { IChannel, IDiscussionsUser, IPost } from "../../types";
3
+ /**
4
+ * Utility to determine if User has privileges to delete a post
5
+ * @export
6
+ * @param post
7
+ * @param user
8
+ * @param channel
9
+ * @returns {boolean}
10
+ */
11
+ export declare function canDeletePostV2(post: IPost, channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
@@ -0,0 +1,12 @@
1
+ import { IUser } from "@esri/arcgis-rest-portal";
2
+ import { IChannel, IDiscussionsUser, IPost } from "../../types";
3
+ /**
4
+ * Utility to determine if User has privileges to delete a post
5
+ * @deprecated replace with canDeletePostV2 for v2 discussions
6
+ * @export
7
+ * @param post
8
+ * @param user
9
+ * @param channel
10
+ * @returns {boolean}
11
+ */
12
+ export declare function canDeletePost(post: IPost, channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
@@ -0,0 +1,9 @@
1
+ import type { IUser } from "@esri/arcgis-rest-portal";
2
+ import { IChannel, IDiscussionsUser } from "../../types";
3
+ /**
4
+ * Utility to determine if User has privileges to modify the status of a post
5
+ * @param channel
6
+ * @param user
7
+ * @returns {boolean}
8
+ */
9
+ export declare function canEditPostStatusV2(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
@@ -0,0 +1,20 @@
1
+ import { IUser } from "@esri/arcgis-rest-portal";
2
+ import { IChannel, IDiscussionsUser } from "../../types";
3
+ /**
4
+ * Utility to determine if User has privileges to modify the status of a post
5
+ * @export
6
+ * @deprecated replace with canEditPostStatusV2 for v2 discussions
7
+ * @param channel
8
+ * @param user
9
+ * @returns {boolean}
10
+ */
11
+ export declare function canModifyPostStatus(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
12
+ /**
13
+ * Utility to determine if User has privileges to modify the status of a post
14
+ * @export
15
+ * @deprecated replace with canEditPostStatusV2 for v2 discussions
16
+ * @param channel
17
+ * @param user
18
+ * @returns {boolean}
19
+ */
20
+ export declare function canEditPostStatus(channel: IChannel, user?: IUser | IDiscussionsUser): boolean;
@@ -0,0 +1,10 @@
1
+ import type { IUser } from "@esri/arcgis-rest-portal";
2
+ import { IChannel, IDiscussionsUser, IPost } from "../../types";
3
+ /**
4
+ * Utility to determine if User has privileges to modify a post
5
+ * @param post
6
+ * @param user
7
+ * @param channel
8
+ * @returns {boolean}
9
+ */
10
+ export declare function canEditPostV2(post: IPost, user: IUser | IDiscussionsUser, channel: IChannel): boolean;
@@ -0,0 +1,22 @@
1
+ import { IUser } from "@esri/arcgis-rest-portal";
2
+ import { IChannel, IDiscussionsUser, IPost } from "../../types";
3
+ /**
4
+ * Utility to determine if User has privileges to modify a post
5
+ * @export
6
+ * @deprecated replace with canEditPostV2 for v2 discussions
7
+ * @param post
8
+ * @param user
9
+ * @param channel
10
+ * @returns {boolean}
11
+ */
12
+ export declare function canModifyPost(post: IPost, user: IUser | IDiscussionsUser, channel: IChannel): boolean;
13
+ /**
14
+ * Utility to determine if User has privileges to modify a post
15
+ * @export
16
+ * @deprecated replace with canEditPostV2 for v2 discussions
17
+ * @param post
18
+ * @param user
19
+ * @param channel
20
+ * @returns {boolean}
21
+ */
22
+ export declare function canEditPost(post: IPost, user: IUser | IDiscussionsUser, channel: IChannel): boolean;
@@ -0,0 +1,12 @@
1
+ export { canCreatePost } from "./can-create-post";
2
+ export { canCreateReply } from "./can-create-reply";
3
+ export { canDeletePost } from "./can-delete-post";
4
+ export { canModifyPostStatus, canEditPostStatus } from "./can-edit-post-status";
5
+ export { canModifyPost, canEditPost } from "./can-edit-post";
6
+ export { parseDiscussionURI } from "./parse-discussion-uri";
7
+ export { parseMentionedUsers } from "./parse-mentioned-users";
8
+ export { canCreatePostV2 } from "./can-create-post-v2";
9
+ export { canCreateReplyV2 } from "./can-create-reply-v2";
10
+ export { canDeletePostV2 } from "./can-delete-post-v2";
11
+ export { canEditPostStatusV2 } from "./can-edit-post-status-v2";
12
+ export { canEditPostV2 } from "./can-edit-post-v2";
@@ -0,0 +1,9 @@
1
+ import { IDiscussionParams } from "../../types";
2
+ /**
3
+ * Utility that parses a discussion URI string into its component parts
4
+ *
5
+ * @export
6
+ * @param {string} discussion A discussion URI
7
+ * @return {string}
8
+ */
9
+ export declare function parseDiscussionURI(discussion: string): IDiscussionParams;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Parses mentioned users
3
+ * @param text A string to parse mentioned users from
4
+ * @returns A unique collection of usernames parsed from the provided text
5
+ */
6
+ export declare function parseMentionedUsers(text?: string): string[];
@@ -0,0 +1,12 @@
1
+ import type { IUser } from "@esri/arcgis-rest-portal";
2
+ import { PostReaction, IChannel, IDiscussionsUser } from "../../types";
3
+ /**
4
+ * Utility that determines whether a Channel allows a given PostReaction
5
+ * and whether the User has permissions to create it
6
+ *
7
+ * @export
8
+ * @param {IChannel} channel
9
+ * @param {PostReaction} value
10
+ * @return {*} {boolean}
11
+ */
12
+ export declare function canCreateReactionV2(channel: IChannel, value: PostReaction, user?: IUser | IDiscussionsUser): boolean;
@@ -0,0 +1,13 @@
1
+ import type { IUser } from "@esri/arcgis-rest-portal";
2
+ import { PostReaction, IChannel, IDiscussionsUser } from "../../types";
3
+ /**
4
+ * Utility that determines whether a Channel allows a given PostReaction
5
+ * and whether the User has permissions to create it
6
+ *
7
+ * @export
8
+ * @deprecated replace with canCreateReactionV2 for v2 discussions
9
+ * @param {IChannel} channel
10
+ * @param {PostReaction} value
11
+ * @return {*} {boolean}
12
+ */
13
+ export declare function canCreateReaction(channel: IChannel, value: PostReaction, user?: IUser | IDiscussionsUser): boolean;
@@ -0,0 +1,2 @@
1
+ export { canCreateReaction } from "./can-create-reaction";
2
+ export { canCreateReactionV2 } from "./can-create-reaction-v2";