@webiny/api-headless-cms-ddb-es 0.0.0-unstable.6f45466a1d → 0.0.0-unstable.7be00a75a9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (388) hide show
  1. package/configurations.d.ts +5 -4
  2. package/configurations.js +27 -33
  3. package/configurations.js.map +1 -1
  4. package/definitions/entry.js +7 -9
  5. package/definitions/entry.js.map +1 -1
  6. package/definitions/group.js +7 -9
  7. package/definitions/group.js.map +1 -1
  8. package/definitions/model.js +7 -9
  9. package/definitions/model.js.map +1 -1
  10. package/definitions/types.d.ts +9 -3
  11. package/definitions/types.js +0 -3
  12. package/elasticsearch/createElasticsearchIndex.d.ts +3 -3
  13. package/elasticsearch/createElasticsearchIndex.js +52 -27
  14. package/elasticsearch/createElasticsearchIndex.js.map +1 -1
  15. package/elasticsearch/deleteElasticsearchIndex.d.ts +1 -1
  16. package/elasticsearch/deleteElasticsearchIndex.js +18 -26
  17. package/elasticsearch/deleteElasticsearchIndex.js.map +1 -1
  18. package/exports/api/cms/opensearch.d.ts +9 -0
  19. package/exports/api/cms/opensearch.js +9 -0
  20. package/feature.d.ts +1 -0
  21. package/feature.js +179 -0
  22. package/feature.js.map +1 -0
  23. package/features/CmsEntryOpenSearchBodyModifier/abstractions.d.ts +16 -0
  24. package/features/CmsEntryOpenSearchBodyModifier/abstractions.js +5 -0
  25. package/features/CmsEntryOpenSearchBodyModifier/abstractions.js.map +1 -0
  26. package/features/CmsEntryOpenSearchBodyModifier/index.d.ts +1 -0
  27. package/features/CmsEntryOpenSearchBodyModifier/index.js +1 -0
  28. package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.d.ts +14 -0
  29. package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.js +42 -0
  30. package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.js.map +1 -0
  31. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.d.ts +32 -0
  32. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.js +5 -0
  33. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.js.map +1 -0
  34. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.d.ts +11 -0
  35. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.js +5 -0
  36. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.js.map +1 -0
  37. package/features/CmsEntryOpenSearchFieldIndex/constants.d.ts +1 -0
  38. package/features/CmsEntryOpenSearchFieldIndex/constants.js +4 -0
  39. package/features/CmsEntryOpenSearchFieldIndex/constants.js.map +1 -0
  40. package/features/CmsEntryOpenSearchFieldIndex/feature.d.ts +4 -0
  41. package/features/CmsEntryOpenSearchFieldIndex/feature.js +29 -0
  42. package/features/CmsEntryOpenSearchFieldIndex/feature.js.map +1 -0
  43. package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.d.ts +11 -0
  44. package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.js +60 -0
  45. package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.js.map +1 -0
  46. package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.d.ts +13 -0
  47. package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.js +33 -0
  48. package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.js.map +1 -0
  49. package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.d.ts +10 -0
  50. package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.js +21 -0
  51. package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.js.map +1 -0
  52. package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.d.ts +10 -0
  53. package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.js +22 -0
  54. package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.js.map +1 -0
  55. package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.d.ts +11 -0
  56. package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.js +32 -0
  57. package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.js.map +1 -0
  58. package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.d.ts +12 -0
  59. package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.js +107 -0
  60. package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.js.map +1 -0
  61. package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.d.ts +10 -0
  62. package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.js +21 -0
  63. package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.js.map +1 -0
  64. package/features/CmsEntryOpenSearchFieldIndex/fields/TextCompressedFieldIndex.d.ts +15 -0
  65. package/features/CmsEntryOpenSearchFieldIndex/fields/TextCompressedFieldIndex.js +40 -0
  66. package/features/CmsEntryOpenSearchFieldIndex/fields/TextCompressedFieldIndex.js.map +1 -0
  67. package/features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.d.ts +15 -0
  68. package/features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.js +40 -0
  69. package/features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.js.map +1 -0
  70. package/features/CmsEntryOpenSearchFieldIndex/index.d.ts +3 -0
  71. package/features/CmsEntryOpenSearchFieldIndex/index.js +3 -0
  72. package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.d.ts +11 -0
  73. package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.js +36 -0
  74. package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.js.map +1 -0
  75. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.d.ts +37 -0
  76. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.js +5 -0
  77. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.js.map +1 -0
  78. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.d.ts +9 -0
  79. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.js +5 -0
  80. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.js.map +1 -0
  81. package/features/CmsEntryOpenSearchFilter/constants.d.ts +1 -0
  82. package/features/CmsEntryOpenSearchFilter/constants.js +4 -0
  83. package/features/CmsEntryOpenSearchFilter/constants.js.map +1 -0
  84. package/features/CmsEntryOpenSearchFilter/feature.d.ts +4 -0
  85. package/features/CmsEntryOpenSearchFilter/feature.js +17 -0
  86. package/features/CmsEntryOpenSearchFilter/feature.js.map +1 -0
  87. package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.d.ts +9 -0
  88. package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.js +26 -0
  89. package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.js.map +1 -0
  90. package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.d.ts +9 -0
  91. package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.js +43 -0
  92. package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.js.map +1 -0
  93. package/features/CmsEntryOpenSearchFilter/fields/RefFilter.d.ts +9 -0
  94. package/features/CmsEntryOpenSearchFilter/fields/RefFilter.js +36 -0
  95. package/features/CmsEntryOpenSearchFilter/fields/RefFilter.js.map +1 -0
  96. package/features/CmsEntryOpenSearchFilter/index.d.ts +3 -0
  97. package/features/CmsEntryOpenSearchFilter/index.js +3 -0
  98. package/features/CmsEntryOpenSearchFullTextSearch/abstractions.d.ts +20 -0
  99. package/features/CmsEntryOpenSearchFullTextSearch/abstractions.js +5 -0
  100. package/features/CmsEntryOpenSearchFullTextSearch/abstractions.js.map +1 -0
  101. package/features/CmsEntryOpenSearchFullTextSearch/index.d.ts +1 -0
  102. package/features/CmsEntryOpenSearchFullTextSearch/index.js +1 -0
  103. package/features/CmsEntryOpenSearchIndex/BaseOpenSearchIndex.d.ts +11 -0
  104. package/features/CmsEntryOpenSearchIndex/BaseOpenSearchIndex.js +17 -0
  105. package/features/CmsEntryOpenSearchIndex/BaseOpenSearchIndex.js.map +1 -0
  106. package/features/CmsEntryOpenSearchIndex/abstractions.d.ts +14 -0
  107. package/features/CmsEntryOpenSearchIndex/abstractions.js +5 -0
  108. package/features/CmsEntryOpenSearchIndex/abstractions.js.map +1 -0
  109. package/features/CmsEntryOpenSearchIndex/feature.d.ts +4 -0
  110. package/features/CmsEntryOpenSearchIndex/feature.js +11 -0
  111. package/features/CmsEntryOpenSearchIndex/feature.js.map +1 -0
  112. package/features/CmsEntryOpenSearchIndex/index.d.ts +3 -0
  113. package/features/CmsEntryOpenSearchIndex/index.js +3 -0
  114. package/features/CmsEntryOpenSearchQueryModifier/abstractions.d.ts +16 -0
  115. package/features/CmsEntryOpenSearchQueryModifier/abstractions.js +5 -0
  116. package/features/CmsEntryOpenSearchQueryModifier/abstractions.js.map +1 -0
  117. package/features/CmsEntryOpenSearchQueryModifier/index.d.ts +1 -0
  118. package/features/CmsEntryOpenSearchQueryModifier/index.js +1 -0
  119. package/features/CmsEntryOpenSearchSortModifier/abstractions.d.ts +15 -0
  120. package/features/CmsEntryOpenSearchSortModifier/abstractions.js +5 -0
  121. package/features/CmsEntryOpenSearchSortModifier/abstractions.js.map +1 -0
  122. package/features/CmsEntryOpenSearchSortModifier/index.d.ts +1 -0
  123. package/features/CmsEntryOpenSearchSortModifier/index.js +1 -0
  124. package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.d.ts +12 -0
  125. package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.js +31 -0
  126. package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.js.map +1 -0
  127. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.d.ts +22 -0
  128. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.js +5 -0
  129. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.js.map +1 -0
  130. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.d.ts +10 -0
  131. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.js +5 -0
  132. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.js.map +1 -0
  133. package/features/CmsEntryOpenSearchValueSearch/feature.d.ts +4 -0
  134. package/features/CmsEntryOpenSearchValueSearch/feature.js +17 -0
  135. package/features/CmsEntryOpenSearchValueSearch/feature.js.map +1 -0
  136. package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.d.ts +10 -0
  137. package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.js +21 -0
  138. package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.js.map +1 -0
  139. package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.d.ts +10 -0
  140. package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.js +44 -0
  141. package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.js.map +1 -0
  142. package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.d.ts +10 -0
  143. package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.js +22 -0
  144. package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.js.map +1 -0
  145. package/features/CmsEntryOpenSearchValueSearch/index.d.ts +3 -0
  146. package/features/CmsEntryOpenSearchValueSearch/index.js +3 -0
  147. package/features/CmsEntryOpenSearchValuesModifier/abstractions.d.ts +23 -0
  148. package/features/CmsEntryOpenSearchValuesModifier/abstractions.js +5 -0
  149. package/features/CmsEntryOpenSearchValuesModifier/abstractions.js.map +1 -0
  150. package/features/CmsEntryOpenSearchValuesModifier/index.d.ts +1 -0
  151. package/features/CmsEntryOpenSearchValuesModifier/index.js +1 -0
  152. package/helpers/entryIndexHelpers.d.ts +6 -4
  153. package/helpers/entryIndexHelpers.js +70 -186
  154. package/helpers/entryIndexHelpers.js.map +1 -1
  155. package/helpers/fieldIdentifier.js +18 -30
  156. package/helpers/fieldIdentifier.js.map +1 -1
  157. package/helpers/index.js +0 -2
  158. package/index.d.ts +1 -3
  159. package/index.js +1 -190
  160. package/operations/entry/dataLoader/DataLoaderCache.d.ts +1 -0
  161. package/operations/entry/dataLoader/DataLoaderCache.js +22 -29
  162. package/operations/entry/dataLoader/DataLoaderCache.js.map +1 -1
  163. package/operations/entry/dataLoader/constants.js +2 -1
  164. package/operations/entry/dataLoader/constants.js.map +1 -1
  165. package/operations/entry/dataLoader/createBatchScheduleFn.js +6 -15
  166. package/operations/entry/dataLoader/createBatchScheduleFn.js.map +1 -1
  167. package/operations/entry/dataLoader/getAllEntryRevisions.js +18 -26
  168. package/operations/entry/dataLoader/getAllEntryRevisions.js.map +1 -1
  169. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js +28 -34
  170. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js.map +1 -1
  171. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js +28 -34
  172. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js.map +1 -1
  173. package/operations/entry/dataLoader/getRevisionById.js +33 -43
  174. package/operations/entry/dataLoader/getRevisionById.js.map +1 -1
  175. package/operations/entry/dataLoader/index.js +8 -9
  176. package/operations/entry/dataLoader/index.js.map +1 -1
  177. package/operations/entry/dataLoader/types.d.ts +1 -0
  178. package/operations/entry/dataLoader/types.js +0 -3
  179. package/operations/entry/dataLoaders.js +81 -97
  180. package/operations/entry/dataLoaders.js.map +1 -1
  181. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.d.ts +1 -1
  182. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js +6 -24
  183. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js.map +1 -1
  184. package/operations/entry/elasticsearch/body.d.ts +19 -3
  185. package/operations/entry/elasticsearch/body.js +74 -122
  186. package/operations/entry/elasticsearch/body.js.map +1 -1
  187. package/operations/entry/elasticsearch/fields/createSystemField.d.ts +4 -0
  188. package/operations/entry/elasticsearch/fields/createSystemField.js +9 -0
  189. package/operations/entry/elasticsearch/fields/createSystemField.js.map +1 -0
  190. package/operations/entry/elasticsearch/fields/live.d.ts +2 -0
  191. package/operations/entry/elasticsearch/fields/live.js +50 -0
  192. package/operations/entry/elasticsearch/fields/live.js.map +1 -0
  193. package/operations/entry/elasticsearch/fields/location.d.ts +2 -0
  194. package/operations/entry/elasticsearch/fields/location.js +50 -0
  195. package/operations/entry/elasticsearch/fields/location.js.map +1 -0
  196. package/operations/entry/elasticsearch/fields/state.d.ts +2 -0
  197. package/operations/entry/elasticsearch/fields/state.js +104 -0
  198. package/operations/entry/elasticsearch/fields/state.js.map +1 -0
  199. package/operations/entry/elasticsearch/fields.d.ts +6 -4
  200. package/operations/entry/elasticsearch/fields.js +194 -388
  201. package/operations/entry/elasticsearch/fields.js.map +1 -1
  202. package/operations/entry/elasticsearch/filtering/applyFiltering.d.ts +6 -5
  203. package/operations/entry/elasticsearch/filtering/applyFiltering.js +32 -45
  204. package/operations/entry/elasticsearch/filtering/applyFiltering.js.map +1 -1
  205. package/operations/entry/elasticsearch/filtering/exec.d.ts +6 -2
  206. package/operations/entry/elasticsearch/filtering/exec.js +84 -166
  207. package/operations/entry/elasticsearch/filtering/exec.js.map +1 -1
  208. package/operations/entry/elasticsearch/filtering/index.js +0 -2
  209. package/operations/entry/elasticsearch/filtering/path.d.ts +4 -3
  210. package/operations/entry/elasticsearch/filtering/path.js +24 -35
  211. package/operations/entry/elasticsearch/filtering/path.js.map +1 -1
  212. package/operations/entry/elasticsearch/filtering/populated.d.ts +2 -2
  213. package/operations/entry/elasticsearch/filtering/populated.js +8 -14
  214. package/operations/entry/elasticsearch/filtering/populated.js.map +1 -1
  215. package/operations/entry/elasticsearch/filtering/values.js +11 -12
  216. package/operations/entry/elasticsearch/filtering/values.js.map +1 -1
  217. package/operations/entry/elasticsearch/fullTextSearch.d.ts +7 -6
  218. package/operations/entry/elasticsearch/fullTextSearch.js +45 -79
  219. package/operations/entry/elasticsearch/fullTextSearch.js.map +1 -1
  220. package/operations/entry/elasticsearch/fullTextSearchFields.d.ts +4 -4
  221. package/operations/entry/elasticsearch/fullTextSearchFields.js +7 -17
  222. package/operations/entry/elasticsearch/fullTextSearchFields.js.map +1 -1
  223. package/operations/entry/elasticsearch/initialQuery.d.ts +3 -3
  224. package/operations/entry/elasticsearch/initialQuery.js +37 -80
  225. package/operations/entry/elasticsearch/initialQuery.js.map +1 -1
  226. package/operations/entry/elasticsearch/keyword.js +13 -27
  227. package/operations/entry/elasticsearch/keyword.js.map +1 -1
  228. package/operations/entry/elasticsearch/plugins/operator.d.ts +2 -2
  229. package/operations/entry/elasticsearch/plugins/operator.js +10 -21
  230. package/operations/entry/elasticsearch/plugins/operator.js.map +1 -1
  231. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js +6 -4
  232. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js.map +1 -1
  233. package/operations/entry/elasticsearch/sort.d.ts +4 -4
  234. package/operations/entry/elasticsearch/sort.js +69 -96
  235. package/operations/entry/elasticsearch/sort.js.map +1 -1
  236. package/operations/entry/elasticsearch/transformValueForSearch.d.ts +2 -9
  237. package/operations/entry/elasticsearch/transformValueForSearch.js +9 -24
  238. package/operations/entry/elasticsearch/transformValueForSearch.js.map +1 -1
  239. package/operations/entry/elasticsearch/types.d.ts +3 -10
  240. package/operations/entry/elasticsearch/types.js +0 -3
  241. package/operations/entry/index.d.ts +22 -2
  242. package/operations/entry/index.js +1316 -1650
  243. package/operations/entry/index.js.map +1 -1
  244. package/operations/entry/keys.js +43 -63
  245. package/operations/entry/keys.js.map +1 -1
  246. package/operations/entry/recordType.js +4 -9
  247. package/operations/entry/recordType.js.map +1 -1
  248. package/operations/entry/transformations/convertEntryKeys.js +21 -26
  249. package/operations/entry/transformations/convertEntryKeys.js.map +1 -1
  250. package/operations/entry/transformations/index.d.ts +6 -2
  251. package/operations/entry/transformations/index.js +84 -112
  252. package/operations/entry/transformations/index.js.map +1 -1
  253. package/operations/entry/transformations/modifyEntryValues.d.ts +6 -4
  254. package/operations/entry/transformations/modifyEntryValues.js +12 -17
  255. package/operations/entry/transformations/modifyEntryValues.js.map +1 -1
  256. package/operations/entry/transformations/transformEntryKeys.js +13 -16
  257. package/operations/entry/transformations/transformEntryKeys.js.map +1 -1
  258. package/operations/entry/transformations/transformEntryToIndex.d.ts +2 -2
  259. package/operations/entry/transformations/transformEntryToIndex.js +16 -20
  260. package/operations/entry/transformations/transformEntryToIndex.js.map +1 -1
  261. package/operations/group/index.d.ts +2 -2
  262. package/operations/group/index.js +115 -139
  263. package/operations/group/index.js.map +1 -1
  264. package/operations/model/index.d.ts +1 -1
  265. package/operations/model/index.js +128 -157
  266. package/operations/model/index.js.map +1 -1
  267. package/package.json +35 -30
  268. package/tasks/createIndexTaskPlugin.js +36 -32
  269. package/tasks/createIndexTaskPlugin.js.map +1 -1
  270. package/types.d.ts +7 -112
  271. package/types.js +7 -36
  272. package/types.js.map +1 -1
  273. package/values/NoValueContainer.js +8 -10
  274. package/values/NoValueContainer.js.map +1 -1
  275. package/definitions/types.js.map +0 -1
  276. package/dynamoDb/index.d.ts +0 -3
  277. package/dynamoDb/index.js +0 -8
  278. package/dynamoDb/index.js.map +0 -1
  279. package/dynamoDb/storage/longText.d.ts +0 -10
  280. package/dynamoDb/storage/longText.js +0 -88
  281. package/dynamoDb/storage/longText.js.map +0 -1
  282. package/dynamoDb/storage/richText.d.ts +0 -2
  283. package/dynamoDb/storage/richText.js +0 -51
  284. package/dynamoDb/storage/richText.js.map +0 -1
  285. package/elasticsearch/index.d.ts +0 -2
  286. package/elasticsearch/index.js +0 -5
  287. package/elasticsearch/index.js.map +0 -1
  288. package/elasticsearch/indexing/dateTimeIndexing.d.ts +0 -3
  289. package/elasticsearch/indexing/dateTimeIndexing.js +0 -81
  290. package/elasticsearch/indexing/dateTimeIndexing.js.map +0 -1
  291. package/elasticsearch/indexing/defaultFieldIndexing.d.ts +0 -3
  292. package/elasticsearch/indexing/defaultFieldIndexing.js +0 -47
  293. package/elasticsearch/indexing/defaultFieldIndexing.js.map +0 -1
  294. package/elasticsearch/indexing/index.d.ts +0 -2
  295. package/elasticsearch/indexing/index.js +0 -10
  296. package/elasticsearch/indexing/index.js.map +0 -1
  297. package/elasticsearch/indexing/jsonIndexing.d.ts +0 -2
  298. package/elasticsearch/indexing/jsonIndexing.js +0 -21
  299. package/elasticsearch/indexing/jsonIndexing.js.map +0 -1
  300. package/elasticsearch/indexing/longTextIndexing.d.ts +0 -7
  301. package/elasticsearch/indexing/longTextIndexing.js +0 -35
  302. package/elasticsearch/indexing/longTextIndexing.js.map +0 -1
  303. package/elasticsearch/indexing/numberIndexing.d.ts +0 -3
  304. package/elasticsearch/indexing/numberIndexing.js +0 -34
  305. package/elasticsearch/indexing/numberIndexing.js.map +0 -1
  306. package/elasticsearch/indexing/objectIndexing.d.ts +0 -12
  307. package/elasticsearch/indexing/objectIndexing.js +0 -194
  308. package/elasticsearch/indexing/objectIndexing.js.map +0 -1
  309. package/elasticsearch/indexing/richTextIndexing.d.ts +0 -3
  310. package/elasticsearch/indexing/richTextIndexing.js +0 -24
  311. package/elasticsearch/indexing/richTextIndexing.js.map +0 -1
  312. package/elasticsearch/indices/base.d.ts +0 -2
  313. package/elasticsearch/indices/base.js +0 -7
  314. package/elasticsearch/indices/base.js.map +0 -1
  315. package/elasticsearch/indices/index.d.ts +0 -1
  316. package/elasticsearch/indices/index.js +0 -6
  317. package/elasticsearch/indices/index.js.map +0 -1
  318. package/elasticsearch/search/index.d.ts +0 -3
  319. package/elasticsearch/search/index.js +0 -6
  320. package/elasticsearch/search/index.js.map +0 -1
  321. package/elasticsearch/search/refSearch.d.ts +0 -2
  322. package/elasticsearch/search/refSearch.js +0 -24
  323. package/elasticsearch/search/refSearch.js.map +0 -1
  324. package/elasticsearch/search/searchableJson.d.ts +0 -2
  325. package/elasticsearch/search/searchableJson.js +0 -53
  326. package/elasticsearch/search/searchableJson.js.map +0 -1
  327. package/elasticsearch/search/timeSearch.d.ts +0 -2
  328. package/elasticsearch/search/timeSearch.js +0 -20
  329. package/elasticsearch/search/timeSearch.js.map +0 -1
  330. package/helpers/index.js.map +0 -1
  331. package/index.js.map +0 -1
  332. package/operations/entry/dataLoader/types.js.map +0 -1
  333. package/operations/entry/elasticsearch/filtering/index.js.map +0 -1
  334. package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.d.ts +0 -2
  335. package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js +0 -22
  336. package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js.map +0 -1
  337. package/operations/entry/elasticsearch/filtering/plugins/index.d.ts +0 -1
  338. package/operations/entry/elasticsearch/filtering/plugins/index.js +0 -8
  339. package/operations/entry/elasticsearch/filtering/plugins/index.js.map +0 -1
  340. package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.d.ts +0 -2
  341. package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js +0 -61
  342. package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js.map +0 -1
  343. package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.d.ts +0 -2
  344. package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js +0 -49
  345. package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js.map +0 -1
  346. package/operations/entry/elasticsearch/plugins/bodyModifier.d.ts +0 -9
  347. package/operations/entry/elasticsearch/plugins/bodyModifier.js +0 -11
  348. package/operations/entry/elasticsearch/plugins/bodyModifier.js.map +0 -1
  349. package/operations/entry/elasticsearch/plugins/queryModifier.d.ts +0 -9
  350. package/operations/entry/elasticsearch/plugins/queryModifier.js +0 -11
  351. package/operations/entry/elasticsearch/plugins/queryModifier.js.map +0 -1
  352. package/operations/entry/elasticsearch/plugins/search.d.ts +0 -7
  353. package/operations/entry/elasticsearch/plugins/search.js +0 -18
  354. package/operations/entry/elasticsearch/plugins/search.js.map +0 -1
  355. package/operations/entry/elasticsearch/plugins/sortModifier.d.ts +0 -9
  356. package/operations/entry/elasticsearch/plugins/sortModifier.js +0 -11
  357. package/operations/entry/elasticsearch/plugins/sortModifier.js.map +0 -1
  358. package/operations/entry/elasticsearch/types.js.map +0 -1
  359. package/plugins/CmsElasticsearchModelFieldPlugin.d.ts +0 -69
  360. package/plugins/CmsElasticsearchModelFieldPlugin.js +0 -46
  361. package/plugins/CmsElasticsearchModelFieldPlugin.js.map +0 -1
  362. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.d.ts +0 -22
  363. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js +0 -13
  364. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js.map +0 -1
  365. package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.d.ts +0 -23
  366. package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js +0 -19
  367. package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js.map +0 -1
  368. package/plugins/CmsEntryElasticsearchIndexPlugin.d.ts +0 -4
  369. package/plugins/CmsEntryElasticsearchIndexPlugin.js +0 -6
  370. package/plugins/CmsEntryElasticsearchIndexPlugin.js.map +0 -1
  371. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.d.ts +0 -32
  372. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js +0 -32
  373. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js.map +0 -1
  374. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.d.ts +0 -19
  375. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js +0 -13
  376. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js.map +0 -1
  377. package/plugins/CmsEntryElasticsearchSortModifierPlugin.d.ts +0 -19
  378. package/plugins/CmsEntryElasticsearchSortModifierPlugin.js +0 -13
  379. package/plugins/CmsEntryElasticsearchSortModifierPlugin.js.map +0 -1
  380. package/plugins/CmsEntryElasticsearchValuesModifier.d.ts +0 -33
  381. package/plugins/CmsEntryElasticsearchValuesModifier.js +0 -42
  382. package/plugins/CmsEntryElasticsearchValuesModifier.js.map +0 -1
  383. package/plugins/CmsEntryFilterPlugin.d.ts +0 -49
  384. package/plugins/CmsEntryFilterPlugin.js +0 -15
  385. package/plugins/CmsEntryFilterPlugin.js.map +0 -1
  386. package/plugins/index.d.ts +0 -8
  387. package/plugins/index.js +0 -10
  388. package/plugins/index.js.map +0 -1
