@replyke/core 7.0.0-beta.2 → 7.0.0-beta.21

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 (268) hide show
  1. package/dist/cjs/hooks/auth/useAuth.d.ts +1 -1
  2. package/dist/cjs/hooks/auth/useAuth.js +2 -2
  3. package/dist/cjs/hooks/auth/useAuth.js.map +1 -1
  4. package/dist/cjs/hooks/collections/index.d.ts +4 -0
  5. package/dist/cjs/hooks/collections/index.js +16 -0
  6. package/dist/cjs/hooks/collections/index.js.map +1 -0
  7. package/dist/cjs/hooks/collections/useCollectionEntitiesWrapper.d.ts +21 -0
  8. package/dist/cjs/hooks/collections/useCollectionEntitiesWrapper.js +209 -0
  9. package/dist/cjs/hooks/collections/useCollectionEntitiesWrapper.js.map +1 -0
  10. package/dist/cjs/hooks/collections/useCollections.d.ts +43 -0
  11. package/dist/cjs/hooks/collections/useCollections.js +277 -0
  12. package/dist/cjs/hooks/collections/useCollections.js.map +1 -0
  13. package/dist/cjs/hooks/collections/useCollectionsActions.d.ts +21 -0
  14. package/dist/cjs/hooks/{lists/useListsActions.js → collections/useCollectionsActions.js} +112 -118
  15. package/dist/cjs/hooks/collections/useCollectionsActions.js.map +1 -0
  16. package/dist/cjs/hooks/{lists → collections}/useIsEntitySaved.d.ts +2 -2
  17. package/dist/cjs/hooks/{lists → collections}/useIsEntitySaved.js +3 -3
  18. package/dist/cjs/hooks/collections/useIsEntitySaved.js.map +1 -0
  19. package/dist/cjs/hooks/comments/index.d.ts +2 -1
  20. package/dist/cjs/hooks/comments/index.js +3 -3
  21. package/dist/cjs/hooks/comments/index.js.map +1 -1
  22. package/dist/cjs/hooks/comments/useCommentSectionData.js +24 -11
  23. package/dist/cjs/hooks/comments/useCommentSectionData.js.map +1 -1
  24. package/dist/cjs/hooks/comments/useCommentVotes.d.ts +2 -0
  25. package/dist/cjs/hooks/comments/useCommentVotes.js +7 -0
  26. package/dist/cjs/hooks/comments/useCommentVotes.js.map +1 -1
  27. package/dist/cjs/hooks/comments/useEntityComments.d.ts +2 -1
  28. package/dist/cjs/hooks/comments/useEntityComments.js +2 -1
  29. package/dist/cjs/hooks/comments/useEntityComments.js.map +1 -1
  30. package/dist/cjs/hooks/comments/useFetchComment.d.ts +3 -4
  31. package/dist/cjs/hooks/comments/useFetchComment.js +7 -5
  32. package/dist/cjs/hooks/comments/useFetchComment.js.map +1 -1
  33. package/dist/cjs/hooks/comments/useFetchCommentByForeignId.d.ts +3 -4
  34. package/dist/cjs/hooks/comments/useFetchCommentByForeignId.js +9 -6
  35. package/dist/cjs/hooks/comments/useFetchCommentByForeignId.js.map +1 -1
  36. package/dist/cjs/hooks/comments/useFetchManyComments.d.ts +2 -2
  37. package/dist/cjs/hooks/comments/useFetchManyComments.js +5 -7
  38. package/dist/cjs/hooks/comments/useFetchManyComments.js.map +1 -1
  39. package/dist/cjs/hooks/comments/useFetchManyCommentsWrapper.d.ts +21 -0
  40. package/dist/cjs/hooks/comments/{useProfileComments.js → useFetchManyCommentsWrapper.js} +40 -18
  41. package/dist/cjs/hooks/comments/useFetchManyCommentsWrapper.js.map +1 -0
  42. package/dist/cjs/hooks/comments/useReplies.js +1 -0
  43. package/dist/cjs/hooks/comments/useReplies.js.map +1 -1
  44. package/dist/cjs/hooks/entities/index.d.ts +2 -0
  45. package/dist/cjs/hooks/entities/index.js +3 -1
  46. package/dist/cjs/hooks/entities/index.js.map +1 -1
  47. package/dist/cjs/hooks/entities/useEntityData.js +1 -9
  48. package/dist/cjs/hooks/entities/useEntityData.js.map +1 -1
  49. package/dist/cjs/hooks/entities/useEntityVotes.d.ts +2 -0
  50. package/dist/cjs/hooks/entities/useEntityVotes.js +9 -0
  51. package/dist/cjs/hooks/entities/useEntityVotes.js.map +1 -1
  52. package/dist/cjs/hooks/entities/useFetchManyEntitiesWrapper.d.ts +41 -0
  53. package/dist/cjs/hooks/entities/useFetchManyEntitiesWrapper.js +241 -0
  54. package/dist/cjs/hooks/entities/useFetchManyEntitiesWrapper.js.map +1 -0
  55. package/dist/cjs/hooks/entity-lists/index.d.ts +1 -1
  56. package/dist/cjs/hooks/entity-lists/useEntityList.d.ts +2 -2
  57. package/dist/cjs/hooks/entity-lists/useEntityList.js +45 -17
  58. package/dist/cjs/hooks/entity-lists/useEntityList.js.map +1 -1
  59. package/dist/cjs/hooks/entity-lists/useEntityListActions.d.ts +6 -3
  60. package/dist/cjs/hooks/entity-lists/useEntityListActions.js +3 -0
  61. package/dist/cjs/hooks/entity-lists/useEntityListActions.js.map +1 -1
  62. package/dist/cjs/hooks/space-lists/useSpaceList.js +1 -1
  63. package/dist/cjs/hooks/space-lists/useSpaceList.js.map +1 -1
  64. package/dist/cjs/hooks/spaces/index.d.ts +1 -0
  65. package/dist/cjs/hooks/spaces/index.js +3 -1
  66. package/dist/cjs/hooks/spaces/index.js.map +1 -1
  67. package/dist/cjs/hooks/spaces/useCheckMyMembership.d.ts +5 -0
  68. package/dist/cjs/hooks/spaces/useCheckMyMembership.js +71 -0
  69. package/dist/cjs/hooks/spaces/useCheckMyMembership.js.map +1 -0
  70. package/dist/cjs/hooks/users/index.d.ts +1 -0
  71. package/dist/cjs/hooks/users/index.js +3 -1
  72. package/dist/cjs/hooks/users/index.js.map +1 -1
  73. package/dist/cjs/hooks/users/useFetchUserByUsername.d.ts +5 -0
  74. package/dist/cjs/hooks/users/useFetchUserByUsername.js +72 -0
  75. package/dist/cjs/hooks/users/useFetchUserByUsername.js.map +1 -0
  76. package/dist/cjs/index.d.ts +8 -8
  77. package/dist/cjs/index.js +11 -9
  78. package/dist/cjs/index.js.map +1 -1
  79. package/dist/cjs/interfaces/models/{List.d.ts → Collection.d.ts} +2 -4
  80. package/dist/cjs/interfaces/models/{List.js → Collection.js} +1 -1
  81. package/dist/cjs/interfaces/models/Collection.js.map +1 -0
  82. package/dist/cjs/interfaces/models/Comment.d.ts +5 -1
  83. package/dist/cjs/interfaces/models/Space.d.ts +13 -0
  84. package/dist/cjs/store/api/appNotificationsApi.d.ts +181 -181
  85. package/dist/cjs/store/api/baseApi.d.ts +1 -1
  86. package/dist/cjs/store/api/baseApi.js +2 -1
  87. package/dist/cjs/store/api/baseApi.js.map +1 -1
  88. package/dist/cjs/store/api/collectionsApi.d.ts +4541 -0
  89. package/dist/cjs/store/api/collectionsApi.js +244 -0
  90. package/dist/cjs/store/api/collectionsApi.js.map +1 -0
  91. package/dist/cjs/store/api/entityListsApi.d.ts +111 -110
  92. package/dist/cjs/store/api/entityListsApi.js +13 -8
  93. package/dist/cjs/store/api/entityListsApi.js.map +1 -1
  94. package/dist/cjs/store/api/index.d.ts +1 -1
  95. package/dist/cjs/store/api/index.js +2 -2
  96. package/dist/cjs/store/api/index.js.map +1 -1
  97. package/dist/cjs/store/api/spacesApi.d.ts +950 -950
  98. package/dist/cjs/store/api/userApi.d.ts +3 -3
  99. package/dist/cjs/store/index.d.ts +4 -4
  100. package/dist/cjs/store/rootReducer.d.ts +4 -4
  101. package/dist/cjs/store/rootReducer.js +2 -2
  102. package/dist/cjs/store/rootReducer.js.map +1 -1
  103. package/dist/cjs/store/slices/authSlice.d.ts +1 -3
  104. package/dist/cjs/store/slices/authSlice.js +3 -9
  105. package/dist/cjs/store/slices/authSlice.js.map +1 -1
  106. package/dist/cjs/store/slices/authThunks.js +0 -3
  107. package/dist/cjs/store/slices/authThunks.js.map +1 -1
  108. package/dist/cjs/store/slices/collectionsSlice.d.ts +427 -0
  109. package/dist/cjs/store/slices/collectionsSlice.js +211 -0
  110. package/dist/cjs/store/slices/collectionsSlice.js.map +1 -0
  111. package/dist/cjs/store/slices/entityListsSlice.d.ts +80 -63
  112. package/dist/cjs/store/slices/entityListsSlice.js +45 -21
  113. package/dist/cjs/store/slices/entityListsSlice.js.map +1 -1
  114. package/dist/cjs/store/slices/spaceListsSlice.d.ts +1 -1
  115. package/dist/cjs/utils/env.js +3 -3
  116. package/dist/esm/hooks/auth/useAuth.d.ts +1 -1
  117. package/dist/esm/hooks/auth/useAuth.js +3 -3
  118. package/dist/esm/hooks/auth/useAuth.js.map +1 -1
  119. package/dist/esm/hooks/collections/index.d.ts +4 -0
  120. package/dist/esm/hooks/collections/index.js +6 -0
  121. package/dist/esm/hooks/collections/index.js.map +1 -0
  122. package/dist/esm/hooks/collections/useCollectionEntitiesWrapper.d.ts +21 -0
  123. package/dist/esm/hooks/collections/useCollectionEntitiesWrapper.js +204 -0
  124. package/dist/esm/hooks/collections/useCollectionEntitiesWrapper.js.map +1 -0
  125. package/dist/esm/hooks/collections/useCollections.d.ts +43 -0
  126. package/dist/esm/hooks/collections/useCollections.js +272 -0
  127. package/dist/esm/hooks/collections/useCollections.js.map +1 -0
  128. package/dist/esm/hooks/collections/useCollectionsActions.d.ts +21 -0
  129. package/dist/esm/hooks/{lists/useListsActions.js → collections/useCollectionsActions.js} +103 -109
  130. package/dist/esm/hooks/collections/useCollectionsActions.js.map +1 -0
  131. package/dist/esm/hooks/{lists → collections}/useIsEntitySaved.d.ts +2 -2
  132. package/dist/esm/hooks/{lists → collections}/useIsEntitySaved.js +3 -3
  133. package/dist/esm/hooks/collections/useIsEntitySaved.js.map +1 -0
  134. package/dist/esm/hooks/comments/index.d.ts +2 -1
  135. package/dist/esm/hooks/comments/index.js +1 -1
  136. package/dist/esm/hooks/comments/index.js.map +1 -1
  137. package/dist/esm/hooks/comments/useCommentSectionData.js +24 -11
  138. package/dist/esm/hooks/comments/useCommentSectionData.js.map +1 -1
  139. package/dist/esm/hooks/comments/useCommentVotes.d.ts +2 -0
  140. package/dist/esm/hooks/comments/useCommentVotes.js +7 -0
  141. package/dist/esm/hooks/comments/useCommentVotes.js.map +1 -1
  142. package/dist/esm/hooks/comments/useEntityComments.d.ts +2 -1
  143. package/dist/esm/hooks/comments/useEntityComments.js +2 -1
  144. package/dist/esm/hooks/comments/useEntityComments.js.map +1 -1
  145. package/dist/esm/hooks/comments/useFetchComment.d.ts +3 -4
  146. package/dist/esm/hooks/comments/useFetchComment.js +7 -5
  147. package/dist/esm/hooks/comments/useFetchComment.js.map +1 -1
  148. package/dist/esm/hooks/comments/useFetchCommentByForeignId.d.ts +3 -4
  149. package/dist/esm/hooks/comments/useFetchCommentByForeignId.js +9 -6
  150. package/dist/esm/hooks/comments/useFetchCommentByForeignId.js.map +1 -1
  151. package/dist/esm/hooks/comments/useFetchManyComments.d.ts +2 -2
  152. package/dist/esm/hooks/comments/useFetchManyComments.js +5 -7
  153. package/dist/esm/hooks/comments/useFetchManyComments.js.map +1 -1
  154. package/dist/esm/hooks/comments/useFetchManyCommentsWrapper.d.ts +21 -0
  155. package/dist/esm/hooks/comments/{useProfileComments.js → useFetchManyCommentsWrapper.js} +40 -18
  156. package/dist/esm/hooks/comments/useFetchManyCommentsWrapper.js.map +1 -0
  157. package/dist/esm/hooks/comments/useReplies.js +1 -0
  158. package/dist/esm/hooks/comments/useReplies.js.map +1 -1
  159. package/dist/esm/hooks/entities/index.d.ts +2 -0
  160. package/dist/esm/hooks/entities/index.js +1 -0
  161. package/dist/esm/hooks/entities/index.js.map +1 -1
  162. package/dist/esm/hooks/entities/useEntityData.js +1 -9
  163. package/dist/esm/hooks/entities/useEntityData.js.map +1 -1
  164. package/dist/esm/hooks/entities/useEntityVotes.d.ts +2 -0
  165. package/dist/esm/hooks/entities/useEntityVotes.js +9 -0
  166. package/dist/esm/hooks/entities/useEntityVotes.js.map +1 -1
  167. package/dist/esm/hooks/entities/useFetchManyEntitiesWrapper.d.ts +41 -0
  168. package/dist/esm/hooks/entities/useFetchManyEntitiesWrapper.js +236 -0
  169. package/dist/esm/hooks/entities/useFetchManyEntitiesWrapper.js.map +1 -0
  170. package/dist/esm/hooks/entity-lists/index.d.ts +1 -1
  171. package/dist/esm/hooks/entity-lists/useEntityList.d.ts +2 -2
  172. package/dist/esm/hooks/entity-lists/useEntityList.js +46 -18
  173. package/dist/esm/hooks/entity-lists/useEntityList.js.map +1 -1
  174. package/dist/esm/hooks/entity-lists/useEntityListActions.d.ts +6 -3
  175. package/dist/esm/hooks/entity-lists/useEntityListActions.js +3 -0
  176. package/dist/esm/hooks/entity-lists/useEntityListActions.js.map +1 -1
  177. package/dist/esm/hooks/space-lists/useSpaceList.js +1 -1
  178. package/dist/esm/hooks/space-lists/useSpaceList.js.map +1 -1
  179. package/dist/esm/hooks/spaces/index.d.ts +1 -0
  180. package/dist/esm/hooks/spaces/index.js +1 -0
  181. package/dist/esm/hooks/spaces/index.js.map +1 -1
  182. package/dist/esm/hooks/spaces/useCheckMyMembership.d.ts +5 -0
  183. package/dist/esm/hooks/spaces/useCheckMyMembership.js +66 -0
  184. package/dist/esm/hooks/spaces/useCheckMyMembership.js.map +1 -0
  185. package/dist/esm/hooks/users/index.d.ts +1 -0
  186. package/dist/esm/hooks/users/index.js +1 -0
  187. package/dist/esm/hooks/users/index.js.map +1 -1
  188. package/dist/esm/hooks/users/useFetchUserByUsername.d.ts +5 -0
  189. package/dist/esm/hooks/users/useFetchUserByUsername.js +67 -0
  190. package/dist/esm/hooks/users/useFetchUserByUsername.js.map +1 -0
  191. package/dist/esm/index.d.ts +8 -8
  192. package/dist/esm/index.js +5 -5
  193. package/dist/esm/index.js.map +1 -1
  194. package/dist/esm/interfaces/models/{List.d.ts → Collection.d.ts} +2 -4
  195. package/dist/esm/interfaces/models/Collection.js +2 -0
  196. package/dist/esm/interfaces/models/Collection.js.map +1 -0
  197. package/dist/esm/interfaces/models/Comment.d.ts +5 -1
  198. package/dist/esm/interfaces/models/Space.d.ts +13 -0
  199. package/dist/esm/store/api/appNotificationsApi.d.ts +181 -181
  200. package/dist/esm/store/api/baseApi.d.ts +1 -1
  201. package/dist/esm/store/api/baseApi.js +2 -1
  202. package/dist/esm/store/api/baseApi.js.map +1 -1
  203. package/dist/esm/store/api/collectionsApi.d.ts +4541 -0
  204. package/dist/esm/store/api/collectionsApi.js +241 -0
  205. package/dist/esm/store/api/collectionsApi.js.map +1 -0
  206. package/dist/esm/store/api/entityListsApi.d.ts +111 -110
  207. package/dist/esm/store/api/entityListsApi.js +13 -8
  208. package/dist/esm/store/api/entityListsApi.js.map +1 -1
  209. package/dist/esm/store/api/index.d.ts +1 -1
  210. package/dist/esm/store/api/index.js +2 -2
  211. package/dist/esm/store/api/index.js.map +1 -1
  212. package/dist/esm/store/api/spacesApi.d.ts +950 -950
  213. package/dist/esm/store/api/userApi.d.ts +3 -3
  214. package/dist/esm/store/index.d.ts +4 -4
  215. package/dist/esm/store/rootReducer.d.ts +4 -4
  216. package/dist/esm/store/rootReducer.js +2 -2
  217. package/dist/esm/store/rootReducer.js.map +1 -1
  218. package/dist/esm/store/slices/authSlice.d.ts +1 -3
  219. package/dist/esm/store/slices/authSlice.js +2 -7
  220. package/dist/esm/store/slices/authSlice.js.map +1 -1
  221. package/dist/esm/store/slices/authThunks.js +1 -4
  222. package/dist/esm/store/slices/authThunks.js.map +1 -1
  223. package/dist/esm/store/slices/collectionsSlice.d.ts +427 -0
  224. package/dist/esm/store/slices/collectionsSlice.js +202 -0
  225. package/dist/esm/store/slices/collectionsSlice.js.map +1 -0
  226. package/dist/esm/store/slices/entityListsSlice.d.ts +80 -63
  227. package/dist/esm/store/slices/entityListsSlice.js +44 -20
  228. package/dist/esm/store/slices/entityListsSlice.js.map +1 -1
  229. package/dist/esm/store/slices/spaceListsSlice.d.ts +1 -1
  230. package/dist/esm/utils/env.js +3 -3
  231. package/package.json +1 -1
  232. package/dist/cjs/hooks/comments/useProfileComments.d.ts +0 -18
  233. package/dist/cjs/hooks/comments/useProfileComments.js.map +0 -1
  234. package/dist/cjs/hooks/lists/index.d.ts +0 -3
  235. package/dist/cjs/hooks/lists/index.js +0 -14
  236. package/dist/cjs/hooks/lists/index.js.map +0 -1
  237. package/dist/cjs/hooks/lists/useIsEntitySaved.js.map +0 -1
  238. package/dist/cjs/hooks/lists/useLists.d.ts +0 -36
  239. package/dist/cjs/hooks/lists/useLists.js +0 -239
  240. package/dist/cjs/hooks/lists/useLists.js.map +0 -1
  241. package/dist/cjs/hooks/lists/useListsActions.d.ts +0 -21
  242. package/dist/cjs/hooks/lists/useListsActions.js.map +0 -1
  243. package/dist/cjs/interfaces/models/List.js.map +0 -1
  244. package/dist/cjs/store/api/listsApi.d.ts +0 -3564
  245. package/dist/cjs/store/api/listsApi.js +0 -288
  246. package/dist/cjs/store/api/listsApi.js.map +0 -1
  247. package/dist/cjs/store/slices/listsSlice.d.ts +0 -1911
  248. package/dist/cjs/store/slices/listsSlice.js +0 -211
  249. package/dist/cjs/store/slices/listsSlice.js.map +0 -1
  250. package/dist/esm/hooks/comments/useProfileComments.d.ts +0 -18
  251. package/dist/esm/hooks/comments/useProfileComments.js.map +0 -1
  252. package/dist/esm/hooks/lists/index.d.ts +0 -3
  253. package/dist/esm/hooks/lists/index.js +0 -5
  254. package/dist/esm/hooks/lists/index.js.map +0 -1
  255. package/dist/esm/hooks/lists/useIsEntitySaved.js.map +0 -1
  256. package/dist/esm/hooks/lists/useLists.d.ts +0 -36
  257. package/dist/esm/hooks/lists/useLists.js +0 -234
  258. package/dist/esm/hooks/lists/useLists.js.map +0 -1
  259. package/dist/esm/hooks/lists/useListsActions.d.ts +0 -21
  260. package/dist/esm/hooks/lists/useListsActions.js.map +0 -1
  261. package/dist/esm/interfaces/models/List.js +0 -2
  262. package/dist/esm/interfaces/models/List.js.map +0 -1
  263. package/dist/esm/store/api/listsApi.d.ts +0 -3564
  264. package/dist/esm/store/api/listsApi.js +0 -285
  265. package/dist/esm/store/api/listsApi.js.map +0 -1
  266. package/dist/esm/store/slices/listsSlice.d.ts +0 -1911
  267. package/dist/esm/store/slices/listsSlice.js +0 -202
  268. package/dist/esm/store/slices/listsSlice.js.map +0 -1
