@chevre/domain 20.1.0-alpha.1 → 20.1.0-alpha.2

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.
@@ -5,12 +5,13 @@ const factory = require("../../../factory");
5
5
  const order_1 = require("../../../factory/order");
6
6
  const USE_NEW_PRICE_SPEC_ON_INFORM_PAY_ACTION = process.env.USE_NEW_PRICE_SPEC_ON_INFORM_PAY_ACTION === '1';
7
7
  function createPayActions(params) {
8
+ var _a;
8
9
  const payActions = [];
9
10
  const payObject = createPayObject(params);
10
11
  const informPaymentActions = createInformPaymentActions(params);
11
12
  if (payObject !== undefined) {
12
13
  const simpleOrder = {
13
- project: params.order.project,
14
+ // project: params.order.project,
14
15
  typeOf: params.order.typeOf,
15
16
  seller: params.order.seller,
16
17
  // mask
@@ -21,25 +22,16 @@ function createPayActions(params) {
21
22
  priceCurrency: params.order.priceCurrency,
22
23
  orderDate: params.order.orderDate
23
24
  };
24
- const payAction = {
25
- project: params.transaction.project,
26
- typeOf: factory.actionType.PayAction,
27
- object: [payObject],
28
- agent: params.transaction.project,
29
- potentialActions: {
25
+ const payAction = Object.assign({ project: params.transaction.project, typeOf: factory.actionType.PayAction, object: [payObject], agent: params.transaction.project, potentialActions: {
30
26
  add2report: true,
31
27
  informPayment: informPaymentActions
32
- },
33
- purpose: simpleOrder,
34
- recipient: {
28
+ }, purpose: simpleOrder, recipient: {
35
29
  id: params.transaction.recipient.id,
36
30
  name: params.transaction.recipient.name,
37
31
  typeOf: params.transaction.recipient.typeOf
38
- }
39
- // ...(params.potentialActions?.pay?.purpose !== undefined)
40
- // ? { purpose: params.potentialActions?.pay?.purpose }
41
- // : { purpose: { typeOf: transaction.typeOf, transactionNumber: transaction.transactionNumber, id: transaction.id } }
42
- };
32
+ } }, (typeof ((_a = params.transaction.location) === null || _a === void 0 ? void 0 : _a.typeOf) === 'string')
33
+ ? { location: params.transaction.location }
34
+ : undefined);
43
35
  payActions.push(payAction);
44
36
  }
45
37
  return payActions;
@@ -46,7 +46,7 @@ function getOrderWithToken(params) {
46
46
  typeOf: params.order.seller.typeOf
47
47
  };
48
48
  const order4token = {
49
- project: params.order.project,
49
+ // project: params.order.project,
50
50
  typeOf: params.order.typeOf,
51
51
  seller: seller4orderToken,
52
52
  customer: customer4orderToken,
@@ -25,7 +25,7 @@ function onOrderStatusChanged(params) {
25
25
  return (repos) => __awaiter(this, void 0, void 0, function* () {
26
26
  let tasks = [];
27
27
  const simpleOrder = {
28
- project: params.order.project,
28
+ // project: params.order.project,
29
29
  typeOf: params.order.typeOf,
30
30
  seller: params.order.seller,
31
31
  customer: (0, order_1.createMaskedCustomer)(params.order),
@@ -90,7 +90,7 @@ function placeOrderWithoutTransaction(params) {
90
90
  // })({ transaction: repos.transaction });
91
91
  // アクションを作成する(2022-04-11~)
92
92
  const simpleOrder = {
93
- project: order.project,
93
+ // project: order.project,
94
94
  typeOf: order.typeOf,
95
95
  seller: order.seller,
96
96
  customer: (0, order_1.createMaskedCustomer)(order),
@@ -101,7 +101,7 @@ function placeOrderWithoutTransaction(params) {
101
101
  orderDate: order.orderDate
102
102
  };
103
103
  const orderActionAttributes = {
104
- agent: (typeof ((_a = params.agent) === null || _a === void 0 ? void 0 : _a.typeOf) === 'string') ? params.agent : simpleOrder.project,
104
+ agent: (typeof ((_a = params.agent) === null || _a === void 0 ? void 0 : _a.typeOf) === 'string') ? params.agent : order.project,
105
105
  object: simpleOrder,
106
106
  potentialActions: {},
107
107
  project: order.project,
@@ -149,7 +149,7 @@ function placeOrder(params) {
149
149
  })({ transaction: repos.transaction });
150
150
  // アクションを作成する(2022-04-11~)
151
151
  const simpleOrder = {
152
- project: order.project,
152
+ // project: order.project,
153
153
  typeOf: order.typeOf,
154
154
  seller: order.seller,
155
155
  customer: (0, order_1.createMaskedCustomer)(order),
@@ -160,7 +160,7 @@ function placeOrder(params) {
160
160
  orderDate: order.orderDate
161
161
  };
162
162
  const orderActionAttributes = {
163
- agent: (typeof ((_a = params.agent) === null || _a === void 0 ? void 0 : _a.typeOf) === 'string') ? params.agent : simpleOrder.project,
163
+ agent: (typeof ((_a = params.agent) === null || _a === void 0 ? void 0 : _a.typeOf) === 'string') ? params.agent : order.project,
164
164
  object: simpleOrder,
165
165
  potentialActions: {},
166
166
  project: order.project,
@@ -40,7 +40,7 @@ function returnOrder(params) {
40
40
  throw new factory.errors.NotFound(factory.transactionType.ReturnOrder);
41
41
  }
42
42
  const simpleOrder = {
43
- project: order.project,
43
+ // project: order.project,
44
44
  typeOf: order.typeOf,
45
45
  seller: order.seller,
46
46
  customer: (0, order_1.createMaskedCustomer)(order),
@@ -43,7 +43,7 @@ function sendOrder(params) {
43
43
  // SendOrderアクションを作成する
44
44
  // minimizeする(2022-04-18~)
45
45
  const simpleOrder = {
46
- project: order.project,
46
+ // project: order.project,
47
47
  typeOf: order.typeOf,
48
48
  seller: order.seller,
49
49
  customer: (0, order_1.createMaskedCustomer)(order),
@@ -54,7 +54,7 @@ function sendOrder(params) {
54
54
  orderDate: order.orderDate
55
55
  };
56
56
  const sendOrderActionAttributes = {
57
- agent: (typeof ((_a = params.agent) === null || _a === void 0 ? void 0 : _a.typeOf) === 'string') ? params.agent : simpleOrder.project,
57
+ agent: (typeof ((_a = params.agent) === null || _a === void 0 ? void 0 : _a.typeOf) === 'string') ? params.agent : order.project,
58
58
  object: simpleOrder,
59
59
  potentialActions: {
60
60
  // sendEmailMessage: undefined
@@ -43,7 +43,7 @@ function createGivePointAwardActions(params) {
43
43
  issuedThrough: { id: String((_h = (_g = (_f = givePointAwardParam.object) === null || _f === void 0 ? void 0 : _f.toLocation) === null || _g === void 0 ? void 0 : _g.issuedThrough) === null || _h === void 0 ? void 0 : _h.id) }
44
44
  }, description: (typeof description === 'string') ? description : '' }, (typeof pointAwardIdentifier === 'string') ? { identifier: pointAwardIdentifier } : undefined),
45
45
  purpose: {
46
- project: params.order.project,
46
+ // project: params.order.project,
47
47
  typeOf: params.order.typeOf,
48
48
  seller: params.order.seller,
49
49
  // mask
@@ -61,7 +61,7 @@ function createMoneyTransferActions(params) {
61
61
  // identifier: pendingTransaction.object.toLocation.identifier
62
62
  // },
63
63
  purpose: {
64
- project: params.order.project,
64
+ // project: params.order.project,
65
65
  typeOf: params.order.typeOf,
66
66
  seller: params.order.seller,
67
67
  // mask
@@ -46,7 +46,7 @@ function createRegisterServiceActions(params) {
46
46
  agent: params.transaction.project,
47
47
  // agent: params.transaction.agent,
48
48
  purpose: {
49
- project: params.order.project,
49
+ // project: params.order.project,
50
50
  typeOf: params.order.typeOf,
51
51
  seller: params.order.seller,
52
52
  // mask
@@ -20,7 +20,7 @@ function createSendEmailMessageActions(params) {
20
20
  const sendEmailMessageActions = [];
21
21
  const project = params.transaction.project;
22
22
  const sendActionPurpose = {
23
- project: params.order.project,
23
+ // project: params.order.project,
24
24
  typeOf: params.order.typeOf,
25
25
  seller: params.order.seller,
26
26
  // mask
@@ -35,7 +35,7 @@ function createPotentialActions(params) {
35
35
  // 注文配送メール送信設定
36
36
  const sendEmailMessageActions = yield (0, sendEmailMessage_1.createSendEmailMessageActions)(params);
37
37
  const simpleOrder = {
38
- project: params.order.project,
38
+ // project: params.order.project,
39
39
  typeOf: params.order.typeOf,
40
40
  seller: params.order.seller,
41
41
  // mask
@@ -18,7 +18,7 @@ function createReturnMoneyTransferActions(params) {
18
18
  const order = params.order;
19
19
  const returnMoneyTransferActions = [];
20
20
  const purpose = {
21
- project: order.project,
21
+ // project: order.project,
22
22
  typeOf: order.typeOf,
23
23
  seller: order.seller,
24
24
  // mask
@@ -40,7 +40,7 @@ function createReturnPaymentMethodPotentialActions(params) {
40
40
  email: emailCustomization
41
41
  });
42
42
  const sendActionPurpose = {
43
- project: order.project,
43
+ // project: order.project,
44
44
  typeOf: order.typeOf,
45
45
  seller: order.seller,
46
46
  // mask
@@ -104,7 +104,7 @@ function createReturnPaymentMethodActions(params) {
104
104
  name: String(order.customer.name)
105
105
  },
106
106
  purpose: {
107
- project: order.project,
107
+ // project: order.project,
108
108
  typeOf: order.typeOf,
109
109
  seller: order.seller,
110
110
  // mask
@@ -174,7 +174,7 @@ function createReturnPaymentMethodIssuedThroughMovieTicketActions(params) {
174
174
  name: String(order.customer.name)
175
175
  },
176
176
  purpose: {
177
- project: order.project,
177
+ // project: order.project,
178
178
  typeOf: order.typeOf,
179
179
  seller: order.seller,
180
180
  // mask
@@ -50,7 +50,7 @@ function createReturnPointAwardActions(params) {
50
50
  // const transaction = params.transaction;
51
51
  const order = params.order;
52
52
  const purpose = {
53
- project: order.project,
53
+ // project: order.project,
54
54
  typeOf: order.typeOf,
55
55
  seller: order.seller,
56
56
  // mask
@@ -18,7 +18,7 @@ function createSendEmailMessaegActionsOnReturn(params) {
18
18
  return __awaiter(this, void 0, void 0, function* () {
19
19
  const order = params.order;
20
20
  const sendActionPurpose = {
21
- project: order.project,
21
+ // project: order.project,
22
22
  typeOf: order.typeOf,
23
23
  seller: order.seller,
24
24
  // mask
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  }
10
10
  ],
11
11
  "dependencies": {
12
- "@chevre/factory": "4.276.0-alpha.1",
12
+ "@chevre/factory": "4.276.0-alpha.2",
13
13
  "@cinerino/sdk": "3.132.0-alpha.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.1"
123
+ "version": "20.1.0-alpha.2"
124
124
  }