@replyke/core 7.0.0-beta.65 → 7.0.0-beta.67
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/reports/index.d.ts +1 -1
- package/dist/cjs/hooks/reports/index.js +3 -3
- package/dist/cjs/hooks/reports/index.js.map +1 -1
- package/dist/cjs/hooks/reports/useFetchModeratedReports.d.ts +48 -0
- package/dist/cjs/hooks/reports/{useFetchSpaceReports.js → useFetchModeratedReports.js} +19 -13
- package/dist/cjs/hooks/reports/useFetchModeratedReports.js.map +1 -0
- package/dist/cjs/hooks/spaces/index.d.ts +2 -2
- package/dist/cjs/hooks/spaces/index.js +2 -1
- package/dist/cjs/hooks/spaces/index.js.map +1 -1
- package/dist/cjs/hooks/spaces/rules/index.d.ts +2 -0
- package/dist/cjs/hooks/spaces/rules/index.js +3 -1
- package/dist/cjs/hooks/spaces/rules/index.js.map +1 -1
- package/dist/cjs/hooks/spaces/rules/useReorderRules.d.ts +7 -0
- package/dist/cjs/hooks/spaces/rules/useReorderRules.js +74 -0
- package/dist/cjs/hooks/spaces/rules/useReorderRules.js.map +1 -0
- package/dist/cjs/hooks/spaces/rules/useUpdateRule.d.ts +0 -1
- package/dist/cjs/hooks/spaces/rules/useUpdateRule.js.map +1 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +4 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/hooks/reports/index.d.ts +1 -1
- package/dist/esm/hooks/reports/index.js +1 -1
- package/dist/esm/hooks/reports/index.js.map +1 -1
- package/dist/esm/hooks/reports/useFetchModeratedReports.d.ts +48 -0
- package/dist/esm/hooks/reports/{useFetchSpaceReports.js → useFetchModeratedReports.js} +19 -13
- package/dist/esm/hooks/reports/useFetchModeratedReports.js.map +1 -0
- package/dist/esm/hooks/spaces/index.d.ts +2 -2
- package/dist/esm/hooks/spaces/index.js +1 -1
- package/dist/esm/hooks/spaces/index.js.map +1 -1
- package/dist/esm/hooks/spaces/rules/index.d.ts +2 -0
- package/dist/esm/hooks/spaces/rules/index.js +1 -0
- package/dist/esm/hooks/spaces/rules/index.js.map +1 -1
- package/dist/esm/hooks/spaces/rules/useReorderRules.d.ts +7 -0
- package/dist/esm/hooks/spaces/rules/useReorderRules.js +69 -0
- package/dist/esm/hooks/spaces/rules/useReorderRules.js.map +1 -0
- package/dist/esm/hooks/spaces/rules/useUpdateRule.d.ts +0 -1
- package/dist/esm/hooks/spaces/rules/useUpdateRule.js.map +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/hooks/reports/useFetchSpaceReports.d.ts +0 -39
- package/dist/cjs/hooks/reports/useFetchSpaceReports.js.map +0 -1
- package/dist/esm/hooks/reports/useFetchSpaceReports.d.ts +0 -39
- package/dist/esm/hooks/reports/useFetchSpaceReports.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as useCreateReport } from "./useCreateReport";
|
|
2
|
-
export { default as
|
|
2
|
+
export { default as useFetchModeratedReports } from "./useFetchModeratedReports";
|
|
3
3
|
export { default as useHandleSpaceEntityReport } from "./useHandleSpaceEntityReport";
|
|
4
4
|
export { default as useHandleSpaceCommentReport } from "./useHandleSpaceCommentReport";
|
|
@@ -3,11 +3,11 @@ 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.useHandleSpaceCommentReport = exports.useHandleSpaceEntityReport = exports.
|
|
6
|
+
exports.useHandleSpaceCommentReport = exports.useHandleSpaceEntityReport = exports.useFetchModeratedReports = exports.useCreateReport = void 0;
|
|
7
7
|
var useCreateReport_1 = require("./useCreateReport");
|
|
8
8
|
Object.defineProperty(exports, "useCreateReport", { enumerable: true, get: function () { return __importDefault(useCreateReport_1).default; } });
|
|
9
|
-
var
|
|
10
|
-
Object.defineProperty(exports, "
|
|
9
|
+
var useFetchModeratedReports_1 = require("./useFetchModeratedReports");
|
|
10
|
+
Object.defineProperty(exports, "useFetchModeratedReports", { enumerable: true, get: function () { return __importDefault(useFetchModeratedReports_1).default; } });
|
|
11
11
|
var useHandleSpaceEntityReport_1 = require("./useHandleSpaceEntityReport");
|
|
12
12
|
Object.defineProperty(exports, "useHandleSpaceEntityReport", { enumerable: true, get: function () { return __importDefault(useHandleSpaceEntityReport_1).default; } });
|
|
13
13
|
var useHandleSpaceCommentReport_1 = require("./useHandleSpaceCommentReport");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/reports/index.ts"],"names":[],"mappings":";;;;;;AAAA,qDAA+D;AAAtD,mIAAA,OAAO,OAAmB;AACnC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/reports/index.ts"],"names":[],"mappings":";;;;;;AAAA,qDAA+D;AAAtD,mIAAA,OAAO,OAAmB;AACnC,uEAAiF;AAAxE,qJAAA,OAAO,OAA4B;AAC5C,2EAAqF;AAA5E,yJAAA,OAAO,OAA8B;AAC9C,6EAAuF;AAA9E,2JAAA,OAAO,OAA+B"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
|
|
2
|
+
interface FetchModeratedReportsParams {
|
|
3
|
+
spaceId?: string;
|
|
4
|
+
targetType?: "Comment" | "Entity";
|
|
5
|
+
sortBy?: "new" | "old";
|
|
6
|
+
page?: number;
|
|
7
|
+
limit?: number;
|
|
8
|
+
}
|
|
9
|
+
interface Report {
|
|
10
|
+
id: string;
|
|
11
|
+
projectId: string;
|
|
12
|
+
spaceId: string | null;
|
|
13
|
+
reporters: string[];
|
|
14
|
+
targetId: string;
|
|
15
|
+
targetType: "Comment" | "Entity";
|
|
16
|
+
reason: string;
|
|
17
|
+
details: string | null;
|
|
18
|
+
status: "Pending" | "On Hold" | "Escalated" | "Dismissed" | "Actioned";
|
|
19
|
+
actionTaken: string | null;
|
|
20
|
+
createdAt: Date;
|
|
21
|
+
updatedAt: Date;
|
|
22
|
+
deletedAt: Date | null;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Hook to fetch reports for spaces the user can moderate
|
|
26
|
+
*
|
|
27
|
+
* If spaceId is provided, returns reports for that specific space
|
|
28
|
+
* If spaceId is omitted, returns reports from ALL spaces the user moderates
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* const fetchModeratedReports = useFetchModeratedReports();
|
|
32
|
+
*
|
|
33
|
+
* // Fetch reports for a specific space
|
|
34
|
+
* const reports = await fetchModeratedReports({
|
|
35
|
+
* spaceId: "space-uuid",
|
|
36
|
+
* targetType: "Entity",
|
|
37
|
+
* page: 1,
|
|
38
|
+
* limit: 20
|
|
39
|
+
* });
|
|
40
|
+
*
|
|
41
|
+
* // Fetch reports from ALL spaces the user moderates
|
|
42
|
+
* const allReports = await fetchModeratedReports({
|
|
43
|
+
* page: 1,
|
|
44
|
+
* limit: 20
|
|
45
|
+
* });
|
|
46
|
+
*/
|
|
47
|
+
declare function useFetchModeratedReports(): ({ spaceId, targetType, sortBy, page, limit, }: FetchModeratedReportsParams) => Promise<PaginatedResponse<Report>>;
|
|
48
|
+
export default useFetchModeratedReports;
|
|
@@ -43,24 +43,33 @@ var react_1 = require("react");
|
|
|
43
43
|
var useProject_1 = __importDefault(require("../projects/useProject"));
|
|
44
44
|
var useAxiosPrivate_1 = __importDefault(require("../../config/useAxiosPrivate"));
|
|
45
45
|
/**
|
|
46
|
-
* Hook to fetch reports for
|
|
47
|
-
*
|
|
46
|
+
* Hook to fetch reports for spaces the user can moderate
|
|
47
|
+
*
|
|
48
|
+
* If spaceId is provided, returns reports for that specific space
|
|
49
|
+
* If spaceId is omitted, returns reports from ALL spaces the user moderates
|
|
48
50
|
*
|
|
49
51
|
* @example
|
|
50
|
-
* const
|
|
52
|
+
* const fetchModeratedReports = useFetchModeratedReports();
|
|
51
53
|
*
|
|
52
|
-
*
|
|
54
|
+
* // Fetch reports for a specific space
|
|
55
|
+
* const reports = await fetchModeratedReports({
|
|
53
56
|
* spaceId: "space-uuid",
|
|
54
57
|
* targetType: "Entity",
|
|
55
58
|
* page: 1,
|
|
56
59
|
* limit: 20
|
|
57
60
|
* });
|
|
61
|
+
*
|
|
62
|
+
* // Fetch reports from ALL spaces the user moderates
|
|
63
|
+
* const allReports = await fetchModeratedReports({
|
|
64
|
+
* page: 1,
|
|
65
|
+
* limit: 20
|
|
66
|
+
* });
|
|
58
67
|
*/
|
|
59
|
-
function
|
|
68
|
+
function useFetchModeratedReports() {
|
|
60
69
|
var _this = this;
|
|
61
70
|
var projectId = (0, useProject_1.default)().projectId;
|
|
62
71
|
var axios = (0, useAxiosPrivate_1.default)();
|
|
63
|
-
var
|
|
72
|
+
var fetchModeratedReports = (0, react_1.useCallback)(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
|
|
64
73
|
var response;
|
|
65
74
|
var spaceId = _b.spaceId, targetType = _b.targetType, sortBy = _b.sortBy, page = _b.page, limit = _b.limit;
|
|
66
75
|
return __generator(this, function (_c) {
|
|
@@ -69,17 +78,14 @@ function useFetchSpaceReports() {
|
|
|
69
78
|
if (!projectId) {
|
|
70
79
|
throw new Error("No projectId available.");
|
|
71
80
|
}
|
|
72
|
-
|
|
73
|
-
throw new Error("Please pass a spaceId");
|
|
74
|
-
}
|
|
75
|
-
return [4 /*yield*/, axios.get("/".concat(projectId, "/spaces/").concat(spaceId, "/reports"), { params: { targetType: targetType, sortBy: sortBy, page: page, limit: limit } })];
|
|
81
|
+
return [4 /*yield*/, axios.get("/".concat(projectId, "/reports/moderated"), { params: { spaceId: spaceId, targetType: targetType, sortBy: sortBy, page: page, limit: limit } })];
|
|
76
82
|
case 1:
|
|
77
83
|
response = _c.sent();
|
|
78
84
|
return [2 /*return*/, response.data];
|
|
79
85
|
}
|
|
80
86
|
});
|
|
81
87
|
}); }, [projectId, axios]);
|
|
82
|
-
return
|
|
88
|
+
return fetchModeratedReports;
|
|
83
89
|
}
|
|
84
|
-
exports.default =
|
|
85
|
-
//# sourceMappingURL=
|
|
90
|
+
exports.default = useFetchModeratedReports;
|
|
91
|
+
//# sourceMappingURL=useFetchModeratedReports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFetchModeratedReports.js","sourceRoot":"","sources":["../../../../src/hooks/reports/useFetchModeratedReports.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,sEAAgD;AAChD,iFAA2D;AA2B3D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,SAAS,wBAAwB;IAAjC,iBA2BC;IA1BS,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEhC,IAAM,qBAAqB,GAAG,IAAA,mBAAW,EACvC,gEAAO,EAMuB;;YAL5B,OAAO,aAAA,EACP,UAAU,gBAAA,EACV,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,IAAI,MAAA,EAAE,KAAK,OAAA,EAAE,EAAE,CACzD,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"}
|
|
@@ -24,5 +24,5 @@ export { default as useDeclineMember } from "./useDeclineMember";
|
|
|
24
24
|
export { default as useRemoveMember } from "./useRemoveMember";
|
|
25
25
|
export { default as useSpacePermissions } from "./useSpacePermissions";
|
|
26
26
|
export { default as useCheckSlugAvailability } from "./useCheckSlugAvailability";
|
|
27
|
-
export { useCreateRule, useUpdateRule, useDeleteRule, useFetchRule, useFetchManyRules, } from "./rules";
|
|
28
|
-
export type { CreateRuleProps, UpdateRuleProps, DeleteRuleProps, FetchRuleProps, FetchManyRulesProps, } from "./rules";
|
|
27
|
+
export { useCreateRule, useUpdateRule, useDeleteRule, useFetchRule, useFetchManyRules, useReorderRules, } from "./rules";
|
|
28
|
+
export type { CreateRuleProps, UpdateRuleProps, DeleteRuleProps, FetchRuleProps, FetchManyRulesProps, ReorderRulesProps, } 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.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.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; } });
|
|
@@ -63,4 +63,5 @@ Object.defineProperty(exports, "useUpdateRule", { enumerable: true, get: functio
|
|
|
63
63
|
Object.defineProperty(exports, "useDeleteRule", { enumerable: true, get: function () { return rules_1.useDeleteRule; } });
|
|
64
64
|
Object.defineProperty(exports, "useFetchRule", { enumerable: true, get: function () { return rules_1.useFetchRule; } });
|
|
65
65
|
Object.defineProperty(exports, "useFetchManyRules", { enumerable: true, get: function () { return rules_1.useFetchManyRules; } });
|
|
66
|
+
Object.defineProperty(exports, "useReorderRules", { enumerable: true, get: function () { return rules_1.useReorderRules; } });
|
|
66
67
|
//# sourceMappingURL=index.js.map
|
|
@@ -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;AAC1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AA2B;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;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,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"}
|
|
@@ -8,3 +8,5 @@ export { default as useFetchRule } from "./useFetchRule";
|
|
|
8
8
|
export type { FetchRuleProps } from "./useFetchRule";
|
|
9
9
|
export { default as useFetchManyRules } from "./useFetchManyRules";
|
|
10
10
|
export type { FetchManyRulesProps } from "./useFetchManyRules";
|
|
11
|
+
export { default as useReorderRules } from "./useReorderRules";
|
|
12
|
+
export type { ReorderRulesProps } from "./useReorderRules";
|
|
@@ -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.useFetchManyRules = exports.useFetchRule = exports.useDeleteRule = exports.useUpdateRule = exports.useCreateRule = void 0;
|
|
6
|
+
exports.useReorderRules = exports.useFetchManyRules = exports.useFetchRule = exports.useDeleteRule = exports.useUpdateRule = exports.useCreateRule = void 0;
|
|
7
7
|
var useCreateRule_1 = require("./useCreateRule");
|
|
8
8
|
Object.defineProperty(exports, "useCreateRule", { enumerable: true, get: function () { return __importDefault(useCreateRule_1).default; } });
|
|
9
9
|
var useUpdateRule_1 = require("./useUpdateRule");
|
|
@@ -14,4 +14,6 @@ var useFetchRule_1 = require("./useFetchRule");
|
|
|
14
14
|
Object.defineProperty(exports, "useFetchRule", { enumerable: true, get: function () { return __importDefault(useFetchRule_1).default; } });
|
|
15
15
|
var useFetchManyRules_1 = require("./useFetchManyRules");
|
|
16
16
|
Object.defineProperty(exports, "useFetchManyRules", { enumerable: true, get: function () { return __importDefault(useFetchManyRules_1).default; } });
|
|
17
|
+
var useReorderRules_1 = require("./useReorderRules");
|
|
18
|
+
Object.defineProperty(exports, "useReorderRules", { enumerable: true, get: function () { return __importDefault(useReorderRules_1).default; } });
|
|
17
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/hooks/spaces/rules/index.ts"],"names":[],"mappings":";;;;;;AAAA,iDAA2D;AAAlD,+HAAA,OAAO,OAAiB;AAEjC,iDAA2D;AAAlD,+HAAA,OAAO,OAAiB;AAEjC,iDAA2D;AAAlD,+HAAA,OAAO,OAAiB;AAEjC,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAEhC,yDAAmE;AAA1D,uIAAA,OAAO,OAAqB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/hooks/spaces/rules/index.ts"],"names":[],"mappings":";;;;;;AAAA,iDAA2D;AAAlD,+HAAA,OAAO,OAAiB;AAEjC,iDAA2D;AAAlD,+HAAA,OAAO,OAAiB;AAEjC,iDAA2D;AAAlD,+HAAA,OAAO,OAAiB;AAEjC,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAEhC,yDAAmE;AAA1D,uIAAA,OAAO,OAAqB;AAErC,qDAA+D;AAAtD,mIAAA,OAAO,OAAmB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Rule } from "../../../interfaces/models/Rule";
|
|
2
|
+
export interface ReorderRulesProps {
|
|
3
|
+
spaceId: string;
|
|
4
|
+
ruleIds: string[];
|
|
5
|
+
}
|
|
6
|
+
declare function useReorderRules(): ({ spaceId, ruleIds }: ReorderRulesProps) => Promise<Rule[]>;
|
|
7
|
+
export default useReorderRules;
|
|
@@ -0,0 +1,74 @@
|
|
|
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 useReorderRules() {
|
|
46
|
+
var _this = this;
|
|
47
|
+
var projectId = (0, useProject_1.default)().projectId;
|
|
48
|
+
var axios = (0, useAxiosPrivate_1.default)();
|
|
49
|
+
var reorderRules = (0, react_1.useCallback)(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
|
|
50
|
+
var response;
|
|
51
|
+
var spaceId = _b.spaceId, ruleIds = _b.ruleIds;
|
|
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
|
+
if (!ruleIds || ruleIds.length === 0) {
|
|
62
|
+
throw new Error("Please pass at least one ruleId");
|
|
63
|
+
}
|
|
64
|
+
return [4 /*yield*/, axios.patch("/".concat(projectId, "/spaces/").concat(spaceId, "/rules/reorder"), { ruleIds: ruleIds })];
|
|
65
|
+
case 1:
|
|
66
|
+
response = _c.sent();
|
|
67
|
+
return [2 /*return*/, response.data];
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}); }, [projectId, axios]);
|
|
71
|
+
return reorderRules;
|
|
72
|
+
}
|
|
73
|
+
exports.default = useReorderRules;
|
|
74
|
+
//# sourceMappingURL=useReorderRules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useReorderRules.js","sourceRoot":"","sources":["../../../../../src/hooks/spaces/rules/useReorderRules.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,yEAAmD;AAEnD,oFAA8D;AAO9D,SAAS,eAAe;IAAxB,iBA6BC;IA5BS,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEhC,IAAM,YAAY,GAAG,IAAA,mBAAW,EAC9B,gEAAO,EAAuC;;YAArC,OAAO,aAAA,EAAE,OAAO,aAAA;;;;oBACvB,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;oBAED,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;wBACrC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;oBACrD,CAAC;oBAEgB,qBAAM,KAAK,CAAC,KAAK,CAChC,WAAI,SAAS,qBAAW,OAAO,mBAAgB,EAC/C,EAAE,OAAO,SAAA,EAAE,CACZ,EAAA;;oBAHK,QAAQ,GAAG,SAGhB;oBAED,sBAAO,QAAQ,CAAC,IAAc,EAAC;;;SAChC,EACD,CAAC,SAAS,EAAE,KAAK,CAAC,CACnB,CAAC;IAEF,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,kBAAe,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUpdateRule.js","sourceRoot":"","sources":["../../../../../src/hooks/spaces/rules/useUpdateRule.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,yEAAmD;AAEnD,oFAA8D;
|
|
1
|
+
{"version":3,"file":"useUpdateRule.js","sourceRoot":"","sources":["../../../../../src/hooks/spaces/rules/useUpdateRule.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,yEAAmD;AAEnD,oFAA8D;AAW9D,SAAS,aAAa;IAAtB,iBA6BC;IA5BS,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEhC,IAAM,UAAU,GAAG,IAAA,mBAAW,EAC5B,gEAAO,EAA4C;;YAA1C,OAAO,aAAA,EAAE,MAAM,YAAA,EAAE,MAAM,YAAA;;;;oBAC9B,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;oBAED,IAAI,CAAC,MAAM,EAAE,CAAC;wBACZ,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;oBAC1C,CAAC;oBAEgB,qBAAM,KAAK,CAAC,KAAK,CAChC,WAAI,SAAS,qBAAW,OAAO,oBAAU,MAAM,CAAE,EACjD,MAAM,CACP,EAAA;;oBAHK,QAAQ,GAAG,SAGhB;oBAED,sBAAO,QAAQ,CAAC,IAAY,EAAC;;;SAC9B,EACD,CAAC,SAAS,EAAE,KAAK,CAAC,CACnB,CAAC;IAEF,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,kBAAe,aAAa,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, type UseSpaceDataProps, type UseSpaceDataValues, type CreateSpaceProps, type UpdateSpaceProps, type CreateRuleProps, type UpdateRuleProps, type DeleteRuleProps, type FetchRuleProps, type FetchManyRulesProps, } 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, 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";
|
|
@@ -24,7 +24,7 @@ export { useFetchUser, useFetchUserByForeignId, useFetchUserByUsername, useCheck
|
|
|
24
24
|
export { useFetchFollowStatus, useFetchFollowers, useFetchFollowersByUserId, useFetchFollowersCount, useFetchFollowersCountByUserId, useFetchFollowing, useFetchFollowingByUserId, useFetchFollowingCount, useFetchFollowingCountByUserId, useFollowManager, useFollowUser, useUnfollowByFollowId, useUnfollowUserByUserId, } from "./hooks/relationships/follows";
|
|
25
25
|
export { useRequestConnection, useAcceptConnection, useDeclineConnection, useRemoveConnection, useFetchConnections, useFetchConnectionStatus, useRemoveConnectionByUserId, useFetchConnectionsCount, useFetchSentPendingConnections, useFetchReceivedPendingConnections, useFetchConnectionsByUserId, useFetchConnectionsCountByUserId, useConnectionManager, } from "./hooks/relationships/connections";
|
|
26
26
|
export { useCreateReport } from "./hooks/reports";
|
|
27
|
-
export {
|
|
27
|
+
export { useFetchModeratedReports } from "./hooks/reports";
|
|
28
28
|
export { useHandleSpaceEntityReport } from "./hooks/reports";
|
|
29
29
|
export { useHandleSpaceCommentReport } from "./hooks/reports";
|
|
30
30
|
export { useGetMetadata } from "./hooks/utils";
|
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.
|
|
40
|
+
exports.useFetchFollowers = exports.useFetchFollowStatus = 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.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 = 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; } });
|
|
@@ -142,6 +142,7 @@ Object.defineProperty(exports, "useUpdateRule", { enumerable: true, get: functio
|
|
|
142
142
|
Object.defineProperty(exports, "useDeleteRule", { enumerable: true, get: function () { return spaces_1.useDeleteRule; } });
|
|
143
143
|
Object.defineProperty(exports, "useFetchRule", { enumerable: true, get: function () { return spaces_1.useFetchRule; } });
|
|
144
144
|
Object.defineProperty(exports, "useFetchManyRules", { enumerable: true, get: function () { return spaces_1.useFetchManyRules; } });
|
|
145
|
+
Object.defineProperty(exports, "useReorderRules", { enumerable: true, get: function () { return spaces_1.useReorderRules; } });
|
|
145
146
|
// -- space lists
|
|
146
147
|
var space_lists_1 = require("./hooks/space-lists");
|
|
147
148
|
Object.defineProperty(exports, "useSpaceList", { enumerable: true, get: function () { return space_lists_1.useSpaceList; } });
|
|
@@ -210,7 +211,7 @@ Object.defineProperty(exports, "useConnectionManager", { enumerable: true, get:
|
|
|
210
211
|
var reports_1 = require("./hooks/reports");
|
|
211
212
|
Object.defineProperty(exports, "useCreateReport", { enumerable: true, get: function () { return reports_1.useCreateReport; } });
|
|
212
213
|
var reports_2 = require("./hooks/reports");
|
|
213
|
-
Object.defineProperty(exports, "
|
|
214
|
+
Object.defineProperty(exports, "useFetchModeratedReports", { enumerable: true, get: function () { return reports_2.useFetchModeratedReports; } });
|
|
214
215
|
var reports_3 = require("./hooks/reports");
|
|
215
216
|
Object.defineProperty(exports, "useHandleSpaceEntityReport", { enumerable: true, get: function () { return reports_3.useHandleSpaceEntityReport; } });
|
|
216
217
|
var reports_4 = require("./hooks/reports");
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sBAAsB;AACtB,mDAAkD;AAAzC,0GAAA,WAAW,OAAA;AACpB,yDAAwD;AAA/C,gHAAA,cAAc,OAAA;AACvB,qEAAoE;AAA3D,0HAAA,mBAAmB,OAAA;AAC5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B,OAAA;AACjB,oHAAA,yBAAyB,OAAA;AACzB,iHAAA,sBAAsB,OAAA;AACtB,yHAAA,8BAA8B,OAAA;AAC9B,2GAAA,gBAAgB,OAAA;AAChB,wGAAA,aAAa,OAAA;AACb,gHAAA,qBAAqB,OAAA;AACrB,kHAAA,uBAAuB,OAAA;AAGzB,iBAAiB;AACjB,iEAc2C;AAbzC,mHAAA,oBAAoB,OAAA;AACpB,kHAAA,mBAAmB,OAAA;AACnB,mHAAA,oBAAoB,OAAA;AACpB,kHAAA,mBAAmB,OAAA;AACnB,kHAAA,mBAAmB,OAAA;AACnB,uHAAA,wBAAwB,OAAA;AACxB,0HAAA,2BAA2B,OAAA;AAC3B,uHAAA,wBAAwB,OAAA;AACxB,6HAAA,8BAA8B,OAAA;AAC9B,iIAAA,kCAAkC,OAAA;AAClC,0HAAA,2BAA2B,OAAA;AAC3B,+HAAA,gCAAgC,OAAA;AAChC,mHAAA,oBAAoB,OAAA;AAGtB,aAAa;AACb,2CAAkD;AAAzC,0GAAA,eAAe,OAAA;AACxB,2CAA2D;AAAlD,mHAAA,wBAAwB,OAAA;AACjC,2CAA6D;AAApD,qHAAA,0BAA0B,OAAA;AACnC,2CAA8D;AAArD,sHAAA,2BAA2B,OAAA;AAEpC,aAAa;AACb,uCAA+C;AAAtC,uGAAA,cAAc,OAAA;AAEvB,aAAa;AACb,2CAAgE;AAAvD,wGAAA,aAAa,OAAA;AAAE,yGAAA,cAAc,OAAA;AAiBtC,uFAAuE;AAiEvE,gFAI8C;AAH5C,yHAAA,cAAc,OAAA;AACd,uIAAA,4BAA4B,OAAA;AAC5B,2HAAA,gBAAgB,OAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as useCreateReport } from "./useCreateReport";
|
|
2
|
-
export { default as
|
|
2
|
+
export { default as useFetchModeratedReports } from "./useFetchModeratedReports";
|
|
3
3
|
export { default as useHandleSpaceEntityReport } from "./useHandleSpaceEntityReport";
|
|
4
4
|
export { default as useHandleSpaceCommentReport } from "./useHandleSpaceCommentReport";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as useCreateReport } from "./useCreateReport";
|
|
2
|
-
export { default as
|
|
2
|
+
export { default as useFetchModeratedReports } from "./useFetchModeratedReports";
|
|
3
3
|
export { default as useHandleSpaceEntityReport } from "./useHandleSpaceEntityReport";
|
|
4
4
|
export { default as useHandleSpaceCommentReport } from "./useHandleSpaceCommentReport";
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/reports/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/reports/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
|
|
2
|
+
interface FetchModeratedReportsParams {
|
|
3
|
+
spaceId?: string;
|
|
4
|
+
targetType?: "Comment" | "Entity";
|
|
5
|
+
sortBy?: "new" | "old";
|
|
6
|
+
page?: number;
|
|
7
|
+
limit?: number;
|
|
8
|
+
}
|
|
9
|
+
interface Report {
|
|
10
|
+
id: string;
|
|
11
|
+
projectId: string;
|
|
12
|
+
spaceId: string | null;
|
|
13
|
+
reporters: string[];
|
|
14
|
+
targetId: string;
|
|
15
|
+
targetType: "Comment" | "Entity";
|
|
16
|
+
reason: string;
|
|
17
|
+
details: string | null;
|
|
18
|
+
status: "Pending" | "On Hold" | "Escalated" | "Dismissed" | "Actioned";
|
|
19
|
+
actionTaken: string | null;
|
|
20
|
+
createdAt: Date;
|
|
21
|
+
updatedAt: Date;
|
|
22
|
+
deletedAt: Date | null;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Hook to fetch reports for spaces the user can moderate
|
|
26
|
+
*
|
|
27
|
+
* If spaceId is provided, returns reports for that specific space
|
|
28
|
+
* If spaceId is omitted, returns reports from ALL spaces the user moderates
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* const fetchModeratedReports = useFetchModeratedReports();
|
|
32
|
+
*
|
|
33
|
+
* // Fetch reports for a specific space
|
|
34
|
+
* const reports = await fetchModeratedReports({
|
|
35
|
+
* spaceId: "space-uuid",
|
|
36
|
+
* targetType: "Entity",
|
|
37
|
+
* page: 1,
|
|
38
|
+
* limit: 20
|
|
39
|
+
* });
|
|
40
|
+
*
|
|
41
|
+
* // Fetch reports from ALL spaces the user moderates
|
|
42
|
+
* const allReports = await fetchModeratedReports({
|
|
43
|
+
* page: 1,
|
|
44
|
+
* limit: 20
|
|
45
|
+
* });
|
|
46
|
+
*/
|
|
47
|
+
declare function useFetchModeratedReports(): ({ spaceId, targetType, sortBy, page, limit, }: FetchModeratedReportsParams) => Promise<PaginatedResponse<Report>>;
|
|
48
|
+
export default useFetchModeratedReports;
|
|
@@ -38,24 +38,33 @@ import { useCallback } from "react";
|
|
|
38
38
|
import useProject from "../projects/useProject";
|
|
39
39
|
import useAxiosPrivate from "../../config/useAxiosPrivate";
|
|
40
40
|
/**
|
|
41
|
-
* Hook to fetch reports for
|
|
42
|
-
*
|
|
41
|
+
* Hook to fetch reports for spaces the user can moderate
|
|
42
|
+
*
|
|
43
|
+
* If spaceId is provided, returns reports for that specific space
|
|
44
|
+
* If spaceId is omitted, returns reports from ALL spaces the user moderates
|
|
43
45
|
*
|
|
44
46
|
* @example
|
|
45
|
-
* const
|
|
47
|
+
* const fetchModeratedReports = useFetchModeratedReports();
|
|
46
48
|
*
|
|
47
|
-
*
|
|
49
|
+
* // Fetch reports for a specific space
|
|
50
|
+
* const reports = await fetchModeratedReports({
|
|
48
51
|
* spaceId: "space-uuid",
|
|
49
52
|
* targetType: "Entity",
|
|
50
53
|
* page: 1,
|
|
51
54
|
* limit: 20
|
|
52
55
|
* });
|
|
56
|
+
*
|
|
57
|
+
* // Fetch reports from ALL spaces the user moderates
|
|
58
|
+
* const allReports = await fetchModeratedReports({
|
|
59
|
+
* page: 1,
|
|
60
|
+
* limit: 20
|
|
61
|
+
* });
|
|
53
62
|
*/
|
|
54
|
-
function
|
|
63
|
+
function useFetchModeratedReports() {
|
|
55
64
|
var _this = this;
|
|
56
65
|
var projectId = useProject().projectId;
|
|
57
66
|
var axios = useAxiosPrivate();
|
|
58
|
-
var
|
|
67
|
+
var fetchModeratedReports = useCallback(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
|
|
59
68
|
var response;
|
|
60
69
|
var spaceId = _b.spaceId, targetType = _b.targetType, sortBy = _b.sortBy, page = _b.page, limit = _b.limit;
|
|
61
70
|
return __generator(this, function (_c) {
|
|
@@ -64,17 +73,14 @@ function useFetchSpaceReports() {
|
|
|
64
73
|
if (!projectId) {
|
|
65
74
|
throw new Error("No projectId available.");
|
|
66
75
|
}
|
|
67
|
-
|
|
68
|
-
throw new Error("Please pass a spaceId");
|
|
69
|
-
}
|
|
70
|
-
return [4 /*yield*/, axios.get("/".concat(projectId, "/spaces/").concat(spaceId, "/reports"), { params: { targetType: targetType, sortBy: sortBy, page: page, limit: limit } })];
|
|
76
|
+
return [4 /*yield*/, axios.get("/".concat(projectId, "/reports/moderated"), { params: { spaceId: spaceId, targetType: targetType, sortBy: sortBy, page: page, limit: limit } })];
|
|
71
77
|
case 1:
|
|
72
78
|
response = _c.sent();
|
|
73
79
|
return [2 /*return*/, response.data];
|
|
74
80
|
}
|
|
75
81
|
});
|
|
76
82
|
}); }, [projectId, axios]);
|
|
77
|
-
return
|
|
83
|
+
return fetchModeratedReports;
|
|
78
84
|
}
|
|
79
|
-
export default
|
|
80
|
-
//# sourceMappingURL=
|
|
85
|
+
export default useFetchModeratedReports;
|
|
86
|
+
//# sourceMappingURL=useFetchModeratedReports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFetchModeratedReports.js","sourceRoot":"","sources":["../../../../src/hooks/reports/useFetchModeratedReports.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,eAAe,MAAM,8BAA8B,CAAC;AA2B3D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,SAAS,wBAAwB;IAAjC,iBA2BC;IA1BS,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAEhC,IAAM,qBAAqB,GAAG,WAAW,CACvC,gEAAO,EAMuB;;YAL5B,OAAO,aAAA,EACP,UAAU,gBAAA,EACV,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,IAAI,MAAA,EAAE,KAAK,OAAA,EAAE,EAAE,CACzD,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,eAAe,wBAAwB,CAAC"}
|
|
@@ -24,5 +24,5 @@ export { default as useDeclineMember } from "./useDeclineMember";
|
|
|
24
24
|
export { default as useRemoveMember } from "./useRemoveMember";
|
|
25
25
|
export { default as useSpacePermissions } from "./useSpacePermissions";
|
|
26
26
|
export { default as useCheckSlugAvailability } from "./useCheckSlugAvailability";
|
|
27
|
-
export { useCreateRule, useUpdateRule, useDeleteRule, useFetchRule, useFetchManyRules, } from "./rules";
|
|
28
|
-
export type { CreateRuleProps, UpdateRuleProps, DeleteRuleProps, FetchRuleProps, FetchManyRulesProps, } from "./rules";
|
|
27
|
+
export { useCreateRule, useUpdateRule, useDeleteRule, useFetchRule, useFetchManyRules, useReorderRules, } from "./rules";
|
|
28
|
+
export type { CreateRuleProps, UpdateRuleProps, DeleteRuleProps, FetchRuleProps, FetchManyRulesProps, ReorderRulesProps, } from "./rules";
|
|
@@ -28,5 +28,5 @@ export { default as useRemoveMember } from "./useRemoveMember";
|
|
|
28
28
|
export { default as useSpacePermissions } from "./useSpacePermissions";
|
|
29
29
|
export { default as useCheckSlugAvailability } from "./useCheckSlugAvailability";
|
|
30
30
|
// Rule management hooks
|
|
31
|
-
export { useCreateRule, useUpdateRule, useDeleteRule, useFetchRule, useFetchManyRules, } from "./rules";
|
|
31
|
+
export { useCreateRule, useUpdateRule, useDeleteRule, useFetchRule, useFetchManyRules, useReorderRules, } from "./rules";
|
|
32
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/spaces/index.ts"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGzD,cAAc;AACd,OAA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AO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEzE,0BAA0B;AAC1B,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE/D,eAAe;AACf,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEjF,wBAAwB;AACxB,OAAO,EACL,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,eAAe,GAChB,MAAM,SAAS,CAAC"}
|
|
@@ -8,3 +8,5 @@ export { default as useFetchRule } from "./useFetchRule";
|
|
|
8
8
|
export type { FetchRuleProps } from "./useFetchRule";
|
|
9
9
|
export { default as useFetchManyRules } from "./useFetchManyRules";
|
|
10
10
|
export type { FetchManyRulesProps } from "./useFetchManyRules";
|
|
11
|
+
export { default as useReorderRules } from "./useReorderRules";
|
|
12
|
+
export type { ReorderRulesProps } from "./useReorderRules";
|
|
@@ -3,4 +3,5 @@ export { default as useUpdateRule } from "./useUpdateRule";
|
|
|
3
3
|
export { default as useDeleteRule } from "./useDeleteRule";
|
|
4
4
|
export { default as useFetchRule } from "./useFetchRule";
|
|
5
5
|
export { default as useFetchManyRules } from "./useFetchManyRules";
|
|
6
|
+
export { default as useReorderRules } from "./useReorderRules";
|
|
6
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/hooks/spaces/rules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE3D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE3D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE3D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEzD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/hooks/spaces/rules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE3D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE3D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE3D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEzD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAEnE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Rule } from "../../../interfaces/models/Rule";
|
|
2
|
+
export interface ReorderRulesProps {
|
|
3
|
+
spaceId: string;
|
|
4
|
+
ruleIds: string[];
|
|
5
|
+
}
|
|
6
|
+
declare function useReorderRules(): ({ spaceId, ruleIds }: ReorderRulesProps) => Promise<Rule[]>;
|
|
7
|
+
export default useReorderRules;
|
|
@@ -0,0 +1,69 @@
|
|
|
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 useReorderRules() {
|
|
41
|
+
var _this = this;
|
|
42
|
+
var projectId = useProject().projectId;
|
|
43
|
+
var axios = useAxiosPrivate();
|
|
44
|
+
var reorderRules = useCallback(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
|
|
45
|
+
var response;
|
|
46
|
+
var spaceId = _b.spaceId, ruleIds = _b.ruleIds;
|
|
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
|
+
if (!ruleIds || ruleIds.length === 0) {
|
|
57
|
+
throw new Error("Please pass at least one ruleId");
|
|
58
|
+
}
|
|
59
|
+
return [4 /*yield*/, axios.patch("/".concat(projectId, "/spaces/").concat(spaceId, "/rules/reorder"), { ruleIds: ruleIds })];
|
|
60
|
+
case 1:
|
|
61
|
+
response = _c.sent();
|
|
62
|
+
return [2 /*return*/, response.data];
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}); }, [projectId, axios]);
|
|
66
|
+
return reorderRules;
|
|
67
|
+
}
|
|
68
|
+
export default useReorderRules;
|
|
69
|
+
//# sourceMappingURL=useReorderRules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useReorderRules.js","sourceRoot":"","sources":["../../../../../src/hooks/spaces/rules/useReorderRules.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,UAAU,MAAM,2BAA2B,CAAC;AAEnD,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAO9D,SAAS,eAAe;IAAxB,iBA6BC;IA5BS,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAEhC,IAAM,YAAY,GAAG,WAAW,CAC9B,gEAAO,EAAuC;;YAArC,OAAO,aAAA,EAAE,OAAO,aAAA;;;;oBACvB,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;oBAED,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;wBACrC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;oBACrD,CAAC;oBAEgB,qBAAM,KAAK,CAAC,KAAK,CAChC,WAAI,SAAS,qBAAW,OAAO,mBAAgB,EAC/C,EAAE,OAAO,SAAA,EAAE,CACZ,EAAA;;oBAHK,QAAQ,GAAG,SAGhB;oBAED,sBAAO,QAAQ,CAAC,IAAc,EAAC;;;SAChC,EACD,CAAC,SAAS,EAAE,KAAK,CAAC,CACnB,CAAC;IAEF,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUpdateRule.js","sourceRoot":"","sources":["../../../../../src/hooks/spaces/rules/useUpdateRule.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,UAAU,MAAM,2BAA2B,CAAC;AAEnD,OAAO,eAAe,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"useUpdateRule.js","sourceRoot":"","sources":["../../../../../src/hooks/spaces/rules/useUpdateRule.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,UAAU,MAAM,2BAA2B,CAAC;AAEnD,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAW9D,SAAS,aAAa;IAAtB,iBA6BC;IA5BS,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAEhC,IAAM,UAAU,GAAG,WAAW,CAC5B,gEAAO,EAA4C;;YAA1C,OAAO,aAAA,EAAE,MAAM,YAAA,EAAE,MAAM,YAAA;;;;oBAC9B,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;oBAED,IAAI,CAAC,MAAM,EAAE,CAAC;wBACZ,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;oBAC1C,CAAC;oBAEgB,qBAAM,KAAK,CAAC,KAAK,CAChC,WAAI,SAAS,qBAAW,OAAO,oBAAU,MAAM,CAAE,EACjD,MAAM,CACP,EAAA;;oBAHK,QAAQ,GAAG,SAGhB;oBAED,sBAAO,QAAQ,CAAC,IAAY,EAAC;;;SAC9B,EACD,CAAC,SAAS,EAAE,KAAK,CAAC,CACnB,CAAC;IAEF,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,eAAe,aAAa,CAAC"}
|
package/dist/esm/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, type UseSpaceDataProps, type UseSpaceDataValues, type CreateSpaceProps, type UpdateSpaceProps, type CreateRuleProps, type UpdateRuleProps, type DeleteRuleProps, type FetchRuleProps, type FetchManyRulesProps, } 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, 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";
|
|
@@ -24,7 +24,7 @@ export { useFetchUser, useFetchUserByForeignId, useFetchUserByUsername, useCheck
|
|
|
24
24
|
export { useFetchFollowStatus, useFetchFollowers, useFetchFollowersByUserId, useFetchFollowersCount, useFetchFollowersCountByUserId, useFetchFollowing, useFetchFollowingByUserId, useFetchFollowingCount, useFetchFollowingCountByUserId, useFollowManager, useFollowUser, useUnfollowByFollowId, useUnfollowUserByUserId, } from "./hooks/relationships/follows";
|
|
25
25
|
export { useRequestConnection, useAcceptConnection, useDeclineConnection, useRemoveConnection, useFetchConnections, useFetchConnectionStatus, useRemoveConnectionByUserId, useFetchConnectionsCount, useFetchSentPendingConnections, useFetchReceivedPendingConnections, useFetchConnectionsByUserId, useFetchConnectionsCountByUserId, useConnectionManager, } from "./hooks/relationships/connections";
|
|
26
26
|
export { useCreateReport } from "./hooks/reports";
|
|
27
|
-
export {
|
|
27
|
+
export { useFetchModeratedReports } from "./hooks/reports";
|
|
28
28
|
export { useHandleSpaceEntityReport } from "./hooks/reports";
|
|
29
29
|
export { useHandleSpaceCommentReport } from "./hooks/reports";
|
|
30
30
|
export { useGetMetadata } from "./hooks/utils";
|
package/dist/esm/index.js
CHANGED
|
@@ -30,7 +30,7 @@ export { useEntityList, useEntityListActions, } from "./hooks/entity-lists";
|
|
|
30
30
|
// -- spaces
|
|
31
31
|
export { useSpace, useSpaceData, useFetchSpace, useFetchSpaceByShortId, useFetchSpaceBySlug, useFetchSpaceBreadcrumb, useFetchSpaceChildren, useFetchManySpaces, useCheckSlugAvailability, useCreateSpace, useUpdateSpace, useDeleteSpace, useJoinSpace, useLeaveSpace, useFetchSpaceMembers, useFetchSpaceTeam, useFetchUserSpaces, useUpdateMemberRole, useApproveMember, useDeclineMember, useRemoveMember, useSpacePermissions,
|
|
32
32
|
// Rule hooks
|
|
33
|
-
useCreateRule, useUpdateRule, useDeleteRule, useFetchRule, useFetchManyRules, } from "./hooks/spaces";
|
|
33
|
+
useCreateRule, useUpdateRule, useDeleteRule, useFetchRule, useFetchManyRules, useReorderRules, } from "./hooks/spaces";
|
|
34
34
|
// -- space lists
|
|
35
35
|
export { useSpaceList, useSpaceListActions, } from "./hooks/space-lists";
|
|
36
36
|
// -- comments
|
|
@@ -45,7 +45,7 @@ export { useFetchFollowStatus, useFetchFollowers, useFetchFollowersByUserId, use
|
|
|
45
45
|
export { useRequestConnection, useAcceptConnection, useDeclineConnection, useRemoveConnection, useFetchConnections, useFetchConnectionStatus, useRemoveConnectionByUserId, useFetchConnectionsCount, useFetchSentPendingConnections, useFetchReceivedPendingConnections, useFetchConnectionsByUserId, useFetchConnectionsCountByUserId, useConnectionManager, } from "./hooks/relationships/connections";
|
|
46
46
|
// -- reports
|
|
47
47
|
export { useCreateReport } from "./hooks/reports";
|
|
48
|
-
export {
|
|
48
|
+
export { useFetchModeratedReports } from "./hooks/reports";
|
|
49
49
|
export { useHandleSpaceEntityReport } from "./hooks/reports";
|
|
50
50
|
export { useHandleSpaceCommentReport } from "./hooks/reports";
|
|
51
51
|
// -- general
|
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,0BAA0B,EAC1B,cAAc,EACd,sBAAsB,EACtB,aAAa,GACd,MAAM,WAAW,CAAC;AAEnB,kEAAkE;AAClE,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,GAEX,MAAM,qBAAqB,CAAC;AAE7B,cAAc;AACd,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE9D,YAAY;AACZ,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,oBAAoB;AACpB,OAAO,EAAE,OAAO,EAAsB,MAAM,cAAc,CAAC;AAE3D,oBAAoB;AACpB,OAAO,EACL,OAAO,EACP,cAAc,GAIf,MAAM,cAAc,CAAC;AAEtB,uBAAuB;AACvB,OAAO,EACL,mBAAmB,EACnB,0BAA0B,GAG3B,MAAM,2BAA2B,CAAC;AAEnC,iBAAiB;AACjB,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,uBAAuB,EACvB,4BAA4B,GAK7B,MAAM,qBAAqB,CAAC;AAE7B,cAAc;AACd,OAAO,EACL,SAAS,EACT,aAAa,EACb,eAAe,EACf,eAAe,EACf,cAAc,EACd,yBAAyB,EACzB,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,EACvB,2BAA2B,EAC3B,eAAe,GAGhB,MAAM,kBAAkB,CAAC;AAE1B,kBAAkB;AAClB,OAAO,EACL,aAAa,EACb,oBAAoB,GAMrB,MAAM,sBAAsB,CAAC;AAE9B,YAAY;AACZ,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,sBAAsB,EACtB,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,EACrB,kBAAkB,EAClB,wBAAwB,EACxB,cAAc,EACd,cAAc,EACd,cAAc,EACd,YAAY,EACZ,aAAa,EACb,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,mBAAmB;AACnB,aAAa;AACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,sBAAsB;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB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B,EAC9B,gBAAgB,EAChB,aAAa,EACb,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,+BAA+B,CAAC;AAEvC,iBAAiB;AACjB,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EACxB,2BAA2B,EAC3B,wBAAwB,EACxB,8BAA8B,EAC9B,kCAAkC,EAClC,2BAA2B,EAC3B,gCAAgC,EAChC,oBAAoB,GACrB,MAAM,mCAAmC,CAAC;AAE3C,aAAa;AACb,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAE9D,aAAa;AACb,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,aAAa;AACb,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAiBhE,OAAO,KAAK,eAAe,MAAM,qCAAqC,CAAC;AAiEvE,OAAO,EACL,cAAc,EACd,4BAA4B,EAC5B,gBAAgB,GACjB,MAAM,sCAAsC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
|
|
2
|
-
interface FetchSpaceReportsParams {
|
|
3
|
-
spaceId: string;
|
|
4
|
-
targetType?: "Comment" | "Entity";
|
|
5
|
-
sortBy?: "new" | "old";
|
|
6
|
-
page?: number;
|
|
7
|
-
limit?: number;
|
|
8
|
-
}
|
|
9
|
-
interface Report {
|
|
10
|
-
id: string;
|
|
11
|
-
projectId: string;
|
|
12
|
-
spaceId: string | null;
|
|
13
|
-
reporters: string[];
|
|
14
|
-
targetId: string;
|
|
15
|
-
targetType: "Comment" | "Entity";
|
|
16
|
-
reason: string;
|
|
17
|
-
details: string | null;
|
|
18
|
-
status: "Pending" | "On Hold" | "Escalated" | "Dismissed" | "Actioned";
|
|
19
|
-
actionTaken: string | null;
|
|
20
|
-
createdAt: Date;
|
|
21
|
-
updatedAt: Date;
|
|
22
|
-
deletedAt: Date | null;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Hook to fetch reports for a specific space
|
|
26
|
-
* Only accessible by space moderators/admins
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* const fetchSpaceReports = useFetchSpaceReports();
|
|
30
|
-
*
|
|
31
|
-
* const reports = await fetchSpaceReports({
|
|
32
|
-
* spaceId: "space-uuid",
|
|
33
|
-
* targetType: "Entity",
|
|
34
|
-
* page: 1,
|
|
35
|
-
* limit: 20
|
|
36
|
-
* });
|
|
37
|
-
*/
|
|
38
|
-
declare function useFetchSpaceReports(): ({ spaceId, targetType, sortBy, page, limit, }: FetchSpaceReportsParams) => Promise<PaginatedResponse<Report>>;
|
|
39
|
-
export default useFetchSpaceReports;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useFetchSpaceReports.js","sourceRoot":"","sources":["../../../../src/hooks/reports/useFetchSpaceReports.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,sEAAgD;AAChD,iFAA2D;AA2B3D;;;;;;;;;;;;;GAaG;AACH,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,EAMmB;;YALxB,OAAO,aAAA,EACP,UAAU,gBAAA,EACV,MAAM,YAAA,EACN,IAAI,UAAA,EACJ,KAAK,WAAA;;;;oBAEL,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,aAAU,EACzC,EAAE,MAAM,EAAE,EAAE,UAAU,YAAA,EAAE,MAAM,QAAA,EAAE,IAAI,MAAA,EAAE,KAAK,OAAA,EAAE,EAAE,CAChD,EAAA;;oBAHK,QAAQ,GAAG,SAGhB;oBAED,sBAAO,QAAQ,CAAC,IAAI,EAAC;;;SACtB,EACD,CAAC,SAAS,EAAE,KAAK,CAAC,CACnB,CAAC;IAEF,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED,kBAAe,oBAAoB,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
|
|
2
|
-
interface FetchSpaceReportsParams {
|
|
3
|
-
spaceId: string;
|
|
4
|
-
targetType?: "Comment" | "Entity";
|
|
5
|
-
sortBy?: "new" | "old";
|
|
6
|
-
page?: number;
|
|
7
|
-
limit?: number;
|
|
8
|
-
}
|
|
9
|
-
interface Report {
|
|
10
|
-
id: string;
|
|
11
|
-
projectId: string;
|
|
12
|
-
spaceId: string | null;
|
|
13
|
-
reporters: string[];
|
|
14
|
-
targetId: string;
|
|
15
|
-
targetType: "Comment" | "Entity";
|
|
16
|
-
reason: string;
|
|
17
|
-
details: string | null;
|
|
18
|
-
status: "Pending" | "On Hold" | "Escalated" | "Dismissed" | "Actioned";
|
|
19
|
-
actionTaken: string | null;
|
|
20
|
-
createdAt: Date;
|
|
21
|
-
updatedAt: Date;
|
|
22
|
-
deletedAt: Date | null;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Hook to fetch reports for a specific space
|
|
26
|
-
* Only accessible by space moderators/admins
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* const fetchSpaceReports = useFetchSpaceReports();
|
|
30
|
-
*
|
|
31
|
-
* const reports = await fetchSpaceReports({
|
|
32
|
-
* spaceId: "space-uuid",
|
|
33
|
-
* targetType: "Entity",
|
|
34
|
-
* page: 1,
|
|
35
|
-
* limit: 20
|
|
36
|
-
* });
|
|
37
|
-
*/
|
|
38
|
-
declare function useFetchSpaceReports(): ({ spaceId, targetType, sortBy, page, limit, }: FetchSpaceReportsParams) => Promise<PaginatedResponse<Report>>;
|
|
39
|
-
export default useFetchSpaceReports;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useFetchSpaceReports.js","sourceRoot":"","sources":["../../../../src/hooks/reports/useFetchSpaceReports.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,eAAe,MAAM,8BAA8B,CAAC;AA2B3D;;;;;;;;;;;;;GAaG;AACH,SAAS,oBAAoB;IAA7B,iBA+BC;IA9BS,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IACnC,IAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAEhC,IAAM,iBAAiB,GAAG,WAAW,CACnC,gEAAO,EAMmB;;YALxB,OAAO,aAAA,EACP,UAAU,gBAAA,EACV,MAAM,YAAA,EACN,IAAI,UAAA,EACJ,KAAK,WAAA;;;;oBAEL,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,aAAU,EACzC,EAAE,MAAM,EAAE,EAAE,UAAU,YAAA,EAAE,MAAM,QAAA,EAAE,IAAI,MAAA,EAAE,KAAK,OAAA,EAAE,EAAE,CAChD,EAAA;;oBAHK,QAAQ,GAAG,SAGhB;oBAED,sBAAO,QAAQ,CAAC,IAAI,EAAC;;;SACtB,EACD,CAAC,SAAS,EAAE,KAAK,CAAC,CACnB,CAAC;IAEF,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED,eAAe,oBAAoB,CAAC"}
|