@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
@@ -0,0 +1,15 @@
1
+ import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
2
+ import { CmsModelFieldToGraphQLRegistry } from "@webiny/api-headless-cms/exports/api/cms/graphql.js";
3
+ import { TextFieldTypes } from "@webiny/api-headless-cms/features/modelBuilder/index.js";
4
+ declare class TextEncryptedFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {
5
+ private readonly fieldRegistry;
6
+ readonly fieldType = TextFieldTypes.ENCRYPTED;
7
+ constructor(fieldRegistry: CmsModelFieldToGraphQLRegistry.Interface);
8
+ toIndex(params: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue;
9
+ fromIndex(params: CmsEntryOpenSearchFieldIndex.FromIndex): any;
10
+ private isSearchable;
11
+ }
12
+ export declare const TextEncryptedFieldIndex: typeof TextEncryptedFieldIndexImpl & {
13
+ __abstraction: import("@webiny/di").Abstraction<import("../abstractions/CmsEntryOpenSearchFieldIndex.js").ICmsEntryOpenSearchFieldIndex>;
14
+ };
15
+ export {};
@@ -0,0 +1,40 @@
1
+ import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
2
+ import { CmsModelFieldToGraphQLRegistry } from "@webiny/api-headless-cms/exports/api/cms/graphql.js";
3
+ import { TextFieldTypes } from "@webiny/api-headless-cms/features/modelBuilder/index.js";
4
+ class TextEncryptedFieldIndexImpl {
5
+ constructor(fieldRegistry){
6
+ this.fieldRegistry = fieldRegistry;
7
+ this.fieldType = TextFieldTypes.ENCRYPTED;
8
+ }
9
+ toIndex(params) {
10
+ const { field, value } = params;
11
+ const isSearchable = this.isSearchable(field);
12
+ if (isSearchable) return {
13
+ value
14
+ };
15
+ return {
16
+ rawValue: value
17
+ };
18
+ }
19
+ fromIndex(params) {
20
+ const { field, value, rawValue } = params;
21
+ const isSearchable = this.isSearchable(field);
22
+ if (isSearchable) return void 0 === value ? rawValue : value;
23
+ return void 0 === rawValue ? value : rawValue;
24
+ }
25
+ isSearchable(field) {
26
+ const fieldType = this.fieldRegistry.get(field.type);
27
+ if (!fieldType?.isSearchable) return false;
28
+ if (field.settings?.disableFullTextSearch === true) return false;
29
+ return true;
30
+ }
31
+ }
32
+ const TextEncryptedFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({
33
+ implementation: TextEncryptedFieldIndexImpl,
34
+ dependencies: [
35
+ CmsModelFieldToGraphQLRegistry
36
+ ]
37
+ });
38
+ export { TextEncryptedFieldIndex };
39
+
40
+ //# sourceMappingURL=TextEncryptedFieldIndex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.js","sources":["../../../../src/features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.ts"],"sourcesContent":["import { CmsEntryOpenSearchFieldIndex } from \"../abstractions/CmsEntryOpenSearchFieldIndex.js\";\nimport type { CmsModelField } from \"@webiny/api-headless-cms/types/index.js\";\nimport { CmsModelFieldToGraphQLRegistry } from \"@webiny/api-headless-cms/exports/api/cms/graphql.js\";\nimport { TextFieldTypes } from \"@webiny/api-headless-cms/features/modelBuilder/index.js\";\n\nclass TextEncryptedFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {\n public readonly fieldType = TextFieldTypes.ENCRYPTED;\n\n public constructor(private readonly fieldRegistry: CmsModelFieldToGraphQLRegistry.Interface) {}\n\n public toIndex(\n params: CmsEntryOpenSearchFieldIndex.ToIndex\n ): CmsEntryOpenSearchFieldIndex.ToValue {\n const { field, value } = params;\n const isSearchable = this.isSearchable(field);\n\n if (isSearchable) {\n return { value };\n }\n\n return {\n rawValue: value\n };\n }\n\n public fromIndex(params: CmsEntryOpenSearchFieldIndex.FromIndex): any {\n const { field, value, rawValue } = params;\n const isSearchable = this.isSearchable(field);\n\n if (isSearchable) {\n return value === undefined ? rawValue : value;\n }\n return rawValue === undefined ? value : rawValue;\n }\n\n private isSearchable(field: CmsModelField): boolean {\n const fieldType = this.fieldRegistry.get(field.type);\n if (!fieldType?.isSearchable) {\n return false;\n } else if (field.settings?.disableFullTextSearch === true) {\n return false;\n }\n return true;\n }\n}\n\nexport const TextEncryptedFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({\n implementation: TextEncryptedFieldIndexImpl,\n dependencies: [CmsModelFieldToGraphQLRegistry]\n});\n"],"names":["TextEncryptedFieldIndexImpl","fieldRegistry","TextFieldTypes","params","field","value","isSearchable","rawValue","undefined","fieldType","TextEncryptedFieldIndex","CmsEntryOpenSearchFieldIndex","CmsModelFieldToGraphQLRegistry"],"mappings":";;;AAKA,MAAMA;IAGF,YAAoCC,aAAuD,CAAE;aAAzDA,aAAa,GAAbA;aAFpB,SAAS,GAAGC,eAAe,SAAS;IAE0C;IAEvF,QACHC,MAA4C,EACR;QACpC,MAAM,EAAEC,KAAK,EAAEC,KAAK,EAAE,GAAGF;QACzB,MAAMG,eAAe,IAAI,CAAC,YAAY,CAACF;QAEvC,IAAIE,cACA,OAAO;YAAED;QAAM;QAGnB,OAAO;YACH,UAAUA;QACd;IACJ;IAEO,UAAUF,MAA8C,EAAO;QAClE,MAAM,EAAEC,KAAK,EAAEC,KAAK,EAAEE,QAAQ,EAAE,GAAGJ;QACnC,MAAMG,eAAe,IAAI,CAAC,YAAY,CAACF;QAEvC,IAAIE,cACA,OAAOD,AAAUG,WAAVH,QAAsBE,WAAWF;QAE5C,OAAOE,AAAaC,WAAbD,WAAyBF,QAAQE;IAC5C;IAEQ,aAAaH,KAAoB,EAAW;QAChD,MAAMK,YAAY,IAAI,CAAC,aAAa,CAAC,GAAG,CAACL,MAAM,IAAI;QACnD,IAAI,CAACK,WAAW,cACZ,OAAO;QACJ,IAAIL,MAAM,QAAQ,EAAE,0BAA0B,MACjD,OAAO;QAEX,OAAO;IACX;AACJ;AAEO,MAAMM,0BAA0BC,6BAA6B,oBAAoB,CAAC;IACrF,gBAAgBX;IAChB,cAAc;QAACY;KAA+B;AAClD"}
@@ -0,0 +1,3 @@
1
+ export { CmsEntryOpenSearchFieldIndexFeature } from "../../features/CmsEntryOpenSearchFieldIndex/feature.js";
2
+ export { CmsEntryOpenSearchFieldIndex } from "./abstractions/CmsEntryOpenSearchFieldIndex.js";
3
+ export { CmsEntryOpenSearchFieldIndexRegistry } from "./abstractions/CmsEntryOpenSearchFieldIndexRegistry.js";
@@ -0,0 +1,3 @@
1
+ export { CmsEntryOpenSearchFieldIndexFeature } from "./feature.js";
2
+ export { CmsEntryOpenSearchFieldIndex } from "./abstractions/CmsEntryOpenSearchFieldIndex.js";
3
+ export { CmsEntryOpenSearchFieldIndexRegistry } from "./abstractions/CmsEntryOpenSearchFieldIndexRegistry.js";
@@ -0,0 +1,11 @@
1
+ import { CmsEntryOpenSearchFilterRegistry as Abstraction } from "./abstractions/CmsEntryOpenSearchFilterRegistry.js";
2
+ import { CmsEntryOpenSearchFilter } from "./abstractions/CmsEntryOpenSearchFilter.js";
3
+ declare class CmsEntryOpenSearchFilterRegistryImpl implements Abstraction.Interface {
4
+ private readonly filters;
5
+ constructor(filters: CmsEntryOpenSearchFilter.Interface[]);
6
+ get(type: string): CmsEntryOpenSearchFilter.Interface;
7
+ }
8
+ export declare const CmsEntryOpenSearchFilterRegistry: typeof CmsEntryOpenSearchFilterRegistryImpl & {
9
+ __abstraction: import("@webiny/di").Abstraction<import("./abstractions/CmsEntryOpenSearchFilterRegistry.js").ICmsEntryOpenSearchFilterRegistry>;
10
+ };
11
+ export {};
@@ -0,0 +1,36 @@
1
+ import error from "@webiny/error";
2
+ import { CmsEntryOpenSearchFilterRegistry } from "./abstractions/CmsEntryOpenSearchFilterRegistry.js";
3
+ import { CmsEntryOpenSearchFilter } from "./abstractions/CmsEntryOpenSearchFilter.js";
4
+ import { getBaseFieldType } from "@webiny/api-headless-cms/utils/getBaseFieldType.js";
5
+ import { FILTER_DEFAULT } from "./constants.js";
6
+ class CmsEntryOpenSearchFilterRegistryImpl {
7
+ constructor(filters){
8
+ this.filters = filters;
9
+ }
10
+ get(type) {
11
+ const fieldType = getBaseFieldType({
12
+ type
13
+ });
14
+ const filter = this.filters.find((f)=>f.fieldType === fieldType);
15
+ if (filter) return filter;
16
+ const fallback = this.filters.find((f)=>f.fieldType === FILTER_DEFAULT);
17
+ if (fallback) return fallback;
18
+ throw new error(`There is no filter for the given field type "${fieldType}".`, "FILTER_REGISTRY_ERROR", {
19
+ fieldType
20
+ });
21
+ }
22
+ }
23
+ const CmsEntryOpenSearchFilterRegistry_CmsEntryOpenSearchFilterRegistry = CmsEntryOpenSearchFilterRegistry.createImplementation({
24
+ implementation: CmsEntryOpenSearchFilterRegistryImpl,
25
+ dependencies: [
26
+ [
27
+ CmsEntryOpenSearchFilter,
28
+ {
29
+ multiple: true
30
+ }
31
+ ]
32
+ ]
33
+ });
34
+ export { CmsEntryOpenSearchFilterRegistry_CmsEntryOpenSearchFilterRegistry as CmsEntryOpenSearchFilterRegistry };
35
+
36
+ //# sourceMappingURL=CmsEntryOpenSearchFilterRegistry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.js","sources":["../../../src/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport { CmsEntryOpenSearchFilterRegistry as Abstraction } from \"./abstractions/CmsEntryOpenSearchFilterRegistry.js\";\nimport { CmsEntryOpenSearchFilter } from \"./abstractions/CmsEntryOpenSearchFilter.js\";\nimport { getBaseFieldType } from \"@webiny/api-headless-cms/utils/getBaseFieldType.js\";\nimport { FILTER_DEFAULT } from \"./constants.js\";\n\nclass CmsEntryOpenSearchFilterRegistryImpl implements Abstraction.Interface {\n public constructor(private readonly filters: CmsEntryOpenSearchFilter.Interface[]) {}\n\n public get(type: string): CmsEntryOpenSearchFilter.Interface {\n const fieldType = getBaseFieldType({ type });\n const filter = this.filters.find(f => {\n return f.fieldType === fieldType;\n });\n if (filter) {\n return filter;\n }\n const fallback = this.filters.find(f => {\n return f.fieldType === FILTER_DEFAULT;\n });\n if (fallback) {\n return fallback;\n }\n throw new WebinyError(\n `There is no filter for the given field type \"${fieldType}\".`,\n \"FILTER_REGISTRY_ERROR\",\n {\n fieldType\n }\n );\n }\n}\n\nexport const CmsEntryOpenSearchFilterRegistry = Abstraction.createImplementation({\n implementation: CmsEntryOpenSearchFilterRegistryImpl,\n dependencies: [[CmsEntryOpenSearchFilter, { multiple: true }]]\n});\n"],"names":["CmsEntryOpenSearchFilterRegistryImpl","filters","type","fieldType","getBaseFieldType","filter","f","fallback","FILTER_DEFAULT","WebinyError","CmsEntryOpenSearchFilterRegistry","Abstraction","CmsEntryOpenSearchFilter"],"mappings":";;;;;AAMA,MAAMA;IACF,YAAoCC,OAA6C,CAAE;aAA/CA,OAAO,GAAPA;IAAgD;IAE7E,IAAIC,IAAY,EAAsC;QACzD,MAAMC,YAAYC,iBAAiB;YAAEF;QAAK;QAC1C,MAAMG,SAAS,IAAI,CAAC,OAAO,CAAC,IAAI,CAACC,CAAAA,IACtBA,EAAE,SAAS,KAAKH;QAE3B,IAAIE,QACA,OAAOA;QAEX,MAAME,WAAW,IAAI,CAAC,OAAO,CAAC,IAAI,CAACD,CAAAA,IACxBA,EAAE,SAAS,KAAKE;QAE3B,IAAID,UACA,OAAOA;QAEX,MAAM,IAAIE,MACN,CAAC,6CAA6C,EAAEN,UAAU,EAAE,CAAC,EAC7D,yBACA;YACIA;QACJ;IAER;AACJ;AAEO,MAAMO,oEAAmCC,iCAAAA,oBAAgC,CAAC;IAC7E,gBAAgBX;IAChB,cAAc;QAAC;YAACY;YAA0B;gBAAE,UAAU;YAAK;SAAE;KAAC;AAClE"}
@@ -0,0 +1,37 @@
1
+ import type { ModelField, ModelFields } from "../../../operations/entry/elasticsearch/types.js";
2
+ import type { OpenSearchBoolQueryConfig } from "@webiny/api-opensearch/types.js";
3
+ interface ApplyParams {
4
+ key: string;
5
+ value: any;
6
+ query: OpenSearchBoolQueryConfig;
7
+ operator: string;
8
+ field: ModelField;
9
+ }
10
+ export interface ApplyFilteringCb {
11
+ (params: ApplyParams): void;
12
+ }
13
+ export interface GetFilterCb {
14
+ (type: string): CmsEntryOpenSearchFilter.Interface;
15
+ }
16
+ export interface IExecParams {
17
+ applyFiltering: ApplyFilteringCb;
18
+ getFilter: GetFilterCb;
19
+ key: string;
20
+ value: any;
21
+ operator: string;
22
+ field: ModelField;
23
+ fields: ModelFields;
24
+ query: OpenSearchBoolQueryConfig;
25
+ }
26
+ export interface ICmsEntryOpenSearchFilter {
27
+ readonly fieldType: string;
28
+ exec(params: IExecParams): void;
29
+ }
30
+ export declare const CmsEntryOpenSearchFilter: import("@webiny/di").Abstraction<ICmsEntryOpenSearchFilter>;
31
+ export declare namespace CmsEntryOpenSearchFilter {
32
+ type Interface = ICmsEntryOpenSearchFilter;
33
+ type ExecParams = IExecParams;
34
+ type ApplyFiltering = ApplyFilteringCb;
35
+ type GetFilter = GetFilterCb;
36
+ }
37
+ export {};
@@ -0,0 +1,5 @@
1
+ import { createAbstraction } from "@webiny/feature/api";
2
+ const CmsEntryOpenSearchFilter = createAbstraction("Cms/Entry/OpenSearch/Filter");
3
+ export { CmsEntryOpenSearchFilter };
4
+
5
+ //# sourceMappingURL=CmsEntryOpenSearchFilter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.js","sources":["../../../../src/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { ModelField, ModelFields } from \"~/operations/entry/elasticsearch/types.js\";\nimport type { OpenSearchBoolQueryConfig } from \"@webiny/api-opensearch/types.js\";\n\ninterface ApplyParams {\n key: string;\n value: any;\n query: OpenSearchBoolQueryConfig;\n operator: string;\n field: ModelField;\n}\n\nexport interface ApplyFilteringCb {\n (params: ApplyParams): void;\n}\n\nexport interface GetFilterCb {\n (type: string): CmsEntryOpenSearchFilter.Interface;\n}\n\nexport interface IExecParams {\n applyFiltering: ApplyFilteringCb;\n getFilter: GetFilterCb;\n key: string;\n value: any;\n operator: string;\n field: ModelField;\n fields: ModelFields;\n query: OpenSearchBoolQueryConfig;\n}\n\nexport interface ICmsEntryOpenSearchFilter {\n readonly fieldType: string;\n exec(params: IExecParams): void;\n}\n\nexport const CmsEntryOpenSearchFilter = createAbstraction<ICmsEntryOpenSearchFilter>(\n \"Cms/Entry/OpenSearch/Filter\"\n);\n\nexport namespace CmsEntryOpenSearchFilter {\n export type Interface = ICmsEntryOpenSearchFilter;\n export type ExecParams = IExecParams;\n export type ApplyFiltering = ApplyFilteringCb;\n export type GetFilter = GetFilterCb;\n}\n"],"names":["CmsEntryOpenSearchFilter","createAbstraction"],"mappings":";AAoCO,MAAMA,2BAA2BC,kBACpC"}
@@ -0,0 +1,9 @@
1
+ import type { CmsEntryOpenSearchFilter } from "./CmsEntryOpenSearchFilter.js";
2
+ export interface ICmsEntryOpenSearchFilterRegistry {
3
+ get(fieldType: string): CmsEntryOpenSearchFilter.Interface;
4
+ }
5
+ export declare const CmsEntryOpenSearchFilterRegistry: import("@webiny/di").Abstraction<ICmsEntryOpenSearchFilterRegistry>;
6
+ export declare namespace CmsEntryOpenSearchFilterRegistry {
7
+ type Interface = ICmsEntryOpenSearchFilterRegistry;
8
+ type Filter = CmsEntryOpenSearchFilter.Interface;
9
+ }
@@ -0,0 +1,5 @@
1
+ import { createAbstraction } from "@webiny/feature/api";
2
+ const CmsEntryOpenSearchFilterRegistry = createAbstraction("Cms/Entry/OpenSearch/FilterRegistry");
3
+ export { CmsEntryOpenSearchFilterRegistry };
4
+
5
+ //# sourceMappingURL=CmsEntryOpenSearchFilterRegistry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.js","sources":["../../../../src/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { CmsEntryOpenSearchFilter } from \"./CmsEntryOpenSearchFilter.js\";\n\nexport interface ICmsEntryOpenSearchFilterRegistry {\n get(fieldType: string): CmsEntryOpenSearchFilter.Interface;\n}\n\nexport const CmsEntryOpenSearchFilterRegistry =\n createAbstraction<ICmsEntryOpenSearchFilterRegistry>(\"Cms/Entry/OpenSearch/FilterRegistry\");\n\nexport namespace CmsEntryOpenSearchFilterRegistry {\n export type Interface = ICmsEntryOpenSearchFilterRegistry;\n export type Filter = CmsEntryOpenSearchFilter.Interface;\n}\n"],"names":["CmsEntryOpenSearchFilterRegistry","createAbstraction"],"mappings":";AAOO,MAAMA,mCACTC,kBAAqD"}
@@ -0,0 +1 @@
1
+ export declare const FILTER_DEFAULT: "*";
@@ -0,0 +1,4 @@
1
+ const FILTER_DEFAULT = "*";
2
+ export { FILTER_DEFAULT };
3
+
4
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/CmsEntryOpenSearchFilter/constants.js","sources":["../../../src/features/CmsEntryOpenSearchFilter/constants.ts"],"sourcesContent":["export const FILTER_DEFAULT = \"*\" as const;\n"],"names":["FILTER_DEFAULT"],"mappings":"AAAO,MAAMA,iBAAiB"}
@@ -0,0 +1,4 @@
1
+ export declare const CmsEntryOpenSearchFilterFeature: {
2
+ name: string;
3
+ register(container: import("@webiny/di").Container): void;
4
+ };
@@ -0,0 +1,17 @@
1
+ import { createFeature } from "@webiny/feature/api";
2
+ import { DefaultFilter } from "./fields/DefaultFilter.js";
3
+ import { RefFilter } from "./fields/RefFilter.js";
4
+ import { ObjectFilter } from "./fields/ObjectFilter.js";
5
+ import { CmsEntryOpenSearchFilterRegistry } from "./CmsEntryOpenSearchFilterRegistry.js";
6
+ const CmsEntryOpenSearchFilterFeature = createFeature({
7
+ name: "Cms/Entry/OpenSearch/FilterFeature",
8
+ register: (container)=>{
9
+ container.register(DefaultFilter);
10
+ container.register(RefFilter);
11
+ container.register(ObjectFilter);
12
+ container.register(CmsEntryOpenSearchFilterRegistry);
13
+ }
14
+ });
15
+ export { CmsEntryOpenSearchFilterFeature };
16
+
17
+ //# sourceMappingURL=feature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/CmsEntryOpenSearchFilter/feature.js","sources":["../../../src/features/CmsEntryOpenSearchFilter/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/api\";\nimport { DefaultFilter } from \"./fields/DefaultFilter.js\";\nimport { RefFilter } from \"./fields/RefFilter.js\";\nimport { ObjectFilter } from \"./fields/ObjectFilter.js\";\nimport { CmsEntryOpenSearchFilterRegistry } from \"./CmsEntryOpenSearchFilterRegistry.js\";\n\nexport const CmsEntryOpenSearchFilterFeature = createFeature({\n name: \"Cms/Entry/OpenSearch/FilterFeature\",\n register: container => {\n container.register(DefaultFilter);\n container.register(RefFilter);\n container.register(ObjectFilter);\n container.register(CmsEntryOpenSearchFilterRegistry);\n }\n});\n"],"names":["CmsEntryOpenSearchFilterFeature","createFeature","container","DefaultFilter","RefFilter","ObjectFilter","CmsEntryOpenSearchFilterRegistry"],"mappings":";;;;;AAMO,MAAMA,kCAAkCC,cAAc;IACzD,MAAM;IACN,UAAUC,CAAAA;QACNA,UAAU,QAAQ,CAACC;QACnBD,UAAU,QAAQ,CAACE;QACnBF,UAAU,QAAQ,CAACG;QACnBH,UAAU,QAAQ,CAACI;IACvB;AACJ"}
@@ -0,0 +1,9 @@
1
+ import { CmsEntryOpenSearchFilter } from "../abstractions/CmsEntryOpenSearchFilter.js";
2
+ declare class DefaultFilterImpl implements CmsEntryOpenSearchFilter.Interface {
3
+ readonly fieldType: "*";
4
+ exec(params: CmsEntryOpenSearchFilter.ExecParams): void;
5
+ }
6
+ export declare const DefaultFilter: typeof DefaultFilterImpl & {
7
+ __abstraction: import("@webiny/di").Abstraction<import("../abstractions/CmsEntryOpenSearchFilter.js").ICmsEntryOpenSearchFilter>;
8
+ };
9
+ export {};
@@ -0,0 +1,26 @@
1
+ import error from "@webiny/error";
2
+ import { CmsEntryOpenSearchFilter } from "../abstractions/CmsEntryOpenSearchFilter.js";
3
+ import { FILTER_DEFAULT } from "../constants.js";
4
+ class DefaultFilterImpl {
5
+ exec(params) {
6
+ const { applyFiltering, field } = params;
7
+ if (!field.searchable) {
8
+ const identifier = [
9
+ ...field.parents.map((p)=>p.fieldId),
10
+ field.field.fieldId
11
+ ].join(".");
12
+ throw new error(`Field "${identifier}" is not searchable.`);
13
+ }
14
+ applyFiltering(params);
15
+ }
16
+ constructor(){
17
+ this.fieldType = FILTER_DEFAULT;
18
+ }
19
+ }
20
+ const DefaultFilter = CmsEntryOpenSearchFilter.createImplementation({
21
+ implementation: DefaultFilterImpl,
22
+ dependencies: []
23
+ });
24
+ export { DefaultFilter };
25
+
26
+ //# sourceMappingURL=DefaultFilter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/CmsEntryOpenSearchFilter/fields/DefaultFilter.js","sources":["../../../../src/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport { CmsEntryOpenSearchFilter } from \"../abstractions/CmsEntryOpenSearchFilter.js\";\nimport { FILTER_DEFAULT } from \"../constants.js\";\n\nclass DefaultFilterImpl implements CmsEntryOpenSearchFilter.Interface {\n public readonly fieldType = FILTER_DEFAULT;\n\n public exec(params: CmsEntryOpenSearchFilter.ExecParams): void {\n const { applyFiltering, field } = params;\n if (!field.searchable) {\n const identifier = [...field.parents.map(p => p.fieldId), field.field.fieldId].join(\n \".\"\n );\n throw new WebinyError(`Field \"${identifier}\" is not searchable.`);\n }\n applyFiltering(params);\n }\n}\n\nexport const DefaultFilter = CmsEntryOpenSearchFilter.createImplementation({\n implementation: DefaultFilterImpl,\n dependencies: []\n});\n"],"names":["DefaultFilterImpl","params","applyFiltering","field","identifier","p","WebinyError","FILTER_DEFAULT","DefaultFilter","CmsEntryOpenSearchFilter"],"mappings":";;;AAIA,MAAMA;IAGK,KAAKC,MAA2C,EAAQ;QAC3D,MAAM,EAAEC,cAAc,EAAEC,KAAK,EAAE,GAAGF;QAClC,IAAI,CAACE,MAAM,UAAU,EAAE;YACnB,MAAMC,aAAa;mBAAID,MAAM,OAAO,CAAC,GAAG,CAACE,CAAAA,IAAKA,EAAE,OAAO;gBAAGF,MAAM,KAAK,CAAC,OAAO;aAAC,CAAC,IAAI,CAC/E;YAEJ,MAAM,IAAIG,MAAY,CAAC,OAAO,EAAEF,WAAW,oBAAoB,CAAC;QACpE;QACAF,eAAeD;IACnB;;aAXgB,SAAS,GAAGM;;AAYhC;AAEO,MAAMC,gBAAgBC,yBAAyB,oBAAoB,CAAC;IACvE,gBAAgBT;IAChB,cAAc,EAAE;AACpB"}
@@ -0,0 +1,9 @@
1
+ import { CmsEntryOpenSearchFilter } from "../abstractions/CmsEntryOpenSearchFilter.js";
2
+ declare class ObjectFilterImpl implements CmsEntryOpenSearchFilter.Interface {
3
+ readonly fieldType = "object";
4
+ exec(params: CmsEntryOpenSearchFilter.ExecParams): void;
5
+ }
6
+ export declare const ObjectFilter: typeof ObjectFilterImpl & {
7
+ __abstraction: import("@webiny/di").Abstraction<import("../abstractions/CmsEntryOpenSearchFilter.js").ICmsEntryOpenSearchFilter>;
8
+ };
9
+ export {};
@@ -0,0 +1,43 @@
1
+ import error from "@webiny/error";
2
+ import { CmsEntryOpenSearchFilter } from "../abstractions/CmsEntryOpenSearchFilter.js";
3
+ import { parseWhereKey } from "@webiny/api-opensearch";
4
+ class ObjectFilterImpl {
5
+ exec(params) {
6
+ const { applyFiltering, value: where, fields, field: parentField, getFilter, query } = params;
7
+ for(const key in where){
8
+ const value = where[key];
9
+ if (void 0 === value) continue;
10
+ const { field: whereFieldId, operator } = parseWhereKey(key);
11
+ const identifier = [
12
+ ...parentField.parents.map((p)=>p.fieldId),
13
+ parentField.field.fieldId,
14
+ whereFieldId
15
+ ].join(".");
16
+ const field = fields[identifier];
17
+ if (!field) throw new error(`There is no field "${identifier}".`, "OBJECT_FILTER_FIELD_ERROR", {
18
+ fields: Object.keys(fields)
19
+ });
20
+ const filter = getFilter(field.type);
21
+ filter.exec({
22
+ applyFiltering,
23
+ getFilter,
24
+ key,
25
+ value,
26
+ operator,
27
+ field,
28
+ fields,
29
+ query
30
+ });
31
+ }
32
+ }
33
+ constructor(){
34
+ this.fieldType = "object";
35
+ }
36
+ }
37
+ const ObjectFilter = CmsEntryOpenSearchFilter.createImplementation({
38
+ implementation: ObjectFilterImpl,
39
+ dependencies: []
40
+ });
41
+ export { ObjectFilter };
42
+
43
+ //# sourceMappingURL=ObjectFilter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/CmsEntryOpenSearchFilter/fields/ObjectFilter.js","sources":["../../../../src/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport { CmsEntryOpenSearchFilter } from \"../abstractions/CmsEntryOpenSearchFilter.js\";\nimport { parseWhereKey } from \"@webiny/api-opensearch\";\n\nclass ObjectFilterImpl implements CmsEntryOpenSearchFilter.Interface {\n public readonly fieldType = \"object\";\n\n public exec(params: CmsEntryOpenSearchFilter.ExecParams): void {\n const {\n applyFiltering,\n value: where,\n fields,\n field: parentField,\n getFilter,\n query\n } = params;\n /**\n * Because this is an object field, we must construct filters based on the value property.\n * Value property is actually a where condition.\n */\n for (const key in where) {\n const value = where[key];\n if (value === undefined) {\n continue;\n }\n const { field: whereFieldId, operator } = parseWhereKey(key);\n\n const identifier = [\n ...parentField.parents.map(p => p.fieldId),\n parentField.field.fieldId,\n whereFieldId\n ].join(\".\");\n const field = fields[identifier];\n if (!field) {\n throw new WebinyError(\n `There is no field \"${identifier}\".`,\n \"OBJECT_FILTER_FIELD_ERROR\",\n {\n fields: Object.keys(fields)\n }\n );\n }\n /**\n * We need to find the filter for the child field.\n * This will throw error if no filter can be found.\n */\n const filter = getFilter(field.type);\n /**\n * Basically this allows us to go into depth as much as we want with the object fields.\n */\n filter.exec({\n applyFiltering,\n getFilter,\n key,\n value,\n operator,\n field,\n fields,\n query\n });\n }\n }\n}\n\nexport const ObjectFilter = CmsEntryOpenSearchFilter.createImplementation({\n implementation: ObjectFilterImpl,\n dependencies: []\n});\n"],"names":["ObjectFilterImpl","params","applyFiltering","where","fields","parentField","getFilter","query","key","value","undefined","whereFieldId","operator","parseWhereKey","identifier","p","field","WebinyError","Object","filter","ObjectFilter","CmsEntryOpenSearchFilter"],"mappings":";;;AAIA,MAAMA;IAGK,KAAKC,MAA2C,EAAQ;QAC3D,MAAM,EACFC,cAAc,EACd,OAAOC,KAAK,EACZC,MAAM,EACN,OAAOC,WAAW,EAClBC,SAAS,EACTC,KAAK,EACR,GAAGN;QAKJ,IAAK,MAAMO,OAAOL,MAAO;YACrB,MAAMM,QAAQN,KAAK,CAACK,IAAI;YACxB,IAAIC,AAAUC,WAAVD,OACA;YAEJ,MAAM,EAAE,OAAOE,YAAY,EAAEC,QAAQ,EAAE,GAAGC,cAAcL;YAExD,MAAMM,aAAa;mBACZT,YAAY,OAAO,CAAC,GAAG,CAACU,CAAAA,IAAKA,EAAE,OAAO;gBACzCV,YAAY,KAAK,CAAC,OAAO;gBACzBM;aACH,CAAC,IAAI,CAAC;YACP,MAAMK,QAAQZ,MAAM,CAACU,WAAW;YAChC,IAAI,CAACE,OACD,MAAM,IAAIC,MACN,CAAC,mBAAmB,EAAEH,WAAW,EAAE,CAAC,EACpC,6BACA;gBACI,QAAQI,OAAO,IAAI,CAACd;YACxB;YAOR,MAAMe,SAASb,UAAUU,MAAM,IAAI;YAInCG,OAAO,IAAI,CAAC;gBACRjB;gBACAI;gBACAE;gBACAC;gBACAG;gBACAI;gBACAZ;gBACAG;YACJ;QACJ;IACJ;;aAxDgB,SAAS,GAAG;;AAyDhC;AAEO,MAAMa,eAAeC,yBAAyB,oBAAoB,CAAC;IACtE,gBAAgBrB;IAChB,cAAc,EAAE;AACpB"}
@@ -0,0 +1,9 @@
1
+ import { CmsEntryOpenSearchFilter } from "../abstractions/CmsEntryOpenSearchFilter.js";
2
+ declare class RefFilterImpl implements CmsEntryOpenSearchFilter.Interface {
3
+ readonly fieldType = "ref";
4
+ exec(params: CmsEntryOpenSearchFilter.ExecParams): void;
5
+ }
6
+ export declare const RefFilter: typeof RefFilterImpl & {
7
+ __abstraction: import("@webiny/di").Abstraction<import("../abstractions/CmsEntryOpenSearchFilter.js").ICmsEntryOpenSearchFilter>;
8
+ };
9
+ export {};
@@ -0,0 +1,36 @@
1
+ import error from "@webiny/error";
2
+ import { CmsEntryOpenSearchFilter } from "../abstractions/CmsEntryOpenSearchFilter.js";
3
+ import { parseWhereKey } from "@webiny/api-opensearch";
4
+ class RefFilterImpl {
5
+ exec(params) {
6
+ const { applyFiltering, query, field } = params;
7
+ let values = params.value;
8
+ if ("object" != typeof values) throw new error("When querying by ref field, value of the field must be an object.", "OBJECT_REQUIRED", {
9
+ value: values
10
+ });
11
+ if (null == values) values = {
12
+ entryId: null
13
+ };
14
+ for(const key in values){
15
+ const { operator } = parseWhereKey(key);
16
+ const value = values[key];
17
+ if (void 0 !== value) applyFiltering({
18
+ query,
19
+ field,
20
+ operator,
21
+ key,
22
+ value
23
+ });
24
+ }
25
+ }
26
+ constructor(){
27
+ this.fieldType = "ref";
28
+ }
29
+ }
30
+ const RefFilter = CmsEntryOpenSearchFilter.createImplementation({
31
+ implementation: RefFilterImpl,
32
+ dependencies: []
33
+ });
34
+ export { RefFilter };
35
+
36
+ //# sourceMappingURL=RefFilter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/CmsEntryOpenSearchFilter/fields/RefFilter.js","sources":["../../../../src/features/CmsEntryOpenSearchFilter/fields/RefFilter.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport { CmsEntryOpenSearchFilter } from \"../abstractions/CmsEntryOpenSearchFilter.js\";\nimport { parseWhereKey } from \"@webiny/api-opensearch\";\n\nclass RefFilterImpl implements CmsEntryOpenSearchFilter.Interface {\n public readonly fieldType = \"ref\";\n\n public exec(params: CmsEntryOpenSearchFilter.ExecParams): void {\n const { applyFiltering, query, field } = params;\n\n let values = params.value;\n /**\n * We must have an object when querying in the ref field.\n */\n if (typeof values !== \"object\") {\n throw new WebinyError(\n `When querying by ref field, value of the field must be an object.`,\n \"OBJECT_REQUIRED\",\n {\n value: values\n }\n );\n }\n\n if (values === null || values === undefined) {\n values = {\n entryId: null\n };\n }\n\n for (const key in values) {\n const { operator } = parseWhereKey(key);\n const value = values[key];\n if (value === undefined) {\n continue;\n }\n\n applyFiltering({\n query,\n field,\n operator,\n key,\n value\n });\n }\n }\n}\n\nexport const RefFilter = CmsEntryOpenSearchFilter.createImplementation({\n implementation: RefFilterImpl,\n dependencies: []\n});\n"],"names":["RefFilterImpl","params","applyFiltering","query","field","values","WebinyError","key","operator","parseWhereKey","value","undefined","RefFilter","CmsEntryOpenSearchFilter"],"mappings":";;;AAIA,MAAMA;IAGK,KAAKC,MAA2C,EAAQ;QAC3D,MAAM,EAAEC,cAAc,EAAEC,KAAK,EAAEC,KAAK,EAAE,GAAGH;QAEzC,IAAII,SAASJ,OAAO,KAAK;QAIzB,IAAI,AAAkB,YAAlB,OAAOI,QACP,MAAM,IAAIC,MACN,qEACA,mBACA;YACI,OAAOD;QACX;QAIR,IAAIA,QAAAA,QACAA,SAAS;YACL,SAAS;QACb;QAGJ,IAAK,MAAME,OAAOF,OAAQ;YACtB,MAAM,EAAEG,QAAQ,EAAE,GAAGC,cAAcF;YACnC,MAAMG,QAAQL,MAAM,CAACE,IAAI;YACzB,IAAIG,AAAUC,WAAVD,OAIJR,eAAe;gBACXC;gBACAC;gBACAI;gBACAD;gBACAG;YACJ;QACJ;IACJ;;aAxCgB,SAAS,GAAG;;AAyChC;AAEO,MAAME,YAAYC,yBAAyB,oBAAoB,CAAC;IACnE,gBAAgBb;IAChB,cAAc,EAAE;AACpB"}
@@ -0,0 +1,3 @@
1
+ export { CmsEntryOpenSearchFilter } from "./abstractions/CmsEntryOpenSearchFilter.js";
2
+ export { CmsEntryOpenSearchFilterRegistry } from "./abstractions/CmsEntryOpenSearchFilterRegistry.js";
3
+ export { CmsEntryOpenSearchFilterFeature } from "./feature.js";
@@ -0,0 +1,3 @@
1
+ export { CmsEntryOpenSearchFilter } from "./abstractions/CmsEntryOpenSearchFilter.js";
2
+ export { CmsEntryOpenSearchFilterRegistry } from "./abstractions/CmsEntryOpenSearchFilterRegistry.js";
3
+ export { CmsEntryOpenSearchFilterFeature } from "./feature.js";
@@ -0,0 +1,20 @@
1
+ import type { CmsModel } from "@webiny/api-headless-cms/types/index.js";
2
+ import type { OpenSearchBoolQueryConfig } from "@webiny/api-opensearch/types.js";
3
+ import type { ModelField, ModelFields } from "../../operations/entry/elasticsearch/types.js";
4
+ export interface ApplyFullTextSearchParams {
5
+ model: CmsModel;
6
+ query: OpenSearchBoolQueryConfig;
7
+ term: string;
8
+ fields: ModelFields;
9
+ createFieldPath: (field: ModelField) => string;
10
+ prepareTerm: (term: string) => string;
11
+ }
12
+ export interface ICmsEntryOpenSearchFullTextSearch {
13
+ readonly models?: string[];
14
+ apply(params: ApplyFullTextSearchParams): void;
15
+ }
16
+ export declare const CmsEntryOpenSearchFullTextSearch: import("@webiny/di").Abstraction<ICmsEntryOpenSearchFullTextSearch>;
17
+ export declare namespace CmsEntryOpenSearchFullTextSearch {
18
+ type Interface = ICmsEntryOpenSearchFullTextSearch;
19
+ type Params = ApplyFullTextSearchParams;
20
+ }
@@ -0,0 +1,5 @@
1
+ import { createAbstraction } from "@webiny/feature/api";
2
+ const CmsEntryOpenSearchFullTextSearch = createAbstraction("Cms/Entry/OpenSearch/FullTextSearch");
3
+ export { CmsEntryOpenSearchFullTextSearch };
4
+
5
+ //# sourceMappingURL=abstractions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/CmsEntryOpenSearchFullTextSearch/abstractions.js","sources":["../../../src/features/CmsEntryOpenSearchFullTextSearch/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { CmsModel } from \"@webiny/api-headless-cms/types/index.js\";\nimport type { OpenSearchBoolQueryConfig } from \"@webiny/api-opensearch/types.js\";\nimport type { ModelField, ModelFields } from \"~/operations/entry/elasticsearch/types.js\";\n\nexport interface ApplyFullTextSearchParams {\n model: CmsModel;\n query: OpenSearchBoolQueryConfig;\n term: string;\n fields: ModelFields;\n createFieldPath: (field: ModelField) => string;\n prepareTerm: (term: string) => string;\n}\n\nexport interface ICmsEntryOpenSearchFullTextSearch {\n readonly models?: string[];\n apply(params: ApplyFullTextSearchParams): void;\n}\n\nexport const CmsEntryOpenSearchFullTextSearch =\n createAbstraction<ICmsEntryOpenSearchFullTextSearch>(\"Cms/Entry/OpenSearch/FullTextSearch\");\n\nexport namespace CmsEntryOpenSearchFullTextSearch {\n export type Interface = ICmsEntryOpenSearchFullTextSearch;\n export type Params = ApplyFullTextSearchParams;\n}\n"],"names":["CmsEntryOpenSearchFullTextSearch","createAbstraction"],"mappings":";AAmBO,MAAMA,mCACTC,kBAAqD"}
@@ -0,0 +1 @@
1
+ export { CmsEntryOpenSearchFullTextSearch } from "./abstractions.js";
@@ -0,0 +1 @@
1
+ export { CmsEntryOpenSearchFullTextSearch } from "./abstractions.js";
@@ -0,0 +1,11 @@
1
+ import { CmsEntryOpenSearchIndex } from "./abstractions.js";
2
+ import type { OpenSearchIndexRequestBody } from "@webiny/api-opensearch/types.js";
3
+ declare class BaseOpenSearchIndexImpl implements CmsEntryOpenSearchIndex.Interface {
4
+ readonly body: OpenSearchIndexRequestBody;
5
+ constructor();
6
+ canUse(_: CmsEntryOpenSearchIndex.CanUseParams): boolean;
7
+ }
8
+ export declare const BaseOpenSearchIndex: typeof BaseOpenSearchIndexImpl & {
9
+ __abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").ICmsEntryOpenSearchIndex>;
10
+ };
11
+ export {};
@@ -0,0 +1,17 @@
1
+ import { getBaseConfiguration } from "@webiny/api-opensearch";
2
+ import { CmsEntryOpenSearchIndex } from "./abstractions.js";
3
+ class BaseOpenSearchIndexImpl {
4
+ constructor(){
5
+ this.body = getBaseConfiguration();
6
+ }
7
+ canUse(_) {
8
+ return true;
9
+ }
10
+ }
11
+ const BaseOpenSearchIndex = CmsEntryOpenSearchIndex.createImplementation({
12
+ implementation: BaseOpenSearchIndexImpl,
13
+ dependencies: []
14
+ });
15
+ export { BaseOpenSearchIndex };
16
+
17
+ //# sourceMappingURL=BaseOpenSearchIndex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/CmsEntryOpenSearchIndex/BaseOpenSearchIndex.js","sources":["../../../src/features/CmsEntryOpenSearchIndex/BaseOpenSearchIndex.ts"],"sourcesContent":["import { getBaseConfiguration } from \"@webiny/api-opensearch\";\nimport { CmsEntryOpenSearchIndex } from \"./abstractions.js\";\nimport type { OpenSearchIndexRequestBody } from \"@webiny/api-opensearch/types.js\";\n\nclass BaseOpenSearchIndexImpl implements CmsEntryOpenSearchIndex.Interface {\n public readonly body: OpenSearchIndexRequestBody;\n\n public constructor() {\n this.body = getBaseConfiguration();\n }\n public canUse(_: CmsEntryOpenSearchIndex.CanUseParams): boolean {\n return true;\n }\n}\n\nexport const BaseOpenSearchIndex = CmsEntryOpenSearchIndex.createImplementation({\n implementation: BaseOpenSearchIndexImpl,\n dependencies: []\n});\n"],"names":["BaseOpenSearchIndexImpl","getBaseConfiguration","_","BaseOpenSearchIndex","CmsEntryOpenSearchIndex"],"mappings":";;AAIA,MAAMA;IAGF,aAAqB;QACjB,IAAI,CAAC,IAAI,GAAGC;IAChB;IACO,OAAOC,CAAuC,EAAW;QAC5D,OAAO;IACX;AACJ;AAEO,MAAMC,sBAAsBC,wBAAwB,oBAAoB,CAAC;IAC5E,gBAAgBJ;IAChB,cAAc,EAAE;AACpB"}
@@ -0,0 +1,14 @@
1
+ import type { OpenSearchIndexRequestBody } from "@webiny/api-opensearch/types.js";
2
+ import type { CmsModel } from "@webiny/api-headless-cms/types/index.js";
3
+ export interface ICmsEntryOpenSearchIndexCanUseParams {
4
+ model: Pick<CmsModel, "tenant" | "modelId" | "group">;
5
+ }
6
+ export interface ICmsEntryOpenSearchIndex {
7
+ readonly body: OpenSearchIndexRequestBody;
8
+ canUse(params: ICmsEntryOpenSearchIndexCanUseParams): boolean;
9
+ }
10
+ export declare const CmsEntryOpenSearchIndex: import("@webiny/di").Abstraction<ICmsEntryOpenSearchIndex>;
11
+ export declare namespace CmsEntryOpenSearchIndex {
12
+ type Interface = ICmsEntryOpenSearchIndex;
13
+ type CanUseParams = ICmsEntryOpenSearchIndexCanUseParams;
14
+ }
@@ -0,0 +1,5 @@
1
+ import { createAbstraction } from "@webiny/feature/api";
2
+ const CmsEntryOpenSearchIndex = createAbstraction("Cms/Entry/OpenSearch/Index");
3
+ export { CmsEntryOpenSearchIndex };
4
+
5
+ //# sourceMappingURL=abstractions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/CmsEntryOpenSearchIndex/abstractions.js","sources":["../../../src/features/CmsEntryOpenSearchIndex/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { OpenSearchIndexRequestBody } from \"@webiny/api-opensearch/types.js\";\nimport type { CmsModel } from \"@webiny/api-headless-cms/types/index.js\";\n\nexport interface ICmsEntryOpenSearchIndexCanUseParams {\n model: Pick<CmsModel, \"tenant\" | \"modelId\" | \"group\">;\n}\n\nexport interface ICmsEntryOpenSearchIndex {\n readonly body: OpenSearchIndexRequestBody;\n canUse(params: ICmsEntryOpenSearchIndexCanUseParams): boolean;\n}\n\nexport const CmsEntryOpenSearchIndex = createAbstraction<ICmsEntryOpenSearchIndex>(\n \"Cms/Entry/OpenSearch/Index\"\n);\n\nexport namespace CmsEntryOpenSearchIndex {\n export type Interface = ICmsEntryOpenSearchIndex;\n export type CanUseParams = ICmsEntryOpenSearchIndexCanUseParams;\n}\n"],"names":["CmsEntryOpenSearchIndex","createAbstraction"],"mappings":";AAaO,MAAMA,0BAA0BC,kBACnC"}
@@ -0,0 +1,4 @@
1
+ export declare const CmsEntryOpenSearchIndexFeature: {
2
+ name: string;
3
+ register(container: import("@webiny/di").Container): void;
4
+ };
@@ -0,0 +1,11 @@
1
+ import { createFeature } from "@webiny/feature/api";
2
+ import { BaseOpenSearchIndex } from "./BaseOpenSearchIndex.js";
3
+ const CmsEntryOpenSearchIndexFeature = createFeature({
4
+ name: "Cms/Entry/OpenSearch/IndexFeature",
5
+ register: (container)=>{
6
+ container.register(BaseOpenSearchIndex);
7
+ }
8
+ });
9
+ export { CmsEntryOpenSearchIndexFeature };
10
+
11
+ //# sourceMappingURL=feature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/CmsEntryOpenSearchIndex/feature.js","sources":["../../../src/features/CmsEntryOpenSearchIndex/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/api\";\nimport { BaseOpenSearchIndex } from \"./BaseOpenSearchIndex.js\";\n\nexport const CmsEntryOpenSearchIndexFeature = createFeature({\n name: \"Cms/Entry/OpenSearch/IndexFeature\",\n register: container => {\n container.register(BaseOpenSearchIndex);\n }\n});\n"],"names":["CmsEntryOpenSearchIndexFeature","createFeature","container","BaseOpenSearchIndex"],"mappings":";;AAGO,MAAMA,iCAAiCC,cAAc;IACxD,MAAM;IACN,UAAUC,CAAAA;QACNA,UAAU,QAAQ,CAACC;IACvB;AACJ"}
@@ -0,0 +1,3 @@
1
+ export { CmsEntryOpenSearchIndexFeature } from "./feature.js";
2
+ export { CmsEntryOpenSearchIndex } from "./abstractions.js";
3
+ export { BaseOpenSearchIndex } from "./BaseOpenSearchIndex.js";
@@ -0,0 +1,3 @@
1
+ export { CmsEntryOpenSearchIndexFeature } from "./feature.js";
2
+ export { CmsEntryOpenSearchIndex } from "./abstractions.js";
3
+ export { BaseOpenSearchIndex } from "./BaseOpenSearchIndex.js";
@@ -0,0 +1,16 @@
1
+ import type { CmsModel } from "@webiny/api-headless-cms/types/index.js";
2
+ import type { OpenSearchBoolQueryConfig } from "@webiny/api-opensearch/types.js";
3
+ export interface ModifyQueryParams {
4
+ query: OpenSearchBoolQueryConfig;
5
+ model: CmsModel;
6
+ where: Record<string, any>;
7
+ }
8
+ export interface ICmsEntryOpenSearchQueryModifier {
9
+ readonly modelId?: string;
10
+ modifyQuery(params: ModifyQueryParams): void;
11
+ }
12
+ export declare const CmsEntryOpenSearchQueryModifier: import("@webiny/di").Abstraction<ICmsEntryOpenSearchQueryModifier>;
13
+ export declare namespace CmsEntryOpenSearchQueryModifier {
14
+ type Interface = ICmsEntryOpenSearchQueryModifier;
15
+ type Params = ModifyQueryParams;
16
+ }
@@ -0,0 +1,5 @@
1
+ import { createAbstraction } from "@webiny/feature/api";
2
+ const CmsEntryOpenSearchQueryModifier = createAbstraction("Cms/Entry/OpenSearch/QueryModifier");
3
+ export { CmsEntryOpenSearchQueryModifier };
4
+
5
+ //# sourceMappingURL=abstractions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/CmsEntryOpenSearchQueryModifier/abstractions.js","sources":["../../../src/features/CmsEntryOpenSearchQueryModifier/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { CmsModel } from \"@webiny/api-headless-cms/types/index.js\";\nimport type { OpenSearchBoolQueryConfig } from \"@webiny/api-opensearch/types.js\";\n\nexport interface ModifyQueryParams {\n query: OpenSearchBoolQueryConfig;\n model: CmsModel;\n where: Record<string, any>;\n}\n\nexport interface ICmsEntryOpenSearchQueryModifier {\n readonly modelId?: string;\n modifyQuery(params: ModifyQueryParams): void;\n}\n\nexport const CmsEntryOpenSearchQueryModifier = createAbstraction<ICmsEntryOpenSearchQueryModifier>(\n \"Cms/Entry/OpenSearch/QueryModifier\"\n);\n\nexport namespace CmsEntryOpenSearchQueryModifier {\n export type Interface = ICmsEntryOpenSearchQueryModifier;\n export type Params = ModifyQueryParams;\n}\n"],"names":["CmsEntryOpenSearchQueryModifier","createAbstraction"],"mappings":";AAeO,MAAMA,kCAAkCC,kBAC3C"}
@@ -0,0 +1 @@
1
+ export { CmsEntryOpenSearchQueryModifier } from "./abstractions.js";
@@ -0,0 +1 @@
1
+ export { CmsEntryOpenSearchQueryModifier } from "./abstractions.js";