@replyke/core 7.0.0-beta.77 → 7.0.0-beta.78
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/hooks/comments/useCommentSectionData.js +5 -0
- package/dist/cjs/hooks/comments/useCommentSectionData.js.map +1 -1
- package/dist/cjs/hooks/reactions/useAddReaction.d.ts +1 -1
- package/dist/cjs/hooks/reactions/useAddReaction.js +1 -1
- package/dist/cjs/hooks/reactions/useReactionToggle.d.ts +1 -1
- package/dist/cjs/hooks/reactions/useRemoveReaction.d.ts +1 -1
- package/dist/cjs/hooks/reactions/useRemoveReaction.js +1 -1
- package/dist/cjs/hooks/reports/useCreateReport.js +2 -2
- package/dist/cjs/hooks/reports/useFetchModeratedReports.d.ts +14 -8
- package/dist/cjs/hooks/reports/useFetchModeratedReports.js +1 -1
- package/dist/cjs/hooks/reports/useFetchModeratedReports.js.map +1 -1
- package/dist/cjs/hooks/reports/useHandleSpaceCommentReport.d.ts +3 -3
- package/dist/cjs/hooks/reports/useHandleSpaceCommentReport.js +2 -2
- package/dist/cjs/hooks/reports/useHandleSpaceEntityReport.d.ts +3 -3
- package/dist/cjs/hooks/reports/useHandleSpaceEntityReport.js +2 -2
- package/dist/cjs/hooks/spaces/index.d.ts +2 -0
- package/dist/cjs/hooks/spaces/index.js +6 -1
- package/dist/cjs/hooks/spaces/index.js.map +1 -1
- package/dist/cjs/hooks/spaces/useModerateSpaceComment.d.ts +26 -0
- package/dist/cjs/hooks/spaces/useModerateSpaceComment.js +85 -0
- package/dist/cjs/hooks/spaces/useModerateSpaceComment.js.map +1 -0
- package/dist/cjs/hooks/spaces/useModerateSpaceEntity.d.ts +26 -0
- package/dist/cjs/hooks/spaces/useModerateSpaceEntity.js +85 -0
- package/dist/cjs/hooks/spaces/useModerateSpaceEntity.js.map +1 -0
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +4 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interfaces/models/Comment.d.ts +5 -0
- package/dist/cjs/interfaces/models/Entity.d.ts +5 -0
- package/dist/cjs/interfaces/models/Reaction.d.ts +1 -1
- package/dist/cjs/interfaces/models/User.d.ts +2 -3
- package/dist/cjs/store/api/appNotificationsApi.d.ts +181 -181
- package/dist/cjs/store/api/baseApi.d.ts +2 -2
- package/dist/cjs/store/api/collectionsApi.d.ts +319 -319
- package/dist/cjs/store/api/entityListsApi.d.ts +107 -107
- package/dist/cjs/store/api/spacesApi.d.ts +950 -950
- package/dist/cjs/store/api/userApi.d.ts +3 -3
- package/dist/cjs/store/hooks.d.ts +1 -1
- package/dist/cjs/store/index.d.ts +2 -2
- package/dist/cjs/store/rootReducer.d.ts +2 -2
- package/dist/cjs/store/slices/entityListsSlice.d.ts +60 -0
- package/dist/esm/hooks/comments/useCommentSectionData.js +5 -0
- package/dist/esm/hooks/comments/useCommentSectionData.js.map +1 -1
- package/dist/esm/hooks/reactions/useAddReaction.d.ts +1 -1
- package/dist/esm/hooks/reactions/useAddReaction.js +1 -1
- package/dist/esm/hooks/reactions/useReactionToggle.d.ts +1 -1
- package/dist/esm/hooks/reactions/useRemoveReaction.d.ts +1 -1
- package/dist/esm/hooks/reactions/useRemoveReaction.js +1 -1
- package/dist/esm/hooks/reports/useCreateReport.js +2 -2
- package/dist/esm/hooks/reports/useFetchModeratedReports.d.ts +14 -8
- package/dist/esm/hooks/reports/useFetchModeratedReports.js +1 -1
- package/dist/esm/hooks/reports/useFetchModeratedReports.js.map +1 -1
- package/dist/esm/hooks/reports/useHandleSpaceCommentReport.d.ts +3 -3
- package/dist/esm/hooks/reports/useHandleSpaceCommentReport.js +2 -2
- package/dist/esm/hooks/reports/useHandleSpaceEntityReport.d.ts +3 -3
- package/dist/esm/hooks/reports/useHandleSpaceEntityReport.js +2 -2
- package/dist/esm/hooks/spaces/index.d.ts +2 -0
- package/dist/esm/hooks/spaces/index.js +3 -0
- package/dist/esm/hooks/spaces/index.js.map +1 -1
- package/dist/esm/hooks/spaces/useModerateSpaceComment.d.ts +26 -0
- package/dist/esm/hooks/spaces/useModerateSpaceComment.js +80 -0
- package/dist/esm/hooks/spaces/useModerateSpaceComment.js.map +1 -0
- package/dist/esm/hooks/spaces/useModerateSpaceEntity.d.ts +26 -0
- package/dist/esm/hooks/spaces/useModerateSpaceEntity.js +80 -0
- package/dist/esm/hooks/spaces/useModerateSpaceEntity.js.map +1 -0
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces/models/Comment.d.ts +5 -0
- package/dist/esm/interfaces/models/Entity.d.ts +5 -0
- package/dist/esm/interfaces/models/Reaction.d.ts +1 -1
- package/dist/esm/interfaces/models/User.d.ts +2 -3
- package/dist/esm/store/api/appNotificationsApi.d.ts +181 -181
- package/dist/esm/store/api/baseApi.d.ts +2 -2
- package/dist/esm/store/api/collectionsApi.d.ts +319 -319
- package/dist/esm/store/api/entityListsApi.d.ts +107 -107
- package/dist/esm/store/api/spacesApi.d.ts +950 -950
- package/dist/esm/store/api/userApi.d.ts +3 -3
- package/dist/esm/store/hooks.d.ts +1 -1
- package/dist/esm/store/index.d.ts +2 -2
- package/dist/esm/store/rootReducer.d.ts +2 -2
- package/dist/esm/store/slices/entityListsSlice.d.ts +60 -0
- package/package.json +1 -1
|
@@ -180,6 +180,11 @@ function useCommentSectionData(props) {
|
|
|
180
180
|
parentDeletedAt: null,
|
|
181
181
|
repliesCount: 0,
|
|
182
182
|
metadata: {},
|
|
183
|
+
moderationStatus: null,
|
|
184
|
+
moderatedAt: null,
|
|
185
|
+
moderatedById: null,
|
|
186
|
+
moderatedByType: null,
|
|
187
|
+
moderationReason: null,
|
|
183
188
|
};
|
|
184
189
|
setRepliedToComment(null);
|
|
185
190
|
setShowReplyBanner(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCommentSectionData.js","sourceRoot":"","sources":["../../../../src/hooks/comments/useCommentSectionData.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAiE;AAMjE,wEAAkD;AAElD,uDAAsD;AACtD,wEAAkD;AAClD,wEAAkD;AAClD,0EAAoD;AACpD,sEAAgD;AAChD,gCAAkC;AAGlC,wCAKqB;AACrB,6CAA4C;AAC5C,sDAAqD;AA2DrD,SAAS,qBAAqB,CAC5B,KAAiC;IADnC,
|
|
1
|
+
{"version":3,"file":"useCommentSectionData.js","sourceRoot":"","sources":["../../../../src/hooks/comments/useCommentSectionData.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAiE;AAMjE,wEAAkD;AAElD,uDAAsD;AACtD,wEAAkD;AAClD,wEAAkD;AAClD,0EAAoD;AACpD,sEAAgD;AAChD,gCAAkC;AAGlC,wCAKqB;AACrB,6CAA4C;AAC5C,sDAAqD;AA2DrD,SAAS,qBAAqB,CAC5B,KAAiC;IADnC,iBAiZC;IA7YG,IAAQ,UAAU,GAUhB,KAAK,OAVW,EAClB,QAAQ,GASN,KAAK,SATC,EACR,SAAS,GAQP,KAAK,UARE,EACT,OAAO,GAOL,KAAK,QAPA,EACP,gBAAgB,GAMd,KAAK,iBANS,EAEhB,KAIE,KAAK,cAJuC,EAA9C,aAAa,mBAAG,KAA8B,KAAA,EAC9C,KAGE,KAAK,MAHG,EAAV,KAAK,mBAAG,EAAE,KAAA,EACV,KAEE,KAAK,UAFsB,EAAlB,aAAa,mBAAG,EAAE,KAAA,EAC7B,oBAAoB,GAClB,KAAK,qBADa,CACZ;IAEV,kEAAkE;IAClE,IAAM,SAAS,GAAG,IAAA,iCAAe,EAAC,aAAa,CAAC,CAAC;IAE3C,IAAA,KACJ,IAAA,oBAAS,GAAE,EADG,iBAAiB,YAAA,EAAa,gBAAgB,eACjD,CAAC;IACR,IAAA,KAAsB,IAAA,gBAAQ,EAClC,UAA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sB;QACtB,oBAAoB;QACpB,QAAQ;QACR,SAAS;QACT,OAAO;QACP,MAAM;QACN,gBAAgB;KACjB,CAAC,CAAC;IAEH,OAAO;QACL,MAAM,QAAA;QACN,SAAS,WAAA;QAET,kBAAkB,oBAAA;QAClB,QAAQ,UAAA;QACR,WAAW,aAAA;QACX,kBAAkB,oBAAA;QAElB,OAAO,SAAA;QACP,OAAO,SAAA;QACP,iBAAiB,EAAE,sBAAsB;QAEzC,QAAQ,UAAA;QACR,MAAM,QAAA;QACN,SAAS,WAAA;QACT,WAAW,aAAA;QACX,eAAe,iBAAA;QACf,kBAAkB,oBAAA;QAClB,gBAAgB,kBAAA;QAChB,mBAAmB,qBAAA;QACnB,eAAe,iBAAA;QACf,kBAAkB,oBAAA;QAElB,iBAAiB,mBAAA;QACjB,qBAAqB,uBAAA;QAErB,kBAAkB,oBAAA;QAClB,eAAe,iBAAA;QAEf,aAAa,EAAE,mBAAmB;QAClC,aAAa,EAAE,mBAAmB;QAClC,aAAa,EAAE,mBAAmB;KACnC,CAAC;AACJ,CAAC;AAED,kBAAe,qBAAqB,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { Entity } from "../../interfaces/models/Entity";
|
|
|
2
2
|
import { Comment } from "../../interfaces/models/Comment";
|
|
3
3
|
import { ReactionType } from "../../interfaces/models/Reaction";
|
|
4
4
|
declare function useAddReaction(): (props: {
|
|
5
|
-
targetType: "
|
|
5
|
+
targetType: "entity" | "comment";
|
|
6
6
|
targetId: string;
|
|
7
7
|
reactionType: ReactionType;
|
|
8
8
|
}) => Promise<Entity | Comment>;
|
|
@@ -61,7 +61,7 @@ function useAddReaction() {
|
|
|
61
61
|
if (!projectId) {
|
|
62
62
|
throw new Error("No project specified");
|
|
63
63
|
}
|
|
64
|
-
endpoint = targetType === "
|
|
64
|
+
endpoint = targetType === "entity"
|
|
65
65
|
? "/".concat(projectId, "/entities/").concat(targetId, "/reactions")
|
|
66
66
|
: "/".concat(projectId, "/comments/").concat(targetId, "/reactions");
|
|
67
67
|
return [4 /*yield*/, axios.post(endpoint, { reactionType: reactionType })];
|
|
@@ -2,7 +2,7 @@ import { Entity } from "../../interfaces/models/Entity";
|
|
|
2
2
|
import { Comment } from "../../interfaces/models/Comment";
|
|
3
3
|
import { ReactionType, ReactionCounts } from "../../interfaces/models/Reaction";
|
|
4
4
|
export interface UseReactionToggleProps {
|
|
5
|
-
targetType: "
|
|
5
|
+
targetType: "entity" | "comment";
|
|
6
6
|
targetId: string | undefined;
|
|
7
7
|
initialReaction?: ReactionType | null | undefined;
|
|
8
8
|
initialReactionCounts?: ReactionCounts | null | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Entity } from "../../interfaces/models/Entity";
|
|
2
2
|
import { Comment } from "../../interfaces/models/Comment";
|
|
3
3
|
declare function useRemoveReaction(): (props: {
|
|
4
|
-
targetType: "
|
|
4
|
+
targetType: "entity" | "comment";
|
|
5
5
|
targetId: string;
|
|
6
6
|
}) => Promise<Entity | Comment>;
|
|
7
7
|
export default useRemoveReaction;
|
|
@@ -58,7 +58,7 @@ function useRemoveReaction() {
|
|
|
58
58
|
if (!projectId) {
|
|
59
59
|
throw new Error("No project specified");
|
|
60
60
|
}
|
|
61
|
-
endpoint = targetType === "
|
|
61
|
+
endpoint = targetType === "entity"
|
|
62
62
|
? "/".concat(projectId, "/entities/").concat(targetId, "/reactions")
|
|
63
63
|
: "/".concat(projectId, "/comments/").concat(targetId, "/reactions");
|
|
64
64
|
return [4 /*yield*/, axios.delete(endpoint)];
|
|
@@ -77,7 +77,7 @@ function useCreateReport(_a) {
|
|
|
77
77
|
switch (_c.label) {
|
|
78
78
|
case 0: return [4 /*yield*/, createReport({
|
|
79
79
|
targetId: targetId,
|
|
80
|
-
targetType: "
|
|
80
|
+
targetType: "comment",
|
|
81
81
|
reason: reason,
|
|
82
82
|
details: details,
|
|
83
83
|
})];
|
|
@@ -93,7 +93,7 @@ function useCreateReport(_a) {
|
|
|
93
93
|
switch (_c.label) {
|
|
94
94
|
case 0: return [4 /*yield*/, createReport({
|
|
95
95
|
targetId: targetId,
|
|
96
|
-
targetType: "
|
|
96
|
+
targetType: "entity",
|
|
97
97
|
reason: reason,
|
|
98
98
|
details: details,
|
|
99
99
|
})];
|
|
@@ -4,22 +4,28 @@ import { Comment } from "../../interfaces/models/Comment";
|
|
|
4
4
|
import { Space } from "../../interfaces/models/Space";
|
|
5
5
|
interface FetchModeratedReportsParams {
|
|
6
6
|
spaceId?: string;
|
|
7
|
-
targetType?: "
|
|
8
|
-
status?: "
|
|
7
|
+
targetType?: "comment" | "entity";
|
|
8
|
+
status?: "pending" | "on-hold" | "escalated" | "dismissed" | "actioned";
|
|
9
9
|
sortBy?: "new" | "old";
|
|
10
10
|
page?: number;
|
|
11
11
|
limit?: number;
|
|
12
12
|
}
|
|
13
|
+
interface ReportUserReport {
|
|
14
|
+
id: string;
|
|
15
|
+
userId: string;
|
|
16
|
+
reason: string;
|
|
17
|
+
details: string | null;
|
|
18
|
+
createdAt: Date;
|
|
19
|
+
}
|
|
13
20
|
interface Report {
|
|
14
21
|
id: string;
|
|
15
22
|
projectId: string;
|
|
16
23
|
spaceId: string | null;
|
|
17
|
-
reporters: string[];
|
|
18
24
|
targetId: string;
|
|
19
|
-
targetType: "
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
status: "
|
|
25
|
+
targetType: "comment" | "entity";
|
|
26
|
+
reporterCount: number;
|
|
27
|
+
userReports: ReportUserReport[];
|
|
28
|
+
status: "pending" | "on-hold" | "escalated" | "dismissed" | "actioned";
|
|
23
29
|
actionTaken: string | null;
|
|
24
30
|
target: Entity | Comment | null;
|
|
25
31
|
space: Space | null;
|
|
@@ -39,7 +45,7 @@ interface Report {
|
|
|
39
45
|
* // Fetch reports for a specific space
|
|
40
46
|
* const reports = await fetchModeratedReports({
|
|
41
47
|
* spaceId: "space-uuid",
|
|
42
|
-
* targetType: "
|
|
48
|
+
* targetType: "entity",
|
|
43
49
|
* page: 1,
|
|
44
50
|
* limit: 20
|
|
45
51
|
* });
|
|
@@ -54,7 +54,7 @@ var useAxiosPrivate_1 = __importDefault(require("../../config/useAxiosPrivate"))
|
|
|
54
54
|
* // Fetch reports for a specific space
|
|
55
55
|
* const reports = await fetchModeratedReports({
|
|
56
56
|
* spaceId: "space-uuid",
|
|
57
|
-
* targetType: "
|
|
57
|
+
* targetType: "entity",
|
|
58
58
|
* page: 1,
|
|
59
59
|
* limit: 20
|
|
60
60
|
* });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFetchModeratedReports.js","sourceRoot":"","sources":["../../../../src/hooks/reports/useFetchModeratedReports.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,sEAAgD;AAChD,iFAA2D;
|
|
1
|
+
{"version":3,"file":"useFetchModeratedReports.js","sourceRoot":"","sources":["../../../../src/hooks/reports/useFetchModeratedReports.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,sEAAgD;AAChD,iFAA2D;AAwC3D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,SAAS,wBAAwB;IAAjC,iBA4BC;IA3BS,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEhC,IAAM,qBAAqB,GAAG,IAAA,mBAAW,EACvC,gEAAO,EAOuB;;YAN5B,OAAO,aAAA,EACP,UAAU,gBAAA,EACV,MAAM,YAAA,EACN,MAAM,YAAA,EACN,IAAI,UAAA,EACJ,KAAK,WAAA;;;;oBAEL,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAEgB,qBAAM,KAAK,CAAC,GAAG,CAC9B,WAAI,SAAS,uBAAoB,EACjC,EAAE,MAAM,EAAE,EAAE,OAAO,SAAA,EAAE,UAAU,YAAA,EAAE,MAAM,QAAA,EAAE,MAAM,QAAA,EAAE,IAAI,MAAA,EAAE,KAAK,OAAA,EAAE,EAAE,CACjE,EAAA;;oBAHK,QAAQ,GAAG,SAGhB;oBAED,sBAAO,QAAQ,CAAC,IAAI,EAAC;;;SACtB,EACD,CAAC,SAAS,EAAE,KAAK,CAAC,CACnB,CAAC;IAEF,OAAO,qBAAqB,CAAC;AAC/B,CAAC;AAED,kBAAe,wBAAwB,CAAC"}
|
|
@@ -2,7 +2,7 @@ interface HandleSpaceCommentReportParams {
|
|
|
2
2
|
spaceId: string;
|
|
3
3
|
reportId: string;
|
|
4
4
|
commentId: string;
|
|
5
|
-
actions: Array<"
|
|
5
|
+
actions: Array<"remove-comment" | "ban-user" | "dismiss">;
|
|
6
6
|
summary: string;
|
|
7
7
|
userId?: string;
|
|
8
8
|
reason?: string;
|
|
@@ -13,7 +13,7 @@ interface HandleReportResponse {
|
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Hook to handle comment reports at the space level
|
|
16
|
-
* Space moderators can:
|
|
16
|
+
* Space moderators can: remove comment, ban user from space, dismiss
|
|
17
17
|
*
|
|
18
18
|
* @example
|
|
19
19
|
* const handleSpaceCommentReport = useHandleSpaceCommentReport();
|
|
@@ -22,7 +22,7 @@ interface HandleReportResponse {
|
|
|
22
22
|
* spaceId: "space-uuid",
|
|
23
23
|
* reportId: "report-uuid",
|
|
24
24
|
* commentId: "comment-uuid",
|
|
25
|
-
* actions: ["
|
|
25
|
+
* actions: ["remove-comment"],
|
|
26
26
|
* summary: "Removed inappropriate comment"
|
|
27
27
|
* });
|
|
28
28
|
*/
|
|
@@ -44,7 +44,7 @@ var useProject_1 = __importDefault(require("../projects/useProject"));
|
|
|
44
44
|
var useAxiosPrivate_1 = __importDefault(require("../../config/useAxiosPrivate"));
|
|
45
45
|
/**
|
|
46
46
|
* Hook to handle comment reports at the space level
|
|
47
|
-
* Space moderators can:
|
|
47
|
+
* Space moderators can: remove comment, ban user from space, dismiss
|
|
48
48
|
*
|
|
49
49
|
* @example
|
|
50
50
|
* const handleSpaceCommentReport = useHandleSpaceCommentReport();
|
|
@@ -53,7 +53,7 @@ var useAxiosPrivate_1 = __importDefault(require("../../config/useAxiosPrivate"))
|
|
|
53
53
|
* spaceId: "space-uuid",
|
|
54
54
|
* reportId: "report-uuid",
|
|
55
55
|
* commentId: "comment-uuid",
|
|
56
|
-
* actions: ["
|
|
56
|
+
* actions: ["remove-comment"],
|
|
57
57
|
* summary: "Removed inappropriate comment"
|
|
58
58
|
* });
|
|
59
59
|
*/
|
|
@@ -2,7 +2,7 @@ interface HandleSpaceEntityReportParams {
|
|
|
2
2
|
spaceId: string;
|
|
3
3
|
reportId: string;
|
|
4
4
|
entityId: string;
|
|
5
|
-
actions: Array<"
|
|
5
|
+
actions: Array<"remove-entity" | "ban-user" | "dismiss">;
|
|
6
6
|
summary: string;
|
|
7
7
|
userId?: string;
|
|
8
8
|
reason?: string;
|
|
@@ -13,7 +13,7 @@ interface HandleReportResponse {
|
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Hook to handle entity reports at the space level
|
|
16
|
-
* Space moderators can:
|
|
16
|
+
* Space moderators can: remove entity, ban user from space, dismiss
|
|
17
17
|
*
|
|
18
18
|
* @example
|
|
19
19
|
* const handleSpaceEntityReport = useHandleSpaceEntityReport();
|
|
@@ -22,7 +22,7 @@ interface HandleReportResponse {
|
|
|
22
22
|
* spaceId: "space-uuid",
|
|
23
23
|
* reportId: "report-uuid",
|
|
24
24
|
* entityId: "entity-uuid",
|
|
25
|
-
* actions: ["
|
|
25
|
+
* actions: ["remove-entity", "ban-user"],
|
|
26
26
|
* summary: "Removed spam content and banned user",
|
|
27
27
|
* userId: "user-uuid",
|
|
28
28
|
* reason: "Spamming"
|
|
@@ -44,7 +44,7 @@ var useProject_1 = __importDefault(require("../projects/useProject"));
|
|
|
44
44
|
var useAxiosPrivate_1 = __importDefault(require("../../config/useAxiosPrivate"));
|
|
45
45
|
/**
|
|
46
46
|
* Hook to handle entity reports at the space level
|
|
47
|
-
* Space moderators can:
|
|
47
|
+
* Space moderators can: remove entity, ban user from space, dismiss
|
|
48
48
|
*
|
|
49
49
|
* @example
|
|
50
50
|
* const handleSpaceEntityReport = useHandleSpaceEntityReport();
|
|
@@ -53,7 +53,7 @@ var useAxiosPrivate_1 = __importDefault(require("../../config/useAxiosPrivate"))
|
|
|
53
53
|
* spaceId: "space-uuid",
|
|
54
54
|
* reportId: "report-uuid",
|
|
55
55
|
* entityId: "entity-uuid",
|
|
56
|
-
* actions: ["
|
|
56
|
+
* actions: ["remove-entity", "ban-user"],
|
|
57
57
|
* summary: "Removed spam content and banned user",
|
|
58
58
|
* userId: "user-uuid",
|
|
59
59
|
* reason: "Spamming"
|
|
@@ -22,6 +22,8 @@ export { default as useUpdateMemberRole } from "./useUpdateMemberRole";
|
|
|
22
22
|
export { default as useApproveMember } from "./useApproveMember";
|
|
23
23
|
export { default as useDeclineMember } from "./useDeclineMember";
|
|
24
24
|
export { default as useRemoveMember } from "./useRemoveMember";
|
|
25
|
+
export { default as useModerateSpaceEntity } from "./useModerateSpaceEntity";
|
|
26
|
+
export { default as useModerateSpaceComment } from "./useModerateSpaceComment";
|
|
25
27
|
export { default as useSpacePermissions } from "./useSpacePermissions";
|
|
26
28
|
export { default as useCheckSlugAvailability } from "./useCheckSlugAvailability";
|
|
27
29
|
export { useCreateRule, useUpdateRule, useDeleteRule, useFetchRule, useFetchManyRules, useReorderRules, } from "./rules";
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.useReorderRules = exports.useFetchManyRules = exports.useFetchRule = exports.useDeleteRule = exports.useUpdateRule = exports.useCreateRule = exports.useCheckSlugAvailability = exports.useSpacePermissions = exports.useRemoveMember = exports.useDeclineMember = exports.useApproveMember = exports.useUpdateMemberRole = exports.useCheckMyMembership = exports.useFetchUserSpaces = exports.useFetchSpaceTeam = exports.useFetchSpaceMembers = exports.useLeaveSpace = exports.useJoinSpace = exports.useDeleteSpace = exports.useUpdateSpace = exports.useCreateSpace = exports.useFetchManySpaces = exports.useFetchSpaceChildren = exports.useFetchSpaceBreadcrumb = exports.useFetchSpaceBySlug = exports.useFetchSpaceByShortId = exports.useFetchSpace = exports.useSpaceData = exports.useSpace = void 0;
|
|
6
|
+
exports.useReorderRules = exports.useFetchManyRules = exports.useFetchRule = exports.useDeleteRule = exports.useUpdateRule = exports.useCreateRule = exports.useCheckSlugAvailability = exports.useSpacePermissions = exports.useModerateSpaceComment = exports.useModerateSpaceEntity = exports.useRemoveMember = exports.useDeclineMember = exports.useApproveMember = exports.useUpdateMemberRole = exports.useCheckMyMembership = exports.useFetchUserSpaces = exports.useFetchSpaceTeam = exports.useFetchSpaceMembers = exports.useLeaveSpace = exports.useJoinSpace = exports.useDeleteSpace = exports.useUpdateSpace = exports.useCreateSpace = exports.useFetchManySpaces = exports.useFetchSpaceChildren = exports.useFetchSpaceBreadcrumb = exports.useFetchSpaceBySlug = exports.useFetchSpaceByShortId = exports.useFetchSpace = exports.useSpaceData = exports.useSpace = void 0;
|
|
7
7
|
// Single space hooks
|
|
8
8
|
var useSpace_1 = require("./useSpace");
|
|
9
9
|
Object.defineProperty(exports, "useSpace", { enumerable: true, get: function () { return __importDefault(useSpace_1).default; } });
|
|
@@ -51,6 +51,11 @@ var useDeclineMember_1 = require("./useDeclineMember");
|
|
|
51
51
|
Object.defineProperty(exports, "useDeclineMember", { enumerable: true, get: function () { return __importDefault(useDeclineMember_1).default; } });
|
|
52
52
|
var useRemoveMember_1 = require("./useRemoveMember");
|
|
53
53
|
Object.defineProperty(exports, "useRemoveMember", { enumerable: true, get: function () { return __importDefault(useRemoveMember_1).default; } });
|
|
54
|
+
// Moderation hooks
|
|
55
|
+
var useModerateSpaceEntity_1 = require("./useModerateSpaceEntity");
|
|
56
|
+
Object.defineProperty(exports, "useModerateSpaceEntity", { enumerable: true, get: function () { return __importDefault(useModerateSpaceEntity_1).default; } });
|
|
57
|
+
var useModerateSpaceComment_1 = require("./useModerateSpaceComment");
|
|
58
|
+
Object.defineProperty(exports, "useModerateSpaceComment", { enumerable: true, get: function () { return __importDefault(useModerateSpaceComment_1).default; } });
|
|
54
59
|
// Helper hooks
|
|
55
60
|
var useSpacePermissions_1 = require("./useSpacePermissions");
|
|
56
61
|
Object.defineProperty(exports, "useSpacePermissions", { enumerable: true, get: function () { return __importDefault(useSpacePermissions_1).default; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/index.ts"],"names":[],"mappings":";;;;;;AAAA,qBAAqB;AACrB,uCAAiD;AAAxC,qHAAA,OAAO,OAAY;AAC5B,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAGhC,cAAc;AACd,iDAA2D;AAAlD,+HAAA,OAAO,OAAiB;AACjC,mEAA6E;AAApE,iJAAA,OAAO,OAA0B;AAC1C,6DAAuE;AAA9D,2IAAA,OAAO,OAAuB;AACvC,qEAA+E;AAAtE,mJAAA,OAAO,OAA2B;AAC3C,iEAA2E;AAAlE,+IAAA,OAAO,OAAyB;AACzC,2DAAqE;AAA5D,yIAAA,OAAO,OAAsB;AAEtC,aAAa;AACb,mDAA6D;AAApD,iIAAA,OAAO,OAAkB;AAElC,mDAA6D;AAApD,iIAAA,OAAO,OAAkB;AAElC,mDAA6D;AAApD,iIAAA,OAAO,OAAkB;AAElC,mBAAmB;AACnB,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,iDAA2D;AAAlD,+HAAA,OAAO,OAAiB;AACjC,+DAAyE;AAAhE,6IAAA,OAAO,OAAwB;AACxC,yDAAmE;AAA1D,uIAAA,OAAO,OAAqB;AAC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jC,+DAAyE;AAAhE,6IAAA,OAAO,OAAwB;AACxC,yDAAmE;AAA1D,uIAAA,OAAO,OAAqB;AACrC,2DAAqE;AAA5D,yIAAA,OAAO,OAAsB;AACtC,+DAAyE;AAAhE,6IAAA,OAAO,OAAwB;AAExC,0BAA0B;AAC1B,6DAAuE;AAA9D,2IAAA,OAAO,OAAuB;AACvC,uDAAiE;AAAxD,qIAAA,OAAO,OAAoB;AACpC,uDAAiE;AAAxD,qIAAA,OAAO,OAAoB;AACpC,qDAA+D;AAAtD,mIAAA,OAAO,OAAmB;AAEnC,mBAAmB;AACnB,mEAA6E;AAApE,iJAAA,OAAO,OAA0B;AAC1C,qEAA+E;AAAtE,mJAAA,OAAO,OAA2B;AAE3C,eAAe;AACf,6DAAuE;AAA9D,2IAAA,OAAO,OAAuB;AACvC,uEAAiF;AAAxE,qJAAA,OAAO,OAA4B;AAE5C,wBAAwB;AACxB,iCAOiB;AANf,sGAAA,aAAa,OAAA;AACb,sGAAA,aAAa,OAAA;AACb,sGAAA,aAAa,OAAA;AACb,qGAAA,YAAY,OAAA;AACZ,0GAAA,iBAAiB,OAAA;AACjB,wGAAA,eAAe,OAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
interface ModerateSpaceCommentParams {
|
|
2
|
+
spaceId: string;
|
|
3
|
+
commentId: string;
|
|
4
|
+
action: "approve" | "remove";
|
|
5
|
+
reason?: string;
|
|
6
|
+
}
|
|
7
|
+
interface ModerateResponse {
|
|
8
|
+
message: string;
|
|
9
|
+
moderationStatus: "approved" | "removed";
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Hook to moderate a comment within a space (approve or remove).
|
|
13
|
+
* Requires space moderator permissions.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const moderateSpaceComment = useModerateSpaceComment();
|
|
17
|
+
*
|
|
18
|
+
* await moderateSpaceComment({
|
|
19
|
+
* spaceId: "space-uuid",
|
|
20
|
+
* commentId: "comment-uuid",
|
|
21
|
+
* action: "remove",
|
|
22
|
+
* reason: "Spam content"
|
|
23
|
+
* });
|
|
24
|
+
*/
|
|
25
|
+
declare function useModerateSpaceComment(): ({ spaceId, commentId, action, reason, }: ModerateSpaceCommentParams) => Promise<ModerateResponse>;
|
|
26
|
+
export default useModerateSpaceComment;
|
|
@@ -0,0 +1,85 @@
|
|
|
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
|
+
/**
|
|
46
|
+
* Hook to moderate a comment within a space (approve or remove).
|
|
47
|
+
* Requires space moderator permissions.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* const moderateSpaceComment = useModerateSpaceComment();
|
|
51
|
+
*
|
|
52
|
+
* await moderateSpaceComment({
|
|
53
|
+
* spaceId: "space-uuid",
|
|
54
|
+
* commentId: "comment-uuid",
|
|
55
|
+
* action: "remove",
|
|
56
|
+
* reason: "Spam content"
|
|
57
|
+
* });
|
|
58
|
+
*/
|
|
59
|
+
function useModerateSpaceComment() {
|
|
60
|
+
var _this = this;
|
|
61
|
+
var projectId = (0, useProject_1.default)().projectId;
|
|
62
|
+
var axios = (0, useAxiosPrivate_1.default)();
|
|
63
|
+
var moderateSpaceComment = (0, react_1.useCallback)(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
|
|
64
|
+
var response;
|
|
65
|
+
var spaceId = _b.spaceId, commentId = _b.commentId, action = _b.action, reason = _b.reason;
|
|
66
|
+
return __generator(this, function (_c) {
|
|
67
|
+
switch (_c.label) {
|
|
68
|
+
case 0:
|
|
69
|
+
if (!projectId) {
|
|
70
|
+
throw new Error("No projectId available.");
|
|
71
|
+
}
|
|
72
|
+
if (!spaceId || !commentId) {
|
|
73
|
+
throw new Error("spaceId and commentId are required.");
|
|
74
|
+
}
|
|
75
|
+
return [4 /*yield*/, axios.patch("/".concat(projectId, "/spaces/").concat(spaceId, "/comments/").concat(commentId, "/moderation"), { action: action, reason: reason })];
|
|
76
|
+
case 1:
|
|
77
|
+
response = _c.sent();
|
|
78
|
+
return [2 /*return*/, response.data];
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}); }, [projectId, axios]);
|
|
82
|
+
return moderateSpaceComment;
|
|
83
|
+
}
|
|
84
|
+
exports.default = useModerateSpaceComment;
|
|
85
|
+
//# sourceMappingURL=useModerateSpaceComment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useModerateSpaceComment.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/useModerateSpaceComment.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,sEAAgD;AAChD,iFAA2D;AAc3D;;;;;;;;;;;;;GAaG;AACH,SAAS,uBAAuB;IAAhC,iBA8BC;IA7BS,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEhC,IAAM,oBAAoB,GAAG,IAAA,mBAAW,EACtC,gEAAO,EAKsB;;YAJ3B,OAAO,aAAA,EACP,SAAS,eAAA,EACT,MAAM,YAAA,EACN,MAAM,YAAA;;;;oBAEN,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAED,IAAI,CAAC,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC;wBAC3B,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;oBACzD,CAAC;oBAEgB,qBAAM,KAAK,CAAC,KAAK,CAChC,WAAI,SAAS,qBAAW,OAAO,uBAAa,SAAS,gBAAa,EAClE,EAAE,MAAM,QAAA,EAAE,MAAM,QAAA,EAAE,CACnB,EAAA;;oBAHK,QAAQ,GAAG,SAGhB;oBAED,sBAAO,QAAQ,CAAC,IAAwB,EAAC;;;SAC1C,EACD,CAAC,SAAS,EAAE,KAAK,CAAC,CACnB,CAAC;IAEF,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAED,kBAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
interface ModerateSpaceEntityParams {
|
|
2
|
+
spaceId: string;
|
|
3
|
+
entityId: string;
|
|
4
|
+
action: "approve" | "remove";
|
|
5
|
+
reason?: string;
|
|
6
|
+
}
|
|
7
|
+
interface ModerateResponse {
|
|
8
|
+
message: string;
|
|
9
|
+
moderationStatus: "approved" | "removed";
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Hook to moderate an entity within a space (approve or remove).
|
|
13
|
+
* Requires space moderator permissions.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const moderateSpaceEntity = useModerateSpaceEntity();
|
|
17
|
+
*
|
|
18
|
+
* await moderateSpaceEntity({
|
|
19
|
+
* spaceId: "space-uuid",
|
|
20
|
+
* entityId: "entity-uuid",
|
|
21
|
+
* action: "remove",
|
|
22
|
+
* reason: "Violates community guidelines"
|
|
23
|
+
* });
|
|
24
|
+
*/
|
|
25
|
+
declare function useModerateSpaceEntity(): ({ spaceId, entityId, action, reason, }: ModerateSpaceEntityParams) => Promise<ModerateResponse>;
|
|
26
|
+
export default useModerateSpaceEntity;
|
|
@@ -0,0 +1,85 @@
|
|
|
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
|
+
/**
|
|
46
|
+
* Hook to moderate an entity within a space (approve or remove).
|
|
47
|
+
* Requires space moderator permissions.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* const moderateSpaceEntity = useModerateSpaceEntity();
|
|
51
|
+
*
|
|
52
|
+
* await moderateSpaceEntity({
|
|
53
|
+
* spaceId: "space-uuid",
|
|
54
|
+
* entityId: "entity-uuid",
|
|
55
|
+
* action: "remove",
|
|
56
|
+
* reason: "Violates community guidelines"
|
|
57
|
+
* });
|
|
58
|
+
*/
|
|
59
|
+
function useModerateSpaceEntity() {
|
|
60
|
+
var _this = this;
|
|
61
|
+
var projectId = (0, useProject_1.default)().projectId;
|
|
62
|
+
var axios = (0, useAxiosPrivate_1.default)();
|
|
63
|
+
var moderateSpaceEntity = (0, react_1.useCallback)(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
|
|
64
|
+
var response;
|
|
65
|
+
var spaceId = _b.spaceId, entityId = _b.entityId, action = _b.action, reason = _b.reason;
|
|
66
|
+
return __generator(this, function (_c) {
|
|
67
|
+
switch (_c.label) {
|
|
68
|
+
case 0:
|
|
69
|
+
if (!projectId) {
|
|
70
|
+
throw new Error("No projectId available.");
|
|
71
|
+
}
|
|
72
|
+
if (!spaceId || !entityId) {
|
|
73
|
+
throw new Error("spaceId and entityId are required.");
|
|
74
|
+
}
|
|
75
|
+
return [4 /*yield*/, axios.patch("/".concat(projectId, "/spaces/").concat(spaceId, "/entities/").concat(entityId, "/moderation"), { action: action, reason: reason })];
|
|
76
|
+
case 1:
|
|
77
|
+
response = _c.sent();
|
|
78
|
+
return [2 /*return*/, response.data];
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}); }, [projectId, axios]);
|
|
82
|
+
return moderateSpaceEntity;
|
|
83
|
+
}
|
|
84
|
+
exports.default = useModerateSpaceEntity;
|
|
85
|
+
//# sourceMappingURL=useModerateSpaceEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useModerateSpaceEntity.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/useModerateSpaceEntity.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,sEAAgD;AAChD,iFAA2D;AAc3D;;;;;;;;;;;;;GAaG;AACH,SAAS,sBAAsB;IAA/B,iBA8BC;IA7BS,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEhC,IAAM,mBAAmB,GAAG,IAAA,mBAAW,EACrC,gEAAO,EAKqB;;YAJ1B,OAAO,aAAA,EACP,QAAQ,cAAA,EACR,MAAM,YAAA,EACN,MAAM,YAAA;;;;oBAEN,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAED,IAAI,CAAC,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;wBAC1B,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;oBACxD,CAAC;oBAEgB,qBAAM,KAAK,CAAC,KAAK,CAChC,WAAI,SAAS,qBAAW,OAAO,uBAAa,QAAQ,gBAAa,EACjE,EAAE,MAAM,QAAA,EAAE,MAAM,QAAA,EAAE,CACnB,EAAA;;oBAHK,QAAQ,GAAG,SAGhB;oBAED,sBAAO,QAAQ,CAAC,IAAwB,EAAC;;;SAC1C,EACD,CAAC,SAAS,EAAE,KAAK,CAAC,CACnB,CAAC;IAEF,OAAO,mBAAmB,CAAC;AAC7B,CAAC;AAED,kBAAe,sBAAsB,CAAC"}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export { useAppNotifications, useAppNotificationsActions, type UseAppNotificatio
|
|
|
16
16
|
export { useCollections, useCollectionsActions, useIsEntityInCollection, useCollectionEntitiesWrapper, type UseCollectionsProps, type UseCollectionsValues, type UseCollectionEntitiesWrapperProps, type UseCollectionEntitiesWrapperValues, } from "./hooks/collections";
|
|
17
17
|
export { useEntity, useEntityData, useCreateEntity, useDeleteEntity, useFetchEntity, useFetchEntityByForeignId, useFetchEntityByShortId, useFetchManyEntities, useIncrementEntityViews, useFetchManyEntitiesWrapper, useUpdateEntity, type UseFetchManyEntitiesWrapperProps, type UseFetchManyEntitiesWrapperValues, } from "./hooks/entities";
|
|
18
18
|
export { useEntityList, useEntityListActions, type UseEntityListProps, type UseEntityListValues, type EntityListFilters, type EntityListSort, type EntityListFetchOptions, } from "./hooks/entity-lists";
|
|
19
|
-
export { useSpace, useSpaceData, useFetchSpace, useFetchSpaceByShortId, useFetchSpaceBySlug, useFetchSpaceBreadcrumb, useFetchSpaceChildren, useFetchManySpaces, useCheckSlugAvailability, useCreateSpace, useUpdateSpace, useDeleteSpace, useJoinSpace, useLeaveSpace, useFetchSpaceMembers, useFetchSpaceTeam, useFetchUserSpaces, useUpdateMemberRole, useApproveMember, useDeclineMember, useRemoveMember, useSpacePermissions, useCreateRule, useUpdateRule, useDeleteRule, useFetchRule, useFetchManyRules, useReorderRules, type UseSpaceDataProps, type UseSpaceDataValues, type CreateSpaceProps, type UpdateSpaceProps, type CreateRuleProps, type UpdateRuleProps, type DeleteRuleProps, type FetchRuleProps, type FetchManyRulesProps, type ReorderRulesProps, } from "./hooks/spaces";
|
|
19
|
+
export { useSpace, useSpaceData, useFetchSpace, useFetchSpaceByShortId, useFetchSpaceBySlug, useFetchSpaceBreadcrumb, useFetchSpaceChildren, useFetchManySpaces, useCheckSlugAvailability, useCreateSpace, useUpdateSpace, useDeleteSpace, useJoinSpace, useLeaveSpace, useFetchSpaceMembers, useFetchSpaceTeam, useFetchUserSpaces, useUpdateMemberRole, useApproveMember, useDeclineMember, useRemoveMember, useModerateSpaceEntity, useModerateSpaceComment, useSpacePermissions, useCreateRule, useUpdateRule, useDeleteRule, useFetchRule, useFetchManyRules, useReorderRules, type UseSpaceDataProps, type UseSpaceDataValues, type CreateSpaceProps, type UpdateSpaceProps, type CreateRuleProps, type UpdateRuleProps, type DeleteRuleProps, type FetchRuleProps, type FetchManyRulesProps, type ReorderRulesProps, } from "./hooks/spaces";
|
|
20
20
|
export { useSpaceList, useSpaceListActions, type UseSpaceListProps, type UseSpaceListValues, } from "./hooks/space-lists";
|
|
21
21
|
export { useCommentSection, useCommentSectionData, useCreateComment, useFetchManyComments, useFetchComment, useFetchCommentByForeignId, useReplies, useUpdateComment, useDeleteComment, useEntityComments, useFetchManyCommentsWrapper, type UseFetchManyCommentsWrapperProps, type UseFetchManyCommentsWrapperValues, } from "./hooks/comments";
|
|
22
22
|
export { useFetchEntityReactions, useFetchCommentReactions, useFetchEntityReactionsWrapper, useFetchCommentReactionsWrapper, useAddReaction, useRemoveReaction, useReactionToggle, type UseFetchEntityReactionsWrapperProps, type UseFetchEntityReactionsWrapperValues, type UseFetchCommentReactionsWrapperProps, type UseFetchCommentReactionsWrapperValues, type UseReactionToggleValues, } from "./hooks/reactions";
|
package/dist/cjs/index.js
CHANGED
|
@@ -37,8 +37,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.useFetchSpaceBreadcrumb = exports.useFetchSpaceBySlug = exports.useFetchSpaceByShortId = exports.useFetchSpace = exports.useSpaceData = exports.useSpace = exports.useEntityListActions = exports.useEntityList = exports.useUpdateEntity = exports.useFetchManyEntitiesWrapper = exports.useIncrementEntityViews = exports.useFetchManyEntities = exports.useFetchEntityByShortId = exports.useFetchEntityByForeignId = exports.useFetchEntity = exports.useDeleteEntity = exports.useCreateEntity = exports.useEntityData = exports.useEntity = exports.useCollectionEntitiesWrapper = exports.useIsEntityInCollection = exports.useCollectionsActions = exports.useCollections = exports.useAppNotificationsActions = exports.useAppNotifications = exports.useUserActions = exports.useUser = exports.useAuth = exports.useSignTestingJwt = exports.useProjectData = exports.useProject = exports.replykeApi = exports.replykeMiddleware = exports.replykeApiReducer = exports.replykeReducers = exports.SpaceProvider = exports.CommentSectionProvider = exports.EntityProvider = exports.ReplykeIntegrationProvider = exports.ReplykeProvider = exports.reportReasons = exports.getEnvVar = exports.getApiBaseUrl = exports.isProduction = exports.isDevelopment = exports.getPublicFileUrl = exports.getUserName = exports.safeMergeStyleProps = exports.keywordHelpers = exports.handleError = void 0;
|
|
40
|
-
exports.
|
|
41
|
-
exports.validateSortType = exports.validateMetadataPropertyName = exports.validateSortBy = exports.AppNotification = exports.useUploadImage = exports.useUploadFile = exports.useGetMetadata = exports.useHandleSpaceCommentReport = exports.useHandleSpaceEntityReport = exports.useFetchModeratedReports = exports.useCreateReport = exports.useConnectionManager = exports.useFetchConnectionsCountByUserId = exports.useFetchConnectionsByUserId = exports.useFetchReceivedPendingConnections = exports.useFetchSentPendingConnections = exports.useFetchConnectionsCount = exports.useRemoveConnectionByUserId = exports.useFetchConnectionStatus = exports.useFetchConnections = exports.useRemoveConnection = exports.useDeclineConnection = exports.useAcceptConnection = exports.useRequestConnection = exports.useUnfollowUserByUserId = exports.useUnfollowByFollowId = exports.useFollowUser = exports.useFollowManager = exports.useFetchFollowingCountByUserId = exports.useFetchFollowingCount = exports.useFetchFollowingByUserId = exports.useFetchFollowing = exports.useFetchFollowersCountByUserId = exports.useFetchFollowersCount = exports.useFetchFollowersByUserId = void 0;
|
|
40
|
+
exports.useMentions = exports.useFetchUserSuggestions = exports.useCheckUsernameAvailability = exports.useFetchUserByUsername = exports.useFetchUserByForeignId = exports.useFetchUser = exports.useReactionToggle = exports.useRemoveReaction = exports.useAddReaction = exports.useFetchCommentReactionsWrapper = exports.useFetchEntityReactionsWrapper = exports.useFetchCommentReactions = exports.useFetchEntityReactions = exports.useFetchManyCommentsWrapper = exports.useEntityComments = exports.useDeleteComment = exports.useUpdateComment = exports.useReplies = exports.useFetchCommentByForeignId = exports.useFetchComment = exports.useFetchManyComments = exports.useCreateComment = exports.useCommentSectionData = exports.useCommentSection = exports.useSpaceListActions = exports.useSpaceList = exports.useReorderRules = exports.useFetchManyRules = exports.useFetchRule = exports.useDeleteRule = exports.useUpdateRule = exports.useCreateRule = exports.useSpacePermissions = exports.useModerateSpaceComment = exports.useModerateSpaceEntity = exports.useRemoveMember = exports.useDeclineMember = exports.useApproveMember = exports.useUpdateMemberRole = exports.useFetchUserSpaces = exports.useFetchSpaceTeam = exports.useFetchSpaceMembers = exports.useLeaveSpace = exports.useJoinSpace = exports.useDeleteSpace = exports.useUpdateSpace = exports.useCreateSpace = exports.useCheckSlugAvailability = exports.useFetchManySpaces = exports.useFetchSpaceChildren = void 0;
|
|
41
|
+
exports.validateSortType = exports.validateMetadataPropertyName = exports.validateSortBy = exports.AppNotification = exports.useUploadImage = exports.useUploadFile = exports.useGetMetadata = exports.useHandleSpaceCommentReport = exports.useHandleSpaceEntityReport = exports.useFetchModeratedReports = exports.useCreateReport = exports.useConnectionManager = exports.useFetchConnectionsCountByUserId = exports.useFetchConnectionsByUserId = exports.useFetchReceivedPendingConnections = exports.useFetchSentPendingConnections = exports.useFetchConnectionsCount = exports.useRemoveConnectionByUserId = exports.useFetchConnectionStatus = exports.useFetchConnections = exports.useRemoveConnection = exports.useDeclineConnection = exports.useAcceptConnection = exports.useRequestConnection = exports.useUnfollowUserByUserId = exports.useUnfollowByFollowId = exports.useFollowUser = exports.useFollowManager = exports.useFetchFollowingCountByUserId = exports.useFetchFollowingCount = exports.useFetchFollowingByUserId = exports.useFetchFollowing = exports.useFetchFollowersCountByUserId = exports.useFetchFollowersCount = exports.useFetchFollowersByUserId = exports.useFetchFollowers = exports.useFetchFollowStatus = void 0;
|
|
42
42
|
// Helpers & Utilities
|
|
43
43
|
var handleError_1 = require("./utils/handleError");
|
|
44
44
|
Object.defineProperty(exports, "handleError", { enumerable: true, get: function () { return handleError_1.handleError; } });
|
|
@@ -135,6 +135,8 @@ Object.defineProperty(exports, "useUpdateMemberRole", { enumerable: true, get: f
|
|
|
135
135
|
Object.defineProperty(exports, "useApproveMember", { enumerable: true, get: function () { return spaces_1.useApproveMember; } });
|
|
136
136
|
Object.defineProperty(exports, "useDeclineMember", { enumerable: true, get: function () { return spaces_1.useDeclineMember; } });
|
|
137
137
|
Object.defineProperty(exports, "useRemoveMember", { enumerable: true, get: function () { return spaces_1.useRemoveMember; } });
|
|
138
|
+
Object.defineProperty(exports, "useModerateSpaceEntity", { enumerable: true, get: function () { return spaces_1.useModerateSpaceEntity; } });
|
|
139
|
+
Object.defineProperty(exports, "useModerateSpaceComment", { enumerable: true, get: function () { return spaces_1.useModerateSpaceComment; } });
|
|
138
140
|
Object.defineProperty(exports, "useSpacePermissions", { enumerable: true, get: function () { return spaces_1.useSpacePermissions; } });
|
|
139
141
|
// Rule hooks
|
|
140
142
|
Object.defineProperty(exports, "useCreateRule", { enumerable: true, get: function () { return spaces_1.useCreateRule; } });
|