@amityco/ts-sdk 7.27.0 → 7.27.1-01fa6bf5.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 (1186) hide show
  1. package/dist/@types/core/events.d.ts +5 -0
  2. package/dist/@types/core/events.d.ts.map +1 -1
  3. package/dist/@types/core/payload.d.ts +26 -0
  4. package/dist/@types/core/payload.d.ts.map +1 -1
  5. package/dist/@types/core/permissions.d.ts +10 -4
  6. package/dist/@types/core/permissions.d.ts.map +1 -1
  7. package/dist/@types/domains/analytics.d.ts +3 -1
  8. package/dist/@types/domains/analytics.d.ts.map +1 -1
  9. package/dist/@types/domains/channel.d.ts +5 -0
  10. package/dist/@types/domains/channel.d.ts.map +1 -1
  11. package/dist/@types/domains/client.d.ts +18 -0
  12. package/dist/@types/domains/client.d.ts.map +1 -1
  13. package/dist/@types/domains/comment.d.ts +27 -0
  14. package/dist/@types/domains/comment.d.ts.map +1 -1
  15. package/dist/@types/domains/community.d.ts +1 -0
  16. package/dist/@types/domains/community.d.ts.map +1 -1
  17. package/dist/@types/domains/curatedContent.d.ts +25 -0
  18. package/dist/@types/domains/curatedContent.d.ts.map +1 -0
  19. package/dist/@types/domains/pinnedMessage.d.ts +43 -0
  20. package/dist/@types/domains/pinnedMessage.d.ts.map +1 -0
  21. package/dist/@types/domains/post.d.ts +11 -0
  22. package/dist/@types/domains/post.d.ts.map +1 -1
  23. package/dist/@types/index.d.ts +3 -1
  24. package/dist/@types/index.d.ts.map +1 -1
  25. package/dist/adRepository/events/index.d.ts +2 -0
  26. package/dist/adRepository/events/index.d.ts.map +1 -0
  27. package/dist/adRepository/index.d.ts +2 -0
  28. package/dist/adRepository/index.d.ts.map +1 -1
  29. package/dist/adRepository/observers/index.d.ts +2 -0
  30. package/dist/adRepository/observers/index.d.ts.map +1 -0
  31. package/dist/analytic/service/analytic/AnalyticsEngine.d.ts +3 -0
  32. package/dist/analytic/service/analytic/AnalyticsEngine.d.ts.map +1 -1
  33. package/dist/analytic/service/analytic/AnalyticsEventCapturer.d.ts +3 -0
  34. package/dist/analytic/service/analytic/AnalyticsEventCapturer.d.ts.map +1 -1
  35. package/dist/categoryRepository/events/index.d.ts +2 -0
  36. package/dist/categoryRepository/events/index.d.ts.map +1 -0
  37. package/dist/categoryRepository/index.d.ts +1 -0
  38. package/dist/categoryRepository/index.d.ts.map +1 -1
  39. package/dist/channelRepository/api/createChannel.d.ts.map +1 -1
  40. package/dist/channelRepository/events/index.d.ts +2 -0
  41. package/dist/channelRepository/events/index.d.ts.map +1 -1
  42. package/dist/channelRepository/events/onChannelMemberRoleAdded.d.ts +22 -0
  43. package/dist/channelRepository/events/onChannelMemberRoleAdded.d.ts.map +1 -1
  44. package/dist/channelRepository/events/onChannelMemberRoleRemoved.d.ts +22 -0
  45. package/dist/channelRepository/events/onChannelMemberRoleRemoved.d.ts.map +1 -1
  46. package/dist/channelRepository/events/onChannelMessagePinned.d.ts +24 -0
  47. package/dist/channelRepository/events/onChannelMessagePinned.d.ts.map +1 -0
  48. package/dist/channelRepository/events/onChannelMessageUnpinned.d.ts +21 -0
  49. package/dist/channelRepository/events/onChannelMessageUnpinned.d.ts.map +1 -0
  50. package/dist/channelRepository/events/onChannelPinnedMessageDeleted.d.ts +12 -0
  51. package/dist/channelRepository/events/onChannelPinnedMessageDeleted.d.ts.map +1 -0
  52. package/dist/channelRepository/observers/getChannel.d.ts.map +1 -1
  53. package/dist/channelRepository/observers/getChannels/ChannelLiveCollectionController.d.ts.map +1 -1
  54. package/dist/channelRepository/observers/getChannels/getChannels.d.ts.map +1 -1
  55. package/dist/channelRepository/observers/getMyMembership.d.ts.map +1 -1
  56. package/dist/channelRepository/observers/searchChannels/SearchChannelLiveCollectionController.d.ts.map +1 -1
  57. package/dist/channelRepository/utils/applyChannelRolePayload.d.ts +21 -0
  58. package/dist/channelRepository/utils/applyChannelRolePayload.d.ts.map +1 -0
  59. package/dist/channelRepository/utils/index.d.ts +2 -0
  60. package/dist/channelRepository/utils/index.d.ts.map +1 -1
  61. package/dist/channelRepository/utils/updatePinnedMessageCache.d.ts +24 -0
  62. package/dist/channelRepository/utils/updatePinnedMessageCache.d.ts.map +1 -0
  63. package/dist/client/api/createClient.d.ts +5 -1
  64. package/dist/client/api/createClient.d.ts.map +1 -1
  65. package/dist/client/api/getShareableLinkConfiguration.d.ts.map +1 -1
  66. package/dist/client/api/getSocialSettings.d.ts.map +1 -1
  67. package/dist/client/api/setupLoginSubscriptions.d.ts.map +1 -1
  68. package/dist/client/events/onVisitorUsageLimitReached.d.ts.map +1 -1
  69. package/dist/client/observers/getUserUnread.d.ts.map +1 -1
  70. package/dist/commentRepository/api/approveComment.d.ts +17 -0
  71. package/dist/commentRepository/api/approveComment.d.ts.map +1 -0
  72. package/dist/commentRepository/api/createComment.d.ts +12 -1
  73. package/dist/commentRepository/api/createComment.d.ts.map +1 -1
  74. package/dist/commentRepository/api/declineComment.d.ts +18 -0
  75. package/dist/commentRepository/api/declineComment.d.ts.map +1 -0
  76. package/dist/commentRepository/api/deleteComment.d.ts.map +1 -1
  77. package/dist/commentRepository/api/index.d.ts +2 -0
  78. package/dist/commentRepository/api/index.d.ts.map +1 -1
  79. package/dist/commentRepository/api/updateComment.d.ts.map +1 -1
  80. package/dist/commentRepository/events/index.d.ts +1 -0
  81. package/dist/commentRepository/events/index.d.ts.map +1 -1
  82. package/dist/commentRepository/events/onCommentApproved.d.ts +17 -0
  83. package/dist/commentRepository/events/onCommentApproved.d.ts.map +1 -0
  84. package/dist/commentRepository/events/utils.d.ts.map +1 -1
  85. package/dist/commentRepository/internalApi/getComment.d.ts.map +1 -1
  86. package/dist/commentRepository/observers/getComment.d.ts.map +1 -1
  87. package/dist/commentRepository/observers/getCommentReviewQueue/LiveCollectionController.d.ts +13 -0
  88. package/dist/commentRepository/observers/getCommentReviewQueue/LiveCollectionController.d.ts.map +1 -0
  89. package/dist/commentRepository/observers/getCommentReviewQueue/PaginationController.d.ts +5 -0
  90. package/dist/commentRepository/observers/getCommentReviewQueue/PaginationController.d.ts.map +1 -0
  91. package/dist/commentRepository/observers/getCommentReviewQueue/QueryStreamController.d.ts +15 -0
  92. package/dist/commentRepository/observers/getCommentReviewQueue/QueryStreamController.d.ts.map +1 -0
  93. package/dist/commentRepository/observers/getCommentReviewQueue.d.ts +22 -0
  94. package/dist/commentRepository/observers/getCommentReviewQueue.d.ts.map +1 -0
  95. package/dist/commentRepository/observers/getComments/CommentLiveCollectionController.d.ts +1 -1
  96. package/dist/commentRepository/observers/getComments/CommentLiveCollectionController.d.ts.map +1 -1
  97. package/dist/commentRepository/observers/getComments/CommentQueryStreamController.d.ts.map +1 -1
  98. package/dist/commentRepository/observers/getComments/enums.d.ts +1 -0
  99. package/dist/commentRepository/observers/getComments/enums.d.ts.map +1 -1
  100. package/dist/commentRepository/observers/getComments.d.ts.map +1 -1
  101. package/dist/commentRepository/observers/index.d.ts +1 -0
  102. package/dist/commentRepository/observers/index.d.ts.map +1 -1
  103. package/dist/commentRepository/utils/approval.d.ts +49 -0
  104. package/dist/commentRepository/utils/approval.d.ts.map +1 -0
  105. package/dist/commentRepository/utils/payload.d.ts +6 -0
  106. package/dist/commentRepository/utils/payload.d.ts.map +1 -1
  107. package/dist/communityRepository/api/createCommunity.d.ts +1 -1
  108. package/dist/communityRepository/api/createCommunity.d.ts.map +1 -1
  109. package/dist/communityRepository/api/updateCommunity.d.ts +1 -1
  110. package/dist/communityRepository/api/updateCommunity.d.ts.map +1 -1
  111. package/dist/communityRepository/communityMembership/observers/getMembers.d.ts.map +1 -1
  112. package/dist/communityRepository/communityMembership/observers/searchMembers.d.ts.map +1 -1
  113. package/dist/communityRepository/observers/getJoinRequestList.d.ts +1 -1
  114. package/dist/communityRepository/observers/getJoinRequestList.d.ts.map +1 -1
  115. package/dist/communityRepository/observers/getJoinRequests.d.ts +1 -1
  116. package/dist/communityRepository/observers/getJoinRequests.d.ts.map +1 -1
  117. package/dist/communityRepository/observers/semanticSearchCommunities.d.ts +1 -1
  118. package/dist/communityRepository/observers/semanticSearchCommunities.d.ts.map +1 -1
  119. package/dist/core/device.d.ts +1 -1
  120. package/dist/core/device.d.ts.map +1 -1
  121. package/dist/core/events.d.ts +3 -3
  122. package/dist/core/events.d.ts.map +1 -1
  123. package/dist/core/transports/http.d.ts.map +1 -1
  124. package/dist/core/transports/utils.d.ts +8 -0
  125. package/dist/core/transports/utils.d.ts.map +1 -1
  126. package/dist/curatedContentRepository/api/getPool.d.ts +2 -0
  127. package/dist/curatedContentRepository/api/getPool.d.ts.map +1 -0
  128. package/dist/curatedContentRepository/api/index.d.ts +2 -0
  129. package/dist/curatedContentRepository/api/index.d.ts.map +1 -0
  130. package/dist/curatedContentRepository/events/index.d.ts +2 -0
  131. package/dist/curatedContentRepository/events/index.d.ts.map +1 -0
  132. package/dist/curatedContentRepository/index.d.ts +4 -0
  133. package/dist/curatedContentRepository/index.d.ts.map +1 -0
  134. package/dist/curatedContentRepository/observers/index.d.ts +2 -0
  135. package/dist/curatedContentRepository/observers/index.d.ts.map +1 -0
  136. package/dist/eventRepository/observers/getEvents.d.ts +1 -1
  137. package/dist/eventRepository/observers/getEvents.d.ts.map +1 -1
  138. package/dist/eventRepository/observers/getMyEvents.d.ts +1 -1
  139. package/dist/eventRepository/observers/getMyEvents.d.ts.map +1 -1
  140. package/dist/eventRepository/observers/getRSVPs.d.ts +1 -1
  141. package/dist/eventRepository/observers/getRSVPs.d.ts.map +1 -1
  142. package/dist/feedRepository/events/index.d.ts +2 -0
  143. package/dist/feedRepository/events/index.d.ts.map +1 -0
  144. package/dist/feedRepository/index.d.ts +1 -0
  145. package/dist/feedRepository/index.d.ts.map +1 -1
  146. package/dist/feedRepository/observers/utils.d.ts +1 -0
  147. package/dist/feedRepository/observers/utils.d.ts.map +1 -1
  148. package/dist/fileRepository/events/index.d.ts +2 -0
  149. package/dist/fileRepository/events/index.d.ts.map +1 -0
  150. package/dist/fileRepository/index.d.ts +2 -0
  151. package/dist/fileRepository/index.d.ts.map +1 -1
  152. package/dist/fileRepository/observers/index.d.ts +2 -0
  153. package/dist/fileRepository/observers/index.d.ts.map +1 -0
  154. package/dist/index.cjs.js +1923 -582
  155. package/dist/index.d.ts +1 -0
  156. package/dist/index.d.ts.map +1 -1
  157. package/dist/index.esm.js +1898 -558
  158. package/dist/index.umd.js +2 -2
  159. package/dist/invitationRepository/observers/getInvitations.d.ts.map +1 -1
  160. package/dist/invitationRepository/observers/getMyCommunityInvitations.d.ts +1 -1
  161. package/dist/invitationRepository/observers/getMyCommunityInvitations.d.ts.map +1 -1
  162. package/dist/liveReactionRepository/observers/getReactions.d.ts.map +1 -1
  163. package/dist/messagePreview/utils/getChannelMessagePreviewWithUser.d.ts +1 -0
  164. package/dist/messagePreview/utils/getChannelMessagePreviewWithUser.d.ts.map +1 -1
  165. package/dist/messageRepository/api/index.d.ts +2 -0
  166. package/dist/messageRepository/api/index.d.ts.map +1 -1
  167. package/dist/messageRepository/api/pinMessage.d.ts +29 -0
  168. package/dist/messageRepository/api/pinMessage.d.ts.map +1 -0
  169. package/dist/messageRepository/api/unpinMessage.d.ts +28 -0
  170. package/dist/messageRepository/api/unpinMessage.d.ts.map +1 -0
  171. package/dist/messageRepository/observers/getMessages/getMessages.d.ts.map +1 -1
  172. package/dist/messageRepository/utils/refreshChannelPermissionsForMessage.d.ts +13 -0
  173. package/dist/messageRepository/utils/refreshChannelPermissionsForMessage.d.ts.map +1 -0
  174. package/dist/notificationTray/observers/getNotificationTrayItems.d.ts +1 -1
  175. package/dist/notificationTray/observers/getNotificationTrayItems.d.ts.map +1 -1
  176. package/dist/postRepository/observers/getGlobalPinnedPosts.d.ts +1 -1
  177. package/dist/postRepository/observers/getGlobalPinnedPosts.d.ts.map +1 -1
  178. package/dist/postRepository/observers/getPinnedPosts.d.ts +1 -1
  179. package/dist/postRepository/observers/getPinnedPosts.d.ts.map +1 -1
  180. package/dist/postRepository/observers/getPosts.d.ts.map +1 -1
  181. package/dist/postRepository/observers/searchPostsByHashtag.d.ts.map +1 -1
  182. package/dist/postRepository/observers/semanticSearchPosts.d.ts +1 -1
  183. package/dist/postRepository/observers/semanticSearchPosts.d.ts.map +1 -1
  184. package/dist/postRepository/observers/utils.d.ts +1 -0
  185. package/dist/postRepository/observers/utils.d.ts.map +1 -1
  186. package/dist/postRepository/utils/PostCommentCountEngine/ApproveTask.d.ts +16 -0
  187. package/dist/postRepository/utils/PostCommentCountEngine/ApproveTask.d.ts.map +1 -0
  188. package/dist/postRepository/utils/PostCommentCountEngine/PostCommentCountEngine.d.ts +25 -1
  189. package/dist/postRepository/utils/PostCommentCountEngine/PostCommentCountEngine.d.ts.map +1 -1
  190. package/dist/postRepository/utils/PostCommentCountEngine/postCommentCountEngineOnLoginHandler.d.ts +9 -0
  191. package/dist/postRepository/utils/PostCommentCountEngine/postCommentCountEngineOnLoginHandler.d.ts.map +1 -0
  192. package/dist/postRepository/utils/latestComments.d.ts +10 -0
  193. package/dist/postRepository/utils/latestComments.d.ts.map +1 -0
  194. package/dist/postRepository/utils/payload.d.ts.map +1 -1
  195. package/dist/productRepository/api/index.d.ts +2 -0
  196. package/dist/productRepository/api/index.d.ts.map +1 -0
  197. package/dist/productRepository/events/index.d.ts +2 -0
  198. package/dist/productRepository/events/index.d.ts.map +1 -0
  199. package/dist/productRepository/index.d.ts +2 -0
  200. package/dist/productRepository/index.d.ts.map +1 -1
  201. package/dist/productRepository/observers/getProduct.d.ts.map +1 -1
  202. package/dist/productRepository/observers/searchProducts.d.ts.map +1 -1
  203. package/dist/reactionRepository/observers/getReactions/getReactions.d.ts.map +1 -1
  204. package/dist/roomPresenceRepository/events/index.d.ts +2 -0
  205. package/dist/roomPresenceRepository/events/index.d.ts.map +1 -0
  206. package/dist/roomPresenceRepository/index.d.ts +2 -0
  207. package/dist/roomPresenceRepository/index.d.ts.map +1 -1
  208. package/dist/roomPresenceRepository/observers/index.d.ts +2 -0
  209. package/dist/roomPresenceRepository/observers/index.d.ts.map +1 -0
  210. package/dist/roomRepository/api/index.d.ts +0 -1
  211. package/dist/roomRepository/api/index.d.ts.map +1 -1
  212. package/dist/roomRepository/observers/getRoom.d.ts.map +1 -1
  213. package/dist/roomRepository/observers/utils.d.ts +1 -0
  214. package/dist/roomRepository/observers/utils.d.ts.map +1 -1
  215. package/dist/storyRepository/events/index.d.ts +8 -0
  216. package/dist/storyRepository/events/index.d.ts.map +1 -0
  217. package/dist/storyRepository/index.d.ts +1 -0
  218. package/dist/storyRepository/index.d.ts.map +1 -1
  219. package/dist/storyRepository/observers/getActiveStoriesByTarget.d.ts.map +1 -1
  220. package/dist/storyRepository/observers/getStoryByStoryId.d.ts.map +1 -1
  221. package/dist/storyRepository/observers/getTargetById.d.ts.map +1 -1
  222. package/dist/storyRepository/observers/getTargetsByTargetIds.d.ts.map +1 -1
  223. package/dist/subChannelRepository/observers/getSubChannels/getSubChannels.d.ts.map +1 -1
  224. package/dist/userRepository/observers/getReachedUsers.d.ts.map +1 -1
  225. package/dist/utils/constants.d.ts +4 -0
  226. package/dist/utils/constants.d.ts.map +1 -1
  227. package/dist/utils/linkedObject/commentLinkedObject.d.ts.map +1 -1
  228. package/dist/utils/linkedObject/curatedContentTopicLinkedObject.d.ts +2 -0
  229. package/dist/utils/linkedObject/curatedContentTopicLinkedObject.d.ts.map +1 -0
  230. package/dist/utils/linkedObject/index.d.ts +1 -0
  231. package/dist/utils/linkedObject/index.d.ts.map +1 -1
  232. package/dist/utils/linkedObject/messageLinkedObject.d.ts.map +1 -1
  233. package/dist/utils/linkedObject/postLinkedObject.d.ts.map +1 -1
  234. package/package.json +8 -3
  235. package/dist/__mocks__/marker/api/getMessageMarkers.d.ts +0 -3
  236. package/dist/__mocks__/marker/api/getMessageMarkers.d.ts.map +0 -1
  237. package/dist/__mocks__/marker/api/getSubChannelMarkers.d.ts +0 -3
  238. package/dist/__mocks__/marker/api/getSubChannelMarkers.d.ts.map +0 -1
  239. package/dist/__mocks__/marker/api/index.d.ts +0 -6
  240. package/dist/__mocks__/marker/api/index.d.ts.map +0 -1
  241. package/dist/adRepository/api/tests/integration/getNetworkAds.integration.test.d.ts +0 -2
  242. package/dist/adRepository/api/tests/integration/getNetworkAds.integration.test.d.ts.map +0 -1
  243. package/dist/cache/api/tests/dropFromCache.test.d.ts +0 -2
  244. package/dist/cache/api/tests/dropFromCache.test.d.ts.map +0 -1
  245. package/dist/cache/api/tests/enableCache.test.d.ts +0 -2
  246. package/dist/cache/api/tests/enableCache.test.d.ts.map +0 -1
  247. package/dist/cache/api/tests/ingestInCache.test.d.ts +0 -2
  248. package/dist/cache/api/tests/ingestInCache.test.d.ts.map +0 -1
  249. package/dist/cache/api/tests/pullFromCache.test.d.ts +0 -2
  250. package/dist/cache/api/tests/pullFromCache.test.d.ts.map +0 -1
  251. package/dist/cache/api/tests/pushToCache.test.d.ts +0 -2
  252. package/dist/cache/api/tests/pushToCache.test.d.ts.map +0 -1
  253. package/dist/cache/api/tests/upsertInCache.test.d.ts +0 -2
  254. package/dist/cache/api/tests/upsertInCache.test.d.ts.map +0 -1
  255. package/dist/cache/utils/tests/encodeKey.test.d.ts +0 -2
  256. package/dist/cache/utils/tests/encodeKey.test.d.ts.map +0 -1
  257. package/dist/cache/utils/tests/partialMatch.test.d.ts +0 -2
  258. package/dist/cache/utils/tests/partialMatch.test.d.ts.map +0 -1
  259. package/dist/categoryRepository/api/tests/integration/getCategory.integration.test.d.ts +0 -2
  260. package/dist/categoryRepository/api/tests/integration/getCategory.integration.test.d.ts.map +0 -1
  261. package/dist/categoryRepository/internalApi/tests/integration/getCategory.integration.test.d.ts +0 -2
  262. package/dist/categoryRepository/internalApi/tests/integration/getCategory.integration.test.d.ts.map +0 -1
  263. package/dist/categoryRepository/internalApi/tests/integration/queryCategories.integration.test.d.ts +0 -2
  264. package/dist/categoryRepository/internalApi/tests/integration/queryCategories.integration.test.d.ts.map +0 -1
  265. package/dist/categoryRepository/observers/tests/getCategories.test.d.ts +0 -2
  266. package/dist/categoryRepository/observers/tests/getCategories.test.d.ts.map +0 -1
  267. package/dist/categoryRepository/observers/tests/integration/getCategories.integration.test.d.ts +0 -2
  268. package/dist/categoryRepository/observers/tests/integration/getCategories.integration.test.d.ts.map +0 -1
  269. package/dist/categoryRepository/observers/tests/integration/setup.d.ts +0 -10
  270. package/dist/categoryRepository/observers/tests/integration/setup.d.ts.map +0 -1
  271. package/dist/channelRepository/api/tests/createChannel.test.d.ts +0 -2
  272. package/dist/channelRepository/api/tests/createChannel.test.d.ts.map +0 -1
  273. package/dist/channelRepository/api/tests/getChannel.test.d.ts +0 -2
  274. package/dist/channelRepository/api/tests/getChannel.test.d.ts.map +0 -1
  275. package/dist/channelRepository/api/tests/getChannelByIds.test.d.ts +0 -2
  276. package/dist/channelRepository/api/tests/getChannelByIds.test.d.ts.map +0 -1
  277. package/dist/channelRepository/api/tests/integration/createChannel.integration.test.d.ts +0 -2
  278. package/dist/channelRepository/api/tests/integration/createChannel.integration.test.d.ts.map +0 -1
  279. package/dist/channelRepository/api/tests/integration/deleteChannel.integration.test.d.ts +0 -2
  280. package/dist/channelRepository/api/tests/integration/deleteChannel.integration.test.d.ts.map +0 -1
  281. package/dist/channelRepository/api/tests/integration/getChannelByIds.integration.test.d.ts +0 -2
  282. package/dist/channelRepository/api/tests/integration/getChannelByIds.integration.test.d.ts.map +0 -1
  283. package/dist/channelRepository/api/tests/integration/joinChannel.integration.test.d.ts +0 -2
  284. package/dist/channelRepository/api/tests/integration/joinChannel.integration.test.d.ts.map +0 -1
  285. package/dist/channelRepository/api/tests/integration/leaveChannel.integration.test.d.ts +0 -2
  286. package/dist/channelRepository/api/tests/integration/leaveChannel.integration.test.d.ts.map +0 -1
  287. package/dist/channelRepository/api/tests/integration/markChannelsAsReadBySegment.integration.test.d.ts +0 -2
  288. package/dist/channelRepository/api/tests/integration/markChannelsAsReadBySegment.integration.test.d.ts.map +0 -1
  289. package/dist/channelRepository/api/tests/integration/muteChannel.integration.test.d.ts +0 -2
  290. package/dist/channelRepository/api/tests/integration/muteChannel.integration.test.d.ts.map +0 -1
  291. package/dist/channelRepository/api/tests/integration/queryChannels.integration.test.d.ts +0 -2
  292. package/dist/channelRepository/api/tests/integration/queryChannels.integration.test.d.ts.map +0 -1
  293. package/dist/channelRepository/api/tests/integration/unmuteChannel.integration.test.d.ts +0 -2
  294. package/dist/channelRepository/api/tests/integration/unmuteChannel.integration.test.d.ts.map +0 -1
  295. package/dist/channelRepository/api/tests/integration/updateChannel.integration.test.d.ts +0 -2
  296. package/dist/channelRepository/api/tests/integration/updateChannel.integration.test.d.ts.map +0 -1
  297. package/dist/channelRepository/api/tests/joinChannel.test.d.ts +0 -2
  298. package/dist/channelRepository/api/tests/joinChannel.test.d.ts.map +0 -1
  299. package/dist/channelRepository/api/tests/leaveChannel.test.d.ts +0 -2
  300. package/dist/channelRepository/api/tests/leaveChannel.test.d.ts.map +0 -1
  301. package/dist/channelRepository/api/tests/muteChannel.test.d.ts +0 -2
  302. package/dist/channelRepository/api/tests/muteChannel.test.d.ts.map +0 -1
  303. package/dist/channelRepository/api/tests/queryChannels.test.d.ts +0 -2
  304. package/dist/channelRepository/api/tests/queryChannels.test.d.ts.map +0 -1
  305. package/dist/channelRepository/api/tests/unmuteChannel.test.d.ts +0 -2
  306. package/dist/channelRepository/api/tests/unmuteChannel.test.d.ts.map +0 -1
  307. package/dist/channelRepository/channelMembership/api/tests/addMembers.test.d.ts +0 -2
  308. package/dist/channelRepository/channelMembership/api/tests/addMembers.test.d.ts.map +0 -1
  309. package/dist/channelRepository/channelMembership/api/tests/queryChannelMembers.test.d.ts +0 -2
  310. package/dist/channelRepository/channelMembership/api/tests/queryChannelMembers.test.d.ts.map +0 -1
  311. package/dist/channelRepository/channelMembership/api/tests/removeMembers.test.d.ts +0 -2
  312. package/dist/channelRepository/channelMembership/api/tests/removeMembers.test.d.ts.map +0 -1
  313. package/dist/channelRepository/channelMembership/observers/tests/getMembers.test.d.ts +0 -2
  314. package/dist/channelRepository/channelMembership/observers/tests/getMembers.test.d.ts.map +0 -1
  315. package/dist/channelRepository/channelMembership/observers/tests/searchMembers.test.d.ts +0 -2
  316. package/dist/channelRepository/channelMembership/observers/tests/searchMembers.test.d.ts.map +0 -1
  317. package/dist/channelRepository/events/tests/onChannelCreated.test.d.ts +0 -2
  318. package/dist/channelRepository/events/tests/onChannelCreated.test.d.ts.map +0 -1
  319. package/dist/channelRepository/events/tests/onChannelJoined.test.d.ts +0 -2
  320. package/dist/channelRepository/events/tests/onChannelJoined.test.d.ts.map +0 -1
  321. package/dist/channelRepository/events/tests/onChannelMemberAdded.test.d.ts +0 -2
  322. package/dist/channelRepository/events/tests/onChannelMemberAdded.test.d.ts.map +0 -1
  323. package/dist/channelRepository/events/tests/onChannelMemberBanned.test.d.ts +0 -2
  324. package/dist/channelRepository/events/tests/onChannelMemberBanned.test.d.ts.map +0 -1
  325. package/dist/channelRepository/events/tests/onChannelMemberRemoved.test.d.ts +0 -2
  326. package/dist/channelRepository/events/tests/onChannelMemberRemoved.test.d.ts.map +0 -1
  327. package/dist/channelRepository/events/tests/onChannelMemberUnbanned.test.d.ts +0 -2
  328. package/dist/channelRepository/events/tests/onChannelMemberUnbanned.test.d.ts.map +0 -1
  329. package/dist/channelRepository/events/tests/onChannelUpdated.test.d.ts +0 -2
  330. package/dist/channelRepository/events/tests/onChannelUpdated.test.d.ts.map +0 -1
  331. package/dist/channelRepository/observers/tests/getChannel.test.d.ts +0 -2
  332. package/dist/channelRepository/observers/tests/getChannel.test.d.ts.map +0 -1
  333. package/dist/channelRepository/observers/tests/getChannelWithMessagePreview.test.d.ts +0 -2
  334. package/dist/channelRepository/observers/tests/getChannelWithMessagePreview.test.d.ts.map +0 -1
  335. package/dist/channelRepository/observers/tests/getChannels.test.d.ts +0 -2
  336. package/dist/channelRepository/observers/tests/getChannels.test.d.ts.map +0 -1
  337. package/dist/channelRepository/observers/tests/getChannelsWithMessagePreview.test.d.ts +0 -2
  338. package/dist/channelRepository/observers/tests/getChannelsWithMessagePreview.test.d.ts.map +0 -1
  339. package/dist/channelRepository/observers/tests/integrations/getChannel.integration.test.d.ts +0 -2
  340. package/dist/channelRepository/observers/tests/integrations/getChannel.integration.test.d.ts.map +0 -1
  341. package/dist/channelRepository/observers/tests/integrations/getChannels.integration.test.d.ts +0 -2
  342. package/dist/channelRepository/observers/tests/integrations/getChannels.integration.test.d.ts.map +0 -1
  343. package/dist/channelRepository/observers/tests/integrations/getMyMembership.integration.test.d.ts +0 -2
  344. package/dist/channelRepository/observers/tests/integrations/getMyMembership.integration.test.d.ts.map +0 -1
  345. package/dist/channelRepository/observers/tests/integrations/getMyMembership.noUser.integration.test.d.ts +0 -2
  346. package/dist/channelRepository/observers/tests/integrations/getMyMembership.noUser.integration.test.d.ts.map +0 -1
  347. package/dist/channelRepository/observers/tests/integrations/getTotalChannelsUnread.integration.test.d.ts +0 -2
  348. package/dist/channelRepository/observers/tests/integrations/getTotalChannelsUnread.integration.test.d.ts.map +0 -1
  349. package/dist/channelRepository/observers/tests/integrations/getTotalChannelsUnread.noUser.integration.test.d.ts +0 -2
  350. package/dist/channelRepository/observers/tests/integrations/getTotalChannelsUnread.noUser.integration.test.d.ts.map +0 -1
  351. package/dist/channelRepository/observers/tests/integrations/searchChannels.integration.test.d.ts +0 -2
  352. package/dist/channelRepository/observers/tests/integrations/searchChannels.integration.test.d.ts.map +0 -1
  353. package/dist/channelRepository/utils/tests/prepareChannelPayload.test.d.ts +0 -6
  354. package/dist/channelRepository/utils/tests/prepareChannelPayload.test.d.ts.map +0 -1
  355. package/dist/client/api/tests/ShareableLinkConfiguration.test.d.ts +0 -2
  356. package/dist/client/api/tests/ShareableLinkConfiguration.test.d.ts.map +0 -1
  357. package/dist/client/api/tests/accessTokenExpiryWatcher.test.d.ts +0 -2
  358. package/dist/client/api/tests/accessTokenExpiryWatcher.test.d.ts.map +0 -1
  359. package/dist/client/api/tests/activeClient.test.d.ts +0 -2
  360. package/dist/client/api/tests/activeClient.test.d.ts.map +0 -1
  361. package/dist/client/api/tests/activeUser.test.d.ts +0 -2
  362. package/dist/client/api/tests/activeUser.test.d.ts.map +0 -1
  363. package/dist/client/api/tests/createClient.test.d.ts +0 -2
  364. package/dist/client/api/tests/createClient.test.d.ts.map +0 -1
  365. package/dist/client/api/tests/getToken.test.d.ts +0 -2
  366. package/dist/client/api/tests/getToken.test.d.ts.map +0 -1
  367. package/dist/client/api/tests/integration/accessTokenExpiryWatcher.integration.test.d.ts +0 -2
  368. package/dist/client/api/tests/integration/accessTokenExpiryWatcher.integration.test.d.ts.map +0 -1
  369. package/dist/client/api/tests/integration/accessTokenFunctions.integration.test.d.ts +0 -2
  370. package/dist/client/api/tests/integration/accessTokenFunctions.integration.test.d.ts.map +0 -1
  371. package/dist/client/api/tests/integration/activeUser.branches.integration.test.d.ts +0 -2
  372. package/dist/client/api/tests/integration/activeUser.branches.integration.test.d.ts.map +0 -1
  373. package/dist/client/api/tests/integration/activeUser.noUser.integration.test.d.ts +0 -2
  374. package/dist/client/api/tests/integration/activeUser.noUser.integration.test.d.ts.map +0 -1
  375. package/dist/client/api/tests/integration/createClient.branches.integration.test.d.ts +0 -2
  376. package/dist/client/api/tests/integration/createClient.branches.integration.test.d.ts.map +0 -1
  377. package/dist/client/api/tests/integration/createClient.integration.test.d.ts +0 -2
  378. package/dist/client/api/tests/integration/createClient.integration.test.d.ts.map +0 -1
  379. package/dist/client/api/tests/integration/getSettings.integration.test.d.ts +0 -2
  380. package/dist/client/api/tests/integration/getSettings.integration.test.d.ts.map +0 -1
  381. package/dist/client/api/tests/integration/login.branches.integration.test.d.ts +0 -2
  382. package/dist/client/api/tests/integration/login.branches.integration.test.d.ts.map +0 -1
  383. package/dist/client/api/tests/integration/login.integration.test.d.ts +0 -2
  384. package/dist/client/api/tests/integration/login.integration.test.d.ts.map +0 -1
  385. package/dist/client/api/tests/integration/loginAlternate.integration.test.d.ts +0 -2
  386. package/dist/client/api/tests/integration/loginAlternate.integration.test.d.ts.map +0 -1
  387. package/dist/client/api/tests/integration/loginAsBot.catch.integration.test.d.ts +0 -2
  388. package/dist/client/api/tests/integration/loginAsBot.catch.integration.test.d.ts.map +0 -1
  389. package/dist/client/api/tests/integration/loginAsBot.integration.test.d.ts +0 -2
  390. package/dist/client/api/tests/integration/loginAsBot.integration.test.d.ts.map +0 -1
  391. package/dist/client/api/tests/integration/loginAsBotTerminated.integration.test.d.ts +0 -2
  392. package/dist/client/api/tests/integration/loginAsBotTerminated.integration.test.d.ts.map +0 -1
  393. package/dist/client/api/tests/integration/loginAsVisitor.integration.test.d.ts +0 -2
  394. package/dist/client/api/tests/integration/loginAsVisitor.integration.test.d.ts.map +0 -1
  395. package/dist/client/api/tests/integration/loginAsVisitorTerminated.integration.test.d.ts +0 -2
  396. package/dist/client/api/tests/integration/loginAsVisitorTerminated.integration.test.d.ts.map +0 -1
  397. package/dist/client/api/tests/integration/logout.branches.integration.test.d.ts +0 -2
  398. package/dist/client/api/tests/integration/logout.branches.integration.test.d.ts.map +0 -1
  399. package/dist/client/api/tests/integration/resumeSession.integration.test.d.ts +0 -2
  400. package/dist/client/api/tests/integration/resumeSession.integration.test.d.ts.map +0 -1
  401. package/dist/client/api/tests/integration/resumeSessionLegacy.integration.test.d.ts +0 -2
  402. package/dist/client/api/tests/integration/resumeSessionLegacy.integration.test.d.ts.map +0 -1
  403. package/dist/client/api/tests/integration/sessionState.integration.test.d.ts +0 -2
  404. package/dist/client/api/tests/integration/sessionState.integration.test.d.ts.map +0 -1
  405. package/dist/client/api/tests/integration/setupLoginSubscriptions.branches.integration.test.d.ts +0 -2
  406. package/dist/client/api/tests/integration/setupLoginSubscriptions.branches.integration.test.d.ts.map +0 -1
  407. package/dist/client/api/tests/integration/setupLoginSubscriptions.legacyUnread.integration.test.d.ts +0 -2
  408. package/dist/client/api/tests/integration/setupLoginSubscriptions.legacyUnread.integration.test.d.ts.map +0 -1
  409. package/dist/client/api/tests/integration/utilities.integration.test.d.ts +0 -2
  410. package/dist/client/api/tests/integration/utilities.integration.test.d.ts.map +0 -1
  411. package/dist/client/api/tests/integration/validateAndTerminate.integration.test.d.ts +0 -2
  412. package/dist/client/api/tests/integration/validateAndTerminate.integration.test.d.ts.map +0 -1
  413. package/dist/client/api/tests/login.test.d.ts +0 -2
  414. package/dist/client/api/tests/login.test.d.ts.map +0 -1
  415. package/dist/client/api/tests/loginWithAccessToken.test.d.ts +0 -2
  416. package/dist/client/api/tests/loginWithAccessToken.test.d.ts.map +0 -1
  417. package/dist/client/api/tests/logout.test.d.ts +0 -2
  418. package/dist/client/api/tests/logout.test.d.ts.map +0 -1
  419. package/dist/client/api/tests/notifications.integration.test.d.ts +0 -2
  420. package/dist/client/api/tests/notifications.integration.test.d.ts.map +0 -1
  421. package/dist/client/api/tests/renewTokenWithHandler.test.d.ts +0 -2
  422. package/dist/client/api/tests/renewTokenWithHandler.test.d.ts.map +0 -1
  423. package/dist/client/api/tests/renewWithAccessToken.test.d.ts +0 -2
  424. package/dist/client/api/tests/renewWithAccessToken.test.d.ts.map +0 -1
  425. package/dist/client/api/tests/renewal.test.d.ts +0 -2
  426. package/dist/client/api/tests/renewal.test.d.ts.map +0 -1
  427. package/dist/client/api/tests/resumeSession.test.d.ts +0 -2
  428. package/dist/client/api/tests/resumeSession.test.d.ts.map +0 -1
  429. package/dist/client/api/tests/setSessionState.test.d.ts +0 -2
  430. package/dist/client/api/tests/setSessionState.test.d.ts.map +0 -1
  431. package/dist/client/api/tests/terminateClient.test.d.ts +0 -2
  432. package/dist/client/api/tests/terminateClient.test.d.ts.map +0 -1
  433. package/dist/client/api/tests/validateAccessToken.test.d.ts +0 -2
  434. package/dist/client/api/tests/validateAccessToken.test.d.ts.map +0 -1
  435. package/dist/client/events/tests/onSessionStateChange.test.d.ts +0 -2
  436. package/dist/client/events/tests/onSessionStateChange.test.d.ts.map +0 -1
  437. package/dist/client/events/tests/onTokenTerminated.test.d.ts +0 -2
  438. package/dist/client/events/tests/onTokenTerminated.test.d.ts.map +0 -1
  439. package/dist/client/events/tests/onVisitorUsageLimitReached.test.d.ts +0 -2
  440. package/dist/client/events/tests/onVisitorUsageLimitReached.test.d.ts.map +0 -1
  441. package/dist/client/observers/tests/integrations/getUserUnread.integration.test.d.ts +0 -2
  442. package/dist/client/observers/tests/integrations/getUserUnread.integration.test.d.ts.map +0 -1
  443. package/dist/client/observers/tests/integrations/getUserUnreadEdgeCases.integration.test.d.ts +0 -2
  444. package/dist/client/observers/tests/integrations/getUserUnreadEdgeCases.integration.test.d.ts.map +0 -1
  445. package/dist/client/utils/tests/autoSubscriptionManager.test.d.ts +0 -2
  446. package/dist/client/utils/tests/autoSubscriptionManager.test.d.ts.map +0 -1
  447. package/dist/commentRepository/api/tests/createComment.test.d.ts +0 -2
  448. package/dist/commentRepository/api/tests/createComment.test.d.ts.map +0 -1
  449. package/dist/commentRepository/api/tests/deleteComment.test.d.ts +0 -2
  450. package/dist/commentRepository/api/tests/deleteComment.test.d.ts.map +0 -1
  451. package/dist/commentRepository/api/tests/getComment.test.d.ts +0 -2
  452. package/dist/commentRepository/api/tests/getComment.test.d.ts.map +0 -1
  453. package/dist/commentRepository/api/tests/getCommentByIds.test.d.ts +0 -2
  454. package/dist/commentRepository/api/tests/getCommentByIds.test.d.ts.map +0 -1
  455. package/dist/commentRepository/api/tests/getComments.test.d.ts +0 -2
  456. package/dist/commentRepository/api/tests/getComments.test.d.ts.map +0 -1
  457. package/dist/commentRepository/api/tests/hardDeleteComment.test.d.ts +0 -2
  458. package/dist/commentRepository/api/tests/hardDeleteComment.test.d.ts.map +0 -1
  459. package/dist/commentRepository/api/tests/integration/createComment.integration.test.d.ts +0 -2
  460. package/dist/commentRepository/api/tests/integration/createComment.integration.test.d.ts.map +0 -1
  461. package/dist/commentRepository/api/tests/integration/deleteComment.integration.test.d.ts +0 -2
  462. package/dist/commentRepository/api/tests/integration/deleteComment.integration.test.d.ts.map +0 -1
  463. package/dist/commentRepository/api/tests/integration/flagComment.integration.test.d.ts +0 -2
  464. package/dist/commentRepository/api/tests/integration/flagComment.integration.test.d.ts.map +0 -1
  465. package/dist/commentRepository/api/tests/integration/getComment.integration.test.d.ts +0 -2
  466. package/dist/commentRepository/api/tests/integration/getComment.integration.test.d.ts.map +0 -1
  467. package/dist/commentRepository/api/tests/integration/getCommentByIds.integration.test.d.ts +0 -2
  468. package/dist/commentRepository/api/tests/integration/getCommentByIds.integration.test.d.ts.map +0 -1
  469. package/dist/commentRepository/api/tests/integration/getComments.integration.test.d.ts +0 -2
  470. package/dist/commentRepository/api/tests/integration/getComments.integration.test.d.ts.map +0 -1
  471. package/dist/commentRepository/api/tests/integration/hardDeleteComment.integration.test.d.ts +0 -2
  472. package/dist/commentRepository/api/tests/integration/hardDeleteComment.integration.test.d.ts.map +0 -1
  473. package/dist/commentRepository/api/tests/integration/isCommentFlaggedByMe.integration.test.d.ts +0 -2
  474. package/dist/commentRepository/api/tests/integration/isCommentFlaggedByMe.integration.test.d.ts.map +0 -1
  475. package/dist/commentRepository/api/tests/integration/queryComments.integration.test.d.ts +0 -2
  476. package/dist/commentRepository/api/tests/integration/queryComments.integration.test.d.ts.map +0 -1
  477. package/dist/commentRepository/api/tests/integration/softDeleteComment.integration.test.d.ts +0 -2
  478. package/dist/commentRepository/api/tests/integration/softDeleteComment.integration.test.d.ts.map +0 -1
  479. package/dist/commentRepository/api/tests/integration/unflagComment.integration.test.d.ts +0 -2
  480. package/dist/commentRepository/api/tests/integration/unflagComment.integration.test.d.ts.map +0 -1
  481. package/dist/commentRepository/api/tests/integration/updateComment.integration.test.d.ts +0 -2
  482. package/dist/commentRepository/api/tests/integration/updateComment.integration.test.d.ts.map +0 -1
  483. package/dist/commentRepository/api/tests/queryComments.test.d.ts +0 -2
  484. package/dist/commentRepository/api/tests/queryComments.test.d.ts.map +0 -1
  485. package/dist/commentRepository/api/tests/softDeleteComment.test.d.ts +0 -2
  486. package/dist/commentRepository/api/tests/softDeleteComment.test.d.ts.map +0 -1
  487. package/dist/commentRepository/api/tests/updateComment.test.d.ts +0 -2
  488. package/dist/commentRepository/api/tests/updateComment.test.d.ts.map +0 -1
  489. package/dist/commentRepository/events/tests/onCommentCreated.test.d.ts +0 -2
  490. package/dist/commentRepository/events/tests/onCommentCreated.test.d.ts.map +0 -1
  491. package/dist/commentRepository/events/tests/onCommentDeleted.test.d.ts +0 -2
  492. package/dist/commentRepository/events/tests/onCommentDeleted.test.d.ts.map +0 -1
  493. package/dist/commentRepository/observers/tests/CommentPaginationController.test.d.ts +0 -2
  494. package/dist/commentRepository/observers/tests/CommentPaginationController.test.d.ts.map +0 -1
  495. package/dist/commentRepository/observers/tests/getComment.test.d.ts +0 -2
  496. package/dist/commentRepository/observers/tests/getComment.test.d.ts.map +0 -1
  497. package/dist/commentRepository/observers/tests/integrations/getComment.integration.test.d.ts +0 -2
  498. package/dist/commentRepository/observers/tests/integrations/getComment.integration.test.d.ts.map +0 -1
  499. package/dist/commentRepository/observers/tests/integrations/getComments.integration.test.d.ts +0 -2
  500. package/dist/commentRepository/observers/tests/integrations/getComments.integration.test.d.ts.map +0 -1
  501. package/dist/commentRepository/observers/tests/integrations/getCommentsExcludeBlockUser.integration.test.d.ts +0 -2
  502. package/dist/commentRepository/observers/tests/integrations/getCommentsExcludeBlockUser.integration.test.d.ts.map +0 -1
  503. package/dist/communityRepository/api/test/createCommunity.test.d.ts +0 -2
  504. package/dist/communityRepository/api/test/createCommunity.test.d.ts.map +0 -1
  505. package/dist/communityRepository/api/test/deleteCommunity.test.d.ts +0 -2
  506. package/dist/communityRepository/api/test/deleteCommunity.test.d.ts.map +0 -1
  507. package/dist/communityRepository/api/test/getCommunities.test.d.ts +0 -2
  508. package/dist/communityRepository/api/test/getCommunities.test.d.ts.map +0 -1
  509. package/dist/communityRepository/api/test/getCommunity.test.d.ts +0 -2
  510. package/dist/communityRepository/api/test/getCommunity.test.d.ts.map +0 -1
  511. package/dist/communityRepository/api/test/getRecommendedCommunities.test.d.ts +0 -2
  512. package/dist/communityRepository/api/test/getRecommendedCommunities.test.d.ts.map +0 -1
  513. package/dist/communityRepository/api/test/getTrendingCommunities.test.d.ts +0 -2
  514. package/dist/communityRepository/api/test/getTrendingCommunities.test.d.ts.map +0 -1
  515. package/dist/communityRepository/api/test/integration/createCommunity.integration.test.d.ts +0 -2
  516. package/dist/communityRepository/api/test/integration/createCommunity.integration.test.d.ts.map +0 -1
  517. package/dist/communityRepository/api/test/integration/deleteCommunity.integration.test.d.ts +0 -2
  518. package/dist/communityRepository/api/test/integration/deleteCommunity.integration.test.d.ts.map +0 -1
  519. package/dist/communityRepository/api/test/integration/getCommunities.integration.test.d.ts +0 -2
  520. package/dist/communityRepository/api/test/integration/getCommunities.integration.test.d.ts.map +0 -1
  521. package/dist/communityRepository/api/test/integration/getCommunity.integration.test.d.ts +0 -2
  522. package/dist/communityRepository/api/test/integration/getCommunity.integration.test.d.ts.map +0 -1
  523. package/dist/communityRepository/api/test/integration/getRecommendedCommunities.integration.test.d.ts +0 -2
  524. package/dist/communityRepository/api/test/integration/getRecommendedCommunities.integration.test.d.ts.map +0 -1
  525. package/dist/communityRepository/api/test/integration/getTrendingCommunities.integration.test.d.ts +0 -2
  526. package/dist/communityRepository/api/test/integration/getTrendingCommunities.integration.test.d.ts.map +0 -1
  527. package/dist/communityRepository/api/test/integration/joinCommunity.integration.test.d.ts +0 -2
  528. package/dist/communityRepository/api/test/integration/joinCommunity.integration.test.d.ts.map +0 -1
  529. package/dist/communityRepository/api/test/integration/leaveCommunity.integration.test.d.ts +0 -2
  530. package/dist/communityRepository/api/test/integration/leaveCommunity.integration.test.d.ts.map +0 -1
  531. package/dist/communityRepository/api/test/integration/queryCommunities.integration.test.d.ts +0 -2
  532. package/dist/communityRepository/api/test/integration/queryCommunities.integration.test.d.ts.map +0 -1
  533. package/dist/communityRepository/api/test/integration/setup.d.ts +0 -17
  534. package/dist/communityRepository/api/test/integration/setup.d.ts.map +0 -1
  535. package/dist/communityRepository/api/test/integration/updateCommunity.integration.test.d.ts +0 -2
  536. package/dist/communityRepository/api/test/integration/updateCommunity.integration.test.d.ts.map +0 -1
  537. package/dist/communityRepository/api/test/joinCommunity.test.d.ts +0 -2
  538. package/dist/communityRepository/api/test/joinCommunity.test.d.ts.map +0 -1
  539. package/dist/communityRepository/api/test/leaveCommunity.test.d.ts +0 -2
  540. package/dist/communityRepository/api/test/leaveCommunity.test.d.ts.map +0 -1
  541. package/dist/communityRepository/api/test/queryCommunity.test.d.ts +0 -2
  542. package/dist/communityRepository/api/test/queryCommunity.test.d.ts.map +0 -1
  543. package/dist/communityRepository/api/test/updateCommunity.test.d.ts +0 -2
  544. package/dist/communityRepository/api/test/updateCommunity.test.d.ts.map +0 -1
  545. package/dist/communityRepository/communityMembership/api/tests/addMembers.test.d.ts +0 -2
  546. package/dist/communityRepository/communityMembership/api/tests/addMembers.test.d.ts.map +0 -1
  547. package/dist/communityRepository/communityMembership/api/tests/integration/addMembers.integration.test.d.ts +0 -2
  548. package/dist/communityRepository/communityMembership/api/tests/integration/addMembers.integration.test.d.ts.map +0 -1
  549. package/dist/communityRepository/communityMembership/api/tests/integration/queryCommunityMembers.integration.test.d.ts +0 -2
  550. package/dist/communityRepository/communityMembership/api/tests/integration/queryCommunityMembers.integration.test.d.ts.map +0 -1
  551. package/dist/communityRepository/communityMembership/api/tests/integration/removeMembers.integration.test.d.ts +0 -2
  552. package/dist/communityRepository/communityMembership/api/tests/integration/removeMembers.integration.test.d.ts.map +0 -1
  553. package/dist/communityRepository/communityMembership/api/tests/integration/setup.d.ts +0 -10
  554. package/dist/communityRepository/communityMembership/api/tests/integration/setup.d.ts.map +0 -1
  555. package/dist/communityRepository/communityMembership/api/tests/queryCommunityMembers.test.d.ts +0 -2
  556. package/dist/communityRepository/communityMembership/api/tests/queryCommunityMembers.test.d.ts.map +0 -1
  557. package/dist/communityRepository/communityMembership/api/tests/removeMembers.test.d.ts +0 -2
  558. package/dist/communityRepository/communityMembership/api/tests/removeMembers.test.d.ts.map +0 -1
  559. package/dist/communityRepository/communityMembership/events/tests/onCommunityJoined.test.d.ts +0 -2
  560. package/dist/communityRepository/communityMembership/events/tests/onCommunityJoined.test.d.ts.map +0 -1
  561. package/dist/communityRepository/communityMembership/events/tests/onCommunityLeft.test.d.ts +0 -2
  562. package/dist/communityRepository/communityMembership/events/tests/onCommunityLeft.test.d.ts.map +0 -1
  563. package/dist/communityRepository/communityMembership/events/tests/onCommunityUserAdded.test.d.ts +0 -2
  564. package/dist/communityRepository/communityMembership/events/tests/onCommunityUserAdded.test.d.ts.map +0 -1
  565. package/dist/communityRepository/communityMembership/events/tests/onCommunityUserBanned.test.d.ts +0 -2
  566. package/dist/communityRepository/communityMembership/events/tests/onCommunityUserBanned.test.d.ts.map +0 -1
  567. package/dist/communityRepository/communityMembership/events/tests/onCommunityUserRemoved.test.d.ts +0 -2
  568. package/dist/communityRepository/communityMembership/events/tests/onCommunityUserRemoved.test.d.ts.map +0 -1
  569. package/dist/communityRepository/communityMembership/events/tests/onCommunityUserRoleAdded.test.d.ts +0 -2
  570. package/dist/communityRepository/communityMembership/events/tests/onCommunityUserRoleAdded.test.d.ts.map +0 -1
  571. package/dist/communityRepository/communityMembership/events/tests/onCommunityUserRoleRemoved.test.d.ts +0 -2
  572. package/dist/communityRepository/communityMembership/events/tests/onCommunityUserRoleRemoved.test.d.ts.map +0 -1
  573. package/dist/communityRepository/communityMembership/events/tests/onCommunityUserUnbaned.test.d.ts +0 -2
  574. package/dist/communityRepository/communityMembership/events/tests/onCommunityUserUnbaned.test.d.ts.map +0 -1
  575. package/dist/communityRepository/communityMembership/events/tests/utils.test.d.ts +0 -2
  576. package/dist/communityRepository/communityMembership/events/tests/utils.test.d.ts.map +0 -1
  577. package/dist/communityRepository/communityMembership/observers/tests/getMembers.test.d.ts +0 -2
  578. package/dist/communityRepository/communityMembership/observers/tests/getMembers.test.d.ts.map +0 -1
  579. package/dist/communityRepository/communityMembership/observers/tests/integration/getMembers.integration.test.d.ts +0 -2
  580. package/dist/communityRepository/communityMembership/observers/tests/integration/getMembers.integration.test.d.ts.map +0 -1
  581. package/dist/communityRepository/communityMembership/observers/tests/integration/searchMembers.integration.test.d.ts +0 -2
  582. package/dist/communityRepository/communityMembership/observers/tests/integration/searchMembers.integration.test.d.ts.map +0 -1
  583. package/dist/communityRepository/communityMembership/observers/tests/integration/setup.d.ts +0 -8
  584. package/dist/communityRepository/communityMembership/observers/tests/integration/setup.d.ts.map +0 -1
  585. package/dist/communityRepository/communityModeration/api/test/addRoles.test.d.ts +0 -2
  586. package/dist/communityRepository/communityModeration/api/test/addRoles.test.d.ts.map +0 -1
  587. package/dist/communityRepository/communityModeration/api/test/banMembers.test.d.ts +0 -2
  588. package/dist/communityRepository/communityModeration/api/test/banMembers.test.d.ts.map +0 -1
  589. package/dist/communityRepository/communityModeration/api/test/integration/addRoles.integration.test.d.ts +0 -2
  590. package/dist/communityRepository/communityModeration/api/test/integration/addRoles.integration.test.d.ts.map +0 -1
  591. package/dist/communityRepository/communityModeration/api/test/integration/banMembers.integration.test.d.ts +0 -2
  592. package/dist/communityRepository/communityModeration/api/test/integration/banMembers.integration.test.d.ts.map +0 -1
  593. package/dist/communityRepository/communityModeration/api/test/integration/removeRoles.integration.test.d.ts +0 -2
  594. package/dist/communityRepository/communityModeration/api/test/integration/removeRoles.integration.test.d.ts.map +0 -1
  595. package/dist/communityRepository/communityModeration/api/test/integration/setup.d.ts +0 -14
  596. package/dist/communityRepository/communityModeration/api/test/integration/setup.d.ts.map +0 -1
  597. package/dist/communityRepository/communityModeration/api/test/integration/unbanMembers.integration.test.d.ts +0 -2
  598. package/dist/communityRepository/communityModeration/api/test/integration/unbanMembers.integration.test.d.ts.map +0 -1
  599. package/dist/communityRepository/communityModeration/api/test/removeRoles.test.d.ts +0 -2
  600. package/dist/communityRepository/communityModeration/api/test/removeRoles.test.d.ts.map +0 -1
  601. package/dist/communityRepository/communityModeration/api/test/unbanMembers.test.d.ts +0 -2
  602. package/dist/communityRepository/communityModeration/api/test/unbanMembers.test.d.ts.map +0 -1
  603. package/dist/communityRepository/events/test/onCommunityCreated.test.d.ts +0 -2
  604. package/dist/communityRepository/events/test/onCommunityCreated.test.d.ts.map +0 -1
  605. package/dist/communityRepository/events/test/onCommunityDeleted.test.d.ts +0 -2
  606. package/dist/communityRepository/events/test/onCommunityDeleted.test.d.ts.map +0 -1
  607. package/dist/communityRepository/events/test/onCommunityUpdated.test.d.ts +0 -2
  608. package/dist/communityRepository/events/test/onCommunityUpdated.test.d.ts.map +0 -1
  609. package/dist/communityRepository/events/test/utils.test.d.ts +0 -2
  610. package/dist/communityRepository/events/test/utils.test.d.ts.map +0 -1
  611. package/dist/communityRepository/observers/tests/getCommunities.test.d.ts +0 -2
  612. package/dist/communityRepository/observers/tests/getCommunities.test.d.ts.map +0 -1
  613. package/dist/communityRepository/observers/tests/getCommunity.test.d.ts +0 -2
  614. package/dist/communityRepository/observers/tests/getCommunity.test.d.ts.map +0 -1
  615. package/dist/communityRepository/observers/tests/integration/getCommunities.integration.test.d.ts +0 -2
  616. package/dist/communityRepository/observers/tests/integration/getCommunities.integration.test.d.ts.map +0 -1
  617. package/dist/communityRepository/observers/tests/integration/getCommunity.integration.test.d.ts +0 -2
  618. package/dist/communityRepository/observers/tests/integration/getCommunity.integration.test.d.ts.map +0 -1
  619. package/dist/communityRepository/observers/tests/integration/getJoinRequestList.integration.test.d.ts +0 -2
  620. package/dist/communityRepository/observers/tests/integration/getJoinRequestList.integration.test.d.ts.map +0 -1
  621. package/dist/communityRepository/observers/tests/integration/getJoinRequests.integration.test.d.ts +0 -2
  622. package/dist/communityRepository/observers/tests/integration/getJoinRequests.integration.test.d.ts.map +0 -1
  623. package/dist/communityRepository/observers/tests/integration/getRecommendedCommunities.integration.test.d.ts +0 -2
  624. package/dist/communityRepository/observers/tests/integration/getRecommendedCommunities.integration.test.d.ts.map +0 -1
  625. package/dist/communityRepository/observers/tests/integration/getTrendingCommunities.integration.test.d.ts +0 -2
  626. package/dist/communityRepository/observers/tests/integration/getTrendingCommunities.integration.test.d.ts.map +0 -1
  627. package/dist/communityRepository/observers/tests/integration/searchCommunities.integration.test.d.ts +0 -2
  628. package/dist/communityRepository/observers/tests/integration/searchCommunities.integration.test.d.ts.map +0 -1
  629. package/dist/communityRepository/observers/tests/integration/semanticSearchCommunities.integration.test.d.ts +0 -2
  630. package/dist/communityRepository/observers/tests/integration/semanticSearchCommunities.integration.test.d.ts.map +0 -1
  631. package/dist/communityRepository/observers/tests/integration/setup.d.ts +0 -21
  632. package/dist/communityRepository/observers/tests/integration/setup.d.ts.map +0 -1
  633. package/dist/core/query/tests/filtering.test.d.ts +0 -2
  634. package/dist/core/query/tests/filtering.test.d.ts.map +0 -1
  635. package/dist/core/query/tests/paging.test.d.ts +0 -2
  636. package/dist/core/query/tests/paging.test.d.ts.map +0 -1
  637. package/dist/core/query/tests/query.test.d.ts +0 -2
  638. package/dist/core/query/tests/query.test.d.ts.map +0 -1
  639. package/dist/core/query/tests/runQuery.test.d.ts +0 -2
  640. package/dist/core/query/tests/runQuery.test.d.ts.map +0 -1
  641. package/dist/core/tests/subscription.test.d.ts +0 -2
  642. package/dist/core/tests/subscription.test.d.ts.map +0 -1
  643. package/dist/core/transports/tests/http.test.d.ts +0 -2
  644. package/dist/core/transports/tests/http.test.d.ts.map +0 -1
  645. package/dist/core/transports/tests/mqtt.test.d.ts +0 -2
  646. package/dist/core/transports/tests/mqtt.test.d.ts.map +0 -1
  647. package/dist/eventRepository/api/tests/integration/createEvent.integration.test.d.ts +0 -2
  648. package/dist/eventRepository/api/tests/integration/createEvent.integration.test.d.ts.map +0 -1
  649. package/dist/eventRepository/api/tests/integration/deleteEvent.integration.test.d.ts +0 -2
  650. package/dist/eventRepository/api/tests/integration/deleteEvent.integration.test.d.ts.map +0 -1
  651. package/dist/eventRepository/api/tests/integration/updateEvent.integration.test.d.ts +0 -2
  652. package/dist/eventRepository/api/tests/integration/updateEvent.integration.test.d.ts.map +0 -1
  653. package/dist/eventRepository/internalApi/tests/integration/createRSVP.integration.test.d.ts +0 -2
  654. package/dist/eventRepository/internalApi/tests/integration/createRSVP.integration.test.d.ts.map +0 -1
  655. package/dist/eventRepository/internalApi/tests/integration/getEvent.integration.test.d.ts +0 -2
  656. package/dist/eventRepository/internalApi/tests/integration/getEvent.integration.test.d.ts.map +0 -1
  657. package/dist/eventRepository/internalApi/tests/integration/getMyRSVP.integration.test.d.ts +0 -2
  658. package/dist/eventRepository/internalApi/tests/integration/getMyRSVP.integration.test.d.ts.map +0 -1
  659. package/dist/eventRepository/internalApi/tests/integration/updateRSVP.integration.test.d.ts +0 -2
  660. package/dist/eventRepository/internalApi/tests/integration/updateRSVP.integration.test.d.ts.map +0 -1
  661. package/dist/eventRepository/observers/tests/integrations/getEvent.integration.test.d.ts +0 -2
  662. package/dist/eventRepository/observers/tests/integrations/getEvent.integration.test.d.ts.map +0 -1
  663. package/dist/eventRepository/observers/tests/integrations/getEvents.integration.test.d.ts +0 -2
  664. package/dist/eventRepository/observers/tests/integrations/getEvents.integration.test.d.ts.map +0 -1
  665. package/dist/eventRepository/observers/tests/integrations/getMyEvents.integration.test.d.ts +0 -2
  666. package/dist/eventRepository/observers/tests/integrations/getMyEvents.integration.test.d.ts.map +0 -1
  667. package/dist/eventRepository/observers/tests/integrations/getRSVPs.integration.test.d.ts +0 -2
  668. package/dist/eventRepository/observers/tests/integrations/getRSVPs.integration.test.d.ts.map +0 -1
  669. package/dist/external/api/tests/createUserToken.test.d.ts +0 -2
  670. package/dist/external/api/tests/createUserToken.test.d.ts.map +0 -1
  671. package/dist/external/api/tests/integration/createUserToken.integration.test.d.ts +0 -2
  672. package/dist/external/api/tests/integration/createUserToken.integration.test.d.ts.map +0 -1
  673. package/dist/feedRepository/api/test/getCustomRankingGlobalFeed.test.d.ts +0 -2
  674. package/dist/feedRepository/api/test/getCustomRankingGlobalFeed.test.d.ts.map +0 -1
  675. package/dist/feedRepository/api/test/queryGlobalFeed.test.d.ts +0 -2
  676. package/dist/feedRepository/api/test/queryGlobalFeed.test.d.ts.map +0 -1
  677. package/dist/feedRepository/api/tests/integration/queryGlobalFeed.integration.test.d.ts +0 -2
  678. package/dist/feedRepository/api/tests/integration/queryGlobalFeed.integration.test.d.ts.map +0 -1
  679. package/dist/feedRepository/observers/tests/integration/getCommunityFeed.integration.test.d.ts +0 -2
  680. package/dist/feedRepository/observers/tests/integration/getCommunityFeed.integration.test.d.ts.map +0 -1
  681. package/dist/feedRepository/observers/tests/integration/getCustomRankingGlobalFeed.integration.test.d.ts +0 -2
  682. package/dist/feedRepository/observers/tests/integration/getCustomRankingGlobalFeed.integration.test.d.ts.map +0 -1
  683. package/dist/feedRepository/observers/tests/integration/getForYouFeed.integration.test.d.ts +0 -2
  684. package/dist/feedRepository/observers/tests/integration/getForYouFeed.integration.test.d.ts.map +0 -1
  685. package/dist/feedRepository/observers/tests/integration/getGlobalFeed.integration.test.d.ts +0 -2
  686. package/dist/feedRepository/observers/tests/integration/getGlobalFeed.integration.test.d.ts.map +0 -1
  687. package/dist/feedRepository/observers/tests/integration/getUserFeed.integration.test.d.ts +0 -2
  688. package/dist/feedRepository/observers/tests/integration/getUserFeed.integration.test.d.ts.map +0 -1
  689. package/dist/feedRepository/observers/tests/unit/CursorController.test.d.ts +0 -2
  690. package/dist/feedRepository/observers/tests/unit/CursorController.test.d.ts.map +0 -1
  691. package/dist/fileRepository/api/test/uploadFile.test.d.ts +0 -2
  692. package/dist/fileRepository/api/test/uploadFile.test.d.ts.map +0 -1
  693. package/dist/fileRepository/api/test/uploadImage.test.d.ts +0 -2
  694. package/dist/fileRepository/api/test/uploadImage.test.d.ts.map +0 -1
  695. package/dist/fileRepository/api/test/uploadVideo.test.d.ts +0 -2
  696. package/dist/fileRepository/api/test/uploadVideo.test.d.ts.map +0 -1
  697. package/dist/fileRepository/api/tests/integration/deleteFile.integration.test.d.ts +0 -2
  698. package/dist/fileRepository/api/tests/integration/deleteFile.integration.test.d.ts.map +0 -1
  699. package/dist/fileRepository/api/tests/integration/fileUrlWithSize.integration.test.d.ts +0 -2
  700. package/dist/fileRepository/api/tests/integration/fileUrlWithSize.integration.test.d.ts.map +0 -1
  701. package/dist/fileRepository/api/tests/integration/getFile.integration.test.d.ts +0 -2
  702. package/dist/fileRepository/api/tests/integration/getFile.integration.test.d.ts.map +0 -1
  703. package/dist/fileRepository/api/tests/integration/updateAltText.integration.test.d.ts +0 -2
  704. package/dist/fileRepository/api/tests/integration/updateAltText.integration.test.d.ts.map +0 -1
  705. package/dist/fileRepository/api/tests/integration/uploadAudio.integration.test.d.ts +0 -2
  706. package/dist/fileRepository/api/tests/integration/uploadAudio.integration.test.d.ts.map +0 -1
  707. package/dist/fileRepository/api/tests/integration/uploadClip.integration.test.d.ts +0 -2
  708. package/dist/fileRepository/api/tests/integration/uploadClip.integration.test.d.ts.map +0 -1
  709. package/dist/fileRepository/api/tests/integration/uploadFile.integration.test.d.ts +0 -2
  710. package/dist/fileRepository/api/tests/integration/uploadFile.integration.test.d.ts.map +0 -1
  711. package/dist/fileRepository/api/tests/integration/uploadImage.integration.test.d.ts +0 -2
  712. package/dist/fileRepository/api/tests/integration/uploadImage.integration.test.d.ts.map +0 -1
  713. package/dist/fileRepository/api/tests/integration/uploadVideo.integration.test.d.ts +0 -2
  714. package/dist/fileRepository/api/tests/integration/uploadVideo.integration.test.d.ts.map +0 -1
  715. package/dist/group/utils/test/withUsers.test.d.ts +0 -2
  716. package/dist/group/utils/test/withUsers.test.d.ts.map +0 -1
  717. package/dist/invitationRepository/api/tests/integration/cancelInvitation.integration.test.d.ts +0 -2
  718. package/dist/invitationRepository/api/tests/integration/cancelInvitation.integration.test.d.ts.map +0 -1
  719. package/dist/invitationRepository/observers/tests/integrations/getInvitations.integration.test.d.ts +0 -2
  720. package/dist/invitationRepository/observers/tests/integrations/getInvitations.integration.test.d.ts.map +0 -1
  721. package/dist/invitationRepository/observers/tests/integrations/getInvitations.noUser.integration.test.d.ts +0 -2
  722. package/dist/invitationRepository/observers/tests/integrations/getInvitations.noUser.integration.test.d.ts.map +0 -1
  723. package/dist/invitationRepository/observers/tests/integrations/getMyCommunityInvitations.integration.test.d.ts +0 -2
  724. package/dist/invitationRepository/observers/tests/integrations/getMyCommunityInvitations.integration.test.d.ts.map +0 -1
  725. package/dist/liveReactionRepository/api/tests/integration/createReaction.integration.test.d.ts +0 -2
  726. package/dist/liveReactionRepository/api/tests/integration/createReaction.integration.test.d.ts.map +0 -1
  727. package/dist/liveReactionRepository/events/tests/integration/onLiveReactionCreated.integration.test.d.ts +0 -2
  728. package/dist/liveReactionRepository/events/tests/integration/onLiveReactionCreated.integration.test.d.ts.map +0 -1
  729. package/dist/liveReactionRepository/observers/tests/integrations/getReactions.integration.test.d.ts +0 -2
  730. package/dist/liveReactionRepository/observers/tests/integrations/getReactions.integration.test.d.ts.map +0 -1
  731. package/dist/liveReactionRepository/observers/tests/integrations/getReactions.noUser.integration.test.d.ts +0 -2
  732. package/dist/liveReactionRepository/observers/tests/integrations/getReactions.noUser.integration.test.d.ts.map +0 -1
  733. package/dist/marker/api/tests/getChannelMarkers.test.d.ts +0 -2
  734. package/dist/marker/api/tests/getChannelMarkers.test.d.ts.map +0 -1
  735. package/dist/marker/api/tests/getMessageMarkers.test.d.ts +0 -2
  736. package/dist/marker/api/tests/getMessageMarkers.test.d.ts.map +0 -1
  737. package/dist/marker/api/tests/getSubChannelMarkers.test.d.ts +0 -2
  738. package/dist/marker/api/tests/getSubChannelMarkers.test.d.ts.map +0 -1
  739. package/dist/messageRepository/api/tests/createMessage.test.d.ts +0 -2
  740. package/dist/messageRepository/api/tests/createMessage.test.d.ts.map +0 -1
  741. package/dist/messageRepository/api/tests/deleteMessage.test.d.ts +0 -2
  742. package/dist/messageRepository/api/tests/deleteMessage.test.d.ts.map +0 -1
  743. package/dist/messageRepository/api/tests/editMessage.test.d.ts +0 -2
  744. package/dist/messageRepository/api/tests/editMessage.test.d.ts.map +0 -1
  745. package/dist/messageRepository/api/tests/flagMessage.test.d.ts +0 -2
  746. package/dist/messageRepository/api/tests/flagMessage.test.d.ts.map +0 -1
  747. package/dist/messageRepository/api/tests/getMessage.test.d.ts +0 -2
  748. package/dist/messageRepository/api/tests/getMessage.test.d.ts.map +0 -1
  749. package/dist/messageRepository/api/tests/getMessages.test.d.ts +0 -2
  750. package/dist/messageRepository/api/tests/getMessages.test.d.ts.map +0 -1
  751. package/dist/messageRepository/api/tests/integration/createMessage.integration.test.d.ts +0 -2
  752. package/dist/messageRepository/api/tests/integration/createMessage.integration.test.d.ts.map +0 -1
  753. package/dist/messageRepository/api/tests/integration/deleteMessage.integration.test.d.ts +0 -2
  754. package/dist/messageRepository/api/tests/integration/deleteMessage.integration.test.d.ts.map +0 -1
  755. package/dist/messageRepository/api/tests/integration/editMessage.integration.test.d.ts +0 -2
  756. package/dist/messageRepository/api/tests/integration/editMessage.integration.test.d.ts.map +0 -1
  757. package/dist/messageRepository/api/tests/integration/flagMessage.integration.test.d.ts +0 -2
  758. package/dist/messageRepository/api/tests/integration/flagMessage.integration.test.d.ts.map +0 -1
  759. package/dist/messageRepository/api/tests/integration/getDeliveredUsers.integration.test.d.ts +0 -2
  760. package/dist/messageRepository/api/tests/integration/getDeliveredUsers.integration.test.d.ts.map +0 -1
  761. package/dist/messageRepository/api/tests/integration/getReadUsers.integration.test.d.ts +0 -2
  762. package/dist/messageRepository/api/tests/integration/getReadUsers.integration.test.d.ts.map +0 -1
  763. package/dist/messageRepository/api/tests/integration/isMessageFlaggedByMe.integration.test.d.ts +0 -2
  764. package/dist/messageRepository/api/tests/integration/isMessageFlaggedByMe.integration.test.d.ts.map +0 -1
  765. package/dist/messageRepository/api/tests/integration/markAsDelivered.integration.test.d.ts +0 -2
  766. package/dist/messageRepository/api/tests/integration/markAsDelivered.integration.test.d.ts.map +0 -1
  767. package/dist/messageRepository/api/tests/integration/queryMessages.integration.test.d.ts +0 -2
  768. package/dist/messageRepository/api/tests/integration/queryMessages.integration.test.d.ts.map +0 -1
  769. package/dist/messageRepository/api/tests/integration/softDeleteMessage.integration.test.d.ts +0 -2
  770. package/dist/messageRepository/api/tests/integration/softDeleteMessage.integration.test.d.ts.map +0 -1
  771. package/dist/messageRepository/api/tests/integration/unflagMessage.integration.test.d.ts +0 -2
  772. package/dist/messageRepository/api/tests/integration/unflagMessage.integration.test.d.ts.map +0 -1
  773. package/dist/messageRepository/api/tests/integration/updateMessage.integration.test.d.ts +0 -2
  774. package/dist/messageRepository/api/tests/integration/updateMessage.integration.test.d.ts.map +0 -1
  775. package/dist/messageRepository/api/tests/markAsDelivered.test.d.ts +0 -2
  776. package/dist/messageRepository/api/tests/markAsDelivered.test.d.ts.map +0 -1
  777. package/dist/messageRepository/api/tests/queryMessages.test.d.ts +0 -2
  778. package/dist/messageRepository/api/tests/queryMessages.test.d.ts.map +0 -1
  779. package/dist/messageRepository/api/tests/unflagMessage.test.d.ts +0 -2
  780. package/dist/messageRepository/api/tests/unflagMessage.test.d.ts.map +0 -1
  781. package/dist/messageRepository/events/tests/events.test.d.ts +0 -2
  782. package/dist/messageRepository/events/tests/events.test.d.ts.map +0 -1
  783. package/dist/messageRepository/observers/tests/getAroundMessages.test.d.ts +0 -2
  784. package/dist/messageRepository/observers/tests/getAroundMessages.test.d.ts.map +0 -1
  785. package/dist/messageRepository/observers/tests/getMessage.test.d.ts +0 -2
  786. package/dist/messageRepository/observers/tests/getMessage.test.d.ts.map +0 -1
  787. package/dist/messageRepository/observers/tests/getMessages.test.d.ts +0 -2
  788. package/dist/messageRepository/observers/tests/getMessages.test.d.ts.map +0 -1
  789. package/dist/messageRepository/observers/tests/integration/getMessage.integration.test.d.ts +0 -2
  790. package/dist/messageRepository/observers/tests/integration/getMessage.integration.test.d.ts.map +0 -1
  791. package/dist/messageRepository/observers/tests/integration/getMessages.integration.test.d.ts +0 -2
  792. package/dist/messageRepository/observers/tests/integration/getMessages.integration.test.d.ts.map +0 -1
  793. package/dist/messageRepository/observers/tests/markReadMessage.test.d.ts +0 -2
  794. package/dist/messageRepository/observers/tests/markReadMessage.test.d.ts.map +0 -1
  795. package/dist/notificationTray/api/tests/integration/markItemsSeen.integration.test.d.ts +0 -2
  796. package/dist/notificationTray/api/tests/integration/markItemsSeen.integration.test.d.ts.map +0 -1
  797. package/dist/notificationTray/api/tests/integration/markTraySeen.integration.test.d.ts +0 -2
  798. package/dist/notificationTray/api/tests/integration/markTraySeen.integration.test.d.ts.map +0 -1
  799. package/dist/notificationTray/events/tests/integrations/onNotificationTraySeenUpdated.integration.test.d.ts +0 -2
  800. package/dist/notificationTray/events/tests/integrations/onNotificationTraySeenUpdated.integration.test.d.ts.map +0 -1
  801. package/dist/notificationTray/internalApi/tests/integration/getNotificationTraySeen.integration.test.d.ts +0 -2
  802. package/dist/notificationTray/internalApi/tests/integration/getNotificationTraySeen.integration.test.d.ts.map +0 -1
  803. package/dist/notificationTray/observers/tests/integrations/getNotificationTrayItems.integration.test.d.ts +0 -2
  804. package/dist/notificationTray/observers/tests/integrations/getNotificationTrayItems.integration.test.d.ts.map +0 -1
  805. package/dist/notificationTray/observers/tests/integrations/getNotificationTraySeen.integration.test.d.ts +0 -2
  806. package/dist/notificationTray/observers/tests/integrations/getNotificationTraySeen.integration.test.d.ts.map +0 -1
  807. package/dist/pollRepository/api/tests/closePoll.test.d.ts +0 -2
  808. package/dist/pollRepository/api/tests/closePoll.test.d.ts.map +0 -1
  809. package/dist/pollRepository/api/tests/createPoll.test.d.ts +0 -2
  810. package/dist/pollRepository/api/tests/createPoll.test.d.ts.map +0 -1
  811. package/dist/pollRepository/api/tests/getPoll.test.d.ts +0 -2
  812. package/dist/pollRepository/api/tests/getPoll.test.d.ts.map +0 -1
  813. package/dist/pollRepository/api/tests/integration/closePoll.integration.test.d.ts +0 -2
  814. package/dist/pollRepository/api/tests/integration/closePoll.integration.test.d.ts.map +0 -1
  815. package/dist/pollRepository/api/tests/integration/createPoll.integration.test.d.ts +0 -2
  816. package/dist/pollRepository/api/tests/integration/createPoll.integration.test.d.ts.map +0 -1
  817. package/dist/pollRepository/api/tests/integration/deletePoll.integration.test.d.ts +0 -2
  818. package/dist/pollRepository/api/tests/integration/deletePoll.integration.test.d.ts.map +0 -1
  819. package/dist/pollRepository/api/tests/integration/getPoll.integration.test.d.ts +0 -2
  820. package/dist/pollRepository/api/tests/integration/getPoll.integration.test.d.ts.map +0 -1
  821. package/dist/pollRepository/api/tests/integration/unvotePoll.integration.test.d.ts +0 -2
  822. package/dist/pollRepository/api/tests/integration/unvotePoll.integration.test.d.ts.map +0 -1
  823. package/dist/pollRepository/api/tests/integration/votePoll.integration.test.d.ts +0 -2
  824. package/dist/pollRepository/api/tests/integration/votePoll.integration.test.d.ts.map +0 -1
  825. package/dist/pollRepository/api/tests/votePoll.test.d.ts +0 -2
  826. package/dist/pollRepository/api/tests/votePoll.test.d.ts.map +0 -1
  827. package/dist/pollRepository/observers/tests/integrations/getPoll.integration.test.d.ts +0 -2
  828. package/dist/pollRepository/observers/tests/integrations/getPoll.integration.test.d.ts.map +0 -1
  829. package/dist/postRepository/api/tests/getPost.test.d.ts +0 -2
  830. package/dist/postRepository/api/tests/getPost.test.d.ts.map +0 -1
  831. package/dist/postRepository/api/tests/getPostByIds.test.d.ts +0 -2
  832. package/dist/postRepository/api/tests/getPostByIds.test.d.ts.map +0 -1
  833. package/dist/postRepository/api/tests/getPosts.test.d.ts +0 -2
  834. package/dist/postRepository/api/tests/getPosts.test.d.ts.map +0 -1
  835. package/dist/postRepository/api/tests/integration/approvePost.integration.test.d.ts +0 -2
  836. package/dist/postRepository/api/tests/integration/approvePost.integration.test.d.ts.map +0 -1
  837. package/dist/postRepository/api/tests/integration/createOtherPosts.integration.test.d.ts +0 -2
  838. package/dist/postRepository/api/tests/integration/createOtherPosts.integration.test.d.ts.map +0 -1
  839. package/dist/postRepository/api/tests/integration/createPost.integration.test.d.ts +0 -2
  840. package/dist/postRepository/api/tests/integration/createPost.integration.test.d.ts.map +0 -1
  841. package/dist/postRepository/api/tests/integration/declinePost.integration.test.d.ts +0 -2
  842. package/dist/postRepository/api/tests/integration/declinePost.integration.test.d.ts.map +0 -1
  843. package/dist/postRepository/api/tests/integration/deletePost.integration.test.d.ts +0 -2
  844. package/dist/postRepository/api/tests/integration/deletePost.integration.test.d.ts.map +0 -1
  845. package/dist/postRepository/api/tests/integration/editPost.integration.test.d.ts +0 -2
  846. package/dist/postRepository/api/tests/integration/editPost.integration.test.d.ts.map +0 -1
  847. package/dist/postRepository/api/tests/integration/flagPost.integration.test.d.ts +0 -2
  848. package/dist/postRepository/api/tests/integration/flagPost.integration.test.d.ts.map +0 -1
  849. package/dist/postRepository/api/tests/integration/getPost.integration.test.d.ts +0 -2
  850. package/dist/postRepository/api/tests/integration/getPost.integration.test.d.ts.map +0 -1
  851. package/dist/postRepository/api/tests/integration/getPostByIds.integration.test.d.ts +0 -2
  852. package/dist/postRepository/api/tests/integration/getPostByIds.integration.test.d.ts.map +0 -1
  853. package/dist/postRepository/api/tests/integration/getPosts.integration.test.d.ts +0 -2
  854. package/dist/postRepository/api/tests/integration/getPosts.integration.test.d.ts.map +0 -1
  855. package/dist/postRepository/api/tests/integration/observerCollections.integration.test.d.ts +0 -2
  856. package/dist/postRepository/api/tests/integration/observerCollections.integration.test.d.ts.map +0 -1
  857. package/dist/postRepository/api/tests/integration/pinProduct.integration.test.d.ts +0 -2
  858. package/dist/postRepository/api/tests/integration/pinProduct.integration.test.d.ts.map +0 -1
  859. package/dist/postRepository/api/tests/integration/setup.d.ts +0 -67
  860. package/dist/postRepository/api/tests/integration/setup.d.ts.map +0 -1
  861. package/dist/postRepository/api/tests/integration/unpinProduct.integration.test.d.ts +0 -2
  862. package/dist/postRepository/api/tests/integration/unpinProduct.integration.test.d.ts.map +0 -1
  863. package/dist/postRepository/api/tests/integration/updateProductTags.integration.test.d.ts +0 -2
  864. package/dist/postRepository/api/tests/integration/updateProductTags.integration.test.d.ts.map +0 -1
  865. package/dist/postRepository/api/tests/queryPosts.test.d.ts +0 -2
  866. package/dist/postRepository/api/tests/queryPosts.test.d.ts.map +0 -1
  867. package/dist/postRepository/events/tests/onPostApproved.test.d.ts +0 -2
  868. package/dist/postRepository/events/tests/onPostApproved.test.d.ts.map +0 -1
  869. package/dist/postRepository/events/tests/onPostCreated.test.d.ts +0 -2
  870. package/dist/postRepository/events/tests/onPostCreated.test.d.ts.map +0 -1
  871. package/dist/postRepository/events/tests/onPostDeclined.test.d.ts +0 -2
  872. package/dist/postRepository/events/tests/onPostDeclined.test.d.ts.map +0 -1
  873. package/dist/postRepository/events/tests/onPostDeleted.test.d.ts +0 -2
  874. package/dist/postRepository/events/tests/onPostDeleted.test.d.ts.map +0 -1
  875. package/dist/postRepository/events/tests/onPostFlagged.test.d.ts +0 -2
  876. package/dist/postRepository/events/tests/onPostFlagged.test.d.ts.map +0 -1
  877. package/dist/postRepository/events/tests/onPostReactionAdded.test.d.ts +0 -2
  878. package/dist/postRepository/events/tests/onPostReactionAdded.test.d.ts.map +0 -1
  879. package/dist/postRepository/events/tests/onPostReactionRemoved.test.d.ts +0 -2
  880. package/dist/postRepository/events/tests/onPostReactionRemoved.test.d.ts.map +0 -1
  881. package/dist/postRepository/events/tests/onPostUnflagged.test.d.ts +0 -2
  882. package/dist/postRepository/events/tests/onPostUnflagged.test.d.ts.map +0 -1
  883. package/dist/postRepository/events/tests/onPostUpdated.test.d.ts +0 -2
  884. package/dist/postRepository/events/tests/onPostUpdated.test.d.ts.map +0 -1
  885. package/dist/postRepository/observers/tests/getPost.test.d.ts +0 -2
  886. package/dist/postRepository/observers/tests/getPost.test.d.ts.map +0 -1
  887. package/dist/postRepository/observers/tests/getPosts.test.d.ts +0 -2
  888. package/dist/postRepository/observers/tests/getPosts.test.d.ts.map +0 -1
  889. package/dist/postRepository/observers/tests/getPostsExcludeBlockUser.test.d.ts +0 -2
  890. package/dist/postRepository/observers/tests/getPostsExcludeBlockUser.test.d.ts.map +0 -1
  891. package/dist/postRepository/tests/integration/postAnalytics.integration.test.d.ts +0 -2
  892. package/dist/postRepository/tests/integration/postAnalytics.integration.test.d.ts.map +0 -1
  893. package/dist/postRepository/tests/integration/setup.d.ts +0 -6
  894. package/dist/postRepository/tests/integration/setup.d.ts.map +0 -1
  895. package/dist/productRepository/tests/integration/getProduct.integration.test.d.ts +0 -2
  896. package/dist/productRepository/tests/integration/getProduct.integration.test.d.ts.map +0 -1
  897. package/dist/productRepository/tests/integration/productAnalytics.integration.test.d.ts +0 -2
  898. package/dist/productRepository/tests/integration/productAnalytics.integration.test.d.ts.map +0 -1
  899. package/dist/productRepository/tests/integration/searchProducts.integration.test.d.ts +0 -2
  900. package/dist/productRepository/tests/integration/searchProducts.integration.test.d.ts.map +0 -1
  901. package/dist/productRepository/tests/integration/setup.d.ts +0 -11
  902. package/dist/productRepository/tests/integration/setup.d.ts.map +0 -1
  903. package/dist/reactionRepository/api/tests/addReaction.test.d.ts +0 -2
  904. package/dist/reactionRepository/api/tests/addReaction.test.d.ts.map +0 -1
  905. package/dist/reactionRepository/api/tests/integration/addReaction.integration.test.d.ts +0 -2
  906. package/dist/reactionRepository/api/tests/integration/addReaction.integration.test.d.ts.map +0 -1
  907. package/dist/reactionRepository/api/tests/integration/queryReactions.integration.test.d.ts +0 -2
  908. package/dist/reactionRepository/api/tests/integration/queryReactions.integration.test.d.ts.map +0 -1
  909. package/dist/reactionRepository/api/tests/integration/queryReactor.integration.test.d.ts +0 -2
  910. package/dist/reactionRepository/api/tests/integration/queryReactor.integration.test.d.ts.map +0 -1
  911. package/dist/reactionRepository/api/tests/integration/removeReaction.integration.test.d.ts +0 -2
  912. package/dist/reactionRepository/api/tests/integration/removeReaction.integration.test.d.ts.map +0 -1
  913. package/dist/reactionRepository/api/tests/removeReaction.test.d.ts +0 -2
  914. package/dist/reactionRepository/api/tests/removeReaction.test.d.ts.map +0 -1
  915. package/dist/reactionRepository/observers/tests/integrations/getReactions.integration.test.d.ts +0 -2
  916. package/dist/reactionRepository/observers/tests/integrations/getReactions.integration.test.d.ts.map +0 -1
  917. package/dist/report/api/tests/createReport.test.d.ts +0 -2
  918. package/dist/report/api/tests/createReport.test.d.ts.map +0 -1
  919. package/dist/report/api/tests/deleteReport.test.d.ts +0 -2
  920. package/dist/report/api/tests/deleteReport.test.d.ts.map +0 -1
  921. package/dist/report/api/tests/integration/createReport.integration.test.d.ts +0 -2
  922. package/dist/report/api/tests/integration/createReport.integration.test.d.ts.map +0 -1
  923. package/dist/report/api/tests/integration/deleteReport.integration.test.d.ts +0 -2
  924. package/dist/report/api/tests/integration/deleteReport.integration.test.d.ts.map +0 -1
  925. package/dist/report/api/tests/integration/isReportedByMe.integration.test.d.ts +0 -2
  926. package/dist/report/api/tests/integration/isReportedByMe.integration.test.d.ts.map +0 -1
  927. package/dist/role/api/tests/integration/getRole.integration.test.d.ts +0 -2
  928. package/dist/role/api/tests/integration/getRole.integration.test.d.ts.map +0 -1
  929. package/dist/role/api/tests/integration/queryRoles.integration.test.d.ts +0 -2
  930. package/dist/role/api/tests/integration/queryRoles.integration.test.d.ts.map +0 -1
  931. package/dist/roomPresenceRepository/api/tests/integration/getRoomOnlineUsers.integration.test.d.ts +0 -2
  932. package/dist/roomPresenceRepository/api/tests/integration/getRoomOnlineUsers.integration.test.d.ts.map +0 -1
  933. package/dist/roomPresenceRepository/api/tests/integration/getRoomUserCount.integration.test.d.ts +0 -2
  934. package/dist/roomPresenceRepository/api/tests/integration/getRoomUserCount.integration.test.d.ts.map +0 -1
  935. package/dist/roomPresenceRepository/api/tests/integration/startHeartbeat.integration.test.d.ts +0 -2
  936. package/dist/roomPresenceRepository/api/tests/integration/startHeartbeat.integration.test.d.ts.map +0 -1
  937. package/dist/roomPresenceRepository/api/tests/integration/stopHeartbeat.integration.test.d.ts +0 -2
  938. package/dist/roomPresenceRepository/api/tests/integration/stopHeartbeat.integration.test.d.ts.map +0 -1
  939. package/dist/roomRepository/api/getRecordedUrl.d.ts +0 -19
  940. package/dist/roomRepository/api/getRecordedUrl.d.ts.map +0 -1
  941. package/dist/roomRepository/api/tests/integration/createRoom.integration.test.d.ts +0 -2
  942. package/dist/roomRepository/api/tests/integration/createRoom.integration.test.d.ts.map +0 -1
  943. package/dist/roomRepository/api/tests/integration/deleteRoom.integration.test.d.ts +0 -2
  944. package/dist/roomRepository/api/tests/integration/deleteRoom.integration.test.d.ts.map +0 -1
  945. package/dist/roomRepository/api/tests/integration/getBroadcasterData.integration.test.d.ts +0 -2
  946. package/dist/roomRepository/api/tests/integration/getBroadcasterData.integration.test.d.ts.map +0 -1
  947. package/dist/roomRepository/api/tests/integration/getRecordedUrl.integration.test.d.ts +0 -2
  948. package/dist/roomRepository/api/tests/integration/getRecordedUrl.integration.test.d.ts.map +0 -1
  949. package/dist/roomRepository/api/tests/integration/leaveRoom.integration.test.d.ts +0 -2
  950. package/dist/roomRepository/api/tests/integration/leaveRoom.integration.test.d.ts.map +0 -1
  951. package/dist/roomRepository/api/tests/integration/removeParticipant.integration.test.d.ts +0 -2
  952. package/dist/roomRepository/api/tests/integration/removeParticipant.integration.test.d.ts.map +0 -1
  953. package/dist/roomRepository/api/tests/integration/roomAnalytics.integration.test.d.ts +0 -2
  954. package/dist/roomRepository/api/tests/integration/roomAnalytics.integration.test.d.ts.map +0 -1
  955. package/dist/roomRepository/api/tests/integration/setup.d.ts +0 -23
  956. package/dist/roomRepository/api/tests/integration/setup.d.ts.map +0 -1
  957. package/dist/roomRepository/api/tests/integration/stopRoom.integration.test.d.ts +0 -2
  958. package/dist/roomRepository/api/tests/integration/stopRoom.integration.test.d.ts.map +0 -1
  959. package/dist/roomRepository/api/tests/integration/updateCohostPermission.integration.test.d.ts +0 -2
  960. package/dist/roomRepository/api/tests/integration/updateCohostPermission.integration.test.d.ts.map +0 -1
  961. package/dist/roomRepository/api/tests/integration/updateRoom.integration.test.d.ts +0 -2
  962. package/dist/roomRepository/api/tests/integration/updateRoom.integration.test.d.ts.map +0 -1
  963. package/dist/roomRepository/observers/tests/integration/getRoom.integration.test.d.ts +0 -2
  964. package/dist/roomRepository/observers/tests/integration/getRoom.integration.test.d.ts.map +0 -1
  965. package/dist/roomRepository/observers/tests/integration/getRooms.integration.test.d.ts +0 -2
  966. package/dist/roomRepository/observers/tests/integration/getRooms.integration.test.d.ts.map +0 -1
  967. package/dist/roomRepository/observers/tests/integration/observerUtils.integration.test.d.ts +0 -2
  968. package/dist/roomRepository/observers/tests/integration/observerUtils.integration.test.d.ts.map +0 -1
  969. package/dist/roomRepository/observers/tests/integration/setup.d.ts +0 -2
  970. package/dist/roomRepository/observers/tests/integration/setup.d.ts.map +0 -1
  971. package/dist/storyRepository/api/tests/integration/createImageStory.integration.test.d.ts +0 -2
  972. package/dist/storyRepository/api/tests/integration/createImageStory.integration.test.d.ts.map +0 -1
  973. package/dist/storyRepository/api/tests/integration/createVideoStory.integration.test.d.ts +0 -2
  974. package/dist/storyRepository/api/tests/integration/createVideoStory.integration.test.d.ts.map +0 -1
  975. package/dist/storyRepository/api/tests/integration/hardDeleteStory.integration.test.d.ts +0 -2
  976. package/dist/storyRepository/api/tests/integration/hardDeleteStory.integration.test.d.ts.map +0 -1
  977. package/dist/storyRepository/api/tests/integration/softDeleteStory.integration.test.d.ts +0 -2
  978. package/dist/storyRepository/api/tests/integration/softDeleteStory.integration.test.d.ts.map +0 -1
  979. package/dist/storyRepository/internalApi/tests/integration/getStoryByStoryId.integration.test.d.ts +0 -2
  980. package/dist/storyRepository/internalApi/tests/integration/getStoryByStoryId.integration.test.d.ts.map +0 -1
  981. package/dist/storyRepository/observers/tests/integration/getActiveStoriesByTarget.integration.test.d.ts +0 -2
  982. package/dist/storyRepository/observers/tests/integration/getActiveStoriesByTarget.integration.test.d.ts.map +0 -1
  983. package/dist/storyRepository/observers/tests/integration/getGlobalStoryTargets.integration.test.d.ts +0 -2
  984. package/dist/storyRepository/observers/tests/integration/getGlobalStoryTargets.integration.test.d.ts.map +0 -1
  985. package/dist/storyRepository/observers/tests/integration/getStoriesByTargetIds.integration.test.d.ts +0 -2
  986. package/dist/storyRepository/observers/tests/integration/getStoriesByTargetIds.integration.test.d.ts.map +0 -1
  987. package/dist/storyRepository/observers/tests/integration/getStoryByStoryId.integration.test.d.ts +0 -2
  988. package/dist/storyRepository/observers/tests/integration/getStoryByStoryId.integration.test.d.ts.map +0 -1
  989. package/dist/storyRepository/observers/tests/integration/getTargetById.integration.test.d.ts +0 -2
  990. package/dist/storyRepository/observers/tests/integration/getTargetById.integration.test.d.ts.map +0 -1
  991. package/dist/storyRepository/observers/tests/integration/getTargetsByTargetIds.integration.test.d.ts +0 -2
  992. package/dist/storyRepository/observers/tests/integration/getTargetsByTargetIds.integration.test.d.ts.map +0 -1
  993. package/dist/streamRepository/api/tests/createStream.test.d.ts +0 -2
  994. package/dist/streamRepository/api/tests/createStream.test.d.ts.map +0 -1
  995. package/dist/streamRepository/api/tests/deleteStream.test.d.ts +0 -2
  996. package/dist/streamRepository/api/tests/deleteStream.test.d.ts.map +0 -1
  997. package/dist/streamRepository/api/tests/getStream.test.d.ts +0 -2
  998. package/dist/streamRepository/api/tests/getStream.test.d.ts.map +0 -1
  999. package/dist/streamRepository/api/tests/integration/createStream.integration.test.d.ts +0 -2
  1000. package/dist/streamRepository/api/tests/integration/createStream.integration.test.d.ts.map +0 -1
  1001. package/dist/streamRepository/api/tests/integration/deleteStream.integration.test.d.ts +0 -2
  1002. package/dist/streamRepository/api/tests/integration/deleteStream.integration.test.d.ts.map +0 -1
  1003. package/dist/streamRepository/api/tests/integration/disposeStream.integration.test.d.ts +0 -2
  1004. package/dist/streamRepository/api/tests/integration/disposeStream.integration.test.d.ts.map +0 -1
  1005. package/dist/streamRepository/api/tests/integration/editStream.integration.test.d.ts +0 -2
  1006. package/dist/streamRepository/api/tests/integration/editStream.integration.test.d.ts.map +0 -1
  1007. package/dist/streamRepository/api/tests/integration/updateStream.integration.test.d.ts +0 -2
  1008. package/dist/streamRepository/api/tests/integration/updateStream.integration.test.d.ts.map +0 -1
  1009. package/dist/streamRepository/observers/tests/getStreamById.test.d.ts +0 -2
  1010. package/dist/streamRepository/observers/tests/getStreamById.test.d.ts.map +0 -1
  1011. package/dist/streamRepository/observers/tests/integration/getStreamById.integration.test.d.ts +0 -2
  1012. package/dist/streamRepository/observers/tests/integration/getStreamById.integration.test.d.ts.map +0 -1
  1013. package/dist/subChannelRepository/api/tests/createSubChannel.test.d.ts +0 -2
  1014. package/dist/subChannelRepository/api/tests/createSubChannel.test.d.ts.map +0 -1
  1015. package/dist/subChannelRepository/api/tests/deleteSubChannel.test.d.ts +0 -2
  1016. package/dist/subChannelRepository/api/tests/deleteSubChannel.test.d.ts.map +0 -1
  1017. package/dist/subChannelRepository/api/tests/getSubChannel.test.d.ts +0 -2
  1018. package/dist/subChannelRepository/api/tests/getSubChannel.test.d.ts.map +0 -1
  1019. package/dist/subChannelRepository/api/tests/getSubChannels.test.d.ts +0 -2
  1020. package/dist/subChannelRepository/api/tests/getSubChannels.test.d.ts.map +0 -1
  1021. package/dist/subChannelRepository/api/tests/hardDeleteSubChannel.test.d.ts +0 -2
  1022. package/dist/subChannelRepository/api/tests/hardDeleteSubChannel.test.d.ts.map +0 -1
  1023. package/dist/subChannelRepository/api/tests/integration/createSubChannel.integration.test.d.ts +0 -2
  1024. package/dist/subChannelRepository/api/tests/integration/createSubChannel.integration.test.d.ts.map +0 -1
  1025. package/dist/subChannelRepository/api/tests/integration/deleteSubChannel.integration.test.d.ts +0 -2
  1026. package/dist/subChannelRepository/api/tests/integration/deleteSubChannel.integration.test.d.ts.map +0 -1
  1027. package/dist/subChannelRepository/api/tests/integration/getSubChannel.integration.test.d.ts +0 -2
  1028. package/dist/subChannelRepository/api/tests/integration/getSubChannel.integration.test.d.ts.map +0 -1
  1029. package/dist/subChannelRepository/api/tests/integration/getSubChannels.integration.test.d.ts +0 -2
  1030. package/dist/subChannelRepository/api/tests/integration/getSubChannels.integration.test.d.ts.map +0 -1
  1031. package/dist/subChannelRepository/api/tests/integration/hardDeleteSubChannel.integration.test.d.ts +0 -2
  1032. package/dist/subChannelRepository/api/tests/integration/hardDeleteSubChannel.integration.test.d.ts.map +0 -1
  1033. package/dist/subChannelRepository/api/tests/integration/markAsReadBySegment.integration.test.d.ts +0 -2
  1034. package/dist/subChannelRepository/api/tests/integration/markAsReadBySegment.integration.test.d.ts.map +0 -1
  1035. package/dist/subChannelRepository/api/tests/integration/querySubChannels.integration.test.d.ts +0 -2
  1036. package/dist/subChannelRepository/api/tests/integration/querySubChannels.integration.test.d.ts.map +0 -1
  1037. package/dist/subChannelRepository/api/tests/integration/readingAPI.integration.test.d.ts +0 -2
  1038. package/dist/subChannelRepository/api/tests/integration/readingAPI.integration.test.d.ts.map +0 -1
  1039. package/dist/subChannelRepository/api/tests/integration/softDeleteSubChannel.integration.test.d.ts +0 -2
  1040. package/dist/subChannelRepository/api/tests/integration/softDeleteSubChannel.integration.test.d.ts.map +0 -1
  1041. package/dist/subChannelRepository/api/tests/integration/startReadingAPI.integration.test.d.ts +0 -2
  1042. package/dist/subChannelRepository/api/tests/integration/startReadingAPI.integration.test.d.ts.map +0 -1
  1043. package/dist/subChannelRepository/api/tests/integration/stopReadingAPI.integration.test.d.ts +0 -2
  1044. package/dist/subChannelRepository/api/tests/integration/stopReadingAPI.integration.test.d.ts.map +0 -1
  1045. package/dist/subChannelRepository/api/tests/integration/updateSubChannel.integration.test.d.ts +0 -2
  1046. package/dist/subChannelRepository/api/tests/integration/updateSubChannel.integration.test.d.ts.map +0 -1
  1047. package/dist/subChannelRepository/api/tests/softDeleteSubChannel.test.d.ts +0 -2
  1048. package/dist/subChannelRepository/api/tests/softDeleteSubChannel.test.d.ts.map +0 -1
  1049. package/dist/subChannelRepository/api/tests/updateSubChannel.test.d.ts +0 -2
  1050. package/dist/subChannelRepository/api/tests/updateSubChannel.test.d.ts.map +0 -1
  1051. package/dist/subChannelRepository/observers/tests/getSubChannel.test.d.ts +0 -2
  1052. package/dist/subChannelRepository/observers/tests/getSubChannel.test.d.ts.map +0 -1
  1053. package/dist/subChannelRepository/observers/tests/getSubChannelWithMessagePreview.test.d.ts +0 -2
  1054. package/dist/subChannelRepository/observers/tests/getSubChannelWithMessagePreview.test.d.ts.map +0 -1
  1055. package/dist/subChannelRepository/observers/tests/getSubChannels.test.d.ts +0 -2
  1056. package/dist/subChannelRepository/observers/tests/getSubChannels.test.d.ts.map +0 -1
  1057. package/dist/subChannelRepository/observers/tests/getSubChannelsWithMessagePreview.test.d.ts +0 -2
  1058. package/dist/subChannelRepository/observers/tests/getSubChannelsWithMessagePreview.test.d.ts.map +0 -1
  1059. package/dist/subChannelRepository/observers/tests/integrations/getSubChannel.integration.test.d.ts +0 -2
  1060. package/dist/subChannelRepository/observers/tests/integrations/getSubChannel.integration.test.d.ts.map +0 -1
  1061. package/dist/subChannelRepository/observers/tests/integrations/getSubChannels.integration.test.d.ts +0 -2
  1062. package/dist/subChannelRepository/observers/tests/integrations/getSubChannels.integration.test.d.ts.map +0 -1
  1063. package/dist/userRepository/api/tests/flagUser.test.d.ts +0 -2
  1064. package/dist/userRepository/api/tests/flagUser.test.d.ts.map +0 -1
  1065. package/dist/userRepository/api/tests/getUser.test.d.ts +0 -2
  1066. package/dist/userRepository/api/tests/getUser.test.d.ts.map +0 -1
  1067. package/dist/userRepository/api/tests/integration/flagUser.integration.test.d.ts +0 -2
  1068. package/dist/userRepository/api/tests/integration/flagUser.integration.test.d.ts.map +0 -1
  1069. package/dist/userRepository/api/tests/integration/getAllBlockedUsers.integration.test.d.ts +0 -2
  1070. package/dist/userRepository/api/tests/integration/getAllBlockedUsers.integration.test.d.ts.map +0 -1
  1071. package/dist/userRepository/api/tests/integration/getAllBlockingUsers.integration.test.d.ts +0 -2
  1072. package/dist/userRepository/api/tests/integration/getAllBlockingUsers.integration.test.d.ts.map +0 -1
  1073. package/dist/userRepository/api/tests/integration/getUser.integration.test.d.ts +0 -2
  1074. package/dist/userRepository/api/tests/integration/getUser.integration.test.d.ts.map +0 -1
  1075. package/dist/userRepository/api/tests/integration/getUserByIds.integration.test.d.ts +0 -2
  1076. package/dist/userRepository/api/tests/integration/getUserByIds.integration.test.d.ts.map +0 -1
  1077. package/dist/userRepository/api/tests/integration/isUserFlaggedByMe.integration.test.d.ts +0 -2
  1078. package/dist/userRepository/api/tests/integration/isUserFlaggedByMe.integration.test.d.ts.map +0 -1
  1079. package/dist/userRepository/api/tests/integration/queryBlockedUsers.integration.test.d.ts +0 -2
  1080. package/dist/userRepository/api/tests/integration/queryBlockedUsers.integration.test.d.ts.map +0 -1
  1081. package/dist/userRepository/api/tests/integration/queryUsers.integration.test.d.ts +0 -2
  1082. package/dist/userRepository/api/tests/integration/queryUsers.integration.test.d.ts.map +0 -1
  1083. package/dist/userRepository/api/tests/integration/unflagUser.integration.test.d.ts +0 -2
  1084. package/dist/userRepository/api/tests/integration/unflagUser.integration.test.d.ts.map +0 -1
  1085. package/dist/userRepository/api/tests/integration/updateUser.integration.test.d.ts +0 -2
  1086. package/dist/userRepository/api/tests/integration/updateUser.integration.test.d.ts.map +0 -1
  1087. package/dist/userRepository/api/tests/queryBlockedUsers.test.d.ts +0 -2
  1088. package/dist/userRepository/api/tests/queryBlockedUsers.test.d.ts.map +0 -1
  1089. package/dist/userRepository/api/tests/queryUsers.test.d.ts +0 -2
  1090. package/dist/userRepository/api/tests/queryUsers.test.d.ts.map +0 -1
  1091. package/dist/userRepository/api/tests/unflagUser.test.d.ts +0 -2
  1092. package/dist/userRepository/api/tests/unflagUser.test.d.ts.map +0 -1
  1093. package/dist/userRepository/api/tests/updateUser.test.d.ts +0 -2
  1094. package/dist/userRepository/api/tests/updateUser.test.d.ts.map +0 -1
  1095. package/dist/userRepository/observers/tests/getUser.test.d.ts +0 -2
  1096. package/dist/userRepository/observers/tests/getUser.test.d.ts.map +0 -1
  1097. package/dist/userRepository/observers/tests/getUsers.test.d.ts +0 -2
  1098. package/dist/userRepository/observers/tests/getUsers.test.d.ts.map +0 -1
  1099. package/dist/userRepository/observers/tests/integrations/enums.integration.test.d.ts +0 -2
  1100. package/dist/userRepository/observers/tests/integrations/enums.integration.test.d.ts.map +0 -1
  1101. package/dist/userRepository/observers/tests/integrations/getBlockedUsers.integration.test.d.ts +0 -2
  1102. package/dist/userRepository/observers/tests/integrations/getBlockedUsers.integration.test.d.ts.map +0 -1
  1103. package/dist/userRepository/observers/tests/integrations/getBlockingUsers.integration.test.d.ts +0 -2
  1104. package/dist/userRepository/observers/tests/integrations/getBlockingUsers.integration.test.d.ts.map +0 -1
  1105. package/dist/userRepository/observers/tests/integrations/getReachedUsers.integration.test.d.ts +0 -2
  1106. package/dist/userRepository/observers/tests/integrations/getReachedUsers.integration.test.d.ts.map +0 -1
  1107. package/dist/userRepository/observers/tests/integrations/getUser.integration.test.d.ts +0 -2
  1108. package/dist/userRepository/observers/tests/integrations/getUser.integration.test.d.ts.map +0 -1
  1109. package/dist/userRepository/observers/tests/integrations/getUsers.integration.test.d.ts +0 -2
  1110. package/dist/userRepository/observers/tests/integrations/getUsers.integration.test.d.ts.map +0 -1
  1111. package/dist/userRepository/observers/tests/integrations/searchUserByDisplayName.integration.test.d.ts +0 -2
  1112. package/dist/userRepository/observers/tests/integrations/searchUserByDisplayName.integration.test.d.ts.map +0 -1
  1113. package/dist/userRepository/observers/tests/integrations/searchUsers.integration.test.d.ts +0 -2
  1114. package/dist/userRepository/observers/tests/integrations/searchUsers.integration.test.d.ts.map +0 -1
  1115. package/dist/userRepository/observers/tests/searchUserByDisplayName.test.d.ts +0 -2
  1116. package/dist/userRepository/observers/tests/searchUserByDisplayName.test.d.ts.map +0 -1
  1117. package/dist/userRepository/observers/tests/searchUsers.test.d.ts +0 -2
  1118. package/dist/userRepository/observers/tests/searchUsers.test.d.ts.map +0 -1
  1119. package/dist/userRepository/relationship/block/api/tests/blockUser.test.d.ts +0 -2
  1120. package/dist/userRepository/relationship/block/api/tests/blockUser.test.d.ts.map +0 -1
  1121. package/dist/userRepository/relationship/block/api/tests/unBlockUser.test.d.ts +0 -2
  1122. package/dist/userRepository/relationship/block/api/tests/unBlockUser.test.d.ts.map +0 -1
  1123. package/dist/userRepository/relationship/follow/api/tests/getFollowInfo.test.d.ts +0 -2
  1124. package/dist/userRepository/relationship/follow/api/tests/getFollowInfo.test.d.ts.map +0 -1
  1125. package/dist/userRepository/relationship/follow/observers/tests/getFollowInfo.test.d.ts +0 -2
  1126. package/dist/userRepository/relationship/follow/observers/tests/getFollowInfo.test.d.ts.map +0 -1
  1127. package/dist/userRepository/relationship/follow/observers/tests/getFollowers.test.d.ts +0 -2
  1128. package/dist/userRepository/relationship/follow/observers/tests/getFollowers.test.d.ts.map +0 -1
  1129. package/dist/userRepository/relationship/follow/observers/tests/getFollowings.test.d.ts +0 -2
  1130. package/dist/userRepository/relationship/follow/observers/tests/getFollowings.test.d.ts.map +0 -1
  1131. package/dist/userRepository/relationship/follow/observers/tests/getMyFollowInfo.test.d.ts +0 -2
  1132. package/dist/userRepository/relationship/follow/observers/tests/getMyFollowInfo.test.d.ts.map +0 -1
  1133. package/dist/utils/tests/client.d.ts +0 -7
  1134. package/dist/utils/tests/client.d.ts.map +0 -1
  1135. package/dist/utils/tests/dummy/block.d.ts +0 -44
  1136. package/dist/utils/tests/dummy/block.d.ts.map +0 -1
  1137. package/dist/utils/tests/dummy/category.d.ts +0 -71
  1138. package/dist/utils/tests/dummy/category.d.ts.map +0 -1
  1139. package/dist/utils/tests/dummy/channel.d.ts +0 -237
  1140. package/dist/utils/tests/dummy/channel.d.ts.map +0 -1
  1141. package/dist/utils/tests/dummy/comment.d.ts +0 -126
  1142. package/dist/utils/tests/dummy/comment.d.ts.map +0 -1
  1143. package/dist/utils/tests/dummy/community.d.ts +0 -123
  1144. package/dist/utils/tests/dummy/community.d.ts.map +0 -1
  1145. package/dist/utils/tests/dummy/feed.d.ts +0 -5
  1146. package/dist/utils/tests/dummy/feed.d.ts.map +0 -1
  1147. package/dist/utils/tests/dummy/file.d.ts +0 -5
  1148. package/dist/utils/tests/dummy/file.d.ts.map +0 -1
  1149. package/dist/utils/tests/dummy/follow.d.ts +0 -14
  1150. package/dist/utils/tests/dummy/follow.d.ts.map +0 -1
  1151. package/dist/utils/tests/dummy/index.d.ts +0 -24
  1152. package/dist/utils/tests/dummy/index.d.ts.map +0 -1
  1153. package/dist/utils/tests/dummy/marker.d.ts +0 -10
  1154. package/dist/utils/tests/dummy/marker.d.ts.map +0 -1
  1155. package/dist/utils/tests/dummy/member.d.ts +0 -2
  1156. package/dist/utils/tests/dummy/member.d.ts.map +0 -1
  1157. package/dist/utils/tests/dummy/message.d.ts +0 -35
  1158. package/dist/utils/tests/dummy/message.d.ts.map +0 -1
  1159. package/dist/utils/tests/dummy/messagePreviewChannel.d.ts +0 -3
  1160. package/dist/utils/tests/dummy/messagePreviewChannel.d.ts.map +0 -1
  1161. package/dist/utils/tests/dummy/poll.d.ts +0 -3
  1162. package/dist/utils/tests/dummy/poll.d.ts.map +0 -1
  1163. package/dist/utils/tests/dummy/post.d.ts +0 -55
  1164. package/dist/utils/tests/dummy/post.d.ts.map +0 -1
  1165. package/dist/utils/tests/dummy/reaction.d.ts +0 -4
  1166. package/dist/utils/tests/dummy/reaction.d.ts.map +0 -1
  1167. package/dist/utils/tests/dummy/role.d.ts +0 -4
  1168. package/dist/utils/tests/dummy/role.d.ts.map +0 -1
  1169. package/dist/utils/tests/dummy/stream.d.ts +0 -98
  1170. package/dist/utils/tests/dummy/stream.d.ts.map +0 -1
  1171. package/dist/utils/tests/dummy/subChannel.d.ts +0 -33
  1172. package/dist/utils/tests/dummy/subChannel.d.ts.map +0 -1
  1173. package/dist/utils/tests/dummy/token.d.ts +0 -10
  1174. package/dist/utils/tests/dummy/token.d.ts.map +0 -1
  1175. package/dist/utils/tests/dummy/user.d.ts +0 -117
  1176. package/dist/utils/tests/dummy/user.d.ts.map +0 -1
  1177. package/dist/utils/tests/index.d.ts +0 -4
  1178. package/dist/utils/tests/index.d.ts.map +0 -1
  1179. package/dist/utils/tests/inferIsDeleted.test.d.ts +0 -2
  1180. package/dist/utils/tests/inferIsDeleted.test.d.ts.map +0 -1
  1181. package/dist/utils/tests/isEquals.test.d.ts +0 -2
  1182. package/dist/utils/tests/isEquals.test.d.ts.map +0 -1
  1183. package/dist/utils/tests/liveObject.test.d.ts +0 -2
  1184. package/dist/utils/tests/liveObject.test.d.ts.map +0 -1
  1185. package/dist/utils/tests/utils.d.ts +0 -4
  1186. package/dist/utils/tests/utils.d.ts.map +0 -1
package/dist/index.cjs.js CHANGED
@@ -7,8 +7,9 @@ var mitt = require('mitt');
7
7
  var debug = require('debug');
8
8
  var axios = require('axios');
9
9
  var HttpAgent = require('agentkeepalive');
10
- var mqtt = require('mqtt');
11
10
  var uuid$1 = require('react-native-uuid');
11
+ var mqtt = require('mqtt');
12
+ var uaParserJs = require('ua-parser-js');
12
13
  var jwtDecode = require('jwt-decode');
13
14
  var hash = require('object-hash');
14
15
  var Hls = require('hls.js');
@@ -19,8 +20,8 @@ var mitt__default = /*#__PURE__*/_interopDefaultLegacy(mitt);
19
20
  var debug__default = /*#__PURE__*/_interopDefaultLegacy(debug);
20
21
  var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
21
22
  var HttpAgent__default = /*#__PURE__*/_interopDefaultLegacy(HttpAgent);
22
- var mqtt__default = /*#__PURE__*/_interopDefaultLegacy(mqtt);
23
23
  var uuid__default = /*#__PURE__*/_interopDefaultLegacy(uuid$1);
24
+ var mqtt__default = /*#__PURE__*/_interopDefaultLegacy(mqtt);
24
25
  var jwtDecode__default = /*#__PURE__*/_interopDefaultLegacy(jwtDecode);
25
26
  var hash__default = /*#__PURE__*/_interopDefaultLegacy(hash);
26
27
  var Hls__default = /*#__PURE__*/_interopDefaultLegacy(Hls);
@@ -341,6 +342,7 @@ function getVersion() {
341
342
  const VERSION = getVersion();
342
343
 
343
344
  const COLLECTION_DEFAULT_PAGINATION_LIMIT = 5;
345
+ const LATEST_COMMENTS_LIMIT = 5;
344
346
  const COLLECTION_DEFAULT_PAGINATION_SIZE = 20;
345
347
  const COLLECTION_DEFAULT_CACHING_POLICY = 'cache_then_server';
346
348
  const ENABLE_CACHE_MESSAGE = 'For using Live Collection feature you need to enable Cache!';
@@ -356,7 +358,11 @@ const YEAR = 365 * DAY;
356
358
  const ACCESS_TOKEN_WATCHER_INTERVAL = 10 * MINUTE;
357
359
  const API_ENDPOINTS = {
358
360
  forYouFeed: '/api/v1/feeds/for-you',
361
+ commentReviewQueue: (communityId) => `/api/v3/communities/${encodeURIComponent(communityId)}/comments/review-queue`,
359
362
  };
363
+ // The review-queue route defaults to 10, not the SDK-wide page size, and caps at 100
364
+ const COMMENT_REVIEW_QUEUE_DEFAULT_PAGINATION_SIZE = 10;
365
+ const COMMENT_REVIEW_QUEUE_MAX_PAGINATION_SIZE = 100;
360
366
 
361
367
  // cache constants
362
368
  const CACHE_KEY_GET = 'get';
@@ -1953,6 +1959,8 @@ function computeUrl(type, region) {
1953
1959
  return URLS[type].replace('{region}', region);
1954
1960
  }
1955
1961
 
1962
+ const uuid = () => uuid__default["default"].v4().toString();
1963
+
1956
1964
  /**
1957
1965
  * Unwraps v3 server payload (for error handling and type extraction)
1958
1966
  *
@@ -1977,6 +1985,24 @@ const unwrapPayload = (response) => {
1977
1985
  // unjust, but helps force uncast "T | undefined" to allow deconstruction without warnings
1978
1986
  return undefined;
1979
1987
  };
1988
+ /**
1989
+ * Builds a hex string of `bytes` length from the SDK's uuid helper (a v4 UUID is
1990
+ * 16 bytes / 32 hex chars once hyphens are removed) — avoids a new crypto dependency.
1991
+ */
1992
+ const randomHex = (bytes) => {
1993
+ let hex = '';
1994
+ while (hex.length < bytes * 2)
1995
+ hex += uuid().replace(/-/g, '');
1996
+ return hex.slice(0, bytes * 2);
1997
+ };
1998
+ /**
1999
+ * W3C Trace Context `traceparent`: `version-<16-byte trace-id>-<8-byte span-id>-<flags>`.
2000
+ * The SDK is the trace originator, so it mints a fresh trace + span id per request; flags `01` = sampled.
2001
+ *
2002
+ * @category Transport
2003
+ * @hidden
2004
+ */
2005
+ const generateTraceparent = () => `00-${randomHex(16)}-${randomHex(8)}-01`;
1980
2006
 
1981
2007
  class NetworkActivitiesWatcher {
1982
2008
  constructor() {
@@ -2101,6 +2127,10 @@ const createHttpTransport = (endpoint) => {
2101
2127
  });
2102
2128
  instance.defaults.withCredentials = false;
2103
2129
  instance.interceptors.request.use(config => {
2130
+ // Request tracing — set on every outbound request (login included), never persisted.
2131
+ // Must run before the session-url early-return below so /api/v5/sessions carries them too.
2132
+ config.headers.set('x-request-id', uuid());
2133
+ config.headers.set('traceparent', generateTraceparent());
2104
2134
  // do not check expiration for token creation url
2105
2135
  if (config.url === '/api/v5/sessions') {
2106
2136
  return config;
@@ -2144,20 +2174,28 @@ const createHttpTransport = (endpoint) => {
2144
2174
  });
2145
2175
  return response;
2146
2176
  }, error => {
2147
- var _a, _b, _c;
2177
+ var _a, _b, _c, _d;
2148
2178
  const { response } = error;
2149
2179
  // handle unauthorized request
2150
2180
  if ((response === null || response === void 0 ? void 0 : response.data.code) === 400100 /* Amity.ServerError.UNAUTHORIZED */) {
2151
2181
  fireEvent('tokenTerminated', "terminated" /* Amity.SessionStates.TERMINATED */);
2152
2182
  }
2183
+ // handle globally banned user. The realtime `user.didGlobalBan` event can be missed
2184
+ // (e.g. MQTT dropped before delivery), so mirror the 400100 handling above and fire
2185
+ // the same virtual event the login subscriptions already listen to. That terminates
2186
+ // the session with `TokenTerminationReason.GLOBAL_BAN` and notifies `onClientBanned`
2187
+ // consumers, instead of leaving the session `established` with a revoked token.
2188
+ if (((_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.code) === 400312 /* Amity.ServerError.GLOBAL_BAN */) {
2189
+ fireEvent('user.didGlobalBan', { users: [], files: [] });
2190
+ }
2153
2191
  // handle visitor daily usage limit exceeded
2154
- if (((_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.code) === 400323 /* Amity.ServerError.VISITOR_USAGE_LIMIT_EXCEEDED */) {
2192
+ if (((_b = response === null || response === void 0 ? void 0 : response.data) === null || _b === void 0 ? void 0 : _b.code) === 400323 /* Amity.ServerError.VISITOR_USAGE_LIMIT_EXCEEDED */) {
2155
2193
  throttledFireVisitorUsageLimit();
2156
2194
  throw new ASCError('Visitor usage limit exceeded', 400323 /* Amity.ServerError.VISITOR_USAGE_LIMIT_EXCEEDED */, "error" /* Amity.ErrorLevel.ERROR */);
2157
2195
  }
2158
2196
  // if it's an error with status in the response payload,
2159
2197
  // then it's an expected error.
2160
- if ((_b = response === null || response === void 0 ? void 0 : response.data) === null || _b === void 0 ? void 0 : _b.status) {
2198
+ if ((_c = response === null || response === void 0 ? void 0 : response.data) === null || _c === void 0 ? void 0 : _c.status) {
2161
2199
  unwrapPayload(response === null || response === void 0 ? void 0 : response.data);
2162
2200
  }
2163
2201
  // as on request cancellation error is returned
@@ -2165,7 +2203,7 @@ const createHttpTransport = (endpoint) => {
2165
2203
  throw error;
2166
2204
  }
2167
2205
  // unexpected error.
2168
- throw new Error((_c = response === null || response === void 0 ? void 0 : response.data) !== null && _c !== void 0 ? _c : error);
2206
+ throw new Error((_d = response === null || response === void 0 ? void 0 : response.data) !== null && _d !== void 0 ? _d : error);
2169
2207
  });
2170
2208
  instance.defaults.paramsSerializer = {
2171
2209
  encode: params => encodeURIComponent(params),
@@ -2363,8 +2401,6 @@ const getItem = async (key) => {
2363
2401
  });
2364
2402
  };
2365
2403
 
2366
- const uuid = () => uuid__default["default"].v4().toString();
2367
-
2368
2404
  // TODO: find a way to uniquely identify the device
2369
2405
  let tabIndex = 0;
2370
2406
  // This logic is running on browser only
@@ -2424,22 +2460,60 @@ const getMQTTClientId = async (userId) => {
2424
2460
  };
2425
2461
  /** @hidden */
2426
2462
  const getDeviceModel = () => {
2427
- var _a, _b;
2463
+ var _a;
2428
2464
  if ((_a = safeProcess.versions) === null || _a === void 0 ? void 0 : _a.node)
2429
2465
  return safeProcess.versions.node;
2430
- if (navigator)
2431
- return `${navigator.product.toLowerCase()}#${(_b = navigator.userAgent) !== null && _b !== void 0 ? _b : 'unknown_agent'}`;
2432
- return 'unknown_model';
2466
+ return undefined;
2467
+ };
2468
+ const hasNavigator = () => typeof navigator !== 'undefined' && !!navigator;
2469
+ const getLocale = () => (hasNavigator() ? navigator.language : undefined);
2470
+ const getTimezone = () => {
2471
+ try {
2472
+ return Intl.DateTimeFormat().resolvedOptions().timeZone;
2473
+ }
2474
+ catch (_a) {
2475
+ return undefined;
2476
+ }
2477
+ };
2478
+ const getNetworkType = () => {
2479
+ var _a;
2480
+ if (!hasNavigator())
2481
+ return undefined;
2482
+ return (_a = navigator.connection) === null || _a === void 0 ? void 0 : _a.effectiveType;
2483
+ };
2484
+ const isNode = () => { var _a; return !!((_a = safeProcess.versions) === null || _a === void 0 ? void 0 : _a.node); };
2485
+ const parseUserAgent = () => {
2486
+ if (!hasNavigator() || !navigator.userAgent)
2487
+ return {};
2488
+ const { os, browser, device } = new uaParserJs.UAParser(navigator.userAgent).getResult();
2489
+ const result = {};
2490
+ if (os.name)
2491
+ result.osName = os.name;
2492
+ if (os.version)
2493
+ result.osVersion = os.version;
2494
+ if (browser.name)
2495
+ result.browserName = browser.name;
2496
+ if (browser.version)
2497
+ result.browserVersion = browser.version;
2498
+ if (device.type === 'tablet')
2499
+ result.deviceType = 'tablet';
2500
+ else if (device.type === 'mobile')
2501
+ result.deviceType = 'mobile';
2502
+ else
2503
+ result.deviceType = 'desktop';
2504
+ return result;
2433
2505
  };
2434
2506
  /** @hidden */
2435
2507
  const getDeviceInfo = () => {
2436
- const model = getDeviceModel();
2437
- return {
2438
- // TODO: replace with: kind: process.versions ? 'node' : 'web', when backend has fixed this
2439
- kind: 'web',
2440
- model,
2441
- sdkVersion: VERSION,
2442
- };
2508
+ var _a;
2509
+ let client;
2510
+ try {
2511
+ client = getActiveClient();
2512
+ }
2513
+ catch (_b) {
2514
+ client = undefined;
2515
+ }
2516
+ return Object.assign({ kind: isNode() ? 'node' : 'web', model: getDeviceModel(), sdkVersion: VERSION, product: (_a = client === null || client === void 0 ? void 0 : client.product) !== null && _a !== void 0 ? _a : 'sdk', uikitVersion: client === null || client === void 0 ? void 0 : client.uikitVersion, appId: client === null || client === void 0 ? void 0 : client.appId, appVersion: client === null || client === void 0 ? void 0 : client.appVersion, locale: getLocale(), timezone: getTimezone(), networkType: getNetworkType() }, parseUserAgent());
2443
2517
  };
2444
2518
 
2445
2519
  /* eslint-disable no-console */
@@ -3848,6 +3922,95 @@ const prepareChannelPayload = async (rawPayload, options = { isMessagePreviewUpd
3848
3922
  channelUsers });
3849
3923
  };
3850
3924
 
3925
+ const channelCacheKey = (channel) => [
3926
+ 'channel',
3927
+ 'get',
3928
+ getResolver('channel')(channel),
3929
+ ];
3930
+ /**
3931
+ * Find a cached channel by any of its ids (internal, public, or `channelId`).
3932
+ *
3933
+ * The channel cache is keyed by the channel internal id (see `idResolvers.channel`), but
3934
+ * realtime payloads reference channels by different ids: pin events carry the **public**
3935
+ * id, messages carry `channelId`. Try the cheap direct lookup first, then scan.
3936
+ */
3937
+ const findCachedChannelByAnyId = (id) => {
3938
+ var _a, _b, _c;
3939
+ if (!id)
3940
+ return undefined;
3941
+ const direct = (_a = pullFromCache(['channel', 'get', id])) === null || _a === void 0 ? void 0 : _a.data;
3942
+ if (direct)
3943
+ return direct;
3944
+ return (_c = (_b = queryCache(['channel', 'get'])) === null || _b === void 0 ? void 0 : _b.find(({ data }) => data.channelInternalId === id || data.channelPublicId === id || data.channelId === id)) === null || _c === void 0 ? void 0 : _c.data;
3945
+ };
3946
+ /**
3947
+ * Resolve the cached channel a `channel.messagePinned` / `channel.messageUnpinned` event
3948
+ * refers to. `data.channelId` is the channel public id; a pinned message body (present on
3949
+ * `messagePinned` only) also carries the internal id, which is the direct cache key.
3950
+ */
3951
+ const findCachedChannelForPin = (payload) => {
3952
+ var _a, _b;
3953
+ return (_b = findCachedChannelByAnyId((_a = payload.pinnedMessage) === null || _a === void 0 ? void 0 : _a.channelId)) !== null && _b !== void 0 ? _b : findCachedChannelByAnyId(payload.channelId);
3954
+ };
3955
+ /**
3956
+ * Write a new pin snapshot (or `null` to clear) on a cached channel and ingest any
3957
+ * users delivered with it (the pin author and the message author), so the banner can
3958
+ * render a byline without a second fetch.
3959
+ *
3960
+ * Every `messagePinned` payload is a full snapshot — "this is the pin now" — so the last
3961
+ * one received always wins; there is no merging with the previous pin.
3962
+ */
3963
+ const updatePinnedMessageCache = (channel, pinnedMessage, users) => {
3964
+ if (users && users.length > 0) {
3965
+ ingestInCache({ users: users.map(convertRawUserToInternalUser) });
3966
+ }
3967
+ const updated = Object.assign(Object.assign({}, channel), { pinnedMessage });
3968
+ pushToCache(channelCacheKey(channel), updated);
3969
+ return updated;
3970
+ };
3971
+
3972
+ /**
3973
+ * Applies a `channel.roleAdded` / `channel.roleRemoved` realtime payload to the cache.
3974
+ *
3975
+ * The event names every member the role request affected together with the
3976
+ * roles and channel-scoped permissions each of them is left holding. That is a
3977
+ * full state, not a delta, so it is written straight over the cached membership.
3978
+ *
3979
+ * Members the SDK has not fetched yet are skipped: the payload does not carry
3980
+ * enough to build a full {@link Amity.Membership} and the live collections only
3981
+ * emit rows that already exist in cache.
3982
+ *
3983
+ * @param payload the `data` of the realtime event
3984
+ * @returns the refreshed channel (when resolvable) and the updated cached memberships
3985
+ *
3986
+ * @hidden
3987
+ */
3988
+ const applyChannelRolePayload = (payload) => {
3989
+ var _a, _b, _c;
3990
+ const { channelId, users = [], channels = [] } = payload;
3991
+ const rawChannel = (_a = channels.find(channel => channel.channelId === channelId)) !== null && _a !== void 0 ? _a : channels[0];
3992
+ let channel;
3993
+ if (rawChannel) {
3994
+ const channelKey = ['channel', 'get', getResolver('channel')(rawChannel)];
3995
+ // the role event does not touch message previews, keep whatever preview is cached
3996
+ const converted = convertFromRaw(rawChannel, { isMessagePreviewUpdated: false });
3997
+ upsertInCache(channelKey, converted);
3998
+ channel = (_c = (_b = pullFromCache(channelKey)) === null || _b === void 0 ? void 0 : _b.data) !== null && _c !== void 0 ? _c : converted;
3999
+ }
4000
+ const members = [];
4001
+ users.forEach(({ userId, roles, permissions }) => {
4002
+ var _a, _b, _c;
4003
+ const memberKey = ['channelUsers', 'get', getResolver('channelUsers')({ channelId, userId })];
4004
+ const cached = (_a = pullFromCache(memberKey)) === null || _a === void 0 ? void 0 : _a.data;
4005
+ if (!cached)
4006
+ return;
4007
+ const updated = Object.assign(Object.assign({}, cached), { roles, permissions });
4008
+ pushToCache(memberKey, updated);
4009
+ members.push((_c = (_b = pullFromCache(memberKey)) === null || _b === void 0 ? void 0 : _b.data) !== null && _c !== void 0 ? _c : updated);
4010
+ });
4011
+ return { channel, members };
4012
+ };
4013
+
3851
4014
  /**
3852
4015
  * ```js
3853
4016
  * import { getSubChannelMarkers } from '@amityco/ts-sdk'
@@ -4033,32 +4196,6 @@ const channelMemberLinkedObject = (channelMember) => {
4033
4196
  } });
4034
4197
  };
4035
4198
 
4036
- /**
4037
- *
4038
- * get current user's membership data
4039
- *
4040
- * @returns the {@link Amity.Membership<'channel'>} objects
4041
- *
4042
- * @category Channel API
4043
- * @async
4044
- */
4045
- const getMyMembership$1 = (channelId) => {
4046
- const client = getActiveClient();
4047
- client.log('channel/getMyMembership.locally');
4048
- const cacheChannelUser = pullFromCache([
4049
- 'channelUsers',
4050
- 'get',
4051
- `${channelId}#${client.userId}`,
4052
- ]);
4053
- if (!cacheChannelUser) {
4054
- throw new ASCApiError('Item not found!', 400400 /* Amity.ServerError.ITEM_NOT_FOUND */, "error" /* Amity.ErrorLevel.ERROR */);
4055
- }
4056
- return {
4057
- data: cacheChannelUser.data,
4058
- cachedAt: cacheChannelUser.cachedAt,
4059
- };
4060
- };
4061
-
4062
4199
  /**
4063
4200
  * ```js
4064
4201
  * import { isEqual } from '~/utils/isEqual'
@@ -4129,55 +4266,81 @@ function isEqual(x, y) {
4129
4266
  }));
4130
4267
  }
4131
4268
 
4132
- const callbacks$c = [];
4269
+ /**
4270
+ *
4271
+ * get current user's membership data
4272
+ *
4273
+ * @returns the {@link Amity.Membership<'channel'>} objects
4274
+ *
4275
+ * @category Channel API
4276
+ * @async
4277
+ */
4278
+ const getMyMembership$1 = (channelId) => {
4279
+ const client = getActiveClient();
4280
+ client.log('channel/getMyMembership.locally');
4281
+ const cacheChannelUser = pullFromCache([
4282
+ 'channelUsers',
4283
+ 'get',
4284
+ `${channelId}#${client.userId}`,
4285
+ ]);
4286
+ if (!cacheChannelUser) {
4287
+ throw new ASCApiError('Item not found!', 400400 /* Amity.ServerError.ITEM_NOT_FOUND */, "error" /* Amity.ErrorLevel.ERROR */);
4288
+ }
4289
+ return {
4290
+ data: cacheChannelUser.data,
4291
+ cachedAt: cacheChannelUser.cachedAt,
4292
+ };
4293
+ };
4294
+
4295
+ const callbacks$e = [];
4133
4296
  let mainDisposer$b = null;
4134
- const dispose$c = (cb) => {
4135
- const index = callbacks$c.indexOf(cb);
4297
+ const dispose$e = (cb) => {
4298
+ const index = callbacks$e.indexOf(cb);
4136
4299
  if (index > -1) {
4137
- callbacks$c.splice(index, 1);
4300
+ callbacks$e.splice(index, 1);
4138
4301
  }
4139
- if (callbacks$c.length === 0) {
4302
+ if (callbacks$e.length === 0) {
4140
4303
  mainDisposer$b === null || mainDisposer$b === void 0 ? void 0 : mainDisposer$b();
4141
4304
  }
4142
4305
  };
4143
4306
  const onChannelCreated = (callback) => {
4144
- if (callbacks$c.length === 0) {
4307
+ if (callbacks$e.length === 0) {
4145
4308
  const client = getActiveClient();
4146
4309
  const filter = async (payload) => {
4147
4310
  const data = await prepareChannelPayload(payload);
4148
4311
  ingestInCache(data);
4149
- callbacks$c.forEach(cb => cb(data.channels[0]));
4312
+ callbacks$e.forEach(cb => cb(data.channels[0]));
4150
4313
  };
4151
4314
  mainDisposer$b = createEventSubscriber(client, 'onChannelCreated', 'channel.created', filter);
4152
4315
  }
4153
- callbacks$c.push(callback);
4154
- return () => dispose$c(callback);
4316
+ callbacks$e.push(callback);
4317
+ return () => dispose$e(callback);
4155
4318
  };
4156
4319
 
4157
- const callbacks$b = [];
4158
- const mainDisposers = [];
4159
- const dispose$b = (cb) => {
4160
- const index = callbacks$b.indexOf(cb);
4320
+ const callbacks$d = [];
4321
+ const mainDisposers$2 = [];
4322
+ const dispose$d = (cb) => {
4323
+ const index = callbacks$d.indexOf(cb);
4161
4324
  if (index > -1) {
4162
- callbacks$b.splice(index, 1);
4325
+ callbacks$d.splice(index, 1);
4163
4326
  }
4164
- if (callbacks$b.length === 0) {
4165
- mainDisposers.forEach(fn => fn());
4327
+ if (callbacks$d.length === 0) {
4328
+ mainDisposers$2.forEach(fn => fn());
4166
4329
  }
4167
4330
  };
4168
4331
  const onChannelUpdated = (callback) => {
4169
4332
  const client = getActiveClient();
4170
- if (callbacks$b.length === 0) {
4333
+ if (callbacks$d.length === 0) {
4171
4334
  const filter = async (payload) => {
4172
4335
  const data = await prepareChannelPayload(payload);
4173
4336
  ingestInCache(data);
4174
- callbacks$b.forEach(cb => cb(data.channels[0]));
4337
+ callbacks$d.forEach(cb => cb(data.channels[0]));
4175
4338
  };
4176
- mainDisposers.push(createEventSubscriber(client, 'onChannelUpdated', 'channel.updated', filter));
4177
- mainDisposers.push(createEventSubscriber(client, 'onChannelUpdated', 'local.channel.updated', payload => callbacks$b.forEach(cb => cb(payload.channels[0]))));
4339
+ mainDisposers$2.push(createEventSubscriber(client, 'onChannelUpdated', 'channel.updated', filter));
4340
+ mainDisposers$2.push(createEventSubscriber(client, 'onChannelUpdated', 'local.channel.updated', payload => callbacks$d.forEach(cb => cb(payload.channels[0]))));
4178
4341
  }
4179
- callbacks$b.push(callback);
4180
- return () => dispose$b(callback);
4342
+ callbacks$d.push(callback);
4343
+ return () => dispose$d(callback);
4181
4344
  };
4182
4345
 
4183
4346
  const addFlagIsDeletedSubChannelUnreadByChannelId = (channelId) => {
@@ -4200,19 +4363,19 @@ const deleteChannelUnreadByChannelId = (channelId) => {
4200
4363
  }
4201
4364
  };
4202
4365
 
4203
- const callbacks$a = [];
4366
+ const callbacks$c = [];
4204
4367
  let mainDisposer$a = null;
4205
- const dispose$a = (cb) => {
4206
- const index = callbacks$a.indexOf(cb);
4368
+ const dispose$c = (cb) => {
4369
+ const index = callbacks$c.indexOf(cb);
4207
4370
  if (index > -1) {
4208
- callbacks$a.splice(index, 1);
4371
+ callbacks$c.splice(index, 1);
4209
4372
  }
4210
- if (callbacks$a.length === 0) {
4373
+ if (callbacks$c.length === 0) {
4211
4374
  mainDisposer$a === null || mainDisposer$a === void 0 ? void 0 : mainDisposer$a();
4212
4375
  }
4213
4376
  };
4214
4377
  const onChannelDeleted = (callback) => {
4215
- if (callbacks$a.length === 0) {
4378
+ if (callbacks$c.length === 0) {
4216
4379
  const client = getActiveClient();
4217
4380
  const filter = async (payload) => {
4218
4381
  const data = await prepareChannelPayload(payload);
@@ -4232,53 +4395,53 @@ const onChannelDeleted = (callback) => {
4232
4395
  }
4233
4396
  });
4234
4397
  ingestInCache(data);
4235
- callbacks$a.forEach(cb => cb(data.channels[0]));
4398
+ callbacks$c.forEach(cb => cb(data.channels[0]));
4236
4399
  };
4237
4400
  mainDisposer$a = createEventSubscriber(client, 'onChannelDeleted', 'channel.deleted', filter);
4238
4401
  }
4239
- callbacks$a.push(callback);
4240
- return () => dispose$a(callback);
4402
+ callbacks$c.push(callback);
4403
+ return () => dispose$c(callback);
4241
4404
  };
4242
4405
 
4243
- const callbacks$9 = [];
4406
+ const callbacks$b = [];
4244
4407
  let mainDisposer$9 = null;
4245
- const dispose$9 = (cb) => {
4246
- const index = callbacks$9.indexOf(cb);
4408
+ const dispose$b = (cb) => {
4409
+ const index = callbacks$b.indexOf(cb);
4247
4410
  if (index > -1) {
4248
- callbacks$9.splice(index, 1);
4411
+ callbacks$b.splice(index, 1);
4249
4412
  }
4250
- if (callbacks$9.length === 0) {
4413
+ if (callbacks$b.length === 0) {
4251
4414
  mainDisposer$9 === null || mainDisposer$9 === void 0 ? void 0 : mainDisposer$9();
4252
4415
  }
4253
4416
  };
4254
4417
  const onChannelJoined = (callback) => {
4255
- if (callbacks$9.length === 0) {
4418
+ if (callbacks$b.length === 0) {
4256
4419
  const client = getActiveClient();
4257
4420
  const filter = async (payload) => {
4258
4421
  const preparedPayload = await prepareChannelPayload(payload);
4259
4422
  const { channels, channelUsers } = preparedPayload;
4260
4423
  ingestInCache(preparedPayload);
4261
- callbacks$9.forEach(cb => cb(channels[0], channelUsers[0]));
4424
+ callbacks$b.forEach(cb => cb(channels[0], channelUsers[0]));
4262
4425
  };
4263
4426
  mainDisposer$9 = createEventSubscriber(client, 'onChannelJoined', 'channel.joined', filter);
4264
4427
  }
4265
- callbacks$9.push(callback);
4266
- return () => dispose$9(callback);
4428
+ callbacks$b.push(callback);
4429
+ return () => dispose$b(callback);
4267
4430
  };
4268
4431
 
4269
- const callbacks$8 = [];
4432
+ const callbacks$a = [];
4270
4433
  let mainDisposer$8 = null;
4271
- const dispose$8 = (cb) => {
4272
- const index = callbacks$8.indexOf(cb);
4434
+ const dispose$a = (cb) => {
4435
+ const index = callbacks$a.indexOf(cb);
4273
4436
  if (index > -1) {
4274
- callbacks$8.splice(index, 1);
4437
+ callbacks$a.splice(index, 1);
4275
4438
  }
4276
- if (callbacks$8.length === 0) {
4439
+ if (callbacks$a.length === 0) {
4277
4440
  mainDisposer$8 === null || mainDisposer$8 === void 0 ? void 0 : mainDisposer$8();
4278
4441
  }
4279
4442
  };
4280
4443
  const onChannelLeft = (callback) => {
4281
- if (callbacks$8.length === 0) {
4444
+ if (callbacks$a.length === 0) {
4282
4445
  const client = getActiveClient();
4283
4446
  const filter = async (payload) => {
4284
4447
  const { userId } = getActiveClient();
@@ -4302,27 +4465,27 @@ const onChannelLeft = (callback) => {
4302
4465
  }
4303
4466
  const { channels, channelUsers } = preparedPayload;
4304
4467
  ingestInCache(preparedPayload);
4305
- callbacks$8.forEach(cb => cb(channels[0], channelUsers[0]));
4468
+ callbacks$a.forEach(cb => cb(channels[0], channelUsers[0]));
4306
4469
  };
4307
4470
  mainDisposer$8 = createEventSubscriber(client, 'onChannelLeft', 'channel.left', filter);
4308
4471
  }
4309
- callbacks$8.push(callback);
4310
- return () => dispose$8(callback);
4472
+ callbacks$a.push(callback);
4473
+ return () => dispose$a(callback);
4311
4474
  };
4312
4475
 
4313
- const callbacks$7 = [];
4476
+ const callbacks$9 = [];
4314
4477
  let mainDisposer$7 = null;
4315
- const dispose$7 = (cb) => {
4316
- const index = callbacks$7.indexOf(cb);
4478
+ const dispose$9 = (cb) => {
4479
+ const index = callbacks$9.indexOf(cb);
4317
4480
  if (index > -1) {
4318
- callbacks$7.splice(index, 1);
4481
+ callbacks$9.splice(index, 1);
4319
4482
  }
4320
- if (callbacks$7.length === 0) {
4483
+ if (callbacks$9.length === 0) {
4321
4484
  mainDisposer$7 === null || mainDisposer$7 === void 0 ? void 0 : mainDisposer$7();
4322
4485
  }
4323
4486
  };
4324
4487
  const onChannelSetMuted = (callback) => {
4325
- if (callbacks$7.length === 0) {
4488
+ if (callbacks$9.length === 0) {
4326
4489
  const client = getActiveClient();
4327
4490
  const filter = async (payload) => {
4328
4491
  var _a;
@@ -4337,24 +4500,124 @@ const onChannelSetMuted = (callback) => {
4337
4500
  payload.channelId,
4338
4501
  ])) === null || _a === void 0 ? void 0 : _a.data;
4339
4502
  if (channel) {
4340
- callbacks$7.forEach(cb => cb(channel));
4503
+ callbacks$9.forEach(cb => cb(channel));
4341
4504
  }
4342
4505
  };
4343
4506
  mainDisposer$7 = createEventSubscriber(client, 'onChannelMute', 'channel.setMuted', filter);
4344
4507
  }
4508
+ callbacks$9.push(callback);
4509
+ return () => dispose$9(callback);
4510
+ };
4511
+
4512
+ const callbacks$8 = [];
4513
+ let mainDisposer$6 = null;
4514
+ const dispose$8 = (cb) => {
4515
+ const index = callbacks$8.indexOf(cb);
4516
+ if (index > -1) {
4517
+ callbacks$8.splice(index, 1);
4518
+ }
4519
+ if (callbacks$8.length === 0) {
4520
+ mainDisposer$6 === null || mainDisposer$6 === void 0 ? void 0 : mainDisposer$6();
4521
+ }
4522
+ };
4523
+ /* begin_public_function
4524
+ id: channel.event.message_pinned
4525
+ */
4526
+ /**
4527
+ * ```js
4528
+ * import { onChannelMessagePinned } from '@amityco/ts-sdk'
4529
+ * const dispose = onChannelMessagePinned(channel => {
4530
+ * // channel.pinnedMessage is the new pin
4531
+ * })
4532
+ * ```
4533
+ *
4534
+ * Fired when a message is pinned in a channel (the `channel.messagePinned` realtime
4535
+ * event). Pinning a different message while one is already pinned emits a single
4536
+ * `messagePinned` carrying the replacement — treat every payload as a full snapshot.
4537
+ *
4538
+ * The updated channel is written to cache before the callback runs, so
4539
+ * `ChannelRepository.getChannel` observers see `channel.pinnedMessage` change.
4540
+ *
4541
+ * @param callback The function to call when the event was fired
4542
+ * @returns an {@link Amity.Unsubscriber} function to run when willing to stop listening
4543
+ *
4544
+ * @category Channel Events
4545
+ */
4546
+ const onChannelMessagePinned = (callback) => {
4547
+ if (callbacks$8.length === 0) {
4548
+ const client = getActiveClient();
4549
+ const filter = (payload) => {
4550
+ var _a;
4551
+ const channel = findCachedChannelForPin(payload);
4552
+ if (!channel)
4553
+ return;
4554
+ const updated = updatePinnedMessageCache(channel, (_a = payload.pinnedMessage) !== null && _a !== void 0 ? _a : null, payload.users);
4555
+ callbacks$8.forEach(cb => cb(updated));
4556
+ };
4557
+ mainDisposer$6 = createEventSubscriber(client, 'onChannelMessagePinned', 'channel.messagePinned', filter);
4558
+ }
4559
+ callbacks$8.push(callback);
4560
+ return () => dispose$8(callback);
4561
+ };
4562
+ /* end_public_function */
4563
+
4564
+ const callbacks$7 = [];
4565
+ let mainDisposer$5 = null;
4566
+ const dispose$7 = (cb) => {
4567
+ const index = callbacks$7.indexOf(cb);
4568
+ if (index > -1) {
4569
+ callbacks$7.splice(index, 1);
4570
+ }
4571
+ if (callbacks$7.length === 0) {
4572
+ mainDisposer$5 === null || mainDisposer$5 === void 0 ? void 0 : mainDisposer$5();
4573
+ }
4574
+ };
4575
+ /* begin_public_function
4576
+ id: channel.event.message_unpinned
4577
+ */
4578
+ /**
4579
+ * ```js
4580
+ * import { onChannelMessageUnpinned } from '@amityco/ts-sdk'
4581
+ * const dispose = onChannelMessageUnpinned(channel => {
4582
+ * // channel.pinnedMessage is now null
4583
+ * })
4584
+ * ```
4585
+ *
4586
+ * Fired when a channel's pinned message is removed (the `channel.messageUnpinned`
4587
+ * realtime event) — either by an explicit unpin or automatically by the server when the
4588
+ * pinned message is deleted or its author is banned from the channel / globally.
4589
+ *
4590
+ * @param callback The function to call when the event was fired
4591
+ * @returns an {@link Amity.Unsubscriber} function to run when willing to stop listening
4592
+ *
4593
+ * @category Channel Events
4594
+ */
4595
+ const onChannelMessageUnpinned = (callback) => {
4596
+ if (callbacks$7.length === 0) {
4597
+ const client = getActiveClient();
4598
+ const filter = (payload) => {
4599
+ const channel = findCachedChannelForPin(payload);
4600
+ if (!channel)
4601
+ return;
4602
+ const updated = updatePinnedMessageCache(channel, null);
4603
+ callbacks$7.forEach(cb => cb(updated));
4604
+ };
4605
+ mainDisposer$5 = createEventSubscriber(client, 'onChannelMessageUnpinned', 'channel.messageUnpinned', filter);
4606
+ }
4345
4607
  callbacks$7.push(callback);
4346
4608
  return () => dispose$7(callback);
4347
4609
  };
4610
+ /* end_public_function */
4348
4611
 
4349
4612
  const callbacks$6 = [];
4350
- let mainDisposer$6 = null;
4613
+ let mainDisposer$4 = null;
4351
4614
  const dispose$6 = (cb) => {
4352
4615
  const index = callbacks$6.indexOf(cb);
4353
4616
  if (index > -1) {
4354
4617
  callbacks$6.splice(index, 1);
4355
4618
  }
4356
4619
  if (callbacks$6.length === 0) {
4357
- mainDisposer$6 === null || mainDisposer$6 === void 0 ? void 0 : mainDisposer$6();
4620
+ mainDisposer$4 === null || mainDisposer$4 === void 0 ? void 0 : mainDisposer$4();
4358
4621
  }
4359
4622
  };
4360
4623
  const onChannelMemberAdded = (callback) => {
@@ -4366,21 +4629,21 @@ const onChannelMemberAdded = (callback) => {
4366
4629
  ingestInCache(preparedPayload);
4367
4630
  callbacks$6.forEach(cb => cb(channels[0], channelUsers.find(cu => cu.membership === 'member')));
4368
4631
  };
4369
- mainDisposer$6 = createEventSubscriber(client, 'onChannelMemberAdded', 'channel.membersAdded', filter);
4632
+ mainDisposer$4 = createEventSubscriber(client, 'onChannelMemberAdded', 'channel.membersAdded', filter);
4370
4633
  }
4371
4634
  callbacks$6.push(callback);
4372
4635
  return () => dispose$6(callback);
4373
4636
  };
4374
4637
 
4375
4638
  const callbacks$5 = [];
4376
- let mainDisposer$5 = null;
4639
+ let mainDisposer$3 = null;
4377
4640
  const dispose$5 = (cb) => {
4378
4641
  const index = callbacks$5.indexOf(cb);
4379
4642
  if (index > -1) {
4380
4643
  callbacks$5.splice(index, 1);
4381
4644
  }
4382
4645
  if (callbacks$5.length === 0) {
4383
- mainDisposer$5 === null || mainDisposer$5 === void 0 ? void 0 : mainDisposer$5();
4646
+ mainDisposer$3 === null || mainDisposer$3 === void 0 ? void 0 : mainDisposer$3();
4384
4647
  }
4385
4648
  };
4386
4649
  const onChannelMemberRemoved = (callback) => {
@@ -4392,21 +4655,21 @@ const onChannelMemberRemoved = (callback) => {
4392
4655
  ingestInCache(preparedPayload);
4393
4656
  callbacks$5.forEach(cb => cb(channels[0], channelUsers[0]));
4394
4657
  };
4395
- mainDisposer$5 = createEventSubscriber(client, 'onChannelMemberRemoved', 'channel.membersRemoved', filter);
4658
+ mainDisposer$3 = createEventSubscriber(client, 'onChannelMemberRemoved', 'channel.membersRemoved', filter);
4396
4659
  }
4397
4660
  callbacks$5.push(callback);
4398
4661
  return () => dispose$5(callback);
4399
4662
  };
4400
4663
 
4401
4664
  const callbacks$4 = [];
4402
- let mainDisposer$4 = null;
4665
+ let mainDisposer$2 = null;
4403
4666
  const dispose$4 = (cb) => {
4404
4667
  const index = callbacks$4.indexOf(cb);
4405
4668
  if (index > -1) {
4406
4669
  callbacks$4.splice(index, 1);
4407
4670
  }
4408
4671
  if (callbacks$4.length === 0) {
4409
- mainDisposer$4 === null || mainDisposer$4 === void 0 ? void 0 : mainDisposer$4();
4672
+ mainDisposer$2 === null || mainDisposer$2 === void 0 ? void 0 : mainDisposer$2();
4410
4673
  }
4411
4674
  };
4412
4675
  const onChannelMemberBanned = (callback) => {
@@ -4426,20 +4689,20 @@ const onChannelMemberBanned = (callback) => {
4426
4689
  ingestInCache(preparedPayload);
4427
4690
  callbacks$4.forEach(cb => cb(channels[0], channelUsers.find(cu => cu.membership === 'banned')));
4428
4691
  };
4429
- mainDisposer$4 = createEventSubscriber(client, 'onChannelMemberBanned', 'channel.banned', filter);
4692
+ mainDisposer$2 = createEventSubscriber(client, 'onChannelMemberBanned', 'channel.banned', filter);
4430
4693
  callbacks$4.push(callback);
4431
4694
  return () => dispose$4(callback);
4432
4695
  };
4433
4696
 
4434
4697
  const callbacks$3 = [];
4435
- let mainDisposer$3 = null;
4698
+ let mainDisposer$1 = null;
4436
4699
  const dispose$3 = (cb) => {
4437
4700
  const index = callbacks$3.indexOf(cb);
4438
4701
  if (index > -1) {
4439
4702
  callbacks$3.splice(index, 1);
4440
4703
  }
4441
4704
  if (callbacks$3.length === 0) {
4442
- mainDisposer$3 === null || mainDisposer$3 === void 0 ? void 0 : mainDisposer$3();
4705
+ mainDisposer$1 === null || mainDisposer$1 === void 0 ? void 0 : mainDisposer$1();
4443
4706
  }
4444
4707
  };
4445
4708
  const onChannelMemberUnbanned = (callback) => {
@@ -4451,59 +4714,127 @@ const onChannelMemberUnbanned = (callback) => {
4451
4714
  ingestInCache(preparedPayload);
4452
4715
  callbacks$3.forEach(cb => cb(channels[0], channelUsers.find(cu => cu.membership === 'none')));
4453
4716
  };
4454
- mainDisposer$3 = createEventSubscriber(client, 'onChannelMemberUnbanned', 'channel.unbanned', filter);
4717
+ mainDisposer$1 = createEventSubscriber(client, 'onChannelMemberUnbanned', 'channel.unbanned', filter);
4455
4718
  }
4456
4719
  callbacks$3.push(callback);
4457
4720
  return () => dispose$3(callback);
4458
4721
  };
4459
4722
 
4460
4723
  const callbacks$2 = [];
4461
- let mainDisposer$2 = null;
4724
+ const mainDisposers$1 = [];
4462
4725
  const dispose$2 = (cb) => {
4463
4726
  const index = callbacks$2.indexOf(cb);
4464
4727
  if (index > -1) {
4465
4728
  callbacks$2.splice(index, 1);
4466
4729
  }
4467
4730
  if (callbacks$2.length === 0) {
4468
- mainDisposer$2 === null || mainDisposer$2 === void 0 ? void 0 : mainDisposer$2();
4731
+ mainDisposers$1.forEach(fn => fn());
4732
+ mainDisposers$1.length = 0;
4469
4733
  }
4470
4734
  };
4735
+ /* begin_public_function
4736
+ id: channel.event.member_role_added
4737
+ */
4738
+ /**
4739
+ * ```js
4740
+ * import { onChannelMemberRoleAdded } from '@amityco/ts-sdk'
4741
+ * const dispose = onChannelMemberRoleAdded((channel, member) => {
4742
+ * // member.roles and member.permissions are the member's resulting state
4743
+ * })
4744
+ * ```
4745
+ *
4746
+ * Fired when a role is added to a member of a {@link Amity.Channel}, either by the
4747
+ * local `ChannelRepository.Moderation.addRole` call or by the `channel.roleAdded` realtime
4748
+ * event coming from any client or the admin console.
4749
+ *
4750
+ * The realtime event reaches every subscriber of the channel topic (see `getChannelTopic`),
4751
+ * not only the actor or the affected members. It carries the affected members' resulting
4752
+ * channel roles and channel-scoped permissions, which are written to cache before the
4753
+ * callback runs. The callback is invoked once per affected member already held in cache.
4754
+ *
4755
+ * @param callback The function to call when the event was fired
4756
+ * @returns an {@link Amity.Unsubscriber} function to run when willing to stop listening
4757
+ *
4758
+ * @category Channel Events
4759
+ */
4471
4760
  const onChannelMemberRoleAdded = (callback) => {
4472
4761
  if (callbacks$2.length === 0) {
4473
4762
  const client = getActiveClient();
4474
- const filter = async (payload) => {
4763
+ const onLocal = async (payload) => {
4475
4764
  const { channels, channelUsers } = payload;
4476
4765
  callbacks$2.forEach(cb => cb(channels[0], channelUsers.find(channelUser => channelUser.membership === 'member')));
4477
4766
  };
4478
- mainDisposer$2 = createEventSubscriber(client, 'onChannelMemberRoleAdded', 'local.channel-moderator.role-added', filter);
4767
+ const onRealtime = (payload) => {
4768
+ const { channel, members } = applyChannelRolePayload(payload);
4769
+ if (!channel)
4770
+ return;
4771
+ members.forEach(member => callbacks$2.forEach(cb => cb(channel, member)));
4772
+ };
4773
+ mainDisposers$1.push(createEventSubscriber(client, 'onChannelMemberRoleAdded', 'local.channel-moderator.role-added', onLocal));
4774
+ mainDisposers$1.push(createEventSubscriber(client, 'onChannelMemberRoleAdded', 'channel.roleAdded', onRealtime));
4479
4775
  }
4480
4776
  callbacks$2.push(callback);
4481
4777
  return () => dispose$2(callback);
4482
4778
  };
4779
+ /* end_public_function */
4483
4780
 
4484
4781
  const callbacks$1 = [];
4485
- let mainDisposer$1 = null;
4782
+ const mainDisposers = [];
4486
4783
  const dispose$1 = (cb) => {
4487
4784
  const index = callbacks$1.indexOf(cb);
4488
4785
  if (index > -1) {
4489
4786
  callbacks$1.splice(index, 1);
4490
4787
  }
4491
4788
  if (callbacks$1.length === 0) {
4492
- mainDisposer$1 === null || mainDisposer$1 === void 0 ? void 0 : mainDisposer$1();
4789
+ mainDisposers.forEach(fn => fn());
4790
+ mainDisposers.length = 0;
4493
4791
  }
4494
4792
  };
4793
+ /* begin_public_function
4794
+ id: channel.event.member_role_removed
4795
+ */
4796
+ /**
4797
+ * ```js
4798
+ * import { onChannelMemberRoleRemoved } from '@amityco/ts-sdk'
4799
+ * const dispose = onChannelMemberRoleRemoved((channel, member) => {
4800
+ * // member.roles and member.permissions are the member's resulting state
4801
+ * })
4802
+ * ```
4803
+ *
4804
+ * Fired when a role is removed from a member of a {@link Amity.Channel}, either by the
4805
+ * local `ChannelRepository.Moderation.removeRole` call or by the `channel.roleRemoved` realtime
4806
+ * event coming from any client or the admin console.
4807
+ *
4808
+ * The realtime event reaches every subscriber of the channel topic (see `getChannelTopic`),
4809
+ * not only the actor or the affected members. It carries the affected members' resulting
4810
+ * channel roles and channel-scoped permissions, which are written to cache before the
4811
+ * callback runs. The callback is invoked once per affected member already held in cache.
4812
+ *
4813
+ * @param callback The function to call when the event was fired
4814
+ * @returns an {@link Amity.Unsubscriber} function to run when willing to stop listening
4815
+ *
4816
+ * @category Channel Events
4817
+ */
4495
4818
  const onChannelMemberRoleRemoved = (callback) => {
4496
4819
  if (callbacks$1.length === 0) {
4497
4820
  const client = getActiveClient();
4498
- const filter = async (payload) => {
4821
+ const onLocal = async (payload) => {
4499
4822
  const { channels, channelUsers } = payload;
4500
4823
  callbacks$1.forEach(cb => cb(channels[0], channelUsers.find(channelUser => channelUser.membership === 'member')));
4501
4824
  };
4502
- mainDisposer$1 = createEventSubscriber(client, 'onChannelMemberRoleRemoved', 'local.channel-moderator.role-removed', filter);
4825
+ const onRealtime = (payload) => {
4826
+ const { channel, members } = applyChannelRolePayload(payload);
4827
+ if (!channel)
4828
+ return;
4829
+ members.forEach(member => callbacks$1.forEach(cb => cb(channel, member)));
4830
+ };
4831
+ mainDisposers.push(createEventSubscriber(client, 'onChannelMemberRoleRemoved', 'local.channel-moderator.role-removed', onLocal));
4832
+ mainDisposers.push(createEventSubscriber(client, 'onChannelMemberRoleRemoved', 'channel.roleRemoved', onRealtime));
4503
4833
  }
4504
4834
  callbacks$1.push(callback);
4505
4835
  return () => dispose$1(callback);
4506
4836
  };
4837
+ /* end_public_function */
4507
4838
 
4508
4839
  /**
4509
4840
  * Fired when a {@link Amity.Channel} has been archived by the active user.
@@ -4578,6 +4909,9 @@ const onChannelSetUserMuted = (callback) => {
4578
4909
  return () => dispose(callback);
4579
4910
  };
4580
4911
 
4912
+ /* begin_public_function
4913
+ id: channel.get-my-membership
4914
+ */
4581
4915
  const getMyMembership = (channelId, callback) => {
4582
4916
  const { _id: userId } = getActiveUser();
4583
4917
  if (!userId)
@@ -4627,6 +4961,8 @@ const getMyMembership = (channelId, callback) => {
4627
4961
  disposers.push(onChannelMemberBanned(realtimeRouter));
4628
4962
  disposers.push(onChannelMemberUnbanned(realtimeRouter));
4629
4963
  disposers.push(onChannelSetUserMuted(realtimeRouter));
4964
+ disposers.push(onChannelMemberRoleAdded(realtimeRouter));
4965
+ disposers.push(onChannelMemberRoleRemoved(realtimeRouter));
4630
4966
  onFetch();
4631
4967
  return () => {
4632
4968
  disposers.forEach(fn => fn());
@@ -5020,7 +5356,9 @@ const initializeMessagePreviewSetting = async () => {
5020
5356
  const getSocialSettings = async () => {
5021
5357
  const client = getActiveClient();
5022
5358
  const { data } = await client.http.get(`/api/v3/network-settings/social`);
5023
- return data.socialNetworkSetting;
5359
+ return Object.assign(Object.assign({}, data.socialNetworkSetting), {
5360
+ // Networks that never set the comment edit switch allow the edit
5361
+ isAllowEditCommentWhenReviewingEnabled: data.socialNetworkSetting.isAllowEditCommentWhenReviewingEnabled });
5024
5362
  };
5025
5363
 
5026
5364
  /**
@@ -5706,6 +6044,32 @@ class AnalyticsEventCapturer {
5706
6044
  activityType: "view" /* Amity.AnalyticEventActivityType.View */,
5707
6045
  });
5708
6046
  }
6047
+ markCuratedContentWidgetAsViewed(topicId) {
6048
+ this.markAs({
6049
+ uniqueId: `curatedContentWidget.${topicId}`,
6050
+ contentId: topicId,
6051
+ contentType: "curated_content_widget" /* Amity.AnalyticEventContentType.CuratedContentWidget */,
6052
+ activityType: "view" /* Amity.AnalyticEventActivityType.View */,
6053
+ });
6054
+ }
6055
+ markCuratedContentPostAsViewed(postId, topicId) {
6056
+ this.markAs({
6057
+ uniqueId: `curatedContentPost.${postId}.view`,
6058
+ contentId: postId,
6059
+ contentType: "curated_content_post" /* Amity.AnalyticEventContentType.CuratedContentPost */,
6060
+ activityType: "view" /* Amity.AnalyticEventActivityType.View */,
6061
+ metadata: { topicId },
6062
+ });
6063
+ }
6064
+ markCuratedContentPostAsClicked(postId, topicId) {
6065
+ this.markAs({
6066
+ uniqueId: `curatedContentPost.${postId}.click`,
6067
+ contentId: postId,
6068
+ contentType: "curated_content_post" /* Amity.AnalyticEventContentType.CuratedContentPost */,
6069
+ activityType: "linkClicked" /* Amity.AnalyticEventActivityType.Click */,
6070
+ metadata: { topicId },
6071
+ });
6072
+ }
5709
6073
  markPostAsMeaningfullyViewed(postId, feedRenderPosition) {
5710
6074
  var _a;
5711
6075
  const cached = (_a = pullFromCache(['feedMetadata', 'get', postId])) === null || _a === void 0 ? void 0 : _a.data;
@@ -5869,6 +6233,24 @@ class AnalyticsEngine {
5869
6233
  this._eventCapturer.markPostAsViewed(postId);
5870
6234
  }
5871
6235
  }
6236
+ markCuratedContentWidgetAsViewed(topicId) {
6237
+ if (this._client.sessionState === "established" /* Amity.SessionStates.ESTABLISHED */ ||
6238
+ this._client.sessionState === "tokenExpired" /* Amity.SessionStates.TOKEN_EXPIRED */) {
6239
+ this._eventCapturer.markCuratedContentWidgetAsViewed(topicId);
6240
+ }
6241
+ }
6242
+ markCuratedContentPostAsViewed(postId, topicId) {
6243
+ if (this._client.sessionState === "established" /* Amity.SessionStates.ESTABLISHED */ ||
6244
+ this._client.sessionState === "tokenExpired" /* Amity.SessionStates.TOKEN_EXPIRED */) {
6245
+ this._eventCapturer.markCuratedContentPostAsViewed(postId, topicId);
6246
+ }
6247
+ }
6248
+ markCuratedContentPostAsClicked(postId, topicId) {
6249
+ if (this._client.sessionState === "established" /* Amity.SessionStates.ESTABLISHED */ ||
6250
+ this._client.sessionState === "tokenExpired" /* Amity.SessionStates.TOKEN_EXPIRED */) {
6251
+ this._eventCapturer.markCuratedContentPostAsClicked(postId, topicId);
6252
+ }
6253
+ }
5872
6254
  markPostAsMeaningfullyViewed(postId, feedRenderPosition) {
5873
6255
  if (this._client.sessionState === "established" /* Amity.SessionStates.ESTABLISHED */ ||
5874
6256
  this._client.sessionState === "tokenExpired" /* Amity.SessionStates.TOKEN_EXPIRED */) {
@@ -7265,6 +7647,265 @@ class CursorController {
7265
7647
  }
7266
7648
  }
7267
7649
 
7650
+ class ResetTask {
7651
+ constructor(postId, latestCreatedAt, serverCommentCount) {
7652
+ this.postId = postId;
7653
+ this.latestCreatedAt = latestCreatedAt;
7654
+ this.serverCommentCount = serverCommentCount;
7655
+ }
7656
+ }
7657
+
7658
+ // Task to track comment creation
7659
+ class CreateTask {
7660
+ constructor(postId, commentId, createdAt) {
7661
+ this.postId = postId;
7662
+ this.commentId = commentId;
7663
+ this.createdAt = createdAt;
7664
+ }
7665
+ }
7666
+
7667
+ /**
7668
+ * A pending comment was approved and now counts publicly. Unlike `CreateTask` it carries no
7669
+ * `createdAt` and bypasses the age guard on purpose: the comment was written before the last post
7670
+ * payload (so its `createdAt` is old) but entered the server count only now. Same rule as iOS.
7671
+ *
7672
+ * Accepted trade-off (plan 40 §9): if a `ResetTask` that already includes this comment lands
7673
+ * between the approve response and the late `comment.approved` event, the count reads +1 until
7674
+ * the next server sync — the same self-correcting drift accepted for stale deletes.
7675
+ */
7676
+ class ApproveTask {
7677
+ constructor(postId, commentId) {
7678
+ this.postId = postId;
7679
+ this.commentId = commentId;
7680
+ }
7681
+ }
7682
+
7683
+ // Task to track comment deletion
7684
+ class DeleteTask {
7685
+ constructor(postId, commentId) {
7686
+ this.postId = postId;
7687
+ this.commentId = commentId;
7688
+ }
7689
+ }
7690
+
7691
+ class CommentChange {
7692
+ constructor(latestCreatedAt, serverCommentCount) {
7693
+ this.latestCommentCreatedAt = latestCreatedAt;
7694
+ this.serverCommentCount = serverCommentCount;
7695
+ this.createdCommentIds = new Set();
7696
+ this.deletedCommentIds = new Set();
7697
+ }
7698
+ }
7699
+
7700
+ class PostCommentCountEngine {
7701
+ constructor() {
7702
+ this.isProcessing = false;
7703
+ this.tasks = [];
7704
+ this.commentChangeTracker = new Map();
7705
+ // Ids of the LOGGED-IN USER's own pending comments, per post. Survives ResetTask, so the
7706
+ // author's +1 does not vanish on the next post refresh; emptied only when the comment leaves
7707
+ // the pending state (approval hands it to createdCommentIds, decline/delete drops it).
7708
+ this.pendingAuthoredCommentIds = new Map();
7709
+ }
7710
+ queueCommentChangeTask(task) {
7711
+ this.tasks.push(task);
7712
+ if (!this.isProcessing) {
7713
+ this.processCommentChangeTask();
7714
+ }
7715
+ }
7716
+ addPendingAuthoredComment(postId, commentId, { publish = true } = {}) {
7717
+ var _a;
7718
+ const ids = (_a = this.pendingAuthoredCommentIds.get(postId)) !== null && _a !== void 0 ? _a : new Set();
7719
+ if (ids.has(commentId))
7720
+ return;
7721
+ ids.add(commentId);
7722
+ this.pendingAuthoredCommentIds.set(postId, ids);
7723
+ if (publish)
7724
+ this.publishIfTracked(postId);
7725
+ }
7726
+ removePendingAuthoredComment(postId, commentId, { publish = true } = {}) {
7727
+ const ids = this.pendingAuthoredCommentIds.get(postId);
7728
+ if (!(ids === null || ids === void 0 ? void 0 : ids.delete(commentId)))
7729
+ return false;
7730
+ if (ids.size === 0)
7731
+ this.pendingAuthoredCommentIds.delete(postId);
7732
+ if (publish)
7733
+ this.publishIfTracked(postId);
7734
+ return true;
7735
+ }
7736
+ /** Whether a post payload has seeded this post; without one every count is `0`. */
7737
+ hasTracker(postId) {
7738
+ return this.commentChangeTracker.has(postId);
7739
+ }
7740
+ isPendingAuthoredComment(postId, commentId) {
7741
+ var _a, _b;
7742
+ return (_b = (_a = this.pendingAuthoredCommentIds.get(postId)) === null || _a === void 0 ? void 0 : _a.has(commentId)) !== null && _b !== void 0 ? _b : false;
7743
+ }
7744
+ // Drops every per-post state. Called on logout / user switch.
7745
+ reset() {
7746
+ this.tasks = [];
7747
+ this.commentChangeTracker.clear();
7748
+ this.pendingAuthoredCommentIds.clear();
7749
+ }
7750
+ publishIfTracked(postId) {
7751
+ // Without a tracker there is no server figure to add to; the next ResetTask picks it up.
7752
+ if (!this.commentChangeTracker.has(postId))
7753
+ return;
7754
+ PostCommentCountEngine.publishUpdate(postId, this.getLocalCommentCount(postId, true));
7755
+ }
7756
+ processCommentChangeTask() {
7757
+ if (this.isProcessing) {
7758
+ return;
7759
+ }
7760
+ this.isProcessing = true;
7761
+ if (this.tasks.length === 0) {
7762
+ this.isProcessing = false;
7763
+ return;
7764
+ }
7765
+ // Process in capped batches, coalescing updates
7766
+ const batch = this.tasks.splice(0, PostCommentCountEngine.BATCH_SIZE);
7767
+ const modifiedPostIds = new Set();
7768
+ batch.forEach(task => {
7769
+ let modified = false;
7770
+ if (task instanceof ResetTask) {
7771
+ modified = this.processResetTaskInternal(task);
7772
+ }
7773
+ else if (task instanceof CreateTask) {
7774
+ modified = this.processCreateTaskInternal(task);
7775
+ }
7776
+ else if (task instanceof ApproveTask) {
7777
+ modified = this.processApproveTaskInternal(task);
7778
+ }
7779
+ else if (task instanceof DeleteTask) {
7780
+ modified = this.processDeleteTaskInternal(task);
7781
+ }
7782
+ if (modified) {
7783
+ modifiedPostIds.add(task.postId);
7784
+ }
7785
+ });
7786
+ // Publish one update per modified post
7787
+ modifiedPostIds.forEach(postId => {
7788
+ PostCommentCountEngine.publishUpdate(postId, this.getLocalCommentCount(postId, true));
7789
+ });
7790
+ this.isProcessing = false;
7791
+ // Recurse if more tasks remain
7792
+ if (this.tasks.length > 0) {
7793
+ this.processCommentChangeTask();
7794
+ }
7795
+ }
7796
+ processResetTaskInternal(task) {
7797
+ // Always creates/overwrites tracker
7798
+ this.commentChangeTracker.set(task.postId, new CommentChange(task.latestCreatedAt, task.serverCommentCount));
7799
+ return true;
7800
+ }
7801
+ processCreateTaskInternal(task) {
7802
+ // The comment is public now: the author-local +1 hands over to the normal path, so the
7803
+ // count stays put instead of moving twice.
7804
+ const wasPendingAuthored = this.removePendingAuthoredComment(task.postId, task.commentId, {
7805
+ publish: false,
7806
+ });
7807
+ const tracker = this.commentChangeTracker.get(task.postId);
7808
+ if (!tracker)
7809
+ return false; // No tracker, skip
7810
+ if (tracker.deletedCommentIds.delete(task.commentId))
7811
+ return true; // Re-approval cancels the earlier removal
7812
+ if (tracker.createdCommentIds.has(task.commentId))
7813
+ return wasPendingAuthored; // Deduplication
7814
+ if (task.createdAt <= tracker.latestCommentCreatedAt)
7815
+ return wasPendingAuthored; // Timestamp filtering
7816
+ tracker.createdCommentIds.add(task.commentId);
7817
+ return true;
7818
+ }
7819
+ processApproveTaskInternal(task) {
7820
+ // The comment is public now: the author-local +1 hands over to the normal path, so the
7821
+ // count stays put instead of moving twice.
7822
+ const wasPendingAuthored = this.removePendingAuthoredComment(task.postId, task.commentId, {
7823
+ publish: false,
7824
+ });
7825
+ const tracker = this.commentChangeTracker.get(task.postId);
7826
+ if (!tracker)
7827
+ return false; // No tracker, skip
7828
+ if (tracker.deletedCommentIds.delete(task.commentId))
7829
+ return true; // Re-approval cancels the earlier re-review removal
7830
+ if (tracker.createdCommentIds.has(task.commentId))
7831
+ return wasPendingAuthored; // Approve response and comment.approved event dedupe by id
7832
+ // No timestamp filtering: approval is the moment the comment enters the count, not createdAt
7833
+ tracker.createdCommentIds.add(task.commentId);
7834
+ return true;
7835
+ }
7836
+ processDeleteTaskInternal(task) {
7837
+ const tracker = this.commentChangeTracker.get(task.postId);
7838
+ if (!tracker)
7839
+ return false; // No tracker, skip
7840
+ if (tracker.deletedCommentIds.has(task.commentId))
7841
+ return false; // Deduplication
7842
+ tracker.deletedCommentIds.add(task.commentId);
7843
+ return true;
7844
+ }
7845
+ /**
7846
+ * The count as this session sees it: the last server figure plus the local delta.
7847
+ *
7848
+ * `includePending` adds the logged-in user's own pending comments — the author's view. A
7849
+ * pending id is added only while the public delta does not already count it, so a comment
7850
+ * present in both sets counts once: a `comment.created` that arrives pending after the
7851
+ * `comment.approved` hand-over adds nothing, while an approved comment sent back to review
7852
+ * (created, deleted and pending all hold its id) keeps the author's +1.
7853
+ *
7854
+ * `0` for a post no payload has seeded yet; callers fall back to the post's own figure.
7855
+ */
7856
+ getLocalCommentCount(postId, includePending = false) {
7857
+ var _a;
7858
+ const tracker = this.commentChangeTracker.get(postId);
7859
+ if (!tracker)
7860
+ return 0;
7861
+ const publicDelta = tracker.createdCommentIds.size - tracker.deletedCommentIds.size;
7862
+ if (!includePending)
7863
+ return Math.max(0, tracker.serverCommentCount + publicDelta);
7864
+ let pendingExtra = 0;
7865
+ (_a = this.pendingAuthoredCommentIds.get(postId)) === null || _a === void 0 ? void 0 : _a.forEach(commentId => {
7866
+ const countedPublicly = tracker.createdCommentIds.has(commentId) && !tracker.deletedCommentIds.has(commentId);
7867
+ if (!countedPublicly)
7868
+ pendingExtra += 1;
7869
+ });
7870
+ return Math.max(0, tracker.serverCommentCount + publicDelta + pendingExtra);
7871
+ }
7872
+ static publishUpdate(postId, newCount) {
7873
+ var _a;
7874
+ const queryKey = ['post', 'get', postId];
7875
+ mergeInCache(queryKey, {
7876
+ localCommentCount: newCount,
7877
+ });
7878
+ const postPayload = (_a = pullFromCache(queryKey)) === null || _a === void 0 ? void 0 : _a.data;
7879
+ if (!postPayload)
7880
+ return;
7881
+ fireEvent('local.post.updated', {
7882
+ posts: [postPayload],
7883
+ });
7884
+ }
7885
+ }
7886
+ PostCommentCountEngine.BATCH_SIZE = 50;
7887
+ let instance$1;
7888
+ var PostCommentCountEngine$1 = {
7889
+ getInstance: () => {
7890
+ if (!instance$1) {
7891
+ instance$1 = new PostCommentCountEngine();
7892
+ }
7893
+ return instance$1;
7894
+ },
7895
+ };
7896
+
7897
+ /**
7898
+ * Comment-count state is per user — in particular the ids of the logged-in user's own pending
7899
+ * comments — so it must not survive a logout or a user switch.
7900
+ *
7901
+ * @category private
7902
+ */
7903
+ const postCommentCountEngineOnLoginHandler = () => onSessionStateChange(state => {
7904
+ if (state === "notLoggedIn" /* Amity.SessionStates.NOT_LOGGED_IN */ || state === "terminated" /* Amity.SessionStates.TERMINATED */) {
7905
+ PostCommentCountEngine$1.getInstance().reset();
7906
+ }
7907
+ });
7908
+
7268
7909
  const EVENTS = [
7269
7910
  'disconnected',
7270
7911
  'error',
@@ -7371,10 +8012,14 @@ const onNetworkActivities = (callback) => NetworkActivitiesWatcher$1.getInstance
7371
8012
  *
7372
8013
  * @category Client Events
7373
8014
  */
8015
+ /* begin_public_function
8016
+ id: core.onVisitorUsageLimitReached
8017
+ */
7374
8018
  const onVisitorUsageLimitReached = (callback) => {
7375
8019
  const client = getActiveClient();
7376
8020
  return createEventSubscriber(client, 'client/onVisitorUsageLimitReached', 'visitorUsageLimitReached', callback);
7377
8021
  };
8022
+ /* end_public_function */
7378
8023
 
7379
8024
  /**
7380
8025
  * ```js
@@ -7454,7 +8099,7 @@ const setupLoginSubscriptions = (unsubWatcher) => {
7454
8099
  // NOTE: This is a temporary solution to handle the channel marker when the user is forced to leave
7455
8100
  // the channel because currently backend can't handle this, so every time a user is banned from
7456
8101
  // a channel or the channel is deleted the channel's unread count will not be reset to zero
7457
- onChannelDeleted(removeChannelMarkerCache), onChannelMemberBanned(removeChannelMarkerCache), markReadEngineOnLoginHandler(), analyticsEngineOnLoginHandler(), objectResolverEngineOnLoginHandler(), reactionSyncEngineOnLoginHandler(), blockedUserSyncEngineOnLoginHandler(), blockingUserSyncEngineOnLoginHandler(), blockRealtimeOnLoginHandler(), resetAutoSubscriptionsOnLogout(), CursorController.clearOnLogout());
8102
+ onChannelDeleted(removeChannelMarkerCache), onChannelMemberBanned(removeChannelMarkerCache), markReadEngineOnLoginHandler(), analyticsEngineOnLoginHandler(), objectResolverEngineOnLoginHandler(), reactionSyncEngineOnLoginHandler(), blockedUserSyncEngineOnLoginHandler(), blockingUserSyncEngineOnLoginHandler(), blockRealtimeOnLoginHandler(), resetAutoSubscriptionsOnLogout(), CursorController.clearOnLogout(), postCommentCountEngineOnLoginHandler());
7458
8103
  if (client.useLegacyUnreadCount) {
7459
8104
  subscriptions.push(readReceiptSyncEngineOnLoginHandler());
7460
8105
  }
@@ -8490,7 +9135,7 @@ const DEFAULT_DEBUG_SESSION = 'amity';
8490
9135
  *
8491
9136
  * @category Client API
8492
9137
  * */
8493
- const createClient = (apiKey, apiRegion = API_REGIONS.SG, { debugSession = DEFAULT_DEBUG_SESSION, apiEndpoint, prefixDeviceIdKey, rteEnabled = true, } = {}) => {
9138
+ const createClient = (apiKey, apiRegion = API_REGIONS.SG, { debugSession = DEFAULT_DEBUG_SESSION, apiEndpoint, prefixDeviceIdKey, rteEnabled = true, product, uikitVersion, appId, appVersion, } = {}) => {
8494
9139
  var _a, _b, _c;
8495
9140
  const log = createLogger(debugSession);
8496
9141
  log('client/api/createClient', {
@@ -8519,6 +9164,10 @@ const createClient = (apiKey, apiRegion = API_REGIONS.SG, { debugSession = DEFAU
8519
9164
  const useLegacyUnreadCount = true;
8520
9165
  const client = {
8521
9166
  version: `${VERSION}`,
9167
+ product,
9168
+ uikitVersion,
9169
+ appId,
9170
+ appVersion,
8522
9171
  apiKey,
8523
9172
  /*
8524
9173
  * SDK Components
@@ -8757,13 +9406,13 @@ class GlobalFileAccessType {
8757
9406
  }
8758
9407
  }
8759
9408
  _GlobalFileAccessType_fileAccessType = new WeakMap();
8760
- let instance$1;
9409
+ let instance;
8761
9410
  var GlobalFileAccessType$1 = {
8762
9411
  getInstance: () => {
8763
- if (!instance$1) {
8764
- instance$1 = new GlobalFileAccessType();
9412
+ if (!instance) {
9413
+ instance = new GlobalFileAccessType();
8765
9414
  }
8766
- return instance$1;
9415
+ return instance;
8767
9416
  },
8768
9417
  };
8769
9418
 
@@ -8835,6 +9484,9 @@ const CONTENT_TYPE_CONFIG = {
8835
9484
  * @category Client API
8836
9485
  * @async
8837
9486
  */
9487
+ /* begin_public_function
9488
+ id: core_client.getShareableLinkConfiguration
9489
+ */
8838
9490
  const getShareableLinkConfiguration = async () => {
8839
9491
  var _a, _b;
8840
9492
  const client = getActiveClient();
@@ -8860,6 +9512,7 @@ const getShareableLinkConfiguration = async () => {
8860
9512
  },
8861
9513
  };
8862
9514
  };
9515
+ /* end_public_function */
8863
9516
 
8864
9517
  /**
8865
9518
  * Retrieves a pair of {@link Amity.Tokens} necessary for connection
@@ -9508,6 +10161,9 @@ const removeFunctionProperties = (obj) => {
9508
10161
  *
9509
10162
  * @category Message Live Object
9510
10163
  */
10164
+ /* begin_public_function
10165
+ id: client.get-user-unread
10166
+ */
9511
10167
  const getUserUnread = (callback) => {
9512
10168
  const { _id: userId } = getActiveUser();
9513
10169
  if (!userId)
@@ -9600,7 +10256,7 @@ const getUserUnread = (callback) => {
9600
10256
  };
9601
10257
  };
9602
10258
 
9603
- var index$s = /*#__PURE__*/Object.freeze({
10259
+ var index$t = /*#__PURE__*/Object.freeze({
9604
10260
  __proto__: null,
9605
10261
  getActiveClient: getActiveClient,
9606
10262
  getActiveUser: getActiveUser,
@@ -10826,7 +11482,7 @@ const getMyFollowInfo = (callback) => {
10826
11482
  };
10827
11483
  /* end_public_function */
10828
11484
 
10829
- var index$r = /*#__PURE__*/Object.freeze({
11485
+ var index$s = /*#__PURE__*/Object.freeze({
10830
11486
  __proto__: null,
10831
11487
  blockUser: blockUser,
10832
11488
  unBlockUser: unBlockUser,
@@ -11403,6 +12059,9 @@ class JoinRequestsLiveCollectionController extends LiveCollectionController {
11403
12059
  * @category joinRequest Live Collection
11404
12060
  *
11405
12061
  */
12062
+ /* begin_public_function
12063
+ id: community.get-join-requests
12064
+ */
11406
12065
  const getJoinRequests = (params, callback, config) => {
11407
12066
  const { log, cache } = getActiveClient();
11408
12067
  if (!cache) {
@@ -12167,6 +12826,16 @@ const createChannel = async (bundle) => {
12167
12826
  /* c8 ignore next */
12168
12827
  isPublic: (bundle === null || bundle === void 0 ? void 0 : bundle.type) === 'community' ? isPublic : undefined }));
12169
12828
  }
12829
+ // Fire the event locally, the same way createCommunity and createPost do.
12830
+ // Without it a running getChannels collection never inserts the new channel:
12831
+ // its query stream controller inserts an id only on OnCreate / OnJoin /
12832
+ // OnResolveChannel / OnUnarchived, and the first sent message arrives as an
12833
+ // OnUpdate, which only re-notifies. Reusing the MQTT event name means the
12834
+ // already-wired onChannelCreated -> OnCreate path does the insert, so the
12835
+ // list updates without a re-query. onChannelCreated re-runs
12836
+ // prepareChannelPayload + ingestInCache itself, so this is idempotent with
12837
+ // the ingest below.
12838
+ fireEvent('channel.created', payload.data);
12170
12839
  const data = await prepareChannelPayload(payload.data);
12171
12840
  const cachedAt = client.cache && Date.now();
12172
12841
  if (client.cache)
@@ -12338,8 +13007,32 @@ const streamLinkedObject = (stream) => {
12338
13007
  } });
12339
13008
  };
12340
13009
 
13010
+ const KNOWN_APPROVAL_STATUSES = [
13011
+ "pending" /* Amity.CommentApprovalStatusEnum.Pending */,
13012
+ "approved" /* Amity.CommentApprovalStatusEnum.Approved */,
13013
+ "rejected" /* Amity.CommentApprovalStatusEnum.Rejected */,
13014
+ ];
13015
+ /**
13016
+ * The server sends `approvalStatus` only while a comment is held for review or after it was
13017
+ * rejected. Absent, `null`, or an unrecognised value all resolve to `approved` — never to
13018
+ * `pending`, which would mark every comment written before the feature as unpublished.
13019
+ */
13020
+ const resolveCommentApprovalStatus = (approvalStatus) => {
13021
+ if (approvalStatus && KNOWN_APPROVAL_STATUSES.includes(approvalStatus)) {
13022
+ return approvalStatus;
13023
+ }
13024
+ return "approved" /* Amity.CommentApprovalStatusEnum.Approved */;
13025
+ };
13026
+ const prepareComment = (comment) => (Object.assign(Object.assign(Object.assign({}, (comment.hasOwnProperty('myReactions') ? {} : { myReactions: [] })), comment), { approvalStatus: resolveCommentApprovalStatus(comment.approvalStatus) }));
13027
+ function prepareCommentPayload(commentPayload) {
13028
+ const { comments, commentChildren } = commentPayload;
13029
+ return Object.assign(Object.assign(Object.assign({}, commentPayload), { comments: comments.map(prepareComment) }), (commentChildren ? { commentChildren: commentChildren.map(prepareComment) } : {}));
13030
+ }
13031
+
12341
13032
  const commentLinkedObject = (comment) => {
12342
- return Object.assign(Object.assign({}, comment), { get target() {
13033
+ return Object.assign(Object.assign({}, comment), {
13034
+ // Non-optional on the public model: absent on the wire means approved
13035
+ approvalStatus: resolveCommentApprovalStatus(comment.approvalStatus), get target() {
12343
13036
  const commentTypes = {
12344
13037
  type: comment.targetType,
12345
13038
  };
@@ -12547,7 +13240,7 @@ const getWatchSessionStorage = () => {
12547
13240
  return storageInstance;
12548
13241
  };
12549
13242
 
12550
- const privateKey = "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDHo80SecH7FuF2\nhFYnb+l26/VN8UMLXAQFLnxciNTEwkGVFMpdezlH8rU2HtUJL4RETogbAOLVY0XM\njs6sPn8G1nALmh9qeDpUtVqFOVtBHxEZ910TLOtQiunjqJKO5nWdqZ71EC3OFluR\niGQkO84BiIFbv37ub7xl3S8XarbtKoLcyVpkDHi+1wx1pgCAn6gtBUgckPL5NR8j\nLseabl3HAXQfhTCKo4tmOFM2Dxwl1IUMmIJrJg/aIU/U0tj/1Eoo7mG0JcNWX19l\nW3EecCbi0ncCJOrkUdwlBrcjaMayaX/ubEwyUeTGiLdyc4L3GRLHjyK8xgVNXRMH\nbZWJ2a5NAgMBAAECggEASxuE+35zTFO/XydKgmvIGcWL9FbgMlXb7Vcf0nBoG945\nbiz0NVc2paraIhJXc608xbYF3qLmtAE1MVBI0ORyRdBHNxY024l/6H6SH60Ed+uI\nM4ysp5ourY6Vj+DLwpdRiI9YDjqYAQDIUmhNxJP7XPhOMoZI6st+xZQBM34ic/bv\nAMSJm9OZphSp3+qXVkFZztr2mxD2EZSJJLYxi8BCdgM2qhazalbcJ6zDKHCZWVWm\n8RRxDGldyMb/237JxETzP40tAlzOZDmBAbUgEnurDJ93RVDIE3rbZUshwgeQd18a\nem096mWgvB1AIKYgsTAR3pw+V19YWAjq/glP6fz8wQKBgQD/oQq+ukKF0PRgBeM5\ngeTjSwsdGppQLmf5ndujvoiz/TpdjDEPu6R8kigQr1rG2t4K/yfdZoI8RdmJD1al\n3Q7N9hofooSy4rj6E3txzWZCHJjHad2cnCp/O26HiReGAl7wTcfTmNdiFHhZQzm5\nJBkvWAiwuvQMNfEbnXxw6/vIDwKBgQDH7fX8gsc77JLvAWgp1MaQN/sbqVb6JeT1\nFQfR8E/WFCSmzQBtNzd5KgYuCeelwr/8DyYytvN2BzCYZXp73gI1jF3YlW5jVn74\nOY6TwQ095digwo6Z0yuxopdIOApKgAkL9PRKgNrqAf3NAyMua6lOGifzjDojC3KU\nfylQmxMn4wKBgHp2B9O/H0dEBw5JQ8W0+JX6yWQz7mEjGiR2/1W+XXb8hQ1zr709\nw1r6Gb+EghRpnZ3fBpYGGbYOMFx8wKHM+N6qW3F0ReX8v2juFGE8aRSa5oYBrWzt\nU16Idjbv8hj84cZ1PJmdyvDtpYn9rpWHOZl4rxEbPvbqkIsOMyNVqdT5AoGAOSge\nmwIIU2le2FVeohbibXiToWTYKMuMmURZ5/r72AgKMmWJKbAPe+Q3wBG01/7FRBpQ\noU8Ma0HC8s6QJbliiEyIx9JwrJWd1vkdecBHONrtA4ibm/5zD2WcOllLF+FitLhi\n3qnX6+6F0IaFGFBPJrTzlv0P4dTz/OAdv52V7GECgYEA2TttOKBAqWllgOaZOkql\nLVMJVmgR7s6tLi1+cEP8ZcapV9aRbRzTAKXm4f8AEhtlG9F9kCOvHYCYGi6JaiWJ\nZkHjeex3T+eE6Di6y5Bm/Ift5jtVhJ4jCVwHOKTMej79NPUFTJfv8hCo29haBDv6\nRXFrv+T21KCcw8k3sJeJWWQ=\n-----END PRIVATE KEY-----";
13243
+ const privateKey = "MIIEpQIBAAKCAQEAwAEc/oZgYIvKSUG/C3mONYLR4ZPgAjMEX4bJ+xqqakUDRtqlNO+eZs2blQ1Ko0DBkqPExyQezvjibH5W2UZBV5RaBTlTcNVKTToMBEGesAfaEcM3qUyQHxdbFYZv6P4sb14dcwxTQ8usmaV8ooiR1Fcaso5ZWYcZ8Hb46FbQ7OoVumsBtPWwfZ4f003o5VCl6AIM6lcLv9UDLlFVYhE+PeXpRHtfWlGqxMvqC9oinlwhL6nWv6VjQXW4nhcib72dPBzfHT7k/PMKto2SxALYdb68ENiAGuJLWi3AUHSyYCJK2w7wIlWfJUAI0v26ub10IpExr6D5QuW2577jjP93iwIDAQABAoIBAFWfqXhwIIatkFY+9Z1+ZcbDQimgsmMIsUiQaX6Lk7e0cxOj6czDlxYtVtaPiNtow2pLkjNkjkCqiP7tEHnwdK9DvylZOTa2R15NJpK3WLcTqVIGhsn/FL5owfvFah6zSsmXZParZm5zY9NZE03ALZhOB9/cz0e3kf/EbpfeL2mW7MApyiUt5i09ycchroOpcWp73ipIxvgigtZyUGFmsQicWhUs28F0D7w4Qfk76yG3nqXeb+BAMhCaIaa/k/aAxhiZG/ygEQWQrcC8gfe+jyicMAQPDEVS9YuUMGsLjIjKuVLZzp2xirQnhc2i2zVNEIvG6soprPOBEMQugzrtX5ECgYEA3b7KAbBIbDl1e4ZSCWhHdHkiWVZHaopsR/LhqDDNhXjWjq3AesgV6k0j9EdziMn/HmmOso0bz99GTV3JZf4A9ztTLumJlkHbdVtlgOqSjrFLj12rH9KXTheyIhWSpUmm8+WB1xasFbqpvJaGo7F3pd2Fqj1XR4mp5BO7c/t7LJ0CgYEA3aouEzXQ9THRKYocdfY69EI1Il1t/d/RSqqd9BxEjxBgxkM13ZiYIn/R4WW/nCUrlmhxG44Aa2Gob4Ahfsui2xKTg/g/3Zk/rAxAEGkfOLGoenaJMD41fH4wUq3FRYwkvnaMb9Hd6f/TlBHslIRa2NN58bSBGJCyBP2b59+2+EcCgYEAixDVRXvV37GlYUOa/XVdosk5Zoe6oDGRuQm0xbNdoUBoZvDHDvme7ONWEiQha/8qtVsD+CyQ7awcPfb8kK9c0bBt+bTS6d4BkTcxkEkMgtrkBVR8Nqfu5jXsLH4VCv4G61zbMhZw8+ut+az5YX2yCN7Frj9sFlxapMRPQmzMEe0CgYEAumsAzM8ZqNv4mAK65Mnr0rhLj1cbxcKRdUYACOgtEFQpzxN/HZnTeFAe5nx3pI3uFlRHq3DFEYnT6dHMWaJQmAULYpVIwMi9L6gtyJ9fzoI6uqMtxRDMUqKdaSsTGOY/kJ6KhQ/unXi1K3XXjR+yd1+C0q+HUm1+CYxvrZYLfskCgYEArsEy+IQOiqniJ0NE2vVUF+UK/IRZaic9YKcpov5Ot7Vvzm/MnnW4N1ljVskocETBWMmPUvNSExVjPebi+rxd8fa5kY8BJScPTzMFbunZn/wjtGdcM10qdlVQ9doG61A/9P3ezFKCfS4AvF/H/59LcSx2Bh28fp3/efiVIOpVd4Y=";
12551
13244
  /*
12552
13245
  * The crypto algorithm used for importing key and signing string
12553
13246
  */
@@ -12990,6 +13683,122 @@ const fileLinkedObject = (file) => {
12990
13683
  return file;
12991
13684
  };
12992
13685
 
13686
+ const isCommentPending = (comment) => resolveCommentApprovalStatus(comment.approvalStatus) === "pending" /* Amity.CommentApprovalStatusEnum.Pending */;
13687
+ const isCommentApproved = (comment) => resolveCommentApprovalStatus(comment.approvalStatus) === "approved" /* Amity.CommentApprovalStatusEnum.Approved */;
13688
+ // Only post and content references feed PostCommentCountEngine; story counts live on the story.
13689
+ const isCountedReference = (comment) => ['post', 'content'].includes(comment.referenceType);
13690
+ const isAuthoredByCurrentUser = (comment) => comment.userId === getActiveClient().userId;
13691
+ /**
13692
+ * Whether a comment on this reference would be held for review, read from the cached post's
13693
+ * community. `true` when that cannot be known — the post or its community is not cached yet.
13694
+ * A pending guess that turns out approved is corrected by the response and the comment then
13695
+ * enters the list; an approved guess that turns out pending has already been shown in a public
13696
+ * list with nothing to take it back out. Only shapes the optimistic object — the server
13697
+ * response is the authority on the actual status.
13698
+ */
13699
+ const isCommentApprovalRequired = (bundle) => {
13700
+ var _a, _b;
13701
+ // Only comments on community posts are gated; every other reference is known-off
13702
+ if (bundle.referenceType !== 'post')
13703
+ return false;
13704
+ const post = (_a = pullFromCache(['post', 'get', bundle.referenceId])) === null || _a === void 0 ? void 0 : _a.data;
13705
+ if (!post)
13706
+ return true;
13707
+ // A user-feed post is known-off
13708
+ if (post.targetType !== 'community')
13709
+ return false;
13710
+ const community = (_b = pullFromCache([
13711
+ 'community',
13712
+ 'get',
13713
+ post.targetId,
13714
+ ])) === null || _b === void 0 ? void 0 : _b.data;
13715
+ if (!community)
13716
+ return true;
13717
+ return community.needApprovalOnCommentCreation === true;
13718
+ };
13719
+ /**
13720
+ * An approved comment arrived over realtime: one `CreateTask` carrying its own `createdAt`, so
13721
+ * the timestamp filter skips anything the last post payload already counted. The author's own
13722
+ * comment reaches here as an echo too; the engine de-duplicates it by id against the task the
13723
+ * create response queued.
13724
+ */
13725
+ const applyCommentCreatedCount = (comment) => {
13726
+ if (!isCountedReference(comment))
13727
+ return;
13728
+ PostCommentCountEngine$1.getInstance().queueCommentChangeTask(new CreateTask(comment.referenceId, comment.commentId, comment.createdAt));
13729
+ };
13730
+ /**
13731
+ * The author's own pending comment counts in their view only. Recorded as separate engine state
13732
+ * so it survives a post refresh (`ResetTask`).
13733
+ */
13734
+ const recordPendingAuthoredComment = (comment, options) => {
13735
+ if (!isCountedReference(comment) || !isAuthoredByCurrentUser(comment))
13736
+ return;
13737
+ PostCommentCountEngine$1.getInstance().addPendingAuthoredComment(comment.referenceId, comment.commentId, options);
13738
+ };
13739
+ /**
13740
+ * A pending comment was declined or deleted: it was never in the server count, so no
13741
+ * `DeleteTask` — only the author-local +1 goes away.
13742
+ */
13743
+ const releasePendingAuthoredComment = (comment) => {
13744
+ if (!isCountedReference(comment))
13745
+ return;
13746
+ PostCommentCountEngine$1.getInstance().removePendingAuthoredComment(comment.referenceId, comment.commentId);
13747
+ };
13748
+ /**
13749
+ * Reveal: exactly one `ApproveTask`. The engine de-duplicates by comment id, so the approve
13750
+ * response and the `comment.approved` event may both call this. `ApproveTask` bypasses the age
13751
+ * guard on purpose — the comment was written before the last server sync but enters the public
13752
+ * count now — matching the iOS `ApproveTask` (plan 40 §9, guard off for approve).
13753
+ */
13754
+ const applyCommentApprovedCount = (comment) => {
13755
+ if (!isCountedReference(comment))
13756
+ return;
13757
+ PostCommentCountEngine$1.getInstance().queueCommentChangeTask(new ApproveTask(comment.referenceId, comment.commentId));
13758
+ };
13759
+ /**
13760
+ * Re-review: an approved comment edited back to pending leaves the public count once. The
13761
+ * author keeps their own +1 through the pending set, so their count does not move.
13762
+ */
13763
+ const applyCommentReReviewCount = (comment) => {
13764
+ if (!isCountedReference(comment))
13765
+ return;
13766
+ recordPendingAuthoredComment(comment, { publish: false });
13767
+ PostCommentCountEngine$1.getInstance().queueCommentChangeTask(new DeleteTask(comment.referenceId, comment.commentId));
13768
+ };
13769
+ /** Adds a reply to its cached parent's `children` (and count) once. */
13770
+ const linkCommentToParent = (comment) => {
13771
+ var _a;
13772
+ if (!comment.parentId)
13773
+ return;
13774
+ const parentKey = ['comment', 'get', comment.parentId];
13775
+ const parent = (_a = pullFromCache(parentKey)) === null || _a === void 0 ? void 0 : _a.data;
13776
+ if (!parent || parent.children.includes(comment.commentId))
13777
+ return;
13778
+ pushToCache(parentKey, Object.assign(Object.assign({}, parent), { childrenNumber: parent.childrenNumber + 1, children: [...new Set([...parent.children, comment.commentId])] }));
13779
+ };
13780
+ /** Removes a reply from its cached parent's `children` (and count) once. */
13781
+ const unlinkCommentFromParent = (comment) => {
13782
+ var _a;
13783
+ if (!comment.parentId)
13784
+ return;
13785
+ const parentKey = ['comment', 'get', comment.parentId];
13786
+ const parent = (_a = pullFromCache(parentKey)) === null || _a === void 0 ? void 0 : _a.data;
13787
+ if (!parent || !parent.children.includes(comment.commentId))
13788
+ return;
13789
+ pushToCache(parentKey, Object.assign(Object.assign({}, parent), { childrenNumber: parent.childrenNumber - 1, children: parent.children.filter(id => id !== comment.commentId) }));
13790
+ };
13791
+
13792
+ /**
13793
+ * The server's list is oldest → newest, so the newest ids are the last ones. Kept unique so the
13794
+ * create response, the local event and the realtime echo cannot each add the same comment.
13795
+ */
13796
+ const capLatestCommentIds = (commentIds) => [...new Set(commentIds)].slice(-LATEST_COMMENTS_LIMIT);
13797
+ /** A comment belongs in the post preview only while it is cached, not deleted and public. */
13798
+ const isPreviewableComment = (comment) => comment !== undefined && !comment.isDeleted && isCommentApproved(comment);
13799
+ /** The post's preview list after one of the user's own top-level comments is created. */
13800
+ const appendLatestCommentId = (post, commentId) => { var _a; return capLatestCommentIds([...((_a = post.comments) !== null && _a !== void 0 ? _a : []), commentId]); };
13801
+
12993
13802
  const postLinkedObject = (post) => {
12994
13803
  return shallowClone(post, {
12995
13804
  childrenPosts: post.children
@@ -13013,19 +13822,13 @@ const postLinkedObject = (post) => {
13013
13822
  get latestComments() {
13014
13823
  if (!post.comments)
13015
13824
  return [];
13016
- return (post.comments
13017
- .map(commentId => {
13018
- var _a;
13019
- const commentCached = (_a = pullFromCache([
13020
- 'comment',
13021
- 'get',
13022
- commentId,
13023
- ])) === null || _a === void 0 ? void 0 : _a.data;
13024
- if (!commentCached)
13025
- return null;
13026
- return commentLinkedObject(commentCached);
13027
- })
13028
- .filter(Boolean) || []);
13825
+ // Same rule as the server's own list and as iOS: deleted and non-public comments are
13826
+ // dropped first, then the newest LATEST_COMMENTS_LIMIT remain
13827
+ return post.comments
13828
+ .map(commentId => { var _a; return (_a = pullFromCache(['comment', 'get', commentId])) === null || _a === void 0 ? void 0 : _a.data; })
13829
+ .filter(isPreviewableComment)
13830
+ .slice(-LATEST_COMMENTS_LIMIT)
13831
+ .map(commentLinkedObject);
13029
13832
  },
13030
13833
  get creator() {
13031
13834
  // The id is checked for a value, not just for presence: a payload can
@@ -13038,6 +13841,15 @@ const postLinkedObject = (post) => {
13038
13841
  return undefined;
13039
13842
  return userLinkedObject(cacheData.data);
13040
13843
  },
13844
+ getLocalCommentCount(includePending = false) {
13845
+ var _a;
13846
+ const engine = PostCommentCountEngine$1.getInstance();
13847
+ // Before any payload has seeded the engine for this post there is no tracker; the
13848
+ // post's own figure is the best answer then.
13849
+ return engine.hasTracker(post.postId)
13850
+ ? engine.getLocalCommentCount(post.postId, includePending)
13851
+ : (_a = post.localCommentCount) !== null && _a !== void 0 ? _a : post.commentsCount;
13852
+ },
13041
13853
  get targetCommunity() {
13042
13854
  var _a;
13043
13855
  if (!post.targetId)
@@ -13402,7 +14214,8 @@ const messageLinkedObject = (message) => {
13402
14214
  },
13403
14215
  get creator() {
13404
14216
  var _a;
13405
- return (_a = pullFromCache(['user', 'get', message.creatorId])) === null || _a === void 0 ? void 0 : _a.data;
14217
+ const creator = (_a = pullFromCache(['user', 'get', message.creatorId])) === null || _a === void 0 ? void 0 : _a.data;
14218
+ return creator ? userLinkedObject(creator) : undefined;
13406
14219
  }, markRead: () => markReadMessage(message), addReaction: (reactionName) => addReactionToMessage(reactionName, message), removeReaction: (reactionName) => removeReactionToMessage(reactionName, message) });
13407
14220
  };
13408
14221
 
@@ -13994,6 +14807,9 @@ class RSVPLiveCollectionController extends LiveCollectionController {
13994
14807
  * @category RSVP Live Collection
13995
14808
  *
13996
14809
  */
14810
+ /* begin_public_function
14811
+ id: event.get-rsvps
14812
+ */
13997
14813
  const getRSVPs = (params, callback, config) => {
13998
14814
  const { log, cache } = getActiveClient();
13999
14815
  if (!cache)
@@ -14063,6 +14879,22 @@ const eventLinkedObject = (event) => {
14063
14879
  } });
14064
14880
  };
14065
14881
 
14882
+ const curatedContentTopicLinkedObject = (topic) => {
14883
+ return shallowClone(topic, {
14884
+ analytics: {
14885
+ markAsViewed: () => {
14886
+ AnalyticsEngine$1.getInstance().markCuratedContentWidgetAsViewed(topic.topicId);
14887
+ },
14888
+ markPostAsViewed: (postId) => {
14889
+ AnalyticsEngine$1.getInstance().markCuratedContentPostAsViewed(postId, topic.topicId);
14890
+ },
14891
+ markPostClick: (postId) => {
14892
+ AnalyticsEngine$1.getInstance().markCuratedContentPostAsClicked(postId, topic.topicId);
14893
+ },
14894
+ },
14895
+ });
14896
+ };
14897
+
14066
14898
  const LinkedObject = {
14067
14899
  file: fileLinkedObject,
14068
14900
  ad: adLinkedObject,
@@ -14087,6 +14919,7 @@ const LinkedObject = {
14087
14919
  eventResponse: eventResponseLinkedObject,
14088
14920
  product: productLinkedObject,
14089
14921
  poll: pollLinkedObject,
14922
+ curatedContentTopic: curatedContentTopicLinkedObject,
14090
14923
  };
14091
14924
 
14092
14925
  /* begin_public_function
@@ -15335,6 +16168,9 @@ const queryReachUser = async ({ viewId, viewedType, limit, token, }) => {
15335
16168
  return response.data;
15336
16169
  };
15337
16170
 
16171
+ /* begin_public_function
16172
+ id: user.get-reached-users
16173
+ */
15338
16174
  const getReachedUsers = (params, callback) => {
15339
16175
  // Pre-defined function to avoid undefined function call
15340
16176
  let onFetch = (initial = false) => undefined;
@@ -15409,9 +16245,9 @@ var AmityUserSearchMatchType;
15409
16245
  AmityUserSearchMatchType["PARTIAL"] = "partial";
15410
16246
  })(AmityUserSearchMatchType || (AmityUserSearchMatchType = {}));
15411
16247
 
15412
- var index$q = /*#__PURE__*/Object.freeze({
16248
+ var index$r = /*#__PURE__*/Object.freeze({
15413
16249
  __proto__: null,
15414
- Relationship: index$r,
16250
+ Relationship: index$s,
15415
16251
  getUserByIds: getUserByIds,
15416
16252
  updateUser: updateUser,
15417
16253
  flagUser: flagUser,
@@ -15580,7 +16416,7 @@ const fileUrlWithSize = (fileUrl, size) => {
15580
16416
  };
15581
16417
 
15582
16418
  /* begin_public_function
15583
- id: file.upload.video, file.upload.audio
16419
+ id: file.upload.video
15584
16420
  */
15585
16421
  /**
15586
16422
  * ```js
@@ -15819,7 +16655,7 @@ const uploadAudio = async (formData, onProgress) => {
15819
16655
  };
15820
16656
  /* end_public_function */
15821
16657
 
15822
- var index$p = /*#__PURE__*/Object.freeze({
16658
+ var index$q = /*#__PURE__*/Object.freeze({
15823
16659
  __proto__: null,
15824
16660
  getFile: getFile,
15825
16661
  uploadFile: uploadFile,
@@ -16012,147 +16848,6 @@ getMessage$1.locally = (messageId) => {
16012
16848
  };
16013
16849
  };
16014
16850
 
16015
- class ResetTask {
16016
- constructor(postId, latestCreatedAt, serverCommentCount) {
16017
- this.postId = postId;
16018
- this.latestCreatedAt = latestCreatedAt;
16019
- this.serverCommentCount = serverCommentCount;
16020
- }
16021
- }
16022
-
16023
- // Task to track comment creation
16024
- class CreateTask {
16025
- constructor(postId, commentId, createdAt) {
16026
- this.postId = postId;
16027
- this.commentId = commentId;
16028
- this.createdAt = createdAt;
16029
- }
16030
- }
16031
-
16032
- // Task to track comment deletion
16033
- class DeleteTask {
16034
- constructor(postId, commentId) {
16035
- this.postId = postId;
16036
- this.commentId = commentId;
16037
- }
16038
- }
16039
-
16040
- class CommentChange {
16041
- constructor(latestCreatedAt, serverCommentCount) {
16042
- this.latestCommentCreatedAt = latestCreatedAt;
16043
- this.serverCommentCount = serverCommentCount;
16044
- this.createdCommentIds = new Set();
16045
- this.deletedCommentIds = new Set();
16046
- }
16047
- }
16048
-
16049
- class PostCommentCountEngine {
16050
- constructor() {
16051
- this.isProcessing = false;
16052
- this.tasks = [];
16053
- this.commentChangeTracker = new Map();
16054
- }
16055
- queueCommentChangeTask(task) {
16056
- this.tasks.push(task);
16057
- if (!this.isProcessing) {
16058
- this.processCommentChangeTask();
16059
- }
16060
- }
16061
- processCommentChangeTask() {
16062
- if (this.isProcessing) {
16063
- return;
16064
- }
16065
- this.isProcessing = true;
16066
- if (this.tasks.length === 0) {
16067
- this.isProcessing = false;
16068
- return;
16069
- }
16070
- // Process in capped batches, coalescing updates
16071
- const batch = this.tasks.splice(0, PostCommentCountEngine.BATCH_SIZE);
16072
- const modifiedPostIds = new Set();
16073
- batch.forEach(task => {
16074
- let modified = false;
16075
- if (task instanceof ResetTask) {
16076
- modified = this.processResetTaskInternal(task);
16077
- }
16078
- else if (task instanceof CreateTask) {
16079
- modified = this.processCreateTaskInternal(task);
16080
- }
16081
- else if (task instanceof DeleteTask) {
16082
- modified = this.processDeleteTaskInternal(task);
16083
- }
16084
- if (modified) {
16085
- modifiedPostIds.add(task.postId);
16086
- }
16087
- });
16088
- // Publish one update per modified post
16089
- modifiedPostIds.forEach(postId => {
16090
- const count = this.computeCommentCount(postId);
16091
- PostCommentCountEngine.publishUpdate(postId, count);
16092
- });
16093
- this.isProcessing = false;
16094
- // Recurse if more tasks remain
16095
- if (this.tasks.length > 0) {
16096
- this.processCommentChangeTask();
16097
- }
16098
- }
16099
- processResetTaskInternal(task) {
16100
- // Always creates/overwrites tracker
16101
- this.commentChangeTracker.set(task.postId, new CommentChange(task.latestCreatedAt, task.serverCommentCount));
16102
- return true;
16103
- }
16104
- processCreateTaskInternal(task) {
16105
- const tracker = this.commentChangeTracker.get(task.postId);
16106
- if (!tracker)
16107
- return false; // No tracker, skip
16108
- if (tracker.createdCommentIds.has(task.commentId))
16109
- return false; // Deduplication
16110
- if (task.createdAt <= tracker.latestCommentCreatedAt)
16111
- return false; // Timestamp filtering
16112
- tracker.createdCommentIds.add(task.commentId);
16113
- return true;
16114
- }
16115
- processDeleteTaskInternal(task) {
16116
- const tracker = this.commentChangeTracker.get(task.postId);
16117
- if (!tracker)
16118
- return false; // No tracker, skip
16119
- if (tracker.deletedCommentIds.has(task.commentId))
16120
- return false; // Deduplication
16121
- tracker.deletedCommentIds.add(task.commentId);
16122
- return true;
16123
- }
16124
- computeCommentCount(postId) {
16125
- const tracker = this.commentChangeTracker.get(postId);
16126
- if (!tracker)
16127
- return 0;
16128
- const count = tracker.serverCommentCount + tracker.createdCommentIds.size - tracker.deletedCommentIds.size;
16129
- return Math.max(0, count);
16130
- }
16131
- static publishUpdate(postId, newCount) {
16132
- var _a;
16133
- const queryKey = ['post', 'get', postId];
16134
- mergeInCache(queryKey, {
16135
- localCommentCount: newCount,
16136
- });
16137
- const postPayload = (_a = pullFromCache(queryKey)) === null || _a === void 0 ? void 0 : _a.data;
16138
- if (!postPayload)
16139
- return;
16140
- fireEvent('local.post.updated', {
16141
- posts: [postPayload],
16142
- });
16143
- }
16144
- }
16145
- PostCommentCountEngine.BATCH_SIZE = 50;
16146
- let instance;
16147
- var PostCommentCountEngine$1 = {
16148
- getInstance: () => {
16149
- if (!instance) {
16150
- instance = new PostCommentCountEngine();
16151
- }
16152
- return instance;
16153
- },
16154
- };
16155
-
16156
16851
  const updateStreamReferences = (streams, streamId, postId) => {
16157
16852
  if (!streamId)
16158
16853
  return streams;
@@ -16172,7 +16867,7 @@ const preparePostPayload = (payload) => {
16172
16867
  let mappedNewStream = [];
16173
16868
  // feed type
16174
16869
  const posts = postsData.map(post => {
16175
- var _a, _b, _c, _d;
16870
+ var _a, _b, _c;
16176
16871
  const feedType = (_a = postPayload.feeds.find(feed => feed.feedId === post.feedId)) === null || _a === void 0 ? void 0 : _a.feedType;
16177
16872
  const childPosts = payload.postChildren.filter(children => children.parentPostId === post.postId);
16178
16873
  if (childPosts.length > 0 && isAmityLivestreamPost(childPosts[0])) {
@@ -16191,7 +16886,11 @@ const preparePostPayload = (payload) => {
16191
16886
  // Queue ResetTask for this post
16192
16887
  PostCommentCountEngine$1.getInstance().queueCommentChangeTask(new ResetTask(post.postId, latestCreatedAt, (_c = post.commentsCount) !== null && _c !== void 0 ? _c : 0));
16193
16888
  return Object.assign(Object.assign({}, post), { childPosts,
16194
- feedType, localCommentCount: (_d = post.localCommentCount) !== null && _d !== void 0 ? _d : post.commentsCount, pinnedProductId: post === null || post === void 0 ? void 0 : post.pinnedProductId });
16889
+ feedType,
16890
+ // The ResetTask above has just seeded the engine, so this is the server figure plus the
16891
+ // author's own pending comments. Reading `post.commentsCount` here instead would overwrite
16892
+ // that +1 in the cache on every refresh, since the ingest that follows merges this object.
16893
+ localCommentCount: PostCommentCountEngine$1.getInstance().getLocalCommentCount(post.postId, true), pinnedProductId: post === null || post === void 0 ? void 0 : post.pinnedProductId });
16195
16894
  });
16196
16895
  return Object.assign(Object.assign({}, postPayload), { postChildren, videoStreamings: mappedNewStream, posts, communities: communityWithMembershipStatus, communityUsers: mappedCommunityUsers });
16197
16896
  };
@@ -16944,62 +17643,67 @@ const onPostReactionRemoved = (callback) => {
16944
17643
  return createEventSubscriber(client, 'post.removeReaction', 'post.removeReaction', filter);
16945
17644
  };
16946
17645
 
17646
+ /**
17647
+ * `comment.created` fires while a comment is still pending, so delivery is not visibility. The
17648
+ * two side effects that make a comment public — the parent link that feeds the reply list and
17649
+ * the comment-count task — are gated here; `comment.approved` is the only reveal signal, and a
17650
+ * decline arrives as `comment.deleted`.
17651
+ */
17652
+ const applyApprovalSideEffects = (event, comment, previous) => {
17653
+ switch (event) {
17654
+ case 'comment.created':
17655
+ if (isCommentPending(comment)) {
17656
+ recordPendingAuthoredComment(comment);
17657
+ }
17658
+ else {
17659
+ linkCommentToParent(comment);
17660
+ applyCommentCreatedCount(comment);
17661
+ }
17662
+ break;
17663
+ case 'comment.approved':
17664
+ linkCommentToParent(comment);
17665
+ applyCommentApprovedCount(comment);
17666
+ break;
17667
+ case 'comment.updated':
17668
+ // An effective edit in a gated community sends an approved comment back for review
17669
+ if (isCommentPending(comment) && previous && isCommentApproved(previous)) {
17670
+ unlinkCommentFromParent(comment);
17671
+ applyCommentReReviewCount(comment);
17672
+ }
17673
+ break;
17674
+ case 'comment.deleted':
17675
+ unlinkCommentFromParent(comment);
17676
+ // A pending comment was never counted, so its deletion (or decline) moves no count
17677
+ if (previous && isCommentPending(previous))
17678
+ releasePendingAuthoredComment(comment);
17679
+ break;
17680
+ }
17681
+ };
16947
17682
  const createCommentEventSubscriber = (event, callback) => {
16948
17683
  const client = getActiveClient();
16949
17684
  const filter = (payload) => {
16950
- var _a;
17685
+ var _a, _b;
16951
17686
  if (!client.cache) {
16952
17687
  // TODO: here we are missing specific properties here!
16953
17688
  callback(LinkedObject.comment(payload.comments[0]));
16954
17689
  }
16955
17690
  else {
16956
- const processed = ['comment.flagged', 'comment.unflagged'].includes(event)
17691
+ const flagged = ['comment.flagged', 'comment.unflagged'].includes(event)
16957
17692
  ? prepareCommentFromFlaggedEvent(payload)
16958
17693
  : payload;
16959
- // NOTE: The event data should be merge with existing cache rather than replace it
16960
- ingestInCache(processed, undefined, false);
17694
+ // Resolve `approvalStatus` before the merge: an absent value means approved and has to
17695
+ // overwrite a cached `pending`, which a plain merge would leave in place.
17696
+ const processed = prepareCommentPayload(flagged);
16961
17697
  const { comments } = processed;
16962
17698
  if (comments.length > 0) {
16963
- const comment = pullFromCache([
16964
- 'comment',
16965
- 'get',
16966
- comments[0].commentId,
16967
- ]);
16968
- if (['comment.created'].includes(event)) {
16969
- if (comments[0].parentId) {
16970
- const parentComment = pullFromCache([
16971
- 'comment',
16972
- 'get',
16973
- comments[0].parentId,
16974
- ]);
16975
- if (parentComment === null || parentComment === void 0 ? void 0 : parentComment.data) {
16976
- // Skip to update parent childComment if current comment already exists
16977
- if (!parentComment.data.children.includes(comments[0].commentId)) {
16978
- pushToCache(['comment', 'get', comments[0].parentId], Object.assign(Object.assign({}, parentComment.data), { childrenNumber: parentComment.data.childrenNumber + 1, children: [...new Set([...parentComment.data.children, comments[0].commentId])] }));
16979
- }
16980
- }
16981
- }
16982
- }
17699
+ const commentKey = ['comment', 'get', comments[0].commentId];
17700
+ const previous = (_a = pullFromCache(commentKey)) === null || _a === void 0 ? void 0 : _a.data;
17701
+ // NOTE: The event data should be merge with existing cache rather than replace it
17702
+ ingestInCache(processed, undefined, false);
17703
+ const comment = pullFromCache(commentKey);
17704
+ applyApprovalSideEffects(event, comment.data, previous);
16983
17705
  if (['comment.deleted'].includes(event)) {
16984
- if (comments[0].parentId) {
16985
- const parentComment = pullFromCache([
16986
- 'comment',
16987
- 'get',
16988
- comments[0].parentId,
16989
- ]);
16990
- if (parentComment === null || parentComment === void 0 ? void 0 : parentComment.data) {
16991
- // Remove deleted comment in parent childComment if still exists
16992
- if (parentComment.data.children.includes(comments[0].commentId)) {
16993
- const newParentComment = Object.assign(Object.assign({}, parentComment.data), { childrenNumber: parentComment.data.childrenNumber - 1, children: [
16994
- ...new Set([
16995
- ...parentComment.data.children.filter(id => id !== comments[0].commentId),
16996
- ]),
16997
- ] });
16998
- pushToCache(['comment', 'get', comments[0].parentId], newParentComment);
16999
- }
17000
- }
17001
- }
17002
- const queries = (_a = queryCache(['comment', 'query'])) === null || _a === void 0 ? void 0 : _a.filter(({ key }) => { var _a; return ((_a = key[2]) === null || _a === void 0 ? void 0 : _a.referenceId) === comment.data.referenceId; });
17706
+ const queries = (_b = queryCache(['comment', 'query'])) === null || _b === void 0 ? void 0 : _b.filter(({ key }) => { var _a; return ((_a = key[2]) === null || _a === void 0 ? void 0 : _a.referenceId) === comment.data.referenceId; });
17003
17707
  queries === null || queries === void 0 ? void 0 : queries.map(({ key, data }) => upsertInCache(key, data, { cachedAt: -1 }));
17004
17708
  }
17005
17709
  callback(LinkedObject.comment(comment.data));
@@ -17011,13 +17715,13 @@ const createCommentEventSubscriber = (event, callback) => {
17011
17715
  const createLocalCommentEventSubscriber = (event, callback) => {
17012
17716
  const client = getActiveClient();
17013
17717
  const filter = (payload) => {
17014
- var _a, _b, _c, _d, _e;
17718
+ var _a, _b, _c, _d;
17015
17719
  if (!client.cache) {
17016
17720
  // TODO: here we are missing specific properties here!
17017
17721
  callback(LinkedObject.comment(payload.comments[0]));
17018
17722
  }
17019
17723
  else {
17020
- const processed = payload;
17724
+ const processed = prepareCommentPayload(payload);
17021
17725
  ingestInCache(processed);
17022
17726
  const { comments } = processed;
17023
17727
  if (comments.length > 0) {
@@ -17026,7 +17730,9 @@ const createLocalCommentEventSubscriber = (event, callback) => {
17026
17730
  'get',
17027
17731
  comments[0].commentId,
17028
17732
  ]);
17029
- if (['local.comment.created'].includes(event)) {
17733
+ // A pending comment is persisted for its author but never linked into the public
17734
+ // surfaces (parent reply list, post comment list)
17735
+ if (['local.comment.created'].includes(event) && isCommentApproved(comments[0])) {
17030
17736
  if (comments[0].parentId) {
17031
17737
  const parentComment = pullFromCache([
17032
17738
  'comment',
@@ -17055,11 +17761,11 @@ const createLocalCommentEventSubscriber = (event, callback) => {
17055
17761
  const postCacheKey = ['post', 'get', comments[0].referenceId];
17056
17762
  const postCache = (_a = pullFromCache(postCacheKey)) === null || _a === void 0 ? void 0 : _a.data;
17057
17763
  if (postCache) {
17058
- const updatedPostCache = Object.assign(Object.assign({}, postCache), { comments: [...postCache.comments, (_b = comments[0]) === null || _b === void 0 ? void 0 : _b.commentId] });
17764
+ const updatedPostCache = Object.assign(Object.assign({}, postCache), { comments: appendLatestCommentId(postCache, comments[0].commentId) });
17059
17765
  pushToCache(postCacheKey, updatedPostCache);
17060
17766
  }
17061
17767
  }
17062
- const queries = (_c = queryCache(['comment', 'query'])) === null || _c === void 0 ? void 0 : _c.filter(({ key }) => { var _a; return ((_a = key[2]) === null || _a === void 0 ? void 0 : _a.referenceId) === comment.data.referenceId; });
17768
+ const queries = (_b = queryCache(['comment', 'query'])) === null || _b === void 0 ? void 0 : _b.filter(({ key }) => { var _a; return ((_a = key[2]) === null || _a === void 0 ? void 0 : _a.referenceId) === comment.data.referenceId; });
17063
17769
  queries === null || queries === void 0 ? void 0 : queries.map(({ key, data }) => upsertInCache(key, data, { cachedAt: -1 }));
17064
17770
  }
17065
17771
  if (['local.comment.deleted'].includes(event)) {
@@ -17093,13 +17799,13 @@ const createLocalCommentEventSubscriber = (event, callback) => {
17093
17799
  }
17094
17800
  else {
17095
17801
  const postCacheKey = ['post', 'get', comments[0].referenceId];
17096
- const postCache = (_d = pullFromCache(postCacheKey)) === null || _d === void 0 ? void 0 : _d.data;
17802
+ const postCache = (_c = pullFromCache(postCacheKey)) === null || _c === void 0 ? void 0 : _c.data;
17097
17803
  if (postCache) {
17098
17804
  const updatedPost = Object.assign(Object.assign({}, postCache), { comments: postCache === null || postCache === void 0 ? void 0 : postCache.comments.filter(commentId => { var _a; return commentId !== ((_a = comments[0]) === null || _a === void 0 ? void 0 : _a.commentId); }) });
17099
17805
  pushToCache(postCacheKey, updatedPost);
17100
17806
  }
17101
17807
  }
17102
- const queries = (_e = queryCache(['comment', 'query'])) === null || _e === void 0 ? void 0 : _e.filter(({ key }) => { var _a; return ((_a = key[2]) === null || _a === void 0 ? void 0 : _a.referenceId) === comment.data.referenceId; });
17808
+ const queries = (_d = queryCache(['comment', 'query'])) === null || _d === void 0 ? void 0 : _d.filter(({ key }) => { var _a; return ((_a = key[2]) === null || _a === void 0 ? void 0 : _a.referenceId) === comment.data.referenceId; });
17103
17809
  queries === null || queries === void 0 ? void 0 : queries.map(({ key, data }) => upsertInCache(key, data, { cachedAt: -1 }));
17104
17810
  }
17105
17811
  callback(LinkedObject.comment(comment.data));
@@ -17160,6 +17866,23 @@ const onCommentUpdated = (callback) => createCommentEventSubscriber('comment.upd
17160
17866
  */
17161
17867
  const onCommentDeleted = (callback) => createCommentEventSubscriber('comment.deleted', callback);
17162
17868
 
17869
+ /**
17870
+ * ```js
17871
+ * import { onCommentApproved } from '@amityco/ts-sdk'
17872
+ * const dispose = onCommentApproved(comment => {
17873
+ * // ...
17874
+ * })
17875
+ * ```
17876
+ *
17877
+ * Fired when a {@link Amity.InternalComment} held for review has been approved
17878
+ *
17879
+ * @param callback The function to call when the event was fired
17880
+ * @returns an {@link Amity.Unsubscriber} function to stop listening
17881
+ *
17882
+ * @category Comment Events
17883
+ */
17884
+ const onCommentApproved = (callback) => createCommentEventSubscriber('comment.approved', callback);
17885
+
17163
17886
  /**
17164
17887
  * ```js
17165
17888
  * import { onCommentFlagged } from '@amityco/ts-sdk'
@@ -17751,6 +18474,7 @@ class ReactionLiveCollectionController extends LiveCollectionController {
17751
18474
  /* eslint-disable no-use-before-define */
17752
18475
  /* begin_public_function
17753
18476
  id: reaction.query
18477
+ spec: SDK/API/reaction/getReactions/v1.md
17754
18478
  */
17755
18479
  /**
17756
18480
  * ```js
@@ -17792,7 +18516,7 @@ const getReactions$1 = (params, callback, config) => {
17792
18516
  };
17793
18517
  /* end_public_function */
17794
18518
 
17795
- var index$o = /*#__PURE__*/Object.freeze({
18519
+ var index$p = /*#__PURE__*/Object.freeze({
17796
18520
  __proto__: null,
17797
18521
  addReaction: addReaction,
17798
18522
  removeReaction: removeReaction,
@@ -17803,17 +18527,6 @@ var index$o = /*#__PURE__*/Object.freeze({
17803
18527
  getReactions: getReactions$1
17804
18528
  });
17805
18529
 
17806
- function prepareCommentPayload(commentPayload) {
17807
- const { comments } = commentPayload;
17808
- return Object.assign(Object.assign({}, commentPayload), { comments: comments.map(comment => {
17809
- if (comment.hasOwnProperty('myReactions'))
17810
- return comment;
17811
- // Sometimes `myReactions` field will not come with BE response because that field is empty
17812
- // We need to put it with an empty array manually to make it show up in client side
17813
- return Object.assign({ myReactions: [] }, comment);
17814
- }) });
17815
- }
17816
-
17817
18530
  const createMessageReport = async ({ client, referenceId, }) => {
17818
18531
  const { data: payload } = await client.http.post(`/api/v5/messages/${encodeURIComponent(referenceId)}/flags`);
17819
18532
  if (client.cache) {
@@ -17960,7 +18673,7 @@ const getPostReport = async ({ client, referenceId, }) => {
17960
18673
  };
17961
18674
  const getUserReport = async ({ client, referenceId, }) => {
17962
18675
  var _a;
17963
- const { data } = await client.http.get(`/api/v3/users/${referenceId}/isflagbyme`);
18676
+ const { data } = await client.http.get(`/api/v3/users/${referenceId}/isFlagByMe`);
17964
18677
  const { result, isFlagByMe } = data !== null && data !== void 0 ? data : {};
17965
18678
  return (_a = result !== null && result !== void 0 ? result : isFlagByMe) !== null && _a !== void 0 ? _a : false;
17966
18679
  };
@@ -18277,20 +18990,20 @@ const getArchivedChannelIds = async () => {
18277
18990
 
18278
18991
  /**
18279
18992
  * ```js
18280
- * import { onMessageUpdated } from '@amityco/ts-sdk'
18281
- * const dispose = onMessageUpdated(message => {
18993
+ * import { onMessageDeleted } from '@amityco/ts-sdk'
18994
+ * const dispose = onMessageDeleted(message => {
18282
18995
  * // ...
18283
18996
  * })
18284
18997
  * ```
18285
18998
  *
18286
- * Fired when an {@link Amity.Message} has been updated
18999
+ * Fired when an {@link Amity.Message} was deleted
18287
19000
  *
18288
19001
  * @param callback The function to call when the event was fired
18289
19002
  * @returns an {@link Amity.Unsubscriber} function to stop listening
18290
19003
  *
18291
19004
  * @category Message Events
18292
19005
  */
18293
- const onMessageUpdated = (callback) => {
19006
+ const onMessageDeleted = (callback) => {
18294
19007
  const client = getActiveClient();
18295
19008
  const filter = async (rawPayload) => {
18296
19009
  const payload = await prepareMessagePayload(rawPayload);
@@ -18298,30 +19011,48 @@ const onMessageUpdated = (callback) => {
18298
19011
  callback(payload.messages[0]);
18299
19012
  };
18300
19013
  const disposers = [
18301
- createEventSubscriber(client, 'onMessageUpdated', 'message.updated', filter),
18302
- createEventSubscriber(client, 'onMessageUpdated', 'local.message.updated', payload => callback(payload.messages[0])),
19014
+ createEventSubscriber(client, 'message/onMessageDeleted', 'message.deleted', filter),
19015
+ createEventSubscriber(client, 'message/onMessageDeleted', 'local.message.deleted', payload => callback(payload.messages[0])),
18303
19016
  ];
18304
19017
  return () => {
18305
19018
  disposers.forEach(fn => fn());
18306
19019
  };
18307
19020
  };
18308
19021
 
19022
+ /**
19023
+ * Defensive clear of `channel.pinnedMessage` when the pinned message itself is deleted.
19024
+ *
19025
+ * The server also emits `channel.messageUnpinned` in this case, but realtime events are
19026
+ * fire-and-forget and their order is not guaranteed. Clearing on `message.deleted`
19027
+ * (MQTT or local) makes the banner disappear even if the unpin event is lost; the
19028
+ * server's own `messageUnpinned` then becomes a no-op.
19029
+ *
19030
+ * Internal — wired into the `getChannel` live object; not exported publicly.
19031
+ */
19032
+ const onChannelPinnedMessageDeleted = (callback) => onMessageDeleted(message => {
19033
+ var _a;
19034
+ const channel = findCachedChannelByAnyId(message.channelId);
19035
+ if (!channel || ((_a = channel.pinnedMessage) === null || _a === void 0 ? void 0 : _a.messageId) !== message.messageId)
19036
+ return;
19037
+ callback(updatePinnedMessageCache(channel, null));
19038
+ });
19039
+
18309
19040
  /**
18310
19041
  * ```js
18311
- * import { onMessageDeleted } from '@amityco/ts-sdk'
18312
- * const dispose = onMessageDeleted(message => {
19042
+ * import { onMessageUpdated } from '@amityco/ts-sdk'
19043
+ * const dispose = onMessageUpdated(message => {
18313
19044
  * // ...
18314
19045
  * })
18315
19046
  * ```
18316
19047
  *
18317
- * Fired when an {@link Amity.Message} was deleted
19048
+ * Fired when an {@link Amity.Message} has been updated
18318
19049
  *
18319
19050
  * @param callback The function to call when the event was fired
18320
19051
  * @returns an {@link Amity.Unsubscriber} function to stop listening
18321
19052
  *
18322
19053
  * @category Message Events
18323
19054
  */
18324
- const onMessageDeleted = (callback) => {
19055
+ const onMessageUpdated = (callback) => {
18325
19056
  const client = getActiveClient();
18326
19057
  const filter = async (rawPayload) => {
18327
19058
  const payload = await prepareMessagePayload(rawPayload);
@@ -18329,8 +19060,8 @@ const onMessageDeleted = (callback) => {
18329
19060
  callback(payload.messages[0]);
18330
19061
  };
18331
19062
  const disposers = [
18332
- createEventSubscriber(client, 'message/onMessageDeleted', 'message.deleted', filter),
18333
- createEventSubscriber(client, 'message/onMessageDeleted', 'local.message.deleted', payload => callback(payload.messages[0])),
19063
+ createEventSubscriber(client, 'onMessageUpdated', 'message.updated', filter),
19064
+ createEventSubscriber(client, 'onMessageUpdated', 'local.message.updated', payload => callback(payload.messages[0])),
18334
19065
  ];
18335
19066
  return () => {
18336
19067
  disposers.forEach(fn => fn());
@@ -18911,6 +19642,132 @@ softDeleteMessage.optimistically = (messageId) => {
18911
19642
  };
18912
19643
  /* end_public_function */
18913
19644
 
19645
+ /**
19646
+ * Fire-and-forget refresh of `channelUsers[...].permissions` for the channel a
19647
+ * message belongs to. Used by `pinMessage` / `unpinMessage` on `403` so the next
19648
+ * `hasPermission(PIN_MESSAGE).channel(channelId)` reflects a revoked role
19649
+ * ([`pinMessage` REQ-010](../../@types/../..) / [`unpinMessage` REQ-008](../../@types/../..)).
19650
+ *
19651
+ * The API only receives a `messageId`, so the channel is resolved through the
19652
+ * local cache: first the message row, then any cached channel whose current pin
19653
+ * is that message. When nothing matches the refresh is skipped — the next
19654
+ * channel read picks up the fresh permissions anyway.
19655
+ */
19656
+ const refreshChannelPermissionsForMessage = (messageId) => {
19657
+ var _a, _b, _c;
19658
+ const cachedMessage = (_a = getMessage$1.locally(messageId)) === null || _a === void 0 ? void 0 : _a.data;
19659
+ let channelId = cachedMessage === null || cachedMessage === void 0 ? void 0 : cachedMessage.channelId;
19660
+ if (!channelId) {
19661
+ channelId = (_c = (_b = queryCache(['channel', 'get'])) === null || _b === void 0 ? void 0 : _b.find(({ data }) => { var _a; return ((_a = data.pinnedMessage) === null || _a === void 0 ? void 0 : _a.messageId) === messageId; })) === null || _c === void 0 ? void 0 : _c.data.channelId;
19662
+ }
19663
+ if (!channelId)
19664
+ return;
19665
+ getChannel$1(channelId).catch(() => {
19666
+ /* silent per spec; UIKit renders no error toast */
19667
+ });
19668
+ };
19669
+
19670
+ /* begin_public_function
19671
+ id: message.pin
19672
+ */
19673
+ /**
19674
+ * ```js
19675
+ * import { MessageRepository } from '@amityco/ts-sdk'
19676
+ * const channel = await MessageRepository.pinMessage(messageId)
19677
+ * console.log(channel.pinnedMessage)
19678
+ * ```
19679
+ *
19680
+ * Pins a {@link Amity.Message} in its livestream (`live`) channel. A channel holds at
19681
+ * most one pinned message: pinning a different message replaces the current pin in a
19682
+ * single step — no unpin is needed first. Pinning the message that is already pinned is
19683
+ * rejected by the server (400).
19684
+ *
19685
+ * The caller must hold the `PIN_MESSAGE` permission in the channel (or be an admin with
19686
+ * `ModerateChannel`). The server also rejects pinning a deleted message, a message whose
19687
+ * author is banned from the channel or globally banned, and pinning in any channel type
19688
+ * other than `live`. On any error the pin state is left unchanged.
19689
+ *
19690
+ * The response is the affected channel; it is ingested into cache and fires
19691
+ * `local.channel.updated`, so `ChannelRepository.getChannel` observers update without
19692
+ * waiting for the `channel.messagePinned` realtime event.
19693
+ *
19694
+ * @param messageId the **internal** ID of the {@link Amity.Message} to pin
19695
+ * @returns the updated {@link Amity.Channel}, with `pinnedMessage` set
19696
+ *
19697
+ * @category Message API
19698
+ * @async
19699
+ */
19700
+ const pinMessage = async (messageId) => {
19701
+ const client = getActiveClient();
19702
+ client.log('message/pinMessage', messageId);
19703
+ let payload;
19704
+ try {
19705
+ ({ data: payload } = await client.http.post(`/api/v5/messages/${encodeURIComponent(messageId)}/pin`));
19706
+ }
19707
+ catch (error) {
19708
+ if ((error === null || error === void 0 ? void 0 : error.code) === 400301 /* Amity.ServerError.PERMISSION_DENIED */) {
19709
+ refreshChannelPermissionsForMessage(messageId);
19710
+ }
19711
+ throw error;
19712
+ }
19713
+ const data = await prepareChannelPayload(payload);
19714
+ if (client.cache)
19715
+ ingestInCache(data);
19716
+ fireEvent('local.channel.updated', data);
19717
+ return constructChannelObject(data.channels[0]);
19718
+ };
19719
+ /* end_public_function */
19720
+
19721
+ /* begin_public_function
19722
+ id: message.unpin
19723
+ */
19724
+ /**
19725
+ * ```js
19726
+ * import { MessageRepository } from '@amityco/ts-sdk'
19727
+ * const channel = await MessageRepository.unpinMessage(messageId)
19728
+ * console.log(channel.pinnedMessage) // null
19729
+ * ```
19730
+ *
19731
+ * Removes the pin from a {@link Amity.Message}. `messageId` must be the message that is
19732
+ * **currently** pinned in its channel; otherwise the server answers 400 — this is
19733
+ * deliberate, so a stale client cannot clear a pin that someone else has since replaced.
19734
+ * On that error, re-read the channel (or rely on the `channel.messagePinned` event) to
19735
+ * get the current pin.
19736
+ *
19737
+ * The caller must hold the `PIN_MESSAGE` permission in the channel (or be an admin with
19738
+ * `ModerateChannel`). Unpinning is allowed regardless of channel type and stream state.
19739
+ *
19740
+ * The response is the affected channel; it is ingested into cache and fires
19741
+ * `local.channel.updated`, so `ChannelRepository.getChannel` observers update without
19742
+ * waiting for the `channel.messageUnpinned` realtime event.
19743
+ *
19744
+ * @param messageId the **internal** ID of the currently pinned {@link Amity.Message}
19745
+ * @returns the updated {@link Amity.Channel}, with `pinnedMessage` cleared
19746
+ *
19747
+ * @category Message API
19748
+ * @async
19749
+ */
19750
+ const unpinMessage = async (messageId) => {
19751
+ const client = getActiveClient();
19752
+ client.log('message/unpinMessage', messageId);
19753
+ let payload;
19754
+ try {
19755
+ ({ data: payload } = await client.http.delete(`/api/v5/messages/${encodeURIComponent(messageId)}/pin`));
19756
+ }
19757
+ catch (error) {
19758
+ if ((error === null || error === void 0 ? void 0 : error.code) === 400301 /* Amity.ServerError.PERMISSION_DENIED */) {
19759
+ refreshChannelPermissionsForMessage(messageId);
19760
+ }
19761
+ throw error;
19762
+ }
19763
+ const data = await prepareChannelPayload(payload);
19764
+ if (client.cache)
19765
+ ingestInCache(data);
19766
+ fireEvent('local.channel.updated', data);
19767
+ return constructChannelObject(data.channels[0]);
19768
+ };
19769
+ /* end_public_function */
19770
+
18914
19771
  /**
18915
19772
  * ```js
18916
19773
  * import { MessageRepository } from '@amityco/ts-sdk'
@@ -19613,6 +20470,7 @@ class MessageLiveCollectionController extends LiveCollectionController {
19613
20470
 
19614
20471
  /* begin_public_function
19615
20472
  id: message.query
20473
+ spec: SDK/API/message/getMessages/v1.md
19616
20474
  */
19617
20475
  /**
19618
20476
  * ```js
@@ -19807,13 +20665,15 @@ const searchMessage = (params, callback) => {
19807
20665
  };
19808
20666
  /* end_public_function */
19809
20667
 
19810
- var index$n = /*#__PURE__*/Object.freeze({
20668
+ var index$o = /*#__PURE__*/Object.freeze({
19811
20669
  __proto__: null,
19812
20670
  createMessage: createMessage,
19813
20671
  updateMessage: updateMessage,
19814
20672
  editMessage: editMessage,
19815
20673
  deleteMessage: deleteMessage,
19816
20674
  softDeleteMessage: softDeleteMessage,
20675
+ pinMessage: pinMessage,
20676
+ unpinMessage: unpinMessage,
19817
20677
  markAsDelivered: markAsDelivered,
19818
20678
  getReadUsers: getReadUsers,
19819
20679
  getDeliveredUsers: getDeliveredUsers,
@@ -20243,6 +21103,7 @@ class SubChannelLiveCollectionController extends LiveCollectionController {
20243
21103
  /* eslint-disable no-use-before-define */
20244
21104
  /* begin_public_function
20245
21105
  id: subchannel.query
21106
+ spec: SDK/API/subChannel/getSubChannels/v1.md
20246
21107
  */
20247
21108
  /**
20248
21109
  * ```js
@@ -20343,7 +21204,7 @@ const stopMessageReceiptSync = (subChannelId) => {
20343
21204
  };
20344
21205
  /* end_public_function */
20345
21206
 
20346
- var index$m = /*#__PURE__*/Object.freeze({
21207
+ var index$n = /*#__PURE__*/Object.freeze({
20347
21208
  __proto__: null,
20348
21209
  getSubChannelByIds: getSubChannels$1,
20349
21210
  createSubChannel: createSubChannel,
@@ -20451,6 +21312,9 @@ const getChannel = (channelId, callback) => {
20451
21312
  onChannelMemberBanned,
20452
21313
  onChannelMemberUnbanned,
20453
21314
  onChannelSetMuted,
21315
+ onChannelMessagePinned,
21316
+ onChannelMessageUnpinned,
21317
+ onChannelPinnedMessageDeleted,
20454
21318
  convertEventPayload(onChannelMarkerFetched, 'entityId', 'channel'),
20455
21319
  convertEventPayload(onChannelMarkerUpdated, 'entityId', 'channel'),
20456
21320
  convertEventPayload((callback) => {
@@ -21076,6 +21940,14 @@ class ChannelLiveCollectionController extends LiveCollectionController {
21076
21940
  return;
21077
21941
  if (messagePreviewSetting ===
21078
21942
  "message-preview-not-include-deleted" /* Amity.MessagePreviewSetting.MESSAGE_PREVIEW_NOT_INCLUDE_DELETED */) {
21943
+ // The replacement preview the server sends back is an OLDER
21944
+ // message than the one just deleted, and
21945
+ // updateChannelMessagePreviewCache drops any preview that is not
21946
+ // newer than what is cached — so without clearing the entry
21947
+ // first the refetch is a no-op and the channel keeps showing the
21948
+ // deleted message. getChannel's own live object already does
21949
+ // this; the live collections did not.
21950
+ dropFromCache(['messagePreviewChannel', 'get', message.channelId]);
21079
21951
  await getChannel$1(message.channelId);
21080
21952
  }
21081
21953
  callback(message);
@@ -21187,6 +22059,7 @@ class ChannelLiveCollectionController extends LiveCollectionController {
21187
22059
  /* eslint-disable no-use-before-define */
21188
22060
  /* begin_public_function
21189
22061
  id: channel.query
22062
+ spec: SDK/API/channel/getChannels/v1.md
21190
22063
  */
21191
22064
  /**
21192
22065
  * ```js
@@ -21800,6 +22673,14 @@ class SearchChannelLiveCollectionController extends LiveCollectionController {
21800
22673
  return;
21801
22674
  if (messagePreviewSetting ===
21802
22675
  "message-preview-not-include-deleted" /* Amity.MessagePreviewSetting.MESSAGE_PREVIEW_NOT_INCLUDE_DELETED */) {
22676
+ // The replacement preview the server sends back is an OLDER
22677
+ // message than the one just deleted, and
22678
+ // updateChannelMessagePreviewCache drops any preview that is not
22679
+ // newer than what is cached — so without clearing the entry
22680
+ // first the refetch is a no-op and the channel keeps showing the
22681
+ // deleted message. getChannel's own live object already does
22682
+ // this; the live collections did not.
22683
+ dropFromCache(['messagePreviewChannel', 'get', message.channelId]);
21803
22684
  await getChannel$1(message.channelId);
21804
22685
  }
21805
22686
  callback(message);
@@ -22294,7 +23175,7 @@ const searchMembers$1 = (params, callback, config) => {
22294
23175
  };
22295
23176
  /* end_public_function */
22296
23177
 
22297
- var index$l = /*#__PURE__*/Object.freeze({
23178
+ var index$m = /*#__PURE__*/Object.freeze({
22298
23179
  __proto__: null,
22299
23180
  addMembers: addMembers$1,
22300
23181
  removeMembers: removeMembers$1,
@@ -22516,7 +23397,7 @@ const unmuteMembers = async (channelId, userIds) => {
22516
23397
  };
22517
23398
  /* end_public_function */
22518
23399
 
22519
- var index$k = /*#__PURE__*/Object.freeze({
23400
+ var index$l = /*#__PURE__*/Object.freeze({
22520
23401
  __proto__: null,
22521
23402
  addRole: addRole,
22522
23403
  removeRole: removeRole,
@@ -22526,10 +23407,10 @@ var index$k = /*#__PURE__*/Object.freeze({
22526
23407
  unmuteMembers: unmuteMembers
22527
23408
  });
22528
23409
 
22529
- var index$j = /*#__PURE__*/Object.freeze({
23410
+ var index$k = /*#__PURE__*/Object.freeze({
22530
23411
  __proto__: null,
22531
- Membership: index$l,
22532
- Moderation: index$k,
23412
+ Membership: index$m,
23413
+ Moderation: index$l,
22533
23414
  getChannelByIds: getChannelByIds$1,
22534
23415
  createChannel: createChannel,
22535
23416
  updateChannel: updateChannel,
@@ -22547,6 +23428,8 @@ var index$j = /*#__PURE__*/Object.freeze({
22547
23428
  onChannelJoined: onChannelJoined,
22548
23429
  onChannelLeft: onChannelLeft,
22549
23430
  onChannelSetMuted: onChannelSetMuted,
23431
+ onChannelMessagePinned: onChannelMessagePinned,
23432
+ onChannelMessageUnpinned: onChannelMessageUnpinned,
22550
23433
  onChannelMemberAdded: onChannelMemberAdded,
22551
23434
  onChannelMemberRemoved: onChannelMemberRemoved,
22552
23435
  onChannelMemberBanned: onChannelMemberBanned,
@@ -22564,7 +23447,11 @@ var index$j = /*#__PURE__*/Object.freeze({
22564
23447
  isUnreadCountSupport: isUnreadCountSupport,
22565
23448
  convertFromRaw: convertFromRaw,
22566
23449
  preUpdateChannelCache: preUpdateChannelCache,
22567
- prepareChannelPayload: prepareChannelPayload
23450
+ prepareChannelPayload: prepareChannelPayload,
23451
+ findCachedChannelByAnyId: findCachedChannelByAnyId,
23452
+ findCachedChannelForPin: findCachedChannelForPin,
23453
+ updatePinnedMessageCache: updatePinnedMessageCache,
23454
+ applyChannelRolePayload: applyChannelRolePayload
22568
23455
  });
22569
23456
 
22570
23457
  const saveCommunityUsers = (communities, communityUsers) => {
@@ -23697,6 +24584,7 @@ const applyFilter = (data, params) => {
23697
24584
  };
23698
24585
  /* begin_public_function
23699
24586
  id: community.membership.query
24587
+ spec: API/community/get-members/v2.md
23700
24588
  */
23701
24589
  /**
23702
24590
  * ```js
@@ -23917,6 +24805,7 @@ class SearchCommunityMembersLiveCollectionController extends LiveCollectionContr
23917
24805
 
23918
24806
  /* begin_public_function
23919
24807
  id: community.membership.query
24808
+ spec: API/community/get-members/v2.md
23920
24809
  */
23921
24810
  /**
23922
24811
  * ```js
@@ -23958,7 +24847,7 @@ const searchMembers = (params, callback, config) => {
23958
24847
  };
23959
24848
  /* end_public_function */
23960
24849
 
23961
- var index$i = /*#__PURE__*/Object.freeze({
24850
+ var index$j = /*#__PURE__*/Object.freeze({
23962
24851
  __proto__: null,
23963
24852
  addMembers: addMembers,
23964
24853
  removeMembers: removeMembers,
@@ -24062,7 +24951,7 @@ class SearchCommunityLiveCollectionController extends LiveCollectionController {
24062
24951
  }
24063
24952
 
24064
24953
  /* begin_public_function
24065
- id: community.query
24954
+ id: community.search
24066
24955
  */
24067
24956
  /**
24068
24957
  * ```js
@@ -24854,6 +25743,9 @@ class SemanticSearchCommunityLiveCollectionController extends LiveCollectionCont
24854
25743
  * @category Posts Live Collection
24855
25744
  *
24856
25745
  */
25746
+ /* begin_public_function
25747
+ id: community.semantic-search
25748
+ */
24857
25749
  const semanticSearchCommunities = (params, callback, config) => {
24858
25750
  const { log, cache } = getActiveClient();
24859
25751
  if (!cache) {
@@ -25209,7 +26101,7 @@ const unbanMembers = async (communityId, userIds) => {
25209
26101
  };
25210
26102
  /* end_public_function */
25211
26103
 
25212
- var index$h = /*#__PURE__*/Object.freeze({
26104
+ var index$i = /*#__PURE__*/Object.freeze({
25213
26105
  __proto__: null,
25214
26106
  addRoles: addRoles,
25215
26107
  removeRoles: removeRoles,
@@ -25217,10 +26109,10 @@ var index$h = /*#__PURE__*/Object.freeze({
25217
26109
  unbanMembers: unbanMembers
25218
26110
  });
25219
26111
 
25220
- var index$g = /*#__PURE__*/Object.freeze({
26112
+ var index$h = /*#__PURE__*/Object.freeze({
25221
26113
  __proto__: null,
25222
- Moderation: index$h,
25223
- Membership: index$i,
26114
+ Moderation: index$i,
26115
+ Membership: index$j,
25224
26116
  getCommunityByIds: getCommunities$1,
25225
26117
  createCommunity: createCommunity,
25226
26118
  updateCommunity: updateCommunity,
@@ -25456,14 +26348,14 @@ const getCategories = (params, callback, config) => {
25456
26348
  };
25457
26349
  /* end_public_function */
25458
26350
 
25459
- var index$f = /*#__PURE__*/Object.freeze({
26351
+ var index$g = /*#__PURE__*/Object.freeze({
25460
26352
  __proto__: null,
25461
26353
  getCategory: getCategory,
25462
26354
  getCategories: getCategories
25463
26355
  });
25464
26356
 
25465
26357
  /* begin_public_function
25466
- id: feed.query.global_feed
26358
+ id: feed.query.global_feed.page
25467
26359
  */
25468
26360
  /**
25469
26361
  *
@@ -25755,6 +26647,11 @@ const createCommentOptimistic = (bundle) => {
25755
26647
  targetType: 'community',
25756
26648
  dataType: 'text',
25757
26649
  syncState: "syncing" /* Amity.SyncState.Syncing */,
26650
+ // In a gated community the optimistic object stays out of public collections until the
26651
+ // response settles the status; the author's own view still updates through the local event
26652
+ approvalStatus: isCommentApprovalRequired(bundle)
26653
+ ? "pending" /* Amity.CommentApprovalStatusEnum.Pending */
26654
+ : "approved" /* Amity.CommentApprovalStatusEnum.Approved */,
25758
26655
  };
25759
26656
  const cachedAt = UNSYNCED_OBJECT_CACHED_AT_VALUE;
25760
26657
  pushToCache(['comment', 'get', comment.commentId], comment, { cachedAt });
@@ -25771,32 +26668,57 @@ const createCommentOptimistic = (bundle) => {
25771
26668
  * ```js
25772
26669
  * import { CommentRepository } from '@amityco/ts-sdk'
25773
26670
  * const newComment = await CommentRepository.createComment(bundle)
26671
+ *
26672
+ * // Server-confirmed only: nothing is shown until the request succeeds
26673
+ * const confirmed = await CommentRepository.createComment(bundle, false)
25774
26674
  * ```
25775
26675
  *
25776
26676
  * Creates an {@link Amity.Comment}
25777
26677
  *
26678
+ * With `isOptimistic` (the default) a local comment appears at once with `syncState: 'syncing'`,
26679
+ * moves to `'synced'` when the server confirms it and to `'error'` if the request fails, so the
26680
+ * caller can offer a retry. With `isOptimistic: false` nothing is created locally until the
26681
+ * server answers: on success the comment arrives already `'synced'`; on failure no comment
26682
+ * entity exists anywhere and the promise rejects.
26683
+ *
25778
26684
  * @param bundle The data necessary to create a new {@link Amity.Comment}
26685
+ * @param isOptimistic Show a local comment before the server confirms it. Default `true`.
26686
+ * Ignored when the client cache is disabled, since there is nowhere to hold the local comment.
25779
26687
  * @returns The newly created {@link Amity.Comment}
25780
26688
  *
25781
26689
  * @category Comment API
25782
26690
  * @async
25783
26691
  */
25784
- const createComment = async (bundle) => {
26692
+ const createComment = async (bundle, isOptimistic = true) => {
25785
26693
  const client = getActiveClient();
25786
- client.log('comment/createComment', bundle);
25787
- const optimisticData = createCommentOptimistic(bundle);
26694
+ client.log('comment/createComment', Object.assign(Object.assign({}, bundle), { isOptimistic }));
26695
+ // Without a local comment the server assigns the id; with one, the same id travels through the
26696
+ // optimistic object, the response and every realtime event so each step recognises it.
26697
+ const optimisticData = isOptimistic ? createCommentOptimistic(bundle) : undefined;
25788
26698
  const commentId = optimisticData === null || optimisticData === void 0 ? void 0 : optimisticData.commentId;
25789
26699
  try {
25790
- const { data } = await client.http.post('/api/v3/comments', Object.assign(Object.assign({}, bundle), { commentId }));
25791
- const { comments } = data;
26700
+ const { data: payload } = await client.http.post('/api/v3/comments', Object.assign(Object.assign({}, bundle), { commentId }));
25792
26701
  // BE always returns an array of comments If it got record 0 from BE it might have a problem on creation logic
25793
- if (comments.length === 0)
26702
+ if (payload.comments.length === 0)
25794
26703
  throw new Error('Comment not created');
26704
+ // Absent `approvalStatus` means approved; the result is the only source of the status.
26705
+ // The confirmed comment is written as `synced` so the cache itself tells the two states apart
26706
+ // (a local-event subscriber is not guaranteed to be listening).
26707
+ const prepared = prepareCommentPayload(payload);
26708
+ const data = Object.assign(Object.assign({}, prepared), { comments: prepared.comments.map(comment => comment.commentId === (commentId !== null && commentId !== void 0 ? commentId : comment.commentId)
26709
+ ? Object.assign(Object.assign({}, comment), { syncState: "synced" /* Amity.SyncState.Synced */ }) : comment) });
26710
+ const { comments } = data;
25795
26711
  const cachedAt = client.cache && Date.now();
25796
26712
  if (client.cache)
25797
26713
  ingestInCache(data, { cachedAt });
25798
26714
  if (['post', 'content'].includes(bundle.referenceType)) {
25799
- PostCommentCountEngine$1.getInstance().queueCommentChangeTask(new CreateTask(bundle.referenceId, comments[0].commentId, data.comments[0].createdAt));
26715
+ if (isCommentPending(comments[0])) {
26716
+ // Not counted for anyone else until approved; the author sees their own +1
26717
+ recordPendingAuthoredComment(comments[0]);
26718
+ }
26719
+ else {
26720
+ PostCommentCountEngine$1.getInstance().queueCommentChangeTask(new CreateTask(bundle.referenceId, comments[0].commentId, comments[0].createdAt));
26721
+ }
25800
26722
  }
25801
26723
  else if (bundle.referenceType === 'story') {
25802
26724
  const storyIndex = pullFromCache([
@@ -25817,9 +26739,9 @@ const createComment = async (bundle) => {
25817
26739
  categories: [],
25818
26740
  comments,
25819
26741
  communities: [],
25820
- communityUsers: data.communityUsers,
25821
- files: data.files,
25822
- users: data.users,
26742
+ communityUsers: payload.communityUsers,
26743
+ files: payload.files,
26744
+ users: payload.users,
25823
26745
  });
25824
26746
  }
25825
26747
  }
@@ -25827,9 +26749,9 @@ const createComment = async (bundle) => {
25827
26749
  fireEvent('local.comment.created', {
25828
26750
  comments: [Object.assign(Object.assign({}, comments[0]), { syncState: "synced" /* Amity.SyncState.Synced */ })],
25829
26751
  commentChildren: data.commentChildren,
25830
- users: data.users,
25831
- files: data.files,
25832
- communityUsers: data.communityUsers,
26752
+ users: payload.users,
26753
+ files: payload.files,
26754
+ communityUsers: payload.communityUsers,
25833
26755
  });
25834
26756
  return {
25835
26757
  data: LinkedObject.comment(comments[0]),
@@ -25837,9 +26759,17 @@ const createComment = async (bundle) => {
25837
26759
  };
25838
26760
  }
25839
26761
  catch (e) {
26762
+ // Only a local comment has anything to mark as failed; a server-confirmed-only create leaves
26763
+ // no entity behind
25840
26764
  if (optimisticData) {
26765
+ const failed = Object.assign(Object.assign({}, optimisticData), { syncState: "error" /* Amity.SyncState.Error */ });
26766
+ // Write the failure to the cache directly: the local event below only reaches pages that
26767
+ // observe comments, and the caller's retry UI reads the cached state
26768
+ pushToCache(['comment', 'get', failed.commentId], failed, {
26769
+ cachedAt: UNSYNCED_OBJECT_CACHED_AT_VALUE,
26770
+ });
25841
26771
  fireEvent('local.comment.created', {
25842
- comments: [Object.assign(Object.assign({}, optimisticData), { syncState: "error" /* Amity.SyncState.Error */ })],
26772
+ comments: [failed],
25843
26773
  commentChildren: [],
25844
26774
  users: [],
25845
26775
  files: [],
@@ -25872,16 +26802,26 @@ const createComment = async (bundle) => {
25872
26802
  * @async
25873
26803
  */
25874
26804
  const updateComment = async (commentId, patch) => {
26805
+ var _a;
25875
26806
  const client = getActiveClient();
25876
26807
  client.log('user/updateComment', patch);
25877
- const { data } = await client.http.put(`/api/v3/comments/${encodeURIComponent(commentId)}`, patch);
26808
+ const previous = (_a = pullFromCache(['comment', 'get', commentId])) === null || _a === void 0 ? void 0 : _a.data;
26809
+ const { data: payload } = await client.http.put(`/api/v3/comments/${encodeURIComponent(commentId)}`, patch);
26810
+ const data = prepareCommentPayload(payload);
26811
+ const updated = data.comments.find(comment => comment.commentId === commentId);
25878
26812
  const cachedAt = client.cache && Date.now();
25879
26813
  if (client.cache)
25880
26814
  ingestInCache(data, { cachedAt });
25881
- fireEvent('comment.updated', data);
25882
- const { comments } = data;
26815
+ // An effective edit in a gated community sends the comment back for review: it leaves the
26816
+ // public reply list and the public count once. The `comment.updated` event below removes it
26817
+ // from the comment collections; the realtime echo finds it already pending and does nothing.
26818
+ if (isCommentPending(updated) && previous && isCommentApproved(previous)) {
26819
+ unlinkCommentFromParent(updated);
26820
+ applyCommentReReviewCount(updated);
26821
+ }
26822
+ fireEvent('comment.updated', payload);
25883
26823
  return {
25884
- data: LinkedObject.comment(comments.find(comment => comment.commentId === commentId)),
26824
+ data: LinkedObject.comment(updated),
25885
26825
  cachedAt,
25886
26826
  };
25887
26827
  };
@@ -26021,7 +26961,13 @@ const deleteComment = async (commentId, permanent = false) => {
26021
26961
  const post = (_b = pullFromCache(['post', 'get', comment.data.referenceId])) === null || _b === void 0 ? void 0 : _b.data;
26022
26962
  if (post) {
26023
26963
  const engine = PostCommentCountEngine$1.getInstance();
26024
- engine.queueCommentChangeTask(new DeleteTask(post.postId, commentId));
26964
+ if (isCommentPending(comment.data)) {
26965
+ // Never counted for anyone else; only the author's own +1 goes away
26966
+ engine.removePendingAuthoredComment(post.postId, commentId);
26967
+ }
26968
+ else {
26969
+ engine.queueCommentChangeTask(new DeleteTask(post.postId, commentId));
26970
+ }
26025
26971
  if (!deleted.parentId && ((_c = deleted.children /* c8 ignore next */) === null || _c === void 0 ? void 0 : _c.length) > 0) {
26026
26972
  // NOTE: delete the parent comment will also remove all children comments
26027
26973
  deleted.children.forEach((childCommentId) => {
@@ -26091,6 +27037,109 @@ const hardDeleteComment = async (commentId) => {
26091
27037
  };
26092
27038
  /* end_public_function */
26093
27039
 
27040
+ /* begin_public_function
27041
+ id: comment.approve
27042
+ */
27043
+ /**
27044
+ * ```js
27045
+ * import { CommentRepository } from '@amityco/ts-sdk'
27046
+ *
27047
+ * const { data: comment } = await CommentRepository.approveComment('commentId')
27048
+ * ```
27049
+ *
27050
+ * Approves a {@link Amity.Comment} held for review, making it visible to everyone
27051
+ *
27052
+ * @param commentId The {@link Amity.Comment} ID to be approved
27053
+ * @return The {@link Amity.Comment} that was approved
27054
+ *
27055
+ * @category Comment API
27056
+ * @async
27057
+ */
27058
+ const approveComment = async (commentId) => {
27059
+ const client = getActiveClient();
27060
+ client.log('comment/approveComment', commentId);
27061
+ // No request body, and nothing is revealed before the server confirms
27062
+ const { data: payload } = await client.http.post(`/api/v3/comments/${encodeURIComponent(commentId)}/approve`);
27063
+ const data = prepareCommentPayload(prepareMembershipPayload(payload, 'communityUsers'));
27064
+ const approved = data.comments.find(comment => comment.commentId === commentId);
27065
+ const cachedAt = client.cache && Date.now();
27066
+ if (client.cache)
27067
+ ingestInCache(data, { cachedAt });
27068
+ // The reveal path: parent link and exactly one count task. Applied here so it does not depend
27069
+ // on an observer being open; the event below and the realtime `comment.approved` that follows
27070
+ // find the work done and reconcile by comment id (collection insert, queue removal).
27071
+ linkCommentToParent(approved);
27072
+ applyCommentApprovedCount(approved);
27073
+ fireEvent('comment.approved', payload);
27074
+ return {
27075
+ data: LinkedObject.comment(approved),
27076
+ cachedAt,
27077
+ };
27078
+ };
27079
+ /* end_public_function */
27080
+
27081
+ // Rejected is terminal and implies deleted
27082
+ const markRejected = (comment) => (Object.assign(Object.assign({}, comment), { approvalStatus: "rejected" /* Amity.CommentApprovalStatusEnum.Rejected */, isDeleted: true }));
27083
+ /* begin_public_function
27084
+ id: comment.decline
27085
+ */
27086
+ /**
27087
+ * ```js
27088
+ * import { CommentRepository } from '@amityco/ts-sdk'
27089
+ *
27090
+ * const { data: comment } = await CommentRepository.declineComment('commentId', 'Off-topic')
27091
+ * ```
27092
+ *
27093
+ * Declines a {@link Amity.Comment} held for review. A declined comment is also a deleted comment
27094
+ *
27095
+ * @param commentId The {@link Amity.Comment} ID to be declined
27096
+ * @param reason Optional reviewer's note, at most 250 characters, kept for the moderation record only
27097
+ * @return The {@link Amity.Comment} that was declined
27098
+ *
27099
+ * @category Comment API
27100
+ * @async
27101
+ */
27102
+ const declineComment = async (commentId, reason) => {
27103
+ var _a, _b, _c, _d, _e, _f;
27104
+ const client = getActiveClient();
27105
+ client.log('comment/declineComment', commentId, reason);
27106
+ // Read before the request: the fallback when the response carries no comment
27107
+ const cached = (_a = pullFromCache(['comment', 'get', commentId])) === null || _a === void 0 ? void 0 : _a.data;
27108
+ // `reason` is surfaced to nobody; the key is absent from the body when the caller gives none
27109
+ const { data: payload } = await client.http.post(`/api/v3/comments/${encodeURIComponent(commentId)}/decline`, reason ? { reason } : undefined);
27110
+ // The BE contract (PDT-5135 §3) states the response body for approve only; for decline the
27111
+ // standard comment payload is assumed. Ingest whatever came back, and when the body carries no
27112
+ // comment fall back to the cached one so the delete path below still runs.
27113
+ const returned = (_b = payload === null || payload === void 0 ? void 0 : payload.comments) === null || _b === void 0 ? void 0 : _b.some(comment => comment.commentId === commentId);
27114
+ if (!returned && !cached)
27115
+ throw new Error('Comment not found after decline');
27116
+ const comments = returned
27117
+ ? payload.comments.map(comment => comment.commentId === commentId ? markRejected(comment) : comment)
27118
+ : [markRejected(cached)];
27119
+ const declined = {
27120
+ comments,
27121
+ commentChildren: (_c = payload === null || payload === void 0 ? void 0 : payload.commentChildren) !== null && _c !== void 0 ? _c : [],
27122
+ users: (_d = payload === null || payload === void 0 ? void 0 : payload.users) !== null && _d !== void 0 ? _d : [],
27123
+ files: (_e = payload === null || payload === void 0 ? void 0 : payload.files) !== null && _e !== void 0 ? _e : [],
27124
+ communityUsers: (_f = payload === null || payload === void 0 ? void 0 : payload.communityUsers) !== null && _f !== void 0 ? _f : [],
27125
+ };
27126
+ // There is no `comment.declined` event: the existing delete path drops the comment from every
27127
+ // collection and the review queue, and moves no count because a pending comment was never counted.
27128
+ const data = prepareCommentPayload(prepareMembershipPayload(declined, 'communityUsers'));
27129
+ const rejected = data.comments.find(comment => comment.commentId === commentId);
27130
+ const cachedAt = client.cache && Date.now();
27131
+ if (client.cache)
27132
+ ingestInCache(data, { cachedAt });
27133
+ unlinkCommentFromParent(rejected);
27134
+ releasePendingAuthoredComment(rejected);
27135
+ fireEvent('comment.deleted', declined);
27136
+ return {
27137
+ data: LinkedObject.comment(rejected),
27138
+ cachedAt,
27139
+ };
27140
+ };
27141
+ /* end_public_function */
27142
+
26094
27143
  /* begin_public_function
26095
27144
  id: comment.flag
26096
27145
  */
@@ -26176,6 +27225,7 @@ const isCommentFlaggedByMe = async (commentId) => {
26176
27225
  /* end_public_function */
26177
27226
 
26178
27227
  const getComment$1 = async (commentId) => {
27228
+ var _a;
26179
27229
  const client = getActiveClient();
26180
27230
  client.log('comment/getComment', commentId);
26181
27231
  isInTombstone('comment', commentId);
@@ -26186,7 +27236,11 @@ const getComment$1 = async (commentId) => {
26186
27236
  data = response.data;
26187
27237
  }
26188
27238
  catch (error) {
26189
- if (checkIfShouldGoesToTombstone(error === null || error === void 0 ? void 0 : error.code)) {
27239
+ // A pending comment answers 404 to anyone but its author and reviewers. That is a
27240
+ // visibility answer, not a deletion — never tombstone a comment known to be pending.
27241
+ const cached = (_a = pullFromCache(['comment', 'get', commentId])) === null || _a === void 0 ? void 0 : _a.data;
27242
+ const isKnownPending = !!cached && isCommentPending(cached);
27243
+ if (!isKnownPending && checkIfShouldGoesToTombstone(error === null || error === void 0 ? void 0 : error.code)) {
26190
27244
  pushToTombstone('comment', commentId);
26191
27245
  }
26192
27246
  throw error;
@@ -26313,6 +27367,7 @@ const onLocalCommentReactionRemoved = (callback) => {
26313
27367
  */
26314
27368
  const getComment = (commentId, callback) => {
26315
27369
  return liveObject(commentId, callback, 'commentId', getComment$1, [
27370
+ onCommentApproved,
26316
27371
  onCommentDeleteLocal,
26317
27372
  onCommentDeleted,
26318
27373
  onCommentFlagged,
@@ -26326,28 +27381,31 @@ const getComment = (commentId, callback) => {
26326
27381
  };
26327
27382
  /* end_public_function */
26328
27383
 
26329
- class CommentPaginationController extends PaginationController {
26330
- async getRequest(queryParams, token) {
26331
- var _a;
26332
- const { pageSize, limit, includeDeleted } = queryParams, params = __rest(queryParams, ["pageSize", "limit", "includeDeleted"]);
26333
- const effectiveLimit = (_a = pageSize !== null && pageSize !== void 0 ? pageSize : limit) !== null && _a !== void 0 ? _a : COLLECTION_DEFAULT_PAGINATION_LIMIT;
26334
- const baseOptions = {
26335
- type: params.sortBy || queryParams.limit || queryParams.pageSize ? 'pagination' : undefined,
26336
- };
26337
- const options = token
26338
- ? Object.assign(Object.assign({}, baseOptions), { token }) : Object.assign(Object.assign({}, baseOptions), { pageSize: effectiveLimit, limit: effectiveLimit });
26339
- const { data: queryResponse } = await this.http.get(`/api/v3/comments`, {
26340
- params: Object.assign(Object.assign({}, params), { isDeleted: inferIsDeleted(includeDeleted), options }),
26341
- });
26342
- return queryResponse;
26343
- }
26344
- }
27384
+ /**
27385
+ * ```js
27386
+ * import { onCommentCreated } from '@amityco/ts-sdk'
27387
+ * const dispose = onCommentCreated(comment => {
27388
+ * // ...
27389
+ * })
27390
+ * ```
27391
+ *
27392
+ * Fired when a {@link Amity.InternalComment} has been created
27393
+ *
27394
+ * @param callback The function to call when the event was fired
27395
+ * @returns an {@link Amity.Unsubscriber} function to stop listening
27396
+ *
27397
+ * @category Comment Events
27398
+ */
27399
+ const onCommentCreatedLocal = (callback) => {
27400
+ return createLocalCommentEventSubscriber('local.comment.created', callback);
27401
+ };
26345
27402
 
26346
27403
  var EnumCommentActions;
26347
27404
  (function (EnumCommentActions) {
26348
27405
  EnumCommentActions["OnCommentCreated"] = "onCommentCreated";
26349
27406
  EnumCommentActions["OnCommentUpdated"] = "onCommentUpdated";
26350
27407
  EnumCommentActions["OnCommentDeleted"] = "onCommentDeleted";
27408
+ EnumCommentActions["OnCommentApproved"] = "onCommentApproved";
26351
27409
  EnumCommentActions["OnCommentFlagged"] = "onCommentFlagged";
26352
27410
  EnumCommentActions["OnCommentUnflagged"] = "onCommentUnflagged";
26353
27411
  EnumCommentActions["OnCommentReactionAdded"] = "onCommentReactionAdded";
@@ -26370,15 +27428,17 @@ class CommentQueryStreamController extends QueryStreamController {
26370
27428
  }
26371
27429
  appendToQueryStream(response, direction, refresh = false) {
26372
27430
  var _a, _b;
27431
+ // The public list is approved-only even when the server widens the read for a reviewer
27432
+ const commentIds = response.comments.filter(isCommentApproved).map(getResolver('comment'));
26373
27433
  if (refresh) {
26374
27434
  pushToCache(this.cacheKey, {
26375
- data: response.comments.map(getResolver('comment')),
27435
+ data: commentIds,
26376
27436
  });
26377
27437
  }
26378
27438
  else {
26379
27439
  const collection = (_a = pullFromCache(this.cacheKey)) === null || _a === void 0 ? void 0 : _a.data;
26380
27440
  const comments = (_b = collection === null || collection === void 0 ? void 0 : collection.data) !== null && _b !== void 0 ? _b : [];
26381
- pushToCache(this.cacheKey, Object.assign(Object.assign({}, collection), { data: [...new Set([...comments, ...response.comments.map(getResolver('comment'))])] }));
27441
+ pushToCache(this.cacheKey, Object.assign(Object.assign({}, collection), { data: [...new Set([...comments, ...commentIds])] }));
26382
27442
  }
26383
27443
  }
26384
27444
  reactor(action) {
@@ -26397,8 +27457,19 @@ class CommentQueryStreamController extends QueryStreamController {
26397
27457
  return;
26398
27458
  }
26399
27459
  if (action === EnumCommentActions.OnCommentCreated) {
27460
+ // A pending comment reaches clients over realtime before anyone may see it: persist
27461
+ // only, no insert and no emit. `comment.approved` is the reveal signal.
27462
+ if (!isCommentApproved(comment))
27463
+ return;
27464
+ collection.data = [...new Set([comment.commentId, ...collection.data])];
27465
+ }
27466
+ if (action === EnumCommentActions.OnCommentApproved) {
26400
27467
  collection.data = [...new Set([comment.commentId, ...collection.data])];
26401
27468
  }
27469
+ // An effective edit in a gated community returns the comment to review: it leaves the list
27470
+ if (action === EnumCommentActions.OnCommentUpdated && isCommentPending(comment)) {
27471
+ collection.data = collection.data.filter(commentId => commentId !== comment.commentId);
27472
+ }
26402
27473
  pushToCache(this.cacheKey, collection);
26403
27474
  this.notifyChange({ origin: "event" /* Amity.LiveDataOrigin.EVENT */, loading: false });
26404
27475
  };
@@ -26408,24 +27479,22 @@ class CommentQueryStreamController extends QueryStreamController {
26408
27479
  }
26409
27480
  }
26410
27481
 
26411
- /**
26412
- * ```js
26413
- * import { onCommentCreated } from '@amityco/ts-sdk'
26414
- * const dispose = onCommentCreated(comment => {
26415
- * // ...
26416
- * })
26417
- * ```
26418
- *
26419
- * Fired when a {@link Amity.InternalComment} has been created
26420
- *
26421
- * @param callback The function to call when the event was fired
26422
- * @returns an {@link Amity.Unsubscriber} function to stop listening
26423
- *
26424
- * @category Comment Events
26425
- */
26426
- const onCommentCreatedLocal = (callback) => {
26427
- return createLocalCommentEventSubscriber('local.comment.created', callback);
26428
- };
27482
+ class CommentPaginationController extends PaginationController {
27483
+ async getRequest(queryParams, token) {
27484
+ var _a;
27485
+ const { pageSize, limit, includeDeleted } = queryParams, params = __rest(queryParams, ["pageSize", "limit", "includeDeleted"]);
27486
+ const effectiveLimit = (_a = pageSize !== null && pageSize !== void 0 ? pageSize : limit) !== null && _a !== void 0 ? _a : COLLECTION_DEFAULT_PAGINATION_LIMIT;
27487
+ const baseOptions = {
27488
+ type: params.sortBy || queryParams.limit || queryParams.pageSize ? 'pagination' : undefined,
27489
+ };
27490
+ const options = token
27491
+ ? Object.assign(Object.assign({}, baseOptions), { token }) : Object.assign(Object.assign({}, baseOptions), { pageSize: effectiveLimit, limit: effectiveLimit });
27492
+ const { data: queryResponse } = await this.http.get(`/api/v3/comments`, {
27493
+ params: Object.assign(Object.assign({}, params), { isDeleted: inferIsDeleted(includeDeleted), options }),
27494
+ });
27495
+ return queryResponse;
27496
+ }
27497
+ }
26429
27498
 
26430
27499
  class CommentLiveCollectionController extends LiveCollectionController {
26431
27500
  constructor(query, callback) {
@@ -26461,6 +27530,7 @@ class CommentLiveCollectionController extends LiveCollectionController {
26461
27530
  { fn: onCommentCreated, action: EnumCommentActions.OnCommentCreated },
26462
27531
  { fn: onCommentUpdated, action: EnumCommentActions.OnCommentUpdated },
26463
27532
  { fn: onCommentDeleted, action: EnumCommentActions.OnCommentDeleted },
27533
+ { fn: onCommentApproved, action: EnumCommentActions.OnCommentApproved },
26464
27534
  { fn: onCommentFlagged, action: EnumCommentActions.OnCommentFlagged },
26465
27535
  { fn: onCommentUnflagged, action: EnumCommentActions.OnCommentUnflagged },
26466
27536
  { fn: onCommentReactionAdded, action: EnumCommentActions.OnCommentReactionAdded },
@@ -26494,7 +27564,8 @@ class CommentLiveCollectionController extends LiveCollectionController {
26494
27564
  });
26495
27565
  }
26496
27566
  applyFilter(data) {
26497
- let comments = data;
27567
+ // Approved-only, for every caller including the author of a pending comment
27568
+ let comments = data.filter(isCommentApproved);
26498
27569
  if (!this.query.includeDeleted) {
26499
27570
  comments = filterByPropEquality(comments, 'isDeleted', false);
26500
27571
  }
@@ -26543,6 +27614,7 @@ class CommentLiveCollectionController extends LiveCollectionController {
26543
27614
 
26544
27615
  /* begin_public_function
26545
27616
  id: comment.query
27617
+ spec: API/comment/getComments/v2.md
26546
27618
  */
26547
27619
  /**
26548
27620
  * ```js
@@ -26582,7 +27654,202 @@ const getComments = (params, callback, config) => {
26582
27654
  };
26583
27655
  /* end_public_function */
26584
27656
 
26585
- var index$e = /*#__PURE__*/Object.freeze({
27657
+ class CommentReviewQueuePaginationController extends PaginationController {
27658
+ async getRequest(queryParams, token) {
27659
+ const { communityId, limit } = queryParams, params = __rest(queryParams, ["communityId", "limit"]);
27660
+ // The route defaults to 10, not the SDK-wide 20, and rejects anything above 100
27661
+ const effectiveLimit = Math.min(limit !== null && limit !== void 0 ? limit : COMMENT_REVIEW_QUEUE_DEFAULT_PAGINATION_SIZE, COMMENT_REVIEW_QUEUE_MAX_PAGINATION_SIZE);
27662
+ // Token paging only. The route also accepts options[skip], but offset paging over a queue that
27663
+ // drains from the front skips items, so the SDK never sends it.
27664
+ const options = token ? { token } : { limit: effectiveLimit };
27665
+ const { data: queryResponse } = await this.http.get(API_ENDPOINTS.commentReviewQueue(communityId), {
27666
+ params: Object.assign(Object.assign({}, params), { options }),
27667
+ });
27668
+ return queryResponse;
27669
+ }
27670
+ }
27671
+
27672
+ class CommentReviewQueueQueryStreamController extends QueryStreamController {
27673
+ constructor(query, cacheKey, notifyChange) {
27674
+ super(query, cacheKey);
27675
+ this.notifyChange = notifyChange;
27676
+ }
27677
+ async saveToMainDB(response) {
27678
+ const processedPayload = prepareCommentPayload(response);
27679
+ const client = getActiveClient();
27680
+ const cachedAt = client.cache && Date.now();
27681
+ if (client.cache) {
27682
+ ingestInCache(processedPayload, { cachedAt });
27683
+ }
27684
+ }
27685
+ appendToQueryStream(response, direction, refresh = false) {
27686
+ var _a, _b;
27687
+ // Server order is queue-entry order, oldest first. Keep it: later pages append, nothing
27688
+ // re-sorts by createdAt (the two diverge on re-review).
27689
+ const commentIds = response.comments.map(getResolver('comment'));
27690
+ if (refresh) {
27691
+ pushToCache(this.cacheKey, {
27692
+ data: commentIds,
27693
+ });
27694
+ }
27695
+ else {
27696
+ const collection = (_a = pullFromCache(this.cacheKey)) === null || _a === void 0 ? void 0 : _a.data;
27697
+ const comments = (_b = collection === null || collection === void 0 ? void 0 : collection.data) !== null && _b !== void 0 ? _b : [];
27698
+ pushToCache(this.cacheKey, Object.assign(Object.assign({}, collection), { data: [...new Set([...comments, ...commentIds])] }));
27699
+ }
27700
+ }
27701
+ matchesQuery(comment) {
27702
+ return (comment.targetType === 'community' &&
27703
+ comment.targetId === this.query.communityId &&
27704
+ (!this.query.postId || comment.referenceId === this.query.postId));
27705
+ }
27706
+ reactor(action) {
27707
+ return (comment) => {
27708
+ var _a;
27709
+ const collection = (_a = pullFromCache(this.cacheKey)) === null || _a === void 0 ? void 0 : _a.data;
27710
+ if (!collection || !this.matchesQuery(comment))
27711
+ return;
27712
+ const isQueued = collection.data.includes(comment.commentId);
27713
+ // A date-filtered queue is the server's to shape; live events only remove from it
27714
+ const acceptsLiveInserts = !this.query.startDate && !this.query.endDate;
27715
+ switch (action) {
27716
+ case EnumCommentActions.OnCommentCreated:
27717
+ case EnumCommentActions.OnCommentUpdated:
27718
+ if (isCommentPending(comment) && !comment.isDeleted) {
27719
+ if (isQueued || !acceptsLiveInserts)
27720
+ return;
27721
+ // Enters (or, after an edit, re-enters) the queue at the end
27722
+ collection.data = [...collection.data, comment.commentId];
27723
+ }
27724
+ else {
27725
+ if (!isQueued)
27726
+ return;
27727
+ collection.data = collection.data.filter(commentId => commentId !== comment.commentId);
27728
+ }
27729
+ break;
27730
+ case EnumCommentActions.OnCommentApproved:
27731
+ case EnumCommentActions.OnCommentDeleted:
27732
+ if (!isQueued)
27733
+ return;
27734
+ collection.data = collection.data.filter(commentId => commentId !== comment.commentId);
27735
+ break;
27736
+ default:
27737
+ return;
27738
+ }
27739
+ pushToCache(this.cacheKey, collection);
27740
+ this.notifyChange({ origin: "event" /* Amity.LiveDataOrigin.EVENT */, loading: false });
27741
+ };
27742
+ }
27743
+ subscribeRTE(createSubscriber) {
27744
+ return createSubscriber.map(subscriber => subscriber.fn(this.reactor(subscriber.action)));
27745
+ }
27746
+ }
27747
+
27748
+ class CommentReviewQueueLiveCollectionController extends LiveCollectionController {
27749
+ constructor(query, callback) {
27750
+ const queryStreamId = hash__default["default"](query);
27751
+ const cacheKey = ['commentReviewQueue', 'collection', queryStreamId];
27752
+ const paginationController = new CommentReviewQueuePaginationController(query);
27753
+ super(paginationController, queryStreamId, cacheKey, callback);
27754
+ this.query = query;
27755
+ this.queryStreamController = new CommentReviewQueueQueryStreamController(this.query, this.cacheKey, this.notifyChange.bind(this));
27756
+ this.callback = callback.bind(this);
27757
+ this.loadPage({ initial: true });
27758
+ }
27759
+ setup() {
27760
+ var _a;
27761
+ const collection = (_a = pullFromCache(this.cacheKey)) === null || _a === void 0 ? void 0 : _a.data;
27762
+ if (!collection) {
27763
+ pushToCache(this.cacheKey, {
27764
+ data: [],
27765
+ params: {},
27766
+ });
27767
+ }
27768
+ }
27769
+ async persistModel(queryPayload) {
27770
+ await this.queryStreamController.saveToMainDB(queryPayload);
27771
+ }
27772
+ persistQueryStream({ response, direction, refresh, }) {
27773
+ this.queryStreamController.appendToQueryStream(response, direction, refresh);
27774
+ }
27775
+ startSubscription() {
27776
+ // No `comment.declined` exists: a decline arrives as `comment.deleted`
27777
+ return this.queryStreamController.subscribeRTE([
27778
+ { fn: onCommentCreated, action: EnumCommentActions.OnCommentCreated },
27779
+ { fn: onCommentUpdated, action: EnumCommentActions.OnCommentUpdated },
27780
+ { fn: onCommentApproved, action: EnumCommentActions.OnCommentApproved },
27781
+ { fn: onCommentDeleted, action: EnumCommentActions.OnCommentDeleted },
27782
+ { fn: onCommentDeleteLocal, action: EnumCommentActions.OnCommentDeleted },
27783
+ ]);
27784
+ }
27785
+ notifyChange({ origin, loading, error }) {
27786
+ var _a;
27787
+ // A caller who lost REVIEW_COMMUNITY_COMMENT must not keep reading stale pending content
27788
+ if ((error === null || error === void 0 ? void 0 : error.code) === 400301 /* Amity.ServerError.PERMISSION_DENIED */) {
27789
+ pushToCache(this.cacheKey, { data: [], params: {} });
27790
+ }
27791
+ const collection = (_a = pullFromCache(this.cacheKey)) === null || _a === void 0 ? void 0 : _a.data;
27792
+ if (!collection)
27793
+ return;
27794
+ const data = collection.data
27795
+ .map(id => pullFromCache(['comment', 'get', id]))
27796
+ .filter(isNonNullable)
27797
+ .map(({ data }) => data)
27798
+ .filter(comment => isCommentPending(comment) && !comment.isDeleted)
27799
+ .map(LinkedObject.comment);
27800
+ if (!this.shouldNotify(data) && origin === 'event')
27801
+ return;
27802
+ this.callback({
27803
+ onNextPage: () => this.loadPage({ direction: "next" /* Amity.LiveCollectionPageDirection.NEXT */ }),
27804
+ data,
27805
+ hasNextPage: !!this.paginationController.getNextToken(),
27806
+ loading,
27807
+ error,
27808
+ });
27809
+ }
27810
+ }
27811
+
27812
+ /* begin_public_function
27813
+ id: comment.review_queue
27814
+ */
27815
+ /**
27816
+ * ```js
27817
+ * import { CommentRepository } from '@amityco/ts-sdk'
27818
+ *
27819
+ * const unsub = CommentRepository.getCommentReviewQueue(
27820
+ * { communityId: 'communityId' },
27821
+ * ({ data: comments, hasNextPage, onNextPage }) => {
27822
+ * // every comment is awaiting review
27823
+ * },
27824
+ * )
27825
+ * ```
27826
+ *
27827
+ * Observe the {@link Amity.Comment} list awaiting moderator review in a community, oldest first
27828
+ *
27829
+ * @param params the community to read the queue of, optionally narrowed to one post and a date range
27830
+ * @param callback the function to call when new data are available
27831
+ * @returns An {@link Amity.Unsubscriber} function to run when willing to stop observing the queue
27832
+ *
27833
+ * @category Comments Live Collection
27834
+ */
27835
+ const getCommentReviewQueue = (params, callback) => {
27836
+ const { log, cache } = getActiveClient();
27837
+ if (!cache)
27838
+ console.log(ENABLE_CACHE_MESSAGE);
27839
+ const timestamp = Date.now();
27840
+ log(`getCommentReviewQueue(tmpid: ${timestamp}) > listen`);
27841
+ const commentReviewQueueLiveCollection = new CommentReviewQueueLiveCollectionController(params, callback);
27842
+ const disposers = commentReviewQueueLiveCollection.startSubscription();
27843
+ const cacheKey = commentReviewQueueLiveCollection.getCacheKey();
27844
+ disposers.push(() => dropFromCache(cacheKey));
27845
+ return () => {
27846
+ log(`getCommentReviewQueue(tmpid: ${timestamp}) > dispose`);
27847
+ disposers.forEach(fn => fn());
27848
+ };
27849
+ };
27850
+ /* end_public_function */
27851
+
27852
+ var index$f = /*#__PURE__*/Object.freeze({
26586
27853
  __proto__: null,
26587
27854
  getCommentByIds: getCommentByIds,
26588
27855
  createComment: createComment,
@@ -26590,18 +27857,22 @@ var index$e = /*#__PURE__*/Object.freeze({
26590
27857
  deleteComment: deleteComment,
26591
27858
  softDeleteComment: softDeleteComment,
26592
27859
  hardDeleteComment: hardDeleteComment,
27860
+ approveComment: approveComment,
27861
+ declineComment: declineComment,
26593
27862
  flagComment: flagComment,
26594
27863
  unflagComment: unflagComment,
26595
27864
  isCommentFlaggedByMe: isCommentFlaggedByMe,
26596
27865
  onCommentCreated: onCommentCreated,
26597
27866
  onCommentUpdated: onCommentUpdated,
26598
27867
  onCommentDeleted: onCommentDeleted,
27868
+ onCommentApproved: onCommentApproved,
26599
27869
  onCommentFlagged: onCommentFlagged,
26600
27870
  onCommentUnflagged: onCommentUnflagged,
26601
27871
  onCommentReactionAdded: onCommentReactionAdded,
26602
27872
  onCommentReactionRemoved: onCommentReactionRemoved,
26603
27873
  getComment: getComment,
26604
- getComments: getComments
27874
+ getComments: getComments,
27875
+ getCommentReviewQueue: getCommentReviewQueue
26605
27876
  });
26606
27877
 
26607
27878
  /**
@@ -26717,6 +27988,10 @@ const generateCommentSubscriptions$1 = (cacheKey) => {
26717
27988
  action: EnumPostActions.OnPostUpdated,
26718
27989
  }));
26719
27990
  };
27991
+ /* begin_public_function
27992
+ id: feed.get-global-feed-subscriptions
27993
+ */
27994
+ /** Returns RTE subscriptions for use by Amity.LiveCollectionCallback-based feed controllers. */
26720
27995
  const getGlobalFeedSubscriptions = (cacheKey) => {
26721
27996
  return [
26722
27997
  { fn: onPostCreated, action: EnumPostActions.OnPostCreated },
@@ -27431,6 +28706,10 @@ const commentEventHandler = (callback, eventHandler, cacheKey, resolveId) => {
27431
28706
  callback(comment);
27432
28707
  });
27433
28708
  };
28709
+ /* begin_public_function
28710
+ id: post.generate-comment-subscriptions
28711
+ */
28712
+ /** Returns RTE subscriptions for use by Amity.LiveCollectionCallback-based post controllers. */
27434
28713
  const generateCommentSubscriptions = ({ cacheKey, resolveId, }) => {
27435
28714
  const eventHandlers = [
27436
28715
  onCommentCreated,
@@ -27851,7 +29130,7 @@ const getForYouFeed = (callback) => {
27851
29130
  };
27852
29131
  /* end_public_function */
27853
29132
 
27854
- var index$d = /*#__PURE__*/Object.freeze({
29133
+ var index$e = /*#__PURE__*/Object.freeze({
27855
29134
  __proto__: null,
27856
29135
  queryGlobalFeed: queryGlobalFeed,
27857
29136
  getCustomRankingGlobalFeed: getCustomRankingGlobalFeed,
@@ -28986,6 +30265,7 @@ class PostLiveCollectionController extends LiveCollectionController {
28986
30265
 
28987
30266
  /* begin_public_function
28988
30267
  id: post.query
30268
+ spec: API/post/query/v2.md
28989
30269
  */
28990
30270
  /**
28991
30271
  * ```js
@@ -29163,6 +30443,9 @@ class PinnedPostLiveCollectionController extends LiveCollectionController {
29163
30443
  * @category Pined Posts Live Collection
29164
30444
  *
29165
30445
  */
30446
+ /* begin_public_function
30447
+ id: post.get-pinned-posts
30448
+ */
29166
30449
  const getPinnedPosts = (params, callback, config) => {
29167
30450
  const { log, cache } = getActiveClient();
29168
30451
  if (!cache) {
@@ -29309,6 +30592,9 @@ class GlobalPinnedPostLiveCollectionController extends LiveCollectionController
29309
30592
  * @category Pined Posts Live Collection
29310
30593
  *
29311
30594
  */
30595
+ /* begin_public_function
30596
+ id: post.get-global-pinned-posts
30597
+ */
29312
30598
  const getGlobalPinnedPosts = (params, callback, config) => {
29313
30599
  const { log, cache } = getActiveClient();
29314
30600
  if (!cache) {
@@ -29542,6 +30828,9 @@ class SemanticSearchPostLiveCollectionController extends LiveCollectionControlle
29542
30828
  * @category Posts Live Collection
29543
30829
  *
29544
30830
  */
30831
+ /* begin_public_function
30832
+ id: post.semantic-search
30833
+ */
29545
30834
  const semanticSearchPosts = (params, callback, config) => {
29546
30835
  const { log, cache } = getActiveClient();
29547
30836
  if (!cache) {
@@ -29751,7 +31040,8 @@ class SearchPostLiveCollectionController extends LiveCollectionController {
29751
31040
  }
29752
31041
 
29753
31042
  /* begin_public_function
29754
- id: post.query
31043
+ id: post.query.by_hashtag
31044
+ spec: API/post/query/v2.md
29755
31045
  */
29756
31046
  /**
29757
31047
  * ```js
@@ -30002,31 +31292,6 @@ const getBroadcasterData = async (roomId) => {
30002
31292
  };
30003
31293
  /* end_public_function */
30004
31294
 
30005
- /* begin_public_function
30006
- id: room.getRecordedUrl
30007
- */
30008
- /**
30009
- * ```js
30010
- * import { getRecordedUrl } from '@amityco/ts-sdk'
30011
- * const recordedUrl = await getRecordedUrl('roomId')
30012
- * ```
30013
- *
30014
- * Gets the recorded URL for a room
30015
- *
30016
- * @param roomId The ID of the room to get recorded URL for
30017
- * @returns The recorded URL information
30018
- *
30019
- * @category Room API
30020
- * @async
30021
- */
30022
- const getRecordedUrl = async (roomId) => {
30023
- const client = getActiveClient();
30024
- client.log('room/getRecordedUrl', { roomId });
30025
- const { data } = await client.http.get(`/api/v1/rooms/${roomId}/recorded`);
30026
- return data;
30027
- };
30028
- /* end_public_function */
30029
-
30030
31295
  /* begin_public_function
30031
31296
  id: room.removeParticipant
30032
31297
  */
@@ -30733,6 +31998,10 @@ var EnumRoomActions;
30733
31998
  const convertToRoomEventPayload = (eventHandler) => (callback) => eventHandler((payload) => {
30734
31999
  callback(payload.room);
30735
32000
  });
32001
+ /* begin_public_function
32002
+ id: room.get-room-subscription
32003
+ */
32004
+ /** Returns RTE subscriptions for use by Amity.LiveCollectionCallback-based room controllers. */
30736
32005
  // TODO: confirm related events
30737
32006
  const getRoomSubscription = () => [
30738
32007
  {
@@ -30789,6 +32058,9 @@ const getRoomSubscription = () => [
30789
32058
  },
30790
32059
  ];
30791
32060
 
32061
+ /* begin_public_function
32062
+ id: room.get
32063
+ */
30792
32064
  const getRoom = (roomId, callback) => {
30793
32065
  return liveObject(roomId, callback, '_id', getRoomById, [
30794
32066
  onRoomEndBroadcasting,
@@ -30996,14 +32268,13 @@ const getRooms = (params, callback, config) => {
30996
32268
  };
30997
32269
  /* end_public_function */
30998
32270
 
30999
- var index$c = /*#__PURE__*/Object.freeze({
32271
+ var index$d = /*#__PURE__*/Object.freeze({
31000
32272
  __proto__: null,
31001
32273
  createRoom: createRoom,
31002
32274
  updateRoom: updateRoom,
31003
32275
  deleteRoom: deleteRoom,
31004
32276
  stopRoom: stopRoom,
31005
32277
  getBroadcasterData: getBroadcasterData,
31006
- getRecordedUrl: getRecordedUrl,
31007
32278
  removeParticipant: removeParticipant,
31008
32279
  leaveRoom: leaveRoom,
31009
32280
  AmityRoomAnalytics: AmityRoomAnalytics,
@@ -31295,7 +32566,7 @@ const getCommunityLiveRoomPosts = (params, callback, config) => {
31295
32566
  };
31296
32567
  /* end_public_function */
31297
32568
 
31298
- var index$b = /*#__PURE__*/Object.freeze({
32569
+ var index$c = /*#__PURE__*/Object.freeze({
31299
32570
  __proto__: null,
31300
32571
  getPostByIds: getPostByIds,
31301
32572
  createPost: createPost,
@@ -31910,7 +33181,7 @@ const getStreams = (params, callback, config) => {
31910
33181
  };
31911
33182
  };
31912
33183
 
31913
- var index$a = /*#__PURE__*/Object.freeze({
33184
+ var index$b = /*#__PURE__*/Object.freeze({
31914
33185
  __proto__: null,
31915
33186
  createStream: createStream,
31916
33187
  updateStream: updateStream,
@@ -32213,7 +33484,7 @@ const stopHeartbeat = (roomId) => {
32213
33484
  };
32214
33485
  /* end_public_function */
32215
33486
 
32216
- var index$9 = /*#__PURE__*/Object.freeze({
33487
+ var index$a = /*#__PURE__*/Object.freeze({
32217
33488
  __proto__: null,
32218
33489
  getRoomOnlineUsers: getRoomOnlineUsers,
32219
33490
  getRoomUserCount: getRoomUserCount,
@@ -32524,7 +33795,7 @@ const getPoll = (pollId, callback) => {
32524
33795
  };
32525
33796
  /* end_public_function */
32526
33797
 
32527
- var index$8 = /*#__PURE__*/Object.freeze({
33798
+ var index$9 = /*#__PURE__*/Object.freeze({
32528
33799
  __proto__: null,
32529
33800
  createPoll: createPoll,
32530
33801
  closePoll: closePoll,
@@ -32828,7 +34099,7 @@ const getPlayer = async (parameters) => {
32828
34099
  return video;
32829
34100
  };
32830
34101
 
32831
- var index$7 = /*#__PURE__*/Object.freeze({
34102
+ var index$8 = /*#__PURE__*/Object.freeze({
32832
34103
  __proto__: null,
32833
34104
  getPlayer: getPlayer
32834
34105
  });
@@ -33156,33 +34427,74 @@ const softDeleteStory = async (storyId) => {
33156
34427
  return result;
33157
34428
  };
33158
34429
 
33159
- const onStoryUpdated = (callback) => {
34430
+ const onStoryCreated = (callback) => {
33160
34431
  const client = getActiveClient();
33161
34432
  const filter = async (payload) => {
33162
34433
  // Apply the necessary field for story payload
33163
- const convertPayload = convertRawStoryToInternal(payload);
34434
+ const convertPayload = convertRawStoryToInternal(payload, true);
33164
34435
  ingestInCache(convertPayload);
33165
34436
  callback(convertPayload.stories);
33166
34437
  };
33167
- const disposers = [createEventSubscriber(client, 'onStoryUpdated', 'story.updated', filter)];
34438
+ const disposers = [createEventSubscriber(client, 'onStoryCreated', 'story.created', filter)];
33168
34439
  return () => {
33169
34440
  disposers.forEach(fn => fn());
33170
34441
  };
33171
34442
  };
33172
- const onStoryUpdatedLocal = (callback) => {
34443
+ const onStoryCreatedLocal = (callback) => {
33173
34444
  const client = getActiveClient();
33174
34445
  const filter = async (payload) => {
33175
34446
  ingestInCache(payload);
33176
34447
  callback(payload.stories);
33177
34448
  };
33178
34449
  const disposers = [
33179
- createEventSubscriber(client, 'onStoryUpdated', 'local.story.updated', filter),
34450
+ createEventSubscriber(client, 'onStoryCreated', 'local.story.created', filter),
33180
34451
  ];
33181
34452
  return () => {
33182
34453
  disposers.forEach(fn => fn());
33183
34454
  };
33184
34455
  };
33185
34456
 
34457
+ const onStoryDeleted = (callback) => {
34458
+ const client = getActiveClient();
34459
+ const filter = async (payload) => {
34460
+ const convertPayload = convertRawStoryToInternal(payload);
34461
+ ingestInCache(convertPayload);
34462
+ callback(convertPayload.stories);
34463
+ };
34464
+ const disposer = [createEventSubscriber(client, 'onStoryDeleted', 'story.deleted', filter)];
34465
+ return () => {
34466
+ disposer.forEach(fn => fn());
34467
+ };
34468
+ };
34469
+ const onStoryDeletedLocal = (callback) => {
34470
+ const client = getActiveClient();
34471
+ const filter = async (payload) => {
34472
+ ingestInCache(payload);
34473
+ callback(payload.stories);
34474
+ };
34475
+ const disposer = [createEventSubscriber(client, 'onStoryDeleted', 'local.story.deleted', filter)];
34476
+ return () => {
34477
+ disposer.forEach(fn => fn());
34478
+ };
34479
+ };
34480
+
34481
+ const onStoryError = (callback) => {
34482
+ const client = getActiveClient();
34483
+ const filter = async (payload) => {
34484
+ ingestInCache(payload);
34485
+ callback(payload.stories);
34486
+ };
34487
+ return createEventSubscriber(client, 'onStoryError', 'local.story.error', filter);
34488
+ };
34489
+
34490
+ const onStoryLocalDataUpdated = (callback) => {
34491
+ const client = getActiveClient();
34492
+ const filter = (payload) => {
34493
+ callback(payload);
34494
+ };
34495
+ return createEventSubscriber(client, 'onStoryLocalDataUpdated', 'local.story.reload', filter);
34496
+ };
34497
+
33186
34498
  const onStoryReactionAdded = (callback) => {
33187
34499
  const client = getActiveClient();
33188
34500
  const filter = async (payload) => {
@@ -33243,6 +34555,33 @@ const onStoryReactionRemovedLocal = (callback) => {
33243
34555
  };
33244
34556
  };
33245
34557
 
34558
+ const onStoryUpdated = (callback) => {
34559
+ const client = getActiveClient();
34560
+ const filter = async (payload) => {
34561
+ // Apply the necessary field for story payload
34562
+ const convertPayload = convertRawStoryToInternal(payload);
34563
+ ingestInCache(convertPayload);
34564
+ callback(convertPayload.stories);
34565
+ };
34566
+ const disposers = [createEventSubscriber(client, 'onStoryUpdated', 'story.updated', filter)];
34567
+ return () => {
34568
+ disposers.forEach(fn => fn());
34569
+ };
34570
+ };
34571
+ const onStoryUpdatedLocal = (callback) => {
34572
+ const client = getActiveClient();
34573
+ const filter = async (payload) => {
34574
+ ingestInCache(payload);
34575
+ callback(payload.stories);
34576
+ };
34577
+ const disposers = [
34578
+ createEventSubscriber(client, 'onStoryUpdated', 'local.story.updated', filter),
34579
+ ];
34580
+ return () => {
34581
+ disposers.forEach(fn => fn());
34582
+ };
34583
+ };
34584
+
33246
34585
  const updateLocalLastStoryExpires = (stories) => {
33247
34586
  stories.forEach(story => {
33248
34587
  const currentCache = pullFromCache(["story-expire" /* STORY_KEY_CACHE.EXPIRE */, story.targetId]);
@@ -33289,74 +34628,6 @@ const getActiveStoriesByTarget$1 = async ({ targetType, targetId, options, }) =>
33289
34628
  };
33290
34629
  };
33291
34630
 
33292
- const onStoryCreated = (callback) => {
33293
- const client = getActiveClient();
33294
- const filter = async (payload) => {
33295
- // Apply the necessary field for story payload
33296
- const convertPayload = convertRawStoryToInternal(payload, true);
33297
- ingestInCache(convertPayload);
33298
- callback(convertPayload.stories);
33299
- };
33300
- const disposers = [createEventSubscriber(client, 'onStoryCreated', 'story.created', filter)];
33301
- return () => {
33302
- disposers.forEach(fn => fn());
33303
- };
33304
- };
33305
- const onStoryCreatedLocal = (callback) => {
33306
- const client = getActiveClient();
33307
- const filter = async (payload) => {
33308
- ingestInCache(payload);
33309
- callback(payload.stories);
33310
- };
33311
- const disposers = [
33312
- createEventSubscriber(client, 'onStoryCreated', 'local.story.created', filter),
33313
- ];
33314
- return () => {
33315
- disposers.forEach(fn => fn());
33316
- };
33317
- };
33318
-
33319
- const onStoryDeleted = (callback) => {
33320
- const client = getActiveClient();
33321
- const filter = async (payload) => {
33322
- const convertPayload = convertRawStoryToInternal(payload);
33323
- ingestInCache(convertPayload);
33324
- callback(convertPayload.stories);
33325
- };
33326
- const disposer = [createEventSubscriber(client, 'onStoryDeleted', 'story.deleted', filter)];
33327
- return () => {
33328
- disposer.forEach(fn => fn());
33329
- };
33330
- };
33331
- const onStoryDeletedLocal = (callback) => {
33332
- const client = getActiveClient();
33333
- const filter = async (payload) => {
33334
- ingestInCache(payload);
33335
- callback(payload.stories);
33336
- };
33337
- const disposer = [createEventSubscriber(client, 'onStoryDeleted', 'local.story.deleted', filter)];
33338
- return () => {
33339
- disposer.forEach(fn => fn());
33340
- };
33341
- };
33342
-
33343
- const onStoryError = (callback) => {
33344
- const client = getActiveClient();
33345
- const filter = async (payload) => {
33346
- ingestInCache(payload);
33347
- callback(payload.stories);
33348
- };
33349
- return createEventSubscriber(client, 'onStoryError', 'local.story.error', filter);
33350
- };
33351
-
33352
- const onStoryLocalDataUpdated = (callback) => {
33353
- const client = getActiveClient();
33354
- const filter = (payload) => {
33355
- callback(payload);
33356
- };
33357
- return createEventSubscriber(client, 'onStoryLocalDataUpdated', 'local.story.reload', filter);
33358
- };
33359
-
33360
34631
  /**
33361
34632
  * ```js
33362
34633
  * import { StoryRepository } from '@amityco/js-sdk';
@@ -33377,6 +34648,9 @@ const onStoryLocalDataUpdated = (callback) => {
33377
34648
  *
33378
34649
  * @category SubChannel Live Object
33379
34650
  */
34651
+ /* begin_public_function
34652
+ id: story.get-active-stories-by-target
34653
+ */
33380
34654
  const getActiveStoriesByTarget = (params, callback) => {
33381
34655
  const { log, cache } = getActiveClient();
33382
34656
  const disposers = [];
@@ -33515,6 +34789,9 @@ const getActiveStoriesByTarget = (params, callback) => {
33515
34789
  };
33516
34790
 
33517
34791
  const getSingleItemFromArray = (func) => (callback) => func((result) => callback(result[0]));
34792
+ /* begin_public_function
34793
+ id: story.get-by-story-id
34794
+ */
33518
34795
  const getStoryByStoryId = (storyId, callback) => {
33519
34796
  return liveObject(storyId, data => {
33520
34797
  if (!(data === null || data === void 0 ? void 0 : data.data)) {
@@ -33550,6 +34827,9 @@ const getTargetsByTargetIds$1 = async (targets) => {
33550
34827
  };
33551
34828
  };
33552
34829
 
34830
+ /* begin_public_function
34831
+ id: story.get-target-by-id
34832
+ */
33553
34833
  const getTargetById = (params, callback) => {
33554
34834
  return liveObject(
33555
34835
  // @TODO: Now I put @ts-ignore here because I don't know how to fix this, it always say that params is not assignable to `NEVER`
@@ -33565,6 +34845,9 @@ const getTargetById = (params, callback) => {
33565
34845
  }, []);
33566
34846
  };
33567
34847
 
34848
+ /* begin_public_function
34849
+ id: story.get-targets-by-target-ids
34850
+ */
33568
34851
  const getTargetsByTargetIds = (params, callback) => {
33569
34852
  const { log, cache } = getActiveClient();
33570
34853
  const disposers = [];
@@ -34001,12 +35284,24 @@ const getGlobalStoryTargets = (params, callback, config) => {
34001
35284
  };
34002
35285
  };
34003
35286
 
34004
- var index$6 = /*#__PURE__*/Object.freeze({
35287
+ var index$7 = /*#__PURE__*/Object.freeze({
34005
35288
  __proto__: null,
34006
35289
  createImageStory: createImageStory,
34007
35290
  createVideoStory: createVideoStory,
34008
35291
  hardDeleteStory: hardDeleteStory,
34009
35292
  softDeleteStory: softDeleteStory,
35293
+ onStoryCreated: onStoryCreated,
35294
+ onStoryCreatedLocal: onStoryCreatedLocal,
35295
+ onStoryDeleted: onStoryDeleted,
35296
+ onStoryDeletedLocal: onStoryDeletedLocal,
35297
+ onStoryError: onStoryError,
35298
+ onStoryLocalDataUpdated: onStoryLocalDataUpdated,
35299
+ onStoryReactionAdded: onStoryReactionAdded,
35300
+ onStoryReactionAddedLocal: onStoryReactionAddedLocal,
35301
+ onStoryReactionRemoved: onStoryReactionRemoved,
35302
+ onStoryReactionRemovedLocal: onStoryReactionRemovedLocal,
35303
+ onStoryUpdated: onStoryUpdated,
35304
+ onStoryUpdatedLocal: onStoryUpdatedLocal,
34010
35305
  getActiveStoriesByTarget: getActiveStoriesByTarget,
34011
35306
  getStoryByStoryId: getStoryByStoryId,
34012
35307
  getTargetById: getTargetById,
@@ -34038,7 +35333,7 @@ const getNetworkAds = async () => {
34038
35333
  };
34039
35334
  };
34040
35335
 
34041
- var index$5 = /*#__PURE__*/Object.freeze({
35336
+ var index$6 = /*#__PURE__*/Object.freeze({
34042
35337
  __proto__: null,
34043
35338
  getNetworkAds: getNetworkAds
34044
35339
  });
@@ -34317,6 +35612,9 @@ class NotificationTrayItemsLiveCollectionController extends LiveCollectionContro
34317
35612
  * @category Notification tray items Live Collection
34318
35613
  *
34319
35614
  */
35615
+ /* begin_public_function
35616
+ id: notification-tray.get-items
35617
+ */
34320
35618
  const getNotificationTrayItems = (params, callback, config) => {
34321
35619
  const { log, cache } = getActiveClient();
34322
35620
  if (!cache) {
@@ -34429,7 +35727,7 @@ const markTraySeen = async (lastSeenAt) => {
34429
35727
  };
34430
35728
  /* end_public_function */
34431
35729
 
34432
- var index$4 = /*#__PURE__*/Object.freeze({
35730
+ var index$5 = /*#__PURE__*/Object.freeze({
34433
35731
  __proto__: null,
34434
35732
  getNotificationTraySeen: getNotificationTraySeen,
34435
35733
  getNotificationTrayItems: getNotificationTrayItems,
@@ -34649,6 +35947,9 @@ class MyInvitationsLiveCollectionController extends LiveCollectionController {
34649
35947
  * @category My Community Invitations Live Collection
34650
35948
  *
34651
35949
  */
35950
+ /* begin_public_function
35951
+ id: invitation.get-my-community-invitations
35952
+ */
34652
35953
  const getMyCommunityInvitations = (params, callback, config) => {
34653
35954
  const { log, cache } = getActiveClient();
34654
35955
  if (!cache) {
@@ -34701,6 +36002,8 @@ const getMyCommunityInvitations = (params, callback, config) => {
34701
36002
  *
34702
36003
  * @category Invitation Observable
34703
36004
  */
36005
+ // NOTE: Invitation events use a streaming event pattern; callback is Amity.Listener rather than
36006
+ // Amity.LiveObjectCallback or Amity.LiveCollectionCallback as this is not a LiveObject/LiveCollection.
34704
36007
  const getInvitations = (params, callback) => {
34705
36008
  const { _id: userId } = getCurrentUser();
34706
36009
  if (!userId)
@@ -34731,7 +36034,7 @@ const getInvitations = (params, callback) => {
34731
36034
  };
34732
36035
  };
34733
36036
 
34734
- var index$3 = /*#__PURE__*/Object.freeze({
36037
+ var index$4 = /*#__PURE__*/Object.freeze({
34735
36038
  __proto__: null,
34736
36039
  cancelInvitation: cancelInvitation,
34737
36040
  onLocalInvitationCreated: onLocalInvitationCreated,
@@ -34857,6 +36160,11 @@ const onLiveReactionCreatedLocal = (callback) => {
34857
36160
  *
34858
36161
  * @category Live Reaction Observable
34859
36162
  */
36163
+ /* begin_public_function
36164
+ id: live-reaction.get-reactions
36165
+ */
36166
+ // NOTE: Live reactions use a streaming event pattern; callback is Amity.Listener rather than
36167
+ // Amity.LiveObjectCallback or Amity.LiveCollectionCallback as this is not a LiveObject/LiveCollection.
34860
36168
  // TODO: confirm return type for this observable property
34861
36169
  const getReactions = (postId, callback) => {
34862
36170
  const { _id: userId } = getActiveUser();
@@ -34880,7 +36188,7 @@ const getReactions = (postId, callback) => {
34880
36188
  };
34881
36189
  };
34882
36190
 
34883
- var index$2 = /*#__PURE__*/Object.freeze({
36191
+ var index$3 = /*#__PURE__*/Object.freeze({
34884
36192
  __proto__: null,
34885
36193
  createReaction: createReaction,
34886
36194
  onLiveReactionCreated: onLiveReactionCreated,
@@ -35210,6 +36518,9 @@ class EventLiveCollectionController extends LiveCollectionController {
35210
36518
  * @category Event Live Collection
35211
36519
  *
35212
36520
  */
36521
+ /* begin_public_function
36522
+ id: event.get-events
36523
+ */
35213
36524
  const getEvents = (params, callback, config) => {
35214
36525
  const { log, cache } = getActiveClient();
35215
36526
  if (!cache)
@@ -35230,7 +36541,7 @@ class MyEventPaginationController extends PaginationController {
35230
36541
  async getRequest(queryParams, token) {
35231
36542
  const { limit = COLLECTION_DEFAULT_PAGINATION_LIMIT } = queryParams, params = __rest(queryParams, ["limit"]);
35232
36543
  const options = token ? { token } : { limit };
35233
- const { data: response } = await this.http.get(`/api/v1/events/me/rsvps`, { params: Object.assign(Object.assign({}, params), { options }) });
36544
+ const { data: response } = await this.http.get(`/api/v1/events/me/rsvp`, { params: Object.assign(Object.assign({}, params), { options }) });
35234
36545
  return response;
35235
36546
  }
35236
36547
  }
@@ -35347,6 +36658,9 @@ class MyEventLiveCollectionController extends LiveCollectionController {
35347
36658
  * @category Event Live Collection
35348
36659
  *
35349
36660
  */
36661
+ /* begin_public_function
36662
+ id: event.get-my-events
36663
+ */
35350
36664
  const getMyEvents = (params, callback, config) => {
35351
36665
  const { log, cache } = getActiveClient();
35352
36666
  if (!cache)
@@ -35363,7 +36677,7 @@ const getMyEvents = (params, callback, config) => {
35363
36677
  };
35364
36678
  };
35365
36679
 
35366
- var index$1 = /*#__PURE__*/Object.freeze({
36680
+ var index$2 = /*#__PURE__*/Object.freeze({
35367
36681
  __proto__: null,
35368
36682
  createEvent: createEvent,
35369
36683
  updateEvent: updateEvent,
@@ -35425,6 +36739,7 @@ getProduct$1.locally = (productId) => {
35425
36739
 
35426
36740
  /* begin_public_function
35427
36741
  id: product.get
36742
+ spec: API/product/get/v1.md
35428
36743
  */
35429
36744
  /**
35430
36745
  * ```js
@@ -35548,6 +36863,7 @@ class SearchProductLiveCollectionController extends LiveCollectionController {
35548
36863
 
35549
36864
  /* begin_public_function
35550
36865
  id: product.search
36866
+ spec: API/product/search/v2.md
35551
36867
  */
35552
36868
  /**
35553
36869
  * ```js
@@ -35590,12 +36906,36 @@ const searchProducts = (params, callback, config) => {
35590
36906
  };
35591
36907
  /* end_public_function */
35592
36908
 
35593
- var index = /*#__PURE__*/Object.freeze({
36909
+ var index$1 = /*#__PURE__*/Object.freeze({
35594
36910
  __proto__: null,
35595
36911
  getProduct: getProduct,
35596
36912
  searchProducts: searchProducts
35597
36913
  });
35598
36914
 
36915
+ const getPool = async (topicId, limit) => {
36916
+ const client = getActiveClient();
36917
+ if (!topicId)
36918
+ throw new ASCError('topicId must not be empty', 800110 /* Amity.ClientError.INVALID_PARAMETERS */, "error" /* Amity.ErrorLevel.ERROR */);
36919
+ if (limit !== undefined && (limit < 1 || limit > 100))
36920
+ throw new ASCError('limit must be between 1 and 100', 800110 /* Amity.ClientError.INVALID_PARAMETERS */, "error" /* Amity.ErrorLevel.ERROR */);
36921
+ const { data } = await client.http.get('/api/v5/curated-content/pool', { params: { topicId, limit } });
36922
+ const { topic } = data, payload = __rest(data, ["topic"]);
36923
+ const processedPayload = preparePostPayload(payload);
36924
+ const cachedAt = client.cache && Date.now();
36925
+ if (client.cache) {
36926
+ ingestInCache(processedPayload, { cachedAt });
36927
+ }
36928
+ return {
36929
+ topic: LinkedObject.curatedContentTopic(topic),
36930
+ posts: processedPayload.posts.map(LinkedObject.post),
36931
+ };
36932
+ };
36933
+
36934
+ var index = /*#__PURE__*/Object.freeze({
36935
+ __proto__: null,
36936
+ getPool: getPool
36937
+ });
36938
+
35599
36939
  /**
35600
36940
  * Helper class for managing product tags per media attachment.
35601
36941
  *
@@ -35644,39 +36984,40 @@ class AmityAttachmentProductTags {
35644
36984
  }
35645
36985
 
35646
36986
  exports.API_REGIONS = API_REGIONS;
35647
- exports.AdRepository = index$5;
36987
+ exports.AdRepository = index$6;
35648
36988
  exports.AmityAttachmentProductTags = AmityAttachmentProductTags;
35649
- exports.CategoryRepository = index$f;
35650
- exports.ChannelRepository = index$j;
35651
- exports.Client = index$s;
35652
- exports.CommentRepository = index$e;
36989
+ exports.CategoryRepository = index$g;
36990
+ exports.ChannelRepository = index$k;
36991
+ exports.Client = index$t;
36992
+ exports.CommentRepository = index$f;
35653
36993
  exports.CommunityPostSettingMaps = CommunityPostSettingMaps;
35654
36994
  exports.CommunityPostSettings = CommunityPostSettings;
35655
- exports.CommunityRepository = index$g;
36995
+ exports.CommunityRepository = index$h;
35656
36996
  exports.ContentFeedType = ContentFeedType;
36997
+ exports.CuratedContentRepository = index;
35657
36998
  exports.DefaultCommunityPostSetting = DefaultCommunityPostSetting;
35658
- exports.EventRepository = index$1;
35659
- exports.FeedRepository = index$d;
35660
- exports.FileRepository = index$p;
36999
+ exports.EventRepository = index$2;
37000
+ exports.FeedRepository = index$e;
37001
+ exports.FileRepository = index$q;
35661
37002
  exports.FileType = FileType;
35662
37003
  exports.GET_WATCHER_URLS = GET_WATCHER_URLS;
35663
- exports.InvitationRepository = index$3;
35664
- exports.LiveReactionRepository = index$2;
35665
- exports.LiveStreamPlayer = index$7;
37004
+ exports.InvitationRepository = index$4;
37005
+ exports.LiveReactionRepository = index$3;
37006
+ exports.LiveStreamPlayer = index$8;
35666
37007
  exports.MessageContentType = MessageContentType;
35667
- exports.MessageRepository = index$n;
35668
- exports.PollRepository = index$8;
37008
+ exports.MessageRepository = index$o;
37009
+ exports.PollRepository = index$9;
35669
37010
  exports.PostContentType = PostContentType;
35670
- exports.PostRepository = index$b;
37011
+ exports.PostRepository = index$c;
35671
37012
  exports.PostStructureType = PostStructureType;
35672
- exports.ProductRepository = index;
35673
- exports.ReactionRepository = index$o;
35674
- exports.RoomPresenceRepository = index$9;
35675
- exports.RoomRepository = index$c;
35676
- exports.StoryRepository = index$6;
35677
- exports.StreamRepository = index$a;
35678
- exports.SubChannelRepository = index$m;
35679
- exports.UserRepository = index$q;
37013
+ exports.ProductRepository = index$1;
37014
+ exports.ReactionRepository = index$p;
37015
+ exports.RoomPresenceRepository = index$a;
37016
+ exports.RoomRepository = index$d;
37017
+ exports.StoryRepository = index$7;
37018
+ exports.StreamRepository = index$b;
37019
+ exports.SubChannelRepository = index$n;
37020
+ exports.UserRepository = index$r;
35680
37021
  exports.VERSION = VERSION;
35681
37022
  exports.VideoResolution = VideoResolution;
35682
37023
  exports.VideoSize = VideoSize;
@@ -35738,7 +37079,7 @@ exports.isPaged = isPaged;
35738
37079
  exports.isReportedByMe = isReportedByMe;
35739
37080
  exports.isSkip = isSkip;
35740
37081
  exports.mergeInCache = mergeInCache;
35741
- exports.notificationTray = index$4;
37082
+ exports.notificationTray = index$5;
35742
37083
  exports.onChannelMarkerFetched = onChannelMarkerFetched;
35743
37084
  exports.onFeedMarkerFetched = onFeedMarkerFetched;
35744
37085
  exports.onFeedMarkerUpdated = onFeedMarkerUpdated;