@replyke/core 6.0.0-beta.6 → 6.0.0-beta.9

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 (221) hide show
  1. package/dist/cjs/hooks/comments/useCommentSectionData.js +4 -1
  2. package/dist/cjs/hooks/comments/useCommentSectionData.js.map +1 -1
  3. package/dist/cjs/hooks/relationships/connections/index.d.ts +13 -0
  4. package/dist/cjs/hooks/relationships/connections/index.js +33 -0
  5. package/dist/cjs/hooks/relationships/connections/index.js.map +1 -0
  6. package/dist/cjs/hooks/relationships/connections/useAcceptConnection.d.ts +5 -0
  7. package/dist/cjs/hooks/relationships/connections/useAcceptConnection.js +76 -0
  8. package/dist/cjs/hooks/relationships/connections/useAcceptConnection.js.map +1 -0
  9. package/dist/cjs/hooks/relationships/connections/useConnectionManager.d.ts +26 -0
  10. package/dist/cjs/hooks/relationships/connections/useConnectionManager.js +342 -0
  11. package/dist/cjs/hooks/relationships/connections/useConnectionManager.js.map +1 -0
  12. package/dist/cjs/hooks/relationships/connections/useDeclineConnection.d.ts +5 -0
  13. package/dist/cjs/hooks/relationships/connections/useDeclineConnection.js +76 -0
  14. package/dist/cjs/hooks/relationships/connections/useDeclineConnection.js.map +1 -0
  15. package/dist/cjs/hooks/relationships/connections/useFetchConnectionStatus.d.ts +5 -0
  16. package/dist/cjs/hooks/relationships/connections/useFetchConnectionStatus.js +79 -0
  17. package/dist/cjs/hooks/relationships/connections/useFetchConnectionStatus.js.map +1 -0
  18. package/dist/cjs/hooks/relationships/connections/useFetchConnections.d.ts +7 -0
  19. package/dist/cjs/hooks/relationships/connections/useFetchConnections.js +95 -0
  20. package/dist/cjs/hooks/relationships/connections/useFetchConnections.js.map +1 -0
  21. package/dist/cjs/hooks/relationships/connections/useFetchConnectionsByUserId.d.ts +8 -0
  22. package/dist/cjs/hooks/relationships/connections/useFetchConnectionsByUserId.js +75 -0
  23. package/dist/cjs/hooks/relationships/connections/useFetchConnectionsByUserId.js.map +1 -0
  24. package/dist/cjs/hooks/relationships/connections/useFetchConnectionsCount.d.ts +3 -0
  25. package/dist/cjs/hooks/relationships/connections/useFetchConnectionsCount.js +72 -0
  26. package/dist/cjs/hooks/relationships/connections/useFetchConnectionsCount.js.map +1 -0
  27. package/dist/cjs/hooks/relationships/connections/useFetchConnectionsCountByUserId.d.ts +6 -0
  28. package/dist/cjs/hooks/relationships/connections/useFetchConnectionsCountByUserId.js +70 -0
  29. package/dist/cjs/hooks/relationships/connections/useFetchConnectionsCountByUserId.js.map +1 -0
  30. package/dist/cjs/hooks/relationships/connections/useFetchReceivedPendingConnections.d.ts +7 -0
  31. package/dist/cjs/hooks/relationships/connections/useFetchReceivedPendingConnections.js +95 -0
  32. package/dist/cjs/hooks/relationships/connections/useFetchReceivedPendingConnections.js.map +1 -0
  33. package/dist/cjs/hooks/relationships/connections/useFetchSentPendingConnections.d.ts +7 -0
  34. package/dist/cjs/hooks/relationships/connections/useFetchSentPendingConnections.js +95 -0
  35. package/dist/cjs/hooks/relationships/connections/useFetchSentPendingConnections.js.map +1 -0
  36. package/dist/cjs/hooks/relationships/connections/useRemoveConnection.d.ts +5 -0
  37. package/dist/cjs/hooks/relationships/connections/useRemoveConnection.js +76 -0
  38. package/dist/cjs/hooks/relationships/connections/useRemoveConnection.js.map +1 -0
  39. package/dist/cjs/hooks/relationships/connections/useRemoveConnectionByUserId.d.ts +5 -0
  40. package/dist/cjs/hooks/relationships/connections/useRemoveConnectionByUserId.js +79 -0
  41. package/dist/cjs/hooks/relationships/connections/useRemoveConnectionByUserId.js.map +1 -0
  42. package/dist/cjs/hooks/relationships/connections/useRequestConnection.d.ts +3 -0
  43. package/dist/cjs/hooks/relationships/connections/useRequestConnection.js +71 -0
  44. package/dist/cjs/hooks/relationships/connections/useRequestConnection.js.map +1 -0
  45. package/dist/cjs/hooks/relationships/follows/index.d.ts +12 -3
  46. package/dist/cjs/hooks/relationships/follows/index.js +25 -7
  47. package/dist/cjs/hooks/relationships/follows/index.js.map +1 -1
  48. package/dist/cjs/hooks/relationships/follows/useFetchFollowStatus.d.ts +8 -0
  49. package/dist/cjs/hooks/relationships/follows/{useFetchFollow.js → useFetchFollowStatus.js} +5 -5
  50. package/dist/cjs/hooks/relationships/follows/useFetchFollowStatus.js.map +1 -0
  51. package/dist/cjs/hooks/relationships/follows/useFetchFollowers.d.ts +23 -0
  52. package/dist/cjs/hooks/relationships/follows/useFetchFollowers.js +91 -0
  53. package/dist/cjs/hooks/relationships/follows/useFetchFollowers.js.map +1 -0
  54. package/dist/cjs/hooks/relationships/follows/useFetchFollowersByUserId.d.ts +24 -0
  55. package/dist/cjs/hooks/relationships/follows/useFetchFollowersByUserId.js +70 -0
  56. package/dist/cjs/hooks/relationships/follows/useFetchFollowersByUserId.js.map +1 -0
  57. package/dist/cjs/hooks/relationships/follows/useFetchFollowersCount.d.ts +4 -0
  58. package/dist/cjs/hooks/relationships/follows/useFetchFollowersCount.js +72 -0
  59. package/dist/cjs/hooks/relationships/follows/useFetchFollowersCount.js.map +1 -0
  60. package/dist/cjs/hooks/relationships/follows/useFetchFollowersCountByUserId.d.ts +6 -0
  61. package/dist/cjs/hooks/{users/useFetchUserFollowersCount.js → relationships/follows/useFetchFollowersCountByUserId.js} +9 -10
  62. package/dist/cjs/hooks/relationships/follows/useFetchFollowersCountByUserId.js.map +1 -0
  63. package/dist/cjs/hooks/relationships/follows/useFetchFollowing.d.ts +23 -0
  64. package/dist/cjs/hooks/relationships/follows/useFetchFollowing.js +94 -0
  65. package/dist/cjs/hooks/relationships/follows/useFetchFollowing.js.map +1 -0
  66. package/dist/cjs/hooks/relationships/follows/useFetchFollowingByUserId.d.ts +24 -0
  67. package/dist/cjs/hooks/relationships/follows/useFetchFollowingByUserId.js +75 -0
  68. package/dist/cjs/hooks/relationships/follows/useFetchFollowingByUserId.js.map +1 -0
  69. package/dist/cjs/hooks/relationships/follows/useFetchFollowingCount.d.ts +4 -0
  70. package/dist/cjs/hooks/relationships/follows/useFetchFollowingCount.js +72 -0
  71. package/dist/cjs/hooks/relationships/follows/useFetchFollowingCount.js.map +1 -0
  72. package/dist/cjs/hooks/relationships/follows/useFetchFollowingCountByUserId.d.ts +6 -0
  73. package/dist/cjs/hooks/{users/useFetchUserFollowingCount.js → relationships/follows/useFetchFollowingCountByUserId.js} +9 -10
  74. package/dist/cjs/hooks/relationships/follows/useFetchFollowingCountByUserId.js.map +1 -0
  75. package/dist/cjs/hooks/relationships/follows/useFollowManager.js +8 -8
  76. package/dist/cjs/hooks/relationships/follows/useFollowManager.js.map +1 -1
  77. package/dist/cjs/hooks/relationships/follows/useUnfollowByFollowId.d.ts +4 -0
  78. package/dist/cjs/hooks/relationships/follows/useUnfollowByFollowId.js +78 -0
  79. package/dist/cjs/hooks/relationships/follows/useUnfollowByFollowId.js.map +1 -0
  80. package/dist/cjs/hooks/relationships/follows/useUnfollowUserByUserId.d.ts +4 -0
  81. package/dist/cjs/hooks/relationships/follows/{useUnfollowUser.js → useUnfollowUserByUserId.js} +5 -5
  82. package/dist/cjs/hooks/relationships/follows/useUnfollowUserByUserId.js.map +1 -0
  83. package/dist/cjs/hooks/useStableObject.d.ts +11 -0
  84. package/dist/cjs/hooks/useStableObject.js +26 -0
  85. package/dist/cjs/hooks/useStableObject.js.map +1 -0
  86. package/dist/cjs/hooks/users/index.d.ts +0 -2
  87. package/dist/cjs/hooks/users/index.js +1 -5
  88. package/dist/cjs/hooks/users/index.js.map +1 -1
  89. package/dist/cjs/hooks/users/useUpdateUser.d.ts +1 -2
  90. package/dist/cjs/hooks/users/useUpdateUser.js +7 -2
  91. package/dist/cjs/hooks/users/useUpdateUser.js.map +1 -1
  92. package/dist/cjs/index.d.ts +4 -2
  93. package/dist/cjs/index.js +28 -6
  94. package/dist/cjs/index.js.map +1 -1
  95. package/dist/cjs/interfaces/models/AppNotification.d.ts +26 -2
  96. package/dist/cjs/interfaces/models/Connection.d.ts +88 -0
  97. package/dist/cjs/interfaces/models/Connection.js +3 -0
  98. package/dist/cjs/interfaces/models/Connection.js.map +1 -0
  99. package/dist/cjs/interfaces/models/Follow.d.ts +2 -0
  100. package/dist/cjs/utils/objectComparison.d.ts +8 -0
  101. package/dist/cjs/utils/objectComparison.js +63 -0
  102. package/dist/cjs/utils/objectComparison.js.map +1 -0
  103. package/dist/esm/hooks/comments/useCommentSectionData.js +4 -1
  104. package/dist/esm/hooks/comments/useCommentSectionData.js.map +1 -1
  105. package/dist/esm/hooks/relationships/connections/index.d.ts +13 -0
  106. package/dist/esm/hooks/relationships/connections/index.js +14 -0
  107. package/dist/esm/hooks/relationships/connections/index.js.map +1 -0
  108. package/dist/esm/hooks/relationships/connections/useAcceptConnection.d.ts +5 -0
  109. package/dist/esm/hooks/relationships/connections/useAcceptConnection.js +71 -0
  110. package/dist/esm/hooks/relationships/connections/useAcceptConnection.js.map +1 -0
  111. package/dist/esm/hooks/relationships/connections/useConnectionManager.d.ts +26 -0
  112. package/dist/esm/hooks/relationships/connections/useConnectionManager.js +337 -0
  113. package/dist/esm/hooks/relationships/connections/useConnectionManager.js.map +1 -0
  114. package/dist/esm/hooks/relationships/connections/useDeclineConnection.d.ts +5 -0
  115. package/dist/esm/hooks/relationships/connections/useDeclineConnection.js +71 -0
  116. package/dist/esm/hooks/relationships/connections/useDeclineConnection.js.map +1 -0
  117. package/dist/esm/hooks/relationships/connections/useFetchConnectionStatus.d.ts +5 -0
  118. package/dist/esm/hooks/relationships/connections/useFetchConnectionStatus.js +74 -0
  119. package/dist/esm/hooks/relationships/connections/useFetchConnectionStatus.js.map +1 -0
  120. package/dist/esm/hooks/relationships/connections/useFetchConnections.d.ts +7 -0
  121. package/dist/esm/hooks/relationships/connections/useFetchConnections.js +90 -0
  122. package/dist/esm/hooks/relationships/connections/useFetchConnections.js.map +1 -0
  123. package/dist/esm/hooks/relationships/connections/useFetchConnectionsByUserId.d.ts +8 -0
  124. package/dist/esm/hooks/relationships/connections/useFetchConnectionsByUserId.js +70 -0
  125. package/dist/esm/hooks/relationships/connections/useFetchConnectionsByUserId.js.map +1 -0
  126. package/dist/esm/hooks/relationships/connections/useFetchConnectionsCount.d.ts +3 -0
  127. package/dist/esm/hooks/relationships/connections/useFetchConnectionsCount.js +67 -0
  128. package/dist/esm/hooks/relationships/connections/useFetchConnectionsCount.js.map +1 -0
  129. package/dist/esm/hooks/relationships/connections/useFetchConnectionsCountByUserId.d.ts +6 -0
  130. package/dist/esm/hooks/relationships/connections/useFetchConnectionsCountByUserId.js +65 -0
  131. package/dist/esm/hooks/relationships/connections/useFetchConnectionsCountByUserId.js.map +1 -0
  132. package/dist/esm/hooks/relationships/connections/useFetchReceivedPendingConnections.d.ts +7 -0
  133. package/dist/esm/hooks/relationships/connections/useFetchReceivedPendingConnections.js +90 -0
  134. package/dist/esm/hooks/relationships/connections/useFetchReceivedPendingConnections.js.map +1 -0
  135. package/dist/esm/hooks/relationships/connections/useFetchSentPendingConnections.d.ts +7 -0
  136. package/dist/esm/hooks/relationships/connections/useFetchSentPendingConnections.js +90 -0
  137. package/dist/esm/hooks/relationships/connections/useFetchSentPendingConnections.js.map +1 -0
  138. package/dist/esm/hooks/relationships/connections/useRemoveConnection.d.ts +5 -0
  139. package/dist/esm/hooks/relationships/connections/useRemoveConnection.js +71 -0
  140. package/dist/esm/hooks/relationships/connections/useRemoveConnection.js.map +1 -0
  141. package/dist/esm/hooks/relationships/connections/useRemoveConnectionByUserId.d.ts +5 -0
  142. package/dist/esm/hooks/relationships/connections/useRemoveConnectionByUserId.js +74 -0
  143. package/dist/esm/hooks/relationships/connections/useRemoveConnectionByUserId.js.map +1 -0
  144. package/dist/esm/hooks/relationships/connections/useRequestConnection.d.ts +3 -0
  145. package/dist/esm/hooks/relationships/connections/useRequestConnection.js +66 -0
  146. package/dist/esm/hooks/relationships/connections/useRequestConnection.js.map +1 -0
  147. package/dist/esm/hooks/relationships/follows/index.d.ts +12 -3
  148. package/dist/esm/hooks/relationships/follows/index.js +12 -3
  149. package/dist/esm/hooks/relationships/follows/index.js.map +1 -1
  150. package/dist/esm/hooks/relationships/follows/useFetchFollowStatus.d.ts +8 -0
  151. package/dist/esm/hooks/relationships/follows/{useFetchFollow.js → useFetchFollowStatus.js} +5 -5
  152. package/dist/esm/hooks/relationships/follows/useFetchFollowStatus.js.map +1 -0
  153. package/dist/esm/hooks/relationships/follows/useFetchFollowers.d.ts +23 -0
  154. package/dist/esm/hooks/relationships/follows/useFetchFollowers.js +86 -0
  155. package/dist/esm/hooks/relationships/follows/useFetchFollowers.js.map +1 -0
  156. package/dist/esm/hooks/relationships/follows/useFetchFollowersByUserId.d.ts +24 -0
  157. package/dist/esm/hooks/relationships/follows/useFetchFollowersByUserId.js +65 -0
  158. package/dist/esm/hooks/relationships/follows/useFetchFollowersByUserId.js.map +1 -0
  159. package/dist/esm/hooks/relationships/follows/useFetchFollowersCount.d.ts +4 -0
  160. package/dist/esm/hooks/relationships/follows/useFetchFollowersCount.js +67 -0
  161. package/dist/esm/hooks/relationships/follows/useFetchFollowersCount.js.map +1 -0
  162. package/dist/esm/hooks/relationships/follows/useFetchFollowersCountByUserId.d.ts +6 -0
  163. package/dist/esm/hooks/{users/useFetchUserFollowersCount.js → relationships/follows/useFetchFollowersCountByUserId.js} +8 -9
  164. package/dist/esm/hooks/relationships/follows/useFetchFollowersCountByUserId.js.map +1 -0
  165. package/dist/esm/hooks/relationships/follows/useFetchFollowing.d.ts +23 -0
  166. package/dist/esm/hooks/relationships/follows/useFetchFollowing.js +89 -0
  167. package/dist/esm/hooks/relationships/follows/useFetchFollowing.js.map +1 -0
  168. package/dist/esm/hooks/relationships/follows/useFetchFollowingByUserId.d.ts +24 -0
  169. package/dist/esm/hooks/relationships/follows/useFetchFollowingByUserId.js +70 -0
  170. package/dist/esm/hooks/relationships/follows/useFetchFollowingByUserId.js.map +1 -0
  171. package/dist/esm/hooks/relationships/follows/useFetchFollowingCount.d.ts +4 -0
  172. package/dist/esm/hooks/relationships/follows/useFetchFollowingCount.js +67 -0
  173. package/dist/esm/hooks/relationships/follows/useFetchFollowingCount.js.map +1 -0
  174. package/dist/esm/hooks/relationships/follows/useFetchFollowingCountByUserId.d.ts +6 -0
  175. package/dist/esm/hooks/{users/useFetchUserFollowingCount.js → relationships/follows/useFetchFollowingCountByUserId.js} +8 -9
  176. package/dist/esm/hooks/relationships/follows/useFetchFollowingCountByUserId.js.map +1 -0
  177. package/dist/esm/hooks/relationships/follows/useFollowManager.js +8 -8
  178. package/dist/esm/hooks/relationships/follows/useFollowManager.js.map +1 -1
  179. package/dist/esm/hooks/relationships/follows/useUnfollowByFollowId.d.ts +4 -0
  180. package/dist/esm/hooks/relationships/follows/useUnfollowByFollowId.js +73 -0
  181. package/dist/esm/hooks/relationships/follows/useUnfollowByFollowId.js.map +1 -0
  182. package/dist/esm/hooks/relationships/follows/useUnfollowUserByUserId.d.ts +4 -0
  183. package/dist/esm/hooks/relationships/follows/{useUnfollowUser.js → useUnfollowUserByUserId.js} +5 -5
  184. package/dist/esm/hooks/relationships/follows/useUnfollowUserByUserId.js.map +1 -0
  185. package/dist/esm/hooks/useStableObject.d.ts +11 -0
  186. package/dist/esm/hooks/useStableObject.js +23 -0
  187. package/dist/esm/hooks/useStableObject.js.map +1 -0
  188. package/dist/esm/hooks/users/index.d.ts +0 -2
  189. package/dist/esm/hooks/users/index.js +0 -2
  190. package/dist/esm/hooks/users/index.js.map +1 -1
  191. package/dist/esm/hooks/users/useUpdateUser.d.ts +1 -2
  192. package/dist/esm/hooks/users/useUpdateUser.js +7 -2
  193. package/dist/esm/hooks/users/useUpdateUser.js.map +1 -1
  194. package/dist/esm/index.d.ts +4 -2
  195. package/dist/esm/index.js +4 -2
  196. package/dist/esm/index.js.map +1 -1
  197. package/dist/esm/interfaces/models/AppNotification.d.ts +26 -2
  198. package/dist/esm/interfaces/models/Connection.d.ts +88 -0
  199. package/dist/esm/interfaces/models/Connection.js +2 -0
  200. package/dist/esm/interfaces/models/Connection.js.map +1 -0
  201. package/dist/esm/interfaces/models/Follow.d.ts +2 -0
  202. package/dist/esm/utils/objectComparison.d.ts +8 -0
  203. package/dist/esm/utils/objectComparison.js +59 -0
  204. package/dist/esm/utils/objectComparison.js.map +1 -0
  205. package/package.json +1 -1
  206. package/dist/cjs/hooks/relationships/follows/useFetchFollow.d.ts +0 -6
  207. package/dist/cjs/hooks/relationships/follows/useFetchFollow.js.map +0 -1
  208. package/dist/cjs/hooks/relationships/follows/useUnfollowUser.d.ts +0 -4
  209. package/dist/cjs/hooks/relationships/follows/useUnfollowUser.js.map +0 -1
  210. package/dist/cjs/hooks/users/useFetchUserFollowersCount.d.ts +0 -6
  211. package/dist/cjs/hooks/users/useFetchUserFollowersCount.js.map +0 -1
  212. package/dist/cjs/hooks/users/useFetchUserFollowingCount.d.ts +0 -6
  213. package/dist/cjs/hooks/users/useFetchUserFollowingCount.js.map +0 -1
  214. package/dist/esm/hooks/relationships/follows/useFetchFollow.d.ts +0 -6
  215. package/dist/esm/hooks/relationships/follows/useFetchFollow.js.map +0 -1
  216. package/dist/esm/hooks/relationships/follows/useUnfollowUser.d.ts +0 -4
  217. package/dist/esm/hooks/relationships/follows/useUnfollowUser.js.map +0 -1
  218. package/dist/esm/hooks/users/useFetchUserFollowersCount.d.ts +0 -6
  219. package/dist/esm/hooks/users/useFetchUserFollowersCount.js.map +0 -1
  220. package/dist/esm/hooks/users/useFetchUserFollowingCount.d.ts +0 -6
  221. package/dist/esm/hooks/users/useFetchUserFollowingCount.js.map +0 -1
