@webiny/api-headless-cms 0.0.0-unstable.e622468070 → 0.0.0-unstable.e6f0dc8ca7

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 (1056) hide show
  1. package/constants.d.ts +2 -1
  2. package/constants.js +4 -0
  3. package/constants.js.map +1 -1
  4. package/context.d.ts +2 -5
  5. package/context.js +16 -7
  6. package/context.js.map +1 -1
  7. package/crud/AccessControl/AccessControl.d.ts +18 -28
  8. package/crud/AccessControl/AccessControl.js.map +1 -1
  9. package/crud/AccessControl/README.md +1 -1
  10. package/crud/contentEntry/entryDataFactories/createEntryData.js +27 -12
  11. package/crud/contentEntry/entryDataFactories/createEntryData.js.map +1 -1
  12. package/crud/contentEntry/entryDataFactories/createEntryRevisionFromData.js +13 -6
  13. package/crud/contentEntry/entryDataFactories/createEntryRevisionFromData.js.map +1 -1
  14. package/crud/contentEntry/entryDataFactories/createPublishEntryData.js +4 -1
  15. package/crud/contentEntry/entryDataFactories/createPublishEntryData.js.map +1 -1
  16. package/crud/contentEntry/entryDataFactories/createRepublishEntryData.js +4 -1
  17. package/crud/contentEntry/entryDataFactories/createRepublishEntryData.js.map +1 -1
  18. package/crud/contentEntry/entryDataFactories/createUnpublishEntryData.js +2 -1
  19. package/crud/contentEntry/entryDataFactories/createUnpublishEntryData.js.map +1 -1
  20. package/crud/contentEntry/entryDataFactories/createUpdateEntryData.js +4 -3
  21. package/crud/contentEntry/entryDataFactories/createUpdateEntryData.js.map +1 -1
  22. package/crud/contentEntry/entryDataFactories/system.d.ts +10 -0
  23. package/crud/contentEntry/entryDataFactories/system.js +14 -0
  24. package/crud/contentEntry/entryDataFactories/system.js.map +1 -0
  25. package/crud/contentEntry/entryDataValidation.d.ts +1 -1
  26. package/crud/contentEntry/entryDataValidation.js +19 -16
  27. package/crud/contentEntry/entryDataValidation.js.map +1 -1
  28. package/crud/contentEntry/references/buildPaths.d.ts +1 -1
  29. package/crud/contentEntry/references/buildPaths.js +3 -3
  30. package/crud/contentEntry/references/buildPaths.js.map +1 -1
  31. package/crud/contentEntry/searchableFields.d.ts +2 -3
  32. package/crud/contentEntry/searchableFields.js +15 -19
  33. package/crud/contentEntry/searchableFields.js.map +1 -1
  34. package/crud/contentEntry.crud.js +16 -11
  35. package/crud/contentEntry.crud.js.map +1 -1
  36. package/crud/contentModel/fields/descriptionField.js +1 -1
  37. package/crud/contentModel/fields/descriptionField.js.map +1 -1
  38. package/crud/contentModel/fields/imageField.js +1 -1
  39. package/crud/contentModel/fields/imageField.js.map +1 -1
  40. package/crud/contentModel/fields/titleField.js +1 -1
  41. package/crud/contentModel/fields/titleField.js.map +1 -1
  42. package/crud/contentModel/validation.d.ts +224 -902
  43. package/crud/contentModel/validation.js +64 -36
  44. package/crud/contentModel/validation.js.map +1 -1
  45. package/crud/contentModel.crud.js +2 -1
  46. package/crud/contentModel.crud.js.map +1 -1
  47. package/domain/contentEntry/EntryId.d.ts +1 -0
  48. package/domain/contentEntry/EntryId.js +2 -0
  49. package/domain/contentEntry/EntryId.js.map +1 -1
  50. package/domain/contentEntry/errors.d.ts +2 -2
  51. package/domain/contentEntry/errors.js.map +1 -1
  52. package/domain/contentModel/errors.d.ts +1 -1
  53. package/domain/contentModel/errors.js.map +1 -1
  54. package/domain/contentModel/schemas.d.ts +198 -616
  55. package/domain/contentModel/schemas.js +55 -37
  56. package/domain/contentModel/schemas.js.map +1 -1
  57. package/domain/contentModel/validation/fields/descriptionField.js +1 -1
  58. package/domain/contentModel/validation/fields/descriptionField.js.map +1 -1
  59. package/domain/contentModel/validation/fields/imageField.js +1 -1
  60. package/domain/contentModel/validation/fields/imageField.js.map +1 -1
  61. package/domain/contentModel/validation/fields/titleField.js +1 -1
  62. package/domain/contentModel/validation/fields/titleField.js.map +1 -1
  63. package/domain/contentModel/validation/modelFields.js +15 -20
  64. package/domain/contentModel/validation/modelFields.js.map +1 -1
  65. package/domain/contentModelGroup/validation.d.ts +34 -82
  66. package/domain/contentModelGroup/validation.js +2 -2
  67. package/domain/contentModelGroup/validation.js.map +1 -1
  68. package/export/graphql/index.js +1 -1
  69. package/export/graphql/index.js.map +1 -1
  70. package/export/types.js.map +1 -1
  71. package/exports/api/cms/entry.d.ts +3 -0
  72. package/exports/api/cms/entry.js +6 -0
  73. package/exports/api/cms/entry.js.map +1 -1
  74. package/exports/api/cms/graphql.d.ts +1 -0
  75. package/exports/api/cms/graphql.js +3 -0
  76. package/exports/api/cms/graphql.js.map +1 -0
  77. package/exports/api/cms/model.d.ts +5 -1
  78. package/exports/api/cms/model.js +3 -1
  79. package/exports/api/cms/model.js.map +1 -1
  80. package/exports/api/cms/storage.d.ts +3 -0
  81. package/exports/api/cms/storage.js +5 -0
  82. package/exports/api/cms/storage.js.map +1 -0
  83. package/exports/api/cms/validation.d.ts +4 -0
  84. package/exports/api/cms/validation.js +6 -0
  85. package/exports/api/cms/validation.js.map +1 -0
  86. package/extensions/entryHooks/OnEntryBeforeCreate.d.ts +3 -7
  87. package/extensions/index.d.ts +2 -6
  88. package/features/contentEntry/ContentEntriesFeature.d.ts +4 -1
  89. package/features/contentEntry/ContentEntriesFeature.js +6 -0
  90. package/features/contentEntry/ContentEntriesFeature.js.map +1 -1
  91. package/{utils/contentEntryTraverser → features/contentEntry/ContentEntryTraverser}/ContentEntryTraverser.d.ts +1 -1
  92. package/{utils/contentEntryTraverser → features/contentEntry/ContentEntryTraverser}/ContentEntryTraverser.js +2 -2
  93. package/features/contentEntry/ContentEntryTraverser/ContentEntryTraverser.js.map +1 -0
  94. package/features/contentEntry/ContentEntryTraverser/ContentEntryTraverserProvider.d.ts +14 -0
  95. package/features/contentEntry/ContentEntryTraverser/ContentEntryTraverserProvider.js +25 -0
  96. package/features/contentEntry/ContentEntryTraverser/ContentEntryTraverserProvider.js.map +1 -0
  97. package/features/contentEntry/ContentEntryTraverser/abstractions.d.ts +12 -0
  98. package/features/contentEntry/ContentEntryTraverser/abstractions.js +7 -0
  99. package/features/contentEntry/ContentEntryTraverser/abstractions.js.map +1 -0
  100. package/features/contentEntry/ContentEntryTraverser/feature.d.ts +4 -0
  101. package/features/contentEntry/ContentEntryTraverser/feature.js +10 -0
  102. package/features/contentEntry/ContentEntryTraverser/feature.js.map +1 -0
  103. package/features/contentEntry/ContentEntryTraverser/index.d.ts +2 -0
  104. package/features/contentEntry/ContentEntryTraverser/index.js +4 -0
  105. package/features/contentEntry/ContentEntryTraverser/index.js.map +1 -0
  106. package/features/contentEntry/CreateEntry/CreateEntryUseCase.d.ts +3 -3
  107. package/features/contentEntry/CreateEntry/CreateEntryUseCase.js +3 -3
  108. package/features/contentEntry/CreateEntry/CreateEntryUseCase.js.map +1 -1
  109. package/features/contentEntry/CreateEntry/abstractions.d.ts +1 -0
  110. package/features/contentEntry/CreateEntry/abstractions.js +1 -0
  111. package/features/contentEntry/CreateEntry/abstractions.js.map +1 -1
  112. package/features/contentEntry/CreateEntry/events.d.ts +4 -2
  113. package/features/contentEntry/CreateEntry/events.js +5 -1
  114. package/features/contentEntry/CreateEntry/events.js.map +1 -1
  115. package/features/contentEntry/CreateEntry/feature.d.ts +4 -1
  116. package/features/contentEntry/CreateEntryRevisionFrom/CreateEntryRevisionFromUseCase.d.ts +3 -3
  117. package/features/contentEntry/CreateEntryRevisionFrom/CreateEntryRevisionFromUseCase.js +3 -3
  118. package/features/contentEntry/CreateEntryRevisionFrom/CreateEntryRevisionFromUseCase.js.map +1 -1
  119. package/features/contentEntry/CreateEntryRevisionFrom/abstractions.d.ts +1 -0
  120. package/features/contentEntry/CreateEntryRevisionFrom/abstractions.js +1 -0
  121. package/features/contentEntry/CreateEntryRevisionFrom/abstractions.js.map +1 -1
  122. package/features/contentEntry/CreateEntryRevisionFrom/events.d.ts +4 -2
  123. package/features/contentEntry/CreateEntryRevisionFrom/events.js +5 -1
  124. package/features/contentEntry/CreateEntryRevisionFrom/events.js.map +1 -1
  125. package/features/contentEntry/CreateEntryRevisionFrom/feature.d.ts +4 -1
  126. package/features/contentEntry/DeleteEntry/DeleteEntryUseCase.d.ts +1 -1
  127. package/features/contentEntry/DeleteEntry/DeleteEntryUseCase.js +1 -1
  128. package/features/contentEntry/DeleteEntry/DeleteEntryUseCase.js.map +1 -1
  129. package/features/contentEntry/DeleteEntry/MoveEntryToBinUseCase.d.ts +2 -2
  130. package/features/contentEntry/DeleteEntry/MoveEntryToBinUseCase.js +2 -2
  131. package/features/contentEntry/DeleteEntry/MoveEntryToBinUseCase.js.map +1 -1
  132. package/features/contentEntry/DeleteEntry/abstractions.d.ts +2 -0
  133. package/features/contentEntry/DeleteEntry/abstractions.js +2 -0
  134. package/features/contentEntry/DeleteEntry/abstractions.js.map +1 -1
  135. package/features/contentEntry/DeleteEntry/events.d.ts +4 -2
  136. package/features/contentEntry/DeleteEntry/events.js +5 -1
  137. package/features/contentEntry/DeleteEntry/events.js.map +1 -1
  138. package/features/contentEntry/DeleteEntry/feature.d.ts +4 -1
  139. package/features/contentEntry/DeleteEntryRevision/DeleteEntryRevisionUseCase.d.ts +1 -1
  140. package/features/contentEntry/DeleteEntryRevision/DeleteEntryRevisionUseCase.js +1 -1
  141. package/features/contentEntry/DeleteEntryRevision/DeleteEntryRevisionUseCase.js.map +1 -1
  142. package/features/contentEntry/DeleteEntryRevision/abstractions.d.ts +1 -0
  143. package/features/contentEntry/DeleteEntryRevision/abstractions.js +1 -0
  144. package/features/contentEntry/DeleteEntryRevision/abstractions.js.map +1 -1
  145. package/features/contentEntry/DeleteEntryRevision/events.d.ts +4 -2
  146. package/features/contentEntry/DeleteEntryRevision/events.js +5 -1
  147. package/features/contentEntry/DeleteEntryRevision/events.js.map +1 -1
  148. package/features/contentEntry/DeleteEntryRevision/feature.d.ts +4 -1
  149. package/features/contentEntry/DeleteMultipleEntries/DeleteMultipleEntriesUseCase.d.ts +1 -1
  150. package/features/contentEntry/DeleteMultipleEntries/DeleteMultipleEntriesUseCase.js +1 -1
  151. package/features/contentEntry/DeleteMultipleEntries/DeleteMultipleEntriesUseCase.js.map +1 -1
  152. package/features/contentEntry/DeleteMultipleEntries/abstractions.d.ts +1 -0
  153. package/features/contentEntry/DeleteMultipleEntries/abstractions.js +1 -0
  154. package/features/contentEntry/DeleteMultipleEntries/abstractions.js.map +1 -1
  155. package/features/contentEntry/DeleteMultipleEntries/events.d.ts +4 -2
  156. package/features/contentEntry/DeleteMultipleEntries/events.js +5 -1
  157. package/features/contentEntry/DeleteMultipleEntries/events.js.map +1 -1
  158. package/features/contentEntry/DeleteMultipleEntries/feature.d.ts +4 -1
  159. package/features/contentEntry/GetEntriesByIds/abstractions.d.ts +1 -0
  160. package/features/contentEntry/GetEntriesByIds/abstractions.js +1 -0
  161. package/features/contentEntry/GetEntriesByIds/abstractions.js.map +1 -1
  162. package/features/contentEntry/GetEntriesByIds/feature.d.ts +4 -1
  163. package/features/contentEntry/GetEntry/abstractions.d.ts +1 -0
  164. package/features/contentEntry/GetEntry/abstractions.js +1 -0
  165. package/features/contentEntry/GetEntry/abstractions.js.map +1 -1
  166. package/features/contentEntry/GetEntry/feature.d.ts +4 -1
  167. package/features/contentEntry/GetEntryById/abstractions.d.ts +1 -0
  168. package/features/contentEntry/GetEntryById/abstractions.js +1 -0
  169. package/features/contentEntry/GetEntryById/abstractions.js.map +1 -1
  170. package/features/contentEntry/GetEntryById/feature.d.ts +4 -1
  171. package/features/contentEntry/GetLatestEntriesByIds/abstractions.d.ts +1 -0
  172. package/features/contentEntry/GetLatestEntriesByIds/abstractions.js +1 -0
  173. package/features/contentEntry/GetLatestEntriesByIds/abstractions.js.map +1 -1
  174. package/features/contentEntry/GetLatestEntriesByIds/feature.d.ts +4 -1
  175. package/features/contentEntry/GetLatestRevisionByEntryId/abstractions.d.ts +4 -9
  176. package/features/contentEntry/GetLatestRevisionByEntryId/abstractions.js +4 -9
  177. package/features/contentEntry/GetLatestRevisionByEntryId/abstractions.js.map +1 -1
  178. package/features/contentEntry/GetLatestRevisionByEntryId/feature.d.ts +4 -1
  179. package/features/contentEntry/GetPreviousRevisionByEntryId/abstractions.d.ts +2 -3
  180. package/features/contentEntry/GetPreviousRevisionByEntryId/abstractions.js +2 -3
  181. package/features/contentEntry/GetPreviousRevisionByEntryId/abstractions.js.map +1 -1
  182. package/features/contentEntry/GetPreviousRevisionByEntryId/feature.d.ts +4 -1
  183. package/features/contentEntry/GetPublishedEntriesByIds/abstractions.d.ts +1 -0
  184. package/features/contentEntry/GetPublishedEntriesByIds/abstractions.js +1 -0
  185. package/features/contentEntry/GetPublishedEntriesByIds/abstractions.js.map +1 -1
  186. package/features/contentEntry/GetPublishedEntriesByIds/feature.d.ts +4 -1
  187. package/features/contentEntry/GetPublishedRevisionByEntryId/abstractions.d.ts +1 -0
  188. package/features/contentEntry/GetPublishedRevisionByEntryId/abstractions.js +1 -0
  189. package/features/contentEntry/GetPublishedRevisionByEntryId/abstractions.js.map +1 -1
  190. package/features/contentEntry/GetPublishedRevisionByEntryId/feature.d.ts +4 -1
  191. package/features/contentEntry/GetRevisionById/abstractions.d.ts +1 -0
  192. package/features/contentEntry/GetRevisionById/abstractions.js +1 -0
  193. package/features/contentEntry/GetRevisionById/abstractions.js.map +1 -1
  194. package/features/contentEntry/GetRevisionById/feature.d.ts +4 -1
  195. package/features/contentEntry/GetRevisionsByEntryId/abstractions.d.ts +1 -0
  196. package/features/contentEntry/GetRevisionsByEntryId/abstractions.js +1 -0
  197. package/features/contentEntry/GetRevisionsByEntryId/abstractions.js.map +1 -1
  198. package/features/contentEntry/GetRevisionsByEntryId/feature.d.ts +4 -1
  199. package/features/contentEntry/GetSingletonEntry/abstractions.d.ts +1 -0
  200. package/features/contentEntry/GetSingletonEntry/abstractions.js +1 -0
  201. package/features/contentEntry/GetSingletonEntry/abstractions.js.map +1 -1
  202. package/features/contentEntry/GetSingletonEntry/feature.d.ts +4 -1
  203. package/features/contentEntry/GetUniqueFieldValues/GetUniqueFieldValuesUseCase.d.ts +2 -2
  204. package/features/contentEntry/GetUniqueFieldValues/GetUniqueFieldValuesUseCase.js +9 -15
  205. package/features/contentEntry/GetUniqueFieldValues/GetUniqueFieldValuesUseCase.js.map +1 -1
  206. package/features/contentEntry/GetUniqueFieldValues/feature.d.ts +4 -1
  207. package/features/contentEntry/ListEntries/ListEntriesRepository.js +6 -1
  208. package/features/contentEntry/ListEntries/ListEntriesRepository.js.map +1 -1
  209. package/features/contentEntry/ListEntries/ListEntriesUseCase.d.ts +1 -1
  210. package/features/contentEntry/ListEntries/ListEntriesUseCase.js +1 -1
  211. package/features/contentEntry/ListEntries/ListEntriesUseCase.js.map +1 -1
  212. package/features/contentEntry/ListEntries/abstractions.d.ts +4 -0
  213. package/features/contentEntry/ListEntries/abstractions.js +4 -0
  214. package/features/contentEntry/ListEntries/abstractions.js.map +1 -1
  215. package/features/contentEntry/ListEntries/feature.d.ts +4 -1
  216. package/features/contentEntry/MoveEntry/MoveEntryUseCase.d.ts +1 -1
  217. package/features/contentEntry/MoveEntry/MoveEntryUseCase.js +1 -1
  218. package/features/contentEntry/MoveEntry/MoveEntryUseCase.js.map +1 -1
  219. package/features/contentEntry/MoveEntry/abstractions.d.ts +1 -0
  220. package/features/contentEntry/MoveEntry/abstractions.js +1 -0
  221. package/features/contentEntry/MoveEntry/abstractions.js.map +1 -1
  222. package/features/contentEntry/MoveEntry/events.d.ts +4 -2
  223. package/features/contentEntry/MoveEntry/events.js +5 -1
  224. package/features/contentEntry/MoveEntry/events.js.map +1 -1
  225. package/features/contentEntry/MoveEntry/feature.d.ts +4 -1
  226. package/features/contentEntry/PublishEntry/PublishEntryUseCase.d.ts +2 -2
  227. package/features/contentEntry/PublishEntry/PublishEntryUseCase.js +2 -2
  228. package/features/contentEntry/PublishEntry/PublishEntryUseCase.js.map +1 -1
  229. package/features/contentEntry/PublishEntry/abstractions.d.ts +1 -0
  230. package/features/contentEntry/PublishEntry/abstractions.js +1 -0
  231. package/features/contentEntry/PublishEntry/abstractions.js.map +1 -1
  232. package/features/contentEntry/PublishEntry/events.d.ts +4 -2
  233. package/features/contentEntry/PublishEntry/events.js +5 -1
  234. package/features/contentEntry/PublishEntry/events.js.map +1 -1
  235. package/features/contentEntry/PublishEntry/feature.d.ts +4 -1
  236. package/features/contentEntry/RepublishEntry/RepublishEntryUseCase.d.ts +2 -2
  237. package/features/contentEntry/RepublishEntry/RepublishEntryUseCase.js +2 -2
  238. package/features/contentEntry/RepublishEntry/RepublishEntryUseCase.js.map +1 -1
  239. package/features/contentEntry/RepublishEntry/abstractions.d.ts +1 -0
  240. package/features/contentEntry/RepublishEntry/abstractions.js +1 -0
  241. package/features/contentEntry/RepublishEntry/abstractions.js.map +1 -1
  242. package/features/contentEntry/RepublishEntry/events.d.ts +4 -2
  243. package/features/contentEntry/RepublishEntry/events.js +5 -1
  244. package/features/contentEntry/RepublishEntry/events.js.map +1 -1
  245. package/features/contentEntry/RepublishEntry/feature.d.ts +4 -1
  246. package/features/contentEntry/RestoreEntryFromBin/RestoreEntryFromBinUseCase.d.ts +2 -2
  247. package/features/contentEntry/RestoreEntryFromBin/RestoreEntryFromBinUseCase.js +2 -2
  248. package/features/contentEntry/RestoreEntryFromBin/RestoreEntryFromBinUseCase.js.map +1 -1
  249. package/features/contentEntry/RestoreEntryFromBin/abstractions.d.ts +1 -0
  250. package/features/contentEntry/RestoreEntryFromBin/abstractions.js +1 -0
  251. package/features/contentEntry/RestoreEntryFromBin/abstractions.js.map +1 -1
  252. package/features/contentEntry/RestoreEntryFromBin/events.d.ts +4 -2
  253. package/features/contentEntry/RestoreEntryFromBin/events.js +5 -1
  254. package/features/contentEntry/RestoreEntryFromBin/events.js.map +1 -1
  255. package/features/contentEntry/RestoreEntryFromBin/feature.d.ts +4 -1
  256. package/features/contentEntry/UnpublishEntry/UnpublishEntryUseCase.d.ts +2 -2
  257. package/features/contentEntry/UnpublishEntry/UnpublishEntryUseCase.js +2 -2
  258. package/features/contentEntry/UnpublishEntry/UnpublishEntryUseCase.js.map +1 -1
  259. package/features/contentEntry/UnpublishEntry/abstractions.d.ts +1 -0
  260. package/features/contentEntry/UnpublishEntry/abstractions.js +1 -0
  261. package/features/contentEntry/UnpublishEntry/abstractions.js.map +1 -1
  262. package/features/contentEntry/UnpublishEntry/events.d.ts +4 -2
  263. package/features/contentEntry/UnpublishEntry/events.js +5 -1
  264. package/features/contentEntry/UnpublishEntry/events.js.map +1 -1
  265. package/features/contentEntry/UnpublishEntry/feature.d.ts +4 -1
  266. package/features/contentEntry/UpdateEntry/UpdateEntryUseCase.d.ts +3 -3
  267. package/features/contentEntry/UpdateEntry/UpdateEntryUseCase.js +3 -3
  268. package/features/contentEntry/UpdateEntry/UpdateEntryUseCase.js.map +1 -1
  269. package/features/contentEntry/UpdateEntry/abstractions.d.ts +1 -0
  270. package/features/contentEntry/UpdateEntry/abstractions.js +1 -0
  271. package/features/contentEntry/UpdateEntry/abstractions.js.map +1 -1
  272. package/features/contentEntry/UpdateEntry/events.d.ts +4 -2
  273. package/features/contentEntry/UpdateEntry/events.js +5 -1
  274. package/features/contentEntry/UpdateEntry/events.js.map +1 -1
  275. package/features/contentEntry/UpdateEntry/feature.d.ts +4 -1
  276. package/features/contentEntry/UpdateRevisionDescription/UpdateRevisionDescriptionUseCase.d.ts +22 -0
  277. package/features/contentEntry/UpdateRevisionDescription/UpdateRevisionDescriptionUseCase.js +90 -0
  278. package/features/contentEntry/UpdateRevisionDescription/UpdateRevisionDescriptionUseCase.js.map +1 -0
  279. package/features/contentEntry/UpdateRevisionDescription/abstractions.d.ts +25 -0
  280. package/features/contentEntry/UpdateRevisionDescription/abstractions.js +10 -0
  281. package/features/contentEntry/UpdateRevisionDescription/abstractions.js.map +1 -0
  282. package/features/contentEntry/UpdateRevisionDescription/events.d.ts +44 -0
  283. package/features/contentEntry/UpdateRevisionDescription/events.js +33 -0
  284. package/features/contentEntry/UpdateRevisionDescription/events.js.map +1 -0
  285. package/features/contentEntry/UpdateRevisionDescription/feature.d.ts +12 -0
  286. package/features/contentEntry/UpdateRevisionDescription/feature.js +20 -0
  287. package/features/contentEntry/UpdateRevisionDescription/feature.js.map +1 -0
  288. package/features/contentEntry/UpdateRevisionDescription/index.d.ts +2 -0
  289. package/features/contentEntry/UpdateRevisionDescription/index.js +4 -0
  290. package/features/contentEntry/UpdateRevisionDescription/index.js.map +1 -0
  291. package/features/contentEntry/UpdateSingletonEntry/abstractions.d.ts +1 -0
  292. package/features/contentEntry/UpdateSingletonEntry/abstractions.js +1 -0
  293. package/features/contentEntry/UpdateSingletonEntry/abstractions.js.map +1 -1
  294. package/features/contentEntry/UpdateSingletonEntry/feature.d.ts +4 -1
  295. package/features/contentEntry/ValidateEntry/abstractions.d.ts +1 -0
  296. package/features/contentEntry/ValidateEntry/abstractions.js +1 -0
  297. package/features/contentEntry/ValidateEntry/abstractions.js.map +1 -1
  298. package/features/contentEntry/ValidateEntry/feature.d.ts +4 -1
  299. package/features/contentModel/ContentModelFeature.d.ts +4 -1
  300. package/features/contentModel/ContentModelFeature.js +2 -0
  301. package/features/contentModel/ContentModelFeature.js.map +1 -1
  302. package/features/contentModel/CreateModel/CreateModelRepository.d.ts +12 -12
  303. package/features/contentModel/CreateModel/CreateModelRepository.js +17 -12
  304. package/features/contentModel/CreateModel/CreateModelRepository.js.map +1 -1
  305. package/features/contentModel/CreateModel/CreateModelUseCase.d.ts +3 -3
  306. package/features/contentModel/CreateModel/CreateModelUseCase.js +3 -3
  307. package/features/contentModel/CreateModel/CreateModelUseCase.js.map +1 -1
  308. package/features/contentModel/CreateModel/abstractions.d.ts +1 -0
  309. package/features/contentModel/CreateModel/abstractions.js +1 -0
  310. package/features/contentModel/CreateModel/abstractions.js.map +1 -1
  311. package/features/contentModel/CreateModel/events.d.ts +4 -2
  312. package/features/contentModel/CreateModel/events.js +5 -1
  313. package/features/contentModel/CreateModel/events.js.map +1 -1
  314. package/features/contentModel/CreateModel/feature.d.ts +4 -1
  315. package/features/contentModel/CreateModelFrom/CreateModelFromRepository.d.ts +12 -13
  316. package/features/contentModel/CreateModelFrom/CreateModelFromRepository.js +25 -15
  317. package/features/contentModel/CreateModelFrom/CreateModelFromRepository.js.map +1 -1
  318. package/features/contentModel/CreateModelFrom/CreateModelFromUseCase.d.ts +3 -3
  319. package/features/contentModel/CreateModelFrom/CreateModelFromUseCase.js +4 -3
  320. package/features/contentModel/CreateModelFrom/CreateModelFromUseCase.js.map +1 -1
  321. package/features/contentModel/CreateModelFrom/abstractions.d.ts +1 -0
  322. package/features/contentModel/CreateModelFrom/abstractions.js +1 -0
  323. package/features/contentModel/CreateModelFrom/abstractions.js.map +1 -1
  324. package/features/contentModel/CreateModelFrom/events.d.ts +4 -2
  325. package/features/contentModel/CreateModelFrom/events.js +5 -1
  326. package/features/contentModel/CreateModelFrom/events.js.map +1 -1
  327. package/features/contentModel/CreateModelFrom/feature.d.ts +4 -1
  328. package/features/contentModel/DeleteModel/DeleteModelUseCase.d.ts +1 -1
  329. package/features/contentModel/DeleteModel/DeleteModelUseCase.js +1 -1
  330. package/features/contentModel/DeleteModel/DeleteModelUseCase.js.map +1 -1
  331. package/features/contentModel/DeleteModel/abstractions.d.ts +1 -0
  332. package/features/contentModel/DeleteModel/abstractions.js +1 -0
  333. package/features/contentModel/DeleteModel/abstractions.js.map +1 -1
  334. package/features/contentModel/DeleteModel/events.d.ts +4 -2
  335. package/features/contentModel/DeleteModel/events.js +5 -1
  336. package/features/contentModel/DeleteModel/events.js.map +1 -1
  337. package/features/contentModel/DeleteModel/feature.d.ts +4 -1
  338. package/features/contentModel/GetModel/abstractions.d.ts +1 -0
  339. package/features/contentModel/GetModel/abstractions.js +1 -0
  340. package/features/contentModel/GetModel/abstractions.js.map +1 -1
  341. package/features/contentModel/GetModel/feature.d.ts +4 -1
  342. package/features/contentModel/ListModels/abstractions.d.ts +1 -0
  343. package/features/contentModel/ListModels/abstractions.js +1 -0
  344. package/features/contentModel/ListModels/abstractions.js.map +1 -1
  345. package/features/contentModel/ListModels/feature.d.ts +4 -1
  346. package/features/contentModel/ModelFieldCompression/ModelFieldCompression.d.ts +15 -0
  347. package/features/contentModel/ModelFieldCompression/ModelFieldCompression.js +27 -0
  348. package/features/contentModel/ModelFieldCompression/ModelFieldCompression.js.map +1 -0
  349. package/features/contentModel/ModelFieldCompression/abstractions.d.ts +17 -0
  350. package/features/contentModel/ModelFieldCompression/abstractions.js +4 -0
  351. package/features/contentModel/ModelFieldCompression/abstractions.js.map +1 -0
  352. package/features/contentModel/ModelFieldCompression/feature.d.ts +4 -0
  353. package/features/contentModel/ModelFieldCompression/feature.js +10 -0
  354. package/features/contentModel/ModelFieldCompression/feature.js.map +1 -0
  355. package/features/contentModel/ModelFieldCompression/index.d.ts +1 -0
  356. package/features/contentModel/ModelFieldCompression/index.js +3 -0
  357. package/features/contentModel/ModelFieldCompression/index.js.map +1 -0
  358. package/features/contentModel/ModelToAstConverter/ModelToAstConverter.d.ts +3 -3
  359. package/features/contentModel/ModelToAstConverter/ModelToAstConverter.js +6 -6
  360. package/features/contentModel/ModelToAstConverter/ModelToAstConverter.js.map +1 -1
  361. package/features/contentModel/ModelToAstConverter/feature.d.ts +4 -1
  362. package/features/contentModel/UpdateModel/UpdateModelRepository.d.ts +9 -9
  363. package/features/contentModel/UpdateModel/UpdateModelRepository.js +21 -12
  364. package/features/contentModel/UpdateModel/UpdateModelRepository.js.map +1 -1
  365. package/features/contentModel/UpdateModel/UpdateModelUseCase.d.ts +2 -2
  366. package/features/contentModel/UpdateModel/UpdateModelUseCase.js +6 -3
  367. package/features/contentModel/UpdateModel/UpdateModelUseCase.js.map +1 -1
  368. package/features/contentModel/UpdateModel/abstractions.d.ts +1 -0
  369. package/features/contentModel/UpdateModel/abstractions.js +1 -0
  370. package/features/contentModel/UpdateModel/abstractions.js.map +1 -1
  371. package/features/contentModel/UpdateModel/events.d.ts +4 -2
  372. package/features/contentModel/UpdateModel/events.js +5 -1
  373. package/features/contentModel/UpdateModel/events.js.map +1 -1
  374. package/features/contentModel/UpdateModel/feature.d.ts +4 -1
  375. package/features/contentModel/shared/ModelsFetcher.d.ts +8 -6
  376. package/features/contentModel/shared/ModelsFetcher.js +14 -4
  377. package/features/contentModel/shared/ModelsFetcher.js.map +1 -1
  378. package/features/contentModelGroup/ContentModelGroupFeature.d.ts +4 -1
  379. package/features/contentModelGroup/CreateGroup/CreateGroupRepository.d.ts +1 -1
  380. package/features/contentModelGroup/CreateGroup/CreateGroupRepository.js +1 -1
  381. package/features/contentModelGroup/CreateGroup/CreateGroupRepository.js.map +1 -1
  382. package/features/contentModelGroup/CreateGroup/CreateGroupUseCase.d.ts +3 -3
  383. package/features/contentModelGroup/CreateGroup/CreateGroupUseCase.js +3 -3
  384. package/features/contentModelGroup/CreateGroup/CreateGroupUseCase.js.map +1 -1
  385. package/features/contentModelGroup/CreateGroup/abstractions.d.ts +1 -0
  386. package/features/contentModelGroup/CreateGroup/abstractions.js +1 -0
  387. package/features/contentModelGroup/CreateGroup/abstractions.js.map +1 -1
  388. package/features/contentModelGroup/CreateGroup/events.d.ts +4 -2
  389. package/features/contentModelGroup/CreateGroup/events.js +5 -1
  390. package/features/contentModelGroup/CreateGroup/events.js.map +1 -1
  391. package/features/contentModelGroup/CreateGroup/feature.d.ts +4 -1
  392. package/features/contentModelGroup/DeleteGroup/DeleteGroupUseCase.d.ts +1 -1
  393. package/features/contentModelGroup/DeleteGroup/DeleteGroupUseCase.js +1 -1
  394. package/features/contentModelGroup/DeleteGroup/DeleteGroupUseCase.js.map +1 -1
  395. package/features/contentModelGroup/DeleteGroup/abstractions.d.ts +1 -0
  396. package/features/contentModelGroup/DeleteGroup/abstractions.js +1 -0
  397. package/features/contentModelGroup/DeleteGroup/abstractions.js.map +1 -1
  398. package/features/contentModelGroup/DeleteGroup/events.d.ts +4 -2
  399. package/features/contentModelGroup/DeleteGroup/events.js +5 -1
  400. package/features/contentModelGroup/DeleteGroup/events.js.map +1 -1
  401. package/features/contentModelGroup/DeleteGroup/feature.d.ts +4 -1
  402. package/features/contentModelGroup/GetGroup/GetGroupRepository.d.ts +2 -2
  403. package/features/contentModelGroup/GetGroup/GetGroupRepository.js +2 -2
  404. package/features/contentModelGroup/GetGroup/GetGroupRepository.js.map +1 -1
  405. package/features/contentModelGroup/GetGroup/abstractions.d.ts +1 -0
  406. package/features/contentModelGroup/GetGroup/abstractions.js +1 -0
  407. package/features/contentModelGroup/GetGroup/abstractions.js.map +1 -1
  408. package/features/contentModelGroup/GetGroup/feature.d.ts +4 -1
  409. package/features/contentModelGroup/ListGroups/ListGroupsRepository.d.ts +2 -2
  410. package/features/contentModelGroup/ListGroups/ListGroupsRepository.js +2 -2
  411. package/features/contentModelGroup/ListGroups/ListGroupsRepository.js.map +1 -1
  412. package/features/contentModelGroup/ListGroups/abstractions.d.ts +1 -0
  413. package/features/contentModelGroup/ListGroups/abstractions.js +1 -0
  414. package/features/contentModelGroup/ListGroups/abstractions.js.map +1 -1
  415. package/features/contentModelGroup/ListGroups/feature.d.ts +4 -1
  416. package/features/contentModelGroup/UpdateGroup/UpdateGroupUseCase.d.ts +2 -2
  417. package/features/contentModelGroup/UpdateGroup/UpdateGroupUseCase.js +2 -2
  418. package/features/contentModelGroup/UpdateGroup/UpdateGroupUseCase.js.map +1 -1
  419. package/features/contentModelGroup/UpdateGroup/abstractions.d.ts +1 -0
  420. package/features/contentModelGroup/UpdateGroup/abstractions.js +1 -0
  421. package/features/contentModelGroup/UpdateGroup/abstractions.js.map +1 -1
  422. package/features/contentModelGroup/UpdateGroup/events.d.ts +4 -2
  423. package/features/contentModelGroup/UpdateGroup/events.js +5 -1
  424. package/features/contentModelGroup/UpdateGroup/events.js.map +1 -1
  425. package/features/contentModelGroup/UpdateGroup/feature.d.ts +4 -1
  426. package/features/contentModelGroup/shared/PluginGroupsProvider.d.ts +2 -2
  427. package/features/contentModelGroup/shared/PluginGroupsProvider.js +2 -2
  428. package/features/contentModelGroup/shared/PluginGroupsProvider.js.map +1 -1
  429. package/features/contentModelGroup/shared/abstractions.d.ts +1 -0
  430. package/features/contentModelGroup/shared/abstractions.js +1 -0
  431. package/features/contentModelGroup/shared/abstractions.js.map +1 -1
  432. package/features/graphql/feature.d.ts +4 -0
  433. package/features/graphql/feature.js +34 -0
  434. package/features/graphql/feature.js.map +1 -0
  435. package/features/graphql/fields/CmsModelFieldToGraphQLRegistry.d.ts +13 -0
  436. package/features/graphql/fields/CmsModelFieldToGraphQLRegistry.js +27 -0
  437. package/features/graphql/fields/CmsModelFieldToGraphQLRegistry.js.map +1 -0
  438. package/features/graphql/fields/abstractions/CmsModelFieldToGraphQL.d.ts +97 -0
  439. package/features/graphql/fields/abstractions/CmsModelFieldToGraphQL.js +4 -0
  440. package/features/graphql/fields/abstractions/CmsModelFieldToGraphQL.js.map +1 -0
  441. package/features/graphql/fields/abstractions/CmsModelFieldToGraphQLRegistry.d.ts +10 -0
  442. package/features/graphql/fields/abstractions/CmsModelFieldToGraphQLRegistry.js +4 -0
  443. package/features/graphql/fields/abstractions/CmsModelFieldToGraphQLRegistry.js.map +1 -0
  444. package/features/graphql/fields/base/BooleanToGraphQL.d.ts +26 -0
  445. package/features/graphql/fields/base/BooleanToGraphQL.js +68 -0
  446. package/features/graphql/fields/base/BooleanToGraphQL.js.map +1 -0
  447. package/features/graphql/fields/base/DateTimeToGraphQL.d.ts +26 -0
  448. package/features/graphql/fields/base/DateTimeToGraphQL.js +97 -0
  449. package/features/graphql/fields/base/DateTimeToGraphQL.js.map +1 -0
  450. package/features/graphql/fields/base/DynamicZoneToGraphQL.d.ts +30 -0
  451. package/features/graphql/fields/base/DynamicZoneToGraphQL.js +280 -0
  452. package/features/graphql/fields/base/DynamicZoneToGraphQL.js.map +1 -0
  453. package/features/graphql/fields/base/FileToGraphQL.d.ts +22 -0
  454. package/features/graphql/fields/base/FileToGraphQL.js +39 -0
  455. package/features/graphql/fields/base/FileToGraphQL.js.map +1 -0
  456. package/features/graphql/fields/base/JsonToGraphQL.d.ts +24 -0
  457. package/features/graphql/fields/base/JsonToGraphQL.js +52 -0
  458. package/features/graphql/fields/base/JsonToGraphQL.js.map +1 -0
  459. package/features/graphql/fields/base/LongTextToGraphQL.d.ts +24 -0
  460. package/features/graphql/fields/base/LongTextToGraphQL.js +57 -0
  461. package/features/graphql/fields/base/LongTextToGraphQL.js.map +1 -0
  462. package/features/graphql/fields/base/NumberToGraphQL.d.ts +26 -0
  463. package/features/graphql/fields/base/NumberToGraphQL.js +78 -0
  464. package/features/graphql/fields/base/NumberToGraphQL.js.map +1 -0
  465. package/features/graphql/fields/base/ObjectToGraphQL.d.ts +31 -0
  466. package/features/graphql/fields/base/ObjectToGraphQL.js +264 -0
  467. package/features/graphql/fields/base/ObjectToGraphQL.js.map +1 -0
  468. package/features/graphql/fields/base/RefToGraphQL.d.ts +29 -0
  469. package/features/graphql/fields/base/RefToGraphQL.js +261 -0
  470. package/features/graphql/fields/base/RefToGraphQL.js.map +1 -0
  471. package/features/graphql/fields/base/RichTextToGraphQL.d.ts +25 -0
  472. package/features/graphql/fields/base/RichTextToGraphQL.js +58 -0
  473. package/features/graphql/fields/base/RichTextToGraphQL.js.map +1 -0
  474. package/features/graphql/fields/base/SearchableJsonToGraphQL.d.ts +26 -0
  475. package/features/graphql/fields/base/SearchableJsonToGraphQL.js +62 -0
  476. package/features/graphql/fields/base/SearchableJsonToGraphQL.js.map +1 -0
  477. package/features/graphql/fields/base/TextToGraphQL.d.ts +26 -0
  478. package/features/graphql/fields/base/TextToGraphQL.js +74 -0
  479. package/features/graphql/fields/base/TextToGraphQL.js.map +1 -0
  480. package/features/graphql/fields/base/dynamicZone/createTypeDefsForTemplates.d.ts +16 -0
  481. package/features/graphql/fields/base/dynamicZone/createTypeDefsForTemplates.js +37 -0
  482. package/features/graphql/fields/base/dynamicZone/createTypeDefsForTemplates.js.map +1 -0
  483. package/features/graphql/fields/base/dynamicZone/normalizeDynamicZoneInput.d.ts +3 -0
  484. package/features/graphql/fields/base/dynamicZone/normalizeDynamicZoneInput.js +14 -0
  485. package/features/graphql/fields/base/dynamicZone/normalizeDynamicZoneInput.js.map +1 -0
  486. package/{graphqlFields → features/graphql/fields/base}/richText/richTextResolver.d.ts +1 -1
  487. package/{graphqlFields → features/graphql/fields/base}/richText/richTextResolver.js +4 -4
  488. package/features/graphql/fields/base/richText/richTextResolver.js.map +1 -0
  489. package/{graphqlFields/helpers.d.ts → features/graphql/fields/base/utils/createGraphQLInputField.d.ts} +1 -1
  490. package/features/graphql/fields/base/utils/createGraphQLInputField.js +17 -0
  491. package/features/graphql/fields/base/utils/createGraphQLInputField.js.map +1 -0
  492. package/features/graphql/index.d.ts +4 -0
  493. package/features/graphql/index.js +6 -0
  494. package/features/graphql/index.js.map +1 -0
  495. package/features/graphql/sort/abstractions/CmsGraphQLSchemaSorter.d.ts +13 -0
  496. package/features/graphql/sort/abstractions/CmsGraphQLSchemaSorter.js +4 -0
  497. package/features/graphql/sort/abstractions/CmsGraphQLSchemaSorter.js.map +1 -0
  498. package/features/installer/CmsInstaller.d.ts +1 -1
  499. package/features/installer/CmsInstaller.js +1 -1
  500. package/features/installer/CmsInstaller.js.map +1 -1
  501. package/features/installer/feature.d.ts +4 -1
  502. package/features/modelBuilder/abstractions.d.ts +8 -4
  503. package/features/modelBuilder/abstractions.js +5 -2
  504. package/features/modelBuilder/abstractions.js.map +1 -1
  505. package/features/modelBuilder/feature.d.ts +4 -1
  506. package/features/modelBuilder/feature.js +6 -0
  507. package/features/modelBuilder/feature.js.map +1 -1
  508. package/features/modelBuilder/fields/BaseFieldBuilder.d.ts +36 -0
  509. package/features/modelBuilder/fields/BaseFieldBuilder.js +41 -0
  510. package/features/modelBuilder/fields/BaseFieldBuilder.js.map +1 -0
  511. package/features/modelBuilder/fields/BooleanFieldType.d.ts +2 -2
  512. package/features/modelBuilder/fields/BooleanFieldType.js +2 -2
  513. package/features/modelBuilder/fields/BooleanFieldType.js.map +1 -1
  514. package/features/modelBuilder/fields/DataFieldBuilder.d.ts +220 -0
  515. package/features/modelBuilder/fields/DataFieldBuilder.js +211 -0
  516. package/features/modelBuilder/fields/DataFieldBuilder.js.map +1 -0
  517. package/features/modelBuilder/fields/DateTimeFieldType.d.ts +3 -3
  518. package/features/modelBuilder/fields/DateTimeFieldType.js +22 -2
  519. package/features/modelBuilder/fields/DateTimeFieldType.js.map +1 -1
  520. package/features/modelBuilder/fields/DynamicZoneFieldType.d.ts +3 -3
  521. package/features/modelBuilder/fields/DynamicZoneFieldType.js +12 -5
  522. package/features/modelBuilder/fields/DynamicZoneFieldType.js.map +1 -1
  523. package/features/modelBuilder/fields/FieldBuilder.d.ts +5 -46
  524. package/features/modelBuilder/fields/FieldBuilder.js +3 -152
  525. package/features/modelBuilder/fields/FieldBuilder.js.map +1 -1
  526. package/features/modelBuilder/fields/FieldBuilderRegistry.d.ts +3 -3
  527. package/features/modelBuilder/fields/FieldBuilderRegistry.js +11 -1
  528. package/features/modelBuilder/fields/FieldBuilderRegistry.js.map +1 -1
  529. package/features/modelBuilder/fields/FileFieldType.d.ts +3 -3
  530. package/features/modelBuilder/fields/FileFieldType.js +2 -2
  531. package/features/modelBuilder/fields/FileFieldType.js.map +1 -1
  532. package/features/modelBuilder/fields/JsonFieldType.d.ts +2 -2
  533. package/features/modelBuilder/fields/JsonFieldType.js +2 -2
  534. package/features/modelBuilder/fields/JsonFieldType.js.map +1 -1
  535. package/features/modelBuilder/fields/LayoutFieldBuilder.d.ts +7 -0
  536. package/features/modelBuilder/fields/LayoutFieldBuilder.js +9 -0
  537. package/features/modelBuilder/fields/LayoutFieldBuilder.js.map +1 -0
  538. package/features/modelBuilder/fields/LongTextFieldType.d.ts +3 -4
  539. package/features/modelBuilder/fields/LongTextFieldType.js +2 -2
  540. package/features/modelBuilder/fields/LongTextFieldType.js.map +1 -1
  541. package/features/modelBuilder/fields/NumberFieldType.d.ts +3 -3
  542. package/features/modelBuilder/fields/NumberFieldType.js +2 -2
  543. package/features/modelBuilder/fields/NumberFieldType.js.map +1 -1
  544. package/features/modelBuilder/fields/ObjectFieldType.d.ts +7 -6
  545. package/features/modelBuilder/fields/ObjectFieldType.js +21 -6
  546. package/features/modelBuilder/fields/ObjectFieldType.js.map +1 -1
  547. package/features/modelBuilder/fields/RefFieldType.d.ts +3 -3
  548. package/features/modelBuilder/fields/RefFieldType.js +2 -2
  549. package/features/modelBuilder/fields/RefFieldType.js.map +1 -1
  550. package/features/modelBuilder/fields/RichTextFieldType.d.ts +2 -2
  551. package/features/modelBuilder/fields/RichTextFieldType.js +2 -2
  552. package/features/modelBuilder/fields/RichTextFieldType.js.map +1 -1
  553. package/features/modelBuilder/fields/SearchableJsonFieldType.d.ts +2 -2
  554. package/features/modelBuilder/fields/SearchableJsonFieldType.js +2 -2
  555. package/features/modelBuilder/fields/SearchableJsonFieldType.js.map +1 -1
  556. package/features/modelBuilder/fields/TextFieldType.d.ts +3 -3
  557. package/features/modelBuilder/fields/TextFieldType.js +2 -2
  558. package/features/modelBuilder/fields/TextFieldType.js.map +1 -1
  559. package/features/modelBuilder/fields/UiAlertFieldType.d.ts +19 -0
  560. package/features/modelBuilder/fields/UiAlertFieldType.js +36 -0
  561. package/features/modelBuilder/fields/UiAlertFieldType.js.map +1 -0
  562. package/features/modelBuilder/fields/UiSeparatorFieldType.d.ts +17 -0
  563. package/features/modelBuilder/fields/UiSeparatorFieldType.js +31 -0
  564. package/features/modelBuilder/fields/UiSeparatorFieldType.js.map +1 -0
  565. package/features/modelBuilder/fields/UiTabsFieldType.d.ts +28 -0
  566. package/features/modelBuilder/fields/UiTabsFieldType.js +75 -0
  567. package/features/modelBuilder/fields/UiTabsFieldType.js.map +1 -0
  568. package/features/modelBuilder/fields/abstractions.d.ts +6 -3
  569. package/features/modelBuilder/fields/abstractions.js +1 -1
  570. package/features/modelBuilder/fields/abstractions.js.map +1 -1
  571. package/features/modelBuilder/fields/{validators.d.ts → fieldTypeValidator.d.ts} +23 -1
  572. package/features/modelBuilder/fields/fieldTypeValidator.js +31 -0
  573. package/features/modelBuilder/fields/fieldTypeValidator.js.map +1 -0
  574. package/features/modelBuilder/index.d.ts +3 -0
  575. package/features/modelBuilder/index.js +3 -0
  576. package/features/modelBuilder/index.js.map +1 -1
  577. package/features/modelBuilder/models/BaseModelBuilder.d.ts +9 -4
  578. package/features/modelBuilder/models/BaseModelBuilder.js +19 -0
  579. package/features/modelBuilder/models/BaseModelBuilder.js.map +1 -1
  580. package/features/modelBuilder/models/PrivateModelBuilder.js +4 -2
  581. package/features/modelBuilder/models/PrivateModelBuilder.js.map +1 -1
  582. package/features/modelBuilder/models/PublicModelBuilder.js +16 -4
  583. package/features/modelBuilder/models/PublicModelBuilder.js.map +1 -1
  584. package/features/shared/abstractions.d.ts +9 -2
  585. package/features/shared/abstractions.js +1 -0
  586. package/features/shared/abstractions.js.map +1 -1
  587. package/features/sortMapper/abstractions.d.ts +1 -0
  588. package/features/sortMapper/abstractions.js +1 -0
  589. package/features/sortMapper/abstractions.js.map +1 -1
  590. package/features/sortMapper/feature.d.ts +4 -1
  591. package/features/storage/StorageTransformRegistry.d.ts +13 -0
  592. package/features/storage/StorageTransformRegistry.js +27 -0
  593. package/features/storage/StorageTransformRegistry.js.map +1 -0
  594. package/features/storage/abstractions/StorageTransform.d.ts +26 -0
  595. package/features/storage/abstractions/StorageTransform.js +4 -0
  596. package/features/storage/abstractions/StorageTransform.js.map +1 -0
  597. package/features/storage/abstractions/StorageTransformRegistry.d.ts +10 -0
  598. package/features/storage/abstractions/StorageTransformRegistry.js +4 -0
  599. package/features/storage/abstractions/StorageTransformRegistry.js.map +1 -0
  600. package/features/storage/feature.d.ts +4 -0
  601. package/features/storage/feature.js +24 -0
  602. package/features/storage/feature.js.map +1 -0
  603. package/features/storage/fields/DateStorageTransform.d.ts +10 -0
  604. package/features/storage/fields/DateStorageTransform.js +110 -0
  605. package/features/storage/fields/DateStorageTransform.js.map +1 -0
  606. package/features/storage/fields/DefaultStorageTransform.d.ts +10 -0
  607. package/features/storage/fields/DefaultStorageTransform.js +20 -0
  608. package/features/storage/fields/DefaultStorageTransform.js.map +1 -0
  609. package/features/storage/fields/DynamicZoneStorageTransform.d.ts +10 -0
  610. package/features/storage/fields/DynamicZoneStorageTransform.js +142 -0
  611. package/features/storage/fields/DynamicZoneStorageTransform.js.map +1 -0
  612. package/features/storage/fields/JsonStorageTransform.d.ts +13 -0
  613. package/features/storage/fields/JsonStorageTransform.js +31 -0
  614. package/features/storage/fields/JsonStorageTransform.js.map +1 -0
  615. package/features/storage/fields/LongTextStorageTransform.d.ts +18 -0
  616. package/features/storage/fields/LongTextStorageTransform.js +55 -0
  617. package/features/storage/fields/LongTextStorageTransform.js.map +1 -0
  618. package/features/storage/fields/ObjectStorageTransform.d.ts +10 -0
  619. package/features/storage/fields/ObjectStorageTransform.js +99 -0
  620. package/features/storage/fields/ObjectStorageTransform.js.map +1 -0
  621. package/features/storage/fields/RichTextStorageTransform.d.ts +13 -0
  622. package/features/storage/fields/RichTextStorageTransform.js +39 -0
  623. package/features/storage/fields/RichTextStorageTransform.js.map +1 -0
  624. package/features/storage/index.d.ts +3 -0
  625. package/features/storage/index.js +5 -0
  626. package/features/storage/index.js.map +1 -0
  627. package/features/validation/CmsModelFieldPatternValidatorRegistry.d.ts +12 -0
  628. package/features/validation/CmsModelFieldPatternValidatorRegistry.js +21 -0
  629. package/features/validation/CmsModelFieldPatternValidatorRegistry.js.map +1 -0
  630. package/features/validation/CmsModelFieldValidatorRegistry.d.ts +12 -0
  631. package/features/validation/CmsModelFieldValidatorRegistry.js +23 -0
  632. package/features/validation/CmsModelFieldValidatorRegistry.js.map +1 -0
  633. package/features/validation/abstractions/CmsModelFieldPatternValidator.d.ts +13 -0
  634. package/features/validation/abstractions/CmsModelFieldPatternValidator.js +4 -0
  635. package/features/validation/abstractions/CmsModelFieldPatternValidator.js.map +1 -0
  636. package/features/validation/abstractions/CmsModelFieldPatternValidatorRegistry.d.ts +9 -0
  637. package/features/validation/abstractions/CmsModelFieldPatternValidatorRegistry.js +4 -0
  638. package/features/validation/abstractions/CmsModelFieldPatternValidatorRegistry.js.map +1 -0
  639. package/features/validation/abstractions/CmsModelFieldValidator.d.ts +11 -0
  640. package/features/validation/abstractions/CmsModelFieldValidator.js +4 -0
  641. package/features/validation/abstractions/CmsModelFieldValidator.js.map +1 -0
  642. package/features/validation/abstractions/CmsModelFieldValidatorRegistry.d.ts +9 -0
  643. package/features/validation/abstractions/CmsModelFieldValidatorRegistry.js +4 -0
  644. package/features/validation/abstractions/CmsModelFieldValidatorRegistry.js.map +1 -0
  645. package/features/validation/feature.d.ts +4 -0
  646. package/features/validation/feature.js +48 -0
  647. package/features/validation/feature.js.map +1 -0
  648. package/features/validation/index.d.ts +5 -0
  649. package/features/validation/index.js +7 -0
  650. package/features/validation/index.js.map +1 -0
  651. package/features/validation/validators/DateGteValidator.d.ts +10 -0
  652. package/features/validation/validators/DateGteValidator.js +26 -0
  653. package/features/validation/validators/DateGteValidator.js.map +1 -0
  654. package/features/validation/validators/DateLteValidator.d.ts +10 -0
  655. package/features/validation/validators/DateLteValidator.js +26 -0
  656. package/features/validation/validators/DateLteValidator.js.map +1 -0
  657. package/features/validation/validators/GteValidator.d.ts +10 -0
  658. package/features/validation/validators/GteValidator.js +21 -0
  659. package/features/validation/validators/GteValidator.js.map +1 -0
  660. package/features/validation/validators/InValidator.d.ts +10 -0
  661. package/features/validation/validators/InValidator.js +21 -0
  662. package/features/validation/validators/InValidator.js.map +1 -0
  663. package/features/validation/validators/LteValidator.d.ts +10 -0
  664. package/features/validation/validators/LteValidator.js +21 -0
  665. package/features/validation/validators/LteValidator.js.map +1 -0
  666. package/features/validation/validators/MaxLengthValidator.d.ts +10 -0
  667. package/features/validation/validators/MaxLengthValidator.js +21 -0
  668. package/features/validation/validators/MaxLengthValidator.js.map +1 -0
  669. package/features/validation/validators/MinLengthValidator.d.ts +10 -0
  670. package/features/validation/validators/MinLengthValidator.js +21 -0
  671. package/features/validation/validators/MinLengthValidator.js.map +1 -0
  672. package/features/validation/validators/PatternValidator.d.ts +13 -0
  673. package/features/validation/validators/PatternValidator.js +38 -0
  674. package/features/validation/validators/PatternValidator.js.map +1 -0
  675. package/features/validation/validators/RequiredValidator.d.ts +10 -0
  676. package/features/validation/validators/RequiredValidator.js +16 -0
  677. package/features/validation/validators/RequiredValidator.js.map +1 -0
  678. package/features/validation/validators/TimeGteValidator.d.ts +10 -0
  679. package/features/validation/validators/TimeGteValidator.js +21 -0
  680. package/features/validation/validators/TimeGteValidator.js.map +1 -0
  681. package/features/validation/validators/TimeLteValidator.d.ts +10 -0
  682. package/features/validation/validators/TimeLteValidator.js +21 -0
  683. package/features/validation/validators/TimeLteValidator.js.map +1 -0
  684. package/features/validation/validators/UniqueValidator.d.ts +10 -0
  685. package/features/validation/validators/UniqueValidator.js +47 -0
  686. package/features/validation/validators/UniqueValidator.js.map +1 -0
  687. package/features/validation/validators/patterns/EmailPattern.d.ts +12 -0
  688. package/features/validation/validators/patterns/EmailPattern.js +14 -0
  689. package/features/validation/validators/patterns/EmailPattern.js.map +1 -0
  690. package/features/validation/validators/patterns/LowerCasePattern.d.ts +12 -0
  691. package/features/validation/validators/patterns/LowerCasePattern.js +14 -0
  692. package/features/validation/validators/patterns/LowerCasePattern.js.map +1 -0
  693. package/features/validation/validators/patterns/LowerCaseSpacePattern.d.ts +12 -0
  694. package/features/validation/validators/patterns/LowerCaseSpacePattern.js +14 -0
  695. package/features/validation/validators/patterns/LowerCaseSpacePattern.js.map +1 -0
  696. package/features/validation/validators/patterns/UpperCasePattern.d.ts +12 -0
  697. package/features/validation/validators/patterns/UpperCasePattern.js +14 -0
  698. package/features/validation/validators/patterns/UpperCasePattern.js.map +1 -0
  699. package/features/validation/validators/patterns/UpperCaseSpacePattern.d.ts +12 -0
  700. package/features/validation/validators/patterns/UpperCaseSpacePattern.js +14 -0
  701. package/features/validation/validators/patterns/UpperCaseSpacePattern.js.map +1 -0
  702. package/features/validation/validators/patterns/UrlPattern.d.ts +12 -0
  703. package/features/validation/validators/patterns/UrlPattern.js +14 -0
  704. package/features/validation/validators/patterns/UrlPattern.js.map +1 -0
  705. package/features/whereMapper/abstractions.d.ts +1 -0
  706. package/features/whereMapper/abstractions.js +1 -0
  707. package/features/whereMapper/abstractions.js.map +1 -1
  708. package/features/whereMapper/feature.d.ts +4 -1
  709. package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.js +2 -2
  710. package/fieldConverters/CmsModelDynamicZoneFieldConverterPlugin.js.map +1 -1
  711. package/fieldConverters/CmsModelObjectFieldConverterPlugin.js +2 -2
  712. package/fieldConverters/CmsModelObjectFieldConverterPlugin.js.map +1 -1
  713. package/graphql/getSchema/generateCacheKey.js +15 -7
  714. package/graphql/getSchema/generateCacheKey.js.map +1 -1
  715. package/graphql/index.js +2 -1
  716. package/graphql/index.js.map +1 -1
  717. package/graphql/schema/baseSchema.d.ts +2 -1
  718. package/graphql/schema/baseSchema.js +28 -24
  719. package/graphql/schema/baseSchema.js.map +1 -1
  720. package/graphql/schema/cms/createEntryResolver.d.ts +10 -0
  721. package/graphql/schema/cms/createEntryResolver.js +65 -0
  722. package/graphql/schema/cms/createEntryResolver.js.map +1 -0
  723. package/graphql/schema/cms/deleteEntryResolver.d.ts +10 -0
  724. package/graphql/schema/cms/deleteEntryResolver.js +65 -0
  725. package/graphql/schema/cms/deleteEntryResolver.js.map +1 -0
  726. package/graphql/schema/cms/getEntryResolver.d.ts +11 -0
  727. package/graphql/schema/cms/getEntryResolver.js +67 -0
  728. package/graphql/schema/cms/getEntryResolver.js.map +1 -0
  729. package/graphql/schema/cms/helpers/buildFieldsSelection.d.ts +23 -0
  730. package/graphql/schema/cms/helpers/buildFieldsSelection.js +79 -0
  731. package/graphql/schema/cms/helpers/buildFieldsSelection.js.map +1 -0
  732. package/graphql/schema/cms/helpers/getErrorMessage.d.ts +4 -0
  733. package/graphql/schema/cms/helpers/getErrorMessage.js +14 -0
  734. package/graphql/schema/cms/helpers/getErrorMessage.js.map +1 -0
  735. package/graphql/schema/cms/helpers/getModel.d.ts +6 -0
  736. package/graphql/schema/cms/helpers/getModel.js +12 -0
  737. package/graphql/schema/cms/helpers/getModel.js.map +1 -0
  738. package/graphql/schema/cms/helpers/index.d.ts +5 -0
  739. package/graphql/schema/cms/helpers/index.js +7 -0
  740. package/graphql/schema/cms/helpers/index.js.map +1 -0
  741. package/graphql/schema/cms/helpers/transformSortToArray.d.ts +18 -0
  742. package/graphql/schema/cms/helpers/transformSortToArray.js +38 -0
  743. package/graphql/schema/cms/helpers/transformSortToArray.js.map +1 -0
  744. package/graphql/schema/cms/helpers/transformWhereToNested.d.ts +17 -0
  745. package/graphql/schema/cms/helpers/transformWhereToNested.js +54 -0
  746. package/graphql/schema/cms/helpers/transformWhereToNested.js.map +1 -0
  747. package/graphql/schema/cms/helpers.d.ts +5 -0
  748. package/graphql/schema/cms/helpers.js +7 -0
  749. package/graphql/schema/cms/helpers.js.map +1 -0
  750. package/graphql/schema/cms/index.d.ts +2 -0
  751. package/graphql/schema/cms/index.js +26 -0
  752. package/graphql/schema/cms/index.js.map +1 -0
  753. package/graphql/schema/cms/listEntriesResolver.d.ts +15 -0
  754. package/graphql/schema/cms/listEntriesResolver.js +115 -0
  755. package/graphql/schema/cms/listEntriesResolver.js.map +1 -0
  756. package/graphql/schema/cms/publishEntryResolver.d.ts +10 -0
  757. package/graphql/schema/cms/publishEntryResolver.js +65 -0
  758. package/graphql/schema/cms/publishEntryResolver.js.map +1 -0
  759. package/graphql/schema/cms/resolvers/createEntry.d.ts +8 -0
  760. package/graphql/schema/cms/resolvers/createEntry.js +17 -0
  761. package/graphql/schema/cms/resolvers/createEntry.js.map +1 -0
  762. package/graphql/schema/cms/resolvers/deleteEntryRevision.d.ts +8 -0
  763. package/graphql/schema/cms/resolvers/deleteEntryRevision.js +17 -0
  764. package/graphql/schema/cms/resolvers/deleteEntryRevision.js.map +1 -0
  765. package/graphql/schema/cms/resolvers/getEntry.d.ts +8 -0
  766. package/graphql/schema/cms/resolvers/getEntry.js +17 -0
  767. package/graphql/schema/cms/resolvers/getEntry.js.map +1 -0
  768. package/graphql/schema/cms/resolvers/index.d.ts +9 -0
  769. package/graphql/schema/cms/resolvers/index.js +11 -0
  770. package/graphql/schema/cms/resolvers/index.js.map +1 -0
  771. package/graphql/schema/cms/resolvers/listEntries.d.ts +8 -0
  772. package/graphql/schema/cms/resolvers/listEntries.js +17 -0
  773. package/graphql/schema/cms/resolvers/listEntries.js.map +1 -0
  774. package/graphql/schema/cms/resolvers/mutationCms.d.ts +8 -0
  775. package/graphql/schema/cms/resolvers/mutationCms.js +24 -0
  776. package/graphql/schema/cms/resolvers/mutationCms.js.map +1 -0
  777. package/graphql/schema/cms/resolvers/publishEntryRevision.d.ts +8 -0
  778. package/graphql/schema/cms/resolvers/publishEntryRevision.js +17 -0
  779. package/graphql/schema/cms/resolvers/publishEntryRevision.js.map +1 -0
  780. package/graphql/schema/cms/resolvers/queryCms.d.ts +8 -0
  781. package/graphql/schema/cms/resolvers/queryCms.js +23 -0
  782. package/graphql/schema/cms/resolvers/queryCms.js.map +1 -0
  783. package/graphql/schema/cms/resolvers/unpublishEntryRevision.d.ts +8 -0
  784. package/graphql/schema/cms/resolvers/unpublishEntryRevision.js +17 -0
  785. package/graphql/schema/cms/resolvers/unpublishEntryRevision.js.map +1 -0
  786. package/graphql/schema/cms/resolvers/updateEntryRevision.d.ts +8 -0
  787. package/graphql/schema/cms/resolvers/updateEntryRevision.js +17 -0
  788. package/graphql/schema/cms/resolvers/updateEntryRevision.js.map +1 -0
  789. package/graphql/schema/cms/typeDefs/index.d.ts +3 -0
  790. package/graphql/schema/cms/typeDefs/index.js +5 -0
  791. package/graphql/schema/cms/typeDefs/index.js.map +1 -0
  792. package/graphql/schema/cms/typeDefs/mutation.d.ts +8 -0
  793. package/graphql/schema/cms/typeDefs/mutation.js +42 -0
  794. package/graphql/schema/cms/typeDefs/mutation.js.map +1 -0
  795. package/graphql/schema/cms/typeDefs/query.d.ts +8 -0
  796. package/graphql/schema/cms/typeDefs/query.js +36 -0
  797. package/graphql/schema/cms/typeDefs/query.js.map +1 -0
  798. package/graphql/schema/cms/typeDefs/responses.d.ts +8 -0
  799. package/graphql/schema/cms/typeDefs/responses.js +35 -0
  800. package/graphql/schema/cms/typeDefs/responses.js.map +1 -0
  801. package/graphql/schema/cms/unpublishEntryResolver.d.ts +10 -0
  802. package/graphql/schema/cms/unpublishEntryResolver.js +65 -0
  803. package/graphql/schema/cms/unpublishEntryResolver.js.map +1 -0
  804. package/graphql/schema/cms/updateEntryResolver.d.ts +11 -0
  805. package/graphql/schema/cms/updateEntryResolver.js +67 -0
  806. package/graphql/schema/cms/updateEntryResolver.js.map +1 -0
  807. package/graphql/schema/contentEntries.js +1 -1
  808. package/graphql/schema/contentEntries.js.map +1 -1
  809. package/graphql/schema/contentModels.js +31 -9
  810. package/graphql/schema/contentModels.js.map +1 -1
  811. package/graphql/schema/createFieldResolvers.d.ts +3 -2
  812. package/graphql/schema/createFieldResolvers.js +5 -4
  813. package/graphql/schema/createFieldResolvers.js.map +1 -1
  814. package/graphql/schema/createManageResolvers.d.ts +3 -2
  815. package/graphql/schema/createManageResolvers.js +5 -3
  816. package/graphql/schema/createManageResolvers.js.map +1 -1
  817. package/graphql/schema/createManageSDL.d.ts +4 -4
  818. package/graphql/schema/createManageSDL.js +16 -11
  819. package/graphql/schema/createManageSDL.js.map +1 -1
  820. package/graphql/schema/createPreviewResolvers.d.ts +3 -2
  821. package/graphql/schema/createPreviewResolvers.js +4 -4
  822. package/graphql/schema/createPreviewResolvers.js.map +1 -1
  823. package/graphql/schema/createReadResolvers.d.ts +3 -2
  824. package/graphql/schema/createReadResolvers.js +4 -4
  825. package/graphql/schema/createReadResolvers.js.map +1 -1
  826. package/graphql/schema/createReadSDL.d.ts +4 -4
  827. package/graphql/schema/createReadSDL.js +7 -7
  828. package/graphql/schema/createReadSDL.js.map +1 -1
  829. package/graphql/schema/createSingularResolvers.d.ts +3 -2
  830. package/graphql/schema/createSingularResolvers.js +3 -3
  831. package/graphql/schema/createSingularResolvers.js.map +1 -1
  832. package/graphql/schema/createSingularSDL.d.ts +3 -2
  833. package/graphql/schema/createSingularSDL.js +5 -4
  834. package/graphql/schema/createSingularSDL.js.map +1 -1
  835. package/graphql/schema/resolvers/manage/normalizeGraphQlInput.js +9 -7
  836. package/graphql/schema/resolvers/manage/normalizeGraphQlInput.js.map +1 -1
  837. package/graphql/schema/resolvers/manage/resolveUpdateRevisionDescription.d.ts +8 -0
  838. package/graphql/schema/resolvers/manage/resolveUpdateRevisionDescription.js +13 -0
  839. package/graphql/schema/resolvers/manage/resolveUpdateRevisionDescription.js.map +1 -0
  840. package/graphql/schema/schemaPlugins.js +14 -17
  841. package/graphql/schema/schemaPlugins.js.map +1 -1
  842. package/index.d.ts +3 -5
  843. package/index.js +4 -7
  844. package/index.js.map +1 -1
  845. package/package.json +36 -32
  846. package/plugins/CmsModelPlugin.js +19 -4
  847. package/plugins/CmsModelPlugin.js.map +1 -1
  848. package/plugins/index.d.ts +0 -2
  849. package/plugins/index.js +0 -2
  850. package/plugins/index.js.map +1 -1
  851. package/types/context.d.ts +5 -5
  852. package/types/context.js.map +1 -1
  853. package/types/fields/objectField.d.ts +2 -0
  854. package/types/fields/objectField.js.map +1 -1
  855. package/types/model.d.ts +39 -3
  856. package/types/model.js.map +1 -1
  857. package/types/modelField.d.ts +47 -15
  858. package/types/modelField.js.map +1 -1
  859. package/types/plugins.d.ts +1 -305
  860. package/types/plugins.js.map +1 -1
  861. package/types/types.d.ts +28 -61
  862. package/types/types.js +0 -4
  863. package/types/types.js.map +1 -1
  864. package/utils/contentModelAst/CmsModelFieldToAstConverterFromPlugins.d.ts +3 -2
  865. package/utils/contentModelAst/CmsModelFieldToAstConverterFromPlugins.js +3 -3
  866. package/utils/contentModelAst/CmsModelFieldToAstConverterFromPlugins.js.map +1 -1
  867. package/utils/contentModelAst/CmsModelFieldToAstFromPlugin.d.ts +4 -3
  868. package/utils/contentModelAst/CmsModelFieldToAstFromPlugin.js +3 -3
  869. package/utils/contentModelAst/CmsModelFieldToAstFromPlugin.js.map +1 -1
  870. package/utils/converters/ConverterCollection.d.ts +2 -0
  871. package/utils/converters/ConverterCollection.js +3 -2
  872. package/utils/converters/ConverterCollection.js.map +1 -1
  873. package/utils/converters/types.js.map +1 -1
  874. package/utils/converters/valueKeyFromStorageConverter.d.ts +2 -0
  875. package/utils/converters/valueKeyFromStorageConverter.js +4 -2
  876. package/utils/converters/valueKeyFromStorageConverter.js.map +1 -1
  877. package/utils/converters/valueKeyStorageConverter.d.ts +2 -3
  878. package/utils/converters/valueKeyStorageConverter.js +7 -3
  879. package/utils/converters/valueKeyStorageConverter.js.map +1 -1
  880. package/utils/converters/valueKeyToStorageConverter.d.ts +2 -0
  881. package/utils/converters/valueKeyToStorageConverter.js +4 -2
  882. package/utils/converters/valueKeyToStorageConverter.js.map +1 -1
  883. package/utils/createModelField.js +10 -8
  884. package/utils/createModelField.js.map +1 -1
  885. package/utils/createTypeFromFields.d.ts +3 -2
  886. package/utils/createTypeFromFields.js +3 -3
  887. package/utils/createTypeFromFields.js.map +1 -1
  888. package/utils/entryStorage.d.ts +8 -15
  889. package/utils/entryStorage.js +31 -59
  890. package/utils/entryStorage.js.map +1 -1
  891. package/utils/getBaseFieldType.js +3 -0
  892. package/utils/getBaseFieldType.js.map +1 -1
  893. package/utils/getSchemaFromFieldPlugins.d.ts +3 -2
  894. package/utils/getSchemaFromFieldPlugins.js +5 -9
  895. package/utils/getSchemaFromFieldPlugins.js.map +1 -1
  896. package/utils/renderFields.d.ts +4 -3
  897. package/utils/renderFields.js +14 -9
  898. package/utils/renderFields.js.map +1 -1
  899. package/utils/renderGetFilterFields.d.ts +3 -2
  900. package/utils/renderGetFilterFields.js +2 -2
  901. package/utils/renderGetFilterFields.js.map +1 -1
  902. package/utils/renderInputFields.d.ts +4 -3
  903. package/utils/renderInputFields.js +5 -11
  904. package/utils/renderInputFields.js.map +1 -1
  905. package/utils/renderListFilterFields.d.ts +3 -2
  906. package/utils/renderListFilterFields.js +5 -3
  907. package/utils/renderListFilterFields.js.map +1 -1
  908. package/utils/renderSortEnum.d.ts +4 -4
  909. package/utils/renderSortEnum.js +11 -11
  910. package/utils/renderSortEnum.js.map +1 -1
  911. package/utils/toSlug.js +1 -1
  912. package/utils/toSlug.js.map +1 -1
  913. package/crud/contentEntry/entryDataFactories/state.d.ts +0 -10
  914. package/crud/contentEntry/entryDataFactories/state.js +0 -16
  915. package/crud/contentEntry/entryDataFactories/state.js.map +0 -1
  916. package/crud/contentModel/validateModel.d.ts +0 -9
  917. package/crud/contentModel/validateModel.js +0 -21
  918. package/crud/contentModel/validateModel.js.map +0 -1
  919. package/crud/contentModel/validateModelFields.d.ts +0 -9
  920. package/crud/contentModel/validateModelFields.js +0 -267
  921. package/crud/contentModel/validateModelFields.js.map +0 -1
  922. package/features/modelBuilder/fields/validators.js +0 -3
  923. package/features/modelBuilder/fields/validators.js.map +0 -1
  924. package/graphql/schema/createFieldTypePluginRecords.d.ts +0 -3
  925. package/graphql/schema/createFieldTypePluginRecords.js +0 -8
  926. package/graphql/schema/createFieldTypePluginRecords.js.map +0 -1
  927. package/graphqlFields/boolean.d.ts +0 -2
  928. package/graphqlFields/boolean.js +0 -52
  929. package/graphqlFields/boolean.js.map +0 -1
  930. package/graphqlFields/datetime.d.ts +0 -2
  931. package/graphqlFields/datetime.js +0 -71
  932. package/graphqlFields/datetime.js.map +0 -1
  933. package/graphqlFields/dynamicZone/dynamicZoneField.d.ts +0 -2
  934. package/graphqlFields/dynamicZone/dynamicZoneField.js +0 -313
  935. package/graphqlFields/dynamicZone/dynamicZoneField.js.map +0 -1
  936. package/graphqlFields/dynamicZone/index.d.ts +0 -1
  937. package/graphqlFields/dynamicZone/index.js +0 -3
  938. package/graphqlFields/dynamicZone/index.js.map +0 -1
  939. package/graphqlFields/file.d.ts +0 -2
  940. package/graphqlFields/file.js +0 -37
  941. package/graphqlFields/file.js.map +0 -1
  942. package/graphqlFields/helpers.js +0 -20
  943. package/graphqlFields/helpers.js.map +0 -1
  944. package/graphqlFields/index.d.ts +0 -2
  945. package/graphqlFields/index.js +0 -15
  946. package/graphqlFields/index.js.map +0 -1
  947. package/graphqlFields/json.d.ts +0 -2
  948. package/graphqlFields/json.js +0 -42
  949. package/graphqlFields/json.js.map +0 -1
  950. package/graphqlFields/longText.d.ts +0 -2
  951. package/graphqlFields/longText.js +0 -57
  952. package/graphqlFields/longText.js.map +0 -1
  953. package/graphqlFields/number.d.ts +0 -2
  954. package/graphqlFields/number.js +0 -63
  955. package/graphqlFields/number.js.map +0 -1
  956. package/graphqlFields/object.d.ts +0 -2
  957. package/graphqlFields/object.js +0 -245
  958. package/graphqlFields/object.js.map +0 -1
  959. package/graphqlFields/ref.d.ts +0 -2
  960. package/graphqlFields/ref.js +0 -286
  961. package/graphqlFields/ref.js.map +0 -1
  962. package/graphqlFields/richText/richTextResolver.js.map +0 -1
  963. package/graphqlFields/richText.d.ts +0 -2
  964. package/graphqlFields/richText.js +0 -48
  965. package/graphqlFields/richText.js.map +0 -1
  966. package/graphqlFields/searchableJson.d.ts +0 -2
  967. package/graphqlFields/searchableJson.js +0 -53
  968. package/graphqlFields/searchableJson.js.map +0 -1
  969. package/graphqlFields/text.d.ts +0 -2
  970. package/graphqlFields/text.js +0 -59
  971. package/graphqlFields/text.js.map +0 -1
  972. package/plugins/CmsGraphQLSchemaSorterPlugin.d.ts +0 -20
  973. package/plugins/CmsGraphQLSchemaSorterPlugin.js +0 -19
  974. package/plugins/CmsGraphQLSchemaSorterPlugin.js.map +0 -1
  975. package/plugins/StorageTransformPlugin.d.ts +0 -35
  976. package/plugins/StorageTransformPlugin.js +0 -26
  977. package/plugins/StorageTransformPlugin.js.map +0 -1
  978. package/storage/date.d.ts +0 -3
  979. package/storage/date.js +0 -110
  980. package/storage/date.js.map +0 -1
  981. package/storage/default.d.ts +0 -2
  982. package/storage/default.js +0 -19
  983. package/storage/default.js.map +0 -1
  984. package/storage/dynamicZone.d.ts +0 -2
  985. package/storage/dynamicZone.js +0 -149
  986. package/storage/dynamicZone.js.map +0 -1
  987. package/storage/index.d.ts +0 -1
  988. package/storage/index.js +0 -13
  989. package/storage/index.js.map +0 -1
  990. package/storage/json.d.ts +0 -2
  991. package/storage/json.js +0 -49
  992. package/storage/json.js.map +0 -1
  993. package/storage/object.d.ts +0 -2
  994. package/storage/object.js +0 -104
  995. package/storage/object.js.map +0 -1
  996. package/utils/contentEntryTraverser/ContentEntryTraverser.js.map +0 -1
  997. package/validators/dateGte.d.ts +0 -2
  998. package/validators/dateGte.js +0 -25
  999. package/validators/dateGte.js.map +0 -1
  1000. package/validators/dateLte.d.ts +0 -2
  1001. package/validators/dateLte.js +0 -25
  1002. package/validators/dateLte.js.map +0 -1
  1003. package/validators/gte.d.ts +0 -2
  1004. package/validators/gte.js +0 -22
  1005. package/validators/gte.js.map +0 -1
  1006. package/validators/in.d.ts +0 -2
  1007. package/validators/in.js +0 -22
  1008. package/validators/in.js.map +0 -1
  1009. package/validators/index.d.ts +0 -1
  1010. package/validators/index.js +0 -16
  1011. package/validators/index.js.map +0 -1
  1012. package/validators/lte.d.ts +0 -2
  1013. package/validators/lte.js +0 -22
  1014. package/validators/lte.js.map +0 -1
  1015. package/validators/maxLength.d.ts +0 -2
  1016. package/validators/maxLength.js +0 -22
  1017. package/validators/maxLength.js.map +0 -1
  1018. package/validators/minLength.d.ts +0 -2
  1019. package/validators/minLength.js +0 -22
  1020. package/validators/minLength.js.map +0 -1
  1021. package/validators/pattern.d.ts +0 -2
  1022. package/validators/pattern.js +0 -36
  1023. package/validators/pattern.js.map +0 -1
  1024. package/validators/patternPlugins/email.d.ts +0 -2
  1025. package/validators/patternPlugins/email.js +0 -13
  1026. package/validators/patternPlugins/email.js.map +0 -1
  1027. package/validators/patternPlugins/index.d.ts +0 -2
  1028. package/validators/patternPlugins/index.js +0 -11
  1029. package/validators/patternPlugins/index.js.map +0 -1
  1030. package/validators/patternPlugins/lowerCase.d.ts +0 -2
  1031. package/validators/patternPlugins/lowerCase.js +0 -13
  1032. package/validators/patternPlugins/lowerCase.js.map +0 -1
  1033. package/validators/patternPlugins/lowerCaseSpace.d.ts +0 -2
  1034. package/validators/patternPlugins/lowerCaseSpace.js +0 -13
  1035. package/validators/patternPlugins/lowerCaseSpace.js.map +0 -1
  1036. package/validators/patternPlugins/upperCase.d.ts +0 -2
  1037. package/validators/patternPlugins/upperCase.js +0 -13
  1038. package/validators/patternPlugins/upperCase.js.map +0 -1
  1039. package/validators/patternPlugins/upperCaseSpace.d.ts +0 -2
  1040. package/validators/patternPlugins/upperCaseSpace.js +0 -13
  1041. package/validators/patternPlugins/upperCaseSpace.js.map +0 -1
  1042. package/validators/patternPlugins/url.d.ts +0 -2
  1043. package/validators/patternPlugins/url.js +0 -13
  1044. package/validators/patternPlugins/url.js.map +0 -1
  1045. package/validators/required.d.ts +0 -2
  1046. package/validators/required.js +0 -17
  1047. package/validators/required.js.map +0 -1
  1048. package/validators/timeGte.d.ts +0 -2
  1049. package/validators/timeGte.js +0 -20
  1050. package/validators/timeGte.js.map +0 -1
  1051. package/validators/timeLte.d.ts +0 -2
  1052. package/validators/timeLte.js +0 -20
  1053. package/validators/timeLte.js.map +0 -1
  1054. package/validators/unique.d.ts +0 -6
  1055. package/validators/unique.js +0 -57
  1056. package/validators/unique.js.map +0 -1
