@amityco/ts-sdk 7.5.1-3d3fd19.0 → 7.5.1-3eaba4ad.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 (397) hide show
  1. package/dist/@types/core/events.d.ts +1 -8
  2. package/dist/@types/core/events.d.ts.map +1 -1
  3. package/dist/@types/core/model.d.ts +1 -5
  4. package/dist/@types/core/model.d.ts.map +1 -1
  5. package/dist/@types/core/payload.d.ts +5 -38
  6. package/dist/@types/core/payload.d.ts.map +1 -1
  7. package/dist/@types/domains/channel.d.ts +2 -0
  8. package/dist/@types/domains/channel.d.ts.map +1 -1
  9. package/dist/@types/domains/client.d.ts +0 -10
  10. package/dist/@types/domains/client.d.ts.map +1 -1
  11. package/dist/@types/domains/community.d.ts +1 -51
  12. package/dist/@types/domains/community.d.ts.map +1 -1
  13. package/dist/@types/domains/content.d.ts +4 -1
  14. package/dist/@types/domains/content.d.ts.map +1 -1
  15. package/dist/@types/domains/notification.d.ts +2 -4
  16. package/dist/@types/domains/notification.d.ts.map +1 -1
  17. package/dist/@types/domains/post.d.ts +2 -0
  18. package/dist/@types/domains/post.d.ts.map +1 -1
  19. package/dist/@types/domains/stream.d.ts +4 -0
  20. package/dist/@types/domains/stream.d.ts.map +1 -1
  21. package/dist/@types/index.d.ts +0 -3
  22. package/dist/@types/index.d.ts.map +1 -1
  23. package/dist/channelRepository/api/createChannel.d.ts +3 -1
  24. package/dist/channelRepository/api/createChannel.d.ts.map +1 -1
  25. package/dist/channelRepository/internalApi/getChannel.d.ts.map +1 -1
  26. package/dist/channelRepository/observers/getChannel.d.ts.map +1 -1
  27. package/dist/channelRepository/observers/getChannels/ChannelLiveCollectionController.d.ts.map +1 -1
  28. package/dist/channelRepository/observers/getTotalChannelsUnread.d.ts.map +1 -1
  29. package/dist/channelRepository/utils/prepareChannelPayload.d.ts.map +1 -1
  30. package/dist/communityRepository/api/createCommunity.d.ts +2 -2
  31. package/dist/communityRepository/api/createCommunity.d.ts.map +1 -1
  32. package/dist/communityRepository/api/getCommunities.d.ts +1 -1
  33. package/dist/communityRepository/api/getCommunities.d.ts.map +1 -1
  34. package/dist/communityRepository/api/getCommunity.d.ts +1 -1
  35. package/dist/communityRepository/api/getCommunity.d.ts.map +1 -1
  36. package/dist/communityRepository/api/getRecommendedCommunities.d.ts +1 -3
  37. package/dist/communityRepository/api/getRecommendedCommunities.d.ts.map +1 -1
  38. package/dist/communityRepository/api/getTrendingCommunities.d.ts +1 -3
  39. package/dist/communityRepository/api/getTrendingCommunities.d.ts.map +1 -1
  40. package/dist/communityRepository/api/joinCommunity.d.ts +0 -3
  41. package/dist/communityRepository/api/joinCommunity.d.ts.map +1 -1
  42. package/dist/communityRepository/api/queryCommunities.d.ts.map +1 -1
  43. package/dist/communityRepository/api/updateCommunity.d.ts +2 -2
  44. package/dist/communityRepository/api/updateCommunity.d.ts.map +1 -1
  45. package/dist/communityRepository/communityMembership/events/index.d.ts +0 -1
  46. package/dist/communityRepository/communityMembership/events/index.d.ts.map +1 -1
  47. package/dist/communityRepository/communityMembership/events/onCommunityJoined.d.ts +1 -1
  48. package/dist/communityRepository/communityMembership/events/onCommunityJoined.d.ts.map +1 -1
  49. package/dist/communityRepository/communityMembership/events/onCommunityLeft.d.ts +1 -1
  50. package/dist/communityRepository/communityMembership/events/onCommunityLeft.d.ts.map +1 -1
  51. package/dist/communityRepository/communityMembership/events/onCommunityUserAdded.d.ts +1 -1
  52. package/dist/communityRepository/communityMembership/events/onCommunityUserAdded.d.ts.map +1 -1
  53. package/dist/communityRepository/communityMembership/events/onCommunityUserBanned.d.ts +1 -1
  54. package/dist/communityRepository/communityMembership/events/onCommunityUserBanned.d.ts.map +1 -1
  55. package/dist/communityRepository/communityMembership/events/onCommunityUserChanged.d.ts +1 -1
  56. package/dist/communityRepository/communityMembership/events/onCommunityUserChanged.d.ts.map +1 -1
  57. package/dist/communityRepository/communityMembership/events/onCommunityUserRemoved.d.ts +1 -1
  58. package/dist/communityRepository/communityMembership/events/onCommunityUserRemoved.d.ts.map +1 -1
  59. package/dist/communityRepository/communityMembership/events/onCommunityUserRoleAdded.d.ts +1 -1
  60. package/dist/communityRepository/communityMembership/events/onCommunityUserRoleAdded.d.ts.map +1 -1
  61. package/dist/communityRepository/communityMembership/events/onCommunityUserRoleRemoved.d.ts +1 -1
  62. package/dist/communityRepository/communityMembership/events/onCommunityUserRoleRemoved.d.ts.map +1 -1
  63. package/dist/communityRepository/communityMembership/events/onCommunityUserUnbanned.d.ts +1 -1
  64. package/dist/communityRepository/communityMembership/events/onCommunityUserUnbanned.d.ts.map +1 -1
  65. package/dist/communityRepository/communityMembership/events/onLocalCommunityJoined.d.ts +1 -1
  66. package/dist/communityRepository/communityMembership/events/onLocalCommunityJoined.d.ts.map +1 -1
  67. package/dist/communityRepository/communityMembership/events/onLocalCommunityLeft.d.ts +1 -1
  68. package/dist/communityRepository/communityMembership/events/onLocalCommunityLeft.d.ts.map +1 -1
  69. package/dist/communityRepository/communityMembership/events/onLocalCommunityUserAdded.d.ts +1 -1
  70. package/dist/communityRepository/communityMembership/events/onLocalCommunityUserAdded.d.ts.map +1 -1
  71. package/dist/communityRepository/communityMembership/events/onLocalCommunityUserRemoved.d.ts +1 -1
  72. package/dist/communityRepository/communityMembership/events/onLocalCommunityUserRemoved.d.ts.map +1 -1
  73. package/dist/communityRepository/communityMembership/events/onUserDeleted.d.ts +1 -1
  74. package/dist/communityRepository/communityMembership/events/onUserDeleted.d.ts.map +1 -1
  75. package/dist/communityRepository/communityMembership/events/utils.d.ts +2 -2
  76. package/dist/communityRepository/communityMembership/events/utils.d.ts.map +1 -1
  77. package/dist/communityRepository/communityMembership/observers/getMembers/CommunityMembersQueryStreamController.d.ts +2 -2
  78. package/dist/communityRepository/communityMembership/observers/getMembers/CommunityMembersQueryStreamController.d.ts.map +1 -1
  79. package/dist/communityRepository/communityMembership/observers/searchMembers/SearchCommunityMembersQueryStreamController.d.ts +2 -2
  80. package/dist/communityRepository/communityMembership/observers/searchMembers/SearchCommunityMembersQueryStreamController.d.ts.map +1 -1
  81. package/dist/communityRepository/communityModeration/events/onLocalCommunityRoleAdded.d.ts +1 -1
  82. package/dist/communityRepository/communityModeration/events/onLocalCommunityRoleAdded.d.ts.map +1 -1
  83. package/dist/communityRepository/communityModeration/events/onLocalCommunityRoleRemoved.d.ts +1 -1
  84. package/dist/communityRepository/communityModeration/events/onLocalCommunityRoleRemoved.d.ts.map +1 -1
  85. package/dist/communityRepository/events/onCommunityCreated.d.ts +1 -1
  86. package/dist/communityRepository/events/onCommunityCreated.d.ts.map +1 -1
  87. package/dist/communityRepository/events/onCommunityDeleted.d.ts +1 -1
  88. package/dist/communityRepository/events/onCommunityDeleted.d.ts.map +1 -1
  89. package/dist/communityRepository/events/onCommunityUpdated.d.ts +1 -1
  90. package/dist/communityRepository/events/onCommunityUpdated.d.ts.map +1 -1
  91. package/dist/communityRepository/events/utils.d.ts +1 -1
  92. package/dist/communityRepository/events/utils.d.ts.map +1 -1
  93. package/dist/communityRepository/observers/getCommunities/CommunitiesLiveCollectionController.d.ts.map +1 -1
  94. package/dist/communityRepository/observers/getCommunities/CommunitiesPaginationController.d.ts.map +1 -1
  95. package/dist/communityRepository/observers/getCommunities/CommunitiesQueryStreamController.d.ts +2 -2
  96. package/dist/communityRepository/observers/getCommunities/CommunitiesQueryStreamController.d.ts.map +1 -1
  97. package/dist/communityRepository/observers/getCommunity.d.ts.map +1 -1
  98. package/dist/communityRepository/observers/getRecommendedCommunities/RecommendedCommunitiesLiveCollectionController.d.ts.map +1 -1
  99. package/dist/communityRepository/observers/getRecommendedCommunities/RecommendedCommunitiesPaginationController.d.ts.map +1 -1
  100. package/dist/communityRepository/observers/getRecommendedCommunities/RecommendedCommunitiesQueryStreamController.d.ts +2 -2
  101. package/dist/communityRepository/observers/getRecommendedCommunities/RecommendedCommunitiesQueryStreamController.d.ts.map +1 -1
  102. package/dist/communityRepository/observers/getTrendingCommunities/TrendingCommunitiesLiveCollectionController.d.ts.map +1 -1
  103. package/dist/communityRepository/observers/getTrendingCommunities/TrendingCommunitiesPaginationController.d.ts.map +1 -1
  104. package/dist/communityRepository/observers/getTrendingCommunities/TrendingCommunitiesQueryStreamController.d.ts +2 -2
  105. package/dist/communityRepository/observers/getTrendingCommunities/TrendingCommunitiesQueryStreamController.d.ts.map +1 -1
  106. package/dist/communityRepository/observers/index.d.ts +0 -1
  107. package/dist/communityRepository/observers/index.d.ts.map +1 -1
  108. package/dist/communityRepository/observers/searchCommunities/SearchCommunitiesPaginationController.d.ts.map +1 -1
  109. package/dist/communityRepository/observers/searchCommunities/SearchCommunitiesQueryStreamController.d.ts +2 -2
  110. package/dist/communityRepository/observers/searchCommunities/SearchCommunitiesQueryStreamController.d.ts.map +1 -1
  111. package/dist/communityRepository/observers/semanticSearch/SemanticSearchCommunityPaginationController.d.ts.map +1 -1
  112. package/dist/communityRepository/observers/semanticSearch/SemanticSearchCommunityQueryStreamController.d.ts +2 -2
  113. package/dist/communityRepository/observers/semanticSearch/SemanticSearchCommunityQueryStreamController.d.ts.map +1 -1
  114. package/dist/communityRepository/utils/communityWithMembership.d.ts +1 -1
  115. package/dist/communityRepository/utils/communityWithMembership.d.ts.map +1 -1
  116. package/dist/communityRepository/utils/payload.d.ts +1 -2
  117. package/dist/communityRepository/utils/payload.d.ts.map +1 -1
  118. package/dist/core/events.d.ts +3 -3
  119. package/dist/core/events.d.ts.map +1 -1
  120. package/dist/core/model/idResolvers.d.ts.map +1 -1
  121. package/dist/core/model/index.d.ts.map +1 -1
  122. package/dist/index.cjs.js +5113 -6421
  123. package/dist/index.d.ts +0 -1
  124. package/dist/index.d.ts.map +1 -1
  125. package/dist/index.esm.js +2588 -3895
  126. package/dist/index.umd.js +4 -4
  127. package/dist/messagePreview/utils/getChannelMessagePreviewWithUser.d.ts +2 -0
  128. package/dist/messagePreview/utils/getChannelMessagePreviewWithUser.d.ts.map +1 -1
  129. package/dist/messagePreview/utils/getSubChannelMessagePreviewWithUser.d.ts +1 -1
  130. package/dist/messageRepository/api/deleteMessage.d.ts.map +1 -1
  131. package/dist/messageRepository/observers/getMessages/MessageQueryStreamController.d.ts.map +1 -1
  132. package/dist/postRepository/api/createPost.d.ts.map +1 -1
  133. package/dist/postRepository/observers/getGlobalPinnedPosts/GlobalPinnedPostQueryStreamController.d.ts.map +1 -1
  134. package/dist/postRepository/observers/getPinnedPosts/PinnedPostQueryStreamController.d.ts.map +1 -1
  135. package/dist/postRepository/utils/payload.d.ts.map +1 -1
  136. package/dist/streamRepository/api/createStream.d.ts +1 -1
  137. package/dist/streamRepository/api/createStream.d.ts.map +1 -1
  138. package/dist/streamRepository/api/editStream.d.ts +18 -0
  139. package/dist/streamRepository/api/editStream.d.ts.map +1 -0
  140. package/dist/streamRepository/api/index.d.ts +1 -0
  141. package/dist/streamRepository/api/index.d.ts.map +1 -1
  142. package/dist/streamRepository/api/updateStream.d.ts +4 -1
  143. package/dist/streamRepository/api/updateStream.d.ts.map +1 -1
  144. package/dist/streamRepository/internalApi/getLiveChat.d.ts +16 -0
  145. package/dist/streamRepository/internalApi/getLiveChat.d.ts.map +1 -0
  146. package/dist/streamRepository/internalApi/getStream.d.ts +2 -2
  147. package/dist/streamRepository/internalApi/getStream.d.ts.map +1 -1
  148. package/dist/subChannelRepository/utils/prepareSubChannelPayload.d.ts.map +1 -1
  149. package/dist/utils/linkedObject/index.d.ts +0 -3
  150. package/dist/utils/linkedObject/index.d.ts.map +1 -1
  151. package/dist/utils/linkedObject/postLinkedObject.d.ts.map +1 -1
  152. package/dist/utils/linkedObject/streamLinkedObject.d.ts.map +1 -1
  153. package/dist/utils/postTypePredicate.d.ts +4 -3
  154. package/dist/utils/postTypePredicate.d.ts.map +1 -1
  155. package/dist/utils/tests/dummy/comment.d.ts +1 -1
  156. package/dist/utils/tests/dummy/post.d.ts +3 -3
  157. package/package.json +1 -1
  158. package/src/@types/core/events.ts +1 -11
  159. package/src/@types/core/model.ts +1 -8
  160. package/src/@types/core/payload.ts +5 -48
  161. package/src/@types/domains/channel.ts +3 -0
  162. package/src/@types/domains/client.ts +0 -12
  163. package/src/@types/domains/community.ts +3 -82
  164. package/src/@types/domains/content.ts +6 -0
  165. package/src/@types/domains/notification.ts +0 -2
  166. package/src/@types/domains/post.ts +2 -0
  167. package/src/@types/domains/stream.ts +4 -0
  168. package/src/@types/index.ts +0 -3
  169. package/src/channelRepository/api/createChannel.ts +12 -9
  170. package/src/channelRepository/internalApi/getChannel.ts +0 -1
  171. package/src/channelRepository/observers/getChannel.ts +1 -11
  172. package/src/channelRepository/observers/getChannels/ChannelLiveCollectionController.ts +1 -10
  173. package/src/channelRepository/observers/getTotalChannelsUnread.ts +1 -3
  174. package/src/channelRepository/utils/constructChannelObject.ts +2 -2
  175. package/src/channelRepository/utils/prepareChannelPayload.ts +1 -6
  176. package/src/client/utils/ReadReceiptSync/readReceiptSyncEngine.ts +1 -1
  177. package/src/communityRepository/api/createCommunity.ts +2 -5
  178. package/src/communityRepository/api/getCommunities.ts +2 -9
  179. package/src/communityRepository/api/getCommunity.ts +2 -13
  180. package/src/communityRepository/api/getRecommendedCommunities.ts +4 -11
  181. package/src/communityRepository/api/getTrendingCommunities.ts +4 -11
  182. package/src/communityRepository/api/joinCommunity.ts +1 -4
  183. package/src/communityRepository/api/queryCommunities.ts +1 -7
  184. package/src/communityRepository/api/updateCommunity.ts +3 -13
  185. package/src/communityRepository/communityMembership/events/index.ts +0 -1
  186. package/src/communityRepository/communityMembership/events/onCommunityJoined.ts +1 -1
  187. package/src/communityRepository/communityMembership/events/onCommunityLeft.ts +1 -1
  188. package/src/communityRepository/communityMembership/events/onCommunityUserAdded.ts +1 -1
  189. package/src/communityRepository/communityMembership/events/onCommunityUserBanned.ts +1 -1
  190. package/src/communityRepository/communityMembership/events/onCommunityUserChanged.ts +1 -1
  191. package/src/communityRepository/communityMembership/events/onCommunityUserRemoved.ts +1 -1
  192. package/src/communityRepository/communityMembership/events/onCommunityUserRoleAdded.ts +1 -1
  193. package/src/communityRepository/communityMembership/events/onCommunityUserRoleRemoved.ts +1 -1
  194. package/src/communityRepository/communityMembership/events/onCommunityUserUnbanned.ts +1 -1
  195. package/src/communityRepository/communityMembership/events/onLocalCommunityJoined.ts +1 -1
  196. package/src/communityRepository/communityMembership/events/onLocalCommunityLeft.ts +1 -1
  197. package/src/communityRepository/communityMembership/events/onLocalCommunityUserAdded.ts +1 -1
  198. package/src/communityRepository/communityMembership/events/onLocalCommunityUserRemoved.ts +1 -1
  199. package/src/communityRepository/communityMembership/events/onUserDeleted.ts +1 -3
  200. package/src/communityRepository/communityMembership/events/utils.ts +2 -2
  201. package/src/communityRepository/communityMembership/observers/getMembers/CommunityMembersQueryStreamController.ts +2 -8
  202. package/src/communityRepository/communityMembership/observers/searchMembers/SearchCommunityMembersQueryStreamController.ts +2 -8
  203. package/src/communityRepository/communityModeration/events/onLocalCommunityRoleAdded.ts +1 -1
  204. package/src/communityRepository/communityModeration/events/onLocalCommunityRoleRemoved.ts +1 -1
  205. package/src/communityRepository/events/onCommunityCreated.ts +1 -1
  206. package/src/communityRepository/events/onCommunityDeleted.ts +1 -1
  207. package/src/communityRepository/events/onCommunityUpdated.ts +1 -1
  208. package/src/communityRepository/events/utils.ts +1 -1
  209. package/src/communityRepository/observers/getCommunities/CommunitiesLiveCollectionController.ts +0 -6
  210. package/src/communityRepository/observers/getCommunities/CommunitiesPaginationController.ts +0 -1
  211. package/src/communityRepository/observers/getCommunities/CommunitiesQueryStreamController.ts +2 -2
  212. package/src/communityRepository/observers/getCommunity.ts +0 -3
  213. package/src/communityRepository/observers/getRecommendedCommunities/RecommendedCommunitiesLiveCollectionController.ts +1 -2
  214. package/src/communityRepository/observers/getRecommendedCommunities/RecommendedCommunitiesPaginationController.ts +1 -6
  215. package/src/communityRepository/observers/getRecommendedCommunities/RecommendedCommunitiesQueryStreamController.ts +2 -2
  216. package/src/communityRepository/observers/getTrendingCommunities/TrendingCommunitiesLiveCollectionController.ts +1 -2
  217. package/src/communityRepository/observers/getTrendingCommunities/TrendingCommunitiesPaginationController.ts +1 -6
  218. package/src/communityRepository/observers/getTrendingCommunities/TrendingCommunitiesQueryStreamController.ts +2 -2
  219. package/src/communityRepository/observers/index.ts +0 -1
  220. package/src/communityRepository/observers/searchCommunities/SearchCommunitiesPaginationController.ts +0 -1
  221. package/src/communityRepository/observers/searchCommunities/SearchCommunitiesQueryStreamController.ts +2 -2
  222. package/src/communityRepository/observers/semanticSearch/SemanticSearchCommunityPaginationController.ts +0 -1
  223. package/src/communityRepository/observers/semanticSearch/SemanticSearchCommunityQueryStreamController.ts +2 -2
  224. package/src/communityRepository/utils/communityWithMembership.ts +5 -9
  225. package/src/communityRepository/utils/payload.ts +2 -28
  226. package/src/core/liveCollection/PaginationController.ts +1 -1
  227. package/src/core/liveCollection/PaginationNoPageController.ts +1 -1
  228. package/src/core/model/idResolvers.ts +0 -3
  229. package/src/core/model/index.ts +0 -3
  230. package/src/index.ts +0 -2
  231. package/src/messagePreview/utils/getChannelMessagePreviewWithUser.ts +1 -1
  232. package/src/messageRepository/api/deleteMessage.ts +16 -0
  233. package/src/messageRepository/events/onMessageCreated.ts +1 -1
  234. package/src/messageRepository/observers/getMessages/MessageQueryStreamController.ts +13 -0
  235. package/src/postRepository/api/createPost.ts +3 -2
  236. package/src/postRepository/observers/getGlobalPinnedPosts/GlobalPinnedPostQueryStreamController.ts +1 -7
  237. package/src/postRepository/observers/getPinnedPosts/PinnedPostQueryStreamController.ts +1 -7
  238. package/src/postRepository/utils/payload.ts +35 -1
  239. package/src/streamRepository/api/createStream.ts +4 -1
  240. package/src/streamRepository/api/editStream.ts +51 -0
  241. package/src/streamRepository/api/index.ts +1 -0
  242. package/src/streamRepository/api/updateStream.ts +8 -1
  243. package/src/streamRepository/internalApi/getLiveChat.ts +59 -0
  244. package/src/streamRepository/internalApi/getStream.ts +3 -3
  245. package/src/streamRepository/observers/getStreams/GetStreamsLiveCollectionController.ts +1 -1
  246. package/src/subChannelRepository/utils/prepareSubChannelPayload.ts +0 -4
  247. package/src/utils/linkedObject/index.ts +0 -6
  248. package/src/utils/linkedObject/postLinkedObject.ts +34 -11
  249. package/src/utils/linkedObject/streamLinkedObject.ts +2 -0
  250. package/src/utils/postTypePredicate.ts +16 -3
  251. package/dist/@types/domains/invitation.d.ts +0 -92
  252. package/dist/@types/domains/invitation.d.ts.map +0 -1
  253. package/dist/@types/domains/joinRequest.d.ts +0 -53
  254. package/dist/@types/domains/joinRequest.d.ts.map +0 -1
  255. package/dist/communityRepository/communityMembership/events/onLocalCommunityJoin.d.ts +0 -2
  256. package/dist/communityRepository/communityMembership/events/onLocalCommunityJoin.d.ts.map +0 -1
  257. package/dist/communityRepository/internalAPI/getMyJoinRequest.d.ts +0 -16
  258. package/dist/communityRepository/internalAPI/getMyJoinRequest.d.ts.map +0 -1
  259. package/dist/communityRepository/internalAPI/joinCommunity.d.ts +0 -16
  260. package/dist/communityRepository/internalAPI/joinCommunity.d.ts.map +0 -1
  261. package/dist/communityRepository/joinRequest/events/index.d.ts +0 -4
  262. package/dist/communityRepository/joinRequest/events/index.d.ts.map +0 -1
  263. package/dist/communityRepository/joinRequest/events/onJoinRequestCreated.d.ts +0 -17
  264. package/dist/communityRepository/joinRequest/events/onJoinRequestCreated.d.ts.map +0 -1
  265. package/dist/communityRepository/joinRequest/events/onJoinRequestDeleted.d.ts +0 -17
  266. package/dist/communityRepository/joinRequest/events/onJoinRequestDeleted.d.ts.map +0 -1
  267. package/dist/communityRepository/joinRequest/events/onJoinRequestUpdated.d.ts +0 -17
  268. package/dist/communityRepository/joinRequest/events/onJoinRequestUpdated.d.ts.map +0 -1
  269. package/dist/communityRepository/joinRequest/internalAPI/approveJoinRequest.d.ts +0 -16
  270. package/dist/communityRepository/joinRequest/internalAPI/approveJoinRequest.d.ts.map +0 -1
  271. package/dist/communityRepository/joinRequest/internalAPI/cancelJoinRequest.d.ts +0 -16
  272. package/dist/communityRepository/joinRequest/internalAPI/cancelJoinRequest.d.ts.map +0 -1
  273. package/dist/communityRepository/joinRequest/internalAPI/rejectJoinRequest.d.ts +0 -16
  274. package/dist/communityRepository/joinRequest/internalAPI/rejectJoinRequest.d.ts.map +0 -1
  275. package/dist/communityRepository/observers/getJoinRequestList/JoinRequestListLiveCollectionController.d.ts +0 -14
  276. package/dist/communityRepository/observers/getJoinRequestList/JoinRequestListLiveCollectionController.d.ts.map +0 -1
  277. package/dist/communityRepository/observers/getJoinRequestList/JoinRequestListPaginationController.d.ts +0 -9
  278. package/dist/communityRepository/observers/getJoinRequestList/JoinRequestListPaginationController.d.ts.map +0 -1
  279. package/dist/communityRepository/observers/getJoinRequestList/JoinRequestListQueryStreamController.d.ts +0 -15
  280. package/dist/communityRepository/observers/getJoinRequestList/JoinRequestListQueryStreamController.d.ts.map +0 -1
  281. package/dist/communityRepository/observers/getJoinRequestList/enum.d.ts +0 -6
  282. package/dist/communityRepository/observers/getJoinRequestList/enum.d.ts.map +0 -1
  283. package/dist/communityRepository/observers/getJoinRequestList.d.ts +0 -12
  284. package/dist/communityRepository/observers/getJoinRequestList.d.ts.map +0 -1
  285. package/dist/communityRepository/observers/getJoinRequests/JoinRequestsLiveCollectionController.d.ts +0 -14
  286. package/dist/communityRepository/observers/getJoinRequests/JoinRequestsLiveCollectionController.d.ts.map +0 -1
  287. package/dist/communityRepository/observers/getJoinRequests/JoinRequestsPaginationController.d.ts +0 -9
  288. package/dist/communityRepository/observers/getJoinRequests/JoinRequestsPaginationController.d.ts.map +0 -1
  289. package/dist/communityRepository/observers/getJoinRequests/JoinRequestsQueryStreamController.d.ts +0 -15
  290. package/dist/communityRepository/observers/getJoinRequests/JoinRequestsQueryStreamController.d.ts.map +0 -1
  291. package/dist/communityRepository/observers/getJoinRequests/enum.d.ts +0 -6
  292. package/dist/communityRepository/observers/getJoinRequests/enum.d.ts.map +0 -1
  293. package/dist/communityRepository/observers/getJoinRequests.d.ts +0 -12
  294. package/dist/communityRepository/observers/getJoinRequests.d.ts.map +0 -1
  295. package/dist/invitationRepository/events/index.d.ts +0 -4
  296. package/dist/invitationRepository/events/index.d.ts.map +0 -1
  297. package/dist/invitationRepository/events/onLocalInvitationCreated.d.ts +0 -17
  298. package/dist/invitationRepository/events/onLocalInvitationCreated.d.ts.map +0 -1
  299. package/dist/invitationRepository/events/onLocalInvitationDeleted.d.ts +0 -17
  300. package/dist/invitationRepository/events/onLocalInvitationDeleted.d.ts.map +0 -1
  301. package/dist/invitationRepository/events/onLocalInvitationUpdated.d.ts +0 -17
  302. package/dist/invitationRepository/events/onLocalInvitationUpdated.d.ts.map +0 -1
  303. package/dist/invitationRepository/index.d.ts +0 -3
  304. package/dist/invitationRepository/index.d.ts.map +0 -1
  305. package/dist/invitationRepository/internalApi/acceptInvitation.d.ts +0 -16
  306. package/dist/invitationRepository/internalApi/acceptInvitation.d.ts.map +0 -1
  307. package/dist/invitationRepository/internalApi/createInvitations.d.ts +0 -21
  308. package/dist/invitationRepository/internalApi/createInvitations.d.ts.map +0 -1
  309. package/dist/invitationRepository/internalApi/getInvitation.d.ts +0 -17
  310. package/dist/invitationRepository/internalApi/getInvitation.d.ts.map +0 -1
  311. package/dist/invitationRepository/internalApi/index.d.ts +0 -4
  312. package/dist/invitationRepository/internalApi/index.d.ts.map +0 -1
  313. package/dist/invitationRepository/internalApi/rejectInvitation.d.ts +0 -16
  314. package/dist/invitationRepository/internalApi/rejectInvitation.d.ts.map +0 -1
  315. package/dist/invitationRepository/observers/getInvitations/InvitationsLiveCollectionController.d.ts +0 -14
  316. package/dist/invitationRepository/observers/getInvitations/InvitationsLiveCollectionController.d.ts.map +0 -1
  317. package/dist/invitationRepository/observers/getInvitations/InvitationsPaginationController.d.ts +0 -5
  318. package/dist/invitationRepository/observers/getInvitations/InvitationsPaginationController.d.ts.map +0 -1
  319. package/dist/invitationRepository/observers/getInvitations/InvitationsQueryStreamController.d.ts +0 -15
  320. package/dist/invitationRepository/observers/getInvitations/InvitationsQueryStreamController.d.ts.map +0 -1
  321. package/dist/invitationRepository/observers/getInvitations/enums.d.ts +0 -6
  322. package/dist/invitationRepository/observers/getInvitations/enums.d.ts.map +0 -1
  323. package/dist/invitationRepository/observers/getInvitations.d.ts +0 -12
  324. package/dist/invitationRepository/observers/getInvitations.d.ts.map +0 -1
  325. package/dist/invitationRepository/observers/getMyCommunityInvitations.d.ts +0 -12
  326. package/dist/invitationRepository/observers/getMyCommunityInvitations.d.ts.map +0 -1
  327. package/dist/invitationRepository/observers/getMyInvitations/MyInvitationsLiveCollectionController.d.ts +0 -14
  328. package/dist/invitationRepository/observers/getMyInvitations/MyInvitationsLiveCollectionController.d.ts.map +0 -1
  329. package/dist/invitationRepository/observers/getMyInvitations/MyInvitationsPaginationController.d.ts +0 -5
  330. package/dist/invitationRepository/observers/getMyInvitations/MyInvitationsPaginationController.d.ts.map +0 -1
  331. package/dist/invitationRepository/observers/getMyInvitations/MyInvitationsQueryStreamController.d.ts +0 -15
  332. package/dist/invitationRepository/observers/getMyInvitations/MyInvitationsQueryStreamController.d.ts.map +0 -1
  333. package/dist/invitationRepository/observers/index.d.ts +0 -2
  334. package/dist/invitationRepository/observers/index.d.ts.map +0 -1
  335. package/dist/invitationRepository/utils/convertRawInvitationToInternalInvitation.d.ts +0 -2
  336. package/dist/invitationRepository/utils/convertRawInvitationToInternalInvitation.d.ts.map +0 -1
  337. package/dist/invitationRepository/utils/index.d.ts +0 -2
  338. package/dist/invitationRepository/utils/index.d.ts.map +0 -1
  339. package/dist/invitationRepository/utils/prepareInvitationPayload.d.ts +0 -2
  340. package/dist/invitationRepository/utils/prepareInvitationPayload.d.ts.map +0 -1
  341. package/dist/invitationRepository/utils/prepareMyInvitationsPayload.d.ts +0 -2
  342. package/dist/invitationRepository/utils/prepareMyInvitationsPayload.d.ts.map +0 -1
  343. package/dist/utils/linkedObject/communityLinkedObject.d.ts +0 -2
  344. package/dist/utils/linkedObject/communityLinkedObject.d.ts.map +0 -1
  345. package/dist/utils/linkedObject/invitationLinkedObject.d.ts +0 -2
  346. package/dist/utils/linkedObject/invitationLinkedObject.d.ts.map +0 -1
  347. package/dist/utils/linkedObject/joinRequestLinkedObject.d.ts +0 -2
  348. package/dist/utils/linkedObject/joinRequestLinkedObject.d.ts.map +0 -1
  349. package/src/@types/domains/invitation.ts +0 -119
  350. package/src/@types/domains/joinRequest.ts +0 -66
  351. package/src/communityRepository/communityMembership/events/onLocalCommunityJoin.ts +0 -20
  352. package/src/communityRepository/internalAPI/getMyJoinRequest.ts +0 -43
  353. package/src/communityRepository/internalAPI/joinCommunity.ts +0 -66
  354. package/src/communityRepository/joinRequest/events/index.ts +0 -3
  355. package/src/communityRepository/joinRequest/events/onJoinRequestCreated.ts +0 -33
  356. package/src/communityRepository/joinRequest/events/onJoinRequestDeleted.ts +0 -33
  357. package/src/communityRepository/joinRequest/events/onJoinRequestUpdated.ts +0 -33
  358. package/src/communityRepository/joinRequest/internalAPI/approveJoinRequest.ts +0 -52
  359. package/src/communityRepository/joinRequest/internalAPI/cancelJoinRequest.ts +0 -46
  360. package/src/communityRepository/joinRequest/internalAPI/rejectJoinRequest.ts +0 -52
  361. package/src/communityRepository/observers/getJoinRequestList/JoinRequestListLiveCollectionController.ts +0 -130
  362. package/src/communityRepository/observers/getJoinRequestList/JoinRequestListPaginationController.ts +0 -30
  363. package/src/communityRepository/observers/getJoinRequestList/JoinRequestListQueryStreamController.ts +0 -112
  364. package/src/communityRepository/observers/getJoinRequestList/enum.ts +0 -5
  365. package/src/communityRepository/observers/getJoinRequestList.ts +0 -51
  366. package/src/communityRepository/observers/getJoinRequests/JoinRequestsLiveCollectionController.ts +0 -126
  367. package/src/communityRepository/observers/getJoinRequests/JoinRequestsPaginationController.ts +0 -26
  368. package/src/communityRepository/observers/getJoinRequests/JoinRequestsQueryStreamController.ts +0 -108
  369. package/src/communityRepository/observers/getJoinRequests/enum.ts +0 -5
  370. package/src/communityRepository/observers/getJoinRequests.ts +0 -44
  371. package/src/invitationRepository/events/index.ts +0 -3
  372. package/src/invitationRepository/events/onLocalInvitationCreated.ts +0 -33
  373. package/src/invitationRepository/events/onLocalInvitationDeleted.ts +0 -33
  374. package/src/invitationRepository/events/onLocalInvitationUpdated.ts +0 -33
  375. package/src/invitationRepository/index.ts +0 -2
  376. package/src/invitationRepository/internalApi/acceptInvitation.ts +0 -45
  377. package/src/invitationRepository/internalApi/createInvitations.ts +0 -52
  378. package/src/invitationRepository/internalApi/getInvitation.ts +0 -47
  379. package/src/invitationRepository/internalApi/index.ts +0 -3
  380. package/src/invitationRepository/internalApi/rejectInvitation.ts +0 -45
  381. package/src/invitationRepository/observers/getInvitations/InvitationsLiveCollectionController.ts +0 -148
  382. package/src/invitationRepository/observers/getInvitations/InvitationsPaginationController.ts +0 -19
  383. package/src/invitationRepository/observers/getInvitations/InvitationsQueryStreamController.ts +0 -97
  384. package/src/invitationRepository/observers/getInvitations/enums.ts +0 -5
  385. package/src/invitationRepository/observers/getInvitations.ts +0 -44
  386. package/src/invitationRepository/observers/getMyCommunityInvitations.ts +0 -48
  387. package/src/invitationRepository/observers/getMyInvitations/MyInvitationsLiveCollectionController.ts +0 -148
  388. package/src/invitationRepository/observers/getMyInvitations/MyInvitationsPaginationController.ts +0 -22
  389. package/src/invitationRepository/observers/getMyInvitations/MyInvitationsQueryStreamController.ts +0 -105
  390. package/src/invitationRepository/observers/index.ts +0 -1
  391. package/src/invitationRepository/utils/convertRawInvitationToInternalInvitation.ts +0 -8
  392. package/src/invitationRepository/utils/index.ts +0 -1
  393. package/src/invitationRepository/utils/prepareInvitationPayload.ts +0 -12
  394. package/src/invitationRepository/utils/prepareMyInvitationsPayload.ts +0 -12
  395. package/src/utils/linkedObject/communityLinkedObject.ts +0 -57
  396. package/src/utils/linkedObject/invitationLinkedObject.ts +0 -37
  397. package/src/utils/linkedObject/joinRequestLinkedObject.ts +0 -31
