@webiny/api-headless-cms-ddb-es 0.0.0-unstable.78f581c1d2 → 0.0.0-unstable.7be00a75a9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (411) hide show
  1. package/README.md +6 -30
  2. package/configurations.d.ts +13 -6
  3. package/configurations.js +28 -40
  4. package/configurations.js.map +1 -1
  5. package/definitions/entry.d.ts +4 -5
  6. package/definitions/entry.js +9 -88
  7. package/definitions/entry.js.map +1 -1
  8. package/definitions/group.d.ts +6 -6
  9. package/definitions/group.js +9 -68
  10. package/definitions/group.js.map +1 -1
  11. package/definitions/model.d.ts +6 -6
  12. package/definitions/model.js +9 -90
  13. package/definitions/model.js.map +1 -1
  14. package/definitions/types.d.ts +65 -0
  15. package/definitions/types.js +0 -0
  16. package/elasticsearch/createElasticsearchIndex.d.ts +5 -5
  17. package/elasticsearch/createElasticsearchIndex.js +53 -56
  18. package/elasticsearch/createElasticsearchIndex.js.map +1 -1
  19. package/elasticsearch/deleteElasticsearchIndex.d.ts +3 -3
  20. package/elasticsearch/deleteElasticsearchIndex.js +20 -40
  21. package/elasticsearch/deleteElasticsearchIndex.js.map +1 -1
  22. package/exports/api/cms/opensearch.d.ts +9 -0
  23. package/exports/api/cms/opensearch.js +9 -0
  24. package/feature.d.ts +1 -0
  25. package/feature.js +179 -0
  26. package/feature.js.map +1 -0
  27. package/features/CmsEntryOpenSearchBodyModifier/abstractions.d.ts +16 -0
  28. package/features/CmsEntryOpenSearchBodyModifier/abstractions.js +5 -0
  29. package/features/CmsEntryOpenSearchBodyModifier/abstractions.js.map +1 -0
  30. package/features/CmsEntryOpenSearchBodyModifier/index.d.ts +1 -0
  31. package/features/CmsEntryOpenSearchBodyModifier/index.js +1 -0
  32. package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.d.ts +14 -0
  33. package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.js +42 -0
  34. package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.js.map +1 -0
  35. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.d.ts +32 -0
  36. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.js +5 -0
  37. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.js.map +1 -0
  38. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.d.ts +11 -0
  39. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.js +5 -0
  40. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.js.map +1 -0
  41. package/features/CmsEntryOpenSearchFieldIndex/constants.d.ts +1 -0
  42. package/features/CmsEntryOpenSearchFieldIndex/constants.js +4 -0
  43. package/features/CmsEntryOpenSearchFieldIndex/constants.js.map +1 -0
  44. package/features/CmsEntryOpenSearchFieldIndex/feature.d.ts +4 -0
  45. package/features/CmsEntryOpenSearchFieldIndex/feature.js +29 -0
  46. package/features/CmsEntryOpenSearchFieldIndex/feature.js.map +1 -0
  47. package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.d.ts +11 -0
  48. package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.js +60 -0
  49. package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.js.map +1 -0
  50. package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.d.ts +13 -0
  51. package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.js +33 -0
  52. package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.js.map +1 -0
  53. package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.d.ts +10 -0
  54. package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.js +21 -0
  55. package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.js.map +1 -0
  56. package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.d.ts +10 -0
  57. package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.js +22 -0
  58. package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.js.map +1 -0
  59. package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.d.ts +11 -0
  60. package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.js +32 -0
  61. package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.js.map +1 -0
  62. package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.d.ts +12 -0
  63. package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.js +107 -0
  64. package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.js.map +1 -0
  65. package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.d.ts +10 -0
  66. package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.js +21 -0
  67. package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.js.map +1 -0
  68. package/features/CmsEntryOpenSearchFieldIndex/fields/TextCompressedFieldIndex.d.ts +15 -0
  69. package/features/CmsEntryOpenSearchFieldIndex/fields/TextCompressedFieldIndex.js +40 -0
  70. package/features/CmsEntryOpenSearchFieldIndex/fields/TextCompressedFieldIndex.js.map +1 -0
  71. package/features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.d.ts +15 -0
  72. package/features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.js +40 -0
  73. package/features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.js.map +1 -0
  74. package/features/CmsEntryOpenSearchFieldIndex/index.d.ts +3 -0
  75. package/features/CmsEntryOpenSearchFieldIndex/index.js +3 -0
  76. package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.d.ts +11 -0
  77. package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.js +36 -0
  78. package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.js.map +1 -0
  79. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.d.ts +37 -0
  80. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.js +5 -0
  81. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.js.map +1 -0
  82. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.d.ts +9 -0
  83. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.js +5 -0
  84. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.js.map +1 -0
  85. package/features/CmsEntryOpenSearchFilter/constants.d.ts +1 -0
  86. package/features/CmsEntryOpenSearchFilter/constants.js +4 -0
  87. package/features/CmsEntryOpenSearchFilter/constants.js.map +1 -0
  88. package/features/CmsEntryOpenSearchFilter/feature.d.ts +4 -0
  89. package/features/CmsEntryOpenSearchFilter/feature.js +17 -0
  90. package/features/CmsEntryOpenSearchFilter/feature.js.map +1 -0
  91. package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.d.ts +9 -0
  92. package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.js +26 -0
  93. package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.js.map +1 -0
  94. package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.d.ts +9 -0
  95. package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.js +43 -0
  96. package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.js.map +1 -0
  97. package/features/CmsEntryOpenSearchFilter/fields/RefFilter.d.ts +9 -0
  98. package/features/CmsEntryOpenSearchFilter/fields/RefFilter.js +36 -0
  99. package/features/CmsEntryOpenSearchFilter/fields/RefFilter.js.map +1 -0
  100. package/features/CmsEntryOpenSearchFilter/index.d.ts +3 -0
  101. package/features/CmsEntryOpenSearchFilter/index.js +3 -0
  102. package/features/CmsEntryOpenSearchFullTextSearch/abstractions.d.ts +20 -0
  103. package/features/CmsEntryOpenSearchFullTextSearch/abstractions.js +5 -0
  104. package/features/CmsEntryOpenSearchFullTextSearch/abstractions.js.map +1 -0
  105. package/features/CmsEntryOpenSearchFullTextSearch/index.d.ts +1 -0
  106. package/features/CmsEntryOpenSearchFullTextSearch/index.js +1 -0
  107. package/features/CmsEntryOpenSearchIndex/BaseOpenSearchIndex.d.ts +11 -0
  108. package/features/CmsEntryOpenSearchIndex/BaseOpenSearchIndex.js +17 -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 +5 -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 +11 -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 +3 -0
  118. package/features/CmsEntryOpenSearchQueryModifier/abstractions.d.ts +16 -0
  119. package/features/CmsEntryOpenSearchQueryModifier/abstractions.js +5 -0
  120. package/features/CmsEntryOpenSearchQueryModifier/abstractions.js.map +1 -0
  121. package/features/CmsEntryOpenSearchQueryModifier/index.d.ts +1 -0
  122. package/features/CmsEntryOpenSearchQueryModifier/index.js +1 -0
  123. package/features/CmsEntryOpenSearchSortModifier/abstractions.d.ts +15 -0
  124. package/features/CmsEntryOpenSearchSortModifier/abstractions.js +5 -0
  125. package/features/CmsEntryOpenSearchSortModifier/abstractions.js.map +1 -0
  126. package/features/CmsEntryOpenSearchSortModifier/index.d.ts +1 -0
  127. package/features/CmsEntryOpenSearchSortModifier/index.js +1 -0
  128. package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.d.ts +12 -0
  129. package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.js +31 -0
  130. package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.js.map +1 -0
  131. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.d.ts +22 -0
  132. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.js +5 -0
  133. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.js.map +1 -0
  134. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.d.ts +10 -0
  135. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.js +5 -0
  136. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.js.map +1 -0
  137. package/features/CmsEntryOpenSearchValueSearch/feature.d.ts +4 -0
  138. package/features/CmsEntryOpenSearchValueSearch/feature.js +17 -0
  139. package/features/CmsEntryOpenSearchValueSearch/feature.js.map +1 -0
  140. package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.d.ts +10 -0
  141. package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.js +21 -0
  142. package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.js.map +1 -0
  143. package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.d.ts +10 -0
  144. package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.js +44 -0
  145. package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.js.map +1 -0
  146. package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.d.ts +10 -0
  147. package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.js +22 -0
  148. package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.js.map +1 -0
  149. package/features/CmsEntryOpenSearchValueSearch/index.d.ts +3 -0
  150. package/features/CmsEntryOpenSearchValueSearch/index.js +3 -0
  151. package/features/CmsEntryOpenSearchValuesModifier/abstractions.d.ts +23 -0
  152. package/features/CmsEntryOpenSearchValuesModifier/abstractions.js +5 -0
  153. package/features/CmsEntryOpenSearchValuesModifier/abstractions.js.map +1 -0
  154. package/features/CmsEntryOpenSearchValuesModifier/index.d.ts +1 -0
  155. package/features/CmsEntryOpenSearchValuesModifier/index.js +1 -0
  156. package/helpers/entryIndexHelpers.d.ts +13 -11
  157. package/helpers/entryIndexHelpers.js +72 -196
  158. package/helpers/entryIndexHelpers.js.map +1 -1
  159. package/helpers/fieldIdentifier.d.ts +6 -0
  160. package/helpers/fieldIdentifier.js +23 -0
  161. package/helpers/fieldIdentifier.js.map +1 -0
  162. package/helpers/index.d.ts +2 -2
  163. package/helpers/index.js +2 -31
  164. package/index.d.ts +1 -3
  165. package/index.js +1 -268
  166. package/operations/entry/dataLoader/DataLoaderCache.d.ts +16 -0
  167. package/operations/entry/dataLoader/DataLoaderCache.js +27 -0
  168. package/operations/entry/dataLoader/DataLoaderCache.js.map +1 -0
  169. package/operations/entry/dataLoader/constants.d.ts +1 -0
  170. package/operations/entry/dataLoader/constants.js +5 -0
  171. package/operations/entry/dataLoader/constants.js.map +1 -0
  172. package/operations/entry/dataLoader/createBatchScheduleFn.d.ts +8 -0
  173. package/operations/entry/dataLoader/createBatchScheduleFn.js +10 -0
  174. package/operations/entry/dataLoader/createBatchScheduleFn.js.map +1 -0
  175. package/operations/entry/dataLoader/getAllEntryRevisions.d.ts +4 -0
  176. package/operations/entry/dataLoader/getAllEntryRevisions.js +24 -0
  177. package/operations/entry/dataLoader/getAllEntryRevisions.js.map +1 -0
  178. package/operations/entry/dataLoader/getLatestRevisionByEntryId.d.ts +4 -0
  179. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js +34 -0
  180. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js.map +1 -0
  181. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.d.ts +4 -0
  182. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js +34 -0
  183. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js.map +1 -0
  184. package/operations/entry/dataLoader/getRevisionById.d.ts +4 -0
  185. package/operations/entry/dataLoader/getRevisionById.js +40 -0
  186. package/operations/entry/dataLoader/getRevisionById.js.map +1 -0
  187. package/operations/entry/dataLoader/index.d.ts +8 -0
  188. package/operations/entry/dataLoader/index.js +18 -0
  189. package/operations/entry/dataLoader/index.js.map +1 -0
  190. package/operations/entry/dataLoader/types.d.ts +6 -0
  191. package/operations/entry/dataLoader/types.js +0 -0
  192. package/operations/entry/dataLoaders.d.ts +17 -38
  193. package/operations/entry/dataLoaders.js +82 -357
  194. package/operations/entry/dataLoaders.js.map +1 -1
  195. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.d.ts +18 -0
  196. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js +9 -0
  197. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js.map +1 -0
  198. package/operations/entry/elasticsearch/body.d.ts +29 -0
  199. package/operations/entry/elasticsearch/body.js +87 -0
  200. package/operations/entry/elasticsearch/body.js.map +1 -0
  201. package/operations/entry/elasticsearch/fields/createSystemField.d.ts +4 -0
  202. package/operations/entry/elasticsearch/fields/createSystemField.js +9 -0
  203. package/operations/entry/elasticsearch/fields/createSystemField.js.map +1 -0
  204. package/operations/entry/elasticsearch/fields/live.d.ts +2 -0
  205. package/operations/entry/elasticsearch/fields/live.js +50 -0
  206. package/operations/entry/elasticsearch/fields/live.js.map +1 -0
  207. package/operations/entry/elasticsearch/fields/location.d.ts +2 -0
  208. package/operations/entry/elasticsearch/fields/location.js +50 -0
  209. package/operations/entry/elasticsearch/fields/location.js.map +1 -0
  210. package/operations/entry/elasticsearch/fields/state.d.ts +2 -0
  211. package/operations/entry/elasticsearch/fields/state.js +104 -0
  212. package/operations/entry/elasticsearch/fields/state.js.map +1 -0
  213. package/operations/entry/elasticsearch/fields.d.ts +12 -0
  214. package/operations/entry/elasticsearch/fields.js +207 -0
  215. package/operations/entry/elasticsearch/fields.js.map +1 -0
  216. package/operations/entry/elasticsearch/filtering/applyFiltering.d.ts +9 -0
  217. package/operations/entry/elasticsearch/filtering/applyFiltering.js +39 -0
  218. package/operations/entry/elasticsearch/filtering/applyFiltering.js.map +1 -0
  219. package/operations/entry/elasticsearch/filtering/exec.d.ts +22 -0
  220. package/operations/entry/elasticsearch/filtering/exec.js +96 -0
  221. package/operations/entry/elasticsearch/filtering/exec.js.map +1 -0
  222. package/operations/entry/elasticsearch/filtering/index.d.ts +1 -0
  223. package/operations/entry/elasticsearch/filtering/index.js +1 -0
  224. package/operations/entry/elasticsearch/filtering/path.d.ts +17 -0
  225. package/operations/entry/elasticsearch/filtering/path.js +27 -0
  226. package/operations/entry/elasticsearch/filtering/path.js.map +1 -0
  227. package/operations/entry/elasticsearch/filtering/populated.d.ts +2 -0
  228. package/operations/entry/elasticsearch/filtering/populated.js +12 -0
  229. package/operations/entry/elasticsearch/filtering/populated.js.map +1 -0
  230. package/operations/entry/elasticsearch/filtering/values.d.ts +2 -0
  231. package/operations/entry/elasticsearch/filtering/values.js +15 -0
  232. package/operations/entry/elasticsearch/filtering/values.js.map +1 -0
  233. package/operations/entry/elasticsearch/fullTextSearch.d.ts +13 -0
  234. package/operations/entry/elasticsearch/fullTextSearch.js +51 -0
  235. package/operations/entry/elasticsearch/fullTextSearch.js.map +1 -0
  236. package/operations/entry/elasticsearch/fullTextSearchFields.d.ts +8 -0
  237. package/operations/entry/elasticsearch/fullTextSearchFields.js +10 -0
  238. package/operations/entry/elasticsearch/fullTextSearchFields.js.map +1 -0
  239. package/operations/entry/elasticsearch/initialQuery.d.ts +17 -0
  240. package/operations/entry/elasticsearch/initialQuery.js +45 -0
  241. package/operations/entry/elasticsearch/initialQuery.js.map +1 -0
  242. package/operations/entry/elasticsearch/keyword.d.ts +2 -0
  243. package/operations/entry/elasticsearch/keyword.js +17 -0
  244. package/operations/entry/elasticsearch/keyword.js.map +1 -0
  245. package/operations/entry/elasticsearch/plugins/operator.d.ts +7 -0
  246. package/operations/entry/elasticsearch/plugins/operator.js +13 -0
  247. package/operations/entry/elasticsearch/plugins/operator.js.map +1 -0
  248. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.d.ts +2 -0
  249. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js +8 -0
  250. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js.map +1 -0
  251. package/operations/entry/elasticsearch/sort.d.ts +12 -0
  252. package/operations/entry/elasticsearch/sort.js +80 -0
  253. package/operations/entry/elasticsearch/sort.js.map +1 -0
  254. package/operations/entry/elasticsearch/transformValueForSearch.d.ts +9 -0
  255. package/operations/entry/elasticsearch/transformValueForSearch.js +12 -0
  256. package/operations/entry/elasticsearch/transformValueForSearch.js.map +1 -0
  257. package/operations/entry/elasticsearch/types.d.ts +34 -0
  258. package/operations/entry/elasticsearch/types.js +0 -0
  259. package/operations/entry/index.d.ts +27 -8
  260. package/operations/entry/index.js +1344 -1245
  261. package/operations/entry/index.js.map +1 -1
  262. package/operations/entry/keys.d.ts +31 -1
  263. package/operations/entry/keys.js +45 -35
  264. package/operations/entry/keys.js.map +1 -1
  265. package/operations/entry/recordType.d.ts +3 -0
  266. package/operations/entry/recordType.js +6 -0
  267. package/operations/entry/recordType.js.map +1 -0
  268. package/operations/entry/transformations/convertEntryKeys.d.ts +8 -0
  269. package/operations/entry/transformations/convertEntryKeys.js +25 -0
  270. package/operations/entry/transformations/convertEntryKeys.js.map +1 -0
  271. package/operations/entry/transformations/index.d.ts +33 -0
  272. package/operations/entry/transformations/index.js +91 -0
  273. package/operations/entry/transformations/index.js.map +1 -0
  274. package/operations/entry/transformations/modifyEntryValues.d.ts +53 -0
  275. package/operations/entry/transformations/modifyEntryValues.js +16 -0
  276. package/operations/entry/transformations/modifyEntryValues.js.map +1 -0
  277. package/operations/entry/transformations/transformEntryKeys.d.ts +11 -0
  278. package/operations/entry/transformations/transformEntryKeys.js +17 -0
  279. package/operations/entry/transformations/transformEntryKeys.js.map +1 -0
  280. package/operations/entry/transformations/transformEntryToIndex.d.ts +10 -0
  281. package/operations/entry/transformations/transformEntryToIndex.js +20 -0
  282. package/operations/entry/transformations/transformEntryToIndex.js.map +1 -0
  283. package/operations/group/index.d.ts +7 -6
  284. package/operations/group/index.js +116 -190
  285. package/operations/group/index.js.map +1 -1
  286. package/operations/model/index.d.ts +4 -4
  287. package/operations/model/index.js +130 -199
  288. package/operations/model/index.js.map +1 -1
  289. package/package.json +44 -41
  290. package/tasks/createIndexTaskPlugin.d.ts +2 -0
  291. package/tasks/createIndexTaskPlugin.js +45 -0
  292. package/tasks/createIndexTaskPlugin.js.map +1 -0
  293. package/types.d.ts +34 -137
  294. package/types.js +10 -47
  295. package/types.js.map +1 -1
  296. package/values/NoValueContainer.d.ts +5 -0
  297. package/values/NoValueContainer.js +11 -0
  298. package/values/NoValueContainer.js.map +1 -0
  299. package/definitions/entryElasticsearch.d.ts +0 -8
  300. package/definitions/entryElasticsearch.js +0 -42
  301. package/definitions/entryElasticsearch.js.map +0 -1
  302. package/definitions/settings.d.ts +0 -8
  303. package/definitions/settings.js +0 -58
  304. package/definitions/settings.js.map +0 -1
  305. package/definitions/system.d.ts +0 -8
  306. package/definitions/system.js +0 -46
  307. package/definitions/system.js.map +0 -1
  308. package/definitions/table.d.ts +0 -8
  309. package/definitions/table.js +0 -24
  310. package/definitions/table.js.map +0 -1
  311. package/definitions/tableElasticsearch.d.ts +0 -8
  312. package/definitions/tableElasticsearch.js +0 -24
  313. package/definitions/tableElasticsearch.js.map +0 -1
  314. package/dynamoDb/index.d.ts +0 -2
  315. package/dynamoDb/index.js +0 -16
  316. package/dynamoDb/index.js.map +0 -1
  317. package/dynamoDb/storage/date.d.ts +0 -2
  318. package/dynamoDb/storage/date.js +0 -99
  319. package/dynamoDb/storage/date.js.map +0 -1
  320. package/dynamoDb/storage/longText.d.ts +0 -10
  321. package/dynamoDb/storage/longText.js +0 -101
  322. package/dynamoDb/storage/longText.js.map +0 -1
  323. package/dynamoDb/storage/richText.d.ts +0 -7
  324. package/dynamoDb/storage/richText.js +0 -128
  325. package/dynamoDb/storage/richText.js.map +0 -1
  326. package/elasticsearch/index.d.ts +0 -2
  327. package/elasticsearch/index.js +0 -16
  328. package/elasticsearch/index.js.map +0 -1
  329. package/elasticsearch/indexing/dateTimeIndexing.d.ts +0 -3
  330. package/elasticsearch/indexing/dateTimeIndexing.js +0 -103
  331. package/elasticsearch/indexing/dateTimeIndexing.js.map +0 -1
  332. package/elasticsearch/indexing/defaultFieldIndexing.d.ts +0 -3
  333. package/elasticsearch/indexing/defaultFieldIndexing.js +0 -47
  334. package/elasticsearch/indexing/defaultFieldIndexing.js.map +0 -1
  335. package/elasticsearch/indexing/index.d.ts +0 -2
  336. package/elasticsearch/indexing/index.js +0 -24
  337. package/elasticsearch/indexing/index.js.map +0 -1
  338. package/elasticsearch/indexing/longTextIndexing.d.ts +0 -3
  339. package/elasticsearch/indexing/longTextIndexing.js +0 -36
  340. package/elasticsearch/indexing/longTextIndexing.js.map +0 -1
  341. package/elasticsearch/indexing/numberIndexing.d.ts +0 -3
  342. package/elasticsearch/indexing/numberIndexing.js +0 -48
  343. package/elasticsearch/indexing/numberIndexing.js.map +0 -1
  344. package/elasticsearch/indexing/objectIndexing.d.ts +0 -12
  345. package/elasticsearch/indexing/objectIndexing.js +0 -223
  346. package/elasticsearch/indexing/objectIndexing.js.map +0 -1
  347. package/elasticsearch/indexing/richTextIndexing.d.ts +0 -3
  348. package/elasticsearch/indexing/richTextIndexing.js +0 -34
  349. package/elasticsearch/indexing/richTextIndexing.js.map +0 -1
  350. package/elasticsearch/indices/base.d.ts +0 -2
  351. package/elasticsearch/indices/base.js +0 -15
  352. package/elasticsearch/indices/base.js.map +0 -1
  353. package/elasticsearch/indices/index.d.ts +0 -1
  354. package/elasticsearch/indices/index.js +0 -16
  355. package/elasticsearch/indices/index.js.map +0 -1
  356. package/elasticsearch/indices/japanese.d.ts +0 -2
  357. package/elasticsearch/indices/japanese.js +0 -16
  358. package/elasticsearch/indices/japanese.js.map +0 -1
  359. package/elasticsearch/search/index.d.ts +0 -3
  360. package/elasticsearch/search/index.js +0 -14
  361. package/elasticsearch/search/index.js.map +0 -1
  362. package/elasticsearch/search/refSearch.d.ts +0 -2
  363. package/elasticsearch/search/refSearch.js +0 -33
  364. package/elasticsearch/search/refSearch.js.map +0 -1
  365. package/elasticsearch/search/timeSearch.d.ts +0 -2
  366. package/elasticsearch/search/timeSearch.js +0 -33
  367. package/elasticsearch/search/timeSearch.js.map +0 -1
  368. package/helpers/createElasticsearchQueryBody.d.ts +0 -11
  369. package/helpers/createElasticsearchQueryBody.js +0 -611
  370. package/helpers/createElasticsearchQueryBody.js.map +0 -1
  371. package/helpers/fields.d.ts +0 -19
  372. package/helpers/fields.js +0 -205
  373. package/helpers/fields.js.map +0 -1
  374. package/helpers/index.js.map +0 -1
  375. package/helpers/searchPluginsList.d.ts +0 -6
  376. package/helpers/searchPluginsList.js +0 -26
  377. package/helpers/searchPluginsList.js.map +0 -1
  378. package/helpers/transformValueForSearch.d.ts +0 -12
  379. package/helpers/transformValueForSearch.js +0 -29
  380. package/helpers/transformValueForSearch.js.map +0 -1
  381. package/index.js.map +0 -1
  382. package/operations/entry/elasticsearchFields.d.ts +0 -2
  383. package/operations/entry/elasticsearchFields.js +0 -38
  384. package/operations/entry/elasticsearchFields.js.map +0 -1
  385. package/operations/settings/index.d.ts +0 -6
  386. package/operations/settings/index.js +0 -135
  387. package/operations/settings/index.js.map +0 -1
  388. package/operations/system/index.d.ts +0 -6
  389. package/operations/system/index.js +0 -99
  390. package/operations/system/index.js.map +0 -1
  391. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.d.ts +0 -20
  392. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js +0 -24
  393. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js.map +0 -1
  394. package/plugins/CmsEntryElasticsearchFieldPlugin.d.ts +0 -12
  395. package/plugins/CmsEntryElasticsearchFieldPlugin.js +0 -24
  396. package/plugins/CmsEntryElasticsearchFieldPlugin.js.map +0 -1
  397. package/plugins/CmsEntryElasticsearchIndexPlugin.d.ts +0 -4
  398. package/plugins/CmsEntryElasticsearchIndexPlugin.js +0 -17
  399. package/plugins/CmsEntryElasticsearchIndexPlugin.js.map +0 -1
  400. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.d.ts +0 -30
  401. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js +0 -43
  402. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js.map +0 -1
  403. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.d.ts +0 -17
  404. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js +0 -24
  405. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js.map +0 -1
  406. package/plugins/CmsEntryElasticsearchSortModifierPlugin.d.ts +0 -17
  407. package/plugins/CmsEntryElasticsearchSortModifierPlugin.js +0 -24
  408. package/plugins/CmsEntryElasticsearchSortModifierPlugin.js.map +0 -1
  409. package/plugins/index.d.ts +0 -6
  410. package/plugins/index.js +0 -83
  411. package/plugins/index.js.map +0 -1
