@strapi/content-manager 5.46.1 → 5.47.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/dist/admin/history/components/VersionInputRenderer.js +63 -25
  2. package/dist/admin/history/components/VersionInputRenderer.js.map +1 -1
  3. package/dist/admin/history/components/VersionInputRenderer.mjs +62 -26
  4. package/dist/admin/history/components/VersionInputRenderer.mjs.map +1 -1
  5. package/dist/admin/hooks/useDocument.js +82 -2
  6. package/dist/admin/hooks/useDocument.js.map +1 -1
  7. package/dist/admin/hooks/useDocument.mjs +82 -2
  8. package/dist/admin/hooks/useDocument.mjs.map +1 -1
  9. package/dist/admin/pages/EditView/EditViewPage.js +3 -2
  10. package/dist/admin/pages/EditView/EditViewPage.js.map +1 -1
  11. package/dist/admin/pages/EditView/EditViewPage.mjs +3 -2
  12. package/dist/admin/pages/EditView/EditViewPage.mjs.map +1 -1
  13. package/dist/admin/pages/EditView/components/DocumentActions.js +6 -3
  14. package/dist/admin/pages/EditView/components/DocumentActions.js.map +1 -1
  15. package/dist/admin/pages/EditView/components/DocumentActions.mjs +6 -3
  16. package/dist/admin/pages/EditView/components/DocumentActions.mjs.map +1 -1
  17. package/dist/admin/pages/EditView/components/FormInputs/Component/Repeatable.js +4 -1
  18. package/dist/admin/pages/EditView/components/FormInputs/Component/Repeatable.js.map +1 -1
  19. package/dist/admin/pages/EditView/components/FormInputs/Component/Repeatable.mjs +4 -1
  20. package/dist/admin/pages/EditView/components/FormInputs/Component/Repeatable.mjs.map +1 -1
  21. package/dist/admin/pages/EditView/components/FormInputs/Relations/Relations.js +4 -4
  22. package/dist/admin/pages/EditView/components/FormInputs/Relations/Relations.js.map +1 -1
  23. package/dist/admin/pages/EditView/components/FormInputs/Relations/Relations.mjs +4 -4
  24. package/dist/admin/pages/EditView/components/FormInputs/Relations/Relations.mjs.map +1 -1
  25. package/dist/admin/src/history/components/VersionInputRenderer.d.ts +27 -1
  26. package/dist/admin/translations/sk.json.js +175 -9
  27. package/dist/admin/translations/sk.json.js.map +1 -1
  28. package/dist/admin/translations/sk.json.mjs +175 -9
  29. package/dist/admin/translations/sk.json.mjs.map +1 -1
  30. package/dist/admin/utils/relations.js +4 -0
  31. package/dist/admin/utils/relations.js.map +1 -1
  32. package/dist/admin/utils/relations.mjs +4 -0
  33. package/dist/admin/utils/relations.mjs.map +1 -1
  34. package/dist/server/bootstrap.js +4 -0
  35. package/dist/server/bootstrap.js.map +1 -1
  36. package/dist/server/bootstrap.mjs +4 -0
  37. package/dist/server/bootstrap.mjs.map +1 -1
  38. package/dist/server/controllers/collection-types.js +9 -5
  39. package/dist/server/controllers/collection-types.js.map +1 -1
  40. package/dist/server/controllers/collection-types.mjs +10 -6
  41. package/dist/server/controllers/collection-types.mjs.map +1 -1
  42. package/dist/server/homepage/services/homepage.js +21 -16
  43. package/dist/server/homepage/services/homepage.js.map +1 -1
  44. package/dist/server/homepage/services/homepage.mjs +21 -16
  45. package/dist/server/homepage/services/homepage.mjs.map +1 -1
  46. package/dist/server/mcp/derive-content-type-mcp-tools.js +524 -0
  47. package/dist/server/mcp/derive-content-type-mcp-tools.js.map +1 -0
  48. package/dist/server/mcp/derive-content-type-mcp-tools.mjs +518 -0
  49. package/dist/server/mcp/derive-content-type-mcp-tools.mjs.map +1 -0
  50. package/dist/server/mcp/handlers/collection-handlers.js +404 -0
  51. package/dist/server/mcp/handlers/collection-handlers.js.map +1 -0
  52. package/dist/server/mcp/handlers/collection-handlers.mjs +395 -0
  53. package/dist/server/mcp/handlers/collection-handlers.mjs.map +1 -0
  54. package/dist/server/mcp/handlers/constants.js +10 -0
  55. package/dist/server/mcp/handlers/constants.js.map +1 -0
  56. package/dist/server/mcp/handlers/constants.mjs +6 -0
  57. package/dist/server/mcp/handlers/constants.mjs.map +1 -0
  58. package/dist/server/mcp/handlers/single-type-handlers.js +344 -0
  59. package/dist/server/mcp/handlers/single-type-handlers.js.map +1 -0
  60. package/dist/server/mcp/handlers/single-type-handlers.mjs +336 -0
  61. package/dist/server/mcp/handlers/single-type-handlers.mjs.map +1 -0
  62. package/dist/server/mcp/permissions.js +138 -0
  63. package/dist/server/mcp/permissions.js.map +1 -0
  64. package/dist/server/mcp/permissions.mjs +131 -0
  65. package/dist/server/mcp/permissions.mjs.map +1 -0
  66. package/dist/server/mcp/register-content-manager-mcp-tools.js +30 -0
  67. package/dist/server/mcp/register-content-manager-mcp-tools.js.map +1 -0
  68. package/dist/server/mcp/register-content-manager-mcp-tools.mjs +28 -0
  69. package/dist/server/mcp/register-content-manager-mcp-tools.mjs.map +1 -0
  70. package/dist/server/mcp/schemas/blocks-schema.js +124 -0
  71. package/dist/server/mcp/schemas/blocks-schema.js.map +1 -0
  72. package/dist/server/mcp/schemas/blocks-schema.mjs +122 -0
  73. package/dist/server/mcp/schemas/blocks-schema.mjs.map +1 -0
  74. package/dist/server/mcp/schemas/data-schema.js +252 -0
  75. package/dist/server/mcp/schemas/data-schema.js.map +1 -0
  76. package/dist/server/mcp/schemas/data-schema.mjs +248 -0
  77. package/dist/server/mcp/schemas/data-schema.mjs.map +1 -0
  78. package/dist/server/mcp/schemas/filters-schema.js +111 -0
  79. package/dist/server/mcp/schemas/filters-schema.js.map +1 -0
  80. package/dist/server/mcp/schemas/filters-schema.mjs +107 -0
  81. package/dist/server/mcp/schemas/filters-schema.mjs.map +1 -0
  82. package/dist/server/mcp/schemas/input-schemas.js +18 -0
  83. package/dist/server/mcp/schemas/input-schemas.js.map +1 -0
  84. package/dist/server/mcp/schemas/input-schemas.mjs +13 -0
  85. package/dist/server/mcp/schemas/input-schemas.mjs.map +1 -0
  86. package/dist/server/mcp/schemas/output-schemas.js +48 -0
  87. package/dist/server/mcp/schemas/output-schemas.js.map +1 -0
  88. package/dist/server/mcp/schemas/output-schemas.mjs +44 -0
  89. package/dist/server/mcp/schemas/output-schemas.mjs.map +1 -0
  90. package/dist/server/mcp/schemas/sort-schema.js +80 -0
  91. package/dist/server/mcp/schemas/sort-schema.js.map +1 -0
  92. package/dist/server/mcp/schemas/sort-schema.mjs +76 -0
  93. package/dist/server/mcp/schemas/sort-schema.mjs.map +1 -0
  94. package/dist/server/mcp/utils.js +43 -0
  95. package/dist/server/mcp/utils.js.map +1 -0
  96. package/dist/server/mcp/utils.mjs +39 -0
  97. package/dist/server/mcp/utils.mjs.map +1 -0
  98. package/dist/server/services/document-metadata.js +32 -3
  99. package/dist/server/services/document-metadata.js.map +1 -1
  100. package/dist/server/services/document-metadata.mjs +32 -3
  101. package/dist/server/services/document-metadata.mjs.map +1 -1
  102. package/dist/server/services/index.js +1 -1
  103. package/dist/server/services/index.js.map +1 -1
  104. package/dist/server/services/permission-checker.js +4 -1
  105. package/dist/server/services/permission-checker.js.map +1 -1
  106. package/dist/server/services/permission-checker.mjs +1 -1
  107. package/dist/server/services/permission-checker.mjs.map +1 -1
  108. package/dist/server/services/utils/populate.js +3 -3
  109. package/dist/server/services/utils/populate.js.map +1 -1
  110. package/dist/server/services/utils/populate.mjs +3 -3
  111. package/dist/server/services/utils/populate.mjs.map +1 -1
  112. package/dist/server/src/bootstrap.d.ts.map +1 -1
  113. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  114. package/dist/server/src/homepage/services/homepage.d.ts.map +1 -1
  115. package/dist/server/src/index.d.ts +3 -3
  116. package/dist/server/src/mcp/derive-content-type-mcp-tools.d.ts +12 -0
  117. package/dist/server/src/mcp/derive-content-type-mcp-tools.d.ts.map +1 -0
  118. package/dist/server/src/mcp/handlers/collection-handlers.d.ts +69 -0
  119. package/dist/server/src/mcp/handlers/collection-handlers.d.ts.map +1 -0
  120. package/dist/server/src/mcp/handlers/constants.d.ts +4 -0
  121. package/dist/server/src/mcp/handlers/constants.d.ts.map +1 -0
  122. package/dist/server/src/mcp/handlers/index.d.ts +3 -0
  123. package/dist/server/src/mcp/handlers/index.d.ts.map +1 -0
  124. package/dist/server/src/mcp/handlers/single-type-handlers.d.ts +66 -0
  125. package/dist/server/src/mcp/handlers/single-type-handlers.d.ts.map +1 -0
  126. package/dist/server/src/mcp/permissions.d.ts +49 -0
  127. package/dist/server/src/mcp/permissions.d.ts.map +1 -0
  128. package/dist/server/src/mcp/register-content-manager-mcp-tools.d.ts +8 -0
  129. package/dist/server/src/mcp/register-content-manager-mcp-tools.d.ts.map +1 -0
  130. package/dist/server/src/mcp/schemas/blocks-schema.d.ts +8 -0
  131. package/dist/server/src/mcp/schemas/blocks-schema.d.ts.map +1 -0
  132. package/dist/server/src/mcp/schemas/data-schema.d.ts +36 -0
  133. package/dist/server/src/mcp/schemas/data-schema.d.ts.map +1 -0
  134. package/dist/server/src/mcp/schemas/filters-schema.d.ts +22 -0
  135. package/dist/server/src/mcp/schemas/filters-schema.d.ts.map +1 -0
  136. package/dist/server/src/mcp/schemas/index.d.ts +7 -0
  137. package/dist/server/src/mcp/schemas/index.d.ts.map +1 -0
  138. package/dist/server/src/mcp/schemas/input-schemas.d.ts +10 -0
  139. package/dist/server/src/mcp/schemas/input-schemas.d.ts.map +1 -0
  140. package/dist/server/src/mcp/schemas/output-schemas.d.ts +18 -0
  141. package/dist/server/src/mcp/schemas/output-schemas.d.ts.map +1 -0
  142. package/dist/server/src/mcp/schemas/sort-schema.d.ts +24 -0
  143. package/dist/server/src/mcp/schemas/sort-schema.d.ts.map +1 -0
  144. package/dist/server/src/mcp/types.d.ts +31 -0
  145. package/dist/server/src/mcp/types.d.ts.map +1 -0
  146. package/dist/server/src/mcp/utils.d.ts +21 -0
  147. package/dist/server/src/mcp/utils.d.ts.map +1 -0
  148. package/dist/server/src/services/document-metadata.d.ts +11 -1
  149. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  150. package/dist/server/src/services/index.d.ts +3 -3
  151. package/dist/server/src/services/permission-checker.d.ts +13 -3
  152. package/dist/server/src/services/permission-checker.d.ts.map +1 -1
  153. package/dist/server/src/services/utils/configuration/index.d.ts +2 -2
  154. package/dist/server/src/services/utils/configuration/layouts.d.ts +2 -2
  155. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  156. package/package.json +10 -8
