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

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 (431) hide show
  1. package/README.md +6 -30
  2. package/configurations.d.ts +7 -7
  3. package/configurations.js +16 -26
  4. package/configurations.js.map +1 -1
  5. package/definitions/entry.d.ts +4 -6
  6. package/definitions/entry.js +5 -174
  7. package/definitions/entry.js.map +1 -1
  8. package/definitions/group.d.ts +6 -7
  9. package/definitions/group.js +5 -58
  10. package/definitions/group.js.map +1 -1
  11. package/definitions/model.d.ts +6 -7
  12. package/definitions/model.js +5 -102
  13. package/definitions/model.js.map +1 -1
  14. package/definitions/types.d.ts +61 -0
  15. package/definitions/types.js +3 -0
  16. package/definitions/types.js.map +1 -0
  17. package/elasticsearch/createElasticsearchIndex.d.ts +4 -4
  18. package/elasticsearch/createElasticsearchIndex.js +61 -27
  19. package/elasticsearch/createElasticsearchIndex.js.map +1 -1
  20. package/elasticsearch/deleteElasticsearchIndex.d.ts +2 -2
  21. package/elasticsearch/deleteElasticsearchIndex.js +3 -10
  22. package/elasticsearch/deleteElasticsearchIndex.js.map +1 -1
  23. package/exports/api/cms/opensearch.d.ts +9 -0
  24. package/exports/api/cms/opensearch.js +11 -0
  25. package/exports/api/cms/opensearch.js.map +1 -0
  26. package/feature.d.ts +1 -0
  27. package/feature.js +188 -0
  28. package/feature.js.map +1 -0
  29. package/features/CmsEntryOpenSearchBodyModifier/abstractions.d.ts +16 -0
  30. package/features/CmsEntryOpenSearchBodyModifier/abstractions.js +4 -0
  31. package/features/CmsEntryOpenSearchBodyModifier/abstractions.js.map +1 -0
  32. package/features/CmsEntryOpenSearchBodyModifier/index.d.ts +1 -0
  33. package/features/CmsEntryOpenSearchBodyModifier/index.js +3 -0
  34. package/features/CmsEntryOpenSearchBodyModifier/index.js.map +1 -0
  35. package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.d.ts +13 -0
  36. package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.js +36 -0
  37. package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.js.map +1 -0
  38. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.d.ts +35 -0
  39. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.js +4 -0
  40. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.js.map +1 -0
  41. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.d.ts +11 -0
  42. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.js +4 -0
  43. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.js.map +1 -0
  44. package/features/CmsEntryOpenSearchFieldIndex/constants.d.ts +1 -0
  45. package/features/CmsEntryOpenSearchFieldIndex/constants.js +3 -0
  46. package/features/CmsEntryOpenSearchFieldIndex/constants.js.map +1 -0
  47. package/features/CmsEntryOpenSearchFieldIndex/feature.d.ts +4 -0
  48. package/features/CmsEntryOpenSearchFieldIndex/feature.js +24 -0
  49. package/features/CmsEntryOpenSearchFieldIndex/feature.js.map +1 -0
  50. package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.d.ts +11 -0
  51. package/{elasticsearch/indexing/dateTimeIndexing.js → features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.js} +21 -32
  52. package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.js.map +1 -0
  53. package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.d.ts +10 -0
  54. package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.js +39 -0
  55. package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.js.map +1 -0
  56. package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.d.ts +10 -0
  57. package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.js +22 -0
  58. package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.js.map +1 -0
  59. package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.d.ts +10 -0
  60. package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.js +25 -0
  61. package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.js.map +1 -0
  62. package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.d.ts +11 -0
  63. package/{elasticsearch/indexing/numberIndexing.js → features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.js} +11 -15
  64. package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.js.map +1 -0
  65. package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.d.ts +10 -0
  66. package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.js +158 -0
  67. package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.js.map +1 -0
  68. package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.d.ts +10 -0
  69. package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.js +22 -0
  70. package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.js.map +1 -0
  71. package/features/CmsEntryOpenSearchFieldIndex/index.d.ts +3 -0
  72. package/features/CmsEntryOpenSearchFieldIndex/index.js +5 -0
  73. package/features/CmsEntryOpenSearchFieldIndex/index.js.map +1 -0
  74. package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.d.ts +11 -0
  75. package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.js +38 -0
  76. package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.js.map +1 -0
  77. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.d.ts +37 -0
  78. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.js +4 -0
  79. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.js.map +1 -0
  80. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.d.ts +9 -0
  81. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.js +4 -0
  82. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.js.map +1 -0
  83. package/features/CmsEntryOpenSearchFilter/constants.d.ts +1 -0
  84. package/features/CmsEntryOpenSearchFilter/constants.js +3 -0
  85. package/features/CmsEntryOpenSearchFilter/constants.js.map +1 -0
  86. package/features/CmsEntryOpenSearchFilter/feature.d.ts +4 -0
  87. package/features/CmsEntryOpenSearchFilter/feature.js +16 -0
  88. package/features/CmsEntryOpenSearchFilter/feature.js.map +1 -0
  89. package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.d.ts +9 -0
  90. package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.js +23 -0
  91. package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.js.map +1 -0
  92. package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.d.ts +9 -0
  93. package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.js +61 -0
  94. package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.js.map +1 -0
  95. package/features/CmsEntryOpenSearchFilter/fields/RefFilter.d.ts +9 -0
  96. package/features/CmsEntryOpenSearchFilter/fields/RefFilter.js +49 -0
  97. package/features/CmsEntryOpenSearchFilter/fields/RefFilter.js.map +1 -0
  98. package/features/CmsEntryOpenSearchFilter/index.d.ts +3 -0
  99. package/features/CmsEntryOpenSearchFilter/index.js +5 -0
  100. package/features/CmsEntryOpenSearchFilter/index.js.map +1 -0
  101. package/features/CmsEntryOpenSearchFullTextSearch/abstractions.d.ts +20 -0
  102. package/features/CmsEntryOpenSearchFullTextSearch/abstractions.js +4 -0
  103. package/features/CmsEntryOpenSearchFullTextSearch/abstractions.js.map +1 -0
  104. package/features/CmsEntryOpenSearchFullTextSearch/index.d.ts +1 -0
  105. package/features/CmsEntryOpenSearchFullTextSearch/index.js +3 -0
  106. package/features/CmsEntryOpenSearchFullTextSearch/index.js.map +1 -0
  107. package/features/CmsEntryOpenSearchIndex/BaseOpenSearchIndex.d.ts +11 -0
  108. package/features/CmsEntryOpenSearchIndex/BaseOpenSearchIndex.js +16 -0
  109. package/features/CmsEntryOpenSearchIndex/BaseOpenSearchIndex.js.map +1 -0
  110. package/features/CmsEntryOpenSearchIndex/abstractions.d.ts +14 -0
  111. package/features/CmsEntryOpenSearchIndex/abstractions.js +4 -0
  112. package/features/CmsEntryOpenSearchIndex/abstractions.js.map +1 -0
  113. package/features/CmsEntryOpenSearchIndex/feature.d.ts +4 -0
  114. package/features/CmsEntryOpenSearchIndex/feature.js +10 -0
  115. package/features/CmsEntryOpenSearchIndex/feature.js.map +1 -0
  116. package/features/CmsEntryOpenSearchIndex/index.d.ts +3 -0
  117. package/features/CmsEntryOpenSearchIndex/index.js +5 -0
  118. package/features/CmsEntryOpenSearchIndex/index.js.map +1 -0
  119. package/features/CmsEntryOpenSearchQueryModifier/abstractions.d.ts +16 -0
  120. package/features/CmsEntryOpenSearchQueryModifier/abstractions.js +4 -0
  121. package/features/CmsEntryOpenSearchQueryModifier/abstractions.js.map +1 -0
  122. package/features/CmsEntryOpenSearchQueryModifier/index.d.ts +1 -0
  123. package/features/CmsEntryOpenSearchQueryModifier/index.js +3 -0
  124. package/features/CmsEntryOpenSearchQueryModifier/index.js.map +1 -0
  125. package/features/CmsEntryOpenSearchSortModifier/abstractions.d.ts +15 -0
  126. package/features/CmsEntryOpenSearchSortModifier/abstractions.js +4 -0
  127. package/features/CmsEntryOpenSearchSortModifier/abstractions.js.map +1 -0
  128. package/features/CmsEntryOpenSearchSortModifier/index.d.ts +1 -0
  129. package/features/CmsEntryOpenSearchSortModifier/index.js +3 -0
  130. package/features/CmsEntryOpenSearchSortModifier/index.js.map +1 -0
  131. package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.d.ts +12 -0
  132. package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.js +27 -0
  133. package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.js.map +1 -0
  134. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.d.ts +22 -0
  135. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.js +4 -0
  136. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.js.map +1 -0
  137. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.d.ts +10 -0
  138. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.js +4 -0
  139. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.js.map +1 -0
  140. package/features/CmsEntryOpenSearchValueSearch/feature.d.ts +4 -0
  141. package/features/CmsEntryOpenSearchValueSearch/feature.js +16 -0
  142. package/features/CmsEntryOpenSearchValueSearch/feature.js.map +1 -0
  143. package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.d.ts +10 -0
  144. package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.js +23 -0
  145. package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.js.map +1 -0
  146. package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.d.ts +10 -0
  147. package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.js +55 -0
  148. package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.js.map +1 -0
  149. package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.d.ts +10 -0
  150. package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.js +24 -0
  151. package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.js.map +1 -0
  152. package/features/CmsEntryOpenSearchValueSearch/index.d.ts +3 -0
  153. package/features/CmsEntryOpenSearchValueSearch/index.js +5 -0
  154. package/features/CmsEntryOpenSearchValueSearch/index.js.map +1 -0
  155. package/features/CmsEntryOpenSearchValuesModifier/abstractions.d.ts +23 -0
  156. package/features/CmsEntryOpenSearchValuesModifier/abstractions.js +4 -0
  157. package/features/CmsEntryOpenSearchValuesModifier/abstractions.js.map +1 -0
  158. package/features/CmsEntryOpenSearchValuesModifier/index.d.ts +1 -0
  159. package/features/CmsEntryOpenSearchValuesModifier/index.js +3 -0
  160. package/features/CmsEntryOpenSearchValuesModifier/index.js.map +1 -0
  161. package/helpers/entryIndexHelpers.d.ts +13 -11
  162. package/helpers/entryIndexHelpers.js +38 -94
  163. package/helpers/entryIndexHelpers.js.map +1 -1
  164. package/helpers/fieldIdentifier.d.ts +1 -1
  165. package/helpers/fieldIdentifier.js +2 -10
  166. package/helpers/fieldIdentifier.js.map +1 -1
  167. package/helpers/index.d.ts +2 -2
  168. package/helpers/index.js +2 -27
  169. package/helpers/index.js.map +1 -1
  170. package/index.d.ts +1 -3
  171. package/index.js +1 -223
  172. package/index.js.map +1 -1
  173. package/operations/entry/dataLoader/DataLoaderCache.d.ts +1 -2
  174. package/operations/entry/dataLoader/DataLoaderCache.js +3 -13
  175. package/operations/entry/dataLoader/DataLoaderCache.js.map +1 -1
  176. package/operations/entry/dataLoader/constants.js +1 -7
  177. package/operations/entry/dataLoader/constants.js.map +1 -1
  178. package/operations/entry/dataLoader/createBatchScheduleFn.js +4 -10
  179. package/operations/entry/dataLoader/createBatchScheduleFn.js.map +1 -1
  180. package/operations/entry/dataLoader/getAllEntryRevisions.d.ts +3 -3
  181. package/operations/entry/dataLoader/getAllEntryRevisions.js +16 -26
  182. package/operations/entry/dataLoader/getAllEntryRevisions.js.map +1 -1
  183. package/operations/entry/dataLoader/getLatestRevisionByEntryId.d.ts +3 -3
  184. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js +23 -31
  185. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js.map +1 -1
  186. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.d.ts +3 -3
  187. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js +23 -31
  188. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js.map +1 -1
  189. package/operations/entry/dataLoader/getRevisionById.d.ts +3 -3
  190. package/operations/entry/dataLoader/getRevisionById.js +26 -34
  191. package/operations/entry/dataLoader/getRevisionById.js.map +1 -1
  192. package/operations/entry/dataLoader/index.d.ts +3 -3
  193. package/operations/entry/dataLoader/index.js +10 -31
  194. package/operations/entry/dataLoader/index.js.map +1 -1
  195. package/operations/entry/dataLoader/types.d.ts +4 -4
  196. package/operations/entry/dataLoader/types.js +1 -5
  197. package/operations/entry/dataLoader/types.js.map +1 -1
  198. package/operations/entry/dataLoaders.d.ts +13 -13
  199. package/operations/entry/dataLoaders.js +16 -24
  200. package/operations/entry/dataLoaders.js.map +1 -1
  201. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.d.ts +1 -1
  202. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js +1 -8
  203. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js.map +1 -1
  204. package/operations/entry/elasticsearch/body.d.ts +20 -4
  205. package/operations/entry/elasticsearch/body.js +49 -53
  206. package/operations/entry/elasticsearch/body.js.map +1 -1
  207. package/operations/entry/elasticsearch/fields/createSystemField.d.ts +4 -0
  208. package/operations/entry/elasticsearch/fields/createSystemField.js +10 -0
  209. package/operations/entry/elasticsearch/fields/createSystemField.js.map +1 -0
  210. package/operations/entry/elasticsearch/fields/live.d.ts +2 -0
  211. package/operations/entry/elasticsearch/fields/live.js +45 -0
  212. package/operations/entry/elasticsearch/fields/live.js.map +1 -0
  213. package/operations/entry/elasticsearch/fields/location.d.ts +2 -0
  214. package/operations/entry/elasticsearch/fields/location.js +45 -0
  215. package/operations/entry/elasticsearch/fields/location.js.map +1 -0
  216. package/operations/entry/elasticsearch/fields/state.d.ts +2 -0
  217. package/operations/entry/elasticsearch/fields/state.js +93 -0
  218. package/operations/entry/elasticsearch/fields/state.js.map +1 -0
  219. package/operations/entry/elasticsearch/fields.d.ts +8 -6
  220. package/operations/entry/elasticsearch/fields.js +38 -122
  221. package/operations/entry/elasticsearch/fields.js.map +1 -1
  222. package/operations/entry/elasticsearch/filtering/applyFiltering.d.ts +6 -5
  223. package/operations/entry/elasticsearch/filtering/applyFiltering.js +13 -20
  224. package/operations/entry/elasticsearch/filtering/applyFiltering.js.map +1 -1
  225. package/operations/entry/elasticsearch/filtering/exec.d.ts +11 -6
  226. package/operations/entry/elasticsearch/filtering/exec.js +47 -97
  227. package/operations/entry/elasticsearch/filtering/exec.js.map +1 -1
  228. package/operations/entry/elasticsearch/filtering/index.d.ts +1 -1
  229. package/operations/entry/elasticsearch/filtering/index.js +1 -16
  230. package/operations/entry/elasticsearch/filtering/index.js.map +1 -1
  231. package/operations/entry/elasticsearch/filtering/path.d.ts +5 -3
  232. package/operations/entry/elasticsearch/filtering/path.js +10 -20
  233. package/operations/entry/elasticsearch/filtering/path.js.map +1 -1
  234. package/operations/entry/elasticsearch/filtering/populated.d.ts +2 -2
  235. package/operations/entry/elasticsearch/filtering/populated.js +1 -8
  236. package/operations/entry/elasticsearch/filtering/populated.js.map +1 -1
  237. package/operations/entry/elasticsearch/filtering/values.d.ts +1 -1
  238. package/operations/entry/elasticsearch/filtering/values.js +4 -12
  239. package/operations/entry/elasticsearch/filtering/values.js.map +1 -1
  240. package/operations/entry/elasticsearch/fullTextSearch.d.ts +7 -6
  241. package/operations/entry/elasticsearch/fullTextSearch.js +39 -42
  242. package/operations/entry/elasticsearch/fullTextSearch.js.map +1 -1
  243. package/operations/entry/elasticsearch/fullTextSearchFields.d.ts +4 -4
  244. package/operations/entry/elasticsearch/fullTextSearchFields.js +11 -18
  245. package/operations/entry/elasticsearch/fullTextSearchFields.js.map +1 -1
  246. package/operations/entry/elasticsearch/initialQuery.d.ts +4 -4
  247. package/operations/entry/elasticsearch/initialQuery.js +9 -27
  248. package/operations/entry/elasticsearch/initialQuery.js.map +1 -1
  249. package/operations/entry/elasticsearch/keyword.d.ts +1 -1
  250. package/operations/entry/elasticsearch/keyword.js +4 -9
  251. package/operations/entry/elasticsearch/keyword.js.map +1 -1
  252. package/operations/entry/elasticsearch/plugins/operator.d.ts +2 -3
  253. package/operations/entry/elasticsearch/plugins/operator.js +4 -19
  254. package/operations/entry/elasticsearch/plugins/operator.js.map +1 -1
  255. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js +2 -9
  256. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js.map +1 -1
  257. package/operations/entry/elasticsearch/sort.d.ts +6 -6
  258. package/operations/entry/elasticsearch/sort.js +52 -36
  259. package/operations/entry/elasticsearch/sort.js.map +1 -1
  260. package/operations/entry/elasticsearch/transformValueForSearch.d.ts +3 -10
  261. package/operations/entry/elasticsearch/transformValueForSearch.js +5 -20
  262. package/operations/entry/elasticsearch/transformValueForSearch.js.map +1 -1
  263. package/operations/entry/elasticsearch/types.d.ts +4 -11
  264. package/operations/entry/elasticsearch/types.js +1 -5
  265. package/operations/entry/elasticsearch/types.js.map +1 -1
  266. package/operations/entry/index.d.ts +26 -5
  267. package/operations/entry/index.js +421 -541
  268. package/operations/entry/index.js.map +1 -1
  269. package/operations/entry/keys.d.ts +31 -1
  270. package/operations/entry/keys.js +56 -19
  271. package/operations/entry/keys.js.map +1 -1
  272. package/operations/entry/recordType.js +3 -12
  273. package/operations/entry/recordType.js.map +1 -1
  274. package/operations/entry/transformations/convertEntryKeys.d.ts +6 -6
  275. package/operations/entry/transformations/convertEntryKeys.js +2 -10
  276. package/operations/entry/transformations/convertEntryKeys.js.map +1 -1
  277. package/operations/entry/transformations/index.d.ts +24 -18
  278. package/operations/entry/transformations/index.js +31 -37
  279. package/operations/entry/transformations/index.js.map +1 -1
  280. package/operations/entry/transformations/modifyEntryValues.d.ts +30 -35
  281. package/operations/entry/transformations/modifyEntryValues.js +4 -11
  282. package/operations/entry/transformations/modifyEntryValues.js.map +1 -1
  283. package/operations/entry/transformations/transformEntryKeys.d.ts +8 -8
  284. package/operations/entry/transformations/transformEntryKeys.js +4 -11
  285. package/operations/entry/transformations/transformEntryKeys.js.map +1 -1
  286. package/operations/entry/transformations/transformEntryToIndex.d.ts +10 -8
  287. package/operations/entry/transformations/transformEntryToIndex.js +9 -14
  288. package/operations/entry/transformations/transformEntryToIndex.js.map +1 -1
  289. package/operations/group/index.d.ts +7 -6
  290. package/operations/group/index.js +41 -78
  291. package/operations/group/index.js.map +1 -1
  292. package/operations/model/index.d.ts +4 -4
  293. package/operations/model/index.js +38 -58
  294. package/operations/model/index.js.map +1 -1
  295. package/package.json +32 -34
  296. package/tasks/createIndexTaskPlugin.d.ts +2 -2
  297. package/tasks/createIndexTaskPlugin.js +41 -60
  298. package/tasks/createIndexTaskPlugin.js.map +1 -1
  299. package/types.d.ts +26 -134
  300. package/types.js +2 -28
  301. package/types.js.map +1 -1
  302. package/values/NoValueContainer.d.ts +5 -0
  303. package/values/NoValueContainer.js +13 -0
  304. package/values/NoValueContainer.js.map +1 -0
  305. package/definitions/entryElasticsearch.d.ts +0 -9
  306. package/definitions/entryElasticsearch.js +0 -41
  307. package/definitions/entryElasticsearch.js.map +0 -1
  308. package/definitions/system.d.ts +0 -9
  309. package/definitions/system.js +0 -42
  310. package/definitions/system.js.map +0 -1
  311. package/definitions/table.d.ts +0 -8
  312. package/definitions/table.js +0 -25
  313. package/definitions/table.js.map +0 -1
  314. package/definitions/tableElasticsearch.d.ts +0 -8
  315. package/definitions/tableElasticsearch.js +0 -25
  316. package/definitions/tableElasticsearch.js.map +0 -1
  317. package/dynamoDb/index.d.ts +0 -3
  318. package/dynamoDb/index.js +0 -16
  319. package/dynamoDb/index.js.map +0 -1
  320. package/dynamoDb/storage/longText.d.ts +0 -10
  321. package/dynamoDb/storage/longText.js +0 -96
  322. package/dynamoDb/storage/longText.js.map +0 -1
  323. package/dynamoDb/storage/richText.d.ts +0 -2
  324. package/dynamoDb/storage/richText.js +0 -59
  325. package/dynamoDb/storage/richText.js.map +0 -1
  326. package/elasticsearch/index.d.ts +0 -2
  327. package/elasticsearch/index.js +0 -13
  328. package/elasticsearch/index.js.map +0 -1
  329. package/elasticsearch/indexing/dateTimeIndexing.d.ts +0 -3
  330. package/elasticsearch/indexing/dateTimeIndexing.js.map +0 -1
  331. package/elasticsearch/indexing/defaultFieldIndexing.d.ts +0 -3
  332. package/elasticsearch/indexing/defaultFieldIndexing.js +0 -54
  333. package/elasticsearch/indexing/defaultFieldIndexing.js.map +0 -1
  334. package/elasticsearch/indexing/index.d.ts +0 -2
  335. package/elasticsearch/indexing/index.js +0 -18
  336. package/elasticsearch/indexing/index.js.map +0 -1
  337. package/elasticsearch/indexing/jsonIndexing.d.ts +0 -2
  338. package/elasticsearch/indexing/jsonIndexing.js +0 -28
  339. package/elasticsearch/indexing/jsonIndexing.js.map +0 -1
  340. package/elasticsearch/indexing/longTextIndexing.d.ts +0 -7
  341. package/elasticsearch/indexing/longTextIndexing.js +0 -42
  342. package/elasticsearch/indexing/longTextIndexing.js.map +0 -1
  343. package/elasticsearch/indexing/numberIndexing.d.ts +0 -3
  344. package/elasticsearch/indexing/numberIndexing.js.map +0 -1
  345. package/elasticsearch/indexing/objectIndexing.d.ts +0 -12
  346. package/elasticsearch/indexing/objectIndexing.js +0 -201
  347. package/elasticsearch/indexing/objectIndexing.js.map +0 -1
  348. package/elasticsearch/indexing/richTextIndexing.d.ts +0 -3
  349. package/elasticsearch/indexing/richTextIndexing.js +0 -31
  350. package/elasticsearch/indexing/richTextIndexing.js.map +0 -1
  351. package/elasticsearch/indices/base.d.ts +0 -2
  352. package/elasticsearch/indices/base.js +0 -13
  353. package/elasticsearch/indices/base.js.map +0 -1
  354. package/elasticsearch/indices/index.d.ts +0 -1
  355. package/elasticsearch/indices/index.js +0 -14
  356. package/elasticsearch/indices/index.js.map +0 -1
  357. package/elasticsearch/indices/japanese.d.ts +0 -2
  358. package/elasticsearch/indices/japanese.js +0 -14
  359. package/elasticsearch/indices/japanese.js.map +0 -1
  360. package/elasticsearch/search/index.d.ts +0 -3
  361. package/elasticsearch/search/index.js +0 -12
  362. package/elasticsearch/search/index.js.map +0 -1
  363. package/elasticsearch/search/refSearch.d.ts +0 -2
  364. package/elasticsearch/search/refSearch.js +0 -31
  365. package/elasticsearch/search/refSearch.js.map +0 -1
  366. package/elasticsearch/search/timeSearch.d.ts +0 -2
  367. package/elasticsearch/search/timeSearch.js +0 -27
  368. package/elasticsearch/search/timeSearch.js.map +0 -1
  369. package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.d.ts +0 -2
  370. package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js +0 -30
  371. package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js.map +0 -1
  372. package/operations/entry/elasticsearch/filtering/plugins/index.d.ts +0 -1
  373. package/operations/entry/elasticsearch/filtering/plugins/index.js +0 -15
  374. package/operations/entry/elasticsearch/filtering/plugins/index.js.map +0 -1
  375. package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.d.ts +0 -2
  376. package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js +0 -69
  377. package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js.map +0 -1
  378. package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.d.ts +0 -2
  379. package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js +0 -57
  380. package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js.map +0 -1
  381. package/operations/entry/elasticsearch/logIgnoredEsResponseError.d.ts +0 -9
  382. package/operations/entry/elasticsearch/logIgnoredEsResponseError.js +0 -26
  383. package/operations/entry/elasticsearch/logIgnoredEsResponseError.js.map +0 -1
  384. package/operations/entry/elasticsearch/plugins/bodyModifier.d.ts +0 -9
  385. package/operations/entry/elasticsearch/plugins/bodyModifier.js +0 -18
  386. package/operations/entry/elasticsearch/plugins/bodyModifier.js.map +0 -1
  387. package/operations/entry/elasticsearch/plugins/queryModifier.d.ts +0 -9
  388. package/operations/entry/elasticsearch/plugins/queryModifier.js +0 -18
  389. package/operations/entry/elasticsearch/plugins/queryModifier.js.map +0 -1
  390. package/operations/entry/elasticsearch/plugins/search.d.ts +0 -7
  391. package/operations/entry/elasticsearch/plugins/search.js +0 -26
  392. package/operations/entry/elasticsearch/plugins/search.js.map +0 -1
  393. package/operations/entry/elasticsearch/plugins/sortModifier.d.ts +0 -9
  394. package/operations/entry/elasticsearch/plugins/sortModifier.js +0 -18
  395. package/operations/entry/elasticsearch/plugins/sortModifier.js.map +0 -1
  396. package/operations/system/index.d.ts +0 -6
  397. package/operations/system/index.js +0 -94
  398. package/operations/system/index.js.map +0 -1
  399. package/operations/system/indexes.d.ts +0 -10
  400. package/operations/system/indexes.js +0 -41
  401. package/operations/system/indexes.js.map +0 -1
  402. package/plugins/CmsElasticsearchModelFieldPlugin.d.ts +0 -69
  403. package/plugins/CmsElasticsearchModelFieldPlugin.js +0 -52
  404. package/plugins/CmsElasticsearchModelFieldPlugin.js.map +0 -1
  405. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.d.ts +0 -22
  406. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js +0 -21
  407. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js.map +0 -1
  408. package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.d.ts +0 -23
  409. package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js +0 -27
  410. package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js.map +0 -1
  411. package/plugins/CmsEntryElasticsearchIndexPlugin.d.ts +0 -4
  412. package/plugins/CmsEntryElasticsearchIndexPlugin.js +0 -13
  413. package/plugins/CmsEntryElasticsearchIndexPlugin.js.map +0 -1
  414. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.d.ts +0 -31
  415. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js +0 -40
  416. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js.map +0 -1
  417. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.d.ts +0 -19
  418. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js +0 -21
  419. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js.map +0 -1
  420. package/plugins/CmsEntryElasticsearchSortModifierPlugin.d.ts +0 -19
  421. package/plugins/CmsEntryElasticsearchSortModifierPlugin.js +0 -21
  422. package/plugins/CmsEntryElasticsearchSortModifierPlugin.js.map +0 -1
  423. package/plugins/CmsEntryElasticsearchValuesModifier.d.ts +0 -33
  424. package/plugins/CmsEntryElasticsearchValuesModifier.js +0 -50
  425. package/plugins/CmsEntryElasticsearchValuesModifier.js.map +0 -1
  426. package/plugins/CmsEntryFilterPlugin.d.ts +0 -49
  427. package/plugins/CmsEntryFilterPlugin.js +0 -22
  428. package/plugins/CmsEntryFilterPlugin.js.map +0 -1
  429. package/plugins/index.d.ts +0 -8
  430. package/plugins/index.js +0 -95
  431. package/plugins/index.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"names":["_toolbox","require","createEntryElasticsearchEntity","params","table","entityName","attributes","Entity","name","PK","type","partitionKey","SK","sortKey","index","data","TYPE","exports"],"sources":["entryElasticsearch.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\nexport interface CreateEntryElasticsearchEntityParams {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\nexport const createEntryElasticsearchEntity = (\n params: CreateEntryElasticsearchEntityParams\n): Entity<any> => {\n const { table, entityName, attributes } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n type: \"string\",\n partitionKey: true\n },\n SK: {\n type: \"string\",\n sortKey: true\n },\n index: {\n type: \"string\"\n },\n data: {\n type: \"map\"\n },\n TYPE: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAQO,MAAMC,8BAA8B,GACvCC,MAA4C,IAC9B;EACd,MAAM;IAAEC,KAAK;IAAEC,UAAU;IAAEC;EAAW,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEH,UAAU;IAChBD,KAAK;IACLE,UAAU,EAAE;MACRG,EAAE,EAAE;QACAC,IAAI,EAAE,QAAQ;QACdC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAF,IAAI,EAAE,QAAQ;QACdG,OAAO,EAAE;MACb,CAAC;MACDC,KAAK,EAAE;QACHJ,IAAI,EAAE;MACV,CAAC;MACDK,IAAI,EAAE;QACFL,IAAI,EAAE;MACV,CAAC;MACDM,IAAI,EAAE;QACFN,IAAI,EAAE;MACV,CAAC;MACD,IAAIJ,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACW,OAAA,CAAAf,8BAAA,GAAAA,8BAAA","ignoreList":[]}
