strapi-plugin-comments 3.0.16 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -26
- package/dist/_chunks/{index-CtUXr7rK.js → index-1vQEiMRT.js} +1 -1
- package/dist/_chunks/{index-BvE3I2WB.mjs → index-B0lrjuBy.mjs} +2 -2
- package/dist/_chunks/{index-DcdRh9F7.mjs → index-B6PLZq_Z.mjs} +2 -2
- package/dist/_chunks/index-BU_C5-jz.js +18 -0
- package/dist/_chunks/{index-Bd1INOJR.mjs → index-DHR2DyLT.mjs} +691 -709
- package/dist/_chunks/{index-BzZk45CE.js → index-DXa9DOUZ.js} +1 -1
- package/dist/_chunks/{index-C9YD28U_.mjs → index-DZblWcIe.mjs} +2 -2
- package/dist/_chunks/{index-DHYGkXW6.js → index-DmX06xc2.js} +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/server/index.js +34 -34
- package/dist/server/index.mjs +2251 -2153
- package/dist/server/src/controllers/admin.controller.d.ts +696 -75
- package/dist/server/src/controllers/client.controller.d.ts +465 -76
- package/dist/server/src/controllers/index.d.ts +1630 -282
- package/dist/server/src/graphql/mutations/getCreateAbuseReport.d.ts +58 -0
- package/dist/server/src/graphql/mutations/getCreateComment.d.ts +58 -0
- package/dist/server/src/graphql/mutations/getRemoveComment.d.ts +58 -0
- package/dist/server/src/graphql/mutations/getUpdateComment.d.ts +58 -0
- package/dist/server/src/graphql/queries/findAllFlat.d.ts +116 -0
- package/dist/server/src/graphql/queries/findAllInHierarchy.d.ts +1 -76
- package/dist/server/src/graphql/queries/findAllPerAuthor.d.ts +116 -0
- package/dist/server/src/index.d.ts +14811 -4052
- package/dist/server/src/services/admin/admin.service.d.ts +3576 -199
- package/dist/server/src/services/client.service.d.ts +3217 -113
- package/dist/server/src/services/common.service.d.ts +349 -75
- package/dist/server/src/services/index.d.ts +13791 -4380
- package/dist/server/src/services/utils/functions.d.ts +1 -2
- package/dist/server/src/validators/api/controllers/admin.controller.validator.d.ts +45 -45
- package/dist/server/src/validators/api/controllers/client.controller.validator.d.ts +446 -108
- package/dist/server/src/validators/repositories/comment.schema.d.ts +273 -0
- package/dist/server/src/validators/repositories/comment.validator.d.ts +5064 -0
- package/dist/server/src/validators/repositories/reports.validator.d.ts +662 -0
- package/dist/server/src/validators/utils.d.ts +50 -50
- package/package.json +1 -1
- package/dist/_chunks/index-C5ADhjCF.js +0 -18
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { StrapiUser } from '@sensinum/strapi-utils';
|
|
2
|
-
import { AdminUser
|
|
2
|
+
import { AdminUser } from '../../@types';
|
|
3
3
|
import PluginError from '../../utils/error';
|
|
4
4
|
import { Comment, CommentWithRelated } from '../../validators/repositories';
|
|
5
|
-
export declare const buildNestedStructure: (entities: Array<Comment | CommentWithRelated>, id?: Id | null, field?: string, dropBlockedThreads?: boolean, blockNestedThreads?: boolean) => Array<Comment>;
|
|
6
5
|
export declare const getRelatedGroups: (related: string) => Array<string>;
|
|
7
6
|
export declare const filterOurResolvedReports: (item: Comment) => Comment;
|
|
8
7
|
export declare const buildAuthorModel: (item: Comment | CommentWithRelated, blockedAuthorProps: Array<string>, fieldsToPopulate?: Array<string>) => Comment;
|
|
@@ -102,11 +102,11 @@ export declare const baseAdminPanelQuery: z.ZodObject<{
|
|
|
102
102
|
}, {
|
|
103
103
|
$notContainsi?: string;
|
|
104
104
|
}>]>, z.ZodObject<{
|
|
105
|
-
$null: z.
|
|
105
|
+
$null: z.ZodBoolean;
|
|
106
106
|
}, "strip", z.ZodTypeAny, {
|
|
107
|
-
$null?:
|
|
107
|
+
$null?: boolean;
|
|
108
108
|
}, {
|
|
109
|
-
$null?:
|
|
109
|
+
$null?: boolean;
|
|
110
110
|
}>, z.ZodObject<{
|
|
111
111
|
$notNull: z.ZodBoolean;
|
|
112
112
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -211,11 +211,11 @@ export declare const baseAdminPanelQuery: z.ZodObject<{
|
|
|
211
211
|
}, {
|
|
212
212
|
$notContainsi?: string;
|
|
213
213
|
}>]>, z.ZodObject<{
|
|
214
|
-
$null: z.
|
|
214
|
+
$null: z.ZodBoolean;
|
|
215
215
|
}, "strip", z.ZodTypeAny, {
|
|
216
|
-
$null?:
|
|
216
|
+
$null?: boolean;
|
|
217
217
|
}, {
|
|
218
|
-
$null?:
|
|
218
|
+
$null?: boolean;
|
|
219
219
|
}>, z.ZodObject<{
|
|
220
220
|
$notNull: z.ZodBoolean;
|
|
221
221
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -322,11 +322,11 @@ export declare const baseAdminPanelQuery: z.ZodObject<{
|
|
|
322
322
|
}, {
|
|
323
323
|
$notContainsi?: string;
|
|
324
324
|
}>]>, z.ZodObject<{
|
|
325
|
-
$null: z.
|
|
325
|
+
$null: z.ZodBoolean;
|
|
326
326
|
}, "strip", z.ZodTypeAny, {
|
|
327
|
-
$null?:
|
|
327
|
+
$null?: boolean;
|
|
328
328
|
}, {
|
|
329
|
-
$null?:
|
|
329
|
+
$null?: boolean;
|
|
330
330
|
}>, z.ZodObject<{
|
|
331
331
|
$notNull: z.ZodBoolean;
|
|
332
332
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -431,11 +431,11 @@ export declare const baseAdminPanelQuery: z.ZodObject<{
|
|
|
431
431
|
}, {
|
|
432
432
|
$notContainsi?: string;
|
|
433
433
|
}>]>, z.ZodObject<{
|
|
434
|
-
$null: z.
|
|
434
|
+
$null: z.ZodBoolean;
|
|
435
435
|
}, "strip", z.ZodTypeAny, {
|
|
436
|
-
$null?:
|
|
436
|
+
$null?: boolean;
|
|
437
437
|
}, {
|
|
438
|
-
$null?:
|
|
438
|
+
$null?: boolean;
|
|
439
439
|
}>, z.ZodObject<{
|
|
440
440
|
$notNull: z.ZodBoolean;
|
|
441
441
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -477,7 +477,7 @@ export declare const baseAdminPanelQuery: z.ZodObject<{
|
|
|
477
477
|
} | {
|
|
478
478
|
$notContainsi?: string;
|
|
479
479
|
} | {
|
|
480
|
-
$null?:
|
|
480
|
+
$null?: boolean;
|
|
481
481
|
} | {
|
|
482
482
|
$notNull?: boolean;
|
|
483
483
|
};
|
|
@@ -514,7 +514,7 @@ export declare const baseAdminPanelQuery: z.ZodObject<{
|
|
|
514
514
|
} | {
|
|
515
515
|
$notContainsi?: string;
|
|
516
516
|
} | {
|
|
517
|
-
$null?:
|
|
517
|
+
$null?: boolean;
|
|
518
518
|
} | {
|
|
519
519
|
$notNull?: boolean;
|
|
520
520
|
};
|
|
@@ -552,7 +552,7 @@ export declare const baseAdminPanelQuery: z.ZodObject<{
|
|
|
552
552
|
} | {
|
|
553
553
|
$notContainsi?: string;
|
|
554
554
|
} | {
|
|
555
|
-
$null?:
|
|
555
|
+
$null?: boolean;
|
|
556
556
|
} | {
|
|
557
557
|
$notNull?: boolean;
|
|
558
558
|
};
|
|
@@ -589,7 +589,7 @@ export declare const baseAdminPanelQuery: z.ZodObject<{
|
|
|
589
589
|
} | {
|
|
590
590
|
$notContainsi?: string;
|
|
591
591
|
} | {
|
|
592
|
-
$null?:
|
|
592
|
+
$null?: boolean;
|
|
593
593
|
} | {
|
|
594
594
|
$notNull?: boolean;
|
|
595
595
|
};
|
|
@@ -628,7 +628,7 @@ export declare const baseAdminPanelQuery: z.ZodObject<{
|
|
|
628
628
|
} | {
|
|
629
629
|
$notContainsi?: string;
|
|
630
630
|
} | {
|
|
631
|
-
$null?:
|
|
631
|
+
$null?: boolean;
|
|
632
632
|
} | {
|
|
633
633
|
$notNull?: boolean;
|
|
634
634
|
};
|
|
@@ -665,7 +665,7 @@ export declare const baseAdminPanelQuery: z.ZodObject<{
|
|
|
665
665
|
} | {
|
|
666
666
|
$notContainsi?: string;
|
|
667
667
|
} | {
|
|
668
|
-
$null?:
|
|
668
|
+
$null?: boolean;
|
|
669
669
|
} | {
|
|
670
670
|
$notNull?: boolean;
|
|
671
671
|
};
|
|
@@ -703,7 +703,7 @@ export declare const baseAdminPanelQuery: z.ZodObject<{
|
|
|
703
703
|
} | {
|
|
704
704
|
$notContainsi?: string;
|
|
705
705
|
} | {
|
|
706
|
-
$null?:
|
|
706
|
+
$null?: boolean;
|
|
707
707
|
} | {
|
|
708
708
|
$notNull?: boolean;
|
|
709
709
|
};
|
|
@@ -740,7 +740,7 @@ export declare const baseAdminPanelQuery: z.ZodObject<{
|
|
|
740
740
|
} | {
|
|
741
741
|
$notContainsi?: string;
|
|
742
742
|
} | {
|
|
743
|
-
$null?:
|
|
743
|
+
$null?: boolean;
|
|
744
744
|
} | {
|
|
745
745
|
$notNull?: boolean;
|
|
746
746
|
};
|
|
@@ -779,7 +779,7 @@ export declare const baseAdminPanelQuery: z.ZodObject<{
|
|
|
779
779
|
} | {
|
|
780
780
|
$notContainsi?: string;
|
|
781
781
|
} | {
|
|
782
|
-
$null?:
|
|
782
|
+
$null?: boolean;
|
|
783
783
|
} | {
|
|
784
784
|
$notNull?: boolean;
|
|
785
785
|
};
|
|
@@ -816,7 +816,7 @@ export declare const baseAdminPanelQuery: z.ZodObject<{
|
|
|
816
816
|
} | {
|
|
817
817
|
$notContainsi?: string;
|
|
818
818
|
} | {
|
|
819
|
-
$null?:
|
|
819
|
+
$null?: boolean;
|
|
820
820
|
} | {
|
|
821
821
|
$notNull?: boolean;
|
|
822
822
|
};
|
|
@@ -854,7 +854,7 @@ export declare const baseAdminPanelQuery: z.ZodObject<{
|
|
|
854
854
|
} | {
|
|
855
855
|
$notContainsi?: string;
|
|
856
856
|
} | {
|
|
857
|
-
$null?:
|
|
857
|
+
$null?: boolean;
|
|
858
858
|
} | {
|
|
859
859
|
$notNull?: boolean;
|
|
860
860
|
};
|
|
@@ -891,7 +891,7 @@ export declare const baseAdminPanelQuery: z.ZodObject<{
|
|
|
891
891
|
} | {
|
|
892
892
|
$notContainsi?: string;
|
|
893
893
|
} | {
|
|
894
|
-
$null?:
|
|
894
|
+
$null?: boolean;
|
|
895
895
|
} | {
|
|
896
896
|
$notNull?: boolean;
|
|
897
897
|
};
|
|
@@ -938,7 +938,7 @@ export declare const baseAdminPanelQuery: z.ZodObject<{
|
|
|
938
938
|
} | {
|
|
939
939
|
$notContainsi?: string;
|
|
940
940
|
} | {
|
|
941
|
-
$null?:
|
|
941
|
+
$null?: boolean;
|
|
942
942
|
} | {
|
|
943
943
|
$notNull?: boolean;
|
|
944
944
|
};
|
|
@@ -975,7 +975,7 @@ export declare const baseAdminPanelQuery: z.ZodObject<{
|
|
|
975
975
|
} | {
|
|
976
976
|
$notContainsi?: string;
|
|
977
977
|
} | {
|
|
978
|
-
$null?:
|
|
978
|
+
$null?: boolean;
|
|
979
979
|
} | {
|
|
980
980
|
$notNull?: boolean;
|
|
981
981
|
};
|
|
@@ -1013,7 +1013,7 @@ export declare const baseAdminPanelQuery: z.ZodObject<{
|
|
|
1013
1013
|
} | {
|
|
1014
1014
|
$notContainsi?: string;
|
|
1015
1015
|
} | {
|
|
1016
|
-
$null?:
|
|
1016
|
+
$null?: boolean;
|
|
1017
1017
|
} | {
|
|
1018
1018
|
$notNull?: boolean;
|
|
1019
1019
|
};
|
|
@@ -1050,7 +1050,7 @@ export declare const baseAdminPanelQuery: z.ZodObject<{
|
|
|
1050
1050
|
} | {
|
|
1051
1051
|
$notContainsi?: string;
|
|
1052
1052
|
} | {
|
|
1053
|
-
$null?:
|
|
1053
|
+
$null?: boolean;
|
|
1054
1054
|
} | {
|
|
1055
1055
|
$notNull?: boolean;
|
|
1056
1056
|
};
|
|
@@ -1095,7 +1095,7 @@ export declare const baseAdminPanelQuery: z.ZodObject<{
|
|
|
1095
1095
|
} | {
|
|
1096
1096
|
$notContainsi?: string;
|
|
1097
1097
|
} | {
|
|
1098
|
-
$null?:
|
|
1098
|
+
$null?: boolean;
|
|
1099
1099
|
} | {
|
|
1100
1100
|
$notNull?: boolean;
|
|
1101
1101
|
};
|
|
@@ -1132,7 +1132,7 @@ export declare const baseAdminPanelQuery: z.ZodObject<{
|
|
|
1132
1132
|
} | {
|
|
1133
1133
|
$notContainsi?: string;
|
|
1134
1134
|
} | {
|
|
1135
|
-
$null?:
|
|
1135
|
+
$null?: boolean;
|
|
1136
1136
|
} | {
|
|
1137
1137
|
$notNull?: boolean;
|
|
1138
1138
|
};
|
|
@@ -1170,7 +1170,7 @@ export declare const baseAdminPanelQuery: z.ZodObject<{
|
|
|
1170
1170
|
} | {
|
|
1171
1171
|
$notContainsi?: string;
|
|
1172
1172
|
} | {
|
|
1173
|
-
$null?:
|
|
1173
|
+
$null?: boolean;
|
|
1174
1174
|
} | {
|
|
1175
1175
|
$notNull?: boolean;
|
|
1176
1176
|
};
|
|
@@ -1207,7 +1207,7 @@ export declare const baseAdminPanelQuery: z.ZodObject<{
|
|
|
1207
1207
|
} | {
|
|
1208
1208
|
$notContainsi?: string;
|
|
1209
1209
|
} | {
|
|
1210
|
-
$null?:
|
|
1210
|
+
$null?: boolean;
|
|
1211
1211
|
} | {
|
|
1212
1212
|
$notNull?: boolean;
|
|
1213
1213
|
};
|
|
@@ -1257,7 +1257,7 @@ export declare const getCommentFindAllValidator: (query: unknown) => import("../
|
|
|
1257
1257
|
} | {
|
|
1258
1258
|
$notContainsi?: string;
|
|
1259
1259
|
} | {
|
|
1260
|
-
$null?:
|
|
1260
|
+
$null?: boolean;
|
|
1261
1261
|
} | {
|
|
1262
1262
|
$notNull?: boolean;
|
|
1263
1263
|
};
|
|
@@ -1294,7 +1294,7 @@ export declare const getCommentFindAllValidator: (query: unknown) => import("../
|
|
|
1294
1294
|
} | {
|
|
1295
1295
|
$notContainsi?: string;
|
|
1296
1296
|
} | {
|
|
1297
|
-
$null?:
|
|
1297
|
+
$null?: boolean;
|
|
1298
1298
|
} | {
|
|
1299
1299
|
$notNull?: boolean;
|
|
1300
1300
|
};
|
|
@@ -1332,7 +1332,7 @@ export declare const getCommentFindAllValidator: (query: unknown) => import("../
|
|
|
1332
1332
|
} | {
|
|
1333
1333
|
$notContainsi?: string;
|
|
1334
1334
|
} | {
|
|
1335
|
-
$null?:
|
|
1335
|
+
$null?: boolean;
|
|
1336
1336
|
} | {
|
|
1337
1337
|
$notNull?: boolean;
|
|
1338
1338
|
};
|
|
@@ -1369,7 +1369,7 @@ export declare const getCommentFindAllValidator: (query: unknown) => import("../
|
|
|
1369
1369
|
} | {
|
|
1370
1370
|
$notContainsi?: string;
|
|
1371
1371
|
} | {
|
|
1372
|
-
$null?:
|
|
1372
|
+
$null?: boolean;
|
|
1373
1373
|
} | {
|
|
1374
1374
|
$notNull?: boolean;
|
|
1375
1375
|
};
|
|
@@ -1416,7 +1416,7 @@ export declare const getReportFindReportsValidator: (query: unknown) => import("
|
|
|
1416
1416
|
} | {
|
|
1417
1417
|
$notContainsi?: string;
|
|
1418
1418
|
} | {
|
|
1419
|
-
$null?:
|
|
1419
|
+
$null?: boolean;
|
|
1420
1420
|
} | {
|
|
1421
1421
|
$notNull?: boolean;
|
|
1422
1422
|
};
|
|
@@ -1453,7 +1453,7 @@ export declare const getReportFindReportsValidator: (query: unknown) => import("
|
|
|
1453
1453
|
} | {
|
|
1454
1454
|
$notContainsi?: string;
|
|
1455
1455
|
} | {
|
|
1456
|
-
$null?:
|
|
1456
|
+
$null?: boolean;
|
|
1457
1457
|
} | {
|
|
1458
1458
|
$notNull?: boolean;
|
|
1459
1459
|
};
|
|
@@ -1491,7 +1491,7 @@ export declare const getReportFindReportsValidator: (query: unknown) => import("
|
|
|
1491
1491
|
} | {
|
|
1492
1492
|
$notContainsi?: string;
|
|
1493
1493
|
} | {
|
|
1494
|
-
$null?:
|
|
1494
|
+
$null?: boolean;
|
|
1495
1495
|
} | {
|
|
1496
1496
|
$notNull?: boolean;
|
|
1497
1497
|
};
|
|
@@ -1528,7 +1528,7 @@ export declare const getReportFindReportsValidator: (query: unknown) => import("
|
|
|
1528
1528
|
} | {
|
|
1529
1529
|
$notContainsi?: string;
|
|
1530
1530
|
} | {
|
|
1531
|
-
$null?:
|
|
1531
|
+
$null?: boolean;
|
|
1532
1532
|
} | {
|
|
1533
1533
|
$notNull?: boolean;
|
|
1534
1534
|
};
|
|
@@ -1566,15 +1566,15 @@ export declare const postCommentValidator: z.ZodObject<{
|
|
|
1566
1566
|
firstname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1567
1567
|
}, "strip", z.ZodTypeAny, {
|
|
1568
1568
|
id?: string | number;
|
|
1569
|
+
username?: string;
|
|
1569
1570
|
email?: string;
|
|
1570
1571
|
lastname?: string;
|
|
1571
|
-
username?: string;
|
|
1572
1572
|
firstname?: string;
|
|
1573
1573
|
}, {
|
|
1574
1574
|
id?: string | number;
|
|
1575
|
+
username?: string;
|
|
1575
1576
|
email?: string;
|
|
1576
1577
|
lastname?: string;
|
|
1577
|
-
username?: string;
|
|
1578
1578
|
firstname?: string;
|
|
1579
1579
|
}>;
|
|
1580
1580
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1582,9 +1582,9 @@ export declare const postCommentValidator: z.ZodObject<{
|
|
|
1582
1582
|
content?: string;
|
|
1583
1583
|
author?: {
|
|
1584
1584
|
id?: string | number;
|
|
1585
|
+
username?: string;
|
|
1585
1586
|
email?: string;
|
|
1586
1587
|
lastname?: string;
|
|
1587
|
-
username?: string;
|
|
1588
1588
|
firstname?: string;
|
|
1589
1589
|
};
|
|
1590
1590
|
}, {
|
|
@@ -1592,9 +1592,9 @@ export declare const postCommentValidator: z.ZodObject<{
|
|
|
1592
1592
|
content?: string;
|
|
1593
1593
|
author?: {
|
|
1594
1594
|
id?: string | number;
|
|
1595
|
+
username?: string;
|
|
1595
1596
|
email?: string;
|
|
1596
1597
|
lastname?: string;
|
|
1597
|
-
username?: string;
|
|
1598
1598
|
firstname?: string;
|
|
1599
1599
|
};
|
|
1600
1600
|
}>;
|
|
@@ -1603,9 +1603,9 @@ export declare const getCommentPostValidator: (params: unknown) => import("../..
|
|
|
1603
1603
|
content?: string;
|
|
1604
1604
|
author?: {
|
|
1605
1605
|
id?: string | number;
|
|
1606
|
+
username?: string;
|
|
1606
1607
|
email?: string;
|
|
1607
1608
|
lastname?: string;
|
|
1608
|
-
username?: string;
|
|
1609
1609
|
firstname?: string;
|
|
1610
1610
|
};
|
|
1611
1611
|
}>;
|