@chevre/domain 20.1.0-alpha.4 → 20.1.0-alpha.5
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/example/src/chevre/deleteEvents.ts +9 -1
- package/lib/chevre/service/offer.js +6 -6
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/sendEmailMessage.js +2 -2
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnMoneyTransfer.js +2 -4
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPointAward.js +2 -5
- package/package.json +2 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// tslint:disable:no-console
|
|
2
|
+
import * as moment from 'moment';
|
|
2
3
|
import * as mongoose from 'mongoose';
|
|
3
4
|
|
|
4
5
|
import { chevre } from '../../../lib/index';
|
|
@@ -13,7 +14,14 @@ async function main() {
|
|
|
13
14
|
const cursor = eventRepo.getCursor(
|
|
14
15
|
{
|
|
15
16
|
'project.id': { $eq: project.id },
|
|
16
|
-
typeOf: { $eq: chevre.factory.eventType.ScreeningEvent }
|
|
17
|
+
typeOf: { $eq: chevre.factory.eventType.ScreeningEvent },
|
|
18
|
+
// 'superEvent.location.branchCode': { $eq: '118', $exists: true },
|
|
19
|
+
endDate: {
|
|
20
|
+
$exists: true,
|
|
21
|
+
$lt: moment()
|
|
22
|
+
.add(-1, 'month')
|
|
23
|
+
.toDate()
|
|
24
|
+
}
|
|
17
25
|
},
|
|
18
26
|
{
|
|
19
27
|
// _id: 1,
|
|
@@ -40,12 +40,11 @@ function addOffers2Seat(params) {
|
|
|
40
40
|
&& categoryCode.inCodeSet.identifier === factory.categoryCode.CategorySetIdentifier.SeatingType;
|
|
41
41
|
});
|
|
42
42
|
}));
|
|
43
|
+
// 最適化(2022-11-15~)
|
|
43
44
|
const priceSpecification = {
|
|
44
|
-
// 不要な属性を除外(2022-11-02~)
|
|
45
|
-
// project: params.project,
|
|
46
45
|
typeOf: factory.priceSpecificationType.CompoundPriceSpecification,
|
|
47
|
-
priceCurrency: factory.priceCurrency.JPY,
|
|
48
|
-
valueAddedTaxIncluded: true,
|
|
46
|
+
// priceCurrency: factory.priceCurrency.JPY,
|
|
47
|
+
// valueAddedTaxIncluded: true,
|
|
49
48
|
priceComponent: priceComponent
|
|
50
49
|
};
|
|
51
50
|
let availability = (unavailableOffer !== undefined)
|
|
@@ -55,9 +54,10 @@ function addOffers2Seat(params) {
|
|
|
55
54
|
availability = params.availability;
|
|
56
55
|
}
|
|
57
56
|
return Object.assign(Object.assign({}, params.seat), { offers: [{
|
|
58
|
-
|
|
57
|
+
// 最適化(2022-11-15~)
|
|
58
|
+
// project: params.project,
|
|
59
59
|
typeOf: factory.offerType.Offer,
|
|
60
|
-
priceCurrency: factory.priceCurrency.JPY,
|
|
60
|
+
// priceCurrency: factory.priceCurrency.JPY,
|
|
61
61
|
availability: availability,
|
|
62
62
|
priceSpecification: priceSpecification
|
|
63
63
|
}] });
|
package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/sendEmailMessage.js
CHANGED
|
@@ -19,12 +19,12 @@ function createSendEmailMessageActions(params) {
|
|
|
19
19
|
// 注文配送メール送信設定
|
|
20
20
|
const sendEmailMessageActions = [];
|
|
21
21
|
const project = params.transaction.project;
|
|
22
|
+
const maskedCustomer = (0, order_1.createMaskedCustomer)(params.order);
|
|
22
23
|
const sendActionPurpose = {
|
|
23
|
-
// project: params.order.project,
|
|
24
24
|
typeOf: params.order.typeOf,
|
|
25
25
|
seller: params.order.seller,
|
|
26
26
|
// mask
|
|
27
|
-
customer:
|
|
27
|
+
customer: { typeOf: maskedCustomer.typeOf, id: maskedCustomer.id, name: maskedCustomer.name },
|
|
28
28
|
confirmationNumber: params.order.confirmationNumber,
|
|
29
29
|
orderNumber: params.order.orderNumber,
|
|
30
30
|
price: params.order.price,
|
|
@@ -17,12 +17,12 @@ function createReturnMoneyTransferActions(params) {
|
|
|
17
17
|
return __awaiter(this, void 0, void 0, function* () {
|
|
18
18
|
const order = params.order;
|
|
19
19
|
const returnMoneyTransferActions = [];
|
|
20
|
+
const maskedCustomer = (0, order_1.createMaskedCustomer)(order);
|
|
20
21
|
const purpose = {
|
|
21
|
-
// project: order.project,
|
|
22
22
|
typeOf: order.typeOf,
|
|
23
23
|
seller: order.seller,
|
|
24
24
|
// mask
|
|
25
|
-
customer:
|
|
25
|
+
customer: { typeOf: maskedCustomer.typeOf, id: maskedCustomer.id, name: maskedCustomer.name },
|
|
26
26
|
confirmationNumber: order.confirmationNumber,
|
|
27
27
|
orderNumber: order.orderNumber,
|
|
28
28
|
price: order.price,
|
|
@@ -62,11 +62,9 @@ function createReturnMoneyTransferActions(params) {
|
|
|
62
62
|
},
|
|
63
63
|
agent: order.project,
|
|
64
64
|
recipient: {
|
|
65
|
-
// project: { typeOf: transaction.project.typeOf, id: transaction.project.id },
|
|
66
65
|
typeOf: order.seller.typeOf,
|
|
67
66
|
id: order.seller.id,
|
|
68
67
|
name: order.seller.name
|
|
69
|
-
// url: order.seller.url
|
|
70
68
|
},
|
|
71
69
|
potentialActions: {},
|
|
72
70
|
purpose,
|
|
@@ -47,14 +47,13 @@ function createReturnPointAwardActions(params) {
|
|
|
47
47
|
console.error('JSON.parse(awardAccountsStr) throws', error);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
// const transaction = params.transaction;
|
|
51
50
|
const order = params.order;
|
|
51
|
+
const maskedCustomer = (0, order_1.createMaskedCustomer)(order);
|
|
52
52
|
const purpose = {
|
|
53
|
-
// project: order.project,
|
|
54
53
|
typeOf: order.typeOf,
|
|
55
54
|
seller: order.seller,
|
|
56
55
|
// mask
|
|
57
|
-
customer:
|
|
56
|
+
customer: { typeOf: maskedCustomer.typeOf, id: maskedCustomer.id, name: maskedCustomer.name },
|
|
58
57
|
confirmationNumber: order.confirmationNumber,
|
|
59
58
|
orderNumber: order.orderNumber,
|
|
60
59
|
price: order.price,
|
|
@@ -62,11 +61,9 @@ function createReturnPointAwardActions(params) {
|
|
|
62
61
|
orderDate: order.orderDate
|
|
63
62
|
};
|
|
64
63
|
const recipient = {
|
|
65
|
-
// project: { typeOf: transaction.project.typeOf, id: transaction.project.id },
|
|
66
64
|
typeOf: order.seller.typeOf,
|
|
67
65
|
id: order.seller.id,
|
|
68
66
|
name: order.seller.name
|
|
69
|
-
// url: order.seller.url
|
|
70
67
|
};
|
|
71
68
|
// ポイントインセンティブの数だけ、返却アクションを作成
|
|
72
69
|
returnPointAwardActions.push(...pointAwardIdentifiers.map((pointAwardIdentifier) => {
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@chevre/factory": "4.277.0-alpha.
|
|
12
|
+
"@chevre/factory": "4.277.0-alpha.1",
|
|
13
13
|
"@cinerino/sdk": "3.132.0",
|
|
14
14
|
"@motionpicture/coa-service": "9.2.0",
|
|
15
15
|
"@motionpicture/gmo-service": "5.2.0",
|
|
@@ -120,5 +120,5 @@
|
|
|
120
120
|
"postversion": "git push origin --tags",
|
|
121
121
|
"prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
|
|
122
122
|
},
|
|
123
|
-
"version": "20.1.0-alpha.
|
|
123
|
+
"version": "20.1.0-alpha.5"
|
|
124
124
|
}
|