@webiny/api-headless-cms-ddb-es 0.0.0-unstable.b14eaecf38 → 0.0.0-unstable.b6d7105cee

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 (433) hide show
  1. package/README.md +6 -30
  2. package/configurations.d.ts +20 -10
  3. package/configurations.js +34 -32
  4. package/configurations.js.map +1 -1
  5. package/definitions/entry.d.ts +4 -5
  6. package/definitions/entry.js +10 -87
  7. package/definitions/entry.js.map +1 -1
  8. package/definitions/group.d.ts +6 -6
  9. package/definitions/group.js +10 -64
  10. package/definitions/group.js.map +1 -1
  11. package/definitions/model.d.ts +6 -6
  12. package/definitions/model.js +10 -108
  13. package/definitions/model.js.map +1 -1
  14. package/definitions/types.d.ts +65 -0
  15. package/definitions/types.js +0 -0
  16. package/elasticsearch/createElasticsearchIndex.d.ts +6 -6
  17. package/elasticsearch/createElasticsearchIndex.js +42 -46
  18. package/elasticsearch/createElasticsearchIndex.js.map +1 -1
  19. package/elasticsearch/deleteElasticsearchIndex.d.ts +6 -4
  20. package/elasticsearch/deleteElasticsearchIndex.js +21 -34
  21. package/elasticsearch/deleteElasticsearchIndex.js.map +1 -1
  22. package/exports/api/cms/opensearch.d.ts +9 -0
  23. package/exports/api/cms/opensearch.js +9 -0
  24. package/feature.d.ts +1 -0
  25. package/feature.js +201 -0
  26. package/feature.js.map +1 -0
  27. package/features/CmsEntryOpenSearchBodyModifier/abstractions.d.ts +16 -0
  28. package/features/CmsEntryOpenSearchBodyModifier/abstractions.js +5 -0
  29. package/features/CmsEntryOpenSearchBodyModifier/abstractions.js.map +1 -0
  30. package/features/CmsEntryOpenSearchBodyModifier/index.d.ts +1 -0
  31. package/features/CmsEntryOpenSearchBodyModifier/index.js +1 -0
  32. package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.d.ts +14 -0
  33. package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.js +42 -0
  34. package/features/CmsEntryOpenSearchFieldIndex/CmsEntryOpenSearchFieldIndexRegistry.js.map +1 -0
  35. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.d.ts +32 -0
  36. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.js +5 -0
  37. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndex.js.map +1 -0
  38. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.d.ts +11 -0
  39. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.js +5 -0
  40. package/features/CmsEntryOpenSearchFieldIndex/abstractions/CmsEntryOpenSearchFieldIndexRegistry.js.map +1 -0
  41. package/features/CmsEntryOpenSearchFieldIndex/constants.d.ts +1 -0
  42. package/features/CmsEntryOpenSearchFieldIndex/constants.js +4 -0
  43. package/features/CmsEntryOpenSearchFieldIndex/constants.js.map +1 -0
  44. package/features/CmsEntryOpenSearchFieldIndex/feature.d.ts +4 -0
  45. package/features/CmsEntryOpenSearchFieldIndex/feature.js +29 -0
  46. package/features/CmsEntryOpenSearchFieldIndex/feature.js.map +1 -0
  47. package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.d.ts +11 -0
  48. package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.js +60 -0
  49. package/features/CmsEntryOpenSearchFieldIndex/fields/DateTimeFieldIndex.js.map +1 -0
  50. package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.d.ts +13 -0
  51. package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.js +33 -0
  52. package/features/CmsEntryOpenSearchFieldIndex/fields/DefaultFieldIndex.js.map +1 -0
  53. package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.d.ts +10 -0
  54. package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.js +21 -0
  55. package/features/CmsEntryOpenSearchFieldIndex/fields/JsonFieldIndex.js.map +1 -0
  56. package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.d.ts +10 -0
  57. package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.js +22 -0
  58. package/features/CmsEntryOpenSearchFieldIndex/fields/LongTextFieldIndex.js.map +1 -0
  59. package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.d.ts +11 -0
  60. package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.js +32 -0
  61. package/features/CmsEntryOpenSearchFieldIndex/fields/NumberFieldIndex.js.map +1 -0
  62. package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.d.ts +12 -0
  63. package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.js +107 -0
  64. package/features/CmsEntryOpenSearchFieldIndex/fields/ObjectFieldIndex.js.map +1 -0
  65. package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.d.ts +10 -0
  66. package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.js +21 -0
  67. package/features/CmsEntryOpenSearchFieldIndex/fields/RichTextFieldIndex.js.map +1 -0
  68. package/features/CmsEntryOpenSearchFieldIndex/fields/TextCompressedFieldIndex.d.ts +15 -0
  69. package/features/CmsEntryOpenSearchFieldIndex/fields/TextCompressedFieldIndex.js +40 -0
  70. package/features/CmsEntryOpenSearchFieldIndex/fields/TextCompressedFieldIndex.js.map +1 -0
  71. package/features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.d.ts +15 -0
  72. package/features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.js +40 -0
  73. package/features/CmsEntryOpenSearchFieldIndex/fields/TextEncryptedFieldIndex.js.map +1 -0
  74. package/features/CmsEntryOpenSearchFieldIndex/index.d.ts +3 -0
  75. package/features/CmsEntryOpenSearchFieldIndex/index.js +3 -0
  76. package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.d.ts +11 -0
  77. package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.js +36 -0
  78. package/features/CmsEntryOpenSearchFilter/CmsEntryOpenSearchFilterRegistry.js.map +1 -0
  79. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.d.ts +37 -0
  80. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.js +5 -0
  81. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilter.js.map +1 -0
  82. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.d.ts +9 -0
  83. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.js +5 -0
  84. package/features/CmsEntryOpenSearchFilter/abstractions/CmsEntryOpenSearchFilterRegistry.js.map +1 -0
  85. package/features/CmsEntryOpenSearchFilter/constants.d.ts +1 -0
  86. package/features/CmsEntryOpenSearchFilter/constants.js +4 -0
  87. package/features/CmsEntryOpenSearchFilter/constants.js.map +1 -0
  88. package/features/CmsEntryOpenSearchFilter/feature.d.ts +4 -0
  89. package/features/CmsEntryOpenSearchFilter/feature.js +17 -0
  90. package/features/CmsEntryOpenSearchFilter/feature.js.map +1 -0
  91. package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.d.ts +9 -0
  92. package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.js +26 -0
  93. package/features/CmsEntryOpenSearchFilter/fields/DefaultFilter.js.map +1 -0
  94. package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.d.ts +9 -0
  95. package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.js +43 -0
  96. package/features/CmsEntryOpenSearchFilter/fields/ObjectFilter.js.map +1 -0
  97. package/features/CmsEntryOpenSearchFilter/fields/RefFilter.d.ts +9 -0
  98. package/features/CmsEntryOpenSearchFilter/fields/RefFilter.js +36 -0
  99. package/features/CmsEntryOpenSearchFilter/fields/RefFilter.js.map +1 -0
  100. package/features/CmsEntryOpenSearchFilter/index.d.ts +3 -0
  101. package/features/CmsEntryOpenSearchFilter/index.js +3 -0
  102. package/features/CmsEntryOpenSearchFullTextSearch/abstractions.d.ts +20 -0
  103. package/features/CmsEntryOpenSearchFullTextSearch/abstractions.js +5 -0
  104. package/features/CmsEntryOpenSearchFullTextSearch/abstractions.js.map +1 -0
  105. package/features/CmsEntryOpenSearchFullTextSearch/index.d.ts +1 -0
  106. package/features/CmsEntryOpenSearchFullTextSearch/index.js +1 -0
  107. package/features/CmsEntryOpenSearchQueryModifier/abstractions.d.ts +16 -0
  108. package/features/CmsEntryOpenSearchQueryModifier/abstractions.js +5 -0
  109. package/features/CmsEntryOpenSearchQueryModifier/abstractions.js.map +1 -0
  110. package/features/CmsEntryOpenSearchQueryModifier/index.d.ts +1 -0
  111. package/features/CmsEntryOpenSearchQueryModifier/index.js +1 -0
  112. package/features/CmsEntryOpenSearchSortModifier/abstractions.d.ts +15 -0
  113. package/features/CmsEntryOpenSearchSortModifier/abstractions.js +5 -0
  114. package/features/CmsEntryOpenSearchSortModifier/abstractions.js.map +1 -0
  115. package/features/CmsEntryOpenSearchSortModifier/index.d.ts +1 -0
  116. package/features/CmsEntryOpenSearchSortModifier/index.js +1 -0
  117. package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.d.ts +12 -0
  118. package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.js +31 -0
  119. package/features/CmsEntryOpenSearchValueSearch/CmsEntryOpenSearchValueSearchRegistry.js.map +1 -0
  120. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.d.ts +22 -0
  121. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.js +5 -0
  122. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearch.js.map +1 -0
  123. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.d.ts +10 -0
  124. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.js +5 -0
  125. package/features/CmsEntryOpenSearchValueSearch/abstractions/CmsEntryOpenSearchValueSearchRegistry.js.map +1 -0
  126. package/features/CmsEntryOpenSearchValueSearch/feature.d.ts +4 -0
  127. package/features/CmsEntryOpenSearchValueSearch/feature.js +17 -0
  128. package/features/CmsEntryOpenSearchValueSearch/feature.js.map +1 -0
  129. package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.d.ts +10 -0
  130. package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.js +21 -0
  131. package/features/CmsEntryOpenSearchValueSearch/fields/RefSearch.js.map +1 -0
  132. package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.d.ts +10 -0
  133. package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.js +44 -0
  134. package/features/CmsEntryOpenSearchValueSearch/fields/SearchableJsonSearch.js.map +1 -0
  135. package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.d.ts +10 -0
  136. package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.js +22 -0
  137. package/features/CmsEntryOpenSearchValueSearch/fields/TimeSearch.js.map +1 -0
  138. package/features/CmsEntryOpenSearchValueSearch/index.d.ts +3 -0
  139. package/features/CmsEntryOpenSearchValueSearch/index.js +3 -0
  140. package/features/CmsEntryOpenSearchValuesModifier/abstractions.d.ts +23 -0
  141. package/features/CmsEntryOpenSearchValuesModifier/abstractions.js +5 -0
  142. package/features/CmsEntryOpenSearchValuesModifier/abstractions.js.map +1 -0
  143. package/features/CmsEntryOpenSearchValuesModifier/index.d.ts +1 -0
  144. package/features/CmsEntryOpenSearchValuesModifier/index.js +1 -0
  145. package/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.d.ts +25 -0
  146. package/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.js +36 -0
  147. package/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.js.map +1 -0
  148. package/features/CmsModelOpenSearchIndex/DefaultCmsModelOpenSearchIndex.d.ts +8 -0
  149. package/features/CmsModelOpenSearchIndex/DefaultCmsModelOpenSearchIndex.js +17 -0
  150. package/features/CmsModelOpenSearchIndex/DefaultCmsModelOpenSearchIndex.js.map +1 -0
  151. package/features/CmsModelOpenSearchIndex/abstractions.d.ts +20 -0
  152. package/features/CmsModelOpenSearchIndex/abstractions.js +5 -0
  153. package/features/CmsModelOpenSearchIndex/abstractions.js.map +1 -0
  154. package/features/CmsModelOpenSearchIndex/feature.d.ts +4 -0
  155. package/features/CmsModelOpenSearchIndex/feature.js +13 -0
  156. package/features/CmsModelOpenSearchIndex/feature.js.map +1 -0
  157. package/features/CmsModelOpenSearchIndex/index.d.ts +3 -0
  158. package/features/CmsModelOpenSearchIndex/index.js +3 -0
  159. package/helpers/entryIndexHelpers.d.ts +13 -11
  160. package/helpers/entryIndexHelpers.js +73 -168
  161. package/helpers/entryIndexHelpers.js.map +1 -1
  162. package/helpers/fieldIdentifier.d.ts +6 -0
  163. package/helpers/fieldIdentifier.js +23 -0
  164. package/helpers/fieldIdentifier.js.map +1 -0
  165. package/helpers/index.d.ts +2 -1
  166. package/helpers/index.js +2 -16
  167. package/index.d.ts +1 -3
  168. package/index.js +1 -215
  169. package/operations/entry/dataLoader/DataLoaderCache.d.ts +16 -0
  170. package/operations/entry/dataLoader/DataLoaderCache.js +27 -0
  171. package/operations/entry/dataLoader/DataLoaderCache.js.map +1 -0
  172. package/operations/entry/dataLoader/constants.d.ts +1 -0
  173. package/operations/entry/dataLoader/constants.js +5 -0
  174. package/operations/entry/dataLoader/constants.js.map +1 -0
  175. package/operations/entry/dataLoader/createBatchScheduleFn.d.ts +8 -0
  176. package/operations/entry/dataLoader/createBatchScheduleFn.js +10 -0
  177. package/operations/entry/dataLoader/createBatchScheduleFn.js.map +1 -0
  178. package/operations/entry/dataLoader/getAllEntryRevisions.d.ts +4 -0
  179. package/operations/entry/dataLoader/getAllEntryRevisions.js +24 -0
  180. package/operations/entry/dataLoader/getAllEntryRevisions.js.map +1 -0
  181. package/operations/entry/dataLoader/getLatestRevisionByEntryId.d.ts +4 -0
  182. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js +34 -0
  183. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js.map +1 -0
  184. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.d.ts +4 -0
  185. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js +34 -0
  186. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js.map +1 -0
  187. package/operations/entry/dataLoader/getRevisionById.d.ts +4 -0
  188. package/operations/entry/dataLoader/getRevisionById.js +40 -0
  189. package/operations/entry/dataLoader/getRevisionById.js.map +1 -0
  190. package/operations/entry/dataLoader/index.d.ts +8 -0
  191. package/operations/entry/dataLoader/index.js +18 -0
  192. package/operations/entry/dataLoader/index.js.map +1 -0
  193. package/operations/entry/dataLoader/types.d.ts +6 -0
  194. package/operations/entry/dataLoader/types.js +0 -0
  195. package/operations/entry/dataLoaders.d.ts +17 -38
  196. package/operations/entry/dataLoaders.js +83 -306
  197. package/operations/entry/dataLoaders.js.map +1 -1
  198. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.d.ts +1 -1
  199. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js +8 -31
  200. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js.map +1 -1
  201. package/operations/entry/elasticsearch/body.d.ts +25 -6
  202. package/operations/entry/elasticsearch/body.js +85 -136
  203. package/operations/entry/elasticsearch/body.js.map +1 -1
  204. package/operations/entry/elasticsearch/fields/createSystemField.d.ts +4 -0
  205. package/operations/entry/elasticsearch/fields/createSystemField.js +9 -0
  206. package/operations/entry/elasticsearch/fields/createSystemField.js.map +1 -0
  207. package/operations/entry/elasticsearch/fields/live.d.ts +2 -0
  208. package/operations/entry/elasticsearch/fields/live.js +50 -0
  209. package/operations/entry/elasticsearch/fields/live.js.map +1 -0
  210. package/operations/entry/elasticsearch/fields/location.d.ts +2 -0
  211. package/operations/entry/elasticsearch/fields/location.js +50 -0
  212. package/operations/entry/elasticsearch/fields/location.js.map +1 -0
  213. package/operations/entry/elasticsearch/fields/state.d.ts +2 -0
  214. package/operations/entry/elasticsearch/fields/state.js +104 -0
  215. package/operations/entry/elasticsearch/fields/state.js.map +1 -0
  216. package/operations/entry/elasticsearch/fields.d.ts +8 -6
  217. package/operations/entry/elasticsearch/fields.js +202 -256
  218. package/operations/entry/elasticsearch/fields.js.map +1 -1
  219. package/operations/entry/elasticsearch/filtering/applyFiltering.d.ts +6 -5
  220. package/operations/entry/elasticsearch/filtering/applyFiltering.js +37 -55
  221. package/operations/entry/elasticsearch/filtering/applyFiltering.js.map +1 -1
  222. package/operations/entry/elasticsearch/filtering/exec.d.ts +13 -8
  223. package/operations/entry/elasticsearch/filtering/exec.js +93 -169
  224. package/operations/entry/elasticsearch/filtering/exec.js.map +1 -1
  225. package/operations/entry/elasticsearch/filtering/index.d.ts +1 -1
  226. package/operations/entry/elasticsearch/filtering/index.js +1 -16
  227. package/operations/entry/elasticsearch/filtering/path.d.ts +5 -3
  228. package/operations/entry/elasticsearch/filtering/path.js +26 -43
  229. package/operations/entry/elasticsearch/filtering/path.js.map +1 -1
  230. package/operations/entry/elasticsearch/filtering/populated.d.ts +2 -2
  231. package/operations/entry/elasticsearch/filtering/populated.js +10 -21
  232. package/operations/entry/elasticsearch/filtering/populated.js.map +1 -1
  233. package/operations/entry/elasticsearch/filtering/values.d.ts +1 -1
  234. package/operations/entry/elasticsearch/filtering/values.js +13 -20
  235. package/operations/entry/elasticsearch/filtering/values.js.map +1 -1
  236. package/operations/entry/elasticsearch/fullTextSearch.d.ts +7 -6
  237. package/operations/entry/elasticsearch/fullTextSearch.js +47 -85
  238. package/operations/entry/elasticsearch/fullTextSearch.js.map +1 -1
  239. package/operations/entry/elasticsearch/fullTextSearchFields.d.ts +4 -4
  240. package/operations/entry/elasticsearch/fullTextSearchFields.js +9 -24
  241. package/operations/entry/elasticsearch/fullTextSearchFields.js.map +1 -1
  242. package/operations/entry/elasticsearch/initialQuery.d.ts +5 -4
  243. package/operations/entry/elasticsearch/initialQuery.js +38 -98
  244. package/operations/entry/elasticsearch/initialQuery.js.map +1 -1
  245. package/operations/entry/elasticsearch/keyword.d.ts +1 -1
  246. package/operations/entry/elasticsearch/keyword.js +16 -33
  247. package/operations/entry/elasticsearch/keyword.js.map +1 -1
  248. package/operations/entry/elasticsearch/plugins/operator.d.ts +4 -5
  249. package/operations/entry/elasticsearch/plugins/operator.js +9 -36
  250. package/operations/entry/elasticsearch/plugins/operator.js.map +1 -1
  251. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.d.ts +2 -0
  252. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js +8 -0
  253. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js.map +1 -0
  254. package/operations/entry/elasticsearch/sort.d.ts +9 -6
  255. package/operations/entry/elasticsearch/sort.js +76 -77
  256. package/operations/entry/elasticsearch/sort.js.map +1 -1
  257. package/operations/entry/elasticsearch/transformValueForSearch.d.ts +3 -10
  258. package/operations/entry/elasticsearch/transformValueForSearch.js +11 -29
  259. package/operations/entry/elasticsearch/transformValueForSearch.js.map +1 -1
  260. package/operations/entry/elasticsearch/types.d.ts +6 -16
  261. package/operations/entry/elasticsearch/types.js +0 -5
  262. package/operations/entry/index.d.ts +33 -6
  263. package/operations/entry/index.js +1348 -1138
  264. package/operations/entry/index.js.map +1 -1
  265. package/operations/entry/keys.d.ts +31 -1
  266. package/operations/entry/keys.js +46 -27
  267. package/operations/entry/keys.js.map +1 -1
  268. package/operations/entry/recordType.js +5 -17
  269. package/operations/entry/recordType.js.map +1 -1
  270. package/operations/entry/transformations/convertEntryKeys.d.ts +8 -0
  271. package/operations/entry/transformations/convertEntryKeys.js +25 -0
  272. package/operations/entry/transformations/convertEntryKeys.js.map +1 -0
  273. package/operations/entry/transformations/index.d.ts +33 -0
  274. package/operations/entry/transformations/index.js +91 -0
  275. package/operations/entry/transformations/index.js.map +1 -0
  276. package/operations/entry/transformations/modifyEntryValues.d.ts +53 -0
  277. package/operations/entry/transformations/modifyEntryValues.js +16 -0
  278. package/operations/entry/transformations/modifyEntryValues.js.map +1 -0
  279. package/operations/entry/transformations/transformEntryKeys.d.ts +11 -0
  280. package/operations/entry/transformations/transformEntryKeys.js +17 -0
  281. package/operations/entry/transformations/transformEntryKeys.js.map +1 -0
  282. package/operations/entry/transformations/transformEntryToIndex.d.ts +10 -0
  283. package/operations/entry/transformations/transformEntryToIndex.js +20 -0
  284. package/operations/entry/transformations/transformEntryToIndex.js.map +1 -0
  285. package/operations/group/index.d.ts +7 -6
  286. package/operations/group/index.js +117 -161
  287. package/operations/group/index.js.map +1 -1
  288. package/operations/model/index.d.ts +6 -4
  289. package/operations/model/index.js +115 -167
  290. package/operations/model/index.js.map +1 -1
  291. package/package.json +44 -48
  292. package/tasks/CreateElasticsearchIndexTask.d.ts +14 -0
  293. package/tasks/CreateElasticsearchIndexTask.js +40 -0
  294. package/tasks/CreateElasticsearchIndexTask.js.map +1 -0
  295. package/types.d.ts +31 -137
  296. package/types.js +9 -41
  297. package/types.js.map +1 -1
  298. package/values/NoValueContainer.d.ts +5 -0
  299. package/values/NoValueContainer.js +11 -0
  300. package/values/NoValueContainer.js.map +1 -0
  301. package/definitions/entryElasticsearch.d.ts +0 -8
  302. package/definitions/entryElasticsearch.js +0 -37
  303. package/definitions/entryElasticsearch.js.map +0 -1
  304. package/definitions/settings.d.ts +0 -8
  305. package/definitions/settings.js +0 -53
  306. package/definitions/settings.js.map +0 -1
  307. package/definitions/system.d.ts +0 -8
  308. package/definitions/system.js +0 -41
  309. package/definitions/system.js.map +0 -1
  310. package/definitions/table.d.ts +0 -8
  311. package/definitions/table.js +0 -21
  312. package/definitions/table.js.map +0 -1
  313. package/definitions/tableElasticsearch.d.ts +0 -8
  314. package/definitions/tableElasticsearch.js +0 -21
  315. package/definitions/tableElasticsearch.js.map +0 -1
  316. package/dynamoDb/index.d.ts +0 -2
  317. package/dynamoDb/index.js +0 -11
  318. package/dynamoDb/index.js.map +0 -1
  319. package/dynamoDb/storage/date.d.ts +0 -3
  320. package/dynamoDb/storage/date.js +0 -86
  321. package/dynamoDb/storage/date.js.map +0 -1
  322. package/dynamoDb/storage/longText.d.ts +0 -10
  323. package/dynamoDb/storage/longText.js +0 -93
  324. package/dynamoDb/storage/longText.js.map +0 -1
  325. package/dynamoDb/storage/richText.d.ts +0 -7
  326. package/dynamoDb/storage/richText.js +0 -110
  327. package/dynamoDb/storage/richText.js.map +0 -1
  328. package/elasticsearch/index.d.ts +0 -2
  329. package/elasticsearch/index.js +0 -11
  330. package/elasticsearch/index.js.map +0 -1
  331. package/elasticsearch/indexing/dateTimeIndexing.d.ts +0 -3
  332. package/elasticsearch/indexing/dateTimeIndexing.js +0 -86
  333. package/elasticsearch/indexing/dateTimeIndexing.js.map +0 -1
  334. package/elasticsearch/indexing/defaultFieldIndexing.d.ts +0 -3
  335. package/elasticsearch/indexing/defaultFieldIndexing.js +0 -52
  336. package/elasticsearch/indexing/defaultFieldIndexing.js.map +0 -1
  337. package/elasticsearch/indexing/index.d.ts +0 -2
  338. package/elasticsearch/indexing/index.js +0 -15
  339. package/elasticsearch/indexing/index.js.map +0 -1
  340. package/elasticsearch/indexing/longTextIndexing.d.ts +0 -7
  341. package/elasticsearch/indexing/longTextIndexing.js +0 -40
  342. package/elasticsearch/indexing/longTextIndexing.js.map +0 -1
  343. package/elasticsearch/indexing/numberIndexing.d.ts +0 -3
  344. package/elasticsearch/indexing/numberIndexing.js +0 -39
  345. package/elasticsearch/indexing/numberIndexing.js.map +0 -1
  346. package/elasticsearch/indexing/objectIndexing.d.ts +0 -12
  347. package/elasticsearch/indexing/objectIndexing.js +0 -196
  348. package/elasticsearch/indexing/objectIndexing.js.map +0 -1
  349. package/elasticsearch/indexing/richTextIndexing.d.ts +0 -3
  350. package/elasticsearch/indexing/richTextIndexing.js +0 -29
  351. package/elasticsearch/indexing/richTextIndexing.js.map +0 -1
  352. package/elasticsearch/indices/base.d.ts +0 -2
  353. package/elasticsearch/indices/base.js +0 -12
  354. package/elasticsearch/indices/base.js.map +0 -1
  355. package/elasticsearch/indices/index.d.ts +0 -1
  356. package/elasticsearch/indices/index.js +0 -12
  357. package/elasticsearch/indices/index.js.map +0 -1
  358. package/elasticsearch/indices/japanese.d.ts +0 -2
  359. package/elasticsearch/indices/japanese.js +0 -13
  360. package/elasticsearch/indices/japanese.js.map +0 -1
  361. package/elasticsearch/search/index.d.ts +0 -3
  362. package/elasticsearch/search/index.js +0 -10
  363. package/elasticsearch/search/index.js.map +0 -1
  364. package/elasticsearch/search/refSearch.d.ts +0 -2
  365. package/elasticsearch/search/refSearch.js +0 -29
  366. package/elasticsearch/search/refSearch.js.map +0 -1
  367. package/elasticsearch/search/timeSearch.d.ts +0 -2
  368. package/elasticsearch/search/timeSearch.js +0 -26
  369. package/elasticsearch/search/timeSearch.js.map +0 -1
  370. package/helpers/index.js.map +0 -1
  371. package/index.js.map +0 -1
  372. package/operations/entry/elasticsearch/filtering/index.js.map +0 -1
  373. package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.d.ts +0 -2
  374. package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js +0 -28
  375. package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js.map +0 -1
  376. package/operations/entry/elasticsearch/filtering/plugins/index.d.ts +0 -1
  377. package/operations/entry/elasticsearch/filtering/plugins/index.js +0 -13
  378. package/operations/entry/elasticsearch/filtering/plugins/index.js.map +0 -1
  379. package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.d.ts +0 -2
  380. package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js +0 -65
  381. package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js.map +0 -1
  382. package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.d.ts +0 -2
  383. package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js +0 -48
  384. package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js.map +0 -1
  385. package/operations/entry/elasticsearch/plugins/bodyModifier.d.ts +0 -9
  386. package/operations/entry/elasticsearch/plugins/bodyModifier.js +0 -16
  387. package/operations/entry/elasticsearch/plugins/bodyModifier.js.map +0 -1
  388. package/operations/entry/elasticsearch/plugins/queryModifier.d.ts +0 -9
  389. package/operations/entry/elasticsearch/plugins/queryModifier.js +0 -16
  390. package/operations/entry/elasticsearch/plugins/queryModifier.js.map +0 -1
  391. package/operations/entry/elasticsearch/plugins/search.d.ts +0 -7
  392. package/operations/entry/elasticsearch/plugins/search.js +0 -24
  393. package/operations/entry/elasticsearch/plugins/search.js.map +0 -1
  394. package/operations/entry/elasticsearch/plugins/sortModifier.d.ts +0 -9
  395. package/operations/entry/elasticsearch/plugins/sortModifier.js +0 -16
  396. package/operations/entry/elasticsearch/plugins/sortModifier.js.map +0 -1
  397. package/operations/entry/elasticsearch/types.js.map +0 -1
  398. package/operations/settings/index.d.ts +0 -6
  399. package/operations/settings/index.js +0 -111
  400. package/operations/settings/index.js.map +0 -1
  401. package/operations/system/index.d.ts +0 -6
  402. package/operations/system/index.js +0 -82
  403. package/operations/system/index.js.map +0 -1
  404. package/plugins/CmsElasticsearchModelFieldPlugin.d.ts +0 -69
  405. package/plugins/CmsElasticsearchModelFieldPlugin.js +0 -48
  406. package/plugins/CmsElasticsearchModelFieldPlugin.js.map +0 -1
  407. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.d.ts +0 -21
  408. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js +0 -22
  409. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js.map +0 -1
  410. package/plugins/CmsEntryElasticsearchFieldPlugin.d.ts +0 -12
  411. package/plugins/CmsEntryElasticsearchFieldPlugin.js +0 -24
  412. package/plugins/CmsEntryElasticsearchFieldPlugin.js.map +0 -1
  413. package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.d.ts +0 -23
  414. package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js +0 -28
  415. package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js.map +0 -1
  416. package/plugins/CmsEntryElasticsearchIndexPlugin.d.ts +0 -4
  417. package/plugins/CmsEntryElasticsearchIndexPlugin.js +0 -12
  418. package/plugins/CmsEntryElasticsearchIndexPlugin.js.map +0 -1
  419. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.d.ts +0 -31
  420. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js +0 -37
  421. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js.map +0 -1
  422. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.d.ts +0 -18
  423. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js +0 -22
  424. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js.map +0 -1
  425. package/plugins/CmsEntryElasticsearchSortModifierPlugin.d.ts +0 -18
  426. package/plugins/CmsEntryElasticsearchSortModifierPlugin.js +0 -22
  427. package/plugins/CmsEntryElasticsearchSortModifierPlugin.js.map +0 -1
  428. package/plugins/CmsEntryFilterPlugin.d.ts +0 -49
  429. package/plugins/CmsEntryFilterPlugin.js +0 -24
  430. package/plugins/CmsEntryFilterPlugin.js.map +0 -1
  431. package/plugins/index.d.ts +0 -7
  432. package/plugins/index.js +0 -82
  433. 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._
