@amityco/ts-sdk 7.5.3-d6ee46d.0 → 7.5.3
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.
- package/.env +26 -26
- package/dist/@types/core/events.d.ts +0 -7
- package/dist/@types/core/events.d.ts.map +1 -1
- package/dist/@types/core/model.d.ts +1 -5
- package/dist/@types/core/model.d.ts.map +1 -1
- package/dist/@types/core/payload.d.ts +5 -38
- package/dist/@types/core/payload.d.ts.map +1 -1
- package/dist/@types/domains/client.d.ts +0 -10
- package/dist/@types/domains/client.d.ts.map +1 -1
- package/dist/@types/domains/community.d.ts +1 -51
- package/dist/@types/domains/community.d.ts.map +1 -1
- package/dist/@types/domains/notification.d.ts +2 -4
- package/dist/@types/domains/notification.d.ts.map +1 -1
- package/dist/@types/domains/post.d.ts +18 -1
- package/dist/@types/domains/post.d.ts.map +1 -1
- package/dist/@types/index.d.ts +0 -3
- package/dist/@types/index.d.ts.map +1 -1
- package/dist/client/api/enableUnreadCount.d.ts.map +1 -1
- package/dist/client/api/login.d.ts.map +1 -1
- package/dist/client/utils/markerSyncEngine.d.ts +1 -1
- package/dist/client/utils/markerSyncEngine.d.ts.map +1 -1
- package/dist/communityRepository/api/createCommunity.d.ts +2 -2
- package/dist/communityRepository/api/createCommunity.d.ts.map +1 -1
- package/dist/communityRepository/api/getCommunities.d.ts +1 -1
- package/dist/communityRepository/api/getCommunities.d.ts.map +1 -1
- package/dist/communityRepository/api/getCommunity.d.ts +1 -1
- package/dist/communityRepository/api/getCommunity.d.ts.map +1 -1
- package/dist/communityRepository/api/getRecommendedCommunities.d.ts +1 -3
- package/dist/communityRepository/api/getRecommendedCommunities.d.ts.map +1 -1
- package/dist/communityRepository/api/getTrendingCommunities.d.ts +1 -3
- package/dist/communityRepository/api/getTrendingCommunities.d.ts.map +1 -1
- package/dist/communityRepository/api/joinCommunity.d.ts +0 -3
- package/dist/communityRepository/api/joinCommunity.d.ts.map +1 -1
- package/dist/communityRepository/api/queryCommunities.d.ts.map +1 -1
- package/dist/communityRepository/api/updateCommunity.d.ts +2 -2
- package/dist/communityRepository/api/updateCommunity.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/index.d.ts +0 -1
- package/dist/communityRepository/communityMembership/events/index.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityJoined.d.ts +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityJoined.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityLeft.d.ts +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityLeft.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityUserAdded.d.ts +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityUserAdded.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityUserBanned.d.ts +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityUserBanned.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityUserChanged.d.ts +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityUserChanged.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityUserRemoved.d.ts +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityUserRemoved.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityUserRoleAdded.d.ts +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityUserRoleAdded.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityUserRoleRemoved.d.ts +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityUserRoleRemoved.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityUserUnbanned.d.ts +1 -1
- package/dist/communityRepository/communityMembership/events/onCommunityUserUnbanned.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/onLocalCommunityJoined.d.ts +1 -1
- package/dist/communityRepository/communityMembership/events/onLocalCommunityJoined.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/onLocalCommunityLeft.d.ts +1 -1
- package/dist/communityRepository/communityMembership/events/onLocalCommunityLeft.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/onLocalCommunityUserAdded.d.ts +1 -1
- package/dist/communityRepository/communityMembership/events/onLocalCommunityUserAdded.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/onLocalCommunityUserRemoved.d.ts +1 -1
- package/dist/communityRepository/communityMembership/events/onLocalCommunityUserRemoved.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/onUserDeleted.d.ts +1 -1
- package/dist/communityRepository/communityMembership/events/onUserDeleted.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/events/utils.d.ts +2 -2
- package/dist/communityRepository/communityMembership/events/utils.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/observers/getMembers/CommunityMembersQueryStreamController.d.ts +2 -2
- package/dist/communityRepository/communityMembership/observers/getMembers/CommunityMembersQueryStreamController.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/observers/getMembers/enums.d.ts +1 -2
- package/dist/communityRepository/communityMembership/observers/getMembers/enums.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/observers/searchMembers/SearchCommunityMembersQueryStreamController.d.ts +2 -2
- package/dist/communityRepository/communityMembership/observers/searchMembers/SearchCommunityMembersQueryStreamController.d.ts.map +1 -1
- package/dist/communityRepository/communityMembership/observers/searchMembers/enums.d.ts +0 -1
- package/dist/communityRepository/communityMembership/observers/searchMembers/enums.d.ts.map +1 -1
- package/dist/communityRepository/communityModeration/events/onLocalCommunityRoleAdded.d.ts +1 -1
- package/dist/communityRepository/communityModeration/events/onLocalCommunityRoleAdded.d.ts.map +1 -1
- package/dist/communityRepository/communityModeration/events/onLocalCommunityRoleRemoved.d.ts +1 -1
- package/dist/communityRepository/communityModeration/events/onLocalCommunityRoleRemoved.d.ts.map +1 -1
- package/dist/communityRepository/events/onCommunityCreated.d.ts +1 -1
- package/dist/communityRepository/events/onCommunityCreated.d.ts.map +1 -1
- package/dist/communityRepository/events/onCommunityDeleted.d.ts +1 -1
- package/dist/communityRepository/events/onCommunityDeleted.d.ts.map +1 -1
- package/dist/communityRepository/events/onCommunityUpdated.d.ts +1 -1
- package/dist/communityRepository/events/onCommunityUpdated.d.ts.map +1 -1
- package/dist/communityRepository/events/utils.d.ts +1 -1
- package/dist/communityRepository/events/utils.d.ts.map +1 -1
- package/dist/communityRepository/observers/getCommunities/CommunitiesLiveCollectionController.d.ts.map +1 -1
- package/dist/communityRepository/observers/getCommunities/CommunitiesPaginationController.d.ts.map +1 -1
- package/dist/communityRepository/observers/getCommunities/CommunitiesQueryStreamController.d.ts +2 -2
- package/dist/communityRepository/observers/getCommunities/CommunitiesQueryStreamController.d.ts.map +1 -1
- package/dist/communityRepository/observers/getCommunity.d.ts.map +1 -1
- package/dist/communityRepository/observers/getRecommendedCommunities/RecommendedCommunitiesLiveCollectionController.d.ts.map +1 -1
- package/dist/communityRepository/observers/getRecommendedCommunities/RecommendedCommunitiesPaginationController.d.ts.map +1 -1
- package/dist/communityRepository/observers/getRecommendedCommunities/RecommendedCommunitiesQueryStreamController.d.ts +2 -2
- package/dist/communityRepository/observers/getRecommendedCommunities/RecommendedCommunitiesQueryStreamController.d.ts.map +1 -1
- package/dist/communityRepository/observers/getRecommendedCommunities/enums.d.ts +1 -2
- package/dist/communityRepository/observers/getRecommendedCommunities/enums.d.ts.map +1 -1
- package/dist/communityRepository/observers/getTrendingCommunities/TrendingCommunitiesLiveCollectionController.d.ts.map +1 -1
- package/dist/communityRepository/observers/getTrendingCommunities/TrendingCommunitiesPaginationController.d.ts.map +1 -1
- package/dist/communityRepository/observers/getTrendingCommunities/TrendingCommunitiesQueryStreamController.d.ts +2 -2
- package/dist/communityRepository/observers/getTrendingCommunities/TrendingCommunitiesQueryStreamController.d.ts.map +1 -1
- package/dist/communityRepository/observers/index.d.ts +0 -1
- package/dist/communityRepository/observers/index.d.ts.map +1 -1
- package/dist/communityRepository/observers/searchCommunities/SearchCommunitiesLiveCollectionController.d.ts.map +1 -1
- package/dist/communityRepository/observers/searchCommunities/SearchCommunitiesPaginationController.d.ts.map +1 -1
- package/dist/communityRepository/observers/searchCommunities/SearchCommunitiesQueryStreamController.d.ts +2 -2
- package/dist/communityRepository/observers/searchCommunities/SearchCommunitiesQueryStreamController.d.ts.map +1 -1
- package/dist/communityRepository/observers/semanticSearch/SemanticSearchCommunityLiveCollectionController.d.ts.map +1 -1
- package/dist/communityRepository/observers/semanticSearch/SemanticSearchCommunityPaginationController.d.ts.map +1 -1
- package/dist/communityRepository/observers/semanticSearch/SemanticSearchCommunityQueryStreamController.d.ts +2 -2
- package/dist/communityRepository/observers/semanticSearch/SemanticSearchCommunityQueryStreamController.d.ts.map +1 -1
- package/dist/communityRepository/utils/communityWithMembership.d.ts +1 -1
- package/dist/communityRepository/utils/communityWithMembership.d.ts.map +1 -1
- package/dist/communityRepository/utils/payload.d.ts +1 -2
- package/dist/communityRepository/utils/payload.d.ts.map +1 -1
- package/dist/core/events.d.ts +3 -3
- package/dist/core/events.d.ts.map +1 -1
- package/dist/core/model/idResolvers.d.ts.map +1 -1
- package/dist/core/model/index.d.ts.map +1 -1
- package/dist/index.cjs.js +1768 -3340
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +1944 -3515
- package/dist/index.umd.js +4 -4
- package/dist/postRepository/api/getPost.d.ts +2 -2
- package/dist/postRepository/api/getPost.d.ts.map +1 -1
- package/dist/postRepository/observers/getGlobalPinnedPosts/GlobalPinnedPostQueryStreamController.d.ts.map +1 -1
- package/dist/postRepository/observers/getPinnedPosts/PinnedPostQueryStreamController.d.ts.map +1 -1
- package/dist/subChannelRepository/utils/prepareSubChannelPayload.d.ts.map +1 -1
- package/dist/userRepository/observers/getBlockedUsers.d.ts +4 -4
- package/dist/userRepository/observers/getBlockedUsers.d.ts.map +1 -1
- package/dist/utils/linkedObject/index.d.ts +0 -3
- package/dist/utils/linkedObject/index.d.ts.map +1 -1
- package/dist/utils/tests/dummy/post.d.ts +3 -3
- package/package.json +1 -1
- package/src/@types/core/events.ts +0 -10
- package/src/@types/core/model.ts +1 -8
- package/src/@types/core/payload.ts +5 -48
- package/src/@types/domains/client.ts +0 -12
- package/src/@types/domains/community.ts +3 -82
- package/src/@types/domains/notification.ts +0 -2
- package/src/@types/domains/post.ts +25 -8
- package/src/@types/index.ts +0 -3
- package/src/client/api/enableUnreadCount.ts +0 -22
- package/src/client/api/login.ts +0 -4
- package/src/client/utils/markerSyncEngine.ts +3 -24
- package/src/commentRepository/api/createComment.ts +1 -1
- package/src/commentRepository/api/deleteComment.ts +1 -1
- package/src/communityRepository/api/createCommunity.ts +2 -5
- package/src/communityRepository/api/getCommunities.ts +2 -9
- package/src/communityRepository/api/getCommunity.ts +2 -13
- package/src/communityRepository/api/getRecommendedCommunities.ts +4 -11
- package/src/communityRepository/api/getTrendingCommunities.ts +4 -11
- package/src/communityRepository/api/joinCommunity.ts +1 -4
- package/src/communityRepository/api/queryCommunities.ts +1 -7
- package/src/communityRepository/api/updateCommunity.ts +3 -13
- package/src/communityRepository/communityMembership/events/index.ts +0 -1
- package/src/communityRepository/communityMembership/events/onCommunityJoined.ts +1 -1
- package/src/communityRepository/communityMembership/events/onCommunityLeft.ts +1 -1
- package/src/communityRepository/communityMembership/events/onCommunityUserAdded.ts +1 -1
- package/src/communityRepository/communityMembership/events/onCommunityUserBanned.ts +1 -1
- package/src/communityRepository/communityMembership/events/onCommunityUserChanged.ts +1 -1
- package/src/communityRepository/communityMembership/events/onCommunityUserRemoved.ts +1 -1
- package/src/communityRepository/communityMembership/events/onCommunityUserRoleAdded.ts +1 -1
- package/src/communityRepository/communityMembership/events/onCommunityUserRoleRemoved.ts +1 -1
- package/src/communityRepository/communityMembership/events/onCommunityUserUnbanned.ts +1 -1
- package/src/communityRepository/communityMembership/events/onLocalCommunityJoined.ts +1 -1
- package/src/communityRepository/communityMembership/events/onLocalCommunityLeft.ts +1 -1
- package/src/communityRepository/communityMembership/events/onLocalCommunityUserAdded.ts +1 -1
- package/src/communityRepository/communityMembership/events/onLocalCommunityUserRemoved.ts +1 -1
- package/src/communityRepository/communityMembership/events/onUserDeleted.ts +1 -3
- package/src/communityRepository/communityMembership/events/utils.ts +2 -2
- package/src/communityRepository/communityMembership/observers/getMembers/CommunityMembersQueryStreamController.ts +2 -8
- package/src/communityRepository/communityMembership/observers/getMembers/enums.ts +0 -1
- package/src/communityRepository/communityMembership/observers/searchMembers/SearchCommunityMembersQueryStreamController.ts +2 -8
- package/src/communityRepository/communityMembership/observers/searchMembers/enums.ts +0 -1
- package/src/communityRepository/communityModeration/events/onLocalCommunityRoleAdded.ts +1 -1
- package/src/communityRepository/communityModeration/events/onLocalCommunityRoleRemoved.ts +1 -1
- package/src/communityRepository/events/onCommunityCreated.ts +1 -1
- package/src/communityRepository/events/onCommunityDeleted.ts +1 -1
- package/src/communityRepository/events/onCommunityUpdated.ts +1 -1
- package/src/communityRepository/events/utils.ts +1 -1
- package/src/communityRepository/observers/getCommunities/CommunitiesLiveCollectionController.ts +0 -6
- package/src/communityRepository/observers/getCommunities/CommunitiesPaginationController.ts +0 -1
- package/src/communityRepository/observers/getCommunities/CommunitiesQueryStreamController.ts +2 -2
- package/src/communityRepository/observers/getCommunity.ts +0 -3
- package/src/communityRepository/observers/getRecommendedCommunities/RecommendedCommunitiesLiveCollectionController.ts +1 -8
- package/src/communityRepository/observers/getRecommendedCommunities/RecommendedCommunitiesPaginationController.ts +1 -6
- package/src/communityRepository/observers/getRecommendedCommunities/RecommendedCommunitiesQueryStreamController.ts +2 -2
- package/src/communityRepository/observers/getRecommendedCommunities/enums.ts +0 -1
- package/src/communityRepository/observers/getTrendingCommunities/TrendingCommunitiesLiveCollectionController.ts +1 -9
- package/src/communityRepository/observers/getTrendingCommunities/TrendingCommunitiesPaginationController.ts +1 -6
- package/src/communityRepository/observers/getTrendingCommunities/TrendingCommunitiesQueryStreamController.ts +2 -2
- package/src/communityRepository/observers/index.ts +0 -1
- package/src/communityRepository/observers/searchCommunities/SearchCommunitiesLiveCollectionController.ts +0 -6
- package/src/communityRepository/observers/searchCommunities/SearchCommunitiesPaginationController.ts +0 -1
- package/src/communityRepository/observers/searchCommunities/SearchCommunitiesQueryStreamController.ts +2 -2
- package/src/communityRepository/observers/semanticSearch/SemanticSearchCommunityLiveCollectionController.ts +0 -6
- package/src/communityRepository/observers/semanticSearch/SemanticSearchCommunityPaginationController.ts +0 -1
- package/src/communityRepository/observers/semanticSearch/SemanticSearchCommunityQueryStreamController.ts +2 -2
- package/src/communityRepository/utils/communityWithMembership.ts +5 -9
- package/src/communityRepository/utils/payload.ts +2 -28
- package/src/core/liveCollection/PaginationController.ts +1 -1
- package/src/core/liveCollection/PaginationNoPageController.ts +1 -1
- package/src/core/model/idResolvers.ts +0 -3
- package/src/core/model/index.ts +0 -3
- package/src/index.ts +0 -2
- package/src/messagePreview/utils/getChannelMessagePreviewWithUser.ts +3 -3
- package/src/postRepository/api/getPost.ts +6 -4
- package/src/postRepository/observers/getGlobalPinnedPosts/GlobalPinnedPostQueryStreamController.ts +1 -7
- package/src/postRepository/observers/getPinnedPosts/PinnedPostQueryStreamController.ts +1 -7
- package/src/postRepository/observers/getPost.ts +2 -2
- package/src/reactionRepository/api/addReaction.ts +1 -1
- package/src/subChannelRepository/utils/prepareSubChannelPayload.ts +0 -4
- package/src/userRepository/observers/getBlockedUsers.ts +4 -4
- package/src/utils/linkedObject/index.ts +0 -6
- package/src/utils/linkedObject/streamLinkedObject.ts +1 -1
- package/dist/@types/domains/invitation.d.ts +0 -92
- package/dist/@types/domains/invitation.d.ts.map +0 -1
- package/dist/@types/domains/joinRequest.d.ts +0 -53
- package/dist/@types/domains/joinRequest.d.ts.map +0 -1
- package/dist/communityRepository/communityMembership/events/onLocalCommunityJoin.d.ts +0 -2
- package/dist/communityRepository/communityMembership/events/onLocalCommunityJoin.d.ts.map +0 -1
- package/dist/communityRepository/internalAPI/getMyJoinRequest.d.ts +0 -16
- package/dist/communityRepository/internalAPI/getMyJoinRequest.d.ts.map +0 -1
- package/dist/communityRepository/internalAPI/joinCommunity.d.ts +0 -16
- package/dist/communityRepository/internalAPI/joinCommunity.d.ts.map +0 -1
- package/dist/communityRepository/joinRequest/events/index.d.ts +0 -4
- package/dist/communityRepository/joinRequest/events/index.d.ts.map +0 -1
- package/dist/communityRepository/joinRequest/events/onJoinRequestCreated.d.ts +0 -17
- package/dist/communityRepository/joinRequest/events/onJoinRequestCreated.d.ts.map +0 -1
- package/dist/communityRepository/joinRequest/events/onJoinRequestDeleted.d.ts +0 -17
- package/dist/communityRepository/joinRequest/events/onJoinRequestDeleted.d.ts.map +0 -1
- package/dist/communityRepository/joinRequest/events/onJoinRequestUpdated.d.ts +0 -17
- package/dist/communityRepository/joinRequest/events/onJoinRequestUpdated.d.ts.map +0 -1
- package/dist/communityRepository/joinRequest/internalAPI/approveJoinRequest.d.ts +0 -16
- package/dist/communityRepository/joinRequest/internalAPI/approveJoinRequest.d.ts.map +0 -1
- package/dist/communityRepository/joinRequest/internalAPI/cancelJoinRequest.d.ts +0 -16
- package/dist/communityRepository/joinRequest/internalAPI/cancelJoinRequest.d.ts.map +0 -1
- package/dist/communityRepository/joinRequest/internalAPI/rejectJoinRequest.d.ts +0 -16
- package/dist/communityRepository/joinRequest/internalAPI/rejectJoinRequest.d.ts.map +0 -1
- package/dist/communityRepository/observers/getJoinRequestList/JoinRequestListLiveCollectionController.d.ts +0 -14
- package/dist/communityRepository/observers/getJoinRequestList/JoinRequestListLiveCollectionController.d.ts.map +0 -1
- package/dist/communityRepository/observers/getJoinRequestList/JoinRequestListPaginationController.d.ts +0 -9
- package/dist/communityRepository/observers/getJoinRequestList/JoinRequestListPaginationController.d.ts.map +0 -1
- package/dist/communityRepository/observers/getJoinRequestList/JoinRequestListQueryStreamController.d.ts +0 -15
- package/dist/communityRepository/observers/getJoinRequestList/JoinRequestListQueryStreamController.d.ts.map +0 -1
- package/dist/communityRepository/observers/getJoinRequestList/enum.d.ts +0 -6
- package/dist/communityRepository/observers/getJoinRequestList/enum.d.ts.map +0 -1
- package/dist/communityRepository/observers/getJoinRequestList.d.ts +0 -12
- package/dist/communityRepository/observers/getJoinRequestList.d.ts.map +0 -1
- package/dist/communityRepository/observers/getJoinRequests/JoinRequestsLiveCollectionController.d.ts +0 -14
- package/dist/communityRepository/observers/getJoinRequests/JoinRequestsLiveCollectionController.d.ts.map +0 -1
- package/dist/communityRepository/observers/getJoinRequests/JoinRequestsPaginationController.d.ts +0 -9
- package/dist/communityRepository/observers/getJoinRequests/JoinRequestsPaginationController.d.ts.map +0 -1
- package/dist/communityRepository/observers/getJoinRequests/JoinRequestsQueryStreamController.d.ts +0 -15
- package/dist/communityRepository/observers/getJoinRequests/JoinRequestsQueryStreamController.d.ts.map +0 -1
- package/dist/communityRepository/observers/getJoinRequests/enum.d.ts +0 -6
- package/dist/communityRepository/observers/getJoinRequests/enum.d.ts.map +0 -1
- package/dist/communityRepository/observers/getJoinRequests.d.ts +0 -12
- package/dist/communityRepository/observers/getJoinRequests.d.ts.map +0 -1
- package/dist/invitationRepository/events/index.d.ts +0 -4
- package/dist/invitationRepository/events/index.d.ts.map +0 -1
- package/dist/invitationRepository/events/onLocalInvitationCreated.d.ts +0 -17
- package/dist/invitationRepository/events/onLocalInvitationCreated.d.ts.map +0 -1
- package/dist/invitationRepository/events/onLocalInvitationDeleted.d.ts +0 -17
- package/dist/invitationRepository/events/onLocalInvitationDeleted.d.ts.map +0 -1
- package/dist/invitationRepository/events/onLocalInvitationUpdated.d.ts +0 -17
- package/dist/invitationRepository/events/onLocalInvitationUpdated.d.ts.map +0 -1
- package/dist/invitationRepository/index.d.ts +0 -3
- package/dist/invitationRepository/index.d.ts.map +0 -1
- package/dist/invitationRepository/internalApi/acceptInvitation.d.ts +0 -16
- package/dist/invitationRepository/internalApi/acceptInvitation.d.ts.map +0 -1
- package/dist/invitationRepository/internalApi/createInvitations.d.ts +0 -21
- package/dist/invitationRepository/internalApi/createInvitations.d.ts.map +0 -1
- package/dist/invitationRepository/internalApi/getInvitation.d.ts +0 -17
- package/dist/invitationRepository/internalApi/getInvitation.d.ts.map +0 -1
- package/dist/invitationRepository/internalApi/index.d.ts +0 -4
- package/dist/invitationRepository/internalApi/index.d.ts.map +0 -1
- package/dist/invitationRepository/internalApi/rejectInvitation.d.ts +0 -16
- package/dist/invitationRepository/internalApi/rejectInvitation.d.ts.map +0 -1
- package/dist/invitationRepository/observers/getInvitations/InvitationsLiveCollectionController.d.ts +0 -14
- package/dist/invitationRepository/observers/getInvitations/InvitationsLiveCollectionController.d.ts.map +0 -1
- package/dist/invitationRepository/observers/getInvitations/InvitationsPaginationController.d.ts +0 -5
- package/dist/invitationRepository/observers/getInvitations/InvitationsPaginationController.d.ts.map +0 -1
- package/dist/invitationRepository/observers/getInvitations/InvitationsQueryStreamController.d.ts +0 -15
- package/dist/invitationRepository/observers/getInvitations/InvitationsQueryStreamController.d.ts.map +0 -1
- package/dist/invitationRepository/observers/getInvitations/enums.d.ts +0 -6
- package/dist/invitationRepository/observers/getInvitations/enums.d.ts.map +0 -1
- package/dist/invitationRepository/observers/getInvitations.d.ts +0 -12
- package/dist/invitationRepository/observers/getInvitations.d.ts.map +0 -1
- package/dist/invitationRepository/observers/getMyCommunityInvitations.d.ts +0 -12
- package/dist/invitationRepository/observers/getMyCommunityInvitations.d.ts.map +0 -1
- package/dist/invitationRepository/observers/getMyInvitations/MyInvitationsLiveCollectionController.d.ts +0 -14
- package/dist/invitationRepository/observers/getMyInvitations/MyInvitationsLiveCollectionController.d.ts.map +0 -1
- package/dist/invitationRepository/observers/getMyInvitations/MyInvitationsPaginationController.d.ts +0 -5
- package/dist/invitationRepository/observers/getMyInvitations/MyInvitationsPaginationController.d.ts.map +0 -1
- package/dist/invitationRepository/observers/getMyInvitations/MyInvitationsQueryStreamController.d.ts +0 -15
- package/dist/invitationRepository/observers/getMyInvitations/MyInvitationsQueryStreamController.d.ts.map +0 -1
- package/dist/invitationRepository/observers/index.d.ts +0 -2
- package/dist/invitationRepository/observers/index.d.ts.map +0 -1
- package/dist/invitationRepository/utils/convertRawInvitationToInternalInvitation.d.ts +0 -2
- package/dist/invitationRepository/utils/convertRawInvitationToInternalInvitation.d.ts.map +0 -1
- package/dist/invitationRepository/utils/index.d.ts +0 -2
- package/dist/invitationRepository/utils/index.d.ts.map +0 -1
- package/dist/invitationRepository/utils/prepareInvitationPayload.d.ts +0 -2
- package/dist/invitationRepository/utils/prepareInvitationPayload.d.ts.map +0 -1
- package/dist/invitationRepository/utils/prepareMyInvitationsPayload.d.ts +0 -2
- package/dist/invitationRepository/utils/prepareMyInvitationsPayload.d.ts.map +0 -1
- package/dist/utils/linkedObject/communityLinkedObject.d.ts +0 -2
- package/dist/utils/linkedObject/communityLinkedObject.d.ts.map +0 -1
- package/dist/utils/linkedObject/invitationLinkedObject.d.ts +0 -2
- package/dist/utils/linkedObject/invitationLinkedObject.d.ts.map +0 -1
- package/dist/utils/linkedObject/joinRequestLinkedObject.d.ts +0 -2
- package/dist/utils/linkedObject/joinRequestLinkedObject.d.ts.map +0 -1
- package/src/@types/domains/invitation.ts +0 -119
- package/src/@types/domains/joinRequest.ts +0 -66
- package/src/communityRepository/communityMembership/events/onLocalCommunityJoin.ts +0 -20
- package/src/communityRepository/internalAPI/getMyJoinRequest.ts +0 -43
- package/src/communityRepository/internalAPI/joinCommunity.ts +0 -66
- package/src/communityRepository/joinRequest/events/index.ts +0 -3
- package/src/communityRepository/joinRequest/events/onJoinRequestCreated.ts +0 -33
- package/src/communityRepository/joinRequest/events/onJoinRequestDeleted.ts +0 -33
- package/src/communityRepository/joinRequest/events/onJoinRequestUpdated.ts +0 -33
- package/src/communityRepository/joinRequest/internalAPI/approveJoinRequest.ts +0 -52
- package/src/communityRepository/joinRequest/internalAPI/cancelJoinRequest.ts +0 -49
- package/src/communityRepository/joinRequest/internalAPI/rejectJoinRequest.ts +0 -52
- package/src/communityRepository/observers/getJoinRequestList/JoinRequestListLiveCollectionController.ts +0 -135
- package/src/communityRepository/observers/getJoinRequestList/JoinRequestListPaginationController.ts +0 -30
- package/src/communityRepository/observers/getJoinRequestList/JoinRequestListQueryStreamController.ts +0 -116
- package/src/communityRepository/observers/getJoinRequestList/enum.ts +0 -5
- package/src/communityRepository/observers/getJoinRequestList.ts +0 -51
- package/src/communityRepository/observers/getJoinRequests/JoinRequestsLiveCollectionController.ts +0 -126
- package/src/communityRepository/observers/getJoinRequests/JoinRequestsPaginationController.ts +0 -26
- package/src/communityRepository/observers/getJoinRequests/JoinRequestsQueryStreamController.ts +0 -108
- package/src/communityRepository/observers/getJoinRequests/enum.ts +0 -5
- package/src/communityRepository/observers/getJoinRequests.ts +0 -44
- package/src/invitationRepository/events/index.ts +0 -3
- package/src/invitationRepository/events/onLocalInvitationCreated.ts +0 -33
- package/src/invitationRepository/events/onLocalInvitationDeleted.ts +0 -33
- package/src/invitationRepository/events/onLocalInvitationUpdated.ts +0 -33
- package/src/invitationRepository/index.ts +0 -2
- package/src/invitationRepository/internalApi/acceptInvitation.ts +0 -45
- package/src/invitationRepository/internalApi/createInvitations.ts +0 -52
- package/src/invitationRepository/internalApi/getInvitation.ts +0 -47
- package/src/invitationRepository/internalApi/index.ts +0 -3
- package/src/invitationRepository/internalApi/rejectInvitation.ts +0 -45
- package/src/invitationRepository/observers/getInvitations/InvitationsLiveCollectionController.ts +0 -148
- package/src/invitationRepository/observers/getInvitations/InvitationsPaginationController.ts +0 -19
- package/src/invitationRepository/observers/getInvitations/InvitationsQueryStreamController.ts +0 -97
- package/src/invitationRepository/observers/getInvitations/enums.ts +0 -5
- package/src/invitationRepository/observers/getInvitations.ts +0 -44
- package/src/invitationRepository/observers/getMyCommunityInvitations.ts +0 -48
- package/src/invitationRepository/observers/getMyInvitations/MyInvitationsLiveCollectionController.ts +0 -148
- package/src/invitationRepository/observers/getMyInvitations/MyInvitationsPaginationController.ts +0 -22
- package/src/invitationRepository/observers/getMyInvitations/MyInvitationsQueryStreamController.ts +0 -105
- package/src/invitationRepository/observers/index.ts +0 -1
- package/src/invitationRepository/utils/convertRawInvitationToInternalInvitation.ts +0 -8
- package/src/invitationRepository/utils/index.ts +0 -1
- package/src/invitationRepository/utils/prepareInvitationPayload.ts +0 -12
- package/src/invitationRepository/utils/prepareMyInvitationsPayload.ts +0 -12
- package/src/utils/linkedObject/communityLinkedObject.ts +0 -57
- package/src/utils/linkedObject/invitationLinkedObject.ts +0 -37
- package/src/utils/linkedObject/joinRequestLinkedObject.ts +0 -31
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* @async
|
|
14
14
|
*/
|
|
15
15
|
export declare const getPost: {
|
|
16
|
-
(postId: Amity.Post['postId']): Promise<Amity.Cached<Amity.
|
|
16
|
+
(postId: Amity.Post['postId']): Promise<Amity.Cached<Amity.InternalPost>>;
|
|
17
17
|
/**
|
|
18
18
|
* ```js
|
|
19
19
|
* import { getPost } from '@amityco/ts-sdk'
|
|
@@ -27,6 +27,6 @@ export declare const getPost: {
|
|
|
27
27
|
*
|
|
28
28
|
* @category Post API
|
|
29
29
|
*/
|
|
30
|
-
locally(postId: Amity.Post['postId']): Amity.Cached<Amity.
|
|
30
|
+
locally(postId: Amity.Post['postId']): Amity.Cached<Amity.InternalPost> | undefined;
|
|
31
31
|
};
|
|
32
32
|
//# sourceMappingURL=getPost.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPost.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/getPost.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,OAAO;
|
|
1
|
+
{"version":3,"file":"getPost.d.ts","sourceRoot":"","sources":["../../../src/postRepository/api/getPost.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,OAAO;aACV,MAAM,IAAI,CAAC,QAAQ,CAAC,GAC3B,QAAQ,MAAM,MAAM,CAAC,MAAM,YAAY,CAAC,CAAC;IAqC5C;;;;;;;;;;;;OAYG;oBACwB,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,MAAM,MAAM,CAAC,MAAM,YAAY,CAAC,GAAG,SAAS;CAf7F,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalPinnedPostQueryStreamController.d.ts","sourceRoot":"","sources":["../../../../src/postRepository/observers/getGlobalPinnedPosts/GlobalPinnedPostQueryStreamController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAKpF,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"GlobalPinnedPostQueryStreamController.d.ts","sourceRoot":"","sources":["../../../../src/postRepository/observers/getGlobalPinnedPosts/GlobalPinnedPostQueryStreamController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAKpF,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,qBAAa,qCAAsC,SAAQ,qBAAqB,CAC9E,KAAK,CAAC,iBAAiB,EACvB,KAAK,CAAC,8BAA8B,CACrC;IACC,OAAO,CAAC,YAAY,CAAqD;IAEzE,OAAO,CAAC,cAAc,CAAoE;gBAGxF,KAAK,EAAE,KAAK,CAAC,8BAA8B,EAC3C,QAAQ,EAAE,MAAM,EAAE,EAClB,YAAY,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,0BAA0B,KAAK,IAAI,EAChE,cAAc,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,iBAAiB,KAAK,KAAK,CAAC,oBAAoB;IAQ7E,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC,iBAAiB;IASpD,mBAAmB,CACjB,QAAQ,EAAE,KAAK,CAAC,iBAAiB,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,EAC7D,SAAS,EAAE,KAAK,CAAC,2BAA2B,EAC5C,OAAO,UAAQ;IAuBjB,OAAO,CAAC,MAAM,EAAE,eAAe,UACf,MAAM,YAAY;IAgBlC,YAAY,CACV,gBAAgB,EAAE;QAChB,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,YAAY,KAAK,IAAI,KAAK,KAAK,CAAC,YAAY,CAAC;QACxE,MAAM,EAAE,eAAe,CAAC;KACzB,EAAE;CAIN"}
|
package/dist/postRepository/observers/getPinnedPosts/PinnedPostQueryStreamController.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PinnedPostQueryStreamController.d.ts","sourceRoot":"","sources":["../../../../src/postRepository/observers/getPinnedPosts/PinnedPostQueryStreamController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;
|
|
1
|
+
{"version":3,"file":"PinnedPostQueryStreamController.d.ts","sourceRoot":"","sources":["../../../../src/postRepository/observers/getPinnedPosts/PinnedPostQueryStreamController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAMpF,qBAAa,+BAAgC,SAAQ,qBAAqB,CACxE,KAAK,CAAC,iBAAiB,EACvB,KAAK,CAAC,wBAAwB,CAC/B;IACC,OAAO,CAAC,YAAY,CAAqD;IAEzE,OAAO,CAAC,cAAc,CAAoE;gBAGxF,KAAK,EAAE,KAAK,CAAC,wBAAwB,EACrC,QAAQ,EAAE,MAAM,EAAE,EAClB,YAAY,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,0BAA0B,KAAK,IAAI,EAChE,cAAc,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,iBAAiB,KAAK,KAAK,CAAC,oBAAoB;IAQ7E,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC,iBAAiB;IASpD,mBAAmB,CACjB,QAAQ,EAAE,KAAK,CAAC,iBAAiB,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,EAC7D,SAAS,EAAE,KAAK,CAAC,2BAA2B,EAC5C,OAAO,UAAQ;CAsBlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepareSubChannelPayload.d.ts","sourceRoot":"","sources":["../../../src/subChannelRepository/utils/prepareSubChannelPayload.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prepareSubChannelPayload.d.ts","sourceRoot":"","sources":["../../../src/subChannelRepository/utils/prepareSubChannelPayload.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,gCAAgC,UAA6C,CAAC;AAE3F;;GAEG;AACH,eAAO,MAAM,oBAAoB,oBAAqB,KAAK,MAAM,aAAa,EAAE,aAAa,CAAC,YACtC,CAAC;AAEzD,eAAO,MAAM,wBAAwB,eAAgB,MAAM,iBAAiB,SAI3E,CAAC;AAEF,eAAO,MAAM,wBAAwB,eACvB,MAAM,iBAAiB,KAClC,QAAQ,MAAM,0BAA0B,CA4B1C,CAAC;AAEF,aAAK,mBAAmB,GAAG,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,0BAA0B,CAAC,GAAG;IACpF,yBAAyB,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,0BAA0B,CAAC,CAAC;CAChF,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,EACjC,wBAAwB,EACxB,GAAG,IAAI,EACR,EAAE,KAAK,CAAC,gBAAgB,GAAG,mBAAmB,CAQ9C"}
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
* const unblockedUser = await UserRepository.blockUser('userId')
|
|
5
5
|
* ```
|
|
6
6
|
*
|
|
7
|
-
* Blocks a {@link Amity.
|
|
7
|
+
* Blocks a {@link Amity.User}
|
|
8
8
|
*
|
|
9
|
-
* @param params The params to get blocked {@link Amity.
|
|
10
|
-
* @param callback to recieve updates on unblocked {@link Amity.
|
|
9
|
+
* @param params The params to get blocked {@link Amity.User}s
|
|
10
|
+
* @param callback to recieve updates on unblocked {@link Amity.User}s
|
|
11
11
|
* @returns {@link Amity.Unsubscriber} to unsubscribe from collection
|
|
12
12
|
*
|
|
13
13
|
* @category Post API
|
|
14
14
|
* @async
|
|
15
15
|
*/
|
|
16
|
-
export declare const getBlockedUsers: (params: Amity.BlockedUsersLiveCollection, callback: Amity.LiveCollectionCallback<Amity.
|
|
16
|
+
export declare const getBlockedUsers: (params: Amity.BlockedUsersLiveCollection, callback: Amity.LiveCollectionCallback<Amity.User>, config?: Amity.LiveCollectionConfig) => Amity.Unsubscriber;
|
|
17
17
|
//# sourceMappingURL=getBlockedUsers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBlockedUsers.d.ts","sourceRoot":"","sources":["../../../src/userRepository/observers/getBlockedUsers.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,eAAe,WAClB,MAAM,0BAA0B,YAC9B,MAAM,sBAAsB,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"getBlockedUsers.d.ts","sourceRoot":"","sources":["../../../src/userRepository/observers/getBlockedUsers.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,eAAe,WAClB,MAAM,0BAA0B,YAC9B,MAAM,sBAAsB,CAAC,MAAM,IAAI,CAAC,WACzC,MAAM,oBAAoB,KAClC,MAAM,YAsBR,CAAC"}
|
|
@@ -12,8 +12,5 @@ export declare const LinkedObject: {
|
|
|
12
12
|
channel: (channel: Amity.InternalChannel<any>) => Amity.Channel<any>;
|
|
13
13
|
pinnedPost: (pinnedPost: Amity.RawPin) => Amity.PinnedPost;
|
|
14
14
|
notificationTray: (noti: Amity.RawNotificationTrayItem) => Amity.NotificationTrayItem;
|
|
15
|
-
community: (community: Amity.InternalCommunity) => Amity.Community;
|
|
16
|
-
invitation: (invitation: Amity.InternalInvitation) => Amity.Invitation;
|
|
17
|
-
joinRequest: (joinRequest: Amity.InternalJoinRequest) => Amity.JoinRequest;
|
|
18
15
|
};
|
|
19
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/linkedObject/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/linkedObject/index.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;CAcxB,CAAC"}
|
|
@@ -30,21 +30,21 @@ export declare const emptyPostPayload: {
|
|
|
30
30
|
export declare const postQueryResponse: {
|
|
31
31
|
data: Omit<Amity.PostPayload<any>, "communityUsers" | "communities" | "posts"> & {
|
|
32
32
|
posts: Amity.InternalPost<any>[];
|
|
33
|
-
communities: Amity.
|
|
33
|
+
communities: Amity.Community[];
|
|
34
34
|
communityUsers: Amity.Membership<"community">[];
|
|
35
35
|
} & Amity.Pagination;
|
|
36
36
|
};
|
|
37
37
|
export declare const postQueryResponse2: {
|
|
38
38
|
data: Omit<Amity.PostPayload<any>, "communityUsers" | "communities" | "posts"> & {
|
|
39
39
|
posts: Amity.InternalPost<any>[];
|
|
40
|
-
communities: Amity.
|
|
40
|
+
communities: Amity.Community[];
|
|
41
41
|
communityUsers: Amity.Membership<"community">[];
|
|
42
42
|
} & Amity.Pagination;
|
|
43
43
|
};
|
|
44
44
|
export declare const postQueryResponsePage2: {
|
|
45
45
|
data: Omit<Amity.PostPayload<any>, "communityUsers" | "communities" | "posts"> & {
|
|
46
46
|
posts: Amity.InternalPost<any>[];
|
|
47
|
-
communities: Amity.
|
|
47
|
+
communities: Amity.Community[];
|
|
48
48
|
communityUsers: Amity.Membership<"community">[];
|
|
49
49
|
} & Amity.Pagination;
|
|
50
50
|
};
|
package/package.json
CHANGED
|
@@ -261,16 +261,6 @@ declare global {
|
|
|
261
261
|
notificationTrayItems: Amity.InternalNotificationTrayItem[];
|
|
262
262
|
};
|
|
263
263
|
|
|
264
|
-
'local.invitation.created': Amity.InternalInvitation[];
|
|
265
|
-
'local.invitation.updated': Amity.InternalInvitation[];
|
|
266
|
-
'local.invitation.deleted': Amity.InternalInvitation[];
|
|
267
|
-
|
|
268
|
-
'v4.local.community.joined': Amity.InternalJoinRequest[];
|
|
269
|
-
|
|
270
|
-
'local.joinRequest.created': Amity.InternalJoinRequest[];
|
|
271
|
-
'local.joinRequest.updated': Amity.InternalJoinRequest[];
|
|
272
|
-
'local.joinRequest.deleted': Amity.InternalJoinRequest[];
|
|
273
|
-
|
|
274
264
|
sessionStateChange: Amity.SessionStates;
|
|
275
265
|
// used by accessTokenExpiryWatcher
|
|
276
266
|
tokenExpired: Amity.SessionStates.TOKEN_EXPIRED;
|
package/src/@types/core/model.ts
CHANGED
|
@@ -33,7 +33,7 @@ declare global {
|
|
|
33
33
|
feedMarker: Amity.FeedMarker;
|
|
34
34
|
userMarker: Amity.UserMarker;
|
|
35
35
|
|
|
36
|
-
community: Amity.
|
|
36
|
+
community: Amity.Community;
|
|
37
37
|
category: Amity.InternalCategory;
|
|
38
38
|
communityUsers: Amity.Membership<'community'>;
|
|
39
39
|
post: Amity.InternalPost;
|
|
@@ -60,10 +60,6 @@ declare global {
|
|
|
60
60
|
|
|
61
61
|
notificationTrayItem: Amity.InternalNotificationTrayItem;
|
|
62
62
|
notificationTraySeen: Amity.InternalNotificationTraySeen;
|
|
63
|
-
|
|
64
|
-
invitation: Amity.InternalInvitation;
|
|
65
|
-
|
|
66
|
-
joinRequest: Amity.InternalJoinRequest;
|
|
67
63
|
};
|
|
68
64
|
|
|
69
65
|
type Model = ValueOf<Models>;
|
|
@@ -128,9 +124,6 @@ declare global {
|
|
|
128
124
|
|
|
129
125
|
notificationTrayItem: Pick<Amity.InternalNotificationTrayItem, '_id'>;
|
|
130
126
|
notificationTraySeen: Pick<Amity.InternalNotificationTraySeen, 'userId'>;
|
|
131
|
-
|
|
132
|
-
invitation: Pick<Amity.InternalInvitation, '_id'>;
|
|
133
|
-
joinRequest: Pick<Amity.InternalJoinRequest, 'joinRequestId'>;
|
|
134
127
|
};
|
|
135
128
|
}
|
|
136
129
|
}
|
|
@@ -27,9 +27,6 @@ declare global {
|
|
|
27
27
|
semanticSearchPost: Amity.SemanticSearchPostPayload;
|
|
28
28
|
semanticSearchCommunity: Amity.SemanticSearchCommunityPayload;
|
|
29
29
|
notificationTrayItem: Amity.NotificationTrayPayload;
|
|
30
|
-
invitation: Amity.InvitationPayload;
|
|
31
|
-
myInvitation: Amity.MyInvitationsPayload;
|
|
32
|
-
joinRequest: Amity.CommunityJoinRequestPayload;
|
|
33
30
|
};
|
|
34
31
|
|
|
35
32
|
type UserPayload = {
|
|
@@ -228,7 +225,7 @@ declare global {
|
|
|
228
225
|
type SubChannelPayload<T extends Amity.MessageContentType = any> = {
|
|
229
226
|
messageFeeds: Amity.RawSubChannel[];
|
|
230
227
|
messages: Amity.RawMessage<T>[];
|
|
231
|
-
users: Amity.
|
|
228
|
+
users: Amity.InternalUser[];
|
|
232
229
|
files: Amity.File[];
|
|
233
230
|
};
|
|
234
231
|
|
|
@@ -300,12 +297,6 @@ declare global {
|
|
|
300
297
|
files: Amity.File[];
|
|
301
298
|
};
|
|
302
299
|
|
|
303
|
-
type CommunityJoinRequestPayload = {
|
|
304
|
-
joinRequests: Amity.RawJoinRequest[];
|
|
305
|
-
users: Amity.RawUser[];
|
|
306
|
-
files: Amity.File[];
|
|
307
|
-
};
|
|
308
|
-
|
|
309
300
|
type RecommendedCommunityPayload = Amity.CommunityPayload;
|
|
310
301
|
type TrendingCommunityPayload = Amity.CommunityPayload;
|
|
311
302
|
|
|
@@ -315,18 +306,8 @@ declare global {
|
|
|
315
306
|
* - communityUsers: `Amity.RawMembership` -> `Amity.Membership` (Add user getter prop)
|
|
316
307
|
*/
|
|
317
308
|
type ProcessedCommunityPayload = Omit<CommunityPayload, 'communities' | 'communityUsers'> & {
|
|
318
|
-
communities: Amity.
|
|
309
|
+
communities: Amity.Community[];
|
|
319
310
|
communityUsers: Amity.Membership<'community'>[];
|
|
320
|
-
users: Amity.InternalUser[];
|
|
321
|
-
};
|
|
322
|
-
|
|
323
|
-
type ProcessedJoinRequestPayload = Omit<
|
|
324
|
-
CommunityJoinRequestPayload,
|
|
325
|
-
'communities' | 'communityUsers' | 'joinRequests' | 'users'
|
|
326
|
-
> & {
|
|
327
|
-
joinRequests: Amity.InternalJoinRequest[];
|
|
328
|
-
files: Amity.File[];
|
|
329
|
-
users: Amity.InternalUser[];
|
|
330
311
|
};
|
|
331
312
|
|
|
332
313
|
type CategoryPayload = {
|
|
@@ -352,7 +333,7 @@ declare global {
|
|
|
352
333
|
CommunityMembershipPayload,
|
|
353
334
|
'communities' | 'communityUsers'
|
|
354
335
|
> & {
|
|
355
|
-
communities: Amity.
|
|
336
|
+
communities: Amity.Community[];
|
|
356
337
|
communityUsers: Amity.Membership<'community'>[];
|
|
357
338
|
};
|
|
358
339
|
|
|
@@ -402,7 +383,7 @@ declare global {
|
|
|
402
383
|
Amity.StoryTargetPayload;
|
|
403
384
|
|
|
404
385
|
type ProcessedGlobalStoryFeed = Omit<GlobalStoryFeedPayload, 'communities'> & {
|
|
405
|
-
communities: Amity.
|
|
386
|
+
communities: Amity.Community[];
|
|
406
387
|
};
|
|
407
388
|
|
|
408
389
|
// Original Payload form BE
|
|
@@ -455,7 +436,7 @@ declare global {
|
|
|
455
436
|
*/
|
|
456
437
|
type ProcessedPostPayload = Omit<PostPayload, 'communities' | 'communityUsers' | 'posts'> & {
|
|
457
438
|
posts: Amity.InternalPost[];
|
|
458
|
-
communities: Amity.
|
|
439
|
+
communities: Amity.Community[];
|
|
459
440
|
communityUsers: Amity.Membership<'community'>[];
|
|
460
441
|
};
|
|
461
442
|
|
|
@@ -564,29 +545,5 @@ declare global {
|
|
|
564
545
|
Amity.Flaggable &
|
|
565
546
|
Amity.Taggable &
|
|
566
547
|
Amity.Timestamps;
|
|
567
|
-
|
|
568
|
-
type InvitationPayload = {
|
|
569
|
-
invitations: Amity.RawInvitation[];
|
|
570
|
-
users: Amity.RawUser[];
|
|
571
|
-
};
|
|
572
|
-
|
|
573
|
-
type ProcessedInvitationPayload = {
|
|
574
|
-
invitations: Amity.InternalInvitation[];
|
|
575
|
-
users: Amity.InternalUser[];
|
|
576
|
-
};
|
|
577
|
-
|
|
578
|
-
type MyInvitationsPayload = {
|
|
579
|
-
invitations: Amity.RawInvitation[];
|
|
580
|
-
users: Amity.RawUser[];
|
|
581
|
-
};
|
|
582
|
-
|
|
583
|
-
type ProcessedMyInvitationsPayload = {
|
|
584
|
-
invitations: Amity.InternalInvitation[];
|
|
585
|
-
users: Amity.InternalUser[];
|
|
586
|
-
};
|
|
587
|
-
|
|
588
|
-
type JoinRequestPayload = {
|
|
589
|
-
joinRequests: Amity.RawJoinRequest[];
|
|
590
|
-
};
|
|
591
548
|
}
|
|
592
549
|
}
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
2
|
import { Emitter } from 'mitt';
|
|
3
3
|
|
|
4
|
-
export const enum MembershipAcceptanceTypeEnum {
|
|
5
|
-
AUTOMATIC = 'automatic',
|
|
6
|
-
INVITATION = 'invitation',
|
|
7
|
-
}
|
|
8
|
-
|
|
9
4
|
declare global {
|
|
10
5
|
namespace Amity {
|
|
11
6
|
type Logger = (topic: string, ...args: any[]) => void;
|
|
12
7
|
|
|
13
|
-
type MembershipAcceptanceType = MembershipAcceptanceTypeEnum;
|
|
14
|
-
|
|
15
8
|
const enum TokenTerminationReason {
|
|
16
9
|
GLOBAL_BAN = 'globalBan',
|
|
17
10
|
USER_DELETED = 'userDeleted',
|
|
@@ -131,12 +124,7 @@ declare global {
|
|
|
131
124
|
showMyPost: boolean;
|
|
132
125
|
showOnlyMyFeed: boolean;
|
|
133
126
|
};
|
|
134
|
-
story: {
|
|
135
|
-
allowAllUserToCreateStory: boolean;
|
|
136
|
-
expiryTimeMinutes: number;
|
|
137
|
-
};
|
|
138
127
|
userPrivacySetting: 'public' | 'private';
|
|
139
|
-
membershipAcceptance: Amity.MembershipAcceptanceType;
|
|
140
128
|
};
|
|
141
129
|
|
|
142
130
|
type ConnectClientParams = {
|
|
@@ -95,25 +95,17 @@ declare global {
|
|
|
95
95
|
hasFlaggedPost: boolean;
|
|
96
96
|
|
|
97
97
|
allowCommentInStory?: boolean;
|
|
98
|
-
|
|
99
|
-
isDiscoverable?: boolean;
|
|
100
|
-
requiresJoinApproval?: boolean;
|
|
101
98
|
} & Amity.Taggable &
|
|
102
99
|
Amity.Metadata &
|
|
103
100
|
Amity.Timestamps &
|
|
104
101
|
Amity.SoftDelete &
|
|
105
102
|
Amity.Subscribable;
|
|
106
103
|
|
|
107
|
-
type
|
|
108
|
-
Amity.RawCommunity,
|
|
109
|
-
'onlyAdminCanPost' | 'needApprovalOnPostCreation'
|
|
110
|
-
> &
|
|
104
|
+
type Community = Omit<Amity.RawCommunity, 'onlyAdminCanPost' | 'needApprovalOnPostCreation'> &
|
|
111
105
|
Amity.CommunityStorySettings & {
|
|
112
106
|
postSetting?: ValueOf<typeof CommunityPostSettings>;
|
|
113
107
|
};
|
|
114
108
|
|
|
115
|
-
type Community = Amity.InternalCommunity & Amity.CommunityLinkedObject;
|
|
116
|
-
|
|
117
109
|
type QueryCommunities = {
|
|
118
110
|
membership?: 'all' | 'member' | 'notMember';
|
|
119
111
|
categoryId?: Amity.InternalCategory['categoryId'];
|
|
@@ -122,17 +114,6 @@ declare global {
|
|
|
122
114
|
sortBy?: Amity.CommunitySortBy | Amity.CommunitySortByEnum;
|
|
123
115
|
page?: string;
|
|
124
116
|
limit?: number;
|
|
125
|
-
includeDiscoverablePrivateCommunity?: boolean;
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
type QueryJoinCommunity = {
|
|
129
|
-
communityId: string;
|
|
130
|
-
status: Amity.JoinRequestStatus;
|
|
131
|
-
sortBy?: Amity.CommunitySortBy | Amity.CommunitySortByEnum;
|
|
132
|
-
options?: {
|
|
133
|
-
limit?: number;
|
|
134
|
-
token?: string;
|
|
135
|
-
};
|
|
136
117
|
};
|
|
137
118
|
|
|
138
119
|
type SearchQueryCommunities = {
|
|
@@ -144,46 +125,12 @@ declare global {
|
|
|
144
125
|
sortBy?: Amity.SearchCommunitySortBy | Amity.SearchCommunitySortByEnum;
|
|
145
126
|
page?: string;
|
|
146
127
|
limit?: number;
|
|
147
|
-
includeDiscoverablePrivateCommunity?: boolean;
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
type QueryJoinRequest = {
|
|
151
|
-
communityId: string;
|
|
152
|
-
status: Amity.JoinRequestStatus;
|
|
153
|
-
targetType: 'community';
|
|
154
|
-
type: Amity.JoinRequestType;
|
|
155
|
-
sortBy?: Amity.CommunitySortBy | Amity.CommunitySortByEnum;
|
|
156
|
-
options?: {
|
|
157
|
-
limit?: number;
|
|
158
|
-
token?: string;
|
|
159
|
-
};
|
|
160
|
-
page?: string;
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
type QueryJoinRequestList = {
|
|
164
|
-
communityIds: string[];
|
|
165
|
-
sortBy?: Amity.CommunitySortBy | Amity.CommunitySortByEnum;
|
|
166
|
-
options?: {
|
|
167
|
-
limit?: number;
|
|
168
|
-
token?: string;
|
|
169
|
-
};
|
|
170
|
-
page?: string;
|
|
171
128
|
};
|
|
172
129
|
|
|
173
130
|
type CommunityLiveCollection = Amity.LiveCollectionParams<Omit<QueryCommunities, 'page'>>;
|
|
174
131
|
|
|
175
|
-
type RecommendedCommunityLiveCollection = Amity.LiveCollectionParams<{
|
|
176
|
-
|
|
177
|
-
includeDiscoverablePrivateCommunity?: boolean;
|
|
178
|
-
}>;
|
|
179
|
-
type TrendingCommunityLiveCollection = Amity.LiveCollectionParams<{
|
|
180
|
-
limit?: number;
|
|
181
|
-
includeDiscoverablePrivateCommunity?: boolean;
|
|
182
|
-
}>;
|
|
183
|
-
|
|
184
|
-
type JoinRequestLiveCollection = Amity.LiveCollectionParams<QueryJoinRequest>;
|
|
185
|
-
|
|
186
|
-
type JoinRequestListLiveCollection = Amity.LiveCollectionParams<QueryJoinRequestList>;
|
|
132
|
+
type RecommendedCommunityLiveCollection = Amity.LiveCollectionParams<{ limit?: number }>;
|
|
133
|
+
type TrendingCommunityLiveCollection = Amity.LiveCollectionParams<{ limit?: number }>;
|
|
187
134
|
|
|
188
135
|
type SearchCommunityLiveCollection = Amity.LiveCollectionParams<
|
|
189
136
|
Omit<SearchQueryCommunities, 'page'>
|
|
@@ -202,16 +149,6 @@ declare global {
|
|
|
202
149
|
Pick<SearchQueryCommunities, 'page'>
|
|
203
150
|
>;
|
|
204
151
|
|
|
205
|
-
type JoinRequestLiveCollectionCache = Amity.LiveCollectionCache<
|
|
206
|
-
Amity.JoinRequest['joinRequestId'],
|
|
207
|
-
Pick<QueryJoinRequest, 'page'>
|
|
208
|
-
>;
|
|
209
|
-
|
|
210
|
-
type JoinRequestListLiveCollectionCache = Amity.LiveCollectionCache<
|
|
211
|
-
Amity.JoinRequest['joinRequestId'],
|
|
212
|
-
Pick<QueryJoinRequestList, 'page'>
|
|
213
|
-
>;
|
|
214
|
-
|
|
215
152
|
type QueryCommunityMembers = {
|
|
216
153
|
communityId: string;
|
|
217
154
|
memberships?: ('banned' | 'member')[];
|
|
@@ -260,7 +197,6 @@ declare global {
|
|
|
260
197
|
token?: string;
|
|
261
198
|
};
|
|
262
199
|
tags?: string[];
|
|
263
|
-
includeDiscoverablePrivateCommunity?: boolean;
|
|
264
200
|
};
|
|
265
201
|
|
|
266
202
|
type SemanticSearchCommunityLiveCollection = Amity.LiveCollectionParams<
|
|
@@ -273,20 +209,5 @@ declare global {
|
|
|
273
209
|
Amity.Community['communityId'], // communityId:score
|
|
274
210
|
QuerySemanticSearchCommunity
|
|
275
211
|
>;
|
|
276
|
-
|
|
277
|
-
type CommunityLinkedObject = {
|
|
278
|
-
createInvitations: (userIds: string[]) => Promise<void>;
|
|
279
|
-
getMemberInvitations: (
|
|
280
|
-
params: Pick<Amity.InvitationLiveCollection, 'limit' | 'sortBy' | 'statuses'>,
|
|
281
|
-
callback: Amity.LiveCollectionCallback<Amity.Invitation>,
|
|
282
|
-
) => Amity.Unsubscriber;
|
|
283
|
-
getInvitation: () => Promise<Amity.Invitation | undefined>;
|
|
284
|
-
join: () => Promise<Amity.JoinResult>;
|
|
285
|
-
getJoinRequests: (
|
|
286
|
-
params: QueryJoinRequest,
|
|
287
|
-
callback: Amity.LiveCollectionCallback<Amity.JoinRequest>,
|
|
288
|
-
) => Amity.Unsubscriber;
|
|
289
|
-
getMyJoinRequest: () => Promise<Amity.JoinRequest | undefined>;
|
|
290
|
-
};
|
|
291
212
|
}
|
|
292
213
|
}
|
|
@@ -10,7 +10,6 @@ declare global {
|
|
|
10
10
|
POST_REACT = 'reaction_on_post',
|
|
11
11
|
COMMENT_REACT = 'reaction_on_comment',
|
|
12
12
|
REPLY_REACT = 'reaction_on_reply',
|
|
13
|
-
RESPONSE_JOIN_REQUEST = 'respond_on_join_request',
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
const enum TrayAction {
|
|
@@ -20,7 +19,6 @@ declare global {
|
|
|
20
19
|
REACTION = 'reaction',
|
|
21
20
|
MENTION = 'mention',
|
|
22
21
|
REPLY = 'reply',
|
|
23
|
-
JOIN_REQUEST = 'join_request',
|
|
24
22
|
}
|
|
25
23
|
|
|
26
24
|
type RawNotificationTrayItem = {
|
|
@@ -40,15 +40,32 @@ declare global {
|
|
|
40
40
|
hasFlaggedChildren: false;
|
|
41
41
|
hasFlaggedComment: false;
|
|
42
42
|
editedAt: Amity.timestamp;
|
|
43
|
+
// Amity.Metadata
|
|
44
|
+
metadata?: Record<string, any>;
|
|
45
|
+
// Amity.Flaggable
|
|
46
|
+
flagCount: number;
|
|
47
|
+
hashFlag: {
|
|
48
|
+
bits: number;
|
|
49
|
+
hashes: number;
|
|
50
|
+
hash: string;
|
|
51
|
+
} | null;
|
|
52
|
+
// Amity.Taggable
|
|
53
|
+
tags?: string[];
|
|
54
|
+
// Amity.Timestamps
|
|
55
|
+
createdAt: Amity.timestamp;
|
|
56
|
+
updatedAt?: Amity.timestamp;
|
|
57
|
+
// Amity.SoftDelete
|
|
58
|
+
isDeleted?: boolean;
|
|
59
|
+
// Amity.Subscribable
|
|
60
|
+
path: string;
|
|
61
|
+
// Amity.AnalyticPostData
|
|
62
|
+
impression: number;
|
|
63
|
+
reach: number;
|
|
64
|
+
// Amity.Reactable
|
|
65
|
+
reactionsCount: number;
|
|
66
|
+
reactions: Record<string, number>;
|
|
67
|
+
myReactions?: string[];
|
|
43
68
|
} & Amity.Content<T> &
|
|
44
|
-
Amity.Metadata &
|
|
45
|
-
Amity.Flaggable &
|
|
46
|
-
Amity.Reactable &
|
|
47
|
-
Amity.Taggable &
|
|
48
|
-
Amity.Timestamps &
|
|
49
|
-
Amity.SoftDelete &
|
|
50
|
-
Amity.Subscribable &
|
|
51
|
-
Amity.AnalyticPostData &
|
|
52
69
|
Amity.Mentionable<'user'>;
|
|
53
70
|
|
|
54
71
|
type InternalPost<T extends PostContentType = any> = RawPost<T> & {
|
package/src/@types/index.ts
CHANGED
|
@@ -1,25 +1,3 @@
|
|
|
1
|
-
import { ASCError } from '~/core/errors';
|
|
2
|
-
import { getActiveClient } from './activeClient';
|
|
3
|
-
|
|
4
1
|
export const enableUnreadCount = () => {
|
|
5
|
-
const client = getActiveClient();
|
|
6
|
-
|
|
7
|
-
client.log('client/api/isUnreadCountEnabled', client.isUnreadCountEnabled);
|
|
8
|
-
|
|
9
|
-
if (!client) {
|
|
10
|
-
throw new ASCError(
|
|
11
|
-
'There is no active client',
|
|
12
|
-
Amity.ClientError.UNKNOWN_ERROR,
|
|
13
|
-
Amity.ErrorLevel.FATAL,
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
if (client.isUnreadCountEnabled) return false;
|
|
18
|
-
|
|
19
|
-
client.isUnreadCountEnabled = true;
|
|
20
|
-
client.useLegacyUnreadCount = false;
|
|
21
|
-
|
|
22
|
-
client.emitter.emit('unreadCountEnabled', true);
|
|
23
|
-
|
|
24
2
|
return true;
|
|
25
3
|
};
|
package/src/client/api/login.ts
CHANGED
|
@@ -26,7 +26,6 @@ import { onTokenTerminated } from '../events/onTokenTerminated';
|
|
|
26
26
|
import { setClientToken } from '../utils/setClientToken';
|
|
27
27
|
import { removeChannelMarkerCache } from '../utils/removeChannelMarkerCache';
|
|
28
28
|
import { initializeMessagePreviewSetting } from '../utils/messagePreviewEngine';
|
|
29
|
-
import { startMarkerSync } from '../utils/markerSyncEngine';
|
|
30
29
|
import { ASCError } from '~/core/errors';
|
|
31
30
|
import SessionWatcher from '../utils/SessionWatcher';
|
|
32
31
|
|
|
@@ -207,9 +206,6 @@ export const login = async (
|
|
|
207
206
|
if (client.useLegacyUnreadCount) {
|
|
208
207
|
subscriptions.push(readReceiptSyncEngineOnLoginHandler());
|
|
209
208
|
} else subscriptions.push(legacyReadReceiptSyncEngineOnLoginHandler());
|
|
210
|
-
|
|
211
|
-
const markerSyncUnsubscriber = await startMarkerSync();
|
|
212
|
-
subscriptions.push(markerSyncUnsubscriber);
|
|
213
209
|
}
|
|
214
210
|
|
|
215
211
|
return true;
|
|
@@ -14,7 +14,6 @@ import { onSubChannelDeleted } from '~/subChannelRepository/events/onSubChannelD
|
|
|
14
14
|
import { isUnreadCountSupport } from '~/subChannelRepository/utils';
|
|
15
15
|
|
|
16
16
|
import { markerSync } from '../api/markerSync';
|
|
17
|
-
import { enableUnreadCount } from '../api/enableUnreadCount';
|
|
18
17
|
|
|
19
18
|
import { onOnline } from './onOnline';
|
|
20
19
|
import { onUserFeedMarkerUpdated } from '~/marker/events/onUserFeedMarkerUpdated';
|
|
@@ -27,7 +26,7 @@ let isSyncRunning = false;
|
|
|
27
26
|
let disposers: (() => void)[] = [];
|
|
28
27
|
let isWaitingForResponse = false;
|
|
29
28
|
|
|
30
|
-
|
|
29
|
+
const isConsistentMode = true;
|
|
31
30
|
let deviceLastSyncAt: Date | null = null;
|
|
32
31
|
|
|
33
32
|
const getDeviceLastSyncAt = () => {
|
|
@@ -178,17 +177,7 @@ const unRegisterEventListeners = () => {
|
|
|
178
177
|
disposers = [];
|
|
179
178
|
};
|
|
180
179
|
|
|
181
|
-
export const startMarkerSync = async () =>
|
|
182
|
-
await fetchDeviceLastSyncAt();
|
|
183
|
-
pushMarkerSyncEvent(Amity.MarkerSyncEvent.START_SYNCING);
|
|
184
|
-
|
|
185
|
-
isConsistentMode = true;
|
|
186
|
-
isSyncRunning = true;
|
|
187
|
-
|
|
188
|
-
registerEventListeners();
|
|
189
|
-
|
|
190
|
-
return unRegisterEventListeners;
|
|
191
|
-
};
|
|
180
|
+
export const startMarkerSync = async () => Promise.resolve();
|
|
192
181
|
|
|
193
182
|
/**
|
|
194
183
|
```js
|
|
@@ -201,17 +190,7 @@ export const startMarkerSync = async () => {
|
|
|
201
190
|
*
|
|
202
191
|
* @category Marker API
|
|
203
192
|
*/
|
|
204
|
-
export const startUnreadSync = async () =>
|
|
205
|
-
await fetchDeviceLastSyncAt();
|
|
206
|
-
pushMarkerSyncEvent(Amity.MarkerSyncEvent.START_SYNCING);
|
|
207
|
-
|
|
208
|
-
enableUnreadCount();
|
|
209
|
-
|
|
210
|
-
isConsistentMode = false;
|
|
211
|
-
isSyncRunning = true;
|
|
212
|
-
|
|
213
|
-
registerEventListeners();
|
|
214
|
-
};
|
|
193
|
+
export const startUnreadSync = async () => Promise.resolve();
|
|
215
194
|
|
|
216
195
|
/**
|
|
217
196
|
```js
|
|
@@ -51,7 +51,7 @@ export const createComment = async (
|
|
|
51
51
|
if (client.cache) ingestInCache(data, { cachedAt });
|
|
52
52
|
|
|
53
53
|
if (['post', 'content'].includes(bundle.referenceType)) {
|
|
54
|
-
const post = pullFromCache<Amity.
|
|
54
|
+
const post = pullFromCache<Amity.InternalPost>(['post', 'get', bundle.referenceId])?.data;
|
|
55
55
|
|
|
56
56
|
if (post) {
|
|
57
57
|
post.commentsCount += 1;
|
|
@@ -62,7 +62,7 @@ export const deleteComment = async (
|
|
|
62
62
|
users: [],
|
|
63
63
|
});
|
|
64
64
|
} else {
|
|
65
|
-
const post = pullFromCache<Amity.
|
|
65
|
+
const post = pullFromCache<Amity.InternalPost>(['post', 'get', comment.data.referenceId])?.data;
|
|
66
66
|
|
|
67
67
|
if (post) {
|
|
68
68
|
let removeCount: number;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { LinkedObject } from '~/utils/linkedObject';
|
|
2
1
|
import { getActiveClient } from '~/client/api';
|
|
3
2
|
|
|
4
3
|
import { ingestInCache } from '~/cache/api/ingestInCache';
|
|
@@ -12,7 +11,7 @@ import { prepareCommunityPayload, prepareCommunityRequest } from '../utils';
|
|
|
12
11
|
/**
|
|
13
12
|
* ```js
|
|
14
13
|
* import { createCommunity } from '@amityco/ts-sdk'
|
|
15
|
-
* const created = await createCommunity({ communityId: 'foobar', displayName: 'foobar'
|
|
14
|
+
* const created = await createCommunity({ communityId: 'foobar', displayName: 'foobar' })
|
|
16
15
|
* ```
|
|
17
16
|
*
|
|
18
17
|
* Creates an {@link Amity.Community}
|
|
@@ -34,8 +33,6 @@ export const createCommunity = async (
|
|
|
34
33
|
| 'postSetting'
|
|
35
34
|
| 'tags'
|
|
36
35
|
| 'metadata'
|
|
37
|
-
| 'isDiscoverable'
|
|
38
|
-
| 'requiresJoinApproval'
|
|
39
36
|
> &
|
|
40
37
|
Amity.CommunityStorySettings & {
|
|
41
38
|
userIds?: string[];
|
|
@@ -63,7 +60,7 @@ export const createCommunity = async (
|
|
|
63
60
|
|
|
64
61
|
const { communities } = data;
|
|
65
62
|
return {
|
|
66
|
-
data:
|
|
63
|
+
data: communities[0],
|
|
67
64
|
cachedAt,
|
|
68
65
|
};
|
|
69
66
|
};
|