@@ -3,7 +3,6 @@ import { pullFromCache, pushToCache } from '~/cache/api';
3
3
  import { ingestInCache } from '~/cache/api/ingestInCache';
4
4
  import { getResolver } from '~/core/model';
5
5
  import { getActiveClient } from '~/client';
6
- import { convertRawUserToInternalUser } from '~/userRepository/utils/convertRawUserToInternalUser';
7
6
 
8
7
  export class PinnedPostQueryStreamController extends QueryStreamController<
9
8
  Amity.PinnedPostPayload,
@@ -30,12 +29,7 @@ export class PinnedPostQueryStreamController extends QueryStreamController<
30
29
  const cachedAt = client.cache && Date.now();
31
30
 
32
31
  if (client.cache) {
33
- const processedPayload = {
34
- ...response,
35
- users: response.users ? response.users.map(convertRawUserToInternalUser) : [],
36
- };
37
-
38
- ingestInCache(processedPayload, { cachedAt });
32
+ ingestInCache(response, { cachedAt });
39
33
  }
40
34
  }
41
35
 
@@ -1,8 +1,28 @@
1
1
  import { addPostSetting } from '~/communityRepository/utils';
2
2
  import { updateMembershipStatus } from '~/communityRepository/utils/communityWithMembership';
3
+ import { isAmityLivestreamPost } from '~/utils/postTypePredicate';
4
+
5
+ const updateStreamReferences = (
6
+ streams: Amity.RawStream[],
7
+ streamId: string | undefined,
8
+ postId: string,
9
+ ) => {
10
+ if (!streamId) return streams;
11
+
12
+ return streams.map(stream =>
13
+ stream.streamId === streamId
14
+ ? {
15
+ ...stream,
16
+ referenceType: 'post',
17
+ referenceId: postId,
18
+ postId,
19
+ }
20
+ : stream,
21
+ );
22
+ };
3
23
 
