@chevre/domain 24.0.0-alpha.49 → 24.0.0-alpha.50
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/assetTransaction/reserve/confirm/factory.d.ts +1 -1
- package/lib/chevre/service/reserve/confirmReservation.js +23 -5
- package/lib/chevre/service/reserve/factory.d.ts +2 -2
- package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.d.ts +1 -1
- package/package.json +3 -3
|
@@ -3,6 +3,6 @@ declare function createPotentialActions(params: {
|
|
|
3
3
|
order?: Pick<factory.order.IOrder, 'orderNumber' | 'customer' | 'typeOf'>;
|
|
4
4
|
}): {
|
|
5
5
|
potentialActions: factory.assetTransaction.reserve.IPotentialActions;
|
|
6
|
-
underName?: factory.
|
|
6
|
+
underName?: factory.assetTransaction.reserve.IUnderName;
|
|
7
7
|
};
|
|
8
8
|
export { createPotentialActions };
|
|
@@ -138,6 +138,25 @@ function reserveTransaction2action(params) {
|
|
|
138
138
|
...(Array.isArray(transaction.instrument)) ? { instrument: transaction.instrument } : undefined // add(2025-02-17~)
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* 予約取引に保管されたunderNameから予約のunderNameを生成する
|
|
143
|
+
*/
|
|
144
|
+
function createReservationUnderName(params) {
|
|
145
|
+
const { underNameByTransaction } = params;
|
|
146
|
+
// 予約のunderNameを最適化(2026-03-27~)
|
|
147
|
+
// return underNameByTransaction;
|
|
148
|
+
const { id, identifier, typeOf, name, givenName, familyName, email, telephone } = underNameByTransaction;
|
|
149
|
+
return {
|
|
150
|
+
typeOf,
|
|
151
|
+
name,
|
|
152
|
+
...((Array.isArray(identifier)) && { identifier }),
|
|
153
|
+
...((typeof email === 'string') && { email }),
|
|
154
|
+
...((typeof familyName === 'string') && { familyName }),
|
|
155
|
+
...((typeof givenName === 'string') && { givenName }),
|
|
156
|
+
...((typeof id === 'string') && { id }),
|
|
157
|
+
...((typeof telephone === 'string') && { telephone })
|
|
158
|
+
};
|
|
159
|
+
}
|
|
141
160
|
function reserveIfNotYet(
|
|
142
161
|
// params: factory.action.reserve.IAttributes,
|
|
143
162
|
params, options) {
|
|
@@ -174,12 +193,11 @@ params, options) {
|
|
|
174
193
|
const action = await repos.action.start(actionAttributes);
|
|
175
194
|
try {
|
|
176
195
|
let underName;
|
|
196
|
+
const underNameByTransaction = reserveTransaction.object.underName;
|
|
177
197
|
// 予約取引に保管されたunderNameを使用する(2023-05-30~)
|
|
178
|
-
if (typeof
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
// } else if (typeof reservationPackage.underName?.typeOf === 'string') {
|
|
182
|
-
// underName = reservationPackage.underName;
|
|
198
|
+
if (typeof underNameByTransaction?.typeOf === 'string') {
|
|
199
|
+
// 予約のunderNameを最適化(2026-03-27~)
|
|
200
|
+
underName = createReservationUnderName({ underNameByTransaction });
|
|
183
201
|
}
|
|
184
202
|
// ReservationPackageに対応(2022-12-22~)
|
|
185
203
|
if (actionAttributes.object.typeOf === factory.reservationType.ReservationPackage) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as factory from '../../factory';
|
|
2
2
|
export declare function optimizeUnderName4inform(params: {
|
|
3
|
-
underName: factory.reservation.IUnderName
|
|
3
|
+
underName: Pick<factory.reservation.IUnderName, 'id' | 'typeOf'>;
|
|
4
4
|
}): factory.notification.reservation.IMaskedUnderName;
|
|
5
5
|
export type IPotentialInformReservationAction = factory.task.triggerWebhook.IPotentialInformReservationAction;
|
|
6
6
|
export declare const NUM_TRY_INFORM_RESERVATION = 10;
|
|
@@ -8,7 +8,7 @@ export declare function createMoneyTransferActions(params: {
|
|
|
8
8
|
acceptedOffer?: factory.assetTransaction.reserve.IAcceptedOffer4object;
|
|
9
9
|
reservation: Pick<factory.assetTransaction.reserve.IObjectSubReservation, 'reservedTicket'>;
|
|
10
10
|
transaction: factory.assetTransaction.ITransaction<factory.assetTransactionType.Reserve>;
|
|
11
|
-
underName?: factory.reservation.IUnderName
|
|
11
|
+
underName?: Pick<factory.reservation.IUnderName, 'id' | 'typeOf' | 'name'>;
|
|
12
12
|
}): import("@chevre/factory/lib/action/transfer/moneyTransfer").IAttributes[];
|
|
13
13
|
export interface IPotentialCancelAction extends factory.action.cancel.reservation.IAttributes {
|
|
14
14
|
purpose: {
|
|
@@ -7,7 +7,7 @@ import type { SettingRepo } from '../../../repo/setting';
|
|
|
7
7
|
import type { TaskRepo } from '../../../repo/task';
|
|
8
8
|
export type IConfirmedReservation = Omit<factory.reservation.eventReservation.IReservation, 'price' | 'underName' | 'reservedTicket'> & {
|
|
9
9
|
price?: factory.reservation.eventReservation.IPrice;
|
|
10
|
-
underName?: factory.reservation.IUnderName
|
|
10
|
+
underName?: Pick<factory.reservation.IUnderName, 'id' | 'typeOf'>;
|
|
11
11
|
reservedTicket: Omit<factory.assetTransaction.reserve.ISubReservationReservedTicket, 'ticketType'> & {
|
|
12
12
|
ticketType: factory.reservation.eventReservation.ITicketType;
|
|
13
13
|
};
|
package/package.json
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
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.
|
|
15
|
-
"@cinerino/sdk": "13.
|
|
14
|
+
"@chevre/factory": "6.2.0-alpha.0",
|
|
15
|
+
"@cinerino/sdk": "13.4.0-alpha.0",
|
|
16
16
|
"@motionpicture/coa-service": "9.6.0",
|
|
17
17
|
"@motionpicture/gmo-service": "5.4.0-alpha.1",
|
|
18
18
|
"@sendgrid/client": "8.1.4",
|
|
@@ -99,5 +99,5 @@
|
|
|
99
99
|
"postversion": "git push origin --tags",
|
|
100
100
|
"prepublishOnly": "npm run clean && npm run build"
|
|
101
101
|
},
|
|
102
|
-
"version": "24.0.0-alpha.
|
|
102
|
+
"version": "24.0.0-alpha.50"
|
|
103
103
|
}
|