@chevre/domain 26.0.0-alpha.41 → 26.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.
- package/lib/chevre/repo/action/cancel.d.ts +25 -0
- package/lib/chevre/repo/action/cancel.js +47 -0
- package/lib/chevre/repo/action/confirm.d.ts +11 -0
- package/lib/chevre/repo/action/confirm.js +16 -0
- package/lib/chevre/repo/action/order.d.ts +21 -0
- package/lib/chevre/repo/action/order.js +35 -0
- package/lib/chevre/repo/action/reserve.d.ts +21 -0
- package/lib/chevre/repo/action/reserve.js +37 -0
- package/lib/chevre/repo/action/returnAction.d.ts +11 -0
- package/lib/chevre/repo/action/returnAction.js +16 -0
- package/lib/chevre/repo/adminAction.d.ts +8 -2
- package/lib/chevre/repo/adminAction.js +6 -0
- package/lib/chevre/repo/mongoose/schemas/setting.d.ts +4 -14
- package/lib/chevre/repository.d.ts +15 -5
- package/lib/chevre/repository.js +35 -13
- package/lib/chevre/service/assetTransaction/pay/confirm.d.ts +0 -10
- package/lib/chevre/service/assetTransaction/pay/start/processAuthorize.d.ts +0 -1
- package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeMovieTicket.d.ts +0 -1
- package/lib/chevre/service/assetTransaction/pay/start.d.ts +0 -1
- package/lib/chevre/service/assetTransaction/refund.d.ts +0 -1
- package/lib/chevre/service/assetTransaction/reserve/cancel.d.ts +4 -2
- package/lib/chevre/service/assetTransaction/reserve/confirm.d.ts +4 -2
- package/lib/chevre/service/assetTransaction/reserveCOA/cancel.d.ts +7 -3
- package/lib/chevre/service/offer/event/authorize.d.ts +0 -1
- package/lib/chevre/service/offer/event/issueEventOfferTicket.d.ts +0 -1
- package/lib/chevre/service/offer/event/voidTransaction/processVoidTransaction4chevre.d.ts +4 -2
- package/lib/chevre/service/offer/event/voidTransaction/processVoidTransaction4coa.d.ts +7 -3
- package/lib/chevre/service/offer/event/voidTransaction.d.ts +4 -2
- package/lib/chevre/service/offer/event/voidTransaction.js +2 -2
- package/lib/chevre/service/offer/event/voidTransactionByActionId.d.ts +4 -2
- package/lib/chevre/service/offer/event/voidTransactionByActionId.js +1 -1
- package/lib/chevre/service/order/confirmPayTransaction.d.ts +4 -10
- package/lib/chevre/service/order/confirmPayTransaction.js +3 -10
- package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.d.ts +4 -2
- package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.js +2 -2
- package/lib/chevre/service/order/placeOrder.d.ts +6 -4
- package/lib/chevre/service/order/placeOrder.js +9 -17
- package/lib/chevre/service/order/returnOrder.d.ts +4 -2
- package/lib/chevre/service/order/returnOrder.js +3 -3
- package/lib/chevre/service/payment/any/authorize/fixTransactionNumber.d.ts +0 -1
- package/lib/chevre/service/payment/any/authorize/handlePrePublishedPaymentMethodIdOnAuthorizing.d.ts +0 -1
- package/lib/chevre/service/payment/any/authorize.d.ts +0 -1
- package/lib/chevre/service/payment/any/invalidatePaymentUrl.d.ts +0 -1
- package/lib/chevre/service/payment/any/onPayActionCompleted.d.ts +0 -1
- package/lib/chevre/service/payment/any/onRefundActionCompletedOrFailed.d.ts +0 -1
- package/lib/chevre/service/payment/any/processVoidPayTransaction.d.ts +0 -1
- package/lib/chevre/service/payment/any/voidPayTransaction.d.ts +0 -1
- package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard.d.ts +0 -1
- package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard3ds.d.ts +0 -1
- package/lib/chevre/service/payment/creditCard/authorize.d.ts +0 -1
- package/lib/chevre/service/payment/creditCard/payCreditCard.d.ts +0 -1
- package/lib/chevre/service/payment/creditCard/refundCreditCard.d.ts +0 -1
- package/lib/chevre/service/payment/faceToFace.d.ts +0 -2
- package/lib/chevre/service/payment/movieTicket/authorize.d.ts +0 -1
- package/lib/chevre/service/payment/movieTicket/payMovieTicket.d.ts +0 -1
- package/lib/chevre/service/payment/movieTicket/refundMovieTicket.d.ts +0 -1
- package/lib/chevre/service/reserve/cancelReservation.d.ts +7 -3
- package/lib/chevre/service/reserve/cancelReservation.js +12 -22
- package/lib/chevre/service/reserve/checkInReservation.d.ts +4 -2
- package/lib/chevre/service/reserve/confirmReservation.d.ts +4 -2
- package/lib/chevre/service/reserve/confirmReservation.js +9 -35
- package/lib/chevre/service/reserve/useReservation.d.ts +2 -2
- package/lib/chevre/service/reserveCOA/cancelReservation.d.ts +4 -2
- package/lib/chevre/service/reserveCOA/cancelReservation.js +3 -3
- package/lib/chevre/service/task/cancelPendingReservation.js +3 -3
- package/lib/chevre/service/task/cancelReservation.js +3 -5
- package/lib/chevre/service/task/confirmPayTransaction.js +11 -12
- package/lib/chevre/service/task/confirmReserveTransaction.d.ts +6 -2
- package/lib/chevre/service/task/confirmReserveTransaction.js +9 -5
- package/lib/chevre/service/task/invalidatePaymentUrl.js +0 -1
- package/lib/chevre/service/task/onAuthorizationCreated.js +4 -13
- package/lib/chevre/service/task/onResourceUpdated.js +0 -2
- package/lib/chevre/service/task/pay.js +0 -1
- package/lib/chevre/service/task/payment/invalidatePaymentUrlByTask.d.ts +0 -1
- package/lib/chevre/service/task/payment/payByTask.d.ts +0 -1
- package/lib/chevre/service/task/payment/refundByTask.d.ts +0 -1
- package/lib/chevre/service/task/payment/voidPaymentByTask.d.ts +0 -2
- package/lib/chevre/service/task/placeOrder.js +8 -6
- package/lib/chevre/service/task/refund.js +0 -1
- package/lib/chevre/service/task/reserve.js +3 -6
- package/lib/chevre/service/task/returnOrder.js +2 -3
- package/lib/chevre/service/task/returnPayTransaction.js +7 -14
- package/lib/chevre/service/task/returnReserveTransaction.js +5 -5
- package/lib/chevre/service/task/useReservation.js +3 -3
- package/lib/chevre/service/task/voidPayment.js +0 -2
- package/lib/chevre/service/task/voidReserveTransaction.js +2 -2
- package/package.json +1 -1
- package/lib/chevre/repo/action.d.ts +0 -23
- package/lib/chevre/repo/action.js +0 -22
|
@@ -43,7 +43,7 @@ const factory_1 = require("../../factory");
|
|
|
43
43
|
const CancelReservationTransactionService = __importStar(require("../assetTransaction/cancelReservation"));
|
|
44
44
|
const CancelReservationCOAService = __importStar(require("../assetTransaction/cancelReservationCOA"));
|
|
45
45
|
const factory_2 = require("../assetTransaction/cancelReservationCOA/factory");
|
|
46
|
-
const
|
|
46
|
+
const returnAction_1 = require("../../repo/action/returnAction");
|
|
47
47
|
const assetTransaction_1 = require("../../repo/assetTransaction");
|
|
48
48
|
const project_1 = require("../../repo/project");
|
|
49
49
|
const reservation_1 = require("../../repo/reservation");
|
|
@@ -82,7 +82,7 @@ function call(params) {
|
|
|
82
82
|
...params.data,
|
|
83
83
|
sameAs: { id: params.id }
|
|
84
84
|
})({
|
|
85
|
-
|
|
85
|
+
actions: { returnAction: new returnAction_1.ReturnActionRepo(connection) },
|
|
86
86
|
assetTransaction: new assetTransaction_1.AssetTransactionRepo(connection),
|
|
87
87
|
project: new project_1.ProjectRepo(connection),
|
|
88
88
|
reservation: new reservation_1.ReservationRepo(connection),
|
|
@@ -108,7 +108,7 @@ function returnReserve(params) {
|
|
|
108
108
|
project: { id: project.id }
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
|
-
const action = await repos.
|
|
111
|
+
const action = await repos.actions.returnAction.start(returnActionAttributes, {
|
|
112
112
|
...(recipe !== undefined) ? { recipe } : undefined // add recipe(2024-06-11~)
|
|
113
113
|
});
|
|
114
114
|
try {
|
|
@@ -133,14 +133,14 @@ function returnReserve(params) {
|
|
|
133
133
|
}
|
|
134
134
|
catch (error) {
|
|
135
135
|
try {
|
|
136
|
-
await repos.
|
|
136
|
+
await repos.actions.returnAction.giveUp({ typeOf: action.typeOf, id: action.id, error });
|
|
137
137
|
}
|
|
138
138
|
catch (__) {
|
|
139
139
|
// no op
|
|
140
140
|
}
|
|
141
141
|
throw error;
|
|
142
142
|
}
|
|
143
|
-
await repos.
|
|
143
|
+
await repos.actions.returnAction.completeWithVoid({
|
|
144
144
|
typeOf: action.typeOf, id: action.id, result: {},
|
|
145
145
|
...(recipe !== undefined) ? { recipe } : undefined // add recipe(2024-06-11~)
|
|
146
146
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.call = call;
|
|
4
|
-
const
|
|
4
|
+
const reserve_1 = require("../../repo/action/reserve");
|
|
5
5
|
const use_1 = require("../../repo/action/use");
|
|
6
6
|
const assetTransaction_1 = require("../../repo/assetTransaction");
|
|
7
7
|
const authorization_1 = require("../../repo/authorization");
|
|
@@ -23,9 +23,9 @@ function call(params) {
|
|
|
23
23
|
instrument: data.instrument,
|
|
24
24
|
...(typeof data.location?.identifier === 'string') ? { location: data.location } : undefined
|
|
25
25
|
})({
|
|
26
|
-
action: new action_1.ActionRepo(connection),
|
|
27
26
|
actions: {
|
|
28
|
-
use: new use_1.UseActionRepo(connection)
|
|
27
|
+
use: new use_1.UseActionRepo(connection),
|
|
28
|
+
reserve: new reserve_1.ReserveActionRepo(connection)
|
|
29
29
|
},
|
|
30
30
|
assetTransaction: new assetTransaction_1.AssetTransactionRepo(connection),
|
|
31
31
|
code: new authorization_1.AuthorizationRepo(connection),
|
|
@@ -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
|
-
const action_1 = require("../../repo/action");
|
|
7
6
|
const pay_1 = require("../../repo/action/pay");
|
|
8
7
|
const refund_1 = require("../../repo/action/refund");
|
|
9
8
|
const authorizeInvoice_1 = require("../../repo/action/authorizeInvoice");
|
|
@@ -32,7 +31,6 @@ function call(params) {
|
|
|
32
31
|
&& typeof credentialsExpireInSeconds === 'number' && credentialsExpireInSeconds > 0;
|
|
33
32
|
await (0, voidPaymentByTask_1.voidPaymentByTask)(data)({
|
|
34
33
|
accountingReport: new accountingReport_1.AccountingReportRepo(connection),
|
|
35
|
-
action: new action_1.ActionRepo(connection),
|
|
36
34
|
actions: {
|
|
37
35
|
pay: new pay_1.PayActionRepo(connection),
|
|
38
36
|
refund: new refund_1.RefundActionRepo(connection),
|
|
@@ -4,7 +4,7 @@ exports.call = call;
|
|
|
4
4
|
const coa_service_1 = require("@motionpicture/coa-service");
|
|
5
5
|
const factory_1 = require("../../factory");
|
|
6
6
|
const voidTransaction_1 = require("../offer/event/voidTransaction");
|
|
7
|
-
const
|
|
7
|
+
const cancel_1 = require("../../repo/action/cancel");
|
|
8
8
|
const acceptCOAOffer_1 = require("../../repo/action/acceptCOAOffer");
|
|
9
9
|
const authorizeOffer_1 = require("../../repo/action/authorizeOffer");
|
|
10
10
|
const assetTransaction_1 = require("../../repo/assetTransaction");
|
|
@@ -58,7 +58,7 @@ function call(params) {
|
|
|
58
58
|
project: { id: params.project.id },
|
|
59
59
|
sameAs: { id: params.id }
|
|
60
60
|
})({
|
|
61
|
-
|
|
61
|
+
actions: { cancel: new cancel_1.CancelActionRepo(connection) },
|
|
62
62
|
acceptCOAOfferAction: new acceptCOAOffer_1.AcceptCOAOfferActionRepo(connection),
|
|
63
63
|
authorizeOfferAction: new authorizeOffer_1.AuthorizeOfferActionRepo(connection),
|
|
64
64
|
assetTransaction: new assetTransaction_1.AssetTransactionRepo(connection),
|
package/package.json
CHANGED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { Connection } from 'mongoose';
|
|
2
|
-
import { factory } from '../factory';
|
|
3
|
-
import { IAction, IKeyOfProjection, ActionProcessRepo, ICancelActionAction, IActionRecipe } from './action/anyAction/actionProcess';
|
|
4
|
-
export { ICancelActionAction };
|
|
5
|
-
/**
|
|
6
|
-
* 汎用アクションリポジトリで開始可能なアクションタイプ
|
|
7
|
-
*/
|
|
8
|
-
export type StartableActionType = factory.actionType.AuthorizeAction | factory.actionType.CancelAction | factory.actionType.ConfirmAction | factory.actionType.OrderAction | factory.actionType.ReserveAction | factory.actionType.ReturnAction;
|
|
9
|
-
export type IAvailableActionRecipe = IActionRecipe<Exclude<factory.recipe.RecipeCategory, factory.recipe.RecipeCategory.publishPaymentUrl | factory.recipe.RecipeCategory.checkMovieTicket | factory.recipe.RecipeCategory.acceptCOAOffer | factory.recipe.RecipeCategory.authorizeInvoice | factory.recipe.RecipeCategory.authorizeInvoice3ds | factory.recipe.RecipeCategory.payCreditCard | factory.recipe.RecipeCategory.payMovieTicket | factory.recipe.RecipeCategory.refundCreditCard | factory.recipe.RecipeCategory.refundMovieTicket>>;
|
|
10
|
-
/**
|
|
11
|
-
* アクションリポジトリ
|
|
12
|
-
*/
|
|
13
|
-
export declare class ActionRepo extends ActionProcessRepo<IAction<StartableActionType>, IAvailableActionRecipe> {
|
|
14
|
-
constructor(connection: Connection);
|
|
15
|
-
/**
|
|
16
|
-
* 汎用アクション検索
|
|
17
|
-
*/
|
|
18
|
-
findActionsByType<T extends StartableActionType>(params: factory.action.ISearchConditions & {
|
|
19
|
-
typeOf?: T | {
|
|
20
|
-
$eq?: T;
|
|
21
|
-
};
|
|
22
|
-
}, inclusion: IKeyOfProjection[]): Promise<IAction<T>[]>;
|
|
23
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ActionRepo = void 0;
|
|
4
|
-
const actionProcess_1 = require("./action/anyAction/actionProcess");
|
|
5
|
-
/**
|
|
6
|
-
* アクションリポジトリ
|
|
7
|
-
*/
|
|
8
|
-
class ActionRepo extends actionProcess_1.ActionProcessRepo {
|
|
9
|
-
constructor(connection) {
|
|
10
|
-
super({ connection }, {
|
|
11
|
-
expireAfterSeconds: actionProcess_1.DEFAULT_EXPIRE_AFTER_SECONDS,
|
|
12
|
-
recipeExpireAfterSeconds: actionProcess_1.RECIPE_DEFAULT_EXPIRE_AFTER_SECONDS
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* 汎用アクション検索
|
|
17
|
-
*/
|
|
18
|
-
async findActionsByType(params, inclusion) {
|
|
19
|
-
return (this.findAnyActions(params, inclusion));
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.ActionRepo = ActionRepo;
|