@chevre/domain 24.0.0-alpha.64 → 24.0.0-alpha.65
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.
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.minimizeReservationFor = minimizeReservationFor;
|
|
4
|
+
function minimizeWorkPerformed(params) {
|
|
5
|
+
const { identifier, id, typeOf, version } = params;
|
|
6
|
+
return {
|
|
7
|
+
identifier,
|
|
8
|
+
typeOf,
|
|
9
|
+
...(typeof id === 'string') && { id },
|
|
10
|
+
...(typeof version === 'string') && { version },
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
function minimizeSuperEvent(params) {
|
|
14
|
+
const { id, location, typeOf, workPerformed } = params;
|
|
15
|
+
return {
|
|
16
|
+
id,
|
|
17
|
+
location,
|
|
18
|
+
typeOf,
|
|
19
|
+
workPerformed: minimizeWorkPerformed(workPerformed)
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function minimizeReservationFor(params) {
|
|
23
|
+
const { name: _name, superEvent, ...reservationForNoName } = params;
|
|
24
|
+
const minimizedReservationFor = {
|
|
25
|
+
...reservationForNoName,
|
|
26
|
+
superEvent: minimizeSuperEvent(superEvent)
|
|
27
|
+
};
|
|
28
|
+
console.log('minimizeReservationFor processed.', JSON.stringify(params), '->', JSON.stringify(minimizedReservationFor));
|
|
29
|
+
return { minimizedReservationFor };
|
|
30
|
+
}
|
|
@@ -27,6 +27,7 @@ exports.ReservationRepo = void 0;
|
|
|
27
27
|
const reservation_1 = require("./mongoose/schemas/reservation");
|
|
28
28
|
const factory = __importStar(require("../factory"));
|
|
29
29
|
const createMongoConditions_1 = require("./factory/reservation/createMongoConditions");
|
|
30
|
+
const minimizeReservationFor_1 = require("./factory/reservation/minimizeReservationFor");
|
|
30
31
|
const settings_1 = require("../settings");
|
|
31
32
|
/**
|
|
32
33
|
* 予約リポジトリ
|
|
@@ -145,6 +146,8 @@ class ReservationRepo {
|
|
|
145
146
|
...((typeof ticketType.id === 'string') && { id: ticketType.id })
|
|
146
147
|
}
|
|
147
148
|
};
|
|
149
|
+
// reservationFor最小化(2026-04-06~)
|
|
150
|
+
const { minimizedReservationFor } = (0, minimizeReservationFor_1.minimizeReservationFor)(params.reservationFor);
|
|
148
151
|
const setOnInsert = {
|
|
149
152
|
...subReservationWithoutPrice,
|
|
150
153
|
typeOf: factory.reservationType.EventReservation,
|
|
@@ -154,7 +157,7 @@ class ReservationRepo {
|
|
|
154
157
|
attended: false,
|
|
155
158
|
issuedThrough: params.issuedThrough,
|
|
156
159
|
project: { id: params.project.id, typeOf: factory.organizationType.Project },
|
|
157
|
-
reservationFor:
|
|
160
|
+
reservationFor: minimizedReservationFor,
|
|
158
161
|
reservationNumber: params.reservationNumber,
|
|
159
162
|
reservationStatus: factory.reservationStatusType.ReservationConfirmed,
|
|
160
163
|
modifiedTime,
|
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.2.0-alpha.
|
|
14
|
+
"@chevre/factory": "6.2.0-alpha.8",
|
|
15
15
|
"@cinerino/sdk": "14.0.0-alpha.5",
|
|
16
16
|
"@motionpicture/coa-service": "9.7.0-alpha.2",
|
|
17
17
|
"@motionpicture/gmo-service": "5.4.0-alpha.1",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"postversion": "git push origin --tags",
|
|
98
98
|
"prepublishOnly": "npm run clean && npm run build"
|
|
99
99
|
},
|
|
100
|
-
"version": "24.0.0-alpha.
|
|
100
|
+
"version": "24.0.0-alpha.65"
|
|
101
101
|
}
|