@webiny/api-headless-cms-ddb-es 0.0.0-unstable.461c047ab7 → 0.0.0-unstable.48a4e5b6c1

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 (432) hide show
  1. package/README.md +6 -30
  2. package/abstractions/CmsDdbEsDataLoaders.d.ts +5 -0
  3. package/abstractions/CmsDdbEsDataLoaders.js +5 -0
  4. package/abstractions/CmsDdbEsDataLoaders.js.map +1 -0
  5. package/abstractions/CmsDdbEsEntriesEsEntity.d.ts +5 -0
  6. package/abstractions/CmsDdbEsEntriesEsEntity.js +5 -0
  7. package/abstractions/CmsDdbEsEntriesEsEntity.js.map +1 -0
  8. package/abstractions/CmsDdbEsEntryEntity.d.ts +5 -0
  9. package/abstractions/CmsDdbEsEntryEntity.js +5 -0
  10. package/abstractions/CmsDdbEsEntryEntity.js.map +1 -0
  11. package/abstractions/CmsDdbEsGroupEntity.d.ts +5 -0
  12. package/abstractions/CmsDdbEsGroupEntity.js +5 -0
  13. package/abstractions/CmsDdbEsGroupEntity.js.map +1 -0
  14. package/abstractions/CmsDdbEsModelEntity.d.ts +5 -0
  15. package/abstractions/CmsDdbEsModelEntity.js +5 -0
  16. package/abstractions/CmsDdbEsModelEntity.js.map +1 -0
  17. package/abstractions/CmsDdbEsOsTable.d.ts +5 -0
  18. package/abstractions/CmsDdbEsOsTable.js +5 -0
  19. package/abstractions/CmsDdbEsOsTable.js.map +1 -0
  20. package/abstractions/CmsDdbEsTable.d.ts +5 -0
  21. package/abstractions/CmsDdbEsTable.js +5 -0
  22. package/abstractions/CmsDdbEsTable.js.map +1 -0
  23. package/debuggerNamespaces.d.ts +12 -0
  24. package/debuggerNamespaces.js +0 -0
  25. package/definitions/entry.d.ts +4 -6
  26. package/definitions/entry.js +8 -179
  27. package/definitions/entry.js.map +1 -1
  28. package/definitions/group.d.ts +6 -7
  29. package/definitions/group.js +8 -63
  30. package/definitions/group.js.map +1 -1
  31. package/definitions/model.d.ts +6 -7
  32. package/definitions/model.js +8 -107
  33. package/definitions/model.js.map +1 -1
  34. package/definitions/types.d.ts +65 -0
  35. package/definitions/types.js +0 -0
  36. package/feature.d.ts +10 -0
  37. package/feature.js +13 -0
  38. package/feature.js.map +1 -0
  39. package/index.d.ts +3 -3
  40. package/index.js +3 -225
  41. package/operations/entry/DdbEsCreateEntry.d.ts +26 -0
  42. package/operations/entry/DdbEsCreateEntry.js +144 -0
  43. package/operations/entry/DdbEsCreateEntry.js.map +1 -0
  44. package/operations/entry/DdbEsCreateEntryRevisionFrom.d.ts +26 -0
  45. package/operations/entry/DdbEsCreateEntryRevisionFrom.js +152 -0
  46. package/operations/entry/DdbEsCreateEntryRevisionFrom.js.map +1 -0
  47. package/operations/entry/DdbEsDeleteEntry.d.ts +18 -0
  48. package/operations/entry/DdbEsDeleteEntry.js +79 -0
  49. package/operations/entry/DdbEsDeleteEntry.js.map +1 -0
  50. package/operations/entry/DdbEsDeleteEntryRevision.d.ts +26 -0
  51. package/operations/entry/DdbEsDeleteEntryRevision.js +152 -0
  52. package/operations/entry/DdbEsDeleteEntryRevision.js.map +1 -0
  53. package/operations/entry/DdbEsDeleteMultipleEntries.d.ts +20 -0
  54. package/operations/entry/DdbEsDeleteMultipleEntries.js +85 -0
  55. package/operations/entry/DdbEsDeleteMultipleEntries.js.map +1 -0
  56. package/operations/entry/DdbEsGetEntriesByIds.d.ts +16 -0
  57. package/operations/entry/DdbEsGetEntriesByIds.js +38 -0
  58. package/operations/entry/DdbEsGetEntriesByIds.js.map +1 -0
  59. package/operations/entry/DdbEsGetEntry.d.ts +16 -0
  60. package/operations/entry/DdbEsGetEntry.js +31 -0
  61. package/operations/entry/DdbEsGetEntry.js.map +1 -0
  62. package/operations/entry/DdbEsGetLatestEntriesByIds.d.ts +16 -0
  63. package/operations/entry/DdbEsGetLatestEntriesByIds.js +38 -0
  64. package/operations/entry/DdbEsGetLatestEntriesByIds.js.map +1 -0
  65. package/operations/entry/DdbEsGetLatestRevisionByEntryId.d.ts +16 -0
  66. package/operations/entry/DdbEsGetLatestRevisionByEntryId.js +41 -0
  67. package/operations/entry/DdbEsGetLatestRevisionByEntryId.js.map +1 -0
  68. package/operations/entry/DdbEsGetPreviousRevision.d.ts +16 -0
  69. package/operations/entry/DdbEsGetPreviousRevision.js +59 -0
  70. package/operations/entry/DdbEsGetPreviousRevision.js.map +1 -0
  71. package/operations/entry/DdbEsGetPublishedEntriesByIds.d.ts +16 -0
  72. package/operations/entry/DdbEsGetPublishedEntriesByIds.js +38 -0
  73. package/operations/entry/DdbEsGetPublishedEntriesByIds.js.map +1 -0
  74. package/operations/entry/DdbEsGetPublishedRevisionByEntryId.d.ts +16 -0
  75. package/operations/entry/DdbEsGetPublishedRevisionByEntryId.js +41 -0
  76. package/operations/entry/DdbEsGetPublishedRevisionByEntryId.js.map +1 -0
  77. package/operations/entry/DdbEsGetRevisionById.d.ts +16 -0
  78. package/operations/entry/DdbEsGetRevisionById.js +41 -0
  79. package/operations/entry/DdbEsGetRevisionById.js.map +1 -0
  80. package/operations/entry/DdbEsGetRevisions.d.ts +16 -0
  81. package/operations/entry/DdbEsGetRevisions.js +40 -0
  82. package/operations/entry/DdbEsGetRevisions.js.map +1 -0
  83. package/operations/entry/DdbEsGetUniqueFieldValues.d.ts +20 -0
  84. package/operations/entry/DdbEsGetUniqueFieldValues.js +81 -0
  85. package/operations/entry/DdbEsGetUniqueFieldValues.js.map +1 -0
  86. package/operations/entry/DdbEsListEntries.d.ts +30 -0
  87. package/operations/entry/DdbEsListEntries.js +114 -0
  88. package/operations/entry/DdbEsListEntries.js.map +1 -0
  89. package/operations/entry/DdbEsMoveEntry.d.ts +20 -0
  90. package/operations/entry/DdbEsMoveEntry.js +113 -0
  91. package/operations/entry/DdbEsMoveEntry.js.map +1 -0
  92. package/operations/entry/DdbEsMoveToBin.d.ts +25 -0
  93. package/operations/entry/DdbEsMoveToBin.js +141 -0
  94. package/operations/entry/DdbEsMoveToBin.js.map +1 -0
  95. package/operations/entry/DdbEsPublishEntry.d.ts +26 -0
  96. package/operations/entry/DdbEsPublishEntry.js +247 -0
  97. package/operations/entry/DdbEsPublishEntry.js.map +1 -0
  98. package/operations/entry/DdbEsRestoreFromBin.d.ts +25 -0
  99. package/operations/entry/DdbEsRestoreFromBin.js +141 -0
  100. package/operations/entry/DdbEsRestoreFromBin.js.map +1 -0
  101. package/operations/entry/DdbEsUnpublishEntry.d.ts +26 -0
  102. package/operations/entry/DdbEsUnpublishEntry.js +140 -0
  103. package/operations/entry/DdbEsUnpublishEntry.js.map +1 -0
  104. package/operations/entry/DdbEsUpdateEntry.d.ts +26 -0
  105. package/operations/entry/DdbEsUpdateEntry.js +191 -0
  106. package/operations/entry/DdbEsUpdateEntry.js.map +1 -0
  107. package/operations/entry/dataLoader/DataLoaderCache.d.ts +1 -2
  108. package/operations/entry/dataLoader/DataLoaderCache.js +21 -35
  109. package/operations/entry/dataLoader/DataLoaderCache.js.map +1 -1
  110. package/operations/entry/dataLoader/constants.js +2 -7
  111. package/operations/entry/dataLoader/constants.js.map +1 -1
  112. package/operations/entry/dataLoader/createBatchScheduleFn.js +7 -22
  113. package/operations/entry/dataLoader/createBatchScheduleFn.js.map +1 -1
  114. package/operations/entry/dataLoader/getAllEntryRevisions.d.ts +3 -3
  115. package/operations/entry/dataLoader/getAllEntryRevisions.js +20 -41
  116. package/operations/entry/dataLoader/getAllEntryRevisions.js.map +1 -1
  117. package/operations/entry/dataLoader/getLatestRevisionByEntryId.d.ts +3 -3
  118. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js +30 -48
  119. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js.map +1 -1
  120. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.d.ts +3 -3
  121. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js +30 -48
  122. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js.map +1 -1
  123. package/operations/entry/dataLoader/getRevisionById.d.ts +3 -3
  124. package/operations/entry/dataLoader/getRevisionById.js +36 -58
  125. package/operations/entry/dataLoader/getRevisionById.js.map +1 -1
  126. package/operations/entry/dataLoader/index.d.ts +3 -3
  127. package/operations/entry/dataLoader/index.js +13 -35
  128. package/operations/entry/dataLoader/index.js.map +1 -1
  129. package/operations/entry/dataLoader/types.d.ts +4 -4
  130. package/operations/entry/dataLoader/types.js +0 -7
  131. package/operations/entry/dataLoaders.d.ts +14 -14
  132. package/operations/entry/dataLoaders.js +92 -110
  133. package/operations/entry/dataLoaders.js.map +1 -1
  134. package/operations/entry/feature.d.ts +4 -0
  135. package/operations/entry/feature.js +55 -0
  136. package/operations/entry/feature.js.map +1 -0
  137. package/operations/entry/keys.d.ts +32 -1
  138. package/operations/entry/keys.js +44 -27
  139. package/operations/entry/keys.js.map +1 -1
  140. package/operations/entry/recordType.js +4 -18
  141. package/operations/entry/recordType.js.map +1 -1
  142. package/operations/entry/storageEntryUtils.d.ts +7 -0
  143. package/operations/entry/storageEntryUtils.js +14 -0
  144. package/operations/entry/storageEntryUtils.js.map +1 -0
  145. package/operations/entry/transformations/convertEntryKeys.d.ts +6 -6
  146. package/operations/entry/transformations/convertEntryKeys.js +21 -34
  147. package/operations/entry/transformations/convertEntryKeys.js.map +1 -1
  148. package/operations/entry/transformations/index.d.ts +21 -18
  149. package/operations/entry/transformations/index.js +87 -123
  150. package/operations/entry/transformations/index.js.map +1 -1
  151. package/operations/entry/transformations/modifyEntryValues.d.ts +30 -35
  152. package/operations/entry/transformations/modifyEntryValues.js +12 -24
  153. package/operations/entry/transformations/modifyEntryValues.js.map +1 -1
  154. package/operations/entry/transformations/transformEntryKeys.d.ts +8 -8
  155. package/operations/entry/transformations/transformEntryKeys.js +14 -24
  156. package/operations/entry/transformations/transformEntryKeys.js.map +1 -1
  157. package/operations/group/DdbEsCreateGroup.d.ts +14 -0
  158. package/operations/group/DdbEsCreateGroup.js +45 -0
  159. package/operations/group/DdbEsCreateGroup.js.map +1 -0
  160. package/operations/group/DdbEsDeleteGroup.d.ts +14 -0
  161. package/operations/group/DdbEsDeleteGroup.js +38 -0
  162. package/operations/group/DdbEsDeleteGroup.js.map +1 -0
  163. package/operations/group/DdbEsGetGroup.d.ts +14 -0
  164. package/operations/group/DdbEsGetGroup.js +38 -0
  165. package/operations/group/DdbEsGetGroup.js.map +1 -0
  166. package/operations/group/DdbEsListGroups.d.ts +16 -0
  167. package/operations/group/DdbEsListGroups.js +58 -0
  168. package/operations/group/DdbEsListGroups.js.map +1 -0
  169. package/operations/group/DdbEsUpdateGroup.d.ts +14 -0
  170. package/operations/group/DdbEsUpdateGroup.js +45 -0
  171. package/operations/group/DdbEsUpdateGroup.js.map +1 -0
  172. package/operations/group/feature.d.ts +4 -0
  173. package/operations/group/feature.js +19 -0
  174. package/operations/group/feature.js.map +1 -0
  175. package/operations/group/keys.d.ts +15 -0
  176. package/operations/group/keys.js +17 -0
  177. package/operations/group/keys.js.map +1 -0
  178. package/operations/model/DdbEsCreateModel.d.ts +18 -0
  179. package/operations/model/DdbEsCreateModel.js +66 -0
  180. package/operations/model/DdbEsCreateModel.js.map +1 -0
  181. package/operations/model/DdbEsDeleteModel.d.ts +14 -0
  182. package/operations/model/DdbEsDeleteModel.js +38 -0
  183. package/operations/model/DdbEsDeleteModel.js.map +1 -0
  184. package/operations/model/DdbEsGetModel.d.ts +14 -0
  185. package/operations/model/DdbEsGetModel.js +37 -0
  186. package/operations/model/DdbEsGetModel.js.map +1 -0
  187. package/operations/model/DdbEsListModels.d.ts +14 -0
  188. package/operations/model/DdbEsListModels.js +41 -0
  189. package/operations/model/DdbEsListModels.js.map +1 -0
  190. package/operations/model/DdbEsUpdateModel.d.ts +14 -0
  191. package/operations/model/DdbEsUpdateModel.js +46 -0
  192. package/operations/model/DdbEsUpdateModel.js.map +1 -0
  193. package/operations/model/feature.d.ts +4 -0
  194. package/operations/model/feature.js +19 -0
  195. package/operations/model/feature.js.map +1 -0
  196. package/operations/model/keys.d.ts +15 -0
  197. package/operations/model/keys.js +17 -0
  198. package/operations/model/keys.js.map +1 -0
  199. package/package.json +40 -36
  200. package/registry/CmsEntitiesDbRegistryDecorator.d.ts +27 -0
  201. package/registry/CmsEntitiesDbRegistryDecorator.js +46 -0
  202. package/registry/CmsEntitiesDbRegistryDecorator.js.map +1 -0
  203. package/storageFeature.d.ts +12 -0
  204. package/storageFeature.js +25 -0
  205. package/storageFeature.js.map +1 -0
  206. package/tablesFeature.d.ts +8 -0
  207. package/tablesFeature.js +53 -0
  208. package/tablesFeature.js.map +1 -0
  209. package/tasks/CreateElasticsearchIndexTask.d.ts +15 -0
  210. package/tasks/CreateElasticsearchIndexTask.js +49 -0
  211. package/tasks/CreateElasticsearchIndexTask.js.map +1 -0
  212. package/types.d.ts +12 -159
  213. package/types.js +7 -39
  214. package/types.js.map +1 -1
  215. package/configurations.d.ts +0 -19
  216. package/configurations.js +0 -49
  217. package/configurations.js.map +0 -1
  218. package/definitions/entryElasticsearch.d.ts +0 -9
  219. package/definitions/entryElasticsearch.js +0 -41
  220. package/definitions/entryElasticsearch.js.map +0 -1
  221. package/definitions/system.d.ts +0 -9
  222. package/definitions/system.js +0 -42
  223. package/definitions/system.js.map +0 -1
  224. package/definitions/table.d.ts +0 -8
  225. package/definitions/table.js +0 -25
  226. package/definitions/table.js.map +0 -1
  227. package/definitions/tableElasticsearch.d.ts +0 -8
  228. package/definitions/tableElasticsearch.js +0 -25
  229. package/definitions/tableElasticsearch.js.map +0 -1
  230. package/dynamoDb/index.d.ts +0 -3
  231. package/dynamoDb/index.js +0 -16
  232. package/dynamoDb/index.js.map +0 -1
  233. package/dynamoDb/storage/longText.d.ts +0 -10
  234. package/dynamoDb/storage/longText.js +0 -96
  235. package/dynamoDb/storage/longText.js.map +0 -1
  236. package/dynamoDb/storage/richText.d.ts +0 -2
  237. package/dynamoDb/storage/richText.js +0 -59
  238. package/dynamoDb/storage/richText.js.map +0 -1
  239. package/elasticsearch/createElasticsearchIndex.d.ts +0 -9
  240. package/elasticsearch/createElasticsearchIndex.js +0 -40
  241. package/elasticsearch/createElasticsearchIndex.js.map +0 -1
  242. package/elasticsearch/deleteElasticsearchIndex.d.ts +0 -8
  243. package/elasticsearch/deleteElasticsearchIndex.js +0 -38
  244. package/elasticsearch/deleteElasticsearchIndex.js.map +0 -1
  245. package/elasticsearch/index.d.ts +0 -2
  246. package/elasticsearch/index.js +0 -13
  247. package/elasticsearch/index.js.map +0 -1
  248. package/elasticsearch/indexing/dateTimeIndexing.d.ts +0 -3
  249. package/elasticsearch/indexing/dateTimeIndexing.js +0 -88
  250. package/elasticsearch/indexing/dateTimeIndexing.js.map +0 -1
  251. package/elasticsearch/indexing/defaultFieldIndexing.d.ts +0 -3
  252. package/elasticsearch/indexing/defaultFieldIndexing.js +0 -54
  253. package/elasticsearch/indexing/defaultFieldIndexing.js.map +0 -1
  254. package/elasticsearch/indexing/index.d.ts +0 -2
  255. package/elasticsearch/indexing/index.js +0 -18
  256. package/elasticsearch/indexing/index.js.map +0 -1
  257. package/elasticsearch/indexing/jsonIndexing.d.ts +0 -2
  258. package/elasticsearch/indexing/jsonIndexing.js +0 -28
  259. package/elasticsearch/indexing/jsonIndexing.js.map +0 -1
  260. package/elasticsearch/indexing/longTextIndexing.d.ts +0 -7
  261. package/elasticsearch/indexing/longTextIndexing.js +0 -42
  262. package/elasticsearch/indexing/longTextIndexing.js.map +0 -1
  263. package/elasticsearch/indexing/numberIndexing.d.ts +0 -3
  264. package/elasticsearch/indexing/numberIndexing.js +0 -41
  265. package/elasticsearch/indexing/numberIndexing.js.map +0 -1
  266. package/elasticsearch/indexing/objectIndexing.d.ts +0 -12
  267. package/elasticsearch/indexing/objectIndexing.js +0 -201
  268. package/elasticsearch/indexing/objectIndexing.js.map +0 -1
  269. package/elasticsearch/indexing/richTextIndexing.d.ts +0 -3
  270. package/elasticsearch/indexing/richTextIndexing.js +0 -31
  271. package/elasticsearch/indexing/richTextIndexing.js.map +0 -1
  272. package/elasticsearch/indices/base.d.ts +0 -2
  273. package/elasticsearch/indices/base.js +0 -13
  274. package/elasticsearch/indices/base.js.map +0 -1
  275. package/elasticsearch/indices/index.d.ts +0 -1
  276. package/elasticsearch/indices/index.js +0 -14
  277. package/elasticsearch/indices/index.js.map +0 -1
  278. package/elasticsearch/indices/japanese.d.ts +0 -2
  279. package/elasticsearch/indices/japanese.js +0 -14
  280. package/elasticsearch/indices/japanese.js.map +0 -1
  281. package/elasticsearch/search/index.d.ts +0 -3
  282. package/elasticsearch/search/index.js +0 -12
  283. package/elasticsearch/search/index.js.map +0 -1
  284. package/elasticsearch/search/refSearch.d.ts +0 -2
  285. package/elasticsearch/search/refSearch.js +0 -31
  286. package/elasticsearch/search/refSearch.js.map +0 -1
  287. package/elasticsearch/search/timeSearch.d.ts +0 -2
  288. package/elasticsearch/search/timeSearch.js +0 -27
  289. package/elasticsearch/search/timeSearch.js.map +0 -1
  290. package/helpers/entryIndexHelpers.d.ts +0 -18
  291. package/helpers/entryIndexHelpers.js +0 -190
  292. package/helpers/entryIndexHelpers.js.map +0 -1
  293. package/helpers/fieldIdentifier.d.ts +0 -6
  294. package/helpers/fieldIdentifier.js +0 -43
  295. package/helpers/fieldIdentifier.js.map +0 -1
  296. package/helpers/index.d.ts +0 -2
  297. package/helpers/index.js +0 -29
  298. package/helpers/index.js.map +0 -1
  299. package/index.js.map +0 -1
  300. package/operations/entry/dataLoader/types.js.map +0 -1
  301. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.d.ts +0 -18
  302. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js +0 -34
  303. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js.map +0 -1
  304. package/operations/entry/elasticsearch/body.d.ts +0 -13
  305. package/operations/entry/elasticsearch/body.js +0 -142
  306. package/operations/entry/elasticsearch/body.js.map +0 -1
  307. package/operations/entry/elasticsearch/fields.d.ts +0 -10
  308. package/operations/entry/elasticsearch/fields.js +0 -315
  309. package/operations/entry/elasticsearch/fields.js.map +0 -1
  310. package/operations/entry/elasticsearch/filtering/applyFiltering.d.ts +0 -8
  311. package/operations/entry/elasticsearch/filtering/applyFiltering.js +0 -59
  312. package/operations/entry/elasticsearch/filtering/applyFiltering.js.map +0 -1
  313. package/operations/entry/elasticsearch/filtering/exec.d.ts +0 -17
  314. package/operations/entry/elasticsearch/filtering/exec.js +0 -175
  315. package/operations/entry/elasticsearch/filtering/exec.js.map +0 -1
  316. package/operations/entry/elasticsearch/filtering/index.d.ts +0 -1
  317. package/operations/entry/elasticsearch/filtering/index.js +0 -18
  318. package/operations/entry/elasticsearch/filtering/index.js.map +0 -1
  319. package/operations/entry/elasticsearch/filtering/path.d.ts +0 -15
  320. package/operations/entry/elasticsearch/filtering/path.js +0 -46
  321. package/operations/entry/elasticsearch/filtering/path.js.map +0 -1
  322. package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.d.ts +0 -2
  323. package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js +0 -30
  324. package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js.map +0 -1
  325. package/operations/entry/elasticsearch/filtering/plugins/index.d.ts +0 -1
  326. package/operations/entry/elasticsearch/filtering/plugins/index.js +0 -15
  327. package/operations/entry/elasticsearch/filtering/plugins/index.js.map +0 -1
  328. package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.d.ts +0 -2
  329. package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js +0 -69
  330. package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js.map +0 -1
  331. package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.d.ts +0 -2
  332. package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js +0 -57
  333. package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js.map +0 -1
  334. package/operations/entry/elasticsearch/filtering/populated.d.ts +0 -2
  335. package/operations/entry/elasticsearch/filtering/populated.js +0 -25
  336. package/operations/entry/elasticsearch/filtering/populated.js.map +0 -1
  337. package/operations/entry/elasticsearch/filtering/values.d.ts +0 -2
  338. package/operations/entry/elasticsearch/filtering/values.js +0 -24
  339. package/operations/entry/elasticsearch/filtering/values.js.map +0 -1
  340. package/operations/entry/elasticsearch/fullTextSearch.d.ts +0 -12
  341. package/operations/entry/elasticsearch/fullTextSearch.js +0 -91
  342. package/operations/entry/elasticsearch/fullTextSearch.js.map +0 -1
  343. package/operations/entry/elasticsearch/fullTextSearchFields.d.ts +0 -8
  344. package/operations/entry/elasticsearch/fullTextSearchFields.js +0 -27
  345. package/operations/entry/elasticsearch/fullTextSearchFields.js.map +0 -1
  346. package/operations/entry/elasticsearch/initialQuery.d.ts +0 -17
  347. package/operations/entry/elasticsearch/initialQuery.js +0 -106
  348. package/operations/entry/elasticsearch/initialQuery.js.map +0 -1
  349. package/operations/entry/elasticsearch/keyword.d.ts +0 -2
  350. package/operations/entry/elasticsearch/keyword.js +0 -36
  351. package/operations/entry/elasticsearch/keyword.js.map +0 -1
  352. package/operations/entry/elasticsearch/logIgnoredEsResponseError.d.ts +0 -9
  353. package/operations/entry/elasticsearch/logIgnoredEsResponseError.js +0 -26
  354. package/operations/entry/elasticsearch/logIgnoredEsResponseError.js.map +0 -1
  355. package/operations/entry/elasticsearch/plugins/bodyModifier.d.ts +0 -9
  356. package/operations/entry/elasticsearch/plugins/bodyModifier.js +0 -18
  357. package/operations/entry/elasticsearch/plugins/bodyModifier.js.map +0 -1
  358. package/operations/entry/elasticsearch/plugins/operator.d.ts +0 -8
  359. package/operations/entry/elasticsearch/plugins/operator.js +0 -39
  360. package/operations/entry/elasticsearch/plugins/operator.js.map +0 -1
  361. package/operations/entry/elasticsearch/plugins/queryModifier.d.ts +0 -9
  362. package/operations/entry/elasticsearch/plugins/queryModifier.js +0 -18
  363. package/operations/entry/elasticsearch/plugins/queryModifier.js.map +0 -1
  364. package/operations/entry/elasticsearch/plugins/search.d.ts +0 -7
  365. package/operations/entry/elasticsearch/plugins/search.js +0 -26
  366. package/operations/entry/elasticsearch/plugins/search.js.map +0 -1
  367. package/operations/entry/elasticsearch/plugins/sortModifier.d.ts +0 -9
  368. package/operations/entry/elasticsearch/plugins/sortModifier.js +0 -18
  369. package/operations/entry/elasticsearch/plugins/sortModifier.js.map +0 -1
  370. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.d.ts +0 -2
  371. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js +0 -13
  372. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js.map +0 -1
  373. package/operations/entry/elasticsearch/sort.d.ts +0 -12
  374. package/operations/entry/elasticsearch/sort.js +0 -87
  375. package/operations/entry/elasticsearch/sort.js.map +0 -1
  376. package/operations/entry/elasticsearch/transformValueForSearch.d.ts +0 -16
  377. package/operations/entry/elasticsearch/transformValueForSearch.js +0 -32
  378. package/operations/entry/elasticsearch/transformValueForSearch.js.map +0 -1
  379. package/operations/entry/elasticsearch/types.d.ts +0 -41
  380. package/operations/entry/elasticsearch/types.js +0 -7
  381. package/operations/entry/elasticsearch/types.js.map +0 -1
  382. package/operations/entry/index.d.ts +0 -11
  383. package/operations/entry/index.js +0 -1881
  384. package/operations/entry/index.js.map +0 -1
  385. package/operations/entry/transformations/transformEntryToIndex.d.ts +0 -10
  386. package/operations/entry/transformations/transformEntryToIndex.js +0 -31
  387. package/operations/entry/transformations/transformEntryToIndex.js.map +0 -1
  388. package/operations/group/index.d.ts +0 -8
  389. package/operations/group/index.js +0 -179
  390. package/operations/group/index.js.map +0 -1
  391. package/operations/model/index.d.ts +0 -8
  392. package/operations/model/index.js +0 -183
  393. package/operations/model/index.js.map +0 -1
  394. package/operations/system/index.d.ts +0 -6
  395. package/operations/system/index.js +0 -94
  396. package/operations/system/index.js.map +0 -1
  397. package/operations/system/indexes.d.ts +0 -10
  398. package/operations/system/indexes.js +0 -41
  399. package/operations/system/indexes.js.map +0 -1
  400. package/plugins/CmsElasticsearchModelFieldPlugin.d.ts +0 -69
  401. package/plugins/CmsElasticsearchModelFieldPlugin.js +0 -52
  402. package/plugins/CmsElasticsearchModelFieldPlugin.js.map +0 -1
  403. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.d.ts +0 -22
  404. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js +0 -21
  405. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js.map +0 -1
  406. package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.d.ts +0 -23
  407. package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js +0 -27
  408. package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js.map +0 -1
  409. package/plugins/CmsEntryElasticsearchIndexPlugin.d.ts +0 -4
  410. package/plugins/CmsEntryElasticsearchIndexPlugin.js +0 -13
  411. package/plugins/CmsEntryElasticsearchIndexPlugin.js.map +0 -1
  412. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.d.ts +0 -31
  413. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js +0 -40
  414. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js.map +0 -1
  415. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.d.ts +0 -19
  416. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js +0 -21
  417. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js.map +0 -1
  418. package/plugins/CmsEntryElasticsearchSortModifierPlugin.d.ts +0 -19
  419. package/plugins/CmsEntryElasticsearchSortModifierPlugin.js +0 -21
  420. package/plugins/CmsEntryElasticsearchSortModifierPlugin.js.map +0 -1
  421. package/plugins/CmsEntryElasticsearchValuesModifier.d.ts +0 -33
  422. package/plugins/CmsEntryElasticsearchValuesModifier.js +0 -50
  423. package/plugins/CmsEntryElasticsearchValuesModifier.js.map +0 -1
  424. package/plugins/CmsEntryFilterPlugin.d.ts +0 -49
  425. package/plugins/CmsEntryFilterPlugin.js +0 -22
  426. package/plugins/CmsEntryFilterPlugin.js.map +0 -1
  427. package/plugins/index.d.ts +0 -8
  428. package/plugins/index.js +0 -95
  429. package/plugins/index.js.map +0 -1
  430. package/tasks/createIndexTaskPlugin.d.ts +0 -2
  431. package/tasks/createIndexTaskPlugin.js +0 -67
  432. package/tasks/createIndexTaskPlugin.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["_toolbox","require","createModelEntity","params","table","attributes","entityName","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","required","webinyVersion","modelId","singularApiName","pluralApiName","locale","group","icon","description","createdOn","savedOn","createdBy","fields","layout","tags","default","lockedFields","titleFieldId","descriptionFieldId","imageFieldId","tenant","exports"],"sources":["model.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 CreateModelEntityParams {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createModelEntity = (params: CreateModelEntityParams): Entity<any> => {\n const { table, attributes, entityName } = 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 required: true\n },\n webinyVersion: {\n type: \"string\",\n required: true\n },\n name: {\n type: \"string\",\n required: true\n },\n modelId: {\n type: \"string\",\n required: true\n },\n singularApiName: {\n type: \"string\",\n required: true\n },\n pluralApiName: {\n type: \"string\",\n required: true\n },\n locale: {\n type: \"string\",\n required: true\n },\n group: {\n type: \"map\",\n required: true\n },\n icon: {\n type: \"string\"\n },\n description: {\n type: \"string\"\n },\n createdOn: {\n type: \"string\",\n required: true\n },\n savedOn: {\n type: \"string\",\n required: true\n },\n createdBy: {\n type: \"map\",\n required: true\n },\n fields: {\n type: \"list\",\n required: true\n },\n layout: {\n type: \"list\",\n required: true\n },\n tags: {\n type: \"list\",\n required: false,\n default: []\n },\n lockedFields: {\n type: \"list\",\n required: true\n },\n titleFieldId: {\n type: \"string\"\n },\n descriptionFieldId: {\n type: \"string\"\n },\n imageFieldId: {\n type: \"string\"\n },\n tenant: {\n type: \"string\",\n required: true\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,iBAAiB,GAAIC,MAA+B,IAAkB;EAC/E,MAAM;IAAEC,KAAK;IAAEC,UAAU;IAAEC;EAAW,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEF,UAAU;IAChBF,KAAK;IACLC,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE,QAAQ;QACdC,QAAQ,EAAE;MACd,CAAC;MACDC,aAAa,EAAE;QACXF,IAAI,EAAE,QAAQ;QACdC,QAAQ,EAAE;MACd,CAAC;MACDP,IAAI,EAAE;QACFM,IAAI,EAAE,QAAQ;QACdC,QAAQ,EAAE;MACd,CAAC;MACDE,OAAO,EAAE;QACLH,IAAI,EAAE,QAAQ;QACdC,QAAQ,EAAE;MACd,CAAC;MACDG,eAAe,EAAE;QACbJ,IAAI,EAAE,QAAQ;QACdC,QAAQ,EAAE;MACd,CAAC;MACDI,aAAa,EAAE;QACXL,IAAI,EAAE,QAAQ;QACdC,QAAQ,EAAE;MACd,CAAC;MACDK,MAAM,EAAE;QACJN,IAAI,EAAE,QAAQ;QACdC,QAAQ,EAAE;MACd,CAAC;MACDM,KAAK,EAAE;QACHP,IAAI,EAAE,KAAK;QACXC,QAAQ,EAAE;MACd,CAAC;MACDO,IAAI,EAAE;QACFR,IAAI,EAAE;MACV,CAAC;MACDS,WAAW,EAAE;QACTT,IAAI,EAAE;MACV,CAAC;MACDU,SAAS,EAAE;QACPV,IAAI,EAAE,QAAQ;QACdC,QAAQ,EAAE;MACd,CAAC;MACDU,OAAO,EAAE;QACLX,IAAI,EAAE,QAAQ;QACdC,QAAQ,EAAE;MACd,CAAC;MACDW,SAAS,EAAE;QACPZ,IAAI,EAAE,KAAK;QACXC,QAAQ,EAAE;MACd,CAAC;MACDY,MAAM,EAAE;QACJb,IAAI,EAAE,MAAM;QACZC,QAAQ,EAAE;MACd,CAAC;MACDa,MAAM,EAAE;QACJd,IAAI,EAAE,MAAM;QACZC,QAAQ,EAAE;MACd,CAAC;MACDc,IAAI,EAAE;QACFf,IAAI,EAAE,MAAM;QACZC,QAAQ,EAAE,KAAK;QACfe,OAAO,EAAE;MACb,CAAC;MACDC,YAAY,EAAE;QACVjB,IAAI,EAAE,MAAM;QACZC,QAAQ,EAAE;MACd,CAAC;MACDiB,YAAY,EAAE;QACVlB,IAAI,EAAE;MACV,CAAC;MACDmB,kBAAkB,EAAE;QAChBnB,IAAI,EAAE;MACV,CAAC;MACDoB,YAAY,EAAE;QACVpB,IAAI,EAAE;MACV,CAAC;MACDqB,MAAM,EAAE;QACJrB,IAAI,EAAE,QAAQ;QACdC,QAAQ,EAAE;MACd,CAAC;MACD,IAAIV,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAAC+B,OAAA,CAAAlC,iBAAA,GAAAA,iBAAA","ignoreList":[]}
