@chevre/domain 21.0.0-alpha.8 → 21.0.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/errorHandler.d.ts +1 -0
- package/lib/chevre/errorHandler.js +6 -2
- package/lib/chevre/factory/event.d.ts +1 -1
- package/lib/chevre/repo/account.d.ts +0 -2
- package/lib/chevre/repo/account.js +6 -3
- package/lib/chevre/repo/accountTitle.js +5 -1
- package/lib/chevre/repo/accountTransaction.d.ts +0 -2
- package/lib/chevre/repo/accountTransaction.js +6 -3
- package/lib/chevre/repo/accountingReport.d.ts +1 -1
- package/lib/chevre/repo/accountingReport.js +6 -2
- package/lib/chevre/repo/action/registerServiceInProgress.js +1 -1
- package/lib/chevre/repo/action.d.ts +3 -4
- package/lib/chevre/repo/action.js +6 -3
- package/lib/chevre/repo/additionalProperty.js +5 -1
- package/lib/chevre/repo/aggregation.js +5 -1
- package/lib/chevre/repo/assetTransaction.d.ts +1 -2
- package/lib/chevre/repo/assetTransaction.js +6 -3
- package/lib/chevre/repo/categoryCode.js +5 -1
- package/lib/chevre/repo/code.d.ts +3 -3
- package/lib/chevre/repo/code.js +5 -1
- package/lib/chevre/repo/comment.js +5 -1
- package/lib/chevre/repo/confirmationNumber.js +1 -1
- package/lib/chevre/repo/creativeWork.d.ts +0 -2
- package/lib/chevre/repo/creativeWork.js +6 -3
- package/lib/chevre/repo/customer.js +5 -1
- package/lib/chevre/repo/emailMessage.d.ts +1 -1
- package/lib/chevre/repo/emailMessage.js +5 -1
- package/lib/chevre/repo/event.d.ts +7 -1
- package/lib/chevre/repo/event.js +104 -27
- package/lib/chevre/repo/itemAvailability/screeningEvent.js +1 -1
- package/lib/chevre/repo/member.js +5 -1
- package/lib/chevre/repo/merchantReturnPolicy.d.ts +0 -2
- package/lib/chevre/repo/merchantReturnPolicy.js +6 -3
- package/lib/chevre/repo/mongoose/onIndexCreated.d.ts +2 -0
- package/lib/chevre/repo/mongoose/onIndexCreated.js +11 -0
- package/lib/chevre/repo/mongoose/{model → schemas}/event.js +23 -0
- package/lib/chevre/repo/offer.js +7 -2
- package/lib/chevre/repo/offerCatalog.js +5 -1
- package/lib/chevre/repo/order.d.ts +0 -2
- package/lib/chevre/repo/order.js +7 -4
- package/lib/chevre/repo/orderNumber.js +1 -1
- package/lib/chevre/repo/ownershipInfo.d.ts +1 -3
- package/lib/chevre/repo/ownershipInfo.js +7 -4
- package/lib/chevre/repo/paymentMethod/creditCard.d.ts +3 -3
- package/lib/chevre/repo/permit.js +5 -1
- package/lib/chevre/repo/person.d.ts +2 -2
- package/lib/chevre/repo/place.d.ts +2 -2
- package/lib/chevre/repo/place.js +5 -1
- package/lib/chevre/repo/priceSpecification.js +5 -1
- package/lib/chevre/repo/product.d.ts +1 -1
- package/lib/chevre/repo/product.js +5 -1
- package/lib/chevre/repo/project.js +5 -1
- package/lib/chevre/repo/rateLimit/offer.js +1 -1
- package/lib/chevre/repo/reservation.d.ts +1 -1
- package/lib/chevre/repo/reservation.js +5 -1
- package/lib/chevre/repo/role.js +5 -1
- package/lib/chevre/repo/seller.d.ts +1 -1
- package/lib/chevre/repo/seller.js +5 -1
- package/lib/chevre/repo/serviceOutput.js +5 -1
- package/lib/chevre/repo/serviceOutputIdentifier.js +1 -1
- package/lib/chevre/repo/task.js +5 -1
- package/lib/chevre/repo/telemetry.js +5 -1
- package/lib/chevre/repo/transaction.d.ts +1 -2
- package/lib/chevre/repo/transaction.js +6 -3
- package/lib/chevre/repo/transactionNumber.js +1 -1
- package/lib/chevre/repo/trip.d.ts +1 -1
- package/lib/chevre/repo/trip.js +5 -1
- 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/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 +12 -12
- /package/lib/chevre/repo/mongoose/{model → schemas}/account.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/account.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/accountTitle.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/accountTitle.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/accountTransaction.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/accountTransaction.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/accountingReport.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/accountingReport.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/action.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/action.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/additionalProperty.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/additionalProperty.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/aggregation.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/aggregation.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/assetTransaction.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/assetTransaction.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/authorization.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/authorization.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/categoryCode.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/categoryCode.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/comments.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/comments.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/creativeWork.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/creativeWork.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/customer.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/customer.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/emailMessages.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/emailMessages.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/event.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/member.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/member.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/merchantReturnPolicy.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/merchantReturnPolicy.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/offer.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/offer.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/offerCatalog.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/offerCatalog.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/order.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/order.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/ownershipInfo.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/ownershipInfo.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/place.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/place.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/priceSpecification.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/priceSpecification.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/product.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/product.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/project.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/project.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/reservation.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/reservation.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/role.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/role.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/seller.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/seller.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/serviceOutput.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/serviceOutput.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/task.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/task.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/telemetry.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/telemetry.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/transaction.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/transaction.js +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/trip.d.ts +0 -0
- /package/lib/chevre/repo/mongoose/{model → schemas}/trip.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.handleAWSError = exports.handleMvtkReserveError = exports.handlePecorinoError = exports.handleCOAError = exports.handleMongoError = exports.MongoErrorCode = void 0;
|
|
3
|
+
exports.handleAWSError = exports.handleMvtkReserveError = exports.handlePecorinoError = exports.handleCOAError = exports.handleMongoError = exports.isMongoError = exports.MongoErrorCode = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* エラーハンドラー
|
|
6
6
|
* 外部サービスと連携している場合に、サービス(API)のエラーを本ドメインのエラーに変換する責任を担います。
|
|
@@ -14,9 +14,13 @@ var MongoErrorCode;
|
|
|
14
14
|
MongoErrorCode[MongoErrorCode["MaxTimeMSExpired"] = 50] = "MaxTimeMSExpired";
|
|
15
15
|
MongoErrorCode[MongoErrorCode["ExceededTimeLimit"] = 262] = "ExceededTimeLimit";
|
|
16
16
|
})(MongoErrorCode = exports.MongoErrorCode || (exports.MongoErrorCode = {}));
|
|
17
|
+
function isMongoError(error) {
|
|
18
|
+
return (error instanceof mongoose_1.mongo.MongoError || error instanceof mongoose_1.mongo.MongoServerError);
|
|
19
|
+
}
|
|
20
|
+
exports.isMongoError = isMongoError;
|
|
17
21
|
function handleMongoError(error) {
|
|
18
22
|
let handledError = error;
|
|
19
|
-
if (handledError instanceof mongoose_1.mongo.MongoError) {
|
|
23
|
+
if (handledError instanceof mongoose_1.mongo.MongoError || handledError instanceof mongoose_1.mongo.MongoServerError) {
|
|
20
24
|
switch (handledError.code) {
|
|
21
25
|
case MongoErrorCode.DuplicateKey:
|
|
22
26
|
handledError = new factory_1.errors.AlreadyInUse('', [], `Some fields already in use. code:${handledError.code} message:${handledError.message}`);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import * as factory from '../factory';
|
|
2
|
-
export
|
|
2
|
+
export type IMinimizedIndividualEvent<T extends factory.eventType.ScreeningEvent | factory.eventType.Event> = T extends factory.eventType.ScreeningEvent ? Pick<factory.event.IEvent<T>, 'project' | 'id' | 'typeOf' | 'additionalProperty' | 'name' | 'doorTime' | 'endDate' | 'eventStatus' | 'location' | 'startDate' | 'superEvent' | 'offers' | 'coaInfo' | 'identifier'> : T extends factory.eventType.Event ? Pick<factory.event.IEvent<T>, 'project' | 'id' | 'typeOf' | 'additionalProperty' | 'name' | 'doorTime' | 'endDate' | 'eventStatus' | 'location' | 'startDate' | 'offers'> : never;
|
|
@@ -9,9 +9,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.MongoRepository =
|
|
13
|
-
const
|
|
14
|
-
|
|
12
|
+
exports.MongoRepository = void 0;
|
|
13
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
14
|
+
const account_1 = require("./mongoose/schemas/account");
|
|
15
15
|
const factory = require("../factory");
|
|
16
16
|
/**
|
|
17
17
|
* 口座リポジトリ
|
|
@@ -19,6 +19,9 @@ const factory = require("../factory");
|
|
|
19
19
|
class MongoRepository {
|
|
20
20
|
constructor(connection) {
|
|
21
21
|
this.accountModel = connection.model(account_1.modelName, account_1.schema);
|
|
22
|
+
if (connection.get('autoIndex') === true) {
|
|
23
|
+
this.accountModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
24
|
+
}
|
|
22
25
|
}
|
|
23
26
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
24
27
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
@@ -11,13 +11,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.MongoRepository = void 0;
|
|
13
13
|
const factory = require("../factory");
|
|
14
|
-
const
|
|
14
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
15
|
+
const accountTitle_1 = require("./mongoose/schemas/accountTitle");
|
|
15
16
|
/**
|
|
16
17
|
* 科目リポジトリ
|
|
17
18
|
*/
|
|
18
19
|
class MongoRepository {
|
|
19
20
|
constructor(connection) {
|
|
20
21
|
this.accountTitleModel = connection.model(accountTitle_1.modelName, accountTitle_1.schema);
|
|
22
|
+
if (connection.get('autoIndex') === true) {
|
|
23
|
+
this.accountTitleModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
24
|
+
}
|
|
21
25
|
}
|
|
22
26
|
deleteByProject(params) {
|
|
23
27
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -9,10 +9,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.MongoRepository =
|
|
12
|
+
exports.MongoRepository = void 0;
|
|
13
13
|
const moment = require("moment");
|
|
14
|
-
const
|
|
15
|
-
|
|
14
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
15
|
+
const accountTransaction_1 = require("./mongoose/schemas/accountTransaction");
|
|
16
16
|
const factory = require("../factory");
|
|
17
17
|
/**
|
|
18
18
|
* 口座取引リポジトリ
|
|
@@ -20,6 +20,9 @@ const factory = require("../factory");
|
|
|
20
20
|
class MongoRepository {
|
|
21
21
|
constructor(connection) {
|
|
22
22
|
this.transactionModel = connection.model(accountTransaction_1.modelName, accountTransaction_1.schema);
|
|
23
|
+
if (connection.get('autoIndex') === true) {
|
|
24
|
+
this.transactionModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
25
|
+
}
|
|
23
26
|
}
|
|
24
27
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
25
28
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Connection, Model } from 'mongoose';
|
|
2
2
|
import * as factory from '../factory';
|
|
3
|
-
export
|
|
3
|
+
export type IOrder4report = factory.order.IOrder & {
|
|
4
4
|
numItems: number;
|
|
5
5
|
};
|
|
6
6
|
export interface IAccountingReport {
|
|
@@ -10,7 +10,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.MongoRepository = void 0;
|
|
13
|
-
const
|
|
13
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
14
|
+
const accountingReport_1 = require("./mongoose/schemas/accountingReport");
|
|
14
15
|
const errorHandler_1 = require("../errorHandler");
|
|
15
16
|
/**
|
|
16
17
|
* 経理レポートリポジトリ
|
|
@@ -18,6 +19,9 @@ const errorHandler_1 = require("../errorHandler");
|
|
|
18
19
|
class MongoRepository {
|
|
19
20
|
constructor(connection) {
|
|
20
21
|
this.accountingReportModel = connection.model(accountingReport_1.modelName, accountingReport_1.schema);
|
|
22
|
+
if (connection.get('autoIndex') === true) {
|
|
23
|
+
this.accountingReportModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
24
|
+
}
|
|
21
25
|
}
|
|
22
26
|
/**
|
|
23
27
|
* なければ作成する
|
|
@@ -30,7 +34,7 @@ class MongoRepository {
|
|
|
30
34
|
}
|
|
31
35
|
catch (error) {
|
|
32
36
|
let throwsError = true;
|
|
33
|
-
if (
|
|
37
|
+
if ((0, errorHandler_1.isMongoError)(error)) {
|
|
34
38
|
// すでにorderNumberが存在する場合ok
|
|
35
39
|
if (error.code === errorHandler_1.MongoErrorCode.DuplicateKey) {
|
|
36
40
|
throwsError = false;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Connection } from 'mongoose';
|
|
2
2
|
import * as factory from '../factory';
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
export declare type IPayAction = factory.action.trade.pay.IAction;
|
|
3
|
+
export type IAction<T extends factory.actionType> = T extends factory.actionType.OrderAction ? factory.action.trade.order.IAction : T extends factory.actionType.AuthorizeAction ? factory.action.authorize.IAction<factory.action.authorize.IAttributes<any, any>> : factory.action.IAction<factory.action.IAttributes<T, any, any>>;
|
|
4
|
+
export type IPayAction = factory.action.trade.pay.IAction;
|
|
6
5
|
export interface IUseActionCountByOffer {
|
|
7
6
|
_id: string[];
|
|
8
7
|
useActionCount?: number;
|
|
@@ -24,7 +23,6 @@ interface IStatus {
|
|
|
24
23
|
interface IAggregateAction {
|
|
25
24
|
statuses: IStatus[];
|
|
26
25
|
}
|
|
27
|
-
export { modelName };
|
|
28
26
|
/**
|
|
29
27
|
* アクションリポジトリ
|
|
30
28
|
*/
|
|
@@ -184,3 +182,4 @@ export declare class MongoRepository {
|
|
|
184
182
|
}): Promise<IAggregateAction>;
|
|
185
183
|
private agggregateByStatus;
|
|
186
184
|
}
|
|
185
|
+
export {};
|
|
@@ -9,16 +9,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.MongoRepository =
|
|
12
|
+
exports.MongoRepository = void 0;
|
|
13
13
|
const factory = require("../factory");
|
|
14
|
-
const
|
|
15
|
-
|
|
14
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
15
|
+
const action_1 = require("./mongoose/schemas/action");
|
|
16
16
|
/**
|
|
17
17
|
* アクションリポジトリ
|
|
18
18
|
*/
|
|
19
19
|
class MongoRepository {
|
|
20
20
|
constructor(connection) {
|
|
21
21
|
this.actionModel = connection.model(action_1.modelName, action_1.schema);
|
|
22
|
+
if (connection.get('autoIndex') === true) {
|
|
23
|
+
this.actionModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
24
|
+
}
|
|
22
25
|
}
|
|
23
26
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
24
27
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
@@ -21,7 +21,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
23
|
exports.MongoRepository = void 0;
|
|
24
|
-
const
|
|
24
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
25
|
+
const additionalProperty_1 = require("./mongoose/schemas/additionalProperty");
|
|
25
26
|
const factory = require("../factory");
|
|
26
27
|
/**
|
|
27
28
|
* 追加特性リポジトリ
|
|
@@ -29,6 +30,9 @@ const factory = require("../factory");
|
|
|
29
30
|
class MongoRepository {
|
|
30
31
|
constructor(connection) {
|
|
31
32
|
this.additionalPropertyModel = connection.model(additionalProperty_1.modelName, additionalProperty_1.schema);
|
|
33
|
+
if (connection.get('autoIndex') === true) {
|
|
34
|
+
this.additionalPropertyModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
35
|
+
}
|
|
32
36
|
}
|
|
33
37
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
34
38
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
@@ -21,7 +21,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
23
|
exports.MongoRepository = exports.AggregationType = void 0;
|
|
24
|
-
const
|
|
24
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
25
|
+
const aggregation_1 = require("./mongoose/schemas/aggregation");
|
|
25
26
|
var AggregationType;
|
|
26
27
|
(function (AggregationType) {
|
|
27
28
|
AggregationType["AggregateAuthorizeEventServiceOfferAction"] = "AggregateAuthorizeEventServiceOfferAction";
|
|
@@ -42,6 +43,9 @@ var AggregationType;
|
|
|
42
43
|
class MongoRepository {
|
|
43
44
|
constructor(connection) {
|
|
44
45
|
this.aggregationModel = connection.model(aggregation_1.modelName, aggregation_1.schema);
|
|
46
|
+
if (connection.get('autoIndex') === true) {
|
|
47
|
+
this.aggregationModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
48
|
+
}
|
|
45
49
|
}
|
|
46
50
|
saveAggregation(params) {
|
|
47
51
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -23,9 +23,7 @@
|
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
25
|
import { Connection } from 'mongoose';
|
|
26
|
-
import { modelName } from './mongoose/model/assetTransaction';
|
|
27
26
|
import * as factory from '../factory';
|
|
28
|
-
export { modelName };
|
|
29
27
|
interface IAggregationByStatus {
|
|
30
28
|
transactionCount: number;
|
|
31
29
|
avgDuration: number;
|
|
@@ -181,3 +179,4 @@ export declare class MongoRepository {
|
|
|
181
179
|
}): Promise<IAggregateReserve>;
|
|
182
180
|
private agggregateByStatus;
|
|
183
181
|
}
|
|
182
|
+
export {};
|
|
@@ -9,10 +9,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.MongoRepository =
|
|
12
|
+
exports.MongoRepository = void 0;
|
|
13
13
|
const moment = require("moment");
|
|
14
|
-
const
|
|
15
|
-
|
|
14
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
15
|
+
const assetTransaction_1 = require("./mongoose/schemas/assetTransaction");
|
|
16
16
|
const factory = require("../factory");
|
|
17
17
|
/**
|
|
18
18
|
* 資産取引リポジトリ
|
|
@@ -20,6 +20,9 @@ const factory = require("../factory");
|
|
|
20
20
|
class MongoRepository {
|
|
21
21
|
constructor(connection) {
|
|
22
22
|
this.transactionModel = connection.model(assetTransaction_1.modelName, assetTransaction_1.schema);
|
|
23
|
+
if (connection.get('autoIndex') === true) {
|
|
24
|
+
this.transactionModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
25
|
+
}
|
|
23
26
|
}
|
|
24
27
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
25
28
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
@@ -21,7 +21,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
23
|
exports.MongoRepository = void 0;
|
|
24
|
-
const
|
|
24
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
25
|
+
const categoryCode_1 = require("./mongoose/schemas/categoryCode");
|
|
25
26
|
const factory = require("../factory");
|
|
26
27
|
/**
|
|
27
28
|
* 区分リポジトリ
|
|
@@ -29,6 +30,9 @@ const factory = require("../factory");
|
|
|
29
30
|
class MongoRepository {
|
|
30
31
|
constructor(connection) {
|
|
31
32
|
this.categoryCodeModel = connection.model(categoryCode_1.modelName, categoryCode_1.schema);
|
|
33
|
+
if (connection.get('autoIndex') === true) {
|
|
34
|
+
this.categoryCodeModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
35
|
+
}
|
|
32
36
|
}
|
|
33
37
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
34
38
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Connection } from 'mongoose';
|
|
2
2
|
import * as factory from '../factory';
|
|
3
|
-
import { modelName } from './mongoose/
|
|
4
|
-
export
|
|
5
|
-
export
|
|
3
|
+
import { modelName } from './mongoose/schemas/authorization';
|
|
4
|
+
export type IObject = factory.authorization.IObject;
|
|
5
|
+
export type ICode = string;
|
|
6
6
|
export { modelName };
|
|
7
7
|
/**
|
|
8
8
|
* 承認コードリポジトリ
|
package/lib/chevre/repo/code.js
CHANGED
|
@@ -13,7 +13,8 @@ exports.MongoRepository = exports.modelName = void 0;
|
|
|
13
13
|
const moment = require("moment");
|
|
14
14
|
const uuid = require("uuid");
|
|
15
15
|
const factory = require("../factory");
|
|
16
|
-
const
|
|
16
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
17
|
+
const authorization_1 = require("./mongoose/schemas/authorization");
|
|
17
18
|
Object.defineProperty(exports, "modelName", { enumerable: true, get: function () { return authorization_1.modelName; } });
|
|
18
19
|
/**
|
|
19
20
|
* 承認コードリポジトリ
|
|
@@ -21,6 +22,9 @@ Object.defineProperty(exports, "modelName", { enumerable: true, get: function ()
|
|
|
21
22
|
class MongoRepository {
|
|
22
23
|
constructor(connection) {
|
|
23
24
|
this.authorizationModel = connection.model(authorization_1.modelName, authorization_1.schema);
|
|
25
|
+
if (connection.get('autoIndex') === true) {
|
|
26
|
+
this.authorizationModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
27
|
+
}
|
|
24
28
|
}
|
|
25
29
|
// tslint:disable-next-line:max-func-body-length
|
|
26
30
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
@@ -10,7 +10,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.MongoRepository = void 0;
|
|
13
|
-
const
|
|
13
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
14
|
+
const comments_1 = require("./mongoose/schemas/comments");
|
|
14
15
|
const factory = require("../factory");
|
|
15
16
|
/**
|
|
16
17
|
* コメントリポジトリ
|
|
@@ -18,6 +19,9 @@ const factory = require("../factory");
|
|
|
18
19
|
class MongoRepository {
|
|
19
20
|
constructor(connection) {
|
|
20
21
|
this.commentModel = connection.model(comments_1.modelName, comments_1.schema);
|
|
22
|
+
if (connection.get('autoIndex') === true) {
|
|
23
|
+
this.commentModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
24
|
+
}
|
|
21
25
|
}
|
|
22
26
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
23
27
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -23,9 +23,7 @@
|
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
25
|
import { Connection } from 'mongoose';
|
|
26
|
-
import { modelName } from './mongoose/model/creativeWork';
|
|
27
26
|
import * as factory from '../factory';
|
|
28
|
-
export { modelName };
|
|
29
27
|
/**
|
|
30
28
|
* コンテンツリポジトリ
|
|
31
29
|
*/
|
|
@@ -20,9 +20,9 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.MongoRepository =
|
|
24
|
-
const
|
|
25
|
-
|
|
23
|
+
exports.MongoRepository = void 0;
|
|
24
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
25
|
+
const creativeWork_1 = require("./mongoose/schemas/creativeWork");
|
|
26
26
|
const factory = require("../factory");
|
|
27
27
|
/**
|
|
28
28
|
* コンテンツリポジトリ
|
|
@@ -30,6 +30,9 @@ const factory = require("../factory");
|
|
|
30
30
|
class MongoRepository {
|
|
31
31
|
constructor(connection) {
|
|
32
32
|
this.creativeWorkModel = connection.model(creativeWork_1.modelName, creativeWork_1.schema);
|
|
33
|
+
if (connection.get('autoIndex') === true) {
|
|
34
|
+
this.creativeWorkModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
35
|
+
}
|
|
33
36
|
}
|
|
34
37
|
// tslint:disable-next-line:max-func-body-length
|
|
35
38
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
@@ -21,7 +21,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
23
|
exports.MongoRepository = void 0;
|
|
24
|
-
const
|
|
24
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
25
|
+
const customer_1 = require("./mongoose/schemas/customer");
|
|
25
26
|
const factory = require("../factory");
|
|
26
27
|
/**
|
|
27
28
|
* 顧客リポジトリ
|
|
@@ -29,6 +30,9 @@ const factory = require("../factory");
|
|
|
29
30
|
class MongoRepository {
|
|
30
31
|
constructor(connection) {
|
|
31
32
|
this.customerModel = connection.model(customer_1.modelName, customer_1.schema);
|
|
33
|
+
if (connection.get('autoIndex') === true) {
|
|
34
|
+
this.customerModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
35
|
+
}
|
|
32
36
|
}
|
|
33
37
|
// tslint:disable-next-line:max-func-body-length
|
|
34
38
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
25
|
import { Connection } from 'mongoose';
|
|
26
26
|
import * as factory from '../factory';
|
|
27
|
-
export
|
|
27
|
+
export type IEmailMessage = factory.creativeWork.message.email.ICreativeWork;
|
|
28
28
|
export interface ISearchConditions {
|
|
29
29
|
limit?: number;
|
|
30
30
|
page?: number;
|
|
@@ -21,7 +21,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
23
|
exports.MongoRepository = void 0;
|
|
24
|
-
const
|
|
24
|
+
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
25
|
+
const emailMessages_1 = require("./mongoose/schemas/emailMessages");
|
|
25
26
|
const factory = require("../factory");
|
|
26
27
|
/**
|
|
27
28
|
* Eメールメッセージリポジトリ
|
|
@@ -29,6 +30,9 @@ const factory = require("../factory");
|
|
|
29
30
|
class MongoRepository {
|
|
30
31
|
constructor(connection) {
|
|
31
32
|
this.emailMessageModel = connection.model(emailMessages_1.modelName, emailMessages_1.schema);
|
|
33
|
+
if (connection.get('autoIndex') === true) {
|
|
34
|
+
this.emailMessageModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
35
|
+
}
|
|
32
36
|
}
|
|
33
37
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
34
38
|
var _a, _b, _c, _d, _e;
|
|
@@ -55,7 +55,7 @@ export interface IUpdateAggregateUseActionsParams {
|
|
|
55
55
|
noExistingAttributeName: 1;
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
|
-
export
|
|
58
|
+
export type ISearchConditions<T extends factory.eventType> = factory.event.ISearchConditions<T>;
|
|
59
59
|
interface IAggregationByStatus {
|
|
60
60
|
eventCount: number;
|
|
61
61
|
reservationCount: number;
|
|
@@ -105,6 +105,12 @@ export declare class MongoRepository {
|
|
|
105
105
|
name: string;
|
|
106
106
|
};
|
|
107
107
|
}[]): Promise<BulkWriteOpResultObject | void>;
|
|
108
|
+
/**
|
|
109
|
+
* コンテンツ+バージョンをキーにして、なければ作成する(複数対応)
|
|
110
|
+
*/
|
|
111
|
+
createScreeningEventSeriesIfNotExistByWorkPerformed(params: {
|
|
112
|
+
attributes: factory.event.IAttributes<factory.eventType.ScreeningEventSeries>;
|
|
113
|
+
}[]): Promise<BulkWriteOpResultObject | void>;
|
|
108
114
|
/**
|
|
109
115
|
* イベント部分更新
|
|
110
116
|
*/
|