@webiny/api-headless-cms-ddb-es 6.4.11 → 6.6.0-alpha.1

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 (384) hide show
  1. package/abstractions/CmsDdbEsDataLoaders.d.ts +5 -0
  2. package/abstractions/CmsDdbEsDataLoaders.js +5 -0
  3. package/abstractions/CmsDdbEsDataLoaders.js.map +1 -0
  4. package/abstractions/CmsDdbEsEntriesEsEntity.d.ts +5 -0
  5. package/abstractions/CmsDdbEsEntriesEsEntity.js +5 -0
  6. package/abstractions/CmsDdbEsEntriesEsEntity.js.map +1 -0
  7. package/abstractions/CmsDdbEsEntryEntity.d.ts +5 -0
  8. package/abstractions/CmsDdbEsEntryEntity.js +5 -0
  9. package/abstractions/CmsDdbEsEntryEntity.js.map +1 -0
  10. package/abstractions/CmsDdbEsGroupEntity.d.ts +5 -0
  11. package/abstractions/CmsDdbEsGroupEntity.js +5 -0
  12. package/abstractions/CmsDdbEsGroupEntity.js.map +1 -0
  13. package/abstractions/CmsDdbEsModelEntity.d.ts +5 -0
  14. package/abstractions/CmsDdbEsModelEntity.js +5 -0
  15. package/abstractions/CmsDdbEsModelEntity.js.map +1 -0
  16. package/abstractions/CmsDdbEsOsTable.d.ts +5 -0
  17. package/abstractions/CmsDdbEsOsTable.js +5 -0
  18. package/abstractions/CmsDdbEsOsTable.js.map +1 -0
  19. package/abstractions/CmsDdbEsTable.d.ts +5 -0
  20. package/abstractions/CmsDdbEsTable.js +5 -0
  21. package/abstractions/CmsDdbEsTable.js.map +1 -0
  22. package/feature.d.ts +4 -1
  23. package/feature.js +60 -158
  24. package/feature.js.map +1 -1
  25. package/index.d.ts +1 -1
  26. package/index.js +1 -1
  27. package/operations/entry/DdbEsCreateEntry.d.ts +24 -0
  28. package/operations/entry/DdbEsCreateEntry.js +134 -0
  29. package/operations/entry/DdbEsCreateEntry.js.map +1 -0
  30. package/operations/entry/DdbEsCreateEntryRevisionFrom.d.ts +24 -0
  31. package/operations/entry/DdbEsCreateEntryRevisionFrom.js +139 -0
  32. package/operations/entry/DdbEsCreateEntryRevisionFrom.js.map +1 -0
  33. package/operations/entry/DdbEsDeleteEntry.d.ts +18 -0
  34. package/operations/entry/DdbEsDeleteEntry.js +79 -0
  35. package/operations/entry/DdbEsDeleteEntry.js.map +1 -0
  36. package/operations/entry/DdbEsDeleteEntryRevision.d.ts +24 -0
  37. package/operations/entry/DdbEsDeleteEntryRevision.js +136 -0
  38. package/operations/entry/DdbEsDeleteEntryRevision.js.map +1 -0
  39. package/operations/entry/DdbEsDeleteMultipleEntries.d.ts +18 -0
  40. package/operations/entry/DdbEsDeleteMultipleEntries.js +77 -0
  41. package/operations/entry/DdbEsDeleteMultipleEntries.js.map +1 -0
  42. package/operations/entry/DdbEsGetEntriesByIds.d.ts +14 -0
  43. package/operations/entry/DdbEsGetEntriesByIds.js +31 -0
  44. package/operations/entry/DdbEsGetEntriesByIds.js.map +1 -0
  45. package/operations/entry/DdbEsGetEntry.d.ts +14 -0
  46. package/operations/entry/DdbEsGetEntry.js +27 -0
  47. package/operations/entry/DdbEsGetEntry.js.map +1 -0
  48. package/operations/entry/DdbEsGetLatestEntriesByIds.d.ts +14 -0
  49. package/operations/entry/DdbEsGetLatestEntriesByIds.js +31 -0
  50. package/operations/entry/DdbEsGetLatestEntriesByIds.js.map +1 -0
  51. package/operations/entry/DdbEsGetLatestRevisionByEntryId.d.ts +14 -0
  52. package/operations/entry/DdbEsGetLatestRevisionByEntryId.js +34 -0
  53. package/operations/entry/DdbEsGetLatestRevisionByEntryId.js.map +1 -0
  54. package/operations/entry/DdbEsGetPreviousRevision.d.ts +14 -0
  55. package/operations/entry/DdbEsGetPreviousRevision.js +56 -0
  56. package/operations/entry/DdbEsGetPreviousRevision.js.map +1 -0
  57. package/operations/entry/DdbEsGetPublishedEntriesByIds.d.ts +14 -0
  58. package/operations/entry/DdbEsGetPublishedEntriesByIds.js +31 -0
  59. package/operations/entry/DdbEsGetPublishedEntriesByIds.js.map +1 -0
  60. package/operations/entry/DdbEsGetPublishedRevisionByEntryId.d.ts +14 -0
  61. package/operations/entry/DdbEsGetPublishedRevisionByEntryId.js +34 -0
  62. package/operations/entry/DdbEsGetPublishedRevisionByEntryId.js.map +1 -0
  63. package/operations/entry/DdbEsGetRevisionById.d.ts +14 -0
  64. package/operations/entry/DdbEsGetRevisionById.js +34 -0
  65. package/operations/entry/DdbEsGetRevisionById.js.map +1 -0
  66. package/operations/entry/DdbEsGetRevisions.d.ts +14 -0
  67. package/operations/entry/DdbEsGetRevisions.js +33 -0
  68. package/operations/entry/DdbEsGetRevisions.js.map +1 -0
  69. package/operations/entry/DdbEsGetUniqueFieldValues.d.ts +18 -0
  70. package/operations/entry/DdbEsGetUniqueFieldValues.js +76 -0
  71. package/operations/entry/DdbEsGetUniqueFieldValues.js.map +1 -0
  72. package/operations/entry/DdbEsListEntries.d.ts +25 -0
  73. package/operations/entry/DdbEsListEntries.js +91 -0
  74. package/operations/entry/DdbEsListEntries.js.map +1 -0
  75. package/operations/entry/DdbEsMoveEntry.d.ts +20 -0
  76. package/operations/entry/DdbEsMoveEntry.js +113 -0
  77. package/operations/entry/DdbEsMoveEntry.js.map +1 -0
  78. package/operations/entry/DdbEsMoveToBin.d.ts +23 -0
  79. package/operations/entry/DdbEsMoveToBin.js +137 -0
  80. package/operations/entry/DdbEsMoveToBin.js.map +1 -0
  81. package/operations/entry/DdbEsPublishEntry.d.ts +24 -0
  82. package/operations/entry/DdbEsPublishEntry.js +231 -0
  83. package/operations/entry/DdbEsPublishEntry.js.map +1 -0
  84. package/operations/entry/DdbEsRestoreFromBin.d.ts +23 -0
  85. package/operations/entry/DdbEsRestoreFromBin.js +137 -0
  86. package/operations/entry/DdbEsRestoreFromBin.js.map +1 -0
  87. package/operations/entry/DdbEsUnpublishEntry.d.ts +24 -0
  88. package/operations/entry/DdbEsUnpublishEntry.js +127 -0
  89. package/operations/entry/DdbEsUnpublishEntry.js.map +1 -0
  90. package/operations/entry/DdbEsUpdateEntry.d.ts +24 -0
  91. package/operations/entry/DdbEsUpdateEntry.js +175 -0
  92. package/operations/entry/DdbEsUpdateEntry.js.map +1 -0
  93. package/operations/entry/dataLoaders.d.ts +5 -5
  94. package/operations/entry/dataLoaders.js +11 -3
  95. package/operations/entry/dataLoaders.js.map +1 -1
  96. package/{features/CmsModelOpenSearchIndex → operations/entry}/feature.d.ts +1 -1
  97. package/operations/entry/feature.js +55 -0
  98. package/operations/entry/feature.js.map +1 -0
  99. package/operations/entry/storageEntryUtils.d.ts +7 -0
  100. package/operations/entry/storageEntryUtils.js +14 -0
  101. package/operations/entry/storageEntryUtils.js.map +1 -0
  102. package/operations/entry/transformations/index.d.ts +2 -3
  103. package/operations/entry/transformations/index.js +1 -1
  104. package/operations/entry/transformations/index.js.map +1 -1
  105. package/operations/entry/transformations/modifyEntryValues.d.ts +2 -2
  106. package/operations/entry/transformations/modifyEntryValues.js.map +1 -1
  107. package/operations/group/DdbEsCreateGroup.d.ts +12 -0
  108. package/operations/group/DdbEsCreateGroup.js +35 -0
  109. package/operations/group/DdbEsCreateGroup.js.map +1 -0
  110. package/operations/group/DdbEsDeleteGroup.d.ts +12 -0
  111. package/operations/group/DdbEsDeleteGroup.js +31 -0
  112. package/operations/group/DdbEsDeleteGroup.js.map +1 -0
  113. package/operations/group/DdbEsGetGroup.d.ts +12 -0
  114. package/operations/group/DdbEsGetGroup.js +31 -0
  115. package/operations/group/DdbEsGetGroup.js.map +1 -0
  116. package/operations/group/DdbEsListGroups.d.ts +14 -0
  117. package/operations/group/DdbEsListGroups.js +52 -0
  118. package/operations/group/DdbEsListGroups.js.map +1 -0
  119. package/operations/group/DdbEsUpdateGroup.d.ts +12 -0
  120. package/operations/group/DdbEsUpdateGroup.js +35 -0
  121. package/operations/group/DdbEsUpdateGroup.js.map +1 -0
  122. package/{features/CmsEntryOpenSearchFilter → operations/group}/feature.d.ts +1 -1
  123. package/operations/group/feature.js +19 -0
  124. package/operations/group/feature.js.map +1 -0
  125. package/operations/group/keys.d.ts +15 -0
  126. package/operations/group/keys.js +17 -0
  127. package/operations/group/keys.js.map +1 -0
  128. package/operations/model/DdbEsCreateModel.d.ts +16 -0
  129. package/operations/model/DdbEsCreateModel.js +56 -0
  130. package/operations/model/DdbEsCreateModel.js.map +1 -0
  131. package/operations/model/DdbEsDeleteModel.d.ts +12 -0
  132. package/operations/model/DdbEsDeleteModel.js +31 -0
  133. package/operations/model/DdbEsDeleteModel.js.map +1 -0
  134. package/operations/model/DdbEsGetModel.d.ts +12 -0
  135. package/operations/model/DdbEsGetModel.js +30 -0
  136. package/operations/model/DdbEsGetModel.js.map +1 -0
  137. package/operations/model/DdbEsListModels.d.ts +12 -0
  138. package/operations/model/DdbEsListModels.js +36 -0
  139. package/operations/model/DdbEsListModels.js.map +1 -0
  140. package/operations/model/DdbEsUpdateModel.d.ts +12 -0
  141. package/operations/model/DdbEsUpdateModel.js +36 -0
  142. package/operations/model/DdbEsUpdateModel.js.map +1 -0
  143. package/{features/CmsEntryOpenSearchFieldIndex → operations/model}/feature.d.ts +1 -1
  144. package/operations/model/feature.js +19 -0
  145. package/operations/model/feature.js.map +1 -0
  146. package/operations/model/keys.d.ts +15 -0
  147. package/operations/model/keys.js +17 -0
  148. package/operations/model/keys.js.map +1 -0
  149. package/package.json +28 -24
  150. package/tasks/CreateElasticsearchIndexTask.d.ts +13 -0
  151. package/tasks/CreateElasticsearchIndexTask.js +40 -0
  152. package/tasks/CreateElasticsearchIndexTask.js.map +1 -0
  153. package/types.d.ts +10 -49
  154. package/types.js.map +1 -1
  155. package/configurations.d.ts +0 -22
  156. package/configurations.js +0 -37
  157. package/configurations.js.map +0 -1
  158. package/elasticsearch/createElasticsearchIndex.d.ts +0 -9
  159. package/elasticsearch/createElasticsearchIndex.js +0 -45
  160. package/elasticsearch/createElasticsearchIndex.js.map +0 -1
  161. package/elasticsearch/deleteElasticsearchIndex.d.ts +0 -10
  162. package/elasticsearch/deleteElasticsearchIndex.js +0 -23
  163. package/elasticsearch/deleteElasticsearchIndex.js.map +0 -1
  164. package/exports/api/cms/opensearch.d.ts +0 -9
  165. package/exports/api/cms/opensearch.js +0 -9
  166. package/features/CmsEntryOpenSearchBodyModifier/abstractions.d.ts +0 -16
  167. package/features/CmsEntryOpenSearchBodyModifier/abstractions.js +0 -5
  168. package/features/CmsEntryOpenSearchBodyModifier/abstractions.js.map +0 -1
  169. package/features/CmsEntryOpenSearchBodyModifier/index.d.ts +0 -1
  170. package/features/CmsEntryOpenSearchBodyModifier/index.js +0 -1
  171. package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.d.ts +0 -14
  172. package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.js +0 -42
  173. package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.js.map +0 -1
  174. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.d.ts +0 -32
  175. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.js +0 -5
  176. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.js.map +0 -1
  177. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.d.ts +0 -11
  178. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.js +0 -5
  179. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.js.map +0 -1
  180. package/features/CmsEntryOpenSearchFieldIndex/constants.d.ts +0 -1
  181. package/features/CmsEntryOpenSearchFieldIndex/constants.js +0 -4
  182. package/features/CmsEntryOpenSearchFieldIndex/constants.js.map +0 -1
  183. package/features/CmsEntryOpenSearchFieldIndex/feature.js +0 -29
  184. package/features/CmsEntryOpenSearchFieldIndex/feature.js.map +0 -1
  185. package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.d.ts +0 -11
  186. package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.js +0 -60
  187. package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.js.map +0 -1
  188. package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.d.ts +0 -13
  189. package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.js +0 -33
  190. package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.js.map +0 -1
  191. package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.d.ts +0 -10
  192. package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.js +0 -21
  193. package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.js.map +0 -1
  194. package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.d.ts +0 -10
  195. package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.js +0 -22
  196. package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.js.map +0 -1
  197. package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.d.ts +0 -11
  198. package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.js +0 -32
  199. package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.js.map +0 -1
  200. package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.d.ts +0 -12
  201. package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.js +0 -107
  202. package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.js.map +0 -1
  203. package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.d.ts +0 -10
  204. package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.js +0 -21
  205. package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.js.map +0 -1
  206. package/features/CmsEntryOpenSearchFieldIndex/fields/TextCompressedFieldIndex.d.ts +0 -15
  207. package/features/CmsEntryOpenSearchFieldIndex/fields/TextCompressedFieldIndex.js +0 -40
  208. package/features/CmsEntryOpenSearchFieldIndex/fields/TextCompressedFieldIndex.js.map +0 -1
  209. package/features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.d.ts +0 -15
  210. package/features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.js +0 -40
  211. package/features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.js.map +0 -1
  212. package/features/CmsEntryOpenSearchFieldIndex/index.d.ts +0 -3
  213. package/features/CmsEntryOpenSearchFieldIndex/index.js +0 -3
  214. package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.d.ts +0 -11
  215. package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.js +0 -36
  216. package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.js.map +0 -1
  217. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.d.ts +0 -37
  218. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.js +0 -5
  219. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.js.map +0 -1
  220. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.d.ts +0 -9
  221. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.js +0 -5
  222. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.js.map +0 -1
  223. package/features/CmsEntryOpenSearchFilter/constants.d.ts +0 -1
  224. package/features/CmsEntryOpenSearchFilter/constants.js +0 -4
  225. package/features/CmsEntryOpenSearchFilter/constants.js.map +0 -1
  226. package/features/CmsEntryOpenSearchFilter/feature.js +0 -17
  227. package/features/CmsEntryOpenSearchFilter/feature.js.map +0 -1
  228. package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.d.ts +0 -9
  229. package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.js +0 -26
  230. package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.js.map +0 -1
  231. package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.d.ts +0 -9
  232. package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.js +0 -43
  233. package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.js.map +0 -1
  234. package/features/CmsEntryOpenSearchFilter/fields/RefFilter.d.ts +0 -9
  235. package/features/CmsEntryOpenSearchFilter/fields/RefFilter.js +0 -36
  236. package/features/CmsEntryOpenSearchFilter/fields/RefFilter.js.map +0 -1
  237. package/features/CmsEntryOpenSearchFilter/index.d.ts +0 -3
  238. package/features/CmsEntryOpenSearchFilter/index.js +0 -3
  239. package/features/CmsEntryOpenSearchFullTextSearch/abstractions.d.ts +0 -20
  240. package/features/CmsEntryOpenSearchFullTextSearch/abstractions.js +0 -5
  241. package/features/CmsEntryOpenSearchFullTextSearch/abstractions.js.map +0 -1
  242. package/features/CmsEntryOpenSearchFullTextSearch/index.d.ts +0 -1
  243. package/features/CmsEntryOpenSearchFullTextSearch/index.js +0 -1
  244. package/features/CmsEntryOpenSearchQueryModifier/abstractions.d.ts +0 -16
  245. package/features/CmsEntryOpenSearchQueryModifier/abstractions.js +0 -5
  246. package/features/CmsEntryOpenSearchQueryModifier/abstractions.js.map +0 -1
  247. package/features/CmsEntryOpenSearchQueryModifier/index.d.ts +0 -1
  248. package/features/CmsEntryOpenSearchQueryModifier/index.js +0 -1
  249. package/features/CmsEntryOpenSearchSortModifier/abstractions.d.ts +0 -15
  250. package/features/CmsEntryOpenSearchSortModifier/abstractions.js +0 -5
  251. package/features/CmsEntryOpenSearchSortModifier/abstractions.js.map +0 -1
  252. package/features/CmsEntryOpenSearchSortModifier/index.d.ts +0 -1
  253. package/features/CmsEntryOpenSearchSortModifier/index.js +0 -1
  254. package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.d.ts +0 -12
  255. package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.js +0 -31
  256. package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.js.map +0 -1
  257. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.d.ts +0 -22
  258. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.js +0 -5
  259. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.js.map +0 -1
  260. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.d.ts +0 -10
  261. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.js +0 -5
  262. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.js.map +0 -1
  263. package/features/CmsEntryOpenSearchValueSearch/feature.d.ts +0 -4
  264. package/features/CmsEntryOpenSearchValueSearch/feature.js +0 -17
  265. package/features/CmsEntryOpenSearchValueSearch/feature.js.map +0 -1
  266. package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.d.ts +0 -10
  267. package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.js +0 -21
  268. package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.js.map +0 -1
  269. package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.d.ts +0 -10
  270. package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.js +0 -44
  271. package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.js.map +0 -1
  272. package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.d.ts +0 -10
  273. package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.js +0 -22
  274. package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.js.map +0 -1
  275. package/features/CmsEntryOpenSearchValueSearch/index.d.ts +0 -3
  276. package/features/CmsEntryOpenSearchValueSearch/index.js +0 -3
  277. package/features/CmsEntryOpenSearchValuesModifier/abstractions.d.ts +0 -23
  278. package/features/CmsEntryOpenSearchValuesModifier/abstractions.js +0 -5
  279. package/features/CmsEntryOpenSearchValuesModifier/abstractions.js.map +0 -1
  280. package/features/CmsEntryOpenSearchValuesModifier/index.d.ts +0 -1
  281. package/features/CmsEntryOpenSearchValuesModifier/index.js +0 -1
  282. package/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.d.ts +0 -25
  283. package/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.js +0 -36
  284. package/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.js.map +0 -1
  285. package/features/CmsModelOpenSearchIndex/DefaultCmsModelOpenSearchIndex.d.ts +0 -8
  286. package/features/CmsModelOpenSearchIndex/DefaultCmsModelOpenSearchIndex.js +0 -17
  287. package/features/CmsModelOpenSearchIndex/DefaultCmsModelOpenSearchIndex.js.map +0 -1
  288. package/features/CmsModelOpenSearchIndex/abstractions.d.ts +0 -20
  289. package/features/CmsModelOpenSearchIndex/abstractions.js +0 -5
  290. package/features/CmsModelOpenSearchIndex/abstractions.js.map +0 -1
  291. package/features/CmsModelOpenSearchIndex/feature.js +0 -13
  292. package/features/CmsModelOpenSearchIndex/feature.js.map +0 -1
  293. package/features/CmsModelOpenSearchIndex/index.d.ts +0 -3
  294. package/features/CmsModelOpenSearchIndex/index.js +0 -3
  295. package/helpers/entryIndexHelpers.d.ts +0 -20
  296. package/helpers/entryIndexHelpers.js +0 -80
  297. package/helpers/entryIndexHelpers.js.map +0 -1
  298. package/helpers/fieldIdentifier.d.ts +0 -6
  299. package/helpers/fieldIdentifier.js +0 -23
  300. package/helpers/fieldIdentifier.js.map +0 -1
  301. package/helpers/index.d.ts +0 -2
  302. package/helpers/index.js +0 -2
  303. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.d.ts +0 -18
  304. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js +0 -9
  305. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js.map +0 -1
  306. package/operations/entry/elasticsearch/body.d.ts +0 -30
  307. package/operations/entry/elasticsearch/body.js +0 -88
  308. package/operations/entry/elasticsearch/body.js.map +0 -1
  309. package/operations/entry/elasticsearch/fields/createSystemField.d.ts +0 -4
  310. package/operations/entry/elasticsearch/fields/createSystemField.js +0 -9
  311. package/operations/entry/elasticsearch/fields/createSystemField.js.map +0 -1
  312. package/operations/entry/elasticsearch/fields/live.d.ts +0 -2
  313. package/operations/entry/elasticsearch/fields/live.js +0 -50
  314. package/operations/entry/elasticsearch/fields/live.js.map +0 -1
  315. package/operations/entry/elasticsearch/fields/location.d.ts +0 -2
  316. package/operations/entry/elasticsearch/fields/location.js +0 -50
  317. package/operations/entry/elasticsearch/fields/location.js.map +0 -1
  318. package/operations/entry/elasticsearch/fields/state.d.ts +0 -2
  319. package/operations/entry/elasticsearch/fields/state.js +0 -104
  320. package/operations/entry/elasticsearch/fields/state.js.map +0 -1
  321. package/operations/entry/elasticsearch/fields.d.ts +0 -12
  322. package/operations/entry/elasticsearch/fields.js +0 -207
  323. package/operations/entry/elasticsearch/fields.js.map +0 -1
  324. package/operations/entry/elasticsearch/filtering/applyFiltering.d.ts +0 -9
  325. package/operations/entry/elasticsearch/filtering/applyFiltering.js +0 -39
  326. package/operations/entry/elasticsearch/filtering/applyFiltering.js.map +0 -1
  327. package/operations/entry/elasticsearch/filtering/exec.d.ts +0 -22
  328. package/operations/entry/elasticsearch/filtering/exec.js +0 -96
  329. package/operations/entry/elasticsearch/filtering/exec.js.map +0 -1
  330. package/operations/entry/elasticsearch/filtering/index.d.ts +0 -1
  331. package/operations/entry/elasticsearch/filtering/index.js +0 -1
  332. package/operations/entry/elasticsearch/filtering/path.d.ts +0 -17
  333. package/operations/entry/elasticsearch/filtering/path.js +0 -27
  334. package/operations/entry/elasticsearch/filtering/path.js.map +0 -1
  335. package/operations/entry/elasticsearch/filtering/populated.d.ts +0 -2
  336. package/operations/entry/elasticsearch/filtering/populated.js +0 -12
  337. package/operations/entry/elasticsearch/filtering/populated.js.map +0 -1
  338. package/operations/entry/elasticsearch/filtering/values.d.ts +0 -2
  339. package/operations/entry/elasticsearch/filtering/values.js +0 -15
  340. package/operations/entry/elasticsearch/filtering/values.js.map +0 -1
  341. package/operations/entry/elasticsearch/fullTextSearch.d.ts +0 -13
  342. package/operations/entry/elasticsearch/fullTextSearch.js +0 -53
  343. package/operations/entry/elasticsearch/fullTextSearch.js.map +0 -1
  344. package/operations/entry/elasticsearch/fullTextSearchFields.d.ts +0 -8
  345. package/operations/entry/elasticsearch/fullTextSearchFields.js +0 -10
  346. package/operations/entry/elasticsearch/fullTextSearchFields.js.map +0 -1
  347. package/operations/entry/elasticsearch/initialQuery.d.ts +0 -18
  348. package/operations/entry/elasticsearch/initialQuery.js +0 -43
  349. package/operations/entry/elasticsearch/initialQuery.js.map +0 -1
  350. package/operations/entry/elasticsearch/keyword.d.ts +0 -2
  351. package/operations/entry/elasticsearch/keyword.js +0 -17
  352. package/operations/entry/elasticsearch/keyword.js.map +0 -1
  353. package/operations/entry/elasticsearch/plugins/operator.d.ts +0 -7
  354. package/operations/entry/elasticsearch/plugins/operator.js +0 -13
  355. package/operations/entry/elasticsearch/plugins/operator.js.map +0 -1
  356. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.d.ts +0 -2
  357. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js +0 -8
  358. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js.map +0 -1
  359. package/operations/entry/elasticsearch/sort.d.ts +0 -12
  360. package/operations/entry/elasticsearch/sort.js +0 -80
  361. package/operations/entry/elasticsearch/sort.js.map +0 -1
  362. package/operations/entry/elasticsearch/transformValueForSearch.d.ts +0 -9
  363. package/operations/entry/elasticsearch/transformValueForSearch.js +0 -12
  364. package/operations/entry/elasticsearch/transformValueForSearch.js.map +0 -1
  365. package/operations/entry/elasticsearch/types.d.ts +0 -34
  366. package/operations/entry/elasticsearch/types.js +0 -0
  367. package/operations/entry/index.d.ts +0 -34
  368. package/operations/entry/index.js +0 -1366
  369. package/operations/entry/index.js.map +0 -1
  370. package/operations/entry/transformations/transformEntryToIndex.d.ts +0 -10
  371. package/operations/entry/transformations/transformEntryToIndex.js +0 -20
  372. package/operations/entry/transformations/transformEntryToIndex.js.map +0 -1
  373. package/operations/group/index.d.ts +0 -9
  374. package/operations/group/index.js +0 -121
  375. package/operations/group/index.js.map +0 -1
  376. package/operations/model/index.d.ts +0 -10
  377. package/operations/model/index.js +0 -119
  378. package/operations/model/index.js.map +0 -1
  379. package/tasks/createIndexTaskPlugin.d.ts +0 -2
  380. package/tasks/createIndexTaskPlugin.js +0 -42
  381. package/tasks/createIndexTaskPlugin.js.map +0 -1
  382. package/values/NoValueContainer.d.ts +0 -5
  383. package/values/NoValueContainer.js +0 -11
  384. package/values/NoValueContainer.js.map +0 -1
