@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
@@ -1,140 +1,89 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createElasticsearchBody = void 0;
7
- var _fields = require("./fields");
8
- var _fullTextSearchFields = require("./fullTextSearchFields");
9
- var _initialQuery = require("./initialQuery");
10
- var _fullTextSearch = require("./fullTextSearch");
11
- var _queryModifier = require("./plugins/queryModifier");
12
- var _sortModifier = require("./plugins/sortModifier");
13
- var _bodyModifier = require("./plugins/bodyModifier");
14
- var _sort = require("./sort");
15
- var _filtering = require("./filtering");
16
- var _assignMinimumShouldMatchToQuery = require("./assignMinimumShouldMatchToQuery");
17
- const createElasticsearchBody = ({
18
- plugins,
19
- model,
20
- params
21
- }) => {
22
- const {
23
- fields,
24
- search: term,
25
- where,
26
- sort: initialSort,
27
- after,
28
- limit
29
- } = params;
30
- /**
31
- * We need the model fields constructed as a key -> field value, so we do not need to iterate through array when we require some field.
32
- */
33
- const modelFields = (0, _fields.createModelFields)({
34
- plugins,
35
- model
36
- });
37
-
38
- /**
39
- * We need the query modifier plugins.
40
- */
41
- const queryModifierPlugins = (0, _queryModifier.createQueryModifierPluginList)({
42
- plugins,
43
- model
44
- });
45
- /**
46
- * We need the sort modifier plugins.
47
- */
48
- const sortModifierPlugins = (0, _sortModifier.createSortModifierPluginList)({
49
- plugins,
50
- model
51
- });
52
- /**
53
- * We need the body modifier plugins.
54
- */
55
- const bodyModifierPlugins = (0, _bodyModifier.createBodyModifierPluginList)({
56
- plugins,
57
- model
58
- });
59
- /**
60
- * We need the fields which we can search through via the full text search.
61
- *
62
- */
63
- const fullTextSearchFields = (0, _fullTextSearchFields.createFullTextSearchFields)({
64
- model,
65
- term,
66
- fields
67
- });
68
- /**
69
- * The initial elasticsearch query where we attach some default conditions we always need.
70
- */
71
- const query = (0, _initialQuery.createInitialQuery)({
72
- where,
73
- model
74
- });
75
- /**
76
- * Apply the full text search, if term is set.
77
- */
78
- (0, _fullTextSearch.applyFullTextSearch)({
79
- model,
80
- plugins,
81
- query,
82
- term,
83
- fields: fullTextSearchFields
84
- });
85
- const execFiltering = (0, _filtering.createExecFiltering)({
86
- model,
87
- fields: modelFields,
88
- plugins
89
- });
90
- execFiltering({
91
- where,
92
- query
93
- });
94
- for (const pl of queryModifierPlugins) {
95
- pl.modifyQuery({
96
- query,
97
- model,
98
- where
1
+ import { createModelFields } from "./fields.js";
2
+ import { createFullTextSearchFields } from "./fullTextSearchFields.js";
3
+ import { createInitialQuery } from "./initialQuery.js";
4
+ import { applyFullTextSearch } from "./fullTextSearch.js";
5
+ import { createElasticsearchSort } from "./sort.js";
6
+ import { createExecFiltering } from "./filtering/index.js";
7
+ import { assignMinimumShouldMatchToQuery } from "./assignMinimumShouldMatchToQuery.js";
8
+ const createElasticsearchBody = ({ operatorRegistry, model, shared, params, fieldRegistry, fieldIndexRegistry, bodyModifiers, sortModifiers, queryModifiers, valueSearchRegistry, fullTextSearches, filterRegistry, fieldFactory })=>{
9
+ const { fields, search: term, where, sort: initialSort, after, limit } = params;
10
+ const modelFields = createModelFields({
11
+ model,
12
+ fieldRegistry,
13
+ fieldIndexRegistry
14
+ });
15
+ const applicableQueryModifiers = queryModifiers.filter((m)=>!m.modelId || m.modelId === model.modelId);
16
+ const applicableSortModifiers = sortModifiers.filter((m)=>!m.modelId || m.modelId === model.modelId);
17
+ const applicableBodyModifiers = bodyModifiers.filter((m)=>!m.modelId || m.modelId === model.modelId);
18
+ const fullTextSearchFields = createFullTextSearchFields({
19
+ fields: modelFields,
20
+ term,
21
+ targets: fields
22
+ });
23
+ const query = createInitialQuery({
24
+ where,
25
+ model,
26
+ shared
27
+ });
28
+ applyFullTextSearch({
29
+ model,
30
+ fullTextSearches,
31
+ query,
32
+ term,
33
+ fields: fullTextSearchFields
34
+ });
35
+ const execFiltering = createExecFiltering({
36
+ model,
37
+ fields: modelFields,
38
+ operatorRegistry,
39
+ valueSearchRegistry,
40
+ filterRegistry
99
41
  });
100
- }
101
- const sort = (0, _sort.createElasticsearchSort)({
102
- plugins,
103
- sort: initialSort,
104
- modelFields,
105
- model
106
- });
107
- for (const pl of sortModifierPlugins) {
108
- pl.modifySort({
109
- sort,
110
- model
42
+ execFiltering({
43
+ where,
44
+ query
111
45
  });
112
- }
113
- const boolQuery = {
114
- must: query.must.length > 0 ? query.must : undefined,
115
- must_not: query.must_not.length > 0 ? query.must_not : undefined,
116
- should: query.should.length > 0 ? query.should : undefined,
117
- filter: query.filter.length > 0 ? query.filter : undefined
118
- };
119
- (0, _assignMinimumShouldMatchToQuery.assignMinimumShouldMatchToQuery)({
120
- query: boolQuery
121
- });
122
- const body = {
123
- query: {
124
- bool: boolQuery
125
- },
126
- sort,
127
- size: (limit || 0) + 1,
128
- search_after: after,
129
- track_total_hits: true
130
- };
131
- for (const pl of bodyModifierPlugins) {
132
- pl.modifyBody({
133
- body,
134
- model,
135
- where
46
+ for (const modifier of applicableQueryModifiers)modifier.modifyQuery({
47
+ query,
48
+ model,
49
+ where
136
50
  });
137
- }
138
- return body;
51
+ const sort = createElasticsearchSort({
52
+ sort: initialSort,
53
+ modelFields,
54
+ model,
55
+ valueSearchRegistry,
56
+ fieldFactory
57
+ });
58
+ for (const modifier of applicableSortModifiers)modifier.modifySort({
59
+ sort,
60
+ model
61
+ });
62
+ const boolQuery = {
63
+ must: query.must.length > 0 ? query.must : void 0,
64
+ must_not: query.must_not.length > 0 ? query.must_not : void 0,
65
+ should: query.should.length > 0 ? query.should : void 0,
66
+ filter: query.filter.length > 0 ? query.filter : void 0
67
+ };
68
+ assignMinimumShouldMatchToQuery({
69
+ query: boolQuery
70
+ });
71
+ const body = {
72
+ query: {
73
+ bool: boolQuery
74
+ },
75
+ sort,
76
+ size: (limit || 0) + 1,
77
+ search_after: after,
78
+ track_total_hits: true
79
+ };
80
+ for (const modifier of applicableBodyModifiers)modifier.modifyBody({
81
+ body,
82
+ model,
83
+ where
84
+ });
85
+ return body;
139
86
  };
140
- exports.createElasticsearchBody = createElasticsearchBody;
87
+ export { createElasticsearchBody };
88
+
89
+ //# sourceMappingURL=body.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createElasticsearchBody","plugins","model","params","fields","search","term","where","sort","initialSort","after","limit","modelFields","createModelFields","queryModifierPlugins","createQueryModifierPluginList","sortModifierPlugins","createSortModifierPluginList","bodyModifierPlugins","createBodyModifierPluginList","fullTextSearchFields","createFullTextSearchFields","query","createInitialQuery","applyFullTextSearch","execFiltering","createExecFiltering","pl","modifyQuery","createElasticsearchSort","modifySort","boolQuery","must","length","undefined","must_not","should","filter","assignMinimumShouldMatchToQuery","body","bool","size","search_after","track_total_hits","modifyBody"],"sources":["body.ts"],"sourcesContent":["import { PluginsContainer } from \"@webiny/plugins\";\nimport { CmsEntryListParams, CmsEntryListWhere, CmsModel } from \"@webiny/api-headless-cms/types\";\nimport { createModelFields } from \"./fields\";\nimport { createFullTextSearchFields } from \"./fullTextSearchFields\";\nimport { createInitialQuery } from \"./initialQuery\";\nimport { applyFullTextSearch } from \"./fullTextSearch\";\nimport { createQueryModifierPluginList } from \"./plugins/queryModifier\";\nimport { createSortModifierPluginList } from \"./plugins/sortModifier\";\nimport { createBodyModifierPluginList } from \"./plugins/bodyModifier\";\nimport { createElasticsearchSort } from \"./sort\";\nimport { PrimitiveValue, SearchBody, BoolQueryConfig } from \"@webiny/api-elasticsearch/types\";\nimport { createExecFiltering } from \"./filtering\";\nimport { assignMinimumShouldMatchToQuery } from \"./assignMinimumShouldMatchToQuery\";\n\ninterface Params {\n plugins: PluginsContainer;\n model: CmsModel;\n params: Omit<CmsEntryListParams, \"where\" | \"after\"> & {\n where: CmsEntryListWhere;\n after?: PrimitiveValue[];\n };\n}\nexport const createElasticsearchBody = ({ plugins, model, params }: Params): SearchBody => {\n const { fields, search: term, where, sort: initialSort, after, limit } = params;\n /**\n * We need the model fields constructed as a key -> field value, so we do not need to iterate through array when we require some field.\n */\n const modelFields = createModelFields({\n plugins,\n model\n });\n\n /**\n * We need the query modifier plugins.\n */\n const queryModifierPlugins = createQueryModifierPluginList({\n plugins,\n model\n });\n /**\n * We need the sort modifier plugins.\n */\n const sortModifierPlugins = createSortModifierPluginList({\n plugins,\n model\n });\n /**\n * We need the body modifier plugins.\n */\n const bodyModifierPlugins = createBodyModifierPluginList({\n plugins,\n model\n });\n /**\n * We need the fields which we can search through via the full text search.\n *\n */\n const fullTextSearchFields = createFullTextSearchFields({\n model,\n term,\n fields\n });\n /**\n * The initial elasticsearch query where we attach some default conditions we always need.\n */\n const query = createInitialQuery({\n where,\n model\n });\n /**\n * Apply the full text search, if term is set.\n */\n applyFullTextSearch({\n model,\n plugins,\n query,\n term,\n fields: fullTextSearchFields\n });\n\n const execFiltering = createExecFiltering({\n model,\n fields: modelFields,\n plugins\n });\n\n execFiltering({\n where,\n query\n });\n\n for (const pl of queryModifierPlugins) {\n pl.modifyQuery({ query, model, where });\n }\n\n const sort = createElasticsearchSort({\n plugins,\n sort: initialSort,\n modelFields,\n model\n });\n\n for (const pl of sortModifierPlugins) {\n pl.modifySort({\n sort,\n model\n });\n }\n\n const boolQuery: BoolQueryConfig = {\n must: query.must.length > 0 ? query.must : undefined,\n must_not: query.must_not.length > 0 ? query.must_not : undefined,\n should: query.should.length > 0 ? query.should : undefined,\n filter: query.filter.length > 0 ? query.filter : undefined\n };\n\n assignMinimumShouldMatchToQuery({\n query: boolQuery\n });\n\n const body: SearchBody = {\n query: {\n bool: boolQuery\n },\n sort,\n size: (limit || 0) + 1,\n search_after: after,\n track_total_hits: true\n };\n\n for (const pl of bodyModifierPlugins) {\n pl.modifyBody({\n body,\n model,\n where\n });\n }\n\n return body;\n};\n"],"mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAUO,MAAMA,uBAAuB,GAAG,CAAC;EAAEC,OAAO;EAAEC,KAAK;EAAEC;AAAe,CAAC,KAAiB;EACvF,MAAM;IAAEC,MAAM;IAAEC,MAAM,EAAEC,IAAI;IAAEC,KAAK;IAAEC,IAAI,EAAEC,WAAW;IAAEC,KAAK;IAAEC;EAAM,CAAC,GAAGR,MAAM;EAC/E;AACJ;AACA;EACI,MAAMS,WAAW,GAAG,IAAAC,yBAAiB,EAAC;IAClCZ,OAAO;IACPC;EACJ,CAAC,CAAC;;EAEF;AACJ;AACA;EACI,MAAMY,oBAAoB,GAAG,IAAAC,4CAA6B,EAAC;IACvDd,OAAO;IACPC;EACJ,CAAC,CAAC;EACF;AACJ;AACA;EACI,MAAMc,mBAAmB,GAAG,IAAAC,0CAA4B,EAAC;IACrDhB,OAAO;IACPC;EACJ,CAAC,CAAC;EACF;AACJ;AACA;EACI,MAAMgB,mBAAmB,GAAG,IAAAC,0CAA4B,EAAC;IACrDlB,OAAO;IACPC;EACJ,CAAC,CAAC;EACF;AACJ;AACA;AACA;EACI,MAAMkB,oBAAoB,GAAG,IAAAC,gDAA0B,EAAC;IACpDnB,KAAK;IACLI,IAAI;IACJF;EACJ,CAAC,CAAC;EACF;AACJ;AACA;EACI,MAAMkB,KAAK,GAAG,IAAAC,gCAAkB,EAAC;IAC7BhB,KAAK;IACLL;EACJ,CAAC,CAAC;EACF;AACJ;AACA;EACI,IAAAsB,mCAAmB,EAAC;IAChBtB,KAAK;IACLD,OAAO;IACPqB,KAAK;IACLhB,IAAI;IACJF,MAAM,EAAEgB;EACZ,CAAC,CAAC;EAEF,MAAMK,aAAa,GAAG,IAAAC,8BAAmB,EAAC;IACtCxB,KAAK;IACLE,MAAM,EAAEQ,WAAW;IACnBX;EACJ,CAAC,CAAC;EAEFwB,aAAa,CAAC;IACVlB,KAAK;IACLe;EACJ,CAAC,CAAC;EAEF,KAAK,MAAMK,EAAE,IAAIb,oBAAoB,EAAE;IACnCa,EAAE,CAACC,WAAW,CAAC;MAAEN,KAAK;MAAEpB,KAAK;MAAEK;IAAM,CAAC,CAAC;EAC3C;EAEA,MAAMC,IAAI,GAAG,IAAAqB,6BAAuB,EAAC;IACjC5B,OAAO;IACPO,IAAI,EAAEC,WAAW;IACjBG,WAAW;IACXV;EACJ,CAAC,CAAC;EAEF,KAAK,MAAMyB,EAAE,IAAIX,mBAAmB,EAAE;IAClCW,EAAE,CAACG,UAAU,CAAC;MACVtB,IAAI;MACJN;IACJ,CAAC,CAAC;EACN;EAEA,MAAM6B,SAA0B,GAAG;IAC/BC,IAAI,EAAEV,KAAK,CAACU,IAAI,CAACC,MAAM,GAAG,CAAC,GAAGX,KAAK,CAACU,IAAI,GAAGE,SAAS;IACpDC,QAAQ,EAAEb,KAAK,CAACa,QAAQ,CAACF,MAAM,GAAG,CAAC,GAAGX,KAAK,CAACa,QAAQ,GAAGD,SAAS;IAChEE,MAAM,EAAEd,KAAK,CAACc,MAAM,CAACH,MAAM,GAAG,CAAC,GAAGX,KAAK,CAACc,MAAM,GAAGF,SAAS;IAC1DG,MAAM,EAAEf,KAAK,CAACe,MAAM,CAACJ,MAAM,GAAG,CAAC,GAAGX,KAAK,CAACe,MAAM,GAAGH;EACrD,CAAC;EAED,IAAAI,gEAA+B,EAAC;IAC5BhB,KAAK,EAAES;EACX,CAAC,CAAC;EAEF,MAAMQ,IAAgB,GAAG;IACrBjB,KAAK,EAAE;MACHkB,IAAI,EAAET;IACV,CAAC;IACDvB,IAAI;IACJiC,IAAI,EAAE,CAAC9B,KAAK,IAAI,CAAC,IAAI,CAAC;IACtB+B,YAAY,EAAEhC,KAAK;IACnBiC,gBAAgB,EAAE;EACtB,CAAC;EAED,KAAK,MAAMhB,EAAE,IAAIT,mBAAmB,EAAE;IAClCS,EAAE,CAACiB,UAAU,CAAC;MACVL,IAAI;MACJrC,KAAK;MACLK;IACJ,CAAC,CAAC;EACN;EAEA,OAAOgC,IAAI;AACf,CAAC;AAAC"}
1
+ {"version":3,"file":"operations/entry/elasticsearch/body.js","sources":["../../../../src/operations/entry/elasticsearch/body.ts"],"sourcesContent":["import type { OpenSearchQueryBuilderOperatorRegistry } from \"@webiny/api-opensearch/exports/api/opensearch.js\";\nimport type { OpenSearchFieldFactory } from \"@webiny/api-opensearch/exports/api/opensearch.js\";\nimport type {\n CmsEntryListParams,\n CmsEntryListWhere,\n CmsModel\n} from \"@webiny/api-headless-cms/types/index.js\";\nimport { createModelFields } from \"./fields.js\";\nimport { createFullTextSearchFields } from \"./fullTextSearchFields.js\";\nimport { createInitialQuery } from \"./initialQuery.js\";\nimport { applyFullTextSearch } from \"./fullTextSearch.js\";\nimport type { CmsEntryOpenSearchBodyModifier } from \"~/features/CmsEntryOpenSearchBodyModifier/index.js\";\nimport type { CmsEntryOpenSearchSortModifier } from \"~/features/CmsEntryOpenSearchSortModifier/index.js\";\nimport type { CmsEntryOpenSearchQueryModifier } from \"~/features/CmsEntryOpenSearchQueryModifier/index.js\";\nimport type { CmsEntryOpenSearchValueSearchRegistry } from \"~/features/CmsEntryOpenSearchValueSearch/index.js\";\nimport type { CmsEntryOpenSearchFullTextSearch } from \"~/features/CmsEntryOpenSearchFullTextSearch/index.js\";\nimport { createElasticsearchSort } from \"./sort.js\";\nimport type {\n PrimitiveValue,\n QueryDslBoolQuery as BoolQueryConfig,\n SearchBody\n} from \"@webiny/api-opensearch/types.js\";\nimport { createExecFiltering } from \"./filtering/index.js\";\nimport { assignMinimumShouldMatchToQuery } from \"./assignMinimumShouldMatchToQuery.js\";\nimport { CmsModelFieldToGraphQLRegistry } from \"@webiny/api-headless-cms/features/graphql/index.js\";\nimport { CmsEntryOpenSearchFieldIndexRegistry } from \"~/features/CmsEntryOpenSearchFieldIndex/index.js\";\nimport type { CmsEntryOpenSearchFilterRegistry } from \"~/features/CmsEntryOpenSearchFilter/index.js\";\n\ninterface ICreateElasticsearchBodyParams {\n operatorRegistry: OpenSearchQueryBuilderOperatorRegistry.Interface;\n model: CmsModel;\n shared: boolean;\n fieldRegistry: CmsModelFieldToGraphQLRegistry.Interface;\n fieldIndexRegistry: CmsEntryOpenSearchFieldIndexRegistry.Interface;\n bodyModifiers: CmsEntryOpenSearchBodyModifier.Interface[];\n sortModifiers: CmsEntryOpenSearchSortModifier.Interface[];\n queryModifiers: CmsEntryOpenSearchQueryModifier.Interface[];\n valueSearchRegistry: CmsEntryOpenSearchValueSearchRegistry.Interface;\n fullTextSearches: CmsEntryOpenSearchFullTextSearch.Interface[];\n filterRegistry: CmsEntryOpenSearchFilterRegistry.Interface;\n fieldFactory: OpenSearchFieldFactory.Interface;\n params: Omit<CmsEntryListParams, \"where\" | \"after\"> & {\n where: CmsEntryListWhere;\n after?: PrimitiveValue[];\n };\n}\nexport const createElasticsearchBody = ({\n operatorRegistry,\n model,\n shared,\n params,\n fieldRegistry,\n fieldIndexRegistry,\n bodyModifiers,\n sortModifiers,\n queryModifiers,\n valueSearchRegistry,\n fullTextSearches,\n filterRegistry,\n fieldFactory\n}: ICreateElasticsearchBodyParams): SearchBody => {\n const { fields, search: term, where, sort: initialSort, after, limit } = params;\n /**\n * We need the model fields constructed as a key -> field value, so we do not need to iterate through array when we require some field.\n */\n const modelFields = createModelFields({\n model,\n fieldRegistry,\n fieldIndexRegistry\n });\n\n /**\n * Filter query modifiers applicable to this model.\n */\n const applicableQueryModifiers = queryModifiers.filter(m => {\n return !m.modelId || m.modelId === model.modelId;\n });\n /**\n * Filter sort modifiers applicable to this model.\n */\n const applicableSortModifiers = sortModifiers.filter(\n m => !m.modelId || m.modelId === model.modelId\n );\n /**\n * Filter body modifiers applicable to this model.\n */\n const applicableBodyModifiers = bodyModifiers.filter(m => {\n return !m.modelId || m.modelId === model.modelId;\n });\n /**\n * We need the fields which we can search through via the full text search.\n *\n */\n const fullTextSearchFields = createFullTextSearchFields({\n fields: modelFields,\n term,\n targets: fields\n });\n /**\n * The initial elasticsearch query where we attach some default conditions we always need.\n */\n const query = createInitialQuery({\n where,\n model,\n shared\n });\n /**\n * Apply the full text search, if term is set.\n */\n applyFullTextSearch({\n model,\n fullTextSearches,\n query,\n term,\n fields: fullTextSearchFields\n });\n\n const execFiltering = createExecFiltering({\n model,\n fields: modelFields,\n operatorRegistry,\n valueSearchRegistry,\n filterRegistry\n });\n\n execFiltering({\n where,\n query\n });\n\n for (const modifier of applicableQueryModifiers) {\n modifier.modifyQuery({ query, model, where });\n }\n\n const sort = createElasticsearchSort({\n sort: initialSort,\n modelFields,\n model,\n valueSearchRegistry,\n fieldFactory\n });\n\n for (const modifier of applicableSortModifiers) {\n modifier.modifySort({\n sort,\n model\n });\n }\n\n const boolQuery: BoolQueryConfig = {\n must: query.must.length > 0 ? query.must : undefined,\n must_not: query.must_not.length > 0 ? query.must_not : undefined,\n should: query.should.length > 0 ? query.should : undefined,\n filter: query.filter.length > 0 ? query.filter : undefined\n };\n\n assignMinimumShouldMatchToQuery({\n query: boolQuery\n });\n\n const body: SearchBody = {\n query: {\n bool: boolQuery\n },\n sort,\n size: (limit || 0) + 1,\n search_after: after,\n track_total_hits: true\n };\n\n for (const modifier of applicableBodyModifiers) {\n modifier.modifyBody({\n body,\n model,\n where\n });\n }\n\n return body;\n};\n"],"names":["createElasticsearchBody","operatorRegistry","model","shared","params","fieldRegistry","fieldIndexRegistry","bodyModifiers","sortModifiers","queryModifiers","valueSearchRegistry","fullTextSearches","filterRegistry","fieldFactory","fields","term","where","initialSort","after","limit","modelFields","createModelFields","applicableQueryModifiers","m","applicableSortModifiers","applicableBodyModifiers","fullTextSearchFields","createFullTextSearchFields","query","createInitialQuery","applyFullTextSearch","execFiltering","createExecFiltering","modifier","sort","createElasticsearchSort","boolQuery","undefined","assignMinimumShouldMatchToQuery","body"],"mappings":";;;;;;;AA8CO,MAAMA,0BAA0B,CAAC,EACpCC,gBAAgB,EAChBC,KAAK,EACLC,MAAM,EACNC,MAAM,EACNC,aAAa,EACbC,kBAAkB,EAClBC,aAAa,EACbC,aAAa,EACbC,cAAc,EACdC,mBAAmB,EACnBC,gBAAgB,EAChBC,cAAc,EACdC,YAAY,EACiB;IAC7B,MAAM,EAAEC,MAAM,EAAE,QAAQC,IAAI,EAAEC,KAAK,EAAE,MAAMC,WAAW,EAAEC,KAAK,EAAEC,KAAK,EAAE,GAAGf;IAIzE,MAAMgB,cAAcC,kBAAkB;QAClCnB;QACAG;QACAC;IACJ;IAKA,MAAMgB,2BAA2Bb,eAAe,MAAM,CAACc,CAAAA,IAC5C,CAACA,EAAE,OAAO,IAAIA,EAAE,OAAO,KAAKrB,MAAM,OAAO;IAKpD,MAAMsB,0BAA0BhB,cAAc,MAAM,CAChDe,CAAAA,IAAK,CAACA,EAAE,OAAO,IAAIA,EAAE,OAAO,KAAKrB,MAAM,OAAO;IAKlD,MAAMuB,0BAA0BlB,cAAc,MAAM,CAACgB,CAAAA,IAC1C,CAACA,EAAE,OAAO,IAAIA,EAAE,OAAO,KAAKrB,MAAM,OAAO;IAMpD,MAAMwB,uBAAuBC,2BAA2B;QACpD,QAAQP;QACRL;QACA,SAASD;IACb;IAIA,MAAMc,QAAQC,mBAAmB;QAC7Bb;QACAd;QACAC;IACJ;IAIA2B,oBAAoB;QAChB5B;QACAS;QACAiB;QACAb;QACA,QAAQW;IACZ;IAEA,MAAMK,gBAAgBC,oBAAoB;QACtC9B;QACA,QAAQkB;QACRnB;QACAS;QACAE;IACJ;IAEAmB,cAAc;QACVf;QACAY;IACJ;IAEA,KAAK,MAAMK,YAAYX,yBACnBW,SAAS,WAAW,CAAC;QAAEL;QAAO1B;QAAOc;IAAM;IAG/C,MAAMkB,OAAOC,wBAAwB;QACjC,MAAMlB;QACNG;QACAlB;QACAQ;QACAG;IACJ;IAEA,KAAK,MAAMoB,YAAYT,wBACnBS,SAAS,UAAU,CAAC;QAChBC;QACAhC;IACJ;IAGJ,MAAMkC,YAA6B;QAC/B,MAAMR,MAAM,IAAI,CAAC,MAAM,GAAG,IAAIA,MAAM,IAAI,GAAGS;QAC3C,UAAUT,MAAM,QAAQ,CAAC,MAAM,GAAG,IAAIA,MAAM,QAAQ,GAAGS;QACvD,QAAQT,MAAM,MAAM,CAAC,MAAM,GAAG,IAAIA,MAAM,MAAM,GAAGS;QACjD,QAAQT,MAAM,MAAM,CAAC,MAAM,GAAG,IAAIA,MAAM,MAAM,GAAGS;IACrD;IAEAC,gCAAgC;QAC5B,OAAOF;IACX;IAEA,MAAMG,OAAmB;QACrB,OAAO;YACH,MAAMH;QACV;QACAF;QACA,MAAOf,AAAAA,CAAAA,SAAS,KAAK;QACrB,cAAcD;QACd,kBAAkB;IACtB;IAEA,KAAK,MAAMe,YAAYR,wBACnBQ,SAAS,UAAU,CAAC;QAChBM;QACArC;QACAc;IACJ;IAGJ,OAAOuB;AACX"}
@@ -0,0 +1,4 @@
1
+ import type { CmsModelField } from "@webiny/api-headless-cms/types/index.js";
2
+ type PartialCmsModelField = Partial<CmsModelField> & Pick<CmsModelField, "storageId" | "fieldId" | "type">;
3
+ export declare const createSystemField: (field: PartialCmsModelField) => CmsModelField;
4
+ export {};
@@ -0,0 +1,9 @@
1
+ import { createModelField } from "@webiny/api-headless-cms";
2
+ const createSystemField = (field)=>createModelField({
3
+ ...field,
4
+ id: field.fieldId,
5
+ label: field.fieldId
6
+ });
7
+ export { createSystemField };
8
+
9
+ //# sourceMappingURL=createSystemField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations/entry/elasticsearch/fields/createSystemField.js","sources":["../../../../../src/operations/entry/elasticsearch/fields/createSystemField.ts"],"sourcesContent":["import type { CmsModelField } from \"@webiny/api-headless-cms/types/index.js\";\nimport { createModelField } from \"@webiny/api-headless-cms\";\n\ntype PartialCmsModelField = Partial<CmsModelField> &\n Pick<CmsModelField, \"storageId\" | \"fieldId\" | \"type\">;\nexport const createSystemField = (field: PartialCmsModelField): CmsModelField => {\n return createModelField({\n ...field,\n id: field.fieldId,\n label: field.fieldId\n });\n};\n"],"names":["createSystemField","field","createModelField"],"mappings":";AAKO,MAAMA,oBAAoB,CAACC,QACvBC,iBAAiB;QACpB,GAAGD,KAAK;QACR,IAAIA,MAAM,OAAO;QACjB,OAAOA,MAAM,OAAO;IACxB"}
@@ -0,0 +1,2 @@
1
+ import type { ModelFields } from "../../../../operations/entry/elasticsearch/types.js";
2
+ export declare const liveFields: ModelFields;
@@ -0,0 +1,50 @@
1
+ import { createSystemField } from "./createSystemField.js";
2
+ import { createModelField } from "@webiny/api-headless-cms";
3
+ const liveFields = {
4
+ live: {
5
+ type: "object",
6
+ systemField: true,
7
+ searchable: true,
8
+ sortable: false,
9
+ field: createSystemField({
10
+ storageId: "live",
11
+ fieldId: "live",
12
+ type: "object",
13
+ settings: {
14
+ fields: [
15
+ createModelField({
16
+ id: "version",
17
+ fieldId: "version",
18
+ storageId: "version",
19
+ type: "number",
20
+ label: "Version"
21
+ })
22
+ ]
23
+ }
24
+ }),
25
+ parents: []
26
+ },
27
+ "live.version": {
28
+ type: "number",
29
+ systemField: true,
30
+ searchable: true,
31
+ sortable: false,
32
+ parents: [
33
+ {
34
+ fieldId: "live",
35
+ type: "object",
36
+ storageId: "live"
37
+ }
38
+ ],
39
+ field: createSystemField({
40
+ id: "version",
41
+ fieldId: "version",
42
+ storageId: "version",
43
+ type: "number",
44
+ label: "Version"
45
+ })
46
+ }
47
+ };
48
+ export { liveFields };
49
+
50
+ //# sourceMappingURL=live.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations/entry/elasticsearch/fields/live.js","sources":["../../../../../src/operations/entry/elasticsearch/fields/live.ts"],"sourcesContent":["import type { ModelFields } from \"~/operations/entry/elasticsearch/types.js\";\nimport { createSystemField } from \"./createSystemField.js\";\nimport { createModelField } from \"@webiny/api-headless-cms\";\n\nexport const liveFields: ModelFields = {\n live: {\n type: \"object\",\n systemField: true,\n searchable: true,\n sortable: false,\n field: createSystemField({\n storageId: \"live\",\n fieldId: \"live\",\n type: \"object\",\n settings: {\n fields: [\n createModelField({\n id: \"version\",\n fieldId: \"version\",\n storageId: \"version\",\n type: \"number\",\n label: \"Version\"\n })\n ]\n }\n }),\n parents: []\n },\n \"live.version\": {\n type: \"number\",\n systemField: true,\n searchable: true,\n sortable: false,\n parents: [\n {\n fieldId: \"live\",\n type: \"object\",\n storageId: \"live\"\n }\n ],\n field: createSystemField({\n id: \"version\",\n fieldId: \"version\",\n storageId: \"version\",\n type: \"number\",\n label: \"Version\"\n })\n }\n};\n"],"names":["liveFields","createSystemField","createModelField"],"mappings":";;AAIO,MAAMA,aAA0B;IACnC,MAAM;QACF,MAAM;QACN,aAAa;QACb,YAAY;QACZ,UAAU;QACV,OAAOC,kBAAkB;YACrB,WAAW;YACX,SAAS;YACT,MAAM;YACN,UAAU;gBACN,QAAQ;oBACJC,iBAAiB;wBACb,IAAI;wBACJ,SAAS;wBACT,WAAW;wBACX,MAAM;wBACN,OAAO;oBACX;iBACH;YACL;QACJ;QACA,SAAS,EAAE;IACf;IACA,gBAAgB;QACZ,MAAM;QACN,aAAa;QACb,YAAY;QACZ,UAAU;QACV,SAAS;YACL;gBACI,SAAS;gBACT,MAAM;gBACN,WAAW;YACf;SACH;QACD,OAAOD,kBAAkB;YACrB,IAAI;YACJ,SAAS;YACT,WAAW;YACX,MAAM;YACN,OAAO;QACX;IACJ;AACJ"}
@@ -0,0 +1,2 @@
1
+ import type { ModelFields } from "../../../../operations/entry/elasticsearch/types.js";
2
+ export declare const locationFields: ModelFields;
@@ -0,0 +1,50 @@
1
+ import { createSystemField } from "./createSystemField.js";
2
+ import { createModelField } from "@webiny/api-headless-cms";
3
+ const locationFields = {
4
+ wbyAco_location: {
5
+ type: "object",
6
+ systemField: true,
7
+ searchable: true,
8
+ sortable: true,
9
+ field: createSystemField({
10
+ storageId: "location",
11
+ fieldId: "wbyAco_location",
12
+ type: "object",
13
+ settings: {
14
+ fields: [
15
+ createModelField({
16
+ id: "folderId",
17
+ fieldId: "folderId",
18
+ storageId: "folderId",
19
+ type: "text",
20
+ label: "Folder ID"
21
+ })
22
+ ]
23
+ }
24
+ }),
25
+ parents: []
26
+ },
27
+ "wbyAco_location.folderId": {
28
+ type: "text",
29
+ systemField: true,
30
+ searchable: true,
31
+ sortable: true,
32
+ field: createSystemField({
33
+ id: "folderId",
34
+ fieldId: "folderId",
35
+ storageId: "folderId",
36
+ type: "text",
37
+ label: "Folder ID"
38
+ }),
39
+ parents: [
40
+ {
41
+ fieldId: "wbyAco_location",
42
+ type: "object",
43
+ storageId: "location"
44
+ }
45
+ ]
46
+ }
47
+ };
48
+ export { locationFields };
49
+
50
+ //# sourceMappingURL=location.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations/entry/elasticsearch/fields/location.js","sources":["../../../../../src/operations/entry/elasticsearch/fields/location.ts"],"sourcesContent":["import type { ModelFields } from \"~/operations/entry/elasticsearch/types.js\";\nimport { createSystemField } from \"./createSystemField.js\";\nimport { createModelField } from \"@webiny/api-headless-cms\";\n\nexport const locationFields: ModelFields = {\n wbyAco_location: {\n type: \"object\",\n systemField: true,\n searchable: true,\n sortable: true,\n field: createSystemField({\n storageId: \"location\",\n fieldId: \"wbyAco_location\",\n type: \"object\",\n settings: {\n fields: [\n createModelField({\n id: \"folderId\",\n fieldId: \"folderId\",\n storageId: \"folderId\",\n type: \"text\",\n label: \"Folder ID\"\n })\n ]\n }\n }),\n parents: []\n },\n \"wbyAco_location.folderId\": {\n type: \"text\",\n systemField: true,\n searchable: true,\n sortable: true,\n field: createSystemField({\n id: \"folderId\",\n fieldId: \"folderId\",\n storageId: \"folderId\",\n type: \"text\",\n label: \"Folder ID\"\n }),\n parents: [\n {\n fieldId: \"wbyAco_location\",\n type: \"object\",\n storageId: \"location\"\n }\n ]\n }\n};\n"],"names":["locationFields","createSystemField","createModelField"],"mappings":";;AAIO,MAAMA,iBAA8B;IACvC,iBAAiB;QACb,MAAM;QACN,aAAa;QACb,YAAY;QACZ,UAAU;QACV,OAAOC,kBAAkB;YACrB,WAAW;YACX,SAAS;YACT,MAAM;YACN,UAAU;gBACN,QAAQ;oBACJC,iBAAiB;wBACb,IAAI;wBACJ,SAAS;wBACT,WAAW;wBACX,MAAM;wBACN,OAAO;oBACX;iBACH;YACL;QACJ;QACA,SAAS,EAAE;IACf;IACA,4BAA4B;QACxB,MAAM;QACN,aAAa;QACb,YAAY;QACZ,UAAU;QACV,OAAOD,kBAAkB;YACrB,IAAI;YACJ,SAAS;YACT,WAAW;YACX,MAAM;YACN,OAAO;QACX;QACA,SAAS;YACL;gBACI,SAAS;gBACT,MAAM;gBACN,WAAW;YACf;SACH;IACL;AACJ"}
@@ -0,0 +1,2 @@
1
+ import type { ModelFields } from "../../../../operations/entry/elasticsearch/types.js";
2
+ export declare const stateFields: ModelFields;
@@ -0,0 +1,104 @@
1
+ import { createSystemField } from "./createSystemField.js";
2
+ import { createModelField } from "@webiny/api-headless-cms";
3
+ const stateFields = {
4
+ state: {
5
+ type: "object",
6
+ systemField: true,
7
+ searchable: true,
8
+ sortable: false,
9
+ field: createSystemField({
10
+ storageId: "object@state",
11
+ fieldId: "state",
12
+ type: "object",
13
+ settings: {
14
+ fields: [
15
+ createModelField({
16
+ id: "stepId",
17
+ fieldId: "stepId",
18
+ storageId: "text@stepId",
19
+ type: "text",
20
+ label: "Step ID"
21
+ }),
22
+ createModelField({
23
+ id: "stepName",
24
+ fieldId: "stepName",
25
+ storageId: "text@stepName",
26
+ type: "text",
27
+ label: "Step Name"
28
+ }),
29
+ createModelField({
30
+ id: "state",
31
+ fieldId: "state",
32
+ storageId: "text@state",
33
+ type: "text",
34
+ label: "State"
35
+ })
36
+ ]
37
+ }
38
+ }),
39
+ parents: []
40
+ },
41
+ "state.stepId": {
42
+ type: "text",
43
+ systemField: true,
44
+ searchable: true,
45
+ sortable: false,
46
+ parents: [
47
+ {
48
+ fieldId: "state",
49
+ type: "object",
50
+ storageId: "object@state"
51
+ }
52
+ ],
53
+ field: createSystemField({
54
+ id: "stepId",
55
+ fieldId: "stepId",
56
+ storageId: "text@stepId",
57
+ type: "text",
58
+ label: "Step ID"
59
+ })
60
+ },
61
+ "state.stepName": {
62
+ type: "text",
63
+ systemField: true,
64
+ searchable: true,
65
+ sortable: false,
66
+ parents: [
67
+ {
68
+ fieldId: "state",
69
+ type: "object",
70
+ storageId: "object@state"
71
+ }
72
+ ],
73
+ field: createSystemField({
74
+ id: "stepName",
75
+ fieldId: "stepName",
76
+ storageId: "text@stepName",
77
+ type: "text",
78
+ label: "Step Name"
79
+ })
80
+ },
81
+ "state.state": {
82
+ type: "text",
83
+ systemField: true,
84
+ searchable: true,
85
+ sortable: false,
86
+ parents: [
87
+ {
88
+ fieldId: "state",
89
+ type: "object",
90
+ storageId: "object@state"
91
+ }
92
+ ],
93
+ field: createSystemField({
94
+ id: "state",
95
+ fieldId: "state",
96
+ storageId: "text@state",
97
+ type: "text",
98
+ label: "State"
99
+ })
100
+ }
101
+ };
102
+ export { stateFields };
103
+
104
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations/entry/elasticsearch/fields/state.js","sources":["../../../../../src/operations/entry/elasticsearch/fields/state.ts"],"sourcesContent":["import type { ModelFields } from \"~/operations/entry/elasticsearch/types.js\";\nimport { createSystemField } from \"./createSystemField.js\";\nimport { createModelField } from \"@webiny/api-headless-cms\";\n\nexport const stateFields: ModelFields = {\n state: {\n type: \"object\",\n systemField: true,\n searchable: true,\n sortable: false,\n field: createSystemField({\n storageId: \"object@state\",\n fieldId: \"state\",\n type: \"object\",\n settings: {\n fields: [\n createModelField({\n id: \"stepId\",\n fieldId: \"stepId\",\n storageId: \"text@stepId\",\n type: \"text\",\n label: \"Step ID\"\n }),\n createModelField({\n id: \"stepName\",\n fieldId: \"stepName\",\n storageId: \"text@stepName\",\n type: \"text\",\n label: \"Step Name\"\n }),\n createModelField({\n id: \"state\",\n fieldId: \"state\",\n storageId: \"text@state\",\n type: \"text\",\n label: \"State\"\n })\n ]\n }\n }),\n parents: []\n },\n \"state.stepId\": {\n type: \"text\",\n systemField: true,\n searchable: true,\n sortable: false,\n parents: [\n {\n fieldId: \"state\",\n type: \"object\",\n storageId: \"object@state\"\n }\n ],\n field: createSystemField({\n id: \"stepId\",\n fieldId: \"stepId\",\n storageId: \"text@stepId\",\n type: \"text\",\n label: \"Step ID\"\n })\n },\n \"state.stepName\": {\n type: \"text\",\n systemField: true,\n searchable: true,\n sortable: false,\n parents: [\n {\n fieldId: \"state\",\n type: \"object\",\n storageId: \"object@state\"\n }\n ],\n field: createSystemField({\n id: \"stepName\",\n fieldId: \"stepName\",\n storageId: \"text@stepName\",\n type: \"text\",\n label: \"Step Name\"\n })\n },\n \"state.state\": {\n type: \"text\",\n systemField: true,\n searchable: true,\n sortable: false,\n parents: [\n {\n fieldId: \"state\",\n type: \"object\",\n storageId: \"object@state\"\n }\n ],\n field: createSystemField({\n id: \"state\",\n fieldId: \"state\",\n storageId: \"text@state\",\n type: \"text\",\n label: \"State\"\n })\n }\n};\n"],"names":["stateFields","createSystemField","createModelField"],"mappings":";;AAIO,MAAMA,cAA2B;IACpC,OAAO;QACH,MAAM;QACN,aAAa;QACb,YAAY;QACZ,UAAU;QACV,OAAOC,kBAAkB;YACrB,WAAW;YACX,SAAS;YACT,MAAM;YACN,UAAU;gBACN,QAAQ;oBACJC,iBAAiB;wBACb,IAAI;wBACJ,SAAS;wBACT,WAAW;wBACX,MAAM;wBACN,OAAO;oBACX;oBACAA,iBAAiB;wBACb,IAAI;wBACJ,SAAS;wBACT,WAAW;wBACX,MAAM;wBACN,OAAO;oBACX;oBACAA,iBAAiB;wBACb,IAAI;wBACJ,SAAS;wBACT,WAAW;wBACX,MAAM;wBACN,OAAO;oBACX;iBACH;YACL;QACJ;QACA,SAAS,EAAE;IACf;IACA,gBAAgB;QACZ,MAAM;QACN,aAAa;QACb,YAAY;QACZ,UAAU;QACV,SAAS;YACL;gBACI,SAAS;gBACT,MAAM;gBACN,WAAW;YACf;SACH;QACD,OAAOD,kBAAkB;YACrB,IAAI;YACJ,SAAS;YACT,WAAW;YACX,MAAM;YACN,OAAO;QACX;IACJ;IACA,kBAAkB;QACd,MAAM;QACN,aAAa;QACb,YAAY;QACZ,UAAU;QACV,SAAS;YACL;gBACI,SAAS;gBACT,MAAM;gBACN,WAAW;YACf;SACH;QACD,OAAOA,kBAAkB;YACrB,IAAI;YACJ,SAAS;YACT,WAAW;YACX,MAAM;YACN,OAAO;QACX;IACJ;IACA,eAAe;QACX,MAAM;QACN,aAAa;QACb,YAAY;QACZ,UAAU;QACV,SAAS;YACL;gBACI,SAAS;gBACT,MAAM;gBACN,WAAW;YACf;SACH;QACD,OAAOA,kBAAkB;YACrB,IAAI;YACJ,SAAS;YACT,WAAW;YACX,MAAM;YACN,OAAO;QACX;IACJ;AACJ"}
@@ -1,10 +1,12 @@
1
- import { PluginsContainer } from "@webiny/plugins";
2
- import { CmsModel } from "@webiny/api-headless-cms/types";
3
- interface Params {
4
- plugins: PluginsContainer;
1
+ import type { CmsModel } from "@webiny/api-headless-cms/types/index.js";
2
+ import { CmsModelFieldToGraphQLRegistry } from "@webiny/api-headless-cms/features/graphql/index.js";
3
+ import { CmsEntryOpenSearchFieldIndexRegistry } from "../../../features/CmsEntryOpenSearchFieldIndex/index.js";
4
+ interface ICreateModelFieldsParams {
5
5
  model: CmsModel;
6
+ fieldRegistry: CmsModelFieldToGraphQLRegistry.Interface;
7
+ fieldIndexRegistry: CmsEntryOpenSearchFieldIndexRegistry.Interface;
6
8
  }
7
- export declare const createModelFields: ({ plugins, model }: Params) => {
8
- [x: string]: import("./types").ModelField;
9
+ export declare const createModelFields: ({ model, fieldRegistry, fieldIndexRegistry }: ICreateModelFieldsParams) => {
10
+ [x: string]: import("./types.js").ModelField;
9
11
  };
10
12
  export {};