@webiny/api-headless-cms-ddb-es 0.0.0-unstable.3bc8100a7f → 0.0.0-unstable.3fddf667ea

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 (426) hide show
  1. package/README.md +6 -30
  2. package/abstractions/CmsDdbEsDataLoaders.d.ts +5 -0
  3. package/abstractions/CmsDdbEsDataLoaders.js +5 -0
  4. package/abstractions/CmsDdbEsDataLoaders.js.map +1 -0
  5. package/abstractions/CmsDdbEsEntriesEsEntity.d.ts +5 -0
  6. package/abstractions/CmsDdbEsEntriesEsEntity.js +5 -0
  7. package/abstractions/CmsDdbEsEntriesEsEntity.js.map +1 -0
  8. package/abstractions/CmsDdbEsEntryEntity.d.ts +5 -0
  9. package/abstractions/CmsDdbEsEntryEntity.js +5 -0
  10. package/abstractions/CmsDdbEsEntryEntity.js.map +1 -0
  11. package/abstractions/CmsDdbEsGroupEntity.d.ts +5 -0
  12. package/abstractions/CmsDdbEsGroupEntity.js +5 -0
  13. package/abstractions/CmsDdbEsGroupEntity.js.map +1 -0
  14. package/abstractions/CmsDdbEsModelEntity.d.ts +5 -0
  15. package/abstractions/CmsDdbEsModelEntity.js +5 -0
  16. package/abstractions/CmsDdbEsModelEntity.js.map +1 -0
  17. package/abstractions/CmsDdbEsOsTable.d.ts +5 -0
  18. package/abstractions/CmsDdbEsOsTable.js +5 -0
  19. package/abstractions/CmsDdbEsOsTable.js.map +1 -0
  20. package/abstractions/CmsDdbEsTable.d.ts +5 -0
  21. package/abstractions/CmsDdbEsTable.js +5 -0
  22. package/abstractions/CmsDdbEsTable.js.map +1 -0
  23. package/debuggerNamespaces.d.ts +12 -0
  24. package/debuggerNamespaces.js +0 -0
  25. package/definitions/entry.d.ts +4 -6
  26. package/definitions/entry.js +8 -179
  27. package/definitions/entry.js.map +1 -1
  28. package/definitions/group.d.ts +6 -7
  29. package/definitions/group.js +8 -63
  30. package/definitions/group.js.map +1 -1
  31. package/definitions/model.d.ts +6 -7
  32. package/definitions/model.js +8 -107
  33. package/definitions/model.js.map +1 -1
  34. package/definitions/types.d.ts +65 -0
  35. package/definitions/types.js +0 -0
  36. package/feature.d.ts +10 -0
  37. package/feature.js +69 -0
  38. package/feature.js.map +1 -0
  39. package/index.d.ts +1 -3
  40. package/index.js +1 -225
  41. package/operations/entry/DdbEsCreateEntry.d.ts +24 -0
  42. package/operations/entry/DdbEsCreateEntry.js +134 -0
  43. package/operations/entry/DdbEsCreateEntry.js.map +1 -0
  44. package/operations/entry/DdbEsCreateEntryRevisionFrom.d.ts +24 -0
  45. package/operations/entry/DdbEsCreateEntryRevisionFrom.js +139 -0
  46. package/operations/entry/DdbEsCreateEntryRevisionFrom.js.map +1 -0
  47. package/operations/entry/DdbEsDeleteEntry.d.ts +18 -0
  48. package/operations/entry/DdbEsDeleteEntry.js +79 -0
  49. package/operations/entry/DdbEsDeleteEntry.js.map +1 -0
  50. package/operations/entry/DdbEsDeleteEntryRevision.d.ts +24 -0
  51. package/operations/entry/DdbEsDeleteEntryRevision.js +136 -0
  52. package/operations/entry/DdbEsDeleteEntryRevision.js.map +1 -0
  53. package/operations/entry/DdbEsDeleteMultipleEntries.d.ts +18 -0
  54. package/operations/entry/DdbEsDeleteMultipleEntries.js +78 -0
  55. package/operations/entry/DdbEsDeleteMultipleEntries.js.map +1 -0
  56. package/operations/entry/DdbEsGetEntriesByIds.d.ts +14 -0
  57. package/operations/entry/DdbEsGetEntriesByIds.js +31 -0
  58. package/operations/entry/DdbEsGetEntriesByIds.js.map +1 -0
  59. package/operations/entry/DdbEsGetEntry.d.ts +14 -0
  60. package/operations/entry/DdbEsGetEntry.js +27 -0
  61. package/operations/entry/DdbEsGetEntry.js.map +1 -0
  62. package/operations/entry/DdbEsGetLatestEntriesByIds.d.ts +14 -0
  63. package/operations/entry/DdbEsGetLatestEntriesByIds.js +31 -0
  64. package/operations/entry/DdbEsGetLatestEntriesByIds.js.map +1 -0
  65. package/operations/entry/DdbEsGetLatestRevisionByEntryId.d.ts +14 -0
  66. package/operations/entry/DdbEsGetLatestRevisionByEntryId.js +34 -0
  67. package/operations/entry/DdbEsGetLatestRevisionByEntryId.js.map +1 -0
  68. package/operations/entry/DdbEsGetPreviousRevision.d.ts +14 -0
  69. package/operations/entry/DdbEsGetPreviousRevision.js +56 -0
  70. package/operations/entry/DdbEsGetPreviousRevision.js.map +1 -0
  71. package/operations/entry/DdbEsGetPublishedEntriesByIds.d.ts +14 -0
  72. package/operations/entry/DdbEsGetPublishedEntriesByIds.js +31 -0
  73. package/operations/entry/DdbEsGetPublishedEntriesByIds.js.map +1 -0
  74. package/operations/entry/DdbEsGetPublishedRevisionByEntryId.d.ts +14 -0
  75. package/operations/entry/DdbEsGetPublishedRevisionByEntryId.js +34 -0
  76. package/operations/entry/DdbEsGetPublishedRevisionByEntryId.js.map +1 -0
  77. package/operations/entry/DdbEsGetRevisionById.d.ts +14 -0
  78. package/operations/entry/DdbEsGetRevisionById.js +34 -0
  79. package/operations/entry/DdbEsGetRevisionById.js.map +1 -0
  80. package/operations/entry/DdbEsGetRevisions.d.ts +14 -0
  81. package/operations/entry/DdbEsGetRevisions.js +33 -0
  82. package/operations/entry/DdbEsGetRevisions.js.map +1 -0
  83. package/operations/entry/DdbEsGetUniqueFieldValues.d.ts +18 -0
  84. package/operations/entry/DdbEsGetUniqueFieldValues.js +77 -0
  85. package/operations/entry/DdbEsGetUniqueFieldValues.js.map +1 -0
  86. package/operations/entry/DdbEsListEntries.d.ts +28 -0
  87. package/operations/entry/DdbEsListEntries.js +110 -0
  88. package/operations/entry/DdbEsListEntries.js.map +1 -0
  89. package/operations/entry/DdbEsMoveEntry.d.ts +20 -0
  90. package/operations/entry/DdbEsMoveEntry.js +113 -0
  91. package/operations/entry/DdbEsMoveEntry.js.map +1 -0
  92. package/operations/entry/DdbEsMoveToBin.d.ts +23 -0
  93. package/operations/entry/DdbEsMoveToBin.js +137 -0
  94. package/operations/entry/DdbEsMoveToBin.js.map +1 -0
  95. package/operations/entry/DdbEsPublishEntry.d.ts +24 -0
  96. package/operations/entry/DdbEsPublishEntry.js +231 -0
  97. package/operations/entry/DdbEsPublishEntry.js.map +1 -0
  98. package/operations/entry/DdbEsRestoreFromBin.d.ts +23 -0
  99. package/operations/entry/DdbEsRestoreFromBin.js +137 -0
  100. package/operations/entry/DdbEsRestoreFromBin.js.map +1 -0
  101. package/operations/entry/DdbEsUnpublishEntry.d.ts +24 -0
  102. package/operations/entry/DdbEsUnpublishEntry.js +127 -0
  103. package/operations/entry/DdbEsUnpublishEntry.js.map +1 -0
  104. package/operations/entry/DdbEsUpdateEntry.d.ts +24 -0
  105. package/operations/entry/DdbEsUpdateEntry.js +175 -0
  106. package/operations/entry/DdbEsUpdateEntry.js.map +1 -0
  107. package/operations/entry/dataLoader/DataLoaderCache.d.ts +1 -2
  108. package/operations/entry/dataLoader/DataLoaderCache.js +21 -35
  109. package/operations/entry/dataLoader/DataLoaderCache.js.map +1 -1
  110. package/operations/entry/dataLoader/constants.js +2 -7
  111. package/operations/entry/dataLoader/constants.js.map +1 -1
  112. package/operations/entry/dataLoader/createBatchScheduleFn.js +7 -22
  113. package/operations/entry/dataLoader/createBatchScheduleFn.js.map +1 -1
  114. package/operations/entry/dataLoader/getAllEntryRevisions.d.ts +3 -3
  115. package/operations/entry/dataLoader/getAllEntryRevisions.js +20 -41
  116. package/operations/entry/dataLoader/getAllEntryRevisions.js.map +1 -1
  117. package/operations/entry/dataLoader/getLatestRevisionByEntryId.d.ts +3 -3
  118. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js +30 -48
  119. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js.map +1 -1
  120. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.d.ts +3 -3
  121. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js +30 -48
  122. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js.map +1 -1
  123. package/operations/entry/dataLoader/getRevisionById.d.ts +3 -3
  124. package/operations/entry/dataLoader/getRevisionById.js +36 -58
  125. package/operations/entry/dataLoader/getRevisionById.js.map +1 -1
  126. package/operations/entry/dataLoader/index.d.ts +3 -3
  127. package/operations/entry/dataLoader/index.js +13 -35
  128. package/operations/entry/dataLoader/index.js.map +1 -1
  129. package/operations/entry/dataLoader/types.d.ts +4 -4
  130. package/operations/entry/dataLoader/types.js +0 -7
  131. package/operations/entry/dataLoaders.d.ts +14 -14
  132. package/operations/entry/dataLoaders.js +92 -110
  133. package/operations/entry/dataLoaders.js.map +1 -1
  134. package/operations/entry/feature.d.ts +4 -0
  135. package/operations/entry/feature.js +55 -0
  136. package/operations/entry/feature.js.map +1 -0
  137. package/operations/entry/keys.d.ts +31 -1
  138. package/operations/entry/keys.js +44 -27
  139. package/operations/entry/keys.js.map +1 -1
  140. package/operations/entry/recordType.js +4 -18
  141. package/operations/entry/recordType.js.map +1 -1
  142. package/operations/entry/storageEntryUtils.d.ts +7 -0
  143. package/operations/entry/storageEntryUtils.js +14 -0
  144. package/operations/entry/storageEntryUtils.js.map +1 -0
  145. package/operations/entry/transformations/convertEntryKeys.d.ts +6 -6
  146. package/operations/entry/transformations/convertEntryKeys.js +21 -34
  147. package/operations/entry/transformations/convertEntryKeys.js.map +1 -1
  148. package/operations/entry/transformations/index.d.ts +21 -18
  149. package/operations/entry/transformations/index.js +87 -123
  150. package/operations/entry/transformations/index.js.map +1 -1
  151. package/operations/entry/transformations/modifyEntryValues.d.ts +30 -35
  152. package/operations/entry/transformations/modifyEntryValues.js +12 -24
  153. package/operations/entry/transformations/modifyEntryValues.js.map +1 -1
  154. package/operations/entry/transformations/transformEntryKeys.d.ts +8 -8
  155. package/operations/entry/transformations/transformEntryKeys.js +14 -24
  156. package/operations/entry/transformations/transformEntryKeys.js.map +1 -1
  157. package/operations/group/DdbEsCreateGroup.d.ts +12 -0
  158. package/operations/group/DdbEsCreateGroup.js +35 -0
  159. package/operations/group/DdbEsCreateGroup.js.map +1 -0
  160. package/operations/group/DdbEsDeleteGroup.d.ts +12 -0
  161. package/operations/group/DdbEsDeleteGroup.js +31 -0
  162. package/operations/group/DdbEsDeleteGroup.js.map +1 -0
  163. package/operations/group/DdbEsGetGroup.d.ts +12 -0
  164. package/operations/group/DdbEsGetGroup.js +31 -0
  165. package/operations/group/DdbEsGetGroup.js.map +1 -0
  166. package/operations/group/DdbEsListGroups.d.ts +14 -0
  167. package/operations/group/DdbEsListGroups.js +52 -0
  168. package/operations/group/DdbEsListGroups.js.map +1 -0
  169. package/operations/group/DdbEsUpdateGroup.d.ts +12 -0
  170. package/operations/group/DdbEsUpdateGroup.js +35 -0
  171. package/operations/group/DdbEsUpdateGroup.js.map +1 -0
  172. package/operations/group/feature.d.ts +4 -0
  173. package/operations/group/feature.js +19 -0
  174. package/operations/group/feature.js.map +1 -0
  175. package/operations/group/keys.d.ts +15 -0
  176. package/operations/group/keys.js +17 -0
  177. package/operations/group/keys.js.map +1 -0
  178. package/operations/model/DdbEsCreateModel.d.ts +16 -0
  179. package/operations/model/DdbEsCreateModel.js +56 -0
  180. package/operations/model/DdbEsCreateModel.js.map +1 -0
  181. package/operations/model/DdbEsDeleteModel.d.ts +12 -0
  182. package/operations/model/DdbEsDeleteModel.js +31 -0
  183. package/operations/model/DdbEsDeleteModel.js.map +1 -0
  184. package/operations/model/DdbEsGetModel.d.ts +12 -0
  185. package/operations/model/DdbEsGetModel.js +30 -0
  186. package/operations/model/DdbEsGetModel.js.map +1 -0
  187. package/operations/model/DdbEsListModels.d.ts +12 -0
  188. package/operations/model/DdbEsListModels.js +36 -0
  189. package/operations/model/DdbEsListModels.js.map +1 -0
  190. package/operations/model/DdbEsUpdateModel.d.ts +12 -0
  191. package/operations/model/DdbEsUpdateModel.js +36 -0
  192. package/operations/model/DdbEsUpdateModel.js.map +1 -0
  193. package/operations/model/feature.d.ts +4 -0
  194. package/operations/model/feature.js +19 -0
  195. package/operations/model/feature.js.map +1 -0
  196. package/operations/model/keys.d.ts +15 -0
  197. package/operations/model/keys.js +17 -0
  198. package/operations/model/keys.js.map +1 -0
  199. package/package.json +40 -36
  200. package/registry/CmsEntitiesDbRegistryDecorator.d.ts +27 -0
  201. package/registry/CmsEntitiesDbRegistryDecorator.js +46 -0
  202. package/registry/CmsEntitiesDbRegistryDecorator.js.map +1 -0
  203. package/tasks/CreateElasticsearchIndexTask.d.ts +15 -0
  204. package/tasks/CreateElasticsearchIndexTask.js +49 -0
  205. package/tasks/CreateElasticsearchIndexTask.js.map +1 -0
  206. package/types.d.ts +12 -159
  207. package/types.js +7 -39
  208. package/types.js.map +1 -1
  209. package/configurations.d.ts +0 -19
  210. package/configurations.js +0 -49
  211. package/configurations.js.map +0 -1
  212. package/definitions/entryElasticsearch.d.ts +0 -9
  213. package/definitions/entryElasticsearch.js +0 -41
  214. package/definitions/entryElasticsearch.js.map +0 -1
  215. package/definitions/system.d.ts +0 -9
  216. package/definitions/system.js +0 -42
  217. package/definitions/system.js.map +0 -1
  218. package/definitions/table.d.ts +0 -8
  219. package/definitions/table.js +0 -25
  220. package/definitions/table.js.map +0 -1
  221. package/definitions/tableElasticsearch.d.ts +0 -8
  222. package/definitions/tableElasticsearch.js +0 -25
  223. package/definitions/tableElasticsearch.js.map +0 -1
  224. package/dynamoDb/index.d.ts +0 -3
  225. package/dynamoDb/index.js +0 -16
  226. package/dynamoDb/index.js.map +0 -1
  227. package/dynamoDb/storage/longText.d.ts +0 -10
  228. package/dynamoDb/storage/longText.js +0 -96
  229. package/dynamoDb/storage/longText.js.map +0 -1
  230. package/dynamoDb/storage/richText.d.ts +0 -2
  231. package/dynamoDb/storage/richText.js +0 -59
  232. package/dynamoDb/storage/richText.js.map +0 -1
  233. package/elasticsearch/createElasticsearchIndex.d.ts +0 -9
  234. package/elasticsearch/createElasticsearchIndex.js +0 -40
  235. package/elasticsearch/createElasticsearchIndex.js.map +0 -1
  236. package/elasticsearch/deleteElasticsearchIndex.d.ts +0 -8
  237. package/elasticsearch/deleteElasticsearchIndex.js +0 -38
  238. package/elasticsearch/deleteElasticsearchIndex.js.map +0 -1
  239. package/elasticsearch/index.d.ts +0 -2
  240. package/elasticsearch/index.js +0 -13
  241. package/elasticsearch/index.js.map +0 -1
  242. package/elasticsearch/indexing/dateTimeIndexing.d.ts +0 -3
  243. package/elasticsearch/indexing/dateTimeIndexing.js +0 -88
  244. package/elasticsearch/indexing/dateTimeIndexing.js.map +0 -1
  245. package/elasticsearch/indexing/defaultFieldIndexing.d.ts +0 -3
  246. package/elasticsearch/indexing/defaultFieldIndexing.js +0 -54
  247. package/elasticsearch/indexing/defaultFieldIndexing.js.map +0 -1
  248. package/elasticsearch/indexing/index.d.ts +0 -2
  249. package/elasticsearch/indexing/index.js +0 -18
  250. package/elasticsearch/indexing/index.js.map +0 -1
  251. package/elasticsearch/indexing/jsonIndexing.d.ts +0 -2
  252. package/elasticsearch/indexing/jsonIndexing.js +0 -28
  253. package/elasticsearch/indexing/jsonIndexing.js.map +0 -1
  254. package/elasticsearch/indexing/longTextIndexing.d.ts +0 -7
  255. package/elasticsearch/indexing/longTextIndexing.js +0 -42
  256. package/elasticsearch/indexing/longTextIndexing.js.map +0 -1
  257. package/elasticsearch/indexing/numberIndexing.d.ts +0 -3
  258. package/elasticsearch/indexing/numberIndexing.js +0 -41
  259. package/elasticsearch/indexing/numberIndexing.js.map +0 -1
  260. package/elasticsearch/indexing/objectIndexing.d.ts +0 -12
  261. package/elasticsearch/indexing/objectIndexing.js +0 -201
  262. package/elasticsearch/indexing/objectIndexing.js.map +0 -1
  263. package/elasticsearch/indexing/richTextIndexing.d.ts +0 -3
  264. package/elasticsearch/indexing/richTextIndexing.js +0 -31
  265. package/elasticsearch/indexing/richTextIndexing.js.map +0 -1
  266. package/elasticsearch/indices/base.d.ts +0 -2
  267. package/elasticsearch/indices/base.js +0 -13
  268. package/elasticsearch/indices/base.js.map +0 -1
  269. package/elasticsearch/indices/index.d.ts +0 -1
  270. package/elasticsearch/indices/index.js +0 -14
  271. package/elasticsearch/indices/index.js.map +0 -1
  272. package/elasticsearch/indices/japanese.d.ts +0 -2
  273. package/elasticsearch/indices/japanese.js +0 -14
  274. package/elasticsearch/indices/japanese.js.map +0 -1
  275. package/elasticsearch/search/index.d.ts +0 -3
  276. package/elasticsearch/search/index.js +0 -12
  277. package/elasticsearch/search/index.js.map +0 -1
  278. package/elasticsearch/search/refSearch.d.ts +0 -2
  279. package/elasticsearch/search/refSearch.js +0 -31
  280. package/elasticsearch/search/refSearch.js.map +0 -1
  281. package/elasticsearch/search/timeSearch.d.ts +0 -2
  282. package/elasticsearch/search/timeSearch.js +0 -27
  283. package/elasticsearch/search/timeSearch.js.map +0 -1
  284. package/helpers/entryIndexHelpers.d.ts +0 -18
  285. package/helpers/entryIndexHelpers.js +0 -190
  286. package/helpers/entryIndexHelpers.js.map +0 -1
  287. package/helpers/fieldIdentifier.d.ts +0 -6
  288. package/helpers/fieldIdentifier.js +0 -43
  289. package/helpers/fieldIdentifier.js.map +0 -1
  290. package/helpers/index.d.ts +0 -2
  291. package/helpers/index.js +0 -29
  292. package/helpers/index.js.map +0 -1
  293. package/index.js.map +0 -1
  294. package/operations/entry/dataLoader/types.js.map +0 -1
  295. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.d.ts +0 -18
  296. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js +0 -34
  297. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js.map +0 -1
  298. package/operations/entry/elasticsearch/body.d.ts +0 -13
  299. package/operations/entry/elasticsearch/body.js +0 -142
  300. package/operations/entry/elasticsearch/body.js.map +0 -1
  301. package/operations/entry/elasticsearch/fields.d.ts +0 -10
  302. package/operations/entry/elasticsearch/fields.js +0 -315
  303. package/operations/entry/elasticsearch/fields.js.map +0 -1
  304. package/operations/entry/elasticsearch/filtering/applyFiltering.d.ts +0 -8
  305. package/operations/entry/elasticsearch/filtering/applyFiltering.js +0 -59
  306. package/operations/entry/elasticsearch/filtering/applyFiltering.js.map +0 -1
  307. package/operations/entry/elasticsearch/filtering/exec.d.ts +0 -17
  308. package/operations/entry/elasticsearch/filtering/exec.js +0 -175
  309. package/operations/entry/elasticsearch/filtering/exec.js.map +0 -1
  310. package/operations/entry/elasticsearch/filtering/index.d.ts +0 -1
  311. package/operations/entry/elasticsearch/filtering/index.js +0 -18
  312. package/operations/entry/elasticsearch/filtering/index.js.map +0 -1
  313. package/operations/entry/elasticsearch/filtering/path.d.ts +0 -15
  314. package/operations/entry/elasticsearch/filtering/path.js +0 -46
  315. package/operations/entry/elasticsearch/filtering/path.js.map +0 -1
  316. package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.d.ts +0 -2
  317. package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js +0 -30
  318. package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js.map +0 -1
  319. package/operations/entry/elasticsearch/filtering/plugins/index.d.ts +0 -1
  320. package/operations/entry/elasticsearch/filtering/plugins/index.js +0 -15
  321. package/operations/entry/elasticsearch/filtering/plugins/index.js.map +0 -1
  322. package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.d.ts +0 -2
  323. package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js +0 -69
  324. package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js.map +0 -1
  325. package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.d.ts +0 -2
  326. package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js +0 -57
  327. package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js.map +0 -1
  328. package/operations/entry/elasticsearch/filtering/populated.d.ts +0 -2
  329. package/operations/entry/elasticsearch/filtering/populated.js +0 -25
  330. package/operations/entry/elasticsearch/filtering/populated.js.map +0 -1
  331. package/operations/entry/elasticsearch/filtering/values.d.ts +0 -2
  332. package/operations/entry/elasticsearch/filtering/values.js +0 -24
  333. package/operations/entry/elasticsearch/filtering/values.js.map +0 -1
  334. package/operations/entry/elasticsearch/fullTextSearch.d.ts +0 -12
  335. package/operations/entry/elasticsearch/fullTextSearch.js +0 -91
  336. package/operations/entry/elasticsearch/fullTextSearch.js.map +0 -1
  337. package/operations/entry/elasticsearch/fullTextSearchFields.d.ts +0 -8
  338. package/operations/entry/elasticsearch/fullTextSearchFields.js +0 -27
  339. package/operations/entry/elasticsearch/fullTextSearchFields.js.map +0 -1
  340. package/operations/entry/elasticsearch/initialQuery.d.ts +0 -17
  341. package/operations/entry/elasticsearch/initialQuery.js +0 -106
  342. package/operations/entry/elasticsearch/initialQuery.js.map +0 -1
  343. package/operations/entry/elasticsearch/keyword.d.ts +0 -2
  344. package/operations/entry/elasticsearch/keyword.js +0 -36
  345. package/operations/entry/elasticsearch/keyword.js.map +0 -1
  346. package/operations/entry/elasticsearch/logIgnoredEsResponseError.d.ts +0 -9
  347. package/operations/entry/elasticsearch/logIgnoredEsResponseError.js +0 -26
  348. package/operations/entry/elasticsearch/logIgnoredEsResponseError.js.map +0 -1
  349. package/operations/entry/elasticsearch/plugins/bodyModifier.d.ts +0 -9
  350. package/operations/entry/elasticsearch/plugins/bodyModifier.js +0 -18
  351. package/operations/entry/elasticsearch/plugins/bodyModifier.js.map +0 -1
  352. package/operations/entry/elasticsearch/plugins/operator.d.ts +0 -8
  353. package/operations/entry/elasticsearch/plugins/operator.js +0 -39
  354. package/operations/entry/elasticsearch/plugins/operator.js.map +0 -1
  355. package/operations/entry/elasticsearch/plugins/queryModifier.d.ts +0 -9
  356. package/operations/entry/elasticsearch/plugins/queryModifier.js +0 -18
  357. package/operations/entry/elasticsearch/plugins/queryModifier.js.map +0 -1
  358. package/operations/entry/elasticsearch/plugins/search.d.ts +0 -7
  359. package/operations/entry/elasticsearch/plugins/search.js +0 -26
  360. package/operations/entry/elasticsearch/plugins/search.js.map +0 -1
  361. package/operations/entry/elasticsearch/plugins/sortModifier.d.ts +0 -9
  362. package/operations/entry/elasticsearch/plugins/sortModifier.js +0 -18
  363. package/operations/entry/elasticsearch/plugins/sortModifier.js.map +0 -1
  364. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.d.ts +0 -2
  365. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js +0 -13
  366. package/operations/entry/elasticsearch/shouldIgnoreEsResponseError.js.map +0 -1
  367. package/operations/entry/elasticsearch/sort.d.ts +0 -12
  368. package/operations/entry/elasticsearch/sort.js +0 -87
  369. package/operations/entry/elasticsearch/sort.js.map +0 -1
  370. package/operations/entry/elasticsearch/transformValueForSearch.d.ts +0 -16
  371. package/operations/entry/elasticsearch/transformValueForSearch.js +0 -32
  372. package/operations/entry/elasticsearch/transformValueForSearch.js.map +0 -1
  373. package/operations/entry/elasticsearch/types.d.ts +0 -41
  374. package/operations/entry/elasticsearch/types.js +0 -7
  375. package/operations/entry/elasticsearch/types.js.map +0 -1
  376. package/operations/entry/index.d.ts +0 -11
  377. package/operations/entry/index.js +0 -1881
  378. package/operations/entry/index.js.map +0 -1
  379. package/operations/entry/transformations/transformEntryToIndex.d.ts +0 -10
  380. package/operations/entry/transformations/transformEntryToIndex.js +0 -31
  381. package/operations/entry/transformations/transformEntryToIndex.js.map +0 -1
  382. package/operations/group/index.d.ts +0 -8
  383. package/operations/group/index.js +0 -179
  384. package/operations/group/index.js.map +0 -1
  385. package/operations/model/index.d.ts +0 -8
  386. package/operations/model/index.js +0 -183
  387. package/operations/model/index.js.map +0 -1
  388. package/operations/system/index.d.ts +0 -6
  389. package/operations/system/index.js +0 -94
  390. package/operations/system/index.js.map +0 -1
  391. package/operations/system/indexes.d.ts +0 -10
  392. package/operations/system/indexes.js +0 -41
  393. package/operations/system/indexes.js.map +0 -1
  394. package/plugins/CmsElasticsearchModelFieldPlugin.d.ts +0 -69
  395. package/plugins/CmsElasticsearchModelFieldPlugin.js +0 -52
  396. package/plugins/CmsElasticsearchModelFieldPlugin.js.map +0 -1
  397. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.d.ts +0 -22
  398. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js +0 -21
  399. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js.map +0 -1
  400. package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.d.ts +0 -23
  401. package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js +0 -27
  402. package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js.map +0 -1
  403. package/plugins/CmsEntryElasticsearchIndexPlugin.d.ts +0 -4
  404. package/plugins/CmsEntryElasticsearchIndexPlugin.js +0 -13
  405. package/plugins/CmsEntryElasticsearchIndexPlugin.js.map +0 -1
  406. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.d.ts +0 -31
  407. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js +0 -40
  408. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js.map +0 -1
  409. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.d.ts +0 -19
  410. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js +0 -21
  411. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js.map +0 -1
  412. package/plugins/CmsEntryElasticsearchSortModifierPlugin.d.ts +0 -19
  413. package/plugins/CmsEntryElasticsearchSortModifierPlugin.js +0 -21
  414. package/plugins/CmsEntryElasticsearchSortModifierPlugin.js.map +0 -1
  415. package/plugins/CmsEntryElasticsearchValuesModifier.d.ts +0 -33
  416. package/plugins/CmsEntryElasticsearchValuesModifier.js +0 -50
  417. package/plugins/CmsEntryElasticsearchValuesModifier.js.map +0 -1
  418. package/plugins/CmsEntryFilterPlugin.d.ts +0 -49
  419. package/plugins/CmsEntryFilterPlugin.js +0 -22
  420. package/plugins/CmsEntryFilterPlugin.js.map +0 -1
  421. package/plugins/index.d.ts +0 -8
  422. package/plugins/index.js +0 -95
  423. package/plugins/index.js.map +0 -1
  424. package/tasks/createIndexTaskPlugin.d.ts +0 -2
  425. package/tasks/createIndexTaskPlugin.js +0 -67
  426. package/tasks/createIndexTaskPlugin.js.map +0 -1
