@chevre/domain 23.2.0-alpha.4 → 23.2.0-alpha.40

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.
Files changed (86) hide show
  1. package/example/src/chevre/event/importEventsFromCOAByTitle.ts +1 -1
  2. package/example/src/chevre/eventSeries/migrateEventSeriesOffers.ts +75 -0
  3. package/example/src/chevre/eventSeries/migrateEventSeriesVideoFormat.ts +80 -0
  4. package/example/src/chevre/{upsertScreeningEventSeriesByVersion.ts → eventSeries/upsertScreeningEventSeriesByVersion.ts} +47 -42
  5. package/example/src/chevre/{upsertOfferCatalogItemsByIdentifier.ts → offerCatalog/upsertOfferCatalogItemsByIdentifier.ts} +3 -3
  6. package/example/src/chevre/{upsertOfferCatalogsByIdentifier.ts → offerCatalog/upsertOfferCatalogsByIdentifier.ts} +4 -3
  7. package/example/src/chevre/place/adminEntranceGates.ts +69 -0
  8. package/example/src/chevre/place/checkEntranceGatesCount.ts +82 -0
  9. package/example/src/chevre/place/findRooms.ts +24 -0
  10. package/example/src/chevre/place/findSections.ts +28 -0
  11. package/example/src/chevre/place/migrateSectionIdentifier.ts +92 -0
  12. package/example/src/chevre/place/seatsJson2csv.ts +63 -0
  13. package/example/src/chevre/place/upsertMovieTheatersByBranchCode.ts +41 -0
  14. package/example/src/chevre/place/upsertRoomsByBranchCode.ts +40 -0
  15. package/example/src/chevre/place/upsertSeatSectionsByBranchCode.ts +56 -0
  16. package/example/src/chevre/reIndex.ts +1 -1
  17. package/example/src/chevre/roles/addAdminEventSeriesReadPermissionIfNotExists.ts +49 -0
  18. package/example/src/chevre/roles/addAdminMovieReadPermissionIfNotExists.ts +49 -0
  19. package/example/src/chevre/roles/addAdminMovieTheaterReadPermissionIfNotExists.ts +34 -0
  20. package/example/src/chevre/roles/addAdminMovieTheaterWritePermissionIfNotExists.ts +34 -0
  21. package/example/src/chevre/roles/addAdminRoomReadPermissionIfNotExists.ts +34 -0
  22. package/example/src/chevre/roles/addAdminRoomWritePermissionIfNotExists.ts +34 -0
  23. package/example/src/chevre/unsetUnnecessaryFields.ts +8 -4
  24. package/lib/chevre/factory/event.js +5 -5
  25. package/lib/chevre/repo/aggregateOrder.js +0 -93
  26. package/lib/chevre/repo/aggregateReservation.d.ts +0 -1
  27. package/lib/chevre/repo/aggregateReservation.js +0 -2
  28. package/lib/chevre/repo/creativeWork.js +9 -5
  29. package/lib/chevre/repo/event.d.ts +2 -2
  30. package/lib/chevre/repo/event.js +20 -8
  31. package/lib/chevre/repo/eventOffer.d.ts +8 -0
  32. package/lib/chevre/repo/eventOffer.js +11 -0
  33. package/lib/chevre/repo/eventSeries.d.ts +10 -4
  34. package/lib/chevre/repo/eventSeries.js +56 -28
  35. package/lib/chevre/repo/mongoose/schemas/aggregateReservation.js +0 -1
  36. package/lib/chevre/repo/mongoose/schemas/creativeWork.js +10 -9
  37. package/lib/chevre/repo/mongoose/schemas/eventSeries.js +10 -0
  38. package/lib/chevre/repo/mongoose/schemas/place.d.ts +6 -2
  39. package/lib/chevre/repo/offerCatalog.d.ts +6 -1
  40. package/lib/chevre/repo/offerCatalog.js +26 -17
  41. package/lib/chevre/repo/offerCatalogItem.d.ts +6 -1
  42. package/lib/chevre/repo/offerCatalogItem.js +24 -15
  43. package/lib/chevre/repo/place/entranceGate.d.ts +57 -0
  44. package/lib/chevre/repo/place/entranceGate.js +172 -0
  45. package/lib/chevre/repo/place/movieTheater.d.ts +40 -3
  46. package/lib/chevre/repo/place/movieTheater.js +77 -6
  47. package/lib/chevre/repo/place/screeningRoom.d.ts +60 -31
  48. package/lib/chevre/repo/place/screeningRoom.js +227 -135
  49. package/lib/chevre/repo/place/seat.d.ts +47 -45
  50. package/lib/chevre/repo/place/seat.js +175 -45
  51. package/lib/chevre/repo/place/section.d.ts +60 -30
  52. package/lib/chevre/repo/place/section.js +337 -127
  53. package/lib/chevre/repo/task.d.ts +1 -1
  54. package/lib/chevre/repository.d.ts +8 -0
  55. package/lib/chevre/repository.js +16 -0
  56. package/lib/chevre/service/assetTransaction/reserve/start/factory/createStartParams.js +6 -3
  57. package/lib/chevre/service/event/processUpdateMovieTheater.d.ts +1 -1
  58. package/lib/chevre/service/event/processUpdateMovieTheater.js +13 -11
  59. package/lib/chevre/service/event/saveScreeningEvents.d.ts +1 -1
  60. package/lib/chevre/service/event/saveScreeningEvents.js +6 -5
  61. package/lib/chevre/service/offer/event/authorize/factory.js +4 -1
  62. package/lib/chevre/service/offer/event/searchEventTicketOffers.js +7 -4
  63. package/lib/chevre/service/offer/event/searchOfferAppliesToMovieTicket.js +9 -6
  64. package/lib/chevre/service/offer/event/searchOffersByIds.js +7 -4
  65. package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.js +4 -13
  66. package/lib/chevre/service/offer/onEventChanged.js +7 -5
  67. package/lib/chevre/service/offer.d.ts +5 -0
  68. package/lib/chevre/service/offer.js +34 -9
  69. package/lib/chevre/service/order/onOrderStatusChanged/onOrderCancelled/factory.d.ts +1 -1
  70. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.d.ts +1 -1
  71. package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned/factory.d.ts +1 -1
  72. package/lib/chevre/service/task/createEvent/createEventBySchedule/factory.d.ts +1 -1
  73. package/lib/chevre/service/task/createEvent/createEventBySchedule/factory.js +5 -3
  74. package/lib/chevre/service/task/createEvent/createEventBySchedule/schedule2events.js +1 -1
  75. package/lib/chevre/service/task/onResourceDeleted.d.ts +6 -0
  76. package/lib/chevre/service/task/onResourceDeleted.js +60 -0
  77. package/lib/chevre/service/task/onResourceUpdated/onResourceDeleted.d.ts +3 -7
  78. package/lib/chevre/service/task/onResourceUpdated/onResourceDeleted.js +19 -7
  79. package/lib/chevre/service/task/onResourceUpdated.js +206 -42
  80. package/lib/chevre/service/task/syncResourcesFromCOA.js +1 -1
  81. package/lib/chevre/service/taskHandler.js +1 -0
  82. package/package.json +4 -3
  83. package/example/src/chevre/event/upsertManyScreeningEventByIdentifier.ts +0 -191
  84. package/example/src/chevre/offers/createSampleOffers.ts +0 -154
  85. package/lib/chevre/service/eventOld.d.ts +0 -60
  86. package/lib/chevre/service/eventOld.js +0 -864
