@chevre/domain 24.0.0-alpha.41 → 24.0.0-alpha.43

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 (48) hide show
  1. package/lib/chevre/repo/action/pay.d.ts +16 -0
  2. package/lib/chevre/repo/action/pay.js +41 -0
  3. package/lib/chevre/repo/action.d.ts +2 -11
  4. package/lib/chevre/repo/action.js +20 -13
  5. package/lib/chevre/service/assetTransaction/pay/start/processAuthorize.d.ts +1 -2
  6. package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeMovieTicket.d.ts +1 -2
  7. package/lib/chevre/service/assetTransaction/pay/start.d.ts +1 -2
  8. package/lib/chevre/service/assetTransaction/refund.d.ts +5 -2
  9. package/lib/chevre/service/assetTransaction/refund.js +1 -1
  10. package/lib/chevre/service/assetTransaction/reserve/start/factory/createStartParams.js +10 -4
  11. package/lib/chevre/service/assetTransaction/reserve/start.js +4 -2
  12. package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.js +14 -11
  13. package/lib/chevre/service/offer.js +10 -6
  14. package/lib/chevre/service/payment/any/authorize.d.ts +1 -2
  15. package/lib/chevre/service/payment/any/onPayActionCompleted.d.ts +1 -0
  16. package/lib/chevre/service/payment/any/onRefundActionCompletedOrFailed.d.ts +1 -0
  17. package/lib/chevre/service/payment/creditCard/payCreditCard.d.ts +1 -2
  18. package/lib/chevre/service/payment/creditCard/payCreditCard.js +8 -4
  19. package/lib/chevre/service/payment/creditCard/refundCreditCard.d.ts +1 -2
  20. package/lib/chevre/service/payment/creditCard/refundCreditCard.js +10 -6
  21. package/lib/chevre/service/payment/faceToFace.d.ts +2 -3
  22. package/lib/chevre/service/payment/faceToFace.js +16 -8
  23. package/lib/chevre/service/payment/movieTicket/authorize.d.ts +1 -2
  24. package/lib/chevre/service/payment/movieTicket/payMovieTicket.d.ts +1 -2
  25. package/lib/chevre/service/payment/movieTicket/payMovieTicket.js +10 -6
  26. package/lib/chevre/service/payment/movieTicket/refundMovieTicket/createSeatInfoSyncCancelInOnRefund.d.ts +14 -0
  27. package/lib/chevre/service/payment/movieTicket/refundMovieTicket/createSeatInfoSyncCancelInOnRefund.js +49 -0
  28. package/lib/chevre/service/payment/movieTicket/refundMovieTicket/createSeatInfoSyncInOnRefund.d.ts +14 -0
  29. package/lib/chevre/service/payment/movieTicket/refundMovieTicket/createSeatInfoSyncInOnRefund.js +46 -0
  30. package/lib/chevre/service/payment/movieTicket/refundMovieTicket/processSeatInfoSync.d.ts +12 -0
  31. package/lib/chevre/service/payment/movieTicket/refundMovieTicket/processSeatInfoSync.js +72 -0
  32. package/lib/chevre/service/payment/movieTicket/refundMovieTicket/processSeatInfoSyncCancel.d.ts +8 -0
  33. package/lib/chevre/service/payment/movieTicket/refundMovieTicket/processSeatInfoSyncCancel.js +60 -0
  34. package/lib/chevre/service/payment/movieTicket/refundMovieTicket.d.ts +2 -3
  35. package/lib/chevre/service/payment/movieTicket/refundMovieTicket.js +20 -125
  36. package/lib/chevre/service/payment/movieTicket/voidTransaction.d.ts +0 -2
  37. package/lib/chevre/service/payment/movieTicket/voidTransaction.js +1 -1
  38. package/lib/chevre/service/payment/paymentCard.d.ts +2 -3
  39. package/lib/chevre/service/payment/paymentCard.js +16 -8
  40. package/lib/chevre/service/task/authorizePayment.js +2 -2
  41. package/lib/chevre/service/task/invalidatePaymentUrl.js +2 -2
  42. package/lib/chevre/service/task/pay.js +2 -2
  43. package/lib/chevre/service/task/payment/invalidatePaymentUrlByTask.d.ts +1 -2
  44. package/lib/chevre/service/task/payment/payByTask.d.ts +1 -2
  45. package/lib/chevre/service/task/payment/refundByTask.d.ts +1 -2
  46. package/lib/chevre/service/task/refund.js +2 -2
  47. package/lib/chevre/service/task/returnPayTransaction.js +5 -2
  48. package/package.json +2 -2