1
+ {"version":3,"file":"definitions/model.js","sources":["../../src/definitions/model.ts"],"sourcesContent":["import { createStandardEntity, type ITable } from \"@webiny/db-dynamodb\";\nimport type { IModelEntity } from \"~/definitions/types.js\";\nimport type { StorageCmsModel } from \"@webiny/api-headless-cms/types/index.js\";\n\ninterface Params {\n table: ITable;\n entityName: string;\n}\n\nexport const createModelEntity = (params: Params): IModelEntity => {\n const { table, entityName } = params;\n return createStandardEntity<StorageCmsModel>({\n table: table.table,\n name: entityName\n });\n};\n"],"names":["createModelEntity","params","table","entityName","createStandardEntity"],"mappings":";AASO,MAAMA,oBAAoB,CAACC;IAC9B,MAAM,EAAEC,KAAK,EAAEC,UAAU,EAAE,GAAGF;IAC9B,OAAOG,qBAAsC;QACzC,OAAOF,MAAM,KAAK;QAClB,MAAMC;IACV;AACJ"}
@@ -0,0 +1,65 @@
1
+ import type { IEntity, IStandardEntityAttributes } from "@webiny/db-dynamodb";
2
+ import type { GenericRecord } from "@webiny/api/types.js";
3
+ import type { CmsEntryStatus, CmsGroup, CmsIdentity, ICmsEntryLive, ICmsEntryLocation, ICmsEntrySystem, StorageCmsModel } from "@webiny/api-headless-cms/types/index.js";
4
+ export interface IEntryEntityAttributesData {
5
+ tenant: string;
6
+ entryId: string;
7
+ id: string;
8
+ modelId: string;
9
+ /**
10
+ * Revision-level meta fields. 👇
11
+ */
12
+ revisionCreatedOn: string;
13
+ revisionModifiedOn: string | null;
14
+ revisionSavedOn: string;
15
+ revisionDeletedOn: string | null;
16
+ revisionRestoredOn: string | null;
17
+ revisionFirstPublishedOn: string | null;
18
+ revisionLastPublishedOn: string | null;
19
+ revisionCreatedBy: CmsIdentity;
20
+ revisionModifiedBy: CmsIdentity | null;
21
+ revisionSavedBy: CmsIdentity;
22
+ revisionDeletedBy: CmsIdentity | null;
23
+ revisionRestoredBy: CmsIdentity | null;
24
+ revisionFirstPublishedBy: CmsIdentity | null;
25
+ revisionLastPublishedBy: CmsIdentity | null;
26
+ /**
27
+ * Entry-level meta fields. 👇
28
+ */
29
+ createdOn: string;
30
+ modifiedOn: string | null;
31
+ savedOn: string;
32
+ deletedOn: string | null;
33
+ restoredOn: string | null;
34
+ firstPublishedOn: string | null;
35
+ lastPublishedOn: string | null;
36
+ createdBy: CmsIdentity;
37
+ modifiedBy: CmsIdentity | null;
38
+ savedBy: CmsIdentity;
39
+ deletedBy: CmsIdentity | null;
40
+ restoredBy: CmsIdentity | null;
41
+ firstPublishedBy: CmsIdentity | null;
42
+ lastPublishedBy: CmsIdentity | null;
43
+ /**
44
+ * The rest. 👇
45
+ */
46
+ version: number;
47
+ locked: boolean;
48
+ status: CmsEntryStatus;
49
+ location?: ICmsEntryLocation;
50
+ wbyDeleted?: boolean | null;
51
+ binOriginalFolderId?: string;
52
+ values: GenericRecord;
53
+ meta?: GenericRecord;
54
+ system?: ICmsEntrySystem;
55
+ live: ICmsEntryLive | null;
56
+ revisionDescription: string | undefined;
57
+ /**
58
+ * A timestamp of when the entry should be automatically deleted from the database.
59
+ */
60
+ expiresAt: number | null;
61
+ }
62
+ export type IEntryEntityAttributes = IStandardEntityAttributes<IEntryEntityAttributesData>;
63
+ export type IModelEntity = IEntity<IStandardEntityAttributes<StorageCmsModel>>;
64
+ export type IGroupEntity = IEntity<IStandardEntityAttributes<CmsGroup>>;
65
+ export type IEntryEntity = IEntity<IEntryEntityAttributes>;
File without changes
package/feature.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ /**
2
+ * DynamoDB+OpenSearch CMS storage in one container: the tables and entities, and the storage. A
3
+ * composition registers the two apart: the tables and entities once, in the root
4
+ * (`HeadlessCmsDdbEsTablesFeature`), and the storage in each tenant scope on this storage
5
+ * (`HeadlessCmsDdbEsStorageFeature`).
6
+ */
7
+ export declare const HeadlessCmsDdbEsFeature: {
8
+ name: string;
9
+ register(container: import("@webiny/di").Container): void;
10
+ };
package/feature.js ADDED
@@ -0,0 +1,13 @@
1
+ import { createFeature } from "@webiny/feature/api/index.js";
2
+ import { HeadlessCmsDdbEsTablesFeature } from "./tablesFeature.js";
3
+ import { HeadlessCmsDdbEsStorageFeature } from "./storageFeature.js";
4
+ const HeadlessCmsDdbEsFeature = createFeature({
5
+ name: "cms.storageOperations.openSearch",
6
+ register: (container)=>{
7
+ HeadlessCmsDdbEsTablesFeature.register(container);
8
+ HeadlessCmsDdbEsStorageFeature.register(container);
9
+ }
10
+ });
11
+ export { HeadlessCmsDdbEsFeature };
12
+
13
+ //# sourceMappingURL=feature.js.map
package/feature.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature.js","sources":["../src/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/api/index.js\";\nimport { HeadlessCmsDdbEsTablesFeature } from \"./tablesFeature.js\";\nimport { HeadlessCmsDdbEsStorageFeature } from \"./storageFeature.js\";\n\n/**\n * DynamoDB+OpenSearch CMS storage in one container: the tables and entities, and the storage. A\n * composition registers the two apart: the tables and entities once, in the root\n * (`HeadlessCmsDdbEsTablesFeature`), and the storage in each tenant scope on this storage\n * (`HeadlessCmsDdbEsStorageFeature`).\n */\nexport const HeadlessCmsDdbEsFeature = createFeature({\n name: \"cms.storageOperations.openSearch\",\n register: container => {\n HeadlessCmsDdbEsTablesFeature.register(container);\n HeadlessCmsDdbEsStorageFeature.register(container);\n }\n});\n"],"names":["HeadlessCmsDdbEsFeature","createFeature","container","HeadlessCmsDdbEsTablesFeature","HeadlessCmsDdbEsStorageFeature"],"mappings":";;;AAUO,MAAMA,0BAA0BC,cAAc;IACjD,MAAM;IACN,UAAUC,CAAAA;QACNC,8BAA8B,QAAQ,CAACD;QACvCE,+BAA+B,QAAQ,CAACF;IAC5C;AACJ"}
package/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import type { StorageOperationsFactory } from "./types";
2
- export * from "./plugins";
3
- export declare const createStorageOperations: StorageOperationsFactory;
1
+ export { HeadlessCmsDdbEsFeature } from "./feature.js";
2
+ export { HeadlessCmsDdbEsTablesFeature } from "./tablesFeature.js";
3
+ export { HeadlessCmsDdbEsStorageFeature } from "./storageFeature.js";
package/index.js CHANGED
@@ -1,225 +1,3 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- var _exportNames = {
8
- createStorageOperations: true
9
- };
10
- exports.createStorageOperations = void 0;
11
- var _filters = _interopRequireDefault(require("@webiny/db-dynamodb/plugins/filters"));
12
- var _elasticsearch = _interopRequireDefault(require("./elasticsearch"));
13
- var _dynamoDb = _interopRequireDefault(require("./dynamoDb"));
14
- var _system = require("./operations/system");
15
- var _model = require("./operations/model");
16
- var _entry = require("./operations/entry");
17
- var _types = require("./types");
18
- var _table = require("./definitions/table");
19
- var _tableElasticsearch = require("./definitions/tableElasticsearch");
20
- var _group = require("./definitions/group");
21
- var _model2 = require("./definitions/model");
22
- var _entry2 = require("./definitions/entry");
23
- var _entryElasticsearch = require("./definitions/entryElasticsearch");
24
- var _system2 = require("./definitions/system");
25
- var _createElasticsearchIndex = require("./elasticsearch/createElasticsearchIndex");
26
- var _plugins = require("@webiny/plugins");
27
- var _group2 = require("./operations/group");
28
- var _apiElasticsearch = require("@webiny/api-elasticsearch");
29
- var _indices = require("./elasticsearch/indices");
30
- var _deleteElasticsearchIndex = require("./elasticsearch/deleteElasticsearchIndex");
31
- var _plugins2 = require("./plugins");
32
- Object.keys(_plugins2).forEach(function (key) {
33
- if (key === "default" || key === "__esModule") return;
34
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
35
- if (key in exports && exports[key] === _plugins2[key]) return;
36
- Object.defineProperty(exports, key, {
37
- enumerable: true,
38
- get: function () {
39
- return _plugins2[key];
40
- }
41
- });
42
- });
43
- var _plugins3 = require("./operations/entry/elasticsearch/filtering/plugins");
44
- var _CmsEntryFilterPlugin = require("./plugins/CmsEntryFilterPlugin");
45
- var _apiHeadlessCms = require("@webiny/api-headless-cms");
46
- var _indexes = require("./operations/system/indexes");
47
- var _createIndexTaskPlugin = require("./tasks/createIndexTaskPlugin");
48
- var _api = require("@webiny/api");
49
- const createStorageOperations = params => {
50
- const {
51
- attributes,
52
- table,
53
- esTable,
54
- documentClient,
55
- elasticsearch,
56
- plugins: userPlugins
57
- } = params;
58
- const tableInstance = (0, _table.createTable)({
59
- table,
60
- documentClient
61
- });
62
- const tableElasticsearchInstance = (0, _tableElasticsearch.createElasticsearchTable)({
63
- table: esTable,
64
- documentClient
65
- });
66
- const entities = {
67
- system: (0, _system2.createSystemEntity)({
68
- entityName: _types.ENTITIES.SYSTEM,
69
- table: tableInstance,
70
- attributes: attributes ? attributes[_types.ENTITIES.SYSTEM] : {}
71
- }),
72
- groups: (0, _group.createGroupEntity)({
73
- entityName: _types.ENTITIES.GROUPS,
74
- table: tableInstance,
75
- attributes: attributes ? attributes[_types.ENTITIES.GROUPS] : {}
76
- }),
77
- models: (0, _model2.createModelEntity)({
78
- entityName: _types.ENTITIES.MODELS,
79
- table: tableInstance,
80
- attributes: attributes ? attributes[_types.ENTITIES.MODELS] : {}
81
- }),
82
- entries: (0, _entry2.createEntryEntity)({
83
- entityName: _types.ENTITIES.ENTRIES,
84
- table: tableInstance,
85
- attributes: attributes ? attributes[_types.ENTITIES.ENTRIES] : {}
86
- }),
87
- entriesEs: (0, _entryElasticsearch.createEntryElasticsearchEntity)({
88
- entityName: _types.ENTITIES.ENTRIES_ES,
89
- table: tableElasticsearchInstance,
90
- attributes: attributes ? attributes[_types.ENTITIES.ENTRIES_ES] : {}
91
- })
92
- };
93
- const plugins = new _plugins.PluginsContainer([
94
- /**
95
- * DynamoDB filter plugins for the where conditions.
96
- */
97
- (0, _filters.default)(),
98
- /**
99
- * Field plugins for DynamoDB.
100
- */
101
- (0, _dynamoDb.default)(),
102
- /**
103
- * Field plugins for Elasticsearch.
104
- */
105
- (0, _elasticsearch.default)(),
106
- /**
107
- * Built-in Elasticsearch index templates.
108
- */
109
- (0, _indices.elasticsearchIndexPlugins)(),
110
- /**
111
- * Filter plugins used to apply filtering from where conditions to Elasticsearch query.
112
- */
113
- (0, _plugins3.createFilterPlugins)(),
114
- /**
115
- * User defined custom plugins.
116
- * They are at the end because we can then override existing plugins.
117
- */
118
- ...(userPlugins || [])]);
119
- const entries = (0, _entry.createEntriesStorageOperations)({
120
- entity: entities.entries,
121
- esEntity: entities.entriesEs,
122
- plugins,
123
- elasticsearch
124
- });
125
- return {
126
- name: "dynamodb:elasticsearch",
127
- beforeInit: async context => {
128
- context.db.registry.register({
129
- item: entities.entries,
130
- app: "cms",
131
- tags: ["regular", entities.entries.name]
132
- });
133
- context.db.registry.register({
134
- item: entities.entriesEs,
135
- app: "cms",
136
- tags: ["es", entities.entriesEs.name]
137
- });
138
- /**
139
- * Attach the elasticsearch into context if it is not already attached.
140
- */
141
- if (!context.elasticsearch) {
142
- context.elasticsearch = elasticsearch;
143
- }
144
- /**
145
- * Pass the plugins to the parent context.
146
- */
147
- context.plugins.register([(0, _dynamoDb.default)(), (0, _createIndexTaskPlugin.createIndexTaskPluginTest)(), (0, _indices.elasticsearchIndexPlugins)()]);
148
- /**
149
- * We need to fetch all the plugin types in the list from the main container.
150
- * This way we do not need to register plugins in the storage plugins contains.
151
- */
152
- const types = [_apiElasticsearch.ElasticsearchQueryBuilderOperatorPlugin.type,
153
- // Headless CMS
154
- "cms-model-field-to-graphql", _CmsEntryFilterPlugin.CmsEntryFilterPlugin.type, _plugins2.CmsEntryElasticsearchBodyModifierPlugin.type, _plugins2.CmsEntryElasticsearchFullTextSearchPlugin.type, _plugins2.CmsEntryElasticsearchIndexPlugin.type, _plugins2.CmsEntryElasticsearchQueryBuilderValueSearchPlugin.type, _plugins2.CmsEntryElasticsearchQueryModifierPlugin.type, _plugins2.CmsEntryElasticsearchSortModifierPlugin.type, _plugins2.CmsElasticsearchModelFieldPlugin.type, _apiHeadlessCms.StorageOperationsCmsModelPlugin.type, _apiHeadlessCms.StorageTransformPlugin.type, _plugins2.CmsEntryElasticsearchValuesModifier.type, _api.CompressorPlugin.type];
155
- for (const type of types) {
156
- plugins.mergeByType(context.plugins, type);
157
- }
158
- entries.dataLoaders.clearAll();
159
- },
160
- init: async context => {
161
- /**
162
- * We need to create indexes on before model create and on clone (create from).
163
- * Other apps create indexes on locale creation.
164
- */
165
- await (0, _indexes.createElasticsearchIndexesOnLocaleAfterCreate)({
166
- context,
167
- client: elasticsearch,
168
- plugins
169
- });
170
- context.cms.onModelBeforeCreate.subscribe(async ({
171
- model
172
- }) => {
173
- await (0, _createElasticsearchIndex.createElasticsearchIndex)({
174
- client: elasticsearch,
175
- model,
176
- plugins
177
- });
178
- });
179
- context.cms.onModelBeforeCreateFrom.subscribe(async ({
180
- model
181
- }) => {
182
- await (0, _createElasticsearchIndex.createElasticsearchIndex)({
183
- client: elasticsearch,
184
- model,
185
- plugins
186
- });
187
- });
188
- context.cms.onModelAfterDelete.subscribe(async ({
189
- model
190
- }) => {
191
- await (0, _deleteElasticsearchIndex.deleteElasticsearchIndex)({
192
- client: elasticsearch,
193
- model
194
- });
195
- });
196
- context.cms.onModelInitialize.subscribe(async ({
197
- model
198
- }) => {
199
- await (0, _createElasticsearchIndex.createElasticsearchIndex)({
200
- client: elasticsearch,
201
- model,
202
- plugins
203
- });
204
- });
205
- },
206
- getEntities: () => entities,
207
- getTable: () => tableInstance,
208
- getEsTable: () => tableElasticsearchInstance,
209
- system: (0, _system.createSystemStorageOperations)({
210
- entity: entities.system
211
- }),
212
- groups: (0, _group2.createGroupsStorageOperations)({
213
- entity: entities.groups,
214
- plugins
215
- }),
216
- models: (0, _model.createModelsStorageOperations)({
217
- entity: entities.models,
218
- elasticsearch
219
- }),
220
- entries
221
- };
222
- };
223
- exports.createStorageOperations = createStorageOperations;
224
-
225
- //# sourceMappingURL=index.js.map
1
+ export { HeadlessCmsDdbEsFeature } from "./feature.js";
2
+ export { HeadlessCmsDdbEsTablesFeature } from "./tablesFeature.js";
3
+ export { HeadlessCmsDdbEsStorageFeature } from "./storageFeature.js";
@@ -0,0 +1,26 @@
1
+ import type { CmsModel, CmsEntryValues, CmsEntryStorageOperationsCreateParams } from "@webiny/api-headless-cms/types/index.js";
2
+ import { CreateEntryStorageOperation } from "@webiny/api-headless-cms/features/shared/storageOperations/entry/CreateEntryStorageOperation.js";
3
+ import { CmsDdbEsEntryEntity } from "../../abstractions/CmsDdbEsEntryEntity.js";
4
+ import { CmsDdbEsEntriesEsEntity } from "../../abstractions/CmsDdbEsEntriesEsEntity.js";
5
+ import { CmsDdbEsDataLoaders } from "../../abstractions/CmsDdbEsDataLoaders.js";
6
+ import { CmsStorageModelProvider } from "@webiny/api-headless-cms/features/shared/abstractions.js";
7
+ import { CmsEntryOpenSearchFieldIndexRegistry, CmsEntryOpenSearchValuesModifier, CmsModelOpenSearchIndexProvider } from "@webiny/api-headless-cms-utils-os/exports/api/cms/opensearch.js";
8
+ import { CompressionHandler } from "@webiny/utils/exports/api.js";
9
+ import { ScopeTenant } from "@webiny/api-core/features/tenancy/ScopeTenant/index.js";
10
+ declare class DdbEsCreateEntryImpl implements CreateEntryStorageOperation.Interface {
11
+ private entity;
12
+ private esEntity;
13
+ private dataLoaders;
14
+ private storageModelProvider;
15
+ private fieldIndexRegistry;
16
+ private compressionHandler;
17
+ private indexProvider;
18
+ private valuesModifiers;
19
+ private scopeTenant;
20
+ constructor(entity: CmsDdbEsEntryEntity.Interface, esEntity: CmsDdbEsEntriesEsEntity.Interface, dataLoaders: CmsDdbEsDataLoaders.Interface, storageModelProvider: CmsStorageModelProvider.Interface, fieldIndexRegistry: CmsEntryOpenSearchFieldIndexRegistry.Interface, compressionHandler: CompressionHandler.Interface, indexProvider: CmsModelOpenSearchIndexProvider.Interface, valuesModifiers: CmsEntryOpenSearchValuesModifier.Interface[], scopeTenant: ScopeTenant.Interface);
21
+ execute<T extends CmsEntryValues = CmsEntryValues>(initialModel: CmsModel, params: CmsEntryStorageOperationsCreateParams<T>): Promise<import("@webiny/api-headless-cms/types/types.js").CmsStorageEntry<T>>;
22
+ }
23
+ export declare const DdbEsCreateEntry: typeof DdbEsCreateEntryImpl & {
24
+ __abstraction: import("@webiny/di").Abstraction<import("@webiny/api-headless-cms/features/shared/storageOperations/entry/CreateEntryStorageOperation.js").ICreateEntryStorageOperation>;
25
+ };
26
+ export {};
@@ -0,0 +1,144 @@
1
+ import error from "@webiny/error";
2
+ import { CreateEntryStorageOperation } from "@webiny/api-headless-cms/features/shared/storageOperations/entry/CreateEntryStorageOperation.js";
3
+ import { CmsDdbEsEntryEntity } from "../../abstractions/CmsDdbEsEntryEntity.js";
4
+ import { CmsDdbEsEntriesEsEntity } from "../../abstractions/CmsDdbEsEntriesEsEntity.js";
5
+ import { CmsDdbEsDataLoaders } from "../../abstractions/CmsDdbEsDataLoaders.js";
6
+ import { CmsStorageModelProvider } from "@webiny/api-headless-cms/features/shared/abstractions.js";
7
+ import { CmsEntryOpenSearchFieldIndexRegistry, CmsEntryOpenSearchValuesModifier, CmsModelOpenSearchIndexProvider } from "@webiny/api-headless-cms-utils-os/exports/api/cms/opensearch.js";
8
+ import { CompressionHandler } from "@webiny/utils/exports/api.js";
9
+ import { createConfigurations } from "@webiny/api-headless-cms-utils-os/configurations.js";
10
+ import { ScopeTenant } from "@webiny/api-core/features/tenancy/ScopeTenant/index.js";
11
+ import { createTransformer } from "./transformations/index.js";
12
+ import { createEntryLatestKeys, createEntryPublishedKeys, createEntryRevisionKeys } from "./keys.js";
13
+ class DdbEsCreateEntryImpl {
14
+ constructor(entity, esEntity, dataLoaders, storageModelProvider, fieldIndexRegistry, compressionHandler, indexProvider, valuesModifiers, scopeTenant){
15
+ this.entity = entity;
16
+ this.esEntity = esEntity;
17
+ this.dataLoaders = dataLoaders;
18
+ this.storageModelProvider = storageModelProvider;
19
+ this.fieldIndexRegistry = fieldIndexRegistry;
20
+ this.compressionHandler = compressionHandler;
21
+ this.indexProvider = indexProvider;
22
+ this.valuesModifiers = valuesModifiers;
23
+ this.scopeTenant = scopeTenant;
24
+ }
25
+ async execute(initialModel, params) {
26
+ const { entry: initialEntry, storageEntry: initialStorageEntry } = params;
27
+ const tenant = this.scopeTenant.getId();
28
+ const model = this.storageModelProvider.getModel(initialModel);
29
+ const isPublished = "published" === initialEntry.status;
30
+ const locked = isPublished ? true : initialEntry.locked;
31
+ initialEntry.locked = locked;
32
+ initialStorageEntry.locked = locked;
33
+ const transformer = createTransformer({
34
+ fieldIndexRegistry: this.fieldIndexRegistry,
35
+ model,
36
+ entry: {
37
+ ...initialEntry,
38
+ tenant
39
+ },
40
+ storageEntry: {
41
+ ...initialStorageEntry,
42
+ tenant
43
+ },
44
+ compressionHandler: this.compressionHandler,
45
+ valuesModifiers: this.valuesModifiers
46
+ });
47
+ const { entry, storageEntry } = transformer.transformEntryKeys();
48
+ const esEntry = transformer.transformToIndex();
49
+ const configurations = createConfigurations(this.indexProvider);
50
+ const { index: esIndex } = await configurations.es({
51
+ model
52
+ });
53
+ const revisionKeys = createEntryRevisionKeys(entry, tenant);
54
+ const latestKeys = createEntryLatestKeys(entry, tenant);
55
+ const publishedKeys = createEntryPublishedKeys(entry, tenant);
56
+ const entityBatch = this.entity.createEntityWriter({
57
+ put: [
58
+ {
59
+ ...revisionKeys,
60
+ data: {
61
+ ...storageEntry,
62
+ locked
63
+ }
64
+ },
65
+ {
66
+ ...latestKeys,
67
+ data: {
68
+ ...storageEntry,
69
+ locked
70
+ }
71
+ }
72
+ ]
73
+ });
74
+ if (isPublished) entityBatch.put({
75
+ ...publishedKeys,
76
+ data: {
77
+ ...storageEntry,
78
+ locked
79
+ }
80
+ });
81
+ try {
82
+ await entityBatch.execute();
83
+ this.dataLoaders.clearAll({
84
+ tenant
85
+ });
86
+ } catch (ex) {
87
+ throw new error(ex.message || "Could not insert entry data into the DynamoDB table.", ex.code || "CREATE_ENTRY_ERROR", {
88
+ error: ex,
89
+ entry,
90
+ storageEntry
91
+ });
92
+ }
93
+ const esLatestData = await transformer.getElasticsearchLatestEntryData();
94
+ const elasticsearchEntityBatch = this.esEntity.createEntityWriter({
95
+ put: [
96
+ {
97
+ ...latestKeys,
98
+ index: esIndex,
99
+ data: esLatestData
100
+ }
101
+ ]
102
+ });
103
+ if (isPublished) {
104
+ const esPublishedData = await transformer.getElasticsearchPublishedEntryData();
105
+ elasticsearchEntityBatch.put({
106
+ ...publishedKeys,
107
+ index: esIndex,
108
+ data: esPublishedData
109
+ });
110
+ }
111
+ try {
112
+ await elasticsearchEntityBatch.execute();
113
+ } catch (ex) {
114
+ throw new error(ex.message || "Could not insert entry data into the Elasticsearch DynamoDB table.", ex.code || "CREATE_ES_ENTRY_ERROR", {
115
+ error: ex,
116
+ entry,
117
+ esEntry
118
+ });
119
+ }
120
+ return initialStorageEntry;
121
+ }
122
+ }
123
+ const DdbEsCreateEntry = CreateEntryStorageOperation.createImplementation({
124
+ implementation: DdbEsCreateEntryImpl,
125
+ dependencies: [
126
+ CmsDdbEsEntryEntity,
127
+ CmsDdbEsEntriesEsEntity,
128
+ CmsDdbEsDataLoaders,
129
+ CmsStorageModelProvider,
130
+ CmsEntryOpenSearchFieldIndexRegistry,
131
+ CompressionHandler,
132
+ CmsModelOpenSearchIndexProvider,
133
+ [
134
+ CmsEntryOpenSearchValuesModifier,
135
+ {
136
+ multiple: true
137
+ }
138
+ ],
139
+ ScopeTenant
140
+ ]
141
+ });
142
+ export { DdbEsCreateEntry };
143
+
144
+ //# sourceMappingURL=DdbEsCreateEntry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations/entry/DdbEsCreateEntry.js","sources":["../../../src/operations/entry/DdbEsCreateEntry.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport type {\n CmsModel,\n CmsEntryValues,\n CmsEntryStorageOperationsCreateParams\n} from \"@webiny/api-headless-cms/types/index.js\";\nimport { CreateEntryStorageOperation } from \"@webiny/api-headless-cms/features/shared/storageOperations/entry/CreateEntryStorageOperation.js\";\nimport { CmsDdbEsEntryEntity } from \"~/abstractions/CmsDdbEsEntryEntity.js\";\nimport { CmsDdbEsEntriesEsEntity } from \"~/abstractions/CmsDdbEsEntriesEsEntity.js\";\nimport { CmsDdbEsDataLoaders } from \"~/abstractions/CmsDdbEsDataLoaders.js\";\nimport { CmsStorageModelProvider } from \"@webiny/api-headless-cms/features/shared/abstractions.js\";\nimport {\n CmsEntryOpenSearchFieldIndexRegistry,\n CmsEntryOpenSearchValuesModifier,\n CmsModelOpenSearchIndexProvider\n} from \"@webiny/api-headless-cms-utils-os/exports/api/cms/opensearch.js\";\nimport { CompressionHandler } from \"@webiny/utils/exports/api.js\";\nimport { createConfigurations } from \"@webiny/api-headless-cms-utils-os/configurations.js\";\nimport { ScopeTenant } from \"@webiny/api-core/features/tenancy/ScopeTenant/index.js\";\nimport { createTransformer } from \"./transformations/index.js\";\nimport {\n createEntryLatestKeys,\n createEntryPublishedKeys,\n createEntryRevisionKeys\n} from \"./keys.js\";\n\nclass DdbEsCreateEntryImpl implements CreateEntryStorageOperation.Interface {\n constructor(\n private entity: CmsDdbEsEntryEntity.Interface,\n private esEntity: CmsDdbEsEntriesEsEntity.Interface,\n private dataLoaders: CmsDdbEsDataLoaders.Interface,\n private storageModelProvider: CmsStorageModelProvider.Interface,\n private fieldIndexRegistry: CmsEntryOpenSearchFieldIndexRegistry.Interface,\n private compressionHandler: CompressionHandler.Interface,\n private indexProvider: CmsModelOpenSearchIndexProvider.Interface,\n private valuesModifiers: CmsEntryOpenSearchValuesModifier.Interface[],\n private scopeTenant: ScopeTenant.Interface\n ) {}\n\n async execute<T extends CmsEntryValues = CmsEntryValues>(\n initialModel: CmsModel,\n params: CmsEntryStorageOperationsCreateParams<T>\n ) {\n const { entry: initialEntry, storageEntry: initialStorageEntry } = params;\n const tenant = this.scopeTenant.getId();\n\n const model = this.storageModelProvider.getModel<T>(initialModel);\n\n const isPublished = initialEntry.status === \"published\";\n const locked = isPublished ? true : initialEntry.locked;\n\n initialEntry.locked = locked;\n initialStorageEntry.locked = locked;\n\n const transformer = createTransformer<T>({\n fieldIndexRegistry: this.fieldIndexRegistry,\n model,\n /**\n * Copies with the scope's tenant: the caller's objects are left as they are, the stored\n * and indexed records carry the scope's tenant.\n */\n entry: { ...initialEntry, tenant },\n storageEntry: { ...initialStorageEntry, tenant },\n compressionHandler: this.compressionHandler,\n valuesModifiers: this.valuesModifiers\n });\n\n const { entry, storageEntry } = transformer.transformEntryKeys();\n\n const esEntry = transformer.transformToIndex();\n\n const configurations = createConfigurations(this.indexProvider);\n const { index: esIndex } = await configurations.es({\n model\n });\n\n const revisionKeys = createEntryRevisionKeys(entry, tenant);\n const latestKeys = createEntryLatestKeys(entry, tenant);\n const publishedKeys = createEntryPublishedKeys(entry, tenant);\n\n const entityBatch = this.entity.createEntityWriter({\n put: [\n {\n ...revisionKeys,\n data: {\n ...storageEntry,\n locked\n }\n },\n {\n ...latestKeys,\n data: {\n ...storageEntry,\n locked\n }\n }\n ]\n });\n\n if (isPublished) {\n entityBatch.put({\n ...publishedKeys,\n data: {\n ...storageEntry,\n locked\n }\n });\n }\n\n try {\n await entityBatch.execute();\n this.dataLoaders.clearAll({\n tenant\n });\n } catch (ex) {\n throw new WebinyError(\n ex.message || \"Could not insert entry data into the DynamoDB table.\",\n ex.code || \"CREATE_ENTRY_ERROR\",\n {\n error: ex,\n entry,\n storageEntry\n }\n );\n }\n\n const esLatestData = await transformer.getElasticsearchLatestEntryData();\n\n const elasticsearchEntityBatch = this.esEntity.createEntityWriter({\n put: [\n {\n ...latestKeys,\n index: esIndex,\n data: esLatestData\n }\n ]\n });\n\n if (isPublished) {\n const esPublishedData = await transformer.getElasticsearchPublishedEntryData();\n elasticsearchEntityBatch.put({\n ...publishedKeys,\n index: esIndex,\n data: esPublishedData\n });\n }\n\n try {\n await elasticsearchEntityBatch.execute();\n } catch (ex) {\n throw new WebinyError(\n ex.message || \"Could not insert entry data into the Elasticsearch DynamoDB table.\",\n ex.code || \"CREATE_ES_ENTRY_ERROR\",\n {\n error: ex,\n entry,\n esEntry\n }\n );\n }\n\n return initialStorageEntry;\n }\n}\n\nexport const DdbEsCreateEntry = CreateEntryStorageOperation.createImplementation({\n implementation: DdbEsCreateEntryImpl,\n dependencies: [\n CmsDdbEsEntryEntity,\n CmsDdbEsEntriesEsEntity,\n CmsDdbEsDataLoaders,\n CmsStorageModelProvider,\n CmsEntryOpenSearchFieldIndexRegistry,\n CompressionHandler,\n CmsModelOpenSearchIndexProvider,\n [CmsEntryOpenSearchValuesModifier, { multiple: true }],\n ScopeTenant\n ]\n});\n"],"names":["DdbEsCreateEntryImpl","entity","esEntity","dataLoaders","storageModelProvider","fieldIndexRegistry","compressionHandler","indexProvider","valuesModifiers","scopeTenant","initialModel","params","initialEntry","initialStorageEntry","tenant","model","isPublished","locked","transformer","createTransformer","entry","storageEntry","esEntry","configurations","createConfigurations","esIndex","revisionKeys","createEntryRevisionKeys","latestKeys","createEntryLatestKeys","publishedKeys","createEntryPublishedKeys","entityBatch","ex","WebinyError","esLatestData","elasticsearchEntityBatch","esPublishedData","DdbEsCreateEntry","CreateEntryStorageOperation","CmsDdbEsEntryEntity","CmsDdbEsEntriesEsEntity","CmsDdbEsDataLoaders","CmsStorageModelProvider","CmsEntryOpenSearchFieldIndexRegistry","CompressionHandler","CmsModelOpenSearchIndexProvider","CmsEntryOpenSearchValuesModifier","ScopeTenant"],"mappings":";;;;;;;;;;;;AA0BA,MAAMA;IACF,YACYC,MAAqC,EACrCC,QAA2C,EAC3CC,WAA0C,EAC1CC,oBAAuD,EACvDC,kBAAkE,EAClEC,kBAAgD,EAChDC,aAAwD,EACxDC,eAA6D,EAC7DC,WAAkC,CAC5C;aATUR,MAAM,GAANA;aACAC,QAAQ,GAARA;aACAC,WAAW,GAAXA;aACAC,oBAAoB,GAApBA;aACAC,kBAAkB,GAAlBA;aACAC,kBAAkB,GAAlBA;aACAC,aAAa,GAAbA;aACAC,eAAe,GAAfA;aACAC,WAAW,GAAXA;IACT;IAEH,MAAM,QACFC,YAAsB,EACtBC,MAAgD,EAClD;QACE,MAAM,EAAE,OAAOC,YAAY,EAAE,cAAcC,mBAAmB,EAAE,GAAGF;QACnE,MAAMG,SAAS,IAAI,CAAC,WAAW,CAAC,KAAK;QAErC,MAAMC,QAAQ,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAIL;QAEpD,MAAMM,cAAcJ,AAAwB,gBAAxBA,aAAa,MAAM;QACvC,MAAMK,SAASD,cAAc,OAAOJ,aAAa,MAAM;QAEvDA,aAAa,MAAM,GAAGK;QACtBJ,oBAAoB,MAAM,GAAGI;QAE7B,MAAMC,cAAcC,kBAAqB;YACrC,oBAAoB,IAAI,CAAC,kBAAkB;YAC3CJ;YAKA,OAAO;gBAAE,GAAGH,YAAY;gBAAEE;YAAO;YACjC,cAAc;gBAAE,GAAGD,mBAAmB;gBAAEC;YAAO;YAC/C,oBAAoB,IAAI,CAAC,kBAAkB;YAC3C,iBAAiB,IAAI,CAAC,eAAe;QACzC;QAEA,MAAM,EAAEM,KAAK,EAAEC,YAAY,EAAE,GAAGH,YAAY,kBAAkB;QAE9D,MAAMI,UAAUJ,YAAY,gBAAgB;QAE5C,MAAMK,iBAAiBC,qBAAqB,IAAI,CAAC,aAAa;QAC9D,MAAM,EAAE,OAAOC,OAAO,EAAE,GAAG,MAAMF,eAAe,EAAE,CAAC;YAC/CR;QACJ;QAEA,MAAMW,eAAeC,wBAAwBP,OAAON;QACpD,MAAMc,aAAaC,sBAAsBT,OAAON;QAChD,MAAMgB,gBAAgBC,yBAAyBX,OAAON;QAEtD,MAAMkB,cAAc,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC;YAC/C,KAAK;gBACD;oBACI,GAAGN,YAAY;oBACf,MAAM;wBACF,GAAGL,YAAY;wBACfJ;oBACJ;gBACJ;gBACA;oBACI,GAAGW,UAAU;oBACb,MAAM;wBACF,GAAGP,YAAY;wBACfJ;oBACJ;gBACJ;aACH;QACL;QAEA,IAAID,aACAgB,YAAY,GAAG,CAAC;YACZ,GAAGF,aAAa;YAChB,MAAM;gBACF,GAAGT,YAAY;gBACfJ;YACJ;QACJ;QAGJ,IAAI;YACA,MAAMe,YAAY,OAAO;YACzB,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC;gBACtBlB;YACJ;QACJ,EAAE,OAAOmB,IAAI;YACT,MAAM,IAAIC,MACND,GAAG,OAAO,IAAI,wDACdA,GAAG,IAAI,IAAI,sBACX;gBACI,OAAOA;gBACPb;gBACAC;YACJ;QAER;QAEA,MAAMc,eAAe,MAAMjB,YAAY,+BAA+B;QAEtE,MAAMkB,2BAA2B,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC;YAC9D,KAAK;gBACD;oBACI,GAAGR,UAAU;oBACb,OAAOH;oBACP,MAAMU;gBACV;aACH;QACL;QAEA,IAAInB,aAAa;YACb,MAAMqB,kBAAkB,MAAMnB,YAAY,kCAAkC;YAC5EkB,yBAAyB,GAAG,CAAC;gBACzB,GAAGN,aAAa;gBAChB,OAAOL;gBACP,MAAMY;YACV;QACJ;QAEA,IAAI;YACA,MAAMD,yBAAyB,OAAO;QAC1C,EAAE,OAAOH,IAAI;YACT,MAAM,IAAIC,MACND,GAAG,OAAO,IAAI,sEACdA,GAAG,IAAI,IAAI,yBACX;gBACI,OAAOA;gBACPb;gBACAE;YACJ;QAER;QAEA,OAAOT;IACX;AACJ;AAEO,MAAMyB,mBAAmBC,4BAA4B,oBAAoB,CAAC;IAC7E,gBAAgBvC;IAChB,cAAc;QACVwC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACA;YAACC;YAAkC;gBAAE,UAAU;YAAK;SAAE;QACtDC;KACH;AACL"}
@@ -0,0 +1,26 @@
1
+ import type { CmsModel, CmsEntryValues, CmsEntryStorageOperationsCreateRevisionFromParams } from "@webiny/api-headless-cms/types/index.js";
2
+ import { CreateEntryRevisionFromStorageOperation } from "@webiny/api-headless-cms/features/shared/storageOperations/entry/CreateEntryRevisionFromStorageOperation.js";
3
+ import { CmsDdbEsEntryEntity } from "../../abstractions/CmsDdbEsEntryEntity.js";
4
+ import { CmsDdbEsEntriesEsEntity } from "../../abstractions/CmsDdbEsEntriesEsEntity.js";
5
+ import { CmsDdbEsDataLoaders } from "../../abstractions/CmsDdbEsDataLoaders.js";
6
+ import { CmsStorageModelProvider } from "@webiny/api-headless-cms/features/shared/abstractions.js";
7
+ import { CmsEntryOpenSearchFieldIndexRegistry, CmsEntryOpenSearchValuesModifier, CmsModelOpenSearchIndexProvider } from "@webiny/api-headless-cms-utils-os/exports/api/cms/opensearch.js";
8
+ import { CompressionHandler } from "@webiny/utils/exports/api.js";
9
+ import { ScopeTenant } from "@webiny/api-core/features/tenancy/ScopeTenant/index.js";
10
+ declare class DdbEsCreateEntryRevisionFromImpl implements CreateEntryRevisionFromStorageOperation.Interface {
11
+ private entity;
12
+ private esEntity;
13
+ private dataLoaders;
14
+ private storageModelProvider;
15
+ private fieldIndexRegistry;
16
+ private compressionHandler;
17
+ private indexProvider;
18
+ private valuesModifiers;
19
+ private scopeTenant;
20
+ constructor(entity: CmsDdbEsEntryEntity.Interface, esEntity: CmsDdbEsEntriesEsEntity.Interface, dataLoaders: CmsDdbEsDataLoaders.Interface, storageModelProvider: CmsStorageModelProvider.Interface, fieldIndexRegistry: CmsEntryOpenSearchFieldIndexRegistry.Interface, compressionHandler: CompressionHandler.Interface, indexProvider: CmsModelOpenSearchIndexProvider.Interface, valuesModifiers: CmsEntryOpenSearchValuesModifier.Interface[], scopeTenant: ScopeTenant.Interface);
21
+ execute<T extends CmsEntryValues = CmsEntryValues>(initialModel: CmsModel, params: CmsEntryStorageOperationsCreateRevisionFromParams<T>): Promise<import("@webiny/api-headless-cms/types/types.js").CmsStorageEntry<T>>;
22
+ }
23
+ export declare const DdbEsCreateEntryRevisionFrom: typeof DdbEsCreateEntryRevisionFromImpl & {
24
+ __abstraction: import("@webiny/di").Abstraction<import("@webiny/api-headless-cms/features/shared/storageOperations/entry/CreateEntryRevisionFromStorageOperation.js").ICreateEntryRevisionFromStorageOperation>;
25
+ };
26
+ export {};