@chevre/domain 21.2.0-alpha.159 → 21.2.0-alpha.160
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/giveUpStartDatePassedCertainPeriod.ts +56 -0
- package/example/src/chevre/sendEmailMessage.ts +1 -2
- package/lib/chevre/factory/order.d.ts +4 -1
- package/lib/chevre/factory/order.js +19 -6
- package/lib/chevre/repo/action.d.ts +37 -0
- package/lib/chevre/repo/action.js +21 -0
- package/lib/chevre/service/order/onOrderStatusChanged/factory.js +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged.js +2 -2
- package/lib/chevre/service/order/placeOrder.js +4 -4
- package/lib/chevre/service/order/returnOrder.js +1 -1
- package/lib/chevre/service/order/sendOrder.js +3 -3
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/givePointAward.js +1 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/moneyTransfer.js +1 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/registerService.js +1 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/sendEmailMessage.js +4 -4
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions.js +3 -4
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnMoneyTransfer.js +2 -2
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.js +5 -5
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPointAward.js +2 -2
- package/lib/chevre/service/transaction/returnOrder/potentialActions/sendEmailMessage.js +3 -3
- package/lib/chevre/service/transaction/returnOrder/potentialActions.js +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
import * as moment from 'moment';
|
|
3
|
+
import * as mongoose from 'mongoose';
|
|
4
|
+
|
|
5
|
+
import { chevre } from '../../../lib/index';
|
|
6
|
+
|
|
7
|
+
// const project = { id: String(process.env.PROJECT_ID) };
|
|
8
|
+
|
|
9
|
+
// tslint:disable-next-line:max-func-body-length
|
|
10
|
+
async function main() {
|
|
11
|
+
await mongoose.connect(<string>process.env.MONGOLAB_URI);
|
|
12
|
+
|
|
13
|
+
const actionRepo = new chevre.repository.Action(mongoose.connection);
|
|
14
|
+
const startLte = moment()
|
|
15
|
+
.add(-1, 'week')
|
|
16
|
+
.toDate();
|
|
17
|
+
|
|
18
|
+
const cursor = actionRepo.getCursor(
|
|
19
|
+
{
|
|
20
|
+
// 'project.id': { $ne: EXCLUDED_PROJECT_ID },
|
|
21
|
+
actionStatus: { $eq: chevre.factory.actionStatusType.ActiveActionStatus },
|
|
22
|
+
startDate: { $lt: startLte }
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
_id: 1,
|
|
26
|
+
startDate: 1,
|
|
27
|
+
typeOf: 1,
|
|
28
|
+
project: 1
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
console.log('actions found');
|
|
32
|
+
|
|
33
|
+
let i = 0;
|
|
34
|
+
// let updateCount = 0;
|
|
35
|
+
await cursor.eachAsync(async (doc) => {
|
|
36
|
+
i += 1;
|
|
37
|
+
// if (i > 1) {
|
|
38
|
+
// return;
|
|
39
|
+
// }
|
|
40
|
+
|
|
41
|
+
console.log('updating...', doc.project.id, doc.typeOf, doc.id, doc.startDate);
|
|
42
|
+
const result = await actionRepo.giveUpStartDatePassedCertainPeriod({
|
|
43
|
+
id: { $eq: doc.id },
|
|
44
|
+
startDate: { $lt: startLte },
|
|
45
|
+
error: new chevre.factory.errors.GatewayTimeout('unexpected timeout')
|
|
46
|
+
});
|
|
47
|
+
console.log('updated', doc.project.id, doc.typeOf, doc.id, doc.startDate, result);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
console.log(i, 'actions checked');
|
|
51
|
+
// console.log(updateCount, 'events updated');
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
main()
|
|
55
|
+
.then()
|
|
56
|
+
.catch(console.error);
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import * as factory from '../factory';
|
|
2
2
|
export declare const AWARD_ACCOUNTS_IDENTIFIER_NAME = "awardAccounts";
|
|
3
|
+
export type IMaskedCustomer = factory.order.ICustomer | Pick<factory.order.ICustomer, 'id' | 'typeOf'>;
|
|
3
4
|
/**
|
|
4
5
|
* 個人情報のマスクされたカスタマーを作成する
|
|
5
6
|
*/
|
|
6
|
-
export declare function createMaskedCustomer(order: Pick<factory.order.IOrder, 'customer'
|
|
7
|
+
export declare function createMaskedCustomer(order: Pick<factory.order.IOrder, 'customer'>, options: {
|
|
8
|
+
noProfile: boolean;
|
|
9
|
+
}): IMaskedCustomer;
|
|
@@ -6,11 +6,24 @@ const MASKED_PROFILE = '****';
|
|
|
6
6
|
/**
|
|
7
7
|
* 個人情報のマスクされたカスタマーを作成する
|
|
8
8
|
*/
|
|
9
|
-
function createMaskedCustomer(order) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
function createMaskedCustomer(order, options) {
|
|
10
|
+
// noProfileに対応する(2023-07-03~)
|
|
11
|
+
if ((options === null || options === void 0 ? void 0 : options.noProfile) === true) {
|
|
12
|
+
return {
|
|
13
|
+
id: order.customer.id,
|
|
14
|
+
typeOf: order.customer.typeOf
|
|
15
|
+
// ↓identifierも隠蔽
|
|
16
|
+
// identifier: [],
|
|
17
|
+
// ↓additionalPropertyも隠蔽
|
|
18
|
+
// additionalProperty: [],
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
return Object.assign(Object.assign({}, order.customer), {
|
|
23
|
+
// ↓identifierも隠蔽
|
|
24
|
+
identifier: [],
|
|
25
|
+
// ↓additionalPropertyも隠蔽
|
|
26
|
+
additionalProperty: [], email: MASKED_PROFILE, telephone: MASKED_PROFILE, name: MASKED_PROFILE, familyName: MASKED_PROFILE, givenName: MASKED_PROFILE });
|
|
27
|
+
}
|
|
15
28
|
}
|
|
16
29
|
exports.createMaskedCustomer = createMaskedCustomer;
|
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
1
25
|
import { Connection } from 'mongoose';
|
|
2
26
|
import * as factory from '../factory';
|
|
3
27
|
export type IAction<T extends factory.actionType> = T extends factory.actionType.OrderAction ? factory.action.trade.order.IAction : T extends factory.actionType.AuthorizeAction ? factory.action.authorize.IAction<factory.action.authorize.IAttributes<any, any>> : factory.action.IAction<factory.action.IAttributes<T, any, any>>;
|
|
@@ -61,6 +85,18 @@ export declare class MongoRepository {
|
|
|
61
85
|
id: string;
|
|
62
86
|
error: any;
|
|
63
87
|
}): Promise<IAction<T>>;
|
|
88
|
+
/**
|
|
89
|
+
* 一定期間ActiveActionStatusのアクションをFailedActionStatusにする
|
|
90
|
+
*/
|
|
91
|
+
giveUpStartDatePassedCertainPeriod(params: {
|
|
92
|
+
id?: {
|
|
93
|
+
$eq?: string;
|
|
94
|
+
};
|
|
95
|
+
error: any;
|
|
96
|
+
startDate: {
|
|
97
|
+
$lt: Date;
|
|
98
|
+
};
|
|
99
|
+
}): Promise<any>;
|
|
64
100
|
findById<T extends factory.actionType>(params: {
|
|
65
101
|
typeOf: T;
|
|
66
102
|
id: string;
|
|
@@ -220,6 +256,7 @@ export declare class MongoRepository {
|
|
|
220
256
|
startFrom: Date;
|
|
221
257
|
startThrough: Date;
|
|
222
258
|
}): Promise<IAggregateAction>;
|
|
259
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<any, import("mongoose").QueryOptions<any>>;
|
|
223
260
|
private agggregateByStatus;
|
|
224
261
|
}
|
|
225
262
|
export {};
|
|
@@ -530,6 +530,22 @@ class MongoRepository {
|
|
|
530
530
|
return doc.toObject();
|
|
531
531
|
});
|
|
532
532
|
}
|
|
533
|
+
/**
|
|
534
|
+
* 一定期間ActiveActionStatusのアクションをFailedActionStatusにする
|
|
535
|
+
*/
|
|
536
|
+
giveUpStartDatePassedCertainPeriod(params) {
|
|
537
|
+
var _a;
|
|
538
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
539
|
+
return this.actionModel.updateMany(Object.assign({ actionStatus: { $eq: factory.actionStatusType.ActiveActionStatus },
|
|
540
|
+
// 一定期間過ぎたもの
|
|
541
|
+
startDate: { $lt: params.startDate.$lt } }, (typeof ((_a = params.id) === null || _a === void 0 ? void 0 : _a.$eq) === 'string') ? { _id: { $eq: params.id.$eq } } : undefined), {
|
|
542
|
+
actionStatus: factory.actionStatusType.FailedActionStatus,
|
|
543
|
+
error: params.error,
|
|
544
|
+
endDate: new Date()
|
|
545
|
+
})
|
|
546
|
+
.exec();
|
|
547
|
+
});
|
|
548
|
+
}
|
|
533
549
|
findById(params) {
|
|
534
550
|
return __awaiter(this, void 0, void 0, function* () {
|
|
535
551
|
const doc = yield this.actionModel.findOne({
|
|
@@ -893,6 +909,11 @@ class MongoRepository {
|
|
|
893
909
|
return { statuses };
|
|
894
910
|
});
|
|
895
911
|
}
|
|
912
|
+
getCursor(conditions, projection) {
|
|
913
|
+
return this.actionModel.find(conditions, projection)
|
|
914
|
+
.sort({ startDate: factory.sortType.Ascending })
|
|
915
|
+
.cursor();
|
|
916
|
+
}
|
|
896
917
|
// tslint:disable-next-line:max-func-body-length
|
|
897
918
|
agggregateByStatus(params) {
|
|
898
919
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -117,7 +117,7 @@ function creteOrder4inform(order) {
|
|
|
117
117
|
// whitelistで作成する(2022-07-19~)
|
|
118
118
|
project: order.project, typeOf: order.typeOf, seller: order.seller, price: order.price, priceCurrency: order.priceCurrency, confirmationNumber: order.confirmationNumber, orderNumber: order.orderNumber, acceptedOffers: order.acceptedOffers, orderStatus: order.orderStatus, orderDate: order.orderDate,
|
|
119
119
|
// mask
|
|
120
|
-
customer: Object.assign(Object.assign({}, (0, order_1.createMaskedCustomer)(order)), { additionalProperty: (Array.isArray(order.customer.additionalProperty)) ? order.customer.additionalProperty : [],
|
|
120
|
+
customer: Object.assign(Object.assign({}, (0, order_1.createMaskedCustomer)(order, { noProfile: false })), { additionalProperty: (Array.isArray(order.customer.additionalProperty)) ? order.customer.additionalProperty : [],
|
|
121
121
|
// identifierは必要
|
|
122
122
|
// 予約後を隠蔽(2022-12-24~)
|
|
123
123
|
identifier: (Array.isArray(order.customer.identifier))
|
|
@@ -24,11 +24,11 @@ const TOKEN_EXPIRES_IN = 604800;
|
|
|
24
24
|
function onOrderStatusChanged(params) {
|
|
25
25
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
26
26
|
let tasks = [];
|
|
27
|
-
const maskedCustomer = (0, order_1.createMaskedCustomer)(params.order);
|
|
27
|
+
const maskedCustomer = (0, order_1.createMaskedCustomer)(params.order, { noProfile: true });
|
|
28
28
|
const simpleOrder = {
|
|
29
29
|
typeOf: params.order.typeOf,
|
|
30
30
|
seller: params.order.seller,
|
|
31
|
-
customer: { typeOf: maskedCustomer.typeOf, id: maskedCustomer.id
|
|
31
|
+
customer: { typeOf: maskedCustomer.typeOf, id: maskedCustomer.id },
|
|
32
32
|
// IOrderへ移行(2022-11-17~)
|
|
33
33
|
// confirmationNumber: params.order.confirmationNumber,
|
|
34
34
|
orderNumber: params.order.orderNumber,
|
|
@@ -105,12 +105,12 @@ function placeOrderWithoutTransaction(params) {
|
|
|
105
105
|
// orderNumber: params.object.orderNumber
|
|
106
106
|
// })({ transaction: repos.transaction });
|
|
107
107
|
// アクションを作成する(2022-04-11~)
|
|
108
|
-
const maskedCustomer = (0, order_1.createMaskedCustomer)(order);
|
|
108
|
+
const maskedCustomer = (0, order_1.createMaskedCustomer)(order, { noProfile: true });
|
|
109
109
|
const simpleOrder = {
|
|
110
110
|
// project: order.project,
|
|
111
111
|
typeOf: order.typeOf,
|
|
112
112
|
seller: order.seller,
|
|
113
|
-
customer: { typeOf: maskedCustomer.typeOf, id: maskedCustomer.id
|
|
113
|
+
customer: { typeOf: maskedCustomer.typeOf, id: maskedCustomer.id },
|
|
114
114
|
// IOrderへ移行(2022-11-17~)
|
|
115
115
|
// confirmationNumber: order.confirmationNumber,
|
|
116
116
|
orderNumber: order.orderNumber,
|
|
@@ -168,11 +168,11 @@ function placeOrder(params) {
|
|
|
168
168
|
confirmationNumber: params.object.confirmationNumber,
|
|
169
169
|
orderNumber: params.object.orderNumber
|
|
170
170
|
})({ transaction: repos.transaction });
|
|
171
|
-
const maskedCustomer = (0, order_1.createMaskedCustomer)(order);
|
|
171
|
+
const maskedCustomer = (0, order_1.createMaskedCustomer)(order, { noProfile: true });
|
|
172
172
|
const simpleOrder = {
|
|
173
173
|
typeOf: order.typeOf,
|
|
174
174
|
seller: order.seller,
|
|
175
|
-
customer: { typeOf: maskedCustomer.typeOf, id: maskedCustomer.id
|
|
175
|
+
customer: { typeOf: maskedCustomer.typeOf, id: maskedCustomer.id },
|
|
176
176
|
orderNumber: order.orderNumber,
|
|
177
177
|
price: order.price,
|
|
178
178
|
priceCurrency: order.priceCurrency,
|
|
@@ -44,7 +44,7 @@ function returnOrder(params) {
|
|
|
44
44
|
const simpleOrder = {
|
|
45
45
|
typeOf: order.typeOf,
|
|
46
46
|
seller: order.seller,
|
|
47
|
-
customer: (0, order_1.createMaskedCustomer)(order),
|
|
47
|
+
customer: (0, order_1.createMaskedCustomer)(order, { noProfile: true }),
|
|
48
48
|
orderNumber: order.orderNumber,
|
|
49
49
|
price: order.price,
|
|
50
50
|
priceCurrency: order.priceCurrency,
|
|
@@ -40,11 +40,11 @@ function sendOrder(params) {
|
|
|
40
40
|
if (order.confirmationNumber !== confirmationNumber) {
|
|
41
41
|
throw new factory.errors.NotFound('Order');
|
|
42
42
|
}
|
|
43
|
-
const maskedCustomer = (0, order_1.createMaskedCustomer)(order);
|
|
43
|
+
const maskedCustomer = (0, order_1.createMaskedCustomer)(order, { noProfile: true });
|
|
44
44
|
const simpleOrder = {
|
|
45
45
|
typeOf: order.typeOf,
|
|
46
46
|
seller: order.seller,
|
|
47
|
-
customer: { typeOf: maskedCustomer.typeOf, id: maskedCustomer.id
|
|
47
|
+
customer: { typeOf: maskedCustomer.typeOf, id: maskedCustomer.id },
|
|
48
48
|
orderNumber: order.orderNumber,
|
|
49
49
|
price: order.price,
|
|
50
50
|
priceCurrency: order.priceCurrency,
|
|
@@ -57,7 +57,7 @@ function sendOrder(params) {
|
|
|
57
57
|
// sendEmailMessage: undefined
|
|
58
58
|
},
|
|
59
59
|
project: order.project,
|
|
60
|
-
recipient: order.customer,
|
|
60
|
+
recipient: { id: order.customer.id, typeOf: order.customer.typeOf },
|
|
61
61
|
typeOf: factory.actionType.SendAction
|
|
62
62
|
};
|
|
63
63
|
const action = yield repos.action.start(sendOrderActionAttributes);
|
package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/givePointAward.js
CHANGED
|
@@ -47,7 +47,7 @@ function createGivePointAwardActions(params) {
|
|
|
47
47
|
typeOf: params.order.typeOf,
|
|
48
48
|
seller: params.order.seller,
|
|
49
49
|
// mask
|
|
50
|
-
customer: (0, order_1.createMaskedCustomer)(params.order),
|
|
50
|
+
customer: (0, order_1.createMaskedCustomer)(params.order, { noProfile: true }),
|
|
51
51
|
// IOrderへ移行(2022-11-17~)
|
|
52
52
|
// confirmationNumber: params.order.confirmationNumber,
|
|
53
53
|
orderNumber: params.order.orderNumber,
|
package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/moneyTransfer.js
CHANGED
|
@@ -65,7 +65,7 @@ function createMoneyTransferActions(params) {
|
|
|
65
65
|
typeOf: params.order.typeOf,
|
|
66
66
|
seller: params.order.seller,
|
|
67
67
|
// mask
|
|
68
|
-
customer: (0, order_1.createMaskedCustomer)(params.order),
|
|
68
|
+
customer: (0, order_1.createMaskedCustomer)(params.order, { noProfile: true }),
|
|
69
69
|
// IOrderへ移行(2022-11-17~)
|
|
70
70
|
// confirmationNumber: params.order.confirmationNumber,
|
|
71
71
|
orderNumber: params.order.orderNumber,
|
package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/registerService.js
CHANGED
|
@@ -50,7 +50,7 @@ function createRegisterServiceActions(params) {
|
|
|
50
50
|
typeOf: params.order.typeOf,
|
|
51
51
|
seller: params.order.seller,
|
|
52
52
|
// mask
|
|
53
|
-
customer: (0, order_1.createMaskedCustomer)(params.order),
|
|
53
|
+
customer: (0, order_1.createMaskedCustomer)(params.order, { noProfile: true }),
|
|
54
54
|
// IOrderへ移行(2022-11-17~)
|
|
55
55
|
// confirmationNumber: params.order.confirmationNumber,
|
|
56
56
|
orderNumber: params.order.orderNumber,
|
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
|
+
const maskedCustomer = (0, order_1.createMaskedCustomer)(params.order, { noProfile: true });
|
|
23
23
|
const sendActionPurpose = {
|
|
24
24
|
typeOf: params.order.typeOf,
|
|
25
25
|
seller: params.order.seller,
|
|
26
26
|
// mask
|
|
27
|
-
customer: { typeOf: maskedCustomer.typeOf, id: maskedCustomer.id
|
|
27
|
+
customer: { typeOf: maskedCustomer.typeOf, id: maskedCustomer.id },
|
|
28
28
|
// IOrderへ移行(2022-11-17~)
|
|
29
29
|
// confirmationNumber: params.order.confirmationNumber,
|
|
30
30
|
orderNumber: params.order.orderNumber,
|
|
@@ -48,8 +48,8 @@ function createSendEmailMessageActions(params) {
|
|
|
48
48
|
agent: params.transaction.project,
|
|
49
49
|
recipient: {
|
|
50
50
|
typeOf: params.order.customer.typeOf,
|
|
51
|
-
id: params.order.customer.id
|
|
52
|
-
name: String(params.order.customer.name)
|
|
51
|
+
id: params.order.customer.id
|
|
52
|
+
// name: String(params.order.customer.name)
|
|
53
53
|
},
|
|
54
54
|
potentialActions: {},
|
|
55
55
|
purpose: sendActionPurpose
|
|
@@ -28,13 +28,13 @@ function createPotentialActions(params) {
|
|
|
28
28
|
const givePointAwardActions = yield (0, givePointAward_1.createGivePointAwardActions)(params);
|
|
29
29
|
// 注文配送メール送信設定
|
|
30
30
|
const sendEmailMessageActions = yield (0, sendEmailMessage_1.createSendEmailMessageActions)(params);
|
|
31
|
-
const maskedCustomer = (0, order_1.createMaskedCustomer)(params.order);
|
|
31
|
+
const maskedCustomer = (0, order_1.createMaskedCustomer)(params.order, { noProfile: true });
|
|
32
32
|
const simpleOrder = {
|
|
33
33
|
// project: params.order.project,
|
|
34
34
|
typeOf: params.order.typeOf,
|
|
35
35
|
seller: params.order.seller,
|
|
36
36
|
// mask
|
|
37
|
-
customer: { typeOf: maskedCustomer.typeOf, id: maskedCustomer.id
|
|
37
|
+
customer: { typeOf: maskedCustomer.typeOf, id: maskedCustomer.id },
|
|
38
38
|
// IOrderへ移行(2022-11-17~)
|
|
39
39
|
// confirmationNumber: params.order.confirmationNumber,
|
|
40
40
|
orderNumber: params.order.orderNumber,
|
|
@@ -50,8 +50,7 @@ function createPotentialActions(params) {
|
|
|
50
50
|
agent: params.transaction.project,
|
|
51
51
|
recipient: {
|
|
52
52
|
typeOf: params.order.customer.typeOf,
|
|
53
|
-
id: params.order.customer.id
|
|
54
|
-
name: String(params.order.customer.name)
|
|
53
|
+
id: params.order.customer.id
|
|
55
54
|
},
|
|
56
55
|
potentialActions: {
|
|
57
56
|
moneyTransfer: moneyTransferActions,
|
|
@@ -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
|
+
const maskedCustomer = (0, order_1.createMaskedCustomer)(order, { noProfile: true });
|
|
21
21
|
const purpose = {
|
|
22
22
|
typeOf: order.typeOf,
|
|
23
23
|
seller: order.seller,
|
|
24
24
|
// mask
|
|
25
|
-
customer: { typeOf: maskedCustomer.typeOf, id: maskedCustomer.id
|
|
25
|
+
customer: { typeOf: maskedCustomer.typeOf, id: maskedCustomer.id },
|
|
26
26
|
// IOrderへ移行(2022-11-17~)
|
|
27
27
|
// confirmationNumber: order.confirmationNumber,
|
|
28
28
|
orderNumber: order.orderNumber,
|
|
@@ -44,7 +44,7 @@ function createReturnPaymentMethodPotentialActions(params) {
|
|
|
44
44
|
typeOf: order.typeOf,
|
|
45
45
|
seller: order.seller,
|
|
46
46
|
// mask
|
|
47
|
-
customer: (0, order_1.createMaskedCustomer)(order),
|
|
47
|
+
customer: (0, order_1.createMaskedCustomer)(order, { noProfile: true }),
|
|
48
48
|
// IOrderへ移行(2022-11-17~)
|
|
49
49
|
// confirmationNumber: order.confirmationNumber,
|
|
50
50
|
orderNumber: order.orderNumber,
|
|
@@ -59,8 +59,8 @@ function createReturnPaymentMethodPotentialActions(params) {
|
|
|
59
59
|
agent: order.project,
|
|
60
60
|
recipient: {
|
|
61
61
|
typeOf: order.customer.typeOf,
|
|
62
|
-
id: order.customer.id
|
|
63
|
-
name: String(order.customer.name)
|
|
62
|
+
id: order.customer.id
|
|
63
|
+
// name: String(order.customer.name)
|
|
64
64
|
},
|
|
65
65
|
potentialActions: {},
|
|
66
66
|
purpose: sendActionPurpose
|
|
@@ -109,7 +109,7 @@ function createReturnPaymentMethodActions(params) {
|
|
|
109
109
|
typeOf: order.typeOf,
|
|
110
110
|
seller: order.seller,
|
|
111
111
|
// mask
|
|
112
|
-
customer: (0, order_1.createMaskedCustomer)(order),
|
|
112
|
+
customer: (0, order_1.createMaskedCustomer)(order, { noProfile: true }),
|
|
113
113
|
// IOrderへ移行(2022-11-17~)
|
|
114
114
|
// confirmationNumber: order.confirmationNumber,
|
|
115
115
|
orderNumber: order.orderNumber,
|
|
@@ -188,7 +188,7 @@ function createReturnPaymentMethodIssuedThroughMovieTicketActions(params) {
|
|
|
188
188
|
typeOf: order.typeOf,
|
|
189
189
|
seller: order.seller,
|
|
190
190
|
// mask
|
|
191
|
-
customer: (0, order_1.createMaskedCustomer)(order),
|
|
191
|
+
customer: (0, order_1.createMaskedCustomer)(order, { noProfile: true }),
|
|
192
192
|
// IOrderへ移行(2022-11-17~)
|
|
193
193
|
// confirmationNumber: order.confirmationNumber,
|
|
194
194
|
orderNumber: order.orderNumber,
|
|
@@ -48,12 +48,12 @@ function createReturnPointAwardActions(params) {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
const order = params.order;
|
|
51
|
-
const maskedCustomer = (0, order_1.createMaskedCustomer)(order);
|
|
51
|
+
const maskedCustomer = (0, order_1.createMaskedCustomer)(order, { noProfile: true });
|
|
52
52
|
const purpose = {
|
|
53
53
|
typeOf: order.typeOf,
|
|
54
54
|
seller: order.seller,
|
|
55
55
|
// mask
|
|
56
|
-
customer: { typeOf: maskedCustomer.typeOf, id: maskedCustomer.id
|
|
56
|
+
customer: { typeOf: maskedCustomer.typeOf, id: maskedCustomer.id },
|
|
57
57
|
// IOrderへ移行(2022-11-17~)
|
|
58
58
|
// confirmationNumber: order.confirmationNumber,
|
|
59
59
|
orderNumber: order.orderNumber,
|
|
@@ -22,7 +22,7 @@ function createSendEmailMessaegActionsOnReturn(params) {
|
|
|
22
22
|
typeOf: order.typeOf,
|
|
23
23
|
seller: order.seller,
|
|
24
24
|
// mask
|
|
25
|
-
customer: (0, order_1.createMaskedCustomer)(order),
|
|
25
|
+
customer: (0, order_1.createMaskedCustomer)(order, { noProfile: true }),
|
|
26
26
|
// IOrderへ移行(2022-11-17~)
|
|
27
27
|
// confirmationNumber: order.confirmationNumber,
|
|
28
28
|
orderNumber: order.orderNumber,
|
|
@@ -47,8 +47,8 @@ function createSendEmailMessaegActionsOnReturn(params) {
|
|
|
47
47
|
agent: order.project,
|
|
48
48
|
recipient: {
|
|
49
49
|
typeOf: order.customer.typeOf,
|
|
50
|
-
id: order.customer.id
|
|
51
|
-
name: String(order.customer.name)
|
|
50
|
+
id: order.customer.id
|
|
51
|
+
// name: String(order.customer.name)
|
|
52
52
|
},
|
|
53
53
|
potentialActions: {},
|
|
54
54
|
purpose: sendActionPurpose
|
|
@@ -53,7 +53,7 @@ function createPotentialActions(params) {
|
|
|
53
53
|
typeOf: order.typeOf,
|
|
54
54
|
seller: order.seller,
|
|
55
55
|
// mask
|
|
56
|
-
customer: (0, order_1.createMaskedCustomer)(order),
|
|
56
|
+
customer: (0, order_1.createMaskedCustomer)(order, { noProfile: true }),
|
|
57
57
|
confirmationNumber: order.confirmationNumber,
|
|
58
58
|
orderNumber: order.orderNumber,
|
|
59
59
|
price: order.price,
|
package/package.json
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@chevre/factory": "4.313.0-alpha.
|
|
13
|
-
"@cinerino/sdk": "3.157.0-alpha.
|
|
12
|
+
"@chevre/factory": "4.313.0-alpha.48",
|
|
13
|
+
"@cinerino/sdk": "3.157.0-alpha.23",
|
|
14
14
|
"@motionpicture/coa-service": "9.2.0",
|
|
15
15
|
"@motionpicture/gmo-service": "5.2.0",
|
|
16
16
|
"@sendgrid/mail": "6.4.0",
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
"postversion": "git push origin --tags",
|
|
118
118
|
"prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
|
|
119
119
|
},
|
|
120
|
-
"version": "21.2.0-alpha.
|
|
120
|
+
"version": "21.2.0-alpha.160"
|
|
121
121
|
}
|