@strapi/content-manager 0.0.0-experimental.f31889311d753b5f7d95198ae84d8fce1d156cd6 → 0.0.0-experimental.f6c00790e260ea5a9b6b86abac5fea02b05d569c

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 (111) hide show
  1. package/dist/_chunks/{ComponentConfigurationPage-BWOQWCv2.mjs → ComponentConfigurationPage-CnL10QYC.mjs} +3 -3
  2. package/dist/_chunks/{ComponentConfigurationPage-BWOQWCv2.mjs.map → ComponentConfigurationPage-CnL10QYC.mjs.map} +1 -1
  3. package/dist/_chunks/{ComponentConfigurationPage-BNxtMIfV.js → ComponentConfigurationPage-G4EIirP8.js} +3 -3
  4. package/dist/_chunks/{ComponentConfigurationPage-BNxtMIfV.js.map → ComponentConfigurationPage-G4EIirP8.js.map} +1 -1
  5. package/dist/_chunks/{EditConfigurationPage-D340bYlT.js → EditConfigurationPage-B2AA1kVF.js} +3 -3
  6. package/dist/_chunks/{EditConfigurationPage-D340bYlT.js.map → EditConfigurationPage-B2AA1kVF.js.map} +1 -1
  7. package/dist/_chunks/{EditConfigurationPage-GTp-Ucnw.mjs → EditConfigurationPage-I2kKh9dx.mjs} +3 -3
  8. package/dist/_chunks/{EditConfigurationPage-GTp-Ucnw.mjs.map → EditConfigurationPage-I2kKh9dx.mjs.map} +1 -1
  9. package/dist/_chunks/{EditViewPage-CXkmnAvI.js → EditViewPage-CHgoNwlc.js} +19 -8
  10. package/dist/_chunks/EditViewPage-CHgoNwlc.js.map +1 -0
  11. package/dist/_chunks/{EditViewPage-BVMS5hT-.mjs → EditViewPage-zFjJK0s8.mjs} +19 -8
  12. package/dist/_chunks/EditViewPage-zFjJK0s8.mjs.map +1 -0
  13. package/dist/_chunks/{Field-Ibi32diw.js → Field-9DePZh-0.js} +120 -92
  14. package/dist/_chunks/Field-9DePZh-0.js.map +1 -0
  15. package/dist/_chunks/{Field-nNgv5bpd.mjs → Field-DPAzUS1M.mjs} +118 -90
  16. package/dist/_chunks/Field-DPAzUS1M.mjs.map +1 -0
  17. package/dist/_chunks/{Form-DodJsI2A.mjs → Form-CEkENbkF.mjs} +35 -16
  18. package/dist/_chunks/Form-CEkENbkF.mjs.map +1 -0
  19. package/dist/_chunks/{Form-Dhnh34ym.js → Form-DPm-KZ1A.js} +35 -16
  20. package/dist/_chunks/Form-DPm-KZ1A.js.map +1 -0
  21. package/dist/_chunks/{History-C9auUkDi.js → History-DXSbTWez.js} +4 -4
  22. package/dist/_chunks/{History-C9auUkDi.js.map → History-DXSbTWez.js.map} +1 -1
  23. package/dist/_chunks/{History-CKCSQXz_.mjs → History-utls71em.mjs} +4 -4
  24. package/dist/_chunks/{History-CKCSQXz_.mjs.map → History-utls71em.mjs.map} +1 -1
  25. package/dist/_chunks/{ListConfigurationPage-CKEC4ttG.mjs → ListConfigurationPage-CuMXWWqb.mjs} +14 -4
  26. package/dist/_chunks/ListConfigurationPage-CuMXWWqb.mjs.map +1 -0
  27. package/dist/_chunks/{ListConfigurationPage-Bg4rWUjX.js → ListConfigurationPage-D5C7ACZ_.js} +14 -4
  28. package/dist/_chunks/ListConfigurationPage-D5C7ACZ_.js.map +1 -0
  29. package/dist/_chunks/{ListViewPage-B7_WJUjG.mjs → ListViewPage-CdKd-PS_.mjs} +39 -35
  30. package/dist/_chunks/ListViewPage-CdKd-PS_.mjs.map +1 -0
  31. package/dist/_chunks/{ListViewPage-C2gIeYHG.js → ListViewPage-DfuwH1tt.js} +42 -38
  32. package/dist/_chunks/ListViewPage-DfuwH1tt.js.map +1 -0
  33. package/dist/_chunks/{NoContentTypePage-DqgdUfyn.js → NoContentTypePage-BIxlkWWi.js} +2 -2
  34. package/dist/_chunks/{NoContentTypePage-DqgdUfyn.js.map → NoContentTypePage-BIxlkWWi.js.map} +1 -1
  35. package/dist/_chunks/{NoContentTypePage-Ckem6Ll6.mjs → NoContentTypePage-DkToTT7u.mjs} +2 -2
  36. package/dist/_chunks/{NoContentTypePage-Ckem6Ll6.mjs.map → NoContentTypePage-DkToTT7u.mjs.map} +1 -1
  37. package/dist/_chunks/{NoPermissionsPage-CF29Q-sW.js → NoPermissionsPage-Bu4GWYb-.js} +2 -2
  38. package/dist/_chunks/{NoPermissionsPage-CF29Q-sW.js.map → NoPermissionsPage-Bu4GWYb-.js.map} +1 -1
  39. package/dist/_chunks/{NoPermissionsPage-BO-GEjA4.mjs → NoPermissionsPage-DlWi4BAH.mjs} +2 -2
  40. package/dist/_chunks/{NoPermissionsPage-BO-GEjA4.mjs.map → NoPermissionsPage-DlWi4BAH.mjs.map} +1 -1
  41. package/dist/_chunks/{Relations-C0uC9J4f.js → Relations-CFjTESWQ.js} +4 -4
  42. package/dist/_chunks/{Relations-C0uC9J4f.js.map → Relations-CFjTESWQ.js.map} +1 -1
  43. package/dist/_chunks/{Relations-DItV5eow.mjs → Relations-QP5yn9_z.mjs} +4 -4
  44. package/dist/_chunks/{Relations-DItV5eow.mjs.map → Relations-QP5yn9_z.mjs.map} +1 -1
  45. package/dist/_chunks/{en-uOUIxfcQ.js → en-BVzUkPxZ.js} +6 -5
  46. package/dist/_chunks/{en-uOUIxfcQ.js.map → en-BVzUkPxZ.js.map} +1 -1
  47. package/dist/_chunks/{en-BrCTWlZv.mjs → en-CPTj6CjC.mjs} +6 -5
  48. package/dist/_chunks/{en-BrCTWlZv.mjs.map → en-CPTj6CjC.mjs.map} +1 -1
  49. package/dist/_chunks/{index-DrNe6ctw.mjs → index-BHfS6_D5.mjs} +219 -114
  50. package/dist/_chunks/index-BHfS6_D5.mjs.map +1 -0
  51. package/dist/_chunks/{index-Dd0nXyJF.js → index-DXiHxy70.js} +200 -95
  52. package/dist/_chunks/index-DXiHxy70.js.map +1 -0
  53. package/dist/_chunks/{layout-B3ez7kvr.mjs → layout-DX_52HSH.mjs} +8 -7
  54. package/dist/_chunks/layout-DX_52HSH.mjs.map +1 -0
  55. package/dist/_chunks/{layout-CLLtt_5O.js → layout-bE-WUnQ0.js} +8 -7
  56. package/dist/_chunks/layout-bE-WUnQ0.js.map +1 -0
  57. package/dist/_chunks/{relations-bRxcNv1q.js → relations-D706vblp.js} +2 -2
  58. package/dist/_chunks/{relations-bRxcNv1q.js.map → relations-D706vblp.js.map} +1 -1
  59. package/dist/_chunks/{relations-B0hlsUU_.mjs → relations-SCVAL_aJ.mjs} +2 -2
  60. package/dist/_chunks/{relations-B0hlsUU_.mjs.map → relations-SCVAL_aJ.mjs.map} +1 -1
  61. package/dist/_chunks/{usePrev-B9w_-eYc.js → useDebounce-CtcjDB3L.js} +14 -1
  62. package/dist/_chunks/useDebounce-CtcjDB3L.js.map +1 -0
  63. package/dist/_chunks/useDebounce-DmuSJIF3.mjs +29 -0
  64. package/dist/_chunks/useDebounce-DmuSJIF3.mjs.map +1 -0
  65. package/dist/admin/index.js +1 -1
  66. package/dist/admin/index.mjs +4 -4
  67. package/dist/admin/src/history/services/historyVersion.d.ts +1 -1
  68. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.d.ts +2 -2
  69. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygFooter.d.ts +2 -2
  70. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.d.ts +4 -48
  71. package/dist/admin/src/pages/EditView/components/Header.d.ts +10 -11
  72. package/dist/admin/src/services/api.d.ts +1 -1
  73. package/dist/admin/src/services/components.d.ts +2 -2
  74. package/dist/admin/src/services/contentTypes.d.ts +3 -3
  75. package/dist/admin/src/services/documents.d.ts +19 -17
  76. package/dist/admin/src/services/init.d.ts +1 -1
  77. package/dist/admin/src/services/relations.d.ts +2 -2
  78. package/dist/admin/src/services/uid.d.ts +3 -3
  79. package/dist/admin/src/utils/validation.d.ts +4 -1
  80. package/dist/server/index.js +47 -23
  81. package/dist/server/index.js.map +1 -1
  82. package/dist/server/index.mjs +47 -23
  83. package/dist/server/index.mjs.map +1 -1
  84. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  85. package/dist/server/src/controllers/relations.d.ts.map +1 -1
  86. package/dist/server/src/history/services/history.d.ts.map +1 -1
  87. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  88. package/dist/server/src/history/services/utils.d.ts +1 -0
  89. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  90. package/dist/server/src/policies/hasPermissions.d.ts.map +1 -1
  91. package/dist/server/src/services/permission-checker.d.ts.map +1 -1
  92. package/dist/shared/contracts/collection-types.d.ts +3 -1
  93. package/dist/shared/contracts/collection-types.d.ts.map +1 -1
  94. package/package.json +9 -9
  95. package/dist/_chunks/EditViewPage-BVMS5hT-.mjs.map +0 -1
  96. package/dist/_chunks/EditViewPage-CXkmnAvI.js.map +0 -1
  97. package/dist/_chunks/Field-Ibi32diw.js.map +0 -1
  98. package/dist/_chunks/Field-nNgv5bpd.mjs.map +0 -1
  99. package/dist/_chunks/Form-Dhnh34ym.js.map +0 -1
  100. package/dist/_chunks/Form-DodJsI2A.mjs.map +0 -1
  101. package/dist/_chunks/ListConfigurationPage-Bg4rWUjX.js.map +0 -1
  102. package/dist/_chunks/ListConfigurationPage-CKEC4ttG.mjs.map +0 -1
  103. package/dist/_chunks/ListViewPage-B7_WJUjG.mjs.map +0 -1
  104. package/dist/_chunks/ListViewPage-C2gIeYHG.js.map +0 -1
  105. package/dist/_chunks/index-Dd0nXyJF.js.map +0 -1
  106. package/dist/_chunks/index-DrNe6ctw.mjs.map +0 -1
  107. package/dist/_chunks/layout-B3ez7kvr.mjs.map +0 -1
  108. package/dist/_chunks/layout-CLLtt_5O.js.map +0 -1
  109. package/dist/_chunks/usePrev-B9w_-eYc.js.map +0 -1
  110. package/dist/_chunks/usePrev-DH6iah0A.mjs +0 -16
  111. package/dist/_chunks/usePrev-DH6iah0A.mjs.map +0 -1