@@ -16,6 +16,7 @@ export { default as useJoinSpace } from "./useJoinSpace";
16
16
  export { default as useLeaveSpace } from "./useLeaveSpace";
17
17
  export { default as useFetchSpaceMembers } from "./useFetchSpaceMembers";
18
18
  export { default as useFetchMySpaces } from "./useFetchMySpaces";
19
+ export { default as useCheckMyMembership } from "./useCheckMyMembership";
19
20
  export { default as useUpdateMemberRole } from "./useUpdateMemberRole";
20
21
  export { default as useApproveMember } from "./useApproveMember";
21
22
  export { default as useDeclineMember } from "./useDeclineMember";
@@ -17,6 +17,7 @@ export { default as useJoinSpace } from "./useJoinSpace";
17
17
  export { default as useLeaveSpace } from "./useLeaveSpace";
18
18
  export { default as useFetchSpaceMembers } from "./useFetchSpaceMembers";
19
19
  export { default as useFetchMySpaces } from "./useFetchMySpaces";
20
+ export { default as useCheckMyMembership } from "./useCheckMyMembership";
20
21
  // Member management hooks
21
22
  export { default as useUpdateMemberRole } from "./useUpdateMemberRole";
22
23
  export { default as useApproveMember } from "./useApproveMember";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/index.ts"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGzD,cAAc;AACd,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAErE,aAAa;AACb,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE7D,mBAAmB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E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAErE,aAAa;AACb,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE7D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE7D,mBAAmB;AACnB,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEzE,0BAA0B;AAC1B,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE/D,eAAe;AACf,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { CheckMyMembershipResponse } from "../../interfaces/models/Space";
