@chevre/domain 25.0.0-alpha.8 → 25.0.0

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 (96) hide show
  1. package/lib/chevre/repo/message.d.ts +7 -15
  2. package/lib/chevre/repo/message.js +37 -74
  3. package/lib/chevre/repo/mongoose/schemas/message.d.ts +1 -1
  4. package/lib/chevre/repo/mongoose/schemas/order.d.ts +4 -0
  5. package/lib/chevre/repo/mongoose/schemas/order.js +11 -110
  6. package/lib/chevre/repo/mongoose/schemas/setting.d.ts +7 -15
  7. package/lib/chevre/repo/mongoose/schemas/setting.js +1 -1
  8. package/lib/chevre/repo/mongoose/schemas/transaction.js +51 -50
  9. package/lib/chevre/repo/order.d.ts +3 -7
  10. package/lib/chevre/repo/order.js +56 -26
  11. package/lib/chevre/repo/orderInTransaction.d.ts +45 -22
  12. package/lib/chevre/repo/orderInTransaction.js +108 -77
  13. package/lib/chevre/repo/orderNumber.d.ts +4 -0
  14. package/lib/chevre/repo/orderNumber.js +32 -60
  15. package/lib/chevre/repo/passport.d.ts +5 -2
  16. package/lib/chevre/repo/setting/waiter.d.ts +17 -0
  17. package/lib/chevre/repo/setting/waiter.js +39 -0
  18. package/lib/chevre/repo/setting.d.ts +12 -11
  19. package/lib/chevre/repo/setting.js +6 -18
  20. package/lib/chevre/repo/task.d.ts +1 -1
  21. package/lib/chevre/repo/transaction/placeOrder.d.ts +1 -6
  22. package/lib/chevre/repo/transaction/placeOrder.js +37 -26
  23. package/lib/chevre/repo/transaction.d.ts +1 -1
  24. package/lib/chevre/repo/transaction.js +2 -2
  25. package/lib/chevre/repository.d.ts +5 -0
  26. package/lib/chevre/repository.js +11 -0
  27. package/lib/chevre/service/assetTransaction/reserve/start.d.ts +0 -2
  28. package/lib/chevre/service/offer/any.d.ts +2 -3
  29. package/lib/chevre/service/offer/any.js +8 -8
  30. package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +0 -2
  31. package/lib/chevre/service/offer/event/authorize.d.ts +0 -4
  32. package/lib/chevre/service/offer/event/authorize.js +6 -8
  33. package/lib/chevre/service/offer/event/voidTransaction.js +29 -17
  34. package/lib/chevre/service/offer/event/voidTransactionByActionId.js +16 -12
  35. package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer.d.ts +0 -6
  36. package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer.js +10 -12
  37. package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.d.ts +1 -1
  38. package/lib/chevre/service/offer/eventServiceByCOA/authorize.js +7 -7
  39. package/lib/chevre/service/offer/eventServiceByCOA/changeOffers.js +21 -17
  40. package/lib/chevre/service/order/deleteOrder.d.ts +6 -10
  41. package/lib/chevre/service/order/deleteOrder.js +7 -48
  42. package/lib/chevre/service/order/onOrderStatusChanged/onOrderCancelled/factory.d.ts +1 -1
  43. package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.d.ts +1 -1
  44. package/lib/chevre/service/order/onOrderStatusChanged/onOrderPaymentDue.d.ts +4 -1
  45. package/lib/chevre/service/order/onOrderStatusChanged/onOrderPaymentDue.js +1 -26
  46. package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned/factory.d.ts +1 -1
  47. package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.js +3 -2
  48. package/lib/chevre/service/order/placeOrder/factory.d.ts +1 -1
  49. package/lib/chevre/service/order/placeOrder/factory.js +6 -6
  50. package/lib/chevre/service/order/placeOrder/voidAcceptedOfferIfNecessary.d.ts +1 -3
  51. package/lib/chevre/service/order/placeOrder/voidAcceptedOfferIfNecessary.js +3 -15
  52. package/lib/chevre/service/order/placeOrder.js +6 -6
  53. package/lib/chevre/service/order.d.ts +1 -2
  54. package/lib/chevre/service/order.js +1 -5
  55. package/lib/chevre/service/payment/any/authorize/fixOrderAsNeeded.d.ts +2 -4
  56. package/lib/chevre/service/payment/any/authorize/fixOrderAsNeeded.js +4 -6
  57. package/lib/chevre/service/payment/any/authorize.d.ts +2 -0
  58. package/lib/chevre/service/payment/any/publishPaymentUrl.d.ts +0 -4
  59. package/lib/chevre/service/payment/any/publishPaymentUrl.js +5 -8
  60. package/lib/chevre/service/task/acceptCOAOffer.js +8 -10
  61. package/lib/chevre/service/task/authorizePayment.js +2 -6
  62. package/lib/chevre/service/task/deleteTransaction.js +2 -10
  63. package/lib/chevre/service/task/publishPaymentUrl.js +6 -9
  64. package/lib/chevre/service/taskHandler.js +0 -1
  65. package/lib/chevre/service/transaction/deleteTransaction.d.ts +8 -16
  66. package/lib/chevre/service/transaction/deleteTransaction.js +46 -145
  67. package/lib/chevre/service/transaction/placeOrder/confirm/factory/result.d.ts +7 -2
  68. package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions/sendEmailMessage.d.ts +3 -2
  69. package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.d.ts +3 -2
  70. package/lib/chevre/service/transaction/placeOrder/confirm.d.ts +2 -5
  71. package/lib/chevre/service/transaction/placeOrder/confirm.js +29 -24
  72. package/lib/chevre/service/transaction/placeOrder/exportTasks/factory.d.ts +2 -3
  73. package/lib/chevre/service/transaction/placeOrder/exportTasks/factory.js +45 -54
  74. package/lib/chevre/service/transaction/placeOrder/exportTasksById.d.ts +0 -4
  75. package/lib/chevre/service/transaction/placeOrder/exportTasksById.js +2 -3
  76. package/lib/chevre/service/transaction/placeOrder/issueOrderNumberIfNotExist.d.ts +5 -0
  77. package/lib/chevre/service/transaction/placeOrder/issueOrderNumberIfNotExist.js +37 -23
  78. package/lib/chevre/service/transaction/placeOrder/start/factory.d.ts +20 -4
  79. package/lib/chevre/service/transaction/placeOrder/start/factory.js +20 -7
  80. package/lib/chevre/service/transaction/placeOrder/start.d.ts +9 -4
  81. package/lib/chevre/service/transaction/placeOrder/start.js +18 -1
  82. package/lib/chevre/service/transaction/placeOrder/updateAgent.d.ts +0 -4
  83. package/lib/chevre/service/transaction/placeOrder/updateAgent.js +20 -22
  84. package/lib/chevre/service/transaction/placeOrder.d.ts +1 -2
  85. package/lib/chevre/service/transaction/placeOrder.js +1 -3
  86. package/lib/chevre/service/transaction.d.ts +0 -4
  87. package/lib/chevre/service/transaction.js +1 -1
  88. package/lib/chevre/service.d.ts +0 -2
  89. package/lib/chevre/service.js +0 -2
  90. package/package.json +2 -2
  91. package/lib/chevre/factory/order.d.ts +0 -2
  92. package/lib/chevre/factory/order.js +0 -5
  93. package/lib/chevre/service/order/placeOrderWithoutTransaction.d.ts +0 -22
  94. package/lib/chevre/service/order/placeOrderWithoutTransaction.js +0 -51
  95. package/lib/chevre/service/task/deletePerson.d.ts +0 -6
  96. package/lib/chevre/service/task/deletePerson.js +0 -465
