strapi-plugin-comments 2.0.8 → 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.
Files changed (266) hide show
  1. package/README.md +45 -11
  2. package/admin/src/translations/en.json +1 -0
  3. package/admin/src/translations/fr.json +132 -1
  4. package/admin/src/translations/pt-BR.json +132 -0
  5. package/build/README.md +818 -0
  6. package/build/admin/src/components/ActionButton/styles.d.ts +2 -0
  7. package/build/admin/src/components/ActionButton/styles.js +17 -0
  8. package/build/admin/src/components/ConfirmationDialog/index.d.ts +26 -0
  9. package/build/admin/src/components/ConfirmationDialog/index.js +104 -0
  10. package/build/admin/src/components/DiscussionStatus/index.d.ts +9 -0
  11. package/build/admin/src/components/DiscussionStatus/index.js +38 -0
  12. package/build/admin/src/components/DiscussionThread/index.d.ts +16 -0
  13. package/build/admin/src/components/DiscussionThread/index.js +99 -0
  14. package/build/admin/src/components/DiscussionThreadItem/index.d.ts +9 -0
  15. package/build/admin/src/components/DiscussionThreadItem/index.js +72 -0
  16. package/build/admin/src/components/DiscussionThreadItem/styles.d.ts +4 -0
  17. package/build/admin/src/components/DiscussionThreadItem/styles.js +27 -0
  18. package/build/admin/src/components/DiscussionThreadItemActions/index.d.ts +19 -0
  19. package/build/admin/src/components/DiscussionThreadItemActions/index.js +414 -0
  20. package/build/admin/src/components/DiscussionThreadItemActions/styles.d.ts +2 -0
  21. package/build/admin/src/components/DiscussionThreadItemActions/styles.js +17 -0
  22. package/build/admin/src/components/DiscussionThreadItemApprovalFlowActions/index.d.ts +17 -0
  23. package/build/admin/src/components/DiscussionThreadItemApprovalFlowActions/index.js +103 -0
  24. package/build/admin/src/components/DiscussionThreadItemApprovalFlowActions/styles.d.ts +2 -0
  25. package/build/admin/src/components/DiscussionThreadItemApprovalFlowActions/styles.js +15 -0
  26. package/build/admin/src/components/DiscussionThreadItemFooter/index.d.ts +16 -0
  27. package/build/admin/src/components/DiscussionThreadItemFooter/index.js +73 -0
  28. package/build/admin/src/components/DiscussionThreadItemFooter/styles.d.ts +3 -0
  29. package/build/admin/src/components/DiscussionThreadItemFooter/styles.js +25 -0
  30. package/build/admin/src/components/DiscussionThreadItemReviewAction/index.d.ts +30 -0
  31. package/build/admin/src/components/DiscussionThreadItemReviewAction/index.js +233 -0
  32. package/build/admin/src/components/FormSwitch/index.d.ts +11 -0
  33. package/build/admin/src/components/FormSwitch/index.js +39 -0
  34. package/build/admin/src/components/FormSwitch/styles.d.ts +2 -0
  35. package/build/admin/src/components/FormSwitch/styles.js +16 -0
  36. package/build/admin/src/components/IconButton/styles.d.ts +2 -0
  37. package/build/admin/src/components/IconButton/styles.js +27 -0
  38. package/build/admin/src/components/Initializer/index.d.ts +3 -0
  39. package/build/admin/src/components/Initializer/index.js +14 -0
  40. package/build/admin/src/components/LoadingIndicatorOverlay/index.d.ts +3 -0
  41. package/build/admin/src/components/LoadingIndicatorOverlay/index.js +18 -0
  42. package/build/admin/src/components/LoadingIndicatorOverlay/styles.d.ts +3 -0
  43. package/build/admin/src/components/LoadingIndicatorOverlay/styles.js +32 -0
  44. package/build/admin/src/components/Nav/index.d.ts +7 -0
  45. package/build/admin/src/components/Nav/index.js +72 -0
  46. package/build/admin/src/components/PluginIcon/index.d.ts +3 -0
  47. package/build/admin/src/components/PluginIcon/index.js +13 -0
  48. package/build/admin/src/components/ReportsReviewModal/index.d.ts +21 -0
  49. package/build/admin/src/components/ReportsReviewModal/index.js +72 -0
  50. package/build/admin/src/components/ReportsReviewTable/index.d.ts +21 -0
  51. package/build/admin/src/components/ReportsReviewTable/index.js +321 -0
  52. package/build/admin/src/components/StatusBadge/index.d.ts +11 -0
  53. package/build/admin/src/components/StatusBadge/index.js +22 -0
  54. package/build/admin/src/components/StatusBadge/styles.d.ts +2 -0
  55. package/build/admin/src/components/StatusBadge/styles.js +25 -0
  56. package/build/admin/src/components/TableFilters/index.d.ts +10 -0
  57. package/build/admin/src/components/TableFilters/index.js +109 -0
  58. package/build/admin/src/components/TablePagination/index.d.ts +15 -0
  59. package/build/admin/src/components/TablePagination/index.js +45 -0
  60. package/build/admin/src/components/icons/comments.d.ts +9 -0
  61. package/build/admin/src/components/icons/comments.js +23 -0
  62. package/build/admin/src/components/icons/index.d.ts +6 -0
  63. package/build/admin/src/components/icons/index.js +21 -0
  64. package/build/admin/src/components/icons/lock.d.ts +11 -0
  65. package/build/admin/src/components/icons/lock.js +29 -0
  66. package/build/admin/src/components/icons/review.d.ts +11 -0
  67. package/build/admin/src/components/icons/review.js +31 -0
  68. package/build/admin/src/components/icons/unlock.d.ts +11 -0
  69. package/build/admin/src/components/icons/unlock.js +29 -0
  70. package/build/admin/src/hooks/useConfig.d.ts +8 -0
  71. package/build/admin/src/hooks/useConfig.js +52 -0
  72. package/build/admin/src/index.d.ts +7 -0
  73. package/build/admin/src/index.js +137 -0
  74. package/build/admin/src/pages/App/index.d.ts +4 -0
  75. package/build/admin/src/pages/App/index.js +90 -0
  76. package/build/admin/src/pages/App/reducer/actions.d.ts +8 -0
  77. package/build/admin/src/pages/App/reducer/actions.js +12 -0
  78. package/build/admin/src/pages/App/reducer/constants.d.ts +4 -0
  79. package/build/admin/src/pages/App/reducer/constants.js +7 -0
  80. package/build/admin/src/pages/App/reducer/index.d.ts +14 -0
  81. package/build/admin/src/pages/App/reducer/index.js +31 -0
  82. package/build/admin/src/pages/App/reducer/init.d.ts +3 -0
  83. package/build/admin/src/pages/App/reducer/init.js +9 -0
  84. package/build/admin/src/pages/App/reducer/selectors.d.ts +6 -0
  85. package/build/admin/src/pages/App/reducer/selectors.js +20 -0
  86. package/build/admin/src/pages/App/utils/api.d.ts +2 -0
  87. package/build/admin/src/pages/App/utils/api.js +16 -0
  88. package/build/admin/src/pages/ComingSoonPage/index.d.ts +3 -0
  89. package/build/admin/src/pages/ComingSoonPage/index.js +78 -0
  90. package/build/admin/src/pages/Details/components/DetailsEntity/index.d.ts +18 -0
  91. package/build/admin/src/pages/Details/components/DetailsEntity/index.js +132 -0
  92. package/build/admin/src/pages/Details/components/DetailsFilters/index.d.ts +12 -0
  93. package/build/admin/src/pages/Details/components/DetailsFilters/index.js +48 -0
  94. package/build/admin/src/pages/Details/components/DetailsFilters/styles.d.ts +2 -0
  95. package/build/admin/src/pages/Details/components/DetailsFilters/styles.js +16 -0
  96. package/build/admin/src/pages/Details/index.d.ts +4 -0
  97. package/build/admin/src/pages/Details/index.js +216 -0
  98. package/build/admin/src/pages/Discover/components/DiscoverTableRow/index.d.ts +20 -0
  99. package/build/admin/src/pages/Discover/components/DiscoverTableRow/index.js +344 -0
  100. package/build/admin/src/pages/Discover/components/DiscoverTableRow/styles.d.ts +2 -0
  101. package/build/admin/src/pages/Discover/components/DiscoverTableRow/styles.js +16 -0
  102. package/build/admin/src/pages/Discover/index.d.ts +4 -0
  103. package/build/admin/src/pages/Discover/index.js +332 -0
  104. package/build/admin/src/pages/Discover/utils/api.d.ts +2 -0
  105. package/build/admin/src/pages/Discover/utils/api.js +23 -0
  106. package/build/admin/src/pages/Discover/utils/filtersSchema.d.ts +11 -0
  107. package/build/admin/src/pages/Discover/utils/filtersSchema.js +11 -0
  108. package/build/admin/src/pages/Settings/components/RestartAlert/styles.d.ts +2 -0
  109. package/build/admin/src/pages/Settings/components/RestartAlert/styles.js +16 -0
  110. package/build/admin/src/pages/Settings/index.d.ts +3 -0
  111. package/build/admin/src/pages/Settings/index.js +712 -0
  112. package/build/admin/src/pages/Settings/utils/api.d.ts +7 -0
  113. package/build/admin/src/pages/Settings/utils/api.js +80 -0
  114. package/build/admin/src/pages/utils/api.d.ts +12 -0
  115. package/build/admin/src/pages/utils/api.js +83 -0
  116. package/build/admin/src/permissions.d.ts +28 -0
  117. package/build/admin/src/permissions.js +65 -0
  118. package/build/admin/src/pluginId.d.ts +2 -0
  119. package/build/admin/src/pluginId.js +50 -0
  120. package/build/admin/src/reducers.d.ts +12 -0
  121. package/build/admin/src/reducers.js +14 -0
  122. package/build/admin/src/translations/en.json +132 -0
  123. package/build/admin/src/translations/fr.json +1 -0
  124. package/build/admin/src/translations/pt-BR.json +132 -0
  125. package/build/admin/src/utils/axiosInstance.d.ts +3 -0
  126. package/build/admin/src/utils/axiosInstance.js +37 -0
  127. package/build/admin/src/utils/constants.d.ts +25 -0
  128. package/build/admin/src/utils/constants.js +30 -0
  129. package/build/admin/src/utils/getApiUrl.d.ts +3 -0
  130. package/build/admin/src/utils/getApiUrl.js +6 -0
  131. package/build/admin/src/utils/getMessage.d.ts +4 -0
  132. package/build/admin/src/utils/getMessage.js +25 -0
  133. package/build/admin/src/utils/getRelatedGroups.d.ts +4 -0
  134. package/build/admin/src/utils/getRelatedGroups.js +6 -0
  135. package/build/admin/src/utils/getUrl.d.ts +3 -0
  136. package/build/admin/src/utils/getUrl.js +6 -0
  137. package/build/admin/src/utils/handleAPIError.d.ts +4 -0
  138. package/build/admin/src/utils/handleAPIError.js +20 -0
  139. package/build/admin/src/utils/index.d.ts +12 -0
  140. package/build/admin/src/utils/index.js +97 -0
  141. package/build/admin/src/utils/parseRegExp.d.ts +6 -0
  142. package/build/admin/src/utils/parseRegExp.js +11 -0
  143. package/build/admin/src/utils/renderEntryTitle.d.ts +4 -0
  144. package/build/admin/src/utils/renderEntryTitle.js +16 -0
  145. package/build/admin/src/utils/renderInitials.d.ts +3 -0
  146. package/build/admin/src/utils/renderInitials.js +11 -0
  147. package/build/admin/src/utils/resolveCommentStatus.d.ts +4 -0
  148. package/build/admin/src/utils/resolveCommentStatus.js +32 -0
  149. package/build/admin/src/utils/resolveCommentStatusColor.d.ts +4 -0
  150. package/build/admin/src/utils/resolveCommentStatusColor.js +22 -0
  151. package/build/content-types/comment.d.ts +91 -0
  152. package/build/content-types/comment.js +92 -0
  153. package/build/content-types/index.d.ts +143 -0
  154. package/build/content-types/index.js +18 -0
  155. package/build/content-types/report.d.ts +48 -0
  156. package/build/content-types/report.js +49 -0
  157. package/build/package.json +94 -0
  158. package/build/permissions.d.ts +18 -0
  159. package/build/permissions.js +18 -0
  160. package/build/server/bootstrap.d.ts +4 -0
  161. package/build/server/bootstrap.js +65 -0
  162. package/build/server/config/index.d.ts +4 -0
  163. package/build/server/config/index.js +19 -0
  164. package/build/server/controllers/admin.d.ts +4 -0
  165. package/build/server/controllers/admin.js +124 -0
  166. package/build/server/controllers/client.d.ts +4 -0
  167. package/build/server/controllers/client.js +111 -0
  168. package/build/server/controllers/index.d.ts +6 -0
  169. package/build/server/controllers/index.js +15 -0
  170. package/build/server/controllers/utils/functions.d.ts +7 -0
  171. package/build/server/controllers/utils/functions.js +24 -0
  172. package/build/server/controllers/utils/parsers.d.ts +15 -0
  173. package/build/server/controllers/utils/parsers.js +25 -0
  174. package/build/server/destroy.d.ts +3 -0
  175. package/build/server/destroy.js +3 -0
  176. package/build/server/graphql/index.d.ts +4 -0
  177. package/build/server/graphql/index.js +37 -0
  178. package/build/server/graphql/mutations/createAbuseReport.d.ts +11 -0
  179. package/build/server/graphql/mutations/createAbuseReport.js +27 -0
  180. package/build/server/graphql/mutations/createComment.d.ts +14 -0
  181. package/build/server/graphql/mutations/createComment.js +26 -0
  182. package/build/server/graphql/mutations/index.d.ts +4 -0
  183. package/build/server/graphql/mutations/index.js +28 -0
  184. package/build/server/graphql/mutations/removeComment.d.ts +11 -0
  185. package/build/server/graphql/mutations/removeComment.js +27 -0
  186. package/build/server/graphql/mutations/updateComment.d.ts +11 -0
  187. package/build/server/graphql/mutations/updateComment.js +27 -0
  188. package/build/server/graphql/queries/findAllFlat.d.ts +19 -0
  189. package/build/server/graphql/queries/findAllFlat.js +47 -0
  190. package/build/server/graphql/queries/findAllInHierarchy.d.ts +18 -0
  191. package/build/server/graphql/queries/findAllInHierarchy.js +38 -0
  192. package/build/server/graphql/queries/index.d.ts +4 -0
  193. package/build/server/graphql/queries/index.js +24 -0
  194. package/build/server/graphql/resolvers-config.d.ts +23 -0
  195. package/build/server/graphql/resolvers-config.js +13 -0
  196. package/build/server/graphql/types/comment-author.d.ts +4 -0
  197. package/build/server/graphql/types/comment-author.js +12 -0
  198. package/build/server/graphql/types/comment-nested.d.ts +4 -0
  199. package/build/server/graphql/types/comment-nested.js +19 -0
  200. package/build/server/graphql/types/comment.d.ts +4 -0
  201. package/build/server/graphql/types/comment.js +18 -0
  202. package/build/server/graphql/types/create-comment-author.d.ts +4 -0
  203. package/build/server/graphql/types/create-comment-author.js +12 -0
  204. package/build/server/graphql/types/create-comment.d.ts +4 -0
  205. package/build/server/graphql/types/create-comment.js +12 -0
  206. package/build/server/graphql/types/create-report.d.ts +4 -0
  207. package/build/server/graphql/types/create-report.js +12 -0
  208. package/build/server/graphql/types/id.d.ts +4 -0
  209. package/build/server/graphql/types/id.js +26 -0
  210. package/build/server/graphql/types/identify-comment-author.d.ts +4 -0
  211. package/build/server/graphql/types/identify-comment-author.js +9 -0
  212. package/build/server/graphql/types/index.d.ts +4 -0
  213. package/build/server/graphql/types/index.js +44 -0
  214. package/build/server/graphql/types/remove-comment.d.ts +4 -0
  215. package/build/server/graphql/types/remove-comment.js +11 -0
  216. package/build/server/graphql/types/report-reason.d.ts +4 -0
  217. package/build/server/graphql/types/report-reason.js +12 -0
  218. package/build/server/graphql/types/report.d.ts +4 -0
  219. package/build/server/graphql/types/report.js +14 -0
  220. package/build/server/graphql/types/response-find-all.d.ts +4 -0
  221. package/build/server/graphql/types/response-find-all.js +10 -0
  222. package/build/server/graphql/types/response-meta.d.ts +4 -0
  223. package/build/server/graphql/types/response-meta.js +9 -0
  224. package/build/server/graphql/types/response-pagination.d.ts +4 -0
  225. package/build/server/graphql/types/response-pagination.js +14 -0
  226. package/build/server/graphql/types/update-comment.d.ts +4 -0
  227. package/build/server/graphql/types/update-comment.js +12 -0
  228. package/build/server/index.d.ts +26 -0
  229. package/build/server/index.js +25 -0
  230. package/build/server/register.d.ts +3 -0
  231. package/build/server/register.js +3 -0
  232. package/build/server/routes/admin.d.ts +4 -0
  233. package/build/server/routes/admin.js +118 -0
  234. package/build/server/routes/client.d.ts +4 -0
  235. package/build/server/routes/client.js +54 -0
  236. package/build/server/routes/index.d.ts +11 -0
  237. package/build/server/routes/index.js +21 -0
  238. package/build/server/services/admin.d.ts +5 -0
  239. package/build/server/services/admin.js +296 -0
  240. package/build/server/services/client.d.ts +5 -0
  241. package/build/server/services/client.js +247 -0
  242. package/build/server/services/common.d.ts +5 -0
  243. package/build/server/services/common.js +266 -0
  244. package/build/server/services/graphql.d.ts +5 -0
  245. package/build/server/services/graphql.js +136 -0
  246. package/build/server/services/index.d.ts +8 -0
  247. package/build/server/services/index.js +16 -0
  248. package/build/server/services/utils/functions.d.ts +13 -0
  249. package/build/server/services/utils/functions.js +141 -0
  250. package/build/server/utils/constants.d.ts +9 -0
  251. package/build/server/utils/constants.js +23 -0
  252. package/build/server/utils/error.d.ts +23 -0
  253. package/build/server/utils/error.js +29 -0
  254. package/build/server/utils/functions.d.ts +14 -0
  255. package/build/server/utils/functions.js +50 -0
  256. package/build/strapi-admin.d.ts +3 -0
  257. package/build/strapi-admin.js +10 -0
  258. package/build/strapi-server.d.ts +177 -0
  259. package/build/strapi-server.js +46 -0
  260. package/build/tsconfig.tsbuildinfo +1 -0
  261. package/build/types/contentTypes.d.ts +46 -0
  262. package/build/types/contentTypes.js +3 -0
  263. package/package.json +3 -3
  264. package/server/controllers/client.js +0 -3
  265. package/server/graphql/queries/findAllFlat.js +6 -2
  266. package/server/services/common.js +2 -2
