@replyke/core 6.1.1 → 6.2.0-beta.1

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 (265) hide show
  1. package/dist/cjs/context/index.d.ts +1 -0
  2. package/dist/cjs/context/index.js +3 -1
  3. package/dist/cjs/context/index.js.map +1 -1
  4. package/dist/cjs/context/space-context.d.ts +9 -0
  5. package/dist/cjs/context/space-context.js +35 -0
  6. package/dist/cjs/context/space-context.js.map +1 -0
  7. package/dist/cjs/hooks/crypto/useSignTestingJwt.d.ts +1 -2
  8. package/dist/cjs/hooks/crypto/useSignTestingJwt.js +17 -10
  9. package/dist/cjs/hooks/crypto/useSignTestingJwt.js.map +1 -1
  10. package/dist/cjs/hooks/projects/useProjectData.js +1 -1
  11. package/dist/cjs/hooks/projects/useProjectData.js.map +1 -1
  12. package/dist/cjs/hooks/reports/index.d.ts +3 -0
  13. package/dist/cjs/hooks/reports/index.js +7 -1
  14. package/dist/cjs/hooks/reports/index.js.map +1 -1
  15. package/dist/cjs/hooks/reports/useFetchSpaceReports.d.ts +38 -0
  16. package/dist/cjs/hooks/reports/useFetchSpaceReports.js +96 -0
  17. package/dist/cjs/hooks/reports/useFetchSpaceReports.js.map +1 -0
  18. package/dist/cjs/hooks/reports/useHandleSpaceCommentReport.d.ts +30 -0
  19. package/dist/cjs/hooks/reports/useHandleSpaceCommentReport.js +92 -0
  20. package/dist/cjs/hooks/reports/useHandleSpaceCommentReport.js.map +1 -0
  21. package/dist/cjs/hooks/reports/useHandleSpaceEntityReport.d.ts +32 -0
  22. package/dist/cjs/hooks/reports/useHandleSpaceEntityReport.js +94 -0
  23. package/dist/cjs/hooks/reports/useHandleSpaceEntityReport.js.map +1 -0
  24. package/dist/cjs/hooks/space-lists/index.d.ts +3 -0
  25. package/dist/cjs/hooks/space-lists/index.js +11 -0
  26. package/dist/cjs/hooks/space-lists/index.js.map +1 -0
  27. package/dist/cjs/hooks/space-lists/useSpaceList.d.ts +36 -0
  28. package/dist/cjs/hooks/space-lists/useSpaceList.js +293 -0
  29. package/dist/cjs/hooks/space-lists/useSpaceList.js.map +1 -0
  30. package/dist/cjs/hooks/space-lists/useSpaceListActions.d.ts +33 -0
  31. package/dist/cjs/hooks/space-lists/useSpaceListActions.js +210 -0
  32. package/dist/cjs/hooks/space-lists/useSpaceListActions.js.map +1 -0
  33. package/dist/cjs/hooks/spaces/index.d.ts +23 -0
  34. package/dist/cjs/hooks/spaces/index.js +53 -0
  35. package/dist/cjs/hooks/spaces/index.js.map +1 -0
  36. package/dist/cjs/hooks/spaces/useApproveMember.d.ts +7 -0
  37. package/dist/cjs/hooks/spaces/useApproveMember.js +71 -0
  38. package/dist/cjs/hooks/spaces/useApproveMember.js.map +1 -0
  39. package/dist/cjs/hooks/spaces/useCheckSlugAvailability.d.ts +6 -0
  40. package/dist/cjs/hooks/spaces/useCheckSlugAvailability.js +71 -0
  41. package/dist/cjs/hooks/spaces/useCheckSlugAvailability.js.map +1 -0
  42. package/dist/cjs/hooks/spaces/useCreateSpace.d.ts +15 -0
  43. package/dist/cjs/hooks/spaces/useCreateSpace.js +70 -0
  44. package/dist/cjs/hooks/spaces/useCreateSpace.js.map +1 -0
  45. package/dist/cjs/hooks/spaces/useDeclineMember.d.ts +7 -0
  46. package/dist/cjs/hooks/spaces/useDeclineMember.js +71 -0
  47. package/dist/cjs/hooks/spaces/useDeclineMember.js.map +1 -0
  48. package/dist/cjs/hooks/spaces/useDeleteSpace.d.ts +5 -0
  49. package/dist/cjs/hooks/spaces/useDeleteSpace.js +71 -0
  50. package/dist/cjs/hooks/spaces/useDeleteSpace.js.map +1 -0
  51. package/dist/cjs/hooks/spaces/useFetchMySpaces.d.ts +8 -0
  52. package/dist/cjs/hooks/spaces/useFetchMySpaces.js +85 -0
  53. package/dist/cjs/hooks/spaces/useFetchMySpaces.js.map +1 -0
  54. package/dist/cjs/hooks/spaces/useFetchSpace.d.ts +5 -0
  55. package/dist/cjs/hooks/spaces/useFetchSpace.js +71 -0
  56. package/dist/cjs/hooks/spaces/useFetchSpace.js.map +1 -0
  57. package/dist/cjs/hooks/spaces/useFetchSpaceBreadcrumb.d.ts +5 -0
  58. package/dist/cjs/hooks/spaces/useFetchSpaceBreadcrumb.js +71 -0
  59. package/dist/cjs/hooks/spaces/useFetchSpaceBreadcrumb.js.map +1 -0
  60. package/dist/cjs/hooks/spaces/useFetchSpaceByShortId.d.ts +5 -0
  61. package/dist/cjs/hooks/spaces/useFetchSpaceByShortId.js +71 -0
  62. package/dist/cjs/hooks/spaces/useFetchSpaceByShortId.js.map +1 -0
  63. package/dist/cjs/hooks/spaces/useFetchSpaceBySlug.d.ts +5 -0
  64. package/dist/cjs/hooks/spaces/useFetchSpaceBySlug.js +71 -0
  65. package/dist/cjs/hooks/spaces/useFetchSpaceBySlug.js.map +1 -0
  66. package/dist/cjs/hooks/spaces/useFetchSpaceChildren.d.ts +8 -0
  67. package/dist/cjs/hooks/spaces/useFetchSpaceChildren.js +70 -0
  68. package/dist/cjs/hooks/spaces/useFetchSpaceChildren.js.map +1 -0
  69. package/dist/cjs/hooks/spaces/useFetchSpaceMembers.d.ts +10 -0
  70. package/dist/cjs/hooks/spaces/useFetchSpaceMembers.js +82 -0
  71. package/dist/cjs/hooks/spaces/useFetchSpaceMembers.js.map +1 -0
  72. package/dist/cjs/hooks/spaces/useJoinSpace.d.ts +5 -0
  73. package/dist/cjs/hooks/spaces/useJoinSpace.js +71 -0
  74. package/dist/cjs/hooks/spaces/useJoinSpace.js.map +1 -0
  75. package/dist/cjs/hooks/spaces/useLeaveSpace.d.ts +5 -0
  76. package/dist/cjs/hooks/spaces/useLeaveSpace.js +71 -0
  77. package/dist/cjs/hooks/spaces/useLeaveSpace.js.map +1 -0
  78. package/dist/cjs/hooks/spaces/useRemoveMember.d.ts +9 -0
  79. package/dist/cjs/hooks/spaces/useRemoveMember.js +71 -0
  80. package/dist/cjs/hooks/spaces/useRemoveMember.js.map +1 -0
  81. package/dist/cjs/hooks/spaces/useSpace.d.ts +3 -0
  82. package/dist/cjs/hooks/spaces/useSpace.js +13 -0
  83. package/dist/cjs/hooks/spaces/useSpace.js.map +1 -0
  84. package/dist/cjs/hooks/spaces/useSpaceData.d.ts +32 -0
  85. package/dist/cjs/hooks/spaces/useSpaceData.js +358 -0
  86. package/dist/cjs/hooks/spaces/useSpaceData.js.map +1 -0
  87. package/dist/cjs/hooks/spaces/useSpacePermissions.d.ts +18 -0
  88. package/dist/cjs/hooks/spaces/useSpacePermissions.js +53 -0
  89. package/dist/cjs/hooks/spaces/useSpacePermissions.js.map +1 -0
  90. package/dist/cjs/hooks/spaces/useUpdateMemberRole.d.ts +9 -0
  91. package/dist/cjs/hooks/spaces/useUpdateMemberRole.js +71 -0
  92. package/dist/cjs/hooks/spaces/useUpdateMemberRole.js.map +1 -0
  93. package/dist/cjs/hooks/spaces/useUpdateSpace.d.ts +17 -0
  94. package/dist/cjs/hooks/spaces/useUpdateSpace.js +71 -0
  95. package/dist/cjs/hooks/spaces/useUpdateSpace.js.map +1 -0
  96. package/dist/cjs/index.d.ts +10 -1
  97. package/dist/cjs/index.js +35 -2
  98. package/dist/cjs/index.js.map +1 -1
  99. package/dist/cjs/interfaces/SpaceBreadcrumb.d.ts +5 -0
  100. package/dist/cjs/interfaces/SpaceBreadcrumb.js +3 -0
  101. package/dist/cjs/interfaces/SpaceBreadcrumb.js.map +1 -0
  102. package/dist/cjs/interfaces/SpaceListSortByOptions.d.ts +7 -0
  103. package/dist/cjs/interfaces/SpaceListSortByOptions.js +3 -0
  104. package/dist/cjs/interfaces/SpaceListSortByOptions.js.map +1 -0
  105. package/dist/cjs/interfaces/models/Space.d.ts +122 -0
  106. package/dist/cjs/interfaces/models/Space.js +3 -0
  107. package/dist/cjs/interfaces/models/Space.js.map +1 -0
  108. package/dist/cjs/interfaces/models/SpaceMember.d.ts +27 -0
  109. package/dist/cjs/interfaces/models/SpaceMember.js +3 -0
  110. package/dist/cjs/interfaces/models/SpaceMember.js.map +1 -0
  111. package/dist/cjs/interfaces/models/User.d.ts +1 -1
  112. package/dist/cjs/store/api/appNotificationsApi.d.ts +741 -221
  113. package/dist/cjs/store/api/baseApi.d.ts +1 -1
  114. package/dist/cjs/store/api/baseApi.js +2 -0
  115. package/dist/cjs/store/api/baseApi.js.map +1 -1
  116. package/dist/cjs/store/api/entityListsApi.d.ts +387 -127
  117. package/dist/cjs/store/api/listsApi.d.ts +786 -266
  118. package/dist/cjs/store/api/spacesApi.d.ts +10750 -0
  119. package/dist/cjs/store/api/spacesApi.js +501 -0
  120. package/dist/cjs/store/api/spacesApi.js.map +1 -0
  121. package/dist/cjs/store/api/userApi.d.ts +3 -3
  122. package/dist/cjs/store/index.d.ts +4 -2
  123. package/dist/cjs/store/rootReducer.d.ts +4 -2
  124. package/dist/cjs/store/rootReducer.js +2 -0
  125. package/dist/cjs/store/rootReducer.js.map +1 -1
  126. package/dist/cjs/store/slices/appNotificationsSlice.d.ts +2365 -11
  127. package/dist/cjs/store/slices/entityListsSlice.d.ts +1608 -12
  128. package/dist/cjs/store/slices/listsSlice.d.ts +1414 -14
  129. package/dist/cjs/store/slices/spaceListsSlice.d.ts +850 -0
  130. package/dist/cjs/store/slices/spaceListsSlice.js +226 -0
  131. package/dist/cjs/store/slices/spaceListsSlice.js.map +1 -0
  132. package/dist/cjs/store/slices/userSlice.d.ts +248 -8
  133. package/dist/esm/context/index.d.ts +1 -0
  134. package/dist/esm/context/index.js +1 -0
  135. package/dist/esm/context/index.js.map +1 -1
  136. package/dist/esm/context/space-context.d.ts +9 -0
  137. package/dist/esm/context/space-context.js +28 -0
  138. package/dist/esm/context/space-context.js.map +1 -0
  139. package/dist/esm/hooks/crypto/useSignTestingJwt.d.ts +1 -2
  140. package/dist/esm/hooks/crypto/useSignTestingJwt.js +17 -10
  141. package/dist/esm/hooks/crypto/useSignTestingJwt.js.map +1 -1
  142. package/dist/esm/hooks/projects/useProjectData.js +1 -1
  143. package/dist/esm/hooks/projects/useProjectData.js.map +1 -1
  144. package/dist/esm/hooks/reports/index.d.ts +3 -0
  145. package/dist/esm/hooks/reports/index.js +3 -0
  146. package/dist/esm/hooks/reports/index.js.map +1 -1
  147. package/dist/esm/hooks/reports/useFetchSpaceReports.d.ts +38 -0
  148. package/dist/esm/hooks/reports/useFetchSpaceReports.js +91 -0
  149. package/dist/esm/hooks/reports/useFetchSpaceReports.js.map +1 -0
  150. package/dist/esm/hooks/reports/useHandleSpaceCommentReport.d.ts +30 -0
  151. package/dist/esm/hooks/reports/useHandleSpaceCommentReport.js +87 -0
  152. package/dist/esm/hooks/reports/useHandleSpaceCommentReport.js.map +1 -0
  153. package/dist/esm/hooks/reports/useHandleSpaceEntityReport.d.ts +32 -0
  154. package/dist/esm/hooks/reports/useHandleSpaceEntityReport.js +89 -0
  155. package/dist/esm/hooks/reports/useHandleSpaceEntityReport.js.map +1 -0
  156. package/dist/esm/hooks/space-lists/index.d.ts +3 -0
  157. package/dist/esm/hooks/space-lists/index.js +3 -0
  158. package/dist/esm/hooks/space-lists/index.js.map +1 -0
  159. package/dist/esm/hooks/space-lists/useSpaceList.d.ts +36 -0
  160. package/dist/esm/hooks/space-lists/useSpaceList.js +288 -0
  161. package/dist/esm/hooks/space-lists/useSpaceList.js.map +1 -0
  162. package/dist/esm/hooks/space-lists/useSpaceListActions.d.ts +33 -0
  163. package/dist/esm/hooks/space-lists/useSpaceListActions.js +204 -0
  164. package/dist/esm/hooks/space-lists/useSpaceListActions.js.map +1 -0
  165. package/dist/esm/hooks/spaces/index.d.ts +23 -0
  166. package/dist/esm/hooks/spaces/index.js +27 -0
  167. package/dist/esm/hooks/spaces/index.js.map +1 -0
  168. package/dist/esm/hooks/spaces/useApproveMember.d.ts +7 -0
  169. package/dist/esm/hooks/spaces/useApproveMember.js +66 -0
  170. package/dist/esm/hooks/spaces/useApproveMember.js.map +1 -0
  171. package/dist/esm/hooks/spaces/useCheckSlugAvailability.d.ts +6 -0
  172. package/dist/esm/hooks/spaces/useCheckSlugAvailability.js +66 -0
  173. package/dist/esm/hooks/spaces/useCheckSlugAvailability.js.map +1 -0
  174. package/dist/esm/hooks/spaces/useCreateSpace.d.ts +15 -0
  175. package/dist/esm/hooks/spaces/useCreateSpace.js +65 -0
  176. package/dist/esm/hooks/spaces/useCreateSpace.js.map +1 -0
  177. package/dist/esm/hooks/spaces/useDeclineMember.d.ts +7 -0
  178. package/dist/esm/hooks/spaces/useDeclineMember.js +66 -0
  179. package/dist/esm/hooks/spaces/useDeclineMember.js.map +1 -0
  180. package/dist/esm/hooks/spaces/useDeleteSpace.d.ts +5 -0
  181. package/dist/esm/hooks/spaces/useDeleteSpace.js +66 -0
  182. package/dist/esm/hooks/spaces/useDeleteSpace.js.map +1 -0
  183. package/dist/esm/hooks/spaces/useFetchMySpaces.d.ts +8 -0
  184. package/dist/esm/hooks/spaces/useFetchMySpaces.js +80 -0
  185. package/dist/esm/hooks/spaces/useFetchMySpaces.js.map +1 -0
  186. package/dist/esm/hooks/spaces/useFetchSpace.d.ts +5 -0
  187. package/dist/esm/hooks/spaces/useFetchSpace.js +66 -0
  188. package/dist/esm/hooks/spaces/useFetchSpace.js.map +1 -0
  189. package/dist/esm/hooks/spaces/useFetchSpaceBreadcrumb.d.ts +5 -0
  190. package/dist/esm/hooks/spaces/useFetchSpaceBreadcrumb.js +66 -0
  191. package/dist/esm/hooks/spaces/useFetchSpaceBreadcrumb.js.map +1 -0
  192. package/dist/esm/hooks/spaces/useFetchSpaceByShortId.d.ts +5 -0
  193. package/dist/esm/hooks/spaces/useFetchSpaceByShortId.js +66 -0
  194. package/dist/esm/hooks/spaces/useFetchSpaceByShortId.js.map +1 -0
  195. package/dist/esm/hooks/spaces/useFetchSpaceBySlug.d.ts +5 -0
  196. package/dist/esm/hooks/spaces/useFetchSpaceBySlug.js +66 -0
  197. package/dist/esm/hooks/spaces/useFetchSpaceBySlug.js.map +1 -0
  198. package/dist/esm/hooks/spaces/useFetchSpaceChildren.d.ts +8 -0
  199. package/dist/esm/hooks/spaces/useFetchSpaceChildren.js +65 -0
  200. package/dist/esm/hooks/spaces/useFetchSpaceChildren.js.map +1 -0
  201. package/dist/esm/hooks/spaces/useFetchSpaceMembers.d.ts +10 -0
  202. package/dist/esm/hooks/spaces/useFetchSpaceMembers.js +77 -0
  203. package/dist/esm/hooks/spaces/useFetchSpaceMembers.js.map +1 -0
  204. package/dist/esm/hooks/spaces/useJoinSpace.d.ts +5 -0
  205. package/dist/esm/hooks/spaces/useJoinSpace.js +66 -0
  206. package/dist/esm/hooks/spaces/useJoinSpace.js.map +1 -0
  207. package/dist/esm/hooks/spaces/useLeaveSpace.d.ts +5 -0
  208. package/dist/esm/hooks/spaces/useLeaveSpace.js +66 -0
  209. package/dist/esm/hooks/spaces/useLeaveSpace.js.map +1 -0
  210. package/dist/esm/hooks/spaces/useRemoveMember.d.ts +9 -0
  211. package/dist/esm/hooks/spaces/useRemoveMember.js +66 -0
  212. package/dist/esm/hooks/spaces/useRemoveMember.js.map +1 -0
  213. package/dist/esm/hooks/spaces/useSpace.d.ts +3 -0
  214. package/dist/esm/hooks/spaces/useSpace.js +11 -0
  215. package/dist/esm/hooks/spaces/useSpace.js.map +1 -0
  216. package/dist/esm/hooks/spaces/useSpaceData.d.ts +32 -0
  217. package/dist/esm/hooks/spaces/useSpaceData.js +353 -0
  218. package/dist/esm/hooks/spaces/useSpaceData.js.map +1 -0
  219. package/dist/esm/hooks/spaces/useSpacePermissions.d.ts +18 -0
  220. package/dist/esm/hooks/spaces/useSpacePermissions.js +51 -0
  221. package/dist/esm/hooks/spaces/useSpacePermissions.js.map +1 -0
  222. package/dist/esm/hooks/spaces/useUpdateMemberRole.d.ts +9 -0
  223. package/dist/esm/hooks/spaces/useUpdateMemberRole.js +66 -0
  224. package/dist/esm/hooks/spaces/useUpdateMemberRole.js.map +1 -0
  225. package/dist/esm/hooks/spaces/useUpdateSpace.d.ts +17 -0
  226. package/dist/esm/hooks/spaces/useUpdateSpace.js +66 -0
  227. package/dist/esm/hooks/spaces/useUpdateSpace.js.map +1 -0
  228. package/dist/esm/index.d.ts +10 -1
  229. package/dist/esm/index.js +8 -1
  230. package/dist/esm/index.js.map +1 -1
  231. package/dist/esm/interfaces/SpaceBreadcrumb.d.ts +5 -0
  232. package/dist/esm/interfaces/SpaceBreadcrumb.js +2 -0
  233. package/dist/esm/interfaces/SpaceBreadcrumb.js.map +1 -0
  234. package/dist/esm/interfaces/SpaceListSortByOptions.d.ts +7 -0
  235. package/dist/esm/interfaces/SpaceListSortByOptions.js +2 -0
  236. package/dist/esm/interfaces/SpaceListSortByOptions.js.map +1 -0
  237. package/dist/esm/interfaces/models/Space.d.ts +122 -0
  238. package/dist/esm/interfaces/models/Space.js +2 -0
  239. package/dist/esm/interfaces/models/Space.js.map +1 -0
  240. package/dist/esm/interfaces/models/SpaceMember.d.ts +27 -0
  241. package/dist/esm/interfaces/models/SpaceMember.js +2 -0
  242. package/dist/esm/interfaces/models/SpaceMember.js.map +1 -0
  243. package/dist/esm/interfaces/models/User.d.ts +1 -1
  244. package/dist/esm/store/api/appNotificationsApi.d.ts +741 -221
  245. package/dist/esm/store/api/baseApi.d.ts +1 -1
  246. package/dist/esm/store/api/baseApi.js +2 -0
  247. package/dist/esm/store/api/baseApi.js.map +1 -1
  248. package/dist/esm/store/api/entityListsApi.d.ts +387 -127
  249. package/dist/esm/store/api/listsApi.d.ts +786 -266
  250. package/dist/esm/store/api/spacesApi.d.ts +10750 -0
  251. package/dist/esm/store/api/spacesApi.js +498 -0
  252. package/dist/esm/store/api/spacesApi.js.map +1 -0
  253. package/dist/esm/store/api/userApi.d.ts +3 -3
  254. package/dist/esm/store/index.d.ts +4 -2
  255. package/dist/esm/store/rootReducer.d.ts +4 -2
  256. package/dist/esm/store/rootReducer.js +2 -0
  257. package/dist/esm/store/rootReducer.js.map +1 -1
  258. package/dist/esm/store/slices/appNotificationsSlice.d.ts +2365 -11
  259. package/dist/esm/store/slices/entityListsSlice.d.ts +1608 -12
  260. package/dist/esm/store/slices/listsSlice.d.ts +1414 -14
  261. package/dist/esm/store/slices/spaceListsSlice.d.ts +850 -0
  262. package/dist/esm/store/slices/spaceListsSlice.js +223 -0
  263. package/dist/esm/store/slices/spaceListsSlice.js.map +1 -0
  264. package/dist/esm/store/slices/userSlice.d.ts +248 -8
  265. package/package.json +1 -1