@@ -19,6 +19,6 @@ declare function processUpdateMovieTheater(params: IImportFromCOAParams): (repos
19
19
  id: string;
20
20
  };
21
21
  movieTheater: IMovieTheater;
22
- screeningRooms: Omit<factory.place.screeningRoom.IPlace, "containsPlace" | "parentOrganization">[];
22
+ screeningRooms: Pick<factory.place.screeningRoom.IPlace, "additionalProperty" | "address" | "branchCode" | "name" | "openSeatingAllowed">[];
23
23
  }>;
24
24
  export { processUpdateMovieTheater };
@@ -65,7 +65,7 @@ function processUpdateMovieTheater(params) {
65
65
  if (movieTheater === undefined) {
66
66
  throw new factory.errors.NotFound(factory.placeType.MovieTheater);
67
67
  }
68
- screeningRooms = yield repos.screeningRoom.searchScreeningRooms({
68
+ screeningRooms = yield repos.screeningRoom.findRooms({
69
69
  project: { id: { $eq: params.project.id } },
70
70
  containedInPlace: { branchCode: { $eq: movieTheater.branchCode } }
71
71
  });
@@ -124,17 +124,19 @@ function createMovieTheaterFromCOA(project, seller, theaterFromCOA, screensFromC
124
124
  typeOf: 'QuantitativeValue',
125
125
  value: 1200,
126
126
  unitCode: factory.unitCode.Sec
127
- },
128
- availabilityStartsGraceTimeOnPOS: {
129
- typeOf: 'QuantitativeValue',
130
- value: -93,
131
- unitCode: factory.unitCode.Day
132
- },
133
- availabilityEndsGraceTimeOnPOS: {
134
- typeOf: 'QuantitativeValue',
135
- value: 2678400,
136
- unitCode: factory.unitCode.Sec
137
127
  }
128
+ // discontinue(2026-01-15~)
129
+ // availabilityStartsGraceTimeOnPOS: {
130
+ // typeOf: 'QuantitativeValue',
131
+ // value: -93,
132
+ // unitCode: factory.unitCode.Day
133
+ // },
134
+ // discontinue(2026-01-15~)
135
+ // availabilityEndsGraceTimeOnPOS: {
136
+ // typeOf: 'QuantitativeValue',
137
+ // value: 2678400,
138
+ // unitCode: factory.unitCode.Sec
139
+ // }
138
140
  },
139
141
  parentOrganization: { id: seller.id, typeOf: factory.organizationType.Corporation }
140
142
  };
@@ -7,7 +7,7 @@ import * as factory from '../../factory';
7
7
  type IMovieTheater = Pick<factory.place.movieTheater.IPlace, 'id' | 'typeOf' | 'branchCode' | 'name' | 'kanaName'>;
8
8
  declare function saveScreeningEvents(params: {
9
9
  movieTheater: IMovieTheater;
10
- screeningRooms: Pick<factory.place.screeningRoom.IPlace, 'typeOf' | 'branchCode' | 'name' | 'maximumAttendeeCapacity'>[];
10
+ screeningRooms: Pick<factory.place.screeningRoom.IPlace, 'branchCode' | 'name' | 'maximumAttendeeCapacity'>[];
11
11
  screeningEventSerieses?: factory.eventSeries.IEvent[];
12
12
  project: {
13
13
  id: string;
@@ -178,13 +178,14 @@ function minimizeSuperEvent(params) {
178
178
  // offers,
179
179
  // eventStatus
180
180
  } = params.superEvent;
181
- return {
182
- workPerformed, videoFormat, startDate, soundFormat,
181
+ return Object.assign({ workPerformed, startDate, soundFormat,
183
182
  name, location, kanaName, identifier,
184
183
  endDate, duration, coaInfo, alternativeHeadline,
185
184
  // additionalProperty,
186
- typeOf, id
187
- };
185
+ typeOf, id }, {
186
+ // 現時点で型廃止済だがデータとしては互換性維持(2026-01-15~)
187
+ videoFormat
188
+ });
188
189
  }
189
190
  /**
190
191
  * コアデータからイベントを作成する
@@ -266,7 +267,7 @@ function createScreeningEventFromCOA(params) {
266
267
  name: params.superEvent.name,
267
268
  eventStatus: factory.eventStatusType.EventScheduled,
268
269
  location: {
269
- typeOf: params.screenRoom.typeOf,
270
+ typeOf: factory.placeType.ScreeningRoom,
270
271
  branchCode: params.screenRoom.branchCode,
271
272
  name: params.screenRoom.name
272
273
  },
@@ -297,7 +297,10 @@ function createReservation(params) {
297
297
  startDate: moment(event.startDate)
298
298
  .toDate(),
299
299
  // 最適化(2022-05-31~)
300
- superEvent: Object.assign(Object.assign({ typeOf: event.superEvent.typeOf, id: event.superEvent.id, location: event.superEvent.location, name: event.superEvent.name, soundFormat: event.superEvent.soundFormat, videoFormat: event.superEvent.videoFormat, workPerformed }, (typeof event.superEvent.duration === 'string') ? { duration: event.superEvent.duration } : undefined), (event.superEvent.headline !== undefined) ? { headline: event.superEvent.headline } : undefined)
300
+ superEvent: Object.assign(Object.assign(Object.assign({ typeOf: event.superEvent.typeOf, id: event.superEvent.id, location: event.superEvent.location, name: event.superEvent.name, soundFormat: event.superEvent.soundFormat, workPerformed }, (typeof event.superEvent.duration === 'string') ? { duration: event.superEvent.duration } : undefined), (event.superEvent.headline !== undefined) ? { headline: event.superEvent.headline } : undefined), {
301
+ // 現時点で型廃止済だがデータとしては互換性維持(2026-01-15~)
302
+ videoFormat: event.superEvent.videoFormat
303
+ })
301
304
  };
302
305
  if (params.issuedThrough.typeOf !== factory.product.ProductType.EventService) {
303
306
  throw new factory.errors.Argument('issuedThrough', `issuedThrough.typeOf must be ${factory.product.ProductType.EventService}`);
@@ -127,7 +127,7 @@ function searchTicketOffersByItemOffered(params) {
127
127
  function searchEventTicketOffersByEvent(params) {
128
128
  // tslint:disable-next-line:max-func-body-length
129
129
  return (repos) => __awaiter(this, void 0, void 0, function* () {
130
- var _a;
130
+ var _a, _b;
131
131
  const event = params.event;
132
132
  let soundFormatTypes = [];
133
133
  let videoFormatTypes = [];
@@ -137,13 +137,16 @@ function searchEventTicketOffersByEvent(params) {
137
137
  page: 1,
138
138
  id: { $eq: event.superEvent.id }
139
139
  // typeOf: factory.eventType.ScreeningEventSeries
140
- }, ['soundFormat', 'videoFormat']);
140
+ },
141
+ // ['soundFormat', 'videoFormat', 'subEvent']
142
+ ['soundFormat', 'subEvent']);
141
143
  const superEvent = superEvents.shift();
142
144
  if (superEvent === undefined) {
143
145
  throw new factory.errors.NotFound(factory.eventType.ScreeningEventSeries);
144
146
  }
145
147
  soundFormatTypes = (Array.isArray(superEvent.soundFormat)) ? superEvent.soundFormat.map((f) => f.typeOf) : [];
146
- videoFormatTypes = (Array.isArray(superEvent.videoFormat)) ? superEvent.videoFormat.map((f) => f.typeOf) : [];
148
+ // videoFormatTypes = (Array.isArray(superEvent.videoFormat)) ? superEvent.videoFormat.map((f) => f.typeOf) : [];
149
+ videoFormatTypes = (Array.isArray((_a = superEvent.subEvent) === null || _a === void 0 ? void 0 : _a.videoFormat)) ? superEvent.subEvent.videoFormat : [];
147
150
  }
148
151
  const unacceptedPaymentMethod = getUnacceptedPaymentMethodByEvent({ event });
149
152
  // 上映方式がなければMovieTicket除外(2023-02-21~)
@@ -151,7 +154,7 @@ function searchEventTicketOffersByEvent(params) {
151
154
  // 興行設定があれば興行のカタログを参照する(2022-08-31~)
152
155
  const eventOffers = event.offers;
153
156
  const { availableOffers, sortedOfferIds } = yield searchTicketOffersByItemOffered({
154
- itemOffered: { id: String((_a = eventOffers === null || eventOffers === void 0 ? void 0 : eventOffers.itemOffered) === null || _a === void 0 ? void 0 : _a.id) },
157
+ itemOffered: { id: String((_b = eventOffers === null || eventOffers === void 0 ? void 0 : eventOffers.itemOffered) === null || _b === void 0 ? void 0 : _b.id) },
155
158
  // ids: params.ids,
156
159
  store: params.store,
157
160
  limit: params.limit,
@@ -28,7 +28,7 @@ function getUnacceptedPaymentMethodByEvent(params) {
28
28
  */
29
29
  function searchOfferAppliesToMovieTicket(params) {
30
30
  return (repos) => __awaiter(this, void 0, void 0, function* () {
31
- var _a, _b, _c, _d;
31
+ var _a, _b, _c, _d, _e;
32
32
  // optimize(2024-07-18~)
33
33
  const event = yield repos.event.projectEventFieldsById({ id: params.event.id }, ['project', 'startDate', 'typeOf', 'superEvent.id', 'offers.itemOffered.id', 'offers.unacceptedPaymentMethod']);
34
34
  // let soundFormatTypes: string[] = [];
@@ -39,13 +39,16 @@ function searchOfferAppliesToMovieTicket(params) {
39
39
  page: 1,
40
40
  id: { $eq: event.superEvent.id }
41
41
  // typeOf: factory.eventType.ScreeningEventSeries
42
- }, ['soundFormat', 'videoFormat']);
42
+ },
43
+ // ['soundFormat', 'videoFormat', 'subEvent']
44
+ ['soundFormat', 'subEvent']);
43
45
  const superEvent = superEvents.shift();
44
46
  if (superEvent === undefined) {
45
47
  throw new factory.errors.NotFound(factory.eventType.ScreeningEventSeries);
46
48
  }
47
49
  // soundFormatTypes = (Array.isArray(superEvent.soundFormat)) ? superEvent.soundFormat.map((f) => f.typeOf) : [];
48
- videoFormatTypes = (Array.isArray(superEvent.videoFormat)) ? superEvent.videoFormat.map((f) => f.typeOf) : [];
50
+ // videoFormatTypes = (Array.isArray(superEvent.videoFormat)) ? superEvent.videoFormat.map((f) => f.typeOf) : [];
51
+ videoFormatTypes = (Array.isArray((_a = superEvent.subEvent) === null || _a === void 0 ? void 0 : _a.videoFormat)) ? superEvent.subEvent.videoFormat : [];
49
52
  }
50
53
  const unacceptedPaymentMethod = getUnacceptedPaymentMethodByEvent({ event });
51
54
  // 上映方式がなければMovieTicket除外
@@ -53,7 +56,7 @@ function searchOfferAppliesToMovieTicket(params) {
53
56
  // 興行設定があれば興行のカタログを参照する
54
57
  const eventOffers = event.offers;
55
58
  let catalogId;
56
- if (typeof ((_a = eventOffers.itemOffered) === null || _a === void 0 ? void 0 : _a.id) === 'string') {
59
+ if (typeof ((_b = eventOffers.itemOffered) === null || _b === void 0 ? void 0 : _b.id) === 'string') {
57
60
  const eventService = (yield repos.product.projectFields({
58
61
  limit: 1,
59
62
  page: 1,
@@ -65,7 +68,7 @@ function searchOfferAppliesToMovieTicket(params) {
65
68
  throw new factory.errors.NotFound(factory.product.ProductType.EventService);
66
69
  }
67
70
  // const firstCatalogIdOfProduct = eventService.hasOfferCatalog?.id; // migrate to itemListElement(2024-09-30~)
68
- const firstCatalogIdOfProduct = (_c = (_b = eventService.hasOfferCatalog) === null || _b === void 0 ? void 0 : _b.itemListElement.at(0)) === null || _c === void 0 ? void 0 : _c.id;
71
+ const firstCatalogIdOfProduct = (_d = (_c = eventService.hasOfferCatalog) === null || _c === void 0 ? void 0 : _c.itemListElement.at(0)) === null || _d === void 0 ? void 0 : _d.id;
69
72
  if (typeof firstCatalogIdOfProduct === 'string') {
70
73
  catalogId = firstCatalogIdOfProduct;
71
74
  }
@@ -83,7 +86,7 @@ function searchOfferAppliesToMovieTicket(params) {
83
86
  }
84
87
  return repos.offer.searchAvaialbleAppliesToMovieTicketByOfferCatalogId({
85
88
  subOfferCatalog: { id: subOfferCatalogId, isOfferCatalogItem },
86
- availableAtOrFrom: { id: (_d = params.store) === null || _d === void 0 ? void 0 : _d.id },
89
+ availableAtOrFrom: { id: (_e = params.store) === null || _e === void 0 ? void 0 : _e.id },
87
90
  unacceptedPaymentMethod: unacceptedPaymentMethod,
88
91
  excludeAppliesToMovieTicket: excludeAppliesToMovieTicket,
89
92
  onlyValid: params.onlyValid === true,
@@ -110,7 +110,7 @@ function searchTicketOffersByItemOffered(params) {
110
110
  function searchEventTicketOffersByEvent(params) {
111
111
  // tslint:disable-next-line:max-func-body-length
112
112
  return (repos) => __awaiter(this, void 0, void 0, function* () {
113
- var _a;
113
+ var _a, _b;
114
114
  const event = params.event;
115
115
  let soundFormatTypes = [];
116
116
  let videoFormatTypes = [];
@@ -120,13 +120,16 @@ function searchEventTicketOffersByEvent(params) {
120
120
  page: 1,
121
121
  id: { $eq: event.superEvent.id }
122
122
  // typeOf: factory.eventType.ScreeningEventSeries
123
- }, ['soundFormat', 'videoFormat']);
123
+ },
124
+ // ['soundFormat', 'videoFormat', 'subEvent']
125
+ ['soundFormat', 'subEvent']);
124
126
  const superEvent = superEvents.shift();
125
127
  if (superEvent === undefined) {
126
128
  throw new factory.errors.NotFound(factory.eventType.ScreeningEventSeries);
127
129
  }
128
130
  soundFormatTypes = (Array.isArray(superEvent.soundFormat)) ? superEvent.soundFormat.map((f) => f.typeOf) : [];
129
- videoFormatTypes = (Array.isArray(superEvent.videoFormat)) ? superEvent.videoFormat.map((f) => f.typeOf) : [];
131
+ // videoFormatTypes = (Array.isArray(superEvent.videoFormat)) ? superEvent.videoFormat.map((f) => f.typeOf) : [];
132
+ videoFormatTypes = (Array.isArray((_a = superEvent.subEvent) === null || _a === void 0 ? void 0 : _a.videoFormat)) ? superEvent.subEvent.videoFormat : [];
130
133
  }
131
134
  const unacceptedPaymentMethod = getUnacceptedPaymentMethodByEvent({ event });
132
135
  // 上映方式がなければMovieTicket除外(2023-02-21~)
@@ -134,7 +137,7 @@ function searchEventTicketOffersByEvent(params) {
134
137
  // 興行設定があれば興行のカタログを参照する(2022-08-31~)
135
138
  const eventOffers = event.offers;
136
139
  const { availableOffers } = yield searchTicketOffersByItemOffered({
137
- itemOffered: { id: String((_a = eventOffers === null || eventOffers === void 0 ? void 0 : eventOffers.itemOffered) === null || _a === void 0 ? void 0 : _a.id) },
140
+ itemOffered: { id: String((_b = eventOffers === null || eventOffers === void 0 ? void 0 : eventOffers.itemOffered) === null || _b === void 0 ? void 0 : _b.id) },
138
141
  ids: params.ids,
139
142
  store: params.store,
140
143
  // limit: params.limit,
@@ -122,19 +122,10 @@ function responseBody2acceptedOffers4result(params) {
122
122
  branchCode: event.location.branchCode,
123
123
  name: event.location.name
124
124
  }, name: event.name, startDate: moment(event.startDate)
125
- .toDate(), superEvent: {
126
- typeOf: event.superEvent.typeOf,
127
- id: event.superEvent.id,
128
- identifier: event.superEvent.identifier,
129
- name: event.superEvent.name,
130
- alternativeHeadline: event.superEvent.alternativeHeadline,
131
- location: event.superEvent.location,
132
- videoFormat: event.superEvent.videoFormat,
133
- soundFormat: event.superEvent.soundFormat,
134
- workPerformed: workPerformed,
135
- duration: event.superEvent.duration,
136
- coaInfo: event.superEvent.coaInfo
137
- }, id: event.id });
125
+ .toDate(), superEvent: Object.assign({ typeOf: event.superEvent.typeOf, id: event.superEvent.id, identifier: event.superEvent.identifier, name: event.superEvent.name, alternativeHeadline: event.superEvent.alternativeHeadline, location: event.superEvent.location, soundFormat: event.superEvent.soundFormat, workPerformed: workPerformed, duration: event.superEvent.duration, coaInfo: event.superEvent.coaInfo }, {
126
+ // 現時点で型廃止済だがデータとしては互換性維持(2026-01-15~)
127
+ videoFormat: event.superEvent.videoFormat
128
+ }), id: event.id });
138
129
  const ticketNumber = util.format('%s:%s:%s', reservationFor.id, tmpReserve.seatSection, tmpReserve.seatNum);
139
130
  const ticketedSeat = {
140
131
  typeOf: factory.placeType.Seat,
@@ -165,15 +165,17 @@ function createInformTasks(params, setting) {
165
165
  id: { $in: params.ids }
166
166
  // typeOf: params.typeOf
167
167
  }, [
168
- 'project', 'organizer', 'typeOf', 'name', 'location', 'videoFormat', 'soundFormat', 'workPerformed', 'kanaName', 'eventStatus',
168
+ 'project', 'organizer', 'typeOf', 'name', 'location', 'soundFormat', 'workPerformed', 'kanaName', 'eventStatus',
169
169
  'endDate', 'startDate', 'additionalProperty', 'subtitleLanguage', 'dubLanguage',
170
- 'alternativeHeadline', 'description', 'duration', 'headline'
170
+ 'alternativeHeadline', 'description', 'duration', 'headline', 'subEvent'
171
171
  ] // inclusion(2024-07-30~)
172
172
  );
173
173
  // 最適化(2024-03-25~)
174
- events4inform = screeningEventSeries4inform.map(({ project, organizer, typeOf, name, location, id, videoFormat, soundFormat, workPerformed, kanaName, eventStatus, endDate, startDate, additionalProperty, subtitleLanguage, dubLanguage, alternativeHeadline, description, duration, headline }) => {
175
- return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ project, organizer, typeOf, name, location, id, videoFormat, soundFormat, workPerformed, kanaName, eventStatus,
176
- endDate, startDate }, (Array.isArray(additionalProperty)) ? { additionalProperty } : undefined), (subtitleLanguage !== undefined) ? {} : undefined), (dubLanguage !== undefined) ? { dubLanguage } : undefined), (alternativeHeadline !== undefined) ? { alternativeHeadline } : undefined), (description !== undefined) ? { description } : undefined), (typeof duration === 'string') ? { duration } : undefined), (headline !== undefined) ? { headline } : undefined);
174
+ events4inform = screeningEventSeries4inform.map(({ project, organizer, typeOf, name, location, id, soundFormat, workPerformed, kanaName, eventStatus, endDate, startDate, additionalProperty, subtitleLanguage, dubLanguage, alternativeHeadline, description, duration, headline, subEvent }) => {
175
+ return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ project, organizer, typeOf, name, location, id, soundFormat, workPerformed, kanaName, eventStatus,
176
+ endDate, startDate, videoFormat: (Array.isArray(subEvent === null || subEvent === void 0 ? void 0 : subEvent.videoFormat))
177
+ ? subEvent.videoFormat.map((codeValue) => ({ typeOf: codeValue, name: codeValue }))
178
+ : [] }, (Array.isArray(additionalProperty)) ? { additionalProperty } : undefined), (subtitleLanguage !== undefined) ? {} : undefined), (dubLanguage !== undefined) ? { dubLanguage } : undefined), (alternativeHeadline !== undefined) ? { alternativeHeadline } : undefined), (description !== undefined) ? { description } : undefined), (typeof duration === 'string') ? { duration } : undefined), (headline !== undefined) ? { headline } : undefined);
177
179
  });
