@chevre/domain 24.0.0-alpha.40 → 24.0.0-alpha.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/chevre/repo/accountTitle.d.ts +3 -3
- package/lib/chevre/repo/action/pay.d.ts +25 -0
- package/lib/chevre/repo/action/pay.js +54 -0
- package/lib/chevre/repo/action/refund.d.ts +9 -0
- package/lib/chevre/repo/action/refund.js +13 -0
- package/lib/chevre/repo/action.d.ts +5 -14
- package/lib/chevre/repo/action.js +20 -13
- package/lib/chevre/repo/additionalProperty.js +2 -2
- package/lib/chevre/repo/advanceBookingRequirement.d.ts +1 -3
- package/lib/chevre/repo/advanceBookingRequirement.js +2 -2
- package/lib/chevre/repo/aggregateOffer.d.ts +5 -9
- package/lib/chevre/repo/aggregateOffer.js +3 -3
- package/lib/chevre/repo/assetTransaction.d.ts +3 -3
- package/lib/chevre/repo/assetTransaction.js +12 -6
- package/lib/chevre/repo/categoryCode.d.ts +4 -6
- package/lib/chevre/repo/categoryCode.js +2 -2
- package/lib/chevre/repo/comment.d.ts +3 -3
- package/lib/chevre/repo/creativeWork.d.ts +3 -3
- package/lib/chevre/repo/creativeWork.js +3 -3
- package/lib/chevre/repo/customer.d.ts +3 -3
- package/lib/chevre/repo/customer.js +2 -2
- package/lib/chevre/repo/emailMessage.js +1 -1
- package/lib/chevre/repo/event.d.ts +6 -6
- package/lib/chevre/repo/event.js +10 -4
- package/lib/chevre/repo/eventSeries.d.ts +6 -6
- package/lib/chevre/repo/eventSeries.js +2 -2
- package/lib/chevre/repo/identity.d.ts +4 -6
- package/lib/chevre/repo/identityProvider.d.ts +4 -6
- package/lib/chevre/repo/identityProvider.js +2 -2
- package/lib/chevre/repo/issuer.d.ts +3 -3
- package/lib/chevre/repo/issuer.js +3 -3
- package/lib/chevre/repo/member.d.ts +3 -3
- package/lib/chevre/repo/merchantReturnPolicy.d.ts +3 -3
- package/lib/chevre/repo/merchantReturnPolicy.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/acceptedPaymentMethod.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/account.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/accountTitle.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/accountTransaction.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/accountingReport.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/action.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/actionRecipe.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/additionalProperty.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/advanceBookingRequirement.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/aggregateOffer.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/aggregateOrder.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/aggregateReservation.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/aggregation.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/assetTransaction.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/authorization.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/categoryCode.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/civicStructure.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/comments.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/creativeWork.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/customer.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/customerType.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/emailMessages.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/event.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/eventOffer.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/eventSeries.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/identity.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/identityProvider.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/issuer.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/member/global.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/member.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/merchantReturnPolicy.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/message.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/movieTicketTypes.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/note.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/offerCatalog.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/offerCatalogItem.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/offerItemCondition.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/order.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/ownershipInfo.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/paymentService.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/paymentServiceChannel.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/pendingReservation.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/pendingReservationAggregate.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/place.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/potentialAction.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/priceSpecification.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/product.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/productModel.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/productOffer.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/project.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/reserveInterface.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/role.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/schedule.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/seller.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/sellerReturnPolicy.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/service/availableHour.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/serviceOutput.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/setting.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/task.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/ticket.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/transaction.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/transactionNumber.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/trip.d.ts +2 -2
- package/lib/chevre/repo/mongoose/schemas/webSite.d.ts +2 -2
- package/lib/chevre/repo/movieTicketType.d.ts +1 -3
- package/lib/chevre/repo/movieTicketType.js +2 -2
- package/lib/chevre/repo/offer/offerInCatalogReadOnly.d.ts +1 -3
- package/lib/chevre/repo/offer/unitPriceInCatalog.d.ts +1 -3
- package/lib/chevre/repo/offerCatalog.d.ts +3 -3
- package/lib/chevre/repo/offerCatalog.js +5 -4
- package/lib/chevre/repo/offerCatalogItem.js +4 -4
- package/lib/chevre/repo/offerItemCondition.js +2 -2
- package/lib/chevre/repo/order.d.ts +3 -3
- package/lib/chevre/repo/ownershipInfo.d.ts +3 -3
- package/lib/chevre/repo/passport.js +1 -1
- package/lib/chevre/repo/paymentService.d.ts +1 -3
- package/lib/chevre/repo/paymentService.js +2 -2
- package/lib/chevre/repo/paymentServiceChannel.d.ts +1 -3
- package/lib/chevre/repo/paymentServiceChannel.js +2 -2
- package/lib/chevre/repo/person.js +2 -2
- package/lib/chevre/repo/place/busStop.js +1 -1
- package/lib/chevre/repo/place/movieTheater.d.ts +3 -3
- package/lib/chevre/repo/place/movieTheater.js +10 -4
- package/lib/chevre/repo/place/screeningRoom.d.ts +3 -3
- package/lib/chevre/repo/place/screeningRoom.js +2 -2
- package/lib/chevre/repo/place/seat.d.ts +2 -4
- package/lib/chevre/repo/potentialAction.d.ts +4 -6
- package/lib/chevre/repo/potentialAction.js +2 -2
- package/lib/chevre/repo/priceSpecification.d.ts +3 -3
- package/lib/chevre/repo/priceSpecification.js +2 -2
- package/lib/chevre/repo/product.d.ts +5 -9
- package/lib/chevre/repo/product.js +3 -3
- package/lib/chevre/repo/productModel.js +2 -2
- package/lib/chevre/repo/project.d.ts +3 -3
- package/lib/chevre/repo/rateLimit/offer.js +1 -1
- package/lib/chevre/repo/reservation.d.ts +4 -6
- package/lib/chevre/repo/seller.d.ts +5 -9
- package/lib/chevre/repo/seller.js +2 -2
- package/lib/chevre/repo/sellerReturnPolicy.d.ts +1 -3
- package/lib/chevre/repo/sellerReturnPolicy.js +2 -2
- package/lib/chevre/repo/task.d.ts +3 -3
- package/lib/chevre/repo/task.js +1 -1
- package/lib/chevre/repo/transaction.d.ts +3 -3
- package/lib/chevre/repo/transactionProcess.js +1 -1
- package/lib/chevre/repo/trip.d.ts +4 -12
- package/lib/chevre/repo/trip.js +3 -3
- package/lib/chevre/repo/webSite.d.ts +1 -3
- package/lib/chevre/repo/webSite.js +3 -2
- package/lib/chevre/repository.d.ts +10 -0
- package/lib/chevre/repository.js +22 -0
- package/lib/chevre/service/assetTransaction/moneyTransfer.js +8 -5
- package/lib/chevre/service/assetTransaction/pay/confirm.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/pay/exportTasksById.js +2 -1
- package/lib/chevre/service/assetTransaction/pay/publishPaymentUrl.js +2 -1
- package/lib/chevre/service/assetTransaction/pay/start/factory.js +2 -1
- package/lib/chevre/service/assetTransaction/pay/start/processAuthorize.d.ts +7 -2
- package/lib/chevre/service/assetTransaction/pay/start/processAuthorizeMovieTicket.d.ts +7 -2
- package/lib/chevre/service/assetTransaction/pay/start.d.ts +7 -2
- package/lib/chevre/service/assetTransaction/refund.d.ts +5 -2
- package/lib/chevre/service/assetTransaction/refund.js +1 -1
- package/lib/chevre/service/assetTransaction/reserve/start/createSubReservations.js +6 -3
- package/lib/chevre/service/assetTransaction/reserve/start/factory/createStartParams.js +3 -2
- package/lib/chevre/service/delivery/factory.js +2 -1
- package/lib/chevre/service/event/saveScreeningEvents.js +2 -2
- package/lib/chevre/service/event.js +1 -1
- package/lib/chevre/service/notification/notifyByEmail.d.ts +1 -1
- package/lib/chevre/service/notification/triggerWebhook.js +1 -1
- package/lib/chevre/service/offer/event/authorize.js +2 -1
- package/lib/chevre/service/offer/event/searchEventTicketOffers.js +2 -1
- package/lib/chevre/service/offer/event/searchOffersByIds.js +2 -1
- package/lib/chevre/service/offer/event/voidTransaction.js +6 -3
- package/lib/chevre/service/offer/event/voidTransactionByActionId.js +2 -1
- package/lib/chevre/service/offer/eventServiceByCOA/authorize/factory.js +14 -11
- package/lib/chevre/service/offer/eventServiceByCOA/authorize.d.ts +1 -1
- package/lib/chevre/service/offer/eventServiceByCOA/changeOffers.d.ts +1 -1
- package/lib/chevre/service/offer/eventServiceByCOA/findAcceptAction.js +2 -1
- package/lib/chevre/service/offer/product.js +1 -1
- package/lib/chevre/service/order/confirmPayTransaction.d.ts +1 -1
- package/lib/chevre/service/order/onAssetTransactionStatusChanged.js +2 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned.js +4 -2
- package/lib/chevre/service/payment/any/authorize.d.ts +7 -2
- package/lib/chevre/service/payment/any/findAcceptAction.js +2 -1
- package/lib/chevre/service/payment/any/findAuthorizeAction.js +2 -1
- package/lib/chevre/service/payment/any/findCheckAction.js +2 -1
- package/lib/chevre/service/payment/any/invalidatePaymentUrl.js +2 -1
- package/lib/chevre/service/payment/any/onPayActionCompleted.d.ts +7 -2
- package/lib/chevre/service/payment/any/onPayActionCompleted.js +7 -2
- package/lib/chevre/service/payment/any/onPaymentStatusChanged.d.ts +10 -5
- package/lib/chevre/service/payment/any/onPaymentStatusChanged.js +21 -11
- package/lib/chevre/service/payment/any/onRefundActionCompletedOrFailed.d.ts +13 -10
- package/lib/chevre/service/payment/any/onRefundActionCompletedOrFailed.js +9 -6
- package/lib/chevre/service/payment/any/processVoidPayTransaction.js +2 -1
- package/lib/chevre/service/payment/any/verifyTicketTokenAsNeeded.js +2 -1
- package/lib/chevre/service/payment/creditCard/authorize/processAuthorizeCreditCard.js +1 -1
- package/lib/chevre/service/payment/creditCard/payCreditCard.d.ts +7 -2
- package/lib/chevre/service/payment/creditCard/payCreditCard.js +8 -4
- package/lib/chevre/service/payment/creditCard/refundCreditCard.d.ts +7 -2
- package/lib/chevre/service/payment/creditCard/refundCreditCard.js +11 -7
- package/lib/chevre/service/payment/faceToFace.d.ts +12 -3
- package/lib/chevre/service/payment/faceToFace.js +16 -8
- package/lib/chevre/service/payment/factory/createPayObjectServiceOutput.js +2 -1
- package/lib/chevre/service/payment/factory.js +4 -2
- package/lib/chevre/service/payment/movieTicket/authorize.d.ts +7 -2
- package/lib/chevre/service/payment/movieTicket/authorize.js +1 -1
- package/lib/chevre/service/payment/movieTicket/payMovieTicket/payActionParams2seatInfoSyncIn.d.ts +12 -0
- package/lib/chevre/service/payment/movieTicket/payMovieTicket/payActionParams2seatInfoSyncIn.js +72 -0
- package/lib/chevre/service/payment/movieTicket/payMovieTicket/processSeatInfoSync.d.ts +8 -0
- package/lib/chevre/service/payment/movieTicket/payMovieTicket/processSeatInfoSync.js +29 -0
- package/lib/chevre/service/payment/movieTicket/payMovieTicket.d.ts +8 -3
- package/lib/chevre/service/payment/movieTicket/payMovieTicket.js +14 -77
- package/lib/chevre/service/payment/movieTicket/refundMovieTicket/createSeatInfoSyncCancelInOnRefund.d.ts +14 -0
- package/lib/chevre/service/payment/movieTicket/refundMovieTicket/createSeatInfoSyncCancelInOnRefund.js +49 -0
- package/lib/chevre/service/payment/movieTicket/refundMovieTicket/createSeatInfoSyncInOnRefund.d.ts +14 -0
- package/lib/chevre/service/payment/movieTicket/refundMovieTicket/createSeatInfoSyncInOnRefund.js +46 -0
- package/lib/chevre/service/payment/movieTicket/refundMovieTicket/processSeatInfoSync.d.ts +12 -0
- package/lib/chevre/service/payment/movieTicket/refundMovieTicket/processSeatInfoSync.js +72 -0
- package/lib/chevre/service/payment/movieTicket/refundMovieTicket/processSeatInfoSyncCancel.d.ts +8 -0
- package/lib/chevre/service/payment/movieTicket/refundMovieTicket/processSeatInfoSyncCancel.js +60 -0
- package/lib/chevre/service/payment/movieTicket/refundMovieTicket.d.ts +8 -3
- package/lib/chevre/service/payment/movieTicket/refundMovieTicket.js +20 -125
- package/lib/chevre/service/payment/movieTicket/validation.d.ts +1 -2
- package/lib/chevre/service/payment/movieTicket/validation.js +37 -29
- package/lib/chevre/service/payment/movieTicket/voidTransaction.d.ts +6 -2
- package/lib/chevre/service/payment/movieTicket/voidTransaction.js +1 -1
- package/lib/chevre/service/payment/paymentCard.d.ts +12 -3
- package/lib/chevre/service/payment/paymentCard.js +16 -8
- package/lib/chevre/service/permit.js +4 -2
- package/lib/chevre/service/reserve/factory.d.ts +1 -1
- package/lib/chevre/service/reserve/findByCode.js +2 -1
- package/lib/chevre/service/reserve/searchByOrder.js +2 -1
- package/lib/chevre/service/reserve/verifyToken4reservation.js +2 -1
- package/lib/chevre/service/task/authorizePayment.js +8 -2
- package/lib/chevre/service/task/confirmReserveTransaction.js +4 -2
- package/lib/chevre/service/task/invalidatePaymentUrl.js +8 -2
- package/lib/chevre/service/task/onResourceUpdated.js +1 -1
- package/lib/chevre/service/task/pay.js +8 -2
- package/lib/chevre/service/task/payment/invalidatePaymentUrlByTask.d.ts +7 -2
- package/lib/chevre/service/task/payment/payByTask.d.ts +7 -2
- package/lib/chevre/service/task/payment/payByTask.js +2 -1
- package/lib/chevre/service/task/payment/refundByTask.d.ts +7 -2
- package/lib/chevre/service/task/payment/voidPaymentByTask.d.ts +6 -0
- package/lib/chevre/service/task/refund.js +8 -2
- package/lib/chevre/service/task/returnPayTransaction.js +5 -2
- package/lib/chevre/service/task/returnReserveTransaction.js +2 -1
- package/lib/chevre/service/task/voidPayment.js +6 -0
- package/lib/chevre/service/transaction/deleteTransaction.js +4 -2
- package/lib/chevre/service/transaction/placeOrder/exportTasks/factory.js +2 -1
- package/lib/chevre/service/transaction/returnOrder/exportTasks/factory.js +2 -1
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.js +2 -2
- package/lib/chevre/service/transaction/returnOrder/preStart/getReturnPolicyByProject.js +5 -3
- package/lib/chevre/service/validation/validateOrder.js +4 -2
- package/package.json +2 -2
|
@@ -12,15 +12,15 @@ export declare class AccountTitleRepo {
|
|
|
12
12
|
id: string;
|
|
13
13
|
};
|
|
14
14
|
}): Promise<void>;
|
|
15
|
-
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown,
|
|
15
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, factory.accountTitle.IAccountTitle, import("./mongoose/virtuals").IVirtuals, {}> & factory.accountTitle.IAccountTitle & {
|
|
16
16
|
_id: import("mongoose").Types.ObjectId;
|
|
17
17
|
} & {
|
|
18
18
|
__v: number;
|
|
19
|
-
},
|
|
19
|
+
}, import("mongoose").QueryOptions<factory.accountTitle.IAccountTitle>, (import("mongoose").Document<unknown, Record<string, never>, factory.accountTitle.IAccountTitle, import("./mongoose/virtuals").IVirtuals, {}> & factory.accountTitle.IAccountTitle & {
|
|
20
20
|
_id: import("mongoose").Types.ObjectId;
|
|
21
21
|
} & {
|
|
22
22
|
__v: number;
|
|
23
|
-
}
|
|
23
|
+
}) | null>;
|
|
24
24
|
unsetUnnecessaryFields(params: {
|
|
25
25
|
filter: any;
|
|
26
26
|
$unset: any;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as factory from '../../factory';
|
|
2
|
+
import { ActionProcessRepo } from './actionProcess';
|
|
3
|
+
export type IPayAction = factory.action.trade.pay.IAction;
|
|
4
|
+
export type IActionRecipe = factory.action.trade.pay.IPayCreditCardRecipe | factory.action.trade.pay.IPayMovieTicketRecipe;
|
|
5
|
+
/**
|
|
6
|
+
* 決済アクションリポジトリ
|
|
7
|
+
*/
|
|
8
|
+
export declare class PayActionRepo extends ActionProcessRepo<IPayAction, IActionRecipe> {
|
|
9
|
+
/**
|
|
10
|
+
* 決済方法IDから決済アクションをひとつ参照する
|
|
11
|
+
* デフォルトでCompletedActionStatusのみ参照
|
|
12
|
+
*/
|
|
13
|
+
findPayActionByPaymentMethodId(params: {
|
|
14
|
+
project: {
|
|
15
|
+
id: string;
|
|
16
|
+
};
|
|
17
|
+
paymentMethodId: string;
|
|
18
|
+
/**
|
|
19
|
+
* 未指定の場合CompletedActionStatusのみ
|
|
20
|
+
*/
|
|
21
|
+
actionStatus?: {
|
|
22
|
+
$in?: factory.actionStatusType[];
|
|
23
|
+
};
|
|
24
|
+
}): Promise<factory.action.trade.pay.IAction | undefined>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.PayActionRepo = void 0;
|
|
27
|
+
const factory = __importStar(require("../../factory"));
|
|
28
|
+
// import { MONGO_MAX_TIME_MS } from '../settings';
|
|
29
|
+
// import { createSchema, IModel as IActionModel, modelName } from './mongoose/schemas/action';
|
|
30
|
+
// import { createSchema as createRecipeSchema, IModel as IActionRecipeModel, modelName as recipeModelName } from './mongoose/schemas/actionRecipe';
|
|
31
|
+
const actionProcess_1 = require("./actionProcess");
|
|
32
|
+
/**
|
|
33
|
+
* 決済アクションリポジトリ
|
|
34
|
+
*/
|
|
35
|
+
class PayActionRepo extends actionProcess_1.ActionProcessRepo {
|
|
36
|
+
/**
|
|
37
|
+
* 決済方法IDから決済アクションをひとつ参照する
|
|
38
|
+
* デフォルトでCompletedActionStatusのみ参照
|
|
39
|
+
*/
|
|
40
|
+
async findPayActionByPaymentMethodId(params) {
|
|
41
|
+
const payActions = await this.findAnyActions({
|
|
42
|
+
limit: 1,
|
|
43
|
+
page: 1,
|
|
44
|
+
actionStatus: (Array.isArray(params.actionStatus?.$in))
|
|
45
|
+
? { $in: params.actionStatus?.$in }
|
|
46
|
+
: { $in: [factory.actionStatusType.CompletedActionStatus] },
|
|
47
|
+
project: { id: { $eq: params.project.id } },
|
|
48
|
+
typeOf: { $eq: factory.actionType.PayAction },
|
|
49
|
+
object: { paymentMethod: { paymentMethodId: { $eq: params.paymentMethodId } } }
|
|
50
|
+
}, []);
|
|
51
|
+
return payActions.shift();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.PayActionRepo = PayActionRepo;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as factory from '../../factory';
|
|
2
|
+
import { ActionProcessRepo } from './actionProcess';
|
|
3
|
+
export type IRefundAction = factory.action.trade.refund.IAction;
|
|
4
|
+
export type IActionRecipe = factory.action.trade.refund.IRefundCreditCardRecipe | factory.action.trade.refund.IRefundMovieTicketRecipe;
|
|
5
|
+
/**
|
|
6
|
+
* 返金アクションリポジトリ
|
|
7
|
+
*/
|
|
8
|
+
export declare class RefundActionRepo extends ActionProcessRepo<IRefundAction, IActionRecipe> {
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RefundActionRepo = void 0;
|
|
4
|
+
// import { MONGO_MAX_TIME_MS } from '../settings';
|
|
5
|
+
// import { createSchema, IModel as IActionModel, modelName } from './mongoose/schemas/action';
|
|
6
|
+
// import { createSchema as createRecipeSchema, IModel as IActionRecipeModel, modelName as recipeModelName } from './mongoose/schemas/actionRecipe';
|
|
7
|
+
const actionProcess_1 = require("./actionProcess");
|
|
8
|
+
/**
|
|
9
|
+
* 返金アクションリポジトリ
|
|
10
|
+
*/
|
|
11
|
+
class RefundActionRepo extends actionProcess_1.ActionProcessRepo {
|
|
12
|
+
}
|
|
13
|
+
exports.RefundActionRepo = RefundActionRepo;
|
|
@@ -7,8 +7,8 @@ export { ICancelActionAction };
|
|
|
7
7
|
/**
|
|
8
8
|
* 汎用アクションリポジトリで開始可能なアクションタイプ
|
|
9
9
|
*/
|
|
10
|
-
type StartableActionType = Exclude<factory.actionType, factory.actionType.AcceptAction | factory.actionType.CheckAction | factory.actionType.AuthorizeAction>;
|
|
11
|
-
type IAvailableActionRecipe = IActionRecipe<Exclude<factory.recipe.RecipeCategory, factory.recipe.RecipeCategory.publishPaymentUrl | factory.recipe.RecipeCategory.checkMovieTicket | factory.recipe.RecipeCategory.acceptCOAOffer | factory.recipe.RecipeCategory.authorizeInvoice | factory.recipe.RecipeCategory.authorizeInvoice3ds>>;
|
|
10
|
+
type StartableActionType = Exclude<factory.actionType, factory.actionType.AcceptAction | factory.actionType.CheckAction | factory.actionType.AuthorizeAction | factory.actionType.PayAction | factory.actionType.RefundAction>;
|
|
11
|
+
type IAvailableActionRecipe = IActionRecipe<Exclude<factory.recipe.RecipeCategory, factory.recipe.RecipeCategory.publishPaymentUrl | factory.recipe.RecipeCategory.checkMovieTicket | factory.recipe.RecipeCategory.acceptCOAOffer | factory.recipe.RecipeCategory.authorizeInvoice | factory.recipe.RecipeCategory.authorizeInvoice3ds | factory.recipe.RecipeCategory.payCreditCard | factory.recipe.RecipeCategory.payMovieTicket | factory.recipe.RecipeCategory.refundCreditCard | factory.recipe.RecipeCategory.refundMovieTicket>>;
|
|
12
12
|
/**
|
|
13
13
|
* アクションリポジトリ
|
|
14
14
|
*/
|
|
@@ -21,15 +21,6 @@ export declare class ActionRepo extends ActionProcessRepo<IAction<StartableActio
|
|
|
21
21
|
$eq?: T;
|
|
22
22
|
};
|
|
23
23
|
}, inclusion: IKeyOfProjection[]): Promise<IAction<T>[]>;
|
|
24
|
-
findPayAction(params: {
|
|
25
|
-
project: {
|
|
26
|
-
id: string;
|
|
27
|
-
};
|
|
28
|
-
paymentMethodId: string;
|
|
29
|
-
actionStatus?: {
|
|
30
|
-
$in?: factory.actionStatusType[];
|
|
31
|
-
};
|
|
32
|
-
}): Promise<factory.action.trade.pay.IAction | undefined>;
|
|
33
24
|
/**
|
|
34
25
|
* 取引に対するアクションを検索する
|
|
35
26
|
*/
|
|
@@ -98,19 +89,19 @@ export declare class ActionRepo extends ActionProcessRepo<IAction<StartableActio
|
|
|
98
89
|
}): Promise<{
|
|
99
90
|
deletedCount?: number;
|
|
100
91
|
} | null>;
|
|
101
|
-
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown,
|
|
92
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<import("@chevre/factory/lib/action").IAction<import("@chevre/factory/lib/action").IAttributes<factory.actionType, any, any>>, "id"> & {
|
|
102
93
|
identifier?: string;
|
|
103
94
|
} & {
|
|
104
95
|
_id: import("mongoose").Types.ObjectId;
|
|
105
96
|
} & {
|
|
106
97
|
__v: number;
|
|
107
|
-
},
|
|
98
|
+
}, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<import("@chevre/factory/lib/action").IAction<import("@chevre/factory/lib/action").IAttributes<factory.actionType, any, any>>, "id"> & {
|
|
108
99
|
identifier?: string;
|
|
109
100
|
} & {
|
|
110
101
|
_id: import("mongoose").Types.ObjectId;
|
|
111
102
|
} & {
|
|
112
103
|
__v: number;
|
|
113
|
-
}
|
|
104
|
+
}) | null>;
|
|
114
105
|
unsetUnnecessaryFields(params: {
|
|
115
106
|
filter: FilterQuery<factory.action.IAction<factory.action.IAttributes<factory.actionType, any, any>>>;
|
|
116
107
|
$unset: any;
|
|
@@ -280,19 +280,26 @@ class ActionRepo extends actionProcess_1.ActionProcessRepo {
|
|
|
280
280
|
// }
|
|
281
281
|
// return doc;
|
|
282
282
|
// }
|
|
283
|
-
async findPayAction(params
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
}
|
|
283
|
+
// public async findPayAction(params: {
|
|
284
|
+
// project: { id: string };
|
|
285
|
+
// paymentMethodId: string;
|
|
286
|
+
// actionStatus?: { $in?: factory.actionStatusType[] };
|
|
287
|
+
// }): Promise<factory.action.trade.pay.IAction | undefined> {
|
|
288
|
+
// const payActions = await this.findActionsByType<factory.actionType.PayAction>(
|
|
289
|
+
// {
|
|
290
|
+
// limit: 1,
|
|
291
|
+
// page: 1,
|
|
292
|
+
// actionStatus: (Array.isArray(params.actionStatus?.$in))
|
|
293
|
+
// ? { $in: params.actionStatus?.$in }
|
|
294
|
+
// : { $in: [factory.actionStatusType.CompletedActionStatus] },
|
|
295
|
+
// project: { id: { $eq: params.project.id } },
|
|
296
|
+
// typeOf: { $eq: factory.actionType.PayAction },
|
|
297
|
+
// object: { paymentMethod: { paymentMethodId: { $eq: params.paymentMethodId } } }
|
|
298
|
+
// },
|
|
299
|
+
// []
|
|
300
|
+
// ) as factory.action.trade.pay.IAction[];
|
|
301
|
+
// return payActions.shift();
|
|
302
|
+
// }
|
|
296
303
|
/**
|
|
297
304
|
* 取引に対するアクションを検索する
|
|
298
305
|
*/
|
|
@@ -114,12 +114,12 @@ class AdditionalPropertyRepo {
|
|
|
114
114
|
let savedId;
|
|
115
115
|
let doc;
|
|
116
116
|
if (typeof params.id !== 'string') {
|
|
117
|
-
const { id, ...createParams } = params.attributes;
|
|
117
|
+
const { id, ...createParams } = params.attributes; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
118
118
|
doc = await this.additionalPropertyModel.create(createParams);
|
|
119
119
|
savedId = doc.id;
|
|
120
120
|
}
|
|
121
121
|
else {
|
|
122
|
-
const { id, codeValue, inCodeSet, project, typeOf, ...updateFields } = params.attributes;
|
|
122
|
+
const { id, codeValue, inCodeSet, project, typeOf, ...updateFields } = params.attributes; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
123
123
|
doc = await this.additionalPropertyModel.findOneAndUpdate({ _id: { $eq: params.id } }, updateFields, { upsert: false, new: true, projection: { _id: 1 } })
|
|
124
124
|
.exec();
|
|
125
125
|
savedId = params.id;
|
|
@@ -5,9 +5,7 @@ export type ISavingRequirement = Pick<factory.advanceBookingRequirement.IAdvance
|
|
|
5
5
|
id?: never;
|
|
6
6
|
};
|
|
7
7
|
interface IUnset {
|
|
8
|
-
$unset?:
|
|
9
|
-
[key: string]: 1;
|
|
10
|
-
};
|
|
8
|
+
$unset?: Record<string, 1>;
|
|
11
9
|
}
|
|
12
10
|
type IRequirementWithId = factory.advanceBookingRequirement.IAdvanceBookingRequirement & {
|
|
13
11
|
id: string;
|
|
@@ -67,7 +67,7 @@ class AdvanceBookingRequirementRepo {
|
|
|
67
67
|
if (savingId === '') {
|
|
68
68
|
throw new factory.errors.ArgumentNull('id');
|
|
69
69
|
}
|
|
70
|
-
const { id, identifier, project, typeOf, $unset, ...updateFields } = params.attributes;
|
|
70
|
+
const { id, identifier, project, typeOf, $unset, ...updateFields } = params.attributes; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
71
71
|
const filter = {
|
|
72
72
|
_id: { $eq: savingId },
|
|
73
73
|
'project.id': { $eq: project.id }
|
|
@@ -90,7 +90,7 @@ class AdvanceBookingRequirementRepo {
|
|
|
90
90
|
savedId = savingId;
|
|
91
91
|
}
|
|
92
92
|
else {
|
|
93
|
-
const { $unset, id, ...createParams } = params.attributes;
|
|
93
|
+
const { $unset, id, ...createParams } = params.attributes; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
94
94
|
const result = await this.advanceBookingRequirementModel.insertMany(createParams, { rawResult: true });
|
|
95
95
|
const insertedId = result.insertedIds?.[0]?.toHexString();
|
|
96
96
|
if (typeof insertedId !== 'string') {
|
|
@@ -4,9 +4,7 @@ import * as factory from '../factory';
|
|
|
4
4
|
import { IDocType as IAggregateOfferDocType } from './mongoose/schemas/aggregateOffer';
|
|
5
5
|
type IMatchStage = PipelineStage.Match;
|
|
6
6
|
type KeyOfUnitPriceOffer = keyof factory.unitPriceOffer.IUnitPriceOffer;
|
|
7
|
-
type IProjection =
|
|
8
|
-
[key in KeyOfUnitPriceOffer]?: 0 | 1;
|
|
9
|
-
};
|
|
7
|
+
type IProjection = Partial<Record<KeyOfUnitPriceOffer, 0 | 1>>;
|
|
10
8
|
/**
|
|
11
9
|
* 集計オファーリポジトリ
|
|
12
10
|
*/
|
|
@@ -14,9 +12,7 @@ export declare class AggregateOfferRepo {
|
|
|
14
12
|
private readonly aggregateOfferModel;
|
|
15
13
|
constructor(connection: Connection);
|
|
16
14
|
static CREATE_MATCH_STAGE(params: Omit<factory.unitPriceOffer.ISearchConditions, 'limit' | 'page' | 'sort'>): IMatchStage[];
|
|
17
|
-
static CREATE_AGGREGATE_OFFERS_PROJECTION(params: IProjection):
|
|
18
|
-
[field: string]: AnyExpression;
|
|
19
|
-
};
|
|
15
|
+
static CREATE_AGGREGATE_OFFERS_PROJECTION(params: IProjection): Record<string, AnyExpression>;
|
|
20
16
|
search(params: factory.unitPriceOffer.ISearchConditions, projection?: IProjection): Promise<factory.aggregateOffer.IAggregateOffer[]>;
|
|
21
17
|
pushIncludedInDataCatalog(params: {
|
|
22
18
|
project: {
|
|
@@ -59,15 +55,15 @@ export declare class AggregateOfferRepo {
|
|
|
59
55
|
};
|
|
60
56
|
id: string;
|
|
61
57
|
}): Promise<void>;
|
|
62
|
-
getCursor(conditions: any, projection: any): import("mongoose").Cursor<Document<unknown,
|
|
58
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<Document<unknown, Record<string, never>, IAggregateOfferDocType, import("./mongoose/virtuals").IVirtuals, {}> & IAggregateOfferDocType & Required<{
|
|
63
59
|
_id: string;
|
|
64
60
|
}> & {
|
|
65
61
|
__v: number;
|
|
66
|
-
},
|
|
62
|
+
}, import("mongoose").QueryOptions<IAggregateOfferDocType>, (Document<unknown, Record<string, never>, IAggregateOfferDocType, import("./mongoose/virtuals").IVirtuals, {}> & IAggregateOfferDocType & Required<{
|
|
67
63
|
_id: string;
|
|
68
64
|
}> & {
|
|
69
65
|
__v: number;
|
|
70
|
-
}
|
|
66
|
+
}) | null>;
|
|
71
67
|
unsetUnnecessaryFields(params: {
|
|
72
68
|
filter: FilterQuery<factory.aggregateOffer.IAggregateOffer>;
|
|
73
69
|
$unset: any;
|
|
@@ -578,7 +578,7 @@ class AggregateOfferRepo {
|
|
|
578
578
|
aggregateOfferId = newId;
|
|
579
579
|
// サブオファー最適化(2023-12-22~)
|
|
580
580
|
// savedUnitPriceOffer = { ...paramsWithoutUnset, id };
|
|
581
|
-
const { id, project, ...savedUnitPriceOffer } = paramsWithoutUnset;
|
|
581
|
+
const { id, project, ...savedUnitPriceOffer } = paramsWithoutUnset; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
582
582
|
const aggregateOffer = {
|
|
583
583
|
typeOf: factory.offerType.AggregateOffer,
|
|
584
584
|
project: params.project,
|
|
@@ -614,7 +614,7 @@ class AggregateOfferRepo {
|
|
|
614
614
|
throw new factory.errors.NotFound(factory.offerType.Offer);
|
|
615
615
|
}
|
|
616
616
|
// 上書き禁止属性を除外
|
|
617
|
-
const { id, identifier, project, typeOf, ...updateFields } = paramsWithoutUnset;
|
|
617
|
+
const { id, identifier, project, typeOf, ...updateFields } = paramsWithoutUnset; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
618
618
|
// サブオファー最適化(2023-12-22~)
|
|
619
619
|
const subOffer = {
|
|
620
620
|
...updateFields,
|
|
@@ -674,7 +674,7 @@ class AggregateOfferRepo {
|
|
|
674
674
|
});
|
|
675
675
|
const newOfferId = uniqid(); // setOnInsert時のみに利用する新ID
|
|
676
676
|
// サブオファー最適化(2023-12-22~)
|
|
677
|
-
const { project, ...subOffer } = p;
|
|
677
|
+
const { project, ...subOffer } = p; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
678
678
|
const aggregateOffer = {
|
|
679
679
|
project: p.project,
|
|
680
680
|
typeOf: factory.offerType.AggregateOffer,
|
|
@@ -285,7 +285,7 @@ export declare class AssetTransactionRepo {
|
|
|
285
285
|
findByIdAndDelete(params: {
|
|
286
286
|
id: string;
|
|
287
287
|
}): Promise<void>;
|
|
288
|
-
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown,
|
|
288
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & ((import("@chevre/factory/lib/assetTransaction/cancelReservation").IAttributes & {
|
|
289
289
|
id: string;
|
|
290
290
|
} & {
|
|
291
291
|
seller?: any;
|
|
@@ -333,7 +333,7 @@ export declare class AssetTransactionRepo {
|
|
|
333
333
|
_id: import("mongoose").Types.ObjectId;
|
|
334
334
|
} & {
|
|
335
335
|
__v: number;
|
|
336
|
-
})
|
|
336
|
+
})), import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & ((import("@chevre/factory/lib/assetTransaction/cancelReservation").IAttributes & {
|
|
337
337
|
id: string;
|
|
338
338
|
} & {
|
|
339
339
|
seller?: any;
|
|
@@ -381,7 +381,7 @@ export declare class AssetTransactionRepo {
|
|
|
381
381
|
_id: import("mongoose").Types.ObjectId;
|
|
382
382
|
} & {
|
|
383
383
|
__v: number;
|
|
384
|
-
})
|
|
384
|
+
}))) | null>;
|
|
385
385
|
unsetUnnecessaryFields(params: {
|
|
386
386
|
filter: any;
|
|
387
387
|
$unset: any;
|
|
@@ -122,7 +122,7 @@ class AssetTransactionRepo {
|
|
|
122
122
|
andConditions.push({ 'tasksExportAction.actionStatus': { $exists: true, $eq: tasksExportActionStatusEq } });
|
|
123
123
|
}
|
|
124
124
|
switch (params.typeOf) {
|
|
125
|
-
case factory.assetTransactionType.Pay:
|
|
125
|
+
case factory.assetTransactionType.Pay: {
|
|
126
126
|
const objectAccountIdEq = params.object?.accountId?.$eq;
|
|
127
127
|
if (typeof objectAccountIdEq === 'string') {
|
|
128
128
|
andConditions.push({ 'object.accountId': { $exists: true, $eq: objectAccountIdEq } });
|
|
@@ -132,7 +132,8 @@ class AssetTransactionRepo {
|
|
|
132
132
|
andConditions.push({ 'object.typeOf': { $exists: true, $eq: objectTypeOfEq } });
|
|
133
133
|
}
|
|
134
134
|
break;
|
|
135
|
-
|
|
135
|
+
}
|
|
136
|
+
case factory.assetTransactionType.Refund: {
|
|
136
137
|
const objectAccountIdEq4refund = params.object?.accountId?.$eq;
|
|
137
138
|
if (typeof objectAccountIdEq4refund === 'string') {
|
|
138
139
|
andConditions.push({
|
|
@@ -155,7 +156,8 @@ class AssetTransactionRepo {
|
|
|
155
156
|
});
|
|
156
157
|
}
|
|
157
158
|
break;
|
|
158
|
-
|
|
159
|
+
}
|
|
160
|
+
case factory.assetTransactionType.MoneyTransfer: {
|
|
159
161
|
const fromLocationIdentifierEq = params.object?.fromLocation?.identifier?.$eq;
|
|
160
162
|
if (typeof fromLocationIdentifierEq === 'string') {
|
|
161
163
|
andConditions.push({
|
|
@@ -184,7 +186,8 @@ class AssetTransactionRepo {
|
|
|
184
186
|
});
|
|
185
187
|
}
|
|
186
188
|
break;
|
|
187
|
-
|
|
189
|
+
}
|
|
190
|
+
case factory.assetTransactionType.CancelReservation: {
|
|
188
191
|
const objectReservationNumberIn4cancelReservation = params.object?.reservationNumber?.$in;
|
|
189
192
|
if (Array.isArray(objectReservationNumberIn4cancelReservation)) {
|
|
190
193
|
andConditions.push({
|
|
@@ -198,7 +201,8 @@ class AssetTransactionRepo {
|
|
|
198
201
|
});
|
|
199
202
|
}
|
|
200
203
|
break;
|
|
201
|
-
|
|
204
|
+
}
|
|
205
|
+
case factory.assetTransactionType.Reserve: {
|
|
202
206
|
const objectProviderIdEq = params.object?.provider?.id?.$eq;
|
|
203
207
|
if (typeof objectProviderIdEq === 'string') {
|
|
204
208
|
andConditions.push({ 'object.provider.id': { $exists: true, $eq: objectProviderIdEq } });
|
|
@@ -278,7 +282,8 @@ class AssetTransactionRepo {
|
|
|
278
282
|
});
|
|
279
283
|
}
|
|
280
284
|
break;
|
|
281
|
-
|
|
285
|
+
}
|
|
286
|
+
case factory.assetTransactionType.RegisterService: {
|
|
282
287
|
const objectItemOfferedServiceOutputIdentifierEq = params.object?.itemOffered?.serviceOutput?.identifier?.$eq;
|
|
283
288
|
if (typeof objectItemOfferedServiceOutputIdentifierEq === 'string') {
|
|
284
289
|
andConditions.push({
|
|
@@ -298,6 +303,7 @@ class AssetTransactionRepo {
|
|
|
298
303
|
});
|
|
299
304
|
}
|
|
300
305
|
break;
|
|
306
|
+
}
|
|
301
307
|
default:
|
|
302
308
|
}
|
|
303
309
|
return andConditions;
|
|
@@ -15,9 +15,7 @@ export declare class CategoryCodeRepo {
|
|
|
15
15
|
private readonly categoryCodeModel;
|
|
16
16
|
constructor(connection: Connection);
|
|
17
17
|
static CREATE_MONGO_CONDITIONS(params: factory.categoryCode.ISearchConditions): FilterQuery<factory.categoryCode.ICategoryCode>[];
|
|
18
|
-
static CREATE_AGGREGATE_PROJECTION(inclusion: IKeyOfProjection[]):
|
|
19
|
-
[field: string]: AnyExpression;
|
|
20
|
-
};
|
|
18
|
+
static CREATE_AGGREGATE_PROJECTION(inclusion: IKeyOfProjection[]): Record<string, AnyExpression>;
|
|
21
19
|
/**
|
|
22
20
|
* 区分集計検索(publicな属性検索が目的)
|
|
23
21
|
*/
|
|
@@ -67,15 +65,15 @@ export declare class CategoryCodeRepo {
|
|
|
67
65
|
id: string;
|
|
68
66
|
};
|
|
69
67
|
}): Promise<void>;
|
|
70
|
-
getCursor(conditions: FilterQuery<factory.categoryCode.ICategoryCode>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown,
|
|
68
|
+
getCursor(conditions: FilterQuery<factory.categoryCode.ICategoryCode>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & IDocType & {
|
|
71
69
|
_id: Types.ObjectId;
|
|
72
70
|
} & {
|
|
73
71
|
__v: number;
|
|
74
|
-
},
|
|
72
|
+
}, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & IDocType & {
|
|
75
73
|
_id: Types.ObjectId;
|
|
76
74
|
} & {
|
|
77
75
|
__v: number;
|
|
78
|
-
}
|
|
76
|
+
}) | null>;
|
|
79
77
|
unsetUnnecessaryFields(params: {
|
|
80
78
|
filter: FilterQuery<factory.categoryCode.ICategoryCode>;
|
|
81
79
|
$unset: any;
|
|
@@ -249,7 +249,7 @@ class CategoryCodeRepo {
|
|
|
249
249
|
let savedId;
|
|
250
250
|
// let doc: HydratedDocument<{ _id: Types.ObjectId }> | null;
|
|
251
251
|
if (typeof params.id !== 'string') {
|
|
252
|
-
const { id, $unset, ...creatingDoc } = params.attributes;
|
|
252
|
+
const { id, $unset, ...creatingDoc } = params.attributes; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
253
253
|
const createResult = await this.categoryCodeModel.create(creatingDoc);
|
|
254
254
|
// doc = createResult;
|
|
255
255
|
if (typeof createResult.id !== 'string') {
|
|
@@ -259,7 +259,7 @@ class CategoryCodeRepo {
|
|
|
259
259
|
}
|
|
260
260
|
else {
|
|
261
261
|
// 上書き禁止属性を除外(2022-08-24~)
|
|
262
|
-
const { id, codeValue, inCodeSet, project, typeOf, $unset, ...updateFields } = params.attributes;
|
|
262
|
+
const { id, codeValue, inCodeSet, project, typeOf, $unset, ...updateFields } = params.attributes; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
263
263
|
const doc = await this.categoryCodeModel.findOneAndUpdate({ _id: { $eq: params.id } }, {
|
|
264
264
|
$set: updateFields,
|
|
265
265
|
...($unset !== undefined) ? { $unset } : undefined
|
|
@@ -30,13 +30,13 @@ export declare class CommentRepo {
|
|
|
30
30
|
deleteById(params: {
|
|
31
31
|
id: string;
|
|
32
32
|
}): Promise<void>;
|
|
33
|
-
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown,
|
|
33
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, import("@chevre/factory/lib/creativeWork/comment").IComment, import("./mongoose/virtuals").IVirtuals, {}> & import("@chevre/factory/lib/creativeWork/comment").IComment & {
|
|
34
34
|
_id: import("mongoose").Types.ObjectId;
|
|
35
35
|
} & {
|
|
36
36
|
__v: number;
|
|
37
|
-
},
|
|
37
|
+
}, import("mongoose").QueryOptions<import("@chevre/factory/lib/creativeWork/comment").IComment>, (import("mongoose").Document<unknown, Record<string, never>, import("@chevre/factory/lib/creativeWork/comment").IComment, import("./mongoose/virtuals").IVirtuals, {}> & import("@chevre/factory/lib/creativeWork/comment").IComment & {
|
|
38
38
|
_id: import("mongoose").Types.ObjectId;
|
|
39
39
|
} & {
|
|
40
40
|
__v: number;
|
|
41
|
-
}
|
|
41
|
+
}) | null>;
|
|
42
42
|
}
|
|
@@ -49,19 +49,19 @@ export declare class CreativeWorkRepo {
|
|
|
49
49
|
id: string;
|
|
50
50
|
};
|
|
51
51
|
}): Promise<void>;
|
|
52
|
-
getCursor(conditions: FilterQuery<factory.creativeWork.movie.ICreativeWork>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown,
|
|
52
|
+
getCursor(conditions: FilterQuery<factory.creativeWork.movie.ICreativeWork>, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<import("@chevre/factory/lib/creativeWork/movie").ICreativeWork, "id"> & {
|
|
53
53
|
description?: string;
|
|
54
54
|
} & {
|
|
55
55
|
_id: Types.ObjectId;
|
|
56
56
|
} & {
|
|
57
57
|
__v: number;
|
|
58
|
-
},
|
|
58
|
+
}, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & Omit<import("@chevre/factory/lib/creativeWork/movie").ICreativeWork, "id"> & {
|
|
59
59
|
description?: string;
|
|
60
60
|
} & {
|
|
61
61
|
_id: Types.ObjectId;
|
|
62
62
|
} & {
|
|
63
63
|
__v: number;
|
|
64
|
-
}
|
|
64
|
+
}) | null>;
|
|
65
65
|
unsetUnnecessaryFields(params: {
|
|
66
66
|
filter: FilterQuery<factory.creativeWork.movie.ICreativeWork>;
|
|
67
67
|
$unset: any;
|
|
@@ -141,13 +141,13 @@ class CreativeWorkRepo {
|
|
|
141
141
|
let savedId;
|
|
142
142
|
let doc;
|
|
143
143
|
if (typeof params.id !== 'string' || params.id === '') {
|
|
144
|
-
const { $unset, id, ...createParams } = params; //
|
|
144
|
+
const { $unset, id, ...createParams } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
145
145
|
doc = await this.creativeWorkModel.create(createParams);
|
|
146
146
|
savedId = doc.id;
|
|
147
147
|
}
|
|
148
148
|
else {
|
|
149
149
|
// 上書き禁止属性を除外
|
|
150
|
-
const { id, identifier, project, typeOf, $unset, ...setFields } = params;
|
|
150
|
+
const { id, identifier, project, typeOf, $unset, ...setFields } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
151
151
|
doc = await this.creativeWorkModel.findOneAndUpdate({ _id: { $eq: params.id } }, {
|
|
152
152
|
$set: setFields,
|
|
153
153
|
...($unset !== undefined) ? { $unset } : undefined
|
|
@@ -177,7 +177,7 @@ class CreativeWorkRepo {
|
|
|
177
177
|
'project.id': { $eq: $set.project.id },
|
|
178
178
|
identifier: { $eq: $set.identifier }
|
|
179
179
|
};
|
|
180
|
-
const { id, identifier, project, typeOf, ...setFields } = $set;
|
|
180
|
+
const { id, identifier, project, typeOf, ...setFields } = $set; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
181
181
|
if (typeof identifier !== 'string' || identifier.length === 0) {
|
|
182
182
|
throw new factory.errors.ArgumentNull('identifier');
|
|
183
183
|
}
|
|
@@ -28,15 +28,15 @@ export declare class CustomerRepo {
|
|
|
28
28
|
deleteById(params: {
|
|
29
29
|
id: string;
|
|
30
30
|
}): Promise<void>;
|
|
31
|
-
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown,
|
|
31
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & IDocType & {
|
|
32
32
|
_id: import("mongoose").Types.ObjectId;
|
|
33
33
|
} & {
|
|
34
34
|
__v: number;
|
|
35
|
-
},
|
|
35
|
+
}, import("mongoose").QueryOptions<IDocType>, (import("mongoose").Document<unknown, Record<string, never>, IDocType, import("./mongoose/virtuals").IVirtuals, {}> & IDocType & {
|
|
36
36
|
_id: import("mongoose").Types.ObjectId;
|
|
37
37
|
} & {
|
|
38
38
|
__v: number;
|
|
39
|
-
}
|
|
39
|
+
}) | null>;
|
|
40
40
|
unsetUnnecessaryFields(params: {
|
|
41
41
|
filter: any;
|
|
42
42
|
$unset: any;
|
|
@@ -83,7 +83,7 @@ class CustomerRepo {
|
|
|
83
83
|
async save(params) {
|
|
84
84
|
let savedId;
|
|
85
85
|
if (params.id === undefined) {
|
|
86
|
-
const { id, $unset, ...creatingDoc } = params.attributes;
|
|
86
|
+
const { id, $unset, ...creatingDoc } = params.attributes; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
87
87
|
const result = await this.customerModel.insertMany(creatingDoc, { rawResult: true });
|
|
88
88
|
const insertedId = result.insertedIds?.[0]?.toHexString();
|
|
89
89
|
if (typeof insertedId !== 'string') {
|
|
@@ -92,7 +92,7 @@ class CustomerRepo {
|
|
|
92
92
|
savedId = insertedId;
|
|
93
93
|
}
|
|
94
94
|
else {
|
|
95
|
-
const { id, branchCode, project, typeOf, $unset, ...updateFields } = params.attributes;
|
|
95
|
+
const { id, branchCode, project, typeOf, $unset, ...updateFields } = params.attributes; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
96
96
|
const doc = await this.customerModel.findOneAndUpdate({ _id: { $eq: params.id } }, {
|
|
97
97
|
$set: updateFields,
|
|
98
98
|
...($unset !== undefined) ? { $unset } : undefined
|
|
@@ -68,7 +68,7 @@ class EmailMessageRepo {
|
|
|
68
68
|
}
|
|
69
69
|
else {
|
|
70
70
|
// 上書き禁止属性を除外(2022-08-24~)
|
|
71
|
-
const { id, identifier, project, typeOf, ...updateFields } = params;
|
|
71
|
+
const { id, identifier, project, typeOf, ...updateFields } = params; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
72
72
|
doc = await this.emailMessageModel.findOneAndUpdate({ _id: params.id }, updateFields, { upsert: false, new: true })
|
|
73
73
|
.exec();
|
|
74
74
|
}
|