@@ -1,62 +1,18 @@
1
1
  /// <reference types="react" />
2
2
  import { IconButtonComponent } from '@strapi/design-system';
3
- export declare const CustomIconButton: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("@strapi/design-system").TransientBoxProps & {
4
- children?: import("react").ReactNode;
5
- } & import("@strapi/design-system/dist/types").AsProp<"button"> & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "children" | keyof import("@strapi/design-system/dist/types").AsProp<C> | keyof import("@strapi/design-system").TransientBoxProps> & {
6
- ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
7
- } & import("@strapi/design-system").TransientFlexProps & {
8
- disabled?: boolean | undefined;
9
- } & {
10
- children: import("react").ReactNode;
11
- label: string;
12
- onClick?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
13
- size?: "S" | "M" | "L" | undefined;
14
- variant?: "secondary" | "tertiary" | undefined;
15
- withTooltip?: boolean | undefined;
16
- }, never>> & Omit<IconButtonComponent, keyof import("react").Component<any, {}, any>>;
17
- export declare const CustomLinkIconButton: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("styled-components/dist/types").FastOmit<import("@strapi/design-system").TransientBoxProps & {
18
- children?: import("react").ReactNode;
19
- } & import("@strapi/design-system/dist/types").AsProp<"button"> & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "children" | keyof import("@strapi/design-system/dist/types").AsProp<C> | keyof import("@strapi/design-system").TransientBoxProps> & {
20
- ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
21
- } & import("@strapi/design-system").TransientFlexProps & {
22
- disabled?: boolean | undefined;
23
- } & {
24
- children: import("react").ReactNode;
25
- label: string;
26
- onClick?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
27
- size?: "S" | "M" | "L" | undefined;
28
- variant?: "secondary" | "tertiary" | undefined;
29
- withTooltip?: boolean | undefined;
30
- }, never>, never>> & Omit<import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("@strapi/design-system").TransientBoxProps & {
31
- children?: import("react").ReactNode;
32
- } & import("@strapi/design-system/dist/types").AsProp<"button"> & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "children" | keyof import("@strapi/design-system/dist/types").AsProp<C> | keyof import("@strapi/design-system").TransientBoxProps> & {
33
- ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
34
- } & import("@strapi/design-system").TransientFlexProps & {
35
- disabled?: boolean | undefined;
36
- } & {
37
- children: import("react").ReactNode;
38
- label: string;
39
- onClick?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
40
- size?: "S" | "M" | "L" | undefined;
41
- variant?: "secondary" | "tertiary" | undefined;
42
- withTooltip?: boolean | undefined;
43
- }, never>> & Omit<IconButtonComponent, keyof import("react").Component<any, {}, any>>, keyof import("react").Component<any, {}, any>>;
44
3
  export declare const MainButtons: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<any, never>> | (import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<any, never>> & Omit<any, keyof import("react").Component<any, {}, any>>);