@@ -1,12 +1,22 @@
1
- import { CmsModel } from "@webiny/api-headless-cms/types";
2
- interface ElasticsearchConfig {
3
- index: string;
1
+ import type { StorageCmsModel } from "@webiny/api-headless-cms/types/index.js";
2
+ import type { CmsModelOpenSearchIndexProvider, ICmsModelOpenSearchIndexProviderResult } from "./features/CmsModelOpenSearchIndex/index.js";
3
+ export interface CmsElasticsearchParams {
4
+ model: StorageCmsModel;
4
5
  }
5
- interface CmsElasticsearchParams {
6
- model: Pick<CmsModel, "tenant" | "locale" | "modelId">;
6
+ export interface Configurations {
7
+ es: (params: CmsElasticsearchParams) => Promise<ICmsModelOpenSearchIndexProviderResult>;
7
8
  }
8
- interface Configurations {
9
- es: (params: CmsElasticsearchParams) => ElasticsearchConfig;
10
- }
11
- export declare const configurations: Configurations;
12
- export {};
9
+ export declare const createConfigurations: (provider: CmsModelOpenSearchIndexProvider.Interface) => Configurations;
10
+ /**
11
+ * Static configurations using the default index name formula.
12
+ * Used by tests and code that does not need DI-based customization.
13
+ */
14
+ export declare const configurations: {
15
+ es(params: {
16
+ model: StorageCmsModel;
17
+ }): {
18
+ index: string;
19
+ settings: import("@opensearch-project/opensearch/api/index.js").Indices_Create_RequestBody;
20
+ shared: boolean;
21
+ };
22
+ };
package/configurations.js CHANGED
@@ -1,35 +1,37 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.configurations = void 0;
8
- var _error = _interopRequireDefault(require("@webiny/error"));
1
+ import error from "@webiny/error";
2
+ import { getBaseConfiguration, getOpenSearchIndexPrefix, isSharedOpenSearchIndex } from "@webiny/api-opensearch";
3
+ const createConfigurations = (provider)=>({
4
+ async es ({ model }) {
5
+ const result = await provider.execute({
6
+ model
7
+ });
8
+ const prefix = getOpenSearchIndexPrefix();
9
+ if (!prefix) return result;
10
+ return {
11
+ ...result,
12
+ index: prefix + result.index
13
+ };
14
+ }
15
+ });
9
16
  const configurations = {
10
- es({
11
- model
12
- }) {
13
- const {
14
- tenant,
15
- locale
16
- } = model;
17
- if (!tenant) {
18
- throw new _error.default(`Missing "tenant" parameter when trying to create Elasticsearch index name.`, "TENANT_ERROR");
19
- } else if (!locale) {
20
- throw new _error.default(`Missing "locale" parameter when trying to create Elasticsearch index name.`, "LOCALE_ERROR");
21
- }
22
- const sharedIndex = process.env.ELASTICSEARCH_SHARED_INDEXES === "true";
23
- const index = [sharedIndex ? "root" : tenant, "headless-cms", locale, model.modelId].join("-").toLowerCase();
24
- const prefix = process.env.ELASTIC_SEARCH_INDEX_PREFIX || "";
25
- if (!prefix) {
26
- return {
27
- index
28
- };
17
+ es (params) {
18
+ const { model } = params;
19
+ const { tenant } = model;
20
+ if (!tenant) throw new error('Missing "tenant" parameter when trying to create Elasticsearch index name.', "TENANT_ERROR");
21
+ const shared = isSharedOpenSearchIndex();
22
+ const index = [
23
+ shared ? "root" : tenant,
24
+ "headless-cms",
25
+ model.modelId
26
+ ].join("-").toLowerCase();
27
+ const prefix = getOpenSearchIndexPrefix();
28
+ return {
29
+ index: prefix ? prefix + index : index,
30
+ settings: getBaseConfiguration(),
31
+ shared
32
+ };
29
33
  }
30
- return {
31
- index: prefix + index
32
- };
33
- }
34
34
  };
35
- exports.configurations = configurations;
35
+ export { configurations, createConfigurations };
36
+
37
+ //# sourceMappingURL=configurations.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["configurations","es","model","tenant","locale","WebinyError","sharedIndex","process","env","ELASTICSEARCH_SHARED_INDEXES","index","modelId","join","toLowerCase","prefix","ELASTIC_SEARCH_INDEX_PREFIX"],"sources":["configurations.ts"],"sourcesContent":["import { CmsModel } from \"@webiny/api-headless-cms/types\";\nimport WebinyError from \"@webiny/error\";\n\ninterface ElasticsearchConfig {\n index: string;\n}\n\ninterface CmsElasticsearchParams {\n model: Pick<CmsModel, \"tenant\" | \"locale\" | \"modelId\">;\n}\n\ninterface Configurations {\n es: (params: CmsElasticsearchParams) => ElasticsearchConfig;\n}\n\nexport const configurations: Configurations = {\n es({ model }) {\n const { tenant, locale } = model;\n\n if (!tenant) {\n throw new WebinyError(\n `Missing \"tenant\" parameter when trying to create Elasticsearch index name.`,\n \"TENANT_ERROR\"\n );\n } else if (!locale) {\n throw new WebinyError(\n `Missing \"locale\" parameter when trying to create Elasticsearch index name.`,\n \"LOCALE_ERROR\"\n );\n }\n\n const sharedIndex = process.env.ELASTICSEARCH_SHARED_INDEXES === \"true\";\n const index = [sharedIndex ? \"root\" : tenant, \"headless-cms\", locale, model.modelId]\n .join(\"-\")\n .toLowerCase();\n\n const prefix = process.env.ELASTIC_SEARCH_INDEX_PREFIX || \"\";\n if (!prefix) {\n return {\n index\n };\n }\n return {\n index: prefix + index\n };\n }\n};\n"],"mappings":";;;;;;;AACA;AAcO,MAAMA,cAA8B,GAAG;EAC1CC,EAAE,CAAC;IAAEC;EAAM,CAAC,EAAE;IACV,MAAM;MAAEC,MAAM;MAAEC;IAAO,CAAC,GAAGF,KAAK;IAEhC,IAAI,CAACC,MAAM,EAAE;MACT,MAAM,IAAIE,cAAW,CAChB,4EAA2E,EAC5E,cAAc,CACjB;IACL,CAAC,MAAM,IAAI,CAACD,MAAM,EAAE;MAChB,MAAM,IAAIC,cAAW,CAChB,4EAA2E,EAC5E,cAAc,CACjB;IACL;IAEA,MAAMC,WAAW,GAAGC,OAAO,CAACC,GAAG,CAACC,4BAA4B,KAAK,MAAM;IACvE,MAAMC,KAAK,GAAG,CAACJ,WAAW,GAAG,MAAM,GAAGH,MAAM,EAAE,cAAc,EAAEC,MAAM,EAAEF,KAAK,CAACS,OAAO,CAAC,CAC/EC,IAAI,CAAC,GAAG,CAAC,CACTC,WAAW,EAAE;IAElB,MAAMC,MAAM,GAAGP,OAAO,CAACC,GAAG,CAACO,2BAA2B,IAAI,EAAE;IAC5D,IAAI,CAACD,MAAM,EAAE;MACT,OAAO;QACHJ;MACJ,CAAC;IACL;IACA,OAAO;MACHA,KAAK,EAAEI,MAAM,GAAGJ;IACpB,CAAC;EACL;AACJ,CAAC;AAAC"}
1
+ {"version":3,"file":"configurations.js","sources":["../src/configurations.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport {\n getBaseConfiguration,\n getOpenSearchIndexPrefix,\n isSharedOpenSearchIndex\n} from \"@webiny/api-opensearch\";\nimport type { StorageCmsModel } from \"@webiny/api-headless-cms/types/index.js\";\nimport type {\n CmsModelOpenSearchIndexProvider,\n ICmsModelOpenSearchIndexProviderResult\n} from \"~/features/CmsModelOpenSearchIndex/index.js\";\n\nexport interface CmsElasticsearchParams {\n model: StorageCmsModel;\n}\n\nexport interface Configurations {\n es: (params: CmsElasticsearchParams) => Promise<ICmsModelOpenSearchIndexProviderResult>;\n}\n\nexport const createConfigurations = (\n provider: CmsModelOpenSearchIndexProvider.Interface\n): Configurations => ({\n async es({ model }) {\n const result = await provider.execute({ model });\n\n const prefix = getOpenSearchIndexPrefix();\n\n if (!prefix) {\n return result;\n }\n return {\n ...result,\n index: prefix + result.index\n };\n }\n});\n\n/**\n * Static configurations using the default index name formula.\n * Used by tests and code that does not need DI-based customization.\n */\nexport const configurations = {\n es(params: { model: StorageCmsModel }) {\n const { model } = params;\n const { tenant } = model;\n\n if (!tenant) {\n throw new WebinyError(\n `Missing \"tenant\" parameter when trying to create Elasticsearch index name.`,\n \"TENANT_ERROR\"\n );\n }\n\n const shared = isSharedOpenSearchIndex();\n const index = [shared ? \"root\" : tenant, \"headless-cms\", model.modelId]\n .join(\"-\")\n .toLowerCase();\n\n const prefix = getOpenSearchIndexPrefix();\n\n return {\n index: prefix ? prefix + index : index,\n settings: getBaseConfiguration(),\n shared\n };\n }\n};\n"],"names":["createConfigurations","provider","model","result","prefix","getOpenSearchIndexPrefix","configurations","params","tenant","WebinyError","shared","isSharedOpenSearchIndex","index","getBaseConfiguration"],"mappings":";;AAoBO,MAAMA,uBAAuB,CAChCC,WACkB;QAClB,MAAM,IAAG,EAAEC,KAAK,EAAE;YACd,MAAMC,SAAS,MAAMF,SAAS,OAAO,CAAC;gBAAEC;YAAM;YAE9C,MAAME,SAASC;YAEf,IAAI,CAACD,QACD,OAAOD;YAEX,OAAO;gBACH,GAAGA,MAAM;gBACT,OAAOC,SAASD,OAAO,KAAK;YAChC;QACJ;IACJ;AAMO,MAAMG,iBAAiB;IAC1B,IAAGC,MAAkC;QACjC,MAAM,EAAEL,KAAK,EAAE,GAAGK;QAClB,MAAM,EAAEC,MAAM,EAAE,GAAGN;QAEnB,IAAI,CAACM,QACD,MAAM,IAAIC,MACN,8EACA;QAIR,MAAMC,SAASC;QACf,MAAMC,QAAQ;YAACF,SAAS,SAASF;YAAQ;YAAgBN,MAAM,OAAO;SAAC,CAClE,IAAI,CAAC,KACL,WAAW;QAEhB,MAAME,SAASC;QAEf,OAAO;YACH,OAAOD,SAASA,SAASQ,QAAQA;YACjC,UAAUC;YACVH;QACJ;IACJ;AACJ"}
@@ -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,88 +1,11 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.createEntryEntity = void 0;
8
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
9
- var _dynamodbToolbox = require("dynamodb-toolbox");
10
- const createEntryEntity = params => {
11
- const {
12
- table,
13
- entityName,
14
- attributes
15
- } = params;
16
- return new _dynamodbToolbox.Entity({
17
- name: entityName,
18
- table,
19
- attributes: (0, _objectSpread2.default)({
20
- PK: {
21
- type: "string",
22
- partitionKey: true
23
- },
24
- SK: {
25
- type: "string",
26
- sortKey: true
27
- },
28
- TYPE: {
29
- type: "string"
30
- },
31
- __type: {
32
- type: "string"
33
- },
34
- webinyVersion: {
35
- type: "string"
36
- },
37
- tenant: {
38
- type: "string"
39
- },
40
- entryId: {
41
- type: "string"
42
- },
43
- id: {
44
- type: "string"
45
- },
46
- createdBy: {
47
- type: "map"
48
- },
49
- ownedBy: {
50
- type: "map"
51
- },
52
- modifiedBy: {
53
- type: "map"
54
- },
55
- createdOn: {
56
- type: "string"
57
- },
58
- savedOn: {
59
- type: "string"
60
- },
61
- modelId: {
62
- type: "string"
63
- },
64
- locale: {
65
- type: "string"
66
- },
67
- publishedOn: {
68
- type: "string"
69
- },
70
- version: {
71
- type: "number"
72
- },
73
- locked: {
74
- type: "boolean"
75
- },
76
- status: {
77
- type: "string"
78
- },
79
- values: {
80
- type: "map"
81
- },
82
- meta: {
83
- type: "map"
84
- }
85
- }, attributes || {})
86
- });
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
+ });
87
8
  };
88
- exports.createEntryEntity = createEntryEntity;
9
+ export { createEntryEntity };
10
+
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","modifiedBy","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 modifiedBy: {\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,MAA+B,IAAkB;EAC/E,MAAM;IAAEC,KAAK;IAAEC,UAAU;IAAEC;EAAW,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,uBAAM,CAAC;IACdC,IAAI,EAAEH,UAAU;IAChBD,KAAK;IACLE,UAAU;MACNG,EAAE,EAAE;QACAC,IAAI,EAAE,QAAQ;QACdC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAF,IAAI,EAAE,QAAQ;QACdG,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFJ,IAAI,EAAE;MACV,CAAC;MACDK,MAAM,EAAE;QACJL,IAAI,EAAE;MACV,CAAC;MACDM,aAAa,EAAE;QACXN,IAAI,EAAE;MACV,CAAC;MACDO,MAAM,EAAE;QACJP,IAAI,EAAE;MACV,CAAC;MACDQ,OAAO,EAAE;QACLR,IAAI,EAAE;MACV,CAAC;MACDS,EAAE,EAAE;QACAT,IAAI,EAAE;MACV,CAAC;MACDU,SAAS,EAAE;QACPV,IAAI,EAAE;MACV,CAAC;MACDW,OAAO,EAAE;QACLX,IAAI,EAAE;MACV,CAAC;MACDY,UAAU,EAAE;QACRZ,IAAI,EAAE;MACV,CAAC;MACDa,SAAS,EAAE;QACPb,IAAI,EAAE;MACV,CAAC;MACDc,OAAO,EAAE;QACLd,IAAI,EAAE;MACV,CAAC;MACDe,OAAO,EAAE;QACLf,IAAI,EAAE;MACV,CAAC;MACDgB,MAAM,EAAE;QACJhB,IAAI,EAAE;MACV,CAAC;MACDiB,WAAW,EAAE;QACTjB,IAAI,EAAE;MACV,CAAC;MACDkB,OAAO,EAAE;QACLlB,IAAI,EAAE;MACV,CAAC;MACDmB,MAAM,EAAE;QACJnB,IAAI,EAAE;MACV,CAAC;MACDoB,MAAM,EAAE;QACJpB,IAAI,EAAE;MACV,CAAC;MACDqB,MAAM,EAAE;QACJrB,IAAI,EAAE;MACV,CAAC;MACDsB,IAAI,EAAE;QACFtB,IAAI,EAAE;MACV;IAAC,GACGJ,UAAU,IAAI,CAAC,CAAC;EAE5B,CAAC,CAAC;AACN,CAAC;AAAC"}
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,65 +1,11 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.createGroupEntity = void 0;
8
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
9
- var _dynamodbToolbox = require("dynamodb-toolbox");
10
- const createGroupEntity = params => {
11
- const {
12
- table,
13
- attributes,
14
- entityName
15
- } = params;
16
- return new _dynamodbToolbox.Entity({
17
- name: entityName,
18
- table,
19
- attributes: (0, _objectSpread2.default)({
20
- PK: {
21
- partitionKey: true
22
- },
23
- SK: {
24
- sortKey: true
25
- },
26
- TYPE: {
27
- type: "string"
28
- },
29
- webinyVersion: {
30
- type: "string"
31
- },
32
- id: {
33
- type: "string"
34
- },
35
- name: {
36
- type: "string"
37
- },
38
- slug: {
39
- type: "string"
40
- },
41
- locale: {
42
- type: "string"
43
- },
44
- description: {
45
- type: "string"
46
- },
47
- icon: {
48
- type: "string"
49
- },
50
- createdBy: {
51
- type: "map"
52
- },
53
- createdOn: {
54
- type: "string"
55
- },
56
- savedOn: {
57
- type: "string"
58
- },
59
- tenant: {
60
- type: "string"
61
- }
62
- }, attributes || {})
63
- });
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
+ });
64
8
  };
