@replyke/core 6.1.1 → 6.2.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/dist/cjs/context/index.d.ts +1 -0
  2. package/dist/cjs/context/index.js +3 -1
  3. package/dist/cjs/context/index.js.map +1 -1
  4. package/dist/cjs/context/space-context.d.ts +9 -0
  5. package/dist/cjs/context/space-context.js +35 -0
  6. package/dist/cjs/context/space-context.js.map +1 -0
  7. package/dist/cjs/hooks/crypto/useSignTestingJwt.d.ts +1 -2
  8. package/dist/cjs/hooks/crypto/useSignTestingJwt.js +17 -10
  9. package/dist/cjs/hooks/crypto/useSignTestingJwt.js.map +1 -1
  10. package/dist/cjs/hooks/projects/useProjectData.js +1 -1
  11. package/dist/cjs/hooks/projects/useProjectData.js.map +1 -1
  12. package/dist/cjs/hooks/reports/index.d.ts +3 -0
  13. package/dist/cjs/hooks/reports/index.js +7 -1
  14. package/dist/cjs/hooks/reports/index.js.map +1 -1
  15. package/dist/cjs/hooks/reports/useFetchSpaceReports.d.ts +38 -0
  16. package/dist/cjs/hooks/reports/useFetchSpaceReports.js +96 -0
  17. package/dist/cjs/hooks/reports/useFetchSpaceReports.js.map +1 -0
  18. package/dist/cjs/hooks/reports/useHandleSpaceCommentReport.d.ts +30 -0
  19. package/dist/cjs/hooks/reports/useHandleSpaceCommentReport.js +92 -0
  20. package/dist/cjs/hooks/reports/useHandleSpaceCommentReport.js.map +1 -0
  21. package/dist/cjs/hooks/reports/useHandleSpaceEntityReport.d.ts +32 -0
  22. package/dist/cjs/hooks/reports/useHandleSpaceEntityReport.js +94 -0
  23. package/dist/cjs/hooks/reports/useHandleSpaceEntityReport.js.map +1 -0
  24. package/dist/cjs/hooks/space-lists/index.d.ts +3 -0
  25. package/dist/cjs/hooks/space-lists/index.js +11 -0
  26. package/dist/cjs/hooks/space-lists/index.js.map +1 -0
  27. package/dist/cjs/hooks/space-lists/useSpaceList.d.ts +36 -0
  28. package/dist/cjs/hooks/space-lists/useSpaceList.js +293 -0
  29. package/dist/cjs/hooks/space-lists/useSpaceList.js.map +1 -0
  30. package/dist/cjs/hooks/space-lists/useSpaceListActions.d.ts +33 -0
  31. package/dist/cjs/hooks/space-lists/useSpaceListActions.js +210 -0
  32. package/dist/cjs/hooks/space-lists/useSpaceListActions.js.map +1 -0
  33. package/dist/cjs/hooks/spaces/index.d.ts +22 -0
  34. package/dist/cjs/hooks/spaces/index.js +51 -0
  35. package/dist/cjs/hooks/spaces/index.js.map +1 -0
  36. package/dist/cjs/hooks/spaces/useApproveMember.d.ts +7 -0
  37. package/dist/cjs/hooks/spaces/useApproveMember.js +71 -0
  38. package/dist/cjs/hooks/spaces/useApproveMember.js.map +1 -0
  39. package/dist/cjs/hooks/spaces/useCreateSpace.d.ts +15 -0
  40. package/dist/cjs/hooks/spaces/useCreateSpace.js +70 -0
  41. package/dist/cjs/hooks/spaces/useCreateSpace.js.map +1 -0
  42. package/dist/cjs/hooks/spaces/useDeclineMember.d.ts +7 -0
  43. package/dist/cjs/hooks/spaces/useDeclineMember.js +71 -0
  44. package/dist/cjs/hooks/spaces/useDeclineMember.js.map +1 -0
  45. package/dist/cjs/hooks/spaces/useDeleteSpace.d.ts +5 -0
  46. package/dist/cjs/hooks/spaces/useDeleteSpace.js +71 -0
  47. package/dist/cjs/hooks/spaces/useDeleteSpace.js.map +1 -0
  48. package/dist/cjs/hooks/spaces/useFetchMySpaces.d.ts +8 -0
  49. package/dist/cjs/hooks/spaces/useFetchMySpaces.js +85 -0
  50. package/dist/cjs/hooks/spaces/useFetchMySpaces.js.map +1 -0
  51. package/dist/cjs/hooks/spaces/useFetchSpace.d.ts +5 -0
  52. package/dist/cjs/hooks/spaces/useFetchSpace.js +71 -0
  53. package/dist/cjs/hooks/spaces/useFetchSpace.js.map +1 -0
  54. package/dist/cjs/hooks/spaces/useFetchSpaceBreadcrumb.d.ts +5 -0
  55. package/dist/cjs/hooks/spaces/useFetchSpaceBreadcrumb.js +71 -0
  56. package/dist/cjs/hooks/spaces/useFetchSpaceBreadcrumb.js.map +1 -0
  57. package/dist/cjs/hooks/spaces/useFetchSpaceByShortId.d.ts +5 -0
  58. package/dist/cjs/hooks/spaces/useFetchSpaceByShortId.js +71 -0
  59. package/dist/cjs/hooks/spaces/useFetchSpaceByShortId.js.map +1 -0
  60. package/dist/cjs/hooks/spaces/useFetchSpaceBySlug.d.ts +5 -0
  61. package/dist/cjs/hooks/spaces/useFetchSpaceBySlug.js +71 -0
  62. package/dist/cjs/hooks/spaces/useFetchSpaceBySlug.js.map +1 -0
  63. package/dist/cjs/hooks/spaces/useFetchSpaceChildren.d.ts +8 -0
  64. package/dist/cjs/hooks/spaces/useFetchSpaceChildren.js +70 -0
  65. package/dist/cjs/hooks/spaces/useFetchSpaceChildren.js.map +1 -0
  66. package/dist/cjs/hooks/spaces/useFetchSpaceMembers.d.ts +10 -0
  67. package/dist/cjs/hooks/spaces/useFetchSpaceMembers.js +82 -0
  68. package/dist/cjs/hooks/spaces/useFetchSpaceMembers.js.map +1 -0
  69. package/dist/cjs/hooks/spaces/useJoinSpace.d.ts +5 -0
  70. package/dist/cjs/hooks/spaces/useJoinSpace.js +71 -0
  71. package/dist/cjs/hooks/spaces/useJoinSpace.js.map +1 -0
  72. package/dist/cjs/hooks/spaces/useLeaveSpace.d.ts +5 -0
  73. package/dist/cjs/hooks/spaces/useLeaveSpace.js +71 -0
  74. package/dist/cjs/hooks/spaces/useLeaveSpace.js.map +1 -0
  75. package/dist/cjs/hooks/spaces/useRemoveMember.d.ts +9 -0
  76. package/dist/cjs/hooks/spaces/useRemoveMember.js +71 -0
  77. package/dist/cjs/hooks/spaces/useRemoveMember.js.map +1 -0
  78. package/dist/cjs/hooks/spaces/useSpace.d.ts +3 -0
  79. package/dist/cjs/hooks/spaces/useSpace.js +13 -0
  80. package/dist/cjs/hooks/spaces/useSpace.js.map +1 -0
  81. package/dist/cjs/hooks/spaces/useSpaceData.d.ts +32 -0
  82. package/dist/cjs/hooks/spaces/useSpaceData.js +358 -0
  83. package/dist/cjs/hooks/spaces/useSpaceData.js.map +1 -0
  84. package/dist/cjs/hooks/spaces/useSpacePermissions.d.ts +18 -0
  85. package/dist/cjs/hooks/spaces/useSpacePermissions.js +53 -0
  86. package/dist/cjs/hooks/spaces/useSpacePermissions.js.map +1 -0
  87. package/dist/cjs/hooks/spaces/useUpdateMemberRole.d.ts +9 -0
  88. package/dist/cjs/hooks/spaces/useUpdateMemberRole.js +71 -0
  89. package/dist/cjs/hooks/spaces/useUpdateMemberRole.js.map +1 -0
  90. package/dist/cjs/hooks/spaces/useUpdateSpace.d.ts +17 -0
  91. package/dist/cjs/hooks/spaces/useUpdateSpace.js +71 -0
  92. package/dist/cjs/hooks/spaces/useUpdateSpace.js.map +1 -0
  93. package/dist/cjs/index.d.ts +10 -1
  94. package/dist/cjs/index.js +35 -2
  95. package/dist/cjs/index.js.map +1 -1
  96. package/dist/cjs/interfaces/SpaceBreadcrumb.d.ts +5 -0
  97. package/dist/cjs/interfaces/SpaceBreadcrumb.js +3 -0
  98. package/dist/cjs/interfaces/SpaceBreadcrumb.js.map +1 -0
  99. package/dist/cjs/interfaces/SpaceListSortByOptions.d.ts +7 -0
  100. package/dist/cjs/interfaces/SpaceListSortByOptions.js +3 -0
  101. package/dist/cjs/interfaces/SpaceListSortByOptions.js.map +1 -0
  102. package/dist/cjs/interfaces/models/Space.d.ts +122 -0
  103. package/dist/cjs/interfaces/models/Space.js +3 -0
  104. package/dist/cjs/interfaces/models/Space.js.map +1 -0
  105. package/dist/cjs/interfaces/models/SpaceMember.d.ts +27 -0
  106. package/dist/cjs/interfaces/models/SpaceMember.js +3 -0
  107. package/dist/cjs/interfaces/models/SpaceMember.js.map +1 -0
  108. package/dist/cjs/interfaces/models/User.d.ts +1 -1
  109. package/dist/cjs/store/api/appNotificationsApi.d.ts +741 -221
  110. package/dist/cjs/store/api/baseApi.d.ts +1 -1
  111. package/dist/cjs/store/api/baseApi.js +2 -0
  112. package/dist/cjs/store/api/baseApi.js.map +1 -1
  113. package/dist/cjs/store/api/entityListsApi.d.ts +387 -127
  114. package/dist/cjs/store/api/listsApi.d.ts +786 -266
  115. package/dist/cjs/store/api/spacesApi.d.ts +10750 -0
  116. package/dist/cjs/store/api/spacesApi.js +501 -0
  117. package/dist/cjs/store/api/spacesApi.js.map +1 -0
  118. package/dist/cjs/store/api/userApi.d.ts +3 -3
  119. package/dist/cjs/store/index.d.ts +4 -2
  120. package/dist/cjs/store/rootReducer.d.ts +4 -2
  121. package/dist/cjs/store/rootReducer.js +2 -0
  122. package/dist/cjs/store/rootReducer.js.map +1 -1
  123. package/dist/cjs/store/slices/appNotificationsSlice.d.ts +2365 -11
  124. package/dist/cjs/store/slices/entityListsSlice.d.ts +1608 -12
  125. package/dist/cjs/store/slices/listsSlice.d.ts +1414 -14
  126. package/dist/cjs/store/slices/spaceListsSlice.d.ts +850 -0
  127. package/dist/cjs/store/slices/spaceListsSlice.js +226 -0
  128. package/dist/cjs/store/slices/spaceListsSlice.js.map +1 -0
  129. package/dist/cjs/store/slices/userSlice.d.ts +248 -8
  130. package/dist/esm/context/index.d.ts +1 -0
  131. package/dist/esm/context/index.js +1 -0
  132. package/dist/esm/context/index.js.map +1 -1
  133. package/dist/esm/context/space-context.d.ts +9 -0
  134. package/dist/esm/context/space-context.js +28 -0
  135. package/dist/esm/context/space-context.js.map +1 -0
  136. package/dist/esm/hooks/crypto/useSignTestingJwt.d.ts +1 -2
  137. package/dist/esm/hooks/crypto/useSignTestingJwt.js +17 -10
  138. package/dist/esm/hooks/crypto/useSignTestingJwt.js.map +1 -1
  139. package/dist/esm/hooks/projects/useProjectData.js +1 -1
  140. package/dist/esm/hooks/projects/useProjectData.js.map +1 -1
  141. package/dist/esm/hooks/reports/index.d.ts +3 -0
  142. package/dist/esm/hooks/reports/index.js +3 -0
  143. package/dist/esm/hooks/reports/index.js.map +1 -1
  144. package/dist/esm/hooks/reports/useFetchSpaceReports.d.ts +38 -0
  145. package/dist/esm/hooks/reports/useFetchSpaceReports.js +91 -0
  146. package/dist/esm/hooks/reports/useFetchSpaceReports.js.map +1 -0
  147. package/dist/esm/hooks/reports/useHandleSpaceCommentReport.d.ts +30 -0
  148. package/dist/esm/hooks/reports/useHandleSpaceCommentReport.js +87 -0
  149. package/dist/esm/hooks/reports/useHandleSpaceCommentReport.js.map +1 -0
  150. package/dist/esm/hooks/reports/useHandleSpaceEntityReport.d.ts +32 -0
  151. package/dist/esm/hooks/reports/useHandleSpaceEntityReport.js +89 -0
  152. package/dist/esm/hooks/reports/useHandleSpaceEntityReport.js.map +1 -0
  153. package/dist/esm/hooks/space-lists/index.d.ts +3 -0
  154. package/dist/esm/hooks/space-lists/index.js +3 -0
  155. package/dist/esm/hooks/space-lists/index.js.map +1 -0
  156. package/dist/esm/hooks/space-lists/useSpaceList.d.ts +36 -0
  157. package/dist/esm/hooks/space-lists/useSpaceList.js +288 -0
  158. package/dist/esm/hooks/space-lists/useSpaceList.js.map +1 -0
  159. package/dist/esm/hooks/space-lists/useSpaceListActions.d.ts +33 -0
  160. package/dist/esm/hooks/space-lists/useSpaceListActions.js +204 -0
  161. package/dist/esm/hooks/space-lists/useSpaceListActions.js.map +1 -0
  162. package/dist/esm/hooks/spaces/index.d.ts +22 -0
  163. package/dist/esm/hooks/spaces/index.js +26 -0
  164. package/dist/esm/hooks/spaces/index.js.map +1 -0
  165. package/dist/esm/hooks/spaces/useApproveMember.d.ts +7 -0
  166. package/dist/esm/hooks/spaces/useApproveMember.js +66 -0
  167. package/dist/esm/hooks/spaces/useApproveMember.js.map +1 -0
  168. package/dist/esm/hooks/spaces/useCreateSpace.d.ts +15 -0
  169. package/dist/esm/hooks/spaces/useCreateSpace.js +65 -0
  170. package/dist/esm/hooks/spaces/useCreateSpace.js.map +1 -0
  171. package/dist/esm/hooks/spaces/useDeclineMember.d.ts +7 -0
  172. package/dist/esm/hooks/spaces/useDeclineMember.js +66 -0
  173. package/dist/esm/hooks/spaces/useDeclineMember.js.map +1 -0
  174. package/dist/esm/hooks/spaces/useDeleteSpace.d.ts +5 -0
  175. package/dist/esm/hooks/spaces/useDeleteSpace.js +66 -0
  176. package/dist/esm/hooks/spaces/useDeleteSpace.js.map +1 -0
  177. package/dist/esm/hooks/spaces/useFetchMySpaces.d.ts +8 -0
  178. package/dist/esm/hooks/spaces/useFetchMySpaces.js +80 -0
  179. package/dist/esm/hooks/spaces/useFetchMySpaces.js.map +1 -0
  180. package/dist/esm/hooks/spaces/useFetchSpace.d.ts +5 -0
  181. package/dist/esm/hooks/spaces/useFetchSpace.js +66 -0
  182. package/dist/esm/hooks/spaces/useFetchSpace.js.map +1 -0
  183. package/dist/esm/hooks/spaces/useFetchSpaceBreadcrumb.d.ts +5 -0
  184. package/dist/esm/hooks/spaces/useFetchSpaceBreadcrumb.js +66 -0
  185. package/dist/esm/hooks/spaces/useFetchSpaceBreadcrumb.js.map +1 -0
  186. package/dist/esm/hooks/spaces/useFetchSpaceByShortId.d.ts +5 -0
  187. package/dist/esm/hooks/spaces/useFetchSpaceByShortId.js +66 -0
  188. package/dist/esm/hooks/spaces/useFetchSpaceByShortId.js.map +1 -0
  189. package/dist/esm/hooks/spaces/useFetchSpaceBySlug.d.ts +5 -0
  190. package/dist/esm/hooks/spaces/useFetchSpaceBySlug.js +66 -0
  191. package/dist/esm/hooks/spaces/useFetchSpaceBySlug.js.map +1 -0
  192. package/dist/esm/hooks/spaces/useFetchSpaceChildren.d.ts +8 -0
  193. package/dist/esm/hooks/spaces/useFetchSpaceChildren.js +65 -0
  194. package/dist/esm/hooks/spaces/useFetchSpaceChildren.js.map +1 -0
  195. package/dist/esm/hooks/spaces/useFetchSpaceMembers.d.ts +10 -0
  196. package/dist/esm/hooks/spaces/useFetchSpaceMembers.js +77 -0
  197. package/dist/esm/hooks/spaces/useFetchSpaceMembers.js.map +1 -0
  198. package/dist/esm/hooks/spaces/useJoinSpace.d.ts +5 -0
  199. package/dist/esm/hooks/spaces/useJoinSpace.js +66 -0
  200. package/dist/esm/hooks/spaces/useJoinSpace.js.map +1 -0
  201. package/dist/esm/hooks/spaces/useLeaveSpace.d.ts +5 -0
  202. package/dist/esm/hooks/spaces/useLeaveSpace.js +66 -0
  203. package/dist/esm/hooks/spaces/useLeaveSpace.js.map +1 -0
  204. package/dist/esm/hooks/spaces/useRemoveMember.d.ts +9 -0
  205. package/dist/esm/hooks/spaces/useRemoveMember.js +66 -0
  206. package/dist/esm/hooks/spaces/useRemoveMember.js.map +1 -0
  207. package/dist/esm/hooks/spaces/useSpace.d.ts +3 -0
  208. package/dist/esm/hooks/spaces/useSpace.js +11 -0
  209. package/dist/esm/hooks/spaces/useSpace.js.map +1 -0
  210. package/dist/esm/hooks/spaces/useSpaceData.d.ts +32 -0
  211. package/dist/esm/hooks/spaces/useSpaceData.js +353 -0
  212. package/dist/esm/hooks/spaces/useSpaceData.js.map +1 -0
  213. package/dist/esm/hooks/spaces/useSpacePermissions.d.ts +18 -0
  214. package/dist/esm/hooks/spaces/useSpacePermissions.js +51 -0
  215. package/dist/esm/hooks/spaces/useSpacePermissions.js.map +1 -0
  216. package/dist/esm/hooks/spaces/useUpdateMemberRole.d.ts +9 -0
  217. package/dist/esm/hooks/spaces/useUpdateMemberRole.js +66 -0
  218. package/dist/esm/hooks/spaces/useUpdateMemberRole.js.map +1 -0
  219. package/dist/esm/hooks/spaces/useUpdateSpace.d.ts +17 -0
  220. package/dist/esm/hooks/spaces/useUpdateSpace.js +66 -0
  221. package/dist/esm/hooks/spaces/useUpdateSpace.js.map +1 -0
  222. package/dist/esm/index.d.ts +10 -1
  223. package/dist/esm/index.js +8 -1
  224. package/dist/esm/index.js.map +1 -1
  225. package/dist/esm/interfaces/SpaceBreadcrumb.d.ts +5 -0
  226. package/dist/esm/interfaces/SpaceBreadcrumb.js +2 -0
  227. package/dist/esm/interfaces/SpaceBreadcrumb.js.map +1 -0
  228. package/dist/esm/interfaces/SpaceListSortByOptions.d.ts +7 -0
  229. package/dist/esm/interfaces/SpaceListSortByOptions.js +2 -0
  230. package/dist/esm/interfaces/SpaceListSortByOptions.js.map +1 -0
  231. package/dist/esm/interfaces/models/Space.d.ts +122 -0
  232. package/dist/esm/interfaces/models/Space.js +2 -0
  233. package/dist/esm/interfaces/models/Space.js.map +1 -0
  234. package/dist/esm/interfaces/models/SpaceMember.d.ts +27 -0
  235. package/dist/esm/interfaces/models/SpaceMember.js +2 -0
  236. package/dist/esm/interfaces/models/SpaceMember.js.map +1 -0
  237. package/dist/esm/interfaces/models/User.d.ts +1 -1
  238. package/dist/esm/store/api/appNotificationsApi.d.ts +741 -221
  239. package/dist/esm/store/api/baseApi.d.ts +1 -1
  240. package/dist/esm/store/api/baseApi.js +2 -0
  241. package/dist/esm/store/api/baseApi.js.map +1 -1
  242. package/dist/esm/store/api/entityListsApi.d.ts +387 -127
  243. package/dist/esm/store/api/listsApi.d.ts +786 -266
  244. package/dist/esm/store/api/spacesApi.d.ts +10750 -0
  245. package/dist/esm/store/api/spacesApi.js +498 -0
  246. package/dist/esm/store/api/spacesApi.js.map +1 -0
  247. package/dist/esm/store/api/userApi.d.ts +3 -3
  248. package/dist/esm/store/index.d.ts +4 -2
  249. package/dist/esm/store/rootReducer.d.ts +4 -2
  250. package/dist/esm/store/rootReducer.js +2 -0
  251. package/dist/esm/store/rootReducer.js.map +1 -1
  252. package/dist/esm/store/slices/appNotificationsSlice.d.ts +2365 -11
  253. package/dist/esm/store/slices/entityListsSlice.d.ts +1608 -12
  254. package/dist/esm/store/slices/listsSlice.d.ts +1414 -14
  255. package/dist/esm/store/slices/spaceListsSlice.d.ts +850 -0
  256. package/dist/esm/store/slices/spaceListsSlice.js +223 -0
  257. package/dist/esm/store/slices/spaceListsSlice.js.map +1 -0
  258. package/dist/esm/store/slices/userSlice.d.ts +248 -8
  259. package/package.json +1 -1