@@ -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 useApproveMember() {
41
+ var _this = this;
42
+ var projectId = useProject().projectId;
43
+ var axios = useAxiosPrivate();
44
+ var approveMember = useCallback(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
45
+ var response;
46
+ var spaceId = _b.spaceId, memberId = _b.memberId;
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 || !memberId) {
54
+ throw new Error("spaceId and memberId are required");
55
+ }
56
+ return [4 /*yield*/, axios.patch("/".concat(projectId, "/spaces/").concat(spaceId, "/members/").concat(memberId, "/approve"))];
57
+ case 1:
58
+ response = _c.sent();
59
+ return [2 /*return*/, response.data];
60
+ }
61
+ });
62
+ }); }, [projectId]);
63
+ return approveMember;
64
+ }
65
+ export default useApproveMember;
66
+ //# sourceMappingURL=useApproveMember.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useApproveMember.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/useApproveMember.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEhD,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAO3D,SAAS,gBAAgB;IAAzB,iBAwBC;IAvBS,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAEhC,IAAM,aAAa,GAAG,WAAW,CAC/B,gEAAO,EAA0C;;YAAxC,OAAO,aAAA,EAAE,QAAQ,cAAA;;;;oBACxB,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAED,IAAI,CAAC,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;wBAC1B,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;oBACvD,CAAC;oBAEgB,qBAAM,KAAK,CAAC,KAAK,CAChC,WAAI,SAAS,qBAAW,OAAO,sBAAY,QAAQ,aAAU,CAC9D,EAAA;;oBAFK,QAAQ,GAAG,SAEhB;oBAED,sBAAO,QAAQ,CAAC,IAA6B,EAAC;;;SAC/C,EACD,CAAC,SAAS,CAAC,CACZ,CAAC;IAEF,OAAO,aAAa,CAAC;AACvB,CAAC;AAED,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,6 @@
1
+ declare function useCheckSlugAvailability(): ({ slug }: {
2
+ slug: string;
3
+ }) => Promise<{
4
+ available: boolean;
5
+ }>;
6
+ export default useCheckSlugAvailability;
@@ -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 useCheckSlugAvailability() {
41
+ var _this = this;
42
+ var projectId = useProject().projectId;
43
+ var axios = useAxiosPrivate();
44
+ var checkSlugAvailability = useCallback(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
45
+ var response;
46
+ var slug = _b.slug;
47
+ return __generator(this, function (_c) {
48
+ switch (_c.label) {
49
+ case 0:
50
+ if (!projectId) {
51
+ throw new Error("No project specified");
52
+ }
53
+ if (!slug) {
54
+ throw new Error("Please specify a slug");
55
+ }
56
+ return [4 /*yield*/, axios.get("/".concat(projectId, "/spaces/check-slug?slug=").concat(slug))];
57
+ case 1:
58
+ response = _c.sent();
59
+ return [2 /*return*/, response.data];
60
+ }
61
+ });
62
+ }); }, [projectId, axios]);
63
+ return checkSlugAvailability;
64
+ }
65
+ export default useCheckSlugAvailability;
66
+ //# sourceMappingURL=useCheckSlugAvailability.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCheckSlugAvailability.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/useCheckSlugAvailability.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAE3D,SAAS,wBAAwB;IAAjC,iBA0BC;IAzBS,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAEhC,IAAM,qBAAqB,GAAG,WAAW,CACvC,gEAAO,EAA0B;;YAAxB,IAAI,UAAA;;;;oBACX,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;oBAEgB,qBAAM,KAAK,CAAC,GAAG,CAC9B,WAAI,SAAS,qCAA2B,IAAI,CAAE,CAC/C,EAAA;;oBAFK,QAAQ,GAAG,SAEhB;oBAED,sBAAO,QAAQ,CAAC,IAEf,EAAC;;;SACH,EACD,CAAC,SAAS,EAAE,KAAK,CAAC,CACnB,CAAC;IAEF,OAAO,qBAAqB,CAAC;AAC/B,CAAC;AAED,eAAe,wBAAwB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { Space, ReadingPermission, PostingPermission } from "../../interfaces/models/Space";
2
+ export interface CreateSpaceProps {
3
+ name: string;
4
+ slug?: string | null;
5
+ description?: string | null;
6
+ avatar?: string | null;
7
+ banner?: string | null;
8
+ readingPermission?: ReadingPermission;
9
+ postingPermission?: PostingPermission;
10
+ requireJoinApproval?: boolean;
11
+ metadata?: Record<string, any>;
12
+ parentSpaceId?: string | null;
13
+ }
14
+ declare function useCreateSpace(): (props: CreateSpaceProps) => Promise<Space>;
15
+ export default useCreateSpace;
@@ -0,0 +1,65 @@
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 useCreateSpace() {
41
+ var _this = this;
42
+ var projectId = useProject().projectId;
43
+ var axios = useAxiosPrivate();
44
+ var createSpace = useCallback(function (props) { return __awaiter(_this, void 0, void 0, function () {
45
+ var response;
46
+ return __generator(this, function (_a) {
47
+ switch (_a.label) {
48
+ case 0:
49
+ if (!projectId) {
50
+ throw new Error("No projectId available.");
51
+ }
52
+ if (!props.name) {
53
+ throw new Error("Space name is required");
54
+ }
55
+ return [4 /*yield*/, axios.post("/".concat(projectId, "/spaces"), props)];
56
+ case 1:
57
+ response = _a.sent();
58
+ return [2 /*return*/, response.data];
59
+ }
60
+ });
61
+ }); }, [projectId]);
62
+ return createSpace;
63
+ }
64
+ export default useCreateSpace;
65
+ //# sourceMappingURL=useCreateSpace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCreateSpace.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/useCreateSpace.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAMhD,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAe3D,SAAS,cAAc;IAAvB,iBAsBC;IArBS,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAEhC,IAAM,WAAW,GAAG,WAAW,CAC7B,UAAO,KAAuB;;;;;oBAC5B,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAED,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;wBAChB,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;oBAC5C,CAAC;oBAEgB,qBAAM,KAAK,CAAC,IAAI,CAAC,WAAI,SAAS,YAAS,EAAE,KAAK,CAAC,EAAA;;oBAA1D,QAAQ,GAAG,SAA+C;oBAEhE,sBAAO,QAAQ,CAAC,IAAa,EAAC;;;SAC/B,EACD,CAAC,SAAS,CAAC,CACZ,CAAC;IAEF,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,eAAe,cAAc,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { DeclineMemberResponse } from "../../interfaces/models/Space";
2
+ interface DeclineMemberParams {
3
+ spaceId: string;
4
+ memberId: string;
5
+ }
6
+ declare function useDeclineMember(): ({ spaceId, memberId }: DeclineMemberParams) => Promise<DeclineMemberResponse>;
7
+ export default useDeclineMember;
@@ -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 useDeclineMember() {
41
+ var _this = this;
42
+ var projectId = useProject().projectId;
43
+ var axios = useAxiosPrivate();
44
+ var declineMember = useCallback(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
45
+ var response;
46
+ var spaceId = _b.spaceId, memberId = _b.memberId;
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 || !memberId) {
54
+ throw new Error("spaceId and memberId are required");
55
+ }
56
+ return [4 /*yield*/, axios.patch("/".concat(projectId, "/spaces/").concat(spaceId, "/members/").concat(memberId, "/decline"))];
57
+ case 1:
58
+ response = _c.sent();
59
+ return [2 /*return*/, response.data];
60
+ }
61
+ });
62
+ }); }, [projectId]);
63
+ return declineMember;
64
+ }
65
+ export default useDeclineMember;
66
+ //# sourceMappingURL=useDeclineMember.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDeclineMember.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/useDeclineMember.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEhD,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAO3D,SAAS,gBAAgB;IAAzB,iBAwBC;IAvBS,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAEhC,IAAM,aAAa,GAAG,WAAW,CAC/B,gEAAO,EAA0C;;YAAxC,OAAO,aAAA,EAAE,QAAQ,cAAA;;;;oBACxB,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAED,IAAI,CAAC,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;wBAC1B,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;oBACvD,CAAC;oBAEgB,qBAAM,KAAK,CAAC,KAAK,CAChC,WAAI,SAAS,qBAAW,OAAO,sBAAY,QAAQ,aAAU,CAC9D,EAAA;;oBAFK,QAAQ,GAAG,SAEhB;oBAED,sBAAO,QAAQ,CAAC,IAA6B,EAAC;;;SAC/C,EACD,CAAC,SAAS,CAAC,CACZ,CAAC;IAEF,OAAO,aAAa,CAAC;AACvB,CAAC;AAED,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { DeleteSpaceResponse } from "../../interfaces/models/Space";
2
+ declare function useDeleteSpace(): ({ spaceId }: {
3
+ spaceId: string;
4
+ }) => Promise<DeleteSpaceResponse>;
5
+ export default useDeleteSpace;
@@ -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 useDeleteSpace() {
41
+ var _this = this;
42
+ var projectId = useProject().projectId;
43
+ var axios = useAxiosPrivate();
44
+ var deleteSpace = 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.delete("/".concat(projectId, "/spaces/").concat(spaceId))];
57
+ case 1:
58
+ response = _c.sent();
59
+ return [2 /*return*/, response.data];
60
+ }
61
+ });
62
+ }); }, [projectId]);
63
+ return deleteSpace;
64
+ }
65
+ export default useDeleteSpace;
66
+ //# sourceMappingURL=useDeleteSpace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDeleteSpace.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/useDeleteSpace.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,cAAc;IAAvB,iBAsBC;IArBS,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAEhC,IAAM,WAAW,GAAG,WAAW,CAC7B,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,MAAM,CAAC,WAAI,SAAS,qBAAW,OAAO,CAAE,CAAC,EAAA;;oBAAhE,QAAQ,GAAG,SAAqD;oBAEtE,sBAAO,QAAQ,CAAC,IAA2B,EAAC;;;SAC7C,EACD,CAAC,SAAS,CAAC,CACZ,CAAC;IAEF,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,eAAe,cAAc,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { MySpacesResponse } from "../../interfaces/models/Space";
2
+ interface FetchMySpacesParams {
3
+ page?: number;
4
+ limit?: number;
5
+ status?: "active" | "pending" | "banned";
6
+ }
7
+ declare function useFetchMySpaces(): (params?: FetchMySpacesParams) => Promise<MySpacesResponse>;
8
+ export default useFetchMySpaces;
@@ -0,0 +1,80 @@
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
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
38
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
39
+ if (ar || !(i in from)) {
40
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
41
+ ar[i] = from[i];
42
+ }
43
+ }
44
+ return to.concat(ar || Array.prototype.slice.call(from));
45
+ };
46
+ import { useCallback } from "react";
47
+ import useProject from "../projects/useProject";
48
+ import useAxiosPrivate from "../../config/useAxiosPrivate";
49
+ function useFetchMySpaces() {
50
+ var _this = this;
51
+ var projectId = useProject().projectId;
52
+ var axios = useAxiosPrivate();
53
+ var fetchMySpaces = useCallback(function () {
54
+ var args_1 = [];
55
+ for (var _i = 0; _i < arguments.length; _i++) {
56
+ args_1[_i] = arguments[_i];
57
+ }
58
+ return __awaiter(_this, __spreadArray([], args_1, true), void 0, function (params) {
59
+ var response;
60
+ if (params === void 0) { params = {}; }
61
+ return __generator(this, function (_a) {
62
+ switch (_a.label) {
63
+ case 0:
64
+ if (!projectId) {
65
+ throw new Error("No projectId available.");
66
+ }
67
+ return [4 /*yield*/, axios.get("/".concat(projectId, "/spaces/my-spaces"), {
68
+ params: params,
69
+ })];
70
+ case 1:
71
+ response = _a.sent();
72
+ return [2 /*return*/, response.data];
73
+ }
74
+ });
75
+ });
76
+ }, [projectId]);
77
+ return fetchMySpaces;
78
+ }
79
+ export default useFetchMySpaces;
80
+ //# sourceMappingURL=useFetchMySpaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFetchMySpaces.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/useFetchMySpaces.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEhD,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAQ3D,SAAS,gBAAgB;IAAzB,iBAoBC;IAnBS,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAEhC,IAAM,aAAa,GAAG,WAAW,CAC/B;;;;;mFAAO,MAAgC;;YAAhC,uBAAA,EAAA,WAAgC;;;;wBACrC,IAAI,CAAC,SAAS,EAAE,CAAC;4BACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;wBAC7C,CAAC;wBAEgB,qBAAM,KAAK,CAAC,GAAG,CAAC,WAAI,SAAS,sBAAmB,EAAE;gCACjE,MAAM,QAAA;6BACP,CAAC,EAAA;;wBAFI,QAAQ,GAAG,SAEf;wBAEF,sBAAO,QAAQ,CAAC,IAAwB,EAAC;;;;KAC1C,EACD,CAAC,SAAS,CAAC,CACZ,CAAC;IAEF,OAAO,aAAa,CAAC;AACvB,CAAC;AAED,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { SpaceDetailed } from "../../interfaces/models/Space";
2
+ declare function useFetchSpace(): ({ spaceId }: {
3
+ spaceId: string;
4
+ }) => Promise<SpaceDetailed>;
5
+ export default useFetchSpace;
@@ -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 useFetchSpace() {
41
+ var _this = this;
42
+ var projectId = useProject().projectId;
43
+ var axios = useAxiosPrivate();
44
+ var fetchSpace = 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))];
57
+ case 1:
58
+ response = _c.sent();
59
+ return [2 /*return*/, response.data];
60
+ }
61
+ });
62
+ }); }, [projectId]);
63
+ return fetchSpace;
64
+ }
65
+ export default useFetchSpace;
66
+ //# sourceMappingURL=useFetchSpace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFetchSpace.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/useFetchSpace.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,aAAa;IAAtB,iBAsBC;IArBS,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAEhC,IAAM,UAAU,GAAG,WAAW,CAC5B,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,CAAC,WAAI,SAAS,qBAAW,OAAO,CAAE,CAAC,EAAA;;oBAA7D,QAAQ,GAAG,SAAkD;oBAEnE,sBAAO,QAAQ,CAAC,IAAqB,EAAC;;;SACvC,EACD,CAAC,SAAS,CAAC,CACZ,CAAC;IAEF,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,eAAe,aAAa,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { SpaceBreadcrumb } from "../../interfaces/SpaceBreadcrumb";
2
+ declare function useFetchSpaceBreadcrumb(): ({ spaceId }: {
3
+ spaceId: string;
4
+ }) => Promise<SpaceBreadcrumb>;
5
+ export default useFetchSpaceBreadcrumb;