@webiny/api-headless-cms-ddb-es 0.0.0-unstable.78f581c1d2 → 0.0.0-unstable.7be00a75a9

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 (411) hide show
  1. package/README.md +6 -30
  2. package/configurations.d.ts +13 -6
  3. package/configurations.js +28 -40
  4. package/configurations.js.map +1 -1
  5. package/definitions/entry.d.ts +4 -5
  6. package/definitions/entry.js +9 -88
  7. package/definitions/entry.js.map +1 -1
  8. package/definitions/group.d.ts +6 -6
  9. package/definitions/group.js +9 -68
  10. package/definitions/group.js.map +1 -1
  11. package/definitions/model.d.ts +6 -6
  12. package/definitions/model.js +9 -90
  13. package/definitions/model.js.map +1 -1
  14. package/definitions/types.d.ts +65 -0
  15. package/definitions/types.js +0 -0
  16. package/elasticsearch/createElasticsearchIndex.d.ts +5 -5
  17. package/elasticsearch/createElasticsearchIndex.js +53 -56
  18. package/elasticsearch/createElasticsearchIndex.js.map +1 -1
  19. package/elasticsearch/deleteElasticsearchIndex.d.ts +3 -3
  20. package/elasticsearch/deleteElasticsearchIndex.js +20 -40
  21. package/elasticsearch/deleteElasticsearchIndex.js.map +1 -1
  22. package/exports/api/cms/opensearch.d.ts +9 -0
  23. package/exports/api/cms/opensearch.js +9 -0
  24. package/feature.d.ts +1 -0
  25. package/feature.js +179 -0
  26. package/feature.js.map +1 -0
  27. package/features/CmsEntryOpenSearchBodyModifier/abstractions.d.ts +16 -0
  28. package/features/CmsEntryOpenSearchBodyModifier/abstractions.js +5 -0
  29. package/features/CmsEntryOpenSearchBodyModifier/abstractions.js.map +1 -0
  30. package/features/CmsEntryOpenSearchBodyModifier/index.d.ts +1 -0
  31. package/features/CmsEntryOpenSearchBodyModifier/index.js +1 -0
  32. package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.d.ts +14 -0
  33. package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.js +42 -0
  34. package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.js.map +1 -0
  35. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.d.ts +32 -0
  36. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.js +5 -0
  37. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.js.map +1 -0
  38. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.d.ts +11 -0
  39. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.js +5 -0
  40. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.js.map +1 -0
  41. package/features/CmsEntryOpenSearchFieldIndex/constants.d.ts +1 -0
  42. package/features/CmsEntryOpenSearchFieldIndex/constants.js +4 -0
  43. package/features/CmsEntryOpenSearchFieldIndex/constants.js.map +1 -0
  44. package/features/CmsEntryOpenSearchFieldIndex/feature.d.ts +4 -0
  45. package/features/CmsEntryOpenSearchFieldIndex/feature.js +29 -0
  46. package/features/CmsEntryOpenSearchFieldIndex/feature.js.map +1 -0
  47. package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.d.ts +11 -0
  48. package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.js +60 -0
  49. package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.js.map +1 -0
  50. package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.d.ts +13 -0
  51. package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.js +33 -0
  52. package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.js.map +1 -0
  53. package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.d.ts +10 -0
  54. package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.js +21 -0
  55. package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.js.map +1 -0
  56. package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.d.ts +10 -0
  57. package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.js +22 -0
  58. package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.js.map +1 -0
  59. package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.d.ts +11 -0
  60. package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.js +32 -0
  61. package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.js.map +1 -0
  62. package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.d.ts +12 -0
  63. package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.js +107 -0
  64. package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.js.map +1 -0
  65. package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.d.ts +10 -0
  66. package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.js +21 -0
  67. package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.js.map +1 -0
  68. package/features/CmsEntryOpenSearchFieldIndex/fields/TextCompressedFieldIndex.d.ts +15 -0
  69. package/features/CmsEntryOpenSearchFieldIndex/fields/TextCompressedFieldIndex.js +40 -0
  70. package/features/CmsEntryOpenSearchFieldIndex/fields/TextCompressedFieldIndex.js.map +1 -0
  71. package/features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.d.ts +15 -0
  72. package/features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.js +40 -0
  73. package/features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.js.map +1 -0
  74. package/features/CmsEntryOpenSearchFieldIndex/index.d.ts +3 -0
  75. package/features/CmsEntryOpenSearchFieldIndex/index.js +3 -0
  76. package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.d.ts +11 -0
  77. package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.js +36 -0
  78. package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.js.map +1 -0
  79. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.d.ts +37 -0
  80. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.js +5 -0
  81. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.js.map +1 -0
  82. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.d.ts +9 -0
  83. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.js +5 -0
  84. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.js.map +1 -0
  85. package/features/CmsEntryOpenSearchFilter/constants.d.ts +1 -0
  86. package/features/CmsEntryOpenSearchFilter/constants.js +4 -0
  87. package/features/CmsEntryOpenSearchFilter/constants.js.map +1 -0
  88. package/features/CmsEntryOpenSearchFilter/feature.d.ts +4 -0
  89. package/features/CmsEntryOpenSearchFilter/feature.js +17 -0
  90. package/features/CmsEntryOpenSearchFilter/feature.js.map +1 -0
  91. package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.d.ts +9 -0
  92. package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.js +26 -0
  93. package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.js.map +1 -0
  94. package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.d.ts +9 -0
  95. package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.js +43 -0
  96. package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.js.map +1 -0
  97. package/features/CmsEntryOpenSearchFilter/fields/RefFilter.d.ts +9 -0
  98. package/features/CmsEntryOpenSearchFilter/fields/RefFilter.js +36 -0
  99. package/features/CmsEntryOpenSearchFilter/fields/RefFilter.js.map +1 -0
  100. package/features/CmsEntryOpenSearchFilter/index.d.ts +3 -0
  101. package/features/CmsEntryOpenSearchFilter/index.js +3 -0
  102. package/features/CmsEntryOpenSearchFullTextSearch/abstractions.d.ts +20 -0
  103. package/features/CmsEntryOpenSearchFullTextSearch/abstractions.js +5 -0
  104. package/features/CmsEntryOpenSearchFullTextSearch/abstractions.js.map +1 -0
  105. package/features/CmsEntryOpenSearchFullTextSearch/index.d.ts +1 -0
  106. package/features/CmsEntryOpenSearchFullTextSearch/index.js +1 -0
  107. package/features/CmsEntryOpenSearchIndex/BaseOpenSearchIndex.d.ts +11 -0
  108. package/features/CmsEntryOpenSearchIndex/BaseOpenSearchIndex.js +17 -0
  109. package/features/CmsEntryOpenSearchIndex/BaseOpenSearchIndex.js.map +1 -0
  110. package/features/CmsEntryOpenSearchIndex/abstractions.d.ts +14 -0
  111. package/features/CmsEntryOpenSearchIndex/abstractions.js +5 -0
  112. package/features/CmsEntryOpenSearchIndex/abstractions.js.map +1 -0
  113. package/features/CmsEntryOpenSearchIndex/feature.d.ts +4 -0
  114. package/features/CmsEntryOpenSearchIndex/feature.js +11 -0
  115. package/features/CmsEntryOpenSearchIndex/feature.js.map +1 -0
  116. package/features/CmsEntryOpenSearchIndex/index.d.ts +3 -0
  117. package/features/CmsEntryOpenSearchIndex/index.js +3 -0
  118. package/features/CmsEntryOpenSearchQueryModifier/abstractions.d.ts +16 -0
  119. package/features/CmsEntryOpenSearchQueryModifier/abstractions.js +5 -0
  120. package/features/CmsEntryOpenSearchQueryModifier/abstractions.js.map +1 -0
  121. package/features/CmsEntryOpenSearchQueryModifier/index.d.ts +1 -0
  122. package/features/CmsEntryOpenSearchQueryModifier/index.js +1 -0
  123. package/features/CmsEntryOpenSearchSortModifier/abstractions.d.ts +15 -0
  124. package/features/CmsEntryOpenSearchSortModifier/abstractions.js +5 -0
  125. package/features/CmsEntryOpenSearchSortModifier/abstractions.js.map +1 -0
  126. package/features/CmsEntryOpenSearchSortModifier/index.d.ts +1 -0
  127. package/features/CmsEntryOpenSearchSortModifier/index.js +1 -0
  128. package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.d.ts +12 -0
  129. package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.js +31 -0
  130. package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.js.map +1 -0
  131. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.d.ts +22 -0
  132. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.js +5 -0
  133. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.js.map +1 -0
  134. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.d.ts +10 -0
  135. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.js +5 -0
  136. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.js.map +1 -0
  137. package/features/CmsEntryOpenSearchValueSearch/feature.d.ts +4 -0
  138. package/features/CmsEntryOpenSearchValueSearch/feature.js +17 -0
  139. package/features/CmsEntryOpenSearchValueSearch/feature.js.map +1 -0
  140. package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.d.ts +10 -0
  141. package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.js +21 -0
  142. package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.js.map +1 -0
  143. package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.d.ts +10 -0
  144. package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.js +44 -0
  145. package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.js.map +1 -0
  146. package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.d.ts +10 -0
  147. package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.js +22 -0
  148. package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.js.map +1 -0
  149. package/features/CmsEntryOpenSearchValueSearch/index.d.ts +3 -0
  150. package/features/CmsEntryOpenSearchValueSearch/index.js +3 -0
  151. package/features/CmsEntryOpenSearchValuesModifier/abstractions.d.ts +23 -0
  152. package/features/CmsEntryOpenSearchValuesModifier/abstractions.js +5 -0
  153. package/features/CmsEntryOpenSearchValuesModifier/abstractions.js.map +1 -0
  154. package/features/CmsEntryOpenSearchValuesModifier/index.d.ts +1 -0
  155. package/features/CmsEntryOpenSearchValuesModifier/index.js +1 -0
  156. package/helpers/entryIndexHelpers.d.ts +13 -11
  157. package/helpers/entryIndexHelpers.js +72 -196
  158. package/helpers/entryIndexHelpers.js.map +1 -1
  159. package/helpers/fieldIdentifier.d.ts +6 -0
  160. package/helpers/fieldIdentifier.js +23 -0
  161. package/helpers/fieldIdentifier.js.map +1 -0
  162. package/helpers/index.d.ts +2 -2
  163. package/helpers/index.js +2 -31
  164. package/index.d.ts +1 -3
  165. package/index.js +1 -268
  166. package/operations/entry/dataLoader/DataLoaderCache.d.ts +16 -0
  167. package/operations/entry/dataLoader/DataLoaderCache.js +27 -0
  168. package/operations/entry/dataLoader/DataLoaderCache.js.map +1 -0
  169. package/operations/entry/dataLoader/constants.d.ts +1 -0
  170. package/operations/entry/dataLoader/constants.js +5 -0
  171. package/operations/entry/dataLoader/constants.js.map +1 -0
  172. package/operations/entry/dataLoader/createBatchScheduleFn.d.ts +8 -0
  173. package/operations/entry/dataLoader/createBatchScheduleFn.js +10 -0
  174. package/operations/entry/dataLoader/createBatchScheduleFn.js.map +1 -0
  175. package/operations/entry/dataLoader/getAllEntryRevisions.d.ts +4 -0
  176. package/operations/entry/dataLoader/getAllEntryRevisions.js +24 -0
  177. package/operations/entry/dataLoader/getAllEntryRevisions.js.map +1 -0
  178. package/operations/entry/dataLoader/getLatestRevisionByEntryId.d.ts +4 -0
  179. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js +34 -0
  180. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js.map +1 -0
  181. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.d.ts +4 -0
  182. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js +34 -0
  183. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js.map +1 -0
  184. package/operations/entry/dataLoader/getRevisionById.d.ts +4 -0
  185. package/operations/entry/dataLoader/getRevisionById.js +40 -0
  186. package/operations/entry/dataLoader/getRevisionById.js.map +1 -0
  187. package/operations/entry/dataLoader/index.d.ts +8 -0
  188. package/operations/entry/dataLoader/index.js +18 -0
  189. package/operations/entry/dataLoader/index.js.map +1 -0
  190. package/operations/entry/dataLoader/types.d.ts +6 -0
  191. package/operations/entry/dataLoader/types.js +0 -0
  192. package/operations/entry/dataLoaders.d.ts +17 -38
  193. package/operations/entry/dataLoaders.js +82 -357
  194. package/operations/entry/dataLoaders.js.map +1 -1
  195. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.d.ts +18 -0
  196. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js +9 -0
  197. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js.map +1 -0
  198. package/operations/entry/elasticsearch/body.d.ts +29 -0
  199. package/operations/entry/elasticsearch/body.js +87 -0
  200. package/operations/entry/elasticsearch/body.js.map +1 -0
  201. package/operations/entry/elasticsearch/fields/createSystemField.d.ts +4 -0
  202. package/operations/entry/elasticsearch/fields/createSystemField.js +9 -0
  203. package/operations/entry/elasticsearch/fields/createSystemField.js.map +1 -0
  204. package/operations/entry/elasticsearch/fields/live.d.ts +2 -0
  205. package/operations/entry/elasticsearch/fields/live.js +50 -0
  206. package/operations/entry/elasticsearch/fields/live.js.map +1 -0
  207. package/operations/entry/elasticsearch/fields/location.d.ts +2 -0
  208. package/operations/entry/elasticsearch/fields/location.js +50 -0
  209. package/operations/entry/elasticsearch/fields/location.js.map +1 -0
  210. package/operations/entry/elasticsearch/fields/state.d.ts +2 -0
  211. package/operations/entry/elasticsearch/fields/state.js +104 -0
  212. package/operations/entry/elasticsearch/fields/state.js.map +1 -0
  213. package/operations/entry/elasticsearch/fields.d.ts +12 -0
  214. package/operations/entry/elasticsearch/fields.js +207 -0
  215. package/operations/entry/elasticsearch/fields.js.map +1 -0
  216. package/operations/entry/elasticsearch/filtering/applyFiltering.d.ts +9 -0
  217. package/operations/entry/elasticsearch/filtering/applyFiltering.js +39 -0
  218. package/operations/entry/elasticsearch/filtering/applyFiltering.js.map +1 -0
  219. package/operations/entry/elasticsearch/filtering/exec.d.ts +22 -0
  220. package/operations/entry/elasticsearch/filtering/exec.js +96 -0
  221. package/operations/entry/elasticsearch/filtering/exec.js.map +1 -0
  222. package/operations/entry/elasticsearch/filtering/index.d.ts +1 -0
  223. package/operations/entry/elasticsearch/filtering/index.js +1 -0
  224. package/operations/entry/elasticsearch/filtering/path.d.ts +17 -0
  225. package/operations/entry/elasticsearch/filtering/path.js +27 -0
  226. package/operations/entry/elasticsearch/filtering/path.js.map +1 -0
  227. package/operations/entry/elasticsearch/filtering/populated.d.ts +2 -0
  228. package/operations/entry/elasticsearch/filtering/populated.js +12 -0
  229. package/operations/entry/elasticsearch/filtering/populated.js.map +1 -0
  230. package/operations/entry/elasticsearch/filtering/values.d.ts +2 -0
  231. package/operations/entry/elasticsearch/filtering/values.js +15 -0
  232. package/operations/entry/elasticsearch/filtering/values.js.map +1 -0
  233. package/operations/entry/elasticsearch/fullTextSearch.d.ts +13 -0
  234. package/operations/entry/elasticsearch/fullTextSearch.js +51 -0
  235. package/operations/entry/elasticsearch/fullTextSearch.js.map +1 -0
  236. package/operations/entry/elasticsearch/fullTextSearchFields.d.ts +8 -0
  237. package/operations/entry/elasticsearch/fullTextSearchFields.js +10 -0
  238. package/operations/entry/elasticsearch/fullTextSearchFields.js.map +1 -0
  239. package/operations/entry/elasticsearch/initialQuery.d.ts +17 -0
  240. package/operations/entry/elasticsearch/initialQuery.js +45 -0
  241. package/operations/entry/elasticsearch/initialQuery.js.map +1 -0
  242. package/operations/entry/elasticsearch/keyword.d.ts +2 -0
  243. package/operations/entry/elasticsearch/keyword.js +17 -0
  244. package/operations/entry/elasticsearch/keyword.js.map +1 -0
  245. package/operations/entry/elasticsearch/plugins/operator.d.ts +7 -0
  246. package/operations/entry/elasticsearch/plugins/operator.js +13 -0
  247. package/operations/entry/elasticsearch/plugins/operator.js.map +1 -0
  248. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.d.ts +2 -0
  249. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js +8 -0
  250. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js.map +1 -0
  251. package/operations/entry/elasticsearch/sort.d.ts +12 -0
  252. package/operations/entry/elasticsearch/sort.js +80 -0
  253. package/operations/entry/elasticsearch/sort.js.map +1 -0
  254. package/operations/entry/elasticsearch/transformValueForSearch.d.ts +9 -0
  255. package/operations/entry/elasticsearch/transformValueForSearch.js +12 -0
  256. package/operations/entry/elasticsearch/transformValueForSearch.js.map +1 -0
  257. package/operations/entry/elasticsearch/types.d.ts +34 -0
  258. package/operations/entry/elasticsearch/types.js +0 -0
  259. package/operations/entry/index.d.ts +27 -8
  260. package/operations/entry/index.js +1344 -1245
  261. package/operations/entry/index.js.map +1 -1
  262. package/operations/entry/keys.d.ts +31 -1
  263. package/operations/entry/keys.js +45 -35
  264. package/operations/entry/keys.js.map +1 -1
  265. package/operations/entry/recordType.d.ts +3 -0
  266. package/operations/entry/recordType.js +6 -0
  267. package/operations/entry/recordType.js.map +1 -0
  268. package/operations/entry/transformations/convertEntryKeys.d.ts +8 -0
  269. package/operations/entry/transformations/convertEntryKeys.js +25 -0
  270. package/operations/entry/transformations/convertEntryKeys.js.map +1 -0
  271. package/operations/entry/transformations/index.d.ts +33 -0
  272. package/operations/entry/transformations/index.js +91 -0
  273. package/operations/entry/transformations/index.js.map +1 -0
  274. package/operations/entry/transformations/modifyEntryValues.d.ts +53 -0
  275. package/operations/entry/transformations/modifyEntryValues.js +16 -0
  276. package/operations/entry/transformations/modifyEntryValues.js.map +1 -0
  277. package/operations/entry/transformations/transformEntryKeys.d.ts +11 -0
  278. package/operations/entry/transformations/transformEntryKeys.js +17 -0
  279. package/operations/entry/transformations/transformEntryKeys.js.map +1 -0
  280. package/operations/entry/transformations/transformEntryToIndex.d.ts +10 -0
  281. package/operations/entry/transformations/transformEntryToIndex.js +20 -0
  282. package/operations/entry/transformations/transformEntryToIndex.js.map +1 -0
  283. package/operations/group/index.d.ts +7 -6
  284. package/operations/group/index.js +116 -190
  285. package/operations/group/index.js.map +1 -1
  286. package/operations/model/index.d.ts +4 -4
  287. package/operations/model/index.js +130 -199
  288. package/operations/model/index.js.map +1 -1
  289. package/package.json +44 -41
  290. package/tasks/createIndexTaskPlugin.d.ts +2 -0
  291. package/tasks/createIndexTaskPlugin.js +45 -0
  292. package/tasks/createIndexTaskPlugin.js.map +1 -0
  293. package/types.d.ts +34 -137
  294. package/types.js +10 -47
  295. package/types.js.map +1 -1
  296. package/values/NoValueContainer.d.ts +5 -0
  297. package/values/NoValueContainer.js +11 -0
  298. package/values/NoValueContainer.js.map +1 -0
  299. package/definitions/entryElasticsearch.d.ts +0 -8
  300. package/definitions/entryElasticsearch.js +0 -42
  301. package/definitions/entryElasticsearch.js.map +0 -1
  302. package/definitions/settings.d.ts +0 -8
  303. package/definitions/settings.js +0 -58
  304. package/definitions/settings.js.map +0 -1
  305. package/definitions/system.d.ts +0 -8
  306. package/definitions/system.js +0 -46
  307. package/definitions/system.js.map +0 -1
  308. package/definitions/table.d.ts +0 -8
  309. package/definitions/table.js +0 -24
  310. package/definitions/table.js.map +0 -1
  311. package/definitions/tableElasticsearch.d.ts +0 -8
  312. package/definitions/tableElasticsearch.js +0 -24
  313. package/definitions/tableElasticsearch.js.map +0 -1
  314. package/dynamoDb/index.d.ts +0 -2
  315. package/dynamoDb/index.js +0 -16
  316. package/dynamoDb/index.js.map +0 -1
  317. package/dynamoDb/storage/date.d.ts +0 -2
  318. package/dynamoDb/storage/date.js +0 -99
  319. package/dynamoDb/storage/date.js.map +0 -1
  320. package/dynamoDb/storage/longText.d.ts +0 -10
  321. package/dynamoDb/storage/longText.js +0 -101
  322. package/dynamoDb/storage/longText.js.map +0 -1
  323. package/dynamoDb/storage/richText.d.ts +0 -7
  324. package/dynamoDb/storage/richText.js +0 -128
  325. package/dynamoDb/storage/richText.js.map +0 -1
  326. package/elasticsearch/index.d.ts +0 -2
  327. package/elasticsearch/index.js +0 -16
  328. package/elasticsearch/index.js.map +0 -1
  329. package/elasticsearch/indexing/dateTimeIndexing.d.ts +0 -3
  330. package/elasticsearch/indexing/dateTimeIndexing.js +0 -103
  331. package/elasticsearch/indexing/dateTimeIndexing.js.map +0 -1
  332. package/elasticsearch/indexing/defaultFieldIndexing.d.ts +0 -3
  333. package/elasticsearch/indexing/defaultFieldIndexing.js +0 -47
  334. package/elasticsearch/indexing/defaultFieldIndexing.js.map +0 -1
  335. package/elasticsearch/indexing/index.d.ts +0 -2
  336. package/elasticsearch/indexing/index.js +0 -24
  337. package/elasticsearch/indexing/index.js.map +0 -1
  338. package/elasticsearch/indexing/longTextIndexing.d.ts +0 -3
  339. package/elasticsearch/indexing/longTextIndexing.js +0 -36
  340. package/elasticsearch/indexing/longTextIndexing.js.map +0 -1
  341. package/elasticsearch/indexing/numberIndexing.d.ts +0 -3
  342. package/elasticsearch/indexing/numberIndexing.js +0 -48
  343. package/elasticsearch/indexing/numberIndexing.js.map +0 -1
  344. package/elasticsearch/indexing/objectIndexing.d.ts +0 -12
  345. package/elasticsearch/indexing/objectIndexing.js +0 -223
  346. package/elasticsearch/indexing/objectIndexing.js.map +0 -1
  347. package/elasticsearch/indexing/richTextIndexing.d.ts +0 -3
  348. package/elasticsearch/indexing/richTextIndexing.js +0 -34
  349. package/elasticsearch/indexing/richTextIndexing.js.map +0 -1
  350. package/elasticsearch/indices/base.d.ts +0 -2
  351. package/elasticsearch/indices/base.js +0 -15
  352. package/elasticsearch/indices/base.js.map +0 -1
  353. package/elasticsearch/indices/index.d.ts +0 -1
  354. package/elasticsearch/indices/index.js +0 -16
  355. package/elasticsearch/indices/index.js.map +0 -1
  356. package/elasticsearch/indices/japanese.d.ts +0 -2
  357. package/elasticsearch/indices/japanese.js +0 -16
  358. package/elasticsearch/indices/japanese.js.map +0 -1
  359. package/elasticsearch/search/index.d.ts +0 -3
  360. package/elasticsearch/search/index.js +0 -14
  361. package/elasticsearch/search/index.js.map +0 -1
  362. package/elasticsearch/search/refSearch.d.ts +0 -2
  363. package/elasticsearch/search/refSearch.js +0 -33
  364. package/elasticsearch/search/refSearch.js.map +0 -1
  365. package/elasticsearch/search/timeSearch.d.ts +0 -2
  366. package/elasticsearch/search/timeSearch.js +0 -33
  367. package/elasticsearch/search/timeSearch.js.map +0 -1
  368. package/helpers/createElasticsearchQueryBody.d.ts +0 -11
  369. package/helpers/createElasticsearchQueryBody.js +0 -611
  370. package/helpers/createElasticsearchQueryBody.js.map +0 -1
  371. package/helpers/fields.d.ts +0 -19
  372. package/helpers/fields.js +0 -205
  373. package/helpers/fields.js.map +0 -1
  374. package/helpers/index.js.map +0 -1
  375. package/helpers/searchPluginsList.d.ts +0 -6
  376. package/helpers/searchPluginsList.js +0 -26
  377. package/helpers/searchPluginsList.js.map +0 -1
  378. package/helpers/transformValueForSearch.d.ts +0 -12
  379. package/helpers/transformValueForSearch.js +0 -29
  380. package/helpers/transformValueForSearch.js.map +0 -1
  381. package/index.js.map +0 -1
  382. package/operations/entry/elasticsearchFields.d.ts +0 -2
  383. package/operations/entry/elasticsearchFields.js +0 -38
  384. package/operations/entry/elasticsearchFields.js.map +0 -1
  385. package/operations/settings/index.d.ts +0 -6
  386. package/operations/settings/index.js +0 -135
  387. package/operations/settings/index.js.map +0 -1
  388. package/operations/system/index.d.ts +0 -6
  389. package/operations/system/index.js +0 -99
  390. package/operations/system/index.js.map +0 -1
  391. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.d.ts +0 -20
  392. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js +0 -24
  393. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js.map +0 -1
  394. package/plugins/CmsEntryElasticsearchFieldPlugin.d.ts +0 -12
  395. package/plugins/CmsEntryElasticsearchFieldPlugin.js +0 -24
  396. package/plugins/CmsEntryElasticsearchFieldPlugin.js.map +0 -1
  397. package/plugins/CmsEntryElasticsearchIndexPlugin.d.ts +0 -4
  398. package/plugins/CmsEntryElasticsearchIndexPlugin.js +0 -17
  399. package/plugins/CmsEntryElasticsearchIndexPlugin.js.map +0 -1
  400. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.d.ts +0 -30
  401. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js +0 -43
  402. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js.map +0 -1
  403. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.d.ts +0 -17
  404. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js +0 -24
  405. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js.map +0 -1
  406. package/plugins/CmsEntryElasticsearchSortModifierPlugin.d.ts +0 -17
  407. package/plugins/CmsEntryElasticsearchSortModifierPlugin.js +0 -24
  408. package/plugins/CmsEntryElasticsearchSortModifierPlugin.js.map +0 -1
  409. package/plugins/index.d.ts +0 -6
  410. package/plugins/index.js +0 -83
  411. package/plugins/index.js.map +0 -1
