@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 useFetchSpaceBreadcrumb() {
41
+ var _this = this;
42
+ var projectId = useProject().projectId;
43
+ var axios = useAxiosPrivate();
44
+ var fetchSpaceBreadcrumb = 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, "/breadcrumb"))];
57
+ case 1:
58
+ response = _c.sent();
59
+ return [2 /*return*/, response.data];
60
+ }
61
+ });
62
+ }); }, [projectId]);
63
+ return fetchSpaceBreadcrumb;
64
+ }
65
+ export default useFetchSpaceBreadcrumb;
66
+ //# sourceMappingURL=useFetchSpaceBreadcrumb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFetchSpaceBreadcrumb.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/useFetchSpaceBreadcrumb.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,uBAAuB;IAAhC,iBAwBC;IAvBS,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAEhC,IAAM,oBAAoB,GAAG,WAAW,CACtC,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,gBAAa,CAC7C,EAAA;;oBAFK,QAAQ,GAAG,SAEhB;oBAED,sBAAO,QAAQ,CAAC,IAAuB,EAAC;;;SACzC,EACD,CAAC,SAAS,CAAC,CACZ,CAAC;IAEF,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAED,eAAe,uBAAuB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { SpaceDetailed } from "../../interfaces/models/Space";
2
+ declare function useFetchSpaceByShortId(): ({ shortId }: {
3
+ shortId: string;
4
+ }) => Promise<SpaceDetailed>;
5
+ export default useFetchSpaceByShortId;
@@ -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 useFetchSpaceByShortId() {
41
+ var _this = this;
42
+ var projectId = useProject().projectId;
43
+ var axios = useAxiosPrivate();
44
+ var fetchSpaceByShortId = useCallback(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
45
+ var response;
46
+ var shortId = _b.shortId;
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 (!shortId) {
54
+ throw new Error("Please pass a shortId");
55
+ }
56
+ return [4 /*yield*/, axios.get("/".concat(projectId, "/spaces/by-short-id?shortId=").concat(shortId))];
57
+ case 1:
58
+ response = _c.sent();
59
+ return [2 /*return*/, response.data];
60
+ }
61
+ });
62
+ }); }, [projectId]);
63
+ return fetchSpaceByShortId;
64
+ }
65
+ export default useFetchSpaceByShortId;
66
+ //# sourceMappingURL=useFetchSpaceByShortId.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFetchSpaceByShortId.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/useFetchSpaceByShortId.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,sBAAsB;IAA/B,iBAwBC;IAvBS,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAEhC,IAAM,mBAAmB,GAAG,WAAW,CACrC,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,yCAA+B,OAAO,CAAE,CACtD,EAAA;;oBAFK,QAAQ,GAAG,SAEhB;oBAED,sBAAO,QAAQ,CAAC,IAAqB,EAAC;;;SACvC,EACD,CAAC,SAAS,CAAC,CACZ,CAAC;IAEF,OAAO,mBAAmB,CAAC;AAC7B,CAAC;AAED,eAAe,sBAAsB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { SpaceDetailed } from "../../interfaces/models/Space";
2
+ declare function useFetchSpaceBySlug(): ({ slug }: {
3
+ slug: string;
4
+ }) => Promise<SpaceDetailed>;
5
+ export default useFetchSpaceBySlug;
@@ -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 useFetchSpaceBySlug() {
41
+ var _this = this;
42
+ var projectId = useProject().projectId;
43
+ var axios = useAxiosPrivate();
44
+ var fetchSpaceBySlug = 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 projectId available.");
52
+ }
53
+ if (!slug) {
54
+ throw new Error("Please pass a slug");
55
+ }
56
+ return [4 /*yield*/, axios.get("/".concat(projectId, "/spaces/by-slug?slug=").concat(slug))];
57
+ case 1:
58
+ response = _c.sent();
59
+ return [2 /*return*/, response.data];
60
+ }
61
+ });
62
+ }); }, [projectId]);
63
+ return fetchSpaceBySlug;
64
+ }
65
+ export default useFetchSpaceBySlug;
66
+ //# sourceMappingURL=useFetchSpaceBySlug.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFetchSpaceBySlug.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/useFetchSpaceBySlug.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,mBAAmB;IAA5B,iBAwBC;IAvBS,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAEhC,IAAM,gBAAgB,GAAG,WAAW,CAClC,gEAAO,EAA0B;;YAAxB,IAAI,UAAA;;;;oBACX,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAED,IAAI,CAAC,IAAI,EAAE,CAAC;wBACV,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;oBACxC,CAAC;oBAEgB,qBAAM,KAAK,CAAC,GAAG,CAC9B,WAAI,SAAS,kCAAwB,IAAI,CAAE,CAC5C,EAAA;;oBAFK,QAAQ,GAAG,SAEhB;oBAED,sBAAO,QAAQ,CAAC,IAAqB,EAAC;;;SACvC,EACD,CAAC,SAAS,CAAC,CACZ,CAAC;IAEF,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { Space, PaginatedResponse } from "../../interfaces/models/Space";
2
+ interface FetchSpaceChildrenParams {
3
+ spaceId: string;
4
+ page?: number;
5
+ limit?: number;
6
+ }
7
+ declare function useFetchSpaceChildren(): ({ spaceId, page, limit }: FetchSpaceChildrenParams) => Promise<PaginatedResponse<Space>>;
8
+ export default useFetchSpaceChildren;
@@ -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 axios from "../../config/axios";
40
+ function useFetchSpaceChildren() {
41
+ var _this = this;
42
+ var projectId = useProject().projectId;
43
+ var fetchSpaceChildren = useCallback(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
44
+ var response;
45
+ var spaceId = _b.spaceId, _c = _b.page, page = _c === void 0 ? 1 : _c, _d = _b.limit, limit = _d === void 0 ? 20 : _d;
46
+ return __generator(this, function (_e) {
47
+ switch (_e.label) {
48
+ case 0:
49
+ if (!projectId) {
50
+ throw new Error("No projectId available.");
51
+ }
52
+ if (!spaceId) {
53
+ throw new Error("Please pass a spaceId");
54
+ }
55
+ return [4 /*yield*/, axios.get("/".concat(projectId, "/spaces/").concat(spaceId, "/children?page=").concat(page, "&limit=").concat(limit))];
56
+ case 1:
57
+ response = _e.sent();
58
+ return [2 /*return*/, response.data];
59
+ }
60
+ });
61
+ }); }, [projectId]);
62
+ return fetchSpaceChildren;
63
+ }
64
+ export default useFetchSpaceChildren;
65
+ //# sourceMappingURL=useFetchSpaceChildren.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFetchSpaceChildren.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/useFetchSpaceChildren.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAEhD,OAAO,KAAK,MAAM,oBAAoB,CAAC;AAQvC,SAAS,qBAAqB;IAA9B,iBAuBC;IAtBS,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAEnC,IAAM,kBAAkB,GAAG,WAAW,CACpC,gEAAO,EAA2D;;YAAzD,OAAO,aAAA,EAAE,YAAQ,EAAR,IAAI,mBAAG,CAAC,KAAA,EAAE,aAAU,EAAV,KAAK,mBAAG,EAAE,KAAA;;;;oBACpC,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,4BAAkB,IAAI,oBAAU,KAAK,CAAE,CACvE,EAAA;;oBAFK,QAAQ,GAAG,SAEhB;oBAED,sBAAO,QAAQ,CAAC,IAAgC,EAAC;;;SAClD,EACD,CAAC,SAAS,CAAC,CACZ,CAAC;IAEF,OAAO,kBAAkB,CAAC;AAC5B,CAAC;AAED,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { SpaceMembersResponse, SpaceMemberRole, SpaceMemberStatus } from "../../interfaces/models/SpaceMember";
2
+ interface FetchSpaceMembersParams {
3
+ spaceId: string;
4
+ page?: number;
5
+ limit?: number;
6
+ role?: SpaceMemberRole;
7
+ status?: SpaceMemberStatus;
8
+ }
9
+ declare function useFetchSpaceMembers(): ({ spaceId, page, limit, role, status }: FetchSpaceMembersParams) => Promise<SpaceMembersResponse>;
10
+ export default useFetchSpaceMembers;
@@ -0,0 +1,77 @@
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 useFetchSpaceMembers() {
41
+ var _this = this;
42
+ var projectId = useProject().projectId;
43
+ var axios = useAxiosPrivate();
44
+ var fetchSpaceMembers = useCallback(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
45
+ var queryParams, queryString, url, response;
46
+ var spaceId = _b.spaceId, page = _b.page, limit = _b.limit, role = _b.role, status = _b.status;
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
+ queryParams = new URLSearchParams();
57
+ if (page !== undefined)
58
+ queryParams.append("page", page.toString());
59
+ if (limit !== undefined)
60
+ queryParams.append("limit", limit.toString());
61
+ if (role)
62
+ queryParams.append("role", role);
63
+ if (status)
64
+ queryParams.append("status", status);
65
+ queryString = queryParams.toString();
66
+ url = "/".concat(projectId, "/spaces/").concat(spaceId, "/members").concat(queryString ? "?".concat(queryString) : "");
67
+ return [4 /*yield*/, axios.get(url)];
68
+ case 1:
69
+ response = _c.sent();
70
+ return [2 /*return*/, response.data];
71
+ }
72
+ });
73
+ }); }, [projectId]);
74
+ return fetchSpaceMembers;
75
+ }
76
+ export default useFetchSpaceMembers;
77
+ //# sourceMappingURL=useFetchSpaceMembers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFetchSpaceMembers.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/useFetchSpaceMembers.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAMhD,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAU3D,SAAS,oBAAoB;IAA7B,iBA+BC;IA9BS,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAEhC,IAAM,iBAAiB,GAAG,WAAW,CACnC,gEAAO,EAA+D;;YAA7D,OAAO,aAAA,EAAE,IAAI,UAAA,EAAE,KAAK,WAAA,EAAE,IAAI,UAAA,EAAE,MAAM,YAAA;;;;oBACzC,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;oBAEK,WAAW,GAAG,IAAI,eAAe,EAAE,CAAC;oBAC1C,IAAI,IAAI,KAAK,SAAS;wBAAE,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;oBACpE,IAAI,KAAK,KAAK,SAAS;wBAAE,WAAW,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;oBACvE,IAAI,IAAI;wBAAE,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;oBAC3C,IAAI,MAAM;wBAAE,WAAW,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;oBAE3C,WAAW,GAAG,WAAW,CAAC,QAAQ,EAAE,CAAC;oBACrC,GAAG,GAAG,WAAI,SAAS,qBAAW,OAAO,qBAAW,WAAW,CAAC,CAAC,CAAC,WAAI,WAAW,CAAE,CAAC,CAAC,CAAC,EAAE,CAAE,CAAC;oBAE5E,qBAAM,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAA;;oBAA/B,QAAQ,GAAG,SAAoB;oBAErC,sBAAO,QAAQ,CAAC,IAA4B,EAAC;;;SAC9C,EACD,CAAC,SAAS,CAAC,CACZ,CAAC;IAEF,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { JoinSpaceResponse } from "../../interfaces/models/Space";
2
+ declare function useJoinSpace(): ({ spaceId }: {
3
+ spaceId: string;
4
+ }) => Promise<JoinSpaceResponse>;
5
+ export default useJoinSpace;
@@ -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 useJoinSpace() {
41
+ var _this = this;
42
+ var projectId = useProject().projectId;
43
+ var axios = useAxiosPrivate();
44
+ var joinSpace = 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.post("/".concat(projectId, "/spaces/").concat(spaceId, "/join"))];
57
+ case 1:
58
+ response = _c.sent();
59
+ return [2 /*return*/, response.data];
60
+ }
61
+ });
62
+ }); }, [projectId]);
63
+ return joinSpace;
64
+ }
65
+ export default useJoinSpace;
66
+ //# sourceMappingURL=useJoinSpace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useJoinSpace.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/useJoinSpace.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,YAAY;IAArB,iBAsBC;IArBS,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAEhC,IAAM,SAAS,GAAG,WAAW,CAC3B,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,IAAI,CAAC,WAAI,SAAS,qBAAW,OAAO,UAAO,CAAC,EAAA;;oBAAnE,QAAQ,GAAG,SAAwD;oBAEzE,sBAAO,QAAQ,CAAC,IAAyB,EAAC;;;SAC3C,EACD,CAAC,SAAS,CAAC,CACZ,CAAC;IAEF,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,eAAe,YAAY,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { LeaveSpaceResponse } from "../../interfaces/models/Space";
2
+ declare function useLeaveSpace(): ({ spaceId }: {
3
+ spaceId: string;
4
+ }) => Promise<LeaveSpaceResponse>;
5
+ export default useLeaveSpace;
@@ -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 useLeaveSpace() {
41
+ var _this = this;
42
+ var projectId = useProject().projectId;
43
+ var axios = useAxiosPrivate();
44
+ var leaveSpace = 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, "/leave"))];
57
+ case 1:
58
+ response = _c.sent();
59
+ return [2 /*return*/, response.data];
60
+ }
61
+ });
62
+ }); }, [projectId]);
63
+ return leaveSpace;
64
+ }
65
+ export default useLeaveSpace;
66
+ //# sourceMappingURL=useLeaveSpace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLeaveSpace.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/useLeaveSpace.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,iBAwBC;IAvBS,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,MAAM,CACjC,WAAI,SAAS,qBAAW,OAAO,WAAQ,CACxC,EAAA;;oBAFK,QAAQ,GAAG,SAEhB;oBAED,sBAAO,QAAQ,CAAC,IAA0B,EAAC;;;SAC5C,EACD,CAAC,SAAS,CAAC,CACZ,CAAC;IAEF,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,eAAe,aAAa,CAAC"}
@@ -0,0 +1,9 @@
1
+ interface RemoveMemberParams {
2
+ spaceId: string;
3
+ memberId: string;
4
+ }
5
+ interface RemoveMemberResponse {
6
+ message: string;
7
+ }
8
+ declare function useRemoveMember(): ({ spaceId, memberId }: RemoveMemberParams) => Promise<RemoveMemberResponse>;
9
+ export default useRemoveMember;