@webiny/api-headless-cms-ddb-es 5.37.8 → 5.38.0-beta.0

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 (123) hide show
  1. package/configurations.js +3 -1
  2. package/definitions/entry.js +3 -1
  3. package/definitions/entryElasticsearch.js +3 -1
  4. package/definitions/group.js +3 -1
  5. package/definitions/model.js +3 -1
  6. package/definitions/system.js +3 -1
  7. package/definitions/table.js +3 -1
  8. package/definitions/tableElasticsearch.js +3 -1
  9. package/dynamoDb/index.js +3 -1
  10. package/dynamoDb/storage/date.js +3 -1
  11. package/dynamoDb/storage/longText.js +3 -1
  12. package/dynamoDb/storage/richText.js +3 -1
  13. package/elasticsearch/createElasticsearchIndex.d.ts +1 -1
  14. package/elasticsearch/createElasticsearchIndex.js +19 -29
  15. package/elasticsearch/createElasticsearchIndex.js.map +1 -1
  16. package/elasticsearch/deleteElasticsearchIndex.d.ts +1 -1
  17. package/elasticsearch/deleteElasticsearchIndex.js +6 -4
  18. package/elasticsearch/deleteElasticsearchIndex.js.map +1 -1
  19. package/elasticsearch/index.js +3 -1
  20. package/elasticsearch/indexing/dateTimeIndexing.js +3 -1
  21. package/elasticsearch/indexing/defaultFieldIndexing.js +3 -1
  22. package/elasticsearch/indexing/index.js +3 -1
  23. package/elasticsearch/indexing/longTextIndexing.js +3 -1
  24. package/elasticsearch/indexing/numberIndexing.js +3 -1
  25. package/elasticsearch/indexing/objectIndexing.js +3 -1
  26. package/elasticsearch/indexing/richTextIndexing.js +3 -1
  27. package/elasticsearch/indices/base.js +3 -1
  28. package/elasticsearch/indices/index.js +3 -1
  29. package/elasticsearch/indices/japanese.js +3 -1
  30. package/elasticsearch/search/index.js +3 -1
  31. package/elasticsearch/search/refSearch.js +3 -1
  32. package/elasticsearch/search/timeSearch.js +3 -1
  33. package/helpers/entryIndexHelpers.js +3 -1
  34. package/helpers/fieldIdentifier.js +3 -1
  35. package/helpers/index.js +3 -1
  36. package/index.js +14 -16
  37. package/index.js.map +1 -1
  38. package/operations/entry/dataLoader/DataLoaderCache.js +3 -1
  39. package/operations/entry/dataLoader/constants.js +3 -1
  40. package/operations/entry/dataLoader/createBatchScheduleFn.js +3 -1
  41. package/operations/entry/dataLoader/getAllEntryRevisions.js +3 -1
  42. package/operations/entry/dataLoader/getLatestRevisionByEntryId.js +3 -1
  43. package/operations/entry/dataLoader/getPublishedRevisionByEntryId.js +3 -1
  44. package/operations/entry/dataLoader/getRevisionById.js +3 -1
  45. package/operations/entry/dataLoader/index.js +3 -1
  46. package/operations/entry/dataLoader/types.js +3 -1
  47. package/operations/entry/dataLoaders.js +3 -1
  48. package/operations/entry/elasticsearch/assignMinimumShouldMatchToQuery.js +3 -1
  49. package/operations/entry/elasticsearch/body.js +3 -1
  50. package/operations/entry/elasticsearch/fields.js +3 -1
  51. package/operations/entry/elasticsearch/filtering/applyFiltering.js +3 -1
  52. package/operations/entry/elasticsearch/filtering/exec.js +3 -1
  53. package/operations/entry/elasticsearch/filtering/index.js +3 -1
  54. package/operations/entry/elasticsearch/filtering/path.js +3 -1
  55. package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js +3 -1
  56. package/operations/entry/elasticsearch/filtering/plugins/index.js +3 -1
  57. package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js +3 -1
  58. package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js +3 -1
  59. package/operations/entry/elasticsearch/filtering/populated.js +3 -1
  60. package/operations/entry/elasticsearch/filtering/values.js +3 -1
  61. package/operations/entry/elasticsearch/fullTextSearch.js +3 -1
  62. package/operations/entry/elasticsearch/fullTextSearchFields.js +3 -1
  63. package/operations/entry/elasticsearch/initialQuery.js +3 -1
  64. package/operations/entry/elasticsearch/keyword.js +3 -1
  65. package/operations/entry/elasticsearch/plugins/bodyModifier.js +3 -1
  66. package/operations/entry/elasticsearch/plugins/operator.js +3 -1
  67. package/operations/entry/elasticsearch/plugins/queryModifier.js +3 -1
  68. package/operations/entry/elasticsearch/plugins/search.js +3 -1
  69. package/operations/entry/elasticsearch/plugins/sortModifier.js +3 -1
  70. package/operations/entry/elasticsearch/sort.js +3 -1
  71. package/operations/entry/elasticsearch/transformValueForSearch.js +3 -1
  72. package/operations/entry/elasticsearch/types.js +3 -1
  73. package/operations/entry/index.d.ts +0 -3
  74. package/operations/entry/index.js +80 -176
  75. package/operations/entry/index.js.map +1 -1
  76. package/operations/entry/keys.js +3 -1
  77. package/operations/entry/recordType.js +3 -1
  78. package/operations/entry/transformations/convertEntryKeys.d.ts +8 -0
  79. package/operations/entry/transformations/convertEntryKeys.js +38 -0
  80. package/operations/entry/transformations/convertEntryKeys.js.map +1 -0
  81. package/operations/entry/transformations/index.d.ts +29 -0
  82. package/operations/entry/transformations/index.js +126 -0
  83. package/operations/entry/transformations/index.js.map +1 -0
  84. package/operations/entry/transformations/modifyEntryValues.d.ts +32 -0
  85. package/operations/entry/transformations/modifyEntryValues.js +29 -0
  86. package/operations/entry/transformations/modifyEntryValues.js.map +1 -0
  87. package/operations/entry/transformations/transformEntryKeys.d.ts +11 -0
  88. package/operations/entry/transformations/transformEntryKeys.js +27 -0
  89. package/operations/entry/transformations/transformEntryKeys.js.map +1 -0
  90. package/operations/entry/transformations/transformEntryToIndex.d.ts +10 -0
  91. package/operations/entry/transformations/transformEntryToIndex.js +33 -0
  92. package/operations/entry/transformations/transformEntryToIndex.js.map +1 -0
  93. package/operations/group/index.js +5 -3
  94. package/operations/group/index.js.map +1 -1
  95. package/operations/model/index.js +3 -1
  96. package/operations/system/index.js +3 -1
  97. package/operations/system/indexes.d.ts +10 -0
  98. package/operations/system/indexes.js +42 -0
  99. package/operations/system/indexes.js.map +1 -0
  100. package/package.json +19 -18
  101. package/plugins/CmsElasticsearchModelFieldPlugin.js +3 -1
  102. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js +3 -1
  103. package/plugins/CmsEntryElasticsearchFullTextSearchPlugin.js +3 -1
  104. package/plugins/CmsEntryElasticsearchIndexPlugin.js +3 -1
  105. package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js +3 -1
  106. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js +3 -1
  107. package/plugins/CmsEntryElasticsearchSortModifierPlugin.js +3 -1
  108. package/plugins/CmsEntryElasticsearchValuesModifier.d.ts +33 -0
  109. package/plugins/CmsEntryElasticsearchValuesModifier.js +54 -0
  110. package/plugins/CmsEntryElasticsearchValuesModifier.js.map +1 -0
  111. package/plugins/CmsEntryFilterPlugin.js +3 -1
  112. package/plugins/index.d.ts +1 -0
  113. package/plugins/index.js +14 -1
  114. package/plugins/index.js.map +1 -1
  115. package/types.d.ts +1 -2
  116. package/types.js +3 -2
  117. package/types.js.map +1 -1
  118. package/definitions/settings.d.ts +0 -8
  119. package/definitions/settings.js +0 -53
  120. package/definitions/settings.js.map +0 -1
  121. package/operations/settings/index.d.ts +0 -6
  122. package/operations/settings/index.js +0 -111
  123. package/operations/settings/index.js.map +0 -1
