strapi-plugin-comments 3.0.0-beta.0 → 3.0.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.
Files changed (96) hide show
  1. package/README.md +83 -123
  2. package/dist/_chunks/{index-fAgatqD0.js → index-B-ygLKrb.js} +6080 -5662
  3. package/dist/_chunks/{index-fSb-gYwg.mjs → index-BgN4aUMA.mjs} +5 -5
  4. package/dist/_chunks/{index-h-TB6Qu2.mjs → index-Bx2boY6h.mjs} +6072 -5654
  5. package/dist/_chunks/{index-BQERo8pN.mjs → index-CIqMAf50.mjs} +1261 -1141
  6. package/dist/_chunks/{index-B6Q4U8YQ.js → index-CWfr5ejx.js} +27 -29
  7. package/dist/_chunks/{index-CTjupB9v.js → index-D8uskGzQ.js} +5 -5
  8. package/dist/_chunks/{index-BVj8EXjI.js → index-DFAPx7Bl.js} +1293 -1152
  9. package/dist/_chunks/{index-Bpbf7RON.mjs → index-Db2zwbpe.mjs} +27 -29
  10. package/dist/admin/index.js +1 -1
  11. package/dist/admin/index.mjs +1 -1
  12. package/dist/admin/src/api/client.d.ts +33 -52
  13. package/dist/admin/src/api/schemas.d.ts +454 -764
  14. package/dist/admin/src/components/UserAvatar/index.d.ts +1 -1
  15. package/dist/admin/src/contexts/UserContext.d.ts +1 -1
  16. package/dist/admin/src/hooks/useAPI.d.ts +34 -53
  17. package/dist/admin/src/hooks/useCommentMutations.d.ts +1 -1
  18. package/dist/admin/src/hooks/useCommentsAll.d.ts +7 -10
  19. package/dist/admin/src/hooks/useReports.d.ts +6 -10
  20. package/dist/admin/src/hooks/useUserContext.d.ts +1 -1
  21. package/dist/admin/src/pages/Settings/hooks/useSettingsAPI.d.ts +1 -1
  22. package/dist/server/index.js +9307 -2467
  23. package/dist/server/index.mjs +9307 -2467
  24. package/dist/server/src/{@types-v5 → @types}/utils.d.ts +4 -0
  25. package/dist/server/src/bootstrap.d.ts +1 -1
  26. package/dist/server/src/config/index.d.ts +52 -0
  27. package/dist/server/src/content-types/index.d.ts +1 -1
  28. package/dist/server/src/controllers/admin.controller.d.ts +110 -29
  29. package/dist/server/src/controllers/client.controller.d.ts +151 -23
  30. package/dist/server/src/controllers/index.d.ts +504 -197
  31. package/dist/server/src/controllers/settings.controller.d.ts +58 -2
  32. package/dist/server/src/controllers/utils/parsers.d.ts +4 -1
  33. package/dist/server/src/graphql/getResolversConfig.d.ts +21 -0
  34. package/dist/server/src/graphql/index.d.ts +2 -0
  35. package/dist/server/src/graphql/mutations/getCreateAbuseReport.d.ts +95 -0
  36. package/dist/server/src/graphql/mutations/getCreateComment.d.ts +84 -0
  37. package/dist/server/src/graphql/mutations/getRemoveComment.d.ts +84 -0
  38. package/dist/server/src/graphql/mutations/getUpdateComment.d.ts +84 -0
  39. package/dist/server/src/graphql/mutations/index.d.ts +3 -0
  40. package/dist/server/src/graphql/queries/findAllFlat.d.ts +177 -0
  41. package/dist/server/src/graphql/queries/findAllInHierarchy.d.ts +87 -0
  42. package/dist/server/src/graphql/queries/findAllPerAuthor.d.ts +176 -0
  43. package/dist/server/src/graphql/queries/index.d.ts +3 -0
  44. package/dist/server/src/graphql/types/getComment.d.ts +2 -0
  45. package/dist/server/src/graphql/types/getCommentAuthor.d.ts +2 -0
  46. package/dist/server/src/graphql/types/getCommentAuthorType.d.ts +2 -0
  47. package/dist/server/src/graphql/types/getCommentNested.d.ts +2 -0
  48. package/dist/server/src/graphql/types/getCreateComment.d.ts +2 -0
  49. package/dist/server/src/graphql/types/getCreateCommentAuthor.d.ts +2 -0
  50. package/dist/server/src/graphql/types/getCreateReport.d.ts +2 -0
  51. package/dist/server/src/graphql/types/getId.d.ts +2 -0
  52. package/dist/server/src/graphql/types/getIdentityAuthor.d.ts +2 -0
  53. package/dist/server/src/graphql/types/getRemoveComment.d.ts +2 -0
  54. package/dist/server/src/graphql/types/getReport.d.ts +2 -0
  55. package/dist/server/src/graphql/types/getReportReason.d.ts +3 -0
  56. package/dist/server/src/graphql/types/getResponseFindAll.d.ts +2 -0
  57. package/dist/server/src/graphql/types/getResponseFindAllPerAuthor.d.ts +2 -0
  58. package/dist/server/src/graphql/types/getResponseMeta.d.ts +2 -0
  59. package/dist/server/src/graphql/types/getResponsePagination.d.ts +2 -0
  60. package/dist/server/src/graphql/types/getUpdateComment.d.ts +2 -0
  61. package/dist/server/src/graphql/types/index.d.ts +3 -0
  62. package/dist/server/src/index.d.ts +1686 -779
  63. package/dist/server/src/register/custom-fields/index.d.ts +1 -1
  64. package/dist/server/src/register/index.d.ts +1 -1
  65. package/dist/server/src/repositories/comment.repository.d.ts +10 -1
  66. package/dist/server/src/repositories/index.d.ts +0 -2
  67. package/dist/server/src/repositories/report.comment.repository.d.ts +38 -1
  68. package/dist/server/src/repositories/store.repository.d.ts +175 -4
  69. package/dist/server/src/repositories/utils.d.ts +1 -3
  70. package/dist/server/src/routes/admin.routes.d.ts +1 -1
  71. package/dist/server/src/routes/client.routes.d.ts +1 -1
  72. package/dist/server/src/routes/index.d.ts +2 -2
  73. package/dist/server/src/services/admin/admin.service.d.ts +399 -188
  74. package/dist/server/src/services/admin/utils.d.ts +1 -1
  75. package/dist/server/src/services/client.service.d.ts +343 -177
  76. package/dist/server/src/services/common.service.d.ts +66 -22
  77. package/dist/server/src/services/gql.service.d.ts +7 -0
  78. package/dist/server/src/services/index.d.ts +1131 -552
  79. package/dist/server/src/services/settings.service.d.ts +44 -2
  80. package/dist/server/src/services/utils/functions.d.ts +10 -6
  81. package/dist/server/src/test/utils.d.ts +1 -0
  82. package/dist/server/src/utils/constants.d.ts +1 -1
  83. package/dist/server/src/utils/getConfig.d.ts +2 -2
  84. package/dist/server/src/utils/getPluginService.d.ts +2 -2
  85. package/dist/server/src/utils/throwError.d.ts +1 -1
  86. package/dist/server/src/validators/api/controllers/client.controller.validator.d.ts +116 -80
  87. package/dist/server/src/validators/api/controllers/settings.controller.validator.d.ts +7 -3
  88. package/dist/server/src/validators/repositories/comment.schema.d.ts +18 -3
  89. package/dist/server/src/validators/repositories/comment.validator.d.ts +400 -72
  90. package/dist/server/src/validators/repositories/reports.validator.d.ts +60 -18
  91. package/dist/server/src/validators/utils.d.ts +1 -1
  92. package/package.json +18 -11
  93. /package/dist/server/src/{@types-v5 → @types}/controllers.d.ts +0 -0
  94. /package/dist/server/src/{@types-v5 → @types}/index.d.ts +0 -0
  95. /package/dist/server/src/{@types-v5 → @types}/repositories.d.ts +0 -0
  96. /package/dist/server/src/{@types-v5 → @types}/routes.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- import { AdminUser, StrapiContext } from '../@types-v5';