178
180
  }
179
181
  if (events4inform.length > 0) {
@@ -50,6 +50,11 @@ export declare function searchEventSeatOffersWithPaging(params: {
50
50
  };
51
51
  $projection?: factory.place.seat.IProjection;
52
52
  options: {
53
+ /**
54
+ * レスポンスにセクションコードを含める要素をひとつめのみにするかどうか
55
+ * 2026-01-14~
56
+ */
57
+ includeSectionCodeOnlyFirstElement: boolean;
53
58
  /**
54
59
  * 自動的にひとつめのセクションに絞るかどうか
55
60
  */
@@ -58,9 +58,10 @@ 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
- const { useDefaultSection } = params.options;
64
+ const { includeSectionCodeOnlyFirstElement, useDefaultSection } = params.options;
64
65
  let offers = [];
65
66
  // optimize(2024-07-18~)
66
67
  const event = yield repos.event.projectEventFieldsById({ id: params.event.id }, ['project', 'startDate', 'offers.itemOffered', 'organizer']);
@@ -115,14 +116,38 @@ 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
+ let includeSectionCode = false;
121
+ if (includeSectionCodeOnlyFirstElement) {
122
+ if (useDefaultSection) {
123
+ // デフォルトセクション指定の場合、first elementのみセクションコードを含める
124
+ if (index === 0) {
125
+ includeSectionCode = true;
126
+ }
127
+ }
128
+ else {
129
+ includeSectionCode = true;
130
+ }
131
+ }
132
+ else {
133
+ includeSectionCode = true;
134
+ }
135
+ return Object.assign({ branchCode,
136
+ name,
137
+ seatingType,
138
+ // ...seat,
139
+ offers: [{
140
+ availability: (typeof availabilities[index] === 'string')
141
+ ? factory.itemAvailability.OutOfStock // ホルダーが存在すればOutOfStock
142
+ : factory.itemAvailability.InStock
143
+ }] }, (includeSectionCode) ? { containedInPlace } : undefined);
144
+ // return addOffers2Seat({
145
+ // seat,
146
+ // availability: (typeof availabilities[index] === 'string')
147
+ // ? factory.itemAvailability.OutOfStock // ホルダーが存在すればOutOfStock
148
+ // : factory.itemAvailability.InStock,
149
+ // priceSpecs: [] // priceSpecsをレスポンスから廃止(2024-12-22~)
150
+ // });
126
151
  });
127
152
  }
