@strapi/content-manager 5.39.0 → 5.41.0

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 (115) hide show
  1. package/dist/admin/hooks/useDocument.js +21 -5
  2. package/dist/admin/hooks/useDocument.js.map +1 -1
  3. package/dist/admin/hooks/useDocument.mjs +22 -6
  4. package/dist/admin/hooks/useDocument.mjs.map +1 -1
  5. package/dist/admin/pages/EditView/components/DocumentActions.js +1 -0
  6. package/dist/admin/pages/EditView/components/DocumentActions.js.map +1 -1
  7. package/dist/admin/pages/EditView/components/DocumentActions.mjs +3 -2
  8. package/dist/admin/pages/EditView/components/DocumentActions.mjs.map +1 -1
  9. package/dist/admin/pages/EditView/components/FormInputs/Component/Input.mjs +4 -4
  10. package/dist/admin/pages/EditView/components/FormInputs/Component/Input.mjs.map +1 -1
  11. package/dist/admin/pages/EditView/components/FormInputs/Component/NonRepeatable.js +71 -44
  12. package/dist/admin/pages/EditView/components/FormInputs/Component/NonRepeatable.js.map +1 -1
  13. package/dist/admin/pages/EditView/components/FormInputs/Component/NonRepeatable.mjs +54 -46
  14. package/dist/admin/pages/EditView/components/FormInputs/Component/NonRepeatable.mjs.map +1 -1
  15. package/dist/admin/pages/EditView/components/FormInputs/Component/Repeatable.js +107 -88
  16. package/dist/admin/pages/EditView/components/FormInputs/Component/Repeatable.js.map +1 -1
  17. package/dist/admin/pages/EditView/components/FormInputs/Component/Repeatable.mjs +109 -90
  18. package/dist/admin/pages/EditView/components/FormInputs/Component/Repeatable.mjs.map +1 -1
  19. package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/DynamicComponent.js +91 -106
  20. package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/DynamicComponent.js.map +1 -1
  21. package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/DynamicComponent.mjs +94 -109
  22. package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/DynamicComponent.mjs.map +1 -1
  23. package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/Field.js +43 -23
  24. package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/Field.js.map +1 -1
  25. package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/Field.mjs +45 -25
  26. package/dist/admin/pages/EditView/components/FormInputs/DynamicZone/Field.mjs.map +1 -1
  27. package/dist/admin/pages/EditView/components/FormInputs/Relations/RelationModal.mjs +2 -2
  28. package/dist/admin/pages/EditView/components/FormInputs/Relations/Relations.js +30 -19
  29. package/dist/admin/pages/EditView/components/FormInputs/Relations/Relations.js.map +1 -1
  30. package/dist/admin/pages/EditView/components/FormInputs/Relations/Relations.mjs +34 -23
  31. package/dist/admin/pages/EditView/components/FormInputs/Relations/Relations.mjs.map +1 -1
  32. package/dist/admin/pages/EditView/components/FormInputs/UID.mjs +1 -1
  33. package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/EditorLayout.mjs +1 -1
  34. package/dist/admin/pages/EditView/components/FormInputs/Wysiwyg/WysiwygStyles.mjs +1 -1
  35. package/dist/admin/pages/EditView/components/FormLayout.js +23 -3
  36. package/dist/admin/pages/EditView/components/FormLayout.js.map +1 -1
  37. package/dist/admin/pages/EditView/components/FormLayout.mjs +4 -3
  38. package/dist/admin/pages/EditView/components/FormLayout.mjs.map +1 -1
  39. package/dist/admin/pages/EditView/components/Header.js +59 -9
  40. package/dist/admin/pages/EditView/components/Header.js.map +1 -1
  41. package/dist/admin/pages/EditView/components/Header.mjs +63 -13
  42. package/dist/admin/pages/EditView/components/Header.mjs.map +1 -1
  43. package/dist/admin/pages/EditView/components/InputRenderer.js +19 -7
  44. package/dist/admin/pages/EditView/components/InputRenderer.js.map +1 -1
  45. package/dist/admin/pages/EditView/components/InputRenderer.mjs +20 -8
  46. package/dist/admin/pages/EditView/components/InputRenderer.mjs.map +1 -1
  47. package/dist/admin/pages/ListView/ListViewPage.js +47 -0
  48. package/dist/admin/pages/ListView/ListViewPage.js.map +1 -1
  49. package/dist/admin/pages/ListView/ListViewPage.mjs +50 -3
  50. package/dist/admin/pages/ListView/ListViewPage.mjs.map +1 -1
  51. package/dist/admin/pages/ListView/components/BulkActions/PublishAction.js +15 -19
  52. package/dist/admin/pages/ListView/components/BulkActions/PublishAction.js.map +1 -1
  53. package/dist/admin/pages/ListView/components/BulkActions/PublishAction.mjs +15 -20
  54. package/dist/admin/pages/ListView/components/BulkActions/PublishAction.mjs.map +1 -1
  55. package/dist/admin/src/pages/EditView/components/FormInputs/Component/NonRepeatable.d.ts +3 -2
  56. package/dist/admin/src/pages/EditView/components/FormInputs/Component/Repeatable.d.ts +3 -2
  57. package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/DynamicComponent.d.ts +3 -3
  58. package/dist/admin/src/pages/EditView/components/FormLayout.d.ts +1 -1
  59. package/dist/admin/src/pages/EditView/components/InputRenderer.d.ts +1 -1
  60. package/dist/admin/src/pages/ListView/components/BulkActions/PublishAction.d.ts +3 -0
  61. package/dist/admin/src/pages/ListView/components/Filters.d.ts +3 -0
  62. package/dist/admin/translations/en.json.js +3 -0
  63. package/dist/admin/translations/en.json.js.map +1 -1
  64. package/dist/admin/translations/en.json.mjs +3 -0
  65. package/dist/admin/translations/en.json.mjs.map +1 -1
  66. package/dist/server/controllers/collection-types.js +25 -28
  67. package/dist/server/controllers/collection-types.js.map +1 -1
  68. package/dist/server/controllers/collection-types.mjs +20 -23
  69. package/dist/server/controllers/collection-types.mjs.map +1 -1
  70. package/dist/server/controllers/single-types.js +2 -1
  71. package/dist/server/controllers/single-types.js.map +1 -1
  72. package/dist/server/controllers/single-types.mjs +2 -1
  73. package/dist/server/controllers/single-types.mjs.map +1 -1
  74. package/dist/server/services/document-manager.js +10 -9
  75. package/dist/server/services/document-manager.js.map +1 -1
  76. package/dist/server/services/document-manager.mjs +10 -9
  77. package/dist/server/services/document-manager.mjs.map +1 -1
  78. package/dist/server/services/document-metadata.js +84 -41
  79. package/dist/server/services/document-metadata.js.map +1 -1
  80. package/dist/server/services/document-metadata.mjs +85 -42
  81. package/dist/server/services/document-metadata.mjs.map +1 -1
  82. package/dist/server/services/populate-builder.js +11 -0
  83. package/dist/server/services/populate-builder.js.map +1 -1
  84. package/dist/server/services/populate-builder.mjs +12 -1
  85. package/dist/server/services/populate-builder.mjs.map +1 -1
  86. package/dist/server/services/utils/configuration/attributes.js +2 -1
  87. package/dist/server/services/utils/configuration/attributes.js.map +1 -1
  88. package/dist/server/services/utils/configuration/attributes.mjs +2 -1
  89. package/dist/server/services/utils/configuration/attributes.mjs.map +1 -1
  90. package/dist/server/services/utils/draft.js +8 -1
  91. package/dist/server/services/utils/draft.js.map +1 -1
  92. package/dist/server/services/utils/draft.mjs +8 -1
  93. package/dist/server/services/utils/draft.mjs.map +1 -1
  94. package/dist/server/services/utils/populate.js +73 -8
  95. package/dist/server/services/utils/populate.js.map +1 -1
  96. package/dist/server/services/utils/populate.mjs +73 -9
  97. package/dist/server/services/utils/populate.mjs.map +1 -1
  98. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  99. package/dist/server/src/controllers/single-types.d.ts.map +1 -1
  100. package/dist/server/src/controllers/utils/metadata.d.ts +2 -2
  101. package/dist/server/src/index.d.ts +18 -3
  102. package/dist/server/src/index.d.ts.map +1 -1
  103. package/dist/server/src/services/document-manager.d.ts +9 -3
  104. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  105. package/dist/server/src/services/document-metadata.d.ts +8 -0
  106. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  107. package/dist/server/src/services/index.d.ts +18 -3
  108. package/dist/server/src/services/index.d.ts.map +1 -1
  109. package/dist/server/src/services/populate-builder.d.ts +7 -0
  110. package/dist/server/src/services/populate-builder.d.ts.map +1 -1
  111. package/dist/server/src/services/utils/configuration/attributes.d.ts.map +1 -1
  112. package/dist/server/src/services/utils/draft.d.ts.map +1 -1
  113. package/dist/server/src/services/utils/populate.d.ts +21 -17
  114. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  115. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"populate.mjs","sources":["../../../../server/src/services/utils/populate.ts"],"sourcesContent":["import { merge, isEmpty, set, propEq } from 'lodash/fp';\nimport strapiUtils from '@strapi/utils';\nimport type { UID, Schema, Modules } from '@strapi/types';\nimport { getService } from '../../utils';\n\nconst { isVisibleAttribute, isScalarAttribute, getDoesAttributeRequireValidation } =\n strapiUtils.contentTypes;\nconst { isAnyToMany } = strapiUtils.relations;\nconst { PUBLISHED_AT_ATTRIBUTE } = strapiUtils.contentTypes.constants;\n\nconst isMorphToRelation = (attribute: any) =>\n isRelation(attribute) && attribute.relation.includes('morphTo');\nconst isMedia = propEq('type', 'media');\nconst isRelation = propEq('type', 'relation');\nconst isComponent = propEq('type', 'component');\nconst isDynamicZone = propEq('type', 'dynamiczone');\n\n// TODO: Import from @strapi/types when it's available there\ntype Model = Parameters<typeof isVisibleAttribute>[0];\nexport type Populate = Modules.EntityService.Params.Populate.Any<UID.Schema>;\n\ntype PopulateOptions = {\n initialPopulate?: Populate;\n countMany?: boolean;\n countOne?: boolean;\n maxLevel?: number;\n};\n\n/**\n * Populate the model for relation\n * @param attribute - Attribute containing a relation\n * @param attribute.relation - type of relation\n * @param model - Model of the populated entity\n * @param attributeName\n * @param options - Options to apply while populating\n */\nfunction getPopulateForRelation(\n attribute: Schema.Attribute.AnyAttribute,\n model: Model,\n attributeName: string,\n { countMany, countOne, initialPopulate }: PopulateOptions\n) {\n const isManyRelation = isAnyToMany(attribute);\n\n if (initialPopulate) {\n return initialPopulate;\n }\n\n // If populating localizations attribute, also include validatable fields\n // Mainly needed for bulk locale publishing, so the Client has all the information necessary to perform validations\n if (attributeName === 'localizations') {\n const validationPopulate = getPopulateForValidation(model.uid as UID.Schema);\n\n return {\n populate: validationPopulate.populate,\n };\n }\n\n // always populate createdBy, updatedBy, localizations etc.\n if (!isVisibleAttribute(model, attributeName)) {\n return true;\n }\n\n if ((isManyRelation && countMany) || (!isManyRelation && countOne)) {\n return { count: true };\n }\n\n return true;\n}\n\n/**\n * Populate the model for Dynamic Zone components\n * @param attribute - Attribute containing the components\n * @param attribute.components - IDs of components\n * @param options - Options to apply while populating\n */\nfunction getPopulateForDZ(\n attribute: Schema.Attribute.DynamicZone,\n options: PopulateOptions,\n level: number\n) {\n // Use fragments to populate the dynamic zone components\n const populatedComponents = (attribute.components || []).reduce(\n (acc: any, componentUID: UID.Component) => ({\n ...acc,\n [componentUID]: {\n populate: getDeepPopulate(componentUID, options, level + 1),\n },\n }),\n {}\n );\n\n return { on: populatedComponents };\n}\n\n/**\n * Get the populated value based on the type of the attribute\n * @param attributeName - Name of the attribute\n * @param model - Model of the populated entity\n * @param model.attributes\n * @param options - Options to apply while populating\n * @param options.countMany\n * @param options.countOne\n * @param options.maxLevel\n * @param level\n */\nfunction getPopulateFor(\n attributeName: string,\n model: any,\n options: PopulateOptions,\n level: number\n): { [key: string]: boolean | object } {\n const attribute = model.attributes[attributeName];\n\n switch (attribute.type) {\n case 'relation':\n // @ts-expect-error - TODO: support populate count typing\n return {\n [attributeName]: getPopulateForRelation(attribute, model, attributeName, options),\n };\n case 'component':\n return {\n [attributeName]: {\n populate: getDeepPopulate(attribute.component, options, level + 1),\n },\n };\n case 'media':\n return {\n [attributeName]: {\n populate: {\n folder: true,\n },\n },\n };\n case 'dynamiczone':\n return {\n [attributeName]: getPopulateForDZ(attribute, options, level),\n };\n default:\n return {};\n }\n}\n\n/**\n * Deeply populate a model based on UID\n * @param uid - Unique identifier of the model\n * @param options - Options to apply while populating\n * @param level - Current level of nested call\n */\nconst getDeepPopulate = (\n uid: UID.Schema,\n {\n initialPopulate = {} as any,\n countMany = false,\n countOne = false,\n maxLevel = Infinity,\n }: PopulateOptions = {},\n level = 1\n) => {\n if (level > maxLevel) {\n return {};\n }\n\n const model = strapi.getModel(uid);\n\n if (!model) {\n return {};\n }\n\n return Object.keys(model.attributes).reduce(\n (populateAcc, attributeName: string) =>\n merge(\n populateAcc,\n getPopulateFor(\n attributeName,\n model,\n {\n // @ts-expect-error - improve types\n initialPopulate: initialPopulate?.[attributeName],\n countMany,\n countOne,\n maxLevel,\n },\n level\n )\n ),\n {}\n );\n};\n\n/**\n * Deeply populate a model based on UID. Only populating fields that require validation.\n * @param uid - Unique identifier of the model\n * @param options - Options to apply while populating\n * @param level - Current level of nested call\n */\nconst getPopulateForValidation = (uid: UID.Schema): Record<string, any> => {\n const model = strapi.getModel(uid);\n if (!model) {\n return {};\n }\n\n return Object.entries(model.attributes).reduce((populateAcc: any, [attributeName, attribute]) => {\n if (isScalarAttribute(attribute)) {\n // If the scalar attribute requires validation, add it to the fields array\n if (getDoesAttributeRequireValidation(attribute)) {\n populateAcc.fields = populateAcc.fields || [];\n populateAcc.fields.push(attributeName);\n }\n return populateAcc;\n }\n\n if (isMedia(attribute)) {\n if (getDoesAttributeRequireValidation(attribute)) {\n populateAcc.populate = populateAcc.populate || {};\n populateAcc.populate[attributeName] = {\n populate: {\n folder: true,\n },\n };\n return populateAcc;\n }\n }\n\n if (isComponent(attribute)) {\n // @ts-expect-error - should be a component\n const component = attribute.component;\n\n // Get the validation result for this component\n const componentResult = getPopulateForValidation(component);\n\n if (Object.keys(componentResult).length > 0) {\n populateAcc.populate = populateAcc.populate || {};\n populateAcc.populate[attributeName] = componentResult;\n }\n\n return populateAcc;\n }\n\n if (isDynamicZone(attribute)) {\n const components = (attribute as Schema.Attribute.DynamicZone).components;\n // Handle dynamic zone components\n const componentsResult = (components || []).reduce(\n (acc, componentUID) => {\n // Get validation populate for this component\n const componentResult = getPopulateForValidation(componentUID);\n\n // Only include component if it has fields requiring validation\n if (Object.keys(componentResult).length > 0) {\n acc[componentUID] = componentResult;\n }\n\n return acc;\n },\n {} as Record<string, any>\n );\n\n // Only add to populate if we have components requiring validation\n if (Object.keys(componentsResult).length > 0) {\n populateAcc.populate = populateAcc.populate || {};\n populateAcc.populate[attributeName] = { on: componentsResult };\n }\n }\n\n return populateAcc;\n }, {});\n};\n\n/**\n * getDeepPopulateDraftCount works recursively on the attributes of a model\n * creating a populated object to count all the unpublished relations within the model\n * These relations can be direct to this content type or contained within components/dynamic zones\n * @param uid of the model\n * @returns result\n * @returns result.populate\n * @returns result.hasRelations\n */\nconst getDeepPopulateDraftCount = (uid: UID.Schema) => {\n const model = strapi.getModel(uid);\n let hasRelations = false;\n\n const populate = Object.keys(model.attributes).reduce((populateAcc: any, attributeName) => {\n const attribute: Schema.Attribute.AnyAttribute = model.attributes[attributeName];\n\n switch (attribute.type) {\n case 'relation': {\n // TODO: Support polymorphic relations\n const isMorphRelation = attribute.relation.toLowerCase().startsWith('morph');\n if (isMorphRelation) {\n break;\n }\n\n if (isVisibleAttribute(model, attributeName)) {\n populateAcc[attributeName] = {\n count: true,\n filters: { [PUBLISHED_AT_ATTRIBUTE]: { $null: true } },\n };\n hasRelations = true;\n }\n break;\n }\n case 'component': {\n const { populate, hasRelations: childHasRelations } = getDeepPopulateDraftCount(\n attribute.component\n );\n if (childHasRelations) {\n populateAcc[attributeName] = {\n populate,\n };\n hasRelations = true;\n }\n break;\n }\n case 'dynamiczone': {\n const dzPopulateFragment = attribute.components?.reduce((acc, componentUID) => {\n const { populate: componentPopulate, hasRelations: componentHasRelations } =\n getDeepPopulateDraftCount(componentUID);\n\n if (componentHasRelations) {\n hasRelations = true;\n\n return { ...acc, [componentUID]: { populate: componentPopulate } };\n }\n\n return acc;\n }, {});\n\n if (!isEmpty(dzPopulateFragment)) {\n populateAcc[attributeName] = { on: dzPopulateFragment };\n }\n break;\n }\n default:\n }\n\n return populateAcc;\n }, {});\n\n return { populate, hasRelations };\n};\n\n/**\n * Create a Strapi populate object which populates all attribute fields of a Strapi query.\n */\nconst getQueryPopulate = async (uid: UID.Schema, query: object): Promise<Populate> => {\n let populateQuery: Populate = {};\n\n await strapiUtils.traverse.traverseQueryFilters(\n /**\n *\n * @param {Object} param0\n * @param {string} param0.key - Attribute name\n * @param {Object} param0.attribute - Attribute definition\n * @param {string} param0.path - Content Type path to the attribute\n * @returns\n */\n ({ attribute, path }: any) => {\n // TODO: handle dynamic zones and morph relations\n if (!attribute || isDynamicZone(attribute) || isMorphToRelation(attribute)) {\n return;\n }\n\n // Populate all relations, components and media\n if (isRelation(attribute) || isMedia(attribute) || isComponent(attribute)) {\n const populatePath = path.attribute.replace(/\\./g, '.populate.');\n // @ts-expect-error - lodash doesn't resolve the Populate type correctly\n populateQuery = set(populatePath, {}, populateQuery);\n }\n },\n { schema: strapi.getModel(uid), getModel: strapi.getModel.bind(strapi) },\n query\n );\n\n return populateQuery;\n};\n\nconst buildDeepPopulate = (uid: UID.CollectionType) => {\n return getService('populate-builder')(uid).populateDeep(Infinity).countRelations().build();\n};\n\nexport {\n getDeepPopulate,\n getDeepPopulateDraftCount,\n getPopulateForValidation,\n getQueryPopulate,\n buildDeepPopulate,\n};\n"],"names":["isVisibleAttribute","isScalarAttribute","getDoesAttributeRequireValidation","strapiUtils","contentTypes","isAnyToMany","relations","PUBLISHED_AT_ATTRIBUTE","constants","isMorphToRelation","attribute","isRelation","relation","includes","isMedia","propEq","isComponent","isDynamicZone","getPopulateForRelation","model","attributeName","countMany","countOne","initialPopulate","isManyRelation","validationPopulate","getPopulateForValidation","uid","populate","count","getPopulateForDZ","options","level","populatedComponents","components","reduce","acc","componentUID","getDeepPopulate","on","getPopulateFor","attributes","type","component","folder","maxLevel","Infinity","strapi","getModel","Object","keys","populateAcc","merge","entries","fields","push","componentResult","length","componentsResult","getDeepPopulateDraftCount","hasRelations","isMorphRelation","toLowerCase","startsWith","filters","$null","childHasRelations","dzPopulateFragment","componentPopulate","componentHasRelations","isEmpty","getQueryPopulate","query","populateQuery","traverse","traverseQueryFilters","path","populatePath","replace","set","schema","bind","buildDeepPopulate","getService","populateDeep","countRelations","build"],"mappings":";;;;AAKA,MAAM,EAAEA,kBAAkB,EAAEC,iBAAiB,EAAEC,iCAAiC,EAAE,GAChFC,WAAAA,CAAYC,YAAY;AAC1B,MAAM,EAAEC,WAAW,EAAE,GAAGF,YAAYG,SAAS;AAC7C,MAAM,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,QAAAA,QAAAA;AAAUgC,QAAAA;AAAa,KAAA;AAClC;AAEA;;IAGA,MAAMW,gBAAAA,GAAmB,OAAO5C,GAAAA,EAAiB6C,KAAAA,GAAAA;AAC/C,IAAA,IAAIC,gBAA0B,EAAC;AAE/B,IAAA,MAAMtE,WAAAA,CAAYuE,QAAQ,CAACC,oBAAoB;;;;;;;AAQ5C,QACD,CAAC,EAAEjE,SAAS,EAAEkE,IAAI,EAAO,GAAA;;AAEvB,QAAA,IAAI,CAAClE,SAAAA,IAAaO,aAAAA,CAAcP,SAAAA,CAAAA,IAAcD,kBAAkBC,SAAAA,CAAAA,EAAY;AAC1E,YAAA;AACF,QAAA;;AAGA,QAAA,IAAIC,UAAAA,CAAWD,SAAAA,CAAAA,IAAcI,OAAAA,CAAQJ,SAAAA,CAAAA,IAAcM,YAAYN,SAAAA,CAAAA,EAAY;AACzE,YAAA,MAAMmE,eAAeD,IAAAA,CAAKlE,SAAS,CAACoE,OAAO,CAAC,KAAA,EAAO,YAAA,CAAA;;YAEnDL,aAAAA,GAAgBM,GAAAA,CAAIF,YAAAA,EAAc,EAAC,EAAGJ,aAAAA,CAAAA;AACxC,QAAA;IACF,CAAA,EACA;QAAEO,MAAAA,EAAQjC,MAAAA,CAAOC,QAAQ,CAACrB,GAAAA,CAAAA;AAAMqB,QAAAA,QAAAA,EAAUD,MAAAA,CAAOC,QAAQ,CAACiC,IAAI,CAAClC,MAAAA;KAAQ,EACvEyB,KAAAA,CAAAA;IAGF,OAAOC,aAAAA;AACT;AAEA,MAAMS,oBAAoB,CAACvD,GAAAA,GAAAA;IACzB,OAAOwD,UAAAA,CAAW,oBAAoBxD,GAAAA,CAAAA,CAAKyD,YAAY,CAACtC,QAAAA,CAAAA,CAAUuC,cAAc,GAAGC,KAAK,EAAA;AAC1F;;;;"}