@@ -1,41 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createEntryElasticsearchEntity = void 0;
7
- var _toolbox = require("@webiny/db-dynamodb/toolbox");
8
- const createEntryElasticsearchEntity = params => {
9
- const {
10
- table,
11
- entityName,
12
- attributes
13
- } = params;
14
- return new _toolbox.Entity({
15
- name: entityName,
16
- table,
17
- attributes: {
18
- PK: {
19
- type: "string",
20
- partitionKey: true
21
- },
22
- SK: {
23
- type: "string",
24
- sortKey: true
25
- },
26
- index: {
27
- type: "string"
28
- },
29
- data: {
30
- type: "map"
31
- },
32
- TYPE: {
33
- type: "string"
34
- },
35
- ...(attributes || {})
36
- }
37
- });
38
- };
39
- exports.createEntryElasticsearchEntity = createEntryElasticsearchEntity;
40
-
41
- //# sourceMappingURL=entryElasticsearch.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_toolbox","require","createEntryElasticsearchEntity","params","table","entityName","attributes","Entity","name","PK","type","partitionKey","SK","sortKey","index","data","TYPE","exports"],"sources":["entryElasticsearch.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\nexport interface CreateEntryElasticsearchEntityParams {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\nexport const createEntryElasticsearchEntity = (\n params: CreateEntryElasticsearchEntityParams\n): Entity<any> => {\n const { table, entityName, attributes } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n type: \"string\",\n partitionKey: true\n },\n SK: {\n type: \"string\",\n sortKey: true\n },\n index: {\n type: \"string\"\n },\n data: {\n type: \"map\"\n },\n TYPE: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAQO,MAAMC,8BAA8B,GACvCC,MAA4C,IAC9B;EACd,MAAM;IAAEC,KAAK;IAAEC,UAAU;IAAEC;EAAW,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEH,UAAU;IAChBD,KAAK;IACLE,UAAU,EAAE;MACRG,EAAE,EAAE;QACAC,IAAI,EAAE,QAAQ;QACdC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAF,IAAI,EAAE,QAAQ;QACdG,OAAO,EAAE;MACb,CAAC;MACDC,KAAK,EAAE;QACHJ,IAAI,EAAE;MACV,CAAC;MACDK,IAAI,EAAE;QACFL,IAAI,EAAE;MACV,CAAC;MACDM,IAAI,EAAE;QACFN,IAAI,EAAE;MACV,CAAC;MACD,IAAIJ,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACW,OAAA,CAAAf,8BAAA,GAAAA,8BAAA","ignoreList":[]}
@@ -1,9 +0,0 @@
1
- import type { Table } from "@webiny/db-dynamodb/toolbox";
2
- import { Entity } from "@webiny/db-dynamodb/toolbox";
3
- import type { Attributes } from "../types";
4
- export interface CreateSystemEntityParams {
5
- table: Table<string, string, string>;
6
- entityName: string;
7
- attributes: Attributes;
8
- }
9
- export declare const createSystemEntity: (params: CreateSystemEntityParams) => Entity<any>;
@@ -1,42 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createSystemEntity = void 0;
7
- var _toolbox = require("@webiny/db-dynamodb/toolbox");
8
- const createSystemEntity = params => {
9
- const {
10
- entityName,
11
- attributes,
12
- table
13
- } = params;
14
- return new _toolbox.Entity({
15
- name: entityName,
16
- table,
17
- attributes: {
18
- PK: {
19
- partitionKey: true
20
- },
21
- SK: {
22
- sortKey: true
23
- },
24
- version: {
25
- type: "string"
26
- },
27
- locale: {
28
- type: "string"
29
- },
30
- tenant: {
31
- type: "string"
32
- },
33
- readAPIKey: {
34
- type: "string"
35
- },
36
- ...(attributes || {})
37
- }
38
- });
39
- };
40
- exports.createSystemEntity = createSystemEntity;
41
-
42
- //# sourceMappingURL=system.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_toolbox","require","createSystemEntity","params","entityName","attributes","table","Entity","name","PK","partitionKey","SK","sortKey","version","type","locale","tenant","readAPIKey","exports"],"sources":["system.ts"],"sourcesContent":["import type { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { Entity } from \"@webiny/db-dynamodb/toolbox\";\nimport type { Attributes } from \"~/types\";\n\nexport interface CreateSystemEntityParams {\n table: Table<string, string, string>;\n entityName: string;\n attributes: Attributes;\n}\n\nexport const createSystemEntity = (params: CreateSystemEntityParams): Entity<any> => {\n const { entityName, attributes, table } = params;\n return new Entity({\n name: entityName,\n table,\n attributes: {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n version: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n readAPIKey: {\n type: \"string\"\n },\n ...(attributes || {})\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AASO,MAAMC,kBAAkB,GAAIC,MAAgC,IAAkB;EACjF,MAAM;IAAEC,UAAU;IAAEC,UAAU;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAChD,OAAO,IAAII,eAAM,CAAC;IACdC,IAAI,EAAEJ,UAAU;IAChBE,KAAK;IACLD,UAAU,EAAE;MACRI,EAAE,EAAE;QACAC,YAAY,EAAE;MAClB,CAAC;MACDC,EAAE,EAAE;QACAC,OAAO,EAAE;MACb,CAAC;MACDC,OAAO,EAAE;QACLC,IAAI,EAAE;MACV,CAAC;MACDC,MAAM,EAAE;QACJD,IAAI,EAAE;MACV,CAAC;MACDE,MAAM,EAAE;QACJF,IAAI,EAAE;MACV,CAAC;MACDG,UAAU,EAAE;QACRH,IAAI,EAAE;MACV,CAAC;MACD,IAAIT,UAAU,IAAI,CAAC,CAAC;IACxB;EACJ,CAAC,CAAC;AACN,CAAC;AAACa,OAAA,CAAAhB,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -1,8 +0,0 @@
1
- import type { TableModifier } from "../types";
2
- import type { DynamoDBDocument } from "@webiny/aws-sdk/client-dynamodb";
3
- import { Table } from "@webiny/db-dynamodb/toolbox";
4
- export interface CreateTableParams {
5
- table?: TableModifier;
6
- documentClient: DynamoDBDocument;
7
- }
8
- export declare const createTable: ({ table, documentClient }: CreateTableParams) => Table<string, string, string>;
@@ -1,25 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createTable = void 0;
7
- var _toolbox = require("@webiny/db-dynamodb/toolbox");
8
- const createTable = ({
9
- table,
10
- documentClient
11
- }) => {
12
- const tableConfig = {
13
- name: process.env.DB_TABLE_HEADLESS_CMS || process.env.DB_TABLE,
14
- partitionKey: "PK",
15
- sortKey: "SK",
16
- DocumentClient: documentClient,
17
- autoExecute: true,
18
- autoParse: true
19
- };
20
- const config = typeof table === "function" ? table(tableConfig) : tableConfig;
21
- return new _toolbox.Table(config);
22
- };
23
- exports.createTable = createTable;
24
-
25
- //# sourceMappingURL=table.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_toolbox","require","createTable","table","documentClient","tableConfig","name","process","env","DB_TABLE_HEADLESS_CMS","DB_TABLE","partitionKey","sortKey","DocumentClient","autoExecute","autoParse","config","Table","exports"],"sources":["table.ts"],"sourcesContent":["import type { TableModifier } from \"~/types\";\nimport type { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb\";\nimport type { TableConstructor } from \"@webiny/db-dynamodb/toolbox\";\nimport { Table } from \"@webiny/db-dynamodb/toolbox\";\n\nexport interface CreateTableParams {\n table?: TableModifier;\n documentClient: DynamoDBDocument;\n}\nexport const createTable = ({\n table,\n documentClient\n}: CreateTableParams): Table<string, string, string> => {\n const tableConfig: TableConstructor<string, string, string> = {\n name: process.env.DB_TABLE_HEADLESS_CMS || (process.env.DB_TABLE as string),\n partitionKey: \"PK\",\n sortKey: \"SK\",\n DocumentClient: documentClient,\n autoExecute: true,\n autoParse: true\n };\n\n const config = typeof table === \"function\" ? table(tableConfig) : tableConfig;\n\n return new Table(config);\n};\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAMO,MAAMC,WAAW,GAAGA,CAAC;EACxBC,KAAK;EACLC;AACe,CAAC,KAAoC;EACpD,MAAMC,WAAqD,GAAG;IAC1DC,IAAI,EAAEC,OAAO,CAACC,GAAG,CAACC,qBAAqB,IAAKF,OAAO,CAACC,GAAG,CAACE,QAAmB;IAC3EC,YAAY,EAAE,IAAI;IAClBC,OAAO,EAAE,IAAI;IACbC,cAAc,EAAET,cAAc;IAC9BU,WAAW,EAAE,IAAI;IACjBC,SAAS,EAAE;EACf,CAAC;EAED,MAAMC,MAAM,GAAG,OAAOb,KAAK,KAAK,UAAU,GAAGA,KAAK,CAACE,WAAW,CAAC,GAAGA,WAAW;EAE7E,OAAO,IAAIY,cAAK,CAACD,MAAM,CAAC;AAC5B,CAAC;AAACE,OAAA,CAAAhB,WAAA,GAAAA,WAAA","ignoreList":[]}
@@ -1,8 +0,0 @@
1
- import type { TableModifier } from "../types";
2
- import type { DynamoDBDocument } from "@webiny/aws-sdk/client-dynamodb";
3
- import { Table } from "@webiny/db-dynamodb/toolbox";
4
- export interface CreateElasticsearchTableParams {
5
- table?: TableModifier;
6
- documentClient: DynamoDBDocument;
7
- }
8
- export declare const createElasticsearchTable: ({ table, documentClient }: CreateElasticsearchTableParams) => Table<string, string, string>;
@@ -1,25 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createElasticsearchTable = void 0;
7
- var _toolbox = require("@webiny/db-dynamodb/toolbox");
8
- const createElasticsearchTable = ({
9
- table,
10
- documentClient
11
- }) => {
12
- const tableConfig = {
13
- name: process.env.DB_TABLE_ELASTICSEARCH,
14
- partitionKey: "PK",
15
- sortKey: "SK",
16
- DocumentClient: documentClient,
17
- autoExecute: true,
18
- autoParse: true
19
- };
20
- const config = typeof table === "function" ? table(tableConfig) : tableConfig;
21
- return new _toolbox.Table(config);
22
- };
23
- exports.createElasticsearchTable = createElasticsearchTable;
24
-
25
- //# sourceMappingURL=tableElasticsearch.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_toolbox","require","createElasticsearchTable","table","documentClient","tableConfig","name","process","env","DB_TABLE_ELASTICSEARCH","partitionKey","sortKey","DocumentClient","autoExecute","autoParse","config","Table","exports"],"sources":["tableElasticsearch.ts"],"sourcesContent":["import type { TableModifier } from \"~/types\";\nimport type { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb\";\nimport { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport type { TableConstructor } from \"@webiny/db-dynamodb/toolbox\";\n\nexport interface CreateElasticsearchTableParams {\n table?: TableModifier;\n documentClient: DynamoDBDocument;\n}\nexport const createElasticsearchTable = ({\n table,\n documentClient\n}: CreateElasticsearchTableParams): Table<string, string, string> => {\n const tableConfig: TableConstructor<string, string, string> = {\n name: process.env.DB_TABLE_ELASTICSEARCH as string,\n partitionKey: \"PK\",\n sortKey: \"SK\",\n DocumentClient: documentClient,\n autoExecute: true,\n autoParse: true\n };\n\n const config = typeof table === \"function\" ? table(tableConfig) : tableConfig;\n\n return new Table(config);\n};\n"],"mappings":";;;;;;AAEA,IAAAA,QAAA,GAAAC,OAAA;AAOO,MAAMC,wBAAwB,GAAGA,CAAC;EACrCC,KAAK;EACLC;AAC4B,CAAC,KAAoC;EACjE,MAAMC,WAAqD,GAAG;IAC1DC,IAAI,EAAEC,OAAO,CAACC,GAAG,CAACC,sBAAgC;IAClDC,YAAY,EAAE,IAAI;IAClBC,OAAO,EAAE,IAAI;IACbC,cAAc,EAAER,cAAc;IAC9BS,WAAW,EAAE,IAAI;IACjBC,SAAS,EAAE;EACf,CAAC;EAED,MAAMC,MAAM,GAAG,OAAOZ,KAAK,KAAK,UAAU,GAAGA,KAAK,CAACE,WAAW,CAAC,GAAGA,WAAW;EAE7E,OAAO,IAAIW,cAAK,CAACD,MAAM,CAAC;AAC5B,CAAC;AAACE,OAAA,CAAAf,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- declare const _default: () => import("@webiny/api-headless-cms").StorageTransformPlugin<any, any, import("@webiny/api-headless-cms/types").CmsModelField>[];
2
- export default _default;
3
- export declare const createDynamoDbPlugins: () => import("@webiny/api-headless-cms").StorageTransformPlugin<any, any, import("@webiny/api-headless-cms/types").CmsModelField>[];
package/dynamoDb/index.js DELETED
@@ -1,16 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.createDynamoDbPlugins = void 0;
7
- var _richText = require("./storage/richText");
8
- var _longText = require("./storage/longText");
9
- var _default = () => createDynamoDbPlugins();
10
- exports.default = _default;
11
- const createDynamoDbPlugins = () => {
12
- return [(0, _richText.createRichTextStorageTransformPlugin)(), (0, _longText.createLongTextStorageTransformPlugin)()];
13
- };
14
- exports.createDynamoDbPlugins = createDynamoDbPlugins;
15
-
16
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_richText","require","_longText","_default","createDynamoDbPlugins","exports","default","createRichTextStorageTransformPlugin","createLongTextStorageTransformPlugin"],"sources":["index.ts"],"sourcesContent":["import { createRichTextStorageTransformPlugin } from \"./storage/richText\";\nimport { createLongTextStorageTransformPlugin } from \"./storage/longText\";\n\nexport default () => createDynamoDbPlugins();\n\nexport const createDynamoDbPlugins = () => {\n return [createRichTextStorageTransformPlugin(), createLongTextStorageTransformPlugin()];\n};\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAA0E,IAAAE,QAAA,GAE3DA,CAAA,KAAMC,qBAAqB,CAAC,CAAC;AAAAC,OAAA,CAAAC,OAAA,GAAAH,QAAA;AAErC,MAAMC,qBAAqB,GAAGA,CAAA,KAAM;EACvC,OAAO,CAAC,IAAAG,8CAAoC,EAAC,CAAC,EAAE,IAAAC,8CAAoC,EAAC,CAAC,CAAC;AAC3F,CAAC;AAACH,OAAA,CAAAD,qBAAA,GAAAA,qBAAA","ignoreList":[]}
@@ -1,10 +0,0 @@
1
- /**
2
- * File is @internal
3
- */
4
- import { StorageTransformPlugin } from "@webiny/api-headless-cms";
5
- export interface StorageValue {
6
- compression: string;
7
- value: string;
8
- isArray?: boolean;
9
- }
10
- export declare const createLongTextStorageTransformPlugin: () => StorageTransformPlugin<string | string[], StorageValue, import("@webiny/api-headless-cms/types").CmsModelField>;
@@ -1,96 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.createLongTextStorageTransformPlugin = void 0;
8
- var _error = _interopRequireDefault(require("@webiny/error"));
9
- var _gzip = require("@webiny/utils/compression/gzip");
10
- var _apiHeadlessCms = require("@webiny/api-headless-cms");
11
- /**
12
- * File is @internal
13
- */
14
-
15
- const GZIP = "gzip";
16
- const TO_STORAGE_ENCODING = "base64";
17
- const FROM_STORAGE_ENCODING = "utf8";
18
- const convertToBuffer = value => {
19
- if (typeof value === "string") {
20
- return Buffer.from(value, TO_STORAGE_ENCODING);
21
- }
22
- return value;
23
- };
24
- const createLongTextStorageTransformPlugin = () => {
25
- const plugin = new _apiHeadlessCms.StorageTransformPlugin({
26
- name: "headless-cms.storage-transform.long-text.default",
27
- fieldType: "long-text",
28
- fromStorage: async ({
29
- field,
30
- value: storageValue
31
- }) => {
32
- const typeOf = typeof storageValue;
33
- if (!storageValue || typeOf === "string" || typeOf === "number" || Array.isArray(storageValue) === true) {
34
- return storageValue;
35
- } else if (typeOf !== "object") {
36
- throw new _error.default(`LongText value received in "fromStorage" function is not an object in field "${field.storageId}" - ${field.fieldId}.`);
37
- }
38
- const {
39
- compression,
40
- value,
41
- isArray
42
- } = storageValue;
43
- /**
44
- * Check if possibly undefined, null, empty...
45
- */
46
- if (!compression) {
47
- throw new _error.default(`Missing compression in "fromStorage" function in field "${field.storageId}" - ${field.fieldId}.": ${JSON.stringify(storageValue)}.`, "MISSING_COMPRESSION", {
48
- value: storageValue
49
- });
50
- } else if (compression !== GZIP) {
51
- throw new _error.default(`This plugin cannot transform something not compressed with "GZIP".`, "WRONG_COMPRESSION", {
52
- compression
53
- });
54
- }
55
- try {
56
- const buf = await (0, _gzip.decompress)(convertToBuffer(value));
57
- const result = buf.toString(FROM_STORAGE_ENCODING);
58
- if (!isArray) {
59
- return result;
60
- }
61
- return JSON.parse(result);
62
- } catch (ex) {
63
- console.log("Error while transforming long-text.");
64
- console.log(ex.message);
65
- return "";
66
- }
67
- },
68
- toStorage: async ({
69
- value: initialValue
70
- }) => {
71
- /**
72
- * There is a possibility that we are trying to compress already compressed value.
73
- */
74
- if (initialValue && initialValue.hasOwnProperty("compression") === true) {
75
- return initialValue;
76
- }
77
- const isArray = Array.isArray(initialValue);
78
- const value = isArray ? JSON.stringify(initialValue) : initialValue;
79
- const compressedValue = await (0, _gzip.compress)(value);
80
- const result = {
81
- compression: GZIP,
82
- value: compressedValue.toString(TO_STORAGE_ENCODING)
83
- };
84
- if (!isArray) {
85
- return result;
86
- }
87
- result.isArray = isArray;
88
- return result;
89
- }
90
- });
91
- plugin.name = plugin.name = `headless-cms.dynamodb.storageTransform.long-text`;
92
- return plugin;
93
- };
94
- exports.createLongTextStorageTransformPlugin = createLongTextStorageTransformPlugin;
95
-
96
- //# sourceMappingURL=longText.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_error","_interopRequireDefault","require","_gzip","_apiHeadlessCms","GZIP","TO_STORAGE_ENCODING","FROM_STORAGE_ENCODING","convertToBuffer","value","Buffer","from","createLongTextStorageTransformPlugin","plugin","StorageTransformPlugin","name","fieldType","fromStorage","field","storageValue","typeOf","Array","isArray","WebinyError","storageId","fieldId","compression","JSON","stringify","buf","ungzip","result","toString","parse","ex","console","log","message","toStorage","initialValue","hasOwnProperty","compressedValue","gzip","exports"],"sources":["longText.ts"],"sourcesContent":["/**\n * File is @internal\n */\n\nimport WebinyError from \"@webiny/error\";\nimport { compress as gzip, decompress as ungzip } from \"@webiny/utils/compression/gzip\";\nimport { StorageTransformPlugin } from \"@webiny/api-headless-cms\";\n\nconst GZIP = \"gzip\";\nconst TO_STORAGE_ENCODING = \"base64\";\nconst FROM_STORAGE_ENCODING = \"utf8\";\n\nconst convertToBuffer = (value: string | Buffer): Buffer => {\n if (typeof value === \"string\") {\n return Buffer.from(value, TO_STORAGE_ENCODING);\n }\n return value;\n};\n\nexport interface StorageValue {\n compression: string;\n value: string;\n isArray?: boolean;\n}\n\nexport const createLongTextStorageTransformPlugin = () => {\n const plugin = new StorageTransformPlugin<string | string[], StorageValue>({\n name: \"headless-cms.storage-transform.long-text.default\",\n fieldType: \"long-text\",\n fromStorage: async ({ field, value: storageValue }) => {\n const typeOf = typeof storageValue;\n if (\n !storageValue ||\n typeOf === \"string\" ||\n typeOf === \"number\" ||\n Array.isArray(storageValue) === true\n ) {\n return storageValue as unknown as string | string[];\n } else if (typeOf !== \"object\") {\n throw new WebinyError(\n `LongText value received in \"fromStorage\" function is not an object in field \"${field.storageId}\" - ${field.fieldId}.`\n );\n }\n const { compression, value, isArray } = storageValue;\n /**\n * Check if possibly undefined, null, empty...\n */\n if (!compression) {\n throw new WebinyError(\n `Missing compression in \"fromStorage\" function in field \"${\n field.storageId\n }\" - ${field.fieldId}.\": ${JSON.stringify(storageValue)}.`,\n \"MISSING_COMPRESSION\",\n {\n value: storageValue\n }\n );\n } else if (compression !== GZIP) {\n throw new WebinyError(\n `This plugin cannot transform something not compressed with \"GZIP\".`,\n \"WRONG_COMPRESSION\",\n {\n compression\n }\n );\n }\n try {\n const buf = await ungzip(convertToBuffer(value));\n const result = buf.toString(FROM_STORAGE_ENCODING);\n if (!isArray) {\n return result;\n }\n return JSON.parse(result);\n } catch (ex) {\n console.log(\"Error while transforming long-text.\");\n console.log(ex.message);\n return \"\";\n }\n },\n toStorage: async ({ value: initialValue }) => {\n /**\n * There is a possibility that we are trying to compress already compressed value.\n */\n if (initialValue && initialValue.hasOwnProperty(\"compression\") === true) {\n return initialValue as unknown as StorageValue;\n }\n const isArray = Array.isArray(initialValue);\n const value = isArray ? JSON.stringify(initialValue) : initialValue;\n const compressedValue = await gzip(value);\n\n const result: StorageValue = {\n compression: GZIP,\n value: compressedValue.toString(TO_STORAGE_ENCODING)\n };\n if (!isArray) {\n return result;\n }\n result.isArray = isArray;\n return result;\n }\n });\n plugin.name = plugin.name = `headless-cms.dynamodb.storageTransform.long-text`;\n\n return plugin;\n};\n"],"mappings":";;;;;;;AAIA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AANA;AACA;AACA;;AAMA,MAAMG,IAAI,GAAG,MAAM;AACnB,MAAMC,mBAAmB,GAAG,QAAQ;AACpC,MAAMC,qBAAqB,GAAG,MAAM;AAEpC,MAAMC,eAAe,GAAIC,KAAsB,IAAa;EACxD,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;IAC3B,OAAOC,MAAM,CAACC,IAAI,CAACF,KAAK,EAAEH,mBAAmB,CAAC;EAClD;EACA,OAAOG,KAAK;AAChB,CAAC;AAQM,MAAMG,oCAAoC,GAAGA,CAAA,KAAM;EACtD,MAAMC,MAAM,GAAG,IAAIC,sCAAsB,CAAkC;IACvEC,IAAI,EAAE,kDAAkD;IACxDC,SAAS,EAAE,WAAW;IACtBC,WAAW,EAAE,MAAAA,CAAO;MAAEC,KAAK;MAAET,KAAK,EAAEU;IAAa,CAAC,KAAK;MACnD,MAAMC,MAAM,GAAG,OAAOD,YAAY;MAClC,IACI,CAACA,YAAY,IACbC,MAAM,KAAK,QAAQ,IACnBA,MAAM,KAAK,QAAQ,IACnBC,KAAK,CAACC,OAAO,CAACH,YAAY,CAAC,KAAK,IAAI,EACtC;QACE,OAAOA,YAAY;MACvB,CAAC,MAAM,IAAIC,MAAM,KAAK,QAAQ,EAAE;QAC5B,MAAM,IAAIG,cAAW,CACjB,gFAAgFL,KAAK,CAACM,SAAS,OAAON,KAAK,CAACO,OAAO,GACvH,CAAC;MACL;MACA,MAAM;QAAEC,WAAW;QAAEjB,KAAK;QAAEa;MAAQ,CAAC,GAAGH,YAAY;MACpD;AACZ;AACA;MACY,IAAI,CAACO,WAAW,EAAE;QACd,MAAM,IAAIH,cAAW,CACjB,2DACIL,KAAK,CAACM,SAAS,OACZN,KAAK,CAACO,OAAO,OAAOE,IAAI,CAACC,SAAS,CAACT,YAAY,CAAC,GAAG,EAC1D,qBAAqB,EACrB;UACIV,KAAK,EAAEU;QACX,CACJ,CAAC;MACL,CAAC,MAAM,IAAIO,WAAW,KAAKrB,IAAI,EAAE;QAC7B,MAAM,IAAIkB,cAAW,CACjB,oEAAoE,EACpE,mBAAmB,EACnB;UACIG;QACJ,CACJ,CAAC;MACL;MACA,IAAI;QACA,MAAMG,GAAG,GAAG,MAAM,IAAAC,gBAAM,EAACtB,eAAe,CAACC,KAAK,CAAC,CAAC;QAChD,MAAMsB,MAAM,GAAGF,GAAG,CAACG,QAAQ,CAACzB,qBAAqB,CAAC;QAClD,IAAI,CAACe,OAAO,EAAE;UACV,OAAOS,MAAM;QACjB;QACA,OAAOJ,IAAI,CAACM,KAAK,CAACF,MAAM,CAAC;MAC7B,CAAC,CAAC,OAAOG,EAAE,EAAE;QACTC,OAAO,CAACC,GAAG,CAAC,qCAAqC,CAAC;QAClDD,OAAO,CAACC,GAAG,CAACF,EAAE,CAACG,OAAO,CAAC;QACvB,OAAO,EAAE;MACb;IACJ,CAAC;IACDC,SAAS,EAAE,MAAAA,CAAO;MAAE7B,KAAK,EAAE8B;IAAa,CAAC,KAAK;MAC1C;AACZ;AACA;MACY,IAAIA,YAAY,IAAIA,YAAY,CAACC,cAAc,CAAC,aAAa,CAAC,KAAK,IAAI,EAAE;QACrE,OAAOD,YAAY;MACvB;MACA,MAAMjB,OAAO,GAAGD,KAAK,CAACC,OAAO,CAACiB,YAAY,CAAC;MAC3C,MAAM9B,KAAK,GAAGa,OAAO,GAAGK,IAAI,CAACC,SAAS,CAACW,YAAY,CAAC,GAAGA,YAAY;MACnE,MAAME,eAAe,GAAG,MAAM,IAAAC,cAAI,EAACjC,KAAK,CAAC;MAEzC,MAAMsB,MAAoB,GAAG;QACzBL,WAAW,EAAErB,IAAI;QACjBI,KAAK,EAAEgC,eAAe,CAACT,QAAQ,CAAC1B,mBAAmB;MACvD,CAAC;MACD,IAAI,CAACgB,OAAO,EAAE;QACV,OAAOS,MAAM;MACjB;MACAA,MAAM,CAACT,OAAO,GAAGA,OAAO;MACxB,OAAOS,MAAM;IACjB;EACJ,CAAC,CAAC;EACFlB,MAAM,CAACE,IAAI,GAAGF,MAAM,CAACE,IAAI,GAAG,kDAAkD;EAE9E,OAAOF,MAAM;AACjB,CAAC;AAAC8B,OAAA,CAAA/B,oCAAA,GAAAA,oCAAA","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import { StorageTransformPlugin } from "@webiny/api-headless-cms";
2
- export declare const createRichTextStorageTransformPlugin: () => StorageTransformPlugin<any, any, import("@webiny/api-headless-cms/types").CmsModelField>;
@@ -1,59 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.createRichTextStorageTransformPlugin = void 0;
8
- var _error = _interopRequireDefault(require("@webiny/error"));
9
- var _apiHeadlessCms = require("@webiny/api-headless-cms");
10
- var _api = require("@webiny/api");
11
- const createRichTextStorageTransformPlugin = () => {
12
- const plugin = new _apiHeadlessCms.StorageTransformPlugin({
13
- name: "headless-cms.storage-transform.rich-text.default",
14
- fieldType: "rich-text",
15
- fromStorage: async ({
16
- field,
17
- value: storageValue,
18
- plugins
19
- }) => {
20
- if (!storageValue) {
21
- return storageValue;
22
- } else if (typeof storageValue !== "object") {
23
- throw new _error.default(`RichText value received in "fromStorage" function is not an object in field "${field.storageId}" - ${field.fieldId}.`);
24
- }
25
- let compressor;
26
- try {
27
- compressor = plugins.oneByType(_api.CompressorPlugin.type);
28
- } catch (ex) {
29
- return storageValue;
30
- }
31
- try {
32
- return await compressor.getCompressor().decompress(storageValue);
33
- } catch {
34
- return storageValue;
35
- }
36
- },
37
- toStorage: async ({
38
- value,
39
- plugins
40
- }) => {
41
- let compressor;
42
- try {
43
- compressor = plugins.oneByType(_api.CompressorPlugin.type);
44
- } catch (ex) {
45
- return value;
46
- }
47
- try {
48
- return await compressor.getCompressor().compress(value);
49
- } catch {
50
- return value;
51
- }
52
- }
53
- });
54
- plugin.name = `headless-cms.dynamodb.storageTransform.rich-text`;
55
- return plugin;
56
- };
57
- exports.createRichTextStorageTransformPlugin = createRichTextStorageTransformPlugin;
58
-
59
- //# sourceMappingURL=richText.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_error","_interopRequireDefault","require","_apiHeadlessCms","_api","createRichTextStorageTransformPlugin","plugin","StorageTransformPlugin","name","fieldType","fromStorage","field","value","storageValue","plugins","WebinyError","storageId","fieldId","compressor","oneByType","CompressorPlugin","type","ex","getCompressor","decompress","toStorage","compress","exports"],"sources":["richText.ts"],"sourcesContent":["import WebinyError from \"@webiny/error\";\nimport { StorageTransformPlugin } from \"@webiny/api-headless-cms\";\nimport { CompressorPlugin } from \"@webiny/api\";\n\nexport const createRichTextStorageTransformPlugin = () => {\n const plugin = new StorageTransformPlugin({\n name: \"headless-cms.storage-transform.rich-text.default\",\n fieldType: \"rich-text\",\n fromStorage: async ({ field, value: storageValue, plugins }) => {\n if (!storageValue) {\n return storageValue;\n } else if (typeof storageValue !== \"object\") {\n throw new WebinyError(\n `RichText value received in \"fromStorage\" function is not an object in field \"${field.storageId}\" - ${field.fieldId}.`\n );\n }\n\n let compressor: CompressorPlugin;\n\n try {\n compressor = plugins.oneByType<CompressorPlugin>(CompressorPlugin.type);\n } catch (ex) {\n return storageValue;\n }\n\n try {\n return await compressor.getCompressor().decompress(storageValue);\n } catch {\n return storageValue;\n }\n },\n toStorage: async ({ value, plugins }) => {\n let compressor: CompressorPlugin;\n\n try {\n compressor = plugins.oneByType<CompressorPlugin>(CompressorPlugin.type);\n } catch (ex) {\n return value;\n }\n try {\n return await compressor.getCompressor().compress(value);\n } catch {\n return value;\n }\n }\n });\n plugin.name = `headless-cms.dynamodb.storageTransform.rich-text`;\n\n return plugin;\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,IAAA,GAAAF,OAAA;AAEO,MAAMG,oCAAoC,GAAGA,CAAA,KAAM;EACtD,MAAMC,MAAM,GAAG,IAAIC,sCAAsB,CAAC;IACtCC,IAAI,EAAE,kDAAkD;IACxDC,SAAS,EAAE,WAAW;IACtBC,WAAW,EAAE,MAAAA,CAAO;MAAEC,KAAK;MAAEC,KAAK,EAAEC,YAAY;MAAEC;IAAQ,CAAC,KAAK;MAC5D,IAAI,CAACD,YAAY,EAAE;QACf,OAAOA,YAAY;MACvB,CAAC,MAAM,IAAI,OAAOA,YAAY,KAAK,QAAQ,EAAE;QACzC,MAAM,IAAIE,cAAW,CACjB,gFAAgFJ,KAAK,CAACK,SAAS,OAAOL,KAAK,CAACM,OAAO,GACvH,CAAC;MACL;MAEA,IAAIC,UAA4B;MAEhC,IAAI;QACAA,UAAU,GAAGJ,OAAO,CAACK,SAAS,CAAmBC,qBAAgB,CAACC,IAAI,CAAC;MAC3E,CAAC,CAAC,OAAOC,EAAE,EAAE;QACT,OAAOT,YAAY;MACvB;MAEA,IAAI;QACA,OAAO,MAAMK,UAAU,CAACK,aAAa,CAAC,CAAC,CAACC,UAAU,CAACX,YAAY,CAAC;MACpE,CAAC,CAAC,MAAM;QACJ,OAAOA,YAAY;MACvB;IACJ,CAAC;IACDY,SAAS,EAAE,MAAAA,CAAO;MAAEb,KAAK;MAAEE;IAAQ,CAAC,KAAK;MACrC,IAAII,UAA4B;MAEhC,IAAI;QACAA,UAAU,GAAGJ,OAAO,CAACK,SAAS,CAAmBC,qBAAgB,CAACC,IAAI,CAAC;MAC3E,CAAC,CAAC,OAAOC,EAAE,EAAE;QACT,OAAOV,KAAK;MAChB;MACA,IAAI;QACA,OAAO,MAAMM,UAAU,CAACK,aAAa,CAAC,CAAC,CAACG,QAAQ,CAACd,KAAK,CAAC;MAC3D,CAAC,CAAC,MAAM;QACJ,OAAOA,KAAK;MAChB;IACJ;EACJ,CAAC,CAAC;EACFN,MAAM,CAACE,IAAI,GAAG,kDAAkD;EAEhE,OAAOF,MAAM;AACjB,CAAC;AAACqB,OAAA,CAAAtB,oCAAA,GAAAA,oCAAA","ignoreList":[]}
@@ -1,9 +0,0 @@
1
- import type { Client } from "@elastic/elasticsearch";
2
- import type { PluginsContainer } from "@webiny/plugins";
3
- import type { CmsModel } from "@webiny/api-headless-cms/types";
4
- export interface CreateElasticsearchIndexParams {
5
- client: Client;
6
- plugins: PluginsContainer;
7
- model: CmsModel;
8
- }
9
- export declare const createElasticsearchIndex: (params: CreateElasticsearchIndexParams) => Promise<void>;
@@ -1,40 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createElasticsearchIndex = void 0;
7
- var _CmsEntryElasticsearchIndexPlugin = require("../plugins/CmsEntryElasticsearchIndexPlugin");
8
- var _apiElasticsearch = require("@webiny/api-elasticsearch");
9
- var _configurations = require("../configurations");
10
- const createElasticsearchIndex = async params => {
11
- const {
12
- client,
13
- plugins,
14
- model
15
- } = params;
16
- const {
17
- index
18
- } = _configurations.configurations.es({
19
- model
20
- });
21
- await (0, _apiElasticsearch.createIndex)({
22
- client,
23
- index,
24
- type: _CmsEntryElasticsearchIndexPlugin.CmsEntryElasticsearchIndexPlugin.type,
25
- tenant: model.tenant,
26
- locale: model.locale,
27
- plugins,
28
- onExists: () => {
29
- console.log(`Elasticsearch index "${index}" for the CMS model "${model.name}" already exists.`);
30
- },
31
- onError: ex => {
32
- console.error(`Could not create Elasticsearch index "${index}" for the CMS model "${model.name}".`);
33
- console.error(ex);
34
- return ex;
35
- }
36
- });
37
- };
38
- exports.createElasticsearchIndex = createElasticsearchIndex;
39
-
40
- //# sourceMappingURL=createElasticsearchIndex.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_CmsEntryElasticsearchIndexPlugin","require","_apiElasticsearch","_configurations","createElasticsearchIndex","params","client","plugins","model","index","configurations","es","createIndex","type","CmsEntryElasticsearchIndexPlugin","tenant","locale","onExists","console","log","name","onError","ex","error","exports"],"sources":["createElasticsearchIndex.ts"],"sourcesContent":["import type { Client } from \"@elastic/elasticsearch\";\nimport type { PluginsContainer } from \"@webiny/plugins\";\nimport { CmsEntryElasticsearchIndexPlugin } from \"~/plugins/CmsEntryElasticsearchIndexPlugin\";\nimport { createIndex } from \"@webiny/api-elasticsearch\";\nimport { configurations } from \"~/configurations\";\nimport type { CmsModel } from \"@webiny/api-headless-cms/types\";\n\nexport interface CreateElasticsearchIndexParams {\n client: Client;\n plugins: PluginsContainer;\n model: CmsModel;\n}\n\nexport const createElasticsearchIndex = async (params: CreateElasticsearchIndexParams) => {\n const { client, plugins, model } = params;\n\n const { index } = configurations.es({\n model\n });\n\n await createIndex({\n client,\n index,\n type: CmsEntryElasticsearchIndexPlugin.type,\n tenant: model.tenant,\n locale: model.locale,\n plugins,\n onExists: () => {\n console.log(\n `Elasticsearch index \"${index}\" for the CMS model \"${model.name}\" already exists.`\n );\n },\n onError: ex => {\n console.error(\n `Could not create Elasticsearch index \"${index}\" for the CMS model \"${model.name}\".`\n );\n console.error(ex);\n return ex;\n }\n });\n};\n"],"mappings":";;;;;;AAEA,IAAAA,iCAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AASO,MAAMG,wBAAwB,GAAG,MAAOC,MAAsC,IAAK;EACtF,MAAM;IAAEC,MAAM;IAAEC,OAAO;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAEzC,MAAM;IAAEI;EAAM,CAAC,GAAGC,8BAAc,CAACC,EAAE,CAAC;IAChCH;EACJ,CAAC,CAAC;EAEF,MAAM,IAAAI,6BAAW,EAAC;IACdN,MAAM;IACNG,KAAK;IACLI,IAAI,EAAEC,kEAAgC,CAACD,IAAI;IAC3CE,MAAM,EAAEP,KAAK,CAACO,MAAM;IACpBC,MAAM,EAAER,KAAK,CAACQ,MAAM;IACpBT,OAAO;IACPU,QAAQ,EAAEA,CAAA,KAAM;MACZC,OAAO,CAACC,GAAG,CACP,wBAAwBV,KAAK,wBAAwBD,KAAK,CAACY,IAAI,mBACnE,CAAC;IACL,CAAC;IACDC,OAAO,EAAEC,EAAE,IAAI;MACXJ,OAAO,CAACK,KAAK,CACT,yCAAyCd,KAAK,wBAAwBD,KAAK,CAACY,IAAI,IACpF,CAAC;MACDF,OAAO,CAACK,KAAK,CAACD,EAAE,CAAC;MACjB,OAAOA,EAAE;IACb;EACJ,CAAC,CAAC;AACN,CAAC;AAACE,OAAA,CAAApB,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -1,8 +0,0 @@
1
- import type { Client } from "@elastic/elasticsearch";
2
- import type { CmsModel } from "@webiny/api-headless-cms/types";
3
- interface DeleteElasticsearchIndexParams {
4
- client: Client;
5
- model: CmsModel;
6
- }
7
- export declare const deleteElasticsearchIndex: (params: DeleteElasticsearchIndexParams) => Promise<void>;
8
- export {};
@@ -1,38 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.deleteElasticsearchIndex = void 0;
7
- var _configurations = require("../configurations");
8
- const deleteElasticsearchIndex = async params => {
9
- const {
10
- client,
11
- model
12
- } = params;
13
- const {
14
- index
15
- } = _configurations.configurations.es({
16
- model
17
- });
18
- const {
19
- body: exists
20
- } = await client.indices.exists({
21
- index
22
- });
23
- if (!exists) {
24
- return;
25
- }
26
- try {
27
- await client.indices.delete({
28
- index,
29
- ignore_unavailable: true
30
- });
31
- } catch (ex) {
32
- console.log(`Could not delete Elasticsearch index "${index}". Please do it manually.`);
33
- console.log(ex.message);
34
- }
35
- };
36
- exports.deleteElasticsearchIndex = deleteElasticsearchIndex;
37
-
38
- //# sourceMappingURL=deleteElasticsearchIndex.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_configurations","require","deleteElasticsearchIndex","params","client","model","index","configurations","es","body","exists","indices","delete","ignore_unavailable","ex","console","log","message","exports"],"sources":["deleteElasticsearchIndex.ts"],"sourcesContent":["import type { Client } from \"@elastic/elasticsearch\";\nimport type { CmsModel } from \"@webiny/api-headless-cms/types\";\nimport { configurations } from \"~/configurations\";\n\ninterface DeleteElasticsearchIndexParams {\n client: Client;\n model: CmsModel;\n}\n\nexport const deleteElasticsearchIndex = async (\n params: DeleteElasticsearchIndexParams\n): Promise<void> => {\n const { client, model } = params;\n\n const { index } = configurations.es({\n model\n });\n const { body: exists } = await client.indices.exists({\n index\n });\n if (!exists) {\n return;\n }\n\n try {\n await client.indices.delete({\n index,\n ignore_unavailable: true\n });\n } catch (ex) {\n console.log(`Could not delete Elasticsearch index \"${index}\". Please do it manually.`);\n console.log(ex.message);\n }\n};\n"],"mappings":";;;;;;AAEA,IAAAA,eAAA,GAAAC,OAAA;AAOO,MAAMC,wBAAwB,GAAG,MACpCC,MAAsC,IACtB;EAChB,MAAM;IAAEC,MAAM;IAAEC;EAAM,CAAC,GAAGF,MAAM;EAEhC,MAAM;IAAEG;EAAM,CAAC,GAAGC,8BAAc,CAACC,EAAE,CAAC;IAChCH;EACJ,CAAC,CAAC;EACF,MAAM;IAAEI,IAAI,EAAEC;EAAO,CAAC,GAAG,MAAMN,MAAM,CAACO,OAAO,CAACD,MAAM,CAAC;IACjDJ;EACJ,CAAC,CAAC;EACF,IAAI,CAACI,MAAM,EAAE;IACT;EACJ;EAEA,IAAI;IACA,MAAMN,MAAM,CAACO,OAAO,CAACC,MAAM,CAAC;MACxBN,KAAK;MACLO,kBAAkB,EAAE;IACxB,CAAC,CAAC;EACN,CAAC,CAAC,OAAOC,EAAE,EAAE;IACTC,OAAO,CAACC,GAAG,CAAC,yCAAyCV,KAAK,2BAA2B,CAAC;IACtFS,OAAO,CAACC,GAAG,CAACF,EAAE,CAACG,OAAO,CAAC;EAC3B;AACJ,CAAC;AAACC,OAAA,CAAAhB,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- declare const _default: () => (import("../types").CmsModelFieldToElasticsearchPlugin[] | import("..").CmsEntryElasticsearchQueryBuilderValueSearchPlugin[])[];
2
- export default _default;
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _indexing = _interopRequireDefault(require("./indexing"));
9
- var _search = _interopRequireDefault(require("./search"));
10
- var _default = () => [(0, _indexing.default)(), (0, _search.default)()];
11
- exports.default = _default;
12
-
13
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_indexing","_interopRequireDefault","require","_search","_default","elasticsearchIndexingPlugins","elasticsearchSearchPlugins","exports","default"],"sources":["index.ts"],"sourcesContent":["import elasticsearchIndexingPlugins from \"./indexing\";\nimport elasticsearchSearchPlugins from \"./search\";\n\nexport default () => [elasticsearchIndexingPlugins(), elasticsearchSearchPlugins()];\n"],"mappings":";;;;;;;AAAA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAkD,IAAAE,QAAA,GAEnCA,CAAA,KAAM,CAAC,IAAAC,iBAA4B,EAAC,CAAC,EAAE,IAAAC,eAA0B,EAAC,CAAC,CAAC;AAAAC,OAAA,CAAAC,OAAA,GAAAJ,QAAA","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- import type { CmsModelFieldToElasticsearchPlugin } from "../../types";
2
- declare const _default: () => CmsModelFieldToElasticsearchPlugin;
3
- export default _default;