@@ -0,0 +1,49 @@
1
+ import { z } from '@strapi/utils';
2
+ import type { Core, Modules, Struct } from '@strapi/types';
3
+ import type { ContentManagerModelForMcp } from './types';
4
+ /** Returns true if the content type identified by `uid` has the i18n `localized` plugin option enabled. */
5
+ export declare const isContentTypeLocalized: (strapi: Core.Strapi, uid: string) => boolean;
6
+ /**
7
+ * Builds the base locale Zod schema for a derived MCP tool input.
8
+ * When `localeCodes` is provided, constrains the field to a `z.enum` of available codes
9
+ * with an optional default; otherwise falls back to a plain optional string.
10
+ */
11
+ export declare const buildLocaleSchema: (localeCodes: [string, ...string[]] | null, defaultLocale: string | null) => z.ZodTypeAny;
12
+ /**
13
+ * Narrows the base locale schema to only locales the session is permitted to access
14
+ * for the given action + uid combination.
15
+ *
16
+ * Returns the base schema unchanged when:
17
+ * - localeCodes is null (i18n not installed)
18
+ * - the content type is not localized
19
+ * - all installed locales are permitted for this action
20
+ *
21
+ * Returns z.never().optional() when no locales are permitted, keeping the tool
22
+ * registered but signalling no valid locale input.
23
+ */
24
+ export declare const resolvePermittedLocaleSchema: (strapi: Core.Strapi, context: Modules.MCP.McpHandlerContext, action: string, uid: string, localeCodes: [string, ...string[]] | null, defaultLocale: string | null, baseLocaleSchema: z.ZodTypeAny) => z.ZodTypeAny;
25
+ /**
26
+ * Recursively resolves leaf field paths for a component, matching the nested
27
+ * path format used by CASL rules (e.g. 'SEO.title', 'SEO.og.image').
28
+ *
29
+ * The admin RBAC system decomposes component attrs into nested paths and removes
30
+ * the parent key — so checking `ability.can(action, uid, 'SEO')` returns false
31
+ * even when the user has full access to the component's sub-fields.
32
+ */
33
+ export declare const getComponentLeafPaths: (strapi: Core.Strapi, componentUid: string, prefix: string, visited?: Set<string>) => string[];
34
+ /**
35
+ * Returns the subset of attribute keys the session may access for `action` on `uid`.
36
+ * Returns `null` when all fields are permitted (caller should skip field filtering).
37
+ * Component attributes are resolved to their nested leaf paths before checking CASL rules.
38
+ */
39
+ export declare const getPermittedFields: (strapi: Core.Strapi, userAbility: Modules.MCP.McpHandlerContext['userAbility'], action: string, uid: string, attributes: Struct.SchemaAttributes) => Set<string> | null;
40
+ /**
41
+ * Filters `localeCodes` to only those the session may access for `action`.
42
+ * Returns `null` when all locales are permitted (caller should use the unfiltered base schema).
43
+ * Returns an empty tuple-like array when no locale is permitted.
44
+ */
45
+ export declare const getPermittedLocales: (permissionChecker: {
46
+ cannot: (action: string, entity?: unknown) => boolean;
47
+ }, action: string, localeCodes: [string, ...string[]]) => [string, ...string[]] | null;
48
+ export type { ContentManagerModelForMcp };
49
+ //# sourceMappingURL=permissions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../../../server/src/mcp/permissions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAO,MAAM,eAAe,CAAC;AAGhE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAEzD,2GAA2G;AAC3G,eAAO,MAAM,sBAAsB,WAAY,KAAK,MAAM,OAAO,MAAM,KAAG,OAOzE,CAAC;AAaF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,gBACf,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,IAAI,iBAC1B,MAAM,GAAG,IAAI,KAC3B,EAAE,UAiBJ,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,4BAA4B,WAC/B,KAAK,MAAM,WACV,QAAQ,GAAG,CAAC,iBAAiB,UAC9B,MAAM,OACT,MAAM,eACE,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,IAAI,iBAC1B,MAAM,GAAG,IAAI,oBACV,EAAE,UAAU,KAC7B,EAAE,UA2BJ,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,WACxB,KAAK,MAAM,gBACL,MAAM,UACZ,MAAM,YACL,IAAI,MAAM,CAAC,KACnB,MAAM,EA8BR,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,WACrB,KAAK,MAAM,eACN,QAAQ,GAAG,CAAC,iBAAiB,CAAC,aAAa,CAAC,UACjD,MAAM,OACT,MAAM,cACC,OAAO,gBAAgB,KAClC,IAAI,MAAM,CAAC,GAAG,IAqBhB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,sBACX;IAAE,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,KAAK,OAAO,CAAA;CAAE,UACpE,MAAM,eACD,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,KACjC,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,IAY1B,CAAC;AAGF,YAAY,EAAE,yBAAyB,EAAE,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { Core } from '@strapi/types';
2
+ /**
3
+ * Registers derived content-type MCP tools during plugin bootstrap, before the MCP HTTP server starts.
4
+ */
5
+ export declare const registerContentManagerMcpTools: ({ strapi, }: {
6
+ strapi: Core.Strapi;
7
+ }) => Promise<void>;
8
+ //# sourceMappingURL=register-content-manager-mcp-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-content-manager-mcp-tools.d.ts","sourceRoot":"","sources":["../../../../server/src/mcp/register-content-manager-mcp-tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAK1C;;GAEG;AACH,eAAO,MAAM,8BAA8B,gBAExC;IACD,MAAM,EAAE,KAAK,MAAM,CAAC;CACrB,KAAG,QAAQ,IAAI,CAyBf,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { z } from '@strapi/utils';
2
+ /**
3
+ * Returns the Zod schema for a Strapi Blocks (rich-text) field input.
4
+ * Accepts an array of block nodes — paragraph, heading, quote, code, image, and list —
5
+ * matching Strapi's internal blocks data model.
6
+ */
7
+ export declare const buildBlocksInputSchema: () => z.ZodArray<z.ZodTypeAny>;
8
+ //# sourceMappingURL=blocks-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blocks-schema.d.ts","sourceRoot":"","sources":["../../../../../server/src/mcp/schemas/blocks-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAgIlC;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,QAAO,EAAE,QAAQ,CAAC,EAAE,UAAU,CAOkB,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { z } from '@strapi/utils';
2
+ import type { Core, Schema, Struct } from '@strapi/types';
3
+ import type { ContentManagerModelForMcp } from '../types';
4
+ /**
5
+ * Builds a structured Zod object schema for a Strapi component UID.
6
+ * Declared as a regular function so it is hoisted above `attributeToInputSchema`
7
+ * — the two functions are mutually recursive (component attrs recurse into
8
+ * attributeToInputSchema; attributeToInputSchema calls this for 'component' cases).
9
+ *
10
+ * @param strapi - Strapi instance (components registry available post-load).
11
+ * @param componentUid - e.g. "common.seo".
12
+ * @param visited - cycle-guard; prevents infinite recursion on self-referencing components.
13
+ */
14
+ export declare function buildComponentInputSchema(strapi: Core.Strapi, componentUid: string, visited?: Set<string>): z.ZodTypeAny;
15
+ /**
16
+ * Maps a single Strapi attribute to a Zod input schema, carrying constraints
17
+ * (min, max, minLength, maxLength, required, enum values, etc.).
18
+ *
19
+ * Mirrors the `mapAttributeToInputSchema` logic from
20
+ * `packages/core/core/src/core-api/routes/validation/mappers.ts` — kept inline
21
+ * here to avoid a cross-package import from @strapi/content-manager into
22
+ * @strapi/core (which is not a listed dependency).
23
+ *
24
+ * TODO — custom fields call `strapi.get('custom-fields')` at schema-build
25
+ * time; confirm with an integration test that the registry is populated when MCP
26
+ * tools are registered (post-bootstrap).
27
+ */
28
+ export declare const attributeToInputSchema: (strapi: Core.Strapi, attr: Schema.Attribute.AnyAttribute, visited?: Set<string>) => z.ZodTypeAny;
29
+ /**
30
+ * Derives a per-content-type `data` Zod schema from the model's writable attributes.
31
+ * Uses `contentTypes.isWritableAttribute` to filter system-managed keys
32
+ * (id, documentId, timestamps, createdBy, updatedBy, localizations, locale, etc.).
33
+ * Unknown keys are rejected (strict mode) — invalid field names fail at the MCP boundary.
34
+ */
35
+ export declare const buildDataSchema: (strapi: Core.Strapi, schema: Struct.ContentTypeSchema | ContentManagerModelForMcp, attributes: Struct.SchemaAttributes, permittedFields?: Set<string> | null) => z.ZodTypeAny;
36
+ //# sourceMappingURL=data-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-schema.d.ts","sourceRoot":"","sources":["../../../../../server/src/mcp/schemas/data-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,CAAC,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAG1D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAc1D;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,OAAO,GAAE,GAAG,CAAC,MAAM,CAAa,GAC/B,CAAC,CAAC,UAAU,CA2Bd;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,sBAAsB,WACzB,KAAK,MAAM,QACb,OAAO,SAAS,CAAC,YAAY,YAC1B,IAAI,MAAM,CAAC,KACnB,EAAE,UAiNJ,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,WAClB,KAAK,MAAM,UACX,OAAO,iBAAiB,GAAG,yBAAyB,cAChD,OAAO,gBAAgB,oBACjB,IAAI,MAAM,CAAC,GAAG,IAAI,KACnC,EAAE,UAmBJ,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { z } from '@strapi/utils';
2
+ import type { Schema, Struct } from '@strapi/types';
3
+ /**
4
+ * Maps a scalar Strapi attribute type to the appropriate Zod leaf value schema
5
+ * used inside filter operator objects (e.g. { $eq: <value> }).
6
+ */
7
+ export declare const attributeTypeToFilterValue: (attr: Schema.Attribute.AnyAttribute) => z.ZodTypeAny;
8
+ /** All supported Strapi filter operators (excludes the experimental `$jsonSupersetOf`). */
9
+ export declare const FILTER_OPERATORS: readonly ["$eq", "$eqi", "$ne", "$nei", "$in", "$notIn", "$lt", "$lte", "$gt", "$gte", "$between", "$contains", "$notContains", "$containsi", "$notContainsi", "$startsWith", "$startsWithi", "$endsWith", "$endsWithi", "$null", "$notNull"];
10
+ /**
11
+ * Builds a per-content-type recursive filters Zod schema.
12
+ *
13
+ * Shape:
14
+ * - Logical operators: $and, $or accept an array of filter objects.
15
+ * - Logical operator: $not accepts a single filter object.
16
+ * - Field keys (scalar attrs only): accept either a direct value (implicit $eq)
17
+ * or an operator object { $eq, $contains, $gt, … }.
18
+ *
19
+ * If the model has no scalar attributes, the schema is z.never() (filters not allowed).
20
+ */
21
+ export declare const buildFiltersSchema: (attributes: Struct.SchemaAttributes, permittedFields?: Set<string> | null) => z.ZodTypeAny;
22
+ //# sourceMappingURL=filters-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filters-schema.d.ts","sourceRoot":"","sources":["../../../../../server/src/mcp/schemas/filters-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAGpD;;;GAGG;AACH,eAAO,MAAM,0BAA0B,SAAU,OAAO,SAAS,CAAC,YAAY,KAAG,EAAE,UAuBlF,CAAC;AAEF,2FAA2F;AAC3F,eAAO,MAAM,gBAAgB,+OAsBnB,CAAC;AAEX;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,eACjB,OAAO,gBAAgB,oBACjB,IAAI,MAAM,CAAC,GAAG,IAAI,KACnC,EAAE,UAqCJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ export { buildBlocksInputSchema } from './blocks-schema';
2
+ export { localeSchema, statusSchema, documentIdSchema, pageSchema, pageSizeSchema, } from './input-schemas';
3
+ export { buildDataSchema, buildComponentInputSchema, attributeToInputSchema } from './data-schema';
4
+ export { buildSortSchema, getScalarAttributeKeys, SCALAR_ATTRIBUTE_TYPES } from './sort-schema';
5
+ export { buildFiltersSchema, FILTER_OPERATORS, attributeTypeToFilterValue } from './filters-schema';
6
+ export { buildDocumentOutputSchema, buildListOutputSchema, buildDeleteOutputSchema, } from './output-schemas';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../server/src/mcp/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,cAAc,GACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACnG,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAChG,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AACpG,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { z } from '@strapi/utils';
2
+ export declare const localeSchema: z.ZodOptional<z.ZodString>;
3
+ export declare const statusSchema: z.ZodOptional<z.ZodEnum<{
4
+ draft: "draft";
5
+ published: "published";
6
+ }>>;
7
+ export declare const documentIdSchema: z.ZodString;
8
+ export declare const pageSchema: z.ZodOptional<z.ZodNumber>;
9
+ export declare const pageSizeSchema: z.ZodOptional<z.ZodNumber>;
10
+ //# sourceMappingURL=input-schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-schemas.d.ts","sourceRoot":"","sources":["../../../../../server/src/mcp/schemas/input-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAElC,eAAO,MAAM,YAAY,4BAGoD,CAAC;AAE9E,eAAO,MAAM,YAAY;;;GAG2D,CAAC;AAErF,eAAO,MAAM,gBAAgB,aAK1B,CAAC;AAEJ,eAAO,MAAM,UAAU,4BAK4B,CAAC;AAEpD,eAAO,MAAM,cAAc,4BAM2B,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { z } from '@strapi/utils';
2
+ import type { Struct } from '@strapi/types';
3
+ /**
4
+ * Builds the MCP output schema for a single-document response (`{ data, meta }`).
5
+ * Field shape is constrained to `readFields` when non-null (RBAC field filtering).
6
+ */
7
+ export declare const buildDocumentOutputSchema: (attributes: Struct.SchemaAttributes, readFields: Set<string> | null) => z.ZodObject<z.ZodRawShape>;
8
+ /**
9
+ * Builds the MCP output schema for a paginated list response (`{ results, pagination }`).
10
+ * Field shape is constrained to `readFields` when non-null (RBAC field filtering).
11
+ */
12
+ export declare const buildListOutputSchema: (attributes: Struct.SchemaAttributes, readFields: Set<string> | null) => z.ZodObject<z.ZodRawShape>;
13
+ /**
14
+ * Builds the MCP output schema for a delete response (`{ data }`).
15
+ * Field shape is constrained to `readFields` when non-null (RBAC field filtering).
16
+ */
17
+ export declare const buildDeleteOutputSchema: (attributes: Struct.SchemaAttributes, readFields: Set<string> | null) => z.ZodObject<z.ZodRawShape>;
18
+ //# sourceMappingURL=output-schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output-schemas.d.ts","sourceRoot":"","sources":["../../../../../server/src/mcp/schemas/output-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAmB5C;;;GAGG;AACH,eAAO,MAAM,yBAAyB,eACxB,OAAO,gBAAgB,cACvB,IAAI,MAAM,CAAC,GAAG,IAAI,KAC7B,EAAE,SAAS,CAAC,EAAE,WAAW,CAWhB,CAAC;AAEb;;;GAGG;AACH,eAAO,MAAM,qBAAqB,eACpB,OAAO,gBAAgB,cACvB,IAAI,MAAM,CAAC,GAAG,IAAI,KAC7B,EAAE,SAAS,CAAC,EAAE,WAAW,CAWhB,CAAC;AAEb;;;GAGG;AACH,eAAO,MAAM,uBAAuB,eACtB,OAAO,gBAAgB,cACvB,IAAI,MAAM,CAAC,GAAG,IAAI,KAC7B,EAAE,SAAS,CAAC,EAAE,WAAW,CAKhB,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { z } from '@strapi/utils';
2
+ import type { Struct } from '@strapi/types';
3
+ /** Attribute types considered scalar for sorting and filtering (excludes relations, components, media, json, blocks). */
4
+ export declare const SCALAR_ATTRIBUTE_TYPES: Set<string>;
5
+ /**
6
+ * Returns the list of scalar attribute keys from a content type's attributes.
7
+ * Relation, component, dynamiczone, media, json, and blocks are excluded because
8
+ * they cannot be meaningfully sorted or filtered via simple operators.
9
+ */
10
+ export declare const getScalarAttributeKeys: (attributes: Struct.SchemaAttributes, permittedFields?: Set<string> | null) => string[];
11
+ /**
12
+ * Builds a per-content-type sort Zod schema constrained to the model's scalar fields.
13
+ *
14
+ * Supports all four Strapi sort notations:
15
+ * - string: "title:asc"
16
+ * - string[]: ["title:asc", "createdAt:desc"]
17
+ * - object: { title: "asc" }
18
+ * - object[]: [{ title: "asc" }, { createdAt: "desc" }]
19
+ *
20
+ * Object forms have their keys constrained to known scalar attribute names.
21
+ * If the model has no scalar attributes, the schema is z.never() (sort not allowed).
22
+ */
23
+ export declare const buildSortSchema: (attributes: Struct.SchemaAttributes, permittedFields?: Set<string> | null) => z.ZodTypeAny;
24
+ //# sourceMappingURL=sort-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sort-schema.d.ts","sourceRoot":"","sources":["../../../../../server/src/mcp/schemas/sort-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C,yHAAyH;AACzH,eAAO,MAAM,sBAAsB,aAiBjC,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,eACrB,OAAO,gBAAgB,oBACjB,IAAI,MAAM,CAAC,GAAG,IAAI,KACnC,MAAM,EAaR,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,eACd,OAAO,gBAAgB,oBACjB,IAAI,MAAM,CAAC,GAAG,IAAI,KACnC,EAAE,UAqCJ,CAAC"}
@@ -0,0 +1,31 @@
1
+ import type { Struct, Modules } from '@strapi/types';
2
+ import type { z } from '@strapi/utils';
3
+ export type ContentManagerModelForMcp = Pick<Struct.ContentTypeSchema, 'uid' | 'kind' | 'options'> & {
4
+ /** Present on content-manager DTOs from data-mapper.toContentManagerModel */
5
+ apiID: string;
6
+ /**
7
+ * Formatted attributes from data-mapper.toContentManagerModel (includes id, documentId,
8
+ * timestamps, creator fields).
9
+ */
10
+ attributes: Struct.SchemaAttributes;
11
+ };
12
+ export type McpToolsBuildContext = {
13
+ /** Installed locale codes from i18n plugin. null when i18n is not installed. */
14
+ localeCodes: [string, ...string[]] | null;
15
+ /** Default locale from i18n plugin. null when i18n is not installed or unknown. */
16
+ defaultLocale: string | null;
17
+ };
18
+ export type DerivedTool = {
19
+ name: string;
20
+ telemetry: {
21
+ source: 'content-manager';
22
+ name: string;
23
+ };
24
+ title: string;
25
+ description: string;
26
+ auth: Modules.MCP.McpCapabilityAuth;
27
+ resolveInputSchema: (context: Modules.MCP.McpHandlerContext) => z.ZodObject<z.ZodRawShape>;
28
+ resolveOutputSchema: (context: Modules.MCP.McpHandlerContext) => z.ZodObject<z.ZodRawShape>;
29
+ createHandler: (strapi: import('@strapi/types').Core.Strapi, context: Modules.MCP.McpHandlerContext) => Modules.MCP.McpToolHandler<z.ZodObject<z.ZodRawShape>, z.ZodObject<z.ZodRawShape>>;
30
+ };
31
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../server/src/mcp/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAEvC,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAC1C,MAAM,CAAC,iBAAiB,EACxB,KAAK,GAAG,MAAM,GAAG,SAAS,CAC3B,GAAG;IACF,6EAA6E;IAC7E,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC,gBAAgB,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,gFAAgF;IAChF,WAAW,EAAE,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC;IAC1C,mFAAmF;IACnF,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE;QAAE,MAAM,EAAE,iBAAiB,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC;IACpC,kBAAkB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;IAC3F,mBAAmB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;IAC5F,aAAa,EAAE,CACb,MAAM,EAAE,OAAO,eAAe,EAAE,IAAI,CAAC,MAAM,EAC3C,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,KACnC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;CACzF,CAAC"}
@@ -0,0 +1,21 @@
1
+ import type { Modules } from '@strapi/types';
2
+ /**
3
+ * Converts a Strapi content-type UID into a safe MCP tool-name segment.
4
+ * `api::article.article` → `article`; `plugin::i18n.locale` → `plugin-i18n_locale`.
5
+ */
6
+ export declare const slugifyUidForMcpToolName: (uid: string) => string;
7
+ /** Wraps a plain object into the dual-representation MCP tool return value (text + structuredContent). */
8
+ export declare const ok: (structuredContent: Record<string, unknown>) => Modules.MCP.McpToolHandlerReturn;
9
+ /**
10
+ * Generates the `title` and `description` metadata for a derived MCP tool.
11
+ * Appends operation-specific notes for write/publish/unpublish/discard_draft operations.
12
+ */
13
+ export declare const describeTool: (params: {
14
+ apiID: string;
15
+ uid: string;
16
+ operation: string;
17
+ }) => {
18
+ title: string;
19
+ description: string;
20
+ };
21
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../server/src/mcp/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,wBAAwB,QAAS,MAAM,KAAG,MAOtD,CAAC;AAEF,0GAA0G;AAC1G,eAAO,MAAM,EAAE,sBACM,OAAO,MAAM,EAAE,OAAO,CAAC,KACzC,QAAQ,GAAG,CAAC,oBAGb,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,YAAY,WAAY;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;CACnB,KAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAiBvC,CAAC"}
@@ -25,7 +25,17 @@ declare const _default: ({ strapi }: {
25
25
  strapi: Core.Strapi;
26
26
  }) => {
27
27
  /**
28
- * Returns available locales of a document for the current status
28
+ * Returns available locales of a document for the current status.
29
+ *
30
+ * The result is sorted with the default locale (as defined by the i18n plugin)
31
+ * at index 0 when present. This is the canonical-source invariant relied on by
32
+ * `useDocument.getInitialFormValues` in the admin: when creating a new locale
33
+ * draft, non-localized scalar/media values are inherited from
34
+ * `availableLocales[0]`. Putting the default locale first means inheritance
35
+ * stays predictable when sibling locales have drifted on non-localized fields
36
+ * (which can happen because the server only syncs non-localized fields at
37
+ * locale-creation time, not on subsequent updates — see
38
+ * `copyNonLocalizedFields` in document-service/internationalization.ts).
29
39
  */
30
40
  getAvailableLocales(uid: UID.ContentType, version: DocumentVersion, allVersions: DocumentVersion[]): Promise<import("../../../shared/contracts/collection-types").AvailableLocaleDocument[]>;
31
41
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"document-metadata.d.ts","sourceRoot":"","sources":["../../../../server/src/services/document-metadata.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAInF,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,eAAe,EAAE,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;CACpC;AA0CD;;;;;;;;GAQG;AACH,MAAM,WAAW,kBAAkB;IACjC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;qCAoB2B;IAAE,MAAM,EAAE,KAAK,MAAM,CAAA;CAAE;IACjD;;OAEG;6BAEI,IAAI,WAAW,WACX,eAAe,eACX,eAAe,EAAE;IA2ChC;;OAEG;gCACyB,eAAe,eAAe,eAAe,EAAE;IAoB3E;;;;;OAKG;gCAC+B,IAAI,WAAW,aAAa,eAAe,EAAE;uBAuB5D,eAAe,0BAA0B,gBAAgB,CAAC,iBAAiB,CAAC;qBAgCxF,IAAI,WAAW,WACX,eAAe,0CAC6B,kBAAkB;;;;;;;;;IA8GzE;;;;OAIG;oCAEI,IAAI,WAAW,YACV,eAAe,SACnB,kBAAkB;;;;;;;;;;;;;;;;;;;AA9P5B,wBAgTG"}
1
+ {"version":3,"file":"document-metadata.d.ts","sourceRoot":"","sources":["../../../../server/src/services/document-metadata.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAInF,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,eAAe,EAAE,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;CACpC;AA0CD;;;;;;;;GAQG;AACH,MAAM,WAAW,kBAAkB;IACjC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;qCAoB2B;IAAE,MAAM,EAAE,KAAK,MAAM,CAAA;CAAE;IACjD;;;;;;;;;;;;OAYG;6BAEI,IAAI,WAAW,WACX,eAAe,eACX,eAAe,EAAE;IA8DhC;;OAEG;gCACyB,eAAe,eAAe,eAAe,EAAE;IAoB3E;;;;;OAKG;gCAC+B,IAAI,WAAW,aAAa,eAAe,EAAE;uBAuB5D,eAAe,0BAA0B,gBAAgB,CAAC,iBAAiB,CAAC;qBAgCxF,IAAI,WAAW,WACX,eAAe,0CAC6B,kBAAkB;;;;;;;;;IA8GzE;;;;OAIG;oCAEI,IAAI,WAAW,YACV,eAAe,SACnB,kBAAkB;;;;;;;;;;;;;;;;;;;AA3R5B,wBA6UG"}
@@ -175,19 +175,19 @@ declare const _default: {
175
175
  strapi: import("@strapi/types/dist/core").Strapi;
176
176
  }) => {
177
177
  create: ({ userAbility, model }: {
178
- userAbility: any;
178
+ userAbility: import("@casl/ability").Ability<import("@casl/ability").AbilityTuple, any>;
179
179
  model: string;
180
180
  }) => {
181
181
  can: (action: string, entity?: ({
182
182
  id: import("@strapi/types/dist/data").ID;
183
183
  } & {
184
184
  [key: string]: any;
185
- }) | undefined, field: string) => any;
185
+ }) | undefined, field: string) => boolean;
186
186
  cannot: (action: string, entity?: ({
187
187
  id: import("@strapi/types/dist/data").ID;
188
188
  } & {
189
189
  [key: string]: any;
190
- }) | undefined, field: string) => any;
190
+ }) | undefined, field: string) => boolean;
191
191
  requiresEntity: (action: string) => boolean;