@@ -20,4 +20,6 @@ const createBatchScheduleFn = () => {
20
20
  setTimeout(callback, _constants.CMS_ENTRY_BATCH_SCHEDULE_WAIT);
21
21
  };
22
22
  };
23
- exports.createBatchScheduleFn = createBatchScheduleFn;
23
+ exports.createBatchScheduleFn = createBatchScheduleFn;
24
+
25
+ //# sourceMappingURL=createBatchScheduleFn.js.map
@@ -40,4 +40,6 @@ const createGetAllEntryRevisions = params => {
40
40
  batchScheduleFn: (0, _createBatchScheduleFn.createBatchScheduleFn)()
41
41
  });
42
42
  };
43
- exports.createGetAllEntryRevisions = createGetAllEntryRevisions;
43
+ exports.createGetAllEntryRevisions = createGetAllEntryRevisions;
44
+
45
+ //# sourceMappingURL=getAllEntryRevisions.js.map
@@ -50,4 +50,6 @@ const createGetLatestRevisionByEntryId = params => {
50
50
  batchScheduleFn: (0, _createBatchScheduleFn.createBatchScheduleFn)()
51
51
  });
52
52
  };
53
- exports.createGetLatestRevisionByEntryId = createGetLatestRevisionByEntryId;
53
+ exports.createGetLatestRevisionByEntryId = createGetLatestRevisionByEntryId;
54
+
55
+ //# sourceMappingURL=getLatestRevisionByEntryId.js.map
@@ -50,4 +50,6 @@ const createGetPublishedRevisionByEntryId = params => {
50
50
  batchScheduleFn: (0, _createBatchScheduleFn.createBatchScheduleFn)()
51
51
  });