128
153
  }
@@ -7,5 +7,5 @@ import * as factory from '../../../../factory';
7
7
  */
8
8
  declare function createOnOrderCancelledTasksByTransaction(params: {
9
9
  transaction: Pick<factory.transaction.placeOrder.ITransaction, 'id' | 'project' | 'typeOf'>;
10
- }): (import("@chevre/factory/lib/task").IAttributes | import("@chevre/factory/lib/task/confirmMoneyTransfer").IAttributes | import("@chevre/factory/lib/task/confirmRegisterService").IAttributes | import("@chevre/factory/lib/task/confirmPayTransaction").IAttributes | import("@chevre/factory/lib/task/confirmRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/confirmReserveTransaction").IAttributes | import("@chevre/factory/lib/task/createAccountingReport").IAttributes | import("@chevre/factory/lib/task/createEvent").IAttributes | import("@chevre/factory/lib/task/deletePerson").IAttributes | import("@chevre/factory/lib/task/deleteTransaction").IAttributes | import("@chevre/factory/lib/task/givePointAward").IAttributes | import("@chevre/factory/lib/task/onAssetTransactionStatusChanged").IAttributes | import("@chevre/factory/lib/task/onAuthorizationCreated").IAttributes | import("@chevre/factory/lib/task/onEventChanged").IAttributes | import("@chevre/factory/lib/task/onResourceUpdated").IAttributes | import("@chevre/factory/lib/task/onOrderPaymentCompleted").IAttributes | import("@chevre/factory/lib/task/placeOrder").IAttributes | import("@chevre/factory/lib/task/returnOrder").IAttributes | import("@chevre/factory/lib/task/returnMoneyTransfer").IAttributes | import("@chevre/factory/lib/task/returnPayTransaction").IAttributes | import("@chevre/factory/lib/task/returnPointAward").IAttributes | import("@chevre/factory/lib/task/returnReserveTransaction").IAttributes | import("@chevre/factory/lib/task/sendEmailMessage").IAttributes | import("@chevre/factory/lib/task/sendOrder").IAttributes | import("@chevre/factory/lib/task/triggerWebhook").IAttributes | import("@chevre/factory/lib/task/useReservation").IAttributes | import("@chevre/factory/lib/task/voidMoneyTransferTransaction").IAttributes | import("@chevre/factory/lib/task/voidPayTransaction").IAttributes | import("@chevre/factory/lib/task/voidRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/voidReserveTransaction").IAttributes)[];
10
+ }): (import("@chevre/factory/lib/task").IAttributes | import("@chevre/factory/lib/task/confirmMoneyTransfer").IAttributes | import("@chevre/factory/lib/task/confirmRegisterService").IAttributes | import("@chevre/factory/lib/task/confirmPayTransaction").IAttributes | import("@chevre/factory/lib/task/confirmRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/confirmReserveTransaction").IAttributes | import("@chevre/factory/lib/task/createAccountingReport").IAttributes | import("@chevre/factory/lib/task/createEvent").IAttributes | import("@chevre/factory/lib/task/deletePerson").IAttributes | import("@chevre/factory/lib/task/deleteTransaction").IAttributes | import("@chevre/factory/lib/task/givePointAward").IAttributes | import("@chevre/factory/lib/task/onAssetTransactionStatusChanged").IAttributes | import("@chevre/factory/lib/task/onAuthorizationCreated").IAttributes | import("@chevre/factory/lib/task/onEventChanged").IAttributes | import("@chevre/factory/lib/task/onResourceDeleted").IAttributes | import("@chevre/factory/lib/task/onResourceUpdated").IAttributes | import("@chevre/factory/lib/task/onOrderPaymentCompleted").IAttributes | import("@chevre/factory/lib/task/placeOrder").IAttributes | import("@chevre/factory/lib/task/returnOrder").IAttributes | import("@chevre/factory/lib/task/returnMoneyTransfer").IAttributes | import("@chevre/factory/lib/task/returnPayTransaction").IAttributes | import("@chevre/factory/lib/task/returnPointAward").IAttributes | import("@chevre/factory/lib/task/returnReserveTransaction").IAttributes | import("@chevre/factory/lib/task/sendEmailMessage").IAttributes | import("@chevre/factory/lib/task/sendOrder").IAttributes | import("@chevre/factory/lib/task/triggerWebhook").IAttributes | import("@chevre/factory/lib/task/useReservation").IAttributes | import("@chevre/factory/lib/task/voidMoneyTransferTransaction").IAttributes | import("@chevre/factory/lib/task/voidPayTransaction").IAttributes | import("@chevre/factory/lib/task/voidRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/voidReserveTransaction").IAttributes)[];
11
11
  export { createOnOrderCancelledTasksByTransaction };