@@ -0,0 +1,73 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ var __generator = (this && this.__generator) || function (thisArg, body) {
11
+ 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);
12
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
+ function verb(n) { return function (v) { return step([n, v]); }; }
14
+ function step(op) {
15
+ if (f) throw new TypeError("Generator is already executing.");
16
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
+ 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;
18
+ if (y = 0, t) op = [op[0] & 2, t.value];
19
+ switch (op[0]) {
20
+ case 0: case 1: t = op; break;
21
+ case 4: _.label++; return { value: op[1], done: false };
22
+ case 5: _.label++; y = op[1]; op = [0]; continue;
23
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
+ default:
25
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
+ if (t[2]) _.ops.pop();
30
+ _.trys.pop(); continue;
31
+ }
32
+ op = body.call(thisArg, _);
33
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
+ }
36
+ };
37
+ import { useCallback } from "react";
38
+ import useAxiosPrivate from "../../../config/useAxiosPrivate";
39
+ import useProject from "../../projects/useProject";
40
+ import { useUser } from "../../user";
41
+ function useUnfollowByFollowId() {
42
+ var _this = this;
43
+ var axios = useAxiosPrivate();
44
+ var projectId = useProject().projectId;
45
+ var user = useUser().user;
46
+ var unfollowByFollowId = useCallback(function (props) { return __awaiter(_this, void 0, void 0, function () {
47
+ var followId;
48
+ return __generator(this, function (_a) {
49
+ switch (_a.label) {
50
+ case 0:
51
+ followId = props.followId;
52
+ if (!projectId) {
53
+ throw new Error("No project specified");
54
+ }
55
+ if (!user) {
56
+ throw new Error("No user is logged in");
57
+ }
58
+ if (!followId) {
59
+ throw new Error("No follow ID was provided");
60
+ }
61
+ return [4 /*yield*/, axios.delete("/".concat(projectId, "/follows/").concat(followId), {
62
+ withCredentials: true,
63
+ })];
64
+ case 1:
65
+ _a.sent();
66
+ return [2 /*return*/];
67
+ }
68
+ });
69
+ }); }, [axios, projectId, user]);
70
+ return unfollowByFollowId;
71
+ }
72
+ export default useUnfollowByFollowId;
73
+ //# sourceMappingURL=useUnfollowByFollowId.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useUnfollowByFollowId.js","sourceRoot":"","sources":["../../../../../src/hooks/relationships/follows/useUnfollowByFollowId.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,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,SAAS,qBAAqB;IAA9B,iBA4BC;IA3BC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IACxB,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAC3B,IAAA,IAAI,GAAK,OAAO,EAAE,KAAd,CAAe;IAE3B,IAAM,kBAAkB,GAAG,WAAW,CACpC,UAAO,KAA2B;;;;;oBACxB,QAAQ,GAAK,KAAK,SAAV,CAAW;oBAC3B,IAAI,CAAC,SAAS,EAAE,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,QAAQ,EAAE,CAAC;wBACd,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;oBAC/C,CAAC;oBAED,qBAAM,KAAK,CAAC,MAAM,CAAC,WAAI,SAAS,sBAAY,QAAQ,CAAE,EAAE;4BACtD,eAAe,EAAE,IAAI;yBACtB,CAAC,EAAA;;oBAFF,SAEE,CAAC;;;;SACJ,EACD,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,CACzB,CAAC;IAEF,OAAO,kBAAkB,CAAC;AAC5B,CAAC;AAED,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,4 @@
1
+ declare function useUnfollowUserByUserId(): (props: {
2
+ userId: string;
3
+ }) => Promise<void>;
4
+ export default useUnfollowUserByUserId;
@@ -38,12 +38,12 @@ import { useCallback } from "react";
38
38
  import useAxiosPrivate from "../../../config/useAxiosPrivate";
