@webiny/api-headless-cms-utils-os 0.0.0-unstable.0d717d18dd

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 (302) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +11 -0
  3. package/configurations.d.ts +10 -0
  4. package/configurations.js +24 -0
  5. package/configurations.js.map +1 -0
  6. package/exports/api/cms/opensearch.d.ts +17 -0
  7. package/exports/api/cms/opensearch.js +17 -0
  8. package/features/CmsEntryOpenSearchBodyBuilder/CmsEntryOpenSearchBodyBuilder.d.ts +30 -0
  9. package/features/CmsEntryOpenSearchBodyBuilder/CmsEntryOpenSearchBodyBuilder.js +144 -0
  10. package/features/CmsEntryOpenSearchBodyBuilder/CmsEntryOpenSearchBodyBuilder.js.map +1 -0
  11. package/features/CmsEntryOpenSearchBodyBuilder/abstractions.d.ts +18 -0
  12. package/features/CmsEntryOpenSearchBodyBuilder/abstractions.js +5 -0
  13. package/features/CmsEntryOpenSearchBodyBuilder/abstractions.js.map +1 -0
  14. package/features/CmsEntryOpenSearchBodyBuilder/feature.d.ts +4 -0
  15. package/features/CmsEntryOpenSearchBodyBuilder/feature.js +11 -0
  16. package/features/CmsEntryOpenSearchBodyBuilder/feature.js.map +1 -0
  17. package/features/CmsEntryOpenSearchBodyBuilder/index.d.ts +2 -0
  18. package/features/CmsEntryOpenSearchBodyBuilder/index.js +2 -0
  19. package/features/CmsEntryOpenSearchBodyBuilder/sort.d.ts +17 -0
  20. package/features/CmsEntryOpenSearchBodyBuilder/sort.js +76 -0
  21. package/features/CmsEntryOpenSearchBodyBuilder/sort.js.map +1 -0
  22. package/features/CmsEntryOpenSearchBodyModifier/abstractions.d.ts +16 -0
  23. package/features/CmsEntryOpenSearchBodyModifier/abstractions.js +5 -0
  24. package/features/CmsEntryOpenSearchBodyModifier/abstractions.js.map +1 -0
  25. package/features/CmsEntryOpenSearchBodyModifier/index.d.ts +1 -0
  26. package/features/CmsEntryOpenSearchBodyModifier/index.js +1 -0
  27. package/features/CmsEntryOpenSearchExecFiltering/CmsEntryOpenSearchExecFiltering.d.ts +17 -0
  28. package/features/CmsEntryOpenSearchExecFiltering/CmsEntryOpenSearchExecFiltering.js +119 -0
  29. package/features/CmsEntryOpenSearchExecFiltering/CmsEntryOpenSearchExecFiltering.js.map +1 -0
  30. package/features/CmsEntryOpenSearchExecFiltering/abstractions.d.ts +17 -0
  31. package/features/CmsEntryOpenSearchExecFiltering/abstractions.js +5 -0
  32. package/features/CmsEntryOpenSearchExecFiltering/abstractions.js.map +1 -0
  33. package/features/CmsEntryOpenSearchExecFiltering/applyFiltering.d.ts +11 -0
  34. package/features/CmsEntryOpenSearchExecFiltering/applyFiltering.js +31 -0
  35. package/features/CmsEntryOpenSearchExecFiltering/applyFiltering.js.map +1 -0
  36. package/features/CmsEntryOpenSearchExecFiltering/feature.d.ts +4 -0
  37. package/features/CmsEntryOpenSearchExecFiltering/feature.js +11 -0
  38. package/features/CmsEntryOpenSearchExecFiltering/feature.js.map +1 -0
  39. package/features/CmsEntryOpenSearchExecFiltering/index.d.ts +2 -0
  40. package/features/CmsEntryOpenSearchExecFiltering/index.js +2 -0
  41. package/features/CmsEntryOpenSearchExecFiltering/populated.d.ts +2 -0
  42. package/features/CmsEntryOpenSearchExecFiltering/populated.js +12 -0
  43. package/features/CmsEntryOpenSearchExecFiltering/populated.js.map +1 -0
  44. package/features/CmsEntryOpenSearchExecFiltering/values.d.ts +2 -0
  45. package/features/CmsEntryOpenSearchExecFiltering/values.js +15 -0
  46. package/features/CmsEntryOpenSearchExecFiltering/values.js.map +1 -0
  47. package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.d.ts +14 -0
  48. package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.js +42 -0
  49. package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.js.map +1 -0
  50. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.d.ts +32 -0
  51. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.js +5 -0
  52. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.js.map +1 -0
  53. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.d.ts +11 -0
  54. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.js +5 -0
  55. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.js.map +1 -0
  56. package/features/CmsEntryOpenSearchFieldIndex/constants.d.ts +1 -0
  57. package/features/CmsEntryOpenSearchFieldIndex/constants.js +4 -0
  58. package/features/CmsEntryOpenSearchFieldIndex/constants.js.map +1 -0
  59. package/features/CmsEntryOpenSearchFieldIndex/feature.d.ts +4 -0
  60. package/features/CmsEntryOpenSearchFieldIndex/feature.js +29 -0
  61. package/features/CmsEntryOpenSearchFieldIndex/feature.js.map +1 -0
  62. package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.d.ts +11 -0
  63. package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.js +60 -0
  64. package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.js.map +1 -0
  65. package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.d.ts +13 -0
  66. package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.js +33 -0
  67. package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.js.map +1 -0
  68. package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.d.ts +10 -0
  69. package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.js +21 -0
  70. package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.js.map +1 -0
  71. package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.d.ts +10 -0
  72. package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.js +22 -0
  73. package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.js.map +1 -0
  74. package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.d.ts +11 -0
  75. package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.js +32 -0
  76. package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.js.map +1 -0
  77. package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.d.ts +12 -0
  78. package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.js +107 -0
  79. package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.js.map +1 -0
  80. package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.d.ts +10 -0
  81. package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.js +21 -0
  82. package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.js.map +1 -0
  83. package/features/CmsEntryOpenSearchFieldIndex/fields/TextCompressedFieldIndex.d.ts +15 -0
  84. package/features/CmsEntryOpenSearchFieldIndex/fields/TextCompressedFieldIndex.js +40 -0
  85. package/features/CmsEntryOpenSearchFieldIndex/fields/TextCompressedFieldIndex.js.map +1 -0
  86. package/features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.d.ts +15 -0
  87. package/features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.js +40 -0
  88. package/features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.js.map +1 -0
  89. package/features/CmsEntryOpenSearchFieldIndex/index.d.ts +3 -0
  90. package/features/CmsEntryOpenSearchFieldIndex/index.js +3 -0
  91. package/features/CmsEntryOpenSearchFieldPathFactory/CmsEntryOpenSearchFieldPathFactory.d.ts +11 -0
  92. package/features/CmsEntryOpenSearchFieldPathFactory/CmsEntryOpenSearchFieldPathFactory.js +40 -0
  93. package/features/CmsEntryOpenSearchFieldPathFactory/CmsEntryOpenSearchFieldPathFactory.js.map +1 -0
  94. package/features/CmsEntryOpenSearchFieldPathFactory/abstractions.d.ts +21 -0
  95. package/features/CmsEntryOpenSearchFieldPathFactory/abstractions.js +5 -0
  96. package/features/CmsEntryOpenSearchFieldPathFactory/abstractions.js.map +1 -0
  97. package/features/CmsEntryOpenSearchFieldPathFactory/feature.d.ts +4 -0
  98. package/features/CmsEntryOpenSearchFieldPathFactory/feature.js +11 -0
  99. package/features/CmsEntryOpenSearchFieldPathFactory/feature.js.map +1 -0
  100. package/features/CmsEntryOpenSearchFieldPathFactory/index.d.ts +2 -0
  101. package/features/CmsEntryOpenSearchFieldPathFactory/index.js +2 -0
  102. package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.d.ts +11 -0
  103. package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.js +36 -0
  104. package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.js.map +1 -0
  105. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.d.ts +37 -0
  106. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.js +5 -0
  107. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.js.map +1 -0
  108. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.d.ts +9 -0
  109. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.js +5 -0
  110. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.js.map +1 -0
  111. package/features/CmsEntryOpenSearchFilter/constants.d.ts +1 -0
  112. package/features/CmsEntryOpenSearchFilter/constants.js +4 -0
  113. package/features/CmsEntryOpenSearchFilter/constants.js.map +1 -0
  114. package/features/CmsEntryOpenSearchFilter/feature.d.ts +4 -0
  115. package/features/CmsEntryOpenSearchFilter/feature.js +17 -0
  116. package/features/CmsEntryOpenSearchFilter/feature.js.map +1 -0
  117. package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.d.ts +9 -0
  118. package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.js +26 -0
  119. package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.js.map +1 -0
  120. package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.d.ts +9 -0
  121. package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.js +43 -0
  122. package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.js.map +1 -0
  123. package/features/CmsEntryOpenSearchFilter/fields/RefFilter.d.ts +9 -0
  124. package/features/CmsEntryOpenSearchFilter/fields/RefFilter.js +36 -0
  125. package/features/CmsEntryOpenSearchFilter/fields/RefFilter.js.map +1 -0
  126. package/features/CmsEntryOpenSearchFilter/index.d.ts +3 -0
  127. package/features/CmsEntryOpenSearchFilter/index.js +3 -0
  128. package/features/CmsEntryOpenSearchFullTextSearch/abstractions.d.ts +20 -0
  129. package/features/CmsEntryOpenSearchFullTextSearch/abstractions.js +5 -0
  130. package/features/CmsEntryOpenSearchFullTextSearch/abstractions.js.map +1 -0
  131. package/features/CmsEntryOpenSearchFullTextSearch/index.d.ts +1 -0
  132. package/features/CmsEntryOpenSearchFullTextSearch/index.js +1 -0
  133. package/features/CmsEntryOpenSearchIndex/BaseOpenSearchIndex.d.ts +11 -0
  134. package/features/CmsEntryOpenSearchIndex/BaseOpenSearchIndex.js +17 -0
  135. package/features/CmsEntryOpenSearchIndex/BaseOpenSearchIndex.js.map +1 -0
  136. package/features/CmsEntryOpenSearchIndex/abstractions.d.ts +14 -0
  137. package/features/CmsEntryOpenSearchIndex/abstractions.js +5 -0
  138. package/features/CmsEntryOpenSearchIndex/abstractions.js.map +1 -0
  139. package/features/CmsEntryOpenSearchIndex/feature.d.ts +4 -0
  140. package/features/CmsEntryOpenSearchIndex/feature.js +11 -0
  141. package/features/CmsEntryOpenSearchIndex/feature.js.map +1 -0
  142. package/features/CmsEntryOpenSearchIndex/index.d.ts +3 -0
  143. package/features/CmsEntryOpenSearchIndex/index.js +3 -0
  144. package/features/CmsEntryOpenSearchIndexCreate/CmsEntryOpenSearchIndexCreate.d.ts +13 -0
  145. package/features/CmsEntryOpenSearchIndexCreate/CmsEntryOpenSearchIndexCreate.js +65 -0
  146. package/features/CmsEntryOpenSearchIndexCreate/CmsEntryOpenSearchIndexCreate.js.map +1 -0
  147. package/features/CmsEntryOpenSearchIndexCreate/ModelAfterCreateFromHandler.d.ts +11 -0
  148. package/features/CmsEntryOpenSearchIndexCreate/ModelAfterCreateFromHandler.js +22 -0
  149. package/features/CmsEntryOpenSearchIndexCreate/ModelAfterCreateFromHandler.js.map +1 -0
  150. package/features/CmsEntryOpenSearchIndexCreate/ModelAfterCreateHandler.d.ts +11 -0
  151. package/features/CmsEntryOpenSearchIndexCreate/ModelAfterCreateHandler.js +22 -0
  152. package/features/CmsEntryOpenSearchIndexCreate/ModelAfterCreateHandler.js.map +1 -0
  153. package/features/CmsEntryOpenSearchIndexCreate/abstractions.d.ts +12 -0
  154. package/features/CmsEntryOpenSearchIndexCreate/abstractions.js +5 -0
  155. package/features/CmsEntryOpenSearchIndexCreate/abstractions.js.map +1 -0
  156. package/features/CmsEntryOpenSearchIndexCreate/feature.d.ts +4 -0
  157. package/features/CmsEntryOpenSearchIndexCreate/feature.js +11 -0
  158. package/features/CmsEntryOpenSearchIndexCreate/feature.js.map +1 -0
  159. package/features/CmsEntryOpenSearchIndexCreate/index.d.ts +2 -0
  160. package/features/CmsEntryOpenSearchIndexCreate/index.js +2 -0
  161. package/features/CmsEntryOpenSearchIndexDelete/CmsEntryOpenSearchIndexDelete.d.ts +13 -0
  162. package/features/CmsEntryOpenSearchIndexDelete/CmsEntryOpenSearchIndexDelete.js +43 -0
  163. package/features/CmsEntryOpenSearchIndexDelete/CmsEntryOpenSearchIndexDelete.js.map +1 -0
  164. package/features/CmsEntryOpenSearchIndexDelete/ModelAfterDeleteHandler.d.ts +11 -0
  165. package/features/CmsEntryOpenSearchIndexDelete/ModelAfterDeleteHandler.js +22 -0
  166. package/features/CmsEntryOpenSearchIndexDelete/ModelAfterDeleteHandler.js.map +1 -0
  167. package/features/CmsEntryOpenSearchIndexDelete/abstractions.d.ts +12 -0
  168. package/features/CmsEntryOpenSearchIndexDelete/abstractions.js +5 -0
  169. package/features/CmsEntryOpenSearchIndexDelete/abstractions.js.map +1 -0
  170. package/features/CmsEntryOpenSearchIndexDelete/feature.d.ts +4 -0
  171. package/features/CmsEntryOpenSearchIndexDelete/feature.js +11 -0
  172. package/features/CmsEntryOpenSearchIndexDelete/feature.js.map +1 -0
  173. package/features/CmsEntryOpenSearchIndexDelete/index.d.ts +2 -0
  174. package/features/CmsEntryOpenSearchIndexDelete/index.js +2 -0
  175. package/features/CmsEntryOpenSearchOperatorList/CmsEntryOpenSearchOperatorList.d.ts +12 -0
  176. package/features/CmsEntryOpenSearchOperatorList/CmsEntryOpenSearchOperatorList.js +22 -0
  177. package/features/CmsEntryOpenSearchOperatorList/CmsEntryOpenSearchOperatorList.js.map +1 -0
  178. package/features/CmsEntryOpenSearchOperatorList/abstractions.d.ts +8 -0
  179. package/features/CmsEntryOpenSearchOperatorList/abstractions.js +5 -0
  180. package/features/CmsEntryOpenSearchOperatorList/abstractions.js.map +1 -0
  181. package/features/CmsEntryOpenSearchOperatorList/feature.d.ts +4 -0
  182. package/features/CmsEntryOpenSearchOperatorList/feature.js +11 -0
  183. package/features/CmsEntryOpenSearchOperatorList/feature.js.map +1 -0
  184. package/features/CmsEntryOpenSearchOperatorList/index.d.ts +2 -0
  185. package/features/CmsEntryOpenSearchOperatorList/index.js +2 -0
  186. package/features/CmsEntryOpenSearchQueryModifier/abstractions.d.ts +16 -0
  187. package/features/CmsEntryOpenSearchQueryModifier/abstractions.js +5 -0
  188. package/features/CmsEntryOpenSearchQueryModifier/abstractions.js.map +1 -0
  189. package/features/CmsEntryOpenSearchQueryModifier/index.d.ts +1 -0
  190. package/features/CmsEntryOpenSearchQueryModifier/index.js +1 -0
  191. package/features/CmsEntryOpenSearchSortModifier/abstractions.d.ts +15 -0
  192. package/features/CmsEntryOpenSearchSortModifier/abstractions.js +5 -0
  193. package/features/CmsEntryOpenSearchSortModifier/abstractions.js.map +1 -0
  194. package/features/CmsEntryOpenSearchSortModifier/index.d.ts +1 -0
  195. package/features/CmsEntryOpenSearchSortModifier/index.js +1 -0
  196. package/features/CmsEntryOpenSearchUtilsFeature.d.ts +4 -0
  197. package/features/CmsEntryOpenSearchUtilsFeature.js +37 -0
  198. package/features/CmsEntryOpenSearchUtilsFeature.js.map +1 -0
  199. package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.d.ts +12 -0
  200. package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.js +31 -0
  201. package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.js.map +1 -0
  202. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.d.ts +22 -0
  203. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.js +5 -0
  204. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.js.map +1 -0
  205. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.d.ts +10 -0
  206. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.js +5 -0
  207. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.js.map +1 -0
  208. package/features/CmsEntryOpenSearchValueSearch/feature.d.ts +4 -0
  209. package/features/CmsEntryOpenSearchValueSearch/feature.js +17 -0
  210. package/features/CmsEntryOpenSearchValueSearch/feature.js.map +1 -0
  211. package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.d.ts +10 -0
  212. package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.js +21 -0
  213. package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.js.map +1 -0
  214. package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.d.ts +10 -0
  215. package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.js +44 -0
  216. package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.js.map +1 -0
  217. package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.d.ts +10 -0
  218. package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.js +22 -0
  219. package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.js.map +1 -0
  220. package/features/CmsEntryOpenSearchValueSearch/index.d.ts +3 -0
  221. package/features/CmsEntryOpenSearchValueSearch/index.js +3 -0
  222. package/features/CmsEntryOpenSearchValueTransformer/CmsEntryOpenSearchValueTransformer.d.ts +11 -0
  223. package/features/CmsEntryOpenSearchValueTransformer/CmsEntryOpenSearchValueTransformer.js +25 -0
  224. package/features/CmsEntryOpenSearchValueTransformer/CmsEntryOpenSearchValueTransformer.js.map +1 -0
  225. package/features/CmsEntryOpenSearchValueTransformer/abstractions.d.ts +13 -0
  226. package/features/CmsEntryOpenSearchValueTransformer/abstractions.js +5 -0
  227. package/features/CmsEntryOpenSearchValueTransformer/abstractions.js.map +1 -0
  228. package/features/CmsEntryOpenSearchValueTransformer/feature.d.ts +4 -0
  229. package/features/CmsEntryOpenSearchValueTransformer/feature.js +11 -0
  230. package/features/CmsEntryOpenSearchValueTransformer/feature.js.map +1 -0
  231. package/features/CmsEntryOpenSearchValueTransformer/index.d.ts +2 -0
  232. package/features/CmsEntryOpenSearchValueTransformer/index.js +2 -0
  233. package/features/CmsEntryOpenSearchValuesModifier/abstractions.d.ts +23 -0
  234. package/features/CmsEntryOpenSearchValuesModifier/abstractions.js +5 -0
  235. package/features/CmsEntryOpenSearchValuesModifier/abstractions.js.map +1 -0
  236. package/features/CmsEntryOpenSearchValuesModifier/index.d.ts +1 -0
  237. package/features/CmsEntryOpenSearchValuesModifier/index.js +1 -0
  238. package/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.d.ts +15 -0
  239. package/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.js +5 -0
  240. package/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.js.map +1 -0
  241. package/features/CmsModelOpenSearchIndex/abstractions.d.ts +20 -0
  242. package/features/CmsModelOpenSearchIndex/abstractions.js +5 -0
  243. package/features/CmsModelOpenSearchIndex/abstractions.js.map +1 -0
  244. package/features/CmsModelOpenSearchIndex/index.d.ts +4 -0
  245. package/features/CmsModelOpenSearchIndex/index.js +2 -0
  246. package/helpers/entryIndexHelpers.d.ts +20 -0
  247. package/helpers/entryIndexHelpers.js +80 -0
  248. package/helpers/entryIndexHelpers.js.map +1 -0
  249. package/helpers/fieldIdentifier.d.ts +6 -0
  250. package/helpers/fieldIdentifier.js +23 -0
  251. package/helpers/fieldIdentifier.js.map +1 -0
  252. package/helpers/index.d.ts +2 -0
  253. package/helpers/index.js +2 -0
  254. package/index.d.ts +1 -0
  255. package/index.js +1 -0
  256. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.d.ts +18 -0
  257. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js +9 -0
  258. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js.map +1 -0
  259. package/operations/entry/elasticsearch/fields/createSystemField.d.ts +4 -0
  260. package/operations/entry/elasticsearch/fields/createSystemField.js +9 -0
  261. package/operations/entry/elasticsearch/fields/createSystemField.js.map +1 -0
  262. package/operations/entry/elasticsearch/fields/live.d.ts +2 -0
  263. package/operations/entry/elasticsearch/fields/live.js +50 -0
  264. package/operations/entry/elasticsearch/fields/live.js.map +1 -0
  265. package/operations/entry/elasticsearch/fields/location.d.ts +2 -0
  266. package/operations/entry/elasticsearch/fields/location.js +50 -0
  267. package/operations/entry/elasticsearch/fields/location.js.map +1 -0
  268. package/operations/entry/elasticsearch/fields/state.d.ts +2 -0
  269. package/operations/entry/elasticsearch/fields/state.js +104 -0
  270. package/operations/entry/elasticsearch/fields/state.js.map +1 -0
  271. package/operations/entry/elasticsearch/fields.d.ts +12 -0
  272. package/operations/entry/elasticsearch/fields.js +207 -0
  273. package/operations/entry/elasticsearch/fields.js.map +1 -0
  274. package/operations/entry/elasticsearch/fullTextSearch.d.ts +13 -0
  275. package/operations/entry/elasticsearch/fullTextSearch.js +51 -0
  276. package/operations/entry/elasticsearch/fullTextSearch.js.map +1 -0
  277. package/operations/entry/elasticsearch/fullTextSearchFields.d.ts +8 -0
  278. package/operations/entry/elasticsearch/fullTextSearchFields.js +10 -0
  279. package/operations/entry/elasticsearch/fullTextSearchFields.js.map +1 -0
  280. package/operations/entry/elasticsearch/initialQuery.d.ts +17 -0
  281. package/operations/entry/elasticsearch/initialQuery.js +45 -0
  282. package/operations/entry/elasticsearch/initialQuery.js.map +1 -0
  283. package/operations/entry/elasticsearch/keyword.d.ts +2 -0
  284. package/operations/entry/elasticsearch/keyword.js +17 -0
  285. package/operations/entry/elasticsearch/keyword.js.map +1 -0
  286. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.d.ts +2 -0
  287. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js +8 -0
  288. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js.map +1 -0
  289. package/operations/entry/elasticsearch/types.d.ts +31 -0
  290. package/operations/entry/elasticsearch/types.js +0 -0
  291. package/operations/entry/recordType.d.ts +3 -0
  292. package/operations/entry/recordType.js +6 -0
  293. package/operations/entry/recordType.js.map +1 -0
  294. package/operations/entry/transformations/transformEntryToIndex.d.ts +10 -0
  295. package/operations/entry/transformations/transformEntryToIndex.js +20 -0
  296. package/operations/entry/transformations/transformEntryToIndex.js.map +1 -0
  297. package/package.json +33 -0
  298. package/types.d.ts +5 -0
  299. package/types.js +0 -0
  300. package/values/NoValueContainer.d.ts +5 -0
  301. package/values/NoValueContainer.js +11 -0
  302. package/values/NoValueContainer.js.map +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations/entry/elasticsearch/fullTextSearch.js","sources":["../../../../src/operations/entry/elasticsearch/fullTextSearch.ts"],"sourcesContent":["import type { OpenSearchBoolQueryConfig } from \"@webiny/api-opensearch/types.js\";\nimport { normalizeValue } from \"@webiny/api-opensearch\";\nimport type { CmsModel } from \"@webiny/api-headless-cms/types/index.js\";\nimport type { CmsEntryOpenSearchFullTextSearch } from \"~/features/CmsEntryOpenSearchFullTextSearch/index.js\";\nimport type { ModelFields } from \"~/operations/entry/elasticsearch/types.js\";\n\n/**\n * Our default implementation works with the AND operator for the multiple words query string.\n */\nconst defaultFullTextSearch: CmsEntryOpenSearchFullTextSearch.Interface = {\n apply: params => {\n const { query, term, fields, createFieldPath, prepareTerm } = params;\n\n query.must.push({\n query_string: {\n allow_leading_wildcard: true,\n fields: Object.values(fields).map(createFieldPath),\n query: `*${prepareTerm(term)}*`,\n default_operator: \"and\"\n }\n });\n }\n};\n\ninterface GetFullTextSearchParams {\n fullTextSearches: CmsEntryOpenSearchFullTextSearch.Interface[];\n model: CmsModel;\n}\nconst getFullTextSearch = (\n params: GetFullTextSearchParams\n): CmsEntryOpenSearchFullTextSearch.Interface => {\n const { fullTextSearches, model } = params;\n /**\n * We need to reverse the list, so we can take the last one first - possibility to override existing implementations.\n */\n const reversed = [...fullTextSearches].reverse();\n /**\n * We need to find the most specific implementation for the given model.\n * Also, we need to use the first possible implementation if the specific one is not found.\n */\n let fallback: CmsEntryOpenSearchFullTextSearch.Interface | null = null;\n for (const item of reversed) {\n const models = item.models || [];\n /**\n * We take the first available implementation for the given model.\n */\n if (models.includes(model.modelId)) {\n return item;\n } else if (!fallback && models.length === 0) {\n /**\n * Then we set the first possible implementation, which has no models defined, as the default one.\n * It is important not to set the one which has models defined as they are specifically for the targeted model.\n */\n fallback = item;\n }\n }\n\n return fallback || defaultFullTextSearch;\n};\n\ninterface Params {\n fullTextSearches: CmsEntryOpenSearchFullTextSearch.Interface[];\n model: CmsModel;\n query: OpenSearchBoolQueryConfig;\n term?: string;\n fields: ModelFields;\n}\nexport const applyFullTextSearch = (params: Params): void => {\n const { fullTextSearches, query, term, fields, model } = params;\n const keys = Object.keys(fields);\n if (!term || term.length === 0 || keys.length === 0) {\n return;\n }\n\n const fullTextSearch = getFullTextSearch({\n fullTextSearches,\n model\n });\n\n fullTextSearch.apply({\n model,\n createFieldPath: field => {\n if (typeof field.path === \"function\") {\n return field.path(term);\n } else if (field.systemField) {\n return field.path || field.field.storageId;\n }\n return `values.${field.path || field.field.storageId}`;\n },\n fields,\n query,\n term,\n prepareTerm: normalizeValue\n });\n};\n"],"names":["defaultFullTextSearch","params","query","term","fields","createFieldPath","prepareTerm","Object","getFullTextSearch","fullTextSearches","model","reversed","fallback","item","models","applyFullTextSearch","keys","fullTextSearch","field","normalizeValue"],"mappings":";AASA,MAAMA,wBAAoE;IACtE,OAAOC,CAAAA;QACH,MAAM,EAAEC,KAAK,EAAEC,IAAI,EAAEC,MAAM,EAAEC,eAAe,EAAEC,WAAW,EAAE,GAAGL;QAE9DC,MAAM,IAAI,CAAC,IAAI,CAAC;YACZ,cAAc;gBACV,wBAAwB;gBACxB,QAAQK,OAAO,MAAM,CAACH,QAAQ,GAAG,CAACC;gBAClC,OAAO,CAAC,CAAC,EAAEC,YAAYH,MAAM,CAAC,CAAC;gBAC/B,kBAAkB;YACtB;QACJ;IACJ;AACJ;AAMA,MAAMK,oBAAoB,CACtBP;IAEA,MAAM,EAAEQ,gBAAgB,EAAEC,KAAK,EAAE,GAAGT;IAIpC,MAAMU,WAAW;WAAIF;KAAiB,CAAC,OAAO;IAK9C,IAAIG,WAA8D;IAClE,KAAK,MAAMC,QAAQF,SAAU;QACzB,MAAMG,SAASD,KAAK,MAAM,IAAI,EAAE;QAIhC,IAAIC,OAAO,QAAQ,CAACJ,MAAM,OAAO,GAC7B,OAAOG;QACJ,IAAI,CAACD,YAAYE,AAAkB,MAAlBA,OAAO,MAAM,EAKjCF,WAAWC;IAEnB;IAEA,OAAOD,YAAYZ;AACvB;AASO,MAAMe,sBAAsB,CAACd;IAChC,MAAM,EAAEQ,gBAAgB,EAAEP,KAAK,EAAEC,IAAI,EAAEC,MAAM,EAAEM,KAAK,EAAE,GAAGT;IACzD,MAAMe,OAAOT,OAAO,IAAI,CAACH;IACzB,IAAI,CAACD,QAAQA,AAAgB,MAAhBA,KAAK,MAAM,IAAUa,AAAgB,MAAhBA,KAAK,MAAM,EACzC;IAGJ,MAAMC,iBAAiBT,kBAAkB;QACrCC;QACAC;IACJ;IAEAO,eAAe,KAAK,CAAC;QACjBP;QACA,iBAAiBQ,CAAAA;YACb,IAAI,AAAsB,cAAtB,OAAOA,MAAM,IAAI,EACjB,OAAOA,MAAM,IAAI,CAACf;YACf,IAAIe,MAAM,WAAW,EACxB,OAAOA,MAAM,IAAI,IAAIA,MAAM,KAAK,CAAC,SAAS;YAE9C,OAAO,CAAC,OAAO,EAAEA,MAAM,IAAI,IAAIA,MAAM,KAAK,CAAC,SAAS,EAAE;QAC1D;QACAd;QACAF;QACAC;QACA,aAAagB;IACjB;AACJ"}