1
+ import { AdminUser, StrapiContext } from '../@types';
2
2
  import { client } from '../validators/api';
3
3
  import { Comment } from '../validators/repositories';
4
4
  /**
@@ -6,7 +6,7 @@ import { Comment } from '../validators/repositories';
6
6
  */
7
7
  export declare const clientService: ({ strapi }: StrapiContext) => {
8
8
  getCommonService(): {
9
- getConfig<T extends "enabledCollections" | "approvalFlow" | "entryLabel" | "moderatorRoles" | "badWords" | "blockedAuthorProps" | "isValidationEnabled" | "reportReasons" | "isGQLPluginEnabled">(prop?: T, defaultValue?: {
9
+ getConfig<T extends string>(prop?: T, defaultValue?: import("../@types").PathValue<{
10
10
  enabledCollections?: string[];
11
11
  approvalFlow?: string[];
12
12
  entryLabel?: Record<string, string[]>;
@@ -20,21 +20,14 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
20
20
  OTHER?: import("../const").REPORT_REASON.OTHER;
21
21
  };
22
22
  isGQLPluginEnabled?: boolean;
23
- }[T], useLocal?: boolean): Promise<T extends string ? {
24
- enabledCollections?: string[];
25
- approvalFlow?: string[];
26
- entryLabel?: Record<string, string[]>;
27
- moderatorRoles?: string[];
28
- badWords?: boolean;
29
- blockedAuthorProps?: string[];
30
- isValidationEnabled?: boolean;
31
- reportReasons?: {
32
- BAD_LANGUAGE?: import("../const").REPORT_REASON.BAD_LANGUAGE;
33
- DISCRIMINATION?: import("../const").REPORT_REASON.DISCRIMINATION;
34
- OTHER?: import("../const").REPORT_REASON.OTHER;
23
+ gql?: {
24
+ auth?: boolean;
35
25
  };
36
- isGQLPluginEnabled?: boolean;
37
- }[T] : {
26
+ client?: {
27
+ url?: string;
28
+ contactEmail?: string;
29
+ };
30
+ }, T>, useLocal?: boolean): Promise<import("../@types").PathValue<{
38
31
  enabledCollections?: string[];
39
32
  approvalFlow?: string[];
40
33
  entryLabel?: Record<string, string[]>;
@@ -48,10 +41,17 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
48
41
  OTHER?: import("../const").REPORT_REASON.OTHER;
49
42
  };
50
43
  isGQLPluginEnabled?: boolean;
51
- }>;
44
+ gql?: {
45
+ auth?: boolean;
46
+ };
47
+ client?: {
48
+ url?: string;
49
+ contactEmail?: string;
50
+ };
51
+ }, T>>;
52
52
  parseRelationString(relation: string): {
53
53
  uid: import("@strapi/types/dist/uid").ContentType;
54
- relatedId: string | number;
54
+ relatedId: string;
55
55
  };
56
56
  isValidUserContext<T_1 extends {
57
57
  id?: string | number;
@@ -74,7 +74,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
74
74
  authorName?: string;
75
75
  authorEmail?: string;
76
76
  authorAvatar?: string;
77
- authorUser?: string;
77
+ authorUser?: string | {
78
+ id?: number;
79
+ email?: string;
80
+ };
78
81
  locale?: string;
79
82
  gotThread?: boolean;
80
83
  threadFirstItemId?: number;
@@ -108,7 +111,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
108
111
  authorName?: string;
109
112
  authorEmail?: string;
110
113
  authorAvatar?: string;
111
- authorUser?: string;
114
+ authorUser?: string | {
115
+ id?: number;
116
+ email?: string;
117
+ };
112
118
  locale?: string;
113
119
  gotThread?: boolean;
114
120
  threadFirstItemId?: number;
@@ -137,6 +143,8 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
137
143
  approvalStatus?: string;
138
144
  related?: {
139
145
  id?: number;
146
+ documentId?: string;
147
+ locale?: string;
140
148
  uid?: string;
141
149
  requireCommentsApproval?: boolean;
142
150
  };
@@ -147,7 +155,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
147
155
  authorName?: string;
148
156
  authorEmail?: string;
149
157
  authorAvatar?: string;
150
- authorUser?: string;
158
+ authorUser?: string | {
159
+ id?: number;
160
+ email?: string;
161
+ };
151
162
  locale?: string;
152
163
  gotThread?: boolean;
153
164
  threadFirstItemId?: number;
@@ -181,7 +192,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
181
192
  authorName?: string;
182
193
  authorEmail?: string;
183
194
  authorAvatar?: string;
184
- authorUser?: string;
195
+ authorUser?: string | {
196
+ id?: number;
197
+ email?: string;
198
+ };
185
199
  locale?: string;
186
200
  gotThread?: boolean;
187
201
  threadFirstItemId?: number;
@@ -216,7 +230,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
216
230
  authorName?: string;
217
231
  authorEmail?: string;
218
232
  authorAvatar?: string;
219
- authorUser?: string;
233
+ authorUser?: string | {
234
+ id?: number;
235
+ email?: string;
236
+ };
220
237
  locale?: string;
221
238
  gotThread?: boolean;
222
239
  threadFirstItemId?: number;
@@ -250,7 +267,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
250
267
  authorName?: string;
251
268
  authorEmail?: string;
252
269
  authorAvatar?: string;
253
- authorUser?: string;
270
+ authorUser?: string | {
271
+ id?: number;
272
+ email?: string;
273
+ };
254
274
  locale?: string;
255
275
  gotThread?: boolean;
256
276
  threadFirstItemId?: number;
@@ -268,44 +288,20 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
268
288
  author?: any;
269
289
  };
270
290
  };