52
52
  };
53
- exports.createGetPublishedRevisionByEntryId = createGetPublishedRevisionByEntryId;
53
+ exports.createGetPublishedRevisionByEntryId = createGetPublishedRevisionByEntryId;
54
+
55
+ //# sourceMappingURL=getPublishedRevisionByEntryId.js.map
@@ -60,4 +60,6 @@ const createGetRevisionById = params => {
60
60
  batchScheduleFn: (0, _createBatchScheduleFn.createBatchScheduleFn)()
61
61
  });
62
62
  };
63
- exports.createGetRevisionById = createGetRevisionById;
63
+ exports.createGetRevisionById = createGetRevisionById;
64
+
65
+ //# sourceMappingURL=getRevisionById.js.map
@@ -35,4 +35,6 @@ const getDataLoaderFactory = name => {
35
35
  }
36
36
  return dataLoaders[name];
37
37
  };
38
- exports.getDataLoaderFactory = getDataLoaderFactory;
38
+ exports.getDataLoaderFactory = getDataLoaderFactory;
39
+
40
+ //# sourceMappingURL=index.js.map
@@ -2,4 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
- });
5
+ });
6
+
7
+ //# sourceMappingURL=types.js.map
@@ -112,4 +112,6 @@ class DataLoadersHandler {
112
112
  this.cache.clearAll(params === null || params === void 0 ? void 0 : params.model);
113
113
  }
114
114
  }
115
- exports.DataLoadersHandler = DataLoadersHandler;
115
+ exports.DataLoadersHandler = DataLoadersHandler;
116
+
117
+ //# sourceMappingURL=dataLoaders.js.map
@@ -29,4 +29,6 @@ const assignMinimumShouldMatchToQuery = ({
29
29
  }
30
30
  query.minimum_should_match = value > 0 ? value : 1;
31
31
  };
32
- exports.assignMinimumShouldMatchToQuery = assignMinimumShouldMatchToQuery;
32
+ exports.assignMinimumShouldMatchToQuery = assignMinimumShouldMatchToQuery;
33
+
34
+ //# sourceMappingURL=assignMinimumShouldMatchToQuery.js.map
@@ -137,4 +137,6 @@ const createElasticsearchBody = ({
137
137
  }
138
138
  return body;
139
139
  };
140
- exports.createElasticsearchBody = createElasticsearchBody;
140
+ exports.createElasticsearchBody = createElasticsearchBody;
141
+
142
+ //# sourceMappingURL=body.js.map
@@ -297,4 +297,6 @@ const createModelFields = ({
297
297
  parents: []
298
298
  }));
299
299
  };
300
- exports.createModelFields = createModelFields;
300
+ exports.createModelFields = createModelFields;
301
+
302
+ //# sourceMappingURL=fields.js.map
@@ -54,4 +54,6 @@ const createApplyFiltering = ({
54
54
  });
