@chevre/domain 25.0.0-alpha.2 → 25.0.0-alpha.21
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/emailMessageBuilder.d.ts +10 -4
- package/lib/chevre/emailMessageBuilder.js +48 -73
- package/lib/chevre/repo/acceptedOffer.d.ts +1 -5
- package/lib/chevre/repo/acceptedOffer.js +5 -5
- package/lib/chevre/repo/acceptedOfferInReserve.d.ts +1 -5
- package/lib/chevre/repo/acceptedOfferInReserve.js +4 -4
- package/lib/chevre/repo/emailMessage.d.ts +18 -9
- package/lib/chevre/repo/emailMessage.js +26 -36
- package/lib/chevre/repo/factory/acceptedOffer/reserveTransaction2itemOffered.d.ts +1 -3
- package/lib/chevre/repo/factory/acceptedOffer/reserveTransaction2itemOffered.js +2 -3
- package/lib/chevre/repo/mongoose/schemas/emailMessages.d.ts +9 -1
- package/lib/chevre/repo/mongoose/schemas/emailMessages.js +5 -20
- package/lib/chevre/repo/mongoose/schemas/order.d.ts +4 -0
- package/lib/chevre/repo/mongoose/schemas/order.js +11 -110
- package/lib/chevre/repo/mongoose/schemas/setting.d.ts +0 -6
- package/lib/chevre/repo/order.d.ts +3 -7
- package/lib/chevre/repo/order.js +56 -26
- package/lib/chevre/repo/orderInTransaction.d.ts +50 -33
- package/lib/chevre/repo/orderInTransaction.js +109 -73
- package/lib/chevre/repo/orderNumber.d.ts +4 -0
- package/lib/chevre/repo/orderNumber.js +32 -60
- package/lib/chevre/repo/passport.d.ts +5 -2
- package/lib/chevre/repo/task.d.ts +1 -1
- package/lib/chevre/repo/transaction/placeOrder.d.ts +1 -6
- package/lib/chevre/repo/transaction/placeOrder.js +37 -26
- package/lib/chevre/repo/transaction.d.ts +6 -2
- package/lib/chevre/repo/transaction.js +6 -2
- package/lib/chevre/service/assetTransaction/reserve/start.d.ts +0 -2
- package/lib/chevre/service/offer/any.d.ts +3 -8
- package/lib/chevre/service/offer/any.js +7 -6
- package/lib/chevre/service/offer/event/authorize/processStartReserve4chevre.d.ts +0 -2
- package/lib/chevre/service/offer/event/authorize.d.ts +0 -4
- package/lib/chevre/service/offer/event/authorize.js +5 -6
- package/lib/chevre/service/offer/event/voidTransaction.js +29 -17
- package/lib/chevre/service/offer/event/voidTransactionByActionId.js +16 -12
- package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer.d.ts +0 -6
- package/lib/chevre/service/offer/eventServiceByCOA/acceptOffer.js +10 -12
- package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.d.ts +1 -1
- package/lib/chevre/service/offer/eventServiceByCOA/authorize.js +7 -7
- package/lib/chevre/service/offer/eventServiceByCOA/changeOffers.js +21 -17
- package/lib/chevre/service/order/deleteOrder.d.ts +6 -10
- package/lib/chevre/service/order/deleteOrder.js +8 -49
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderCancelled/factory.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderPaymentDue.d.ts +4 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderPaymentDue.js +1 -26
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned/factory.d.ts +1 -1
- package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.js +3 -2
- package/lib/chevre/service/order/placeOrder/factory.d.ts +1 -1
- package/lib/chevre/service/order/placeOrder/factory.js +10 -8
- package/lib/chevre/service/order/placeOrder/voidAcceptedOfferIfNecessary.d.ts +1 -3
- package/lib/chevre/service/order/placeOrder/voidAcceptedOfferIfNecessary.js +3 -15
- package/lib/chevre/service/order/placeOrder.js +6 -6
- package/lib/chevre/service/order.d.ts +1 -2
- package/lib/chevre/service/order.js +1 -5
- package/lib/chevre/service/payment/any/authorize/fixOrderAsNeeded.d.ts +2 -4
- package/lib/chevre/service/payment/any/authorize/fixOrderAsNeeded.js +4 -6
- package/lib/chevre/service/payment/any/authorize.d.ts +2 -0
- package/lib/chevre/service/payment/any/publishPaymentUrl.d.ts +0 -4
- package/lib/chevre/service/payment/any/publishPaymentUrl.js +5 -8
- package/lib/chevre/service/reserve/findByCode.js +1 -1
- package/lib/chevre/service/reserve/searchByOrder.js +1 -1
- package/lib/chevre/service/task/acceptCOAOffer.js +8 -10
- package/lib/chevre/service/task/authorizePayment.js +2 -6
- package/lib/chevre/service/task/confirmReserveTransaction.js +1 -1
- package/lib/chevre/service/task/deleteTransaction.js +0 -8
- package/lib/chevre/service/task/payment/payByTask.js +1 -1
- package/lib/chevre/service/task/publishPaymentUrl.js +6 -9
- package/lib/chevre/service/taskHandler.js +0 -1
- package/lib/chevre/service/transaction/deleteTransaction.d.ts +8 -14
- package/lib/chevre/service/transaction/deleteTransaction.js +11 -117
- package/lib/chevre/service/transaction/placeOrder/confirm/factory/result.d.ts +7 -2
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions/sendEmailMessage.d.ts +3 -3
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions/sendEmailMessage.js +8 -23
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.d.ts +3 -3
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.js +1 -6
- package/lib/chevre/service/transaction/placeOrder/confirm.d.ts +2 -7
- package/lib/chevre/service/transaction/placeOrder/confirm.js +42 -36
- package/lib/chevre/service/transaction/placeOrder/issueOrderNumberIfNotExist.d.ts +5 -0
- package/lib/chevre/service/transaction/placeOrder/issueOrderNumberIfNotExist.js +37 -23
- package/lib/chevre/service/transaction/placeOrder/start/factory.d.ts +19 -4
- package/lib/chevre/service/transaction/placeOrder/start/factory.js +23 -12
- package/lib/chevre/service/transaction/placeOrder/start.d.ts +9 -4
- package/lib/chevre/service/transaction/placeOrder/start.js +18 -1
- package/lib/chevre/service/transaction/placeOrder/updateAgent.d.ts +0 -4
- package/lib/chevre/service/transaction/placeOrder/updateAgent.js +20 -22
- package/lib/chevre/service/transaction/placeOrder.d.ts +1 -2
- package/lib/chevre/service/transaction/placeOrder.js +1 -3
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.js +2 -37
- package/lib/chevre/service/transaction/returnOrder/potentialActions/sendEmailMessage.d.ts +2 -2
- package/lib/chevre/service/transaction/returnOrder/potentialActions/sendEmailMessage.js +3 -18
- package/lib/chevre/service/transaction/returnOrder/potentialActions.d.ts +0 -1
- package/lib/chevre/service/transaction/returnOrder/potentialActions.js +0 -4
- package/lib/chevre/service/transaction/returnOrder/preStart.js +1 -1
- package/lib/chevre/service/transaction/returnOrder.d.ts +0 -2
- package/lib/chevre/service/transaction/returnOrder.js +13 -12
- package/lib/chevre/service/validation/validateOrder.js +1 -1
- package/lib/chevre/service.d.ts +0 -2
- package/lib/chevre/service.js +0 -2
- package/package.json +2 -2
- package/lib/chevre/factory/order.d.ts +0 -2
- package/lib/chevre/factory/order.js +0 -5
- package/lib/chevre/service/order/placeOrderWithoutTransaction.d.ts +0 -22
- package/lib/chevre/service/order/placeOrderWithoutTransaction.js +0 -51
- package/lib/chevre/service/task/deletePerson.d.ts +0 -6
- package/lib/chevre/service/task/deletePerson.js +0 -465
|
@@ -6,16 +6,11 @@ interface IAcceptOfferOperationRepos {
|
|
|
6
6
|
type IAcceptOfferOperation<T> = (repos: IAcceptOfferOperationRepos) => Promise<T>;
|
|
7
7
|
export type IAuthorizeActionWithInstrument = Pick<factory.action.authorize.offer.eventService.IAction, 'instrument'>;
|
|
8
8
|
export declare function acceptOffer(params: {
|
|
9
|
-
orderNumber: string;
|
|
10
9
|
project: {
|
|
11
10
|
id: string;
|
|
12
11
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* COA以外では注文ドキュメントにpriceSpecificationが存在しないのでIFを補完
|
|
16
|
-
*/
|
|
17
|
-
priceSpecification?: factory.order.ITicketPriceSpecification;
|
|
18
|
-
})[];
|
|
12
|
+
placeOrderId: string;
|
|
13
|
+
acceptedOffers: IMinimizedAcceptedOffer[] | factory.order.ICOAAcceptedOffer[];
|
|
19
14
|
}): IAcceptOfferOperation<void>;
|
|
20
15
|
export declare function voidAcceptedOffer(params: {
|
|
21
16
|
/**
|
|
@@ -25,7 +20,7 @@ export declare function voidAcceptedOffer(params: {
|
|
|
25
20
|
* instrument.serialNumberからvoidする場合に指定
|
|
26
21
|
*/
|
|
27
22
|
authorizeActionsWithInstrument: IAuthorizeActionWithInstrument[];
|
|
28
|
-
|
|
23
|
+
placeOrderId: string;
|
|
29
24
|
}): (repos: {
|
|
30
25
|
orderInTransaction: OrderInTransactionRepo;
|
|
31
26
|
}) => Promise<void>;
|
|
@@ -10,16 +10,16 @@ const factory_1 = require("../../factory");
|
|
|
10
10
|
const debug = (0, debug_1.default)('chevre-domain:service:offer');
|
|
11
11
|
function acceptOffer(params) {
|
|
12
12
|
return async (repos) => {
|
|
13
|
-
await repos.orderInTransaction.
|
|
14
|
-
orderNumber: params.orderNumber,
|
|
13
|
+
await repos.orderInTransaction.acceptOfferByIdentifier({
|
|
15
14
|
project: { id: params.project.id, typeOf: factory_1.factory.organizationType.Project },
|
|
15
|
+
identifier: params.placeOrderId,
|
|
16
16
|
acceptedOffers: params.acceptedOffers
|
|
17
17
|
});
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
function voidAcceptedOffer(params) {
|
|
21
21
|
return async (repos) => {
|
|
22
|
-
const {
|
|
22
|
+
const { placeOrderId } = params;
|
|
23
23
|
// let reservationNumbers: string[] = [];
|
|
24
24
|
// authorizeActions.forEach((authorizeAction) => {
|
|
25
25
|
// const reserveTransactionNumberByAction = authorizeAction.object.pendingTransaction?.transactionNumber;
|
|
@@ -40,10 +40,11 @@ function voidAcceptedOffer(params) {
|
|
|
40
40
|
const serialNumbers = params.authorizeActionsWithInstrument
|
|
41
41
|
.filter(({ instrument }) => typeof instrument.transactionNumber === 'string')
|
|
42
42
|
.map(({ instrument }) => String(instrument.transactionNumber));
|
|
43
|
-
debug('removing acceptedOffers from PlaceOrder...',
|
|
43
|
+
debug('removing acceptedOffers from PlaceOrder...', placeOrderId, 'serialNumbers:', serialNumbers);
|
|
44
44
|
if (serialNumbers.length > 0) {
|
|
45
|
-
const result = await repos.orderInTransaction.
|
|
46
|
-
orderNumber,
|
|
45
|
+
const result = await repos.orderInTransaction.voidAcceptedOfferByIdentifier({
|
|
46
|
+
// orderNumber,
|
|
47
|
+
identifier: placeOrderId,
|
|
47
48
|
acceptedOffers: { serialNumber: { $in: serialNumbers } }
|
|
48
49
|
});
|
|
49
50
|
debug('acceptedOffers removed from PlaceOrder by serialNumbers.', result);
|
|
@@ -15,7 +15,6 @@ import type { PaymentServiceRepo } from '../../../../repo/paymentService';
|
|
|
15
15
|
import type { SeatRepo } from '../../../../repo/place/seat';
|
|
16
16
|
import type { PriceSpecificationRepo } from '../../../../repo/priceSpecification';
|
|
17
17
|
import type { ProductRepo } from '../../../../repo/product';
|
|
18
|
-
import type { ProjectRepo } from '../../../../repo/project';
|
|
19
18
|
import type { OfferRateLimitRepo } from '../../../../repo/rateLimit/offer';
|
|
20
19
|
import type { SettingRepo } from '../../../../repo/setting';
|
|
21
20
|
import type { StockHolderRepo } from '../../../../repo/stockHolder';
|
|
@@ -63,7 +62,6 @@ declare function processStartReserve4chevre(params: {
|
|
|
63
62
|
paymentService: PaymentServiceRepo;
|
|
64
63
|
product: ProductRepo;
|
|
65
64
|
priceSpecification: PriceSpecificationRepo;
|
|
66
|
-
project: ProjectRepo;
|
|
67
65
|
seat: SeatRepo;
|
|
68
66
|
setting: SettingRepo;
|
|
69
67
|
task: TaskRepo;
|
|
@@ -13,12 +13,10 @@ import type { OfferRepo } from '../../../repo/offer/unitPriceInCatalog';
|
|
|
13
13
|
import type { OfferCatalogRepo } from '../../../repo/offerCatalog';
|
|
14
14
|
import type { OfferCatalogItemRepo } from '../../../repo/offerCatalogItem';
|
|
15
15
|
import type { OrderInTransactionRepo } from '../../../repo/orderInTransaction';
|
|
16
|
-
import type { OrderNumberRepo } from '../../../repo/orderNumber';
|
|
17
16
|
import type { PaymentServiceRepo } from '../../../repo/paymentService';
|
|
18
17
|
import type { SeatRepo } from '../../../repo/place/seat';
|
|
19
18
|
import type { PriceSpecificationRepo } from '../../../repo/priceSpecification';
|
|
20
19
|
import type { ProductRepo } from '../../../repo/product';
|
|
21
|
-
import type { ProjectRepo } from '../../../repo/project';
|
|
22
20
|
import type { OfferRateLimitRepo } from '../../../repo/rateLimit/offer';
|
|
23
21
|
import type { SettingRepo } from '../../../repo/setting';
|
|
24
22
|
import type { StockHolderRepo } from '../../../repo/stockHolder';
|
|
@@ -43,11 +41,9 @@ interface IAuthorizeRepos {
|
|
|
43
41
|
offerCatalogItem: OfferCatalogItemRepo;
|
|
44
42
|
offerRateLimit: OfferRateLimitRepo;
|
|
45
43
|
orderInTransaction: OrderInTransactionRepo;
|
|
46
|
-
orderNumber: OrderNumberRepo;
|
|
47
44
|
paymentService: PaymentServiceRepo;
|
|
48
45
|
priceSpecification: PriceSpecificationRepo;
|
|
49
46
|
product: ProductRepo;
|
|
50
|
-
project: ProjectRepo;
|
|
51
47
|
seat: SeatRepo;
|
|
52
48
|
setting: SettingRepo;
|
|
53
49
|
task: TaskRepo;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.authorize = authorize;
|
|
4
4
|
const factory_1 = require("../../../factory");
|
|
5
|
-
const issueOrderNumberIfNotExist_1 = require("../../transaction/placeOrder/issueOrderNumberIfNotExist");
|
|
6
5
|
const any_1 = require("../any");
|
|
7
6
|
const defaultOffer_1 = require("./authorize/defaultOffer");
|
|
8
7
|
const factory_2 = require("./authorize/factory");
|
|
@@ -25,11 +24,11 @@ function authorize(params, options) {
|
|
|
25
24
|
})(repos);
|
|
26
25
|
let acceptedOffers4result;
|
|
27
26
|
const now = new Date();
|
|
28
|
-
|
|
27
|
+
// 注文ドキュメントを参照(2026-06-24~)
|
|
28
|
+
const orderNumber = await repos.orderInTransaction.findOrderNumberByIdentifier({
|
|
29
|
+
identifier: transaction.id,
|
|
29
30
|
project: { id: params.project.id },
|
|
30
|
-
|
|
31
|
-
object: { orderDate: now }
|
|
32
|
-
})(repos);
|
|
31
|
+
}, { onlyPlaceOrder: true });
|
|
33
32
|
// まず取引番号発行
|
|
34
33
|
const { transactionNumber } = await repos.transactionNumber.publishByTimestamp({ startDate: now });
|
|
35
34
|
const actionAttributes = (0, factory_2.createAuthorizeSeatReservationActionAttributes)({
|
|
@@ -64,8 +63,8 @@ function authorize(params, options) {
|
|
|
64
63
|
};
|
|
65
64
|
});
|
|
66
65
|
await (0, any_1.acceptOffer)({
|
|
67
|
-
orderNumber,
|
|
68
66
|
project: transaction.project,
|
|
67
|
+
placeOrderId: transaction.id,
|
|
69
68
|
acceptedOffers: minimizedAcceptedOffers
|
|
70
69
|
})(repos);
|
|
71
70
|
}
|
|
@@ -48,23 +48,35 @@ function voidTransaction(params) {
|
|
|
48
48
|
default:
|
|
49
49
|
// no op
|
|
50
50
|
}
|
|
51
|
-
// add orderInTransaction(2024-01-15~)
|
|
52
|
-
// USE_CREATE_ORDER_ON_OFFER_ACCEPTEDの場合、orderNumber発行済のはず
|
|
53
|
-
const orderNumberByTransaction = transaction.object.orderNumber;
|
|
54
|
-
if (typeof orderNumberByTransaction === 'string') {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
51
|
+
// // add orderInTransaction(2024-01-15~)
|
|
52
|
+
// // USE_CREATE_ORDER_ON_OFFER_ACCEPTEDの場合、orderNumber発行済のはず
|
|
53
|
+
// const orderNumberByTransaction = transaction.object.orderNumber;
|
|
54
|
+
// if (typeof orderNumberByTransaction === 'string') {
|
|
55
|
+
// switch (transaction.status) {
|
|
56
|
+
// case factory.transactionStatusType.Confirmed:
|
|
57
|
+
// // 確定取引の場合、不要なオファーのみ除外
|
|
58
|
+
// await voidAcceptedOffer({
|
|
59
|
+
// // authorizeActions,
|
|
60
|
+
// authorizeActionsWithInstrument: authorizeActions,
|
|
61
|
+
// orderNumber: orderNumberByTransaction
|
|
62
|
+
// })(repos);
|
|
63
|
+
// break;
|
|
64
|
+
// default:
|
|
65
|
+
// // orderInTransaction自体を削除
|
|
66
|
+
// await repos.orderInTransaction.deleteByOrderNumber({ orderNumber: orderNumberByTransaction });
|
|
67
|
+
// }
|
|
68
|
+
// }
|
|
69
|
+
switch (transaction.status) {
|
|
70
|
+
case factory_1.factory.transactionStatusType.Confirmed:
|
|
71
|
+
// 確定取引の場合、不要なオファーのみ除外
|
|
72
|
+
await (0, any_1.voidAcceptedOffer)({
|
|
73
|
+
authorizeActionsWithInstrument: authorizeActions,
|
|
74
|
+
placeOrderId: params.purpose.id
|
|
75
|
+
})(repos);
|
|
76
|
+
break;
|
|
77
|
+
default:
|
|
78
|
+
// orderInTransaction自体を削除
|
|
79
|
+
await repos.orderInTransaction.deleteByIdentifier({ identifier: params.purpose.id });
|
|
68
80
|
}
|
|
69
81
|
await Promise.all(authorizeActions.map(async (action) => {
|
|
70
82
|
await repos.authorizeOfferAction.cancelWithVoid({ typeOf: action.typeOf, id: action.id, cancelAction });
|
|
@@ -26,7 +26,7 @@ function voidTransactionByActionId(params) {
|
|
|
26
26
|
// if (transaction.agent.id !== params.agent.id) {
|
|
27
27
|
// throw new factory.errors.Forbidden('Transaction not yours');
|
|
28
28
|
// }
|
|
29
|
-
const orderNumber = await repos.placeOrder.findInProgressOrderNumberById({ id: params.purpose.id });
|
|
29
|
+
// const orderNumber = await repos.placeOrder.findInProgressOrderNumberById({ id: params.purpose.id });
|
|
30
30
|
const action = await repos.authorizeOfferAction.findById({ typeOf: factory_1.factory.actionType.AuthorizeAction, id: params.id });
|
|
31
31
|
if (action.purpose.typeOf !== transaction.typeOf || action.purpose.id !== transaction.id) {
|
|
32
32
|
throw new factory_1.factory.errors.Argument('Transaction', 'Action not found in the transaction');
|
|
@@ -34,17 +34,21 @@ function voidTransactionByActionId(params) {
|
|
|
34
34
|
// MongoDBでcompleteステータスであるにも関わらず、Chevreでは削除されている、というのが最悪の状況
|
|
35
35
|
// それだけは回避するためにMongoDBを先に変更
|
|
36
36
|
await repos.authorizeOfferAction.cancelWithVoid({ typeOf: factory_1.factory.actionType.AuthorizeAction, id: params.id, cancelAction });
|
|
37
|
-
// add orderInTransaction(2024-01-15~)
|
|
38
|
-
// USE_CREATE_ORDER_ON_OFFER_ACCEPTEDの場合、orderNumber発行済のはず
|
|
39
|
-
// const orderNumberByTransaction = transaction.object.orderNumber;
|
|
40
|
-
const orderNumberByTransaction = orderNumber; // transaction.objectへのアクセス回避(2024-05-30~)
|
|
41
|
-
if (typeof orderNumberByTransaction === 'string') {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
37
|
+
// // add orderInTransaction(2024-01-15~)
|
|
38
|
+
// // USE_CREATE_ORDER_ON_OFFER_ACCEPTEDの場合、orderNumber発行済のはず
|
|
39
|
+
// // const orderNumberByTransaction = transaction.object.orderNumber;
|
|
40
|
+
// const orderNumberByTransaction = orderNumber; // transaction.objectへのアクセス回避(2024-05-30~)
|
|
41
|
+
// if (typeof orderNumberByTransaction === 'string') {
|
|
42
|
+
// await voidAcceptedOffer({
|
|
43
|
+
// // authorizeActions: [action],
|
|
44
|
+
// authorizeActionsWithInstrument: [action],
|
|
45
|
+
// orderNumber: orderNumberByTransaction
|
|
46
|
+
// })(repos);
|
|
47
|
+
// }
|
|
48
|
+
await (0, any_1.voidAcceptedOffer)({
|
|
49
|
+
authorizeActionsWithInstrument: [action],
|
|
50
|
+
placeOrderId: params.purpose.id
|
|
51
|
+
})(repos);
|
|
48
52
|
switch (action.instrument.typeOf) {
|
|
49
53
|
case factory_1.factory.assetTransactionType.COAReserveTransaction: {
|
|
50
54
|
const { reserveService } = repos;
|
|
@@ -2,15 +2,11 @@ import type { COA } from '@motionpicture/coa-service';
|
|
|
2
2
|
import type { AcceptCOAOfferActionRepo } from '../../../repo/action/acceptCOAOffer';
|
|
3
3
|
import type { AuthorizeOfferActionRepo } from '../../../repo/action/authorizeOffer';
|
|
4
4
|
import type { EventRepo } from '../../../repo/event';
|
|
5
|
-
import type { OrderNumberRepo } from '../../../repo/orderNumber';
|
|
6
|
-
import type { ProjectRepo } from '../../../repo/project';
|
|
7
5
|
import type { PlaceOrderRepo } from '../../../repo/transaction/placeOrder';
|
|
8
6
|
import { factory } from '../../../factory';
|
|
9
7
|
interface IAcceptRepos {
|
|
10
8
|
action: AcceptCOAOfferActionRepo;
|
|
11
9
|
event: EventRepo;
|
|
12
|
-
orderNumber: OrderNumberRepo;
|
|
13
|
-
project: ProjectRepo;
|
|
14
10
|
placeOrder: PlaceOrderRepo;
|
|
15
11
|
reserveService: COA.service.Reserve;
|
|
16
12
|
masterService: COA.service.Master;
|
|
@@ -19,8 +15,6 @@ interface IReAcceptRepos {
|
|
|
19
15
|
action: AcceptCOAOfferActionRepo;
|
|
20
16
|
authorizeOfferAction: AuthorizeOfferActionRepo;
|
|
21
17
|
event: EventRepo;
|
|
22
|
-
orderNumber: OrderNumberRepo;
|
|
23
|
-
project: ProjectRepo;
|
|
24
18
|
placeOrder: PlaceOrderRepo;
|
|
25
19
|
reserveService: COA.service.Reserve;
|
|
26
20
|
masterService: COA.service.Master;
|
|
@@ -4,7 +4,6 @@ exports.acceptOffer = acceptOffer;
|
|
|
4
4
|
exports.reAcceptOffer = reAcceptOffer;
|
|
5
5
|
const errorHandler_1 = require("../../../errorHandler");
|
|
6
6
|
const factory_1 = require("../../../factory");
|
|
7
|
-
const issueOrderNumberIfNotExist_1 = require("../../transaction/placeOrder/issueOrderNumberIfNotExist");
|
|
8
7
|
const authorize_1 = require("./acceptOffer/authorize");
|
|
9
8
|
const factory_2 = require("./acceptOffer/factory");
|
|
10
9
|
function findCOAInfo(params) {
|
|
@@ -39,12 +38,11 @@ function acceptOffer(params) {
|
|
|
39
38
|
typeOf: factory_1.factory.transactionType.PlaceOrder,
|
|
40
39
|
id: params.purpose.id
|
|
41
40
|
}, ['project', 'agent', 'typeOf']);
|
|
42
|
-
//
|
|
43
|
-
await
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
})(repos);
|
|
41
|
+
// // 注文ドキュメントを参照(2026-06-24~)
|
|
42
|
+
// const orderNumber = await repos.orderInTransaction.findOrderNumberByIdentifier({
|
|
43
|
+
// identifier: transaction.id,
|
|
44
|
+
// project: { id: transaction.project.id },
|
|
45
|
+
// });
|
|
48
46
|
const coaInfo = await findCOAInfo({ id: params.object.event.id, project: { id: transaction.project.id } })(repos);
|
|
49
47
|
const updTmpReserveSeatArgs = (0, factory_2.createUpdTmpReserveSeatArgs)({ object: params.object, coaInfo });
|
|
50
48
|
let updTmpReserveSeatResult;
|
|
@@ -125,11 +123,11 @@ function reAcceptOffer(params) {
|
|
|
125
123
|
typeOf: factory_1.factory.transactionType.PlaceOrder,
|
|
126
124
|
id: params.purpose.id
|
|
127
125
|
}, ['project', 'agent', 'typeOf']);
|
|
128
|
-
const orderNumber = await repos.placeOrder.findInProgressOrderNumberById({ id: transaction.id });
|
|
129
|
-
if (typeof orderNumber !== 'string') {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
126
|
+
// const orderNumber = await repos.placeOrder.findInProgressOrderNumberById({ id: transaction.id });
|
|
127
|
+
// if (typeof orderNumber !== 'string') {
|
|
128
|
+
// // 事前に発行されているはず
|
|
129
|
+
// throw new factory.errors.NotFound('transaction.object.orderNumber');
|
|
130
|
+
// }
|
|
133
131
|
const coaInfo = await findCOAInfo({ id: params.object.event.id, project: { id: transaction.project.id } })(repos);
|
|
134
132
|
// 承認アクション存在検証
|
|
135
133
|
await repos.authorizeOfferAction.findById({ id: params.potentialActions.id, typeOf: factory_1.factory.actionType.AuthorizeAction }, ['id'], []);
|
|
@@ -32,7 +32,7 @@ export declare function responseBody2acceptedOffers4result(params: {
|
|
|
32
32
|
responseBody: IResponseBody;
|
|
33
33
|
acceptedOffer: IAcceptedOffer4COA[];
|
|
34
34
|
event: Pick<IMinimizedIndividualEvent, 'coaInfo' | 'doorTime' | 'endDate' | 'id' | 'location' | 'startDate' | 'superEvent' | 'typeOf' | 'identifier' | 'name'>;
|
|
35
|
-
seller
|
|
35
|
+
seller?: never;
|
|
36
36
|
bookingTime: Date;
|
|
37
37
|
totalPrice: number;
|
|
38
38
|
}): IResultAcceptedOffer[];
|
|
@@ -80,11 +80,11 @@ function authorize(params) {
|
|
|
80
80
|
await repos.action.giveUp({ typeOf: failedAction.typeOf, id: failedAction.id, error });
|
|
81
81
|
throw error;
|
|
82
82
|
}
|
|
83
|
-
const orderNumber = await repos.placeOrder.findInProgressOrderNumberById({ id: params.transaction.id });
|
|
84
|
-
if (typeof orderNumber !== 'string') {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
83
|
+
// const orderNumber = await repos.placeOrder.findInProgressOrderNumberById({ id: params.transaction.id });
|
|
84
|
+
// if (typeof orderNumber !== 'string') {
|
|
85
|
+
// // 事前に発行されているはず(acceptCOAOfferにて)
|
|
86
|
+
// throw new factory.errors.NotFound('transaction.object.orderNumber');
|
|
87
|
+
// }
|
|
88
88
|
let result;
|
|
89
89
|
// 承認アクションを開始
|
|
90
90
|
const actionAttributes = (0, factory_1.createAuthorizeSeatReservationActionAttributes)({
|
|
@@ -103,7 +103,7 @@ function authorize(params) {
|
|
|
103
103
|
responseBody: params.result.responseBody,
|
|
104
104
|
acceptedOffer: acceptedOffers,
|
|
105
105
|
event: screeningEvent,
|
|
106
|
-
seller: transaction.seller,
|
|
106
|
+
// seller: transaction.seller,
|
|
107
107
|
bookingTime: (0, moment_1.default)(action.startDate)
|
|
108
108
|
.toDate(),
|
|
109
109
|
totalPrice: price
|
|
@@ -117,8 +117,8 @@ function authorize(params) {
|
|
|
117
117
|
// add orderInTransaction(2024-01-15~)
|
|
118
118
|
// if (params.options.useCreateOrderOnOfferAccepted) {
|
|
119
119
|
await (0, any_1.acceptOffer)({
|
|
120
|
-
orderNumber,
|
|
121
120
|
project: transaction.project,
|
|
121
|
+
placeOrderId: params.transaction.id,
|
|
122
122
|
acceptedOffers: acceptedOffers4result
|
|
123
123
|
})(repos);
|
|
124
124
|
// }
|
|
@@ -22,11 +22,11 @@ function changeOffers(params) {
|
|
|
22
22
|
if (transaction.agent.id !== params.agent.id) {
|
|
23
23
|
throw new factory_2.factory.errors.Forbidden('Transaction not yours');
|
|
24
24
|
}
|
|
25
|
-
const orderNumber = await repos.placeOrder.findInProgressOrderNumberById({ id: params.transaction.id });
|
|
26
|
-
if (typeof orderNumber !== 'string') {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
25
|
+
// const orderNumber = await repos.placeOrder.findInProgressOrderNumberById({ id: params.transaction.id });
|
|
26
|
+
// if (typeof orderNumber !== 'string') {
|
|
27
|
+
// // 事前に発行されているはず
|
|
28
|
+
// throw new factory.errors.NotFound('transaction.object.orderNumber');
|
|
29
|
+
// }
|
|
30
30
|
// 取引内のアクションかどうか確認
|
|
31
31
|
const authorizeAction = await repos.action.findById({ typeOf: factory_2.factory.actionType.AuthorizeAction, id: params.id });
|
|
32
32
|
if (authorizeAction.purpose.typeOf !== transaction.typeOf || authorizeAction.purpose.id !== transaction.id) {
|
|
@@ -126,7 +126,7 @@ function changeOffers(params) {
|
|
|
126
126
|
responseBody: updTmpReserveSeatResult,
|
|
127
127
|
acceptedOffer: acceptedOffers,
|
|
128
128
|
event: screeningEvent,
|
|
129
|
-
seller: transaction.seller,
|
|
129
|
+
// seller: transaction.seller,
|
|
130
130
|
bookingTime: (0, moment_1.default)(authorizeAction.startDate)
|
|
131
131
|
.toDate(),
|
|
132
132
|
totalPrice: price
|
|
@@ -139,21 +139,25 @@ function changeOffers(params) {
|
|
|
139
139
|
// ActiveActionStatus->CompletedActionStatusで再実装(2024-01-15~)
|
|
140
140
|
await repos.action.reStart({ id: authorizeAction.id, typeOf: authorizeAction.typeOf });
|
|
141
141
|
try {
|
|
142
|
-
// まずvoidAcceptedOffer
|
|
143
|
-
// const orderNumberByTransaction = transaction.object.orderNumber;
|
|
144
|
-
const orderNumberByTransaction = orderNumber; // transaction.objectへのアクセス回避(2024-05-30~)
|
|
145
|
-
if (typeof orderNumberByTransaction === 'string') {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}
|
|
142
|
+
// // まずvoidAcceptedOffer
|
|
143
|
+
// // const orderNumberByTransaction = transaction.object.orderNumber;
|
|
144
|
+
// const orderNumberByTransaction = orderNumber; // transaction.objectへのアクセス回避(2024-05-30~)
|
|
145
|
+
// if (typeof orderNumberByTransaction === 'string') {
|
|
146
|
+
// await voidAcceptedOffer({
|
|
147
|
+
// // authorizeActions: [authorizeAction],
|
|
148
|
+
// authorizeActionsWithInstrument: [authorizeAction],
|
|
149
|
+
// orderNumber: orderNumberByTransaction
|
|
150
|
+
// })(repos);
|
|
151
|
+
// }
|
|
152
|
+
await (0, any_1.voidAcceptedOffer)({
|
|
153
|
+
authorizeActionsWithInstrument: [authorizeAction],
|
|
154
|
+
placeOrderId: params.transaction.id
|
|
155
|
+
})(repos);
|
|
152
156
|
// add orderInTransaction(2024-01-15~)
|
|
153
157
|
// if (params.options.useCreateOrderOnOfferAccepted) {
|
|
154
158
|
await (0, any_1.acceptOffer)({
|
|
155
|
-
orderNumber,
|
|
156
159
|
project: transaction.project,
|
|
160
|
+
placeOrderId: params.transaction.id,
|
|
157
161
|
acceptedOffers: acceptedOffers4result
|
|
158
162
|
})(repos);
|
|
159
163
|
// }
|
|
@@ -1,28 +1,24 @@
|
|
|
1
1
|
import type { AcceptedOfferRepo } from '../../repo/acceptedOffer';
|
|
2
2
|
import type { AccountingReportRepo } from '../../repo/accountingReport';
|
|
3
|
-
import type { EventRepo } from '../../repo/event';
|
|
4
3
|
import type { NoteRepo } from '../../repo/note';
|
|
5
4
|
import type { OrderRepo } from '../../repo/order';
|
|
6
|
-
import type { OwnershipInfoRepo } from '../../repo/ownershipInfo';
|
|
7
5
|
import type { ReservationRepo } from '../../repo/reservation';
|
|
8
|
-
import type { SettingRepo } from '../../repo/setting';
|
|
9
|
-
import type { TaskRepo } from '../../repo/task';
|
|
10
|
-
import { factory } from '../../factory';
|
|
11
6
|
/**
|
|
12
7
|
* 注文に関わるリソースを削除する
|
|
13
8
|
* 冪等性を確保すること
|
|
14
9
|
*/
|
|
15
10
|
declare function deleteOrder(params: {
|
|
16
|
-
object:
|
|
11
|
+
object: {
|
|
12
|
+
/**
|
|
13
|
+
* 注文取引ID
|
|
14
|
+
*/
|
|
15
|
+
identifier: string;
|
|
16
|
+
};
|
|
17
17
|
}): (repos: {
|
|
18
18
|
acceptedOffer: AcceptedOfferRepo;
|
|
19
19
|
accountingReport: AccountingReportRepo;
|
|
20
|
-
event: EventRepo;
|
|
21
20
|
note: NoteRepo;
|
|
22
21
|
order: OrderRepo;
|
|
23
|
-
ownershipInfo: OwnershipInfoRepo;
|
|
24
22
|
reservation: ReservationRepo;
|
|
25
|
-
setting: SettingRepo;
|
|
26
|
-
task: TaskRepo;
|
|
27
23
|
}) => Promise<void>;
|
|
28
24
|
export { deleteOrder };
|
|
@@ -9,23 +9,26 @@ const factory_1 = require("../../factory");
|
|
|
9
9
|
*/
|
|
10
10
|
function deleteOrder(params) {
|
|
11
11
|
return async (repos) => {
|
|
12
|
+
if (typeof params.object.identifier !== 'string' || params.object.identifier === '') {
|
|
13
|
+
throw new factory_1.factory.errors.ArgumentNull('object.identifier');
|
|
14
|
+
}
|
|
12
15
|
const orders = await repos.order.projectFields({
|
|
13
16
|
limit: 1,
|
|
14
17
|
page: 1,
|
|
15
|
-
orderNumbers: [params.object.orderNumber]
|
|
16
|
-
|
|
18
|
+
// orderNumbers: [params.object.orderNumber],
|
|
19
|
+
identifier: { $eq: params.object.identifier }
|
|
20
|
+
}, { inclusion: ['project', 'orderNumber'] });
|
|
17
21
|
const order = orders.shift();
|
|
18
22
|
if (order === undefined) {
|
|
19
23
|
// すでに削除済
|
|
20
24
|
return;
|
|
21
25
|
}
|
|
22
26
|
if (typeof order.id !== 'string') {
|
|
23
|
-
throw new factory_1.factory.errors.Internal(`order.id undefined. orderNumber: ${
|
|
27
|
+
throw new factory_1.factory.errors.Internal(`order.id undefined. orderNumber: ${order.orderNumber}`);
|
|
24
28
|
}
|
|
25
29
|
// 注文アイテムの予約を削除
|
|
26
30
|
await deleteReservationsByOrder(order)(repos);
|
|
27
31
|
// 所有権は所有期限でcleanされるので、注文削除時連動はひとまず廃止(2026-05-17~)
|
|
28
|
-
// // 所有権削除
|
|
29
32
|
// try {
|
|
30
33
|
// await deleteOwnershipInfosByOrder(order)(repos);
|
|
31
34
|
// } catch (error) {
|
|
@@ -42,50 +45,6 @@ function deleteOrder(params) {
|
|
|
42
45
|
});
|
|
43
46
|
// 注文削除
|
|
44
47
|
await repos.order.deleteByOrderNumber({ orderNumber: order.orderNumber });
|
|
45
|
-
// deletePerson(2024-12-25~)
|
|
46
|
-
await deletePersonIfNecessary(order)(repos);
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
function deletePersonIfNecessary(order) {
|
|
50
|
-
return async (repos) => {
|
|
51
|
-
// 代理注文を除く
|
|
52
|
-
const isCustomerPerson = order.customer.typeOf === factory_1.factory.personType.Person
|
|
53
|
-
&& typeof order.broker?.typeOf !== 'string';
|
|
54
|
-
if (isCustomerPerson) {
|
|
55
|
-
const ordersByPerson = await repos.order.projectFields({
|
|
56
|
-
limit: 1,
|
|
57
|
-
page: 1,
|
|
58
|
-
customer: { ids: [order.customer.id] }
|
|
59
|
-
}, { inclusion: ['orderNumber'] });
|
|
60
|
-
if (ordersByPerson.length === 0) {
|
|
61
|
-
const setting = await repos.setting.findOne({ project: { id: { $eq: '*' } } }, ['userPoolIdNew']);
|
|
62
|
-
if (typeof setting?.userPoolIdNew !== 'string') {
|
|
63
|
-
throw new factory_1.factory.errors.NotFound('setting.userPoolIdNew');
|
|
64
|
-
}
|
|
65
|
-
const deletePersonTask = {
|
|
66
|
-
project: { typeOf: factory_1.factory.organizationType.Project, id: order.project.id },
|
|
67
|
-
name: factory_1.factory.taskName.DeletePerson,
|
|
68
|
-
status: factory_1.factory.taskStatus.Ready,
|
|
69
|
-
runsAt: new Date(),
|
|
70
|
-
remainingNumberOfTries: 10,
|
|
71
|
-
numberOfTried: 0,
|
|
72
|
-
executionResults: [],
|
|
73
|
-
data: {
|
|
74
|
-
id: order.customer.id,
|
|
75
|
-
agent: {
|
|
76
|
-
id: order.project.id,
|
|
77
|
-
typeOf: factory_1.factory.organizationType.Project,
|
|
78
|
-
name: factory_1.factory.organizationType.Project
|
|
79
|
-
},
|
|
80
|
-
physically: true,
|
|
81
|
-
userPoolId: setting.userPoolIdNew,
|
|
82
|
-
// migrate: false,
|
|
83
|
-
executeBackground: true
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
await repos.task.saveMany([deletePersonTask], { emitImmediately: true });
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
48
|
};
|
|
90
49
|
}
|
|
91
50
|
function deleteReservationsByOrder(order) {
|
|
@@ -93,7 +52,7 @@ function deleteReservationsByOrder(order) {
|
|
|
93
52
|
const acceptedOffers = await repos.acceptedOffer.searchAcceptedOffersByOrderNumber({
|
|
94
53
|
orderNumber: { $eq: order.orderNumber },
|
|
95
54
|
project: { id: { $eq: order.project.id } },
|
|
96
|
-
}
|
|
55
|
+
});
|
|
97
56
|
const reservationIds = acceptedOffers.map((o) => String(o.itemOffered.id));
|
|
98
57
|
if (reservationIds.length > 0) {
|
|
99
58
|
await repos.reservation.deleteByIds({ project: { id: order.project.id }, ids: reservationIds });
|
|
@@ -7,5 +7,5 @@ import { factory } from '../../../../factory';
|
|
|
7
7
|
*/
|
|
8
8
|
declare function createOnOrderCancelledTasksByTransaction(params: {
|
|
9
9
|
transaction: Pick<factory.transaction.placeOrder.ITransaction, 'id' | 'project' | 'typeOf'>;
|
|
10
|
-
}): (import("@chevre/factory/lib/chevre/task").ITaskAttributes | import("@chevre/factory/lib/chevre/task/confirmPayTransaction").IAttributes | import("@chevre/factory/lib/chevre/task/confirmReserveTransaction").IAttributes | import("@chevre/factory/lib/chevre/task/createAccountingReport").IAttributes | import("@chevre/factory/lib/chevre/task/
|
|
10
|
+
}): (import("@chevre/factory/lib/chevre/task").ITaskAttributes | import("@chevre/factory/lib/chevre/task/confirmPayTransaction").IAttributes | import("@chevre/factory/lib/chevre/task/confirmReserveTransaction").IAttributes | import("@chevre/factory/lib/chevre/task/createAccountingReport").IAttributes | import("@chevre/factory/lib/chevre/task/deleteTransaction").IAttributes | import("@chevre/factory/lib/chevre/task/onAssetTransactionStatusChanged").IAttributes | import("@chevre/factory/lib/chevre/task/onAuthorizationCreated").IAttributes | import("@chevre/factory/lib/chevre/task/onEventChanged").IAttributes | import("@chevre/factory/lib/chevre/task/onResourceDeleted").IAttributes | import("@chevre/factory/lib/chevre/task/onResourceUpdated").IAttributes | import("@chevre/factory/lib/chevre/task/onOrderPaymentCompleted").IAttributes | import("@chevre/factory/lib/chevre/task/placeOrder").IAttributes | import("@chevre/factory/lib/chevre/task/returnOrder").IAttributes | import("@chevre/factory/lib/chevre/task/returnPayTransaction").IAttributes | import("@chevre/factory/lib/chevre/task/returnReserveTransaction").IAttributes | import("@chevre/factory/lib/chevre/task/sendEmailMessage").IAttributes | import("@chevre/factory/lib/chevre/task/sendOrder").IAttributes | import("@chevre/factory/lib/chevre/task/triggerWebhook").IAttributes | import("@chevre/factory/lib/chevre/task/useReservation").IAttributes | import("@chevre/factory/lib/chevre/task/voidPayTransaction").IAttributes | import("@chevre/factory/lib/chevre/task/voidReserveTransaction").IAttributes)[];
|
|
11
11
|
export { createOnOrderCancelledTasksByTransaction };
|
package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.d.ts
CHANGED
|
@@ -18,5 +18,5 @@ declare function createInformTasks(params: {
|
|
|
18
18
|
}, setting: Pick<ISetting, 'onOrderStatusChanged'> | null): factory.task.IAttributes<factory.taskName.TriggerWebhook>[];
|
|
19
19
|
declare function createNextSendOrderTasks(params: {
|
|
20
20
|
order: IInTransitOrder;
|
|
21
|
-
}): (import("@chevre/factory/lib/chevre/task").ITaskAttributes | import("@chevre/factory/lib/chevre/task/confirmPayTransaction").IAttributes | import("@chevre/factory/lib/chevre/task/confirmReserveTransaction").IAttributes | import("@chevre/factory/lib/chevre/task/createAccountingReport").IAttributes | import("@chevre/factory/lib/chevre/task/
|
|
21
|
+
}): (import("@chevre/factory/lib/chevre/task").ITaskAttributes | import("@chevre/factory/lib/chevre/task/confirmPayTransaction").IAttributes | import("@chevre/factory/lib/chevre/task/confirmReserveTransaction").IAttributes | import("@chevre/factory/lib/chevre/task/createAccountingReport").IAttributes | import("@chevre/factory/lib/chevre/task/deleteTransaction").IAttributes | import("@chevre/factory/lib/chevre/task/onAssetTransactionStatusChanged").IAttributes | import("@chevre/factory/lib/chevre/task/onAuthorizationCreated").IAttributes | import("@chevre/factory/lib/chevre/task/onEventChanged").IAttributes | import("@chevre/factory/lib/chevre/task/onResourceDeleted").IAttributes | import("@chevre/factory/lib/chevre/task/onResourceUpdated").IAttributes | import("@chevre/factory/lib/chevre/task/onOrderPaymentCompleted").IAttributes | import("@chevre/factory/lib/chevre/task/placeOrder").IAttributes | import("@chevre/factory/lib/chevre/task/returnOrder").IAttributes | import("@chevre/factory/lib/chevre/task/returnPayTransaction").IAttributes | import("@chevre/factory/lib/chevre/task/returnReserveTransaction").IAttributes | import("@chevre/factory/lib/chevre/task/sendEmailMessage").IAttributes | import("@chevre/factory/lib/chevre/task/sendOrder").IAttributes | import("@chevre/factory/lib/chevre/task/triggerWebhook").IAttributes | import("@chevre/factory/lib/chevre/task/useReservation").IAttributes | import("@chevre/factory/lib/chevre/task/voidPayTransaction").IAttributes | import("@chevre/factory/lib/chevre/task/voidReserveTransaction").IAttributes)[];
|
|
22
22
|
export { createInformTasks, createNextSendOrderTasks, IInTransitOrder };
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 注文決済時処理
|
|
3
|
+
*/
|
|
1
4
|
import type { TaskRepo } from '../../../repo/task';
|
|
2
5
|
import { factory } from '../../../factory';
|
|
3
6
|
declare function onOrderPaymentDue(params: {
|
|
4
|
-
order: Pick<factory.order.IOrder, 'paymentMethods' | 'project' | 'orderNumber' | 'confirmationNumber' | 'orderDate' | '
|
|
7
|
+
order: Pick<factory.order.IOrder, 'paymentMethods' | 'project' | 'orderNumber' | 'confirmationNumber' | 'orderDate' | 'typeOf'> & {
|
|
5
8
|
orderStatus: factory.orderStatus.OrderPaymentDue;
|
|
6
9
|
};
|
|
7
10
|
}): (repos: {
|