2
+ declare function useCheckMyMembership(): ({ spaceId }: {
3
+ spaceId: string;
4
+ }) => Promise<CheckMyMembershipResponse>;
5
+ export default useCheckMyMembership;
@@ -0,0 +1,66 @@
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 useProject from "../projects/useProject";
39
+ import useAxiosPrivate from "../../config/useAxiosPrivate";
40
+ function useCheckMyMembership() {
41
+ var _this = this;
42
+ var projectId = useProject().projectId;
43
+ var axios = useAxiosPrivate();
44
+ var checkMyMembership = useCallback(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
45
+ var response;
46
+ var spaceId = _b.spaceId;
47
+ return __generator(this, function (_c) {
48
+ switch (_c.label) {
49
+ case 0:
50
+ if (!projectId) {
51
+ throw new Error("No projectId available.");
52
+ }
53
+ if (!spaceId) {
54
+ throw new Error("Please pass a spaceId");
55
+ }
56
+ return [4 /*yield*/, axios.get("/".concat(projectId, "/spaces/").concat(spaceId, "/membership/me"))];
57
+ case 1:
58
+ response = _c.sent();
59
+ return [2 /*return*/, response.data];
60
+ }
61
+ });
62
+ }); }, [projectId, axios]);
63
+ return checkMyMembership;
64
+ }
65
+ export default useCheckMyMembership;
66
+ //# sourceMappingURL=useCheckMyMembership.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCheckMyMembership.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/useCheckMyMembership.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEhD,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAE3D,SAAS,oBAAoB;IAA7B,iBAwBC;IAvBS,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAEhC,IAAM,iBAAiB,GAAG,WAAW,CACnC,gEAAO,EAAgC;;YAA9B,OAAO,aAAA;;;;oBACd,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAED,IAAI,CAAC,OAAO,EAAE,CAAC;wBACb,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;oBAC3C,CAAC;oBAEgB,qBAAM,KAAK,CAAC,GAAG,CAC9B,WAAI,SAAS,qBAAW,OAAO,mBAAgB,CAChD,EAAA;;oBAFK,QAAQ,GAAG,SAEhB;oBAED,sBAAO,QAAQ,CAAC,IAAI,EAAC;;;SACtB,EACD,CAAC,SAAS,EAAE,KAAK,CAAC,CACnB,CAAC;IAEF,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED,eAAe,oBAAoB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  export { default as useFetchUser } from "./useFetchUser";
2
2
  export { default as useFetchUserByForeignId } from "./useFetchUserByForeignId";
