@amityco/ts-sdk 7.5.2-aad2dac.0 → 7.5.2
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/index.d.ts +0 -3
- package/dist/@types/index.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/searchMembers/SearchCommunityMembersQueryStreamController.d.ts +2 -2
- package/dist/communityRepository/communityMembership/observers/searchMembers/SearchCommunityMembersQueryStreamController.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/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/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/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 +1431 -2870
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +1665 -3103
- package/dist/index.umd.js +4 -4
- 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/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/index.ts +0 -3
- 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/searchMembers/SearchCommunityMembersQueryStreamController.ts +2 -8
- 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 -2
- package/src/communityRepository/observers/getRecommendedCommunities/RecommendedCommunitiesPaginationController.ts +1 -6
- package/src/communityRepository/observers/getRecommendedCommunities/RecommendedCommunitiesQueryStreamController.ts +2 -2
- package/src/communityRepository/observers/getTrendingCommunities/TrendingCommunitiesLiveCollectionController.ts +1 -2
- 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/SearchCommunitiesPaginationController.ts +0 -1
- package/src/communityRepository/observers/searchCommunities/SearchCommunitiesQueryStreamController.ts +2 -2
- 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/observers/getGlobalPinnedPosts/GlobalPinnedPostQueryStreamController.ts +1 -7
- package/src/postRepository/observers/getPinnedPosts/PinnedPostQueryStreamController.ts +1 -7
- package/src/subChannelRepository/utils/prepareSubChannelPayload.ts +0 -4
- package/src/utils/linkedObject/index.ts +0 -6
- 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 -46
- package/src/communityRepository/joinRequest/internalAPI/rejectJoinRequest.ts +0 -52
- package/src/communityRepository/observers/getJoinRequestList/JoinRequestListLiveCollectionController.ts +0 -130
- package/src/communityRepository/observers/getJoinRequestList/JoinRequestListPaginationController.ts +0 -30
- package/src/communityRepository/observers/getJoinRequestList/JoinRequestListQueryStreamController.ts +0 -112
- 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 +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"}
|
|
@@ -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 = {
|
package/src/@types/index.ts
CHANGED
|
@@ -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
|
};
|
|
@@ -5,7 +5,6 @@ import { ingestInCache } from '~/cache/api/ingestInCache';
|
|
|
5
5
|
|
|
6
6
|
import { saveCommunityUsers } from '~/communityRepository/utils/saveCommunityUsers';
|
|
7
7
|
import { prepareCommunityPayload } from '../utils';
|
|
8
|
-
import { LinkedObject } from '~/utils/linkedObject';
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
10
|
* ```js
|
|
@@ -23,21 +22,15 @@ import { LinkedObject } from '~/utils/linkedObject';
|
|
|
23
22
|
*/
|
|
24
23
|
export const getCommunities = async (
|
|
25
24
|
communityIds: Amity.Community['communityId'][],
|
|
26
|
-
includeDiscoverablePrivateCommunity?: boolean,
|
|
27
25
|
): Promise<Amity.Cached<Amity.Community[]>> => {
|
|
28
26
|
const client = getActiveClient();
|
|
29
27
|
client.log('community/getCommunities', communityIds);
|
|
30
28
|
|
|
31
|
-
const encodedCommunityIds = communityIds.map(communityId => encodeURIComponent(communityId));
|
|
32
|
-
|
|
33
29
|
// API-FIX: endpoint should not be /list, parameters should be querystring.
|
|
34
30
|
const { data: payload } = await client.http.get<Amity.CommunityPayload>(
|
|
35
31
|
`/api/v3/communities/list`,
|
|
36
32
|
{
|
|
37
|
-
params: {
|
|
38
|
-
communityIds: encodedCommunityIds,
|
|
39
|
-
includeDiscoverablePrivateCommunity: includeDiscoverablePrivateCommunity ?? true,
|
|
40
|
-
},
|
|
33
|
+
params: { communityIds },
|
|
41
34
|
},
|
|
42
35
|
);
|
|
43
36
|
|
|
@@ -50,7 +43,7 @@ export const getCommunities = async (
|
|
|
50
43
|
}
|
|
51
44
|
|
|
52
45
|
return {
|
|
53
|
-
data: data.communities
|
|
46
|
+
data: data.communities,
|
|
54
47
|
cachedAt,
|
|
55
48
|
};
|
|
56
49
|
};
|
|
@@ -5,7 +5,6 @@ import { ingestInCache } from '~/cache/api/ingestInCache';
|
|
|
5
5
|
|
|
6
6
|
import { saveCommunityUsers } from '~/communityRepository/utils/saveCommunityUsers';
|
|
7
7
|
import { prepareCommunityPayload } from '../utils';
|
|
8
|
-
import { LinkedObject } from '~/utils/linkedObject';
|
|
9
8
|
|
|
10
9
|
/**
|
|
11
10
|
* ```js
|
|
@@ -23,8 +22,6 @@ import { LinkedObject } from '~/utils/linkedObject';
|
|
|
23
22
|
*/
|
|
24
23
|
export const getCommunity = async (
|
|
25
24
|
communityId: Amity.Community['communityId'],
|
|
26
|
-
type?: Amity.JoinRequestType,
|
|
27
|
-
includeDiscoverablePrivateCommunity?: boolean,
|
|
28
25
|
): Promise<Amity.Cached<Amity.Community>> => {
|
|
29
26
|
const client = getActiveClient();
|
|
30
27
|
client.log('community/getCommunity', communityId);
|
|
@@ -32,12 +29,6 @@ export const getCommunity = async (
|
|
|
32
29
|
// API-FIX: endpoint should not be /list, parameters should be querystring.
|
|
33
30
|
const { data: payload } = await client.http.get<Amity.CommunityPayload>(
|
|
34
31
|
`/api/v3/communities/${communityId}`,
|
|
35
|
-
{
|
|
36
|
-
params: {
|
|
37
|
-
type: 'communityJoinRequest',
|
|
38
|
-
includeDiscoverablePrivateCommunity: includeDiscoverablePrivateCommunity ?? true,
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
32
|
);
|
|
42
33
|
|
|
43
34
|
const data = prepareCommunityPayload(payload);
|
|
@@ -51,9 +42,7 @@ export const getCommunity = async (
|
|
|
51
42
|
const { communities } = data;
|
|
52
43
|
|
|
53
44
|
return {
|
|
54
|
-
data:
|
|
55
|
-
communities.find(community => community.communityId === communityId)!,
|
|
56
|
-
),
|
|
45
|
+
data: communities.find(community => community.communityId === communityId)!,
|
|
57
46
|
cachedAt,
|
|
58
47
|
};
|
|
59
48
|
};
|
|
@@ -84,7 +73,7 @@ getCommunity.locally = (
|
|
|
84
73
|
if (!cached) return;
|
|
85
74
|
|
|
86
75
|
return {
|
|
87
|
-
data:
|
|
76
|
+
data: cached.data,
|
|
88
77
|
cachedAt: cached.cachedAt,
|
|
89
78
|
};
|
|
90
79
|
};
|
|
@@ -4,7 +4,6 @@ import { ingestInCache } from '~/cache/api/ingestInCache';
|
|
|
4
4
|
|
|
5
5
|
import { prepareCommunityPayload } from '../utils';
|
|
6
6
|
import { COLLECTION_DEFAULT_PAGINATION_LIMIT } from '~/utils/constants';
|
|
7
|
-
import { LinkedObject } from '~/utils/linkedObject';
|
|
8
7
|
|
|
9
8
|
/* begin_public_function
|
|
10
9
|
id: community.query.recommended_communities
|
|
@@ -25,24 +24,18 @@ import { LinkedObject } from '~/utils/linkedObject';
|
|
|
25
24
|
* @private
|
|
26
25
|
*/
|
|
27
26
|
export const getRecommendedCommunities = async (
|
|
28
|
-
query?: Amity.PageLimit
|
|
27
|
+
query?: Amity.PageLimit,
|
|
29
28
|
): Promise<Amity.Cached<Amity.Community[]>> => {
|
|
30
29
|
const client = getActiveClient();
|
|
31
30
|
client.log('community/getRecommendedCommunities', query);
|
|
32
31
|
|
|
33
|
-
const { limit = COLLECTION_DEFAULT_PAGINATION_LIMIT
|
|
34
|
-
query ?? {};
|
|
32
|
+
const { limit = COLLECTION_DEFAULT_PAGINATION_LIMIT } = query ?? {};
|
|
35
33
|
|
|
36
34
|
// API-FIX: backend doesnt answer Amity.Response
|
|
37
35
|
// const { data: payload } = await client.http.get<Amity.Response<CommunityPayload>>(
|
|
38
36
|
const { data: payload } = await client.http.get<Amity.CommunityPayload>(
|
|
39
37
|
`/api/v3/communities/recommended`,
|
|
40
|
-
{
|
|
41
|
-
params: {
|
|
42
|
-
includeDiscoverablePrivateCommunity: includeDiscoverablePrivateCommunity ?? true,
|
|
43
|
-
options: { limit },
|
|
44
|
-
},
|
|
45
|
-
},
|
|
38
|
+
{ params: { options: { limit } } },
|
|
46
39
|
);
|
|
47
40
|
|
|
48
41
|
const data = prepareCommunityPayload(payload);
|
|
@@ -54,5 +47,5 @@ export const getRecommendedCommunities = async (
|
|
|
54
47
|
ingestInCache(data, { cachedAt });
|
|
55
48
|
}
|
|
56
49
|
|
|
57
|
-
return { data: communities
|
|
50
|
+
return { data: communities, cachedAt };
|
|
58
51
|
};
|
|
@@ -4,7 +4,6 @@ import { ingestInCache } from '~/cache/api/ingestInCache';
|
|
|
4
4
|
|
|
5
5
|
import { prepareCommunityPayload } from '../utils';
|
|
6
6
|
import { COLLECTION_DEFAULT_PAGINATION_LIMIT } from '~/utils/constants';
|
|
7
|
-
import { LinkedObject } from '~/utils/linkedObject';
|
|
8
7
|
|
|
9
8
|
/**
|
|
10
9
|
* ```js
|
|
@@ -22,24 +21,18 @@ import { LinkedObject } from '~/utils/linkedObject';
|
|
|
22
21
|
* @private
|
|
23
22
|
*/
|
|
24
23
|
export const getTrendingCommunities = async (
|
|
25
|
-
query?: Amity.PageLimit
|
|
24
|
+
query?: Amity.PageLimit,
|
|
26
25
|
): Promise<Amity.Cached<Amity.Community[]>> => {
|
|
27
26
|
const client = getActiveClient();
|
|
28
27
|
client.log('community/getTrendingCommunities', query);
|
|
29
28
|
|
|
30
|
-
const { limit = COLLECTION_DEFAULT_PAGINATION_LIMIT
|
|
31
|
-
query ?? {};
|
|
29
|
+
const { limit = COLLECTION_DEFAULT_PAGINATION_LIMIT } = query ?? {};
|
|
32
30
|
|
|
33
31
|
// API-FIX: backend doesnt answer Amity.Response
|
|
34
32
|
// const { data } = await client.http.get<Amity.Response<CommunityPayload>>(
|
|
35
33
|
const { data: payload } = await client.http.get<Amity.CommunityPayload>(
|
|
36
34
|
`/api/v3/communities/top-trending`,
|
|
37
|
-
{
|
|
38
|
-
params: {
|
|
39
|
-
includeDiscoverablePrivateCommunity: includeDiscoverablePrivateCommunity ?? true,
|
|
40
|
-
options: { limit },
|
|
41
|
-
},
|
|
42
|
-
},
|
|
35
|
+
{ params: { options: { limit } } },
|
|
43
36
|
);
|
|
44
37
|
|
|
45
38
|
const data = prepareCommunityPayload(payload);
|
|
@@ -51,5 +44,5 @@ export const getTrendingCommunities = async (
|
|
|
51
44
|
ingestInCache(data, { cachedAt });
|
|
52
45
|
}
|
|
53
46
|
|
|
54
|
-
return { data: communities
|
|
47
|
+
return { data: communities, cachedAt };
|
|
55
48
|
};
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { getActiveClient } from '~/client/api
|
|
1
|
+
import { getActiveClient } from '~/client/api';
|
|
2
2
|
|
|
3
3
|
import { ingestInCache } from '~/cache/api/ingestInCache';
|
|
4
4
|
import { prepareCommunityPayload } from '~/communityRepository/utils';
|
|
5
5
|
import { fireEvent } from '~/core/events';
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated This function will to be deprecated and use the new community.join().
|
|
9
|
-
*/
|
|
10
7
|
/* begin_public_function
|
|
11
8
|
id: community.join
|
|
12
9
|
*/
|
|
@@ -6,7 +6,6 @@ import { getResolver } from '~/core/model';
|
|
|
6
6
|
import { inferIsDeleted } from '~/utils/inferIsDeleted';
|
|
7
7
|
import { saveCommunityUsers } from '~/communityRepository/utils/saveCommunityUsers';
|
|
8
8
|
import { prepareCommunityPayload } from '../utils';
|
|
9
|
-
import { LinkedObject } from '~/utils/linkedObject';
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* ```js
|
|
@@ -50,7 +49,6 @@ export const queryCommunities = async (
|
|
|
50
49
|
...restParams,
|
|
51
50
|
isDeleted: inferIsDeleted(includeDeleted),
|
|
52
51
|
filter: membership,
|
|
53
|
-
includeDiscoverablePrivateCommunity: params?.includeDiscoverablePrivateCommunity ?? true,
|
|
54
52
|
options,
|
|
55
53
|
},
|
|
56
54
|
},
|
|
@@ -70,9 +68,5 @@ export const queryCommunities = async (
|
|
|
70
68
|
saveCommunityUsers(data.communities, data.communityUsers);
|
|
71
69
|
}
|
|
72
70
|
|
|
73
|
-
return {
|
|
74
|
-
data: communities.map(community => LinkedObject.community(community)),
|
|
75
|
-
cachedAt,
|
|
76
|
-
paging,
|
|
77
|
-
};
|
|
71
|
+
return { data: communities, cachedAt, paging };
|
|
78
72
|
};
|