@chevre/domain 21.2.0-alpha.5 → 21.2.0-alpha.51
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/aggregation/aggregateSystem.ts +58 -31
- 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/migrateOrderAdditionalProperties.ts +85 -0
- package/example/src/chevre/migrateStockHolderKeys.ts +89 -0
- package/example/src/chevre/saveTasks.ts +13 -10
- package/example/src/chevre/searchAbortedTasks.ts +36 -0
- package/example/src/chevre/searchSendEmailActions.ts +44 -0
- package/example/src/chevre/task/executeTasks.ts +26 -0
- package/example/src/chevre/transaction/findCreditCard.ts +1 -1
- package/example/src/chevre/transaction/orderMembershipService.ts +1 -1
- package/example/src/chevre/transaction/startExportTasks.ts +20 -0
- package/example/src/chevre/updateTransaction.ts +1 -1
- package/lib/chevre/credentials.d.ts +1 -0
- package/lib/chevre/credentials.js +2 -1
- package/lib/chevre/eventEmitter/assetTransaction.d.ts +21 -0
- package/lib/chevre/eventEmitter/assetTransaction.js +25 -0
- package/lib/chevre/eventEmitter/task.d.ts +18 -0
- package/lib/chevre/eventEmitter/task.js +25 -0
- package/lib/chevre/eventEmitter/transaction.d.ts +21 -0
- package/lib/chevre/eventEmitter/transaction.js +25 -0
- package/lib/chevre/eventEmitter.d.ts +4 -0
- package/lib/chevre/eventEmitter.js +9 -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 +3 -11
- package/lib/chevre/repo/accountTransaction.js +1 -58
- package/lib/chevre/repo/accountingReport.js +0 -4
- package/lib/chevre/repo/action.d.ts +12 -1
- package/lib/chevre/repo/action.js +9 -29
- package/lib/chevre/repo/additionalProperty.js +0 -4
- package/lib/chevre/repo/aggregation.js +0 -4
- package/lib/chevre/repo/assetTransaction.d.ts +22 -7
- package/lib/chevre/repo/assetTransaction.js +173 -55
- package/lib/chevre/repo/categoryCode.js +0 -4
- package/lib/chevre/repo/code.js +0 -4
- package/lib/chevre/repo/comment.d.ts +4 -1
- package/lib/chevre/repo/comment.js +20 -9
- package/lib/chevre/repo/confirmationNumber.d.ts +0 -1
- package/lib/chevre/repo/confirmationNumber.js +3 -15
- 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 +45 -3
- package/lib/chevre/repo/mongoose/schemas/assetTransaction.js +3 -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 +31 -3
- package/lib/chevre/repo/mongoose/schemas/task.js +3 -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 +41 -3
- package/lib/chevre/repo/mongoose/schemas/transaction.js +3 -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/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/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/stockHolder.js +30 -0
- package/lib/chevre/repo/task.d.ts +38 -2
- package/lib/chevre/repo/task.js +96 -10
- package/lib/chevre/repo/telemetry.js +0 -4
- package/lib/chevre/repo/transaction.d.ts +23 -3
- package/lib/chevre/repo/transaction.js +174 -58
- package/lib/chevre/repo/trip.js +0 -4
- package/lib/chevre/service/aggregation/system.d.ts +67 -22
- package/lib/chevre/service/aggregation/system.js +101 -89
- 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 +10 -4
- package/lib/chevre/service/assetTransaction/refund.js +1 -1
- package/lib/chevre/service/assetTransaction/registerService.js +1 -2
- package/lib/chevre/service/assetTransaction/reserve.js +1 -1
- package/lib/chevre/service/assetTransaction.d.ts +6 -2
- package/lib/chevre/service/assetTransaction.js +9 -5
- package/lib/chevre/service/notification/factory.js +2 -2
- package/lib/chevre/service/notification.d.ts +3 -1
- package/lib/chevre/service/notification.js +41 -7
- package/lib/chevre/service/offer/event/voidTransaction.d.ts +2 -0
- package/lib/chevre/service/offer/event/voidTransaction.js +17 -1
- package/lib/chevre/service/offer.js +1 -1
- package/lib/chevre/service/order/deleteOrder.js +8 -1
- 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/onPaid.js +1 -1
- package/lib/chevre/service/payment/any/onRefund.js +1 -1
- package/lib/chevre/service/payment/any.js +60 -10
- package/lib/chevre/service/payment/movieTicket/validation.d.ts +6 -2
- package/lib/chevre/service/payment/movieTicket/validation.js +12 -25
- package/lib/chevre/service/payment/movieTicket.d.ts +4 -1
- package/lib/chevre/service/payment/movieTicket.js +4 -3
- package/lib/chevre/service/product.js +1 -5
- package/lib/chevre/service/report/telemetry.d.ts +0 -11
- package/lib/chevre/service/report/telemetry.js +21 -24
- package/lib/chevre/service/reserve/cancelReservation.js +0 -2
- package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.d.ts +0 -3
- package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.js +20 -20
- package/lib/chevre/service/reserve/potentialActions/onReservationCheckedIn.js +2 -3
- package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +2 -31
- package/lib/chevre/service/reserve/potentialActions/onReservationUsed.js +2 -3
- package/lib/chevre/service/reserve/useReservation.js +1 -8
- package/lib/chevre/service/task/confirmRegisterServiceTransaction.js +1 -1
- package/lib/chevre/service/task/returnPayTransaction.js +1 -5
- package/lib/chevre/service/task/voidReserveTransaction.js +3 -1
- package/lib/chevre/service/task.d.ts +9 -0
- package/lib/chevre/service/task.js +43 -4
- package/lib/chevre/service/transaction/moneyTransfer.js +4 -4
- package/lib/chevre/service/transaction/orderProgramMembership.js +2 -1
- package/lib/chevre/service/transaction/placeOrder/exportTasks/factory.js +30 -29
- package/lib/chevre/service/transaction/placeOrder.js +1 -5
- package/lib/chevre/service/transaction/placeOrderInProgress/factory.js +1 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/moneyTransfer.d.ts +1 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/moneyTransfer.js +1 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/registerService.d.ts +1 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/registerService.js +1 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions.d.ts +1 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/result/acceptedOffers.d.ts +3 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/result/acceptedOffers.js +7 -3
- package/lib/chevre/service/transaction/placeOrderInProgress/result.d.ts +1 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/result.js +2 -2
- package/lib/chevre/service/transaction/placeOrderInProgress/validation/validateMovieTicket.d.ts +1 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/validation/validateMovieTicket.js +2 -2
- package/lib/chevre/service/transaction/placeOrderInProgress/validation.d.ts +2 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/validation.js +23 -17
- package/lib/chevre/service/transaction/placeOrderInProgress.d.ts +1 -0
- package/lib/chevre/service/transaction/placeOrderInProgress.js +17 -10
- package/lib/chevre/service/transaction/returnOrder.js +1 -5
- package/lib/chevre/service/transaction.d.ts +6 -0
- package/lib/chevre/service/transaction.js +22 -16
- package/lib/chevre/settings.d.ts +4 -1
- package/lib/chevre/settings.js +11 -4
- package/package.json +5 -5
- package/example/src/chevre/migrateMoneyTransferPendingTransactionIdentifier.ts +0 -96
- package/example/src/chevre/migrateMovieAdditionalProperties.ts +0 -98
|
@@ -17,9 +17,10 @@ const schema = new mongoose_1.Schema({
|
|
|
17
17
|
}, {
|
|
18
18
|
collection: 'serviceOutputs',
|
|
19
19
|
id: true,
|
|
20
|
-
read: '
|
|
20
|
+
read: 'primary',
|
|
21
21
|
writeConcern: writeConcern_1.writeConcern,
|
|
22
22
|
strict: false,
|
|
23
|
+
strictQuery: false,
|
|
23
24
|
useNestedStrict: true,
|
|
24
25
|
timestamps: {
|
|
25
26
|
createdAt: 'createdAt',
|
|
@@ -27,12 +27,13 @@ declare const modelName = "Task";
|
|
|
27
27
|
/**
|
|
28
28
|
* タスクスキーマ
|
|
29
29
|
*/
|
|
30
|
-
declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, any>, {}, {}, {}, {},
|
|
30
|
+
declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
31
31
|
collection: string;
|
|
32
32
|
id: true;
|
|
33
33
|
read: string;
|
|
34
34
|
writeConcern: import("mongodb").WriteConcern;
|
|
35
35
|
strict: true;
|
|
36
|
+
strictQuery: false;
|
|
36
37
|
useNestedStrict: boolean;
|
|
37
38
|
timestamps: {
|
|
38
39
|
createdAt: string;
|
|
@@ -50,7 +51,7 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
50
51
|
minimize: false;
|
|
51
52
|
versionKey: false;
|
|
52
53
|
};
|
|
53
|
-
}
|
|
54
|
+
}, {
|
|
54
55
|
executionResults: any[];
|
|
55
56
|
name?: string | undefined;
|
|
56
57
|
status?: string | undefined;
|
|
@@ -60,6 +61,33 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
60
61
|
remainingNumberOfTries?: number | undefined;
|
|
61
62
|
lastTriedAt?: Date | undefined;
|
|
62
63
|
numberOfTried?: number | undefined;
|
|
64
|
+
executor?: any;
|
|
63
65
|
dateAborted?: Date | undefined;
|
|
64
|
-
}
|
|
66
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
67
|
+
executionResults: any[];
|
|
68
|
+
name?: string | undefined;
|
|
69
|
+
status?: string | undefined;
|
|
70
|
+
data?: any;
|
|
71
|
+
project?: any;
|
|
72
|
+
runsAt?: Date | undefined;
|
|
73
|
+
remainingNumberOfTries?: number | undefined;
|
|
74
|
+
lastTriedAt?: Date | undefined;
|
|
75
|
+
numberOfTried?: number | undefined;
|
|
76
|
+
executor?: any;
|
|
77
|
+
dateAborted?: Date | undefined;
|
|
78
|
+
}>> & Omit<import("mongoose").FlatRecord<{
|
|
79
|
+
executionResults: any[];
|
|
80
|
+
name?: string | undefined;
|
|
81
|
+
status?: string | undefined;
|
|
82
|
+
data?: any;
|
|
83
|
+
project?: any;
|
|
84
|
+
runsAt?: Date | undefined;
|
|
85
|
+
remainingNumberOfTries?: number | undefined;
|
|
86
|
+
lastTriedAt?: Date | undefined;
|
|
87
|
+
numberOfTried?: number | undefined;
|
|
88
|
+
executor?: any;
|
|
89
|
+
dateAborted?: Date | undefined;
|
|
90
|
+
}> & {
|
|
91
|
+
_id: import("mongoose").Types.ObjectId;
|
|
92
|
+
}, never>>;
|
|
65
93
|
export { modelName, schema };
|
|
@@ -17,14 +17,16 @@ const schema = new mongoose_1.Schema({
|
|
|
17
17
|
lastTriedAt: Date,
|
|
18
18
|
numberOfTried: Number,
|
|
19
19
|
executionResults: [mongoose_1.SchemaTypes.Mixed],
|
|
20
|
+
executor: mongoose_1.SchemaTypes.Mixed,
|
|
20
21
|
data: mongoose_1.SchemaTypes.Mixed,
|
|
21
22
|
dateAborted: Date
|
|
22
23
|
}, {
|
|
23
24
|
collection: 'tasks',
|
|
24
25
|
id: true,
|
|
25
|
-
read: '
|
|
26
|
+
read: 'primary',
|
|
26
27
|
writeConcern: writeConcern_1.writeConcern,
|
|
27
28
|
strict: true,
|
|
29
|
+
strictQuery: false,
|
|
28
30
|
useNestedStrict: true,
|
|
29
31
|
timestamps: {
|
|
30
32
|
createdAt: 'createdAt',
|
|
@@ -27,12 +27,13 @@ declare const modelName = "Telemetry";
|
|
|
27
27
|
/**
|
|
28
28
|
* 測定スキーマ
|
|
29
29
|
*/
|
|
30
|
-
declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, any>, {}, {}, {}, {},
|
|
30
|
+
declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
31
31
|
collection: string;
|
|
32
32
|
id: true;
|
|
33
33
|
read: string;
|
|
34
34
|
writeConcern: import("mongodb").WriteConcern;
|
|
35
35
|
strict: true;
|
|
36
|
+
strictQuery: false;
|
|
36
37
|
useNestedStrict: boolean;
|
|
37
38
|
timestamps: {
|
|
38
39
|
createdAt: string;
|
|
@@ -50,13 +51,31 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
50
51
|
minimize: false;
|
|
51
52
|
versionKey: false;
|
|
52
53
|
};
|
|
53
|
-
}
|
|
54
|
+
}, {
|
|
54
55
|
object?: any;
|
|
55
56
|
error?: any;
|
|
57
|
+
result?: any;
|
|
58
|
+
project?: any;
|
|
59
|
+
startDate?: Date | undefined;
|
|
60
|
+
endDate?: Date | undefined;
|
|
61
|
+
purpose?: any;
|
|
62
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
63
|
+
object?: any;
|
|
64
|
+
error?: any;
|
|
65
|
+
result?: any;
|
|
56
66
|
project?: any;
|
|
57
67
|
startDate?: Date | undefined;
|
|
58
68
|
endDate?: Date | undefined;
|
|
69
|
+
purpose?: any;
|
|
70
|
+
}>> & Omit<import("mongoose").FlatRecord<{
|
|
71
|
+
object?: any;
|
|
72
|
+
error?: any;
|
|
59
73
|
result?: any;
|
|
74
|
+
project?: any;
|
|
75
|
+
startDate?: Date | undefined;
|
|
76
|
+
endDate?: Date | undefined;
|
|
60
77
|
purpose?: any;
|
|
61
|
-
}
|
|
78
|
+
}> & {
|
|
79
|
+
_id: import("mongoose").Types.ObjectId;
|
|
80
|
+
}, never>>;
|
|
62
81
|
export { modelName, schema };
|
|
@@ -27,12 +27,13 @@ declare const modelName = "Transaction";
|
|
|
27
27
|
/**
|
|
28
28
|
* 取引スキーマ
|
|
29
29
|
*/
|
|
30
|
-
declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, any>, {}, {}, {}, {},
|
|
30
|
+
declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
31
31
|
collection: string;
|
|
32
32
|
id: true;
|
|
33
33
|
read: string;
|
|
34
34
|
writeConcern: import("mongodb").WriteConcern;
|
|
35
35
|
strict: true;
|
|
36
|
+
strictQuery: false;
|
|
36
37
|
useNestedStrict: boolean;
|
|
37
38
|
timestamps: {
|
|
38
39
|
createdAt: string;
|
|
@@ -50,11 +51,29 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
50
51
|
minimize: false;
|
|
51
52
|
versionKey: false;
|
|
52
53
|
};
|
|
53
|
-
}
|
|
54
|
+
}, {
|
|
54
55
|
object?: any;
|
|
56
|
+
error?: any;
|
|
55
57
|
typeOf?: string | undefined;
|
|
56
58
|
status?: string | undefined;
|
|
59
|
+
result?: any;
|
|
60
|
+
expires?: Date | undefined;
|
|
61
|
+
project?: any;
|
|
62
|
+
agent?: any;
|
|
63
|
+
recipient?: any;
|
|
64
|
+
startDate?: Date | undefined;
|
|
65
|
+
endDate?: Date | undefined;
|
|
66
|
+
potentialActions?: any;
|
|
67
|
+
tasksExportationStatus?: string | undefined;
|
|
68
|
+
tasksExportedAt?: Date | undefined;
|
|
69
|
+
seller?: any;
|
|
70
|
+
tasksExportAction?: any;
|
|
71
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
72
|
+
object?: any;
|
|
57
73
|
error?: any;
|
|
74
|
+
typeOf?: string | undefined;
|
|
75
|
+
status?: string | undefined;
|
|
76
|
+
result?: any;
|
|
58
77
|
expires?: Date | undefined;
|
|
59
78
|
project?: any;
|
|
60
79
|
agent?: any;
|
|
@@ -64,7 +83,26 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
64
83
|
potentialActions?: any;
|
|
65
84
|
tasksExportationStatus?: string | undefined;
|
|
66
85
|
tasksExportedAt?: Date | undefined;
|
|
86
|
+
seller?: any;
|
|
87
|
+
tasksExportAction?: any;
|
|
88
|
+
}>> & Omit<import("mongoose").FlatRecord<{
|
|
89
|
+
object?: any;
|
|
90
|
+
error?: any;
|
|
91
|
+
typeOf?: string | undefined;
|
|
92
|
+
status?: string | undefined;
|
|
67
93
|
result?: any;
|
|
94
|
+
expires?: Date | undefined;
|
|
95
|
+
project?: any;
|
|
96
|
+
agent?: any;
|
|
97
|
+
recipient?: any;
|
|
98
|
+
startDate?: Date | undefined;
|
|
99
|
+
endDate?: Date | undefined;
|
|
100
|
+
potentialActions?: any;
|
|
101
|
+
tasksExportationStatus?: string | undefined;
|
|
102
|
+
tasksExportedAt?: Date | undefined;
|
|
68
103
|
seller?: any;
|
|
69
|
-
|
|
104
|
+
tasksExportAction?: any;
|
|
105
|
+
}> & {
|
|
106
|
+
_id: import("mongoose").Types.ObjectId;
|
|
107
|
+
}, never>>;
|
|
70
108
|
export { modelName, schema };
|
|
@@ -22,15 +22,17 @@ const schema = new mongoose_1.Schema({
|
|
|
22
22
|
expires: Date,
|
|
23
23
|
startDate: Date,
|
|
24
24
|
endDate: Date,
|
|
25
|
+
tasksExportAction: mongoose_1.SchemaTypes.Mixed,
|
|
25
26
|
tasksExportedAt: Date,
|
|
26
27
|
tasksExportationStatus: String,
|
|
27
28
|
potentialActions: mongoose_1.SchemaTypes.Mixed
|
|
28
29
|
}, {
|
|
29
30
|
collection: 'transactions',
|
|
30
31
|
id: true,
|
|
31
|
-
read: '
|
|
32
|
+
read: 'primary',
|
|
32
33
|
writeConcern: writeConcern_1.writeConcern,
|
|
33
34
|
strict: true,
|
|
35
|
+
strictQuery: false,
|
|
34
36
|
useNestedStrict: true,
|
|
35
37
|
timestamps: {
|
|
36
38
|
createdAt: 'createdAt',
|
|
@@ -27,12 +27,13 @@ declare const modelName = "Trip";
|
|
|
27
27
|
/**
|
|
28
28
|
* トリップスキーマ
|
|
29
29
|
*/
|
|
30
|
-
declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, any>, {}, {}, {}, {},
|
|
30
|
+
declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
31
31
|
collection: string;
|
|
32
32
|
id: true;
|
|
33
33
|
read: string;
|
|
34
34
|
writeConcern: import("mongodb").WriteConcern;
|
|
35
35
|
strict: false;
|
|
36
|
+
strictQuery: false;
|
|
36
37
|
useNestedStrict: boolean;
|
|
37
38
|
timestamps: {
|
|
38
39
|
createdAt: string;
|
|
@@ -50,8 +51,16 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
50
51
|
minimize: false;
|
|
51
52
|
versionKey: false;
|
|
52
53
|
};
|
|
53
|
-
}
|
|
54
|
+
}, {
|
|
54
55
|
typeOf: string;
|
|
55
56
|
project?: any;
|
|
56
|
-
}
|
|
57
|
+
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
58
|
+
typeOf: string;
|
|
59
|
+
project?: any;
|
|
60
|
+
}>> & Omit<import("mongoose").FlatRecord<{
|
|
61
|
+
typeOf: string;
|
|
62
|
+
project?: any;
|
|
63
|
+
}> & {
|
|
64
|
+
_id: import("mongoose").Types.ObjectId;
|
|
65
|
+
}, never>>;
|
|
57
66
|
export { modelName, schema };
|
package/lib/chevre/repo/offer.js
CHANGED
|
@@ -23,7 +23,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
23
23
|
exports.MongoRepository = void 0;
|
|
24
24
|
const uniqid = require("uniqid");
|
|
25
25
|
const factory = require("../factory");
|
|
26
|
-
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
27
26
|
const offer_1 = require("./mongoose/schemas/offer");
|
|
28
27
|
const offerCatalog_1 = require("./mongoose/schemas/offerCatalog");
|
|
29
28
|
/**
|
|
@@ -33,10 +32,6 @@ class MongoRepository {
|
|
|
33
32
|
constructor(connection) {
|
|
34
33
|
this.offerModel = connection.model(offer_1.modelName, offer_1.schema);
|
|
35
34
|
this.offerCatalogModel = connection.model(offerCatalog_1.modelName, offerCatalog_1.schema);
|
|
36
|
-
if (connection.get('autoIndex') === true) {
|
|
37
|
-
this.offerModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
38
|
-
this.offerCatalogModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
39
|
-
}
|
|
40
35
|
}
|
|
41
36
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
42
37
|
static CREATE_OFFER_MONGO_CONDITIONS(params) {
|
|
@@ -23,7 +23,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
23
23
|
exports.MongoRepository = void 0;
|
|
24
24
|
const uniqid = require("uniqid");
|
|
25
25
|
const factory = require("../factory");
|
|
26
|
-
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
27
26
|
const offerCatalog_1 = require("./mongoose/schemas/offerCatalog");
|
|
28
27
|
/**
|
|
29
28
|
* オファーカタログリポジトリ
|
|
@@ -31,9 +30,6 @@ const offerCatalog_1 = require("./mongoose/schemas/offerCatalog");
|
|
|
31
30
|
class MongoRepository {
|
|
32
31
|
constructor(connection) {
|
|
33
32
|
this.offerCatalogModel = connection.model(offerCatalog_1.modelName, offerCatalog_1.schema);
|
|
34
|
-
if (connection.get('autoIndex') === true) {
|
|
35
|
-
this.offerCatalogModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
36
|
-
}
|
|
37
33
|
}
|
|
38
34
|
// tslint:disable-next-line:max-func-body-length
|
|
39
35
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
1
25
|
import { Connection } from 'mongoose';
|
|
2
26
|
import * as factory from '../factory';
|
|
3
27
|
/**
|
|
@@ -86,4 +110,5 @@ export declare class MongoRepository {
|
|
|
86
110
|
$in: string[];
|
|
87
111
|
};
|
|
88
112
|
}): Promise<(string)[]>;
|
|
113
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<any, import("mongoose").QueryOptions<any>>;
|
|
89
114
|
}
|
package/lib/chevre/repo/order.js
CHANGED
|
@@ -11,7 +11,6 @@ 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 onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
15
14
|
const order_1 = require("./mongoose/schemas/order");
|
|
16
15
|
const errorHandler_1 = require("../errorHandler");
|
|
17
16
|
const order_2 = require("../factory/order");
|
|
@@ -21,9 +20,6 @@ const order_2 = require("../factory/order");
|
|
|
21
20
|
class MongoRepository {
|
|
22
21
|
constructor(connection) {
|
|
23
22
|
this.orderModel = connection.model(order_1.modelName, order_1.schema);
|
|
24
|
-
if (connection.get('autoIndex') === true) {
|
|
25
|
-
this.orderModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
26
|
-
}
|
|
27
23
|
}
|
|
28
24
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
29
25
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
@@ -1014,5 +1010,10 @@ class MongoRepository {
|
|
|
1014
1010
|
return [...new Set(reservationNumbers)];
|
|
1015
1011
|
});
|
|
1016
1012
|
}
|
|
1013
|
+
getCursor(conditions, projection) {
|
|
1014
|
+
return this.orderModel.find(conditions, projection)
|
|
1015
|
+
.sort({ orderDate: factory.sortType.Descending })
|
|
1016
|
+
.cursor();
|
|
1017
|
+
}
|
|
1017
1018
|
}
|
|
1018
1019
|
exports.MongoRepository = MongoRepository;
|
|
@@ -11,7 +11,6 @@ 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 uuid = require("uuid");
|
|
14
|
-
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
15
14
|
const ownershipInfo_1 = require("./mongoose/schemas/ownershipInfo");
|
|
16
15
|
const errorHandler_1 = require("../errorHandler");
|
|
17
16
|
const factory = require("../factory");
|
|
@@ -21,9 +20,6 @@ const factory = require("../factory");
|
|
|
21
20
|
class MongoRepository {
|
|
22
21
|
constructor(connection) {
|
|
23
22
|
this.ownershipInfoModel = connection.model(ownershipInfo_1.modelName, ownershipInfo_1.schema);
|
|
24
|
-
if (connection.get('autoIndex') === true) {
|
|
25
|
-
this.ownershipInfoModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
26
|
-
}
|
|
27
23
|
}
|
|
28
24
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
29
25
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
@@ -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 serviceOutput_1 = require("./mongoose/schemas/serviceOutput");
|
|
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.serviceOutputModel = connection.model(serviceOutput_1.modelName, serviceOutput_1.schema);
|
|
22
|
-
if (connection.get('autoIndex') === true) {
|
|
23
|
-
this.serviceOutputModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
24
|
-
}
|
|
25
21
|
}
|
|
26
22
|
findByIdentifier(params, projection) {
|
|
27
23
|
var _a, _b;
|
|
@@ -48,7 +48,11 @@ export declare class MongoRepository {
|
|
|
48
48
|
/**
|
|
49
49
|
* 施設検索
|
|
50
50
|
*/
|
|
51
|
-
searchMovieTheaters(params: factory.place.movieTheater.ISearchConditions
|
|
51
|
+
searchMovieTheaters(params: factory.place.movieTheater.ISearchConditions & {
|
|
52
|
+
$projection?: {
|
|
53
|
+
[key: string]: 0;
|
|
54
|
+
};
|
|
55
|
+
}): Promise<factory.place.movieTheater.IPlaceWithoutScreeningRoom[]>;
|
|
52
56
|
/**
|
|
53
57
|
* 施設取得
|
|
54
58
|
*/
|
package/lib/chevre/repo/place.js
CHANGED
|
@@ -22,7 +22,6 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
23
|
exports.MongoRepository = void 0;
|
|
24
24
|
const mongoose_1 = require("mongoose");
|
|
25
|
-
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
26
25
|
const place_1 = require("./mongoose/schemas/place");
|
|
27
26
|
const factory = require("../factory");
|
|
28
27
|
/**
|
|
@@ -31,9 +30,6 @@ const factory = require("../factory");
|
|
|
31
30
|
class MongoRepository {
|
|
32
31
|
constructor(connection) {
|
|
33
32
|
this.placeModel = connection.model(place_1.modelName, place_1.schema);
|
|
34
|
-
if (connection.get('autoIndex') === true) {
|
|
35
|
-
this.placeModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
36
|
-
}
|
|
37
33
|
}
|
|
38
34
|
// tslint:disable-next-line:max-func-body-length
|
|
39
35
|
static CREATE_BUS_STOP_MONGO_CONDITIONS(params) {
|
|
@@ -276,12 +272,7 @@ class MongoRepository {
|
|
|
276
272
|
return __awaiter(this, void 0, void 0, function* () {
|
|
277
273
|
const conditions = MongoRepository.CREATE_MOVIE_THEATER_MONGO_CONDITIONS(params);
|
|
278
274
|
// containsPlaceを含めるとデータサイズが大きくなるので、検索結果には含めない
|
|
279
|
-
const query = this.placeModel.find((conditions.length > 0) ? { $and: conditions } : {}, {
|
|
280
|
-
__v: 0,
|
|
281
|
-
createdAt: 0,
|
|
282
|
-
updatedAt: 0,
|
|
283
|
-
containsPlace: 0
|
|
284
|
-
});
|
|
275
|
+
const query = this.placeModel.find((conditions.length > 0) ? { $and: conditions } : {}, Object.assign({ __v: 0, createdAt: 0, updatedAt: 0, containsPlace: 0 }, params.$projection));
|
|
285
276
|
if (typeof params.limit === 'number' && params.limit > 0) {
|
|
286
277
|
const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
|
|
287
278
|
query.limit(params.limit)
|
|
@@ -22,7 +22,6 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
23
|
exports.MongoRepository = void 0;
|
|
24
24
|
const factory = require("../factory");
|
|
25
|
-
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
26
25
|
const priceSpecification_1 = require("./mongoose/schemas/priceSpecification");
|
|
27
26
|
/**
|
|
28
27
|
* 価格仕様リポジトリ
|
|
@@ -30,9 +29,6 @@ const priceSpecification_1 = require("./mongoose/schemas/priceSpecification");
|
|
|
30
29
|
class MongoRepository {
|
|
31
30
|
constructor(connection) {
|
|
32
31
|
this.priceSpecificationModel = connection.model(priceSpecification_1.modelName, priceSpecification_1.schema);
|
|
33
|
-
if (connection.get('autoIndex') === true) {
|
|
34
|
-
this.priceSpecificationModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
35
|
-
}
|
|
36
32
|
}
|
|
37
33
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
38
34
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
@@ -21,7 +21,6 @@ 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 onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
25
24
|
const product_1 = require("./mongoose/schemas/product");
|
|
26
25
|
const factory = require("../factory");
|
|
27
26
|
/**
|
|
@@ -30,9 +29,6 @@ const factory = require("../factory");
|
|
|
30
29
|
class MongoRepository {
|
|
31
30
|
constructor(connection) {
|
|
32
31
|
this.productModel = connection.model(product_1.modelName, product_1.schema);
|
|
33
|
-
if (connection.get('autoIndex') === true) {
|
|
34
|
-
this.productModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
35
|
-
}
|
|
36
32
|
}
|
|
37
33
|
// tslint:disable-next-line:max-func-body-length
|
|
38
34
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
@@ -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 project_1 = require("./mongoose/schemas/project");
|
|
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.projectModel = connection.model(project_1.modelName, project_1.schema);
|
|
22
|
-
if (connection.get('autoIndex') === true) {
|
|
23
|
-
this.projectModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
24
|
-
}
|
|
25
21
|
}
|
|
26
22
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
27
23
|
// MongoDB検索条件
|
|
@@ -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 reservation_1 = require("./mongoose/schemas/reservation");
|
|
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.reservationModel = connection.model(reservation_1.modelName, reservation_1.schema);
|
|
22
|
-
if (connection.get('autoIndex') === true) {
|
|
23
|
-
this.reservationModel.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) {
|
package/lib/chevre/repo/role.js
CHANGED
|
@@ -11,7 +11,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.MongoRepository = exports.RoleType = void 0;
|
|
13
13
|
const factory = require("../factory");
|
|
14
|
-
const onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
15
14
|
const role_1 = require("./mongoose/schemas/role");
|
|
16
15
|
var RoleType;
|
|
17
16
|
(function (RoleType) {
|
|
@@ -23,9 +22,6 @@ var RoleType;
|
|
|
23
22
|
class MongoRepository {
|
|
24
23
|
constructor(connection) {
|
|
25
24
|
this.roleModel = connection.model(role_1.modelName, role_1.schema);
|
|
26
|
-
if (connection.get('autoIndex') === true) {
|
|
27
|
-
this.roleModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
28
|
-
}
|
|
29
25
|
}
|
|
30
26
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
31
27
|
var _a, _b, _c;
|
|
@@ -21,7 +21,6 @@ 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 onIndexCreated_1 = require("./mongoose/onIndexCreated");
|
|
25
24
|
const seller_1 = require("./mongoose/schemas/seller");
|
|
26
25
|
const factory = require("../factory");
|
|
27
26
|
/**
|
|
@@ -30,9 +29,6 @@ const factory = require("../factory");
|
|
|
30
29
|
class MongoRepository {
|
|
31
30
|
constructor(connection) {
|
|
32
31
|
this.organizationModel = connection.model(seller_1.modelName, seller_1.schema);
|
|
33
|
-
if (connection.get('autoIndex') === true) {
|
|
34
|
-
this.organizationModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
35
|
-
}
|
|
36
32
|
}
|
|
37
33
|
// tslint:disable-next-line:max-func-body-length
|
|
38
34
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
@@ -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 serviceOutput_1 = require("./mongoose/schemas/serviceOutput");
|
|
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.serviceOutputModel = connection.model(serviceOutput_1.modelName, serviceOutput_1.schema);
|
|
22
|
-
if (connection.get('autoIndex') === true) {
|
|
23
|
-
this.serviceOutputModel.on(onIndexCreated_1.INDEX_EVENT, onIndexCreated_1.onIndexCreated);
|
|
24
|
-
}
|
|
25
21
|
}
|
|
26
22
|
// tslint:disable-next-line:max-func-body-length
|
|
27
23
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
@@ -22,6 +22,12 @@ class StockHolderRepository {
|
|
|
22
22
|
constructor(redisClient) {
|
|
23
23
|
this.redisClient = redisClient;
|
|
24
24
|
}
|
|
25
|
+
// public static GET_KEY(params: {
|
|
26
|
+
// eventId: string;
|
|
27
|
+
// startDate: Date;
|
|
28
|
+
// }) {
|
|
29
|
+
// return StockHolderRepository.createKey(params);
|
|
30
|
+
// }
|
|
25
31
|
static offer2field(params) {
|
|
26
32
|
var _a, _b;
|
|
27
33
|
// 予約IDをfieldにする場合
|
|
@@ -214,6 +220,30 @@ class StockHolderRepository {
|
|
|
214
220
|
return result;
|
|
215
221
|
});
|
|
216
222
|
}
|
|
223
|
+
// public async migrateKey(params: {
|
|
224
|
+
// key: string;
|
|
225
|
+
// eventId: string;
|
|
226
|
+
// }): Promise<void> {
|
|
227
|
+
// // 旧キーと新キーの両方存在検証(念のため)
|
|
228
|
+
// const oldKey = StockHolderRepository.createKey({ eventId: params.eventId, startDate: new Date('2020-01-01T00:00:00Z') });
|
|
229
|
+
// const newKey = StockHolderRepository.createKey({ eventId: params.eventId, startDate: new Date('2030-01-01T00:00:00Z') });
|
|
230
|
+
// if (params.key !== oldKey) {
|
|
231
|
+
// // newの場合oldが存在するはずがない
|
|
232
|
+
// const existingOldKeyCount = await this.redisClient.exists(oldKey);
|
|
233
|
+
// debug('existingOldKeyCount:', existingOldKeyCount);
|
|
234
|
+
// if (existingOldKeyCount > 0) {
|
|
235
|
+
// await this.redisClient.del(oldKey);
|
|
236
|
+
// }
|
|
237
|
+
// }
|
|
238
|
+
// if (params.key !== newKey) {
|
|
239
|
+
// // oldの場合newが存在するはずがない
|
|
240
|
+
// const existingNewKeyCount = await this.redisClient.exists(newKey);
|
|
241
|
+
// debug('existingNewKeyCount:', existingNewKeyCount);
|
|
242
|
+
// if (existingNewKeyCount > 0) {
|
|
243
|
+
// await this.redisClient.del(newKey);
|
|
244
|
+
// }
|
|
245
|
+
// }
|
|
246
|
+
// }
|
|
217
247
|
checkIfConflicted(params) {
|
|
218
248
|
return __awaiter(this, void 0, void 0, function* () {
|
|
219
249
|
// 旧キーと新キーの両方存在検証(念のため)
|