@chevre/domain 25.2.0-alpha.9 → 26.0.0-alpha.0
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/eventEmitter/task.d.ts +2 -1
- package/lib/chevre/factory/customerTelephone2COATelNum.d.ts +3 -0
- package/lib/chevre/factory/customerTelephone2COATelNum.js +22 -0
- package/lib/chevre/repo/action/acceptPay.d.ts +15 -0
- package/lib/chevre/repo/action/acceptPay.js +47 -19
- package/lib/chevre/repo/action.d.ts +16 -9
- package/lib/chevre/repo/action.js +99 -180
- package/lib/chevre/repo/adminTask.d.ts +37 -0
- package/lib/chevre/repo/adminTask.js +163 -0
- package/lib/chevre/repo/aggregateOffer.d.ts +3 -14
- package/lib/chevre/repo/aggregateOffer.js +16 -125
- package/lib/chevre/repo/aggregateTask.d.ts +37 -0
- package/lib/chevre/repo/aggregateTask.js +136 -0
- package/lib/chevre/repo/asyncAction.d.ts +69 -0
- package/lib/chevre/repo/asyncAction.js +237 -0
- package/lib/chevre/repo/concurrentLock.d.ts +3 -1
- package/lib/chevre/repo/creativeWork.d.ts +2 -3
- package/lib/chevre/repo/credentials.d.ts +2 -1
- package/lib/chevre/repo/customerType.d.ts +2 -3
- package/lib/chevre/repo/event.d.ts +10 -11
- package/lib/chevre/repo/eventOffer.d.ts +4 -5
- package/lib/chevre/repo/eventSellerMakesOffer.d.ts +2 -3
- package/lib/chevre/repo/eventSeries.d.ts +4 -5
- package/lib/chevre/repo/message.d.ts +1 -1
- package/lib/chevre/repo/message.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/asyncAction.d.ts +13 -0
- package/lib/chevre/repo/mongoose/schemas/asyncAction.js +89 -0
- package/lib/chevre/repo/mongoose/schemas/order.d.ts +4 -0
- package/lib/chevre/repo/mongoose/schemas/order.js +10 -0
- package/lib/chevre/repo/mongoose/schemas/scheduledTasks.d.ts +16 -0
- package/lib/chevre/repo/mongoose/schemas/scheduledTasks.js +103 -0
- package/lib/chevre/repo/mongoose/schemas/setting.d.ts +4 -0
- package/lib/chevre/repo/mongoose/schemas/task.d.ts +6 -1
- package/lib/chevre/repo/mongoose/schemas/task.js +12 -12
- package/lib/chevre/repo/note.d.ts +3 -4
- package/lib/chevre/repo/noteAboutOrder.d.ts +2 -3
- package/lib/chevre/repo/offer/offerInCatalogReadOnly.d.ts +2 -2
- package/lib/chevre/repo/offer/unitPriceInCatalog.d.ts +2 -2
- package/lib/chevre/repo/offer/unitPriceInCatalog.js +59 -11
- package/lib/chevre/repo/offerCatalog.d.ts +2 -3
- package/lib/chevre/repo/offerCatalogItem.d.ts +2 -3
- package/lib/chevre/repo/order.d.ts +2 -0
- package/lib/chevre/repo/order.js +14 -14
- package/lib/chevre/repo/orderInTransaction.d.ts +68 -1
- package/lib/chevre/repo/orderInTransaction.js +181 -3
- package/lib/chevre/repo/passport.d.ts +2 -1
- package/lib/chevre/repo/person.d.ts +0 -15
- package/lib/chevre/repo/person.js +122 -108
- package/lib/chevre/repo/place/entranceGate.d.ts +4 -5
- package/lib/chevre/repo/place/movieTheater.d.ts +3 -4
- package/lib/chevre/repo/place/screeningRoom.d.ts +4 -5
- package/lib/chevre/repo/place/seat.d.ts +4 -5
- package/lib/chevre/repo/place/section.d.ts +3 -4
- package/lib/chevre/repo/priceSpecification.d.ts +4 -4
- package/lib/chevre/repo/product.d.ts +3 -4
- package/lib/chevre/repo/rateLimit/offer.d.ts +3 -1
- package/lib/chevre/repo/rateLimit/offer.js +0 -12
- package/lib/chevre/repo/reservation.d.ts +2 -3
- package/lib/chevre/repo/scheduledTask.d.ts +90 -0
- package/lib/chevre/repo/scheduledTask.js +223 -0
- package/lib/chevre/repo/sellerMakesOffer.d.ts +3 -4
- package/lib/chevre/repo/stockHolder.d.ts +1 -1
- package/lib/chevre/repo/stockHolder.js +0 -146
- package/lib/chevre/repo/task.d.ts +30 -71
- package/lib/chevre/repo/task.js +59 -345
- package/lib/chevre/repo/transaction/placeOrder.d.ts +2 -45
- package/lib/chevre/repo/transaction/placeOrder.js +43 -83
- package/lib/chevre/repo/transaction.d.ts +2 -2
- package/lib/chevre/repo/transactionNumberCounter.js +0 -34
- package/lib/chevre/repo/transactionProcess.d.ts +2 -1
- package/lib/chevre/repo/transactionProcess.js +0 -13
- package/lib/chevre/repository.d.ts +20 -0
- package/lib/chevre/repository.js +46 -2
- package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +1 -1
- package/lib/chevre/service/aggregation/system.d.ts +2 -2
- package/lib/chevre/service/aggregation/system.js +1 -1
- package/lib/chevre/service/assetTransaction/cancelReservation.js +1 -1
- package/lib/chevre/service/assetTransaction/pay/exportTasksById.js +1 -1
- package/lib/chevre/service/assetTransaction/pay/publishPaymentUrl.js +1 -1
- package/lib/chevre/service/assetTransaction/pay/start/factory.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/pay/start/factory.js +3 -4
- package/lib/chevre/service/assetTransaction/pay/start.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/refund.js +1 -1
- package/lib/chevre/service/assetTransaction/reserve/exportTasksById.js +1 -1
- package/lib/chevre/service/assetTransaction/reserveCOA/cancel.js +1 -67
- package/lib/chevre/service/asyncAction.d.ts +16 -0
- package/lib/chevre/service/asyncAction.js +36 -0
- package/lib/chevre/service/asyncActionHandler/onOperationFailed.d.ts +15 -0
- package/lib/chevre/service/asyncActionHandler/onOperationFailed.js +42 -0
- package/lib/chevre/service/asyncActionHandler.d.ts +13 -0
- package/lib/chevre/service/asyncActionHandler.js +89 -0
- package/lib/chevre/service/notification/factory.d.ts +2 -4
- package/lib/chevre/service/notification/factory.js +26 -24
- package/lib/chevre/service/notification/notifyAbortedTasksByEmail.d.ts +12 -6
- package/lib/chevre/service/notification/notifyAbortedTasksByEmail.js +12 -4
- package/lib/chevre/service/offer/event/authorize/factory.d.ts +3 -5
- package/lib/chevre/service/offer/event/authorize/factory.js +93 -75
- package/lib/chevre/service/offer/event/authorize.d.ts +0 -4
- package/lib/chevre/service/offer/event/authorize.js +2 -2
- package/lib/chevre/service/offer/event/voidTransaction.d.ts +1 -1
- package/lib/chevre/service/offer/event/voidTransactionByActionId.d.ts +1 -1
- package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.d.ts +6 -7
- package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.js +10 -10
- package/lib/chevre/service/offer/eventServiceByCOA/authorize/validateAcceptedOffers.js +2 -1
- package/lib/chevre/service/offer/eventServiceByCOA/authorize.d.ts +0 -5
- package/lib/chevre/service/offer/eventServiceByCOA/authorize.js +15 -12
- package/lib/chevre/service/offer/eventServiceByCOA/authorizeByAcceptAction.d.ts +0 -5
- package/lib/chevre/service/offer/eventServiceByCOA/authorizeByAcceptAction.js +2 -2
- package/lib/chevre/service/offer/eventServiceByCOA/findAcceptAction.d.ts +4 -0
- package/lib/chevre/service/offer/eventServiceByCOA/findAcceptAction.js +20 -9
- package/lib/chevre/service/offer/onEventChanged.js +2 -2
- package/lib/chevre/service/order/confirmPayTransaction.js +1 -1
- package/lib/chevre/service/order/deleteOrder.d.ts +5 -1
- package/lib/chevre/service/order/deleteOrder.js +8 -1
- package/lib/chevre/service/order/onAssetTransactionStatusChanged/onPayTransactionCanceled.js +19 -11
- package/lib/chevre/service/order/onAssetTransactionStatusChanged/onPayTransactionConfirmed.d.ts +2 -0
- package/lib/chevre/service/order/onAssetTransactionStatusChanged/paymentDue2Processing.d.ts +2 -2
- package/lib/chevre/service/order/onAssetTransactionStatusChanged/paymentDue2Processing.js +1 -7
- package/lib/chevre/service/order/onAssetTransactionStatusChanged.d.ts +2 -0
- package/lib/chevre/service/order/onAssetTransactionStatusChanged.js +2 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderCancelled/factory.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderCancelled.js +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered.js +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially/factory.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDeliveredPartially.js +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderInTransit.js +3 -3
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderPaymentDue.d.ts +0 -3
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderPaymentDue.js +73 -44
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/createSendEmailMessageTaskIfNotExist.d.ts +5 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/createSendEmailMessageTaskIfNotExist.js +53 -33
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/processOrder.js +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.d.ts +2 -2
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.js +6 -4
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned/factory.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned.js +3 -7
- package/lib/chevre/service/order/onOrderUpdated.js +1 -1
- package/lib/chevre/service/order/payOrder.d.ts +2 -0
- package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.d.ts +2 -1
- package/lib/chevre/service/order/placeOrder/createPlacingOrderFromExistingTransaction.js +13 -58
- package/lib/chevre/service/order/placeOrder/factory.js +3 -21
- package/lib/chevre/service/order/placeOrder.d.ts +4 -5
- package/lib/chevre/service/order/placeOrder.js +20 -31
- package/lib/chevre/service/payment/any/authorize/fixOrderAsNeeded.js +1 -2
- package/lib/chevre/service/payment/any/authorize/fixTransactionNumber.d.ts +3 -2
- package/lib/chevre/service/payment/any/authorize/handlePrePublishedPaymentMethodIdOnAuthorizing.d.ts +4 -3
- package/lib/chevre/service/payment/any/authorize/handlePrePublishedPaymentMethodIdOnAuthorizing.js +3 -31
- package/lib/chevre/service/payment/any/authorize.js +7 -5
- package/lib/chevre/service/payment/any/factory.d.ts +7 -7
- package/lib/chevre/service/payment/any/factory.js +18 -21
- package/lib/chevre/service/payment/any/findAcceptAction.d.ts +7 -1
- package/lib/chevre/service/payment/any/findAcceptAction.js +34 -15
- package/lib/chevre/service/payment/any/findAuthorizeAction.d.ts +4 -0
- package/lib/chevre/service/payment/any/findAuthorizeAction.js +20 -9
- package/lib/chevre/service/payment/any/findCheckAction.d.ts +4 -0
- package/lib/chevre/service/payment/any/findCheckAction.js +20 -9
- package/lib/chevre/service/payment/any/invalidatePaymentUrl.d.ts +2 -0
- package/lib/chevre/service/payment/any/invalidatePaymentUrl.js +5 -67
- package/lib/chevre/service/payment/any/onPayActionCompleted.js +1 -1
- package/lib/chevre/service/payment/any/onRefundActionCompletedOrFailed.js +1 -1
- package/lib/chevre/service/payment/any/publishPaymentUrl.d.ts +4 -0
- package/lib/chevre/service/payment/any/publishPaymentUrl.js +4 -18
- package/lib/chevre/service/payment/any/voidPayTransaction.d.ts +2 -0
- package/lib/chevre/service/payment/any/voidPayTransaction.js +1 -23
- package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard.d.ts +1 -1
- package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard.js +5 -9
- package/lib/chevre/service/reserve/adminFindReservations.d.ts +15 -0
- package/lib/chevre/service/reserve/adminFindReservations.js +35 -0
- package/lib/chevre/service/reserve/potentialActions/onPendingReservationCanceled.js +1 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.js +1 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationCheckedIn.js +1 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +20 -11
- package/lib/chevre/service/reserve/potentialActions/onReservationUsed.js +1 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationsCreated.js +1 -1
- package/lib/chevre/service/reserve/searchByOrder.js +2 -6
- package/lib/chevre/service/reserve.d.ts +2 -2
- package/lib/chevre/service/reserve.js +3 -3
- package/lib/chevre/service/scheduledTask.d.ts +11 -0
- package/lib/chevre/service/scheduledTask.js +40 -0
- package/lib/chevre/service/scheduledTaskHandler/onOperationFailed.d.ts +14 -0
- package/lib/chevre/service/scheduledTaskHandler/onOperationFailed.js +56 -0
- package/lib/chevre/service/scheduledTaskHandler.d.ts +12 -0
- package/lib/chevre/service/scheduledTaskHandler.js +66 -0
- package/lib/chevre/service/task/aggregateOffers.d.ts +2 -2
- package/lib/chevre/service/task/aggregateOffers.js +2 -1
- package/lib/chevre/service/task/aggregateScreeningEvent.d.ts +2 -2
- package/lib/chevre/service/task/aggregateScreeningEvent.js +2 -1
- package/lib/chevre/service/task/authorizePayment.js +3 -1
- package/lib/chevre/service/task/cancelReservation.d.ts +2 -2
- package/lib/chevre/service/task/cancelReservation.js +2 -1
- package/lib/chevre/service/task/confirmPayTransaction.js +0 -1
- package/lib/chevre/service/task/confirmReserveTransaction.js +3 -8
- package/lib/chevre/service/task/deleteTransaction.d.ts +2 -2
- package/lib/chevre/service/task/deleteTransaction.js +2 -1
- package/lib/chevre/service/task/onAssetTransactionStatusChanged.d.ts +2 -2
- package/lib/chevre/service/task/onAssetTransactionStatusChanged.js +4 -3
- package/lib/chevre/service/task/onEventChanged.d.ts +2 -2
- package/lib/chevre/service/task/onEventChanged.js +2 -1
- package/lib/chevre/service/task/onOrderPaymentCompleted.d.ts +2 -2
- package/lib/chevre/service/task/onOrderPaymentCompleted.js +4 -1
- package/lib/chevre/service/task/onResourceUpdated/onAggregateOfferUpdated.js +2 -2
- package/lib/chevre/service/task/onResourceUpdated/onHasPOSUpdated.js +1 -1
- package/lib/chevre/service/task/onResourceUpdated/onOfferCatalogUpdated.js +1 -1
- package/lib/chevre/service/task/onResourceUpdated.d.ts +2 -2
- package/lib/chevre/service/task/onResourceUpdated.js +10 -9
- package/lib/chevre/service/task/placeOrder.d.ts +2 -2
- package/lib/chevre/service/task/placeOrder.js +6 -3
- package/lib/chevre/service/task/publishPaymentUrl.js +7 -3
- package/lib/chevre/service/task/refund.d.ts +2 -2
- package/lib/chevre/service/task/refund.js +4 -10
- package/lib/chevre/service/task/reserve.d.ts +2 -2
- package/lib/chevre/service/task/reserve.js +2 -1
- package/lib/chevre/service/task/returnOrder.d.ts +2 -2
- package/lib/chevre/service/task/returnOrder.js +2 -1
- package/lib/chevre/service/task/returnPayTransaction.js +1 -1
- package/lib/chevre/service/task/sendOrder.d.ts +2 -2
- package/lib/chevre/service/task/sendOrder.js +2 -1
- package/lib/chevre/service/task/voidPayTransaction.js +3 -7
- package/lib/chevre/service/task/voidPayment.d.ts +2 -2
- package/lib/chevre/service/task/voidPayment.js +2 -1
- package/lib/chevre/service/task/voidReserveTransaction.d.ts +1 -1
- package/lib/chevre/service/taskHandler/onOperationFailed/informTaskIfNeeded.js +1 -1
- package/lib/chevre/service/taskHandler/onOperationFailed.js +1 -1
- package/lib/chevre/service/taskHandler.d.ts +2 -2
- package/lib/chevre/service/taskHandler.js +36 -37
- package/lib/chevre/service/transaction/deleteTransaction/deletePayTransactionsByPlaceOrder.d.ts +15 -0
- package/lib/chevre/service/transaction/deleteTransaction/deletePayTransactionsByPlaceOrder.js +51 -0
- package/lib/chevre/service/transaction/deleteTransaction/deleteReservationsByPlaceOrder.d.ts +23 -0
- package/lib/chevre/service/transaction/deleteTransaction/deleteReservationsByPlaceOrder.js +64 -0
- package/lib/chevre/service/transaction/deleteTransaction.d.ts +1 -1
- package/lib/chevre/service/transaction/deleteTransaction.js +15 -152
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions/sendEmailMessage.d.ts +28 -2
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions/sendEmailMessage.js +11 -12
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.d.ts +4 -2
- package/lib/chevre/service/transaction/placeOrder/confirm/potentialActions.js +6 -7
- package/lib/chevre/service/transaction/placeOrder/confirm/prepareUnitPriceOfferConditions.d.ts +32 -4
- package/lib/chevre/service/transaction/placeOrder/confirm/prepareUnitPriceOfferConditions.js +10 -1
- package/lib/chevre/service/transaction/placeOrder/confirm/validation/factory.d.ts +5 -1
- package/lib/chevre/service/transaction/placeOrder/confirm/validation.d.ts +6 -2
- package/lib/chevre/service/transaction/placeOrder/confirm/validation.js +23 -9
- package/lib/chevre/service/transaction/placeOrder/confirm.d.ts +6 -5
- package/lib/chevre/service/transaction/placeOrder/confirm.js +30 -40
- package/lib/chevre/service/transaction/placeOrder/exportTasks/factory.d.ts +1 -1
- package/lib/chevre/service/transaction/placeOrder/exportTasksById.js +1 -1
- package/lib/chevre/service/transaction/placeOrder/publishConfirmationNumberIfNotExist.d.ts +4 -7
- package/lib/chevre/service/transaction/placeOrder/publishConfirmationNumberIfNotExist.js +33 -15
- package/lib/chevre/service/transaction/placeOrder/start.d.ts +1 -1
- package/lib/chevre/service/transaction/placeOrder/updateAgent/fixCustomer.d.ts +20 -0
- package/lib/chevre/service/transaction/placeOrder/updateAgent/fixCustomer.js +63 -0
- package/lib/chevre/service/transaction/placeOrder/updateAgent.d.ts +0 -1
- package/lib/chevre/service/transaction/placeOrder/updateAgent.js +17 -86
- package/lib/chevre/service/transaction/returnOrder/preStart.js +1 -1
- package/lib/chevre/service/transaction/returnOrder.js +1 -1
- package/lib/chevre/service.d.ts +8 -0
- package/lib/chevre/service.js +23 -1
- package/lib/chevre/taskSettings.d.ts +3 -4
- package/package.json +8 -11
- package/lib/chevre/service/order/findConfirmedPlaceOrder.d.ts +0 -13
- package/lib/chevre/service/order/findConfirmedPlaceOrder.js +0 -32
- package/lib/chevre/service/reserve/findReservations.d.ts +0 -33
- package/lib/chevre/service/reserve/findReservations.js +0 -61
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { Connection, PipelineStage } from 'mongoose';
|
|
1
|
+
import type { Connection, PipelineStage, mongo } from 'mongoose';
|
|
3
2
|
import { factory } from '../../factory';
|
|
4
3
|
type IScreeningRoomSectionWithoutContainsPlace = Omit<factory.place.screeningRoomSection.IPlace, 'containsPlace'>;
|
|
5
4
|
type ICreatingSection = Pick<factory.place.screeningRoomSection.IPlace, 'additionalProperty' | 'branchCode' | 'name'>;
|
|
@@ -57,7 +56,7 @@ export declare class SectionRepo {
|
|
|
57
56
|
addSeatSectionsByBranchCodeIfNotExist(params: {
|
|
58
57
|
$set: IUpsertingSeatSection;
|
|
59
58
|
}[], options: IUpsertOptions): Promise<{
|
|
60
|
-
bulkWriteResult?: BulkWriteResult;
|
|
59
|
+
bulkWriteResult?: mongo.BulkWriteResult;
|
|
61
60
|
}>;
|
|
62
61
|
/**
|
|
63
62
|
* コードをキーにして冪等編集
|
|
@@ -65,7 +64,7 @@ export declare class SectionRepo {
|
|
|
65
64
|
updateSeatSectionsByBranchCode(params: {
|
|
66
65
|
$set: IUpsertingSeatSection;
|
|
67
66
|
}[], options: IUpsertOptions): Promise<{
|
|
68
|
-
bulkWriteResult?: BulkWriteResult;
|
|
67
|
+
bulkWriteResult?: mongo.BulkWriteResult;
|
|
69
68
|
}>;
|
|
70
69
|
migrateSectionIdentifier(screeningRoomSection: {
|
|
71
70
|
project: {
|
|
@@ -37,8 +37,8 @@ export declare class PriceSpecificationRepo {
|
|
|
37
37
|
};
|
|
38
38
|
}): Promise<void>;
|
|
39
39
|
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & (({
|
|
40
|
-
project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
|
|
41
40
|
name?: (string | import("@chevre/factory/lib/chevre/multilingualString").IMultilingualString) | undefined;
|
|
41
|
+
project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
|
|
42
42
|
price: number;
|
|
43
43
|
priceCurrency: factory.priceCurrency;
|
|
44
44
|
typeOf: factory.priceSpecificationType.CategoryCodeChargeSpecification;
|
|
@@ -53,8 +53,8 @@ export declare class PriceSpecificationRepo {
|
|
|
53
53
|
} & {
|
|
54
54
|
__v: number;
|
|
55
55
|
}) | ({
|
|
56
|
-
project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
|
|
57
56
|
name?: (string | import("@chevre/factory/lib/chevre/multilingualString").IMultilingualString) | undefined;
|
|
57
|
+
project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
|
|
58
58
|
price: number;
|
|
59
59
|
priceCurrency: factory.priceCurrency;
|
|
60
60
|
typeOf: factory.priceSpecificationType.MovieTicketTypeChargeSpecification;
|
|
@@ -70,8 +70,8 @@ export declare class PriceSpecificationRepo {
|
|
|
70
70
|
} & {
|
|
71
71
|
__v: number;
|
|
72
72
|
})), import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & (({
|
|
73
|
-
project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
|
|
74
73
|
name?: (string | import("@chevre/factory/lib/chevre/multilingualString").IMultilingualString) | undefined;
|
|
74
|
+
project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
|
|
75
75
|
price: number;
|
|
76
76
|
priceCurrency: factory.priceCurrency;
|
|
77
77
|
typeOf: factory.priceSpecificationType.CategoryCodeChargeSpecification;
|
|
@@ -86,8 +86,8 @@ export declare class PriceSpecificationRepo {
|
|
|
86
86
|
} & {
|
|
87
87
|
__v: number;
|
|
88
88
|
}) | ({
|
|
89
|
-
project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
|
|
90
89
|
name?: (string | import("@chevre/factory/lib/chevre/multilingualString").IMultilingualString) | undefined;
|
|
90
|
+
project?: Pick<factory.project.IProject, "id" | "typeOf"> | undefined;
|
|
91
91
|
price: number;
|
|
92
92
|
priceCurrency: factory.priceCurrency;
|
|
93
93
|
typeOf: factory.priceSpecificationType.MovieTicketTypeChargeSpecification;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Connection, FilterQuery, Types } from 'mongoose';
|
|
1
|
+
import { Connection, FilterQuery, Types, mongo } from 'mongoose';
|
|
3
2
|
import { factory } from '../factory';
|
|
4
3
|
import { IDocType, IDocTypeAsProduct } from './mongoose/schemas/product';
|
|
5
4
|
type IKeyOfProjection = keyof factory.product.IProduct | 'hasOfferCatalog.id';
|
|
@@ -65,7 +64,7 @@ export declare class ProductRepo {
|
|
|
65
64
|
};
|
|
66
65
|
$unset?: Partial<Record<IUnsetKey, 1>>;
|
|
67
66
|
}[]): Promise<{
|
|
68
|
-
bulkWriteResult?: BulkWriteResult;
|
|
67
|
+
bulkWriteResult?: mongo.BulkWriteResult;
|
|
69
68
|
modifiedProducts?: {
|
|
70
69
|
id: string;
|
|
71
70
|
}[];
|
|
@@ -80,7 +79,7 @@ export declare class ProductRepo {
|
|
|
80
79
|
hasOfferCatalog: {
|
|
81
80
|
id: string;
|
|
82
81
|
};
|
|
83
|
-
}): Promise<
|
|
82
|
+
}): Promise<mongo.DeleteResult>;
|
|
84
83
|
/**
|
|
85
84
|
* プロジェクト指定で削除する
|
|
86
85
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { createClient } from 'redis';
|
|
2
2
|
import { factory } from '../../factory';
|
|
3
|
+
type RedisClientType = ReturnType<typeof createClient>;
|
|
3
4
|
/**
|
|
4
5
|
* レート制限キーインターフェース
|
|
5
6
|
*/
|
|
@@ -34,3 +35,4 @@ export declare class OfferRateLimitRepo {
|
|
|
34
35
|
unlock(params: IRateLimitKey): Promise<void>;
|
|
35
36
|
getHolder(ratelimitKey: IRateLimitKey): Promise<string | null>;
|
|
36
37
|
}
|
|
38
|
+
export {};
|
|
@@ -28,7 +28,6 @@ class OfferRateLimitRepo {
|
|
|
28
28
|
* ロックする
|
|
29
29
|
* discontinue array params(2025-05-26~)
|
|
30
30
|
*/
|
|
31
|
-
// public async lock(ratelimitKeys: IRateLimitKey[]): Promise<void> {
|
|
32
31
|
async lock(params) {
|
|
33
32
|
const key = OfferRateLimitRepo.createKey(params);
|
|
34
33
|
const value = params.reservationNumber;
|
|
@@ -50,18 +49,8 @@ class OfferRateLimitRepo {
|
|
|
50
49
|
catch (_error) {
|
|
51
50
|
throw new factory_1.factory.errors.RateLimitExceeded('Offer');
|
|
52
51
|
}
|
|
53
|
-
// const multi = this.redisClient.multi();
|
|
54
|
-
// multi.setNX(key, value)
|
|
55
|
-
// .expire(key, ttl);
|
|
56
|
-
// const results = await multi.exec();
|
|
57
|
-
// if (Array.isArray(results) && (results[0] === 1 || (<any>results)[0] === true)) {
|
|
58
|
-
// return;
|
|
59
|
-
// } else {
|
|
60
|
-
// throw new factory.errors.RateLimitExceeded('Offer');
|
|
61
|
-
// }
|
|
62
52
|
}
|
|
63
53
|
// discontinue array params(2025-05-26~)
|
|
64
|
-
// public async unlock(ratelimitKeys: IRateLimitKey[]): Promise<void> {
|
|
65
54
|
async unlock(params) {
|
|
66
55
|
const key = OfferRateLimitRepo.createKey(params);
|
|
67
56
|
// reimplement using concurrentLockRepo(2025-05-27~)
|
|
@@ -69,7 +58,6 @@ class OfferRateLimitRepo {
|
|
|
69
58
|
about: { identifier: key, typeOf: 'Thing' },
|
|
70
59
|
audience: { identifier: params.reservationNumber, typeOf: 'Audience' }
|
|
71
60
|
});
|
|
72
|
-
// await this.redisClient.del(key);
|
|
73
61
|
}
|
|
74
62
|
async getHolder(ratelimitKey) {
|
|
75
63
|
const key = OfferRateLimitRepo.createKey(ratelimitKey);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { Connection, UpdateWriteOpResult } from 'mongoose';
|
|
1
|
+
import type { Connection, UpdateWriteOpResult, mongo } from 'mongoose';
|
|
3
2
|
import { IDocType } from './mongoose/schemas/reservation';
|
|
4
3
|
import { factory } from '../factory';
|
|
5
4
|
export interface IUpdatePartiallyParams {
|
|
@@ -77,7 +76,7 @@ export declare class ReservationRepo {
|
|
|
77
76
|
reservationNumber: string;
|
|
78
77
|
underName?: factory.reservation.IUnderName;
|
|
79
78
|
broker?: factory.reservation.IBroker;
|
|
80
|
-
}): Promise<BulkWriteResult | undefined>;
|
|
79
|
+
}): Promise<mongo.BulkWriteResult | undefined>;
|
|
81
80
|
/**
|
|
82
81
|
* 予約取消
|
|
83
82
|
*/
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { Connection, UpdateWriteOpResult } from 'mongoose';
|
|
2
|
+
import { factory } from '../factory';
|
|
3
|
+
import type { IExecutableTask } from '../taskSettings';
|
|
4
|
+
type ICreatingTaskKeys = 'data' | 'executionResults' | 'name' | 'numberOfTried' | 'project' | 'remainingNumberOfTries' | 'runsAt' | 'status' | 'description';
|
|
5
|
+
/**
|
|
6
|
+
* リトライ可能なタスク作成属性
|
|
7
|
+
*/
|
|
8
|
+
type ICreatingTask = (Pick<factory.task.importEventCapacitiesFromCOA.IAttributes, ICreatingTaskKeys> | Pick<factory.task.importEventsFromCOA.IAttributes, ICreatingTaskKeys>) & {
|
|
9
|
+
expires: Date;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* 予定タスクリポジトリ
|
|
13
|
+
*/
|
|
14
|
+
export declare class ScheduledTaskRepo {
|
|
15
|
+
private readonly scheduledTaskModel;
|
|
16
|
+
constructor(connection: Connection);
|
|
17
|
+
addScheduledTasks(taskAttributes: ICreatingTask[]): Promise<{
|
|
18
|
+
id: string;
|
|
19
|
+
}[]>;
|
|
20
|
+
countPotentiallyRunningScheduledTasks(params: {
|
|
21
|
+
name: {
|
|
22
|
+
$eq: factory.taskName;
|
|
23
|
+
};
|
|
24
|
+
runsAt: {
|
|
25
|
+
$lt: Date;
|
|
26
|
+
};
|
|
27
|
+
limit?: number;
|
|
28
|
+
}): Promise<{
|
|
29
|
+
count: number;
|
|
30
|
+
}>;
|
|
31
|
+
/**
|
|
32
|
+
* 実行日時を一定期間過ぎたReadyタスクについて、Runningステータスに変更
|
|
33
|
+
*/
|
|
34
|
+
runScheduledTaskIfExists(params: {
|
|
35
|
+
/**
|
|
36
|
+
* 必ずタスク名指定で実行する
|
|
37
|
+
*/
|
|
38
|
+
name: {
|
|
39
|
+
$eq: factory.taskName;
|
|
40
|
+
};
|
|
41
|
+
runsAt: {
|
|
42
|
+
$lt: Date;
|
|
43
|
+
};
|
|
44
|
+
executor: {
|
|
45
|
+
name: string;
|
|
46
|
+
};
|
|
47
|
+
}): Promise<Pick<factory.task.ITask<factory.taskName>, 'id' | 'name'> | null>;
|
|
48
|
+
/**
|
|
49
|
+
* Running -> findOneするだけ
|
|
50
|
+
*/
|
|
51
|
+
findRunningScheduledTaskById(params: {
|
|
52
|
+
id: string;
|
|
53
|
+
}): Promise<IExecutableTask<factory.taskName> | null>;
|
|
54
|
+
/**
|
|
55
|
+
* タスクIDから実行結果とステータスを保管する
|
|
56
|
+
* Abortedの場合、dateAbortedもセットする
|
|
57
|
+
*/
|
|
58
|
+
setExecutionResultAndStatus(params: {
|
|
59
|
+
/**
|
|
60
|
+
* タスクID
|
|
61
|
+
*/
|
|
62
|
+
id: string;
|
|
63
|
+
}, update: {
|
|
64
|
+
status: factory.taskStatus.Executed | factory.taskStatus.Running | factory.taskStatus.Aborted;
|
|
65
|
+
executionResult: factory.task.IExecutionResult;
|
|
66
|
+
}): Promise<void>;
|
|
67
|
+
deleteTooOldReadyTasks(params: {
|
|
68
|
+
project: {
|
|
69
|
+
id: string;
|
|
70
|
+
};
|
|
71
|
+
name: factory.taskName;
|
|
72
|
+
runsAt: {
|
|
73
|
+
$lt: Date;
|
|
74
|
+
};
|
|
75
|
+
}): Promise<import("mongodb").DeleteResult>;
|
|
76
|
+
/**
|
|
77
|
+
* Runningのまま一定期間超過し、かつ、remainingNumberOfTries>0のタスクをReadyに変更する
|
|
78
|
+
*/
|
|
79
|
+
retryScheduledTasks(params: {
|
|
80
|
+
intervalInMinutes: number;
|
|
81
|
+
}): Promise<UpdateWriteOpResult>;
|
|
82
|
+
/**
|
|
83
|
+
* $eq:0をAbortedにする(タスク名称に関わらず)
|
|
84
|
+
* これらは中止されてもhubへ通知しない
|
|
85
|
+
*/
|
|
86
|
+
abortScheduledTasks(params: {
|
|
87
|
+
intervalInMinutes: number;
|
|
88
|
+
}): Promise<UpdateWriteOpResult>;
|
|
89
|
+
}
|
|
90
|
+
export {};
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ScheduledTaskRepo = void 0;
|
|
7
|
+
const moment_1 = __importDefault(require("moment"));
|
|
8
|
+
const factory_1 = require("../factory");
|
|
9
|
+
const settings_1 = require("../settings");
|
|
10
|
+
const scheduledTasks_1 = require("./mongoose/schemas/scheduledTasks");
|
|
11
|
+
const executableTaskProjection = {
|
|
12
|
+
_id: 0,
|
|
13
|
+
id: { $toString: '$_id' },
|
|
14
|
+
// 必要最低限にprojection(2024-04-23~)
|
|
15
|
+
data: 1,
|
|
16
|
+
name: 1,
|
|
17
|
+
status: 1,
|
|
18
|
+
numberOfTried: 1,
|
|
19
|
+
project: 1,
|
|
20
|
+
remainingNumberOfTries: 1,
|
|
21
|
+
runsAt: 1,
|
|
22
|
+
expires: 1
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* 予定タスクリポジトリ
|
|
26
|
+
*/
|
|
27
|
+
class ScheduledTaskRepo {
|
|
28
|
+
scheduledTaskModel;
|
|
29
|
+
constructor(connection) {
|
|
30
|
+
this.scheduledTaskModel = connection.model(scheduledTasks_1.modelName, (0, scheduledTasks_1.createSchema)());
|
|
31
|
+
}
|
|
32
|
+
async addScheduledTasks(taskAttributes) {
|
|
33
|
+
if (taskAttributes.length > 0) {
|
|
34
|
+
const creatingTasks = taskAttributes;
|
|
35
|
+
const result = await this.scheduledTaskModel.insertMany(creatingTasks, { ordered: false, rawResult: true });
|
|
36
|
+
if (result.insertedCount !== taskAttributes.length) {
|
|
37
|
+
throw new factory_1.factory.errors.Internal('all tasks not saved');
|
|
38
|
+
}
|
|
39
|
+
const savedTasks = Object.values(result.insertedIds)
|
|
40
|
+
.map((objectId) => {
|
|
41
|
+
return { id: objectId.toHexString() };
|
|
42
|
+
});
|
|
43
|
+
// イベントは発火しない
|
|
44
|
+
// if (emitImmediately) {
|
|
45
|
+
// savedTasks.forEach((savedTask) => {
|
|
46
|
+
// taskEventEmitter.emitTaskStatusChanged({
|
|
47
|
+
// id: savedTask.id,
|
|
48
|
+
// status: factory.taskStatus.Ready
|
|
49
|
+
// });
|
|
50
|
+
// });
|
|
51
|
+
// }
|
|
52
|
+
return savedTasks;
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
return [];
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
async countPotentiallyRunningScheduledTasks(params) {
|
|
59
|
+
const { runsAt, limit, name } = params;
|
|
60
|
+
const nameEq = name.$eq;
|
|
61
|
+
if (!(runsAt.$lt instanceof Date)) {
|
|
62
|
+
throw new factory_1.factory.errors.Argument('runsAt.$lt', 'must be Date');
|
|
63
|
+
}
|
|
64
|
+
const query = this.scheduledTaskModel.countDocuments({
|
|
65
|
+
status: { $eq: factory_1.factory.taskStatus.Ready },
|
|
66
|
+
name: { $eq: nameEq },
|
|
67
|
+
runsAt: { $lt: params.runsAt.$lt }
|
|
68
|
+
});
|
|
69
|
+
if (typeof limit === 'number' && limit >= 0) {
|
|
70
|
+
query.limit(limit);
|
|
71
|
+
}
|
|
72
|
+
const count = await query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
73
|
+
.exec();
|
|
74
|
+
return { count };
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* 実行日時を一定期間過ぎたReadyタスクについて、Runningステータスに変更
|
|
78
|
+
*/
|
|
79
|
+
async runScheduledTaskIfExists(params) {
|
|
80
|
+
if (!(params.runsAt.$lt instanceof Date)) {
|
|
81
|
+
throw new factory_1.factory.errors.Argument('runsAt.$lt', 'must be Date');
|
|
82
|
+
}
|
|
83
|
+
// const { noEmitEvent } = options;
|
|
84
|
+
const projection = {
|
|
85
|
+
_id: 0,
|
|
86
|
+
id: { $toString: '$_id' },
|
|
87
|
+
name: 1
|
|
88
|
+
};
|
|
89
|
+
const nameEq = params.name.$eq;
|
|
90
|
+
const filter = {
|
|
91
|
+
status: { $eq: factory_1.factory.taskStatus.Ready },
|
|
92
|
+
name: { $eq: nameEq },
|
|
93
|
+
runsAt: { $lt: params.runsAt.$lt }
|
|
94
|
+
};
|
|
95
|
+
const doc = await this.scheduledTaskModel.findOneAndUpdate(filter, {
|
|
96
|
+
$set: {
|
|
97
|
+
status: factory_1.factory.taskStatus.Running, // 実行中に変更
|
|
98
|
+
lastTriedAt: new Date(),
|
|
99
|
+
executor: params.executor
|
|
100
|
+
},
|
|
101
|
+
$inc: {
|
|
102
|
+
remainingNumberOfTries: -1, // 残りトライ可能回数減らす
|
|
103
|
+
numberOfTried: 1 // トライ回数増やす
|
|
104
|
+
}
|
|
105
|
+
}, {
|
|
106
|
+
new: true,
|
|
107
|
+
projection,
|
|
108
|
+
sort: { runsAt: factory_1.factory.sortType.Ascending } // ソートは、実行日時で固定化(2026-07-31~)
|
|
109
|
+
// ...(typeof params.sort.numberOfTried === 'number' || typeof params.sort.runsAt === 'number')
|
|
110
|
+
// ? { sort: params.sort }
|
|
111
|
+
// : undefined
|
|
112
|
+
})
|
|
113
|
+
.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
114
|
+
.lean()
|
|
115
|
+
.exec();
|
|
116
|
+
if (doc === null) {
|
|
117
|
+
return null;
|
|
118
|
+
}
|
|
119
|
+
// if (!noEmitEvent) {
|
|
120
|
+
// const changedTask: IRunningTaskByName = {
|
|
121
|
+
// id: doc.id,
|
|
122
|
+
// status: factory.taskStatus.Running,
|
|
123
|
+
// name: nameEq
|
|
124
|
+
// };
|
|
125
|
+
// taskEventEmitter.emitTaskStatusChanged(
|
|
126
|
+
// changedTask,
|
|
127
|
+
// // 現時点でタスク遅延実行ではnext指定なし(2026-07-30)
|
|
128
|
+
// // (typeof next === 'function') ? next : undefined
|
|
129
|
+
// );
|
|
130
|
+
// }
|
|
131
|
+
return doc;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Running -> findOneするだけ
|
|
135
|
+
*/
|
|
136
|
+
async findRunningScheduledTaskById(params) {
|
|
137
|
+
const doc = await this.scheduledTaskModel.findOne({
|
|
138
|
+
_id: { $eq: params.id },
|
|
139
|
+
status: { $eq: factory_1.factory.taskStatus.Running },
|
|
140
|
+
}, executableTaskProjection)
|
|
141
|
+
.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
142
|
+
.lean()
|
|
143
|
+
.exec();
|
|
144
|
+
if (doc === null) {
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
147
|
+
return doc;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* タスクIDから実行結果とステータスを保管する
|
|
151
|
+
* Abortedの場合、dateAbortedもセットする
|
|
152
|
+
*/
|
|
153
|
+
async setExecutionResultAndStatus(params, update) {
|
|
154
|
+
const { id } = params;
|
|
155
|
+
const { status, executionResult } = update;
|
|
156
|
+
await this.scheduledTaskModel.updateOne({ _id: { $eq: id } }, {
|
|
157
|
+
$set: {
|
|
158
|
+
status,
|
|
159
|
+
...(status === factory_1.factory.taskStatus.Aborted) ? { dateAborted: executionResult.endDate } : undefined // 2025-08-04~
|
|
160
|
+
},
|
|
161
|
+
$push: { executionResults: executionResult }
|
|
162
|
+
})
|
|
163
|
+
.exec();
|
|
164
|
+
}
|
|
165
|
+
async deleteTooOldReadyTasks(params) {
|
|
166
|
+
return this.scheduledTaskModel.deleteMany({
|
|
167
|
+
'project.id': { $eq: params.project.id },
|
|
168
|
+
name: { $eq: params.name },
|
|
169
|
+
status: { $eq: factory_1.factory.taskStatus.Ready },
|
|
170
|
+
runsAt: { $lt: params.runsAt.$lt }
|
|
171
|
+
})
|
|
172
|
+
.exec();
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Runningのまま一定期間超過し、かつ、remainingNumberOfTries>0のタスクをReadyに変更する
|
|
176
|
+
*/
|
|
177
|
+
async retryScheduledTasks(params) {
|
|
178
|
+
const lastTriedAtShoudBeLessThan = (0, moment_1.default)()
|
|
179
|
+
.add(-params.intervalInMinutes, 'minutes')
|
|
180
|
+
.toDate();
|
|
181
|
+
return this.scheduledTaskModel.updateMany(
|
|
182
|
+
// retryOrAbortScheduledTasksインデックスと連動
|
|
183
|
+
{
|
|
184
|
+
status: { $eq: factory_1.factory.taskStatus.Running },
|
|
185
|
+
remainingNumberOfTries: { $gte: 1 }, // まだリトライ可能なもの
|
|
186
|
+
lastTriedAt: {
|
|
187
|
+
$exists: true,
|
|
188
|
+
$lt: lastTriedAtShoudBeLessThan
|
|
189
|
+
},
|
|
190
|
+
}, {
|
|
191
|
+
$set: {
|
|
192
|
+
status: factory_1.factory.taskStatus.Ready // 実行前に変更
|
|
193
|
+
}
|
|
194
|
+
})
|
|
195
|
+
.exec();
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* $eq:0をAbortedにする(タスク名称に関わらず)
|
|
199
|
+
* これらは中止されてもhubへ通知しない
|
|
200
|
+
*/
|
|
201
|
+
async abortScheduledTasks(params) {
|
|
202
|
+
const lastTriedAtShoudBeLessThan = (0, moment_1.default)()
|
|
203
|
+
.add(-params.intervalInMinutes, 'minutes')
|
|
204
|
+
.toDate();
|
|
205
|
+
return this.scheduledTaskModel.updateMany(
|
|
206
|
+
// retryOrAbortScheduledTasksインデックスと連動
|
|
207
|
+
{
|
|
208
|
+
status: { $eq: factory_1.factory.taskStatus.Running },
|
|
209
|
+
remainingNumberOfTries: { $eq: 0 },
|
|
210
|
+
lastTriedAt: {
|
|
211
|
+
$exists: true,
|
|
212
|
+
$lt: lastTriedAtShoudBeLessThan
|
|
213
|
+
},
|
|
214
|
+
}, {
|
|
215
|
+
$set: {
|
|
216
|
+
status: factory_1.factory.taskStatus.Aborted,
|
|
217
|
+
dateAborted: new Date()
|
|
218
|
+
}
|
|
219
|
+
})
|
|
220
|
+
.exec();
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
exports.ScheduledTaskRepo = ScheduledTaskRepo;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Connection } from 'mongoose';
|
|
1
|
+
import { Connection, mongo } from 'mongoose';
|
|
3
2
|
import { factory } from '../factory';
|
|
4
3
|
type IMakesOffer = Pick<factory.seller.IMakesOffer, 'typeOf' | 'availableAtOrFrom' | 'eligibleTransactionDuration'>;
|
|
5
4
|
type IMakesOfferAsFindResult = IMakesOffer & {
|
|
@@ -51,7 +50,7 @@ export declare class SellerMakesOfferRepo {
|
|
|
51
50
|
id: string;
|
|
52
51
|
};
|
|
53
52
|
}[];
|
|
54
|
-
}): Promise<BulkWriteResult | undefined>;
|
|
53
|
+
}): Promise<mongo.BulkWriteResult | undefined>;
|
|
55
54
|
/**
|
|
56
55
|
* 販売者とアプリケーションに対してオファーが存在すれば削除する
|
|
57
56
|
*/
|
|
@@ -67,6 +66,6 @@ export declare class SellerMakesOfferRepo {
|
|
|
67
66
|
id: string;
|
|
68
67
|
};
|
|
69
68
|
}[];
|
|
70
|
-
}): Promise<BulkWriteResult | undefined>;
|
|
69
|
+
}): Promise<mongo.BulkWriteResult | undefined>;
|
|
71
70
|
}
|
|
72
71
|
export {};
|