@webiny/api-headless-cms-ddb-es 0.0.0-unstable.e6f0dc8ca7 → 0.0.0-unstable.eb81deee7e

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 (429) hide show
  1. package/abstractions/CmsDdbEsDataLoaders.d.ts +5 -0
  2. package/abstractions/CmsDdbEsDataLoaders.js +5 -0
  3. package/abstractions/CmsDdbEsDataLoaders.js.map +1 -0
  4. package/abstractions/CmsDdbEsEntriesEsEntity.d.ts +5 -0
  5. package/abstractions/CmsDdbEsEntriesEsEntity.js +5 -0
  6. package/abstractions/CmsDdbEsEntriesEsEntity.js.map +1 -0
  7. package/abstractions/CmsDdbEsEntryEntity.d.ts +5 -0
  8. package/abstractions/CmsDdbEsEntryEntity.js +5 -0
  9. package/abstractions/CmsDdbEsEntryEntity.js.map +1 -0
  10. package/abstractions/CmsDdbEsGroupEntity.d.ts +5 -0
  11. package/abstractions/CmsDdbEsGroupEntity.js +5 -0
  12. package/abstractions/CmsDdbEsGroupEntity.js.map +1 -0
  13. package/abstractions/CmsDdbEsModelEntity.d.ts +5 -0
  14. package/abstractions/CmsDdbEsModelEntity.js +5 -0
  15. package/abstractions/CmsDdbEsModelEntity.js.map +1 -0
  16. package/abstractions/CmsDdbEsOsTable.d.ts +5 -0
  17. package/abstractions/CmsDdbEsOsTable.js +5 -0
  18. package/abstractions/CmsDdbEsOsTable.js.map +1 -0
  19. package/abstractions/CmsDdbEsTable.d.ts +5 -0
  20. package/abstractions/CmsDdbEsTable.js +5 -0
  21. package/abstractions/CmsDdbEsTable.js.map +1 -0
  22. package/definitions/entry.js +7 -9
  23. package/definitions/entry.js.map +1 -1
  24. package/definitions/group.js +7 -9
  25. package/definitions/group.js.map +1 -1
  26. package/definitions/model.js +7 -9
  27. package/definitions/model.js.map +1 -1
  28. package/definitions/types.d.ts +4 -0
  29. package/definitions/types.js +0 -3
  30. package/feature.d.ts +9 -1
  31. package/feature.js +46 -179
  32. package/feature.js.map +1 -1
  33. package/index.d.ts +2 -1
  34. package/index.js +2 -3
  35. package/operations/entry/DdbEsCreateEntry.d.ts +24 -0
  36. package/operations/entry/DdbEsCreateEntry.js +134 -0
  37. package/operations/entry/DdbEsCreateEntry.js.map +1 -0
  38. package/operations/entry/DdbEsCreateEntryRevisionFrom.d.ts +24 -0
  39. package/operations/entry/DdbEsCreateEntryRevisionFrom.js +139 -0
  40. package/operations/entry/DdbEsCreateEntryRevisionFrom.js.map +1 -0
  41. package/operations/entry/DdbEsDeleteEntry.d.ts +18 -0
  42. package/operations/entry/DdbEsDeleteEntry.js +79 -0
  43. package/operations/entry/DdbEsDeleteEntry.js.map +1 -0
  44. package/operations/entry/DdbEsDeleteEntryRevision.d.ts +24 -0
  45. package/operations/entry/DdbEsDeleteEntryRevision.js +136 -0
  46. package/operations/entry/DdbEsDeleteEntryRevision.js.map +1 -0
  47. package/operations/entry/DdbEsDeleteMultipleEntries.d.ts +18 -0
  48. package/operations/entry/DdbEsDeleteMultipleEntries.js +80 -0
  49. package/operations/entry/DdbEsDeleteMultipleEntries.js.map +1 -0
  50. package/operations/entry/DdbEsGetEntriesByIds.d.ts +14 -0
  51. package/operations/entry/DdbEsGetEntriesByIds.js +31 -0
  52. package/operations/entry/DdbEsGetEntriesByIds.js.map +1 -0
  53. package/operations/entry/DdbEsGetEntry.d.ts +14 -0
  54. package/operations/entry/DdbEsGetEntry.js +27 -0
  55. package/operations/entry/DdbEsGetEntry.js.map +1 -0
  56. package/operations/entry/DdbEsGetLatestEntriesByIds.d.ts +14 -0
  57. package/operations/entry/DdbEsGetLatestEntriesByIds.js +31 -0
  58. package/operations/entry/DdbEsGetLatestEntriesByIds.js.map +1 -0
  59. package/operations/entry/DdbEsGetLatestRevisionByEntryId.d.ts +14 -0
  60. package/operations/entry/DdbEsGetLatestRevisionByEntryId.js +34 -0
  61. package/operations/entry/DdbEsGetLatestRevisionByEntryId.js.map +1 -0
  62. package/operations/entry/DdbEsGetPreviousRevision.d.ts +14 -0
  63. package/operations/entry/DdbEsGetPreviousRevision.js +56 -0
  64. package/operations/entry/DdbEsGetPreviousRevision.js.map +1 -0
  65. package/operations/entry/DdbEsGetPublishedEntriesByIds.d.ts +14 -0
  66. package/operations/entry/DdbEsGetPublishedEntriesByIds.js +31 -0
  67. package/operations/entry/DdbEsGetPublishedEntriesByIds.js.map +1 -0
  68. package/operations/entry/DdbEsGetPublishedRevisionByEntryId.d.ts +14 -0
  69. package/operations/entry/DdbEsGetPublishedRevisionByEntryId.js +34 -0
  70. package/operations/entry/DdbEsGetPublishedRevisionByEntryId.js.map +1 -0
  71. package/operations/entry/DdbEsGetRevisionById.d.ts +14 -0
  72. package/operations/entry/DdbEsGetRevisionById.js +34 -0
  73. package/operations/entry/DdbEsGetRevisionById.js.map +1 -0
  74. package/operations/entry/DdbEsGetRevisions.d.ts +14 -0
  75. package/operations/entry/DdbEsGetRevisions.js +33 -0
  76. package/operations/entry/DdbEsGetRevisions.js.map +1 -0
  77. package/operations/entry/DdbEsGetUniqueFieldValues.d.ts +18 -0
  78. package/operations/entry/DdbEsGetUniqueFieldValues.js +76 -0
  79. package/operations/entry/DdbEsGetUniqueFieldValues.js.map +1 -0
  80. package/operations/entry/DdbEsListEntries.d.ts +25 -0
  81. package/operations/entry/DdbEsListEntries.js +91 -0
  82. package/operations/entry/DdbEsListEntries.js.map +1 -0
  83. package/operations/entry/DdbEsMoveEntry.d.ts +20 -0
  84. package/operations/entry/DdbEsMoveEntry.js +113 -0
  85. package/operations/entry/DdbEsMoveEntry.js.map +1 -0
  86. package/operations/entry/DdbEsMoveToBin.d.ts +23 -0
  87. package/operations/entry/DdbEsMoveToBin.js +137 -0
  88. package/operations/entry/DdbEsMoveToBin.js.map +1 -0
  89. package/operations/entry/DdbEsPublishEntry.d.ts +24 -0
  90. package/operations/entry/DdbEsPublishEntry.js +231 -0
  91. package/operations/entry/DdbEsPublishEntry.js.map +1 -0
  92. package/operations/entry/DdbEsRestoreFromBin.d.ts +23 -0
  93. package/operations/entry/DdbEsRestoreFromBin.js +137 -0
  94. package/operations/entry/DdbEsRestoreFromBin.js.map +1 -0
  95. package/operations/entry/DdbEsUnpublishEntry.d.ts +24 -0
  96. package/operations/entry/DdbEsUnpublishEntry.js +127 -0
  97. package/operations/entry/DdbEsUnpublishEntry.js.map +1 -0
  98. package/operations/entry/DdbEsUpdateEntry.d.ts +24 -0
  99. package/operations/entry/DdbEsUpdateEntry.js +175 -0
  100. package/operations/entry/DdbEsUpdateEntry.js.map +1 -0
  101. package/operations/entry/dataLoader/DataLoaderCache.js +22 -26
  102. package/operations/entry/dataLoader/DataLoaderCache.js.map +1 -1
  103. package/operations/entry/dataLoader/constants.js +2 -1
  104. package/operations/entry/dataLoader/constants.js.map +1 -1
  105. package/operations/entry/dataLoader/createBatchScheduleFn.js +6 -15
  106. package/operations/entry/dataLoader/createBatchScheduleFn.js.map +1 -1
  107. package/operations/entry/dataLoader/getAllEntryRevisions.js +18 -29
  108. package/operations/entry/dataLoader/getAllEntryRevisions.js.map +1 -1
  109. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js +27 -37
  110. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js.map +1 -1
  111. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js +27 -37
  112. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js.map +1 -1
  113. package/operations/entry/dataLoader/getRevisionById.js +32 -46
  114. package/operations/entry/dataLoader/getRevisionById.js.map +1 -1
  115. package/operations/entry/dataLoader/index.js +8 -9
  116. package/operations/entry/dataLoader/index.js.map +1 -1
  117. package/operations/entry/dataLoader/types.js +0 -3
  118. package/operations/entry/dataLoaders.d.ts +5 -5
  119. package/operations/entry/dataLoaders.js +89 -99
  120. package/operations/entry/dataLoaders.js.map +1 -1
  121. package/{features/CmsEntryOpenSearchIndex → operations/entry}/feature.d.ts +1 -1
  122. package/operations/entry/feature.js +53 -0
  123. package/operations/entry/feature.js.map +1 -0
  124. package/operations/entry/keys.js +43 -63
  125. package/operations/entry/keys.js.map +1 -1
  126. package/operations/entry/recordType.js +4 -9
  127. package/operations/entry/recordType.js.map +1 -1
  128. package/operations/entry/storageEntryUtils.d.ts +7 -0
  129. package/operations/entry/storageEntryUtils.js +14 -0
  130. package/operations/entry/storageEntryUtils.js.map +1 -0
  131. package/operations/entry/transformations/convertEntryKeys.js +21 -26
  132. package/operations/entry/transformations/convertEntryKeys.js.map +1 -1
  133. package/operations/entry/transformations/index.d.ts +2 -5
  134. package/operations/entry/transformations/index.js +85 -115
  135. package/operations/entry/transformations/index.js.map +1 -1
  136. package/operations/entry/transformations/modifyEntryValues.d.ts +3 -3
  137. package/operations/entry/transformations/modifyEntryValues.js +12 -17
  138. package/operations/entry/transformations/modifyEntryValues.js.map +1 -1
  139. package/operations/entry/transformations/transformEntryKeys.js +13 -16
  140. package/operations/entry/transformations/transformEntryKeys.js.map +1 -1
  141. package/operations/group/DdbEsCreateGroup.d.ts +12 -0
  142. package/operations/group/DdbEsCreateGroup.js +35 -0
  143. package/operations/group/DdbEsCreateGroup.js.map +1 -0
  144. package/operations/group/DdbEsDeleteGroup.d.ts +12 -0
  145. package/operations/group/DdbEsDeleteGroup.js +31 -0
  146. package/operations/group/DdbEsDeleteGroup.js.map +1 -0
  147. package/operations/group/DdbEsGetGroup.d.ts +12 -0
  148. package/operations/group/DdbEsGetGroup.js +31 -0
  149. package/operations/group/DdbEsGetGroup.js.map +1 -0
  150. package/operations/group/DdbEsListGroups.d.ts +14 -0
  151. package/operations/group/DdbEsListGroups.js +52 -0
  152. package/operations/group/DdbEsListGroups.js.map +1 -0
  153. package/operations/group/DdbEsUpdateGroup.d.ts +12 -0
  154. package/operations/group/DdbEsUpdateGroup.js +35 -0
  155. package/operations/group/DdbEsUpdateGroup.js.map +1 -0
  156. package/{features/CmsEntryOpenSearchFilter → operations/group}/feature.d.ts +1 -1
  157. package/operations/group/feature.js +19 -0
  158. package/operations/group/feature.js.map +1 -0
  159. package/operations/group/keys.d.ts +15 -0
  160. package/operations/group/keys.js +17 -0
  161. package/operations/group/keys.js.map +1 -0
  162. package/operations/model/DdbEsCreateModel.d.ts +16 -0
  163. package/operations/model/DdbEsCreateModel.js +56 -0
  164. package/operations/model/DdbEsCreateModel.js.map +1 -0
  165. package/operations/model/DdbEsDeleteModel.d.ts +12 -0
  166. package/operations/model/DdbEsDeleteModel.js +31 -0
  167. package/operations/model/DdbEsDeleteModel.js.map +1 -0
  168. package/operations/model/DdbEsGetModel.d.ts +12 -0
  169. package/operations/model/DdbEsGetModel.js +30 -0
  170. package/operations/model/DdbEsGetModel.js.map +1 -0
  171. package/operations/model/DdbEsListModels.d.ts +12 -0
  172. package/operations/model/DdbEsListModels.js +36 -0
  173. package/operations/model/DdbEsListModels.js.map +1 -0
  174. package/operations/model/DdbEsUpdateModel.d.ts +12 -0
  175. package/operations/model/DdbEsUpdateModel.js +36 -0
  176. package/operations/model/DdbEsUpdateModel.js.map +1 -0
  177. package/{features/CmsEntryOpenSearchFieldIndex → operations/model}/feature.d.ts +1 -1
  178. package/operations/model/feature.js +19 -0
  179. package/operations/model/feature.js.map +1 -0
  180. package/operations/model/keys.d.ts +15 -0
  181. package/operations/model/keys.js +17 -0
  182. package/operations/model/keys.js.map +1 -0
  183. package/package.json +33 -27
  184. package/requestFeature.d.ts +20 -0
  185. package/requestFeature.js +54 -0
  186. package/requestFeature.js.map +1 -0
  187. package/tasks/CreateElasticsearchIndexTask.d.ts +13 -0
  188. package/tasks/CreateElasticsearchIndexTask.js +40 -0
  189. package/tasks/CreateElasticsearchIndexTask.js.map +1 -0
  190. package/types.d.ts +11 -50
  191. package/types.js +7 -13
  192. package/types.js.map +1 -1
  193. package/configurations.d.ts +0 -19
  194. package/configurations.js +0 -39
  195. package/configurations.js.map +0 -1
  196. package/definitions/types.js.map +0 -1
  197. package/elasticsearch/createElasticsearchIndex.d.ts +0 -9
  198. package/elasticsearch/createElasticsearchIndex.js +0 -74
  199. package/elasticsearch/createElasticsearchIndex.js.map +0 -1
  200. package/elasticsearch/deleteElasticsearchIndex.d.ts +0 -8
  201. package/elasticsearch/deleteElasticsearchIndex.js +0 -31
  202. package/elasticsearch/deleteElasticsearchIndex.js.map +0 -1
  203. package/exports/api/cms/opensearch.d.ts +0 -9
  204. package/exports/api/cms/opensearch.js +0 -11
  205. package/exports/api/cms/opensearch.js.map +0 -1
  206. package/features/CmsEntryOpenSearchBodyModifier/abstractions.d.ts +0 -16
  207. package/features/CmsEntryOpenSearchBodyModifier/abstractions.js +0 -4
  208. package/features/CmsEntryOpenSearchBodyModifier/abstractions.js.map +0 -1
  209. package/features/CmsEntryOpenSearchBodyModifier/index.d.ts +0 -1
  210. package/features/CmsEntryOpenSearchBodyModifier/index.js +0 -3
  211. package/features/CmsEntryOpenSearchBodyModifier/index.js.map +0 -1
  212. package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.d.ts +0 -13
  213. package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.js +0 -36
  214. package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.js.map +0 -1
  215. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.d.ts +0 -35
  216. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.js +0 -4
  217. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.js.map +0 -1
  218. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.d.ts +0 -11
  219. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.js +0 -4
  220. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.js.map +0 -1
  221. package/features/CmsEntryOpenSearchFieldIndex/constants.d.ts +0 -1
  222. package/features/CmsEntryOpenSearchFieldIndex/constants.js +0 -3
  223. package/features/CmsEntryOpenSearchFieldIndex/constants.js.map +0 -1
  224. package/features/CmsEntryOpenSearchFieldIndex/feature.js +0 -24
  225. package/features/CmsEntryOpenSearchFieldIndex/feature.js.map +0 -1
  226. package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.d.ts +0 -11
  227. package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.js +0 -77
  228. package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.js.map +0 -1
  229. package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.d.ts +0 -10
  230. package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.js +0 -39
  231. package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.js.map +0 -1
  232. package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.d.ts +0 -10
  233. package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.js +0 -22
  234. package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.js.map +0 -1
  235. package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.d.ts +0 -10
  236. package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.js +0 -25
  237. package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.js.map +0 -1
  238. package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.d.ts +0 -11
  239. package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.js +0 -37
  240. package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.js.map +0 -1
  241. package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.d.ts +0 -10
  242. package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.js +0 -158
  243. package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.js.map +0 -1
  244. package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.d.ts +0 -10
  245. package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.js +0 -22
  246. package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.js.map +0 -1
  247. package/features/CmsEntryOpenSearchFieldIndex/index.d.ts +0 -3
  248. package/features/CmsEntryOpenSearchFieldIndex/index.js +0 -5
  249. package/features/CmsEntryOpenSearchFieldIndex/index.js.map +0 -1
  250. package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.d.ts +0 -11
  251. package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.js +0 -38
  252. package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.js.map +0 -1
  253. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.d.ts +0 -37
  254. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.js +0 -4
  255. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.js.map +0 -1
  256. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.d.ts +0 -9
  257. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.js +0 -4
  258. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.js.map +0 -1
  259. package/features/CmsEntryOpenSearchFilter/constants.d.ts +0 -1
  260. package/features/CmsEntryOpenSearchFilter/constants.js +0 -3
  261. package/features/CmsEntryOpenSearchFilter/constants.js.map +0 -1
  262. package/features/CmsEntryOpenSearchFilter/feature.js +0 -16
  263. package/features/CmsEntryOpenSearchFilter/feature.js.map +0 -1
  264. package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.d.ts +0 -9
  265. package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.js +0 -23
  266. package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.js.map +0 -1
  267. package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.d.ts +0 -9
  268. package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.js +0 -61
  269. package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.js.map +0 -1
  270. package/features/CmsEntryOpenSearchFilter/fields/RefFilter.d.ts +0 -9
  271. package/features/CmsEntryOpenSearchFilter/fields/RefFilter.js +0 -49
  272. package/features/CmsEntryOpenSearchFilter/fields/RefFilter.js.map +0 -1
  273. package/features/CmsEntryOpenSearchFilter/index.d.ts +0 -3
  274. package/features/CmsEntryOpenSearchFilter/index.js +0 -5
  275. package/features/CmsEntryOpenSearchFilter/index.js.map +0 -1
  276. package/features/CmsEntryOpenSearchFullTextSearch/abstractions.d.ts +0 -20
  277. package/features/CmsEntryOpenSearchFullTextSearch/abstractions.js +0 -4
  278. package/features/CmsEntryOpenSearchFullTextSearch/abstractions.js.map +0 -1
  279. package/features/CmsEntryOpenSearchFullTextSearch/index.d.ts +0 -1
  280. package/features/CmsEntryOpenSearchFullTextSearch/index.js +0 -3
  281. package/features/CmsEntryOpenSearchFullTextSearch/index.js.map +0 -1
  282. package/features/CmsEntryOpenSearchIndex/BaseOpenSearchIndex.d.ts +0 -11
  283. package/features/CmsEntryOpenSearchIndex/BaseOpenSearchIndex.js +0 -16
  284. package/features/CmsEntryOpenSearchIndex/BaseOpenSearchIndex.js.map +0 -1
  285. package/features/CmsEntryOpenSearchIndex/abstractions.d.ts +0 -14
  286. package/features/CmsEntryOpenSearchIndex/abstractions.js +0 -4
  287. package/features/CmsEntryOpenSearchIndex/abstractions.js.map +0 -1
  288. package/features/CmsEntryOpenSearchIndex/feature.js +0 -10
  289. package/features/CmsEntryOpenSearchIndex/feature.js.map +0 -1
  290. package/features/CmsEntryOpenSearchIndex/index.d.ts +0 -3
  291. package/features/CmsEntryOpenSearchIndex/index.js +0 -5
  292. package/features/CmsEntryOpenSearchIndex/index.js.map +0 -1
  293. package/features/CmsEntryOpenSearchQueryModifier/abstractions.d.ts +0 -16
  294. package/features/CmsEntryOpenSearchQueryModifier/abstractions.js +0 -4
  295. package/features/CmsEntryOpenSearchQueryModifier/abstractions.js.map +0 -1
  296. package/features/CmsEntryOpenSearchQueryModifier/index.d.ts +0 -1
  297. package/features/CmsEntryOpenSearchQueryModifier/index.js +0 -3
  298. package/features/CmsEntryOpenSearchQueryModifier/index.js.map +0 -1
  299. package/features/CmsEntryOpenSearchSortModifier/abstractions.d.ts +0 -15
  300. package/features/CmsEntryOpenSearchSortModifier/abstractions.js +0 -4
  301. package/features/CmsEntryOpenSearchSortModifier/abstractions.js.map +0 -1
  302. package/features/CmsEntryOpenSearchSortModifier/index.d.ts +0 -1
  303. package/features/CmsEntryOpenSearchSortModifier/index.js +0 -3
  304. package/features/CmsEntryOpenSearchSortModifier/index.js.map +0 -1
  305. package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.d.ts +0 -12
  306. package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.js +0 -27
  307. package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.js.map +0 -1
  308. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.d.ts +0 -22
  309. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.js +0 -4
  310. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.js.map +0 -1
  311. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.d.ts +0 -10
  312. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.js +0 -4
  313. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.js.map +0 -1
  314. package/features/CmsEntryOpenSearchValueSearch/feature.d.ts +0 -4
  315. package/features/CmsEntryOpenSearchValueSearch/feature.js +0 -16
  316. package/features/CmsEntryOpenSearchValueSearch/feature.js.map +0 -1
  317. package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.d.ts +0 -10
  318. package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.js +0 -23
  319. package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.js.map +0 -1
  320. package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.d.ts +0 -10
  321. package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.js +0 -55
  322. package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.js.map +0 -1
  323. package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.d.ts +0 -10
  324. package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.js +0 -24
  325. package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.js.map +0 -1
  326. package/features/CmsEntryOpenSearchValueSearch/index.d.ts +0 -3
  327. package/features/CmsEntryOpenSearchValueSearch/index.js +0 -5
  328. package/features/CmsEntryOpenSearchValueSearch/index.js.map +0 -1
  329. package/features/CmsEntryOpenSearchValuesModifier/abstractions.d.ts +0 -23
  330. package/features/CmsEntryOpenSearchValuesModifier/abstractions.js +0 -4
  331. package/features/CmsEntryOpenSearchValuesModifier/abstractions.js.map +0 -1
  332. package/features/CmsEntryOpenSearchValuesModifier/index.d.ts +0 -1
  333. package/features/CmsEntryOpenSearchValuesModifier/index.js +0 -3
  334. package/features/CmsEntryOpenSearchValuesModifier/index.js.map +0 -1
  335. package/helpers/entryIndexHelpers.d.ts +0 -20
  336. package/helpers/entryIndexHelpers.js +0 -134
  337. package/helpers/entryIndexHelpers.js.map +0 -1
  338. package/helpers/fieldIdentifier.d.ts +0 -6
  339. package/helpers/fieldIdentifier.js +0 -35
  340. package/helpers/fieldIdentifier.js.map +0 -1
  341. package/helpers/index.d.ts +0 -2
  342. package/helpers/index.js +0 -4
  343. package/helpers/index.js.map +0 -1
  344. package/index.js.map +0 -1
  345. package/operations/entry/dataLoader/types.js.map +0 -1
  346. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.d.ts +0 -18
  347. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js +0 -27
  348. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js.map +0 -1
  349. package/operations/entry/elasticsearch/body.d.ts +0 -29
  350. package/operations/entry/elasticsearch/body.js +0 -138
  351. package/operations/entry/elasticsearch/body.js.map +0 -1
  352. package/operations/entry/elasticsearch/fields/createSystemField.d.ts +0 -4
  353. package/operations/entry/elasticsearch/fields/createSystemField.js +0 -10
  354. package/operations/entry/elasticsearch/fields/createSystemField.js.map +0 -1
  355. package/operations/entry/elasticsearch/fields/live.d.ts +0 -2
  356. package/operations/entry/elasticsearch/fields/live.js +0 -45
  357. package/operations/entry/elasticsearch/fields/live.js.map +0 -1
  358. package/operations/entry/elasticsearch/fields/location.d.ts +0 -2
  359. package/operations/entry/elasticsearch/fields/location.js +0 -45
  360. package/operations/entry/elasticsearch/fields/location.js.map +0 -1
  361. package/operations/entry/elasticsearch/fields/state.d.ts +0 -2
  362. package/operations/entry/elasticsearch/fields/state.js +0 -93
  363. package/operations/entry/elasticsearch/fields/state.js.map +0 -1
  364. package/operations/entry/elasticsearch/fields.d.ts +0 -12
  365. package/operations/entry/elasticsearch/fields.js +0 -231
  366. package/operations/entry/elasticsearch/fields.js.map +0 -1
  367. package/operations/entry/elasticsearch/filtering/applyFiltering.d.ts +0 -9
  368. package/operations/entry/elasticsearch/filtering/applyFiltering.js +0 -52
  369. package/operations/entry/elasticsearch/filtering/applyFiltering.js.map +0 -1
  370. package/operations/entry/elasticsearch/filtering/exec.d.ts +0 -22
  371. package/operations/entry/elasticsearch/filtering/exec.js +0 -125
  372. package/operations/entry/elasticsearch/filtering/exec.js.map +0 -1
  373. package/operations/entry/elasticsearch/filtering/index.d.ts +0 -1
  374. package/operations/entry/elasticsearch/filtering/index.js +0 -3
  375. package/operations/entry/elasticsearch/filtering/index.js.map +0 -1
  376. package/operations/entry/elasticsearch/filtering/path.d.ts +0 -17
  377. package/operations/entry/elasticsearch/filtering/path.js +0 -36
  378. package/operations/entry/elasticsearch/filtering/path.js.map +0 -1
  379. package/operations/entry/elasticsearch/filtering/populated.d.ts +0 -2
  380. package/operations/entry/elasticsearch/filtering/populated.js +0 -18
  381. package/operations/entry/elasticsearch/filtering/populated.js.map +0 -1
  382. package/operations/entry/elasticsearch/filtering/values.d.ts +0 -2
  383. package/operations/entry/elasticsearch/filtering/values.js +0 -16
  384. package/operations/entry/elasticsearch/filtering/values.js.map +0 -1
  385. package/operations/entry/elasticsearch/fullTextSearch.d.ts +0 -13
  386. package/operations/entry/elasticsearch/fullTextSearch.js +0 -88
  387. package/operations/entry/elasticsearch/fullTextSearch.js.map +0 -1
  388. package/operations/entry/elasticsearch/fullTextSearchFields.d.ts +0 -8
  389. package/operations/entry/elasticsearch/fullTextSearchFields.js +0 -20
  390. package/operations/entry/elasticsearch/fullTextSearchFields.js.map +0 -1
  391. package/operations/entry/elasticsearch/initialQuery.d.ts +0 -17
  392. package/operations/entry/elasticsearch/initialQuery.js +0 -88
  393. package/operations/entry/elasticsearch/initialQuery.js.map +0 -1
  394. package/operations/entry/elasticsearch/keyword.d.ts +0 -2
  395. package/operations/entry/elasticsearch/keyword.js +0 -31
  396. package/operations/entry/elasticsearch/keyword.js.map +0 -1
  397. package/operations/entry/elasticsearch/plugins/operator.d.ts +0 -7
  398. package/operations/entry/elasticsearch/plugins/operator.js +0 -24
  399. package/operations/entry/elasticsearch/plugins/operator.js.map +0 -1
  400. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.d.ts +0 -2
  401. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js +0 -6
  402. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js.map +0 -1
  403. package/operations/entry/elasticsearch/sort.d.ts +0 -12
  404. package/operations/entry/elasticsearch/sort.js +0 -103
  405. package/operations/entry/elasticsearch/sort.js.map +0 -1
  406. package/operations/entry/elasticsearch/transformValueForSearch.d.ts +0 -9
  407. package/operations/entry/elasticsearch/transformValueForSearch.js +0 -17
  408. package/operations/entry/elasticsearch/transformValueForSearch.js.map +0 -1
  409. package/operations/entry/elasticsearch/types.d.ts +0 -34
  410. package/operations/entry/elasticsearch/types.js +0 -3
  411. package/operations/entry/elasticsearch/types.js.map +0 -1
  412. package/operations/entry/index.d.ts +0 -32
  413. package/operations/entry/index.js +0 -1761
  414. package/operations/entry/index.js.map +0 -1
  415. package/operations/entry/transformations/transformEntryToIndex.d.ts +0 -12
  416. package/operations/entry/transformations/transformEntryToIndex.js +0 -26
  417. package/operations/entry/transformations/transformEntryToIndex.js.map +0 -1
  418. package/operations/group/index.d.ts +0 -9
  419. package/operations/group/index.js +0 -142
  420. package/operations/group/index.js.map +0 -1
  421. package/operations/model/index.d.ts +0 -8
  422. package/operations/model/index.js +0 -163
  423. package/operations/model/index.js.map +0 -1
  424. package/tasks/createIndexTaskPlugin.d.ts +0 -2
  425. package/tasks/createIndexTaskPlugin.js +0 -48
  426. package/tasks/createIndexTaskPlugin.js.map +0 -1
  427. package/values/NoValueContainer.d.ts +0 -5
  428. package/values/NoValueContainer.js +0 -13
  429. package/values/NoValueContainer.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"names":["CmsEntryOpenSearchFieldIndex","convertTimeToNumber","time","hours","minutes","seconds","split","map","Number","convertNumberToTime","value","undefined","Math","floor","v","String","padStart","join","convertValueToIndex","field","settings","type","convertValueFromIndex","dateValue","Date","toISOString","slice","DateTimeFieldIndexImpl","fieldType","unmappedType","toIndex","Array","isArray","fromIndex","DateTimeFieldIndex","createImplementation","implementation","dependencies"],"sources":["DateTimeFieldIndex.ts"],"sourcesContent":["import type { CmsModelDateTimeField } from \"@webiny/api-headless-cms/types/index.js\";\nimport { CmsEntryOpenSearchFieldIndex } from \"../abstractions/CmsEntryOpenSearchFieldIndex.js\";\n\nconst convertTimeToNumber = (time?: string): number | null => {\n if (!time) {\n return null;\n }\n const [hours, minutes, seconds = 0] = time.split(\":\").map(Number);\n return hours * 60 * 60 + minutes * 60 + seconds;\n};\n\nconst convertNumberToTime = (value?: number): string | null => {\n if (value === undefined || value === null) {\n return null;\n }\n\n const hours = Math.floor(value / 60 / 60);\n const minutes = Math.floor((value - hours * 60 * 60) / 60);\n const seconds = Math.floor(value - hours * 60 * 60 - minutes * 60);\n\n return [hours, minutes, seconds].map(v => String(v).padStart(2, \"0\")).join(\":\");\n};\n\nconst convertValueToIndex = (value: string, field: CmsModelDateTimeField) => {\n if (!value) {\n return null;\n } else if (field.settings?.type === \"time\") {\n return convertTimeToNumber(value);\n }\n return value;\n};\n\nconst convertValueFromIndex = (\n value: string | number,\n field: CmsModelDateTimeField\n): string | null => {\n const type = field.settings?.type;\n if (type === \"time\") {\n return convertNumberToTime(value as number);\n } else if (!value) {\n return null;\n } else if (type === \"dateTimeWithTimezone\") {\n return value as string;\n } else if (type === \"date\") {\n const dateValue = new Date(value);\n return dateValue.toISOString().slice(0, 10);\n }\n return new Date(value).toISOString();\n};\n\nclass DateTimeFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {\n public readonly fieldType = \"datetime\";\n\n public unmappedType(): string {\n return \"date\";\n }\n\n public toIndex({\n field,\n value\n }: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue {\n if (Array.isArray(value) === true) {\n return {\n value: value.map((v: string) => {\n return convertValueToIndex(v, field as CmsModelDateTimeField);\n })\n };\n }\n return {\n value: convertValueToIndex(value, field as CmsModelDateTimeField)\n };\n }\n\n public fromIndex({ field, value }: CmsEntryOpenSearchFieldIndex.FromIndex): any {\n if (Array.isArray(value) === true) {\n return value.map((v: string) => {\n return convertValueFromIndex(v, field as CmsModelDateTimeField);\n });\n }\n return convertValueFromIndex(value, field as CmsModelDateTimeField);\n }\n}\n\nexport const DateTimeFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({\n implementation: DateTimeFieldIndexImpl,\n dependencies: []\n});\n"],"mappings":"AACA,SAASA,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AC/B,OAAOA,KAAK,CAACH,GAAG,CAAEO,CAAS,IAAK;QAC5B,OAAOQ,qBAAqB,CAACR,CAAC,EAAEK,KAA8B,CAAC;MACnE,CAAC,CAAC;IACN;IACA,OAAOG,qBAAqB,CAACZ,KAAK,EAAES,KAA8B,CAAC;EACvE;AACJ;AAEA,OAAO,MAAMe,kBAAkB,GAAGlC,4BAA4B,CAACmC,oBAAoB,CAAC;EAChFC,cAAc,EAAET,sBAAsB;EACtCU,YAAY,EAAE;AAClB,CAAC,CAAC","ignoreList":[]}