@@ -2,134 +2,86 @@ import { createModelFields } from "./fields.js";
2
2
  import { createFullTextSearchFields } from "./fullTextSearchFields.js";
3
3
  import { createInitialQuery } from "./initialQuery.js";
4
4
  import { applyFullTextSearch } from "./fullTextSearch.js";
5
- import { createQueryModifierPluginList } from "./plugins/queryModifier.js";
6
- import { createSortModifierPluginList } from "./plugins/sortModifier.js";
7
- import { createBodyModifierPluginList } from "./plugins/bodyModifier.js";
8
5
  import { createElasticsearchSort } from "./sort.js";
9
6
  import { createExecFiltering } from "./filtering/index.js";
10
7
  import { assignMinimumShouldMatchToQuery } from "./assignMinimumShouldMatchToQuery.js";
11
- export const createElasticsearchBody = ({
12
- plugins,
13
- model,
14
- params
15
- }) => {
16
- const {
17
- fields,
18
- search: term,
19
- where,
20
- sort: initialSort,
21
- after,
22
- limit
23
- } = params;
24
- /**
25
- * 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.
26
- */
27
- const modelFields = createModelFields({
28
- plugins,
29
- model
30
- });
31
-
32
- /**
33
- * We need the query modifier plugins.
34
- */
35
- const queryModifierPlugins = createQueryModifierPluginList({
36
- plugins,
37
- model
38
- });
39
- /**
40
- * We need the sort modifier plugins.
41
- */
42
- const sortModifierPlugins = createSortModifierPluginList({
43
- plugins,
44
- model
45
- });
46
- /**
47
- * We need the body modifier plugins.
48
- */
49
- const bodyModifierPlugins = createBodyModifierPluginList({
50
- plugins,
51
- model
52
- });
53
- /**
54
- * We need the fields which we can search through via the full text search.
55
- *
56
- */
57
- const fullTextSearchFields = createFullTextSearchFields({
58
- model,
59
- term,
60
- fields
61
- });
62
- /**
63
- * The initial elasticsearch query where we attach some default conditions we always need.
64
- */
65
- const query = createInitialQuery({
66
- where,
67
- model
68
- });
69
- /**
70
- * Apply the full text search, if term is set.
71
- */
72
- applyFullTextSearch({
73
- model,
74
- plugins,
75
- query,
76
- term,
77
- fields: fullTextSearchFields
78
- });
79
- const execFiltering = createExecFiltering({
80
- model,
81
- fields: modelFields,
82
- plugins
83
- });
84
- execFiltering({
85
- where,
86
- query
87
- });
88
- for (const pl of queryModifierPlugins) {
89
- pl.modifyQuery({
90
- query,
91
- model,
92
- where
8
+ const createElasticsearchBody = ({ plugins, model, params, fieldRegistry, fieldIndexRegistry, bodyModifiers, sortModifiers, queryModifiers, valueSearchRegistry, fullTextSearches, filterRegistry })=>{
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
+ });
27
+ applyFullTextSearch({
28
+ model,
29
+ fullTextSearches,
30
+ query,
31
+ term,
32
+ fields: fullTextSearchFields
33
+ });
34
+ const execFiltering = createExecFiltering({
35
+ model,
36
+ fields: modelFields,
37
+ plugins,
38
+ valueSearchRegistry,
39
+ filterRegistry
40
+ });
41
+ execFiltering({
42
+ where,
43
+ query
44
+ });
45
+ for (const modifier of applicableQueryModifiers)modifier.modifyQuery({
46
+ query,
47
+ model,
48
+ where
49
+ });
50
+ const sort = createElasticsearchSort({
51
+ sort: initialSort,
52
+ modelFields,
53
+ model,
54
+ valueSearchRegistry
55
+ });
56
+ for (const modifier of applicableSortModifiers)modifier.modifySort({
57
+ sort,
58
+ model
93
59
  });
94
- }
95
- const sort = createElasticsearchSort({
96
- plugins,
97
- sort: initialSort,
98
- modelFields,
99
- model
100
- });
101
- for (const pl of sortModifierPlugins) {
102
- pl.modifySort({
103
- sort,
104
- model
60
+ const boolQuery = {
61
+ must: query.must.length > 0 ? query.must : void 0,
62
+ must_not: query.must_not.length > 0 ? query.must_not : void 0,
63
+ should: query.should.length > 0 ? query.should : void 0,
64
+ filter: query.filter.length > 0 ? query.filter : void 0
65
+ };
66
+ assignMinimumShouldMatchToQuery({
67
+ query: boolQuery
105
68
  });
106
- }
107
- const boolQuery = {
108
- must: query.must.length > 0 ? query.must : undefined,
109
- must_not: query.must_not.length > 0 ? query.must_not : undefined,
110
- should: query.should.length > 0 ? query.should : undefined,
111
- filter: query.filter.length > 0 ? query.filter : undefined
112
- };
113
- assignMinimumShouldMatchToQuery({
114
- query: boolQuery
115
- });
116
- const body = {
117
- query: {
118
- bool: boolQuery
119
- },
120
- sort,
121
- size: (limit || 0) + 1,
122
- search_after: after,
123
- track_total_hits: true
124
- };
125
- for (const pl of bodyModifierPlugins) {
126
- pl.modifyBody({
127
- body,
128
- model,
129
- where
69
+ const body = {
70
+ query: {
71
+ bool: boolQuery
72
+ },
73
+ sort,
74
+ size: (limit || 0) + 1,
75
+ search_after: after,
76
+ track_total_hits: true
77
+ };
78
+ for (const modifier of applicableBodyModifiers)modifier.modifyBody({
79
+ body,
80
+ model,
81
+ where
130
82
  });
131
- }
132
- return body;
83
+ return body;
133
84
  };
85
+ export { createElasticsearchBody };
134
86
 
135
87
  //# sourceMappingURL=body.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createModelFields","createFullTextSearchFields","createInitialQuery","applyFullTextSearch","createQueryModifierPluginList","createSortModifierPluginList","createBodyModifierPluginList","createElasticsearchSort","createExecFiltering","assignMinimumShouldMatchToQuery","createElasticsearchBody","plugins","model","params","fields","search","term","where","sort","initialSort","after","limit","modelFields","queryModifierPlugins","sortModifierPlugins","bodyModifierPlugins","fullTextSearchFields","query","execFiltering","pl","modifyQuery","modifySort","boolQuery","must","length","undefined","must_not","should","filter","body","bool","size","search_after","track_total_hits","modifyBody"],"sources":["body.ts"],"sourcesContent":["import type { PluginsContainer } from \"@webiny/plugins\";\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 { createQueryModifierPluginList } from \"./plugins/queryModifier.js\";\nimport { createSortModifierPluginList } from \"./plugins/sortModifier.js\";\nimport { createBodyModifierPluginList } from \"./plugins/bodyModifier.js\";\nimport { createElasticsearchSort } from \"./sort.js\";\nimport type {\n BoolQueryConfig,\n PrimitiveValue,\n SearchBody\n} from \"@webiny/api-elasticsearch/types.js\";\nimport { createExecFiltering } from \"./filtering/index.js\";\nimport { assignMinimumShouldMatchToQuery } from \"./assignMinimumShouldMatchToQuery.js\";\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":"AAMA,SAASA,iBAAiB;AAC1B,SAASC,0BAA0B;AACnC,SAASC,kBAAkB;AAC3B,SAASC,mBAAmB;AAC5B,SAASC,6BAA6B;AACtC,SAASC,4BAA4B;AACrC,SAASC,4BAA4B;AACrC,SAASC,uBAAuB;AAMhC,SAASC,mBAAmB;AAC5B,SAASC,+BAA+B;AAUxC,OAAO,MAAMC,uBAAuB,GAAGA,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,GAAGtB,iBAAiB,CAAC;IAClCW,OAAO;IACPC;EACJ,CAAC,CAAC;;EAEF;AACJ;AACA;EACI,MAAMW,oBAAoB,GAAGnB,6BAA6B,CAAC;IACvDO,OAAO;IACPC;EACJ,CAAC,CAAC;EACF;AACJ;AACA;EACI,MAAMY,mBAAmB,GAAGnB,4BAA4B,CAAC;IACrDM,OAAO;IACPC;EACJ,CAAC,CAAC;EACF;AACJ;AACA;EACI,MAAMa,mBAAmB,GAAGnB,4BAA4B,CAAC;IACrDK,OAAO;IACPC;EACJ,CAAC,CAAC;EACF;AACJ;AACA;AACA;EACI,MAAMc,oBAAoB,GAAGzB,0BAA0B,CAAC;IACpDW,KAAK;IACLI,IAAI;IACJF;EACJ,CAAC,CAAC;EACF;AACJ;AACA;EACI,MAAMa,KAAK,GAAGzB,kBAAkB,CAAC;IAC7Be,KAAK;IACLL;EACJ,CAAC,CAAC;EACF;AACJ;AACA;EACIT,mBAAmB,CAAC;IAChBS,KAAK;IACLD,OAAO;IACPgB,KAAK;IACLX,IAAI;IACJF,MAAM,EAAEY;EACZ,CAAC,CAAC;EAEF,MAAME,aAAa,GAAGpB,mBAAmB,CAAC;IACtCI,KAAK;IACLE,MAAM,EAAEQ,WAAW;IACnBX;EACJ,CAAC,CAAC;EAEFiB,aAAa,CAAC;IACVX,KAAK;IACLU;EACJ,CAAC,CAAC;EAEF,KAAK,MAAME,EAAE,IAAIN,oBAAoB,EAAE;IACnCM,EAAE,CAACC,WAAW,CAAC;MAAEH,KAAK;MAAEf,KAAK;MAAEK;IAAM,CAAC,CAAC;EAC3C;EAEA,MAAMC,IAAI,GAAGX,uBAAuB,CAAC;IACjCI,OAAO;IACPO,IAAI,EAAEC,WAAW;IACjBG,WAAW;IACXV;EACJ,CAAC,CAAC;EAEF,KAAK,MAAMiB,EAAE,IAAIL,mBAAmB,EAAE;IAClCK,EAAE,CAACE,UAAU,CAAC;MACVb,IAAI;MACJN;IACJ,CAAC,CAAC;EACN;EAEA,MAAMoB,SAA0B,GAAG;IAC/BC,IAAI,EAAEN,KAAK,CAACM,IAAI,CAACC,MAAM,GAAG,CAAC,GAAGP,KAAK,CAACM,IAAI,GAAGE,SAAS;IACpDC,QAAQ,EAAET,KAAK,CAACS,QAAQ,CAACF,MAAM,GAAG,CAAC,GAAGP,KAAK,CAACS,QAAQ,GAAGD,SAAS;IAChEE,MAAM,EAAEV,KAAK,CAACU,MAAM,CAACH,MAAM,GAAG,CAAC,GAAGP,KAAK,CAACU,MAAM,GAAGF,SAAS;IAC1DG,MAAM,EAAEX,KAAK,CAACW,MAAM,CAACJ,MAAM,GAAG,CAAC,GAAGP,KAAK,CAACW,MAAM,GAAGH;EACrD,CAAC;EAED1B,+BAA+B,CAAC;IAC5BkB,KAAK,EAAEK;EACX,CAAC,CAAC;EAEF,MAAMO,IAAgB,GAAG;IACrBZ,KAAK,EAAE;MACHa,IAAI,EAAER;IACV,CAAC;IACDd,IAAI;IACJuB,IAAI,EAAE,CAACpB,KAAK,IAAI,CAAC,IAAI,CAAC;IACtBqB,YAAY,EAAEtB,KAAK;IACnBuB,gBAAgB,EAAE;EACtB,CAAC;EAED,KAAK,MAAMd,EAAE,IAAIJ,mBAAmB,EAAE;IAClCI,EAAE,CAACe,UAAU,CAAC;MACVL,IAAI;MACJ3B,KAAK;MACLK;IACJ,CAAC,CAAC;EACN;EAEA,OAAOsB,IAAI;AACf,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"operations/entry/elasticsearch/body.js","sources":["../../../../src/operations/entry/elasticsearch/body.ts"],"sourcesContent":["import type { PluginsContainer } from \"@webiny/plugins\";\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 plugins: PluginsContainer;\n model: CmsModel;\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 params: Omit<CmsEntryListParams, \"where\" | \"after\"> & {\n where: CmsEntryListWhere;\n after?: PrimitiveValue[];\n };\n}\nexport const createElasticsearchBody = ({\n plugins,\n model,\n params,\n fieldRegistry,\n fieldIndexRegistry,\n bodyModifiers,\n sortModifiers,\n queryModifiers,\n valueSearchRegistry,\n fullTextSearches,\n filterRegistry\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 });\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 plugins,\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 });\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","plugins","model","params","fieldRegistry","fieldIndexRegistry","bodyModifiers","sortModifiers","queryModifiers","valueSearchRegistry","fullTextSearches","filterRegistry","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":";;;;;;;AA2CO,MAAMA,0BAA0B,CAAC,EACpCC,OAAO,EACPC,KAAK,EACLC,MAAM,EACNC,aAAa,EACbC,kBAAkB,EAClBC,aAAa,EACbC,aAAa,EACbC,cAAc,EACdC,mBAAmB,EACnBC,gBAAgB,EAChBC,cAAc,EACe;IAC7B,MAAM,EAAEC,MAAM,EAAE,QAAQC,IAAI,EAAEC,KAAK,EAAE,MAAMC,WAAW,EAAEC,KAAK,EAAEC,KAAK,EAAE,GAAGd;IAIzE,MAAMe,cAAcC,kBAAkB;QAClCjB;QACAE;QACAC;IACJ;IAKA,MAAMe,2BAA2BZ,eAAe,MAAM,CAACa,CAAAA,IAC5C,CAACA,EAAE,OAAO,IAAIA,EAAE,OAAO,KAAKnB,MAAM,OAAO;IAKpD,MAAMoB,0BAA0Bf,cAAc,MAAM,CAChDc,CAAAA,IAAK,CAACA,EAAE,OAAO,IAAIA,EAAE,OAAO,KAAKnB,MAAM,OAAO;IAKlD,MAAMqB,0BAA0BjB,cAAc,MAAM,CAACe,CAAAA,IAC1C,CAACA,EAAE,OAAO,IAAIA,EAAE,OAAO,KAAKnB,MAAM,OAAO;IAMpD,MAAMsB,uBAAuBC,2BAA2B;QACpD,QAAQP;QACRL;QACA,SAASD;IACb;IAIA,MAAMc,QAAQC,mBAAmB;QAC7Bb;QACAZ;IACJ;IAIA0B,oBAAoB;QAChB1B;QACAQ;QACAgB;QACAb;QACA,QAAQW;IACZ;IAEA,MAAMK,gBAAgBC,oBAAoB;QACtC5B;QACA,QAAQgB;QACRjB;QACAQ;QACAE;IACJ;IAEAkB,cAAc;QACVf;QACAY;IACJ;IAEA,KAAK,MAAMK,YAAYX,yBACnBW,SAAS,WAAW,CAAC;QAAEL;QAAOxB;QAAOY;IAAM;IAG/C,MAAMkB,OAAOC,wBAAwB;QACjC,MAAMlB;QACNG;QACAhB;QACAO;IACJ;IAEA,KAAK,MAAMsB,YAAYT,wBACnBS,SAAS,UAAU,CAAC;QAChBC;QACA9B;IACJ;IAGJ,MAAMgC,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;QACAnC;QACAY;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 type { PluginsContainer } from "@webiny/plugins";
2
1
  import type { CmsModel } from "@webiny/api-headless-cms/types/index.js";
3
- interface Params {
4
- plugins: PluginsContainer;
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) => {
9
+ export declare const createModelFields: ({ model, fieldRegistry, fieldIndexRegistry }: ICreateModelFieldsParams) => {
8
10
  [x: string]: import("./types.js").ModelField;
9
11
  };
10
12
  export {};