@webiny/api-headless-cms-ddb-es 0.0.0-unstable.b14eaecf38 → 0.0.0-unstable.b6d7105cee

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 (433) hide show
  1. package/README.md +6 -30
  2. package/configurations.d.ts +20 -10
  3. package/configurations.js +34 -32
  4. package/configurations.js.map +1 -1
  5. package/definitions/entry.d.ts +4 -5
  6. package/definitions/entry.js +10 -87
  7. package/definitions/entry.js.map +1 -1
  8. package/definitions/group.d.ts +6 -6
  9. package/definitions/group.js +10 -64
  10. package/definitions/group.js.map +1 -1
  11. package/definitions/model.d.ts +6 -6
  12. package/definitions/model.js +10 -108
  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 +6 -6
  17. package/elasticsearch/createElasticsearchIndex.js +42 -46
  18. package/elasticsearch/createElasticsearchIndex.js.map +1 -1
  19. package/elasticsearch/deleteElasticsearchIndex.d.ts +6 -4
  20. package/elasticsearch/deleteElasticsearchIndex.js +21 -34
  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 +201 -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/CmsEntryOpenSearchQueryModifier/abstractions.d.ts +16 -0
  108. package/features/CmsEntryOpenSearchQueryModifier/abstractions.js +5 -0
  109. package/features/CmsEntryOpenSearchQueryModifier/abstractions.js.map +1 -0
  110. package/features/CmsEntryOpenSearchQueryModifier/index.d.ts +1 -0
  111. package/features/CmsEntryOpenSearchQueryModifier/index.js +1 -0
  112. package/features/CmsEntryOpenSearchSortModifier/abstractions.d.ts +15 -0
  113. package/features/CmsEntryOpenSearchSortModifier/abstractions.js +5 -0
  114. package/features/CmsEntryOpenSearchSortModifier/abstractions.js.map +1 -0
  115. package/features/CmsEntryOpenSearchSortModifier/index.d.ts +1 -0
  116. package/features/CmsEntryOpenSearchSortModifier/index.js +1 -0
  117. package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.d.ts +12 -0
  118. package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.js +31 -0
  119. package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.js.map +1 -0
  120. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.d.ts +22 -0
  121. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.js +5 -0
  122. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.js.map +1 -0
  123. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.d.ts +10 -0
  124. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.js +5 -0
  125. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.js.map +1 -0
  126. package/features/CmsEntryOpenSearchValueSearch/feature.d.ts +4 -0
  127. package/features/CmsEntryOpenSearchValueSearch/feature.js +17 -0
  128. package/features/CmsEntryOpenSearchValueSearch/feature.js.map +1 -0
  129. package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.d.ts +10 -0
  130. package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.js +21 -0
  131. package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.js.map +1 -0
  132. package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.d.ts +10 -0
  133. package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.js +44 -0
  134. package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.js.map +1 -0
  135. package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.d.ts +10 -0
  136. package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.js +22 -0
  137. package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.js.map +1 -0
  138. package/features/CmsEntryOpenSearchValueSearch/index.d.ts +3 -0
  139. package/features/CmsEntryOpenSearchValueSearch/index.js +3 -0
  140. package/features/CmsEntryOpenSearchValuesModifier/abstractions.d.ts +23 -0
  141. package/features/CmsEntryOpenSearchValuesModifier/abstractions.js +5 -0
  142. package/features/CmsEntryOpenSearchValuesModifier/abstractions.js.map +1 -0
  143. package/features/CmsEntryOpenSearchValuesModifier/index.d.ts +1 -0
  144. package/features/CmsEntryOpenSearchValuesModifier/index.js +1 -0
  145. package/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.d.ts +25 -0
  146. package/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.js +36 -0
  147. package/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.js.map +1 -0
  148. package/features/CmsModelOpenSearchIndex/DefaultCmsModelOpenSearchIndex.d.ts +8 -0
  149. package/features/CmsModelOpenSearchIndex/DefaultCmsModelOpenSearchIndex.js +17 -0
  150. package/features/CmsModelOpenSearchIndex/DefaultCmsModelOpenSearchIndex.js.map +1 -0
  151. package/features/CmsModelOpenSearchIndex/abstractions.d.ts +20 -0
  152. package/features/CmsModelOpenSearchIndex/abstractions.js +5 -0
  153. package/features/CmsModelOpenSearchIndex/abstractions.js.map +1 -0
  154. package/features/CmsModelOpenSearchIndex/feature.d.ts +4 -0
  155. package/features/CmsModelOpenSearchIndex/feature.js +13 -0
  156. package/features/CmsModelOpenSearchIndex/feature.js.map +1 -0
  157. package/features/CmsModelOpenSearchIndex/index.d.ts +3 -0
  158. package/features/CmsModelOpenSearchIndex/index.js +3 -0
  159. package/helpers/entryIndexHelpers.d.ts +13 -11
  160. package/helpers/entryIndexHelpers.js +73 -168
  161. package/helpers/entryIndexHelpers.js.map +1 -1
  162. package/helpers/fieldIdentifier.d.ts +6 -0
  163. package/helpers/fieldIdentifier.js +23 -0
  164. package/helpers/fieldIdentifier.js.map +1 -0
  165. package/helpers/index.d.ts +2 -1
  166. package/helpers/index.js +2 -16
  167. package/index.d.ts +1 -3
  168. package/index.js +1 -215
  169. package/operations/entry/dataLoader/DataLoaderCache.d.ts +16 -0
  170. package/operations/entry/dataLoader/DataLoaderCache.js +27 -0
  171. package/operations/entry/dataLoader/DataLoaderCache.js.map +1 -0
  172. package/operations/entry/dataLoader/constants.d.ts +1 -0
  173. package/operations/entry/dataLoader/constants.js +5 -0
  174. package/operations/entry/dataLoader/constants.js.map +1 -0
  175. package/operations/entry/dataLoader/createBatchScheduleFn.d.ts +8 -0
  176. package/operations/entry/dataLoader/createBatchScheduleFn.js +10 -0
  177. package/operations/entry/dataLoader/createBatchScheduleFn.js.map +1 -0
  178. package/operations/entry/dataLoader/getAllEntryRevisions.d.ts +4 -0
  179. package/operations/entry/dataLoader/getAllEntryRevisions.js +24 -0
  180. package/operations/entry/dataLoader/getAllEntryRevisions.js.map +1 -0
  181. package/operations/entry/dataLoader/getLatestRevisionByEntryId.d.ts +4 -0
  182. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js +34 -0
  183. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js.map +1 -0
  184. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.d.ts +4 -0
  185. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js +34 -0
  186. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js.map +1 -0
  187. package/operations/entry/dataLoader/getRevisionById.d.ts +4 -0
  188. package/operations/entry/dataLoader/getRevisionById.js +40 -0
  189. package/operations/entry/dataLoader/getRevisionById.js.map +1 -0
  190. package/operations/entry/dataLoader/index.d.ts +8 -0
  191. package/operations/entry/dataLoader/index.js +18 -0
  192. package/operations/entry/dataLoader/index.js.map +1 -0
  193. package/operations/entry/dataLoader/types.d.ts +6 -0
  194. package/operations/entry/dataLoader/types.js +0 -0
  195. package/operations/entry/dataLoaders.d.ts +17 -38
  196. package/operations/entry/dataLoaders.js +83 -306
  197. package/operations/entry/dataLoaders.js.map +1 -1
  198. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.d.ts +1 -1
  199. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js +8 -31
  200. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js.map +1 -1
  201. package/operations/entry/elasticsearch/body.d.ts +25 -6
  202. package/operations/entry/elasticsearch/body.js +85 -136
  203. package/operations/entry/elasticsearch/body.js.map +1 -1
  204. package/operations/entry/elasticsearch/fields/createSystemField.d.ts +4 -0
  205. package/operations/entry/elasticsearch/fields/createSystemField.js +9 -0
  206. package/operations/entry/elasticsearch/fields/createSystemField.js.map +1 -0
  207. package/operations/entry/elasticsearch/fields/live.d.ts +2 -0
  208. package/operations/entry/elasticsearch/fields/live.js +50 -0
  209. package/operations/entry/elasticsearch/fields/live.js.map +1 -0
  210. package/operations/entry/elasticsearch/fields/location.d.ts +2 -0
  211. package/operations/entry/elasticsearch/fields/location.js +50 -0
  212. package/operations/entry/elasticsearch/fields/location.js.map +1 -0
  213. package/operations/entry/elasticsearch/fields/state.d.ts +2 -0
  214. package/operations/entry/elasticsearch/fields/state.js +104 -0
  215. package/operations/entry/elasticsearch/fields/state.js.map +1 -0
  216. package/operations/entry/elasticsearch/fields.d.ts +8 -6
  217. package/operations/entry/elasticsearch/fields.js +202 -256
  218. package/operations/entry/elasticsearch/fields.js.map +1 -1
  219. package/operations/entry/elasticsearch/filtering/applyFiltering.d.ts +6 -5
  220. package/operations/entry/elasticsearch/filtering/applyFiltering.js +37 -55
  221. package/operations/entry/elasticsearch/filtering/applyFiltering.js.map +1 -1
  222. package/operations/entry/elasticsearch/filtering/exec.d.ts +13 -8
  223. package/operations/entry/elasticsearch/filtering/exec.js +93 -169
  224. package/operations/entry/elasticsearch/filtering/exec.js.map +1 -1
  225. package/operations/entry/elasticsearch/filtering/index.d.ts +1 -1
  226. package/operations/entry/elasticsearch/filtering/index.js +1 -16
  227. package/operations/entry/elasticsearch/filtering/path.d.ts +5 -3
  228. package/operations/entry/elasticsearch/filtering/path.js +26 -43
  229. package/operations/entry/elasticsearch/filtering/path.js.map +1 -1
  230. package/operations/entry/elasticsearch/filtering/populated.d.ts +2 -2
  231. package/operations/entry/elasticsearch/filtering/populated.js +10 -21
  232. package/operations/entry/elasticsearch/filtering/populated.js.map +1 -1
  233. package/operations/entry/elasticsearch/filtering/values.d.ts +1 -1
  234. package/operations/entry/elasticsearch/filtering/values.js +13 -20
  235. package/operations/entry/elasticsearch/filtering/values.js.map +1 -1
  236. package/operations/entry/elasticsearch/fullTextSearch.d.ts +7 -6
  237. package/operations/entry/elasticsearch/fullTextSearch.js +47 -85
  238. package/operations/entry/elasticsearch/fullTextSearch.js.map +1 -1
  239. package/operations/entry/elasticsearch/fullTextSearchFields.d.ts +4 -4
  240. package/operations/entry/elasticsearch/fullTextSearchFields.js +9 -24
  241. package/operations/entry/elasticsearch/fullTextSearchFields.js.map +1 -1
  242. package/operations/entry/elasticsearch/initialQuery.d.ts +5 -4
  243. package/operations/entry/elasticsearch/initialQuery.js +38 -98
  244. package/operations/entry/elasticsearch/initialQuery.js.map +1 -1
  245. package/operations/entry/elasticsearch/keyword.d.ts +1 -1
  246. package/operations/entry/elasticsearch/keyword.js +16 -33
  247. package/operations/entry/elasticsearch/keyword.js.map +1 -1
  248. package/operations/entry/elasticsearch/plugins/operator.d.ts +4 -5
  249. package/operations/entry/elasticsearch/plugins/operator.js +9 -36
  250. package/operations/entry/elasticsearch/plugins/operator.js.map +1 -1
  251. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.d.ts +2 -0
  252. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js +8 -0
  253. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js.map +1 -0
  254. package/operations/entry/elasticsearch/sort.d.ts +9 -6
  255. package/operations/entry/elasticsearch/sort.js +76 -77
  256. package/operations/entry/elasticsearch/sort.js.map +1 -1
  257. package/operations/entry/elasticsearch/transformValueForSearch.d.ts +3 -10
  258. package/operations/entry/elasticsearch/transformValueForSearch.js +11 -29
  259. package/operations/entry/elasticsearch/transformValueForSearch.js.map +1 -1
  260. package/operations/entry/elasticsearch/types.d.ts +6 -16
  261. package/operations/entry/elasticsearch/types.js +0 -5
  262. package/operations/entry/index.d.ts +33 -6
  263. package/operations/entry/index.js +1348 -1138
  264. package/operations/entry/index.js.map +1 -1
  265. package/operations/entry/keys.d.ts +31 -1
  266. package/operations/entry/keys.js +46 -27
  267. package/operations/entry/keys.js.map +1 -1
  268. package/operations/entry/recordType.js +5 -17
  269. package/operations/entry/recordType.js.map +1 -1
  270. package/operations/entry/transformations/convertEntryKeys.d.ts +8 -0
  271. package/operations/entry/transformations/convertEntryKeys.js +25 -0
  272. package/operations/entry/transformations/convertEntryKeys.js.map +1 -0
  273. package/operations/entry/transformations/index.d.ts +33 -0
  274. package/operations/entry/transformations/index.js +91 -0
  275. package/operations/entry/transformations/index.js.map +1 -0
  276. package/operations/entry/transformations/modifyEntryValues.d.ts +53 -0
  277. package/operations/entry/transformations/modifyEntryValues.js +16 -0
  278. package/operations/entry/transformations/modifyEntryValues.js.map +1 -0
  279. package/operations/entry/transformations/transformEntryKeys.d.ts +11 -0
  280. package/operations/entry/transformations/transformEntryKeys.js +17 -0
  281. package/operations/entry/transformations/transformEntryKeys.js.map +1 -0
  282. package/operations/entry/transformations/transformEntryToIndex.d.ts +10 -0
  283. package/operations/entry/transformations/transformEntryToIndex.js +20 -0
  284. package/operations/entry/transformations/transformEntryToIndex.js.map +1 -0
  285. package/operations/group/index.d.ts +7 -6
  286. package/operations/group/index.js +117 -161
  287. package/operations/group/index.js.map +1 -1
  288. package/operations/model/index.d.ts +6 -4
  289. package/operations/model/index.js +115 -167
  290. package/operations/model/index.js.map +1 -1
  291. package/package.json +44 -48
  292. package/tasks/CreateElasticsearchIndexTask.d.ts +14 -0
  293. package/tasks/CreateElasticsearchIndexTask.js +40 -0
  294. package/tasks/CreateElasticsearchIndexTask.js.map +1 -0
  295. package/types.d.ts +31 -137
  296. package/types.js +9 -41
  297. package/types.js.map +1 -1
  298. package/values/NoValueContainer.d.ts +5 -0
  299. package/values/NoValueContainer.js +11 -0
  300. package/values/NoValueContainer.js.map +1 -0
  301. package/definitions/entryElasticsearch.d.ts +0 -8
  302. package/definitions/entryElasticsearch.js +0 -37
  303. package/definitions/entryElasticsearch.js.map +0 -1
  304. package/definitions/settings.d.ts +0 -8
  305. package/definitions/settings.js +0 -53
  306. package/definitions/settings.js.map +0 -1
  307. package/definitions/system.d.ts +0 -8
  308. package/definitions/system.js +0 -41
  309. package/definitions/system.js.map +0 -1
  310. package/definitions/table.d.ts +0 -8
  311. package/definitions/table.js +0 -21
  312. package/definitions/table.js.map +0 -1
  313. package/definitions/tableElasticsearch.d.ts +0 -8
  314. package/definitions/tableElasticsearch.js +0 -21
  315. package/definitions/tableElasticsearch.js.map +0 -1
  316. package/dynamoDb/index.d.ts +0 -2
  317. package/dynamoDb/index.js +0 -11
  318. package/dynamoDb/index.js.map +0 -1
  319. package/dynamoDb/storage/date.d.ts +0 -3
  320. package/dynamoDb/storage/date.js +0 -86
  321. package/dynamoDb/storage/date.js.map +0 -1
  322. package/dynamoDb/storage/longText.d.ts +0 -10
  323. package/dynamoDb/storage/longText.js +0 -93
  324. package/dynamoDb/storage/longText.js.map +0 -1
  325. package/dynamoDb/storage/richText.d.ts +0 -7
  326. package/dynamoDb/storage/richText.js +0 -110
  327. package/dynamoDb/storage/richText.js.map +0 -1
  328. package/elasticsearch/index.d.ts +0 -2
  329. package/elasticsearch/index.js +0 -11
  330. package/elasticsearch/index.js.map +0 -1
  331. package/elasticsearch/indexing/dateTimeIndexing.d.ts +0 -3
  332. package/elasticsearch/indexing/dateTimeIndexing.js +0 -86
  333. package/elasticsearch/indexing/dateTimeIndexing.js.map +0 -1
  334. package/elasticsearch/indexing/defaultFieldIndexing.d.ts +0 -3
  335. package/elasticsearch/indexing/defaultFieldIndexing.js +0 -52
  336. package/elasticsearch/indexing/defaultFieldIndexing.js.map +0 -1
  337. package/elasticsearch/indexing/index.d.ts +0 -2
  338. package/elasticsearch/indexing/index.js +0 -15
  339. package/elasticsearch/indexing/index.js.map +0 -1
  340. package/elasticsearch/indexing/longTextIndexing.d.ts +0 -7
  341. package/elasticsearch/indexing/longTextIndexing.js +0 -40
  342. package/elasticsearch/indexing/longTextIndexing.js.map +0 -1
  343. package/elasticsearch/indexing/numberIndexing.d.ts +0 -3
  344. package/elasticsearch/indexing/numberIndexing.js +0 -39
  345. package/elasticsearch/indexing/numberIndexing.js.map +0 -1
  346. package/elasticsearch/indexing/objectIndexing.d.ts +0 -12
  347. package/elasticsearch/indexing/objectIndexing.js +0 -196
  348. package/elasticsearch/indexing/objectIndexing.js.map +0 -1
  349. package/elasticsearch/indexing/richTextIndexing.d.ts +0 -3
  350. package/elasticsearch/indexing/richTextIndexing.js +0 -29
  351. package/elasticsearch/indexing/richTextIndexing.js.map +0 -1
  352. package/elasticsearch/indices/base.d.ts +0 -2
  353. package/elasticsearch/indices/base.js +0 -12
  354. package/elasticsearch/indices/base.js.map +0 -1
  355. package/elasticsearch/indices/index.d.ts +0 -1
  356. package/elasticsearch/indices/index.js +0 -12
  357. package/elasticsearch/indices/index.js.map +0 -1
  358. package/elasticsearch/indices/japanese.d.ts +0 -2
  359. package/elasticsearch/indices/japanese.js +0 -13
  360. package/elasticsearch/indices/japanese.js.map +0 -1
  361. package/elasticsearch/search/index.d.ts +0 -3
  362. package/elasticsearch/search/index.js +0 -10
  363. package/elasticsearch/search/index.js.map +0 -1
  364. package/elasticsearch/search/refSearch.d.ts +0 -2
  365. package/elasticsearch/search/refSearch.js +0 -29
  366. package/elasticsearch/search/refSearch.js.map +0 -1
  367. package/elasticsearch/search/timeSearch.d.ts +0 -2
  368. package/elasticsearch/search/timeSearch.js +0 -26
  369. package/elasticsearch/search/timeSearch.js.map +0 -1
  370. package/helpers/index.js.map +0 -1
  371. package/index.js.map +0 -1
  372. package/operations/entry/elasticsearch/filtering/index.js.map +0 -1
  373. package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.d.ts +0 -2
  374. package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js +0 -28
  375. package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js.map +0 -1
  376. package/operations/entry/elasticsearch/filtering/plugins/index.d.ts +0 -1
  377. package/operations/entry/elasticsearch/filtering/plugins/index.js +0 -13
  378. package/operations/entry/elasticsearch/filtering/plugins/index.js.map +0 -1
  379. package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.d.ts +0 -2
  380. package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js +0 -65
  381. package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js.map +0 -1
  382. package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.d.ts +0 -2
  383. package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js +0 -48
  384. package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js.map +0 -1
  385. package/operations/entry/elasticsearch/plugins/bodyModifier.d.ts +0 -9
  386. package/operations/entry/elasticsearch/plugins/bodyModifier.js +0 -16
  387. package/operations/entry/elasticsearch/plugins/bodyModifier.js.map +0 -1
  388. package/operations/entry/elasticsearch/plugins/queryModifier.d.ts +0 -9
  389. package/operations/entry/elasticsearch/plugins/queryModifier.js +0 -16
  390. package/operations/entry/elasticsearch/plugins/queryModifier.js.map +0 -1
  391. package/operations/entry/elasticsearch/plugins/search.d.ts +0 -7
  392. package/operations/entry/elasticsearch/plugins/search.js +0 -24
  393. package/operations/entry/elasticsearch/plugins/search.js.map +0 -1
  394. package/operations/entry/elasticsearch/plugins/sortModifier.d.ts +0 -9
  395. package/operations/entry/elasticsearch/plugins/sortModifier.js +0 -16
  396. package/operations/entry/elasticsearch/plugins/sortModifier.js.map +0 -1
  397. package/operations/entry/elasticsearch/types.js.map +0 -1
  398. package/operations/settings/index.d.ts +0 -6
  399. package/operations/settings/index.js +0 -111
  400. package/operations/settings/index.js.map +0 -1
  401. package/operations/system/index.d.ts +0 -6
  402. package/operations/system/index.js +0 -82
  403. package/operations/system/index.js.map +0 -1
  404. package/plugins/CmsElasticsearchModelFieldPlugin.d.ts +0 -69
  405. package/plugins/CmsElasticsearchModelFieldPlugin.js +0 -48
  406. package/plugins/CmsElasticsearchModelFieldPlugin.js.map +0 -1
  407. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.d.ts +0 -21
  408. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js +0 -22
  409. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js.map +0 -1
  410. package/plugins/CmsEntryElasticsearchFieldPlugin.d.ts +0 -12
  411. package/plugins/CmsEntryElasticsearchFieldPlugin.js +0 -24
  412. package/plugins/CmsEntryElasticsearchFieldPlugin.js.map +0 -1
  413. package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.d.ts +0 -23
  414. package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js +0 -28
  415. package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js.map +0 -1
  416. package/plugins/CmsEntryElasticsearchIndexPlugin.d.ts +0 -4
  417. package/plugins/CmsEntryElasticsearchIndexPlugin.js +0 -12
  418. package/plugins/CmsEntryElasticsearchIndexPlugin.js.map +0 -1
  419. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.d.ts +0 -31
  420. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js +0 -37
  421. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js.map +0 -1
  422. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.d.ts +0 -18
  423. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js +0 -22
  424. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js.map +0 -1
  425. package/plugins/CmsEntryElasticsearchSortModifierPlugin.d.ts +0 -18
  426. package/plugins/CmsEntryElasticsearchSortModifierPlugin.js +0 -22
  427. package/plugins/CmsEntryElasticsearchSortModifierPlugin.js.map +0 -1
  428. package/plugins/CmsEntryFilterPlugin.d.ts +0 -49
  429. package/plugins/CmsEntryFilterPlugin.js +0 -24
  430. package/plugins/CmsEntryFilterPlugin.js.map +0 -1
  431. package/plugins/index.d.ts +0 -7
  432. package/plugins/index.js +0 -82
  433. package/plugins/index.js.map +0 -1