3
+ export { default as useFetchUserByUsername } from "./useFetchUserByUsername";
3
4
  export { default as useCheckUsernameAvailability } from "./useCheckUsernameAvailability";
4
5
  export { default as useFetchUserSuggestions } from "./useFetchUserSuggestions";
5
6
  export { default as useMentions } from "./useMentions";
@@ -1,5 +1,6 @@
1
1
  export { default as useFetchUser } from "./useFetchUser";
2
2
  export { default as useFetchUserByForeignId } from "./useFetchUserByForeignId";
3
+ export { default as useFetchUserByUsername } from "./useFetchUserByUsername";
3
4
  export { default as useCheckUsernameAvailability } from "./useCheckUsernameAvailability";
4
5
  export { default as useFetchUserSuggestions } from "./useFetchUserSuggestions";
5
6
  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,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,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,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"}
@@ -0,0 +1,5 @@
1
+ import { User } from "../../interfaces/models/User";
2
+ declare function useFetchUserByUsername(): ({ username }: {
3
+ username: string;
4
+ }) => Promise<User>;
5
+ export default useFetchUserByUsername;
@@ -0,0 +1,67 @@
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 useProject from "../projects/useProject";
39
+ import axios from "../../config/axios";
40
+ function useFetchUserByUsername() {
41
+ var _this = this;
42
+ var projectId = useProject().projectId;
43
+ var fetchUserByUsername = useCallback(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
44
+ var response;
45
+ var username = _b.username;
46
+ return __generator(this, function (_c) {
47
+ switch (_c.label) {
48
+ case 0:
49
+ if (!projectId) {
50
+ throw new Error("No project specified");
51
+ }
52
+ if (!username) {
53
+ throw new Error("Please specify a username");
54
+ }
55
+ return [4 /*yield*/, axios.get("/".concat(projectId, "/users/by-username"), {
56
+ params: { username: username },
57
+ })];
58
+ case 1:
59
+ response = _c.sent();
60
+ return [2 /*return*/, response.data];
61
+ }
62
+ });
63
+ }); }, [projectId]);
64
+ return fetchUserByUsername;
65
+ }
66
+ export default useFetchUserByUsername;
67
+ //# sourceMappingURL=useFetchUserByUsername.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFetchUserByUsername.js","sourceRoot":"","sources":["../../../../src/hooks/users/useFetchUserByUsername.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,KAAK,MAAM,oBAAoB,CAAC;AAGvC,SAAS,sBAAsB;IAA/B,iBAuBC;IAtBS,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAEnC,IAAM,mBAAmB,GAAG,WAAW,CACrC,gEAAO,EAAkC;;YAAhC,QAAQ,cAAA;;;;oBACf,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,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;oBAEgB,qBAAM,KAAK,CAAC,GAAG,CAAC,WAAI,SAAS,uBAAoB,EAAE;4BAClE,MAAM,EAAE,EAAE,QAAQ,UAAA,EAAE;yBACrB,CAAC,EAAA;;oBAFI,QAAQ,GAAG,SAEf;oBAEF,sBAAO,QAAQ,CAAC,IAAY,EAAC;;;SAC9B,EACD,CAAC,SAAS,CAAC,CACZ,CAAC;IAEF,OAAO,mBAAmB,CAAC;AAC7B,CAAC;AAED,eAAe,sBAAsB,CAAC"}
@@ -12,13 +12,13 @@ export { useSignTestingJwt } from "./hooks/crypto";
12
12
  export { useAuth, type UseAuthValues } from "./hooks/auth";
