@replyke/core 7.0.0-beta.101 → 7.0.0-beta.103
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/dist/cjs/config/axios.d.ts +1 -0
- package/dist/cjs/config/axios.js +4 -4
- package/dist/cjs/config/axios.js.map +1 -1
- package/dist/cjs/context/chat-context.d.ts +17 -0
- package/dist/cjs/context/chat-context.js +299 -0
- package/dist/cjs/context/chat-context.js.map +1 -0
- package/dist/cjs/context/conversation-context.d.ts +14 -0
- package/dist/cjs/context/conversation-context.js +231 -0
- package/dist/cjs/context/conversation-context.js.map +1 -0
- package/dist/cjs/context/index.d.ts +3 -0
- package/dist/cjs/context/index.js +13 -1
- package/dist/cjs/context/index.js.map +1 -1
- package/dist/cjs/context/message-thread-context.d.ts +13 -0
- package/dist/cjs/context/message-thread-context.js +32 -0
- package/dist/cjs/context/message-thread-context.js.map +1 -0
- package/dist/cjs/hooks/chat/conversations/index.d.ts +10 -0
- package/dist/cjs/hooks/chat/conversations/index.js +17 -0
- package/dist/cjs/hooks/chat/conversations/index.js.map +1 -0
- package/dist/cjs/hooks/chat/conversations/useConversation.d.ts +18 -0
- package/dist/cjs/hooks/chat/conversations/useConversation.js +134 -0
- package/dist/cjs/hooks/chat/conversations/useConversation.js.map +1 -0
- package/dist/cjs/hooks/chat/conversations/useConversationMembers.d.ts +18 -0
- package/dist/cjs/hooks/chat/conversations/useConversationMembers.js +219 -0
- package/dist/cjs/hooks/chat/conversations/useConversationMembers.js.map +1 -0
- package/dist/cjs/hooks/chat/conversations/useConversations.d.ts +17 -0
- package/dist/cjs/hooks/chat/conversations/useConversations.js +193 -0
- package/dist/cjs/hooks/chat/conversations/useConversations.js.map +1 -0
- package/dist/cjs/hooks/chat/conversations/useCreateDirectConversation.d.ts +6 -0
- package/dist/cjs/hooks/chat/conversations/useCreateDirectConversation.js +83 -0
- package/dist/cjs/hooks/chat/conversations/useCreateDirectConversation.js.map +1 -0
- package/dist/cjs/hooks/chat/conversations/useSpaceConversation.d.ts +10 -0
- package/dist/cjs/hooks/chat/conversations/useSpaceConversation.js +91 -0
- package/dist/cjs/hooks/chat/conversations/useSpaceConversation.js.map +1 -0
- package/dist/cjs/hooks/chat/index.d.ts +15 -0
- package/dist/cjs/hooks/chat/index.js +36 -0
- package/dist/cjs/hooks/chat/index.js.map +1 -0
- package/dist/cjs/hooks/chat/messages/index.d.ts +12 -0
- package/dist/cjs/hooks/chat/messages/index.js +19 -0
- package/dist/cjs/hooks/chat/messages/index.js.map +1 -0
- package/dist/cjs/hooks/chat/messages/useChatMessages.d.ts +15 -0
- package/dist/cjs/hooks/chat/messages/useChatMessages.js +228 -0
- package/dist/cjs/hooks/chat/messages/useChatMessages.js.map +1 -0
- package/dist/cjs/hooks/chat/messages/useDeleteMessage.d.ts +6 -0
- package/dist/cjs/hooks/chat/messages/useDeleteMessage.js +81 -0
- package/dist/cjs/hooks/chat/messages/useDeleteMessage.js.map +1 -0
- package/dist/cjs/hooks/chat/messages/useEditMessage.d.ts +13 -0
- package/dist/cjs/hooks/chat/messages/useEditMessage.js +81 -0
- package/dist/cjs/hooks/chat/messages/useEditMessage.js.map +1 -0
- package/dist/cjs/hooks/chat/messages/useMessageThread.d.ts +15 -0
- package/dist/cjs/hooks/chat/messages/useMessageThread.js +38 -0
- package/dist/cjs/hooks/chat/messages/useMessageThread.js.map +1 -0
- package/dist/cjs/hooks/chat/messages/useSendMessage.d.ts +17 -0
- package/dist/cjs/hooks/chat/messages/useSendMessage.js +156 -0
- package/dist/cjs/hooks/chat/messages/useSendMessage.js.map +1 -0
- package/dist/cjs/hooks/chat/messages/useToggleReaction.d.ts +11 -0
- package/dist/cjs/hooks/chat/messages/useToggleReaction.js +95 -0
- package/dist/cjs/hooks/chat/messages/useToggleReaction.js.map +1 -0
- package/dist/cjs/hooks/chat/useChatSocket.d.ts +11 -0
- package/dist/cjs/hooks/chat/useChatSocket.js +13 -0
- package/dist/cjs/hooks/chat/useChatSocket.js.map +1 -0
- package/dist/cjs/hooks/chat/useConversationData.d.ts +31 -0
- package/dist/cjs/hooks/chat/useConversationData.js +47 -0
- package/dist/cjs/hooks/chat/useConversationData.js.map +1 -0
- package/dist/cjs/hooks/chat/useMarkConversationAsRead.d.ts +10 -0
- package/dist/cjs/hooks/chat/useMarkConversationAsRead.js +87 -0
- package/dist/cjs/hooks/chat/useMarkConversationAsRead.js.map +1 -0
- package/dist/cjs/hooks/chat/useReportMessage.d.ts +8 -0
- package/dist/cjs/hooks/chat/useReportMessage.js +76 -0
- package/dist/cjs/hooks/chat/useReportMessage.js.map +1 -0
- package/dist/cjs/hooks/chat/useTotalUnreadCount.d.ts +6 -0
- package/dist/cjs/hooks/chat/useTotalUnreadCount.js +14 -0
- package/dist/cjs/hooks/chat/useTotalUnreadCount.js.map +1 -0
- package/dist/cjs/hooks/chat/useTypingIndicator.d.ts +21 -0
- package/dist/cjs/hooks/chat/useTypingIndicator.js +68 -0
- package/dist/cjs/hooks/chat/useTypingIndicator.js.map +1 -0
- package/dist/cjs/hooks/comments/index.d.ts +1 -1
- package/dist/cjs/hooks/comments/index.js.map +1 -1
- package/dist/cjs/hooks/comments/useCommentSectionData.d.ts +5 -0
- package/dist/cjs/hooks/comments/useCommentSectionData.js +20 -17
- package/dist/cjs/hooks/comments/useCommentSectionData.js.map +1 -1
- package/dist/cjs/hooks/spaces/index.d.ts +4 -0
- package/dist/cjs/hooks/spaces/index.js +6 -1
- package/dist/cjs/hooks/spaces/index.js.map +1 -1
- package/dist/cjs/hooks/spaces/useSpaceMentions.d.ts +24 -0
- package/dist/cjs/hooks/spaces/useSpaceMentions.js +191 -0
- package/dist/cjs/hooks/spaces/useSpaceMentions.js.map +1 -0
- package/dist/cjs/hooks/spaces/useUnbanMember.d.ts +11 -0
- package/dist/cjs/hooks/spaces/useUnbanMember.js +71 -0
- package/dist/cjs/hooks/spaces/useUnbanMember.js.map +1 -0
- package/dist/cjs/hooks/users/index.d.ts +1 -1
- package/dist/cjs/hooks/users/index.js +3 -3
- package/dist/cjs/hooks/users/index.js.map +1 -1
- package/dist/cjs/hooks/users/{useMentions.d.ts → useUserMentions.d.ts} +8 -4
- package/dist/cjs/hooks/users/{useMentions.js → useUserMentions.js} +22 -17
- package/dist/cjs/hooks/users/useUserMentions.js.map +1 -0
- package/dist/cjs/index.d.ts +11 -5
- package/dist/cjs/index.js +70 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interfaces/models/File.d.ts +1 -0
- package/dist/cjs/interfaces/models/IChatMessage.d.ts +34 -0
- package/dist/cjs/interfaces/models/IChatMessage.js +3 -0
- package/dist/cjs/interfaces/models/IChatMessage.js.map +1 -0
- package/dist/cjs/interfaces/models/IConversation.d.ts +25 -0
- package/dist/cjs/interfaces/models/IConversation.js +3 -0
- package/dist/cjs/interfaces/models/IConversation.js.map +1 -0
- package/dist/cjs/interfaces/models/IConversationMember.d.ts +16 -0
- package/dist/cjs/interfaces/models/IConversationMember.js +3 -0
- package/dist/cjs/interfaces/models/IConversationMember.js.map +1 -0
- package/dist/cjs/interfaces/models/Mention.d.ts +8 -1
- package/dist/cjs/store/api/spacesApi.d.ts +364 -0
- package/dist/cjs/store/api/spacesApi.js +20 -3
- package/dist/cjs/store/api/spacesApi.js.map +1 -1
- package/dist/cjs/store/hooks.d.ts +1 -0
- package/dist/cjs/store/index.d.ts +2 -0
- package/dist/cjs/store/replykeReducers.d.ts +2 -0
- package/dist/cjs/store/replykeReducers.js +2 -0
- package/dist/cjs/store/replykeReducers.js.map +1 -1
- package/dist/cjs/store/rootReducer.d.ts +3 -0
- package/dist/cjs/store/slices/chatSlice.d.ts +120 -0
- package/dist/cjs/store/slices/chatSlice.js +369 -0
- package/dist/cjs/store/slices/chatSlice.js.map +1 -0
- package/dist/cjs/store/slices/entityListsSlice.d.ts +168 -24
- package/dist/cjs/store/slices/spaceListsSlice.d.ts +24 -0
- package/dist/cjs/store/slices/userSlice.d.ts +16 -0
- package/dist/cjs/types/socket.d.ts +73 -0
- package/dist/cjs/types/socket.js +3 -0
- package/dist/cjs/types/socket.js.map +1 -0
- package/dist/esm/config/axios.d.ts +1 -0
- package/dist/esm/config/axios.js +1 -1
- package/dist/esm/config/axios.js.map +1 -1
- package/dist/esm/context/chat-context.d.ts +17 -0
- package/dist/esm/context/chat-context.js +291 -0
- package/dist/esm/context/chat-context.js.map +1 -0
- package/dist/esm/context/conversation-context.d.ts +14 -0
- package/dist/esm/context/conversation-context.js +223 -0
- package/dist/esm/context/conversation-context.js.map +1 -0
- package/dist/esm/context/index.d.ts +3 -0
- package/dist/esm/context/index.js +3 -0
- package/dist/esm/context/index.js.map +1 -1
- package/dist/esm/context/message-thread-context.d.ts +13 -0
- package/dist/esm/context/message-thread-context.js +24 -0
- package/dist/esm/context/message-thread-context.js.map +1 -0
- package/dist/esm/hooks/chat/conversations/index.d.ts +10 -0
- package/dist/esm/hooks/chat/conversations/index.js +6 -0
- package/dist/esm/hooks/chat/conversations/index.js.map +1 -0
- package/dist/esm/hooks/chat/conversations/useConversation.d.ts +18 -0
- package/dist/esm/hooks/chat/conversations/useConversation.js +129 -0
- package/dist/esm/hooks/chat/conversations/useConversation.js.map +1 -0
- package/dist/esm/hooks/chat/conversations/useConversationMembers.d.ts +18 -0
- package/dist/esm/hooks/chat/conversations/useConversationMembers.js +214 -0
- package/dist/esm/hooks/chat/conversations/useConversationMembers.js.map +1 -0
- package/dist/esm/hooks/chat/conversations/useConversations.d.ts +17 -0
- package/dist/esm/hooks/chat/conversations/useConversations.js +188 -0
- package/dist/esm/hooks/chat/conversations/useConversations.js.map +1 -0
- package/dist/esm/hooks/chat/conversations/useCreateDirectConversation.d.ts +6 -0
- package/dist/esm/hooks/chat/conversations/useCreateDirectConversation.js +78 -0
- package/dist/esm/hooks/chat/conversations/useCreateDirectConversation.js.map +1 -0
- package/dist/esm/hooks/chat/conversations/useSpaceConversation.d.ts +10 -0
- package/dist/esm/hooks/chat/conversations/useSpaceConversation.js +86 -0
- package/dist/esm/hooks/chat/conversations/useSpaceConversation.js.map +1 -0
- package/dist/esm/hooks/chat/index.d.ts +15 -0
- package/dist/esm/hooks/chat/index.js +13 -0
- package/dist/esm/hooks/chat/index.js.map +1 -0
- package/dist/esm/hooks/chat/messages/index.d.ts +12 -0
- package/dist/esm/hooks/chat/messages/index.js +7 -0
- package/dist/esm/hooks/chat/messages/index.js.map +1 -0
- package/dist/esm/hooks/chat/messages/useChatMessages.d.ts +15 -0
- package/dist/esm/hooks/chat/messages/useChatMessages.js +223 -0
- package/dist/esm/hooks/chat/messages/useChatMessages.js.map +1 -0
- package/dist/esm/hooks/chat/messages/useDeleteMessage.d.ts +6 -0
- package/dist/esm/hooks/chat/messages/useDeleteMessage.js +76 -0
- package/dist/esm/hooks/chat/messages/useDeleteMessage.js.map +1 -0
- package/dist/esm/hooks/chat/messages/useEditMessage.d.ts +13 -0
- package/dist/esm/hooks/chat/messages/useEditMessage.js +76 -0
- package/dist/esm/hooks/chat/messages/useEditMessage.js.map +1 -0
- package/dist/esm/hooks/chat/messages/useMessageThread.d.ts +15 -0
- package/dist/esm/hooks/chat/messages/useMessageThread.js +33 -0
- package/dist/esm/hooks/chat/messages/useMessageThread.js.map +1 -0
- package/dist/esm/hooks/chat/messages/useSendMessage.d.ts +17 -0
- package/dist/esm/hooks/chat/messages/useSendMessage.js +151 -0
- package/dist/esm/hooks/chat/messages/useSendMessage.js.map +1 -0
- package/dist/esm/hooks/chat/messages/useToggleReaction.d.ts +11 -0
- package/dist/esm/hooks/chat/messages/useToggleReaction.js +90 -0
- package/dist/esm/hooks/chat/messages/useToggleReaction.js.map +1 -0
- package/dist/esm/hooks/chat/useChatSocket.d.ts +11 -0
- package/dist/esm/hooks/chat/useChatSocket.js +11 -0
- package/dist/esm/hooks/chat/useChatSocket.js.map +1 -0
- package/dist/esm/hooks/chat/useConversationData.d.ts +31 -0
- package/dist/esm/hooks/chat/useConversationData.js +42 -0
- package/dist/esm/hooks/chat/useConversationData.js.map +1 -0
- package/dist/esm/hooks/chat/useMarkConversationAsRead.d.ts +10 -0
- package/dist/esm/hooks/chat/useMarkConversationAsRead.js +82 -0
- package/dist/esm/hooks/chat/useMarkConversationAsRead.js.map +1 -0
- package/dist/esm/hooks/chat/useReportMessage.d.ts +8 -0
- package/dist/esm/hooks/chat/useReportMessage.js +71 -0
- package/dist/esm/hooks/chat/useReportMessage.js.map +1 -0
- package/dist/esm/hooks/chat/useTotalUnreadCount.d.ts +6 -0
- package/dist/esm/hooks/chat/useTotalUnreadCount.js +12 -0
- package/dist/esm/hooks/chat/useTotalUnreadCount.js.map +1 -0
- package/dist/esm/hooks/chat/useTypingIndicator.d.ts +21 -0
- package/dist/esm/hooks/chat/useTypingIndicator.js +66 -0
- package/dist/esm/hooks/chat/useTypingIndicator.js.map +1 -0
- package/dist/esm/hooks/comments/index.d.ts +1 -1
- package/dist/esm/hooks/comments/index.js.map +1 -1
- package/dist/esm/hooks/comments/useCommentSectionData.d.ts +5 -0
- package/dist/esm/hooks/comments/useCommentSectionData.js +20 -17
- package/dist/esm/hooks/comments/useCommentSectionData.js.map +1 -1
- package/dist/esm/hooks/spaces/index.d.ts +4 -0
- package/dist/esm/hooks/spaces/index.js +3 -0
- package/dist/esm/hooks/spaces/index.js.map +1 -1
- package/dist/esm/hooks/spaces/useSpaceMentions.d.ts +24 -0
- package/dist/esm/hooks/spaces/useSpaceMentions.js +186 -0
- package/dist/esm/hooks/spaces/useSpaceMentions.js.map +1 -0
- package/dist/esm/hooks/spaces/useUnbanMember.d.ts +11 -0
- package/dist/esm/hooks/spaces/useUnbanMember.js +66 -0
- package/dist/esm/hooks/spaces/useUnbanMember.js.map +1 -0
- package/dist/esm/hooks/users/index.d.ts +1 -1
- package/dist/esm/hooks/users/index.js +1 -1
- package/dist/esm/hooks/users/index.js.map +1 -1
- package/dist/esm/hooks/users/{useMentions.d.ts → useUserMentions.d.ts} +8 -4
- package/dist/esm/hooks/users/{useMentions.js → useUserMentions.js} +22 -17
- package/dist/esm/hooks/users/useUserMentions.js.map +1 -0
- package/dist/esm/index.d.ts +11 -5
- package/dist/esm/index.js +7 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces/models/File.d.ts +1 -0
- package/dist/esm/interfaces/models/IChatMessage.d.ts +34 -0
- package/dist/esm/interfaces/models/IChatMessage.js +2 -0
- package/dist/esm/interfaces/models/IChatMessage.js.map +1 -0
- package/dist/esm/interfaces/models/IConversation.d.ts +25 -0
- package/dist/esm/interfaces/models/IConversation.js +2 -0
- package/dist/esm/interfaces/models/IConversation.js.map +1 -0
- package/dist/esm/interfaces/models/IConversationMember.d.ts +16 -0
- package/dist/esm/interfaces/models/IConversationMember.js +2 -0
- package/dist/esm/interfaces/models/IConversationMember.js.map +1 -0
- package/dist/esm/interfaces/models/Mention.d.ts +8 -1
- package/dist/esm/store/api/spacesApi.d.ts +364 -0
- package/dist/esm/store/api/spacesApi.js +19 -2
- package/dist/esm/store/api/spacesApi.js.map +1 -1
- package/dist/esm/store/hooks.d.ts +1 -0
- package/dist/esm/store/index.d.ts +2 -0
- package/dist/esm/store/replykeReducers.d.ts +2 -0
- package/dist/esm/store/replykeReducers.js +2 -0
- package/dist/esm/store/replykeReducers.js.map +1 -1
- package/dist/esm/store/rootReducer.d.ts +3 -0
- package/dist/esm/store/slices/chatSlice.d.ts +120 -0
- package/dist/esm/store/slices/chatSlice.js +350 -0
- package/dist/esm/store/slices/chatSlice.js.map +1 -0
- package/dist/esm/store/slices/entityListsSlice.d.ts +168 -24
- package/dist/esm/store/slices/spaceListsSlice.d.ts +24 -0
- package/dist/esm/store/slices/userSlice.d.ts +16 -0
- package/dist/esm/types/socket.d.ts +73 -0
- package/dist/esm/types/socket.js +2 -0
- package/dist/esm/types/socket.js.map +1 -0
- package/package.json +3 -2
- package/dist/cjs/hooks/users/useMentions.js.map +0 -1
- package/dist/esm/hooks/users/useMentions.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUnbanMember.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/useUnbanMember.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,sEAAgD;AAChD,iFAA2D;AAa3D,SAAS,cAAc;IAAvB,iBAwBC;IAvBS,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEhC,IAAM,WAAW,GAAG,IAAA,mBAAW,EAC7B,gEAAO,EAAuC;;YAArC,OAAO,aAAA,EAAE,QAAQ,cAAA;;;;oBACxB,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAED,IAAI,CAAC,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;wBAC1B,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;oBACvD,CAAC;oBAEgB,qBAAM,KAAK,CAAC,KAAK,CAChC,WAAI,SAAS,qBAAW,OAAO,sBAAY,QAAQ,WAAQ,CAC5D,EAAA;;oBAFK,QAAQ,GAAG,SAEhB;oBAED,sBAAO,QAAQ,CAAC,IAA2B,EAAC;;;SAC7C,EACD,CAAC,SAAS,CAAC,CACZ,CAAC;IAEF,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,kBAAe,cAAc,CAAC"}
|
|
@@ -3,4 +3,4 @@ export { default as useFetchUserByForeignId, type FetchUserByForeignIdProps, } f
|
|
|
3
3
|
export { default as useFetchUserByUsername, type FetchUserByUsernameProps, } from "./useFetchUserByUsername";
|
|
4
4
|
export { default as useCheckUsernameAvailability, type CheckUsernameAvailabilityProps, } from "./useCheckUsernameAvailability";
|
|
5
5
|
export { default as useFetchUserSuggestions, type FetchUserSuggestionsProps, } from "./useFetchUserSuggestions";
|
|
6
|
-
export { default as
|
|
6
|
+
export { default as useUserMentions, type UseUserMentionsProps, type UseUserMentionsValues, } from "./useUserMentions";
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.useUserMentions = exports.useFetchUserSuggestions = exports.useCheckUsernameAvailability = exports.useFetchUserByUsername = exports.useFetchUserByForeignId = exports.useFetchUser = void 0;
|
|
7
7
|
var useFetchUser_1 = require("./useFetchUser");
|
|
8
8
|
Object.defineProperty(exports, "useFetchUser", { enumerable: true, get: function () { return __importDefault(useFetchUser_1).default; } });
|
|
9
9
|
var useFetchUserByForeignId_1 = require("./useFetchUserByForeignId");
|
|
@@ -14,6 +14,6 @@ var useCheckUsernameAvailability_1 = require("./useCheckUsernameAvailability");
|
|
|
14
14
|
Object.defineProperty(exports, "useCheckUsernameAvailability", { enumerable: true, get: function () { return __importDefault(useCheckUsernameAvailability_1).default; } });
|
|
15
15
|
var useFetchUserSuggestions_1 = require("./useFetchUserSuggestions");
|
|
16
16
|
Object.defineProperty(exports, "useFetchUserSuggestions", { enumerable: true, get: function () { return __importDefault(useFetchUserSuggestions_1).default; } });
|
|
17
|
-
var
|
|
18
|
-
Object.defineProperty(exports, "
|
|
17
|
+
var useUserMentions_1 = require("./useUserMentions");
|
|
18
|
+
Object.defineProperty(exports, "useUserMentions", { enumerable: true, get: function () { return __importDefault(useUserMentions_1).default; } });
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/users/index.ts"],"names":[],"mappings":";;;;;;AAAA,+CAGwB;AAFtB,6HAAA,OAAO,OAAgB;AAGzB,qEAGmC;AAFjC,mJAAA,OAAO,OAA2B;AAGpC,mEAGkC;AAFhC,iJAAA,OAAO,OAA0B;AAGnC,+EAGwC;AAFtC,6JAAA,OAAO,OAAgC;AAGzC,qEAGmC;AAFjC,mJAAA,OAAO,OAA2B;AAGpC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/users/index.ts"],"names":[],"mappings":";;;;;;AAAA,+CAGwB;AAFtB,6HAAA,OAAO,OAAgB;AAGzB,qEAGmC;AAFjC,mJAAA,OAAO,OAA2B;AAGpC,mEAGkC;AAFhC,iJAAA,OAAO,OAA0B;AAGnC,+EAGwC;AAFtC,6JAAA,OAAO,OAAgC;AAGzC,qEAGmC;AAFjC,mJAAA,OAAO,OAA2B;AAGpC,qDAI2B;AAHzB,mIAAA,OAAO,OAAmB"}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { User } from "../../interfaces/models/User";
|
|
2
2
|
import { Mention } from "../../interfaces/models/Mention";
|
|
3
|
-
export interface
|
|
3
|
+
export interface UseUserMentionsProps {
|
|
4
4
|
content: string;
|
|
5
5
|
setContent: (value: string) => void;
|
|
6
6
|
focus: () => void;
|
|
7
7
|
cursorPosition: number;
|
|
8
8
|
isSelectionActive: boolean;
|
|
9
|
+
trigger?: string;
|
|
10
|
+
minChars?: number;
|
|
11
|
+
debounceDelay?: number;
|
|
12
|
+
validPattern?: string;
|
|
9
13
|
}
|
|
10
|
-
export interface
|
|
14
|
+
export interface UseUserMentionsValues {
|
|
11
15
|
isMentionActive: boolean;
|
|
12
16
|
loading: boolean;
|
|
13
17
|
mentionSuggestions: User[];
|
|
@@ -16,5 +20,5 @@ export interface UseMentionsValues {
|
|
|
16
20
|
addMention: (user: User) => void;
|
|
17
21
|
resetMentions: () => void;
|
|
18
22
|
}
|
|
19
|
-
declare const
|
|
20
|
-
export default
|
|
23
|
+
declare const useUserMentions: ({ content, setContent, focus, cursorPosition, isSelectionActive, trigger, minChars, debounceDelay, validPattern, }: UseUserMentionsProps) => UseUserMentionsValues;
|
|
24
|
+
export default useUserMentions;
|
|
@@ -51,17 +51,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
51
51
|
var react_1 = require("react");
|
|
52
52
|
var useFetchUserSuggestions_1 = __importDefault(require("./useFetchUserSuggestions"));
|
|
53
53
|
var handleError_1 = require("../../utils/handleError");
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
function escapeRegex(str) {
|
|
55
|
+
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
56
|
+
}
|
|
57
|
+
var useUserMentions = function (_a) {
|
|
58
|
+
var content = _a.content, setContent = _a.setContent, focus = _a.focus, cursorPosition = _a.cursorPosition, isSelectionActive = _a.isSelectionActive, _b = _a.trigger, trigger = _b === void 0 ? "@" : _b, _c = _a.minChars, minChars = _c === void 0 ? 3 : _c, _d = _a.debounceDelay, debounceDelay = _d === void 0 ? 1000 : _d, _e = _a.validPattern, validPattern = _e === void 0 ? "[\\w.]+" : _e;
|
|
56
59
|
var fetchMentionSuggestions = (0, useFetchUserSuggestions_1.default)();
|
|
57
|
-
|
|
58
|
-
var
|
|
59
|
-
var
|
|
60
|
-
var
|
|
61
|
-
var
|
|
62
|
-
var _f = (0, react_1.useState)([]), mentionSuggestions = _f[0], setMentionSuggestions = _f[1];
|
|
60
|
+
var _f = (0, react_1.useState)(false), loadingState = _f[0], setLoadingState = _f[1];
|
|
61
|
+
var _g = (0, react_1.useState)([]), mentions = _g[0], setMentions = _g[1];
|
|
62
|
+
var _h = (0, react_1.useState)(false), isMentionActive = _h[0], setIsMentionActive = _h[1];
|
|
63
|
+
var _j = (0, react_1.useState)(""), mentionTrigger = _j[0], setMentionTrigger = _j[1];
|
|
64
|
+
var _k = (0, react_1.useState)([]), mentionSuggestions = _k[0], setMentionSuggestions = _k[1];
|
|
63
65
|
var debounceTimerRef = (0, react_1.useRef)(null);
|
|
64
|
-
var debounceDelay = 1000;
|
|
65
66
|
var resetMentions = function () {
|
|
66
67
|
setMentions([]);
|
|
67
68
|
setIsMentionActive(false);
|
|
@@ -83,13 +84,14 @@ var useMentions = function (_a) {
|
|
|
83
84
|
id: user.id,
|
|
84
85
|
foreignId: user.foreignId,
|
|
85
86
|
username: user.username,
|
|
87
|
+
type: "user",
|
|
86
88
|
},
|
|
87
89
|
], false);
|
|
88
90
|
});
|
|
89
91
|
};
|
|
90
92
|
var handleMentionClick = function (user) {
|
|
91
|
-
var mentionRegex = new RegExp("
|
|
92
|
-
setContent(content.replace(mentionRegex, "
|
|
93
|
+
var mentionRegex = new RegExp("".concat(escapeRegex(trigger)).concat(escapeRegex(mentionTrigger), "(\\s|$)"));
|
|
94
|
+
setContent(content.replace(mentionRegex, "".concat(trigger).concat(user.username, " ")));
|
|
93
95
|
addMention(user);
|
|
94
96
|
setIsMentionActive(false);
|
|
95
97
|
setMentionTrigger("");
|
|
@@ -133,12 +135,11 @@ var useMentions = function (_a) {
|
|
|
133
135
|
}
|
|
134
136
|
// Extract potential trigger word (start + 1 because `start` is on the space)
|
|
135
137
|
var potentialTrigger = content.slice(start + 1, cursorPosition);
|
|
136
|
-
|
|
137
|
-
var validMentionPattern = /^@[\w.]+$/; // \w matches a-z, A-Z, 0-9, and "_"
|
|
138
|
+
var validMentionPattern = new RegExp("^" + escapeRegex(trigger) + validPattern + "$");
|
|
138
139
|
if (!isSelectionActive &&
|
|
139
140
|
validMentionPattern.test(potentialTrigger) &&
|
|
140
|
-
potentialTrigger.length
|
|
141
|
-
var triggerText_1 = potentialTrigger.slice(
|
|
141
|
+
potentialTrigger.length >= trigger.length + minChars) {
|
|
142
|
+
var triggerText_1 = potentialTrigger.slice(trigger.length);
|
|
142
143
|
setMentionTrigger(triggerText_1);
|
|
143
144
|
setIsMentionActive(true);
|
|
144
145
|
setLoadingState(true);
|
|
@@ -171,6 +172,10 @@ var useMentions = function (_a) {
|
|
|
171
172
|
isSelectionActive,
|
|
172
173
|
handleFetchMentionSuggestions,
|
|
173
174
|
content,
|
|
175
|
+
trigger,
|
|
176
|
+
minChars,
|
|
177
|
+
debounceDelay,
|
|
178
|
+
validPattern,
|
|
174
179
|
]);
|
|
175
180
|
return {
|
|
176
181
|
isMentionActive: isMentionActive,
|
|
@@ -182,5 +187,5 @@ var useMentions = function (_a) {
|
|
|
182
187
|
resetMentions: resetMentions,
|
|
183
188
|
};
|
|
184
189
|
};
|
|
185
|
-
exports.default =
|
|
186
|
-
//# sourceMappingURL=
|
|
190
|
+
exports.default = useUserMentions;
|
|
191
|
+
//# sourceMappingURL=useUserMentions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUserMentions.js","sourceRoot":"","sources":["../../../../src/hooks/users/useUserMentions.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAiE;AAGjE,sFAAgE;AAChE,uDAAsD;AAEtD,SAAS,WAAW,CAAC,GAAW;IAC9B,OAAO,GAAG,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AACpD,CAAC;AAwBD,IAAM,eAAe,GAAG,UAAC,EAUF;QATrB,OAAO,aAAA,EACP,UAAU,gBAAA,EACV,KAAK,WAAA,EACL,cAAc,oBAAA,EACd,iBAAiB,uBAAA,EACjB,eAAa,EAAb,OAAO,mBAAG,GAAG,KAAA,EACb,gBAAY,EAAZ,QAAQ,mBAAG,CAAC,KAAA,EACZ,qBAAoB,EAApB,aAAa,mBAAG,IAAI,KAAA,EACpB,oBAAwB,EAAxB,YAAY,mBAAG,SAAS,KAAA;IAExB,IAAM,uBAAuB,GAAG,IAAA,iCAAuB,GAAE,CAAC;IAEpD,IAAA,KAAkC,IAAA,gBAAQ,EAAC,KAAK,CAAC,EAAhD,YAAY,QAAA,EAAE,eAAe,QAAmB,CAAC;IAElD,IAAA,KAA0B,IAAA,gBAAQ,EAAY,EAAE,CAAC,EAAhD,QAAQ,QAAA,EAAE,WAAW,QAA2B,CAAC;IAClD,IAAA,KAAwC,IAAA,gBAAQ,EAAC,KAAK,CAAC,EAAtD,eAAe,QAAA,EAAE,kBAAkB,QAAmB,CAAC;IACx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6B;QAC7B,OAAO;QACP,OAAO;QACP,QAAQ;QACR,aAAa;QACb,YAAY;KACb,CAAC,CAAC;IAEH,OAAO;QACL,eAAe,iBAAA;QACf,OAAO,EAAE,YAAY;QACrB,kBAAkB,oBAAA;QAClB,kBAAkB,oBAAA;QAClB,QAAQ,UAAA;QACR,UAAU,YAAA;QACV,aAAa,eAAA;KACd,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,eAAe,CAAC"}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { default as getPublicFileUrl } from "./helpers/getPublicFileUrl";
|
|
|
6
6
|
export { isDevelopment, isProduction, getApiBaseUrl, getEnvVar, } from "./utils/env";
|
|
7
7
|
export { reportReasons } from "./constants/reportReasons";
|
|
8
8
|
export type { ReportReasonKey } from "./constants/reportReasons";
|
|
9
|
-
export { ReplykeProvider, ReplykeIntegrationProvider, EntityProvider, CommentSectionProvider, SpaceProvider, } from "./context";
|
|
9
|
+
export { ReplykeProvider, ReplykeIntegrationProvider, EntityProvider, CommentSectionProvider, SpaceProvider, ChatProvider, ConversationProvider, MessageThreadProvider, useChatContext, useConversationContext, useMessageThreadContext, type ChatContextValue, type ChatProviderProps, type ConversationContextValue, type ConversationProviderProps, type MessageThreadContextValue, type MessageThreadProviderProps, } from "./context";
|
|
10
10
|
export { replykeReducers, replykeApiReducer, replykeMiddleware, replykeApi, type ReplykeState, } from "./store/integration";
|
|
11
11
|
export { useProject, useProjectData } from "./hooks/projects";
|
|
12
12
|
export { useSignTestingJwt, type SignTestingJwtProps } from "./hooks/crypto";
|
|
@@ -23,11 +23,11 @@ export { useAppNotifications, useAppNotificationsActions, type UseAppNotificatio
|
|
|
23
23
|
export { useCollections, useCollectionsActions, useIsEntityInCollection, useCollectionEntitiesWrapper, type UseCollectionsProps, type UseCollectionsValues, type CreateCollectionProps, type UpdateCollectionProps, type DeleteCollectionProps, type AddToCollectionProps, type RemoveFromCollectionProps, type UseCollectionEntitiesWrapperProps, type UseCollectionEntitiesWrapperValues, } from "./hooks/collections";
|
|
24
24
|
export { useEntity, useEntityData, useCreateEntity, useDeleteEntity, useFetchEntity, useFetchEntityByForeignId, useFetchEntityByShortId, useFetchManyEntities, useIncrementEntityViews, useFetchManyEntitiesWrapper, useUpdateEntity, useFetchDrafts, usePublishDraft, type CreateEntityProps, type DeleteEntityProps, type FetchEntityProps, type FetchEntityByForeignIdProps, type FetchEntityByShortIdProps, type PublishDraftProps, type UseFetchManyEntitiesWrapperProps, type UseFetchManyEntitiesWrapperValues, } from "./hooks/entities";
|
|
25
25
|
export { useEntityList, useEntityListActions, type UseEntityListProps, type UseEntityListValues, type EntityListCreateEntityProps, type EntityListDeleteEntityProps, type EntityListFilters, type EntityListSort, type EntityListFetchOptions, } from "./hooks/entity-lists";
|
|
26
|
-
export { useSpace, useSpaceData, useFetchSpace, useFetchSpaceByShortId, useFetchSpaceBySlug, useFetchSpaceBreadcrumb, useFetchSpaceChildren, useFetchManySpaces, useCheckSlugAvailability, useCreateSpace, useUpdateSpace, useDeleteSpace, useJoinSpace, useLeaveSpace, useFetchSpaceMembers, useFetchSpaceTeam, useFetchUserSpaces, useUpdateMemberRole, useApproveMember, useDeclineMember, useRemoveMember, useModerateSpaceEntity, useModerateSpaceComment, useSpacePermissions, useCheckMyMembership, useFetchDigestConfig, useUpdateDigestConfig, useCreateRule, useUpdateRule, useDeleteRule, useFetchRule, useFetchManyRules, useReorderRules, type UseSpaceDataProps, type UseSpaceDataValues, type FetchSpaceProps, type FetchSpaceByShortIdProps, type FetchSpaceBySlugProps, type FetchSpaceBreadcrumbProps, type FetchSpaceChildrenProps, type FetchManySpacesProps, type CheckSlugAvailabilityProps, type CreateSpaceProps, type UpdateSpaceProps, type DeleteSpaceProps, type JoinSpaceProps, type LeaveSpaceProps, type FetchSpaceMembersProps, type FetchSpaceTeamProps, type FetchUserSpacesProps, type CheckMyMembershipProps, type UpdateMemberRoleProps, type ApproveMemberProps, type DeclineMemberProps, type RemoveMemberProps, type ModerateSpaceEntityProps, type ModerateSpaceCommentProps, type UseSpacePermissionsProps, type UseSpacePermissionsValues, type FetchDigestConfigProps, type UpdateDigestConfigProps, type CreateRuleProps, type UpdateRuleProps, type DeleteRuleProps, type FetchRuleProps, type FetchManyRulesProps, type ReorderRulesProps, } from "./hooks/spaces";
|
|
26
|
+
export { useSpace, useSpaceData, useFetchSpace, useFetchSpaceByShortId, useFetchSpaceBySlug, useFetchSpaceBreadcrumb, useFetchSpaceChildren, useFetchManySpaces, useCheckSlugAvailability, useCreateSpace, useUpdateSpace, useDeleteSpace, useJoinSpace, useLeaveSpace, useFetchSpaceMembers, useFetchSpaceTeam, useFetchUserSpaces, useUpdateMemberRole, useApproveMember, useDeclineMember, useRemoveMember, useModerateSpaceEntity, useModerateSpaceComment, useSpacePermissions, useSpaceMentions, useCheckMyMembership, useFetchDigestConfig, useUpdateDigestConfig, useCreateRule, useUpdateRule, useDeleteRule, useFetchRule, useFetchManyRules, useReorderRules, type UseSpaceDataProps, type UseSpaceDataValues, type FetchSpaceProps, type FetchSpaceByShortIdProps, type FetchSpaceBySlugProps, type FetchSpaceBreadcrumbProps, type FetchSpaceChildrenProps, type FetchManySpacesProps, type CheckSlugAvailabilityProps, type CreateSpaceProps, type UpdateSpaceProps, type DeleteSpaceProps, type JoinSpaceProps, type LeaveSpaceProps, type FetchSpaceMembersProps, type FetchSpaceTeamProps, type FetchUserSpacesProps, type CheckMyMembershipProps, type UpdateMemberRoleProps, type ApproveMemberProps, type DeclineMemberProps, type RemoveMemberProps, type ModerateSpaceEntityProps, type ModerateSpaceCommentProps, type UseSpacePermissionsProps, type UseSpacePermissionsValues, type UseSpaceMentionsProps, type UseSpaceMentionsValues, type FetchDigestConfigProps, type UpdateDigestConfigProps, type CreateRuleProps, type UpdateRuleProps, type DeleteRuleProps, type FetchRuleProps, type FetchManyRulesProps, type ReorderRulesProps, } from "./hooks/spaces";
|
|
27
27
|
export { useSpaceList, useSpaceListActions, type UseSpaceListProps, type UseSpaceListValues, type SpaceListCreateSpaceProps, type SpaceListDeleteSpaceProps, type FetchSpacesOptions, type CreateSpaceOptions, type DeleteSpaceOptions, } from "./hooks/space-lists";
|
|
28
|
-
export { useCommentSection, useCommentSectionData, useCreateComment, useFetchManyComments, useFetchComment, useFetchCommentByForeignId, useReplies, useUpdateComment, useDeleteComment, useEntityComments, useFetchManyCommentsWrapper, type CommentSectionCreateCommentProps, type CommentSectionUpdateCommentProps, type CommentSectionDeleteCommentProps, type CreateCommentProps, type FetchManyCommentsProps, type FetchCommentProps, type FetchCommentByForeignIdProps, type UseRepliesProps, type UpdateCommentProps, type DeleteCommentProps, type UseFetchManyCommentsWrapperProps, type UseFetchManyCommentsWrapperValues, } from "./hooks/comments";
|
|
28
|
+
export { useCommentSection, useCommentSectionData, useCreateComment, useFetchManyComments, useFetchComment, useFetchCommentByForeignId, useReplies, useUpdateComment, useDeleteComment, useEntityComments, useFetchManyCommentsWrapper, type CommentSectionCreateCommentProps, type CommentSectionUpdateCommentProps, type CommentSectionDeleteCommentProps, type CreateCommentProps, type FetchManyCommentsProps, type FetchCommentProps, type FetchCommentByForeignIdProps, type UseRepliesProps, type UpdateCommentProps, type DeleteCommentProps, type UseFetchManyCommentsWrapperProps, type UseFetchManyCommentsWrapperValues, type MentionTriggers, } from "./hooks/comments";
|
|
29
29
|
export { useFetchEntityReactions, useFetchCommentReactions, useFetchEntityReactionsWrapper, useFetchCommentReactionsWrapper, useAddReaction, useRemoveReaction, useReactionToggle, type UseFetchEntityReactionsWrapperProps, type UseFetchEntityReactionsWrapperValues, type UseFetchCommentReactionsWrapperProps, type UseFetchCommentReactionsWrapperValues, type UseReactionToggleProps, type UseReactionToggleValues, type ToggleReactionProps, type AddReactionProps, type RemoveReactionProps, type FetchEntityReactionsProps, type FetchCommentReactionsProps, } from "./hooks/reactions";
|
|
30
|
-
export { useFetchUser, useFetchUserByForeignId, useFetchUserByUsername, useCheckUsernameAvailability, useFetchUserSuggestions,
|
|
30
|
+
export { useFetchUser, useFetchUserByForeignId, useFetchUserByUsername, useCheckUsernameAvailability, useFetchUserSuggestions, useUserMentions, type FetchUserProps, type FetchUserByForeignIdProps, type FetchUserByUsernameProps, type CheckUsernameAvailabilityProps, type FetchUserSuggestionsProps, type UseUserMentionsProps, type UseUserMentionsValues, } from "./hooks/users";
|
|
31
31
|
export { useFetchFollowStatus, useFetchFollowers, useFetchFollowersByUserId, useFetchFollowersCount, useFetchFollowersCountByUserId, useFetchFollowing, useFetchFollowingByUserId, useFetchFollowingCount, useFetchFollowingCountByUserId, useFollowManager, useFollowUser, useUnfollowByFollowId, useUnfollowUserByUserId, type FollowUserProps, type UnfollowByFollowIdProps, type UnfollowUserByUserIdProps, type FetchFollowStatusProps, type FollowStatusResponse, type FollowerWithFollowInfo, type FetchFollowersParams, type FetchFollowersByUserIdParams, type FetchFollowersCountByUserIdProps, type FollowingWithFollowInfo, type FetchFollowingParams, type FetchFollowingByUserIdParams, type FetchFollowingCountByUserIdProps, type UseFollowToggleProps, } from "./hooks/relationships/follows";
|
|
32
32
|
export { useRequestConnection, useAcceptConnection, useDeclineConnection, useRemoveConnection, useFetchConnections, useFetchConnectionStatus, useRemoveConnectionByUserId, useFetchConnectionsCount, useFetchSentPendingConnections, useFetchReceivedPendingConnections, useFetchConnectionsByUserId, useFetchConnectionsCountByUserId, useConnectionManager, type AcceptConnectionProps, type DeclineConnectionProps, type RemoveConnectionProps, type RemoveConnectionByUserIdProps, type FetchConnectionStatusProps, type FetchConnectionsParams, type FetchConnectionsByUserIdParams, type FetchConnectionsCountByUserIdParams, type FetchSentPendingConnectionsParams, type FetchReceivedPendingConnectionsParams, type UseConnectionManagerProps, type ConnectionData, } from "./hooks/relationships/connections";
|
|
33
33
|
export { useCreateReport, useFetchModeratedReports, useHandleSpaceEntityReport, useHandleSpaceCommentReport, type UseCreateReportProps, type CreateReportProps, type CreateCommentReportProps, type CreateEntityReportProps, type FetchModeratedReportsParams, type ReportUserReport, type Report, type HandleSpaceEntityReportParams, type HandleReportResponse, type HandleSpaceCommentReportParams, } from "./hooks/reports";
|
|
@@ -42,7 +42,7 @@ export type { Entity, EntityInclude, EntityIncludeArray, EntityIncludeParam, } f
|
|
|
42
42
|
export type { Collection } from "./interfaces/models/Collection";
|
|
43
43
|
export type { Comment, GifData, CommentInclude, CommentIncludeArray, CommentIncludeParam, } from "./interfaces/models/Comment";
|
|
44
44
|
export type { Reaction, ReactionType, ReactionCounts, } from "./interfaces/models/Reaction";
|
|
45
|
-
export type { Mention } from "./interfaces/models/Mention";
|
|
45
|
+
export type { Mention, UserMention, SpaceMention, } from "./interfaces/models/Mention";
|
|
46
46
|
export type { Space, SpaceDetailed, SpacePreview, SpaceMemberPermissions, ReadingPermission, PostingPermission, PaginationMeta, UserSpaceItem, UserSpacesResponse, JoinSpaceResponse, LeaveSpaceResponse, UpdateMemberRoleResponse, ApproveMemberResponse, DeclineMemberResponse, DeleteSpaceResponse, DigestConfig, UpdateDigestConfigProps as UpdateDigestConfigBody, SpaceInclude, SpaceIncludeArray, SpaceIncludeParam, } from "./interfaces/models/Space";
|
|
47
47
|
export type { SpaceMember, SpaceMemberRole, SpaceMemberStatus, SpaceMemberWithUser, SpaceMembersResponse, SpaceTeamResponse, } from "./interfaces/models/SpaceMember";
|
|
48
48
|
export type { SpaceListSortByOptions, SpaceListFilters, } from "./interfaces/SpaceListSortByOptions";
|
|
@@ -55,3 +55,9 @@ export type { TimeFrame } from "./interfaces/TimeFrame";
|
|
|
55
55
|
export type { Connection, EstablishedConnection, PendingConnection, ConnectionsResponse, PendingConnectionsResponse, PendingConnectionListResponse, ConnectionRequestParams, ConnectionActionResponse, ConnectionWithdrawResponse, ConnectionCountResponse, RemoveConnectionByUserIdResponse, ConnectionStatusResponse, ConnectionStatus, } from "./interfaces/models/Connection";
|
|
56
56
|
export type { Image, ImageVariant, UploadImageOptions, } from "./interfaces/models/Image";
|
|
57
57
|
export type { File } from "./interfaces/models/File";
|
|
58
|
+
export { useConversations, useConversation, useCreateDirectConversation, useSpaceConversation, useConversationMembers, useChatMessages, useSendMessage, useEditMessage, useDeleteMessage, useToggleReaction, useMessageThread, useTotalUnreadCount, useMarkConversationAsRead, useReportMessage, useConversationData, useTypingIndicator, useChatSocket, } from "./hooks/chat";
|
|
59
|
+
export type { UseConversationsProps, UseConversationsValues, UseConversationProps, UseConversationValues, UpdateConversationParams, CreateDirectConversationProps, UseSpaceConversationProps, UseSpaceConversationValues, UseConversationMembersProps, UseConversationMembersValues, UseChatMessagesProps, UseChatMessagesValues, SendMessageParams, UseSendMessageProps, EditMessageParams, DeleteMessageParams, ToggleReactionParams, ToggleReactionResult, UseMessageThreadProps, UseMessageThreadValues, UseMarkConversationAsReadProps, ReportMessageParams, UseConversationDataProps, UseConversationDataValues, UseTypingIndicatorProps, UseTypingIndicatorValues, UseChatSocketValues, } from "./hooks/chat";
|
|
60
|
+
export type { IConversation, IConversationPreview, } from "./interfaces/models/IConversation";
|
|
61
|
+
export type { IConversationMember, ConversationMemberRole, } from "./interfaces/models/IConversationMember";
|
|
62
|
+
export type { IChatMessage } from "./interfaces/models/IChatMessage";
|
|
63
|
+
export { setConversation, setConversationLoading, setConversationList, setConversationListLoading, setConversationListHasMore, setConversationListCursor, upsertConversationPreview, incrementUnread, clearUnread, setMessagesLoading, setMessagesHasMore, upsertMessage, addOptimisticMessage, failOptimisticMessage, removeMessage, updateReactions, setThreadReplies, setThreadLoading, setTypingUsers, setSocketConnected, selectConversation, selectConversationLoading, selectConversationList, selectConversationListLoading, selectConversationListHasMore, selectConversationListCursor, selectMessages, selectMessagesLoading, selectMessagesHasMore, selectOldestMessageId, selectNewestMessageId, selectThreadReplies, selectThreadLoading, selectThreadHasMore, selectTypingUsers, selectSocketConnected, type ChatState, } from "./store/slices/chatSlice";
|
package/dist/cjs/index.js
CHANGED
|
@@ -36,10 +36,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
40
|
-
exports.
|
|
41
|
-
exports.
|
|
42
|
-
exports.validateSortType = exports.validateMetadataPropertyName = exports.validateSortBy = exports.AppNotification = exports.useUploadImage = exports.useUploadFile = exports.useGetMetadata = void 0;
|
|
39
|
+
exports.useCollectionsActions = exports.useCollections = exports.useAppNotificationsActions = exports.useAppNotifications = exports.useUserActions = exports.useUser = exports.MAX_ACCOUNTS = exports.requestNewAccessTokenThunk = exports.selectAccessToken = exports.setInitialized = exports.setTokens = exports.useReplykeSelector = exports.useReplykeDispatch = exports.useOAuthIdentities = exports.useSignOutAll = exports.useRemoveAccount = exports.useAddAccount = exports.useSwitchAccount = exports.useAccounts = exports.useAccountSync = exports.useRequestPasswordReset = exports.useAuth = exports.useSignTestingJwt = exports.useProjectData = exports.useProject = exports.replykeApi = exports.replykeMiddleware = exports.replykeApiReducer = exports.replykeReducers = exports.useMessageThreadContext = exports.useConversationContext = exports.useChatContext = exports.MessageThreadProvider = exports.ConversationProvider = exports.ChatProvider = exports.SpaceProvider = exports.CommentSectionProvider = exports.EntityProvider = exports.ReplykeIntegrationProvider = exports.ReplykeProvider = exports.reportReasons = exports.getEnvVar = exports.getApiBaseUrl = exports.isProduction = exports.isDevelopment = exports.getPublicFileUrl = exports.getUserName = exports.safeMergeStyleProps = exports.keywordHelpers = exports.handleError = void 0;
|
|
40
|
+
exports.useFetchManyRules = exports.useFetchRule = exports.useDeleteRule = exports.useUpdateRule = exports.useCreateRule = exports.useUpdateDigestConfig = exports.useFetchDigestConfig = exports.useCheckMyMembership = exports.useSpaceMentions = exports.useSpacePermissions = exports.useModerateSpaceComment = exports.useModerateSpaceEntity = exports.useRemoveMember = exports.useDeclineMember = exports.useApproveMember = exports.useUpdateMemberRole = exports.useFetchUserSpaces = exports.useFetchSpaceTeam = exports.useFetchSpaceMembers = exports.useLeaveSpace = exports.useJoinSpace = exports.useDeleteSpace = exports.useUpdateSpace = exports.useCreateSpace = exports.useCheckSlugAvailability = exports.useFetchManySpaces = exports.useFetchSpaceChildren = exports.useFetchSpaceBreadcrumb = exports.useFetchSpaceBySlug = exports.useFetchSpaceByShortId = exports.useFetchSpace = exports.useSpaceData = exports.useSpace = exports.useEntityListActions = exports.useEntityList = exports.usePublishDraft = exports.useFetchDrafts = exports.useUpdateEntity = exports.useFetchManyEntitiesWrapper = exports.useIncrementEntityViews = exports.useFetchManyEntities = exports.useFetchEntityByShortId = exports.useFetchEntityByForeignId = exports.useFetchEntity = exports.useDeleteEntity = exports.useCreateEntity = exports.useEntityData = exports.useEntity = exports.useCollectionEntitiesWrapper = exports.useIsEntityInCollection = void 0;
|
|
41
|
+
exports.useFetchReceivedPendingConnections = exports.useFetchSentPendingConnections = exports.useFetchConnectionsCount = exports.useRemoveConnectionByUserId = exports.useFetchConnectionStatus = exports.useFetchConnections = exports.useRemoveConnection = exports.useDeclineConnection = exports.useAcceptConnection = exports.useRequestConnection = exports.useUnfollowUserByUserId = exports.useUnfollowByFollowId = exports.useFollowUser = exports.useFollowManager = exports.useFetchFollowingCountByUserId = exports.useFetchFollowingCount = exports.useFetchFollowingByUserId = exports.useFetchFollowing = exports.useFetchFollowersCountByUserId = exports.useFetchFollowersCount = exports.useFetchFollowersByUserId = exports.useFetchFollowers = exports.useFetchFollowStatus = exports.useUserMentions = exports.useFetchUserSuggestions = exports.useCheckUsernameAvailability = exports.useFetchUserByUsername = exports.useFetchUserByForeignId = exports.useFetchUser = exports.useReactionToggle = exports.useRemoveReaction = exports.useAddReaction = exports.useFetchCommentReactionsWrapper = exports.useFetchEntityReactionsWrapper = exports.useFetchCommentReactions = exports.useFetchEntityReactions = exports.useFetchManyCommentsWrapper = exports.useEntityComments = exports.useDeleteComment = exports.useUpdateComment = exports.useReplies = exports.useFetchCommentByForeignId = exports.useFetchComment = exports.useFetchManyComments = exports.useCreateComment = exports.useCommentSectionData = exports.useCommentSection = exports.useSpaceListActions = exports.useSpaceList = exports.useReorderRules = void 0;
|
|
42
|
+
exports.setTypingUsers = exports.setThreadLoading = exports.setThreadReplies = exports.updateReactions = exports.removeMessage = exports.failOptimisticMessage = exports.addOptimisticMessage = exports.upsertMessage = exports.setMessagesHasMore = exports.setMessagesLoading = exports.clearUnread = exports.incrementUnread = exports.upsertConversationPreview = exports.setConversationListCursor = exports.setConversationListHasMore = exports.setConversationListLoading = exports.setConversationList = exports.setConversationLoading = exports.setConversation = exports.useChatSocket = exports.useTypingIndicator = exports.useConversationData = exports.useReportMessage = exports.useMarkConversationAsRead = exports.useTotalUnreadCount = exports.useMessageThread = exports.useToggleReaction = exports.useDeleteMessage = exports.useEditMessage = exports.useSendMessage = exports.useChatMessages = exports.useConversationMembers = exports.useSpaceConversation = exports.useCreateDirectConversation = exports.useConversation = exports.useConversations = exports.validateSortType = exports.validateMetadataPropertyName = exports.validateSortBy = exports.AppNotification = exports.useUploadImage = exports.useUploadFile = exports.useGetMetadata = exports.useHandleSpaceCommentReport = exports.useHandleSpaceEntityReport = exports.useFetchModeratedReports = exports.useCreateReport = exports.useConnectionManager = exports.useFetchConnectionsCountByUserId = exports.useFetchConnectionsByUserId = void 0;
|
|
43
|
+
exports.selectSocketConnected = exports.selectTypingUsers = exports.selectThreadHasMore = exports.selectThreadLoading = exports.selectThreadReplies = exports.selectNewestMessageId = exports.selectOldestMessageId = exports.selectMessagesHasMore = exports.selectMessagesLoading = exports.selectMessages = exports.selectConversationListCursor = exports.selectConversationListHasMore = exports.selectConversationListLoading = exports.selectConversationList = exports.selectConversationLoading = exports.selectConversation = exports.setSocketConnected = void 0;
|
|
43
44
|
// Helpers & Utilities
|
|
44
45
|
var handleError_1 = require("./utils/handleError");
|
|
45
46
|
Object.defineProperty(exports, "handleError", { enumerable: true, get: function () { return handleError_1.handleError; } });
|
|
@@ -66,6 +67,12 @@ Object.defineProperty(exports, "ReplykeIntegrationProvider", { enumerable: true,
|
|
|
66
67
|
Object.defineProperty(exports, "EntityProvider", { enumerable: true, get: function () { return context_1.EntityProvider; } });
|
|
67
68
|
Object.defineProperty(exports, "CommentSectionProvider", { enumerable: true, get: function () { return context_1.CommentSectionProvider; } });
|
|
68
69
|
Object.defineProperty(exports, "SpaceProvider", { enumerable: true, get: function () { return context_1.SpaceProvider; } });
|
|
70
|
+
Object.defineProperty(exports, "ChatProvider", { enumerable: true, get: function () { return context_1.ChatProvider; } });
|
|
71
|
+
Object.defineProperty(exports, "ConversationProvider", { enumerable: true, get: function () { return context_1.ConversationProvider; } });
|
|
72
|
+
Object.defineProperty(exports, "MessageThreadProvider", { enumerable: true, get: function () { return context_1.MessageThreadProvider; } });
|
|
73
|
+
Object.defineProperty(exports, "useChatContext", { enumerable: true, get: function () { return context_1.useChatContext; } });
|
|
74
|
+
Object.defineProperty(exports, "useConversationContext", { enumerable: true, get: function () { return context_1.useConversationContext; } });
|
|
75
|
+
Object.defineProperty(exports, "useMessageThreadContext", { enumerable: true, get: function () { return context_1.useMessageThreadContext; } });
|
|
69
76
|
// Integration mode exports (for users with their own Redux store)
|
|
70
77
|
var integration_1 = require("./store/integration");
|
|
71
78
|
Object.defineProperty(exports, "replykeReducers", { enumerable: true, get: function () { return integration_1.replykeReducers; } });
|
|
@@ -165,6 +172,7 @@ Object.defineProperty(exports, "useRemoveMember", { enumerable: true, get: funct
|
|
|
165
172
|
Object.defineProperty(exports, "useModerateSpaceEntity", { enumerable: true, get: function () { return spaces_1.useModerateSpaceEntity; } });
|
|
166
173
|
Object.defineProperty(exports, "useModerateSpaceComment", { enumerable: true, get: function () { return spaces_1.useModerateSpaceComment; } });
|
|
167
174
|
Object.defineProperty(exports, "useSpacePermissions", { enumerable: true, get: function () { return spaces_1.useSpacePermissions; } });
|
|
175
|
+
Object.defineProperty(exports, "useSpaceMentions", { enumerable: true, get: function () { return spaces_1.useSpaceMentions; } });
|
|
168
176
|
Object.defineProperty(exports, "useCheckMyMembership", { enumerable: true, get: function () { return spaces_1.useCheckMyMembership; } });
|
|
169
177
|
// Digest config hooks
|
|
170
178
|
Object.defineProperty(exports, "useFetchDigestConfig", { enumerable: true, get: function () { return spaces_1.useFetchDigestConfig; } });
|
|
@@ -209,7 +217,7 @@ Object.defineProperty(exports, "useFetchUserByForeignId", { enumerable: true, ge
|
|
|
209
217
|
Object.defineProperty(exports, "useFetchUserByUsername", { enumerable: true, get: function () { return users_1.useFetchUserByUsername; } });
|
|
210
218
|
Object.defineProperty(exports, "useCheckUsernameAvailability", { enumerable: true, get: function () { return users_1.useCheckUsernameAvailability; } });
|
|
211
219
|
Object.defineProperty(exports, "useFetchUserSuggestions", { enumerable: true, get: function () { return users_1.useFetchUserSuggestions; } });
|
|
212
|
-
Object.defineProperty(exports, "
|
|
220
|
+
Object.defineProperty(exports, "useUserMentions", { enumerable: true, get: function () { return users_1.useUserMentions; } });
|
|
213
221
|
// -- follows
|
|
214
222
|
var follows_1 = require("./hooks/relationships/follows");
|
|
215
223
|
Object.defineProperty(exports, "useFetchFollowStatus", { enumerable: true, get: function () { return follows_1.useFetchFollowStatus; } });
|
|
@@ -258,4 +266,61 @@ var EntityListSortByOptions_1 = require("./interfaces/EntityListSortByOptions");
|
|
|
258
266
|
Object.defineProperty(exports, "validateSortBy", { enumerable: true, get: function () { return EntityListSortByOptions_1.validateSortBy; } });
|
|
259
267
|
Object.defineProperty(exports, "validateMetadataPropertyName", { enumerable: true, get: function () { return EntityListSortByOptions_1.validateMetadataPropertyName; } });
|
|
260
268
|
Object.defineProperty(exports, "validateSortType", { enumerable: true, get: function () { return EntityListSortByOptions_1.validateSortType; } });
|
|
269
|
+
// -- chat hooks
|
|
270
|
+
var chat_1 = require("./hooks/chat");
|
|
271
|
+
Object.defineProperty(exports, "useConversations", { enumerable: true, get: function () { return chat_1.useConversations; } });
|
|
272
|
+
Object.defineProperty(exports, "useConversation", { enumerable: true, get: function () { return chat_1.useConversation; } });
|
|
273
|
+
Object.defineProperty(exports, "useCreateDirectConversation", { enumerable: true, get: function () { return chat_1.useCreateDirectConversation; } });
|
|
274
|
+
Object.defineProperty(exports, "useSpaceConversation", { enumerable: true, get: function () { return chat_1.useSpaceConversation; } });
|
|
275
|
+
Object.defineProperty(exports, "useConversationMembers", { enumerable: true, get: function () { return chat_1.useConversationMembers; } });
|
|
276
|
+
Object.defineProperty(exports, "useChatMessages", { enumerable: true, get: function () { return chat_1.useChatMessages; } });
|
|
277
|
+
Object.defineProperty(exports, "useSendMessage", { enumerable: true, get: function () { return chat_1.useSendMessage; } });
|
|
278
|
+
Object.defineProperty(exports, "useEditMessage", { enumerable: true, get: function () { return chat_1.useEditMessage; } });
|
|
279
|
+
Object.defineProperty(exports, "useDeleteMessage", { enumerable: true, get: function () { return chat_1.useDeleteMessage; } });
|
|
280
|
+
Object.defineProperty(exports, "useToggleReaction", { enumerable: true, get: function () { return chat_1.useToggleReaction; } });
|
|
281
|
+
Object.defineProperty(exports, "useMessageThread", { enumerable: true, get: function () { return chat_1.useMessageThread; } });
|
|
282
|
+
Object.defineProperty(exports, "useTotalUnreadCount", { enumerable: true, get: function () { return chat_1.useTotalUnreadCount; } });
|
|
283
|
+
Object.defineProperty(exports, "useMarkConversationAsRead", { enumerable: true, get: function () { return chat_1.useMarkConversationAsRead; } });
|
|
284
|
+
Object.defineProperty(exports, "useReportMessage", { enumerable: true, get: function () { return chat_1.useReportMessage; } });
|
|
285
|
+
Object.defineProperty(exports, "useConversationData", { enumerable: true, get: function () { return chat_1.useConversationData; } });
|
|
286
|
+
Object.defineProperty(exports, "useTypingIndicator", { enumerable: true, get: function () { return chat_1.useTypingIndicator; } });
|
|
287
|
+
Object.defineProperty(exports, "useChatSocket", { enumerable: true, get: function () { return chat_1.useChatSocket; } });
|
|
288
|
+
// -- chat slice
|
|
289
|
+
var chatSlice_1 = require("./store/slices/chatSlice");
|
|
290
|
+
Object.defineProperty(exports, "setConversation", { enumerable: true, get: function () { return chatSlice_1.setConversation; } });
|
|
291
|
+
Object.defineProperty(exports, "setConversationLoading", { enumerable: true, get: function () { return chatSlice_1.setConversationLoading; } });
|
|
292
|
+
Object.defineProperty(exports, "setConversationList", { enumerable: true, get: function () { return chatSlice_1.setConversationList; } });
|
|
293
|
+
Object.defineProperty(exports, "setConversationListLoading", { enumerable: true, get: function () { return chatSlice_1.setConversationListLoading; } });
|
|
294
|
+
Object.defineProperty(exports, "setConversationListHasMore", { enumerable: true, get: function () { return chatSlice_1.setConversationListHasMore; } });
|
|
295
|
+
Object.defineProperty(exports, "setConversationListCursor", { enumerable: true, get: function () { return chatSlice_1.setConversationListCursor; } });
|
|
296
|
+
Object.defineProperty(exports, "upsertConversationPreview", { enumerable: true, get: function () { return chatSlice_1.upsertConversationPreview; } });
|
|
297
|
+
Object.defineProperty(exports, "incrementUnread", { enumerable: true, get: function () { return chatSlice_1.incrementUnread; } });
|
|
298
|
+
Object.defineProperty(exports, "clearUnread", { enumerable: true, get: function () { return chatSlice_1.clearUnread; } });
|
|
299
|
+
Object.defineProperty(exports, "setMessagesLoading", { enumerable: true, get: function () { return chatSlice_1.setMessagesLoading; } });
|
|
300
|
+
Object.defineProperty(exports, "setMessagesHasMore", { enumerable: true, get: function () { return chatSlice_1.setMessagesHasMore; } });
|
|
301
|
+
Object.defineProperty(exports, "upsertMessage", { enumerable: true, get: function () { return chatSlice_1.upsertMessage; } });
|
|
302
|
+
Object.defineProperty(exports, "addOptimisticMessage", { enumerable: true, get: function () { return chatSlice_1.addOptimisticMessage; } });
|
|
303
|
+
Object.defineProperty(exports, "failOptimisticMessage", { enumerable: true, get: function () { return chatSlice_1.failOptimisticMessage; } });
|
|
304
|
+
Object.defineProperty(exports, "removeMessage", { enumerable: true, get: function () { return chatSlice_1.removeMessage; } });
|
|
305
|
+
Object.defineProperty(exports, "updateReactions", { enumerable: true, get: function () { return chatSlice_1.updateReactions; } });
|
|
306
|
+
Object.defineProperty(exports, "setThreadReplies", { enumerable: true, get: function () { return chatSlice_1.setThreadReplies; } });
|
|
307
|
+
Object.defineProperty(exports, "setThreadLoading", { enumerable: true, get: function () { return chatSlice_1.setThreadLoading; } });
|
|
308
|
+
Object.defineProperty(exports, "setTypingUsers", { enumerable: true, get: function () { return chatSlice_1.setTypingUsers; } });
|
|
309
|
+
Object.defineProperty(exports, "setSocketConnected", { enumerable: true, get: function () { return chatSlice_1.setSocketConnected; } });
|
|
310
|
+
Object.defineProperty(exports, "selectConversation", { enumerable: true, get: function () { return chatSlice_1.selectConversation; } });
|
|
311
|
+
Object.defineProperty(exports, "selectConversationLoading", { enumerable: true, get: function () { return chatSlice_1.selectConversationLoading; } });
|
|
312
|
+
Object.defineProperty(exports, "selectConversationList", { enumerable: true, get: function () { return chatSlice_1.selectConversationList; } });
|
|
313
|
+
Object.defineProperty(exports, "selectConversationListLoading", { enumerable: true, get: function () { return chatSlice_1.selectConversationListLoading; } });
|
|
314
|
+
Object.defineProperty(exports, "selectConversationListHasMore", { enumerable: true, get: function () { return chatSlice_1.selectConversationListHasMore; } });
|
|
315
|
+
Object.defineProperty(exports, "selectConversationListCursor", { enumerable: true, get: function () { return chatSlice_1.selectConversationListCursor; } });
|
|
316
|
+
Object.defineProperty(exports, "selectMessages", { enumerable: true, get: function () { return chatSlice_1.selectMessages; } });
|
|
317
|
+
Object.defineProperty(exports, "selectMessagesLoading", { enumerable: true, get: function () { return chatSlice_1.selectMessagesLoading; } });
|
|
318
|
+
Object.defineProperty(exports, "selectMessagesHasMore", { enumerable: true, get: function () { return chatSlice_1.selectMessagesHasMore; } });
|
|
319
|
+
Object.defineProperty(exports, "selectOldestMessageId", { enumerable: true, get: function () { return chatSlice_1.selectOldestMessageId; } });
|
|
320
|
+
Object.defineProperty(exports, "selectNewestMessageId", { enumerable: true, get: function () { return chatSlice_1.selectNewestMessageId; } });
|
|
321
|
+
Object.defineProperty(exports, "selectThreadReplies", { enumerable: true, get: function () { return chatSlice_1.selectThreadReplies; } });
|
|
322
|
+
Object.defineProperty(exports, "selectThreadLoading", { enumerable: true, get: function () { return chatSlice_1.selectThreadLoading; } });
|
|
323
|
+
Object.defineProperty(exports, "selectThreadHasMore", { enumerable: true, get: function () { return chatSlice_1.selectThreadHasMore; } });
|
|
324
|
+
Object.defineProperty(exports, "selectTypingUsers", { enumerable: true, get: function () { return chatSlice_1.selectTypingUsers; } });
|
|
325
|
+
Object.defineProperty(exports, "selectSocketConnected", { enumerable: true, get: function () { return chatSlice_1.selectSocketConnected; } });
|
|
261
326
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sBAAsB;AACtB,mDAAkD;AAAzC,0GAAA,WAAW,OAAA;AACpB,yDAAwD;AAA/C,gHAAA,cAAc,OAAA;AACvB,qEAAoE;AAA3D,0HAAA,mBAAmB,OAAA;AAC5B,qDAAoD;AAA3C,0GAAA,WAAW,OAAA;AACpB,+DAAyE;AAAhE,qIAAA,OAAO,OAAoB;AACpC,mCAKqB;AAJnB,oGAAA,aAAa,OAAA;AACb,mGAAA,YAAY,OAAA;AACZ,oGAAA,aAAa,OAAA;AACb,gGAAA,SAAS,OAAA;AAGX,YAAY;AACZ,2DAA0D;AAAjD,8GAAA,aAAa,OAAA;AAGtB,+CAA+C;AAC/C,qCAkBmB;AAjBjB,0GAAA,eAAe,OAAA;AACf,qHAAA,0BAA0B,OAAA;AAC1B,yGAAA,cAAc,OAAA;AACd,iHAAA,sBAAsB,OAAA;AACtB,wGAAA,aAAa,OAAA;AACb,uGAAA,YAAY,OAAA;AACZ,+GAAA,oBAAoB,OAAA;AACpB,gHAAA,qBAAqB,OAAA;AACrB,yGAAA,cAAc,OAAA;AACd,iHAAA,sBAAsB,OAAA;AACtB,kHAAA,uBAAuB,OAAA;AASzB,kEAAkE;AAClE,mDAM6B;AAL3B,8GAAA,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2GAAA,mBAAmB,OAAA;AACnB,0GAAA,kBAAkB,OAAA;AAClB,qGAAA,aAAa,OAAA;AA2Cf,gBAAgB;AAChB,sDAsCkC;AArChC,4GAAA,eAAe,OAAA;AACf,mHAAA,sBAAsB,OAAA;AACtB,gHAAA,mBAAmB,OAAA;AACnB,uHAAA,0BAA0B,OAAA;AAC1B,uHAAA,0BAA0B,OAAA;AAC1B,sHAAA,yBAAyB,OAAA;AACzB,sHAAA,yBAAyB,OAAA;AACzB,4GAAA,eAAe,OAAA;AACf,wGAAA,WAAW,OAAA;AACX,+GAAA,kBAAkB,OAAA;AAClB,+GAAA,kBAAkB,OAAA;AAClB,0GAAA,aAAa,OAAA;AACb,iHAAA,oBAAoB,OAAA;AACpB,kHAAA,qBAAqB,OAAA;AACrB,0GAAA,aAAa,OAAA;AACb,4GAAA,eAAe,OAAA;AACf,6GAAA,gBAAgB,OAAA;AAChB,6GAAA,gBAAgB,OAAA;AAChB,2GAAA,cAAc,OAAA;AACd,+GAAA,kBAAkB,OAAA;AAClB,+GAAA,kBAAkB,OAAA;AAClB,sHAAA,yBAAyB,OAAA;AACzB,mHAAA,sBAAsB,OAAA;AACtB,0HAAA,6BAA6B,OAAA;AAC7B,0HAAA,6BAA6B,OAAA;AAC7B,yHAAA,4BAA4B,OAAA;AAC5B,2GAAA,cAAc,OAAA;AACd,kHAAA,qBAAqB,OAAA;AACrB,kHAAA,qBAAqB,OAAA;AACrB,kHAAA,qBAAqB,OAAA;AACrB,kHAAA,qBAAqB,OAAA;AACrB,gHAAA,mBAAmB,OAAA;AACnB,gHAAA,mBAAmB,OAAA;AACnB,gHAAA,mBAAmB,OAAA;AACnB,8GAAA,iBAAiB,OAAA;AACjB,kHAAA,qBAAqB,OAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { GifData } from "./Comment";
|
|
2
|
+
import { File } from "./File";
|
|
3
|
+
import { Mention } from "./Mention";
|
|
4
|
+
import { User } from "./User";
|
|
5
|
+
export interface IChatMessage {
|
|
6
|
+
id: string;
|
|
7
|
+
clientId?: string;
|
|
8
|
+
projectId: string;
|
|
9
|
+
conversationId: string;
|
|
10
|
+
userId: string | null;
|
|
11
|
+
content: string | null;
|
|
12
|
+
gif: GifData | null;
|
|
13
|
+
mentions: Mention[];
|
|
14
|
+
files?: File[];
|
|
15
|
+
metadata: Record<string, any>;
|
|
16
|
+
parentMessageId: string | null;
|
|
17
|
+
quotedMessageId: string | null;
|
|
18
|
+
threadReplyCount: number;
|
|
19
|
+
reactionCounts: Record<string, number>;
|
|
20
|
+
userReactions: string[];
|
|
21
|
+
editedAt: Date | null;
|
|
22
|
+
userDeletedAt: Date | null;
|
|
23
|
+
moderationStatus: "approved" | "removed" | null;
|
|
24
|
+
moderatedAt: Date | null;
|
|
25
|
+
moderatedById: string | null;
|
|
26
|
+
moderatedByType: "client" | "user" | null;
|
|
27
|
+
moderationReason: string | null;
|
|
28
|
+
createdAt: Date;
|
|
29
|
+
updatedAt: Date;
|
|
30
|
+
user: User | null;
|
|
31
|
+
quotedMessage?: IChatMessage | null;
|
|
32
|
+
parentMessage?: IChatMessage | null;
|
|
33
|
+
sendFailed?: boolean;
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IChatMessage.js","sourceRoot":"","sources":["../../../../src/interfaces/models/IChatMessage.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { File } from "./File";
|
|
2
|
+
import { IChatMessage } from "./IChatMessage";
|
|
3
|
+
import { IConversationMember } from "./IConversationMember";
|
|
4
|
+
export interface IConversation {
|
|
5
|
+
id: string;
|
|
6
|
+
projectId: string;
|
|
7
|
+
type: "direct" | "group" | "space";
|
|
8
|
+
name: string | null;
|
|
9
|
+
description: string | null;
|
|
10
|
+
spaceId: string | null;
|
|
11
|
+
createdById: string | null;
|
|
12
|
+
avatarFileId: string | null;
|
|
13
|
+
lastMessageAt: Date | null;
|
|
14
|
+
postingPermission: "members" | "admins" | null;
|
|
15
|
+
metadata: Record<string, any>;
|
|
16
|
+
createdAt: Date;
|
|
17
|
+
updatedAt: Date;
|
|
18
|
+
memberCount?: number;
|
|
19
|
+
currentMember?: IConversationMember;
|
|
20
|
+
avatarFile?: File;
|
|
21
|
+
}
|
|
22
|
+
export interface IConversationPreview extends IConversation {
|
|
23
|
+
unreadCount: number;
|
|
24
|
+
lastMessage: IChatMessage | null;
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IConversation.js","sourceRoot":"","sources":["../../../../src/interfaces/models/IConversation.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { User } from "./User";
|
|
2
|
+
export type ConversationMemberRole = "admin" | "member";
|
|
3
|
+
export interface IConversationMember {
|
|
4
|
+
id: string;
|
|
5
|
+
projectId: string;
|
|
6
|
+
conversationId: string;
|
|
7
|
+
userId: string;
|
|
8
|
+
role: ConversationMemberRole | null;
|
|
9
|
+
lastReadAt: Date | null;
|
|
10
|
+
mutedUntil: Date | null;
|
|
11
|
+
isActive: boolean;
|
|
12
|
+
leftAt: Date | null;
|
|
13
|
+
createdAt: Date;
|
|
14
|
+
updatedAt: Date;
|
|
15
|
+
user?: User;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IConversationMember.js","sourceRoot":"","sources":["../../../../src/interfaces/models/IConversationMember.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Mention = UserMention | SpaceMention;
|
|
2
|
+
export interface UserMention {
|
|
3
|
+
type: "user";
|
|
2
4
|
id: string;
|
|
3
5
|
foreignId?: string | null;
|
|
4
6
|
username: string;
|
|
5
7
|
}
|
|
8
|
+
export interface SpaceMention {
|
|
9
|
+
type: "space";
|
|
10
|
+
id: string;
|
|
11
|
+
slug: string;
|
|
12
|
+
}
|