271
- findAllFlat({ fields, limit, skip, sort, filter, populate, omit: baseOmit, isAdmin, pagination, query, }: {
272
- query?: {
273
- $and?: Record<string, string | number | {
274
- $eq?: string;
275
- } | {
276
- $eqi?: string;
277
- } | {
278
- $ne?: string;
279
- } | {
280
- $nei?: string;
281
- } | {
282
- $gt?: string;
283
- } | {
284
- $gte?: string;
285
- } | {
286
- $lt?: string;
287
- } | {
288
- $lte?: string;
289
- } | {
290
- $startsWith?: string;
291
- } | {
292
- $startsWithi?: string;
293
- } | {
294
- $endsWith?: string;
295
- } | {
296
- $endsWithi?: string;
297
- } | {
298
- $contains?: string;
299
- } | {
300
- $containsi?: string;
301
- } | {
302
- $notContains?: string;
303
- } | {
304
- $notContainsi?: string;
305
- } | {
306
- $notNull?: boolean;
307
- }>[];
308
- $or?: Record<string, string | number | {
291
+ findAllFlat({ fields, limit, skip, sort, populate, omit: baseOmit, isAdmin, pagination, filters, locale, }: {
292
+ sort?: string;
293
+ locale?: string;
294
+ pagination?: {
295
+ page?: number;
296
+ pageSize?: number;
297
+ withCount?: boolean;
298
+ };
299
+ relation?: `${string}::${string}.${string}`;
300
+ populate?: Record<string, boolean | {
301
+ populate?: boolean;
302
+ }>;
303
+ filters?: {
304
+ id?: string | number | {
309
305
  $eq?: string;
310
306
  } | {
311
307
  $eqi?: string;
@@ -339,10 +335,7 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
339
335
  $notContainsi?: string;
340
336
  } | {
341
337
  $notNull?: boolean;
342
- }>[];
343
- } | Record<string, string | number | boolean | Record<string, string | number | boolean>>;
344
- sort?: string;
345
- filter?: {
338
+ };
346
339
  content?: string | number | {
347
340
  $eq?: string;
348
341
  } | {
@@ -484,15 +477,6 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
484
477
  $notNull?: boolean;
485
478
  };
486
479
  };
487
- pagination?: {
488
- page?: number;
489
- pageSize?: number;
490
- withCount?: boolean;
491
- };
492
- relation?: `{${string}::${string}.${number}}`;
493
- populate?: Record<string, boolean | {
494
- populate?: boolean;
495
- }>;
496
480
  limit?: number;
497
481
  fields?: string[];
498
482
  omit?: string[];
@@ -517,7 +501,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
517
501
  authorName?: string;
518
502
  authorEmail?: string;
519
503
  authorAvatar?: string;
520
- authorUser?: string;
504
+ authorUser?: string | {
505
+ id?: number;
506
+ email?: string;
507
+ };
521
508
  locale?: string;
522
509
  gotThread?: boolean;
523
510
  threadFirstItemId?: number;
@@ -551,7 +538,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
551
538
  authorName?: string;
552
539
  authorEmail?: string;
553
540
  authorAvatar?: string;
554
- authorUser?: string;
541
+ authorUser?: string | {
542
+ id?: number;
543
+ email?: string;
544
+ };
555
545
  locale?: string;
556
546
  gotThread?: boolean;
557
547
  threadFirstItemId?: number;
@@ -580,6 +570,8 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
580
570
  approvalStatus?: string;
581
571
  related?: {
582
572
  id?: number;
573
+ documentId?: string;
574
+ locale?: string;
583
575
  uid?: string;
584
576
  requireCommentsApproval?: boolean;
585
577
  };
@@ -590,7 +582,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
590
582
  authorName?: string;
591
583
  authorEmail?: string;
592
584
  authorAvatar?: string;
593
- authorUser?: string;
585
+ authorUser?: string | {
586
+ id?: number;
587
+ email?: string;
588
+ };
594
589
  locale?: string;
595
590
  gotThread?: boolean;
596
591
  threadFirstItemId?: number;
@@ -624,7 +619,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
624
619
  authorName?: string;
625
620
  authorEmail?: string;
626
621
  authorAvatar?: string;
627
- authorUser?: string;
622
+ authorUser?: string | {
623
+ id?: number;
624
+ email?: string;
625
+ };
628
626
  locale?: string;
629
627
  gotThread?: boolean;
630
628
  threadFirstItemId?: number;
@@ -649,44 +647,15 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
649
647
  total?: number;
650
648
  };
651
649
  }>;
652
- findAllInHierarchy({ query, populate, sort, fields, startingFromId, dropBlockedThreads, isAdmin, omit, }: {
653
- query?: {
654
- $and?: Record<string, string | number | {
655
- $eq?: string;
656
- } | {
657
- $eqi?: string;
658
- } | {
659
- $ne?: string;
660
- } | {
661
- $nei?: string;
662
- } | {
663
- $gt?: string;
664
- } | {
665
- $gte?: string;
666
- } | {
667
- $lt?: string;
668
- } | {
669
- $lte?: string;
670
- } | {
671
- $startsWith?: string;
672
- } | {
673
- $startsWithi?: string;
674
- } | {
675
- $endsWith?: string;
676
- } | {
677
- $endsWithi?: string;
678
- } | {
679
- $contains?: string;
680
- } | {
681
- $containsi?: string;
682
- } | {
683
- $notContains?: string;
684
- } | {
685
- $notContainsi?: string;
686
- } | {
687
- $notNull?: boolean;
688
- }>[];
689
- $or?: Record<string, string | number | {
650
+ findAllInHierarchy({ filters, populate, sort, fields, startingFromId, dropBlockedThreads, isAdmin, omit, locale, }: {
651
+ sort?: string;
652
+ locale?: string;
653
+ relation?: `${string}::${string}.${string}`;
654
+ populate?: Record<string, boolean | {
655
+ populate?: boolean;
656
+ }>;
657
+ filters?: {
658
+ id?: string | number | {
690
659
  $eq?: string;
691
660
  } | {
692
661
  $eqi?: string;
@@ -720,10 +689,7 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
720
689
  $notContainsi?: string;
721
690
  } | {
722
691
  $notNull?: boolean;
723
- }>[];
724
- } | Record<string, string | number | boolean | Record<string, string | number | boolean>>;
725
- sort?: string;
726
- filter?: {
692
+ };
727
693
  content?: string | number | {
728
694
  $eq?: string;
729
695
  } | {
@@ -865,10 +831,6 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
865
831
  $notNull?: boolean;
866
832
  };
867
833
  };
868
- relation?: `{${string}::${string}.${number}}`;
869
- populate?: Record<string, boolean | {
870
- populate?: boolean;
871
- }>;
872
834
  limit?: number;
873
835
  fields?: string[];
874
836
  omit?: string[];
@@ -894,7 +856,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
894
856
  authorName?: string;
895
857
  authorEmail?: string;
896
858
  authorAvatar?: string;
897
- authorUser?: string;
859
+ authorUser?: string | {
860
+ id?: number;
861
+ email?: string;
862
+ };
898
863
  locale?: string;
899
864
  gotThread?: boolean;
900
865
  threadFirstItemId?: number;
@@ -928,7 +893,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
928
893
  authorName?: string;
929
894
  authorEmail?: string;
930
895
  authorAvatar?: string;
931
- authorUser?: string;
896
+ authorUser?: string | {
897
+ id?: number;
898
+ email?: string;
899
+ };
932
900
  locale?: string;
933
901
  gotThread?: boolean;
934
902
  threadFirstItemId?: number;
@@ -964,7 +932,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
964
932
  authorName?: string;
965
933
  authorEmail?: string;
966
934
  authorAvatar?: string;
967
- authorUser?: string;
935
+ authorUser?: string | {
936
+ id?: number;
937
+ email?: string;
938
+ };
968
939
  locale?: string;
969
940
  gotThread?: boolean;
970
941
  threadFirstItemId?: number;
@@ -998,7 +969,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
998
969
  authorName?: string;
999
970
  authorEmail?: string;
1000
971
  authorAvatar?: string;
1001
- authorUser?: string;
972
+ authorUser?: string | {
973
+ id?: number;
974
+ email?: string;
975
+ };
1002
976
  locale?: string;
1003
977
  gotThread?: boolean;
1004
978
  threadFirstItemId?: number;
@@ -1034,7 +1008,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1034
1008
  authorName?: string;
1035
1009
  authorEmail?: string;
1036
1010
  authorAvatar?: string;
1037
- authorUser?: string;
1011
+ authorUser?: string | {
1012
+ id?: number;
1013
+ email?: string;
1014
+ };
1038
1015
  locale?: string;
1039
1016
  gotThread?: boolean;
1040
1017
  threadFirstItemId?: number;
@@ -1068,7 +1045,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1068
1045
  authorName?: string;
1069
1046
  authorEmail?: string;
1070
1047
  authorAvatar?: string;
1071
- authorUser?: string;
1048
+ authorUser?: string | {
1049
+ id?: number;
1050
+ email?: string;
1051
+ };
1072
1052
  locale?: string;
1073
1053
  gotThread?: boolean;
1074
1054
  threadFirstItemId?: number;
@@ -1104,7 +1084,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1104
1084
  authorName?: string;
1105
1085
  authorEmail?: string;
1106
1086
  authorAvatar?: string;
1107
- authorUser?: string;
1087
+ authorUser?: string | {
1088
+ id?: number;
1089
+ email?: string;
1090
+ };
1108
1091
  locale?: string;
1109
1092
  gotThread?: boolean;
1110
1093
  threadFirstItemId?: number;
@@ -1138,7 +1121,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1138
1121
  authorName?: string;
1139
1122
  authorEmail?: string;
1140
1123
  authorAvatar?: string;
1141
- authorUser?: string;
1124
+ authorUser?: string | {
1125
+ id?: number;
1126
+ email?: string;
1127
+ };
1142
1128
  locale?: string;
1143
1129
  gotThread?: boolean;
1144
1130
  threadFirstItemId?: number;
@@ -1173,7 +1159,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1173
1159
  authorName?: string;
1174
1160
  authorEmail?: string;
1175
1161
  authorAvatar?: string;
1176
- authorUser?: string;
1162
+ authorUser?: string | {
1163
+ id?: number;
1164
+ email?: string;
1165
+ };
1177
1166
  locale?: string;
1178
1167
  gotThread?: boolean;
1179
1168
  threadFirstItemId?: number;
@@ -1207,7 +1196,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1207
1196
  authorName?: string;
1208
1197
  authorEmail?: string;
1209
1198
  authorAvatar?: string;
1210
- authorUser?: string;
1199
+ authorUser?: string | {
1200
+ id?: number;
1201
+ email?: string;
1202
+ };
1211
1203
  locale?: string;
1212
1204
  gotThread?: boolean;
1213
1205
  threadFirstItemId?: number;
@@ -1225,9 +1217,21 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1225
1217
  author?: any;
1226
1218
  };
1227
1219
  }>;
1228
- findAllPerAuthor({ query, populate, pagination, sort, fields, isAdmin, authorId, }: {
1229
- query?: {
1230
- $and?: Record<string, string | number | {
1220
+ findAllPerAuthor({ filters, populate, pagination, sort, fields, isAdmin, authorId, }: {
1221
+ type?: string;
1222
+ sort?: string;
1223
+ authorId?: string | number;
1224
+ locale?: string;
1225
+ pagination?: {
1226
+ page?: number;
1227
+ pageSize?: number;
1228
+ withCount?: boolean;
1229
+ };
1230
+ populate?: Record<string, boolean | {
1231
+ populate?: boolean;
1232
+ }>;
1233
+ filters?: {
1234
+ id?: string | number | {
1231
1235
  $eq?: string;
1232
1236
  } | {
1233
1237
  $eqi?: string;
@@ -1261,8 +1265,8 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1261
1265
  $notContainsi?: string;
1262
1266
  } | {
1263
1267
  $notNull?: boolean;
1264
- }>[];
1265
- $or?: Record<string, string | number | {
1268
+ };
1269
+ content?: string | number | {
1266
1270
  $eq?: string;
1267
1271
  } | {
1268
1272
  $eqi?: string;
@@ -1296,19 +1300,113 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1296
1300
  $notContainsi?: string;
1297
1301
  } | {
1298
1302
  $notNull?: boolean;
1299
- }>[];
1300
- } | Record<string, string | number | boolean | Record<string, string | number | boolean>>;
1301
- type?: string;
1302
- sort?: string;
1303
- authorId?: string | number;
1304
- pagination?: {
1305
- page?: number;
1306
- pageSize?: number;
1307
- withCount?: boolean;
1303
+ };
1304
+ createdAt?: string | number | {
1305
+ $eq?: string;
1306
+ } | {
1307
+ $eqi?: string;
1308
+ } | {
1309
+ $ne?: string;
1310
+ } | {
1311
+ $nei?: string;
1312
+ } | {
1313
+ $gt?: string;
1314
+ } | {
1315
+ $gte?: string;
1316
+ } | {
1317
+ $lt?: string;
1318
+ } | {
1319
+ $lte?: string;
1320
+ } | {
1321
+ $startsWith?: string;
1322
+ } | {
1323
+ $startsWithi?: string;
1324
+ } | {
1325
+ $endsWith?: string;
1326
+ } | {
1327
+ $endsWithi?: string;
1328
+ } | {
1329
+ $contains?: string;
1330
+ } | {
1331
+ $containsi?: string;
1332
+ } | {
1333
+ $notContains?: string;
1334
+ } | {
1335
+ $notContainsi?: string;
1336
+ } | {
1337
+ $notNull?: boolean;
1338
+ };
1339
+ updatedAt?: string | number | {
1340
+ $eq?: string;
1341
+ } | {
1342
+ $eqi?: string;
1343
+ } | {
1344
+ $ne?: string;
1345
+ } | {
1346
+ $nei?: string;
1347
+ } | {
1348
+ $gt?: string;
1349
+ } | {
1350
+ $gte?: string;
1351
+ } | {
1352
+ $lt?: string;
1353
+ } | {
1354
+ $lte?: string;
1355
+ } | {
1356
+ $startsWith?: string;
1357
+ } | {
1358
+ $startsWithi?: string;
1359
+ } | {
1360
+ $endsWith?: string;
1361
+ } | {
1362
+ $endsWithi?: string;
1363
+ } | {
1364
+ $contains?: string;
1365
+ } | {
1366
+ $containsi?: string;
1367
+ } | {
1368
+ $notContains?: string;
1369
+ } | {
1370
+ $notContainsi?: string;
1371
+ } | {
1372
+ $notNull?: boolean;
1373
+ };
1374
+ authorName?: string | number | {
1375
+ $eq?: string;
1376
+ } | {
1377
+ $eqi?: string;
1378
+ } | {
1379
+ $ne?: string;
1380
+ } | {
1381
+ $nei?: string;
1382
+ } | {
1383
+ $gt?: string;
1384
+ } | {
1385
+ $gte?: string;
1386
+ } | {
1387
+ $lt?: string;
1388
+ } | {
1389
+ $lte?: string;
1390
+ } | {
1391
+ $startsWith?: string;
1392
+ } | {
1393
+ $startsWithi?: string;
1394
+ } | {
1395
+ $endsWith?: string;
1396
+ } | {
1397
+ $endsWithi?: string;
1398
+ } | {
1399
+ $contains?: string;
1400
+ } | {
1401
+ $containsi?: string;
1402
+ } | {
1403
+ $notContains?: string;
1404
+ } | {
1405
+ $notContainsi?: string;
1406
+ } | {
1407
+ $notNull?: boolean;
1408
+ };
1308
1409
  };
1309
- populate?: Record<string, boolean | {
1310
- populate?: boolean;
1311
- }>;
1312
1410
  limit?: number;
1313
1411
  fields?: string[];
1314
1412
  omit?: string[];
@@ -1333,7 +1431,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1333
1431
  authorName?: string;
1334
1432
  authorEmail?: string;
1335
1433
  authorAvatar?: string;
1336
- authorUser?: string;
1434
+ authorUser?: string | {
1435
+ id?: number;
1436
+ email?: string;
1437
+ };
1337
1438
  locale?: string;
1338
1439
  gotThread?: boolean;
1339
1440
  threadFirstItemId?: number;
@@ -1366,7 +1467,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1366
1467
  authorName?: string;
1367
1468
  authorEmail?: string;
1368
1469
  authorAvatar?: string;
1369
- authorUser?: string;
1470
+ authorUser?: string | {
1471
+ id?: number;
1472
+ email?: string;
1473
+ };
1370
1474
  locale?: string;
1371
1475
  gotThread?: boolean;
1372
1476
  threadFirstItemId?: number;
@@ -1395,6 +1499,8 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1395
1499
  approvalStatus?: string;
1396
1500
  related?: {
1397
1501
  id?: number;
1502
+ documentId?: string;
1503
+ locale?: string;
1398
1504
  uid?: string;
1399
1505
  requireCommentsApproval?: boolean;
1400
1506
  };
@@ -1405,7 +1511,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1405
1511
  authorName?: string;
1406
1512
  authorEmail?: string;
1407
1513
  authorAvatar?: string;
1408
- authorUser?: string;
1514
+ authorUser?: string | {
1515
+ id?: number;
1516
+ email?: string;
1517
+ };
1409
1518
  locale?: string;
1410
1519
  gotThread?: boolean;
1411
1520
  threadFirstItemId?: number;
@@ -1438,7 +1547,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1438
1547
  authorName?: string;
1439
1548
  authorEmail?: string;
1440
1549
  authorAvatar?: string;
1441
- authorUser?: string;
1550
+ authorUser?: string | {
1551
+ id?: number;
1552
+ email?: string;
1553
+ };
1442
1554
  locale?: string;
1443
1555
  gotThread?: boolean;
1444
1556
  threadFirstItemId?: number;
@@ -1481,7 +1593,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1481
1593
  authorName?: string;
1482
1594
  authorEmail?: string;
1483
1595
  authorAvatar?: string;
1484
- authorUser?: string;
1596
+ authorUser?: string | {
1597
+ id?: number;
1598
+ email?: string;
1599
+ };
1485
1600
  locale?: string;
1486
1601
  gotThread?: boolean;
1487
1602
  threadFirstItemId?: number;
@@ -1515,7 +1630,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1515
1630
  authorName?: string;
1516
1631
  authorEmail?: string;
1517
1632
  authorAvatar?: string;
1518
- authorUser?: string;
1633
+ authorUser?: string | {
1634
+ id?: number;
1635
+ email?: string;
1636
+ };
1519
1637
  locale?: string;
1520
1638
  gotThread?: boolean;
1521
1639
  threadFirstItemId?: number;
@@ -1534,6 +1652,8 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1534
1652
  };
1535
1653
  }[]): Promise<{
1536
1654
  id?: number;
1655
+ documentId?: string;
1656
+ locale?: string;
1537
1657
  uid?: string;
1538
1658
  requireCommentsApproval?: boolean;
1539
1659
  }[]>;
@@ -1555,7 +1675,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1555
1675
  authorName?: string;
1556
1676
  authorEmail?: string;
1557
1677
  authorAvatar?: string;
1558
- authorUser?: string;
1678
+ authorUser?: string | {
1679
+ id?: number;
1680
+ email?: string;
1681
+ };
1559
1682
  locale?: string;
1560
1683
  gotThread?: boolean;
1561
1684
  threadFirstItemId?: number;
@@ -1589,7 +1712,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1589
1712
  authorName?: string;
1590
1713
  authorEmail?: string;
1591
1714
  authorAvatar?: string;
1592
- authorUser?: string;
1715
+ authorUser?: string | {
1716
+ id?: number;
1717
+ email?: string;
1718
+ };
1593
1719
  locale?: string;
1594
1720
  gotThread?: boolean;
1595
1721
  threadFirstItemId?: number;
@@ -1608,6 +1734,8 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1608
1734
  };
1609
1735
  }, relatedEntities?: {
1610
1736
  id?: number;
1737
+ documentId?: string;
1738
+ locale?: string;
1611
1739
  uid?: string;
1612
1740
  requireCommentsApproval?: boolean;
1613
1741
  }[]): {
@@ -1622,6 +1750,8 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1622
1750
  approvalStatus?: string;
1623
1751
  related?: {
1624
1752
  id?: number;
1753
+ documentId?: string;
1754
+ locale?: string;
1625
1755
  uid?: string;
1626
1756
  requireCommentsApproval?: boolean;
1627
1757
  };
@@ -1632,7 +1762,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1632
1762
  authorName?: string;
1633
1763
  authorEmail?: string;
1634
1764
  authorAvatar?: string;
1635
- authorUser?: string;
1765
+ authorUser?: string | {
1766
+ id?: number;
1767
+ email?: string;
1768
+ };
1636
1769
  locale?: string;
1637
1770
  gotThread?: boolean;
1638
1771
  threadFirstItemId?: number;
@@ -1666,7 +1799,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1666
1799
  authorName?: string;
1667
1800
  authorEmail?: string;
1668
1801
  authorAvatar?: string;
1669
- authorUser?: string;
1802
+ authorUser?: string | {
1803
+ id?: number;
1804
+ email?: string;
1805
+ };
1670
1806
  locale?: string;
1671
1807
  gotThread?: boolean;
1672
1808
  threadFirstItemId?: number;
@@ -1684,7 +1820,7 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1684
1820
  author?: any;
1685
1821
  };
1686
1822
  };
1687
- modifiedNestedNestedComments<T_2 extends "id" | "documentId" | "content" | "blocked" | "blockedThread" | "blockReason" | "isAdminComment" | "removed" | "approvalStatus" | "related" | "createdAt" | "updatedAt" | "publishedAt" | "authorId" | "authorName" | "authorEmail" | "authorAvatar" | "authorUser" | "locale" | "gotThread" | "threadFirstItemId" | "reports" | "author" | "threadOf">(id: import("../@types-v5").Id, fieldName: T_2, value: {
1823
+ modifiedNestedNestedComments<T_2 extends "id" | "documentId" | "content" | "blocked" | "blockedThread" | "blockReason" | "isAdminComment" | "removed" | "approvalStatus" | "related" | "createdAt" | "updatedAt" | "publishedAt" | "authorId" | "authorName" | "authorEmail" | "authorAvatar" | "authorUser" | "locale" | "gotThread" | "threadFirstItemId" | "reports" | "author" | "threadOf">(id: import("../@types").Id, fieldName: T_2, value: {
1688
1824
  id?: number;
1689
1825
  documentId?: string;
1690
1826
  content?: string;
@@ -1702,7 +1838,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1702
1838
  authorName?: string;
1703
1839
  authorEmail?: string;
1704
1840
  authorAvatar?: string;
1705
- authorUser?: string;
1841
+ authorUser?: string | {
1842
+ id?: number;
1843
+ email?: string;
1844
+ };
1706
1845
  locale?: string;
1707
1846
  gotThread?: boolean;
1708
1847
  threadFirstItemId?: number;
@@ -1736,7 +1875,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1736
1875
  authorName?: string;
1737
1876
  authorEmail?: string;
1738
1877
  authorAvatar?: string;
1739
- authorUser?: string;
1878
+ authorUser?: string | {
1879
+ id?: number;
1880
+ email?: string;
1881
+ };
1740
1882
  locale?: string;
1741
1883
  gotThread?: boolean;
1742
1884
  threadFirstItemId?: number;
@@ -1753,12 +1895,12 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1753
1895
  }[];
1754
1896
  author?: any;
1755
1897
  };
1756
- }[T_2]): Promise<boolean>;
1898
+ }[T_2], deepLimit?: number): Promise<boolean>;
1757
1899
  checkBadWords(content: string): Promise<string>;
1758
1900
  registerLifecycleHook(): void;
1759
1901
  runLifecycleHook(): Promise<void>;
1760
1902
  };
1761
- create({ relation, content, threadOf, author, approvalStatus }: client.NewCommentValidatorSchema, user?: AdminUser): Promise<{
1903
+ create({ relation, content, threadOf, author, approvalStatus, locale }: client.NewCommentValidatorSchema, user?: AdminUser): Promise<{
1762
1904
  id?: number;
1763
1905
  documentId?: string;
1764
1906
  content?: string;
@@ -1776,7 +1918,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1776
1918
  authorName?: string;
1777
1919
  authorEmail?: string;
1778
1920
  authorAvatar?: string;
1779
- authorUser?: string;
1921
+ authorUser?: string | {
1922
+ id?: number;
1923
+ email?: string;
1924
+ };
1780
1925
  locale?: string;
1781
1926
  gotThread?: boolean;
1782
1927
  threadFirstItemId?: number;
@@ -1810,7 +1955,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1810
1955
  authorName?: string;
1811
1956
  authorEmail?: string;
1812
1957
  authorAvatar?: string;
1813
- authorUser?: string;
1958
+ authorUser?: string | {
1959
+ id?: number;
1960
+ email?: string;
1961
+ };
1814
1962
  locale?: string;
1815
1963
  gotThread?: boolean;
1816
1964
  threadFirstItemId?: number;
@@ -1846,7 +1994,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1846
1994
  authorName?: string;
1847
1995
  authorEmail?: string;
1848
1996
  authorAvatar?: string;
1849
- authorUser?: string;
1997
+ authorUser?: string | {
1998
+ id?: number;
1999
+ email?: string;
2000
+ };
1850
2001
  locale?: string;
1851
2002
  gotThread?: boolean;
1852
2003
  threadFirstItemId?: number;
@@ -1880,7 +2031,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1880
2031
  authorName?: string;
1881
2032
  authorEmail?: string;
1882
2033
  authorAvatar?: string;
1883
- authorUser?: string;
2034
+ authorUser?: string | {
2035
+ id?: number;
2036
+ email?: string;
2037
+ };
1884
2038
  locale?: string;
1885
2039
  gotThread?: boolean;
1886
2040
  threadFirstItemId?: number;
@@ -1917,7 +2071,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1917
2071
  authorName?: string;
1918
2072
  authorEmail?: string;
1919
2073
  authorAvatar?: string;
1920
- authorUser?: string;
2074
+ authorUser?: string | {
2075
+ id?: number;
2076
+ email?: string;
2077
+ };
1921
2078
  locale?: string;
1922
2079
  gotThread?: boolean;
1923
2080
  threadFirstItemId?: number;
@@ -1951,7 +2108,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1951
2108
  authorName?: string;
1952
2109
  authorEmail?: string;
1953
2110
  authorAvatar?: string;
1954
- authorUser?: string;
2111
+ authorUser?: string | {
2112
+ id?: number;
2113
+ email?: string;
2114
+ };
1955
2115
  locale?: string;
1956
2116
  gotThread?: boolean;
1957
2117
  threadFirstItemId?: number;
@@ -1997,7 +2157,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
1997
2157
  authorName?: string;
1998
2158
  authorEmail?: string;
1999
2159
  authorAvatar?: string;
2000
- authorUser?: string;
2160
+ authorUser?: string | {
2161
+ id?: number;
2162
+ email?: string;
2163
+ };
2001
2164
  locale?: string;
2002
2165
  gotThread?: boolean;
2003
2166
  threadFirstItemId?: number;
@@ -2031,7 +2194,10 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
2031
2194
  authorName?: string;
2032
2195
  authorEmail?: string;
2033
2196
  authorAvatar?: string;
2034
- authorUser?: string;
2197
+ authorUser?: string | {
2198
+ id?: number;
2199
+ email?: string;
2200
+ };
2035
2201
  locale?: string;
2036
2202
  gotThread?: boolean;
2037
2203
  threadFirstItemId?: number;
@@ -2050,7 +2216,7 @@ export declare const clientService: ({ strapi }: StrapiContext) => {
2050
2216
  };
2051
2217
  }>;
2052
2218
  sendAbuseReportEmail(reason: string, content: string): Promise<void>;
2053
- markAsRemovedNested(commentId: string | number, status: boolean): Promise<void>;
2054
- sendResponseNotification(_entry: Comment): Promise<void>;
2219
+ markAsRemovedNested(commentId: string | number, status: boolean): Promise<boolean>;
2220
+ sendResponseNotification(entity: Comment): Promise<void>;
2055
2221
  };
2056
2222
  export default clientService;