@replyke/core 5.1.5-beta.9 → 5.1.5

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 (317) hide show
  1. package/dist/cjs/config/useAxiosPrivate.js +5 -2
  2. package/dist/cjs/config/useAxiosPrivate.js.map +1 -1
  3. package/dist/cjs/context/app-notifications-context.js.map +1 -0
  4. package/dist/cjs/{legacy/context → context}/auth-context.js +1 -1
  5. package/dist/cjs/context/auth-context.js.map +1 -0
  6. package/dist/cjs/context/index.d.ts +2 -1
  7. package/dist/cjs/context/index.js +5 -3
  8. package/dist/cjs/context/index.js.map +1 -1
  9. package/dist/cjs/context/replyke-context.js +2 -2
  10. package/dist/cjs/context/replyke-context.js.map +1 -1
  11. package/dist/cjs/helpers/addNotificationsMessages.js +9 -7
  12. package/dist/cjs/helpers/addNotificationsMessages.js.map +1 -1
  13. package/dist/cjs/hooks/app-notifications/index.js.map +1 -0
  14. package/dist/cjs/hooks/app-notifications/useAppNotifications.js.map +1 -0
  15. package/dist/cjs/{legacy/hooks → hooks}/app-notifications/useAppNotificationsData.d.ts +1 -1
  16. package/dist/cjs/{legacy/hooks → hooks}/app-notifications/useAppNotificationsData.js +2 -2
  17. package/dist/cjs/hooks/app-notifications/useAppNotificationsData.js.map +1 -0
  18. package/dist/cjs/{legacy/hooks → hooks}/app-notifications/useCountUnreadNotifications.js +4 -4
  19. package/dist/cjs/hooks/app-notifications/useCountUnreadNotifications.js.map +1 -0
  20. package/dist/cjs/{legacy/hooks → hooks}/app-notifications/useFetchAppNotifications.d.ts +1 -1
  21. package/dist/cjs/{legacy/hooks → hooks}/app-notifications/useFetchAppNotifications.js +4 -4
  22. package/dist/cjs/hooks/app-notifications/useFetchAppNotifications.js.map +1 -0
  23. package/dist/cjs/{legacy/hooks → hooks}/app-notifications/useMarkNotificationAsRead.js +4 -4
  24. package/dist/cjs/hooks/app-notifications/useMarkNotificationAsRead.js.map +1 -0
  25. package/dist/cjs/hooks/auth/index.js.map +1 -0
  26. package/dist/cjs/hooks/auth/useAuth.js.map +1 -0
  27. package/dist/{esm/legacy → cjs}/hooks/auth/useAuthData.d.ts +1 -1
  28. package/dist/cjs/{legacy/hooks → hooks}/auth/useAuthData.js +2 -2
  29. package/dist/cjs/hooks/auth/useAuthData.js.map +1 -0
  30. package/dist/cjs/{legacy/hooks → hooks}/auth/useChangePassword.js +3 -3
  31. package/dist/cjs/hooks/auth/useChangePassword.js.map +1 -0
  32. package/dist/cjs/{legacy/hooks → hooks}/auth/useRequestNewAccessToken.js +3 -3
  33. package/dist/cjs/hooks/auth/useRequestNewAccessToken.js.map +1 -0
  34. package/dist/cjs/{legacy/hooks → hooks}/auth/useSignInWithEmailAndPassword.js +3 -3
  35. package/dist/cjs/hooks/auth/useSignInWithEmailAndPassword.js.map +1 -0
  36. package/dist/cjs/{legacy/hooks → hooks}/auth/useSignOut.js +3 -3
  37. package/dist/cjs/hooks/auth/useSignOut.js.map +1 -0
  38. package/dist/cjs/{legacy/hooks → hooks}/auth/useSignUpWithEmailAndPassword.js +3 -3
  39. package/dist/cjs/hooks/auth/useSignUpWithEmailAndPassword.js.map +1 -0
  40. package/dist/cjs/{legacy/hooks → hooks}/auth/useVerifyExternalUser.js +2 -2
  41. package/dist/cjs/hooks/auth/useVerifyExternalUser.js.map +1 -0
  42. package/dist/cjs/hooks/comments/useCommentSectionData.js +2 -2
  43. package/dist/cjs/hooks/comments/useCommentSectionData.js.map +1 -1
  44. package/dist/cjs/hooks/comments/useCommentVotes.js +2 -2
  45. package/dist/cjs/hooks/comments/useCommentVotes.js.map +1 -1
  46. package/dist/cjs/hooks/comments/useCreateComment.js +2 -2
  47. package/dist/cjs/hooks/comments/useCreateComment.js.map +1 -1
  48. package/dist/cjs/hooks/entities/useEntityData.js +2 -2
  49. package/dist/cjs/hooks/entities/useEntityData.js.map +1 -1
  50. package/dist/cjs/hooks/entities/useEntityVotes.js +2 -2
  51. package/dist/cjs/hooks/entities/useEntityVotes.js.map +1 -1
  52. package/dist/cjs/hooks/lists/useIsEntitySaved.js +2 -2
  53. package/dist/cjs/hooks/lists/useIsEntitySaved.js.map +1 -1
  54. package/dist/cjs/hooks/lists/useListsData.js +2 -2
  55. package/dist/cjs/hooks/lists/useListsData.js.map +1 -1
  56. package/dist/cjs/hooks/reports/useCreateReport.js +2 -2
  57. package/dist/cjs/hooks/reports/useCreateReport.js.map +1 -1
  58. package/dist/cjs/hooks/users/follows/useFetchFollow.js +2 -2
  59. package/dist/cjs/hooks/users/follows/useFetchFollow.js.map +1 -1
  60. package/dist/cjs/hooks/users/follows/useUnfollowUser.js +2 -2
  61. package/dist/cjs/hooks/users/follows/useUnfollowUser.js.map +1 -1
  62. package/dist/cjs/index.d.ts +4 -6
  63. package/dist/cjs/index.js +22 -12
  64. package/dist/cjs/index.js.map +1 -1
  65. package/dist/cjs/interfaces/models/AppNotification.d.ts +1 -1
  66. package/dist/esm/config/useAxiosPrivate.js +2 -2
  67. package/dist/esm/config/useAxiosPrivate.js.map +1 -1
  68. package/dist/esm/context/app-notifications-context.js.map +1 -0
  69. package/dist/esm/{legacy/context → context}/auth-context.js +1 -1
  70. package/dist/esm/context/auth-context.js.map +1 -0
  71. package/dist/esm/context/index.d.ts +2 -1
  72. package/dist/esm/context/index.js +2 -1
  73. package/dist/esm/context/index.js.map +1 -1
  74. package/dist/esm/context/replyke-context.js +2 -2
  75. package/dist/esm/context/replyke-context.js.map +1 -1
  76. package/dist/esm/helpers/addNotificationsMessages.js +9 -7
  77. package/dist/esm/helpers/addNotificationsMessages.js.map +1 -1
  78. package/dist/esm/hooks/app-notifications/index.js.map +1 -0
  79. package/dist/esm/hooks/app-notifications/useAppNotifications.js.map +1 -0
  80. package/dist/esm/{legacy/hooks → hooks}/app-notifications/useAppNotificationsData.d.ts +1 -1
  81. package/dist/esm/{legacy/hooks → hooks}/app-notifications/useAppNotificationsData.js +2 -2
  82. package/dist/esm/hooks/app-notifications/useAppNotificationsData.js.map +1 -0
  83. package/dist/esm/{legacy/hooks → hooks}/app-notifications/useCountUnreadNotifications.js +4 -4
  84. package/dist/esm/hooks/app-notifications/useCountUnreadNotifications.js.map +1 -0
  85. package/dist/esm/{legacy/hooks → hooks}/app-notifications/useFetchAppNotifications.d.ts +1 -1
  86. package/dist/esm/{legacy/hooks → hooks}/app-notifications/useFetchAppNotifications.js +4 -4
  87. package/dist/esm/hooks/app-notifications/useFetchAppNotifications.js.map +1 -0
  88. package/dist/esm/{legacy/hooks → hooks}/app-notifications/useMarkNotificationAsRead.js +4 -4
  89. package/dist/esm/hooks/app-notifications/useMarkNotificationAsRead.js.map +1 -0
  90. package/dist/esm/hooks/auth/index.js.map +1 -0
  91. package/dist/esm/hooks/auth/useAuth.js.map +1 -0
  92. package/dist/{cjs/legacy → esm}/hooks/auth/useAuthData.d.ts +1 -1
  93. package/dist/esm/{legacy/hooks → hooks}/auth/useAuthData.js +2 -2
  94. package/dist/esm/hooks/auth/useAuthData.js.map +1 -0
  95. package/dist/esm/{legacy/hooks → hooks}/auth/useChangePassword.js +3 -3
  96. package/dist/esm/hooks/auth/useChangePassword.js.map +1 -0
  97. package/dist/esm/{legacy/hooks → hooks}/auth/useRequestNewAccessToken.js +3 -3
  98. package/dist/esm/hooks/auth/useRequestNewAccessToken.js.map +1 -0
  99. package/dist/esm/{legacy/hooks → hooks}/auth/useSignInWithEmailAndPassword.js +3 -3
  100. package/dist/esm/hooks/auth/useSignInWithEmailAndPassword.js.map +1 -0
  101. package/dist/esm/{legacy/hooks → hooks}/auth/useSignOut.js +3 -3
  102. package/dist/esm/hooks/auth/useSignOut.js.map +1 -0
  103. package/dist/esm/{legacy/hooks → hooks}/auth/useSignUpWithEmailAndPassword.js +3 -3
  104. package/dist/esm/hooks/auth/useSignUpWithEmailAndPassword.js.map +1 -0
  105. package/dist/esm/{legacy/hooks → hooks}/auth/useVerifyExternalUser.js +2 -2
  106. package/dist/esm/hooks/auth/useVerifyExternalUser.js.map +1 -0
  107. package/dist/esm/hooks/comments/useCommentSectionData.js +2 -2
  108. package/dist/esm/hooks/comments/useCommentSectionData.js.map +1 -1
  109. package/dist/esm/hooks/comments/useCommentVotes.js +2 -2
  110. package/dist/esm/hooks/comments/useCommentVotes.js.map +1 -1
  111. package/dist/esm/hooks/comments/useCreateComment.js +2 -2
  112. package/dist/esm/hooks/comments/useCreateComment.js.map +1 -1
  113. package/dist/esm/hooks/entities/useEntityData.js +2 -2
  114. package/dist/esm/hooks/entities/useEntityData.js.map +1 -1
  115. package/dist/esm/hooks/entities/useEntityVotes.js +2 -2
  116. package/dist/esm/hooks/entities/useEntityVotes.js.map +1 -1
  117. package/dist/esm/hooks/lists/useIsEntitySaved.js +2 -2
  118. package/dist/esm/hooks/lists/useIsEntitySaved.js.map +1 -1
  119. package/dist/esm/hooks/lists/useListsData.js +2 -2
  120. package/dist/esm/hooks/lists/useListsData.js.map +1 -1
  121. package/dist/esm/hooks/reports/useCreateReport.js +2 -2
  122. package/dist/esm/hooks/reports/useCreateReport.js.map +1 -1
  123. package/dist/esm/hooks/users/follows/useFetchFollow.js +2 -2
  124. package/dist/esm/hooks/users/follows/useFetchFollow.js.map +1 -1
  125. package/dist/esm/hooks/users/follows/useUnfollowUser.js +2 -2
  126. package/dist/esm/hooks/users/follows/useUnfollowUser.js.map +1 -1
  127. package/dist/esm/index.d.ts +4 -6
  128. package/dist/esm/index.js +7 -9
  129. package/dist/esm/index.js.map +1 -1
  130. package/dist/esm/interfaces/models/AppNotification.d.ts +1 -1
  131. package/package.json +2 -4
  132. package/dist/cjs/context/replyke-store-context.d.ts +0 -13
  133. package/dist/cjs/context/replyke-store-context.js +0 -37
  134. package/dist/cjs/context/replyke-store-context.js.map +0 -1
  135. package/dist/cjs/hooks/app-notifications-redux/index.d.ts +0 -4
  136. package/dist/cjs/hooks/app-notifications-redux/index.js +0 -14
  137. package/dist/cjs/hooks/app-notifications-redux/index.js.map +0 -1
  138. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsActionsRedux.d.ts +0 -13
  139. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsActionsRedux.js +0 -266
  140. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsActionsRedux.js.map +0 -1
  141. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsDataRedux.d.ts +0 -21
  142. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsDataRedux.js +0 -108
  143. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsDataRedux.js.map +0 -1
  144. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsRedux.d.ts +0 -7
  145. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsRedux.js +0 -38
  146. package/dist/cjs/hooks/app-notifications-redux/useAppNotificationsRedux.js.map +0 -1
  147. package/dist/cjs/hooks/auth-redux/index.d.ts +0 -2
  148. package/dist/cjs/hooks/auth-redux/index.js +0 -11
  149. package/dist/cjs/hooks/auth-redux/index.js.map +0 -1
  150. package/dist/cjs/hooks/auth-redux/useAuthRedux.d.ts +0 -32
  151. package/dist/cjs/hooks/auth-redux/useAuthRedux.js +0 -180
  152. package/dist/cjs/hooks/auth-redux/useAuthRedux.js.map +0 -1
  153. package/dist/cjs/hooks/auth-redux/useUserRedux.d.ts +0 -6
  154. package/dist/cjs/hooks/auth-redux/useUserRedux.js +0 -20
  155. package/dist/cjs/hooks/auth-redux/useUserRedux.js.map +0 -1
  156. package/dist/cjs/legacy/context/app-notifications-context.js.map +0 -1
  157. package/dist/cjs/legacy/context/auth-context.js.map +0 -1
  158. package/dist/cjs/legacy/hooks/app-notifications/index.js.map +0 -1
  159. package/dist/cjs/legacy/hooks/app-notifications/useAppNotifications.js.map +0 -1
  160. package/dist/cjs/legacy/hooks/app-notifications/useAppNotificationsData.js.map +0 -1
  161. package/dist/cjs/legacy/hooks/app-notifications/useCountUnreadNotifications.js.map +0 -1
  162. package/dist/cjs/legacy/hooks/app-notifications/useFetchAppNotifications.js.map +0 -1
  163. package/dist/cjs/legacy/hooks/app-notifications/useMarkNotificationAsRead.js.map +0 -1
  164. package/dist/cjs/legacy/hooks/auth/index.js.map +0 -1
  165. package/dist/cjs/legacy/hooks/auth/useAuth.js.map +0 -1
  166. package/dist/cjs/legacy/hooks/auth/useAuthData.js.map +0 -1
  167. package/dist/cjs/legacy/hooks/auth/useChangePassword.js.map +0 -1
  168. package/dist/cjs/legacy/hooks/auth/useRequestNewAccessToken.js.map +0 -1
  169. package/dist/cjs/legacy/hooks/auth/useSignInWithEmailAndPassword.js.map +0 -1
  170. package/dist/cjs/legacy/hooks/auth/useSignOut.js.map +0 -1
  171. package/dist/cjs/legacy/hooks/auth/useSignUpWithEmailAndPassword.js.map +0 -1
  172. package/dist/cjs/legacy/hooks/auth/useVerifyExternalUser.js.map +0 -1
  173. package/dist/cjs/store/api/appNotificationsApi.d.ts +0 -2021
  174. package/dist/cjs/store/api/appNotificationsApi.js +0 -213
  175. package/dist/cjs/store/api/appNotificationsApi.js.map +0 -1
  176. package/dist/cjs/store/api/baseApi.d.ts +0 -1
  177. package/dist/cjs/store/api/baseApi.js +0 -42
  178. package/dist/cjs/store/api/baseApi.js.map +0 -1
  179. package/dist/cjs/store/api/index.d.ts +0 -2
  180. package/dist/cjs/store/api/index.js +0 -27
  181. package/dist/cjs/store/api/index.js.map +0 -1
  182. package/dist/cjs/store/index.d.ts +0 -15
  183. package/dist/cjs/store/index.js +0 -72
  184. package/dist/cjs/store/index.js.map +0 -1
  185. package/dist/cjs/store/middleware.d.ts +0 -4
  186. package/dist/cjs/store/middleware.js +0 -42
  187. package/dist/cjs/store/middleware.js.map +0 -1
  188. package/dist/cjs/store/rootReducer.d.ts +0 -10
  189. package/dist/cjs/store/rootReducer.js +0 -20
  190. package/dist/cjs/store/rootReducer.js.map +0 -1
  191. package/dist/cjs/store/slices/appNotificationsSlice.d.ts +0 -58
  192. package/dist/cjs/store/slices/appNotificationsSlice.js +0 -135
  193. package/dist/cjs/store/slices/appNotificationsSlice.js.map +0 -1
  194. package/dist/cjs/store/slices/authSlice.d.ts +0 -24
  195. package/dist/cjs/store/slices/authSlice.js +0 -79
  196. package/dist/cjs/store/slices/authSlice.js.map +0 -1
  197. package/dist/cjs/store/slices/authThunks.d.ts +0 -40
  198. package/dist/cjs/store/slices/authThunks.js +0 -357
  199. package/dist/cjs/store/slices/authThunks.js.map +0 -1
  200. package/dist/cjs/store/slices/index.d.ts +0 -1
  201. package/dist/cjs/store/slices/index.js +0 -23
  202. package/dist/cjs/store/slices/index.js.map +0 -1
  203. package/dist/cjs/store/types/index.d.ts +0 -8
  204. package/dist/cjs/store/types/index.js +0 -3
  205. package/dist/cjs/store/types/index.js.map +0 -1
  206. package/dist/esm/context/replyke-store-context.d.ts +0 -13
  207. package/dist/esm/context/replyke-store-context.js +0 -33
  208. package/dist/esm/context/replyke-store-context.js.map +0 -1
  209. package/dist/esm/hooks/app-notifications-redux/index.d.ts +0 -4
  210. package/dist/esm/hooks/app-notifications-redux/index.js +0 -5
  211. package/dist/esm/hooks/app-notifications-redux/index.js.map +0 -1
  212. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsActionsRedux.d.ts +0 -13
  213. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsActionsRedux.js +0 -260
  214. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsActionsRedux.js.map +0 -1
  215. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsDataRedux.d.ts +0 -21
  216. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsDataRedux.js +0 -103
  217. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsDataRedux.js.map +0 -1
  218. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsRedux.d.ts +0 -7
  219. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsRedux.js +0 -35
  220. package/dist/esm/hooks/app-notifications-redux/useAppNotificationsRedux.js.map +0 -1
  221. package/dist/esm/hooks/auth-redux/index.d.ts +0 -2
  222. package/dist/esm/hooks/auth-redux/index.js +0 -3
  223. package/dist/esm/hooks/auth-redux/index.js.map +0 -1
  224. package/dist/esm/hooks/auth-redux/useAuthRedux.d.ts +0 -32
  225. package/dist/esm/hooks/auth-redux/useAuthRedux.js +0 -174
  226. package/dist/esm/hooks/auth-redux/useAuthRedux.js.map +0 -1
  227. package/dist/esm/hooks/auth-redux/useUserRedux.d.ts +0 -6
  228. package/dist/esm/hooks/auth-redux/useUserRedux.js +0 -17
  229. package/dist/esm/hooks/auth-redux/useUserRedux.js.map +0 -1
  230. package/dist/esm/legacy/context/app-notifications-context.js.map +0 -1
  231. package/dist/esm/legacy/context/auth-context.js.map +0 -1
  232. package/dist/esm/legacy/hooks/app-notifications/index.js.map +0 -1
  233. package/dist/esm/legacy/hooks/app-notifications/useAppNotifications.js.map +0 -1
  234. package/dist/esm/legacy/hooks/app-notifications/useAppNotificationsData.js.map +0 -1
  235. package/dist/esm/legacy/hooks/app-notifications/useCountUnreadNotifications.js.map +0 -1
  236. package/dist/esm/legacy/hooks/app-notifications/useFetchAppNotifications.js.map +0 -1
  237. package/dist/esm/legacy/hooks/app-notifications/useMarkNotificationAsRead.js.map +0 -1
  238. package/dist/esm/legacy/hooks/auth/index.js.map +0 -1
  239. package/dist/esm/legacy/hooks/auth/useAuth.js.map +0 -1
  240. package/dist/esm/legacy/hooks/auth/useAuthData.js.map +0 -1
  241. package/dist/esm/legacy/hooks/auth/useChangePassword.js.map +0 -1
  242. package/dist/esm/legacy/hooks/auth/useRequestNewAccessToken.js.map +0 -1
  243. package/dist/esm/legacy/hooks/auth/useSignInWithEmailAndPassword.js.map +0 -1
  244. package/dist/esm/legacy/hooks/auth/useSignOut.js.map +0 -1
  245. package/dist/esm/legacy/hooks/auth/useSignUpWithEmailAndPassword.js.map +0 -1
  246. package/dist/esm/legacy/hooks/auth/useVerifyExternalUser.js.map +0 -1
  247. package/dist/esm/store/api/appNotificationsApi.d.ts +0 -2021
  248. package/dist/esm/store/api/appNotificationsApi.js +0 -210
  249. package/dist/esm/store/api/appNotificationsApi.js.map +0 -1
  250. package/dist/esm/store/api/baseApi.d.ts +0 -1
  251. package/dist/esm/store/api/baseApi.js +0 -39
  252. package/dist/esm/store/api/baseApi.js.map +0 -1
  253. package/dist/esm/store/api/index.d.ts +0 -2
  254. package/dist/esm/store/api/index.js +0 -9
  255. package/dist/esm/store/api/index.js.map +0 -1
  256. package/dist/esm/store/index.d.ts +0 -15
  257. package/dist/esm/store/index.js +0 -55
  258. package/dist/esm/store/index.js.map +0 -1
  259. package/dist/esm/store/middleware.d.ts +0 -4
  260. package/dist/esm/store/middleware.js +0 -37
  261. package/dist/esm/store/middleware.js.map +0 -1
  262. package/dist/esm/store/rootReducer.d.ts +0 -10
  263. package/dist/esm/store/rootReducer.js +0 -14
  264. package/dist/esm/store/rootReducer.js.map +0 -1
  265. package/dist/esm/store/slices/appNotificationsSlice.d.ts +0 -58
  266. package/dist/esm/store/slices/appNotificationsSlice.js +0 -124
  267. package/dist/esm/store/slices/appNotificationsSlice.js.map +0 -1
  268. package/dist/esm/store/slices/authSlice.d.ts +0 -24
  269. package/dist/esm/store/slices/authSlice.js +0 -69
  270. package/dist/esm/store/slices/authSlice.js.map +0 -1
  271. package/dist/esm/store/slices/authThunks.d.ts +0 -40
  272. package/dist/esm/store/slices/authThunks.js +0 -351
  273. package/dist/esm/store/slices/authThunks.js.map +0 -1
  274. package/dist/esm/store/slices/index.d.ts +0 -1
  275. package/dist/esm/store/slices/index.js +0 -7
  276. package/dist/esm/store/slices/index.js.map +0 -1
  277. package/dist/esm/store/types/index.d.ts +0 -8
  278. package/dist/esm/store/types/index.js +0 -2
  279. package/dist/esm/store/types/index.js.map +0 -1
  280. /package/dist/cjs/{legacy/context → context}/app-notifications-context.d.ts +0 -0
  281. /package/dist/cjs/{legacy/context → context}/app-notifications-context.js +0 -0
  282. /package/dist/cjs/{legacy/context → context}/auth-context.d.ts +0 -0
  283. /package/dist/cjs/{legacy/hooks → hooks}/app-notifications/index.d.ts +0 -0
  284. /package/dist/cjs/{legacy/hooks → hooks}/app-notifications/index.js +0 -0
  285. /package/dist/cjs/{legacy/hooks → hooks}/app-notifications/useAppNotifications.d.ts +0 -0
  286. /package/dist/cjs/{legacy/hooks → hooks}/app-notifications/useAppNotifications.js +0 -0
  287. /package/dist/cjs/{legacy/hooks → hooks}/app-notifications/useCountUnreadNotifications.d.ts +0 -0
  288. /package/dist/cjs/{legacy/hooks → hooks}/app-notifications/useMarkNotificationAsRead.d.ts +0 -0
  289. /package/dist/cjs/{legacy/hooks → hooks}/auth/index.d.ts +0 -0
  290. /package/dist/cjs/{legacy/hooks → hooks}/auth/index.js +0 -0
  291. /package/dist/cjs/{legacy/hooks → hooks}/auth/useAuth.d.ts +0 -0
  292. /package/dist/cjs/{legacy/hooks → hooks}/auth/useAuth.js +0 -0
  293. /package/dist/cjs/{legacy/hooks → hooks}/auth/useChangePassword.d.ts +0 -0
  294. /package/dist/cjs/{legacy/hooks → hooks}/auth/useRequestNewAccessToken.d.ts +0 -0
  295. /package/dist/cjs/{legacy/hooks → hooks}/auth/useSignInWithEmailAndPassword.d.ts +0 -0
  296. /package/dist/cjs/{legacy/hooks → hooks}/auth/useSignOut.d.ts +0 -0
  297. /package/dist/cjs/{legacy/hooks → hooks}/auth/useSignUpWithEmailAndPassword.d.ts +0 -0
  298. /package/dist/cjs/{legacy/hooks → hooks}/auth/useVerifyExternalUser.d.ts +0 -0
  299. /package/dist/esm/{legacy/context → context}/app-notifications-context.d.ts +0 -0
  300. /package/dist/esm/{legacy/context → context}/app-notifications-context.js +0 -0
  301. /package/dist/esm/{legacy/context → context}/auth-context.d.ts +0 -0
  302. /package/dist/esm/{legacy/hooks → hooks}/app-notifications/index.d.ts +0 -0
  303. /package/dist/esm/{legacy/hooks → hooks}/app-notifications/index.js +0 -0
  304. /package/dist/esm/{legacy/hooks → hooks}/app-notifications/useAppNotifications.d.ts +0 -0
  305. /package/dist/esm/{legacy/hooks → hooks}/app-notifications/useAppNotifications.js +0 -0
  306. /package/dist/esm/{legacy/hooks → hooks}/app-notifications/useCountUnreadNotifications.d.ts +0 -0
  307. /package/dist/esm/{legacy/hooks → hooks}/app-notifications/useMarkNotificationAsRead.d.ts +0 -0
  308. /package/dist/esm/{legacy/hooks → hooks}/auth/index.d.ts +0 -0
  309. /package/dist/esm/{legacy/hooks → hooks}/auth/index.js +0 -0
  310. /package/dist/esm/{legacy/hooks → hooks}/auth/useAuth.d.ts +0 -0
  311. /package/dist/esm/{legacy/hooks → hooks}/auth/useAuth.js +0 -0
  312. /package/dist/esm/{legacy/hooks → hooks}/auth/useChangePassword.d.ts +0 -0
  313. /package/dist/esm/{legacy/hooks → hooks}/auth/useRequestNewAccessToken.d.ts +0 -0
  314. /package/dist/esm/{legacy/hooks → hooks}/auth/useSignInWithEmailAndPassword.d.ts +0 -0
  315. /package/dist/esm/{legacy/hooks → hooks}/auth/useSignOut.d.ts +0 -0
  316. /package/dist/esm/{legacy/hooks → hooks}/auth/useSignUpWithEmailAndPassword.d.ts +0 -0
  317. /package/dist/esm/{legacy/hooks → hooks}/auth/useVerifyExternalUser.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"useCreateReport.js","sourceRoot":"","sources":["../../../../src/hooks/reports/useCreateReport.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAE3D,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,SAAS,eAAe;IAAxB,iBAuEC;IAtEC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IACxB,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAC3B,IAAA,IAAI,GAAK,YAAY,EAAE,KAAnB,CAAoB;IAEhC,IAAM,YAAY,GAAG,gEAAO,EAU3B;YATC,QAAQ,cAAA,EACR,UAAU,gBAAA,EACV,MAAM,YAAA,EACN,OAAO,aAAA;;;;oBAOP,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;oBAC5C,CAAC;oBAED,IAAI,CAAC,IAAI,EAAE,CAAC;wBACV,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;oBAC1C,CAAC;oBAED,qBAAM,KAAK,CAAC,IAAI,CACd,WAAI,SAAS,aAAU,EACvB;4BACE,QAAQ,UAAA;4BACR,UAAU,YAAA;4BACV,MAAM,QAAA;4BACN,OAAO,SAAA;yBACR,EACD,EAAE,eAAe,EAAE,IAAI,EAAE,CAC1B,EAAA;;oBATD,SASC,CAAC;;;;SACH,CAAC;IAEF,IAAM,mBAAmB,GAAG,gEAAO,EAQlC;YAPC,QAAQ,cAAA,EACR,MAAM,YAAA,EACN,OAAO,aAAA;;;wBAMP,qBAAM,YAAY,CAAC;wBACjB,QAAQ,UAAA;wBACR,UAAU,EAAE,SAAS;wBACrB,MAAM,QAAA;wBACN,OAAO,SAAA;qBACR,CAAC,EAAA;;oBALF,SAKE,CAAC;;;;SACJ,CAAC;IAEF,IAAM,kBAAkB,GAAG,gEAAO,EAQjC;YAPC,QAAQ,cAAA,EACR,MAAM,YAAA,EACN,OAAO,aAAA;;;wBAMP,qBAAM,YAAY,CAAC;wBACjB,QAAQ,UAAA;wBACR,UAAU,EAAE,QAAQ;wBACpB,MAAM,QAAA;wBACN,OAAO,SAAA;qBACR,CAAC,EAAA;;oBALF,SAKE,CAAC;;;;SACJ,CAAC;IAEF,OAAO,EAAE,mBAAmB,qBAAA,EAAE,kBAAkB,oBAAA,EAAE,CAAC;AACrD,CAAC;AAED,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"useCreateReport.js","sourceRoot":"","sources":["../../../../src/hooks/reports/useCreateReport.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAE3D,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAA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SAKE,CAAC;;;;SACJ,CAAC;IAEF,OAAO,EAAE,mBAAmB,qBAAA,EAAE,kBAAkB,oBAAA,EAAE,CAAC;AACrD,CAAC;AAED,eAAe,eAAe,CAAC"}
@@ -37,12 +37,12 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
37
37
  import { useCallback } from "react";
38
38
  import useAxiosPrivate from "../../../config/useAxiosPrivate";
39
39
  import useProject from "../../projects/useProject";
40
- import { useUserRedux } from "../../auth-redux";
40
+ import useUser from "../useUser";
41
41
  function useFetchFollow() {
42
42
  var _this = this;
43
43
  var axios = useAxiosPrivate();
44
44
  var projectId = useProject().projectId;
45
- var user = useUserRedux().user;
45
+ var user = useUser().user;
46
46
  var fetchFollow = useCallback(function (props) { return __awaiter(_this, void 0, void 0, function () {
47
47
  var userId, response;
48
48
  return __generator(this, function (_a) {
@@ -1 +1 @@
1
- {"version":3,"file":"useFetchFollow.js","sourceRoot":"","sources":["../../../../../src/hooks/users/follows/useFetchFollow.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAC9D,OAAO,UAAU,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,SAAS,cAAc;IAAvB,iBAiCC;IAhCC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IACxB,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAC3B,IAAA,IAAI,GAAK,YAAY,EAAE,KAAnB,CAAoB;IAEhC,IAAM,WAAW,GAAG,WAAW,CAC7B,UAAO,KAAyB;;;;;oBACtB,MAAM,GAAK,KAAK,OAAV,CAAW;oBACzB,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;oBAC1C,CAAC;oBAED,I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,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;oBAC1C,CAAC;oBAED,IAAI,CAAC,IAAI,EAAE,CAAC;wBACV,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;oBAC1C,CAAC;oBAED,IAAI,CAAC,MAAM,EAAE,CAAC;wBACZ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAED,IAAI,MAAM,KAAK,IAAI,CAAC,EAAE,EAAE,CAAC;wBACvB,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;oBACnD,CAAC;oBAEgB,qBAAM,KAAK,CAAC,GAAG,CAAC,WAAI,SAAS,oBAAU,MAAM,YAAS,EAAE;4BACvE,eAAe,EAAE,IAAI;yBACtB,CAAC,EAAA;;oBAFI,QAAQ,GAAG,SAEf;oBACF,sBAAO,QAAQ,CAAC,IAAgC,EAAC;;;SAClD,EACD,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,CACzB,CAAC;IAEF,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,eAAe,cAAc,CAAC"}
@@ -37,12 +37,12 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
37
37
  import { useCallback } from "react";
38
38
  import useAxiosPrivate from "../../../config/useAxiosPrivate";
39
39
  import useProject from "../../projects/useProject";
40
- import { useUserRedux } from "../../auth-redux";
40
+ import useUser from "../useUser";
41
41
  function useUnfollowUser() {
42
42
  var _this = this;
43
43
  var axios = useAxiosPrivate();
44
44
  var projectId = useProject().projectId;
45
- var user = useUserRedux().user;
45
+ var user = useUser().user;
46
46
  var unfollowUser = useCallback(function (props) { return __awaiter(_this, void 0, void 0, function () {
47
47
  var userId;
48
48
  return __generator(this, function (_a) {
@@ -1 +1 @@
1
- {"version":3,"file":"useUnfollowUser.js","sourceRoot":"","sources":["../../../../../src/hooks/users/follows/useUnfollowUser.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;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pers/getUserName";
4
4
  export { default as getPublicFileUrl } from "./helpers/getPublicFileUrl";
5
5
  export { reportReasons } from "./constants/reportReasons";
6
6
  export type { ReportReasonKey } from "./constants/reportReasons";
7
- export { ReplykeProvider, // Always includes Redux auth and notification management
8
- ReplykeStoreProvider, // Advanced: standalone Redux provider
9
- EntityListProvider, EntityProvider, ListsProvider, CommentSectionProvider, } from "./context";
7
+ export { ReplykeProvider, EntityListProvider, EntityProvider, ListsProvider, AppNotificationsProvider, CommentSectionProvider, } from "./context";
10
8
  export { useProject, useProjectData } from "./hooks/projects";
11
9
  export { useSignTestingJwt } from "./hooks/crypto";
12
- export { useAuthRedux, useUserRedux, type UseAuthReduxValues, type UseUserReduxValues, } from "./hooks/auth-redux";
13
- export { useAppNotificationsRedux, useAppNotificationsDataRedux, type UseAppNotificationsDataProps, type UseAppNotificationsDataValues, } from "./hooks/app-notifications-redux";
10
+ export { useAuth, useAuthData, useRequestNewAccessToken, useSignUpWithEmailAndPassword, useSignInWithEmailAndPassword, useSignOut, useChangePassword, useVerifyExternalUser, } from "./hooks/auth";
11
+ export { useAppNotifications, useAppNotificationsData, useCountUnreadNotifications, useFetchAppNotifications, useMarkNotificationAsRead, } from "./hooks/app-notifications";
14
12
  export { useEntity, useEntityData, useCreateEntity, useFetchEntity, useFetchEntityByForeignId, useFetchEntityByShortId, useUpdateEntity, useEntityVotes, useDeleteEntity, useEntityList, useEntityListData, useInfusedData, } from "./hooks/entities";
15
13
  export { useCommentSection, useCommentSectionData, useCreateComment, useFetchManyComments, useFetchComment, useFetchCommentByForeignId, useReplies, useUpdateComment, useCommentVotes, useDeleteComment, useEntityComments, useProfileComments, } from "./hooks/comments";
16
14
  export { useLists, useListsData, useCreateList, useFetchRootList, useFetchSubLists, useIsEntitySaved, useUpdateList, useAddToList, useRemoveFromList, useDeleteList, } from "./hooks/lists";
17
- export { useUserData, useFetchUser, useFetchUserByForeignId, useFetchUserFollowersCount, useFetchUserFollowingCount, useCheckUsernameAvailability, useFetchUserSuggestions, useMentions, useUpdateUser, useFetchFollow, useFollowUser, useUnfollowUser, } from "./hooks/users";
15
+ export { useUser, useUserData, useFetchUser, useFetchUserByForeignId, useFetchUserFollowersCount, useFetchUserFollowingCount, useCheckUsernameAvailability, useFetchUserSuggestions, useMentions, useUpdateUser, useFetchFollow, useFollowUser, useUnfollowUser, } from "./hooks/users";
18
16
  export { useCreateReport } from "./hooks/reports";
19
17
  export { useGetMetadata } from "./hooks/utils";
20
18
  export { useUploadFile } from "./hooks/storage";
package/dist/esm/index.js CHANGED
@@ -5,18 +5,16 @@ export { getUserName } from "./helpers/getUserName";
5
5
  export { default as getPublicFileUrl } from "./helpers/getPublicFileUrl";
6
6
  // Constants
7
7
  export { reportReasons } from "./constants/reportReasons";
8
- // Context providers (Redux-powered by default)
9
- export { ReplykeProvider, // Always includes Redux auth and notification management
10
- ReplykeStoreProvider, // Advanced: standalone Redux provider
11
- EntityListProvider, EntityProvider, ListsProvider, CommentSectionProvider, } from "./context";
8
+ // Context providers
9
+ export { ReplykeProvider, EntityListProvider, EntityProvider, ListsProvider, AppNotificationsProvider, CommentSectionProvider, } from "./context";
12
10
  // -- projects
13
11
  export { useProject, useProjectData } from "./hooks/projects";
14
12
  // -- crypto
15
13
  export { useSignTestingJwt } from "./hooks/crypto";
16
- // -- authentication (Redux-powered)
17
- export { useAuthRedux, useUserRedux, } from "./hooks/auth-redux";
18
- // -- app notifications (Redux-powered)
19
- export { useAppNotificationsRedux, useAppNotificationsDataRedux, } from "./hooks/app-notifications-redux";
14
+ // -- authentication
15
+ export { useAuth, useAuthData, useRequestNewAccessToken, useSignUpWithEmailAndPassword, useSignInWithEmailAndPassword, useSignOut, useChangePassword, useVerifyExternalUser, } from "./hooks/auth";
16
+ // -- app notifications
17
+ export { useAppNotifications, useAppNotificationsData, useCountUnreadNotifications, useFetchAppNotifications, useMarkNotificationAsRead, } from "./hooks/app-notifications";
20
18
  // -- entities
21
19
  export { useEntity, useEntityData, useCreateEntity, useFetchEntity, useFetchEntityByForeignId, useFetchEntityByShortId, useUpdateEntity, useEntityVotes, useDeleteEntity, useEntityList, useEntityListData, useInfusedData, } from "./hooks/entities";
22
20
  // -- comments
@@ -24,7 +22,7 @@ export { useCommentSection, useCommentSectionData, useCreateComment, useFetchMan
24
22
  // -- lists
25
23
  export { useLists, useListsData, useCreateList, useFetchRootList, useFetchSubLists, useIsEntitySaved, useUpdateList, useAddToList, useRemoveFromList, useDeleteList, } from "./hooks/lists";
26
24
  // -- users
27
- export { useUserData, useFetchUser, useFetchUserByForeignId, useFetchUserFollowersCount, useFetchUserFollowingCount, useCheckUsernameAvailability, useFetchUserSuggestions, useMentions, useUpdateUser, useFetchFollow, useFollowUser, useUnfollowUser, } from "./hooks/users";
25
+ export { useUser, useUserData, useFetchUser, useFetchUserByForeignId, useFetchUserFollowersCount, useFetchUserFollowingCount, useCheckUsernameAvailability, useFetchUserSuggestions, useMentions, useUpdateUser, useFetchFollow, useFollowUser, useUnfollowUser, } from "./hooks/users";
28
26
  // -- reports
29
27
  export { useCreateReport } from "./hooks/reports";
30
28
  // -- general
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,sBAAsB;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEzE,YAAY;AACZ,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAG1D,+CAA+C;AAC/C,OAAO,EACL,eAAe,EAAE,yDAAyD;AAC1E,oBAAoB,EAAE,sCAAsC;AAC5D,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,sBAAsB,GACvB,MAAM,WAAW,CAAC;AAEnB,cAAc;AACd,OA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oBAAoB,EACpB,eAAe,EACf,0BAA0B,EAC1B,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAE1B,WAAW;AACX,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,aAAa,GACd,MAAM,eAAe,CAAC;AAEvB,WAAW;AACX,OAAO,EACL,OAAO,EACP,WAAW,EACX,YAAY,EACZ,uBAAuB,EACvB,0BAA0B,EAC1B,0BAA0B,EAC1B,4BAA4B,EAC5B,uBAAuB,EACvB,WAAW,EACX,aAAa,EACb,cAAc,EACd,aAAa,EACb,eAAe,GAChB,MAAM,eAAe,CAAC;AAEvB,aAAa;AACb,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,aAAa;AACb,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,aAAa;AACb,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAKhD,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC"}
@@ -7,7 +7,7 @@ interface BaseAppNotification {
7
7
  metadata: Record<string, any>;
8
8
  title?: string;
9
9
  content?: string;
10
- createdAt: string;
10
+ createdAt: Date;
11
11
  }
12
12
  export interface EntityCommentNotification extends BaseAppNotification {
13
13
  type: "entity-comment";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@replyke/core",
3
- "version": "5.1.5-beta.9",
3
+ "version": "5.1.5",
4
4
  "private": false,
5
5
  "license": "Apache-2.0",
6
6
  "author": "Replyke, maintained by Yanay Tsabary",
@@ -40,11 +40,9 @@
40
40
  "dist"
41
41
  ],
42
42
  "dependencies": {
43
- "@reduxjs/toolkit": "^2.0.1",
44
43
  "axios": "^1.4.0",
45
44
  "js-cookie": "^3.0.5",
46
- "lodash": "^4.17.21",
47
- "react-redux": "^9.0.4"
45
+ "lodash": "^4.17.21"
48
46
  },
49
47
  "devDependencies": {
50
48
  "@types/js-cookie": "^3.0.6",
@@ -1,13 +0,0 @@
1
- import React from "react";
2
- import type { ReactNode } from "react";
3
- export interface ReplykeStoreProviderProps {
4
- children: ReactNode;
5
- projectId: string;
6
- signedToken?: string | null;
7
- }
8
- /**
9
- * Redux store provider for Replyke
10
- * This component provides the Redux store and initializes auth state
11
- */
12
- export declare const ReplykeStoreProvider: React.FC<ReplykeStoreProviderProps>;
13
- export default ReplykeStoreProvider;
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ReplykeStoreProvider = void 0;
4
- var jsx_runtime_1 = require("react/jsx-runtime");
5
- var react_1 = require("react");
6
- var react_redux_1 = require("react-redux");
7
- var store_1 = require("../store");
8
- var authThunks_1 = require("../store/slices/authThunks");
9
- /**
10
- * Component that initializes auth state in Redux
11
- * Must be inside the Redux Provider to dispatch actions
12
- */
13
- var AuthInitializer = function (_a) {
14
- var children = _a.children, projectId = _a.projectId, signedToken = _a.signedToken;
15
- var dispatch = (0, react_redux_1.useDispatch)();
16
- (0, react_1.useEffect)(function () {
17
- // Initialize auth with project and signed token
18
- dispatch((0, authThunks_1.initializeAuthThunk)({
19
- projectId: projectId,
20
- signedToken: signedToken
21
- }));
22
- }, [dispatch, projectId, signedToken]);
23
- return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
24
- };
25
- /**
26
- * Redux store provider for Replyke
27
- * This component provides the Redux store and initializes auth state
28
- */
29
- var ReplykeStoreProvider = function (_a) {
30
- var children = _a.children, projectId = _a.projectId, signedToken = _a.signedToken;
31
- return ((0, jsx_runtime_1.jsx)(react_redux_1.Provider, { store: store_1.replykeStore, children: (0, jsx_runtime_1.jsx)(AuthInitializer, { projectId: projectId, signedToken: signedToken, children: children }) }));
32
- };
33
- exports.ReplykeStoreProvider = ReplykeStoreProvider;
34
- // Clean Redux-only architecture
35
- // Always integrated with ReplykeProvider
36
- exports.default = exports.ReplykeStoreProvider;
37
- //# sourceMappingURL=replyke-store-context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"replyke-store-context.js","sourceRoot":"","sources":["../../../src/context/replyke-store-context.tsx"],"names":[],"mappings":";;;;AAAA,+BAAyC;AACzC,2CAAoD;AACpD,kCAAwC;AAGxC,yDAAiE;AAQjE;;;GAGG;AACH,IAAM,eAAe,GAIhB,UAAC,EAAoC;QAAlC,QAAQ,cAAA,EAAE,SAAS,eAAA,EAAE,WAAW,iBAAA;IACtC,IAAM,QAAQ,GAAG,IAAA,yBAAW,GAAe,CAAC;IAE5C,IAAA,iBAAS,EAAC;QACR,gDAAgD;QAChD,QAAQ,CAAC,IAAA,gCAAmB,EAAC;YAC3B,SAAS,WAAA;YACT,WAAW,aAAA;SACZ,CAAC,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;IAEvC,OAAO,2DAAG,QAAQ,GAAI,CAAC;AACzB,CAAC,CAAC;AAEF;;;GAGG;AACI,IAAM,oBAAoB,GAAwC,UAAC,EAIzE;QAHC,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,WAAW,iBAAA;IAEX,OAAO,CACL,uBAAC,sBAAQ,IAAC,KAAK,EAAE,oBAAY,YAC3B,uBAAC,eAAe,IAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,YAC5D,QAAQ,GACO,GACT,CACZ,CAAC;AACJ,CAAC,CAAC;AAZW,QAAA,oBAAoB,wBAY/B;AAEF,gCAAgC;AAChC,yCAAyC;AAEzC,kBAAe,4BAAoB,CAAC"}
@@ -1,4 +0,0 @@
1
- export { default as useAppNotificationsRedux } from "./useAppNotificationsRedux";
2
- export { default as useAppNotificationsDataRedux } from "./useAppNotificationsDataRedux";
3
- export { default as useAppNotificationsActionsRedux } from "./useAppNotificationsActionsRedux";
4
- export type { UseAppNotificationsDataProps, UseAppNotificationsDataValues, } from "./useAppNotificationsDataRedux";
@@ -1,14 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.useAppNotificationsActionsRedux = exports.useAppNotificationsDataRedux = exports.useAppNotificationsRedux = void 0;
7
- // Export Redux-powered app notifications hooks
8
- var useAppNotificationsRedux_1 = require("./useAppNotificationsRedux");
9
- Object.defineProperty(exports, "useAppNotificationsRedux", { enumerable: true, get: function () { return __importDefault(useAppNotificationsRedux_1).default; } });
10
- var useAppNotificationsDataRedux_1 = require("./useAppNotificationsDataRedux");
11
- Object.defineProperty(exports, "useAppNotificationsDataRedux", { enumerable: true, get: function () { return __importDefault(useAppNotificationsDataRedux_1).default; } });
12
- var useAppNotificationsActionsRedux_1 = require("./useAppNotificationsActionsRedux");
13
- Object.defineProperty(exports, "useAppNotificationsActionsRedux", { enumerable: true, get: function () { return __importDefault(useAppNotificationsActionsRedux_1).default; } });
14
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications-redux/index.ts"],"names":[],"mappings":";;;;;;AAAA,+CAA+C;AAC/C,uEAAiF;AAAxE,qJAAA,OAAO,OAA4B;AAC5C,+EAAyF;AAAhF,6JAAA,OAAO,OAAgC;AAChD,qFAA+F;AAAtF,mKAAA,OAAO,OAAmC"}
@@ -1,13 +0,0 @@
1
- /**
2
- * Hook that provides Redux-powered actions for app notifications
3
- * Integrates RTK Query with Redux slice actions
4
- */
5
- export declare function useAppNotificationsActionsRedux(): {
6
- loadMore: () => void;
7
- markNotificationAsRead: (notificationId: string) => Promise<void>;
8
- markAllNotificationsAsRead: () => Promise<void>;
9
- resetAppNotifications: () => Promise<void>;
10
- fetchMoreNotifications: (pageToFetch: number) => Promise<void>;
11
- updateUnreadCount: () => Promise<void>;
12
- };
13
- export default useAppNotificationsActionsRedux;
@@ -1,266 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- var __importDefault = (this && this.__importDefault) || function (mod) {
39
- return (mod && mod.__esModule) ? mod : { "default": mod };
40
- };
41
- Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.useAppNotificationsActionsRedux = useAppNotificationsActionsRedux;
43
- var react_1 = require("react");
44
- var react_redux_1 = require("react-redux");
45
- var appNotificationsSlice_1 = require("../../store/slices/appNotificationsSlice");
46
- var appNotificationsApi_1 = require("../../store/api/appNotificationsApi");
47
- var handleError_1 = require("../../utils/handleError");
48
- var addNotificationsMessages_1 = __importDefault(require("../../helpers/addNotificationsMessages"));
49
- var useProject_1 = __importDefault(require("../projects/useProject"));
50
- var auth_redux_1 = require("../auth-redux");
51
- /**
52
- * Hook that provides Redux-powered actions for app notifications
53
- * Integrates RTK Query with Redux slice actions
54
- */
55
- function useAppNotificationsActionsRedux() {
56
- var _this = this;
57
- var dispatch = (0, react_redux_1.useDispatch)();
58
- // Get current state for actions
59
- var projectIdFromSlice = (0, react_redux_1.useSelector)(function (state) {
60
- return (0, appNotificationsSlice_1.selectCurrentProjectId)(state);
61
- });
62
- var page = (0, react_redux_1.useSelector)(function (state) {
63
- return (0, appNotificationsSlice_1.selectAppNotificationsPage)(state);
64
- });
65
- var limit = (0, react_redux_1.useSelector)(function (state) {
66
- return (0, appNotificationsSlice_1.selectAppNotificationsLimit)(state);
67
- });
68
- var notificationTemplates = (0, react_redux_1.useSelector)(function (state) {
69
- return (0, appNotificationsSlice_1.selectNotificationTemplates)(state);
70
- });
71
- // Get project and user context (fallback to current hooks)
72
- var projectIdFromHook = (0, useProject_1.default)().projectId;
73
- var user = (0, auth_redux_1.useUserRedux)().user;
74
- // Use project ID from slice if available, otherwise from hook
75
- var projectId = projectIdFromSlice || projectIdFromHook;
76
- // RTK Query hooks
77
- var triggerFetchNotifications = (0, appNotificationsApi_1.useLazyFetchAppNotificationsQuery)()[0];
78
- var markNotificationAsReadMutation = (0, appNotificationsApi_1.useMarkNotificationAsReadMutation)()[0];
79
- var markAllNotificationsAsReadMutation = (0, appNotificationsApi_1.useMarkAllNotificationsAsReadMutation)()[0];
80
- var triggerCountUnread = (0, appNotificationsApi_1.useLazyCountUnreadNotificationsQuery)()[0];
81
- // Load more action
82
- var loadMore = (0, react_1.useCallback)(function () {
83
- dispatch((0, appNotificationsSlice_1.loadMore)());
84
- }, [dispatch]);
85
- // Mark notification as read action
86
- var markNotificationAsRead = (0, react_1.useCallback)(function (notificationId) { return __awaiter(_this, void 0, void 0, function () {
87
- var error_1;
88
- return __generator(this, function (_a) {
89
- switch (_a.label) {
90
- case 0:
91
- if (!projectId || !user) {
92
- throw new Error("No project ID or authenticated user available");
93
- }
94
- _a.label = 1;
95
- case 1:
96
- _a.trys.push([1, 3, , 4]);
97
- // Optimistic update
98
- dispatch((0, appNotificationsSlice_1.markAsReadLocally)(notificationId));
99
- // Make API call
100
- return [4 /*yield*/, markNotificationAsReadMutation({
101
- projectId: projectId,
102
- notificationId: notificationId,
103
- }).unwrap()];
104
- case 2:
105
- // Make API call
106
- _a.sent();
107
- return [3 /*break*/, 4];
108
- case 3:
109
- error_1 = _a.sent();
110
- (0, handleError_1.handleError)(error_1, "Failed to mark notification as read:");
111
- throw error_1;
112
- case 4: return [2 /*return*/];
113
- }
114
- });
115
- }); }, [dispatch, projectId, user, markNotificationAsReadMutation]);
116
- // Reset notifications action
117
- var resetAppNotifications = (0, react_1.useCallback)(function () { return __awaiter(_this, void 0, void 0, function () {
118
- var result, completeNotifications, error_2;
119
- return __generator(this, function (_a) {
120
- switch (_a.label) {
121
- case 0:
122
- if (!projectId || !user) {
123
- throw new Error("No project ID or authenticated user available");
124
- }
125
- _a.label = 1;
126
- case 1:
127
- _a.trys.push([1, 3, , 4]);
128
- dispatch((0, appNotificationsSlice_1.setLoading)(true));
129
- dispatch((0, appNotificationsSlice_1.resetNotifications)());
130
- return [4 /*yield*/, triggerFetchNotifications({
131
- projectId: projectId,
132
- page: 1,
133
- limit: limit,
134
- }).unwrap()];
135
- case 2:
136
- result = _a.sent();
137
- if (result) {
138
- completeNotifications = (0, addNotificationsMessages_1.default)(result, notificationTemplates);
139
- dispatch((0, appNotificationsSlice_1.addNotifications)({
140
- notifications: completeNotifications,
141
- isFirstPage: true,
142
- }));
143
- }
144
- return [3 /*break*/, 4];
145
- case 3:
146
- error_2 = _a.sent();
147
- (0, handleError_1.handleError)(error_2, "Failed to refresh notifications:");
148
- throw error_2;
149
- case 4: return [2 /*return*/];
150
- }
151
- });
152
- }); }, [
153
- dispatch,
154
- projectId,
155
- user,
156
- triggerFetchNotifications,
157
- limit,
158
- notificationTemplates,
159
- ]);
160
- // Fetch more notifications (internal action triggered by page changes)
161
- var fetchMoreNotifications = (0, react_1.useCallback)(function (pageToFetch) { return __awaiter(_this, void 0, void 0, function () {
162
- var result, completeNotifications, error_3;
163
- return __generator(this, function (_a) {
164
- switch (_a.label) {
165
- case 0:
166
- if (!projectId || !user)
167
- return [2 /*return*/];
168
- _a.label = 1;
169
- case 1:
170
- _a.trys.push([1, 3, 4, 5]);
171
- dispatch((0, appNotificationsSlice_1.setLoading)(true));
172
- return [4 /*yield*/, triggerFetchNotifications({
173
- projectId: projectId,
174
- page: pageToFetch,
175
- limit: limit,
176
- }).unwrap()];
177
- case 2:
178
- result = _a.sent();
179
- if (result) {
180
- completeNotifications = (0, addNotificationsMessages_1.default)(result, notificationTemplates);
181
- dispatch((0, appNotificationsSlice_1.addNotifications)({ notifications: completeNotifications }));
182
- }
183
- return [3 /*break*/, 5];
184
- case 3:
185
- error_3 = _a.sent();
186
- (0, handleError_1.handleError)(error_3, "Loading more app notifications failed:");
187
- return [3 /*break*/, 5];
188
- case 4:
189
- dispatch((0, appNotificationsSlice_1.setLoading)(false));
190
- return [7 /*endfinally*/];
191
- case 5: return [2 /*return*/];
192
- }
193
- });
194
- }); }, [
195
- dispatch,
196
- projectId,
197
- user,
198
- triggerFetchNotifications,
199
- limit,
200
- notificationTemplates,
201
- ]);
202
- // Update unread count
203
- var updateUnreadCount = (0, react_1.useCallback)(function () { return __awaiter(_this, void 0, void 0, function () {
204
- var count, error_4;
205
- return __generator(this, function (_a) {
206
- switch (_a.label) {
207
- case 0:
208
- if (!projectId || !user)
209
- return [2 /*return*/];
210
- _a.label = 1;
211
- case 1:
212
- _a.trys.push([1, 3, , 4]);
213
- return [4 /*yield*/, triggerCountUnread({ projectId: projectId }).unwrap()];
214
- case 2:
215
- count = _a.sent();
216
- if (typeof count === "number") {
217
- dispatch((0, appNotificationsSlice_1.setUnreadCount)(count));
218
- }
219
- return [3 /*break*/, 4];
220
- case 3:
221
- error_4 = _a.sent();
222
- (0, handleError_1.handleError)(error_4, "Failed to fetch unread count:");
223
- return [3 /*break*/, 4];
224
- case 4: return [2 /*return*/];
225
- }
226
- });
227
- }); }, [dispatch, projectId, user, triggerCountUnread]);
228
- // Mark all notifications as read action
229
- var markAllNotificationsAsRead = (0, react_1.useCallback)(function () { return __awaiter(_this, void 0, void 0, function () {
230
- var error_5;
231
- return __generator(this, function (_a) {
232
- switch (_a.label) {
233
- case 0:
234
- if (!projectId || !user) {
235
- throw new Error("No project ID or authenticated user available");
236
- }
237
- _a.label = 1;
238
- case 1:
239
- _a.trys.push([1, 3, , 4]);
240
- // Optimistic update
241
- dispatch((0, appNotificationsSlice_1.markAllAsReadLocally)());
242
- // Make API call
243
- return [4 /*yield*/, markAllNotificationsAsReadMutation({ projectId: projectId }).unwrap()];
244
- case 2:
245
- // Make API call
246
- _a.sent();
247
- return [3 /*break*/, 4];
248
- case 3:
249
- error_5 = _a.sent();
250
- (0, handleError_1.handleError)(error_5, "Failed to mark all notifications as read:");
251
- throw error_5;
252
- case 4: return [2 /*return*/];
253
- }
254
- });
255
- }); }, [dispatch, projectId, user, markAllNotificationsAsReadMutation]);
256
- return {
257
- loadMore: loadMore,
258
- markNotificationAsRead: markNotificationAsRead,
259
- markAllNotificationsAsRead: markAllNotificationsAsRead,
260
- resetAppNotifications: resetAppNotifications,
261
- fetchMoreNotifications: fetchMoreNotifications, // Internal action
262
- updateUnreadCount: updateUnreadCount,
263
- };
264
- }
265
- exports.default = useAppNotificationsActionsRedux;
266
- //# sourceMappingURL=useAppNotificationsActionsRedux.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAppNotificationsActionsRedux.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications-redux/useAppNotificationsActionsRedux.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,0EAqLC;AApND,+BAAoC;AACpC,2CAAuD;AAEvD,kFAYkD;AAClD,2EAK6C;AAC7C,uDAAsD;AACtD,oGAA8E;AAC9E,sEAAgD;AAChD,4CAA6C;AAE7C;;;GAGG;AACH,SAAgB,+BAA+B;IAA/C,iBAqLC;IApLC,IAAM,QAAQ,GAAG,IAAA,yBAAW,GAAe,CAAC;IAE5C,gCAAgC;IAChC,IAAM,kBAAkB,GAAG,IAAA,yBAAW,EAAC,UAAC,KAAgB;QACtD,OAAA,IAAA,8CAAsB,EAAC,KAAK,CAAC;IAA7B,CAA6B,CAC9B,CAAC;IACF,IAAM,IAAI,GAAG,IAAA,yBAAW,EAAC,UAAC,KAAgB;QACxC,OAAA,IAAA,kDAA0B,EAAC,KAAK,CAAC;IAAjC,CAAiC,CAClC,CAAC;IACF,IAAM,KAAK,GAAG,IAAA,yBAAW,EAAC,UAAC,KAAgB;QACzC,OAAA,IAAA,mDAA2B,EAAC,KAAK,CAAC;IAAlC,CAAkC,CACnC,CAAC;IACF,IAAM,qBAAqB,GAAG,IAAA,yBAAW,EAAC,UAAC,KAAgB;QACzD,OAAA,IAAA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AAC;;;;oBAGC,oBAAoB;oBACpB,QAAQ,CAAC,IAAA,4CAAoB,GAAE,CAAC,CAAC;oBAEjC,gBAAgB;oBAChB,qBAAM,kCAAkC,CAAC,EAAE,SAAS,WAAA,EAAE,CAAC,CAAC,MAAM,EAAE,EAAA;;oBADhE,gBAAgB;oBAChB,SAAgE,CAAC;;;;oBAEjE,IAAA,yBAAW,EAAC,OAAK,EAAE,2CAA2C,CAAC,CAAC;oBAChE,MAAM,OAAK,CAAC;;;;SAEf,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,kCAAkC,CAAC,CAAC,CAAC;IAEpE,OAAO;QACL,QAAQ,UAAA;QACR,sBAAsB,wBAAA;QACtB,0BAA0B,4BAAA;QAC1B,qBAAqB,uBAAA;QACrB,sBAAsB,wBAAA,EAAE,kBAAkB;QAC1C,iBAAiB,mBAAA;KAClB,CAAC;AACJ,CAAC;AAED,kBAAe,+BAA+B,CAAC"}
@@ -1,21 +0,0 @@
1
- import { NotificationTemplates, UnifiedAppNotification } from "../../interfaces/models/AppNotification";
2
- export interface UseAppNotificationsDataProps {
3
- limit?: number;
4
- notificationTemplates?: Partial<NotificationTemplates>;
5
- }
6
- export interface UseAppNotificationsDataValues {
7
- appNotifications: UnifiedAppNotification[];
8
- unreadAppNotificationsCount: number;
9
- loading: boolean;
10
- hasMore: boolean;
11
- loadMore: () => void;
12
- markNotificationAsRead: (notificationId: string) => Promise<void>;
13
- markAllNotificationsAsRead: () => Promise<void>;
14
- resetAppNotifications: () => Promise<void>;
15
- }
16
- /**
17
- * Redux-powered hook that provides the exact same interface as useAppNotificationsData()
18
- * This is a drop-in replacement for the Context-based hook
19
- */
20
- declare function useAppNotificationsDataRedux({ limit, notificationTemplates, }?: UseAppNotificationsDataProps): UseAppNotificationsDataValues;
21
- export default useAppNotificationsDataRedux;