45
4
  export declare const MoreButton: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("@strapi/design-system").TransientBoxProps & {
46
5
  children?: import("react").ReactNode;
47
6
  } & import("@strapi/design-system/dist/types").AsProp<"button"> & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "children" | keyof import("@strapi/design-system/dist/types").AsProp<C> | keyof import("@strapi/design-system").TransientBoxProps> & {
48
7
  ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
49
- } & import("@strapi/design-system").TransientFlexProps & {
50
- disabled?: boolean | undefined;
51
- } & {
8
+ } & import("@strapi/design-system").TransientFlexProps & Pick<import("@strapi/design-system").ButtonProps, "size" | "variant"> & {
52
9
  children: import("react").ReactNode;
10
+ disabled?: boolean | undefined;
53
11
  label: string;
54
12
  onClick?: import("react").MouseEventHandler<HTMLButtonElement> | undefined;
55
- size?: "S" | "M" | "L" | undefined;
56
- variant?: "secondary" | "tertiary" | undefined;
57
13
  withTooltip?: boolean | undefined;
58
14
  }, never>> & Omit<IconButtonComponent, keyof import("react").Component<any, {}, any>>;
59
15
  export declare const IconButtonGroupMargin: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<any, never>> | (import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<any, never>> & Omit<any, keyof import("react").Component<any, {}, any>>);
