@webiny/api-headless-cms-ddb-es 0.0.0-unstable.085ff6572f → 0.0.0-unstable.0d717d18dd

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 (422) 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/configurations.d.ts +7 -10
  24. package/configurations.js +16 -34
  25. package/configurations.js.map +1 -1
  26. package/definitions/entry.d.ts +4 -5
  27. package/definitions/entry.js +10 -90
  28. package/definitions/entry.js.map +1 -1
  29. package/definitions/group.d.ts +6 -6
  30. package/definitions/group.js +10 -64
  31. package/definitions/group.js.map +1 -1
  32. package/definitions/model.d.ts +6 -6
  33. package/definitions/model.js +10 -108
  34. package/definitions/model.js.map +1 -1
  35. package/definitions/types.d.ts +65 -0
  36. package/definitions/types.js +0 -0
  37. package/feature.d.ts +4 -0
  38. package/feature.js +89 -0
  39. package/feature.js.map +1 -0
  40. package/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.d.ts +13 -0
  41. package/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.js +35 -0
  42. package/features/CmsModelOpenSearchIndex/CmsModelOpenSearchIndexProvider.js.map +1 -0
  43. package/features/CmsModelOpenSearchIndex/DefaultCmsModelOpenSearchIndex.d.ts +8 -0
  44. package/features/CmsModelOpenSearchIndex/DefaultCmsModelOpenSearchIndex.js +17 -0
  45. package/features/CmsModelOpenSearchIndex/DefaultCmsModelOpenSearchIndex.js.map +1 -0
  46. package/features/CmsModelOpenSearchIndex/abstractions.d.ts +1 -0
  47. package/features/CmsModelOpenSearchIndex/abstractions.js +1 -0
  48. package/features/CmsModelOpenSearchIndex/feature.d.ts +4 -0
  49. package/features/CmsModelOpenSearchIndex/feature.js +13 -0
  50. package/features/CmsModelOpenSearchIndex/feature.js.map +1 -0
  51. package/features/CmsModelOpenSearchIndex/index.d.ts +3 -0
  52. package/features/CmsModelOpenSearchIndex/index.js +3 -0
  53. package/index.d.ts +1 -3
  54. package/index.js +1 -217
  55. package/operations/entry/DdbEsCreateEntry.d.ts +23 -0
  56. package/operations/entry/DdbEsCreateEntry.js +131 -0
  57. package/operations/entry/DdbEsCreateEntry.js.map +1 -0
  58. package/operations/entry/DdbEsCreateEntryRevisionFrom.d.ts +23 -0
  59. package/operations/entry/DdbEsCreateEntryRevisionFrom.js +136 -0
  60. package/operations/entry/DdbEsCreateEntryRevisionFrom.js.map +1 -0
  61. package/operations/entry/DdbEsDeleteEntry.d.ts +18 -0
  62. package/operations/entry/DdbEsDeleteEntry.js +79 -0
  63. package/operations/entry/DdbEsDeleteEntry.js.map +1 -0
  64. package/operations/entry/DdbEsDeleteEntryRevision.d.ts +23 -0
  65. package/operations/entry/DdbEsDeleteEntryRevision.js +133 -0
  66. package/operations/entry/DdbEsDeleteEntryRevision.js.map +1 -0
  67. package/operations/entry/DdbEsDeleteMultipleEntries.d.ts +18 -0
  68. package/operations/entry/DdbEsDeleteMultipleEntries.js +77 -0
  69. package/operations/entry/DdbEsDeleteMultipleEntries.js.map +1 -0
  70. package/operations/entry/DdbEsGetEntriesByIds.d.ts +14 -0
  71. package/operations/entry/DdbEsGetEntriesByIds.js +31 -0
  72. package/operations/entry/DdbEsGetEntriesByIds.js.map +1 -0
  73. package/operations/entry/DdbEsGetEntry.d.ts +14 -0
  74. package/operations/entry/DdbEsGetEntry.js +27 -0
  75. package/operations/entry/DdbEsGetEntry.js.map +1 -0
  76. package/operations/entry/DdbEsGetLatestEntriesByIds.d.ts +14 -0
  77. package/operations/entry/DdbEsGetLatestEntriesByIds.js +31 -0
  78. package/operations/entry/DdbEsGetLatestEntriesByIds.js.map +1 -0
  79. package/operations/entry/DdbEsGetLatestRevisionByEntryId.d.ts +14 -0
  80. package/operations/entry/DdbEsGetLatestRevisionByEntryId.js +34 -0
  81. package/operations/entry/DdbEsGetLatestRevisionByEntryId.js.map +1 -0
  82. package/operations/entry/DdbEsGetPreviousRevision.d.ts +14 -0
  83. package/operations/entry/DdbEsGetPreviousRevision.js +56 -0
  84. package/operations/entry/DdbEsGetPreviousRevision.js.map +1 -0
  85. package/operations/entry/DdbEsGetPublishedEntriesByIds.d.ts +14 -0
  86. package/operations/entry/DdbEsGetPublishedEntriesByIds.js +31 -0
  87. package/operations/entry/DdbEsGetPublishedEntriesByIds.js.map +1 -0
  88. package/operations/entry/DdbEsGetPublishedRevisionByEntryId.d.ts +14 -0
  89. package/operations/entry/DdbEsGetPublishedRevisionByEntryId.js +34 -0
  90. package/operations/entry/DdbEsGetPublishedRevisionByEntryId.js.map +1 -0
  91. package/operations/entry/DdbEsGetRevisionById.d.ts +14 -0
  92. package/operations/entry/DdbEsGetRevisionById.js +34 -0
  93. package/operations/entry/DdbEsGetRevisionById.js.map +1 -0
  94. package/operations/entry/DdbEsGetRevisions.d.ts +14 -0
  95. package/operations/entry/DdbEsGetRevisions.js +33 -0
  96. package/operations/entry/DdbEsGetRevisions.js.map +1 -0
  97. package/operations/entry/DdbEsGetUniqueFieldValues.d.ts +17 -0
  98. package/operations/entry/DdbEsGetUniqueFieldValues.js +73 -0
  99. package/operations/entry/DdbEsGetUniqueFieldValues.js.map +1 -0
  100. package/operations/entry/DdbEsListEntries.d.ts +24 -0
  101. package/operations/entry/DdbEsListEntries.js +88 -0
  102. package/operations/entry/DdbEsListEntries.js.map +1 -0
  103. package/operations/entry/DdbEsMoveEntry.d.ts +20 -0
  104. package/operations/entry/DdbEsMoveEntry.js +113 -0
  105. package/operations/entry/DdbEsMoveEntry.js.map +1 -0
  106. package/operations/entry/DdbEsMoveToBin.d.ts +23 -0
  107. package/operations/entry/DdbEsMoveToBin.js +137 -0
  108. package/operations/entry/DdbEsMoveToBin.js.map +1 -0
  109. package/operations/entry/DdbEsPublishEntry.d.ts +23 -0
  110. package/operations/entry/DdbEsPublishEntry.js +228 -0
  111. package/operations/entry/DdbEsPublishEntry.js.map +1 -0
  112. package/operations/entry/DdbEsRestoreFromBin.d.ts +23 -0
  113. package/operations/entry/DdbEsRestoreFromBin.js +137 -0
  114. package/operations/entry/DdbEsRestoreFromBin.js.map +1 -0
  115. package/operations/entry/DdbEsUnpublishEntry.d.ts +23 -0
  116. package/operations/entry/DdbEsUnpublishEntry.js +124 -0
  117. package/operations/entry/DdbEsUnpublishEntry.js.map +1 -0
  118. package/operations/entry/DdbEsUpdateEntry.d.ts +23 -0
  119. package/operations/entry/DdbEsUpdateEntry.js +172 -0
  120. package/operations/entry/DdbEsUpdateEntry.js.map +1 -0
  121. package/operations/entry/dataLoader/DataLoaderCache.d.ts +2 -3
  122. package/operations/entry/dataLoader/DataLoaderCache.js +23 -39
  123. package/operations/entry/dataLoader/DataLoaderCache.js.map +1 -1
  124. package/operations/entry/dataLoader/constants.js +3 -7
  125. package/operations/entry/dataLoader/constants.js.map +1 -1
  126. package/operations/entry/dataLoader/createBatchScheduleFn.js +9 -22
  127. package/operations/entry/dataLoader/createBatchScheduleFn.js.map +1 -1
  128. package/operations/entry/dataLoader/getAllEntryRevisions.d.ts +3 -3
  129. package/operations/entry/dataLoader/getAllEntryRevisions.js +22 -41
  130. package/operations/entry/dataLoader/getAllEntryRevisions.js.map +1 -1
  131. package/operations/entry/dataLoader/getLatestRevisionByEntryId.d.ts +3 -3
  132. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js +32 -51
  133. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js.map +1 -1
  134. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.d.ts +3 -3
  135. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js +32 -51
  136. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js.map +1 -1
  137. package/operations/entry/dataLoader/getRevisionById.d.ts +3 -3
  138. package/operations/entry/dataLoader/getRevisionById.js +38 -61
  139. package/operations/entry/dataLoader/getRevisionById.js.map +1 -1
  140. package/operations/entry/dataLoader/index.d.ts +5 -5
  141. package/operations/entry/dataLoader/index.js +15 -35
  142. package/operations/entry/dataLoader/index.js.map +1 -1
  143. package/operations/entry/dataLoader/types.d.ts +4 -4
  144. package/operations/entry/dataLoader/types.js +0 -5
  145. package/operations/entry/dataLoaders.d.ts +14 -14
  146. package/operations/entry/dataLoaders.js +95 -112
  147. package/operations/entry/dataLoaders.js.map +1 -1
  148. package/operations/entry/feature.d.ts +4 -0
  149. package/operations/entry/feature.js +55 -0
  150. package/operations/entry/feature.js.map +1 -0
  151. package/operations/entry/keys.d.ts +31 -1
  152. package/operations/entry/keys.js +46 -27
  153. package/operations/entry/keys.js.map +1 -1
  154. package/operations/entry/recordType.js +5 -17
  155. package/operations/entry/recordType.js.map +1 -1
  156. package/operations/entry/storageEntryUtils.d.ts +7 -0
  157. package/operations/entry/storageEntryUtils.js +14 -0
  158. package/operations/entry/storageEntryUtils.js.map +1 -0
  159. package/operations/entry/transformations/convertEntryKeys.d.ts +8 -0
  160. package/operations/entry/transformations/convertEntryKeys.js +25 -0
  161. package/operations/entry/transformations/convertEntryKeys.js.map +1 -0
  162. package/operations/entry/transformations/index.d.ts +32 -0
  163. package/operations/entry/transformations/index.js +91 -0
  164. package/operations/entry/transformations/index.js.map +1 -0
  165. package/operations/entry/transformations/modifyEntryValues.d.ts +53 -0
  166. package/operations/entry/transformations/modifyEntryValues.js +16 -0
  167. package/operations/entry/transformations/modifyEntryValues.js.map +1 -0
  168. package/operations/entry/transformations/transformEntryKeys.d.ts +11 -0
  169. package/operations/entry/transformations/transformEntryKeys.js +17 -0
  170. package/operations/entry/transformations/transformEntryKeys.js.map +1 -0
  171. package/operations/group/DdbEsCreateGroup.d.ts +12 -0
  172. package/operations/group/DdbEsCreateGroup.js +35 -0
  173. package/operations/group/DdbEsCreateGroup.js.map +1 -0
  174. package/operations/group/DdbEsDeleteGroup.d.ts +12 -0
  175. package/operations/group/DdbEsDeleteGroup.js +31 -0
  176. package/operations/group/DdbEsDeleteGroup.js.map +1 -0
  177. package/operations/group/DdbEsGetGroup.d.ts +12 -0
  178. package/operations/group/DdbEsGetGroup.js +31 -0
  179. package/operations/group/DdbEsGetGroup.js.map +1 -0
  180. package/operations/group/DdbEsListGroups.d.ts +14 -0
  181. package/operations/group/DdbEsListGroups.js +52 -0
  182. package/operations/group/DdbEsListGroups.js.map +1 -0
  183. package/operations/group/DdbEsUpdateGroup.d.ts +12 -0
  184. package/operations/group/DdbEsUpdateGroup.js +35 -0
  185. package/operations/group/DdbEsUpdateGroup.js.map +1 -0
  186. package/operations/group/feature.d.ts +4 -0
  187. package/operations/group/feature.js +19 -0
  188. package/operations/group/feature.js.map +1 -0
  189. package/operations/group/keys.d.ts +15 -0
  190. package/operations/group/keys.js +17 -0
  191. package/operations/group/keys.js.map +1 -0
  192. package/operations/model/DdbEsCreateModel.d.ts +14 -0
  193. package/operations/model/DdbEsCreateModel.js +52 -0
  194. package/operations/model/DdbEsCreateModel.js.map +1 -0
  195. package/operations/model/DdbEsDeleteModel.d.ts +12 -0
  196. package/operations/model/DdbEsDeleteModel.js +31 -0
  197. package/operations/model/DdbEsDeleteModel.js.map +1 -0
  198. package/operations/model/DdbEsGetModel.d.ts +12 -0
  199. package/operations/model/DdbEsGetModel.js +30 -0
  200. package/operations/model/DdbEsGetModel.js.map +1 -0
  201. package/operations/model/DdbEsListModels.d.ts +12 -0
  202. package/operations/model/DdbEsListModels.js +36 -0
  203. package/operations/model/DdbEsListModels.js.map +1 -0
  204. package/operations/model/DdbEsUpdateModel.d.ts +12 -0
  205. package/operations/model/DdbEsUpdateModel.js +36 -0
  206. package/operations/model/DdbEsUpdateModel.js.map +1 -0
  207. package/operations/model/feature.d.ts +4 -0
  208. package/operations/model/feature.js +19 -0
  209. package/operations/model/feature.js.map +1 -0
  210. package/operations/model/keys.d.ts +15 -0
  211. package/operations/model/keys.js +17 -0
  212. package/operations/model/keys.js.map +1 -0
  213. package/package.json +46 -42
  214. package/tasks/CreateElasticsearchIndexTask.d.ts +13 -0
  215. package/tasks/CreateElasticsearchIndexTask.js +40 -0
  216. package/tasks/CreateElasticsearchIndexTask.js.map +1 -0
  217. package/types.d.ts +12 -163
  218. package/types.js +9 -41
  219. package/types.js.map +1 -1
  220. package/definitions/entryElasticsearch.d.ts +0 -8
  221. package/definitions/entryElasticsearch.js +0 -37
  222. package/definitions/entryElasticsearch.js.map +0 -1
  223. package/definitions/settings.d.ts +0 -8
  224. package/definitions/settings.js +0 -53
  225. package/definitions/settings.js.map +0 -1
  226. package/definitions/system.d.ts +0 -8
  227. package/definitions/system.js +0 -41
  228. package/definitions/system.js.map +0 -1
  229. package/definitions/table.d.ts +0 -8
  230. package/definitions/table.js +0 -21
  231. package/definitions/table.js.map +0 -1
  232. package/definitions/tableElasticsearch.d.ts +0 -8
  233. package/definitions/tableElasticsearch.js +0 -21
  234. package/definitions/tableElasticsearch.js.map +0 -1
  235. package/dynamoDb/index.d.ts +0 -2
  236. package/dynamoDb/index.js +0 -11
  237. package/dynamoDb/index.js.map +0 -1
  238. package/dynamoDb/storage/date.d.ts +0 -3
  239. package/dynamoDb/storage/date.js +0 -77
  240. package/dynamoDb/storage/date.js.map +0 -1
  241. package/dynamoDb/storage/longText.d.ts +0 -10
  242. package/dynamoDb/storage/longText.js +0 -93
  243. package/dynamoDb/storage/longText.js.map +0 -1
  244. package/dynamoDb/storage/richText.d.ts +0 -7
  245. package/dynamoDb/storage/richText.js +0 -105
  246. package/dynamoDb/storage/richText.js.map +0 -1
  247. package/elasticsearch/createElasticsearchIndex.d.ts +0 -9
  248. package/elasticsearch/createElasticsearchIndex.js +0 -49
  249. package/elasticsearch/createElasticsearchIndex.js.map +0 -1
  250. package/elasticsearch/deleteElasticsearchIndex.d.ts +0 -8
  251. package/elasticsearch/deleteElasticsearchIndex.js +0 -36
  252. package/elasticsearch/deleteElasticsearchIndex.js.map +0 -1
  253. package/elasticsearch/index.d.ts +0 -2
  254. package/elasticsearch/index.js +0 -11
  255. package/elasticsearch/index.js.map +0 -1
  256. package/elasticsearch/indexing/dateTimeIndexing.d.ts +0 -3
  257. package/elasticsearch/indexing/dateTimeIndexing.js +0 -88
  258. package/elasticsearch/indexing/dateTimeIndexing.js.map +0 -1
  259. package/elasticsearch/indexing/defaultFieldIndexing.d.ts +0 -3
  260. package/elasticsearch/indexing/defaultFieldIndexing.js +0 -52
  261. package/elasticsearch/indexing/defaultFieldIndexing.js.map +0 -1
  262. package/elasticsearch/indexing/index.d.ts +0 -2
  263. package/elasticsearch/indexing/index.js +0 -15
  264. package/elasticsearch/indexing/index.js.map +0 -1
  265. package/elasticsearch/indexing/longTextIndexing.d.ts +0 -7
  266. package/elasticsearch/indexing/longTextIndexing.js +0 -40
  267. package/elasticsearch/indexing/longTextIndexing.js.map +0 -1
  268. package/elasticsearch/indexing/numberIndexing.d.ts +0 -3
  269. package/elasticsearch/indexing/numberIndexing.js +0 -39
  270. package/elasticsearch/indexing/numberIndexing.js.map +0 -1
  271. package/elasticsearch/indexing/objectIndexing.d.ts +0 -12
  272. package/elasticsearch/indexing/objectIndexing.js +0 -205
  273. package/elasticsearch/indexing/objectIndexing.js.map +0 -1
  274. package/elasticsearch/indexing/richTextIndexing.d.ts +0 -3
  275. package/elasticsearch/indexing/richTextIndexing.js +0 -29
  276. package/elasticsearch/indexing/richTextIndexing.js.map +0 -1
  277. package/elasticsearch/indices/base.d.ts +0 -2
  278. package/elasticsearch/indices/base.js +0 -12
  279. package/elasticsearch/indices/base.js.map +0 -1
  280. package/elasticsearch/indices/index.d.ts +0 -1
  281. package/elasticsearch/indices/index.js +0 -12
  282. package/elasticsearch/indices/index.js.map +0 -1
  283. package/elasticsearch/indices/japanese.d.ts +0 -2
  284. package/elasticsearch/indices/japanese.js +0 -13
  285. package/elasticsearch/indices/japanese.js.map +0 -1
  286. package/elasticsearch/search/index.d.ts +0 -3
  287. package/elasticsearch/search/index.js +0 -10
  288. package/elasticsearch/search/index.js.map +0 -1
  289. package/elasticsearch/search/refSearch.d.ts +0 -2
  290. package/elasticsearch/search/refSearch.js +0 -29
  291. package/elasticsearch/search/refSearch.js.map +0 -1
  292. package/elasticsearch/search/timeSearch.d.ts +0 -2
  293. package/elasticsearch/search/timeSearch.js +0 -26
  294. package/elasticsearch/search/timeSearch.js.map +0 -1
  295. package/helpers/entryIndexHelpers.d.ts +0 -18
  296. package/helpers/entryIndexHelpers.js +0 -184
  297. package/helpers/entryIndexHelpers.js.map +0 -1
  298. package/helpers/fieldIdentifier.d.ts +0 -6
  299. package/helpers/fieldIdentifier.js +0 -39
  300. package/helpers/fieldIdentifier.js.map +0 -1
  301. package/helpers/index.d.ts +0 -2
  302. package/helpers/index.js +0 -27
  303. package/helpers/index.js.map +0 -1
  304. package/index.js.map +0 -1
  305. package/operations/entry/dataLoader/types.js.map +0 -1
  306. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.d.ts +0 -18
  307. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js +0 -32
  308. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js.map +0 -1
  309. package/operations/entry/elasticsearch/body.d.ts +0 -13
  310. package/operations/entry/elasticsearch/body.js +0 -140
  311. package/operations/entry/elasticsearch/body.js.map +0 -1
  312. package/operations/entry/elasticsearch/fields.d.ts +0 -10
  313. package/operations/entry/elasticsearch/fields.js +0 -300
  314. package/operations/entry/elasticsearch/fields.js.map +0 -1
  315. package/operations/entry/elasticsearch/filtering/applyFiltering.d.ts +0 -8
  316. package/operations/entry/elasticsearch/filtering/applyFiltering.js +0 -57
  317. package/operations/entry/elasticsearch/filtering/applyFiltering.js.map +0 -1
  318. package/operations/entry/elasticsearch/filtering/exec.d.ts +0 -17
  319. package/operations/entry/elasticsearch/filtering/exec.js +0 -172
  320. package/operations/entry/elasticsearch/filtering/exec.js.map +0 -1
  321. package/operations/entry/elasticsearch/filtering/index.d.ts +0 -1
  322. package/operations/entry/elasticsearch/filtering/index.js +0 -16
  323. package/operations/entry/elasticsearch/filtering/index.js.map +0 -1
  324. package/operations/entry/elasticsearch/filtering/path.d.ts +0 -15
  325. package/operations/entry/elasticsearch/filtering/path.js +0 -44
  326. package/operations/entry/elasticsearch/filtering/path.js.map +0 -1
  327. package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.d.ts +0 -2
  328. package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js +0 -28
  329. package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js.map +0 -1
  330. package/operations/entry/elasticsearch/filtering/plugins/index.d.ts +0 -1
  331. package/operations/entry/elasticsearch/filtering/plugins/index.js +0 -13
  332. package/operations/entry/elasticsearch/filtering/plugins/index.js.map +0 -1
  333. package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.d.ts +0 -2
  334. package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js +0 -67
  335. package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js.map +0 -1
  336. package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.d.ts +0 -2
  337. package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js +0 -48
  338. package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js.map +0 -1
  339. package/operations/entry/elasticsearch/filtering/populated.d.ts +0 -2
  340. package/operations/entry/elasticsearch/filtering/populated.js +0 -23
  341. package/operations/entry/elasticsearch/filtering/populated.js.map +0 -1
  342. package/operations/entry/elasticsearch/filtering/values.d.ts +0 -2
  343. package/operations/entry/elasticsearch/filtering/values.js +0 -22
  344. package/operations/entry/elasticsearch/filtering/values.js.map +0 -1
  345. package/operations/entry/elasticsearch/fullTextSearch.d.ts +0 -12
  346. package/operations/entry/elasticsearch/fullTextSearch.js +0 -89
  347. package/operations/entry/elasticsearch/fullTextSearch.js.map +0 -1
  348. package/operations/entry/elasticsearch/fullTextSearchFields.d.ts +0 -8
  349. package/operations/entry/elasticsearch/fullTextSearchFields.js +0 -25
  350. package/operations/entry/elasticsearch/fullTextSearchFields.js.map +0 -1
  351. package/operations/entry/elasticsearch/initialQuery.d.ts +0 -17
  352. package/operations/entry/elasticsearch/initialQuery.js +0 -103
  353. package/operations/entry/elasticsearch/initialQuery.js.map +0 -1
  354. package/operations/entry/elasticsearch/keyword.d.ts +0 -2
  355. package/operations/entry/elasticsearch/keyword.js +0 -34
  356. package/operations/entry/elasticsearch/keyword.js.map +0 -1
  357. package/operations/entry/elasticsearch/plugins/bodyModifier.d.ts +0 -9
  358. package/operations/entry/elasticsearch/plugins/bodyModifier.js +0 -16
  359. package/operations/entry/elasticsearch/plugins/bodyModifier.js.map +0 -1
  360. package/operations/entry/elasticsearch/plugins/operator.d.ts +0 -8
  361. package/operations/entry/elasticsearch/plugins/operator.js +0 -37
  362. package/operations/entry/elasticsearch/plugins/operator.js.map +0 -1
  363. package/operations/entry/elasticsearch/plugins/queryModifier.d.ts +0 -9
  364. package/operations/entry/elasticsearch/plugins/queryModifier.js +0 -16
  365. package/operations/entry/elasticsearch/plugins/queryModifier.js.map +0 -1
  366. package/operations/entry/elasticsearch/plugins/search.d.ts +0 -7
  367. package/operations/entry/elasticsearch/plugins/search.js +0 -24
  368. package/operations/entry/elasticsearch/plugins/search.js.map +0 -1
  369. package/operations/entry/elasticsearch/plugins/sortModifier.d.ts +0 -9
  370. package/operations/entry/elasticsearch/plugins/sortModifier.js +0 -16
  371. package/operations/entry/elasticsearch/plugins/sortModifier.js.map +0 -1
  372. package/operations/entry/elasticsearch/sort.d.ts +0 -12
  373. package/operations/entry/elasticsearch/sort.js +0 -81
  374. package/operations/entry/elasticsearch/sort.js.map +0 -1
  375. package/operations/entry/elasticsearch/transformValueForSearch.d.ts +0 -16
  376. package/operations/entry/elasticsearch/transformValueForSearch.js +0 -30
  377. package/operations/entry/elasticsearch/transformValueForSearch.js.map +0 -1
  378. package/operations/entry/elasticsearch/types.d.ts +0 -41
  379. package/operations/entry/elasticsearch/types.js +0 -5
  380. package/operations/entry/elasticsearch/types.js.map +0 -1
  381. package/operations/entry/index.d.ts +0 -11
  382. package/operations/entry/index.js +0 -1317
  383. package/operations/entry/index.js.map +0 -1
  384. package/operations/group/index.d.ts +0 -8
  385. package/operations/group/index.js +0 -165
  386. package/operations/group/index.js.map +0 -1
  387. package/operations/model/index.d.ts +0 -8
  388. package/operations/model/index.js +0 -171
  389. package/operations/model/index.js.map +0 -1
  390. package/operations/settings/index.d.ts +0 -6
  391. package/operations/settings/index.js +0 -111
  392. package/operations/settings/index.js.map +0 -1
  393. package/operations/system/index.d.ts +0 -6
  394. package/operations/system/index.js +0 -82
  395. package/operations/system/index.js.map +0 -1
  396. package/plugins/CmsElasticsearchModelFieldPlugin.d.ts +0 -69
  397. package/plugins/CmsElasticsearchModelFieldPlugin.js +0 -48
  398. package/plugins/CmsElasticsearchModelFieldPlugin.js.map +0 -1
  399. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.d.ts +0 -21
  400. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js +0 -22
  401. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js.map +0 -1
  402. package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.d.ts +0 -23
  403. package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js +0 -28
  404. package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js.map +0 -1
  405. package/plugins/CmsEntryElasticsearchIndexPlugin.d.ts +0 -4
  406. package/plugins/CmsEntryElasticsearchIndexPlugin.js +0 -12
  407. package/plugins/CmsEntryElasticsearchIndexPlugin.js.map +0 -1
  408. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.d.ts +0 -31
  409. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js +0 -37
  410. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js.map +0 -1
  411. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.d.ts +0 -18
  412. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js +0 -22
  413. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js.map +0 -1
  414. package/plugins/CmsEntryElasticsearchSortModifierPlugin.d.ts +0 -18
  415. package/plugins/CmsEntryElasticsearchSortModifierPlugin.js +0 -22
  416. package/plugins/CmsEntryElasticsearchSortModifierPlugin.js.map +0 -1
  417. package/plugins/CmsEntryFilterPlugin.d.ts +0 -49
  418. package/plugins/CmsEntryFilterPlugin.js +0 -24
  419. package/plugins/CmsEntryFilterPlugin.js.map +0 -1
  420. package/plugins/index.d.ts +0 -7
  421. package/plugins/index.js +0 -82
  422. 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";
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\";\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"}
@@ -1,12 +1,9 @@
1
- import { CmsModel } from "@webiny/api-headless-cms/types";
2
- interface ElasticsearchConfig {
3
- index: string;
1
+ import type { CmsModelOpenSearchIndexProvider, ICmsModelOpenSearchIndexProviderResult } from "./features/CmsModelOpenSearchIndex/index.js";
2
+ import type { StorageCmsModel } from "@webiny/api-headless-cms/types/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;
package/configurations.js CHANGED
@@ -1,35 +1,17 @@
1
- "use strict";
1
+ import { getOpenSearchIndexPrefix } from "@webiny/api-opensearch";
2
+ const createConfigurations = (provider)=>({
3
+ async es ({ model }) {
4
+ const result = await provider.execute({
5
+ model
6
+ });
7
+ const prefix = getOpenSearchIndexPrefix();
8
+ if (!prefix) return result;
9
+ return {
10
+ ...result,
11
+ index: prefix + result.index
12
+ };
13
+ }
14
+ });
15
+ export { createConfigurations };
2
16
 
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"));
9
- 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
- };
29
- }
30
- return {
31
- index: prefix + index
32
- };
33
- }
34
- };
35
- exports.configurations = configurations;
17
+ //# 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 { getOpenSearchIndexPrefix } from \"@webiny/api-opensearch\";\nimport type {\n CmsModelOpenSearchIndexProvider,\n ICmsModelOpenSearchIndexProviderResult\n} from \"~/features/CmsModelOpenSearchIndex/index.js\";\nimport type { StorageCmsModel } from \"@webiny/api-headless-cms/types/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"],"names":["createConfigurations","provider","model","result","prefix","getOpenSearchIndexPrefix"],"mappings":";AAeO,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"}
@@ -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,91 +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
- location: {
80
- type: "map"
81
- },
82
- values: {
83
- type: "map"
84
- },
85
- meta: {
86
- type: "map"
87
- }
88
- }, attributes || {})
89
- });
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
+ });
90
8
  };
91
- 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","location","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 location: {\n type: \"map\"\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,QAAQ,EAAE;QACNrB,IAAI,EAAE;MACV,CAAC;MACDsB,MAAM,EAAE;QACJtB,IAAI,EAAE;MACV,CAAC;MACDuB,IAAI,EAAE;QACFvB,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