@chevre/domain 21.2.0-alpha.71 → 21.2.0-alpha.72
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.
- package/lib/chevre/repo/mongoose/schemas/order.d.ts +3 -3
- package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +9 -9
- package/lib/chevre/service/assetTransaction/reserve/factory.js +12 -8
- package/lib/chevre/service/assetTransaction/reserve.js +9 -1
- package/lib/chevre/service/reserve/cancelReservation.d.ts +4 -2
- package/package.json +2 -2
|
@@ -64,9 +64,9 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
64
64
|
project?: any;
|
|
65
65
|
orderNumber?: string | undefined;
|
|
66
66
|
seller?: any;
|
|
67
|
+
broker?: any;
|
|
67
68
|
price?: number | undefined;
|
|
68
69
|
priceCurrency?: string | undefined;
|
|
69
|
-
broker?: any;
|
|
70
70
|
customer?: any;
|
|
71
71
|
returner?: any;
|
|
72
72
|
confirmationNumber?: string | undefined;
|
|
@@ -87,9 +87,9 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
87
87
|
project?: any;
|
|
88
88
|
orderNumber?: string | undefined;
|
|
89
89
|
seller?: any;
|
|
90
|
+
broker?: any;
|
|
90
91
|
price?: number | undefined;
|
|
91
92
|
priceCurrency?: string | undefined;
|
|
92
|
-
broker?: any;
|
|
93
93
|
customer?: any;
|
|
94
94
|
returner?: any;
|
|
95
95
|
confirmationNumber?: string | undefined;
|
|
@@ -110,9 +110,9 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
110
110
|
project?: any;
|
|
111
111
|
orderNumber?: string | undefined;
|
|
112
112
|
seller?: any;
|
|
113
|
+
broker?: any;
|
|
113
114
|
price?: number | undefined;
|
|
114
115
|
priceCurrency?: string | undefined;
|
|
115
|
-
broker?: any;
|
|
116
116
|
customer?: any;
|
|
117
117
|
returner?: any;
|
|
118
118
|
confirmationNumber?: string | undefined;
|
|
@@ -62,16 +62,16 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
62
62
|
additionalProperty?: any;
|
|
63
63
|
reservationFor?: any;
|
|
64
64
|
subReservation?: any;
|
|
65
|
+
broker?: any;
|
|
65
66
|
price?: any;
|
|
66
67
|
priceCurrency?: string | undefined;
|
|
68
|
+
issuedThrough?: any;
|
|
69
|
+
reservedTicket?: any;
|
|
67
70
|
additionalTicketText?: string | undefined;
|
|
68
71
|
bookingTime?: Date | undefined;
|
|
69
|
-
broker?: any;
|
|
70
|
-
issuedThrough?: any;
|
|
71
72
|
modifiedTime?: Date | undefined;
|
|
72
73
|
numSeats?: number | undefined;
|
|
73
74
|
programMembershipUsed?: any;
|
|
74
|
-
reservedTicket?: any;
|
|
75
75
|
underName?: any;
|
|
76
76
|
bookingAgent?: any;
|
|
77
77
|
cancelReservationUrl?: string | undefined;
|
|
@@ -90,16 +90,16 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
90
90
|
additionalProperty?: any;
|
|
91
91
|
reservationFor?: any;
|
|
92
92
|
subReservation?: any;
|
|
93
|
+
broker?: any;
|
|
93
94
|
price?: any;
|
|
94
95
|
priceCurrency?: string | undefined;
|
|
96
|
+
issuedThrough?: any;
|
|
97
|
+
reservedTicket?: any;
|
|
95
98
|
additionalTicketText?: string | undefined;
|
|
96
99
|
bookingTime?: Date | undefined;
|
|
97
|
-
broker?: any;
|
|
98
|
-
issuedThrough?: any;
|
|
99
100
|
modifiedTime?: Date | undefined;
|
|
100
101
|
numSeats?: number | undefined;
|
|
101
102
|
programMembershipUsed?: any;
|
|
102
|
-
reservedTicket?: any;
|
|
103
103
|
underName?: any;
|
|
104
104
|
bookingAgent?: any;
|
|
105
105
|
cancelReservationUrl?: string | undefined;
|
|
@@ -118,16 +118,16 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
118
118
|
additionalProperty?: any;
|
|
119
119
|
reservationFor?: any;
|
|
120
120
|
subReservation?: any;
|
|
121
|
+
broker?: any;
|
|
121
122
|
price?: any;
|
|
122
123
|
priceCurrency?: string | undefined;
|
|
124
|
+
issuedThrough?: any;
|
|
125
|
+
reservedTicket?: any;
|
|
123
126
|
additionalTicketText?: string | undefined;
|
|
124
127
|
bookingTime?: Date | undefined;
|
|
125
|
-
broker?: any;
|
|
126
|
-
issuedThrough?: any;
|
|
127
128
|
modifiedTime?: Date | undefined;
|
|
128
129
|
numSeats?: number | undefined;
|
|
129
130
|
programMembershipUsed?: any;
|
|
130
|
-
reservedTicket?: any;
|
|
131
131
|
underName?: any;
|
|
132
132
|
bookingAgent?: any;
|
|
133
133
|
cancelReservationUrl?: string | undefined;
|
|
@@ -12,8 +12,8 @@ function createStartParams(params) {
|
|
|
12
12
|
var _a;
|
|
13
13
|
const reservationNumber = params.reservationNumber;
|
|
14
14
|
const reservationPackage = Object.assign({
|
|
15
|
-
//
|
|
16
|
-
|
|
15
|
+
// project: params.project,
|
|
16
|
+
reservationNumber: reservationNumber, reservationStatus: factory.reservationStatusType.ReservationPending, typeOf: factory.reservationType.ReservationPackage }, (typeof ((_a = params.object.broker) === null || _a === void 0 ? void 0 : _a.typeOf) === 'string') ? { broker: params.object.broker } : undefined);
|
|
17
17
|
return {
|
|
18
18
|
project: { id: params.project.id, typeOf: factory.organizationType.Project },
|
|
19
19
|
typeOf: factory.assetTransactionType.Reserve,
|
|
@@ -467,7 +467,9 @@ function createPotentialActions(params) {
|
|
|
467
467
|
underName
|
|
468
468
|
}));
|
|
469
469
|
});
|
|
470
|
-
const reservationPackage = Object.assign({ reservationFor, reservationNumber: transaction.object.reservationNumber, reservationStatus:
|
|
470
|
+
const reservationPackage = Object.assign({ reservationFor, reservationNumber: transaction.object.reservationNumber, reservationStatus: (typeof params.transaction.object.reservationStatus === 'string')
|
|
471
|
+
? params.transaction.object.reservationStatus
|
|
472
|
+
: factory.reservationStatusType.ReservationPending,
|
|
471
473
|
// 不要なので廃止(2023-01-19~)
|
|
472
474
|
// subReservation: pendingReservations,
|
|
473
475
|
typeOf: factory.reservationType.ReservationPackage }, (typeof (underName === null || underName === void 0 ? void 0 : underName.typeOf) === 'string') ? { underName } : undefined);
|
|
@@ -521,11 +523,11 @@ function createMoneyTransferActions(params) {
|
|
|
521
523
|
&& typeof pointAwardToLocationIdentifier === 'string'
|
|
522
524
|
&& typeof pointAwardToLocationTypeOf === 'string') {
|
|
523
525
|
const fromLocation = {
|
|
524
|
-
typeOf: (typeof ((_f = params.reservation.
|
|
525
|
-
? params.reservation.
|
|
526
|
+
typeOf: (typeof ((_f = params.reservation.reservedTicket.issuedBy) === null || _f === void 0 ? void 0 : _f.typeOf) === 'string')
|
|
527
|
+
? params.reservation.reservedTicket.issuedBy.typeOf
|
|
526
528
|
: params.transaction.typeOf,
|
|
527
|
-
name: (typeof ((_g = params.reservation.
|
|
528
|
-
? params.reservation.
|
|
529
|
+
name: (typeof ((_g = params.reservation.reservedTicket.issuedBy) === null || _g === void 0 ? void 0 : _g.name) === 'string')
|
|
530
|
+
? params.reservation.reservedTicket.issuedBy.name
|
|
529
531
|
: params.transaction.id
|
|
530
532
|
};
|
|
531
533
|
const toLocation = {
|
|
@@ -566,7 +568,9 @@ function createPendingReservationAction(params) {
|
|
|
566
568
|
typeOf: factory.reservationType.ReservationPackage,
|
|
567
569
|
reservationNumber: transaction.transactionNumber,
|
|
568
570
|
reservationFor: { typeOf: reservationFor.typeOf, id: String(reservationFor.id) },
|
|
569
|
-
reservationStatus:
|
|
571
|
+
reservationStatus: (typeof params.transaction.object.reservationStatus === 'string')
|
|
572
|
+
? params.transaction.object.reservationStatus
|
|
573
|
+
: factory.reservationStatusType.ReservationPending
|
|
570
574
|
};
|
|
571
575
|
cancelActionAttributes = [{
|
|
572
576
|
project: transaction.project,
|
|
@@ -135,6 +135,12 @@ function addReservations(params) {
|
|
|
135
135
|
})(repos);
|
|
136
136
|
// 予約イベント最適化
|
|
137
137
|
const reservationFor = (0, factory_1.createReservationFor)(event);
|
|
138
|
+
const minimizedObjectSubReservations = objectSubReservations.map((r) => {
|
|
139
|
+
var _a;
|
|
140
|
+
return Object.assign({ id: r.id, typeOf: r.typeOf, reservedTicket: Object.assign({ ticketType: r.reservedTicket.ticketType }, (typeof ((_a = r.reservedTicket.ticketedSeat) === null || _a === void 0 ? void 0 : _a.typeOf) === 'string')
|
|
141
|
+
? { ticketedSeat: r.reservedTicket.ticketedSeat }
|
|
142
|
+
: undefined) }, (Array.isArray(r.subReservation)) ? { subReservation: r.subReservation } : undefined);
|
|
143
|
+
});
|
|
138
144
|
// 取引に予約追加
|
|
139
145
|
let lockedOfferRateLimitKeys = [];
|
|
140
146
|
try {
|
|
@@ -146,7 +152,9 @@ function addReservations(params) {
|
|
|
146
152
|
acceptedOffer: acceptedOffers4transactionObject,
|
|
147
153
|
reservationFor,
|
|
148
154
|
// subReservationにreservationForを保管しない(2021-10-19~)
|
|
149
|
-
|
|
155
|
+
// 最適化(2023-05-29~)
|
|
156
|
+
// subReservation: objectSubReservations
|
|
157
|
+
subReservation: minimizedObjectSubReservations
|
|
150
158
|
}
|
|
151
159
|
});
|
|
152
160
|
}
|
|
@@ -5,7 +5,6 @@ import { RedisRepository as OfferRateLimitRepo } from '../../repo/rateLimit/offe
|
|
|
5
5
|
import { MongoRepository as ReservationRepo } from '../../repo/reservation';
|
|
6
6
|
import { StockHolderRepository as StockHolderRepo } from '../../repo/stockHolder';
|
|
7
7
|
import { MongoRepository as TaskRepo } from '../../repo/task';
|
|
8
|
-
type IObjectSubReservation = factory.assetTransaction.reserve.IObjectSubReservation;
|
|
9
8
|
/**
|
|
10
9
|
* 進行中の予約をキャンセルする
|
|
11
10
|
*/
|
|
@@ -29,7 +28,10 @@ declare function cancelReservation(actionAttributesList: factory.action.cancel.r
|
|
|
29
28
|
assetTransaction: AssetTransactionRepo;
|
|
30
29
|
}) => Promise<void>;
|
|
31
30
|
declare function processUnlockOfferRateLimit(params: {
|
|
32
|
-
reservation:
|
|
31
|
+
reservation: {
|
|
32
|
+
reservationNumber: string;
|
|
33
|
+
reservedTicket: factory.assetTransaction.reserve.IObjectSubReservationReservedTicket;
|
|
34
|
+
};
|
|
33
35
|
reservationFor: factory.assetTransaction.reserve.IReservationFor;
|
|
34
36
|
}): (repos: {
|
|
35
37
|
offerRateLimit: OfferRateLimitRepo;
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@chevre/factory": "4.313.0-alpha.
|
|
12
|
+
"@chevre/factory": "4.313.0-alpha.13",
|
|
13
13
|
"@cinerino/sdk": "3.157.0-alpha.2",
|
|
14
14
|
"@motionpicture/coa-service": "9.2.0",
|
|
15
15
|
"@motionpicture/gmo-service": "5.2.0",
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
"postversion": "git push origin --tags",
|
|
118
118
|
"prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
|
|
119
119
|
},
|
|
120
|
-
"version": "21.2.0-alpha.
|
|
120
|
+
"version": "21.2.0-alpha.72"
|
|
121
121
|
}
|