@@ -13,5 +13,5 @@ declare function createInformTasks(params: {
13
13
  }, setting: Pick<ISetting, 'onOrderStatusChanged'> | null): factory.task.IAttributes<factory.taskName.TriggerWebhook>[];
14
14
  declare function createNextSendOrderTasks(params: {
15
15
  order: IInTransitOrder;
16
- }): (import("@chevre/factory/lib/task").IAttributes | import("@chevre/factory/lib/task/confirmMoneyTransfer").IAttributes | import("@chevre/factory/lib/task/confirmRegisterService").IAttributes | import("@chevre/factory/lib/task/confirmPayTransaction").IAttributes | import("@chevre/factory/lib/task/confirmRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/confirmReserveTransaction").IAttributes | import("@chevre/factory/lib/task/createAccountingReport").IAttributes | import("@chevre/factory/lib/task/createEvent").IAttributes | import("@chevre/factory/lib/task/deletePerson").IAttributes | import("@chevre/factory/lib/task/deleteTransaction").IAttributes | import("@chevre/factory/lib/task/givePointAward").IAttributes | import("@chevre/factory/lib/task/onAssetTransactionStatusChanged").IAttributes | import("@chevre/factory/lib/task/onAuthorizationCreated").IAttributes | import("@chevre/factory/lib/task/onEventChanged").IAttributes | import("@chevre/factory/lib/task/onResourceUpdated").IAttributes | import("@chevre/factory/lib/task/onOrderPaymentCompleted").IAttributes | import("@chevre/factory/lib/task/placeOrder").IAttributes | import("@chevre/factory/lib/task/returnOrder").IAttributes | import("@chevre/factory/lib/task/returnMoneyTransfer").IAttributes | import("@chevre/factory/lib/task/returnPayTransaction").IAttributes | import("@chevre/factory/lib/task/returnPointAward").IAttributes | import("@chevre/factory/lib/task/returnReserveTransaction").IAttributes | import("@chevre/factory/lib/task/sendEmailMessage").IAttributes | import("@chevre/factory/lib/task/sendOrder").IAttributes | import("@chevre/factory/lib/task/triggerWebhook").IAttributes | import("@chevre/factory/lib/task/useReservation").IAttributes | import("@chevre/factory/lib/task/voidMoneyTransferTransaction").IAttributes | import("@chevre/factory/lib/task/voidPayTransaction").IAttributes | import("@chevre/factory/lib/task/voidRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/voidReserveTransaction").IAttributes)[];
16
+ }): (import("@chevre/factory/lib/task").IAttributes | import("@chevre/factory/lib/task/confirmMoneyTransfer").IAttributes | import("@chevre/factory/lib/task/confirmRegisterService").IAttributes | import("@chevre/factory/lib/task/confirmPayTransaction").IAttributes | import("@chevre/factory/lib/task/confirmRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/confirmReserveTransaction").IAttributes | import("@chevre/factory/lib/task/createAccountingReport").IAttributes | import("@chevre/factory/lib/task/createEvent").IAttributes | import("@chevre/factory/lib/task/deletePerson").IAttributes | import("@chevre/factory/lib/task/deleteTransaction").IAttributes | import("@chevre/factory/lib/task/givePointAward").IAttributes | import("@chevre/factory/lib/task/onAssetTransactionStatusChanged").IAttributes | import("@chevre/factory/lib/task/onAuthorizationCreated").IAttributes | import("@chevre/factory/lib/task/onEventChanged").IAttributes | import("@chevre/factory/lib/task/onResourceDeleted").IAttributes | import("@chevre/factory/lib/task/onResourceUpdated").IAttributes | import("@chevre/factory/lib/task/onOrderPaymentCompleted").IAttributes | import("@chevre/factory/lib/task/placeOrder").IAttributes | import("@chevre/factory/lib/task/returnOrder").IAttributes | import("@chevre/factory/lib/task/returnMoneyTransfer").IAttributes | import("@chevre/factory/lib/task/returnPayTransaction").IAttributes | import("@chevre/factory/lib/task/returnPointAward").IAttributes | import("@chevre/factory/lib/task/returnReserveTransaction").IAttributes | import("@chevre/factory/lib/task/sendEmailMessage").IAttributes | import("@chevre/factory/lib/task/sendOrder").IAttributes | import("@chevre/factory/lib/task/triggerWebhook").IAttributes | import("@chevre/factory/lib/task/useReservation").IAttributes | import("@chevre/factory/lib/task/voidMoneyTransferTransaction").IAttributes | import("@chevre/factory/lib/task/voidPayTransaction").IAttributes | import("@chevre/factory/lib/task/voidRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/voidReserveTransaction").IAttributes)[];
17
17
  export { createInformTasks, createNextSendOrderTasks, IInTransitOrder };
