@chevre/domain 24.0.0-alpha.48 → 24.0.0-alpha.49

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.
@@ -18,7 +18,7 @@ export declare function validateStartParams(params: IStartParams): (repos: {
18
18
  assetTransaction: AssetTransactionRepo;
19
19
  }) => Promise<{
20
20
  reserveTransaction: import("@chevre/factory/lib/assetTransaction/reserve").ITransaction | undefined;
21
- reservations: (Pick<import("@chevre/factory/lib/reservation/event").IReservation, "id" | "typeOf" | "issuedThrough" | "reservationNumber"> & {
21
+ reservations: (Pick<import("@chevre/factory/lib/reservation/event").IReservation, "id" | "typeOf" | "reservationNumber" | "issuedThrough"> & {
22
22
  reservationFor: Pick<factory.reservation.eventReservation.IReservationFor, "id" | "typeOf">;
23
23
  })[] | undefined;
24
24
  }>;
@@ -25,7 +25,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.createStartParams = createStartParams;
27
27
  const factory = __importStar(require("../../../../../factory"));
28
- const USE_DEPRECATED_RESERVATION_AVAILABLE_CHANNEL = process.env.USE_DEPRECATED_RESERVATION_AVAILABLE_CHANNEL === '1';
29
28
  function createStartParams(params) {
30
29
  const { reservationNumber, acceptedOffers4transactionObject, objectSubReservations, agent, expires, project, instrument } = params;
31
30
  const provider = {
@@ -126,12 +125,6 @@ function createIssuedThrough(params) {
126
125
  typeOf: 'CategoryCode'
127
126
  }
128
127
  : undefined;
129
- const availableChannel = eventOffers.itemOffered.availableChannel;
130
- // itemOffered.availableChannel: optional(20226-03-24~)
131
- // if (availableChannel === undefined) {
132
- // // availableChannelは必ず存在するはず
133
- // throw new factory.errors.NotFound('reservationFor.offers.availableChannel');
134
- // }
135
128
  if (typeof eventOffers.itemOffered.id !== 'string') {
136
129
  // availableChannelは必ず存在するはず
137
130
  throw new factory.errors.NotFound('reservationFor.offers.itemOffered.id');
@@ -142,8 +135,7 @@ function createIssuedThrough(params) {
142
135
  // 興行IDを追加(2022-09-08~)
143
136
  id: eventOffers.itemOffered.id,
144
137
  // issuedThrough.serviceTypeを連携
145
- ...(typeof serviceTypeOfIssuedThrough?.typeOf === 'string') ? { serviceType: serviceTypeOfIssuedThrough } : undefined,
146
- ...(USE_DEPRECATED_RESERVATION_AVAILABLE_CHANNEL) && { availableChannel }
138
+ ...(typeof serviceTypeOfIssuedThrough?.typeOf === 'string') ? { serviceType: serviceTypeOfIssuedThrough } : undefined
147
139
  };
148
140
  return {
149
141
  issuedThrough
@@ -357,6 +357,23 @@ function createReservation(params) {
357
357
  ? { duration: event.superEvent.workPerformed.duration }
358
358
  : undefined
359
359
  };
360
+ const superEvent = {
361
+ typeOf: event.superEvent.typeOf,
362
+ id: event.superEvent.id,
363
+ location: event.superEvent.location,
364
+ name: event.superEvent.name,
365
+ soundFormat: event.superEvent.soundFormat,
366
+ workPerformed,
367
+ ...(typeof event.superEvent.duration === 'string') ? { duration: event.superEvent.duration } : undefined,
368
+ ...(event.superEvent.headline !== undefined) ? { headline: event.superEvent.headline } : undefined
369
+ // videoFormatをデータとしても廃止(万が一に備えてUSE_DEPRECATED_VIDEO_FORMATで再設定可能)(2026-02-03~)
370
+ // ...(USE_DEPRECATED_VIDEO_FORMAT)
371
+ // ? {
372
+ // // 現時点で型廃止済だがデータとしては互換性維持(2026-01-15~)
373
+ // videoFormat: (<any>event.superEvent).videoFormat
374
+ // }
375
+ // : undefined
376
+ };
360
377
  const reservationFor = {
361
378
  typeOf: event.typeOf,
362
379
  id: event.id,
@@ -368,24 +385,7 @@ function createReservation(params) {
368
385
  .toDate(),
369
386
  startDate: (0, moment_1.default)(event.startDate)
370
387
  .toDate(),
371
- // 最適化(2022-05-31~)
372
- superEvent: {
373
- typeOf: event.superEvent.typeOf,
374
- id: event.superEvent.id,
375
- location: event.superEvent.location,
376
- name: event.superEvent.name,
377
- soundFormat: event.superEvent.soundFormat,
378
- workPerformed,
379
- ...(typeof event.superEvent.duration === 'string') ? { duration: event.superEvent.duration } : undefined,
380
- ...(event.superEvent.headline !== undefined) ? { headline: event.superEvent.headline } : undefined
381
- // videoFormatをデータとしても廃止(万が一に備えてUSE_DEPRECATED_VIDEO_FORMATで再設定可能)(2026-02-03~)
382
- // ...(USE_DEPRECATED_VIDEO_FORMAT)
383
- // ? {
384
- // // 現時点で型廃止済だがデータとしては互換性維持(2026-01-15~)
385
- // videoFormat: (<any>event.superEvent).videoFormat
386
- // }
387
- // : undefined
388
- }
388
+ superEvent
389
389
  };
390
390
  if (params.issuedThrough.typeOf !== factory.product.ProductType.EventService) {
391
391
  throw new factory.errors.Argument('issuedThrough', `issuedThrough.typeOf must be ${factory.product.ProductType.EventService}`);
@@ -22,7 +22,7 @@ export declare function offers2resultPrice(offers: IAcceptedOffer4COA[]): {
22
22
  price: number;
23
23
  eligibleMonetaryAmount: never[];
24
24
  };
25
- type IResultAcceptedOffer = factory.order.IAcceptedOffer<factory.order.IEventReservation>;
25
+ type IResultAcceptedOffer = factory.order.IAcceptedOffer<factory.order.ICOAEventReservation>;
26
26
  /**
27
27
  * COA仮予約結果から注文アイテムを生成する
28
28
  */
@@ -32,7 +32,6 @@ exports.responseBody2acceptedOffers4result = responseBody2acceptedOffers4result;
32
32
  const moment_1 = __importDefault(require("moment"));
33
33
  const util = __importStar(require("util"));
34
34
  const factory = __importStar(require("../../../../factory"));
35
- const USE_DEPRECATED_RESERVATION_AVAILABLE_CHANNEL = process.env.USE_DEPRECATED_RESERVATION_AVAILABLE_CHANNEL === '1';
36
35
  function createAuthorizeSeatReservationActionAttributes(params) {
37
36
  const transaction = params.transaction;
38
37
  // 最適化(2022-06-07~)
@@ -135,6 +134,25 @@ function responseBody2acceptedOffers4result(params) {
135
134
  ? { id: event.superEvent.workPerformed.id }
136
135
  : undefined // redefine(2025-01-03~)
137
136
  };
137
+ const superEvent = {
138
+ typeOf: event.superEvent.typeOf,
139
+ id: event.superEvent.id,
140
+ identifier: event.superEvent.identifier,
141
+ name: event.superEvent.name,
142
+ alternativeHeadline: event.superEvent.alternativeHeadline,
143
+ location: event.superEvent.location,
144
+ soundFormat: event.superEvent.soundFormat,
145
+ workPerformed: workPerformed,
146
+ duration: event.superEvent.duration,
147
+ coaInfo: event.superEvent.coaInfo
148
+ // videoFormatをデータとしても廃止(万が一に備えてUSE_DEPRECATED_VIDEO_FORMATで再設定可能)(2026-02-03~)
149
+ // ...(USE_DEPRECATED_VIDEO_FORMAT)
150
+ // ? {
151
+ // // 現時点で型廃止済だがデータとしては互換性維持(2026-01-15~)
152
+ // videoFormat: (<any>event.superEvent).videoFormat
153
+ // }
154
+ // : undefined
155
+ };
138
156
  const reservationFor = {
139
157
  typeOf: event.typeOf,
140
158
  coaInfo: event.coaInfo,
@@ -155,25 +173,7 @@ function responseBody2acceptedOffers4result(params) {
155
173
  name: event.name,
156
174
  startDate: (0, moment_1.default)(event.startDate)
157
175
  .toDate(),
158
- superEvent: {
159
- typeOf: event.superEvent.typeOf,
160
- id: event.superEvent.id,
161
- identifier: event.superEvent.identifier,
162
- name: event.superEvent.name,
163
- alternativeHeadline: event.superEvent.alternativeHeadline,
164
- location: event.superEvent.location,
165
- soundFormat: event.superEvent.soundFormat,
166
- workPerformed: workPerformed,
167
- duration: event.superEvent.duration,
168
- coaInfo: event.superEvent.coaInfo
169
- // videoFormatをデータとしても廃止(万が一に備えてUSE_DEPRECATED_VIDEO_FORMATで再設定可能)(2026-02-03~)
170
- // ...(USE_DEPRECATED_VIDEO_FORMAT)
171
- // ? {
172
- // // 現時点で型廃止済だがデータとしては互換性維持(2026-01-15~)
173
- // videoFormat: (<any>event.superEvent).videoFormat
174
- // }
175
- // : undefined
176
- },
176
+ superEvent,
177
177
  id: event.id
178
178
  };
179
179
  const ticketNumber = util.format('%s:%s:%s', reservationFor.id, tmpReserve.seatSection, tmpReserve.seatNum);
@@ -205,24 +205,8 @@ function responseBody2acceptedOffers4result(params) {
205
205
  const additionalProperty = requestedOffer.itemOffered?.serviceOutput?.additionalProperty;
206
206
  const additionalTicketText = requestedOffer.itemOffered?.serviceOutput?.additionalTicketText;
207
207
  const issuedThrough = {
208
- typeOf: factory.product.ProductType.EventService,
208
+ typeOf: factory.product.ProductType.EventService
209
209
  // id: '', // discontinue(2025-01-02~)
210
- ...(USE_DEPRECATED_RESERVATION_AVAILABLE_CHANNEL) && {
211
- availableChannel: {
212
- typeOf: 'ServiceChannel',
213
- serviceLocation: {
214
- typeOf: reservationFor.location.typeOf,
215
- branchCode: reservationFor.location.branchCode,
216
- name: reservationFor.location.name,
217
- containedInPlace: {
218
- typeOf: reservationFor.superEvent.location.typeOf,
219
- id: reservationFor.superEvent.location.id,
220
- branchCode: reservationFor.superEvent.location.branchCode,
221
- name: reservationFor.superEvent.location.name
222
- }
223
- }
224
- }
225
- }
226
210
  };
227
211
  const reservation = {
228
212
  typeOf: factory.reservationType.EventReservation,
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "dependencies": {
12
12
  "@aws-sdk/client-cognito-identity-provider": "3.600.0",
13
13
  "@aws-sdk/credential-providers": "3.600.0",
14
- "@chevre/factory": "6.0.0",
14
+ "@chevre/factory": "6.1.0",
15
15
  "@cinerino/sdk": "13.3.1",
16
16
  "@motionpicture/coa-service": "9.6.0",
17
17
  "@motionpicture/gmo-service": "5.4.0-alpha.1",
@@ -99,5 +99,5 @@
99
99
  "postversion": "git push origin --tags",
100
100
  "prepublishOnly": "npm run clean && npm run build"
101
101
  },
102
- "version": "24.0.0-alpha.48"
102
+ "version": "24.0.0-alpha.49"
103
103
  }