@webiny/api-headless-cms-ddb-es 5.17.4 → 5.18.0-beta.3

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 (170) hide show
  1. package/configurations.d.ts +5 -17
  2. package/configurations.js +9 -38
  3. package/definitions/entry.d.ts +6 -11
  4. package/definitions/entry.js +17 -14
  5. package/definitions/entryElasticsearch.d.ts +8 -0
  6. package/definitions/entryElasticsearch.js +46 -0
  7. package/definitions/group.d.ts +8 -0
  8. package/definitions/group.js +74 -0
  9. package/definitions/model.d.ts +7 -6
  10. package/definitions/model.js +45 -20
  11. package/definitions/settings.d.ts +8 -0
  12. package/definitions/settings.js +62 -0
  13. package/definitions/system.d.ts +8 -0
  14. package/definitions/system.js +50 -0
  15. package/definitions/table.d.ts +7 -3
  16. package/definitions/table.js +12 -29
  17. package/definitions/tableElasticsearch.d.ts +7 -3
  18. package/definitions/tableElasticsearch.js +12 -29
  19. package/dynamoDb/index.d.ts +1 -1
  20. package/dynamoDb/index.js +4 -3
  21. package/dynamoDb/storage/date.d.ts +2 -2
  22. package/dynamoDb/storage/date.js +17 -17
  23. package/dynamoDb/storage/longText.d.ts +7 -0
  24. package/dynamoDb/storage/longText.js +83 -0
  25. package/dynamoDb/storage/richText.d.ts +2 -2
  26. package/dynamoDb/storage/richText.js +69 -67
  27. package/elasticsearch/index.d.ts +1 -1
  28. package/elasticsearch/index.js +1 -2
  29. package/elasticsearch/indexing/dateTimeIndexing.js +1 -2
  30. package/elasticsearch/indexing/defaultFieldIndexing.js +1 -2
  31. package/elasticsearch/indexing/index.js +4 -3
  32. package/elasticsearch/indexing/longTextIndexing.d.ts +3 -0
  33. package/elasticsearch/indexing/longTextIndexing.js +36 -0
  34. package/elasticsearch/indexing/numberIndexing.js +1 -2
  35. package/elasticsearch/indexing/objectIndexing.js +32 -27
  36. package/elasticsearch/indexing/richTextIndexing.js +1 -2
  37. package/elasticsearch/search/index.js +1 -2
  38. package/elasticsearch/search/refSearch.js +1 -2
  39. package/elasticsearch/search/timeSearch.js +1 -2
  40. package/helpers/createElasticsearchQueryBody.d.ts +5 -4
  41. package/helpers/createElasticsearchQueryBody.js +89 -44
  42. package/helpers/entryIndexHelpers.d.ts +14 -12
  43. package/helpers/entryIndexHelpers.js +63 -58
  44. package/helpers/fields.d.ts +11 -10
  45. package/helpers/fields.js +4 -5
  46. package/helpers/index.js +1 -2
  47. package/helpers/operatorPluginsList.d.ts +2 -2
  48. package/helpers/operatorPluginsList.js +3 -4
  49. package/helpers/searchPluginsList.d.ts +2 -2
  50. package/helpers/searchPluginsList.js +3 -4
  51. package/helpers/transformValueForSearch.d.ts +4 -5
  52. package/helpers/transformValueForSearch.js +3 -6
  53. package/index.d.ts +2 -2
  54. package/index.js +154 -12
  55. package/operations/entry/dataLoaders.d.ts +38 -14
  56. package/operations/entry/dataLoaders.js +193 -125
  57. package/operations/entry/elasticsearchFields.d.ts +2 -0
  58. package/operations/entry/elasticsearchFields.js +32 -0
  59. package/operations/entry/fields.d.ts +2 -2
  60. package/operations/entry/fields.js +1 -2
  61. package/operations/entry/index.d.ts +13 -3
  62. package/operations/entry/index.js +1148 -15
  63. package/operations/entry/keys.d.ts +12 -0
  64. package/operations/entry/keys.js +40 -0
  65. package/operations/group/index.d.ts +8 -0
  66. package/operations/group/index.js +202 -0
  67. package/operations/model/index.d.ts +8 -3
  68. package/operations/model/index.js +196 -17
  69. package/operations/settings/index.d.ts +6 -3
  70. package/operations/settings/index.js +132 -16
  71. package/operations/system/createElasticsearchTemplate.d.ts +5 -0
  72. package/operations/system/createElasticsearchTemplate.js +62 -0
  73. package/operations/system/index.d.ts +6 -3
  74. package/operations/system/index.js +93 -17
  75. package/package.json +15 -14
  76. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.d.ts +17 -0
  77. package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js +24 -0
  78. package/plugins/CmsEntryElasticsearchFieldPlugin.d.ts +9 -1
  79. package/plugins/CmsEntryElasticsearchFieldPlugin.js +9 -3
  80. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.d.ts +17 -0
  81. package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js +24 -0
  82. package/plugins/CmsEntryElasticsearchSortModifierPlugin.d.ts +17 -0
  83. package/plugins/CmsEntryElasticsearchSortModifierPlugin.js +24 -0
  84. package/types.d.ts +61 -80
  85. package/types.js +55 -1
  86. package/upgrades/index.js +1 -2
  87. package/upgrades/utils.js +1 -2
  88. package/upgrades/v5.0.0/cleanDatabaseRecord.d.ts +2 -2
  89. package/upgrades/v5.0.0/cleanDatabaseRecord.js +1 -2
  90. package/upgrades/v5.0.0/createOldVersionIndiceName.js +1 -2
  91. package/upgrades/v5.0.0/entryValueFixer.d.ts +3 -3
  92. package/upgrades/v5.0.0/entryValueFixer.js +3 -4
  93. package/upgrades/v5.0.0/fieldFinder.d.ts +4 -4
  94. package/upgrades/v5.0.0/fieldFinder.js +1 -2
  95. package/upgrades/v5.0.0/helpers.js +1 -2
  96. package/upgrades/v5.0.0/index.js +1 -2
  97. package/upgrades/v5.8.0/index.js +3 -3
  98. package/configurations.js.map +0 -1
  99. package/definitions/elasticsearchEntry.d.ts +0 -13
  100. package/definitions/elasticsearchEntry.js +0 -43
  101. package/definitions/elasticsearchEntry.js.map +0 -1
  102. package/definitions/entry.js.map +0 -1
  103. package/definitions/index.d.ts +0 -17
  104. package/definitions/index.js +0 -28
  105. package/definitions/index.js.map +0 -1
  106. package/definitions/model.js.map +0 -1
  107. package/definitions/table.js.map +0 -1
  108. package/definitions/tableElasticsearch.js.map +0 -1
  109. package/dynamoDb/index.js.map +0 -1
  110. package/dynamoDb/storage/date.js.map +0 -1
  111. package/dynamoDb/storage/richText.js.map +0 -1
  112. package/elasticsearch/index.js.map +0 -1
  113. package/elasticsearch/indexing/dateTimeIndexing.js.map +0 -1
  114. package/elasticsearch/indexing/defaultFieldIndexing.js.map +0 -1
  115. package/elasticsearch/indexing/index.js.map +0 -1
  116. package/elasticsearch/indexing/numberIndexing.js.map +0 -1
  117. package/elasticsearch/indexing/objectIndexing.js.map +0 -1
  118. package/elasticsearch/indexing/richTextIndexing.js.map +0 -1
  119. package/elasticsearch/search/index.js.map +0 -1
  120. package/elasticsearch/search/refSearch.js.map +0 -1
  121. package/elasticsearch/search/timeSearch.js.map +0 -1
  122. package/helpers/createElasticsearchQueryBody.js.map +0 -1
  123. package/helpers/entryIndexHelpers.js.map +0 -1
  124. package/helpers/fields.js.map +0 -1
  125. package/helpers/index.js.map +0 -1
  126. package/helpers/operatorPluginsList.js.map +0 -1
  127. package/helpers/searchPluginsList.js.map +0 -1
  128. package/helpers/transformValueForSearch.js.map +0 -1
  129. package/index.js.map +0 -1
  130. package/operations/entry/CmsContentEntryDynamoElastic.d.ts +0 -54
  131. package/operations/entry/CmsContentEntryDynamoElastic.js +0 -1128
  132. package/operations/entry/CmsContentEntryDynamoElastic.js.map +0 -1
  133. package/operations/entry/dataLoaders.js.map +0 -1
  134. package/operations/entry/fields.js.map +0 -1
  135. package/operations/entry/index.js.map +0 -1
  136. package/operations/model/CmsContentModelDynamoElastic.d.ts +0 -18
  137. package/operations/model/CmsContentModelDynamoElastic.js +0 -180
  138. package/operations/model/CmsContentModelDynamoElastic.js.map +0 -1
  139. package/operations/model/index.js.map +0 -1
  140. package/operations/modelGroup/CmsContentModelGroupDynamoElastic.d.ts +0 -40
  141. package/operations/modelGroup/CmsContentModelGroupDynamoElastic.js +0 -193
  142. package/operations/modelGroup/CmsContentModelGroupDynamoElastic.js.map +0 -1
  143. package/operations/modelGroup/index.d.ts +0 -3
  144. package/operations/modelGroup/index.js +0 -26
  145. package/operations/modelGroup/index.js.map +0 -1
  146. package/operations/settings/CmsSettingsDynamoElastic.d.ts +0 -14
  147. package/operations/settings/CmsSettingsDynamoElastic.js +0 -127
  148. package/operations/settings/CmsSettingsDynamoElastic.js.map +0 -1
  149. package/operations/settings/index.js.map +0 -1
  150. package/operations/system/CmsSystemDynamoElastic.d.ts +0 -14
  151. package/operations/system/CmsSystemDynamoElastic.js +0 -101
  152. package/operations/system/CmsSystemDynamoElastic.js.map +0 -1
  153. package/operations/system/CmsSystemInstallationPlugin.d.ts +0 -11
  154. package/operations/system/CmsSystemInstallationPlugin.js +0 -78
  155. package/operations/system/CmsSystemInstallationPlugin.js.map +0 -1
  156. package/operations/system/index.js.map +0 -1
  157. package/plugins/CmsEntryElasticsearchFieldPlugin.js.map +0 -1
  158. package/types.js.map +0 -1
  159. package/upgrades/index.js.map +0 -1
  160. package/upgrades/utils.js.map +0 -1
  161. package/upgrades/v5.0.0/cleanDatabaseRecord.js.map +0 -1
  162. package/upgrades/v5.0.0/createOldVersionIndiceName.js.map +0 -1
  163. package/upgrades/v5.0.0/entryValueFixer.js.map +0 -1
  164. package/upgrades/v5.0.0/fieldFinder.js.map +0 -1
  165. package/upgrades/v5.0.0/helpers.js.map +0 -1
  166. package/upgrades/v5.0.0/index.js.map +0 -1
  167. package/upgrades/v5.8.0/index.js.map +0 -1
  168. package/utils.d.ts +0 -3
  169. package/utils.js +0 -42
  170. package/utils.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { ElasticsearchQueryBuilderValueSearchPlugin } from "../types";