@@ -1,149 +0,0 @@
1
- import { StorageTransformPlugin } from "../plugins/index.js";
2
- import pReduce from "p-reduce";
3
- const processToStorage = async params => {
4
- const {
5
- model,
6
- field: parentField,
7
- value: input,
8
- getStoragePlugin,
9
- plugins
10
- } = params;
11
- const output = structuredClone(input);
12
- if (!output._templateId) {
13
- return output;
14
- }
15
- const template = parentField.settings.templates.find(t => t.id === output._templateId);
16
- if (!template || !template.fields.length) {
17
- return output;
18
- }
19
- return await pReduce(template.fields, async (values, field) => {
20
- const value = values[field.fieldId];
21
- if (!value) {
22
- values[field.fieldId] = value;
23
- return values;
24
- }
25
- const plugin = getStoragePlugin(field.type);
26
- if (!plugin) {
27
- console.error(`Missing storage plugin for field type "${field.type}".`);
28
- delete values[field.fieldId];
29
- return values;
30
- }
31
- values[field.fieldId] = await plugin.toStorage({
32
- plugins,
33
- getStoragePlugin,
34
- model,
35
- field,
36
- value
37
- });
38
- return values;
39
- }, output);
40
- };
41
- const processFromStorage = async params => {
42
- const {
43
- model,
44
- field: parentField,
45
- value: input,
46
- getStoragePlugin,
47
- plugins
48
- } = params;
49
- const output = structuredClone(input);
50
- if (!output._templateId) {
51
- return output;
52
- }
53
- const template = parentField.settings.templates.find(t => t.id === output._templateId);
54
- if (!template || !template.fields.length) {
55
- return output;
56
- }
57
- return await pReduce(template.fields, async (values, field) => {
58
- const value = values[field.fieldId];
59
- if (!value) {
60
- return values;
61
- }
62
- const plugin = getStoragePlugin(field.type);
63
- if (!plugin) {
64
- console.error(`Missing storage plugin for field type "${field.type}".`);
65
- delete values[field.fieldId];
66
- return values;
67
- }
68
- values[field.fieldId] = await plugin.fromStorage({
69
- plugins,
70
- getStoragePlugin,
71
- model,
72
- field,
73
- value
74
- });
75
- return values;
76
- }, output);
77
- };
78
- export const createDynamicZoneStorageTransform = () => {
79
- return new StorageTransformPlugin({
80
- name: "headless-cms.storage-transform.dynamicZone.default",
81
- fieldType: "dynamicZone",
82
- toStorage: async ({
83
- field,
84
- value: input,
85
- getStoragePlugin,
86
- model,
87
- plugins
88
- }) => {
89
- if (!input) {
90
- return input;
91
- } else if (field.multipleValues) {
92
- if (!Array.isArray(input)) {
93
- return input;
94
- }
95
- const values = input;
96
- return Promise.all(values.map(async value => {
97
- return await processToStorage({
98
- model,
99
- field: field,
100
- value,
101
- getStoragePlugin,
102
- plugins
103
- });
104
- }));
105
- }
106
- return await processToStorage({
107
- model,
108
- field: field,
109
- value: input,
110
- getStoragePlugin,
111
- plugins
112
- });
113
- },
114
- fromStorage: async ({
115
- field,
116
- value: input,
117
- getStoragePlugin,
118
- model,
119
- plugins
120
- }) => {
121
- if (!input) {
122
- return input;
123
- } else if (field.multipleValues) {
124
- if (!Array.isArray(input)) {
125
- return input;
126
- }
127
- const values = input;
128
- return await Promise.all(values.map(async value => {
129
- return await processFromStorage({
130
- model,
131
- field: field,
132
- value,
133
- getStoragePlugin,
134
- plugins
135
- });
136
- }));
137
- }
138
- return await processFromStorage({
139
- model,
140
- field: field,
141
- value: input,
142
- getStoragePlugin,
143
- plugins
144
- });
145
- }
146
- });
147
- };
148
-
149
- //# sourceMappingURL=dynamicZone.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["StorageTransformPlugin","pReduce","processToStorage","params","model","field","parentField","value","input","getStoragePlugin","plugins","output","structuredClone","_templateId","template","settings","templates","find","t","id","fields","length","values","fieldId","plugin","type","console","error","toStorage","processFromStorage","fromStorage","createDynamicZoneStorageTransform","name","fieldType","multipleValues","Array","isArray","Promise","all","map"],"sources":["dynamicZone.ts"],"sourcesContent":["import type { ToStorageParams } from \"~/plugins/index.js\";\nimport { StorageTransformPlugin } from \"~/plugins/index.js\";\nimport type { GenericRecord } from \"@webiny/api/types.js\";\nimport type { CmsModel, CmsModelDynamicZoneField, CmsModelField } from \"~/types/index.js\";\nimport type { PluginsContainer } from \"@webiny/plugins\";\nimport pReduce from \"p-reduce\";\n\ninterface IProcessParams {\n model: CmsModel;\n field: CmsModelDynamicZoneField;\n value: GenericRecord;\n getStoragePlugin: ToStorageParams<GenericRecord, CmsModelField>[\"getStoragePlugin\"];\n plugins: PluginsContainer;\n}\n\nconst processToStorage = async (params: IProcessParams): Promise<GenericRecord> => {\n const { model, field: parentField, value: input, getStoragePlugin, plugins } = params;\n\n const output: GenericRecord = structuredClone(input);\n\n if (!output._templateId) {\n return output;\n }\n const template = parentField.settings.templates.find(t => t.id === output._templateId);\n if (!template || !template.fields.length) {\n return output;\n }\n\n return await pReduce(\n template.fields,\n async (values, field) => {\n const value = values[field.fieldId];\n\n if (!value) {\n values[field.fieldId] = value;\n return values;\n }\n const plugin = getStoragePlugin(field.type);\n if (!plugin) {\n console.error(`Missing storage plugin for field type \"${field.type}\".`);\n delete values[field.fieldId];\n return values;\n }\n values[field.fieldId] = await plugin.toStorage({\n plugins,\n getStoragePlugin,\n model,\n field,\n value\n });\n\n return values;\n },\n output\n );\n};\n\nconst processFromStorage = async (params: IProcessParams): Promise<GenericRecord> => {\n const { model, field: parentField, value: input, getStoragePlugin, plugins } = params;\n\n const output: GenericRecord = structuredClone(input);\n\n if (!output._templateId) {\n return output;\n }\n const template = parentField.settings.templates.find(t => t.id === output._templateId);\n if (!template || !template.fields.length) {\n return output;\n }\n\n return await pReduce(\n template.fields,\n async (values, field) => {\n const value = values[field.fieldId];\n\n if (!value) {\n return values;\n }\n const plugin = getStoragePlugin(field.type);\n if (!plugin) {\n console.error(`Missing storage plugin for field type \"${field.type}\".`);\n delete values[field.fieldId];\n return values;\n }\n values[field.fieldId] = await plugin.fromStorage({\n plugins,\n getStoragePlugin,\n model,\n field,\n value\n });\n\n return values;\n },\n output\n );\n};\n\nexport const createDynamicZoneStorageTransform = (): StorageTransformPlugin => {\n return new StorageTransformPlugin({\n name: \"headless-cms.storage-transform.dynamicZone.default\",\n fieldType: \"dynamicZone\",\n toStorage: async ({ field, value: input, getStoragePlugin, model, plugins }) => {\n if (!input) {\n return input;\n } else if (field.multipleValues) {\n if (!Array.isArray(input)) {\n return input;\n }\n const values = input as GenericRecord[];\n return Promise.all(\n values.map(async value => {\n return await processToStorage({\n model,\n field: field as CmsModelDynamicZoneField,\n value,\n getStoragePlugin,\n plugins\n });\n })\n );\n }\n return await processToStorage({\n model,\n field: field as CmsModelDynamicZoneField,\n value: input,\n getStoragePlugin,\n plugins\n });\n },\n fromStorage: async ({ field, value: input, getStoragePlugin, model, plugins }) => {\n if (!input) {\n return input;\n } else if (field.multipleValues) {\n if (!Array.isArray(input)) {\n return input;\n }\n const values = input as GenericRecord[];\n\n return await Promise.all(\n values.map(async value => {\n return await processFromStorage({\n model,\n field: field as CmsModelDynamicZoneField,\n value,\n getStoragePlugin,\n plugins\n });\n })\n );\n }\n return await processFromStorage({\n model,\n field: field as CmsModelDynamicZoneField,\n value: input,\n getStoragePlugin,\n plugins\n });\n }\n });\n};\n"],"mappings":"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","ignoreList":[]}
@@ -1 +0,0 @@
1
- export declare const createStorageTransform: () => import("../index.js").StorageTransformPlugin<any, any, import("../types/modelField.js").CmsModelField>[];
package/storage/index.js DELETED
@@ -1,13 +0,0 @@
1
- /**
2
- * Storage transforms are used to transform the data before it is saved to the database and after it is read from the database.
3
- */
4
- import { createDefaultStorageTransform } from "./default.js";
5
- import { createObjectStorageTransform } from "./object.js";
6
- import { createJsonStorageTransform } from "./json.js";
7
- import { createDynamicZoneStorageTransform } from "./dynamicZone.js";
8
- import { createDateStorageTransformPlugin } from "./date.js";
9
- export const createStorageTransform = () => {
10
- return [createDefaultStorageTransform(), createDateStorageTransformPlugin(), createObjectStorageTransform(), createJsonStorageTransform(), createDynamicZoneStorageTransform()];
11
- };
12
-
13
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["createDefaultStorageTransform","createObjectStorageTransform","createJsonStorageTransform","createDynamicZoneStorageTransform","createDateStorageTransformPlugin","createStorageTransform"],"sources":["index.ts"],"sourcesContent":["/**\n * Storage transforms are used to transform the data before it is saved to the database and after it is read from the database.\n */\nimport { createDefaultStorageTransform } from \"./default.js\";\nimport { createObjectStorageTransform } from \"./object.js\";\nimport { createJsonStorageTransform } from \"./json.js\";\nimport { createDynamicZoneStorageTransform } from \"./dynamicZone.js\";\nimport { createDateStorageTransformPlugin } from \"./date.js\";\n\nexport const createStorageTransform = () => {\n return [\n createDefaultStorageTransform(),\n createDateStorageTransformPlugin(),\n createObjectStorageTransform(),\n createJsonStorageTransform(),\n createDynamicZoneStorageTransform()\n ];\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,6BAA6B;AACtC,SAASC,4BAA4B;AACrC,SAASC,0BAA0B;AACnC,SAASC,iCAAiC;AAC1C,SAASC,gCAAgC;AAEzC,OAAO,MAAMC,sBAAsB,GAAGA,CAAA,KAAM;EACxC,OAAO,CACHL,6BAA6B,CAAC,CAAC,EAC/BI,gCAAgC,CAAC,CAAC,EAClCH,4BAA4B,CAAC,CAAC,EAC9BC,0BAA0B,CAAC,CAAC,EAC5BC,iCAAiC,CAAC,CAAC,CACtC;AACL,CAAC","ignoreList":[]}
package/storage/json.d.ts DELETED
@@ -1,2 +0,0 @@
1
- import { StorageTransformPlugin } from "../plugins/StorageTransformPlugin.js";
2
- export declare const createJsonStorageTransform: () => StorageTransformPlugin;
package/storage/json.js DELETED
@@ -1,49 +0,0 @@
1
- import { StorageTransformPlugin } from "../plugins/StorageTransformPlugin.js";
2
- import { CompressorPlugin } from "@webiny/api";
3
- import { WebinyError } from "@webiny/error";
4
- export const createJsonStorageTransform = () => {
5
- return new StorageTransformPlugin({
6
- name: "headless-cms.storage-transform.json",
7
- fieldType: "json",
8
- fromStorage: async ({
9
- field,
10
- value: storageValue,
11
- plugins
12
- }) => {
13
- if (!storageValue) {
14
- return storageValue;
15
- } else if (typeof storageValue !== "object") {
16
- throw new WebinyError(`JSON value received in "fromStorage" function is not an object in field "${field.storageId}" - ${field.fieldId}.`);
17
- }
18
- let compressor;
19
- try {
20
- compressor = plugins.oneByType(CompressorPlugin.type);
21
- } catch {
22
- return storageValue;
23
- }
24
- try {
25
- return await compressor.getCompressor().decompress(storageValue);
26
- } catch {
27
- return storageValue;
28
- }
29
- },
30
- toStorage: async ({
31
- value,
32
- plugins
33
- }) => {
34
- let compressor;
35
- try {
36
- compressor = plugins.oneByType(CompressorPlugin.type);
37
- } catch {
38
- return value;
39
- }
40
- try {
41
- return await compressor.getCompressor().compress(value);
42
- } catch {
43
- return value;
44
- }
45
- }
46
- });
47
- };
48
-
49
- //# sourceMappingURL=json.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["StorageTransformPlugin","CompressorPlugin","WebinyError","createJsonStorageTransform","name","fieldType","fromStorage","field","value","storageValue","plugins","storageId","fieldId","compressor","oneByType","type","getCompressor","decompress","toStorage","compress"],"sources":["json.ts"],"sourcesContent":["import { StorageTransformPlugin } from \"~/plugins/StorageTransformPlugin.js\";\nimport { CompressorPlugin } from \"@webiny/api\";\nimport { WebinyError } from \"@webiny/error\";\n\nexport const createJsonStorageTransform = (): StorageTransformPlugin => {\n return new StorageTransformPlugin({\n name: \"headless-cms.storage-transform.json\",\n fieldType: \"json\",\n fromStorage: async ({ field, value: storageValue, plugins }) => {\n if (!storageValue) {\n return storageValue;\n } else if (typeof storageValue !== \"object\") {\n throw new WebinyError(\n `JSON value received in \"fromStorage\" function is not an object in field \"${field.storageId}\" - ${field.fieldId}.`\n );\n }\n\n let compressor: CompressorPlugin;\n\n try {\n compressor = plugins.oneByType<CompressorPlugin>(CompressorPlugin.type);\n } catch {\n return storageValue;\n }\n\n try {\n return await compressor.getCompressor().decompress(storageValue);\n } catch {\n return storageValue;\n }\n },\n toStorage: async ({ value, plugins }) => {\n let compressor: CompressorPlugin;\n\n try {\n compressor = plugins.oneByType<CompressorPlugin>(CompressorPlugin.type);\n } catch {\n return value;\n }\n try {\n return await compressor.getCompressor().compress(value);\n } catch {\n return value;\n }\n }\n });\n};\n"],"mappings":"AAAA,SAASA,sBAAsB;AAC/B,SAASC,gBAAgB,QAAQ,aAAa;AAC9C,SAASC,WAAW,QAAQ,eAAe;AAE3C,OAAO,MAAMC,0BAA0B,GAAGA,CAAA,KAA8B;EACpE,OAAO,IAAIH,sBAAsB,CAAC;IAC9BI,IAAI,EAAE,qCAAqC;IAC3CC,SAAS,EAAE,MAAM;IACjBC,WAAW,EAAE,MAAAA,CAAO;MAAEC,KAAK;MAAEC,KAAK,EAAEC,YAAY;MAAEC;IAAQ,CAAC,KAAK;MAC5D,IAAI,CAACD,YAAY,EAAE;QACf,OAAOA,YAAY;MACvB,CAAC,MAAM,IAAI,OAAOA,YAAY,KAAK,QAAQ,EAAE;QACzC,MAAM,IAAIP,WAAW,CACjB,4EAA4EK,KAAK,CAACI,SAAS,OAAOJ,KAAK,CAACK,OAAO,GACnH,CAAC;MACL;MAEA,IAAIC,UAA4B;MAEhC,IAAI;QACAA,UAAU,GAAGH,OAAO,CAACI,SAAS,CAAmBb,gBAAgB,CAACc,IAAI,CAAC;MAC3E,CAAC,CAAC,MAAM;QACJ,OAAON,YAAY;MACvB;MAEA,IAAI;QACA,OAAO,MAAMI,UAAU,CAACG,aAAa,CAAC,CAAC,CAACC,UAAU,CAACR,YAAY,CAAC;MACpE,CAAC,CAAC,MAAM;QACJ,OAAOA,YAAY;MACvB;IACJ,CAAC;IACDS,SAAS,EAAE,MAAAA,CAAO;MAAEV,KAAK;MAAEE;IAAQ,CAAC,KAAK;MACrC,IAAIG,UAA4B;MAEhC,IAAI;QACAA,UAAU,GAAGH,OAAO,CAACI,SAAS,CAAmBb,gBAAgB,CAACc,IAAI,CAAC;MAC3E,CAAC,CAAC,MAAM;QACJ,OAAOP,KAAK;MAChB;MACA,IAAI;QACA,OAAO,MAAMK,UAAU,CAACG,aAAa,CAAC,CAAC,CAACG,QAAQ,CAACX,KAAK,CAAC;MAC3D,CAAC,CAAC,MAAM;QACJ,OAAOA,KAAK;MAChB;IACJ;EACJ,CAAC,CAAC;AACN,CAAC","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import { StorageTransformPlugin } from "../plugins/StorageTransformPlugin.js";
2
- export declare const createObjectStorageTransform: () => StorageTransformPlugin;
package/storage/object.js DELETED
@@ -1,104 +0,0 @@
1
- import pReduce from "p-reduce";
2
- import pMap from "p-map";
3
- import { StorageTransformPlugin } from "../plugins/StorageTransformPlugin.js";
4
- import { getBaseFieldType } from "../utils/getBaseFieldType.js";
5
- const processValue = async params => {
6
- const {
7
- fields,
8
- sourceValue,
9
- getStoragePlugin,
10
- plugins,
11
- model,
12
- operation
13
- } = params;
14
- return await pReduce(fields, async (values, field) => {
15
- const baseType = getBaseFieldType(field);
16
- const plugin = getStoragePlugin(baseType);
17
- if (!plugin) {
18
- throw new Error(`Missing storage plugin for field type "${baseType}".`);
19
- }
20
- const input = sourceValue[field.fieldId];
21
- const value = await plugin[operation]({
22
- plugins,
23
- model,
24
- field,
25
- value: input,
26
- getStoragePlugin
27
- });
28
- return {
29
- ...values,
30
- [field.fieldId]: value
31
- };
32
- }, {});
33
- };
34
- export const createObjectStorageTransform = () => {
35
- return new StorageTransformPlugin({
36
- name: "headless-cms.storage-transform.object.default",
37
- fieldType: "object",
38
- toStorage: async ({
39
- field,
40
- value,
41
- getStoragePlugin,
42
- model,
43
- plugins
44
- }) => {
45
- if (!value) {
46
- return null;
47
- }
48
- const fields = field.settings?.fields || [];
49
- if (field.multipleValues) {
50
- return await pMap(value, value => processValue({
51
- sourceValue: value,
52
- getStoragePlugin,
53
- model,
54
- plugins,
55
- operation: "toStorage",
56
- fields
57
- }));
58
- }
59
- return await processValue({
60
- sourceValue: value,
61
- getStoragePlugin,
62
- model,
63
- plugins,
64
- operation: "toStorage",
65
- fields
66
- });
67
- },
68
- fromStorage: async ({
69
- field,
70
- value: input,
71
- getStoragePlugin,
72
- plugins,
73
- model
74
- }) => {
75
- if (!input) {
76
- return null;
77
- }
78
- const fields = field.settings?.fields || [];
79
- if (field.multipleValues) {
80
- const values = input;
81
- return await Promise.all(values.map(async value => {
82
- return await processValue({
83
- sourceValue: value,
84
- getStoragePlugin,
85
- model,
86
- plugins,
87
- operation: "fromStorage",
88
- fields
89
- });
90
- }));
91
- }
92
- return await processValue({
93
- sourceValue: input,
94
- getStoragePlugin,
95
- model,
96
- plugins,
97
- operation: "fromStorage",
98
- fields
99
- });
100
- }
101
- });
102
- };
103
-
104
- //# sourceMappingURL=object.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["pReduce","pMap","StorageTransformPlugin","getBaseFieldType","processValue","params","fields","sourceValue","getStoragePlugin","plugins","model","operation","values","field","baseType","plugin","Error","input","fieldId","value","createObjectStorageTransform","name","fieldType","toStorage","settings","multipleValues","fromStorage","Promise","all","map"],"sources":["object.ts"],"sourcesContent":["import pReduce from \"p-reduce\";\nimport pMap from \"p-map\";\nimport type { CmsModel, CmsModelField } from \"~/types/index.js\";\nimport type { PluginsContainer } from \"@webiny/plugins\";\nimport { StorageTransformPlugin } from \"~/plugins/StorageTransformPlugin.js\";\nimport { getBaseFieldType } from \"~/utils/getBaseFieldType.js\";\nimport type { GenericRecord } from \"@webiny/api/types.js\";\n\ninterface ProcessValueParams {\n fields: CmsModelField[];\n sourceValue: GenericRecord;\n getStoragePlugin: (fieldType: string) => StorageTransformPlugin;\n plugins: PluginsContainer;\n model: CmsModel;\n operation: \"toStorage\" | \"fromStorage\";\n}\ninterface ProcessValue {\n (params: ProcessValueParams): Promise<GenericRecord>;\n}\n\nconst processValue: ProcessValue = async params => {\n const { fields, sourceValue, getStoragePlugin, plugins, model, operation } = params;\n return await pReduce(\n fields,\n async (values, field) => {\n const baseType = getBaseFieldType(field);\n const plugin = getStoragePlugin(baseType);\n if (!plugin) {\n throw new Error(`Missing storage plugin for field type \"${baseType}\".`);\n }\n const input = sourceValue[field.fieldId];\n const value = await plugin[operation]({\n plugins,\n model,\n field,\n value: input,\n getStoragePlugin\n });\n return { ...values, [field.fieldId]: value };\n },\n {}\n );\n};\n\nexport const createObjectStorageTransform = (): StorageTransformPlugin => {\n return new StorageTransformPlugin({\n name: \"headless-cms.storage-transform.object.default\",\n fieldType: \"object\",\n toStorage: async ({ field, value, getStoragePlugin, model, plugins }) => {\n if (!value) {\n return null;\n }\n\n const fields = (field.settings?.fields || []) as CmsModelField[];\n\n if (field.multipleValues) {\n return await pMap(value as GenericRecord[], value =>\n processValue({\n sourceValue: value,\n getStoragePlugin,\n model,\n plugins,\n operation: \"toStorage\",\n fields\n })\n );\n }\n\n return await processValue({\n sourceValue: value,\n getStoragePlugin,\n model,\n plugins,\n operation: \"toStorage\",\n fields\n });\n },\n fromStorage: async ({ field, value: input, getStoragePlugin, plugins, model }) => {\n if (!input) {\n return null;\n }\n\n const fields = (field.settings?.fields || []) as CmsModelField[];\n\n if (field.multipleValues) {\n const values = input as GenericRecord[];\n\n return await Promise.all(\n values.map(async value => {\n return await processValue({\n sourceValue: value,\n getStoragePlugin,\n model,\n plugins,\n operation: \"fromStorage\",\n fields\n });\n })\n );\n }\n\n return await processValue({\n sourceValue: input,\n getStoragePlugin,\n model,\n plugins,\n operation: \"fromStorage\",\n fields\n });\n }\n });\n};\n"],"mappings":"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","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["nodeHasChildren","node","children","length","childrenAreCollections","every","type","ContentEntryTraverser","constructor","modelAst","traverse","values","visitor","visitTree","root","path","context","parent","field","getFieldFromNode","fieldIdKey","fieldId","value","undefined","fieldPath","join","multipleValues","arrayValue","ensureArray","i","findCollectionAndVisit","toString","Array","isArray","collection","find","child","discriminator","id"],"sources":["ContentEntryTraverser.ts"],"sourcesContent":["import type {\n CmsEntryValues,\n CmsModelAst,\n CmsModelFieldAstNode,\n CmsModelFieldAstNodeCollection,\n CmsModelFieldAstNodeField,\n ContentEntryValueVisitor\n} from \"~/types/index.js\";\n\ntype ParentNode = CmsModelAst | CmsModelFieldAstNode | null;\n\ntype VisitorContext = {\n node: CmsModelFieldAstNode;\n parent: ParentNode;\n};\n\nconst nodeHasChildren = (node: CmsModelFieldAstNode) => {\n return node.children.length > 0;\n};\n\ninterface NodeWithCollections extends CmsModelFieldAstNodeField {\n children: CmsModelFieldAstNodeCollection[];\n}\n\nconst childrenAreCollections = (node: CmsModelFieldAstNode): node is NodeWithCollections => {\n return node.children.every(node => node.type === \"collection\");\n};\n\nexport interface IContentEntryTraverser {\n traverse(values: CmsEntryValues, visitor: ContentEntryValueVisitor): Promise<void>;\n}\n\nexport class ContentEntryTraverser implements IContentEntryTraverser {\n private readonly modelAst: CmsModelAst;\n\n constructor(modelAst: CmsModelAst) {\n this.modelAst = modelAst;\n }\n\n async traverse<T extends CmsEntryValues = CmsEntryValues>(\n values: T,\n visitor: ContentEntryValueVisitor\n ) {\n await this.visitTree<T>(this.modelAst, values, [], visitor);\n }\n\n private async visitTree<T extends CmsEntryValues = CmsEntryValues>(\n root: CmsModelAst | CmsModelFieldAstNode,\n values: T,\n path: string[],\n visitor: ContentEntryValueVisitor\n ) {\n for (const node of root.children) {\n const context: VisitorContext = { node, parent: root };\n const field = this.getFieldFromNode(context);\n const fieldIdKey = field.fieldId as keyof T;\n let value = values[fieldIdKey];\n\n // We do not descend into nodes if they're `null` or `undefined`.\n if (nodeHasChildren(node) && (value === null || value === undefined)) {\n continue;\n }\n\n // We do not visit leaf nodes that are `undefined`.\n if (!nodeHasChildren(node) && value === undefined) {\n continue;\n }\n\n const fieldPath = [...path, field.fieldId];\n\n await visitor(\n {\n field,\n value,\n path: fieldPath.join(\".\")\n },\n context\n );\n\n // Refetch the value from the original input, in case the value changed within the visitor.\n value = values[fieldIdKey];\n\n if (nodeHasChildren(node) && childrenAreCollections(node)) {\n if (field.multipleValues) {\n const arrayValue = this.ensureArray(value);\n for (let i = 0; i < arrayValue.length; i++) {\n await this.findCollectionAndVisit<T>(\n node,\n arrayValue[i],\n [...fieldPath, i.toString()],\n visitor\n );\n }\n continue;\n }\n await this.findCollectionAndVisit<T>(node, value as T, fieldPath, visitor);\n }\n\n if (field.multipleValues) {\n const arrayValue = this.ensureArray(value);\n for (let i = 0; i < arrayValue.length; i++) {\n await this.visitTree(\n node,\n arrayValue[i],\n [...fieldPath, i.toString()],\n visitor\n );\n }\n continue;\n }\n\n await this.visitTree<T>(node, value as T, fieldPath, visitor);\n }\n }\n\n private ensureArray(value: any) {\n if (!Array.isArray(value)) {\n return [];\n }\n\n return value;\n }\n\n private findCollectionAndVisit<T extends CmsEntryValues = CmsEntryValues>(\n node: NodeWithCollections,\n values: T,\n path: string[],\n visitor: ContentEntryValueVisitor\n ) {\n const collection = node.children.find(child => {\n // Use the `discriminator` to find the correct value.\n return values[child.collection.discriminator as keyof T] === child.collection.id;\n });\n\n if (!collection) {\n return;\n }\n\n return this.visitTree(collection, values, path, visitor);\n }\n\n private getFieldFromNode({ node, parent }: VisitorContext) {\n if (node.type === \"collection\") {\n return (parent as CmsModelFieldAstNodeField).field;\n }\n\n return (node as CmsModelFieldAstNodeField).field;\n }\n}\n"],"mappings":"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","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import type { CmsModelFieldValidatorPlugin } from "../types/index.js";
2
- export declare const createDateGteValidator: () => CmsModelFieldValidatorPlugin;
@@ -1,25 +0,0 @@
1
- import { validation } from "@webiny/validation";
2
- export const createDateGteValidator = () => ({
3
- type: "cms-model-field-validator",
4
- name: "cms-model-field-validator-date-gte",
5
- validator: {
6
- name: "dateGte",
7
- async validate({
8
- value,
9
- validator
10
- }) {
11
- const {
12
- value: gteValue,
13
- type
14
- } = validator.settings || {};
15
- if (typeof gteValue === "undefined") {
16
- return true;
17
- } else if (type === "time") {
18
- return validation.validate(value, `timeGte:${gteValue}`).then(v => v === true).catch(() => false);
19
- }
20
- return validation.validate(value, `dateGte:${gteValue}`).then(v => v === true).catch(() => false);
21
- }
22
- }
23
- });
24
-
25
- //# sourceMappingURL=dateGte.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["validation","createDateGteValidator","type","name","validator","validate","value","gteValue","settings","then","v","catch"],"sources":["dateGte.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport type { CmsModelFieldValidatorPlugin } from \"~/types/index.js\";\n\nexport const createDateGteValidator = (): CmsModelFieldValidatorPlugin => ({\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-date-gte\",\n validator: {\n name: \"dateGte\",\n async validate({ value, validator }) {\n const { value: gteValue, type } = validator.settings || {};\n if (typeof gteValue === \"undefined\") {\n return true;\n } else if (type === \"time\") {\n return validation\n .validate(value, `timeGte:${gteValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n return validation\n .validate(value, `dateGte:${gteValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n }\n});\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,oBAAoB;AAG/C,OAAO,MAAMC,sBAAsB,GAAGA,CAAA,MAAqC;EACvEC,IAAI,EAAE,2BAA2B;EACjCC,IAAI,EAAE,oCAAoC;EAC1CC,SAAS,EAAE;IACPD,IAAI,EAAE,SAAS;IACf,MAAME,QAAQA,CAAC;MAAEC,KAAK;MAAEF;IAAU,CAAC,EAAE;MACjC,MAAM;QAAEE,KAAK,EAAEC,QAAQ;QAAEL;MAAK,CAAC,GAAGE,SAAS,CAACI,QAAQ,IAAI,CAAC,CAAC;MAC1D,IAAI,OAAOD,QAAQ,KAAK,WAAW,EAAE;QACjC,OAAO,IAAI;MACf,CAAC,MAAM,IAAIL,IAAI,KAAK,MAAM,EAAE;QACxB,OAAOF,UAAU,CACZK,QAAQ,CAACC,KAAK,EAAE,WAAWC,QAAQ,EAAE,CAAC,CACtCE,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;MAC3B;MACA,OAAOX,UAAU,CACZK,QAAQ,CAACC,KAAK,EAAE,WAAWC,QAAQ,EAAE,CAAC,CACtCE,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;IAC3B;EACJ;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import type { CmsModelFieldValidatorPlugin } from "../types/index.js";
2
- export declare const createDateLteValidator: () => CmsModelFieldValidatorPlugin;
@@ -1,25 +0,0 @@
1
- import { validation } from "@webiny/validation";
2
- export const createDateLteValidator = () => ({
3
- type: "cms-model-field-validator",
4
- name: "cms-model-field-validator-date-lte",
5
- validator: {
6
- name: "dateLte",
7
- async validate({
8
- value,
9
- validator
10
- }) {
11
- const {
12
- value: lteValue,
13
- type
14
- } = validator.settings || {};
15
- if (typeof lteValue === "undefined") {
16
- return true;
17
- } else if (type === "time") {
18
- return validation.validate(value, `timeLte:${lteValue}`).then(v => v === true).catch(() => false);
19
- }
20
- return validation.validate(value, `dateLte:${lteValue}`).then(v => v === true).catch(() => false);
21
- }
22
- }
23
- });
24
-
25
- //# sourceMappingURL=dateLte.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["validation","createDateLteValidator","type","name","validator","validate","value","lteValue","settings","then","v","catch"],"sources":["dateLte.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport type { CmsModelFieldValidatorPlugin } from \"~/types/index.js\";\n\nexport const createDateLteValidator = (): CmsModelFieldValidatorPlugin => ({\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-date-lte\",\n validator: {\n name: \"dateLte\",\n async validate({ value, validator }) {\n const { value: lteValue, type } = validator.settings || {};\n if (typeof lteValue === \"undefined\") {\n return true;\n } else if (type === \"time\") {\n return validation\n .validate(value, `timeLte:${lteValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n return validation\n .validate(value, `dateLte:${lteValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n }\n});\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,oBAAoB;AAG/C,OAAO,MAAMC,sBAAsB,GAAGA,CAAA,MAAqC;EACvEC,IAAI,EAAE,2BAA2B;EACjCC,IAAI,EAAE,oCAAoC;EAC1CC,SAAS,EAAE;IACPD,IAAI,EAAE,SAAS;IACf,MAAME,QAAQA,CAAC;MAAEC,KAAK;MAAEF;IAAU,CAAC,EAAE;MACjC,MAAM;QAAEE,KAAK,EAAEC,QAAQ;QAAEL;MAAK,CAAC,GAAGE,SAAS,CAACI,QAAQ,IAAI,CAAC,CAAC;MAC1D,IAAI,OAAOD,QAAQ,KAAK,WAAW,EAAE;QACjC,OAAO,IAAI;MACf,CAAC,MAAM,IAAIL,IAAI,KAAK,MAAM,EAAE;QACxB,OAAOF,UAAU,CACZK,QAAQ,CAACC,KAAK,EAAE,WAAWC,QAAQ,EAAE,CAAC,CACtCE,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;MAC3B;MACA,OAAOX,UAAU,CACZK,QAAQ,CAACC,KAAK,EAAE,WAAWC,QAAQ,EAAE,CAAC,CACtCE,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;IAC3B;EACJ;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import type { CmsModelFieldValidatorPlugin } from "../types/index.js";
2
- export declare const createGteValidator: () => CmsModelFieldValidatorPlugin;
package/validators/gte.js DELETED
@@ -1,22 +0,0 @@
1
- import { validation } from "@webiny/validation";
2
- export const createGteValidator = () => {
3
- return {
4
- type: "cms-model-field-validator",
5
- name: "cms-model-field-validator-gte",
6
- validator: {
7
- name: "gte",
8
- validate({
9
- value,
10
- validator
11
- }) {
12
- const gteValue = validator.settings?.value;
13
- if (typeof gteValue !== "undefined") {
14
- return validation.validate(value, `gte:${gteValue}`).then(v => v === true).catch(() => false);
15
- }
16
- return Promise.resolve(true);
17
- }
18
- }
19
- };
20
- };
21
-
22
- //# sourceMappingURL=gte.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["validation","createGteValidator","type","name","validator","validate","value","gteValue","settings","then","v","catch","Promise","resolve"],"sources":["gte.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport type { CmsModelFieldValidatorPlugin } from \"~/types/index.js\";\n\nexport const createGteValidator = (): CmsModelFieldValidatorPlugin => {\n return {\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-gte\",\n validator: {\n name: \"gte\",\n validate({ value, validator }) {\n const gteValue = validator.settings?.value;\n if (typeof gteValue !== \"undefined\") {\n return validation\n .validate(value, `gte:${gteValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n return Promise.resolve(true);\n }\n }\n };\n};\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,oBAAoB;AAG/C,OAAO,MAAMC,kBAAkB,GAAGA,CAAA,KAAoC;EAClE,OAAO;IACHC,IAAI,EAAE,2BAA2B;IACjCC,IAAI,EAAE,+BAA+B;IACrCC,SAAS,EAAE;MACPD,IAAI,EAAE,KAAK;MACXE,QAAQA,CAAC;QAAEC,KAAK;QAAEF;MAAU,CAAC,EAAE;QAC3B,MAAMG,QAAQ,GAAGH,SAAS,CAACI,QAAQ,EAAEF,KAAK;QAC1C,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;UACjC,OAAOP,UAAU,CACZK,QAAQ,CAACC,KAAK,EAAE,OAAOC,QAAQ,EAAE,CAAC,CAClCE,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;QAC3B;QACA,OAAOC,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC;MAChC;IACJ;EACJ,CAAC;AACL,CAAC","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import type { CmsModelFieldValidatorPlugin } from "../types/index.js";
2
- export declare const createInValidator: () => CmsModelFieldValidatorPlugin;
package/validators/in.js DELETED
@@ -1,22 +0,0 @@
1
- import { validation } from "@webiny/validation";
2
- export const createInValidator = () => {
3
- return {
4
- type: "cms-model-field-validator",
5
- name: "cms-model-field-validator-in",
6
- validator: {
7
- name: "in",
8
- validate({
9
- value,
10
- validator
11
- }) {
12
- const values = validator.settings?.values;
13
- if (Array.isArray(values)) {
14
- return validation.validate(value, `in:${values.join(":")}`).then(v => v === true).catch(() => false);
15
- }
16
- return Promise.resolve(true);
17
- }
18
- }
19
- };
20
- };
21
-
22
- //# sourceMappingURL=in.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["validation","createInValidator","type","name","validator","validate","value","values","settings","Array","isArray","join","then","v","catch","Promise","resolve"],"sources":["in.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport type { CmsModelFieldValidatorPlugin } from \"~/types/index.js\";\n\nexport const createInValidator = (): CmsModelFieldValidatorPlugin => {\n return {\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-in\",\n validator: {\n name: \"in\",\n validate({ value, validator }) {\n const values = validator.settings?.values;\n if (Array.isArray(values)) {\n return validation\n .validate(value, `in:${values.join(\":\")}`)\n .then(v => v === true)\n .catch(() => false);\n }\n\n return Promise.resolve(true);\n }\n }\n };\n};\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,oBAAoB;AAG/C,OAAO,MAAMC,iBAAiB,GAAGA,CAAA,KAAoC;EACjE,OAAO;IACHC,IAAI,EAAE,2BAA2B;IACjCC,IAAI,EAAE,8BAA8B;IACpCC,SAAS,EAAE;MACPD,IAAI,EAAE,IAAI;MACVE,QAAQA,CAAC;QAAEC,KAAK;QAAEF;MAAU,CAAC,EAAE;QAC3B,MAAMG,MAAM,GAAGH,SAAS,CAACI,QAAQ,EAAED,MAAM;QACzC,IAAIE,KAAK,CAACC,OAAO,CAACH,MAAM,CAAC,EAAE;UACvB,OAAOP,UAAU,CACZK,QAAQ,CAACC,KAAK,EAAE,MAAMC,MAAM,CAACI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CACzCC,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;QAC3B;QAEA,OAAOC,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC;MAChC;IACJ;EACJ,CAAC;AACL,CAAC","ignoreList":[]}
@@ -1 +0,0 @@
1
- export declare const createValidators: () => (import("../types/plugins.js").CmsModelFieldValidatorPlugin | import("../types/plugins.js").CmsModelFieldPatternValidatorPlugin[])[];
@@ -1,16 +0,0 @@
1
- import { createGteValidator } from "./gte.js";
2
- import { createInValidator } from "./in.js";
3
- import { createLteValidator } from "./lte.js";
4
- import { createMaxLengthValidator } from "./maxLength.js";
5
- import { createMinLengthValidator } from "./minLength.js";
6
- import { createPatternValidator } from "./pattern.js";
7
- import { createRequiredValidator } from "./required.js";
8
- import { createPatternValidatorPlugins } from "./patternPlugins/index.js";
9
- import { createDateLteValidator } from "./dateLte.js";
10
- import { createDateGteValidator } from "./dateGte.js";
11
- import { createTimeLteValidator } from "./timeLte.js";
12
- import { createTimeGteValidator } from "./timeGte.js";
13
- import { createUniqueValidator } from "./unique.js";
14
- export const createValidators = () => [createGteValidator(), createInValidator(), createLteValidator(), createMaxLengthValidator(), createMinLengthValidator(), createPatternValidator(), createRequiredValidator(), createPatternValidatorPlugins(), createDateLteValidator(), createDateGteValidator(), createTimeLteValidator(), createTimeGteValidator(), createUniqueValidator()];
15
-
16
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["createGteValidator","createInValidator","createLteValidator","createMaxLengthValidator","createMinLengthValidator","createPatternValidator","createRequiredValidator","createPatternValidatorPlugins","createDateLteValidator","createDateGteValidator","createTimeLteValidator","createTimeGteValidator","createUniqueValidator","createValidators"],"sources":["index.ts"],"sourcesContent":["import { createGteValidator } from \"./gte.js\";\nimport { createInValidator } from \"./in.js\";\nimport { createLteValidator } from \"./lte.js\";\nimport { createMaxLengthValidator } from \"./maxLength.js\";\nimport { createMinLengthValidator } from \"./minLength.js\";\nimport { createPatternValidator } from \"./pattern.js\";\nimport { createRequiredValidator } from \"./required.js\";\nimport { createPatternValidatorPlugins } from \"./patternPlugins/index.js\";\nimport { createDateLteValidator } from \"./dateLte.js\";\nimport { createDateGteValidator } from \"./dateGte.js\";\nimport { createTimeLteValidator } from \"./timeLte.js\";\nimport { createTimeGteValidator } from \"./timeGte.js\";\nimport { createUniqueValidator } from \"./unique.js\";\n\nexport const createValidators = () => [\n createGteValidator(),\n createInValidator(),\n createLteValidator(),\n createMaxLengthValidator(),\n createMinLengthValidator(),\n createPatternValidator(),\n createRequiredValidator(),\n createPatternValidatorPlugins(),\n createDateLteValidator(),\n createDateGteValidator(),\n createTimeLteValidator(),\n createTimeGteValidator(),\n createUniqueValidator()\n];\n"],"mappings":"AAAA,SAASA,kBAAkB;AAC3B,SAASC,iBAAiB;AAC1B,SAASC,kBAAkB;AAC3B,SAASC,wBAAwB;AACjC,SAASC,wBAAwB;AACjC,SAASC,sBAAsB;AAC/B,SAASC,uBAAuB;AAChC,SAASC,6BAA6B;AACtC,SAASC,sBAAsB;AAC/B,SAASC,sBAAsB;AAC/B,SAASC,sBAAsB;AAC/B,SAASC,sBAAsB;AAC/B,SAASC,qBAAqB;AAE9B,OAAO,MAAMC,gBAAgB,GAAGA,CAAA,KAAM,CAClCb,kBAAkB,CAAC,CAAC,EACpBC,iBAAiB,CAAC,CAAC,EACnBC,kBAAkB,CAAC,CAAC,EACpBC,wBAAwB,CAAC,CAAC,EAC1BC,wBAAwB,CAAC,CAAC,EAC1BC,sBAAsB,CAAC,CAAC,EACxBC,uBAAuB,CAAC,CAAC,EACzBC,6BAA6B,CAAC,CAAC,EAC/BC,sBAAsB,CAAC,CAAC,EACxBC,sBAAsB,CAAC,CAAC,EACxBC,sBAAsB,CAAC,CAAC,EACxBC,sBAAsB,CAAC,CAAC,EACxBC,qBAAqB,CAAC,CAAC,CAC1B","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import type { CmsModelFieldValidatorPlugin } from "../types/index.js";
2
- export declare const createLteValidator: () => CmsModelFieldValidatorPlugin;
package/validators/lte.js DELETED
@@ -1,22 +0,0 @@
1
- import { validation } from "@webiny/validation";
2
- export const createLteValidator = () => {
3
- return {
4
- type: "cms-model-field-validator",
5
- name: "cms-model-field-validator-lte",
6
- validator: {
7
- name: "lte",
8
- validate({
9
- value,
10
- validator
11
- }) {
12
- const lteValue = validator.settings?.value;
13
- if (typeof lteValue !== "undefined") {
14
- return validation.validate(value, `lte:${lteValue}`).then(v => v === true).catch(() => false);
15
- }
16
- return Promise.resolve(true);
17
- }
18
- }
19
- };
20
- };
21
-
22
- //# sourceMappingURL=lte.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["validation","createLteValidator","type","name","validator","validate","value","lteValue","settings","then","v","catch","Promise","resolve"],"sources":["lte.ts"],"sourcesContent":["import { validation } from \"@webiny/validation\";\nimport type { CmsModelFieldValidatorPlugin } from \"~/types/index.js\";\n\nexport const createLteValidator = (): CmsModelFieldValidatorPlugin => {\n return {\n type: \"cms-model-field-validator\",\n name: \"cms-model-field-validator-lte\",\n validator: {\n name: \"lte\",\n validate({ value, validator }) {\n const lteValue = validator.settings?.value;\n if (typeof lteValue !== \"undefined\") {\n return validation\n .validate(value, `lte:${lteValue}`)\n .then(v => v === true)\n .catch(() => false);\n }\n return Promise.resolve(true);\n }\n }\n };\n};\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,oBAAoB;AAG/C,OAAO,MAAMC,kBAAkB,GAAGA,CAAA,KAAoC;EAClE,OAAO;IACHC,IAAI,EAAE,2BAA2B;IACjCC,IAAI,EAAE,+BAA+B;IACrCC,SAAS,EAAE;MACPD,IAAI,EAAE,KAAK;MACXE,QAAQA,CAAC;QAAEC,KAAK;QAAEF;MAAU,CAAC,EAAE;QAC3B,MAAMG,QAAQ,GAAGH,SAAS,CAACI,QAAQ,EAAEF,KAAK;QAC1C,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;UACjC,OAAOP,UAAU,CACZK,QAAQ,CAACC,KAAK,EAAE,OAAOC,QAAQ,EAAE,CAAC,CAClCE,IAAI,CAACC,CAAC,IAAIA,CAAC,KAAK,IAAI,CAAC,CACrBC,KAAK,CAAC,MAAM,KAAK,CAAC;QAC3B;QACA,OAAOC,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC;MAChC;IACJ;EACJ,CAAC;AACL,CAAC","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import type { CmsModelFieldValidatorPlugin } from "../types/index.js";
2
- export declare const createMaxLengthValidator: () => CmsModelFieldValidatorPlugin;
@@ -1,22 +0,0 @@
1
- import { validation } from "@webiny/validation";
2
- export const createMaxLengthValidator = () => {
3
- return {
4
- type: "cms-model-field-validator",
5
- name: "cms-model-field-validator-max-length",
6
- validator: {
7
- name: "maxLength",
8
- validate({
9
- value,
10
- validator
11
- }) {
12
- const maxLengthValue = validator.settings?.value;
13
- if (typeof maxLengthValue !== "undefined") {
14
- return validation.validate(value, `maxLength:${maxLengthValue}`).then(v => v === true).catch(() => false);
15
- }
16
- return Promise.resolve(true);
17
- }
18
- }
19
- };
20
- };
21
-
22
- //# sourceMappingURL=maxLength.js.map