strapi-plugin-comments 3.0.0-beta.0 → 3.0.0-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/README.md +6 -5
- package/dist/_chunks/{index-h-TB6Qu2.mjs → index-BBcsmSTs.mjs} +6976 -6733
- package/dist/_chunks/{index-CTjupB9v.js → index-BFPteXuP.js} +2 -2
- package/dist/_chunks/{index-B6Q4U8YQ.js → index-BXEk5PWx.js} +9 -5
- package/dist/_chunks/{index-BVj8EXjI.js → index-Bcck91A8.js} +5 -10
- package/dist/_chunks/{index-fAgatqD0.js → index-CY_AVWS-.js} +6987 -6744
- package/dist/_chunks/{index-fSb-gYwg.mjs → index-D3iNqWZT.mjs} +2 -2
- package/dist/_chunks/{index-Bpbf7RON.mjs → index-D9MOkoQ2.mjs} +9 -5
- package/dist/_chunks/{index-BQERo8pN.mjs → index-DJ32APz-.mjs} +5 -10
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/api/client.d.ts +3 -2
- package/dist/admin/src/api/schemas.d.ts +22 -8
- package/dist/admin/src/contexts/UserContext.d.ts +1 -1
- package/dist/admin/src/hooks/useAPI.d.ts +4 -3
- package/dist/admin/src/hooks/useCommentMutations.d.ts +1 -1
- package/dist/admin/src/hooks/useCommentsAll.d.ts +1 -0
- package/dist/admin/src/hooks/useUserContext.d.ts +1 -1
- package/dist/admin/src/pages/Settings/hooks/useSettingsAPI.d.ts +1 -1
- package/dist/server/index.js +9245 -2459
- package/dist/server/index.mjs +9245 -2459
- package/dist/server/src/config/index.d.ts +22 -0
- package/dist/server/src/controllers/admin.controller.d.ts +3 -1
- package/dist/server/src/controllers/client.controller.d.ts +36 -2
- package/dist/server/src/controllers/index.d.ts +213 -115
- package/dist/server/src/controllers/settings.controller.d.ts +25 -1
- package/dist/server/src/controllers/utils/parsers.d.ts +4 -1
- package/dist/server/src/graphql/getResolversConfig.d.ts +21 -0
- package/dist/server/src/graphql/index.d.ts +2 -0
- package/dist/server/src/graphql/mutations/getCreateAbuseReport.d.ts +89 -0
- package/dist/server/src/graphql/mutations/getCreateComment.d.ts +78 -0
- package/dist/server/src/graphql/mutations/getRemoveComment.d.ts +78 -0
- package/dist/server/src/graphql/mutations/getUpdateComment.d.ts +78 -0
- package/dist/server/src/graphql/mutations/index.d.ts +3 -0
- package/dist/server/src/graphql/queries/findAllFlat.d.ts +165 -0
- package/dist/server/src/graphql/queries/findAllInHierarchy.d.ts +81 -0
- package/dist/server/src/graphql/queries/findAllPerAuthor.d.ts +164 -0
- package/dist/server/src/graphql/queries/index.d.ts +3 -0
- package/dist/server/src/graphql/types/getComment.d.ts +2 -0
- package/dist/server/src/graphql/types/getCommentAuthor.d.ts +2 -0
- package/dist/server/src/graphql/types/getCommentAuthorType.d.ts +2 -0
- package/dist/server/src/graphql/types/getCommentNested.d.ts +2 -0
- package/dist/server/src/graphql/types/getCreateComment.d.ts +2 -0
- package/dist/server/src/graphql/types/getCreateCommentAuthor.d.ts +2 -0
- package/dist/server/src/graphql/types/getCreateReport.d.ts +2 -0
- package/dist/server/src/graphql/types/getId.d.ts +2 -0
- package/dist/server/src/graphql/types/getIdentityAuthor.d.ts +2 -0
- package/dist/server/src/graphql/types/getRemoveComment.d.ts +2 -0
- package/dist/server/src/graphql/types/getReport.d.ts +2 -0
- package/dist/server/src/graphql/types/getReportReason.d.ts +3 -0
- package/dist/server/src/graphql/types/getResponseFindAll.d.ts +2 -0
- package/dist/server/src/graphql/types/getResponseFindAllPerAuthor.d.ts +2 -0
- package/dist/server/src/graphql/types/getResponseMeta.d.ts +2 -0
- package/dist/server/src/graphql/types/getResponsePagination.d.ts +2 -0
- package/dist/server/src/graphql/types/getUpdateComment.d.ts +2 -0
- package/dist/server/src/graphql/types/index.d.ts +3 -0
- package/dist/server/src/index.d.ts +771 -471
- package/dist/server/src/repositories/store.repository.d.ts +17 -2
- package/dist/server/src/services/admin/admin.service.d.ts +174 -117
- package/dist/server/src/services/client.service.d.ts +173 -118
- package/dist/server/src/services/common.service.d.ts +8 -5
- package/dist/server/src/services/gql.service.d.ts +7 -0
- package/dist/server/src/services/index.d.ts +549 -356
- package/dist/server/src/services/settings.service.d.ts +19 -1
- package/dist/server/src/services/utils/functions.d.ts +9 -3
- package/dist/server/src/utils/getConfig.d.ts +1 -1
- package/dist/server/src/utils/getPluginService.d.ts +1 -1
- package/dist/server/src/validators/api/controllers/client.controller.validator.d.ts +112 -77
- package/dist/server/src/validators/api/controllers/settings.controller.validator.d.ts +3 -3
- package/dist/server/src/validators/repositories/comment.validator.d.ts +16 -0
- package/dist/server/src/validators/utils.d.ts +1 -1
- package/package.json +7 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="koa" />
|
|
2
2
|
declare const controllers: {
|
|
3
3
|
admin: ({ strapi }: import("../@types-v5").StrapiContext) => {
|
|
4
|
-
getService<T extends "admin" | "client" | "common" | "settings">(name: T): import("../services").PluginServices[T];
|
|
4
|
+
getService<T extends "gql" | "admin" | "client" | "common" | "settings">(name: T): import("../services").PluginServices[T];
|
|
5
5
|
findAll(ctx: import("../@types-v5").RequestContext): Promise<{
|
|
6
6
|
pagination: {
|
|
7
7
|
page?: number;
|
|
@@ -21,6 +21,8 @@ declare const controllers: {
|
|
|
21
21
|
approvalStatus?: string;
|
|
22
22
|
related?: {
|
|
23
23
|
id?: number;
|
|
24
|
+
documentId?: string;
|
|
25
|
+
locale?: string;
|
|
24
26
|
uid?: string;
|
|
25
27
|
requireCommentsApproval?: boolean;
|
|
26
28
|
};
|
|
@@ -1110,9 +1112,9 @@ declare const controllers: {
|
|
|
1110
1112
|
}>;
|
|
1111
1113
|
};
|
|
1112
1114
|
client: ({ strapi }: import("../@types-v5").StrapiContext) => {
|
|
1113
|
-
getService<T_1 extends "admin" | "client" | "common" | "settings">(name: T_1): import("../services").PluginServices[T_1];
|
|
1115
|
+
getService<T_1 extends "gql" | "admin" | "client" | "common" | "settings">(name: T_1): import("../services").PluginServices[T_1];
|
|
1114
1116
|
getStoreRepository(): {
|
|
1115
|
-
getLocalConfig<P extends "enabledCollections" | "approvalFlow" | "entryLabel" | "moderatorRoles" | "badWords" | "blockedAuthorProps" | "isValidationEnabled" | "reportReasons" | "isGQLPluginEnabled">(prop?: P, defaultValue?: {
|
|
1117
|
+
getLocalConfig<P extends "enabledCollections" | "approvalFlow" | "entryLabel" | "moderatorRoles" | "badWords" | "blockedAuthorProps" | "isValidationEnabled" | "reportReasons" | "isGQLPluginEnabled" | "gql">(prop?: P, defaultValue?: {
|
|
1116
1118
|
enabledCollections?: string[];
|
|
1117
1119
|
approvalFlow?: string[];
|
|
1118
1120
|
entryLabel?: Record<string, string[]>;
|
|
@@ -1126,6 +1128,9 @@ declare const controllers: {
|
|
|
1126
1128
|
OTHER?: import("../const").REPORT_REASON.OTHER;
|
|
1127
1129
|
};
|
|
1128
1130
|
isGQLPluginEnabled?: boolean;
|
|
1131
|
+
gql?: {
|
|
1132
|
+
auth?: boolean;
|
|
1133
|
+
};
|
|
1129
1134
|
}[P]): {
|
|
1130
1135
|
enabledCollections?: string[];
|
|
1131
1136
|
approvalFlow?: string[];
|
|
@@ -1140,6 +1145,9 @@ declare const controllers: {
|
|
|
1140
1145
|
OTHER?: import("../const").REPORT_REASON.OTHER;
|
|
1141
1146
|
};
|
|
1142
1147
|
isGQLPluginEnabled?: boolean;
|
|
1148
|
+
gql?: {
|
|
1149
|
+
auth?: boolean;
|
|
1150
|
+
};
|
|
1143
1151
|
}[P];
|
|
1144
1152
|
getStore(): Promise<{
|
|
1145
1153
|
get(params?: Partial<{
|
|
@@ -1179,6 +1187,9 @@ declare const controllers: {
|
|
|
1179
1187
|
OTHER?: import("../const").REPORT_REASON.OTHER;
|
|
1180
1188
|
};
|
|
1181
1189
|
isGQLPluginEnabled?: boolean;
|
|
1190
|
+
gql?: {
|
|
1191
|
+
auth?: boolean;
|
|
1192
|
+
};
|
|
1182
1193
|
}>>;
|
|
1183
1194
|
get<T_2 extends boolean>(viaSettingsPage?: T_2): Promise<import("../utils/Either").Either<unknown, T_2 extends true ? {
|
|
1184
1195
|
enabledCollections?: string[];
|
|
@@ -1194,6 +1205,9 @@ declare const controllers: {
|
|
|
1194
1205
|
OTHER?: import("../const").REPORT_REASON.OTHER;
|
|
1195
1206
|
};
|
|
1196
1207
|
isGQLPluginEnabled?: boolean;
|
|
1208
|
+
gql?: {
|
|
1209
|
+
auth?: boolean;
|
|
1210
|
+
};
|
|
1197
1211
|
} : Omit<{
|
|
1198
1212
|
enabledCollections?: string[];
|
|
1199
1213
|
approvalFlow?: string[];
|
|
@@ -1208,6 +1222,9 @@ declare const controllers: {
|
|
|
1208
1222
|
OTHER?: import("../const").REPORT_REASON.OTHER;
|
|
1209
1223
|
};
|
|
1210
1224
|
isGQLPluginEnabled?: boolean;
|
|
1225
|
+
gql?: {
|
|
1226
|
+
auth?: boolean;
|
|
1227
|
+
};
|
|
1211
1228
|
}, "enabledCollections" | "moderatorRoles" | "isGQLPluginEnabled">>>;
|
|
1212
1229
|
update(config: {
|
|
1213
1230
|
enabledCollections?: string[];
|
|
@@ -1223,6 +1240,9 @@ declare const controllers: {
|
|
|
1223
1240
|
OTHER?: import("../const").REPORT_REASON.OTHER;
|
|
1224
1241
|
};
|
|
1225
1242
|
isGQLPluginEnabled?: boolean;
|
|
1243
|
+
gql?: {
|
|
1244
|
+
auth?: boolean;
|
|
1245
|
+
};
|
|
1226
1246
|
}): Promise<import("../utils/Either").Either<unknown, {
|
|
1227
1247
|
enabledCollections?: string[];
|
|
1228
1248
|
approvalFlow?: string[];
|
|
@@ -1237,6 +1257,9 @@ declare const controllers: {
|
|
|
1237
1257
|
OTHER?: import("../const").REPORT_REASON.OTHER;
|
|
1238
1258
|
};
|
|
1239
1259
|
isGQLPluginEnabled?: boolean;
|
|
1260
|
+
gql?: {
|
|
1261
|
+
auth?: boolean;
|
|
1262
|
+
};
|
|
1240
1263
|
} | Omit<{
|
|
1241
1264
|
enabledCollections?: string[];
|
|
1242
1265
|
approvalFlow?: string[];
|
|
@@ -1251,6 +1274,9 @@ declare const controllers: {
|
|
|
1251
1274
|
OTHER?: import("../const").REPORT_REASON.OTHER;
|
|
1252
1275
|
};
|
|
1253
1276
|
isGQLPluginEnabled?: boolean;
|
|
1277
|
+
gql?: {
|
|
1278
|
+
auth?: boolean;
|
|
1279
|
+
};
|
|
1254
1280
|
}, "enabledCollections" | "moderatorRoles" | "isGQLPluginEnabled">>>;
|
|
1255
1281
|
restore(): Promise<import("../utils/Either").Either<unknown, {
|
|
1256
1282
|
enabledCollections?: string[];
|
|
@@ -1266,6 +1292,9 @@ declare const controllers: {
|
|
|
1266
1292
|
OTHER?: import("../const").REPORT_REASON.OTHER;
|
|
1267
1293
|
};
|
|
1268
1294
|
isGQLPluginEnabled?: boolean;
|
|
1295
|
+
gql?: {
|
|
1296
|
+
auth?: boolean;
|
|
1297
|
+
};
|
|
1269
1298
|
} | Omit<{
|
|
1270
1299
|
enabledCollections?: string[];
|
|
1271
1300
|
approvalFlow?: string[];
|
|
@@ -1280,11 +1309,15 @@ declare const controllers: {
|
|
|
1280
1309
|
OTHER?: import("../const").REPORT_REASON.OTHER;
|
|
1281
1310
|
};
|
|
1282
1311
|
isGQLPluginEnabled?: boolean;
|
|
1312
|
+
gql?: {
|
|
1313
|
+
auth?: boolean;
|
|
1314
|
+
};
|
|
1283
1315
|
}, "enabledCollections" | "moderatorRoles" | "isGQLPluginEnabled">>>;
|
|
1284
1316
|
};
|
|
1285
1317
|
post(ctx: import("../@types-v5").RequestContext<object, Pick<{
|
|
1286
1318
|
content?: string;
|
|
1287
1319
|
approvalStatus?: import("../const").APPROVAL_STATUS;
|
|
1320
|
+
locale?: string;
|
|
1288
1321
|
author?: {
|
|
1289
1322
|
name?: string;
|
|
1290
1323
|
id?: number;
|
|
@@ -1292,7 +1325,7 @@ declare const controllers: {
|
|
|
1292
1325
|
avatar?: string;
|
|
1293
1326
|
};
|
|
1294
1327
|
threadOf?: number;
|
|
1295
|
-
relation?: `{${string}::${string}.${
|
|
1328
|
+
relation?: `{${string}::${string}.${string}}`;
|
|
1296
1329
|
}, "relation">>): Promise<{
|
|
1297
1330
|
id?: number;
|
|
1298
1331
|
documentId?: string;
|
|
@@ -1364,43 +1397,19 @@ declare const controllers: {
|
|
|
1364
1397
|
};
|
|
1365
1398
|
}>;
|
|
1366
1399
|
findAllFlat(ctx: import("../@types-v5").RequestContext<object, Pick<{
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
} | {
|
|
1381
|
-
$lt?: string;
|
|
1382
|
-
} | {
|
|
1383
|
-
$lte?: string;
|
|
1384
|
-
} | {
|
|
1385
|
-
$startsWith?: string;
|
|
1386
|
-
} | {
|
|
1387
|
-
$startsWithi?: string;
|
|
1388
|
-
} | {
|
|
1389
|
-
$endsWith?: string;
|
|
1390
|
-
} | {
|
|
1391
|
-
$endsWithi?: string;
|
|
1392
|
-
} | {
|
|
1393
|
-
$contains?: string;
|
|
1394
|
-
} | {
|
|
1395
|
-
$containsi?: string;
|
|
1396
|
-
} | {
|
|
1397
|
-
$notContains?: string;
|
|
1398
|
-
} | {
|
|
1399
|
-
$notContainsi?: string;
|
|
1400
|
-
} | {
|
|
1401
|
-
$notNull?: boolean;
|
|
1402
|
-
}>[];
|
|
1403
|
-
$or?: Record<string, string | number | {
|
|
1400
|
+
sort?: string;
|
|
1401
|
+
locale?: string;
|
|
1402
|
+
pagination?: {
|
|
1403
|
+
page?: number;
|
|
1404
|
+
pageSize?: number;
|
|
1405
|
+
withCount?: boolean;
|
|
1406
|
+
};
|
|
1407
|
+
relation?: `{${string}::${string}.${string}}`;
|
|
1408
|
+
populate?: Record<string, boolean | {
|
|
1409
|
+
populate?: boolean;
|
|
1410
|
+
}>;
|
|
1411
|
+
filters?: {
|
|
1412
|
+
id?: string | number | {
|
|
1404
1413
|
$eq?: string;
|
|
1405
1414
|
} | {
|
|
1406
1415
|
$eqi?: string;
|
|
@@ -1434,10 +1443,7 @@ declare const controllers: {
|
|
|
1434
1443
|
$notContainsi?: string;
|
|
1435
1444
|
} | {
|
|
1436
1445
|
$notNull?: boolean;
|
|
1437
|
-
}
|
|
1438
|
-
} | Record<string, string | number | boolean | Record<string, string | number | boolean>>;
|
|
1439
|
-
sort?: string;
|
|
1440
|
-
filter?: {
|
|
1446
|
+
};
|
|
1441
1447
|
content?: string | number | {
|
|
1442
1448
|
$eq?: string;
|
|
1443
1449
|
} | {
|
|
@@ -1579,15 +1585,6 @@ declare const controllers: {
|
|
|
1579
1585
|
$notNull?: boolean;
|
|
1580
1586
|
};
|
|
1581
1587
|
};
|
|
1582
|
-
pagination?: {
|
|
1583
|
-
page?: number;
|
|
1584
|
-
pageSize?: number;
|
|
1585
|
-
withCount?: boolean;
|
|
1586
|
-
};
|
|
1587
|
-
relation?: `{${string}::${string}.${number}}`;
|
|
1588
|
-
populate?: Record<string, boolean | {
|
|
1589
|
-
populate?: boolean;
|
|
1590
|
-
}>;
|
|
1591
1588
|
limit?: number;
|
|
1592
1589
|
fields?: string[];
|
|
1593
1590
|
omit?: string[];
|
|
@@ -1675,6 +1672,8 @@ declare const controllers: {
|
|
|
1675
1672
|
approvalStatus?: string;
|
|
1676
1673
|
related?: {
|
|
1677
1674
|
id?: number;
|
|
1675
|
+
documentId?: string;
|
|
1676
|
+
locale?: string;
|
|
1678
1677
|
uid?: string;
|
|
1679
1678
|
requireCommentsApproval?: boolean;
|
|
1680
1679
|
};
|
|
@@ -1745,43 +1744,14 @@ declare const controllers: {
|
|
|
1745
1744
|
};
|
|
1746
1745
|
}>;
|
|
1747
1746
|
findAllInHierarchy(ctx: import("../@types-v5").RequestContext<object, Pick<{
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
$nei?: string;
|
|
1757
|
-
} | {
|
|
1758
|
-
$gt?: string;
|
|
1759
|
-
} | {
|
|
1760
|
-
$gte?: string;
|
|
1761
|
-
} | {
|
|
1762
|
-
$lt?: string;
|
|
1763
|
-
} | {
|
|
1764
|
-
$lte?: string;
|
|
1765
|
-
} | {
|
|
1766
|
-
$startsWith?: string;
|
|
1767
|
-
} | {
|
|
1768
|
-
$startsWithi?: string;
|
|
1769
|
-
} | {
|
|
1770
|
-
$endsWith?: string;
|
|
1771
|
-
} | {
|
|
1772
|
-
$endsWithi?: string;
|
|
1773
|
-
} | {
|
|
1774
|
-
$contains?: string;
|
|
1775
|
-
} | {
|
|
1776
|
-
$containsi?: string;
|
|
1777
|
-
} | {
|
|
1778
|
-
$notContains?: string;
|
|
1779
|
-
} | {
|
|
1780
|
-
$notContainsi?: string;
|
|
1781
|
-
} | {
|
|
1782
|
-
$notNull?: boolean;
|
|
1783
|
-
}>[];
|
|
1784
|
-
$or?: Record<string, string | number | {
|
|
1747
|
+
sort?: string;
|
|
1748
|
+
locale?: string;
|
|
1749
|
+
relation?: `{${string}::${string}.${string}}`;
|
|
1750
|
+
populate?: Record<string, boolean | {
|
|
1751
|
+
populate?: boolean;
|
|
1752
|
+
}>;
|
|
1753
|
+
filters?: {
|
|
1754
|
+
id?: string | number | {
|
|
1785
1755
|
$eq?: string;
|
|
1786
1756
|
} | {
|
|
1787
1757
|
$eqi?: string;
|
|
@@ -1815,10 +1785,7 @@ declare const controllers: {
|
|
|
1815
1785
|
$notContainsi?: string;
|
|
1816
1786
|
} | {
|
|
1817
1787
|
$notNull?: boolean;
|
|
1818
|
-
}
|
|
1819
|
-
} | Record<string, string | number | boolean | Record<string, string | number | boolean>>;
|
|
1820
|
-
sort?: string;
|
|
1821
|
-
filter?: {
|
|
1788
|
+
};
|
|
1822
1789
|
content?: string | number | {
|
|
1823
1790
|
$eq?: string;
|
|
1824
1791
|
} | {
|
|
@@ -1960,10 +1927,6 @@ declare const controllers: {
|
|
|
1960
1927
|
$notNull?: boolean;
|
|
1961
1928
|
};
|
|
1962
1929
|
};
|
|
1963
|
-
relation?: `{${string}::${string}.${number}}`;
|
|
1964
|
-
populate?: Record<string, boolean | {
|
|
1965
|
-
populate?: boolean;
|
|
1966
|
-
}>;
|
|
1967
1930
|
limit?: number;
|
|
1968
1931
|
fields?: string[];
|
|
1969
1932
|
omit?: string[];
|
|
@@ -2042,8 +2005,20 @@ declare const controllers: {
|
|
|
2042
2005
|
};
|
|
2043
2006
|
}[]>;
|
|
2044
2007
|
findAllPerAuthor(ctx: import("../@types-v5").RequestContext<object, Pick<{
|
|
2045
|
-
|
|
2046
|
-
|
|
2008
|
+
type?: string;
|
|
2009
|
+
sort?: string;
|
|
2010
|
+
authorId?: string | number;
|
|
2011
|
+
locale?: string;
|
|
2012
|
+
pagination?: {
|
|
2013
|
+
page?: number;
|
|
2014
|
+
pageSize?: number;
|
|
2015
|
+
withCount?: boolean;
|
|
2016
|
+
};
|
|
2017
|
+
populate?: Record<string, boolean | {
|
|
2018
|
+
populate?: boolean;
|
|
2019
|
+
}>;
|
|
2020
|
+
filters?: {
|
|
2021
|
+
id?: string | number | {
|
|
2047
2022
|
$eq?: string;
|
|
2048
2023
|
} | {
|
|
2049
2024
|
$eqi?: string;
|
|
@@ -2077,8 +2052,8 @@ declare const controllers: {
|
|
|
2077
2052
|
$notContainsi?: string;
|
|
2078
2053
|
} | {
|
|
2079
2054
|
$notNull?: boolean;
|
|
2080
|
-
}
|
|
2081
|
-
|
|
2055
|
+
};
|
|
2056
|
+
content?: string | number | {
|
|
2082
2057
|
$eq?: string;
|
|
2083
2058
|
} | {
|
|
2084
2059
|
$eqi?: string;
|
|
@@ -2112,19 +2087,113 @@ declare const controllers: {
|
|
|
2112
2087
|
$notContainsi?: string;
|
|
2113
2088
|
} | {
|
|
2114
2089
|
$notNull?: boolean;
|
|
2115
|
-
}
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2090
|
+
};
|
|
2091
|
+
createdAt?: string | number | {
|
|
2092
|
+
$eq?: string;
|
|
2093
|
+
} | {
|
|
2094
|
+
$eqi?: string;
|
|
2095
|
+
} | {
|
|
2096
|
+
$ne?: string;
|
|
2097
|
+
} | {
|
|
2098
|
+
$nei?: string;
|
|
2099
|
+
} | {
|
|
2100
|
+
$gt?: string;
|
|
2101
|
+
} | {
|
|
2102
|
+
$gte?: string;
|
|
2103
|
+
} | {
|
|
2104
|
+
$lt?: string;
|
|
2105
|
+
} | {
|
|
2106
|
+
$lte?: string;
|
|
2107
|
+
} | {
|
|
2108
|
+
$startsWith?: string;
|
|
2109
|
+
} | {
|
|
2110
|
+
$startsWithi?: string;
|
|
2111
|
+
} | {
|
|
2112
|
+
$endsWith?: string;
|
|
2113
|
+
} | {
|
|
2114
|
+
$endsWithi?: string;
|
|
2115
|
+
} | {
|
|
2116
|
+
$contains?: string;
|
|
2117
|
+
} | {
|
|
2118
|
+
$containsi?: string;
|
|
2119
|
+
} | {
|
|
2120
|
+
$notContains?: string;
|
|
2121
|
+
} | {
|
|
2122
|
+
$notContainsi?: string;
|
|
2123
|
+
} | {
|
|
2124
|
+
$notNull?: boolean;
|
|
2125
|
+
};
|
|
2126
|
+
updatedAt?: string | number | {
|
|
2127
|
+
$eq?: string;
|
|
2128
|
+
} | {
|
|
2129
|
+
$eqi?: string;
|
|
2130
|
+
} | {
|
|
2131
|
+
$ne?: string;
|
|
2132
|
+
} | {
|
|
2133
|
+
$nei?: string;
|
|
2134
|
+
} | {
|
|
2135
|
+
$gt?: string;
|
|
2136
|
+
} | {
|
|
2137
|
+
$gte?: string;
|
|
2138
|
+
} | {
|
|
2139
|
+
$lt?: string;
|
|
2140
|
+
} | {
|
|
2141
|
+
$lte?: string;
|
|
2142
|
+
} | {
|
|
2143
|
+
$startsWith?: string;
|
|
2144
|
+
} | {
|
|
2145
|
+
$startsWithi?: string;
|
|
2146
|
+
} | {
|
|
2147
|
+
$endsWith?: string;
|
|
2148
|
+
} | {
|
|
2149
|
+
$endsWithi?: string;
|
|
2150
|
+
} | {
|
|
2151
|
+
$contains?: string;
|
|
2152
|
+
} | {
|
|
2153
|
+
$containsi?: string;
|
|
2154
|
+
} | {
|
|
2155
|
+
$notContains?: string;
|
|
2156
|
+
} | {
|
|
2157
|
+
$notContainsi?: string;
|
|
2158
|
+
} | {
|
|
2159
|
+
$notNull?: boolean;
|
|
2160
|
+
};
|
|
2161
|
+
authorName?: string | number | {
|
|
2162
|
+
$eq?: string;
|
|
2163
|
+
} | {
|
|
2164
|
+
$eqi?: string;
|
|
2165
|
+
} | {
|
|
2166
|
+
$ne?: string;
|
|
2167
|
+
} | {
|
|
2168
|
+
$nei?: string;
|
|
2169
|
+
} | {
|
|
2170
|
+
$gt?: string;
|
|
2171
|
+
} | {
|
|
2172
|
+
$gte?: string;
|
|
2173
|
+
} | {
|
|
2174
|
+
$lt?: string;
|
|
2175
|
+
} | {
|
|
2176
|
+
$lte?: string;
|
|
2177
|
+
} | {
|
|
2178
|
+
$startsWith?: string;
|
|
2179
|
+
} | {
|
|
2180
|
+
$startsWithi?: string;
|
|
2181
|
+
} | {
|
|
2182
|
+
$endsWith?: string;
|
|
2183
|
+
} | {
|
|
2184
|
+
$endsWithi?: string;
|
|
2185
|
+
} | {
|
|
2186
|
+
$contains?: string;
|
|
2187
|
+
} | {
|
|
2188
|
+
$containsi?: string;
|
|
2189
|
+
} | {
|
|
2190
|
+
$notContains?: string;
|
|
2191
|
+
} | {
|
|
2192
|
+
$notContainsi?: string;
|
|
2193
|
+
} | {
|
|
2194
|
+
$notNull?: boolean;
|
|
2195
|
+
};
|
|
2124
2196
|
};
|
|
2125
|
-
populate?: Record<string, boolean | {
|
|
2126
|
-
populate?: boolean;
|
|
2127
|
-
}>;
|
|
2128
2197
|
limit?: number;
|
|
2129
2198
|
fields?: string[];
|
|
2130
2199
|
omit?: string[];
|
|
@@ -2211,6 +2280,8 @@ declare const controllers: {
|
|
|
2211
2280
|
approvalStatus?: string;
|
|
2212
2281
|
related?: {
|
|
2213
2282
|
id?: number;
|
|
2283
|
+
documentId?: string;
|
|
2284
|
+
locale?: string;
|
|
2214
2285
|
uid?: string;
|
|
2215
2286
|
requireCommentsApproval?: boolean;
|
|
2216
2287
|
};
|
|
@@ -2516,6 +2587,9 @@ declare const controllers: {
|
|
|
2516
2587
|
OTHER?: import("../const").REPORT_REASON.OTHER;
|
|
2517
2588
|
};
|
|
2518
2589
|
isGQLPluginEnabled?: boolean;
|
|
2590
|
+
gql?: {
|
|
2591
|
+
auth?: boolean;
|
|
2592
|
+
};
|
|
2519
2593
|
} | Omit<{
|
|
2520
2594
|
enabledCollections?: string[];
|
|
2521
2595
|
approvalFlow?: string[];
|
|
@@ -2530,6 +2604,9 @@ declare const controllers: {
|
|
|
2530
2604
|
OTHER?: import("../const").REPORT_REASON.OTHER;
|
|
2531
2605
|
};
|
|
2532
2606
|
isGQLPluginEnabled?: boolean;
|
|
2607
|
+
gql?: {
|
|
2608
|
+
auth?: boolean;
|
|
2609
|
+
};
|
|
2533
2610
|
}, "enabledCollections" | "moderatorRoles" | "isGQLPluginEnabled">>;
|
|
2534
2611
|
getForSettingsPage(ctx: import("../@types-v5").RequestContext): Promise<{
|
|
2535
2612
|
enabledCollections?: string[];
|
|
@@ -2545,6 +2622,9 @@ declare const controllers: {
|
|
|
2545
2622
|
OTHER?: import("../const").REPORT_REASON.OTHER;
|
|
2546
2623
|
};
|
|
2547
2624
|
isGQLPluginEnabled?: boolean;
|
|
2625
|
+
gql?: {
|
|
2626
|
+
auth?: boolean;
|
|
2627
|
+
};
|
|
2548
2628
|
} | Omit<{
|
|
2549
2629
|
enabledCollections?: string[];
|
|
2550
2630
|
approvalFlow?: string[];
|
|
@@ -2559,6 +2639,9 @@ declare const controllers: {
|
|
|
2559
2639
|
OTHER?: import("../const").REPORT_REASON.OTHER;
|
|
2560
2640
|
};
|
|
2561
2641
|
isGQLPluginEnabled?: boolean;
|
|
2642
|
+
gql?: {
|
|
2643
|
+
auth?: boolean;
|
|
2644
|
+
};
|
|
2562
2645
|
}, "enabledCollections" | "moderatorRoles" | "isGQLPluginEnabled">>;
|
|
2563
2646
|
update(ctx: import("../@types-v5").RequestContext<{
|
|
2564
2647
|
enabledCollections?: string[];
|
|
@@ -2574,6 +2657,9 @@ declare const controllers: {
|
|
|
2574
2657
|
OTHER?: import("../const").REPORT_REASON.OTHER;
|
|
2575
2658
|
};
|
|
2576
2659
|
isGQLPluginEnabled?: boolean;
|
|
2660
|
+
gql?: {
|
|
2661
|
+
auth?: boolean;
|
|
2662
|
+
};
|
|
2577
2663
|
}>): Promise<{
|
|
2578
2664
|
enabledCollections?: string[];
|
|
2579
2665
|
approvalFlow?: string[];
|
|
@@ -2588,6 +2674,9 @@ declare const controllers: {
|
|
|
2588
2674
|
OTHER?: import("../const").REPORT_REASON.OTHER;
|
|
2589
2675
|
};
|
|
2590
2676
|
isGQLPluginEnabled?: boolean;
|
|
2677
|
+
gql?: {
|
|
2678
|
+
auth?: boolean;
|
|
2679
|
+
};
|
|
2591
2680
|
} | Omit<{
|
|
2592
2681
|
enabledCollections?: string[];
|
|
2593
2682
|
approvalFlow?: string[];
|
|
@@ -2602,6 +2691,9 @@ declare const controllers: {
|
|
|
2602
2691
|
OTHER?: import("../const").REPORT_REASON.OTHER;
|
|
2603
2692
|
};
|
|
2604
2693
|
isGQLPluginEnabled?: boolean;
|
|
2694
|
+
gql?: {
|
|
2695
|
+
auth?: boolean;
|
|
2696
|
+
};
|
|
2605
2697
|
}, "enabledCollections" | "moderatorRoles" | "isGQLPluginEnabled">>;
|
|
2606
2698
|
restore(ctx: import("../@types-v5").RequestContext): Promise<{
|
|
2607
2699
|
enabledCollections?: string[];
|
|
@@ -2617,6 +2709,9 @@ declare const controllers: {
|
|
|
2617
2709
|
OTHER?: import("../const").REPORT_REASON.OTHER;
|
|
2618
2710
|
};
|
|
2619
2711
|
isGQLPluginEnabled?: boolean;
|
|
2712
|
+
gql?: {
|
|
2713
|
+
auth?: boolean;
|
|
2714
|
+
};
|
|
2620
2715
|
} | Omit<{
|
|
2621
2716
|
enabledCollections?: string[];
|
|
2622
2717
|
approvalFlow?: string[];
|
|
@@ -2631,6 +2726,9 @@ declare const controllers: {
|
|
|
2631
2726
|
OTHER?: import("../const").REPORT_REASON.OTHER;
|
|
2632
2727
|
};
|
|
2633
2728
|
isGQLPluginEnabled?: boolean;
|
|
2729
|
+
gql?: {
|
|
2730
|
+
auth?: boolean;
|
|
2731
|
+
};
|
|
2634
2732
|
}, "enabledCollections" | "moderatorRoles" | "isGQLPluginEnabled">>;
|
|
2635
2733
|
restart(ctx: import("../@types-v5").RequestContext): Promise<any>;
|
|
2636
2734
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RequestContext, StrapiContext } from '../@types-v5';
|
|
2
|
-
import { CommentsPluginConfig } from '../
|
|
2
|
+
import { CommentsPluginConfig } from '../config';
|
|
3
3
|
declare const settingsController: ({ strapi }: StrapiContext) => {
|
|
4
4
|
get(ctx: RequestContext): Promise<{
|
|
5
5
|
enabledCollections?: string[];
|
|
@@ -15,6 +15,9 @@ declare const settingsController: ({ strapi }: StrapiContext) => {
|
|
|
15
15
|
OTHER?: import("../const").REPORT_REASON.OTHER;
|
|
16
16
|
};
|
|
17
17
|
isGQLPluginEnabled?: boolean;
|
|
18
|
+
gql?: {
|
|
19
|
+
auth?: boolean;
|
|
20
|
+
};
|
|
18
21
|
} | Omit<{
|
|
19
22
|
enabledCollections?: string[];
|
|
20
23
|
approvalFlow?: string[];
|
|
@@ -29,6 +32,9 @@ declare const settingsController: ({ strapi }: StrapiContext) => {
|
|
|
29
32
|
OTHER?: import("../const").REPORT_REASON.OTHER;
|
|
30
33
|
};
|
|
31
34
|
isGQLPluginEnabled?: boolean;
|
|
35
|
+
gql?: {
|
|
36
|
+
auth?: boolean;
|
|
37
|
+
};
|
|
32
38
|
}, "enabledCollections" | "moderatorRoles" | "isGQLPluginEnabled">>;
|
|
33
39
|
getForSettingsPage(ctx: RequestContext): Promise<{
|
|
34
40
|
enabledCollections?: string[];
|
|
@@ -44,6 +50,9 @@ declare const settingsController: ({ strapi }: StrapiContext) => {
|
|
|
44
50
|
OTHER?: import("../const").REPORT_REASON.OTHER;
|
|
45
51
|
};
|
|
46
52
|
isGQLPluginEnabled?: boolean;
|
|
53
|
+
gql?: {
|
|
54
|
+
auth?: boolean;
|
|
55
|
+
};
|
|
47
56
|
} | Omit<{
|
|
48
57
|
enabledCollections?: string[];
|
|
49
58
|
approvalFlow?: string[];
|
|
@@ -58,6 +67,9 @@ declare const settingsController: ({ strapi }: StrapiContext) => {
|
|
|
58
67
|
OTHER?: import("../const").REPORT_REASON.OTHER;
|
|
59
68
|
};
|
|
60
69
|
isGQLPluginEnabled?: boolean;
|
|
70
|
+
gql?: {
|
|
71
|
+
auth?: boolean;
|
|
72
|
+
};
|
|
61
73
|
}, "enabledCollections" | "moderatorRoles" | "isGQLPluginEnabled">>;
|
|
62
74
|
update(ctx: RequestContext<CommentsPluginConfig>): Promise<{
|
|
63
75
|
enabledCollections?: string[];
|
|
@@ -73,6 +85,9 @@ declare const settingsController: ({ strapi }: StrapiContext) => {
|
|
|
73
85
|
OTHER?: import("../const").REPORT_REASON.OTHER;
|
|
74
86
|
};
|
|
75
87
|
isGQLPluginEnabled?: boolean;
|
|
88
|
+
gql?: {
|
|
89
|
+
auth?: boolean;
|
|
90
|
+
};
|
|
76
91
|
} | Omit<{
|
|
77
92
|
enabledCollections?: string[];
|
|
78
93
|
approvalFlow?: string[];
|
|
@@ -87,6 +102,9 @@ declare const settingsController: ({ strapi }: StrapiContext) => {
|
|
|
87
102
|
OTHER?: import("../const").REPORT_REASON.OTHER;
|
|
88
103
|
};
|
|
89
104
|
isGQLPluginEnabled?: boolean;
|
|
105
|
+
gql?: {
|
|
106
|
+
auth?: boolean;
|
|
107
|
+
};
|
|
90
108
|
}, "enabledCollections" | "moderatorRoles" | "isGQLPluginEnabled">>;
|
|
91
109
|
restore(ctx: RequestContext): Promise<{
|
|
92
110
|
enabledCollections?: string[];
|
|
@@ -102,6 +120,9 @@ declare const settingsController: ({ strapi }: StrapiContext) => {
|
|
|
102
120
|
OTHER?: import("../const").REPORT_REASON.OTHER;
|
|
103
121
|
};
|
|
104
122
|
isGQLPluginEnabled?: boolean;
|
|
123
|
+
gql?: {
|
|
124
|
+
auth?: boolean;
|
|
125
|
+
};
|
|
105
126
|
} | Omit<{
|
|
106
127
|
enabledCollections?: string[];
|
|
107
128
|
approvalFlow?: string[];
|
|
@@ -116,6 +137,9 @@ declare const settingsController: ({ strapi }: StrapiContext) => {
|
|
|
116
137
|
OTHER?: import("../const").REPORT_REASON.OTHER;
|
|
117
138
|
};
|
|
118
139
|
isGQLPluginEnabled?: boolean;
|
|
140
|
+
gql?: {
|
|
141
|
+
auth?: boolean;
|
|
142
|
+
};
|
|
119
143
|
}, "enabledCollections" | "moderatorRoles" | "isGQLPluginEnabled">>;
|
|
120
144
|
restart(ctx: RequestContext): Promise<any>;
|
|
121
145
|
};
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { client } from '../../validators/api';
|
|
2
|
+
type FlatInputParams = client.FindAllFlatSchema | client.FindAllInHierarchyValidatorSchema | client.FindAllPerAuthorValidatorSchema;
|
|
3
|
+
export declare const flatInput: <T extends FlatInputParams>(payload: T) => T;
|
|
4
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CommentsPluginConfig } from '../config';
|
|
2
|
+
export declare const getResolversConfig: (config: CommentsPluginConfig) => {
|
|
3
|
+
'Query.findAllFlat': {
|
|
4
|
+
auth: boolean;
|
|
5
|
+
};
|
|
6
|
+
'Query.findAllInHierarchy': {
|
|
7
|
+
auth: boolean;
|
|
8
|
+
};
|
|
9
|
+
'Mutation.createComment': {
|
|
10
|
+
auth: boolean;
|
|
11
|
+
};
|
|
12
|
+
'Mutation.updateComment': {
|
|
13
|
+
auth: boolean;
|
|
14
|
+
};
|
|
15
|
+
'Mutation.removeComment': {
|
|
16
|
+
auth: boolean;
|
|
17
|
+
};
|
|
18
|
+
'Mutation.createAbuseReport': {
|
|
19
|
+
auth: boolean;
|
|
20
|
+
};
|
|
21
|
+
};
|