13
13
  export { useUser, useUserActions, type UseUserProps, type UseUserValues, } from "./hooks/user";
14
14
  export { useAppNotifications, useAppNotificationsActions, type UseAppNotificationsProps, type UseAppNotificationsValues, } from "./hooks/app-notifications";
15
- export { useLists, useListsActions, useIsEntitySaved, type UseListsProps, type UseListsValues, } from "./hooks/lists";
16
- export { useEntity, useEntityData, useCreateEntity, useDeleteEntity, useDownvoteEntity, useEntityVotes, useFetchEntity, useFetchEntityByForeignId, useFetchEntityByShortId, useFetchManyEntities, useIncrementEntityViews, useRemoveEntityDownvote, useRemoveEntityUpvote, useUpdateEntity, useUpvoteEntity, } from "./hooks/entities";
17
- export { useEntityList, useEntityListActions, type UseEntityListProps, type UseEntityListValues, type EntityListFilters, type EntityListFetchOptions, } from "./hooks/entity-lists";
15
+ export { useCollections, useCollectionsActions, useIsEntityInCollection, type UseCollectionsProps, type UseCollectionsValues, } from "./hooks/collections";
16
+ export { useEntity, useEntityData, useCreateEntity, useDeleteEntity, useDownvoteEntity, useEntityVotes, useFetchEntity, useFetchEntityByForeignId, useFetchEntityByShortId, useFetchManyEntities, useIncrementEntityViews, useFetchManyEntitiesWrapper, useRemoveEntityDownvote, useRemoveEntityUpvote, useUpdateEntity, useUpvoteEntity, type UseFetchManyEntitiesWrapperProps, type UseFetchManyEntitiesWrapperValues, } from "./hooks/entities";
17
+ export { useEntityList, useEntityListActions, type UseEntityListProps, type UseEntityListValues, type EntityListFilters, type EntityListSort, type EntityListFetchOptions, } from "./hooks/entity-lists";
18
18
  export { useSpace, useSpaceData, useFetchSpace, useFetchSpaceByShortId, useFetchSpaceBySlug, useFetchSpaceBreadcrumb, useFetchSpaceChildren, useFetchManySpaces, useCheckSlugAvailability, useCreateSpace, useUpdateSpace, useDeleteSpace, useJoinSpace, useLeaveSpace, useFetchSpaceMembers, useFetchMySpaces, useUpdateMemberRole, useApproveMember, useDeclineMember, useRemoveMember, useSpacePermissions, type UseSpaceDataProps, type UseSpaceDataValues, type CreateSpaceProps, type UpdateSpaceProps, } from "./hooks/spaces";