@@ -0,0 +1,8 @@
1
+ import type { ModelFields } from "../../../operations/entry/elasticsearch/types.js";
2
+ interface Params {
3
+ fields: ModelFields;
4
+ term?: string;
5
+ targets?: string[];
6
+ }
7
+ export declare const createFullTextSearchFields: (params: Params) => ModelFields;
8
+ export {};
@@ -0,0 +1,10 @@
1
+ const createFullTextSearchFields = (params)=>{
2
+ const { term, targets, fields } = params;
3
+ if (!targets?.length || !term || 0 === term.trim().length) return {};
4
+ const result = {};
5
+ for(const key in fields)if (false !== targets.includes(key)) result[key] = fields[key];
6
+ return result;
7
+ };
8
+ export { createFullTextSearchFields };
9
+
10
+ //# sourceMappingURL=fullTextSearchFields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations/entry/elasticsearch/fullTextSearchFields.js","sources":["../../../../src/operations/entry/elasticsearch/fullTextSearchFields.ts"],"sourcesContent":["import type { ModelFields } from \"~/operations/entry/elasticsearch/types.js\";\n\ninterface Params {\n fields: ModelFields;\n term?: string;\n targets?: string[];\n}\nexport const createFullTextSearchFields = (params: Params): ModelFields => {\n const { term, targets, fields } = params;\n if (!targets?.length || !term || term.trim().length === 0) {\n return {};\n }\n\n const result: ModelFields = {};\n for (const key in fields) {\n if (targets.includes(key) === false) {\n continue;\n }\n result[key] = fields[key];\n }\n return result;\n};\n"],"names":["createFullTextSearchFields","params","term","targets","fields","result","key"],"mappings":"AAOO,MAAMA,6BAA6B,CAACC;IACvC,MAAM,EAAEC,IAAI,EAAEC,OAAO,EAAEC,MAAM,EAAE,GAAGH;IAClC,IAAI,CAACE,SAAS,UAAU,CAACD,QAAQA,AAAuB,MAAvBA,KAAK,IAAI,GAAG,MAAM,EAC/C,OAAO,CAAC;IAGZ,MAAMG,SAAsB,CAAC;IAC7B,IAAK,MAAMC,OAAOF,OACd,IAAID,AAA0B,UAA1BA,QAAQ,QAAQ,CAACG,MAGrBD,MAAM,CAACC,IAAI,GAAGF,MAAM,CAACE,IAAI;IAE7B,OAAOD;AACX"}
@@ -0,0 +1,17 @@
1
+ import type { OpenSearchBoolQueryConfig } from "@webiny/api-opensearch/types.js";
2
+ import type { CmsEntryListWhere, CmsModel } from "@webiny/api-headless-cms/types/index.js";
3
+ export declare const createBaseQuery: () => OpenSearchBoolQueryConfig;
4
+ interface Params {
5
+ model: CmsModel;
6
+ where: CmsEntryListWhere;
7
+ }
8
+ /**
9
+ * Latest and published are specific in Elasticsearch to that extend that they are tagged in the __type property.
10
+ * We allow either published or either latest.
11
+ * Latest is used in the manage API and published in the read API.
12
+ *
13
+ *
14
+ * We add the query.filter terms because we do not need scored search here and it is a bit faster.
15
+ */
16
+ export declare const createInitialQuery: (params: Params) => OpenSearchBoolQueryConfig;
17
+ export {};
@@ -0,0 +1,45 @@
1
+ import error from "@webiny/error";
2
+ import { createLatestRecordType, createPublishedRecordType } from "../recordType.js";
3
+ import { isSharedOpenSearchIndex } from "@webiny/api-opensearch";
4
+ const createBaseQuery = ()=>({
5
+ must: [],
6
+ must_not: [],
7
+ should: [],
8
+ filter: []
9
+ });
10
+ const createInitialQuery = (params)=>{
11
+ const { model, where } = params;
12
+ const query = createBaseQuery();
13
+ const sharedIndex = isSharedOpenSearchIndex();
14
+ if (sharedIndex) {
15
+ query.filter.push({
16
+ term: {
17
+ "tenant.keyword": model.tenant
18
+ }
19
+ });
20
+ query.filter.push({
21
+ term: {
22
+ "modelId.keyword": model.modelId
23
+ }
24
+ });
25
+ }
26
+ if (true === where.published) query.filter.push({
27
+ term: {
28
+ "__type.keyword": createPublishedRecordType()
29
+ }
30
+ });
31
+ else if (true === where.latest) query.filter.push({
32
+ term: {
33
+ "__type.keyword": createLatestRecordType()
34
+ }
35
+ });
36
+ else throw new error('Cannot call Elasticsearch query when not setting "published" or "latest".', "OPENSEARCH_UNSUPPORTED_QUERY", {
37
+ where
38
+ });
39
+ delete where.published;
40
+ delete where.latest;
41
+ return query;
42
+ };
43
+ export { createBaseQuery, createInitialQuery };
44
+
45
+ //# sourceMappingURL=initialQuery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations/entry/elasticsearch/initialQuery.js","sources":["../../../../src/operations/entry/elasticsearch/initialQuery.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport type { OpenSearchBoolQueryConfig } from \"@webiny/api-opensearch/types.js\";\nimport type { CmsEntryListWhere, CmsModel } from \"@webiny/api-headless-cms/types/index.js\";\nimport { createLatestRecordType, createPublishedRecordType } from \"../recordType.js\";\nimport { isSharedOpenSearchIndex as isSharedElasticsearchIndex } from \"@webiny/api-opensearch\";\n\nexport const createBaseQuery = (): OpenSearchBoolQueryConfig => {\n return {\n must: [],\n must_not: [],\n should: [],\n filter: []\n };\n};\n\ninterface Params {\n model: CmsModel;\n where: CmsEntryListWhere;\n}\n/**\n * Latest and published are specific in Elasticsearch to that extend that they are tagged in the __type property.\n * We allow either published or either latest.\n * Latest is used in the manage API and published in the read API.\n *\n *\n * We add the query.filter terms because we do not need scored search here and it is a bit faster.\n */\nexport const createInitialQuery = (params: Params): OpenSearchBoolQueryConfig => {\n const { model, where } = params;\n\n const query = createBaseQuery();\n\n /**\n * When ES index is shared between tenants, we need to filter records by tenant ID\n *\n * TODO determine if we want to search across tenants in shared index?\n */\n const sharedIndex = isSharedElasticsearchIndex();\n if (sharedIndex) {\n /**\n * Tenant for the filtering is taken from the model.\n *\n * TODO determine if we want to send it in the \"where\" parameter?\n */\n query.filter.push({\n term: {\n \"tenant.keyword\": model.tenant\n }\n });\n /**\n * Also, we must search only in selected model.\n */\n query.filter.push({\n term: {\n \"modelId.keyword\": model.modelId\n }\n });\n }\n\n /**\n * We must transform published and latest where args into something that is understandable by our Elasticsearch\n */\n if (where.published === true) {\n query.filter.push({\n term: {\n \"__type.keyword\": createPublishedRecordType()\n }\n });\n } else if (where.latest === true) {\n query.filter.push({\n term: {\n \"__type.keyword\": createLatestRecordType()\n }\n });\n }\n //\n /**\n * We do not allow filtering without the published or latest parameter.\n * Also, we do not want to set the default one, as there is a large possibility for user error when filtering.\n */\n else {\n throw new WebinyError(\n `Cannot call Elasticsearch query when not setting \"published\" or \"latest\".`,\n \"OPENSEARCH_UNSUPPORTED_QUERY\",\n {\n where\n }\n );\n }\n /**\n * We need to remove fields that actually do not exist on the record - it will break otherwise.\n * This will modify the original object, which is what we want.\n */\n delete where.published;\n delete where.latest;\n\n return query;\n};\n"],"names":["createBaseQuery","createInitialQuery","params","model","where","query","sharedIndex","isSharedElasticsearchIndex","createPublishedRecordType","createLatestRecordType","WebinyError"],"mappings":";;;AAMO,MAAMA,kBAAkB,IACpB;QACH,MAAM,EAAE;QACR,UAAU,EAAE;QACZ,QAAQ,EAAE;QACV,QAAQ,EAAE;IACd;AAeG,MAAMC,qBAAqB,CAACC;IAC/B,MAAM,EAAEC,KAAK,EAAEC,KAAK,EAAE,GAAGF;IAEzB,MAAMG,QAAQL;IAOd,MAAMM,cAAcC;IACpB,IAAID,aAAa;QAMbD,MAAM,MAAM,CAAC,IAAI,CAAC;YACd,MAAM;gBACF,kBAAkBF,MAAM,MAAM;YAClC;QACJ;QAIAE,MAAM,MAAM,CAAC,IAAI,CAAC;YACd,MAAM;gBACF,mBAAmBF,MAAM,OAAO;YACpC;QACJ;IACJ;IAKA,IAAIC,AAAoB,SAApBA,MAAM,SAAS,EACfC,MAAM,MAAM,CAAC,IAAI,CAAC;QACd,MAAM;YACF,kBAAkBG;QACtB;IACJ;SACG,IAAIJ,AAAiB,SAAjBA,MAAM,MAAM,EACnBC,MAAM,MAAM,CAAC,IAAI,CAAC;QACd,MAAM;YACF,kBAAkBI;QACtB;IACJ;SAQA,MAAM,IAAIC,MACN,6EACA,gCACA;QACIN;IACJ;IAOR,OAAOA,MAAM,SAAS;IACtB,OAAOA,MAAM,MAAM;IAEnB,OAAOC;AACX"}
@@ -0,0 +1,2 @@
1
+ import type { ModelField } from "./types.js";
2
+ export declare const hasKeyword: (field: ModelField) => boolean;
@@ -0,0 +1,17 @@
1
+ import { getBaseFieldType } from "@webiny/api-headless-cms/utils/getBaseFieldType.js";
2
+ const noKeywordFields = [
3
+ "date",
4
+ "datetime",
5
+ "number",
6
+ "boolean"
7
+ ];
8
+ const hasKeyword = (field)=>{
9
+ const fieldType = getBaseFieldType(field);
10
+ if (noKeywordFields.includes(fieldType)) return false;
11
+ if (field.unmappedType) return false;
12
+ if (false === field.keyword) return false;
13
+ return true;
14
+ };
15
+ export { hasKeyword };
16
+
17
+ //# sourceMappingURL=keyword.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations/entry/elasticsearch/keyword.js","sources":["../../../../src/operations/entry/elasticsearch/keyword.ts"],"sourcesContent":["import type { ModelField } from \"./types.js\";\nimport { getBaseFieldType } from \"@webiny/api-headless-cms/utils/getBaseFieldType.js\";\n\nconst noKeywordFields: string[] = [\"date\", \"datetime\", \"number\", \"boolean\"];\nexport const hasKeyword = (field: ModelField): boolean => {\n const fieldType = getBaseFieldType(field);\n /**\n * We defined some field types that MUST have no keyword added to the field path\n */\n if (noKeywordFields.includes(fieldType)) {\n return false;\n }\n /**\n * If field has unmapped type defined, do not add keyword.\n */\n //\n else if (field.unmappedType) {\n return false;\n }\n /**\n * And if specifically defined that field has no keyword, do not add it.\n */\n //\n else if (field.keyword === false) {\n return false;\n }\n /**\n * All other fields have keyword added.\n */\n return true;\n};\n"],"names":["noKeywordFields","hasKeyword","field","fieldType","getBaseFieldType"],"mappings":";AAGA,MAAMA,kBAA4B;IAAC;IAAQ;IAAY;IAAU;CAAU;AACpE,MAAMC,aAAa,CAACC;IACvB,MAAMC,YAAYC,iBAAiBF;IAInC,IAAIF,gBAAgB,QAAQ,CAACG,YACzB,OAAO;IAMN,IAAID,MAAM,YAAY,EACvB,OAAO;IAMN,IAAIA,AAAkB,UAAlBA,MAAM,OAAO,EAClB,OAAO;IAKX,OAAO;AACX"}
@@ -0,0 +1,2 @@
1
+ import type WebinyError from "@webiny/error";
2
+ export declare const shouldIgnoreEsResponseError: (error: WebinyError) => boolean;
@@ -0,0 +1,8 @@
1
+ const IGNORED_ES_SEARCH_EXCEPTIONS = [
2
+ "index_not_found_exception",
3
+ "search_phase_execution_exception"
4
+ ];
5
+ const shouldIgnoreEsResponseError = (error)=>IGNORED_ES_SEARCH_EXCEPTIONS.some((ignoredMessage)=>error.message.includes(ignoredMessage));
6
+ export { shouldIgnoreEsResponseError };
7
+
8
+ //# sourceMappingURL=shouldIgnoreEsResponseError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations/entry/elasticsearch/shouldIgnoreEsResponseError.js","sources":["../../../../src/operations/entry/elasticsearch/shouldIgnoreEsResponseError.ts"],"sourcesContent":["import type WebinyError from \"@webiny/error\";\n\nconst IGNORED_ES_SEARCH_EXCEPTIONS = [\n \"index_not_found_exception\",\n \"search_phase_execution_exception\"\n];\n\nexport const shouldIgnoreEsResponseError = (error: WebinyError) => {\n return IGNORED_ES_SEARCH_EXCEPTIONS.some(ignoredMessage =>\n error.message.includes(ignoredMessage)\n );\n};\n"],"names":["IGNORED_ES_SEARCH_EXCEPTIONS","shouldIgnoreEsResponseError","error","ignoredMessage"],"mappings":"AAEA,MAAMA,+BAA+B;IACjC;IACA;CACH;AAEM,MAAMC,8BAA8B,CAACC,QACjCF,6BAA6B,IAAI,CAACG,CAAAA,iBACrCD,MAAM,OAAO,CAAC,QAAQ,CAACC"}
@@ -0,0 +1,31 @@
1
+ import type { OpenSearchQueryBuilderOperator } from "@webiny/api-opensearch/exports/api/opensearch.js";
2
+ import type { CmsModelField } from "@webiny/api-headless-cms/types/index.js";
3
+ /**
4
+ * ./fields
5
+ */
6
+ type ModelFieldPath = string | ((value: string) => string);
7
+ export type FieldType = "text" | "date" | "datetime" | "time" | "number" | "boolean" | string;
8
+ export interface ModelFieldParent {
9
+ fieldId: string;
10
+ storageId: string;
11
+ type: FieldType;
12
+ }
13
+ export interface ModelField {
14
+ unmappedType?: string;
15
+ keyword?: boolean;
16
+ searchable: boolean;
17
+ sortable: boolean;
18
+ type: FieldType;
19
+ systemField?: boolean;
20
+ field: CmsModelField;
21
+ path?: ModelFieldPath;
22
+ fullTextSearch?: boolean;
23
+ parents: ModelFieldParent[];
24
+ }
25
+ export interface ModelFields {
26
+ [fieldId: string]: ModelField;
27
+ }
28
+ export interface OpenSearchQueryBuilderOperators {
29
+ [key: string]: OpenSearchQueryBuilderOperator.Interface;
30
+ }
31
+ export {};
File without changes
@@ -0,0 +1,3 @@
1
+ export declare const createRecordType: () => string;
2
+ export declare const createLatestRecordType: () => string;
3
+ export declare const createPublishedRecordType: () => string;
@@ -0,0 +1,6 @@
1
+ const createRecordType = ()=>"cms.entry";
2
+ const createLatestRecordType = ()=>`${createRecordType()}.l`;
3
+ const createPublishedRecordType = ()=>`${createRecordType()}.p`;
4
+ export { createLatestRecordType, createPublishedRecordType, createRecordType };
5
+
6
+ //# sourceMappingURL=recordType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations/entry/recordType.js","sources":["../../../src/operations/entry/recordType.ts"],"sourcesContent":["export const createRecordType = (): string => {\n return \"cms.entry\";\n};\nexport const createLatestRecordType = (): string => {\n return `${createRecordType()}.l`;\n};\nexport const createPublishedRecordType = (): string => {\n return `${createRecordType()}.p`;\n};\n"],"names":["createRecordType","createLatestRecordType","createPublishedRecordType"],"mappings":"AAAO,MAAMA,mBAAmB,IACrB;AAEJ,MAAMC,yBAAyB,IAC3B,GAAGD,mBAAmB,EAAE,CAAC;AAE7B,MAAME,4BAA4B,IAC9B,GAAGF,mBAAmB,EAAE,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { CmsEntry, CmsEntryValues, CmsStorageEntry, StorageOperationsCmsModel } from "@webiny/api-headless-cms/types/index.js";
2
+ import type { CmsEntryOpenSearchFieldIndexRegistry } from "../../../features/CmsEntryOpenSearchFieldIndex/index.js";
3
+ interface TransformEntryToIndexParams<T extends CmsEntryValues = CmsEntryValues> {
4
+ model: StorageOperationsCmsModel<T>;
5
+ entry: CmsEntry<T>;
6
+ storageEntry: CmsStorageEntry<T>;
7
+ fieldIndexRegistry: CmsEntryOpenSearchFieldIndexRegistry.Interface;
8
+ }
9
+ export declare const transformEntryToIndex: <T extends CmsEntryValues = CmsEntryValues>(params: TransformEntryToIndexParams<T>) => import("../../../types").CmsIndexEntry<T>;
10
+ export {};
@@ -0,0 +1,20 @@
1
+ import { prepareEntryToIndex } from "../../../helpers/index.js";
2
+ const transformEntryToIndex = (params)=>{
3
+ const { model, entry, storageEntry, fieldIndexRegistry } = params;
4
+ const result = prepareEntryToIndex({
5
+ model,
6
+ entry: structuredClone(entry),
7
+ storageEntry: structuredClone(storageEntry),
8
+ fieldIndexRegistry
9
+ });
10
+ delete result["PK"];
11
+ delete result["SK"];
12
+ delete result["GSI1_PK"];
13
+ delete result["GSI1_SK"];
14
+ delete result["published"];
15
+ delete result["latest"];
16
+ return result;
17
+ };
18
+ export { transformEntryToIndex };
19
+
20
+ //# sourceMappingURL=transformEntryToIndex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations/entry/transformations/transformEntryToIndex.js","sources":["../../../../src/operations/entry/transformations/transformEntryToIndex.ts"],"sourcesContent":["import type {\n CmsEntry,\n CmsEntryValues,\n CmsStorageEntry,\n StorageOperationsCmsModel\n} from \"@webiny/api-headless-cms/types/index.js\";\nimport { prepareEntryToIndex } from \"~/helpers/index.js\";\nimport type { CmsEntryOpenSearchFieldIndexRegistry } from \"~/features/CmsEntryOpenSearchFieldIndex/index.js\";\n\ninterface TransformEntryToIndexParams<T extends CmsEntryValues = CmsEntryValues> {\n model: StorageOperationsCmsModel<T>;\n entry: CmsEntry<T>;\n storageEntry: CmsStorageEntry<T>;\n fieldIndexRegistry: CmsEntryOpenSearchFieldIndexRegistry.Interface;\n}\n\nexport const transformEntryToIndex = <T extends CmsEntryValues = CmsEntryValues>(\n params: TransformEntryToIndexParams<T>\n) => {\n const { model, entry, storageEntry, fieldIndexRegistry } = params;\n const result = prepareEntryToIndex<T>({\n model,\n entry: structuredClone(entry),\n storageEntry: structuredClone(storageEntry),\n fieldIndexRegistry\n });\n\n delete result[\"PK\"];\n delete result[\"SK\"];\n delete result[\"GSI1_PK\"];\n delete result[\"GSI1_SK\"];\n delete result[\"published\"];\n delete result[\"latest\"];\n\n return result;\n};\n"],"names":["transformEntryToIndex","params","model","entry","storageEntry","fieldIndexRegistry","result","prepareEntryToIndex","structuredClone"],"mappings":";AAgBO,MAAMA,wBAAwB,CACjCC;IAEA,MAAM,EAAEC,KAAK,EAAEC,KAAK,EAAEC,YAAY,EAAEC,kBAAkB,EAAE,GAAGJ;IAC3D,MAAMK,SAASC,oBAAuB;QAClCL;QACA,OAAOM,gBAAgBL;QACvB,cAAcK,gBAAgBJ;QAC9BC;IACJ;IAEA,OAAOC,MAAM,CAAC,KAAK;IACnB,OAAOA,MAAM,CAAC,KAAK;IACnB,OAAOA,MAAM,CAAC,UAAU;IACxB,OAAOA,MAAM,CAAC,UAAU;IACxB,OAAOA,MAAM,CAAC,YAAY;IAC1B,OAAOA,MAAM,CAAC,SAAS;IAEvB,OAAOA;AACX"}
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@webiny/api-headless-cms-utils-os",
3
+ "version": "0.0.0-unstable.0d717d18dd",
4
+ "type": "module",
5
+ "exports": {
6
+ ".": "./index.js",
7
+ "./*": "./*"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/webiny/webiny-js.git",
12
+ "directory": "packages/api-headless-cms-utils-os"
13
+ },
14
+ "description": "Shared OpenSearch query infrastructure for Headless CMS storage packages.",
15
+ "license": "MIT",
16
+ "author": "Webiny Ltd.",
17
+ "dependencies": {
18
+ "@webiny/api-headless-cms": "0.0.0-unstable.0d717d18dd",
19
+ "@webiny/api-opensearch": "0.0.0-unstable.0d717d18dd",
20
+ "@webiny/error": "0.0.0-unstable.0d717d18dd",
21
+ "@webiny/feature": "0.0.0-unstable.0d717d18dd"
22
+ },
23
+ "devDependencies": {
24
+ "@webiny/build-tools": "0.0.0-unstable.0d717d18dd",
25
+ "typescript": "7.0.2"
26
+ },
27
+ "publishConfig": {
28
+ "access": "public"
29
+ },
30
+ "webiny": {
31
+ "publishFrom": "dist"
32
+ }
33
+ }
package/types.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ import type { CmsEntry, CmsEntryValues } from "@webiny/api-headless-cms/types/index.js";
2
+ export interface CmsIndexEntry<T extends CmsEntryValues = CmsEntryValues> extends CmsEntry<T> {
3
+ rawValues: Partial<T>;
4
+ [key: string]: any;
5
+ }
package/types.js ADDED
File without changes
@@ -0,0 +1,5 @@
1
+ export declare class NoValueContainer {
2
+ private constructor();
3
+ static create(): NoValueContainer;
4
+ static is(value: unknown): boolean;
5
+ }
@@ -0,0 +1,11 @@
1
+ class NoValueContainer {
2
+ static create() {
3
+ return new NoValueContainer();
4
+ }
5
+ static is(value) {
6
+ return value instanceof NoValueContainer;
7
+ }
8
+ }
9
+ export { NoValueContainer };
10
+
11
+ //# sourceMappingURL=NoValueContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"values/NoValueContainer.js","sources":["../../src/values/NoValueContainer.ts"],"sourcesContent":["export class NoValueContainer {\n private constructor() {\n //\n }\n\n public static create(): NoValueContainer {\n return new NoValueContainer();\n }\n\n public static is(value: unknown): boolean {\n return value instanceof NoValueContainer;\n }\n}\n"],"names":["NoValueContainer","value"],"mappings":"AAAO,MAAMA;IAKT,OAAc,SAA2B;QACrC,OAAO,IAAIA;IACf;IAEA,OAAc,GAAGC,KAAc,EAAW;QACtC,OAAOA,iBAAiBD;IAC5B;AACJ"}