55
55
  };
56
56
  };
57
- exports.createApplyFiltering = createApplyFiltering;
57
+ exports.createApplyFiltering = createApplyFiltering;
58
+
59
+ //# sourceMappingURL=applyFiltering.js.map
@@ -169,4 +169,6 @@ const createExecFiltering = params => {
169
169
  };
170
170
  return execFiltering;
171
171
  };
172
- exports.createExecFiltering = createExecFiltering;
172
+ exports.createExecFiltering = createExecFiltering;
173
+
174
+ //# sourceMappingURL=exec.js.map
@@ -13,4 +13,6 @@ Object.keys(_exec).forEach(function (key) {
13
13
  return _exec[key];
14
14
  }
15
15
  });
16
- });
16
+ });
17
+
18
+ //# sourceMappingURL=index.js.map
@@ -41,4 +41,6 @@ const createFieldPathFactory = ({
41
41
  };
42
42
  };
43
43
  };
44
- exports.createFieldPathFactory = createFieldPathFactory;
44
+ exports.createFieldPathFactory = createFieldPathFactory;
45
+
46
+ //# sourceMappingURL=path.js.map
@@ -25,4 +25,6 @@ const createDefaultFilterPlugin = () => {
25
25
  plugin.name = `${plugin.type}.default.all`;
26
26
  return plugin;
27
27
  };
28
- exports.createDefaultFilterPlugin = createDefaultFilterPlugin;
28
+ exports.createDefaultFilterPlugin = createDefaultFilterPlugin;
29
+
30
+ //# sourceMappingURL=defaultFilterPlugin.js.map
@@ -10,4 +10,6 @@ var _refFilterPlugin = require("./refFilterPlugin");
10
10
  const createFilterPlugins = () => {
11
11
  return [(0, _defaultFilterPlugin.createDefaultFilterPlugin)(), (0, _objectFilterPlugin.createObjectFilterPlugin)(), (0, _refFilterPlugin.createRefFilterPlugin)()];
12
12
  };
13
- exports.createFilterPlugins = createFilterPlugins;
13
+ exports.createFilterPlugins = createFilterPlugins;
14
+
15
+ //# sourceMappingURL=index.js.map
@@ -64,4 +64,6 @@ const createObjectFilterPlugin = () => {
64
64
  plugin.name = `${plugin.type}.default.object`;
65
65
  return plugin;
66
66
  };
67
- exports.createObjectFilterPlugin = createObjectFilterPlugin;
67
+ exports.createObjectFilterPlugin = createObjectFilterPlugin;
68
+
69
+ //# sourceMappingURL=objectFilterPlugin.js.map
@@ -45,4 +45,6 @@ const createRefFilterPlugin = () => {
45
45
  }
46
46
  });
47
47
  };
48
- exports.createRefFilterPlugin = createRefFilterPlugin;
48
+ exports.createRefFilterPlugin = createRefFilterPlugin;
49
+
50
+ //# sourceMappingURL=refFilterPlugin.js.map
@@ -20,4 +20,6 @@ const getPopulated = query => {
20
20
  }
21
21
  return result;
22
22
  };
23
- exports.getPopulated = getPopulated;
23
+ exports.getPopulated = getPopulated;
24
+
25
+ //# sourceMappingURL=populated.js.map
@@ -19,4 +19,6 @@ const getWhereValues = (value, condition) => {
19
19
  }
20
20
  return values;
21
21
  };
22
- exports.getWhereValues = getWhereValues;
22
+ exports.getWhereValues = getWhereValues;
23
+
24
+ //# sourceMappingURL=values.js.map
@@ -86,4 +86,6 @@ const applyFullTextSearch = params => {
86
86
  prepareTerm: _apiElasticsearch.normalizeValue
87
87
  });
88
88
  };
89
- exports.applyFullTextSearch = applyFullTextSearch;
89
+ exports.applyFullTextSearch = applyFullTextSearch;
90
+
91
+ //# sourceMappingURL=fullTextSearch.js.map
@@ -22,4 +22,6 @@ const createFullTextSearchFields = params => {
22
22
  return collection;
23
23
  }, []);
24
24
  };
