@chevre/domain 26.1.0-alpha.0 → 26.1.0-alpha.2
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/accountingReport.d.ts +1 -32
- package/lib/chevre/repo/accountingReport.js +4 -85
- package/lib/chevre/repo/action/checkMovieTicket.d.ts +44 -54
- package/lib/chevre/repo/action/checkMovieTicket.js +71 -66
- package/lib/chevre/repo/action/dedicatedAction/dedicatedActionProcess.d.ts +5 -5
- package/lib/chevre/repo/adminAccountingReport.d.ts +40 -0
- package/lib/chevre/repo/adminAccountingReport.js +89 -0
- package/lib/chevre/repo/adminCheckMovieTicketAction.d.ts +29 -0
- package/lib/chevre/repo/adminCheckMovieTicketAction.js +87 -0
- package/lib/chevre/repo/aggregateAction.d.ts +1 -10
- package/lib/chevre/repo/aggregateAction.js +0 -25
- package/lib/chevre/repo/aggregateCheckMovieTicketAction.d.ts +31 -0
- package/lib/chevre/repo/aggregateCheckMovieTicketAction.js +138 -0
- package/lib/chevre/repo/aggregateUseAction.d.ts +0 -9
- package/lib/chevre/repo/aggregateUseAction.js +0 -25
- package/lib/chevre/repo/mongoose/schemas/action/checkMovieTicket.d.ts +11 -0
- package/lib/chevre/repo/mongoose/schemas/action/checkMovieTicket.js +108 -0
- package/lib/chevre/repository.d.ts +15 -0
- package/lib/chevre/repository.js +35 -2
- package/lib/chevre/service/aggregation/system.d.ts +2 -1
- package/lib/chevre/service/aggregation/system.js +1 -2
- package/lib/chevre/service/order/deleteOrder.d.ts +2 -2
- package/lib/chevre/service/order/deleteOrder.js +1 -1
- package/lib/chevre/service/payment/movieTicket/checkMovieTicket.js +4 -4
- package/lib/chevre/service/payment/movieTicket/validation.js +13 -43
- package/lib/chevre/service/task/deleteTransaction.js +2 -2
- package/lib/chevre/service/transaction/deleteTransaction.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AcceptedOfferRepo } from '../../repo/acceptedOffer';
|
|
2
|
-
import type {
|
|
2
|
+
import type { AdminAccountingReportRepo } from '../../repo/adminAccountingReport';
|
|
3
3
|
import type { IDeleteActionResult, AdminActionRepo } from '../../repo/adminAction';
|
|
4
4
|
import type { NoteRepo } from '../../repo/note';
|
|
5
5
|
import type { OrderRepo } from '../../repo/order';
|
|
@@ -17,7 +17,7 @@ declare function deleteOrder(params: {
|
|
|
17
17
|
};
|
|
18
18
|
}): (repos: {
|
|
19
19
|
acceptedOffer: AcceptedOfferRepo;
|
|
20
|
-
|
|
20
|
+
adminAccountingReport: AdminAccountingReportRepo;
|
|
21
21
|
adminAction: AdminActionRepo;
|
|
22
22
|
note: NoteRepo;
|
|
23
23
|
order: OrderRepo;
|
|
@@ -35,7 +35,7 @@ function deleteOrder(params) {
|
|
|
35
35
|
// console.error('deleteOwnershipInfosByOrder throws', error);
|
|
36
36
|
// }
|
|
37
37
|
// 経理レポート削除
|
|
38
|
-
await repos.
|
|
38
|
+
await repos.adminAccountingReport.deleteByOrderNumber({ mainEntity: { orderNumber: order.orderNumber } });
|
|
39
39
|
// メモ削除(2024-02-15~)
|
|
40
40
|
await repos.note.deleteNotesByAbout({
|
|
41
41
|
about: {
|
|
@@ -42,7 +42,7 @@ function checkMovieTicket(params) {
|
|
|
42
42
|
? { sameAs: { id: params.sameAs.id, typeOf: 'Task' } } // タスク関連付け(2024-05-21~)
|
|
43
43
|
: undefined
|
|
44
44
|
};
|
|
45
|
-
const action = await repos.actions.checkMovieTicket.
|
|
45
|
+
const action = await repos.actions.checkMovieTicket.startCheckMovieTicketAction(actionAttributes);
|
|
46
46
|
let processPurchaseNumberAuthResult;
|
|
47
47
|
let recipe;
|
|
48
48
|
try {
|
|
@@ -76,15 +76,15 @@ function checkMovieTicket(params) {
|
|
|
76
76
|
// アクション保管用のエラーと両方保管(2024-05-22~)
|
|
77
77
|
const errors = [(0, errorHandler_1.handleMvtkReserveError)(error), error];
|
|
78
78
|
try {
|
|
79
|
-
await repos.actions.checkMovieTicket.
|
|
79
|
+
await repos.actions.checkMovieTicket.giveUpCheckMovieTicketAction({ typeOf: actionAttributes.typeOf, id: action.id, error: errors });
|
|
80
80
|
}
|
|
81
81
|
catch (__) {
|
|
82
82
|
// 失敗したら仕方ない
|
|
83
83
|
}
|
|
84
84
|
throw errors[0];
|
|
85
85
|
}
|
|
86
|
-
const result = {};
|
|
87
|
-
await repos.actions.checkMovieTicket.
|
|
86
|
+
// const result: factory.action.check.paymentMethod.movieTicket.IResult = {};
|
|
87
|
+
await repos.actions.checkMovieTicket.completeCheckMovieTicketAction({ typeOf: actionAttributes.typeOf, id: action.id, recipe });
|
|
88
88
|
return { result: processPurchaseNumberAuthResult };
|
|
89
89
|
};
|
|
90
90
|
}
|
|
@@ -121,58 +121,28 @@ function checkByIdentifierIfNotYet(params) {
|
|
|
121
121
|
}
|
|
122
122
|
const specifiedCheckedActionId = params.checkedAction?.id;
|
|
123
123
|
if (typeof specifiedCheckedActionId === 'string' && specifiedCheckedActionId !== '') {
|
|
124
|
-
alreadyCheckedAction =
|
|
125
|
-
// limit: 1,
|
|
126
|
-
// page: 1,
|
|
127
|
-
// id: { $in: [specifiedCheckedActionId] },
|
|
124
|
+
alreadyCheckedAction = await repos.actions.checkMovieTicket.findCompletedCheckMovieTicketAction({
|
|
128
125
|
id: specifiedCheckedActionId,
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
})).shift();
|
|
133
|
-
if (alreadyCheckedAction === undefined) {
|
|
126
|
+
purpose: { id: placeOrderId }
|
|
127
|
+
});
|
|
128
|
+
if (typeof alreadyCheckedAction?.id !== 'string') {
|
|
134
129
|
throw new factory_1.factory.errors.NotFound(factory_1.factory.actionType.CheckAction);
|
|
135
130
|
}
|
|
136
131
|
}
|
|
137
132
|
else {
|
|
138
133
|
// 認証IDの未指定ケースは廃止(2026-03-21~)
|
|
139
134
|
throw new factory_1.factory.errors.ArgumentNull('checkedAction.id');
|
|
140
|
-
// // 認証IDの未指定ケースがあるかどうか確認するためにlog
|
|
141
|
-
// console.log('checkByIdentifierIfNotYet: specifiedCheckedActionId undefined. params:', JSON.stringify(params));
|
|
142
|
-
// alreadyCheckedAction = (await repos.checkMovieTicketAction.findCompletedCheckActions(
|
|
143
|
-
// {
|
|
144
|
-
// // limit: 1,
|
|
145
|
-
// // page: 1,
|
|
146
|
-
// sort: { startDate: factory.sortType.Descending },
|
|
147
|
-
// // typeOf: { $eq: factory.actionType.CheckAction },
|
|
148
|
-
// // actionStatus: { $in: [factory.actionStatusType.CompletedActionStatus] },
|
|
149
|
-
// object: {
|
|
150
|
-
// typeOf: { $eq: factory.service.paymentService.PaymentServiceType.MovieTicket },
|
|
151
|
-
// id: { $eq: params.paymentServiceId }, // 指定の決済サービスにおいて
|
|
152
|
-
// movieTickets: {
|
|
153
|
-
// identifier: { $eq: params.movieTicketIdentifier }, // 指定の決済カードコードを
|
|
154
|
-
// serviceOutput: {
|
|
155
|
-
// reservationFor: { id: { $eq: params.screeningEvent.id } } // 指定のイベントにおいて
|
|
156
|
-
// }
|
|
157
|
-
// }
|
|
158
|
-
// },
|
|
159
|
-
// // ...(typeof placeOrderId === 'string') ? { purpose: { id: { $in: [placeOrderId] } } } : undefined
|
|
160
|
-
// ...(typeof placeOrderId === 'string') ? { purpose: { id: placeOrderId } } : undefined
|
|
161
|
-
// }
|
|
162
|
-
// )).shift();
|
|
163
135
|
}
|
|
164
136
|
debug('checkByIdentifierIfNotYet: alreadyCheckedAction:', JSON.stringify(alreadyCheckedAction), 'params:', JSON.stringify(params));
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
checkResult = { purchaseNumberAuthIn: beforeMedia, purchaseNumberAuthResult: afterMedia };
|
|
175
|
-
}
|
|
137
|
+
const recipe = await repos.actions.checkMovieTicket.findRecipeByAction({
|
|
138
|
+
project: { id: params.screeningEvent.project.id },
|
|
139
|
+
recipeFor: { id: alreadyCheckedAction.id }
|
|
140
|
+
});
|
|
141
|
+
const directionPurchaseNumberAuth = recipe?.step[0]?.itemListElement[0]?.itemListElement[0];
|
|
142
|
+
if (directionPurchaseNumberAuth !== undefined) {
|
|
143
|
+
const { beforeMedia, afterMedia } = directionPurchaseNumberAuth;
|
|
144
|
+
if (beforeMedia !== undefined && afterMedia !== undefined) {
|
|
145
|
+
checkResult = { purchaseNumberAuthIn: beforeMedia, purchaseNumberAuthResult: afterMedia };
|
|
176
146
|
}
|
|
177
147
|
}
|
|
178
148
|
if (checkResult === undefined) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.call = call;
|
|
4
4
|
const acceptedOffer_1 = require("../../repo/acceptedOffer");
|
|
5
|
-
const
|
|
5
|
+
const adminAccountingReport_1 = require("../../repo/adminAccountingReport");
|
|
6
6
|
const update_1 = require("../../repo/action/update");
|
|
7
7
|
const adminAction_1 = require("../../repo/adminAction");
|
|
8
8
|
const adminTransaction_1 = require("../../repo/adminTransaction");
|
|
@@ -21,7 +21,7 @@ function call(params) {
|
|
|
21
21
|
const { data } = params;
|
|
22
22
|
await (0, transaction_1.deleteTransaction)(data)({
|
|
23
23
|
acceptedOffer: new acceptedOffer_1.AcceptedOfferRepo(connection),
|
|
24
|
-
|
|
24
|
+
adminAccountingReport: new adminAccountingReport_1.AdminAccountingReportRepo(connection),
|
|
25
25
|
actions: {
|
|
26
26
|
update: new update_1.UpdateActionRepo(connection),
|
|
27
27
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { factory } from '../../factory';
|
|
2
2
|
import type { AcceptedOfferRepo } from '../../repo/acceptedOffer';
|
|
3
|
-
import type {
|
|
3
|
+
import type { AdminAccountingReportRepo } from '../../repo/adminAccountingReport';
|
|
4
4
|
import type { UpdateActionRepo } from '../../repo/action/update';
|
|
5
5
|
import type { AdminActionRepo } from '../../repo/adminAction';
|
|
6
6
|
import type { AdminTransactionRepo } from '../../repo/adminTransaction';
|
|
@@ -12,7 +12,7 @@ import type { PlaceOrderRepo } from '../../repo/transaction/placeOrder';
|
|
|
12
12
|
import type { ReturnOrderRepo } from '../../repo/transaction/returnOrder';
|
|
13
13
|
interface IDeleteTransactionRepos {
|
|
14
14
|
acceptedOffer: AcceptedOfferRepo;
|
|
15
|
-
|
|
15
|
+
adminAccountingReport: AdminAccountingReportRepo;
|
|
16
16
|
actions: {
|
|
17
17
|
update: UpdateActionRepo;
|
|
18
18
|
};
|
package/package.json
CHANGED