@chevre/domain 20.2.0-alpha.38 → 20.2.0-alpha.39

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.
@@ -41,7 +41,7 @@ export declare class MongoRepository {
41
41
  */
42
42
  findByOrderNumber(params: {
43
43
  orderNumber: string;
44
- }): Promise<factory.order.IOrder>;
44
+ }, projection?: any): Promise<factory.order.IOrder>;
45
45
  /**
46
46
  * 注文番号で削除する
47
47
  */
@@ -769,13 +769,9 @@ class MongoRepository {
769
769
  /**
770
770
  * 注文番号から注文を取得する
771
771
  */
772
- findByOrderNumber(params) {
772
+ findByOrderNumber(params, projection) {
773
773
  return __awaiter(this, void 0, void 0, function* () {
774
- const doc = yield this.orderModel.findOne({ orderNumber: params.orderNumber }, {
775
- __v: 0,
776
- createdAt: 0,
777
- updatedAt: 0
778
- })
774
+ const doc = yield this.orderModel.findOne({ orderNumber: params.orderNumber }, Object.assign({ __v: 0, createdAt: 0, updatedAt: 0 }, projection))
779
775
  .exec();
780
776
  if (doc === null) {
781
777
  throw new factory.errors.NotFound(this.orderModel.modelName);
package/package.json CHANGED
@@ -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.2.0-alpha.38"
123
+ "version": "20.2.0-alpha.39"
124
124
  }