@chevre/domain 21.2.0-alpha.62 → 21.2.0-alpha.63

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.
@@ -0,0 +1 @@
1
+ dst
@@ -0,0 +1 @@
1
+ *.csv
@@ -23,7 +23,7 @@
23
23
  /// <reference types="mongoose/types/virtuals" />
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
25
  import { Schema } from 'mongoose';
26
- declare const modelName = "Offer";
26
+ declare const modelName = "OfferItemCondition";
27
27
  /**
28
28
  * アイテムコンディションスキーマ
29
29
  */
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.schema = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
5
  const writeConcern_1 = require("../writeConcern");
6
- const modelName = 'Offer';
6
+ const modelName = 'OfferItemCondition';
7
7
  exports.modelName = modelName;
8
8
  /**
9
9
  * アイテムコンディションスキーマ
@@ -313,10 +313,13 @@ function findApplicableReturnPolicy(params) {
313
313
  // restockingFeeが最低のポリシーを自動選択
314
314
  let appliedReturnPolicy = applicalbleReturnPolicies[0];
315
315
  applicalbleReturnPolicies.forEach((returnPolicy) => {
316
- const appliedReturnPolicyRestockingFee = (typeof appliedReturnPolicy.restockingFee === 'number')
317
- ? appliedReturnPolicy.restockingFee
316
+ var _a, _b;
317
+ const appliedReturnPolicyRestockingFeeValue = (_a = appliedReturnPolicy.restockingFee) === null || _a === void 0 ? void 0 : _a.value;
318
+ const restockingFeeValue = (_b = returnPolicy.restockingFee) === null || _b === void 0 ? void 0 : _b.value;
319
+ const appliedReturnPolicyRestockingFee = (typeof appliedReturnPolicyRestockingFeeValue === 'number')
320
+ ? appliedReturnPolicyRestockingFeeValue
318
321
  : 0;
319
- const restockingFee = (typeof returnPolicy.restockingFee === 'number') ? returnPolicy.restockingFee : 0;
322
+ const restockingFee = (typeof restockingFeeValue === 'number') ? restockingFeeValue : 0;
320
323
  if (restockingFee < appliedReturnPolicyRestockingFee) {
321
324
  appliedReturnPolicy = returnPolicy;
322
325
  }
package/package.json CHANGED
@@ -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.62"
120
+ "version": "21.2.0-alpha.63"
121
121
  }