@@ -1,10 +0,0 @@
1
- import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
2
- declare class DefaultFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {
3
- readonly fieldType: "*";
4
- toIndex({ field, fieldRegistry, value }: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue;
5
- fromIndex({ field, fieldRegistry, value, rawValue }: CmsEntryOpenSearchFieldIndex.FromIndex): any;
6
- }
7
- export declare const DefaultFieldIndex: typeof DefaultFieldIndexImpl & {
8
- __abstraction: import("@webiny/di").Abstraction<import("../abstractions/CmsEntryOpenSearchFieldIndex.js").ICmsEntryOpenSearchFieldIndex>;
9
- };
10
- export {};
@@ -1,39 +0,0 @@
1
- import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
2
- import { FIELD_INDEXING_DEFAULT } from "../constants.js";
3
- class DefaultFieldIndexImpl {
4
- fieldType = FIELD_INDEXING_DEFAULT;
5
- toIndex({
6
- field,
7
- fieldRegistry,
8
- value
9
- }) {
10
- const fieldType = fieldRegistry.get(field.type);
11
- if (fieldType?.isSearchable === true) {
12
- return {
13
- value
14
- };
15
- }
16
- return {
17
- rawValue: value
18
- };
19
- }
20
- fromIndex({
21
- field,
22
- fieldRegistry,
23
- value,
24
- rawValue
25
- }) {
26
- const fieldType = fieldRegistry.get(field.type);
27
- const isSearchable = fieldType?.isSearchable ?? false;
28
- if (isSearchable) {
29
- return value === undefined ? rawValue : value;
30
- }
31
- return rawValue === undefined ? value : rawValue;
32
- }
33
- }
34
- export const DefaultFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({
35
- implementation: DefaultFieldIndexImpl,
36
- dependencies: []
37
- });
38
-
39
- //# sourceMappingURL=DefaultFieldIndex.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["CmsEntryOpenSearchFieldIndex","FIELD_INDEXING_DEFAULT","DefaultFieldIndexImpl","fieldType","toIndex","field","fieldRegistry","value","get","type","isSearchable","rawValue","fromIndex","undefined","DefaultFieldIndex","createImplementation","implementation","dependencies"],"sources":["DefaultFieldIndex.ts"],"sourcesContent":["import { CmsEntryOpenSearchFieldIndex } from \"../abstractions/CmsEntryOpenSearchFieldIndex.js\";\nimport { FIELD_INDEXING_DEFAULT } from \"../constants.js\";\n\nclass DefaultFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {\n public readonly fieldType = FIELD_INDEXING_DEFAULT;\n\n public toIndex({\n field,\n fieldRegistry,\n value\n }: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue {\n const fieldType = fieldRegistry.get(field.type);\n\n if (fieldType?.isSearchable === true) {\n return { value };\n }\n\n return { rawValue: value };\n }\n\n public fromIndex({\n field,\n fieldRegistry,\n value,\n rawValue\n }: CmsEntryOpenSearchFieldIndex.FromIndex): any {\n const fieldType = fieldRegistry.get(field.type);\n const isSearchable = fieldType?.isSearchable ?? false;\n\n if (isSearchable) {\n return value === undefined ? rawValue : value;\n }\n return rawValue === undefined ? value : rawValue;\n }\n}\n\nexport const DefaultFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({\n implementation: DefaultFieldIndexImpl,\n dependencies: []\n});\n"],"mappings":"AAAA,SAASA,4BAA4B;AACrC,SAASC,sBAAsB;AAE/B,MAAMC,qBAAqB,CAAmD;EAC1DC,SAAS,GAAGF,sBAAsB;EAE3CG,OAAOA,CAAC;IACXC,KAAK;IACLC,aAAa;IACbC;EACkC,CAAC,EAAwC;IAC3E,MAAMJ,SAAS,GAAGG,aAAa,CAACE,GAAG,CAACH,KAAK,CAACI,IAAI,CAAC;IAE/C,IAAIN,SAAS,EAAEO,YAAY,KAAK,IAAI,EAAE;MAClC,OAAO;QAAEH;MAAM,CAAC;IACpB;IAEA,OAAO;MAAEI,QAAQ,EAAEJ;IAAM,CAAC;EAC9B;EAEOK,SAASA,CAAC;IACbP,KAAK;IACLC,aAAa;IACbC,KAAK;IACLI;EACoC,CAAC,EAAO;IAC5C,MAAMR,SAAS,GAAGG,aAAa,CAACE,GAAG,CAACH,KAAK,CAACI,IAAI,CAAC;IAC/C,MAAMC,YAAY,GAAGP,SAAS,EAAEO,YAAY,IAAI,KAAK;IAErD,IAAIA,YAAY,EAAE;MACd,OAAOH,KAAK,KAAKM,SAAS,GAAGF,QAAQ,GAAGJ,KAAK;IACjD;IACA,OAAOI,QAAQ,KAAKE,SAAS,GAAGN,KAAK,GAAGI,QAAQ;EACpD;AACJ;AAEA,OAAO,MAAMG,iBAAiB,GAAGd,4BAA4B,CAACe,oBAAoB,CAAC;EAC/EC,cAAc,EAAEd,qBAAqB;EACrCe,YAAY,EAAE;AAClB,CAAC,CAAC","ignoreList":[]}
@@ -1,10 +0,0 @@
1
- import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
2
- declare class JsonFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {
3
- readonly fieldType = "json";
4
- toIndex({ value }: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue;
5
- fromIndex({ rawValue }: CmsEntryOpenSearchFieldIndex.FromIndex): any;
6
- }
7
- export declare const JsonFieldIndex: typeof JsonFieldIndexImpl & {
8
- __abstraction: import("@webiny/di").Abstraction<import("../abstractions/CmsEntryOpenSearchFieldIndex.js").ICmsEntryOpenSearchFieldIndex>;
9
- };
10
- export {};
@@ -1,22 +0,0 @@
1
- import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
2
- class JsonFieldIndexImpl {
3
- fieldType = "json";
4
- toIndex({
5
- value
6
- }) {
7
- return {
8
- rawValue: value
9
- };
10
- }
11
- fromIndex({
12
- rawValue
13
- }) {
14
- return rawValue;
15
- }
16
- }
17
- export const JsonFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({
18
- implementation: JsonFieldIndexImpl,
19
- dependencies: []
20
- });
21
-
22
- //# sourceMappingURL=JsonFieldIndex.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["CmsEntryOpenSearchFieldIndex","JsonFieldIndexImpl","fieldType","toIndex","value","rawValue","fromIndex","JsonFieldIndex","createImplementation","implementation","dependencies"],"sources":["JsonFieldIndex.ts"],"sourcesContent":["import { CmsEntryOpenSearchFieldIndex } from \"../abstractions/CmsEntryOpenSearchFieldIndex.js\";\n\nclass JsonFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {\n public readonly fieldType = \"json\";\n\n public toIndex({\n value\n }: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue {\n return {\n rawValue: value\n };\n }\n\n public fromIndex({ rawValue }: CmsEntryOpenSearchFieldIndex.FromIndex): any {\n return rawValue;\n }\n}\n\nexport const JsonFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({\n implementation: JsonFieldIndexImpl,\n dependencies: []\n});\n"],"mappings":"AAAA,SAASA,4BAA4B;AAErC,MAAMC,kBAAkB,CAAmD;EACvDC,SAAS,GAAG,MAAM;EAE3BC,OAAOA,CAAC;IACXC;EACkC,CAAC,EAAwC;IAC3E,OAAO;MACHC,QAAQ,EAAED;IACd,CAAC;EACL;EAEOE,SAASA,CAAC;IAAED;EAAiD,CAAC,EAAO;IACxE,OAAOA,QAAQ;EACnB;AACJ;AAEA,OAAO,MAAME,cAAc,GAAGP,4BAA4B,CAACQ,oBAAoB,CAAC;EAC5EC,cAAc,EAAER,kBAAkB;EAClCS,YAAY,EAAE;AAClB,CAAC,CAAC","ignoreList":[]}
@@ -1,10 +0,0 @@
1
- import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
2
- declare class LongTextFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {
3
- readonly fieldType = "long-text";
4
- toIndex({ rawValue }: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue;
5
- fromIndex({ value }: CmsEntryOpenSearchFieldIndex.FromIndex): any;
6
- }
7
- export declare const LongTextFieldIndex: typeof LongTextFieldIndexImpl & {
8
- __abstraction: import("@webiny/di").Abstraction<import("../abstractions/CmsEntryOpenSearchFieldIndex.js").ICmsEntryOpenSearchFieldIndex>;
9
- };
10
- export {};
@@ -1,25 +0,0 @@
1
- import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
2
- class LongTextFieldIndexImpl {
3
- fieldType = "long-text";
4
- toIndex({
5
- rawValue
6
- }) {
7
- return {
8
- value: Array.isArray(rawValue) ? rawValue : rawValue || ""
9
- };
10
- }
11
- fromIndex({
12
- value
13
- }) {
14
- if (Array.isArray(value)) {
15
- return value;
16
- }
17
- return value || "";
18
- }
19
- }
20
- export const LongTextFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({
21
- implementation: LongTextFieldIndexImpl,
22
- dependencies: []
23
- });
24
-
25
- //# sourceMappingURL=LongTextFieldIndex.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["CmsEntryOpenSearchFieldIndex","LongTextFieldIndexImpl","fieldType","toIndex","rawValue","value","Array","isArray","fromIndex","LongTextFieldIndex","createImplementation","implementation","dependencies"],"sources":["LongTextFieldIndex.ts"],"sourcesContent":["import { CmsEntryOpenSearchFieldIndex } from \"../abstractions/CmsEntryOpenSearchFieldIndex.js\";\n\nclass LongTextFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {\n public readonly fieldType = \"long-text\";\n\n public toIndex({\n rawValue\n }: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue {\n return {\n value: Array.isArray(rawValue) ? rawValue : rawValue || \"\"\n };\n }\n\n public fromIndex({ value }: CmsEntryOpenSearchFieldIndex.FromIndex): any {\n if (Array.isArray(value)) {\n return value;\n }\n return value || \"\";\n }\n}\n\nexport const LongTextFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({\n implementation: LongTextFieldIndexImpl,\n dependencies: []\n});\n"],"mappings":"AAAA,SAASA,4BAA4B;AAErC,MAAMC,sBAAsB,CAAmD;EAC3DC,SAAS,GAAG,WAAW;EAEhCC,OAAOA,CAAC;IACXC;EACkC,CAAC,EAAwC;IAC3E,OAAO;MACHC,KAAK,EAAEC,KAAK,CAACC,OAAO,CAACH,QAAQ,CAAC,GAAGA,QAAQ,GAAGA,QAAQ,IAAI;IAC5D,CAAC;EACL;EAEOI,SAASA,CAAC;IAAEH;EAA8C,CAAC,EAAO;IACrE,IAAIC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,EAAE;MACtB,OAAOA,KAAK;IAChB;IACA,OAAOA,KAAK,IAAI,EAAE;EACtB;AACJ;AAEA,OAAO,MAAMI,kBAAkB,GAAGT,4BAA4B,CAACU,oBAAoB,CAAC;EAChFC,cAAc,EAAEV,sBAAsB;EACtCW,YAAY,EAAE;AAClB,CAAC,CAAC","ignoreList":[]}
@@ -1,11 +0,0 @@
1
- import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
2
- declare class NumberFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {
3
- readonly fieldType = "number";
4
- unmappedType(): string;
5
- toIndex({ value }: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue;
6
- fromIndex({ value }: CmsEntryOpenSearchFieldIndex.FromIndex): any;
7
- }
8
- export declare const NumberFieldIndex: typeof NumberFieldIndexImpl & {
9
- __abstraction: import("@webiny/di").Abstraction<import("../abstractions/CmsEntryOpenSearchFieldIndex.js").ICmsEntryOpenSearchFieldIndex>;
10
- };
11
- export {};
@@ -1,37 +0,0 @@
1
- import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
2
- const convertToString = value => {
3
- if (Array.isArray(value) === false) {
4
- return value;
5
- }
6
- return value.map(String);
7
- };
8
- const convertToFloat = value => {
9
- if (Array.isArray(value) === false) {
10
- return typeof value === "string" ? parseFloat(value) : value;
11
- }
12
- return value.map(v => parseFloat(v));
13
- };
14
- class NumberFieldIndexImpl {
15
- fieldType = "number";
16
- unmappedType() {
17
- return "float";
18
- }
19
- toIndex({
20
- value
21
- }) {
22
- return {
23
- value: convertToString(value)
24
- };
25
- }
26
- fromIndex({
27
- value
28
- }) {
29
- return convertToFloat(value);
30
- }
31
- }
32
- export const NumberFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({
33
- implementation: NumberFieldIndexImpl,
34
- dependencies: []
35
- });
36
-
37
- //# sourceMappingURL=NumberFieldIndex.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["CmsEntryOpenSearchFieldIndex","convertToString","value","Array","isArray","map","String","convertToFloat","parseFloat","v","NumberFieldIndexImpl","fieldType","unmappedType","toIndex","fromIndex","NumberFieldIndex","createImplementation","implementation","dependencies"],"sources":["NumberFieldIndex.ts"],"sourcesContent":["import { CmsEntryOpenSearchFieldIndex } from \"../abstractions/CmsEntryOpenSearchFieldIndex.js\";\n\nconst convertToString = (value: number[] | number) => {\n if (Array.isArray(value) === false) {\n return value;\n }\n return (value as number[]).map(String);\n};\n\nconst convertToFloat = (value: string[] | number) => {\n if (Array.isArray(value) === false) {\n return typeof value === \"string\" ? parseFloat(value) : value;\n }\n return (value as string[]).map(v => parseFloat(v));\n};\n\nclass NumberFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {\n public readonly fieldType = \"number\";\n\n public unmappedType(): string {\n return \"float\";\n }\n\n public toIndex({\n value\n }: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue {\n return {\n value: convertToString(value)\n };\n }\n\n public fromIndex({ value }: CmsEntryOpenSearchFieldIndex.FromIndex): any {\n return convertToFloat(value);\n }\n}\n\nexport const NumberFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({\n implementation: NumberFieldIndexImpl,\n dependencies: []\n});\n"],"mappings":"AAAA,SAASA,4BAA4B;AAErC,MAAMC,eAAe,GAAIC,KAAwB,IAAK;EAClD,IAAIC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,KAAK,KAAK,EAAE;IAChC,OAAOA,KAAK;EAChB;EACA,OAAQA,KAAK,CAAcG,GAAG,CAACC,MAAM,CAAC;AAC1C,CAAC;AAED,MAAMC,cAAc,GAAIL,KAAwB,IAAK;EACjD,IAAIC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,KAAK,KAAK,EAAE;IAChC,OAAO,OAAOA,KAAK,KAAK,QAAQ,GAAGM,UAAU,CAACN,KAAK,CAAC,GAAGA,KAAK;EAChE;EACA,OAAQA,KAAK,CAAcG,GAAG,CAACI,CAAC,IAAID,UAAU,CAACC,CAAC,CAAC,CAAC;AACtD,CAAC;AAED,MAAMC,oBAAoB,CAAmD;EACzDC,SAAS,GAAG,QAAQ;EAE7BC,YAAYA,CAAA,EAAW;IAC1B,OAAO,OAAO;EAClB;EAEOC,OAAOA,CAAC;IACXX;EACkC,CAAC,EAAwC;IAC3E,OAAO;MACHA,KAAK,EAAED,eAAe,CAACC,KAAK;IAChC,CAAC;EACL;EAEOY,SAASA,CAAC;IAAEZ;EAA8C,CAAC,EAAO;IACrE,OAAOK,cAAc,CAACL,KAAK,CAAC;EAChC;AACJ;AAEA,OAAO,MAAMa,gBAAgB,GAAGf,4BAA4B,CAACgB,oBAAoB,CAAC;EAC9EC,cAAc,EAAEP,oBAAoB;EACpCQ,YAAY,EAAE;AAClB,CAAC,CAAC","ignoreList":[]}
@@ -1,10 +0,0 @@
1
- import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
2
- declare class ObjectFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {
3
- readonly fieldType = "object";
4
- toIndex({ fieldRegistry, model, field, value: initialValue, rawValue: initialRawValue, getFieldIndex }: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue;
5
- fromIndex({ field, value, rawValue, model, getFieldIndex, fieldRegistry }: CmsEntryOpenSearchFieldIndex.FromIndex): any;
6
- }
7
- export declare const ObjectFieldIndex: typeof ObjectFieldIndexImpl & {
8
- __abstraction: import("@webiny/di").Abstraction<import("../abstractions/CmsEntryOpenSearchFieldIndex.js").ICmsEntryOpenSearchFieldIndex>;
9
- };
10
- export {};
@@ -1,158 +0,0 @@
1
- import { getFieldIdentifiers } from "../../../helpers/index.js";
2
- import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
3
- const processToIndex = params => {
4
- const {
5
- fields,
6
- value: sourceValue,
7
- rawValue: sourceRawValue,
8
- getFieldIndex,
9
- fieldRegistry,
10
- model
11
- } = params;
12
- return fields.reduce((values, field) => {
13
- const plugin = getFieldIndex(field.type);
14
- const identifiers = getFieldIdentifiers(sourceValue, sourceRawValue, field);
15
- if (!identifiers) {
16
- return values;
17
- }
18
- const {
19
- value,
20
- rawValue
21
- } = plugin.toIndex({
22
- model,
23
- field,
24
- value: sourceValue[identifiers.valueIdentifier || identifiers.rawValueIdentifier],
25
- rawValue: sourceRawValue[identifiers.rawValueIdentifier || identifiers.valueIdentifier],
26
- getFieldIndex,
27
- fieldRegistry
28
- });
29
- if (value !== undefined) {
30
- values.value[identifiers.valueIdentifier || identifiers.rawValueIdentifier] = value;
31
- }
32
- if (rawValue !== undefined) {
33
- values.rawValue[identifiers.rawValueIdentifier || identifiers.valueIdentifier] = rawValue;
34
- }
35
- return values;
36
- }, {
37
- value: {},
38
- rawValue: {}
39
- });
40
- };
41
- const processFromIndex = params => {
42
- const {
43
- fields,
44
- value: sourceValue,
45
- rawValue: sourceRawValue,
46
- getFieldIndex,
47
- fieldRegistry,
48
- model
49
- } = params;
50
- return fields.reduce((values, field) => {
51
- const plugin = getFieldIndex(field.type);
52
- const identifiers = getFieldIdentifiers(sourceValue, sourceRawValue, field);
53
- if (!identifiers) {
54
- return values;
55
- }
56
- const value = plugin.fromIndex({
57
- fieldRegistry,
58
- model,
59
- field,
60
- value: sourceValue[identifiers.valueIdentifier || identifiers.rawValueIdentifier],
61
- rawValue: sourceRawValue ? sourceRawValue[identifiers.rawValueIdentifier || identifiers.valueIdentifier] : null,
62
- getFieldIndex
63
- });
64
- if (value !== undefined) {
65
- values[identifiers.valueIdentifier || identifiers.rawValueIdentifier] = value;
66
- }
67
- return values;
68
- }, {});
69
- };
70
- class ObjectFieldIndexImpl {
71
- fieldType = "object";
72
- toIndex({
73
- fieldRegistry,
74
- model,
75
- field,
76
- value: initialValue,
77
- rawValue: initialRawValue,
78
- getFieldIndex
79
- }) {
80
- if (!initialValue) {
81
- return {
82
- value: null
83
- };
84
- }
85
- const fields = field.settings?.fields || [];
86
- if (field.list) {
87
- const result = {
88
- value: [],
89
- rawValue: []
90
- };
91
- for (const key in initialValue) {
92
- const {
93
- value,
94
- rawValue
95
- } = processToIndex({
96
- value: initialValue[key],
97
- rawValue: initialRawValue[key],
98
- getFieldIndex,
99
- model,
100
- fieldRegistry,
101
- fields
102
- });
103
- result.value.push(value);
104
- result.rawValue.push(rawValue);
105
- }
106
- return {
107
- value: result.value.length > 0 ? result.value : undefined,
108
- rawValue: result.rawValue.length > 0 ? result.rawValue : undefined
109
- };
110
- }
111
- return processToIndex({
112
- value: initialValue,
113
- rawValue: initialRawValue,
114
- getFieldIndex,
115
- model,
116
- fieldRegistry,
117
- fields
118
- });
119
- }
120
- fromIndex({
121
- field,
122
- value,
123
- rawValue,
124
- model,
125
- getFieldIndex,
126
- fieldRegistry
127
- }) {
128
- if (!value) {
129
- return null;
130
- }
131
- const fields = field.settings?.fields || [];
132
- if (field.list) {
133
- const source = value || rawValue || [];
134
- return source.map((_, index) => processFromIndex({
135
- value: value ? value[index] || {} : {},
136
- rawValue: rawValue ? rawValue[index] || {} : {},
137
- getFieldIndex,
138
- model,
139
- fieldRegistry,
140
- fields
141
- }));
142
- }
143
- return processFromIndex({
144
- value,
145
- rawValue,
146
- getFieldIndex,
147
- model,
148
- fieldRegistry,
149
- fields
150
- });
151
- }
152
- }
153
- export const ObjectFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({
154
- implementation: ObjectFieldIndexImpl,
155
- dependencies: []
156
- });
157
-
158
- //# sourceMappingURL=ObjectFieldIndex.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["getFieldIdentifiers","CmsEntryOpenSearchFieldIndex","processToIndex","params","fields","value","sourceValue","rawValue","sourceRawValue","getFieldIndex","fieldRegistry","model","reduce","values","field","plugin","type","identifiers","toIndex","valueIdentifier","rawValueIdentifier","undefined","processFromIndex","fromIndex","ObjectFieldIndexImpl","fieldType","initialValue","initialRawValue","settings","list","result","key","push","length","source","map","_","index","ObjectFieldIndex","createImplementation","implementation","dependencies"],"sources":["ObjectFieldIndex.ts"],"sourcesContent":["import type { CmsModel, CmsModelField } from \"@webiny/api-headless-cms/types/index.js\";\nimport type { CmsModelFieldToGraphQLRegistry } from \"@webiny/api-headless-cms/exports/api/cms/graphql.js\";\nimport { getFieldIdentifiers } from \"~/helpers/index.js\";\nimport { CmsEntryOpenSearchFieldIndex } from \"../abstractions/CmsEntryOpenSearchFieldIndex.js\";\n\ninterface ProcessToIndexParams {\n fields: CmsModelField[];\n value: Record<string, any>;\n rawValue: Record<string, any>;\n getFieldIndex: (fieldType: string) => CmsEntryOpenSearchFieldIndex.Interface;\n fieldRegistry: CmsModelFieldToGraphQLRegistry.Interface;\n model: CmsModel;\n}\n\ninterface ReducerValue {\n value: Record<string, any>;\n rawValue: Record<string, any>;\n}\n\nconst processToIndex = (params: ProcessToIndexParams): ReducerValue => {\n const {\n fields,\n value: sourceValue,\n rawValue: sourceRawValue,\n getFieldIndex,\n fieldRegistry,\n model\n } = params;\n\n return fields.reduce<ReducerValue>(\n (values, field) => {\n const plugin = getFieldIndex(field.type);\n\n const identifiers = getFieldIdentifiers(sourceValue, sourceRawValue, field);\n if (!identifiers) {\n return values;\n }\n\n const { value, rawValue } = plugin.toIndex({\n model,\n field,\n value: sourceValue[identifiers.valueIdentifier || identifiers.rawValueIdentifier],\n rawValue:\n sourceRawValue[identifiers.rawValueIdentifier || identifiers.valueIdentifier],\n getFieldIndex,\n fieldRegistry\n });\n\n if (value !== undefined) {\n values.value[identifiers.valueIdentifier || identifiers.rawValueIdentifier] = value;\n }\n if (rawValue !== undefined) {\n values.rawValue[identifiers.rawValueIdentifier || identifiers.valueIdentifier] =\n rawValue;\n }\n\n return values;\n },\n { value: {}, rawValue: {} }\n );\n};\n\ninterface ProcessFromIndexParams {\n fields: CmsModelField[];\n value: Record<string, any>;\n rawValue?: Record<string, any> | null;\n getFieldIndex: (fieldType: string) => CmsEntryOpenSearchFieldIndex.Interface;\n fieldRegistry: CmsModelFieldToGraphQLRegistry.Interface;\n model: CmsModel;\n}\n\nconst processFromIndex = (params: ProcessFromIndexParams): Record<string, any> => {\n const {\n fields,\n value: sourceValue,\n rawValue: sourceRawValue,\n getFieldIndex,\n fieldRegistry,\n model\n } = params;\n\n return fields.reduce<Record<string, any>>((values, field) => {\n const plugin = getFieldIndex(field.type);\n\n const identifiers = getFieldIdentifiers(sourceValue, sourceRawValue, field);\n if (!identifiers) {\n return values;\n }\n\n const value = plugin.fromIndex({\n fieldRegistry,\n model,\n field,\n value: sourceValue[identifiers.valueIdentifier || identifiers.rawValueIdentifier],\n rawValue: sourceRawValue\n ? sourceRawValue[identifiers.rawValueIdentifier || identifiers.valueIdentifier]\n : null,\n getFieldIndex\n });\n\n if (value !== undefined) {\n values[identifiers.valueIdentifier || identifiers.rawValueIdentifier] = value;\n }\n\n return values;\n }, {});\n};\n\nclass ObjectFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {\n public readonly fieldType = \"object\";\n\n public toIndex({\n fieldRegistry,\n model,\n field,\n value: initialValue,\n rawValue: initialRawValue,\n getFieldIndex\n }: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue {\n if (!initialValue) {\n return { value: null };\n }\n\n const fields = (field.settings?.fields || []) as CmsModelField[];\n\n if (field.list) {\n const result: { value: Record<string, any>[]; rawValue: Record<string, any>[] } = {\n value: [],\n rawValue: []\n };\n for (const key in initialValue) {\n const { value, rawValue } = processToIndex({\n value: initialValue[key],\n rawValue: initialRawValue[key],\n getFieldIndex,\n model,\n fieldRegistry,\n fields\n });\n\n result.value.push(value);\n result.rawValue.push(rawValue);\n }\n\n return {\n value: result.value.length > 0 ? result.value : undefined,\n rawValue: result.rawValue.length > 0 ? result.rawValue : undefined\n };\n }\n\n return processToIndex({\n value: initialValue,\n rawValue: initialRawValue,\n getFieldIndex,\n model,\n fieldRegistry,\n fields\n });\n }\n\n public fromIndex({\n field,\n value,\n rawValue,\n model,\n getFieldIndex,\n fieldRegistry\n }: CmsEntryOpenSearchFieldIndex.FromIndex): any {\n if (!value) {\n return null;\n }\n\n const fields = field.settings?.fields || [];\n\n if (field.list) {\n const source = value || rawValue || [];\n\n return source.map((_: any, index: number) =>\n processFromIndex({\n value: value ? value[index] || {} : {},\n rawValue: rawValue ? rawValue[index] || {} : {},\n getFieldIndex,\n model,\n fieldRegistry,\n fields\n })\n );\n }\n\n return processFromIndex({\n value,\n rawValue,\n getFieldIndex,\n model,\n fieldRegistry,\n fields\n });\n }\n}\n\nexport const ObjectFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({\n implementation: ObjectFieldIndexImpl,\n dependencies: []\n});\n"],"mappings":"AAEA,SA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,MAAM,GAAG7B,KAAK,IAAIE,QAAQ,IAAI,EAAE;MAEtC,OAAO2B,MAAM,CAACC,GAAG,CAAC,CAACC,CAAM,EAAEC,KAAa,KACpCf,gBAAgB,CAAC;QACbjB,KAAK,EAAEA,KAAK,GAAGA,KAAK,CAACgC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACtC9B,QAAQ,EAAEA,QAAQ,GAAGA,QAAQ,CAAC8B,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QAC/C5B,aAAa;QACbE,KAAK;QACLD,aAAa;QACbN;MACJ,CAAC,CACL,CAAC;IACL;IAEA,OAAOkB,gBAAgB,CAAC;MACpBjB,KAAK;MACLE,QAAQ;MACRE,aAAa;MACbE,KAAK;MACLD,aAAa;MACbN;IACJ,CAAC,CAAC;EACN;AACJ;AAEA,OAAO,MAAMkC,gBAAgB,GAAGrC,4BAA4B,CAACsC,oBAAoB,CAAC;EAC9EC,cAAc,EAAEhB,oBAAoB;EACpCiB,YAAY,EAAE;AAClB,CAAC,CAAC","ignoreList":[]}
@@ -1,10 +0,0 @@
1
- import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
2
- declare class RichTextFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {
3
- readonly fieldType = "rich-text";
4
- toIndex({ value }: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue;
5
- fromIndex({ rawValue }: CmsEntryOpenSearchFieldIndex.FromIndex): any;
6
- }
7
- export declare const RichTextFieldIndex: typeof RichTextFieldIndexImpl & {
8
- __abstraction: import("@webiny/di").Abstraction<import("../abstractions/CmsEntryOpenSearchFieldIndex.js").ICmsEntryOpenSearchFieldIndex>;
9
- };
10
- export {};
@@ -1,22 +0,0 @@
1
- import { CmsEntryOpenSearchFieldIndex } from "../abstractions/CmsEntryOpenSearchFieldIndex.js";
2
- class RichTextFieldIndexImpl {
3
- fieldType = "rich-text";
4
- toIndex({
5
- value
6
- }) {
7
- return {
8
- rawValue: value
9
- };
10
- }
11
- fromIndex({
12
- rawValue
13
- }) {
14
- return rawValue;
15
- }
16
- }
17
- export const RichTextFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({
18
- implementation: RichTextFieldIndexImpl,
19
- dependencies: []
20
- });
21
-
22
- //# sourceMappingURL=RichTextFieldIndex.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["CmsEntryOpenSearchFieldIndex","RichTextFieldIndexImpl","fieldType","toIndex","value","rawValue","fromIndex","RichTextFieldIndex","createImplementation","implementation","dependencies"],"sources":["RichTextFieldIndex.ts"],"sourcesContent":["import { CmsEntryOpenSearchFieldIndex } from \"../abstractions/CmsEntryOpenSearchFieldIndex.js\";\n\nclass RichTextFieldIndexImpl implements CmsEntryOpenSearchFieldIndex.Interface {\n public readonly fieldType = \"rich-text\";\n\n public toIndex({\n value\n }: CmsEntryOpenSearchFieldIndex.ToIndex): CmsEntryOpenSearchFieldIndex.ToValue {\n return {\n rawValue: value\n };\n }\n\n public fromIndex({ rawValue }: CmsEntryOpenSearchFieldIndex.FromIndex): any {\n return rawValue;\n }\n}\n\nexport const RichTextFieldIndex = CmsEntryOpenSearchFieldIndex.createImplementation({\n implementation: RichTextFieldIndexImpl,\n dependencies: []\n});\n"],"mappings":"AAAA,SAASA,4BAA4B;AAErC,MAAMC,sBAAsB,CAAmD;EAC3DC,SAAS,GAAG,WAAW;EAEhCC,OAAOA,CAAC;IACXC;EACkC,CAAC,EAAwC;IAC3E,OAAO;MACHC,QAAQ,EAAED;IACd,CAAC;EACL;EAEOE,SAASA,CAAC;IAAED;EAAiD,CAAC,EAAO;IACxE,OAAOA,QAAQ;EACnB;AACJ;AAEA,OAAO,MAAME,kBAAkB,GAAGP,4BAA4B,CAACQ,oBAAoB,CAAC;EAChFC,cAAc,EAAER,sBAAsB;EACtCS,YAAY,EAAE;AAClB,CAAC,CAAC","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- export { CmsEntryOpenSearchFieldIndexFeature } from "../../features/CmsEntryOpenSearchFieldIndex/feature.js";
2
- export { CmsEntryOpenSearchFieldIndex } from "./abstractions/CmsEntryOpenSearchFieldIndex.js";
3
- export { CmsEntryOpenSearchFieldIndexRegistry } from "./abstractions/CmsEntryOpenSearchFieldIndexRegistry.js";
@@ -1,5 +0,0 @@
1
- export { CmsEntryOpenSearchFieldIndexFeature } from "./feature.js";
2
- export { CmsEntryOpenSearchFieldIndex } from "./abstractions/CmsEntryOpenSearchFieldIndex.js";
3
- export { CmsEntryOpenSearchFieldIndexRegistry } from "./abstractions/CmsEntryOpenSearchFieldIndexRegistry.js";
4
-
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["CmsEntryOpenSearchFieldIndexFeature","CmsEntryOpenSearchFieldIndex","CmsEntryOpenSearchFieldIndexRegistry"],"sources":["index.ts"],"sourcesContent":["export { CmsEntryOpenSearchFieldIndexFeature } from \"~/features/CmsEntryOpenSearchFieldIndex/feature.js\";\nexport { CmsEntryOpenSearchFieldIndex } from \"./abstractions/CmsEntryOpenSearchFieldIndex.js\";\nexport { CmsEntryOpenSearchFieldIndexRegistry } from \"./abstractions/CmsEntryOpenSearchFieldIndexRegistry.js\";\n"],"mappings":"AAAA,SAASA,mCAAmC;AAC5C,SAASC,4BAA4B;AACrC,SAASC,oCAAoC","ignoreList":[]}
@@ -1,11 +0,0 @@
1
- import { CmsEntryOpenSearchFilterRegistry as Abstraction } from "./abstractions/CmsEntryOpenSearchFilterRegistry.js";
2
- import { CmsEntryOpenSearchFilter } from "./abstractions/CmsEntryOpenSearchFilter.js";
3
- declare class CmsEntryOpenSearchFilterRegistryImpl implements Abstraction.Interface {
4
- private readonly filters;
5
- constructor(filters: CmsEntryOpenSearchFilter.Interface[]);
6
- get(type: string): CmsEntryOpenSearchFilter.Interface;
7
- }
8
- export declare const CmsEntryOpenSearchFilterRegistry: typeof CmsEntryOpenSearchFilterRegistryImpl & {
9
- __abstraction: import("@webiny/di").Abstraction<import("./abstractions/CmsEntryOpenSearchFilterRegistry.js").ICmsEntryOpenSearchFilterRegistry>;
10
- };
11
- export {};
@@ -1,38 +0,0 @@
1
- import WebinyError from "@webiny/error";
2
- import { CmsEntryOpenSearchFilterRegistry as Abstraction } from "./abstractions/CmsEntryOpenSearchFilterRegistry.js";
3
- import { CmsEntryOpenSearchFilter } from "./abstractions/CmsEntryOpenSearchFilter.js";
4
- import { getBaseFieldType } from "@webiny/api-headless-cms/utils/getBaseFieldType.js";
5
- import { FILTER_DEFAULT } from "./constants.js";
6
- class CmsEntryOpenSearchFilterRegistryImpl {
7
- constructor(filters) {
8
- this.filters = filters;
9
- }
10
- get(type) {
11
- const fieldType = getBaseFieldType({
12
- type
13
- });
14
- const filter = this.filters.find(f => {
15
- return f.fieldType === fieldType;
16
- });
17
- if (filter) {
18
- return filter;
19
- }
20
- const fallback = this.filters.find(f => {
21
- return f.fieldType === FILTER_DEFAULT;
22
- });
23
- if (fallback) {
24
- return fallback;
25
- }
26
- throw new WebinyError(`There is no filter for the given field type "${fieldType}".`, "FILTER_REGISTRY_ERROR", {
27
- fieldType
28
- });
29
- }
30
- }
31
- export const CmsEntryOpenSearchFilterRegistry = Abstraction.createImplementation({
32
- implementation: CmsEntryOpenSearchFilterRegistryImpl,
33
- dependencies: [[CmsEntryOpenSearchFilter, {
34
- multiple: true
35
- }]]
36
- });
37
-
38
- //# sourceMappingURL=CmsEntryOpenSearchFilterRegistry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["WebinyError","CmsEntryOpenSearchFilterRegistry","Abstraction","CmsEntryOpenSearchFilter","getBaseFieldType","FILTER_DEFAULT","CmsEntryOpenSearchFilterRegistryImpl","constructor","filters","get","type","fieldType","filter","find","f","fallback","createImplementation","implementation","dependencies","multiple"],"sources":["CmsEntryOpenSearchFilterRegistry.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport { CmsEntryOpenSearchFilterRegistry as Abstraction } from \"./abstractions/CmsEntryOpenSearchFilterRegistry.js\";\nimport { CmsEntryOpenSearchFilter } from \"./abstractions/CmsEntryOpenSearchFilter.js\";\nimport { getBaseFieldType } from \"@webiny/api-headless-cms/utils/getBaseFieldType.js\";\nimport { FILTER_DEFAULT } from \"./constants.js\";\n\nclass CmsEntryOpenSearchFilterRegistryImpl implements Abstraction.Interface {\n public constructor(private readonly filters: CmsEntryOpenSearchFilter.Interface[]) {}\n\n public get(type: string): CmsEntryOpenSearchFilter.Interface {\n const fieldType = getBaseFieldType({ type });\n const filter = this.filters.find(f => {\n return f.fieldType === fieldType;\n });\n if (filter) {\n return filter;\n }\n const fallback = this.filters.find(f => {\n return f.fieldType === FILTER_DEFAULT;\n });\n if (fallback) {\n return fallback;\n }\n throw new WebinyError(\n `There is no filter for the given field type \"${fieldType}\".`,\n \"FILTER_REGISTRY_ERROR\",\n {\n fieldType\n }\n );\n }\n}\n\nexport const CmsEntryOpenSearchFilterRegistry = Abstraction.createImplementation({\n implementation: CmsEntryOpenSearchFilterRegistryImpl,\n dependencies: [[CmsEntryOpenSearchFilter, { multiple: true }]]\n});\n"],"mappings":"AAAA,OAAOA,WAAW,MAAM,eAAe;AACvC,SAASC,gCAAgC,IAAIC,WAAW;AACxD,SAASC,wBAAwB;AACjC,SAASC,gBAAgB,QAAQ,oDAAoD;AACrF,SAASC,cAAc;AAEvB,MAAMC,oCAAoC,CAAkC;EACjEC,WAAWA,CAAkBC,OAA6C,EAAE;IAAA,KAA/CA,OAA6C,GAA7CA,OAA6C;EAAG;EAE7EC,GAAGA,CAACC,IAAY,EAAsC;IACzD,MAAMC,SAAS,GAAGP,gBAAgB,CAAC;MAAEM;IAAK,CAAC,CAAC;IAC5C,MAAME,MAAM,GAAG,IAAI,CAACJ,OAAO,CAACK,IAAI,CAACC,CAAC,IAAI;MAClC,OAAOA,CAAC,CAACH,SAAS,KAAKA,SAAS;IACpC,CAAC,CAAC;IACF,IAAIC,MAAM,EAAE;MACR,OAAOA,MAAM;IACjB;IACA,MAAMG,QAAQ,GAAG,IAAI,CAACP,OAAO,CAACK,IAAI,CAACC,CAAC,IAAI;MACpC,OAAOA,CAAC,CAACH,SAAS,KAAKN,cAAc;IACzC,CAAC,CAAC;IACF,IAAIU,QAAQ,EAAE;MACV,OAAOA,QAAQ;IACnB;IACA,MAAM,IAAIf,WAAW,CACjB,gDAAgDW,SAAS,IAAI,EAC7D,uBAAuB,EACvB;MACIA;IACJ,CACJ,CAAC;EACL;AACJ;AAEA,OAAO,MAAMV,gCAAgC,GAAGC,WAAW,CAACc,oBAAoB,CAAC;EAC7EC,cAAc,EAAEX,oCAAoC;EACpDY,YAAY,EAAE,CAAC,CAACf,wBAAwB,EAAE;IAAEgB,QAAQ,EAAE;EAAK,CAAC,CAAC;AACjE,CAAC,CAAC","ignoreList":[]}
@@ -1,37 +0,0 @@
1
- import type { ModelField, ModelFields } from "../../../operations/entry/elasticsearch/types.js";
2
- import type { OpenSearchBoolQueryConfig } from "@webiny/api-opensearch/types.js";
3
- interface ApplyParams {
4
- key: string;
5
- value: any;
6
- query: OpenSearchBoolQueryConfig;
7
- operator: string;
8
- field: ModelField;
9
- }
10
- export interface ApplyFilteringCb {
11
- (params: ApplyParams): void;
12
- }
13
- export interface GetFilterCb {
14
- (type: string): CmsEntryOpenSearchFilter.Interface;
15
- }
16
- export interface IExecParams {
17
- applyFiltering: ApplyFilteringCb;
18
- getFilter: GetFilterCb;
19
- key: string;
20
- value: any;
21
- operator: string;
22
- field: ModelField;
23
- fields: ModelFields;
24
- query: OpenSearchBoolQueryConfig;
25
- }
26
- export interface ICmsEntryOpenSearchFilter {
27
- readonly fieldType: string;
28
- exec(params: IExecParams): void;
29
- }
30
- export declare const CmsEntryOpenSearchFilter: import("@webiny/di").Abstraction<ICmsEntryOpenSearchFilter>;
31
- export declare namespace CmsEntryOpenSearchFilter {
32
- type Interface = ICmsEntryOpenSearchFilter;
33
- type ExecParams = IExecParams;
34
- type ApplyFiltering = ApplyFilteringCb;
35
- type GetFilter = GetFilterCb;
36
- }
37
- export {};
@@ -1,4 +0,0 @@
1
- import { createAbstraction } from "@webiny/feature/api";
2
- export const CmsEntryOpenSearchFilter = createAbstraction("Cms/Entry/OpenSearch/Filter");
3
-
4
- //# sourceMappingURL=CmsEntryOpenSearchFilter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["createAbstraction","CmsEntryOpenSearchFilter"],"sources":["CmsEntryOpenSearchFilter.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { ModelField, ModelFields } from \"~/operations/entry/elasticsearch/types.js\";\nimport type { OpenSearchBoolQueryConfig } from \"@webiny/api-opensearch/types.js\";\n\ninterface ApplyParams {\n key: string;\n value: any;\n query: OpenSearchBoolQueryConfig;\n operator: string;\n field: ModelField;\n}\n\nexport interface ApplyFilteringCb {\n (params: ApplyParams): void;\n}\n\nexport interface GetFilterCb {\n (type: string): CmsEntryOpenSearchFilter.Interface;\n}\n\nexport interface IExecParams {\n applyFiltering: ApplyFilteringCb;\n getFilter: GetFilterCb;\n key: string;\n value: any;\n operator: string;\n field: ModelField;\n fields: ModelFields;\n query: OpenSearchBoolQueryConfig;\n}\n\nexport interface ICmsEntryOpenSearchFilter {\n readonly fieldType: string;\n exec(params: IExecParams): void;\n}\n\nexport const CmsEntryOpenSearchFilter = createAbstraction<ICmsEntryOpenSearchFilter>(\n \"Cms/Entry/OpenSearch/Filter\"\n);\n\nexport namespace CmsEntryOpenSearchFilter {\n export type Interface = ICmsEntryOpenSearchFilter;\n export type ExecParams = IExecParams;\n export type ApplyFiltering = ApplyFilteringCb;\n export type GetFilter = GetFilterCb;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AAoCvD,OAAO,MAAMC,wBAAwB,GAAGD,iBAAiB,CACrD,6BACJ,CAAC","ignoreList":[]}
@@ -1,9 +0,0 @@
1
- import type { CmsEntryOpenSearchFilter } from "./CmsEntryOpenSearchFilter.js";
2
- export interface ICmsEntryOpenSearchFilterRegistry {
3
- get(fieldType: string): CmsEntryOpenSearchFilter.Interface;
4
- }
5
- export declare const CmsEntryOpenSearchFilterRegistry: import("@webiny/di").Abstraction<ICmsEntryOpenSearchFilterRegistry>;
6
- export declare namespace CmsEntryOpenSearchFilterRegistry {
7
- type Interface = ICmsEntryOpenSearchFilterRegistry;
8
- type Filter = CmsEntryOpenSearchFilter.Interface;
9
- }
@@ -1,4 +0,0 @@
1
- import { createAbstraction } from "@webiny/feature/api";
2
- export const CmsEntryOpenSearchFilterRegistry = createAbstraction("Cms/Entry/OpenSearch/FilterRegistry");
3
-
4
- //# sourceMappingURL=CmsEntryOpenSearchFilterRegistry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["createAbstraction","CmsEntryOpenSearchFilterRegistry"],"sources":["CmsEntryOpenSearchFilterRegistry.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { CmsEntryOpenSearchFilter } from \"./CmsEntryOpenSearchFilter.js\";\n\nexport interface ICmsEntryOpenSearchFilterRegistry {\n get(fieldType: string): CmsEntryOpenSearchFilter.Interface;\n}\n\nexport const CmsEntryOpenSearchFilterRegistry =\n createAbstraction<ICmsEntryOpenSearchFilterRegistry>(\"Cms/Entry/OpenSearch/FilterRegistry\");\n\nexport namespace CmsEntryOpenSearchFilterRegistry {\n export type Interface = ICmsEntryOpenSearchFilterRegistry;\n export type Filter = CmsEntryOpenSearchFilter.Interface;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AAOvD,OAAO,MAAMC,gCAAgC,GACzCD,iBAAiB,CAAoC,qCAAqC,CAAC","ignoreList":[]}
@@ -1 +0,0 @@
1
- export declare const FILTER_DEFAULT: "*";
@@ -1,3 +0,0 @@
1
- export const FILTER_DEFAULT = "*";
2
-
3
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["FILTER_DEFAULT"],"sources":["constants.ts"],"sourcesContent":["export const FILTER_DEFAULT = \"*\" as const;\n"],"mappings":"AAAA,OAAO,MAAMA,cAAc,GAAG,GAAY","ignoreList":[]}
@@ -1,16 +0,0 @@
1
- import { createFeature } from "@webiny/feature/api";
2
- import { DefaultFilter } from "./fields/DefaultFilter.js";
3
- import { RefFilter } from "./fields/RefFilter.js";
4
- import { ObjectFilter } from "./fields/ObjectFilter.js";
5
- import { CmsEntryOpenSearchFilterRegistry } from "./CmsEntryOpenSearchFilterRegistry.js";
6
- export const CmsEntryOpenSearchFilterFeature = createFeature({
7
- name: "Cms/Entry/OpenSearch/FilterFeature",
8
- register: container => {
9
- container.register(DefaultFilter);
10
- container.register(RefFilter);
11
- container.register(ObjectFilter);
12
- container.register(CmsEntryOpenSearchFilterRegistry);
13
- }
14
- });
15
-
16
- //# sourceMappingURL=feature.js.map