25
- exports.createFullTextSearchFields = createFullTextSearchFields;
25
+ exports.createFullTextSearchFields = createFullTextSearchFields;
26
+
27
+ //# sourceMappingURL=fullTextSearchFields.js.map
@@ -100,4 +100,6 @@ const createInitialQuery = params => {
100
100
  delete where.latest;
101
101
  return query;
102
102
  };
103
- exports.createInitialQuery = createInitialQuery;
103
+ exports.createInitialQuery = createInitialQuery;
104
+
105
+ //# sourceMappingURL=initialQuery.js.map
@@ -31,4 +31,6 @@ const hasKeyword = field => {
31
31
  */
32
32
  return true;
33
33
  };
34
- exports.hasKeyword = hasKeyword;
34
+ exports.hasKeyword = hasKeyword;
35
+
36
+ //# sourceMappingURL=keyword.js.map
@@ -13,4 +13,6 @@ const createBodyModifierPluginList = ({
13
13
  return !pl.modelId || pl.modelId === model.modelId;
14
14
  });
15
15
  };
16
- exports.createBodyModifierPluginList = createBodyModifierPluginList;
16
+ exports.createBodyModifierPluginList = createBodyModifierPluginList;
17
+
18
+ //# sourceMappingURL=bodyModifier.js.map
@@ -34,4 +34,6 @@ const createOperatorPluginList = params => {
34
34
  return acc;
35
35
  }, {});
36
36
  };
37
- exports.createOperatorPluginList = createOperatorPluginList;
37
+ exports.createOperatorPluginList = createOperatorPluginList;
38
+
39
+ //# sourceMappingURL=operator.js.map
@@ -13,4 +13,6 @@ const createQueryModifierPluginList = ({
13
13
  return !pl.modelId || pl.modelId === model.modelId;
14
14
  });
15
15
  };
16
- exports.createQueryModifierPluginList = createQueryModifierPluginList;
16
+ exports.createQueryModifierPluginList = createQueryModifierPluginList;
17
+
18
+ //# sourceMappingURL=queryModifier.js.map
@@ -21,4 +21,6 @@ const createSearchPluginList = ({
21
21
  return plugins;
22
22
  }, {});
23
23
  };
24
- exports.createSearchPluginList = createSearchPluginList;
24
+ exports.createSearchPluginList = createSearchPluginList;
25
+
26
+ //# sourceMappingURL=search.js.map
@@ -13,4 +13,6 @@ const createSortModifierPluginList = ({
13
13
  return !pl.modelId || pl.modelId === model.modelId;
14
14
  });
15
15
  };
16
- exports.createSortModifierPluginList = createSortModifierPluginList;
16
+ exports.createSortModifierPluginList = createSortModifierPluginList;
17
+
18
+ //# sourceMappingURL=sortModifier.js.map
@@ -78,4 +78,6 @@ const createElasticsearchSort = params => {
78
78
  sort: transformedSort
79
79
  });
80
80
  };
81
- exports.createElasticsearchSort = createElasticsearchSort;
81
+ exports.createElasticsearchSort = createElasticsearchSort;
82
+
83
+ //# sourceMappingURL=sort.js.map
@@ -27,4 +27,6 @@ const transformValueForSearch = params => {
27
27
  value
28
28
  });
29
29
  };
30
- exports.transformValueForSearch = transformValueForSearch;
30
+ exports.transformValueForSearch = transformValueForSearch;
31
+
32
+ //# sourceMappingURL=transformValueForSearch.js.map
@@ -2,4 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
- });
5
+ });
6
+
7
+ //# sourceMappingURL=types.js.map
@@ -1,10 +1,7 @@
1
- import { CmsEntry } from "@webiny/api-headless-cms/types";
2
1
  import { Entity } from "dynamodb-toolbox";
3
2
  import { Client } from "@elastic/elasticsearch";
4
3
  import { PluginsContainer } from "@webiny/plugins";
5
4
  import { CmsEntryStorageOperations } from "../../types";
6
- export declare const getESLatestEntryData: (plugins: PluginsContainer, entry: CmsEntry) => Promise<Record<string, any>>;
7
- export declare const getESPublishedEntryData: (plugins: PluginsContainer, entry: CmsEntry) => Promise<Record<string, any>>;
8
5
  export interface CreateEntriesStorageOperationsParams {
9
6
  entity: Entity<any>;
10
7
  esEntity: Entity<any>;