4
24
  export const preparePostPayload = (payload: Amity.PostPayload): Amity.ProcessedPostPayload => {
5
- const { posts: postsData, ...postPayload } = payload;
25
+ const { posts: postsData, postChildren, videoStreamings, ...postPayload } = payload;
6
26
 
7
27
  // Unpack community payload by mapping payload field to postSetting value.
8
28
  const communitiesWithPostSetting = addPostSetting({ communities: postPayload.communities });
@@ -24,18 +44,32 @@ export const preparePostPayload = (payload: Amity.PostPayload): Amity.ProcessedP
24
44
  mappedCommunityUsers,
25
45
  );
26
46
 
47
+ let mappedNewStream: Amity.RawStream[] = [];
48
+
27
49
  // feed type
28
50
  const posts = postsData.map(post => {
29
51
  const feedType = postPayload.feeds.find(feed => feed.feedId === post.feedId)?.feedType;
52
+ const childPost = payload.postChildren.find(children => children.parentPostId === post.postId);
53
+
54
+ if (isAmityLivestreamPost(childPost)) {
55
+ mappedNewStream = updateStreamReferences(
56
+ videoStreamings,
57
+ childPost.data?.streamId,
58
+ post.postId,
59
+ );
60
+ }
30
61
 
31
62
  return {
32
63
  ...post,
64
+ childPost,
33
65
  feedType,
34
66
  };
35
67
  });