192
192
  sanitizeOutput: (data: {
193
193
  id: import("@strapi/types/dist/data").ID;
@@ -1,4 +1,14 @@
1
+ import type { Ability } from '@casl/ability';
1
2
  import type { Core } from '@strapi/types';
3
+ export declare const ACTIONS: {
4
+ readonly read: "plugin::content-manager.explorer.read";
5
+ readonly create: "plugin::content-manager.explorer.create";
6
+ readonly update: "plugin::content-manager.explorer.update";
7
+ readonly delete: "plugin::content-manager.explorer.delete";
8
+ readonly publish: "plugin::content-manager.explorer.publish";
9
+ readonly unpublish: "plugin::content-manager.explorer.publish";
10
+ readonly discard: "plugin::content-manager.explorer.update";
11
+ };
2
12
  type Query = {
3
13
  page?: string;
4
14
  pageSize?: string;
@@ -8,19 +18,19 @@ declare const _default: ({ strapi }: {
8
18
  strapi: Core.Strapi;
9
19
  }) => {
10
20
  create: ({ userAbility, model }: {
11
- userAbility: any;
21
+ userAbility: Ability<import("@casl/ability").AbilityTuple, any>;
12
22
  model: string;
13
23
  }) => {
14
24
  can: (action: string, entity?: ({
15
25
  id: import("@strapi/types/dist/data").ID;
16
26
  } & {
17
27
  [key: string]: any;
18
- }) | undefined, field: string) => any;
28
+ }) | undefined, field: string) => boolean;
19
29
  cannot: (action: string, entity?: ({
20
30
  id: import("@strapi/types/dist/data").ID;
21
31
  } & {
22
32
  [key: string]: any;
23
- }) | undefined, field: string) => any;
33
+ }) | undefined, field: string) => boolean;
24
34
  requiresEntity: (action: string) => boolean;