@@ -1,204 +1,80 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.prepareEntryToIndex = exports.extractEntriesFromIndex = void 0;
9
-
10
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
12
- var _error = _interopRequireDefault(require("@webiny/error"));
13
-
14
- const prepareEntryToIndex = params => {
15
- const {
16
- plugins,
17
- storageEntry,
18
- entry,
19
- model
20
- } = params;
21
- const {
22
- fieldIndexPlugins,
23
- defaultIndexFieldPlugin,
24
- fieldTypePlugins
25
- } = setupEntriesIndexHelpers({
26
- plugins
27
- });
28
-
29
- function getFieldIndexPlugin(fieldType) {
30
- return fieldIndexPlugins[fieldType] || defaultIndexFieldPlugin;
31
- }
32
-
33
- function getFieldTypePlugin(fieldType) {
34
- const pl = fieldTypePlugins[fieldType];
35
-
36
- if (pl) {
37
- return pl;
38
- }
39
-
40
- throw new _error.default(`Missing field type plugin "${fieldType}". Prepare entry for index.`);
41
- } // These objects will contain values processed by field index plugins
42
-
43
-
44
- const values = {};
45
- const rawValues = {}; // We're only interested in current model fields.
46
-
47
- for (const field of model.fields) {
48
- if (storageEntry.values.hasOwnProperty(field.storageId) === false) {
49
- continue;
1
+ import { WebinyError } from "@webiny/error";
2
+ import { getFieldIdentifier, getFieldIdentifiers } from "./fieldIdentifier.js";
3
+ const prepareEntryToIndex = (params)=>{
4
+ const { fieldIndexRegistry, storageEntry, entry, model } = params;
5
+ function getFieldIndex(type) {
6
+ const fieldIndexing = fieldIndexRegistry.get(type);
7
+ if (fieldIndexing) return fieldIndexing;
8
+ return fieldIndexRegistry.getDefault();
50
9
  }
51
-
52
- const targetFieldPlugin = getFieldIndexPlugin(field.type); // TODO: remove this `if` once we convert this plugin to proper plugin class
53
-
54
- if (!targetFieldPlugin || !targetFieldPlugin.toIndex) {
55
- continue;
56
- }
57
-
58
- const {
59
- value,
60
- rawValue
61
- } = targetFieldPlugin.toIndex({
62
- plugins,
63
- model,
64
- field,
65
- rawValue: entry.values[field.storageId],
66
- value: storageEntry.values[field.storageId],
67
- getFieldIndexPlugin,
68
- getFieldTypePlugin
69
- });
70
-
71
- if (typeof value !== "undefined") {
72
- values[field.storageId] = value;
73
- }
74
-
75
- if (typeof rawValue !== "undefined") {
76
- rawValues[field.storageId] = rawValue;
10
+ const values = {};
11
+ const rawValues = {};
12
+ for (const field of model.fields){
13
+ const identifier = getFieldIdentifier(storageEntry.values, field);
14
+ if (!identifier) continue;
15
+ const fieldIndex = getFieldIndex(field.type);
16
+ const { value, rawValue } = fieldIndex.toIndex({
17
+ model,
18
+ field,
19
+ rawValue: entry.values[identifier],
20
+ value: storageEntry.values[identifier],
21
+ getFieldIndex
22
+ });
23
+ if (void 0 !== value) values[identifier] = value;
24
+ if (void 0 !== rawValue) rawValues[identifier] = rawValue;
77
25
  }
78
- }
79
-
80
- return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, storageEntry), {}, {
81
- values,
82
- rawValues
83
- });
26
+ return {
27
+ ...storageEntry,
28
+ values,
29
+ rawValues
30
+ };
84
31
  };
85
-
86
- exports.prepareEntryToIndex = prepareEntryToIndex;
87
-
88
- const setupEntriesIndexHelpers = ({
89
- plugins: pluginsContainer
90
- }) => {
91
- const plugins = pluginsContainer.byType("cms-model-field-to-elastic-search");
92
- const fieldIndexPlugins = {};
93
-
94
- for (const plugin of plugins.reverse()) {
95
- if (fieldIndexPlugins[plugin.fieldType]) {
96
- continue;
32
+ const extractEntriesFromIndex = ({ fieldRegistry, fieldIndexRegistry, entries, model })=>{
33
+ function getFieldIndex(type) {
34
+ const fieldIndex = fieldIndexRegistry.get(type);
35
+ if (fieldIndex) return fieldIndex;
36
+ return fieldIndexRegistry.getDefault();
97
37
  }
98
-
99
- fieldIndexPlugins[plugin.fieldType] = plugin;
100
- } // we will use this plugin if no targeted plugin found
101
-
102
-
103
- const defaultIndexFieldPlugin = plugins.find(plugin => plugin.fieldType === "*"); // CmsModelFieldToGraphQLPlugin plugins
104
-
105
- const fieldTypePlugins = pluginsContainer.byType("cms-model-field-to-graphql").reduce((plugins, plugin) => (0, _objectSpread2.default)((0, _objectSpread2.default)({}, plugins), {}, {
106
- [plugin.fieldType]: plugin
107
- }), {});
108
- return {
109
- fieldIndexPlugins,
110
- defaultIndexFieldPlugin,
111
- fieldTypePlugins
112
- };
113
- };
114
-
115
- const extractEntriesFromIndex = ({
116
- plugins,
117
- entries,
118
- model
119
- }) => {
120
- const {
121
- fieldIndexPlugins,
122
- defaultIndexFieldPlugin,
123
- fieldTypePlugins
124
- } = setupEntriesIndexHelpers({
125
- plugins
126
- });
127
-
128
- function getFieldIndexPlugin(fieldType) {
129
- return fieldIndexPlugins[fieldType] || defaultIndexFieldPlugin;
130
- }
131
-
132
- function getFieldTypePlugin(fieldType) {
133
- return fieldTypePlugins[fieldType];
134
- }
135
-
136
- const list = [];
137
-
138
- for (const entry of entries) {
139
- // This object will contain values processed by field index plugins
140
- const indexValues = {}; // We only consider fields that are present in the model
141
-
142
- for (const field of model.fields) {
143
- const fieldTypePlugin = fieldTypePlugins[field.type];
144
-
145
- if (!fieldTypePlugin) {
146
- throw new _error.default(`Missing field type plugin "${field.type}". Extract entries from index.`);
147
- }
148
-
149
- const targetFieldPlugin = getFieldIndexPlugin(field.type);
150
-
151
- if (!targetFieldPlugin || !targetFieldPlugin.fromIndex) {
152
- continue;
153
- }
154
-
155
- try {
156
- indexValues[field.storageId] = targetFieldPlugin.fromIndex({
157
- plugins,
158
- model,
159
- field,
160
- getFieldIndexPlugin,
161
- getFieldTypePlugin,
162
- value: entry.values[field.storageId],
163
-
164
- /**
165
- * Possibly no rawValues so we must check for the existence of the field.
166
- */
167
- rawValue: entry.rawValues ? entry.rawValues[field.storageId] : null
38
+ const list = [];
39
+ for (const entry of entries){
40
+ const indexValues = {};
41
+ for (const field of model.fields){
42
+ const fieldType = fieldRegistry.get(field.type);
43
+ if (!fieldType) throw new WebinyError(`Missing field type "${field.type}". Extract entries from index.`);
44
+ const fieldIndex = getFieldIndex(field.type);
45
+ const identifiers = getFieldIdentifiers(entry.values, entry.rawValues, field);
46
+ if (identifiers) try {
47
+ const key = identifiers.valueIdentifier;
48
+ const rawKey = identifiers.rawValueIdentifier;
49
+ indexValues[key] = fieldIndex.fromIndex({
50
+ model,
51
+ field,
52
+ getFieldIndex,
53
+ value: entry.values[key || rawKey],
54
+ rawValue: entry.rawValues ? entry.rawValues[rawKey || key] : null
55
+ });
56
+ } catch (ex) {
57
+ throw new WebinyError(ex.message || "Could not transform entry field from index.", ex.code || "FIELD_FROM_INDEX_ERROR", {
58
+ field,
59
+ entry
60
+ });
61
+ }
62
+ }
63
+ const newEntry = {
64
+ ...entry,
65
+ values: indexValues
66
+ };
67
+ delete newEntry["rawValues"];
68
+ delete newEntry["TYPE"];
69
+ delete newEntry["__type"];
70
+ delete newEntry["latest"];
71
+ delete newEntry["published"];
72
+ list.push({
73
+ ...newEntry
168
74
  });
169
- } catch (ex) {
170
- throw new _error.default(ex.message || "Could not transform entry field from index.", ex.code || "FIELD_FROM_INDEX_ERROR", {
171
- field,
172
- entry
173
- });
174
- }
175
75
  }
176
- /**
177
- * Let's have a new entry so we do not modify the original one.
178
- */
179
-
180
-
181
- const newEntry = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, entry), {}, {
182
- values: indexValues
183
- });
184
- /**
185
- * If we want to remove the rawValues, TYPE, latest, published and __type, we must make them optional or ignore them.
186
- */
187
- // @ts-ignore
188
-
189
- delete newEntry["rawValues"]; // @ts-ignore
190
-
191
- delete newEntry["TYPE"]; // @ts-ignore
192
-
193
- delete newEntry["__type"]; // @ts-ignore
194
-
195
- delete newEntry["latest"]; // @ts-ignore
196
-
197
- delete newEntry["published"];
198
- list.push((0, _objectSpread2.default)({}, newEntry));
199
- }
200
-
201
- return list;
76
+ return list;
202
77
  };
78
+ export { extractEntriesFromIndex, prepareEntryToIndex };
203
79
 
204
- exports.extractEntriesFromIndex = extractEntriesFromIndex;
80
+ //# sourceMappingURL=entryIndexHelpers.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["prepareEntryToIndex","params","plugins","storageEntry","entry","model","fieldIndexPlugins","defaultIndexFieldPlugin","fieldTypePlugins","setupEntriesIndexHelpers","getFieldIndexPlugin","fieldType","getFieldTypePlugin","pl","WebinyError","values","rawValues","field","fields","hasOwnProperty","storageId","targetFieldPlugin","type","toIndex","value","rawValue","pluginsContainer","byType","plugin","reverse","find","reduce","extractEntriesFromIndex","entries","list","indexValues","fieldTypePlugin","fromIndex","ex","message","code","newEntry","push"],"sources":["entryIndexHelpers.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport { CmsEntry, CmsModel, CmsModelFieldToGraphQLPlugin } from \"@webiny/api-headless-cms/types\";\nimport { CmsIndexEntry, CmsModelFieldToElasticsearchPlugin } from \"~/types\";\nimport { PluginsContainer } from \"@webiny/plugins\";\n\ninterface SetupEntriesIndexHelpersParams {\n plugins: PluginsContainer;\n}\n\ninterface ExtractEntriesFromIndexParams extends SetupEntriesIndexHelpersParams {\n model: CmsModel;\n entries: CmsIndexEntry[];\n}\n\ninterface PrepareElasticsearchDataParams extends SetupEntriesIndexHelpersParams {\n model: CmsModel;\n entry: CmsEntry;\n storageEntry: CmsEntry;\n}\n\nexport const prepareEntryToIndex = (params: PrepareElasticsearchDataParams): CmsIndexEntry => {\n const { plugins, storageEntry, entry, model } = params;\n const { fieldIndexPlugins, defaultIndexFieldPlugin, fieldTypePlugins } =\n setupEntriesIndexHelpers({ plugins });\n\n function getFieldIndexPlugin(fieldType: string) {\n return fieldIndexPlugins[fieldType] || defaultIndexFieldPlugin;\n }\n\n function getFieldTypePlugin(fieldType: string) {\n const pl = fieldTypePlugins[fieldType];\n if (pl) {\n return pl;\n }\n throw new WebinyError(`Missing field type plugin \"${fieldType}\". Prepare entry for index.`);\n }\n\n // These objects will contain values processed by field index plugins\n const values: Record<string, string> = {};\n const rawValues: Record<string, string> = {};\n\n // We're only interested in current model fields.\n for (const field of model.fields) {\n if (storageEntry.values.hasOwnProperty(field.storageId) === false) {\n continue;\n }\n\n const targetFieldPlugin = getFieldIndexPlugin(field.type);\n\n // TODO: remove this `if` once we convert this plugin to proper plugin class\n if (!targetFieldPlugin || !targetFieldPlugin.toIndex) {\n continue;\n }\n\n const { value, rawValue } = targetFieldPlugin.toIndex({\n plugins,\n model,\n field,\n rawValue: entry.values[field.storageId],\n value: storageEntry.values[field.storageId],\n getFieldIndexPlugin,\n getFieldTypePlugin\n });\n\n if (typeof value !== \"undefined\") {\n values[field.storageId] = value;\n }\n\n if (typeof rawValue !== \"undefined\") {\n rawValues[field.storageId] = rawValue;\n }\n }\n return {\n ...storageEntry,\n values,\n rawValues\n } as CmsIndexEntry;\n};\n\nconst setupEntriesIndexHelpers = ({\n plugins: pluginsContainer\n}: SetupEntriesIndexHelpersParams) => {\n const plugins = pluginsContainer.byType<CmsModelFieldToElasticsearchPlugin>(\n \"cms-model-field-to-elastic-search\"\n );\n\n const fieldIndexPlugins: Record<string, CmsModelFieldToElasticsearchPlugin> = {};\n for (const plugin of plugins.reverse()) {\n if (fieldIndexPlugins[plugin.fieldType]) {\n continue;\n }\n fieldIndexPlugins[plugin.fieldType] = plugin;\n }\n // we will use this plugin if no targeted plugin found\n const defaultIndexFieldPlugin = plugins.find(plugin => plugin.fieldType === \"*\");\n\n // CmsModelFieldToGraphQLPlugin plugins\n const fieldTypePlugins: Record<string, CmsModelFieldToGraphQLPlugin> = pluginsContainer\n .byType<CmsModelFieldToGraphQLPlugin>(\"cms-model-field-to-graphql\")\n .reduce((plugins, plugin) => ({ ...plugins, [plugin.fieldType]: plugin }), {});\n\n return {\n fieldIndexPlugins,\n defaultIndexFieldPlugin,\n fieldTypePlugins\n };\n};\n\nexport const extractEntriesFromIndex = ({\n plugins,\n entries,\n model\n}: ExtractEntriesFromIndexParams): CmsEntry[] => {\n const { fieldIndexPlugins, defaultIndexFieldPlugin, fieldTypePlugins } =\n setupEntriesIndexHelpers({ plugins });\n\n function getFieldIndexPlugin(fieldType: string) {\n return fieldIndexPlugins[fieldType] || defaultIndexFieldPlugin;\n }\n\n function getFieldTypePlugin(fieldType: string) {\n return fieldTypePlugins[fieldType];\n }\n\n const list: CmsEntry[] = [];\n\n for (const entry of entries) {\n // This object will contain values processed by field index plugins\n const indexValues: Record<string, string> = {};\n\n // We only consider fields that are present in the model\n for (const field of model.fields) {\n const fieldTypePlugin = fieldTypePlugins[field.type];\n if (!fieldTypePlugin) {\n throw new WebinyError(\n `Missing field type plugin \"${field.type}\". Extract entries from index.`\n );\n }\n\n const targetFieldPlugin = getFieldIndexPlugin(field.type);\n if (!targetFieldPlugin || !targetFieldPlugin.fromIndex) {\n continue;\n }\n try {\n indexValues[field.storageId] = targetFieldPlugin.fromIndex({\n plugins,\n model,\n field,\n getFieldIndexPlugin,\n getFieldTypePlugin,\n value: entry.values[field.storageId],\n /**\n * Possibly no rawValues so we must check for the existence of the field.\n */\n rawValue: entry.rawValues ? entry.rawValues[field.storageId] : null\n });\n } catch (ex) {\n throw new WebinyError(\n ex.message || \"Could not transform entry field from index.\",\n ex.code || \"FIELD_FROM_INDEX_ERROR\",\n {\n field,\n entry\n }\n );\n }\n }\n /**\n * Let's have a new entry so we do not modify the original one.\n */\n const newEntry: CmsEntry = {\n ...entry,\n values: indexValues\n };\n /**\n * If we want to remove the rawValues, TYPE, latest, published and __type, we must make them optional or ignore them.\n */\n // @ts-ignore\n delete newEntry[\"rawValues\"];\n // @ts-ignore\n delete newEntry[\"TYPE\"];\n // @ts-ignore\n delete newEntry[\"__type\"];\n // @ts-ignore\n delete newEntry[\"latest\"];\n // @ts-ignore\n delete newEntry[\"published\"];\n list.push({ ...newEntry });\n }\n\n return list;\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AAoBO,MAAMA,mBAAmB,GAAIC,MAAD,IAA2D;EAC1F,MAAM;IAAEC,OAAF;IAAWC,YAAX;IAAyBC,KAAzB;IAAgCC;EAAhC,IAA0CJ,MAAhD;EACA,MAAM;IAAEK,iBAAF;IAAqBC,uBAArB;IAA8CC;EAA9C,IACFC,wBAAwB,CAAC;IAAEP;EAAF,CAAD,CAD5B;;EAGA,SAASQ,mBAAT,CAA6BC,SAA7B,EAAgD;IAC5C,OAAOL,iBAAiB,CAACK,SAAD,CAAjB,IAAgCJ,uBAAvC;EACH;;EAED,SAASK,kBAAT,CAA4BD,SAA5B,EA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Q,CAAC,WAAD,CAAf,CApDyB,CAqDzB;;IACA,OAAOA,QAAQ,CAAC,MAAD,CAAf,CAtDyB,CAuDzB;;IACA,OAAOA,QAAQ,CAAC,QAAD,CAAf,CAxDyB,CAyDzB;;IACA,OAAOA,QAAQ,CAAC,QAAD,CAAf,CA1DyB,CA2DzB;;IACA,OAAOA,QAAQ,CAAC,WAAD,CAAf;IACAP,IAAI,CAACQ,IAAL,iCAAeD,QAAf;EACH;;EAED,OAAOP,IAAP;AACH,CAnFM"}
1
+ {"version":3,"file":"helpers/entryIndexHelpers.js","sources":["../../src/helpers/entryIndexHelpers.ts"],"sourcesContent":["import { WebinyError } from \"@webiny/error\";\nimport type { CmsEntry, CmsEntryValues, CmsModel } from \"@webiny/api-headless-cms/types/index.js\";\nimport type { CmsIndexEntry } from \"~/types.js\";\nimport { getFieldIdentifier, getFieldIdentifiers } from \"~/helpers/fieldIdentifier.js\";\nimport type { CmsModelFieldToGraphQLRegistry } from \"@webiny/api-headless-cms/exports/api/cms/graphql.js\";\nimport type {\n CmsEntryOpenSearchFieldIndex,\n CmsEntryOpenSearchFieldIndexRegistry\n} from \"~/features/CmsEntryOpenSearchFieldIndex/index.js\";\n\ninterface SetupEntriesIndexHelpersParams {\n fieldRegistry: CmsModelFieldToGraphQLRegistry.Interface;\n fieldIndexRegistry: CmsEntryOpenSearchFieldIndexRegistry.Interface;\n}\n\ninterface ExtractEntriesFromIndexParams<\n T extends CmsEntryValues = CmsEntryValues\n> extends SetupEntriesIndexHelpersParams {\n model: CmsModel;\n entries: CmsIndexEntry<T>[];\n}\n\ninterface PrepareElasticsearchDataParams<T extends CmsEntryValues = CmsEntryValues> extends Omit<\n SetupEntriesIndexHelpersParams,\n \"fieldRegistry\"\n> {\n model: CmsModel;\n entry: CmsEntry<T>;\n storageEntry: CmsEntry<T>;\n}\n\nexport const prepareEntryToIndex = <T extends CmsEntryValues = CmsEntryValues>(\n params: PrepareElasticsearchDataParams<T>\n): CmsIndexEntry<T> => {\n const { fieldIndexRegistry, storageEntry, entry, model } = params;\n\n function getFieldIndex(type: string): CmsEntryOpenSearchFieldIndex.Interface {\n const fieldIndexing = fieldIndexRegistry.get(type);\n if (fieldIndexing) {\n return fieldIndexing;\n }\n return fieldIndexRegistry.getDefault();\n }\n\n // These objects will contain values processed by field index implementations\n const values: T = {} as T;\n const rawValues: T = {} as T;\n\n // We're only interested in current model fields.\n for (const field of model.fields) {\n const identifier = getFieldIdentifier(storageEntry.values, field) as keyof T;\n if (!identifier) {\n continue;\n }\n\n const fieldIndex = getFieldIndex(field.type);\n\n const { value, rawValue } = fieldIndex.toIndex({\n model,\n field,\n rawValue: entry.values[identifier],\n value: storageEntry.values[identifier],\n getFieldIndex\n });\n\n if (typeof value !== \"undefined\") {\n values[identifier] = value;\n }\n\n if (typeof rawValue !== \"undefined\") {\n rawValues[identifier] = rawValue;\n }\n }\n return {\n ...storageEntry,\n values,\n rawValues\n };\n};\n\nexport const extractEntriesFromIndex = <T extends CmsEntryValues = CmsEntryValues>({\n fieldRegistry,\n fieldIndexRegistry,\n entries,\n model\n}: ExtractEntriesFromIndexParams<T>): CmsEntry<T>[] => {\n function getFieldIndex(type: string): CmsEntryOpenSearchFieldIndex.Interface {\n const fieldIndex = fieldIndexRegistry.get(type);\n if (fieldIndex) {\n return fieldIndex;\n }\n return fieldIndexRegistry.getDefault();\n }\n\n const list: CmsEntry<T>[] = [];\n\n for (const entry of entries) {\n // This object will contain values processed by field index plugins\n const indexValues: T = {} as T;\n\n // We only consider fields that are present in the model\n for (const field of model.fields) {\n const fieldType = fieldRegistry.get(field.type);\n if (!fieldType) {\n throw new WebinyError(\n `Missing field type \"${field.type}\". Extract entries from index.`\n );\n }\n\n const fieldIndex = getFieldIndex(field.type);\n /**\n * We can safely cast as the code will not continue in case of no identifiers.\n */\n const identifiers = getFieldIdentifiers(entry.values, entry.rawValues, field);\n if (!identifiers) {\n continue;\n }\n try {\n const key = identifiers.valueIdentifier as keyof T;\n const rawKey = identifiers.rawValueIdentifier as keyof T;\n indexValues[key] = fieldIndex.fromIndex({\n model,\n field,\n getFieldIndex,\n value: entry.values[key || rawKey],\n /**\n * Possibly no rawValues so we must check for the existence of the field.\n */\n rawValue: entry.rawValues ? entry.rawValues[rawKey || key] : null\n });\n } catch (ex) {\n throw new WebinyError(\n ex.message || \"Could not transform entry field from index.\",\n ex.code || \"FIELD_FROM_INDEX_ERROR\",\n {\n field,\n entry\n }\n );\n }\n }\n /**\n * Let's have a new entry so we do not modify the original one.\n */\n const newEntry: CmsEntry<T> = {\n ...entry,\n values: indexValues\n };\n /**\n * If we want to remove the rawValues, TYPE, latest, published and __type, we must make them optional or ignore them.\n */\n // @ts-expect-error\n delete newEntry[\"rawValues\"];\n // @ts-expect-error\n delete newEntry[\"TYPE\"];\n // @ts-expect-error\n delete newEntry[\"__type\"];\n // @ts-expect-error\n delete newEntry[\"latest\"];\n // @ts-expect-error\n delete newEntry[\"published\"];\n list.push({\n ...newEntry\n });\n }\n\n return list;\n};\n"],"names":["prepareEntryToIndex","params","fieldIndexRegistry","storageEntry","entry","model","getFieldIndex","type","fieldIndexing","values","rawValues","field","identifier","getFieldIdentifier","fieldIndex","value","rawValue","extractEntriesFromIndex","fieldRegistry","entries","list","indexValues","fieldType","WebinyError","identifiers","getFieldIdentifiers","key","rawKey","ex","newEntry"],"mappings":";;AA+BO,MAAMA,sBAAsB,CAC/BC;IAEA,MAAM,EAAEC,kBAAkB,EAAEC,YAAY,EAAEC,KAAK,EAAEC,KAAK,EAAE,GAAGJ;IAE3D,SAASK,cAAcC,IAAY;QAC/B,MAAMC,gBAAgBN,mBAAmB,GAAG,CAACK;QAC7C,IAAIC,eACA,OAAOA;QAEX,OAAON,mBAAmB,UAAU;IACxC;IAGA,MAAMO,SAAY,CAAC;IACnB,MAAMC,YAAe,CAAC;IAGtB,KAAK,MAAMC,SAASN,MAAM,MAAM,CAAE;QAC9B,MAAMO,aAAaC,mBAAmBV,aAAa,MAAM,EAAEQ;QAC3D,IA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,OAAO;oBAIlC,UAAUvB,MAAM,SAAS,GAAGA,MAAM,SAAS,CAACuB,UAAUD,IAAI,GAAG;gBACjE;YACJ,EAAE,OAAOE,IAAI;gBACT,MAAM,IAAIL,YACNK,GAAG,OAAO,IAAI,+CACdA,GAAG,IAAI,IAAI,0BACX;oBACIjB;oBACAP;gBACJ;YAER;QACJ;QAIA,MAAMyB,WAAwB;YAC1B,GAAGzB,KAAK;YACR,QAAQiB;QACZ;QAKA,OAAOQ,QAAQ,CAAC,YAAY;QAE5B,OAAOA,QAAQ,CAAC,OAAO;QAEvB,OAAOA,QAAQ,CAAC,SAAS;QAEzB,OAAOA,QAAQ,CAAC,SAAS;QAEzB,OAAOA,QAAQ,CAAC,YAAY;QAC5BT,KAAK,IAAI,CAAC;YACN,GAAGS,QAAQ;QACf;IACJ;IAEA,OAAOT;AACX"}
@@ -0,0 +1,6 @@
1
+ import type { CmsEntryValues, CmsModelField } from "@webiny/api-headless-cms/types/index.js";
2
+ export declare const getFieldIdentifier: (values: CmsEntryValues | null | undefined, field: CmsModelField) => string | undefined;
3
+ export declare const getFieldIdentifiers: (values: CmsEntryValues, rawValues: CmsEntryValues | null | undefined, field: CmsModelField) => {
4
+ valueIdentifier: string;
5
+ rawValueIdentifier: string;
6
+ } | null;
@@ -0,0 +1,23 @@
1
+ const fieldIdentifier_hasOwnProperty = (values = {}, property)=>{
2
+ if (!values) return false;
3
+ if (values.hasOwnProperty) return values.hasOwnProperty(property);
4
+ return void 0 !== values[property];
5
+ };
6
+ const getFieldIdentifier = (values, field)=>{
7
+ if (field.storageId && fieldIdentifier_hasOwnProperty(values, field.storageId)) return field.storageId;
8
+ if (fieldIdentifier_hasOwnProperty(values, field.fieldId)) return field.fieldId;
9
+ };
10
+ const getFieldIdentifiers = (values, rawValues, field)=>{
11
+ let valueIdentifier = getFieldIdentifier(values, field);
12
+ let rawValueIdentifier = getFieldIdentifier(rawValues, field);
13
+ if (!valueIdentifier && !rawValueIdentifier) return null;
14
+ if (!valueIdentifier) valueIdentifier = rawValueIdentifier;
15
+ if (!rawValueIdentifier) rawValueIdentifier = valueIdentifier;
16
+ return {
17
+ valueIdentifier,
18
+ rawValueIdentifier
19
+ };
20
+ };
21
+ export { getFieldIdentifier, getFieldIdentifiers };
22
+
23
+ //# sourceMappingURL=fieldIdentifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers/fieldIdentifier.js","sources":["../../src/helpers/fieldIdentifier.ts"],"sourcesContent":["import type { CmsEntryValues, CmsModelField } from \"@webiny/api-headless-cms/types/index.js\";\n\nconst hasOwnProperty = (\n values: CmsEntryValues | null | undefined = {},\n property: string\n): boolean => {\n if (!values) {\n return false;\n } else if (values.hasOwnProperty) {\n return values.hasOwnProperty(property);\n }\n return values[property] !== undefined;\n};\n\nexport const getFieldIdentifier = (\n values: CmsEntryValues | null | undefined,\n field: CmsModelField\n): string | undefined => {\n if (field.storageId && hasOwnProperty(values, field.storageId)) {\n return field.storageId;\n } else if (hasOwnProperty(values, field.fieldId)) {\n return field.fieldId;\n }\n return undefined;\n};\n\nexport const getFieldIdentifiers = (\n values: CmsEntryValues,\n rawValues: CmsEntryValues | null | undefined,\n field: CmsModelField\n) => {\n let valueIdentifier = getFieldIdentifier(values, field);\n let rawValueIdentifier = getFieldIdentifier(rawValues, field);\n if (!valueIdentifier && !rawValueIdentifier) {\n return null;\n }\n if (!valueIdentifier) {\n valueIdentifier = rawValueIdentifier as string;\n }\n if (!rawValueIdentifier) {\n rawValueIdentifier = valueIdentifier as string;\n }\n return {\n valueIdentifier,\n rawValueIdentifier\n };\n};\n"],"names":["hasOwnProperty","values","property","undefined","getFieldIdentifier","field","getFieldIdentifiers","rawValues","valueIdentifier","rawValueIdentifier"],"mappings":"AAEA,MAAMA,iCAAiB,CACnBC,SAA4C,CAAC,CAAC,EAC9CC;IAEA,IAAI,CAACD,QACD,OAAO;IACJ,IAAIA,OAAO,cAAc,EAC5B,OAAOA,OAAO,cAAc,CAACC;IAEjC,OAAOD,AAAqBE,WAArBF,MAAM,CAACC,SAAS;AAC3B;AAEO,MAAME,qBAAqB,CAC9BH,QACAI;IAEA,IAAIA,MAAM,SAAS,IAAIL,+BAAeC,QAAQI,MAAM,SAAS,GACzD,OAAOA,MAAM,SAAS;IACnB,IAAIL,+BAAeC,QAAQI,MAAM,OAAO,GAC3C,OAAOA,MAAM,OAAO;AAG5B;AAEO,MAAMC,sBAAsB,CAC/BL,QACAM,WACAF;IAEA,IAAIG,kBAAkBJ,mBAAmBH,QAAQI;IACjD,IAAII,qBAAqBL,mBAAmBG,WAAWF;IACvD,IAAI,CAACG,mBAAmB,CAACC,oBACrB,OAAO;IAEX,IAAI,CAACD,iBACDA,kBAAkBC;IAEtB,IAAI,CAACA,oBACDA,qBAAqBD;IAEzB,OAAO;QACHA;QACAC;IACJ;AACJ"}
@@ -1,2 +1,2 @@
1
- export * from "./createElasticsearchQueryBody";
2
- export * from "./entryIndexHelpers";
1
+ export * from "./entryIndexHelpers.js";
2
+ export * from "./fieldIdentifier.js";
package/helpers/index.js CHANGED
@@ -1,31 +1,2 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- var _createElasticsearchQueryBody = require("./createElasticsearchQueryBody");
8
-
9
- Object.keys(_createElasticsearchQueryBody).forEach(function (key) {
10
- if (key === "default" || key === "__esModule") return;
11
- if (key in exports && exports[key] === _createElasticsearchQueryBody[key]) return;
12
- Object.defineProperty(exports, key, {
13
- enumerable: true,
14
- get: function () {
15
- return _createElasticsearchQueryBody[key];
16
- }
17
- });
18
- });
19
-
20
- var _entryIndexHelpers = require("./entryIndexHelpers");
21
-
22
- Object.keys(_entryIndexHelpers).forEach(function (key) {
23
- if (key === "default" || key === "__esModule") return;
24
- if (key in exports && exports[key] === _entryIndexHelpers[key]) return;
25
- Object.defineProperty(exports, key, {
26
- enumerable: true,
27
- get: function () {
28
- return _entryIndexHelpers[key];
29
- }
30
- });
31
- });
1
+ export * from "./entryIndexHelpers.js";
2
+ export * from "./fieldIdentifier.js";
package/index.d.ts CHANGED
@@ -1,3 +1 @@
1
- import { StorageOperationsFactory } from "./types";
2
- export * from "./plugins";
3
- export declare const createStorageOperations: StorageOperationsFactory;
1
+ export { registerCmsOpenSearchStorageOperations } from "./feature.js";