@@ -250,7 +250,7 @@ function payPaymentCard(params) {
250
250
  return async (repos) => {
251
251
  const payObject = params.object;
252
252
  const paymentServiceId = payObject[0].id;
253
- const action = await repos.action.start(params);
253
+ const action = await repos.actions.pay.start(params);
254
254
  try {
255
255
  const transactionNumber = payObject[0].paymentMethod.paymentMethodId;
256
256
  const availableChannel = await repos.product.findAvailableChannel({
@@ -272,7 +272,7 @@ function payPaymentCard(params) {
272
272
  }
273
273
  catch (error) {
274
274
  try {
275
- await repos.action.giveUp({ typeOf: action.typeOf, id: action.id, error });
275
+ await repos.actions.pay.giveUp({ typeOf: action.typeOf, id: action.id, error });
276
276
  }
277
277
  catch (__) {
278
278
  // no op
@@ -280,7 +280,7 @@ function payPaymentCard(params) {
280
280
  throw error;
281
281
  }
282
282
  const actionResult = {};
283
- await repos.action.completeWithVoid({ typeOf: action.typeOf, id: action.id, result: actionResult });
283
+ await repos.actions.pay.completeWithVoid({ typeOf: action.typeOf, id: action.id, result: actionResult });
284
284
  await (0, onPayActionCompleted_1.onPayActionCompleted)({
285
285
  // actionStatus: factory.actionStatusType.CompletedActionStatus,
286
286
  id: action.id,
@@ -289,7 +289,11 @@ function payPaymentCard(params) {
289
289
  project: params.project,
290
290
  purpose: params.purpose,
291
291
  typeOf: action.typeOf
292
- })(repos);
292
+ })({
293
+ actions: repos.actions,
294
+ accountingReport: repos.accountingReport,
295
+ task: repos.task
296
+ });
293
297
  // return action;
294
298
  };
295
299
  }
@@ -306,7 +310,7 @@ function refundPaymentCard(params) {
306
310
  if (typeof accountNumber !== 'string') {
307
311
  throw new factory.errors.ArgumentNull('serviceOutput.paymentAccount.accountNumber');
308
312
  }
309
- const action = await repos.action.start(params);
313
+ const action = await repos.actions.refund.start(params);
310
314
  let accountTransactionNumber4refund;
311
315
  try {
312
316
  const availableChannel = await repos.product.findAvailableChannel({
@@ -388,7 +392,7 @@ function refundPaymentCard(params) {
388
392
  }
389
393
  catch (error) {
390
394
  try {
391
- await repos.action.giveUp({ typeOf: action.typeOf, id: action.id, error });
395
+ await repos.actions.refund.giveUp({ typeOf: action.typeOf, id: action.id, error });
392
396
  }
393
397
  catch (__) {
394
398
  // no op
@@ -398,7 +402,7 @@ function refundPaymentCard(params) {
398
402
  const result = {
399
403
  accountTransaction: { transactionNumber: accountTransactionNumber4refund }
400
404
  };
401
- await repos.action.completeWithVoid({ typeOf: action.typeOf, id: action.id, result });
405
+ await repos.actions.refund.completeWithVoid({ typeOf: action.typeOf, id: action.id, result });
402
406
  await (0, onRefundActionCompletedOrFailed_1.onRefundActionCompletedOrFailed)({
403
407
  actionStatus: factory.actionStatusType.CompletedActionStatus,
404
408
  id: action.id,
@@ -407,7 +411,11 @@ function refundPaymentCard(params) {
407
411
  project: params.project,
408
412
  purpose: params.purpose,
409
413
  typeOf: action.typeOf
410
- })(repos);
414
+ })({
415
+ actions: repos.actions,
416
+ accountingReport: repos.accountingReport,
417
+ task: repos.task
418
+ });
411
419
  // return action;
412
420
  };
413
421
  }
@@ -27,7 +27,7 @@ exports.call = call;
27
27
  const factory = __importStar(require("../../factory"));
28
28
  const acceptedPaymentMethod_1 = require("../../repo/acceptedPaymentMethod");
29
29
  const accountingReport_1 = require("../../repo/accountingReport");
30
- const action_1 = require("../../repo/action");
30
+ // import { ActionRepo } from '../../repo/action';
31
31
  const pay_1 = require("../../repo/action/pay");
32
32
  const refund_1 = require("../../repo/action/refund");
33
33
  const checkMovieTicket_1 = require("../../repo/action/checkMovieTicket");
@@ -82,7 +82,7 @@ function call(params) {
82
82
  })({
83
83
  acceptedPaymentMethod: new acceptedPaymentMethod_1.AcceptedPaymentMethodRepo(connection),
84
84
  accountingReport: new accountingReport_1.AccountingReportRepo(connection),
85
- action: new action_1.ActionRepo(connection),
85
+ // action: new ActionRepo(connection),
86
86
  actions: {
87
87
  pay: new pay_1.PayActionRepo(connection),
88
88
  refund: new refund_1.RefundActionRepo(connection),
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.call = call;
4
4
  const accountingReport_1 = require("../../repo/accountingReport");
5
- const action_1 = require("../../repo/action");
5
+ // import { ActionRepo } from '../../repo/action';
6
6
  const pay_1 = require("../../repo/action/pay");
7
7
  const refund_1 = require("../../repo/action/refund");
8
8
  const assetTransaction_1 = require("../../repo/assetTransaction");
@@ -18,7 +18,7 @@ function call(params) {
18
18
  sameAs: { id: params.id }
19
19
  })({
20
20
  accountingReport: new accountingReport_1.AccountingReportRepo(connection),
21
- action: new action_1.ActionRepo(connection),
21
+ // action: new ActionRepo(connection),
22
22
  actions: {
23
23
  pay: new pay_1.PayActionRepo(connection),
24
24
  refund: new refund_1.RefundActionRepo(connection),
@@ -27,7 +27,7 @@ exports.call = call;
27
27
  const factory = __importStar(require("../../factory"));
28
28
  const acceptedOffer_1 = require("../../repo/acceptedOffer");
29
29
  const accountingReport_1 = require("../../repo/accountingReport");
30
- const action_1 = require("../../repo/action");
30
+ // import { ActionRepo } from '../../repo/action';
31
31
  const pay_1 = require("../../repo/action/pay");
32
32
  const refund_1 = require("../../repo/action/refund");
33
33
  const checkMovieTicket_1 = require("../../repo/action/checkMovieTicket");
@@ -72,7 +72,7 @@ function call(params) {
72
72
  payActionAttributes)({
73
73
  acceptedOffer: new acceptedOffer_1.AcceptedOfferRepo(connection),
74
74
  accountingReport: new accountingReport_1.AccountingReportRepo(connection),
75
- action: new action_1.ActionRepo(connection),
75
+ // action: new ActionRepo(connection),
76
76
  actions: {
77
77
  pay: new pay_1.PayActionRepo(connection),
78
78
  refund: new refund_1.RefundActionRepo(connection),
@@ -1,7 +1,6 @@
1
1
  import * as factory from '../../../factory';
2
2
  import { Settings } from '../../../settings';
3
3
  import type { AccountingReportRepo } from '../../../repo/accountingReport';
4
- import type { ActionRepo } from '../../../repo/action';
5
4
  import type { PayActionRepo } from '../../../repo/action/pay';
6
5
  import type { RefundActionRepo } from '../../../repo/action/refund';
7
6
  import type { AssetTransactionRepo } from '../../../repo/assetTransaction';
@@ -11,7 +10,7 @@ import type { SellerPaymentAcceptedRepo } from '../../../repo/sellerPaymentAccep
11
10
  import type { TaskRepo } from '../../../repo/task';
12
11
  type IInvalidatePaymentUrlOperation<T> = (repos: {
13
12
  accountingReport: AccountingReportRepo;
14
- action: ActionRepo;
13
+ action?: never;
15
14
  actions: {
16
15
  pay: PayActionRepo;
17
16
  refund: RefundActionRepo;
@@ -1,6 +1,5 @@
1
1
  import type { AcceptedOfferRepo } from '../../../repo/acceptedOffer';
2
2
  import type { AccountingReportRepo } from '../../../repo/accountingReport';
3
- import type { ActionRepo } from '../../../repo/action';
4
3
  import type { PayActionRepo } from '../../../repo/action/pay';
5
4
  import type { RefundActionRepo } from '../../../repo/action/refund';
6
5
  import type { CheckMovieTicketActionRepo } from '../../../repo/action/checkMovieTicket';
@@ -33,7 +32,7 @@ declare function payTask2payActionAttributes(params: factory.task.pay.IData & {
33
32
  }): (repos: IPayTask2payActionAttributesRepos) => Promise<factory.action.trade.pay.IAttributes>;
34
33
  interface IPayByTaskRepos {
35
34
  acceptedOffer: AcceptedOfferRepo;
36
- action: ActionRepo;
35
+ action?: never;
37
36
  actions: {
38
37
  pay: PayActionRepo;
39
38
  refund: RefundActionRepo;
@@ -1,5 +1,4 @@
1
1
  import type { AccountingReportRepo } from '../../../repo/accountingReport';
2
- import type { ActionRepo } from '../../../repo/action';
3
2
  import type { PayActionRepo } from '../../../repo/action/pay';
4
3
  import type { RefundActionRepo } from '../../../repo/action/refund';
5
4
  import type { AssetTransactionRepo } from '../../../repo/assetTransaction';
@@ -18,7 +17,7 @@ declare function refundByTask(params: factory.task.refund.IData & {
18
17
  id: string;
19
18
  };
20
19
  }): (repos: {
21
- action: ActionRepo;
20
+ action?: never;
22
21
  actions: {
23
22
  pay: PayActionRepo;
24
23
  refund: RefundActionRepo;
@@ -26,7 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.call = call;
27
27
  const factory = __importStar(require("../../factory"));
28
28
  const accountingReport_1 = require("../../repo/accountingReport");
29
- const action_1 = require("../../repo/action");
29
+ // import { ActionRepo } from '../../repo/action';
30
30
  const pay_1 = require("../../repo/action/pay");
31
31
  const refund_1 = require("../../repo/action/refund");
32
32
  const assetTransaction_1 = require("../../repo/assetTransaction");
@@ -63,7 +63,7 @@ function call(params) {
63
63
  && typeof credentialsExpireInSeconds === 'number' && credentialsExpireInSeconds > 0;
64
64
  await (0, refundByTask_1.refundByTask)(data)({
65
65
  accountingReport: new accountingReport_1.AccountingReportRepo(connection),
66
- action: new action_1.ActionRepo(connection),
66
+ // action: new ActionRepo(connection),
67
67
  actions: {
68
68
  pay: new pay_1.PayActionRepo(connection),
69
69
  refund: new refund_1.RefundActionRepo(connection),
@@ -30,13 +30,13 @@ exports.call = call;
30
30
  const moment_1 = __importDefault(require("moment"));
31
31
  const factory = __importStar(require("../../factory"));
32
32
  const action_1 = require("../../repo/action");
33
+ const pay_1 = require("../../repo/action/pay");
33
34
  const assetTransaction_1 = require("../../repo/assetTransaction");
34
35
  const order_1 = require("../../repo/order");
35
36
  const paymentService_1 = require("../../repo/paymentService");
36
37
  const potentialAction_1 = require("../../repo/potentialAction");
37
38
  const product_1 = require("../../repo/product");
38
39
  const task_1 = require("../../repo/task");
39
- // import { TransactionRepo } from '../../repo/transaction';
40
40
  const returnOrder_1 = require("../../repo/transaction/returnOrder");
41
41
  const transactionNumber_1 = require("../../repo/transactionNumber");
42
42
  const RefundTransactionService = __importStar(require("../assetTransaction/refund"));
@@ -53,6 +53,9 @@ function call(params) {
53
53
  sameAs: { id: params.id }
54
54
  })({
55
55
  action: new action_1.ActionRepo(connection),
56
+ actions: {
57
+ pay: new pay_1.PayActionRepo(connection),
58
+ },
56
59
  assetTransaction: new assetTransaction_1.AssetTransactionRepo(connection),
57
60
  order: new order_1.OrderRepo(connection),
58
61
  paymentService: new paymentService_1.PaymentServiceRepo(connection),
@@ -158,7 +161,7 @@ function returnPayTransaction(taskData) {
158
161
  });
159
162
  const refundPurpose = createRefundPurpose(refundActionAttributes, order);
160
163
  await RefundTransactionService.start(startRefundTransactionParams)({
161
- action: repos.action,
164
+ actions: repos.actions,
162
165
  paymentService: repos.paymentService,
163
166
  potentialAction: repos.potentialAction,
164
167
  product: repos.product,
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "dependencies": {
12
12
  "@aws-sdk/client-cognito-identity-provider": "3.600.0",
13
13
  "@aws-sdk/credential-providers": "3.600.0",
14
- "@chevre/factory": "6.0.0-alpha.3",
14
+ "@chevre/factory": "6.0.0-alpha.5",
15
15
  "@cinerino/sdk": "13.2.0",
16
16
  "@motionpicture/coa-service": "9.6.0",
17
17
  "@motionpicture/gmo-service": "5.4.0-alpha.1",
@@ -99,5 +99,5 @@
99
99
  "postversion": "git push origin --tags",
100
100
  "prepublishOnly": "npm run clean && npm run build"
101
101
  },
102
- "version": "24.0.0-alpha.41"
102
+ "version": "24.0.0-alpha.43"
103
103
  }