@webiny/api-headless-cms-ddb-es 0.0.0-unstable.5e7233243f → 0.0.0-unstable.615a930a68
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.
- package/configurations.js +1 -1
- package/definitions/entry.js +3 -7
- package/definitions/entry.js.map +1 -1
- package/definitions/entryElasticsearch.js +3 -7
- package/definitions/entryElasticsearch.js.map +1 -1
- package/definitions/group.js +3 -7
- package/definitions/group.js.map +1 -1
- package/definitions/model.js +3 -7
- package/definitions/model.js.map +1 -1
- package/definitions/settings.js +3 -7
- package/definitions/settings.js.map +1 -1
- package/definitions/system.js +3 -7
- package/definitions/system.js.map +1 -1
- package/dynamoDb/storage/date.js +1 -1
- package/dynamoDb/storage/date.js.map +1 -1
- package/dynamoDb/storage/longText.js +1 -1
- package/dynamoDb/storage/richText.js +1 -1
- package/elasticsearch/createElasticsearchIndex.js +3 -3
- package/elasticsearch/createElasticsearchIndex.js.map +1 -1
- package/elasticsearch/index.d.ts +1 -1
- package/elasticsearch/index.js +1 -1
- package/elasticsearch/indexing/index.js +1 -1
- package/elasticsearch/indexing/longTextIndexing.d.ts +4 -0
- package/elasticsearch/indexing/longTextIndexing.js +20 -4
- package/elasticsearch/indexing/longTextIndexing.js.map +1 -1
- package/elasticsearch/indices/base.js +2 -10
- package/elasticsearch/indices/base.js.map +1 -1
- package/elasticsearch/indices/index.d.ts +1 -1
- package/elasticsearch/indices/japanese.js +2 -10
- package/elasticsearch/indices/japanese.js.map +1 -1
- package/elasticsearch/search/refSearch.js +4 -2
- package/elasticsearch/search/refSearch.js.map +1 -1
- package/helpers/createElasticsearchQueryBody.js +20 -22
- package/helpers/createElasticsearchQueryBody.js.map +1 -1
- package/helpers/entryIndexHelpers.js +6 -11
- package/helpers/entryIndexHelpers.js.map +1 -1
- package/helpers/index.d.ts +0 -1
- package/helpers/index.js +0 -13
- package/helpers/index.js.map +1 -1
- package/index.d.ts +1 -0
- package/index.js +79 -13
- package/index.js.map +1 -1
- package/operations/entry/dataLoaders.js +7 -9
- package/operations/entry/dataLoaders.js.map +1 -1
- package/operations/entry/elasticsearch/body.d.ts +13 -0
- package/operations/entry/elasticsearch/body.js +162 -0
- package/operations/entry/elasticsearch/body.js.map +1 -0
- package/operations/entry/elasticsearch/fields.d.ts +9 -0
- package/operations/entry/elasticsearch/fields.js +248 -0
- package/operations/entry/elasticsearch/fields.js.map +1 -0
- package/operations/entry/elasticsearch/filtering/applyFiltering.d.ts +8 -0
- package/operations/entry/elasticsearch/filtering/applyFiltering.js +66 -0
- package/operations/entry/elasticsearch/filtering/applyFiltering.js.map +1 -0
- package/operations/entry/elasticsearch/filtering/exec.d.ts +17 -0
- package/operations/entry/elasticsearch/filtering/exec.js +214 -0
- package/operations/entry/elasticsearch/filtering/exec.js.map +1 -0
- package/operations/entry/elasticsearch/filtering/index.d.ts +1 -0
- package/operations/entry/elasticsearch/filtering/index.js +18 -0
- package/operations/entry/elasticsearch/filtering/index.js.map +1 -0
- package/operations/entry/elasticsearch/filtering/path.d.ts +15 -0
- package/operations/entry/elasticsearch/filtering/path.js +52 -0
- package/operations/entry/elasticsearch/filtering/path.js.map +1 -0
- package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.d.ts +2 -0
- package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js +35 -0
- package/operations/entry/elasticsearch/filtering/plugins/defaultFilterPlugin.js.map +1 -0
- package/operations/entry/elasticsearch/filtering/plugins/index.d.ts +1 -0
- package/operations/entry/elasticsearch/filtering/plugins/index.js +18 -0
- package/operations/entry/elasticsearch/filtering/plugins/index.js.map +1 -0
- package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.d.ts +2 -0
- package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js +78 -0
- package/operations/entry/elasticsearch/filtering/plugins/objectFilterPlugin.js.map +1 -0
- package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.d.ts +2 -0
- package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js +58 -0
- package/operations/entry/elasticsearch/filtering/plugins/refFilterPlugin.js.map +1 -0
- package/operations/entry/elasticsearch/filtering/populated.d.ts +2 -0
- package/operations/entry/elasticsearch/filtering/populated.js +30 -0
- package/operations/entry/elasticsearch/filtering/populated.js.map +1 -0
- package/operations/entry/elasticsearch/filtering/values.d.ts +2 -0
- package/operations/entry/elasticsearch/filtering/values.js +28 -0
- package/operations/entry/elasticsearch/filtering/values.js.map +1 -0
- package/operations/entry/elasticsearch/fullTextSearch.d.ts +9 -0
- package/operations/entry/elasticsearch/fullTextSearch.js +34 -0
- package/operations/entry/elasticsearch/fullTextSearch.js.map +1 -0
- package/operations/entry/elasticsearch/fullTextSearchFields.d.ts +8 -0
- package/operations/entry/elasticsearch/fullTextSearchFields.js +52 -0
- package/operations/entry/elasticsearch/fullTextSearchFields.js.map +1 -0
- package/operations/entry/elasticsearch/initialQuery.d.ts +17 -0
- package/operations/entry/elasticsearch/initialQuery.js +117 -0
- package/operations/entry/elasticsearch/initialQuery.js.map +1 -0
- package/operations/entry/elasticsearch/keyword.d.ts +2 -0
- package/operations/entry/elasticsearch/keyword.js +38 -0
- package/operations/entry/elasticsearch/keyword.js.map +1 -0
- package/operations/entry/elasticsearch/plugins/bodyModifier.d.ts +9 -0
- package/operations/entry/elasticsearch/plugins/bodyModifier.js +19 -0
- package/operations/entry/elasticsearch/plugins/bodyModifier.js.map +1 -0
- package/operations/entry/elasticsearch/plugins/operator.d.ts +8 -0
- package/operations/entry/elasticsearch/plugins/operator.js +45 -0
- package/operations/entry/elasticsearch/plugins/operator.js.map +1 -0
- package/operations/entry/elasticsearch/plugins/queryModifier.d.ts +9 -0
- package/operations/entry/elasticsearch/plugins/queryModifier.js +19 -0
- package/operations/entry/elasticsearch/plugins/queryModifier.js.map +1 -0
- package/operations/entry/elasticsearch/plugins/search.d.ts +7 -0
- package/operations/entry/elasticsearch/plugins/search.js +30 -0
- package/operations/entry/elasticsearch/plugins/search.js.map +1 -0
- package/operations/entry/elasticsearch/plugins/sortModifier.d.ts +9 -0
- package/operations/entry/elasticsearch/plugins/sortModifier.js +19 -0
- package/operations/entry/elasticsearch/plugins/sortModifier.js.map +1 -0
- package/operations/entry/elasticsearch/sort.d.ts +12 -0
- package/operations/entry/elasticsearch/sort.js +92 -0
- package/operations/entry/elasticsearch/sort.js.map +1 -0
- package/operations/entry/elasticsearch/transformValueForSearch.d.ts +16 -0
- package/operations/entry/elasticsearch/transformValueForSearch.js +34 -0
- package/operations/entry/elasticsearch/transformValueForSearch.js.map +1 -0
- package/operations/entry/elasticsearch/types.d.ts +41 -0
- package/operations/entry/elasticsearch/types.js +5 -0
- package/operations/entry/elasticsearch/types.js.map +1 -0
- package/operations/entry/elasticsearchFields.js +3 -0
- package/operations/entry/elasticsearchFields.js.map +1 -1
- package/operations/entry/index.d.ts +0 -2
- package/operations/entry/index.js +86 -300
- package/operations/entry/index.js.map +1 -1
- package/operations/entry/recordType.d.ts +3 -0
- package/operations/entry/recordType.js +24 -0
- package/operations/entry/recordType.js.map +1 -0
- package/operations/group/index.js +7 -12
- package/operations/group/index.js.map +1 -1
- package/operations/model/index.js +4 -8
- package/operations/model/index.js.map +1 -1
- package/operations/settings/index.js +6 -10
- package/operations/settings/index.js.map +1 -1
- package/operations/system/index.js +4 -8
- package/operations/system/index.js.map +1 -1
- package/package.json +18 -19
- package/plugins/CmsEntryElasticsearchBodyModifierPlugin.d.ts +4 -1
- package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js +3 -3
- package/plugins/CmsEntryElasticsearchBodyModifierPlugin.js.map +1 -1
- package/plugins/CmsEntryElasticsearchFieldPlugin.d.ts +1 -1
- package/plugins/CmsEntryElasticsearchFieldPlugin.js +3 -3
- package/plugins/CmsEntryElasticsearchFieldPlugin.js.map +1 -1
- package/plugins/CmsEntryElasticsearchIndexPlugin.d.ts +1 -1
- package/plugins/CmsEntryElasticsearchIndexPlugin.js +3 -3
- package/plugins/CmsEntryElasticsearchIndexPlugin.js.map +1 -1
- package/plugins/CmsEntryElasticsearchQueryBuilderValueSearchPlugin.js +1 -1
- package/plugins/CmsEntryElasticsearchQueryModifierPlugin.d.ts +1 -1
- package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js +3 -3
- package/plugins/CmsEntryElasticsearchQueryModifierPlugin.js.map +1 -1
- package/plugins/CmsEntryElasticsearchSortModifierPlugin.d.ts +1 -1
- package/plugins/CmsEntryElasticsearchSortModifierPlugin.js +3 -3
- package/plugins/CmsEntryElasticsearchSortModifierPlugin.js.map +1 -1
- package/plugins/CmsEntryFilterPlugin.d.ts +49 -0
- package/plugins/CmsEntryFilterPlugin.js +31 -0
- package/plugins/CmsEntryFilterPlugin.js.map +1 -0
- package/plugins/index.d.ts +6 -0
- package/plugins/index.js +83 -0
- package/plugins/index.js.map +1 -0
- package/types.d.ts +5 -2
- package/types.js.map +1 -1
- package/upgrades/index.d.ts +0 -2
- package/upgrades/index.js +0 -10
- package/upgrades/index.js.map +0 -1
|
@@ -1,27 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.createEntriesStorageOperations = void 0;
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
11
|
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
var _helpers = require("../../helpers");
|
|
15
|
-
|
|
16
|
-
var _configurations = require("../../configurations");
|
|
12
|
+
var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
|
|
17
13
|
|
|
18
14
|
var _error = _interopRequireDefault(require("@webiny/error"));
|
|
19
15
|
|
|
20
|
-
var
|
|
16
|
+
var _types = require("@webiny/api-headless-cms/types");
|
|
21
17
|
|
|
22
|
-
var
|
|
18
|
+
var _helpers = require("../../helpers");
|
|
23
19
|
|
|
24
|
-
var
|
|
20
|
+
var _configurations = require("../../configurations");
|
|
25
21
|
|
|
26
22
|
var _batchWrite = require("@webiny/db-dynamodb/utils/batchWrite");
|
|
27
23
|
|
|
@@ -31,9 +27,7 @@ var _keys = require("./keys");
|
|
|
31
27
|
|
|
32
28
|
var _query = require("@webiny/db-dynamodb/utils/query");
|
|
33
29
|
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
var _cursors = require("@webiny/api-elasticsearch/cursors");
|
|
30
|
+
var _apiElasticsearch = require("@webiny/api-elasticsearch");
|
|
37
31
|
|
|
38
32
|
var _get = require("@webiny/db-dynamodb/utils/get");
|
|
39
33
|
|
|
@@ -41,46 +35,32 @@ var _utils = require("@webiny/utils");
|
|
|
41
35
|
|
|
42
36
|
var _cleanup = require("@webiny/db-dynamodb/utils/cleanup");
|
|
43
37
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
38
|
+
var _body = require("./elasticsearch/body");
|
|
47
39
|
|
|
48
|
-
|
|
49
|
-
return "cms.entry";
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
const createLatestType = () => {
|
|
53
|
-
return `${createType()}.l`;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
exports.createLatestType = createLatestType;
|
|
57
|
-
|
|
58
|
-
const createPublishedType = () => {
|
|
59
|
-
return `${createType()}.p`;
|
|
60
|
-
};
|
|
40
|
+
var _recordType = require("./recordType");
|
|
61
41
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
42
|
+
const getEntryData = input => {
|
|
43
|
+
const output = (0, _objectSpread2.default)({}, input);
|
|
44
|
+
delete output["PK"];
|
|
45
|
+
delete output["SK"];
|
|
46
|
+
delete output["published"];
|
|
47
|
+
delete output["latest"];
|
|
48
|
+
return output;
|
|
69
49
|
};
|
|
70
50
|
|
|
71
51
|
const getESLatestEntryData = async (plugins, entry) => {
|
|
72
|
-
return (0,
|
|
52
|
+
return (0, _apiElasticsearch.compress)(plugins, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, getEntryData(entry)), {}, {
|
|
73
53
|
latest: true,
|
|
74
|
-
TYPE:
|
|
75
|
-
__type:
|
|
54
|
+
TYPE: (0, _recordType.createLatestRecordType)(),
|
|
55
|
+
__type: (0, _recordType.createLatestRecordType)()
|
|
76
56
|
}));
|
|
77
57
|
};
|
|
78
58
|
|
|
79
59
|
const getESPublishedEntryData = async (plugins, entry) => {
|
|
80
|
-
return (0,
|
|
60
|
+
return (0, _apiElasticsearch.compress)(plugins, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, getEntryData(entry)), {}, {
|
|
81
61
|
published: true,
|
|
82
|
-
TYPE:
|
|
83
|
-
__type:
|
|
62
|
+
TYPE: (0, _recordType.createPublishedRecordType)(),
|
|
63
|
+
__type: (0, _recordType.createPublishedRecordType)()
|
|
84
64
|
}));
|
|
85
65
|
};
|
|
86
66
|
|
|
@@ -93,7 +73,7 @@ const convertToStorageEntry = params => {
|
|
|
93
73
|
fields: model.fields,
|
|
94
74
|
values: entry.values
|
|
95
75
|
});
|
|
96
|
-
return
|
|
76
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, entry), {}, {
|
|
97
77
|
values
|
|
98
78
|
});
|
|
99
79
|
};
|
|
@@ -107,7 +87,7 @@ const convertFromStorageEntry = params => {
|
|
|
107
87
|
fields: model.fields,
|
|
108
88
|
values: entry.values
|
|
109
89
|
});
|
|
110
|
-
return
|
|
90
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, entry), {}, {
|
|
111
91
|
values
|
|
112
92
|
});
|
|
113
93
|
};
|
|
@@ -141,10 +121,10 @@ const createEntriesStorageOperations = params => {
|
|
|
141
121
|
const esEntry = (0, _helpers.prepareEntryToIndex)({
|
|
142
122
|
plugins,
|
|
143
123
|
model,
|
|
144
|
-
entry: (0, _cloneDeep.default)(
|
|
124
|
+
entry: (0, _cloneDeep.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, entry), {}, {
|
|
145
125
|
locked
|
|
146
126
|
})),
|
|
147
|
-
storageEntry: (0, _cloneDeep.default)(
|
|
127
|
+
storageEntry: (0, _cloneDeep.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, storageEntry), {}, {
|
|
148
128
|
locked
|
|
149
129
|
}))
|
|
150
130
|
});
|
|
@@ -181,21 +161,21 @@ const createEntriesStorageOperations = params => {
|
|
|
181
161
|
}),
|
|
182
162
|
SK: (0, _keys.createPublishedSortKey)()
|
|
183
163
|
};
|
|
184
|
-
const items = [entity.putBatch(
|
|
164
|
+
const items = [entity.putBatch((0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, storageEntry), {}, {
|
|
185
165
|
locked
|
|
186
166
|
}, revisionKeys), {}, {
|
|
187
|
-
TYPE:
|
|
188
|
-
})), entity.putBatch(
|
|
167
|
+
TYPE: (0, _recordType.createRecordType)()
|
|
168
|
+
})), entity.putBatch((0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, storageEntry), {}, {
|
|
189
169
|
locked
|
|
190
170
|
}, latestKeys), {}, {
|
|
191
|
-
TYPE:
|
|
171
|
+
TYPE: (0, _recordType.createLatestRecordType)()
|
|
192
172
|
}))];
|
|
193
173
|
|
|
194
174
|
if (isPublished) {
|
|
195
|
-
items.push(entity.putBatch(
|
|
175
|
+
items.push(entity.putBatch((0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, storageEntry), {}, {
|
|
196
176
|
locked
|
|
197
177
|
}, publishedKeys), {}, {
|
|
198
|
-
TYPE:
|
|
178
|
+
TYPE: (0, _recordType.createPublishedRecordType)()
|
|
199
179
|
})));
|
|
200
180
|
}
|
|
201
181
|
|
|
@@ -215,13 +195,13 @@ const createEntriesStorageOperations = params => {
|
|
|
215
195
|
});
|
|
216
196
|
}
|
|
217
197
|
|
|
218
|
-
const esItems = [esEntity.putBatch(
|
|
198
|
+
const esItems = [esEntity.putBatch((0, _objectSpread2.default)((0, _objectSpread2.default)({}, latestKeys), {}, {
|
|
219
199
|
index: esIndex,
|
|
220
200
|
data: esLatestData
|
|
221
201
|
}))];
|
|
222
202
|
|
|
223
203
|
if (isPublished) {
|
|
224
|
-
esItems.push(esEntity.putBatch(
|
|
204
|
+
esItems.push(esEntity.putBatch((0, _objectSpread2.default)((0, _objectSpread2.default)({}, publishedKeys), {}, {
|
|
225
205
|
index: esIndex,
|
|
226
206
|
data: esPublishedData
|
|
227
207
|
})));
|
|
@@ -279,10 +259,10 @@ const createEntriesStorageOperations = params => {
|
|
|
279
259
|
storageEntry: (0, _cloneDeep.default)(storageEntry)
|
|
280
260
|
});
|
|
281
261
|
const esLatestData = await getESLatestEntryData(plugins, esEntry);
|
|
282
|
-
const items = [entity.putBatch(
|
|
283
|
-
TYPE:
|
|
284
|
-
}, revisionKeys)), entity.putBatch(
|
|
285
|
-
TYPE:
|
|
262
|
+
const items = [entity.putBatch((0, _objectSpread2.default)((0, _objectSpread2.default)({}, storageEntry), {}, {
|
|
263
|
+
TYPE: (0, _recordType.createRecordType)()
|
|
264
|
+
}, revisionKeys)), entity.putBatch((0, _objectSpread2.default)((0, _objectSpread2.default)({}, storageEntry), {}, {
|
|
265
|
+
TYPE: (0, _recordType.createLatestRecordType)()
|
|
286
266
|
}, latestKeys))];
|
|
287
267
|
|
|
288
268
|
const {
|
|
@@ -312,7 +292,7 @@ const createEntriesStorageOperations = params => {
|
|
|
312
292
|
|
|
313
293
|
|
|
314
294
|
try {
|
|
315
|
-
await esEntity.put(
|
|
295
|
+
await esEntity.put((0, _objectSpread2.default)((0, _objectSpread2.default)({}, latestKeys), {}, {
|
|
316
296
|
index,
|
|
317
297
|
data: esLatestData
|
|
318
298
|
}));
|
|
@@ -381,17 +361,17 @@ const createEntriesStorageOperations = params => {
|
|
|
381
361
|
model,
|
|
382
362
|
ids: [entry.id]
|
|
383
363
|
});
|
|
384
|
-
const items = [entity.putBatch(
|
|
364
|
+
const items = [entity.putBatch((0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, storageEntry), {}, {
|
|
385
365
|
locked
|
|
386
366
|
}, revisionKeys), {}, {
|
|
387
|
-
TYPE:
|
|
367
|
+
TYPE: (0, _recordType.createRecordType)()
|
|
388
368
|
}))];
|
|
389
369
|
|
|
390
370
|
if (isPublished) {
|
|
391
|
-
items.push(entity.putBatch(
|
|
371
|
+
items.push(entity.putBatch((0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, storageEntry), {}, {
|
|
392
372
|
locked
|
|
393
373
|
}, publishedKeys), {}, {
|
|
394
|
-
TYPE:
|
|
374
|
+
TYPE: (0, _recordType.createPublishedRecordType)()
|
|
395
375
|
})));
|
|
396
376
|
}
|
|
397
377
|
|
|
@@ -418,7 +398,7 @@ const createEntriesStorageOperations = params => {
|
|
|
418
398
|
/**
|
|
419
399
|
* First we update the regular DynamoDB table
|
|
420
400
|
*/
|
|
421
|
-
items.push(entity.putBatch(
|
|
401
|
+
items.push(entity.putBatch((0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, storageEntry), latestKeys), {}, {
|
|
422
402
|
TYPE: (0, _keys.createLatestSortKey)()
|
|
423
403
|
})));
|
|
424
404
|
/**
|
|
@@ -428,15 +408,15 @@ const createEntriesStorageOperations = params => {
|
|
|
428
408
|
esEntry = (0, _helpers.prepareEntryToIndex)({
|
|
429
409
|
plugins,
|
|
430
410
|
model,
|
|
431
|
-
entry: (0, _cloneDeep.default)(
|
|
411
|
+
entry: (0, _cloneDeep.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, entry), {}, {
|
|
432
412
|
locked
|
|
433
413
|
})),
|
|
434
|
-
storageEntry: (0, _cloneDeep.default)(
|
|
414
|
+
storageEntry: (0, _cloneDeep.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, storageEntry), {}, {
|
|
435
415
|
locked
|
|
436
416
|
}))
|
|
437
417
|
});
|
|
438
418
|
elasticsearchLatestData = await getESLatestEntryData(plugins, esEntry);
|
|
439
|
-
esItems.push(esEntity.putBatch(
|
|
419
|
+
esItems.push(esEntity.putBatch((0, _objectSpread2.default)((0, _objectSpread2.default)({}, latestKeys), {}, {
|
|
440
420
|
index: esIndex,
|
|
441
421
|
data: elasticsearchLatestData
|
|
442
422
|
})));
|
|
@@ -453,10 +433,10 @@ const createEntriesStorageOperations = params => {
|
|
|
453
433
|
esEntry = (0, _helpers.prepareEntryToIndex)({
|
|
454
434
|
plugins,
|
|
455
435
|
model,
|
|
456
|
-
entry: (0, _cloneDeep.default)(
|
|
436
|
+
entry: (0, _cloneDeep.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, entry), {}, {
|
|
457
437
|
locked
|
|
458
438
|
})),
|
|
459
|
-
storageEntry: (0, _cloneDeep.default)(
|
|
439
|
+
storageEntry: (0, _cloneDeep.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, storageEntry), {}, {
|
|
460
440
|
locked
|
|
461
441
|
}))
|
|
462
442
|
});
|
|
@@ -464,15 +444,15 @@ const createEntriesStorageOperations = params => {
|
|
|
464
444
|
|
|
465
445
|
elasticsearchPublishedData = await getESPublishedEntryData(plugins, esEntry);
|
|
466
446
|
} else {
|
|
467
|
-
elasticsearchPublishedData =
|
|
447
|
+
elasticsearchPublishedData = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, elasticsearchLatestData), {}, {
|
|
468
448
|
published: true,
|
|
469
|
-
TYPE:
|
|
470
|
-
__type:
|
|
449
|
+
TYPE: (0, _recordType.createPublishedRecordType)(),
|
|
450
|
+
__type: (0, _recordType.createPublishedRecordType)()
|
|
471
451
|
});
|
|
472
452
|
delete elasticsearchPublishedData.latest;
|
|
473
453
|
}
|
|
474
454
|
|
|
475
|
-
esItems.push(esEntity.putBatch(
|
|
455
|
+
esItems.push(esEntity.putBatch((0, _objectSpread2.default)((0, _objectSpread2.default)({}, publishedKeys), {}, {
|
|
476
456
|
index: esIndex,
|
|
477
457
|
data: elasticsearchPublishedData
|
|
478
458
|
})));
|
|
@@ -643,10 +623,10 @@ const createEntriesStorageOperations = params => {
|
|
|
643
623
|
* In the end we need to set the new latest entry
|
|
644
624
|
*/
|
|
645
625
|
|
|
646
|
-
items.push(entity.putBatch(
|
|
626
|
+
items.push(entity.putBatch((0, _objectSpread2.default)((0, _objectSpread2.default)({}, latestStorageEntry), {}, {
|
|
647
627
|
PK: partitionKey,
|
|
648
628
|
SK: (0, _keys.createLatestSortKey)(),
|
|
649
|
-
TYPE:
|
|
629
|
+
TYPE: (0, _recordType.createLatestRecordType)()
|
|
650
630
|
})));
|
|
651
631
|
esItems.push(esEntity.putBatch({
|
|
652
632
|
PK: partitionKey,
|
|
@@ -693,7 +673,9 @@ const createEntriesStorageOperations = params => {
|
|
|
693
673
|
};
|
|
694
674
|
|
|
695
675
|
const list = async (model, params) => {
|
|
696
|
-
|
|
676
|
+
var _response, _response$body;
|
|
677
|
+
|
|
678
|
+
const limit = (0, _apiElasticsearch.createLimit)(params.limit, 50);
|
|
697
679
|
|
|
698
680
|
const {
|
|
699
681
|
index
|
|
@@ -706,7 +688,7 @@ const createEntriesStorageOperations = params => {
|
|
|
706
688
|
index
|
|
707
689
|
});
|
|
708
690
|
|
|
709
|
-
if (!result
|
|
691
|
+
if (!(result !== null && result !== void 0 && result.body)) {
|
|
710
692
|
return {
|
|
711
693
|
hasMoreItems: false,
|
|
712
694
|
totalCount: 0,
|
|
@@ -721,13 +703,13 @@ const createEntriesStorageOperations = params => {
|
|
|
721
703
|
});
|
|
722
704
|
}
|
|
723
705
|
|
|
724
|
-
const body = (0,
|
|
706
|
+
const body = (0, _body.createElasticsearchBody)({
|
|
725
707
|
model,
|
|
726
|
-
|
|
727
|
-
limit
|
|
708
|
+
params: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, params), {}, {
|
|
709
|
+
limit,
|
|
710
|
+
after: (0, _apiElasticsearch.decodeCursor)(params.after)
|
|
728
711
|
}),
|
|
729
|
-
plugins
|
|
730
|
-
parentPath: "values"
|
|
712
|
+
plugins
|
|
731
713
|
});
|
|
732
714
|
let response;
|
|
733
715
|
|
|
@@ -748,7 +730,7 @@ const createEntriesStorageOperations = params => {
|
|
|
748
730
|
const {
|
|
749
731
|
hits,
|
|
750
732
|
total
|
|
751
|
-
} = response.body.hits;
|
|
733
|
+
} = ((_response = response) === null || _response === void 0 ? void 0 : (_response$body = _response.body) === null || _response$body === void 0 ? void 0 : _response$body.hits) || {};
|
|
752
734
|
const items = (0, _helpers.extractEntriesFromIndex)({
|
|
753
735
|
plugins,
|
|
754
736
|
model,
|
|
@@ -773,7 +755,7 @@ const createEntriesStorageOperations = params => {
|
|
|
773
755
|
*/
|
|
774
756
|
|
|
775
757
|
|
|
776
|
-
const cursor = items.length > 0 ? (0,
|
|
758
|
+
const cursor = items.length > 0 ? (0, _apiElasticsearch.encodeCursor)(hits[items.length - 1].sort) || null : null;
|
|
777
759
|
return {
|
|
778
760
|
hasMoreItems,
|
|
779
761
|
totalCount: total.value,
|
|
@@ -785,7 +767,7 @@ const createEntriesStorageOperations = params => {
|
|
|
785
767
|
const get = async (model, params) => {
|
|
786
768
|
const {
|
|
787
769
|
items
|
|
788
|
-
} = await list(model,
|
|
770
|
+
} = await list(model, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, params), {}, {
|
|
789
771
|
limit: 1
|
|
790
772
|
}));
|
|
791
773
|
return items.shift() || null;
|
|
@@ -851,8 +833,8 @@ const createEntriesStorageOperations = params => {
|
|
|
851
833
|
});
|
|
852
834
|
}
|
|
853
835
|
|
|
854
|
-
const items = [entity.putBatch(
|
|
855
|
-
TYPE:
|
|
836
|
+
const items = [entity.putBatch((0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, storageEntry), revisionKeys), {}, {
|
|
837
|
+
TYPE: (0, _recordType.createRecordType)()
|
|
856
838
|
}))];
|
|
857
839
|
const esItems = [];
|
|
858
840
|
|
|
@@ -873,20 +855,15 @@ const createEntriesStorageOperations = params => {
|
|
|
873
855
|
const [previouslyPublishedEntry] = await dataLoaders.getRevisionById({
|
|
874
856
|
model,
|
|
875
857
|
ids: [publishedStorageEntry.id]
|
|
876
|
-
});
|
|
877
|
-
// const previouslyPublishedEntry = convertToStorageEntry({
|
|
878
|
-
// model,
|
|
879
|
-
// entry: initialPreviouslyPublishedEntry
|
|
880
|
-
// });
|
|
881
|
-
|
|
858
|
+
});
|
|
882
859
|
items.push(
|
|
883
860
|
/**
|
|
884
861
|
* Update currently published entry (unpublish it)
|
|
885
862
|
*/
|
|
886
|
-
entity.putBatch(
|
|
863
|
+
entity.putBatch((0, _objectSpread2.default)((0, _objectSpread2.default)({}, previouslyPublishedEntry), {}, {
|
|
887
864
|
status: _types.CONTENT_ENTRY_STATUS.UNPUBLISHED,
|
|
888
865
|
savedOn: entry.savedOn,
|
|
889
|
-
TYPE:
|
|
866
|
+
TYPE: (0, _recordType.createRecordType)(),
|
|
890
867
|
PK: (0, _keys.createPartitionKey)(publishedStorageEntry),
|
|
891
868
|
SK: (0, _keys.createRevisionSortKey)(publishedStorageEntry)
|
|
892
869
|
})));
|
|
@@ -896,8 +873,8 @@ const createEntriesStorageOperations = params => {
|
|
|
896
873
|
*/
|
|
897
874
|
|
|
898
875
|
|
|
899
|
-
items.push(entity.putBatch(
|
|
900
|
-
TYPE:
|
|
876
|
+
items.push(entity.putBatch((0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, storageEntry), publishedKeys), {}, {
|
|
877
|
+
TYPE: (0, _recordType.createPublishedRecordType)()
|
|
901
878
|
})));
|
|
902
879
|
/**
|
|
903
880
|
* We need the latest entry to check if it needs to be updated as well in the Elasticsearch.
|
|
@@ -909,7 +886,7 @@ const createEntriesStorageOperations = params => {
|
|
|
909
886
|
});
|
|
910
887
|
|
|
911
888
|
if ((latestStorageEntry === null || latestStorageEntry === void 0 ? void 0 : latestStorageEntry.id) === entry.id) {
|
|
912
|
-
items.push(entity.putBatch(
|
|
889
|
+
items.push(entity.putBatch((0, _objectSpread2.default)((0, _objectSpread2.default)({}, storageEntry), latestKeys)));
|
|
913
890
|
}
|
|
914
891
|
/**
|
|
915
892
|
* If we are publishing the latest revision, let's also update the latest revision's status in ES.
|
|
@@ -922,17 +899,17 @@ const createEntriesStorageOperations = params => {
|
|
|
922
899
|
*
|
|
923
900
|
* No need to transform it for the storage because it was fetched directly from the Elasticsearch table, where it sits transformed.
|
|
924
901
|
*/
|
|
925
|
-
const latestEsEntryDataDecompressed = await (0,
|
|
902
|
+
const latestEsEntryDataDecompressed = await (0, _apiElasticsearch.decompress)(plugins, latestEsEntry.data);
|
|
926
903
|
esItems.push(esEntity.putBatch({
|
|
927
904
|
index,
|
|
928
905
|
PK: (0, _keys.createPartitionKey)(latestEsEntryDataDecompressed),
|
|
929
906
|
SK: (0, _keys.createLatestSortKey)(),
|
|
930
|
-
data:
|
|
907
|
+
data: await getESLatestEntryData(plugins, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, latestEsEntryDataDecompressed), {}, {
|
|
931
908
|
status: _types.CONTENT_ENTRY_STATUS.PUBLISHED,
|
|
932
909
|
locked: true,
|
|
933
910
|
savedOn: entry.savedOn,
|
|
934
911
|
publishedOn: entry.publishedOn
|
|
935
|
-
})
|
|
912
|
+
}))
|
|
936
913
|
}));
|
|
937
914
|
}
|
|
938
915
|
|
|
@@ -946,10 +923,10 @@ const createEntriesStorageOperations = params => {
|
|
|
946
923
|
* Update the published revision entry in ES.
|
|
947
924
|
*/
|
|
948
925
|
|
|
949
|
-
const
|
|
950
|
-
esItems.push(esEntity.putBatch(
|
|
926
|
+
const esPublishedData = await getESPublishedEntryData(plugins, preparedEntryData);
|
|
927
|
+
esItems.push(esEntity.putBatch((0, _objectSpread2.default)((0, _objectSpread2.default)({}, publishedKeys), {}, {
|
|
951
928
|
index,
|
|
952
|
-
data:
|
|
929
|
+
data: esPublishedData
|
|
953
930
|
})));
|
|
954
931
|
/**
|
|
955
932
|
* Finally, execute regular table batch.
|
|
@@ -1022,10 +999,10 @@ const createEntriesStorageOperations = params => {
|
|
|
1022
999
|
const items = [entity.deleteBatch({
|
|
1023
1000
|
PK: partitionKey,
|
|
1024
1001
|
SK: (0, _keys.createPublishedSortKey)()
|
|
1025
|
-
}), entity.putBatch(
|
|
1002
|
+
}), entity.putBatch((0, _objectSpread2.default)((0, _objectSpread2.default)({}, storageEntry), {}, {
|
|
1026
1003
|
PK: partitionKey,
|
|
1027
1004
|
SK: (0, _keys.createRevisionSortKey)(entry),
|
|
1028
|
-
TYPE:
|
|
1005
|
+
TYPE: (0, _recordType.createRecordType)()
|
|
1029
1006
|
}))];
|
|
1030
1007
|
const esItems = [esEntity.deleteBatch({
|
|
1031
1008
|
PK: partitionKey,
|
|
@@ -1095,195 +1072,6 @@ const createEntriesStorageOperations = params => {
|
|
|
1095
1072
|
return initialStorageEntry;
|
|
1096
1073
|
};
|
|
1097
1074
|
|
|
1098
|
-
const requestReview = async (model, params) => {
|
|
1099
|
-
const {
|
|
1100
|
-
entry: initialEntry,
|
|
1101
|
-
storageEntry: initialStorageEntry
|
|
1102
|
-
} = params;
|
|
1103
|
-
const entry = convertToStorageEntry({
|
|
1104
|
-
model,
|
|
1105
|
-
entry: initialEntry
|
|
1106
|
-
});
|
|
1107
|
-
const storageEntry = convertToStorageEntry({
|
|
1108
|
-
model,
|
|
1109
|
-
entry: initialStorageEntry
|
|
1110
|
-
});
|
|
1111
|
-
/**
|
|
1112
|
-
* We need the latest entry to check if it needs to be updated.
|
|
1113
|
-
*/
|
|
1114
|
-
|
|
1115
|
-
const [latestStorageEntry] = await dataLoaders.getLatestRevisionByEntryId({
|
|
1116
|
-
model,
|
|
1117
|
-
ids: [entry.id]
|
|
1118
|
-
});
|
|
1119
|
-
const partitionKey = (0, _keys.createPartitionKey)({
|
|
1120
|
-
id: entry.id,
|
|
1121
|
-
locale: model.locale,
|
|
1122
|
-
tenant: model.tenant
|
|
1123
|
-
});
|
|
1124
|
-
/**
|
|
1125
|
-
* If we updated the latest version, then make sure the changes are propagated to ES too.
|
|
1126
|
-
*/
|
|
1127
|
-
|
|
1128
|
-
let esLatestData = null;
|
|
1129
|
-
|
|
1130
|
-
const {
|
|
1131
|
-
index
|
|
1132
|
-
} = _configurations.configurations.es({
|
|
1133
|
-
model
|
|
1134
|
-
});
|
|
1135
|
-
|
|
1136
|
-
if ((latestStorageEntry === null || latestStorageEntry === void 0 ? void 0 : latestStorageEntry.id) === entry.id) {
|
|
1137
|
-
const preparedEntryData = (0, _helpers.prepareEntryToIndex)({
|
|
1138
|
-
plugins,
|
|
1139
|
-
model,
|
|
1140
|
-
entry: (0, _cloneDeep.default)(entry),
|
|
1141
|
-
storageEntry: (0, _cloneDeep.default)(storageEntry)
|
|
1142
|
-
});
|
|
1143
|
-
esLatestData = await getESLatestEntryData(plugins, preparedEntryData);
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
try {
|
|
1147
|
-
await entity.put(_objectSpread(_objectSpread({}, storageEntry), {}, {
|
|
1148
|
-
PK: partitionKey,
|
|
1149
|
-
SK: (0, _keys.createRevisionSortKey)(entry),
|
|
1150
|
-
TYPE: createType()
|
|
1151
|
-
}));
|
|
1152
|
-
dataLoaders.clearAll({
|
|
1153
|
-
model
|
|
1154
|
-
});
|
|
1155
|
-
} catch (ex) {
|
|
1156
|
-
throw new _error.default(ex.message || "Could not store request review entry record into DynamoDB table.", ex.code || "REQUEST_REVIEW_ERROR", {
|
|
1157
|
-
entry,
|
|
1158
|
-
storageEntry,
|
|
1159
|
-
latestStorageEntry
|
|
1160
|
-
});
|
|
1161
|
-
}
|
|
1162
|
-
/**
|
|
1163
|
-
* No need to proceed further if nothing to put into Elasticsearch.
|
|
1164
|
-
*/
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
if (!esLatestData) {
|
|
1168
|
-
return initialStorageEntry;
|
|
1169
|
-
}
|
|
1170
|
-
|
|
1171
|
-
try {
|
|
1172
|
-
await esEntity.put({
|
|
1173
|
-
PK: partitionKey,
|
|
1174
|
-
SK: (0, _keys.createLatestSortKey)(),
|
|
1175
|
-
index,
|
|
1176
|
-
data: esLatestData
|
|
1177
|
-
});
|
|
1178
|
-
} catch (ex) {
|
|
1179
|
-
throw new _error.default(ex.message || "Could not store request review entry record into DynamoDB Elasticsearch table.", ex.code || "REQUEST_REVIEW_ERROR", {
|
|
1180
|
-
entry,
|
|
1181
|
-
storageEntry,
|
|
1182
|
-
latestStorageEntry
|
|
1183
|
-
});
|
|
1184
|
-
}
|
|
1185
|
-
|
|
1186
|
-
return initialStorageEntry;
|
|
1187
|
-
};
|
|
1188
|
-
|
|
1189
|
-
const requestChanges = async (model, params) => {
|
|
1190
|
-
const {
|
|
1191
|
-
entry: initialEntry,
|
|
1192
|
-
storageEntry: initialStorageEntry
|
|
1193
|
-
} = params;
|
|
1194
|
-
const entry = convertToStorageEntry({
|
|
1195
|
-
model,
|
|
1196
|
-
entry: initialEntry
|
|
1197
|
-
});
|
|
1198
|
-
const storageEntry = convertToStorageEntry({
|
|
1199
|
-
model,
|
|
1200
|
-
entry: initialStorageEntry
|
|
1201
|
-
});
|
|
1202
|
-
/**
|
|
1203
|
-
* We need the latest entry to check if it needs to be updated.
|
|
1204
|
-
*/
|
|
1205
|
-
|
|
1206
|
-
const [latestStorageEntry] = await dataLoaders.getLatestRevisionByEntryId({
|
|
1207
|
-
model,
|
|
1208
|
-
ids: [entry.id]
|
|
1209
|
-
});
|
|
1210
|
-
const partitionKey = (0, _keys.createPartitionKey)({
|
|
1211
|
-
id: entry.id,
|
|
1212
|
-
locale: model.locale,
|
|
1213
|
-
tenant: model.tenant
|
|
1214
|
-
});
|
|
1215
|
-
const items = [entity.putBatch(_objectSpread(_objectSpread({}, storageEntry), {}, {
|
|
1216
|
-
PK: partitionKey,
|
|
1217
|
-
SK: (0, _keys.createRevisionSortKey)(entry),
|
|
1218
|
-
TYPE: createType()
|
|
1219
|
-
}))];
|
|
1220
|
-
/**
|
|
1221
|
-
* If we updated the latest version, then make sure the changes are propagated to ES too.
|
|
1222
|
-
*/
|
|
1223
|
-
|
|
1224
|
-
const {
|
|
1225
|
-
index
|
|
1226
|
-
} = _configurations.configurations.es({
|
|
1227
|
-
model
|
|
1228
|
-
});
|
|
1229
|
-
|
|
1230
|
-
let esLatestData = null;
|
|
1231
|
-
|
|
1232
|
-
if ((latestStorageEntry === null || latestStorageEntry === void 0 ? void 0 : latestStorageEntry.id) === entry.id) {
|
|
1233
|
-
items.push(entity.putBatch(_objectSpread(_objectSpread({}, storageEntry), {}, {
|
|
1234
|
-
PK: partitionKey,
|
|
1235
|
-
SK: (0, _keys.createLatestSortKey)(),
|
|
1236
|
-
TYPE: createLatestType()
|
|
1237
|
-
})));
|
|
1238
|
-
const preparedEntryData = (0, _helpers.prepareEntryToIndex)({
|
|
1239
|
-
plugins,
|
|
1240
|
-
model,
|
|
1241
|
-
entry: (0, _cloneDeep.default)(entry),
|
|
1242
|
-
storageEntry: (0, _cloneDeep.default)(storageEntry)
|
|
1243
|
-
});
|
|
1244
|
-
esLatestData = await getESLatestEntryData(plugins, preparedEntryData);
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
|
-
try {
|
|
1248
|
-
await (0, _batchWrite.batchWriteAll)({
|
|
1249
|
-
table: entity.table,
|
|
1250
|
-
items
|
|
1251
|
-
});
|
|
1252
|
-
dataLoaders.clearAll({
|
|
1253
|
-
model
|
|
1254
|
-
});
|
|
1255
|
-
} catch (ex) {
|
|
1256
|
-
throw new _error.default(ex.message || "Could not store request changes entry record into DynamoDB table.", ex.code || "REQUEST_CHANGES_ERROR", {
|
|
1257
|
-
entry,
|
|
1258
|
-
latestStorageEntry
|
|
1259
|
-
});
|
|
1260
|
-
}
|
|
1261
|
-
/**
|
|
1262
|
-
* No need to proceed further if nothing to put into Elasticsearch.
|
|
1263
|
-
*/
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
if (!esLatestData) {
|
|
1267
|
-
return initialStorageEntry;
|
|
1268
|
-
}
|
|
1269
|
-
|
|
1270
|
-
try {
|
|
1271
|
-
await esEntity.put({
|
|
1272
|
-
PK: partitionKey,
|
|
1273
|
-
SK: (0, _keys.createLatestSortKey)(),
|
|
1274
|
-
index,
|
|
1275
|
-
data: esLatestData
|
|
1276
|
-
});
|
|
1277
|
-
} catch (ex) {
|
|
1278
|
-
throw new _error.default(ex.message || "Could not store request changes entry record into DynamoDB Elasticsearch table.", ex.code || "REQUEST_CHANGES_ERROR", {
|
|
1279
|
-
entry,
|
|
1280
|
-
latestStorageEntry
|
|
1281
|
-
});
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
|
-
return initialStorageEntry;
|
|
1285
|
-
};
|
|
1286
|
-
|
|
1287
1075
|
const getLatestRevisionByEntryId = async (model, params) => {
|
|
1288
1076
|
const [entry] = await dataLoaders.getLatestRevisionByEntryId({
|
|
1289
1077
|
model,
|
|
@@ -1408,7 +1196,7 @@ const createEntriesStorageOperations = params => {
|
|
|
1408
1196
|
*/
|
|
1409
1197
|
filters: [{
|
|
1410
1198
|
attr: "TYPE",
|
|
1411
|
-
eq:
|
|
1199
|
+
eq: (0, _recordType.createRecordType)()
|
|
1412
1200
|
}, {
|
|
1413
1201
|
attr: "version",
|
|
1414
1202
|
lt: version
|
|
@@ -1430,7 +1218,7 @@ const createEntriesStorageOperations = params => {
|
|
|
1430
1218
|
model
|
|
1431
1219
|
});
|
|
1432
1220
|
} catch (ex) {
|
|
1433
|
-
throw new _error.default(ex.message || "Could not get previous version of given entry.", ex.code || "GET_PREVIOUS_VERSION_ERROR",
|
|
1221
|
+
throw new _error.default(ex.message || "Could not get previous version of given entry.", ex.code || "GET_PREVIOUS_VERSION_ERROR", (0, _objectSpread2.default)((0, _objectSpread2.default)({}, params), {}, {
|
|
1434
1222
|
error: ex,
|
|
1435
1223
|
partitionKey: queryParams.partitionKey,
|
|
1436
1224
|
options: queryParams.options,
|
|
@@ -1448,8 +1236,6 @@ const createEntriesStorageOperations = params => {
|
|
|
1448
1236
|
get,
|
|
1449
1237
|
publish,
|
|
1450
1238
|
unpublish,
|
|
1451
|
-
requestReview,
|
|
1452
|
-
requestChanges,
|
|
1453
1239
|
list,
|
|
1454
1240
|
getLatestRevisionByEntryId,
|
|
1455
1241
|
getPublishedRevisionByEntryId,
|