65
- exports.createGroupEntity = createGroupEntity;
9
+ export { createGroupEntity };
10
+
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,MAA+B,IAAkB;EAC/E,MAAM;IAAEC,KAAK;IAAEC,UAAU;IAAEC;EAAW,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,uBAAM,CAAC;IACdC,IAAI,EAAEF,UAAU;IAChBF,KAAK;IACLC,UAAU;MACNI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,IAAI,EAAE;QACFC,IAAI,EAAE;MACV,CAAC;MACDC,aAAa,EAAE;QACXD,IAAI,EAAE;MACV,CAAC;MACDE,EAAE,EAAE;QACAF,IAAI,EAAE;MACV,CAAC;MACDN,IAAI,EAAE;QACFM,IAAI,EAAE;MACV,CAAC;MACDG,IAAI,EAAE;QACFH,IAAI,EAAE;MACV,CAAC;MACDI,MAAM,EAAE;QACJJ,IAAI,EAAE;MACV,CAAC;MACDK,WAAW,EAAE;QACTL,IAAI,EAAE;MACV,CAAC;MACDM,IAAI,EAAE;QACFN,IAAI,EAAE;MACV,CAAC;MAEDO,SAAS,EAAE;QACPP,IAAI,EAAE;MACV,CAAC;MACDQ,SAAS,EAAE;QACPR,IAAI,EAAE;MACV,CAAC;MACDS,OAAO,EAAE;QACLT,IAAI,EAAE;MACV,CAAC;MACDU,MAAM,EAAE;QACJV,IAAI,EAAE;MACV;IAAC,GACGT,UAAU,IAAI,CAAC,CAAC;EAE5B,CAAC,CAAC;AACN,CAAC;AAAC"}
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,109 +1,11 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.createModelEntity = void 0;
8
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
9
- var _dynamodbToolbox = require("dynamodb-toolbox");
10
- const createModelEntity = params => {
11
- const {
12
- table,
13
- attributes,
14
- entityName
15
- } = params;
16
- return new _dynamodbToolbox.Entity({
17
- name: entityName,
18
- table,
19
- attributes: (0, _objectSpread2.default)({
20
- PK: {
21
- partitionKey: true
22
- },
23
- SK: {
24
- sortKey: true
25
- },
26
- TYPE: {
27
- type: "string",
28
- required: true
29
- },
30
- webinyVersion: {
31
- type: "string",
32
- required: true
33
- },
34
- name: {
35
- type: "string",
36
- required: true
37
- },
38
- modelId: {
39
- type: "string",
40
- required: true
41
- },
42
- singularApiName: {
43
- type: "string",
44
- required: true
45
- },
46
- pluralApiName: {
47
- type: "string",
48
- required: true
49
- },
50
- locale: {
51
- type: "string",
52
- required: true
53
- },
54
- group: {
55
- type: "map",
56
- required: true
57
- },
58
- icon: {
59
- type: "string"
60
- },
61
- description: {
62
- type: "string"
63
- },
64
- createdOn: {
65
- type: "string",
66
- required: true
67
- },
68
- savedOn: {
69
- type: "string",
70
- required: true
71
- },
72
- createdBy: {
73
- type: "map",
74
- required: true
75
- },
76
- fields: {
77
- type: "list",
78
- required: true
79
- },
80
- layout: {
81
- type: "list",
82
- required: true
83
- },
84
- tags: {
85
- type: "list",
86
- required: false,
87
- default: []
88
- },
89
- lockedFields: {
90
- type: "list",
91
- required: true
92
- },
93
- titleFieldId: {
94
- type: "string"
95
- },
96
- descriptionFieldId: {
97
- type: "string"
98
- },
99
- imageFieldId: {
100
- type: "string"
101
- },
102
- tenant: {
103
- type: "string",
104
- required: true
105
- }
106
- }, attributes || {})
107
- });
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
+ });
108
8
  };
