@chevre/domain 22.0.0-alpha.11 → 22.0.0-alpha.12

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.
Files changed (28) hide show
  1. package/lib/chevre/index.d.ts +1 -0
  2. package/lib/chevre/service/assetTransaction/reserve/start.d.ts +2 -2
  3. package/lib/chevre/service/assetTransaction/reserve/start.js +9 -8
  4. package/lib/chevre/service/offer/event/authorize/factory.d.ts +1 -1
  5. package/lib/chevre/service/offer/event/authorize/factory.js +2 -1
  6. package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +1 -1
  7. package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.js +4 -1
  8. package/lib/chevre/service/offer/event/authorize.js +5 -10
  9. package/lib/chevre/service/task/aggregateOffers.js +12 -12
  10. package/lib/chevre/service/task/aggregateUseActionsOnEvent.js +9 -9
  11. package/lib/chevre/service/task/cancelMoneyTransfer.js +3 -3
  12. package/lib/chevre/service/task/confirmMoneyTransfer.js +4 -4
  13. package/lib/chevre/service/task/confirmPayTransaction.js +10 -14
  14. package/lib/chevre/service/task/confirmRegisterService.js +4 -4
  15. package/lib/chevre/service/task/confirmRegisterServiceTransaction.js +4 -4
  16. package/lib/chevre/service/task/createEvent.js +5 -5
  17. package/lib/chevre/service/task/deleteTransaction.js +13 -13
  18. package/lib/chevre/service/task/givePointAward.js +7 -7
  19. package/lib/chevre/service/task/moneyTransfer.js +5 -5
  20. package/lib/chevre/service/task/onAssetTransactionStatusChanged.js +0 -3
  21. package/lib/chevre/service/task/onOrderPaymentCompleted.js +0 -3
  22. package/lib/chevre/service/task/registerService.js +4 -4
  23. package/lib/chevre/service/task/returnMoneyTransfer.js +7 -7
  24. package/lib/chevre/service/task/returnPayTransaction.js +10 -10
  25. package/lib/chevre/service/task/returnPointAward.js +7 -7
  26. package/lib/chevre/service/task/voidMoneyTransferTransaction.js +4 -4
  27. package/lib/chevre/service/task/voidRegisterServiceTransaction.js +4 -7
  28. package/package.json +1 -1
@@ -13,5 +13,6 @@ import * as service from './service';
13
13
  import * as settings from './settings';
14
14
  export { credentials, errorHandler, eventEmitter, factory, repository, service, settings };
15
15
  export declare function loadPecorinoapi(): Promise<typeof Pecorinoapi>;
16
+ export type COA = typeof COAService;
16
17
  export declare function loadCOA(): Promise<typeof COAService>;
17
18
  export declare function loadGMO(): Promise<typeof GMOService>;
@@ -1,6 +1,6 @@
1
1
  import * as factory from '../../../factory';
2
2
  import type { AssetTransactionRepo } from '../../../repo/assetTransaction';
3
- import type { EventRepo, IMinimizedIndividualEvent } from '../../../repo/event';
3
+ import type { EventRepo } from '../../../repo/event';
4
4
  import type { OfferRepo } from '../../../repo/offer';
5
5
  import type { OfferCatalogRepo } from '../../../repo/offerCatalog';
6
6
  import type { OfferCatalogItemRepo } from '../../../repo/offerCatalogItem';