@@ -11,5 +11,5 @@ declare function createInformTasks(order: IReturnedOrder, returnOrderAction: IRe
11
11
  declare function createOnOrderReturnedTasksByTransaction(params: {
12
12
  order: Pick<factory.order.IOrder, 'project' | 'typeOf' | 'orderNumber' | 'customer' | 'price' | 'priceCurrency' | 'orderDate'>;
13
13
  potentialActions?: factory.action.transfer.returnAction.order.IPotentialActions;
14
- }): (import("@chevre/factory/lib/task").IAttributes | import("@chevre/factory/lib/task/confirmMoneyTransfer").IAttributes | import("@chevre/factory/lib/task/confirmRegisterService").IAttributes | import("@chevre/factory/lib/task/confirmPayTransaction").IAttributes | import("@chevre/factory/lib/task/confirmRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/confirmReserveTransaction").IAttributes | import("@chevre/factory/lib/task/createAccountingReport").IAttributes | import("@chevre/factory/lib/task/createEvent").IAttributes | import("@chevre/factory/lib/task/deletePerson").IAttributes | import("@chevre/factory/lib/task/deleteTransaction").IAttributes | import("@chevre/factory/lib/task/givePointAward").IAttributes | import("@chevre/factory/lib/task/onAssetTransactionStatusChanged").IAttributes | import("@chevre/factory/lib/task/onAuthorizationCreated").IAttributes | import("@chevre/factory/lib/task/onEventChanged").IAttributes | import("@chevre/factory/lib/task/onResourceUpdated").IAttributes | import("@chevre/factory/lib/task/onOrderPaymentCompleted").IAttributes | import("@chevre/factory/lib/task/placeOrder").IAttributes | import("@chevre/factory/lib/task/returnOrder").IAttributes | import("@chevre/factory/lib/task/returnMoneyTransfer").IAttributes | import("@chevre/factory/lib/task/returnPayTransaction").IAttributes | import("@chevre/factory/lib/task/returnPointAward").IAttributes | import("@chevre/factory/lib/task/returnReserveTransaction").IAttributes | import("@chevre/factory/lib/task/sendEmailMessage").IAttributes | import("@chevre/factory/lib/task/sendOrder").IAttributes | import("@chevre/factory/lib/task/triggerWebhook").IAttributes | import("@chevre/factory/lib/task/useReservation").IAttributes | import("@chevre/factory/lib/task/voidMoneyTransferTransaction").IAttributes | import("@chevre/factory/lib/task/voidPayTransaction").IAttributes | import("@chevre/factory/lib/task/voidRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/voidReserveTransaction").IAttributes)[];
14
+ }): (import("@chevre/factory/lib/task").IAttributes | import("@chevre/factory/lib/task/confirmMoneyTransfer").IAttributes | import("@chevre/factory/lib/task/confirmRegisterService").IAttributes | import("@chevre/factory/lib/task/confirmPayTransaction").IAttributes | import("@chevre/factory/lib/task/confirmRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/confirmReserveTransaction").IAttributes | import("@chevre/factory/lib/task/createAccountingReport").IAttributes | import("@chevre/factory/lib/task/createEvent").IAttributes | import("@chevre/factory/lib/task/deletePerson").IAttributes | import("@chevre/factory/lib/task/deleteTransaction").IAttributes | import("@chevre/factory/lib/task/givePointAward").IAttributes | import("@chevre/factory/lib/task/onAssetTransactionStatusChanged").IAttributes | import("@chevre/factory/lib/task/onAuthorizationCreated").IAttributes | import("@chevre/factory/lib/task/onEventChanged").IAttributes | import("@chevre/factory/lib/task/onResourceDeleted").IAttributes | import("@chevre/factory/lib/task/onResourceUpdated").IAttributes | import("@chevre/factory/lib/task/onOrderPaymentCompleted").IAttributes | import("@chevre/factory/lib/task/placeOrder").IAttributes | import("@chevre/factory/lib/task/returnOrder").IAttributes | import("@chevre/factory/lib/task/returnMoneyTransfer").IAttributes | import("@chevre/factory/lib/task/returnPayTransaction").IAttributes | import("@chevre/factory/lib/task/returnPointAward").IAttributes | import("@chevre/factory/lib/task/returnReserveTransaction").IAttributes | import("@chevre/factory/lib/task/sendEmailMessage").IAttributes | import("@chevre/factory/lib/task/sendOrder").IAttributes | import("@chevre/factory/lib/task/triggerWebhook").IAttributes | import("@chevre/factory/lib/task/useReservation").IAttributes | import("@chevre/factory/lib/task/voidMoneyTransferTransaction").IAttributes | import("@chevre/factory/lib/task/voidPayTransaction").IAttributes | import("@chevre/factory/lib/task/voidRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/voidReserveTransaction").IAttributes)[];
15
15
  export { createInformTasks, createOnOrderReturnedTasksByTransaction, IReturnAction };