@@ -1,27 +1,15 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.voidAcceptedOfferIfNecessary = voidAcceptedOfferIfNecessary;
7
- const debug_1 = __importDefault(require("debug"));
8
- // import type { TransactionRepo } from '../../../repo/transaction';
9
- // import { factory } from '../../../factory';
10
- const debug = (0, debug_1.default)('chevre-domain:service:order');
11
- // type IPlaceOrderTransaction = Pick<
12
- // factory.transaction.placeOrder.ITransaction,
13
- // 'id' | 'project' | 'typeOf' | 'result' | 'object' | 'seller'
14
- // >;
15
4
  function voidAcceptedOfferIfNecessary(params) {
16
5
  return async (repos) => {
17
6
  if (Array.isArray(params.serialNumbers) && params.serialNumbers.length > 0) {
18
7
  // 取引に保管された承認アクション以外のアクションについて、オファーを除外する
19
- debug('voidAcceptedOfferBySerialNumber processing...', params.object.orderNumber, 'serialNumbersMustBeIn:', params.serialNumbers);
20
- const voidAcceptedOfferBySerialNumberResult = await repos.orderInTransaction.voidAcceptedOfferBySerialNumber({
21
- orderNumber: params.object.orderNumber,
8
+ // const voidAcceptedOfferBySerialNumberResult =
9
+ await repos.orderInTransaction.voidAcceptedOfferByIdentifier({
10
+ identifier: params.placeOrderId,
22
11
  acceptedOffers: { serialNumber: { $nin: params.serialNumbers } }
23
12
  });
24
- debug('voidAcceptedOfferBySerialNumber processed.', params.object.orderNumber, 'voidAcceptedOfferBySerialNumberResult:', voidAcceptedOfferBySerialNumberResult);
25
13
  }
26
14
  };
27
15
  }
@@ -61,11 +61,11 @@ function placeOrder(params) {
61
61
  try {
62
62
  // 冗長なオファーを除外する(念のため)
63
63
  await (0, voidAcceptedOfferIfNecessary_1.voidAcceptedOfferIfNecessary)({
64
- object: { orderNumber: order.orderNumber },
65
- // purpose: placeOrderTransaction,
64
+ // object: { orderNumber: order.orderNumber },
65
+ placeOrderId: placeOrderTransaction.id,
66
66
  serialNumbers
67
67
  })(repos);
68
- await repos.orderInTransaction.placeOrder(order);
68
+ await repos.orderInTransaction.placeOrderByIdentifier({ identifier: placeOrderTransaction.id }, order);
69
69
  }
70
70
  catch (error) {
71
71
  try {
@@ -89,10 +89,10 @@ function placeOrder(params) {
89
89
  orderNumber: order.orderNumber,
90
90
  confirmationNumber: order.confirmationNumber,
91
91
  orderDate: order.orderDate,
92
- seller: order.seller,
92
+ // seller: order.seller,
93
93
  typeOf: order.typeOf,
94
- price: order.price,
95
- priceCurrency: order.priceCurrency,
94
+ // price: order.price,
95
+ // priceCurrency: order.priceCurrency,
96
96
  orderStatus: order.orderStatus
97
97
  }
98
98
  })({
@@ -6,5 +6,4 @@ import { paymentDue2Processing } from './order/onAssetTransactionStatusChanged';
6
6
  import { processOrder } from './order/onOrderStatusChanged';
7
7
  import { onOrderUpdated } from './order/onOrderUpdated';
8
8
  import { placeOrder } from './order/placeOrder';
9
- import { placeOrderWithoutTransaction } from './order/placeOrderWithoutTransaction';
10
- export { confirmPayTransaction, onOrderUpdated, paymentDue2Processing, placeOrder, placeOrderWithoutTransaction, processOrder, };
9
+ export { confirmPayTransaction, onOrderUpdated, paymentDue2Processing, placeOrder, processOrder, };
@@ -1,20 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.processOrder = exports.placeOrderWithoutTransaction = exports.placeOrder = exports.paymentDue2Processing = exports.onOrderUpdated = exports.confirmPayTransaction = void 0;
3
+ exports.processOrder = exports.placeOrder = exports.paymentDue2Processing = exports.onOrderUpdated = exports.confirmPayTransaction = void 0;
4
4
  /**
5
5
  * 注文サービス
6
6
  */
7
7
  const confirmPayTransaction_1 = require("./order/confirmPayTransaction");
8
8
  Object.defineProperty(exports, "confirmPayTransaction", { enumerable: true, get: function () { return confirmPayTransaction_1.confirmPayTransaction; } });
9
- // import { deleteOrder } from './order/deleteOrder';
10
9
  const onAssetTransactionStatusChanged_1 = require("./order/onAssetTransactionStatusChanged");
11
10
  Object.defineProperty(exports, "paymentDue2Processing", { enumerable: true, get: function () { return onAssetTransactionStatusChanged_1.paymentDue2Processing; } });
12
11
  const onOrderStatusChanged_1 = require("./order/onOrderStatusChanged");
13
12
  Object.defineProperty(exports, "processOrder", { enumerable: true, get: function () { return onOrderStatusChanged_1.processOrder; } });
14
13
  const onOrderUpdated_1 = require("./order/onOrderUpdated");
15
14
  Object.defineProperty(exports, "onOrderUpdated", { enumerable: true, get: function () { return onOrderUpdated_1.onOrderUpdated; } });
16
- // import { payOrder } from './order/payOrder';
17
15
  const placeOrder_1 = require("./order/placeOrder");
18
16
  Object.defineProperty(exports, "placeOrder", { enumerable: true, get: function () { return placeOrder_1.placeOrder; } });
19
- const placeOrderWithoutTransaction_1 = require("./order/placeOrderWithoutTransaction");
20
- Object.defineProperty(exports, "placeOrderWithoutTransaction", { enumerable: true, get: function () { return placeOrderWithoutTransaction_1.placeOrderWithoutTransaction; } });
@@ -1,7 +1,6 @@
1
1
  import { factory } from '../../../../factory';
2
2
  import type { ConfirmationNumberRepo } from '../../../../repo/confirmationNumber';
3
- import type { OrderNumberRepo } from '../../../../repo/orderNumber';
4
- import type { ProjectRepo } from '../../../../repo/project';
3
+ import type { OrderInTransactionRepo } from '../../../../repo/orderInTransaction';
5
4
  import type { PlaceOrderRepo } from '../../../../repo/transaction/placeOrder';
6
5
  declare function fixOrderAsNeeded(params: {
7
6
  project: {
@@ -9,10 +8,9 @@ declare function fixOrderAsNeeded(params: {
9
8
  };
10
9
  purpose: factory.action.authorize.paymentMethod.any.IPurpose;
11
10
  }): (repos: {
12
- project: ProjectRepo;
13
11
  placeOrder: PlaceOrderRepo;
14
12
  confirmationNumber: ConfirmationNumberRepo;
15
- orderNumber: OrderNumberRepo;
13
+ orderInTransaction: OrderInTransactionRepo;
16
14
  }) => Promise<{
17
15
  confirmationNumber: string;
18
16
  orderNumber: string;
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.fixOrderAsNeeded = fixOrderAsNeeded;
4
4
  const factory_1 = require("../../../../factory");
5
5
  const publishConfirmationNumberIfNotExist_1 = require("../../../transaction/placeOrder/publishConfirmationNumberIfNotExist");
6
- const issueOrderNumberIfNotExist_1 = require("../../../transaction/placeOrder/issueOrderNumberIfNotExist");
7
6
  function fixOrderAsNeeded(params) {
8
7
  return async (repos) => {
9
8
  const orderDate = new Date();
@@ -17,12 +16,11 @@ function fixOrderAsNeeded(params) {
17
16
  object: { orderDate }
18
17
  })(repos);
19
18
  // }
20
- // publish orderNumber(2025-02-14~)
21
- const orderNumber = await (0, issueOrderNumberIfNotExist_1.issueOrderNumberIfNotExist)({
19
+ // 注文ドキュメントを参照(2026-06-24~)
20
+ const orderNumber = await repos.orderInTransaction.findOrderNumberByIdentifier({
21
+ identifier: params.purpose.id,
22
22
  project: { id: params.project.id },
23
- id: params.purpose.id,
24
- object: { orderDate }
25
- })(repos);
23
+ }, { onlyPlaceOrder: true });
26
24
  return { confirmationNumber, orderNumber };
27
25
  };
28
26
  }
@@ -14,6 +14,7 @@ import type { CredentialsRepo } from '../../../repo/credentials';
14
14
  import type { EventRepo } from '../../../repo/event';
15
15
  import type { EventSeriesRepo } from '../../../repo/eventSeries';
16
16
  import type { IssuerRepo } from '../../../repo/issuer';
17
+ import type { OrderInTransactionRepo } from '../../../repo/orderInTransaction';
17
18
  import type { OrderNumberRepo } from '../../../repo/orderNumber';
18
19
  import type { PaymentServiceRepo } from '../../../repo/paymentService';
19
20
  import type { PaymentServiceProviderRepo } from '../../../repo/paymentServiceProvider';
@@ -43,6 +44,7 @@ interface IAuthorizeRepos {
43
44
  event: EventRepo;
44
45
  eventSeries: EventSeriesRepo;
45
46
  issuer: IssuerRepo;
47
+ orderInTransaction: OrderInTransactionRepo;
46
48
  orderNumber: OrderNumberRepo;
47
49
  paymentAccepted: SellerPaymentAcceptedRepo;
48
50
  paymentService: PaymentServiceRepo;
@@ -7,10 +7,8 @@ import type { AuthorizationRepo } from '../../../repo/authorization';
7
7
  import type { EventRepo } from '../../../repo/event';
8
8
  import type { EventSeriesRepo } from '../../../repo/eventSeries';
9
9
  import type { IssuerRepo } from '../../../repo/issuer';
10
- import type { OrderNumberRepo } from '../../../repo/orderNumber';
11
10
  import type { PaymentServiceRepo } from '../../../repo/paymentService';
12
11
  import type { PaymentServiceProviderRepo } from '../../../repo/paymentServiceProvider';
13
- import type { ProjectRepo } from '../../../repo/project';
14
12
  import type { SellerPaymentAcceptedRepo } from '../../../repo/sellerPaymentAccepted';
15
13
  import type { TicketRepo } from '../../../repo/ticket';
16
14
  import type { PlaceOrderRepo } from '../../../repo/transaction/placeOrder';
@@ -24,11 +22,9 @@ interface IPublishPaymentUrlRepos {
24
22
  event: EventRepo;
25
23
  eventSeries: EventSeriesRepo;
26
24
  issuer: IssuerRepo;
27
- orderNumber: OrderNumberRepo;
28
25
  paymentAccepted: SellerPaymentAcceptedRepo;
29
26
  paymentService: PaymentServiceRepo;
30
27
  paymentServiceProvider: PaymentServiceProviderRepo;
31
- project: ProjectRepo;
32
28
  ticket: TicketRepo;
33
29
  placeOrder: PlaceOrderRepo;
34
30
  transactionNumber: TransactionNumberRepo;
@@ -35,9 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.publishPaymentUrl = publishPaymentUrl;
37
37
  const factory_1 = require("../../../factory");
38
- // import type { TransactionProcessRepo } from '../../repo/transactionProcess';
39
38
  const PayTransactionService = __importStar(require("../../assetTransaction/pay"));
40
- const issueOrderNumberIfNotExist_1 = require("../../transaction/placeOrder/issueOrderNumberIfNotExist");
41
39
  const fixTransactionNumberOnPublishPaymentUrl_1 = require("./publishPaymentUrl/fixTransactionNumberOnPublishPaymentUrl");
42
40
  const factory_2 = require("./factory");
43
41
  /**
@@ -54,12 +52,11 @@ function publishPaymentUrl(params) {
54
52
  if (project.id !== transaction.project.id) {
55
53
  throw new factory_1.factory.errors.NotFound(factory_1.factory.transactionType.PlaceOrder);
56
54
  }
57
- // issueOrderNumber(2025-03-11~)
58
- await (0, issueOrderNumberIfNotExist_1.issueOrderNumberIfNotExist)({
59
- project: { id: transaction.project.id },
60
- id: transaction.id,
61
- object: { orderDate: new Date() }
62
- })(repos);
55
+ // // 注文ドキュメントを参照(2026-06-24~)
56
+ // const orderNumber = await repos.orderInTransaction.findOrderNumberByIdentifier({
57
+ // identifier: transaction.id,
58
+ // project: { id: transaction.project.id },
59
+ // });
63
60
  // 取引番号生成
64
61
  const { transactionNumber, ticketToken } = await (0, fixTransactionNumberOnPublishPaymentUrl_1.fixTransactionNumberOnPublishPaymentUrl)({
65
62
  object: params.object,
@@ -3,16 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.call = call;
4
4
  const coa_service_1 = require("@motionpicture/coa-service");
5
5
  const factory_1 = require("../../factory");
6
- // import { ActionRepo } from '../../repo/action';
7
6
  const acceptCOAOffer_1 = require("../../repo/action/acceptCOAOffer");
8
7
  const authorizeOffer_1 = require("../../repo/action/authorizeOffer");
9
8
  const credentials_1 = require("../../repo/credentials");
10
9
  const event_1 = require("../../repo/event");
11
- const orderNumber_1 = require("../../repo/orderNumber");
12
- const project_1 = require("../../repo/project");
10
+ // import { OrderInTransactionRepo } from '../../repo/orderInTransaction';
11
+ // import { OrderNumberRepo } from '../../repo/orderNumber';
12
+ // import { ProjectRepo } from '../../repo/project';
13
13
  const reserveInterface_1 = require("../../repo/reserveInterface");
14
14
  const integration_1 = require("../../repo/setting/integration");
15
- // import { TransactionRepo } from '../../repo/transaction';
16
15
  const placeOrder_1 = require("../../repo/transaction/placeOrder");
17
16
  const acceptOffer_1 = require("../offer/eventServiceByCOA/acceptOffer");
18
17
  let coaAuthClient;
@@ -87,10 +86,9 @@ function call(params) {
87
86
  action: actionRepo,
88
87
  authorizeOfferAction: new authorizeOffer_1.AuthorizeOfferActionRepo(connection),
89
88
  event: new event_1.EventRepo(connection),
90
- orderNumber: new orderNumber_1.OrderNumberRepo({ connection }),
91
- project: new project_1.ProjectRepo(connection),
89
+ // orderNumber: new OrderNumberRepo({ connection }),
90
+ // project: new ProjectRepo(connection),
92
91
  placeOrder: new placeOrder_1.PlaceOrderRepo(connection),
93
- // transaction: new TransactionRepo(connection),
94
92
  reserveService,
95
93
  masterService
96
94
  });
@@ -106,10 +104,10 @@ function call(params) {
106
104
  })({
107
105
  action: actionRepo,
108
106
  event: new event_1.EventRepo(connection),
109
- orderNumber: new orderNumber_1.OrderNumberRepo({ connection }),
110
- project: new project_1.ProjectRepo(connection),
107
+ // orderInTransaction: new OrderInTransactionRepo(connection),
108
+ // orderNumber: new OrderNumberRepo({ connection }),
109
+ // project: new ProjectRepo(connection),
111
110
  placeOrder: new placeOrder_1.PlaceOrderRepo(connection),
112
- // transaction: new TransactionRepo(connection),
113
111
  reserveService,
114
112
  masterService
115
113
  });
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.call = call;
4
4
  const factory_1 = require("../../factory");
5
5
  const accountingReport_1 = require("../../repo/accountingReport");
6
- // import { ActionRepo } from '../../repo/action';
7
6
  const pay_1 = require("../../repo/action/pay");
8
7
  const refund_1 = require("../../repo/action/refund");
9
8
  const checkMovieTicket_1 = require("../../repo/action/checkMovieTicket");
@@ -17,6 +16,7 @@ const credentials_1 = require("../../repo/credentials");
17
16
  const event_1 = require("../../repo/event");
18
17
  const eventSeries_1 = require("../../repo/eventSeries");
19
18
  const issuer_1 = require("../../repo/issuer");
19
+ const orderInTransaction_1 = require("../../repo/orderInTransaction");
20
20
  const orderNumber_1 = require("../../repo/orderNumber");
21
21
  const paymentService_1 = require("../../repo/paymentService");
22
22
  const paymentServiceProvider_1 = require("../../repo/paymentServiceProvider");
@@ -27,10 +27,8 @@ const sellerPaymentAccepted_1 = require("../../repo/sellerPaymentAccepted");
27
27
  const integration_1 = require("../../repo/setting/integration");
28
28
  const task_1 = require("../../repo/task");
29
29
  const ticket_1 = require("../../repo/ticket");
30
- // import { TransactionRepo } from '../../repo/transaction';
31
30
  const placeOrder_1 = require("../../repo/transaction/placeOrder");
32
31
  const transactionNumber_1 = require("../../repo/transactionNumber");
33
- // import { TransactionProcessRepo } from '../../repo/transactionProcess';
34
32
  const any_1 = require("../payment/any");
35
33
  /**
36
34
  * タスク実行関数
@@ -60,7 +58,6 @@ function call(params) {
60
58
  sameAs: { id: params.id } // タスクIDを関連付け(2024-04-20~)
61
59
  })({
62
60
  accountingReport: new accountingReport_1.AccountingReportRepo(connection),
63
- // action: new ActionRepo(connection),
64
61
  actions: {
65
62
  pay: new pay_1.PayActionRepo(connection),
66
63
  refund: new refund_1.RefundActionRepo(connection),
@@ -79,6 +76,7 @@ function call(params) {
79
76
  event: new event_1.EventRepo(connection),
80
77
  eventSeries: new eventSeries_1.EventSeriesRepo(connection),
81
78
  issuer: new issuer_1.IssuerRepo(connection),
79
+ orderInTransaction: new orderInTransaction_1.OrderInTransactionRepo(connection),
82
80
  orderNumber: new orderNumber_1.OrderNumberRepo({ connection }),
83
81
  paymentAccepted: new sellerPaymentAccepted_1.SellerPaymentAcceptedRepo(connection),
84
82
  paymentService: new paymentService_1.PaymentServiceRepo(connection),
@@ -89,9 +87,7 @@ function call(params) {
89
87
  task: new task_1.TaskRepo(connection),
90
88
  ticket: new ticket_1.TicketRepo(connection),
91
89
  placeOrder: new placeOrder_1.PlaceOrderRepo(connection),
92
- // transaction: new TransactionRepo(connection),
93
90
  transactionNumber: new transactionNumber_1.TransactionNumberRepo({ connection })
94
- // transactionProcess: transactionProcessRepo
95
91
  }, settings);
96
92
  }
97
93
  catch (error) {
@@ -38,14 +38,10 @@ const acceptedOffer_1 = require("../../repo/acceptedOffer");
38
38
  const accountingReport_1 = require("../../repo/accountingReport");
39
39
  const action_1 = require("../../repo/action");
40
40
  const assetTransaction_1 = require("../../repo/assetTransaction");
41
- const event_1 = require("../../repo/event");
42
- const message_1 = require("../../repo/message");
41
+ // import { MessageRepo } from '../../repo/message';
43
42
  const note_1 = require("../../repo/note");
44
43
  const order_1 = require("../../repo/order");
45
- const ownershipInfo_1 = require("../../repo/ownershipInfo");
46
44
  const reservation_1 = require("../../repo/reservation");
47
- const setting_1 = require("../../repo/setting");
48
- const task_1 = require("../../repo/task");
49
45
  const transaction_1 = require("../../repo/transaction");
50
46
  const placeOrder_1 = require("../../repo/transaction/placeOrder");
51
47
  const returnOrder_1 = require("../../repo/transaction/returnOrder");
@@ -60,14 +56,10 @@ function call(data) {
60
56
  accountingReport: new accountingReport_1.AccountingReportRepo(connection),
61
57
  action: new action_1.ActionRepo(connection),
62
58
  assetTransaction: new assetTransaction_1.AssetTransactionRepo(connection),
63
- event: new event_1.EventRepo(connection),
64
- message: new message_1.MessageRepo(connection),
59
+ // message: new MessageRepo(connection),
65
60
  note: new note_1.NoteRepo(connection),
66
61
  order: new order_1.OrderRepo(connection),
67
- ownershipInfo: new ownershipInfo_1.OwnershipInfoRepo(connection),
68
62
  reservation: new reservation_1.ReservationRepo(connection),
69
- setting: new setting_1.SettingRepo(connection),
70
- task: new task_1.TaskRepo(connection),
71
63
  transaction: new transaction_1.TransactionRepo(connection),
72
64
  placeOrder: new placeOrder_1.PlaceOrderRepo(connection),
73
65
  returnOrder: new returnOrder_1.ReturnOrderRepo(connection),
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.call = call;
4
4
  const factory_1 = require("../../factory");
5
- // import { ActionRepo } from '../../repo/action';
6
5
  const acceptPay_1 = require("../../repo/action/acceptPay");
7
6
  const authorizeInvoice_1 = require("../../repo/action/authorizeInvoice");
8
7
  const assetTransaction_1 = require("../../repo/assetTransaction");
@@ -10,17 +9,16 @@ const authorization_1 = require("../../repo/authorization");
10
9
  const event_1 = require("../../repo/event");
11
10
  const eventSeries_1 = require("../../repo/eventSeries");
12
11
  const issuer_1 = require("../../repo/issuer");
13
- const orderNumber_1 = require("../../repo/orderNumber");
12
+ // import { OrderInTransactionRepo } from '../../repo/orderInTransaction';
13
+ // import { OrderNumberRepo } from '../../repo/orderNumber';
14
14
  const paymentService_1 = require("../../repo/paymentService");
15
15
  const paymentServiceProvider_1 = require("../../repo/paymentServiceProvider");
16
- const project_1 = require("../../repo/project");
16
+ // import { ProjectRepo } from '../../repo/project';
17
17
  const sellerPaymentAccepted_1 = require("../../repo/sellerPaymentAccepted");
18
18
  const integration_1 = require("../../repo/setting/integration");
19
19
  const ticket_1 = require("../../repo/ticket");
20
- // import { TransactionRepo } from '../../repo/transaction';
21
20
  const placeOrder_1 = require("../../repo/transaction/placeOrder");
22
21
  const transactionNumber_1 = require("../../repo/transactionNumber");
23
- // import { TransactionProcessRepo } from '../../repo/transactionProcess';
24
22
  const any_1 = require("../payment/any");
25
23
  /**
26
24
  * タスク実行関数
@@ -43,7 +41,6 @@ function call(params) {
43
41
  instrument: (Array.isArray(params.data.instrument)) ? params.data.instrument : [],
44
42
  sameAs: { id: params.id }
45
43
  })({
46
- // action: new ActionRepo(connection),
47
44
  acceptPayAction: actionRepo,
48
45
  authorizeInvoiceAction: new authorizeInvoice_1.AuthorizeInvoiceActionRepo(connection),
49
46
  assetTransaction: new assetTransaction_1.AssetTransactionRepo(connection),
@@ -51,14 +48,14 @@ function call(params) {
51
48
  event: new event_1.EventRepo(connection),
52
49
  eventSeries: new eventSeries_1.EventSeriesRepo(connection),
53
50
  issuer: new issuer_1.IssuerRepo(connection),
54
- orderNumber: new orderNumber_1.OrderNumberRepo({ connection }),
51
+ // orderInTransaction: new OrderInTransactionRepo(connection),
52
+ // orderNumber: new OrderNumberRepo({ connection }),
55
53
  paymentAccepted: new sellerPaymentAccepted_1.SellerPaymentAcceptedRepo(connection),
56
54
  paymentService: new paymentService_1.PaymentServiceRepo(connection),
57
55
  paymentServiceProvider: new paymentServiceProvider_1.PaymentServiceProviderRepo(connection),
58
- project: new project_1.ProjectRepo(connection),
56
+ // project: new ProjectRepo(connection),
59
57
  ticket: new ticket_1.TicketRepo(connection),
60
58
  placeOrder: new placeOrder_1.PlaceOrderRepo(connection),
61
- // transaction: new TransactionRepo(connection),
62
59
  transactionNumber: new transactionNumber_1.TransactionNumberRepo({ connection })
63
60
  }, settings);
64
61
  }
@@ -54,7 +54,6 @@ function executeTask(task, next) {
54
54
  case factory_1.factory.taskName.CheckMovieTicket:
55
55
  case factory_1.factory.taskName.CheckResource:
56
56
  case factory_1.factory.taskName.CreateAccountingReport:
57
- case factory_1.factory.taskName.DeletePerson:
58
57
  case factory_1.factory.taskName.HandleNotification:
59
58
  case factory_1.factory.taskName.ImportEventCapacitiesFromCOA:
60
59
  case factory_1.factory.taskName.ImportEventsFromCOA:
@@ -3,35 +3,27 @@ import type { AcceptedOfferRepo } from '../../repo/acceptedOffer';
3
3
  import type { AccountingReportRepo } from '../../repo/accountingReport';
4
4
  import type { ActionRepo } from '../../repo/action';
5
5
  import type { AssetTransactionRepo } from '../../repo/assetTransaction';
6
- import type { EventRepo } from '../../repo/event';
7
- import type { MessageRepo } from '../../repo/message';
8
6
  import type { NoteRepo } from '../../repo/note';
9
7
  import type { OrderRepo } from '../../repo/order';
10
- import type { OwnershipInfoRepo } from '../../repo/ownershipInfo';
11
8
  import type { ReservationRepo } from '../../repo/reservation';
12
- import type { SettingRepo } from '../../repo/setting';
13
- import type { TaskRepo } from '../../repo/task';
14
9
  import type { TransactionRepo } from '../../repo/transaction';
15
10
  import type { PlaceOrderRepo } from '../../repo/transaction/placeOrder';
16
11
  import type { ReturnOrderRepo } from '../../repo/transaction/returnOrder';
17
- /**
18
- * 取引に関わるリソースを削除する
19
- * 冪等性を確保すること
20
- */
21
- export declare function deleteTransaction(params: factory.task.IData<factory.taskName.DeleteTransaction>): (repos: {
12
+ interface IDeleteTransactionRepos {
22
13
  acceptedOffer: AcceptedOfferRepo;
23
14
  accountingReport: AccountingReportRepo;
24
15
  action: ActionRepo;
25
16
  assetTransaction: AssetTransactionRepo;
26
- event: EventRepo;
27
- message: MessageRepo;
28
17
  note: NoteRepo;
29
18
  order: OrderRepo;
30
- ownershipInfo: OwnershipInfoRepo;
31
19
  reservation: ReservationRepo;
32
- setting: SettingRepo;
33
- task: TaskRepo;
34
20
  transaction: TransactionRepo;
35
21
  placeOrder: PlaceOrderRepo;
36
22
  returnOrder: ReturnOrderRepo;
37
- }) => Promise<void>;
23
+ }
24
+ /**
25
+ * 取引に関わるリソースを削除する
26
+ * 冪等性を確保すること
27
+ */
28
+ export declare function deleteTransaction(params: factory.task.IData<factory.taskName.DeleteTransaction>): (repos: IDeleteTransactionRepos) => Promise<void>;
29
+ export {};