@@ -34,8 +34,8 @@ type IObjectSubReservation = factory.assetTransaction.reserve.IObjectSubReservat
34
34
  type IStartParams = factory.assetTransaction.reserve.IStartParamsWithoutDetail & {
35
35
  /**
36
36
  * 承認アクションを介した場合に検索済のイベント
37
+ * discontinue preSearchedEvent(2024-07-17~)
37
38
  */
38
- preSearchedEvent?: IMinimizedIndividualEvent<factory.eventType.Event | factory.eventType.ScreeningEvent>;
39
39
  /**
40
40
  * 承認アクションを介した場合に検索済のオファーリスト
41
41
  */
@@ -79,19 +79,20 @@ function start(params, options) {
79
79
  exports.start = start;
80
80
  function fixEvent(params) {
81
81
  return (repos) => __awaiter(this, void 0, void 0, function* () {
82
- var _a, _b, _c;
82
+ var _a, _b;
83
83
  const reservationForId = (_a = params.object.reservationFor) === null || _a === void 0 ? void 0 : _a.id;
84
84
  if (typeof reservationForId !== 'string' || reservationForId.length === 0) {
85
85
  throw new factory.errors.ArgumentNull('object.reservationFor.id');
86
86
  }
87
87
  let event;
88
- if (typeof ((_b = params.preSearchedEvent) === null || _b === void 0 ? void 0 : _b.typeOf) === 'string') {
89
- event = params.preSearchedEvent;
90
- }
91
- else {
92
- event = yield repos.event.findMinimizedIndividualEventById({ id: reservationForId });
93
- }
94
- let offeredThrough = (_c = event.offers) === null || _c === void 0 ? void 0 : _c.offeredThrough;
88
+ // discontinue preSearchedEvent(2024-07-17~)
89
+ // if (typeof params.preSearchedEvent?.typeOf === 'string') {
90
+ // event = params.preSearchedEvent;
91
+ // } else {
92
+ // event = await repos.event.findMinimizedIndividualEventById({ id: reservationForId });
93
+ // }
94
+ event = yield repos.event.findMinimizedIndividualEventById({ id: reservationForId });
95
+ let offeredThrough = (_b = event.offers) === null || _b === void 0 ? void 0 : _b.offeredThrough;
95
96
  if (offeredThrough === undefined) {
96
97
  offeredThrough = { typeOf: 'WebAPI', identifier: factory.service.webAPI.Identifier.Chevre };
97
98
  }
@@ -13,7 +13,7 @@ declare function createReserveTransactionStartParams(params: {
13
13
  transactionNumber: string;
14
14
  }): factory.assetTransaction.reserve.IStartParamsWithoutDetail;
15
15
  declare function createAuthorizeSeatReservationActionAttributes(params: {
16
- event: Pick<IMinimizedIndividualEvent<factory.eventType.ScreeningEvent>, 'id' | 'typeOf'>;
16
+ event: Pick<IMinimizedIndividualEvent<factory.eventType.ScreeningEvent>, 'id'>;
17
17
  instrument: {
18
18
  /**
19
19
  * 予約取引番号
@@ -68,7 +68,8 @@ function createAuthorizeSeatReservationActionAttributes(params) {
68
68
  // typeOf: 'WebAPI'
69
69
  // }
70
70
  // },
71
- typeOf: event.typeOf
71
+ // typeOf: event.typeOf
72
+ typeOf: factory.eventType.ScreeningEvent // fix(2024-07-17~)
72
73
  };
73
74
  const object = {
74
75
  typeOf: factory.action.authorize.offer.eventService.ObjectType.SeatReservation,
@@ -19,7 +19,7 @@ import type { TaskRepo } from '../../../../repo/task';
19
19
  import type { TicketRepo } from '../../../../repo/ticket';
20
20
  declare function processStartReserve4chevre(params: {
21
21
  acceptedOffers: factory.action.authorize.offer.eventService.IAcceptedOffer4chevre[];
22
- event: IMinimizedIndividualEvent<factory.eventType.ScreeningEvent>;
22
+ event: Pick<IMinimizedIndividualEvent<factory.eventType.ScreeningEvent>, 'id'>;
23
23
  broker?: factory.reservation.IBroker<factory.reservationType>;
24
24
  transactionNumber: string;
25
25
  transaction: Pick<factory.transaction.ITransaction<factory.transactionType.PlaceOrder>, 'agent' | 'expires' | 'id' | 'project' | 'seller' | 'typeOf'>;
@@ -24,7 +24,10 @@ function processStartReserve4chevre(params, options) {
24
24
  acceptedOffers: params.acceptedOffers, event: { id: event.id }, transaction,
25
25
  transactionNumber }, (params.broker !== undefined) ? { broker: params.broker } : undefined));
26
26
  const startParamObject = yield validateObjectWithoutDetail(startParams)(repos, credentials);
27
- const startReserveTransactionResult = yield ReserveTransactionService.start(Object.assign(Object.assign({}, startParams), { object: startParamObject, preSearchedEvent: event, preSearchedTicketOffers: params.ticketOffers, preSearchedUnitPriceOffers: params.unitPriceOffers, availableAtOrFrom: { id: params.availableAtOrFrom.id }, validateEvent: params.validateEvent, validateEventOfferPeriod: params.validateEventOfferPeriod, validateAppliesToMovieTicket: true,
27
+ const startReserveTransactionResult = yield ReserveTransactionService.start(Object.assign(Object.assign({}, startParams), { object: startParamObject,
28
+ // discontinue preSearchedEvent(2024-07-17~)
29
+ // preSearchedEvent: event,
30
+ preSearchedTicketOffers: params.ticketOffers, preSearchedUnitPriceOffers: params.unitPriceOffers, availableAtOrFrom: { id: params.availableAtOrFrom.id }, validateEvent: params.validateEvent, validateEventOfferPeriod: params.validateEventOfferPeriod, validateAppliesToMovieTicket: true,
28
31
  // useHoldStockByTransactionNumber: params.useHoldStockByTransactionNumber, // discontinue(2024-07-02~)
29
32
  stockHoldUntilDaysAfterEventEnd: params.stockHoldUntilDaysAfterEventEnd }), options)(repos);
30
33
  // 予約取引結果から注文オファーを生成する
@@ -89,16 +89,11 @@ function validateCreateRequest(params) {
89
89
  if (typeof ((_b = params.object.reservationFor) === null || _b === void 0 ? void 0 : _b.id) !== 'string' || params.object.reservationFor.id.length === 0) {
90
90
  throw new factory.errors.ArgumentNull('object.reservationFor.id');
91
91
  }
92
- // イベント取得属性最適化(2023-01-23~)
93
- // const event = await repos.event.findById<factory.eventType.ScreeningEvent>({ id: params.object.reservationFor.id });
94
- const event = yield repos.event.findMinimizedIndividualEventById({
95
- id: params.object.reservationFor.id
96
- });
97
- // let offeredThrough = event.offers?.offeredThrough;
98
- // if (offeredThrough === undefined) {
99
- // offeredThrough = { typeOf: 'WebAPI', identifier: factory.service.webAPI.Identifier.Chevre };
100
- // }
101
- // const bookingServiceIdentifire = offeredThrough.identifier;
92
+ // discontinue preSearchedEvent(2024-07-17~)
93
+ // const event = await repos.event.findMinimizedIndividualEventById<factory.eventType.ScreeningEvent>({
94
+ // id: params.object.reservationFor.id
95
+ // });
96
+ const event = { id: params.object.reservationFor.id };
102
97
  return { transaction, event };
103
98
  });
104
99
  }
@@ -26,21 +26,21 @@ const aggregateOffers_1 = require("../aggregation/event/aggregateOffers");
26
26
  * タスク実行関数
27
27
  */
28
28
  function call(data) {
29
- return (settings) => __awaiter(this, void 0, void 0, function* () {
30
- if (settings.redisClient === undefined) {
29
+ return ({ redisClient, connection }) => __awaiter(this, void 0, void 0, function* () {
30
+ if (redisClient === undefined) {
31
31
  throw new factory.errors.Argument('settings', 'redisClient required');
32
32
  }
33
33
  yield (0, aggregateOffers_1.aggregateOffers)(data)({
34
- aggregateReservation: new aggregateReservation_1.AggregateReservationRepo(settings.connection),
35
- event: new event_1.EventRepo(settings.connection),
36
- stockHolder: new stockHolder_1.StockHolderRepo(settings.redisClient, settings.connection),
37
- offer: new offer_1.OfferRepo(settings.connection),
38
- offerCatalog: new offerCatalog_1.OfferCatalogRepo(settings.connection),
39
- offerRateLimit: new offer_2.OfferRateLimitRepo(settings.redisClient),
40
- product: new product_1.ProductRepo(settings.connection),
41
- reservation: new reservation_1.ReservationRepo(settings.connection),
42
- screeningRoom: new screeningRoom_1.ScreeningRoomRepo(settings.connection),
43
- task: new task_1.TaskRepo(settings.connection)
34
+ aggregateReservation: new aggregateReservation_1.AggregateReservationRepo(connection),
35
+ event: new event_1.EventRepo(connection),
36
+ stockHolder: new stockHolder_1.StockHolderRepo(redisClient, connection),
37
+ offer: new offer_1.OfferRepo(connection),
38
+ offerCatalog: new offerCatalog_1.OfferCatalogRepo(connection),
39
+ offerRateLimit: new offer_2.OfferRateLimitRepo(redisClient),
40
+ product: new product_1.ProductRepo(connection),
41
+ reservation: new reservation_1.ReservationRepo(connection),
42
+ screeningRoom: new screeningRoom_1.ScreeningRoomRepo(connection),
43
+ task: new task_1.TaskRepo(connection)
44
44
  });
45
45
  });
46
46
  }
@@ -23,18 +23,18 @@ const AggregationService = require("../aggregation");
23
23
  * タスク実行関数
24
24
  */
25
25
  function call(data) {
26
- return (settings) => __awaiter(this, void 0, void 0, function* () {
27
- if (settings.redisClient === undefined) {
26
+ return ({ redisClient, connection }) => __awaiter(this, void 0, void 0, function* () {
27
+ if (redisClient === undefined) {
28
28
  throw new factory.errors.Argument('settings', 'redisClient required');
29
29
  }
30
30
  yield AggregationService.event.aggregateUseActionsOnEvent(data)({
31
- action: new action_1.ActionRepo(settings.connection),
32
- aggregateReservation: new aggregateReservation_1.AggregateReservationRepo(settings.connection),
33
- event: new event_1.EventRepo(settings.connection),
34
- movieTheater: new movieTheater_1.MovieTheaterRepo(settings.connection),
35
- offer: new offer_1.OfferRepo(settings.connection),
36
- offerCatalog: new offerCatalog_1.OfferCatalogRepo(settings.connection),
37
- product: new product_1.ProductRepo(settings.connection)
31
+ action: new action_1.ActionRepo(connection),
32
+ aggregateReservation: new aggregateReservation_1.AggregateReservationRepo(connection),
33
+ event: new event_1.EventRepo(connection),
34
+ movieTheater: new movieTheater_1.MovieTheaterRepo(connection),
35
+ offer: new offer_1.OfferRepo(connection),
36
+ offerCatalog: new offerCatalog_1.OfferCatalogRepo(connection),
37
+ product: new product_1.ProductRepo(connection)
38
38
  });
39
39
  });
40
40
  }
@@ -17,9 +17,9 @@ const MoneyTransferService = require("../moneyTransfer");
17
17
  * タスク実行関数
18
18
  */
19
19
  function call(data) {
20
- return (settings) => __awaiter(this, void 0, void 0, function* () {
21
- const assetTransactionRepo = new assetTransaction_1.AssetTransactionRepo(settings.connection);
22
- const productRepo = new product_1.ProductRepo(settings.connection);
20
+ return ({ connection }) => __awaiter(this, void 0, void 0, function* () {
21
+ const assetTransactionRepo = new assetTransaction_1.AssetTransactionRepo(connection);
22
+ const productRepo = new product_1.ProductRepo(connection);
23
23
  yield MoneyTransferService.cancelMoneyTransfer(data)({
24
24
  assetTransaction: assetTransactionRepo,
25
25
  product: productRepo
@@ -18,11 +18,11 @@ const MoneyTransferOfferService = require("../offer/moneyTransfer");
18
18
  * タスク実行関数
19
19
  */
20
20
  function call(data) {
21
- return (settings) => __awaiter(this, void 0, void 0, function* () {
21
+ return ({ connection }) => __awaiter(this, void 0, void 0, function* () {
22
22
  yield MoneyTransferOfferService.settleTransaction(data)({
23
- action: new action_1.ActionRepo(settings.connection),
24
- assetTransaction: new assetTransaction_1.AssetTransactionRepo(settings.connection),
25
- task: new task_1.TaskRepo(settings.connection)
23
+ action: new action_1.ActionRepo(connection),
24
+ assetTransaction: new assetTransaction_1.AssetTransactionRepo(connection),
25
+ task: new task_1.TaskRepo(connection)
26
26
  });
27
27
  });
28
28
  }
@@ -10,7 +10,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.call = void 0;
13
- const factory = require("../../factory");
14
13
  const acceptedOffer_1 = require("../../repo/acceptedOffer");
15
14
  const accountingReport_1 = require("../../repo/accountingReport");
16
15
  const action_1 = require("../../repo/action");
@@ -25,20 +24,17 @@ const confirmPayTransaction_1 = require("../order/confirmPayTransaction");
25
24
  * タスク実行関数
26
25
  */
27
26
  function call(data) {
28
- return (settings) => __awaiter(this, void 0, void 0, function* () {
29
- if (settings.redisClient === undefined) {
30
- throw new factory.errors.Argument('settings', 'redisClient required');
31
- }
27
+ return ({ connection }) => __awaiter(this, void 0, void 0, function* () {
32
28
  yield (0, confirmPayTransaction_1.confirmPayTransaction)(data, {})({
33
- acceptedOffer: new acceptedOffer_1.AcceptedOfferRepo(settings.connection),
34
- action: new action_1.ActionRepo(settings.connection),
35
- assetTransaction: new assetTransaction_1.AssetTransactionRepo(settings.connection),
36
- order: new order_1.OrderRepo(settings.connection),
37
- accountingReport: new accountingReport_1.AccountingReportRepo(settings.connection),
38
- event: new event_1.EventRepo(settings.connection),
39
- project: new project_1.ProjectRepo(settings.connection),
40
- task: new task_1.TaskRepo(settings.connection),
41
- transaction: new transaction_1.TransactionRepo(settings.connection)
29
+ acceptedOffer: new acceptedOffer_1.AcceptedOfferRepo(connection),
30
+ action: new action_1.ActionRepo(connection),
31
+ assetTransaction: new assetTransaction_1.AssetTransactionRepo(connection),
32
+ order: new order_1.OrderRepo(connection),
33
+ accountingReport: new accountingReport_1.AccountingReportRepo(connection),
34
+ event: new event_1.EventRepo(connection),
35
+ project: new project_1.ProjectRepo(connection),
36
+ task: new task_1.TaskRepo(connection),
37
+ transaction: new transaction_1.TransactionRepo(connection)
42
38
  });
43
39
  });
44
40
  }
@@ -18,11 +18,11 @@ const confirmRegisterServiceTransaction_1 = require("./confirmRegisterServiceTra
18
18
  * タスク実行関数
19
19
  */
20
20
  function call(data) {
21
- return (settings) => __awaiter(this, void 0, void 0, function* () {
21
+ return ({ connection }) => __awaiter(this, void 0, void 0, function* () {
22
22
  yield (0, confirmRegisterServiceTransaction_1.confirmRegisterServiceTransaction)(data)({
23
- action: new action_1.ActionRepo(settings.connection),
24
- assetTransaction: new assetTransaction_1.AssetTransactionRepo(settings.connection),
25
- task: new task_1.TaskRepo(settings.connection)
23
+ action: new action_1.ActionRepo(connection),
24
+ assetTransaction: new assetTransaction_1.AssetTransactionRepo(connection),
25
+ task: new task_1.TaskRepo(connection)
26
26
  });
27
27
  });
28
28
  }
@@ -20,11 +20,11 @@ const RegisterServiceTransactionService = require("../assetTransaction/registerS
20
20
  * タスク実行関数
21
21
  */
22
22
  function call(data) {
23
- return (settings) => __awaiter(this, void 0, void 0, function* () {
23
+ return ({ connection }) => __awaiter(this, void 0, void 0, function* () {
24
24
  yield confirmRegisterServiceTransaction(data)({
25
- action: new action_1.ActionRepo(settings.connection),
26
- assetTransaction: new assetTransaction_1.AssetTransactionRepo(settings.connection),
27
- task: new task_1.TaskRepo(settings.connection)
25
+ action: new action_1.ActionRepo(connection),
26
+ assetTransaction: new assetTransaction_1.AssetTransactionRepo(connection),
27
+ task: new task_1.TaskRepo(connection)
28
28
  });
29
29
  });
30
30
  }
@@ -19,12 +19,12 @@ const EventService = require("../event");
19
19
  * タスク実行関数
20
20
  */
21
21
  function call(data) {
22
- return (settings) => __awaiter(this, void 0, void 0, function* () {
22
+ return ({ connection }) => __awaiter(this, void 0, void 0, function* () {
23
23
  yield EventService.createEvent(data)({
24
- action: new action_1.ActionRepo(settings.connection),
25
- event: new event_1.EventRepo(settings.connection),
26
- movieTheater: new movieTheater_1.MovieTheaterRepo(settings.connection),
27
- task: new task_1.TaskRepo(settings.connection)
24
+ action: new action_1.ActionRepo(connection),
25
+ event: new event_1.EventRepo(connection),
26
+ movieTheater: new movieTheater_1.MovieTheaterRepo(connection),
27
+ task: new task_1.TaskRepo(connection)
28
28
  });
29
29
  });
30
30
  }
@@ -27,20 +27,20 @@ const TransactionService = require("../transaction");
27
27
  * タスク実行関数
28
28
  */
29
29
  function call(data) {
30
- return (settings) => __awaiter(this, void 0, void 0, function* () {
30
+ return ({ connection }) => __awaiter(this, void 0, void 0, function* () {
31
31
  yield TransactionService.deleteTransaction(data)({
32
- acceptedOffer: new acceptedOffer_1.AcceptedOfferRepo(settings.connection),
33
- accountingReport: new accountingReport_1.AccountingReportRepo(settings.connection),
34
- action: new action_1.ActionRepo(settings.connection),
35
- assetTransaction: new assetTransaction_1.AssetTransactionRepo(settings.connection),
36
- event: new event_1.EventRepo(settings.connection),
37
- message: new message_1.MessageRepo(settings.connection),
38
- note: new note_1.NoteRepo(settings.connection),
39
- order: new order_1.OrderRepo(settings.connection),
40
- ownershipInfo: new ownershipInfo_1.OwnershipInfoRepo(settings.connection),
41
- reservation: new reservation_1.ReservationRepo(settings.connection),
42
- task: new task_1.TaskRepo(settings.connection),
43
- transaction: new transaction_1.TransactionRepo(settings.connection)
32
+ acceptedOffer: new acceptedOffer_1.AcceptedOfferRepo(connection),
33
+ accountingReport: new accountingReport_1.AccountingReportRepo(connection),
34
+ action: new action_1.ActionRepo(connection),
35
+ assetTransaction: new assetTransaction_1.AssetTransactionRepo(connection),
36
+ event: new event_1.EventRepo(connection),
37
+ message: new message_1.MessageRepo(connection),
38
+ note: new note_1.NoteRepo(connection),
39
+ order: new order_1.OrderRepo(connection),
40
+ ownershipInfo: new ownershipInfo_1.OwnershipInfoRepo(connection),
41
+ reservation: new reservation_1.ReservationRepo(connection),
42
+ task: new task_1.TaskRepo(connection),
43
+ transaction: new transaction_1.TransactionRepo(connection)
44
44
  });
45
45
  });
46
46
  }
@@ -21,15 +21,15 @@ const DeliveryService = require("../delivery");
21
21
  * タスク実行関数
22
22
  */
23
23
  function call(data) {
24
- return (settings) => __awaiter(this, void 0, void 0, function* () {
25
- if (settings.redisClient === undefined) {
24
+ return ({ redisClient, connection }) => __awaiter(this, void 0, void 0, function* () {
25
+ if (redisClient === undefined) {
26
26
  throw new factory.errors.Argument('settings', 'redisClient required');
27
27
  }
28
- const actionRepo = new action_1.ActionRepo(settings.connection);
29
- const assetTransactionRepo = new assetTransaction_1.AssetTransactionRepo(settings.connection);
30
- const productRepo = new product_1.ProductRepo(settings.connection);
31
- const projectRepo = new project_1.ProjectRepo(settings.connection);
32
- const transactionNumberRepo = new transactionNumber_1.TransactionNumberRepo(settings.redisClient);
28
+ const actionRepo = new action_1.ActionRepo(connection);
29
+ const assetTransactionRepo = new assetTransaction_1.AssetTransactionRepo(connection);
30
+ const productRepo = new product_1.ProductRepo(connection);
31
+ const projectRepo = new project_1.ProjectRepo(connection);
32
+ const transactionNumberRepo = new transactionNumber_1.TransactionNumberRepo(redisClient);
33
33
  yield DeliveryService.givePointAward(data)({
34
34
  action: actionRepo,
35
35
  assetTransaction: assetTransactionRepo,
@@ -19,13 +19,13 @@ const MoneyTransferService = require("../moneyTransfer");
19
19
  * タスク実行関数
20
20
  */
21
21
  function call(data) {
22
- return (settings) => __awaiter(this, void 0, void 0, function* () {
23
- if (settings.redisClient === undefined) {
22
+ return ({ redisClient, connection }) => __awaiter(this, void 0, void 0, function* () {
23
+ if (redisClient === undefined) {
24
24
  throw new factory.errors.Argument('settings', 'redisClient required');
25
25
  }
26
- const actionRepo = new action_1.ActionRepo(settings.connection);
27
- const productRepo = new product_1.ProductRepo(settings.connection);
28
- const transactionNumberRepo = new transactionNumber_1.TransactionNumberRepo(settings.redisClient);
26
+ const actionRepo = new action_1.ActionRepo(connection);
27
+ const productRepo = new product_1.ProductRepo(connection);
28
+ const transactionNumberRepo = new transactionNumber_1.TransactionNumberRepo(redisClient);
29
29
  yield MoneyTransferService.moneyTransfer(data)({
30
30
  action: actionRepo,
31
31
  product: productRepo,
@@ -21,9 +21,6 @@ const onAssetTransactionStatusChanged_1 = require("../order/onAssetTransactionSt
21
21
  */
22
22
  function call(data) {
23
23
  return ({ connection, settings }) => __awaiter(this, void 0, void 0, function* () {
24
- // if (settings.redisClient === undefined) {
25
- // throw new factory.errors.Argument('settings', 'redisClient required');
26
- // }
27
24
  yield (0, onAssetTransactionStatusChanged_1.onAssetTransactionStatusChanged)(data)({
28
25
  acceptedOffer: new acceptedOffer_1.AcceptedOfferRepo(connection),
29
26
  assetTransaction: new assetTransaction_1.AssetTransactionRepo(connection),
@@ -20,9 +20,6 @@ const payOrder_1 = require("../order/payOrder");
20
20
  */
21
21
  function call(data) {
22
22
  return ({ connection, settings }) => __awaiter(this, void 0, void 0, function* () {
23
- // if (settings.redisClient === undefined) {
24
- // throw new factory.errors.Argument('settings', 'redisClient required');
25
- // }
26
23
  yield (0, payOrder_1.payOrder)(data)({
27
24
  acceptedOffer: new acceptedOffer_1.AcceptedOfferRepo(connection),
28
25
  order: new order_1.OrderRepo(connection),
@@ -18,10 +18,10 @@ const ProductService = require("../product");
18
18
  * タスク実行関数
19
19
  */
20
20
  function call(data) {
21
- return (settings) => __awaiter(this, void 0, void 0, function* () {
22
- const actionRepo = new action_1.ActionRepo(settings.connection);
23
- const serviceOutputRepo = new serviceOutput_1.ServiceOutputRepo(settings.connection);
24
- const taskRepo = new task_1.TaskRepo(settings.connection);
21
+ return ({ connection }) => __awaiter(this, void 0, void 0, function* () {
22
+ const actionRepo = new action_1.ActionRepo(connection);
23
+ const serviceOutputRepo = new serviceOutput_1.ServiceOutputRepo(connection);
24
+ const taskRepo = new task_1.TaskRepo(connection);
25
25
  yield ProductService.registerService(data)({
26
26
  action: actionRepo,
27
27
  serviceOutput: serviceOutputRepo,
@@ -21,15 +21,15 @@ const MoneyTransferOfferService = require("../offer/moneyTransfer");
21
21
  * タスク実行関数
22
22
  */
23
23
  function call(data) {
24
- return (settings) => __awaiter(this, void 0, void 0, function* () {
25
- if (settings.redisClient === undefined) {
24
+ return ({ redisClient, connection }) => __awaiter(this, void 0, void 0, function* () {
25
+ if (redisClient === undefined) {
26
26
  throw new factory.errors.Argument('settings', 'redisClient required');
27
27
  }
28
- const actionRepo = new action_1.ActionRepo(settings.connection);
29
- const assetTransactionRepo = new assetTransaction_1.AssetTransactionRepo(settings.connection);
30
- const productRepo = new product_1.ProductRepo(settings.connection);
31
- const projectRepo = new project_1.ProjectRepo(settings.connection);
32
- const transactionNumberRepo = new transactionNumber_1.TransactionNumberRepo(settings.redisClient);
28
+ const actionRepo = new action_1.ActionRepo(connection);
29
+ const assetTransactionRepo = new assetTransaction_1.AssetTransactionRepo(connection);
30
+ const productRepo = new product_1.ProductRepo(connection);
31
+ const projectRepo = new project_1.ProjectRepo(connection);
32
+ const transactionNumberRepo = new transactionNumber_1.TransactionNumberRepo(redisClient);
33
33
  yield MoneyTransferOfferService.returnMoneyTransfer(data)({
34
34
  action: actionRepo,
35
35
  assetTransaction: assetTransactionRepo,
@@ -25,19 +25,19 @@ const RefundTransactionService = require("../assetTransaction/refund");
25
25
  * タスク実行関数
26
26
  */
27
27
  function call(params) {
28
- return (settings) => __awaiter(this, void 0, void 0, function* () {
29
- if (settings.redisClient === undefined) {
28
+ return ({ redisClient, connection }) => __awaiter(this, void 0, void 0, function* () {
29
+ if (redisClient === undefined) {
30
30
  throw new factory.errors.Argument('settings', 'redisClient required');
31
31
  }
32
32
  yield returnPayTransaction(Object.assign(Object.assign({}, params.data), { sameAs: { id: params.id } }))({
33
- action: new action_1.ActionRepo(settings.connection),
34
- assetTransaction: new assetTransaction_1.AssetTransactionRepo(settings.connection),
35
- order: new order_1.OrderRepo(settings.connection),
36
- paymentService: new paymentService_1.PaymentServiceRepo(settings.connection),
37
- product: new product_1.ProductRepo(settings.connection),
38
- task: new task_1.TaskRepo(settings.connection),
39
- transaction: new transaction_1.TransactionRepo(settings.connection),
40
- transactionNumber: new transactionNumber_1.TransactionNumberRepo(settings.redisClient)
33
+ action: new action_1.ActionRepo(connection),
34
+ assetTransaction: new assetTransaction_1.AssetTransactionRepo(connection),
35
+ order: new order_1.OrderRepo(connection),
36
+ paymentService: new paymentService_1.PaymentServiceRepo(connection),
37
+ product: new product_1.ProductRepo(connection),
38
+ task: new task_1.TaskRepo(connection),
39
+ transaction: new transaction_1.TransactionRepo(connection),
40
+ transactionNumber: new transactionNumber_1.TransactionNumberRepo(redisClient)
41
41
  });
42
42
  });
43
43
  }
@@ -21,15 +21,15 @@ const DeliveryService = require("../delivery");
21
21
  * タスク実行関数
22
22
  */
23
23
  function call(data) {
24
- return (settings) => __awaiter(this, void 0, void 0, function* () {
25
- if (settings.redisClient === undefined) {
24
+ return ({ redisClient, connection }) => __awaiter(this, void 0, void 0, function* () {
25
+ if (redisClient === undefined) {
26
26
  throw new factory.errors.Argument('settings', 'redisClient required');
27
27
  }
28
- const actionRepo = new action_1.ActionRepo(settings.connection);
29
- const assetTransactionRepo = new assetTransaction_1.AssetTransactionRepo(settings.connection);
30
- const productRepo = new product_1.ProductRepo(settings.connection);
31
- const projectRepo = new project_1.ProjectRepo(settings.connection);
32
- const transactionNumberRepo = new transactionNumber_1.TransactionNumberRepo(settings.redisClient);
28
+ const actionRepo = new action_1.ActionRepo(connection);
29
+ const assetTransactionRepo = new assetTransaction_1.AssetTransactionRepo(connection);
30
+ const productRepo = new product_1.ProductRepo(connection);
31
+ const projectRepo = new project_1.ProjectRepo(connection);
32
+ const transactionNumberRepo = new transactionNumber_1.TransactionNumberRepo(redisClient);
33
33
  yield DeliveryService.returnPointAward(data)({
34
34
  action: actionRepo,
35
35
  assetTransaction: assetTransactionRepo,
@@ -18,10 +18,10 @@ const MoneyTransferOfferService = require("../offer/moneyTransfer");
18
18
  * タスク実行関数
19
19
  */
20
20
  function call(data) {
21
- return (settings) => __awaiter(this, void 0, void 0, function* () {
22
- const actionRepo = new action_1.ActionRepo(settings.connection);
23
- const assetTransactionRepo = new assetTransaction_1.AssetTransactionRepo(settings.connection);
24
- const transactionRepo = new transaction_1.TransactionRepo(settings.connection);
21
+ return ({ connection }) => __awaiter(this, void 0, void 0, function* () {
22
+ const actionRepo = new action_1.ActionRepo(connection);
23
+ const assetTransactionRepo = new assetTransaction_1.AssetTransactionRepo(connection);
24
+ const transactionRepo = new transaction_1.TransactionRepo(connection);
25
25
  yield MoneyTransferOfferService.voidTransaction(data)({
26
26
  action: actionRepo,
27
27
  assetTransaction: assetTransactionRepo,
@@ -18,13 +18,10 @@ const ProductOfferService = require("../offer/product");
18
18
  * タスク実行関数
19
19
  */
20
20
  function call(data) {
21
- return (settings) => __awaiter(this, void 0, void 0, function* () {
22
- // if (settings.redisClient === undefined) {
23
- // throw new factory.errors.Argument('settings', 'redisClient required');
24
- // }
25
- const actionRepo = new action_1.ActionRepo(settings.connection);
26
- const assetTransactionRepo = new assetTransaction_1.AssetTransactionRepo(settings.connection);
27
- const transactionRepo = new transaction_1.TransactionRepo(settings.connection);
21
+ return ({ connection }) => __awaiter(this, void 0, void 0, function* () {
22
+ const actionRepo = new action_1.ActionRepo(connection);
23
+ const assetTransactionRepo = new assetTransaction_1.AssetTransactionRepo(connection);
24
+ const transactionRepo = new transaction_1.TransactionRepo(connection);
28
25
  yield ProductOfferService.voidTransaction(data)({
29
26
  action: actionRepo,
30
27
  assetTransaction: assetTransactionRepo,
package/package.json CHANGED
@@ -110,5 +110,5 @@
110
110
  "postversion": "git push origin --tags",
111
111
  "prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
112
112
  },
113
- "version": "22.0.0-alpha.11"
113
+ "version": "22.0.0-alpha.12"
114
114
  }