@@ -1,7 +1,7 @@
1
1
  import type { ICreatingEvent4ttts } from '../../../../repo/event';
2
2
  import type { ICustomerMember } from '../../../../repo/member';
3
3
  import * as factory from '../../../../factory';
4
- declare function tour2creatingEvent(tour: ITourBySchedule, movieTheater: Pick<factory.place.movieTheater.IPlace, 'id' | 'branchCode' | 'parentOrganization'>, screeningRoom: Omit<factory.place.screeningRoom.IPlace, 'containsPlace' | 'parentOrganization'>, existingApplicationMembers: {
4
+ declare function tour2creatingEvent(tour: ITourBySchedule, movieTheater: Pick<factory.place.movieTheater.IPlace, 'id' | 'branchCode' | 'parentOrganization'>, screeningRoom: Pick<factory.place.screeningRoom.IPlace, 'additionalProperty' | 'address' | 'branchCode' | 'name' | 'maximumAttendeeCapacity'>, existingApplicationMembers: {
5
5
  member: ICustomerMember;
6
6
  }[], maxValue: number, eventService: Pick<factory.product.IProduct, 'id' | 'name'> & {
7
7
  id: string;
@@ -83,7 +83,7 @@ function tour2creatingEvent(tour, movieTheater, screeningRoom, existingApplicati
83
83
  }, typeOf: factory.product.ProductType.EventService, availableChannel: {
84
84
  typeOf: 'ServiceChannel',
85
85
  serviceLocation: {
86
- typeOf: screeningRoom.typeOf,
86
+ typeOf: factory.placeType.ScreeningRoom,
87
87
  branchCode: screeningRoom.branchCode,
88
88
  name: screeningRoom.name,
89
89
  containedInPlace: Object.assign({ typeOf: screeningEventSeries.location.typeOf, id: screeningEventSeries.location.id, branchCode: screeningEventSeries.location.branchCode }, (screeningEventSeries.location.name !== undefined)
@@ -93,7 +93,9 @@ function tour2creatingEvent(tour, movieTheater, screeningRoom, existingApplicati
93
93
  } }, { name: { ja: (typeof eventService.name === 'string') ? eventService.name : String((_a = eventService.name) === null || _a === void 0 ? void 0 : _a.ja) } }),
94
94
  seller: offersSeller
95
95
  };
96
- const screeningEventSuperEvent = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ typeOf: screeningEventSeries.typeOf, id: screeningEventSeries.id, videoFormat: screeningEventSeries.videoFormat, soundFormat: screeningEventSeries.soundFormat, workPerformed: screeningEventSeries.workPerformed, location: screeningEventSeries.location, kanaName: screeningEventSeries.kanaName, name: screeningEventSeries.name }, (Array.isArray(screeningEventSeries.additionalProperty))
96
+ const screeningEventSuperEvent = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ typeOf: screeningEventSeries.typeOf, id: screeningEventSeries.id,
97
+ // videoFormat: screeningEventSeries.videoFormat, // discontinue(2026-01-15~)
98
+ soundFormat: screeningEventSeries.soundFormat, workPerformed: screeningEventSeries.workPerformed, location: screeningEventSeries.location, kanaName: screeningEventSeries.kanaName, name: screeningEventSeries.name }, (Array.isArray(screeningEventSeries.additionalProperty))
97
99
  ? { additionalProperty: screeningEventSeries.additionalProperty }
98
100
  : undefined), (screeningEventSeries.startDate !== undefined)
99
101
  ? { startDate: screeningEventSeries.startDate }
@@ -104,7 +106,7 @@ function tour2creatingEvent(tour, movieTheater, screeningRoom, existingApplicati
104
106
  : undefined), (screeningEventSeries.headline !== undefined)
105
107
  ? { headline: screeningEventSeries.headline }
106
108
  : undefined);