19
19
  export { useSpaceList, useSpaceListActions, type UseSpaceListProps, type UseSpaceListValues, } from "./hooks/space-lists";
20
- export { useCommentSection, useCommentSectionData, useCreateComment, useFetchManyComments, useFetchComment, useFetchCommentByForeignId, useReplies, useUpdateComment, useCommentVotes, useDeleteComment, useEntityComments, useProfileComments, } from "./hooks/comments";
21
- export { useFetchUser, useFetchUserByForeignId, useCheckUsernameAvailability, useFetchUserSuggestions, useMentions, useUpdateUser, } from "./hooks/users";
20
+ export { useCommentSection, useCommentSectionData, useCreateComment, useFetchManyComments, useFetchComment, useFetchCommentByForeignId, useReplies, useUpdateComment, useCommentVotes, useDeleteComment, useEntityComments, useFetchManyCommentsWrapper, type UseFetchManyCommentsWrapperProps, type UseFetchManyCommentsWrapperValues, } from "./hooks/comments";
21
+ export { useFetchUser, useFetchUserByForeignId, useFetchUserByUsername, useCheckUsernameAvailability, useFetchUserSuggestions, useMentions, useUpdateUser, } from "./hooks/users";
22
22
  export { useFetchFollowStatus, useFetchFollowers, useFetchFollowersByUserId, useFetchFollowersCount, useFetchFollowersCountByUserId, useFetchFollowing, useFetchFollowingByUserId, useFetchFollowingCount, useFetchFollowingCountByUserId, useFollowManager, useFollowUser, useUnfollowByFollowId, useUnfollowUserByUserId, } from "./hooks/relationships/follows";