60
- export declare const ExpandButton: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<Omit<Omit<import("@strapi/design-system").BaseButtonProps<import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>>, "ref"> & import("react").RefAttributes<unknown>, "ref"> & {
16
+ export declare const ExpandButton: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<Omit<Omit<import("@strapi/design-system").ButtonProps<import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements>>, "ref"> & import("react").RefAttributes<unknown>, "ref"> & {
61
17
  ref?: ((instance: unknown) => void) | import("react").RefObject<unknown> | null | undefined;
62
- }, never>> & Omit<(<C extends import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> = "button">(props: import("react").PropsWithoutRef<import("@strapi/design-system").BaseButtonProps<C>> & import("react").RefAttributes<unknown>) => import("react").ReactNode), keyof import("react").Component<any, {}, any>>;
18
+ }, never>> & Omit<(<C extends import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> = "button">(props: import("react").PropsWithoutRef<import("@strapi/design-system").ButtonProps<C>> & import("react").RefAttributes<unknown>) => import("react").ReactNode), keyof import("react").Component<any, {}, any>>;
@@ -6,20 +6,20 @@ interface HeaderProps {
6
6
  title?: string;
7
7
  }
8
8
  declare const Header: ({ isCreating, status, title: documentTitle }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
9
- interface HeaderButtonAction {
9
+ interface DialogOptions {
10
+ type: 'dialog';
11
+ title: string;
12
+ content?: React.ReactNode;
13
+ footer?: React.ReactNode;
14
+ }
15
+ interface HeaderActionDescription {
10
16
  disabled?: boolean;
11
17
  label: string;
12
18
  icon?: React.ReactNode;
13
- /**
14
- * @default 'default'
15
- */
16
19
  type?: 'icon' | 'default';
17
- onClick?: (event: React.SyntheticEvent) => void;
18
- }
19
- interface HeaderSelectAction {
20
- disabled?: boolean;
21
- label: string;
22
- options: Array<{
20
+ onClick?: (event: React.SyntheticEvent) => Promise<boolean | void> | boolean | void;
21
+ dialog?: DialogOptions;
22
+ options?: Array<{
23
23
  disabled?: boolean;
24
24
  label: string;
25
25
  startIcon?: React.ReactNode;
@@ -29,7 +29,6 @@ interface HeaderSelectAction {
29
29
  onSelect?: (value: string) => void;
30
30
  value?: string;
31
31
  }
32
- type HeaderActionDescription = HeaderButtonAction | HeaderSelectAction;
33
32
  declare const DEFAULT_HEADER_ACTIONS: DocumentActionComponent[];
34
33
  export { Header, DEFAULT_HEADER_ACTIONS };
35
34
  export type { HeaderProps, HeaderActionDescription };
@@ -1,2 +1,2 @@
1
- declare const contentManagerApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, import("@reduxjs/toolkit/dist/query/endpointDefinitions").UpdateDefinitions<{}, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations", never>, "adminApi", "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/dist/query/react").reactHooksModuleName>;
1
+ declare const contentManagerApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, import("@reduxjs/toolkit/dist/query/endpointDefinitions").UpdateDefinitions<{}, "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability", never>, "adminApi", "ComponentConfiguration" | "ContentTypesConfiguration" | "ContentTypeSettings" | "Document" | "InitialData" | "HistoryVersion" | "Relations" | "UidAvailability", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/dist/query/react").reactHooksModuleName>;
2
2
  export { contentManagerApi };
@@ -1,5 +1,5 @@
1
- declare const useGetComponentConfigurationQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<string, 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 useGetComponentConfigurationQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<string, 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
  component: import("../../../shared/contracts/components").ComponentConfiguration;
3
3
  components: Record<string, import("../../../shared/contracts/components").ComponentConfiguration>;
4
- }, "adminApi">>, useUpdateComponentConfigurationMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<any, 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", import("../../../shared/contracts/components").ComponentConfiguration, "adminApi">>;
4
+ }, "adminApi">>, useUpdateComponentConfigurationMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<any, 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", import("../../../shared/contracts/components").ComponentConfiguration, "adminApi">>;
5
5
  export { useGetComponentConfigurationQuery, useUpdateComponentConfigurationMutation };
@@ -1,7 +1,7 @@
1
- declare const useGetContentTypeConfigurationQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<string, 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 useGetContentTypeConfigurationQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<string, 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
  contentType: import("../../../shared/contracts/content-types").Configuration;
3
3
  components: Record<string, import("../../../shared/contracts/components").ComponentConfiguration>;
4
- }, "adminApi">>, useGetAllContentTypeSettingsQuery: 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", {
4
+ }, "adminApi">>, useGetAllContentTypeSettingsQuery: 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", {
5
5
  uid: string;
6
6
  settings: import("../../../shared/contracts/content-types").Settings;
7
7
  }[], "adminApi">>, useUpdateContentTypeConfigurationMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<{
@@ -10,7 +10,7 @@ declare const useGetContentTypeConfigurationQuery: import("@reduxjs/toolkit/dist
10
10
  settings: import("../../../shared/contracts/content-types").Settings;
11
11
  } & {
12
12
  uid: string;
13
- }, 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", {
13
+ }, 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", {
14
14
  contentType: import("../../../shared/contracts/content-types").Configuration;
