@chevre/domain 20.1.0-alpha.17 → 20.1.0-alpha.18

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.
@@ -249,7 +249,8 @@ class MongoRepository {
249
249
  return __awaiter(this, void 0, void 0, function* () {
250
250
  const startDate = new Date();
251
251
  let expires;
252
- if (params.typeOf === factory.transactionType.PlaceOrder) {
252
+ if (params.typeOf === factory.transactionType.PlaceOrder
253
+ || params.typeOf === factory.transactionType.ReturnOrder) {
253
254
  // expiresInSecondsの指定があれば優先して適用する(2022-11-25~)
254
255
  if (typeof params.expiresInSeconds === 'number' && params.expiresInSeconds > 0) {
255
256
  expires = moment(startDate)
@@ -55,6 +55,14 @@ function start(params) {
55
55
  returnPolicy: appliedReturnPolicy,
56
56
  reason: params.object.reason
57
57
  };
58
+ // fix expiresInSeconds(2022-11-30~)
59
+ let expiresInSeconds;
60
+ if (typeof params.expiresInSeconds === 'number') {
61
+ expiresInSeconds = params.expiresInSeconds;
62
+ }
63
+ else {
64
+ throw new factory.errors.ArgumentNull('expiresInSeconds');
65
+ }
58
66
  const returnOrderAttributes = {
59
67
  project: params.project,
60
68
  typeOf: factory.transactionType.ReturnOrder,
@@ -65,7 +73,8 @@ function start(params) {
65
73
  name: seller.name
66
74
  },
67
75
  object: transactionObject,
68
- expires: params.expires
76
+ // expires: params.expires,
77
+ expiresInSeconds
69
78
  };
70
79
  let returnOrderTransaction;
71
80
  try {
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  }
10
10
  ],
11
11
  "dependencies": {
12
- "@chevre/factory": "4.279.0-alpha.0",
12
+ "@chevre/factory": "4.279.0-alpha.1",
13
13
  "@cinerino/sdk": "3.133.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.17"
123
+ "version": "20.1.0-alpha.18"
124
124
  }