@chevre/domain 21.2.0-alpha.5 → 21.2.0-alpha.6

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.
@@ -48,7 +48,11 @@ export declare class MongoRepository {
48
48
  /**
49
49
  * 施設検索
50
50
  */
51
- searchMovieTheaters(params: factory.place.movieTheater.ISearchConditions): Promise<factory.place.movieTheater.IPlaceWithoutScreeningRoom[]>;
51
+ searchMovieTheaters(params: factory.place.movieTheater.ISearchConditions & {
52
+ $projection?: {
53
+ [key: string]: 0;
54
+ };
55
+ }): Promise<factory.place.movieTheater.IPlaceWithoutScreeningRoom[]>;
52
56
  /**
53
57
  * 施設取得
54
58
  */
@@ -276,12 +276,7 @@ class MongoRepository {
276
276
  return __awaiter(this, void 0, void 0, function* () {
277
277
  const conditions = MongoRepository.CREATE_MOVIE_THEATER_MONGO_CONDITIONS(params);
278
278
  // containsPlaceを含めるとデータサイズが大きくなるので、検索結果には含めない
279
- const query = this.placeModel.find((conditions.length > 0) ? { $and: conditions } : {}, {
280
- __v: 0,
281
- createdAt: 0,
282
- updatedAt: 0,
283
- containsPlace: 0
284
- });
279
+ const query = this.placeModel.find((conditions.length > 0) ? { $and: conditions } : {}, Object.assign({ __v: 0, createdAt: 0, updatedAt: 0, containsPlace: 0 }, params.$projection));
285
280
  if (typeof params.limit === 'number' && params.limit > 0) {
286
281
  const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
287
282
  query.limit(params.limit)
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.5"
120
+ "version": "21.2.0-alpha.6"
121
121
  }