@strapi/content-manager 0.0.0-experimental.cb311d9fcfbd8e441f790aea232f0a39bdd90e16 → 0.0.0-experimental.d834c9e658d1fb037e6da1105150593521c667cc

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 (89) hide show
  1. package/dist/_chunks/{ComponentConfigurationPage-DL1MHO8i.js → ComponentConfigurationPage-D_M8iBw5.js} +3 -3
  2. package/dist/_chunks/{ComponentConfigurationPage-DL1MHO8i.js.map → ComponentConfigurationPage-D_M8iBw5.js.map} +1 -1
  3. package/dist/_chunks/{ComponentConfigurationPage-D0dyDTwq.mjs → ComponentConfigurationPage-qemkOlnj.mjs} +3 -3
  4. package/dist/_chunks/{ComponentConfigurationPage-D0dyDTwq.mjs.map → ComponentConfigurationPage-qemkOlnj.mjs.map} +1 -1
  5. package/dist/_chunks/{EditConfigurationPage-CMaOf-A-.js → EditConfigurationPage-BePwPuHy.js} +3 -3
  6. package/dist/_chunks/{EditConfigurationPage-CMaOf-A-.js.map → EditConfigurationPage-BePwPuHy.js.map} +1 -1
  7. package/dist/_chunks/{EditConfigurationPage-13b7S5Cq.mjs → EditConfigurationPage-CjUrEewK.mjs} +3 -3
  8. package/dist/_chunks/{EditConfigurationPage-13b7S5Cq.mjs.map → EditConfigurationPage-CjUrEewK.mjs.map} +1 -1
  9. package/dist/_chunks/{EditViewPage-BSVmMpRd.js → EditViewPage-B-RJeiJD.js} +19 -8
  10. package/dist/_chunks/EditViewPage-B-RJeiJD.js.map +1 -0
  11. package/dist/_chunks/{EditViewPage-C3tIZ8F5.mjs → EditViewPage-De8GyU8P.mjs} +19 -8
  12. package/dist/_chunks/EditViewPage-De8GyU8P.mjs.map +1 -0
  13. package/dist/_chunks/{Field-DUCVth4C.js → Field-dq8Tg1M_.js} +99 -33
  14. package/dist/_chunks/Field-dq8Tg1M_.js.map +1 -0
  15. package/dist/_chunks/{Field-BvuT8cGL.mjs → Field-pb2o8uBe.mjs} +101 -35
  16. package/dist/_chunks/{Field-BvuT8cGL.mjs.map → Field-pb2o8uBe.mjs.map} +1 -1
  17. package/dist/_chunks/{Form-Cpl4W1ak.js → Form-DGIf4jQU.js} +22 -11
  18. package/dist/_chunks/Form-DGIf4jQU.js.map +1 -0
  19. package/dist/_chunks/{Form-BZmDNVr9.mjs → Form-DJn0Dxha.mjs} +22 -11
  20. package/dist/_chunks/Form-DJn0Dxha.mjs.map +1 -0
  21. package/dist/_chunks/{History-Cq_Hrzuu.mjs → History-BowL3JKP.mjs} +4 -4
  22. package/dist/_chunks/{History-Cq_Hrzuu.mjs.map → History-BowL3JKP.mjs.map} +1 -1
  23. package/dist/_chunks/{History-D4U2YISB.js → History-Dh2NEHnR.js} +4 -4
  24. package/dist/_chunks/{History-D4U2YISB.js.map → History-Dh2NEHnR.js.map} +1 -1
  25. package/dist/_chunks/{ListConfigurationPage-W-KQHmBv.mjs → ListConfigurationPage-BpVOB-hn.mjs} +14 -4
  26. package/dist/_chunks/ListConfigurationPage-BpVOB-hn.mjs.map +1 -0
  27. package/dist/_chunks/{ListConfigurationPage-Bny6CdWe.js → ListConfigurationPage-BxYCWz9e.js} +14 -4
  28. package/dist/_chunks/ListConfigurationPage-BxYCWz9e.js.map +1 -0
  29. package/dist/_chunks/{ListViewPage-O8F1pBJo.js → ListViewPage-4XsciqHZ.js} +3 -3
  30. package/dist/_chunks/{ListViewPage-O8F1pBJo.js.map → ListViewPage-4XsciqHZ.js.map} +1 -1
  31. package/dist/_chunks/{ListViewPage-HBBnJa8K.mjs → ListViewPage-CXFUjZQC.mjs} +3 -3
  32. package/dist/_chunks/{ListViewPage-HBBnJa8K.mjs.map → ListViewPage-CXFUjZQC.mjs.map} +1 -1
  33. package/dist/_chunks/{NoContentTypePage-CQWChGPw.js → NoContentTypePage-C8OpoHeU.js} +2 -2
  34. package/dist/_chunks/{NoContentTypePage-CQWChGPw.js.map → NoContentTypePage-C8OpoHeU.js.map} +1 -1
  35. package/dist/_chunks/{NoContentTypePage-B-gIhHWM.mjs → NoContentTypePage-DuhOTp3x.mjs} +2 -2
  36. package/dist/_chunks/{NoContentTypePage-B-gIhHWM.mjs.map → NoContentTypePage-DuhOTp3x.mjs.map} +1 -1
  37. package/dist/_chunks/{NoPermissionsPage-XhOPl8wx.mjs → NoPermissionsPage-DVz3mzDz.mjs} +2 -2
  38. package/dist/_chunks/{NoPermissionsPage-XhOPl8wx.mjs.map → NoPermissionsPage-DVz3mzDz.mjs.map} +1 -1
  39. package/dist/_chunks/{NoPermissionsPage-CY46zxnM.js → NoPermissionsPage-y_r7DVA2.js} +2 -2
  40. package/dist/_chunks/{NoPermissionsPage-CY46zxnM.js.map → NoPermissionsPage-y_r7DVA2.js.map} +1 -1
  41. package/dist/_chunks/{Relations-vFZ6Wasg.mjs → Relations-CVNLrn1Y.mjs} +4 -4
  42. package/dist/_chunks/{Relations-vFZ6Wasg.mjs.map → Relations-CVNLrn1Y.mjs.map} +1 -1
  43. package/dist/_chunks/{Relations-C4gGfZRv.js → Relations-DPFCAa7b.js} +4 -4
  44. package/dist/_chunks/{Relations-C4gGfZRv.js.map → Relations-DPFCAa7b.js.map} +1 -1
  45. package/dist/_chunks/{index-5EMXLEM_.js → index-C3fJE-1-.js} +101 -54
  46. package/dist/_chunks/index-C3fJE-1-.js.map +1 -0
  47. package/dist/_chunks/{index-Dpxg3ctD.mjs → index-DiMrfcfy.mjs} +119 -72
  48. package/dist/_chunks/index-DiMrfcfy.mjs.map +1 -0
  49. package/dist/_chunks/{layout-P3eKO1Qy.js → layout-C788OmNr.js} +6 -6
  50. package/dist/_chunks/layout-C788OmNr.js.map +1 -0
  51. package/dist/_chunks/{layout-C0INpKap.mjs → layout-ls3gxfpH.mjs} +6 -6
  52. package/dist/_chunks/layout-ls3gxfpH.mjs.map +1 -0
  53. package/dist/_chunks/{relations-FBRRBWeO.mjs → relations-CLcOmGO0.mjs} +2 -2
  54. package/dist/_chunks/{relations-FBRRBWeO.mjs.map → relations-CLcOmGO0.mjs.map} +1 -1
  55. package/dist/_chunks/{relations-B1y0K6LE.js → relations-DYeotliT.js} +2 -2
  56. package/dist/_chunks/{relations-B1y0K6LE.js.map → relations-DYeotliT.js.map} +1 -1
  57. package/dist/admin/index.js +1 -1
  58. package/dist/admin/index.mjs +4 -4
  59. package/dist/admin/src/history/services/historyVersion.d.ts +1 -1
  60. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.d.ts +2 -2
  61. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygFooter.d.ts +2 -2
  62. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +10 -22
  63. package/dist/admin/src/services/api.d.ts +1 -1
  64. package/dist/admin/src/services/components.d.ts +2 -2
  65. package/dist/admin/src/services/contentTypes.d.ts +3 -3
  66. package/dist/admin/src/services/documents.d.ts +16 -16
  67. package/dist/admin/src/services/init.d.ts +1 -1
  68. package/dist/admin/src/services/relations.d.ts +2 -2
  69. package/dist/admin/src/services/uid.d.ts +3 -3
  70. package/dist/admin/src/utils/validation.d.ts +4 -1
  71. package/dist/server/index.js +29 -18
  72. package/dist/server/index.js.map +1 -1
  73. package/dist/server/index.mjs +29 -18
  74. package/dist/server/index.mjs.map +1 -1
  75. package/dist/server/src/controllers/relations.d.ts.map +1 -1
  76. package/dist/server/src/policies/hasPermissions.d.ts.map +1 -1
  77. package/dist/server/src/services/permission-checker.d.ts.map +1 -1
  78. package/package.json +8 -8
  79. package/dist/_chunks/EditViewPage-BSVmMpRd.js.map +0 -1
  80. package/dist/_chunks/EditViewPage-C3tIZ8F5.mjs.map +0 -1
  81. package/dist/_chunks/Field-DUCVth4C.js.map +0 -1
  82. package/dist/_chunks/Form-BZmDNVr9.mjs.map +0 -1
  83. package/dist/_chunks/Form-Cpl4W1ak.js.map +0 -1
  84. package/dist/_chunks/ListConfigurationPage-Bny6CdWe.js.map +0 -1
  85. package/dist/_chunks/ListConfigurationPage-W-KQHmBv.mjs.map +0 -1
  86. package/dist/_chunks/index-5EMXLEM_.js.map +0 -1
  87. package/dist/_chunks/index-Dpxg3ctD.mjs.map +0 -1
  88. package/dist/_chunks/layout-C0INpKap.mjs.map +0 -1
  89. package/dist/_chunks/layout-P3eKO1Qy.js.map +0 -1