23
23
  export { useRequestConnection, useAcceptConnection, useDeclineConnection, useRemoveConnection, useFetchConnections, useFetchConnectionStatus, useRemoveConnectionByUserId, useFetchConnectionsCount, useFetchSentPendingConnections, useFetchReceivedPendingConnections, useFetchConnectionsByUserId, useFetchConnectionsCountByUserId, useConnectionManager, } from "./hooks/relationships/connections";
24
24
  export { useCreateReport } from "./hooks/reports";
@@ -31,9 +31,9 @@ export type { PaginatedResponse, PaginationMetadata, } from "./interfaces/IPagin
31
31
  export type { EntityCommentsTree } from "./interfaces/EntityCommentsTree";
32
32
  export type { UserFull, User, AuthUser, UserRole, } from "./interfaces/models/User";
33
33
  export * as AppNotification from "./interfaces/models/AppNotification";
34
- export type { Entity } from "./interfaces/models/Entity";
35
- export type { List } from "./interfaces/models/List";
36
- export type { Comment, GifData } from "./interfaces/models/Comment";
34
+ export type { Entity, EntityInclude, EntityIncludeArray, EntityIncludeParam, } from "./interfaces/models/Entity";
35
+ export type { Collection } from "./interfaces/models/Collection";
36
+ export type { Comment, GifData, CommentInclude, CommentIncludeArray, CommentIncludeParam, } from "./interfaces/models/Comment";
37
37
  export type { Mention } from "./interfaces/models/Mention";
38
38
  export type { Space, SpaceDetailed, SpacePreview, SpaceMemberPermissions, ReadingPermission, PostingPermission, PaginationMeta, MySpaceItem, MySpacesResponse, JoinSpaceResponse, LeaveSpaceResponse, UpdateMemberRoleResponse, ApproveMemberResponse, DeclineMemberResponse, DeleteSpaceResponse, } from "./interfaces/models/Space";
39
39
  export type { SpaceMember, SpaceMemberRole, SpaceMemberStatus, SpaceMemberWithUser, SpaceMembersResponse, } from "./interfaces/models/SpaceMember";
package/dist/esm/index.js CHANGED
@@ -19,10 +19,10 @@ export { useAuth } from "./hooks/auth";
19
19
  export { useUser, useUserActions, } from "./hooks/user";
20
20
  // -- app notifications
21
21
  export { useAppNotifications, useAppNotificationsActions, } from "./hooks/app-notifications";