@@ -1,9 +0,0 @@
1
- import type { Table } from "@webiny/db-dynamodb/toolbox";
2
- import { Entity } from "@webiny/db-dynamodb/toolbox";
3
- import type { Attributes } from "../types";
4
- export interface CreateSystemEntityParams {
5
- table: Table<string, string, string>;
6
- entityName: string;
7
- attributes: Attributes;
8
- }
9
- export declare const createSystemEntity: (params: CreateSystemEntityParams) => Entity<any>;
@@ -1,42 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createSystemEntity = void 0;
7
- var _toolbox = require("@webiny/db-dynamodb/toolbox");
8
- const createSystemEntity = params => {
9
- const {
10
- entityName,
11
- attributes,
12
- table
13
- } = params;
14
- return new _toolbox.Entity({
15
- name: entityName,
16
- table,
17
- attributes: {
18
- PK: {
19
- partitionKey: true
20
- },
21
- SK: {
22
- sortKey: true
23
- },
24
- version: {
25
- type: "string"
26
- },
27
- locale: {
28
- type: "string"
29
- },
30
- tenant: {
31
- type: "string"
32
- },
33
- readAPIKey: {
34
- type: "string"
35
- },
36
- ...(attributes || {})
37
- }
38
- });
39
- };
40
- exports.createSystemEntity = createSystemEntity;
41
-
42
- //# sourceMappingURL=system.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_toolbox","require","createSystemEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","version","type","locale","tenant","readAPIKey","exports"],"sources":["system.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\nexport interface CreateSystemEntityParams {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createSystemEntity = (params: CreateSystemEntityParams): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n version: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n readAPIKey: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,kBAAkB,GAAIC,MAAgC,IAAkB;EACjF,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,OAAO,EAAE;QACLC,IAAI,EAAE;MACV,CAAC;MACDC,MAAM,EAAE;QACJD,IAAI,EAAE;MACV,CAAC;MACDE,MAAM,EAAE;QACJF,IAAI,EAAE;MACV,CAAC;MACDG,UAAU,EAAE;QACRH,IAAI,EAAE;MACV,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACa,OAAA,CAAAhB,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -1,8 +0,0 @@
1
- import type { TableModifier } from "../types";
2
- import type { DynamoDBDocument } from "@webiny/aws-sdk/client-dynamodb";
3
- import { Table } from "@webiny/db-dynamodb/toolbox";
4
- export interface CreateTableParams {
5
- table?: TableModifier;
6
- documentClient: DynamoDBDocument;
7
- }
8
- export declare const createTable: ({ table, documentClient }: CreateTableParams) => Table<string, string, string>;
@@ -1,25 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createTable = void 0;
7
- var _toolbox = require("@webiny/db-dynamodb/toolbox");
8
- const createTable = ({
9
- table,
10
- documentClient
11
- }) => {
12
- const tableConfig = {
13
- name: process.env.DB_TABLE_HEADLESS_CMS || process.env.DB_TABLE,
14
- partitionKey: "PK",
15
- sortKey: "SK",
16
- DocumentClient: documentClient,
17
- autoExecute: true,
18
- autoParse: true
19
- };
20
- const config = typeof table === "function" ? table(tableConfig) : tableConfig;
21
- return new _toolbox.Table(config);
22
- };
23
- exports.createTable = createTable;
24
-
25
- //# sourceMappingURL=table.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_toolbox","require","createTable","table","documentClient","tableConfig","name","process","env","DB_TABLE_HEADLESS_CMS","DB_TABLE","partitionKey","sortKey","DocumentClient","autoExecute","autoParse","config","Table","exports"],"sources":["table.ts"],"sourcesContent":["import type { TableModifier } from \"~/types\";\nimport type { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb\";\nimport type { TableConstructor } from \"@webiny/db-dynamodb/toolbox\";\nimport { Table } from \"@webiny/db-dynamodb/toolbox\";\n\nexport interface CreateTableParams {\n table?: TableModifier;\n documentClient: DynamoDBDocument;\n}\nexport const createTable = ({\n table,\n documentClient\n}: CreateTableParams): Table<string, string, string> => {\n const tableConfig: TableConstructor<string, string, string> = {\n name: process.env.DB_TABLE_HEADLESS_CMS || (process.env.DB_TABLE as string),\n partitionKey: \"PK\",\n sortKey: \"SK\",\n DocumentClient: documentClient,\n autoExecute: true,\n autoParse: true\n };\n\n const config = typeof table === \"function\" ? table(tableConfig) : tableConfig;\n\n return new Table(config);\n};\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAMO,MAAMC,WAAW,GAAGA,CAAC;EACxBC,KAAK;EACLC;AACe,CAAC,KAAoC;EACpD,MAAMC,WAAqD,GAAG;IAC1DC,IAAI,EAAEC,OAAO,CAACC,GAAG,CAACC,qBAAqB,IAAKF,OAAO,CAACC,GAAG,CAACE,QAAmB;IAC3EC,YAAY,EAAE,IAAI;IAClBC,OAAO,EAAE,IAAI;IACbC,cAAc,EAAET,cAAc;IAC9BU,WAAW,EAAE,IAAI;IACjBC,SAAS,EAAE;EACf,CAAC;EAED,MAAMC,MAAM,GAAG,OAAOb,KAAK,KAAK,UAAU,GAAGA,KAAK,CAACE,WAAW,CAAC,GAAGA,WAAW;EAE7E,OAAO,IAAIY,cAAK,CAACD,MAAM,CAAC;AAC5B,CAAC;AAACE,OAAA,CAAAhB,WAAA,GAAAA,WAAA","ignoreList":[]}
@@ -1,8 +0,0 @@
1
- import type { TableModifier } from "../types";
2
- import type { DynamoDBDocument } from "@webiny/aws-sdk/client-dynamodb";
3
- import { Table } from "@webiny/db-dynamodb/toolbox";
4
- export interface CreateElasticsearchTableParams {
5
- table?: TableModifier;
6
- documentClient: DynamoDBDocument;
7
- }
8
- export declare const createElasticsearchTable: ({ table, documentClient }: CreateElasticsearchTableParams) => Table<string, string, string>;
@@ -1,25 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createElasticsearchTable = void 0;
7
- var _toolbox = require("@webiny/db-dynamodb/toolbox");
8
- const createElasticsearchTable = ({
9
- table,
10
- documentClient
11
- }) => {
12
- const tableConfig = {
13
- name: process.env.DB_TABLE_ELASTICSEARCH,
14
- partitionKey: "PK",
15
- sortKey: "SK",
16
- DocumentClient: documentClient,
17
- autoExecute: true,
18
- autoParse: true
19
- };
20
- const config = typeof table === "function" ? table(tableConfig) : tableConfig;
21
- return new _toolbox.Table(config);
22
- };
23
- exports.createElasticsearchTable = createElasticsearchTable;
24
-
25
- //# sourceMappingURL=tableElasticsearch.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_toolbox","require","createElasticsearchTable","table","documentClient","tableConfig","name","process","env","DB_TABLE_ELASTICSEARCH","partitionKey","sortKey","DocumentClient","autoExecute","autoParse","config","Table","exports"],"sources":["tableElasticsearch.ts"],"sourcesContent":["import type { TableModifier } from \"~/types\";\nimport type { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb\";\nimport { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport type { TableConstructor } from \"@webiny/db-dynamodb/toolbox\";\n\nexport interface CreateElasticsearchTableParams {\n table?: TableModifier;\n documentClient: DynamoDBDocument;\n}\nexport const createElasticsearchTable = ({\n table,\n documentClient\n}: CreateElasticsearchTableParams): Table<string, string, string> => {\n const tableConfig: TableConstructor<string, string, string> = {\n name: process.env.DB_TABLE_ELASTICSEARCH as string,\n partitionKey: \"PK\",\n sortKey: \"SK\",\n DocumentClient: documentClient,\n autoExecute: true,\n autoParse: true\n };\n\n const config = typeof table === \"function\" ? table(tableConfig) : tableConfig;\n\n return new Table(config);\n};\n"],"mappings":";;;;;;AAEA,IAAAA,QAAA,GAAAC,OAAA;AAOO,MAAMC,wBAAwB,GAAGA,CAAC;EACrCC,KAAK;EACLC;AAC4B,CAAC,KAAoC;EACjE,MAAMC,WAAqD,GAAG;IAC1DC,IAAI,EAAEC,OAAO,CAACC,GAAG,CAACC,sBAAgC;IAClDC,YAAY,EAAE,IAAI;IAClBC,OAAO,EAAE,IAAI;IACbC,cAAc,EAAER,cAAc;IAC9BS,WAAW,EAAE,IAAI;IACjBC,SAAS,EAAE;EACf,CAAC;EAED,MAAMC,MAAM,GAAG,OAAOZ,KAAK,KAAK,UAAU,GAAGA,KAAK,CAACE,WAAW,CAAC,GAAGA,WAAW;EAE7E,OAAO,IAAIW,cAAK,CAACD,MAAM,CAAC;AAC5B,CAAC;AAACE,OAAA,CAAAf,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- declare const _default: () => import("@webiny/api-headless-cms").StorageTransformPlugin<any, any, import("@webiny/api-headless-cms/types").CmsModelField>[];
2
- export default _default;
3
- export declare const createDynamoDbPlugins: () => import("@webiny/api-headless-cms").StorageTransformPlugin<any, any, import("@webiny/api-headless-cms/types").CmsModelField>[];
package/dynamoDb/index.js DELETED
@@ -1,16 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.createDynamoDbPlugins = void 0;
7
- var _richText = require("./storage/richText");
8
- var _longText = require("./storage/longText");
9
- var _default = () => createDynamoDbPlugins();
10
- exports.default = _default;
11
- const createDynamoDbPlugins = () => {
12
- return [(0, _richText.createRichTextStorageTransformPlugin)(), (0, _longText.createLongTextStorageTransformPlugin)()];
13
- };
14
- exports.createDynamoDbPlugins = createDynamoDbPlugins;
15
-
16
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_richText","require","_longText","_default","createDynamoDbPlugins","exports","default","createRichTextStorageTransformPlugin","createLongTextStorageTransformPlugin"],"sources":["index.ts"],"sourcesContent":["import { createRichTextStorageTransformPlugin } from \"./storage/richText\";\nimport { createLongTextStorageTransformPlugin } from \"./storage/longText\";\n\nexport default () => createDynamoDbPlugins();\n\nexport const createDynamoDbPlugins = () => {\n return [createRichTextStorageTransformPlugin(), createLongTextStorageTransformPlugin()];\n};\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAA0E,IAAAE,QAAA,GAE3DA,CAAA,KAAMC,qBAAqB,CAAC,CAAC;AAAAC,OAAA,CAAAC,OAAA,GAAAH,QAAA;AAErC,MAAMC,qBAAqB,GAAGA,CAAA,KAAM;EACvC,OAAO,CAAC,IAAAG,8CAAoC,EAAC,CAAC,EAAE,IAAAC,8CAAoC,EAAC,CAAC,CAAC;AAC3F,CAAC;AAACH,OAAA,CAAAD,qBAAA,GAAAA,qBAAA","ignoreList":[]}
@@ -1,10 +0,0 @@
1
- /**
2
- * File is @internal
3
- */
4
- import { StorageTransformPlugin } from "@webiny/api-headless-cms";
5
- export interface StorageValue {
6
- compression: string;
7
- value: string;
8
- isArray?: boolean;
9
- }
10
- export declare const createLongTextStorageTransformPlugin: () => StorageTransformPlugin<string | string[], StorageValue, import("@webiny/api-headless-cms/types").CmsModelField>;
@@ -1,96 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.createLongTextStorageTransformPlugin = void 0;
8
- var _error = _interopRequireDefault(require("@webiny/error"));
9
- var _gzip = require("@webiny/utils/compression/gzip");
10
- var _apiHeadlessCms = require("@webiny/api-headless-cms");
11
- /**
12
- * File is @internal
13
- */
14
-
15
- const GZIP = "gzip";
16
- const TO_STORAGE_ENCODING = "base64";
17
- const FROM_STORAGE_ENCODING = "utf8";
18
- const convertToBuffer = value => {
19
- if (typeof value === "string") {
20
- return Buffer.from(value, TO_STORAGE_ENCODING);
21
- }
22
- return value;
23
- };
24
- const createLongTextStorageTransformPlugin = () => {
25
- const plugin = new _apiHeadlessCms.StorageTransformPlugin({
26
- name: "headless-cms.storage-transform.long-text.default",
27
- fieldType: "long-text",
28
- fromStorage: async ({
29
- field,
30
- value: storageValue
31
- }) => {
32
- const typeOf = typeof storageValue;
33
- if (!storageValue || typeOf === "string" || typeOf === "number" || Array.isArray(storageValue) === true) {
34
- return storageValue;
35
- } else if (typeOf !== "object") {
36
- throw new _error.default(`LongText value received in "fromStorage" function is not an object in field "${field.storageId}" - ${field.fieldId}.`);
37
- }
38
- const {
39
- compression,
40
- value,
41
- isArray
42
- } = storageValue;
43
- /**
44
- * Check if possibly undefined, null, empty...
45
- */
46
- if (!compression) {
47
- throw new _error.default(`Missing compression in "fromStorage" function in field "${field.storageId}" - ${field.fieldId}.": ${JSON.stringify(storageValue)}.`, "MISSING_COMPRESSION", {
48
- value: storageValue
49
- });
50
- } else if (compression !== GZIP) {
51
- throw new _error.default(`This plugin cannot transform something not compressed with "GZIP".`, "WRONG_COMPRESSION", {
52
- compression
53
- });
54
- }
55
- try {
56
- const buf = await (0, _gzip.decompress)(convertToBuffer(value));
57
- const result = buf.toString(FROM_STORAGE_ENCODING);
58
- if (!isArray) {
59
- return result;
60
- }
61
- return JSON.parse(result);
62
- } catch (ex) {
63
- console.log("Error while transforming long-text.");
64
- console.log(ex.message);
65
- return "";
66
- }
67
- },
68
- toStorage: async ({
69
- value: initialValue
70
- }) => {
71
- /**
72
- * There is a possibility that we are trying to compress already compressed value.
73
- */
74
- if (initialValue && initialValue.hasOwnProperty("compression") === true) {
75
- return initialValue;
76
- }
77
- const isArray = Array.isArray(initialValue);
78
- const value = isArray ? JSON.stringify(initialValue) : initialValue;
79
- const compressedValue = await (0, _gzip.compress)(value);
80
- const result = {
81
- compression: GZIP,
82
- value: compressedValue.toString(TO_STORAGE_ENCODING)
83
- };
84
- if (!isArray) {
85
- return result;
86
- }
87
- result.isArray = isArray;
88
- return result;
89
- }
90
- });
91
- plugin.name = plugin.name = `headless-cms.dynamodb.storageTransform.long-text`;
92
- return plugin;
93
- };
94
- exports.createLongTextStorageTransformPlugin = createLongTextStorageTransformPlugin;
95
-
96
- //# sourceMappingURL=longText.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_error","_interopRequireDefault","require","_gzip","_apiHeadlessCms","GZIP","TO_STORAGE_ENCODING","FROM_STORAGE_ENCODING","convertToBuffer","value","Buffer","from","createLongTextStorageTransformPlugin","plugin","StorageTransformPlugin","name","fieldType","fromStorage","field","storageValue","typeOf","Array","isArray","WebinyError","storageId","fieldId","compression","JSON","stringify","buf","ungzip","result","toString","parse","ex","console","log","message","toStorage","initialValue","hasOwnProperty","compressedValue","gzip","exports"],"sources":["longText.ts"],"sourcesContent":["/**\n * File is @internal\n */\n\nimport WebinyError from \"@webiny/error\";\nimport { compress as gzip, decompress as ungzip } from \"@webiny/utils/compression/gzip\";\nimport { StorageTransformPlugin } from \"@webiny/api-headless-cms\";\n\nconst GZIP = \"gzip\";\nconst TO_STORAGE_ENCODING = \"base64\";\nconst FROM_STORAGE_ENCODING = \"utf8\";\n\nconst convertToBuffer = (value: string | Buffer): Buffer => {\n if (typeof value === \"string\") {\n return Buffer.from(value, TO_STORAGE_ENCODING);\n }\n return value;\n};\n\nexport interface StorageValue {\n compression: string;\n value: string;\n isArray?: boolean;\n}\n\nexport const createLongTextStorageTransformPlugin = () => {\n const plugin = new StorageTransformPlugin<string | string[], StorageValue>({\n name: \"headless-cms.storage-transform.long-text.default\",\n fieldType: \"long-text\",\n fromStorage: async ({ field, value: storageValue }) => {\n const typeOf = typeof storageValue;\n if (\n !storageValue ||\n typeOf === \"string\" ||\n typeOf === \"number\" ||\n Array.isArray(storageValue) === true\n ) {\n return storageValue as unknown as string | string[];\n } else if (typeOf !== \"object\") {\n throw new WebinyError(\n `LongText value received in \"fromStorage\" function is not an object in field \"${field.storageId}\" - ${field.fieldId}.`\n );\n }\n const { compression, value, isArray } = storageValue;\n /**\n * Check if possibly undefined, null, empty...\n */\n if (!compression) {\n throw new WebinyError(\n `Missing compression in \"fromStorage\" function in field \"${\n field.storageId\n }\" - ${field.fieldId}.\": ${JSON.stringify(storageValue)}.`,\n \"MISSING_COMPRESSION\",\n {\n value: storageValue\n }\n );\n } else if (compression !== GZIP) {\n throw new WebinyError(\n `This plugin cannot transform something not compressed with \"GZIP\".`,\n \"WRONG_COMPRESSION\",\n {\n compression\n }\n );\n }\n try {\n const buf = await ungzip(convertToBuffer(value));\n const result = buf.toString(FROM_STORAGE_ENCODING);\n if (!isArray) {\n return result;\n }\n return JSON.parse(result);\n } catch (ex) {\n console.log(\"Error while transforming long-text.\");\n console.log(ex.message);\n return \"\";\n }\n },\n toStorage: async ({ value: initialValue }) => {\n /**\n * There is a possibility that we are trying to compress already compressed value.\n */\n if (initialValue && initialValue.hasOwnProperty(\"compression\") === true) {\n return initialValue as unknown as StorageValue;\n }\n const isArray = Array.isArray(initialValue);\n const value = isArray ? JSON.stringify(initialValue) : initialValue;\n const compressedValue = await gzip(value);\n\n const result: StorageValue = {\n compression: GZIP,\n value: compressedValue.toString(TO_STORAGE_ENCODING)\n };\n if (!isArray) {\n return result;\n }\n result.isArray = isArray;\n return result;\n }\n });\n plugin.name = plugin.name = `headless-cms.dynamodb.storageTransform.long-text`;\n\n return plugin;\n};\n"],"mappings":"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","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import { StorageTransformPlugin } from "@webiny/api-headless-cms";
2
- export declare const createRichTextStorageTransformPlugin: () => StorageTransformPlugin<any, any, import("@webiny/api-headless-cms/types").CmsModelField>;
@@ -1,59 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.createRichTextStorageTransformPlugin = void 0;
8
- var _error = _interopRequireDefault(require("@webiny/error"));
9
- var _apiHeadlessCms = require("@webiny/api-headless-cms");
10
- var _api = require("@webiny/api");
11
- const createRichTextStorageTransformPlugin = () => {
12
- const plugin = new _apiHeadlessCms.StorageTransformPlugin({
13
- name: "headless-cms.storage-transform.rich-text.default",
14
- fieldType: "rich-text",
15
- fromStorage: async ({
16
- field,
17
- value: storageValue,
18
- plugins
19
- }) => {
20
- if (!storageValue) {
21
- return storageValue;
22
- } else if (typeof storageValue !== "object") {
23
- throw new _error.default(`RichText value received in "fromStorage" function is not an object in field "${field.storageId}" - ${field.fieldId}.`);
24
- }
25
- let compressor;
26
- try {
27
- compressor = plugins.oneByType(_api.CompressorPlugin.type);
28
- } catch (ex) {
29
- return storageValue;
30
- }
31
- try {
32
- return await compressor.getCompressor().decompress(storageValue);
33
- } catch {
34
- return storageValue;
35
- }
36
- },
37
- toStorage: async ({
38
- value,
39
- plugins
40
- }) => {
41
- let compressor;
42
- try {
43
- compressor = plugins.oneByType(_api.CompressorPlugin.type);
44
- } catch (ex) {
45
- return value;
46
- }
47
- try {
48
- return await compressor.getCompressor().compress(value);
49
- } catch {
50
- return value;
51
- }
52
- }
53
- });
54
- plugin.name = `headless-cms.dynamodb.storageTransform.rich-text`;
55
- return plugin;
56
- };
57
- exports.createRichTextStorageTransformPlugin = createRichTextStorageTransformPlugin;
58
-
59
- //# sourceMappingURL=richText.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_error","_interopRequireDefault","require","_apiHeadlessCms","_api","createRichTextStorageTransformPlugin","plugin","StorageTransformPlugin","name","fieldType","fromStorage","field","value","storageValue","plugins","WebinyError","storageId","fieldId","compressor","oneByType","CompressorPlugin","type","ex","getCompressor","decompress","toStorage","compress","exports"],"sources":["richText.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport { StorageTransformPlugin } from \"@webiny/api-headless-cms\";\nimport { CompressorPlugin } from \"@webiny/api\";\n\nexport const createRichTextStorageTransformPlugin = () => {\n const plugin = new StorageTransformPlugin({\n name: \"headless-cms.storage-transform.rich-text.default\",\n fieldType: \"rich-text\",\n fromStorage: async ({ field, value: storageValue, plugins }) => {\n if (!storageValue) {\n return storageValue;\n } else if (typeof storageValue !== \"object\") {\n throw new WebinyError(\n `RichText value received in \"fromStorage\" function is not an object in field \"${field.storageId}\" - ${field.fieldId}.`\n );\n }\n\n let compressor: CompressorPlugin;\n\n try {\n compressor = plugins.oneByType<CompressorPlugin>(CompressorPlugin.type);\n } catch (ex) {\n return storageValue;\n }\n\n try {\n return await compressor.getCompressor().decompress(storageValue);\n } catch {\n return storageValue;\n }\n },\n toStorage: async ({ value, plugins }) => {\n let compressor: CompressorPlugin;\n\n try {\n compressor = plugins.oneByType<CompressorPlugin>(CompressorPlugin.type);\n } catch (ex) {\n return value;\n }\n try {\n return await compressor.getCompressor().compress(value);\n } catch {\n return value;\n }\n }\n });\n plugin.name = `headless-cms.dynamodb.storageTransform.rich-text`;\n\n return plugin;\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,IAAA,GAAAF,OAAA;AAEO,MAAMG,oCAAoC,GAAGA,CAAA,KAAM;EACtD,MAAMC,MAAM,GAAG,IAAIC,sCAAsB,CAAC;IACtCC,IAAI,EAAE,kDAAkD;IACxDC,SAAS,EAAE,WAAW;IACtBC,WAAW,EAAE,MAAAA,CAAO;MAAEC,KAAK;MAAEC,KAAK,EAAEC,YAAY;MAAEC;IAAQ,CAAC,KAAK;MAC5D,IAAI,CAACD,YAAY,EAAE;QACf,OAAOA,YAAY;MACvB,CAAC,MAAM,IAAI,OAAOA,YAAY,KAAK,QAAQ,EAAE;QACzC,MAAM,IAAIE,cAAW,CACjB,gFAAgFJ,KAAK,CAACK,SAAS,OAAOL,KAAK,CAACM,OAAO,GACvH,CAAC;MACL;MAEA,IAAIC,UAA4B;MAEhC,IAAI;QACAA,UAAU,GAAGJ,OAAO,CAACK,SAAS,CAAmBC,qBAAgB,CAACC,IAAI,CAAC;MAC3E,CAAC,CAAC,OAAOC,EAAE,EAAE;QACT,OAAOT,YAAY;MACvB;MAEA,IAAI;QACA,OAAO,MAAMK,UAAU,CAACK,aAAa,CAAC,CAAC,CAACC,UAAU,CAACX,YAAY,CAAC;MACpE,CAAC,CAAC,MAAM;QACJ,OAAOA,YAAY;MACvB;IACJ,CAAC;IACDY,SAAS,EAAE,MAAAA,CAAO;MAAEb,KAAK;MAAEE;IAAQ,CAAC,KAAK;MACrC,IAAII,UAA4B;MAEhC,IAAI;QACAA,UAAU,GAAGJ,OAAO,CAACK,SAAS,CAAmBC,qBAAgB,CAACC,IAAI,CAAC;MAC3E,CAAC,CAAC,OAAOC,EAAE,EAAE;QACT,OAAOV,KAAK;MAChB;MACA,IAAI;QACA,OAAO,MAAMM,UAAU,CAACK,aAAa,CAAC,CAAC,CAACG,QAAQ,CAACd,KAAK,CAAC;MAC3D,CAAC,CAAC,MAAM;QACJ,OAAOA,KAAK;MAChB;IACJ;EACJ,CAAC,CAAC;EACFN,MAAM,CAACE,IAAI,GAAG,kDAAkD;EAEhE,OAAOF,MAAM;AACjB,CAAC;AAACqB,OAAA,CAAAtB,oCAAA,GAAAA,oCAAA","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- declare const _default: () => (import("../types").CmsModelFieldToElasticsearchPlugin[] | import("..").CmsEntryElasticsearchQueryBuilderValueSearchPlugin[])[];
2
- export default _default;
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _indexing = _interopRequireDefault(require("./indexing"));
9
- var _search = _interopRequireDefault(require("./search"));
10
- var _default = () => [(0, _indexing.default)(), (0, _search.default)()];
11
- exports.default = _default;
12
-
13
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_indexing","_interopRequireDefault","require","_search","_default","elasticsearchIndexingPlugins","elasticsearchSearchPlugins","exports","default"],"sources":["index.ts"],"sourcesContent":["import elasticsearchIndexingPlugins from \"./indexing\";\nimport elasticsearchSearchPlugins from \"./search\";\n\nexport default () => [elasticsearchIndexingPlugins(), elasticsearchSearchPlugins()];\n"],"mappings":";;;;;;;AAAA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAkD,IAAAE,QAAA,GAEnCA,CAAA,KAAM,CAAC,IAAAC,iBAA4B,EAAC,CAAC,EAAE,IAAAC,eAA0B,EAAC,CAAC,CAAC;AAAAC,OAAA,CAAAC,OAAA,GAAAJ,QAAA","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- import type { CmsModelFieldToElasticsearchPlugin } from "../../types";
2
- declare const _default: () => CmsModelFieldToElasticsearchPlugin;
3
- export default _default;
@@ -1 +0,0 @@
1
- {"version":3,"names":["convertTimeToNumber","time","hours","minutes","seconds","split","map","Number","convertNumberToTime","value","undefined","String","match","Math","floor","v","padStart","join","convertValueFromIndex","field","type","settings","dateValue","Date","toISOString","slice","convertValueToIndex","_default","name","fieldType","unmappedType","toIndex","Array","isArray","fromIndex","exports","default"],"sources":["dateTimeIndexing.ts"],"sourcesContent":["import type { CmsModelDateTimeField } from \"@webiny/api-headless-cms/types\";\nimport type { CmsModelFieldToElasticsearchPlugin } from \"~/types\";\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 // TODO remove when v5 goes out\n // this is a fix for pre beta.5\n if (String(value).match(/^([0-9]{2}):([0-9]{2})/) !== null) {\n return String(value);\n }\n //\n const hours = Math.floor(value / 60 / 60);\n\n const minutes = Math.floor((value - hours * 60 * 60) / 60);\n\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 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\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\nexport default (): CmsModelFieldToElasticsearchPlugin => ({\n type: \"cms-model-field-to-elastic-search\",\n name: \"cms-model-field-to-elastic-search-datetime\",\n fieldType: \"datetime\",\n unmappedType: () => {\n return \"date\";\n },\n toIndex({ field, value }) {\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 const dateValue = convertValueToIndex(value, field as CmsModelDateTimeField);\n return {\n value: dateValue\n };\n },\n fromIndex({ field, value }) {\n if (Array.isArray(value)) {\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"],"mappings":"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","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- import type { CmsModelFieldToElasticsearchPlugin } from "../../types";
2
- declare const _default: () => CmsModelFieldToElasticsearchPlugin;
3
- export default _default;
@@ -1,54 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _default = () => ({
8
- type: "cms-model-field-to-elastic-search",
9
- name: "cms-model-field-to-elastic-search-default",
10
- fieldType: "*",
11
- toIndex({
12
- field,
13
- getFieldTypePlugin,
14
- value
15
- }) {
16
- const fieldTypePlugin = getFieldTypePlugin(field.type);
17
-
18
- // when field is searchable, assign it to `values`
19
- if (fieldTypePlugin.isSearchable === true) {
20
- return {
21
- value
22
- };
23
- }
24
-
25
- // when field is not searchable, move its value to `rawValues`.
26
- // `rawValues` is a field in ES index that's not being indexed.
27
- return {
28
- rawValue: value
29
- };
30
- },
31
- fromIndex({
32
- field,
33
- getFieldTypePlugin,
34
- value,
35
- rawValue
36
- }) {
37
- const {
38
- isSearchable
39
- } = getFieldTypePlugin(field.type);
40
- /**
41
- * We will return the rawValue in case if not searchable and value in case of not searchable field.
42
- * This is to make sure that changed isSearchable parameter does not make the data to be null / undefined.
43
- *
44
- * Users can change isSearchable parameter at any time on the GraphQL field - and that could create a problem for them.
45
- */
46
- if (isSearchable) {
47
- return value === undefined ? rawValue : value;
48
- }
49
- return rawValue === undefined ? value : rawValue;
50
- }
51
- });
52
- exports.default = _default;
53
-
54
- //# sourceMappingURL=defaultFieldIndexing.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_default","type","name","fieldType","toIndex","field","getFieldTypePlugin","value","fieldTypePlugin","isSearchable","rawValue","fromIndex","undefined","exports","default"],"sources":["defaultFieldIndexing.ts"],"sourcesContent":["import type { CmsModelFieldToElasticsearchPlugin } from \"~/types\";\n\nexport default (): CmsModelFieldToElasticsearchPlugin => ({\n type: \"cms-model-field-to-elastic-search\",\n name: \"cms-model-field-to-elastic-search-default\",\n fieldType: \"*\",\n toIndex({ field, getFieldTypePlugin, value }) {\n const fieldTypePlugin = getFieldTypePlugin(field.type);\n\n // when field is searchable, assign it to `values`\n if (fieldTypePlugin.isSearchable === true) {\n return { value };\n }\n\n // when field is not searchable, move its value to `rawValues`.\n // `rawValues` is a field in ES index that's not being indexed.\n return { rawValue: value };\n },\n fromIndex({ field, getFieldTypePlugin, value, rawValue }) {\n const { isSearchable } = getFieldTypePlugin(field.type);\n /**\n * We will return the rawValue in case if not searchable and value in case of not searchable field.\n * This is to make sure that changed isSearchable parameter does not make the data to be null / undefined.\n *\n * Users can change isSearchable parameter at any time on the GraphQL field - and that could create a problem for them.\n */\n if (isSearchable) {\n return value === undefined ? rawValue : value;\n }\n return rawValue === undefined ? value : rawValue;\n }\n});\n"],"mappings":";;;;;;eAEeA,CAAA,MAA2C;EACtDC,IAAI,EAAE,mCAAmC;EACzCC,IAAI,EAAE,2CAA2C;EACjDC,SAAS,EAAE,GAAG;EACdC,OAAOA,CAAC;IAAEC,KAAK;IAAEC,kBAAkB;IAAEC;EAAM,CAAC,EAAE;IAC1C,MAAMC,eAAe,GAAGF,kBAAkB,CAACD,KAAK,CAACJ,IAAI,CAAC;;IAEtD;IACA,IAAIO,eAAe,CAACC,YAAY,KAAK,IAAI,EAAE;MACvC,OAAO;QAAEF;MAAM,CAAC;IACpB;;IAEA;IACA;IACA,OAAO;MAAEG,QAAQ,EAAEH;IAAM,CAAC;EAC9B,CAAC;EACDI,SAASA,CAAC;IAAEN,KAAK;IAAEC,kBAAkB;IAAEC,KAAK;IAAEG;EAAS,CAAC,EAAE;IACtD,MAAM;MAAED;IAAa,CAAC,GAAGH,kBAAkB,CAACD,KAAK,CAACJ,IAAI,CAAC;IACvD;AACR;AACA;AACA;AACA;AACA;IACQ,IAAIQ,YAAY,EAAE;MACd,OAAOF,KAAK,KAAKK,SAAS,GAAGF,QAAQ,GAAGH,KAAK;IACjD;IACA,OAAOG,QAAQ,KAAKE,SAAS,GAAGL,KAAK,GAAGG,QAAQ;EACpD;AACJ,CAAC,CAAC;AAAAG,OAAA,CAAAC,OAAA,GAAAd,QAAA","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- declare const _default: () => import("../../types").CmsModelFieldToElasticsearchPlugin[];
2
- export default _default;
@@ -1,18 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _richTextIndexing = _interopRequireDefault(require("./richTextIndexing"));
9
- var _longTextIndexing = _interopRequireDefault(require("./longTextIndexing"));
10
- var _defaultFieldIndexing = _interopRequireDefault(require("./defaultFieldIndexing"));
11
- var _dateTimeIndexing = _interopRequireDefault(require("./dateTimeIndexing"));
12
- var _numberIndexing = _interopRequireDefault(require("./numberIndexing"));
13
- var _objectIndexing = _interopRequireDefault(require("./objectIndexing"));
14
- var _jsonIndexing = require("./jsonIndexing");
15
- var _default = () => [(0, _dateTimeIndexing.default)(), (0, _richTextIndexing.default)(), (0, _longTextIndexing.default)(), (0, _defaultFieldIndexing.default)(), (0, _numberIndexing.default)(), (0, _objectIndexing.default)(), (0, _jsonIndexing.createJsonIndexing)()];
16
- exports.default = _default;
17
-
18
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_richTextIndexing","_interopRequireDefault","require","_longTextIndexing","_defaultFieldIndexing","_dateTimeIndexing","_numberIndexing","_objectIndexing","_jsonIndexing","_default","dateTimeIndexing","richTextIndexing","longTextIndexing","defaultFieldIndexing","numberIndexing","objectIndexing","createJsonIndexing","exports","default"],"sources":["index.ts"],"sourcesContent":["import richTextIndexing from \"./richTextIndexing\";\nimport longTextIndexing from \"./longTextIndexing\";\nimport defaultFieldIndexing from \"./defaultFieldIndexing\";\nimport dateTimeIndexing from \"./dateTimeIndexing\";\nimport numberIndexing from \"./numberIndexing\";\nimport objectIndexing from \"./objectIndexing\";\nimport { createJsonIndexing } from \"./jsonIndexing\";\n\nexport default () => [\n dateTimeIndexing(),\n richTextIndexing(),\n longTextIndexing(),\n defaultFieldIndexing(),\n numberIndexing(),\n objectIndexing(),\n createJsonIndexing()\n];\n"],"mappings":";;;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,qBAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,iBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,eAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,eAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AAAoD,IAAAO,QAAA,GAErCA,CAAA,KAAM,CACjB,IAAAC,yBAAgB,EAAC,CAAC,EAClB,IAAAC,yBAAgB,EAAC,CAAC,EAClB,IAAAC,yBAAgB,EAAC,CAAC,EAClB,IAAAC,6BAAoB,EAAC,CAAC,EACtB,IAAAC,uBAAc,EAAC,CAAC,EAChB,IAAAC,uBAAc,EAAC,CAAC,EAChB,IAAAC,gCAAkB,EAAC,CAAC,CACvB;AAAAC,OAAA,CAAAC,OAAA,GAAAT,QAAA","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import type { CmsModelFieldToElasticsearchPlugin } from "../../types";
2
- export declare const createJsonIndexing: () => CmsModelFieldToElasticsearchPlugin;
@@ -1,28 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createJsonIndexing = void 0;
7
- const createJsonIndexing = () => {
8
- return {
9
- type: "cms-model-field-to-elastic-search",
10
- name: "cms-model-field-to-elastic-search-json",
11
- fieldType: "json",
12
- toIndex({
13
- value
14
- }) {
15
- return {
16
- rawValue: value
17
- };
18
- },
19
- fromIndex({
20
- rawValue
21
- }) {
22
- return rawValue;
23
- }
24
- };
25
- };
26
- exports.createJsonIndexing = createJsonIndexing;
27
-
28
- //# sourceMappingURL=jsonIndexing.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["createJsonIndexing","type","name","fieldType","toIndex","value","rawValue","fromIndex","exports"],"sources":["jsonIndexing.ts"],"sourcesContent":["import type { CmsModelFieldToElasticsearchPlugin } from \"~/types\";\n\nexport const createJsonIndexing = (): CmsModelFieldToElasticsearchPlugin => {\n return {\n type: \"cms-model-field-to-elastic-search\",\n name: \"cms-model-field-to-elastic-search-json\",\n fieldType: \"json\",\n toIndex({ value }) {\n return {\n rawValue: value\n };\n },\n fromIndex({ rawValue }) {\n return rawValue;\n }\n };\n};\n"],"mappings":";;;;;;AAEO,MAAMA,kBAAkB,GAAGA,CAAA,KAA0C;EACxE,OAAO;IACHC,IAAI,EAAE,mCAAmC;IACzCC,IAAI,EAAE,wCAAwC;IAC9CC,SAAS,EAAE,MAAM;IACjBC,OAAOA,CAAC;MAAEC;IAAM,CAAC,EAAE;MACf,OAAO;QACHC,QAAQ,EAAED;MACd,CAAC;IACL,CAAC;IACDE,SAASA,CAAC;MAAED;IAAS,CAAC,EAAE;MACpB,OAAOA,QAAQ;IACnB;EACJ,CAAC;AACL,CAAC;AAACE,OAAA,CAAAR,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -1,7 +0,0 @@
1
- import type { CmsModelFieldToElasticsearchPlugin } from "../../types";
2
- /**
3
- * The long-text indexing plugin must take in consideration that users might have list of long-text fields.
4
- * Also, we used to encode values, and we do not do that anymore - but we need to have backward compatibility.
5
- */
6
- declare const _default: () => CmsModelFieldToElasticsearchPlugin;
7
- export default _default;
@@ -1,42 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- /**
8
- * The long-text indexing plugin must take in consideration that users might have list of long-text fields.
9
- * Also, we used to encode values, and we do not do that anymore - but we need to have backward compatibility.
10
- */
11
- var _default = () => ({
12
- type: "cms-model-field-to-elastic-search",
13
- name: "cms-model-field-to-elastic-search-long-text",
14
- fieldType: "long-text",
15
- toIndex({
16
- rawValue
17
- }) {
18
- /**
19
- * We take the raw value, before it was prepared via `transformToStorage` for storage (there might be some transform due to DynamoDB) and store it in the Elasticsearch to be indexed.
20
- */
21
- return {
22
- value: Array.isArray(rawValue) ? rawValue : rawValue || ""
23
- };
24
- },
25
- /**
26
- * When taking value from the index, we can return the original value.
27
- * At that point the `transformFromStorage` does not need to do anything.
28
- *
29
- * We need to decode to support older systems.
30
- */
31
- fromIndex({
32
- value
33
- }) {
34
- if (Array.isArray(value)) {
35
- return value;
36
- }
37
- return value || "";
38
- }
39
- });
40
- exports.default = _default;
41
-
42
- //# sourceMappingURL=longTextIndexing.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_default","type","name","fieldType","toIndex","rawValue","value","Array","isArray","fromIndex","exports","default"],"sources":["longTextIndexing.ts"],"sourcesContent":["import type { CmsModelFieldToElasticsearchPlugin } from \"~/types\";\n\n/**\n * The long-text indexing plugin must take in consideration that users might have list of long-text fields.\n * Also, we used to encode values, and we do not do that anymore - but we need to have backward compatibility.\n */\nexport default (): CmsModelFieldToElasticsearchPlugin => ({\n type: \"cms-model-field-to-elastic-search\",\n name: \"cms-model-field-to-elastic-search-long-text\",\n fieldType: \"long-text\",\n toIndex({ rawValue }) {\n /**\n * We take the raw value, before it was prepared via `transformToStorage` for storage (there might be some transform due to DynamoDB) and store it in the Elasticsearch to be indexed.\n */\n return {\n value: Array.isArray(rawValue) ? rawValue : rawValue || \"\"\n };\n },\n /**\n * When taking value from the index, we can return the original value.\n * At that point the `transformFromStorage` does not need to do anything.\n *\n * We need to decode to support older systems.\n */\n fromIndex({ value }) {\n if (Array.isArray(value)) {\n return value;\n }\n return value || \"\";\n }\n});\n"],"mappings":";;;;;;AAEA;AACA;AACA;AACA;AAHA,IAAAA,QAAA,GAIeA,CAAA,MAA2C;EACtDC,IAAI,EAAE,mCAAmC;EACzCC,IAAI,EAAE,6CAA6C;EACnDC,SAAS,EAAE,WAAW;EACtBC,OAAOA,CAAC;IAAEC;EAAS,CAAC,EAAE;IAClB;AACR;AACA;IACQ,OAAO;MACHC,KAAK,EAAEC,KAAK,CAACC,OAAO,CAACH,QAAQ,CAAC,GAAGA,QAAQ,GAAGA,QAAQ,IAAI;IAC5D,CAAC;EACL,CAAC;EACD;AACJ;AACA;AACA;AACA;AACA;EACII,SAASA,CAAC;IAAEH;EAAM,CAAC,EAAE;IACjB,IAAIC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,EAAE;MACtB,OAAOA,KAAK;IAChB;IACA,OAAOA,KAAK,IAAI,EAAE;EACtB;AACJ,CAAC,CAAC;AAAAI,OAAA,CAAAC,OAAA,GAAAX,QAAA","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- import type { CmsModelFieldToElasticsearchPlugin } from "../../types";
2
- declare const _default: () => CmsModelFieldToElasticsearchPlugin;
3
- export default _default;