2
- import { CmsContext } from "@webiny/api-headless-cms/types";
2
+ import { PluginsContainer } from "@webiny/plugins";
3
3
  export interface ElasticsearchQuerySearchValuePlugins {
4
4
  [fieldType: string]: ElasticsearchQueryBuilderValueSearchPlugin;
5
5
  }
6
- export declare const searchPluginsList: (context: CmsContext) => ElasticsearchQuerySearchValuePlugins;
6
+ export declare const searchPluginsList: (plugins: PluginsContainer) => ElasticsearchQuerySearchValuePlugins;
@@ -9,8 +9,8 @@ exports.searchPluginsList = void 0;
9
9
 
10
10
  var _error = _interopRequireDefault(require("@webiny/error"));
11
11
 
12
- const searchPluginsList = context => {
13
- return context.plugins.byType("cms-elastic-search-query-builder-value-search").reduce((plugins, plugin) => {
12
+ const searchPluginsList = plugins => {
13
+ return plugins.byType("cms-elastic-search-query-builder-value-search").reduce((plugins, plugin) => {
14
14
  if (plugins[plugin.fieldType]) {
15
15
  throw new _error.default("There is a ElasticsearchQueryBuilderValueSearchPlugin defined for the field type.", "PLUGIN_ALREADY_EXISTS", {
16
16
  fieldType: plugin.fieldType,
@@ -23,5 +23,4 @@ const searchPluginsList = context => {
23
23
  }, {});
24
24
  };
25
25
 
26
- exports.searchPluginsList = searchPluginsList;
27
- //# sourceMappingURL=searchPluginsList.js.map
26
+ exports.searchPluginsList = searchPluginsList;
@@ -1,10 +1,9 @@
1
1
  import { ElasticsearchQuerySearchValuePlugins } from "./searchPluginsList";
2
- import { CmsContentModelField, CmsContext } from "@webiny/api-headless-cms/types";
3
- interface Args {
2
+ import { CmsModelField } from "@webiny/api-headless-cms/types";
3
+ interface Params {
4
4
  plugins: ElasticsearchQuerySearchValuePlugins;
5
- field: CmsContentModelField;
5
+ field: CmsModelField;
6
6
  value: any;
7
- context: CmsContext;
8
7
  }
9
- export declare const transformValueForSearch: (args: Args) => any;
8
+ export declare const transformValueForSearch: (args: Params) => any;
10
9
  export {};
@@ -9,8 +9,7 @@ const transformValueForSearch = args => {
9
9
  const {
10
10
  field,
11
11
  plugins,
12
- value,
13
- context
12
+ value
14
13
  } = args;
15
14
  const plugin = plugins[field.type];
16
15
 
@@ -20,10 +19,8 @@ const transformValueForSearch = args => {
20
19
 
21
20
  return plugin.transform({
22
21
  field,
23
- value,
24
- context
22
+ value
25
23
  });
26
24
  };
27
25
 
28
- exports.transformValueForSearch = transformValueForSearch;
29
- //# sourceMappingURL=transformValueForSearch.js.map
26
+ exports.transformValueForSearch = transformValueForSearch;
package/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: () => (import("@webiny/api-headless-cms/types").CmsContentModelGroupStorageOperationsProvider | import("@webiny/api-headless-cms/types").CmsContentModelStorageOperationsProvider | import("@webiny/api-headless-cms/types").CmsContentEntryStorageOperationsProvider | import("@webiny/api-headless-cms/types").CmsSettingsStorageOperationsProviderPlugin | import("@webiny/api-headless-cms/types").CmsSystemStorageOperationsProviderPlugin | import("@webiny/api-upgrade").UpgradePlugin<import("@webiny/api-headless-cms/types").CmsContext>[] | (import("./types").ElasticsearchQueryBuilderValueSearchPlugin[] | import("./types").CmsModelFieldToElasticsearchPlugin[])[] | (import("@webiny/api-headless-cms/types").CmsModelFieldToStoragePlugin<import("./dynamoDb/storage/richText").OriginalValue, import("./dynamoDb/storage/richText").StorageValue> | import("@webiny/api-headless-cms/types").CmsModelFieldToStoragePlugin<string | Date, string>)[])[];
2
- export default _default;
1
+ import { StorageOperationsFactory } from "./types";
2
+ export declare const createStorageOperations: StorageOperationsFactory;
package/index.js CHANGED
@@ -5,25 +5,167 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.default = void 0;
8
+ exports.createStorageOperations = void 0;
9
9
 
10
- var _settings = _interopRequireDefault(require("./operations/settings"));
10
+ var _filters = _interopRequireDefault(require("@webiny/db-dynamodb/plugins/filters"));
11
11
 
12
- var _system = _interopRequireDefault(require("./operations/system"));
12
+ var _elasticsearch = _interopRequireDefault(require("./elasticsearch"));
13
13
 
14
- var _modelGroup = _interopRequireDefault(require("./operations/modelGroup"));
14
+ var _dynamoDb = _interopRequireDefault(require("./dynamoDb"));
15
15
 
16
- var _model = _interopRequireDefault(require("./operations/model"));
16
+ var _settings = require("./operations/settings");
17
17
 
18
- var _entry = _interopRequireDefault(require("./operations/entry"));
18
+ var _system = require("./operations/system");
19
19
 
20
- var _upgrades = _interopRequireDefault(require("./upgrades"));
20
+ var _model = require("./operations/model");
21
21
 
22
- var _elasticsearch = _interopRequireDefault(require("./elasticsearch"));
22
+ var _entry = require("./operations/entry");
23
23
 
24
- var _dynamoDb = _interopRequireDefault(require("./dynamoDb"));
24
+ var _types = require("./types");
25
+
26
+ var _table = require("./definitions/table");
27
+
28
+ var _tableElasticsearch = require("./definitions/tableElasticsearch");
29
+
30
+ var _group = require("./definitions/group");
31
+
32
+ var _model2 = require("./definitions/model");
33
+
34
+ var _entry2 = require("./definitions/entry");
35
+
36
+ var _entryElasticsearch = require("./definitions/entryElasticsearch");
37
+
38
+ var _system2 = require("./definitions/system");
39
+
40
+ var _settings2 = require("./definitions/settings");
41
+
42
+ var _createElasticsearchTemplate = require("./operations/system/createElasticsearchTemplate");
43
+
44
+ var _plugins = require("@webiny/plugins");
45
+
46
+ var _group2 = require("./operations/group");
47
+
48
+ var _operators = require("@webiny/api-elasticsearch/operators");
49
+
50
+ var _elasticsearchFields = require("./operations/entry/elasticsearchFields");
25
51
 
26
- var _default = () => [(0, _settings.default)(), (0, _system.default)(), (0, _modelGroup.default)(), (0, _model.default)(), (0, _entry.default)(), (0, _upgrades.default)(), (0, _elasticsearch.default)(), (0, _dynamoDb.default)()];
52
+ const createStorageOperations = params => {
53
+ const {
54
+ attributes = {},
55
+ table,
56
+ esTable,
57
+ documentClient,
58
+ elasticsearch,
59
+ plugins: customPlugins,
60
+ modelFieldToGraphQLPlugins
61
+ } = params;
62
+ const tableInstance = (0, _table.createTable)({
63
+ table,
64
+ documentClient
65
+ });
66
+ const tableElasticsearchInstance = (0, _tableElasticsearch.createElasticsearchTable)({
67
+ table: esTable,
68
+ documentClient
69
+ });
70
+ const entities = {
71
+ settings: (0, _settings2.createSettingsEntity)({
72
+ entityName: _types.ENTITIES.SETTINGS,
73
+ table: tableInstance,
74
+ attributes: attributes[_types.ENTITIES.SETTINGS]
75
+ }),
76
+ system: (0, _system2.createSystemEntity)({
77
+ entityName: _types.ENTITIES.SYSTEM,
78
+ table: tableInstance,
79
+ attributes: attributes[_types.ENTITIES.SYSTEM]
80
+ }),
81
+ groups: (0, _group.createGroupEntity)({
82
+ entityName: _types.ENTITIES.GROUPS,
83
+ table: tableInstance,
84
+ attributes: attributes[_types.ENTITIES.GROUPS]
85
+ }),
86
+ models: (0, _model2.createModelEntity)({
87
+ entityName: _types.ENTITIES.MODELS,
88
+ table: tableInstance,
89
+ attributes: attributes[_types.ENTITIES.MODELS]
90
+ }),
91
+ entries: (0, _entry2.createEntryEntity)({
92
+ entityName: _types.ENTITIES.ENTRIES,
93
+ table: tableInstance,
94
+ attributes: attributes[_types.ENTITIES.ENTRIES]
95
+ }),
96
+ entriesEs: (0, _entryElasticsearch.createEntryElasticsearchEntity)({
97
+ entityName: _types.ENTITIES.ENTRIES_ES,
98
+ table: tableElasticsearchInstance,
99
+ attributes: attributes[_types.ENTITIES.ENTRIES_ES]
100
+ })
101
+ };
102
+ const plugins = new _plugins.PluginsContainer([
103
+ /**
104
+ * User defined custom plugins.
105
+ */
106
+ ...(customPlugins || []),
107
+ /**
108
+ * Plugins of type CmsModelFieldToGraphQLPlugin.
109
+ */
110
+ modelFieldToGraphQLPlugins,
111
+ /**
112
+ * Elasticsearch field definitions for the entry record.
113
+ */
114
+ _elasticsearchFields.elasticsearchFields,
115
+ /**
116
+ * DynamoDB filter plugins for the where conditions.
117
+ */
118
+ (0, _filters.default)(),
119
+ /**
120
+ * Elasticsearch operators.
121
+ */
122
+ (0, _operators.getElasticsearchOperators)(),
123
+ /**
124
+ * Field plugins for DynamoDB.
125
+ */
126
+ (0, _dynamoDb.default)(),
127
+ /**
128
+ * Field plugins for Elasticsearch.
129
+ */
130
+ (0, _elasticsearch.default)()]);
131
+ return {
132
+ init: async cms => {
133
+ cms.onBeforeSystemInstall.subscribe(async () => {
134
+ await (0, _createElasticsearchTemplate.createElasticsearchTemplate)({
135
+ elasticsearch
136
+ });
137
+ });
138
+ },
139
+ plugins: [
140
+ /**
141
+ * Field plugins for DynamoDB.
142
+ * We must pass them to the base application.
143
+ */
144
+ (0, _dynamoDb.default)()],
145
+ getEntities: () => entities,
146
+ getTable: () => tableInstance,
147
+ getEsTable: () => tableElasticsearchInstance,
148
+ system: (0, _system.createSystemStorageOperations)({
149
+ entity: entities.system
150
+ }),
151
+ settings: (0, _settings.createSettingsStorageOperations)({
152
+ entity: entities.settings
153
+ }),
154
+ groups: (0, _group2.createGroupsStorageOperations)({
155
+ entity: entities.groups,
156
+ plugins
157
+ }),
158
+ models: (0, _model.createModelsStorageOperations)({
159
+ entity: entities.models,
160
+ elasticsearch
161
+ }),
162
+ entries: (0, _entry.createEntriesStorageOperations)({
163
+ entity: entities.entries,
164
+ esEntity: entities.entriesEs,
165
+ plugins,
166
+ elasticsearch
167
+ })
168
+ };
169
+ };
27
170
 
28
- exports.default = _default;
29
- //# sourceMappingURL=index.js.map
171
+ exports.createStorageOperations = createStorageOperations;
@@ -1,23 +1,47 @@
1
- import { CmsContentEntry, CmsContentModel, CmsContext } from "@webiny/api-headless-cms/types";
2
- import CmsContentEntryDynamoElastic from "./CmsContentEntryDynamoElastic";
1
+ import { CmsEntry, CmsModel } from "@webiny/api-headless-cms/types";
2
+ import { Entity } from "dynamodb-toolbox";
3
+ export interface GetAllEntryRevisionsParams {
4
+ ids: readonly string[];
5
+ model: CmsModel;
6
+ }
7
+ export interface GetRevisionByIdParams {
8
+ ids: readonly string[];
9
+ model: CmsModel;
10
+ }
11
+ export interface GetPublishedRevisionByEntryIdParams {
12
+ ids: readonly string[];
13
+ model: CmsModel;
14
+ }
15
+ export interface GetLatestRevisionByEntryIdParams {
16
+ ids: readonly string[];
17
+ model: CmsModel;
18
+ }
19
+ interface ClearLoaderParams {
20
+ model: CmsModel;
21
+ entry?: CmsEntry;
22
+ }
23
+ export interface Params {
24
+ entity: Entity<any>;
25
+ }
3
26
  export declare class DataLoadersHandler {
4
- private readonly _loaders;
5
- private readonly _context;
6
- private readonly _storageOperations;
7
- constructor(context: CmsContext, storageOperations: CmsContentEntryDynamoElastic);
8
- getAllEntryRevisions(model: CmsContentModel, ids: readonly string[]): Promise<CmsContentEntry[]>;
9
- clearAllEntryRevisions(model: CmsContentModel, entry?: CmsContentEntry): void;
10
- getRevisionById(model: CmsContentModel, ids: readonly string[]): Promise<CmsContentEntry[]>;
11
- clearRevisionById(model: CmsContentModel, entry?: CmsContentEntry): void;
12
- getPublishedRevisionByEntryId(model: CmsContentModel, ids: readonly string[]): Promise<CmsContentEntry[]>;
13
- clearPublishedRevisionByEntryId(model: CmsContentModel, entry?: CmsContentEntry): void;
14
- getLatestRevisionByEntryId(model: CmsContentModel, ids: readonly string[]): Promise<CmsContentEntry[]>;
15
- clearLatestRevisionByEntryId(model: CmsContentModel, entry?: CmsContentEntry): void;
27
+ private readonly loaders;
28
+ private readonly entity;
29
+ constructor(params: any);
30
+ getAllEntryRevisions(params: GetAllEntryRevisionsParams): Promise<CmsEntry[]>;
31
+ clearAllEntryRevisions(params: ClearLoaderParams): void;
32
+ getRevisionById(params: GetRevisionByIdParams): Promise<CmsEntry[]>;
33
+ clearRevisionById(params: ClearLoaderParams): void;
34
+ getPublishedRevisionByEntryId(params: GetPublishedRevisionByEntryIdParams): Promise<CmsEntry[]>;
35
+ clearPublishedRevisionByEntryId(params: ClearLoaderParams): void;
36
+ getLatestRevisionByEntryId(params: GetLatestRevisionByEntryIdParams): Promise<CmsEntry[]>;
37
+ clearLatestRevisionByEntryId(params: ClearLoaderParams): void;
16
38
  private getLoader;
17
39
  private loadMany;
40
+ clearAll(params: Omit<ClearLoaderParams, "entry">): void;
18
41
  /**
19
42
  * Helper to clear the cache for certain data loader.
20
43
  * If entry is passed then clear target key only.
21
44
  */
22
45
  private clear;
23
46
  }
47
+ export {};