strapi-plugin-comments 2.0.10 → 2.0.11
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/README.md +39 -5
- package/admin/src/translations/fr.json +132 -1
- package/build/README.md +818 -0
- package/build/admin/src/components/ActionButton/styles.d.ts +2 -0
- package/build/admin/src/components/ActionButton/styles.js +17 -0
- package/build/admin/src/components/ConfirmationDialog/index.d.ts +26 -0
- package/build/admin/src/components/ConfirmationDialog/index.js +104 -0
- package/build/admin/src/components/DiscussionStatus/index.d.ts +9 -0
- package/build/admin/src/components/DiscussionStatus/index.js +38 -0
- package/build/admin/src/components/DiscussionThread/index.d.ts +16 -0
- package/build/admin/src/components/DiscussionThread/index.js +99 -0
- package/build/admin/src/components/DiscussionThreadItem/index.d.ts +9 -0
- package/build/admin/src/components/DiscussionThreadItem/index.js +72 -0
- package/build/admin/src/components/DiscussionThreadItem/styles.d.ts +4 -0
- package/build/admin/src/components/DiscussionThreadItem/styles.js +27 -0
- package/build/admin/src/components/DiscussionThreadItemActions/index.d.ts +19 -0
- package/build/admin/src/components/DiscussionThreadItemActions/index.js +414 -0
- package/build/admin/src/components/DiscussionThreadItemActions/styles.d.ts +2 -0
- package/build/admin/src/components/DiscussionThreadItemActions/styles.js +17 -0
- package/build/admin/src/components/DiscussionThreadItemApprovalFlowActions/index.d.ts +17 -0
- package/build/admin/src/components/DiscussionThreadItemApprovalFlowActions/index.js +103 -0
- package/build/admin/src/components/DiscussionThreadItemApprovalFlowActions/styles.d.ts +2 -0
- package/build/admin/src/components/DiscussionThreadItemApprovalFlowActions/styles.js +15 -0
- package/build/admin/src/components/DiscussionThreadItemFooter/index.d.ts +16 -0
- package/build/admin/src/components/DiscussionThreadItemFooter/index.js +73 -0
- package/build/admin/src/components/DiscussionThreadItemFooter/styles.d.ts +3 -0
- package/build/admin/src/components/DiscussionThreadItemFooter/styles.js +25 -0
- package/build/admin/src/components/DiscussionThreadItemReviewAction/index.d.ts +30 -0
- package/build/admin/src/components/DiscussionThreadItemReviewAction/index.js +233 -0
- package/build/admin/src/components/FormSwitch/index.d.ts +11 -0
- package/build/admin/src/components/FormSwitch/index.js +39 -0
- package/build/admin/src/components/FormSwitch/styles.d.ts +2 -0
- package/build/admin/src/components/FormSwitch/styles.js +16 -0
- package/build/admin/src/components/IconButton/styles.d.ts +2 -0
- package/build/admin/src/components/IconButton/styles.js +27 -0
- package/build/admin/src/components/Initializer/index.d.ts +3 -0
- package/build/admin/src/components/Initializer/index.js +14 -0
- package/build/admin/src/components/LoadingIndicatorOverlay/index.d.ts +3 -0
- package/build/admin/src/components/LoadingIndicatorOverlay/index.js +18 -0
- package/build/admin/src/components/LoadingIndicatorOverlay/styles.d.ts +3 -0
- package/build/admin/src/components/LoadingIndicatorOverlay/styles.js +32 -0
- package/build/admin/src/components/Nav/index.d.ts +7 -0
- package/build/admin/src/components/Nav/index.js +72 -0
- package/build/admin/src/components/PluginIcon/index.d.ts +3 -0
- package/build/admin/src/components/PluginIcon/index.js +13 -0
- package/build/admin/src/components/ReportsReviewModal/index.d.ts +21 -0
- package/build/admin/src/components/ReportsReviewModal/index.js +72 -0
- package/build/admin/src/components/ReportsReviewTable/index.d.ts +21 -0
- package/build/admin/src/components/ReportsReviewTable/index.js +321 -0
- package/build/admin/src/components/StatusBadge/index.d.ts +11 -0
- package/build/admin/src/components/StatusBadge/index.js +22 -0
- package/build/admin/src/components/StatusBadge/styles.d.ts +2 -0
- package/build/admin/src/components/StatusBadge/styles.js +25 -0
- package/build/admin/src/components/TableFilters/index.d.ts +10 -0
- package/build/admin/src/components/TableFilters/index.js +109 -0
- package/build/admin/src/components/TablePagination/index.d.ts +15 -0
- package/build/admin/src/components/TablePagination/index.js +45 -0
- package/build/admin/src/components/icons/comments.d.ts +9 -0
- package/build/admin/src/components/icons/comments.js +23 -0
- package/build/admin/src/components/icons/index.d.ts +6 -0
- package/build/admin/src/components/icons/index.js +21 -0
- package/build/admin/src/components/icons/lock.d.ts +11 -0
- package/build/admin/src/components/icons/lock.js +29 -0
- package/build/admin/src/components/icons/review.d.ts +11 -0
- package/build/admin/src/components/icons/review.js +31 -0
- package/build/admin/src/components/icons/unlock.d.ts +11 -0
- package/build/admin/src/components/icons/unlock.js +29 -0
- package/build/admin/src/hooks/useConfig.d.ts +8 -0
- package/build/admin/src/hooks/useConfig.js +52 -0
- package/build/admin/src/index.d.ts +7 -0
- package/build/admin/src/index.js +137 -0
- package/build/admin/src/pages/App/index.d.ts +4 -0
- package/build/admin/src/pages/App/index.js +90 -0
- package/build/admin/src/pages/App/reducer/actions.d.ts +8 -0
- package/build/admin/src/pages/App/reducer/actions.js +12 -0
- package/build/admin/src/pages/App/reducer/constants.d.ts +4 -0
- package/build/admin/src/pages/App/reducer/constants.js +7 -0
- package/build/admin/src/pages/App/reducer/index.d.ts +14 -0
- package/build/admin/src/pages/App/reducer/index.js +31 -0
- package/build/admin/src/pages/App/reducer/init.d.ts +3 -0
- package/build/admin/src/pages/App/reducer/init.js +9 -0
- package/build/admin/src/pages/App/reducer/selectors.d.ts +6 -0
- package/build/admin/src/pages/App/reducer/selectors.js +20 -0
- package/build/admin/src/pages/App/utils/api.d.ts +2 -0
- package/build/admin/src/pages/App/utils/api.js +16 -0
- package/build/admin/src/pages/ComingSoonPage/index.d.ts +3 -0
- package/build/admin/src/pages/ComingSoonPage/index.js +78 -0
- package/build/admin/src/pages/Details/components/DetailsEntity/index.d.ts +18 -0
- package/build/admin/src/pages/Details/components/DetailsEntity/index.js +132 -0
- package/build/admin/src/pages/Details/components/DetailsFilters/index.d.ts +12 -0
- package/build/admin/src/pages/Details/components/DetailsFilters/index.js +48 -0
- package/build/admin/src/pages/Details/components/DetailsFilters/styles.d.ts +2 -0
- package/build/admin/src/pages/Details/components/DetailsFilters/styles.js +16 -0
- package/build/admin/src/pages/Details/index.d.ts +4 -0
- package/build/admin/src/pages/Details/index.js +216 -0
- package/build/admin/src/pages/Discover/components/DiscoverTableRow/index.d.ts +20 -0
- package/build/admin/src/pages/Discover/components/DiscoverTableRow/index.js +344 -0
- package/build/admin/src/pages/Discover/components/DiscoverTableRow/styles.d.ts +2 -0
- package/build/admin/src/pages/Discover/components/DiscoverTableRow/styles.js +16 -0
- package/build/admin/src/pages/Discover/index.d.ts +4 -0
- package/build/admin/src/pages/Discover/index.js +332 -0
- package/build/admin/src/pages/Discover/utils/api.d.ts +2 -0
- package/build/admin/src/pages/Discover/utils/api.js +23 -0
- package/build/admin/src/pages/Discover/utils/filtersSchema.d.ts +11 -0
- package/build/admin/src/pages/Discover/utils/filtersSchema.js +11 -0
- package/build/admin/src/pages/Settings/components/RestartAlert/styles.d.ts +2 -0
- package/build/admin/src/pages/Settings/components/RestartAlert/styles.js +16 -0
- package/build/admin/src/pages/Settings/index.d.ts +3 -0
- package/build/admin/src/pages/Settings/index.js +712 -0
- package/build/admin/src/pages/Settings/utils/api.d.ts +7 -0
- package/build/admin/src/pages/Settings/utils/api.js +80 -0
- package/build/admin/src/pages/utils/api.d.ts +12 -0
- package/build/admin/src/pages/utils/api.js +83 -0
- package/build/admin/src/permissions.d.ts +28 -0
- package/build/admin/src/permissions.js +65 -0
- package/build/admin/src/pluginId.d.ts +2 -0
- package/build/admin/src/pluginId.js +50 -0
- package/build/admin/src/reducers.d.ts +12 -0
- package/build/admin/src/reducers.js +14 -0
- package/build/admin/src/translations/en.json +132 -0
- package/build/admin/src/translations/fr.json +1 -0
- package/build/admin/src/translations/pt-BR.json +132 -0
- package/build/admin/src/utils/axiosInstance.d.ts +3 -0
- package/build/admin/src/utils/axiosInstance.js +37 -0
- package/build/admin/src/utils/constants.d.ts +25 -0
- package/build/admin/src/utils/constants.js +30 -0
- package/build/admin/src/utils/getApiUrl.d.ts +3 -0
- package/build/admin/src/utils/getApiUrl.js +6 -0
- package/build/admin/src/utils/getMessage.d.ts +4 -0
- package/build/admin/src/utils/getMessage.js +25 -0
- package/build/admin/src/utils/getRelatedGroups.d.ts +4 -0
- package/build/admin/src/utils/getRelatedGroups.js +6 -0
- package/build/admin/src/utils/getUrl.d.ts +3 -0
- package/build/admin/src/utils/getUrl.js +6 -0
- package/build/admin/src/utils/handleAPIError.d.ts +4 -0
- package/build/admin/src/utils/handleAPIError.js +20 -0
- package/build/admin/src/utils/index.d.ts +12 -0
- package/build/admin/src/utils/index.js +97 -0
- package/build/admin/src/utils/parseRegExp.d.ts +6 -0
- package/build/admin/src/utils/parseRegExp.js +11 -0
- package/build/admin/src/utils/renderEntryTitle.d.ts +4 -0
- package/build/admin/src/utils/renderEntryTitle.js +16 -0
- package/build/admin/src/utils/renderInitials.d.ts +3 -0
- package/build/admin/src/utils/renderInitials.js +11 -0
- package/build/admin/src/utils/resolveCommentStatus.d.ts +4 -0
- package/build/admin/src/utils/resolveCommentStatus.js +32 -0
- package/build/admin/src/utils/resolveCommentStatusColor.d.ts +4 -0
- package/build/admin/src/utils/resolveCommentStatusColor.js +22 -0
- package/build/content-types/comment.d.ts +91 -0
- package/build/content-types/comment.js +92 -0
- package/build/content-types/index.d.ts +143 -0
- package/build/content-types/index.js +18 -0
- package/build/content-types/report.d.ts +48 -0
- package/build/content-types/report.js +49 -0
- package/build/package.json +94 -0
- package/build/permissions.d.ts +18 -0
- package/build/permissions.js +18 -0
- package/build/server/bootstrap.d.ts +4 -0
- package/build/server/bootstrap.js +65 -0
- package/build/server/config/index.d.ts +4 -0
- package/build/server/config/index.js +19 -0
- package/build/server/controllers/admin.d.ts +4 -0
- package/build/server/controllers/admin.js +124 -0
- package/build/server/controllers/client.d.ts +4 -0
- package/build/server/controllers/client.js +111 -0
- package/build/server/controllers/index.d.ts +6 -0
- package/build/server/controllers/index.js +15 -0
- package/build/server/controllers/utils/functions.d.ts +7 -0
- package/build/server/controllers/utils/functions.js +24 -0
- package/build/server/controllers/utils/parsers.d.ts +15 -0
- package/build/server/controllers/utils/parsers.js +25 -0
- package/build/server/destroy.d.ts +3 -0
- package/build/server/destroy.js +3 -0
- package/build/server/graphql/index.d.ts +4 -0
- package/build/server/graphql/index.js +37 -0
- package/build/server/graphql/mutations/createAbuseReport.d.ts +11 -0
- package/build/server/graphql/mutations/createAbuseReport.js +27 -0
- package/build/server/graphql/mutations/createComment.d.ts +14 -0
- package/build/server/graphql/mutations/createComment.js +26 -0
- package/build/server/graphql/mutations/index.d.ts +4 -0
- package/build/server/graphql/mutations/index.js +28 -0
- package/build/server/graphql/mutations/removeComment.d.ts +11 -0
- package/build/server/graphql/mutations/removeComment.js +27 -0
- package/build/server/graphql/mutations/updateComment.d.ts +11 -0
- package/build/server/graphql/mutations/updateComment.js +27 -0
- package/build/server/graphql/queries/findAllFlat.d.ts +19 -0
- package/build/server/graphql/queries/findAllFlat.js +47 -0
- package/build/server/graphql/queries/findAllInHierarchy.d.ts +18 -0
- package/build/server/graphql/queries/findAllInHierarchy.js +38 -0
- package/build/server/graphql/queries/index.d.ts +4 -0
- package/build/server/graphql/queries/index.js +24 -0
- package/build/server/graphql/resolvers-config.d.ts +23 -0
- package/build/server/graphql/resolvers-config.js +13 -0
- package/build/server/graphql/types/comment-author.d.ts +4 -0
- package/build/server/graphql/types/comment-author.js +12 -0
- package/build/server/graphql/types/comment-nested.d.ts +4 -0
- package/build/server/graphql/types/comment-nested.js +19 -0
- package/build/server/graphql/types/comment.d.ts +4 -0
- package/build/server/graphql/types/comment.js +18 -0
- package/build/server/graphql/types/create-comment-author.d.ts +4 -0
- package/build/server/graphql/types/create-comment-author.js +12 -0
- package/build/server/graphql/types/create-comment.d.ts +4 -0
- package/build/server/graphql/types/create-comment.js +12 -0
- package/build/server/graphql/types/create-report.d.ts +4 -0
- package/build/server/graphql/types/create-report.js +12 -0
- package/build/server/graphql/types/id.d.ts +4 -0
- package/build/server/graphql/types/id.js +26 -0
- package/build/server/graphql/types/identify-comment-author.d.ts +4 -0
- package/build/server/graphql/types/identify-comment-author.js +9 -0
- package/build/server/graphql/types/index.d.ts +4 -0
- package/build/server/graphql/types/index.js +44 -0
- package/build/server/graphql/types/remove-comment.d.ts +4 -0
- package/build/server/graphql/types/remove-comment.js +11 -0
- package/build/server/graphql/types/report-reason.d.ts +4 -0
- package/build/server/graphql/types/report-reason.js +12 -0
- package/build/server/graphql/types/report.d.ts +4 -0
- package/build/server/graphql/types/report.js +14 -0
- package/build/server/graphql/types/response-find-all.d.ts +4 -0
- package/build/server/graphql/types/response-find-all.js +10 -0
- package/build/server/graphql/types/response-meta.d.ts +4 -0
- package/build/server/graphql/types/response-meta.js +9 -0
- package/build/server/graphql/types/response-pagination.d.ts +4 -0
- package/build/server/graphql/types/response-pagination.js +14 -0
- package/build/server/graphql/types/update-comment.d.ts +4 -0
- package/build/server/graphql/types/update-comment.js +12 -0
- package/build/server/index.d.ts +26 -0
- package/build/server/index.js +25 -0
- package/build/server/register.d.ts +3 -0
- package/build/server/register.js +3 -0
- package/build/server/routes/admin.d.ts +4 -0
- package/build/server/routes/admin.js +118 -0
- package/build/server/routes/client.d.ts +4 -0
- package/build/server/routes/client.js +54 -0
- package/build/server/routes/index.d.ts +11 -0
- package/build/server/routes/index.js +21 -0
- package/build/server/services/admin.d.ts +5 -0
- package/build/server/services/admin.js +296 -0
- package/build/server/services/client.d.ts +5 -0
- package/build/server/services/client.js +247 -0
- package/build/server/services/common.d.ts +5 -0
- package/build/server/services/common.js +266 -0
- package/build/server/services/graphql.d.ts +5 -0
- package/build/server/services/graphql.js +136 -0
- package/build/server/services/index.d.ts +8 -0
- package/build/server/services/index.js +16 -0
- package/build/server/services/utils/functions.d.ts +13 -0
- package/build/server/services/utils/functions.js +141 -0
- package/build/server/utils/constants.d.ts +9 -0
- package/build/server/utils/constants.js +23 -0
- package/build/server/utils/error.d.ts +23 -0
- package/build/server/utils/error.js +29 -0
- package/build/server/utils/functions.d.ts +14 -0
- package/build/server/utils/functions.js +50 -0
- package/build/strapi-admin.d.ts +3 -0
- package/build/strapi-admin.js +10 -0
- package/build/strapi-server.d.ts +177 -0
- package/build/strapi-server.js +46 -0
- package/build/tsconfig.tsbuildinfo +1 -0
- package/build/types/contentTypes.d.ts +46 -0
- package/build/types/contentTypes.js +3 -0
- package/package.json +3 -3
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = ({ nexus }) =>
|
|
3
|
+
nexus.objectType({
|
|
4
|
+
name: "CommentNested",
|
|
5
|
+
definition(t) {
|
|
6
|
+
t.id("id");
|
|
7
|
+
t.nonNull.string("content");
|
|
8
|
+
t.boolean("blocked");
|
|
9
|
+
t.boolean("blockedThread");
|
|
10
|
+
t.string("approvalStatus");
|
|
11
|
+
t.boolean("removed");
|
|
12
|
+
t.field("threadOf", { type: "CommentSingle" });
|
|
13
|
+
t.list.field("children", { type: "CommentNested" });
|
|
14
|
+
t.field("author", { type: "CommentAuthor" });
|
|
15
|
+
t.string("createdAt");
|
|
16
|
+
t.string("updatedAt");
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=comment-nested.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = ({ nexus }) =>
|
|
3
|
+
nexus.objectType({
|
|
4
|
+
name: "CommentSingle",
|
|
5
|
+
definition(t) {
|
|
6
|
+
t.id("id");
|
|
7
|
+
t.nonNull.string("content");
|
|
8
|
+
t.boolean("blocked");
|
|
9
|
+
t.boolean("blockedThread");
|
|
10
|
+
t.boolean("removed");
|
|
11
|
+
t.string("approvalStatus");
|
|
12
|
+
t.field("threadOf", { type: "CommentSingle" });
|
|
13
|
+
t.field("author", { type: "CommentAuthor" });
|
|
14
|
+
t.string("createdAt");
|
|
15
|
+
t.string("updatedAt");
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=comment.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = ({ nexus }) =>
|
|
3
|
+
nexus.inputObjectType({
|
|
4
|
+
name: "CreateCommentAuthor",
|
|
5
|
+
definition(t) {
|
|
6
|
+
t.nonNull.id("id");
|
|
7
|
+
t.nonNull.string("name");
|
|
8
|
+
t.string("email");
|
|
9
|
+
t.string("avatar");
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=create-comment-author.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = ({ nexus }) =>
|
|
3
|
+
nexus.inputObjectType({
|
|
4
|
+
name: "CreateComment",
|
|
5
|
+
definition(t) {
|
|
6
|
+
t.nonNull.string("content");
|
|
7
|
+
t.nonNull.string("relation");
|
|
8
|
+
t.id("threadOf");
|
|
9
|
+
t.field("author", { type: "CreateCommentAuthor" });
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=create-comment.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = ({ nexus }) =>
|
|
3
|
+
nexus.inputObjectType({
|
|
4
|
+
name: "CreateReport",
|
|
5
|
+
definition(t) {
|
|
6
|
+
t.id("commentId");
|
|
7
|
+
t.nonNull.string("relation");
|
|
8
|
+
t.nonNull.string("content");
|
|
9
|
+
t.field("reason", { type: "ReportReason" });
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=create-report.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const { isNumber, parseInt } = require("lodash");
|
|
3
|
+
const { Kind } = require("graphql");
|
|
4
|
+
module.exports = ({ nexus }) =>
|
|
5
|
+
nexus.scalarType({
|
|
6
|
+
name: "Id",
|
|
7
|
+
asNexusMethod: "id",
|
|
8
|
+
description: "Id as string or int",
|
|
9
|
+
parseValue(value) {
|
|
10
|
+
const parsedValue = parseInt(value);
|
|
11
|
+
if (isNumber(parsedValue)) {
|
|
12
|
+
return parsedValue;
|
|
13
|
+
}
|
|
14
|
+
return value;
|
|
15
|
+
},
|
|
16
|
+
serialize(value) {
|
|
17
|
+
return value;
|
|
18
|
+
},
|
|
19
|
+
parseLiteral(ast) {
|
|
20
|
+
if ([Kind.INT, Kind.STRING].includes(ast.kind)) {
|
|
21
|
+
return ast.value;
|
|
22
|
+
}
|
|
23
|
+
return null;
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=id.js.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault =
|
|
3
|
+
(this && this.__importDefault) ||
|
|
4
|
+
function (mod) {
|
|
5
|
+
return mod && mod.__esModule ? mod : { default: mod };
|
|
6
|
+
};
|
|
7
|
+
const id_1 = __importDefault(require("./id"));
|
|
8
|
+
const comment_1 = __importDefault(require("./comment"));
|
|
9
|
+
const comment_nested_1 = __importDefault(require("./comment-nested"));
|
|
10
|
+
const comment_author_1 = __importDefault(require("./comment-author"));
|
|
11
|
+
const create_comment_1 = __importDefault(require("./create-comment"));
|
|
12
|
+
const create_comment_author_1 = __importDefault(
|
|
13
|
+
require("./create-comment-author")
|
|
14
|
+
);
|
|
15
|
+
const update_comment_1 = __importDefault(require("./update-comment"));
|
|
16
|
+
const remove_comment_1 = __importDefault(require("./remove-comment"));
|
|
17
|
+
const identify_comment_author_1 = __importDefault(
|
|
18
|
+
require("./identify-comment-author")
|
|
19
|
+
);
|
|
20
|
+
const report_1 = __importDefault(require("./report"));
|
|
21
|
+
const report_reason_1 = __importDefault(require("./report-reason"));
|
|
22
|
+
const create_report_1 = __importDefault(require("./create-report"));
|
|
23
|
+
const response_pagination_1 = __importDefault(require("./response-pagination"));
|
|
24
|
+
const response_meta_1 = __importDefault(require("./response-meta"));
|
|
25
|
+
const response_find_all_1 = __importDefault(require("./response-find-all"));
|
|
26
|
+
const typesFactories = [
|
|
27
|
+
id_1.default,
|
|
28
|
+
comment_1.default,
|
|
29
|
+
comment_nested_1.default,
|
|
30
|
+
comment_author_1.default,
|
|
31
|
+
create_comment_1.default,
|
|
32
|
+
create_comment_author_1.default,
|
|
33
|
+
update_comment_1.default,
|
|
34
|
+
remove_comment_1.default,
|
|
35
|
+
identify_comment_author_1.default,
|
|
36
|
+
report_1.default,
|
|
37
|
+
report_reason_1.default,
|
|
38
|
+
create_report_1.default,
|
|
39
|
+
response_pagination_1.default,
|
|
40
|
+
response_meta_1.default,
|
|
41
|
+
response_find_all_1.default,
|
|
42
|
+
];
|
|
43
|
+
module.exports = (context) => typesFactories.map((factory) => factory(context));
|
|
44
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = ({ nexus }) =>
|
|
3
|
+
nexus.inputObjectType({
|
|
4
|
+
name: "RemoveComment",
|
|
5
|
+
definition(t) {
|
|
6
|
+
t.id("id");
|
|
7
|
+
t.nonNull.string("relation");
|
|
8
|
+
t.field("author", { type: "IdentifyCommentAuthor" });
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=remove-comment.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = ({ nexus, config }) => {
|
|
3
|
+
const { reportReasons } = config;
|
|
4
|
+
return nexus.enumType({
|
|
5
|
+
name: "ReportReason",
|
|
6
|
+
description: "Reason of abuse report",
|
|
7
|
+
members: {
|
|
8
|
+
...reportReasons,
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=report-reason.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = ({ nexus }) =>
|
|
3
|
+
nexus.objectType({
|
|
4
|
+
name: "Report",
|
|
5
|
+
definition(t) {
|
|
6
|
+
t.id("id");
|
|
7
|
+
t.nonNull.string("content");
|
|
8
|
+
t.field("reason", { type: "ReportReason" });
|
|
9
|
+
t.field("related", { type: "CommentSingle" });
|
|
10
|
+
t.string("createdAt");
|
|
11
|
+
t.string("updatedAt");
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=report.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = ({ nexus }) =>
|
|
3
|
+
nexus.objectType({
|
|
4
|
+
name: "ResponseFindAll",
|
|
5
|
+
definition(t) {
|
|
6
|
+
t.list.field("data", { type: "CommentSingle" });
|
|
7
|
+
t.field("meta", { type: "ResponseMeta" });
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=response-find-all.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = ({ nexus }) =>
|
|
3
|
+
nexus.objectType({
|
|
4
|
+
name: "ResponsePagination",
|
|
5
|
+
definition(t) {
|
|
6
|
+
t.int("page");
|
|
7
|
+
t.int("pageSize");
|
|
8
|
+
t.int("pageCount");
|
|
9
|
+
t.int("total");
|
|
10
|
+
t.int("start");
|
|
11
|
+
t.int("limit");
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=response-pagination.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = ({ nexus }) =>
|
|
3
|
+
nexus.inputObjectType({
|
|
4
|
+
name: "UpdateComment",
|
|
5
|
+
definition(t) {
|
|
6
|
+
t.id("id");
|
|
7
|
+
t.nonNull.string("content");
|
|
8
|
+
t.nonNull.string("relation");
|
|
9
|
+
t.field("author", { type: "IdentifyCommentAuthor" });
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=update-comment.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
register: () => void;
|
|
3
|
+
bootstrap: ({ strapi }: import("strapi-typed").StrapiContext) => Promise<void>;
|
|
4
|
+
destroy: () => void;
|
|
5
|
+
config: import("../types").StrapiConfig;
|
|
6
|
+
controllers: {
|
|
7
|
+
[key: string]: Object | Function;
|
|
8
|
+
};
|
|
9
|
+
routes: {
|
|
10
|
+
[key: string]: {
|
|
11
|
+
type: string;
|
|
12
|
+
routes: import("strapi-typed").StrapiRoute[];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
services: {
|
|
16
|
+
admin: ({ strapi }: import("strapi-typed").StrapiContext) => import("../types").IServiceAdmin;
|
|
17
|
+
client: ({ strapi }: import("strapi-typed").StrapiContext) => import("../types").IServiceClient;
|
|
18
|
+
common: ({ strapi }: import("strapi-typed").StrapiContext) => import("../types").IServiceCommon;
|
|
19
|
+
gql: ({ strapi }: import("strapi-typed").StrapiContext) => import("../types").IServiceGraphQL;
|
|
20
|
+
};
|
|
21
|
+
contentTypes: {};
|
|
22
|
+
policies: {};
|
|
23
|
+
middlewares: {};
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|
|
26
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const register_1 = __importDefault(require("./register"));
|
|
7
|
+
const bootstrap_1 = __importDefault(require("./bootstrap"));
|
|
8
|
+
const destroy_1 = __importDefault(require("./destroy"));
|
|
9
|
+
const config_1 = __importDefault(require("./config"));
|
|
10
|
+
const controllers_1 = __importDefault(require("./controllers"));
|
|
11
|
+
const routes_1 = __importDefault(require("./routes"));
|
|
12
|
+
const services_1 = __importDefault(require("./services"));
|
|
13
|
+
exports.default = {
|
|
14
|
+
register: register_1.default,
|
|
15
|
+
bootstrap: bootstrap_1.default,
|
|
16
|
+
destroy: destroy_1.default,
|
|
17
|
+
config: config_1.default,
|
|
18
|
+
controllers: controllers_1.default,
|
|
19
|
+
routes: routes_1.default,
|
|
20
|
+
services: services_1.default,
|
|
21
|
+
contentTypes: {},
|
|
22
|
+
policies: {},
|
|
23
|
+
middlewares: {},
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const routes = [
|
|
4
|
+
{
|
|
5
|
+
method: "GET",
|
|
6
|
+
path: "/moderate/config",
|
|
7
|
+
handler: "admin.config",
|
|
8
|
+
config: {
|
|
9
|
+
policies: [],
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
method: "GET",
|
|
14
|
+
path: "/moderate/all",
|
|
15
|
+
handler: "admin.findAll",
|
|
16
|
+
config: {
|
|
17
|
+
policies: [],
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
method: "GET",
|
|
22
|
+
path: "/moderate/single/:id",
|
|
23
|
+
handler: "admin.findOne",
|
|
24
|
+
config: {
|
|
25
|
+
policies: [],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
method: "PATCH",
|
|
30
|
+
path: "/moderate/single/:id/approve",
|
|
31
|
+
handler: "admin.approveComment",
|
|
32
|
+
config: {
|
|
33
|
+
policies: [],
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
method: "PATCH",
|
|
38
|
+
path: "/moderate/single/:id/reject",
|
|
39
|
+
handler: "admin.rejectComment",
|
|
40
|
+
config: {
|
|
41
|
+
policies: [],
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
method: "PATCH",
|
|
46
|
+
path: "/moderate/single/:id/block",
|
|
47
|
+
handler: "admin.blockComment",
|
|
48
|
+
config: {
|
|
49
|
+
policies: [],
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
method: "PATCH",
|
|
54
|
+
path: "/moderate/single/:id/unblock",
|
|
55
|
+
handler: "admin.unblockComment",
|
|
56
|
+
config: {
|
|
57
|
+
policies: [],
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
method: "PATCH",
|
|
62
|
+
path: "/moderate/single/:id/report/:reportId/resolve",
|
|
63
|
+
handler: "admin.resolveAbuseReport",
|
|
64
|
+
config: {
|
|
65
|
+
policies: [],
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
method: "PATCH",
|
|
70
|
+
path: "/moderate/thread/:id/block",
|
|
71
|
+
handler: "admin.blockCommentThread",
|
|
72
|
+
config: {
|
|
73
|
+
policies: [],
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
method: "PATCH",
|
|
78
|
+
path: "/moderate/thread/:id/unblock",
|
|
79
|
+
handler: "admin.unblockCommentThread",
|
|
80
|
+
config: {
|
|
81
|
+
policies: [],
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
method: "GET",
|
|
86
|
+
path: "/settings/config",
|
|
87
|
+
handler: "admin.settingsConfig",
|
|
88
|
+
config: {
|
|
89
|
+
policies: [],
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
method: "PUT",
|
|
94
|
+
path: "/settings/config",
|
|
95
|
+
handler: "admin.settingsUpdateConfig",
|
|
96
|
+
config: {
|
|
97
|
+
policies: [],
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
method: "DELETE",
|
|
102
|
+
path: "/settings/config",
|
|
103
|
+
handler: "admin.settingsRestoreConfig",
|
|
104
|
+
config: {
|
|
105
|
+
policies: [],
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
method: "GET",
|
|
110
|
+
path: "/settings/restart",
|
|
111
|
+
handler: "admin.settingsRestart",
|
|
112
|
+
config: {
|
|
113
|
+
policies: [],
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
];
|
|
117
|
+
exports.default = routes;
|
|
118
|
+
//# sourceMappingURL=admin.js.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const routes = [
|
|
4
|
+
{
|
|
5
|
+
method: "GET",
|
|
6
|
+
path: "/:relation",
|
|
7
|
+
handler: "client.findAllInHierarchy",
|
|
8
|
+
config: {
|
|
9
|
+
policies: [],
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
method: "POST",
|
|
14
|
+
path: "/:relation",
|
|
15
|
+
handler: "client.post",
|
|
16
|
+
config: {
|
|
17
|
+
policies: [],
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
method: "GET",
|
|
22
|
+
path: "/:relation/flat",
|
|
23
|
+
handler: "client.findAllFlat",
|
|
24
|
+
config: {
|
|
25
|
+
policies: [],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
method: "PUT",
|
|
30
|
+
path: "/:relation/comment/:commentId",
|
|
31
|
+
handler: "client.put",
|
|
32
|
+
config: {
|
|
33
|
+
policies: [],
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
method: "POST",
|
|
38
|
+
path: "/:relation/comment/:commentId/report-abuse",
|
|
39
|
+
handler: "client.reportAbuse",
|
|
40
|
+
config: {
|
|
41
|
+
policies: [],
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
method: "DELETE",
|
|
46
|
+
path: "/:relation/comment/:commentId",
|
|
47
|
+
handler: "client.removeComment",
|
|
48
|
+
config: {
|
|
49
|
+
policies: [],
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
];
|
|
53
|
+
exports.default = routes;
|
|
54
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { StrapiRoute } from "strapi-typed";
|
|
2
|
+
declare type PluginRoutes = {
|
|
3
|
+
[key: string]: PluginScopeRoutes;
|
|
4
|
+
};
|
|
5
|
+
declare type PluginScopeRoutes = {
|
|
6
|
+
type: string;
|
|
7
|
+
routes: Array<StrapiRoute>;
|
|
8
|
+
};
|
|
9
|
+
declare const routes: PluginRoutes;
|
|
10
|
+
export default routes;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault =
|
|
3
|
+
(this && this.__importDefault) ||
|
|
4
|
+
function (mod) {
|
|
5
|
+
return mod && mod.__esModule ? mod : { default: mod };
|
|
6
|
+
};
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
const client_1 = __importDefault(require("./client"));
|
|
9
|
+
const admin_1 = __importDefault(require("./admin"));
|
|
10
|
+
const routes = {
|
|
11
|
+
"content-api": {
|
|
12
|
+
type: "content-api",
|
|
13
|
+
routes: client_1.default,
|
|
14
|
+
},
|
|
15
|
+
admin: {
|
|
16
|
+
type: "admin",
|
|
17
|
+
routes: admin_1.default,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
exports.default = routes;
|
|
21
|
+
//# sourceMappingURL=index.js.map
|