39
39
  import useProject from "../../projects/useProject";
40
40
  import { useUser } from "../../user";
41
- function useUnfollowUser() {
41
+ function useUnfollowUserByUserId() {
42
42
  var _this = this;
43
43
  var axios = useAxiosPrivate();
44
44
  var projectId = useProject().projectId;
45
45
  var user = useUser().user;
46
- var unfollowUser = useCallback(function (props) { return __awaiter(_this, void 0, void 0, function () {
46
+ var unfollowUserByUserId = useCallback(function (props) { return __awaiter(_this, void 0, void 0, function () {
47
47
  var userId;
48
48
  return __generator(this, function (_a) {
49
49
  switch (_a.label) {
@@ -70,7 +70,7 @@ function useUnfollowUser() {
70
70
  }
71
71
  });
72
72
  }); }, [axios, projectId, user]);
73
- return unfollowUser;
73
+ return unfollowUserByUserId;
74
74
  }
75
- export default useUnfollowUser;
76
- //# sourceMappingURL=useUnfollowUser.js.map
75
+ export default useUnfollowUserByUserId;
76
+ //# sourceMappingURL=useUnfollowUserByUserId.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useUnfollowUserByUserId.js","sourceRoot":"","sources":["../../../../../src/hooks/relationships/follows/useUnfollowUserByUserId.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,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,SAAS,uBAAuB;IAAhC,iBAgCC;IA/BC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IACxB,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAC3B,IAAA,IAAI,GAAK,OAAO,EAAE,KAAd,CAAe;IAE3B,IAAM,oBAAoB,GAAG,WAAW,CACtC,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,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,iCAAiC,CAAC,CAAC;oBACrD,CAAC;oBAED,qBAAM,KAAK,CAAC,MAAM,CAAC,WAAI,SAAS,oBAAU,MAAM,YAAS,EAAE;4BACzD,eAAe,EAAE,IAAI;yBACtB,CAAC,EAAA;;oBAFF,SAEE,CAAC;;;;SACJ,EACD,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,CACzB,CAAC;IAEF,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAED,eAAe,uBAAuB,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Hook that returns a stable reference to an object that only changes
3
+ * when the content of the object actually changes (deep comparison).
4
+ *
5
+ * This is useful for preventing unnecessary re-renders when objects are
6
+ * recreated with the same content on every render.
7
+ *
8
+ * @param obj - The object to stabilize
9
+ * @returns A stable reference to the object
10
+ */
11
+ export declare function useStableObject<T extends Record<string, any> | undefined>(obj: T): T;
@@ -0,0 +1,23 @@
1
+ import { useRef } from "react";
2
+ import { deepEqual } from "../utils/objectComparison";
3
+ /**
4
+ * Hook that returns a stable reference to an object that only changes
5
+ * when the content of the object actually changes (deep comparison).
6
+ *
7
+ * This is useful for preventing unnecessary re-renders when objects are
8
+ * recreated with the same content on every render.
9
+ *
10
+ * @param obj - The object to stabilize
11
+ * @returns A stable reference to the object
12
+ */
13
+ export function useStableObject(obj) {
14
+ var ref = useRef(obj);
15
+ // If the new object is deeply equal to the previous one, return the previous reference
16
+ if (deepEqual(ref.current, obj)) {
17
+ return ref.current;
18
+ }
19
+ // Otherwise, update the ref and return the new object
20
+ ref.current = obj;
21
+ return obj;
22
+ }
23
+ //# sourceMappingURL=useStableObject.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useStableObject.js","sourceRoot":"","sources":["../../../src/hooks/useStableObject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAC7B,GAAM;IAEN,IAAM,GAAG,GAAG,MAAM,CAAI,GAAG,CAAC,CAAC;IAE3B,uFAAuF;IACvF,IAAI,SAAS,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE,CAAC;QAChC,OAAO,GAAG,CAAC,OAAO,CAAC;IACrB,CAAC;IAED,sDAAsD;IACtD,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC;IAClB,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -1,7 +1,5 @@
1
1
  export { default as useFetchUser } from "./useFetchUser";
2
2
  export { default as useFetchUserByForeignId } from "./useFetchUserByForeignId";
3
- export { default as useFetchUserFollowersCount } from "./useFetchUserFollowersCount";
4
- export { default as useFetchUserFollowingCount } from "./useFetchUserFollowingCount";
5
3
  export { default as useCheckUsernameAvailability } from "./useCheckUsernameAvailability";
6
4
  export { default as useFetchUserSuggestions } from "./useFetchUserSuggestions";
7
5
  export { default as useMentions } from "./useMentions";
@@ -1,7 +1,5 @@
1
1
  export { default as useFetchUser } from "./useFetchUser";
2
2
  export { default as useFetchUserByForeignId } from "./useFetchUserByForeignId";
3
- export { default as useFetchUserFollowersCount } from "./useFetchUserFollowersCount";
4
- export { default as useFetchUserFollowingCount } from "./useFetchUserFollowingCount";
5
3
  export { default as useCheckUsernameAvailability } from "./useCheckUsernameAvailability";
6
4
  export { default as useFetchUserSuggestions } from "./useFetchUserSuggestions";
7
5
  export { default as useMentions } from "./useMentions";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/users/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/users/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -12,8 +12,7 @@ export type UpdateUserParams = {
12
12
  metadata?: Record<string, any>;
13
13
  secureMetadata?: Record<string, any>;
14
14
  };
15
- declare function useUpdateUser(): ({ userId, update, }: {
16
- userId: string;
15
+ declare function useUpdateUser(): ({ update }: {
17
16
  update: UpdateUserParams;
18
17
  }) => Promise<AuthUser>;
19
18
  export default useUpdateUser;
@@ -37,23 +37,28 @@ 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 useUser from "../user/useUser";
40
41
  function useUpdateUser() {
41
42
  var _this = this;
42
43
  var axios = useAxiosPrivate();
43
44
  var projectId = useProject().projectId;
45
+ var user = useUser().user;
44
46
  var updateUser = useCallback(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
45
47
  var response;
46
- var userId = _b.userId, update = _b.update;
48
+ var update = _b.update;
47
49
  return __generator(this, function (_c) {
48
50
  switch (_c.label) {
49
51
  case 0:
50
52
  if (!projectId) {
51
53
  throw new Error("No project specified");
52
54
  }
55
+ if (!user) {
56
+ throw new Error("No user is logged in.");
57
+ }
53
58
  if (!update || Object.keys(update).length == 0) {
54
59
  console.error("Update object is empty");
55
60
  }
56
- return [4 /*yield*/, axios.patch("/".concat(projectId, "/users/").concat(userId), {
61
+ return [4 /*yield*/, axios.patch("/".concat(projectId, "/users/").concat(user.id), {
57
62
  update: update,
58
63
  }, { withCredentials: true })];
59
64
  case 1:
@@ -1 +1 @@
1
- {"version":3,"file":"useUpdateUser.js","sourceRoot":"","sources":["../../../../src/hooks/users/useUpdateUser.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAiBhD,SAAS,aAAa;IAAtB,iBAkCC;IAjCC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IACxB,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAEnC,IAAM,UAAU,GAAG,WAAW,CAC5B,gEAAO,EAMN;;YALC,MAAM,YAAA,EACN,MAAM,YAAA;;;;oBAKN,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;oBAC1C,CAAC;oBAED,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;wBAC/C,OAAO,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;oBAC1C,CAAC;oBAEgB,qBAAM,KAAK,CAAC,KAAK,CAChC,WAAI,SAAS,oBAAU,MAAM,CAAE,EAC/B;4BACE,MAAM,QAAA;yBACP,EACD,EAAE,eAAe,EAAE,IAAI,EAAE,CAC1B,EAAA;;oBANK,QAAQ,GAAG,SAMhB;oBAED,sBAAO,QAAQ,CAAC,IAAgB,EAAC;;;SAClC,EACD,CAAC,SAAS,EAAE,KAAK,CAAC,CACnB,CAAC;IAEF,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"useUpdateUser.js","sourceRoot":"","sources":["../../../../src/hooks/users/useUpdateUser.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEhD,OAAO,OAAO,MAAM,iBAAiB,CAAC;AAgBtC,SAAS,aAAa;IAAtB,iBAiCC;IAhCC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IACxB,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAC3B,IAAA,IAAI,GAAK,OAAO,EAAE,KAAd,CAAe;IAE3B,IAAM,UAAU,GAAG,WAAW,CAC5B,gEAAO,EAAwC;;YAAtC,MAAM,YAAA;;;;oBACb,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;oBAC1C,CAAC;oBAED,IAAI,CAAC,IAAI,EAAE,CAAC;wBACV,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;oBAC3C,CAAC;oBAED,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;wBAC/C,OAAO,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;oBAC1C,CAAC;oBAEgB,qBAAM,KAAK,CAAC,KAAK,CAChC,WAAI,SAAS,oBAAU,IAAI,CAAC,EAAE,CAAE,EAChC;4BACE,MAAM,QAAA;yBACP,EACD,EAAE,eAAe,EAAE,IAAI,EAAE,CAC1B,EAAA;;oBANK,QAAQ,GAAG,SAMhB;oBAED,sBAAO,QAAQ,CAAC,IAAgB,EAAC;;;SAClC,EACD,CAAC,SAAS,EAAE,KAAK,CAAC,CACnB,CAAC;IAEF,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,eAAe,aAAa,CAAC"}
@@ -16,8 +16,9 @@ export { useLists, useListsActions, useIsEntitySaved, type UseListsProps, type U
16
16
  export { useEntity, useEntityData, useCreateEntity, useDeleteEntity, useDownvoteEntity, useEntityVotes, useFetchEntity, useFetchEntityByForeignId, useFetchEntityByShortId, useIncrementEntityViews, useRemoveEntityDownvote, useRemoveEntityUpvote, useUpdateEntity, useUpvoteEntity, } from "./hooks/entities";
17
17
  export { useEntityList, useEntityListActions, type UseEntityListProps, type UseEntityListValues, type EntityListFilters, type EntityListFetchOptions, } from "./hooks/entity-lists";
18
18
  export { useCommentSection, useCommentSectionData, useCreateComment, useFetchManyComments, useFetchComment, useFetchCommentByForeignId, useReplies, useUpdateComment, useCommentVotes, useDeleteComment, useEntityComments, useProfileComments, } from "./hooks/comments";
19
- export { useFetchUser, useFetchUserByForeignId, useFetchUserFollowersCount, useFetchUserFollowingCount, useCheckUsernameAvailability, useFetchUserSuggestions, useMentions, useUpdateUser, } from "./hooks/users";
20
- export { useFetchFollow, useFollowUser, useUnfollowUser, useFollowManager, } from "./hooks/relationships/follows";
19
+ export { useFetchUser, useFetchUserByForeignId, useCheckUsernameAvailability, useFetchUserSuggestions, useMentions, useUpdateUser, } from "./hooks/users";
20
+ export { useFetchFollowStatus, useFetchFollowers, useFetchFollowersByUserId, useFetchFollowersCount, useFetchFollowersCountByUserId, useFetchFollowing, useFetchFollowingByUserId, useFetchFollowingCount, useFetchFollowingCountByUserId, useFollowManager, useFollowUser, useUnfollowByFollowId, useUnfollowUserByUserId, } from "./hooks/relationships/follows";
21
+ export { useRequestConnection, useAcceptConnection, useDeclineConnection, useRemoveConnection, useFetchConnections, useFetchConnectionStatus, useRemoveConnectionByUserId, useFetchConnectionsCount, useFetchSentPendingConnections, useFetchReceivedPendingConnections, useFetchConnectionsByUserId, useFetchConnectionsCountByUserId, useConnectionManager, } from "./hooks/relationships/connections";
21
22
  export { useCreateReport } from "./hooks/reports";
22
23
  export { useGetMetadata } from "./hooks/utils";
23
24
  export { useUploadFile } from "./hooks/storage";
@@ -31,3 +32,4 @@ export type { Mention } from "./interfaces/models/Mention";
31
32
  export type { CommentsSortByOptions } from "./interfaces/CommentsSortByOptions";
32
33
  export type { EntityListSortByOptions } from "./interfaces/EntityListSortByOptions";
33
34
  export type { TimeFrame } from "./interfaces/TimeFrame";
35
+ export type { Connection, EstablishedConnection, PendingConnection, ConnectionsResponse, PendingConnectionsResponse, PendingConnectionListResponse, ConnectionRequestParams, ConnectionActionResponse, ConnectionWithdrawResponse, ConnectionCountResponse, RemoveConnectionByUserIdResponse, ConnectionStatusResponse, ConnectionStatus, } from "./interfaces/models/Connection";
package/dist/esm/index.js CHANGED
@@ -28,9 +28,11 @@ export { useEntityList, useEntityListActions, } from "./hooks/entity-lists";
28
28
  // -- comments
29
29
  export { useCommentSection, useCommentSectionData, useCreateComment, useFetchManyComments, useFetchComment, useFetchCommentByForeignId, useReplies, useUpdateComment, useCommentVotes, useDeleteComment, useEntityComments, useProfileComments, } from "./hooks/comments";
30
30
  // -- users
31
- export { useFetchUser, useFetchUserByForeignId, useFetchUserFollowersCount, useFetchUserFollowingCount, useCheckUsernameAvailability, useFetchUserSuggestions, useMentions, useUpdateUser, } from "./hooks/users";
31
+ export { useFetchUser, useFetchUserByForeignId, useCheckUsernameAvailability, useFetchUserSuggestions, useMentions, useUpdateUser, } from "./hooks/users";
32
32
  // -- follows
33
- export { useFetchFollow, useFollowUser, useUnfollowUser, useFollowManager, } from "./hooks/relationships/follows";
33
+ export { useFetchFollowStatus, useFetchFollowers, useFetchFollowersByUserId, useFetchFollowersCount, useFetchFollowersCountByUserId, useFetchFollowing, useFetchFollowingByUserId, useFetchFollowingCount, useFetchFollowingCountByUserId, useFollowManager, useFollowUser, useUnfollowByFollowId, useUnfollowUserByUserId, } from "./hooks/relationships/follows";
34
+ // -- connections
35
+ export { useRequestConnection, useAcceptConnection, useDeclineConnection, useRemoveConnection, useFetchConnections, useFetchConnectionStatus, useRemoveConnectionByUserId, useFetchConnectionsCount, useFetchSentPendingConnections, useFetchReceivedPendingConnections, useFetchConnectionsByUserId, useFetchConnectionsCountByUserId, useConnectionManager, } from "./hooks/relationships/connections";
34
36
  // -- reports
35
37
  export { useCreateReport } from "./hooks/reports";
36
38
  // -- 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,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,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;AACzE,OAAO,EACL,aAAa,EACb,YAAY,EACZ,aAAa,EACb,SAAS,GACV,MAAM,aAAa,CAAC;AAErB,YAAY;AACZ,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAG1D,+CAA+C;AAC/C,OAAO,EACL,eAAe,EACf,cAAc,EACd,sBAAsB,GACvB,MAAM,WAAW,CAAC;AAEnB,cAAc;AACd,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE9D,YAAY;AACZ,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,oBAAoB;AACpB,OAAO,EAAE,OAAO,EAAsB,MAAM,cAAc,CAAC;AAE3D,oBAAoB;AACpB,OAAO,EACL,OAAO,EACP,cAAc,GAGf,MAAM,cAAc,CAAC;AAEtB,uBAAuB;AACvB,OAAO,EACL,mBAAmB,EACnB,0BAA0B,GAG3B,MAAM,2BAA2B,CAAC;AAEnC,WAAW;AACX,OAAO,EACL,QAAQ,EACR,eAAe,EACf,gBAAgB,GAGjB,MAAM,eAAe,CAAC;AAEvB,cAAc;AACd,OAAO,EACL,SAAS,EACT,aAAa,EACb,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,yBAAyB,EACzB,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,eAAe,EACf,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAE1B,kBAAkB;AAClB,OAAO,EACL,aAAa,EACb,oBAAoB,GAKrB,MAAM,sBAAsB,CAAC;AAE9B,cAAc;AACd,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,EAChB,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,YAAY,EACZ,uBAAuB,EACvB,0BAA0B,EAC1B,0BAA0B,EAC1B,4BAA4B,EAC5B,uBAAuB,EACvB,WAAW,EACX,aAAa,GACd,MAAM,eAAe,CAAC;AAEvB,aAAa;AACb,OAAO,EACL,cAAc,EACd,aAAa,EACb,eAAe,EACf,gBAAgB,GACjB,MAAM,+BAA+B,CAAC;AAEvC,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"}
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,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,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;AACzE,OAAO,EACL,aAAa,EACb,YAAY,EACZ,aAAa,EACb,SAAS,GACV,MAAM,aAAa,CAAC;AAErB,YAAY;AACZ,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAG1D,+CAA+C;AAC/C,OAAO,EACL,eAAe,EACf,cAAc,EACd,sBAAsB,GACvB,MAAM,WAAW,CAAC;AAEnB,cAAc;AACd,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE9D,YAAY;AACZ,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,oBAAoB;AACpB,OAAO,EAAE,OAAO,EAAsB,MAAM,cAAc,CAAC;AAE3D,oBAAoB;AACpB,OAAO,EACL,OAAO,EACP,cAAc,GAGf,MAAM,cAAc,CAAC;AAEtB,uBAAuB;AACvB,OAAO,EACL,mBAAmB,EACnB,0BAA0B,GAG3B,MAAM,2BAA2B,CAAC;AAEnC,WAAW;AACX,OAAO,EACL,QAAQ,EACR,eAAe,EACf,gBAAgB,GAGjB,MAAM,eAAe,CAAC;AAEvB,cAAc;AACd,OAAO,EACL,SAAS,EACT,aAAa,EACb,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,yBAAyB,EACzB,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,eAAe,EACf,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAE1B,kBAAkB;AAClB,OAAO,EACL,aAAa,EACb,oBAAoB,GAKrB,MAAM,sBAAsB,CAAC;AAE9B,cAAc;AACd,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,EAChB,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,YAAY,EACZ,uBAAuB,EACvB,4BAA4B,EAC5B,uBAAuB,EACvB,WAAW,EACX,aAAa,GACd,MAAM,eAAe,CAAC;AAEvB,aAAa;AACb,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,yBAAyB,EACzB,sBAAsB,EACtB,8BAA8B,EAC9B,iBAAiB,EACjB,yBAAyB,EACzB,sBAAsB,EACtB,8BAA8B,EAC9B,gBAAgB,EAChB,aAAa,EACb,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,+BAA+B,CAAC;AAEvC,iBAAiB;AACjB,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EACxB,2BAA2B,EAC3B,wBAAwB,EACxB,8BAA8B,EAC9B,kCAAkC,EAClC,2BAA2B,EAC3B,gCAAgC,EAChC,oBAAoB,GACrB,MAAM,mCAAmC,CAAC;AAE3C,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"}
@@ -1,4 +1,4 @@
1
- type AppNotificationType = "system" | "entity-comment" | "comment-reply" | "entity-mention" | "comment-mention" | "entity-upvote" | "comment-upvote" | "new-follow";
1
+ type AppNotificationType = "system" | "entity-comment" | "comment-reply" | "entity-mention" | "comment-mention" | "entity-upvote" | "comment-upvote" | "new-follow" | "connection-request" | "connection-accepted";
2
2
  interface BaseAppNotification {
3
3
  id: string;
4
4
  userId: string;
@@ -123,7 +123,29 @@ export interface NewFollowNotification extends BaseAppNotification {
123
123
  initiatorAvatar: string | null | undefined;
124
124
  };
125
125
  }
126
- export type UnifiedAppNotification = SystemNotification | EntityCommentNotification | CommentReplyNotification | EntityMentionNotification | CommentMentionNotification | EntityUpvoteNotification | CommentUpvoteNotification | NewFollowNotification;
126
+ export interface ConnectionRequestNotification extends BaseAppNotification {
127
+ type: "connection-request";
128
+ action: "open-profile";
129
+ metadata: {
130
+ connectionId: string;
131
+ initiatorId: string;
132
+ initiatorName: string | null | undefined;
133
+ initiatorUsername: string | null | undefined;
134
+ initiatorAvatar: string | null | undefined;
135
+ };
136
+ }
137
+ export interface ConnectionAcceptedNotification extends BaseAppNotification {
138
+ type: "connection-accepted";
139
+ action: "open-profile";
140
+ metadata: {
141
+ connectionId: string;
142
+ initiatorId: string;
143
+ initiatorName: string | null | undefined;
144
+ initiatorUsername: string | null | undefined;
145
+ initiatorAvatar: string | null | undefined;
146
+ };
147
+ }
148
+ export type UnifiedAppNotification = SystemNotification | EntityCommentNotification | CommentReplyNotification | EntityMentionNotification | CommentMentionNotification | EntityUpvoteNotification | CommentUpvoteNotification | NewFollowNotification | ConnectionRequestNotification | ConnectionAcceptedNotification;
127
149
  export type NotificationTemplate = {
128
150
  title?: string;
129
151
  content?: string;
@@ -136,6 +158,8 @@ export type NotificationTemplates = {
136
158
  entityUpvote: NotificationTemplate;
137
159
  commentUpvote: NotificationTemplate;
138
160
  newFollow: NotificationTemplate;
161
+ connectionRequest: NotificationTemplate;
162
+ connectionAccepted: NotificationTemplate;
139
163
  };
140
164
  export type PotentiallyPopulatedUnifiedAppNotification = UnifiedAppNotification & {
141
165
  title?: string;
@@ -0,0 +1,88 @@
1
+ import { User } from "./User";
2
+ export interface Connection {
3
+ id: string;
4
+ message?: string;
5
+ createdAt: string;
6
+ }
7
+ export interface EstablishedConnection {
8
+ id: string;
9
+ connectedUser: User;
10
+ connectedAt: string;
11
+ requestedAt: string;
12
+ }
13
+ export interface PendingConnection extends Connection {
14
+ user: User;
15
+ type: "received" | "sent";
16
+ }
17
+ export interface PaginationInfo {
18
+ currentPage: number;
19
+ totalPages: number;
20
+ totalCount: number;
21
+ hasNextPage: boolean;
22
+ hasPreviousPage: boolean;
23
+ limit: number;
24
+ }
25
+ export interface ConnectionsResponse {
26
+ connections: EstablishedConnection[];
27
+ pagination: PaginationInfo;
28
+ }
29
+ export interface PendingConnectionsResponse {
30
+ received: {
31
+ requests: PendingConnection[];
32
+ pagination: PaginationInfo;
33
+ };
34
+ sent: {
35
+ requests: PendingConnection[];
36
+ pagination: PaginationInfo;
37
+ };
38
+ }
39
+ export interface PendingConnectionListResponse {
40
+ requests: PendingConnection[];
41
+ pagination: PaginationInfo;
42
+ }
43
+ export interface ConnectionRequestParams {
44
+ userId: string;
45
+ message?: string;
46
+ }
47
+ export interface ConnectionActionResponse {
48
+ id: string;
49
+ status: string;
50
+ createdAt?: string;
51
+ respondedAt?: string;
52
+ }
53
+ export interface ConnectionWithdrawResponse {
54
+ message: string;
55
+ }
56
+ export interface ConnectionCountResponse {
57
+ count: number;
58
+ }
59
+ export interface RemoveConnectionByUserIdResponse {
60
+ id?: string;
61
+ status?: string;
62
+ respondedAt?: string;
63
+ message?: string;
64
+ action?: "withdraw" | "disconnect" | "decline";
65
+ }
66
+ export interface ConnectionStatusNone {
67
+ status: "none";
68
+ }
69
+ export interface ConnectionStatusPending {
70
+ status: "pending";
71
+ type: "sent" | "received";
72
+ connectionId: string;
73
+ createdAt: string;
74
+ }
75
+ export interface ConnectionStatusConnected {
76
+ status: "connected";
77
+ connectionId: string;
78
+ connectedAt: string;
79
+ requestedAt: string;
80
+ }
81
+ export interface ConnectionStatusDeclined {
82
+ status: "declined";
83
+ type: "sent" | "received";
84
+ connectionId: string;
85
+ respondedAt: string;
86
+ }
87
+ export type ConnectionStatusResponse = ConnectionStatusNone | ConnectionStatusPending | ConnectionStatusConnected | ConnectionStatusDeclined;
88
+ export type ConnectionStatus = "none" | "pending-sent" | "pending-received" | "connected" | "declined-sent" | "declined-received";
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Connection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Connection.js","sourceRoot":"","sources":["../../../../src/interfaces/models/Connection.ts"],"names":[],"mappings":""}
@@ -1,4 +1,6 @@
1
1
  export interface Follow {
2
+ id: string;
3
+ projectId: string;
2
4
  followerId: string;
3
5
  followedId: string;
4
6
  createdAt: Date;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Performs deep equality check for nested objects and arrays
3
+ */
4
+ export declare function deepEqual(obj1: any, obj2: any): boolean;
5
+ /**
6
+ * Performs shallow equality check for objects
7
+ */
8
+ export declare function shallowEqual(obj1: any, obj2: any): boolean;
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Performs deep equality check for nested objects and arrays
3
+ */
4
+ export function deepEqual(obj1, obj2) {
5
+ if (obj1 === obj2) {
6
+ return true;
7
+ }
8
+ if (obj1 == null || obj2 == null) {
9
+ return obj1 === obj2;
10
+ }
11
+ if (typeof obj1 !== typeof obj2) {
12
+ return false;
13
+ }
14
+ if (typeof obj1 !== "object") {
15
+ return obj1 === obj2;
16
+ }
17
+ if (Array.isArray(obj1) !== Array.isArray(obj2)) {
18
+ return false;
19
+ }
20
+ var keys1 = Object.keys(obj1);
21
+ var keys2 = Object.keys(obj2);
22
+ if (keys1.length !== keys2.length) {
23
+ return false;
24
+ }
25
+ for (var _i = 0, keys1_1 = keys1; _i < keys1_1.length; _i++) {
26
+ var key = keys1_1[_i];
27
+ if (!(key in obj2)) {
28
+ return false;
29
+ }
30
+ if (!deepEqual(obj1[key], obj2[key])) {
31
+ return false;
32
+ }
33
+ }
34
+ return true;
35
+ }
36
+ /**
37
+ * Performs shallow equality check for objects
38
+ */
39
+ export function shallowEqual(obj1, obj2) {
40
+ if (obj1 === obj2) {
41
+ return true;
42
+ }
43
+ if (!obj1 || !obj2 || typeof obj1 !== "object" || typeof obj2 !== "object") {
44
+ return false;
45
+ }
46
+ var keys1 = Object.keys(obj1);
47
+ var keys2 = Object.keys(obj2);
48
+ if (keys1.length !== keys2.length) {
49
+ return false;
50
+ }
51
+ for (var _i = 0, keys1_2 = keys1; _i < keys1_2.length; _i++) {
52
+ var key = keys1_2[_i];
53
+ if (!(key in obj2) || obj1[key] !== obj2[key]) {
54
+ return false;
55
+ }
56
+ }
57
+ return true;
58
+ }
59
+ //# sourceMappingURL=objectComparison.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objectComparison.js","sourceRoot":"","sources":["../../../src/utils/objectComparison.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,IAAS,EAAE,IAAS;IAC5C,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QACjC,OAAO,IAAI,KAAK,IAAI,CAAC;IACvB,CAAC;IAED,IAAI,OAAO,IAAI,KAAK,OAAO,IAAI,EAAE,CAAC;QAChC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,OAAO,IAAI,KAAK,IAAI,CAAC;IACvB,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QAChD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChC,IAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEhC,IAAI,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,EAAE,CAAC;QAClC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,KAAkB,UAAK,EAAL,eAAK,EAAL,mBAAK,EAAL,IAAK,EAAE,CAAC;QAArB,IAAM,GAAG,cAAA;QACZ,IAAI,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,EAAE,CAAC;YACnB,OAAO,KAAK,CAAC;QACf,CAAC;QACD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;YACrC,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,IAAS,EAAE,IAAS;IAC/C,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAClB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC3E,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChC,IAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEhC,IAAI,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,EAAE,CAAC;QAClC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,KAAkB,UAAK,EAAL,eAAK,EAAL,mBAAK,EAAL,IAAK,EAAE,CAAC;QAArB,IAAM,GAAG,cAAA;QACZ,IAAI,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YAC9C,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@replyke/core",
3
- "version": "6.0.0-beta.6",
3
+ "version": "6.0.0-beta.9",
4
4
  "private": false,
5
5
  "license": "Apache-2.0",
6
6
  "author": "Replyke, maintained by Yanay Tsabary",
@@ -1,6 +0,0 @@
1
- declare function useFetchFollow(): (props: {
2
- userId: string;
3
- }) => Promise<{
4
- isFollowing: boolean;
5
- }>;
6
- export default useFetchFollow;
@@ -1 +0,0 @@
1
- {"version":3,"file":"useFetchFollow.js","sourceRoot":"","sources":["../../../../../src/hooks/relationships/follows/useFetchFollow.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,oFAA8D;AAC9D,yEAAmD;AACnD,mCAAqC;AAErC,SAAS,cAAc;IAAvB,iBAiCC;IAhCC,IAAM,KAAK,GAAG,IAAA,yBAAe,GAAE,CAAC;IACxB,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IAC3B,IAAA,IAAI,GAAK,IAAA,cAAO,GAAE,KAAd,CAAe;IAE3B,IAAM,WAAW,GAAG,IAAA,mBAAW,EAC7B,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,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,kBAAe,cAAc,CAAC"}
@@ -1,4 +0,0 @@
1
- declare function useUnfollowUser(): (props: {
2
- userId: string;
3
- }) => Promise<void>;
4
- export default useUnfollowUser;
@@ -1 +0,0 @@
1
- {"version":3,"file":"useUnfollowUser.js","sourceRoot":"","sources":["../../../../../src/hooks/relationships/follows/useUnfollowUser.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,oFAA8D;AAC9D,yEAAmD;AACnD,mCAAqC;AAErC,SAAS,eAAe;IAAxB,iBAgCC;IA/BC,IAAM,KAAK,GAAG,IAAA,yBAAe,GAAE,CAAC;IACxB,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IAC3B,IAAA,IAAI,GAAK,IAAA,cAAO,GAAE,KAAd,CAAe;IAE3B,IAAM,YAAY,GAAG,IAAA,mBAAW,EAC9B,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,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,iCAAiC,CAAC,CAAC;oBACrD,CAAC;oBAED,qBAAM,KAAK,CAAC,MAAM,CAAC,WAAI,SAAS,oBAAU,MAAM,YAAS,EAAE;4BACzD,eAAe,EAAE,IAAI;yBACtB,CAAC,EAAA;;oBAFF,SAEE,CAAC;;;;SACJ,EACD,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,CACzB,CAAC;IAEF,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,kBAAe,eAAe,CAAC"}
@@ -1,6 +0,0 @@
1
- declare function useFetchUserFollowersCount(): ({ userId }: {
2
- userId: string;
3
- }) => Promise<{
4
- count: number;
5
- }>;
6
- export default useFetchUserFollowersCount;
@@ -1 +0,0 @@
1
- {"version":3,"file":"useFetchUserFollowersCount.js","sourceRoot":"","sources":["../../../../src/hooks/users/useFetchUserFollowersCount.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,iFAA2D;AAC3D,sEAAgD;AAEhD,SAAS,0BAA0B;IAAnC,iBAwBC;IAvBC,IAAM,KAAK,GAAG,IAAA,yBAAe,GAAE,CAAC;IACxB,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IAEnC,IAAM,uBAAuB,GAAG,IAAA,mBAAW,EACzC,gEAAO,EAA8B;;YAA5B,MAAM,YAAA;;;;oBACb,IAAI,CAAC,MAAM,EAAE,CAAC;wBACZ,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;oBACzC,CAAC;oBAED,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAEgB,qBAAM,KAAK,CAAC,GAAG,CAC9B,WAAI,SAAS,oBAAU,MAAM,qBAAkB,CAChD,EAAA;;oBAFK,QAAQ,GAAG,SAEhB;oBAED,sBAAO,QAAQ,CAAC,IAAyB,EAAC;;;SAC3C,EACD,CAAC,KAAK,EAAE,SAAS,CAAC,CACnB,CAAC;IAEF,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAED,kBAAe,0BAA0B,CAAC"}
@@ -1,6 +0,0 @@
1
- declare function useFetchUserFollowingCount(): ({ userId }: {
2
- userId: string;
3
- }) => Promise<{
4
- count: number;
5
- }>;
6
- export default useFetchUserFollowingCount;
@@ -1 +0,0 @@
1
- {"version":3,"file":"useFetchUserFollowingCount.js","sourceRoot":"","sources":["../../../../src/hooks/users/useFetchUserFollowingCount.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,iFAA2D;AAC3D,sEAAgD;AAEhD,SAAS,0BAA0B;IAAnC,iBAwBC;IAvBC,IAAM,KAAK,GAAG,IAAA,yBAAe,GAAE,CAAC;IACxB,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IAEnC,IAAM,uBAAuB,GAAG,IAAA,mBAAW,EACzC,gEAAO,EAA8B;;YAA5B,MAAM,YAAA;;;;oBACb,IAAI,CAAC,MAAM,EAAE,CAAC;wBACZ,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;oBACzC,CAAC;oBAED,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAEgB,qBAAM,KAAK,CAAC,GAAG,CAC9B,WAAI,SAAS,oBAAU,MAAM,qBAAkB,CAChD,EAAA;;oBAFK,QAAQ,GAAG,SAEhB;oBAED,sBAAO,QAAQ,CAAC,IAAyB,EAAC;;;SAC3C,EACD,CAAC,KAAK,EAAE,SAAS,CAAC,CACnB,CAAC;IAEF,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAED,kBAAe,0BAA0B,CAAC"}
@@ -1,6 +0,0 @@
1
- declare function useFetchFollow(): (props: {
2
- userId: string;
3
- }) => Promise<{
4
- isFollowing: boolean;
5
- }>;
6
- export default useFetchFollow;
@@ -1 +0,0 @@
1
- {"version":3,"file":"useFetchFollow.js","sourceRoot":"","sources":["../../../../../src/hooks/relationships/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,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,SAAS,cAAc;IAAvB,iBAiCC;IAhCC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IACxB,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAC3B,IAAA,IAAI,GAAK,OAAO,EAAE,KAAd,CAAe;IAE3B,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,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"}
@@ -1,4 +0,0 @@
1
- declare function useUnfollowUser(): (props: {
2
- userId: string;
3
- }) => Promise<void>;
4
- export default useUnfollowUser;
@@ -1 +0,0 @@
1
- {"version":3,"file":"useUnfollowUser.js","sourceRoot":"","sources":["../../../../../src/hooks/relationships/follows/useUnfollowUser.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,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,SAAS,eAAe;IAAxB,iBAgCC;IA/BC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IACxB,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAC3B,IAAA,IAAI,GAAK,OAAO,EAAE,KAAd,CAAe;IAE3B,IAAM,YAAY,GAAG,WAAW,CAC9B,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,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,iCAAiC,CAAC,CAAC;oBACrD,CAAC;oBAED,qBAAM,KAAK,CAAC,MAAM,CAAC,WAAI,SAAS,oBAAU,MAAM,YAAS,EAAE;4BACzD,eAAe,EAAE,IAAI;yBACtB,CAAC,EAAA;;oBAFF,SAEE,CAAC;;;;SACJ,EACD,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,CACzB,CAAC;IAEF,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,eAAe,eAAe,CAAC"}
@@ -1,6 +0,0 @@
1
- declare function useFetchUserFollowersCount(): ({ userId }: {
2
- userId: string;
3
- }) => Promise<{
4
- count: number;
5
- }>;
6
- export default useFetchUserFollowersCount;
@@ -1 +0,0 @@
1
- {"version":3,"file":"useFetchUserFollowersCount.js","sourceRoot":"","sources":["../../../../src/hooks/users/useFetchUserFollowersCount.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEhD,SAAS,0BAA0B;IAAnC,iBAwBC;IAvBC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IACxB,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAEnC,IAAM,uBAAuB,GAAG,WAAW,CACzC,gEAAO,EAA8B;;YAA5B,MAAM,YAAA;;;;oBACb,IAAI,CAAC,MAAM,EAAE,CAAC;wBACZ,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;oBACzC,CAAC;oBAED,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAEgB,qBAAM,KAAK,CAAC,GAAG,CAC9B,WAAI,SAAS,oBAAU,MAAM,qBAAkB,CAChD,EAAA;;oBAFK,QAAQ,GAAG,SAEhB;oBAED,sBAAO,QAAQ,CAAC,IAAyB,EAAC;;;SAC3C,EACD,CAAC,KAAK,EAAE,SAAS,CAAC,CACnB,CAAC;IAEF,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAED,eAAe,0BAA0B,CAAC"}
@@ -1,6 +0,0 @@
1
- declare function useFetchUserFollowingCount(): ({ userId }: {
2
- userId: string;
3
- }) => Promise<{
4
- count: number;
5
- }>;
6
- export default useFetchUserFollowingCount;
@@ -1 +0,0 @@
1
- {"version":3,"file":"useFetchUserFollowingCount.js","sourceRoot":"","sources":["../../../../src/hooks/users/useFetchUserFollowingCount.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEhD,SAAS,0BAA0B;IAAnC,iBAwBC;IAvBC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IACxB,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAEnC,IAAM,uBAAuB,GAAG,WAAW,CACzC,gEAAO,EAA8B;;YAA5B,MAAM,YAAA;;;;oBACb,IAAI,CAAC,MAAM,EAAE,CAAC;wBACZ,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;oBACzC,CAAC;oBAED,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAEgB,qBAAM,KAAK,CAAC,GAAG,CAC9B,WAAI,SAAS,oBAAU,MAAM,qBAAkB,CAChD,EAAA;;oBAFK,QAAQ,GAAG,SAEhB;oBAED,sBAAO,QAAQ,CAAC,IAAyB,EAAC;;;SAC3C,EACD,CAAC,KAAK,EAAE,SAAS,CAAC,CACnB,CAAC;IAEF,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAED,eAAe,0BAA0B,CAAC"}