@@ -1,10 +0,0 @@
1
- const createFullTextSearchFields = (params)=>{
2
- const { term, targets, fields } = params;
3
- if (!targets?.length || !term || 0 === term.trim().length) return {};
4
- const result = {};
5
- for(const key in fields)if (false !== targets.includes(key)) result[key] = fields[key];
6
- return result;
7
- };
8
- export { createFullTextSearchFields };
9
-
10
- //# sourceMappingURL=fullTextSearchFields.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operations/entry/elasticsearch/fullTextSearchFields.js","sources":["../../../../src/operations/entry/elasticsearch/fullTextSearchFields.ts"],"sourcesContent":["import type { ModelFields } from \"~/operations/entry/elasticsearch/types.js\";\n\ninterface Params {\n fields: ModelFields;\n term?: string;\n targets?: string[];\n}\nexport const createFullTextSearchFields = (params: Params): ModelFields => {\n const { term, targets, fields } = params;\n if (!targets?.length || !term || term.trim().length === 0) {\n return {};\n }\n\n const result: ModelFields = {};\n for (const key in fields) {\n if (targets.includes(key) === false) {\n continue;\n }\n result[key] = fields[key];\n }\n return result;\n};\n"],"names":["createFullTextSearchFields","params","term","targets","fields","result","key"],"mappings":"AAOO,MAAMA,6BAA6B,CAACC;IACvC,MAAM,EAAEC,IAAI,EAAEC,OAAO,EAAEC,MAAM,EAAE,GAAGH;IAClC,IAAI,CAACE,SAAS,UAAU,CAACD,QAAQA,AAAuB,MAAvBA,KAAK,IAAI,GAAG,MAAM,EAC/C,OAAO,CAAC;IAGZ,MAAMG,SAAsB,CAAC;IAC7B,IAAK,MAAMC,OAAOF,OACd,IAAID,AAA0B,UAA1BA,QAAQ,QAAQ,CAACG,MAGrBD,MAAM,CAACC,IAAI,GAAGF,MAAM,CAACE,IAAI;IAE7B,OAAOD;AACX"}
@@ -1,18 +0,0 @@
1
- import type { OpenSearchBoolQueryConfig } from "@webiny/api-opensearch/types.js";
2
- import type { CmsEntryListWhere, CmsModel } from "@webiny/api-headless-cms/types/index.js";
3
- export declare const createBaseQuery: () => OpenSearchBoolQueryConfig;
4
- interface Params {
5
- model: CmsModel;
6
- where: CmsEntryListWhere;
7
- shared: boolean;
8
- }
9
- /**
10
- * Latest and published are specific in Elasticsearch to that extend that they are tagged in the __type property.
11
- * We allow either published or either latest.
12
- * Latest is used in the manage API and published in the read API.
13
- *
14
- *
15
- * We add the query.filter terms because we do not need scored search here and it is a bit faster.
16
- */
17
- export declare const createInitialQuery: (params: Params) => OpenSearchBoolQueryConfig;
18
- export {};
@@ -1,43 +0,0 @@
1
- import error from "@webiny/error";
2
- import { createLatestRecordType, createPublishedRecordType } from "../recordType.js";
3
- const createBaseQuery = ()=>({
4
- must: [],
5
- must_not: [],
6
- should: [],
7
- filter: []
8
- });
9
- const createInitialQuery = (params)=>{
10
- const { model, where, shared } = params;
11
- const query = createBaseQuery();
12
- if (shared) {
13
- query.filter.push({
14
- term: {
15
- "tenant.keyword": model.tenant
16
- }
17
- });
18
- query.filter.push({
19
- term: {
20
- "modelId.keyword": model.modelId
21
- }
22
- });
23
- }
24
- if (true === where.published) query.filter.push({
25
- term: {
26
- "__type.keyword": createPublishedRecordType()
27
- }
28
- });
29
- else if (true === where.latest) query.filter.push({
30
- term: {
31
- "__type.keyword": createLatestRecordType()
32
- }
33
- });
34
- else throw new error('Cannot call Elasticsearch query when not setting "published" or "latest".', "OPENSEARCH_UNSUPPORTED_QUERY", {
35
- where
36
- });
37
- delete where.published;
38
- delete where.latest;
39
- return query;
40
- };
41
- export { createBaseQuery, createInitialQuery };
42
-
43
- //# sourceMappingURL=initialQuery.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operations/entry/elasticsearch/initialQuery.js","sources":["../../../../src/operations/entry/elasticsearch/initialQuery.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport type { OpenSearchBoolQueryConfig } from \"@webiny/api-opensearch/types.js\";\nimport type { CmsEntryListWhere, CmsModel } from \"@webiny/api-headless-cms/types/index.js\";\nimport { createLatestRecordType, createPublishedRecordType } from \"../recordType.js\";\n\nexport const createBaseQuery = (): OpenSearchBoolQueryConfig => {\n return {\n must: [],\n must_not: [],\n should: [],\n filter: []\n };\n};\n\ninterface Params {\n model: CmsModel;\n where: CmsEntryListWhere;\n shared: boolean;\n}\n/**\n * Latest and published are specific in Elasticsearch to that extend that they are tagged in the __type property.\n * We allow either published or either latest.\n * Latest is used in the manage API and published in the read API.\n *\n *\n * We add the query.filter terms because we do not need scored search here and it is a bit faster.\n */\nexport const createInitialQuery = (params: Params): OpenSearchBoolQueryConfig => {\n const { model, where, shared } = params;\n\n const query = createBaseQuery();\n\n /**\n * When ES index is shared between tenants, we need to filter records by tenant ID.\n */\n if (shared) {\n query.filter.push({\n term: {\n \"tenant.keyword\": model.tenant\n }\n });\n query.filter.push({\n term: {\n \"modelId.keyword\": model.modelId\n }\n });\n }\n\n /**\n * We must transform published and latest where args into something that is understandable by our Elasticsearch\n */\n if (where.published === true) {\n query.filter.push({\n term: {\n \"__type.keyword\": createPublishedRecordType()\n }\n });\n } else if (where.latest === true) {\n query.filter.push({\n term: {\n \"__type.keyword\": createLatestRecordType()\n }\n });\n }\n //\n /**\n * We do not allow filtering without the published or latest parameter.\n * Also, we do not want to set the default one, as there is a large possibility for user error when filtering.\n */\n else {\n throw new WebinyError(\n `Cannot call Elasticsearch query when not setting \"published\" or \"latest\".`,\n \"OPENSEARCH_UNSUPPORTED_QUERY\",\n {\n where\n }\n );\n }\n /**\n * We need to remove fields that actually do not exist on the record - it will break otherwise.\n * This will modify the original object, which is what we want.\n */\n delete where.published;\n delete where.latest;\n\n return query;\n};\n"],"names":["createBaseQuery","createInitialQuery","params","model","where","shared","query","createPublishedRecordType","createLatestRecordType","WebinyError"],"mappings":";;AAKO,MAAMA,kBAAkB,IACpB;QACH,MAAM,EAAE;QACR,UAAU,EAAE;QACZ,QAAQ,EAAE;QACV,QAAQ,EAAE;IACd;AAgBG,MAAMC,qBAAqB,CAACC;IAC/B,MAAM,EAAEC,KAAK,EAAEC,KAAK,EAAEC,MAAM,EAAE,GAAGH;IAEjC,MAAMI,QAAQN;IAKd,IAAIK,QAAQ;QACRC,MAAM,MAAM,CAAC,IAAI,CAAC;YACd,MAAM;gBACF,kBAAkBH,MAAM,MAAM;YAClC;QACJ;QACAG,MAAM,MAAM,CAAC,IAAI,CAAC;YACd,MAAM;gBACF,mBAAmBH,MAAM,OAAO;YACpC;QACJ;IACJ;IAKA,IAAIC,AAAoB,SAApBA,MAAM,SAAS,EACfE,MAAM,MAAM,CAAC,IAAI,CAAC;QACd,MAAM;YACF,kBAAkBC;QACtB;IACJ;SACG,IAAIH,AAAiB,SAAjBA,MAAM,MAAM,EACnBE,MAAM,MAAM,CAAC,IAAI,CAAC;QACd,MAAM;YACF,kBAAkBE;QACtB;IACJ;SAQA,MAAM,IAAIC,MACN,6EACA,gCACA;QACIL;IACJ;IAOR,OAAOA,MAAM,SAAS;IACtB,OAAOA,MAAM,MAAM;IAEnB,OAAOE;AACX"}
@@ -1,2 +0,0 @@
1
- import type { ModelField } from "./types.js";
2
- export declare const hasKeyword: (field: ModelField) => boolean;
@@ -1,17 +0,0 @@
1
- import { getBaseFieldType } from "@webiny/api-headless-cms/utils/getBaseFieldType.js";
2
- const noKeywordFields = [
3
- "date",
4
- "datetime",
5
- "number",
6
- "boolean"
7
- ];
8
- const hasKeyword = (field)=>{
9
- const fieldType = getBaseFieldType(field);
10
- if (noKeywordFields.includes(fieldType)) return false;
11
- if (field.unmappedType) return false;
12
- if (false === field.keyword) return false;
13
- return true;
14
- };
15
- export { hasKeyword };
16
-
17
- //# sourceMappingURL=keyword.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operations/entry/elasticsearch/keyword.js","sources":["../../../../src/operations/entry/elasticsearch/keyword.ts"],"sourcesContent":["import type { ModelField } from \"./types.js\";\nimport { getBaseFieldType } from \"@webiny/api-headless-cms/utils/getBaseFieldType.js\";\n\nconst noKeywordFields: string[] = [\"date\", \"datetime\", \"number\", \"boolean\"];\nexport const hasKeyword = (field: ModelField): boolean => {\n const fieldType = getBaseFieldType(field);\n /**\n * We defined some field types that MUST have no keyword added to the field path\n */\n if (noKeywordFields.includes(fieldType)) {\n return false;\n }\n /**\n * If field has unmapped type defined, do not add keyword.\n */\n //\n else if (field.unmappedType) {\n return false;\n }\n /**\n * And if specifically defined that field has no keyword, do not add it.\n */\n //\n else if (field.keyword === false) {\n return false;\n }\n /**\n * All other fields have keyword added.\n */\n return true;\n};\n"],"names":["noKeywordFields","hasKeyword","field","fieldType","getBaseFieldType"],"mappings":";AAGA,MAAMA,kBAA4B;IAAC;IAAQ;IAAY;IAAU;CAAU;AACpE,MAAMC,aAAa,CAACC;IACvB,MAAMC,YAAYC,iBAAiBF;IAInC,IAAIF,gBAAgB,QAAQ,CAACG,YACzB,OAAO;IAMN,IAAID,MAAM,YAAY,EACvB,OAAO;IAMN,IAAIA,AAAkB,UAAlBA,MAAM,OAAO,EAClB,OAAO;IAKX,OAAO;AACX"}
@@ -1,7 +0,0 @@
1
- import type { PluginsContainer } from "@webiny/plugins";
2
- import type { OpenSearchQueryBuilderOperatorPlugins } from "../types.js";
3
- interface Params {
4
- plugins: PluginsContainer;
5
- }
6
- export declare const createOperatorPluginList: (params: Params) => OpenSearchQueryBuilderOperatorPlugins;
7
- export {};
@@ -1,13 +0,0 @@
1
- import { OpenSearchQueryBuilderOperatorPlugin } from "@webiny/api-opensearch";
2
- const createOperatorPluginList = (params)=>{
3
- const { plugins } = params;
4
- return plugins.byType(OpenSearchQueryBuilderOperatorPlugin.type).reduce((acc, plugin)=>{
5
- const operator = plugin.getOperator();
6
- if (!!acc[operator] && (plugin.name || "").match(/\.default$/)) return acc;
7
- acc[operator] = plugin;
8
- return acc;
9
- }, {});
10
- };
11
- export { createOperatorPluginList };
12
-
13
- //# sourceMappingURL=operator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operations/entry/elasticsearch/plugins/operator.js","sources":["../../../../../src/operations/entry/elasticsearch/plugins/operator.ts"],"sourcesContent":["import type { PluginsContainer } from \"@webiny/plugins\";\nimport { OpenSearchQueryBuilderOperatorPlugin } from \"@webiny/api-opensearch\";\nimport type { OpenSearchQueryBuilderOperatorPlugins } from \"../types.js\";\n\ninterface Params {\n plugins: PluginsContainer;\n}\nexport const createOperatorPluginList = (params: Params): OpenSearchQueryBuilderOperatorPlugins => {\n const { plugins } = params;\n /**\n * We always set the last one operator plugin added.\n * This way user can override the plugins.\n */\n return plugins\n .byType<OpenSearchQueryBuilderOperatorPlugin>(OpenSearchQueryBuilderOperatorPlugin.type)\n .reduce<OpenSearchQueryBuilderOperatorPlugins>((acc, plugin) => {\n const operator = plugin.getOperator();\n /**\n * We also only allow the override of the plugins if the new plugin is NOT a default one.\n * If a user sets the plugin name ending with .default, we cannot do anything about it.\n */\n if (!!acc[operator] && (plugin.name || \"\").match(/\\.default$/)) {\n return acc;\n }\n acc[operator] = plugin;\n return acc;\n }, {});\n};\n"],"names":["createOperatorPluginList","params","plugins","OpenSearchQueryBuilderOperatorPlugin","acc","plugin","operator"],"mappings":";AAOO,MAAMA,2BAA2B,CAACC;IACrC,MAAM,EAAEC,OAAO,EAAE,GAAGD;IAKpB,OAAOC,QACF,MAAM,CAAuCC,qCAAqC,IAAI,EACtF,MAAM,CAAwC,CAACC,KAAKC;QACjD,MAAMC,WAAWD,OAAO,WAAW;QAKnC,IAAI,CAAC,CAACD,GAAG,CAACE,SAAS,IAAKD,AAAAA,CAAAA,OAAO,IAAI,IAAI,EAAC,EAAG,KAAK,CAAC,eAC7C,OAAOD;QAEXA,GAAG,CAACE,SAAS,GAAGD;QAChB,OAAOD;IACX,GAAG,CAAC;AACZ"}
@@ -1,2 +0,0 @@
1
- import type WebinyError from "@webiny/error";
2
- export declare const shouldIgnoreEsResponseError: (error: WebinyError) => boolean;
@@ -1,8 +0,0 @@
1
- const IGNORED_ES_SEARCH_EXCEPTIONS = [
2
- "index_not_found_exception",
3
- "search_phase_execution_exception"
4
- ];
5
- const shouldIgnoreEsResponseError = (error)=>IGNORED_ES_SEARCH_EXCEPTIONS.some((ignoredMessage)=>error.message.includes(ignoredMessage));
6
- export { shouldIgnoreEsResponseError };
7
-
8
- //# sourceMappingURL=shouldIgnoreEsResponseError.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operations/entry/elasticsearch/shouldIgnoreEsResponseError.js","sources":["../../../../src/operations/entry/elasticsearch/shouldIgnoreEsResponseError.ts"],"sourcesContent":["import type WebinyError from \"@webiny/error\";\n\nconst IGNORED_ES_SEARCH_EXCEPTIONS = [\n \"index_not_found_exception\",\n \"search_phase_execution_exception\"\n];\n\nexport const shouldIgnoreEsResponseError = (error: WebinyError) => {\n return IGNORED_ES_SEARCH_EXCEPTIONS.some(ignoredMessage =>\n error.message.includes(ignoredMessage)\n );\n};\n"],"names":["IGNORED_ES_SEARCH_EXCEPTIONS","shouldIgnoreEsResponseError","error","ignoredMessage"],"mappings":"AAEA,MAAMA,+BAA+B;IACjC;IACA;CACH;AAEM,MAAMC,8BAA8B,CAACC,QACjCF,6BAA6B,IAAI,CAACG,CAAAA,iBACrCD,MAAM,OAAO,CAAC,QAAQ,CAACC"}
@@ -1,12 +0,0 @@
1
- import type { Sort as OpenSearchSort } from "@webiny/api-opensearch/types.js";
2
- import type { CmsEntryListSort, CmsModel } from "@webiny/api-headless-cms/types/index.js";
3
- import type { ModelFields } from "./types.js";
4
- import type { CmsEntryOpenSearchValueSearchRegistry } from "../../../features/CmsEntryOpenSearchValueSearch/index.js";
5
- interface Params {
6
- sort?: CmsEntryListSort;
7
- modelFields: ModelFields;
8
- model: CmsModel;
9
- valueSearchRegistry: CmsEntryOpenSearchValueSearchRegistry.Interface;
10
- }
11
- export declare const createElasticsearchSort: (params: Params) => OpenSearchSort;
12
- export {};
@@ -1,80 +0,0 @@
1
- import { OpenSearchFieldPlugin, createSort } from "@webiny/api-opensearch";
2
- import { hasKeyword } from "./keyword.js";
3
- import { createFieldPathFactory } from "./filtering/path.js";
4
- import { NoValueContainer } from "../../../values/NoValueContainer.js";
5
- const matchField = (input)=>{
6
- const valuesMatch = input.match(/^values_([a-zA-Z-0-9_]+)_(ASC|DESC)$/);
7
- if (valuesMatch) {
8
- const [, fieldId, order] = valuesMatch;
9
- return {
10
- fieldId,
11
- isValues: true,
12
- order: order
13
- };
14
- }
15
- const nonValues = input.match(/^([a-zA-Z-0-9_]+)_(ASC|DESC)$/);
16
- if (!nonValues) return null;
17
- const [, fieldId, order] = nonValues;
18
- return {
19
- fieldId,
20
- isValues: false,
21
- order: order
22
- };
23
- };
24
- const createElasticsearchSort = (params)=>{
25
- const { sort, modelFields, valueSearchRegistry } = params;
26
- if (!sort || 0 === sort.length) return [
27
- {
28
- ["id.keyword"]: {
29
- order: "asc"
30
- }
31
- }
32
- ];
33
- const createFieldPath = createFieldPathFactory({
34
- valueSearchRegistry
35
- });
36
- const fieldIdToStorageIdIdMap = {};
37
- const sortPlugins = Object.values(modelFields).reduce((plugins, field)=>{
38
- const isValues = 1 === field.parents.length && "values" === field.parents[0].fieldId;
39
- if (field.parents.length > 0 && !isValues) return plugins;
40
- const fieldId = field.field.fieldId;
41
- const fieldIdPath = isValues ? `values.${fieldId}` : fieldId;
42
- fieldIdToStorageIdIdMap[fieldIdPath] = fieldIdPath;
43
- const { path } = createFieldPath({
44
- key: field.field.storageId,
45
- field,
46
- value: NoValueContainer.create(),
47
- keyword: false,
48
- originalValue: NoValueContainer.create()
49
- });
50
- plugins[fieldIdPath] = new OpenSearchFieldPlugin({
51
- unmappedType: field.unmappedType,
52
- keyword: hasKeyword(field),
53
- sortable: field.sortable,
54
- searchable: field.searchable,
55
- field: fieldId,
56
- path
57
- });
58
- return plugins;
59
- }, {
60
- ["*"]: new OpenSearchFieldPlugin({
61
- field: OpenSearchFieldPlugin.ALL,
62
- keyword: false
63
- })
64
- });
65
- const transformedSort = sort.map((value)=>{
66
- const matched = matchField(value);
67
- if (!matched) return null;
68
- const { fieldId, order, isValues } = matched;
69
- const key = isValues ? `values.${fieldId}` : fieldId;
70
- if (fieldIdToStorageIdIdMap[key]) return `${fieldIdToStorageIdIdMap[key]}_${order}`;
71
- return value;
72
- }).filter(Boolean);
73
- return createSort({
74
- fieldPlugins: sortPlugins,
75
- sort: transformedSort
76
- });
77
- };
78
- export { createElasticsearchSort };
79
-
80
- //# sourceMappingURL=sort.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operations/entry/elasticsearch/sort.js","sources":["../../../../src/operations/entry/elasticsearch/sort.ts"],"sourcesContent":["import type { Sort as OpenSearchSort } from \"@webiny/api-opensearch/types.js\";\nimport { createSort, OpenSearchFieldPlugin } from \"@webiny/api-opensearch\";\nimport type { CmsEntryListSort, CmsModel } from \"@webiny/api-headless-cms/types/index.js\";\nimport type { ModelFields } from \"./types.js\";\nimport { hasKeyword } from \"~/operations/entry/elasticsearch/keyword.js\";\nimport { createFieldPathFactory } from \"~/operations/entry/elasticsearch/filtering/path.js\";\nimport { NoValueContainer } from \"~/values/NoValueContainer.js\";\nimport type { CmsEntryOpenSearchValueSearchRegistry } from \"~/features/CmsEntryOpenSearchValueSearch/index.js\";\n\ninterface IMatchFieldResponse {\n fieldId: string;\n isValues: boolean;\n order: \"ASC\" | \"DESC\";\n}\n\nconst matchField = (input: string): IMatchFieldResponse | null => {\n const valuesMatch = input.match(/^values_([a-zA-Z-0-9_]+)_(ASC|DESC)$/);\n if (valuesMatch) {\n const [, fieldId, order] = valuesMatch;\n return {\n fieldId,\n isValues: true,\n order: order as \"ASC\" | \"DESC\"\n };\n }\n const nonValues = input.match(/^([a-zA-Z-0-9_]+)_(ASC|DESC)$/);\n if (!nonValues) {\n return null;\n }\n const [, fieldId, order] = nonValues;\n return {\n fieldId,\n isValues: false,\n order: order as \"ASC\" | \"DESC\"\n };\n};\n\ninterface Params {\n sort?: CmsEntryListSort;\n modelFields: ModelFields;\n model: CmsModel;\n valueSearchRegistry: CmsEntryOpenSearchValueSearchRegistry.Interface;\n}\n\nexport const createElasticsearchSort = (params: Params): OpenSearchSort => {\n const { sort, modelFields, valueSearchRegistry } = params;\n\n if (!sort || sort.length === 0) {\n return [\n {\n [\"id.keyword\"]: {\n order: \"asc\"\n }\n }\n ];\n }\n\n const createFieldPath = createFieldPathFactory({\n valueSearchRegistry\n });\n\n const fieldIdToStorageIdIdMap: Record<string, string> = {};\n\n const sortPlugins = Object.values(modelFields).reduce<Record<string, OpenSearchFieldPlugin>>(\n (plugins, field) => {\n /**\n * We do not support sorting by nested fields.\n */\n const isValues = field.parents.length === 1 && field.parents[0].fieldId === \"values\";\n if (field.parents.length > 0 && !isValues) {\n return plugins;\n }\n\n const fieldId = field.field.fieldId;\n const fieldIdPath = isValues ? `values.${fieldId}` : fieldId;\n\n fieldIdToStorageIdIdMap[fieldIdPath] = fieldIdPath;\n\n const { path } = createFieldPath({\n key: field.field.storageId,\n field,\n value: NoValueContainer.create(),\n keyword: false,\n originalValue: NoValueContainer.create()\n });\n /**\n * Plugins must be stored with fieldId as key because it is later used to find the sorting plugin.\n */\n plugins[fieldIdPath] = new OpenSearchFieldPlugin({\n unmappedType: field.unmappedType,\n keyword: hasKeyword(field),\n sortable: field.sortable,\n searchable: field.searchable,\n field: fieldId,\n path\n });\n return plugins;\n },\n {\n [\"*\"]: new OpenSearchFieldPlugin({\n field: OpenSearchFieldPlugin.ALL,\n keyword: false\n })\n }\n );\n\n const transformedSort = sort\n .map(value => {\n const matched = matchField(value);\n if (!matched) {\n return null;\n }\n const { fieldId, order, isValues } = matched;\n const key = isValues ? `values.${fieldId}` : fieldId;\n if (fieldIdToStorageIdIdMap[key]) {\n return `${fieldIdToStorageIdIdMap[key]}_${order}`;\n }\n\n return value;\n })\n .filter(Boolean) as string[];\n return createSort({\n fieldPlugins: sortPlugins,\n sort: transformedSort\n });\n};\n"],"names":["matchField","input","valuesMatch","fieldId","order","nonValues","createElasticsearchSort","params","sort","modelFields","valueSearchRegistry","createFieldPath","createFieldPathFactory","fieldIdToStorageIdIdMap","sortPlugins","Object","plugins","field","isValues","fieldIdPath","path","NoValueContainer","OpenSearchFieldPlugin","hasKeyword","transformedSort","value","matched","key","Boolean","createSort"],"mappings":";;;;AAeA,MAAMA,aAAa,CAACC;IAChB,MAAMC,cAAcD,MAAM,KAAK,CAAC;IAChC,IAAIC,aAAa;QACb,MAAM,GAAGC,SAASC,MAAM,GAAGF;QAC3B,OAAO;YACHC;YACA,UAAU;YACV,OAAOC;QACX;IACJ;IACA,MAAMC,YAAYJ,MAAM,KAAK,CAAC;IAC9B,IAAI,CAACI,WACD,OAAO;IAEX,MAAM,GAAGF,SAASC,MAAM,GAAGC;IAC3B,OAAO;QACHF;QACA,UAAU;QACV,OAAOC;IACX;AACJ;AASO,MAAME,0BAA0B,CAACC;IACpC,MAAM,EAAEC,IAAI,EAAEC,WAAW,EAAEC,mBAAmB,EAAE,GAAGH;IAEnD,IAAI,CAACC,QAAQA,AAAgB,MAAhBA,KAAK,MAAM,EACpB,OAAO;QACH;YACI,CAAC,aAAa,EAAE;gBACZ,OAAO;YACX;QACJ;KACH;IAGL,MAAMG,kBAAkBC,uBAAuB;QAC3CF;IACJ;IAEA,MAAMG,0BAAkD,CAAC;IAEzD,MAAMC,cAAcC,OAAO,MAAM,CAACN,aAAa,MAAM,CACjD,CAACO,SAASC;QAIN,MAAMC,WAAWD,AAAyB,MAAzBA,MAAM,OAAO,CAAC,MAAM,IAAUA,AAA6B,aAA7BA,MAAM,OAAO,CAAC,EAAE,CAAC,OAAO;QACvE,IAAIA,MAAM,OAAO,CAAC,MAAM,GAAG,KAAK,CAACC,UAC7B,OAAOF;QAGX,MAAMb,UAAUc,MAAM,KAAK,CAAC,OAAO;QACnC,MAAME,cAAcD,WAAW,CAAC,OAAO,EAAEf,SAAS,GAAGA;QAErDU,uBAAuB,CAACM,YAAY,GAAGA;QAEvC,MAAM,EAAEC,IAAI,EAAE,GAAGT,gBAAgB;YAC7B,KAAKM,MAAM,KAAK,CAAC,SAAS;YAC1BA;YACA,OAAOI,iBAAiB,MAAM;YAC9B,SAAS;YACT,eAAeA,iBAAiB,MAAM;QAC1C;QAIAL,OAAO,CAACG,YAAY,GAAG,IAAIG,sBAAsB;YAC7C,cAAcL,MAAM,YAAY;YAChC,SAASM,WAAWN;YACpB,UAAUA,MAAM,QAAQ;YACxB,YAAYA,MAAM,UAAU;YAC5B,OAAOd;YACPiB;QACJ;QACA,OAAOJ;IACX,GACA;QACI,CAAC,IAAI,EAAE,IAAIM,sBAAsB;YAC7B,OAAOA,sBAAsB,GAAG;YAChC,SAAS;QACb;IACJ;IAGJ,MAAME,kBAAkBhB,KACnB,GAAG,CAACiB,CAAAA;QACD,MAAMC,UAAU1B,WAAWyB;QAC3B,IAAI,CAACC,SACD,OAAO;QAEX,MAAM,EAAEvB,OAAO,EAAEC,KAAK,EAAEc,QAAQ,EAAE,GAAGQ;QACrC,MAAMC,MAAMT,WAAW,CAAC,OAAO,EAAEf,SAAS,GAAGA;QAC7C,IAAIU,uBAAuB,CAACc,IAAI,EAC5B,OAAO,GAAGd,uBAAuB,CAACc,IAAI,CAAC,CAAC,EAAEvB,OAAO;QAGrD,OAAOqB;IACX,GACC,MAAM,CAACG;IACZ,OAAOC,WAAW;QACd,cAAcf;QACd,MAAMU;IACV;AACJ"}
@@ -1,9 +0,0 @@
1
- import type { CmsModelField } from "@webiny/api-headless-cms/types/index.js";
2
- import type { CmsEntryOpenSearchValueSearchRegistry } from "../../../features/CmsEntryOpenSearchValueSearch/index.js";
3
- interface Params {
4
- valueSearchRegistry: CmsEntryOpenSearchValueSearchRegistry.Interface;
5
- field: CmsModelField;
6
- value: any;
7
- }
8
- export declare const transformValueForSearch: (params: Params) => any;
9
- export {};
@@ -1,12 +0,0 @@
1
- const transformValueForSearch = (params)=>{
2
- const { field, valueSearchRegistry, value } = params;
3
- const search = valueSearchRegistry.get(field.type);
4
- if (!search) return value;
5
- return search.transform({
6
- field,
7
- value
8
- });
9
- };
10
- export { transformValueForSearch };
11
-
12
- //# sourceMappingURL=transformValueForSearch.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operations/entry/elasticsearch/transformValueForSearch.js","sources":["../../../../src/operations/entry/elasticsearch/transformValueForSearch.ts"],"sourcesContent":["import type { CmsModelField } from \"@webiny/api-headless-cms/types/index.js\";\nimport type { CmsEntryOpenSearchValueSearchRegistry } from \"~/features/CmsEntryOpenSearchValueSearch/index.js\";\n\ninterface Params {\n valueSearchRegistry: CmsEntryOpenSearchValueSearchRegistry.Interface;\n field: CmsModelField;\n value: any;\n}\n\nexport const transformValueForSearch = (params: Params): any => {\n const { field, valueSearchRegistry, value } = params;\n const search = valueSearchRegistry.get(field.type);\n if (!search) {\n return value;\n }\n return search.transform({ field, value });\n};\n"],"names":["transformValueForSearch","params","field","valueSearchRegistry","value","search"],"mappings":"AASO,MAAMA,0BAA0B,CAACC;IACpC,MAAM,EAAEC,KAAK,EAAEC,mBAAmB,EAAEC,KAAK,EAAE,GAAGH;IAC9C,MAAMI,SAASF,oBAAoB,GAAG,CAACD,MAAM,IAAI;IACjD,IAAI,CAACG,QACD,OAAOD;IAEX,OAAOC,OAAO,SAAS,CAAC;QAAEH;QAAOE;IAAM;AAC3C"}
@@ -1,34 +0,0 @@
1
- import type { OpenSearchQueryBuilderOperatorPlugin } from "@webiny/api-opensearch";
2
- import type { CmsModelField } from "@webiny/api-headless-cms/types/index.js";
3
- /**
4
- * ./fields
5
- */
6
- type ModelFieldPath = string | ((value: string) => string);
7
- export type FieldType = "text" | "date" | "datetime" | "time" | "number" | "boolean" | string;
8
- export interface ModelFieldParent {
9
- fieldId: string;
10
- storageId: string;
11
- type: FieldType;
12
- }
13
- export interface ModelField {
14
- unmappedType?: string;
15
- keyword?: boolean;
16
- searchable: boolean;
17
- sortable: boolean;
18
- type: FieldType;
19
- systemField?: boolean;
20
- field: CmsModelField;
21
- path?: ModelFieldPath;
22
- fullTextSearch?: boolean;
23
- parents: ModelFieldParent[];
24
- }
25
- export interface ModelFields {
26
- [fieldId: string]: ModelField;
27
- }
28
- /**
29
- * ./plugins/operator
30
- */
31
- export interface OpenSearchQueryBuilderOperatorPlugins {
32
- [key: string]: OpenSearchQueryBuilderOperatorPlugin;
33
- }
34
- export {};
File without changes
@@ -1,34 +0,0 @@
1
- import type { Configurations } from "../../configurations.js";
2
- import type { Client } from "@webiny/api-opensearch";
3
- import { type IOpenSearchEntity as IElasticsearchEntity } from "@webiny/api-opensearch";
4
- import type { PluginsContainer } from "@webiny/plugins";
5
- import type { CmsEntryStorageOperations } from "../../types.js";
6
- import type { IEntryEntity } from "../../definitions/types.js";
7
- import type { CmsModelFieldToGraphQLRegistry } from "@webiny/api-headless-cms/exports/api/cms/graphql.js";
8
- import { CompressionHandler } from "@webiny/utils/features/compression/abstractions/CompressionHandler.js";
9
- import type { CmsEntryOpenSearchBodyModifier } from "../../features/CmsEntryOpenSearchBodyModifier/index.js";
10
- import type { CmsEntryOpenSearchSortModifier } from "../../features/CmsEntryOpenSearchSortModifier/index.js";
11
- import type { CmsEntryOpenSearchValuesModifier } from "../../features/CmsEntryOpenSearchValuesModifier/index.js";
12
- import type { CmsEntryOpenSearchQueryModifier } from "../../features/CmsEntryOpenSearchQueryModifier/index.js";
13
- import type { CmsEntryOpenSearchValueSearchRegistry } from "../../features/CmsEntryOpenSearchValueSearch/index.js";
14
- import type { CmsEntryOpenSearchFullTextSearch } from "../../features/CmsEntryOpenSearchFullTextSearch/index.js";
15
- import type { CmsEntryOpenSearchFieldIndexRegistry } from "../../features/CmsEntryOpenSearchFieldIndex/index.js";
16
- import type { CmsEntryOpenSearchFilterRegistry } from "../../features/CmsEntryOpenSearchFilter/index.js";
17
- export interface CreateEntriesStorageOperationsParams {
18
- entity: IEntryEntity;
19
- esEntity: IElasticsearchEntity;
20
- elasticsearch: Client;
21
- plugins: PluginsContainer;
22
- configurations: Configurations;
23
- fieldRegistry: CmsModelFieldToGraphQLRegistry.Interface;
24
- fieldIndexRegistry: CmsEntryOpenSearchFieldIndexRegistry.Interface;
25
- compressionHandler: CompressionHandler.Interface;
26
- bodyModifiers: CmsEntryOpenSearchBodyModifier.Interface[];
27
- sortModifiers: CmsEntryOpenSearchSortModifier.Interface[];
28
- queryModifiers: CmsEntryOpenSearchQueryModifier.Interface[];
29
- valueSearchRegistry: CmsEntryOpenSearchValueSearchRegistry.Interface;
30
- fullTextSearches: CmsEntryOpenSearchFullTextSearch.Interface[];
31
- valuesModifiers: CmsEntryOpenSearchValuesModifier.Interface[];
32
- filterRegistry: CmsEntryOpenSearchFilterRegistry.Interface;
33
- }
34
- export declare const createEntriesStorageOperations: (params: CreateEntriesStorageOperationsParams) => CmsEntryStorageOperations;