15
15
  components: Record<string, import("../../../shared/contracts/components").ComponentConfiguration>;
16
16
  }, "adminApi">>;
@@ -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,40 @@ 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
- 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">>;
99
+ params?: {
100
+ locale?: string | string[] | null | undefined;
101
+ } | undefined;
102
+ }, 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
103
  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 };
@@ -199,7 +199,9 @@ const createServiceUtils = ({ strapi: strapi2 }) => {
199
199
  return strapi2.db.query("plugin::upload.file").findOne({ where: { id: versionRelationData.id } });
200
200
  };
201
201
  const localesService = strapi2.plugin("i18n")?.service("locales");
202
+ const i18nContentTypeService = strapi2.plugin("i18n")?.service("content-types");
202
203
  const getDefaultLocale = async () => localesService ? localesService.getDefaultLocale() : null;
204
+ const isLocalizedContentType = (model) => i18nContentTypeService ? i18nContentTypeService.isLocalizedContentType(model) : false;
203
205
  const getLocaleDictionary = async () => {
204
206
  if (!localesService)
205
207
  return {};
@@ -317,6 +319,7 @@ const createServiceUtils = ({ strapi: strapi2 }) => {
317
319
  getRelationRestoreValue,
318
320
  getMediaRestoreValue,
319
321
  getDefaultLocale,
322
+ isLocalizedContentType,
320
323
  getLocaleDictionary,
321
324
  getRetentionDays,
322
325
  getVersionStatus,
@@ -339,7 +342,13 @@ const createHistoryService = ({ strapi: strapi2 }) => {
339
342
  });
340
343
  },
