@chevre/domain 22.5.0-alpha.52 → 22.5.0-alpha.53
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/service/reserve/factory.d.ts +1 -1
- package/lib/chevre/service/reserve/potentialActions/onPendingReservationCanceled.js +8 -8
- package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +9 -9
- package/lib/chevre/service/reserve/potentialActions/onReservationUsed.js +1 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationsCreated.js +8 -8
- package/lib/chevre/service/transaction/returnOrder/preStart.js +2 -0
- package/package.json +2 -2
|
@@ -3,7 +3,7 @@ export declare function optimizeUnderName4inform(params: {
|
|
|
3
3
|
underName: factory.reservation.IUnderName<factory.reservationType.EventReservation>;
|
|
4
4
|
}): factory.notification.reservation.IMaskedUnderName;
|
|
5
5
|
export interface IPotentialInformReservationAction extends factory.task.triggerWebhook.IPotentialInformAction {
|
|
6
|
-
object: factory.notification.reservation.IReservation4inform
|
|
6
|
+
object: factory.notification.reservation.IReservation4inform;
|
|
7
7
|
}
|
|
8
8
|
export declare const NUM_TRY_INFORM_RESERVATION: number;
|
|
9
9
|
export declare function createMoneyTransferActions(params: {
|
|
@@ -30,14 +30,14 @@ function onPendingReservationCanceled(params) {
|
|
|
30
30
|
const informReservations = settings.onReservationStatusChanged.informReservation;
|
|
31
31
|
const now = new Date();
|
|
32
32
|
const taskAttributes = [];
|
|
33
|
-
const informObject =
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const informIdentifier = `${factory.reservationType.ReservationPackage}:${informObject
|
|
33
|
+
const informObject = {
|
|
34
|
+
project: { id: params.project.id, typeOf: factory.organizationType.Project },
|
|
35
|
+
reservationFor: { id: reservationFor.id },
|
|
36
|
+
reservationNumber,
|
|
37
|
+
reservationStatus: factory.reservationStatusType.ReservationCancelled,
|
|
38
|
+
typeOf: factory.reservationType.ReservationPackage
|
|
39
|
+
};
|
|
40
|
+
const informIdentifier = `${factory.reservationType.ReservationPackage}:${informObject.reservationNumber}:${informObject.reservationStatus}`;
|
|
41
41
|
// inform galobally
|
|
42
42
|
if (Array.isArray(informReservations)) {
|
|
43
43
|
taskAttributes.push(...informReservations.map((informReservation) => {
|
|
@@ -77,15 +77,15 @@ function onReservationConfirmed(confirmedReservations) {
|
|
|
77
77
|
typeOf,
|
|
78
78
|
reservedTicket }, (Array.isArray(additionalProperty)) ? { additionalProperty } : undefined), (typeof additionalTicketText === 'string') ? { additionalTicketText } : undefined), (modifiedTime instanceof Date) ? { modifiedTime } : undefined), (price !== undefined) ? { price } : undefined), (programMembershipUsed !== undefined) ? { programMembershipUsed } : undefined), (Array.isArray(subReservation)) ? { subReservation } : undefined);
|
|
79
79
|
});
|
|
80
|
-
const informObject =
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
const informIdentifier = `${factory.reservationType.ReservationPackage}:${informObject
|
|
80
|
+
const informObject = Object.assign({ bookingTime,
|
|
81
|
+
issuedThrough,
|
|
82
|
+
project,
|
|
83
|
+
provider,
|
|
84
|
+
reservationFor,
|
|
85
|
+
reservationNumber, reservationStatus: factory.reservationStatusType.ReservationConfirmed, subReservation: subReservations4inform, typeOf: factory.reservationType.ReservationPackage }, (typeof (underName === null || underName === void 0 ? void 0 : underName.typeOf) === 'string')
|
|
86
|
+
? { underName: (0, factory_1.optimizeUnderName4inform)({ underName }) }
|
|
87
|
+
: undefined);
|
|
88
|
+
const informIdentifier = `${factory.reservationType.ReservationPackage}:${informObject.reservationNumber}:${informObject.reservationStatus}`;
|
|
89
89
|
// inform galobally
|
|
90
90
|
if (Array.isArray(informReservations)) {
|
|
91
91
|
taskAttributes.push(...informReservations.map((informReservation) => {
|
|
@@ -45,7 +45,7 @@ function onReservationUsed(attendedReservation) {
|
|
|
45
45
|
var _a;
|
|
46
46
|
const informUrl = String((_a = informReservation.recipient) === null || _a === void 0 ? void 0 : _a.url);
|
|
47
47
|
const informReservationAttributes = {
|
|
48
|
-
object:
|
|
48
|
+
object: reservation4inform,
|
|
49
49
|
recipient: {
|
|
50
50
|
id: '',
|
|
51
51
|
name: informUrl,
|
|
@@ -30,14 +30,14 @@ function onReservationsCreated(params) {
|
|
|
30
30
|
const informReservations = settings.onReservationStatusChanged.informReservation;
|
|
31
31
|
const now = new Date();
|
|
32
32
|
const taskAttributes = [];
|
|
33
|
-
const informObject =
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const informIdentifier = `${factory.reservationType.ReservationPackage}:${informObject
|
|
33
|
+
const informObject = {
|
|
34
|
+
project: { id: params.project.id, typeOf: factory.organizationType.Project },
|
|
35
|
+
reservationFor: { id: params.event.id },
|
|
36
|
+
reservationNumber: params.transaction.transactionNumber,
|
|
37
|
+
reservationStatus: factory.reservationStatusType.ReservationPending,
|
|
38
|
+
typeOf: factory.reservationType.ReservationPackage
|
|
39
|
+
};
|
|
40
|
+
const informIdentifier = `${factory.reservationType.ReservationPackage}:${informObject.reservationNumber}:${informObject.reservationStatus}`;
|
|
41
41
|
// inform galobally
|
|
42
42
|
if (Array.isArray(informReservations)) {
|
|
43
43
|
taskAttributes.push(...informReservations.map((informReservation) => {
|
|
@@ -488,6 +488,8 @@ function isSellerReturnPolicyApplicable(params) {
|
|
|
488
488
|
}
|
|
489
489
|
if (typeof gracePeriodMinValue === 'number') {
|
|
490
490
|
satisfyGracePeriodMinValue = params.events.every((event) => {
|
|
491
|
+
debug('isSellerReturnPolicyApplicable: comparing by gracePeriodMinValue...', 'gracePeriodMinValue:', gracePeriodMinValue, event.startDate, '>', moment(params.returningDate)
|
|
492
|
+
.add(gracePeriodMinValue, 'seconds'), '?');
|
|
491
493
|
return moment(event.startDate)
|
|
492
494
|
.isAfter(moment(params.returningDate)
|
|
493
495
|
.add(gracePeriodMinValue, 'seconds'));
|
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": "4.388.0-alpha.
|
|
14
|
+
"@chevre/factory": "4.388.0-alpha.11",
|
|
15
15
|
"@cinerino/sdk": "10.16.0-alpha.4",
|
|
16
16
|
"@motionpicture/coa-service": "9.5.0",
|
|
17
17
|
"@motionpicture/gmo-service": "5.3.0",
|
|
@@ -108,5 +108,5 @@
|
|
|
108
108
|
"postversion": "git push origin --tags",
|
|
109
109
|
"prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
|
|
110
110
|
},
|
|
111
|
-
"version": "22.5.0-alpha.
|
|
111
|
+
"version": "22.5.0-alpha.53"
|
|
112
112
|
}
|