strapi-plugin-comments 3.2.2 → 3.2.3-beta.1
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/dist/server/index.js +51 -51
- package/dist/server/index.mjs +2041 -2010
- package/dist/server/src/controllers/admin.controller.d.ts +1 -1
- package/dist/server/src/controllers/index.d.ts +1 -1
- package/dist/server/src/index.d.ts +8960 -666
- package/dist/server/src/services/admin/admin.service.d.ts +144 -9
- package/dist/server/src/services/index.d.ts +8959 -665
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Id, StrapiContext } from '../../@types';
|
|
2
|
+
import { type CommentRepository } from '../../repositories';
|
|
2
3
|
import { admin as adminValidator } from '../../validators/api';
|
|
3
4
|
declare const _default: ({ strapi }: StrapiContext) => {
|
|
4
5
|
getCommonService(): {
|
|
@@ -8247,7 +8248,7 @@ declare const _default: ({ strapi }: StrapiContext) => {
|
|
|
8247
8248
|
registerLifecycleHook(): void;
|
|
8248
8249
|
runLifecycleHook(): Promise<void>;
|
|
8249
8250
|
};
|
|
8250
|
-
findAll({ _q, orderBy, page, pageSize, filters }: adminValidator.CommentFindAllSchema): Promise<{
|
|
8251
|
+
findAll({ _q, orderBy, page, pageSize, filters }: adminValidator.CommentFindAllSchema, commentRepository: CommentRepository): Promise<{
|
|
8251
8252
|
pagination: {
|
|
8252
8253
|
page?: number;
|
|
8253
8254
|
pageSize?: number;
|
|
@@ -8395,7 +8396,7 @@ declare const _default: ({ strapi }: StrapiContext) => {
|
|
|
8395
8396
|
};
|
|
8396
8397
|
}[];
|
|
8397
8398
|
}>;
|
|
8398
|
-
findReports({ _q, orderBy, page, pageSize }: adminValidator.ReportFindReportsValidator): Promise<{
|
|
8399
|
+
findReports({ _q, orderBy, page, pageSize }: adminValidator.ReportFindReportsValidator, commentRepository: CommentRepository): Promise<{
|
|
8399
8400
|
result: {
|
|
8400
8401
|
id?: number;
|
|
8401
8402
|
documentId?: string;
|
|
@@ -8537,7 +8538,7 @@ declare const _default: ({ strapi }: StrapiContext) => {
|
|
|
8537
8538
|
total?: number;
|
|
8538
8539
|
};
|
|
8539
8540
|
}>;
|
|
8540
|
-
findOneAndThread({ id, removed, ...query }: adminValidator.FindOneValidatorSchema): Promise<{
|
|
8541
|
+
findOneAndThread({ id, removed, ...query }: adminValidator.FindOneValidatorSchema, commentRepository: CommentRepository): Promise<{
|
|
8541
8542
|
entity: {
|
|
8542
8543
|
uid: import("@strapi/types/dist/uid").ContentType;
|
|
8543
8544
|
documentId: string;
|
|
@@ -8813,7 +8814,7 @@ declare const _default: ({ strapi }: StrapiContext) => {
|
|
|
8813
8814
|
author?: any;
|
|
8814
8815
|
};
|
|
8815
8816
|
}>;
|
|
8816
|
-
deleteComment(id: Id): Promise<{
|
|
8817
|
+
deleteComment(id: Id, commentRepository: CommentRepository): Promise<{
|
|
8817
8818
|
id?: number;
|
|
8818
8819
|
documentId?: string;
|
|
8819
8820
|
content?: string;
|
|
@@ -9081,7 +9082,7 @@ declare const _default: ({ strapi }: StrapiContext) => {
|
|
|
9081
9082
|
author?: any;
|
|
9082
9083
|
};
|
|
9083
9084
|
}>;
|
|
9084
|
-
approveComment(id: Id): Promise<{
|
|
9085
|
+
approveComment(id: Id, commentRepository: CommentRepository): Promise<{
|
|
9085
9086
|
id?: number;
|
|
9086
9087
|
documentId?: string;
|
|
9087
9088
|
content?: string;
|
|
@@ -9215,7 +9216,7 @@ declare const _default: ({ strapi }: StrapiContext) => {
|
|
|
9215
9216
|
author?: any;
|
|
9216
9217
|
};
|
|
9217
9218
|
}>;
|
|
9218
|
-
rejectComment(id: Id): Promise<{
|
|
9219
|
+
rejectComment(id: Id, commentRepository: CommentRepository): Promise<{
|
|
9219
9220
|
id?: number;
|
|
9220
9221
|
documentId?: string;
|
|
9221
9222
|
content?: string;
|
|
@@ -9363,9 +9364,9 @@ declare const _default: ({ strapi }: StrapiContext) => {
|
|
|
9363
9364
|
}>;
|
|
9364
9365
|
resolveCommentMultipleAbuseReports({ id: commentId, reportIds: ids, }: adminValidator.CommentResolveMultipleAbuseReportsValidatorSchema): Promise<import("@strapi/database/dist/types").CountResult>;
|
|
9365
9366
|
resolveAllAbuseReportsForComment(id: Id): Promise<import("@strapi/database/dist/types").CountResult>;
|
|
9366
|
-
resolveAllAbuseReportsForThread(commentId: number): Promise<import("@strapi/database/dist/types").CountResult>;
|
|
9367
|
+
resolveAllAbuseReportsForThread(commentId: number, commentRepository: CommentRepository): Promise<import("@strapi/database/dist/types").CountResult>;
|
|
9367
9368
|
resolveMultipleAbuseReports({ reportIds, }: adminValidator.ReportsMultipleAbuseValidator): Promise<import("@strapi/database/dist/types").CountResult>;
|
|
9368
|
-
postComment({ id, author, content }: adminValidator.CommentPostValidatorSchema): Promise<{
|
|
9369
|
+
postComment({ id, author, content }: adminValidator.CommentPostValidatorSchema, commentRepository: CommentRepository): Promise<{
|
|
9369
9370
|
id?: number;
|
|
9370
9371
|
documentId?: string;
|
|
9371
9372
|
content?: string;
|
|
@@ -9499,7 +9500,141 @@ declare const _default: ({ strapi }: StrapiContext) => {
|
|
|
9499
9500
|
author?: any;
|
|
9500
9501
|
};
|
|
9501
9502
|
}>;
|
|
9502
|
-
|
|
9503
|
+
postCommentThread({ id, author, content }: adminValidator.CommentPostValidatorSchema, commentRepository: CommentRepository): Promise<{
|
|
9504
|
+
id?: number;
|
|
9505
|
+
documentId?: string;
|
|
9506
|
+
content?: string;
|
|
9507
|
+
blocked?: boolean;
|
|
9508
|
+
blockedThread?: boolean;
|
|
9509
|
+
blockReason?: string;
|
|
9510
|
+
isAdminComment?: boolean;
|
|
9511
|
+
removed?: boolean;
|
|
9512
|
+
approvalStatus?: string;
|
|
9513
|
+
related?: string;
|
|
9514
|
+
createdAt?: string;
|
|
9515
|
+
updatedAt?: string;
|
|
9516
|
+
publishedAt?: string;
|
|
9517
|
+
authorId?: string;
|
|
9518
|
+
authorName?: string;
|
|
9519
|
+
authorEmail?: string;
|
|
9520
|
+
authorAvatar?: string;
|
|
9521
|
+
authorUser?: string | {
|
|
9522
|
+
id?: number;
|
|
9523
|
+
username?: string;
|
|
9524
|
+
email?: string;
|
|
9525
|
+
avatar?: {
|
|
9526
|
+
url?: string;
|
|
9527
|
+
name?: string;
|
|
9528
|
+
hash?: string;
|
|
9529
|
+
id?: number;
|
|
9530
|
+
formats?: {
|
|
9531
|
+
small?: {
|
|
9532
|
+
url?: string;
|
|
9533
|
+
name?: string;
|
|
9534
|
+
hash?: string;
|
|
9535
|
+
};
|
|
9536
|
+
thumbnail?: {
|
|
9537
|
+
url?: string;
|
|
9538
|
+
name?: string;
|
|
9539
|
+
hash?: string;
|
|
9540
|
+
};
|
|
9541
|
+
medium?: {
|
|
9542
|
+
url?: string;
|
|
9543
|
+
name?: string;
|
|
9544
|
+
hash?: string;
|
|
9545
|
+
};
|
|
9546
|
+
large?: {
|
|
9547
|
+
url?: string;
|
|
9548
|
+
name?: string;
|
|
9549
|
+
hash?: string;
|
|
9550
|
+
};
|
|
9551
|
+
};
|
|
9552
|
+
};
|
|
9553
|
+
};
|
|
9554
|
+
locale?: string;
|
|
9555
|
+
gotThread?: boolean;
|
|
9556
|
+
threadFirstItemId?: number;
|
|
9557
|
+
reports?: {
|
|
9558
|
+
id?: number;
|
|
9559
|
+
documentId?: string;
|
|
9560
|
+
content?: string;
|
|
9561
|
+
createdAt?: string;
|
|
9562
|
+
updatedAt?: string;
|
|
9563
|
+
publishedAt?: string;
|
|
9564
|
+
locale?: string;
|
|
9565
|
+
reason?: string;
|
|
9566
|
+
resolved?: boolean;
|
|
9567
|
+
}[];
|
|
9568
|
+
author?: any;
|
|
9569
|
+
threadOf?: number | {
|
|
9570
|
+
id?: number;
|
|
9571
|
+
documentId?: string;
|
|
9572
|
+
content?: string;
|
|
9573
|
+
blocked?: boolean;
|
|
9574
|
+
blockedThread?: boolean;
|
|
9575
|
+
blockReason?: string;
|
|
9576
|
+
isAdminComment?: boolean;
|
|
9577
|
+
removed?: boolean;
|
|
9578
|
+
approvalStatus?: string;
|
|
9579
|
+
related?: string;
|
|
9580
|
+
createdAt?: string;
|
|
9581
|
+
updatedAt?: string;
|
|
9582
|
+
publishedAt?: string;
|
|
9583
|
+
authorId?: string;
|
|
9584
|
+
authorName?: string;
|
|
9585
|
+
authorEmail?: string;
|
|
9586
|
+
authorAvatar?: string;
|
|
9587
|
+
authorUser?: string | {
|
|
9588
|
+
id?: number;
|
|
9589
|
+
username?: string;
|
|
9590
|
+
email?: string;
|
|
9591
|
+
avatar?: {
|
|
9592
|
+
url?: string;
|
|
9593
|
+
name?: string;
|
|
9594
|
+
hash?: string;
|
|
9595
|
+
id?: number;
|
|
9596
|
+
formats?: {
|
|
9597
|
+
small?: {
|
|
9598
|
+
url?: string;
|
|
9599
|
+
name?: string;
|
|
9600
|
+
hash?: string;
|
|
9601
|
+
};
|
|
9602
|
+
thumbnail?: {
|
|
9603
|
+
url?: string;
|
|
9604
|
+
name?: string;
|
|
9605
|
+
hash?: string;
|
|
9606
|
+
};
|
|
9607
|
+
medium?: {
|
|
9608
|
+
url?: string;
|
|
9609
|
+
name?: string;
|
|
9610
|
+
hash?: string;
|
|
9611
|
+
};
|
|
9612
|
+
large?: {
|
|
9613
|
+
url?: string;
|
|
9614
|
+
name?: string;
|
|
9615
|
+
hash?: string;
|
|
9616
|
+
};
|
|
9617
|
+
};
|
|
9618
|
+
};
|
|
9619
|
+
};
|
|
9620
|
+
locale?: string;
|
|
9621
|
+
gotThread?: boolean;
|
|
9622
|
+
threadFirstItemId?: number;
|
|
9623
|
+
reports?: {
|
|
9624
|
+
id?: number;
|
|
9625
|
+
documentId?: string;
|
|
9626
|
+
content?: string;
|
|
9627
|
+
createdAt?: string;
|
|
9628
|
+
updatedAt?: string;
|
|
9629
|
+
publishedAt?: string;
|
|
9630
|
+
locale?: string;
|
|
9631
|
+
reason?: string;
|
|
9632
|
+
resolved?: boolean;
|
|
9633
|
+
}[];
|
|
9634
|
+
author?: any;
|
|
9635
|
+
};
|
|
9636
|
+
}>;
|
|
9637
|
+
updateComment({ id, content }: adminValidator.UpdateCommentValidatorSchema, commentRepository: CommentRepository): Promise<{
|
|
9503
9638
|
id?: number;
|
|
9504
9639
|
documentId?: string;
|
|
9505
9640
|
content?: string;
|