107
- const location = Object.assign({ typeOf: screeningRoom.typeOf, branchCode: screeningRoom.branchCode, name: screeningRoom.name }, (screeningRoom.address !== undefined) ? { address: screeningRoom.address } : undefined);
109
+ const location = Object.assign({ typeOf: factory.placeType.ScreeningRoom, branchCode: screeningRoom.branchCode, name: screeningRoom.name }, (screeningRoom.address !== undefined) ? { address: screeningRoom.address } : undefined);
108
110
  return {
109
111
  project: { id: project.id, typeOf: factory.organizationType.Project },
110
112
  typeOf: factory.eventType.ScreeningEvent,
@@ -61,7 +61,7 @@ function schedule2relatedResources(schedule) {
61
61
  if (movieTheater === undefined) {
62
62
  throw new factory.errors.NotFound(factory.placeType.MovieTheater);
63
63
  }
64
- const screeningRoom = (yield repos.screeningRoom.searchScreeningRooms({
64
+ const screeningRoom = (yield repos.screeningRoom.findRooms({
65
65
  limit: 1,
66
66
  page: 1,
67
67
  project: { id: { $eq: project.id } },
@@ -0,0 +1,6 @@
1
+ import * as factory from '../../factory';
2
+ import type { ICallResult, IExecutableTaskKeys, IOperationExecute } from '../taskHandler';
3
+ /**
4
+ * タスク実行関数
5
+ */
6
+ export declare function call(params: Pick<factory.task.onResourceDeleted.ITask, IExecutableTaskKeys>): IOperationExecute<ICallResult>;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.call = call;
13
+ const action_1 = require("../../repo/action");
14
+ const aggregateOffer_1 = require("../../repo/aggregateOffer");
15
+ const categoryCode_1 = require("../../repo/categoryCode");
16
+ const event_1 = require("../../repo/event");
17
+ const eventOffer_1 = require("../../repo/eventOffer");
18
+ const eventSeries_1 = require("../../repo/eventSeries");
19
+ const member_1 = require("../../repo/member");
20
+ const note_1 = require("../../repo/note");
21
+ const offerCatalog_1 = require("../../repo/offerCatalog");
22
+ const offerCatalogItem_1 = require("../../repo/offerCatalogItem");
23
+ const paymentServiceProvider_1 = require("../../repo/paymentServiceProvider");
24
+ const hasPOS_1 = require("../../repo/place/hasPOS");
25
+ const movieTheater_1 = require("../../repo/place/movieTheater");
26
+ const screeningRoom_1 = require("../../repo/place/screeningRoom");
27
+ const product_1 = require("../../repo/product");
28
+ const productModel_1 = require("../../repo/productModel");
29
+ const productOffer_1 = require("../../repo/productOffer");
30
+ const setting_1 = require("../../repo/setting");
31
+ const task_1 = require("../../repo/task");
32
+ const onResourceDeleted_1 = require("./onResourceUpdated/onResourceDeleted");
33
+ /**
34
+ * タスク実行関数
35
+ */
36
+ function call(params) {
37
+ return (_a) => __awaiter(this, [_a], void 0, function* ({ connection }) {
38
+ yield (0, onResourceDeleted_1.onResourceDeleted)(params.data)({
39
+ action: new action_1.ActionRepo(connection),
40
+ aggregateOffer: new aggregateOffer_1.AggregateOfferRepo(connection),
41
+ categoryCode: new categoryCode_1.CategoryCodeRepo(connection),
42
+ event: new event_1.EventRepo(connection),
43
+ eventOffer: new eventOffer_1.EventOfferRepo(connection),
44
+ eventSeries: new eventSeries_1.EventSeriesRepo(connection),
45
+ hasPOS: new hasPOS_1.HasPOSRepo(connection, { id: '' }), // 先の処理で明示的に指定される
46
+ member: new member_1.MemberRepo(connection),
47
+ movieTheater: new movieTheater_1.MovieTheaterRepo(connection),
48
+ note: new note_1.NoteRepo(connection),
49
+ offerCatalog: new offerCatalog_1.OfferCatalogRepo(connection),
50
+ offerCatalogItem: new offerCatalogItem_1.OfferCatalogItemRepo(connection),
51
+ paymentServiceProvider: new paymentServiceProvider_1.PaymentServiceProviderRepo(connection),
52
+ screeningRoom: new screeningRoom_1.ScreeningRoomRepo(connection),
53
+ product: new product_1.ProductRepo(connection),
54
+ productModel: new productModel_1.ProductModelRepo(connection),
55
+ productOffer: new productOffer_1.ProductOfferRepo(connection),
56
+ setting: new setting_1.SettingRepo(connection),
57
+ task: new task_1.TaskRepo(connection)
58
+ });
59
+ });
60
+ }
@@ -1,14 +1,12 @@
1
1
  import * as factory from '../../../factory';
2
- import type { AccountTitleRepo } from '../../../repo/accountTitle';
3
2
  import type { ActionRepo } from '../../../repo/action';
4
3
  import type { AggregateOfferRepo } from '../../../repo/aggregateOffer';
5
4
  import type { CategoryCodeRepo } from '../../../repo/categoryCode';
6
- import type { CreativeWorkRepo } from '../../../repo/creativeWork';
7
5
  import type { EventRepo } from '../../../repo/event';
6
+ import type { EventOfferRepo } from '../../../repo/eventOffer';
8
7
  import type { EventSeriesRepo } from '../../../repo/eventSeries';
9
8
  import type { MemberRepo } from '../../../repo/member';
10
9
  import type { NoteRepo } from '../../../repo/note';
11
- import type { OfferRepo } from '../../../repo/offer/unitPriceInCatalog';
12
10
  import type { OfferCatalogRepo } from '../../../repo/offerCatalog';
13
11
  import type { OfferCatalogItemRepo } from '../../../repo/offerCatalogItem';
14
12
  import type { PaymentServiceProviderRepo } from '../../../repo/paymentServiceProvider';
@@ -20,20 +18,18 @@ import type { ProductModelRepo } from '../../../repo/productModel';
20
18
  import type { ProductOfferRepo } from '../../../repo/productOffer';
21
19
  import type { SettingRepo } from '../../../repo/setting';
22
20
  import type { TaskRepo } from '../../../repo/task';
23
- export declare function onResourceDeleted(params: factory.task.onResourceUpdated.IData): (repos: {
24
- accountTitle: AccountTitleRepo;
21
+ export declare function onResourceDeleted(params: factory.task.onResourceDeleted.IData): (repos: {
25
22
  action: ActionRepo;
26
23
  aggregateOffer: AggregateOfferRepo;
27
24
  categoryCode: CategoryCodeRepo;
28
- creativeWork: CreativeWorkRepo;
29
25
  event: EventRepo;
26
+ eventOffer: EventOfferRepo;
30
27
  eventSeries: EventSeriesRepo;
31
28
  hasPOS: HasPOSRepo;
32
29
  member: MemberRepo;
33
30
  movieTheater: MovieTheaterRepo;
34
31
  note: NoteRepo;
35
32
  paymentServiceProvider: PaymentServiceProviderRepo;
36
- offer: OfferRepo;
37
33
  offerCatalog: OfferCatalogRepo;
38
34
  offerCatalogItem: OfferCatalogItemRepo;
39
35
  screeningRoom: ScreeningRoomRepo;