@openpeepshq/react 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +21 -0
- package/README.md +1 -0
- package/dist/auth/credentials/index.d.ts +11 -0
- package/dist/auth/credentials/index.js +57 -0
- package/dist/auth/credentials/types.d.ts +6 -0
- package/dist/auth/credentials/types.js +1 -0
- package/dist/components/accounts/SignUpLoginModal.d.ts +9 -0
- package/dist/components/accounts/SignUpLoginModal.js +19 -0
- package/dist/components/accounts/SignUpLoginModalContext.d.ts +10 -0
- package/dist/components/accounts/SignUpLoginModalContext.js +16 -0
- package/dist/components/accounts/index.d.ts +3 -0
- package/dist/components/accounts/index.js +2 -0
- package/dist/components/configuration/ConfigurationCategory.d.ts +12 -0
- package/dist/components/configuration/ConfigurationCategory.js +61 -0
- package/dist/components/configuration/ConfigurationList.d.ts +10 -0
- package/dist/components/configuration/ConfigurationList.js +30 -0
- package/dist/components/configuration/ConfigurationTree.d.ts +8 -0
- package/dist/components/configuration/ConfigurationTree.js +20 -0
- package/dist/components/configuration/ConfigurationValueEditor.d.ts +11 -0
- package/dist/components/configuration/ConfigurationValueEditor.js +45 -0
- package/dist/components/configuration/index.d.ts +4 -0
- package/dist/components/configuration/index.js +4 -0
- package/dist/components/conversations/ConversationMessageBubble.d.ts +4 -0
- package/dist/components/conversations/ConversationMessageBubble.js +10 -0
- package/dist/components/conversations/CreateNewConversation.d.ts +8 -0
- package/dist/components/conversations/CreateNewConversation.js +62 -0
- package/dist/components/conversations/CreateNewConversationContext.d.ts +15 -0
- package/dist/components/conversations/CreateNewConversationContext.js +18 -0
- package/dist/components/conversations/DirectMessagesHeaderActions.d.ts +1 -0
- package/dist/components/conversations/DirectMessagesHeaderActions.js +10 -0
- package/dist/components/conversations/MessageInThread.d.ts +13 -0
- package/dist/components/conversations/MessageInThread.js +41 -0
- package/dist/components/conversations/index.d.ts +8 -0
- package/dist/components/conversations/index.js +5 -0
- package/dist/components/form/HeaderAvatarInput.d.ts +13 -0
- package/dist/components/form/HeaderAvatarInput.js +16 -0
- package/dist/components/form/ImageEditModal.d.ts +23 -0
- package/dist/components/form/ImageEditModal.js +75 -0
- package/dist/components/form/ImageInput.d.ts +32 -0
- package/dist/components/form/ImageInput.js +65 -0
- package/dist/components/form/LocationInput.d.ts +20 -0
- package/dist/components/form/LocationInput.js +59 -0
- package/dist/components/form/index.d.ts +8 -0
- package/dist/components/form/index.js +4 -0
- package/dist/components/groups/AddGroupMemberModal.d.ts +6 -0
- package/dist/components/groups/AddGroupMemberModal.js +40 -0
- package/dist/components/groups/AddGroupMembersButton.d.ts +5 -0
- package/dist/components/groups/AddGroupMembersButton.js +17 -0
- package/dist/components/groups/ChangeGroupRolesModal.d.ts +7 -0
- package/dist/components/groups/ChangeGroupRolesModal.js +45 -0
- package/dist/components/groups/ConfirmGroupExitModal.d.ts +6 -0
- package/dist/components/groups/ConfirmGroupExitModal.js +35 -0
- package/dist/components/groups/ConfirmMemberRemovalModal.d.ts +7 -0
- package/dist/components/groups/ConfirmMemberRemovalModal.js +33 -0
- package/dist/components/groups/DeleteGroupModal.d.ts +6 -0
- package/dist/components/groups/DeleteGroupModal.js +34 -0
- package/dist/components/groups/GroupAvatar.d.ts +14 -0
- package/dist/components/groups/GroupAvatar.js +32 -0
- package/dist/components/groups/GroupCard.d.ts +19 -0
- package/dist/components/groups/GroupCard.js +12 -0
- package/dist/components/groups/GroupFeed.d.ts +9 -0
- package/dist/components/groups/GroupFeed.js +14 -0
- package/dist/components/groups/GroupForm.d.ts +7 -0
- package/dist/components/groups/GroupForm.js +73 -0
- package/dist/components/groups/GroupHeader.d.ts +5 -0
- package/dist/components/groups/GroupHeader.js +14 -0
- package/dist/components/groups/GroupMembersList.d.ts +5 -0
- package/dist/components/groups/GroupMembersList.js +38 -0
- package/dist/components/groups/GroupOptionsMenu.d.ts +5 -0
- package/dist/components/groups/GroupOptionsMenu.js +61 -0
- package/dist/components/groups/GroupShareMenu.d.ts +5 -0
- package/dist/components/groups/GroupShareMenu.js +29 -0
- package/dist/components/groups/JoinGroupButton.d.ts +6 -0
- package/dist/components/groups/JoinGroupButton.js +28 -0
- package/dist/components/groups/index.d.ts +30 -0
- package/dist/components/groups/index.js +15 -0
- package/dist/components/index.d.ts +15 -0
- package/dist/components/index.js +15 -0
- package/dist/components/jams/CreateNewJam.d.ts +4 -0
- package/dist/components/jams/CreateNewJam.js +138 -0
- package/dist/components/jams/CreateNewJamContext.d.ts +9 -0
- package/dist/components/jams/CreateNewJamContext.js +16 -0
- package/dist/components/jams/JamAnimatedEmoji.d.ts +4 -0
- package/dist/components/jams/JamAnimatedEmoji.js +12 -0
- package/dist/components/jams/JamCallParticipant.d.ts +15 -0
- package/dist/components/jams/JamCallParticipant.js +101 -0
- package/dist/components/jams/JamCapacityGate.d.ts +7 -0
- package/dist/components/jams/JamCapacityGate.js +30 -0
- package/dist/components/jams/JamChatDrawer.d.ts +6 -0
- package/dist/components/jams/JamChatDrawer.js +88 -0
- package/dist/components/jams/JamChatMessage.d.ts +5 -0
- package/dist/components/jams/JamChatMessage.js +35 -0
- package/dist/components/jams/JamConference.d.ts +8 -0
- package/dist/components/jams/JamConference.js +38 -0
- package/dist/components/jams/JamContext.d.ts +20 -0
- package/dist/components/jams/JamContext.js +24 -0
- package/dist/components/jams/JamDetailsDrawer.d.ts +9 -0
- package/dist/components/jams/JamDetailsDrawer.js +39 -0
- package/dist/components/jams/JamDeviceSelectors.d.ts +12 -0
- package/dist/components/jams/JamDeviceSelectors.js +71 -0
- package/dist/components/jams/JamEventsContext.d.ts +14 -0
- package/dist/components/jams/JamEventsContext.js +143 -0
- package/dist/components/jams/JamFooter.d.ts +18 -0
- package/dist/components/jams/JamFooter.js +171 -0
- package/dist/components/jams/JamGuestForm.d.ts +1 -0
- package/dist/components/jams/JamGuestForm.js +55 -0
- package/dist/components/jams/JamLobby.d.ts +17 -0
- package/dist/components/jams/JamLobby.js +159 -0
- package/dist/components/jams/JamObserverShell.d.ts +6 -0
- package/dist/components/jams/JamObserverShell.js +11 -0
- package/dist/components/jams/JamParticipantConference.d.ts +7 -0
- package/dist/components/jams/JamParticipantConference.js +80 -0
- package/dist/components/jams/JamPeopleDrawer.d.ts +10 -0
- package/dist/components/jams/JamPeopleDrawer.js +76 -0
- package/dist/components/jams/JamReactionMenu.d.ts +12 -0
- package/dist/components/jams/JamReactionMenu.js +79 -0
- package/dist/components/jams/JamRequestJoin.d.ts +9 -0
- package/dist/components/jams/JamRequestJoin.js +34 -0
- package/dist/components/jams/JamRoom.d.ts +21 -0
- package/dist/components/jams/JamRoom.js +166 -0
- package/dist/components/jams/JamRoomIndicators.d.ts +10 -0
- package/dist/components/jams/JamRoomIndicators.js +39 -0
- package/dist/components/jams/JamVideoCall.d.ts +15 -0
- package/dist/components/jams/JamVideoCall.js +18 -0
- package/dist/components/jams/JamVideoLayout.d.ts +13 -0
- package/dist/components/jams/JamVideoLayout.js +68 -0
- package/dist/components/jams/LeaveCloseButton.d.ts +6 -0
- package/dist/components/jams/LeaveCloseButton.js +58 -0
- package/dist/components/jams/LiveJamsSection.d.ts +1 -0
- package/dist/components/jams/LiveJamsSection.js +16 -0
- package/dist/components/jams/animateEmoji.d.ts +1 -0
- package/dist/components/jams/animateEmoji.js +48 -0
- package/dist/components/jams/blurProcessor.d.ts +8 -0
- package/dist/components/jams/blurProcessor.js +28 -0
- package/dist/components/jams/constants.d.ts +10 -0
- package/dist/components/jams/constants.js +44 -0
- package/dist/components/jams/index.d.ts +24 -0
- package/dist/components/jams/index.js +19 -0
- package/dist/components/jams/jamEventActions.d.ts +26 -0
- package/dist/components/jams/jamEventActions.js +76 -0
- package/dist/components/jams/jamLocalSettings.d.ts +17 -0
- package/dist/components/jams/jamLocalSettings.js +53 -0
- package/dist/components/jams/jamReactionPreferences.d.ts +15 -0
- package/dist/components/jams/jamReactionPreferences.js +53 -0
- package/dist/components/jams/jamRecordingState.d.ts +10 -0
- package/dist/components/jams/jamRecordingState.js +25 -0
- package/dist/components/jams/reactionEmojis.d.ts +30 -0
- package/dist/components/jams/reactionEmojis.js +73 -0
- package/dist/components/jams/useJamHands.d.ts +7 -0
- package/dist/components/jams/useJamHands.js +39 -0
- package/dist/components/jams/useJamLiveKitTheme.d.ts +3 -0
- package/dist/components/jams/useJamLiveKitTheme.js +10 -0
- package/dist/components/layout/AccessDenied.d.ts +14 -0
- package/dist/components/layout/AccessDenied.js +28 -0
- package/dist/components/layout/AccessDeniedLoader.d.ts +16 -0
- package/dist/components/layout/AccessDeniedLoader.js +12 -0
- package/dist/components/layout/Auth.d.ts +22 -0
- package/dist/components/layout/Auth.js +82 -0
- package/dist/components/layout/IdentityContext.d.ts +17 -0
- package/dist/components/layout/IdentityContext.js +38 -0
- package/dist/components/layout/Infos.d.ts +5 -0
- package/dist/components/layout/Infos.js +42 -0
- package/dist/components/layout/OpenpeepsContextProvider.d.ts +10 -0
- package/dist/components/layout/OpenpeepsContextProvider.js +63 -0
- package/dist/components/layout/OpenpeepsThemeProvider.d.ts +11 -0
- package/dist/components/layout/OpenpeepsThemeProvider.js +47 -0
- package/dist/components/layout/ProfileGuard.d.ts +14 -0
- package/dist/components/layout/ProfileGuard.js +38 -0
- package/dist/components/layout/ProfileProvider.d.ts +10 -0
- package/dist/components/layout/ProfileProvider.js +60 -0
- package/dist/components/layout/Root.d.ts +16 -0
- package/dist/components/layout/Root.js +36 -0
- package/dist/components/layout/ToastProvider.d.ts +22 -0
- package/dist/components/layout/ToastProvider.js +37 -0
- package/dist/components/layout/index.d.ts +21 -0
- package/dist/components/layout/index.js +11 -0
- package/dist/components/markdown/CompiledMarkdown.d.ts +5 -0
- package/dist/components/markdown/CompiledMarkdown.js +3 -0
- package/dist/components/markdown/OpenpeepsMarkdown.d.ts +16 -0
- package/dist/components/markdown/OpenpeepsMarkdown.js +66 -0
- package/dist/components/markdown/classes.d.ts +2 -0
- package/dist/components/markdown/classes.js +2 -0
- package/dist/components/markdown/compileMarkdown.d.ts +5 -0
- package/dist/components/markdown/compileMarkdown.js +36 -0
- package/dist/components/markdown/index.d.ts +11 -0
- package/dist/components/markdown/index.js +7 -0
- package/dist/components/markdown/linkTargets.d.ts +3 -0
- package/dist/components/markdown/linkTargets.js +27 -0
- package/dist/components/markdown/staticRender.d.ts +16 -0
- package/dist/components/markdown/staticRender.js +17 -0
- package/dist/components/navigation/ContentHeader.d.ts +1 -0
- package/dist/components/navigation/ContentHeader.js +18 -0
- package/dist/components/navigation/FooterMobile.d.ts +5 -0
- package/dist/components/navigation/FooterMobile.js +8 -0
- package/dist/components/navigation/HeaderMobile.d.ts +11 -0
- package/dist/components/navigation/HeaderMobile.js +26 -0
- package/dist/components/navigation/MobileMenuItem.d.ts +7 -0
- package/dist/components/navigation/MobileMenuItem.js +13 -0
- package/dist/components/navigation/PageHeaderAction.d.ts +5 -0
- package/dist/components/navigation/PageHeaderAction.js +7 -0
- package/dist/components/navigation/PlusButton.d.ts +1 -0
- package/dist/components/navigation/PlusButton.js +11 -0
- package/dist/components/navigation/SideBar.d.ts +16 -0
- package/dist/components/navigation/SideBar.js +24 -0
- package/dist/components/navigation/SidebarNavContext.d.ts +3 -0
- package/dist/components/navigation/SidebarNavContext.js +4 -0
- package/dist/components/navigation/breadcrumbs/Breadcrumbs.d.ts +1 -0
- package/dist/components/navigation/breadcrumbs/Breadcrumbs.js +10 -0
- package/dist/components/navigation/breadcrumbs/Crumb.d.ts +5 -0
- package/dist/components/navigation/breadcrumbs/Crumb.js +4 -0
- package/dist/components/navigation/index.d.ts +17 -0
- package/dist/components/navigation/index.js +11 -0
- package/dist/components/navigation/sideBarNavLinkClass.d.ts +4 -0
- package/dist/components/navigation/sideBarNavLinkClass.js +3 -0
- package/dist/components/notifications/NotificationErrorBoundary.d.ts +16 -0
- package/dist/components/notifications/NotificationErrorBoundary.js +21 -0
- package/dist/components/notifications/NotificationHeaderActions.d.ts +6 -0
- package/dist/components/notifications/NotificationHeaderActions.js +35 -0
- package/dist/components/notifications/NotificationItem.d.ts +5 -0
- package/dist/components/notifications/NotificationItem.js +6 -0
- package/dist/components/notifications/NotificationWrapper.d.ts +10 -0
- package/dist/components/notifications/NotificationWrapper.js +6 -0
- package/dist/components/notifications/NotificationsList.d.ts +12 -0
- package/dist/components/notifications/NotificationsList.js +88 -0
- package/dist/components/notifications/TypedNotification.d.ts +4 -0
- package/dist/components/notifications/TypedNotification.js +201 -0
- package/dist/components/notifications/index.d.ts +7 -0
- package/dist/components/notifications/index.js +5 -0
- package/dist/components/post/Feed.d.ts +20 -0
- package/dist/components/post/Feed.js +63 -0
- package/dist/components/post/FeedPost.d.ts +17 -0
- package/dist/components/post/FeedPost.js +31 -0
- package/dist/components/post/FeedPostContent.d.ts +5 -0
- package/dist/components/post/FeedPostContent.js +22 -0
- package/dist/components/post/FullPostLayout.d.ts +7 -0
- package/dist/components/post/FullPostLayout.js +23 -0
- package/dist/components/post/Markdown.d.ts +2 -0
- package/dist/components/post/Markdown.js +1 -0
- package/dist/components/post/NewEventButton.d.ts +14 -0
- package/dist/components/post/NewEventButton.js +39 -0
- package/dist/components/post/NewNoteButton.d.ts +14 -0
- package/dist/components/post/NewNoteButton.js +38 -0
- package/dist/components/post/PinnedPost.d.ts +5 -0
- package/dist/components/post/PinnedPost.js +15 -0
- package/dist/components/post/PostDetail.d.ts +4 -0
- package/dist/components/post/PostDetail.js +31 -0
- package/dist/components/post/ReplyBox.d.ts +5 -0
- package/dist/components/post/ReplyBox.js +30 -0
- package/dist/components/post/VideoPlayOverlay.d.ts +5 -0
- package/dist/components/post/VideoPlayOverlay.js +8 -0
- package/dist/components/post/attachmentPreview.d.ts +5 -0
- package/dist/components/post/attachmentPreview.js +14 -0
- package/dist/components/post/feed/events/EventsFeed.d.ts +7 -0
- package/dist/components/post/feed/events/EventsFeed.js +44 -0
- package/dist/components/post/feed/threaded/ThreadPost.d.ts +9 -0
- package/dist/components/post/feed/threaded/ThreadPost.js +19 -0
- package/dist/components/post/feed/threaded/ThreadedFeed.d.ts +10 -0
- package/dist/components/post/feed/threaded/ThreadedFeed.js +8 -0
- package/dist/components/post/helpers.d.ts +6 -0
- package/dist/components/post/helpers.js +24 -0
- package/dist/components/post/index.d.ts +78 -0
- package/dist/components/post/index.js +57 -0
- package/dist/components/post/pieces/Attachments.d.ts +5 -0
- package/dist/components/post/pieces/Attachments.js +44 -0
- package/dist/components/post/pieces/EventLocation.d.ts +7 -0
- package/dist/components/post/pieces/EventLocation.js +28 -0
- package/dist/components/post/pieces/EventMenu.d.ts +6 -0
- package/dist/components/post/pieces/EventMenu.js +35 -0
- package/dist/components/post/pieces/EventRsvpButton.d.ts +5 -0
- package/dist/components/post/pieces/EventRsvpButton.js +60 -0
- package/dist/components/post/pieces/FeedPostStats.d.ts +5 -0
- package/dist/components/post/pieces/FeedPostStats.js +27 -0
- package/dist/components/post/pieces/GalleryModal.d.ts +7 -0
- package/dist/components/post/pieces/GalleryModal.js +16 -0
- package/dist/components/post/pieces/ParticipantsCard.d.ts +8 -0
- package/dist/components/post/pieces/ParticipantsCard.js +13 -0
- package/dist/components/post/pieces/PollContent.d.ts +5 -0
- package/dist/components/post/pieces/PollContent.js +109 -0
- package/dist/components/post/pieces/PostActions.d.ts +6 -0
- package/dist/components/post/pieces/PostActions.js +63 -0
- package/dist/components/post/pieces/PostInfoHeader.d.ts +7 -0
- package/dist/components/post/pieces/PostInfoHeader.js +8 -0
- package/dist/components/post/pieces/PostMenu.d.ts +6 -0
- package/dist/components/post/pieces/PostMenu.js +77 -0
- package/dist/components/post/pieces/PostReactionHeader.d.ts +12 -0
- package/dist/components/post/pieces/PostReactionHeader.js +31 -0
- package/dist/components/post/pieces/ShareMenu.d.ts +6 -0
- package/dist/components/post/pieces/ShareMenu.js +46 -0
- package/dist/components/post/pieces/UnreadPostIndicator.d.ts +9 -0
- package/dist/components/post/pieces/UnreadPostIndicator.js +6 -0
- package/dist/components/post/pieces/VideoPlayer.d.ts +16 -0
- package/dist/components/post/pieces/VideoPlayer.js +127 -0
- package/dist/components/post/pieces/modals/DeletePostModal.d.ts +8 -0
- package/dist/components/post/pieces/modals/DeletePostModal.js +20 -0
- package/dist/components/post/pieces/modals/ReactionsModal.d.ts +7 -0
- package/dist/components/post/pieces/modals/ReactionsModal.js +11 -0
- package/dist/components/post/pieces/modals/RepostModal.d.ts +7 -0
- package/dist/components/post/pieces/modals/RepostModal.js +13 -0
- package/dist/components/post/post-form/ArticleForm.d.ts +7 -0
- package/dist/components/post/post-form/ArticleForm.js +45 -0
- package/dist/components/post/post-form/AttachmentCard.d.ts +29 -0
- package/dist/components/post/post-form/AttachmentCard.js +120 -0
- package/dist/components/post/post-form/ComposeAttachments.d.ts +25 -0
- package/dist/components/post/post-form/ComposeAttachments.js +137 -0
- package/dist/components/post/post-form/ComposePreviewLinks.d.ts +4 -0
- package/dist/components/post/post-form/ComposePreviewLinks.js +9 -0
- package/dist/components/post/post-form/DescriptionEditModal.d.ts +13 -0
- package/dist/components/post/post-form/DescriptionEditModal.js +22 -0
- package/dist/components/post/post-form/EditPostModal.d.ts +6 -0
- package/dist/components/post/post-form/EditPostModal.js +81 -0
- package/dist/components/post/post-form/EditPostModalContext.d.ts +10 -0
- package/dist/components/post/post-form/EditPostModalContext.js +18 -0
- package/dist/components/post/post-form/EventForm.d.ts +7 -0
- package/dist/components/post/post-form/EventForm.js +104 -0
- package/dist/components/post/post-form/EventTypeSwitcher.d.ts +8 -0
- package/dist/components/post/post-form/EventTypeSwitcher.js +165 -0
- package/dist/components/post/post-form/NewPostModal.d.ts +13 -0
- package/dist/components/post/post-form/NewPostModal.js +272 -0
- package/dist/components/post/post-form/NewPostModalContext.d.ts +15 -0
- package/dist/components/post/post-form/NewPostModalContext.js +20 -0
- package/dist/components/post/post-form/OpenpeepsMarkdownInput.d.ts +19 -0
- package/dist/components/post/post-form/OpenpeepsMarkdownInput.js +65 -0
- package/dist/components/post/post-form/PollComposerFields.d.ts +12 -0
- package/dist/components/post/post-form/PollComposerFields.js +19 -0
- package/dist/components/post/post-form/PostAudienceSelector.d.ts +12 -0
- package/dist/components/post/post-form/PostAudienceSelector.js +83 -0
- package/dist/components/post/post-form/PostTypeSwitcher.d.ts +16 -0
- package/dist/components/post/post-form/PostTypeSwitcher.js +22 -0
- package/dist/components/post/post-form/ReplyModal.d.ts +6 -0
- package/dist/components/post/post-form/ReplyModal.js +202 -0
- package/dist/components/post/post-form/ReplyModalContext.d.ts +10 -0
- package/dist/components/post/post-form/ReplyModalContext.js +18 -0
- package/dist/components/post/post-form/VisibilitySelector.d.ts +8 -0
- package/dist/components/post/post-form/VisibilitySelector.js +35 -0
- package/dist/components/post/post-form/audienceChoices.d.ts +14 -0
- package/dist/components/post/post-form/audienceChoices.js +66 -0
- package/dist/components/post/types/Article.d.ts +5 -0
- package/dist/components/post/types/Article.js +14 -0
- package/dist/components/post/types/Event.d.ts +5 -0
- package/dist/components/post/types/Event.js +19 -0
- package/dist/components/post/types/Note.d.ts +5 -0
- package/dist/components/post/types/Note.js +10 -0
- package/dist/components/post/types/Poll.d.ts +7 -0
- package/dist/components/post/types/Poll.js +11 -0
- package/dist/components/post/types/article/FullArticle.d.ts +5 -0
- package/dist/components/post/types/article/FullArticle.js +8 -0
- package/dist/components/post/types/event/CardEvent.d.ts +5 -0
- package/dist/components/post/types/event/CardEvent.js +45 -0
- package/dist/components/post/types/event/FullEvent.d.ts +5 -0
- package/dist/components/post/types/event/FullEvent.js +161 -0
- package/dist/components/post/types/event/ProfileEventRelationship.d.ts +5 -0
- package/dist/components/post/types/event/ProfileEventRelationship.js +31 -0
- package/dist/components/post/types/note/FullNote.d.ts +5 -0
- package/dist/components/post/types/note/FullNote.js +5 -0
- package/dist/components/post/types/poll/FullPoll.d.ts +5 -0
- package/dist/components/post/types/poll/FullPoll.js +7 -0
- package/dist/components/post/visibility.d.ts +7 -0
- package/dist/components/post/visibility.js +10 -0
- package/dist/components/preview-link/LocalPreviewLink.d.ts +4 -0
- package/dist/components/preview-link/LocalPreviewLink.js +12 -0
- package/dist/components/preview-link/PreviewLink.d.ts +4 -0
- package/dist/components/preview-link/PreviewLink.js +11 -0
- package/dist/components/preview-link/RemotePreviewLink.d.ts +4 -0
- package/dist/components/preview-link/RemotePreviewLink.js +21 -0
- package/dist/components/preview-link/helpers.d.ts +7 -0
- package/dist/components/preview-link/helpers.js +31 -0
- package/dist/components/preview-link/index.d.ts +3 -0
- package/dist/components/preview-link/index.js +2 -0
- package/dist/components/preview-link/local/GroupPreview.d.ts +4 -0
- package/dist/components/preview-link/local/GroupPreview.js +15 -0
- package/dist/components/preview-link/local/JamPreview.d.ts +9 -0
- package/dist/components/preview-link/local/JamPreview.js +20 -0
- package/dist/components/preview-link/local/PostPreview.d.ts +4 -0
- package/dist/components/preview-link/local/PostPreview.js +15 -0
- package/dist/components/profile/Avatar.d.ts +17 -0
- package/dist/components/profile/Avatar.js +36 -0
- package/dist/components/profile/AvatarWithName.d.ts +5 -0
- package/dist/components/profile/AvatarWithName.js +5 -0
- package/dist/components/profile/FollowUnfollowButton.d.ts +8 -0
- package/dist/components/profile/FollowUnfollowButton.js +27 -0
- package/dist/components/profile/ProfileBadge.d.ts +7 -0
- package/dist/components/profile/ProfileBadge.js +12 -0
- package/dist/components/profile/ProfileCard.d.ts +24 -0
- package/dist/components/profile/ProfileCard.js +12 -0
- package/dist/components/profile/ProfileFromId.d.ts +6 -0
- package/dist/components/profile/ProfileFromId.js +15 -0
- package/dist/components/profile/ProfileHeader.d.ts +10 -0
- package/dist/components/profile/ProfileHeader.js +16 -0
- package/dist/components/profile/ProfileLink.d.ts +9 -0
- package/dist/components/profile/ProfileLink.js +9 -0
- package/dist/components/profile/ProfilePageAction.d.ts +6 -0
- package/dist/components/profile/ProfilePageAction.js +35 -0
- package/dist/components/profile/ProfilePostsAndReplies.d.ts +9 -0
- package/dist/components/profile/ProfilePostsAndReplies.js +24 -0
- package/dist/components/profile/ProfileSelector.d.ts +14 -0
- package/dist/components/profile/ProfileSelector.js +72 -0
- package/dist/components/profile/ProfileStats.d.ts +5 -0
- package/dist/components/profile/ProfileStats.js +6 -0
- package/dist/components/profile/ProfileWithActionCard.d.ts +5 -0
- package/dist/components/profile/ProfileWithActionCard.js +6 -0
- package/dist/components/profile/ProfilesInput.d.ts +15 -0
- package/dist/components/profile/ProfilesInput.js +31 -0
- package/dist/components/profile/ReportProfileOrPostModal.d.ts +9 -0
- package/dist/components/profile/ReportProfileOrPostModal.js +75 -0
- package/dist/components/profile/index.d.ts +30 -0
- package/dist/components/profile/index.js +15 -0
- package/dist/components/registry/ErrorComponent.d.ts +6 -0
- package/dist/components/registry/ErrorComponent.js +7 -0
- package/dist/components/registry/PluginLoader.d.ts +3 -0
- package/dist/components/registry/PluginLoader.js +51 -0
- package/dist/components/registry/PluginRegistryProvider.d.ts +23 -0
- package/dist/components/registry/PluginRegistryProvider.js +57 -0
- package/dist/components/registry/PluginSlot.d.ts +7 -0
- package/dist/components/registry/PluginSlot.js +31 -0
- package/dist/components/registry/index.d.ts +10 -0
- package/dist/components/registry/index.js +16 -0
- package/dist/components/server-data/ServerDataProvider.d.ts +8 -0
- package/dist/components/server-data/ServerDataProvider.js +30 -0
- package/dist/components/server-data/context.d.ts +121 -0
- package/dist/components/server-data/context.js +10 -0
- package/dist/components/server-data/index.d.ts +4 -0
- package/dist/components/server-data/index.js +2 -0
- package/dist/components/server-data/types.d.ts +5 -0
- package/dist/components/server-data/types.js +1 -0
- package/dist/contexts/credentialsStore/index.d.ts +8 -0
- package/dist/contexts/credentialsStore/index.js +13 -0
- package/dist/contexts/credentialsStore/types.d.ts +4 -0
- package/dist/contexts/credentialsStore/types.js +1 -0
- package/dist/contexts/index.d.ts +3 -0
- package/dist/contexts/index.js +3 -0
- package/dist/contexts/openpeeps/helpers.d.ts +93 -0
- package/dist/contexts/openpeeps/helpers.js +311 -0
- package/dist/contexts/openpeeps/hooks/accounts.d.ts +302 -0
- package/dist/contexts/openpeeps/hooks/accounts.js +17 -0
- package/dist/contexts/openpeeps/hooks/admin.d.ts +17177 -0
- package/dist/contexts/openpeeps/hooks/admin.js +115 -0
- package/dist/contexts/openpeeps/hooks/auth.d.ts +55 -0
- package/dist/contexts/openpeeps/hooks/auth.js +22 -0
- package/dist/contexts/openpeeps/hooks/conversations.d.ts +9815 -0
- package/dist/contexts/openpeeps/hooks/conversations.js +6 -0
- package/dist/contexts/openpeeps/hooks/groups.d.ts +319 -0
- package/dist/contexts/openpeeps/hooks/groups.js +31 -0
- package/dist/contexts/openpeeps/hooks/index.d.ts +18 -0
- package/dist/contexts/openpeeps/hooks/index.js +26 -0
- package/dist/contexts/openpeeps/hooks/jams.d.ts +3318 -0
- package/dist/contexts/openpeeps/hooks/jams.js +32 -0
- package/dist/contexts/openpeeps/hooks/other.d.ts +239 -0
- package/dist/contexts/openpeeps/hooks/other.js +89 -0
- package/dist/contexts/openpeeps/hooks/payments.d.ts +36 -0
- package/dist/contexts/openpeeps/hooks/payments.js +10 -0
- package/dist/contexts/openpeeps/hooks/posts.d.ts +26001 -0
- package/dist/contexts/openpeeps/hooks/posts.js +139 -0
- package/dist/contexts/openpeeps/hooks/profiles.d.ts +6896 -0
- package/dist/contexts/openpeeps/hooks/profiles.js +43 -0
- package/dist/contexts/openpeeps/hooks/search.d.ts +9620 -0
- package/dist/contexts/openpeeps/hooks/search.js +24 -0
- package/dist/contexts/openpeeps/hooks/streaming.d.ts +26 -0
- package/dist/contexts/openpeeps/hooks/streaming.js +10 -0
- package/dist/contexts/openpeeps/hooks/useHasAuthToken.d.ts +2 -0
- package/dist/contexts/openpeeps/hooks/useHasAuthToken.js +35 -0
- package/dist/contexts/openpeeps/index.d.ts +21 -0
- package/dist/contexts/openpeeps/index.js +180 -0
- package/dist/contexts/openpeeps/types.d.ts +11 -0
- package/dist/contexts/openpeeps/types.js +1 -0
- package/dist/contexts/router/index.d.ts +28 -0
- package/dist/contexts/router/index.js +69 -0
- package/dist/email/index.d.ts +13 -0
- package/dist/email/index.js +10 -0
- package/dist/i18n/I18nProvider.d.ts +19 -0
- package/dist/i18n/I18nProvider.js +33 -0
- package/dist/i18n/context.d.ts +8 -0
- package/dist/i18n/context.js +10 -0
- package/dist/i18n/index.d.ts +5 -0
- package/dist/i18n/index.js +23 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +14 -0
- package/dist/lib/apiErrorMessage.d.ts +3 -0
- package/dist/lib/apiErrorMessage.js +14 -0
- package/dist/lib/canvasUtils.d.ts +12 -0
- package/dist/lib/canvasUtils.js +104 -0
- package/dist/lib/configuration/helpers.d.ts +7 -0
- package/dist/lib/configuration/helpers.js +83 -0
- package/dist/lib/configuration/resolveSchema.d.ts +3 -0
- package/dist/lib/configuration/resolveSchema.js +8 -0
- package/dist/lib/groupCapabilityHelpers.d.ts +24 -0
- package/dist/lib/groupCapabilityHelpers.js +119 -0
- package/dist/lib/notificationBadge.d.ts +5 -0
- package/dist/lib/notificationBadge.js +25 -0
- package/dist/lib/postUnread.d.ts +2 -0
- package/dist/lib/postUnread.js +1 -0
- package/dist/lib/postViewCounter.d.ts +17 -0
- package/dist/lib/postViewCounter.js +162 -0
- package/dist/lib/threadHelpers.d.ts +5 -0
- package/dist/lib/threadHelpers.js +23 -0
- package/dist/lib/unseenCountsOptimistic.d.ts +15 -0
- package/dist/lib/unseenCountsOptimistic.js +43 -0
- package/dist/log/index.d.ts +11 -0
- package/dist/log/index.js +14 -0
- package/dist/push/index.d.ts +16 -0
- package/dist/push/index.js +145 -0
- package/dist/push/usePushSubscription.d.ts +18 -0
- package/dist/push/usePushSubscription.js +102 -0
- package/dist/push/vapid.d.ts +6 -0
- package/dist/push/vapid.js +12 -0
- package/dist/pwa/InstallPrompt.d.ts +13 -0
- package/dist/pwa/InstallPrompt.js +17 -0
- package/dist/pwa/NotificationPermissionPrompt.d.ts +22 -0
- package/dist/pwa/NotificationPermissionPrompt.js +56 -0
- package/dist/pwa/PwaProvider.d.ts +16 -0
- package/dist/pwa/PwaProvider.js +56 -0
- package/dist/pwa/UpdatePrompt.d.ts +14 -0
- package/dist/pwa/UpdatePrompt.js +14 -0
- package/dist/pwa/index.d.ts +18 -0
- package/dist/pwa/index.js +16 -0
- package/dist/pwa/navigationUrl.d.ts +16 -0
- package/dist/pwa/navigationUrl.js +51 -0
- package/dist/pwa/pushInvalidate.d.ts +7 -0
- package/dist/pwa/pushInvalidate.js +29 -0
- package/dist/pwa/registration.d.ts +28 -0
- package/dist/pwa/registration.js +71 -0
- package/dist/pwa/sw-types.d.ts +14 -0
- package/dist/pwa/sw-types.js +1 -0
- package/dist/pwa/sw.d.ts +2 -0
- package/dist/pwa/sw.js +171 -0
- package/dist/pwa/useInstallPrompt.d.ts +10 -0
- package/dist/pwa/useInstallPrompt.js +45 -0
- package/dist/pwa/useNotificationBadgeSync.d.ts +2 -0
- package/dist/pwa/useNotificationBadgeSync.js +23 -0
- package/dist/pwa/useServiceWorker.d.ts +19 -0
- package/dist/pwa/useServiceWorker.js +49 -0
- package/dist/pwa/vite.d.ts +50 -0
- package/dist/pwa/vite.js +53 -0
- package/dist/react-native.d.ts +11 -0
- package/dist/react-native.js +11 -0
- package/dist/setupTests.d.ts +1 -0
- package/dist/setupTests.js +5 -0
- package/dist/stores/breadcrumbs.d.ts +5 -0
- package/dist/stores/breadcrumbs.js +5 -0
- package/dist/stores/createStore.d.ts +19 -0
- package/dist/stores/createStore.js +63 -0
- package/dist/stores/index.d.ts +7 -0
- package/dist/stores/index.js +9 -0
- package/dist/stores/newPosts.d.ts +591 -0
- package/dist/stores/newPosts.js +191 -0
- package/dist/stores/pageHeader.d.ts +15 -0
- package/dist/stores/pageHeader.js +22 -0
- package/dist/stores/plusButton.d.ts +5 -0
- package/dist/stores/plusButton.js +13 -0
- package/dist/stores/types.d.ts +35 -0
- package/dist/stores/types.js +1 -0
- package/dist/streaming.d.ts +6 -0
- package/dist/streaming.js +6 -0
- package/dist/types/index.d.ts +0 -0
- package/dist/types/index.js +1 -0
- package/package.json +72 -0
- package/src/pwa/navigationUrl.ts +61 -0
- package/src/pwa/sw-types.ts +9 -0
- package/src/pwa/sw.ts +228 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { apiHook, payloadMutation } from '../helpers.js';
|
|
2
|
+
export const conversationHooks = (client) => ({
|
|
3
|
+
useConversations: () => apiHook(client.conversations.list),
|
|
4
|
+
useConversation: (id) => apiHook(client.conversations.findById, { pathParams: { id } }),
|
|
5
|
+
createConversationPostAction: payloadMutation(client.conversations.newPost, [['conversations']]),
|
|
6
|
+
});
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import type { OpenpeepsClient } from '@openpeepshq/client';
|
|
2
|
+
export type GroupHooks = ReturnType<typeof groupHooks>;
|
|
3
|
+
export declare const groupHooks: (client: OpenpeepsClient) => {
|
|
4
|
+
createGroupAction: (defaultPathParams?: undefined) => (input: {
|
|
5
|
+
handle: string;
|
|
6
|
+
capabilities: Record<string, {
|
|
7
|
+
add?: string[] | undefined;
|
|
8
|
+
remove?: string[] | undefined;
|
|
9
|
+
} | undefined>;
|
|
10
|
+
avatar?: string | null | undefined;
|
|
11
|
+
header?: string | null | undefined;
|
|
12
|
+
displayName?: string | undefined;
|
|
13
|
+
description?: string | undefined;
|
|
14
|
+
rules?: string | undefined;
|
|
15
|
+
pinnedPostId?: string | undefined;
|
|
16
|
+
discoverable?: boolean | undefined;
|
|
17
|
+
members?: {
|
|
18
|
+
id: string;
|
|
19
|
+
type: "guest" | "local" | "federated";
|
|
20
|
+
createdAt: string;
|
|
21
|
+
updatedAt: string;
|
|
22
|
+
handle: string;
|
|
23
|
+
memberships: {
|
|
24
|
+
group: {
|
|
25
|
+
handle: string;
|
|
26
|
+
capabilities: Record<string, {
|
|
27
|
+
add?: string[] | undefined;
|
|
28
|
+
remove?: string[] | undefined;
|
|
29
|
+
} | undefined>;
|
|
30
|
+
id: string;
|
|
31
|
+
createdAt: string;
|
|
32
|
+
updatedAt: string;
|
|
33
|
+
avatar?: string | null | undefined;
|
|
34
|
+
header?: string | null | undefined;
|
|
35
|
+
displayName?: string | undefined;
|
|
36
|
+
description?: string | undefined;
|
|
37
|
+
rules?: string | undefined;
|
|
38
|
+
pinnedPostId?: string | undefined;
|
|
39
|
+
discoverable?: boolean | undefined;
|
|
40
|
+
deletedAt?: string | null | undefined;
|
|
41
|
+
};
|
|
42
|
+
roles?: ("none" | "local" | "member" | "admin" | "moderator" | "invited")[] | null | undefined;
|
|
43
|
+
}[] | undefined;
|
|
44
|
+
deletedAt?: string | null | undefined;
|
|
45
|
+
avatar?: string | null | undefined;
|
|
46
|
+
header?: string | null | undefined;
|
|
47
|
+
displayName?: string | undefined;
|
|
48
|
+
bio?: string | undefined;
|
|
49
|
+
location?: {
|
|
50
|
+
text: string;
|
|
51
|
+
coordinates?: {
|
|
52
|
+
lat: number;
|
|
53
|
+
lng: number;
|
|
54
|
+
alt?: number | undefined;
|
|
55
|
+
} | undefined;
|
|
56
|
+
} | undefined;
|
|
57
|
+
locked?: boolean | undefined;
|
|
58
|
+
bot?: boolean | undefined;
|
|
59
|
+
discoverable?: boolean | undefined;
|
|
60
|
+
fields?: {
|
|
61
|
+
name: string;
|
|
62
|
+
value: string;
|
|
63
|
+
}[] | undefined;
|
|
64
|
+
profileStats?: {
|
|
65
|
+
followersCount: number;
|
|
66
|
+
followingCount: number;
|
|
67
|
+
} | undefined;
|
|
68
|
+
}[] | undefined;
|
|
69
|
+
}, pathParams?: undefined, queryParams?: undefined, headers?: Record<string, string>) => Promise<{
|
|
70
|
+
handle: string;
|
|
71
|
+
capabilities: Record<string, {
|
|
72
|
+
add?: string[] | undefined;
|
|
73
|
+
remove?: string[] | undefined;
|
|
74
|
+
} | undefined>;
|
|
75
|
+
membersCount: number;
|
|
76
|
+
id: string;
|
|
77
|
+
createdAt: string;
|
|
78
|
+
updatedAt: string;
|
|
79
|
+
avatar?: string | null | undefined;
|
|
80
|
+
header?: string | null | undefined;
|
|
81
|
+
displayName?: string | undefined;
|
|
82
|
+
description?: string | undefined;
|
|
83
|
+
rules?: string | undefined;
|
|
84
|
+
pinnedPostId?: string | undefined;
|
|
85
|
+
discoverable?: boolean | undefined;
|
|
86
|
+
lastPostAt?: string | null | undefined;
|
|
87
|
+
deletedAt?: string | null | undefined;
|
|
88
|
+
}>;
|
|
89
|
+
useGroups: () => import("@tanstack/react-query").UseQueryResult<{
|
|
90
|
+
handle: string;
|
|
91
|
+
capabilities: Record<string, {
|
|
92
|
+
add?: string[] | undefined;
|
|
93
|
+
remove?: string[] | undefined;
|
|
94
|
+
} | undefined>;
|
|
95
|
+
membersCount: number;
|
|
96
|
+
id: string;
|
|
97
|
+
createdAt: string;
|
|
98
|
+
updatedAt: string;
|
|
99
|
+
avatar?: string | null | undefined;
|
|
100
|
+
header?: string | null | undefined;
|
|
101
|
+
displayName?: string | undefined;
|
|
102
|
+
description?: string | undefined;
|
|
103
|
+
rules?: string | undefined;
|
|
104
|
+
pinnedPostId?: string | undefined;
|
|
105
|
+
discoverable?: boolean | undefined;
|
|
106
|
+
lastPostAt?: string | null | undefined;
|
|
107
|
+
deletedAt?: string | null | undefined;
|
|
108
|
+
}[], {
|
|
109
|
+
success: boolean;
|
|
110
|
+
message?: string | undefined;
|
|
111
|
+
key?: string | undefined;
|
|
112
|
+
}>;
|
|
113
|
+
useGroup: (id: string) => import("@tanstack/react-query").UseQueryResult<{
|
|
114
|
+
handle: string;
|
|
115
|
+
capabilities: Record<string, {
|
|
116
|
+
add?: string[] | undefined;
|
|
117
|
+
remove?: string[] | undefined;
|
|
118
|
+
} | undefined>;
|
|
119
|
+
membersCount: number;
|
|
120
|
+
id: string;
|
|
121
|
+
createdAt: string;
|
|
122
|
+
updatedAt: string;
|
|
123
|
+
avatar?: string | null | undefined;
|
|
124
|
+
header?: string | null | undefined;
|
|
125
|
+
displayName?: string | undefined;
|
|
126
|
+
description?: string | undefined;
|
|
127
|
+
rules?: string | undefined;
|
|
128
|
+
pinnedPostId?: string | undefined;
|
|
129
|
+
discoverable?: boolean | undefined;
|
|
130
|
+
lastPostAt?: string | null | undefined;
|
|
131
|
+
deletedAt?: string | null | undefined;
|
|
132
|
+
}, {
|
|
133
|
+
success: boolean;
|
|
134
|
+
message?: string | undefined;
|
|
135
|
+
key?: string | undefined;
|
|
136
|
+
}>;
|
|
137
|
+
useGroupByHandle: (handle: string) => import("@tanstack/react-query").UseQueryResult<{
|
|
138
|
+
handle: string;
|
|
139
|
+
capabilities: Record<string, {
|
|
140
|
+
add?: string[] | undefined;
|
|
141
|
+
remove?: string[] | undefined;
|
|
142
|
+
} | undefined>;
|
|
143
|
+
membersCount: number;
|
|
144
|
+
id: string;
|
|
145
|
+
createdAt: string;
|
|
146
|
+
updatedAt: string;
|
|
147
|
+
avatar?: string | null | undefined;
|
|
148
|
+
header?: string | null | undefined;
|
|
149
|
+
displayName?: string | undefined;
|
|
150
|
+
description?: string | undefined;
|
|
151
|
+
rules?: string | undefined;
|
|
152
|
+
pinnedPostId?: string | undefined;
|
|
153
|
+
discoverable?: boolean | undefined;
|
|
154
|
+
lastPostAt?: string | null | undefined;
|
|
155
|
+
deletedAt?: string | null | undefined;
|
|
156
|
+
}, {
|
|
157
|
+
success: boolean;
|
|
158
|
+
message?: string | undefined;
|
|
159
|
+
key?: string | undefined;
|
|
160
|
+
}>;
|
|
161
|
+
updateGroupAction: (defaultPathParams?: {
|
|
162
|
+
id: string;
|
|
163
|
+
} | undefined) => (input: {
|
|
164
|
+
handle: string;
|
|
165
|
+
capabilities: Record<string, {
|
|
166
|
+
add?: string[] | undefined;
|
|
167
|
+
remove?: string[] | undefined;
|
|
168
|
+
} | undefined>;
|
|
169
|
+
avatar?: string | null | undefined;
|
|
170
|
+
header?: string | null | undefined;
|
|
171
|
+
displayName?: string | undefined;
|
|
172
|
+
description?: string | undefined;
|
|
173
|
+
rules?: string | undefined;
|
|
174
|
+
pinnedPostId?: string | undefined;
|
|
175
|
+
discoverable?: boolean | undefined;
|
|
176
|
+
}, pathParams?: {
|
|
177
|
+
id: string;
|
|
178
|
+
} | undefined, queryParams?: undefined, headers?: Record<string, string>) => Promise<{
|
|
179
|
+
handle: string;
|
|
180
|
+
capabilities: Record<string, {
|
|
181
|
+
add?: string[] | undefined;
|
|
182
|
+
remove?: string[] | undefined;
|
|
183
|
+
} | undefined>;
|
|
184
|
+
membersCount: number;
|
|
185
|
+
id: string;
|
|
186
|
+
createdAt: string;
|
|
187
|
+
updatedAt: string;
|
|
188
|
+
avatar?: string | null | undefined;
|
|
189
|
+
header?: string | null | undefined;
|
|
190
|
+
displayName?: string | undefined;
|
|
191
|
+
description?: string | undefined;
|
|
192
|
+
rules?: string | undefined;
|
|
193
|
+
pinnedPostId?: string | undefined;
|
|
194
|
+
discoverable?: boolean | undefined;
|
|
195
|
+
lastPostAt?: string | null | undefined;
|
|
196
|
+
deletedAt?: string | null | undefined;
|
|
197
|
+
}>;
|
|
198
|
+
deleteGroupAction: (defaultPathParams?: {
|
|
199
|
+
id: string;
|
|
200
|
+
} | undefined) => (pathParams?: {
|
|
201
|
+
id: string;
|
|
202
|
+
} | undefined, queryParams?: undefined, headers?: Record<string, string>) => Promise<{
|
|
203
|
+
handle: string;
|
|
204
|
+
capabilities: Record<string, {
|
|
205
|
+
add?: string[] | undefined;
|
|
206
|
+
remove?: string[] | undefined;
|
|
207
|
+
} | undefined>;
|
|
208
|
+
membersCount: number;
|
|
209
|
+
id: string;
|
|
210
|
+
createdAt: string;
|
|
211
|
+
updatedAt: string;
|
|
212
|
+
avatar?: string | null | undefined;
|
|
213
|
+
header?: string | null | undefined;
|
|
214
|
+
displayName?: string | undefined;
|
|
215
|
+
description?: string | undefined;
|
|
216
|
+
rules?: string | undefined;
|
|
217
|
+
pinnedPostId?: string | undefined;
|
|
218
|
+
discoverable?: boolean | undefined;
|
|
219
|
+
lastPostAt?: string | null | undefined;
|
|
220
|
+
deletedAt?: string | null | undefined;
|
|
221
|
+
}>;
|
|
222
|
+
useGroupMembers: (id: string) => import("@tanstack/react-query").UseQueryResult<import("@openpeepshq/common").GroupMember[], {
|
|
223
|
+
success: boolean;
|
|
224
|
+
message?: string | undefined;
|
|
225
|
+
key?: string | undefined;
|
|
226
|
+
}>;
|
|
227
|
+
joinGroupAction: (defaultPathParams?: {
|
|
228
|
+
id: string;
|
|
229
|
+
} | undefined) => (pathParams?: {
|
|
230
|
+
id: string;
|
|
231
|
+
} | undefined, queryParams?: undefined, headers?: Record<string, string>) => Promise<{
|
|
232
|
+
success: true;
|
|
233
|
+
}>;
|
|
234
|
+
leaveGroupAction: (defaultPathParams?: {
|
|
235
|
+
id: string;
|
|
236
|
+
} | undefined) => (pathParams?: {
|
|
237
|
+
id: string;
|
|
238
|
+
} | undefined, queryParams?: undefined, headers?: Record<string, string>) => Promise<{
|
|
239
|
+
success: true;
|
|
240
|
+
}>;
|
|
241
|
+
addGroupMemberAction: (defaultPathParams?: {
|
|
242
|
+
id: string;
|
|
243
|
+
} | undefined) => (input: {
|
|
244
|
+
id: string;
|
|
245
|
+
type: "guest" | "local" | "federated";
|
|
246
|
+
createdAt: string;
|
|
247
|
+
updatedAt: string;
|
|
248
|
+
handle: string;
|
|
249
|
+
memberships: {
|
|
250
|
+
group: {
|
|
251
|
+
handle: string;
|
|
252
|
+
capabilities: Record<string, {
|
|
253
|
+
add?: string[] | undefined;
|
|
254
|
+
remove?: string[] | undefined;
|
|
255
|
+
} | undefined>;
|
|
256
|
+
id: string;
|
|
257
|
+
createdAt: string;
|
|
258
|
+
updatedAt: string;
|
|
259
|
+
avatar?: string | null | undefined;
|
|
260
|
+
header?: string | null | undefined;
|
|
261
|
+
displayName?: string | undefined;
|
|
262
|
+
description?: string | undefined;
|
|
263
|
+
rules?: string | undefined;
|
|
264
|
+
pinnedPostId?: string | undefined;
|
|
265
|
+
discoverable?: boolean | undefined;
|
|
266
|
+
deletedAt?: string | null | undefined;
|
|
267
|
+
};
|
|
268
|
+
roles?: ("none" | "local" | "member" | "admin" | "moderator" | "invited")[] | null | undefined;
|
|
269
|
+
}[] | undefined;
|
|
270
|
+
deletedAt?: string | null | undefined;
|
|
271
|
+
avatar?: string | null | undefined;
|
|
272
|
+
header?: string | null | undefined;
|
|
273
|
+
displayName?: string | undefined;
|
|
274
|
+
bio?: string | undefined;
|
|
275
|
+
location?: {
|
|
276
|
+
text: string;
|
|
277
|
+
coordinates?: {
|
|
278
|
+
lat: number;
|
|
279
|
+
lng: number;
|
|
280
|
+
alt?: number | undefined;
|
|
281
|
+
} | undefined;
|
|
282
|
+
} | undefined;
|
|
283
|
+
locked?: boolean | undefined;
|
|
284
|
+
bot?: boolean | undefined;
|
|
285
|
+
discoverable?: boolean | undefined;
|
|
286
|
+
fields?: {
|
|
287
|
+
name: string;
|
|
288
|
+
value: string;
|
|
289
|
+
}[] | undefined;
|
|
290
|
+
profileStats?: {
|
|
291
|
+
followersCount: number;
|
|
292
|
+
followingCount: number;
|
|
293
|
+
} | undefined;
|
|
294
|
+
}, pathParams?: {
|
|
295
|
+
id: string;
|
|
296
|
+
} | undefined, queryParams?: undefined, headers?: Record<string, string>) => Promise<{
|
|
297
|
+
success: true;
|
|
298
|
+
}>;
|
|
299
|
+
removeGroupMemberAction: (defaultPathParams?: {
|
|
300
|
+
id: string;
|
|
301
|
+
memberId: string;
|
|
302
|
+
} | undefined) => (pathParams?: {
|
|
303
|
+
id: string;
|
|
304
|
+
memberId: string;
|
|
305
|
+
} | undefined, queryParams?: undefined, headers?: Record<string, string>) => Promise<{
|
|
306
|
+
success: true;
|
|
307
|
+
}>;
|
|
308
|
+
setGroupMemberRolesAction: (defaultPathParams?: {
|
|
309
|
+
id: string;
|
|
310
|
+
memberId: string;
|
|
311
|
+
} | undefined) => (input: {
|
|
312
|
+
roles?: ("local" | "admin" | "none" | "member" | "moderator" | "invited")[] | null | undefined;
|
|
313
|
+
}, pathParams?: {
|
|
314
|
+
id: string;
|
|
315
|
+
memberId: string;
|
|
316
|
+
} | undefined, queryParams?: undefined, headers?: Record<string, string>) => Promise<{
|
|
317
|
+
success: true;
|
|
318
|
+
}>;
|
|
319
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { apiHook, payloadMutation, noPayloadMutation } from '../helpers.js';
|
|
2
|
+
export const groupHooks = (client) => ({
|
|
3
|
+
createGroupAction: payloadMutation(client.groups.create, [
|
|
4
|
+
['groups'],
|
|
5
|
+
['profiles', 'current'],
|
|
6
|
+
]),
|
|
7
|
+
useGroups: () => apiHook(client.groups.list),
|
|
8
|
+
useGroup: (id) => apiHook(client.groups.findById, { pathParams: { id } }),
|
|
9
|
+
useGroupByHandle: (handle) => apiHook(client.groups.findByHandle, {
|
|
10
|
+
pathParams: { handle },
|
|
11
|
+
enabled: !!handle,
|
|
12
|
+
}),
|
|
13
|
+
updateGroupAction: payloadMutation(client.groups.update, [['groups']]),
|
|
14
|
+
deleteGroupAction: noPayloadMutation(client.groups.delete, [['groups']]),
|
|
15
|
+
useGroupMembers: (id) => apiHook(client.groups.members, { pathParams: { id }, enabled: !!id }),
|
|
16
|
+
joinGroupAction: noPayloadMutation(client.groups.join, [
|
|
17
|
+
['groups'],
|
|
18
|
+
['profiles', 'current'],
|
|
19
|
+
]),
|
|
20
|
+
leaveGroupAction: noPayloadMutation(client.groups.leave, [
|
|
21
|
+
['groups'],
|
|
22
|
+
['profiles', 'current'],
|
|
23
|
+
]),
|
|
24
|
+
addGroupMemberAction: payloadMutation(client.groups.addMember, [['groups']]),
|
|
25
|
+
removeGroupMemberAction: noPayloadMutation(client.groups.removeMember, [
|
|
26
|
+
['groups'],
|
|
27
|
+
]),
|
|
28
|
+
setGroupMemberRolesAction: payloadMutation(client.groups.setMemberRoles, [
|
|
29
|
+
['groups'],
|
|
30
|
+
]),
|
|
31
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { OpenpeepsClient } from '@openpeepshq/client';
|
|
2
|
+
import type { ProfileWithMeta, PublicAccount } from '@openpeepshq/common';
|
|
3
|
+
import { type AdminHooks } from './admin';
|
|
4
|
+
import { type AuthHooks } from './auth';
|
|
5
|
+
import { type AccountHooks } from './accounts';
|
|
6
|
+
import { type ConversationHooks } from './conversations';
|
|
7
|
+
import { type GroupHooks } from './groups';
|
|
8
|
+
import { type JamHooks } from './jams';
|
|
9
|
+
import { type PostHooks } from './posts';
|
|
10
|
+
import { type ProfileHooks } from './profiles';
|
|
11
|
+
import { type OtherHooks } from './other';
|
|
12
|
+
import { type PaymentHooks } from './payments';
|
|
13
|
+
import { type SearchHooks } from './search';
|
|
14
|
+
import { type StreamingHooks } from './streaming';
|
|
15
|
+
export declare const buildOpenpeepsApi: (client: OpenpeepsClient, setCurrentProfile: (profile: ProfileWithMeta | undefined) => void, setCurrentAccount: (account: PublicAccount | undefined) => void) => {
|
|
16
|
+
admin: AdminHooks;
|
|
17
|
+
} & AuthHooks & AccountHooks & ConversationHooks & GroupHooks & JamHooks & PostHooks & ProfileHooks & SearchHooks & OtherHooks & PaymentHooks & StreamingHooks;
|
|
18
|
+
export type OpenpeepsApi = ReturnType<typeof buildOpenpeepsApi>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { adminHooks } from './admin.js';
|
|
2
|
+
import { authHooks } from './auth.js';
|
|
3
|
+
import { accountHooks } from './accounts.js';
|
|
4
|
+
import { conversationHooks } from './conversations.js';
|
|
5
|
+
import { groupHooks } from './groups.js';
|
|
6
|
+
import { jamHooks } from './jams.js';
|
|
7
|
+
import { postHooks } from './posts.js';
|
|
8
|
+
import { profileHooks } from './profiles.js';
|
|
9
|
+
import { otherHooks } from './other.js';
|
|
10
|
+
import { paymentHooks } from './payments.js';
|
|
11
|
+
import { searchHooks } from './search.js';
|
|
12
|
+
import { streamingHooks } from './streaming.js';
|
|
13
|
+
export const buildOpenpeepsApi = (client, setCurrentProfile, setCurrentAccount) => ({
|
|
14
|
+
admin: adminHooks(client),
|
|
15
|
+
...authHooks(client, setCurrentProfile, setCurrentAccount),
|
|
16
|
+
...accountHooks(client),
|
|
17
|
+
...conversationHooks(client),
|
|
18
|
+
...groupHooks(client),
|
|
19
|
+
...jamHooks(client),
|
|
20
|
+
...postHooks(client),
|
|
21
|
+
...profileHooks(client, setCurrentProfile),
|
|
22
|
+
...otherHooks(client),
|
|
23
|
+
...searchHooks(client),
|
|
24
|
+
...paymentHooks(client),
|
|
25
|
+
...streamingHooks(client),
|
|
26
|
+
});
|