@chevre/domain 21.9.0-alpha.6 → 21.9.0-alpha.7
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.
|
@@ -19,24 +19,18 @@ function syncOfferCatalog(params) {
|
|
|
19
19
|
// if (params.ids.length !== 1) {
|
|
20
20
|
// throw new factory.errors.Argument('id', 'id.length must be 1');
|
|
21
21
|
// }
|
|
22
|
-
var _a
|
|
22
|
+
var _a;
|
|
23
23
|
if (params.isDeleted) {
|
|
24
24
|
for (const offerCatalogId of params.ids) {
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
break;
|
|
37
|
-
default:
|
|
38
|
-
// no op
|
|
39
|
-
}
|
|
25
|
+
// 検索しても存在しない
|
|
26
|
+
// const offerCatalogs = await repos.offerCatalog.search({ id: { $in: [offerCatalogId] } });
|
|
27
|
+
// カタログを含む全集計オファーからカタログを除外
|
|
28
|
+
yield repos.aggregateOffer.pullIncludedInDataCatalog({
|
|
29
|
+
project: { id: params.project.id },
|
|
30
|
+
$pull: {
|
|
31
|
+
includedInDataCatalog: { $elemMatch: { id: { $eq: offerCatalogId } } }
|
|
32
|
+
}
|
|
33
|
+
});
|
|
40
34
|
}
|
|
41
35
|
}
|
|
42
36
|
else {
|
|
@@ -48,7 +42,7 @@ function syncOfferCatalog(params) {
|
|
|
48
42
|
else {
|
|
49
43
|
offerCatalogs = yield repos.offerCatalog.search({ id: { $in: [offerCatalogId] } });
|
|
50
44
|
}
|
|
51
|
-
const itemListElementTypeOf = (
|
|
45
|
+
const itemListElementTypeOf = (_a = offerCatalogs.shift()) === null || _a === void 0 ? void 0 : _a.itemListElementTypeOf;
|
|
52
46
|
switch (itemListElementTypeOf) {
|
|
53
47
|
case factory.offerType.Offer:
|
|
54
48
|
// 集計オファーIDリストを検索
|
package/package.json
CHANGED