@@ -11,20 +11,2374 @@ export interface AppNotificationsState {
11
11
  currentProjectId?: string;
12
12
  }
13
13
  export declare const appNotificationsSlice: import("@reduxjs/toolkit").Slice<AppNotificationsState, {
14
- setProjectContext: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>, action: PayloadAction<string>) => void;
15
- setLimit: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>, action: PayloadAction<number>) => void;
16
- setNotificationTemplates: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>, action: PayloadAction<Partial<NotificationTemplates>>) => void;
17
- resetNotifications: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>) => void;
18
- loadMore: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>) => void;
19
- setLoading: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>, action: PayloadAction<boolean>) => void;
20
- addNotifications: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>, action: PayloadAction<{
14
+ setProjectContext: (state: {
15
+ notifications: ({
16
+ type: "system";
17
+ action: string;
18
+ metadata: {
19
+ title?: string | undefined;
20
+ content?: string | undefined;
21
+ buttonData: {
22
+ text: string;
23
+ url: string;
24
+ } | null;
25
+ };
26
+ id: string;
27
+ userId: string;
28
+ isRead: boolean;
29
+ createdAt: string;
30
+ } | {
31
+ type: "entity-comment";
32
+ action: "open-comment";
33
+ metadata: {
34
+ entityId: string;
35
+ entityShortId: string;
36
+ entityTitle: string | null | undefined;
37
+ entityContent: string | null | undefined;
38
+ commentId: string;
39
+ commentContent: string | null | undefined;
40
+ initiatorId: string;
41
+ initiatorName: string | null | undefined;
42
+ initiatorUsername: string | null | undefined;
43
+ initiatorAvatar: string | null | undefined;
44
+ };
45
+ id: string;
46
+ userId: string;
47
+ isRead: boolean;
48
+ createdAt: string;
49
+ } | {
50
+ type: "comment-reply";
51
+ action: "open-comment";
52
+ metadata: {
53
+ entityId: string;
54
+ entityShortId: string;
55
+ entityTitle: string | null | undefined;
56
+ entityContent: string | null | undefined;
57
+ commentId: string;
58
+ commentContent: string | null | undefined;
59
+ replyId: string;
60
+ replyContent: string | null | undefined;
61
+ initiatorId: string;
62
+ initiatorName: string | null | undefined;
63
+ initiatorUsername: string | null | undefined;
64
+ initiatorAvatar: string | null | undefined;
65
+ };
66
+ id: string;
67
+ userId: string;
68
+ isRead: boolean;
69
+ createdAt: string;
70
+ } | {
71
+ type: "entity-mention";
72
+ action: "open-entity";
73
+ metadata: {
74
+ entityId: string;
75
+ entityShortId: string;
76
+ entityTitle: string | null | undefined;
77
+ entityContent: string | null | undefined;
78
+ initiatorId: string;
79
+ initiatorName: string | null | undefined;
80
+ initiatorUsername: string | null | undefined;
81
+ initiatorAvatar: string | null | undefined;
82
+ };
83
+ id: string;
84
+ userId: string;
85
+ isRead: boolean;
86
+ createdAt: string;
87
+ } | {
88
+ type: "comment-mention";
89
+ action: "open-comment";
90
+ metadata: {
91
+ entityId: string;
92
+ entityShortId: string;
93
+ entityTitle: string | null | undefined;
94
+ entityContent: string | null | undefined;
95
+ commentId: string;
96
+ commentContent: string | null | undefined;
97
+ initiatorId: string;
98
+ initiatorName: string | null | undefined;
99
+ initiatorUsername: string | null | undefined;
100
+ initiatorAvatar: string | null | undefined;
101
+ };
102
+ id: string;
103
+ userId: string;
104
+ isRead: boolean;
105
+ createdAt: string;
106
+ } | {
107
+ type: "entity-upvote";
108
+ action: "open-entity";
109
+ metadata: {
110
+ entityId: string;
111
+ entityShortId: string;
112
+ entityTitle: string | null | undefined;
113
+ entityContent: string | null | undefined;
114
+ initiatorId: string;
115
+ initiatorName: string | null | undefined;
116
+ initiatorUsername: string | null | undefined;
117
+ initiatorAvatar: string | null | undefined;
118
+ };
119
+ id: string;
120
+ userId: string;
121
+ isRead: boolean;
122
+ createdAt: string;
123
+ } | {
124
+ type: "comment-upvote";
125
+ action: "open-comment";
126
+ metadata: {
127
+ entityId: string;
128
+ entityShortId: string;
129
+ entityTitle: string | null | undefined;
130
+ entityContent: string | null | undefined;
131
+ commentId: string;
132
+ commentContent: string | null | undefined;
133
+ initiatorId: string;
134
+ initiatorName: string | null | undefined;
135
+ initiatorUsername: string | null | undefined;
136
+ initiatorAvatar: string | null | undefined;
137
+ };
138
+ id: string;
139
+ userId: string;
140
+ isRead: boolean;
141
+ createdAt: string;
142
+ } | {
143
+ type: "new-follow";
144
+ action: "open-profile";
145
+ metadata: {
146
+ initiatorId: string;
147
+ initiatorName: string | null | undefined;
148
+ initiatorUsername: string | null | undefined;
149
+ initiatorAvatar: string | null | undefined;
150
+ };
151
+ id: string;
152
+ userId: string;
153
+ isRead: boolean;
154
+ createdAt: string;
155
+ } | {
156
+ type: "connection-request";
157
+ action: "open-profile";
158
+ metadata: {
159
+ connectionId: string;
160
+ initiatorId: string;
161
+ initiatorName: string | null | undefined;
162
+ initiatorUsername: string | null | undefined;
163
+ initiatorAvatar: string | null | undefined;
164
+ };
165
+ id: string;
166
+ userId: string;
167
+ isRead: boolean;
168
+ createdAt: string;
169
+ } | {
170
+ type: "connection-accepted";
171
+ action: "open-profile";
172
+ metadata: {
173
+ connectionId: string;
174
+ initiatorId: string;
175
+ initiatorName: string | null | undefined;
176
+ initiatorUsername: string | null | undefined;
177
+ initiatorAvatar: string | null | undefined;
178
+ };
179
+ id: string;
180
+ userId: string;
181
+ isRead: boolean;
182
+ createdAt: string;
183
+ })[];
184
+ unreadCount: number;
185
+ loading: boolean;
186
+ hasMore: boolean;
187
+ page: number;
188
+ limit: number;
189
+ notificationTemplates?: {
190
+ entityComment?: {
191
+ title?: string | undefined;
192
+ content?: string | undefined;
193
+ } | undefined;
194
+ commentReply?: {
195
+ title?: string | undefined;
196
+ content?: string | undefined;
197
+ } | undefined;
198
+ entityMention?: {
199
+ title?: string | undefined;
200
+ content?: string | undefined;
201
+ } | undefined;
202
+ commentMention?: {
203
+ title?: string | undefined;
204
+ content?: string | undefined;
205
+ } | undefined;
206
+ entityUpvote?: {
207
+ title?: string | undefined;
208
+ content?: string | undefined;
209
+ } | undefined;
210
+ commentUpvote?: {
211
+ title?: string | undefined;
212
+ content?: string | undefined;
213
+ } | undefined;
214
+ newFollow?: {
215
+ title?: string | undefined;
216
+ content?: string | undefined;
217
+ } | undefined;
218
+ connectionRequest?: {
219
+ title?: string | undefined;
220
+ content?: string | undefined;
221
+ } | undefined;
222
+ connectionAccepted?: {
223
+ title?: string | undefined;
224
+ content?: string | undefined;
225
+ } | undefined;
226
+ } | undefined;
227
+ currentProjectId?: string | undefined;
228
+ }, action: PayloadAction<string>) => void;
229
+ setLimit: (state: {
230
+ notifications: ({
231
+ type: "system";
232
+ action: string;
233
+ metadata: {
234
+ title?: string | undefined;
235
+ content?: string | undefined;
236
+ buttonData: {
237
+ text: string;
238
+ url: string;
239
+ } | null;
240
+ };
241
+ id: string;
242
+ userId: string;
243
+ isRead: boolean;
244
+ createdAt: string;
245
+ } | {
246
+ type: "entity-comment";
247
+ action: "open-comment";
248
+ metadata: {
249
+ entityId: string;
250
+ entityShortId: string;
251
+ entityTitle: string | null | undefined;
252
+ entityContent: string | null | undefined;
253
+ commentId: string;
254
+ commentContent: string | null | undefined;
255
+ initiatorId: string;
256
+ initiatorName: string | null | undefined;
257
+ initiatorUsername: string | null | undefined;
258
+ initiatorAvatar: string | null | undefined;
259
+ };
260
+ id: string;
261
+ userId: string;
262
+ isRead: boolean;
263
+ createdAt: string;
264
+ } | {
265
+ type: "comment-reply";
266
+ action: "open-comment";
267
+ metadata: {
268
+ entityId: string;
269
+ entityShortId: string;
270
+ entityTitle: string | null | undefined;
271
+ entityContent: string | null | undefined;
272
+ commentId: string;
273
+ commentContent: string | null | undefined;
274
+ replyId: string;
275
+ replyContent: string | null | undefined;
276
+ initiatorId: string;
277
+ initiatorName: string | null | undefined;
278
+ initiatorUsername: string | null | undefined;
279
+ initiatorAvatar: string | null | undefined;
280
+ };
281
+ id: string;
282
+ userId: string;
283
+ isRead: boolean;
284
+ createdAt: string;
285
+ } | {
286
+ type: "entity-mention";
287
+ action: "open-entity";
288
+ metadata: {
289
+ entityId: string;
290
+ entityShortId: string;
291
+ entityTitle: string | null | undefined;
292
+ entityContent: string | null | undefined;
293
+ initiatorId: string;
294
+ initiatorName: string | null | undefined;
295
+ initiatorUsername: string | null | undefined;
296
+ initiatorAvatar: string | null | undefined;
297
+ };
298
+ id: string;
299
+ userId: string;
300
+ isRead: boolean;
301
+ createdAt: string;
302
+ } | {
303
+ type: "comment-mention";
304
+ action: "open-comment";
305
+ metadata: {
306
+ entityId: string;
307
+ entityShortId: string;
308
+ entityTitle: string | null | undefined;
309
+ entityContent: string | null | undefined;
310
+ commentId: string;
311
+ commentContent: string | null | undefined;
312
+ initiatorId: string;
313
+ initiatorName: string | null | undefined;
314
+ initiatorUsername: string | null | undefined;
315
+ initiatorAvatar: string | null | undefined;
316
+ };
317
+ id: string;
318
+ userId: string;
319
+ isRead: boolean;
320
+ createdAt: string;
321
+ } | {
322
+ type: "entity-upvote";
323
+ action: "open-entity";
324
+ metadata: {
325
+ entityId: string;
326
+ entityShortId: string;
327
+ entityTitle: string | null | undefined;
328
+ entityContent: string | null | undefined;
329
+ initiatorId: string;
330
+ initiatorName: string | null | undefined;
331
+ initiatorUsername: string | null | undefined;
332
+ initiatorAvatar: string | null | undefined;
333
+ };
334
+ id: string;
335
+ userId: string;
336
+ isRead: boolean;
337
+ createdAt: string;
338
+ } | {
339
+ type: "comment-upvote";
340
+ action: "open-comment";
341
+ metadata: {
342
+ entityId: string;
343
+ entityShortId: string;
344
+ entityTitle: string | null | undefined;
345
+ entityContent: string | null | undefined;
346
+ commentId: string;
347
+ commentContent: string | null | undefined;
348
+ initiatorId: string;
349
+ initiatorName: string | null | undefined;
350
+ initiatorUsername: string | null | undefined;
351
+ initiatorAvatar: string | null | undefined;
352
+ };
353
+ id: string;
354
+ userId: string;
355
+ isRead: boolean;
356
+ createdAt: string;
357
+ } | {
358
+ type: "new-follow";
359
+ action: "open-profile";
360
+ metadata: {
361
+ initiatorId: string;
362
+ initiatorName: string | null | undefined;
363
+ initiatorUsername: string | null | undefined;
364
+ initiatorAvatar: string | null | undefined;
365
+ };
366
+ id: string;
367
+ userId: string;
368
+ isRead: boolean;
369
+ createdAt: string;
370
+ } | {
371
+ type: "connection-request";
372
+ action: "open-profile";
373
+ metadata: {
374
+ connectionId: string;
375
+ initiatorId: string;
376
+ initiatorName: string | null | undefined;
377
+ initiatorUsername: string | null | undefined;
378
+ initiatorAvatar: string | null | undefined;
379
+ };
380
+ id: string;
381
+ userId: string;
382
+ isRead: boolean;
383
+ createdAt: string;
384
+ } | {
385
+ type: "connection-accepted";
386
+ action: "open-profile";
387
+ metadata: {
388
+ connectionId: string;
389
+ initiatorId: string;
390
+ initiatorName: string | null | undefined;
391
+ initiatorUsername: string | null | undefined;
392
+ initiatorAvatar: string | null | undefined;
393
+ };
394
+ id: string;
395
+ userId: string;
396
+ isRead: boolean;
397
+ createdAt: string;
398
+ })[];
399
+ unreadCount: number;
400
+ loading: boolean;
401
+ hasMore: boolean;
402
+ page: number;
403
+ limit: number;
404
+ notificationTemplates?: {
405
+ entityComment?: {
406
+ title?: string | undefined;
407
+ content?: string | undefined;
408
+ } | undefined;
409
+ commentReply?: {
410
+ title?: string | undefined;
411
+ content?: string | undefined;
412
+ } | undefined;
413
+ entityMention?: {
414
+ title?: string | undefined;
415
+ content?: string | undefined;
416
+ } | undefined;
417
+ commentMention?: {
418
+ title?: string | undefined;
419
+ content?: string | undefined;
420
+ } | undefined;
421
+ entityUpvote?: {
422
+ title?: string | undefined;
423
+ content?: string | undefined;
424
+ } | undefined;
425
+ commentUpvote?: {
426
+ title?: string | undefined;
427
+ content?: string | undefined;
428
+ } | undefined;
429
+ newFollow?: {
430
+ title?: string | undefined;
431
+ content?: string | undefined;
432
+ } | undefined;
433
+ connectionRequest?: {
434
+ title?: string | undefined;
435
+ content?: string | undefined;
436
+ } | undefined;
437
+ connectionAccepted?: {
438
+ title?: string | undefined;
439
+ content?: string | undefined;
440
+ } | undefined;
441
+ } | undefined;
442
+ currentProjectId?: string | undefined;
443
+ }, action: PayloadAction<number>) => void;
444
+ setNotificationTemplates: (state: {
445
+ notifications: ({
446
+ type: "system";
447
+ action: string;
448
+ metadata: {
449
+ title?: string | undefined;
450
+ content?: string | undefined;
451
+ buttonData: {
452
+ text: string;
453
+ url: string;
454
+ } | null;
455
+ };
456
+ id: string;
457
+ userId: string;
458
+ isRead: boolean;
459
+ createdAt: string;
460
+ } | {
461
+ type: "entity-comment";
462
+ action: "open-comment";
463
+ metadata: {
464
+ entityId: string;
465
+ entityShortId: string;
466
+ entityTitle: string | null | undefined;
467
+ entityContent: string | null | undefined;
468
+ commentId: string;
469
+ commentContent: string | null | undefined;
470
+ initiatorId: string;
471
+ initiatorName: string | null | undefined;
472
+ initiatorUsername: string | null | undefined;
473
+ initiatorAvatar: string | null | undefined;
474
+ };
475
+ id: string;
476
+ userId: string;
477
+ isRead: boolean;
478
+ createdAt: string;
479
+ } | {
480
+ type: "comment-reply";
481
+ action: "open-comment";
482
+ metadata: {
483
+ entityId: string;
484
+ entityShortId: string;
485
+ entityTitle: string | null | undefined;
486
+ entityContent: string | null | undefined;
487
+ commentId: string;
488
+ commentContent: string | null | undefined;
489
+ replyId: string;
490
+ replyContent: string | null | undefined;
491
+ initiatorId: string;
492
+ initiatorName: string | null | undefined;
493
+ initiatorUsername: string | null | undefined;
494
+ initiatorAvatar: string | null | undefined;
495
+ };
496
+ id: string;
497
+ userId: string;
498
+ isRead: boolean;
499
+ createdAt: string;
500
+ } | {
501
+ type: "entity-mention";
502
+ action: "open-entity";
503
+ metadata: {
504
+ entityId: string;
505
+ entityShortId: string;
506
+ entityTitle: string | null | undefined;
507
+ entityContent: string | null | undefined;
508
+ initiatorId: string;
509
+ initiatorName: string | null | undefined;
510
+ initiatorUsername: string | null | undefined;
511
+ initiatorAvatar: string | null | undefined;
512
+ };
513
+ id: string;
514
+ userId: string;
515
+ isRead: boolean;
516
+ createdAt: string;
517
+ } | {
518
+ type: "comment-mention";
519
+ action: "open-comment";
520
+ metadata: {
521
+ entityId: string;
522
+ entityShortId: string;
523
+ entityTitle: string | null | undefined;
524
+ entityContent: string | null | undefined;
525
+ commentId: string;
526
+ commentContent: string | null | undefined;
527
+ initiatorId: string;
528
+ initiatorName: string | null | undefined;
529
+ initiatorUsername: string | null | undefined;
530
+ initiatorAvatar: string | null | undefined;
531
+ };
532
+ id: string;
533
+ userId: string;
534
+ isRead: boolean;
535
+ createdAt: string;
536
+ } | {
537
+ type: "entity-upvote";
538
+ action: "open-entity";
539
+ metadata: {
540
+ entityId: string;
541
+ entityShortId: string;
542
+ entityTitle: string | null | undefined;
543
+ entityContent: string | null | undefined;
544
+ initiatorId: string;
545
+ initiatorName: string | null | undefined;
546
+ initiatorUsername: string | null | undefined;
547
+ initiatorAvatar: string | null | undefined;
548
+ };
549
+ id: string;
550
+ userId: string;
551
+ isRead: boolean;
552
+ createdAt: string;
553
+ } | {
554
+ type: "comment-upvote";
555
+ action: "open-comment";
556
+ metadata: {
557
+ entityId: string;
558
+ entityShortId: string;
559
+ entityTitle: string | null | undefined;
560
+ entityContent: string | null | undefined;
561
+ commentId: string;
562
+ commentContent: string | null | undefined;
563
+ initiatorId: string;
564
+ initiatorName: string | null | undefined;
565
+ initiatorUsername: string | null | undefined;
566
+ initiatorAvatar: string | null | undefined;
567
+ };
568
+ id: string;
569
+ userId: string;
570
+ isRead: boolean;
571
+ createdAt: string;
572
+ } | {
573
+ type: "new-follow";
574
+ action: "open-profile";
575
+ metadata: {
576
+ initiatorId: string;
577
+ initiatorName: string | null | undefined;
578
+ initiatorUsername: string | null | undefined;
579
+ initiatorAvatar: string | null | undefined;
580
+ };
581
+ id: string;
582
+ userId: string;
583
+ isRead: boolean;
584
+ createdAt: string;
585
+ } | {
586
+ type: "connection-request";
587
+ action: "open-profile";
588
+ metadata: {
589
+ connectionId: string;
590
+ initiatorId: string;
591
+ initiatorName: string | null | undefined;
592
+ initiatorUsername: string | null | undefined;
593
+ initiatorAvatar: string | null | undefined;
594
+ };
595
+ id: string;
596
+ userId: string;
597
+ isRead: boolean;
598
+ createdAt: string;
599
+ } | {
600
+ type: "connection-accepted";
601
+ action: "open-profile";
602
+ metadata: {
603
+ connectionId: string;
604
+ initiatorId: string;
605
+ initiatorName: string | null | undefined;
606
+ initiatorUsername: string | null | undefined;
607
+ initiatorAvatar: string | null | undefined;
608
+ };
609
+ id: string;
610
+ userId: string;
611
+ isRead: boolean;
612
+ createdAt: string;
613
+ })[];
614
+ unreadCount: number;
615
+ loading: boolean;
616
+ hasMore: boolean;
617
+ page: number;
618
+ limit: number;
619
+ notificationTemplates?: {
620
+ entityComment?: {
621
+ title?: string | undefined;
622
+ content?: string | undefined;
623
+ } | undefined;
624
+ commentReply?: {
625
+ title?: string | undefined;
626
+ content?: string | undefined;
627
+ } | undefined;
628
+ entityMention?: {
629
+ title?: string | undefined;
630
+ content?: string | undefined;
631
+ } | undefined;
632
+ commentMention?: {
633
+ title?: string | undefined;
634
+ content?: string | undefined;
635
+ } | undefined;
636
+ entityUpvote?: {
637
+ title?: string | undefined;
638
+ content?: string | undefined;
639
+ } | undefined;
640
+ commentUpvote?: {
641
+ title?: string | undefined;
642
+ content?: string | undefined;
643
+ } | undefined;
644
+ newFollow?: {
645
+ title?: string | undefined;
646
+ content?: string | undefined;
647
+ } | undefined;
648
+ connectionRequest?: {
649
+ title?: string | undefined;
650
+ content?: string | undefined;
651
+ } | undefined;
652
+ connectionAccepted?: {
653
+ title?: string | undefined;
654
+ content?: string | undefined;
655
+ } | undefined;
656
+ } | undefined;
657
+ currentProjectId?: string | undefined;
658
+ }, action: PayloadAction<Partial<NotificationTemplates>>) => void;
659
+ resetNotifications: (state: {
660
+ notifications: ({
661
+ type: "system";
662
+ action: string;
663
+ metadata: {
664
+ title?: string | undefined;
665
+ content?: string | undefined;
666
+ buttonData: {
667
+ text: string;
668
+ url: string;
669
+ } | null;
670
+ };
671
+ id: string;
672
+ userId: string;
673
+ isRead: boolean;
674
+ createdAt: string;
675
+ } | {
676
+ type: "entity-comment";
677
+ action: "open-comment";
678
+ metadata: {
679
+ entityId: string;
680
+ entityShortId: string;
681
+ entityTitle: string | null | undefined;
682
+ entityContent: string | null | undefined;
683
+ commentId: string;
684
+ commentContent: string | null | undefined;
685
+ initiatorId: string;
686
+ initiatorName: string | null | undefined;
687
+ initiatorUsername: string | null | undefined;
688
+ initiatorAvatar: string | null | undefined;
689
+ };
690
+ id: string;
691
+ userId: string;
692
+ isRead: boolean;
693
+ createdAt: string;
694
+ } | {
695
+ type: "comment-reply";
696
+ action: "open-comment";
697
+ metadata: {
698
+ entityId: string;
699
+ entityShortId: string;
700
+ entityTitle: string | null | undefined;
701
+ entityContent: string | null | undefined;
702
+ commentId: string;
703
+ commentContent: string | null | undefined;
704
+ replyId: string;
705
+ replyContent: string | null | undefined;
706
+ initiatorId: string;
707
+ initiatorName: string | null | undefined;
708
+ initiatorUsername: string | null | undefined;
709
+ initiatorAvatar: string | null | undefined;
710
+ };
711
+ id: string;
712
+ userId: string;
713
+ isRead: boolean;
714
+ createdAt: string;
715
+ } | {
716
+ type: "entity-mention";
717
+ action: "open-entity";
718
+ metadata: {
719
+ entityId: string;
720
+ entityShortId: string;
721
+ entityTitle: string | null | undefined;
722
+ entityContent: string | null | undefined;
723
+ initiatorId: string;
724
+ initiatorName: string | null | undefined;
725
+ initiatorUsername: string | null | undefined;
726
+ initiatorAvatar: string | null | undefined;
727
+ };
728
+ id: string;
729
+ userId: string;
730
+ isRead: boolean;
731
+ createdAt: string;
732
+ } | {
733
+ type: "comment-mention";
734
+ action: "open-comment";
735
+ metadata: {
736
+ entityId: string;
737
+ entityShortId: string;
738
+ entityTitle: string | null | undefined;
739
+ entityContent: string | null | undefined;
740
+ commentId: string;
741
+ commentContent: string | null | undefined;
742
+ initiatorId: string;
743
+ initiatorName: string | null | undefined;
744
+ initiatorUsername: string | null | undefined;
745
+ initiatorAvatar: string | null | undefined;
746
+ };
747
+ id: string;
748
+ userId: string;
749
+ isRead: boolean;
750
+ createdAt: string;
751
+ } | {
752
+ type: "entity-upvote";
753
+ action: "open-entity";
754
+ metadata: {
755
+ entityId: string;
756
+ entityShortId: string;
757
+ entityTitle: string | null | undefined;
758
+ entityContent: string | null | undefined;
759
+ initiatorId: string;
760
+ initiatorName: string | null | undefined;
761
+ initiatorUsername: string | null | undefined;
762
+ initiatorAvatar: string | null | undefined;
763
+ };
764
+ id: string;
765
+ userId: string;
766
+ isRead: boolean;
767
+ createdAt: string;
768
+ } | {
769
+ type: "comment-upvote";
770
+ action: "open-comment";
771
+ metadata: {
772
+ entityId: string;
773
+ entityShortId: string;
774
+ entityTitle: string | null | undefined;
775
+ entityContent: string | null | undefined;
776
+ commentId: string;
777
+ commentContent: string | null | undefined;
778
+ initiatorId: string;
779
+ initiatorName: string | null | undefined;
780
+ initiatorUsername: string | null | undefined;
781
+ initiatorAvatar: string | null | undefined;
782
+ };
783
+ id: string;
784
+ userId: string;
785
+ isRead: boolean;
786
+ createdAt: string;
787
+ } | {
788
+ type: "new-follow";
789
+ action: "open-profile";
790
+ metadata: {
791
+ initiatorId: string;
792
+ initiatorName: string | null | undefined;
793
+ initiatorUsername: string | null | undefined;
794
+ initiatorAvatar: string | null | undefined;
795
+ };
796
+ id: string;
797
+ userId: string;
798
+ isRead: boolean;
799
+ createdAt: string;
800
+ } | {
801
+ type: "connection-request";
802
+ action: "open-profile";
803
+ metadata: {
804
+ connectionId: string;
805
+ initiatorId: string;
806
+ initiatorName: string | null | undefined;
807
+ initiatorUsername: string | null | undefined;
808
+ initiatorAvatar: string | null | undefined;
809
+ };
810
+ id: string;
811
+ userId: string;
812
+ isRead: boolean;
813
+ createdAt: string;
814
+ } | {
815
+ type: "connection-accepted";
816
+ action: "open-profile";
817
+ metadata: {
818
+ connectionId: string;
819
+ initiatorId: string;
820
+ initiatorName: string | null | undefined;
821
+ initiatorUsername: string | null | undefined;
822
+ initiatorAvatar: string | null | undefined;
823
+ };
824
+ id: string;
825
+ userId: string;
826
+ isRead: boolean;
827
+ createdAt: string;
828
+ })[];
829
+ unreadCount: number;
830
+ loading: boolean;
831
+ hasMore: boolean;
832
+ page: number;
833
+ limit: number;
834
+ notificationTemplates?: {
835
+ entityComment?: {
836
+ title?: string | undefined;
837
+ content?: string | undefined;
838
+ } | undefined;
839
+ commentReply?: {
840
+ title?: string | undefined;
841
+ content?: string | undefined;
842
+ } | undefined;
843
+ entityMention?: {
844
+ title?: string | undefined;
845
+ content?: string | undefined;
846
+ } | undefined;
847
+ commentMention?: {
848
+ title?: string | undefined;
849
+ content?: string | undefined;
850
+ } | undefined;
851
+ entityUpvote?: {
852
+ title?: string | undefined;
853
+ content?: string | undefined;
854
+ } | undefined;
855
+ commentUpvote?: {
856
+ title?: string | undefined;
857
+ content?: string | undefined;
858
+ } | undefined;
859
+ newFollow?: {
860
+ title?: string | undefined;
861
+ content?: string | undefined;
862
+ } | undefined;
863
+ connectionRequest?: {
864
+ title?: string | undefined;
865
+ content?: string | undefined;
866
+ } | undefined;
867
+ connectionAccepted?: {
868
+ title?: string | undefined;
869
+ content?: string | undefined;
870
+ } | undefined;
871
+ } | undefined;
872
+ currentProjectId?: string | undefined;
873
+ }) => void;
874
+ loadMore: (state: {
875
+ notifications: ({
876
+ type: "system";
877
+ action: string;
878
+ metadata: {
879
+ title?: string | undefined;
880
+ content?: string | undefined;
881
+ buttonData: {
882
+ text: string;
883
+ url: string;
884
+ } | null;
885
+ };
886
+ id: string;
887
+ userId: string;
888
+ isRead: boolean;
889
+ createdAt: string;
890
+ } | {
891
+ type: "entity-comment";
892
+ action: "open-comment";
893
+ metadata: {
894
+ entityId: string;
895
+ entityShortId: string;
896
+ entityTitle: string | null | undefined;
897
+ entityContent: string | null | undefined;
898
+ commentId: string;
899
+ commentContent: string | null | undefined;
900
+ initiatorId: string;
901
+ initiatorName: string | null | undefined;
902
+ initiatorUsername: string | null | undefined;
903
+ initiatorAvatar: string | null | undefined;
904
+ };
905
+ id: string;
906
+ userId: string;
907
+ isRead: boolean;
908
+ createdAt: string;
909
+ } | {
910
+ type: "comment-reply";
911
+ action: "open-comment";
912
+ metadata: {
913
+ entityId: string;
914
+ entityShortId: string;
915
+ entityTitle: string | null | undefined;
916
+ entityContent: string | null | undefined;
917
+ commentId: string;
918
+ commentContent: string | null | undefined;
919
+ replyId: string;
920
+ replyContent: string | null | undefined;
921
+ initiatorId: string;
922
+ initiatorName: string | null | undefined;
923
+ initiatorUsername: string | null | undefined;
924
+ initiatorAvatar: string | null | undefined;
925
+ };
926
+ id: string;
927
+ userId: string;
928
+ isRead: boolean;
929
+ createdAt: string;
930
+ } | {
931
+ type: "entity-mention";
932
+ action: "open-entity";
933
+ metadata: {
934
+ entityId: string;
935
+ entityShortId: string;
936
+ entityTitle: string | null | undefined;
937
+ entityContent: string | null | undefined;
938
+ initiatorId: string;
939
+ initiatorName: string | null | undefined;
940
+ initiatorUsername: string | null | undefined;
941
+ initiatorAvatar: string | null | undefined;
942
+ };
943
+ id: string;
944
+ userId: string;
945
+ isRead: boolean;
946
+ createdAt: string;
947
+ } | {
948
+ type: "comment-mention";
949
+ action: "open-comment";
950
+ metadata: {
951
+ entityId: string;
952
+ entityShortId: string;
953
+ entityTitle: string | null | undefined;
954
+ entityContent: string | null | undefined;
955
+ commentId: string;
956
+ commentContent: string | null | undefined;
957
+ initiatorId: string;
958
+ initiatorName: string | null | undefined;
959
+ initiatorUsername: string | null | undefined;
960
+ initiatorAvatar: string | null | undefined;
961
+ };
962
+ id: string;
963
+ userId: string;
964
+ isRead: boolean;
965
+ createdAt: string;
966
+ } | {
967
+ type: "entity-upvote";
968
+ action: "open-entity";
969
+ metadata: {
970
+ entityId: string;
971
+ entityShortId: string;
972
+ entityTitle: string | null | undefined;
973
+ entityContent: string | null | undefined;
974
+ initiatorId: string;
975
+ initiatorName: string | null | undefined;
976
+ initiatorUsername: string | null | undefined;
977
+ initiatorAvatar: string | null | undefined;
978
+ };
979
+ id: string;
980
+ userId: string;
981
+ isRead: boolean;
982
+ createdAt: string;
983
+ } | {
984
+ type: "comment-upvote";
985
+ action: "open-comment";
986
+ metadata: {
987
+ entityId: string;
988
+ entityShortId: string;
989
+ entityTitle: string | null | undefined;
990
+ entityContent: string | null | undefined;
991
+ commentId: string;
992
+ commentContent: string | null | undefined;
993
+ initiatorId: string;
994
+ initiatorName: string | null | undefined;
995
+ initiatorUsername: string | null | undefined;
996
+ initiatorAvatar: string | null | undefined;
997
+ };
998
+ id: string;
999
+ userId: string;
1000
+ isRead: boolean;
1001
+ createdAt: string;
1002
+ } | {
1003
+ type: "new-follow";
1004
+ action: "open-profile";
1005
+ metadata: {
1006
+ initiatorId: string;
1007
+ initiatorName: string | null | undefined;
1008
+ initiatorUsername: string | null | undefined;
1009
+ initiatorAvatar: string | null | undefined;
1010
+ };
1011
+ id: string;
1012
+ userId: string;
1013
+ isRead: boolean;
1014
+ createdAt: string;
1015
+ } | {
1016
+ type: "connection-request";
1017
+ action: "open-profile";
1018
+ metadata: {
1019
+ connectionId: string;
1020
+ initiatorId: string;
1021
+ initiatorName: string | null | undefined;
1022
+ initiatorUsername: string | null | undefined;
1023
+ initiatorAvatar: string | null | undefined;
1024
+ };
1025
+ id: string;
1026
+ userId: string;
1027
+ isRead: boolean;
1028
+ createdAt: string;
1029
+ } | {
1030
+ type: "connection-accepted";
1031
+ action: "open-profile";
1032
+ metadata: {
1033
+ connectionId: string;
1034
+ initiatorId: string;
1035
+ initiatorName: string | null | undefined;
1036
+ initiatorUsername: string | null | undefined;
1037
+ initiatorAvatar: string | null | undefined;
1038
+ };
1039
+ id: string;
1040
+ userId: string;
1041
+ isRead: boolean;
1042
+ createdAt: string;
1043
+ })[];
1044
+ unreadCount: number;
1045
+ loading: boolean;
1046
+ hasMore: boolean;
1047
+ page: number;
1048
+ limit: number;
1049
+ notificationTemplates?: {
1050
+ entityComment?: {
1051
+ title?: string | undefined;
1052
+ content?: string | undefined;
1053
+ } | undefined;
1054
+ commentReply?: {
1055
+ title?: string | undefined;
1056
+ content?: string | undefined;
1057
+ } | undefined;
1058
+ entityMention?: {
1059
+ title?: string | undefined;
1060
+ content?: string | undefined;
1061
+ } | undefined;
1062
+ commentMention?: {
1063
+ title?: string | undefined;
1064
+ content?: string | undefined;
1065
+ } | undefined;
1066
+ entityUpvote?: {
1067
+ title?: string | undefined;
1068
+ content?: string | undefined;
1069
+ } | undefined;
1070
+ commentUpvote?: {
1071
+ title?: string | undefined;
1072
+ content?: string | undefined;
1073
+ } | undefined;
1074
+ newFollow?: {
1075
+ title?: string | undefined;
1076
+ content?: string | undefined;
1077
+ } | undefined;
1078
+ connectionRequest?: {
1079
+ title?: string | undefined;
1080
+ content?: string | undefined;
1081
+ } | undefined;
1082
+ connectionAccepted?: {
1083
+ title?: string | undefined;
1084
+ content?: string | undefined;
1085
+ } | undefined;
1086
+ } | undefined;
1087
+ currentProjectId?: string | undefined;
1088
+ }) => void;
1089
+ setLoading: (state: {
1090
+ notifications: ({
1091
+ type: "system";
1092
+ action: string;
1093
+ metadata: {
1094
+ title?: string | undefined;
1095
+ content?: string | undefined;
1096
+ buttonData: {
1097
+ text: string;
1098
+ url: string;
1099
+ } | null;
1100
+ };
1101
+ id: string;
1102
+ userId: string;
1103
+ isRead: boolean;
1104
+ createdAt: string;
1105
+ } | {
1106
+ type: "entity-comment";
1107
+ action: "open-comment";
1108
+ metadata: {
1109
+ entityId: string;
1110
+ entityShortId: string;
1111
+ entityTitle: string | null | undefined;
1112
+ entityContent: string | null | undefined;
1113
+ commentId: string;
1114
+ commentContent: string | null | undefined;
1115
+ initiatorId: string;
1116
+ initiatorName: string | null | undefined;
1117
+ initiatorUsername: string | null | undefined;
1118
+ initiatorAvatar: string | null | undefined;
1119
+ };
1120
+ id: string;
1121
+ userId: string;
1122
+ isRead: boolean;
1123
+ createdAt: string;
1124
+ } | {
1125
+ type: "comment-reply";
1126
+ action: "open-comment";
1127
+ metadata: {
1128
+ entityId: string;
1129
+ entityShortId: string;
1130
+ entityTitle: string | null | undefined;
1131
+ entityContent: string | null | undefined;
1132
+ commentId: string;
1133
+ commentContent: string | null | undefined;
1134
+ replyId: string;
1135
+ replyContent: string | null | undefined;
1136
+ initiatorId: string;
1137
+ initiatorName: string | null | undefined;
1138
+ initiatorUsername: string | null | undefined;
1139
+ initiatorAvatar: string | null | undefined;
1140
+ };
1141
+ id: string;
1142
+ userId: string;
1143
+ isRead: boolean;
1144
+ createdAt: string;
1145
+ } | {
1146
+ type: "entity-mention";
1147
+ action: "open-entity";
1148
+ metadata: {
1149
+ entityId: string;
1150
+ entityShortId: string;
1151
+ entityTitle: string | null | undefined;
1152
+ entityContent: string | null | undefined;
1153
+ initiatorId: string;
1154
+ initiatorName: string | null | undefined;
1155
+ initiatorUsername: string | null | undefined;
1156
+ initiatorAvatar: string | null | undefined;
1157
+ };
1158
+ id: string;
1159
+ userId: string;
1160
+ isRead: boolean;
1161
+ createdAt: string;
1162
+ } | {
1163
+ type: "comment-mention";
1164
+ action: "open-comment";
1165
+ metadata: {
1166
+ entityId: string;
1167
+ entityShortId: string;
1168
+ entityTitle: string | null | undefined;
1169
+ entityContent: string | null | undefined;
1170
+ commentId: string;
1171
+ commentContent: string | null | undefined;
1172
+ initiatorId: string;
1173
+ initiatorName: string | null | undefined;
1174
+ initiatorUsername: string | null | undefined;
1175
+ initiatorAvatar: string | null | undefined;
1176
+ };
1177
+ id: string;
1178
+ userId: string;
1179
+ isRead: boolean;
1180
+ createdAt: string;
1181
+ } | {
1182
+ type: "entity-upvote";
1183
+ action: "open-entity";
1184
+ metadata: {
1185
+ entityId: string;
1186
+ entityShortId: string;
1187
+ entityTitle: string | null | undefined;
1188
+ entityContent: string | null | undefined;
1189
+ initiatorId: string;
1190
+ initiatorName: string | null | undefined;
1191
+ initiatorUsername: string | null | undefined;
1192
+ initiatorAvatar: string | null | undefined;
1193
+ };
1194
+ id: string;
1195
+ userId: string;
1196
+ isRead: boolean;
1197
+ createdAt: string;
1198
+ } | {
1199
+ type: "comment-upvote";
1200
+ action: "open-comment";
1201
+ metadata: {
1202
+ entityId: string;
1203
+ entityShortId: string;
1204
+ entityTitle: string | null | undefined;
1205
+ entityContent: string | null | undefined;
1206
+ commentId: string;
1207
+ commentContent: string | null | undefined;
1208
+ initiatorId: string;
1209
+ initiatorName: string | null | undefined;
1210
+ initiatorUsername: string | null | undefined;
1211
+ initiatorAvatar: string | null | undefined;
1212
+ };
1213
+ id: string;
1214
+ userId: string;
1215
+ isRead: boolean;
1216
+ createdAt: string;
1217
+ } | {
1218
+ type: "new-follow";
1219
+ action: "open-profile";
1220
+ metadata: {
1221
+ initiatorId: string;
1222
+ initiatorName: string | null | undefined;
1223
+ initiatorUsername: string | null | undefined;
1224
+ initiatorAvatar: string | null | undefined;
1225
+ };
1226
+ id: string;
1227
+ userId: string;
1228
+ isRead: boolean;
1229
+ createdAt: string;
1230
+ } | {
1231
+ type: "connection-request";
1232
+ action: "open-profile";
1233
+ metadata: {
1234
+ connectionId: string;
1235
+ initiatorId: string;
1236
+ initiatorName: string | null | undefined;
1237
+ initiatorUsername: string | null | undefined;
1238
+ initiatorAvatar: string | null | undefined;
1239
+ };
1240
+ id: string;
1241
+ userId: string;
1242
+ isRead: boolean;
1243
+ createdAt: string;
1244
+ } | {
1245
+ type: "connection-accepted";
1246
+ action: "open-profile";
1247
+ metadata: {
1248
+ connectionId: string;
1249
+ initiatorId: string;
1250
+ initiatorName: string | null | undefined;
1251
+ initiatorUsername: string | null | undefined;
1252
+ initiatorAvatar: string | null | undefined;
1253
+ };
1254
+ id: string;
1255
+ userId: string;
1256
+ isRead: boolean;
1257
+ createdAt: string;
1258
+ })[];
1259
+ unreadCount: number;
1260
+ loading: boolean;
1261
+ hasMore: boolean;
1262
+ page: number;
1263
+ limit: number;
1264
+ notificationTemplates?: {
1265
+ entityComment?: {
1266
+ title?: string | undefined;
1267
+ content?: string | undefined;
1268
+ } | undefined;
1269
+ commentReply?: {
1270
+ title?: string | undefined;
1271
+ content?: string | undefined;
1272
+ } | undefined;
1273
+ entityMention?: {
1274
+ title?: string | undefined;
1275
+ content?: string | undefined;
1276
+ } | undefined;
1277
+ commentMention?: {
1278
+ title?: string | undefined;
1279
+ content?: string | undefined;
1280
+ } | undefined;
1281
+ entityUpvote?: {
1282
+ title?: string | undefined;
1283
+ content?: string | undefined;
1284
+ } | undefined;
1285
+ commentUpvote?: {
1286
+ title?: string | undefined;
1287
+ content?: string | undefined;
1288
+ } | undefined;
1289
+ newFollow?: {
1290
+ title?: string | undefined;
1291
+ content?: string | undefined;
1292
+ } | undefined;
1293
+ connectionRequest?: {
1294
+ title?: string | undefined;
1295
+ content?: string | undefined;
1296
+ } | undefined;
1297
+ connectionAccepted?: {
1298
+ title?: string | undefined;
1299
+ content?: string | undefined;
1300
+ } | undefined;
1301
+ } | undefined;
1302
+ currentProjectId?: string | undefined;
1303
+ }, action: PayloadAction<boolean>) => void;
1304
+ addNotifications: (state: {
1305
+ notifications: ({
1306
+ type: "system";
1307
+ action: string;
1308
+ metadata: {
1309
+ title?: string | undefined;
1310
+ content?: string | undefined;
1311
+ buttonData: {
1312
+ text: string;
1313
+ url: string;
1314
+ } | null;
1315
+ };
1316
+ id: string;
1317
+ userId: string;
1318
+ isRead: boolean;
1319
+ createdAt: string;
1320
+ } | {
1321
+ type: "entity-comment";
1322
+ action: "open-comment";
1323
+ metadata: {
1324
+ entityId: string;
1325
+ entityShortId: string;
1326
+ entityTitle: string | null | undefined;
1327
+ entityContent: string | null | undefined;
1328
+ commentId: string;
1329
+ commentContent: string | null | undefined;
1330
+ initiatorId: string;
1331
+ initiatorName: string | null | undefined;
1332
+ initiatorUsername: string | null | undefined;
1333
+ initiatorAvatar: string | null | undefined;
1334
+ };
1335
+ id: string;
1336
+ userId: string;
1337
+ isRead: boolean;
1338
+ createdAt: string;
1339
+ } | {
1340
+ type: "comment-reply";
1341
+ action: "open-comment";
1342
+ metadata: {
1343
+ entityId: string;
1344
+ entityShortId: string;
1345
+ entityTitle: string | null | undefined;
1346
+ entityContent: string | null | undefined;
1347
+ commentId: string;
1348
+ commentContent: string | null | undefined;
1349
+ replyId: string;
1350
+ replyContent: string | null | undefined;
1351
+ initiatorId: string;
1352
+ initiatorName: string | null | undefined;
1353
+ initiatorUsername: string | null | undefined;
1354
+ initiatorAvatar: string | null | undefined;
1355
+ };
1356
+ id: string;
1357
+ userId: string;
1358
+ isRead: boolean;
1359
+ createdAt: string;
1360
+ } | {
1361
+ type: "entity-mention";
1362
+ action: "open-entity";
1363
+ metadata: {
1364
+ entityId: string;
1365
+ entityShortId: string;
1366
+ entityTitle: string | null | undefined;
1367
+ entityContent: string | null | undefined;
1368
+ initiatorId: string;
1369
+ initiatorName: string | null | undefined;
1370
+ initiatorUsername: string | null | undefined;
1371
+ initiatorAvatar: string | null | undefined;
1372
+ };
1373
+ id: string;
1374
+ userId: string;
1375
+ isRead: boolean;
1376
+ createdAt: string;
1377
+ } | {
1378
+ type: "comment-mention";
1379
+ action: "open-comment";
1380
+ metadata: {
1381
+ entityId: string;
1382
+ entityShortId: string;
1383
+ entityTitle: string | null | undefined;
1384
+ entityContent: string | null | undefined;
1385
+ commentId: string;
1386
+ commentContent: string | null | undefined;
1387
+ initiatorId: string;
1388
+ initiatorName: string | null | undefined;
1389
+ initiatorUsername: string | null | undefined;
1390
+ initiatorAvatar: string | null | undefined;
1391
+ };
1392
+ id: string;
1393
+ userId: string;
1394
+ isRead: boolean;
1395
+ createdAt: string;
1396
+ } | {
1397
+ type: "entity-upvote";
1398
+ action: "open-entity";
1399
+ metadata: {
1400
+ entityId: string;
1401
+ entityShortId: string;
1402
+ entityTitle: string | null | undefined;
1403
+ entityContent: string | null | undefined;
1404
+ initiatorId: string;
1405
+ initiatorName: string | null | undefined;
1406
+ initiatorUsername: string | null | undefined;
1407
+ initiatorAvatar: string | null | undefined;
1408
+ };
1409
+ id: string;
1410
+ userId: string;
1411
+ isRead: boolean;
1412
+ createdAt: string;
1413
+ } | {
1414
+ type: "comment-upvote";
1415
+ action: "open-comment";
1416
+ metadata: {
1417
+ entityId: string;
1418
+ entityShortId: string;
1419
+ entityTitle: string | null | undefined;
1420
+ entityContent: string | null | undefined;
1421
+ commentId: string;
1422
+ commentContent: string | null | undefined;
1423
+ initiatorId: string;
1424
+ initiatorName: string | null | undefined;
1425
+ initiatorUsername: string | null | undefined;
1426
+ initiatorAvatar: string | null | undefined;
1427
+ };
1428
+ id: string;
1429
+ userId: string;
1430
+ isRead: boolean;
1431
+ createdAt: string;
1432
+ } | {
1433
+ type: "new-follow";
1434
+ action: "open-profile";
1435
+ metadata: {
1436
+ initiatorId: string;
1437
+ initiatorName: string | null | undefined;
1438
+ initiatorUsername: string | null | undefined;
1439
+ initiatorAvatar: string | null | undefined;
1440
+ };
1441
+ id: string;
1442
+ userId: string;
1443
+ isRead: boolean;
1444
+ createdAt: string;
1445
+ } | {
1446
+ type: "connection-request";
1447
+ action: "open-profile";
1448
+ metadata: {
1449
+ connectionId: string;
1450
+ initiatorId: string;
1451
+ initiatorName: string | null | undefined;
1452
+ initiatorUsername: string | null | undefined;
1453
+ initiatorAvatar: string | null | undefined;
1454
+ };
1455
+ id: string;
1456
+ userId: string;
1457
+ isRead: boolean;
1458
+ createdAt: string;
1459
+ } | {
1460
+ type: "connection-accepted";
1461
+ action: "open-profile";
1462
+ metadata: {
1463
+ connectionId: string;
1464
+ initiatorId: string;
1465
+ initiatorName: string | null | undefined;
1466
+ initiatorUsername: string | null | undefined;
1467
+ initiatorAvatar: string | null | undefined;
1468
+ };
1469
+ id: string;
1470
+ userId: string;
1471
+ isRead: boolean;
1472
+ createdAt: string;
1473
+ })[];
1474
+ unreadCount: number;
1475
+ loading: boolean;
1476
+ hasMore: boolean;
1477
+ page: number;
1478
+ limit: number;
1479
+ notificationTemplates?: {
1480
+ entityComment?: {
1481
+ title?: string | undefined;
1482
+ content?: string | undefined;
1483
+ } | undefined;
1484
+ commentReply?: {
1485
+ title?: string | undefined;
1486
+ content?: string | undefined;
1487
+ } | undefined;
1488
+ entityMention?: {
1489
+ title?: string | undefined;
1490
+ content?: string | undefined;
1491
+ } | undefined;
1492
+ commentMention?: {
1493
+ title?: string | undefined;
1494
+ content?: string | undefined;
1495
+ } | undefined;
1496
+ entityUpvote?: {
1497
+ title?: string | undefined;
1498
+ content?: string | undefined;
1499
+ } | undefined;
1500
+ commentUpvote?: {
1501
+ title?: string | undefined;
1502
+ content?: string | undefined;
1503
+ } | undefined;
1504
+ newFollow?: {
1505
+ title?: string | undefined;
1506
+ content?: string | undefined;
1507
+ } | undefined;
1508
+ connectionRequest?: {
1509
+ title?: string | undefined;
1510
+ content?: string | undefined;
1511
+ } | undefined;
1512
+ connectionAccepted?: {
1513
+ title?: string | undefined;
1514
+ content?: string | undefined;
1515
+ } | undefined;
1516
+ } | undefined;
1517
+ currentProjectId?: string | undefined;
1518
+ }, action: PayloadAction<{
21
1519
  notifications: UnifiedAppNotification[];
22
1520
  isFirstPage?: boolean;
23
1521
  }>) => void;
24
- markAsReadLocally: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>, action: PayloadAction<string>) => void;
25
- markAllAsReadLocally: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>) => void;
26
- setUnreadCount: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>, action: PayloadAction<number>) => void;
27
- handleError: (state: import("@reduxjs/toolkit").WritableDraft<AppNotificationsState>) => void;
1522
+ markAsReadLocally: (state: {
1523
+ notifications: ({
1524
+ type: "system";
1525
+ action: string;
1526
+ metadata: {
1527
+ title?: string | undefined;
1528
+ content?: string | undefined;
1529
+ buttonData: {
1530
+ text: string;
1531
+ url: string;
1532
+ } | null;
1533
+ };
1534
+ id: string;
1535
+ userId: string;
1536
+ isRead: boolean;
1537
+ createdAt: string;
1538
+ } | {
1539
+ type: "entity-comment";
1540
+ action: "open-comment";
1541
+ metadata: {
1542
+ entityId: string;
1543
+ entityShortId: string;
1544
+ entityTitle: string | null | undefined;
1545
+ entityContent: string | null | undefined;
1546
+ commentId: string;
1547
+ commentContent: string | null | undefined;
1548
+ initiatorId: string;
1549
+ initiatorName: string | null | undefined;
1550
+ initiatorUsername: string | null | undefined;
1551
+ initiatorAvatar: string | null | undefined;
1552
+ };
1553
+ id: string;
1554
+ userId: string;
1555
+ isRead: boolean;
1556
+ createdAt: string;
1557
+ } | {
1558
+ type: "comment-reply";
1559
+ action: "open-comment";
1560
+ metadata: {
1561
+ entityId: string;
1562
+ entityShortId: string;
1563
+ entityTitle: string | null | undefined;
1564
+ entityContent: string | null | undefined;
1565
+ commentId: string;
1566
+ commentContent: string | null | undefined;
1567
+ replyId: string;
1568
+ replyContent: string | null | undefined;
1569
+ initiatorId: string;
1570
+ initiatorName: string | null | undefined;
1571
+ initiatorUsername: string | null | undefined;
1572
+ initiatorAvatar: string | null | undefined;
1573
+ };
1574
+ id: string;
1575
+ userId: string;
1576
+ isRead: boolean;
1577
+ createdAt: string;
1578
+ } | {
1579
+ type: "entity-mention";
1580
+ action: "open-entity";
1581
+ metadata: {
1582
+ entityId: string;
1583
+ entityShortId: string;
1584
+ entityTitle: string | null | undefined;
1585
+ entityContent: string | null | undefined;
1586
+ initiatorId: string;
1587
+ initiatorName: string | null | undefined;
1588
+ initiatorUsername: string | null | undefined;
1589
+ initiatorAvatar: string | null | undefined;
1590
+ };
1591
+ id: string;
1592
+ userId: string;
1593
+ isRead: boolean;
1594
+ createdAt: string;
1595
+ } | {
1596
+ type: "comment-mention";
1597
+ action: "open-comment";
1598
+ metadata: {
1599
+ entityId: string;
1600
+ entityShortId: string;
1601
+ entityTitle: string | null | undefined;
1602
+ entityContent: string | null | undefined;
1603
+ commentId: string;
1604
+ commentContent: string | null | undefined;
1605
+ initiatorId: string;
1606
+ initiatorName: string | null | undefined;
1607
+ initiatorUsername: string | null | undefined;
1608
+ initiatorAvatar: string | null | undefined;
1609
+ };
1610
+ id: string;
1611
+ userId: string;
1612
+ isRead: boolean;
1613
+ createdAt: string;
1614
+ } | {
1615
+ type: "entity-upvote";
1616
+ action: "open-entity";
1617
+ metadata: {
1618
+ entityId: string;
1619
+ entityShortId: string;
1620
+ entityTitle: string | null | undefined;
1621
+ entityContent: string | null | undefined;
1622
+ initiatorId: string;
1623
+ initiatorName: string | null | undefined;
1624
+ initiatorUsername: string | null | undefined;
1625
+ initiatorAvatar: string | null | undefined;
1626
+ };
1627
+ id: string;
1628
+ userId: string;
1629
+ isRead: boolean;
1630
+ createdAt: string;
1631
+ } | {
1632
+ type: "comment-upvote";
1633
+ action: "open-comment";
1634
+ metadata: {
1635
+ entityId: string;
1636
+ entityShortId: string;
1637
+ entityTitle: string | null | undefined;
1638
+ entityContent: string | null | undefined;
1639
+ commentId: string;
1640
+ commentContent: string | null | undefined;
1641
+ initiatorId: string;
1642
+ initiatorName: string | null | undefined;
1643
+ initiatorUsername: string | null | undefined;
1644
+ initiatorAvatar: string | null | undefined;
1645
+ };
1646
+ id: string;
1647
+ userId: string;
1648
+ isRead: boolean;
1649
+ createdAt: string;
1650
+ } | {
1651
+ type: "new-follow";
1652
+ action: "open-profile";
1653
+ metadata: {
1654
+ initiatorId: string;
1655
+ initiatorName: string | null | undefined;
1656
+ initiatorUsername: string | null | undefined;
1657
+ initiatorAvatar: string | null | undefined;
1658
+ };
1659
+ id: string;
1660
+ userId: string;
1661
+ isRead: boolean;
1662
+ createdAt: string;
1663
+ } | {
1664
+ type: "connection-request";
1665
+ action: "open-profile";
1666
+ metadata: {
1667
+ connectionId: string;
1668
+ initiatorId: string;
1669
+ initiatorName: string | null | undefined;
1670
+ initiatorUsername: string | null | undefined;
1671
+ initiatorAvatar: string | null | undefined;
1672
+ };
1673
+ id: string;
1674
+ userId: string;
1675
+ isRead: boolean;
1676
+ createdAt: string;
1677
+ } | {
1678
+ type: "connection-accepted";
1679
+ action: "open-profile";
1680
+ metadata: {
1681
+ connectionId: string;
1682
+ initiatorId: string;
1683
+ initiatorName: string | null | undefined;
1684
+ initiatorUsername: string | null | undefined;
1685
+ initiatorAvatar: string | null | undefined;
1686
+ };
1687
+ id: string;
1688
+ userId: string;
1689
+ isRead: boolean;
1690
+ createdAt: string;
1691
+ })[];
1692
+ unreadCount: number;
1693
+ loading: boolean;
1694
+ hasMore: boolean;
1695
+ page: number;
1696
+ limit: number;
1697
+ notificationTemplates?: {
1698
+ entityComment?: {
1699
+ title?: string | undefined;
1700
+ content?: string | undefined;
1701
+ } | undefined;
1702
+ commentReply?: {
1703
+ title?: string | undefined;
1704
+ content?: string | undefined;
1705
+ } | undefined;
1706
+ entityMention?: {
1707
+ title?: string | undefined;
1708
+ content?: string | undefined;
1709
+ } | undefined;
1710
+ commentMention?: {
1711
+ title?: string | undefined;
1712
+ content?: string | undefined;
1713
+ } | undefined;
1714
+ entityUpvote?: {
1715
+ title?: string | undefined;
1716
+ content?: string | undefined;
1717
+ } | undefined;
1718
+ commentUpvote?: {
1719
+ title?: string | undefined;
1720
+ content?: string | undefined;
1721
+ } | undefined;
1722
+ newFollow?: {
1723
+ title?: string | undefined;
1724
+ content?: string | undefined;
1725
+ } | undefined;
1726
+ connectionRequest?: {
1727
+ title?: string | undefined;
1728
+ content?: string | undefined;
1729
+ } | undefined;
1730
+ connectionAccepted?: {
1731
+ title?: string | undefined;
1732
+ content?: string | undefined;
1733
+ } | undefined;
1734
+ } | undefined;
1735
+ currentProjectId?: string | undefined;
1736
+ }, action: PayloadAction<string>) => void;
1737
+ markAllAsReadLocally: (state: {
1738
+ notifications: ({
1739
+ type: "system";
1740
+ action: string;
1741
+ metadata: {
1742
+ title?: string | undefined;
1743
+ content?: string | undefined;
1744
+ buttonData: {
1745
+ text: string;
1746
+ url: string;
1747
+ } | null;
1748
+ };
1749
+ id: string;
1750
+ userId: string;
1751
+ isRead: boolean;
1752
+ createdAt: string;
1753
+ } | {
1754
+ type: "entity-comment";
1755
+ action: "open-comment";
1756
+ metadata: {
1757
+ entityId: string;
1758
+ entityShortId: string;
1759
+ entityTitle: string | null | undefined;
1760
+ entityContent: string | null | undefined;
1761
+ commentId: string;
1762
+ commentContent: string | null | undefined;
1763
+ initiatorId: string;
1764
+ initiatorName: string | null | undefined;
1765
+ initiatorUsername: string | null | undefined;
1766
+ initiatorAvatar: string | null | undefined;
1767
+ };
1768
+ id: string;
1769
+ userId: string;
1770
+ isRead: boolean;
1771
+ createdAt: string;
1772
+ } | {
1773
+ type: "comment-reply";
1774
+ action: "open-comment";
1775
+ metadata: {
1776
+ entityId: string;
1777
+ entityShortId: string;
1778
+ entityTitle: string | null | undefined;
1779
+ entityContent: string | null | undefined;
1780
+ commentId: string;
1781
+ commentContent: string | null | undefined;
1782
+ replyId: string;
1783
+ replyContent: string | null | undefined;
1784
+ initiatorId: string;
1785
+ initiatorName: string | null | undefined;
1786
+ initiatorUsername: string | null | undefined;
1787
+ initiatorAvatar: string | null | undefined;
1788
+ };
1789
+ id: string;
1790
+ userId: string;
1791
+ isRead: boolean;
1792
+ createdAt: string;
1793
+ } | {
1794
+ type: "entity-mention";
1795
+ action: "open-entity";
1796
+ metadata: {
1797
+ entityId: string;
1798
+ entityShortId: string;
1799
+ entityTitle: string | null | undefined;
1800
+ entityContent: string | null | undefined;
1801
+ initiatorId: string;
1802
+ initiatorName: string | null | undefined;
1803
+ initiatorUsername: string | null | undefined;
1804
+ initiatorAvatar: string | null | undefined;
1805
+ };
1806
+ id: string;
1807
+ userId: string;
1808
+ isRead: boolean;
1809
+ createdAt: string;
1810
+ } | {
1811
+ type: "comment-mention";
1812
+ action: "open-comment";
1813
+ metadata: {
1814
+ entityId: string;
1815
+ entityShortId: string;
1816
+ entityTitle: string | null | undefined;
1817
+ entityContent: string | null | undefined;
1818
+ commentId: string;
1819
+ commentContent: string | null | undefined;
1820
+ initiatorId: string;
1821
+ initiatorName: string | null | undefined;
1822
+ initiatorUsername: string | null | undefined;
1823
+ initiatorAvatar: string | null | undefined;
1824
+ };
1825
+ id: string;
1826
+ userId: string;
1827
+ isRead: boolean;
1828
+ createdAt: string;
1829
+ } | {
1830
+ type: "entity-upvote";
1831
+ action: "open-entity";
1832
+ metadata: {
1833
+ entityId: string;
1834
+ entityShortId: string;
1835
+ entityTitle: string | null | undefined;
1836
+ entityContent: string | null | undefined;
1837
+ initiatorId: string;
1838
+ initiatorName: string | null | undefined;
1839
+ initiatorUsername: string | null | undefined;
1840
+ initiatorAvatar: string | null | undefined;
1841
+ };
1842
+ id: string;
1843
+ userId: string;
1844
+ isRead: boolean;
1845
+ createdAt: string;
1846
+ } | {
1847
+ type: "comment-upvote";
1848
+ action: "open-comment";
1849
+ metadata: {
1850
+ entityId: string;
1851
+ entityShortId: string;
1852
+ entityTitle: string | null | undefined;
1853
+ entityContent: string | null | undefined;
1854
+ commentId: string;
1855
+ commentContent: string | null | undefined;
1856
+ initiatorId: string;
1857
+ initiatorName: string | null | undefined;
1858
+ initiatorUsername: string | null | undefined;
1859
+ initiatorAvatar: string | null | undefined;
1860
+ };
1861
+ id: string;
1862
+ userId: string;
1863
+ isRead: boolean;
1864
+ createdAt: string;
1865
+ } | {
1866
+ type: "new-follow";
1867
+ action: "open-profile";
1868
+ metadata: {
1869
+ initiatorId: string;
1870
+ initiatorName: string | null | undefined;
1871
+ initiatorUsername: string | null | undefined;
1872
+ initiatorAvatar: string | null | undefined;
1873
+ };
1874
+ id: string;
1875
+ userId: string;
1876
+ isRead: boolean;
1877
+ createdAt: string;
1878
+ } | {
1879
+ type: "connection-request";
1880
+ action: "open-profile";
1881
+ metadata: {
1882
+ connectionId: string;
1883
+ initiatorId: string;
1884
+ initiatorName: string | null | undefined;
1885
+ initiatorUsername: string | null | undefined;
1886
+ initiatorAvatar: string | null | undefined;
1887
+ };
1888
+ id: string;
1889
+ userId: string;
1890
+ isRead: boolean;
1891
+ createdAt: string;
1892
+ } | {
1893
+ type: "connection-accepted";
1894
+ action: "open-profile";
1895
+ metadata: {
1896
+ connectionId: string;
1897
+ initiatorId: string;
1898
+ initiatorName: string | null | undefined;
1899
+ initiatorUsername: string | null | undefined;
1900
+ initiatorAvatar: string | null | undefined;
1901
+ };
1902
+ id: string;
1903
+ userId: string;
1904
+ isRead: boolean;
1905
+ createdAt: string;
1906
+ })[];
1907
+ unreadCount: number;
1908
+ loading: boolean;
1909
+ hasMore: boolean;
1910
+ page: number;
1911
+ limit: number;
1912
+ notificationTemplates?: {
1913
+ entityComment?: {
1914
+ title?: string | undefined;
1915
+ content?: string | undefined;
1916
+ } | undefined;
1917
+ commentReply?: {
1918
+ title?: string | undefined;
1919
+ content?: string | undefined;
1920
+ } | undefined;
1921
+ entityMention?: {
1922
+ title?: string | undefined;
1923
+ content?: string | undefined;
1924
+ } | undefined;
1925
+ commentMention?: {
1926
+ title?: string | undefined;
1927
+ content?: string | undefined;
1928
+ } | undefined;
1929
+ entityUpvote?: {
1930
+ title?: string | undefined;
1931
+ content?: string | undefined;
1932
+ } | undefined;
1933
+ commentUpvote?: {
1934
+ title?: string | undefined;
1935
+ content?: string | undefined;
1936
+ } | undefined;
1937
+ newFollow?: {
1938
+ title?: string | undefined;
1939
+ content?: string | undefined;
1940
+ } | undefined;
1941
+ connectionRequest?: {
1942
+ title?: string | undefined;
1943
+ content?: string | undefined;
1944
+ } | undefined;
1945
+ connectionAccepted?: {
1946
+ title?: string | undefined;
1947
+ content?: string | undefined;
1948
+ } | undefined;
1949
+ } | undefined;
1950
+ currentProjectId?: string | undefined;
1951
+ }) => void;
1952
+ setUnreadCount: (state: {
1953
+ notifications: ({
1954
+ type: "system";
1955
+ action: string;
1956
+ metadata: {
1957
+ title?: string | undefined;
1958
+ content?: string | undefined;
1959
+ buttonData: {
1960
+ text: string;
1961
+ url: string;
1962
+ } | null;
1963
+ };
1964
+ id: string;
1965
+ userId: string;
1966
+ isRead: boolean;
1967
+ createdAt: string;
1968
+ } | {
1969
+ type: "entity-comment";
1970
+ action: "open-comment";
1971
+ metadata: {
1972
+ entityId: string;
1973
+ entityShortId: string;
1974
+ entityTitle: string | null | undefined;
1975
+ entityContent: string | null | undefined;
1976
+ commentId: string;
1977
+ commentContent: string | null | undefined;
1978
+ initiatorId: string;
1979
+ initiatorName: string | null | undefined;
1980
+ initiatorUsername: string | null | undefined;
1981
+ initiatorAvatar: string | null | undefined;
1982
+ };
1983
+ id: string;
1984
+ userId: string;
1985
+ isRead: boolean;
1986
+ createdAt: string;
1987
+ } | {
1988
+ type: "comment-reply";
1989
+ action: "open-comment";
1990
+ metadata: {
1991
+ entityId: string;
1992
+ entityShortId: string;
1993
+ entityTitle: string | null | undefined;
1994
+ entityContent: string | null | undefined;
1995
+ commentId: string;
1996
+ commentContent: string | null | undefined;
1997
+ replyId: string;
1998
+ replyContent: string | null | undefined;
1999
+ initiatorId: string;
2000
+ initiatorName: string | null | undefined;
2001
+ initiatorUsername: string | null | undefined;
2002
+ initiatorAvatar: string | null | undefined;
2003
+ };
2004
+ id: string;
2005
+ userId: string;
2006
+ isRead: boolean;
2007
+ createdAt: string;
2008
+ } | {
2009
+ type: "entity-mention";
2010
+ action: "open-entity";
2011
+ metadata: {
2012
+ entityId: string;
2013
+ entityShortId: string;
2014
+ entityTitle: string | null | undefined;
2015
+ entityContent: string | null | undefined;
2016
+ initiatorId: string;
2017
+ initiatorName: string | null | undefined;
2018
+ initiatorUsername: string | null | undefined;
2019
+ initiatorAvatar: string | null | undefined;
2020
+ };
2021
+ id: string;
2022
+ userId: string;
2023
+ isRead: boolean;
2024
+ createdAt: string;
2025
+ } | {
2026
+ type: "comment-mention";
2027
+ action: "open-comment";
2028
+ metadata: {
2029
+ entityId: string;
2030
+ entityShortId: string;
2031
+ entityTitle: string | null | undefined;
2032
+ entityContent: string | null | undefined;
2033
+ commentId: string;
2034
+ commentContent: string | null | undefined;
2035
+ initiatorId: string;
2036
+ initiatorName: string | null | undefined;
2037
+ initiatorUsername: string | null | undefined;
2038
+ initiatorAvatar: string | null | undefined;
2039
+ };
2040
+ id: string;
2041
+ userId: string;
2042
+ isRead: boolean;
2043
+ createdAt: string;
2044
+ } | {
2045
+ type: "entity-upvote";
2046
+ action: "open-entity";
2047
+ metadata: {
2048
+ entityId: string;
2049
+ entityShortId: string;
2050
+ entityTitle: string | null | undefined;
2051
+ entityContent: string | null | undefined;
2052
+ initiatorId: string;
2053
+ initiatorName: string | null | undefined;
2054
+ initiatorUsername: string | null | undefined;
2055
+ initiatorAvatar: string | null | undefined;
2056
+ };
2057
+ id: string;
2058
+ userId: string;
2059
+ isRead: boolean;
2060
+ createdAt: string;
2061
+ } | {
2062
+ type: "comment-upvote";
2063
+ action: "open-comment";
2064
+ metadata: {
2065
+ entityId: string;
2066
+ entityShortId: string;
2067
+ entityTitle: string | null | undefined;
2068
+ entityContent: string | null | undefined;
2069
+ commentId: string;
2070
+ commentContent: string | null | undefined;
2071
+ initiatorId: string;
2072
+ initiatorName: string | null | undefined;
2073
+ initiatorUsername: string | null | undefined;
2074
+ initiatorAvatar: string | null | undefined;
2075
+ };
2076
+ id: string;
2077
+ userId: string;
2078
+ isRead: boolean;
2079
+ createdAt: string;
2080
+ } | {
2081
+ type: "new-follow";
2082
+ action: "open-profile";
2083
+ metadata: {
2084
+ initiatorId: string;
2085
+ initiatorName: string | null | undefined;
2086
+ initiatorUsername: string | null | undefined;
2087
+ initiatorAvatar: string | null | undefined;
2088
+ };
2089
+ id: string;
2090
+ userId: string;
2091
+ isRead: boolean;
2092
+ createdAt: string;
2093
+ } | {
2094
+ type: "connection-request";
2095
+ action: "open-profile";
2096
+ metadata: {
2097
+ connectionId: string;
2098
+ initiatorId: string;
2099
+ initiatorName: string | null | undefined;
2100
+ initiatorUsername: string | null | undefined;
2101
+ initiatorAvatar: string | null | undefined;
2102
+ };
2103
+ id: string;
2104
+ userId: string;
2105
+ isRead: boolean;
2106
+ createdAt: string;
2107
+ } | {
2108
+ type: "connection-accepted";
2109
+ action: "open-profile";
2110
+ metadata: {
2111
+ connectionId: string;
2112
+ initiatorId: string;
2113
+ initiatorName: string | null | undefined;
2114
+ initiatorUsername: string | null | undefined;
2115
+ initiatorAvatar: string | null | undefined;
2116
+ };
2117
+ id: string;
2118
+ userId: string;
2119
+ isRead: boolean;
2120
+ createdAt: string;
2121
+ })[];
2122
+ unreadCount: number;
2123
+ loading: boolean;
2124
+ hasMore: boolean;
2125
+ page: number;
2126
+ limit: number;
2127
+ notificationTemplates?: {
2128
+ entityComment?: {
2129
+ title?: string | undefined;
2130
+ content?: string | undefined;
2131
+ } | undefined;
2132
+ commentReply?: {
2133
+ title?: string | undefined;
2134
+ content?: string | undefined;
2135
+ } | undefined;
2136
+ entityMention?: {
2137
+ title?: string | undefined;
2138
+ content?: string | undefined;
2139
+ } | undefined;
2140
+ commentMention?: {
2141
+ title?: string | undefined;
2142
+ content?: string | undefined;
2143
+ } | undefined;
2144
+ entityUpvote?: {
2145
+ title?: string | undefined;
2146
+ content?: string | undefined;
2147
+ } | undefined;
2148
+ commentUpvote?: {
2149
+ title?: string | undefined;
2150
+ content?: string | undefined;
2151
+ } | undefined;
2152
+ newFollow?: {
2153
+ title?: string | undefined;
2154
+ content?: string | undefined;
2155
+ } | undefined;
2156
+ connectionRequest?: {
2157
+ title?: string | undefined;
2158
+ content?: string | undefined;
2159
+ } | undefined;
2160
+ connectionAccepted?: {
2161
+ title?: string | undefined;
2162
+ content?: string | undefined;
2163
+ } | undefined;
2164
+ } | undefined;
2165
+ currentProjectId?: string | undefined;
2166
+ }, action: PayloadAction<number>) => void;
2167
+ handleError: (state: {
2168
+ notifications: ({
2169
+ type: "system";
2170
+ action: string;
2171
+ metadata: {
2172
+ title?: string | undefined;
2173
+ content?: string | undefined;
2174
+ buttonData: {
2175
+ text: string;
2176
+ url: string;
2177
+ } | null;
2178
+ };
2179
+ id: string;
2180
+ userId: string;
2181
+ isRead: boolean;
2182
+ createdAt: string;
2183
+ } | {
2184
+ type: "entity-comment";
2185
+ action: "open-comment";
2186
+ metadata: {
2187
+ entityId: string;
2188
+ entityShortId: string;
2189
+ entityTitle: string | null | undefined;
2190
+ entityContent: string | null | undefined;
2191
+ commentId: string;
2192
+ commentContent: string | null | undefined;
2193
+ initiatorId: string;
2194
+ initiatorName: string | null | undefined;
2195
+ initiatorUsername: string | null | undefined;
2196
+ initiatorAvatar: string | null | undefined;
2197
+ };
2198
+ id: string;
2199
+ userId: string;
2200
+ isRead: boolean;
2201
+ createdAt: string;
2202
+ } | {
2203
+ type: "comment-reply";
2204
+ action: "open-comment";
2205
+ metadata: {
2206
+ entityId: string;
2207
+ entityShortId: string;
2208
+ entityTitle: string | null | undefined;
2209
+ entityContent: string | null | undefined;
2210
+ commentId: string;
2211
+ commentContent: string | null | undefined;
2212
+ replyId: string;
2213
+ replyContent: string | null | undefined;
2214
+ initiatorId: string;
2215
+ initiatorName: string | null | undefined;
2216
+ initiatorUsername: string | null | undefined;
2217
+ initiatorAvatar: string | null | undefined;
2218
+ };
2219
+ id: string;
2220
+ userId: string;
2221
+ isRead: boolean;
2222
+ createdAt: string;
2223
+ } | {
2224
+ type: "entity-mention";
2225
+ action: "open-entity";
2226
+ metadata: {
2227
+ entityId: string;
2228
+ entityShortId: string;
2229
+ entityTitle: string | null | undefined;
2230
+ entityContent: string | null | undefined;
2231
+ initiatorId: string;
2232
+ initiatorName: string | null | undefined;
2233
+ initiatorUsername: string | null | undefined;
2234
+ initiatorAvatar: string | null | undefined;
2235
+ };
2236
+ id: string;
2237
+ userId: string;
2238
+ isRead: boolean;
2239
+ createdAt: string;
2240
+ } | {
2241
+ type: "comment-mention";
2242
+ action: "open-comment";
2243
+ metadata: {
2244
+ entityId: string;
2245
+ entityShortId: string;
2246
+ entityTitle: string | null | undefined;
2247
+ entityContent: string | null | undefined;
2248
+ commentId: string;
2249
+ commentContent: string | null | undefined;
2250
+ initiatorId: string;
2251
+ initiatorName: string | null | undefined;
2252
+ initiatorUsername: string | null | undefined;
2253
+ initiatorAvatar: string | null | undefined;
2254
+ };
2255
+ id: string;
2256
+ userId: string;
2257
+ isRead: boolean;
2258
+ createdAt: string;
2259
+ } | {
2260
+ type: "entity-upvote";
2261
+ action: "open-entity";
2262
+ metadata: {
2263
+ entityId: string;
2264
+ entityShortId: string;
2265
+ entityTitle: string | null | undefined;
2266
+ entityContent: string | null | undefined;
2267
+ initiatorId: string;
2268
+ initiatorName: string | null | undefined;
2269
+ initiatorUsername: string | null | undefined;
2270
+ initiatorAvatar: string | null | undefined;
2271
+ };
2272
+ id: string;
2273
+ userId: string;
2274
+ isRead: boolean;
2275
+ createdAt: string;
2276
+ } | {
2277
+ type: "comment-upvote";
2278
+ action: "open-comment";
2279
+ metadata: {
2280
+ entityId: string;
2281
+ entityShortId: string;
2282
+ entityTitle: string | null | undefined;
2283
+ entityContent: string | null | undefined;
2284
+ commentId: string;
2285
+ commentContent: string | null | undefined;
2286
+ initiatorId: string;
2287
+ initiatorName: string | null | undefined;
2288
+ initiatorUsername: string | null | undefined;
2289
+ initiatorAvatar: string | null | undefined;
2290
+ };
2291
+ id: string;
2292
+ userId: string;
2293
+ isRead: boolean;
2294
+ createdAt: string;
2295
+ } | {
2296
+ type: "new-follow";
2297
+ action: "open-profile";
2298
+ metadata: {
2299
+ initiatorId: string;
2300
+ initiatorName: string | null | undefined;
2301
+ initiatorUsername: string | null | undefined;
2302
+ initiatorAvatar: string | null | undefined;
2303
+ };
2304
+ id: string;
2305
+ userId: string;
2306
+ isRead: boolean;
2307
+ createdAt: string;
2308
+ } | {
2309
+ type: "connection-request";
2310
+ action: "open-profile";
2311
+ metadata: {
2312
+ connectionId: string;
2313
+ initiatorId: string;
2314
+ initiatorName: string | null | undefined;
2315
+ initiatorUsername: string | null | undefined;
2316
+ initiatorAvatar: string | null | undefined;
2317
+ };
2318
+ id: string;
2319
+ userId: string;
2320
+ isRead: boolean;
2321
+ createdAt: string;
2322
+ } | {
2323
+ type: "connection-accepted";
2324
+ action: "open-profile";
2325
+ metadata: {
2326
+ connectionId: string;
2327
+ initiatorId: string;
2328
+ initiatorName: string | null | undefined;
2329
+ initiatorUsername: string | null | undefined;
2330
+ initiatorAvatar: string | null | undefined;
2331
+ };
2332
+ id: string;
2333
+ userId: string;
2334
+ isRead: boolean;
2335
+ createdAt: string;
2336
+ })[];
2337
+ unreadCount: number;
2338
+ loading: boolean;
2339
+ hasMore: boolean;
2340
+ page: number;
2341
+ limit: number;
2342
+ notificationTemplates?: {
2343
+ entityComment?: {
2344
+ title?: string | undefined;
2345
+ content?: string | undefined;
2346
+ } | undefined;
2347
+ commentReply?: {
2348
+ title?: string | undefined;
2349
+ content?: string | undefined;
2350
+ } | undefined;
2351
+ entityMention?: {
2352
+ title?: string | undefined;
2353
+ content?: string | undefined;
2354
+ } | undefined;
2355
+ commentMention?: {
2356
+ title?: string | undefined;
2357
+ content?: string | undefined;
2358
+ } | undefined;
2359
+ entityUpvote?: {
2360
+ title?: string | undefined;
2361
+ content?: string | undefined;
2362
+ } | undefined;
2363
+ commentUpvote?: {
2364
+ title?: string | undefined;
2365
+ content?: string | undefined;
2366
+ } | undefined;
2367
+ newFollow?: {
2368
+ title?: string | undefined;
2369
+ content?: string | undefined;
2370
+ } | undefined;
2371
+ connectionRequest?: {
2372
+ title?: string | undefined;
2373
+ content?: string | undefined;
2374
+ } | undefined;
2375
+ connectionAccepted?: {
2376
+ title?: string | undefined;
2377
+ content?: string | undefined;
2378
+ } | undefined;
2379
+ } | undefined;
2380
+ currentProjectId?: string | undefined;
2381
+ }) => void;
28
2382
  }, "appNotifications", "appNotifications", import("@reduxjs/toolkit").SliceSelectors<AppNotificationsState>>;
29
2383
  export declare const setProjectContext: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "appNotifications/setProjectContext">, setLimit: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "appNotifications/setLimit">, setNotificationTemplates: import("@reduxjs/toolkit").ActionCreatorWithPayload<Partial<NotificationTemplates>, "appNotifications/setNotificationTemplates">, resetNotifications: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"appNotifications/resetNotifications">, loadMore: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"appNotifications/loadMore">, setLoading: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "appNotifications/setLoading">, addNotifications: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
30
2384
  notifications: UnifiedAppNotification[];