25
35
  sanitizeOutput: (data: {
26
36
  id: import("@strapi/types/dist/data").ID;
@@ -1 +1 @@
1
- {"version":3,"file":"permission-checker.d.ts","sourceRoot":"","sources":["../../../../server/src/services/permission-checker.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAgB,MAAM,eAAe,CAAC;AAaxD,KAAK,KAAK,GAAG;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;qCA6I0B;IAAE,MAAM,EAAE,KAAK,MAAM,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAnD,wBAEG"}
1
+ {"version":3,"file":"permission-checker.d.ts","sourceRoot":"","sources":["../../../../server/src/services/permission-checker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAG7C,OAAO,KAAK,EAAE,IAAI,EAAgB,MAAM,eAAe,CAAC;AAExD,eAAO,MAAM,OAAO;;;;;;;;CAQV,CAAC;AAGX,KAAK,KAAK,GAAG;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;qCA6I0B;IAAE,MAAM,EAAE,KAAK,MAAM,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAnD,wBAEG"}
@@ -2,15 +2,15 @@ declare function createDefaultConfiguration(schema: any): Promise<{
2
2
  settings: any;
3
3
  metadatas: any;
4
4
  layouts: {
5
- edit: any;
6
5
  list: any;
6
+ edit: any;
7
7
  };
8
8
  }>;
9
9
  declare function syncConfiguration(conf: any, schema: any): Promise<{
10
10
  settings: any;
11
11
  layouts: {
12
- edit: any;
13
12
  list: any;
13
+ edit: any;
14
14
  } | {
15
15
  list: any;
16
16
  edit: any;
@@ -1,11 +1,11 @@
1
1
  declare function createDefaultLayouts(schema: any): Promise<{
2
- edit: any;
3
2
  list: any;
3
+ edit: any;
4
4
  }>;
5
5
  /** Synchronisation functions */
6
6
  declare function syncLayouts(configuration: any, schema: any): Promise<{
7
- edit: any;
8
7
  list: any;
8
+ edit: any;
9
9
  }> | {
10
10
  list: any;
11
11
  edit: any;
@@ -1 +1 @@
1
- {"version":3,"file":"populate.d.ts","sourceRoot":"","sources":["../../../../../server/src/services/utils/populate.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAU,OAAO,EAAE,MAAM,eAAe,CAAC;AAqB1D,MAAM,MAAM,QAAQ,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAE7E,KAAK,eAAe,GAAG;IACrB,eAAe,CAAC,EAAE,QAAQ,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAsHF;;;;;GAKG;AACH,QAAA,MAAM,eAAe,QACd,IAAI,MAAM,wDAMZ,eAAe,uBAgCnB,CAAC;AAUF,QAAA,MAAM,wBAAwB,QAAS,IAAI,MAAM,KAAG,OAAO,MAAM,EAAE,GAAG,CAiFrE,CAAC;AAaF,QAAA,MAAM,yBAAyB,QAAS,IAAI,MAAM;cAFU,GAAG;kBAAgB,OAAO;CAqFrF,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,gBAAgB,QAAe,IAAI,MAAM,SAAS,MAAM,KAAG,QAAQ,QAAQ,CA8BhF,CAAC;AAIF,QAAA,MAAM,iBAAiB,QAAe,IAAI,cAAc,iBAcvD,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,2BAA2B,UAAW,IAAI,MAAM;;;;;;CAUrD,CAAC;AAEF,OAAO,EACL,eAAe,EACf,yBAAyB,EACzB,wBAAwB,EACxB,gBAAgB,EAChB,iBAAiB,EACjB,2BAA2B,GAC5B,CAAC"}
1
+ {"version":3,"file":"populate.d.ts","sourceRoot":"","sources":["../../../../../server/src/services/utils/populate.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAU,OAAO,EAAE,MAAM,eAAe,CAAC;AAsB1D,MAAM,MAAM,QAAQ,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAE7E,KAAK,eAAe,GAAG;IACrB,eAAe,CAAC,EAAE,QAAQ,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAsHF;;;;;GAKG;AACH,QAAA,MAAM,eAAe,QACd,IAAI,MAAM,wDAMZ,eAAe,uBAgCnB,CAAC;AAUF,QAAA,MAAM,wBAAwB,QAAS,IAAI,MAAM,KAAG,OAAO,MAAM,EAAE,GAAG,CAuFrE,CAAC;AAaF,QAAA,MAAM,yBAAyB,QAAS,IAAI,MAAM;cAFU,GAAG;kBAAgB,OAAO;CAqFrF,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,gBAAgB,QAAe,IAAI,MAAM,SAAS,MAAM,KAAG,QAAQ,QAAQ,CA8BhF,CAAC;AAIF,QAAA,MAAM,iBAAiB,QAAe,IAAI,cAAc,iBAcvD,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,2BAA2B,UAAW,IAAI,MAAM;;;;;;CAUrD,CAAC;AAEF,OAAO,EACL,eAAe,EACf,yBAAyB,EACzB,wBAAwB,EACxB,gBAAgB,EAChB,iBAAiB,EACjB,2BAA2B,GAC5B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/content-manager",
3
- "version": "5.46.1",
3
+ "version": "5.47.1",
4
4
  "description": "A powerful UI to easily manage your data.",
5
5
  "homepage": "https://strapi.io",
6
6
  "bugs": {
@@ -66,6 +66,7 @@
66
66
  "watch": "run -T rollup -c -w"
67
67
  },
68
68
  "dependencies": {
69
+ "@casl/ability": "6.7.5",
69
70
  "@dnd-kit/core": "6.3.1",
70
71
  "@dnd-kit/sortable": "10.0.0",
71
72
  "@dnd-kit/utilities": "3.2.2",
@@ -74,8 +75,8 @@
74
75
  "@sindresorhus/slugify": "1.1.0",
75
76
  "@strapi/design-system": "2.2.0",
76
77
  "@strapi/icons": "2.2.0",
77
- "@strapi/types": "5.46.1",
78
- "@strapi/utils": "5.46.1",
78
+ "@strapi/types": "5.47.1",
79
+ "@strapi/utils": "5.47.1",
79
80
  "codemirror5": "npm:codemirror@^5.65.11",
80
81
  "date-fns": "2.30.0",
81
82
  "fractional-indexing": "3.2.0",
@@ -94,7 +95,7 @@
94
95
  "markdown-it-sub": "^1.0.0",
95
96
  "markdown-it-sup": "1.0.0",
96
97
  "prismjs": "1.30.0",
97
- "qs": "6.15.0",
98
+ "qs": "6.15.2",
98
99
  "react-dnd": "16.0.1",
99
100
  "react-dnd-html5-backend": "16.0.1",
100
101
  "react-helmet": "^6.1.0",
@@ -102,15 +103,16 @@
102
103
  "react-query": "3.39.3",
103
104
  "react-redux": "8.1.3",
104
105
  "react-window": "1.8.10",
105
- "sanitize-html": "2.13.0",
106
+ "sanitize-html": "2.17.4",
106
107
  "slate": "0.94.1",
107
108
  "slate-history": "0.93.0",
108
109
  "slate-react": "0.98.3",
109
- "yup": "0.32.9"
110
+ "yup": "0.32.9",
111
+ "zod": "3.25.67"
110
112
  },
111
113
  "devDependencies": {
112
- "@strapi/admin": "5.46.1",
113
- "@strapi/database": "5.46.1",
114
+ "@strapi/admin": "5.47.1",
115
+ "@strapi/database": "5.47.1",
114
116
  "@testing-library/react": "16.3.0",
115
117
  "@types/jest": "29.5.2",
116
118
  "@types/lodash": "^4.14.191",