@webiny/api-headless-cms 0.0.0-unstable.de38392959 → 0.0.0-unstable.e0bfc55d5a

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 (806) hide show
  1. package/constants.d.ts +18 -6
  2. package/constants.js +29 -16
  3. package/constants.js.map +1 -1
  4. package/context.d.ts +1 -1
  5. package/context.js +61 -32
  6. package/context.js.map +1 -1
  7. package/crud/AccessControl/AccessControl.d.ts +98 -0
  8. package/crud/AccessControl/AccessControl.js +542 -0
  9. package/crud/AccessControl/AccessControl.js.map +1 -0
  10. package/crud/AccessControl/README.md +47 -0
  11. package/crud/AccessControl/groups-own.png +0 -0
  12. package/crud/AccessControl/models-own.png +0 -0
  13. package/crud/contentEntry/abstractions/IDeleteEntry.d.ts +4 -0
  14. package/crud/contentEntry/abstractions/IDeleteEntry.js +7 -0
  15. package/crud/contentEntry/abstractions/IDeleteEntry.js.map +1 -0
  16. package/crud/contentEntry/abstractions/IDeleteEntryOperation.d.ts +4 -0
  17. package/crud/contentEntry/abstractions/IDeleteEntryOperation.js +7 -0
  18. package/crud/contentEntry/abstractions/IDeleteEntryOperation.js.map +1 -0
  19. package/crud/contentEntry/abstractions/IGetEntriesByIds.d.ts +4 -0
  20. package/crud/contentEntry/abstractions/IGetEntriesByIds.js +7 -0
  21. package/crud/contentEntry/abstractions/IGetEntriesByIds.js.map +1 -0
  22. package/crud/contentEntry/abstractions/IGetEntry.d.ts +4 -0
  23. package/crud/contentEntry/abstractions/IGetEntry.js +7 -0
  24. package/crud/contentEntry/abstractions/IGetEntry.js.map +1 -0
  25. package/crud/contentEntry/abstractions/IGetLatestEntriesByIds.d.ts +4 -0
  26. package/crud/contentEntry/abstractions/IGetLatestEntriesByIds.js +7 -0
  27. package/crud/contentEntry/abstractions/IGetLatestEntriesByIds.js.map +1 -0
  28. package/crud/contentEntry/abstractions/IGetLatestRevisionByEntryId.d.ts +4 -0
  29. package/crud/contentEntry/abstractions/IGetLatestRevisionByEntryId.js +7 -0
  30. package/crud/contentEntry/abstractions/IGetLatestRevisionByEntryId.js.map +1 -0
  31. package/crud/contentEntry/abstractions/IGetPreviousRevisionByEntryId.d.ts +4 -0
  32. package/crud/contentEntry/abstractions/IGetPreviousRevisionByEntryId.js +7 -0
  33. package/crud/contentEntry/abstractions/IGetPreviousRevisionByEntryId.js.map +1 -0
  34. package/crud/contentEntry/abstractions/IGetPublishedEntriesByIds.d.ts +4 -0
  35. package/crud/contentEntry/abstractions/IGetPublishedEntriesByIds.js +7 -0
  36. package/crud/contentEntry/abstractions/IGetPublishedEntriesByIds.js.map +1 -0
  37. package/crud/contentEntry/abstractions/IGetPublishedRevisionByEntryId.d.ts +4 -0
  38. package/crud/contentEntry/abstractions/IGetPublishedRevisionByEntryId.js +7 -0
  39. package/crud/contentEntry/abstractions/IGetPublishedRevisionByEntryId.js.map +1 -0
  40. package/crud/contentEntry/abstractions/IGetRevisionById.d.ts +4 -0
  41. package/crud/contentEntry/abstractions/IGetRevisionById.js +7 -0
  42. package/crud/contentEntry/abstractions/IGetRevisionById.js.map +1 -0
  43. package/crud/contentEntry/abstractions/IGetRevisionsByEntryId.d.ts +4 -0
  44. package/crud/contentEntry/abstractions/IGetRevisionsByEntryId.js +7 -0
  45. package/crud/contentEntry/abstractions/IGetRevisionsByEntryId.js.map +1 -0
  46. package/crud/contentEntry/abstractions/IListEntries.d.ts +4 -0
  47. package/crud/contentEntry/abstractions/IListEntries.js +7 -0
  48. package/crud/contentEntry/abstractions/IListEntries.js.map +1 -0
  49. package/crud/contentEntry/abstractions/IListEntriesOperation.d.ts +4 -0
  50. package/crud/contentEntry/abstractions/IListEntriesOperation.js +7 -0
  51. package/crud/contentEntry/abstractions/IListEntriesOperation.js.map +1 -0
  52. package/crud/contentEntry/abstractions/IMoveEntryToBinOperation.d.ts +4 -0
  53. package/crud/contentEntry/abstractions/IMoveEntryToBinOperation.js +7 -0
  54. package/crud/contentEntry/abstractions/IMoveEntryToBinOperation.js.map +1 -0
  55. package/crud/contentEntry/abstractions/IRestoreEntryFromBin.d.ts +4 -0
  56. package/crud/contentEntry/abstractions/IRestoreEntryFromBin.js +7 -0
  57. package/crud/contentEntry/abstractions/IRestoreEntryFromBin.js.map +1 -0
  58. package/crud/contentEntry/abstractions/IRestoreEntryFromBinOperation.d.ts +4 -0
  59. package/crud/contentEntry/abstractions/IRestoreEntryFromBinOperation.js +7 -0
  60. package/crud/contentEntry/abstractions/IRestoreEntryFromBinOperation.js.map +1 -0
  61. package/crud/contentEntry/abstractions/index.d.ts +16 -0
  62. package/crud/contentEntry/abstractions/index.js +183 -0
  63. package/crud/contentEntry/abstractions/index.js.map +1 -0
  64. package/crud/contentEntry/afterDelete.d.ts +6 -2
  65. package/crud/contentEntry/afterDelete.js +15 -1
  66. package/crud/contentEntry/afterDelete.js.map +1 -1
  67. package/crud/contentEntry/beforeCreate.d.ts +2 -2
  68. package/crud/contentEntry/beforeCreate.js.map +1 -1
  69. package/crud/contentEntry/beforeUpdate.d.ts +2 -2
  70. package/crud/contentEntry/beforeUpdate.js.map +1 -1
  71. package/crud/contentEntry/entryDataFactories/createEntryData.d.ts +8 -8
  72. package/crud/contentEntry/entryDataFactories/createEntryData.js +30 -4
  73. package/crud/contentEntry/entryDataFactories/createEntryData.js.map +1 -1
  74. package/crud/contentEntry/entryDataFactories/createEntryRevisionFromData.d.ts +8 -6
  75. package/crud/contentEntry/entryDataFactories/createEntryRevisionFromData.js +54 -11
  76. package/crud/contentEntry/entryDataFactories/createEntryRevisionFromData.js.map +1 -1
  77. package/crud/contentEntry/entryDataFactories/createPublishEntryData.d.ts +5 -5
  78. package/crud/contentEntry/entryDataFactories/createPublishEntryData.js +22 -20
  79. package/crud/contentEntry/entryDataFactories/createPublishEntryData.js.map +1 -1
  80. package/crud/contentEntry/entryDataFactories/createRepublishEntryData.d.ts +3 -3
  81. package/crud/contentEntry/entryDataFactories/createRepublishEntryData.js +18 -16
  82. package/crud/contentEntry/entryDataFactories/createRepublishEntryData.js.map +1 -1
  83. package/crud/contentEntry/entryDataFactories/createUnpublishEntryData.d.ts +5 -5
  84. package/crud/contentEntry/entryDataFactories/createUnpublishEntryData.js +10 -8
  85. package/crud/contentEntry/entryDataFactories/createUnpublishEntryData.js.map +1 -1
  86. package/crud/contentEntry/entryDataFactories/createUpdateEntryData.d.ts +5 -5
  87. package/crud/contentEntry/entryDataFactories/createUpdateEntryData.js +8 -0
  88. package/crud/contentEntry/entryDataFactories/createUpdateEntryData.js.map +1 -1
  89. package/crud/contentEntry/entryDataFactories/index.js.map +1 -1
  90. package/crud/contentEntry/entryDataFactories/mapAndCleanUpdatedInputData.d.ts +1 -1
  91. package/crud/contentEntry/entryDataFactories/mapAndCleanUpdatedInputData.js.map +1 -1
  92. package/crud/contentEntry/entryDataFactories/statuses.js +3 -6
  93. package/crud/contentEntry/entryDataFactories/statuses.js.map +1 -1
  94. package/crud/contentEntry/entryDataValidation.d.ts +2 -2
  95. package/crud/contentEntry/entryDataValidation.js.map +1 -1
  96. package/crud/contentEntry/markLockedFields.d.ts +1 -1
  97. package/crud/contentEntry/markLockedFields.js.map +1 -1
  98. package/crud/contentEntry/referenceFieldsMapping.d.ts +1 -1
  99. package/crud/contentEntry/referenceFieldsMapping.js +10 -10
  100. package/crud/contentEntry/referenceFieldsMapping.js.map +1 -1
  101. package/crud/contentEntry/searchableFields.d.ts +2 -2
  102. package/crud/contentEntry/searchableFields.js.map +1 -1
  103. package/crud/contentEntry/useCases/DeleteEntry/DeleteEntry.d.ts +10 -0
  104. package/crud/contentEntry/useCases/DeleteEntry/DeleteEntry.js +58 -0
  105. package/crud/contentEntry/useCases/DeleteEntry/DeleteEntry.js.map +1 -0
  106. package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperation.d.ts +7 -0
  107. package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperation.js +17 -0
  108. package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperation.js.map +1 -0
  109. package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperationWithEvents.d.ts +9 -0
  110. package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperationWithEvents.js +45 -0
  111. package/crud/contentEntry/useCases/DeleteEntry/DeleteEntryOperationWithEvents.js.map +1 -0
  112. package/crud/contentEntry/useCases/DeleteEntry/DeleteEntrySecure.d.ts +9 -0
  113. package/crud/contentEntry/useCases/DeleteEntry/DeleteEntrySecure.js +22 -0
  114. package/crud/contentEntry/useCases/DeleteEntry/DeleteEntrySecure.js.map +1 -0
  115. package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBin.d.ts +10 -0
  116. package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBin.js +33 -0
  117. package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBin.js.map +1 -0
  118. package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperation.d.ts +7 -0
  119. package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperation.js +17 -0
  120. package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperation.js.map +1 -0
  121. package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperationWithEvents.d.ts +9 -0
  122. package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperationWithEvents.js +45 -0
  123. package/crud/contentEntry/useCases/DeleteEntry/MoveEntryToBinOperationWithEvents.js.map +1 -0
  124. package/crud/contentEntry/useCases/DeleteEntry/TransformEntryDelete.d.ts +6 -0
  125. package/crud/contentEntry/useCases/DeleteEntry/TransformEntryDelete.js +21 -0
  126. package/crud/contentEntry/useCases/DeleteEntry/TransformEntryDelete.js.map +1 -0
  127. package/crud/contentEntry/useCases/DeleteEntry/TransformEntryMoveToBin.d.ts +9 -0
  128. package/crud/contentEntry/useCases/DeleteEntry/TransformEntryMoveToBin.js +54 -0
  129. package/crud/contentEntry/useCases/DeleteEntry/TransformEntryMoveToBin.js.map +1 -0
  130. package/crud/contentEntry/useCases/DeleteEntry/index.d.ts +28 -0
  131. package/crud/contentEntry/useCases/DeleteEntry/index.js +42 -0
  132. package/crud/contentEntry/useCases/DeleteEntry/index.js.map +1 -0
  133. package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIds.d.ts +9 -0
  134. package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIds.js +21 -0
  135. package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIds.js.map +1 -0
  136. package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsNotDeleted.d.ts +7 -0
  137. package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsNotDeleted.js +18 -0
  138. package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsNotDeleted.js.map +1 -0
  139. package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsSecure.d.ts +9 -0
  140. package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsSecure.js +28 -0
  141. package/crud/contentEntry/useCases/GetEntriesByIds/GetEntriesByIdsSecure.js.map +1 -0
  142. package/crud/contentEntry/useCases/GetEntriesByIds/index.d.ts +13 -0
  143. package/crud/contentEntry/useCases/GetEntriesByIds/index.js +20 -0
  144. package/crud/contentEntry/useCases/GetEntriesByIds/index.js.map +1 -0
  145. package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIds.d.ts +9 -0
  146. package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIds.js +21 -0
  147. package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIds.js.map +1 -0
  148. package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsNotDeleted.d.ts +7 -0
  149. package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsNotDeleted.js +18 -0
  150. package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsNotDeleted.js.map +1 -0
  151. package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsSecure.d.ts +9 -0
  152. package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsSecure.js +28 -0
  153. package/crud/contentEntry/useCases/GetLatestEntriesByIds/GetLatestEntriesByIdsSecure.js.map +1 -0
  154. package/crud/contentEntry/useCases/GetLatestEntriesByIds/index.d.ts +13 -0
  155. package/crud/contentEntry/useCases/GetLatestEntriesByIds/index.js +20 -0
  156. package/crud/contentEntry/useCases/GetLatestEntriesByIds/index.js.map +1 -0
  157. package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryId.d.ts +9 -0
  158. package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryId.js +22 -0
  159. package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryId.js.map +1 -0
  160. package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdDeleted.d.ts +7 -0
  161. package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdDeleted.js +21 -0
  162. package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdDeleted.js.map +1 -0
  163. package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdNotDeleted.d.ts +7 -0
  164. package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdNotDeleted.js +21 -0
  165. package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/GetLatestRevisionByEntryIdNotDeleted.js.map +1 -0
  166. package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/index.d.ts +15 -0
  167. package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/index.js +22 -0
  168. package/crud/contentEntry/useCases/GetLatestRevisionByEntryId/index.js.map +1 -0
  169. package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryId.d.ts +9 -0
  170. package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryId.js +22 -0
  171. package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryId.js.map +1 -0
  172. package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryIdNotDeleted.d.ts +7 -0
  173. package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryIdNotDeleted.js +21 -0
  174. package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/GetPreviousRevisionByEntryIdNotDeleted.js.map +1 -0
  175. package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/index.d.ts +11 -0
  176. package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/index.js +18 -0
  177. package/crud/contentEntry/useCases/GetPreviousRevisionByEntryId/index.js.map +1 -0
  178. package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIds.d.ts +9 -0
  179. package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIds.js +21 -0
  180. package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIds.js.map +1 -0
  181. package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsNotDeleted.d.ts +7 -0
  182. package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsNotDeleted.js +18 -0
  183. package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsNotDeleted.js.map +1 -0
  184. package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsSecure.d.ts +9 -0
  185. package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsSecure.js +28 -0
  186. package/crud/contentEntry/useCases/GetPublishedEntriesByIds/GetPublishedEntriesByIdsSecure.js.map +1 -0
  187. package/crud/contentEntry/useCases/GetPublishedEntriesByIds/index.d.ts +13 -0
  188. package/crud/contentEntry/useCases/GetPublishedEntriesByIds/index.js +20 -0
  189. package/crud/contentEntry/useCases/GetPublishedEntriesByIds/index.js.map +1 -0
  190. package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryId.d.ts +9 -0
  191. package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryId.js +22 -0
  192. package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryId.js.map +1 -0
  193. package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdNotDeleted.d.ts +7 -0
  194. package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdNotDeleted.js +21 -0
  195. package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/GetPublishedRevisionByEntryIdNotDeleted.js.map +1 -0
  196. package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/index.d.ts +11 -0
  197. package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/index.js +18 -0
  198. package/crud/contentEntry/useCases/GetPublishedRevisionByEntryId/index.js.map +1 -0
  199. package/crud/contentEntry/useCases/GetRevisionById/GetRevisionById.d.ts +9 -0
  200. package/crud/contentEntry/useCases/GetRevisionById/GetRevisionById.js +22 -0
  201. package/crud/contentEntry/useCases/GetRevisionById/GetRevisionById.js.map +1 -0
  202. package/crud/contentEntry/useCases/GetRevisionById/GetRevisionByIdNotDeleted.d.ts +7 -0
  203. package/crud/contentEntry/useCases/GetRevisionById/GetRevisionByIdNotDeleted.js +21 -0
  204. package/crud/contentEntry/useCases/GetRevisionById/GetRevisionByIdNotDeleted.js.map +1 -0
  205. package/crud/contentEntry/useCases/GetRevisionById/index.d.ts +11 -0
  206. package/crud/contentEntry/useCases/GetRevisionById/index.js +18 -0
  207. package/crud/contentEntry/useCases/GetRevisionById/index.js.map +1 -0
  208. package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryId.d.ts +9 -0
  209. package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryId.js +21 -0
  210. package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryId.js.map +1 -0
  211. package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryIdNotDeleted.d.ts +7 -0
  212. package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryIdNotDeleted.js +18 -0
  213. package/crud/contentEntry/useCases/GetRevisionsByEntryId/GetRevisionsByEntryIdNotDeleted.js.map +1 -0
  214. package/crud/contentEntry/useCases/GetRevisionsByEntryId/index.d.ts +13 -0
  215. package/crud/contentEntry/useCases/GetRevisionsByEntryId/index.js +18 -0
  216. package/crud/contentEntry/useCases/GetRevisionsByEntryId/index.js.map +1 -0
  217. package/crud/contentEntry/useCases/ListEntries/GetEntry.d.ts +7 -0
  218. package/crud/contentEntry/useCases/ListEntries/GetEntry.js +29 -0
  219. package/crud/contentEntry/useCases/ListEntries/GetEntry.js.map +1 -0
  220. package/crud/contentEntry/useCases/ListEntries/GetEntrySecure.d.ts +11 -0
  221. package/crud/contentEntry/useCases/ListEntries/GetEntrySecure.js +38 -0
  222. package/crud/contentEntry/useCases/ListEntries/GetEntrySecure.js.map +1 -0
  223. package/crud/contentEntry/useCases/ListEntries/ListEntries.d.ts +7 -0
  224. package/crud/contentEntry/useCases/ListEntries/ListEntries.js +62 -0
  225. package/crud/contentEntry/useCases/ListEntries/ListEntries.js.map +1 -0
  226. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperation.d.ts +14 -0
  227. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperation.js +24 -0
  228. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperation.js.map +1 -0
  229. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationDeleted.d.ts +7 -0
  230. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationDeleted.js +24 -0
  231. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationDeleted.js.map +1 -0
  232. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationLatest.d.ts +7 -0
  233. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationLatest.js +25 -0
  234. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationLatest.js.map +1 -0
  235. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationNotDeleted.d.ts +7 -0
  236. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationNotDeleted.js +24 -0
  237. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationNotDeleted.js.map +1 -0
  238. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationPublished.d.ts +7 -0
  239. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationPublished.js +24 -0
  240. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationPublished.js.map +1 -0
  241. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithEvents.d.ts +9 -0
  242. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithEvents.js +22 -0
  243. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithEvents.js.map +1 -0
  244. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSearchableFields.d.ts +8 -0
  245. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSearchableFields.js +27 -0
  246. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSearchableFields.js.map +1 -0
  247. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSort.d.ts +8 -0
  248. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSort.js +26 -0
  249. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithSort.js.map +1 -0
  250. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithStatusCheck.d.ts +7 -0
  251. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithStatusCheck.js +36 -0
  252. package/crud/contentEntry/useCases/ListEntries/ListEntriesOperationWithStatusCheck.js.map +1 -0
  253. package/crud/contentEntry/useCases/ListEntries/ListEntriesSecure.d.ts +11 -0
  254. package/crud/contentEntry/useCases/ListEntries/ListEntriesSecure.js +41 -0
  255. package/crud/contentEntry/useCases/ListEntries/ListEntriesSecure.js.map +1 -0
  256. package/crud/contentEntry/useCases/ListEntries/index.d.ts +26 -0
  257. package/crud/contentEntry/useCases/ListEntries/index.js +61 -0
  258. package/crud/contentEntry/useCases/ListEntries/index.js.map +1 -0
  259. package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBin.d.ts +10 -0
  260. package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBin.js +37 -0
  261. package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBin.js.map +1 -0
  262. package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperation.d.ts +9 -0
  263. package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperation.js +19 -0
  264. package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperation.js.map +1 -0
  265. package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperationWithEvents.d.ts +9 -0
  266. package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperationWithEvents.js +42 -0
  267. package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinOperationWithEvents.js.map +1 -0
  268. package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinSecure.d.ts +9 -0
  269. package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinSecure.js +22 -0
  270. package/crud/contentEntry/useCases/RestoreEntryFromBin/RestoreEntryFromBinSecure.js.map +1 -0
  271. package/crud/contentEntry/useCases/RestoreEntryFromBin/TransformEntryRestoreFromBin.d.ts +9 -0
  272. package/crud/contentEntry/useCases/RestoreEntryFromBin/TransformEntryRestoreFromBin.js +53 -0
  273. package/crud/contentEntry/useCases/RestoreEntryFromBin/TransformEntryRestoreFromBin.js.map +1 -0
  274. package/crud/contentEntry/useCases/RestoreEntryFromBin/index.d.ts +25 -0
  275. package/crud/contentEntry/useCases/RestoreEntryFromBin/index.js +24 -0
  276. package/crud/contentEntry/useCases/RestoreEntryFromBin/index.js.map +1 -0
  277. package/crud/contentEntry/useCases/index.d.ts +11 -0
  278. package/crud/contentEntry/useCases/index.js +128 -0
  279. package/crud/contentEntry/useCases/index.js.map +1 -0
  280. package/crud/contentEntry.crud.d.ts +6 -8
  281. package/crud/contentEntry.crud.js +304 -357
  282. package/crud/contentEntry.crud.js.map +1 -1
  283. package/crud/contentModel/beforeCreate.d.ts +2 -2
  284. package/crud/contentModel/beforeCreate.js.map +1 -1
  285. package/crud/contentModel/beforeDelete.d.ts +3 -5
  286. package/crud/contentModel/beforeDelete.js +49 -15
  287. package/crud/contentModel/beforeDelete.js.map +1 -1
  288. package/crud/contentModel/beforeUpdate.d.ts +2 -2
  289. package/crud/contentModel/beforeUpdate.js.map +1 -1
  290. package/crud/contentModel/compatibility/modelApiName.d.ts +1 -1
  291. package/crud/contentModel/compatibility/modelApiName.js.map +1 -1
  292. package/crud/contentModel/contentModelManagerFactory.d.ts +2 -2
  293. package/crud/contentModel/contentModelManagerFactory.js.map +1 -1
  294. package/crud/contentModel/createFieldStorageId.d.ts +1 -1
  295. package/crud/contentModel/createFieldStorageId.js.map +1 -1
  296. package/crud/contentModel/defaultFields.d.ts +1 -1
  297. package/crud/contentModel/defaultFields.js.map +1 -1
  298. package/crud/contentModel/ensureTypeTag.d.ts +1 -1
  299. package/crud/contentModel/ensureTypeTag.js.map +1 -1
  300. package/crud/contentModel/fields/descriptionField.d.ts +6 -2
  301. package/crud/contentModel/fields/descriptionField.js +14 -28
  302. package/crud/contentModel/fields/descriptionField.js.map +1 -1
  303. package/crud/contentModel/fields/getApplicableFieldById.d.ts +2 -0
  304. package/crud/contentModel/fields/getApplicableFieldById.js +15 -0
  305. package/crud/contentModel/fields/getApplicableFieldById.js.map +1 -0
  306. package/crud/contentModel/fields/imageField.d.ts +2 -2
  307. package/crud/contentModel/fields/imageField.js +9 -28
  308. package/crud/contentModel/fields/imageField.js.map +1 -1
  309. package/crud/contentModel/fields/titleField.d.ts +6 -2
  310. package/crud/contentModel/fields/titleField.js +14 -43
  311. package/crud/contentModel/fields/titleField.js.map +1 -1
  312. package/crud/contentModel/listModelsFromDatabase.d.ts +3 -3
  313. package/crud/contentModel/listModelsFromDatabase.js.map +1 -1
  314. package/crud/contentModel/validate/endingAllowed.d.ts +1 -1
  315. package/crud/contentModel/validate/endingAllowed.js.map +1 -1
  316. package/crud/contentModel/validate/isModelEndingAllowed.js +1 -2
  317. package/crud/contentModel/validate/isModelEndingAllowed.js.map +1 -1
  318. package/crud/contentModel/validate/modelId.d.ts +1 -1
  319. package/crud/contentModel/validate/modelId.js.map +1 -1
  320. package/crud/contentModel/validate/pluralApiName.d.ts +1 -1
  321. package/crud/contentModel/validate/pluralApiName.js.map +1 -1
  322. package/crud/contentModel/validate/singularApiName.d.ts +1 -1
  323. package/crud/contentModel/validate/singularApiName.js.map +1 -1
  324. package/crud/contentModel/validateModel.d.ts +1 -1
  325. package/crud/contentModel/validateModel.js.map +1 -1
  326. package/crud/contentModel/validateModelFields.d.ts +1 -1
  327. package/crud/contentModel/validateModelFields.js +1 -1
  328. package/crud/contentModel/validateModelFields.js.map +1 -1
  329. package/crud/contentModel/validateStorageId.d.ts +1 -0
  330. package/crud/contentModel/validateStorageId.js +19 -0
  331. package/crud/contentModel/validateStorageId.js.map +1 -0
  332. package/crud/contentModel/validation.d.ts +197 -176
  333. package/crud/contentModel/validation.js +5 -5
  334. package/crud/contentModel/validation.js.map +1 -1
  335. package/crud/contentModel.crud.d.ts +6 -6
  336. package/crud/contentModel.crud.js +76 -37
  337. package/crud/contentModel.crud.js.map +1 -1
  338. package/crud/contentModelGroup/beforeCreate.d.ts +3 -3
  339. package/crud/contentModelGroup/beforeCreate.js.map +1 -1
  340. package/crud/contentModelGroup/beforeDelete.d.ts +3 -3
  341. package/crud/contentModelGroup/beforeDelete.js.map +1 -1
  342. package/crud/contentModelGroup/beforeUpdate.d.ts +3 -3
  343. package/crud/contentModelGroup/beforeUpdate.js.map +1 -1
  344. package/crud/contentModelGroup/listGroupsFromDatabase.d.ts +1 -1
  345. package/crud/contentModelGroup/listGroupsFromDatabase.js.map +1 -1
  346. package/crud/contentModelGroup/validation.d.ts +1 -1
  347. package/crud/contentModelGroup/validation.js.map +1 -1
  348. package/crud/contentModelGroup.crud.d.ts +6 -6
  349. package/crud/contentModelGroup.crud.js +17 -28
  350. package/crud/contentModelGroup.crud.js.map +1 -1
  351. package/crud/system.crud.d.ts +4 -4
  352. package/crud/system.crud.js +10 -0
  353. package/crud/system.crud.js.map +1 -1
  354. package/export/crud/exporting.d.ts +2 -2
  355. package/export/crud/exporting.js.map +1 -1
  356. package/export/crud/importing.d.ts +2 -2
  357. package/export/crud/importing.js.map +1 -1
  358. package/export/crud/imports/importData.d.ts +2 -2
  359. package/export/crud/imports/importData.js.map +1 -1
  360. package/export/crud/imports/importGroups.d.ts +2 -2
  361. package/export/crud/imports/importGroups.js.map +1 -1
  362. package/export/crud/imports/importModels.d.ts +2 -2
  363. package/export/crud/imports/importModels.js.map +1 -1
  364. package/export/crud/imports/validateGroups.d.ts +2 -2
  365. package/export/crud/imports/validateGroups.js.map +1 -1
  366. package/export/crud/imports/validateInput.d.ts +2 -2
  367. package/export/crud/imports/validateInput.js.map +1 -1
  368. package/export/crud/imports/validateModels.d.ts +2 -2
  369. package/export/crud/imports/validateModels.js.map +1 -1
  370. package/export/crud/index.d.ts +1 -1
  371. package/export/crud/index.js.map +1 -1
  372. package/export/crud/sanitize.d.ts +3 -3
  373. package/export/crud/sanitize.js +2 -1
  374. package/export/crud/sanitize.js.map +1 -1
  375. package/export/graphql/index.d.ts +1 -1
  376. package/export/graphql/index.js +1 -1
  377. package/export/graphql/index.js.map +1 -1
  378. package/export/index.js.map +1 -1
  379. package/export/types.d.ts +5 -5
  380. package/export/types.js +1 -2
  381. package/export/types.js.map +1 -1
  382. package/fieldConverters/CmsModelDefaultFieldConverterPlugin.d.ts +5 -3
  383. package/fieldConverters/CmsModelDefaultFieldConverterPlugin.js.map +1 -1
  384. package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.d.ts +3 -2
  385. package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.js +23 -65
  386. package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.js.map +1 -1
  387. package/fieldConverters/CmsModelObjectFieldConverterPlugin.d.ts +3 -2
  388. package/fieldConverters/CmsModelObjectFieldConverterPlugin.js +2 -2
  389. package/fieldConverters/CmsModelObjectFieldConverterPlugin.js.map +1 -1
  390. package/fieldConverters/index.d.ts +3 -0
  391. package/fieldConverters/index.js +4 -0
  392. package/fieldConverters/index.js.map +1 -1
  393. package/graphql/buildSchemaPlugins.d.ts +3 -3
  394. package/graphql/buildSchemaPlugins.js.map +1 -1
  395. package/graphql/checkEndpointAccess.d.ts +1 -1
  396. package/graphql/checkEndpointAccess.js.map +1 -1
  397. package/graphql/createExecutableSchema.d.ts +2 -2
  398. package/graphql/createExecutableSchema.js +14 -7
  399. package/graphql/createExecutableSchema.js.map +1 -1
  400. package/graphql/createRequestBody.d.ts +1 -1
  401. package/graphql/createRequestBody.js.map +1 -1
  402. package/graphql/formatErrorPayload.js.map +1 -1
  403. package/graphql/generateSchema.d.ts +2 -2
  404. package/graphql/generateSchema.js +6 -1
  405. package/graphql/generateSchema.js.map +1 -1
  406. package/graphql/getSchema/generateCacheId.d.ts +10 -0
  407. package/graphql/getSchema/generateCacheId.js +17 -0
  408. package/graphql/getSchema/generateCacheId.js.map +1 -0
  409. package/graphql/getSchema/generateCacheKey.d.ts +10 -0
  410. package/graphql/getSchema/generateCacheKey.js +34 -0
  411. package/graphql/getSchema/generateCacheKey.js.map +1 -0
  412. package/graphql/getSchema.d.ts +4 -4
  413. package/graphql/getSchema.js +13 -50
  414. package/graphql/getSchema.js.map +1 -1
  415. package/graphql/graphQLHandlerFactory.d.ts +2 -2
  416. package/graphql/graphQLHandlerFactory.js.map +1 -1
  417. package/graphql/handleRequest.d.ts +2 -2
  418. package/graphql/handleRequest.js +8 -1
  419. package/graphql/handleRequest.js.map +1 -1
  420. package/graphql/index.d.ts +4 -3
  421. package/graphql/index.js +1 -1
  422. package/graphql/index.js.map +1 -1
  423. package/graphql/scalars/RevisionId.d.ts +2 -0
  424. package/graphql/scalars/RevisionId.js +26 -0
  425. package/graphql/scalars/RevisionId.js.map +1 -0
  426. package/graphql/scalars/RevisionIdScalarPlugin.d.ts +2 -0
  427. package/graphql/scalars/RevisionIdScalarPlugin.js +18 -0
  428. package/graphql/scalars/RevisionIdScalarPlugin.js.map +1 -0
  429. package/graphql/schema/baseContentSchema.d.ts +3 -3
  430. package/graphql/schema/baseContentSchema.js +1 -7
  431. package/graphql/schema/baseContentSchema.js.map +1 -1
  432. package/graphql/schema/baseSchema.js +12 -5
  433. package/graphql/schema/baseSchema.js.map +1 -1
  434. package/graphql/schema/contentEntries.d.ts +3 -3
  435. package/graphql/schema/contentEntries.js +3 -4
  436. package/graphql/schema/contentEntries.js.map +1 -1
  437. package/graphql/schema/contentModelGroups.d.ts +3 -3
  438. package/graphql/schema/contentModelGroups.js +1 -1
  439. package/graphql/schema/contentModelGroups.js.map +1 -1
  440. package/graphql/schema/contentModels.d.ts +4 -5
  441. package/graphql/schema/contentModels.js +21 -5
  442. package/graphql/schema/contentModels.js.map +1 -1
  443. package/graphql/schema/createFieldResolvers.d.ts +2 -2
  444. package/graphql/schema/createFieldResolvers.js +1 -3
  445. package/graphql/schema/createFieldResolvers.js.map +1 -1
  446. package/graphql/schema/createFieldTypePluginRecords.d.ts +2 -2
  447. package/graphql/schema/createFieldTypePluginRecords.js.map +1 -1
  448. package/graphql/schema/createManageResolvers.d.ts +1 -2
  449. package/graphql/schema/createManageResolvers.js +24 -49
  450. package/graphql/schema/createManageResolvers.js.map +1 -1
  451. package/graphql/schema/createManageSDL.d.ts +2 -2
  452. package/graphql/schema/createManageSDL.js +14 -5
  453. package/graphql/schema/createManageSDL.js.map +1 -1
  454. package/graphql/schema/createPreviewResolvers.d.ts +1 -2
  455. package/graphql/schema/createPreviewResolvers.js +4 -7
  456. package/graphql/schema/createPreviewResolvers.js.map +1 -1
  457. package/graphql/schema/createReadResolvers.d.ts +1 -2
  458. package/graphql/schema/createReadResolvers.js +4 -7
  459. package/graphql/schema/createReadResolvers.js.map +1 -1
  460. package/graphql/schema/createReadSDL.d.ts +2 -2
  461. package/graphql/schema/createReadSDL.js +6 -7
  462. package/graphql/schema/createReadSDL.js.map +1 -1
  463. package/graphql/schema/createSingularResolvers.d.ts +12 -0
  464. package/graphql/schema/createSingularResolvers.js +56 -0
  465. package/graphql/schema/createSingularResolvers.js.map +1 -0
  466. package/graphql/schema/createSingularSDL.d.ts +12 -0
  467. package/graphql/schema/createSingularSDL.js +95 -0
  468. package/graphql/schema/createSingularSDL.js.map +1 -0
  469. package/graphql/schema/resolvers/manage/normalizeGraphQlInput.d.ts +7 -0
  470. package/graphql/schema/resolvers/manage/normalizeGraphQlInput.js +59 -0
  471. package/graphql/schema/resolvers/manage/normalizeGraphQlInput.js.map +1 -0
  472. package/graphql/schema/resolvers/manage/resolveCreate.d.ts +2 -2
  473. package/graphql/schema/resolvers/manage/resolveCreate.js.map +1 -1
  474. package/graphql/schema/resolvers/manage/resolveCreateFrom.d.ts +2 -2
  475. package/graphql/schema/resolvers/manage/resolveCreateFrom.js.map +1 -1
  476. package/graphql/schema/resolvers/manage/resolveDelete.d.ts +2 -2
  477. package/graphql/schema/resolvers/manage/resolveDelete.js +2 -1
  478. package/graphql/schema/resolvers/manage/resolveDelete.js.map +1 -1
  479. package/graphql/schema/resolvers/manage/resolveDeleteMultiple.d.ts +2 -2
  480. package/graphql/schema/resolvers/manage/resolveDeleteMultiple.js.map +1 -1
  481. package/graphql/schema/resolvers/manage/resolveGet.d.ts +2 -2
  482. package/graphql/schema/resolvers/manage/resolveGet.js.map +1 -1
  483. package/graphql/schema/resolvers/manage/resolveGetByIds.d.ts +2 -2
  484. package/graphql/schema/resolvers/manage/resolveGetByIds.js.map +1 -1
  485. package/graphql/schema/resolvers/manage/resolveGetRevisions.d.ts +2 -2
  486. package/graphql/schema/resolvers/manage/resolveGetRevisions.js.map +1 -1
  487. package/graphql/schema/resolvers/manage/resolveGetUniqueFieldValues.d.ts +2 -2
  488. package/graphql/schema/resolvers/manage/resolveGetUniqueFieldValues.js.map +1 -1
  489. package/graphql/schema/resolvers/manage/resolveList.d.ts +2 -2
  490. package/graphql/schema/resolvers/manage/resolveList.js.map +1 -1
  491. package/graphql/schema/resolvers/manage/resolveListDeleted.d.ts +4 -0
  492. package/graphql/schema/resolvers/manage/resolveListDeleted.js +20 -0
  493. package/graphql/schema/resolvers/manage/resolveListDeleted.js.map +1 -0
  494. package/graphql/schema/resolvers/manage/resolveMove.d.ts +2 -2
  495. package/graphql/schema/resolvers/manage/resolveMove.js.map +1 -1
  496. package/graphql/schema/resolvers/manage/resolvePublish.d.ts +2 -2
  497. package/graphql/schema/resolvers/manage/resolvePublish.js.map +1 -1
  498. package/graphql/schema/resolvers/manage/resolveRepublish.d.ts +2 -2
  499. package/graphql/schema/resolvers/manage/resolveRepublish.js.map +1 -1
  500. package/graphql/schema/resolvers/manage/resolveRestoreFromBin.d.ts +7 -0
  501. package/graphql/schema/resolvers/manage/resolveRestoreFromBin.js +20 -0
  502. package/graphql/schema/resolvers/manage/resolveRestoreFromBin.js.map +1 -0
  503. package/graphql/schema/resolvers/manage/resolveUnpublish.d.ts +2 -2
  504. package/graphql/schema/resolvers/manage/resolveUnpublish.js.map +1 -1
  505. package/graphql/schema/resolvers/manage/resolveUpdate.d.ts +2 -2
  506. package/graphql/schema/resolvers/manage/resolveUpdate.js.map +1 -1
  507. package/graphql/schema/resolvers/manage/resolveValidate.d.ts +2 -2
  508. package/graphql/schema/resolvers/manage/resolveValidate.js.map +1 -1
  509. package/graphql/schema/resolvers/preview/resolveGet.d.ts +2 -2
  510. package/graphql/schema/resolvers/preview/resolveGet.js.map +1 -1
  511. package/graphql/schema/resolvers/preview/resolveList.d.ts +2 -2
  512. package/graphql/schema/resolvers/preview/resolveList.js.map +1 -1
  513. package/graphql/schema/resolvers/read/resolveGet.d.ts +2 -2
  514. package/graphql/schema/resolvers/read/resolveGet.js.map +1 -1
  515. package/graphql/schema/resolvers/read/resolveList.d.ts +2 -2
  516. package/graphql/schema/resolvers/read/resolveList.js.map +1 -1
  517. package/graphql/schema/resolvers/singular/resolveGet.d.ts +7 -0
  518. package/graphql/schema/resolvers/singular/resolveGet.js +21 -0
  519. package/graphql/schema/resolvers/singular/resolveGet.js.map +1 -0
  520. package/graphql/schema/resolvers/singular/resolveUpdate.d.ts +8 -0
  521. package/graphql/schema/resolvers/singular/resolveUpdate.js +21 -0
  522. package/graphql/schema/resolvers/singular/resolveUpdate.js.map +1 -0
  523. package/graphql/schema/schemaPlugins.d.ts +3 -3
  524. package/graphql/schema/schemaPlugins.js +32 -11
  525. package/graphql/schema/schemaPlugins.js.map +1 -1
  526. package/graphql/system.d.ts +1 -1
  527. package/graphql/system.js +2 -1
  528. package/graphql/system.js.map +1 -1
  529. package/graphqlFields/boolean.d.ts +1 -1
  530. package/graphqlFields/boolean.js.map +1 -1
  531. package/graphqlFields/datetime.d.ts +1 -1
  532. package/graphqlFields/datetime.js.map +1 -1
  533. package/graphqlFields/dynamicZone/dynamicZoneField.d.ts +1 -1
  534. package/graphqlFields/dynamicZone/dynamicZoneField.js +62 -8
  535. package/graphqlFields/dynamicZone/dynamicZoneField.js.map +1 -1
  536. package/graphqlFields/dynamicZone/index.d.ts +0 -1
  537. package/graphqlFields/dynamicZone/index.js +0 -7
  538. package/graphqlFields/dynamicZone/index.js.map +1 -1
  539. package/graphqlFields/file.d.ts +1 -1
  540. package/graphqlFields/file.js.map +1 -1
  541. package/graphqlFields/helpers.d.ts +1 -1
  542. package/graphqlFields/helpers.js.map +1 -1
  543. package/graphqlFields/index.d.ts +1 -1
  544. package/graphqlFields/index.js +2 -1
  545. package/graphqlFields/index.js.map +1 -1
  546. package/graphqlFields/json.d.ts +1 -1
  547. package/graphqlFields/json.js.map +1 -1
  548. package/graphqlFields/longText.d.ts +1 -1
  549. package/graphqlFields/longText.js.map +1 -1
  550. package/graphqlFields/number.d.ts +1 -1
  551. package/graphqlFields/number.js.map +1 -1
  552. package/graphqlFields/object.d.ts +2 -2
  553. package/graphqlFields/object.js +14 -0
  554. package/graphqlFields/object.js.map +1 -1
  555. package/graphqlFields/ref.d.ts +1 -1
  556. package/graphqlFields/ref.js +1 -1
  557. package/graphqlFields/ref.js.map +1 -1
  558. package/graphqlFields/richText/RichTextPluginsProcessor.d.ts +2 -2
  559. package/graphqlFields/richText/RichTextPluginsProcessor.js.map +1 -1
  560. package/graphqlFields/richText/richTextResolver.d.ts +2 -2
  561. package/graphqlFields/richText/richTextResolver.js +4 -19
  562. package/graphqlFields/richText/richTextResolver.js.map +1 -1
  563. package/graphqlFields/richText.d.ts +1 -1
  564. package/graphqlFields/richText.js.map +1 -1
  565. package/graphqlFields/searchableJson.d.ts +2 -0
  566. package/graphqlFields/searchableJson.js +60 -0
  567. package/graphqlFields/searchableJson.js.map +1 -0
  568. package/graphqlFields/text.d.ts +1 -1
  569. package/graphqlFields/text.js.map +1 -1
  570. package/htmlRenderer/LexicalRenderer.d.ts +1 -1
  571. package/htmlRenderer/LexicalRenderer.js.map +1 -1
  572. package/htmlRenderer/createLexicalHTMLRenderer.js +1 -1
  573. package/htmlRenderer/createLexicalHTMLRenderer.js.map +1 -1
  574. package/index.d.ts +13 -7
  575. package/index.js +67 -7
  576. package/index.js.map +1 -1
  577. package/modelManager/DefaultCmsModelManager.d.ts +11 -10
  578. package/modelManager/DefaultCmsModelManager.js +16 -13
  579. package/modelManager/DefaultCmsModelManager.js.map +1 -1
  580. package/modelManager/SingletonModelManager.d.ts +12 -0
  581. package/modelManager/SingletonModelManager.js +48 -0
  582. package/modelManager/SingletonModelManager.js.map +1 -0
  583. package/modelManager/index.d.ts +2 -1
  584. package/modelManager/index.js +16 -1
  585. package/modelManager/index.js.map +1 -1
  586. package/package.json +37 -38
  587. package/parameters/context.js.map +1 -1
  588. package/parameters/header.js.map +1 -1
  589. package/parameters/index.js.map +1 -1
  590. package/parameters/manual.d.ts +2 -1
  591. package/parameters/manual.js.map +1 -1
  592. package/parameters/path.js.map +1 -1
  593. package/plugins/CmsGraphQLSchemaPlugin/CmsGraphQLSchemaPlugin.d.ts +9 -0
  594. package/plugins/{CmsGraphQLSchemaPlugin.js → CmsGraphQLSchemaPlugin/CmsGraphQLSchemaPlugin.js} +5 -1
  595. package/plugins/CmsGraphQLSchemaPlugin/CmsGraphQLSchemaPlugin.js.map +1 -0
  596. package/plugins/CmsGraphQLSchemaPlugin/index.d.ts +1 -0
  597. package/plugins/CmsGraphQLSchemaPlugin/index.js +18 -0
  598. package/plugins/CmsGraphQLSchemaPlugin/index.js.map +1 -0
  599. package/plugins/CmsGraphQLSchemaSorterPlugin.d.ts +1 -1
  600. package/plugins/CmsGraphQLSchemaSorterPlugin.js.map +1 -1
  601. package/plugins/CmsGroupPlugin.d.ts +9 -1
  602. package/plugins/CmsGroupPlugin.js +17 -1
  603. package/plugins/CmsGroupPlugin.js.map +1 -1
  604. package/plugins/CmsModelFieldConverterPlugin.d.ts +5 -2
  605. package/plugins/CmsModelFieldConverterPlugin.js +4 -0
  606. package/plugins/CmsModelFieldConverterPlugin.js.map +1 -1
  607. package/plugins/CmsModelPlugin.d.ts +30 -10
  608. package/plugins/CmsModelPlugin.js +101 -19
  609. package/plugins/CmsModelPlugin.js.map +1 -1
  610. package/plugins/CmsParametersPlugin.d.ts +3 -3
  611. package/plugins/CmsParametersPlugin.js.map +1 -1
  612. package/plugins/CmsRichTextRendererPlugin.d.ts +6 -6
  613. package/plugins/CmsRichTextRendererPlugin.js.map +1 -1
  614. package/plugins/StorageOperationsCmsModelPlugin.d.ts +1 -1
  615. package/plugins/StorageOperationsCmsModelPlugin.js.map +1 -1
  616. package/plugins/StorageTransformPlugin.d.ts +6 -2
  617. package/plugins/StorageTransformPlugin.js +9 -1
  618. package/plugins/StorageTransformPlugin.js.map +1 -1
  619. package/plugins/index.js.map +1 -1
  620. package/storage/date.d.ts +3 -0
  621. package/storage/date.js +119 -0
  622. package/storage/date.js.map +1 -0
  623. package/storage/default.js.map +1 -1
  624. package/storage/dynamicZone.d.ts +2 -0
  625. package/storage/dynamicZone.js +157 -0
  626. package/storage/dynamicZone.js.map +1 -0
  627. package/storage/index.js +7 -1
  628. package/storage/index.js.map +1 -1
  629. package/storage/json.js +34 -5
  630. package/storage/json.js.map +1 -1
  631. package/storage/object.js +16 -12
  632. package/storage/object.js.map +1 -1
  633. package/types/context.d.ts +146 -0
  634. package/types/context.js +7 -0
  635. package/types/context.js.map +1 -0
  636. package/types/fields/dynamicZoneField.d.ts +23 -0
  637. package/types/fields/dynamicZoneField.js +7 -0
  638. package/types/fields/dynamicZoneField.js.map +1 -0
  639. package/types/fields/objectField.d.ts +13 -0
  640. package/types/fields/objectField.js +7 -0
  641. package/types/fields/objectField.js.map +1 -0
  642. package/types/identity.d.ts +19 -0
  643. package/types/identity.js +7 -0
  644. package/types/identity.js.map +1 -0
  645. package/types/index.d.ts +10 -0
  646. package/types/index.js +117 -0
  647. package/types/index.js.map +1 -0
  648. package/types/model.d.ts +199 -0
  649. package/types/model.js +7 -0
  650. package/types/model.js.map +1 -0
  651. package/types/modelAst.d.ts +39 -0
  652. package/types/modelAst.js +7 -0
  653. package/types/modelAst.js.map +1 -0
  654. package/types/modelField.d.ts +330 -0
  655. package/types/modelField.js +7 -0
  656. package/types/modelField.js.map +1 -0
  657. package/types/modelGroup.d.ts +77 -0
  658. package/types/modelGroup.js +7 -0
  659. package/types/modelGroup.js.map +1 -0
  660. package/types/plugins.d.ts +365 -0
  661. package/types/plugins.js +7 -0
  662. package/types/plugins.js.map +1 -0
  663. package/{types.d.ts → types/types.d.ts} +295 -1215
  664. package/{types.js → types/types.js} +18 -119
  665. package/types/types.js.map +1 -0
  666. package/utils/RichTextRenderer.d.ts +10 -0
  667. package/utils/RichTextRenderer.js +33 -0
  668. package/utils/RichTextRenderer.js.map +1 -0
  669. package/utils/caching/Cache.d.ts +5 -2
  670. package/utils/caching/Cache.js +4 -7
  671. package/utils/caching/Cache.js.map +1 -1
  672. package/utils/caching/CacheKey.d.ts +2 -1
  673. package/utils/caching/CacheKey.js +5 -17
  674. package/utils/caching/CacheKey.js.map +1 -1
  675. package/utils/caching/index.js.map +1 -1
  676. package/utils/caching/types.d.ts +3 -1
  677. package/utils/caching/types.js +7 -0
  678. package/utils/caching/types.js.map +1 -1
  679. package/utils/contentEntryTraverser/ContentEntryTraverser.d.ts +13 -0
  680. package/utils/contentEntryTraverser/ContentEntryTraverser.js +97 -0
  681. package/utils/contentEntryTraverser/ContentEntryTraverser.js.map +1 -0
  682. package/utils/contentModelAst/CmsModelFieldToAstConverterFromPlugins.d.ts +6 -0
  683. package/utils/contentModelAst/CmsModelFieldToAstConverterFromPlugins.js +23 -0
  684. package/utils/contentModelAst/CmsModelFieldToAstConverterFromPlugins.js.map +1 -0
  685. package/utils/contentModelAst/CmsModelFieldToAstFromPlugin.d.ts +7 -0
  686. package/utils/contentModelAst/CmsModelFieldToAstFromPlugin.js +22 -0
  687. package/utils/contentModelAst/CmsModelFieldToAstFromPlugin.js.map +1 -0
  688. package/utils/contentModelAst/CmsModelToAstConverter.d.ts +11 -0
  689. package/utils/contentModelAst/CmsModelToAstConverter.js +28 -0
  690. package/utils/contentModelAst/CmsModelToAstConverter.js.map +1 -0
  691. package/utils/contentModelAst/index.d.ts +3 -0
  692. package/utils/contentModelAst/index.js +40 -0
  693. package/utils/contentModelAst/index.js.map +1 -0
  694. package/utils/converters/Converter.d.ts +3 -3
  695. package/utils/converters/Converter.js.map +1 -1
  696. package/utils/converters/ConverterCollection.d.ts +2 -2
  697. package/utils/converters/ConverterCollection.js.map +1 -1
  698. package/utils/converters/valueKeyStorageConverter.d.ts +3 -3
  699. package/utils/converters/valueKeyStorageConverter.js.map +1 -1
  700. package/utils/createModelField.d.ts +7 -0
  701. package/utils/createModelField.js +51 -0
  702. package/utils/createModelField.js.map +1 -0
  703. package/utils/createTypeFromFields.d.ts +1 -1
  704. package/utils/createTypeFromFields.js.map +1 -1
  705. package/utils/createTypeName.js.map +1 -1
  706. package/utils/date.js.map +1 -1
  707. package/utils/entryStorage.d.ts +13 -1
  708. package/utils/entryStorage.js +37 -3
  709. package/utils/entryStorage.js.map +1 -1
  710. package/utils/filterAsync.js.map +1 -1
  711. package/utils/getBaseFieldType.d.ts +1 -1
  712. package/utils/getBaseFieldType.js.map +1 -1
  713. package/utils/getEntryDescription.d.ts +1 -1
  714. package/utils/getEntryDescription.js.map +1 -1
  715. package/utils/getEntryImage.d.ts +1 -1
  716. package/utils/getEntryImage.js.map +1 -1
  717. package/utils/getEntryTitle.d.ts +1 -1
  718. package/utils/getEntryTitle.js.map +1 -1
  719. package/utils/getSchemaFromFieldPlugins.d.ts +6 -6
  720. package/utils/getSchemaFromFieldPlugins.js +5 -4
  721. package/utils/getSchemaFromFieldPlugins.js.map +1 -1
  722. package/utils/identity.d.ts +1 -1
  723. package/utils/identity.js.map +1 -1
  724. package/utils/incrementEntryIdVersion.js.map +1 -1
  725. package/utils/index.d.ts +1 -0
  726. package/utils/index.js +11 -0
  727. package/utils/index.js.map +1 -1
  728. package/utils/isHeadlessCmsReady.d.ts +2 -0
  729. package/utils/isHeadlessCmsReady.js +23 -0
  730. package/utils/isHeadlessCmsReady.js.map +1 -0
  731. package/utils/modelFieldTraverser/ModelFieldTraverser.d.ts +16 -0
  732. package/utils/modelFieldTraverser/ModelFieldTraverser.js +41 -0
  733. package/utils/modelFieldTraverser/ModelFieldTraverser.js.map +1 -0
  734. package/utils/modelFieldTraverser/index.d.ts +1 -0
  735. package/utils/modelFieldTraverser/index.js +18 -0
  736. package/utils/modelFieldTraverser/index.js.map +1 -0
  737. package/utils/renderFields.d.ts +1 -1
  738. package/utils/renderFields.js +2 -0
  739. package/utils/renderFields.js.map +1 -1
  740. package/utils/renderGetFilterFields.d.ts +1 -1
  741. package/utils/renderGetFilterFields.js.map +1 -1
  742. package/utils/renderInputFields.d.ts +1 -1
  743. package/utils/renderInputFields.js.map +1 -1
  744. package/utils/renderListFilterFields.d.ts +1 -1
  745. package/utils/renderListFilterFields.js.map +1 -1
  746. package/utils/renderSortEnum.d.ts +2 -2
  747. package/utils/renderSortEnum.js.map +1 -1
  748. package/utils/toSlug.js.map +1 -1
  749. package/validators/dateGte.d.ts +1 -1
  750. package/validators/dateGte.js.map +1 -1
  751. package/validators/dateLte.d.ts +1 -1
  752. package/validators/dateLte.js.map +1 -1
  753. package/validators/gte.d.ts +1 -1
  754. package/validators/gte.js.map +1 -1
  755. package/validators/in.d.ts +1 -1
  756. package/validators/in.js.map +1 -1
  757. package/validators/index.js.map +1 -1
  758. package/validators/lte.d.ts +1 -1
  759. package/validators/lte.js.map +1 -1
  760. package/validators/maxLength.d.ts +1 -1
  761. package/validators/maxLength.js.map +1 -1
  762. package/validators/minLength.d.ts +1 -1
  763. package/validators/minLength.js.map +1 -1
  764. package/validators/pattern.d.ts +1 -1
  765. package/validators/pattern.js.map +1 -1
  766. package/validators/patternPlugins/email.d.ts +1 -1
  767. package/validators/patternPlugins/email.js +1 -1
  768. package/validators/patternPlugins/email.js.map +1 -1
  769. package/validators/patternPlugins/index.d.ts +1 -1
  770. package/validators/patternPlugins/index.js.map +1 -1
  771. package/validators/patternPlugins/lowerCase.d.ts +1 -1
  772. package/validators/patternPlugins/lowerCase.js.map +1 -1
  773. package/validators/patternPlugins/lowerCaseSpace.d.ts +1 -1
  774. package/validators/patternPlugins/lowerCaseSpace.js.map +1 -1
  775. package/validators/patternPlugins/upperCase.d.ts +1 -1
  776. package/validators/patternPlugins/upperCase.js.map +1 -1
  777. package/validators/patternPlugins/upperCaseSpace.d.ts +1 -1
  778. package/validators/patternPlugins/upperCaseSpace.js.map +1 -1
  779. package/validators/patternPlugins/url.d.ts +1 -1
  780. package/validators/patternPlugins/url.js.map +1 -1
  781. package/validators/required.d.ts +1 -1
  782. package/validators/required.js.map +1 -1
  783. package/validators/timeGte.d.ts +1 -1
  784. package/validators/timeGte.js.map +1 -1
  785. package/validators/timeLte.d.ts +1 -1
  786. package/validators/timeLte.js.map +1 -1
  787. package/validators/unique.d.ts +1 -1
  788. package/validators/unique.js.map +1 -1
  789. package/graphqlFields/dynamicZone/dynamicZoneStorage.d.ts +0 -3
  790. package/graphqlFields/dynamicZone/dynamicZoneStorage.js +0 -111
  791. package/graphqlFields/dynamicZone/dynamicZoneStorage.js.map +0 -1
  792. package/plugins/CmsGraphQLSchemaPlugin.d.ts +0 -5
  793. package/plugins/CmsGraphQLSchemaPlugin.js.map +0 -1
  794. package/types.js.map +0 -1
  795. package/utils/access.d.ts +0 -9
  796. package/utils/access.js +0 -26
  797. package/utils/access.js.map +0 -1
  798. package/utils/permissions/EntriesPermissions.d.ts +0 -4
  799. package/utils/permissions/EntriesPermissions.js +0 -11
  800. package/utils/permissions/EntriesPermissions.js.map +0 -1
  801. package/utils/permissions/ModelGroupsPermissions.d.ts +0 -9
  802. package/utils/permissions/ModelGroupsPermissions.js +0 -50
  803. package/utils/permissions/ModelGroupsPermissions.js.map +0 -1
  804. package/utils/permissions/ModelsPermissions.d.ts +0 -22
  805. package/utils/permissions/ModelsPermissions.js +0 -90
  806. package/utils/permissions/ModelsPermissions.js.map +0 -1
