@chevre/domain 21.26.0-alpha.1 → 21.26.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.
@@ -20,11 +20,11 @@ async function main() {
20
20
  runsAt: {
21
21
  $gte: moment()
22
22
  // tslint:disable-next-line:no-magic-numbers
23
- .add(290, 'days')
23
+ .add(329, 'days')
24
24
  .toDate(),
25
25
  $lte: moment()
26
26
  // tslint:disable-next-line:no-magic-numbers
27
- .add(330, 'days')
27
+ .add(365, 'days')
28
28
  .toDate()
29
29
  }
30
30
  // _id: { $eq: '64aba5f37b8b8ef9eca60be5' }
@@ -152,7 +152,10 @@ function createAuthorizeMoneyTransferOfferActionattributes(params) {
152
152
  ? seller.name
153
153
  : String((_b = seller.name) === null || _b === void 0 ? void 0 : _b.ja)
154
154
  },
155
- recipient: transaction.agent,
155
+ recipient: {
156
+ id: transaction.agent.id,
157
+ typeOf: transaction.agent.typeOf
158
+ },
156
159
  purpose: { typeOf: transaction.typeOf, id: transaction.id }
157
160
  };
158
161
  }
@@ -44,7 +44,6 @@ function createActionAttributes(params) {
44
44
  return {
45
45
  project: transaction.project,
46
46
  typeOf: factory.actionType.AuthorizeAction,
47
- // Chevreサービス登録取引を使用して
48
47
  instrument: {
49
48
  typeOf: factory.assetTransactionType.RegisterService,
50
49
  transactionNumber: params.transactionNumber
@@ -57,7 +56,10 @@ function createActionAttributes(params) {
57
56
  ? transaction.seller.name
58
57
  : String((_a = transaction.seller.name) === null || _a === void 0 ? void 0 : _a.ja)
59
58
  },
60
- recipient: transaction.agent,
59
+ recipient: {
60
+ id: transaction.agent.id,
61
+ typeOf: transaction.agent.typeOf
62
+ },
61
63
  purpose: { typeOf: transaction.typeOf, id: transaction.id }
62
64
  };
63
65
  }
@@ -80,12 +80,12 @@ function createConfirmPayTransactionTasks(order, simpleOrder) {
80
80
  object: [{ typeOf: factory.assetTransactionType.Pay, transactionNumber: invoice.paymentMethodId }],
81
81
  agent: order.project,
82
82
  purpose: Object.assign(Object.assign({}, simpleOrder), { confirmationNumber: order.confirmationNumber }),
83
- instrument: {
84
- // typeOf: 'WebAPI',
85
- typeOf: factory.assetTransactionType.Pay,
86
- identifier: factory.action.authorize.paymentMethod.any.ServiceIdentifier.Chevre,
87
- transactionNumber: invoice.paymentMethodId
88
- },
83
+ // 廃止(2024-03-12~)
84
+ // instrument: {
85
+ // typeOf: factory.assetTransactionType.Pay, // 産取引化(2024-03-11~)
86
+ // identifier: factory.action.authorize.paymentMethod.any.ServiceIdentifier.Chevre,
87
+ // transactionNumber: invoice.paymentMethodId
88
+ // },
89
89
  processOrder: order.orderStatus === factory.orderStatus.OrderPaymentDue,
90
90
  useOnOrderStatusChanged: true
91
91
  };
@@ -136,8 +136,10 @@ function fixOrderAsPurpose(params) {
136
136
  function confirmReserveTransaction(params, options) {
137
137
  return (repos) => __awaiter(this, void 0, void 0, function* () {
138
138
  let confirmActionObject;
139
- switch (params.instrument.identifier) {
140
- case factory.service.webAPI.Identifier.COA:
139
+ switch (params.object.typeOf) {
140
+ // switch (params.instrument.identifier) {
141
+ case 'COAReserveTransaction':
142
+ // case factory.service.webAPI.Identifier.COA:
141
143
  // 最適化されたタスクに対応するため、ここでIObject4COAを注文から生成する(2024-01-24~)
142
144
  const order = yield fixOrderAsPurpose({
143
145
  project: { id: params.project.id },
@@ -171,8 +173,10 @@ function confirmReserveTransaction(params, options) {
171
173
  let updReserveResult;
172
174
  try {
173
175
  const object = confirmActionAttributes.object;
174
- switch (params.instrument.identifier) {
175
- case factory.service.webAPI.Identifier.COA:
176
+ switch (object.typeOf) {
177
+ // switch (params.instrument.identifier) {
178
+ case 'COAReserveTransaction':
179
+ // case factory.service.webAPI.Identifier.COA:
176
180
  // COA本予約
177
181
  updReserveResult = yield COAReserveService.confirm({
178
182
  project: { id: confirmActionAttributes.project.id },
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  ],
11
11
  "dependencies": {
12
12
  "@aws-sdk/credential-providers": "3.433.0",
13
- "@chevre/factory": "4.362.0-alpha.1",
13
+ "@chevre/factory": "4.362.0-alpha.2",
14
14
  "@cinerino/sdk": "5.14.0-alpha.0",
15
15
  "@motionpicture/coa-service": "9.4.0",
16
16
  "@motionpicture/gmo-service": "5.3.0",
@@ -110,5 +110,5 @@
110
110
  "postversion": "git push origin --tags",
111
111
  "prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
112
112
  },
113
- "version": "21.26.0-alpha.1"
113
+ "version": "21.26.0-alpha.2"
114
114
  }