341
344
  async findVersionsPage(params) {
342
- const locale = params.query.locale || await serviceUtils.getDefaultLocale();
345
+ const model = strapi2.getModel(params.query.contentType);
346
+ const isLocalizedContentType = serviceUtils.isLocalizedContentType(model);
347
+ const defaultLocale = await serviceUtils.getDefaultLocale();
348
+ let locale = null;
349
+ if (isLocalizedContentType) {
350
+ locale = params.query.locale || defaultLocale;
351
+ }
343
352
  const [{ results, pagination }, localeDictionary] = await Promise.all([
344
353
  query.findPage({
345
354
  ...params.query,
@@ -555,11 +564,13 @@ const createLifecyclesService = ({ strapi: strapi2 }) => {
555
564
  }
556
565
  const uid2 = context.contentType.uid;
557
566
  const schemas = getSchemas(uid2);
567
+ const model = strapi2.getModel(uid2);
568
+ const isLocalizedContentType = serviceUtils.isLocalizedContentType(model);
558
569
  const localeEntries = await strapi2.db.query(uid2).findMany({
559
570
  where: {
560
571
  documentId,
561
- locale: { $in: locales },
562
- publishedAt: null
572
+ ...isLocalizedContentType ? { locale: { $in: locales } } : {},
573
+ ...strapiUtils.contentTypes.hasDraftAndPublish(strapi2.contentTypes[uid2]) ? { publishedAt: null } : {}
563
574
  },
564
575
  populate: serviceUtils.getDeepPopulate(
565
576
  uid2,
@@ -1219,6 +1230,11 @@ const { createPolicy } = strapiUtils.policy;
1219
1230
  const hasPermissions = createPolicy({
1220
1231
  name: "plugin::content-manager.hasPermissions",
1221
1232
  validator: validateHasPermissionsInput,
1233
+ /**
1234
+ * NOTE: Action aliases are currently not checked at this level (policy).
1235
+ * This is currently the intended behavior to avoid changing the behavior of API related permissions.
1236
+ * If you want to add support for it, please create a dedicated RFC with a list of potential side effect this could have.
1237
+ */
1222
1238
  handler(ctx, config = {}) {
1223
1239
  const { actions = [], hasAtLeastOne = false } = config;
1224
1240
  const { userAbility } = ctx.state;
@@ -1771,7 +1787,7 @@ const collectionTypes = {
1771
1787
  permissionChecker2,
1772
1788
  model,
1773
1789
  // @ts-expect-error TODO: fix
1774
- { id, locale, publishedAt: null },
1790
+ { documentId: id, locale, publishedAt: null },
1775
1791
  { availableLocales: true, availableStatus: false }
1776
1792
  );
1777
1793
  ctx.body = { data: {}, meta };
@@ -1974,7 +1990,9 @@ const collectionTypes = {
1974
1990
  if (permissionChecker2.cannot.unpublish()) {
1975
1991
  return ctx.forbidden();
1976
1992
  }
1977
- const { locale } = await getDocumentLocaleAndStatus(body, model);
1993
+ const { locale } = await getDocumentLocaleAndStatus(body, model, {
1994
+ allowMultipleLocales: true
1995
+ });
1978
1996
  const entityPromises = documentIds.map(
1979
1997
  (documentId) => documentManager2.findLocales(documentId, model, { locale, isPublished: true })
1980
1998
  );
@@ -2325,20 +2343,13 @@ const sanitizeMainField = (model, mainField, userAbility) => {
2325
2343
  userAbility,
2326
2344
  model: model.uid
2327
2345
  });
2328
- if (!isListable(model, mainField)) {
2346
+ const isMainFieldListable = isListable(model, mainField);
2347
+ const canReadMainField = permissionChecker2.can.read(null, mainField);
2348
+ if (!isMainFieldListable || !canReadMainField) {
2329
2349
  return "id";
2330
2350
  }
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";
2351
+ if (model.uid === "plugin::users-permissions.role") {
2352
+ return "name";
2342
2353
  }
2343
2354
  return mainField;
2344
2355
  };
@@ -2596,9 +2607,7 @@ const relations = {
2596
2607
  addFiltersClause(permissionQuery, { id: { $in: loadedIds } });
2597
2608
  const sanitizedRes = await loadRelations({ id: entryId }, targetField, {
2598
2609
  ...strapi.get("query-params").transform(targetUid, permissionQuery),
2599
- ordering: "desc",
2600
- page: ctx.request.query.page,
2601
- pageSize: ctx.request.query.pageSize
2610
+ ordering: "desc"
2602
2611
  });
2603
2612
  const relationsUnion = fp.uniqBy("id", fp.concat(sanitizedRes.results, res.results));
2604
2613
  ctx.body = {
@@ -3504,12 +3513,27 @@ const createPermissionChecker = (strapi2) => ({ userAbility, model }) => {
3504
3513
  ability: userAbility,
3505
3514
  model
3506
3515
  });
3507
- const toSubject = (entity) => entity ? permissionsManager.toSubject(entity, model) : model;
3516
+ const { actionProvider } = strapi2.service("admin::permission");
3517
+ const toSubject = (entity) => {
3518
+ return entity ? permissionsManager.toSubject(entity, model) : model;
3519
+ };
3508
3520
  const can = (action, entity, field) => {
3509
- return userAbility.can(action, toSubject(entity), field);
3521
+ const subject = toSubject(entity);
3522
+ const aliases = actionProvider.unstable_aliases(action, model);
3523
+ return (
3524
+ // Test the original action to see if it passes
3525
+ userAbility.can(action, subject, field) || // Else try every known alias if at least one of them succeed, then the user "can"
3526
+ aliases.some((alias) => userAbility.can(alias, subject, field))
3527
+ );
3510
3528
  };
3511
3529
  const cannot = (action, entity, field) => {
3512
- return userAbility.cannot(action, toSubject(entity), field);
3530
+ const subject = toSubject(entity);
3531
+ const aliases = actionProvider.unstable_aliases(action, model);
3532
+ return (
3533
+ // Test both the original action
3534
+ userAbility.cannot(action, subject, field) && // and every known alias, if all of them fail (cannot), then the user truly "cannot"
3535
+ aliases.every((alias) => userAbility.cannot(alias, subject, field))
3536
+ );
3513
3537
  };
3514
3538
  const sanitizeOutput = (data, { action = ACTIONS.read } = {}) => {
3515
3539
  return permissionsManager.sanitizeOutput(data, { subject: toSubject(data), action });