strapi-plugin-comments 3.2.4 → 3.2.6
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-CT6Rt2uf.mjs → en-B_ywmALc.mjs} +3 -0
- package/dist/_chunks/{en-Tdlz6WoL.js → en-CTX-vxI-.js} +1 -1
- package/dist/_chunks/{fr-BlaISu0-.js → fr-CJZ1I0cO.js} +1 -1
- package/dist/_chunks/{fr-CTKzDZoe.mjs → fr-CzgABcR9.mjs} +3 -0
- package/dist/_chunks/index-BE4WKyKM.js +44 -0
- package/dist/_chunks/{index-D9B_m9fB.mjs → index-BF9v7878.mjs} +185 -146
- package/dist/_chunks/index-Bp-bmc3E.js +1 -0
- package/dist/_chunks/{index-CqWqvu-C.mjs → index-CSGHz1Ar.mjs} +10679 -11434
- package/dist/_chunks/{index-CgbBtemc.js → index-C_4LXdQ6.js} +134 -91
- package/dist/_chunks/{index-CynNsAVf.mjs → index-CdDH4b25.mjs} +45 -23
- package/dist/_chunks/index-Dfe55Tn-.mjs +6042 -0
- package/dist/_chunks/index-zjD2IIJE.js +5 -0
- package/dist/_chunks/{pl-BE9Xc2Tq.mjs → pl-Ca-o0rE-.mjs} +3 -0
- package/dist/_chunks/{pl-r2tJzCYX.js → pl-clljrMvo.js} +1 -1
- package/dist/_chunks/{pt-BR-BntmApbV.js → pt-BR-DV48_kX8.js} +1 -1
- package/dist/_chunks/{pt-BR-ZzKZqryk.mjs → pt-BR-XHO5Olrb.mjs} +3 -0
- package/dist/_chunks/{ru-DdjjIy0c.js → ru-BK78F2Vt.js} +1 -1
- package/dist/_chunks/{ru-NqAiywiG.mjs → ru-zKH0YOjJ.mjs} +3 -0
- package/dist/_chunks/{tr-v1mNvsod.js → tr-BMe1cFKp.js} +1 -1
- package/dist/_chunks/{tr-6Vivmm9L.mjs → tr-BaczzuT6.mjs} +3 -0
- package/dist/_chunks/{zh-Hans-B3CCaxs8.mjs → zh-Hans-CPSQ76Y3.mjs} +3 -0
- package/dist/_chunks/{zh-Hans-_ImAlhp2.js → zh-Hans-xMRxrXVG.js} +1 -1
- 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 +3 -0
- package/dist/admin/src/translations/fr.d.ts +3 -0
- package/dist/admin/src/translations/pl.d.ts +3 -0
- package/dist/admin/src/translations/pt-BR.d.ts +3 -0
- package/dist/admin/src/translations/ru.d.ts +3 -0
- package/dist/admin/src/translations/tr.d.ts +3 -0
- package/dist/admin/src/translations/zh-Hans.d.ts +3 -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 +9727 -7544
- 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 +3548 -471
- 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 +49 -49
- package/dist/_chunks/index-BIaTg-pL.mjs +0 -5682
- package/dist/_chunks/index-BIivsuhp.js +0 -44
- package/dist/_chunks/index-Dz3cg8MA.js +0 -1
- package/dist/_chunks/index-sPxsE9Y1.js +0 -5
|
@@ -22,48 +22,48 @@ type CallbacksMutation = {
|
|
|
22
22
|
};
|
|
23
23
|
export declare const useCommentMutations: (callbacksMutation?: CallbacksMutation) => {
|
|
24
24
|
commentMutation: {
|
|
25
|
-
block: import("@tanstack/react-query").UseMutationResult<import("@strapi/admin/strapi-admin").FetchResponse<
|
|
26
|
-
unBlock: import("@tanstack/react-query").UseMutationResult<import("@strapi/admin/strapi-admin").FetchResponse<
|
|
27
|
-
blockThread: import("@tanstack/react-query").UseMutationResult<import("@strapi/admin/strapi-admin").FetchResponse<
|
|
28
|
-
unBlockThread: import("@tanstack/react-query").UseMutationResult<import("@strapi/admin/strapi-admin").FetchResponse<
|
|
29
|
-
delete: import("@tanstack/react-query").UseMutationResult<import("@strapi/admin/strapi-admin").FetchResponse<
|
|
30
|
-
postComment: import("@tanstack/react-query").UseMutationResult<import("@strapi/admin/strapi-admin").FetchResponse<
|
|
25
|
+
block: import("@tanstack/react-query").UseMutationResult<import("@strapi/admin/strapi-admin").FetchResponse<unknown>, Error, number, unknown>;
|
|
26
|
+
unBlock: import("@tanstack/react-query").UseMutationResult<import("@strapi/admin/strapi-admin").FetchResponse<unknown>, Error, number, unknown>;
|
|
27
|
+
blockThread: import("@tanstack/react-query").UseMutationResult<import("@strapi/admin/strapi-admin").FetchResponse<unknown>, Error, number, unknown>;
|
|
28
|
+
unBlockThread: import("@tanstack/react-query").UseMutationResult<import("@strapi/admin/strapi-admin").FetchResponse<unknown>, Error, number, unknown>;
|
|
29
|
+
delete: import("@tanstack/react-query").UseMutationResult<import("@strapi/admin/strapi-admin").FetchResponse<unknown>, Error, number, unknown>;
|
|
30
|
+
postComment: import("@tanstack/react-query").UseMutationResult<import("@strapi/admin/strapi-admin").FetchResponse<unknown>, Error, {
|
|
31
31
|
id: string | number;
|
|
32
32
|
content: string;
|
|
33
33
|
author: {
|
|
34
|
-
email: string;
|
|
35
34
|
id: number;
|
|
36
35
|
documentId: string;
|
|
37
|
-
createdAt: string | null;
|
|
38
|
-
updatedAt: string | null;
|
|
39
|
-
publishedAt: string | null;
|
|
40
|
-
locale: null;
|
|
41
|
-
blocked: boolean | null;
|
|
42
36
|
firstname: string;
|
|
43
37
|
lastname: string | null;
|
|
44
38
|
username: string | null;
|
|
39
|
+
email: string;
|
|
45
40
|
isActive: boolean;
|
|
41
|
+
blocked: boolean | null;
|
|
46
42
|
preferedLanguage: string | null;
|
|
43
|
+
createdAt: string | null;
|
|
44
|
+
updatedAt: string | null;
|
|
45
|
+
publishedAt: string | null;
|
|
46
|
+
locale: null;
|
|
47
47
|
roles: {
|
|
48
|
-
code: string;
|
|
49
48
|
id: number;
|
|
50
49
|
name: string;
|
|
51
50
|
description: string;
|
|
51
|
+
code: string;
|
|
52
52
|
}[];
|
|
53
53
|
};
|
|
54
54
|
}, unknown>;
|
|
55
55
|
};
|
|
56
56
|
reportMutation: {
|
|
57
|
-
resolve: import("@tanstack/react-query").UseMutationResult<import("@strapi/admin/strapi-admin").FetchResponse<
|
|
57
|
+
resolve: import("@tanstack/react-query").UseMutationResult<import("@strapi/admin/strapi-admin").FetchResponse<unknown>, Error, {
|
|
58
58
|
id: number;
|
|
59
59
|
reportId: number;
|
|
60
60
|
}, unknown>;
|
|
61
|
-
resolveMultiple: import("@tanstack/react-query").UseMutationResult<import("@strapi/admin/strapi-admin").FetchResponse<
|
|
61
|
+
resolveMultiple: import("@tanstack/react-query").UseMutationResult<import("@strapi/admin/strapi-admin").FetchResponse<unknown>, Error, {
|
|
62
62
|
reportIds: number[];
|
|
63
63
|
}, unknown>;
|
|
64
|
-
resolveAllAbuse: import("@tanstack/react-query").UseMutationResult<import("@strapi/admin/strapi-admin").FetchResponse<
|
|
65
|
-
resolveAllAbuseThread: import("@tanstack/react-query").UseMutationResult<import("@strapi/admin/strapi-admin").FetchResponse<
|
|
66
|
-
resolveCommentMultipleReports: import("@tanstack/react-query").UseMutationResult<import("@strapi/admin/strapi-admin").FetchResponse<
|
|
64
|
+
resolveAllAbuse: import("@tanstack/react-query").UseMutationResult<import("@strapi/admin/strapi-admin").FetchResponse<unknown>, Error, number, unknown>;
|
|
65
|
+
resolveAllAbuseThread: import("@tanstack/react-query").UseMutationResult<import("@strapi/admin/strapi-admin").FetchResponse<unknown>, Error, number, unknown>;
|
|
66
|
+
resolveCommentMultipleReports: import("@tanstack/react-query").UseMutationResult<import("@strapi/admin/strapi-admin").FetchResponse<unknown>, Error, {
|
|
67
67
|
id: number;
|
|
68
68
|
reportIds: number[];
|
|
69
69
|
}, unknown>;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
export declare const useCommentsAll: (queryParams: Record<string, string>) => import("@tanstack/react-query").DefinedUseQueryResult<{
|
|
2
2
|
result: {
|
|
3
3
|
reports: {
|
|
4
|
-
resolved: boolean;
|
|
5
4
|
id: number;
|
|
5
|
+
content: string;
|
|
6
|
+
resolved: boolean;
|
|
6
7
|
createdAt: string;
|
|
7
8
|
updatedAt: string | null;
|
|
8
|
-
content: string;
|
|
9
9
|
reason?: string | null | undefined;
|
|
10
|
+
source?: "USER" | "AI" | null | undefined;
|
|
10
11
|
}[];
|
|
11
12
|
id: number;
|
|
12
|
-
createdAt: string;
|
|
13
|
-
updatedAt: string;
|
|
14
13
|
content: string;
|
|
15
14
|
blocked: boolean | null;
|
|
16
15
|
blockedThread: boolean | null;
|
|
@@ -18,10 +17,12 @@ export declare const useCommentsAll: (queryParams: Record<string, string>) => im
|
|
|
18
17
|
isAdminComment: boolean | null;
|
|
19
18
|
removed: boolean | null;
|
|
20
19
|
approvalStatus: "PENDING" | "APPROVED" | "REJECTED" | "BLOCKED" | "OPEN" | "REMOVED" | "TO_REVIEW" | "UNKNOWN" | null;
|
|
20
|
+
createdAt: string;
|
|
21
|
+
updatedAt: string;
|
|
21
22
|
author?: {
|
|
22
|
-
email?: string | null | undefined;
|
|
23
23
|
id?: string | number | null | undefined;
|
|
24
24
|
name?: string | null | undefined;
|
|
25
|
+
email?: string | null | undefined;
|
|
25
26
|
avatar?: string | {
|
|
26
27
|
url: string;
|
|
27
28
|
} | {
|
|
@@ -37,8 +38,8 @@ export declare const useCommentsAll: (queryParams: Record<string, string>) => im
|
|
|
37
38
|
threadFirstItemId?: number | null | undefined;
|
|
38
39
|
threadOf?: import("../api/schemas").Comment | null | undefined;
|
|
39
40
|
related?: string | ({
|
|
40
|
-
uid: string;
|
|
41
41
|
id: number;
|
|
42
|
+
uid: string;
|
|
42
43
|
documentId: string;
|
|
43
44
|
createdAt: string;
|
|
44
45
|
updatedAt: string;
|
|
@@ -46,6 +47,7 @@ export declare const useCommentsAll: (queryParams: Record<string, string>) => im
|
|
|
46
47
|
locale?: string | null | undefined;
|
|
47
48
|
} & Record<string, unknown>) | undefined;
|
|
48
49
|
documentId?: string | undefined;
|
|
50
|
+
locale?: string | null | undefined;
|
|
49
51
|
}[];
|
|
50
52
|
pagination: {
|
|
51
53
|
page: number;
|
|
@@ -3,6 +3,7 @@ export declare const useConfig: (setSettings: (settings: Config) => void) => imp
|
|
|
3
3
|
entryLabel: Record<string, string[]>;
|
|
4
4
|
approvalFlow: string[];
|
|
5
5
|
blockedAuthorProps: string[];
|
|
6
|
+
reactionsEnabled: boolean;
|
|
6
7
|
reportReasons: Record<string, string>;
|
|
7
8
|
regex: {
|
|
8
9
|
uid: string;
|
|
@@ -13,6 +14,7 @@ export declare const useConfig: (setSettings: (settings: Config) => void) => imp
|
|
|
13
14
|
enabledCollections: string[];
|
|
14
15
|
moderatorRoles: string[];
|
|
15
16
|
isGQLPluginEnabled: boolean;
|
|
17
|
+
isReactionsPluginInstalled: boolean;
|
|
16
18
|
client: {
|
|
17
19
|
url: string | null;
|
|
18
20
|
contactEmail: string | null;
|
|
@@ -6,15 +6,14 @@ export declare const useReports: (queryParams?: Record<string, string>) => impor
|
|
|
6
6
|
total: number;
|
|
7
7
|
};
|
|
8
8
|
result: {
|
|
9
|
-
|
|
10
|
-
createdAt: string;
|
|
11
|
-
updatedAt: string | null;
|
|
9
|
+
author: unknown;
|
|
12
10
|
content: string;
|
|
11
|
+
id: number;
|
|
13
12
|
reports: unknown[];
|
|
13
|
+
updatedAt: string | null;
|
|
14
|
+
createdAt: string;
|
|
14
15
|
related: {
|
|
15
16
|
id: number;
|
|
16
|
-
createdAt: string;
|
|
17
|
-
updatedAt: string;
|
|
18
17
|
content: string;
|
|
19
18
|
blocked: boolean | null;
|
|
20
19
|
blockedThread: boolean | null;
|
|
@@ -22,18 +21,21 @@ export declare const useReports: (queryParams?: Record<string, string>) => impor
|
|
|
22
21
|
isAdminComment: boolean | null;
|
|
23
22
|
removed: boolean | null;
|
|
24
23
|
approvalStatus: "PENDING" | "APPROVED" | "REJECTED" | "BLOCKED" | "OPEN" | "REMOVED" | "TO_REVIEW" | "UNKNOWN" | null;
|
|
24
|
+
createdAt: string;
|
|
25
|
+
updatedAt: string;
|
|
25
26
|
reports?: {
|
|
26
|
-
resolved: boolean;
|
|
27
27
|
id: number;
|
|
28
|
+
content: string;
|
|
29
|
+
resolved: boolean;
|
|
28
30
|
createdAt: string;
|
|
29
31
|
updatedAt: string | null;
|
|
30
|
-
content: string;
|
|
31
32
|
reason?: string | null | undefined;
|
|
33
|
+
source?: "USER" | "AI" | null | undefined;
|
|
32
34
|
}[] | null | undefined;
|
|
33
35
|
author?: {
|
|
34
|
-
email?: string | null | undefined;
|
|
35
36
|
id?: string | number | null | undefined;
|
|
36
37
|
name?: string | null | undefined;
|
|
38
|
+
email?: string | null | undefined;
|
|
37
39
|
avatar?: string | {
|
|
38
40
|
url: string;
|
|
39
41
|
} | {
|
|
@@ -48,9 +50,9 @@ export declare const useReports: (queryParams?: Record<string, string>) => impor
|
|
|
48
50
|
gotThread?: boolean | null | undefined;
|
|
49
51
|
threadFirstItemId?: number | null | undefined;
|
|
50
52
|
};
|
|
51
|
-
resolved?: boolean | undefined;
|
|
52
|
-
reason?: string | null | undefined;
|
|
53
53
|
approvalStatus?: "PENDING" | "APPROVED" | "REJECTED" | "BLOCKED" | "OPEN" | "REMOVED" | "TO_REVIEW" | "UNKNOWN" | null | undefined;
|
|
54
|
-
|
|
54
|
+
reason?: string | null | undefined;
|
|
55
|
+
resolved?: boolean | undefined;
|
|
56
|
+
source?: "USER" | "AI" | null | undefined;
|
|
55
57
|
}[];
|
|
56
58
|
}, Error>;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
export declare const useUserContext: () => {
|
|
2
|
-
email: string;
|
|
3
2
|
id: number;
|
|
4
3
|
documentId: string;
|
|
5
|
-
createdAt: string | null;
|
|
6
|
-
updatedAt: string | null;
|
|
7
|
-
publishedAt: string | null;
|
|
8
|
-
locale: null;
|
|
9
|
-
blocked: boolean | null;
|
|
10
4
|
firstname: string;
|
|
11
5
|
lastname: string | null;
|
|
12
6
|
username: string | null;
|
|
7
|
+
email: string;
|
|
13
8
|
isActive: boolean;
|
|
9
|
+
blocked: boolean | null;
|
|
14
10
|
preferedLanguage: string | null;
|
|
11
|
+
createdAt: string | null;
|
|
12
|
+
updatedAt: string | null;
|
|
13
|
+
publishedAt: string | null;
|
|
14
|
+
locale: null;
|
|
15
15
|
roles: {
|
|
16
|
-
code: string;
|
|
17
16
|
id: number;
|
|
18
17
|
name: string;
|
|
19
18
|
description: string;
|
|
19
|
+
code: string;
|
|
20
20
|
}[];
|
|
21
21
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { CommentDetails, Config, ContentType } from '../../api/schemas';
|
|
2
|
+
import { Comment, CommentDetails, Config, ContentType } from '../../api/schemas';
|
|
3
3
|
type DetailsEntryProps = {
|
|
4
4
|
readonly config: Config;
|
|
5
5
|
readonly entity: CommentDetails['entity'];
|
|
6
|
+
readonly selected?: Comment | null;
|
|
6
7
|
readonly filters: Record<string, unknown>;
|
|
7
8
|
readonly onChangeFilters: (filters: Record<string, unknown>) => void;
|
|
8
9
|
readonly schema: ContentType['data']['schema'];
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Discover: () => import("react").JSX.Element;
|
|
@@ -11,6 +11,7 @@ export declare const useSettingsAPI: (callbacksMutation?: CallbacksMutation) =>
|
|
|
11
11
|
entryLabel: Record<string, string[]>;
|
|
12
12
|
approvalFlow: string[];
|
|
13
13
|
blockedAuthorProps: string[];
|
|
14
|
+
reactionsEnabled: boolean;
|
|
14
15
|
reportReasons: Record<string, string>;
|
|
15
16
|
regex: {
|
|
16
17
|
uid: string;
|
|
@@ -21,6 +22,7 @@ export declare const useSettingsAPI: (callbacksMutation?: CallbacksMutation) =>
|
|
|
21
22
|
enabledCollections: string[];
|
|
22
23
|
moderatorRoles: string[];
|
|
23
24
|
isGQLPluginEnabled: boolean;
|
|
25
|
+
isReactionsPluginInstalled: boolean;
|
|
24
26
|
client: {
|
|
25
27
|
url: string | null;
|
|
26
28
|
contactEmail: string | null;
|
|
@@ -31,8 +33,8 @@ export declare const useSettingsAPI: (callbacksMutation?: CallbacksMutation) =>
|
|
|
31
33
|
} | undefined;
|
|
32
34
|
}, Error>;
|
|
33
35
|
collectionTypes: import("@tanstack/react-query").UseQueryResult<{
|
|
34
|
-
uid: string;
|
|
35
36
|
apiID: string;
|
|
37
|
+
uid: string;
|
|
36
38
|
schema: {
|
|
37
39
|
attributes: Record<string, {
|
|
38
40
|
type: string;
|
|
@@ -48,19 +50,19 @@ export declare const useSettingsAPI: (callbacksMutation?: CallbacksMutation) =>
|
|
|
48
50
|
};
|
|
49
51
|
}[], Error>;
|
|
50
52
|
roles: import("@tanstack/react-query").UseQueryResult<{
|
|
51
|
-
code: string;
|
|
52
53
|
id: number;
|
|
53
54
|
documentId: string;
|
|
55
|
+
name: string;
|
|
56
|
+
code: string;
|
|
57
|
+
description: string;
|
|
54
58
|
createdAt: string | null;
|
|
55
59
|
updatedAt: string | null;
|
|
56
60
|
publishedAt: string | null;
|
|
57
61
|
locale: string | null;
|
|
58
|
-
name: string;
|
|
59
|
-
description: string;
|
|
60
62
|
usersCount: number;
|
|
61
63
|
}[], Error>;
|
|
62
|
-
restoreSettingsMutation: import("@tanstack/react-query").UseMutationResult<import("@strapi/admin/strapi-admin").FetchResponse<
|
|
63
|
-
updateSettingsMutation: import("@tanstack/react-query").UseMutationResult<import("@strapi/admin/strapi-admin").FetchResponse<
|
|
64
|
-
restartStrapiMutation: import("@tanstack/react-query").UseMutationResult<import("@strapi/admin/strapi-admin").FetchResponse<
|
|
64
|
+
restoreSettingsMutation: import("@tanstack/react-query").UseMutationResult<import("@strapi/admin/strapi-admin").FetchResponse<unknown>, Error, void, unknown>;
|
|
65
|
+
updateSettingsMutation: import("@tanstack/react-query").UseMutationResult<import("@strapi/admin/strapi-admin").FetchResponse<unknown>, Error, any, unknown>;
|
|
66
|
+
restartStrapiMutation: import("@tanstack/react-query").UseMutationResult<import("@strapi/admin/strapi-admin").FetchResponse<unknown>, Error, void, unknown>;
|
|
65
67
|
};
|
|
66
68
|
export {};
|
|
@@ -146,6 +146,8 @@ declare const en: {
|
|
|
146
146
|
'page.settings.form.badWords.hint': string;
|
|
147
147
|
'page.settings.form.gqlAuth.label': string;
|
|
148
148
|
'page.settings.form.gqlAuth.hint': string;
|
|
149
|
+
'page.settings.form.reactionsEnabled.label': string;
|
|
150
|
+
'page.settings.form.reactionsEnabled.hint': string;
|
|
149
151
|
'page.settings.form.approvalFlow.label': string;
|
|
150
152
|
'page.settings.form.approvalFlow.hint': string;
|
|
151
153
|
'page.settings.form.entryLabel.label': string;
|
|
@@ -169,6 +171,7 @@ declare const en: {
|
|
|
169
171
|
'page.settings.notification.restart.success': string;
|
|
170
172
|
'page.settings.notification.restart.error': string;
|
|
171
173
|
'page.settings.loading': string;
|
|
174
|
+
'page.settings.error': string;
|
|
172
175
|
'page.settings.form.author.blockedProps.label': string;
|
|
173
176
|
'page.settings.form.author.blockedProps.hint': string;
|
|
174
177
|
'components.confirmation.dialog.header': string;
|
|
@@ -146,6 +146,8 @@ declare const _default: {
|
|
|
146
146
|
'page.settings.form.badWords.hint': string;
|
|
147
147
|
'page.settings.form.gqlAuth.label': string;
|
|
148
148
|
'page.settings.form.gqlAuth.hint': string;
|
|
149
|
+
'page.settings.form.reactionsEnabled.label': string;
|
|
150
|
+
'page.settings.form.reactionsEnabled.hint': string;
|
|
149
151
|
'page.settings.form.approvalFlow.label': string;
|
|
150
152
|
'page.settings.form.approvalFlow.hint': string;
|
|
151
153
|
'page.settings.form.entryLabel.label': string;
|
|
@@ -169,6 +171,7 @@ declare const _default: {
|
|
|
169
171
|
'page.settings.notification.restart.success': string;
|
|
170
172
|
'page.settings.notification.restart.error': string;
|
|
171
173
|
'page.settings.loading': string;
|
|
174
|
+
'page.settings.error': string;
|
|
172
175
|
'page.settings.form.author.blockedProps.label': string;
|
|
173
176
|
'page.settings.form.author.blockedProps.hint': string;
|
|
174
177
|
'components.confirmation.dialog.header': string;
|
|
@@ -141,6 +141,8 @@ declare const _default: {
|
|
|
141
141
|
'page.settings.form.badWords.hint': string;
|
|
142
142
|
'page.settings.form.gqlAuth.label': string;
|
|
143
143
|
'page.settings.form.gqlAuth.hint': string;
|
|
144
|
+
'page.settings.form.reactionsEnabled.label': string;
|
|
145
|
+
'page.settings.form.reactionsEnabled.hint': string;
|
|
144
146
|
'page.settings.form.approvalFlow.label': string;
|
|
145
147
|
'page.settings.form.approvalFlow.hint': string;
|
|
146
148
|
'page.settings.form.entryLabel.label': string;
|
|
@@ -164,6 +166,7 @@ declare const _default: {
|
|
|
164
166
|
'page.settings.notification.restart.success': string;
|
|
165
167
|
'page.settings.notification.restart.error': string;
|
|
166
168
|
'page.settings.loading': string;
|
|
169
|
+
'page.settings.error': string;
|
|
167
170
|
'page.settings.form.author.blockedProps.label': string;
|
|
168
171
|
'page.settings.form.author.blockedProps.hint': string;
|
|
169
172
|
'components.confirmation.dialog.header': string;
|
|
@@ -116,6 +116,8 @@ declare const _default: {
|
|
|
116
116
|
'page.settings.form.badWords.hint': string;
|
|
117
117
|
'page.settings.form.gqlAuth.label': string;
|
|
118
118
|
'page.settings.form.gqlAuth.hint': string;
|
|
119
|
+
'page.settings.form.reactionsEnabled.label': string;
|
|
120
|
+
'page.settings.form.reactionsEnabled.hint': string;
|
|
119
121
|
'page.settings.form.approvalFlow.label': string;
|
|
120
122
|
'page.settings.form.approvalFlow.hint': string;
|
|
121
123
|
'page.settings.form.entryLabel.label': string;
|
|
@@ -139,6 +141,7 @@ declare const _default: {
|
|
|
139
141
|
'page.settings.notification.restart.success': string;
|
|
140
142
|
'page.settings.notification.restart.error': string;
|
|
141
143
|
'page.settings.loading': string;
|
|
144
|
+
'page.settings.error': string;
|
|
142
145
|
'components.confirmation.dialog.header': string;
|
|
143
146
|
'components.confirmation.dialog.description': string;
|
|
144
147
|
'components.confirmation.dialog.button.confirm': string;
|
|
@@ -141,6 +141,8 @@ declare const _default: {
|
|
|
141
141
|
'page.settings.form.badWords.hint': string;
|
|
142
142
|
'page.settings.form.gqlAuth.label': string;
|
|
143
143
|
'page.settings.form.gqlAuth.hint': string;
|
|
144
|
+
'page.settings.form.reactionsEnabled.label': string;
|
|
145
|
+
'page.settings.form.reactionsEnabled.hint': string;
|
|
144
146
|
'page.settings.form.approvalFlow.label': string;
|
|
145
147
|
'page.settings.form.approvalFlow.hint': string;
|
|
146
148
|
'page.settings.form.entryLabel.label': string;
|
|
@@ -164,6 +166,7 @@ declare const _default: {
|
|
|
164
166
|
'page.settings.notification.restart.success': string;
|
|
165
167
|
'page.settings.notification.restart.error': string;
|
|
166
168
|
'page.settings.loading': string;
|
|
169
|
+
'page.settings.error': string;
|
|
167
170
|
'page.settings.form.author.blockedProps.label': string;
|
|
168
171
|
'page.settings.form.author.blockedProps.hint': string;
|
|
169
172
|
'components.confirmation.dialog.header': string;
|
|
@@ -141,6 +141,8 @@ declare const _default: {
|
|
|
141
141
|
'page.settings.form.badWords.hint': string;
|
|
142
142
|
'page.settings.form.gqlAuth.label': string;
|
|
143
143
|
'page.settings.form.gqlAuth.hint': string;
|
|
144
|
+
'page.settings.form.reactionsEnabled.label': string;
|
|
145
|
+
'page.settings.form.reactionsEnabled.hint': string;
|
|
144
146
|
'page.settings.form.approvalFlow.label': string;
|
|
145
147
|
'page.settings.form.approvalFlow.hint': string;
|
|
146
148
|
'page.settings.form.entryLabel.label': string;
|
|
@@ -164,6 +166,7 @@ declare const _default: {
|
|
|
164
166
|
'page.settings.notification.restart.success': string;
|
|
165
167
|
'page.settings.notification.restart.error': string;
|
|
166
168
|
'page.settings.loading': string;
|
|
169
|
+
'page.settings.error': string;
|
|
167
170
|
'components.confirmation.dialog.header': string;
|
|
168
171
|
'components.confirmation.dialog.description': string;
|
|
169
172
|
'components.confirmation.dialog.button.confirm': string;
|
|
@@ -141,6 +141,8 @@ declare const _default: {
|
|
|
141
141
|
'page.settings.form.badWords.hint': string;
|
|
142
142
|
'page.settings.form.gqlAuth.label': string;
|
|
143
143
|
'page.settings.form.gqlAuth.hint': string;
|
|
144
|
+
'page.settings.form.reactionsEnabled.label': string;
|
|
145
|
+
'page.settings.form.reactionsEnabled.hint': string;
|
|
144
146
|
'page.settings.form.approvalFlow.label': string;
|
|
145
147
|
'page.settings.form.approvalFlow.hint': string;
|
|
146
148
|
'page.settings.form.entryLabel.label': string;
|
|
@@ -164,6 +166,7 @@ declare const _default: {
|
|
|
164
166
|
'page.settings.notification.restart.success': string;
|
|
165
167
|
'page.settings.notification.restart.error': string;
|
|
166
168
|
'page.settings.loading': string;
|
|
169
|
+
'page.settings.error': string;
|
|
167
170
|
'page.settings.form.author.blockedProps.label': string;
|
|
168
171
|
'page.settings.form.author.blockedProps.hint': string;
|
|
169
172
|
'components.confirmation.dialog.header': string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Data } from '@strapi/strapi';
|
|
3
|
+
import type { FetchClient } from '@strapi/strapi/admin';
|
|
4
|
+
declare const reactionTypeSchema: z.ZodObject<{
|
|
5
|
+
slug: z.ZodString;
|
|
6
|
+
name: z.ZodString;
|
|
7
|
+
emoji: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8
|
+
icon: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
9
|
+
url: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, z.core.$strip>>>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
declare const reactionCountsSchema: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
13
|
+
export type ReactionType = z.infer<typeof reactionTypeSchema>;
|
|
14
|
+
export type ReactionCounts = z.infer<typeof reactionCountsSchema>;
|
|
15
|
+
export declare const fetchReactionTypes: (get: FetchClient['get']) => Promise<{
|
|
16
|
+
slug: string;
|
|
17
|
+
name: string;
|
|
18
|
+
emoji?: string | null | undefined;
|
|
19
|
+
icon?: {
|
|
20
|
+
url?: string | undefined;
|
|
21
|
+
} | null | undefined;
|
|
22
|
+
}[]>;
|
|
23
|
+
export declare const fetchReactionCounts: (documentId: Data.DocumentID, locale: string | null | undefined, get: FetchClient['get']) => Promise<Record<string, number>>;
|
|
24
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { COMMENT_STATUS } from "./constants";
|
|
2
|
-
declare const resolveCommentStatusColor: (status: (typeof COMMENT_STATUS)[keyof typeof COMMENT_STATUS]) => "warning" | "
|
|
2
|
+
declare const resolveCommentStatusColor: (status: (typeof COMMENT_STATUS)[keyof typeof COMMENT_STATUS]) => "warning" | "success" | "secondary" | "danger";
|
|
3
3
|
export default resolveCommentStatusColor;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { REPORT_STATUS } from "./constants";
|
|
2
|
-
declare const resolveReportStatusColor: (status: (typeof REPORT_STATUS)[keyof typeof REPORT_STATUS]) => "
|
|
2
|
+
declare const resolveReportStatusColor: (status: (typeof REPORT_STATUS)[keyof typeof REPORT_STATUS]) => "success" | "danger" | "primary";
|
|
3
3
|
export default resolveReportStatusColor;
|