36
68
 
37
69
  return {
38
70
  ...postPayload,
71
+ postChildren,
72
+ videoStreamings: mappedNewStream,
39
73
  posts,
40
74
  communities: communityWithMembershipStatus,
41
75
  communityUsers: mappedCommunityUsers,
@@ -21,7 +21,10 @@ import { LinkedObject } from '~/utils/linkedObject';
21
21
  * @async
22
22
  */
23
23
  export const createStream = async (
24
- bundle: Pick<Amity.InternalStream, 'title' | 'thumbnailFileId' | 'description'> & {
24
+ bundle: Pick<
25
+ Amity.InternalStream,
26
+ 'title' | 'thumbnailFileId' | 'description' | 'channelEnabled'
27
+ > & {
25
28
  isSecure?: boolean;
26
29
  },
27
30
  ): Promise<Amity.Cached<Amity.Stream>> => {
@@ -0,0 +1,51 @@
1
+ import { getActiveClient } from '~/client/api';
2
+
3
+ import { ingestInCache } from '~/cache/api/ingestInCache';
4
+ import { LinkedObject } from '~/utils/linkedObject';
5
+
6
+ /* begin_public_function
7
+ id: stream.update
8
+ */
9
+ /**
10
+ *
11
+ * ```js
12
+ * import { StreamRepository } from '@amityco/ts-sdk'
13
+ * const updated = await StreamRepository.editStream(streamId, { title: 'foobar' })
14
+ * ```
15
+ *
16
+ * Updates an {@link Amity.Stream}
17
+ *
18
+ * @param streamId The ID of the {@link Amity.Stream} to edit
19
+ * @param patch The patch data to apply
20
+ * @returns the updated {@link Amity.Stream} object
21
+ *
22
+ * @category Stream API
23
+ * @async
24
+ */
25
+
26
+ export const editStream = async (
27
+ streamId: Amity.Stream['streamId'],
28
+ patch: Patch<
29
+ Amity.Stream,
30
+ 'title' | 'thumbnailFileId' | 'description' | 'metadata' | 'channelEnabled'
31
+ >,
32
+ ): Promise<Amity.Cached<Amity.Stream>> => {
33
+ const client = getActiveClient();
34
+ client.log('stream/updateStream', streamId, patch);
35
+
36
+ const { data } = await client.http.put<Amity.StreamPayload>(
37
+ `/api/v3/video-streaming/${streamId}`,
38
+ patch,
39
+ );
40
+
41
+ const cachedAt = client.cache && Date.now();
42
+ if (client.cache) ingestInCache(data, { cachedAt });
43
+
44
+ const { videoStreamings } = data;
45
+
46
+ return {
47
+ data: LinkedObject.stream(videoStreamings.find(stream => stream.streamId === streamId)!),
48
+ cachedAt,
49
+ };
50
+ };
51
+ /* end_public_function */
@@ -2,3 +2,4 @@ export * from './createStream';
2
2
  export * from './updateStream';
3
3
  export * from './deleteStream';
4
4
  export * from './disposeStream';
5
+ export * from './editStream';
@@ -7,6 +7,9 @@ import { LinkedObject } from '~/utils/linkedObject';
7
7
  id: stream.update
8
8
  */
9
9
  /**
10
+ * @deprecated this function is deprecated,
11
+ * please use {@link Amity.StreamRepository.editStream} instead.
12
+ *
10
13
  * ```js
11
14
  * import { updateStream } from '@amityco/ts-sdk'
12
15
  * const updated = await updateStream(streamId, { title: 'foobar' })
@@ -21,9 +24,13 @@ import { LinkedObject } from '~/utils/linkedObject';
21
24
  * @category Stream API
22
25
  * @async
23
26
  */
27
+
24
28
  export const updateStream = async (
25
29
  streamId: Amity.Stream['streamId'],
26
- patch: Patch<Amity.Stream, 'title' | 'thumbnailFileId' | 'description' | 'metadata'>,
30
+ patch: Patch<
31
+ Amity.Stream,
32
+ 'title' | 'thumbnailFileId' | 'description' | 'metadata' | 'channelEnabled'
33
+ >,
27
34
  ): Promise<Amity.Cached<Amity.Stream>> => {
28
35
  const client = getActiveClient();
29
36
  client.log('stream/updateStream', streamId, patch);
@@ -0,0 +1,59 @@
1
+ import { getActiveClient } from '~/client/api/activeClient';
2
+ import { mergeInCache, pullFromCache } from '~/cache/api';
3
+ import { createChannel } from '~/channelRepository/api/createChannel';
4
+ import { channelLinkedObject } from '~/utils/linkedObject/channelLinkedObject';
5
+ import { getChannel } from '~/channelRepository/internalApi/getChannel';
6
+ import { constructChannelObject } from '~/channelRepository/utils/constructChannelObject';
7
+
8
+ /**
9
+ * ```js
10
+ * import { getStream } from '@amityco/ts-sdk'
11
+ * const stream = await getStream('foobar')
12
+ * ```
13
+ *
14
+ * Fetches a {@link Amity.Channel} object linked with a current stream
15
+ *
16
+ * @param stream {@link Amity.Stream} that has linked live channel
17
+ * @returns the associated {@link Amity.Channel<'live'>} object
18
+ *
19
+ * @category Stream API
20
+ * @async
21
+ */
22
+
23
+ export const getLiveChat = async (
24
+ stream: Amity.InternalStream,
25
+ ): Promise<Amity.Channel<'live'> | undefined> => {
26
+ const client = getActiveClient();
27
+ client.log('stream/getLiveChat', stream.streamId);
28
+
29
+ if (stream.channelId) {
30
+ const channel = pullFromCache<Amity.StaticInternalChannel>([
31
+ 'channel',
32
+ 'get',
33
+ stream.channelId,
34
+ ])?.data;
35
+
36
+ if (channel) return channelLinkedObject(constructChannelObject(channel));
37
+
38
+ const { data } = await getChannel(stream.channelId);
39
+ return channelLinkedObject(constructChannelObject(data));
40
+ }
41
+ // No Channel ID
42
+ // streamer: create a new live channel
43
+ if (stream.userId === client.userId) {
44
+ const { data: channel } = await createChannel({
45
+ type: 'live',
46
+ postId: stream.postId,
47
+ videoStreamId: stream.streamId,
48
+ });
49
+
50
+ // Update channelId to stream object in cache
51
+ mergeInCache(['stream', 'get', stream.streamId], {
52
+ channelId: channel.channelId,
53
+ });
54
+
55
+ return channel;
56
+ }
57
+ // watcher: return undefined
58
+ return undefined;
59
+ };
@@ -22,7 +22,7 @@ import { ingestInCache } from '~/cache/api/ingestInCache';
22
22
  */
23
23
  export const getStream = async (
24
24
  streamId: Amity.Stream['streamId'],
25
- ): Promise<Amity.Cached<Amity.Stream>> => {
25
+ ): Promise<Amity.Cached<Amity.InternalStream>> => {
26
26
  const client = getActiveClient();
27
27
  client.log('stream/getStream', streamId);
28
28
 
@@ -57,13 +57,13 @@ export const getStream = async (
57
57
  */
58
58
  getStream.locally = (
59
59
  streamId: Amity.Stream['streamId'],
60
- ): Amity.Cached<Amity.Stream> | undefined => {
60
+ ): Amity.Cached<Amity.InternalStream> | undefined => {
61
61
  const client = getActiveClient();
62
62
  client.log('stream/getStream', streamId);
63
63
 
64
64
  if (!client.cache) return;
65
65
 
66
- const cached = pullFromCache<Amity.Stream>(['stream', 'get', streamId]);
66
+ const cached = pullFromCache<Amity.InternalStream>(['stream', 'get', streamId]);
67
67
 
68
68
  if (!cached) return;
69
69
 
@@ -102,7 +102,7 @@ export class GetStreamsLiveCollectionController extends LiveCollectionController
102
102
  this.queryStreamController.appendToQueryStream(response, direction, refresh);
103
103
  }
104
104
 
105
- private applyFilter = (data: Amity.InternalStream[]): Amity.InternalStream[] => {
105
+ private applyFilter = (data: Amity.Stream[]): Amity.Stream[] => {
106
106
  let streams = filterByPropEquality(data, 'isDeleted', this.query.isDeleted);
107
107
 
108
108
  streams = streams.sort(
@@ -4,7 +4,6 @@ import { convertFromRaw as convertMessageFromRaw } from '~/messageRepository/uti
4
4
  import { convertFromRaw as convertSubChannelFromRaw } from './convertSubChannelFromRaw';
5
5
 
6
6
  import { updateSubChannelMessagePreviewCache } from '../../messagePreview/utils/updateSubChannelMessagePreviewCache';
7
- import { convertRawUserToInternalUser } from '~/userRepository/utils/convertRawUserToInternalUser';
8
7
 
9
8
  export const MARKER_INCLUDED_SUB_CHANNEL_TYPE = ['broadcast', 'conversation', 'community'];
10
9
 
@@ -45,13 +44,10 @@ export const prepareSubChannelPayload = async (
45
44
 
46
45
  const messages = rawPayload.messages.map(m => convertMessageFromRaw(m));
47
46
 
48
- const user = rawPayload.users.map(convertRawUserToInternalUser);
49
-
50
47
  return {
51
48
  ...rawPayload,
52
49
  messageFeeds,
53
50
  messages,
54
- users: user,
55
51
  };
56
52
  };
57
53
 
@@ -11,9 +11,6 @@ import { channelLinkedObject } from './channelLinkedObject';
11
11
  import { adLinkedObject } from './adLinkedObject';
12
12
  import { pinnedPostLinkedObject } from './pinnedPostLinkedObject';
13
13
  import { notificationTrayLinkedObject } from './notificationTrayLinkedObject';
14
- import { communityLinkedObject } from './communityLinkedObject';
15
- import { invitationLinkedObject } from './invitationLinkedObject';
16
- import { joinRequestLinkedObject } from './joinRequestLinkedObject';
17
14
 
18
15
  export const LinkedObject = {
19
16
  ad: adLinkedObject,
@@ -29,7 +26,4 @@ export const LinkedObject = {
29
26
  channel: channelLinkedObject,
30
27
  pinnedPost: pinnedPostLinkedObject,
31
28
  notificationTray: notificationTrayLinkedObject,
32
- community: communityLinkedObject,
33
- invitation: invitationLinkedObject,
34
- joinRequest: joinRequestLinkedObject,
35
29
  };
@@ -2,11 +2,18 @@ import { pullFromCache } from '~/cache/api';
2
2
  import { commentLinkedObject } from '~/utils/linkedObject/commentLinkedObject';
3
3
  import AnalyticsEngine from '../../analytic/service/analytic/AnalyticsEngine';
4
4
  import { userLinkedObject } from './userLinkedObject';
5
- import { isAmityFilePost, isAmityImagePost, isAmityVideoPost } from '../postTypePredicate';
5
+ import {
6
+ isAmityFilePost,
7
+ isAmityImagePost,
8
+ isAmityLivestreamPost,
9
+ isAmityVideoPost,
10
+ } from '../postTypePredicate';
11
+ import { streamLinkedObject } from './streamLinkedObject';
6
12
 
7
13
  export const postLinkedObject = (post: Amity.InternalPost): Amity.Post => {
14
+ const { childPost, ...rest } = post;
8
15
  return {
9
- ...post,
16
+ ...rest,
10
17
 
11
18
  analytics: {
12
19
  markAsViewed: () => {
@@ -41,28 +48,44 @@ export const postLinkedObject = (post: Amity.InternalPost): Amity.Post => {
41
48
  },
42
49
 
43
50
  getImageInfo(): Amity.File<'image'> | undefined {
44
- return isAmityImagePost(post)
45
- ? pullFromCache<Amity.File<'image'>>(['file', 'get', post?.data?.fileId])?.data
51
+ return isAmityImagePost(childPost)
52
+ ? pullFromCache<Amity.File<'image'>>(['file', 'get', childPost?.data?.fileId])?.data
46
53
  : undefined;
47
54
  },
48
55
 
49
56
  getVideoInfo(): Amity.File<'video'> | undefined {
50
- return isAmityVideoPost(post)
51
- ? pullFromCache<Amity.File<'video'>>(['file', 'get', post?.data?.videoFileId?.original])
52
- ?.data
57
+ return isAmityVideoPost(childPost)
58
+ ? pullFromCache<Amity.File<'video'>>([
59
+ 'file',
60
+ 'get',
61
+ childPost?.data?.videoFileId?.original,
62
+ ])?.data
53
63
  : undefined;
54
64
  },
55
65
 
56
66
  getVideoThumbnailInfo(): Amity.File<'image'> | undefined {
57
- return isAmityVideoPost(post)
58
- ? pullFromCache<Amity.File<'image'>>(['file', 'get', post?.data?.thumbnailFileId])?.data
67
+ return isAmityVideoPost(childPost)
68
+ ? pullFromCache<Amity.File<'image'>>(['file', 'get', childPost?.data?.thumbnailFileId])
69
+ ?.data
59
70
  : undefined;
60
71
  },
61
72
 
62
73
  getFileInfo(): Amity.File<'file'> | undefined {
63
- return isAmityFilePost(post)
64
- ? pullFromCache<Amity.File<'file'>>(['file', 'get', post?.data?.fileId])?.data
74
+ return isAmityFilePost(childPost)
75
+ ? pullFromCache<Amity.File<'file'>>(['file', 'get', childPost?.data?.fileId])?.data
65
76
  : undefined;
66
77
  },
78
+
79
+ getLivestreamInfo(): Amity.Stream | undefined {
80
+ if (!isAmityLivestreamPost(childPost)) return;
81
+ const cache = pullFromCache<Amity.InternalStream>([
82
+ 'stream',
83
+ 'get',
84
+ childPost?.data?.streamId,
85
+ ])?.data;
86
+ if (!cache) return;
87
+
88
+ return streamLinkedObject(cache);
89
+ },
67
90
  };
68
91
  };
@@ -1,4 +1,5 @@
1
1
  import { pullFromCache } from '~/cache/api';
2
+ import { getLiveChat as _getLiveChat } from '~/streamRepository/internalApi/getLiveChat';
2
3
 
3
4
  export const streamLinkedObject = (stream: Amity.InternalStream): Amity.Stream => {
4
5
  return {
@@ -18,5 +19,6 @@ export const streamLinkedObject = (stream: Amity.InternalStream): Amity.Stream =
18
19
  get user() {
19
20
  return pullFromCache<Amity.User>(['user', 'get', stream.userId])?.data;
20
21
  },
22
+ getLiveChat: () => _getLiveChat(stream),
21
23
  };
22
24
  };
@@ -1,5 +1,6 @@
1
- export function isAmityImagePost(post: Amity.InternalPost): post is Amity.Post<'image'> {
1
+ export function isAmityImagePost(post?: Amity.InternalPost): post is Amity.Post<'image'> {
2
2
  return !!(
3
+ post &&
3
4
  post.data &&
4
5
  typeof post.data !== 'string' &&
5
6
  'fileId' in post.data &&
@@ -7,8 +8,9 @@ export function isAmityImagePost(post: Amity.InternalPost): post is Amity.Post<'
7
8
  );
8
9
  }
9
10
 
10
- export function isAmityFilePost(post: Amity.InternalPost): post is Amity.Post<'file'> {
11
+ export function isAmityFilePost(post?: Amity.InternalPost): post is Amity.Post<'file'> {
11
12
  return !!(
13
+ post &&
12
14
  post.data &&
13
15
  typeof post.data !== 'string' &&
14
16
  'fileId' in post.data &&
@@ -16,8 +18,9 @@ export function isAmityFilePost(post: Amity.InternalPost): post is Amity.Post<'f
16
18
  );
17
19
  }
18
20
 
19
- export function isAmityVideoPost(post: Amity.InternalPost): post is Amity.Post<'video'> {
21
+ export function isAmityVideoPost(post?: Amity.InternalPost): post is Amity.Post<'video'> {
20
22
  return !!(
23
+ post &&
21
24
  post.data &&
22
25
  typeof post.data !== 'string' &&
23
26
  'videoFileId' in post.data &&
@@ -25,3 +28,13 @@ export function isAmityVideoPost(post: Amity.InternalPost): post is Amity.Post<'
25
28
  post.dataType === 'video'
26
29
  );
27
30
  }
31
+
32
+ export function isAmityLivestreamPost(post?: Amity.InternalPost): post is Amity.Post<'liveStream'> {
33
+ return !!(
34
+ post &&
35
+ post.data &&
36
+ typeof post.data !== 'string' &&
37
+ 'streamId' in post.data &&
38
+ post.dataType === 'liveStream'
39
+ );
40
+ }
@@ -1,92 +0,0 @@
1
- export {};
2
- export declare const enum InvitationTypeEnum {
3
- CommunityMemberInvite = "communityMemberInvite",
4
- LivestreamInvite = "livestreamInvite"
5
- }
6
- export declare const enum InvitationStatusEnum {
7
- Pending = "pending",
8
- Approved = "approved",
9
- Rejected = "rejected",
10
- Cancelled = "cancelled"
11
- }
12
- export declare const enum InvitationSortByEnum {
13
- FirstCreated = "firstCreated",
14
- LastCreated = "lastCreated"
15
- }
16
- declare global {
17
- namespace Amity {
18
- type InvitationType = InvitationTypeEnum;
19
- type InvitationStatus = InvitationStatusEnum;
20
- type InvitationTargetType = Extract<Amity.Domain, 'community'>;
21
- type InvitationTargetMap = {
22
- community: Amity.InternalCommunity;
23
- };
24
- type InvitationTarget<T extends InvitationTargetType> = InvitationTargetMap[T];
25
- type InvitationSortBy = InvitationSortByEnum;
26
- type InvitationDomain<T extends Amity.InvitationTargetType = Amity.InvitationTargetType> = T extends 'community' ? {
27
- communityId: string;
28
- } : {
29
- communityId?: string;
30
- };
31
- type RawInvitation = {
32
- _id: string;
33
- networkId: string;
34
- type: Amity.InvitationType;
35
- targetId: string;
36
- targetType: Amity.InvitationTargetType;
37
- userId: string;
38
- status: Amity.InvitationStatus;
39
- respondedAt: Amity.timestamp;
40
- createdBy: string;
41
- invitationId: string;
42
- invitedUserId: string;
43
- invitedUserInternalId: string;
44
- invitedUserPublicId: string;
45
- inviterUserId: string;
46
- inviterUserInternalId: string;
47
- inviterUserPublicId: string;
48
- } & Amity.Timestamps & Amity.InvitationDomain<Amity.InvitationTargetType>;
49
- type InternalInvitation = Omit<RawInvitation, 'createdBy'> & {
50
- createdById: string;
51
- };
52
- type Invitation = Omit<Amity.InternalInvitation, 'createdBy'> & Amity.InvitationLinkedObject & {
53
- user?: Amity.User;
54
- createdById: string;
55
- createdBy?: Amity.User;
56
- target?: Amity.InvitationTarget<Amity.InvitationTargetType>;
57
- };
58
- type QueryInvitations = {
59
- targetId: string;
60
- statuses?: string[];
61
- token?: Amity.Token;
62
- type: Amity.InvitationType;
63
- sortBy?: Amity.InvitationSortBy;
64
- limit?: Amity.PageLimit['limit'];
65
- targetType: Amity.InvitationTargetType;
66
- };
67
- type InvitationLiveCollection = Amity.LiveCollectionParams<Omit<QueryInvitations, 'limit'>>;
68
- type InvitationLiveCollectionCache = Amity.LiveCollectionCache<Amity.InternalInvitation['_id'], Pick<QueryInvitations, 'limit'>>;
69
- type QueryMyInvitations = {
70
- targetId?: string;
71
- token?: Amity.Token;
72
- type?: Amity.InvitationType;
73
- sortBy?: Amity.InvitationSortBy;
74
- limit?: Amity.PageLimit['limit'];
75
- statuses?: InvitationStatusEnum[];
76
- targetType?: Amity.InvitationTargetType;
77
- };
78
- type MyInvitationsLiveCollection = Amity.LiveCollectionParams<Omit<QueryMyInvitations, 'limit'>>;
79
- type MyInvitationsLiveCollectionCache = Amity.LiveCollectionCache<Amity.InternalInvitation['_id'], Pick<QueryMyInvitations, 'limit'>>;
80
- type InvitationLinkedObject = {
81
- accept: () => Promise<void>;
82
- reject: () => Promise<void>;
83
- };
84
- type CreateInvitations = {
85
- type: Amity.InvitationType;
86
- targetType: Amity.InvitationTargetType;
87
- targetId: string;
88
- userIds: string[];
89
- };
90
- }
91
- }
92
- //# sourceMappingURL=invitation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"invitation.d.ts","sourceRoot":"","sources":["../../../src/@types/domains/invitation.ts"],"names":[],"mappings":"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"}
@@ -1,53 +0,0 @@
1
- export {};
2
- export declare const enum JoinRequestStatusEnum {
3
- Pending = "pending",
4
- Approved = "approved",
5
- Rejected = "rejected",
6
- Cancelled = "cancelled"
7
- }
8
- export declare const enum JoinResultStatusEnum {
9
- Success = "success",
10
- Pending = "pending"
11
- }
12
- declare global {
13
- namespace Amity {
14
- type JoinRequestStatus = JoinRequestStatusEnum;
15
- type JoinResultStatus = JoinResultStatusEnum;
16
- type JoinRequestType = 'communityJoinRequest';
17
- type JoinResult = {
18
- status: Amity.JoinResultStatus;
19
- request?: Amity.JoinRequest;
20
- };
21
- type RawJoinRequest = {
22
- _id: string;
23
- createdAt: Amity.timestamp;
24
- joinRequestId: string;
25
- networkId: string;
26
- requestorId: string;
27
- requestorInternalId: string;
28
- requestorPublicId: string;
29
- respondedAt: Amity.timestamp | null;
30
- responderId: string | null;
31
- responderInternalId: string | null;
32
- responderPublicId: string | null;
33
- status: Amity.JoinRequestStatus;
34
- targetId: string;
35
- targetType: string;
36
- type: Amity.JoinRequestType;
37
- updatedAt: Amity.timestamp;
38
- userId: string;
39
- };
40
- type InternalJoinRequest = Omit<RawJoinRequest, '_id'>;
41
- type JoinRequest = Omit<Amity.InternalJoinRequest, 'responderId'> & Amity.JoinRequestLinkedObject & {
42
- user?: Amity.User;
43
- feeds?: Amity.Feed[];
44
- files?: Amity.File[];
45
- };
46
- type JoinRequestLinkedObject = {
47
- cancel: () => Promise<void>;
48
- approve: () => Promise<void>;
49
- reject: () => Promise<void>;
50
- };
51
- }
52
- }
53
- //# sourceMappingURL=joinRequest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"joinRequest.d.ts","sourceRoot":"","sources":["../../../src/@types/domains/joinRequest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC;AAEV,0BAAkB,qBAAqB;IACrC,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,SAAS,cAAc;CACxB;AAED,0BAAkB,oBAAoB;IACpC,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC;QACd,KAAK,iBAAiB,GAAG,qBAAqB,CAAC;QAE/C,KAAK,gBAAgB,GAAG,oBAAoB,CAAC;QAE7C,KAAK,eAAe,GAAG,sBAAsB,CAAC;QAE9C,KAAK,UAAU,GAAG;YAChB,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC;YAC/B,OAAO,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;SAC7B,CAAC;QAEF,KAAK,cAAc,GAAG;YACpB,GAAG,EAAE,MAAM,CAAC;YACZ,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;YAC3B,aAAa,EAAE,MAAM,CAAC;YACtB,SAAS,EAAE,MAAM,CAAC;YAElB,WAAW,EAAE,MAAM,CAAC;YACpB,mBAAmB,EAAE,MAAM,CAAC;YAC5B,iBAAiB,EAAE,MAAM,CAAC;YAE1B,WAAW,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;YACpC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;YAC3B,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;YACnC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;YAEjC,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC;YAChC,QAAQ,EAAE,MAAM,CAAC;YACjB,UAAU,EAAE,MAAM,CAAC;YACnB,IAAI,EAAE,KAAK,CAAC,eAAe,CAAC;YAC5B,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC;YAC3B,MAAM,EAAE,MAAM,CAAC;SAChB,CAAC;QAEF,KAAK,mBAAmB,GAAG,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;QAEvD,KAAK,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,mBAAmB,EAAE,aAAa,CAAC,GAC/D,KAAK,CAAC,uBAAuB,GAAG;YAC9B,IAAI,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC;YAClB,KAAK,CAAC,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC;YACrB,KAAK,CAAC,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC;SACtB,CAAC;QAEJ,KAAK,uBAAuB,GAAG;YAC7B,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;YAC5B,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;YAC7B,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;SAC7B,CAAC;KACH;CACF"}
@@ -1,2 +0,0 @@
1
- export declare const onLocalCommunityJoin: (callback: (joinRequest: Amity.InternalJoinRequest) => void) => () => void;
2
- //# sourceMappingURL=onLocalCommunityJoin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"onLocalCommunityJoin.d.ts","sourceRoot":"","sources":["../../../../src/communityRepository/communityMembership/events/onLocalCommunityJoin.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oBAAoB,2BACP,MAAM,mBAAmB,KAAK,IAAI,eAe3D,CAAC"}
@@ -1,16 +0,0 @@
1
- /**
2
- * ```js
3
- * import { community } from '@amityco/ts-sdk'
4
- * const isJoined = await community.getMyJoinRequest('foobar')
5
- * ```
6
- *
7
- * Joins a {@link Amity.Community} object
8
- *
9
- * @param communityId the {@link Amity.Community} to join
10
- * @returns A success boolean if the {@link Amity.Community} was joined
11
- *
12
- * @category Community API
13
- * @async
14
- */
15
- export declare const getMyJoinRequest: (communityId: Amity.Community['communityId']) => Promise<Amity.Cached<Amity.JoinRequest | undefined>>;
16
- //# sourceMappingURL=getMyJoinRequest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getMyJoinRequest.d.ts","sourceRoot":"","sources":["../../../src/communityRepository/internalAPI/getMyJoinRequest.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gBAAgB,gBACd,MAAM,SAAS,CAAC,aAAa,CAAC,KAC1C,QAAQ,MAAM,MAAM,CAAC,MAAM,WAAW,GAAG,SAAS,CAAC,CAiBrD,CAAC"}
@@ -1,16 +0,0 @@
1
- /**
2
- * ```js
3
- * import { community } from '@amityco/ts-sdk'
4
- * const isJoined = await community.join('foobar')
5
- * ```
6
- *
7
- * Joins a {@link Amity.Community} object
8
- *
9
- * @param communityId the {@link Amity.Community} to join
10
- * @returns A status join result
11
- *
12
- * @category Community API
13
- * @async
14
- */
15
- export declare const joinRequest: (communityId: Amity.Community['communityId']) => Promise<Amity.JoinResult>;
16
- //# sourceMappingURL=joinCommunity.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"joinCommunity.d.ts","sourceRoot":"","sources":["../../../src/communityRepository/internalAPI/joinCommunity.ts"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,WAAW,gBACT,MAAM,SAAS,CAAC,aAAa,CAAC,KAC1C,QAAQ,MAAM,UAAU,CAoC1B,CAAC"}