@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,71 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ var react_1 = require("react");
43
+ var useProject_1 = __importDefault(require("../projects/useProject"));
44
+ var useAxiosPrivate_1 = __importDefault(require("../../config/useAxiosPrivate"));
45
+ function useFetchSpace() {
46
+ var _this = this;
47
+ var projectId = (0, useProject_1.default)().projectId;
48
+ var axios = (0, useAxiosPrivate_1.default)();
49
+ var fetchSpace = (0, react_1.useCallback)(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
50
+ var response;
51
+ var spaceId = _b.spaceId;
52
+ return __generator(this, function (_c) {
53
+ switch (_c.label) {
54
+ case 0:
55
+ if (!projectId) {
56
+ throw new Error("No projectId available.");
57
+ }
58
+ if (!spaceId) {
59
+ throw new Error("Please pass a spaceId");
60
+ }
61
+ return [4 /*yield*/, axios.get("/".concat(projectId, "/spaces/").concat(spaceId))];
62
+ case 1:
63
+ response = _c.sent();
64
+ return [2 /*return*/, response.data];
65
+ }
66
+ });
67
+ }); }, [projectId]);
68
+ return fetchSpace;
69
+ }
70
+ exports.default = useFetchSpace;
71
+ //# sourceMappingURL=useFetchSpace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFetchSpace.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/useFetchSpace.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,sEAAgD;AAEhD,iFAA2D;AAE3D,SAAS,aAAa;IAAtB,iBAsBC;IArBS,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEhC,IAAM,UAAU,GAAG,IAAA,mBAAW,EAC5B,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,kBAAe,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;
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ var react_1 = require("react");
43
+ var useProject_1 = __importDefault(require("../projects/useProject"));
44
+ var useAxiosPrivate_1 = __importDefault(require("../../config/useAxiosPrivate"));
45
+ function useFetchSpaceBreadcrumb() {
46
+ var _this = this;
47
+ var projectId = (0, useProject_1.default)().projectId;
48
+ var axios = (0, useAxiosPrivate_1.default)();
49
+ var fetchSpaceBreadcrumb = (0, react_1.useCallback)(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
50
+ var response;
51
+ var spaceId = _b.spaceId;
52
+ return __generator(this, function (_c) {
53
+ switch (_c.label) {
54
+ case 0:
55
+ if (!projectId) {
56
+ throw new Error("No projectId available.");
57
+ }
58
+ if (!spaceId) {
59
+ throw new Error("Please pass a spaceId");
60
+ }
61
+ return [4 /*yield*/, axios.get("/".concat(projectId, "/spaces/").concat(spaceId, "/breadcrumb"))];
62
+ case 1:
63
+ response = _c.sent();
64
+ return [2 /*return*/, response.data];
65
+ }
66
+ });
67
+ }); }, [projectId]);
68
+ return fetchSpaceBreadcrumb;
69
+ }
70
+ exports.default = useFetchSpaceBreadcrumb;
71
+ //# sourceMappingURL=useFetchSpaceBreadcrumb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFetchSpaceBreadcrumb.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/useFetchSpaceBreadcrumb.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,sEAAgD;AAEhD,iFAA2D;AAE3D,SAAS,uBAAuB;IAAhC,iBAwBC;IAvBS,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEhC,IAAM,oBAAoB,GAAG,IAAA,mBAAW,EACtC,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,kBAAe,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,71 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ var react_1 = require("react");
43
+ var useProject_1 = __importDefault(require("../projects/useProject"));
44
+ var useAxiosPrivate_1 = __importDefault(require("../../config/useAxiosPrivate"));
45
+ function useFetchSpaceByShortId() {
46
+ var _this = this;
47
+ var projectId = (0, useProject_1.default)().projectId;
48
+ var axios = (0, useAxiosPrivate_1.default)();
49
+ var fetchSpaceByShortId = (0, react_1.useCallback)(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
50
+ var response;
51
+ var shortId = _b.shortId;
52
+ return __generator(this, function (_c) {
53
+ switch (_c.label) {
54
+ case 0:
55
+ if (!projectId) {
56
+ throw new Error("No projectId available.");
57
+ }
58
+ if (!shortId) {
59
+ throw new Error("Please pass a shortId");
60
+ }
61
+ return [4 /*yield*/, axios.get("/".concat(projectId, "/spaces/by-short-id?shortId=").concat(shortId))];
62
+ case 1:
63
+ response = _c.sent();
64
+ return [2 /*return*/, response.data];
65
+ }
66
+ });
67
+ }); }, [projectId]);
68
+ return fetchSpaceByShortId;
69
+ }
70
+ exports.default = useFetchSpaceByShortId;
71
+ //# sourceMappingURL=useFetchSpaceByShortId.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFetchSpaceByShortId.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/useFetchSpaceByShortId.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,sEAAgD;AAEhD,iFAA2D;AAE3D,SAAS,sBAAsB;IAA/B,iBAwBC;IAvBS,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEhC,IAAM,mBAAmB,GAAG,IAAA,mBAAW,EACrC,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,kBAAe,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,71 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ var react_1 = require("react");
43
+ var useProject_1 = __importDefault(require("../projects/useProject"));
44
+ var useAxiosPrivate_1 = __importDefault(require("../../config/useAxiosPrivate"));
45
+ function useFetchSpaceBySlug() {
46
+ var _this = this;
47
+ var projectId = (0, useProject_1.default)().projectId;
48
+ var axios = (0, useAxiosPrivate_1.default)();
49
+ var fetchSpaceBySlug = (0, react_1.useCallback)(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
50
+ var response;
51
+ var slug = _b.slug;
52
+ return __generator(this, function (_c) {
53
+ switch (_c.label) {
54
+ case 0:
55
+ if (!projectId) {
56
+ throw new Error("No projectId available.");
57
+ }
58
+ if (!slug) {
59
+ throw new Error("Please pass a slug");
60
+ }
61
+ return [4 /*yield*/, axios.get("/".concat(projectId, "/spaces/by-slug?slug=").concat(slug))];
62
+ case 1:
63
+ response = _c.sent();
64
+ return [2 /*return*/, response.data];
65
+ }
66
+ });
67
+ }); }, [projectId]);
68
+ return fetchSpaceBySlug;
69
+ }
70
+ exports.default = useFetchSpaceBySlug;
71
+ //# sourceMappingURL=useFetchSpaceBySlug.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFetchSpaceBySlug.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/useFetchSpaceBySlug.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,sEAAgD;AAEhD,iFAA2D;AAE3D,SAAS,mBAAmB;IAA5B,iBAwBC;IAvBS,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEhC,IAAM,gBAAgB,GAAG,IAAA,mBAAW,EAClC,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,kBAAe,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,70 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ var react_1 = require("react");
43
+ var useProject_1 = __importDefault(require("../projects/useProject"));
44
+ var axios_1 = __importDefault(require("../../config/axios"));
45
+ function useFetchSpaceChildren() {
46
+ var _this = this;
47
+ var projectId = (0, useProject_1.default)().projectId;
48
+ var fetchSpaceChildren = (0, react_1.useCallback)(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
49
+ var response;
50
+ var spaceId = _b.spaceId, _c = _b.page, page = _c === void 0 ? 1 : _c, _d = _b.limit, limit = _d === void 0 ? 20 : _d;
51
+ return __generator(this, function (_e) {
52
+ switch (_e.label) {
53
+ case 0:
54
+ if (!projectId) {
55
+ throw new Error("No projectId available.");
56
+ }
57
+ if (!spaceId) {
58
+ throw new Error("Please pass a spaceId");
59
+ }
60
+ return [4 /*yield*/, axios_1.default.get("/".concat(projectId, "/spaces/").concat(spaceId, "/children?page=").concat(page, "&limit=").concat(limit))];
61
+ case 1:
62
+ response = _e.sent();
63
+ return [2 /*return*/, response.data];
64
+ }
65
+ });
66
+ }); }, [projectId]);
67
+ return fetchSpaceChildren;
68
+ }
69
+ exports.default = useFetchSpaceChildren;
70
+ //# sourceMappingURL=useFetchSpaceChildren.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFetchSpaceChildren.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/useFetchSpaceChildren.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,sEAAgD;AAEhD,6DAAuC;AAQvC,SAAS,qBAAqB;IAA9B,iBAuBC;IAtBS,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IAEnC,IAAM,kBAAkB,GAAG,IAAA,mBAAW,EACpC,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,eAAK,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,kBAAe,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,82 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ var react_1 = require("react");
43
+ var useProject_1 = __importDefault(require("../projects/useProject"));
44
+ var useAxiosPrivate_1 = __importDefault(require("../../config/useAxiosPrivate"));
45
+ function useFetchSpaceMembers() {
46
+ var _this = this;
47
+ var projectId = (0, useProject_1.default)().projectId;
48
+ var axios = (0, useAxiosPrivate_1.default)();
49
+ var fetchSpaceMembers = (0, react_1.useCallback)(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
50
+ var queryParams, queryString, url, response;
51
+ var spaceId = _b.spaceId, page = _b.page, limit = _b.limit, role = _b.role, status = _b.status;
52
+ return __generator(this, function (_c) {
53
+ switch (_c.label) {
54
+ case 0:
55
+ if (!projectId) {
56
+ throw new Error("No projectId available.");
57
+ }
58
+ if (!spaceId) {
59
+ throw new Error("Please pass a spaceId");
60
+ }
61
+ queryParams = new URLSearchParams();
62
+ if (page !== undefined)
63
+ queryParams.append("page", page.toString());
64
+ if (limit !== undefined)
65
+ queryParams.append("limit", limit.toString());
66
+ if (role)
67
+ queryParams.append("role", role);
68
+ if (status)
69
+ queryParams.append("status", status);
70
+ queryString = queryParams.toString();
71
+ url = "/".concat(projectId, "/spaces/").concat(spaceId, "/members").concat(queryString ? "?".concat(queryString) : "");
72
+ return [4 /*yield*/, axios.get(url)];
73
+ case 1:
74
+ response = _c.sent();
75
+ return [2 /*return*/, response.data];
76
+ }
77
+ });
78
+ }); }, [projectId]);
79
+ return fetchSpaceMembers;
80
+ }
81
+ exports.default = useFetchSpaceMembers;
82
+ //# sourceMappingURL=useFetchSpaceMembers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFetchSpaceMembers.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/useFetchSpaceMembers.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,sEAAgD;AAMhD,iFAA2D;AAU3D,SAAS,oBAAoB;IAA7B,iBA+BC;IA9BS,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEhC,IAAM,iBAAiB,GAAG,IAAA,mBAAW,EACnC,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,kBAAe,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,71 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ var react_1 = require("react");
43
+ var useProject_1 = __importDefault(require("../projects/useProject"));
44
+ var useAxiosPrivate_1 = __importDefault(require("../../config/useAxiosPrivate"));
45
+ function useJoinSpace() {
46
+ var _this = this;
47
+ var projectId = (0, useProject_1.default)().projectId;
48
+ var axios = (0, useAxiosPrivate_1.default)();
49
+ var joinSpace = (0, react_1.useCallback)(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
50
+ var response;
51
+ var spaceId = _b.spaceId;
52
+ return __generator(this, function (_c) {
53
+ switch (_c.label) {
54
+ case 0:
55
+ if (!projectId) {
56
+ throw new Error("No projectId available.");
57
+ }
58
+ if (!spaceId) {
59
+ throw new Error("Please pass a spaceId");
60
+ }
61
+ return [4 /*yield*/, axios.post("/".concat(projectId, "/spaces/").concat(spaceId, "/join"))];
62
+ case 1:
63
+ response = _c.sent();
64
+ return [2 /*return*/, response.data];
65
+ }
66
+ });
67
+ }); }, [projectId]);
68
+ return joinSpace;
69
+ }
70
+ exports.default = useJoinSpace;
71
+ //# sourceMappingURL=useJoinSpace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useJoinSpace.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/useJoinSpace.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,sEAAgD;AAEhD,iFAA2D;AAE3D,SAAS,YAAY;IAArB,iBAsBC;IArBS,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEhC,IAAM,SAAS,GAAG,IAAA,mBAAW,EAC3B,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,kBAAe,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;