@chevre/domain 23.0.0-alpha.3 → 23.0.0-alpha.4
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.
|
@@ -4,105 +4,7 @@ exports.tour2creatingEvent = tour2creatingEvent;
|
|
|
4
4
|
exports.schedule2tours = schedule2tours;
|
|
5
5
|
const moment = require("moment-timezone");
|
|
6
6
|
const factory = require("../../../../factory");
|
|
7
|
-
|
|
8
|
-
// function schedule2createEventParams(
|
|
9
|
-
// schedule: factory.schedule.IEventWithSchedule,
|
|
10
|
-
// createDate: Date
|
|
11
|
-
// ): factory.event.screeningEvent.ICreateParams[] {
|
|
12
|
-
// const eventServiceId = schedule.offers?.itemOffered?.id;
|
|
13
|
-
// const makesOffer = schedule.offers?.seller?.makesOffer;
|
|
14
|
-
// const applicationIds: string[] = (Array.isArray(makesOffer))
|
|
15
|
-
// ? makesOffer.map(({ availableAtOrFrom }) => availableAtOrFrom.id)
|
|
16
|
-
// : [];
|
|
17
|
-
// const eventSeriesId = schedule.superEvent?.id;
|
|
18
|
-
// if (typeof eventServiceId !== 'string' || eventServiceId === '') {
|
|
19
|
-
// throw new factory.errors.NotFound('schedule.offers.itemOffered.id');
|
|
20
|
-
// }
|
|
21
|
-
// if (typeof eventSeriesId !== 'string' || eventSeriesId === '') {
|
|
22
|
-
// throw new factory.errors.NotFound('schedule.superEvent.id');
|
|
23
|
-
// }
|
|
24
|
-
// // 引数情報取得
|
|
25
|
-
// if (schedule.eventSchedule === undefined) {
|
|
26
|
-
// throw new factory.errors.NotFound('eventSchedule');
|
|
27
|
-
// }
|
|
28
|
-
// const targetInfo = getTargetInfoByEventWithSchedule(schedule, createDate);
|
|
29
|
-
// debug(targetInfo.length, 'targetInfos ->', targetInfo);
|
|
30
|
-
// const createParams: factory.event.screeningEvent.ICreateParams[] = [];
|
|
31
|
-
// for (const performanceInfo of targetInfo) {
|
|
32
|
-
// const oldEventId = [
|
|
33
|
-
// // tslint:disable-next-line:no-magic-numbers
|
|
34
|
-
// performanceInfo.day.slice(-6),
|
|
35
|
-
// workPerformedIdentifier,
|
|
36
|
-
// movieTheater.branchCode,
|
|
37
|
-
// screeningRoom.branchCode,
|
|
38
|
-
// performanceInfo.start_time
|
|
39
|
-
// ].join('');
|
|
40
|
-
// const maxValue = movieTheater.offers?.eligibleQuantity?.maxValue;
|
|
41
|
-
// const availabilityEnds: Date = moment(performanceInfo.end_date)
|
|
42
|
-
// .tz('Asia/Tokyo')
|
|
43
|
-
// .endOf('date')
|
|
44
|
-
// .toDate();
|
|
45
|
-
// const availabilityStarts: Date = moment(performanceInfo.start_date)
|
|
46
|
-
// .tz('Asia/Tokyo')
|
|
47
|
-
// .startOf('date')
|
|
48
|
-
// // tslint:disable-next-line:no-magic-numbers
|
|
49
|
-
// .add(-3, 'months')
|
|
50
|
-
// .toDate();
|
|
51
|
-
// const validThrough: Date = moment(performanceInfo.end_date)
|
|
52
|
-
// .tz('Asia/Tokyo')
|
|
53
|
-
// .endOf('date')
|
|
54
|
-
// .toDate();
|
|
55
|
-
// const validFrom: Date = moment(performanceInfo.start_date)
|
|
56
|
-
// .tz('Asia/Tokyo')
|
|
57
|
-
// .startOf('date')
|
|
58
|
-
// // tslint:disable-next-line:no-magic-numbers
|
|
59
|
-
// .add(-3, 'months')
|
|
60
|
-
// .toDate();
|
|
61
|
-
// // イベント作成
|
|
62
|
-
// createParams.push({
|
|
63
|
-
// eventStatus: factory.eventStatusType.EventScheduled,
|
|
64
|
-
// doorTime: performanceInfo.door_time,
|
|
65
|
-
// startDate: performanceInfo.start_date,
|
|
66
|
-
// endDate: performanceInfo.end_date,
|
|
67
|
-
// offers: {
|
|
68
|
-
// eligibleQuantity: {
|
|
69
|
-
// ...(typeof maxValue === 'number') ? { maxValue } : undefined // ひとまず全座席予約可能なように
|
|
70
|
-
// },
|
|
71
|
-
// itemOffered: {
|
|
72
|
-
// // 興行ID追加(2022-09-01~)
|
|
73
|
-
// id: eventServiceId,
|
|
74
|
-
// serviceOutput: {
|
|
75
|
-
// typeOf: factory.reservationType.EventReservation,
|
|
76
|
-
// reservedTicket: {
|
|
77
|
-
// typeOf: 'Ticket',
|
|
78
|
-
// ticketedSeat: { typeOf: factory.placeType.Seat }
|
|
79
|
-
// }
|
|
80
|
-
// },
|
|
81
|
-
// },
|
|
82
|
-
// seller: {
|
|
83
|
-
// // event.offersにseller.makesOfferを追加(2022-11-18~)
|
|
84
|
-
// makesOffer: applicationIds.map((applicationId) => {
|
|
85
|
-
// return {
|
|
86
|
-
// typeOf: factory.offerType.Offer,
|
|
87
|
-
// availableAtOrFrom: { id: applicationId }, // support no-array(2024-10-13~),
|
|
88
|
-
// availabilityEnds,
|
|
89
|
-
// availabilityStarts,
|
|
90
|
-
// validFrom,
|
|
91
|
-
// validThrough
|
|
92
|
-
// };
|
|
93
|
-
// })
|
|
94
|
-
// }
|
|
95
|
-
// },
|
|
96
|
-
// // 旧フォーマットIDを追加特性に追加(2022-09-08~)
|
|
97
|
-
// additionalProperty: [
|
|
98
|
-
// { name: 'tourNumber', value: String(performanceInfo.tour_number) },
|
|
99
|
-
// { name: 'oldEventId', value: oldEventId }
|
|
100
|
-
// ],
|
|
101
|
-
// identifier: oldEventId
|
|
102
|
-
// });
|
|
103
|
-
// }
|
|
104
|
-
// return createParams;
|
|
105
|
-
// }
|
|
7
|
+
const TIMEZONE = 'Asia/Tokyo';
|
|
106
8
|
// tslint:disable-next-line:max-func-body-length
|
|
107
9
|
function tour2creatingEvent(tour, movieTheater, screeningRoom, existingApplicationMembers, maxValue, eventService, screeningEventSeries, project) {
|
|
108
10
|
var _a;
|
|
@@ -115,22 +17,34 @@ function tour2creatingEvent(tour, movieTheater, screeningRoom, existingApplicati
|
|
|
115
17
|
screeningRoom.branchCode,
|
|
116
18
|
tour.start_time
|
|
117
19
|
].join('');
|
|
20
|
+
// 00:00:00で再実装(2025-10-09~)
|
|
21
|
+
// const availabilityEnds: Date = moment(tour.end_date)
|
|
22
|
+
// .tz(TIMEZONE)
|
|
23
|
+
// .endOf('date')
|
|
24
|
+
// .toDate();
|
|
118
25
|
const availabilityEnds = moment(tour.end_date)
|
|
119
|
-
.tz(
|
|
120
|
-
.
|
|
26
|
+
.tz(TIMEZONE)
|
|
27
|
+
.startOf('date')
|
|
28
|
+
.add(1, 'day')
|
|
121
29
|
.toDate();
|
|
122
30
|
const availabilityStarts = moment(tour.start_date)
|
|
123
|
-
.tz(
|
|
31
|
+
.tz(TIMEZONE)
|
|
124
32
|
.startOf('date')
|
|
125
33
|
// tslint:disable-next-line:no-magic-numbers
|
|
126
34
|
.add(-3, 'months')
|
|
127
35
|
.toDate();
|
|
36
|
+
// 00:00:00で再実装(2025-10-09~)
|
|
37
|
+
// const validThrough: Date = moment(tour.end_date)
|
|
38
|
+
// .tz(TIMEZONE)
|
|
39
|
+
// .endOf('date')
|
|
40
|
+
// .toDate();
|
|
128
41
|
const validThrough = moment(tour.end_date)
|
|
129
|
-
.tz(
|
|
130
|
-
.
|
|
42
|
+
.tz(TIMEZONE)
|
|
43
|
+
.startOf('date')
|
|
44
|
+
.add(1, 'day')
|
|
131
45
|
.toDate();
|
|
132
46
|
const validFrom = moment(tour.start_date)
|
|
133
|
-
.tz(
|
|
47
|
+
.tz(TIMEZONE)
|
|
134
48
|
.startOf('date')
|
|
135
49
|
// tslint:disable-next-line:no-magic-numbers
|
|
136
50
|
.add(-3, 'months')
|
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": "5.0.0
|
|
14
|
+
"@chevre/factory": "5.0.0",
|
|
15
15
|
"@cinerino/sdk": "12.5.0-alpha.5",
|
|
16
16
|
"@motionpicture/coa-service": "9.6.0",
|
|
17
17
|
"@motionpicture/gmo-service": "5.4.0-alpha.1",
|
|
@@ -115,5 +115,5 @@
|
|
|
115
115
|
"postversion": "git push origin --tags",
|
|
116
116
|
"prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
|
|
117
117
|
},
|
|
118
|
-
"version": "23.0.0-alpha.
|
|
118
|
+
"version": "23.0.0-alpha.4"
|
|
119
119
|
}
|