package/types.d.ts CHANGED
@@ -1,164 +1,61 @@
1
- import { Plugin, PluginCollection } from "@webiny/plugins/types";
2
- import { CmsContext as BaseCmsContext, CmsEntry, CmsModel, CmsModelField, CmsModelFieldToGraphQLPlugin, HeadlessCmsStorageOperations as BaseHeadlessCmsStorageOperations } from "@webiny/api-headless-cms/types";
3
- import { DynamoDBTypes, TableConstructor } from "dynamodb-toolbox/dist/classes/Table";
4
- import { DocumentClient } from "aws-sdk/clients/dynamodb";
5
- import { EntityAttributeConfig, EntityCompositeAttributes } from "dynamodb-toolbox/dist/classes/Entity";
6
- import { Client } from "@elastic/elasticsearch";
7
- import { Entity, Table } from "dynamodb-toolbox";
8
- import { PluginsContainer } from "@webiny/plugins";
1
+ import type { CmsContext as BaseCmsContext, CmsEntry, CmsEntryStorageOperations as BaseCmsEntryStorageOperations, CmsEntryValues, CmsModel, HeadlessCmsStorageOperations as BaseHeadlessCmsStorageOperations } from "@webiny/api-headless-cms/types/index.js";
2
+ import type { DynamoDBDocument } from "@webiny/aws-sdk/client-dynamodb/index.js";
3
+ import type { Client, IOpenSearchEntity as IElasticsearchEntity, OpenSearchContext } from "@webiny/api-opensearch";
4
+ import type { PluginsContainer } from "@webiny/plugins";
5
+ import type { IEntryEntity, IGroupEntity, IModelEntity } from "./definitions/types.js";
6
+ import type { ITable } from "@webiny/db-dynamodb";
7
+ export interface CmsContext extends BaseCmsContext, OpenSearchContext {
8
+ }
9
9
  /**
10
10
  * A definition of the entry that is being prepared for the Elasticsearch.
11
11
  *
12
12
  * @category Elasticsearch
13
13
  * @category CmsEntry
14
14
  */
