@chevre/domain 21.2.0-alpha.2 → 21.2.0-alpha.20
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/example/src/chevre/aggregateEventReservation.ts +1 -1
- package/example/src/chevre/countDelayedTasks.ts +17 -0
- package/example/src/chevre/countDelayedTransactions.ts +60 -0
- package/example/src/chevre/countMoneyTransferTransaction.ts +36 -0
- package/example/src/chevre/createManyEventsIfNotExist.ts +4 -1
- package/example/src/chevre/lockStockHolder.ts +48 -0
- package/example/src/chevre/migrateOrderAdditionalProperties.ts +85 -0
- package/example/src/chevre/migrateStockHolderKeys.ts +89 -0
- package/example/src/chevre/processReserve.ts +2 -2
- package/example/src/chevre/searchEventSeats.ts +42 -0
- package/example/src/chevre/transaction/findCreditCard.ts +1 -1
- package/example/src/chevre/transaction/makeExpired.ts +18 -0
- package/example/src/chevre/transaction/orderMembershipService.ts +1 -1
- package/example/src/chevre/transaction/startExportTasks.ts +19 -0
- package/example/src/chevre/updateTransaction.ts +1 -1
- package/lib/chevre/eventEmitter/task.d.ts +18 -0
- package/lib/chevre/eventEmitter/task.js +28 -0
- package/lib/chevre/eventEmitter/transaction.d.ts +21 -0
- package/lib/chevre/eventEmitter/transaction.js +28 -0
- package/lib/chevre/eventEmitter.d.ts +3 -0
- package/lib/chevre/eventEmitter.js +7 -0
- package/lib/chevre/index.d.ts +3 -2
- package/lib/chevre/index.js +5 -3
- package/lib/chevre/repo/account.js +0 -4
- package/lib/chevre/repo/accountTitle.js +0 -4
- package/lib/chevre/repo/accountTransaction.d.ts +0 -10
- package/lib/chevre/repo/accountTransaction.js +0 -57
- package/lib/chevre/repo/accountingReport.js +0 -4
- package/lib/chevre/repo/action.js +0 -4
- package/lib/chevre/repo/additionalProperty.js +0 -4
- package/lib/chevre/repo/aggregation.js +0 -4
- package/lib/chevre/repo/assetTransaction.d.ts +4 -6
- package/lib/chevre/repo/assetTransaction.js +69 -45
- package/lib/chevre/repo/categoryCode.js +0 -4
- package/lib/chevre/repo/code.js +0 -4
- package/lib/chevre/repo/comment.js +0 -4
- package/lib/chevre/repo/confirmationNumber.js +1 -1
- package/lib/chevre/repo/creativeWork.d.ts +1 -3
- package/lib/chevre/repo/creativeWork.js +0 -4
- package/lib/chevre/repo/customer.js +0 -4
- package/lib/chevre/repo/emailMessage.d.ts +1 -27
- package/lib/chevre/repo/emailMessage.js +0 -4
- package/lib/chevre/repo/event.d.ts +5 -1
- package/lib/chevre/repo/event.js +0 -4
- package/lib/chevre/repo/member.js +0 -4
- package/lib/chevre/repo/merchantReturnPolicy.d.ts +1 -3
- package/lib/chevre/repo/merchantReturnPolicy.js +0 -4
- package/lib/chevre/repo/mongoose/schemas/account.d.ts +5 -2
- package/lib/chevre/repo/mongoose/schemas/account.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/accountTitle.d.ts +30 -3
- package/lib/chevre/repo/mongoose/schemas/accountTitle.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/accountTransaction.d.ts +32 -3
- package/lib/chevre/repo/mongoose/schemas/accountTransaction.js +2 -1
- package/lib/chevre/repo/mongoose/schemas/accountingReport.d.ts +14 -3
- package/lib/chevre/repo/mongoose/schemas/accountingReport.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/action.d.ts +44 -3
- package/lib/chevre/repo/mongoose/schemas/action.js +2 -1
- package/lib/chevre/repo/mongoose/schemas/additionalProperty.d.ts +18 -3
- package/lib/chevre/repo/mongoose/schemas/additionalProperty.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/aggregation.d.ts +5 -2
- package/lib/chevre/repo/mongoose/schemas/aggregation.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/assetTransaction.d.ts +42 -3
- package/lib/chevre/repo/mongoose/schemas/assetTransaction.js +2 -1
- package/lib/chevre/repo/mongoose/schemas/authorization.d.ts +20 -3
- package/lib/chevre/repo/mongoose/schemas/authorization.js +2 -1
- package/lib/chevre/repo/mongoose/schemas/categoryCode.d.ts +26 -3
- package/lib/chevre/repo/mongoose/schemas/categoryCode.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/comments.d.ts +28 -3
- package/lib/chevre/repo/mongoose/schemas/comments.js +2 -1
- package/lib/chevre/repo/mongoose/schemas/creativeWork.d.ts +44 -3
- package/lib/chevre/repo/mongoose/schemas/creativeWork.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/customer.d.ts +26 -3
- package/lib/chevre/repo/mongoose/schemas/customer.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/emailMessages.d.ts +22 -3
- package/lib/chevre/repo/mongoose/schemas/emailMessages.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/event.d.ts +72 -3
- package/lib/chevre/repo/mongoose/schemas/event.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/member.d.ts +14 -3
- package/lib/chevre/repo/mongoose/schemas/member.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/merchantReturnPolicy.d.ts +22 -3
- package/lib/chevre/repo/mongoose/schemas/merchantReturnPolicy.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/offer.d.ts +66 -3
- package/lib/chevre/repo/mongoose/schemas/offer.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/offerCatalog.d.ts +28 -3
- package/lib/chevre/repo/mongoose/schemas/offerCatalog.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/order.d.ts +52 -3
- package/lib/chevre/repo/mongoose/schemas/order.js +2 -1
- package/lib/chevre/repo/mongoose/schemas/ownershipInfo.d.ts +26 -3
- package/lib/chevre/repo/mongoose/schemas/ownershipInfo.js +2 -1
- package/lib/chevre/repo/mongoose/schemas/place.d.ts +50 -3
- package/lib/chevre/repo/mongoose/schemas/place.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/priceSpecification.d.ts +30 -3
- package/lib/chevre/repo/mongoose/schemas/priceSpecification.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/product.d.ts +32 -3
- package/lib/chevre/repo/mongoose/schemas/product.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/project.d.ts +24 -3
- package/lib/chevre/repo/mongoose/schemas/project.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +62 -3
- package/lib/chevre/repo/mongoose/schemas/reservation.js +2 -1
- package/lib/chevre/repo/mongoose/schemas/role.d.ts +12 -3
- package/lib/chevre/repo/mongoose/schemas/role.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/seller.d.ts +32 -3
- package/lib/chevre/repo/mongoose/schemas/seller.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/serviceOutput.d.ts +12 -3
- package/lib/chevre/repo/mongoose/schemas/serviceOutput.js +2 -1
- package/lib/chevre/repo/mongoose/schemas/task.d.ts +28 -3
- package/lib/chevre/repo/mongoose/schemas/task.js +2 -1
- package/lib/chevre/repo/mongoose/schemas/telemetry.d.ts +22 -3
- package/lib/chevre/repo/mongoose/schemas/telemetry.js +1 -0
- package/lib/chevre/repo/mongoose/schemas/transaction.d.ts +38 -3
- package/lib/chevre/repo/mongoose/schemas/transaction.js +2 -1
- package/lib/chevre/repo/mongoose/schemas/trip.d.ts +12 -3
- package/lib/chevre/repo/mongoose/schemas/trip.js +1 -0
- package/lib/chevre/repo/offer.js +0 -5
- package/lib/chevre/repo/offerCatalog.js +0 -4
- package/lib/chevre/repo/order.d.ts +25 -0
- package/lib/chevre/repo/order.js +5 -4
- package/lib/chevre/repo/orderNumber.d.ts +0 -1
- package/lib/chevre/repo/orderNumber.js +2 -12
- package/lib/chevre/repo/ownershipInfo.js +0 -4
- package/lib/chevre/repo/permit.js +0 -4
- package/lib/chevre/repo/place.d.ts +5 -1
- package/lib/chevre/repo/place.js +1 -10
- package/lib/chevre/repo/priceSpecification.js +0 -4
- package/lib/chevre/repo/product.js +0 -4
- package/lib/chevre/repo/project.js +0 -4
- package/lib/chevre/repo/rateLimit/offer.d.ts +3 -2
- package/lib/chevre/repo/rateLimit/offer.js +14 -14
- package/lib/chevre/repo/reservation.js +0 -4
- package/lib/chevre/repo/role.js +0 -4
- package/lib/chevre/repo/seller.js +0 -4
- package/lib/chevre/repo/serviceOutput.js +0 -4
- package/lib/chevre/repo/serviceOutputIdentifier.d.ts +2 -1
- package/lib/chevre/repo/serviceOutputIdentifier.js +14 -15
- package/lib/chevre/repo/{itemAvailability/screeningEvent.d.ts → stockHolder.d.ts} +5 -6
- package/lib/chevre/repo/stockHolder.js +273 -0
- package/lib/chevre/repo/task.d.ts +11 -2
- package/lib/chevre/repo/task.js +58 -9
- package/lib/chevre/repo/telemetry.js +0 -4
- package/lib/chevre/repo/transaction.d.ts +3 -2
- package/lib/chevre/repo/transaction.js +116 -54
- package/lib/chevre/repo/transactionNumber.d.ts +2 -1
- package/lib/chevre/repo/transactionNumber.js +14 -15
- package/lib/chevre/repo/trip.js +0 -4
- package/lib/chevre/repository.d.ts +3 -5
- package/lib/chevre/repository.js +5 -8
- package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.d.ts +2 -2
- package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +4 -3
- package/lib/chevre/service/assetTransaction/cancelReservation.js +1 -5
- package/lib/chevre/service/assetTransaction/moneyTransfer.js +1 -1
- package/lib/chevre/service/assetTransaction/pay.js +2 -2
- package/lib/chevre/service/assetTransaction/refund.js +1 -1
- package/lib/chevre/service/assetTransaction/registerService.js +1 -2
- package/lib/chevre/service/assetTransaction/reserve.d.ts +4 -4
- package/lib/chevre/service/assetTransaction/reserve.js +8 -5
- package/lib/chevre/service/assetTransaction.d.ts +0 -2
- package/lib/chevre/service/assetTransaction.js +0 -1
- package/lib/chevre/service/offer/event/authorize.d.ts +2 -2
- package/lib/chevre/service/offer/event/cancel.d.ts +2 -2
- package/lib/chevre/service/offer/event/voidTransaction.d.ts +2 -2
- package/lib/chevre/service/offer.d.ts +2 -2
- package/lib/chevre/service/offer.js +5 -2
- package/lib/chevre/service/order/onOrderStatusChanged.js +1 -1
- package/lib/chevre/service/order/placeOrder.js +1 -1
- package/lib/chevre/service/order/returnOrder.js +1 -5
- package/lib/chevre/service/order/sendOrder.js +1 -1
- package/lib/chevre/service/payment/any.js +1 -1
- package/lib/chevre/service/reserve/cancelReservation.d.ts +3 -3
- package/lib/chevre/service/reserve/cancelReservation.js +6 -6
- package/lib/chevre/service/task/aggregateScreeningEvent.js +2 -2
- package/lib/chevre/service/task/cancelPendingReservation.js +3 -3
- package/lib/chevre/service/task/cancelReservation.js +3 -3
- package/lib/chevre/service/task/voidReserveTransaction.js +3 -3
- package/lib/chevre/service/task.d.ts +3 -0
- package/lib/chevre/service/task.js +22 -1
- package/lib/chevre/service/transaction/moneyTransfer.js +1 -3
- package/lib/chevre/service/transaction/placeOrder.js +1 -5
- package/lib/chevre/service/transaction/placeOrderInProgress.js +2 -2
- package/lib/chevre/service/transaction/returnOrder.js +1 -5
- package/lib/chevre/service/transaction.d.ts +1 -0
- package/lib/chevre/service/transaction.js +1 -7
- package/lib/chevre/settings.d.ts +2 -1
- package/lib/chevre/settings.js +5 -4
- package/package.json +4 -4
- package/example/src/chevre/migrateMoneyTransferPendingTransactionIdentifier.ts +0 -96
- package/example/src/chevre/migrateMovieAdditionalProperties.ts +0 -98
- package/lib/chevre/repo/itemAvailability/screeningEvent.js +0 -193
|
@@ -22,7 +22,7 @@ async function main() {
|
|
|
22
22
|
id: String(process.env.EVENT_ID)
|
|
23
23
|
})({
|
|
24
24
|
event: new chevre.repository.Event(mongoose.connection),
|
|
25
|
-
|
|
25
|
+
stockHolder: new chevre.repository.StockHolder(client),
|
|
26
26
|
offer: new chevre.repository.Offer(mongoose.connection),
|
|
27
27
|
offerCatalog: new chevre.repository.OfferCatalog(mongoose.connection),
|
|
28
28
|
offerRateLimit: new chevre.repository.rateLimit.Offer(client),
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
import * as mongoose from 'mongoose';
|
|
3
|
+
|
|
4
|
+
import { chevre } from '../../../lib/index';
|
|
5
|
+
|
|
6
|
+
export async function main() {
|
|
7
|
+
await mongoose.connect(<string>process.env.MONGOLAB_URI);
|
|
8
|
+
|
|
9
|
+
const taskRepo = new chevre.repository.Task(mongoose.connection);
|
|
10
|
+
|
|
11
|
+
const count = await taskRepo.countDelayedTasks({ delayInSeconds: 60 });
|
|
12
|
+
console.log('count:', count);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
main()
|
|
16
|
+
.then()
|
|
17
|
+
.catch(console.error);
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
import * as mongoose from 'mongoose';
|
|
3
|
+
|
|
4
|
+
import { chevre } from '../../../lib/index';
|
|
5
|
+
|
|
6
|
+
export async function main() {
|
|
7
|
+
await mongoose.connect(<string>process.env.MONGOLAB_URI);
|
|
8
|
+
|
|
9
|
+
const assetTransactionRepo = new chevre.repository.AssetTransaction(mongoose.connection);
|
|
10
|
+
const transactionRepo = new chevre.repository.Transaction(mongoose.connection);
|
|
11
|
+
|
|
12
|
+
for (const typeOf of [
|
|
13
|
+
chevre.factory.transactionType.PlaceOrder,
|
|
14
|
+
chevre.factory.transactionType.ReturnOrder,
|
|
15
|
+
chevre.factory.transactionType.MoneyTransfer
|
|
16
|
+
]) {
|
|
17
|
+
const count = await transactionRepo.count({
|
|
18
|
+
typeOf,
|
|
19
|
+
statuses: [
|
|
20
|
+
chevre.factory.transactionStatusType.Canceled,
|
|
21
|
+
chevre.factory.transactionStatusType.Confirmed,
|
|
22
|
+
chevre.factory.transactionStatusType.Expired
|
|
23
|
+
],
|
|
24
|
+
tasksExportationStatuses: [
|
|
25
|
+
chevre.factory.transactionTasksExportationStatus.Exporting,
|
|
26
|
+
chevre.factory.transactionTasksExportationStatus.Unexported
|
|
27
|
+
],
|
|
28
|
+
endThrough: new Date()
|
|
29
|
+
});
|
|
30
|
+
console.log('count:', count, typeOf);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
for (const typeOf of [
|
|
34
|
+
chevre.factory.assetTransactionType.CancelReservation,
|
|
35
|
+
chevre.factory.assetTransactionType.MoneyTransfer,
|
|
36
|
+
chevre.factory.assetTransactionType.Pay,
|
|
37
|
+
chevre.factory.assetTransactionType.Refund,
|
|
38
|
+
chevre.factory.assetTransactionType.RegisterService,
|
|
39
|
+
chevre.factory.assetTransactionType.Reserve
|
|
40
|
+
]) {
|
|
41
|
+
const count = await assetTransactionRepo.count({
|
|
42
|
+
typeOf,
|
|
43
|
+
statuses: [
|
|
44
|
+
chevre.factory.transactionStatusType.Canceled,
|
|
45
|
+
chevre.factory.transactionStatusType.Confirmed,
|
|
46
|
+
chevre.factory.transactionStatusType.Expired
|
|
47
|
+
],
|
|
48
|
+
tasksExportationStatuses: [
|
|
49
|
+
chevre.factory.transactionTasksExportationStatus.Exporting,
|
|
50
|
+
chevre.factory.transactionTasksExportationStatus.Unexported
|
|
51
|
+
],
|
|
52
|
+
endThrough: new Date()
|
|
53
|
+
});
|
|
54
|
+
console.log('count:', count, typeOf);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
main()
|
|
59
|
+
.then()
|
|
60
|
+
.catch(console.error);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
import * as moment from 'moment';
|
|
3
|
+
import * as mongoose from 'mongoose';
|
|
4
|
+
|
|
5
|
+
import { chevre } from '../../../lib/index';
|
|
6
|
+
|
|
7
|
+
const project = { id: String(process.env.PROJECT_ID) };
|
|
8
|
+
|
|
9
|
+
// tslint:disable-next-line:max-func-body-length
|
|
10
|
+
export async function main() {
|
|
11
|
+
const now = new Date();
|
|
12
|
+
await mongoose.connect(<string>process.env.MONGOLAB_URI);
|
|
13
|
+
|
|
14
|
+
const transactionRepo = new chevre.repository.Transaction(mongoose.connection);
|
|
15
|
+
|
|
16
|
+
const transactions = await transactionRepo.search<chevre.factory.transactionType.MoneyTransfer>(
|
|
17
|
+
{
|
|
18
|
+
project: { id: { $eq: project.id } },
|
|
19
|
+
typeOf: chevre.factory.transactionType.MoneyTransfer,
|
|
20
|
+
statuses: [chevre.factory.transactionStatusType.Confirmed],
|
|
21
|
+
startFrom: moment(now)
|
|
22
|
+
.add(-1, 'year')
|
|
23
|
+
.toDate(),
|
|
24
|
+
startThrough: now,
|
|
25
|
+
inclusion: ['_id', 'startDate', 'typeOf', 'object'],
|
|
26
|
+
exclusion: []
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
const count = transactions.filter((t) => t.object.description === '受け取り')
|
|
30
|
+
.length;
|
|
31
|
+
console.log('transactions found', count);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
main()
|
|
35
|
+
.then()
|
|
36
|
+
.catch(console.error);
|
|
@@ -197,7 +197,10 @@ async function main() {
|
|
|
197
197
|
}
|
|
198
198
|
]);
|
|
199
199
|
console.log(result);
|
|
200
|
-
console.log('upsertedIds:', (Array.isArray(result?.
|
|
200
|
+
console.log('upsertedIds:', (Array.isArray(result?.getUpsertedIds()))
|
|
201
|
+
? result?.getUpsertedIds()
|
|
202
|
+
.map((u: any) => u._id)
|
|
203
|
+
: []);
|
|
201
204
|
}
|
|
202
205
|
|
|
203
206
|
main()
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
import * as moment from 'moment';
|
|
3
|
+
import * as redis from 'redis';
|
|
4
|
+
|
|
5
|
+
import { chevre } from '../../../lib/index';
|
|
6
|
+
|
|
7
|
+
// const project = { id: String(process.env.PROJECT_ID) };
|
|
8
|
+
|
|
9
|
+
// tslint:disable-next-line:max-func-body-length
|
|
10
|
+
async function main() {
|
|
11
|
+
const client = redis.createClient<redis.RedisDefaultModules, Record<string, never>, Record<string, never>>({
|
|
12
|
+
socket: {
|
|
13
|
+
port: Number(<string>process.env.REDIS_PORT),
|
|
14
|
+
host: <string>process.env.REDIS_HOST
|
|
15
|
+
},
|
|
16
|
+
password: <string>process.env.REDIS_KEY
|
|
17
|
+
});
|
|
18
|
+
await client.connect();
|
|
19
|
+
|
|
20
|
+
const startDate = moment('2023-04-18T00:00:00Z');
|
|
21
|
+
|
|
22
|
+
const stockHolderRepo = new chevre.repository.StockHolder(client);
|
|
23
|
+
await stockHolderRepo.lock({
|
|
24
|
+
eventId: 'sampleEventId',
|
|
25
|
+
startDate: startDate.toDate(),
|
|
26
|
+
offers: [
|
|
27
|
+
{
|
|
28
|
+
seatSection: 'sampleSeatSection',
|
|
29
|
+
seatNumber: 'sampleSeatNumber'
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
seatSection: 'sampleSeatSection1',
|
|
33
|
+
seatNumber: 'sampleSeatNumber1'
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
expires: moment(startDate)
|
|
37
|
+
.add(1, 'month')
|
|
38
|
+
.toDate(),
|
|
39
|
+
holder: 'sampleStockHolder'
|
|
40
|
+
});
|
|
41
|
+
console.log('locked');
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
main()
|
|
45
|
+
.then(() => {
|
|
46
|
+
console.log('success!');
|
|
47
|
+
})
|
|
48
|
+
.catch(console.error);
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
import * as moment from 'moment';
|
|
3
|
+
import * as mongoose from 'mongoose';
|
|
4
|
+
|
|
5
|
+
import { chevre } from '../../../lib/index';
|
|
6
|
+
|
|
7
|
+
// const project = { id: String(process.env.PROJECT_ID) };
|
|
8
|
+
// const EXCLUDED_PROJECT_ID = process.env.EXCLUDED_PROJECT_ID;
|
|
9
|
+
|
|
10
|
+
// tslint:disable-next-line:max-func-body-length
|
|
11
|
+
async function main() {
|
|
12
|
+
await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
|
|
13
|
+
|
|
14
|
+
const orderRepo = new chevre.repository.Order(mongoose.connection);
|
|
15
|
+
|
|
16
|
+
const cursor = orderRepo.getCursor(
|
|
17
|
+
{
|
|
18
|
+
// 'project.id': { $eq: project.id },
|
|
19
|
+
// 'project.id': { $ne: EXCLUDED_PROJECT_ID },
|
|
20
|
+
orderDate: {
|
|
21
|
+
$gte: moment()
|
|
22
|
+
.add(-1, 'months')
|
|
23
|
+
.toDate()
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
paymentMethods: 1,
|
|
28
|
+
project: 1,
|
|
29
|
+
orderDate: 1
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
console.log('movies found');
|
|
33
|
+
|
|
34
|
+
const additionalPropertyNames: string[] = [];
|
|
35
|
+
const projectIds: string[] = [];
|
|
36
|
+
const unexpextedprojectIds: string[] = [];
|
|
37
|
+
|
|
38
|
+
let i = 0;
|
|
39
|
+
await cursor.eachAsync(async (doc) => {
|
|
40
|
+
i += 1;
|
|
41
|
+
const order: chevre.factory.order.IOrder = doc.toObject();
|
|
42
|
+
|
|
43
|
+
const additionalPropertyNamesOnOrder = order.paymentMethods.reduce<string[]>(
|
|
44
|
+
(a, b) => {
|
|
45
|
+
if (Array.isArray(b.additionalProperty)) {
|
|
46
|
+
return [...a, ...b.additionalProperty.map((p) => p.name)];
|
|
47
|
+
} else {
|
|
48
|
+
return a;
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
[]
|
|
52
|
+
);
|
|
53
|
+
if (Array.isArray(additionalPropertyNamesOnOrder) && additionalPropertyNamesOnOrder.length > 0) {
|
|
54
|
+
console.log(
|
|
55
|
+
additionalPropertyNamesOnOrder.join(','),
|
|
56
|
+
additionalPropertyNamesOnOrder.length,
|
|
57
|
+
'additionalPropertyNamesOnOrder found',
|
|
58
|
+
order.project.id,
|
|
59
|
+
order.id,
|
|
60
|
+
order.orderDate
|
|
61
|
+
);
|
|
62
|
+
additionalPropertyNames.push(...additionalPropertyNamesOnOrder);
|
|
63
|
+
projectIds.push(order.project.id);
|
|
64
|
+
additionalPropertyNamesOnOrder.forEach((name) => {
|
|
65
|
+
if (!name.match(/^[a-zA-Z]*$/)) {
|
|
66
|
+
// throw new Error(`not matched ${creativeWork.project.id} ${creativeWork.id}`);
|
|
67
|
+
unexpextedprojectIds.push(order.project.id);
|
|
68
|
+
}
|
|
69
|
+
// tslint:disable-next-line:no-magic-numbers
|
|
70
|
+
if (name.length < 5) {
|
|
71
|
+
// throw new Error(`length matched ${creativeWork.project.id} ${creativeWork.id} ${name}`);
|
|
72
|
+
unexpextedprojectIds.push(order.project.id);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
console.log(i, 'orders checked');
|
|
78
|
+
console.log('additionalPropertyNames:', [...new Set(additionalPropertyNames)]);
|
|
79
|
+
console.log('projectIds:', [...new Set(projectIds)]);
|
|
80
|
+
console.log('unexpextedprojectIds:', [...new Set(unexpextedprojectIds)]);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
main()
|
|
84
|
+
.then()
|
|
85
|
+
.catch(console.error);
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
import * as moment from 'moment';
|
|
3
|
+
import * as mongoose from 'mongoose';
|
|
4
|
+
import * as redis from 'redis';
|
|
5
|
+
|
|
6
|
+
import { chevre } from '../../../lib/index';
|
|
7
|
+
|
|
8
|
+
// const project = { id: String(process.env.PROJECT_ID) };
|
|
9
|
+
|
|
10
|
+
const EXCLUDED_PROJECT_ID = process.env.EXCLUDED_PROJECT_ID;
|
|
11
|
+
|
|
12
|
+
async function main() {
|
|
13
|
+
const client = redis.createClient<redis.RedisDefaultModules, Record<string, never>, Record<string, never>>({
|
|
14
|
+
socket: {
|
|
15
|
+
host: process.env.REDIS_HOST,
|
|
16
|
+
port: Number(process.env.REDIS_PORT)
|
|
17
|
+
},
|
|
18
|
+
password: process.env.REDIS_KEY
|
|
19
|
+
});
|
|
20
|
+
await client.connect();
|
|
21
|
+
await mongoose.connect(<string>process.env.MONGOLAB_URI);
|
|
22
|
+
|
|
23
|
+
const eventRepo = new chevre.repository.Event(mongoose.connection);
|
|
24
|
+
const stockHolderRepo = new chevre.repository.StockHolder(client);
|
|
25
|
+
|
|
26
|
+
const cursor = eventRepo.getCursor(
|
|
27
|
+
{
|
|
28
|
+
// 'project.id': { $eq: project.id },
|
|
29
|
+
'project.id': { $ne: EXCLUDED_PROJECT_ID },
|
|
30
|
+
typeOf: { $eq: chevre.factory.eventType.ScreeningEvent },
|
|
31
|
+
startDate: {
|
|
32
|
+
$gte: moment('2023-04-23T15:00:00Z')
|
|
33
|
+
.toDate()
|
|
34
|
+
}
|
|
35
|
+
// _id: { $eq: 'al6aff83w' }
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
// _id: 1,
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
console.log('events found');
|
|
42
|
+
|
|
43
|
+
let i = 0;
|
|
44
|
+
let updateCount = 0;
|
|
45
|
+
await cursor.eachAsync(async (doc) => {
|
|
46
|
+
i += 1;
|
|
47
|
+
const event: chevre.factory.event.screeningEvent.IEvent = doc.toObject();
|
|
48
|
+
|
|
49
|
+
const oldKey = chevre.repository.StockHolder.GET_KEY({
|
|
50
|
+
eventId: event.id,
|
|
51
|
+
startDate: new Date()
|
|
52
|
+
});
|
|
53
|
+
const newKey = chevre.repository.StockHolder.GET_KEY({
|
|
54
|
+
eventId: event.id,
|
|
55
|
+
startDate: moment(event.startDate)
|
|
56
|
+
.toDate()
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
let conflicted = false;
|
|
60
|
+
try {
|
|
61
|
+
await stockHolderRepo.checkIfConflicted({
|
|
62
|
+
key: newKey,
|
|
63
|
+
eventId: event.id
|
|
64
|
+
});
|
|
65
|
+
} catch (error) {
|
|
66
|
+
conflicted = true;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
if (conflicted) {
|
|
70
|
+
updateCount += 1;
|
|
71
|
+
await stockHolderRepo.migrateKey({
|
|
72
|
+
key: newKey,
|
|
73
|
+
eventId: event.id
|
|
74
|
+
});
|
|
75
|
+
console.log(
|
|
76
|
+
'updated...', event.project.id, event.id, event.startDate, i);
|
|
77
|
+
} else {
|
|
78
|
+
console.log(
|
|
79
|
+
'already exist...', event.project.id, event.id, event.startDate, i);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
console.log(i, 'events checked');
|
|
84
|
+
console.log(updateCount, 'events updated');
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
main()
|
|
88
|
+
.then()
|
|
89
|
+
.catch(console.error);
|
|
@@ -30,7 +30,7 @@ async function main() {
|
|
|
30
30
|
const priceSpecRepo = new chevre.repository.PriceSpecification(mongoose.connection);
|
|
31
31
|
const reservationRepo = new chevre.repository.Reservation(mongoose.connection);
|
|
32
32
|
const eventRepo = new chevre.repository.Event(mongoose.connection);
|
|
33
|
-
const itemAvailabilityRepo = new chevre.repository.
|
|
33
|
+
const itemAvailabilityRepo = new chevre.repository.StockHolder(client);
|
|
34
34
|
const offerRateLimitRepo = new chevre.repository.rateLimit.Offer(client);
|
|
35
35
|
|
|
36
36
|
const identifier = `CIN${(new Date()).valueOf()}`;
|
|
@@ -70,7 +70,7 @@ async function main() {
|
|
|
70
70
|
validateEventOfferPeriod: false,
|
|
71
71
|
validateAppliesToMovieTicket: true
|
|
72
72
|
})({
|
|
73
|
-
|
|
73
|
+
stockHolder: itemAvailabilityRepo,
|
|
74
74
|
event: eventRepo,
|
|
75
75
|
offer: offerRepo,
|
|
76
76
|
offerCatalog: offerCatalogRepo,
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
import * as redis from 'redis';
|
|
3
|
+
|
|
4
|
+
import { chevre } from '../../../lib/index';
|
|
5
|
+
|
|
6
|
+
// const project = { id: String(process.env.PROJECT_ID) };
|
|
7
|
+
|
|
8
|
+
// tslint:disable-next-line:max-func-body-length
|
|
9
|
+
async function main() {
|
|
10
|
+
const client = redis.createClient<redis.RedisDefaultModules, Record<string, never>, Record<string, never>>({
|
|
11
|
+
socket: {
|
|
12
|
+
port: Number(<string>process.env.REDIS_PORT),
|
|
13
|
+
host: <string>process.env.REDIS_HOST
|
|
14
|
+
},
|
|
15
|
+
password: <string>process.env.REDIS_KEY
|
|
16
|
+
});
|
|
17
|
+
await client.connect();
|
|
18
|
+
|
|
19
|
+
const itemAvailabilityRepo = new chevre.repository.StockHolder(client);
|
|
20
|
+
|
|
21
|
+
const result = await itemAvailabilityRepo.searchHolders({
|
|
22
|
+
eventId: 'alckc9mlx',
|
|
23
|
+
startDate: new Date(),
|
|
24
|
+
offers: [
|
|
25
|
+
{
|
|
26
|
+
seatSection: 'Default',
|
|
27
|
+
seatNumber: 'B-10'
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
seatSection: 'xxx',
|
|
31
|
+
seatNumber: 'xxx'
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
});
|
|
35
|
+
console.log(result);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
main()
|
|
39
|
+
.then(() => {
|
|
40
|
+
console.log('success!');
|
|
41
|
+
})
|
|
42
|
+
.catch(console.error);
|
|
@@ -11,7 +11,7 @@ async function main() {
|
|
|
11
11
|
|
|
12
12
|
const projectRepo = new chevre.repository.Project(mongoose.connection);
|
|
13
13
|
const productRepo = new chevre.repository.Product(mongoose.connection);
|
|
14
|
-
const personRepo = new chevre.repository.Person({ userPoolId: chevre.settings.userPoolIdNew });
|
|
14
|
+
const personRepo = new chevre.repository.Person({ userPoolId: chevre.settings.settings.userPoolIdNew });
|
|
15
15
|
|
|
16
16
|
const result = await findCreditCard({
|
|
17
17
|
project: { id: project.id },
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
import * as mongoose from 'mongoose';
|
|
3
|
+
|
|
4
|
+
import { chevre } from '../../../../lib/index';
|
|
5
|
+
|
|
6
|
+
async function main() {
|
|
7
|
+
await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
|
|
8
|
+
|
|
9
|
+
const transactionRepo = new chevre.repository.Transaction(mongoose.connection);
|
|
10
|
+
const result = await transactionRepo.makeExpired({
|
|
11
|
+
expires: new Date()
|
|
12
|
+
});
|
|
13
|
+
console.log(result);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
main()
|
|
17
|
+
.then(console.log)
|
|
18
|
+
.catch(console.error);
|
|
@@ -19,7 +19,7 @@ async function main() {
|
|
|
19
19
|
});
|
|
20
20
|
await redisClient.connect();
|
|
21
21
|
|
|
22
|
-
const personRepo = new chevre.repository.Person({ userPoolId: chevre.settings.userPoolIdNew });
|
|
22
|
+
const personRepo = new chevre.repository.Person({ userPoolId: chevre.settings.settings.userPoolIdNew });
|
|
23
23
|
const actionRepo = new chevre.repository.Action(mongoose.connection);
|
|
24
24
|
const accountRepo = new chevre.repository.Account(mongoose.connection);
|
|
25
25
|
const accountingReportRepo = new chevre.repository.AccountingReport(mongoose.connection);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
import * as mongoose from 'mongoose';
|
|
3
|
+
|
|
4
|
+
import { chevre } from '../../../../lib/index';
|
|
5
|
+
|
|
6
|
+
async function main() {
|
|
7
|
+
await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
|
|
8
|
+
|
|
9
|
+
const transactionRepo = new chevre.repository.Transaction(mongoose.connection);
|
|
10
|
+
const result = await transactionRepo.startExportTasks({
|
|
11
|
+
typeOf: { $in: [chevre.factory.transactionType.PlaceOrder] },
|
|
12
|
+
status: chevre.factory.transactionStatusType.Confirmed
|
|
13
|
+
});
|
|
14
|
+
console.log(result);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
main()
|
|
18
|
+
.then(console.log)
|
|
19
|
+
.catch(console.error);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { EventEmitter } from 'events';
|
|
3
|
+
import * as factory from '../factory';
|
|
4
|
+
interface IListenArgsOnTaskStatusChanged {
|
|
5
|
+
id?: string;
|
|
6
|
+
name: factory.taskName;
|
|
7
|
+
status: factory.taskStatus;
|
|
8
|
+
}
|
|
9
|
+
type IOnTaskStatusChangedListener = (listenArgs: IListenArgsOnTaskStatusChanged) => void;
|
|
10
|
+
/**
|
|
11
|
+
* タスクイベントエミッター
|
|
12
|
+
*/
|
|
13
|
+
declare class TaskEventEmitter extends EventEmitter {
|
|
14
|
+
onTaskStatusChanged(listner: IOnTaskStatusChangedListener): void;
|
|
15
|
+
emitTaskStatusChanged(args: IListenArgsOnTaskStatusChanged): void;
|
|
16
|
+
}
|
|
17
|
+
declare const taskEventEmitter: TaskEventEmitter;
|
|
18
|
+
export { IOnTaskStatusChangedListener, taskEventEmitter };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.taskEventEmitter = void 0;
|
|
4
|
+
const events_1 = require("events");
|
|
5
|
+
const settings_1 = require("../settings");
|
|
6
|
+
var EventName;
|
|
7
|
+
(function (EventName) {
|
|
8
|
+
EventName["OnTaskStatusChanged"] = "OnTaskStatusChanged";
|
|
9
|
+
})(EventName || (EventName = {}));
|
|
10
|
+
/**
|
|
11
|
+
* タスクイベントエミッター
|
|
12
|
+
*/
|
|
13
|
+
class TaskEventEmitter extends events_1.EventEmitter {
|
|
14
|
+
onTaskStatusChanged(listner) {
|
|
15
|
+
this.on(EventName.OnTaskStatusChanged, listner);
|
|
16
|
+
}
|
|
17
|
+
emitTaskStatusChanged(args) {
|
|
18
|
+
if (settings_1.USE_EVENT_EMITTERS) {
|
|
19
|
+
this.emit(EventName.OnTaskStatusChanged, args);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
const taskEventEmitter = new TaskEventEmitter();
|
|
24
|
+
exports.taskEventEmitter = taskEventEmitter;
|
|
25
|
+
taskEventEmitter.on('error', (err) => {
|
|
26
|
+
// tslint:disable-next-line:no-console
|
|
27
|
+
console.error('taskEventEmitter listened an error.', err);
|
|
28
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { EventEmitter } from 'events';
|
|
3
|
+
import * as factory from '../factory';
|
|
4
|
+
interface IListenArgsOnTransactionStatusChanged {
|
|
5
|
+
/**
|
|
6
|
+
* 取引ID
|
|
7
|
+
*/
|
|
8
|
+
id: string;
|
|
9
|
+
typeOf: factory.transactionType;
|
|
10
|
+
status: factory.transactionStatusType;
|
|
11
|
+
}
|
|
12
|
+
type IOnTransactionStatusChangedListener = (listenArgs: IListenArgsOnTransactionStatusChanged) => void;
|
|
13
|
+
/**
|
|
14
|
+
* 取引イベントエミッター
|
|
15
|
+
*/
|
|
16
|
+
declare class TransactionEventEmitter extends EventEmitter {
|
|
17
|
+
onTransactionStatusChanged(listner: IOnTransactionStatusChangedListener): void;
|
|
18
|
+
emitTransactionStatusChanged(args: IListenArgsOnTransactionStatusChanged): void;
|
|
19
|
+
}
|
|
20
|
+
declare const transactionEventEmitter: TransactionEventEmitter;
|
|
21
|
+
export { IListenArgsOnTransactionStatusChanged, transactionEventEmitter };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.transactionEventEmitter = void 0;
|
|
4
|
+
const events_1 = require("events");
|
|
5
|
+
const settings_1 = require("../settings");
|
|
6
|
+
var EventName;
|
|
7
|
+
(function (EventName) {
|
|
8
|
+
EventName["OnTransactionStatusChanged"] = "OnTransactionStatusChanged";
|
|
9
|
+
})(EventName || (EventName = {}));
|
|
10
|
+
/**
|
|
11
|
+
* 取引イベントエミッター
|
|
12
|
+
*/
|
|
13
|
+
class TransactionEventEmitter extends events_1.EventEmitter {
|
|
14
|
+
onTransactionStatusChanged(listner) {
|
|
15
|
+
this.on(EventName.OnTransactionStatusChanged, listner);
|
|
16
|
+
}
|
|
17
|
+
emitTransactionStatusChanged(args) {
|
|
18
|
+
if (settings_1.USE_EVENT_EMITTERS) {
|
|
19
|
+
this.emit(EventName.OnTransactionStatusChanged, args);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
const transactionEventEmitter = new TransactionEventEmitter();
|
|
24
|
+
exports.transactionEventEmitter = transactionEventEmitter;
|
|
25
|
+
transactionEventEmitter.on('error', (err) => {
|
|
26
|
+
// tslint:disable-next-line:no-console
|
|
27
|
+
console.error('transactionEventEmitter listened an error.', err);
|
|
28
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.transaction = exports.task = void 0;
|
|
4
|
+
const task_1 = require("./eventEmitter/task");
|
|
5
|
+
Object.defineProperty(exports, "task", { enumerable: true, get: function () { return task_1.taskEventEmitter; } });
|
|
6
|
+
const transaction_1 = require("./eventEmitter/transaction");
|
|
7
|
+
Object.defineProperty(exports, "transaction", { enumerable: true, get: function () { return transaction_1.transactionEventEmitter; } });
|
package/lib/chevre/index.d.ts
CHANGED
|
@@ -6,9 +6,10 @@ import * as GMO from '@motionpicture/gmo-service';
|
|
|
6
6
|
import * as surfrock from '@surfrock/sdk';
|
|
7
7
|
import { credentials } from './credentials';
|
|
8
8
|
import * as errorHandler from './errorHandler';
|
|
9
|
+
import * as eventEmitter from './eventEmitter';
|
|
9
10
|
import * as factory from './factory';
|
|
10
11
|
import * as pecorinoapi from './pecorinoapi';
|
|
11
12
|
import * as repository from './repository';
|
|
12
13
|
import * as service from './service';
|
|
13
|
-
import
|
|
14
|
-
export { credentials, errorHandler, factory, repository, service, settings, surfrock, pecorinoapi, COA, GMO };
|
|
14
|
+
import * as settings from './settings';
|
|
15
|
+
export { credentials, errorHandler, eventEmitter, factory, repository, service, settings, surfrock, pecorinoapi, COA, GMO };
|
package/lib/chevre/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GMO = exports.COA = exports.pecorinoapi = exports.surfrock = exports.settings = exports.service = exports.repository = exports.factory = exports.errorHandler = exports.credentials = void 0;
|
|
3
|
+
exports.GMO = exports.COA = exports.pecorinoapi = exports.surfrock = exports.settings = exports.service = exports.repository = exports.factory = exports.eventEmitter = exports.errorHandler = exports.credentials = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* index module
|
|
6
6
|
*/
|
|
@@ -14,6 +14,8 @@ const credentials_1 = require("./credentials");
|
|
|
14
14
|
Object.defineProperty(exports, "credentials", { enumerable: true, get: function () { return credentials_1.credentials; } });
|
|
15
15
|
const errorHandler = require("./errorHandler");
|
|
16
16
|
exports.errorHandler = errorHandler;
|
|
17
|
+
const eventEmitter = require("./eventEmitter");
|
|
18
|
+
exports.eventEmitter = eventEmitter;
|
|
17
19
|
const factory = require("./factory");
|
|
18
20
|
exports.factory = factory;
|
|
19
21
|
const pecorinoapi = require("./pecorinoapi");
|
|
@@ -22,5 +24,5 @@ const repository = require("./repository");
|
|
|
22
24
|
exports.repository = repository;
|
|
23
25
|
const service = require("./service");
|
|
24
26
|
exports.service = service;
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
+
const settings = require("./settings");
|
|
28
|
+
exports.settings = settings;
|
|
@@ -10,7 +10,6 @@ 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 onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
14
13
|
const account_1 = require("./mongoose/schemas/account");
|
|
15
14
|
const factory = require("../factory");
|
|
16
15
|
/**
|
|
@@ -19,9 +18,6 @@ const factory = require("../factory");
|
|
|
19
18
|
class MongoRepository {
|
|
20
19
|
constructor(connection) {
|
|
21
20
|
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
|
-
}
|
|
25
21
|
}
|
|
26
22
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
27
23
|
static CREATE_MONGO_CONDITIONS(params) {
|