@@ -4,22 +4,22 @@
4
4
  import type { Clone, Create, Delete, Find, FindOne, BulkDelete, BulkPublish, BulkUnpublish, Discard, CountDraftRelations, Publish, Unpublish, Update } from '../../../shared/contracts/collection-types';
5
5
  declare const useAutoCloneDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Clone.Params & {
6
6
  query?: string | undefined;
7
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations", Clone.Response, "adminApi">>, useCloneDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Clone.Params & {
7
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability", Clone.Response, "adminApi">>, useCloneDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Clone.Params & {
8
8
  data: Clone.Request['body'];
9
9
  params?: {
10
10
  locale?: string | null | undefined;
11
11
  } | undefined;
12
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations", Clone.Response, "adminApi">>, useCreateDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Create.Params & {
12
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability", Clone.Response, "adminApi">>, useCreateDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Create.Params & {
13
13
  data: Create.Request['body'];
14
14
  params?: {} | undefined;
15
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations", Create.Response, "adminApi">>, useDeleteDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Delete.Params, "model"> & Pick<Partial<Delete.Params>, "documentId"> & {
15
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability", Create.Response, "adminApi">>, useDeleteDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Delete.Params, "model"> & Pick<Partial<Delete.Params>, "documentId"> & {
16
16
  collectionType: string;
17
17
  params?: {
18
18
  page?: string | undefined;
19
19
  pageSize?: string | undefined;
20
20
  sort?: string | undefined;
21
21
  } | undefined;
22
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations", Delete.Response, "adminApi">>, useDeleteManyDocumentsMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<BulkDelete.Params & {
22
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability", Delete.Response, "adminApi">>, useDeleteManyDocumentsMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<BulkDelete.Params & {
23
23
  documentIds: string[];
24
24
  } & {
25
25
  params?: {
@@ -27,7 +27,7 @@ declare const useAutoCloneDocumentMutation: import("@reduxjs/toolkit/dist/query/
27
27
  pageSize?: string | undefined;
28
28
  sort?: string | undefined;
29
29
  } | undefined;
30
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations", BulkDelete.Response, "adminApi">>, useDiscardDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Discard.Params, "model"> & Partial<Pick<Discard.Params, "documentId">> & {
30
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability", BulkDelete.Response, "adminApi">>, useDiscardDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Discard.Params, "model"> & Partial<Pick<Discard.Params, "documentId">> & {
31
31
  collectionType: string;
32
32
  params?: ({
33
33
  page?: string | undefined;
@@ -36,7 +36,7 @@ declare const useAutoCloneDocumentMutation: import("@reduxjs/toolkit/dist/query/
36
36
  } & {
37
37
  [key: string]: any;
38
38
  }) | undefined;
39
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations", Discard.Response, "adminApi">>, useGetAllDocumentsQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<Find.Params & {
39
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability", Discard.Response, "adminApi">>, useGetAllDocumentsQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<Find.Params & {
40
40
  params?: ({
41
41
  page?: string | undefined;
42
42
  pageSize?: string | undefined;
@@ -44,17 +44,17 @@ declare const useAutoCloneDocumentMutation: import("@reduxjs/toolkit/dist/query/
44
44
  } & {
45
45
  [key: string]: any;
46
46
  }) | undefined;
47
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations", Find.Response, "adminApi">>, useLazyGetDocumentQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseLazyQuery<import("@reduxjs/toolkit/query").QueryDefinition<Pick<FindOne.Params, "model"> & Partial<Pick<FindOne.Params, "documentId">> & {
47
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability", Find.Response, "adminApi">>, useLazyGetDocumentQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseLazyQuery<import("@reduxjs/toolkit/query").QueryDefinition<Pick<FindOne.Params, "model"> & Partial<Pick<FindOne.Params, "documentId">> & {
48
48
  collectionType: string;
49
49
  params?: {
50
50
  locale?: string | null | undefined;
51
51
  } | undefined;
52
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations", FindOne.Response, "adminApi">>, useGetDocumentQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<Pick<FindOne.Params, "model"> & Partial<Pick<FindOne.Params, "documentId">> & {
52
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability", FindOne.Response, "adminApi">>, useGetDocumentQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<Pick<FindOne.Params, "model"> & Partial<Pick<FindOne.Params, "documentId">> & {
53
53
  collectionType: string;
54
54
  params?: {
55
55
  locale?: string | null | undefined;
56
56
  } | undefined;
57
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations", FindOne.Response, "adminApi">>, useLazyGetDraftRelationCountQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseLazyQuery<import("@reduxjs/toolkit/query").QueryDefinition<{
57
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability", FindOne.Response, "adminApi">>, useLazyGetDraftRelationCountQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseLazyQuery<import("@reduxjs/toolkit/query").QueryDefinition<{
58
58
  collectionType: string;
59
59
  model: string;
60
60
  /**
@@ -64,38 +64,38 @@ declare const useAutoCloneDocumentMutation: import("@reduxjs/toolkit/dist/query/
64
64
  params?: {
65
65
  locale?: string | null | undefined;
66
66
  } | undefined;
67
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations", CountDraftRelations.Response, "adminApi">>, useGetManyDraftRelationCountQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<{
67
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability", CountDraftRelations.Response, "adminApi">>, useGetManyDraftRelationCountQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<{
68
68
  documentIds?: string[] | undefined;
69
69
  locale?: string | string[] | null | undefined;
70
70
  } & {
71
71
  model: string;
72
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations", number, "adminApi">>, usePublishDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Publish.Params, "model"> & Partial<Pick<Publish.Params, "documentId">> & {
72
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability", number, "adminApi">>, usePublishDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Publish.Params, "model"> & Partial<Pick<Publish.Params, "documentId">> & {
73
73
  collectionType: string;
74
74
  data: Publish.Request['body'];
75
75
  params?: {
76
76
  locale?: string | null | undefined;
77
77
  } | undefined;
78
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations", Publish.Response, "adminApi">>, usePublishManyDocumentsMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<BulkPublish.Params & {
78
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability", Publish.Response, "adminApi">>, usePublishManyDocumentsMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<BulkPublish.Params & {
79
79
  documentIds: string[];
80
80
  } & {
81
81
  params?: {
82
82
  locale?: string | string[] | null | undefined;
83
83
  } | undefined;
84
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations", BulkPublish.Response, "adminApi">>, useUpdateDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Update.Params, "model"> & Partial<Pick<Update.Params, "documentId">> & {
84
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability", BulkPublish.Response, "adminApi">>, useUpdateDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Update.Params, "model"> & Partial<Pick<Update.Params, "documentId">> & {
85
85
  collectionType: string;
86
86
  data: Update.Request['body'];
87
87
  params?: {
88
88
  locale?: string | null | undefined;
89
89
  } | undefined;
90
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations", Update.Response, "adminApi">>, useUnpublishDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Unpublish.Params, "model"> & Partial<Pick<Unpublish.Params, "documentId">> & {
90
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability", Update.Response, "adminApi">>, useUnpublishDocumentMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<Unpublish.Params, "model"> & Partial<Pick<Unpublish.Params, "documentId">> & {
91
91
  collectionType: string;
92
92
  params?: {
93
93
  locale?: string | null | undefined;
94
94
  } | undefined;
95
95
  data: Unpublish.Request['body'];
96
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations", Unpublish.Response, "adminApi">>, useUnpublishManyDocumentsMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<BulkUnpublish.Params, "model"> & {
96
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability", Unpublish.Response, "adminApi">>, useUnpublishManyDocumentsMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<BulkUnpublish.Params, "model"> & {
97
97
  documentIds: string[];
98
98
  } & {
99
99
  params?: {} | undefined;
100
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations", BulkUnpublish.Response, "adminApi">>;
100
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability", BulkUnpublish.Response, "adminApi">>;
101
101
  export { useAutoCloneDocumentMutation, useCloneDocumentMutation, useCreateDocumentMutation, useDeleteDocumentMutation, useDeleteManyDocumentsMutation, useDiscardDocumentMutation, useGetAllDocumentsQuery, useLazyGetDocumentQuery, useGetDocumentQuery, useLazyGetDraftRelationCountQuery as useGetDraftRelationCountQuery, useGetManyDraftRelationCountQuery, usePublishDocumentMutation, usePublishManyDocumentsMutation, useUpdateDocumentMutation, useUnpublishDocumentMutation, useUnpublishManyDocumentsMutation, };
@@ -1,4 +1,4 @@
1
- declare const useGetInitialDataQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<void, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations", {
1
+ declare const useGetInitialDataQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<void, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability", {
2
2
  fieldSizes: Record<string, {
3
3
  default: number;
4
4
  isResizable: boolean;
@@ -27,7 +27,7 @@ declare const useGetRelationsQuery: import("@reduxjs/toolkit/dist/query/react/bu
27
27
  idsToOmit?: string[] | undefined;
28
28
  idsToInclude?: string[] | undefined;
29
29
  }) | undefined;
30
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations", GetRelationsResponse, "adminApi">>, useLazySearchRelationsQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseLazyQuery<import("@reduxjs/toolkit/query").QueryDefinition<FindAvailable.Params & {
30
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability", GetRelationsResponse, "adminApi">>, useLazySearchRelationsQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseLazyQuery<import("@reduxjs/toolkit/query").QueryDefinition<FindAvailable.Params & {
31
31
  params?: (Partial<Pick<import("../../../shared/contracts/relations").Pagination, "page" | "pageSize">> & {
32
32
  id?: import("@strapi/types/dist/data").ID | undefined;
33
33
  locale?: string | undefined;
@@ -36,7 +36,7 @@ declare const useGetRelationsQuery: import("@reduxjs/toolkit/dist/query/react/bu
36
36
  idsToOmit?: string[] | undefined;
37
37
  idsToInclude?: string[] | undefined;
38
38
  }) | undefined;
39
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations", {
39
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability", {
40
40
  results: RelResult[];
41
41
  pagination: import("../../../shared/contracts/relations").Pagination;
42
42
  error?: undefined;
@@ -12,7 +12,7 @@ declare const useGenerateUIDMutation: import("@reduxjs/toolkit/dist/query/react/
12
12
  field: string;
13
13
  } & {
14
14
  params: GenerateUID.Request['query'];
15
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations", string, "adminApi">>, useGetDefaultUIDQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<{
15
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability", string, "adminApi">>, useGetDefaultUIDQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<{
16
16
  contentTypeUID: string;
17
17
  data: {
18
18
  id: import("@strapi/types/dist/data").ID;
@@ -22,11 +22,11 @@ declare const useGenerateUIDMutation: import("@reduxjs/toolkit/dist/query/react/
22
22
  field: string;
23
23
  } & {
24
24
  params: GenerateUID.Request['query'];
25
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations", string, "adminApi">>, useGetAvailabilityQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<{
25
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability", string, "adminApi">>, useGetAvailabilityQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<{
26
26
  contentTypeUID: string;
27
27
  field: string;
28
28
  value: string;
29
29
  } & {
30
30
  params: CheckUIDAvailability.Request['query'];
31
- }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations", CheckUIDAvailability.Response, "adminApi">>;
31
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability", CheckUIDAvailability.Response, "adminApi">>;
32
32
  export { useGenerateUIDMutation, useGetDefaultUIDQuery, useGetAvailabilityQuery };
@@ -1,7 +1,10 @@
1
1
  import * as yup from 'yup';
2
2
  import type { ComponentsDictionary, Schema } from '../hooks/useDocument';
3
+ interface ValidationOptions {
4
+ status: 'draft' | 'published' | null;
5
+ }
3
6
  /**
4
7
  * TODO: should we create a Map to store these based on the hash of the schema?
5
8
  */
6
- declare const createYupSchema: (attributes?: Schema['attributes'], components?: ComponentsDictionary) => yup.ObjectSchema<any>;
9
+ declare const createYupSchema: (attributes?: Schema['attributes'], components?: ComponentsDictionary, options?: ValidationOptions) => yup.ObjectSchema<any>;
7
10
  export { createYupSchema };
@@ -1219,6 +1219,11 @@ const { createPolicy } = strapiUtils.policy;
1219
1219
  const hasPermissions = createPolicy({
1220
1220
  name: "plugin::content-manager.hasPermissions",
1221
1221
  validator: validateHasPermissionsInput,
1222
+ /**
1223
+ * NOTE: Action aliases are currently not checked at this level (policy).
1224
+ * This is currently the intended behavior to avoid changing the behavior of API related permissions.
1225
+ * If you want to add support for it, please create a dedicated RFC with a list of potential side effect this could have.
1226
+ */
1222
1227
  handler(ctx, config = {}) {
1223
1228
  const { actions = [], hasAtLeastOne = false } = config;
1224
1229
  const { userAbility } = ctx.state;
@@ -2325,20 +2330,13 @@ const sanitizeMainField = (model, mainField, userAbility) => {
2325
2330
  userAbility,
2326
2331
  model: model.uid
2327
2332
  });
2328
- if (!isListable(model, mainField)) {
2333
+ const isMainFieldListable = isListable(model, mainField);
2334
+ const canReadMainField = permissionChecker2.can.read(null, mainField);
2335
+ if (!isMainFieldListable || !canReadMainField) {
2329
2336
  return "id";
2330
2337
  }
2331
- if (permissionChecker2.cannot.read(null, mainField)) {
2332
- if (model.uid === "plugin::users-permissions.role") {
2333
- const userPermissionChecker = getService$1("permission-checker").create({
2334
- userAbility,
2335
- model: "plugin::users-permissions.user"
2336
- });
2337
- if (userPermissionChecker.can.read()) {
2338
- return "name";
2339
- }
2340
- }
2341
- return "id";
2338
+ if (model.uid === "plugin::users-permissions.role") {
2339
+ return "name";
2342
2340
  }
2343
2341
  return mainField;
2344
2342
  };
@@ -2596,9 +2594,7 @@ const relations = {
2596
2594
  addFiltersClause(permissionQuery, { id: { $in: loadedIds } });
2597
2595
  const sanitizedRes = await loadRelations({ id: entryId }, targetField, {
2598
2596
  ...strapi.get("query-params").transform(targetUid, permissionQuery),
2599
- ordering: "desc",
2600
- page: ctx.request.query.page,
2601
- pageSize: ctx.request.query.pageSize
2597
+ ordering: "desc"
2602
2598
  });
2603
2599
  const relationsUnion = fp.uniqBy("id", fp.concat(sanitizedRes.results, res.results));
2604
2600
  ctx.body = {
@@ -3504,12 +3500,27 @@ const createPermissionChecker = (strapi2) => ({ userAbility, model }) => {
3504
3500
  ability: userAbility,
3505
3501
  model
3506
3502
  });
3507
- const toSubject = (entity) => entity ? permissionsManager.toSubject(entity, model) : model;
3503
+ const { actionProvider } = strapi2.service("admin::permission");
3504
+ const toSubject = (entity) => {
3505
+ return entity ? permissionsManager.toSubject(entity, model) : model;
3506
+ };
3508
3507
  const can = (action, entity, field) => {
3509
- return userAbility.can(action, toSubject(entity), field);
3508
+ const subject = toSubject(entity);
3509
+ const aliases = actionProvider.unstable_aliases(action, model);
3510
+ return (
3511
+ // Test the original action to see if it passes
3512
+ userAbility.can(action, subject, field) || // Else try every known alias if at least one of them succeed, then the user "can"
3513
+ aliases.some((alias) => userAbility.can(alias, subject, field))
3514
+ );
3510
3515
  };
3511
3516
  const cannot = (action, entity, field) => {
3512
- return userAbility.cannot(action, toSubject(entity), field);
3517
+ const subject = toSubject(entity);
3518
+ const aliases = actionProvider.unstable_aliases(action, model);
3519
+ return (
3520
+ // Test both the original action
3521
+ userAbility.cannot(action, subject, field) && // and every known alias, if all of them fail (cannot), then the user truly "cannot"
3522
+ aliases.every((alias) => userAbility.cannot(alias, subject, field))
3523
+ );
3513
3524
  };
3514
3525
  const sanitizeOutput = (data, { action = ACTIONS.read } = {}) => {
3515
3526
  return permissionsManager.sanitizeOutput(data, { subject: toSubject(data), action });