@webiny/api-headless-cms-ddb-es 0.0.0-unstable.40876133bb → 0.0.0-unstable.4373247389

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 (353) 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 -5
  26. package/definitions/entry.js +9 -88
  27. package/definitions/entry.js.map +1 -1
  28. package/definitions/group.d.ts +6 -6
  29. package/definitions/group.js +9 -68
  30. package/definitions/group.js.map +1 -1
  31. package/definitions/model.d.ts +6 -6
  32. package/definitions/model.js +9 -90
  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 -268
  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 +16 -0
  108. package/operations/entry/dataLoader/DataLoaderCache.js +27 -0
  109. package/operations/entry/dataLoader/DataLoaderCache.js.map +1 -0
  110. package/operations/entry/dataLoader/constants.d.ts +1 -0
  111. package/operations/entry/dataLoader/constants.js +5 -0
  112. package/operations/entry/dataLoader/constants.js.map +1 -0
  113. package/operations/entry/dataLoader/createBatchScheduleFn.d.ts +8 -0
  114. package/operations/entry/dataLoader/createBatchScheduleFn.js +10 -0
  115. package/operations/entry/dataLoader/createBatchScheduleFn.js.map +1 -0
  116. package/operations/entry/dataLoader/getAllEntryRevisions.d.ts +4 -0
  117. package/operations/entry/dataLoader/getAllEntryRevisions.js +24 -0
  118. package/operations/entry/dataLoader/getAllEntryRevisions.js.map +1 -0
  119. package/operations/entry/dataLoader/getLatestRevisionByEntryId.d.ts +4 -0
  120. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js +34 -0
  121. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js.map +1 -0
  122. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.d.ts +4 -0
  123. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js +34 -0
  124. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js.map +1 -0
  125. package/operations/entry/dataLoader/getRevisionById.d.ts +4 -0
  126. package/operations/entry/dataLoader/getRevisionById.js +40 -0
  127. package/operations/entry/dataLoader/getRevisionById.js.map +1 -0
  128. package/operations/entry/dataLoader/index.d.ts +8 -0
  129. package/operations/entry/dataLoader/index.js +18 -0
  130. package/operations/entry/dataLoader/index.js.map +1 -0
  131. package/operations/entry/dataLoader/types.d.ts +6 -0
  132. package/operations/entry/dataLoader/types.js +0 -0
  133. package/operations/entry/dataLoaders.d.ts +18 -39
  134. package/operations/entry/dataLoaders.js +90 -357
  135. package/operations/entry/dataLoaders.js.map +1 -1
  136. package/operations/entry/feature.d.ts +4 -0
  137. package/operations/entry/feature.js +55 -0
  138. package/operations/entry/feature.js.map +1 -0
  139. package/operations/entry/keys.d.ts +32 -1
  140. package/operations/entry/keys.js +45 -35
  141. package/operations/entry/keys.js.map +1 -1
  142. package/operations/entry/recordType.d.ts +3 -0
  143. package/operations/entry/recordType.js +6 -0
  144. package/operations/entry/recordType.js.map +1 -0
  145. package/operations/entry/storageEntryUtils.d.ts +7 -0
  146. package/operations/entry/storageEntryUtils.js +14 -0
  147. package/operations/entry/storageEntryUtils.js.map +1 -0
  148. package/operations/entry/transformations/convertEntryKeys.d.ts +8 -0
  149. package/operations/entry/transformations/convertEntryKeys.js +25 -0
  150. package/operations/entry/transformations/convertEntryKeys.js.map +1 -0
  151. package/operations/entry/transformations/index.d.ts +32 -0
  152. package/operations/entry/transformations/index.js +91 -0
  153. package/operations/entry/transformations/index.js.map +1 -0
  154. package/operations/entry/transformations/modifyEntryValues.d.ts +53 -0
  155. package/operations/entry/transformations/modifyEntryValues.js +16 -0
  156. package/operations/entry/transformations/modifyEntryValues.js.map +1 -0
  157. package/operations/entry/transformations/transformEntryKeys.d.ts +11 -0
  158. package/operations/entry/transformations/transformEntryKeys.js +17 -0
  159. package/operations/entry/transformations/transformEntryKeys.js.map +1 -0
  160. package/operations/group/DdbEsCreateGroup.d.ts +14 -0
  161. package/operations/group/DdbEsCreateGroup.js +45 -0
  162. package/operations/group/DdbEsCreateGroup.js.map +1 -0
  163. package/operations/group/DdbEsDeleteGroup.d.ts +14 -0
  164. package/operations/group/DdbEsDeleteGroup.js +38 -0
  165. package/operations/group/DdbEsDeleteGroup.js.map +1 -0
  166. package/operations/group/DdbEsGetGroup.d.ts +14 -0
  167. package/operations/group/DdbEsGetGroup.js +38 -0
  168. package/operations/group/DdbEsGetGroup.js.map +1 -0
  169. package/operations/group/DdbEsListGroups.d.ts +16 -0
  170. package/operations/group/DdbEsListGroups.js +58 -0
  171. package/operations/group/DdbEsListGroups.js.map +1 -0
  172. package/operations/group/DdbEsUpdateGroup.d.ts +14 -0
  173. package/operations/group/DdbEsUpdateGroup.js +45 -0
  174. package/operations/group/DdbEsUpdateGroup.js.map +1 -0
  175. package/operations/group/feature.d.ts +4 -0
  176. package/operations/group/feature.js +19 -0
  177. package/operations/group/feature.js.map +1 -0
  178. package/operations/group/keys.d.ts +15 -0
  179. package/operations/group/keys.js +17 -0
  180. package/operations/group/keys.js.map +1 -0
  181. package/operations/model/DdbEsCreateModel.d.ts +18 -0
  182. package/operations/model/DdbEsCreateModel.js +66 -0
  183. package/operations/model/DdbEsCreateModel.js.map +1 -0
  184. package/operations/model/DdbEsDeleteModel.d.ts +14 -0
  185. package/operations/model/DdbEsDeleteModel.js +38 -0
  186. package/operations/model/DdbEsDeleteModel.js.map +1 -0
  187. package/operations/model/DdbEsGetModel.d.ts +14 -0
  188. package/operations/model/DdbEsGetModel.js +37 -0
  189. package/operations/model/DdbEsGetModel.js.map +1 -0
  190. package/operations/model/DdbEsListModels.d.ts +14 -0
  191. package/operations/model/DdbEsListModels.js +41 -0
  192. package/operations/model/DdbEsListModels.js.map +1 -0
  193. package/operations/model/DdbEsUpdateModel.d.ts +14 -0
  194. package/operations/model/DdbEsUpdateModel.js +46 -0
  195. package/operations/model/DdbEsUpdateModel.js.map +1 -0
  196. package/operations/model/feature.d.ts +4 -0
  197. package/operations/model/feature.js +19 -0
  198. package/operations/model/feature.js.map +1 -0
  199. package/operations/model/keys.d.ts +15 -0
  200. package/operations/model/keys.js +17 -0
  201. package/operations/model/keys.js.map +1 -0
  202. package/package.json +48 -41
  203. package/registry/CmsEntitiesDbRegistryDecorator.d.ts +27 -0
  204. package/registry/CmsEntitiesDbRegistryDecorator.js +46 -0
  205. package/registry/CmsEntitiesDbRegistryDecorator.js.map +1 -0
  206. package/storageFeature.d.ts +12 -0
  207. package/storageFeature.js +25 -0
  208. package/storageFeature.js.map +1 -0
  209. package/tablesFeature.d.ts +8 -0
  210. package/tablesFeature.js +53 -0
  211. package/tablesFeature.js.map +1 -0
  212. package/tasks/CreateElasticsearchIndexTask.d.ts +15 -0
  213. package/tasks/CreateElasticsearchIndexTask.js +49 -0
  214. package/tasks/CreateElasticsearchIndexTask.js.map +1 -0
  215. package/types.d.ts +13 -155
  216. package/types.js +10 -47
  217. package/types.js.map +1 -1
  218. package/configurations.d.ts +0 -12
  219. package/configurations.js +0 -43
  220. package/configurations.js.map +0 -1
  221. package/definitions/entryElasticsearch.d.ts +0 -8
  222. package/definitions/entryElasticsearch.js +0 -42
  223. package/definitions/entryElasticsearch.js.map +0 -1
  224. package/definitions/settings.d.ts +0 -8
  225. package/definitions/settings.js +0 -58
  226. package/definitions/settings.js.map +0 -1
  227. package/definitions/system.d.ts +0 -8
  228. package/definitions/system.js +0 -46
  229. package/definitions/system.js.map +0 -1
  230. package/definitions/table.d.ts +0 -8
  231. package/definitions/table.js +0 -24
  232. package/definitions/table.js.map +0 -1
  233. package/definitions/tableElasticsearch.d.ts +0 -8
  234. package/definitions/tableElasticsearch.js +0 -24
  235. package/definitions/tableElasticsearch.js.map +0 -1
  236. package/dynamoDb/index.d.ts +0 -2
  237. package/dynamoDb/index.js +0 -16
  238. package/dynamoDb/index.js.map +0 -1
  239. package/dynamoDb/storage/date.d.ts +0 -2
  240. package/dynamoDb/storage/date.js +0 -99
  241. package/dynamoDb/storage/date.js.map +0 -1
  242. package/dynamoDb/storage/longText.d.ts +0 -10
  243. package/dynamoDb/storage/longText.js +0 -101
  244. package/dynamoDb/storage/longText.js.map +0 -1
  245. package/dynamoDb/storage/richText.d.ts +0 -7
  246. package/dynamoDb/storage/richText.js +0 -128
  247. package/dynamoDb/storage/richText.js.map +0 -1
  248. package/elasticsearch/createElasticsearchIndex.d.ts +0 -9
  249. package/elasticsearch/createElasticsearchIndex.js +0 -60
  250. package/elasticsearch/createElasticsearchIndex.js.map +0 -1
  251. package/elasticsearch/deleteElasticsearchIndex.d.ts +0 -8
  252. package/elasticsearch/deleteElasticsearchIndex.js +0 -43
  253. package/elasticsearch/deleteElasticsearchIndex.js.map +0 -1
  254. package/elasticsearch/index.d.ts +0 -2
  255. package/elasticsearch/index.js +0 -16
  256. package/elasticsearch/index.js.map +0 -1
  257. package/elasticsearch/indexing/dateTimeIndexing.d.ts +0 -3
  258. package/elasticsearch/indexing/dateTimeIndexing.js +0 -103
  259. package/elasticsearch/indexing/dateTimeIndexing.js.map +0 -1
  260. package/elasticsearch/indexing/defaultFieldIndexing.d.ts +0 -3
  261. package/elasticsearch/indexing/defaultFieldIndexing.js +0 -47
  262. package/elasticsearch/indexing/defaultFieldIndexing.js.map +0 -1
  263. package/elasticsearch/indexing/index.d.ts +0 -2
  264. package/elasticsearch/indexing/index.js +0 -24
  265. package/elasticsearch/indexing/index.js.map +0 -1
  266. package/elasticsearch/indexing/longTextIndexing.d.ts +0 -3
  267. package/elasticsearch/indexing/longTextIndexing.js +0 -36
  268. package/elasticsearch/indexing/longTextIndexing.js.map +0 -1
  269. package/elasticsearch/indexing/numberIndexing.d.ts +0 -3
  270. package/elasticsearch/indexing/numberIndexing.js +0 -48
  271. package/elasticsearch/indexing/numberIndexing.js.map +0 -1
  272. package/elasticsearch/indexing/objectIndexing.d.ts +0 -12
  273. package/elasticsearch/indexing/objectIndexing.js +0 -223
  274. package/elasticsearch/indexing/objectIndexing.js.map +0 -1
  275. package/elasticsearch/indexing/richTextIndexing.d.ts +0 -3
  276. package/elasticsearch/indexing/richTextIndexing.js +0 -34
  277. package/elasticsearch/indexing/richTextIndexing.js.map +0 -1
  278. package/elasticsearch/indices/base.d.ts +0 -2
  279. package/elasticsearch/indices/base.js +0 -15
  280. package/elasticsearch/indices/base.js.map +0 -1
  281. package/elasticsearch/indices/index.d.ts +0 -1
  282. package/elasticsearch/indices/index.js +0 -16
  283. package/elasticsearch/indices/index.js.map +0 -1
  284. package/elasticsearch/indices/japanese.d.ts +0 -2
  285. package/elasticsearch/indices/japanese.js +0 -16
  286. package/elasticsearch/indices/japanese.js.map +0 -1
  287. package/elasticsearch/search/index.d.ts +0 -3
  288. package/elasticsearch/search/index.js +0 -14
  289. package/elasticsearch/search/index.js.map +0 -1
  290. package/elasticsearch/search/refSearch.d.ts +0 -2
  291. package/elasticsearch/search/refSearch.js +0 -33
  292. package/elasticsearch/search/refSearch.js.map +0 -1
  293. package/elasticsearch/search/timeSearch.d.ts +0 -2
  294. package/elasticsearch/search/timeSearch.js +0 -33
  295. package/elasticsearch/search/timeSearch.js.map +0 -1
  296. package/helpers/createElasticsearchQueryBody.d.ts +0 -11
  297. package/helpers/createElasticsearchQueryBody.js +0 -611
  298. package/helpers/createElasticsearchQueryBody.js.map +0 -1
  299. package/helpers/entryIndexHelpers.d.ts +0 -18
  300. package/helpers/entryIndexHelpers.js +0 -204
  301. package/helpers/entryIndexHelpers.js.map +0 -1
  302. package/helpers/fields.d.ts +0 -19
  303. package/helpers/fields.js +0 -205
  304. package/helpers/fields.js.map +0 -1
  305. package/helpers/index.d.ts +0 -2
  306. package/helpers/index.js +0 -31
  307. package/helpers/index.js.map +0 -1
  308. package/helpers/searchPluginsList.d.ts +0 -6
  309. package/helpers/searchPluginsList.js +0 -26
  310. package/helpers/searchPluginsList.js.map +0 -1
  311. package/helpers/transformValueForSearch.d.ts +0 -12
  312. package/helpers/transformValueForSearch.js +0 -29
  313. package/helpers/transformValueForSearch.js.map +0 -1
  314. package/index.js.map +0 -1
  315. package/operations/entry/elasticsearchFields.d.ts +0 -2
  316. package/operations/entry/elasticsearchFields.js +0 -38
  317. package/operations/entry/elasticsearchFields.js.map +0 -1
  318. package/operations/entry/index.d.ts +0 -13
  319. package/operations/entry/index.js +0 -1266
  320. package/operations/entry/index.js.map +0 -1
  321. package/operations/group/index.d.ts +0 -8
  322. package/operations/group/index.js +0 -195
  323. package/operations/group/index.js.map +0 -1
  324. package/operations/model/index.d.ts +0 -8
  325. package/operations/model/index.js +0 -204
  326. package/operations/model/index.js.map +0 -1
  327. package/operations/settings/index.d.ts +0 -6
  328. package/operations/settings/index.js +0 -135
  329. package/operations/settings/index.js.map +0 -1
  330. package/operations/system/index.d.ts +0 -6
  331. package/operations/system/index.js +0 -99
  332. package/operations/system/index.js.map +0 -1
  333. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.d.ts +0 -20
  334. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js +0 -24
  335. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js.map +0 -1
  336. package/plugins/CmsEntryElasticsearchFieldPlugin.d.ts +0 -12
  337. package/plugins/CmsEntryElasticsearchFieldPlugin.js +0 -24
  338. package/plugins/CmsEntryElasticsearchFieldPlugin.js.map +0 -1
  339. package/plugins/CmsEntryElasticsearchIndexPlugin.d.ts +0 -4
  340. package/plugins/CmsEntryElasticsearchIndexPlugin.js +0 -17
  341. package/plugins/CmsEntryElasticsearchIndexPlugin.js.map +0 -1
  342. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.d.ts +0 -30
  343. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js +0 -43
  344. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js.map +0 -1
  345. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.d.ts +0 -17
  346. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js +0 -24
  347. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js.map +0 -1
  348. package/plugins/CmsEntryElasticsearchSortModifierPlugin.d.ts +0 -17
  349. package/plugins/CmsEntryElasticsearchSortModifierPlugin.js +0 -24
  350. package/plugins/CmsEntryElasticsearchSortModifierPlugin.js.map +0 -1
  351. package/plugins/index.d.ts +0 -6
  352. package/plugins/index.js +0 -83
  353. package/plugins/index.js.map +0 -1