@@ -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,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";
@@ -0,0 +1,15 @@
1
+ import type { CmsModel } from "@webiny/api-headless-cms/types/index.js";
2
+ import type { Sort } from "@webiny/api-opensearch/types.js";
3
+ export interface ModifySortParams {
4
+ sort: Sort;
5
+ model: CmsModel;
6
+ }
7
+ export interface ICmsEntryOpenSearchSortModifier {
8
+ readonly modelId?: string;
9
+ modifySort(params: ModifySortParams): void;
10
+ }
11
+ export declare const CmsEntryOpenSearchSortModifier: import("@webiny/di").Abstraction<ICmsEntryOpenSearchSortModifier>;
12
+ export declare namespace CmsEntryOpenSearchSortModifier {
13
+ type Interface = ICmsEntryOpenSearchSortModifier;
14
+ type Params = ModifySortParams;
15
+ }
@@ -0,0 +1,5 @@
1
+ import { createAbstraction } from "@webiny/feature/api";
2
+ const CmsEntryOpenSearchSortModifier = createAbstraction("Cms/Entry/OpenSearch/SortModifier");
3
+ export { CmsEntryOpenSearchSortModifier };
4
+
5
+ //# sourceMappingURL=abstractions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/CmsEntryOpenSearchSortModifier/abstractions.js","sources":["../../../src/features/CmsEntryOpenSearchSortModifier/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { CmsModel } from \"@webiny/api-headless-cms/types/index.js\";\nimport type { Sort } from \"@webiny/api-opensearch/types.js\";\n\nexport interface ModifySortParams {\n sort: Sort;\n model: CmsModel;\n}\n\nexport interface ICmsEntryOpenSearchSortModifier {\n readonly modelId?: string;\n modifySort(params: ModifySortParams): void;\n}\n\nexport const CmsEntryOpenSearchSortModifier = createAbstraction<ICmsEntryOpenSearchSortModifier>(\n \"Cms/Entry/OpenSearch/SortModifier\"\n);\n\nexport namespace CmsEntryOpenSearchSortModifier {\n export type Interface = ICmsEntryOpenSearchSortModifier;\n export type Params = ModifySortParams;\n}\n"],"names":["CmsEntryOpenSearchSortModifier","createAbstraction"],"mappings":";AAcO,MAAMA,iCAAiCC,kBAC1C"}
@@ -0,0 +1 @@
1
+ export { CmsEntryOpenSearchSortModifier } from "./abstractions.js";
@@ -0,0 +1 @@
1
+ export { CmsEntryOpenSearchSortModifier } from "./abstractions.js";
@@ -0,0 +1,12 @@
1
+ import { CmsEntryOpenSearchValueSearchRegistry as Abstraction } from "./abstractions/CmsEntryOpenSearchValueSearchRegistry.js";
2
+ import { CmsEntryOpenSearchValueSearch } from "./abstractions/CmsEntryOpenSearchValueSearch.js";
3
+ declare class CmsEntryOpenSearchValueSearchRegistryImpl implements Abstraction.Interface {
4
+ private readonly searches;
5
+ constructor(searches: CmsEntryOpenSearchValueSearch.Interface[]);
6
+ get(type: string): Abstraction.SearchValue | undefined;
7
+ getAll(): Abstraction.SearchValue[];
8
+ }
9
+ export declare const CmsEntryOpenSearchValueSearchRegistry: typeof CmsEntryOpenSearchValueSearchRegistryImpl & {
10
+ __abstraction: import("@webiny/di").Abstraction<import("./abstractions/CmsEntryOpenSearchValueSearchRegistry.js").ICmsEntryOpenSearchValueSearchRegistry>;
11
+ };
12
+ export {};
@@ -0,0 +1,31 @@
1
+ import { CmsEntryOpenSearchValueSearchRegistry } from "./abstractions/CmsEntryOpenSearchValueSearchRegistry.js";
2
+ import { CmsEntryOpenSearchValueSearch } from "./abstractions/CmsEntryOpenSearchValueSearch.js";
3
+ import { getBaseFieldType } from "@webiny/api-headless-cms/utils/getBaseFieldType.js";
4
+ class CmsEntryOpenSearchValueSearchRegistryImpl {
5
+ constructor(searches){
6
+ this.searches = searches;
7
+ }
8
+ get(type) {
9
+ const fieldType = getBaseFieldType({
10
+ type
11
+ });
12
+ return this.searches.find((s)=>s.fieldType === fieldType);
13
+ }
14
+ getAll() {
15
+ return this.searches;
16
+ }
17
+ }
18
+ const CmsEntryOpenSearchValueSearchRegistry_CmsEntryOpenSearchValueSearchRegistry = CmsEntryOpenSearchValueSearchRegistry.createImplementation({
19
+ implementation: CmsEntryOpenSearchValueSearchRegistryImpl,
20
+ dependencies: [
21
+ [
22
+ CmsEntryOpenSearchValueSearch,
23
+ {
24
+ multiple: true
25
+ }
26
+ ]
27
+ ]
28
+ });
29
+ export { CmsEntryOpenSearchValueSearchRegistry_CmsEntryOpenSearchValueSearchRegistry as CmsEntryOpenSearchValueSearchRegistry };
30
+
31
+ //# sourceMappingURL=CmsEntryOpenSearchValueSearchRegistry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.js","sources":["../../../src/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.ts"],"sourcesContent":["import { CmsEntryOpenSearchValueSearchRegistry as Abstraction } from \"./abstractions/CmsEntryOpenSearchValueSearchRegistry.js\";\nimport { CmsEntryOpenSearchValueSearch } from \"./abstractions/CmsEntryOpenSearchValueSearch.js\";\nimport { getBaseFieldType } from \"@webiny/api-headless-cms/utils/getBaseFieldType.js\";\n\nclass CmsEntryOpenSearchValueSearchRegistryImpl implements Abstraction.Interface {\n public constructor(private readonly searches: CmsEntryOpenSearchValueSearch.Interface[]) {}\n\n public get(type: string): Abstraction.SearchValue | undefined {\n const fieldType = getBaseFieldType({ type });\n return this.searches.find(s => {\n return s.fieldType === fieldType;\n });\n }\n\n public getAll(): Abstraction.SearchValue[] {\n return this.searches;\n }\n}\n\nexport const CmsEntryOpenSearchValueSearchRegistry = Abstraction.createImplementation({\n implementation: CmsEntryOpenSearchValueSearchRegistryImpl,\n dependencies: [[CmsEntryOpenSearchValueSearch, { multiple: true }]]\n});\n"],"names":["CmsEntryOpenSearchValueSearchRegistryImpl","searches","type","fieldType","getBaseFieldType","s","CmsEntryOpenSearchValueSearchRegistry","Abstraction","CmsEntryOpenSearchValueSearch"],"mappings":";;;AAIA,MAAMA;IACF,YAAoCC,QAAmD,CAAE;aAArDA,QAAQ,GAARA;IAAsD;IAEnF,IAAIC,IAAY,EAAuC;QAC1D,MAAMC,YAAYC,iBAAiB;YAAEF;QAAK;QAC1C,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAACG,CAAAA,IACfA,EAAE,SAAS,KAAKF;IAE/B;IAEO,SAAoC;QACvC,OAAO,IAAI,CAAC,QAAQ;IACxB;AACJ;AAEO,MAAMG,8EAAwCC,sCAAAA,oBAAgC,CAAC;IAClF,gBAAgBP;IAChB,cAAc;QAAC;YAACQ;YAA+B;gBAAE,UAAU;YAAK;SAAE;KAAC;AACvE"}
@@ -0,0 +1,22 @@
1
+ import type { CmsModelField } from "@webiny/api-headless-cms/types/index.js";
2
+ export interface CreatePathParams<T = any> {
3
+ field: CmsModelField;
4
+ key: string;
5
+ value: T;
6
+ originalValue: any;
7
+ }
8
+ export interface TransformParams<T = any> {
9
+ field: CmsModelField;
10
+ value: T;
11
+ }
12
+ export interface ICmsEntryOpenSearchValueSearch {
13
+ readonly fieldType: string;
14
+ transform(params: TransformParams): any;
15
+ createPath(params: CreatePathParams): string | null;
16
+ }
17
+ export declare const CmsEntryOpenSearchValueSearch: import("@webiny/di").Abstraction<ICmsEntryOpenSearchValueSearch>;
18
+ export declare namespace CmsEntryOpenSearchValueSearch {
19
+ type Interface = ICmsEntryOpenSearchValueSearch;
20
+ type CreatePath = CreatePathParams;
21
+ type Transform = TransformParams;
22
+ }
@@ -0,0 +1,5 @@
1
+ import { createAbstraction } from "@webiny/feature/api";
2
+ const CmsEntryOpenSearchValueSearch = createAbstraction("Cms/Entry/OpenSearch/ValueSearch");
3
+ export { CmsEntryOpenSearchValueSearch };
4
+
5
+ //# sourceMappingURL=CmsEntryOpenSearchValueSearch.js.map