@chevre/domain 21.2.0-alpha.99 → 21.2.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/example/src/chevre/aggregateEventReservation.ts +1 -1
- package/example/src/chevre/aggregateSellerPaymentAccepted.ts +27 -0
- package/example/src/chevre/aggregation/aggregateSystem.ts +53 -22
- package/example/src/chevre/countDelayedTasks.ts +7 -2
- package/example/src/chevre/createManyEventsIfNotExist.ts +199 -46
- package/example/src/chevre/findScreeningRoomsByBranchCode.ts +4 -3
- package/example/src/chevre/giveUpStartDatePassedCertainPeriod.ts +56 -0
- package/example/src/chevre/lockStockHolder.ts +5 -2
- package/example/src/chevre/migrateCategoryCodeAdditionalProperties.ts +116 -0
- package/example/src/chevre/migrateScreeningEventSeriesVersion.ts +79 -0
- package/example/src/chevre/processRegisterMembership.ts +8 -4
- package/example/src/chevre/processRegisterPaymentCard.ts +8 -4
- package/example/src/chevre/processReserve.ts +1 -1
- package/example/src/chevre/searchAbortedTasks.ts +4 -6
- package/example/src/chevre/searchEventSeats.ts +5 -2
- package/example/src/chevre/searchHoldReservations.ts +38 -0
- package/example/src/chevre/searchPermissions.ts +54 -0
- package/example/src/chevre/searchScreeningRooms.ts +35 -0
- package/example/src/chevre/sendEmailMessage.ts +1 -2
- package/example/src/chevre/syncScreeningRooms.ts +22 -0
- package/example/src/chevre/syncScreeningRoomsAll.ts +44 -0
- package/example/src/chevre/unsetContainsInPlaceFromMovieTheater.ts +41 -0
- package/lib/chevre/factory/order.d.ts +4 -1
- package/lib/chevre/factory/order.js +19 -6
- package/lib/chevre/repo/account.js +3 -2
- package/lib/chevre/repo/accountTransaction.js +2 -1
- package/lib/chevre/repo/accountingReport.d.ts +1 -3
- package/lib/chevre/repo/action.d.ts +50 -1
- package/lib/chevre/repo/action.js +53 -2
- package/lib/chevre/repo/additionalProperty.js +2 -1
- package/lib/chevre/repo/aggregation.d.ts +3 -0
- package/lib/chevre/repo/aggregation.js +3 -0
- package/lib/chevre/repo/assetTransaction.js +6 -5
- package/lib/chevre/repo/categoryCode.d.ts +1 -1
- package/lib/chevre/repo/categoryCode.js +37 -25
- package/lib/chevre/repo/code.js +3 -2
- package/lib/chevre/repo/comment.js +2 -1
- package/lib/chevre/repo/creativeWork.d.ts +1 -1
- package/lib/chevre/repo/creativeWork.js +35 -12
- package/lib/chevre/repo/customer.js +2 -1
- package/lib/chevre/repo/emailMessage.js +2 -1
- package/lib/chevre/repo/event.d.ts +30 -2
- package/lib/chevre/repo/event.js +87 -36
- package/lib/chevre/repo/member.d.ts +14 -0
- package/lib/chevre/repo/member.js +31 -3
- package/lib/chevre/repo/merchantReturnPolicy.js +2 -1
- package/lib/chevre/repo/mongoose/schemas/assetTransaction.d.ts +3 -3
- package/lib/chevre/repo/mongoose/schemas/holdReservation.d.ts +75 -0
- package/lib/chevre/repo/mongoose/schemas/holdReservation.js +93 -0
- package/lib/chevre/repo/mongoose/schemas/offer.d.ts +3 -3
- package/lib/chevre/repo/mongoose/schemas/order.d.ts +21 -21
- package/lib/chevre/repo/mongoose/schemas/place.d.ts +6 -0
- package/lib/chevre/repo/mongoose/schemas/place.js +16 -1
- package/lib/chevre/repo/mongoose/schemas/product.js +6 -0
- package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +9 -9
- package/lib/chevre/repo/mongoose/schemas/transaction.d.ts +3 -3
- package/lib/chevre/repo/offer.js +3 -2
- package/lib/chevre/repo/offerCatalog.js +0 -27
- package/lib/chevre/repo/offerItemCondition.js +2 -1
- package/lib/chevre/repo/order.js +8 -7
- package/lib/chevre/repo/ownershipInfo.js +2 -7
- package/lib/chevre/repo/paymentServiceProvider.d.ts +65 -0
- package/lib/chevre/repo/paymentServiceProvider.js +156 -0
- package/lib/chevre/repo/place.d.ts +203 -27
- package/lib/chevre/repo/place.js +1726 -694
- package/lib/chevre/repo/priceSpecification.js +3 -2
- package/lib/chevre/repo/product.d.ts +5 -3
- package/lib/chevre/repo/product.js +92 -5
- package/lib/chevre/repo/project.js +2 -1
- package/lib/chevre/repo/reservation.d.ts +9 -1
- package/lib/chevre/repo/reservation.js +29 -20
- package/lib/chevre/repo/role.d.ts +7 -0
- package/lib/chevre/repo/role.js +39 -2
- package/lib/chevre/repo/seller.d.ts +21 -1
- package/lib/chevre/repo/seller.js +59 -4
- package/lib/chevre/repo/serviceOutput.js +2 -1
- package/lib/chevre/repo/stockHolder.d.ts +143 -7
- package/lib/chevre/repo/stockHolder.js +622 -104
- package/lib/chevre/repo/task.d.ts +12 -1
- package/lib/chevre/repo/task.js +17 -7
- package/lib/chevre/repo/transaction.js +6 -5
- package/lib/chevre/repo/trip.js +2 -1
- package/lib/chevre/repository.d.ts +6 -0
- package/lib/chevre/repository.js +8 -1
- package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +18 -8
- package/lib/chevre/service/aggregation/event/aggregateUseActionsOnEvent.js +19 -8
- package/lib/chevre/service/aggregation/system.d.ts +43 -1
- package/lib/chevre/service/aggregation/system.js +112 -2
- package/lib/chevre/service/assetTransaction/moneyTransfer.js +1 -1
- package/lib/chevre/service/assetTransaction/pay/account/validation.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/reserve.js +10 -3
- package/lib/chevre/service/event.d.ts +3 -0
- package/lib/chevre/service/event.js +52 -21
- package/lib/chevre/service/iam.d.ts +6 -2
- package/lib/chevre/service/iam.js +23 -9
- package/lib/chevre/service/offer/event/factory.js +22 -13
- package/lib/chevre/service/offer/event/importFromCOA.js +2 -2
- package/lib/chevre/service/offer/eventServiceByCOA/factory.js +15 -8
- package/lib/chevre/service/offer/eventServiceByCOA.js +7 -9
- package/lib/chevre/service/offer/product/factory.js +13 -6
- package/lib/chevre/service/offer/product.js +2 -2
- package/lib/chevre/service/offer.d.ts +16 -8
- package/lib/chevre/service/offer.js +71 -8
- package/lib/chevre/service/order/createAccountingReportIfNotExist.js +31 -17
- package/lib/chevre/service/order/onOrderStatusChanged/factory.js +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged.js +2 -2
- package/lib/chevre/service/order/placeOrder.js +4 -4
- package/lib/chevre/service/order/returnOrder.js +1 -1
- package/lib/chevre/service/order/sendOrder.js +3 -3
- package/lib/chevre/service/payment/any/onPaymentStatusChanged.js +4 -6
- package/lib/chevre/service/payment/any/onRefund.js +46 -42
- package/lib/chevre/service/payment/creditCard.js +2 -2
- package/lib/chevre/service/payment/movieTicket/checkByIdentifier.d.ts +1 -1
- package/lib/chevre/service/payment/movieTicket/factory.d.ts +1 -1
- package/lib/chevre/service/payment/movieTicket/getCredentials.d.ts +1 -1
- package/lib/chevre/service/payment/movieTicket/getCredentials.js +1 -1
- package/lib/chevre/service/payment/movieTicket/validation.js +16 -9
- package/lib/chevre/service/payment/movieTicket.js +2 -2
- package/lib/chevre/service/reserve/cancelReservation.js +15 -3
- package/lib/chevre/service/reserve/confirmReservation.js +19 -11
- package/lib/chevre/service/task/aggregateScreeningEvent.js +1 -1
- package/lib/chevre/service/task/cancelPendingReservation.js +1 -1
- package/lib/chevre/service/task/cancelReservation.js +1 -1
- package/lib/chevre/service/task/deleteTransaction.js +2 -0
- package/lib/chevre/service/task/onEventChanged.d.ts +7 -0
- package/lib/chevre/service/task/onEventChanged.js +29 -0
- package/lib/chevre/service/task/onResourceUpdated.d.ts +7 -0
- package/lib/chevre/service/task/onResourceUpdated.js +396 -0
- package/lib/chevre/service/task/syncScreeningRooms.d.ts +7 -0
- package/lib/chevre/service/task/syncScreeningRooms.js +24 -0
- package/lib/chevre/service/task/voidReserveTransaction.js +1 -1
- package/lib/chevre/service/transaction/deleteTransaction.d.ts +2 -0
- package/lib/chevre/service/transaction/deleteTransaction.js +129 -1
- package/lib/chevre/service/transaction/moneyTransfer/exportTasks/factory.js +1 -0
- package/lib/chevre/service/transaction/moneyTransfer/factory.d.ts +1 -1
- package/lib/chevre/service/transaction/moneyTransfer.js +1 -1
- package/lib/chevre/service/transaction/orderProgramMembership/findCreditCard.js +1 -1
- package/lib/chevre/service/transaction/orderProgramMembership/findPaymentCardPermit.js +1 -1
- package/lib/chevre/service/transaction/orderProgramMembership.js +1 -1
- package/lib/chevre/service/transaction/placeOrder/exportTasks/factory.js +1 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/givePointAward.js +1 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/moneyTransfer.js +1 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/registerService.js +1 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/sendEmailMessage.js +4 -4
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions.js +3 -4
- package/lib/chevre/service/transaction/placeOrderInProgress/result/acceptedOffers.js +8 -12
- package/lib/chevre/service/transaction/placeOrderInProgress.js +6 -4
- package/lib/chevre/service/transaction/returnOrder/exportTasks/factory.js +1 -0
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnMoneyTransfer.js +2 -2
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.js +5 -5
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPointAward.js +2 -2
- package/lib/chevre/service/transaction/returnOrder/potentialActions/sendEmailMessage.js +3 -3
- package/lib/chevre/service/transaction/returnOrder/potentialActions.js +1 -1
- package/lib/chevre/service/transaction/returnOrder.js +3 -1
- package/lib/chevre/settings.d.ts +11 -0
- package/lib/chevre/settings.js +44 -2
- package/package.json +3 -3
- package/example/src/chevre/eventCatalog2eventService.ts +0 -123
- package/example/src/chevre/migrateOrderAdditionalProperties.ts +0 -85
- package/example/src/chevre/migrateStockHolderKeys.ts +0 -89
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.schema = exports.modelName = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const writeConcern_1 = require("../writeConcern");
|
|
6
|
+
const modelName = 'HoldReservation';
|
|
7
|
+
exports.modelName = modelName;
|
|
8
|
+
/**
|
|
9
|
+
* 保留予約スキーマ
|
|
10
|
+
*/
|
|
11
|
+
const schema = new mongoose_1.Schema({
|
|
12
|
+
project: {
|
|
13
|
+
type: mongoose_1.SchemaTypes.Mixed,
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
typeOf: {
|
|
17
|
+
type: String,
|
|
18
|
+
required: true
|
|
19
|
+
},
|
|
20
|
+
reservationFor: {
|
|
21
|
+
type: mongoose_1.SchemaTypes.Mixed,
|
|
22
|
+
required: true
|
|
23
|
+
},
|
|
24
|
+
reservationCount: {
|
|
25
|
+
type: Number,
|
|
26
|
+
default: 0,
|
|
27
|
+
required: true
|
|
28
|
+
},
|
|
29
|
+
reservations: [mongoose_1.SchemaTypes.Mixed]
|
|
30
|
+
}, {
|
|
31
|
+
collection: 'holdReservations',
|
|
32
|
+
id: true,
|
|
33
|
+
read: 'primary',
|
|
34
|
+
writeConcern: writeConcern_1.writeConcern,
|
|
35
|
+
strict: true,
|
|
36
|
+
strictQuery: false,
|
|
37
|
+
useNestedStrict: true,
|
|
38
|
+
timestamps: {
|
|
39
|
+
createdAt: 'createdAt',
|
|
40
|
+
updatedAt: 'updatedAt'
|
|
41
|
+
},
|
|
42
|
+
toJSON: {
|
|
43
|
+
getters: false,
|
|
44
|
+
virtuals: false,
|
|
45
|
+
minimize: false,
|
|
46
|
+
versionKey: false
|
|
47
|
+
},
|
|
48
|
+
toObject: {
|
|
49
|
+
getters: false,
|
|
50
|
+
virtuals: true,
|
|
51
|
+
minimize: false,
|
|
52
|
+
versionKey: false
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
exports.schema = schema;
|
|
56
|
+
schema.index({ createdAt: 1 }, { name: 'searchByCreatedAt' });
|
|
57
|
+
schema.index({ updatedAt: 1 }, { name: 'searchByUpdatedAt' });
|
|
58
|
+
schema.index({ 'reservationFor.startDate': -1 }, { name: 'searchByReservationForStartDate' });
|
|
59
|
+
// イベントIDでunique
|
|
60
|
+
schema.index({ 'reservationFor.id': 1 }, { name: 'uniqueReservationForId', unique: true });
|
|
61
|
+
schema.index({ 'reservationFor.id': 1, 'reservationFor.startDate': -1 }, { name: 'searchByReservationForId' });
|
|
62
|
+
schema.index({ 'project.id': 1, 'reservationFor.startDate': -1 }, { name: 'searchByProjectId' });
|
|
63
|
+
schema.index({ reservationCount: 1, 'reservationFor.startDate': -1 }, { name: 'searchByReservationCount' });
|
|
64
|
+
schema.index({ 'reservations.reservationNumber': 1, 'reservationFor.startDate': -1 }, {
|
|
65
|
+
name: 'searchByReservationNumber',
|
|
66
|
+
partialFilterExpression: {
|
|
67
|
+
'reservations.reservationNumber': { $exists: true }
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
schema.index({ 'reservations.subReservation.id': 1, 'reservationFor.startDate': -1 }, {
|
|
71
|
+
name: 'searchBySubReservationId',
|
|
72
|
+
partialFilterExpression: {
|
|
73
|
+
'reservations.subReservation.id': { $exists: true }
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
schema.index({ 'reservations.subReservation.identifier': 1, 'reservationFor.startDate': -1 }, {
|
|
77
|
+
name: 'searchBySubReservationIdentifier',
|
|
78
|
+
partialFilterExpression: {
|
|
79
|
+
'reservations.subReservation.identifier': { $exists: true }
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
schema.index({ 'reservations.subReservation.reservedTicket.ticketedSeat.seatNumber': 1, 'reservationFor.startDate': -1 }, {
|
|
83
|
+
name: 'searchBySubReservationSeatNumber',
|
|
84
|
+
partialFilterExpression: {
|
|
85
|
+
'reservations.subReservation.reservedTicket.ticketedSeat.seatNumber': { $exists: true }
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
schema.index({ 'reservations.subReservation.reservedTicket.ticketedSeat.seatSection': 1, 'reservationFor.startDate': -1 }, {
|
|
89
|
+
name: 'searchBySubReservationSeatSection',
|
|
90
|
+
partialFilterExpression: {
|
|
91
|
+
'reservations.subReservation.reservedTicket.ticketedSeat.seatSection': { $exists: true }
|
|
92
|
+
}
|
|
93
|
+
});
|
|
@@ -58,12 +58,12 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
58
58
|
name?: any;
|
|
59
59
|
typeOf?: string | undefined;
|
|
60
60
|
project?: any;
|
|
61
|
+
priceCurrency?: string | undefined;
|
|
61
62
|
alternateName?: any;
|
|
62
63
|
description?: any;
|
|
63
64
|
identifier?: string | undefined;
|
|
64
65
|
itemOffered?: any;
|
|
65
66
|
eligibleQuantity?: any;
|
|
66
|
-
priceCurrency?: string | undefined;
|
|
67
67
|
color?: any;
|
|
68
68
|
validFrom?: Date | undefined;
|
|
69
69
|
category?: any;
|
|
@@ -88,12 +88,12 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
88
88
|
name?: any;
|
|
89
89
|
typeOf?: string | undefined;
|
|
90
90
|
project?: any;
|
|
91
|
+
priceCurrency?: string | undefined;
|
|
91
92
|
alternateName?: any;
|
|
92
93
|
description?: any;
|
|
93
94
|
identifier?: string | undefined;
|
|
94
95
|
itemOffered?: any;
|
|
95
96
|
eligibleQuantity?: any;
|
|
96
|
-
priceCurrency?: string | undefined;
|
|
97
97
|
color?: any;
|
|
98
98
|
validFrom?: Date | undefined;
|
|
99
99
|
category?: any;
|
|
@@ -118,12 +118,12 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
118
118
|
name?: any;
|
|
119
119
|
typeOf?: string | undefined;
|
|
120
120
|
project?: any;
|
|
121
|
+
priceCurrency?: string | undefined;
|
|
121
122
|
alternateName?: any;
|
|
122
123
|
description?: any;
|
|
123
124
|
identifier?: string | undefined;
|
|
124
125
|
itemOffered?: any;
|
|
125
126
|
eligibleQuantity?: any;
|
|
126
|
-
priceCurrency?: string | undefined;
|
|
127
127
|
color?: any;
|
|
128
128
|
validFrom?: Date | undefined;
|
|
129
129
|
category?: any;
|
|
@@ -53,71 +53,71 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
53
53
|
};
|
|
54
54
|
}, {
|
|
55
55
|
typeOf: string;
|
|
56
|
-
additionalProperty: any[];
|
|
57
|
-
identifier: any[];
|
|
58
56
|
acceptedOffers: any[];
|
|
57
|
+
orderedItem: any[];
|
|
59
58
|
paymentMethods: any[];
|
|
59
|
+
additionalProperty: any[];
|
|
60
|
+
identifier: any[];
|
|
60
61
|
discounts: any[];
|
|
61
|
-
orderedItem: any[];
|
|
62
62
|
name?: string | undefined;
|
|
63
63
|
url?: string | undefined;
|
|
64
64
|
project?: any;
|
|
65
|
-
orderNumber?: string | undefined;
|
|
66
|
-
seller?: any;
|
|
67
65
|
broker?: any;
|
|
66
|
+
confirmationNumber?: string | undefined;
|
|
67
|
+
orderDate?: Date | undefined;
|
|
68
|
+
orderNumber?: string | undefined;
|
|
68
69
|
price?: number | undefined;
|
|
69
70
|
priceCurrency?: string | undefined;
|
|
71
|
+
seller?: any;
|
|
70
72
|
customer?: any;
|
|
71
73
|
returner?: any;
|
|
72
|
-
confirmationNumber?: string | undefined;
|
|
73
74
|
orderStatus?: string | undefined;
|
|
74
|
-
orderDate?: Date | undefined;
|
|
75
75
|
isGift?: boolean | undefined;
|
|
76
76
|
dateReturned?: Date | undefined;
|
|
77
77
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
78
78
|
typeOf: string;
|
|
79
|
-
additionalProperty: any[];
|
|
80
|
-
identifier: any[];
|
|
81
79
|
acceptedOffers: any[];
|
|
80
|
+
orderedItem: any[];
|
|
82
81
|
paymentMethods: any[];
|
|
82
|
+
additionalProperty: any[];
|
|
83
|
+
identifier: any[];
|
|
83
84
|
discounts: any[];
|
|
84
|
-
orderedItem: any[];
|
|
85
85
|
name?: string | undefined;
|
|
86
86
|
url?: string | undefined;
|
|
87
87
|
project?: any;
|
|
88
|
-
orderNumber?: string | undefined;
|
|
89
|
-
seller?: any;
|
|
90
88
|
broker?: any;
|
|
89
|
+
confirmationNumber?: string | undefined;
|
|
90
|
+
orderDate?: Date | undefined;
|
|
91
|
+
orderNumber?: string | undefined;
|
|
91
92
|
price?: number | undefined;
|
|
92
93
|
priceCurrency?: string | undefined;
|
|
94
|
+
seller?: any;
|
|
93
95
|
customer?: any;
|
|
94
96
|
returner?: any;
|
|
95
|
-
confirmationNumber?: string | undefined;
|
|
96
97
|
orderStatus?: string | undefined;
|
|
97
|
-
orderDate?: Date | undefined;
|
|
98
98
|
isGift?: boolean | undefined;
|
|
99
99
|
dateReturned?: Date | undefined;
|
|
100
100
|
}>> & Omit<import("mongoose").FlatRecord<{
|
|
101
101
|
typeOf: string;
|
|
102
|
-
additionalProperty: any[];
|
|
103
|
-
identifier: any[];
|
|
104
102
|
acceptedOffers: any[];
|
|
103
|
+
orderedItem: any[];
|
|
105
104
|
paymentMethods: any[];
|
|
105
|
+
additionalProperty: any[];
|
|
106
|
+
identifier: any[];
|
|
106
107
|
discounts: any[];
|
|
107
|
-
orderedItem: any[];
|
|
108
108
|
name?: string | undefined;
|
|
109
109
|
url?: string | undefined;
|
|
110
110
|
project?: any;
|
|
111
|
-
orderNumber?: string | undefined;
|
|
112
|
-
seller?: any;
|
|
113
111
|
broker?: any;
|
|
112
|
+
confirmationNumber?: string | undefined;
|
|
113
|
+
orderDate?: Date | undefined;
|
|
114
|
+
orderNumber?: string | undefined;
|
|
114
115
|
price?: number | undefined;
|
|
115
116
|
priceCurrency?: string | undefined;
|
|
117
|
+
seller?: any;
|
|
116
118
|
customer?: any;
|
|
117
119
|
returner?: any;
|
|
118
|
-
confirmationNumber?: string | undefined;
|
|
119
120
|
orderStatus?: string | undefined;
|
|
120
|
-
orderDate?: Date | undefined;
|
|
121
121
|
isGift?: boolean | undefined;
|
|
122
122
|
dateReturned?: Date | undefined;
|
|
123
123
|
}> & {
|
|
@@ -73,6 +73,8 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
73
73
|
smokingAllowed?: boolean | undefined;
|
|
74
74
|
sameAs?: string | undefined;
|
|
75
75
|
parentOrganization?: any;
|
|
76
|
+
openSeatingAllowed?: any;
|
|
77
|
+
amenityFeature?: any;
|
|
76
78
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
77
79
|
typeOf: string;
|
|
78
80
|
additionalProperty: any[];
|
|
@@ -95,6 +97,8 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
95
97
|
smokingAllowed?: boolean | undefined;
|
|
96
98
|
sameAs?: string | undefined;
|
|
97
99
|
parentOrganization?: any;
|
|
100
|
+
openSeatingAllowed?: any;
|
|
101
|
+
amenityFeature?: any;
|
|
98
102
|
}>> & Omit<import("mongoose").FlatRecord<{
|
|
99
103
|
typeOf: string;
|
|
100
104
|
additionalProperty: any[];
|
|
@@ -117,6 +121,8 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
117
121
|
smokingAllowed?: boolean | undefined;
|
|
118
122
|
sameAs?: string | undefined;
|
|
119
123
|
parentOrganization?: any;
|
|
124
|
+
openSeatingAllowed?: any;
|
|
125
|
+
amenityFeature?: any;
|
|
120
126
|
}> & {
|
|
121
127
|
_id: import("mongoose").Types.ObjectId;
|
|
122
128
|
}, never>>;
|
|
@@ -32,7 +32,10 @@ const schema = new mongoose_1.Schema({
|
|
|
32
32
|
kanaName: String,
|
|
33
33
|
offers: mongoose_1.SchemaTypes.Mixed,
|
|
34
34
|
additionalProperty: [mongoose_1.SchemaTypes.Mixed],
|
|
35
|
-
parentOrganization: mongoose_1.SchemaTypes.Mixed
|
|
35
|
+
parentOrganization: mongoose_1.SchemaTypes.Mixed,
|
|
36
|
+
// ↓ルームの施設からの分離に伴い属性追加(2023-06-22~)
|
|
37
|
+
openSeatingAllowed: mongoose_1.SchemaTypes.Mixed,
|
|
38
|
+
amenityFeature: mongoose_1.SchemaTypes.Mixed
|
|
36
39
|
}, {
|
|
37
40
|
collection: 'places',
|
|
38
41
|
id: true,
|
|
@@ -132,3 +135,15 @@ schema.index({ 'containsPlace.containsPlace.containsPlace.additionalProperty': 1
|
|
|
132
135
|
'containsPlace.containsPlace.containsPlace.additionalProperty': { $exists: true }
|
|
133
136
|
}
|
|
134
137
|
});
|
|
138
|
+
schema.index({ 'containedInPlace.id': 1, branchCode: 1 }, {
|
|
139
|
+
name: 'searchByContainedInPlaceId',
|
|
140
|
+
partialFilterExpression: {
|
|
141
|
+
'containedInPlace.id': { $exists: true }
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
schema.index({ 'containedInPlace.branchCode': 1, branchCode: 1 }, {
|
|
145
|
+
name: 'searchByContainedInPlaceBranchCode',
|
|
146
|
+
partialFilterExpression: {
|
|
147
|
+
'containedInPlace.branchCode': { $exists: true }
|
|
148
|
+
}
|
|
149
|
+
});
|
|
@@ -100,3 +100,9 @@ schema.index({ 'name.en': 1, productID: 1 }, {
|
|
|
100
100
|
'name.en': { $exists: true }
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
|
+
schema.index({ 'provider.id': 1, productID: 1 }, {
|
|
104
|
+
name: 'searchByProviderId',
|
|
105
|
+
partialFilterExpression: {
|
|
106
|
+
'provider.id': { $exists: true }
|
|
107
|
+
}
|
|
108
|
+
});
|
|
@@ -59,14 +59,14 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
59
59
|
attended: boolean;
|
|
60
60
|
_id?: string | undefined;
|
|
61
61
|
project?: any;
|
|
62
|
+
broker?: any;
|
|
63
|
+
price?: any;
|
|
64
|
+
priceCurrency?: string | undefined;
|
|
62
65
|
additionalProperty?: any;
|
|
63
66
|
reservationFor?: any;
|
|
64
67
|
underName?: any;
|
|
65
68
|
issuedThrough?: any;
|
|
66
69
|
subReservation?: any;
|
|
67
|
-
broker?: any;
|
|
68
|
-
price?: any;
|
|
69
|
-
priceCurrency?: string | undefined;
|
|
70
70
|
reservedTicket?: any;
|
|
71
71
|
additionalTicketText?: string | undefined;
|
|
72
72
|
bookingTime?: Date | undefined;
|
|
@@ -87,14 +87,14 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
87
87
|
attended: boolean;
|
|
88
88
|
_id?: string | undefined;
|
|
89
89
|
project?: any;
|
|
90
|
+
broker?: any;
|
|
91
|
+
price?: any;
|
|
92
|
+
priceCurrency?: string | undefined;
|
|
90
93
|
additionalProperty?: any;
|
|
91
94
|
reservationFor?: any;
|
|
92
95
|
underName?: any;
|
|
93
96
|
issuedThrough?: any;
|
|
94
97
|
subReservation?: any;
|
|
95
|
-
broker?: any;
|
|
96
|
-
price?: any;
|
|
97
|
-
priceCurrency?: string | undefined;
|
|
98
98
|
reservedTicket?: any;
|
|
99
99
|
additionalTicketText?: string | undefined;
|
|
100
100
|
bookingTime?: Date | undefined;
|
|
@@ -115,14 +115,14 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
115
115
|
attended: boolean;
|
|
116
116
|
_id?: string | undefined;
|
|
117
117
|
project?: any;
|
|
118
|
+
broker?: any;
|
|
119
|
+
price?: any;
|
|
120
|
+
priceCurrency?: string | undefined;
|
|
118
121
|
additionalProperty?: any;
|
|
119
122
|
reservationFor?: any;
|
|
120
123
|
underName?: any;
|
|
121
124
|
issuedThrough?: any;
|
|
122
125
|
subReservation?: any;
|
|
123
|
-
broker?: any;
|
|
124
|
-
price?: any;
|
|
125
|
-
priceCurrency?: string | undefined;
|
|
126
126
|
reservedTicket?: any;
|
|
127
127
|
additionalTicketText?: string | undefined;
|
|
128
128
|
bookingTime?: Date | undefined;
|
|
@@ -59,6 +59,7 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
59
59
|
result?: any;
|
|
60
60
|
expires?: Date | undefined;
|
|
61
61
|
project?: any;
|
|
62
|
+
seller?: any;
|
|
62
63
|
agent?: any;
|
|
63
64
|
recipient?: any;
|
|
64
65
|
startDate?: Date | undefined;
|
|
@@ -66,7 +67,6 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
66
67
|
potentialActions?: any;
|
|
67
68
|
tasksExportationStatus?: string | undefined;
|
|
68
69
|
tasksExportedAt?: Date | undefined;
|
|
69
|
-
seller?: any;
|
|
70
70
|
tasksExportAction?: any;
|
|
71
71
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
72
72
|
object?: any;
|
|
@@ -76,6 +76,7 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
76
76
|
result?: any;
|
|
77
77
|
expires?: Date | undefined;
|
|
78
78
|
project?: any;
|
|
79
|
+
seller?: any;
|
|
79
80
|
agent?: any;
|
|
80
81
|
recipient?: any;
|
|
81
82
|
startDate?: Date | undefined;
|
|
@@ -83,7 +84,6 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
83
84
|
potentialActions?: any;
|
|
84
85
|
tasksExportationStatus?: string | undefined;
|
|
85
86
|
tasksExportedAt?: Date | undefined;
|
|
86
|
-
seller?: any;
|
|
87
87
|
tasksExportAction?: any;
|
|
88
88
|
}>> & Omit<import("mongoose").FlatRecord<{
|
|
89
89
|
object?: any;
|
|
@@ -93,6 +93,7 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
93
93
|
result?: any;
|
|
94
94
|
expires?: Date | undefined;
|
|
95
95
|
project?: any;
|
|
96
|
+
seller?: any;
|
|
96
97
|
agent?: any;
|
|
97
98
|
recipient?: any;
|
|
98
99
|
startDate?: Date | undefined;
|
|
@@ -100,7 +101,6 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
100
101
|
potentialActions?: any;
|
|
101
102
|
tasksExportationStatus?: string | undefined;
|
|
102
103
|
tasksExportedAt?: Date | undefined;
|
|
103
|
-
seller?: any;
|
|
104
104
|
tasksExportAction?: any;
|
|
105
105
|
}> & {
|
|
106
106
|
_id: import("mongoose").Types.ObjectId;
|
package/lib/chevre/repo/offer.js
CHANGED
|
@@ -25,6 +25,7 @@ const uniqid = require("uniqid");
|
|
|
25
25
|
const factory = require("../factory");
|
|
26
26
|
const offer_1 = require("./mongoose/schemas/offer");
|
|
27
27
|
const offerCatalog_1 = require("./mongoose/schemas/offerCatalog");
|
|
28
|
+
const settings_1 = require("../settings");
|
|
28
29
|
/**
|
|
29
30
|
* オファーリポジトリ
|
|
30
31
|
*/
|
|
@@ -409,7 +410,7 @@ class MongoRepository {
|
|
|
409
410
|
return __awaiter(this, void 0, void 0, function* () {
|
|
410
411
|
const conditions = MongoRepository.CREATE_OFFER_MONGO_CONDITIONS(params);
|
|
411
412
|
return this.offerModel.countDocuments((conditions.length > 0) ? { $and: conditions } : {})
|
|
412
|
-
.setOptions({ maxTimeMS:
|
|
413
|
+
.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
413
414
|
.exec();
|
|
414
415
|
});
|
|
415
416
|
}
|
|
@@ -434,7 +435,7 @@ class MongoRepository {
|
|
|
434
435
|
if (((_a = params.sort) === null || _a === void 0 ? void 0 : _a['priceSpecification.price']) !== undefined) {
|
|
435
436
|
query.sort({ 'priceSpecification.price': params.sort['priceSpecification.price'] });
|
|
436
437
|
}
|
|
437
|
-
return query.setOptions({ maxTimeMS:
|
|
438
|
+
return query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
438
439
|
.exec()
|
|
439
440
|
.then((docs) => docs.map((doc) => doc.toObject()));
|
|
440
441
|
});
|
|
@@ -178,33 +178,6 @@ class MongoRepository {
|
|
|
178
178
|
.exec();
|
|
179
179
|
});
|
|
180
180
|
}
|
|
181
|
-
// public async findById(params: {
|
|
182
|
-
// id: string;
|
|
183
|
-
// }): Promise<factory.offerCatalog.IOfferCatalog> {
|
|
184
|
-
// const doc = await this.offerCatalogModel.findOne(
|
|
185
|
-
// {
|
|
186
|
-
// _id: params.id
|
|
187
|
-
// },
|
|
188
|
-
// {
|
|
189
|
-
// __v: 0,
|
|
190
|
-
// createdAt: 0,
|
|
191
|
-
// updatedAt: 0
|
|
192
|
-
// }
|
|
193
|
-
// )
|
|
194
|
-
// .exec();
|
|
195
|
-
// if (doc === null) {
|
|
196
|
-
// throw new factory.errors.NotFound(this.offerCatalogModel.modelName);
|
|
197
|
-
// }
|
|
198
|
-
// return doc.toObject();
|
|
199
|
-
// }
|
|
200
|
-
// public async count(
|
|
201
|
-
// params: factory.offerCatalog.ISearchConditions
|
|
202
|
-
// ): Promise<number> {
|
|
203
|
-
// const conditions = MongoRepository.CREATE_MONGO_CONDITIONS(params);
|
|
204
|
-
// return this.offerCatalogModel.countDocuments((conditions.length > 0) ? { $and: conditions } : {})
|
|
205
|
-
// .setOptions({ maxTimeMS: 10000 })
|
|
206
|
-
// .exec();
|
|
207
|
-
// }
|
|
208
181
|
search(params) {
|
|
209
182
|
var _a;
|
|
210
183
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -23,6 +23,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
23
23
|
exports.MongoRepository = void 0;
|
|
24
24
|
const factory = require("../factory");
|
|
25
25
|
const offerItemCondition_1 = require("./mongoose/schemas/offerItemCondition");
|
|
26
|
+
const settings_1 = require("../settings");
|
|
26
27
|
/**
|
|
27
28
|
* アイテムコンディションリポジトリ
|
|
28
29
|
*/
|
|
@@ -88,7 +89,7 @@ class MongoRepository {
|
|
|
88
89
|
if (((_a = params.sort) === null || _a === void 0 ? void 0 : _a.identifier) !== undefined) {
|
|
89
90
|
query.sort({ identifier: params.sort.identifier });
|
|
90
91
|
}
|
|
91
|
-
return query.setOptions({ maxTimeMS:
|
|
92
|
+
return query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
92
93
|
.exec()
|
|
93
94
|
.then((docs) => docs.map((doc) => doc.toObject()));
|
|
94
95
|
});
|
package/lib/chevre/repo/order.js
CHANGED
|
@@ -14,6 +14,7 @@ const factory = require("../factory");
|
|
|
14
14
|
const order_1 = require("./mongoose/schemas/order");
|
|
15
15
|
const errorHandler_1 = require("../errorHandler");
|
|
16
16
|
const order_2 = require("../factory/order");
|
|
17
|
+
const settings_1 = require("../settings");
|
|
17
18
|
/**
|
|
18
19
|
* 注文リポジトリ
|
|
19
20
|
*/
|
|
@@ -888,7 +889,7 @@ class MongoRepository {
|
|
|
888
889
|
return __awaiter(this, void 0, void 0, function* () {
|
|
889
890
|
const conditions = MongoRepository.CREATE_MONGO_CONDITIONS(params);
|
|
890
891
|
return this.orderModel.countDocuments((conditions.length > 0) ? { $and: conditions } : {})
|
|
891
|
-
.setOptions({ maxTimeMS:
|
|
892
|
+
.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
892
893
|
.exec();
|
|
893
894
|
});
|
|
894
895
|
}
|
|
@@ -920,7 +921,7 @@ class MongoRepository {
|
|
|
920
921
|
}
|
|
921
922
|
// const explainResult = await (<any>query).explain();
|
|
922
923
|
// console.log(explainResult[0].executionStats.allPlansExecution.map((e: any) => e.executionStages.inputStage));
|
|
923
|
-
return query.setOptions({ maxTimeMS:
|
|
924
|
+
return query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
924
925
|
.exec()
|
|
925
926
|
.then((docs) => docs.map((doc) => doc.toObject()));
|
|
926
927
|
});
|
|
@@ -935,7 +936,7 @@ class MongoRepository {
|
|
|
935
936
|
.select({
|
|
936
937
|
'acceptedOffers.id': 1
|
|
937
938
|
});
|
|
938
|
-
const orders = yield query.setOptions({ maxTimeMS:
|
|
939
|
+
const orders = yield query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
939
940
|
.exec()
|
|
940
941
|
.then((docs) => docs.map((doc) => {
|
|
941
942
|
return doc.toObject();
|
|
@@ -985,7 +986,7 @@ class MongoRepository {
|
|
|
985
986
|
.skip(params.limit * (page - 1));
|
|
986
987
|
}
|
|
987
988
|
return aggregate.allowDiskUse(true)
|
|
988
|
-
.option({ maxTimeMS:
|
|
989
|
+
.option({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
989
990
|
.exec();
|
|
990
991
|
});
|
|
991
992
|
}
|
|
@@ -1016,7 +1017,7 @@ class MongoRepository {
|
|
|
1016
1017
|
'acceptedOffers.itemOffered.reservationNumber': { $exists: true },
|
|
1017
1018
|
orderNumber: { $in: params.orderNumber.$in }
|
|
1018
1019
|
})
|
|
1019
|
-
.setOptions({ maxTimeMS:
|
|
1020
|
+
.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
1020
1021
|
.exec();
|
|
1021
1022
|
});
|
|
1022
1023
|
}
|
|
@@ -1032,7 +1033,7 @@ class MongoRepository {
|
|
|
1032
1033
|
'acceptedOffers.itemOffered.reservationFor.id': { $exists: true },
|
|
1033
1034
|
orderNumber: { $in: params.orderNumber.$in }
|
|
1034
1035
|
})
|
|
1035
|
-
.setOptions({ maxTimeMS:
|
|
1036
|
+
.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
1036
1037
|
.exec();
|
|
1037
1038
|
});
|
|
1038
1039
|
}
|
|
@@ -1052,7 +1053,7 @@ class MongoRepository {
|
|
|
1052
1053
|
id: '$acceptedOffers.id',
|
|
1053
1054
|
priceSpecification: '$acceptedOffers.priceSpecification'
|
|
1054
1055
|
});
|
|
1055
|
-
return aggregate.option({ maxTimeMS:
|
|
1056
|
+
return aggregate.option({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
1056
1057
|
.exec();
|
|
1057
1058
|
});
|
|
1058
1059
|
}
|
|
@@ -14,6 +14,7 @@ const uuid = require("uuid");
|
|
|
14
14
|
const ownershipInfo_1 = require("./mongoose/schemas/ownershipInfo");
|
|
15
15
|
const errorHandler_1 = require("../errorHandler");
|
|
16
16
|
const factory = require("../factory");
|
|
17
|
+
const settings_1 = require("../settings");
|
|
17
18
|
/**
|
|
18
19
|
* 所有権リポジトリ
|
|
19
20
|
*/
|
|
@@ -276,12 +277,6 @@ class MongoRepository {
|
|
|
276
277
|
return doc.toObject();
|
|
277
278
|
});
|
|
278
279
|
}
|
|
279
|
-
// public async count(params: factory.ownershipInfo.ISearchConditions): Promise<number> {
|
|
280
|
-
// const conditions = MongoRepository.CREATE_MONGO_CONDITIONS(params);
|
|
281
|
-
// return this.ownershipInfoModel.countDocuments((conditions.length > 0) ? { $and: conditions } : {})
|
|
282
|
-
// .setOptions({ maxTimeMS: 10000 })
|
|
283
|
-
// .exec();
|
|
284
|
-
// }
|
|
285
280
|
/**
|
|
286
281
|
* 所有権を検索する
|
|
287
282
|
*/
|
|
@@ -300,7 +295,7 @@ class MongoRepository {
|
|
|
300
295
|
if (((_a = params.sort) === null || _a === void 0 ? void 0 : _a.ownedFrom) !== undefined) {
|
|
301
296
|
query.sort({ ownedFrom: params.sort.ownedFrom });
|
|
302
297
|
}
|
|
303
|
-
return query.setOptions({ maxTimeMS:
|
|
298
|
+
return query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
304
299
|
.exec()
|
|
305
300
|
.then((docs) => docs.map((doc) => doc.toObject()));
|
|
306
301
|
});
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Connection } from 'mongoose';
|
|
2
|
+
import * as factory from '../factory';
|
|
3
|
+
export type IAvailablePaymentServiceType = factory.service.paymentService.PaymentServiceType.CreditCard | factory.service.paymentService.PaymentServiceType.MovieTicket;
|
|
4
|
+
/**
|
|
5
|
+
* 決済サービスプロバイダーリポジトリ
|
|
6
|
+
*/
|
|
7
|
+
export declare class MongoRepository {
|
|
8
|
+
private readonly productModel;
|
|
9
|
+
constructor(connection: Connection);
|
|
10
|
+
/**
|
|
11
|
+
* 決済サービスプロバイダー検索
|
|
12
|
+
*/
|
|
13
|
+
search(params: {
|
|
14
|
+
limit?: number;
|
|
15
|
+
page?: number;
|
|
16
|
+
project?: {
|
|
17
|
+
id?: {
|
|
18
|
+
$eq?: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
id?: {
|
|
22
|
+
$eq?: string;
|
|
23
|
+
};
|
|
24
|
+
provider?: {
|
|
25
|
+
id?: {
|
|
26
|
+
$eq?: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
}): Promise<(Pick<factory.service.paymentService.IService, 'id' | 'name' | 'typeOf'> & {
|
|
30
|
+
provider: Pick<factory.service.paymentService.IProvider, 'id' | 'name' | 'credentials'>;
|
|
31
|
+
})[]>;
|
|
32
|
+
create(params: factory.service.paymentService.IProvider & {
|
|
33
|
+
project: {
|
|
34
|
+
id: string;
|
|
35
|
+
};
|
|
36
|
+
providesPaymentService: {
|
|
37
|
+
id: string;
|
|
38
|
+
typeOf: IAvailablePaymentServiceType;
|
|
39
|
+
};
|
|
40
|
+
}): Promise<{
|
|
41
|
+
id: string;
|
|
42
|
+
}>;
|
|
43
|
+
update(params: factory.service.paymentService.IProvider & {
|
|
44
|
+
project: {
|
|
45
|
+
id: string;
|
|
46
|
+
};
|
|
47
|
+
providesPaymentService: {
|
|
48
|
+
id: string;
|
|
49
|
+
typeOf: IAvailablePaymentServiceType;
|
|
50
|
+
};
|
|
51
|
+
}): Promise<{
|
|
52
|
+
id: string;
|
|
53
|
+
}>;
|
|
54
|
+
deleteOne(params: Pick<factory.service.paymentService.IProvider, 'id'> & {
|
|
55
|
+
project: {
|
|
56
|
+
id: string;
|
|
57
|
+
};
|
|
58
|
+
providesPaymentService: {
|
|
59
|
+
id: string;
|
|
60
|
+
typeOf: IAvailablePaymentServiceType;
|
|
61
|
+
};
|
|
62
|
+
}): Promise<{
|
|
63
|
+
id: string;
|
|
64
|
+
}>;
|
|
65
|
+
}
|