@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
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ```js
|
|
3
|
-
* import { acceptInvitation } from '@amityco/ts-sdk'
|
|
4
|
-
* const isAccepted = await acceptInvitation(invitationId)
|
|
5
|
-
* ```
|
|
6
|
-
*
|
|
7
|
-
* Accepts a {@link Amity.Invitation} object
|
|
8
|
-
*
|
|
9
|
-
* @param invitationId the {@link Amity.Invitation} to accept
|
|
10
|
-
* @returns A success boolean if the {@link Amity.Invitation} was accepted
|
|
11
|
-
*
|
|
12
|
-
* @category Invitation API
|
|
13
|
-
* @async
|
|
14
|
-
*/
|
|
15
|
-
export declare const acceptInvitation: (invitationId: Amity.Invitation['_id']) => Promise<boolean>;
|
|
16
|
-
//# sourceMappingURL=acceptInvitation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acceptInvitation.d.ts","sourceRoot":"","sources":["../../../src/invitationRepository/internalApi/acceptInvitation.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gBAAgB,iBAAwB,MAAM,UAAU,CAAC,KAAK,CAAC,KAAG,QAAQ,OAAO,CAqB7F,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ```js
|
|
3
|
-
* import { createInvitations } from '@amityco/ts-sdk'
|
|
4
|
-
* const created = await createInvitations({
|
|
5
|
-
* type: string,
|
|
6
|
-
* targetType: string,
|
|
7
|
-
* targetId: string,
|
|
8
|
-
* userIds: string[]
|
|
9
|
-
* }))
|
|
10
|
-
* ```
|
|
11
|
-
*
|
|
12
|
-
* Creates an {@link Amity.Invitation}
|
|
13
|
-
*
|
|
14
|
-
* @param bundle The data necessary to create a new {@link Amity.Invitation}
|
|
15
|
-
* @returns The newly created {@link Amity.Invitation}
|
|
16
|
-
*
|
|
17
|
-
* @category Invitation API
|
|
18
|
-
* @async
|
|
19
|
-
*/
|
|
20
|
-
export declare const createInvitations: (bundle: Amity.CreateInvitations) => Promise<Amity.Cached<Amity.InternalInvitation[]>>;
|
|
21
|
-
//# sourceMappingURL=createInvitations.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createInvitations.d.ts","sourceRoot":"","sources":["../../../src/invitationRepository/internalApi/createInvitations.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,iBAAiB,WACpB,MAAM,iBAAiB,KAC9B,QAAQ,MAAM,MAAM,CAAC,MAAM,kBAAkB,EAAE,CAAC,CAqBlD,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ```js
|
|
3
|
-
* import { getInvitation } from '@amityco/ts-sdk'
|
|
4
|
-
* const { invitation } = await getInvitation(targetType, targetId)
|
|
5
|
-
* ```
|
|
6
|
-
*
|
|
7
|
-
* Get a {@link Amity.Invitation} object
|
|
8
|
-
*
|
|
9
|
-
* @param targetType The type of the target of the {@link Amity.Invitation}
|
|
10
|
-
* @param targetId The ID of the target of the {@link Amity.Invitation}
|
|
11
|
-
* @returns A {@link Amity.Invitation} object
|
|
12
|
-
*
|
|
13
|
-
* @category Invitation API
|
|
14
|
-
* @async
|
|
15
|
-
*/
|
|
16
|
-
export declare const getInvitation: (targetType: Amity.Invitation['targetType'], targetId: Amity.Invitation['targetId']) => Promise<Amity.Cached<Amity.Invitation | undefined>>;
|
|
17
|
-
//# sourceMappingURL=getInvitation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getInvitation.d.ts","sourceRoot":"","sources":["../../../src/invitationRepository/internalApi/getInvitation.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,aAAa,eACZ,MAAM,UAAU,CAAC,YAAY,CAAC,YAChC,MAAM,UAAU,CAAC,UAAU,CAAC,KACrC,QAAQ,MAAM,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CAAC,CAmBpD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/invitationRepository/internalApi/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ```js
|
|
3
|
-
* import { rejectInvitation } from '@amityco/ts-sdk'
|
|
4
|
-
* const isRejected = await rejectInvitation(invitationId)
|
|
5
|
-
* ```
|
|
6
|
-
*
|
|
7
|
-
* Rejects a {@link Amity.Invitation} object
|
|
8
|
-
*
|
|
9
|
-
* @param invitationId the {@link Amity.Invitation} to reject
|
|
10
|
-
* @returns A success boolean if the {@link Amity.Invitation} was rejected
|
|
11
|
-
*
|
|
12
|
-
* @category Invitation API
|
|
13
|
-
* @async
|
|
14
|
-
*/
|
|
15
|
-
export declare const rejectInvitation: (invitationId: Amity.Invitation['_id']) => Promise<boolean>;
|
|
16
|
-
//# sourceMappingURL=rejectInvitation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rejectInvitation.d.ts","sourceRoot":"","sources":["../../../src/invitationRepository/internalApi/rejectInvitation.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gBAAgB,iBAAwB,MAAM,UAAU,CAAC,KAAK,CAAC,KAAG,QAAQ,OAAO,CAqB7F,CAAC"}
|
package/dist/invitationRepository/observers/getInvitations/InvitationsLiveCollectionController.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { InvitationsPaginationController } from './InvitationsPaginationController';
|
|
2
|
-
import { LiveCollectionController } from '~/core/liveCollection/LiveCollectionController';
|
|
3
|
-
export declare class InvitationsLiveCollectionController extends LiveCollectionController<'invitation', Amity.InvitationLiveCollection, Amity.Invitation, InvitationsPaginationController> {
|
|
4
|
-
private queryStreamController;
|
|
5
|
-
private query;
|
|
6
|
-
constructor(query: Amity.InvitationLiveCollection, callback: Amity.LiveCollectionCallback<Amity.Invitation>);
|
|
7
|
-
protected setup(): void;
|
|
8
|
-
protected persistModel(queryPayload: Amity.InvitationPayload & Amity.Pagination): Promise<void>;
|
|
9
|
-
protected persistQueryStream({ response, direction, refresh, }: Amity.LiveCollectionPersistQueryStreamParams<'invitation'>): void;
|
|
10
|
-
startSubscription(): Amity.Unsubscriber[];
|
|
11
|
-
notifyChange({ origin, loading, error }: Amity.LiveCollectionNotifyParams): void;
|
|
12
|
-
applyFilter(data: Amity.Invitation[]): Amity.Invitation[];
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=InvitationsLiveCollectionController.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InvitationsLiveCollectionController.d.ts","sourceRoot":"","sources":["../../../../src/invitationRepository/observers/getInvitations/InvitationsLiveCollectionController.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AAEpF,OAAO,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAQ1F,qBAAa,mCAAoC,SAAQ,wBAAwB,CAC/E,YAAY,EACZ,KAAK,CAAC,wBAAwB,EAC9B,KAAK,CAAC,UAAU,EAChB,+BAA+B,CAChC;IACC,OAAO,CAAC,qBAAqB,CAAmC;IAEhE,OAAO,CAAC,KAAK,CAAiC;gBAG5C,KAAK,EAAE,KAAK,CAAC,wBAAwB,EACrC,QAAQ,EAAE,KAAK,CAAC,sBAAsB,CAAC,KAAK,CAAC,UAAU,CAAC;IAoB1D,SAAS,CAAC,KAAK;cAUC,YAAY,CAAC,YAAY,EAAE,KAAK,CAAC,iBAAiB,GAAG,KAAK,CAAC,UAAU;IAIrF,SAAS,CAAC,kBAAkB,CAAC,EAC3B,QAAQ,EACR,SAAS,EACT,OAAO,GACR,EAAE,KAAK,CAAC,sCAAsC,CAAC,YAAY,CAAC;IAI7D,iBAAiB;IAiBjB,YAAY,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,CAAC,0BAA0B;IAsBzE,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,UAAU,EAAE;CAsCrC"}
|
package/dist/invitationRepository/observers/getInvitations/InvitationsPaginationController.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { PaginationController } from '~/core/liveCollection/PaginationController';
|
|
2
|
-
export declare class InvitationsPaginationController extends PaginationController<'invitation', Amity.InvitationLiveCollection> {
|
|
3
|
-
getRequest(queryParams: Amity.InvitationLiveCollection, token: string | undefined): Promise<Amity.InvitationPayload & Amity.Pagination>;
|
|
4
|
-
}
|
|
5
|
-
//# sourceMappingURL=InvitationsPaginationController.d.ts.map
|
package/dist/invitationRepository/observers/getInvitations/InvitationsPaginationController.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InvitationsPaginationController.d.ts","sourceRoot":"","sources":["../../../../src/invitationRepository/observers/getInvitations/InvitationsPaginationController.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAElF,qBAAa,+BAAgC,SAAQ,oBAAoB,CACvE,YAAY,EACZ,KAAK,CAAC,wBAAwB,CAC/B;IACO,UAAU,CAAC,WAAW,EAAE,KAAK,CAAC,wBAAwB,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS;CAWxF"}
|
package/dist/invitationRepository/observers/getInvitations/InvitationsQueryStreamController.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { InvitationActionsEnum } from './enums';
|
|
2
|
-
import { QueryStreamController } from '~/core/liveCollection/QueryStreamController';
|
|
3
|
-
export declare class InvitationsQueryStreamController extends QueryStreamController<Amity.InvitationPayload, Amity.InvitationLiveCollection> {
|
|
4
|
-
private notifyChange;
|
|
5
|
-
private preparePayload;
|
|
6
|
-
constructor(query: Amity.InvitationLiveCollection, cacheKey: string[], notifyChange: (params: Amity.LiveCollectionNotifyParams) => void, preparePayload: (response: Amity.InvitationPayload) => Amity.ProcessedInvitationPayload);
|
|
7
|
-
saveToMainDB(response: Amity.InvitationPayload): Promise<void>;
|
|
8
|
-
appendToQueryStream(response: Amity.InvitationPayload & Partial<Amity.Pagination>, direction: Amity.LiveCollectionPageDirection, refresh?: boolean): void;
|
|
9
|
-
reactor(action: InvitationActionsEnum): (invitations: Amity.InternalInvitation[]) => void;
|
|
10
|
-
subscribeRTE(createSubscriber: {
|
|
11
|
-
fn: (reactor: Amity.Listener<Amity.InternalInvitation[]>) => Amity.Unsubscriber;
|
|
12
|
-
action: InvitationActionsEnum;
|
|
13
|
-
}[]): Amity.Unsubscriber[];
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=InvitationsQueryStreamController.d.ts.map
|
package/dist/invitationRepository/observers/getInvitations/InvitationsQueryStreamController.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InvitationsQueryStreamController.d.ts","sourceRoot":"","sources":["../../../../src/invitationRepository/observers/getInvitations/InvitationsQueryStreamController.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAGhD,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AAEpF,qBAAa,gCAAiC,SAAQ,qBAAqB,CACzE,KAAK,CAAC,iBAAiB,EACvB,KAAK,CAAC,wBAAwB,CAC/B;IACC,OAAO,CAAC,YAAY,CAAqD;IAEzE,OAAO,CAAC,cAAc,CAA0E;gBAG9F,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,0BAA0B;IAOnF,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC,iBAAiB;IAWpD,mBAAmB,CACjB,QAAQ,EAAE,KAAK,CAAC,iBAAiB,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,EAC7D,SAAS,EAAE,KAAK,CAAC,2BAA2B,EAC5C,OAAO,UAAQ;IAoBjB,OAAO,CAAC,MAAM,EAAE,qBAAqB,iBACd,MAAM,kBAAkB,EAAE;IA2BjD,YAAY,CACV,gBAAgB,EAAE;QAChB,EAAE,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,kBAAkB,EAAE,CAAC,KAAK,KAAK,CAAC,YAAY,CAAC;QAChF,MAAM,EAAE,qBAAqB,CAAC;KAC/B,EAAE;CAIN"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../../src/invitationRepository/observers/getInvitations/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,qBAAqB;IAC/B,wBAAwB,6BAA6B;IACrD,wBAAwB,6BAA6B;IACrD,wBAAwB,6BAA6B;CACtD"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get invitations
|
|
3
|
-
*
|
|
4
|
-
* @param params the query parameters
|
|
5
|
-
* @param callback the callback to be called when the invitations are updated
|
|
6
|
-
* @returns invitations
|
|
7
|
-
*
|
|
8
|
-
* @category Invitation Live Collection
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
|
-
export declare const getInvitations: (params: Amity.InvitationLiveCollection, callback: Amity.LiveCollectionCallback<Amity.Invitation>, config?: Amity.LiveCollectionConfig) => () => void;
|
|
12
|
-
//# sourceMappingURL=getInvitations.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getInvitations.d.ts","sourceRoot":"","sources":["../../../src/invitationRepository/observers/getInvitations.ts"],"names":[],"mappings":"AAKA;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,WACjB,MAAM,wBAAwB,YAC5B,MAAM,sBAAsB,CAAC,MAAM,UAAU,CAAC,WAC/C,MAAM,oBAAoB,eAyBpC,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get my community invitations
|
|
3
|
-
*
|
|
4
|
-
* @param params the query parameters
|
|
5
|
-
* @param callback the callback to be called when the invitations are fetched
|
|
6
|
-
* @returns invitations
|
|
7
|
-
*
|
|
8
|
-
* @category My Community Invitations Live Collection
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
|
-
export declare const getMyCommunityInvitations: (params: Amity.MyInvitationsLiveCollection, callback: Amity.LiveCollectionCallback<Amity.Invitation>, config?: Amity.LiveCollectionConfig) => () => void;
|
|
12
|
-
//# sourceMappingURL=getMyCommunityInvitations.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getMyCommunityInvitations.d.ts","sourceRoot":"","sources":["../../../src/invitationRepository/observers/getMyCommunityInvitations.ts"],"names":[],"mappings":"AAMA;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB,WAC5B,MAAM,2BAA2B,YAC/B,MAAM,sBAAsB,CAAC,MAAM,UAAU,CAAC,WAC/C,MAAM,oBAAoB,eA4BpC,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { MyInvitationsPaginationController } from './MyInvitationsPaginationController';
|
|
2
|
-
import { LiveCollectionController } from '~/core/liveCollection/LiveCollectionController';
|
|
3
|
-
export declare class MyInvitationsLiveCollectionController extends LiveCollectionController<'myInvitation', Amity.MyInvitationsLiveCollection, Amity.Invitation, MyInvitationsPaginationController> {
|
|
4
|
-
private queryStreamController;
|
|
5
|
-
private query;
|
|
6
|
-
constructor(query: Amity.MyInvitationsLiveCollection, callback: Amity.LiveCollectionCallback<Amity.Invitation>);
|
|
7
|
-
protected setup(): void;
|
|
8
|
-
protected persistModel(queryPayload: Amity.MyInvitationsPayload & Amity.Pagination): Promise<void>;
|
|
9
|
-
protected persistQueryStream({ response, direction, refresh, }: Amity.LiveCollectionPersistQueryStreamParams<'myInvitation'>): void;
|
|
10
|
-
startSubscription(): Amity.Unsubscriber[];
|
|
11
|
-
notifyChange({ origin, loading, error }: Amity.LiveCollectionNotifyParams): void;
|
|
12
|
-
applyFilter(data: Amity.Invitation[]): Amity.Invitation[];
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=MyInvitationsLiveCollectionController.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MyInvitationsLiveCollectionController.d.ts","sourceRoot":"","sources":["../../../../src/invitationRepository/observers/getMyInvitations/MyInvitationsLiveCollectionController.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAExF,OAAO,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAS1F,qBAAa,qCAAsC,SAAQ,wBAAwB,CACjF,cAAc,EACd,KAAK,CAAC,2BAA2B,EACjC,KAAK,CAAC,UAAU,EAChB,iCAAiC,CAClC;IACC,OAAO,CAAC,qBAAqB,CAAqC;IAElE,OAAO,CAAC,KAAK,CAAoC;gBAG/C,KAAK,EAAE,KAAK,CAAC,2BAA2B,EACxC,QAAQ,EAAE,KAAK,CAAC,sBAAsB,CAAC,KAAK,CAAC,UAAU,CAAC;IAoB1D,SAAS,CAAC,KAAK;cAUC,YAAY,CAAC,YAAY,EAAE,KAAK,CAAC,oBAAoB,GAAG,KAAK,CAAC,UAAU;IAIxF,SAAS,CAAC,kBAAkB,CAAC,EAC3B,QAAQ,EACR,SAAS,EACT,OAAO,GACR,EAAE,KAAK,CAAC,sCAAsC,CAAC,cAAc,CAAC;IAI/D,iBAAiB;IAiBjB,YAAY,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,CAAC,0BAA0B;IAsBzE,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,UAAU,EAAE;CAsCrC"}
|
package/dist/invitationRepository/observers/getMyInvitations/MyInvitationsPaginationController.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { PaginationController } from '~/core/liveCollection/PaginationController';
|
|
2
|
-
export declare class MyInvitationsPaginationController extends PaginationController<'myInvitation', Amity.MyInvitationsLiveCollection> {
|
|
3
|
-
getRequest(queryParams: Amity.MyInvitationsLiveCollection, token: string | undefined): Promise<Amity.MyInvitationsPayload & Amity.Pagination>;
|
|
4
|
-
}
|
|
5
|
-
//# sourceMappingURL=MyInvitationsPaginationController.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MyInvitationsPaginationController.d.ts","sourceRoot":"","sources":["../../../../src/invitationRepository/observers/getMyInvitations/MyInvitationsPaginationController.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAGlF,qBAAa,iCAAkC,SAAQ,oBAAoB,CACzE,cAAc,EACd,KAAK,CAAC,2BAA2B,CAClC;IACO,UAAU,CAAC,WAAW,EAAE,KAAK,CAAC,2BAA2B,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS;CAa3F"}
|
package/dist/invitationRepository/observers/getMyInvitations/MyInvitationsQueryStreamController.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { QueryStreamController } from '~/core/liveCollection/QueryStreamController';
|
|
2
|
-
import { InvitationActionsEnum } from '../getInvitations/enums';
|
|
3
|
-
export declare class MyInvitationsQueryStreamController extends QueryStreamController<Amity.MyInvitationsPayload, Amity.MyInvitationsLiveCollection> {
|
|
4
|
-
private notifyChange;
|
|
5
|
-
private preparePayload;
|
|
6
|
-
constructor(query: Amity.MyInvitationsLiveCollection, cacheKey: string[], notifyChange: (params: Amity.LiveCollectionNotifyParams) => void, preparePayload: (response: Amity.MyInvitationsPayload) => Amity.ProcessedMyInvitationsPayload);
|
|
7
|
-
saveToMainDB(response: Amity.MyInvitationsPayload): Promise<void>;
|
|
8
|
-
appendToQueryStream(response: Amity.MyInvitationsPayload & Partial<Amity.Pagination>, direction: Amity.LiveCollectionPageDirection, refresh?: boolean): void;
|
|
9
|
-
reactor(action: InvitationActionsEnum): (invitations: Amity.InternalInvitation[]) => void;
|
|
10
|
-
subscribeRTE(createSubscriber: {
|
|
11
|
-
fn: (reactor: Amity.Listener<Amity.InternalInvitation[]>) => Amity.Unsubscriber;
|
|
12
|
-
action: InvitationActionsEnum;
|
|
13
|
-
}[]): Amity.Unsubscriber[];
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=MyInvitationsQueryStreamController.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MyInvitationsQueryStreamController.d.ts","sourceRoot":"","sources":["../../../../src/invitationRepository/observers/getMyInvitations/MyInvitationsQueryStreamController.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,qBAAa,kCAAmC,SAAQ,qBAAqB,CAC3E,KAAK,CAAC,oBAAoB,EAC1B,KAAK,CAAC,2BAA2B,CAClC;IACC,OAAO,CAAC,YAAY,CAAqD;IAEzE,OAAO,CAAC,cAAc,CAEmB;gBAGvC,KAAK,EAAE,KAAK,CAAC,2BAA2B,EACxC,QAAQ,EAAE,MAAM,EAAE,EAClB,YAAY,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,0BAA0B,KAAK,IAAI,EAChE,cAAc,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,oBAAoB,KAAK,KAAK,CAAC,6BAA6B;IAOzF,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC,oBAAoB;IAWvD,mBAAmB,CACjB,QAAQ,EAAE,KAAK,CAAC,oBAAoB,GAAG,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,EAChE,SAAS,EAAE,KAAK,CAAC,2BAA2B,EAC5C,OAAO,UAAQ;IAoBjB,OAAO,CAAC,MAAM,EAAE,qBAAqB,iBACd,MAAM,kBAAkB,EAAE;IAiCjD,YAAY,CACV,gBAAgB,EAAE;QAChB,EAAE,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,kBAAkB,EAAE,CAAC,KAAK,KAAK,CAAC,YAAY,CAAC;QAChF,MAAM,EAAE,qBAAqB,CAAC;KAC/B,EAAE;CAIN"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/invitationRepository/observers/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convertRawInvitationToInternalInvitation.d.ts","sourceRoot":"","sources":["../../../src/invitationRepository/utils/convertRawInvitationToInternalInvitation.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wCAAwC,kBACpC,MAAM,aAAa,KACjC,MAAM,kBAKR,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/invitationRepository/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prepareInvitationPayload.d.ts","sourceRoot":"","sources":["../../../src/invitationRepository/utils/prepareInvitationPayload.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,wBAAwB,eACvB,MAAM,iBAAiB,KAClC,MAAM,0BAMR,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prepareMyInvitationsPayload.d.ts","sourceRoot":"","sources":["../../../src/invitationRepository/utils/prepareMyInvitationsPayload.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,2BAA2B,eAC1B,MAAM,oBAAoB,KACrC,MAAM,6BAMR,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"communityLinkedObject.d.ts","sourceRoot":"","sources":["../../../src/utils/linkedObject/communityLinkedObject.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,qBAAqB,cAAe,MAAM,iBAAiB,KAAG,MAAM,SAgDhF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"invitationLinkedObject.d.ts","sourceRoot":"","sources":["../../../src/utils/linkedObject/invitationLinkedObject.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,sBAAsB,eAAgB,MAAM,kBAAkB,KAAG,MAAM,UAgCnF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"joinRequestLinkedObject.d.ts","sourceRoot":"","sources":["../../../src/utils/linkedObject/joinRequestLinkedObject.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,uBAAuB,gBACrB,MAAM,mBAAmB,KACrC,MAAM,WAsBR,CAAC"}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
|
|
3
|
-
export const enum InvitationTypeEnum {
|
|
4
|
-
CommunityMemberInvite = 'communityMemberInvite',
|
|
5
|
-
LivestreamInvite = 'livestreamInvite',
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export const enum InvitationStatusEnum {
|
|
9
|
-
Pending = 'pending',
|
|
10
|
-
Approved = 'approved',
|
|
11
|
-
Rejected = 'rejected',
|
|
12
|
-
Cancelled = 'cancelled',
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const enum InvitationSortByEnum {
|
|
16
|
-
FirstCreated = 'firstCreated',
|
|
17
|
-
LastCreated = 'lastCreated',
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
declare global {
|
|
21
|
-
namespace Amity {
|
|
22
|
-
type InvitationType = InvitationTypeEnum;
|
|
23
|
-
|
|
24
|
-
type InvitationStatus = InvitationStatusEnum;
|
|
25
|
-
|
|
26
|
-
type InvitationTargetType = Extract<Amity.Domain, 'community'>;
|
|
27
|
-
|
|
28
|
-
type InvitationTargetMap = {
|
|
29
|
-
community: Amity.InternalCommunity;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
type InvitationTarget<T extends InvitationTargetType> = InvitationTargetMap[T];
|
|
33
|
-
|
|
34
|
-
type InvitationSortBy = InvitationSortByEnum;
|
|
35
|
-
|
|
36
|
-
type InvitationDomain<T extends Amity.InvitationTargetType = Amity.InvitationTargetType> =
|
|
37
|
-
T extends 'community' ? { communityId: string } : { communityId?: string };
|
|
38
|
-
|
|
39
|
-
type RawInvitation = {
|
|
40
|
-
_id: string;
|
|
41
|
-
networkId: string;
|
|
42
|
-
type: Amity.InvitationType;
|
|
43
|
-
targetId: string;
|
|
44
|
-
targetType: Amity.InvitationTargetType;
|
|
45
|
-
userId: string;
|
|
46
|
-
status: Amity.InvitationStatus;
|
|
47
|
-
respondedAt: Amity.timestamp;
|
|
48
|
-
createdBy: string;
|
|
49
|
-
invitationId: string;
|
|
50
|
-
invitedUserId: string;
|
|
51
|
-
invitedUserInternalId: string;
|
|
52
|
-
invitedUserPublicId: string;
|
|
53
|
-
inviterUserId: string;
|
|
54
|
-
inviterUserInternalId: string;
|
|
55
|
-
inviterUserPublicId: string;
|
|
56
|
-
} & Amity.Timestamps &
|
|
57
|
-
Amity.InvitationDomain<Amity.InvitationTargetType>;
|
|
58
|
-
|
|
59
|
-
type InternalInvitation = Omit<RawInvitation, 'createdBy'> & {
|
|
60
|
-
createdById: string;
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
type Invitation = Omit<Amity.InternalInvitation, 'createdBy'> &
|
|
64
|
-
Amity.InvitationLinkedObject & {
|
|
65
|
-
user?: Amity.User;
|
|
66
|
-
createdById: string;
|
|
67
|
-
createdBy?: Amity.User;
|
|
68
|
-
target?: Amity.InvitationTarget<Amity.InvitationTargetType>;
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
type QueryInvitations = {
|
|
72
|
-
targetId: string;
|
|
73
|
-
statuses?: string[];
|
|
74
|
-
token?: Amity.Token;
|
|
75
|
-
type: Amity.InvitationType;
|
|
76
|
-
sortBy?: Amity.InvitationSortBy;
|
|
77
|
-
limit?: Amity.PageLimit['limit'];
|
|
78
|
-
targetType: Amity.InvitationTargetType;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
type InvitationLiveCollection = Amity.LiveCollectionParams<Omit<QueryInvitations, 'limit'>>;
|
|
82
|
-
|
|
83
|
-
type InvitationLiveCollectionCache = Amity.LiveCollectionCache<
|
|
84
|
-
Amity.InternalInvitation['_id'],
|
|
85
|
-
Pick<QueryInvitations, 'limit'>
|
|
86
|
-
>;
|
|
87
|
-
|
|
88
|
-
type QueryMyInvitations = {
|
|
89
|
-
targetId?: string;
|
|
90
|
-
token?: Amity.Token;
|
|
91
|
-
type?: Amity.InvitationType;
|
|
92
|
-
sortBy?: Amity.InvitationSortBy;
|
|
93
|
-
limit?: Amity.PageLimit['limit'];
|
|
94
|
-
statuses?: InvitationStatusEnum[];
|
|
95
|
-
targetType?: Amity.InvitationTargetType;
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
type MyInvitationsLiveCollection = Amity.LiveCollectionParams<
|
|
99
|
-
Omit<QueryMyInvitations, 'limit'>
|
|
100
|
-
>;
|
|
101
|
-
|
|
102
|
-
type MyInvitationsLiveCollectionCache = Amity.LiveCollectionCache<
|
|
103
|
-
Amity.InternalInvitation['_id'],
|
|
104
|
-
Pick<QueryMyInvitations, 'limit'>
|
|
105
|
-
>;
|
|
106
|
-
|
|
107
|
-
type InvitationLinkedObject = {
|
|
108
|
-
accept: () => Promise<void>;
|
|
109
|
-
reject: () => Promise<void>;
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
type CreateInvitations = {
|
|
113
|
-
type: Amity.InvitationType;
|
|
114
|
-
targetType: Amity.InvitationTargetType;
|
|
115
|
-
targetId: string;
|
|
116
|
-
userIds: string[];
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
|
|
3
|
-
export const enum JoinRequestStatusEnum {
|
|
4
|
-
Pending = 'pending',
|
|
5
|
-
Approved = 'approved',
|
|
6
|
-
Rejected = 'rejected',
|
|
7
|
-
Cancelled = 'cancelled',
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const enum JoinResultStatusEnum {
|
|
11
|
-
Success = 'success',
|
|
12
|
-
Pending = 'pending',
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
declare global {
|
|
16
|
-
namespace Amity {
|
|
17
|
-
type JoinRequestStatus = JoinRequestStatusEnum;
|
|
18
|
-
|
|
19
|
-
type JoinResultStatus = JoinResultStatusEnum;
|
|
20
|
-
|
|
21
|
-
type JoinRequestType = 'communityJoinRequest';
|
|
22
|
-
|
|
23
|
-
type JoinResult = {
|
|
24
|
-
status: Amity.JoinResultStatus;
|
|
25
|
-
request?: Amity.JoinRequest;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
type RawJoinRequest = {
|
|
29
|
-
_id: string;
|
|
30
|
-
createdAt: Amity.timestamp;
|
|
31
|
-
joinRequestId: string;
|
|
32
|
-
networkId: string;
|
|
33
|
-
|
|
34
|
-
requestorId: string;
|
|
35
|
-
requestorInternalId: string;
|
|
36
|
-
requestorPublicId: string;
|
|
37
|
-
|
|
38
|
-
respondedAt: Amity.timestamp | null;
|
|
39
|
-
responderId: string | null;
|
|
40
|
-
responderInternalId: string | null;
|
|
41
|
-
responderPublicId: string | null;
|
|
42
|
-
|
|
43
|
-
status: Amity.JoinRequestStatus;
|
|
44
|
-
targetId: string;
|
|
45
|
-
targetType: string;
|
|
46
|
-
type: Amity.JoinRequestType;
|
|
47
|
-
updatedAt: Amity.timestamp;
|
|
48
|
-
userId: string;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
type InternalJoinRequest = Omit<RawJoinRequest, '_id'>;
|
|
52
|
-
|
|
53
|
-
type JoinRequest = Omit<Amity.InternalJoinRequest, 'responderId'> &
|
|
54
|
-
Amity.JoinRequestLinkedObject & {
|
|
55
|
-
user?: Amity.User;
|
|
56
|
-
feeds?: Amity.Feed[];
|
|
57
|
-
files?: Amity.File[];
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
type JoinRequestLinkedObject = {
|
|
61
|
-
cancel: () => Promise<void>;
|
|
62
|
-
approve: () => Promise<void>;
|
|
63
|
-
reject: () => Promise<void>;
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { getActiveClient } from '~/client/api/activeClient';
|
|
2
|
-
import { createEventSubscriber } from '~/core/events';
|
|
3
|
-
|
|
4
|
-
export const onLocalCommunityJoin = (
|
|
5
|
-
callback: (joinRequest: Amity.InternalJoinRequest) => void,
|
|
6
|
-
) => {
|
|
7
|
-
const client = getActiveClient();
|
|
8
|
-
|
|
9
|
-
const filter = async (rawPayload: Amity.InternalJoinRequest[]) => {
|
|
10
|
-
callback(rawPayload[0]);
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const disposers = [
|
|
14
|
-
createEventSubscriber(client, 'onCommunityUpdate', 'v4.local.community.joined', filter),
|
|
15
|
-
];
|
|
16
|
-
|
|
17
|
-
return () => {
|
|
18
|
-
disposers.forEach(fn => fn());
|
|
19
|
-
};
|
|
20
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { getActiveClient } from '~/client/api/activeClient';
|
|
2
|
-
import { ingestInCache } from '~/cache/api/ingestInCache';
|
|
3
|
-
import { prepareCommunityJoinRequestPayload } from '~/communityRepository/utils';
|
|
4
|
-
import { joinRequestLinkedObject } from '~/utils/linkedObject/joinRequestLinkedObject';
|
|
5
|
-
|
|
6
|
-
/* begin_public_function
|
|
7
|
-
id: community.getMyJoinRequest
|
|
8
|
-
*/
|
|
9
|
-
/**
|
|
10
|
-
* ```js
|
|
11
|
-
* import { community } from '@amityco/ts-sdk'
|
|
12
|
-
* const isJoined = await community.getMyJoinRequest('foobar')
|
|
13
|
-
* ```
|
|
14
|
-
*
|
|
15
|
-
* Joins a {@link Amity.Community} object
|
|
16
|
-
*
|
|
17
|
-
* @param communityId the {@link Amity.Community} to join
|
|
18
|
-
* @returns A success boolean if the {@link Amity.Community} was joined
|
|
19
|
-
*
|
|
20
|
-
* @category Community API
|
|
21
|
-
* @async
|
|
22
|
-
*/
|
|
23
|
-
export const getMyJoinRequest = async (
|
|
24
|
-
communityId: Amity.Community['communityId'],
|
|
25
|
-
): Promise<Amity.Cached<Amity.JoinRequest | undefined>> => {
|
|
26
|
-
const client = getActiveClient();
|
|
27
|
-
client.log('community/myJoinRequest', communityId);
|
|
28
|
-
|
|
29
|
-
const { data: payload } = await client.http.get<Amity.CommunityJoinRequestPayload>(
|
|
30
|
-
`/api/v4/communities/${communityId}/join/me`,
|
|
31
|
-
);
|
|
32
|
-
|
|
33
|
-
const data = prepareCommunityJoinRequestPayload(payload);
|
|
34
|
-
|
|
35
|
-
const cachedAt = client.cache && Date.now();
|
|
36
|
-
if (client.cache) ingestInCache(data, { cachedAt });
|
|
37
|
-
|
|
38
|
-
return {
|
|
39
|
-
data: data.joinRequests[0] ? joinRequestLinkedObject(data.joinRequests[0]) : undefined,
|
|
40
|
-
cachedAt,
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
/* end_public_function */
|