@@ -8,37 +8,40 @@ var _utils = require("@webiny/utils");
8
8
  class DefaultCmsModelManager {
9
9
  constructor(context, model) {
10
10
  this._context = context;
11
- this._model = model;
11
+ this.model = model;
12
12
  }
13
- async create(data) {
14
- return this._context.cms.createEntry(this._model, data);
13
+ async create(data, options) {
14
+ return this._context.cms.createEntry(this.model, data, options);
15
15
  }
16
- async delete(id) {
16
+ async delete(id, options) {
17
17
  const {
18
18
  version
19
19
  } = (0, _utils.parseIdentifier)(id);
20
20
  if (version) {
21
- return this._context.cms.deleteEntryRevision(this._model, id);
21
+ return this._context.cms.deleteEntryRevision(this.model, id);
22
22
  }
23
- return this._context.cms.deleteEntry(this._model, id);
23
+ return this._context.cms.deleteEntry(this.model, id, options);
24
24
  }
25
25
  async get(id) {
26
- return this._context.cms.getEntryById(this._model, id);
26
+ return this._context.cms.getEntryById(this.model, id);
27
27
  }
28
28
  async listPublished(params) {
29
- return this._context.cms.listPublishedEntries(this._model, params);
29
+ return this._context.cms.listPublishedEntries(this.model, params);
30
30
  }
31
31
  async listLatest(params) {
32
- return this._context.cms.listLatestEntries(this._model, params);
32
+ return this._context.cms.listLatestEntries(this.model, params);
33
+ }
34
+ async listDeleted(params) {
35
+ return this._context.cms.listDeletedEntries(this.model, params);
33
36
  }
34
37
  async getPublishedByIds(ids) {
35
- return this._context.cms.getPublishedEntriesByIds(this._model, ids);
38
+ return this._context.cms.getPublishedEntriesByIds(this.model, ids);
36
39
  }
37
40
  async getLatestByIds(ids) {
38
- return this._context.cms.getLatestEntriesByIds(this._model, ids);
41
+ return this._context.cms.getLatestEntriesByIds(this.model, ids);
39
42
  }
40
- async update(id, data) {
41
- return this._context.cms.updateEntry(this._model, id, data);
43
+ async update(id, data, options) {
44
+ return this._context.cms.updateEntry(this.model, id, data, options);
42
45
  }
43
46
  }
44
47
  exports.DefaultCmsModelManager = DefaultCmsModelManager;
@@ -1 +1 @@
1
- {"version":3,"names":["_utils","require","DefaultCmsModelManager","constructor","context","model","_context","_model","create","data","cms","createEntry","delete","id","version","parseIdentifier","deleteEntryRevision","deleteEntry","get","getEntryById","listPublished","params","listPublishedEntries","listLatest","listLatestEntries","getPublishedByIds","ids","getPublishedEntriesByIds","getLatestByIds","getLatestEntriesByIds","update","updateEntry","exports"],"sources":["DefaultCmsModelManager.ts"],"sourcesContent":["import {\n CmsModelManager,\n CmsModel,\n CmsContext,\n CmsEntryListParams,\n CreateCmsEntryInput,\n UpdateCmsEntryInput\n} from \"~/types\";\nimport { parseIdentifier } from \"@webiny/utils\";\n\nexport class DefaultCmsModelManager implements CmsModelManager {\n private readonly _context: CmsContext;\n private readonly _model: CmsModel;\n\n public constructor(context: CmsContext, model: CmsModel) {\n this._context = context;\n this._model = model;\n }\n\n public async create(data: CreateCmsEntryInput) {\n return this._context.cms.createEntry(this._model, data);\n }\n\n public async delete(id: string) {\n const { version } = parseIdentifier(id);\n if (version) {\n return this._context.cms.deleteEntryRevision(this._model, id);\n }\n\n return this._context.cms.deleteEntry(this._model, id);\n }\n\n public async get(id: string) {\n return this._context.cms.getEntryById(this._model, id);\n }\n\n public async listPublished(params: CmsEntryListParams) {\n return this._context.cms.listPublishedEntries(this._model, params);\n }\n\n public async listLatest(params: CmsEntryListParams) {\n return this._context.cms.listLatestEntries(this._model, params);\n }\n\n public async getPublishedByIds(ids: string[]) {\n return this._context.cms.getPublishedEntriesByIds(this._model, ids);\n }\n\n public async getLatestByIds(ids: string[]) {\n return this._context.cms.getLatestEntriesByIds(this._model, ids);\n }\n\n public async update(id: string, data: UpdateCmsEntryInput) {\n return this._context.cms.updateEntry(this._model, id, data);\n }\n}\n"],"mappings":";;;;;;AAQA,IAAAA,MAAA,GAAAC,OAAA;AAEO,MAAMC,sBAAsB,CAA4B;EAIpDC,WAAWA,CAACC,OAAmB,EAAEC,KAAe,EAAE;IACrD,IAAI,CAACC,QAAQ,GAAGF,OAAO;IACvB,IAAI,CAACG,MAAM,GAAGF,KAAK;EACvB;EAEA,MAAaG,MAAMA,CAACC,IAAyB,EAAE;IAC3C,OAAO,IAAI,CAACH,QAAQ,CAACI,GAAG,CAACC,WAAW,CAAC,IAAI,CAACJ,MAAM,EAAEE,IAAI,CAAC;EAC3D;EAEA,MAAaG,MAAMA,CAACC,EAAU,EAAE;IAC5B,MAAM;MAAEC;IAAQ,CAAC,GAAG,IAAAC,sBAAe,EAACF,EAAE,CAAC;IACvC,IAAIC,OAAO,EAAE;MACT,OAAO,IAAI,CAACR,QAAQ,CAACI,GAAG,CAACM,mBAAmB,CAAC,IAAI,CAACT,MAAM,EAAEM,EAAE,CAAC;IACjE;IAEA,OAAO,IAAI,CAACP,QAAQ,CAACI,GAAG,CAACO,WAAW,CAAC,IAAI,CAACV,MAAM,EAAEM,EAAE,CAAC;EACzD;EAEA,MAAaK,GAAGA,CAACL,EAAU,EAAE;IACzB,OAAO,IAAI,CAACP,QAAQ,CAACI,GAAG,CAACS,YAAY,CAAC,IAAI,CAACZ,MAAM,EAAEM,EAAE,CAAC;EAC1D;EAEA,MAAaO,aAAaA,CAACC,MAA0B,EAAE;IACnD,OAAO,IAAI,CAACf,QAAQ,CAACI,GAAG,CAACY,oBAAoB,CAAC,IAAI,CAACf,MAAM,EAAEc,MAAM,CAAC;EACtE;EAEA,MAAaE,UAAUA,CAACF,MAA0B,EAAE;IAChD,OAAO,IAAI,CAACf,QAAQ,CAACI,GAAG,CAACc,iBAAiB,CAAC,IAAI,CAACjB,MAAM,EAAEc,MAAM,CAAC;EACnE;EAEA,MAAaI,iBAAiBA,CAACC,GAAa,EAAE;IAC1C,OAAO,IAAI,CAACpB,QAAQ,CAACI,GAAG,CAACiB,wBAAwB,CAAC,IAAI,CAACpB,MAAM,EAAEmB,GAAG,CAAC;EACvE;EAEA,MAAaE,cAAcA,CAACF,GAAa,EAAE;IACvC,OAAO,IAAI,CAACpB,QAAQ,CAACI,GAAG,CAACmB,qBAAqB,CAAC,IAAI,CAACtB,MAAM,EAAEmB,GAAG,CAAC;EACpE;EAEA,MAAaI,MAAMA,CAACjB,EAAU,EAAEJ,IAAyB,EAAE;IACvD,OAAO,IAAI,CAACH,QAAQ,CAACI,GAAG,CAACqB,WAAW,CAAC,IAAI,CAACxB,MAAM,EAAEM,EAAE,EAAEJ,IAAI,CAAC;EAC/D;AACJ;AAACuB,OAAA,CAAA9B,sBAAA,GAAAA,sBAAA"}
1
+ {"version":3,"names":["_utils","require","DefaultCmsModelManager","constructor","context","model","_context","create","data","options","cms","createEntry","delete","id","version","parseIdentifier","deleteEntryRevision","deleteEntry","get","getEntryById","listPublished","params","listPublishedEntries","listLatest","listLatestEntries","listDeleted","listDeletedEntries","getPublishedByIds","ids","getPublishedEntriesByIds","getLatestByIds","getLatestEntriesByIds","update","updateEntry","exports"],"sources":["DefaultCmsModelManager.ts"],"sourcesContent":["import type {\n CmsContext,\n CmsDeleteEntryOptions,\n CmsEntryListParams,\n CmsModel,\n CmsModelManager,\n CreateCmsEntryInput,\n CreateCmsEntryOptionsInput,\n UpdateCmsEntryInput,\n UpdateCmsEntryOptionsInput\n} from \"~/types\";\nimport { parseIdentifier } from \"@webiny/utils\";\n\nexport class DefaultCmsModelManager implements CmsModelManager {\n private readonly _context: CmsContext;\n public readonly model: CmsModel;\n\n public constructor(context: CmsContext, model: CmsModel) {\n this._context = context;\n this.model = model;\n }\n\n public async create(data: CreateCmsEntryInput, options?: CreateCmsEntryOptionsInput) {\n return this._context.cms.createEntry(this.model, data, options);\n }\n\n public async delete(id: string, options?: CmsDeleteEntryOptions) {\n const { version } = parseIdentifier(id);\n if (version) {\n return this._context.cms.deleteEntryRevision(this.model, id);\n }\n\n return this._context.cms.deleteEntry(this.model, id, options);\n }\n\n public async get(id: string) {\n return this._context.cms.getEntryById(this.model, id);\n }\n\n public async listPublished(params: CmsEntryListParams) {\n return this._context.cms.listPublishedEntries(this.model, params);\n }\n\n public async listLatest(params: CmsEntryListParams) {\n return this._context.cms.listLatestEntries(this.model, params);\n }\n\n public async listDeleted(params: CmsEntryListParams) {\n return this._context.cms.listDeletedEntries(this.model, params);\n }\n\n public async getPublishedByIds(ids: string[]) {\n return this._context.cms.getPublishedEntriesByIds(this.model, ids);\n }\n\n public async getLatestByIds(ids: string[]) {\n return this._context.cms.getLatestEntriesByIds(this.model, ids);\n }\n\n public async update(\n id: string,\n data: UpdateCmsEntryInput,\n options?: UpdateCmsEntryOptionsInput\n ) {\n return this._context.cms.updateEntry(this.model, id, data, options);\n }\n}\n"],"mappings":";;;;;;AAWA,IAAAA,MAAA,GAAAC,OAAA;AAEO,MAAMC,sBAAsB,CAA4B;EAIpDC,WAAWA,CAACC,OAAmB,EAAEC,KAAe,EAAE;IACrD,IAAI,CAACC,QAAQ,GAAGF,OAAO;IACvB,IAAI,CAACC,KAAK,GAAGA,KAAK;EACtB;EAEA,MAAaE,MAAMA,CAACC,IAAyB,EAAEC,OAAoC,EAAE;IACjF,OAAO,IAAI,CAACH,QAAQ,CAACI,GAAG,CAACC,WAAW,CAAC,IAAI,CAACN,KAAK,EAAEG,IAAI,EAAEC,OAAO,CAAC;EACnE;EAEA,MAAaG,MAAMA,CAACC,EAAU,EAAEJ,OAA+B,EAAE;IAC7D,MAAM;MAAEK;IAAQ,CAAC,GAAG,IAAAC,sBAAe,EAACF,EAAE,CAAC;IACvC,IAAIC,OAAO,EAAE;MACT,OAAO,IAAI,CAACR,QAAQ,CAACI,GAAG,CAACM,mBAAmB,CAAC,IAAI,CAACX,KAAK,EAAEQ,EAAE,CAAC;IAChE;IAEA,OAAO,IAAI,CAACP,QAAQ,CAACI,GAAG,CAACO,WAAW,CAAC,IAAI,CAACZ,KAAK,EAAEQ,EAAE,EAAEJ,OAAO,CAAC;EACjE;EAEA,MAAaS,GAAGA,CAACL,EAAU,EAAE;IACzB,OAAO,IAAI,CAACP,QAAQ,CAACI,GAAG,CAACS,YAAY,CAAC,IAAI,CAACd,KAAK,EAAEQ,EAAE,CAAC;EACzD;EAEA,MAAaO,aAAaA,CAACC,MAA0B,EAAE;IACnD,OAAO,IAAI,CAACf,QAAQ,CAACI,GAAG,CAACY,oBAAoB,CAAC,IAAI,CAACjB,KAAK,EAAEgB,MAAM,CAAC;EACrE;EAEA,MAAaE,UAAUA,CAACF,MAA0B,EAAE;IAChD,OAAO,IAAI,CAACf,QAAQ,CAACI,GAAG,CAACc,iBAAiB,CAAC,IAAI,CAACnB,KAAK,EAAEgB,MAAM,CAAC;EAClE;EAEA,MAAaI,WAAWA,CAACJ,MAA0B,EAAE;IACjD,OAAO,IAAI,CAACf,QAAQ,CAACI,GAAG,CAACgB,kBAAkB,CAAC,IAAI,CAACrB,KAAK,EAAEgB,MAAM,CAAC;EACnE;EAEA,MAAaM,iBAAiBA,CAACC,GAAa,EAAE;IAC1C,OAAO,IAAI,CAACtB,QAAQ,CAACI,GAAG,CAACmB,wBAAwB,CAAC,IAAI,CAACxB,KAAK,EAAEuB,GAAG,CAAC;EACtE;EAEA,MAAaE,cAAcA,CAACF,GAAa,EAAE;IACvC,OAAO,IAAI,CAACtB,QAAQ,CAACI,GAAG,CAACqB,qBAAqB,CAAC,IAAI,CAAC1B,KAAK,EAAEuB,GAAG,CAAC;EACnE;EAEA,MAAaI,MAAMA,CACfnB,EAAU,EACVL,IAAyB,EACzBC,OAAoC,EACtC;IACE,OAAO,IAAI,CAACH,QAAQ,CAACI,GAAG,CAACuB,WAAW,CAAC,IAAI,CAAC5B,KAAK,EAAEQ,EAAE,EAAEL,IAAI,EAAEC,OAAO,CAAC;EACvE;AACJ;AAACyB,OAAA,CAAAhC,sBAAA,GAAAA,sBAAA","ignoreList":[]}
@@ -0,0 +1,12 @@
1
+ import type { CmsEntry, CmsEntryValues, CmsModelManager, UpdateCmsEntryInput, UpdateCmsEntryOptionsInput } from "../types";
2
+ export interface ISingletonModelManager<T extends CmsEntryValues = CmsEntryValues> {
3
+ update(data: UpdateCmsEntryInput, options?: UpdateCmsEntryOptionsInput): Promise<CmsEntry<T>>;
4
+ get(): Promise<CmsEntry<T>>;
5
+ }
6
+ export declare class SingletonModelManager<T extends CmsEntryValues> implements ISingletonModelManager<T> {
7
+ private readonly manager;
8
+ private constructor();
9
+ update(data: UpdateCmsEntryInput, options?: UpdateCmsEntryOptionsInput): Promise<CmsEntry<T>>;
10
+ get(): Promise<CmsEntry<T>>;
11
+ static create<T extends CmsEntryValues>(manager: CmsModelManager<T>): ISingletonModelManager<T>;
12
+ }
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SingletonModelManager = void 0;
7
+ var _error = require("@webiny/error");
8
+ var _constants = require("../constants");
9
+ var _utils = require("@webiny/utils");
10
+ class SingletonModelManager {
11
+ constructor(manager) {
12
+ if (!manager.model.tags?.includes(_constants.CMS_MODEL_SINGLETON_TAG)) {
13
+ throw new _error.WebinyError({
14
+ message: "Model is not marked as singular.",
15
+ code: "MODEL_NOT_MARKED_AS_SINGULAR",
16
+ data: {
17
+ model: manager.model
18
+ }
19
+ });
20
+ }
21
+ this.manager = manager;
22
+ }
23
+ async update(data, options) {
24
+ const entry = await this.get();
25
+ return await this.manager.update(entry.id, data, options);
26
+ }
27
+ async get() {
28
+ const id = (0, _utils.createCacheKey)(this.manager.model.modelId, {
29
+ algorithm: "sha256",
30
+ encoding: "hex"
31
+ });
32
+ try {
33
+ return await this.manager.get(`${id}#0001`);
34
+ } catch {
35
+ return await this.manager.create({
36
+ id
37
+ }, {
38
+ skipValidators: ["required"]
39
+ });
40
+ }
41
+ }
42
+ static create(manager) {
43
+ return new SingletonModelManager(manager);
44
+ }
45
+ }
46
+ exports.SingletonModelManager = SingletonModelManager;
47
+
48
+ //# sourceMappingURL=SingletonModelManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_error","require","_constants","_utils","SingletonModelManager","constructor","manager","model","tags","includes","CMS_MODEL_SINGLETON_TAG","WebinyError","message","code","data","update","options","entry","get","id","createCacheKey","modelId","algorithm","encoding","create","skipValidators","exports"],"sources":["SingletonModelManager.ts"],"sourcesContent":["import type {\n CmsEntry,\n CmsEntryValues,\n CmsModelManager,\n UpdateCmsEntryInput,\n UpdateCmsEntryOptionsInput\n} from \"~/types\";\nimport { WebinyError } from \"@webiny/error\";\nimport { CMS_MODEL_SINGLETON_TAG } from \"~/constants\";\nimport { createCacheKey } from \"@webiny/utils\";\n\nexport interface ISingletonModelManager<T extends CmsEntryValues = CmsEntryValues> {\n update(data: UpdateCmsEntryInput, options?: UpdateCmsEntryOptionsInput): Promise<CmsEntry<T>>;\n get(): Promise<CmsEntry<T>>;\n}\n\nexport class SingletonModelManager<T extends CmsEntryValues> implements ISingletonModelManager<T> {\n private readonly manager: CmsModelManager<T>;\n\n private constructor(manager: CmsModelManager<T>) {\n if (!manager.model.tags?.includes(CMS_MODEL_SINGLETON_TAG)) {\n throw new WebinyError({\n message: \"Model is not marked as singular.\",\n code: \"MODEL_NOT_MARKED_AS_SINGULAR\",\n data: {\n model: manager.model\n }\n });\n }\n this.manager = manager;\n }\n\n public async update(\n data: UpdateCmsEntryInput,\n options?: UpdateCmsEntryOptionsInput\n ): Promise<CmsEntry<T>> {\n const entry = await this.get();\n\n return await this.manager.update(entry.id, data, options);\n }\n\n public async get(): Promise<CmsEntry<T>> {\n const id = createCacheKey(this.manager.model.modelId, {\n algorithm: \"sha256\",\n encoding: \"hex\"\n });\n try {\n return await this.manager.get(`${id}#0001`);\n } catch {\n return await this.manager.create(\n {\n id\n },\n {\n skipValidators: [\"required\"]\n }\n );\n }\n }\n\n public static create<T extends CmsEntryValues>(\n manager: CmsModelManager<T>\n ): ISingletonModelManager<T> {\n return new SingletonModelManager<T>(manager);\n }\n}\n"],"mappings":";;;;;;AAOA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAOO,MAAMG,qBAAqB,CAAgE;EAGtFC,WAAWA,CAACC,OAA2B,EAAE;IAC7C,IAAI,CAACA,OAAO,CAACC,KAAK,CAACC,IAAI,EAAEC,QAAQ,CAACC,kCAAuB,CAAC,EAAE;MACxD,MAAM,IAAIC,kBAAW,CAAC;QAClBC,OAAO,EAAE,kCAAkC;QAC3CC,IAAI,EAAE,8BAA8B;QACpCC,IAAI,EAAE;UACFP,KAAK,EAAED,OAAO,CAACC;QACnB;MACJ,CAAC,CAAC;IACN;IACA,IAAI,CAACD,OAAO,GAAGA,OAAO;EAC1B;EAEA,MAAaS,MAAMA,CACfD,IAAyB,EACzBE,OAAoC,EAChB;IACpB,MAAMC,KAAK,GAAG,MAAM,IAAI,CAACC,GAAG,CAAC,CAAC;IAE9B,OAAO,MAAM,IAAI,CAACZ,OAAO,CAACS,MAAM,CAACE,KAAK,CAACE,EAAE,EAAEL,IAAI,EAAEE,OAAO,CAAC;EAC7D;EAEA,MAAaE,GAAGA,CAAA,EAAyB;IACrC,MAAMC,EAAE,GAAG,IAAAC,qBAAc,EAAC,IAAI,CAACd,OAAO,CAACC,KAAK,CAACc,OAAO,EAAE;MAClDC,SAAS,EAAE,QAAQ;MACnBC,QAAQ,EAAE;IACd,CAAC,CAAC;IACF,IAAI;MACA,OAAO,MAAM,IAAI,CAACjB,OAAO,CAACY,GAAG,CAAC,GAAGC,EAAE,OAAO,CAAC;IAC/C,CAAC,CAAC,MAAM;MACJ,OAAO,MAAM,IAAI,CAACb,OAAO,CAACkB,MAAM,CAC5B;QACIL;MACJ,CAAC,EACD;QACIM,cAAc,EAAE,CAAC,UAAU;MAC/B,CACJ,CAAC;IACL;EACJ;EAEA,OAAcD,MAAMA,CAChBlB,OAA2B,EACF;IACzB,OAAO,IAAIF,qBAAqB,CAAIE,OAAO,CAAC;EAChD;AACJ;AAACoB,OAAA,CAAAtB,qBAAA,GAAAA,qBAAA","ignoreList":[]}
@@ -1,2 +1,3 @@
1
- import { ModelManagerPlugin } from "../types";
1
+ import type { ModelManagerPlugin } from "../types";
2
+ export * from "./SingletonModelManager";
2
3
  export declare const createDefaultModelManager: () => ModelManagerPlugin;
@@ -3,12 +3,27 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ var _exportNames = {
7
+ createDefaultModelManager: true
8
+ };
6
9
  exports.createDefaultModelManager = void 0;
7
10
  var _DefaultCmsModelManager = require("./DefaultCmsModelManager");
11
+ var _SingletonModelManager = require("./SingletonModelManager");
12
+ Object.keys(_SingletonModelManager).forEach(function (key) {
13
+ if (key === "default" || key === "__esModule") return;
14
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
15
+ if (key in exports && exports[key] === _SingletonModelManager[key]) return;
16
+ Object.defineProperty(exports, key, {
17
+ enumerable: true,
18
+ get: function () {
19
+ return _SingletonModelManager[key];
20
+ }
21
+ });
22
+ });
8
23
  const plugin = {
9
24
  type: "cms-content-model-manager",
10
25
  name: "content-model-manager-default",
11
- create: async (context, model) => {
26
+ async create(context, model) {
12
27
  return new _DefaultCmsModelManager.DefaultCmsModelManager(context, model);
13
28
  }
14
29
  };
@@ -1 +1 @@
1
- {"version":3,"names":["_DefaultCmsModelManager","require","plugin","type","name","create","context","model","DefaultCmsModelManager","createDefaultModelManager","exports"],"sources":["index.ts"],"sourcesContent":["import { ModelManagerPlugin } from \"~/types\";\nimport { DefaultCmsModelManager } from \"./DefaultCmsModelManager\";\n\nconst plugin: ModelManagerPlugin = {\n type: \"cms-content-model-manager\",\n name: \"content-model-manager-default\",\n create: async (context, model) => {\n return new DefaultCmsModelManager(context, model);\n }\n};\n\nexport const createDefaultModelManager = () => plugin;\n"],"mappings":";;;;;;AACA,IAAAA,uBAAA,GAAAC,OAAA;AAEA,MAAMC,MAA0B,GAAG;EAC/BC,IAAI,EAAE,2BAA2B;EACjCC,IAAI,EAAE,+BAA+B;EACrCC,MAAM,EAAE,MAAAA,CAAOC,OAAO,EAAEC,KAAK,KAAK;IAC9B,OAAO,IAAIC,8CAAsB,CAACF,OAAO,EAAEC,KAAK,CAAC;EACrD;AACJ,CAAC;AAEM,MAAME,yBAAyB,GAAGA,CAAA,KAAMP,MAAM;AAACQ,OAAA,CAAAD,yBAAA,GAAAA,yBAAA"}
1
+ {"version":3,"names":["_DefaultCmsModelManager","require","_SingletonModelManager","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","plugin","type","name","create","context","model","DefaultCmsModelManager","createDefaultModelManager"],"sources":["index.ts"],"sourcesContent":["import type { CmsModelManager, ModelManagerPlugin } from \"~/types\";\nimport { DefaultCmsModelManager } from \"./DefaultCmsModelManager\";\nexport * from \"./SingletonModelManager\";\n\nconst plugin: ModelManagerPlugin = {\n type: \"cms-content-model-manager\",\n name: \"content-model-manager-default\",\n async create(context, model) {\n return new DefaultCmsModelManager(context, model) as CmsModelManager<any>;\n }\n};\n\nexport const createDefaultModelManager = () => plugin;\n"],"mappings":";;;;;;;;;AACA,IAAAA,uBAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,sBAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,sBAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,sBAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAEA,MAAMS,MAA0B,GAAG;EAC/BC,IAAI,EAAE,2BAA2B;EACjCC,IAAI,EAAE,+BAA+B;EACrC,MAAMC,MAAMA,CAACC,OAAO,EAAEC,KAAK,EAAE;IACzB,OAAO,IAAIC,8CAAsB,CAACF,OAAO,EAAEC,KAAK,CAAC;EACrD;AACJ,CAAC;AAEM,MAAME,yBAAyB,GAAGA,CAAA,KAAMP,MAAM;AAACJ,OAAA,CAAAW,yBAAA,GAAAA,yBAAA","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/api-headless-cms",
3
- "version": "0.0.0-unstable.de38392959",
3
+ "version": "0.0.0-unstable.e0bfc55d5a",
4
4
  "main": "index.js",
5
5
  "keywords": [
6
6
  "cms:base"
@@ -18,50 +18,49 @@
18
18
  ],
19
19
  "license": "MIT",
20
20
  "dependencies": {
21
- "@babel/runtime": "7.22.6",
22
- "@graphql-tools/schema": "7.1.5",
23
- "@webiny/api": "0.0.0-unstable.de38392959",
24
- "@webiny/api-i18n": "0.0.0-unstable.de38392959",
25
- "@webiny/api-security": "0.0.0-unstable.de38392959",
26
- "@webiny/api-tenancy": "0.0.0-unstable.de38392959",
27
- "@webiny/error": "0.0.0-unstable.de38392959",
28
- "@webiny/handler": "0.0.0-unstable.de38392959",
29
- "@webiny/handler-aws": "0.0.0-unstable.de38392959",
30
- "@webiny/handler-db": "0.0.0-unstable.de38392959",
31
- "@webiny/handler-graphql": "0.0.0-unstable.de38392959",
32
- "@webiny/lexical-converter": "0.0.0-unstable.de38392959",
33
- "@webiny/plugins": "0.0.0-unstable.de38392959",
34
- "@webiny/pubsub": "0.0.0-unstable.de38392959",
35
- "@webiny/utils": "0.0.0-unstable.de38392959",
36
- "@webiny/validation": "0.0.0-unstable.de38392959",
37
- "code-frame": "5.0.0",
21
+ "@babel/code-frame": "7.26.2",
22
+ "@graphql-tools/merge": "9.0.8",
23
+ "@graphql-tools/schema": "10.0.7",
24
+ "@webiny/api": "0.0.0-unstable.e0bfc55d5a",
25
+ "@webiny/api-i18n": "0.0.0-unstable.e0bfc55d5a",
26
+ "@webiny/api-security": "0.0.0-unstable.e0bfc55d5a",
27
+ "@webiny/api-tenancy": "0.0.0-unstable.e0bfc55d5a",
28
+ "@webiny/error": "0.0.0-unstable.e0bfc55d5a",
29
+ "@webiny/handler": "0.0.0-unstable.e0bfc55d5a",
30
+ "@webiny/handler-aws": "0.0.0-unstable.e0bfc55d5a",
31
+ "@webiny/handler-db": "0.0.0-unstable.e0bfc55d5a",
32
+ "@webiny/handler-graphql": "0.0.0-unstable.e0bfc55d5a",
33
+ "@webiny/lexical-converter": "0.0.0-unstable.e0bfc55d5a",
34
+ "@webiny/plugins": "0.0.0-unstable.e0bfc55d5a",
35
+ "@webiny/pubsub": "0.0.0-unstable.e0bfc55d5a",
36
+ "@webiny/utils": "0.0.0-unstable.e0bfc55d5a",
37
+ "@webiny/validation": "0.0.0-unstable.e0bfc55d5a",
38
38
  "dot-prop": "6.0.1",
39
+ "graphql": "15.9.0",
39
40
  "graphql-tag": "2.12.6",
40
- "jsdom": "21.1.2",
41
+ "jsdom": "25.0.1",
41
42
  "lodash": "4.17.21",
42
43
  "p-map": "4.0.0",
43
44
  "p-reduce": "2.1.0",
44
45
  "pluralize": "8.0.0",
45
- "semver": "7.5.4",
46
- "slugify": "1.6.5",
47
- "zod": "3.21.4"
46
+ "semver": "7.6.3",
47
+ "slugify": "1.6.6",
48
+ "zod": "3.23.8"
48
49
  },
49
50
  "devDependencies": {
50
- "@babel/cli": "7.22.6",
51
- "@babel/core": "7.22.8",
52
- "@babel/preset-env": "7.22.7",
53
- "@webiny/api-wcp": "0.0.0-unstable.de38392959",
54
- "@webiny/cli": "0.0.0-unstable.de38392959",
55
- "@webiny/project-utils": "0.0.0-unstable.de38392959",
51
+ "@types/babel__code-frame": "7.0.6",
52
+ "@webiny/api-wcp": "0.0.0-unstable.e0bfc55d5a",
53
+ "@webiny/aws-sdk": "0.0.0-unstable.e0bfc55d5a",
54
+ "@webiny/cli": "0.0.0-unstable.e0bfc55d5a",
55
+ "@webiny/db-dynamodb": "0.0.0-unstable.e0bfc55d5a",
56
+ "@webiny/handler-db": "0.0.0",
57
+ "@webiny/project-utils": "0.0.0-unstable.e0bfc55d5a",
56
58
  "apollo-graphql": "0.9.7",
57
- "get-yarn-workspaces": "1.0.2",
58
- "graphql": "15.8.0",
59
- "jest": "29.5.0",
59
+ "graphql": "15.9.0",
60
+ "jest": "29.7.0",
60
61
  "prettier": "2.8.8",
61
- "rimraf": "3.0.2",
62
- "sinon": "9.2.4",
63
- "ttypescript": "1.5.15",
64
- "typescript": "4.7.4",
62
+ "rimraf": "6.0.1",
63
+ "typescript": "5.3.3",
65
64
  "write-json-file": "4.3.0"
66
65
  },
67
66
  "publishConfig": {
@@ -69,8 +68,8 @@
69
68
  "directory": "dist"
70
69
  },
71
70
  "scripts": {
72
- "build": "yarn webiny run build",
73
- "watch": "yarn webiny run watch"
71
+ "build": "node ../cli/bin.js run build",
72
+ "watch": "node ../cli/bin.js run watch"
74
73
  },
75
- "gitHead": "de38392959f2692d1feb08945a3588cd80e4924c"
74
+ "gitHead": "e0bfc55d5a4d6a42b32e6558d9fb2eb6753e331b"
76
75
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_CmsParametersPlugin","require","DEFAULT_LOCALE_CODE","createContextParameterPlugin","CmsParametersPlugin","context","locale","i18n","getContentLocale","code","type","exports"],"sources":["context.ts"],"sourcesContent":["import { CmsParametersPlugin } from \"~/plugins/CmsParametersPlugin\";\n\nconst DEFAULT_LOCALE_CODE = \"en-US\";\n\nexport const createContextParameterPlugin = () => {\n return new CmsParametersPlugin(async context => {\n const locale = context.i18n.getContentLocale();\n return {\n locale: locale?.code || DEFAULT_LOCALE_CODE,\n type: null\n };\n });\n};\n"],"mappings":";;;;;;AAAA,IAAAA,oBAAA,GAAAC,OAAA;AAEA,MAAMC,mBAAmB,GAAG,OAAO;AAE5B,MAAMC,4BAA4B,GAAGA,CAAA,KAAM;EAC9C,OAAO,IAAIC,wCAAmB,CAAC,MAAMC,OAAO,IAAI;IAC5C,MAAMC,MAAM,GAAGD,OAAO,CAACE,IAAI,CAACC,gBAAgB,CAAC,CAAC;IAC9C,OAAO;MACHF,MAAM,EAAEA,MAAM,EAAEG,IAAI,IAAIP,mBAAmB;MAC3CQ,IAAI,EAAE;IACV,CAAC;EACL,CAAC,CAAC;AACN,CAAC;AAACC,OAAA,CAAAR,4BAAA,GAAAA,4BAAA"}
1
+ {"version":3,"names":["_CmsParametersPlugin","require","DEFAULT_LOCALE_CODE","createContextParameterPlugin","CmsParametersPlugin","context","locale","i18n","getContentLocale","code","type","exports"],"sources":["context.ts"],"sourcesContent":["import { CmsParametersPlugin } from \"~/plugins/CmsParametersPlugin\";\n\nconst DEFAULT_LOCALE_CODE = \"en-US\";\n\nexport const createContextParameterPlugin = () => {\n return new CmsParametersPlugin(async context => {\n const locale = context.i18n.getContentLocale();\n return {\n locale: locale?.code || DEFAULT_LOCALE_CODE,\n type: null\n };\n });\n};\n"],"mappings":";;;;;;AAAA,IAAAA,oBAAA,GAAAC,OAAA;AAEA,MAAMC,mBAAmB,GAAG,OAAO;AAE5B,MAAMC,4BAA4B,GAAGA,CAAA,KAAM;EAC9C,OAAO,IAAIC,wCAAmB,CAAC,MAAMC,OAAO,IAAI;IAC5C,MAAMC,MAAM,GAAGD,OAAO,CAACE,IAAI,CAACC,gBAAgB,CAAC,CAAC;IAC9C,OAAO;MACHF,MAAM,EAAEA,MAAM,EAAEG,IAAI,IAAIP,mBAAmB;MAC3CQ,IAAI,EAAE;IACV,CAAC;EACL,CAAC,CAAC;AACN,CAAC;AAACC,OAAA,CAAAR,4BAAA,GAAAA,4BAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_error","_interopRequireDefault","require","_CmsParametersPlugin","HeaderKeys","createHeaderParameterPlugin","CmsParametersPlugin","context","request","headers","type","TYPE","locale","LOCALE","WebinyError","exports"],"sources":["header.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport { CmsParametersPlugin } from \"~/plugins/CmsParametersPlugin\";\nimport { ApiEndpoint } from \"~/types\";\n\nenum HeaderKeys {\n TYPE = \"x-webiny-cms-endpoint\",\n LOCALE = \"x-webiny-cms-locale\"\n}\n\nexport const createHeaderParameterPlugin = () => {\n return new CmsParametersPlugin(async context => {\n /**\n * If any of the properties is not defined, just ignore this plugin\n */\n if (!context.request?.headers) {\n return null;\n }\n\n const headers = context.request.headers;\n\n const type = headers[HeaderKeys.TYPE];\n const locale = headers[HeaderKeys.LOCALE];\n\n if (!type && !locale) {\n return null;\n } else if (!locale || typeof locale !== \"string\") {\n throw new WebinyError(\n `There is a \"${HeaderKeys.TYPE}\" header but no \"${HeaderKeys.LOCALE}\".`,\n \"MALFORMED_HEADERS_ERROR\",\n {\n headers\n }\n );\n } else if (!type || typeof type !== \"string\") {\n throw new WebinyError(\n `There is a \"${HeaderKeys.LOCALE}\" header but no \"${HeaderKeys.TYPE}\".`,\n \"MALFORMED_HEADERS_ERROR\",\n {\n headers\n }\n );\n }\n\n return {\n type: type as ApiEndpoint,\n locale\n };\n });\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AAAoE,IAG/DE,UAAU,0BAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA,EAAVA,UAAU;AAKR,MAAMC,2BAA2B,GAAGA,CAAA,KAAM;EAC7C,OAAO,IAAIC,wCAAmB,CAAC,MAAMC,OAAO,IAAI;IAC5C;AACR;AACA;IACQ,IAAI,CAACA,OAAO,CAACC,OAAO,EAAEC,OAAO,EAAE;MAC3B,OAAO,IAAI;IACf;IAEA,MAAMA,OAAO,GAAGF,OAAO,CAACC,OAAO,CAACC,OAAO;IAEvC,MAAMC,IAAI,GAAGD,OAAO,CAACL,UAAU,CAACO,IAAI,CAAC;IACrC,MAAMC,MAAM,GAAGH,OAAO,CAACL,UAAU,CAACS,MAAM,CAAC;IAEzC,IAAI,CAACH,IAAI,IAAI,CAACE,MAAM,EAAE;MAClB,OAAO,IAAI;IACf,CAAC,MAAM,IAAI,CAACA,MAAM,IAAI,OAAOA,MAAM,KAAK,QAAQ,EAAE;MAC9C,MAAM,IAAIE,cAAW,CAChB,eAAcV,UAAU,CAACO,IAAK,oBAAmBP,UAAU,CAACS,MAAO,IAAG,EACvE,yBAAyB,EACzB;QACIJ;MACJ,CACJ,CAAC;IACL,CAAC,MAAM,IAAI,CAACC,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE;MAC1C,MAAM,IAAII,cAAW,CAChB,eAAcV,UAAU,CAACS,MAAO,oBAAmBT,UAAU,CAACO,IAAK,IAAG,EACvE,yBAAyB,EACzB;QACIF;MACJ,CACJ,CAAC;IACL;IAEA,OAAO;MACHC,IAAI,EAAEA,IAAmB;MACzBE;IACJ,CAAC;EACL,CAAC,CAAC;AACN,CAAC;AAACG,OAAA,CAAAV,2BAAA,GAAAA,2BAAA"}
1
+ {"version":3,"names":["_error","_interopRequireDefault","require","_CmsParametersPlugin","HeaderKeys","createHeaderParameterPlugin","CmsParametersPlugin","context","request","headers","type","TYPE","locale","LOCALE","WebinyError","exports"],"sources":["header.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport { CmsParametersPlugin } from \"~/plugins/CmsParametersPlugin\";\nimport type { ApiEndpoint } from \"~/types\";\n\nenum HeaderKeys {\n TYPE = \"x-webiny-cms-endpoint\",\n LOCALE = \"x-webiny-cms-locale\"\n}\n\nexport const createHeaderParameterPlugin = () => {\n return new CmsParametersPlugin(async context => {\n /**\n * If any of the properties is not defined, just ignore this plugin\n */\n if (!context.request?.headers) {\n return null;\n }\n\n const headers = context.request.headers;\n\n const type = headers[HeaderKeys.TYPE];\n const locale = headers[HeaderKeys.LOCALE];\n\n if (!type && !locale) {\n return null;\n } else if (!locale || typeof locale !== \"string\") {\n throw new WebinyError(\n `There is a \"${HeaderKeys.TYPE}\" header but no \"${HeaderKeys.LOCALE}\".`,\n \"MALFORMED_HEADERS_ERROR\",\n {\n headers\n }\n );\n } else if (!type || typeof type !== \"string\") {\n throw new WebinyError(\n `There is a \"${HeaderKeys.LOCALE}\" header but no \"${HeaderKeys.TYPE}\".`,\n \"MALFORMED_HEADERS_ERROR\",\n {\n headers\n }\n );\n }\n\n return {\n type: type as ApiEndpoint,\n locale\n };\n });\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AAAoE,IAG/DE,UAAU,0BAAVA,UAAU;EAAVA,UAAU;EAAVA,UAAU;EAAA,OAAVA,UAAU;AAAA,EAAVA,UAAU;AAKR,MAAMC,2BAA2B,GAAGA,CAAA,KAAM;EAC7C,OAAO,IAAIC,wCAAmB,CAAC,MAAMC,OAAO,IAAI;IAC5C;AACR;AACA;IACQ,IAAI,CAACA,OAAO,CAACC,OAAO,EAAEC,OAAO,EAAE;MAC3B,OAAO,IAAI;IACf;IAEA,MAAMA,OAAO,GAAGF,OAAO,CAACC,OAAO,CAACC,OAAO;IAEvC,MAAMC,IAAI,GAAGD,OAAO,CAACL,UAAU,CAACO,IAAI,CAAC;IACrC,MAAMC,MAAM,GAAGH,OAAO,CAACL,UAAU,CAACS,MAAM,CAAC;IAEzC,IAAI,CAACH,IAAI,IAAI,CAACE,MAAM,EAAE;MAClB,OAAO,IAAI;IACf,CAAC,MAAM,IAAI,CAACA,MAAM,IAAI,OAAOA,MAAM,KAAK,QAAQ,EAAE;MAC9C,MAAM,IAAIE,cAAW,CACjB,eAAeV,UAAU,CAACO,IAAI,oBAAoBP,UAAU,CAACS,MAAM,IAAI,EACvE,yBAAyB,EACzB;QACIJ;MACJ,CACJ,CAAC;IACL,CAAC,MAAM,IAAI,CAACC,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE;MAC1C,MAAM,IAAII,cAAW,CACjB,eAAeV,UAAU,CAACS,MAAM,oBAAoBT,UAAU,CAACO,IAAI,IAAI,EACvE,yBAAyB,EACzB;QACIF;MACJ,CACJ,CAAC;IACL;IAEA,OAAO;MACHC,IAAI,EAAEA,IAAmB;MACzBE;IACJ,CAAC;EACL,CAAC,CAAC;AACN,CAAC;AAACG,OAAA,CAAAV,2BAAA,GAAAA,2BAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_manual","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_path","_context","_header"],"sources":["index.ts"],"sourcesContent":["export * from \"./manual\";\nexport * from \"./path\";\nexport * from \"./context\";\nexport * from \"./header\";\n"],"mappings":";;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,OAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,OAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,KAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,KAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,KAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,KAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,QAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,QAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,QAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,QAAA,CAAAN,GAAA;IAAA;EAAA;AAAA;AACA,IAAAO,OAAA,GAAAX,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAS,OAAA,EAAAR,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAO,OAAA,CAAAP,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAG,OAAA,CAAAP,GAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"names":["_manual","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_path","_context","_header"],"sources":["index.ts"],"sourcesContent":["export * from \"./manual\";\nexport * from \"./path\";\nexport * from \"./context\";\nexport * from \"./header\";\n"],"mappings":";;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,OAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,OAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,KAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,KAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,KAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,KAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,QAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,QAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,QAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,QAAA,CAAAN,GAAA;IAAA;EAAA;AAAA;AACA,IAAAO,OAAA,GAAAX,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAS,OAAA,EAAAR,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAO,OAAA,CAAAP,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAG,OAAA,CAAAP,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -1,4 +1,5 @@
1
- import { CmsParametersPlugin, CmsParametersPluginResponseLocale, CmsParametersPluginResponseType } from "../plugins/CmsParametersPlugin";
1
+ import type { CmsParametersPluginResponseLocale, CmsParametersPluginResponseType } from "../plugins/CmsParametersPlugin";
2
+ import { CmsParametersPlugin } from "../plugins/CmsParametersPlugin";
2
3
  export interface ManualPluginParams {
3
4
  endpointType?: CmsParametersPluginResponseType;
4
5
  locale?: CmsParametersPluginResponseLocale;
@@ -1 +1 @@
1
- {"version":3,"names":["_error","_interopRequireDefault","require","_CmsParametersPlugin","createManualPlugin","params","CmsParametersPlugin","endpointType","type","locale","WebinyError","exports"],"sources":["manual.ts"],"sourcesContent":["/**\n * This would be used for custom Lambdas when there is no path or header information about the endpoint type and locale.\n */\nimport WebinyError from \"@webiny/error\";\nimport {\n CmsParametersPlugin,\n CmsParametersPluginResponseLocale,\n CmsParametersPluginResponseType\n} from \"~/plugins/CmsParametersPlugin\";\n\nexport interface ManualPluginParams {\n endpointType?: CmsParametersPluginResponseType;\n locale?: CmsParametersPluginResponseLocale;\n}\n\nexport const createManualPlugin = (params: ManualPluginParams): CmsParametersPlugin => {\n return new CmsParametersPlugin(async () => {\n const { endpointType: type, locale } = params;\n /**\n * if both of parameters are not existing, just skip this plugin.\n */\n if (!type && !locale) {\n return null;\n } else if (!type) {\n throw new WebinyError(\n `There is defined \"locale\" CMS parameter but no \"endpointType\".`,\n \"MALFORMED_ENDPOINT_TYPE\",\n {\n ...params\n }\n );\n } else if (!locale) {\n throw new WebinyError(\n `There is defined \"endpointType\" CMS parameter but no \"locale\".`,\n \"MALFORMED_LOCALE_TYPE\",\n {\n ...params\n }\n );\n }\n\n return {\n type,\n locale\n };\n });\n};\n"],"mappings":";;;;;;;AAGA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAaO,MAAME,kBAAkB,GAAIC,MAA0B,IAA0B;EACnF,OAAO,IAAIC,wCAAmB,CAAC,YAAY;IACvC,MAAM;MAAEC,YAAY,EAAEC,IAAI;MAAEC;IAAO,CAAC,GAAGJ,MAAM;IAC7C;AACR;AACA;IACQ,IAAI,CAACG,IAAI,IAAI,CAACC,MAAM,EAAE;MAClB,OAAO,IAAI;IACf,CAAC,MAAM,IAAI,CAACD,IAAI,EAAE;MACd,MAAM,IAAIE,cAAW,CAChB,gEAA+D,EAChE,yBAAyB,EACzB;QACI,GAAGL;MACP,CACJ,CAAC;IACL,CAAC,MAAM,IAAI,CAACI,MAAM,EAAE;MAChB,MAAM,IAAIC,cAAW,CAChB,gEAA+D,EAChE,uBAAuB,EACvB;QACI,GAAGL;MACP,CACJ,CAAC;IACL;IAEA,OAAO;MACHG,IAAI;MACJC;IACJ,CAAC;EACL,CAAC,CAAC;AACN,CAAC;AAACE,OAAA,CAAAP,kBAAA,GAAAA,kBAAA"}
1
+ {"version":3,"names":["_error","_interopRequireDefault","require","_CmsParametersPlugin","createManualPlugin","params","CmsParametersPlugin","endpointType","type","locale","WebinyError","exports"],"sources":["manual.ts"],"sourcesContent":["/**\n * This would be used for custom Lambdas when there is no path or header information about the endpoint type and locale.\n */\nimport WebinyError from \"@webiny/error\";\nimport type {\n CmsParametersPluginResponseLocale,\n CmsParametersPluginResponseType\n} from \"~/plugins/CmsParametersPlugin\";\nimport { CmsParametersPlugin } from \"~/plugins/CmsParametersPlugin\";\n\nexport interface ManualPluginParams {\n endpointType?: CmsParametersPluginResponseType;\n locale?: CmsParametersPluginResponseLocale;\n}\n\nexport const createManualPlugin = (params: ManualPluginParams): CmsParametersPlugin => {\n return new CmsParametersPlugin(async () => {\n const { endpointType: type, locale } = params;\n /**\n * if both of parameters are not existing, just skip this plugin.\n */\n if (!type && !locale) {\n return null;\n } else if (!type) {\n throw new WebinyError(\n `There is defined \"locale\" CMS parameter but no \"endpointType\".`,\n \"MALFORMED_ENDPOINT_TYPE\",\n {\n ...params\n }\n );\n } else if (!locale) {\n throw new WebinyError(\n `There is defined \"endpointType\" CMS parameter but no \"locale\".`,\n \"MALFORMED_LOCALE_TYPE\",\n {\n ...params\n }\n );\n }\n\n return {\n type,\n locale\n };\n });\n};\n"],"mappings":";;;;;;;AAGA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,oBAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAaO,MAAME,kBAAkB,GAAIC,MAA0B,IAA0B;EACnF,OAAO,IAAIC,wCAAmB,CAAC,YAAY;IACvC,MAAM;MAAEC,YAAY,EAAEC,IAAI;MAAEC;IAAO,CAAC,GAAGJ,MAAM;IAC7C;AACR;AACA;IACQ,IAAI,CAACG,IAAI,IAAI,CAACC,MAAM,EAAE;MAClB,OAAO,IAAI;IACf,CAAC,MAAM,IAAI,CAACD,IAAI,EAAE;MACd,MAAM,IAAIE,cAAW,CACjB,gEAAgE,EAChE,yBAAyB,EACzB;QACI,GAAGL;MACP,CACJ,CAAC;IACL,CAAC,MAAM,IAAI,CAACI,MAAM,EAAE;MAChB,MAAM,IAAIC,cAAW,CACjB,gEAAgE,EAChE,uBAAuB,EACvB;QACI,GAAGL;MACP,CACJ,CAAC;IACL;IAEA,OAAO;MACHG,IAAI;MACJC;IACJ,CAAC;EACL,CAAC,CAAC;AACN,CAAC;AAACE,OAAA,CAAAP,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_error","_interopRequireDefault","require","_CmsParametersPlugin","allowedEndpoints","createPathParameterPlugin","CmsParametersPlugin","context","request","params","type","locale","WebinyError","includes","exports"],"sources":["path.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport { CmsParametersPlugin } from \"~/plugins/CmsParametersPlugin\";\nimport { ApiEndpoint } from \"~/types\";\n\nconst allowedEndpoints: ApiEndpoint[] = [\"manage\", \"read\", \"preview\"];\n\nexport const createPathParameterPlugin = () => {\n return new CmsParametersPlugin(async context => {\n /**\n * If any of the properties is not defined, just ignore this plugin\n */\n if (!context.request?.params) {\n return null;\n }\n\n const { type, locale } = context.request.params as Record<string, string | null>;\n if (!type && !locale) {\n return null;\n }\n\n if (!type) {\n throw new WebinyError(`Missing request parameter \"type\".`);\n } else if (!locale) {\n throw new WebinyError(`Missing request parameter \"locale\".`);\n } else if (allowedEndpoints.includes(type as ApiEndpoint) === false) {\n throw new WebinyError(`Endpoint \"${type}\" not allowed!`);\n }\n\n return {\n type: type as ApiEndpoint,\n locale\n };\n });\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AAGA,MAAME,gBAA+B,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC;AAE9D,MAAMC,yBAAyB,GAAGA,CAAA,KAAM;EAC3C,OAAO,IAAIC,wCAAmB,CAAC,MAAMC,OAAO,IAAI;IAC5C;AACR;AACA;IACQ,IAAI,CAACA,OAAO,CAACC,OAAO,EAAEC,MAAM,EAAE;MAC1B,OAAO,IAAI;IACf;IAEA,MAAM;MAAEC,IAAI;MAAEC;IAAO,CAAC,GAAGJ,OAAO,CAACC,OAAO,CAACC,MAAuC;IAChF,IAAI,CAACC,IAAI,IAAI,CAACC,MAAM,EAAE;MAClB,OAAO,IAAI;IACf;IAEA,IAAI,CAACD,IAAI,EAAE;MACP,MAAM,IAAIE,cAAW,CAAE,mCAAkC,CAAC;IAC9D,CAAC,MAAM,IAAI,CAACD,MAAM,EAAE;MAChB,MAAM,IAAIC,cAAW,CAAE,qCAAoC,CAAC;IAChE,CAAC,MAAM,IAAIR,gBAAgB,CAACS,QAAQ,CAACH,IAAmB,CAAC,KAAK,KAAK,EAAE;MACjE,MAAM,IAAIE,cAAW,CAAE,aAAYF,IAAK,gBAAe,CAAC;IAC5D;IAEA,OAAO;MACHA,IAAI,EAAEA,IAAmB;MACzBC;IACJ,CAAC;EACL,CAAC,CAAC;AACN,CAAC;AAACG,OAAA,CAAAT,yBAAA,GAAAA,yBAAA"}
1
+ {"version":3,"names":["_error","_interopRequireDefault","require","_CmsParametersPlugin","allowedEndpoints","createPathParameterPlugin","CmsParametersPlugin","context","request","params","type","locale","WebinyError","includes","exports"],"sources":["path.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport { CmsParametersPlugin } from \"~/plugins/CmsParametersPlugin\";\nimport type { ApiEndpoint } from \"~/types\";\n\nconst allowedEndpoints: ApiEndpoint[] = [\"manage\", \"read\", \"preview\"];\n\nexport const createPathParameterPlugin = () => {\n return new CmsParametersPlugin(async context => {\n /**\n * If any of the properties is not defined, just ignore this plugin\n */\n if (!context.request?.params) {\n return null;\n }\n\n const { type, locale } = context.request.params as Record<string, string | null>;\n if (!type && !locale) {\n return null;\n }\n\n if (!type) {\n throw new WebinyError(`Missing request parameter \"type\".`);\n } else if (!locale) {\n throw new WebinyError(`Missing request parameter \"locale\".`);\n } else if (allowedEndpoints.includes(type as ApiEndpoint) === false) {\n throw new WebinyError(`Endpoint \"${type}\" not allowed!`);\n }\n\n return {\n type: type as ApiEndpoint,\n locale\n };\n });\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AAGA,MAAME,gBAA+B,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC;AAE9D,MAAMC,yBAAyB,GAAGA,CAAA,KAAM;EAC3C,OAAO,IAAIC,wCAAmB,CAAC,MAAMC,OAAO,IAAI;IAC5C;AACR;AACA;IACQ,IAAI,CAACA,OAAO,CAACC,OAAO,EAAEC,MAAM,EAAE;MAC1B,OAAO,IAAI;IACf;IAEA,MAAM;MAAEC,IAAI;MAAEC;IAAO,CAAC,GAAGJ,OAAO,CAACC,OAAO,CAACC,MAAuC;IAChF,IAAI,CAACC,IAAI,IAAI,CAACC,MAAM,EAAE;MAClB,OAAO,IAAI;IACf;IAEA,IAAI,CAACD,IAAI,EAAE;MACP,MAAM,IAAIE,cAAW,CAAC,mCAAmC,CAAC;IAC9D,CAAC,MAAM,IAAI,CAACD,MAAM,EAAE;MAChB,MAAM,IAAIC,cAAW,CAAC,qCAAqC,CAAC;IAChE,CAAC,MAAM,IAAIR,gBAAgB,CAACS,QAAQ,CAACH,IAAmB,CAAC,KAAK,KAAK,EAAE;MACjE,MAAM,IAAIE,cAAW,CAAC,aAAaF,IAAI,gBAAgB,CAAC;IAC5D;IAEA,OAAO;MACHA,IAAI,EAAEA,IAAmB;MACzBC;IACJ,CAAC;EACL,CAAC,CAAC;AACN,CAAC;AAACG,OAAA,CAAAT,yBAAA,GAAAA,yBAAA","ignoreList":[]}
@@ -0,0 +1,9 @@
1
+ import type { GraphQLSchemaPluginConfig as BaseGraphQLSchemaPluginConfig, IGraphQLSchemaPlugin } from "@webiny/handler-graphql";
2
+ import { GraphQLSchemaPlugin } from "@webiny/handler-graphql";
3
+ import type { CmsContext } from "../../types";
4
+ export type ICmsGraphQLSchemaPlugin<T extends CmsContext = CmsContext> = IGraphQLSchemaPlugin<T>;
5
+ export type CmsGraphQLSchemaPluginConfig<T extends CmsContext = CmsContext> = BaseGraphQLSchemaPluginConfig<T>;
6
+ export declare class CmsGraphQLSchemaPlugin<T extends CmsContext = CmsContext> extends GraphQLSchemaPlugin<T> implements ICmsGraphQLSchemaPlugin<T> {
7
+ static readonly type = "cms.graphql.schema";
8
+ }
9
+ export declare const createCmsGraphQLSchemaPlugin: <T extends CmsContext = CmsContext>(config: CmsGraphQLSchemaPluginConfig<T>) => ICmsGraphQLSchemaPlugin<T>;
@@ -3,11 +3,15 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.CmsGraphQLSchemaPlugin = void 0;
6
+ exports.createCmsGraphQLSchemaPlugin = exports.CmsGraphQLSchemaPlugin = void 0;
7
7
  var _handlerGraphql = require("@webiny/handler-graphql");
8
8
  class CmsGraphQLSchemaPlugin extends _handlerGraphql.GraphQLSchemaPlugin {
9
9
  static type = "cms.graphql.schema";
10
10
  }
11
11
  exports.CmsGraphQLSchemaPlugin = CmsGraphQLSchemaPlugin;
12
+ const createCmsGraphQLSchemaPlugin = config => {
13
+ return new CmsGraphQLSchemaPlugin(config);
14
+ };
15
+ exports.createCmsGraphQLSchemaPlugin = createCmsGraphQLSchemaPlugin;
12
16
 
13
17
  //# sourceMappingURL=CmsGraphQLSchemaPlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_handlerGraphql","require","CmsGraphQLSchemaPlugin","GraphQLSchemaPlugin","type","exports","createCmsGraphQLSchemaPlugin","config"],"sources":["CmsGraphQLSchemaPlugin.ts"],"sourcesContent":["import type {\n GraphQLSchemaPluginConfig as BaseGraphQLSchemaPluginConfig,\n IGraphQLSchemaPlugin\n} from \"@webiny/handler-graphql\";\nimport { GraphQLSchemaPlugin } from \"@webiny/handler-graphql\";\nimport type { CmsContext } from \"~/types\";\n\nexport type ICmsGraphQLSchemaPlugin<T extends CmsContext = CmsContext> = IGraphQLSchemaPlugin<T>;\n\nexport type CmsGraphQLSchemaPluginConfig<T extends CmsContext = CmsContext> =\n BaseGraphQLSchemaPluginConfig<T>;\n\nexport class CmsGraphQLSchemaPlugin<T extends CmsContext = CmsContext>\n extends GraphQLSchemaPlugin<T>\n implements ICmsGraphQLSchemaPlugin<T>\n{\n public static override readonly type = \"cms.graphql.schema\";\n}\n\nexport const createCmsGraphQLSchemaPlugin = <T extends CmsContext = CmsContext>(\n config: CmsGraphQLSchemaPluginConfig<T>\n): ICmsGraphQLSchemaPlugin<T> => {\n return new CmsGraphQLSchemaPlugin(config);\n};\n"],"mappings":";;;;;;AAIA,IAAAA,eAAA,GAAAC,OAAA;AAQO,MAAMC,sBAAsB,SACvBC,mCAAmB,CAE/B;EACI,OAAgCC,IAAI,GAAG,oBAAoB;AAC/D;AAACC,OAAA,CAAAH,sBAAA,GAAAA,sBAAA;AAEM,MAAMI,4BAA4B,GACrCC,MAAuC,IACV;EAC7B,OAAO,IAAIL,sBAAsB,CAACK,MAAM,CAAC;AAC7C,CAAC;AAACF,OAAA,CAAAC,4BAAA,GAAAA,4BAAA","ignoreList":[]}
@@ -0,0 +1 @@
1
+ export * from "./CmsGraphQLSchemaPlugin";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _CmsGraphQLSchemaPlugin = require("./CmsGraphQLSchemaPlugin");
7
+ Object.keys(_CmsGraphQLSchemaPlugin).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _CmsGraphQLSchemaPlugin[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _CmsGraphQLSchemaPlugin[key];
14
+ }
15
+ });
16
+ });
17
+
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_CmsGraphQLSchemaPlugin","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["index.ts"],"sourcesContent":["export * from \"./CmsGraphQLSchemaPlugin\";\n"],"mappings":";;;;;AAAA,IAAAA,uBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,uBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,uBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,uBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import { Plugin } from "@webiny/plugins";
2
- import { CmsModel } from "../types";
2
+ import type { CmsModel } from "../types";
3
3
  interface CmsGraphQLSchemaSorterPluginCallableParams {
4
4
  model: CmsModel;
5
5
  sorters: string[];
@@ -1 +1 @@
1
- {"version":3,"names":["_plugins","require","CmsGraphQLSchemaSorterPlugin","Plugin","type","constructor","cb","createSorter","params","exports","createCmsGraphQLSchemaSorterPlugin"],"sources":["CmsGraphQLSchemaSorterPlugin.ts"],"sourcesContent":["import { Plugin } from \"@webiny/plugins\";\nimport { CmsModel } from \"~/types\";\n\ninterface CmsGraphQLSchemaSorterPluginCallableParams {\n model: CmsModel;\n sorters: string[];\n}\ninterface CmsGraphQLSchemaSorterPluginCallable {\n (params: CmsGraphQLSchemaSorterPluginCallableParams): string[];\n}\nexport class CmsGraphQLSchemaSorterPlugin extends Plugin {\n public static override readonly type: string = \"cms.graphql.schema.sorter\";\n\n private readonly cb: CmsGraphQLSchemaSorterPluginCallable;\n public constructor(cb: CmsGraphQLSchemaSorterPluginCallable) {\n super();\n\n this.cb = cb;\n }\n /**\n * Method must return new sorting array. Or existing one if no changes are made.\n */\n public createSorter(params: CmsGraphQLSchemaSorterPluginCallableParams): string[] {\n return this.cb(params);\n }\n}\n\nexport const createCmsGraphQLSchemaSorterPlugin = (\n cb: CmsGraphQLSchemaSorterPluginCallable\n): CmsGraphQLSchemaSorterPlugin => {\n return new CmsGraphQLSchemaSorterPlugin(cb);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAUO,MAAMC,4BAA4B,SAASC,eAAM,CAAC;EACrD,OAAgCC,IAAI,GAAW,2BAA2B;EAGnEC,WAAWA,CAACC,EAAwC,EAAE;IACzD,KAAK,CAAC,CAAC;IAEP,IAAI,CAACA,EAAE,GAAGA,EAAE;EAChB;EACA;AACJ;AACA;EACWC,YAAYA,CAACC,MAAkD,EAAY;IAC9E,OAAO,IAAI,CAACF,EAAE,CAACE,MAAM,CAAC;EAC1B;AACJ;AAACC,OAAA,CAAAP,4BAAA,GAAAA,4BAAA;AAEM,MAAMQ,kCAAkC,GAC3CJ,EAAwC,IACT;EAC/B,OAAO,IAAIJ,4BAA4B,CAACI,EAAE,CAAC;AAC/C,CAAC;AAACG,OAAA,CAAAC,kCAAA,GAAAA,kCAAA"}
1
+ {"version":3,"names":["_plugins","require","CmsGraphQLSchemaSorterPlugin","Plugin","type","constructor","cb","createSorter","params","exports","createCmsGraphQLSchemaSorterPlugin"],"sources":["CmsGraphQLSchemaSorterPlugin.ts"],"sourcesContent":["import { Plugin } from \"@webiny/plugins\";\nimport type { CmsModel } from \"~/types\";\n\ninterface CmsGraphQLSchemaSorterPluginCallableParams {\n model: CmsModel;\n sorters: string[];\n}\ninterface CmsGraphQLSchemaSorterPluginCallable {\n (params: CmsGraphQLSchemaSorterPluginCallableParams): string[];\n}\nexport class CmsGraphQLSchemaSorterPlugin extends Plugin {\n public static override readonly type: string = \"cms.graphql.schema.sorter\";\n\n private readonly cb: CmsGraphQLSchemaSorterPluginCallable;\n public constructor(cb: CmsGraphQLSchemaSorterPluginCallable) {\n super();\n\n this.cb = cb;\n }\n /**\n * Method must return new sorting array. Or existing one if no changes are made.\n */\n public createSorter(params: CmsGraphQLSchemaSorterPluginCallableParams): string[] {\n return this.cb(params);\n }\n}\n\nexport const createCmsGraphQLSchemaSorterPlugin = (\n cb: CmsGraphQLSchemaSorterPluginCallable\n): CmsGraphQLSchemaSorterPlugin => {\n return new CmsGraphQLSchemaSorterPlugin(cb);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAUO,MAAMC,4BAA4B,SAASC,eAAM,CAAC;EACrD,OAAgCC,IAAI,GAAW,2BAA2B;EAGnEC,WAAWA,CAACC,EAAwC,EAAE;IACzD,KAAK,CAAC,CAAC;IAEP,IAAI,CAACA,EAAE,GAAGA,EAAE;EAChB;EACA;AACJ;AACA;EACWC,YAAYA,CAACC,MAAkD,EAAY;IAC9E,OAAO,IAAI,CAACF,EAAE,CAACE,MAAM,CAAC;EAC1B;AACJ;AAACC,OAAA,CAAAP,4BAAA,GAAAA,4BAAA;AAEM,MAAMQ,kCAAkC,GAC3CJ,EAAwC,IACT;EAC/B,OAAO,IAAIJ,4BAA4B,CAACI,EAAE,CAAC;AAC/C,CAAC;AAACG,OAAA,CAAAC,kCAAA,GAAAA,kCAAA","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import { Plugin } from "@webiny/plugins";
2
- import { CmsGroup as BaseCmsGroup } from "../types";
2
+ import type { CmsGroup as BaseCmsGroup } from "../types";
3
3
  export interface CmsGroupInput extends Omit<BaseCmsGroup, "locale" | "tenant" | "webinyVersion" | "isPlugin"> {
4
4
  tenant?: string;
5
5
  locale?: string;
@@ -13,4 +13,12 @@ export declare class CmsGroupPlugin extends Plugin {
13
13
  readonly contentModelGroup: CmsGroup;
14
14
  constructor(contentModelGroup: CmsGroupInput);
15
15
  }
16
+ /**
17
+ * @deprecated Use `createCmsGroupPlugin` instead.
18
+ */
16
19
  export declare const createCmsGroup: (group: CmsGroup) => CmsGroupPlugin;
20
+ /**
21
+ * @deprecated Use `createModelGroupPlugin` instead.
22
+ */
23
+ export declare const createCmsGroupPlugin: (group: CmsGroup) => CmsGroupPlugin;
24
+ export declare const createModelGroupPlugin: (group: CmsGroup) => CmsGroupPlugin;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.createCmsGroup = exports.CmsGroupPlugin = void 0;
6
+ exports.createModelGroupPlugin = exports.createCmsGroupPlugin = exports.createCmsGroup = exports.CmsGroupPlugin = void 0;
7
7
  var _plugins = require("@webiny/plugins");
8
8
  class CmsGroupPlugin extends _plugins.Plugin {
9
9
  static type = "cms-content-model-group";
@@ -15,10 +15,26 @@ class CmsGroupPlugin extends _plugins.Plugin {
15
15
  };
16
16
  }
17
17
  }
18
+
19
+ /**
20
+ * @deprecated Use `createCmsGroupPlugin` instead.
21
+ */
18
22
  exports.CmsGroupPlugin = CmsGroupPlugin;
19
23
  const createCmsGroup = group => {
20
24
  return new CmsGroupPlugin(group);
21
25
  };
26
+
27
+ /**
28
+ * @deprecated Use `createModelGroupPlugin` instead.
29
+ */
22
30
  exports.createCmsGroup = createCmsGroup;
31
+ const createCmsGroupPlugin = group => {
32
+ return new CmsGroupPlugin(group);
33
+ };
34
+ exports.createCmsGroupPlugin = createCmsGroupPlugin;
35
+ const createModelGroupPlugin = group => {
36
+ return new CmsGroupPlugin(group);
37
+ };
38
+ exports.createModelGroupPlugin = createModelGroupPlugin;
23
39
 
24
40
  //# sourceMappingURL=CmsGroupPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_plugins","require","CmsGroupPlugin","Plugin","type","constructor","contentModelGroup","isPlugin","exports","createCmsGroup","group"],"sources":["CmsGroupPlugin.ts"],"sourcesContent":["import { Plugin } from \"@webiny/plugins\";\nimport { CmsGroup as BaseCmsGroup } from \"~/types\";\n\nexport interface CmsGroupInput\n extends Omit<BaseCmsGroup, \"locale\" | \"tenant\" | \"webinyVersion\" | \"isPlugin\"> {\n tenant?: string;\n locale?: string;\n}\n\nexport interface CmsGroup extends Omit<BaseCmsGroup, \"locale\" | \"tenant\" | \"webinyVersion\"> {\n tenant?: string;\n locale?: string;\n}\n\nexport class CmsGroupPlugin extends Plugin {\n public static override readonly type: string = \"cms-content-model-group\";\n public readonly contentModelGroup: CmsGroup;\n\n constructor(contentModelGroup: CmsGroupInput) {\n super();\n this.contentModelGroup = {\n ...contentModelGroup,\n isPlugin: true\n };\n }\n}\n\nexport const createCmsGroup = (group: CmsGroup): CmsGroupPlugin => {\n return new CmsGroupPlugin(group);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAcO,MAAMC,cAAc,SAASC,eAAM,CAAC;EACvC,OAAgCC,IAAI,GAAW,yBAAyB;EAGxEC,WAAWA,CAACC,iBAAgC,EAAE;IAC1C,KAAK,CAAC,CAAC;IACP,IAAI,CAACA,iBAAiB,GAAG;MACrB,GAAGA,iBAAiB;MACpBC,QAAQ,EAAE;IACd,CAAC;EACL;AACJ;AAACC,OAAA,CAAAN,cAAA,GAAAA,cAAA;AAEM,MAAMO,cAAc,GAAIC,KAAe,IAAqB;EAC/D,OAAO,IAAIR,cAAc,CAACQ,KAAK,CAAC;AACpC,CAAC;AAACF,OAAA,CAAAC,cAAA,GAAAA,cAAA"}
1
+ {"version":3,"names":["_plugins","require","CmsGroupPlugin","Plugin","type","constructor","contentModelGroup","isPlugin","exports","createCmsGroup","group","createCmsGroupPlugin","createModelGroupPlugin"],"sources":["CmsGroupPlugin.ts"],"sourcesContent":["import { Plugin } from \"@webiny/plugins\";\nimport type { CmsGroup as BaseCmsGroup } from \"~/types\";\n\nexport interface CmsGroupInput\n extends Omit<BaseCmsGroup, \"locale\" | \"tenant\" | \"webinyVersion\" | \"isPlugin\"> {\n tenant?: string;\n locale?: string;\n}\n\nexport interface CmsGroup extends Omit<BaseCmsGroup, \"locale\" | \"tenant\" | \"webinyVersion\"> {\n tenant?: string;\n locale?: string;\n}\n\nexport class CmsGroupPlugin extends Plugin {\n public static override readonly type: string = \"cms-content-model-group\";\n public readonly contentModelGroup: CmsGroup;\n\n constructor(contentModelGroup: CmsGroupInput) {\n super();\n this.contentModelGroup = {\n ...contentModelGroup,\n isPlugin: true\n };\n }\n}\n\n/**\n * @deprecated Use `createCmsGroupPlugin` instead.\n */\nexport const createCmsGroup = (group: CmsGroup): CmsGroupPlugin => {\n return new CmsGroupPlugin(group);\n};\n\n/**\n * @deprecated Use `createModelGroupPlugin` instead.\n */\nexport const createCmsGroupPlugin = (group: CmsGroup): CmsGroupPlugin => {\n return new CmsGroupPlugin(group);\n};\n\nexport const createModelGroupPlugin = (group: CmsGroup): CmsGroupPlugin => {\n return new CmsGroupPlugin(group);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAcO,MAAMC,cAAc,SAASC,eAAM,CAAC;EACvC,OAAgCC,IAAI,GAAW,yBAAyB;EAGxEC,WAAWA,CAACC,iBAAgC,EAAE;IAC1C,KAAK,CAAC,CAAC;IACP,IAAI,CAACA,iBAAiB,GAAG;MACrB,GAAGA,iBAAiB;MACpBC,QAAQ,EAAE;IACd,CAAC;EACL;AACJ;;AAEA;AACA;AACA;AAFAC,OAAA,CAAAN,cAAA,GAAAA,cAAA;AAGO,MAAMO,cAAc,GAAIC,KAAe,IAAqB;EAC/D,OAAO,IAAIR,cAAc,CAACQ,KAAK,CAAC;AACpC,CAAC;;AAED;AACA;AACA;AAFAF,OAAA,CAAAC,cAAA,GAAAA,cAAA;AAGO,MAAME,oBAAoB,GAAID,KAAe,IAAqB;EACrE,OAAO,IAAIR,cAAc,CAACQ,KAAK,CAAC;AACpC,CAAC;AAACF,OAAA,CAAAG,oBAAA,GAAAA,oBAAA;AAEK,MAAMC,sBAAsB,GAAIF,KAAe,IAAqB;EACvE,OAAO,IAAIR,cAAc,CAACQ,KAAK,CAAC;AACpC,CAAC;AAACF,OAAA,CAAAI,sBAAA,GAAAA,sBAAA","ignoreList":[]}
@@ -1,6 +1,9 @@
1
+ /**
2
+ * Field converters are used to convert the fieldId to storageId and vice versa.
3
+ */
1
4
  import { Plugin } from "@webiny/plugins";
2
- import { CmsEntryValues, CmsModelFieldWithParent } from "../types";
3
- import { ConverterCollection } from "../utils/converters/ConverterCollection";
5
+ import type { CmsEntryValues, CmsModelFieldWithParent } from "../types";
6
+ import type { ConverterCollection } from "../utils/converters/ConverterCollection";
4
7
  export interface ConvertParams<F = CmsModelFieldWithParent> {
5
8
  field: F;
6
9
  value: any;
@@ -5,6 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.CmsModelFieldConverterPlugin = void 0;
7
7
  var _plugins = require("@webiny/plugins");
8
+ /**
9
+ * Field converters are used to convert the fieldId to storageId and vice versa.
10
+ */
11
+
8
12
  class CmsModelFieldConverterPlugin extends _plugins.Plugin {
9
13
  static type = "cms.field.converter";
10
14
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_plugins","require","CmsModelFieldConverterPlugin","Plugin","type","exports"],"sources":["CmsModelFieldConverterPlugin.ts"],"sourcesContent":["import { Plugin } from \"@webiny/plugins\";\nimport { CmsEntryValues, CmsModelFieldWithParent } from \"~/types\";\nimport { ConverterCollection } from \"~/utils/converters/ConverterCollection\";\n\nexport interface ConvertParams<F = CmsModelFieldWithParent> {\n field: F;\n value: any;\n converterCollection: ConverterCollection;\n}\n\nexport abstract class CmsModelFieldConverterPlugin extends Plugin {\n public static override type = \"cms.field.converter\";\n\n public abstract getFieldType(): string;\n\n public abstract convertToStorage(params: ConvertParams): CmsEntryValues;\n public abstract convertFromStorage(params: ConvertParams): CmsEntryValues;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAUO,MAAeC,4BAA4B,SAASC,eAAM,CAAC;EAC9D,OAAuBC,IAAI,GAAG,qBAAqB;AAMvD;AAACC,OAAA,CAAAH,4BAAA,GAAAA,4BAAA"}
1
+ {"version":3,"names":["_plugins","require","CmsModelFieldConverterPlugin","Plugin","type","exports"],"sources":["CmsModelFieldConverterPlugin.ts"],"sourcesContent":["/**\n * Field converters are used to convert the fieldId to storageId and vice versa.\n */\nimport { Plugin } from \"@webiny/plugins\";\nimport type { CmsEntryValues, CmsModelFieldWithParent } from \"~/types\";\nimport type { ConverterCollection } from \"~/utils/converters/ConverterCollection\";\n\nexport interface ConvertParams<F = CmsModelFieldWithParent> {\n field: F;\n value: any;\n converterCollection: ConverterCollection;\n}\n\nexport abstract class CmsModelFieldConverterPlugin extends Plugin {\n public static override type = \"cms.field.converter\";\n\n public abstract getFieldType(): string;\n\n public abstract convertToStorage(params: ConvertParams): CmsEntryValues;\n public abstract convertFromStorage(params: ConvertParams): CmsEntryValues;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAWO,MAAeC,4BAA4B,SAASC,eAAM,CAAC;EAC9D,OAAuBC,IAAI,GAAG,qBAAqB;AAMvD;AAACC,OAAA,CAAAH,4BAAA,GAAAA,4BAAA","ignoreList":[]}