1
+ {"version":3,"file":"populate.mjs","sources":["../../../../server/src/services/utils/populate.ts"],"sourcesContent":["import { merge, isEmpty, set, propEq } from 'lodash/fp';\nimport strapiUtils from '@strapi/utils';\nimport type { UID, Schema, Modules } from '@strapi/types';\nimport { getService } from '../../utils';\n\nconst {\n isVisibleAttribute,\n isScalarAttribute,\n getDoesAttributeRequireValidation,\n hasDraftAndPublish,\n} = strapiUtils.contentTypes;\nconst { isAnyToMany } = strapiUtils.relations;\nconst { PUBLISHED_AT_ATTRIBUTE } = strapiUtils.contentTypes.constants;\n\nconst isMorphToRelation = (attribute: any) =>\n isRelation(attribute) && attribute.relation.includes('morphTo');\nconst isMedia = propEq('type', 'media');\nconst isRelation = propEq('type', 'relation');\nconst isComponent = propEq('type', 'component');\nconst isDynamicZone = propEq('type', 'dynamiczone');\n\n// TODO: Import from @strapi/types when it's available there\ntype Model = Parameters<typeof isVisibleAttribute>[0];\nexport type Populate = Modules.EntityService.Params.Populate.Any<UID.Schema>;\n\ntype PopulateOptions = {\n initialPopulate?: Populate;\n countMany?: boolean;\n countOne?: boolean;\n maxLevel?: number;\n};\n\n/**\n * Populate the model for relation\n * @param attribute - Attribute containing a relation\n * @param attribute.relation - type of relation\n * @param model - Model of the populated entity\n * @param attributeName\n * @param options - Options to apply while populating\n */\nfunction getPopulateForRelation(\n attribute: Schema.Attribute.AnyAttribute,\n model: Model,\n attributeName: string,\n { countMany, countOne, initialPopulate }: PopulateOptions\n) {\n const isManyRelation = isAnyToMany(attribute);\n\n // Use initialPopulate when explicitly provided (including `false` to suppress population)\n if (initialPopulate !== undefined) {\n return initialPopulate;\n }\n\n // If populating localizations attribute, also include validatable fields\n // Mainly needed for bulk locale publishing, so the Client has all the information necessary to perform validations\n if (attributeName === 'localizations') {\n const validationPopulate = getPopulateForValidation(model.uid as UID.Schema);\n\n return {\n populate: validationPopulate.populate,\n };\n }\n\n // always populate createdBy, updatedBy, localizations etc.\n if (!isVisibleAttribute(model, attributeName)) {\n return true;\n }\n\n if ((isManyRelation && countMany) || (!isManyRelation && countOne)) {\n return { count: true };\n }\n\n return true;\n}\n\n/**\n * Populate the model for Dynamic Zone components\n * @param attribute - Attribute containing the components\n * @param attribute.components - IDs of components\n * @param options - Options to apply while populating\n */\nfunction getPopulateForDZ(\n attribute: Schema.Attribute.DynamicZone,\n options: PopulateOptions,\n level: number\n) {\n // Use fragments to populate the dynamic zone components\n const populatedComponents = (attribute.components || []).reduce(\n (acc: any, componentUID: UID.Component) => ({\n ...acc,\n [componentUID]: {\n populate: getDeepPopulate(componentUID, options, level + 1),\n },\n }),\n {}\n );\n\n return { on: populatedComponents };\n}\n\n/**\n * Get the populated value based on the type of the attribute\n * @param attributeName - Name of the attribute\n * @param model - Model of the populated entity\n * @param model.attributes\n * @param options - Options to apply while populating\n * @param options.countMany\n * @param options.countOne\n * @param options.maxLevel\n * @param level\n */\nfunction getPopulateFor(\n attributeName: string,\n model: any,\n options: PopulateOptions,\n level: number\n): { [key: string]: boolean | object } {\n const attribute = model.attributes[attributeName];\n\n switch (attribute.type) {\n case 'relation':\n // @ts-expect-error - TODO: support populate count typing\n return {\n [attributeName]: getPopulateForRelation(attribute, model, attributeName, options),\n };\n case 'component':\n return {\n [attributeName]: {\n populate: getDeepPopulate(attribute.component, options, level + 1),\n },\n };\n case 'media':\n return {\n [attributeName]: {\n populate: {\n folder: true,\n },\n },\n };\n case 'dynamiczone':\n return {\n [attributeName]: getPopulateForDZ(attribute, options, level),\n };\n default:\n return {};\n }\n}\n\n/**\n * Deeply populate a model based on UID\n * @param uid - Unique identifier of the model\n * @param options - Options to apply while populating\n * @param level - Current level of nested call\n */\nconst getDeepPopulate = (\n uid: UID.Schema,\n {\n initialPopulate = {} as any,\n countMany = false,\n countOne = false,\n maxLevel = Infinity,\n }: PopulateOptions = {},\n level = 1\n) => {\n if (level > maxLevel) {\n return {};\n }\n\n const model = strapi.getModel(uid);\n\n if (!model) {\n return {};\n }\n\n return Object.keys(model.attributes).reduce(\n (populateAcc, attributeName: string) =>\n merge(\n populateAcc,\n getPopulateFor(\n attributeName,\n model,\n {\n // @ts-expect-error - improve types\n initialPopulate: initialPopulate?.[attributeName],\n countMany,\n countOne,\n maxLevel,\n },\n level\n )\n ),\n {}\n );\n};\n\n/**\n * Deeply populate a model based on UID. Only populating fields that require validation.\n * @param uid - Unique identifier of the model\n * @param options - Options to apply while populating\n * @param level - Current level of nested call\n */\nconst validationPopulateCache = new Map<string, Record<string, any>>();\n\nconst getPopulateForValidation = (uid: UID.Schema): Record<string, any> => {\n const cached = validationPopulateCache.get(uid);\n if (cached) {\n return cached;\n }\n\n const model = strapi.getModel(uid);\n if (!model) {\n return {};\n }\n\n const result = Object.entries(model.attributes).reduce(\n (populateAcc: any, [attributeName, attribute]) => {\n if (isScalarAttribute(attribute)) {\n // If the scalar attribute requires validation, add it to the fields array\n if (getDoesAttributeRequireValidation(attribute)) {\n populateAcc.fields = populateAcc.fields || [];\n populateAcc.fields.push(attributeName);\n }\n return populateAcc;\n }\n\n if (isMedia(attribute)) {\n if (getDoesAttributeRequireValidation(attribute)) {\n populateAcc.populate = populateAcc.populate || {};\n populateAcc.populate[attributeName] = {\n populate: {\n folder: true,\n },\n };\n return populateAcc;\n }\n }\n\n if (isComponent(attribute)) {\n // @ts-expect-error - should be a component\n const component = attribute.component;\n\n // Get the validation result for this component\n const componentResult = getPopulateForValidation(component);\n\n if (Object.keys(componentResult).length > 0) {\n populateAcc.populate = populateAcc.populate || {};\n populateAcc.populate[attributeName] = componentResult;\n }\n\n return populateAcc;\n }\n\n if (isDynamicZone(attribute)) {\n const components = (attribute as Schema.Attribute.DynamicZone).components;\n // Handle dynamic zone components\n const componentsResult = (components || []).reduce(\n (acc, componentUID) => {\n // Get validation populate for this component\n const componentResult = getPopulateForValidation(componentUID);\n\n // Only include component if it has fields requiring validation\n if (Object.keys(componentResult).length > 0) {\n acc[componentUID] = componentResult;\n }\n\n return acc;\n },\n {} as Record<string, any>\n );\n\n // Only add to populate if we have components requiring validation\n if (Object.keys(componentsResult).length > 0) {\n populateAcc.populate = populateAcc.populate || {};\n populateAcc.populate[attributeName] = { on: componentsResult };\n }\n }\n\n return populateAcc;\n },\n {}\n );\n\n validationPopulateCache.set(uid, result);\n return result;\n};\n\n/**\n * getDeepPopulateDraftCount works recursively on the attributes of a model\n * creating a populated object to count all the unpublished relations within the model\n * These relations can be direct to this content type or contained within components/dynamic zones\n * @param uid of the model\n * @returns result\n * @returns result.populate\n * @returns result.hasRelations\n */\nconst draftCountPopulateCache = new Map<string, { populate: any; hasRelations: boolean }>();\n\nconst getDeepPopulateDraftCount = (uid: UID.Schema) => {\n const cached = draftCountPopulateCache.get(uid);\n if (cached) {\n return cached;\n }\n\n const model = strapi.getModel(uid);\n if (!model) {\n return { populate: {}, hasRelations: false };\n }\n let hasRelations = false;\n\n const populate = Object.keys(model.attributes).reduce((populateAcc: any, attributeName) => {\n const attribute: Schema.Attribute.AnyAttribute = model.attributes[attributeName];\n\n switch (attribute.type) {\n case 'relation': {\n // TODO: Support polymorphic relations\n const isMorphRelation = attribute.relation.toLowerCase().startsWith('morph');\n if (isMorphRelation) {\n break;\n }\n\n // Skip relations to content types without draft & publish,\n // as they don't have a publishedAt attribute and can't have drafts\n if (!('target' in attribute)) {\n break;\n }\n\n const targetModel = strapi.getModel(attribute.target);\n if (!targetModel || !hasDraftAndPublish(targetModel)) {\n break;\n }\n\n if (isVisibleAttribute(model, attributeName)) {\n populateAcc[attributeName] = {\n count: true,\n filters: { [PUBLISHED_AT_ATTRIBUTE]: { $null: true } },\n };\n hasRelations = true;\n }\n break;\n }\n case 'component': {\n const { populate, hasRelations: childHasRelations } = getDeepPopulateDraftCount(\n attribute.component\n );\n if (childHasRelations) {\n populateAcc[attributeName] = {\n populate,\n };\n hasRelations = true;\n }\n break;\n }\n case 'dynamiczone': {\n const dzPopulateFragment = attribute.components?.reduce((acc, componentUID) => {\n const { populate: componentPopulate, hasRelations: componentHasRelations } =\n getDeepPopulateDraftCount(componentUID);\n\n if (componentHasRelations) {\n hasRelations = true;\n\n return { ...acc, [componentUID]: { populate: componentPopulate } };\n }\n\n return acc;\n }, {});\n\n if (!isEmpty(dzPopulateFragment)) {\n populateAcc[attributeName] = { on: dzPopulateFragment };\n }\n break;\n }\n default:\n }\n\n return populateAcc;\n }, {});\n\n const result = { populate, hasRelations };\n draftCountPopulateCache.set(uid, result);\n return result;\n};\n\n/**\n * Create a Strapi populate object which populates all attribute fields of a Strapi query.\n */\nconst getQueryPopulate = async (uid: UID.Schema, query: object): Promise<Populate> => {\n let populateQuery: Populate = {};\n\n await strapiUtils.traverse.traverseQueryFilters(\n /**\n *\n * @param {Object} param0\n * @param {string} param0.key - Attribute name\n * @param {Object} param0.attribute - Attribute definition\n * @param {string} param0.path - Content Type path to the attribute\n * @returns\n */\n ({ attribute, path }: any) => {\n // TODO: handle dynamic zones and morph relations\n if (!attribute || isDynamicZone(attribute) || isMorphToRelation(attribute)) {\n return;\n }\n\n // Populate all relations, components and media\n if (isRelation(attribute) || isMedia(attribute) || isComponent(attribute)) {\n const populatePath = path.attribute.replace(/\\./g, '.populate.');\n // @ts-expect-error - lodash doesn't resolve the Populate type correctly\n populateQuery = set(populatePath, {}, populateQuery);\n }\n },\n { schema: strapi.getModel(uid), getModel: strapi.getModel.bind(strapi) },\n query\n );\n\n return populateQuery;\n};\n\nconst deepPopulateCache = new Map<string, object>();\n\nconst buildDeepPopulate = async (uid: UID.CollectionType) => {\n const cached = deepPopulateCache.get(uid);\n if (cached) {\n return cached;\n }\n\n const result = await getService('populate-builder')(uid)\n .populateDeep(Infinity)\n .countRelations()\n .build();\n\n deepPopulateCache.set(uid, result);\n\n return result;\n};\n\n/**\n * Restrict localizations populate to only metadata fields for localized content types.\n * Returns an empty object for non-localized content types.\n *\n * By default, localizations are deeply populated which includes all relations and\n * components for every locale — this is expensive and unnecessary for CM responses.\n * The CM only needs these fields from localizations:\n * - locale: to identify which locales exist\n * - documentId: to link to the localized document\n * - publishedAt: to determine published/draft status\n * - updatedAt: to support the modified state indicator in the UI\n */\nconst getPopulateForLocalizations = (model: UID.Schema) => {\n const modelSchema = strapi.getModel(model);\n if (\n (modelSchema as unknown as { pluginOptions: { i18n: { localized?: boolean } } }).pluginOptions\n ?.i18n?.localized\n ) {\n return { localizations: { fields: ['locale', 'documentId', 'publishedAt', 'updatedAt'] } };\n }\n\n return {};\n};\n\nexport {\n getDeepPopulate,\n getDeepPopulateDraftCount,\n getPopulateForValidation,\n getQueryPopulate,\n buildDeepPopulate,\n getPopulateForLocalizations,\n};\n"],"names":["isVisibleAttribute","isScalarAttribute","getDoesAttributeRequireValidation","hasDraftAndPublish","strapiUtils","contentTypes","isAnyToMany","relations","PUBLISHED_AT_ATTRIBUTE","constants","isMorphToRelation","attribute","isRelation","relation","includes","isMedia","propEq","isComponent","isDynamicZone","getPopulateForRelation","model","attributeName","countMany","countOne","initialPopulate","isManyRelation","undefined","validationPopulate","getPopulateForValidation","uid","populate","count","getPopulateForDZ","options","level","populatedComponents","components","reduce","acc","componentUID","getDeepPopulate","on","getPopulateFor","attributes","type","component","folder","maxLevel","Infinity","strapi","getModel","Object","keys","populateAcc","merge","validationPopulateCache","Map","cached","get","result","entries","fields","push","componentResult","length","componentsResult","set","draftCountPopulateCache","getDeepPopulateDraftCount","hasRelations","isMorphRelation","toLowerCase","startsWith","targetModel","target","filters","$null","childHasRelations","dzPopulateFragment","componentPopulate","componentHasRelations","isEmpty","getQueryPopulate","query","populateQuery","traverse","traverseQueryFilters","path","populatePath","replace","schema","bind","deepPopulateCache","buildDeepPopulate","getService","populateDeep","countRelations","build","getPopulateForLocalizations","modelSchema","pluginOptions","i18n","localized","localizations"],"mappings":";;;;AAKA,MAAM,EACJA,kBAAkB,EAClBC,iBAAiB,EACjBC,iCAAiC,EACjCC,kBAAkB,EACnB,GAAGC,WAAAA,CAAYC,YAAY;AAC5B,MAAM,EAAEC,WAAW,EAAE,GAAGF,YAAYG,SAAS;AAC7C,MAAM,EAAEC,sBAAsB,EAAE,GAAGJ,WAAAA,CAAYC,YAAY,CAACI,SAAS;AAErE,MAAMC,iBAAAA,GAAoB,CAACC,SAAAA,GACzBC,UAAAA,CAAWD,cAAcA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,aAAa,EAC1FC,MAAMC,SAAAA,EACV;QACA,OAAO;YAAEC,aAAAA,EAAe;gBAAE1C,MAAAA,EAAQ;AAAC,oBAAA,QAAA;AAAU,oBAAA,YAAA;AAAc,oBAAA,aAAA;AAAe,oBAAA;AAAY;AAAC;AAAE,SAAA;AAC3F,IAAA;AAEA,IAAA,OAAO,EAAC;AACV;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"collection-types.d.ts","sourceRoot":"","sources":["../../../../server/src/controllers/collection-types.ts"],"names":[],"mappings":";cAgPkB,GAAG;iBAgGA,GAAG;gBAyDJ,GAAG;gBA0BH,GAAG;eAYJ,GAAG;mBA4CC,GAAG;gBAmBN,GAAG;IAoCrB;;;OAGG;iBACgB,GAAG;qBA6FC,GAAG;uBA6CD,GAAG;mBAyCP,GAAG;iBAyDL,GAAG;oBAwCA,GAAG;6BA6CM,GAAG;wCAqCQ,GAAG;;AA7oB/C,wBA8qBE"}
1
+ {"version":3,"file":"collection-types.d.ts","sourceRoot":"","sources":["../../../../server/src/controllers/collection-types.ts"],"names":[],"mappings":";cAiPkB,GAAG;iBA+FA,GAAG;gBA2DJ,GAAG;gBA0BH,GAAG;eAYJ,GAAG;mBA4CC,GAAG;gBAmBN,GAAG;IAoCrB;;;OAGG;iBACgB,GAAG;qBA+FC,GAAG;uBA8CD,GAAG;mBAyCP,GAAG;iBAyDL,GAAG;oBAwCA,GAAG;6BA6CM,GAAG;wCAqCQ,GAAG;;AAjpB/C,wBA4qBE"}
@@ -1 +1 @@
1
- {"version":3,"file":"single-types.d.ts","sourceRoot":"","sources":["../../../../server/src/controllers/single-types.ts"],"names":[],"mappings":";cA4FkB,GAAG;wBAgDO,GAAG;gBAYX,GAAG;iBAsCF,GAAG;mBAiDD,GAAG;iBAiDL,GAAG;6BAiCS,GAAG;;AAtOpC,wBAkQE"}
1
+ {"version":3,"file":"single-types.d.ts","sourceRoot":"","sources":["../../../../server/src/controllers/single-types.ts"],"names":[],"mappings":";cA8FkB,GAAG;wBAgDO,GAAG;gBAYX,GAAG;iBAsCF,GAAG;mBAiDD,GAAG;iBAiDL,GAAG;6BAiCS,GAAG;;AAtOpC,wBAkQE"}
@@ -7,8 +7,8 @@ import type { AvailableLocaleDocument } from '../../../../shared/contracts/colle
7
7
  */
8
8
  export declare const formatDocumentWithMetadata: (permissionChecker: any, uid: UID.ContentType, document: DocumentVersion, opts?: GetMetadataOptions) => Promise<{
9
9
  meta: {
10
- availableLocales: AvailableLocaleDocument[];
11
- availableStatus: Partial<DocumentVersion>[];
10
+ availableLocales: never[] | AvailableLocaleDocument[];
11
+ availableStatus: Pick<any, string>[] | Partial<DocumentVersion>[];
12
12
  };
13
13
  data: {
14
14
  status: string | undefined;
@@ -187,8 +187,13 @@ declare const _default: () => {
187
187
  getManyAvailableStatus(uid: import("@strapi/types/dist/uid").ContentType, documents: import("./services/document-metadata").DocumentVersion[]): Promise<any[]>;
188
188
  getStatus(version: import("./services/document-metadata").DocumentVersion, otherDocumentStatuses?: import("../../shared/contracts/collection-types").AvailableStatusDocument[] | undefined): string;
189
189
  getMetadata(uid: import("@strapi/types/dist/uid").ContentType, version: import("./services/document-metadata").DocumentVersion, { availableLocales, availableStatus }?: import("./services/document-metadata").GetMetadataOptions): Promise<{
190
+ availableLocales: never[];
191
+ availableStatus: Pick<any, string>[];
192
+ versions: import("./services/document-metadata").DocumentVersion[];
193
+ } | {
190
194
  availableLocales: import("../../shared/contracts/collection-types").AvailableLocaleDocument[];
191
195
  availableStatus: Partial<import("./services/document-metadata").DocumentVersion>[];
196
+ versions: any[];
192
197
  }>;
193
198
  formatDocumentWithMetadata(uid: import("@strapi/types/dist/uid").ContentType, document: import("./services/document-metadata").DocumentVersion, opts?: import("./services/document-metadata").GetMetadataOptions): Promise<{
194
199
  data: {
@@ -201,6 +206,9 @@ declare const _default: () => {
201
206
  publishedAt?: string | Date | null | undefined;
202
207
  };
203
208
  meta: {
209
+ availableLocales: never[];
210
+ availableStatus: Pick<any, string>[];
211
+ } | {
204
212
  availableLocales: import("../../shared/contracts/collection-types").AvailableLocaleDocument[];
205
213
  availableStatus: Partial<import("./services/document-metadata").DocumentVersion>[];
206
214
  };
@@ -232,13 +240,19 @@ declare const _default: () => {
232
240
  }): Promise<{
233
241
  count: number;
234
242
  }>;
235
- publish(id: string, uid: `admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`, opts?: Omit<import("@strapi/types/dist/modules/documents/params/document-engine").Publish<import("@strapi/types/dist/uid").ContentType>, "documentId">): Promise<import("@strapi/types/dist/modules/documents").AnyDocument[]>;
243
+ publish(id: string, uid: `admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`, opts?: Omit<import("@strapi/types/dist/modules/documents/params/document-engine").Publish<import("@strapi/types/dist/uid").ContentType>, "documentId"> & {
244
+ populate?: object | undefined;
245
+ }): Promise<import("@strapi/types/dist/modules/documents").AnyDocument[]>;
236
246
  publishMany(uid: import("@strapi/types/dist/uid").ContentType, documentIds: string[], locale?: string | string[] | undefined): Promise<number>;
237
247
  unpublishMany(documentIds: string[], uid: `admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`, opts?: Omit<import("@strapi/types/dist/modules/documents/params/document-engine").Unpublish<import("@strapi/types/dist/uid").ContentType>, "documentId">): Promise<{
238
248
  count: number;
239
249
  }>;
240
- unpublish(id: string, uid: `admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`, opts?: Omit<import("@strapi/types/dist/modules/documents/params/document-engine").Unpublish<import("@strapi/types/dist/uid").ContentType>, "documentId">): Promise<import("@strapi/types/dist/modules/documents").AnyDocument | undefined>;
241
- discardDraft(id: string, uid: `admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`, opts?: Omit<import("@strapi/types/dist/modules/documents/params/document-engine").DiscardDraft<import("@strapi/types/dist/uid").ContentType>, "documentId">): Promise<import("@strapi/types/dist/modules/documents").AnyDocument | undefined>;
250
+ unpublish(id: string, uid: `admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`, opts?: Omit<import("@strapi/types/dist/modules/documents/params/document-engine").Unpublish<import("@strapi/types/dist/uid").ContentType>, "documentId"> & {
251
+ populate?: object | undefined;
252
+ }): Promise<import("@strapi/types/dist/modules/documents").AnyDocument | undefined>;
253
+ discardDraft(id: string, uid: `admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`, opts?: Omit<import("@strapi/types/dist/modules/documents/params/document-engine").DiscardDraft<import("@strapi/types/dist/uid").ContentType>, "documentId"> & {
254
+ populate?: object | undefined;
255
+ }): Promise<import("@strapi/types/dist/modules/documents").AnyDocument | undefined>;
242
256
  countDraftRelations(id: string, uid: import("@strapi/types/dist/uid").ContentType, locale: string): Promise<number>;
243
257
  countManyEntriesDraftRelations(documentIds: string[], uid: `admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`, locale: string | string[]): Promise<number>;
244
258
  };
@@ -340,6 +354,7 @@ declare const _default: () => {
340
354
  toOne: boolean;
341
355
  }): any;
342
356
  populateDeep(level?: number): any;
357
+ withPopulateOverride(overrides: Record<string, any>): any;
343
358
  build(): Promise<{} | undefined>;
344
359
  };
345
360
  uid: ({ strapi }: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../server/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,wBAUE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../server/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,wBAUE"}
@@ -33,13 +33,19 @@ declare const documentManager: ({ strapi }: {
33
33
  }): Promise<{
34
34
  count: number;
35
35
  }>;
36
- publish(id: Modules.Documents.ID, uid: UID.CollectionType, opts?: Omit<DocServiceParams<'publish'>, 'documentId'>): Promise<Modules.Documents.AnyDocument[]>;
36
+ publish(id: Modules.Documents.ID, uid: UID.CollectionType, opts?: Omit<DocServiceParams<'publish'>, 'documentId'> & {
37
+ populate?: object;
38
+ }): Promise<Modules.Documents.AnyDocument[]>;
37
39
  publishMany(uid: UID.ContentType, documentIds: string[], locale?: string | string[]): Promise<number>;
38
40
  unpublishMany(documentIds: Modules.Documents.ID[], uid: UID.CollectionType, opts?: Omit<DocServiceParams<'unpublish'>, 'documentId'>): Promise<{
39
41
  count: number;
40
42
  }>;
41
- unpublish(id: Modules.Documents.ID, uid: UID.CollectionType, opts?: Omit<DocServiceParams<'unpublish'>, 'documentId'>): Promise<Modules.Documents.AnyDocument | undefined>;
42
- discardDraft(id: Modules.Documents.ID, uid: UID.CollectionType, opts?: Omit<DocServiceParams<'discardDraft'>, 'documentId'>): Promise<Modules.Documents.AnyDocument | undefined>;
43
+ unpublish(id: Modules.Documents.ID, uid: UID.CollectionType, opts?: Omit<DocServiceParams<'unpublish'>, 'documentId'> & {
44
+ populate?: object;
45
+ }): Promise<Modules.Documents.AnyDocument | undefined>;
46
+ discardDraft(id: Modules.Documents.ID, uid: UID.CollectionType, opts?: Omit<DocServiceParams<'discardDraft'>, 'documentId'> & {
47
+ populate?: object;
48
+ }): Promise<Modules.Documents.AnyDocument | undefined>;
43
49
  countDraftRelations(id: string, uid: UID.ContentType, locale: string): Promise<number>;
44
50
  countManyEntriesDraftRelations(documentIds: Modules.Documents.ID[], uid: UID.CollectionType, locale: string | string[]): Promise<number>;
45
51
  };
@@ -1 +1 @@
1
- {"version":3,"file":"document-manager.d.ts","sourceRoot":"","sources":["../../../../server/src/services/document-manager.ts"],"names":[],"mappings":"AAEA,OAAO,EAAwB,UAAU,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAKxD,KAAK,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC,eAAe,CAAC;AACpD,KAAK,gBAAgB,CAAC,OAAO,SAAS,MAAM,UAAU,IAAI,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7F,MAAM,MAAM,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AAQjE,QAAA,MAAM,eAAe,eAAgB;IAAE,MAAM,EAAE,KAAK,MAAM,CAAA;CAAE;gBAGlD,MAAM,OACL,IAAI,cAAc,SACjB,KAAK,iBAAiB,SAAS,CAAC,EAAE,YAAY,CAAC;IAKvD;;OAEG;oBAEG,MAAM,GAAG,MAAM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E,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE;qBAY3E,QAAQ,SAAS,CAAC,EAAE,OACnB,IAAI,cAAc,SACjB,KAAK,iBAAiB,cAAc,CAAC,EAAE,YAAY,CAAC,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE;4BAWtD,MAAM,OAAO,IAAI,WAAW,UAAU,MAAM;gDAkB3D,QAAQ,SAAS,CAAC,EAAE,EAAE,OAC9B,IAAI,cAAc,UACf,MAAM,GAAG,MAAM,EAAE;CA6B9B,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,OAAO,eAAe,CAAC;AAE5D,eAAe,eAAe,CAAC"}
@@ -41,8 +41,13 @@ declare const _default: ({ strapi }: {
41
41
  getManyAvailableStatus(uid: UID.ContentType, documents: DocumentVersion[]): Promise<any[]>;
42
42
  getStatus(version: DocumentVersion, otherDocumentStatuses?: DocumentMetadata['availableStatus']): string;
43
43
  getMetadata(uid: UID.ContentType, version: DocumentVersion, { availableLocales, availableStatus }?: GetMetadataOptions): Promise<{
44
+ availableLocales: never[];
45
+ availableStatus: Pick<any, string>[];
46
+ versions: DocumentVersion[];
47
+ } | {
44
48
  availableLocales: import("../../../shared/contracts/collection-types").AvailableLocaleDocument[];
45
49
  availableStatus: Partial<DocumentVersion>[];
50
+ versions: any[];
46
51
  }>;
47
52
  /**
48
53
  * Returns associated metadata of a document:
@@ -60,6 +65,9 @@ declare const _default: ({ strapi }: {
60
65
  publishedAt?: string | Date | null | undefined;
61
66
  };
62
67
  meta: {
68
+ availableLocales: never[];
69
+ availableStatus: Pick<any, string>[];
70
+ } | {
63
71
  availableLocales: import("../../../shared/contracts/collection-types").AvailableLocaleDocument[];
64
72
  availableStatus: Partial<DocumentVersion>[];
65
73
  };
@@ -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;AAKnF,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;AA6BD;;;;;;;;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;;;;IAoFzE;;;;OAIG;oCAEI,IAAI,WAAW,YACV,eAAe,SACnB,kBAAkB;;;;;;;;;;;;;;;;AApO5B,wBAmRG"}
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"}
@@ -79,8 +79,13 @@ declare const _default: {
79
79
  getManyAvailableStatus(uid: import("@strapi/types/dist/uid").ContentType, documents: import("./document-metadata").DocumentVersion[]): Promise<any[]>;
80
80
  getStatus(version: import("./document-metadata").DocumentVersion, otherDocumentStatuses?: import("../../../shared/contracts/collection-types").AvailableStatusDocument[] | undefined): string;
81
81
  getMetadata(uid: import("@strapi/types/dist/uid").ContentType, version: import("./document-metadata").DocumentVersion, { availableLocales, availableStatus }?: import("./document-metadata").GetMetadataOptions): Promise<{
82
+ availableLocales: never[];
83
+ availableStatus: Pick<any, string>[];
84
+ versions: import("./document-metadata").DocumentVersion[];
85
+ } | {
82
86
  availableLocales: import("../../../shared/contracts/collection-types").AvailableLocaleDocument[];
83
87
  availableStatus: Partial<import("./document-metadata").DocumentVersion>[];
88
+ versions: any[];
84
89
  }>;
85
90
  formatDocumentWithMetadata(uid: import("@strapi/types/dist/uid").ContentType, document: import("./document-metadata").DocumentVersion, opts?: import("./document-metadata").GetMetadataOptions): Promise<{
86
91
  data: {
@@ -93,6 +98,9 @@ declare const _default: {
93
98
  publishedAt?: string | Date | null | undefined;
94
99
  };
95
100
  meta: {
101
+ availableLocales: never[];
102
+ availableStatus: Pick<any, string>[];
103
+ } | {
96
104
  availableLocales: import("../../../shared/contracts/collection-types").AvailableLocaleDocument[];
97
105
  availableStatus: Partial<import("./document-metadata").DocumentVersion>[];
98
106
  };
@@ -124,13 +132,19 @@ declare const _default: {
124
132
  }): Promise<{
125
133
  count: number;
126
134
  }>;
127
- publish(id: string, uid: `admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`, opts?: Omit<import("@strapi/types/dist/modules/documents/params/document-engine").Publish<import("@strapi/types/dist/uid").ContentType>, "documentId">): Promise<import("@strapi/types/dist/modules/documents").AnyDocument[]>;
135
+ publish(id: string, uid: `admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`, opts?: Omit<import("@strapi/types/dist/modules/documents/params/document-engine").Publish<import("@strapi/types/dist/uid").ContentType>, "documentId"> & {
136
+ populate?: object | undefined;
137
+ }): Promise<import("@strapi/types/dist/modules/documents").AnyDocument[]>;
128
138
  publishMany(uid: import("@strapi/types/dist/uid").ContentType, documentIds: string[], locale?: string | string[] | undefined): Promise<number>;
129
139
  unpublishMany(documentIds: string[], uid: `admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`, opts?: Omit<import("@strapi/types/dist/modules/documents/params/document-engine").Unpublish<import("@strapi/types/dist/uid").ContentType>, "documentId">): Promise<{
130
140
  count: number;
131
141
  }>;
132
- unpublish(id: string, uid: `admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`, opts?: Omit<import("@strapi/types/dist/modules/documents/params/document-engine").Unpublish<import("@strapi/types/dist/uid").ContentType>, "documentId">): Promise<import("@strapi/types/dist/modules/documents").AnyDocument | undefined>;
133
- discardDraft(id: string, uid: `admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`, opts?: Omit<import("@strapi/types/dist/modules/documents/params/document-engine").DiscardDraft<import("@strapi/types/dist/uid").ContentType>, "documentId">): Promise<import("@strapi/types/dist/modules/documents").AnyDocument | undefined>;
142
+ unpublish(id: string, uid: `admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`, opts?: Omit<import("@strapi/types/dist/modules/documents/params/document-engine").Unpublish<import("@strapi/types/dist/uid").ContentType>, "documentId"> & {
143
+ populate?: object | undefined;
144
+ }): Promise<import("@strapi/types/dist/modules/documents").AnyDocument | undefined>;
145
+ discardDraft(id: string, uid: `admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`, opts?: Omit<import("@strapi/types/dist/modules/documents/params/document-engine").DiscardDraft<import("@strapi/types/dist/uid").ContentType>, "documentId"> & {
146
+ populate?: object | undefined;
147
+ }): Promise<import("@strapi/types/dist/modules/documents").AnyDocument | undefined>;
134
148
  countDraftRelations(id: string, uid: import("@strapi/types/dist/uid").ContentType, locale: string): Promise<number>;
135
149
  countManyEntriesDraftRelations(documentIds: string[], uid: `admin::${string}` | `strapi::${string}` | `api::${string}.${string}` | `plugin::${string}.${string}`, locale: string | string[]): Promise<number>;
136
150
  };
@@ -232,6 +246,7 @@ declare const _default: {
232
246
  toOne: boolean;
233
247
  }): any;
234
248
  populateDeep(level?: number): any;
249
+ withPopulateOverride(overrides: Record<string, any>): any;
235
250
  build(): Promise<{} | undefined>;
236
251
  };
237
252
  uid: ({ strapi }: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/src/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,wBAeE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/src/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,wBAeE"}
@@ -20,6 +20,13 @@ declare const _default: () => (uid: UID.Schema) => {
20
20
  * @param [level=Infinity] - Max level of nested populate.
21
21
  */
22
22
  populateDeep(level?: number): any;
23
+ /**
24
+ * Override the populate for specific attributes, taking precedence over
25
+ * query-derived or deep populate defaults.
26
+ *
27
+ * @param overrides - Populate overrides to merge (e.g. { localizations: { fields: ['locale'] } })
28
+ */
29
+ withPopulateOverride(overrides: Record<string, any>): any;
23
30
  /**
24
31
  * Construct the populate object based on the builder options.
25
32
  * @returns Populate object
@@ -1 +1 @@
1
- {"version":3,"file":"populate-builder.d.ts","sourceRoot":"","sources":["../../../../server/src/services/populate-builder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;;IAwBrC;;;OAGG;;IAMH;;;;;OAKG;;;;;IAWH;;;OAGG;;IAMH;;;OAGG;;;AAeP,wBAAqC"}
1
+ {"version":3,"file":"populate-builder.d.ts","sourceRoot":"","sources":["../../../../server/src/services/populate-builder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;;IAwBrC;;;OAGG;;IAMH;;;;;OAKG;;;;;IAWH;;;OAGG;;IAMH;;;;;OAKG;;IAQH;;;OAGG;;;AAeP,wBAAqC"}
@@ -1 +1 @@
1
- {"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../../../../server/src/services/utils/configuration/attributes.ts"],"names":[],"mappings":"AA4BA,QAAA,MAAM,UAAU,WAAY,GAAG,QAAQ,GAAG,YAmBzC,CAAC;AAEF,QAAA,MAAM,UAAU,WAAY,GAAG,QAAQ,GAAG,YAiBzC,CAAC;AAEF,QAAA,MAAM,YAAY,WAAY,GAAG,QAAQ,GAAG,YAE3C,CAAC;AAEF,QAAA,MAAM,SAAS,WAAY,GAAG,QAAQ,GAAG,YAsBxC,CAAC;AAkCF,QAAA,MAAM,UAAU,cAAe,GAAG,YAAkC,CAAC;AAErE,QAAA,MAAM,oBAAoB,WAAY,GAAG,QAAQ,GAAG,YAcnD,CAAC;AAEF,QAAA,MAAM,oBAAoB,WAAY,GAAG,QAAQ,GAAG,YAcnD,CAAC;AASF,QAAA,MAAM,mBAAmB,WAAY,GAAG,WAA6C,CAAC;AAEtF;;;;;GAKG;AACH,QAAA,MAAM,qBAAqB,WAAY,GAAG,aAgBzC,CAAC;AAEF,OAAO,EACL,UAAU,EACV,SAAS,EACT,YAAY,EACZ,UAAU,EACV,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,GACtB,CAAC"}
1
+ {"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../../../../server/src/services/utils/configuration/attributes.ts"],"names":[],"mappings":"AA4BA,QAAA,MAAM,UAAU,WAAY,GAAG,QAAQ,GAAG,YAmBzC,CAAC;AAEF,QAAA,MAAM,UAAU,WAAY,GAAG,QAAQ,GAAG,YAiBzC,CAAC;AAEF,QAAA,MAAM,YAAY,WAAY,GAAG,QAAQ,GAAG,YAE3C,CAAC;AAEF,QAAA,MAAM,SAAS,WAAY,GAAG,QAAQ,GAAG,YAsBxC,CAAC;AAkCF,QAAA,MAAM,UAAU,cAAe,GAAG,YAAkC,CAAC;AAErE,QAAA,MAAM,oBAAoB,WAAY,GAAG,QAAQ,GAAG,YAcnD,CAAC;AAEF,QAAA,MAAM,oBAAoB,WAAY,GAAG,QAAQ,GAAG,YAcnD,CAAC;AASF,QAAA,MAAM,mBAAmB,WAAY,GAAG,WAA6C,CAAC;AAEtF;;;;;GAKG;AACH,QAAA,MAAM,qBAAqB,WAAY,GAAG,aAiBzC,CAAC;AAEF,OAAO,EACL,UAAU,EACV,SAAS,EACT,YAAY,EACZ,UAAU,EACV,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,GACtB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"draft.d.ts","sourceRoot":"","sources":["../../../../../server/src/services/utils/draft.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,QAAA,MAAM,cAAc,WAAY,GAAG,OAAO,GAAG,KAAG,MAiC/C,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"draft.d.ts","sourceRoot":"","sources":["../../../../../server/src/services/utils/draft.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,QAAA,MAAM,cAAc,WAAY,GAAG,OAAO,GAAG,KAAG,MAyC/C,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -13,22 +13,7 @@ type PopulateOptions = {
13
13
  * @param level - Current level of nested call
14
14
  */
15
15
  declare const getDeepPopulate: (uid: UID.Schema, { initialPopulate, countMany, countOne, maxLevel, }?: PopulateOptions, level?: number) => {};
16
- /**
17
- * Deeply populate a model based on UID. Only populating fields that require validation.
18
- * @param uid - Unique identifier of the model
19
- * @param options - Options to apply while populating
20
- * @param level - Current level of nested call
21
- */
22
16
  declare const getPopulateForValidation: (uid: UID.Schema) => Record<string, any>;
23
- /**
24
- * getDeepPopulateDraftCount works recursively on the attributes of a model
25
- * creating a populated object to count all the unpublished relations within the model
26
- * These relations can be direct to this content type or contained within components/dynamic zones
27
- * @param uid of the model
28
- * @returns result
29
- * @returns result.populate
30
- * @returns result.hasRelations
31
- */
32
17
  declare const getDeepPopulateDraftCount: (uid: UID.Schema) => {
33
18
  populate: any;
34
19
  hasRelations: boolean;
@@ -37,6 +22,25 @@ declare const getDeepPopulateDraftCount: (uid: UID.Schema) => {
37
22
  * Create a Strapi populate object which populates all attribute fields of a Strapi query.
38
23
  */
39
24
  declare const getQueryPopulate: (uid: UID.Schema, query: object) => Promise<Populate>;
40
- declare const buildDeepPopulate: (uid: UID.CollectionType) => any;
41
- export { getDeepPopulate, getDeepPopulateDraftCount, getPopulateForValidation, getQueryPopulate, buildDeepPopulate, };
25
+ declare const buildDeepPopulate: (uid: UID.CollectionType) => Promise<any>;
26
+ /**
27
+ * Restrict localizations populate to only metadata fields for localized content types.
28
+ * Returns an empty object for non-localized content types.
29
+ *
30
+ * By default, localizations are deeply populated which includes all relations and
31
+ * components for every locale — this is expensive and unnecessary for CM responses.
32
+ * The CM only needs these fields from localizations:
33
+ * - locale: to identify which locales exist
34
+ * - documentId: to link to the localized document
35
+ * - publishedAt: to determine published/draft status
36
+ * - updatedAt: to support the modified state indicator in the UI
37
+ */
38
+ declare const getPopulateForLocalizations: (model: UID.Schema) => {
39
+ localizations: {
40
+ fields: string[];
41
+ };
42
+ } | {
43
+ localizations?: undefined;
44
+ };
45
+ export { getDeepPopulate, getDeepPopulateDraftCount, getPopulateForValidation, getQueryPopulate, buildDeepPopulate, getPopulateForLocalizations, };
42
46
  //# sourceMappingURL=populate.d.ts.map
@@ -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;AAiB1D,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;AAqHF;;;;;GAKG;AACH,QAAA,MAAM,eAAe,QACd,IAAI,MAAM,wDAMZ,eAAe,uBAgCnB,CAAC;AAEF;;;;;GAKG;AACH,QAAA,MAAM,wBAAwB,QAAS,IAAI,MAAM,KAAG,OAAO,MAAM,EAAE,GAAG,CAsErE,CAAC;AAEF;;;;;;;;GAQG;AACH,QAAA,MAAM,yBAAyB,QAAS,IAAI,MAAM;;;CA8DjD,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,gBAAgB,QAAe,IAAI,MAAM,SAAS,MAAM,KAAG,QAAQ,QAAQ,CA8BhF,CAAC;AAEF,QAAA,MAAM,iBAAiB,QAAS,IAAI,cAAc,QAEjD,CAAC;AAEF,OAAO,EACL,eAAe,EACf,yBAAyB,EACzB,wBAAwB,EACxB,gBAAgB,EAChB,iBAAiB,GAClB,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;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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/content-manager",
3
- "version": "5.39.0",
3
+ "version": "5.41.0",
4
4
  "description": "A powerful UI to easily manage your data.",
5
5
  "homepage": "https://strapi.io",
6
6
  "bugs": {
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "git://github.com/strapi/strapi.git",
11
+ "url": "https://github.com/strapi/strapi.git",
12
12
  "directory": "packages/core/content-manager"
13
13
  },
14
14
  "license": "SEE LICENSE IN LICENSE",
@@ -74,8 +74,8 @@
74
74
  "@sindresorhus/slugify": "1.1.0",
75
75
  "@strapi/design-system": "2.2.0",
76
76
  "@strapi/icons": "2.2.0",
77
- "@strapi/types": "5.39.0",
78
- "@strapi/utils": "5.39.0",
77
+ "@strapi/types": "5.41.0",
78
+ "@strapi/utils": "5.41.0",
79
79
  "codemirror5": "npm:codemirror@^5.65.11",
80
80
  "date-fns": "2.30.0",
81
81
  "fractional-indexing": "3.2.0",
@@ -109,8 +109,8 @@
109
109
  "yup": "0.32.9"
110
110
  },
111
111
  "devDependencies": {
112
- "@strapi/admin": "5.39.0",
113
- "@strapi/database": "5.39.0",
112
+ "@strapi/admin": "5.41.0",
113
+ "@strapi/database": "5.41.0",
114
114
  "@testing-library/react": "16.3.0",
115
115
  "@types/jest": "29.5.2",
116
116
  "@types/lodash": "^4.14.191",