strapi-plugin-comments 3.2.3 → 3.2.5
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/LICENSE.md +18 -4
- package/README.md +379 -26
- package/dist/_chunks/{en-D_SOYUc-.mjs → en-B_ywmALc.mjs} +7 -0
- package/dist/_chunks/en-CTX-vxI-.js +1 -0
- package/dist/_chunks/fr-CJZ1I0cO.js +1 -0
- package/dist/_chunks/{fr-D-buWSlG.mjs → fr-CzgABcR9.mjs} +7 -0
- package/dist/_chunks/{index-B0yEw22H.mjs → index-2HqVa6_n.mjs} +11304 -12128
- package/dist/_chunks/index-BFzHCJ8V.mjs +5959 -0
- package/dist/_chunks/index-BYQzi_fP.js +44 -0
- package/dist/_chunks/{index-Cw0IIXkV.js → index-Cfy8GjIN.js} +134 -91
- package/dist/_chunks/{index-DKj3j1po.mjs → index-D8SWUMcR.mjs} +45 -23
- package/dist/_chunks/index-DXgb05uJ.js +1 -0
- package/dist/_chunks/{index-BuR0AJ4i.mjs → index-W9svnX5A.mjs} +185 -146
- package/dist/_chunks/index-hBG5i5nT.js +5 -0
- package/dist/_chunks/{pl-a5516Yys.mjs → pl-Ca-o0rE-.mjs} +7 -0
- package/dist/_chunks/pl-clljrMvo.js +1 -0
- package/dist/_chunks/pt-BR-DV48_kX8.js +1 -0
- package/dist/_chunks/{pt-BR-DwEywOda.mjs → pt-BR-XHO5Olrb.mjs} +7 -0
- package/dist/_chunks/ru-BK78F2Vt.js +1 -0
- package/dist/_chunks/{ru-72L1_BWN.mjs → ru-zKH0YOjJ.mjs} +7 -0
- package/dist/_chunks/tr-BMe1cFKp.js +1 -0
- package/dist/_chunks/{tr-Ca93Ai2h.mjs → tr-BaczzuT6.mjs} +7 -0
- package/dist/_chunks/{zh-Hans-DXLzMysj.mjs → zh-Hans-CPSQ76Y3.mjs} +7 -0
- package/dist/_chunks/zh-Hans-xMRxrXVG.js +1 -0
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/api/client.d.ts +67 -58
- package/dist/admin/src/api/schemas.d.ts +169 -2797
- package/dist/admin/src/components/ActionButton/index.d.ts +2 -4
- package/dist/admin/src/components/CommentReactionsSummary/index.d.ts +8 -0
- package/dist/admin/src/components/CommentStatusFilters/index.d.ts +2 -1
- package/dist/admin/src/components/CustomInjectionZone/index.d.ts +6 -0
- package/dist/admin/src/components/CustomInjectionZoneCell/index.d.ts +7 -0
- package/dist/admin/src/components/DiscussionThreadItem/DiscussionThreadItemFooter.d.ts +1 -1
- package/dist/admin/src/components/DiscussionThreadItem/index.d.ts +3 -3
- package/dist/admin/src/components/IconButtonGroup/index.d.ts +2 -5
- package/dist/admin/src/components/LoadingIndicatorOverlay/index.d.ts +2 -1
- package/dist/admin/src/components/PluginIcon/index.d.ts +2 -1
- package/dist/admin/src/components/ReactionCounter/index.d.ts +7 -0
- package/dist/admin/src/components/ReactionCounter/styled.d.ts +16 -0
- package/dist/admin/src/components/SideNav/index.d.ts +2 -1
- package/dist/admin/src/components/StatusBadge/index.d.ts +3 -5
- package/dist/admin/src/components/Wysiwyg/EditorLayout.d.ts +2 -2
- package/dist/admin/src/components/Wysiwyg/PreviewWysiwyg.d.ts +2 -1
- package/dist/admin/src/components/Wysiwyg/WysiwygFooter.d.ts +2 -1
- package/dist/admin/src/components/Wysiwyg/WysiwygNav.d.ts +1 -1
- package/dist/admin/src/components/Wysiwyg/WysiwygStyles.d.ts +4 -4
- package/dist/admin/src/components/icons/comments.d.ts +2 -1
- package/dist/admin/src/components/icons/strapiIcons.d.ts +2 -1
- package/dist/admin/src/contexts/UserContext.d.ts +7 -7
- package/dist/admin/src/hooks/useAPI.d.ts +74 -65
- package/dist/admin/src/hooks/useCommentMutations.d.ts +18 -18
- package/dist/admin/src/hooks/useCommentsAll.d.ts +8 -6
- package/dist/admin/src/hooks/useConfig.d.ts +2 -0
- package/dist/admin/src/hooks/useReactionCounts.d.ts +2 -0
- package/dist/admin/src/hooks/useReactionTypes.d.ts +8 -0
- package/dist/admin/src/hooks/useReports.d.ts +13 -11
- package/dist/admin/src/hooks/useUserContext.d.ts +7 -7
- package/dist/admin/src/pages/AiEvaluations/index.d.ts +2 -0
- package/dist/admin/src/pages/App/index.d.ts +2 -1
- package/dist/admin/src/pages/Details/DetailsEntry.d.ts +2 -1
- package/dist/admin/src/pages/Discover/index.d.ts +2 -1
- package/dist/admin/src/pages/Settings/hooks/useSettingsAPI.d.ts +9 -7
- package/dist/admin/src/pages/Settings/index.d.ts +2 -1
- package/dist/admin/src/translations/en.d.ts +7 -0
- package/dist/admin/src/translations/fr.d.ts +7 -0
- package/dist/admin/src/translations/pl.d.ts +199 -192
- package/dist/admin/src/translations/pt-BR.d.ts +7 -0
- package/dist/admin/src/translations/ru.d.ts +7 -0
- package/dist/admin/src/translations/tr.d.ts +7 -0
- package/dist/admin/src/translations/zh-Hans.d.ts +7 -0
- package/dist/admin/src/utils/functions.d.ts +3 -0
- package/dist/admin/src/utils/reactionsIntegration.d.ts +24 -0
- package/dist/admin/src/utils/resolveCommentStatusColor.d.ts +1 -1
- package/dist/admin/src/utils/resolveReportStatusColor.d.ts +1 -1
- package/dist/server/index.js +69 -88
- package/dist/server/index.mjs +9714 -7520
- package/dist/server/src/config/index.d.ts +37 -112
- package/dist/server/src/const/REPORT_SOURCE.d.ts +4 -0
- package/dist/server/src/const/index.d.ts +1 -0
- package/dist/server/src/content-types/index.d.ts +7 -0
- package/dist/server/src/content-types/report/index.d.ts +7 -0
- package/dist/server/src/content-types/report/schema.d.ts +8 -1
- package/dist/server/src/controllers/admin.controller.d.ts +920 -888
- package/dist/server/src/controllers/client.controller.d.ts +1595 -709
- package/dist/server/src/controllers/index.d.ts +2784 -6208
- package/dist/server/src/controllers/settings.controller.d.ts +110 -94
- package/dist/server/src/graphql/getResolversConfig.d.ts +33 -0
- package/dist/server/src/graphql/mutations/getApproveComment.d.ts +149 -0
- package/dist/server/src/graphql/mutations/getBlockComment.d.ts +149 -0
- package/dist/server/src/graphql/mutations/getBlockCommentThread.d.ts +149 -0
- package/dist/server/src/graphql/mutations/getCreateAbuseReport.d.ts +81 -78
- package/dist/server/src/graphql/mutations/getCreateComment.d.ts +74 -72
- package/dist/server/src/graphql/mutations/getRejectComment.d.ts +149 -0
- package/dist/server/src/graphql/mutations/getRemoveComment.d.ts +74 -72
- package/dist/server/src/graphql/mutations/getResolveAbuseReport.d.ts +25 -0
- package/dist/server/src/graphql/mutations/getResolveAllAbuseReportsForComment.d.ts +16 -0
- package/dist/server/src/graphql/mutations/getResolveAllAbuseReportsForThread.d.ts +16 -0
- package/dist/server/src/graphql/mutations/getResolveCommentMultipleAbuseReports.d.ts +17 -0
- package/dist/server/src/graphql/mutations/getResolveMultipleAbuseReports.d.ts +16 -0
- package/dist/server/src/graphql/mutations/getUnblockComment.d.ts +149 -0
- package/dist/server/src/graphql/mutations/getUnblockCommentThread.d.ts +149 -0
- package/dist/server/src/graphql/mutations/getUpdateComment.d.ts +74 -72
- package/dist/server/src/graphql/queries/findAllFlat.d.ts +162 -155
- package/dist/server/src/graphql/queries/findAllInHierarchy.d.ts +9 -1
- package/dist/server/src/graphql/queries/findAllPerAuthor.d.ts +161 -154
- package/dist/server/src/graphql/types/getCommentReactionCount.d.ts +2 -0
- package/dist/server/src/graphql/types/getCommentReactionsMetaEntry.d.ts +2 -0
- package/dist/server/src/graphql/types/getModerateCommentInput.d.ts +2 -0
- package/dist/server/src/graphql/types/getReportsResolveBatch.d.ts +2 -0
- package/dist/server/src/graphql/types/getResolveAbuseReportInput.d.ts +2 -0
- package/dist/server/src/graphql/types/getResolveCommentMultipleAbuseReportsInput.d.ts +2 -0
- package/dist/server/src/graphql/types/getResolveMultipleAbuseReportsInput.d.ts +2 -0
- package/dist/server/src/graphql/types/index.d.ts +1 -1
- package/dist/server/src/index.d.ts +17 -35339
- package/dist/server/src/repositories/report.comment.repository.d.ts +87 -83
- package/dist/server/src/repositories/store.repository.d.ts +144 -124
- package/dist/server/src/services/admin/admin.service.d.ts +14597 -8230
- package/dist/server/src/services/client.service.d.ts +11410 -7681
- package/dist/server/src/services/common.service.d.ts +3546 -469
- package/dist/server/src/services/email.service.d.ts +11 -0
- package/dist/server/src/services/index.d.ts +17 -27339
- package/dist/server/src/services/reactions.service.d.ts +11976 -0
- package/dist/server/src/services/settings.service.d.ts +85 -73
- package/dist/server/src/services/utils/functions.d.ts +2 -2
- package/dist/server/src/services/utils/reactions.d.ts +12 -0
- package/dist/server/src/utils/constants.d.ts +1 -0
- package/dist/server/src/utils/getConfig.d.ts +1 -1
- package/dist/server/src/utils/getPluginService.d.ts +1 -1
- package/dist/server/src/utils/types.d.ts +5 -3
- package/dist/server/src/validators/api/controllers/admin.controller.validator.d.ts +234 -1322
- package/dist/server/src/validators/api/controllers/client.controller.validator.d.ts +2051 -2013
- package/dist/server/src/validators/api/controllers/settings.controller.validator.d.ts +15 -13
- package/dist/server/src/validators/repositories/comment.schema.d.ts +15 -439
- package/dist/server/src/validators/repositories/comment.validator.d.ts +240 -7397
- package/dist/server/src/validators/repositories/reports.validator.d.ts +89 -2940
- package/dist/server/src/validators/repositories/utils.d.ts +5 -13
- package/dist/server/src/validators/utils.d.ts +164 -1875
- package/dist/shared/constants.d.ts +1 -0
- package/package.json +40 -48
- package/dist/_chunks/en-D55DewfG.js +0 -1
- package/dist/_chunks/fr-BJBWOa1O.js +0 -1
- package/dist/_chunks/index-Bi2NGQAJ.mjs +0 -5682
- package/dist/_chunks/index-DQDKR2VV.js +0 -1
- package/dist/_chunks/index-EP5RzAx9.js +0 -44
- package/dist/_chunks/index-k6CsdDOQ.js +0 -5
- package/dist/_chunks/pl-DUaDM2d3.js +0 -1
- package/dist/_chunks/pt-BR-BXuFBSgm.js +0 -1
- package/dist/_chunks/ru-B7jFc-n7.js +0 -1
- package/dist/_chunks/tr-B2Tw9kcB.js +0 -1
- package/dist/_chunks/zh-Hans-Cp3JcN8q.js +0 -1
|
@@ -2,177 +2,193 @@ import { RequestContext, StrapiContext } from '../@types';
|
|
|
2
2
|
import { CommentsPluginConfig } from '../config';
|
|
3
3
|
declare const settingsController: ({ strapi }: StrapiContext) => {
|
|
4
4
|
get(ctx: RequestContext): Promise<{
|
|
5
|
-
enabledCollections
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
enabledCollections: string[];
|
|
6
|
+
moderatorRoles: string[];
|
|
7
|
+
approvalFlow: string[];
|
|
8
|
+
entryLabel: Record<string, string[]>;
|
|
9
|
+
blockedAuthorProps: string[];
|
|
10
|
+
reactionsEnabled: boolean;
|
|
11
|
+
client: {
|
|
12
|
+
url?: string;
|
|
13
|
+
contactEmail?: string;
|
|
14
|
+
};
|
|
11
15
|
isValidationEnabled?: boolean;
|
|
12
16
|
reportReasons?: {
|
|
13
|
-
BAD_LANGUAGE
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
BAD_LANGUAGE: import("../const").REPORT_REASON.BAD_LANGUAGE;
|
|
18
|
+
OTHER: import("../const").REPORT_REASON.OTHER;
|
|
19
|
+
DISCRIMINATION: import("../const").REPORT_REASON.DISCRIMINATION;
|
|
16
20
|
};
|
|
17
21
|
isGQLPluginEnabled?: boolean;
|
|
22
|
+
isReactionsPluginInstalled?: boolean;
|
|
23
|
+
badWords?: boolean;
|
|
18
24
|
gql?: {
|
|
19
25
|
auth?: boolean;
|
|
20
26
|
};
|
|
21
|
-
|
|
27
|
+
} | Omit<{
|
|
28
|
+
enabledCollections: string[];
|
|
29
|
+
moderatorRoles: string[];
|
|
30
|
+
approvalFlow: string[];
|
|
31
|
+
entryLabel: Record<string, string[]>;
|
|
32
|
+
blockedAuthorProps: string[];
|
|
33
|
+
reactionsEnabled: boolean;
|
|
34
|
+
client: {
|
|
22
35
|
url?: string;
|
|
23
36
|
contactEmail?: string;
|
|
24
37
|
};
|
|
25
|
-
} | Omit<{
|
|
26
|
-
enabledCollections?: string[];
|
|
27
|
-
approvalFlow?: string[];
|
|
28
|
-
entryLabel?: Record<string, string[]>;
|
|
29
|
-
moderatorRoles?: string[];
|
|
30
|
-
badWords?: boolean;
|
|
31
|
-
blockedAuthorProps?: string[];
|
|
32
38
|
isValidationEnabled?: boolean;
|
|
33
39
|
reportReasons?: {
|
|
34
|
-
BAD_LANGUAGE
|
|
35
|
-
|
|
36
|
-
|
|
40
|
+
BAD_LANGUAGE: import("../const").REPORT_REASON.BAD_LANGUAGE;
|
|
41
|
+
OTHER: import("../const").REPORT_REASON.OTHER;
|
|
42
|
+
DISCRIMINATION: import("../const").REPORT_REASON.DISCRIMINATION;
|
|
37
43
|
};
|
|
38
44
|
isGQLPluginEnabled?: boolean;
|
|
45
|
+
isReactionsPluginInstalled?: boolean;
|
|
46
|
+
badWords?: boolean;
|
|
39
47
|
gql?: {
|
|
40
48
|
auth?: boolean;
|
|
41
49
|
};
|
|
42
|
-
|
|
50
|
+
}, "enabledCollections" | "moderatorRoles" | "isGQLPluginEnabled" | "isReactionsPluginInstalled">>;
|
|
51
|
+
getForSettingsPage(ctx: RequestContext): Promise<{
|
|
52
|
+
enabledCollections: string[];
|
|
53
|
+
moderatorRoles: string[];
|
|
54
|
+
approvalFlow: string[];
|
|
55
|
+
entryLabel: Record<string, string[]>;
|
|
56
|
+
blockedAuthorProps: string[];
|
|
57
|
+
reactionsEnabled: boolean;
|
|
58
|
+
client: {
|
|
43
59
|
url?: string;
|
|
44
60
|
contactEmail?: string;
|
|
45
61
|
};
|
|
46
|
-
}, "enabledCollections" | "moderatorRoles" | "isGQLPluginEnabled">>;
|
|
47
|
-
getForSettingsPage(ctx: RequestContext): Promise<{
|
|
48
|
-
enabledCollections?: string[];
|
|
49
|
-
approvalFlow?: string[];
|
|
50
|
-
entryLabel?: Record<string, string[]>;
|
|
51
|
-
moderatorRoles?: string[];
|
|
52
|
-
badWords?: boolean;
|
|
53
|
-
blockedAuthorProps?: string[];
|
|
54
62
|
isValidationEnabled?: boolean;
|
|
55
63
|
reportReasons?: {
|
|
56
|
-
BAD_LANGUAGE
|
|
57
|
-
|
|
58
|
-
|
|
64
|
+
BAD_LANGUAGE: import("../const").REPORT_REASON.BAD_LANGUAGE;
|
|
65
|
+
OTHER: import("../const").REPORT_REASON.OTHER;
|
|
66
|
+
DISCRIMINATION: import("../const").REPORT_REASON.DISCRIMINATION;
|
|
59
67
|
};
|
|
60
68
|
isGQLPluginEnabled?: boolean;
|
|
69
|
+
isReactionsPluginInstalled?: boolean;
|
|
70
|
+
badWords?: boolean;
|
|
61
71
|
gql?: {
|
|
62
72
|
auth?: boolean;
|
|
63
73
|
};
|
|
64
|
-
|
|
74
|
+
} | Omit<{
|
|
75
|
+
enabledCollections: string[];
|
|
76
|
+
moderatorRoles: string[];
|
|
77
|
+
approvalFlow: string[];
|
|
78
|
+
entryLabel: Record<string, string[]>;
|
|
79
|
+
blockedAuthorProps: string[];
|
|
80
|
+
reactionsEnabled: boolean;
|
|
81
|
+
client: {
|
|
65
82
|
url?: string;
|
|
66
83
|
contactEmail?: string;
|
|
67
84
|
};
|
|
68
|
-
} | Omit<{
|
|
69
|
-
enabledCollections?: string[];
|
|
70
|
-
approvalFlow?: string[];
|
|
71
|
-
entryLabel?: Record<string, string[]>;
|
|
72
|
-
moderatorRoles?: string[];
|
|
73
|
-
badWords?: boolean;
|
|
74
|
-
blockedAuthorProps?: string[];
|
|
75
85
|
isValidationEnabled?: boolean;
|
|
76
86
|
reportReasons?: {
|
|
77
|
-
BAD_LANGUAGE
|
|
78
|
-
|
|
79
|
-
|
|
87
|
+
BAD_LANGUAGE: import("../const").REPORT_REASON.BAD_LANGUAGE;
|
|
88
|
+
OTHER: import("../const").REPORT_REASON.OTHER;
|
|
89
|
+
DISCRIMINATION: import("../const").REPORT_REASON.DISCRIMINATION;
|
|
80
90
|
};
|
|
81
91
|
isGQLPluginEnabled?: boolean;
|
|
92
|
+
isReactionsPluginInstalled?: boolean;
|
|
93
|
+
badWords?: boolean;
|
|
82
94
|
gql?: {
|
|
83
95
|
auth?: boolean;
|
|
84
96
|
};
|
|
85
|
-
|
|
97
|
+
}, "enabledCollections" | "moderatorRoles" | "isGQLPluginEnabled" | "isReactionsPluginInstalled">>;
|
|
98
|
+
update(ctx: RequestContext<CommentsPluginConfig>): Promise<{
|
|
99
|
+
enabledCollections: string[];
|
|
100
|
+
moderatorRoles: string[];
|
|
101
|
+
approvalFlow: string[];
|
|
102
|
+
entryLabel: Record<string, string[]>;
|
|
103
|
+
blockedAuthorProps: string[];
|
|
104
|
+
reactionsEnabled: boolean;
|
|
105
|
+
client: {
|
|
86
106
|
url?: string;
|
|
87
107
|
contactEmail?: string;
|
|
88
108
|
};
|
|
89
|
-
}, "enabledCollections" | "moderatorRoles" | "isGQLPluginEnabled">>;
|
|
90
|
-
update(ctx: RequestContext<CommentsPluginConfig>): Promise<{
|
|
91
|
-
enabledCollections?: string[];
|
|
92
|
-
approvalFlow?: string[];
|
|
93
|
-
entryLabel?: Record<string, string[]>;
|
|
94
|
-
moderatorRoles?: string[];
|
|
95
|
-
badWords?: boolean;
|
|
96
|
-
blockedAuthorProps?: string[];
|
|
97
109
|
isValidationEnabled?: boolean;
|
|
98
110
|
reportReasons?: {
|
|
99
|
-
BAD_LANGUAGE
|
|
100
|
-
|
|
101
|
-
|
|
111
|
+
BAD_LANGUAGE: import("../const").REPORT_REASON.BAD_LANGUAGE;
|
|
112
|
+
OTHER: import("../const").REPORT_REASON.OTHER;
|
|
113
|
+
DISCRIMINATION: import("../const").REPORT_REASON.DISCRIMINATION;
|
|
102
114
|
};
|
|
103
115
|
isGQLPluginEnabled?: boolean;
|
|
116
|
+
isReactionsPluginInstalled?: boolean;
|
|
117
|
+
badWords?: boolean;
|
|
104
118
|
gql?: {
|
|
105
119
|
auth?: boolean;
|
|
106
120
|
};
|
|
107
|
-
|
|
121
|
+
} | Omit<{
|
|
122
|
+
enabledCollections: string[];
|
|
123
|
+
moderatorRoles: string[];
|
|
124
|
+
approvalFlow: string[];
|
|
125
|
+
entryLabel: Record<string, string[]>;
|
|
126
|
+
blockedAuthorProps: string[];
|
|
127
|
+
reactionsEnabled: boolean;
|
|
128
|
+
client: {
|
|
108
129
|
url?: string;
|
|
109
130
|
contactEmail?: string;
|
|
110
131
|
};
|
|
111
|
-
} | Omit<{
|
|
112
|
-
enabledCollections?: string[];
|
|
113
|
-
approvalFlow?: string[];
|
|
114
|
-
entryLabel?: Record<string, string[]>;
|
|
115
|
-
moderatorRoles?: string[];
|
|
116
|
-
badWords?: boolean;
|
|
117
|
-
blockedAuthorProps?: string[];
|
|
118
132
|
isValidationEnabled?: boolean;
|
|
119
133
|
reportReasons?: {
|
|
120
|
-
BAD_LANGUAGE
|
|
121
|
-
|
|
122
|
-
|
|
134
|
+
BAD_LANGUAGE: import("../const").REPORT_REASON.BAD_LANGUAGE;
|
|
135
|
+
OTHER: import("../const").REPORT_REASON.OTHER;
|
|
136
|
+
DISCRIMINATION: import("../const").REPORT_REASON.DISCRIMINATION;
|
|
123
137
|
};
|
|
124
138
|
isGQLPluginEnabled?: boolean;
|
|
139
|
+
isReactionsPluginInstalled?: boolean;
|
|
140
|
+
badWords?: boolean;
|
|
125
141
|
gql?: {
|
|
126
142
|
auth?: boolean;
|
|
127
143
|
};
|
|
128
|
-
|
|
144
|
+
}, "enabledCollections" | "moderatorRoles" | "isGQLPluginEnabled" | "isReactionsPluginInstalled">>;
|
|
145
|
+
restore(ctx: RequestContext): Promise<{
|
|
146
|
+
enabledCollections: string[];
|
|
147
|
+
moderatorRoles: string[];
|
|
148
|
+
approvalFlow: string[];
|
|
149
|
+
entryLabel: Record<string, string[]>;
|
|
150
|
+
blockedAuthorProps: string[];
|
|
151
|
+
reactionsEnabled: boolean;
|
|
152
|
+
client: {
|
|
129
153
|
url?: string;
|
|
130
154
|
contactEmail?: string;
|
|
131
155
|
};
|
|
132
|
-
}, "enabledCollections" | "moderatorRoles" | "isGQLPluginEnabled">>;
|
|
133
|
-
restore(ctx: RequestContext): Promise<{
|
|
134
|
-
enabledCollections?: string[];
|
|
135
|
-
approvalFlow?: string[];
|
|
136
|
-
entryLabel?: Record<string, string[]>;
|
|
137
|
-
moderatorRoles?: string[];
|
|
138
|
-
badWords?: boolean;
|
|
139
|
-
blockedAuthorProps?: string[];
|
|
140
156
|
isValidationEnabled?: boolean;
|
|
141
157
|
reportReasons?: {
|
|
142
|
-
BAD_LANGUAGE
|
|
143
|
-
|
|
144
|
-
|
|
158
|
+
BAD_LANGUAGE: import("../const").REPORT_REASON.BAD_LANGUAGE;
|
|
159
|
+
OTHER: import("../const").REPORT_REASON.OTHER;
|
|
160
|
+
DISCRIMINATION: import("../const").REPORT_REASON.DISCRIMINATION;
|
|
145
161
|
};
|
|
146
162
|
isGQLPluginEnabled?: boolean;
|
|
163
|
+
isReactionsPluginInstalled?: boolean;
|
|
164
|
+
badWords?: boolean;
|
|
147
165
|
gql?: {
|
|
148
166
|
auth?: boolean;
|
|
149
167
|
};
|
|
150
|
-
|
|
168
|
+
} | Omit<{
|
|
169
|
+
enabledCollections: string[];
|
|
170
|
+
moderatorRoles: string[];
|
|
171
|
+
approvalFlow: string[];
|
|
172
|
+
entryLabel: Record<string, string[]>;
|
|
173
|
+
blockedAuthorProps: string[];
|
|
174
|
+
reactionsEnabled: boolean;
|
|
175
|
+
client: {
|
|
151
176
|
url?: string;
|
|
152
177
|
contactEmail?: string;
|
|
153
178
|
};
|
|
154
|
-
} | Omit<{
|
|
155
|
-
enabledCollections?: string[];
|
|
156
|
-
approvalFlow?: string[];
|
|
157
|
-
entryLabel?: Record<string, string[]>;
|
|
158
|
-
moderatorRoles?: string[];
|
|
159
|
-
badWords?: boolean;
|
|
160
|
-
blockedAuthorProps?: string[];
|
|
161
179
|
isValidationEnabled?: boolean;
|
|
162
180
|
reportReasons?: {
|
|
163
|
-
BAD_LANGUAGE
|
|
164
|
-
|
|
165
|
-
|
|
181
|
+
BAD_LANGUAGE: import("../const").REPORT_REASON.BAD_LANGUAGE;
|
|
182
|
+
OTHER: import("../const").REPORT_REASON.OTHER;
|
|
183
|
+
DISCRIMINATION: import("../const").REPORT_REASON.DISCRIMINATION;
|
|
166
184
|
};
|
|
167
185
|
isGQLPluginEnabled?: boolean;
|
|
186
|
+
isReactionsPluginInstalled?: boolean;
|
|
187
|
+
badWords?: boolean;
|
|
168
188
|
gql?: {
|
|
169
189
|
auth?: boolean;
|
|
170
190
|
};
|
|
171
|
-
|
|
172
|
-
url?: string;
|
|
173
|
-
contactEmail?: string;
|
|
174
|
-
};
|
|
175
|
-
}, "enabledCollections" | "moderatorRoles" | "isGQLPluginEnabled">>;
|
|
191
|
+
}, "enabledCollections" | "moderatorRoles" | "isGQLPluginEnabled" | "isReactionsPluginInstalled">>;
|
|
176
192
|
restart(ctx: RequestContext): Promise<any>;
|
|
177
193
|
};
|
|
178
194
|
export type SettingsController = ReturnType<typeof settingsController>;
|
|
@@ -18,4 +18,37 @@ export declare const getResolversConfig: (config: CommentsPluginConfig) => {
|
|
|
18
18
|
'Mutation.getCreateAbuseReport': {
|
|
19
19
|
auth: boolean;
|
|
20
20
|
};
|
|
21
|
+
'Mutation.blockComment': {
|
|
22
|
+
auth: boolean;
|
|
23
|
+
};
|
|
24
|
+
'Mutation.unblockComment': {
|
|
25
|
+
auth: boolean;
|
|
26
|
+
};
|
|
27
|
+
'Mutation.blockCommentThread': {
|
|
28
|
+
auth: boolean;
|
|
29
|
+
};
|
|
30
|
+
'Mutation.unblockCommentThread': {
|
|
31
|
+
auth: boolean;
|
|
32
|
+
};
|
|
33
|
+
'Mutation.approveComment': {
|
|
34
|
+
auth: boolean;
|
|
35
|
+
};
|
|
36
|
+
'Mutation.rejectComment': {
|
|
37
|
+
auth: boolean;
|
|
38
|
+
};
|
|
39
|
+
'Mutation.resolveAbuseReport': {
|
|
40
|
+
auth: boolean;
|
|
41
|
+
};
|
|
42
|
+
'Mutation.resolveCommentMultipleAbuseReports': {
|
|
43
|
+
auth: boolean;
|
|
44
|
+
};
|
|
45
|
+
'Mutation.resolveAllAbuseReportsForComment': {
|
|
46
|
+
auth: boolean;
|
|
47
|
+
};
|
|
48
|
+
'Mutation.resolveAllAbuseReportsForThread': {
|
|
49
|
+
auth: boolean;
|
|
50
|
+
};
|
|
51
|
+
'Mutation.resolveMultipleAbuseReports': {
|
|
52
|
+
auth: boolean;
|
|
53
|
+
};
|
|
21
54
|
};
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { CoreStrapi } from '../../@types';
|
|
2
|
+
import { Nexus } from '../../@types/graphql';
|
|
3
|
+
export declare const getApproveComment: (strapi: CoreStrapi, nexus: Nexus) => {
|
|
4
|
+
type: import("nexus/dist/core").NexusNonNullDef<any>;
|
|
5
|
+
args: {
|
|
6
|
+
input: import("nexus/dist/core").NexusNonNullDef<any>;
|
|
7
|
+
};
|
|
8
|
+
resolve(_: object, args: {
|
|
9
|
+
input: {
|
|
10
|
+
id: string;
|
|
11
|
+
relation: string;
|
|
12
|
+
};
|
|
13
|
+
}): Promise<{
|
|
14
|
+
id: number;
|
|
15
|
+
content: string;
|
|
16
|
+
related: string;
|
|
17
|
+
createdAt: string;
|
|
18
|
+
reports: {
|
|
19
|
+
id: number;
|
|
20
|
+
content: string;
|
|
21
|
+
reason: string;
|
|
22
|
+
resolved: boolean;
|
|
23
|
+
createdAt: string;
|
|
24
|
+
updatedAt: string;
|
|
25
|
+
source: "USER" | "AI";
|
|
26
|
+
documentId?: string;
|
|
27
|
+
publishedAt?: string;
|
|
28
|
+
locale?: string;
|
|
29
|
+
}[];
|
|
30
|
+
documentId?: string;
|
|
31
|
+
blocked?: boolean;
|
|
32
|
+
blockedThread?: boolean;
|
|
33
|
+
blockReason?: string;
|
|
34
|
+
isAdminComment?: boolean;
|
|
35
|
+
removed?: boolean;
|
|
36
|
+
approvalStatus?: string;
|
|
37
|
+
updatedAt?: string;
|
|
38
|
+
publishedAt?: string;
|
|
39
|
+
authorId?: string;
|
|
40
|
+
authorName?: string;
|
|
41
|
+
authorEmail?: string;
|
|
42
|
+
authorAvatar?: string;
|
|
43
|
+
authorUser?: string | {
|
|
44
|
+
id: number;
|
|
45
|
+
username: string;
|
|
46
|
+
email: string;
|
|
47
|
+
avatar?: {
|
|
48
|
+
url: string;
|
|
49
|
+
name: string;
|
|
50
|
+
hash: string;
|
|
51
|
+
id: number;
|
|
52
|
+
formats?: {
|
|
53
|
+
thumbnail?: {
|
|
54
|
+
url: string;
|
|
55
|
+
name: string;
|
|
56
|
+
hash: string;
|
|
57
|
+
};
|
|
58
|
+
small?: {
|
|
59
|
+
url: string;
|
|
60
|
+
name: string;
|
|
61
|
+
hash: string;
|
|
62
|
+
};
|
|
63
|
+
medium?: {
|
|
64
|
+
url: string;
|
|
65
|
+
name: string;
|
|
66
|
+
hash: string;
|
|
67
|
+
};
|
|
68
|
+
large?: {
|
|
69
|
+
url: string;
|
|
70
|
+
name: string;
|
|
71
|
+
hash: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
locale?: string;
|
|
77
|
+
gotThread?: boolean;
|
|
78
|
+
threadFirstItemId?: number;
|
|
79
|
+
author?: any;
|
|
80
|
+
threadOf?: number | {
|
|
81
|
+
id: number;
|
|
82
|
+
content: string;
|
|
83
|
+
related: string;
|
|
84
|
+
createdAt: string;
|
|
85
|
+
reports: {
|
|
86
|
+
id: number;
|
|
87
|
+
content: string;
|
|
88
|
+
reason: string;
|
|
89
|
+
resolved: boolean;
|
|
90
|
+
createdAt: string;
|
|
91
|
+
updatedAt: string;
|
|
92
|
+
source: "USER" | "AI";
|
|
93
|
+
documentId?: string;
|
|
94
|
+
publishedAt?: string;
|
|
95
|
+
locale?: string;
|
|
96
|
+
}[];
|
|
97
|
+
documentId?: string;
|
|
98
|
+
blocked?: boolean;
|
|
99
|
+
blockedThread?: boolean;
|
|
100
|
+
blockReason?: string;
|
|
101
|
+
isAdminComment?: boolean;
|
|
102
|
+
removed?: boolean;
|
|
103
|
+
approvalStatus?: string;
|
|
104
|
+
updatedAt?: string;
|
|
105
|
+
publishedAt?: string;
|
|
106
|
+
authorId?: string;
|
|
107
|
+
authorName?: string;
|
|
108
|
+
authorEmail?: string;
|
|
109
|
+
authorAvatar?: string;
|
|
110
|
+
authorUser?: string | {
|
|
111
|
+
id: number;
|
|
112
|
+
username: string;
|
|
113
|
+
email: string;
|
|
114
|
+
avatar?: {
|
|
115
|
+
url: string;
|
|
116
|
+
name: string;
|
|
117
|
+
hash: string;
|
|
118
|
+
id: number;
|
|
119
|
+
formats?: {
|
|
120
|
+
thumbnail?: {
|
|
121
|
+
url: string;
|
|
122
|
+
name: string;
|
|
123
|
+
hash: string;
|
|
124
|
+
};
|
|
125
|
+
small?: {
|
|
126
|
+
url: string;
|
|
127
|
+
name: string;
|
|
128
|
+
hash: string;
|
|
129
|
+
};
|
|
130
|
+
medium?: {
|
|
131
|
+
url: string;
|
|
132
|
+
name: string;
|
|
133
|
+
hash: string;
|
|
134
|
+
};
|
|
135
|
+
large?: {
|
|
136
|
+
url: string;
|
|
137
|
+
name: string;
|
|
138
|
+
hash: string;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
locale?: string;
|
|
144
|
+
gotThread?: boolean;
|
|
145
|
+
threadFirstItemId?: number;
|
|
146
|
+
author?: any;
|
|
147
|
+
};
|
|
148
|
+
}>;
|
|
149
|
+
};
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { CoreStrapi } from '../../@types';
|
|
2
|
+
import { Nexus } from '../../@types/graphql';
|
|
3
|
+
export declare const getBlockComment: (strapi: CoreStrapi, nexus: Nexus) => {
|
|
4
|
+
type: import("nexus/dist/core").NexusNonNullDef<any>;
|
|
5
|
+
args: {
|
|
6
|
+
input: import("nexus/dist/core").NexusNonNullDef<any>;
|
|
7
|
+
};
|
|
8
|
+
resolve(_: object, args: {
|
|
9
|
+
input: {
|
|
10
|
+
id: string;
|
|
11
|
+
relation: string;
|
|
12
|
+
};
|
|
13
|
+
}): Promise<{
|
|
14
|
+
id: number;
|
|
15
|
+
content: string;
|
|
16
|
+
related: string;
|
|
17
|
+
createdAt: string;
|
|
18
|
+
reports: {
|
|
19
|
+
id: number;
|
|
20
|
+
content: string;
|
|
21
|
+
reason: string;
|
|
22
|
+
resolved: boolean;
|
|
23
|
+
createdAt: string;
|
|
24
|
+
updatedAt: string;
|
|
25
|
+
source: "USER" | "AI";
|
|
26
|
+
documentId?: string;
|
|
27
|
+
publishedAt?: string;
|
|
28
|
+
locale?: string;
|
|
29
|
+
}[];
|
|
30
|
+
documentId?: string;
|
|
31
|
+
blocked?: boolean;
|
|
32
|
+
blockedThread?: boolean;
|
|
33
|
+
blockReason?: string;
|
|
34
|
+
isAdminComment?: boolean;
|
|
35
|
+
removed?: boolean;
|
|
36
|
+
approvalStatus?: string;
|
|
37
|
+
updatedAt?: string;
|
|
38
|
+
publishedAt?: string;
|
|
39
|
+
authorId?: string;
|
|
40
|
+
authorName?: string;
|
|
41
|
+
authorEmail?: string;
|
|
42
|
+
authorAvatar?: string;
|
|
43
|
+
authorUser?: string | {
|
|
44
|
+
id: number;
|
|
45
|
+
username: string;
|
|
46
|
+
email: string;
|
|
47
|
+
avatar?: {
|
|
48
|
+
url: string;
|
|
49
|
+
name: string;
|
|
50
|
+
hash: string;
|
|
51
|
+
id: number;
|
|
52
|
+
formats?: {
|
|
53
|
+
thumbnail?: {
|
|
54
|
+
url: string;
|
|
55
|
+
name: string;
|
|
56
|
+
hash: string;
|
|
57
|
+
};
|
|
58
|
+
small?: {
|
|
59
|
+
url: string;
|
|
60
|
+
name: string;
|
|
61
|
+
hash: string;
|
|
62
|
+
};
|
|
63
|
+
medium?: {
|
|
64
|
+
url: string;
|
|
65
|
+
name: string;
|
|
66
|
+
hash: string;
|
|
67
|
+
};
|
|
68
|
+
large?: {
|
|
69
|
+
url: string;
|
|
70
|
+
name: string;
|
|
71
|
+
hash: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
locale?: string;
|
|
77
|
+
gotThread?: boolean;
|
|
78
|
+
threadFirstItemId?: number;
|
|
79
|
+
author?: any;
|
|
80
|
+
threadOf?: number | {
|
|
81
|
+
id: number;
|
|
82
|
+
content: string;
|
|
83
|
+
related: string;
|
|
84
|
+
createdAt: string;
|
|
85
|
+
reports: {
|
|
86
|
+
id: number;
|
|
87
|
+
content: string;
|
|
88
|
+
reason: string;
|
|
89
|
+
resolved: boolean;
|
|
90
|
+
createdAt: string;
|
|
91
|
+
updatedAt: string;
|
|
92
|
+
source: "USER" | "AI";
|
|
93
|
+
documentId?: string;
|
|
94
|
+
publishedAt?: string;
|
|
95
|
+
locale?: string;
|
|
96
|
+
}[];
|
|
97
|
+
documentId?: string;
|
|
98
|
+
blocked?: boolean;
|
|
99
|
+
blockedThread?: boolean;
|
|
100
|
+
blockReason?: string;
|
|
101
|
+
isAdminComment?: boolean;
|
|
102
|
+
removed?: boolean;
|
|
103
|
+
approvalStatus?: string;
|
|
104
|
+
updatedAt?: string;
|
|
105
|
+
publishedAt?: string;
|
|
106
|
+
authorId?: string;
|
|
107
|
+
authorName?: string;
|
|
108
|
+
authorEmail?: string;
|
|
109
|
+
authorAvatar?: string;
|
|
110
|
+
authorUser?: string | {
|
|
111
|
+
id: number;
|
|
112
|
+
username: string;
|
|
113
|
+
email: string;
|
|
114
|
+
avatar?: {
|
|
115
|
+
url: string;
|
|
116
|
+
name: string;
|
|
117
|
+
hash: string;
|
|
118
|
+
id: number;
|
|
119
|
+
formats?: {
|
|
120
|
+
thumbnail?: {
|
|
121
|
+
url: string;
|
|
122
|
+
name: string;
|
|
123
|
+
hash: string;
|
|
124
|
+
};
|
|
125
|
+
small?: {
|
|
126
|
+
url: string;
|
|
127
|
+
name: string;
|
|
128
|
+
hash: string;
|
|
129
|
+
};
|
|
130
|
+
medium?: {
|
|
131
|
+
url: string;
|
|
132
|
+
name: string;
|
|
133
|
+
hash: string;
|
|
134
|
+
};
|
|
135
|
+
large?: {
|
|
136
|
+
url: string;
|
|
137
|
+
name: string;
|
|
138
|
+
hash: string;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
locale?: string;
|
|
144
|
+
gotThread?: boolean;
|
|
145
|
+
threadFirstItemId?: number;
|
|
146
|
+
author?: any;
|
|
147
|
+
};
|
|
148
|
+
}>;
|
|
149
|
+
};
|