package/README.md CHANGED
@@ -1,35 +1,11 @@
1
1
  # @webiny/api-headless-cms-ddb-es
2
2
 
3
- [![](https://img.shields.io/npm/dw/@webiny/api-headless-cms-ddb-es.svg)](https://www.npmjs.com/package/@webiny/api-headless-cms-ddb-es)
4
- [![](https://img.shields.io/npm/v/@webiny/api-headless-cms-ddb-es.svg)](https://www.npmjs.com/package/@webiny/api-headless-cms-ddb-es)
5
- [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
6
- [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
3
+ > [!NOTE]
4
+ > This package is part of the [Webiny](https://www.webiny.com) monorepo.
5
+ > It’s **included in every Webiny project by default** and is not meant to be used as a standalone package.
7
6
 
8
- ## Install
7
+ 📘 **Documentation:** [https://www.webiny.com/docs](https://www.webiny.com/docs)
9
8
 
10
- ```
11
- npm install --save @webiny/api-headless-cms-ddb-es
12
- ```
9
+ ---
13
10
 
14
- Or if you prefer yarn:
15
-
16
- ```
17
- yarn add @webiny/api-headless-cms-ddb-es
18
- ```
19
-
20
-
21
- ## Testing
22
- To run the tests only for this package you must filter it with keywords.
23
-
24
- ### Env variables
25
-
26
- ###### LOCAL_ELASTICSEARCH
27
- If set, does not run Elasticsearch when starting the tests, use local one. You must install it and run if, of course.
28
-
29
- ###### ELASTICSEARCH_PORT
30
- Custom port for local elasticsearch.
31
-
32
- ### Command
33
- ````
34
- ELASTICSEARCH_PORT=9200 LOCAL_ELASTICSEARCH=true yarn test packages/api-headless-cms --keyword=cms:ddb-es --keyword=cms:base
35
- ````
11
+ _This README file is automatically generated during the publish process._
@@ -0,0 +1,5 @@
1
+ import type { IDataLoadersHandler } from "../types.js";
2
+ export declare const CmsDdbEsDataLoaders: import("@webiny/di").Abstraction<IDataLoadersHandler>;
3
+ export declare namespace CmsDdbEsDataLoaders {
4
+ type Interface = IDataLoadersHandler;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { createAbstraction } from "@webiny/feature/api";
2
+ const CmsDdbEsDataLoaders = createAbstraction("Cms/DdbEs/DataLoaders");
3
+ export { CmsDdbEsDataLoaders };
4
+
5
+ //# sourceMappingURL=CmsDdbEsDataLoaders.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abstractions/CmsDdbEsDataLoaders.js","sources":["../../src/abstractions/CmsDdbEsDataLoaders.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { IDataLoadersHandler } from \"~/types.js\";\n\nexport const CmsDdbEsDataLoaders = createAbstraction<IDataLoadersHandler>(\"Cms/DdbEs/DataLoaders\");\n\nexport namespace CmsDdbEsDataLoaders {\n export type Interface = IDataLoadersHandler;\n}\n"],"names":["CmsDdbEsDataLoaders","createAbstraction"],"mappings":";AAGO,MAAMA,sBAAsBC,kBAAuC"}
@@ -0,0 +1,5 @@
1
+ import type { IOpenSearchEntity } from "@webiny/api-opensearch-aws";
2
+ export declare const CmsDdbEsEntriesEsEntity: import("@webiny/di").Abstraction<IOpenSearchEntity>;
3
+ export declare namespace CmsDdbEsEntriesEsEntity {
4
+ type Interface = IOpenSearchEntity;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { createAbstraction } from "@webiny/feature/api";
2
+ const CmsDdbEsEntriesEsEntity = createAbstraction("Cms/DdbEs/EntriesEsEntity");
3
+ export { CmsDdbEsEntriesEsEntity };
4
+
5
+ //# sourceMappingURL=CmsDdbEsEntriesEsEntity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abstractions/CmsDdbEsEntriesEsEntity.js","sources":["../../src/abstractions/CmsDdbEsEntriesEsEntity.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { IOpenSearchEntity } from \"@webiny/api-opensearch-aws\";\n\nexport const CmsDdbEsEntriesEsEntity = createAbstraction<IOpenSearchEntity>(\n \"Cms/DdbEs/EntriesEsEntity\"\n);\n\nexport namespace CmsDdbEsEntriesEsEntity {\n export type Interface = IOpenSearchEntity;\n}\n"],"names":["CmsDdbEsEntriesEsEntity","createAbstraction"],"mappings":";AAGO,MAAMA,0BAA0BC,kBACnC"}
@@ -0,0 +1,5 @@
1
+ import type { IEntryEntity } from "../definitions/types.js";
2
+ export declare const CmsDdbEsEntryEntity: import("@webiny/di").Abstraction<IEntryEntity>;
3
+ export declare namespace CmsDdbEsEntryEntity {
4
+ type Interface = IEntryEntity;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { createAbstraction } from "@webiny/feature/api";
2
+ const CmsDdbEsEntryEntity = createAbstraction("Cms/DdbEs/EntryEntity");
3
+ export { CmsDdbEsEntryEntity };
4
+
5
+ //# sourceMappingURL=CmsDdbEsEntryEntity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abstractions/CmsDdbEsEntryEntity.js","sources":["../../src/abstractions/CmsDdbEsEntryEntity.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { IEntryEntity } from \"~/definitions/types.js\";\n\nexport const CmsDdbEsEntryEntity = createAbstraction<IEntryEntity>(\"Cms/DdbEs/EntryEntity\");\n\nexport namespace CmsDdbEsEntryEntity {\n export type Interface = IEntryEntity;\n}\n"],"names":["CmsDdbEsEntryEntity","createAbstraction"],"mappings":";AAGO,MAAMA,sBAAsBC,kBAAgC"}
@@ -0,0 +1,5 @@
1
+ import type { IGroupEntity } from "../definitions/types.js";
2
+ export declare const CmsDdbEsGroupEntity: import("@webiny/di").Abstraction<IGroupEntity>;
3
+ export declare namespace CmsDdbEsGroupEntity {
4
+ type Interface = IGroupEntity;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { createAbstraction } from "@webiny/feature/api";
2
+ const CmsDdbEsGroupEntity = createAbstraction("Cms/DdbEs/GroupEntity");
3
+ export { CmsDdbEsGroupEntity };
4
+
5
+ //# sourceMappingURL=CmsDdbEsGroupEntity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abstractions/CmsDdbEsGroupEntity.js","sources":["../../src/abstractions/CmsDdbEsGroupEntity.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { IGroupEntity } from \"~/definitions/types.js\";\n\nexport const CmsDdbEsGroupEntity = createAbstraction<IGroupEntity>(\"Cms/DdbEs/GroupEntity\");\n\nexport namespace CmsDdbEsGroupEntity {\n export type Interface = IGroupEntity;\n}\n"],"names":["CmsDdbEsGroupEntity","createAbstraction"],"mappings":";AAGO,MAAMA,sBAAsBC,kBAAgC"}
@@ -0,0 +1,5 @@
1
+ import type { IModelEntity } from "../definitions/types.js";
2
+ export declare const CmsDdbEsModelEntity: import("@webiny/di").Abstraction<IModelEntity>;
3
+ export declare namespace CmsDdbEsModelEntity {
4
+ type Interface = IModelEntity;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { createAbstraction } from "@webiny/feature/api";
2
+ const CmsDdbEsModelEntity = createAbstraction("Cms/DdbEs/ModelEntity");
3
+ export { CmsDdbEsModelEntity };
4
+
5
+ //# sourceMappingURL=CmsDdbEsModelEntity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abstractions/CmsDdbEsModelEntity.js","sources":["../../src/abstractions/CmsDdbEsModelEntity.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { IModelEntity } from \"~/definitions/types.js\";\n\nexport const CmsDdbEsModelEntity = createAbstraction<IModelEntity>(\"Cms/DdbEs/ModelEntity\");\n\nexport namespace CmsDdbEsModelEntity {\n export type Interface = IModelEntity;\n}\n"],"names":["CmsDdbEsModelEntity","createAbstraction"],"mappings":";AAGO,MAAMA,sBAAsBC,kBAAgC"}
@@ -0,0 +1,5 @@
1
+ import type { ITable } from "@webiny/db-dynamodb";
2
+ export declare const CmsDdbEsOsTable: import("@webiny/di").Abstraction<ITable<string, string, string>>;
3
+ export declare namespace CmsDdbEsOsTable {
4
+ type Interface = ITable;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { createAbstraction } from "@webiny/feature/api";
2
+ const CmsDdbEsOsTable = createAbstraction("Cms/DdbEs/OsTable");
3
+ export { CmsDdbEsOsTable };
4
+
5
+ //# sourceMappingURL=CmsDdbEsOsTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abstractions/CmsDdbEsOsTable.js","sources":["../../src/abstractions/CmsDdbEsOsTable.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { ITable } from \"@webiny/db-dynamodb\";\n\nexport const CmsDdbEsOsTable = createAbstraction<ITable>(\"Cms/DdbEs/OsTable\");\n\nexport namespace CmsDdbEsOsTable {\n export type Interface = ITable;\n}\n"],"names":["CmsDdbEsOsTable","createAbstraction"],"mappings":";AAGO,MAAMA,kBAAkBC,kBAA0B"}
@@ -0,0 +1,5 @@
1
+ import type { ITable } from "@webiny/db-dynamodb";
2
+ export declare const CmsDdbEsTable: import("@webiny/di").Abstraction<ITable<string, string, string>>;
3
+ export declare namespace CmsDdbEsTable {
4
+ type Interface = ITable;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { createAbstraction } from "@webiny/feature/api";
2
+ const CmsDdbEsTable = createAbstraction("Cms/DdbEs/Table");
3
+ export { CmsDdbEsTable };
4
+
5
+ //# sourceMappingURL=CmsDdbEsTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abstractions/CmsDdbEsTable.js","sources":["../../src/abstractions/CmsDdbEsTable.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport type { ITable } from \"@webiny/db-dynamodb\";\n\nexport const CmsDdbEsTable = createAbstraction<ITable>(\"Cms/DdbEs/Table\");\n\nexport namespace CmsDdbEsTable {\n export type Interface = ITable;\n}\n"],"names":["CmsDdbEsTable","createAbstraction"],"mappings":";AAGO,MAAMA,gBAAgBC,kBAA0B"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Claims the `cms.` debug namespace prefix.
3
+ *
4
+ * The module specifier has to be exactly this one: augmenting a relative path would silently do
5
+ * nothing.
6
+ */
7
+ declare module "@webiny/api-core/features/debugger/abstractions.js" {
8
+ interface DebugNamespaces {
9
+ cms: `cms.${string}`;
10
+ }
11
+ }
12
+ export {};
File without changes
@@ -1,8 +1,7 @@
1
- import { Entity, Table } from "dynamodb-toolbox";
2
- import { Attributes } from "../types";
1
+ import { type ITable } from "@webiny/db-dynamodb";
2
+ import type { IEntryEntity } from "../definitions/types.js";
3
3
  export interface CreateEntryEntityParams {
4
- table: Table;
4
+ table: ITable;
5
5
  entityName: string;
6
- attributes: Attributes;
7
6
  }
8
- export declare const createEntryEntity: (params: CreateEntryEntityParams) => Entity<any>;
7
+ export declare const createEntryEntity: (params: CreateEntryEntityParams) => IEntryEntity;
@@ -1,90 +1,11 @@
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.createEntryEntity = void 0;
9
-
10
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
12
- var _dynamodbToolbox = require("dynamodb-toolbox");
13
-
14
- const createEntryEntity = 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
- TYPE: {
33
- type: "string"
34
- },
35
- __type: {
36
- type: "string"
37
- },
38
- webinyVersion: {
39
- type: "string"
40
- },
41
- tenant: {
42
- type: "string"
43
- },
44
- entryId: {
45
- type: "string"
46
- },
47
- id: {
48
- type: "string"
49
- },
50
- createdBy: {
51
- type: "map"
52
- },
53
- ownedBy: {
54
- type: "map"
55
- },
56
- createdOn: {
57
- type: "string"
58
- },
59
- savedOn: {
60
- type: "string"
61
- },
62
- modelId: {
63
- type: "string"
64
- },
65
- locale: {
66
- type: "string"
67
- },
68
- publishedOn: {
69
- type: "string"
70
- },
71
- version: {
72
- type: "number"
73
- },
74
- locked: {
75
- type: "boolean"
76
- },
77
- status: {
78
- type: "string"
79
- },
80
- values: {
81
- type: "map"
82
- },
83
- meta: {
84
- type: "map"
85
- }
86
- }, attributes || {})
87
- });
1
+ import { createStandardEntity } from "@webiny/db-dynamodb";
2
+ const createEntryEntity = (params)=>{
3
+ const { table, entityName } = params;
4
+ return createStandardEntity({
5
+ name: entityName,
6
+ table: table.table
7
+ });
88
8
  };
9
+ export { createEntryEntity };
89
10
 
90
- exports.createEntryEntity = createEntryEntity;
11
+ //# sourceMappingURL=entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createEntryEntity","params","table","entityName","attributes","Entity","name","PK","type","partitionKey","SK","sortKey","TYPE","__type","webinyVersion","tenant","entryId","id","createdBy","ownedBy","createdOn","savedOn","modelId","locale","publishedOn","version","locked","status","values","meta"],"sources":["entry.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\nexport interface CreateEntryEntityParams {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\nexport const createEntryEntity = (params: CreateEntryEntityParams): 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 TYPE: {\n type: \"string\"\n },\n __type: {\n type: \"string\"\n },\n webinyVersion: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n entryId: {\n type: \"string\"\n },\n id: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n ownedBy: {\n type: \"map\"\n },\n createdOn: {\n type: \"string\"\n },\n savedOn: {\n type: \"string\"\n },\n modelId: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n publishedOn: {\n type: \"string\"\n },\n version: {\n type: \"number\"\n },\n locked: {\n type: \"boolean\"\n },\n status: {\n type: \"string\"\n },\n values: {\n type: \"map\"\n },\n meta: {\n type: \"map\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AAQO,MAAMA,iBAAiB,GAAIC,MAAD,IAAkD;EAC/E,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,IAAI,EAAE;QACFJ,IAAI,EAAE;MADJ,CATA;MAYNK,MAAM,EAAE;QACJL,IAAI,EAAE;MADF,CAZF;MAeNM,aAAa,EAAE;QACXN,IAAI,EAAE;MADK,CAfT;MAkBNO,MAAM,EAAE;QACJP,IAAI,EAAE;MADF,CAlBF;MAqBNQ,OAAO,EAAE;QACLR,IAAI,EAAE;MADD,CArBH;MAwBNS,EAAE,EAAE;QACAT,IAAI,EAAE;MADN,CAxBE;MA2BNU,SAAS,EAAE;QACPV,IAAI,EAAE;MADC,CA3BL;MA8BNW,OAAO,EAAE;QACLX,IAAI,EAAE;MADD,CA9BH;MAiCNY,SAAS,EAAE;QACPZ,IAAI,EAAE;MADC,CAjCL;MAoCNa,OAAO,EAAE;QACLb,IAAI,EAAE;MADD,CApCH;MAuCNc,OAAO,EAAE;QACLd,IAAI,EAAE;MADD,CAvCH;MA0CNe,MAAM,EAAE;QACJf,IAAI,EAAE;MADF,CA1CF;MA6CNgB,WAAW,EAAE;QACThB,IAAI,EAAE;MADG,CA7CP;MAgDNiB,OAAO,EAAE;QACLjB,IAAI,EAAE;MADD,CAhDH;MAmDNkB,MAAM,EAAE;QACJlB,IAAI,EAAE;MADF,CAnDF;MAsDNmB,MAAM,EAAE;QACJnB,IAAI,EAAE;MADF,CAtDF;MAyDNoB,MAAM,EAAE;QACJpB,IAAI,EAAE;MADF,CAzDF;MA4DNqB,IAAI,EAAE;QACFrB,IAAI,EAAE;MADJ;IA5DA,GA+DFJ,UAAU,IAAI,EA/DZ;EAHI,CAAX,CAAP;AAqEH,CAvEM"}
1
+ {"version":3,"file":"definitions/entry.js","sources":["../../src/definitions/entry.ts"],"sourcesContent":["import { createStandardEntity, type ITable } from \"@webiny/db-dynamodb\";\nimport type { IEntryEntity, IEntryEntityAttributesData } from \"~/definitions/types.js\";\n\nexport interface CreateEntryEntityParams {\n table: ITable;\n entityName: string;\n}\nexport const createEntryEntity = (params: CreateEntryEntityParams): IEntryEntity => {\n const { table, entityName } = params;\n return createStandardEntity<IEntryEntityAttributesData>({\n name: entityName,\n table: table.table\n });\n};\n"],"names":["createEntryEntity","params","table","entityName","createStandardEntity"],"mappings":";AAOO,MAAMA,oBAAoB,CAACC;IAC9B,MAAM,EAAEC,KAAK,EAAEC,UAAU,EAAE,GAAGF;IAC9B,OAAOG,qBAAiD;QACpD,MAAMD;QACN,OAAOD,MAAM,KAAK;IACtB;AACJ"}
@@ -1,8 +1,8 @@
1
- import { Entity, Table } from "dynamodb-toolbox";
2
- import { Attributes } from "../types";
3
- export interface CreateGroupEntityParams {
4
- table: Table;
1
+ import { type ITable } from "@webiny/db-dynamodb";
2
+ import type { IGroupEntity } from "../definitions/types.js";
3
+ interface Params {
4
+ table: ITable;
5
5
  entityName: string;
6
- attributes: Attributes;
7
6
  }
8
- export declare const createGroupEntity: (params: CreateGroupEntityParams) => Entity<any>;
7
+ export declare const createGroupEntity: (params: Params) => IGroupEntity;
8
+ export {};
@@ -1,70 +1,11 @@
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.createGroupEntity = void 0;
9
-
10
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
12
- var _dynamodbToolbox = require("dynamodb-toolbox");
13
-
14
- const createGroupEntity = params => {
15
- const {
16
- table,
17
- attributes,
18
- entityName
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
- webinyVersion: {
34
- type: "string"
35
- },
36
- id: {
37
- type: "string"
38
- },
39
- name: {
40
- type: "string"
41
- },
42
- slug: {
43
- type: "string"
44
- },
45
- locale: {
46
- type: "string"
47
- },
48
- description: {
49
- type: "string"
50
- },
51
- icon: {
52
- type: "string"
53
- },
54
- createdBy: {
55
- type: "map"
56
- },
57
- createdOn: {
58
- type: "string"
59
- },
60
- savedOn: {
61
- type: "string"
62
- },
63
- tenant: {
64
- type: "string"
65
- }
66
- }, attributes || {})
67
- });
1
+ import { createStandardEntity } from "@webiny/db-dynamodb";
2
+ const createGroupEntity = (params)=>{
3
+ const { table, entityName } = params;
4
+ return createStandardEntity({
5
+ table: table.table,
6
+ name: entityName
7
+ });
68
8
  };
9
+ export { createGroupEntity };
69
10
 
70
- exports.createGroupEntity = createGroupEntity;
11
+ //# sourceMappingURL=group.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createGroupEntity","params","table","attributes","entityName","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","webinyVersion","id","slug","locale","description","icon","createdBy","createdOn","savedOn","tenant"],"sources":["group.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\nexport interface CreateGroupEntityParams {\n table: Table;\n entityName: string;\n attributes: Attributes;\n}\nexport const createGroupEntity = (params: CreateGroupEntityParams): 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 },\n webinyVersion: {\n type: \"string\"\n },\n id: {\n type: \"string\"\n },\n name: {\n type: \"string\"\n },\n slug: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n description: {\n type: \"string\"\n },\n icon: {\n type: \"string\"\n },\n\n createdBy: {\n type: \"map\"\n },\n createdOn: {\n type: \"string\"\n },\n savedOn: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AAQO,MAAMA,iBAAiB,GAAIC,MAAD,IAAkD;EAC/E,MAAM;IAAEC,KAAF;IAASC,UAAT;IAAqBC;EAArB,IAAoCH,MAA1C;EACA,OAAO,IAAII,uBAAJ,CAAW;IACdC,IAAI,EAAEF,UADQ;IAEdF,KAFc;IAGdC,UAAU;MACNI,EAAE,EAAE;QACAC,YAAY,EAAE;MADd,CADE;MAINC,EAAE,EAAE;QACAC,OAAO,EAAE;MADT,CAJE;MAONC,IAAI,EAAE;QACFC,IAAI,EAAE;MADJ,CAPA;MAUNC,aAAa,EAAE;QACXD,IAAI,EAAE;MADK,CAVT;MAaNE,EAAE,EAAE;QACAF,IAAI,EAAE;MADN,CAbE;MAgBNN,IAAI,EAAE;QACFM,IAAI,EAAE;MADJ,CAhBA;MAmBNG,IAAI,EAAE;QACFH,IAAI,EAAE;MADJ,CAnBA;MAsBNI,MAAM,EAAE;QACJJ,IAAI,EAAE;MADF,CAtBF;MAyBNK,WAAW,EAAE;QACTL,IAAI,EAAE;MADG,CAzBP;MA4BNM,IAAI,EAAE;QACFN,IAAI,EAAE;MADJ,CA5BA;MAgCNO,SAAS,EAAE;QACPP,IAAI,EAAE;MADC,CAhCL;MAmCNQ,SAAS,EAAE;QACPR,IAAI,EAAE;MADC,CAnCL;MAsCNS,OAAO,EAAE;QACLT,IAAI,EAAE;MADD,CAtCH;MAyCNU,MAAM,EAAE;QACJV,IAAI,EAAE;MADF;IAzCF,GA4CFT,UAAU,IAAI,EA5CZ;EAHI,CAAX,CAAP;AAkDH,CApDM"}
1
+ {"version":3,"file":"definitions/group.js","sources":["../../src/definitions/group.ts"],"sourcesContent":["import { createStandardEntity, type ITable } from \"@webiny/db-dynamodb\";\nimport type { IGroupEntity } from \"~/definitions/types.js\";\nimport type { CmsGroup } from \"@webiny/api-headless-cms/types/index.js\";\n\ninterface Params {\n table: ITable;\n entityName: string;\n}\nexport const createGroupEntity = (params: Params): IGroupEntity => {\n const { table, entityName } = params;\n return createStandardEntity<CmsGroup>({\n table: table.table,\n name: entityName\n });\n};\n"],"names":["createGroupEntity","params","table","entityName","createStandardEntity"],"mappings":";AAQO,MAAMA,oBAAoB,CAACC;IAC9B,MAAM,EAAEC,KAAK,EAAEC,UAAU,EAAE,GAAGF;IAC9B,OAAOG,qBAA+B;QAClC,OAAOF,MAAM,KAAK;QAClB,MAAMC;IACV;AACJ"}
@@ -1,8 +1,8 @@
1
- import { Entity, Table } from "dynamodb-toolbox";
2
- import { Attributes } from "../types";
3
- export interface CreateModelEntityParams {
4
- table: Table;
1
+ import { type ITable } from "@webiny/db-dynamodb";
2
+ import type { IModelEntity } from "../definitions/types.js";
3
+ interface Params {
4
+ table: ITable;
5
5
  entityName: string;
6
- attributes: Attributes;
7
6
  }
8
- export declare const createModelEntity: (params: CreateModelEntityParams) => Entity<any>;
7
+ export declare const createModelEntity: (params: Params) => IModelEntity;
8
+ export {};
@@ -1,92 +1,11 @@
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.createModelEntity = void 0;
9
-
10
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
-
12
- var _dynamodbToolbox = require("dynamodb-toolbox");
13
-
14
- const createModelEntity = params => {
15
- const {
16
- table,
17
- attributes,
18
- entityName
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
- required: true
33
- },
34
- webinyVersion: {
35
- type: "string",
36
- required: true
37
- },
38
- name: {
39
- type: "string",
40
- required: true
41
- },
42
- modelId: {
43
- type: "string",
44
- required: true
45
- },
46
- locale: {
47
- type: "string",
48
- required: true
49
- },
50
- group: {
51
- type: "map",
52
- required: true
53
- },
54
- description: {
55
- type: "string"
56
- },
57
- createdOn: {
58
- type: "string",
59
- required: true
60
- },
61
- savedOn: {
62
- type: "string",
63
- required: true
64
- },
65
- createdBy: {
66
- type: "map",
67
- required: true
68
- },
69
- fields: {
70
- type: "list",
71
- required: true
72
- },
73
- layout: {
74
- type: "list",
75
- required: true
76
- },
77
- lockedFields: {
78
- type: "list",
79
- required: true
80
- },
81
- titleFieldId: {
82
- type: "string"
83
- },
84
- tenant: {
85
- type: "string",
86
- required: true
87
- }
88
- }, attributes || {})
89
- });
1
+ import { createStandardEntity } from "@webiny/db-dynamodb";
2
+ const createModelEntity = (params)=>{
3
+ const { table, entityName } = params;
4
+ return createStandardEntity({
5
+ table: table.table,
6
+ name: entityName
7
+ });
90
8
  };
9
+ export { createModelEntity };
91
10
 
92
- exports.createModelEntity = createModelEntity;
11
+ //# sourceMappingURL=model.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createModelEntity","params","table","attributes","entityName","Entity","name","PK","partitionKey","SK","sortKey","TYPE","type","required","webinyVersion","modelId","locale","group","description","createdOn","savedOn","createdBy","fields","layout","lockedFields","titleFieldId","tenant"],"sources":["model.ts"],"sourcesContent":["import { Entity, Table } from \"dynamodb-toolbox\";\nimport { Attributes } from \"~/types\";\n\nexport interface CreateModelEntityParams {\n table: Table;\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 locale: {\n type: \"string\",\n required: true\n },\n group: {\n type: \"map\",\n required: true\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 lockedFields: {\n type: \"list\",\n required: true\n },\n titleFieldId: {\n type: \"string\"\n },\n tenant: {\n type: \"string\",\n required: true\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;;;;;;AAAA;;AASO,MAAMA,iBAAiB,GAAIC,MAAD,IAAkD;EAC/E,MAAM;IAAEC,KAAF;IAASC,UAAT;IAAqBC;EAArB,IAAoCH,MAA1C;EACA,OAAO,IAAII,uBAAJ,CAAW;IACdC,IAAI,EAAEF,UADQ;IAEdF,KAFc;IAGdC,UAAU;MACNI,EAAE,EAAE;QACAC,YAAY,EAAE;MADd,CADE;MAINC,EAAE,EAAE;QACAC,OAAO,EAAE;MADT,CAJE;MAONC,IAAI,EAAE;QACFC,IAAI,EAAE,QADJ;QAEFC,QAAQ,EAAE;MAFR,CAPA;MAWNC,aAAa,EAAE;QACXF,IAAI,EAAE,QADK;QAEXC,QAAQ,EAAE;MAFC,CAXT;MAeNP,IAAI,EAAE;QACFM,IAAI,EAAE,QADJ;QAEFC,QAAQ,EAAE;MAFR,CAfA;MAmBNE,OAAO,EAAE;QACLH,IAAI,EAAE,QADD;QAELC,QAAQ,EAAE;MAFL,CAnBH;MAuBNG,MAAM,EAAE;QACJJ,IAAI,EAAE,QADF;QAEJC,QAAQ,EAAE;MAFN,CAvBF;MA2BNI,KAAK,EAAE;QACHL,IAAI,EAAE,KADH;QAEHC,QAAQ,EAAE;MAFP,CA3BD;MA+BNK,WAAW,EAAE;QACTN,IAAI,EAAE;MADG,CA/BP;MAkCNO,SAAS,EAAE;QACPP,IAAI,EAAE,QADC;QAEPC,QAAQ,EAAE;MAFH,CAlCL;MAsCNO,OAAO,EAAE;QACLR,IAAI,EAAE,QADD;QAELC,QAAQ,EAAE;MAFL,CAtCH;MA0CNQ,SAAS,EAAE;QACPT,IAAI,EAAE,KADC;QAEPC,QAAQ,EAAE;MAFH,CA1CL;MA8CNS,MAAM,EAAE;QACJV,IAAI,EAAE,MADF;QAEJC,QAAQ,EAAE;MAFN,CA9CF;MAkDNU,MAAM,EAAE;QACJX,IAAI,EAAE,MADF;QAEJC,QAAQ,EAAE;MAFN,CAlDF;MAsDNW,YAAY,EAAE;QACVZ,IAAI,EAAE,MADI;QAEVC,QAAQ,EAAE;MAFA,CAtDR;MA0DNY,YAAY,EAAE;QACVb,IAAI,EAAE;MADI,CA1DR;MA6DNc,MAAM,EAAE;QACJd,IAAI,EAAE,QADF;QAEJC,QAAQ,EAAE;MAFN;IA7DF,GAiEFV,UAAU,IAAI,EAjEZ;EAHI,CAAX,CAAP;AAuEH,CAzEM"}
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
+ };