@chevre/domain 21.2.0-alpha.90 → 21.2.0-alpha.91

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.
@@ -58,7 +58,9 @@ export declare class MongoRepository {
58
58
  additionalProperty?: factory.propertyValue.IPropertyValue<string>[];
59
59
  name?: string;
60
60
  orderNumber: string;
61
- }): Promise<void>;
61
+ }): Promise<{
62
+ updatedAt: Date;
63
+ }>;
62
64
  findById(params: {
63
65
  id: string;
64
66
  inclusion: string[];
@@ -779,14 +779,17 @@ class MongoRepository {
779
779
  const doc = yield this.orderModel.findOneAndUpdate({ orderNumber: { $eq: params.orderNumber } }, {
780
780
  $set: Object.assign(Object.assign({}, (Array.isArray(params.additionalProperty)) ? { additionalProperty: params.additionalProperty } : undefined), (typeof params.name === 'string') ? { name: params.name } : undefined)
781
781
  }, {
782
+ new: true,
782
783
  projection: {
783
- _id: 1
784
+ _id: 1,
785
+ updatedAt: 1
784
786
  }
785
787
  })
786
788
  .exec();
787
789
  if (doc === null) {
788
790
  throw new factory.errors.NotFound(this.orderModel.modelName);
789
791
  }
792
+ return { updatedAt: doc.updatedAt };
790
793
  });
791
794
  }
792
795
  findById(params) {
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.90"
120
+ "version": "21.2.0-alpha.91"
121
121
  }