15
- export interface CmsIndexEntry extends CmsEntry {
15
+ export interface CmsIndexEntry<T extends CmsEntryValues = CmsEntryValues> extends CmsEntry<T> {
16
16
  /**
17
17
  * Values that are not going to be indexed.
18
18
  */
19
- rawValues: Record<string, any>;
20
- /**
21
- * A first part of the ID, without the revision.
22
- * For example, we can search for all the revisions of the given entry.
23
- */
24
- primaryId: string;
19
+ rawValues: Partial<T>;
25
20
  /**
26
- * Dev can add what ever keys they want and need. Just need to be careful not to break the entry.
21
+ * Dev can add whatever keys they want and need. Just need to be careful not to break the entry.
27
22
  */
28
23
  [key: string]: any;
29
24
  }
30
- /**
31
- * Arguments for the method that is transforming content entry in its original form to the one we are storing to the Elasticsearch.
32
- *
33
- * @category Elasticsearch
34
- * @category CmsEntry
35
- */
36
- interface CmsModelFieldToElasticsearchToParams {
37
- plugins: PluginsContainer;
38
- model: CmsModel;
39
- field: CmsModelField;
40
- /**
41
- * Raw value on the entry - before prepare for storage.
42
- */
43
- rawValue: any;
44
- /**
45
- * Value prepared for storage received from base api-headless-cms package.
46
- */
47
- value: any;
48
- getFieldIndexPlugin(fieldType: string): CmsModelFieldToElasticsearchPlugin;
49
- getFieldTypePlugin(fieldType: string): CmsModelFieldToGraphQLPlugin;
50
- }
51
- /**
52
- * Arguments for the method that is transforming content entry from Elasticsearch into the original one.
53
- *
54
- * @category Elasticsearch
55
- * @category CmsEntry
56
- */
57
- interface CmsModelFieldToElasticsearchFromParams {
58
- plugins: PluginsContainer;
59
- model: CmsModel;
60
- field: CmsModelField;
61
- value: any;
62
- rawValue: any;
63
- getFieldIndexPlugin(fieldType: string): CmsModelFieldToElasticsearchPlugin;
64
- getFieldTypePlugin(fieldType: string): CmsModelFieldToGraphQLPlugin;
65
- }
66
- interface ToIndexValue {
67
- /**
68
- * Use this key to store value for indexing.
69
- */
70
- value?: any;
71
- /**
72
- * Use this key to tell ES that this value should not be indexed.
73
- */
74
- rawValue?: any;
75
- }
76
- /**
77
- * A plugin defining transformation of entry for Elasticsearch.
78
- *
79
- * @category Plugin
80
- * @category ContentModelField
81
- * @category CmsEntry
82
- * @category Elasticsearch
83
- */
84
- export interface CmsModelFieldToElasticsearchPlugin extends Plugin {
85
- /**
86
- * A plugin type
87
- */
88
- type: "cms-model-field-to-elastic-search";
89
- /**
90
- * A unique identifier of the field type (text, number, json, myField, ...).
91
- *
92
- * ```ts
93
- * fieldType: "myField"
94
- * ```
95
- */
96
- fieldType: string;
97
- /**
98
- * If you need to define a type when building an Elasticsearch query.
99
- * Check [dateTimeIndexing](https://github.com/webiny/webiny-js/blob/3074165701b8b45e5fc6ac2444caace7d04ada66/packages/api-headless-cms/src/content/plugins/es/indexing/dateTimeIndexing.ts) plugin for usage example.
100
- *
101
- * ```ts
102
- * unmappedType: "date"
103
- * ```
104
- */
105
- unmappedType?: (field: CmsModelField) => string;
106
- /**
107
- * This is meant to do some transformation of the entry, preferably only to fieldType it was defined for. Nothing is stopping you to do anything you want to other fields, but try to separate field transformations.
108
- * It returns `Partial<CmsContentIndexEntryType>`. Always return a top-level property of the entry since it is merged via spread operator.
109
- *
110
- * ```ts
111
- * toIndex({ value }) {
112
- * return {
113
- * value: value, // This will be stored and indexed
114
- * rawValue: JSON.stringify(value) // This will be stored but excluded from indexing
115
- * };
116
- * }
117
- * ```
118
- */
119
- toIndex?: (params: CmsModelFieldToElasticsearchToParams) => ToIndexValue;
120
- /**
121
- * This is meant to revert a transformation done in the `toIndex` method.
122
- * You have access to "value" or a "rawValue", depending on what you returned from `toIndex`.
123
- *
124
- * ```ts
125
- * fromIndex({ value, rawValue }) {
126
- * return JSON.parse(rawValue);
127
- * }
128
- * ```
129
- */
130
- fromIndex?: (params: CmsModelFieldToElasticsearchFromParams) => any;
131
- }
132
- export declare type AttributeDefinition = DynamoDBTypes | EntityAttributeConfig | EntityCompositeAttributes;
133
- export declare type Attributes = Record<string, AttributeDefinition>;
134
25
  export declare enum ENTITIES {
135
- SYSTEM = "CmsSystem",
136
- SETTINGS = "CmsSettings",
137
26
  GROUPS = "CmsGroups",
138
27
  MODELS = "CmsModels",
139
28
  ENTRIES = "CmsEntries",
140
29
  ENTRIES_ES = "CmsEntriesElasticsearch"
141
30
  }
142
- export interface TableModifier {
143
- (table: TableConstructor): TableConstructor;
144
- }
145
31
  export interface StorageOperationsFactoryParams {
146
- documentClient: DocumentClient;
32
+ documentClient: DynamoDBDocument;
147
33
  elasticsearch: Client;
148
- table?: TableModifier;
149
- esTable?: TableModifier;
150
- attributes?: Record<ENTITIES, Attributes>;
151
- plugins?: PluginCollection;
34
+ table?: string;
35
+ esTable?: string;
36
+ plugins: PluginsContainer;
37
+ container: CmsContext["container"];
38
+ }
39
+ export interface IGetEntitiesResponse {
40
+ groups: IGroupEntity;
41
+ models: IModelEntity;
42
+ entries: IEntryEntity;
43
+ entriesEs: IElasticsearchEntity;
152
44
  }
153
- export interface HeadlessCmsStorageOperations extends BaseHeadlessCmsStorageOperations<CmsContext> {
154
- getTable: () => Table;
155
- getEsTable: () => Table;
156
- getEntities: () => Record<"system" | "settings" | "groups" | "models" | "entries" | "entriesEs", Entity<any>>;
45
+ export interface HeadlessCmsStorageOperations extends BaseHeadlessCmsStorageOperations {
46
+ getTable: () => ITable;
47
+ getEsTable: () => ITable;
48
+ getEntities: () => IGetEntitiesResponse;
157
49
  }
158
50
  export interface StorageOperationsFactory {
159
51
  (params: StorageOperationsFactoryParams): HeadlessCmsStorageOperations;
160
52
  }
161
- export interface CmsContext extends BaseCmsContext {
162
- [key: string]: any;
53
+ export interface CmsEntryStorageOperations extends BaseCmsEntryStorageOperations {
54
+ dataLoaders: IDataLoadersHandler;
55
+ }
56
+ export interface DataLoadersHandlerInterfaceClearAllParams {
57
+ model: Pick<CmsModel, "tenant">;
58
+ }
59
+ export interface IDataLoadersHandler {
60
+ clearAll: (params?: DataLoadersHandlerInterfaceClearAllParams) => void;
163
61
  }
164
- export {};
package/types.js CHANGED
@@ -1,47 +1,10 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.ENTITIES = void 0;
7
-
8
- /**
9
- * A definition of the entry that is being prepared for the Elasticsearch.
10
- *
11
- * @category Elasticsearch
12
- * @category CmsEntry
13
- */
14
-
15
- /**
16
- * Arguments for the method that is transforming content entry in its original form to the one we are storing to the Elasticsearch.
17
- *
18
- * @category Elasticsearch
19
- * @category CmsEntry
20
- */
21
-
22
- /**
23
- * Arguments for the method that is transforming content entry from Elasticsearch into the original one.
24
- *
25
- * @category Elasticsearch
26
- * @category CmsEntry
27
- */
28
-
29
- /**
30
- * A plugin defining transformation of entry for Elasticsearch.
31
- *
32
- * @category Plugin
33
- * @category ContentModelField
34
- * @category CmsEntry
35
- * @category Elasticsearch
36
- */
37
- let ENTITIES;
38
- exports.ENTITIES = ENTITIES;
39
-
40
- (function (ENTITIES) {
41
- ENTITIES["SYSTEM"] = "CmsSystem";
42
- ENTITIES["SETTINGS"] = "CmsSettings";
43
- ENTITIES["GROUPS"] = "CmsGroups";
44
- ENTITIES["MODELS"] = "CmsModels";
45
- ENTITIES["ENTRIES"] = "CmsEntries";
46
- ENTITIES["ENTRIES_ES"] = "CmsEntriesElasticsearch";
47
- })(ENTITIES || (exports.ENTITIES = ENTITIES = {}));
1
+ var types_ENTITIES = /*#__PURE__*/ function(ENTITIES) {
2
+ ENTITIES["GROUPS"] = "CmsGroups";
3
+ ENTITIES["MODELS"] = "CmsModels";
4
+ ENTITIES["ENTRIES"] = "CmsEntries";
5
+ ENTITIES["ENTRIES_ES"] = "CmsEntriesElasticsearch";
6
+ return ENTITIES;
7
+ }({});
8
+ export { types_ENTITIES as ENTITIES };
9
+
10
+ //# sourceMappingURL=types.js.map
package/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["ENTITIES"],"sources":["types.ts"],"sourcesContent":["import { Plugin, PluginCollection } from \"@webiny/plugins/types\";\nimport {\n CmsContext as BaseCmsContext,\n CmsEntry,\n CmsModel,\n CmsModelField,\n CmsModelFieldToGraphQLPlugin,\n HeadlessCmsStorageOperations as BaseHeadlessCmsStorageOperations\n} from \"@webiny/api-headless-cms/types\";\nimport { DynamoDBTypes, TableConstructor } from \"dynamodb-toolbox/dist/classes/Table\";\nimport { DocumentClient } from \"aws-sdk/clients/dynamodb\";\nimport {\n EntityAttributeConfig,\n EntityCompositeAttributes\n} from \"dynamodb-toolbox/dist/classes/Entity\";\nimport { Client } from \"@elastic/elasticsearch\";\nimport { Entity, Table } from \"dynamodb-toolbox\";\nimport { PluginsContainer } from \"@webiny/plugins\";\n\n/**\n * A definition of the entry that is being prepared for the Elasticsearch.\n *\n * @category Elasticsearch\n * @category CmsEntry\n */\nexport interface CmsIndexEntry extends CmsEntry {\n /**\n * Values that are not going to be indexed.\n */\n rawValues: Record<string, any>;\n /**\n * A first part of the ID, without the revision.\n * For example, we can search for all the revisions of the given entry.\n */\n primaryId: string;\n /**\n * Dev can add what ever keys they want and need. Just need to be careful not to break the entry.\n */\n [key: string]: any;\n}\n\n/**\n * Arguments for the method that is transforming content entry in its original form to the one we are storing to the Elasticsearch.\n *\n * @category Elasticsearch\n * @category CmsEntry\n */\ninterface CmsModelFieldToElasticsearchToParams {\n plugins: PluginsContainer;\n model: CmsModel;\n field: CmsModelField;\n /**\n * Raw value on the entry - before prepare for storage.\n */\n rawValue: any;\n /**\n * Value prepared for storage received from base api-headless-cms package.\n */\n value: any;\n getFieldIndexPlugin(fieldType: string): CmsModelFieldToElasticsearchPlugin;\n getFieldTypePlugin(fieldType: string): CmsModelFieldToGraphQLPlugin;\n}\n\n/**\n * Arguments for the method that is transforming content entry from Elasticsearch into the original one.\n *\n * @category Elasticsearch\n * @category CmsEntry\n */\ninterface CmsModelFieldToElasticsearchFromParams {\n plugins: PluginsContainer;\n model: CmsModel;\n field: CmsModelField;\n value: any;\n rawValue: any;\n getFieldIndexPlugin(fieldType: string): CmsModelFieldToElasticsearchPlugin;\n getFieldTypePlugin(fieldType: string): CmsModelFieldToGraphQLPlugin;\n}\n\ninterface ToIndexValue {\n /**\n * Use this key to store value for indexing.\n */\n value?: any;\n /**\n * Use this key to tell ES that this value should not be indexed.\n */\n rawValue?: any;\n}\n\n/**\n * A plugin defining transformation of entry for Elasticsearch.\n *\n * @category Plugin\n * @category ContentModelField\n * @category CmsEntry\n * @category Elasticsearch\n */\nexport interface CmsModelFieldToElasticsearchPlugin extends Plugin {\n /**\n * A plugin type\n */\n type: \"cms-model-field-to-elastic-search\";\n /**\n * A unique identifier of the field type (text, number, json, myField, ...).\n *\n * ```ts\n * fieldType: \"myField\"\n * ```\n */\n fieldType: string;\n /**\n * If you need to define a type when building an Elasticsearch query.\n * Check [dateTimeIndexing](https://github.com/webiny/webiny-js/blob/3074165701b8b45e5fc6ac2444caace7d04ada66/packages/api-headless-cms/src/content/plugins/es/indexing/dateTimeIndexing.ts) plugin for usage example.\n *\n * ```ts\n * unmappedType: \"date\"\n * ```\n */\n unmappedType?: (field: CmsModelField) => string;\n /**\n * This is meant to do some transformation of the entry, preferably only to fieldType it was defined for. Nothing is stopping you to do anything you want to other fields, but try to separate field transformations.\n * It returns `Partial<CmsContentIndexEntryType>`. Always return a top-level property of the entry since it is merged via spread operator.\n *\n * ```ts\n * toIndex({ value }) {\n * return {\n * value: value, // This will be stored and indexed\n * rawValue: JSON.stringify(value) // This will be stored but excluded from indexing\n * };\n * }\n * ```\n */\n toIndex?: (params: CmsModelFieldToElasticsearchToParams) => ToIndexValue;\n /**\n * This is meant to revert a transformation done in the `toIndex` method.\n * You have access to \"value\" or a \"rawValue\", depending on what you returned from `toIndex`.\n *\n * ```ts\n * fromIndex({ value, rawValue }) {\n * return JSON.parse(rawValue);\n * }\n * ```\n */\n fromIndex?: (params: CmsModelFieldToElasticsearchFromParams) => any;\n}\n\nexport type AttributeDefinition = DynamoDBTypes | EntityAttributeConfig | EntityCompositeAttributes;\n\nexport type Attributes = Record<string, AttributeDefinition>;\n\nexport enum ENTITIES {\n SYSTEM = \"CmsSystem\",\n SETTINGS = \"CmsSettings\",\n GROUPS = \"CmsGroups\",\n MODELS = \"CmsModels\",\n ENTRIES = \"CmsEntries\",\n ENTRIES_ES = \"CmsEntriesElasticsearch\"\n}\n\nexport interface TableModifier {\n (table: TableConstructor): TableConstructor;\n}\n\nexport interface StorageOperationsFactoryParams {\n documentClient: DocumentClient;\n elasticsearch: Client;\n table?: TableModifier;\n esTable?: TableModifier;\n attributes?: Record<ENTITIES, Attributes>;\n plugins?: PluginCollection;\n}\n\nexport interface HeadlessCmsStorageOperations extends BaseHeadlessCmsStorageOperations<CmsContext> {\n getTable: () => Table;\n getEsTable: () => Table;\n getEntities: () => Record<\n \"system\" | \"settings\" | \"groups\" | \"models\" | \"entries\" | \"entriesEs\",\n Entity<any>\n >;\n}\n\nexport interface StorageOperationsFactory {\n (params: StorageOperationsFactoryParams): HeadlessCmsStorageOperations;\n}\n\nexport interface CmsContext extends BaseCmsContext {\n [key: string]: any;\n}\n"],"mappings":";;;;;;;AAmBA;AACA;AACA;AACA;AACA;AACA;;AAiBA;AACA;AACA;AACA;AACA;AACA;;AAiBA;AACA;AACA;AACA;AACA;AACA;;AAsBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IAsDYA,Q;;;WAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;EAAAA,Q;GAAAA,Q,wBAAAA,Q"}
1
+ {"version":3,"file":"types.js","sources":["../src/types.ts"],"sourcesContent":["import type {\n CmsContext as BaseCmsContext,\n CmsEntry,\n CmsEntryStorageOperations as BaseCmsEntryStorageOperations,\n CmsEntryValues,\n CmsModel,\n HeadlessCmsStorageOperations as BaseHeadlessCmsStorageOperations\n} from \"@webiny/api-headless-cms/types/index.js\";\nimport type { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb/index.js\";\nimport type {\n Client,\n IOpenSearchEntity as IElasticsearchEntity,\n OpenSearchContext\n} from \"@webiny/api-opensearch\";\nimport type { PluginsContainer } from \"@webiny/plugins\";\nimport type { IEntryEntity, IGroupEntity, IModelEntity } from \"~/definitions/types.js\";\nimport type { ITable } from \"@webiny/db-dynamodb\";\n\nexport interface CmsContext extends BaseCmsContext, OpenSearchContext {}\n/**\n * A definition of the entry that is being prepared for the Elasticsearch.\n *\n * @category Elasticsearch\n * @category CmsEntry\n */\nexport interface CmsIndexEntry<T extends CmsEntryValues = CmsEntryValues> extends CmsEntry<T> {\n /**\n * Values that are not going to be indexed.\n */\n rawValues: Partial<T>;\n /**\n * Dev can add whatever keys they want and need. Just need to be careful not to break the entry.\n */\n [key: string]: any;\n}\n\nexport enum ENTITIES {\n GROUPS = \"CmsGroups\",\n MODELS = \"CmsModels\",\n ENTRIES = \"CmsEntries\",\n ENTRIES_ES = \"CmsEntriesElasticsearch\"\n}\n\nexport interface StorageOperationsFactoryParams {\n documentClient: DynamoDBDocument;\n elasticsearch: Client;\n table?: string;\n esTable?: string;\n plugins: PluginsContainer;\n container: CmsContext[\"container\"];\n}\n\nexport interface IGetEntitiesResponse {\n groups: IGroupEntity;\n models: IModelEntity;\n entries: IEntryEntity;\n entriesEs: IElasticsearchEntity;\n}\n\nexport interface HeadlessCmsStorageOperations extends BaseHeadlessCmsStorageOperations {\n getTable: () => ITable;\n getEsTable: () => ITable;\n getEntities: () => IGetEntitiesResponse;\n}\n\nexport interface StorageOperationsFactory {\n (params: StorageOperationsFactoryParams): HeadlessCmsStorageOperations;\n}\n\nexport interface CmsEntryStorageOperations extends BaseCmsEntryStorageOperations {\n dataLoaders: IDataLoadersHandler;\n}\n\nexport interface DataLoadersHandlerInterfaceClearAllParams {\n model: Pick<CmsModel, \"tenant\">;\n}\nexport interface IDataLoadersHandler {\n clearAll: (params?: DataLoadersHandlerInterfaceClearAllParams) => void;\n}\n"],"names":["ENTITIES"],"mappings":"AAoCO,IAAKA,iBAAQA,WAAAA,GAAAA,SAARA,QAAQ;;;;;WAARA"}
@@ -0,0 +1,5 @@
1
+ export declare class NoValueContainer {
2
+ private constructor();
3
+ static create(): NoValueContainer;
4
+ static is(value: unknown): boolean;
5
+ }
@@ -0,0 +1,11 @@
1
+ class NoValueContainer {
2
+ static create() {
3
+ return new NoValueContainer();
4
+ }
5
+ static is(value) {
6
+ return value instanceof NoValueContainer;
7
+ }
8
+ }
9
+ export { NoValueContainer };
10
+
11
+ //# sourceMappingURL=NoValueContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"values/NoValueContainer.js","sources":["../../src/values/NoValueContainer.ts"],"sourcesContent":["export class NoValueContainer {\n private constructor() {\n //\n }\n\n public static create(): NoValueContainer {\n return new NoValueContainer();\n }\n\n public static is(value: unknown): boolean {\n return value instanceof NoValueContainer;\n }\n}\n"],"names":["NoValueContainer","value"],"mappings":"AAAO,MAAMA;IAKT,OAAc,SAA2B;QACrC,OAAO,IAAIA;IACf;IAEA,OAAc,GAAGC,KAAc,EAAW;QACtC,OAAOA,iBAAiBD;IAC5B;AACJ"}
@@ -1,8 +0,0 @@
1
- import { Entity, Table } from "dynamodb-toolbox";
2
- import { Attributes } from "../types";
3
- export interface CreateEntryElasticsearchEntityParams {
4
- table: Table;
5
- entityName: string;
6
- attributes: Attributes;
7
- }
8
- export declare const createEntryElasticsearchEntity: (params: CreateEntryElasticsearchEntityParams) => Entity<any>;
@@ -1,42 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.createEntryElasticsearchEntity = void 0;
9
-
10
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
12
- var _dynamodbToolbox = require("dynamodb-toolbox");
13
-
14
- const createEntryElasticsearchEntity = params => {
15
- const {
16
- table,
17
- entityName,
18
- attributes
19
- } = params;
20
- return new _dynamodbToolbox.Entity({
21
- name: entityName,
22
- table,
23
- attributes: (0, _objectSpread2.default)({
24
- PK: {
25
- type: "string",
26
- partitionKey: true
27
- },
28
- SK: {
29
- type: "string",
30
- sortKey: true
31
- },
32
- index: {
33
- type: "string"
34
- },
35
- data: {
36
- type: "map"
37
- }
38
- }, attributes || {})
39
- });
40
- };
41
-
42
- exports.createEntryElasticsearchEntity = createEntryElasticsearchEntity;
@@ -1 +0,0 @@
1
- {"version":3,"names":["createEntryElasticsearchEntity","params","table","entityName","attributes","Entity","name","PK","type","partitionKey","SK","sortKey","index","data"],"sources":["entryElasticsearch.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\nexport interface CreateEntryElasticsearchEntityParams {\n table: Table;\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 ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AAQO,MAAMA,8BAA8B,GACvCC,MAD0C,IAE5B;EACd,MAAM;IAAEC,KAAF;IAASC,UAAT;IAAqBC;EAArB,IAAoCH,MAA1C;EACA,OAAO,IAAII,uBAAJ,CAAW;IACdC,IAAI,EAAEH,UADQ;IAEdD,KAFc;IAGdE,UAAU;MACNG,EAAE,EAAE;QACAC,IAAI,EAAE,QADN;QAEAC,YAAY,EAAE;MAFd,CADE;MAKNC,EAAE,EAAE;QACAF,IAAI,EAAE,QADN;QAEAG,OAAO,EAAE;MAFT,CALE;MASNC,KAAK,EAAE;QACHJ,IAAI,EAAE;MADH,CATD;MAYNK,IAAI,EAAE;QACFL,IAAI,EAAE;MADJ;IAZA,GAeFJ,UAAU,IAAI,EAfZ;EAHI,CAAX,CAAP;AAqBH,CAzBM"}
@@ -1,8 +0,0 @@
1
- import { Entity, Table } from "dynamodb-toolbox";
2
- import { Attributes } from "../types";
3
- export interface CreateSettingsEntityParams {
4
- table: Table;
5
- entityName: string;
6
- attributes: Attributes;
7
- }
8
- export declare const createSettingsEntity: (params: CreateSettingsEntityParams) => Entity<any>;
@@ -1,58 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.createSettingsEntity = void 0;
9
-
10
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
12
- var _dynamodbToolbox = require("dynamodb-toolbox");
13
-
14
- const createSettingsEntity = params => {
15
- const {
16
- entityName,
17
- table,
18
- attributes
19
- } = params;
20
- return new _dynamodbToolbox.Entity({
21
- name: entityName,
22
- table,
23
- attributes: (0, _objectSpread2.default)({
24
- PK: {
25
- partitionKey: true
26
- },
27
- SK: {
28
- sortKey: true
29
- },
30
- TYPE: {
31
- type: "string"
32
- },
33
- key: {
34
- type: "string"
35
- },
36
- uploadMinFileSize: {
37
- type: "number"
38
- },
39
- uploadMaxFileSize: {
40
- type: "number"
41
- },
42
- srcPrefix: {
43
- type: "string"
44
- },
45
- contentModelLastChange: {
46
- type: "string"
47
- },
48
- tenant: {
49
- type: "string"
50
- },
51
- locale: {
52
- type: "string"
53
- }
54
- }, attributes || {})
55
- });
56
- };
57
-
58
- exports.createSettingsEntity = createSettingsEntity;
@@ -1 +0,0 @@
1
- {"version":3,"names":["createSettingsEntity","params","entityName","table","attributes","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","key","uploadMinFileSize","uploadMaxFileSize","srcPrefix","contentModelLastChange","tenant","locale"],"sources":["settings.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\nexport interface CreateSettingsEntityParams {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createSettingsEntity = (params: CreateSettingsEntityParams): Entity<any> => {\n const { entityName, table, attributes } = 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 TYPE: {\n type: \"string\"\n },\n key: {\n type: \"string\"\n },\n uploadMinFileSize: {\n type: \"number\"\n },\n uploadMaxFileSize: {\n type: \"number\"\n },\n srcPrefix: {\n type: \"string\"\n },\n contentModelLastChange: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AASO,MAAMA,oBAAoB,GAAIC,MAAD,IAAqD;EACrF,MAAM;IAAEC,UAAF;IAAcC,KAAd;IAAqBC;EAArB,IAAoCH,MAA1C;EACA,OAAO,IAAII,uBAAJ,CAAW;IACdC,IAAI,EAAEJ,UADQ;IAEdC,KAFc;IAGdC,UAAU;MACNG,EAAE,EAAE;QACAC,YAAY,EAAE;MADd,CADE;MAINC,EAAE,EAAE;QACAC,OAAO,EAAE;MADT,CAJE;MAONC,IAAI,EAAE;QACFC,IAAI,EAAE;MADJ,CAPA;MAUNC,GAAG,EAAE;QACDD,IAAI,EAAE;MADL,CAVC;MAaNE,iBAAiB,EAAE;QACfF,IAAI,EAAE;MADS,CAbb;MAgBNG,iBAAiB,EAAE;QACfH,IAAI,EAAE;MADS,CAhBb;MAmBNI,SAAS,EAAE;QACPJ,IAAI,EAAE;MADC,CAnBL;MAsBNK,sBAAsB,EAAE;QACpBL,IAAI,EAAE;MADc,CAtBlB;MAyBNM,MAAM,EAAE;QACJN,IAAI,EAAE;MADF,CAzBF;MA4BNO,MAAM,EAAE;QACJP,IAAI,EAAE;MADF;IA5BF,GA+BFR,UAAU,IAAI,EA/BZ;EAHI,CAAX,CAAP;AAqCH,CAvCM"}
@@ -1,8 +0,0 @@
1
- import { Entity, Table } from "dynamodb-toolbox";
2
- import { Attributes } from "../types";
3
- export interface CreateSystemEntityParams {
4
- table: Table;
5
- entityName: string;
6
- attributes: Attributes;
7
- }
8
- export declare const createSystemEntity: (params: CreateSystemEntityParams) => Entity<any>;
@@ -1,46 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.createSystemEntity = void 0;
9
-
10
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
12
- var _dynamodbToolbox = require("dynamodb-toolbox");
13
-
14
- const createSystemEntity = params => {
15
- const {
16
- entityName,
17
- attributes,
18
- table
19
- } = params;
20
- return new _dynamodbToolbox.Entity({
21
- name: entityName,
22
- table,
23
- attributes: (0, _objectSpread2.default)({
24
- PK: {
25
- partitionKey: true
26
- },
27
- SK: {
28
- sortKey: true
29
- },
30
- version: {
31
- type: "string"
32
- },
33
- locale: {
34
- type: "string"
35
- },
36
- tenant: {
37
- type: "string"
38
- },
39
- readAPIKey: {
40
- type: "string"
41
- }
42
- }, attributes || {})
43
- });
44
- };
45
-
46
- exports.createSystemEntity = createSystemEntity;
@@ -1 +0,0 @@
1
- {"version":3,"names":["createSystemEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","version","type","locale","tenant","readAPIKey"],"sources":["system.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\nexport interface CreateSystemEntityParams {\n table: Table;\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":";;;;;;;;;;;AAAA;;AASO,MAAMA,kBAAkB,GAAIC,MAAD,IAAmD;EACjF,MAAM;IAAEC,UAAF;IAAcC,UAAd;IAA0BC;EAA1B,IAAoCH,MAA1C;EACA,OAAO,IAAII,uBAAJ,CAAW;IACdC,IAAI,EAAEJ,UADQ;IAEdE,KAFc;IAGdD,UAAU;MACNI,EAAE,EAAE;QACAC,YAAY,EAAE;MADd,CADE;MAINC,EAAE,EAAE;QACAC,OAAO,EAAE;MADT,CAJE;MAONC,OAAO,EAAE;QACLC,IAAI,EAAE;MADD,CAPH;MAUNC,MAAM,EAAE;QACJD,IAAI,EAAE;MADF,CAVF;MAaNE,MAAM,EAAE;QACJF,IAAI,EAAE;MADF,CAbF;MAgBNG,UAAU,EAAE;QACRH,IAAI,EAAE;MADE;IAhBN,GAmBFT,UAAU,IAAI,EAnBZ;EAHI,CAAX,CAAP;AAyBH,CA3BM"}
@@ -1,8 +0,0 @@
1
- import { TableModifier } from "../types";
2
- import { DocumentClient } from "aws-sdk/clients/dynamodb";
3
- import { Table } from "dynamodb-toolbox";
4
- export interface CreateTableParams {
5
- table?: TableModifier;
6
- documentClient: DocumentClient;
7
- }
8
- export declare const createTable: ({ table, documentClient }: CreateTableParams) => Table;
@@ -1,24 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createTable = void 0;
7
-
8
- var _dynamodbToolbox = require("dynamodb-toolbox");
9
-
10
- const createTable = ({
11
- table,
12
- documentClient
13
- }) => {
14
- const tableConfig = {
15
- name: process.env.DB_TABLE_HEADLESS_CMS || process.env.DB_TABLE,
16
- partitionKey: "PK",
17
- sortKey: "SK",
18
- DocumentClient: documentClient
19
- };
20
- const config = typeof table === "function" ? table(tableConfig) : tableConfig;
21
- return new _dynamodbToolbox.Table(config);
22
- };
23
-
24
- exports.createTable = createTable;
@@ -1 +0,0 @@
1
- {"version":3,"names":["createTable","table","documentClient","tableConfig","name","process","env","DB_TABLE_HEADLESS_CMS","DB_TABLE","partitionKey","sortKey","DocumentClient","config","Table"],"sources":["table.ts"],"sourcesContent":["import { TableModifier } from \"~/types\";\nimport { DocumentClient } from \"aws-sdk/clients/dynamodb\";\nimport { Table } from \"dynamodb-toolbox\";\nimport { TableConstructor } from \"dynamodb-toolbox/dist/classes/Table\";\n\nexport interface CreateTableParams {\n table?: TableModifier;\n documentClient: DocumentClient;\n}\nexport const createTable = ({ table, documentClient }: CreateTableParams): Table => {\n const tableConfig: TableConstructor = {\n name: process.env.DB_TABLE_HEADLESS_CMS || (process.env.DB_TABLE as string),\n partitionKey: \"PK\",\n sortKey: \"SK\",\n DocumentClient: documentClient\n };\n\n const config = typeof table === \"function\" ? table(tableConfig) : tableConfig;\n\n return new Table(config);\n};\n"],"mappings":";;;;;;;AAEA;;AAOO,MAAMA,WAAW,GAAG,CAAC;EAAEC,KAAF;EAASC;AAAT,CAAD,KAAyD;EAChF,MAAMC,WAA6B,GAAG;IAClCC,IAAI,EAAEC,OAAO,CAACC,GAAR,CAAYC,qBAAZ,IAAsCF,OAAO,CAACC,GAAR,CAAYE,QADtB;IAElCC,YAAY,EAAE,IAFoB;IAGlCC,OAAO,EAAE,IAHyB;IAIlCC,cAAc,EAAET;EAJkB,CAAtC;EAOA,MAAMU,MAAM,GAAG,OAAOX,KAAP,KAAiB,UAAjB,GAA8BA,KAAK,CAACE,WAAD,CAAnC,GAAmDA,WAAlE;EAEA,OAAO,IAAIU,sBAAJ,CAAUD,MAAV,CAAP;AACH,CAXM"}
@@ -1,8 +0,0 @@
1
- import { TableModifier } from "../types";
2
- import { DocumentClient } from "aws-sdk/clients/dynamodb";
3
- import { Table } from "dynamodb-toolbox";
4
- export interface CreateElasticsearchTableParams {
5
- table?: TableModifier;
6
- documentClient: DocumentClient;
7
- }
8
- export declare const createElasticsearchTable: ({ table, documentClient }: CreateElasticsearchTableParams) => Table;
@@ -1,24 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createElasticsearchTable = void 0;
7
-
8
- var _dynamodbToolbox = require("dynamodb-toolbox");
9
-
10
- const createElasticsearchTable = ({
11
- table,
12
- documentClient
13
- }) => {
14
- const tableConfig = {
15
- name: process.env.DB_TABLE_ELASTICSEARCH,
16
- partitionKey: "PK",
17
- sortKey: "SK",
18
- DocumentClient: documentClient
19
- };
20
- const config = typeof table === "function" ? table(tableConfig) : tableConfig;
21
- return new _dynamodbToolbox.Table(config);
22
- };
23
-
24
- exports.createElasticsearchTable = createElasticsearchTable;
@@ -1 +0,0 @@
1
- {"version":3,"names":["createElasticsearchTable","table","documentClient","tableConfig","name","process","env","DB_TABLE_ELASTICSEARCH","partitionKey","sortKey","DocumentClient","config","Table"],"sources":["tableElasticsearch.ts"],"sourcesContent":["import { TableModifier } from \"~/types\";\nimport { DocumentClient } from \"aws-sdk/clients/dynamodb\";\nimport { Table } from \"dynamodb-toolbox\";\nimport { TableConstructor } from \"dynamodb-toolbox/dist/classes/Table\";\n\nexport interface CreateElasticsearchTableParams {\n table?: TableModifier;\n documentClient: DocumentClient;\n}\nexport const createElasticsearchTable = ({\n table,\n documentClient\n}: CreateElasticsearchTableParams): Table => {\n const tableConfig: TableConstructor = {\n name: process.env.DB_TABLE_ELASTICSEARCH as string,\n partitionKey: \"PK\",\n sortKey: \"SK\",\n DocumentClient: documentClient\n };\n\n const config = typeof table === \"function\" ? table(tableConfig) : tableConfig;\n\n return new Table(config);\n};\n"],"mappings":";;;;;;;AAEA;;AAOO,MAAMA,wBAAwB,GAAG,CAAC;EACrCC,KADqC;EAErCC;AAFqC,CAAD,KAGK;EACzC,MAAMC,WAA6B,GAAG;IAClCC,IAAI,EAAEC,OAAO,CAACC,GAAR,CAAYC,sBADgB;IAElCC,YAAY,EAAE,IAFoB;IAGlCC,OAAO,EAAE,IAHyB;IAIlCC,cAAc,EAAER;EAJkB,CAAtC;EAOA,MAAMS,MAAM,GAAG,OAAOV,KAAP,KAAiB,UAAjB,GAA8BA,KAAK,CAACE,WAAD,CAAnC,GAAmDA,WAAlE;EAEA,OAAO,IAAIS,sBAAJ,CAAUD,MAAV,CAAP;AACH,CAdM"}
@@ -1,2 +0,0 @@
1
- declare const _default: () => import("@webiny/api-headless-cms").StorageTransformPlugin<any, any>[];
2
- export default _default;
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 = void 0;
7
-
8
- var _richText = require("./storage/richText");
9
-
10
- var _longText = require("./storage/longText");
11
-
12
- var _date = require("./storage/date");
13
-
14
- var _default = () => [(0, _richText.createRichTextStorageTransformPlugin)(), (0, _longText.createLongTextStorageTransformPlugin)(), (0, _date.createDateStorageTransformPlugin)()];
15
-
16
- exports.default = _default;
@@ -1 +0,0 @@
1
- {"version":3,"names":["createRichTextStorageTransformPlugin","createLongTextStorageTransformPlugin","createDateStorageTransformPlugin"],"sources":["index.ts"],"sourcesContent":["import { createRichTextStorageTransformPlugin } from \"./storage/richText\";\nimport { createLongTextStorageTransformPlugin } from \"./storage/longText\";\nimport { createDateStorageTransformPlugin } from \"./storage/date\";\n\nexport default () => [\n createRichTextStorageTransformPlugin(),\n createLongTextStorageTransformPlugin(),\n createDateStorageTransformPlugin()\n];\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;eAEe,MAAM,CACjB,IAAAA,8CAAA,GADiB,EAEjB,IAAAC,8CAAA,GAFiB,EAGjB,IAAAC,sCAAA,GAHiB,C"}
@@ -1,2 +0,0 @@
1
- import { StorageTransformPlugin } from "@webiny/api-headless-cms";
2
- export declare const createDateStorageTransformPlugin: () => StorageTransformPlugin<any, any>;