@chevre/domain 21.0.0-alpha.1 → 21.0.0-alpha.11
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/errorHandler.d.ts +1 -0
- package/lib/chevre/errorHandler.js +6 -2
- package/lib/chevre/factory/event.d.ts +1 -1
- package/lib/chevre/index.d.ts +1 -2
- package/lib/chevre/index.js +1 -3
- package/lib/chevre/repo/account.d.ts +0 -2
- package/lib/chevre/repo/account.js +10 -6
- package/lib/chevre/repo/accountTitle.js +6 -2
- package/lib/chevre/repo/accountTransaction.d.ts +0 -2
- package/lib/chevre/repo/accountTransaction.js +9 -6
- package/lib/chevre/repo/accountingReport.d.ts +1 -1
- package/lib/chevre/repo/accountingReport.js +7 -3
- package/lib/chevre/repo/action/registerServiceInProgress.js +1 -1
- package/lib/chevre/repo/action.d.ts +3 -4
- package/lib/chevre/repo/action.js +9 -6
- package/lib/chevre/repo/additionalProperty.js +8 -4
- package/lib/chevre/repo/aggregation.js +6 -2
- package/lib/chevre/repo/assetTransaction.d.ts +1 -2
- package/lib/chevre/repo/assetTransaction.js +9 -6
- package/lib/chevre/repo/categoryCode.js +8 -4
- package/lib/chevre/repo/code.d.ts +3 -3
- package/lib/chevre/repo/code.js +10 -5
- package/lib/chevre/repo/comment.js +8 -4
- package/lib/chevre/repo/confirmationNumber.js +1 -1
- package/lib/chevre/repo/creativeWork.d.ts +0 -2
- package/lib/chevre/repo/creativeWork.js +9 -6
- package/lib/chevre/repo/customer.js +8 -4
- package/lib/chevre/repo/emailMessage.d.ts +1 -1
- package/lib/chevre/repo/emailMessage.js +8 -4
- package/lib/chevre/repo/event.d.ts +1 -1
- package/lib/chevre/repo/event.js +8 -4
- package/lib/chevre/repo/itemAvailability/screeningEvent.js +1 -1
- package/lib/chevre/repo/member.js +16 -9
- package/lib/chevre/repo/merchantReturnPolicy.d.ts +0 -2
- package/lib/chevre/repo/merchantReturnPolicy.js +9 -6
- package/lib/chevre/repo/mongoose/onIndexCreated.d.ts +2 -0
- package/lib/chevre/repo/mongoose/onIndexCreated.js +11 -0
- package/lib/chevre/repo/mongoose/schemas/account.d.ts +54 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/account.js +4 -14
- package/lib/chevre/repo/mongoose/schemas/accountTitle.d.ts +64 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/accountTitle.js +10 -35
- package/lib/chevre/repo/mongoose/schemas/accountTransaction.d.ts +67 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/accountTransaction.js +9 -19
- package/lib/chevre/repo/mongoose/schemas/accountingReport.d.ts +58 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/accountingReport.js +7 -17
- package/lib/chevre/repo/mongoose/schemas/action.d.ts +73 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/action.js +17 -27
- package/lib/chevre/repo/mongoose/schemas/additionalProperty.d.ts +60 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/additionalProperty.js +7 -17
- package/lib/chevre/repo/mongoose/schemas/aggregation.d.ts +54 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/aggregation.js +4 -14
- package/lib/chevre/repo/mongoose/schemas/assetTransaction.d.ts +72 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/assetTransaction.js +13 -23
- package/lib/chevre/repo/mongoose/schemas/authorization.d.ts +61 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/authorization.js +6 -16
- package/lib/chevre/repo/mongoose/schemas/categoryCode.d.ts +64 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/categoryCode.js +9 -19
- package/lib/chevre/repo/mongoose/schemas/comments.d.ts +65 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/comments.js +9 -19
- package/lib/chevre/repo/mongoose/schemas/creativeWork.d.ts +73 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/creativeWork.js +10 -20
- package/lib/chevre/repo/mongoose/schemas/customer.d.ts +64 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/customer.js +8 -18
- package/lib/chevre/repo/mongoose/schemas/emailMessages.d.ts +62 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/emailMessages.js +8 -18
- package/lib/chevre/repo/mongoose/{model → schemas}/event.d.ts +26 -2
- package/lib/chevre/repo/mongoose/{model → schemas}/event.js +24 -34
- package/lib/chevre/repo/mongoose/schemas/member.d.ts +58 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/member.js +6 -16
- package/lib/chevre/repo/mongoose/schemas/merchantReturnPolicy.d.ts +62 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/merchantReturnPolicy.js +7 -17
- package/lib/chevre/repo/mongoose/schemas/offer.d.ts +83 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/offer.js +28 -38
- package/lib/chevre/repo/mongoose/schemas/offerCatalog.d.ts +64 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/offerCatalog.js +11 -21
- package/lib/chevre/repo/mongoose/schemas/order.d.ts +77 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/order.js +15 -25
- package/lib/chevre/repo/mongoose/schemas/ownershipInfo.d.ts +64 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/ownershipInfo.js +9 -19
- package/lib/chevre/repo/mongoose/schemas/place.d.ts +76 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/place.js +17 -27
- package/lib/chevre/repo/mongoose/schemas/priceSpecification.d.ts +66 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/priceSpecification.js +9 -19
- package/lib/chevre/repo/mongoose/schemas/product.d.ts +67 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/product.js +14 -24
- package/lib/chevre/repo/mongoose/schemas/project.d.ts +63 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/project.js +7 -17
- package/lib/chevre/repo/mongoose/{model → schemas}/reservation.d.ts +26 -2
- package/lib/chevre/repo/mongoose/{model → schemas}/reservation.js +15 -25
- package/lib/chevre/repo/mongoose/schemas/role.d.ts +57 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/role.js +4 -14
- package/lib/chevre/repo/mongoose/schemas/seller.d.ts +67 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/seller.js +12 -22
- package/lib/chevre/repo/mongoose/schemas/serviceOutput.d.ts +57 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/serviceOutput.js +5 -15
- package/lib/chevre/repo/mongoose/schemas/task.d.ts +65 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/task.js +7 -17
- package/lib/chevre/repo/mongoose/schemas/telemetry.d.ts +62 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/telemetry.js +9 -19
- package/lib/chevre/repo/mongoose/schemas/transaction.d.ts +70 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/transaction.js +12 -22
- package/lib/chevre/repo/mongoose/schemas/trip.d.ts +57 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/trip.js +5 -15
- package/lib/chevre/repo/mongoose/writeConcern.d.ts +3 -0
- package/lib/chevre/repo/mongoose/writeConcern.js +5 -0
- package/lib/chevre/repo/offer.js +11 -6
- package/lib/chevre/repo/offerCatalog.js +8 -4
- package/lib/chevre/repo/order.d.ts +0 -2
- package/lib/chevre/repo/order.js +12 -9
- package/lib/chevre/repo/orderNumber.js +1 -1
- package/lib/chevre/repo/ownershipInfo.d.ts +1 -3
- package/lib/chevre/repo/ownershipInfo.js +10 -7
- package/lib/chevre/repo/paymentMethod/creditCard.d.ts +3 -3
- package/lib/chevre/repo/permit.js +6 -2
- package/lib/chevre/repo/person.d.ts +2 -2
- package/lib/chevre/repo/place.d.ts +2 -2
- package/lib/chevre/repo/place.js +16 -12
- package/lib/chevre/repo/priceSpecification.js +8 -4
- package/lib/chevre/repo/product.d.ts +1 -1
- package/lib/chevre/repo/product.js +8 -4
- package/lib/chevre/repo/project.js +7 -3
- package/lib/chevre/repo/rateLimit/offer.js +1 -1
- package/lib/chevre/repo/reservation.d.ts +1 -1
- package/lib/chevre/repo/reservation.js +8 -21
- package/lib/chevre/repo/role.js +8 -4
- package/lib/chevre/repo/seller.d.ts +1 -1
- package/lib/chevre/repo/seller.js +8 -4
- package/lib/chevre/repo/serviceOutput.js +8 -4
- package/lib/chevre/repo/serviceOutputIdentifier.js +1 -1
- package/lib/chevre/repo/task.js +8 -4
- package/lib/chevre/repo/telemetry.js +6 -2
- package/lib/chevre/repo/transaction.d.ts +1 -2
- package/lib/chevre/repo/transaction.js +9 -6
- package/lib/chevre/repo/transactionNumber.js +1 -1
- package/lib/chevre/repo/trip.d.ts +1 -1
- package/lib/chevre/repo/trip.js +8 -4
- package/lib/chevre/service/account.d.ts +1 -1
- package/lib/chevre/service/accountTransaction/deposit.d.ts +1 -1
- package/lib/chevre/service/accountTransaction/deposit.js +0 -5
- package/lib/chevre/service/accountTransaction/transfer.d.ts +1 -1
- package/lib/chevre/service/accountTransaction/transfer.js +0 -5
- package/lib/chevre/service/accountTransaction/withdraw.d.ts +1 -1
- package/lib/chevre/service/accountTransaction/withdraw.js +0 -5
- package/lib/chevre/service/accountTransaction.d.ts +1 -1
- package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.d.ts +1 -1
- package/lib/chevre/service/aggregation/event/aggregateUseActionsOnEvent.d.ts +1 -1
- package/lib/chevre/service/aggregation/project.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/cancelReservation.d.ts +3 -3
- package/lib/chevre/service/assetTransaction/moneyTransfer.d.ts +4 -4
- package/lib/chevre/service/assetTransaction/moneyTransfer.js +0 -5
- package/lib/chevre/service/assetTransaction/pay/potentialActions.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/pay.d.ts +7 -7
- package/lib/chevre/service/assetTransaction/refund.d.ts +4 -4
- package/lib/chevre/service/assetTransaction/refund.js +0 -5
- package/lib/chevre/service/assetTransaction/registerService/factory.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/registerService.d.ts +4 -4
- package/lib/chevre/service/assetTransaction/registerService.js +0 -5
- package/lib/chevre/service/assetTransaction/reserve/factory/price.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/reserve/factory.d.ts +2 -2
- package/lib/chevre/service/assetTransaction/reserve.d.ts +6 -6
- package/lib/chevre/service/assetTransaction/reserve.js +0 -10
- package/lib/chevre/service/code.d.ts +2 -2
- package/lib/chevre/service/code.js +6 -1
- package/lib/chevre/service/delivery/factory.d.ts +1 -1
- package/lib/chevre/service/delivery/product/factory.d.ts +1 -1
- package/lib/chevre/service/delivery/reservation/factory.d.ts +1 -1
- package/lib/chevre/service/iam.d.ts +1 -1
- package/lib/chevre/service/moneyTransfer.d.ts +1 -1
- package/lib/chevre/service/notification.d.ts +1 -1
- package/lib/chevre/service/offer/event/authorize.d.ts +2 -2
- package/lib/chevre/service/offer/event/factory.d.ts +5 -5
- package/lib/chevre/service/offer/event/searchEventTicketOffers.d.ts +2 -2
- package/lib/chevre/service/offer/eventServiceByCOA/factory.d.ts +2 -2
- package/lib/chevre/service/offer/eventServiceByCOA/validateAcceptedOffers.d.ts +1 -1
- package/lib/chevre/service/offer/eventServiceByCOA.d.ts +2 -2
- package/lib/chevre/service/offer/factory.d.ts +2 -2
- package/lib/chevre/service/offer/moneyTransfer/authorize.d.ts +1 -1
- package/lib/chevre/service/offer/product.d.ts +2 -2
- package/lib/chevre/service/order/onOrderStatusChanged/factory.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/factory.js +6 -1
- package/lib/chevre/service/order/onOrderStatusChanged.d.ts +2 -2
- package/lib/chevre/service/order/placeOrder.d.ts +1 -1
- package/lib/chevre/service/order/sendOrder.d.ts +1 -1
- package/lib/chevre/service/payment/any/factory.d.ts +1 -1
- package/lib/chevre/service/payment/any/onPaymentStatusChanged/onPaid.d.ts +1 -1
- package/lib/chevre/service/payment/any/onPaymentStatusChanged/onRefunded.d.ts +1 -1
- package/lib/chevre/service/payment/any.d.ts +3 -3
- package/lib/chevre/service/payment/creditCard.js +5 -0
- package/lib/chevre/service/payment/movieTicket.d.ts +4 -4
- package/lib/chevre/service/payment/paymentCard.d.ts +1 -1
- package/lib/chevre/service/permit.d.ts +1 -1
- package/lib/chevre/service/report/ownershipInfo.js +4 -0
- package/lib/chevre/service/report/telemetry.d.ts +7 -7
- package/lib/chevre/service/reserve/cancelReservation.d.ts +1 -1
- package/lib/chevre/service/reserve/factory.d.ts +5 -5
- package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.d.ts +1 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.d.ts +1 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationUsed.d.ts +2 -2
- package/lib/chevre/service/task/aggregateScreeningEvent.d.ts +1 -1
- package/lib/chevre/service/task/aggregateUseActionsOnEvent.d.ts +1 -1
- package/lib/chevre/service/task/cancelMoneyTransfer.d.ts +1 -1
- package/lib/chevre/service/task/cancelPendingReservation.d.ts +1 -1
- package/lib/chevre/service/task/cancelReservation.d.ts +1 -1
- package/lib/chevre/service/task/importEventCapacitiesFromCOA.d.ts +1 -1
- package/lib/chevre/service/task/importEventsFromCOA.d.ts +1 -1
- package/lib/chevre/service/task/importOffersFromCOA.d.ts +1 -1
- package/lib/chevre/service/task/moneyTransfer.d.ts +1 -1
- package/lib/chevre/service/task/registerService.d.ts +1 -1
- package/lib/chevre/service/task/reserve.d.ts +1 -1
- package/lib/chevre/service/task.d.ts +2 -2
- package/lib/chevre/service/task.js +1 -1
- package/lib/chevre/service/transaction/moneyTransfer/potentialActions.d.ts +1 -1
- package/lib/chevre/service/transaction/moneyTransfer.d.ts +6 -6
- package/lib/chevre/service/transaction/moneyTransfer.js +0 -5
- package/lib/chevre/service/transaction/orderProgramMembership.d.ts +1 -1
- package/lib/chevre/service/transaction/placeOrder/exportTasks/factory.d.ts +1 -1
- package/lib/chevre/service/transaction/placeOrder.d.ts +1 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/moneyTransfer.d.ts +1 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/result/acceptedOffers.d.ts +2 -2
- package/lib/chevre/service/transaction/placeOrderInProgress/result.d.ts +1 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/validation.d.ts +8 -8
- package/lib/chevre/service/transaction/placeOrderInProgress.d.ts +7 -7
- package/lib/chevre/service/transaction/placeOrderInProgress.js +2 -2
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnMoneyTransfer.d.ts +1 -1
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPointAward.d.ts +1 -1
- package/lib/chevre/service/transaction/returnOrder/potentialActions.d.ts +1 -1
- package/lib/chevre/service/transaction/returnOrder.d.ts +2 -2
- package/lib/chevre/service/transaction/returnOrder.js +1 -1
- package/lib/chevre/service/transaction/validation.d.ts +2 -2
- package/lib/chevre/service/transaction.d.ts +2 -2
- package/lib/chevre/settings.d.ts +1 -1
- package/package.json +11 -11
- package/lib/chevre/repo/mongoose/model/account.d.ts +0 -30
- package/lib/chevre/repo/mongoose/model/accountTitle.d.ts +0 -40
- package/lib/chevre/repo/mongoose/model/accountTransaction.d.ts +0 -43
- package/lib/chevre/repo/mongoose/model/accountingReport.d.ts +0 -34
- package/lib/chevre/repo/mongoose/model/action.d.ts +0 -49
- package/lib/chevre/repo/mongoose/model/additionalProperty.d.ts +0 -36
- package/lib/chevre/repo/mongoose/model/aggregation.d.ts +0 -30
- package/lib/chevre/repo/mongoose/model/assetTransaction.d.ts +0 -48
- package/lib/chevre/repo/mongoose/model/authorization.d.ts +0 -37
- package/lib/chevre/repo/mongoose/model/categoryCode.d.ts +0 -40
- package/lib/chevre/repo/mongoose/model/comments.d.ts +0 -41
- package/lib/chevre/repo/mongoose/model/creativeWork.d.ts +0 -49
- package/lib/chevre/repo/mongoose/model/customer.d.ts +0 -40
- package/lib/chevre/repo/mongoose/model/emailMessages.d.ts +0 -38
- package/lib/chevre/repo/mongoose/model/member.d.ts +0 -34
- package/lib/chevre/repo/mongoose/model/merchantReturnPolicy.d.ts +0 -38
- package/lib/chevre/repo/mongoose/model/offer.d.ts +0 -59
- package/lib/chevre/repo/mongoose/model/offerCatalog.d.ts +0 -40
- package/lib/chevre/repo/mongoose/model/order.d.ts +0 -53
- package/lib/chevre/repo/mongoose/model/ownershipInfo.d.ts +0 -40
- package/lib/chevre/repo/mongoose/model/place.d.ts +0 -52
- package/lib/chevre/repo/mongoose/model/priceSpecification.d.ts +0 -42
- package/lib/chevre/repo/mongoose/model/product.d.ts +0 -43
- package/lib/chevre/repo/mongoose/model/project.d.ts +0 -39
- package/lib/chevre/repo/mongoose/model/role.d.ts +0 -33
- package/lib/chevre/repo/mongoose/model/seller.d.ts +0 -43
- package/lib/chevre/repo/mongoose/model/serviceOutput.d.ts +0 -33
- package/lib/chevre/repo/mongoose/model/task.d.ts +0 -41
- package/lib/chevre/repo/mongoose/model/telemetry.d.ts +0 -38
- package/lib/chevre/repo/mongoose/model/transaction.d.ts +0 -46
- package/lib/chevre/repo/mongoose/model/trip.d.ts +0 -33
|
@@ -64,7 +64,12 @@ function getOrderWithToken(params) {
|
|
|
64
64
|
reject(err);
|
|
65
65
|
}
|
|
66
66
|
else {
|
|
67
|
-
|
|
67
|
+
if (typeof encoded !== 'string') {
|
|
68
|
+
reject(new factory.errors.ServiceUnavailable('order cannot be signed unexpectedly'));
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
resolve(encoded);
|
|
72
|
+
}
|
|
68
73
|
}
|
|
69
74
|
});
|
|
70
75
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RedisRepository as RegisterServiceInProgressRepo } from '../../repo/action/registerServiceInProgress';
|
|
2
2
|
import { MongoRepository as TaskRepo } from '../../repo/task';
|
|
3
3
|
import * as factory from '../../factory';
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
type IPlaceOrderTransaction = factory.transaction.ITransaction<factory.transactionType.PlaceOrder>;
|
|
5
|
+
type IReturnOrderTransaction = factory.transaction.ITransaction<factory.transactionType.ReturnOrder>;
|
|
6
6
|
export declare function onOrderStatusChanged(params: {
|
|
7
7
|
order: factory.order.IOrder;
|
|
8
8
|
placeOrderTransaction?: IPlaceOrderTransaction;
|
|
@@ -5,7 +5,7 @@ import { MongoRepository as OrderRepo } from '../../repo/order';
|
|
|
5
5
|
import { MongoRepository as TaskRepo } from '../../repo/task';
|
|
6
6
|
import { MongoRepository as TransactionRepo } from '../../repo/transaction';
|
|
7
7
|
import * as factory from '../../factory';
|
|
8
|
-
|
|
8
|
+
type IExternalOrder = Pick<factory.order.IOrder, 'project' | 'typeOf' | 'seller' | 'customer' | 'confirmationNumber' | 'orderNumber' | 'price' | 'priceCurrency' | 'orderDate' | 'name' | 'orderStatus' | 'orderedItem' | 'paymentMethods'>;
|
|
9
9
|
/**
|
|
10
10
|
* 注文取引なしに注文を作成する
|
|
11
11
|
*/
|
|
@@ -5,7 +5,7 @@ import { MongoRepository as OwnershipInfoRepo } from '../../repo/ownershipInfo';
|
|
|
5
5
|
import { MongoRepository as TaskRepo } from '../../repo/task';
|
|
6
6
|
import { MongoRepository as TransactionRepo } from '../../repo/transaction';
|
|
7
7
|
import * as factory from '../../factory';
|
|
8
|
-
|
|
8
|
+
type ISendOperation<T> = (repos: {
|
|
9
9
|
action: ActionRepo;
|
|
10
10
|
order: OrderRepo;
|
|
11
11
|
ownershipInfo: OwnershipInfoRepo;
|
|
@@ -9,7 +9,7 @@ export interface IOnPaymentStatusChangedRefundAction {
|
|
|
9
9
|
typeOf: factory.actionType.RefundAction;
|
|
10
10
|
object: factory.invoice.IInvoice[];
|
|
11
11
|
}
|
|
12
|
-
export
|
|
12
|
+
export type IOnPaymentStatusChangedParams = IOnPaymentStatusChangedPayAction | IOnPaymentStatusChangedRefundAction;
|
|
13
13
|
export declare function creatPayTransactionStartParams(params: {
|
|
14
14
|
accountId?: string;
|
|
15
15
|
object: factory.action.authorize.paymentMethod.any.IObject;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MongoRepository as AccountingReportRepo } from '../../../../repo/accountingReport';
|
|
2
2
|
import * as factory from '../../../../factory';
|
|
3
|
-
export
|
|
3
|
+
export type IOptimizedPayAction = factory.report.accountingReport.IOptimizedPayAction;
|
|
4
4
|
export declare function onPaid(params: IOptimizedPayAction): (repos: {
|
|
5
5
|
accountingReport: AccountingReportRepo;
|
|
6
6
|
}) => Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MongoRepository as AccountingReportRepo } from '../../../../repo/accountingReport';
|
|
2
2
|
import * as factory from '../../../../factory';
|
|
3
|
-
export
|
|
3
|
+
export type IOptimizedRefundAction = factory.report.accountingReport.IOptimizedRefundAction;
|
|
4
4
|
export declare function onRefunded(params: IOptimizedRefundAction): (repos: {
|
|
5
5
|
accountingReport: AccountingReportRepo;
|
|
6
6
|
}) => Promise<void>;
|
|
@@ -16,7 +16,7 @@ import { RedisRepository as TransactionNumberRepo } from '../../repo/transaction
|
|
|
16
16
|
import * as PayTransactionService from '../assetTransaction/pay';
|
|
17
17
|
import { onPaymentStatusChanged } from './any/onPaymentStatusChanged';
|
|
18
18
|
import { person2username } from './any/person2username';
|
|
19
|
-
|
|
19
|
+
type IAuthorizePaymentAction = factory.action.authorize.paymentMethod.any.IAction;
|
|
20
20
|
/**
|
|
21
21
|
* 決済承認中止
|
|
22
22
|
* タスクから決済承認を取り消す
|
|
@@ -68,7 +68,7 @@ interface IAuthorizeRepos {
|
|
|
68
68
|
transaction: TransactionRepo;
|
|
69
69
|
transactionNumber: TransactionNumberRepo;
|
|
70
70
|
}
|
|
71
|
-
|
|
71
|
+
type IAuthorizeOperation<T> = (repos: IAuthorizeRepos) => Promise<T>;
|
|
72
72
|
interface IPublishPaymentUrlRepos {
|
|
73
73
|
assetTransaction: AssetTransactionRepo;
|
|
74
74
|
person: PersonRepo;
|
|
@@ -78,7 +78,7 @@ interface IPublishPaymentUrlRepos {
|
|
|
78
78
|
transaction: TransactionRepo;
|
|
79
79
|
transactionNumber: TransactionNumberRepo;
|
|
80
80
|
}
|
|
81
|
-
|
|
81
|
+
type IPublishPaymentUrlOperation<T> = (repos: IPublishPaymentUrlRepos) => Promise<T>;
|
|
82
82
|
/**
|
|
83
83
|
* 外部決済ロケーションを発行する
|
|
84
84
|
*/
|
|
@@ -15,6 +15,7 @@ exports.voidTransaction = exports.searchGMOTrade = exports.refundCreditCard = ex
|
|
|
15
15
|
*/
|
|
16
16
|
const GMO = require("@motionpicture/gmo-service");
|
|
17
17
|
const createDebug = require("debug");
|
|
18
|
+
const http_status_1 = require("http-status");
|
|
18
19
|
const credentials_1 = require("../../credentials");
|
|
19
20
|
const factory = require("../../factory");
|
|
20
21
|
const onPaid_1 = require("./any/onPaid");
|
|
@@ -181,6 +182,10 @@ function handleAuthorizeError(error) {
|
|
|
181
182
|
// const uri: string | undefined = error.requestOptions?.uri;
|
|
182
183
|
handledError = new factory.errors.GatewayTimeout(`Gateway Timeout. name:${error.name} type:${error.type} message:${error.message}`);
|
|
183
184
|
}
|
|
185
|
+
// 決済代行側が4xxを返却した場合
|
|
186
|
+
if (typeof error.code === 'number' && error.code < http_status_1.INTERNAL_SERVER_ERROR) {
|
|
187
|
+
handledError = new factory.errors.Argument('payment', `bad request code:${error.code} message:${error.message}`);
|
|
188
|
+
}
|
|
184
189
|
return handledError;
|
|
185
190
|
}
|
|
186
191
|
/**
|
|
@@ -14,7 +14,7 @@ interface ICheckOperationRepos {
|
|
|
14
14
|
project: ProjectRepo;
|
|
15
15
|
seller: SellerRepo;
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
type ICheckOperation<T> = (repos: ICheckOperationRepos) => Promise<T>;
|
|
18
18
|
interface IPayOperationRepos {
|
|
19
19
|
action: ActionRepo;
|
|
20
20
|
accountingReport: AccountingReportRepo;
|
|
@@ -24,7 +24,7 @@ interface IPayOperationRepos {
|
|
|
24
24
|
seller: SellerRepo;
|
|
25
25
|
task: TaskRepo;
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
type IPayOperation<T> = (repos: IPayOperationRepos) => Promise<T>;
|
|
28
28
|
interface IRefundOperationRepos {
|
|
29
29
|
action: ActionRepo;
|
|
30
30
|
accountingReport: AccountingReportRepo;
|
|
@@ -33,7 +33,7 @@ interface IRefundOperationRepos {
|
|
|
33
33
|
seller: SellerRepo;
|
|
34
34
|
task: TaskRepo;
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
type IRefundOperation<T> = (repos: IRefundOperationRepos) => Promise<T>;
|
|
37
37
|
/**
|
|
38
38
|
* MovieTicket認証
|
|
39
39
|
*/
|
|
@@ -66,7 +66,7 @@ declare function voidTransaction(params: factory.task.voidPayment.IData): (repos
|
|
|
66
66
|
seller: SellerRepo;
|
|
67
67
|
task: TaskRepo;
|
|
68
68
|
}) => Promise<void>;
|
|
69
|
-
|
|
69
|
+
type IPayAction = factory.action.trade.pay.IAction;
|
|
70
70
|
/**
|
|
71
71
|
* MovieTicket着券
|
|
72
72
|
*/
|
|
@@ -6,7 +6,7 @@ import { MongoRepository as ProductRepo } from '../../repo/product';
|
|
|
6
6
|
import { MongoRepository as ProjectRepo } from '../../repo/project';
|
|
7
7
|
import { MongoRepository as TaskRepo } from '../../repo/task';
|
|
8
8
|
import { RedisRepository as TransactionNumberRepo } from '../../repo/transactionNumber';
|
|
9
|
-
|
|
9
|
+
type IPendingTransaction = Pick<factory.account.transaction.withdraw.ITransaction, 'id' | 'transactionNumber' | 'typeOf'>;
|
|
10
10
|
declare function authorize(params: factory.assetTransaction.pay.IStartParamsWithoutDetail, paymentServiceId: string): (repos: {
|
|
11
11
|
product: ProductRepo;
|
|
12
12
|
project: ProjectRepo;
|
|
@@ -30,7 +30,7 @@ export declare function activate(params: {
|
|
|
30
30
|
}): (repos: {
|
|
31
31
|
serviceOutput: ServiceOutputRepo;
|
|
32
32
|
}) => Promise<factory.permit.IPermit>;
|
|
33
|
-
|
|
33
|
+
type IPermitWithAccountDetail = Omit<factory.permit.IPermit, 'paymentAccount'> & {
|
|
34
34
|
paymentAccount?: factory.permit.IPaymentAccountWithDetail;
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ownershipInfo2report = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* 所有権レポートサービス
|
|
6
|
+
*/
|
|
7
|
+
// import * as json2csv from 'json2csv';
|
|
4
8
|
const moment = require("moment");
|
|
5
9
|
function ownershipInfo2report(params) {
|
|
6
10
|
var _a, _b, _c;
|
|
@@ -4,29 +4,29 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as repository from '../../repository';
|
|
6
6
|
import * as factory from '../../factory';
|
|
7
|
-
export
|
|
7
|
+
export type TelemetryOperation<T> = (repos: {
|
|
8
8
|
telemetry: repository.Telemetry;
|
|
9
9
|
}) => Promise<T>;
|
|
10
|
-
export
|
|
10
|
+
export type TaskOperation<T> = (repos: {
|
|
11
11
|
task: repository.Task;
|
|
12
12
|
}) => Promise<T>;
|
|
13
|
-
export
|
|
13
|
+
export type TransactionOperation<T> = (repos: {
|
|
14
14
|
transaction: repository.Transaction;
|
|
15
15
|
}) => Promise<T>;
|
|
16
|
-
export
|
|
16
|
+
export type TaskAndTransactionOperation<T> = (repos: {
|
|
17
17
|
task: repository.Task;
|
|
18
18
|
transaction: repository.Transaction;
|
|
19
19
|
}) => Promise<T>;
|
|
20
|
-
export
|
|
20
|
+
export type TaskAndTransactionAndActionOperation<T> = (repos: {
|
|
21
21
|
task: repository.Task;
|
|
22
22
|
transaction: repository.Transaction;
|
|
23
23
|
action: repository.Action;
|
|
24
24
|
}) => Promise<T>;
|
|
25
|
-
export
|
|
25
|
+
export type TransactionAndActionOperation<T> = (repos: {
|
|
26
26
|
transaction: repository.Transaction;
|
|
27
27
|
action: repository.Action;
|
|
28
28
|
}) => Promise<T>;
|
|
29
|
-
export
|
|
29
|
+
export type TaskAndTelemetryAndTransactionOperation<T> = (repos: {
|
|
30
30
|
task: repository.Task;
|
|
31
31
|
telemetry: repository.Telemetry;
|
|
32
32
|
transaction: repository.Transaction;
|
|
@@ -5,7 +5,7 @@ import { RedisRepository as ScreeningEventAvailabilityRepo } from '../../repo/it
|
|
|
5
5
|
import { RedisRepository as OfferRateLimitRepo } from '../../repo/rateLimit/offer';
|
|
6
6
|
import { MongoRepository as ReservationRepo } from '../../repo/reservation';
|
|
7
7
|
import { MongoRepository as TaskRepo } from '../../repo/task';
|
|
8
|
-
|
|
8
|
+
type IObjectSubReservation = factory.assetTransaction.reserve.IObjectSubReservation;
|
|
9
9
|
/**
|
|
10
10
|
* 進行中の予約をキャンセルする
|
|
11
11
|
*/
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as factory from '../../factory';
|
|
2
|
-
|
|
2
|
+
type IEventReservation = factory.reservation.IReservation<factory.reservationType.EventReservation>;
|
|
3
3
|
export declare function maskUnderName(reservation: IEventReservation): IEventReservation;
|
|
4
4
|
export interface IProject {
|
|
5
5
|
id: string;
|
|
6
6
|
typeOf: factory.organizationType.Project;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
8
|
+
export type ISubReservation = Omit<IEventReservation, 'broker' | 'project' | 'reservationFor' | 'reservationNumber' | 'reservationStatus' | 'underName'>;
|
|
9
9
|
/**
|
|
10
10
|
* 確定予約通知
|
|
11
11
|
*/
|
|
@@ -56,8 +56,8 @@ export interface IReservation4informUsed {
|
|
|
56
56
|
dateUsed?: Date;
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
export
|
|
60
|
-
export
|
|
61
|
-
export
|
|
59
|
+
export type IReservation4inform = IReservationPackage4informConfirmed | IReservation4informCanceled | IReservation4informCheckedIn | IReservation4informUsed;
|
|
60
|
+
export type IInformObject = IReservation4inform[];
|
|
61
|
+
export type InformReservationActionattributes = factory.action.interact.inform.IAttributes<IInformObject, any>;
|
|
62
62
|
export declare const NUM_TRY_INFORM_RESERVATION: number;
|
|
63
63
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as factory from '../../../factory';
|
|
2
2
|
import { MongoRepository as TaskRepo } from '../../../repo/task';
|
|
3
|
-
|
|
3
|
+
type IEventReservation = factory.reservation.IReservation<factory.reservationType.EventReservation>;
|
|
4
4
|
/**
|
|
5
5
|
* 予約取消後のアクション
|
|
6
6
|
*/
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as factory from '../../../factory';
|
|
5
5
|
import { MongoRepository as TaskRepo } from '../../../repo/task';
|
|
6
|
-
|
|
6
|
+
type IEventReservation = factory.reservation.IReservation<factory.reservationType.EventReservation>;
|
|
7
7
|
/**
|
|
8
8
|
* 予約確定後のアクション
|
|
9
9
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as factory from '../../../factory';
|
|
2
2
|
import { MongoRepository as TaskRepo } from '../../../repo/task';
|
|
3
|
-
|
|
4
|
-
export
|
|
3
|
+
type IEventReservation = factory.reservation.IReservation<factory.reservationType.EventReservation>;
|
|
4
|
+
export type IUseReservationAction = factory.action.consume.use.reservation.IAction;
|
|
5
5
|
/**
|
|
6
6
|
* 予約使用
|
|
7
7
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as factory from '../../factory';
|
|
2
2
|
import { IConnectionSettings } from '../task';
|
|
3
|
-
export
|
|
3
|
+
export type IOperation<T> = (settings: IConnectionSettings) => Promise<T>;
|
|
4
4
|
/**
|
|
5
5
|
* タスク実行関数
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as factory from '../../factory';
|
|
2
2
|
import { IConnectionSettings } from '../task';
|
|
3
|
-
export
|
|
3
|
+
export type IOperation<T> = (settings: IConnectionSettings) => Promise<T>;
|
|
4
4
|
/**
|
|
5
5
|
* タスク実行関数
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as factory from '../../factory';
|
|
2
2
|
import { IConnectionSettings } from '../task';
|
|
3
|
-
export
|
|
3
|
+
export type IOperation<T> = (settings: IConnectionSettings) => Promise<T>;
|
|
4
4
|
/**
|
|
5
5
|
* タスク実行関数
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as factory from '../../factory';
|
|
2
2
|
import { IConnectionSettings } from '../task';
|
|
3
|
-
export
|
|
3
|
+
export type IOperation<T> = (settings: IConnectionSettings) => Promise<T>;
|
|
4
4
|
/**
|
|
5
5
|
* タスク実行関数
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as factory from '../../factory';
|
|
2
2
|
import { IConnectionSettings } from '../task';
|
|
3
|
-
export
|
|
3
|
+
export type IOperation<T> = (settings: IConnectionSettings) => Promise<T>;
|
|
4
4
|
/**
|
|
5
5
|
* タスク実行関数
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as factory from '../../factory';
|
|
2
2
|
import { IConnectionSettings } from '../task';
|
|
3
|
-
export
|
|
3
|
+
export type IOperation<T> = (settings: IConnectionSettings) => Promise<T>;
|
|
4
4
|
/**
|
|
5
5
|
* タスク実行関数
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as factory from '../../factory';
|
|
2
2
|
import { IConnectionSettings } from '../task';
|
|
3
|
-
export
|
|
3
|
+
export type IOperation<T> = (settings: IConnectionSettings) => Promise<T>;
|
|
4
4
|
/**
|
|
5
5
|
* タスク実行関数
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as factory from '../../factory';
|
|
2
2
|
import { IConnectionSettings } from '../task';
|
|
3
|
-
export
|
|
3
|
+
export type IOperation<T> = (settings: IConnectionSettings) => Promise<T>;
|
|
4
4
|
/**
|
|
5
5
|
* タスク実行関数
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as factory from '../../factory';
|
|
2
2
|
import { IConnectionSettings } from '../task';
|
|
3
|
-
export
|
|
3
|
+
export type IOperation<T> = (settings: IConnectionSettings) => Promise<T>;
|
|
4
4
|
/**
|
|
5
5
|
* タスク実行関数
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as factory from '../../factory';
|
|
2
2
|
import { IConnectionSettings } from '../task';
|
|
3
|
-
export
|
|
3
|
+
export type IOperation<T> = (settings: IConnectionSettings) => Promise<T>;
|
|
4
4
|
/**
|
|
5
5
|
* タスク実行関数
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as factory from '../../factory';
|
|
2
2
|
import { IConnectionSettings } from '../task';
|
|
3
|
-
export
|
|
3
|
+
export type IOperation<T> = (settings: IConnectionSettings) => Promise<T>;
|
|
4
4
|
/**
|
|
5
5
|
* タスク実行関数
|
|
6
6
|
*/
|
|
@@ -12,10 +12,10 @@ export interface IConnectionSettings {
|
|
|
12
12
|
*/
|
|
13
13
|
redisClient?: redis.RedisClient;
|
|
14
14
|
}
|
|
15
|
-
export
|
|
15
|
+
export type TaskOperation<T> = (repos: {
|
|
16
16
|
task: TaskRepo;
|
|
17
17
|
}) => Promise<T>;
|
|
18
|
-
export
|
|
18
|
+
export type IOperation<T> = (settings: IConnectionSettings) => Promise<T>;
|
|
19
19
|
/**
|
|
20
20
|
* タスク名でタスクをひとつ実行する
|
|
21
21
|
*/
|
|
@@ -53,7 +53,7 @@ function execute(task) {
|
|
|
53
53
|
const taskRepo = new task_1.MongoRepository(settings.connection);
|
|
54
54
|
try {
|
|
55
55
|
// タスク名の関数が定義されていなければ、TypeErrorとなる
|
|
56
|
-
const { call } = yield Promise.resolve(
|
|
56
|
+
const { call } = yield Promise.resolve(`${`./task/${task.name}`}`).then(s => require(s));
|
|
57
57
|
yield call(task.data)(settings);
|
|
58
58
|
const result = {
|
|
59
59
|
executedAt: now,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as factory from '../../../factory';
|
|
2
|
-
export
|
|
2
|
+
export type IAuthorizeMoneyTransferOffer = factory.action.authorize.offer.moneyTransfer.IAction;
|
|
3
3
|
/**
|
|
4
4
|
* 取引のポストアクションを作成する
|
|
5
5
|
*/
|
|
@@ -19,17 +19,17 @@ export interface IStartOperationRepos {
|
|
|
19
19
|
transactionNumber: TransactionNumberRepo;
|
|
20
20
|
assetTransaction: AssetTransactionRepo;
|
|
21
21
|
}
|
|
22
|
-
export
|
|
23
|
-
export
|
|
22
|
+
export type IStartOperation<T> = (repos: IStartOperationRepos) => Promise<T>;
|
|
23
|
+
export type ITaskAndTransactionOperation<T> = (repos: {
|
|
24
24
|
task: TaskRepo;
|
|
25
25
|
transaction: TransactionRepo;
|
|
26
26
|
}) => Promise<T>;
|
|
27
|
-
export
|
|
27
|
+
export type IConfirmOperation<T> = (repos: {
|
|
28
28
|
action: ActionRepo;
|
|
29
29
|
transaction: TransactionRepo;
|
|
30
30
|
}) => Promise<T>;
|
|
31
|
-
export
|
|
32
|
-
export
|
|
31
|
+
export type IPassportValidator = IWaiterPassportValidator;
|
|
32
|
+
export type IStartParams = factory.transaction.moneyTransfer.IStartParamsWithoutDetail & {
|
|
33
33
|
passportValidator?: IPassportValidator;
|
|
34
34
|
};
|
|
35
35
|
/**
|
|
@@ -37,7 +37,7 @@ export declare type IStartParams = factory.transaction.moneyTransfer.IStartParam
|
|
|
37
37
|
* 通貨転送資産取引サービスを利用して転送取引を開始する
|
|
38
38
|
*/
|
|
39
39
|
export declare function start(params: IStartParams): IStartOperation<factory.transaction.moneyTransfer.ITransaction>;
|
|
40
|
-
export
|
|
40
|
+
export type IAuthorizeOperation<T> = (repos: {
|
|
41
41
|
action: ActionRepo;
|
|
42
42
|
order: OrderRepo;
|
|
43
43
|
product: ProductRepo;
|
|
@@ -48,11 +48,6 @@ function start(params) {
|
|
|
48
48
|
yield authorizePaymentCard({ transaction })(repos);
|
|
49
49
|
}
|
|
50
50
|
catch (error) {
|
|
51
|
-
// tslint:disable-next-line:no-single-line-block-comment
|
|
52
|
-
/* istanbul ignore next */
|
|
53
|
-
if (error.name === 'MongoError') {
|
|
54
|
-
// no op
|
|
55
|
-
}
|
|
56
51
|
throw error;
|
|
57
52
|
}
|
|
58
53
|
return transaction;
|
|
@@ -42,7 +42,7 @@ interface IOrderOperationRepos {
|
|
|
42
42
|
transaction: TransactionRepo;
|
|
43
43
|
transactionNumber: TransactionNumberRepo;
|
|
44
44
|
}
|
|
45
|
-
|
|
45
|
+
type IOrderOperation<T> = (repos: IOrderOperationRepos) => Promise<T>;
|
|
46
46
|
/**
|
|
47
47
|
* メンバーシップ注文
|
|
48
48
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as factory from '../../../../factory';
|
|
2
|
-
export
|
|
2
|
+
export type IPlaceOrderTransactionAsInformObject = Pick<factory.transaction.ITransaction<factory.transactionType.PlaceOrder>, 'id' | 'typeOf' | 'agent' | 'endDate' | 'expires' | 'project' | 'seller' | 'result' | 'startDate' | 'status'>;
|
|
3
3
|
/**
|
|
4
4
|
* 取引のタスクを作成する
|
|
5
5
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MongoRepository as TaskRepo } from '../../repo/task';
|
|
2
2
|
import { MongoRepository as TransactionRepo } from '../../repo/transaction';
|
|
3
|
-
export
|
|
3
|
+
export type ITaskAndTransactionOperation<T> = (repos: {
|
|
4
4
|
task: TaskRepo;
|
|
5
5
|
transaction: TransactionRepo;
|
|
6
6
|
}) => Promise<T>;
|
package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/moneyTransfer.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as factory from '../../../../factory';
|
|
2
|
-
export
|
|
2
|
+
export type IAuthorizeMoneyTransferOffer = factory.action.authorize.offer.moneyTransfer.IAction;
|
|
3
3
|
export declare function createMoneyTransferActions(params: {
|
|
4
4
|
order: factory.order.IOrder;
|
|
5
5
|
transaction: factory.transaction.placeOrder.ITransaction;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as factory from '../../../../factory';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type IAuthorizeMoneyTransferOffer = factory.action.authorize.offer.moneyTransfer.IAction;
|
|
3
|
+
export type IAuthorizeSeatReservationOffer = factory.action.authorize.offer.seatReservation.IAction<factory.service.webAPI.Identifier>;
|
|
4
4
|
export declare function createReservationAcceptedOffers(params: {
|
|
5
5
|
transaction: factory.transaction.placeOrder.ITransaction;
|
|
6
6
|
}): {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as factory from '../../../factory';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
2
|
+
export type IAuthorizeAnyPaymentResult = factory.action.authorize.paymentMethod.any.IResult;
|
|
3
|
+
export type IAuthorizeSeatReservationOffer = factory.action.authorize.offer.seatReservation.IAction<factory.service.webAPI.Identifier>;
|
|
4
|
+
export type IAuthorizeSeatReservationOfferResult = factory.action.authorize.offer.seatReservation.IResult<factory.service.webAPI.Identifier>;
|
|
5
|
+
export type IAuthorizeActionResultBySeller = factory.action.authorize.offer.product.IResult | IAuthorizeSeatReservationOfferResult | factory.action.authorize.award.point.IResult;
|
|
6
|
+
export type IUnitPriceSpecification = factory.priceSpecification.IPriceSpecification<factory.priceSpecificationType.UnitPriceSpecification>;
|
|
7
7
|
/**
|
|
8
8
|
* 取引が確定可能な状態かどうかをチェックする
|
|
9
9
|
*/
|
|
10
10
|
export declare function validateTransaction(transaction: factory.transaction.placeOrder.ITransaction): void;
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
11
|
+
export type IConfirmationNumberGenerator = (order: factory.order.IOrder) => string;
|
|
12
|
+
export type IOrderURLGenerator = (order: factory.order.IOrder) => string;
|
|
13
|
+
export type IResultOrderParams = factory.transaction.placeOrder.IResultOrderParams & {
|
|
14
14
|
/**
|
|
15
15
|
* 注文日時
|
|
16
16
|
*/
|
|
@@ -15,7 +15,7 @@ export interface IStartOperationRepos {
|
|
|
15
15
|
seller: SellerRepo;
|
|
16
16
|
transaction: TransactionRepo;
|
|
17
17
|
}
|
|
18
|
-
export
|
|
18
|
+
export type IStartOperation<T> = (repos: IStartOperationRepos) => Promise<T>;
|
|
19
19
|
export interface IConfirmOperationRepos {
|
|
20
20
|
action: ActionRepo;
|
|
21
21
|
emailMessage?: EmailMessageRepo;
|
|
@@ -24,9 +24,9 @@ export interface IConfirmOperationRepos {
|
|
|
24
24
|
orderNumber: OrderNumberRepo;
|
|
25
25
|
confirmationNumber: ConfirmationNumberRepo;
|
|
26
26
|
}
|
|
27
|
-
export
|
|
28
|
-
export
|
|
29
|
-
export
|
|
27
|
+
export type IConfirmOperation<T> = (repos: IConfirmOperationRepos) => Promise<T>;
|
|
28
|
+
export type IPassportValidator = IWaiterPassportValidator;
|
|
29
|
+
export type IStartParams = factory.transaction.placeOrder.IStartParamsWithoutDetail & {
|
|
30
30
|
passportValidator?: IPassportValidator;
|
|
31
31
|
broker?: factory.order.IBroker;
|
|
32
32
|
validateSeller?: boolean;
|
|
@@ -35,8 +35,8 @@ export declare type IStartParams = factory.transaction.placeOrder.IStartParamsWi
|
|
|
35
35
|
* 取引開始
|
|
36
36
|
*/
|
|
37
37
|
export declare function start(params: IStartParams): IStartOperation<factory.transaction.placeOrder.ITransaction>;
|
|
38
|
-
export
|
|
39
|
-
export
|
|
38
|
+
export type IOrderURLGenerator = (order: factory.order.IOrder) => string;
|
|
39
|
+
export type IResultOrderParams = factory.transaction.placeOrder.IResultOrderParams & {
|
|
40
40
|
/**
|
|
41
41
|
* 注文日時
|
|
42
42
|
*/
|
|
@@ -53,7 +53,7 @@ export declare type IResultOrderParams = factory.transaction.placeOrder.IResultO
|
|
|
53
53
|
minValue?: number;
|
|
54
54
|
};
|
|
55
55
|
};
|
|
56
|
-
export
|
|
56
|
+
export type IConfirmParams = factory.transaction.placeOrder.IConfirmParams & {
|
|
57
57
|
project: {
|
|
58
58
|
id: string;
|
|
59
59
|
};
|
|
@@ -57,7 +57,7 @@ function start(params) {
|
|
|
57
57
|
transaction = yield repos.transaction.start(startParams);
|
|
58
58
|
}
|
|
59
59
|
catch (error) {
|
|
60
|
-
if (
|
|
60
|
+
if ((0, errorHandler_1.isMongoError)(error)) {
|
|
61
61
|
// no op
|
|
62
62
|
}
|
|
63
63
|
throw error;
|
|
@@ -132,7 +132,7 @@ function confirm(params) {
|
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
134
|
catch (error) {
|
|
135
|
-
if (
|
|
135
|
+
if ((0, errorHandler_1.isMongoError)(error)) {
|
|
136
136
|
// 万が一同一注文番号で確定しようとすると、MongoDBでE11000 duplicate key errorが発生する
|
|
137
137
|
// message: 'E11000 duplicate key error collection: prodttts.transactions index:result.order.orderNumber_1 dup key:...',
|
|
138
138
|
if (error.code === errorHandler_1.MongoErrorCode.DuplicateKey) {
|