@chevre/domain 22.0.0-alpha.15 → 22.0.0-alpha.17
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/searchMinimizedEvent.ts +2 -7
- package/lib/chevre/repo/event.d.ts +1 -1
- package/lib/chevre/service/aggregation/event/aggregateUseActionsOnEvent.js +2 -2
- package/lib/chevre/service/aggregation/event/findEventOffers.d.ts +7 -3
- package/lib/chevre/service/offer/event/voidTransaction.d.ts +6 -4
- package/lib/chevre/service/offer/event/voidTransaction.js +16 -5
- package/lib/chevre/service/offer/event/voidTransactionByActionId.d.ts +4 -1
- package/lib/chevre/service/offer/event/voidTransactionByActionId.js +5 -1
- package/lib/chevre/service/offer/event.js +0 -1
- package/lib/chevre/service/payment/movieTicket/checkMovieTicket.js +6 -7
- package/lib/chevre/service/payment/movieTicket/factory.d.ts +13 -2
- package/lib/chevre/service/payment/movieTicket/payMovieTicket.js +6 -2
- package/lib/chevre/service/payment/movieTicket/processPurchaseNumberAuth.d.ts +11 -5
- package/lib/chevre/service/payment/movieTicket/validation.js +3 -1
- package/lib/chevre/service/task/cancelMoneyTransfer.js +2 -2
- package/lib/chevre/service/task/cancelPendingReservation.js +2 -2
- package/lib/chevre/service/task/cancelReservation.js +2 -2
- package/lib/chevre/service/task/confirmMoneyTransfer.js +2 -2
- package/lib/chevre/service/task/confirmRegisterServiceTransaction.js +2 -2
- package/lib/chevre/service/task/confirmReserveTransaction.js +4 -4
- package/lib/chevre/service/task/pay.js +2 -2
- package/lib/chevre/service/task/placeOrder.js +2 -2
- package/lib/chevre/service/task/refund.js +2 -2
- package/lib/chevre/service/task/registerService.js +2 -2
- package/lib/chevre/service/task/reserve.js +2 -2
- package/lib/chevre/service/task/returnMoneyTransfer.js +2 -2
- package/lib/chevre/service/task/sendEmailMessage.js +2 -2
- package/lib/chevre/service/task/sendOrder.js +2 -2
- package/lib/chevre/service/task/voidMoneyTransferTransaction.js +2 -2
- package/lib/chevre/service/task/voidPayTransaction.js +2 -2
- package/lib/chevre/service/task/voidPayment.js +2 -2
- package/lib/chevre/service/task/voidRegisterServiceTransaction.js +2 -2
- package/lib/chevre/service/task/voidReserveTransaction.js +2 -2
- package/package.json +1 -1
|
@@ -19,13 +19,8 @@ async function main() {
|
|
|
19
19
|
// id: 'blxonxv1m'
|
|
20
20
|
},
|
|
21
21
|
[
|
|
22
|
-
'
|
|
23
|
-
|
|
24
|
-
// 'offers.itemOffered',
|
|
25
|
-
'offers.itemOffered.id',
|
|
26
|
-
'offers.offeredThrough',
|
|
27
|
-
'offers.eligibleQuantity',
|
|
28
|
-
'offers.unacceptedPaymentMethod'
|
|
22
|
+
'additionalProperty', 'startDate', 'offers.offeredThrough', 'superEvent.workPerformed.identifier',
|
|
23
|
+
'location.branchCode'
|
|
29
24
|
]
|
|
30
25
|
);
|
|
31
26
|
// tslint:disable-next-line:no-null-keyword
|
|
@@ -74,7 +74,7 @@ type IKeyOfProjection<T extends factory.eventType> = keyof factory.event.IEvent<
|
|
|
74
74
|
* minimizedEvent検索時のprojection候補
|
|
75
75
|
* add(2024-07-18~)
|
|
76
76
|
*/
|
|
77
|
-
type IKeyOfProjection4minimizedEvent<T extends factory.eventType> = T extends factory.eventType.ScreeningEvent ? keyof IMinimizedIndividualEvent<T> | '
|
|
77
|
+
type IKeyOfProjection4minimizedEvent<T extends factory.eventType> = T extends factory.eventType.ScreeningEvent ? keyof IMinimizedIndividualEvent<T> | 'superEvent.id' | 'location.branchCode' | 'superEvent.workPerformed.identifier' | 'offers.itemOffered' | 'offers.itemOffered.id' | 'offers.offeredThrough' | 'offers.unacceptedPaymentMethod' | 'offers.eligibleQuantity' : T extends factory.eventType.Event ? keyof IMinimizedIndividualEvent<T> | 'superEvent.id' | 'location.branchCode' | 'superEvent.workPerformed.identifier' | 'offers.itemOffered' | 'offers.itemOffered.id' | 'offers.offeredThrough' | 'offers.unacceptedPaymentMethod' | 'offers.eligibleQuantity' : never;
|
|
78
78
|
type IUnset<T extends factory.eventType> = {
|
|
79
79
|
[key in keyof factory.event.IEvent<T>]?: 1;
|
|
80
80
|
};
|
|
@@ -22,8 +22,8 @@ function aggregateUseActionsOnEvent(params) {
|
|
|
22
22
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
23
23
|
const now = new Date();
|
|
24
24
|
// 集計対象イベント検索
|
|
25
|
-
//
|
|
26
|
-
|
|
25
|
+
const event = yield repos.event.findMinimizedIndividualEventById(params, ['offers.itemOffered.id', 'project', 'startDate', 'superEvent', 'typeOf'] // optimize projection(2024-07-19~)
|
|
26
|
+
);
|
|
27
27
|
// 入場ゲート検索
|
|
28
28
|
const entranceGates = yield findEntranceGates({ event })(repos);
|
|
29
29
|
// 入場ゲートごとの集計
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
import type { IMinimizedIndividualEvent } from '../../../repo/event';
|
|
2
1
|
import type { IUnitPriceOfferFromAggregateOffer, OfferRepo } from '../../../repo/offer';
|
|
3
2
|
import type { OfferCatalogRepo } from '../../../repo/offerCatalog';
|
|
4
3
|
import type { ProductRepo } from '../../../repo/product';
|
|
5
|
-
import * as factory from '../../../factory';
|
|
6
4
|
/**
|
|
7
5
|
* 興行オファー検索
|
|
8
6
|
* NotFoundエラーをハンドリングする
|
|
9
7
|
*/
|
|
10
8
|
export declare function findEventOffers(params: {
|
|
11
|
-
event:
|
|
9
|
+
event: {
|
|
10
|
+
offers?: {
|
|
11
|
+
itemOffered?: {
|
|
12
|
+
id?: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
12
16
|
}): (repos: {
|
|
13
17
|
offer: OfferRepo;
|
|
14
18
|
offerCatalog: OfferCatalogRepo;
|
|
@@ -9,7 +9,6 @@ import type { ReservationRepo } from '../../../repo/reservation';
|
|
|
9
9
|
import type { StockHolderRepo } from '../../../repo/stockHolder';
|
|
10
10
|
import type { TaskRepo } from '../../../repo/task';
|
|
11
11
|
import type { TransactionRepo } from '../../../repo/transaction';
|
|
12
|
-
export import WebAPIIdentifier = factory.service.webAPI.Identifier;
|
|
13
12
|
interface IVoidTransactionRepos {
|
|
14
13
|
action: ActionRepo;
|
|
15
14
|
assetTransaction: AssetTransactionRepo;
|
|
@@ -19,13 +18,16 @@ interface IVoidTransactionRepos {
|
|
|
19
18
|
reservation: ReservationRepo;
|
|
20
19
|
task: TaskRepo;
|
|
21
20
|
transaction: TransactionRepo;
|
|
22
|
-
|
|
21
|
+
/**
|
|
22
|
+
* COAオファー承認取消の場合必須
|
|
23
|
+
*/
|
|
24
|
+
reserveService?: COA.service.Reserve;
|
|
23
25
|
}
|
|
24
26
|
/**
|
|
25
27
|
* 興行オファー承認取消(タスクから実行 or apiから実行))
|
|
26
28
|
* 取引中の承認アクション全てについて処理する or 特定の承認アクションについて処理する
|
|
27
29
|
*/
|
|
28
|
-
|
|
30
|
+
declare function voidTransaction(params: factory.task.IData<factory.taskName.VoidReserveTransaction> & {
|
|
29
31
|
sameAs?: {
|
|
30
32
|
/**
|
|
31
33
|
* 実行元タスクID
|
|
@@ -33,4 +35,4 @@ export declare function voidTransaction(params: factory.task.IData<factory.taskN
|
|
|
33
35
|
id: string;
|
|
34
36
|
};
|
|
35
37
|
}): (repos: IVoidTransactionRepos, settings: Settings) => Promise<void>;
|
|
36
|
-
export {};
|
|
38
|
+
export { voidTransaction };
|
|
@@ -9,13 +9,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.voidTransaction =
|
|
12
|
+
exports.voidTransaction = void 0;
|
|
13
13
|
const factory = require("../../../factory");
|
|
14
14
|
const any_1 = require("../any");
|
|
15
15
|
const processVoidTransaction4chevre_1 = require("./voidTransaction/processVoidTransaction4chevre");
|
|
16
16
|
const processVoidTransaction4coa_1 = require("./voidTransaction/processVoidTransaction4coa");
|
|
17
17
|
const voidTransactionByActionId_1 = require("./voidTransactionByActionId");
|
|
18
|
-
|
|
18
|
+
var WebAPIIdentifier = factory.service.webAPI.Identifier;
|
|
19
19
|
/**
|
|
20
20
|
* 興行オファー承認取消(タスクから実行 or apiから実行))
|
|
21
21
|
* 取引中の承認アクション全てについて処理する or 特定の承認アクションについて処理する
|
|
@@ -75,10 +75,14 @@ function voidTransaction(params) {
|
|
|
75
75
|
yield Promise.all(authorizeActions.map((action) => __awaiter(this, void 0, void 0, function* () {
|
|
76
76
|
yield repos.action.cancelWithVoid({ typeOf: action.typeOf, id: action.id, cancelAction });
|
|
77
77
|
switch (action.instrument.identifier) {
|
|
78
|
-
case
|
|
78
|
+
case WebAPIIdentifier.COA:
|
|
79
|
+
const { reserveService } = repos;
|
|
80
|
+
if (reserveService === undefined) {
|
|
81
|
+
throw new factory.errors.Internal('repos.reserveService required');
|
|
82
|
+
}
|
|
79
83
|
yield (0, processVoidTransaction4coa_1.processVoidTransaction4coa)({
|
|
80
84
|
action: action
|
|
81
|
-
})(
|
|
85
|
+
})({ reserveService });
|
|
82
86
|
break;
|
|
83
87
|
default:
|
|
84
88
|
yield (0, processVoidTransaction4chevre_1.processVoidTransaction4chevre)({
|
|
@@ -146,9 +150,16 @@ function cancelAcceptActions(params) {
|
|
|
146
150
|
default:
|
|
147
151
|
// no op
|
|
148
152
|
}
|
|
153
|
+
const { reserveService } = repos;
|
|
149
154
|
yield Promise.all(acceptActions.map((action) => __awaiter(this, void 0, void 0, function* () {
|
|
150
155
|
yield repos.action.cancelWithVoid({ typeOf: action.typeOf, id: action.id, cancelAction });
|
|
151
|
-
|
|
156
|
+
if (reserveService === undefined) {
|
|
157
|
+
throw new factory.errors.Internal('repos.reserveService required');
|
|
158
|
+
}
|
|
159
|
+
yield (0, processVoidTransaction4coa_1.processVoidTransactionByAcceptAction4coa)({ action })({
|
|
160
|
+
action: repos.action,
|
|
161
|
+
reserveService
|
|
162
|
+
});
|
|
152
163
|
})));
|
|
153
164
|
});
|
|
154
165
|
}
|
|
@@ -18,7 +18,10 @@ interface IVoidTransactionByActionIdRepos {
|
|
|
18
18
|
reservation: ReservationRepo;
|
|
19
19
|
task: TaskRepo;
|
|
20
20
|
transaction: TransactionRepo;
|
|
21
|
-
|
|
21
|
+
/**
|
|
22
|
+
* COAオファー承認取消の場合必須
|
|
23
|
+
*/
|
|
24
|
+
reserveService?: COA.service.Reserve;
|
|
22
25
|
}
|
|
23
26
|
/**
|
|
24
27
|
* 興行オファー承認取消(apiから実行)
|
|
@@ -53,9 +53,13 @@ function voidTransactionByActionId(params) {
|
|
|
53
53
|
}
|
|
54
54
|
switch (action.instrument.identifier) {
|
|
55
55
|
case factory.service.webAPI.Identifier.COA:
|
|
56
|
+
const { reserveService } = repos;
|
|
57
|
+
if (reserveService === undefined) {
|
|
58
|
+
throw new factory.errors.Internal('repos.reserveService required');
|
|
59
|
+
}
|
|
56
60
|
yield (0, processVoidTransaction4coa_1.processVoidTransaction4coa)({
|
|
57
61
|
action: action
|
|
58
|
-
})(
|
|
62
|
+
})({ reserveService });
|
|
59
63
|
break;
|
|
60
64
|
default:
|
|
61
65
|
yield (0, processVoidTransaction4chevre_1.processVoidTransaction4chevre)({
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.searchOfferCatalogItems = exports.searchOfferCatalogItemAvailability = exports.searchOfferAppliesToMovieTicket = exports.searchEventTicketOffers = exports.voidTransaction = exports.importFromCOA = exports.importCategoryCodesFromCOA = exports.authorize = void 0;
|
|
4
4
|
const authorize_1 = require("./event/authorize");
|
|
5
5
|
Object.defineProperty(exports, "authorize", { enumerable: true, get: function () { return authorize_1.authorize; } });
|
|
6
|
-
// import { cancel } from './event/cancel';
|
|
7
6
|
const importFromCOA_1 = require("./event/importFromCOA");
|
|
8
7
|
Object.defineProperty(exports, "importCategoryCodesFromCOA", { enumerable: true, get: function () { return importFromCOA_1.importCategoryCodesFromCOA; } });
|
|
9
8
|
Object.defineProperty(exports, "importFromCOA", { enumerable: true, get: function () { return importFromCOA_1.importFromCOA; } });
|
|
@@ -53,9 +53,10 @@ function checkMovieTicket(params) {
|
|
|
53
53
|
if (eventIds.length !== 1) {
|
|
54
54
|
throw new factory.errors.Argument('movieTickets', 'Number of events must be 1');
|
|
55
55
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
const screeningEvent = yield repos.event.findMinimizedIndividualEventById({ id: eventIds[0] }, [
|
|
57
|
+
'typeOf', 'project', 'additionalProperty', 'startDate', 'offers.offeredThrough', 'superEvent.workPerformed.identifier'
|
|
58
|
+
] // optimize projection(2024-07-19~)
|
|
59
|
+
);
|
|
59
60
|
const sellerId = (_f = optimizedCheckObject[0]) === null || _f === void 0 ? void 0 : _f.seller.id;
|
|
60
61
|
const paymentAccepted = yield repos.paymentAccepted.isAcceptedBySeller({
|
|
61
62
|
seller: { id: sellerId },
|
|
@@ -65,10 +66,8 @@ function checkMovieTicket(params) {
|
|
|
65
66
|
throw new factory.errors.Argument('transactionId', `payment not accepted [${paymentMethodType}]`);
|
|
66
67
|
}
|
|
67
68
|
processPurchaseNumberAuthResult = yield (0, processPurchaseNumberAuth_1.processPurchaseNumberAuth)({
|
|
68
|
-
movieTickets
|
|
69
|
-
seller: { id: sellerId }
|
|
70
|
-
screeningEvent: screeningEvent,
|
|
71
|
-
paymentServiceId
|
|
69
|
+
movieTickets, screeningEvent, paymentServiceId,
|
|
70
|
+
seller: { id: sellerId }
|
|
72
71
|
})(repos, settings);
|
|
73
72
|
// add recipe(2024-06-07~)
|
|
74
73
|
recipe = (0, factory_1.processPurchaseNumberAuthResult2checkRecipe)({
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
import * as surfrock from '@surfrock/sdk';
|
|
2
2
|
import * as factory from '../../../factory';
|
|
3
3
|
import { IMinimizedIndividualEvent } from '../../../factory/event';
|
|
4
|
+
type IEvent4seatInfoSync = Pick<IMinimizedIndividualEvent<factory.eventType.ScreeningEvent>, 'id' | 'additionalProperty' | 'startDate'> & {
|
|
5
|
+
location: Pick<factory.event.event.ILocation, 'branchCode'>;
|
|
6
|
+
offers: {
|
|
7
|
+
offeredThrough?: factory.event.screeningEvent.IOfferedThrough | factory.event.screeningEvent.IOffer4COA['offeredThrough'];
|
|
8
|
+
};
|
|
9
|
+
superEvent: {
|
|
10
|
+
workPerformed: {
|
|
11
|
+
identifier: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
4
15
|
declare function createSeatInfoSyncIn(params: {
|
|
5
16
|
paymentMethodType: string;
|
|
6
17
|
paymentMethodId: string;
|
|
7
18
|
movieTickets: factory.action.trade.pay.IMovieTicket[];
|
|
8
|
-
event:
|
|
19
|
+
event: IEvent4seatInfoSync;
|
|
9
20
|
purpose: factory.action.trade.pay.IPurpose;
|
|
10
21
|
credentials: {
|
|
11
22
|
kgygishCd: string;
|
|
@@ -50,4 +61,4 @@ declare enum MovieticketReserveRequestErrorMessage {
|
|
|
50
61
|
ReservationResult19 = "ReservationResult 19",
|
|
51
62
|
CancellationPeriodPassed = "\u5EA7\u5E2D\u4E88\u7D04\u53D6\u6D88\u53EF\u80FD\u671F\u9593\u3092\u904E\u304E\u3066\u3044\u307E\u3059\u3002"
|
|
52
63
|
}
|
|
53
|
-
export { createSeatInfoSyncIn, createStartingPayAction, processPurchaseNumberAuthResult2checkRecipe, processSeatInfoSyncResult2payRecipe, processSeatInfoSyncResult2refundRecipe, MovieticketReserveRequestErrorMessage, IProcessPurchaseNumberAuthResult, IProcessSeatInfoSyncResult, IProcessSeatInfoSyncCancelResult };
|
|
64
|
+
export { createSeatInfoSyncIn, createStartingPayAction, processPurchaseNumberAuthResult2checkRecipe, processSeatInfoSyncResult2payRecipe, processSeatInfoSyncResult2refundRecipe, MovieticketReserveRequestErrorMessage, IEvent4seatInfoSync, IProcessPurchaseNumberAuthResult, IProcessSeatInfoSyncResult, IProcessSeatInfoSyncCancelResult };
|
|
@@ -111,8 +111,12 @@ function payActionParams2seatInfoSyncIn(params) {
|
|
|
111
111
|
if (eventIds.length !== 1) {
|
|
112
112
|
throw new factory.errors.Argument('movieTickets', 'Number of events must be 1');
|
|
113
113
|
}
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
const event = yield repos.event.findMinimizedIndividualEventById({ id: eventIds[0] },
|
|
115
|
+
// optimize projection(2024-07-19~)
|
|
116
|
+
[
|
|
117
|
+
'superEvent', 'additionalProperty', 'startDate', 'project',
|
|
118
|
+
'offers.offeredThrough', 'location.branchCode', 'superEvent.workPerformed.identifier'
|
|
119
|
+
]);
|
|
116
120
|
const sellerId = String((_d = params.recipient) === null || _d === void 0 ? void 0 : _d.id);
|
|
117
121
|
// 全購入管理番号のMovieTicketをマージ
|
|
118
122
|
const movieTickets = params.object.reduce((a, b) => [...a, ...(Array.isArray(b.movieTickets)) ? b.movieTickets : []], []);
|
|
@@ -7,16 +7,22 @@ interface ICheckResult {
|
|
|
7
7
|
purchaseNumberAuthIn: factory.action.check.paymentMethod.movieTicket.IPurchaseNumberAuthIn;
|
|
8
8
|
purchaseNumberAuthResult: factory.action.check.paymentMethod.movieTicket.IPurchaseNumberAuthResult;
|
|
9
9
|
}
|
|
10
|
+
type IEvent4checkByIdentifier = Pick<IMinimizedIndividualEvent<factory.eventType.ScreeningEvent>, 'id' | 'typeOf' | 'project' | 'additionalProperty' | 'startDate'> & {
|
|
11
|
+
offers: {
|
|
12
|
+
offeredThrough?: factory.event.screeningEvent.IOfferedThrough | factory.event.screeningEvent.IOffer4COA['offeredThrough'];
|
|
13
|
+
};
|
|
14
|
+
superEvent: {
|
|
15
|
+
workPerformed: {
|
|
16
|
+
identifier: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
10
20
|
interface ICheckByIdentifierParams {
|
|
11
21
|
movieTickets: factory.action.check.paymentMethod.movieTicket.IMovieTicket[];
|
|
12
22
|
seller: {
|
|
13
23
|
id: string;
|
|
14
24
|
};
|
|
15
|
-
screeningEvent:
|
|
16
|
-
offers: {
|
|
17
|
-
offeredThrough?: factory.event.screeningEvent.IOfferedThrough | factory.event.screeningEvent.IOffer4COA['offeredThrough'];
|
|
18
|
-
};
|
|
19
|
-
};
|
|
25
|
+
screeningEvent: IEvent4checkByIdentifier;
|
|
20
26
|
paymentServiceId: string;
|
|
21
27
|
}
|
|
22
28
|
declare function processPurchaseNumberAuth(params: ICheckByIdentifierParams): (repos: {
|
|
@@ -45,7 +45,9 @@ function validateMovieTicket(params, paymentServiceId, useCheckByIdentifierIfNot
|
|
|
45
45
|
throw new factory.errors.ArgumentNull('object.paymentMethod.identifier');
|
|
46
46
|
}
|
|
47
47
|
// イベント取得属性最適化(2023-01-23~)
|
|
48
|
-
const screeningEvent = yield repos.event.findMinimizedIndividualEventById({ id: eventIds[0] }, [
|
|
48
|
+
const screeningEvent = yield repos.event.findMinimizedIndividualEventById({ id: eventIds[0] }, [
|
|
49
|
+
'typeOf', 'project', 'additionalProperty', 'startDate', 'offers.offeredThrough', 'superEvent.workPerformed.identifier'
|
|
50
|
+
] // optimize(2024-07-18~)
|
|
49
51
|
);
|
|
50
52
|
// 販売者からムビチケ決済情報取得
|
|
51
53
|
const sellerId = (_c = params.recipient) === null || _c === void 0 ? void 0 : _c.id;
|
|
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.call = void 0;
|
|
13
13
|
const assetTransaction_1 = require("../../repo/assetTransaction");
|
|
14
14
|
const product_1 = require("../../repo/product");
|
|
15
|
-
const
|
|
15
|
+
const moneyTransfer_1 = require("../moneyTransfer");
|
|
16
16
|
/**
|
|
17
17
|
* タスク実行関数
|
|
18
18
|
*/
|
|
@@ -20,7 +20,7 @@ function call(data) {
|
|
|
20
20
|
return ({ connection }) => __awaiter(this, void 0, void 0, function* () {
|
|
21
21
|
const assetTransactionRepo = new assetTransaction_1.AssetTransactionRepo(connection);
|
|
22
22
|
const productRepo = new product_1.ProductRepo(connection);
|
|
23
|
-
yield
|
|
23
|
+
yield (0, moneyTransfer_1.cancelMoneyTransfer)(data)({
|
|
24
24
|
assetTransaction: assetTransactionRepo,
|
|
25
25
|
product: productRepo
|
|
26
26
|
});
|
|
@@ -17,7 +17,7 @@ const offer_1 = require("../../repo/rateLimit/offer");
|
|
|
17
17
|
const reservation_1 = require("../../repo/reservation");
|
|
18
18
|
const stockHolder_1 = require("../../repo/stockHolder");
|
|
19
19
|
const task_1 = require("../../repo/task");
|
|
20
|
-
const
|
|
20
|
+
const cancelReservation_1 = require("../reserve/cancelReservation");
|
|
21
21
|
/**
|
|
22
22
|
* タスク実行関数
|
|
23
23
|
*/
|
|
@@ -36,7 +36,7 @@ function call(data) {
|
|
|
36
36
|
// if (data.actionAttributes.length !== 1) {
|
|
37
37
|
// throw new factory.errors.Argument('data.actionAttributes', 'data.actionAttributes.length must be 1');
|
|
38
38
|
// }
|
|
39
|
-
yield
|
|
39
|
+
yield (0, cancelReservation_1.cancelPendingReservation)(data)({
|
|
40
40
|
action: actionRepo,
|
|
41
41
|
assetTransaction: assetTransactionRepo,
|
|
42
42
|
stockHolder: stockHolderRepo,
|
|
@@ -17,7 +17,7 @@ const offer_1 = require("../../repo/rateLimit/offer");
|
|
|
17
17
|
const reservation_1 = require("../../repo/reservation");
|
|
18
18
|
const stockHolder_1 = require("../../repo/stockHolder");
|
|
19
19
|
const task_1 = require("../../repo/task");
|
|
20
|
-
const
|
|
20
|
+
const cancelReservation_1 = require("../reserve/cancelReservation");
|
|
21
21
|
/**
|
|
22
22
|
* タスク実行関数
|
|
23
23
|
*/
|
|
@@ -32,7 +32,7 @@ function call(data) {
|
|
|
32
32
|
const transactionRepo = new assetTransaction_1.AssetTransactionRepo(connection);
|
|
33
33
|
const stockHolderRepo = new stockHolder_1.StockHolderRepo(redisClient, connection);
|
|
34
34
|
const offerRateLimitRepo = new offer_1.OfferRateLimitRepo(redisClient);
|
|
35
|
-
yield
|
|
35
|
+
yield (0, cancelReservation_1.cancelReservation)(data.actionAttributes)({
|
|
36
36
|
action: actionRepo,
|
|
37
37
|
reservation: reservationRepo,
|
|
38
38
|
task: taskRepo,
|
|
@@ -13,13 +13,13 @@ exports.call = void 0;
|
|
|
13
13
|
const action_1 = require("../../repo/action");
|
|
14
14
|
const assetTransaction_1 = require("../../repo/assetTransaction");
|
|
15
15
|
const task_1 = require("../../repo/task");
|
|
16
|
-
const
|
|
16
|
+
const settleTransaction_1 = require("../offer/moneyTransfer/settleTransaction");
|
|
17
17
|
/**
|
|
18
18
|
* タスク実行関数
|
|
19
19
|
*/
|
|
20
20
|
function call(data) {
|
|
21
21
|
return ({ connection }) => __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
yield
|
|
22
|
+
yield (0, settleTransaction_1.settleTransaction)(data)({
|
|
23
23
|
action: new action_1.ActionRepo(connection),
|
|
24
24
|
assetTransaction: new assetTransaction_1.AssetTransactionRepo(connection),
|
|
25
25
|
task: new task_1.TaskRepo(connection)
|
|
@@ -15,7 +15,7 @@ const factory = require("../../factory");
|
|
|
15
15
|
const action_1 = require("../../repo/action");
|
|
16
16
|
const assetTransaction_1 = require("../../repo/assetTransaction");
|
|
17
17
|
const task_1 = require("../../repo/task");
|
|
18
|
-
const
|
|
18
|
+
const registerService_1 = require("../assetTransaction/registerService");
|
|
19
19
|
/**
|
|
20
20
|
* タスク実行関数
|
|
21
21
|
*/
|
|
@@ -56,7 +56,7 @@ function confirmRegisterServiceTransaction(params) {
|
|
|
56
56
|
transactionNumber = params.object.transactionNumber;
|
|
57
57
|
}
|
|
58
58
|
if (typeof transactionNumber === 'string') {
|
|
59
|
-
yield
|
|
59
|
+
yield (0, registerService_1.confirm)(Object.assign({ transactionNumber }, (confirmActionAttributes.object.endDate !== undefined)
|
|
60
60
|
? {
|
|
61
61
|
endDate: moment(confirmActionAttributes.object.endDate)
|
|
62
62
|
.toDate()
|
|
@@ -20,8 +20,8 @@ const assetTransaction_1 = require("../../repo/assetTransaction");
|
|
|
20
20
|
const order_1 = require("../../repo/order");
|
|
21
21
|
const reservation_1 = require("../../repo/reservation");
|
|
22
22
|
const task_1 = require("../../repo/task");
|
|
23
|
-
const
|
|
24
|
-
const
|
|
23
|
+
const confirm_1 = require("../assetTransaction/reserve/confirm");
|
|
24
|
+
const reserveCOA_1 = require("../assetTransaction/reserveCOA");
|
|
25
25
|
const factory_1 = require("../assetTransaction/reserveCOA/factory");
|
|
26
26
|
/**
|
|
27
27
|
* タスク実行関数
|
|
@@ -171,7 +171,7 @@ function confirmReserveTransaction(params, options) {
|
|
|
171
171
|
switch (object.typeOf) {
|
|
172
172
|
case factory.assetTransactionType.COAReserveTransaction:
|
|
173
173
|
// COA本予約
|
|
174
|
-
const processConfirmCOAReserveResult = yield
|
|
174
|
+
const processConfirmCOAReserveResult = yield (0, reserveCOA_1.confirm)({
|
|
175
175
|
project: { id: confirmActionAttributes.project.id },
|
|
176
176
|
object: object,
|
|
177
177
|
purpose: confirmActionAttributes.purpose
|
|
@@ -184,7 +184,7 @@ function confirmReserveTransaction(params, options) {
|
|
|
184
184
|
break;
|
|
185
185
|
default:
|
|
186
186
|
// 予約取引確定
|
|
187
|
-
yield
|
|
187
|
+
yield (0, confirm_1.confirm)({
|
|
188
188
|
transactionNumber: object.transactionNumber,
|
|
189
189
|
potentialActions: object.potentialActions
|
|
190
190
|
})(repos, settings);
|
|
@@ -22,13 +22,13 @@ const product_1 = require("../../repo/product");
|
|
|
22
22
|
const project_1 = require("../../repo/project");
|
|
23
23
|
const sellerPaymentAccepted_1 = require("../../repo/sellerPaymentAccepted");
|
|
24
24
|
const task_1 = require("../../repo/task");
|
|
25
|
-
const
|
|
25
|
+
const payment_1 = require("../payment");
|
|
26
26
|
/**
|
|
27
27
|
* タスク実行関数
|
|
28
28
|
*/
|
|
29
29
|
function call(params) {
|
|
30
30
|
return ({ connection, settings }) => __awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
yield
|
|
31
|
+
yield (0, payment_1.pay)(Object.assign(Object.assign({}, params.data), { sameAs: { id: params.id, typeOf: 'Task' } // タスクIDを関連付け(2024-04-20~)
|
|
32
32
|
}))({
|
|
33
33
|
acceptedOffer: new acceptedOffer_1.AcceptedOfferRepo(connection),
|
|
34
34
|
accountingReport: new accountingReport_1.AccountingReportRepo(connection),
|
|
@@ -17,13 +17,13 @@ const order_1 = require("../../repo/order");
|
|
|
17
17
|
const orderInTransaction_1 = require("../../repo/orderInTransaction");
|
|
18
18
|
const task_1 = require("../../repo/task");
|
|
19
19
|
const transaction_1 = require("../../repo/transaction");
|
|
20
|
-
const
|
|
20
|
+
const placeOrder_1 = require("../order/placeOrder");
|
|
21
21
|
/**
|
|
22
22
|
* タスク実行関数
|
|
23
23
|
*/
|
|
24
24
|
function call(data) {
|
|
25
25
|
return ({ connection, settings }) => __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
yield
|
|
26
|
+
yield (0, placeOrder_1.placeOrder)(Object.assign(Object.assign({}, data), { useOnOrderStatusChanged: true }))({
|
|
27
27
|
acceptedOffer: new acceptedOffer_1.AcceptedOfferRepo(connection),
|
|
28
28
|
accountingReport: new accountingReport_1.AccountingReportRepo(connection),
|
|
29
29
|
action: new action_1.ActionRepo(connection),
|
|
@@ -21,7 +21,7 @@ const project_1 = require("../../repo/project");
|
|
|
21
21
|
const sellerPaymentAccepted_1 = require("../../repo/sellerPaymentAccepted");
|
|
22
22
|
const task_1 = require("../../repo/task");
|
|
23
23
|
const transactionNumber_1 = require("../../repo/transactionNumber");
|
|
24
|
-
const
|
|
24
|
+
const payment_1 = require("../payment");
|
|
25
25
|
/**
|
|
26
26
|
* タスク実行関数
|
|
27
27
|
*/
|
|
@@ -38,7 +38,7 @@ function call(params) {
|
|
|
38
38
|
else {
|
|
39
39
|
data = params;
|
|
40
40
|
}
|
|
41
|
-
yield
|
|
41
|
+
yield (0, payment_1.refund)(data)({
|
|
42
42
|
accountingReport: new accountingReport_1.AccountingReportRepo(connection),
|
|
43
43
|
action: new action_1.ActionRepo(connection),
|
|
44
44
|
paymentAccepted: new sellerPaymentAccepted_1.SellerPaymentAcceptedRepo(connection),
|
|
@@ -13,7 +13,7 @@ exports.call = void 0;
|
|
|
13
13
|
const action_1 = require("../../repo/action");
|
|
14
14
|
const serviceOutput_1 = require("../../repo/serviceOutput");
|
|
15
15
|
const task_1 = require("../../repo/task");
|
|
16
|
-
const
|
|
16
|
+
const product_1 = require("../product");
|
|
17
17
|
/**
|
|
18
18
|
* タスク実行関数
|
|
19
19
|
*/
|
|
@@ -22,7 +22,7 @@ function call(data) {
|
|
|
22
22
|
const actionRepo = new action_1.ActionRepo(connection);
|
|
23
23
|
const serviceOutputRepo = new serviceOutput_1.ServiceOutputRepo(connection);
|
|
24
24
|
const taskRepo = new task_1.TaskRepo(connection);
|
|
25
|
-
yield
|
|
25
|
+
yield (0, product_1.registerService)(data)({
|
|
26
26
|
action: actionRepo,
|
|
27
27
|
serviceOutput: serviceOutputRepo,
|
|
28
28
|
task: taskRepo
|
|
@@ -14,13 +14,13 @@ const action_1 = require("../../repo/action");
|
|
|
14
14
|
const assetTransaction_1 = require("../../repo/assetTransaction");
|
|
15
15
|
const reservation_1 = require("../../repo/reservation");
|
|
16
16
|
const task_1 = require("../../repo/task");
|
|
17
|
-
const
|
|
17
|
+
const confirmReservation_1 = require("../reserve/confirmReservation");
|
|
18
18
|
/**
|
|
19
19
|
* タスク実行関数
|
|
20
20
|
*/
|
|
21
21
|
function call(data) {
|
|
22
22
|
return ({ connection, settings }) => __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
yield
|
|
23
|
+
yield (0, confirmReservation_1.confirmReservation)({
|
|
24
24
|
// actionAttributesList: data.actionAttributes,
|
|
25
25
|
potentialReserveAction: data,
|
|
26
26
|
useOnReservationConfirmed: true,
|
|
@@ -16,7 +16,7 @@ const assetTransaction_1 = require("../../repo/assetTransaction");
|
|
|
16
16
|
const product_1 = require("../../repo/product");
|
|
17
17
|
const project_1 = require("../../repo/project");
|
|
18
18
|
const transactionNumber_1 = require("../../repo/transactionNumber");
|
|
19
|
-
const
|
|
19
|
+
const returnMoneyTransfer_1 = require("../offer/moneyTransfer/returnMoneyTransfer");
|
|
20
20
|
/**
|
|
21
21
|
* タスク実行関数
|
|
22
22
|
*/
|
|
@@ -30,7 +30,7 @@ function call(data) {
|
|
|
30
30
|
const productRepo = new product_1.ProductRepo(connection);
|
|
31
31
|
const projectRepo = new project_1.ProjectRepo(connection);
|
|
32
32
|
const transactionNumberRepo = new transactionNumber_1.TransactionNumberRepo(redisClient);
|
|
33
|
-
yield
|
|
33
|
+
yield (0, returnMoneyTransfer_1.returnMoneyTransfer)(data)({
|
|
34
34
|
action: actionRepo,
|
|
35
35
|
assetTransaction: assetTransactionRepo,
|
|
36
36
|
product: productRepo,
|
|
@@ -13,13 +13,13 @@ exports.call = void 0;
|
|
|
13
13
|
const action_1 = require("../../repo/action");
|
|
14
14
|
const message_1 = require("../../repo/message");
|
|
15
15
|
const project_1 = require("../../repo/project");
|
|
16
|
-
const
|
|
16
|
+
const notification_1 = require("../notification");
|
|
17
17
|
/**
|
|
18
18
|
* タスク実行関数
|
|
19
19
|
*/
|
|
20
20
|
function call(params) {
|
|
21
21
|
return ({ connection, credentials }) => __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
yield
|
|
22
|
+
yield (0, notification_1.sendEmailMessage)(Object.assign(Object.assign({}, params.data.actionAttributes), { sameAs: { id: params.id } // タスクIDを関連付け(2024-06-25~)
|
|
23
23
|
}))({
|
|
24
24
|
action: new action_1.ActionRepo(connection),
|
|
25
25
|
message: new message_1.MessageRepo(connection),
|
|
@@ -17,14 +17,14 @@ const order_1 = require("../../repo/order");
|
|
|
17
17
|
const ownershipInfo_1 = require("../../repo/ownershipInfo");
|
|
18
18
|
const task_1 = require("../../repo/task");
|
|
19
19
|
const transaction_1 = require("../../repo/transaction");
|
|
20
|
-
const
|
|
20
|
+
const sendOrder_1 = require("../order/sendOrder");
|
|
21
21
|
/**
|
|
22
22
|
* タスク実行関数
|
|
23
23
|
*/
|
|
24
24
|
function call(data) {
|
|
25
25
|
return ({ connection, settings }) => __awaiter(this, void 0, void 0, function* () {
|
|
26
26
|
var _a;
|
|
27
|
-
yield
|
|
27
|
+
yield (0, sendOrder_1.sendOrder)(Object.assign(Object.assign({}, data), { object: Object.assign(Object.assign({}, data.object), { previousOrderStatus: (typeof data.object.previousOrderStatus === 'string')
|
|
28
28
|
? data.object.previousOrderStatus
|
|
29
29
|
: factory.orderStatus.OrderInTransit, acceptedOffers: (typeof ((_a = data.object.acceptedOffers) === null || _a === void 0 ? void 0 : _a.limit) === 'number')
|
|
30
30
|
? data.object.acceptedOffers
|
|
@@ -13,7 +13,7 @@ exports.call = void 0;
|
|
|
13
13
|
const action_1 = require("../../repo/action");
|
|
14
14
|
const assetTransaction_1 = require("../../repo/assetTransaction");
|
|
15
15
|
const transaction_1 = require("../../repo/transaction");
|
|
16
|
-
const
|
|
16
|
+
const voidTransaction_1 = require("../offer/moneyTransfer/voidTransaction");
|
|
17
17
|
/**
|
|
18
18
|
* タスク実行関数
|
|
19
19
|
*/
|
|
@@ -22,7 +22,7 @@ function call(data) {
|
|
|
22
22
|
const actionRepo = new action_1.ActionRepo(connection);
|
|
23
23
|
const assetTransactionRepo = new assetTransaction_1.AssetTransactionRepo(connection);
|
|
24
24
|
const transactionRepo = new transaction_1.TransactionRepo(connection);
|
|
25
|
-
yield
|
|
25
|
+
yield (0, voidTransaction_1.voidTransaction)(data)({
|
|
26
26
|
action: actionRepo,
|
|
27
27
|
assetTransaction: assetTransactionRepo,
|
|
28
28
|
transaction: transactionRepo
|
|
@@ -18,13 +18,13 @@ const paymentServiceProvider_1 = require("../../repo/paymentServiceProvider");
|
|
|
18
18
|
const sellerPaymentAccepted_1 = require("../../repo/sellerPaymentAccepted");
|
|
19
19
|
const task_1 = require("../../repo/task");
|
|
20
20
|
const transaction_1 = require("../../repo/transaction");
|
|
21
|
-
const
|
|
21
|
+
const any_1 = require("../payment/any");
|
|
22
22
|
/**
|
|
23
23
|
* タスク実行関数
|
|
24
24
|
*/
|
|
25
25
|
function call(params) {
|
|
26
26
|
return ({ connection, settings }) => __awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
yield
|
|
27
|
+
yield (0, any_1.voidPayTransaction)(Object.assign(Object.assign({}, params.data), { sameAs: { id: params.id } }))({
|
|
28
28
|
accountingReport: new accountingReport_1.AccountingReportRepo(connection),
|
|
29
29
|
action: new action_1.ActionRepo(connection),
|
|
30
30
|
assetTransaction: new assetTransaction_1.AssetTransactionRepo(connection),
|
|
@@ -18,13 +18,13 @@ const product_1 = require("../../repo/product");
|
|
|
18
18
|
const project_1 = require("../../repo/project");
|
|
19
19
|
const sellerPaymentAccepted_1 = require("../../repo/sellerPaymentAccepted");
|
|
20
20
|
const task_1 = require("../../repo/task");
|
|
21
|
-
const
|
|
21
|
+
const payment_1 = require("../payment");
|
|
22
22
|
/**
|
|
23
23
|
* タスク実行関数
|
|
24
24
|
*/
|
|
25
25
|
function call(data) {
|
|
26
26
|
return ({ connection, settings }) => __awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
yield
|
|
27
|
+
yield (0, payment_1.voidPayment)(data)({
|
|
28
28
|
accountingReport: new accountingReport_1.AccountingReportRepo(connection),
|
|
29
29
|
action: new action_1.ActionRepo(connection),
|
|
30
30
|
paymentAccepted: new sellerPaymentAccepted_1.SellerPaymentAcceptedRepo(connection),
|
|
@@ -13,7 +13,7 @@ exports.call = void 0;
|
|
|
13
13
|
const action_1 = require("../../repo/action");
|
|
14
14
|
const assetTransaction_1 = require("../../repo/assetTransaction");
|
|
15
15
|
const transaction_1 = require("../../repo/transaction");
|
|
16
|
-
const
|
|
16
|
+
const product_1 = require("../offer/product");
|
|
17
17
|
/**
|
|
18
18
|
* タスク実行関数
|
|
19
19
|
*/
|
|
@@ -22,7 +22,7 @@ function call(data) {
|
|
|
22
22
|
const actionRepo = new action_1.ActionRepo(connection);
|
|
23
23
|
const assetTransactionRepo = new assetTransaction_1.AssetTransactionRepo(connection);
|
|
24
24
|
const transactionRepo = new transaction_1.TransactionRepo(connection);
|
|
25
|
-
yield
|
|
25
|
+
yield (0, product_1.voidTransaction)(data)({
|
|
26
26
|
action: actionRepo,
|
|
27
27
|
assetTransaction: assetTransactionRepo,
|
|
28
28
|
transaction: transactionRepo
|
|
@@ -21,7 +21,7 @@ const stockHolder_1 = require("../../repo/stockHolder");
|
|
|
21
21
|
const task_1 = require("../../repo/task");
|
|
22
22
|
const transaction_1 = require("../../repo/transaction");
|
|
23
23
|
const transactionProcess_1 = require("../../repo/transactionProcess");
|
|
24
|
-
const
|
|
24
|
+
const voidTransaction_1 = require("../offer/event/voidTransaction");
|
|
25
25
|
/**
|
|
26
26
|
* タスク実行関数
|
|
27
27
|
*/
|
|
@@ -47,7 +47,7 @@ function call(params) {
|
|
|
47
47
|
}, { timeout: settings.coa.timeout });
|
|
48
48
|
const transactionProcessRepo = new transactionProcess_1.TransactionProcessRepo(redisClient, { lockExpiresInSeconds: 120 });
|
|
49
49
|
try {
|
|
50
|
-
yield (0,
|
|
50
|
+
yield (0, voidTransaction_1.voidTransaction)(Object.assign(Object.assign({}, params.data), { sameAs: { id: params.id } }))({
|
|
51
51
|
action: new action_1.ActionRepo(connection),
|
|
52
52
|
assetTransaction: new assetTransaction_1.AssetTransactionRepo(connection),
|
|
53
53
|
stockHolder: new stockHolder_1.StockHolderRepo(redisClient, connection),
|
package/package.json
CHANGED