@amityco/ts-sdk 0.0.1-beta.2 → 0.0.1-c58e50d.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +390 -0
- package/dist/@types/core/cache.d.ts +21 -0
- package/{@types → dist/@types}/core/cache.d.ts.map +0 -0
- package/dist/@types/core/errors.d.ts +32 -0
- package/{@types → dist/@types}/core/errors.d.ts.map +0 -0
- package/dist/@types/core/events.d.ts +46 -0
- package/{@types → dist/@types}/core/events.d.ts.map +0 -0
- package/dist/@types/core/model.d.ts +41 -0
- package/dist/@types/core/model.d.ts.map +1 -0
- package/dist/@types/core/payload.d.ts +88 -0
- package/dist/@types/core/payload.d.ts.map +1 -0
- package/dist/@types/core/permissions.d.ts +71 -0
- package/dist/@types/core/permissions.d.ts.map +1 -0
- package/dist/@types/core/query.d.ts +72 -0
- package/dist/@types/core/query.d.ts.map +1 -0
- package/dist/@types/core/store.d.ts +46 -0
- package/{@types → dist/@types}/core/store.d.ts.map +0 -0
- package/dist/@types/core/transport.d.ts +27 -0
- package/{@types → dist/@types}/core/transport.d.ts.map +0 -0
- package/dist/@types/domains/category.d.ts +11 -0
- package/{@types → dist/@types}/domains/category.d.ts.map +0 -0
- package/dist/@types/domains/channel.d.ts +26 -0
- package/{@types → dist/@types}/domains/channel.d.ts.map +0 -0
- package/dist/@types/domains/client.d.ts +31 -0
- package/{@types → dist/@types}/domains/client.d.ts.map +0 -0
- package/dist/@types/domains/comment.d.ts +17 -0
- package/{@types → dist/@types}/domains/comment.d.ts.map +0 -0
- package/dist/@types/domains/community.d.ts +24 -0
- package/dist/@types/domains/community.d.ts.map +1 -0
- package/dist/@types/domains/content.d.ts +26 -0
- package/{@types → dist/@types}/domains/content.d.ts.map +0 -0
- package/dist/@types/domains/feed.d.ts +14 -0
- package/{@types → dist/@types}/domains/feed.d.ts.map +0 -0
- package/dist/@types/domains/file.d.ts +29 -0
- package/{@types → dist/@types}/domains/file.d.ts.map +0 -0
- package/dist/@types/domains/group.d.ts +26 -0
- package/dist/@types/domains/group.d.ts.map +1 -0
- package/dist/@types/domains/message.d.ts +16 -0
- package/{@types → dist/@types}/domains/message.d.ts.map +0 -0
- package/dist/@types/domains/partials.d.ts +42 -0
- package/{@types → dist/@types}/domains/partials.d.ts.map +0 -0
- package/dist/@types/domains/post.d.ts +22 -0
- package/dist/@types/domains/post.d.ts.map +1 -0
- package/dist/@types/domains/reaction.d.ts +24 -0
- package/{@types → dist/@types}/domains/reaction.d.ts.map +0 -0
- package/dist/@types/domains/stream.d.ts +47 -0
- package/{@types → dist/@types}/domains/stream.d.ts.map +0 -0
- package/dist/@types/domains/user.d.ts +12 -0
- package/{@types → dist/@types}/domains/user.d.ts.map +0 -0
- package/dist/@types/global.d.ts +13 -0
- package/{@types → dist/@types}/global.d.ts.map +0 -0
- package/dist/@types/index.d.ts +23 -0
- package/{@types → dist/@types}/index.d.ts.map +0 -0
- package/dist/category/api/getCategory.d.ts +16 -0
- package/{category → dist/category}/api/getCategory.d.ts.map +0 -0
- package/dist/category/api/index.d.ts +3 -0
- package/{category → dist/category}/api/index.d.ts.map +0 -0
- package/dist/category/api/queryCategories.d.ts +23 -0
- package/{category → dist/category}/api/queryCategories.d.ts.map +0 -0
- package/dist/channel/api/addChannelMembers.d.ts +17 -0
- package/dist/channel/api/addChannelMembers.d.ts.map +1 -0
- package/dist/channel/api/addChannelMembersRole.d.ts +18 -0
- package/dist/channel/api/addChannelMembersRole.d.ts.map +1 -0
- package/dist/channel/api/createChannel.d.ts +19 -0
- package/dist/channel/api/createChannel.d.ts.map +1 -0
- package/dist/channel/api/deleteChannel.d.ts +16 -0
- package/{channel → dist/channel}/api/deleteChannel.d.ts.map +0 -0
- package/dist/channel/api/getChannel.d.ts +32 -0
- package/{channel → dist/channel}/api/getChannel.d.ts.map +0 -0
- package/dist/channel/api/getChannels.d.ts +32 -0
- package/{channel → dist/channel}/api/getChannels.d.ts.map +0 -0
- package/dist/channel/api/index.d.ts +14 -0
- package/dist/channel/api/index.d.ts.map +1 -0
- package/dist/channel/api/joinChannel.d.ts +16 -0
- package/{channel → dist/channel}/api/joinChannel.d.ts.map +0 -0
- package/dist/channel/api/leaveChannel.d.ts +16 -0
- package/{channel → dist/channel}/api/leaveChannel.d.ts.map +0 -0
- package/dist/channel/api/queryChannelMembers.d.ts +42 -0
- package/dist/channel/api/queryChannelMembers.d.ts.map +1 -0
- package/dist/channel/api/queryChannels.d.ts +42 -0
- package/dist/channel/api/queryChannels.d.ts.map +1 -0
- package/dist/channel/api/removeChannelMembers.d.ts +17 -0
- package/dist/channel/api/removeChannelMembers.d.ts.map +1 -0
- package/dist/channel/api/removeChannelMembersRole.d.ts +18 -0
- package/dist/channel/api/removeChannelMembersRole.d.ts.map +1 -0
- package/dist/channel/api/updateChannel.d.ts +17 -0
- package/{channel → dist/channel}/api/updateChannel.d.ts.map +0 -0
- package/dist/channel/events/index.d.ts +7 -0
- package/{channel → dist/channel}/events/index.d.ts.map +0 -0
- package/dist/channel/events/onChannelCreated.d.ts +17 -0
- package/{channel → dist/channel}/events/onChannelCreated.d.ts.map +0 -0
- package/dist/channel/events/onChannelDeleted.d.ts +17 -0
- package/{channel → dist/channel}/events/onChannelDeleted.d.ts.map +0 -0
- package/dist/channel/events/onChannelJoined.d.ts +17 -0
- package/{channel → dist/channel}/events/onChannelJoined.d.ts.map +0 -0
- package/dist/channel/events/onChannelLeft.d.ts +17 -0
- package/{channel → dist/channel}/events/onChannelLeft.d.ts.map +0 -0
- package/dist/channel/events/onChannelUpdated.d.ts +17 -0
- package/{channel → dist/channel}/events/onChannelUpdated.d.ts.map +0 -0
- package/dist/channel/events/onMemberAdded.d.ts +17 -0
- package/{channel → dist/channel}/events/onMemberAdded.d.ts.map +0 -0
- package/dist/channel/events/onMemberRemoved.d.ts +17 -0
- package/{channel → dist/channel}/events/onMemberRemoved.d.ts.map +0 -0
- package/dist/channel/observers/index.d.ts +2 -0
- package/{channel → dist/channel}/observers/index.d.ts.map +0 -0
- package/dist/channel/observers/observeChannel.d.ts +20 -0
- package/{channel → dist/channel}/observers/observeChannel.d.ts.map +0 -0
- package/dist/client/api/activeClient.d.ts +17 -0
- package/{client → dist/client}/api/activeClient.d.ts.map +0 -0
- package/dist/client/api/clearCache.d.ts +15 -0
- package/dist/client/api/clearCache.d.ts.map +1 -0
- package/dist/client/api/connectClient.d.ts +26 -0
- package/dist/client/api/connectClient.d.ts.map +1 -0
- package/dist/client/api/createClient.d.ts +17 -0
- package/{client → dist/client}/api/createClient.d.ts.map +0 -0
- package/dist/client/api/disconnectClient.d.ts +16 -0
- package/{client → dist/client}/api/disconnectClient.d.ts.map +0 -0
- package/dist/client/api/enableCache.d.ts +15 -0
- package/dist/client/api/enableCache.d.ts.map +1 -0
- package/dist/client/api/getToken.d.ts +19 -0
- package/{client → dist/client}/api/getToken.d.ts.map +0 -0
- package/dist/client/api/index.d.ts +8 -0
- package/dist/client/api/index.d.ts.map +1 -0
- package/dist/client/api/isConnected.d.ts +14 -0
- package/{client → dist/client}/api/isConnected.d.ts.map +0 -0
- package/dist/client/events/index.d.ts +2 -0
- package/{client → dist/client}/events/index.d.ts.map +0 -0
- package/dist/client/events/onClientDisconnected.d.ts +17 -0
- package/{client → dist/client}/events/onClientDisconnected.d.ts.map +0 -0
- package/dist/comment/api/createComment.d.ts +16 -0
- package/dist/comment/api/createComment.d.ts.map +1 -0
- package/dist/comment/api/deleteComment.d.ts +16 -0
- package/{comment → dist/comment}/api/deleteComment.d.ts.map +0 -0
- package/dist/comment/api/getComment.d.ts +32 -0
- package/{comment → dist/comment}/api/getComment.d.ts.map +0 -0
- package/dist/comment/api/getComments.d.ts +32 -0
- package/{comment → dist/comment}/api/getComments.d.ts.map +0 -0
- package/dist/comment/api/index.d.ts +7 -0
- package/{comment → dist/comment}/api/index.d.ts.map +0 -0
- package/dist/comment/api/queryComments.d.ts +53 -0
- package/dist/comment/api/queryComments.d.ts.map +1 -0
- package/dist/comment/api/updateComment.d.ts +19 -0
- package/{comment → dist/comment}/api/updateComment.d.ts.map +0 -0
- package/dist/comment/events/index.d.ts +4 -0
- package/{comment → dist/comment}/events/index.d.ts.map +0 -0
- package/dist/comment/events/onCommentCreated.d.ts +17 -0
- package/{comment → dist/comment}/events/onCommentCreated.d.ts.map +0 -0
- package/dist/comment/events/onCommentDeleted.d.ts +17 -0
- package/{comment → dist/comment}/events/onCommentDeleted.d.ts.map +0 -0
- package/dist/comment/events/onCommentUpdated.d.ts +17 -0
- package/{comment → dist/comment}/events/onCommentUpdated.d.ts.map +0 -0
- package/dist/comment/observers/index.d.ts +3 -0
- package/{comment → dist/comment}/observers/index.d.ts.map +0 -0
- package/dist/comment/observers/observeComment.d.ts +20 -0
- package/{comment → dist/comment}/observers/observeComment.d.ts.map +0 -0
- package/dist/comment/observers/observeComments.d.ts +22 -0
- package/{comment → dist/comment}/observers/observeComments.d.ts.map +0 -0
- package/dist/community/api/addCommunityMembers.d.ts +17 -0
- package/dist/community/api/addCommunityMembers.d.ts.map +1 -0
- package/dist/community/api/addCommunityMembersRole.d.ts +18 -0
- package/dist/community/api/addCommunityMembersRole.d.ts.map +1 -0
- package/dist/community/api/createCommunity.d.ts +20 -0
- package/{community → dist/community}/api/createCommunity.d.ts.map +0 -0
- package/dist/community/api/deleteCommunity.d.ts +16 -0
- package/{community → dist/community}/api/deleteCommunity.d.ts.map +0 -0
- package/dist/community/api/getCommunities.d.ts +32 -0
- package/{community → dist/community}/api/getCommunities.d.ts.map +0 -0
- package/dist/community/api/getCommunity.d.ts +32 -0
- package/dist/community/api/getCommunity.d.ts.map +1 -0
- package/dist/community/api/index.d.ts +14 -0
- package/dist/community/api/index.d.ts.map +1 -0
- package/dist/community/api/joinCommunity.d.ts +16 -0
- package/{community → dist/community}/api/joinCommunity.d.ts.map +0 -0
- package/dist/community/api/leaveCommunity.d.ts +16 -0
- package/{community → dist/community}/api/leaveCommunity.d.ts.map +0 -0
- package/dist/community/api/queryCommunities.d.ts +46 -0
- package/{community → dist/community}/api/queryCommunities.d.ts.map +0 -0
- package/dist/community/api/queryCommunityMembers.d.ts +42 -0
- package/dist/community/api/queryCommunityMembers.d.ts.map +1 -0
- package/dist/community/api/removeCommunityMembers.d.ts +17 -0
- package/dist/community/api/removeCommunityMembers.d.ts.map +1 -0
- package/dist/community/api/removeCommunityMembersRole.d.ts +18 -0
- package/dist/community/api/removeCommunityMembersRole.d.ts.map +1 -0
- package/dist/community/api/updateCommunity.d.ts +17 -0
- package/{community → dist/community}/api/updateCommunity.d.ts.map +0 -0
- package/dist/community/events/index.d.ts +6 -0
- package/{community → dist/community}/events/index.d.ts.map +0 -0
- package/dist/community/events/onCommunityCreated.d.ts +17 -0
- package/{community → dist/community}/events/onCommunityCreated.d.ts.map +0 -0
- package/dist/community/events/onCommunityDeleted.d.ts +17 -0
- package/{community → dist/community}/events/onCommunityDeleted.d.ts.map +0 -0
- package/dist/community/events/onCommunityJoined.d.ts +17 -0
- package/{community → dist/community}/events/onCommunityJoined.d.ts.map +0 -0
- package/dist/community/events/onCommunityLeft.d.ts +17 -0
- package/{community → dist/community}/events/onCommunityLeft.d.ts.map +0 -0
- package/dist/community/events/onCommunityUpdated.d.ts +17 -0
- package/{community → dist/community}/events/onCommunityUpdated.d.ts.map +0 -0
- package/dist/community/observers/index.d.ts +2 -0
- package/{community → dist/community}/observers/index.d.ts.map +0 -0
- package/dist/community/observers/observeCommunity.d.ts +20 -0
- package/{community → dist/community}/observers/observeCommunity.d.ts.map +0 -0
- package/dist/core/cache/drop.d.ts +11 -0
- package/{core → dist/core}/cache/drop.d.ts.map +0 -0
- package/dist/core/cache/index.d.ts +19 -0
- package/{core → dist/core}/cache/index.d.ts.map +0 -0
- package/dist/core/cache/ingest.d.ts +10 -0
- package/{core → dist/core}/cache/ingest.d.ts.map +0 -0
- package/dist/core/cache/merge.d.ts +10 -0
- package/{core → dist/core}/cache/merge.d.ts.map +0 -0
- package/dist/core/cache/mutate.d.ts +10 -0
- package/{core → dist/core}/cache/mutate.d.ts.map +0 -0
- package/dist/core/cache/pull.d.ts +11 -0
- package/{core → dist/core}/cache/pull.d.ts.map +0 -0
- package/dist/core/cache/push.d.ts +10 -0
- package/{core → dist/core}/cache/push.d.ts.map +0 -0
- package/dist/core/cache/sync.d.ts +10 -0
- package/{core → dist/core}/cache/sync.d.ts.map +0 -0
- package/dist/core/debug.d.ts +15 -0
- package/{core → dist/core}/debug.d.ts.map +0 -0
- package/dist/core/device.d.ts +7 -0
- package/{core → dist/core}/device.d.ts.map +0 -0
- package/dist/core/errors.d.ts +59 -0
- package/{core → dist/core}/errors.d.ts.map +0 -0
- package/dist/core/events.d.ts +33 -0
- package/{core → dist/core}/events.d.ts.map +0 -0
- package/dist/core/model/idResolvers.d.ts +20 -0
- package/dist/core/model/idResolvers.d.ts.map +1 -0
- package/dist/core/model/identifyModel.d.ts +8 -0
- package/dist/core/model/identifyModel.d.ts.map +1 -0
- package/dist/core/model/index.d.ts +4 -0
- package/{core → dist/core}/model/index.d.ts.map +0 -0
- package/dist/core/model/toRecord.d.ts +10 -0
- package/{core → dist/core}/model/toRecord.d.ts.map +0 -0
- package/dist/core/query/decorate.d.ts +23 -0
- package/dist/core/query/decorate.d.ts.map +1 -0
- package/dist/core/query/filtering.d.ts +12 -0
- package/{core → dist/core}/query/filtering.d.ts.map +0 -0
- package/dist/core/query/index.d.ts +6 -0
- package/{core → dist/core}/query/index.d.ts.map +0 -0
- package/dist/core/query/paging.d.ts +58 -0
- package/dist/core/query/paging.d.ts.map +1 -0
- package/dist/core/query/query.d.ts +121 -0
- package/dist/core/query/query.d.ts.map +1 -0
- package/dist/core/query/sorting.d.ts +39 -0
- package/dist/core/query/sorting.d.ts.map +1 -0
- package/dist/core/stores/index.d.ts +3 -0
- package/{core → dist/core}/stores/index.d.ts.map +0 -0
- package/dist/core/stores/memory.d.ts +30 -0
- package/dist/core/stores/memory.d.ts.map +1 -0
- package/dist/core/stores/persistent.d.ts +13 -0
- package/{core → dist/core}/stores/persistent.d.ts.map +0 -0
- package/dist/core/transports.d.ts +49 -0
- package/dist/core/transports.d.ts.map +1 -0
- package/dist/core/uuid.d.ts +2 -0
- package/{core → dist/core}/uuid.d.ts.map +0 -0
- package/dist/feed/api/index.d.ts +2 -0
- package/{feed → dist/feed}/api/index.d.ts.map +0 -0
- package/dist/feed/api/queryGlobalFeed.d.ts +23 -0
- package/{feed → dist/feed}/api/queryGlobalFeed.d.ts.map +0 -0
- package/dist/file/api/createFile.d.ts +16 -0
- package/dist/file/api/createFile.d.ts.map +1 -0
- package/dist/file/api/deleteFile.d.ts +16 -0
- package/{file → dist/file}/api/deleteFile.d.ts.map +0 -0
- package/dist/file/api/fileUrlWithSize.d.ts +9 -0
- package/dist/file/api/fileUrlWithSize.d.ts.map +1 -0
- package/dist/file/api/getFile.d.ts +32 -0
- package/{file → dist/file}/api/getFile.d.ts.map +0 -0
- package/dist/file/api/index.d.ts +5 -0
- package/{file → dist/file}/api/index.d.ts.map +0 -0
- package/dist/file/observers/index.d.ts +2 -0
- package/{file → dist/file}/observers/index.d.ts.map +0 -0
- package/dist/file/observers/observeFile.d.ts +20 -0
- package/{file → dist/file}/observers/observeFile.d.ts.map +0 -0
- package/dist/index.cjs.js +4884 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +4734 -0
- package/dist/index.umd.js +4880 -0
- package/dist/message/api/createMessage.d.ts +38 -0
- package/{message → dist/message}/api/createMessage.d.ts.map +0 -0
- package/dist/message/api/deleteMessage.d.ts +32 -0
- package/{message → dist/message}/api/deleteMessage.d.ts.map +0 -0
- package/dist/message/api/getMessage.d.ts +32 -0
- package/{message → dist/message}/api/getMessage.d.ts.map +0 -0
- package/dist/message/api/getMessages.d.ts +32 -0
- package/{message → dist/message}/api/getMessages.d.ts.map +0 -0
- package/dist/message/api/index.d.ts +7 -0
- package/{message → dist/message}/api/index.d.ts.map +0 -0
- package/dist/message/api/queryMessages.d.ts +55 -0
- package/{message → dist/message}/api/queryMessages.d.ts.map +0 -0
- package/dist/message/api/updateMessage.d.ts +38 -0
- package/{message → dist/message}/api/updateMessage.d.ts.map +0 -0
- package/dist/message/events/index.d.ts +4 -0
- package/{message → dist/message}/events/index.d.ts.map +0 -0
- package/dist/message/events/onMessageCreated.d.ts +17 -0
- package/{message → dist/message}/events/onMessageCreated.d.ts.map +0 -0
- package/dist/message/events/onMessageDeleted.d.ts +17 -0
- package/{message → dist/message}/events/onMessageDeleted.d.ts.map +0 -0
- package/dist/message/events/onMessageUpdated.d.ts +17 -0
- package/{message → dist/message}/events/onMessageUpdated.d.ts.map +0 -0
- package/dist/message/observers/index.d.ts +3 -0
- package/{message → dist/message}/observers/index.d.ts.map +0 -0
- package/dist/message/observers/observeMessage.d.ts +22 -0
- package/{message → dist/message}/observers/observeMessage.d.ts.map +0 -0
- package/dist/message/observers/observeMessages.d.ts +19 -0
- package/{message → dist/message}/observers/observeMessages.d.ts.map +0 -0
- package/dist/post/api/createPost.d.ts +21 -0
- package/{post → dist/post}/api/createPost.d.ts.map +0 -0
- package/dist/post/api/deletePost.d.ts +16 -0
- package/{post → dist/post}/api/deletePost.d.ts.map +0 -0
- package/dist/post/api/getPost.d.ts +32 -0
- package/{post → dist/post}/api/getPost.d.ts.map +0 -0
- package/dist/post/api/getPosts.d.ts +32 -0
- package/{post → dist/post}/api/getPosts.d.ts.map +0 -0
- package/dist/post/api/index.d.ts +7 -0
- package/{post → dist/post}/api/index.d.ts.map +0 -0
- package/dist/post/api/queryPosts.d.ts +47 -0
- package/dist/post/api/queryPosts.d.ts.map +1 -0
- package/dist/post/api/updatePost.d.ts +19 -0
- package/{post → dist/post}/api/updatePost.d.ts.map +0 -0
- package/dist/post/events/index.d.ts +4 -0
- package/{post → dist/post}/events/index.d.ts.map +0 -0
- package/dist/post/events/onPostCreated.d.ts +17 -0
- package/{post → dist/post}/events/onPostCreated.d.ts.map +0 -0
- package/dist/post/events/onPostDeleted.d.ts +17 -0
- package/{post → dist/post}/events/onPostDeleted.d.ts.map +0 -0
- package/dist/post/events/onPostUpdated.d.ts +17 -0
- package/{post → dist/post}/events/onPostUpdated.d.ts.map +0 -0
- package/dist/post/observers/index.d.ts +3 -0
- package/{post → dist/post}/observers/index.d.ts.map +0 -0
- package/dist/post/observers/observePost.d.ts +20 -0
- package/{post → dist/post}/observers/observePost.d.ts.map +0 -0
- package/dist/post/observers/observePosts.d.ts +25 -0
- package/dist/post/observers/observePosts.d.ts.map +1 -0
- package/dist/reaction/api/addReaction.d.ts +36 -0
- package/{reaction → dist/reaction}/api/addReaction.d.ts.map +0 -0
- package/dist/reaction/api/index.d.ts +3 -0
- package/{reaction → dist/reaction}/api/index.d.ts.map +0 -0
- package/dist/reaction/api/removeReaction.d.ts +36 -0
- package/{reaction → dist/reaction}/api/removeReaction.d.ts.map +0 -0
- package/dist/reaction/events/index.d.ts +2 -0
- package/{reaction → dist/reaction}/events/index.d.ts.map +0 -0
- package/dist/reaction/events/onReactionAdded.d.ts +17 -0
- package/{reaction → dist/reaction}/events/onReactionAdded.d.ts.map +0 -0
- package/dist/reaction/events/onReactionRemoved.d.ts +17 -0
- package/{reaction → dist/reaction}/events/onReactionRemoved.d.ts.map +0 -0
- package/dist/reaction/utils/dispatchReactable.d.ts +3 -0
- package/{reaction → dist/reaction}/utils/dispatchReactable.d.ts.map +0 -0
- package/dist/reaction/utils/fetchReference.d.ts +3 -0
- package/{reaction → dist/reaction}/utils/fetchReference.d.ts.map +0 -0
- package/dist/reaction/utils/index.d.ts +3 -0
- package/{reaction → dist/reaction}/utils/index.d.ts.map +0 -0
- package/dist/report/api/createReport.d.ts +16 -0
- package/{report → dist/report}/api/createReport.d.ts.map +0 -0
- package/dist/report/api/deleteReport.d.ts +16 -0
- package/{report → dist/report}/api/deleteReport.d.ts.map +0 -0
- package/dist/report/api/index.d.ts +4 -0
- package/{report → dist/report}/api/index.d.ts.map +0 -0
- package/dist/report/api/isReportedByMe.d.ts +16 -0
- package/{report → dist/report}/api/isReportedByMe.d.ts.map +0 -0
- package/dist/report/constants/referenceTypes.d.ts +24 -0
- package/{report → dist/report}/constants/referenceTypes.d.ts.map +0 -0
- package/dist/role/api/getRole.d.ts +32 -0
- package/dist/role/api/getRole.d.ts.map +1 -0
- package/dist/role/api/index.d.ts +3 -0
- package/dist/role/api/index.d.ts.map +1 -0
- package/dist/role/api/queryRoles.d.ts +42 -0
- package/dist/role/api/queryRoles.d.ts.map +1 -0
- package/dist/stream/api/createStream.d.ts +18 -0
- package/{stream → dist/stream}/api/createStream.d.ts.map +0 -0
- package/dist/stream/api/deleteStream.d.ts +16 -0
- package/{stream → dist/stream}/api/deleteStream.d.ts.map +0 -0
- package/dist/stream/api/getStream.d.ts +12 -0
- package/{stream → dist/stream}/api/getStream.d.ts.map +0 -0
- package/dist/stream/api/index.d.ts +6 -0
- package/{stream → dist/stream}/api/index.d.ts.map +0 -0
- package/dist/stream/api/queryStreams.d.ts +23 -0
- package/{stream → dist/stream}/api/queryStreams.d.ts.map +0 -0
- package/dist/stream/api/updateStream.d.ts +17 -0
- package/{stream → dist/stream}/api/updateStream.d.ts.map +0 -0
- package/dist/stream/events/index.d.ts +4 -0
- package/{stream → dist/stream}/events/index.d.ts.map +0 -0
- package/dist/stream/events/onStreamRecorded.d.ts +17 -0
- package/{stream → dist/stream}/events/onStreamRecorded.d.ts.map +0 -0
- package/dist/stream/events/onStreamStarted.d.ts +17 -0
- package/{stream → dist/stream}/events/onStreamStarted.d.ts.map +0 -0
- package/dist/stream/events/onStreamStopped.d.ts +17 -0
- package/{stream → dist/stream}/events/onStreamStopped.d.ts.map +0 -0
- package/dist/user/api/getUser.d.ts +32 -0
- package/{user → dist/user}/api/getUser.d.ts.map +0 -0
- package/dist/user/api/getUsers.d.ts +32 -0
- package/{user → dist/user}/api/getUsers.d.ts.map +0 -0
- package/dist/user/api/index.d.ts +5 -0
- package/{user → dist/user}/api/index.d.ts.map +0 -0
- package/dist/user/api/queryUsers.d.ts +43 -0
- package/dist/user/api/queryUsers.d.ts.map +1 -0
- package/dist/user/api/updateUser.d.ts +17 -0
- package/{user → dist/user}/api/updateUser.d.ts.map +0 -0
- package/dist/user/events/index.d.ts +2 -0
- package/{user → dist/user}/events/index.d.ts.map +0 -0
- package/dist/user/events/onUserUpdated.d.ts +17 -0
- package/{user → dist/user}/events/onUserUpdated.d.ts.map +0 -0
- package/dist/user/observers/index.d.ts +2 -0
- package/{user → dist/user}/observers/index.d.ts.map +0 -0
- package/dist/user/observers/observeUser.d.ts +19 -0
- package/{user → dist/user}/observers/observeUser.d.ts.map +0 -0
- package/package.json +41 -10
- package/rollup.config.js +41 -0
- package/src/@types/core/cache.ts +22 -0
- package/src/@types/core/errors.ts +34 -0
- package/src/@types/core/events.ts +60 -0
- package/src/@types/core/model.ts +51 -0
- package/src/@types/core/payload.ts +102 -0
- package/src/@types/core/permissions.ts +76 -0
- package/src/@types/core/query.ts +95 -0
- package/src/@types/core/store.ts +52 -0
- package/src/@types/core/transport.ts +32 -0
- package/src/@types/domains/category.ts +15 -0
- package/src/@types/domains/channel.ts +38 -0
- package/src/@types/domains/client.ts +36 -0
- package/src/@types/domains/comment.ts +26 -0
- package/src/@types/domains/community.ts +35 -0
- package/src/@types/domains/content.ts +35 -0
- package/src/@types/domains/feed.ts +16 -0
- package/src/@types/domains/file.ts +41 -0
- package/src/@types/domains/group.ts +38 -0
- package/src/@types/domains/message.ts +27 -0
- package/src/@types/domains/partials.ts +52 -0
- package/src/@types/domains/post.ts +31 -0
- package/src/@types/domains/reaction.ts +30 -0
- package/src/@types/domains/stream.ts +57 -0
- package/src/@types/domains/user.ts +18 -0
- package/src/@types/global.ts +25 -0
- package/src/@types/index.ts +31 -0
- package/src/category/api/getCategory.ts +35 -0
- package/src/category/api/index.ts +2 -0
- package/src/category/api/queryCategories.ts +49 -0
- package/src/channel/api/addChannelMembers.ts +45 -0
- package/src/channel/api/addChannelMembersRole.ts +43 -0
- package/src/channel/api/createChannel.ts +37 -0
- package/src/channel/api/deleteChannel.ts +34 -0
- package/src/channel/api/getChannel.ts +59 -0
- package/src/channel/api/getChannels.ts +63 -0
- package/src/channel/api/index.ts +18 -0
- package/src/channel/api/joinChannel.ts +38 -0
- package/src/channel/api/leaveChannel.ts +38 -0
- package/src/channel/api/queryChannelMembers.ts +79 -0
- package/src/channel/api/queryChannels.ts +88 -0
- package/src/channel/api/removeChannelMembers.ts +45 -0
- package/src/channel/api/removeChannelMembersRole.ts +43 -0
- package/src/channel/api/updateChannel.ts +38 -0
- package/src/channel/events/index.ts +6 -0
- package/src/channel/events/onChannelCreated.ts +37 -0
- package/src/channel/events/onChannelDeleted.ts +37 -0
- package/src/channel/events/onChannelJoined.ts +37 -0
- package/src/channel/events/onChannelLeft.ts +37 -0
- package/src/channel/events/onChannelUpdated.ts +37 -0
- package/src/channel/events/onMemberAdded.ts +37 -0
- package/src/channel/events/onMemberRemoved.ts +37 -0
- package/src/channel/observers/index.ts +1 -0
- package/src/channel/observers/observeChannel.ts +80 -0
- package/src/client/api/activeClient.ts +33 -0
- package/src/client/api/clearCache.ts +23 -0
- package/src/client/api/connectClient.ts +63 -0
- package/src/client/api/createClient.ts +56 -0
- package/src/client/api/disconnectClient.ts +31 -0
- package/src/client/api/enableCache.ts +35 -0
- package/src/client/api/getToken.ts +35 -0
- package/src/client/api/index.ts +7 -0
- package/src/client/api/isConnected.ts +24 -0
- package/src/client/events/index.ts +1 -0
- package/src/client/events/onClientDisconnected.ts +29 -0
- package/src/comment/api/createComment.ts +43 -0
- package/src/comment/api/deleteComment.ts +40 -0
- package/src/comment/api/getComment.ts +59 -0
- package/src/comment/api/getComments.ts +63 -0
- package/src/comment/api/index.ts +7 -0
- package/src/comment/api/queryComments.ts +169 -0
- package/src/comment/api/updateComment.ts +41 -0
- package/src/comment/events/index.ts +3 -0
- package/src/comment/events/onCommentCreated.ts +39 -0
- package/src/comment/events/onCommentDeleted.ts +39 -0
- package/src/comment/events/onCommentUpdated.ts +39 -0
- package/src/comment/observers/index.ts +2 -0
- package/src/comment/observers/observeComment.ts +73 -0
- package/src/comment/observers/observeComments.ts +61 -0
- package/src/community/api/addCommunityMembers.ts +46 -0
- package/src/community/api/addCommunityMembersRole.ts +43 -0
- package/src/community/api/createCommunity.ts +43 -0
- package/src/community/api/deleteCommunity.ts +35 -0
- package/src/community/api/getCommunities.ts +63 -0
- package/src/community/api/getCommunity.ts +58 -0
- package/src/community/api/index.ts +17 -0
- package/src/community/api/joinCommunity.ts +41 -0
- package/src/community/api/leaveCommunity.ts +41 -0
- package/src/community/api/queryCommunities.ts +92 -0
- package/src/community/api/queryCommunityMembers.ts +78 -0
- package/src/community/api/removeCommunityMembers.ts +46 -0
- package/src/community/api/removeCommunityMembersRole.ts +43 -0
- package/src/community/api/updateCommunity.ts +40 -0
- package/src/community/events/index.ts +6 -0
- package/src/community/events/onCommunityCreated.ts +37 -0
- package/src/community/events/onCommunityDeleted.ts +37 -0
- package/src/community/events/onCommunityJoined.ts +37 -0
- package/src/community/events/onCommunityLeft.ts +37 -0
- package/src/community/events/onCommunityUpdated.ts +37 -0
- package/src/community/observers/index.ts +1 -0
- package/src/community/observers/observeCommunity.ts +74 -0
- package/src/core/cache/drop.ts +24 -0
- package/src/core/cache/index.ts +24 -0
- package/src/core/cache/ingest.ts +24 -0
- package/src/core/cache/merge.ts +19 -0
- package/src/core/cache/mutate.ts +25 -0
- package/src/core/cache/pull.ts +31 -0
- package/src/core/cache/push.ts +41 -0
- package/src/core/cache/sync.ts +41 -0
- package/src/core/debug.ts +26 -0
- package/src/core/device.ts +38 -0
- package/src/core/errors.ts +85 -0
- package/src/core/events.ts +93 -0
- package/src/core/model/idResolvers.ts +66 -0
- package/src/core/model/identifyModel.ts +32 -0
- package/src/core/model/index.ts +3 -0
- package/src/core/model/toRecord.ts +11 -0
- package/src/core/query/decorate.ts +64 -0
- package/src/core/query/filtering.ts +17 -0
- package/src/core/query/index.ts +5 -0
- package/src/core/query/paging.ts +166 -0
- package/src/core/query/query.ts +300 -0
- package/src/core/query/sorting.ts +50 -0
- package/src/core/stores/index.ts +2 -0
- package/src/core/stores/memory.ts +59 -0
- package/src/core/stores/persistent.ts +63 -0
- package/src/core/transports.ts +157 -0
- package/src/core/uuid.ts +2 -0
- package/src/feed/api/index.ts +1 -0
- package/src/feed/api/queryGlobalFeed.ts +50 -0
- package/src/file/api/createFile.ts +51 -0
- package/src/file/api/deleteFile.ts +35 -0
- package/src/file/api/fileUrlWithSize.ts +13 -0
- package/src/file/api/getFile.ts +60 -0
- package/src/file/api/index.ts +4 -0
- package/src/file/observers/index.ts +1 -0
- package/src/file/observers/observeFile.ts +57 -0
- package/src/index.ts +55 -0
- package/src/message/api/createMessage.ts +90 -0
- package/src/message/api/deleteMessage.ts +75 -0
- package/src/message/api/getMessage.ts +60 -0
- package/src/message/api/getMessages.ts +63 -0
- package/src/message/api/index.ts +6 -0
- package/src/message/api/queryMessages.ts +145 -0
- package/src/message/api/updateMessage.ts +79 -0
- package/src/message/events/index.ts +3 -0
- package/src/message/events/onMessageCreated.ts +39 -0
- package/src/message/events/onMessageDeleted.ts +39 -0
- package/src/message/events/onMessageUpdated.ts +39 -0
- package/src/message/observers/index.ts +2 -0
- package/src/message/observers/observeMessage.ts +76 -0
- package/src/message/observers/observeMessages.ts +60 -0
- package/src/post/api/createPost.ts +45 -0
- package/src/post/api/deletePost.ts +43 -0
- package/src/post/api/getPost.ts +60 -0
- package/src/post/api/getPosts.ts +63 -0
- package/src/post/api/index.ts +7 -0
- package/src/post/api/queryPosts.ts +88 -0
- package/src/post/api/updatePost.ts +42 -0
- package/src/post/events/index.ts +3 -0
- package/src/post/events/onPostCreated.ts +39 -0
- package/src/post/events/onPostDeleted.ts +39 -0
- package/src/post/events/onPostUpdated.ts +39 -0
- package/src/post/observers/index.ts +2 -0
- package/src/post/observers/observePost.ts +72 -0
- package/src/post/observers/observePosts.ts +66 -0
- package/src/reaction/api/addReaction.ts +84 -0
- package/src/reaction/api/index.ts +2 -0
- package/src/reaction/api/removeReaction.ts +84 -0
- package/src/reaction/events/index.ts +1 -0
- package/src/reaction/events/onReactionAdded.ts +43 -0
- package/src/reaction/events/onReactionRemoved.ts +41 -0
- package/src/reaction/utils/dispatchReactable.ts +19 -0
- package/src/reaction/utils/fetchReference.ts +18 -0
- package/src/reaction/utils/index.ts +2 -0
- package/src/report/api/createReport.ts +40 -0
- package/src/report/api/deleteReport.ts +40 -0
- package/src/report/api/index.ts +4 -0
- package/src/report/api/isReportedByMe.ts +37 -0
- package/src/report/constants/referenceTypes.ts +22 -0
- package/src/role/api/getRole.ts +53 -0
- package/src/role/api/index.ts +2 -0
- package/src/role/api/queryRoles.ts +79 -0
- package/src/stream/api/createStream.ts +33 -0
- package/src/stream/api/deleteStream.ts +38 -0
- package/src/stream/api/getStream.ts +29 -0
- package/src/stream/api/index.ts +7 -0
- package/src/stream/api/queryStreams.ts +44 -0
- package/src/stream/api/updateStream.ts +36 -0
- package/src/stream/events/index.ts +3 -0
- package/src/stream/events/onStreamRecorded.ts +39 -0
- package/src/stream/events/onStreamStarted.ts +39 -0
- package/src/stream/events/onStreamStopped.ts +39 -0
- package/src/user/api/getUser.ts +59 -0
- package/src/user/api/getUsers.ts +60 -0
- package/src/user/api/index.ts +5 -0
- package/src/user/api/queryUsers.ts +88 -0
- package/src/user/api/updateUser.ts +44 -0
- package/src/user/events/index.ts +1 -0
- package/src/user/events/onUserUpdated.ts +39 -0
- package/src/user/observers/index.ts +1 -0
- package/src/user/observers/observeUser.ts +64 -0
- package/tsconfig.json +28 -0
- package/@types/core/cache.d.ts +0 -21
- package/@types/core/cache.js +0 -1
- package/@types/core/errors.d.ts +0 -32
- package/@types/core/errors.js +0 -1
- package/@types/core/events.d.ts +0 -46
- package/@types/core/events.js +0 -1
- package/@types/core/model.d.ts +0 -35
- package/@types/core/model.d.ts.map +0 -1
- package/@types/core/model.js +0 -1
- package/@types/core/payload.d.ts +0 -84
- package/@types/core/payload.d.ts.map +0 -1
- package/@types/core/payload.js +0 -1
- package/@types/core/permissions.d.ts +0 -71
- package/@types/core/permissions.d.ts.map +0 -1
- package/@types/core/permissions.js +0 -1
- package/@types/core/query.d.ts +0 -71
- package/@types/core/query.d.ts.map +0 -1
- package/@types/core/query.js +0 -1
- package/@types/core/store.d.ts +0 -46
- package/@types/core/store.js +0 -1
- package/@types/core/transport.d.ts +0 -27
- package/@types/core/transport.js +0 -1
- package/@types/domains/category.d.ts +0 -11
- package/@types/domains/category.js +0 -1
- package/@types/domains/channel.d.ts +0 -26
- package/@types/domains/channel.js +0 -1
- package/@types/domains/client.d.ts +0 -31
- package/@types/domains/client.js +0 -1
- package/@types/domains/comment.d.ts +0 -17
- package/@types/domains/comment.js +0 -1
- package/@types/domains/community.d.ts +0 -24
- package/@types/domains/community.d.ts.map +0 -1
- package/@types/domains/community.js +0 -1
- package/@types/domains/content.d.ts +0 -26
- package/@types/domains/content.js +0 -1
- package/@types/domains/feed.d.ts +0 -14
- package/@types/domains/feed.js +0 -1
- package/@types/domains/file.d.ts +0 -29
- package/@types/domains/file.js +0 -1
- package/@types/domains/group.d.ts +0 -26
- package/@types/domains/group.d.ts.map +0 -1
- package/@types/domains/group.js +0 -1
- package/@types/domains/message.d.ts +0 -16
- package/@types/domains/message.js +0 -1
- package/@types/domains/partials.d.ts +0 -42
- package/@types/domains/partials.js +0 -1
- package/@types/domains/post.d.ts +0 -20
- package/@types/domains/post.d.ts.map +0 -1
- package/@types/domains/post.js +0 -1
- package/@types/domains/reaction.d.ts +0 -24
- package/@types/domains/reaction.js +0 -1
- package/@types/domains/stream.d.ts +0 -47
- package/@types/domains/stream.js +0 -1
- package/@types/domains/user.d.ts +0 -12
- package/@types/domains/user.js +0 -1
- package/@types/global.d.ts +0 -13
- package/@types/global.js +0 -1
- package/@types/index.d.ts +0 -23
- package/@types/index.js +0 -23
- package/category/api/getCategory.d.ts +0 -16
- package/category/api/getCategory.js +0 -26
- package/category/api/index.d.ts +0 -3
- package/category/api/index.js +0 -2
- package/category/api/queryCategories.d.ts +0 -23
- package/category/api/queryCategories.js +0 -44
- package/channel/api/createChannel.d.ts +0 -18
- package/channel/api/createChannel.d.ts.map +0 -1
- package/channel/api/createChannel.js +0 -27
- package/channel/api/deleteChannel.d.ts +0 -16
- package/channel/api/deleteChannel.js +0 -25
- package/channel/api/getChannel.d.ts +0 -32
- package/channel/api/getChannel.js +0 -47
- package/channel/api/getChannels.d.ts +0 -32
- package/channel/api/getChannels.js +0 -49
- package/channel/api/index.d.ts +0 -9
- package/channel/api/index.d.ts.map +0 -1
- package/channel/api/index.js +0 -8
- package/channel/api/joinChannel.d.ts +0 -16
- package/channel/api/joinChannel.js +0 -28
- package/channel/api/leaveChannel.d.ts +0 -16
- package/channel/api/leaveChannel.js +0 -28
- package/channel/api/queryChannels.d.ts +0 -42
- package/channel/api/queryChannels.d.ts.map +0 -1
- package/channel/api/queryChannels.js +0 -65
- package/channel/api/updateChannel.d.ts +0 -17
- package/channel/api/updateChannel.js +0 -28
- package/channel/events/index.d.ts +0 -7
- package/channel/events/index.js +0 -6
- package/channel/events/onChannelCreated.d.ts +0 -17
- package/channel/events/onChannelCreated.js +0 -28
- package/channel/events/onChannelDeleted.d.ts +0 -17
- package/channel/events/onChannelDeleted.js +0 -28
- package/channel/events/onChannelJoined.d.ts +0 -17
- package/channel/events/onChannelJoined.js +0 -28
- package/channel/events/onChannelLeft.d.ts +0 -17
- package/channel/events/onChannelLeft.js +0 -28
- package/channel/events/onChannelUpdated.d.ts +0 -17
- package/channel/events/onChannelUpdated.js +0 -28
- package/channel/events/onMemberAdded.d.ts +0 -17
- package/channel/events/onMemberAdded.js +0 -28
- package/channel/events/onMemberRemoved.d.ts +0 -17
- package/channel/events/onMemberRemoved.js +0 -28
- package/channel/observers/index.d.ts +0 -2
- package/channel/observers/index.js +0 -1
- package/channel/observers/observeChannel.d.ts +0 -20
- package/channel/observers/observeChannel.js +0 -44
- package/client/api/activeClient.d.ts +0 -17
- package/client/api/activeClient.js +0 -25
- package/client/api/connectClient.d.ts +0 -26
- package/client/api/connectClient.d.ts.map +0 -1
- package/client/api/connectClient.js +0 -48
- package/client/api/createClient.d.ts +0 -17
- package/client/api/createClient.js +0 -40
- package/client/api/disconnectClient.d.ts +0 -16
- package/client/api/disconnectClient.js +0 -27
- package/client/api/enableCache.d.ts +0 -15
- package/client/api/enableCache.d.ts.map +0 -1
- package/client/api/enableCache.js +0 -20
- package/client/api/getToken.d.ts +0 -19
- package/client/api/getToken.js +0 -23
- package/client/api/index.d.ts +0 -7
- package/client/api/index.d.ts.map +0 -1
- package/client/api/index.js +0 -6
- package/client/api/isConnected.d.ts +0 -14
- package/client/api/isConnected.js +0 -21
- package/client/events/index.d.ts +0 -2
- package/client/events/index.js +0 -1
- package/client/events/onClientDisconnected.d.ts +0 -17
- package/client/events/onClientDisconnected.js +0 -20
- package/comment/api/createComment.d.ts +0 -18
- package/comment/api/createComment.d.ts.map +0 -1
- package/comment/api/createComment.js +0 -43
- package/comment/api/deleteComment.d.ts +0 -16
- package/comment/api/deleteComment.js +0 -29
- package/comment/api/getComment.d.ts +0 -32
- package/comment/api/getComment.js +0 -47
- package/comment/api/getComments.d.ts +0 -32
- package/comment/api/getComments.js +0 -49
- package/comment/api/index.d.ts +0 -7
- package/comment/api/index.js +0 -6
- package/comment/api/queryComments.d.ts +0 -42
- package/comment/api/queryComments.d.ts.map +0 -1
- package/comment/api/queryComments.js +0 -72
- package/comment/api/updateComment.d.ts +0 -19
- package/comment/api/updateComment.js +0 -31
- package/comment/events/index.d.ts +0 -4
- package/comment/events/index.js +0 -3
- package/comment/events/onCommentCreated.d.ts +0 -17
- package/comment/events/onCommentCreated.js +0 -28
- package/comment/events/onCommentDeleted.d.ts +0 -17
- package/comment/events/onCommentDeleted.js +0 -28
- package/comment/events/onCommentUpdated.d.ts +0 -17
- package/comment/events/onCommentUpdated.js +0 -28
- package/comment/observers/index.d.ts +0 -3
- package/comment/observers/index.js +0 -2
- package/comment/observers/observeComment.d.ts +0 -20
- package/comment/observers/observeComment.js +0 -44
- package/comment/observers/observeComments.d.ts +0 -22
- package/comment/observers/observeComments.js +0 -38
- package/community/api/createCommunity.d.ts +0 -20
- package/community/api/createCommunity.js +0 -28
- package/community/api/deleteCommunity.d.ts +0 -16
- package/community/api/deleteCommunity.js +0 -26
- package/community/api/getCommunities.d.ts +0 -32
- package/community/api/getCommunities.js +0 -49
- package/community/api/getCommunity.d.ts +0 -32
- package/community/api/getCommunity.d.ts.map +0 -1
- package/community/api/getCommunity.js +0 -47
- package/community/api/index.d.ts +0 -9
- package/community/api/index.d.ts.map +0 -1
- package/community/api/index.js +0 -8
- package/community/api/joinCommunity.d.ts +0 -16
- package/community/api/joinCommunity.js +0 -31
- package/community/api/leaveCommunity.d.ts +0 -16
- package/community/api/leaveCommunity.js +0 -31
- package/community/api/queryCommunities.d.ts +0 -46
- package/community/api/queryCommunities.js +0 -68
- package/community/api/updateCommunity.d.ts +0 -17
- package/community/api/updateCommunity.js +0 -29
- package/community/events/index.d.ts +0 -6
- package/community/events/index.js +0 -5
- package/community/events/onCommunityCreated.d.ts +0 -17
- package/community/events/onCommunityCreated.js +0 -28
- package/community/events/onCommunityDeleted.d.ts +0 -17
- package/community/events/onCommunityDeleted.js +0 -28
- package/community/events/onCommunityJoined.d.ts +0 -17
- package/community/events/onCommunityJoined.js +0 -28
- package/community/events/onCommunityLeft.d.ts +0 -17
- package/community/events/onCommunityLeft.js +0 -28
- package/community/events/onCommunityUpdated.d.ts +0 -17
- package/community/events/onCommunityUpdated.js +0 -28
- package/community/observers/index.d.ts +0 -2
- package/community/observers/index.js +0 -1
- package/community/observers/observeCommunity.d.ts +0 -20
- package/community/observers/observeCommunity.js +0 -44
- package/core/cache/drop.d.ts +0 -11
- package/core/cache/drop.js +0 -21
- package/core/cache/index.d.ts +0 -19
- package/core/cache/index.js +0 -21
- package/core/cache/ingest.d.ts +0 -10
- package/core/cache/ingest.js +0 -19
- package/core/cache/merge.d.ts +0 -10
- package/core/cache/merge.js +0 -14
- package/core/cache/mutate.d.ts +0 -10
- package/core/cache/mutate.js +0 -19
- package/core/cache/pull.d.ts +0 -11
- package/core/cache/pull.js +0 -28
- package/core/cache/push.d.ts +0 -10
- package/core/cache/push.js +0 -30
- package/core/cache/sync.d.ts +0 -10
- package/core/cache/sync.js +0 -31
- package/core/debug.d.ts +0 -15
- package/core/debug.js +0 -20
- package/core/device.d.ts +0 -7
- package/core/device.js +0 -32
- package/core/errors.d.ts +0 -59
- package/core/errors.js +0 -70
- package/core/events.d.ts +0 -33
- package/core/events.js +0 -72
- package/core/model/createPayload.d.ts +0 -1
- package/core/model/createPayload.d.ts.map +0 -1
- package/core/model/createPayload.js +0 -1
- package/core/model/idResolvers.d.ts +0 -20
- package/core/model/idResolvers.d.ts.map +0 -1
- package/core/model/idResolvers.js +0 -36
- package/core/model/identifyModel.d.ts +0 -8
- package/core/model/identifyModel.d.ts.map +0 -1
- package/core/model/identifyModel.js +0 -28
- package/core/model/index.d.ts +0 -4
- package/core/model/index.js +0 -3
- package/core/model/toRecord.d.ts +0 -10
- package/core/model/toRecord.js +0 -9
- package/core/query/decorate.d.ts +0 -23
- package/core/query/decorate.d.ts.map +0 -1
- package/core/query/decorate.js +0 -40
- package/core/query/filtering.d.ts +0 -12
- package/core/query/filtering.js +0 -14
- package/core/query/index.d.ts +0 -6
- package/core/query/index.js +0 -5
- package/core/query/paging.d.ts +0 -58
- package/core/query/paging.d.ts.map +0 -1
- package/core/query/paging.js +0 -140
- package/core/query/query.d.ts +0 -121
- package/core/query/query.d.ts.map +0 -1
- package/core/query/query.js +0 -221
- package/core/query/sorting.d.ts +0 -33
- package/core/query/sorting.d.ts.map +0 -1
- package/core/query/sorting.js +0 -27
- package/core/stores/index.d.ts +0 -3
- package/core/stores/index.js +0 -2
- package/core/stores/memory.d.ts +0 -30
- package/core/stores/memory.d.ts.map +0 -1
- package/core/stores/memory.js +0 -47
- package/core/stores/persistent.d.ts +0 -13
- package/core/stores/persistent.js +0 -49
- package/core/transports.d.ts +0 -49
- package/core/transports.d.ts.map +0 -1
- package/core/transports.js +0 -130
- package/core/uuid.d.ts +0 -2
- package/core/uuid.js +0 -2
- package/feed/api/index.d.ts +0 -2
- package/feed/api/index.js +0 -1
- package/feed/api/queryGlobalFeed.d.ts +0 -23
- package/feed/api/queryGlobalFeed.js +0 -44
- package/file/api/createFile.d.ts +0 -16
- package/file/api/createFile.d.ts.map +0 -1
- package/file/api/createFile.js +0 -37
- package/file/api/deleteFile.d.ts +0 -16
- package/file/api/deleteFile.js +0 -25
- package/file/api/fileUrlwithSize.d.ts +0 -9
- package/file/api/fileUrlwithSize.d.ts.map +0 -1
- package/file/api/fileUrlwithSize.js +0 -10
- package/file/api/getFile.d.ts +0 -32
- package/file/api/getFile.js +0 -47
- package/file/api/index.d.ts +0 -5
- package/file/api/index.js +0 -4
- package/file/observers/index.d.ts +0 -2
- package/file/observers/index.js +0 -1
- package/file/observers/observeFile.d.ts +0 -20
- package/file/observers/observeFile.js +0 -40
- package/index.d.ts +0 -31
- package/index.d.ts.map +0 -1
- package/index.js +0 -40
- package/message/api/createMessage.d.ts +0 -38
- package/message/api/createMessage.js +0 -62
- package/message/api/deleteMessage.d.ts +0 -32
- package/message/api/deleteMessage.js +0 -52
- package/message/api/getMessage.d.ts +0 -32
- package/message/api/getMessage.js +0 -47
- package/message/api/getMessages.d.ts +0 -32
- package/message/api/getMessages.js +0 -49
- package/message/api/index.d.ts +0 -7
- package/message/api/index.js +0 -6
- package/message/api/queryMessages.d.ts +0 -55
- package/message/api/queryMessages.js +0 -109
- package/message/api/updateMessage.d.ts +0 -38
- package/message/api/updateMessage.js +0 -58
- package/message/events/index.d.ts +0 -4
- package/message/events/index.js +0 -3
- package/message/events/onMessageCreated.d.ts +0 -17
- package/message/events/onMessageCreated.js +0 -28
- package/message/events/onMessageDeleted.d.ts +0 -17
- package/message/events/onMessageDeleted.js +0 -28
- package/message/events/onMessageUpdated.d.ts +0 -17
- package/message/events/onMessageUpdated.js +0 -28
- package/message/observers/index.d.ts +0 -3
- package/message/observers/index.js +0 -2
- package/message/observers/observeMessage.d.ts +0 -22
- package/message/observers/observeMessage.js +0 -48
- package/message/observers/observeMessages.d.ts +0 -19
- package/message/observers/observeMessages.js +0 -39
- package/post/api/createPost.d.ts +0 -21
- package/post/api/createPost.js +0 -32
- package/post/api/deletePost.d.ts +0 -16
- package/post/api/deletePost.js +0 -32
- package/post/api/getPost.d.ts +0 -32
- package/post/api/getPost.js +0 -47
- package/post/api/getPosts.d.ts +0 -32
- package/post/api/getPosts.js +0 -49
- package/post/api/index.d.ts +0 -7
- package/post/api/index.js +0 -6
- package/post/api/queryPosts.d.ts +0 -45
- package/post/api/queryPosts.d.ts.map +0 -1
- package/post/api/queryPosts.js +0 -67
- package/post/api/updatePost.d.ts +0 -19
- package/post/api/updatePost.js +0 -31
- package/post/events/index.d.ts +0 -4
- package/post/events/index.js +0 -3
- package/post/events/onPostCreated.d.ts +0 -17
- package/post/events/onPostCreated.js +0 -28
- package/post/events/onPostDeleted.d.ts +0 -17
- package/post/events/onPostDeleted.js +0 -28
- package/post/events/onPostUpdated.d.ts +0 -17
- package/post/events/onPostUpdated.js +0 -28
- package/post/observers/index.d.ts +0 -3
- package/post/observers/index.js +0 -2
- package/post/observers/observePost.d.ts +0 -20
- package/post/observers/observePost.js +0 -44
- package/post/observers/observePosts.d.ts +0 -22
- package/post/observers/observePosts.d.ts.map +0 -1
- package/post/observers/observePosts.js +0 -40
- package/reaction/api/addReaction.d.ts +0 -36
- package/reaction/api/addReaction.js +0 -58
- package/reaction/api/index.d.ts +0 -3
- package/reaction/api/index.js +0 -2
- package/reaction/api/removeReaction.d.ts +0 -36
- package/reaction/api/removeReaction.js +0 -58
- package/reaction/events/index.d.ts +0 -2
- package/reaction/events/index.js +0 -1
- package/reaction/events/onReactionAdded.d.ts +0 -17
- package/reaction/events/onReactionAdded.js +0 -29
- package/reaction/events/onReactionRemoved.d.ts +0 -17
- package/reaction/events/onReactionRemoved.js +0 -28
- package/reaction/utils/dispatchReactable.d.ts +0 -3
- package/reaction/utils/dispatchReactable.js +0 -14
- package/reaction/utils/fetchReference.d.ts +0 -3
- package/reaction/utils/fetchReference.js +0 -13
- package/reaction/utils/index.d.ts +0 -3
- package/reaction/utils/index.js +0 -2
- package/report/api/createReport.d.ts +0 -16
- package/report/api/createReport.js +0 -28
- package/report/api/deleteReport.d.ts +0 -16
- package/report/api/deleteReport.js +0 -28
- package/report/api/index.d.ts +0 -4
- package/report/api/index.js +0 -3
- package/report/api/isReportedByMe.d.ts +0 -16
- package/report/api/isReportedByMe.js +0 -26
- package/report/constants/referenceTypes.d.ts +0 -24
- package/report/constants/referenceTypes.js +0 -22
- package/stream/api/createStream.d.ts +0 -18
- package/stream/api/createStream.js +0 -24
- package/stream/api/deleteStream.d.ts +0 -16
- package/stream/api/deleteStream.js +0 -26
- package/stream/api/getStream.d.ts +0 -12
- package/stream/api/getStream.js +0 -20
- package/stream/api/index.d.ts +0 -6
- package/stream/api/index.js +0 -6
- package/stream/api/queryStreams.d.ts +0 -23
- package/stream/api/queryStreams.js +0 -37
- package/stream/api/updateStream.d.ts +0 -17
- package/stream/api/updateStream.js +0 -25
- package/stream/events/index.d.ts +0 -4
- package/stream/events/index.js +0 -3
- package/stream/events/onStreamRecorded.d.ts +0 -17
- package/stream/events/onStreamRecorded.js +0 -28
- package/stream/events/onStreamStarted.d.ts +0 -17
- package/stream/events/onStreamStarted.js +0 -28
- package/stream/events/onStreamStopped.d.ts +0 -17
- package/stream/events/onStreamStopped.js +0 -28
- package/tsconfig.tsbuildinfo +0 -1
- package/user/api/getUser.d.ts +0 -32
- package/user/api/getUser.js +0 -47
- package/user/api/getUsers.d.ts +0 -32
- package/user/api/getUsers.js +0 -47
- package/user/api/index.d.ts +0 -5
- package/user/api/index.js +0 -4
- package/user/api/queryUsers.d.ts +0 -43
- package/user/api/queryUsers.d.ts.map +0 -1
- package/user/api/queryUsers.js +0 -67
- package/user/api/updateUser.d.ts +0 -17
- package/user/api/updateUser.js +0 -33
- package/user/events/index.d.ts +0 -2
- package/user/events/index.js +0 -1
- package/user/events/onUserUpdated.d.ts +0 -17
- package/user/events/onUserUpdated.js +0 -28
- package/user/observers/index.d.ts +0 -2
- package/user/observers/index.js +0 -1
- package/user/observers/observeUser.d.ts +0 -19
- package/user/observers/observeUser.js +0 -43
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ```js
|
|
3
|
-
* import { getCommunities } from '@amityco/ts-sdk'
|
|
4
|
-
* const communities = await getCommunities(['foo', 'bar'])
|
|
5
|
-
* ```
|
|
6
|
-
*
|
|
7
|
-
* Fetches a collection of {@link Amity.Community} objects
|
|
8
|
-
*
|
|
9
|
-
* @param communityIds the IDs of the {@link Amity.Community} to fetch
|
|
10
|
-
* @returns the associated collection of {@link Amity.Community} objects
|
|
11
|
-
*
|
|
12
|
-
* @category Community API
|
|
13
|
-
* @async
|
|
14
|
-
*/
|
|
15
|
-
export declare const getCommunities: {
|
|
16
|
-
(communityIds: Amity.Community['communityId'][]): Promise<Record<string, Amity.Community>>;
|
|
17
|
-
/**
|
|
18
|
-
* ```js
|
|
19
|
-
* import { getCommunities } from '@amityco/ts-sdk'
|
|
20
|
-
* const communities = getCommunities.locally(['foo', 'bar']) ?? []
|
|
21
|
-
* ```
|
|
22
|
-
*
|
|
23
|
-
* Fetches a collection of {@link Amity.Community} objects from cache
|
|
24
|
-
*
|
|
25
|
-
* @param communityIds the IDs of the {@link Amity.Community} to fetch
|
|
26
|
-
* @returns the associated collection of {@link Amity.Community} objects
|
|
27
|
-
*
|
|
28
|
-
* @category Community API
|
|
29
|
-
*/
|
|
30
|
-
locally(communityIds: Amity.Community['communityId'][]): Record<string, Amity.Community> | undefined;
|
|
31
|
-
};
|
|
32
|
-
//# sourceMappingURL=getCommunities.d.ts.map
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { getActiveClient } from '../../client/api';
|
|
2
|
-
import { decoratePayload } from '../../core/query';
|
|
3
|
-
import { ingestInCache, pullFromCache } from '../../core/cache';
|
|
4
|
-
import { toRecord } from '../../core/model';
|
|
5
|
-
/**
|
|
6
|
-
* ```js
|
|
7
|
-
* import { getCommunities } from '@amityco/ts-sdk'
|
|
8
|
-
* const communities = await getCommunities(['foo', 'bar'])
|
|
9
|
-
* ```
|
|
10
|
-
*
|
|
11
|
-
* Fetches a collection of {@link Amity.Community} objects
|
|
12
|
-
*
|
|
13
|
-
* @param communityIds the IDs of the {@link Amity.Community} to fetch
|
|
14
|
-
* @returns the associated collection of {@link Amity.Community} objects
|
|
15
|
-
*
|
|
16
|
-
* @category Community API
|
|
17
|
-
* @async
|
|
18
|
-
*/
|
|
19
|
-
export const getCommunities = async (communityIds) => {
|
|
20
|
-
const client = getActiveClient();
|
|
21
|
-
client.log('community/getCommunities', communityIds);
|
|
22
|
-
// API-FIX: endpoint should not be /list, parameters should be querystring.
|
|
23
|
-
const { data } = await client.http.get(`/api/v3/communities/list`, { params: { communityIds } });
|
|
24
|
-
decoratePayload(data);
|
|
25
|
-
ingestInCache(data);
|
|
26
|
-
const { communities } = data;
|
|
27
|
-
return toRecord(communities);
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* ```js
|
|
31
|
-
* import { getCommunities } from '@amityco/ts-sdk'
|
|
32
|
-
* const communities = getCommunities.locally(['foo', 'bar']) ?? []
|
|
33
|
-
* ```
|
|
34
|
-
*
|
|
35
|
-
* Fetches a collection of {@link Amity.Community} objects from cache
|
|
36
|
-
*
|
|
37
|
-
* @param communityIds the IDs of the {@link Amity.Community} to fetch
|
|
38
|
-
* @returns the associated collection of {@link Amity.Community} objects
|
|
39
|
-
*
|
|
40
|
-
* @category Community API
|
|
41
|
-
*/
|
|
42
|
-
getCommunities.locally = (communityIds) => {
|
|
43
|
-
var _a;
|
|
44
|
-
const client = getActiveClient();
|
|
45
|
-
client.log('community/getCommunities.locally', communityIds);
|
|
46
|
-
const cached = (_a = pullFromCache('community', ...communityIds)) !== null && _a !== void 0 ? _a : [];
|
|
47
|
-
if ((cached === null || cached === void 0 ? void 0 : cached.length) === communityIds.length)
|
|
48
|
-
return toRecord(cached);
|
|
49
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ```js
|
|
3
|
-
* import { getCommunity } from '@amityco/ts-sdk'
|
|
4
|
-
* const community = await getCommunity('foobar')
|
|
5
|
-
* ```
|
|
6
|
-
*
|
|
7
|
-
* Fetches a {@link Amity.Community} object
|
|
8
|
-
*
|
|
9
|
-
* @param communityId the ID of the {@link Amity.Community} to fetch
|
|
10
|
-
* @returns the associated {@link Amity.Community} object
|
|
11
|
-
*
|
|
12
|
-
* @category Community API
|
|
13
|
-
* @async
|
|
14
|
-
*/
|
|
15
|
-
export declare const getCommunity: {
|
|
16
|
-
(communityId: Amity.Community['communityId']): Promise<Amity.Community>;
|
|
17
|
-
/**
|
|
18
|
-
* ```js
|
|
19
|
-
* import { getCommunity } from '@amityco/ts-sdk'
|
|
20
|
-
* const community = getCommunity.locally('foobar')
|
|
21
|
-
* ```
|
|
22
|
-
*
|
|
23
|
-
* Fetches a {@link Amity.Community} object from cache
|
|
24
|
-
*
|
|
25
|
-
* @param communityId the ID of the {@link Amity.Community} to fetch
|
|
26
|
-
* @returns the associated {@link Amity.Community} object
|
|
27
|
-
*
|
|
28
|
-
* @category Community API
|
|
29
|
-
*/
|
|
30
|
-
locally(communityId: Amity.Community['communityId']): Amity.Community;
|
|
31
|
-
};
|
|
32
|
-
//# sourceMappingURL=getCommunity.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getCommunity.d.ts","sourceRoot":"","sources":["../../../src/community/api/getCommunity.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,YAAY;kBACV,MAAM,SAAS,CAAC,aAAa,CAAC;IAiB7C;;;;;;;;;;;;OAYG;yBAEY,MAAM,SAAS,CAAC,aAAa,CAAC;CAhB5C,CAAA"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { getActiveClient } from '../../client/api';
|
|
2
|
-
import { ingestInCache, pullFromCache } from '../../core/cache';
|
|
3
|
-
import { decoratePayload } from '../../core/query';
|
|
4
|
-
/**
|
|
5
|
-
* ```js
|
|
6
|
-
* import { getCommunity } from '@amityco/ts-sdk'
|
|
7
|
-
* const community = await getCommunity('foobar')
|
|
8
|
-
* ```
|
|
9
|
-
*
|
|
10
|
-
* Fetches a {@link Amity.Community} object
|
|
11
|
-
*
|
|
12
|
-
* @param communityId the ID of the {@link Amity.Community} to fetch
|
|
13
|
-
* @returns the associated {@link Amity.Community} object
|
|
14
|
-
*
|
|
15
|
-
* @category Community API
|
|
16
|
-
* @async
|
|
17
|
-
*/
|
|
18
|
-
export const getCommunity = async (communityId) => {
|
|
19
|
-
const client = getActiveClient();
|
|
20
|
-
client.log('community/getCommunity', communityId);
|
|
21
|
-
// API-FIX: endpoint should not be /list, parameters should be querystring.
|
|
22
|
-
const { data } = await client.http.get(`/api/v3/communities/${communityId}`);
|
|
23
|
-
decoratePayload(data);
|
|
24
|
-
ingestInCache(data);
|
|
25
|
-
const { communities } = data;
|
|
26
|
-
return communities.find(community => community.communityId === communityId);
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* ```js
|
|
30
|
-
* import { getCommunity } from '@amityco/ts-sdk'
|
|
31
|
-
* const community = getCommunity.locally('foobar')
|
|
32
|
-
* ```
|
|
33
|
-
*
|
|
34
|
-
* Fetches a {@link Amity.Community} object from cache
|
|
35
|
-
*
|
|
36
|
-
* @param communityId the ID of the {@link Amity.Community} to fetch
|
|
37
|
-
* @returns the associated {@link Amity.Community} object
|
|
38
|
-
*
|
|
39
|
-
* @category Community API
|
|
40
|
-
*/
|
|
41
|
-
getCommunity.locally = (communityId) => {
|
|
42
|
-
var _a;
|
|
43
|
-
const client = getActiveClient();
|
|
44
|
-
client.log('community/getCommunity.locally', communityId);
|
|
45
|
-
const [community] = (_a = pullFromCache('community', communityId)) !== null && _a !== void 0 ? _a : [];
|
|
46
|
-
return community;
|
|
47
|
-
};
|
package/community/api/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './queryCommunities';
|
|
2
|
-
export * from './getCommunities';
|
|
3
|
-
export * from './getCommunity';
|
|
4
|
-
export * from './createCommunity';
|
|
5
|
-
export * from './updateCommunity';
|
|
6
|
-
export * from './deleteCommunity';
|
|
7
|
-
export * from './joinCommunity';
|
|
8
|
-
export * from './leaveCommunity';
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/community/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAE9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mBAAmB,CAAA;AAEjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA"}
|
package/community/api/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from './queryCommunities';
|
|
2
|
-
export * from './getCommunities';
|
|
3
|
-
export * from './getCommunity';
|
|
4
|
-
export * from './createCommunity';
|
|
5
|
-
export * from './updateCommunity';
|
|
6
|
-
export * from './deleteCommunity';
|
|
7
|
-
export * from './joinCommunity';
|
|
8
|
-
export * from './leaveCommunity';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ```js
|
|
3
|
-
* import { joinCommunity } from '@amityco/ts-sdk'
|
|
4
|
-
* const isJoined = await joinCommunity('foobar')
|
|
5
|
-
* ```
|
|
6
|
-
*
|
|
7
|
-
* Joins a {@link Amity.Community} object
|
|
8
|
-
*
|
|
9
|
-
* @param communityId the {@link Amity.Community} to join
|
|
10
|
-
* @returns A success boolean if the {@link Amity.Community} was joined
|
|
11
|
-
*
|
|
12
|
-
* @category Community API
|
|
13
|
-
* @async
|
|
14
|
-
*/
|
|
15
|
-
export declare const joinCommunity: (communityId: Amity.Community['communityId']) => Promise<boolean>;
|
|
16
|
-
//# sourceMappingURL=joinCommunity.d.ts.map
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { getActiveClient } from '../../client/api';
|
|
2
|
-
import { decoratePayload } from '../../core/query';
|
|
3
|
-
import { ingestInCache } from '../../core/cache';
|
|
4
|
-
import { fireEvent } from '../../core/events';
|
|
5
|
-
/**
|
|
6
|
-
* ```js
|
|
7
|
-
* import { joinCommunity } from '@amityco/ts-sdk'
|
|
8
|
-
* const isJoined = await joinCommunity('foobar')
|
|
9
|
-
* ```
|
|
10
|
-
*
|
|
11
|
-
* Joins a {@link Amity.Community} object
|
|
12
|
-
*
|
|
13
|
-
* @param communityId the {@link Amity.Community} to join
|
|
14
|
-
* @returns A success boolean if the {@link Amity.Community} was joined
|
|
15
|
-
*
|
|
16
|
-
* @category Community API
|
|
17
|
-
* @async
|
|
18
|
-
*/
|
|
19
|
-
export const joinCommunity = async (communityId) => {
|
|
20
|
-
const client = getActiveClient();
|
|
21
|
-
client.log('community/joinCommunity', communityId);
|
|
22
|
-
const { data } = await client.http.post(`/api/v3/communities/${communityId}/join`);
|
|
23
|
-
decoratePayload(data);
|
|
24
|
-
ingestInCache(data);
|
|
25
|
-
fireEvent('v3.community.didJoin', {
|
|
26
|
-
communities: data.communities
|
|
27
|
-
});
|
|
28
|
-
const { communityUsers } = data;
|
|
29
|
-
return !!communityUsers.find(communityUser => (communityUser.communityId === communityId
|
|
30
|
-
&& communityUser.communityMembership === 'member'));
|
|
31
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ```js
|
|
3
|
-
* import { leaveCommunity } from '@amityco/ts-sdk'
|
|
4
|
-
* const isLeft = await leaveCommunity('foobar')
|
|
5
|
-
* ```
|
|
6
|
-
*
|
|
7
|
-
* Leaves a {@link Amity.Community} object
|
|
8
|
-
*
|
|
9
|
-
* @param communityId the {@link Amity.Community} to leave
|
|
10
|
-
* @returns A success boolean if {@link Amity.Community} was left
|
|
11
|
-
*
|
|
12
|
-
* @category Group API
|
|
13
|
-
* @async
|
|
14
|
-
*/
|
|
15
|
-
export declare const leaveCommunity: (communityId: Amity.Community['communityId']) => Promise<boolean>;
|
|
16
|
-
//# sourceMappingURL=leaveCommunity.d.ts.map
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { getActiveClient } from '../../client/api';
|
|
2
|
-
import { decoratePayload } from '../../core/query';
|
|
3
|
-
import { ingestInCache } from '../../core/cache';
|
|
4
|
-
import { fireEvent } from '../../core/events';
|
|
5
|
-
/**
|
|
6
|
-
* ```js
|
|
7
|
-
* import { leaveCommunity } from '@amityco/ts-sdk'
|
|
8
|
-
* const isLeft = await leaveCommunity('foobar')
|
|
9
|
-
* ```
|
|
10
|
-
*
|
|
11
|
-
* Leaves a {@link Amity.Community} object
|
|
12
|
-
*
|
|
13
|
-
* @param communityId the {@link Amity.Community} to leave
|
|
14
|
-
* @returns A success boolean if {@link Amity.Community} was left
|
|
15
|
-
*
|
|
16
|
-
* @category Group API
|
|
17
|
-
* @async
|
|
18
|
-
*/
|
|
19
|
-
export const leaveCommunity = async (communityId) => {
|
|
20
|
-
const client = getActiveClient();
|
|
21
|
-
client.log('community/leaveCommunity', communityId);
|
|
22
|
-
const { data } = await client.http.delete(`/api/v3/communities/${communityId}/leave`);
|
|
23
|
-
decoratePayload(data);
|
|
24
|
-
ingestInCache(data);
|
|
25
|
-
fireEvent('v3.community.didJoin', {
|
|
26
|
-
communities: data.communities,
|
|
27
|
-
});
|
|
28
|
-
const { communityUsers } = data;
|
|
29
|
-
return !!communityUsers.find(communityUser => (communityUser.communityId === communityId
|
|
30
|
-
&& communityUser.communityMembership !== 'member'));
|
|
31
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ```js
|
|
3
|
-
* import { queryCommunities } from '@amityco/ts-sdk'
|
|
4
|
-
* const communities = await queryCommunities()
|
|
5
|
-
* ```
|
|
6
|
-
*
|
|
7
|
-
* Queries a paginable list of {@link Amity.Community} objects
|
|
8
|
-
* Search is performed by displayName such as `.startsWith(search)`
|
|
9
|
-
*
|
|
10
|
-
* @param query The query parameters
|
|
11
|
-
* @returns A page of {@link Amity.Community} objects
|
|
12
|
-
*
|
|
13
|
-
* @category Community API
|
|
14
|
-
* @async
|
|
15
|
-
*/
|
|
16
|
-
export declare const queryCommunities: {
|
|
17
|
-
(query?: {
|
|
18
|
-
displayName?: string | undefined;
|
|
19
|
-
membership?: "member" | "notMember" | "all" | undefined;
|
|
20
|
-
categoryId?: string | undefined;
|
|
21
|
-
isDeleted?: Amity.Community['isDeleted'];
|
|
22
|
-
hasFlag?: boolean | undefined;
|
|
23
|
-
tags?: Amity.Taggable['tags'];
|
|
24
|
-
sortBy?: "displayName" | "firstCreated" | "lastCreated" | undefined;
|
|
25
|
-
page?: Amity.Page | undefined;
|
|
26
|
-
} | undefined): Promise<{
|
|
27
|
-
data: Record<string, Amity.Community>;
|
|
28
|
-
prevPage: Amity.Page | null;
|
|
29
|
-
nextPage: Amity.Page | null;
|
|
30
|
-
}>;
|
|
31
|
-
/**
|
|
32
|
-
* ```js
|
|
33
|
-
* import { queryCommunities } from '@amityco/ts-sdk'
|
|
34
|
-
* const communities = queryCommunities.locally()
|
|
35
|
-
* ```
|
|
36
|
-
*
|
|
37
|
-
* Queries a paginable list of {@link Amity.Community} objects from cache
|
|
38
|
-
*
|
|
39
|
-
* @param query The query parameters
|
|
40
|
-
* @returns communities
|
|
41
|
-
*
|
|
42
|
-
* @category Community API
|
|
43
|
-
*/
|
|
44
|
-
locally(query: Parameters<typeof queryCommunities>[0]): void;
|
|
45
|
-
};
|
|
46
|
-
//# sourceMappingURL=queryCommunities.d.ts.map
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { getActiveClient } from '../../client/api';
|
|
13
|
-
import { decoratePayload, toPage, toToken } from '../../core/query';
|
|
14
|
-
import { ingestInCache } from '../../core/cache';
|
|
15
|
-
import { toRecord } from '../../core/model';
|
|
16
|
-
/**
|
|
17
|
-
* ```js
|
|
18
|
-
* import { queryCommunities } from '@amityco/ts-sdk'
|
|
19
|
-
* const communities = await queryCommunities()
|
|
20
|
-
* ```
|
|
21
|
-
*
|
|
22
|
-
* Queries a paginable list of {@link Amity.Community} objects
|
|
23
|
-
* Search is performed by displayName such as `.startsWith(search)`
|
|
24
|
-
*
|
|
25
|
-
* @param query The query parameters
|
|
26
|
-
* @returns A page of {@link Amity.Community} objects
|
|
27
|
-
*
|
|
28
|
-
* @category Community API
|
|
29
|
-
* @async
|
|
30
|
-
*/
|
|
31
|
-
export const queryCommunities = async (query) => {
|
|
32
|
-
const client = getActiveClient();
|
|
33
|
-
client.log('channel/queryCommunities', query);
|
|
34
|
-
// safe decapsulation
|
|
35
|
-
const _a = query !== null && query !== void 0 ? query : {}, { page, displayName, membership } = _a, params = __rest(_a, ["page", "displayName", "membership"]);
|
|
36
|
-
// API-FIX: parameters should be querystring.
|
|
37
|
-
// API-FIX: backend doesnt answer Amity.Response
|
|
38
|
-
// const { data } = await client.http.get<Amity.Response<Amity.PagedResponse<CommunityPayload>>>(
|
|
39
|
-
const { data } = await client.http.get(`/api/v3/communities`, { params: Object.assign(Object.assign({}, params), { keyword: displayName, filter: membership, options: {
|
|
40
|
-
token: toToken(page, 'skiplimit')
|
|
41
|
-
} }) });
|
|
42
|
-
// API-FIX: backend to response Amity.Response: const { paging, communities } = unwrapPayload(data)
|
|
43
|
-
const { paging } = data, response = __rest(data, ["paging"]);
|
|
44
|
-
decoratePayload(response);
|
|
45
|
-
ingestInCache(response);
|
|
46
|
-
const prevPage = toPage(paging === null || paging === void 0 ? void 0 : paging.previous);
|
|
47
|
-
const nextPage = toPage(paging === null || paging === void 0 ? void 0 : paging.next);
|
|
48
|
-
const { communities } = response;
|
|
49
|
-
return { data: toRecord(communities), prevPage, nextPage };
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
* ```js
|
|
53
|
-
* import { queryCommunities } from '@amityco/ts-sdk'
|
|
54
|
-
* const communities = queryCommunities.locally()
|
|
55
|
-
* ```
|
|
56
|
-
*
|
|
57
|
-
* Queries a paginable list of {@link Amity.Community} objects from cache
|
|
58
|
-
*
|
|
59
|
-
* @param query The query parameters
|
|
60
|
-
* @returns communities
|
|
61
|
-
*
|
|
62
|
-
* @category Community API
|
|
63
|
-
*/
|
|
64
|
-
queryCommunities.locally = (query) => {
|
|
65
|
-
const client = getActiveClient();
|
|
66
|
-
client.log('post/queryCommunities.locally', query);
|
|
67
|
-
// TODO
|
|
68
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ```js
|
|
3
|
-
* import { updateCommunity } from '@amityco/ts-sdk'
|
|
4
|
-
* const updated = await updateCommunity(communityId, { displayName: 'foobar' })
|
|
5
|
-
* ```
|
|
6
|
-
*
|
|
7
|
-
* Updates an {@link Amity.Community}
|
|
8
|
-
*
|
|
9
|
-
* @param communityId The ID of the {@link Amity.Community} to edit
|
|
10
|
-
* @param patch The patch data to apply
|
|
11
|
-
* @returns the updated {@link Amity.Community} object
|
|
12
|
-
*
|
|
13
|
-
* @category Community API
|
|
14
|
-
* @async
|
|
15
|
-
*/
|
|
16
|
-
export declare const updateCommunity: (communityId: Amity.Community['communityId'], patch: Patch<Amity.Community, 'displayName' | 'description' | 'avatarFileId' | 'tags' | 'metadata'>) => Promise<Amity.Community>;
|
|
17
|
-
//# sourceMappingURL=updateCommunity.d.ts.map
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { getActiveClient } from '../../client/api';
|
|
2
|
-
import { decoratePayload } from '../../core/query';
|
|
3
|
-
import { ingestInCache } from '../../core/cache';
|
|
4
|
-
import { fireEvent } from '../../core/events';
|
|
5
|
-
/**
|
|
6
|
-
* ```js
|
|
7
|
-
* import { updateCommunity } from '@amityco/ts-sdk'
|
|
8
|
-
* const updated = await updateCommunity(communityId, { displayName: 'foobar' })
|
|
9
|
-
* ```
|
|
10
|
-
*
|
|
11
|
-
* Updates an {@link Amity.Community}
|
|
12
|
-
*
|
|
13
|
-
* @param communityId The ID of the {@link Amity.Community} to edit
|
|
14
|
-
* @param patch The patch data to apply
|
|
15
|
-
* @returns the updated {@link Amity.Community} object
|
|
16
|
-
*
|
|
17
|
-
* @category Community API
|
|
18
|
-
* @async
|
|
19
|
-
*/
|
|
20
|
-
export const updateCommunity = async (communityId, patch) => {
|
|
21
|
-
const client = getActiveClient();
|
|
22
|
-
client.log('community/updateCommunity', communityId, patch);
|
|
23
|
-
const { data } = await client.http.put(`/api/v3/communities/${communityId}`, patch);
|
|
24
|
-
decoratePayload(data);
|
|
25
|
-
ingestInCache(data);
|
|
26
|
-
fireEvent('v3.community.didUpdate', data);
|
|
27
|
-
const { communities } = data;
|
|
28
|
-
return communities.find(community => community.communityId === communityId);
|
|
29
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ```js
|
|
3
|
-
* import { onCommunityCreated } from '@amityco/ts-sdk'
|
|
4
|
-
* const dispose = onCommunityCreated(channel => {
|
|
5
|
-
* // ...
|
|
6
|
-
* })
|
|
7
|
-
* ```
|
|
8
|
-
*
|
|
9
|
-
* Fired when any {@link Amity.Community} have been created
|
|
10
|
-
*
|
|
11
|
-
* @param callback The function to call when the event was fired
|
|
12
|
-
* @returns an {@link Amity.Unsubscriber} function to stop listening
|
|
13
|
-
*
|
|
14
|
-
* @category Community Events
|
|
15
|
-
*/
|
|
16
|
-
export declare const onCommunityCreated: (callback: Amity.Listener<Amity.Community>) => Amity.Unsubscriber;
|
|
17
|
-
//# sourceMappingURL=onCommunityCreated.d.ts.map
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { getActiveClient } from '../../client/api';
|
|
2
|
-
import { createEventSubscriber } from '../../core/events';
|
|
3
|
-
import { decoratePayload } from '../../core/query';
|
|
4
|
-
import { ingestInCache } from '../../core/cache';
|
|
5
|
-
/**
|
|
6
|
-
* ```js
|
|
7
|
-
* import { onCommunityCreated } from '@amityco/ts-sdk'
|
|
8
|
-
* const dispose = onCommunityCreated(channel => {
|
|
9
|
-
* // ...
|
|
10
|
-
* })
|
|
11
|
-
* ```
|
|
12
|
-
*
|
|
13
|
-
* Fired when any {@link Amity.Community} have been created
|
|
14
|
-
*
|
|
15
|
-
* @param callback The function to call when the event was fired
|
|
16
|
-
* @returns an {@link Amity.Unsubscriber} function to stop listening
|
|
17
|
-
*
|
|
18
|
-
* @category Community Events
|
|
19
|
-
*/
|
|
20
|
-
export const onCommunityCreated = (callback) => {
|
|
21
|
-
const client = getActiveClient();
|
|
22
|
-
const filter = (payload) => {
|
|
23
|
-
decoratePayload(payload);
|
|
24
|
-
ingestInCache(payload);
|
|
25
|
-
callback(payload.communities[0]);
|
|
26
|
-
};
|
|
27
|
-
return createEventSubscriber(client, 'onCommunityCreated', 'v3.community.didCreate', filter);
|
|
28
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ```js
|
|
3
|
-
* import { onCommunityDeleted } from '@amityco/ts-sdk'
|
|
4
|
-
* const dispose = onCommunityDeleted(channel => {
|
|
5
|
-
* // ...
|
|
6
|
-
* })
|
|
7
|
-
* ```
|
|
8
|
-
*
|
|
9
|
-
* Fired when any {@link Amity.Community} have been deleted
|
|
10
|
-
*
|
|
11
|
-
* @param callback The function to call when the event was fired
|
|
12
|
-
* @returns an {@link Amity.Unsubscriber} function to stop listening
|
|
13
|
-
*
|
|
14
|
-
* @category Community Events
|
|
15
|
-
*/
|
|
16
|
-
export declare const onCommunityDeleted: (callback: Amity.Listener<Amity.Community>) => Amity.Unsubscriber;
|
|
17
|
-
//# sourceMappingURL=onCommunityDeleted.d.ts.map
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { getActiveClient } from '../../client/api';
|
|
2
|
-
import { createEventSubscriber } from '../../core/events';
|
|
3
|
-
import { decoratePayload } from '../../core/query';
|
|
4
|
-
import { ingestInCache } from '../../core/cache';
|
|
5
|
-
/**
|
|
6
|
-
* ```js
|
|
7
|
-
* import { onCommunityDeleted } from '@amityco/ts-sdk'
|
|
8
|
-
* const dispose = onCommunityDeleted(channel => {
|
|
9
|
-
* // ...
|
|
10
|
-
* })
|
|
11
|
-
* ```
|
|
12
|
-
*
|
|
13
|
-
* Fired when any {@link Amity.Community} have been deleted
|
|
14
|
-
*
|
|
15
|
-
* @param callback The function to call when the event was fired
|
|
16
|
-
* @returns an {@link Amity.Unsubscriber} function to stop listening
|
|
17
|
-
*
|
|
18
|
-
* @category Community Events
|
|
19
|
-
*/
|
|
20
|
-
export const onCommunityDeleted = (callback) => {
|
|
21
|
-
const client = getActiveClient();
|
|
22
|
-
const filter = (payload) => {
|
|
23
|
-
decoratePayload(payload);
|
|
24
|
-
ingestInCache(payload);
|
|
25
|
-
callback(payload.communities[0]);
|
|
26
|
-
};
|
|
27
|
-
return createEventSubscriber(client, 'onCommunityDeleted', 'v3.community.didDelete', filter);
|
|
28
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ```js
|
|
3
|
-
* import { onCommunityJoined } from '@amityco/ts-sdk'
|
|
4
|
-
* const dispose = onCommunityJoined(channel => {
|
|
5
|
-
* // ...
|
|
6
|
-
* })
|
|
7
|
-
* ```
|
|
8
|
-
*
|
|
9
|
-
* Fired when any {@link Amity.Community} was joined
|
|
10
|
-
*
|
|
11
|
-
* @param callback The function to call when the event was fired
|
|
12
|
-
* @returns an {@link Amity.Unsubscriber} function to stop listening
|
|
13
|
-
*
|
|
14
|
-
* @category Community Events
|
|
15
|
-
*/
|
|
16
|
-
export declare const onCommunityJoined: (callback: Amity.Listener<Amity.Community>) => Amity.Unsubscriber;
|
|
17
|
-
//# sourceMappingURL=onCommunityJoined.d.ts.map
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { getActiveClient } from '../../client/api';
|
|
2
|
-
import { createEventSubscriber } from '../../core/events';
|
|
3
|
-
import { decoratePayload } from '../../core/query';
|
|
4
|
-
import { ingestInCache } from '../../core/cache';
|
|
5
|
-
/**
|
|
6
|
-
* ```js
|
|
7
|
-
* import { onCommunityJoined } from '@amityco/ts-sdk'
|
|
8
|
-
* const dispose = onCommunityJoined(channel => {
|
|
9
|
-
* // ...
|
|
10
|
-
* })
|
|
11
|
-
* ```
|
|
12
|
-
*
|
|
13
|
-
* Fired when any {@link Amity.Community} was joined
|
|
14
|
-
*
|
|
15
|
-
* @param callback The function to call when the event was fired
|
|
16
|
-
* @returns an {@link Amity.Unsubscriber} function to stop listening
|
|
17
|
-
*
|
|
18
|
-
* @category Community Events
|
|
19
|
-
*/
|
|
20
|
-
export const onCommunityJoined = (callback) => {
|
|
21
|
-
const client = getActiveClient();
|
|
22
|
-
const filter = (payload) => {
|
|
23
|
-
decoratePayload(payload);
|
|
24
|
-
ingestInCache(payload);
|
|
25
|
-
callback(payload.communities[0]);
|
|
26
|
-
};
|
|
27
|
-
return createEventSubscriber(client, 'onCommunityJoined', 'v3.community.didJoin', filter);
|
|
28
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ```js
|
|
3
|
-
* import { onCommunityLeft } from '@amityco/ts-sdk'
|
|
4
|
-
* const dispose = onCommunityLeft(channel => {
|
|
5
|
-
* // ...
|
|
6
|
-
* })
|
|
7
|
-
* ```
|
|
8
|
-
*
|
|
9
|
-
* Fired when any {@link Amity.Community} was left
|
|
10
|
-
*
|
|
11
|
-
* @param callback The function to call when the event was fired
|
|
12
|
-
* @returns an {@link Amity.Unsubscriber} function to stop listening
|
|
13
|
-
*
|
|
14
|
-
* @category Community Events
|
|
15
|
-
*/
|
|
16
|
-
export declare const onCommunityLeft: (callback: Amity.Listener<Amity.Community>) => Amity.Unsubscriber;
|
|
17
|
-
//# sourceMappingURL=onCommunityLeft.d.ts.map
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { getActiveClient } from '../../client/api';
|
|
2
|
-
import { createEventSubscriber } from '../../core/events';
|
|
3
|
-
import { decoratePayload } from '../../core/query';
|
|
4
|
-
import { ingestInCache } from '../../core/cache';
|
|
5
|
-
/**
|
|
6
|
-
* ```js
|
|
7
|
-
* import { onCommunityLeft } from '@amityco/ts-sdk'
|
|
8
|
-
* const dispose = onCommunityLeft(channel => {
|
|
9
|
-
* // ...
|
|
10
|
-
* })
|
|
11
|
-
* ```
|
|
12
|
-
*
|
|
13
|
-
* Fired when any {@link Amity.Community} was left
|
|
14
|
-
*
|
|
15
|
-
* @param callback The function to call when the event was fired
|
|
16
|
-
* @returns an {@link Amity.Unsubscriber} function to stop listening
|
|
17
|
-
*
|
|
18
|
-
* @category Community Events
|
|
19
|
-
*/
|
|
20
|
-
export const onCommunityLeft = (callback) => {
|
|
21
|
-
const client = getActiveClient();
|
|
22
|
-
const filter = (payload) => {
|
|
23
|
-
decoratePayload(payload);
|
|
24
|
-
ingestInCache(payload);
|
|
25
|
-
callback(payload.communities[0]);
|
|
26
|
-
};
|
|
27
|
-
return createEventSubscriber(client, 'onCommunityLeft', 'v3.community.didLeave', filter);
|
|
28
|
-
};
|