@chevre/domain 20.1.0-alpha.4 → 20.1.0-alpha.40
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/example/src/chevre/deleteEvents.ts +9 -1
- package/example/src/chevre/migrateAccountTitleAdditionalProperties.ts +157 -0
- package/example/src/chevre/migrateCreativeWorkAdditionalProperties.ts +116 -0
- package/example/src/chevre/migrateEventOffersSellerMakesOffer.ts +139 -0
- package/example/src/chevre/migrateEventProjectAttributes.ts +57 -0
- package/example/src/chevre/migratePlaceAdditionalProperties.ts +162 -0
- package/example/src/chevre/migrateSSKTEventCOAEndpoint.ts +64 -0
- package/example/src/chevre/searchEvents.ts +36 -16
- package/lib/chevre/repo/accountAction.d.ts +0 -18
- package/lib/chevre/repo/accountAction.js +402 -355
- package/lib/chevre/repo/accountTitle.d.ts +1 -0
- package/lib/chevre/repo/accountTitle.js +6 -1
- package/lib/chevre/repo/additionalProperty.d.ts +35 -0
- package/lib/chevre/repo/additionalProperty.js +205 -0
- package/lib/chevre/repo/categoryCode.d.ts +1 -0
- package/lib/chevre/repo/categoryCode.js +15 -1
- package/lib/chevre/repo/creativeWork.js +10 -1
- package/lib/chevre/repo/customer.d.ts +1 -0
- package/lib/chevre/repo/customer.js +5 -0
- package/lib/chevre/repo/event.d.ts +12 -4
- package/lib/chevre/repo/event.js +84 -48
- package/lib/chevre/repo/merchantReturnPolicy.d.ts +1 -0
- package/lib/chevre/repo/merchantReturnPolicy.js +5 -0
- package/lib/chevre/repo/mongoose/model/additionalProperty.d.ts +7 -0
- package/lib/chevre/repo/mongoose/model/additionalProperty.js +81 -0
- package/lib/chevre/repo/mongoose/model/categoryCode.js +18 -2
- package/lib/chevre/repo/mongoose/model/creativeWork.js +6 -0
- package/lib/chevre/repo/mongoose/model/event.js +53 -0
- package/lib/chevre/repo/mongoose/model/offer.js +7 -1
- package/lib/chevre/repo/mongoose/model/offerCatalog.js +21 -2
- package/lib/chevre/repo/mongoose/model/ownershipInfo.js +3 -15
- package/lib/chevre/repo/mongoose/model/place.js +42 -0
- package/lib/chevre/repo/offer.js +10 -1
- package/lib/chevre/repo/offerCatalog.js +10 -10
- package/lib/chevre/repo/place.d.ts +1 -0
- package/lib/chevre/repo/place.js +54 -7
- package/lib/chevre/repo/reservation.d.ts +13 -0
- package/lib/chevre/repo/reservation.js +28 -0
- package/lib/chevre/repo/transaction.js +20 -5
- package/lib/chevre/repository.d.ts +6 -3
- package/lib/chevre/repository.js +10 -5
- package/lib/chevre/service/account.d.ts +0 -4
- package/lib/chevre/service/account.js +24 -22
- package/lib/chevre/service/accountTransaction/deposit.d.ts +0 -2
- package/lib/chevre/service/accountTransaction/deposit.js +3 -3
- package/lib/chevre/service/accountTransaction/transfer.d.ts +0 -2
- package/lib/chevre/service/accountTransaction/transfer.js +3 -3
- package/lib/chevre/service/accountTransaction/withdraw.d.ts +0 -2
- package/lib/chevre/service/accountTransaction/withdraw.js +3 -3
- package/lib/chevre/service/assetTransaction/pay/potentialActions.js +9 -19
- package/lib/chevre/service/assetTransaction/reserve/factory.js +119 -115
- package/lib/chevre/service/assetTransaction/reserve.js +99 -89
- package/lib/chevre/service/delivery/factory.js +2 -1
- package/lib/chevre/service/event.js +20 -6
- package/lib/chevre/service/offer/event/authorize.d.ts +4 -0
- package/lib/chevre/service/offer/event/authorize.js +65 -27
- package/lib/chevre/service/offer/event/factory.d.ts +1 -1
- package/lib/chevre/service/offer/event/factory.js +17 -12
- package/lib/chevre/service/offer/eventServiceByCOA/factory.js +19 -9
- package/lib/chevre/service/offer/factory.js +7 -20
- package/lib/chevre/service/offer.js +6 -6
- package/lib/chevre/service/order/onOrderStatusChanged/factory.js +4 -2
- package/lib/chevre/service/order/onOrderStatusChanged.js +3 -2
- package/lib/chevre/service/order/placeOrder.js +13 -5
- package/lib/chevre/service/order/returnOrder.js +2 -1
- package/lib/chevre/service/order/sendOrder.js +2 -1
- package/lib/chevre/service/reserve/cancelReservation.js +135 -87
- package/lib/chevre/service/reserve/confirmReservation.js +65 -33
- package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.d.ts +1 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +67 -30
- package/lib/chevre/service/task/confirmReserveTransaction.js +1 -1
- package/lib/chevre/service/transaction/orderProgramMembership.js +6 -8
- package/lib/chevre/service/transaction/placeOrder/exportTasks/factory.js +6 -3
- package/lib/chevre/service/transaction/placeOrderInProgress/factory.js +9 -4
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/givePointAward.js +2 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/moneyTransfer.js +2 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/registerService.js +2 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/sendEmailMessage.js +4 -3
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions.js +2 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/result/acceptedOffers.js +10 -6
- package/lib/chevre/service/transaction/placeOrderInProgress/result.js +2 -4
- package/lib/chevre/service/transaction/placeOrderInProgress/validation/validateSeller.d.ts +3 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/validation/validateSeller.js +3 -2
- package/lib/chevre/service/transaction/placeOrderInProgress.js +16 -2
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnMoneyTransfer.js +4 -5
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.js +6 -3
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPointAward.js +4 -6
- package/lib/chevre/service/transaction/returnOrder/potentialActions/sendEmailMessage.js +2 -1
- package/lib/chevre/service/transaction/returnOrder.js +10 -1
- package/lib/chevre/service/transaction.js +1 -14
- package/package.json +4 -4
- package/example/src/chevre/accountBlanceTest.ts +0 -24
- package/example/src/chevre/checkOffersAppliesToMovieTicket.ts +0 -56
- package/example/src/chevre/createSeats.ts +0 -59
- package/example/src/chevre/manageOwnedByOfOwnershipInfo.ts +0 -35
- package/example/src/chevre/migrateEventOffersItemOfferedName.ts +0 -82
- package/example/src/chevre/migrateMovieTicketChargePriceSpecs.ts +0 -92
- package/example/src/chevre/migrateSellerMakesOffers.ts +0 -84
- package/example/src/chevre/migrateTTTSOldEventId.ts +0 -68
- package/example/src/chevre/publishConfirmationNumber.ts +0 -30
- package/example/src/chevre/publishServiceOutputIdentifier.ts +0 -28
- package/example/src/chevre/publishTransactionNumber.ts +0 -28
- package/example/src/chevre/renameTransaction.ts +0 -22
- package/lib/chevre/service/task/accountMoneyTransfer.d.ts +0 -3
- package/lib/chevre/service/task/accountMoneyTransfer.js +0 -31
- package/lib/chevre/service/task/cancelAccountMoneyTransfer.d.ts +0 -3
- package/lib/chevre/service/task/cancelAccountMoneyTransfer.js +0 -33
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* リポジトリ
|
|
3
3
|
*/
|
|
4
4
|
import { MongoRepository as AccountRepo } from './repo/account';
|
|
5
|
-
import { MongoRepository as AccountActionRepo } from './repo/accountAction';
|
|
6
5
|
import { MongoRepository as AccountingReportRepo } from './repo/accountingReport';
|
|
7
6
|
import { MongoRepository as AccountTitleRepo } from './repo/accountTitle';
|
|
8
7
|
import { MongoRepository as AccountTransactionRepo } from './repo/accountTransaction';
|
|
9
8
|
import { MongoRepository as ActionRepo } from './repo/action';
|
|
9
|
+
import { MongoRepository as AdditionalPropertyRepo } from './repo/additionalProperty';
|
|
10
10
|
import { MongoRepository as AssetTransactionRepo } from './repo/assetTransaction';
|
|
11
11
|
import { MongoRepository as CategoryCodeRepo } from './repo/categoryCode';
|
|
12
12
|
import { MongoRepository as CodeRepo } from './repo/code';
|
|
@@ -49,8 +49,6 @@ export declare class Account extends AccountRepo {
|
|
|
49
49
|
/**
|
|
50
50
|
* 口座アクションリポジトリ
|
|
51
51
|
*/
|
|
52
|
-
export declare class AccountAction extends AccountActionRepo {
|
|
53
|
-
}
|
|
54
52
|
/**
|
|
55
53
|
* 経理レポートリポジトリ
|
|
56
54
|
*/
|
|
@@ -65,6 +63,11 @@ export declare class AccountTransaction extends AccountTransactionRepo {
|
|
|
65
63
|
}
|
|
66
64
|
export declare class Action extends ActionRepo {
|
|
67
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* 追加特性リポジトリ
|
|
68
|
+
*/
|
|
69
|
+
export declare class AdditionalProperty extends AdditionalPropertyRepo {
|
|
70
|
+
}
|
|
68
71
|
export declare namespace action {
|
|
69
72
|
class RegisterServiceInProgress extends RegisterServiceActionInProgress {
|
|
70
73
|
}
|
package/lib/chevre/repository.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.rateLimit = exports.itemAvailability = exports.TransactionNumber = exports.Transaction = exports.Telemetry = exports.Task = exports.ServiceOutputIdentifier = exports.ServiceOutput = exports.Seller = exports.Role = exports.Reservation = exports.Project = exports.Product = exports.PriceSpecification = exports.Place = exports.Permit = exports.Person = exports.paymentMethod = exports.OwnershipInfo = exports.OrderNumber = exports.Order = exports.OfferCatalog = exports.Offer = exports.MerchantReturnPolicy = exports.Member = exports.Event = exports.EmailMessage = exports.Customer = exports.CreativeWork = exports.ConfirmationNumber = exports.Code = exports.CategoryCode = exports.AssetTransaction = exports.action = exports.
|
|
3
|
+
exports.rateLimit = exports.itemAvailability = exports.TransactionNumber = exports.Transaction = exports.Telemetry = exports.Task = exports.ServiceOutputIdentifier = exports.ServiceOutput = exports.Seller = exports.Role = exports.Reservation = exports.Project = exports.Product = exports.PriceSpecification = exports.Place = exports.Permit = exports.Person = exports.paymentMethod = exports.OwnershipInfo = exports.OrderNumber = exports.Order = exports.OfferCatalog = exports.Offer = exports.MerchantReturnPolicy = exports.Member = exports.Event = exports.EmailMessage = exports.Customer = exports.CreativeWork = exports.ConfirmationNumber = exports.Code = exports.CategoryCode = exports.AssetTransaction = exports.action = exports.AdditionalProperty = exports.Action = exports.AccountTransaction = exports.AccountTitle = exports.AccountingReport = exports.Account = void 0;
|
|
4
4
|
// tslint:disable:max-classes-per-file completed-docs
|
|
5
5
|
/**
|
|
6
6
|
* リポジトリ
|
|
7
7
|
*/
|
|
8
8
|
const account_1 = require("./repo/account");
|
|
9
|
-
|
|
9
|
+
// import { MongoRepository as AccountActionRepo } from './repo/accountAction';
|
|
10
10
|
const accountingReport_1 = require("./repo/accountingReport");
|
|
11
11
|
const accountTitle_1 = require("./repo/accountTitle");
|
|
12
12
|
const accountTransaction_1 = require("./repo/accountTransaction");
|
|
13
13
|
const action_1 = require("./repo/action");
|
|
14
|
+
const additionalProperty_1 = require("./repo/additionalProperty");
|
|
14
15
|
const assetTransaction_1 = require("./repo/assetTransaction");
|
|
15
16
|
const categoryCode_1 = require("./repo/categoryCode");
|
|
16
17
|
const code_1 = require("./repo/code");
|
|
@@ -54,9 +55,7 @@ exports.Account = Account;
|
|
|
54
55
|
/**
|
|
55
56
|
* 口座アクションリポジトリ
|
|
56
57
|
*/
|
|
57
|
-
class AccountAction extends
|
|
58
|
-
}
|
|
59
|
-
exports.AccountAction = AccountAction;
|
|
58
|
+
// export class AccountAction extends AccountActionRepo { }
|
|
60
59
|
/**
|
|
61
60
|
* 経理レポートリポジトリ
|
|
62
61
|
*/
|
|
@@ -75,6 +74,12 @@ exports.AccountTransaction = AccountTransaction;
|
|
|
75
74
|
class Action extends action_1.MongoRepository {
|
|
76
75
|
}
|
|
77
76
|
exports.Action = Action;
|
|
77
|
+
/**
|
|
78
|
+
* 追加特性リポジトリ
|
|
79
|
+
*/
|
|
80
|
+
class AdditionalProperty extends additionalProperty_1.MongoRepository {
|
|
81
|
+
}
|
|
82
|
+
exports.AdditionalProperty = AdditionalProperty;
|
|
78
83
|
var action;
|
|
79
84
|
(function (action) {
|
|
80
85
|
class RegisterServiceInProgress extends registerServiceInProgress_1.RedisRepository {
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as factory from '../factory';
|
|
6
6
|
import { MongoRepository as AccountRepo } from '../repo/account';
|
|
7
|
-
import { MongoRepository as AccountActionRepo } from '../repo/accountAction';
|
|
8
7
|
import { MongoRepository as AccountTransactionRepo } from '../repo/accountTransaction';
|
|
9
8
|
export declare type IOpenOperation<T> = (repos: {
|
|
10
9
|
account: AccountRepo;
|
|
@@ -52,8 +51,6 @@ export declare function close(params: {
|
|
|
52
51
|
*/
|
|
53
52
|
export declare function transferMoney(actionAttributes: factory.account.action.moneyTransfer.IAttributes): (repos: {
|
|
54
53
|
account: AccountRepo;
|
|
55
|
-
accountAction: AccountActionRepo;
|
|
56
|
-
accountTransaction: AccountTransactionRepo;
|
|
57
54
|
}) => Promise<void>;
|
|
58
55
|
/**
|
|
59
56
|
* 転送取消
|
|
@@ -66,6 +63,5 @@ export declare function cancelMoneyTransfer(params: {
|
|
|
66
63
|
};
|
|
67
64
|
}): (repos: {
|
|
68
65
|
account: AccountRepo;
|
|
69
|
-
accountAction: AccountActionRepo;
|
|
70
66
|
accountTransaction: AccountTransactionRepo;
|
|
71
67
|
}) => Promise<void>;
|
|
@@ -53,11 +53,13 @@ exports.close = close;
|
|
|
53
53
|
*/
|
|
54
54
|
function transferMoney(actionAttributes) {
|
|
55
55
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
|
|
56
|
+
// 口座取引におけるAccountAction管理を廃止(2022-11-28~)
|
|
57
|
+
// let action = await repos.accountAction.startByIdentifier<factory.actionType.MoneyTransfer>(actionAttributes);
|
|
57
58
|
// すでに完了していれば何もしない
|
|
58
|
-
if (action.actionStatus === factory.actionStatusType.CompletedActionStatus) {
|
|
59
|
-
|
|
60
|
-
}
|
|
59
|
+
// if (action.actionStatus === factory.actionStatusType.CompletedActionStatus) {
|
|
60
|
+
// return;
|
|
61
|
+
// }
|
|
62
|
+
const action = actionAttributes;
|
|
61
63
|
let fromAccountNumber;
|
|
62
64
|
let toAccountNumber;
|
|
63
65
|
try {
|
|
@@ -80,18 +82,17 @@ function transferMoney(actionAttributes) {
|
|
|
80
82
|
}
|
|
81
83
|
catch (error) {
|
|
82
84
|
// actionにエラー結果を追加
|
|
83
|
-
try {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
85
|
+
// try {
|
|
86
|
+
// const actionError = { ...error, message: error.message, name: error.name };
|
|
87
|
+
// await repos.accountAction.giveUp(action.typeOf, action.id, actionError);
|
|
88
|
+
// } catch (__) {
|
|
89
|
+
// // 失敗したら仕方ない
|
|
90
|
+
// }
|
|
90
91
|
throw error;
|
|
91
92
|
}
|
|
92
93
|
// アクション完了
|
|
93
|
-
const actionResult = {};
|
|
94
|
-
action =
|
|
94
|
+
// const actionResult: factory.account.action.moneyTransfer.IResult = {};
|
|
95
|
+
// action = await repos.accountAction.complete(action.typeOf, action.id, actionResult);
|
|
95
96
|
});
|
|
96
97
|
}
|
|
97
98
|
exports.transferMoney = transferMoney;
|
|
@@ -132,16 +133,17 @@ function cancelMoneyTransfer(params) {
|
|
|
132
133
|
: transaction.object.amount.value,
|
|
133
134
|
transactionId: transaction.id
|
|
134
135
|
});
|
|
136
|
+
// 口座取引におけるAccountAction管理を廃止(2022-11-28~)
|
|
135
137
|
// アクション取得
|
|
136
|
-
const actions =
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}))
|
|
138
|
+
// const actions = await repos.accountAction.searchTransferActions({
|
|
139
|
+
// purpose: {
|
|
140
|
+
// typeOf: { $eq: transaction.typeOf },
|
|
141
|
+
// id: { $eq: transaction.id }
|
|
142
|
+
// }
|
|
143
|
+
// });
|
|
144
|
+
// await Promise.all(actions.map(async (action) => {
|
|
145
|
+
// await repos.accountAction.cancel(action.typeOf, action.id);
|
|
146
|
+
// }));
|
|
145
147
|
});
|
|
146
148
|
}
|
|
147
149
|
exports.cancelMoneyTransfer = cancelMoneyTransfer;
|
|
@@ -3,11 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as factory from '../../factory';
|
|
5
5
|
import { MongoRepository as AccountRepo } from '../../repo/account';
|
|
6
|
-
import { MongoRepository as AccountActionRepo } from '../../repo/accountAction';
|
|
7
6
|
import { MongoRepository as AccountTransactionRepo } from '../../repo/accountTransaction';
|
|
8
7
|
export declare type IStartOperation<T> = (repos: {
|
|
9
8
|
account: AccountRepo;
|
|
10
|
-
accountAction: AccountActionRepo;
|
|
11
9
|
accountTransaction: AccountTransactionRepo;
|
|
12
10
|
}) => Promise<T>;
|
|
13
11
|
/**
|
|
@@ -14,7 +14,6 @@ exports.start = void 0;
|
|
|
14
14
|
* 入金取引サービス
|
|
15
15
|
*/
|
|
16
16
|
const factory = require("../../factory");
|
|
17
|
-
const factory_1 = require("./factory");
|
|
18
17
|
/**
|
|
19
18
|
* 取引開始
|
|
20
19
|
*/
|
|
@@ -64,9 +63,10 @@ function start(params) {
|
|
|
64
63
|
accountNumber: params.object.toLocation.accountNumber,
|
|
65
64
|
transaction: pendingTransaction
|
|
66
65
|
});
|
|
66
|
+
// 口座取引におけるAccountAction管理を廃止(2022-11-28~)
|
|
67
67
|
// アクション開始
|
|
68
|
-
const moneyTransferActionAttributes =
|
|
69
|
-
|
|
68
|
+
// const moneyTransferActionAttributes = createMoneyTransferActionAttributes({ transaction });
|
|
69
|
+
// await repos.accountAction.startByIdentifier(moneyTransferActionAttributes);
|
|
70
70
|
// 結果返却
|
|
71
71
|
return transaction;
|
|
72
72
|
});
|
|
@@ -3,11 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as factory from '../../factory';
|
|
5
5
|
import { MongoRepository as AccountRepo } from '../../repo/account';
|
|
6
|
-
import { MongoRepository as AccountActionRepo } from '../../repo/accountAction';
|
|
7
6
|
import { MongoRepository as AccountTransactionRepo } from '../../repo/accountTransaction';
|
|
8
7
|
export declare type IStartOperation<T> = (repos: {
|
|
9
8
|
account: AccountRepo;
|
|
10
|
-
accountAction: AccountActionRepo;
|
|
11
9
|
accountTransaction: AccountTransactionRepo;
|
|
12
10
|
}) => Promise<T>;
|
|
13
11
|
/**
|
|
@@ -14,7 +14,6 @@ exports.start = void 0;
|
|
|
14
14
|
* 転送取引サービス
|
|
15
15
|
*/
|
|
16
16
|
const factory = require("../../factory");
|
|
17
|
-
const factory_1 = require("./factory");
|
|
18
17
|
/**
|
|
19
18
|
* 取引開始
|
|
20
19
|
*/
|
|
@@ -96,9 +95,10 @@ function start(params) {
|
|
|
96
95
|
accountNumber: params.object.toLocation.accountNumber,
|
|
97
96
|
transaction: pendingTransaction
|
|
98
97
|
});
|
|
98
|
+
// 口座取引におけるAccountAction管理を廃止(2022-11-28~)
|
|
99
99
|
// アクション開始
|
|
100
|
-
const moneyTransferActionAttributes =
|
|
101
|
-
|
|
100
|
+
// const moneyTransferActionAttributes = createMoneyTransferActionAttributes({ transaction });
|
|
101
|
+
// await repos.accountAction.startByIdentifier(moneyTransferActionAttributes);
|
|
102
102
|
// 結果返却
|
|
103
103
|
return transaction;
|
|
104
104
|
});
|
|
@@ -3,11 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as factory from '../../factory';
|
|
5
5
|
import { MongoRepository as AccountRepo } from '../../repo/account';
|
|
6
|
-
import { MongoRepository as AccountActionRepo } from '../../repo/accountAction';
|
|
7
6
|
import { MongoRepository as AccountTransactionRepo } from '../../repo/accountTransaction';
|
|
8
7
|
export declare type IStartOperation<T> = (repos: {
|
|
9
8
|
account: AccountRepo;
|
|
10
|
-
accountAction: AccountActionRepo;
|
|
11
9
|
accountTransaction: AccountTransactionRepo;
|
|
12
10
|
}) => Promise<T>;
|
|
13
11
|
/**
|
|
@@ -14,7 +14,6 @@ exports.start = void 0;
|
|
|
14
14
|
* 出金取引サービス
|
|
15
15
|
*/
|
|
16
16
|
const factory = require("../../factory");
|
|
17
|
-
const factory_1 = require("./factory");
|
|
18
17
|
/**
|
|
19
18
|
* 取引開始
|
|
20
19
|
*/
|
|
@@ -75,9 +74,10 @@ function start(params) {
|
|
|
75
74
|
transaction: pendingTransaction,
|
|
76
75
|
force: forcibly
|
|
77
76
|
});
|
|
77
|
+
// 口座取引におけるAccountAction管理を廃止(2022-11-28~)
|
|
78
78
|
// アクション開始
|
|
79
|
-
const moneyTransferActionAttributes =
|
|
80
|
-
|
|
79
|
+
// const moneyTransferActionAttributes = createMoneyTransferActionAttributes({ transaction });
|
|
80
|
+
// await repos.accountAction.startByIdentifier(moneyTransferActionAttributes);
|
|
81
81
|
// 結果返却
|
|
82
82
|
return transaction;
|
|
83
83
|
});
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createPotentialActions = void 0;
|
|
4
4
|
const factory = require("../../../factory");
|
|
5
5
|
const order_1 = require("../../../factory/order");
|
|
6
|
-
const USE_NEW_PRICE_SPEC_ON_INFORM_PAY_ACTION = process.env.USE_NEW_PRICE_SPEC_ON_INFORM_PAY_ACTION === '1';
|
|
7
6
|
function createPayActions(params) {
|
|
8
7
|
var _a;
|
|
9
8
|
const payActions = [];
|
|
@@ -17,7 +16,8 @@ function createPayActions(params) {
|
|
|
17
16
|
seller: params.order.seller,
|
|
18
17
|
// mask
|
|
19
18
|
customer: { typeOf: maskedCustomer.typeOf, id: maskedCustomer.id, name: maskedCustomer.name },
|
|
20
|
-
|
|
19
|
+
// IOrderへ移行(2022-11-17~)
|
|
20
|
+
// confirmationNumber: params.order.confirmationNumber,
|
|
21
21
|
orderNumber: params.order.orderNumber,
|
|
22
22
|
price: params.order.price,
|
|
23
23
|
priceCurrency: params.order.priceCurrency,
|
|
@@ -122,8 +122,7 @@ function createPayObjectServiceOutput(params) {
|
|
|
122
122
|
paymentServiceOutput = movieTickets.map((movieTicket) => {
|
|
123
123
|
var _a;
|
|
124
124
|
const reservation4invoice = movieTicket2reservation4invoice(movieTicket, order, String(paymentMethodType));
|
|
125
|
-
return Object.assign({ identifier: movieTicket.identifier }, (typeof reservation4invoice.
|
|
126
|
-
|| typeof ((_a = reservation4invoice.priceSpecification) === null || _a === void 0 ? void 0 : _a.typeOf) === 'string')
|
|
125
|
+
return Object.assign({ identifier: movieTicket.identifier }, (typeof ((_a = reservation4invoice.priceSpecification) === null || _a === void 0 ? void 0 : _a.typeOf) === 'string')
|
|
127
126
|
? {
|
|
128
127
|
serviceOutput: reservation4invoice
|
|
129
128
|
}
|
|
@@ -138,7 +137,6 @@ function createPayObjectServiceOutput(params) {
|
|
|
138
137
|
}
|
|
139
138
|
function movieTicket2reservation4invoice(movieTicket, order, paymentMethodType) {
|
|
140
139
|
var _a, _b;
|
|
141
|
-
let reservationPrice;
|
|
142
140
|
let priceComponents4invoice = [];
|
|
143
141
|
// Orderから対象予約を取得
|
|
144
142
|
const reservationOffer = (_a = order === null || order === void 0 ? void 0 : order.acceptedOffers) === null || _a === void 0 ? void 0 : _a.find((o) => {
|
|
@@ -173,7 +171,6 @@ function movieTicket2reservation4invoice(movieTicket, order, paymentMethodType)
|
|
|
173
171
|
if (reservationOffer !== undefined) {
|
|
174
172
|
const priceComponent = (_b = reservationOffer.priceSpecification) === null || _b === void 0 ? void 0 : _b.priceComponent;
|
|
175
173
|
if (Array.isArray(priceComponent)) {
|
|
176
|
-
reservationPrice = priceComponent.reduce((a, b) => a + Number(b.price), 0);
|
|
177
174
|
priceComponents4invoice = priceComponent.map((component) => {
|
|
178
175
|
var _a;
|
|
179
176
|
const accounting = (typeof ((_a = component.accounting) === null || _a === void 0 ? void 0 : _a.accountsReceivable) === 'number')
|
|
@@ -193,19 +190,12 @@ function movieTicket2reservation4invoice(movieTicket, order, paymentMethodType)
|
|
|
193
190
|
});
|
|
194
191
|
}
|
|
195
192
|
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
};
|
|
203
|
-
}
|
|
204
|
-
else {
|
|
205
|
-
return {
|
|
206
|
-
price: reservationPrice
|
|
207
|
-
};
|
|
208
|
-
}
|
|
193
|
+
return {
|
|
194
|
+
priceSpecification: {
|
|
195
|
+
typeOf: factory.priceSpecificationType.CompoundPriceSpecification,
|
|
196
|
+
priceComponent: priceComponents4invoice
|
|
197
|
+
}
|
|
198
|
+
};
|
|
209
199
|
}
|
|
210
200
|
function createInformPaymentActions(params) {
|
|
211
201
|
var _a;
|