109
- exports.createModelEntity = createModelEntity;
9
+ export { createModelEntity };
10
+
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","singularApiName","pluralApiName","locale","group","icon","description","createdOn","savedOn","createdBy","fields","layout","tags","default","lockedFields","titleFieldId","descriptionFieldId","imageFieldId","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 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":";;;;;;;;AAAA;AASO,MAAMA,iBAAiB,GAAIC,MAA+B,IAAkB;EAC/E,MAAM;IAAEC,KAAK;IAAEC,UAAU;IAAEC;EAAW,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,uBAAM,CAAC;IACdC,IAAI,EAAEF,UAAU;IAChBF,KAAK;IACLC,UAAU;MACNI,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;IAAC,GACGV,UAAU,IAAI,CAAC,CAAC;EAE5B,CAAC,CAAC;AACN,CAAC;AAAC"}
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
@@ -1,9 +1,9 @@
1
- import { Client } from "@elastic/elasticsearch";
2
- import { PluginsContainer } from "@webiny/plugins";
3
- import { CmsModel } from "@webiny/api-headless-cms/types";
1
+ import type { Client } from "@webiny/api-opensearch";
2
+ import type { StorageCmsModel } from "@webiny/api-headless-cms/types/index.js";
3
+ import type { Configurations } from "../configurations.js";
4
4
  export interface CreateElasticsearchIndexParams {
5
- elasticsearch: Client;
6
- plugins: PluginsContainer;
7
- model: CmsModel;
5
+ client: Client;
6
+ configurations: Configurations;
7
+ model: StorageCmsModel;
8
8
  }
9
9
  export declare const createElasticsearchIndex: (params: CreateElasticsearchIndexParams) => Promise<void>;