@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.
- package/dist/cjs/context/index.d.ts +1 -0
- package/dist/cjs/context/index.js +3 -1
- package/dist/cjs/context/index.js.map +1 -1
- package/dist/cjs/context/space-context.d.ts +9 -0
- package/dist/cjs/context/space-context.js +35 -0
- package/dist/cjs/context/space-context.js.map +1 -0
- package/dist/cjs/hooks/crypto/useSignTestingJwt.d.ts +1 -2
- package/dist/cjs/hooks/crypto/useSignTestingJwt.js +17 -10
- package/dist/cjs/hooks/crypto/useSignTestingJwt.js.map +1 -1
- package/dist/cjs/hooks/projects/useProjectData.js +1 -1
- package/dist/cjs/hooks/projects/useProjectData.js.map +1 -1
- package/dist/cjs/hooks/reports/index.d.ts +3 -0
- package/dist/cjs/hooks/reports/index.js +7 -1
- package/dist/cjs/hooks/reports/index.js.map +1 -1
- package/dist/cjs/hooks/reports/useFetchSpaceReports.d.ts +38 -0
- package/dist/cjs/hooks/reports/useFetchSpaceReports.js +96 -0
- package/dist/cjs/hooks/reports/useFetchSpaceReports.js.map +1 -0
- package/dist/cjs/hooks/reports/useHandleSpaceCommentReport.d.ts +30 -0
- package/dist/cjs/hooks/reports/useHandleSpaceCommentReport.js +92 -0
- package/dist/cjs/hooks/reports/useHandleSpaceCommentReport.js.map +1 -0
- package/dist/cjs/hooks/reports/useHandleSpaceEntityReport.d.ts +32 -0
- package/dist/cjs/hooks/reports/useHandleSpaceEntityReport.js +94 -0
- package/dist/cjs/hooks/reports/useHandleSpaceEntityReport.js.map +1 -0
- package/dist/cjs/hooks/space-lists/index.d.ts +3 -0
- package/dist/cjs/hooks/space-lists/index.js +11 -0
- package/dist/cjs/hooks/space-lists/index.js.map +1 -0
- package/dist/cjs/hooks/space-lists/useSpaceList.d.ts +36 -0
- package/dist/cjs/hooks/space-lists/useSpaceList.js +293 -0
- package/dist/cjs/hooks/space-lists/useSpaceList.js.map +1 -0
- package/dist/cjs/hooks/space-lists/useSpaceListActions.d.ts +33 -0
- package/dist/cjs/hooks/space-lists/useSpaceListActions.js +210 -0
- package/dist/cjs/hooks/space-lists/useSpaceListActions.js.map +1 -0
- package/dist/cjs/hooks/spaces/index.d.ts +23 -0
- package/dist/cjs/hooks/spaces/index.js +53 -0
- package/dist/cjs/hooks/spaces/index.js.map +1 -0
- package/dist/cjs/hooks/spaces/useApproveMember.d.ts +7 -0
- package/dist/cjs/hooks/spaces/useApproveMember.js +71 -0
- package/dist/cjs/hooks/spaces/useApproveMember.js.map +1 -0
- package/dist/cjs/hooks/spaces/useCheckSlugAvailability.d.ts +6 -0
- package/dist/cjs/hooks/spaces/useCheckSlugAvailability.js +71 -0
- package/dist/cjs/hooks/spaces/useCheckSlugAvailability.js.map +1 -0
- package/dist/cjs/hooks/spaces/useCreateSpace.d.ts +15 -0
- package/dist/cjs/hooks/spaces/useCreateSpace.js +70 -0
- package/dist/cjs/hooks/spaces/useCreateSpace.js.map +1 -0
- package/dist/cjs/hooks/spaces/useDeclineMember.d.ts +7 -0
- package/dist/cjs/hooks/spaces/useDeclineMember.js +71 -0
- package/dist/cjs/hooks/spaces/useDeclineMember.js.map +1 -0
- package/dist/cjs/hooks/spaces/useDeleteSpace.d.ts +5 -0
- package/dist/cjs/hooks/spaces/useDeleteSpace.js +71 -0
- package/dist/cjs/hooks/spaces/useDeleteSpace.js.map +1 -0
- package/dist/cjs/hooks/spaces/useFetchMySpaces.d.ts +8 -0
- package/dist/cjs/hooks/spaces/useFetchMySpaces.js +85 -0
- package/dist/cjs/hooks/spaces/useFetchMySpaces.js.map +1 -0
- package/dist/cjs/hooks/spaces/useFetchSpace.d.ts +5 -0
- package/dist/cjs/hooks/spaces/useFetchSpace.js +71 -0
- package/dist/cjs/hooks/spaces/useFetchSpace.js.map +1 -0
- package/dist/cjs/hooks/spaces/useFetchSpaceBreadcrumb.d.ts +5 -0
- package/dist/cjs/hooks/spaces/useFetchSpaceBreadcrumb.js +71 -0
- package/dist/cjs/hooks/spaces/useFetchSpaceBreadcrumb.js.map +1 -0
- package/dist/cjs/hooks/spaces/useFetchSpaceByShortId.d.ts +5 -0
- package/dist/cjs/hooks/spaces/useFetchSpaceByShortId.js +71 -0
- package/dist/cjs/hooks/spaces/useFetchSpaceByShortId.js.map +1 -0
- package/dist/cjs/hooks/spaces/useFetchSpaceBySlug.d.ts +5 -0
- package/dist/cjs/hooks/spaces/useFetchSpaceBySlug.js +71 -0
- package/dist/cjs/hooks/spaces/useFetchSpaceBySlug.js.map +1 -0
- package/dist/cjs/hooks/spaces/useFetchSpaceChildren.d.ts +8 -0
- package/dist/cjs/hooks/spaces/useFetchSpaceChildren.js +70 -0
- package/dist/cjs/hooks/spaces/useFetchSpaceChildren.js.map +1 -0
- package/dist/cjs/hooks/spaces/useFetchSpaceMembers.d.ts +10 -0
- package/dist/cjs/hooks/spaces/useFetchSpaceMembers.js +82 -0
- package/dist/cjs/hooks/spaces/useFetchSpaceMembers.js.map +1 -0
- package/dist/cjs/hooks/spaces/useJoinSpace.d.ts +5 -0
- package/dist/cjs/hooks/spaces/useJoinSpace.js +71 -0
- package/dist/cjs/hooks/spaces/useJoinSpace.js.map +1 -0
- package/dist/cjs/hooks/spaces/useLeaveSpace.d.ts +5 -0
- package/dist/cjs/hooks/spaces/useLeaveSpace.js +71 -0
- package/dist/cjs/hooks/spaces/useLeaveSpace.js.map +1 -0
- package/dist/cjs/hooks/spaces/useRemoveMember.d.ts +9 -0
- package/dist/cjs/hooks/spaces/useRemoveMember.js +71 -0
- package/dist/cjs/hooks/spaces/useRemoveMember.js.map +1 -0
- package/dist/cjs/hooks/spaces/useSpace.d.ts +3 -0
- package/dist/cjs/hooks/spaces/useSpace.js +13 -0
- package/dist/cjs/hooks/spaces/useSpace.js.map +1 -0
- package/dist/cjs/hooks/spaces/useSpaceData.d.ts +32 -0
- package/dist/cjs/hooks/spaces/useSpaceData.js +358 -0
- package/dist/cjs/hooks/spaces/useSpaceData.js.map +1 -0
- package/dist/cjs/hooks/spaces/useSpacePermissions.d.ts +18 -0
- package/dist/cjs/hooks/spaces/useSpacePermissions.js +53 -0
- package/dist/cjs/hooks/spaces/useSpacePermissions.js.map +1 -0
- package/dist/cjs/hooks/spaces/useUpdateMemberRole.d.ts +9 -0
- package/dist/cjs/hooks/spaces/useUpdateMemberRole.js +71 -0
- package/dist/cjs/hooks/spaces/useUpdateMemberRole.js.map +1 -0
- package/dist/cjs/hooks/spaces/useUpdateSpace.d.ts +17 -0
- package/dist/cjs/hooks/spaces/useUpdateSpace.js +71 -0
- package/dist/cjs/hooks/spaces/useUpdateSpace.js.map +1 -0
- package/dist/cjs/index.d.ts +10 -1
- package/dist/cjs/index.js +35 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interfaces/SpaceBreadcrumb.d.ts +5 -0
- package/dist/cjs/interfaces/SpaceBreadcrumb.js +3 -0
- package/dist/cjs/interfaces/SpaceBreadcrumb.js.map +1 -0
- package/dist/cjs/interfaces/SpaceListSortByOptions.d.ts +7 -0
- package/dist/cjs/interfaces/SpaceListSortByOptions.js +3 -0
- package/dist/cjs/interfaces/SpaceListSortByOptions.js.map +1 -0
- package/dist/cjs/interfaces/models/Space.d.ts +122 -0
- package/dist/cjs/interfaces/models/Space.js +3 -0
- package/dist/cjs/interfaces/models/Space.js.map +1 -0
- package/dist/cjs/interfaces/models/SpaceMember.d.ts +27 -0
- package/dist/cjs/interfaces/models/SpaceMember.js +3 -0
- package/dist/cjs/interfaces/models/SpaceMember.js.map +1 -0
- package/dist/cjs/interfaces/models/User.d.ts +1 -1
- package/dist/cjs/store/api/appNotificationsApi.d.ts +741 -221
- package/dist/cjs/store/api/baseApi.d.ts +1 -1
- package/dist/cjs/store/api/baseApi.js +2 -0
- package/dist/cjs/store/api/baseApi.js.map +1 -1
- package/dist/cjs/store/api/entityListsApi.d.ts +387 -127
- package/dist/cjs/store/api/listsApi.d.ts +786 -266
- package/dist/cjs/store/api/spacesApi.d.ts +10750 -0
- package/dist/cjs/store/api/spacesApi.js +501 -0
- package/dist/cjs/store/api/spacesApi.js.map +1 -0
- package/dist/cjs/store/api/userApi.d.ts +3 -3
- package/dist/cjs/store/index.d.ts +4 -2
- package/dist/cjs/store/rootReducer.d.ts +4 -2
- package/dist/cjs/store/rootReducer.js +2 -0
- package/dist/cjs/store/rootReducer.js.map +1 -1
- package/dist/cjs/store/slices/appNotificationsSlice.d.ts +2365 -11
- package/dist/cjs/store/slices/entityListsSlice.d.ts +1608 -12
- package/dist/cjs/store/slices/listsSlice.d.ts +1414 -14
- package/dist/cjs/store/slices/spaceListsSlice.d.ts +850 -0
- package/dist/cjs/store/slices/spaceListsSlice.js +226 -0
- package/dist/cjs/store/slices/spaceListsSlice.js.map +1 -0
- package/dist/cjs/store/slices/userSlice.d.ts +248 -8
- package/dist/esm/context/index.d.ts +1 -0
- package/dist/esm/context/index.js +1 -0
- package/dist/esm/context/index.js.map +1 -1
- package/dist/esm/context/space-context.d.ts +9 -0
- package/dist/esm/context/space-context.js +28 -0
- package/dist/esm/context/space-context.js.map +1 -0
- package/dist/esm/hooks/crypto/useSignTestingJwt.d.ts +1 -2
- package/dist/esm/hooks/crypto/useSignTestingJwt.js +17 -10
- package/dist/esm/hooks/crypto/useSignTestingJwt.js.map +1 -1
- package/dist/esm/hooks/projects/useProjectData.js +1 -1
- package/dist/esm/hooks/projects/useProjectData.js.map +1 -1
- package/dist/esm/hooks/reports/index.d.ts +3 -0
- package/dist/esm/hooks/reports/index.js +3 -0
- package/dist/esm/hooks/reports/index.js.map +1 -1
- package/dist/esm/hooks/reports/useFetchSpaceReports.d.ts +38 -0
- package/dist/esm/hooks/reports/useFetchSpaceReports.js +91 -0
- package/dist/esm/hooks/reports/useFetchSpaceReports.js.map +1 -0
- package/dist/esm/hooks/reports/useHandleSpaceCommentReport.d.ts +30 -0
- package/dist/esm/hooks/reports/useHandleSpaceCommentReport.js +87 -0
- package/dist/esm/hooks/reports/useHandleSpaceCommentReport.js.map +1 -0
- package/dist/esm/hooks/reports/useHandleSpaceEntityReport.d.ts +32 -0
- package/dist/esm/hooks/reports/useHandleSpaceEntityReport.js +89 -0
- package/dist/esm/hooks/reports/useHandleSpaceEntityReport.js.map +1 -0
- package/dist/esm/hooks/space-lists/index.d.ts +3 -0
- package/dist/esm/hooks/space-lists/index.js +3 -0
- package/dist/esm/hooks/space-lists/index.js.map +1 -0
- package/dist/esm/hooks/space-lists/useSpaceList.d.ts +36 -0
- package/dist/esm/hooks/space-lists/useSpaceList.js +288 -0
- package/dist/esm/hooks/space-lists/useSpaceList.js.map +1 -0
- package/dist/esm/hooks/space-lists/useSpaceListActions.d.ts +33 -0
- package/dist/esm/hooks/space-lists/useSpaceListActions.js +204 -0
- package/dist/esm/hooks/space-lists/useSpaceListActions.js.map +1 -0
- package/dist/esm/hooks/spaces/index.d.ts +23 -0
- package/dist/esm/hooks/spaces/index.js +27 -0
- package/dist/esm/hooks/spaces/index.js.map +1 -0
- package/dist/esm/hooks/spaces/useApproveMember.d.ts +7 -0
- package/dist/esm/hooks/spaces/useApproveMember.js +66 -0
- package/dist/esm/hooks/spaces/useApproveMember.js.map +1 -0
- package/dist/esm/hooks/spaces/useCheckSlugAvailability.d.ts +6 -0
- package/dist/esm/hooks/spaces/useCheckSlugAvailability.js +66 -0
- package/dist/esm/hooks/spaces/useCheckSlugAvailability.js.map +1 -0
- package/dist/esm/hooks/spaces/useCreateSpace.d.ts +15 -0
- package/dist/esm/hooks/spaces/useCreateSpace.js +65 -0
- package/dist/esm/hooks/spaces/useCreateSpace.js.map +1 -0
- package/dist/esm/hooks/spaces/useDeclineMember.d.ts +7 -0
- package/dist/esm/hooks/spaces/useDeclineMember.js +66 -0
- package/dist/esm/hooks/spaces/useDeclineMember.js.map +1 -0
- package/dist/esm/hooks/spaces/useDeleteSpace.d.ts +5 -0
- package/dist/esm/hooks/spaces/useDeleteSpace.js +66 -0
- package/dist/esm/hooks/spaces/useDeleteSpace.js.map +1 -0
- package/dist/esm/hooks/spaces/useFetchMySpaces.d.ts +8 -0
- package/dist/esm/hooks/spaces/useFetchMySpaces.js +80 -0
- package/dist/esm/hooks/spaces/useFetchMySpaces.js.map +1 -0
- package/dist/esm/hooks/spaces/useFetchSpace.d.ts +5 -0
- package/dist/esm/hooks/spaces/useFetchSpace.js +66 -0
- package/dist/esm/hooks/spaces/useFetchSpace.js.map +1 -0
- package/dist/esm/hooks/spaces/useFetchSpaceBreadcrumb.d.ts +5 -0
- package/dist/esm/hooks/spaces/useFetchSpaceBreadcrumb.js +66 -0
- package/dist/esm/hooks/spaces/useFetchSpaceBreadcrumb.js.map +1 -0
- package/dist/esm/hooks/spaces/useFetchSpaceByShortId.d.ts +5 -0
- package/dist/esm/hooks/spaces/useFetchSpaceByShortId.js +66 -0
- package/dist/esm/hooks/spaces/useFetchSpaceByShortId.js.map +1 -0
- package/dist/esm/hooks/spaces/useFetchSpaceBySlug.d.ts +5 -0
- package/dist/esm/hooks/spaces/useFetchSpaceBySlug.js +66 -0
- package/dist/esm/hooks/spaces/useFetchSpaceBySlug.js.map +1 -0
- package/dist/esm/hooks/spaces/useFetchSpaceChildren.d.ts +8 -0
- package/dist/esm/hooks/spaces/useFetchSpaceChildren.js +65 -0
- package/dist/esm/hooks/spaces/useFetchSpaceChildren.js.map +1 -0
- package/dist/esm/hooks/spaces/useFetchSpaceMembers.d.ts +10 -0
- package/dist/esm/hooks/spaces/useFetchSpaceMembers.js +77 -0
- package/dist/esm/hooks/spaces/useFetchSpaceMembers.js.map +1 -0
- package/dist/esm/hooks/spaces/useJoinSpace.d.ts +5 -0
- package/dist/esm/hooks/spaces/useJoinSpace.js +66 -0
- package/dist/esm/hooks/spaces/useJoinSpace.js.map +1 -0
- package/dist/esm/hooks/spaces/useLeaveSpace.d.ts +5 -0
- package/dist/esm/hooks/spaces/useLeaveSpace.js +66 -0
- package/dist/esm/hooks/spaces/useLeaveSpace.js.map +1 -0
- package/dist/esm/hooks/spaces/useRemoveMember.d.ts +9 -0
- package/dist/esm/hooks/spaces/useRemoveMember.js +66 -0
- package/dist/esm/hooks/spaces/useRemoveMember.js.map +1 -0
- package/dist/esm/hooks/spaces/useSpace.d.ts +3 -0
- package/dist/esm/hooks/spaces/useSpace.js +11 -0
- package/dist/esm/hooks/spaces/useSpace.js.map +1 -0
- package/dist/esm/hooks/spaces/useSpaceData.d.ts +32 -0
- package/dist/esm/hooks/spaces/useSpaceData.js +353 -0
- package/dist/esm/hooks/spaces/useSpaceData.js.map +1 -0
- package/dist/esm/hooks/spaces/useSpacePermissions.d.ts +18 -0
- package/dist/esm/hooks/spaces/useSpacePermissions.js +51 -0
- package/dist/esm/hooks/spaces/useSpacePermissions.js.map +1 -0
- package/dist/esm/hooks/spaces/useUpdateMemberRole.d.ts +9 -0
- package/dist/esm/hooks/spaces/useUpdateMemberRole.js +66 -0
- package/dist/esm/hooks/spaces/useUpdateMemberRole.js.map +1 -0
- package/dist/esm/hooks/spaces/useUpdateSpace.d.ts +17 -0
- package/dist/esm/hooks/spaces/useUpdateSpace.js +66 -0
- package/dist/esm/hooks/spaces/useUpdateSpace.js.map +1 -0
- package/dist/esm/index.d.ts +10 -1
- package/dist/esm/index.js +8 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces/SpaceBreadcrumb.d.ts +5 -0
- package/dist/esm/interfaces/SpaceBreadcrumb.js +2 -0
- package/dist/esm/interfaces/SpaceBreadcrumb.js.map +1 -0
- package/dist/esm/interfaces/SpaceListSortByOptions.d.ts +7 -0
- package/dist/esm/interfaces/SpaceListSortByOptions.js +2 -0
- package/dist/esm/interfaces/SpaceListSortByOptions.js.map +1 -0
- package/dist/esm/interfaces/models/Space.d.ts +122 -0
- package/dist/esm/interfaces/models/Space.js +2 -0
- package/dist/esm/interfaces/models/Space.js.map +1 -0
- package/dist/esm/interfaces/models/SpaceMember.d.ts +27 -0
- package/dist/esm/interfaces/models/SpaceMember.js +2 -0
- package/dist/esm/interfaces/models/SpaceMember.js.map +1 -0
- package/dist/esm/interfaces/models/User.d.ts +1 -1
- package/dist/esm/store/api/appNotificationsApi.d.ts +741 -221
- package/dist/esm/store/api/baseApi.d.ts +1 -1
- package/dist/esm/store/api/baseApi.js +2 -0
- package/dist/esm/store/api/baseApi.js.map +1 -1
- package/dist/esm/store/api/entityListsApi.d.ts +387 -127
- package/dist/esm/store/api/listsApi.d.ts +786 -266
- package/dist/esm/store/api/spacesApi.d.ts +10750 -0
- package/dist/esm/store/api/spacesApi.js +498 -0
- package/dist/esm/store/api/spacesApi.js.map +1 -0
- package/dist/esm/store/api/userApi.d.ts +3 -3
- package/dist/esm/store/index.d.ts +4 -2
- package/dist/esm/store/rootReducer.d.ts +4 -2
- package/dist/esm/store/rootReducer.js +2 -0
- package/dist/esm/store/rootReducer.js.map +1 -1
- package/dist/esm/store/slices/appNotificationsSlice.d.ts +2365 -11
- package/dist/esm/store/slices/entityListsSlice.d.ts +1608 -12
- package/dist/esm/store/slices/listsSlice.d.ts +1414 -14
- package/dist/esm/store/slices/spaceListsSlice.d.ts +850 -0
- package/dist/esm/store/slices/spaceListsSlice.js +223 -0
- package/dist/esm/store/slices/spaceListsSlice.js.map +1 -0
- package/dist/esm/store/slices/userSlice.d.ts +248 -8
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SpaceDetailed, ReadingPermission, PostingPermission } from "../../interfaces/models/Space";
|
|
2
|
+
export interface UpdateSpaceProps {
|
|
3
|
+
spaceId: string;
|
|
4
|
+
update: Partial<{
|
|
5
|
+
name: string;
|
|
6
|
+
slug: string | null;
|
|
7
|
+
description: string | null;
|
|
8
|
+
avatar: string | null;
|
|
9
|
+
banner: string | null;
|
|
10
|
+
readingPermission: ReadingPermission;
|
|
11
|
+
postingPermission: PostingPermission;
|
|
12
|
+
requireJoinApproval: boolean;
|
|
13
|
+
metadata: Record<string, any>;
|
|
14
|
+
}>;
|
|
15
|
+
}
|
|
16
|
+
declare function useUpdateSpace(): ({ spaceId, update }: UpdateSpaceProps) => Promise<SpaceDetailed>;
|
|
17
|
+
export default useUpdateSpace;
|
|
@@ -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 useUpdateSpace() {
|
|
41
|
+
var _this = this;
|
|
42
|
+
var projectId = useProject().projectId;
|
|
43
|
+
var axios = useAxiosPrivate();
|
|
44
|
+
var updateSpace = useCallback(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
|
|
45
|
+
var response;
|
|
46
|
+
var spaceId = _b.spaceId, update = _b.update;
|
|
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.patch("/".concat(projectId, "/spaces/").concat(spaceId), update)];
|
|
57
|
+
case 1:
|
|
58
|
+
response = _c.sent();
|
|
59
|
+
return [2 /*return*/, response.data];
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}); }, [projectId]);
|
|
63
|
+
return updateSpace;
|
|
64
|
+
}
|
|
65
|
+
export default useUpdateSpace;
|
|
66
|
+
//# sourceMappingURL=useUpdateSpace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUpdateSpace.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/useUpdateSpace.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAMhD,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAiB3D,SAAS,cAAc;IAAvB,iBAsBC;IArBS,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAEhC,IAAM,WAAW,GAAG,WAAW,CAC7B,gEAAO,EAAqC;;YAAnC,OAAO,aAAA,EAAE,MAAM,YAAA;;;;oBACtB,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,KAAK,CAAC,WAAI,SAAS,qBAAW,OAAO,CAAE,EAAE,MAAM,CAAC,EAAA;;oBAAvE,QAAQ,GAAG,SAA4D;oBAE7E,sBAAO,QAAQ,CAAC,IAAqB,EAAC;;;SACvC,EACD,CAAC,SAAS,CAAC,CACZ,CAAC;IAEF,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,eAAe,cAAc,CAAC"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { default as getPublicFileUrl } from "./helpers/getPublicFileUrl";
|
|
|
6
6
|
export { isDevelopment, isProduction, getApiBaseUrl, getEnvVar, } from "./utils/env";
|
|
7
7
|
export { reportReasons } from "./constants/reportReasons";
|
|
8
8
|
export type { ReportReasonKey } from "./constants/reportReasons";
|
|
9
|
-
export { ReplykeProvider, EntityProvider, CommentSectionProvider, } from "./context";
|
|
9
|
+
export { ReplykeProvider, EntityProvider, CommentSectionProvider, SpaceProvider, } from "./context";
|
|
10
10
|
export { useProject, useProjectData } from "./hooks/projects";
|
|
11
11
|
export { useSignTestingJwt } from "./hooks/crypto";
|
|
12
12
|
export { useAuth, type UseAuthValues } from "./hooks/auth";
|
|
@@ -15,11 +15,16 @@ export { useAppNotifications, useAppNotificationsActions, type UseAppNotificatio
|
|
|
15
15
|
export { useLists, useListsActions, useIsEntitySaved, type UseListsProps, type UseListsValues, } from "./hooks/lists";
|
|
16
16
|
export { useEntity, useEntityData, useCreateEntity, useDeleteEntity, useDownvoteEntity, useEntityVotes, useFetchEntity, useFetchEntityByForeignId, useFetchEntityByShortId, useIncrementEntityViews, useRemoveEntityDownvote, useRemoveEntityUpvote, useUpdateEntity, useUpvoteEntity, } from "./hooks/entities";
|
|
17
17
|
export { useEntityList, useEntityListActions, type UseEntityListProps, type UseEntityListValues, type EntityListFilters, type EntityListFetchOptions, } from "./hooks/entity-lists";
|
|
18
|
+
export { useSpace, useSpaceData, useFetchSpace, useFetchSpaceByShortId, useFetchSpaceBySlug, useFetchSpaceBreadcrumb, useFetchSpaceChildren, useCreateSpace, useUpdateSpace, useDeleteSpace, useJoinSpace, useLeaveSpace, useFetchSpaceMembers, useFetchMySpaces, useUpdateMemberRole, useApproveMember, useDeclineMember, useRemoveMember, useSpacePermissions, type UseSpaceDataProps, type UseSpaceDataValues, type CreateSpaceProps, type UpdateSpaceProps, } from "./hooks/spaces";
|
|
19
|
+
export { useSpaceList, useSpaceListActions, type UseSpaceListProps, type UseSpaceListValues, } from "./hooks/space-lists";
|
|
18
20
|
export { useCommentSection, useCommentSectionData, useCreateComment, useFetchManyComments, useFetchComment, useFetchCommentByForeignId, useReplies, useUpdateComment, useCommentVotes, useDeleteComment, useEntityComments, useProfileComments, } from "./hooks/comments";
|
|
19
21
|
export { useFetchUser, useFetchUserByForeignId, useCheckUsernameAvailability, useFetchUserSuggestions, useMentions, useUpdateUser, } from "./hooks/users";
|
|
20
22
|
export { useFetchFollowStatus, useFetchFollowers, useFetchFollowersByUserId, useFetchFollowersCount, useFetchFollowersCountByUserId, useFetchFollowing, useFetchFollowingByUserId, useFetchFollowingCount, useFetchFollowingCountByUserId, useFollowManager, useFollowUser, useUnfollowByFollowId, useUnfollowUserByUserId, } from "./hooks/relationships/follows";
|
|
21
23
|
export { useRequestConnection, useAcceptConnection, useDeclineConnection, useRemoveConnection, useFetchConnections, useFetchConnectionStatus, useRemoveConnectionByUserId, useFetchConnectionsCount, useFetchSentPendingConnections, useFetchReceivedPendingConnections, useFetchConnectionsByUserId, useFetchConnectionsCountByUserId, useConnectionManager, } from "./hooks/relationships/connections";
|
|
22
24
|
export { useCreateReport } from "./hooks/reports";
|
|
25
|
+
export { useFetchSpaceReports } from "./hooks/reports";
|
|
26
|
+
export { useHandleSpaceEntityReport } from "./hooks/reports";
|
|
27
|
+
export { useHandleSpaceCommentReport } from "./hooks/reports";
|
|
23
28
|
export { useGetMetadata } from "./hooks/utils";
|
|
24
29
|
export { useUploadFile } from "./hooks/storage";
|
|
25
30
|
export type { EntityCommentsTree } from "./interfaces/EntityCommentsTree";
|
|
@@ -29,6 +34,10 @@ export type { Entity } from "./interfaces/models/Entity";
|
|
|
29
34
|
export type { List } from "./interfaces/models/List";
|
|
30
35
|
export type { Comment, GifData } from "./interfaces/models/Comment";
|
|
31
36
|
export type { Mention } from "./interfaces/models/Mention";
|
|
37
|
+
export type { Space, SpaceDetailed, SpacePreview, SpaceMemberPermissions, ReadingPermission, PostingPermission, PaginationMeta, PaginatedResponse, MySpaceItem, MySpacesResponse, JoinSpaceResponse, LeaveSpaceResponse, UpdateMemberRoleResponse, ApproveMemberResponse, DeclineMemberResponse, DeleteSpaceResponse, } from "./interfaces/models/Space";
|
|
38
|
+
export type { SpaceMember, SpaceMemberRole, SpaceMemberStatus, SpaceMemberWithUser, SpaceMembersResponse, } from "./interfaces/models/SpaceMember";
|
|
39
|
+
export type { SpaceListSortByOptions, SpaceListFilters, } from "./interfaces/SpaceListSortByOptions";
|
|
40
|
+
export type { SpaceBreadcrumb } from "./interfaces/SpaceBreadcrumb";
|
|
32
41
|
export type { CommentsSortByOptions } from "./interfaces/CommentsSortByOptions";
|
|
33
42
|
export type { EntityListSortByOptions, SortDirection, SortType, } from "./interfaces/EntityListSortByOptions";
|
|
34
43
|
export { validateSortBy, validateMetadataPropertyName, validateSortType, } from "./interfaces/EntityListSortByOptions";
|
package/dist/esm/index.js
CHANGED
|
@@ -8,7 +8,7 @@ export { isDevelopment, isProduction, getApiBaseUrl, getEnvVar, } from "./utils/
|
|
|
8
8
|
// Constants
|
|
9
9
|
export { reportReasons } from "./constants/reportReasons";
|
|
10
10
|
// Context providers (Redux-powered by default)
|
|
11
|
-
export { ReplykeProvider, EntityProvider, CommentSectionProvider, } from "./context";
|
|
11
|
+
export { ReplykeProvider, EntityProvider, CommentSectionProvider, SpaceProvider, } from "./context";
|
|
12
12
|
// -- projects
|
|
13
13
|
export { useProject, useProjectData } from "./hooks/projects";
|
|
14
14
|
// -- crypto
|
|
@@ -25,6 +25,10 @@ export { useLists, useListsActions, useIsEntitySaved, } from "./hooks/lists";
|
|
|
25
25
|
export { useEntity, useEntityData, useCreateEntity, useDeleteEntity, useDownvoteEntity, useEntityVotes, useFetchEntity, useFetchEntityByForeignId, useFetchEntityByShortId, useIncrementEntityViews, useRemoveEntityDownvote, useRemoveEntityUpvote, useUpdateEntity, useUpvoteEntity, } from "./hooks/entities";
|
|
26
26
|
// -- entity lists
|
|
27
27
|
export { useEntityList, useEntityListActions, } from "./hooks/entity-lists";
|
|
28
|
+
// -- spaces
|
|
29
|
+
export { useSpace, useSpaceData, useFetchSpace, useFetchSpaceByShortId, useFetchSpaceBySlug, useFetchSpaceBreadcrumb, useFetchSpaceChildren, useCreateSpace, useUpdateSpace, useDeleteSpace, useJoinSpace, useLeaveSpace, useFetchSpaceMembers, useFetchMySpaces, useUpdateMemberRole, useApproveMember, useDeclineMember, useRemoveMember, useSpacePermissions, } from "./hooks/spaces";
|
|
30
|
+
// -- space lists
|
|
31
|
+
export { useSpaceList, useSpaceListActions, } from "./hooks/space-lists";
|
|
28
32
|
// -- comments
|
|
29
33
|
export { useCommentSection, useCommentSectionData, useCreateComment, useFetchManyComments, useFetchComment, useFetchCommentByForeignId, useReplies, useUpdateComment, useCommentVotes, useDeleteComment, useEntityComments, useProfileComments, } from "./hooks/comments";
|
|
30
34
|
// -- users
|
|
@@ -35,6 +39,9 @@ export { useFetchFollowStatus, useFetchFollowers, useFetchFollowersByUserId, use
|
|
|
35
39
|
export { useRequestConnection, useAcceptConnection, useDeclineConnection, useRemoveConnection, useFetchConnections, useFetchConnectionStatus, useRemoveConnectionByUserId, useFetchConnectionsCount, useFetchSentPendingConnections, useFetchReceivedPendingConnections, useFetchConnectionsByUserId, useFetchConnectionsCountByUserId, useConnectionManager, } from "./hooks/relationships/connections";
|
|
36
40
|
// -- reports
|
|
37
41
|
export { useCreateReport } from "./hooks/reports";
|
|
42
|
+
export { useFetchSpaceReports } from "./hooks/reports";
|
|
43
|
+
export { useHandleSpaceEntityReport } from "./hooks/reports";
|
|
44
|
+
export { useHandleSpaceCommentReport } from "./hooks/reports";
|
|
38
45
|
// -- general
|
|
39
46
|
export { useGetMetadata } from "./hooks/utils";
|
|
40
47
|
// -- storage
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,sBAAsB;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EACL,aAAa,EACb,YAAY,EACZ,aAAa,EACb,SAAS,GACV,MAAM,aAAa,CAAC;AAErB,YAAY;AACZ,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAG1D,+CAA+C;AAC/C,OAAO,EACL,eAAe,EACf,cAAc,EACd,sBAAsB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpaceBreadcrumb.js","sourceRoot":"","sources":["../../../src/interfaces/SpaceBreadcrumb.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpaceListSortByOptions.js","sourceRoot":"","sources":["../../../src/interfaces/SpaceListSortByOptions.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
export type ReadingPermission = "anyone" | "members";
|
|
2
|
+
export type PostingPermission = "anyone" | "members" | "admins";
|
|
3
|
+
export type SpaceMemberRole = "admin" | "moderator" | "member";
|
|
4
|
+
export type SpaceMemberStatus = "pending" | "active" | "banned" | "rejected";
|
|
5
|
+
export interface SpaceMemberPermissions {
|
|
6
|
+
isAdmin: boolean;
|
|
7
|
+
isModerator: boolean;
|
|
8
|
+
isMember: boolean;
|
|
9
|
+
status: "pending" | "active" | "banned" | null;
|
|
10
|
+
canPost: boolean;
|
|
11
|
+
canModerate: boolean;
|
|
12
|
+
canRead: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface PaginationMeta {
|
|
15
|
+
page: number;
|
|
16
|
+
pageSize: number;
|
|
17
|
+
totalPages: number;
|
|
18
|
+
totalItems: number;
|
|
19
|
+
hasMore: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface PaginatedResponse<T> {
|
|
22
|
+
data: T[];
|
|
23
|
+
pagination: PaginationMeta;
|
|
24
|
+
}
|
|
25
|
+
export interface SpacePreview {
|
|
26
|
+
id: string;
|
|
27
|
+
shortId: string;
|
|
28
|
+
name: string;
|
|
29
|
+
slug: string | null;
|
|
30
|
+
avatar: string | null;
|
|
31
|
+
readingPermission?: ReadingPermission;
|
|
32
|
+
parentSpaceId?: string | null;
|
|
33
|
+
depth?: number;
|
|
34
|
+
}
|
|
35
|
+
export interface Space {
|
|
36
|
+
id: string;
|
|
37
|
+
projectId: string;
|
|
38
|
+
shortId: string;
|
|
39
|
+
slug: string | null;
|
|
40
|
+
name: string;
|
|
41
|
+
description: string | null;
|
|
42
|
+
avatar: string | null;
|
|
43
|
+
banner: string | null;
|
|
44
|
+
userId: string;
|
|
45
|
+
readingPermission: ReadingPermission;
|
|
46
|
+
postingPermission: PostingPermission;
|
|
47
|
+
requireJoinApproval: boolean;
|
|
48
|
+
parentSpaceId: string | null;
|
|
49
|
+
depth: number;
|
|
50
|
+
metadata: Record<string, any>;
|
|
51
|
+
createdAt: Date;
|
|
52
|
+
updatedAt: Date;
|
|
53
|
+
deletedAt: Date | null;
|
|
54
|
+
membersCount: number;
|
|
55
|
+
childSpacesCount: number;
|
|
56
|
+
}
|
|
57
|
+
export interface SpaceDetailed extends Space {
|
|
58
|
+
memberPermissions: SpaceMemberPermissions | null;
|
|
59
|
+
parentSpace: SpacePreview | null;
|
|
60
|
+
childSpaces: SpacePreview[];
|
|
61
|
+
}
|
|
62
|
+
export interface MySpaceItem {
|
|
63
|
+
space: Space;
|
|
64
|
+
membership: {
|
|
65
|
+
membershipId: string;
|
|
66
|
+
role: SpaceMemberRole;
|
|
67
|
+
status: SpaceMemberStatus;
|
|
68
|
+
joinedAt: Date;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
export type MySpacesResponse = PaginatedResponse<MySpaceItem>;
|
|
72
|
+
export interface JoinSpaceResponse {
|
|
73
|
+
message: string;
|
|
74
|
+
membership: {
|
|
75
|
+
id: string;
|
|
76
|
+
spaceId: string;
|
|
77
|
+
userId: string;
|
|
78
|
+
role: "member";
|
|
79
|
+
status: "pending" | "active";
|
|
80
|
+
joinedAt: Date;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export interface LeaveSpaceResponse {
|
|
84
|
+
message: string;
|
|
85
|
+
}
|
|
86
|
+
export interface UpdateMemberRoleResponse {
|
|
87
|
+
message: string;
|
|
88
|
+
membership: {
|
|
89
|
+
id: string;
|
|
90
|
+
role: SpaceMemberRole;
|
|
91
|
+
status: string;
|
|
92
|
+
joinedAt: Date;
|
|
93
|
+
userId: string;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
export interface ApproveMemberResponse {
|
|
97
|
+
message: string;
|
|
98
|
+
membership: {
|
|
99
|
+
id: string;
|
|
100
|
+
status: "active";
|
|
101
|
+
joinedAt: Date;
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
export interface DeclineMemberResponse {
|
|
105
|
+
message: string;
|
|
106
|
+
membership: {
|
|
107
|
+
id: string;
|
|
108
|
+
status: "rejected";
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
export interface DeleteSpaceResponse {
|
|
112
|
+
message: string;
|
|
113
|
+
deletedSpace: {
|
|
114
|
+
id: string;
|
|
115
|
+
name: string;
|
|
116
|
+
};
|
|
117
|
+
counts: {
|
|
118
|
+
entities: number;
|
|
119
|
+
members: number;
|
|
120
|
+
childSpaces: number;
|
|
121
|
+
};
|
|
122
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Space.js","sourceRoot":"","sources":["../../../../src/interfaces/models/Space.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { PaginatedResponse } from "./Space";
|
|
2
|
+
export type SpaceMemberRole = "admin" | "moderator" | "member";
|
|
3
|
+
export type SpaceMemberStatus = "pending" | "active" | "banned" | "rejected";
|
|
4
|
+
export interface SpaceMember {
|
|
5
|
+
id: string;
|
|
6
|
+
projectId: string;
|
|
7
|
+
spaceId: string;
|
|
8
|
+
userId: string;
|
|
9
|
+
role: SpaceMemberRole;
|
|
10
|
+
status: SpaceMemberStatus;
|
|
11
|
+
joinedAt: Date;
|
|
12
|
+
createdAt: Date;
|
|
13
|
+
}
|
|
14
|
+
export interface SpaceMemberWithUser {
|
|
15
|
+
membershipId: string;
|
|
16
|
+
role: SpaceMemberRole;
|
|
17
|
+
status: SpaceMemberStatus;
|
|
18
|
+
joinedAt: Date;
|
|
19
|
+
user: {
|
|
20
|
+
id: string;
|
|
21
|
+
username: string;
|
|
22
|
+
displayName: string;
|
|
23
|
+
avatar: string;
|
|
24
|
+
metadata: object;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export type SpaceMembersResponse = PaginatedResponse<SpaceMemberWithUser>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpaceMember.js","sourceRoot":"","sources":["../../../../src/interfaces/models/SpaceMember.ts"],"names":[],"mappings":""}
|
|
@@ -24,7 +24,7 @@ export type UserFull = {
|
|
|
24
24
|
updatedAt: Date;
|
|
25
25
|
deletedAt: Date | null;
|
|
26
26
|
};
|
|
27
|
-
export type AuthUser = Pick<UserFull, "id" | "projectId" | "foreignId" | "role" | "email" | "name" | "username" | "avatar" | "bio" | "birthdate" | "metadata" | "reputation" | "isVerified" | "isActive" | "lastActive"> & {
|
|
27
|
+
export type AuthUser = Pick<UserFull, "id" | "projectId" | "foreignId" | "role" | "email" | "name" | "username" | "avatar" | "bio" | "birthdate" | "metadata" | "reputation" | "isVerified" | "isActive" | "lastActive" | "createdAt"> & {
|
|
28
28
|
suspensions: {
|
|
29
29
|
reason: string | null;
|
|
30
30
|
startDate: Date;
|