@chevre/domain 28.2.0-alpha.1 → 28.2.0-alpha.2
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.
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { factory } from '../../factory';
|
|
2
2
|
import type { AcceptedOfferRepo } from '../../repo/acceptedOffer';
|
|
3
3
|
import type { AuthorizationRepo } from '../../repo/authorization';
|
|
4
|
+
import type { OfferRepo } from '../../repo/offer/unitPriceInCatalog';
|
|
4
5
|
import type { OrderRepo } from '../../repo/order';
|
|
5
6
|
import type { ReservationRepo } from '../../repo/reservation';
|
|
6
7
|
type IReservationResult = Pick<factory.reservation.eventReservation.IReservation, 'id' | 'additionalTicketText' | 'checkedIn' | 'reservationStatus'> & {
|
|
7
8
|
reservedTicket: {
|
|
8
|
-
ticketType
|
|
9
|
+
ticketType?: Pick<factory.assetTransaction.reserve.ITicketType, 'identifier'> & {
|
|
9
10
|
name: {
|
|
10
11
|
ja?: string;
|
|
11
12
|
};
|
|
@@ -30,6 +31,7 @@ declare function findByCode(params: {
|
|
|
30
31
|
}): (repos: {
|
|
31
32
|
acceptedOffer: AcceptedOfferRepo;
|
|
32
33
|
authorization: AuthorizationRepo;
|
|
34
|
+
offer: OfferRepo;
|
|
33
35
|
order: OrderRepo;
|
|
34
36
|
reservation: ReservationRepo;
|
|
35
37
|
}) => Promise<{
|
|
@@ -46,10 +46,22 @@ function findByCode(params) {
|
|
|
46
46
|
if (acceptedOffer.itemOffered.typeOf !== factory_1.factory.reservationType.EventReservation) {
|
|
47
47
|
throw new factory_1.factory.errors.Argument('id', `itemOffered.typeOf must be ${factory_1.factory.reservationType.EventReservation}`);
|
|
48
48
|
}
|
|
49
|
-
ticketType
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
// acceptedOffer.itemOffered.reservedTicket.ticketType廃止につき、単価オファー情報を参照(2026-11-11~)
|
|
50
|
+
const unitPriceOffer = (await repos.offer.findUnitPriceOffers({
|
|
51
|
+
id: { $eq: String(acceptedOffer.id) },
|
|
52
|
+
project: { id: { $eq: params.project.id } }
|
|
53
|
+
}, { identifier: 1, name: 1 })).shift();
|
|
54
|
+
// console.log('findByCode: unitPriceOffer found.', unitPriceOffer);
|
|
55
|
+
if (unitPriceOffer !== undefined) {
|
|
56
|
+
ticketType = {
|
|
57
|
+
identifier: unitPriceOffer.identifier,
|
|
58
|
+
name: { ja: unitPriceOffer.name?.ja }
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
// ticketType = {
|
|
62
|
+
// identifier: acceptedOffer.itemOffered.reservedTicket.ticketType.identifier,
|
|
63
|
+
// name: { ja: acceptedOffer.itemOffered.reservedTicket.ticketType.name?.ja }
|
|
64
|
+
// };
|
|
53
65
|
}
|
|
54
66
|
else {
|
|
55
67
|
throw new factory_1.factory.errors.NotFound('orderNumber');
|
|
@@ -61,21 +73,13 @@ function findByCode(params) {
|
|
|
61
73
|
}
|
|
62
74
|
const reservationFromRepo = await repos.reservation.findReservationById({
|
|
63
75
|
id: reservationId,
|
|
64
|
-
inclusion: [
|
|
65
|
-
'additionalTicketText', 'checkedIn', 'reservationStatus',
|
|
66
|
-
// 'reservedTicket'
|
|
67
|
-
]
|
|
76
|
+
inclusion: ['additionalTicketText', 'checkedIn', 'reservationStatus']
|
|
68
77
|
});
|
|
69
78
|
const { id, additionalTicketText, checkedIn, reservationStatus } = reservationFromRepo;
|
|
70
79
|
const reservation = {
|
|
71
80
|
id, reservationStatus,
|
|
72
81
|
reservedTicket: {
|
|
73
|
-
|
|
74
|
-
// ticketType: {
|
|
75
|
-
// identifier: reservedTicket.ticketType.identifier,
|
|
76
|
-
// name: { ja: reservedTicket.ticketType.name?.ja }
|
|
77
|
-
// },
|
|
78
|
-
ticketType
|
|
82
|
+
...((ticketType !== undefined) && { ticketType })
|
|
79
83
|
},
|
|
80
84
|
...(typeof additionalTicketText === 'string') ? { additionalTicketText } : undefined,
|
|
81
85
|
...(typeof checkedIn === 'boolean') ? { checkedIn } : undefined
|
package/package.json
CHANGED
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"csvtojson": "^2.0.10",
|
|
47
47
|
"dependency-cruiser": "17.3.8",
|
|
48
48
|
"eslint": "9.39.2",
|
|
49
|
-
"mongoose": "8.
|
|
49
|
+
"mongoose": "8.24.8",
|
|
50
50
|
"rimraf": "6.1.3",
|
|
51
51
|
"size-limit": "12.0.0",
|
|
52
52
|
"typescript": "5.9.3",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"@redis/client": "^6.2.1",
|
|
58
|
-
"mongoose": "^8.
|
|
58
|
+
"mongoose": "^8.24.8"
|
|
59
59
|
},
|
|
60
60
|
"engines": {
|
|
61
61
|
"node": ">=22.0.0",
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
"postversion": "git push origin --tags",
|
|
90
90
|
"prepublishOnly": "npm run clean && npm run build"
|
|
91
91
|
},
|
|
92
|
-
"version": "28.2.0-alpha.
|
|
92
|
+
"version": "28.2.0-alpha.2"
|
|
93
93
|
}
|