@chevre/domain 25.2.0-alpha.23 → 25.2.0-alpha.24
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/transaction/placeOrder/confirm/validation.d.ts +1 -1
- package/lib/chevre/service/transaction/placeOrder/confirm/validation.js +3 -1
- package/lib/chevre/service/transaction/placeOrder/confirm.d.ts +0 -5
- package/lib/chevre/service/transaction/placeOrder/confirm.js +7 -11
- package/package.json +1 -1
|
@@ -51,5 +51,5 @@ export declare function validateEventOffers(params: {
|
|
|
51
51
|
* 承認アクションのresultに条件が保管されているはず(2026-07-06時点で)
|
|
52
52
|
*/
|
|
53
53
|
authorizeOfferActions: Pick<IAuthorizeEventServiceOffer, 'id' | 'result'>[];
|
|
54
|
-
unitPriceOfferConditions
|
|
54
|
+
unitPriceOfferConditions: IPreparedUnitPriceOfferConditions[];
|
|
55
55
|
}): void;
|
|
@@ -333,7 +333,9 @@ function validateEventOffers(params) {
|
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
335
|
else {
|
|
336
|
-
|
|
336
|
+
// unitPriceOfferConditionsの準備は必須化(2026-07-13~)
|
|
337
|
+
throw new factory_1.factory.errors.NotImplemented('unitPriceOfferConditions must be an array');
|
|
338
|
+
// validatingAuthorizeOfferActions = [...params.authorizeOfferActions];
|
|
337
339
|
}
|
|
338
340
|
const { paymentMethods } = params;
|
|
339
341
|
const firstCreditCardPaymentMethodIdentifier = paymentMethods.find((referenceInvoice) => {
|
|
@@ -41,11 +41,6 @@ interface IConfirmOptions {
|
|
|
41
41
|
* 注文における最大CreditCardIF決済方法数
|
|
42
42
|
*/
|
|
43
43
|
maxNumCreditCardPaymentMethod: number;
|
|
44
|
-
/**
|
|
45
|
-
* 2026-07-06~
|
|
46
|
-
* 実験的に
|
|
47
|
-
*/
|
|
48
|
-
usePrepareUnitPriceOfferConditions?: boolean;
|
|
49
44
|
}
|
|
50
45
|
type IConfirmParams = PlaceOrderFactory.IConfirmParams;
|
|
51
46
|
interface IConfirmResult {
|
|
@@ -118,15 +118,11 @@ function confirm(params, options) {
|
|
|
118
118
|
}))
|
|
119
119
|
.filter(({ serialNumber }) => typeof serialNumber === 'string' && serialNumbers.includes(serialNumber));
|
|
120
120
|
// 単価オファーの全適用条件を検証するために、単価オファーを参照(2026-07-06~)
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
acceptedOffers,
|
|
127
|
-
authorizeEventServiceOfferActions
|
|
128
|
-
})({ offer: repos.offer });
|
|
129
|
-
}
|
|
121
|
+
const unitPriceOfferConditions = await (0, prepareUnitPriceOfferConditions_1.prepareUnitPriceOfferConditions)({
|
|
122
|
+
project: { id: transaction.project.id, },
|
|
123
|
+
acceptedOffers,
|
|
124
|
+
authorizeEventServiceOfferActions
|
|
125
|
+
})({ offer: repos.offer });
|
|
130
126
|
// authorizePaymentActionsからpayTransactionsを参照(2024-06-20~)
|
|
131
127
|
let payTransactions = [];
|
|
132
128
|
// 決済承認アクションのinstrument依存をobject依存へ変更(2025-12-14~)
|
|
@@ -150,8 +146,8 @@ function confirm(params, options) {
|
|
|
150
146
|
acceptPayActions,
|
|
151
147
|
authorizePaymentActions, authorizeEventServiceOfferActions,
|
|
152
148
|
acceptedOffers, payTransactions, customer,
|
|
149
|
+
unitPriceOfferConditions,
|
|
153
150
|
...(typeof code === 'string') ? { code } : undefined,
|
|
154
|
-
...((Array.isArray(unitPriceOfferConditions)) && { unitPriceOfferConditions }),
|
|
155
151
|
paymentMethodIdByTransaction
|
|
156
152
|
}, options);
|
|
157
153
|
// ポストアクションを作成
|
|
@@ -337,7 +333,7 @@ function createResult(params, options) {
|
|
|
337
333
|
order: { price },
|
|
338
334
|
paymentMethods,
|
|
339
335
|
authorizeOfferActions: params.authorizeEventServiceOfferActions,
|
|
340
|
-
|
|
336
|
+
unitPriceOfferConditions: params.unitPriceOfferConditions
|
|
341
337
|
});
|
|
342
338
|
// 注文オファー検証
|
|
343
339
|
(0, validation_1.validateAcceptedOffers)({
|
package/package.json
CHANGED