@chevre/domain 23.2.0-alpha.24 → 23.2.0-alpha.25

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,6 +58,7 @@ function addOffers2Seat(params) {
58
58
  * イベントに対する座席オファーを検索する
59
59
  */
60
60
  function searchEventSeatOffersWithPaging(params) {
61
+ // tslint:disable-next-line:max-func-body-length
61
62
  return (repos) => __awaiter(this, void 0, void 0, function* () {
62
63
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
63
64
  const { useDefaultSection } = params.options;
@@ -115,14 +116,26 @@ function searchEventSeatOffersWithPaging(params) {
115
116
  };
116
117
  })
117
118
  });
118
- offers = seats.map((seat, index) => {
119
- return addOffers2Seat({
120
- seat,
121
- availability: (typeof availabilities[index] === 'string')
122
- ? factory.itemAvailability.OutOfStock // ホルダーが存在すればOutOfStock
123
- : factory.itemAvailability.InStock,
124
- priceSpecs: [] // priceSpecsをレスポンスから廃止(2024-12-22~)
125
- });
119
+ offers = seats.map(({ branchCode, name, containedInPlace, seatingType }, index) => {
120
+ // デフォルトセクション指定の場合、first elementのみセクションコードを含める
121
+ const includeSectionCode = !useDefaultSection
122
+ || (useDefaultSection && index === 0);
123
+ return Object.assign({ branchCode,
124
+ name,
125
+ seatingType,
126
+ // ...seat,
127
+ offers: [{
128
+ availability: (typeof availabilities[index] === 'string')
129
+ ? factory.itemAvailability.OutOfStock // ホルダーが存在すればOutOfStock
130
+ : factory.itemAvailability.InStock
131
+ }] }, (includeSectionCode) ? { containedInPlace } : undefined);
132
+ // return addOffers2Seat({
133
+ // seat,
134
+ // availability: (typeof availabilities[index] === 'string')
135
+ // ? factory.itemAvailability.OutOfStock // ホルダーが存在すればOutOfStock
136
+ // : factory.itemAvailability.InStock,
137
+ // priceSpecs: [] // priceSpecsをレスポンスから廃止(2024-12-22~)
138
+ // });
126
139
  });
127
140
  }
128
141
  }
package/package.json CHANGED
@@ -116,5 +116,5 @@
116
116
  "postversion": "git push origin --tags",
117
117
  "prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
118
118
  },
119
- "version": "23.2.0-alpha.24"
119
+ "version": "23.2.0-alpha.25"
120
120
  }