22
- // -- lists
23
- export { useLists, useListsActions, useIsEntitySaved, } from "./hooks/lists";
22
+ // -- collections
23
+ export { useCollections, useCollectionsActions, useIsEntityInCollection, } from "./hooks/collections";
24
24
  // -- entities
25
- export { useEntity, useEntityData, useCreateEntity, useDeleteEntity, useDownvoteEntity, useEntityVotes, useFetchEntity, useFetchEntityByForeignId, useFetchEntityByShortId, useFetchManyEntities, useIncrementEntityViews, useRemoveEntityDownvote, useRemoveEntityUpvote, useUpdateEntity, useUpvoteEntity, } from "./hooks/entities";
25
+ export { useEntity, useEntityData, useCreateEntity, useDeleteEntity, useDownvoteEntity, useEntityVotes, useFetchEntity, useFetchEntityByForeignId, useFetchEntityByShortId, useFetchManyEntities, useIncrementEntityViews, useFetchManyEntitiesWrapper, useRemoveEntityDownvote, useRemoveEntityUpvote, useUpdateEntity, useUpvoteEntity, } from "./hooks/entities";
26
26
  // -- entity lists
27
27
  export { useEntityList, useEntityListActions, } from "./hooks/entity-lists";
28
28
  // -- spaces
@@ -30,9 +30,9 @@ export { useSpace, useSpaceData, useFetchSpace, useFetchSpaceByShortId, useFetch
30
30
  // -- space lists
31
31
  export { useSpaceList, useSpaceListActions, } from "./hooks/space-lists";
32
32
  // -- comments
33
- export { useCommentSection, useCommentSectionData, useCreateComment, useFetchManyComments, useFetchComment, useFetchCommentByForeignId, useReplies, useUpdateComment, useCommentVotes, useDeleteComment, useEntityComments, useProfileComments, } from "./hooks/comments";
33
+ export { useCommentSection, useCommentSectionData, useCreateComment, useFetchManyComments, useFetchComment, useFetchCommentByForeignId, useReplies, useUpdateComment, useCommentVotes, useDeleteComment, useEntityComments, useFetchManyCommentsWrapper, } from "./hooks/comments";
34
34
  // -- users
35
- export { useFetchUser, useFetchUserByForeignId, useCheckUsernameAvailability, useFetchUserSuggestions, useMentions, useUpdateUser, } from "./hooks/users";
35
+ export { useFetchUser, useFetchUserByForeignId, useFetchUserByUsername, useCheckUsernameAvailability, useFetchUserSuggestions, useMentions, useUpdateUser, } from "./hooks/users";
36
36
  // -- follows
37
37
  export { useFetchFollowStatus, useFetchFollowers, useFetchFollowersByUserId, useFetchFollowersCount, useFetchFollowersCountByUserId, useFetchFollowing, useFetchFollowingByUserId, useFetchFollowingCount, useFetchFollowingCountByUserId, useFollowManager, useFollowUser, useUnfollowByFollowId, useUnfollowUserByUserId, } from "./hooks/relationships/follows";
38
38
  // -- connections
@@ -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,EACtB,aAAa,GACd,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,E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AC5B,gBAAgB,GACjB,MAAM,sCAAsC,CAAC"}
@@ -1,12 +1,10 @@
1
- import { Entity } from "./Entity";
2
- export interface List {
1
+ export interface Collection {
3
2
  id: string;
4
3
  projectId: string;
5
4
  userId: string;
6
5
  parentId: string | null;
7
6
  name: string;
8
- entityIds: string[];
9
- entities: Partial<Entity>[];
7
+ entityCount?: number;
10
8
  createdAt: Date;
11
9
  updatedAt: Date;
12
10
  }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Collection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Collection.js","sourceRoot":"","sources":["../../../../src/interfaces/models/Collection.ts"],"names":[],"mappings":""}
@@ -16,8 +16,9 @@ export interface Comment {
16
16
  entityId: string;
17
17
  entity?: Entity;
18
18
  userId: string;
19
- user: User;
19
+ user?: User;
20
20
  parentId: string | null;
21
+ parentComment?: Comment;
21
22
  content: string | null;
22
23
  gif: GifData | null;
23
24
  mentions: Mention[];
@@ -30,3 +31,6 @@ export interface Comment {
30
31
  deletedAt: Date | null;
31
32
  parentDeletedAt: Date | null;
32
33
  }
34
+ export type CommentInclude = "user" | "entity" | "space" | "parent";
35
+ export type CommentIncludeArray = CommentInclude[];
36
+ export type CommentIncludeParam = CommentInclude | CommentIncludeArray;
@@ -100,6 +100,19 @@ export interface DeclineMemberResponse {
100
100
  status: "rejected";
101
101
  };
102
102
  }
103
+ export interface CheckMyMembershipResponse {
104
+ isMember: boolean;
105
+ role: "admin" | "moderator" | "member" | null;
106
+ status: "pending" | "active" | "banned" | "rejected" | null;
107
+ joinedAt: Date | null;
108
+ permissions: {
109
+ canPost: boolean;
110
+ canModerate: boolean;
111
+ canRead: boolean;
112
+ isAdmin: boolean;
113
+ isModerator: boolean;
114
+ };
115
+ }
103
116
  export interface DeleteSpaceResponse {
104
117
  message: string;
105
118
  deletedSpace: {