@@ -0,0 +1,4 @@
1
+ import { StrapiGraphQLContext } from "../../../types";
2
+ declare const _default: ({ nexus }: StrapiGraphQLContext) => any;
3
+ export = _default;
4
+ //# sourceMappingURL=comment-author.d.ts.map
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ module.exports = ({ nexus }) =>
3
+ nexus.objectType({
4
+ name: "CommentAuthor",
5
+ definition(t) {
6
+ t.id("id");
7
+ t.nonNull.string("name");
8
+ t.string("email");
9
+ t.string("avatar");
10
+ },
11
+ });
12
+ //# sourceMappingURL=comment-author.js.map
@@ -0,0 +1,4 @@
1
+ import { StrapiGraphQLContext } from "../../../types";
2
+ declare const _default: ({ nexus }: StrapiGraphQLContext) => any;
3
+ export = _default;
4
+ //# sourceMappingURL=comment-nested.d.ts.map
@@ -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,4 @@
1
+ import { StrapiGraphQLContext } from "../../../types";
2
+ declare const _default: ({ nexus }: StrapiGraphQLContext) => any;
3
+ export = _default;
4
+ //# sourceMappingURL=comment.d.ts.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,4 @@
1
+ import { StrapiGraphQLContext } from "../../../types";
2
+ declare const _default: ({ nexus }: StrapiGraphQLContext) => any;
3
+ export = _default;
4
+ //# sourceMappingURL=create-comment-author.d.ts.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,4 @@
1
+ import { StrapiGraphQLContext } from "../../../types";
2
+ declare const _default: ({ nexus }: StrapiGraphQLContext) => any;
3
+ export = _default;
4
+ //# sourceMappingURL=create-comment.d.ts.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,4 @@
1
+ import { StrapiGraphQLContext } from "../../../types";
2
+ declare const _default: ({ nexus }: StrapiGraphQLContext) => any;
3
+ export = _default;
4
+ //# sourceMappingURL=create-report.d.ts.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,4 @@
1
+ import { StrapiGraphQLContext } from "../../../types";
2
+ declare const _default: ({ nexus }: StrapiGraphQLContext) => any;
3
+ export = _default;
4
+ //# sourceMappingURL=id.d.ts.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,4 @@
1
+ import { StrapiGraphQLContext } from "../../../types";
2
+ declare const _default: ({ nexus }: StrapiGraphQLContext) => any;
3
+ export = _default;
4
+ //# sourceMappingURL=identify-comment-author.d.ts.map
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ module.exports = ({ nexus }) =>
3
+ nexus.inputObjectType({
4
+ name: "IdentifyCommentAuthor",
5
+ definition(t) {
6
+ t.nonNull.id("id");
7
+ },
8
+ });
9
+ //# sourceMappingURL=identify-comment-author.js.map
@@ -0,0 +1,4 @@
1
+ import { StrapiGraphQLContext } from "../../../types";
2
+ declare const _default: (context: StrapiGraphQLContext) => any[];
3
+ export = _default;
4
+ //# sourceMappingURL=index.d.ts.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,4 @@
1
+ import { StrapiGraphQLContext } from "../../../types";
2
+ declare const _default: ({ nexus }: StrapiGraphQLContext) => any;
3
+ export = _default;
4
+ //# sourceMappingURL=remove-comment.d.ts.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,4 @@
1
+ import { StrapiGraphQLContext } from "../../../types";
2
+ declare const _default: ({ nexus, config }: StrapiGraphQLContext) => any;
3
+ export = _default;
4
+ //# sourceMappingURL=report-reason.d.ts.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,4 @@
1
+ import { StrapiGraphQLContext } from "../../../types";
2
+ declare const _default: ({ nexus }: StrapiGraphQLContext) => any;
3
+ export = _default;
4
+ //# sourceMappingURL=report.d.ts.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,4 @@
1
+ import { StrapiGraphQLContext } from "../../../types";
2
+ declare const _default: ({ nexus }: StrapiGraphQLContext) => any;
3
+ export = _default;
4
+ //# sourceMappingURL=response-find-all.d.ts.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,4 @@
1
+ import { StrapiGraphQLContext } from "../../../types";
2
+ declare const _default: ({ nexus }: StrapiGraphQLContext) => any;
3
+ export = _default;
4
+ //# sourceMappingURL=response-meta.d.ts.map
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ module.exports = ({ nexus }) =>
3
+ nexus.objectType({
4
+ name: "ResponseMeta",
5
+ definition(t) {
6
+ t.field("pagination", { type: "ResponsePagination" });
7
+ },
8
+ });
9
+ //# sourceMappingURL=response-meta.js.map
@@ -0,0 +1,4 @@
1
+ import { StrapiGraphQLContext } from "../../../types";
2
+ declare const _default: ({ nexus }: StrapiGraphQLContext) => any;
3
+ export = _default;
4
+ //# sourceMappingURL=response-pagination.d.ts.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,4 @@
1
+ import { StrapiGraphQLContext } from "../../../types";
2
+ declare const _default: ({ nexus }: StrapiGraphQLContext) => any;
3
+ export = _default;
4
+ //# sourceMappingURL=update-comment.d.ts.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,3 @@
1
+ declare const _default: () => void;
2
+ export = _default;
3
+ //# sourceMappingURL=register.d.ts.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ module.exports = () => {};
3
+ //# sourceMappingURL=register.js.map
@@ -0,0 +1,4 @@
1
+ import { StrapiRoute } from "strapi-typed";
2
+ declare const routes: StrapiRoute[];
3
+ export default routes;
4
+ //# sourceMappingURL=admin.d.ts.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,4 @@
1
+ import { StrapiRoute } from "strapi-typed";
2
+ declare const routes: StrapiRoute[];
3
+ export default routes;
4
+ //# sourceMappingURL=client.d.ts.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
@@ -0,0 +1,5 @@
1
+ import { StrapiContext } from "strapi-typed";
2
+ import { IServiceAdmin } from "../../types";
3
+ declare const _default: ({ strapi }: StrapiContext) => IServiceAdmin;
4
+ export = _default;
5
+ //# sourceMappingURL=admin.d.ts.map